rmapi-js 12.0.1 → 12.0.2

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/raw.d.ts CHANGED
@@ -377,7 +377,7 @@ export interface Metadata {
377
377
  /** creation time, a string of the epoch timestamp */
378
378
  createdTime?: string;
379
379
  /** [speculative] true if the item has been actually deleted */
380
- deleted?: boolean;
380
+ deleted?: boolean | null;
381
381
  /** the last modify time, the string of the epoch timestamp */
382
382
  lastModified?: string;
383
383
  /** the last opened epoch timestamp, isn't defined for CollectionType */
@@ -385,9 +385,9 @@ export interface Metadata {
385
385
  /** the last page opened, isn't defined for CollectionType, starts at 0*/
386
386
  lastOpenedPage?: number;
387
387
  /** [speculative] true if the metadata has been modified */
388
- metadatamodified?: boolean;
388
+ metadatamodified?: boolean | null;
389
389
  /** [speculative] true if the item has been modified */
390
- modified?: boolean;
390
+ modified?: boolean | null;
391
391
  /**
392
392
  * the id of the parent collection
393
393
  *
@@ -398,7 +398,7 @@ export interface Metadata {
398
398
  /** true of the item is starred */
399
399
  pinned: boolean;
400
400
  /** [unknown] */
401
- synced?: boolean;
401
+ synced?: boolean | null;
402
402
  /**
403
403
  * the type of item this corresponds to
404
404
  *
package/dist/raw.js CHANGED
@@ -209,10 +209,10 @@ const metadata = z
209
209
  lastOpened: z.string().optional(),
210
210
  lastOpenedPage: z.number().int().optional(),
211
211
  createdTime: z.string().optional(),
212
- deleted: z.boolean().optional(),
213
- metadatamodified: z.boolean().optional(),
214
- modified: z.boolean().optional(),
215
- synced: z.boolean().optional(),
212
+ deleted: z.boolean().nullish(),
213
+ metadatamodified: z.boolean().nullish(),
214
+ modified: z.boolean().nullish(),
215
+ synced: z.boolean().nullish(),
216
216
  version: z.number().int().nonnegative().optional(),
217
217
  new: z.boolean().optional(),
218
218
  source: z.string().optional(),
@@ -1,6 +1,6 @@
1
1
  var Eq=Object.create;var{getPrototypeOf:vq,defineProperty:R6,getOwnPropertyNames:P7,getOwnPropertyDescriptor:kq}=Object,A7=Object.prototype.hasOwnProperty;function C7($){return this[$]}var Zq,Tq,R7=($,Q,J)=>{var q=$!=null&&typeof $==="object";if(q){var X=Q?Zq??=new WeakMap:Tq??=new WeakMap,Y=X.get($);if(Y)return Y}J=$!=null?Eq(vq($)):{};let B=Q||!$||!$.__esModule?R6(J,"default",{value:$,enumerable:!0}):J;for(let U of P7($))if(!A7.call(B,U))R6(B,U,{get:C7.bind($,U),enumerable:!0});if(q)X.set($,B);return B},X2=($)=>{var Q=(D7??=new WeakMap).get($),J;if(Q)return Q;if(Q=R6({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function"){for(var q of P7($))if(!A7.call(Q,q))R6(Q,q,{get:C7.bind($,q),enumerable:!(J=kq($,q))||J.enumerable})}return D7.set($,Q),Q},D7,H0=($,Q)=>()=>(Q||$((Q={exports:{}}).exports,Q),Q.exports);var gq=($)=>$;function xq($,Q){this[$]=gq.bind(null,Q)}var w5=($,Q)=>{for(var J in Q)R6($,J,{get:Q[J],enumerable:!0,configurable:!0,set:xq.bind(Q,J)})};var I7=($,Q)=>()=>($&&(Q=$($=0)),Q);var f2={};w5(f2,{transcode:()=>OX,resolveObjectURL:()=>wX,kStringMaxLength:()=>f7,kMaxLength:()=>I6,isUtf8:()=>LX,isAscii:()=>zX,default:()=>NX,constants:()=>lq,btoa:()=>mq,atob:()=>uq,INSPECT_MAX_BYTES:()=>x7,File:()=>cq,Buffer:()=>b,Blob:()=>pq});function fq($){var Q=$.length;if(Q%4>0)throw Error("Invalid string. Length must be a multiple of 4");var J=$.indexOf("=");if(J===-1)J=Q;var q=J===Q?0:4-J%4;return[J,q]}function yq($,Q){return($+Q)*3/4-Q}function _q($){var Q,J=fq($),q=J[0],X=J[1],Y=new Uint8Array(yq(q,X)),B=0,U=X>0?q-4:q,W;for(W=0;W<U;W+=4)Q=Y2[$.charCodeAt(W)]<<18|Y2[$.charCodeAt(W+1)]<<12|Y2[$.charCodeAt(W+2)]<<6|Y2[$.charCodeAt(W+3)],Y[B++]=Q>>16&255,Y[B++]=Q>>8&255,Y[B++]=Q&255;if(X===2)Q=Y2[$.charCodeAt(W)]<<2|Y2[$.charCodeAt(W+1)]>>4,Y[B++]=Q&255;if(X===1)Q=Y2[$.charCodeAt(W)]<<10|Y2[$.charCodeAt(W+1)]<<4|Y2[$.charCodeAt(W+2)]>>2,Y[B++]=Q>>8&255,Y[B++]=Q&255;return Y}function bq($){return N2[$>>18&63]+N2[$>>12&63]+N2[$>>6&63]+N2[$&63]}function hq($,Q,J){var q,X=[];for(var Y=Q;Y<J;Y+=3)q=($[Y]<<16&16711680)+($[Y+1]<<8&65280)+($[Y+2]&255),X.push(bq(q));return X.join("")}function E7($){var Q,J=$.length,q=J%3,X=[],Y=16383;for(var B=0,U=J-q;B<U;B+=Y)X.push(hq($,B,B+Y>U?U:B+Y));if(q===1)Q=$[J-1],X.push(N2[Q>>2]+N2[Q<<4&63]+"==");else if(q===2)Q=($[J-2]<<8)+$[J-1],X.push(N2[Q>>10]+N2[Q>>4&63]+N2[Q<<2&63]+"=");return X.join("")}function H8($,Q,J,q,X){var Y,B,U=X*8-q-1,W=(1<<U)-1,G=W>>1,V=-7,F=J?X-1:0,M=J?-1:1,j=$[Q+F];F+=M,Y=j&(1<<-V)-1,j>>=-V,V+=U;for(;V>0;Y=Y*256+$[Q+F],F+=M,V-=8);B=Y&(1<<-V)-1,Y>>=-V,V+=q;for(;V>0;B=B*256+$[Q+F],F+=M,V-=8);if(Y===0)Y=1-G;else if(Y===W)return B?NaN:(j?-1:1)*(1/0);else B=B+Math.pow(2,q),Y=Y-G;return(j?-1:1)*B*Math.pow(2,Y-q)}function g7($,Q,J,q,X,Y){var B,U,W,G=Y*8-X-1,V=(1<<G)-1,F=V>>1,M=X===23?Math.pow(2,-24)-Math.pow(2,-77):0,j=q?0:Y-1,f=q?1:-1,T=Q<0||Q===0&&1/Q<0?1:0;if(Q=Math.abs(Q),isNaN(Q)||Q===1/0)U=isNaN(Q)?1:0,B=V;else{if(B=Math.floor(Math.log(Q)/Math.LN2),Q*(W=Math.pow(2,-B))<1)B--,W*=2;if(B+F>=1)Q+=M/W;else Q+=M*Math.pow(2,1-F);if(Q*W>=2)B++,W/=2;if(B+F>=V)U=0,B=V;else if(B+F>=1)U=(Q*W-1)*Math.pow(2,X),B=B+F;else U=Q*Math.pow(2,F-1)*Math.pow(2,X),B=0}for(;X>=8;$[J+j]=U&255,j+=f,U/=256,X-=8);B=B<<X|U,G+=X;for(;G>0;$[J+j]=B&255,j+=f,B/=256,G-=8);$[J+j-f]|=T*128}function x2($){if($>I6)throw RangeError('The value "'+$+'" is invalid for option "size"');let Q=new Uint8Array($);return Object.setPrototypeOf(Q,b.prototype),Q}function P5($,Q,J){return class extends J{constructor(){super();Object.defineProperty(this,"message",{value:Q.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${$}]`,this.stack,delete this.name}get code(){return $}set code(q){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:q,writable:!0})}toString(){return`${this.name} [${$}]: ${this.message}`}}}function b($,Q,J){if(typeof $==="number"){if(typeof Q==="string")throw TypeError('The "string" argument must be of type string. Received type number');return A5($)}return y7($,Q,J)}function y7($,Q,J){if(typeof $==="string")return oq($,Q);if(ArrayBuffer.isView($))return rq($);if($==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);if(D2($,ArrayBuffer)||$&&D2($.buffer,ArrayBuffer))return N5($,Q,J);if(typeof SharedArrayBuffer<"u"&&(D2($,SharedArrayBuffer)||$&&D2($.buffer,SharedArrayBuffer)))return N5($,Q,J);if(typeof $==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let q=$.valueOf&&$.valueOf();if(q!=null&&q!==$)return b.from(q,Q,J);let X=aq($);if(X)return X;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof $[Symbol.toPrimitive]==="function")return b.from($[Symbol.toPrimitive]("string"),Q,J);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}function _7($){if(typeof $!=="number")throw TypeError('"size" argument must be of type number');else if($<0)throw RangeError('The value "'+$+'" is invalid for option "size"')}function nq($,Q,J){if(_7($),$<=0)return x2($);if(Q!==void 0)return typeof J==="string"?x2($).fill(Q,J):x2($).fill(Q);return x2($)}function A5($){return _7($),x2($<0?0:C5($)|0)}function oq($,Q){if(typeof Q!=="string"||Q==="")Q="utf8";if(!b.isEncoding(Q))throw TypeError("Unknown encoding: "+Q);let J=b7($,Q)|0,q=x2(J),X=q.write($,Q);if(X!==J)q=q.slice(0,X);return q}function O5($){let Q=$.length<0?0:C5($.length)|0,J=x2(Q);for(let q=0;q<Q;q+=1)J[q]=$[q]&255;return J}function rq($){if(D2($,Uint8Array)){let Q=new Uint8Array($);return N5(Q.buffer,Q.byteOffset,Q.byteLength)}return O5($)}function N5($,Q,J){if(Q<0||$.byteLength<Q)throw RangeError('"offset" is outside of buffer bounds');if($.byteLength<Q+(J||0))throw RangeError('"length" is outside of buffer bounds');let q;if(Q===void 0&&J===void 0)q=new Uint8Array($);else if(J===void 0)q=new Uint8Array($,Q);else q=new Uint8Array($,Q,J);return Object.setPrototypeOf(q,b.prototype),q}function aq($){if(b.isBuffer($)){let Q=C5($.length)|0,J=x2(Q);if(J.length===0)return J;return $.copy(J,0,0,Q),J}if($.length!==void 0){if(typeof $.length!=="number"||Number.isNaN($.length))return x2(0);return O5($)}if($.type==="Buffer"&&Array.isArray($.data))return O5($.data)}function C5($){if($>=I6)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+I6.toString(16)+" bytes");return $|0}function b7($,Q){if(b.isBuffer($))return $.length;if(ArrayBuffer.isView($)||D2($,ArrayBuffer))return $.byteLength;if(typeof $!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);let J=$.length,q=arguments.length>2&&arguments[2]===!0;if(!q&&J===0)return 0;let X=!1;for(;;)switch(Q){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":return D5($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J*2;case"hex":return J>>>1;case"base64":return n7($).length;default:if(X)return q?-1:D5($).length;Q=(""+Q).toLowerCase(),X=!0}}function sq($,Q,J){let q=!1;if(Q===void 0||Q<0)Q=0;if(Q>this.length)return"";if(J===void 0||J>this.length)J=this.length;if(J<=0)return"";if(J>>>=0,Q>>>=0,J<=Q)return"";if(!$)$="utf8";while(!0)switch($){case"hex":return UX(this,Q,J);case"utf8":case"utf-8":return m7(this,Q,J);case"ascii":return YX(this,Q,J);case"latin1":case"binary":return BX(this,Q,J);case"base64":return qX(this,Q,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return WX(this,Q,J);default:if(q)throw TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),q=!0}}function L1($,Q,J){let q=$[Q];$[Q]=$[J],$[J]=q}function h7($,Q,J,q,X){if($.length===0)return-1;if(typeof J==="string")q=J,J=0;else if(J>2147483647)J=2147483647;else if(J<-2147483648)J=-2147483648;if(J=+J,Number.isNaN(J))J=X?0:$.length-1;if(J<0)J=$.length+J;if(J>=$.length)if(X)return-1;else J=$.length-1;else if(J<0)if(X)J=0;else return-1;if(typeof Q==="string")Q=b.from(Q,q);if(b.isBuffer(Q)){if(Q.length===0)return-1;return k7($,Q,J,q,X)}else if(typeof Q==="number"){if(Q=Q&255,typeof Uint8Array.prototype.indexOf==="function")if(X)return Uint8Array.prototype.indexOf.call($,Q,J);else return Uint8Array.prototype.lastIndexOf.call($,Q,J);return k7($,[Q],J,q,X)}throw TypeError("val must be string, number or Buffer")}function k7($,Q,J,q,X){let Y=1,B=$.length,U=Q.length;if(q!==void 0){if(q=String(q).toLowerCase(),q==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le"){if($.length<2||Q.length<2)return-1;Y=2,B/=2,U/=2,J/=2}}function W(V,F){if(Y===1)return V[F];else return V.readUInt16BE(F*Y)}let G;if(X){let V=-1;for(G=J;G<B;G++)if(W($,G)===W(Q,V===-1?0:G-V)){if(V===-1)V=G;if(G-V+1===U)return V*Y}else{if(V!==-1)G-=G-V;V=-1}}else{if(J+U>B)J=B-U;for(G=J;G>=0;G--){let V=!0;for(let F=0;F<U;F++)if(W($,G+F)!==W(Q,F)){V=!1;break}if(V)return G}}return-1}function tq($,Q,J,q){J=Number(J)||0;let X=$.length-J;if(!q)q=X;else if(q=Number(q),q>X)q=X;let Y=Q.length;if(q>Y/2)q=Y/2;let B;for(B=0;B<q;++B){let U=parseInt(Q.substr(B*2,2),16);if(Number.isNaN(U))return B;$[J+B]=U}return B}function eq($,Q,J,q){return M8(D5(Q,$.length-J),$,J,q)}function $X($,Q,J,q){return M8(jX(Q),$,J,q)}function QX($,Q,J,q){return M8(n7(Q),$,J,q)}function JX($,Q,J,q){return M8(HX(Q,$.length-J),$,J,q)}function qX($,Q,J){if(Q===0&&J===$.length)return E7($);else return E7($.slice(Q,J))}function m7($,Q,J){J=Math.min($.length,J);let q=[],X=Q;while(X<J){let Y=$[X],B=null,U=Y>239?4:Y>223?3:Y>191?2:1;if(X+U<=J){let W,G,V,F;switch(U){case 1:if(Y<128)B=Y;break;case 2:if(W=$[X+1],(W&192)===128){if(F=(Y&31)<<6|W&63,F>127)B=F}break;case 3:if(W=$[X+1],G=$[X+2],(W&192)===128&&(G&192)===128){if(F=(Y&15)<<12|(W&63)<<6|G&63,F>2047&&(F<55296||F>57343))B=F}break;case 4:if(W=$[X+1],G=$[X+2],V=$[X+3],(W&192)===128&&(G&192)===128&&(V&192)===128){if(F=(Y&15)<<18|(W&63)<<12|(G&63)<<6|V&63,F>65535&&F<1114112)B=F}}}if(B===null)B=65533,U=1;else if(B>65535)B-=65536,q.push(B>>>10&1023|55296),B=56320|B&1023;q.push(B),X+=U}return XX(q)}function XX($){let Q=$.length;if(Q<=Z7)return String.fromCharCode.apply(String,$);let J="",q=0;while(q<Q)J+=String.fromCharCode.apply(String,$.slice(q,q+=Z7));return J}function YX($,Q,J){let q="";J=Math.min($.length,J);for(let X=Q;X<J;++X)q+=String.fromCharCode($[X]&127);return q}function BX($,Q,J){let q="";J=Math.min($.length,J);for(let X=Q;X<J;++X)q+=String.fromCharCode($[X]);return q}function UX($,Q,J){let q=$.length;if(!Q||Q<0)Q=0;if(!J||J<0||J>q)J=q;let X="";for(let Y=Q;Y<J;++Y)X+=MX[$[Y]];return X}function WX($,Q,J){let q=$.slice(Q,J),X="";for(let Y=0;Y<q.length-1;Y+=2)X+=String.fromCharCode(q[Y]+q[Y+1]*256);return X}function _0($,Q,J){if($%1!==0||$<0)throw RangeError("offset is not uint");if($+Q>J)throw RangeError("Trying to access beyond buffer length")}function r0($,Q,J,q,X,Y){if(!b.isBuffer($))throw TypeError('"buffer" argument must be a Buffer instance');if(Q>X||Q<Y)throw RangeError('"value" argument is out of bounds');if(J+q>$.length)throw RangeError("Index out of range")}function u7($,Q,J,q,X){i7(Q,q,X,$,J,7);let Y=Number(Q&BigInt(4294967295));$[J++]=Y,Y=Y>>8,$[J++]=Y,Y=Y>>8,$[J++]=Y,Y=Y>>8,$[J++]=Y;let B=Number(Q>>BigInt(32)&BigInt(4294967295));return $[J++]=B,B=B>>8,$[J++]=B,B=B>>8,$[J++]=B,B=B>>8,$[J++]=B,J}function c7($,Q,J,q,X){i7(Q,q,X,$,J,7);let Y=Number(Q&BigInt(4294967295));$[J+7]=Y,Y=Y>>8,$[J+6]=Y,Y=Y>>8,$[J+5]=Y,Y=Y>>8,$[J+4]=Y;let B=Number(Q>>BigInt(32)&BigInt(4294967295));return $[J+3]=B,B=B>>8,$[J+2]=B,B=B>>8,$[J+1]=B,B=B>>8,$[J]=B,J+8}function p7($,Q,J,q,X,Y){if(J+q>$.length)throw RangeError("Index out of range");if(J<0)throw RangeError("Index out of range")}function l7($,Q,J,q,X){if(Q=+Q,J=J>>>0,!X)p7($,Q,J,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return g7($,Q,J,q,23,4),J+4}function d7($,Q,J,q,X){if(Q=+Q,J=J>>>0,!X)p7($,Q,J,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return g7($,Q,J,q,52,8),J+8}function T7($){let Q="",J=$.length,q=$[0]==="-"?1:0;for(;J>=q+4;J-=3)Q=`_${$.slice(J-3,J)}${Q}`;return`${$.slice(0,J)}${Q}`}function GX($,Q,J){if(u1(Q,"offset"),$[Q]===void 0||$[Q+J]===void 0)S6(Q,$.length-(J+1))}function i7($,Q,J,q,X,Y){if($>J||$<Q){let B=typeof Q==="bigint"?"n":"",U;if(Y>3)if(Q===0||Q===BigInt(0))U=`>= 0${B} and < 2${B} ** ${(Y+1)*8}${B}`;else U=`>= -(2${B} ** ${(Y+1)*8-1}${B}) and < 2 ** ${(Y+1)*8-1}${B}`;else U=`>= ${Q}${B} and <= ${J}${B}`;throw new z5("value",U,$)}GX(q,X,Y)}function u1($,Q){if(typeof $!=="number")throw new iq(Q,"number",$)}function S6($,Q,J){if(Math.floor($)!==$)throw u1($,J),new z5(J||"offset","an integer",$);if(Q<0)throw new dq;throw new z5(J||"offset",`>= ${J?1:0} and <= ${Q}`,$)}function KX($){if($=$.split("=")[0],$=$.trim().replace(VX,""),$.length<2)return"";while($.length%4!==0)$=$+"=";return $}function D5($,Q){Q=Q||1/0;let J,q=$.length,X=null,Y=[];for(let B=0;B<q;++B){if(J=$.charCodeAt(B),J>55295&&J<57344){if(!X){if(J>56319){if((Q-=3)>-1)Y.push(239,191,189);continue}else if(B+1===q){if((Q-=3)>-1)Y.push(239,191,189);continue}X=J;continue}if(J<56320){if((Q-=3)>-1)Y.push(239,191,189);X=J;continue}J=(X-55296<<10|J-56320)+65536}else if(X){if((Q-=3)>-1)Y.push(239,191,189)}if(X=null,J<128){if((Q-=1)<0)break;Y.push(J)}else if(J<2048){if((Q-=2)<0)break;Y.push(J>>6|192,J&63|128)}else if(J<65536){if((Q-=3)<0)break;Y.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if((Q-=4)<0)break;Y.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw Error("Invalid code point")}return Y}function jX($){let Q=[];for(let J=0;J<$.length;++J)Q.push($.charCodeAt(J)&255);return Q}function HX($,Q){let J,q,X,Y=[];for(let B=0;B<$.length;++B){if((Q-=2)<0)break;J=$.charCodeAt(B),q=J>>8,X=J%256,Y.push(X),Y.push(q)}return Y}function n7($){return _q(KX($))}function M8($,Q,J,q){let X;for(X=0;X<q;++X){if(X+J>=Q.length||X>=$.length)break;Q[X+J]=$[X]}return X}function D2($,Q){return $ instanceof Q||$!=null&&$.constructor!=null&&$.constructor.name!=null&&$.constructor.name===Q.name}function n2($){return typeof BigInt>"u"?FX:$}function FX(){throw Error("BigInt not supported")}function R5($){return()=>{throw Error($+" is not implemented for node:buffer browser polyfill")}}var N2,Y2,L5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w1,S7,v7,x7=50,I6=2147483647,f7=536870888,mq,uq,cq,pq,lq,dq,iq,z5,Z7=4096,VX,MX,wX,LX,zX=($)=>{for(let Q of $)if(Q.charCodeAt(0)>127)return!1;return!0},OX,NX;var y2=I7(()=>{N2=[],Y2=[];for(w1=0,S7=L5.length;w1<S7;++w1)N2[w1]=L5[w1],Y2[L5.charCodeAt(w1)]=w1;Y2[45]=62;Y2[95]=63;v7=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,mq=globalThis.btoa,uq=globalThis.atob,cq=globalThis.File,pq=globalThis.Blob,lq={MAX_LENGTH:I6,MAX_STRING_LENGTH:f7};dq=P5("ERR_BUFFER_OUT_OF_BOUNDS",function($){if($)return`${$} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),iq=P5("ERR_INVALID_ARG_TYPE",function($,Q){return`The "${$}" argument must be of type number. Received type ${typeof Q}`},TypeError),z5=P5("ERR_OUT_OF_RANGE",function($,Q,J){let q=`The value of "${$}" is out of range.`,X=J;if(Number.isInteger(J)&&Math.abs(J)>4294967296)X=T7(String(J));else if(typeof J==="bigint"){if(X=String(J),J>BigInt(2)**BigInt(32)||J<-(BigInt(2)**BigInt(32)))X=T7(X);X+="n"}return q+=` It must be ${Q}. Received ${X}`,q},RangeError);Object.defineProperty(b.prototype,"parent",{enumerable:!0,get:function(){if(!b.isBuffer(this))return;return this.buffer}});Object.defineProperty(b.prototype,"offset",{enumerable:!0,get:function(){if(!b.isBuffer(this))return;return this.byteOffset}});b.poolSize=8192;b.from=function($,Q,J){return y7($,Q,J)};Object.setPrototypeOf(b.prototype,Uint8Array.prototype);Object.setPrototypeOf(b,Uint8Array);b.alloc=function($,Q,J){return nq($,Q,J)};b.allocUnsafe=function($){return A5($)};b.allocUnsafeSlow=function($){return A5($)};b.isBuffer=function($){return $!=null&&$._isBuffer===!0&&$!==b.prototype};b.compare=function($,Q){if(D2($,Uint8Array))$=b.from($,$.offset,$.byteLength);if(D2(Q,Uint8Array))Q=b.from(Q,Q.offset,Q.byteLength);if(!b.isBuffer($)||!b.isBuffer(Q))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if($===Q)return 0;let J=$.length,q=Q.length;for(let X=0,Y=Math.min(J,q);X<Y;++X)if($[X]!==Q[X]){J=$[X],q=Q[X];break}if(J<q)return-1;if(q<J)return 1;return 0};b.isEncoding=function($){switch(String($).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};b.concat=function($,Q){if(!Array.isArray($))throw TypeError('"list" argument must be an Array of Buffers');if($.length===0)return b.alloc(0);let J;if(Q===void 0){Q=0;for(J=0;J<$.length;++J)Q+=$[J].length}let q=b.allocUnsafe(Q),X=0;for(J=0;J<$.length;++J){let Y=$[J];if(D2(Y,Uint8Array))if(X+Y.length>q.length){if(!b.isBuffer(Y))Y=b.from(Y);Y.copy(q,X)}else Uint8Array.prototype.set.call(q,Y,X);else if(!b.isBuffer(Y))throw TypeError('"list" argument must be an Array of Buffers');else Y.copy(q,X);X+=Y.length}return q};b.byteLength=b7;b.prototype._isBuffer=!0;b.prototype.swap16=function(){let $=this.length;if($%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let Q=0;Q<$;Q+=2)L1(this,Q,Q+1);return this};b.prototype.swap32=function(){let $=this.length;if($%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let Q=0;Q<$;Q+=4)L1(this,Q,Q+3),L1(this,Q+1,Q+2);return this};b.prototype.swap64=function(){let $=this.length;if($%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let Q=0;Q<$;Q+=8)L1(this,Q,Q+7),L1(this,Q+1,Q+6),L1(this,Q+2,Q+5),L1(this,Q+3,Q+4);return this};b.prototype.toString=function(){let $=this.length;if($===0)return"";if(arguments.length===0)return m7(this,0,$);return sq.apply(this,arguments)};b.prototype.toLocaleString=b.prototype.toString;b.prototype.equals=function($){if(!b.isBuffer($))throw TypeError("Argument must be a Buffer");if(this===$)return!0;return b.compare(this,$)===0};b.prototype.inspect=function(){let $="",Q=x7;if($=this.toString("hex",0,Q).replace(/(.{2})/g,"$1 ").trim(),this.length>Q)$+=" ... ";return"<Buffer "+$+">"};if(v7)b.prototype[v7]=b.prototype.inspect;b.prototype.compare=function($,Q,J,q,X){if(D2($,Uint8Array))$=b.from($,$.offset,$.byteLength);if(!b.isBuffer($))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof $);if(Q===void 0)Q=0;if(J===void 0)J=$?$.length:0;if(q===void 0)q=0;if(X===void 0)X=this.length;if(Q<0||J>$.length||q<0||X>this.length)throw RangeError("out of range index");if(q>=X&&Q>=J)return 0;if(q>=X)return-1;if(Q>=J)return 1;if(Q>>>=0,J>>>=0,q>>>=0,X>>>=0,this===$)return 0;let Y=X-q,B=J-Q,U=Math.min(Y,B),W=this.slice(q,X),G=$.slice(Q,J);for(let V=0;V<U;++V)if(W[V]!==G[V]){Y=W[V],B=G[V];break}if(Y<B)return-1;if(B<Y)return 1;return 0};b.prototype.includes=function($,Q,J){return this.indexOf($,Q,J)!==-1};b.prototype.indexOf=function($,Q,J){return h7(this,$,Q,J,!0)};b.prototype.lastIndexOf=function($,Q,J){return h7(this,$,Q,J,!1)};b.prototype.write=function($,Q,J,q){if(Q===void 0)q="utf8",J=this.length,Q=0;else if(J===void 0&&typeof Q==="string")q=Q,J=this.length,Q=0;else if(isFinite(Q))if(Q=Q>>>0,isFinite(J)){if(J=J>>>0,q===void 0)q="utf8"}else q=J,J=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let X=this.length-Q;if(J===void 0||J>X)J=X;if($.length>0&&(J<0||Q<0)||Q>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!q)q="utf8";let Y=!1;for(;;)switch(q){case"hex":return tq(this,$,Q,J);case"utf8":case"utf-8":return eq(this,$,Q,J);case"ascii":case"latin1":case"binary":return $X(this,$,Q,J);case"base64":return QX(this,$,Q,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return JX(this,$,Q,J);default:if(Y)throw TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),Y=!0}};b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};b.prototype.slice=function($,Q){let J=this.length;if($=~~$,Q=Q===void 0?J:~~Q,$<0){if($+=J,$<0)$=0}else if($>J)$=J;if(Q<0){if(Q+=J,Q<0)Q=0}else if(Q>J)Q=J;if(Q<$)Q=$;let q=this.subarray($,Q);return Object.setPrototypeOf(q,b.prototype),q};b.prototype.readUintLE=b.prototype.readUIntLE=function($,Q,J){if($=$>>>0,Q=Q>>>0,!J)_0($,Q,this.length);let q=this[$],X=1,Y=0;while(++Y<Q&&(X*=256))q+=this[$+Y]*X;return q};b.prototype.readUintBE=b.prototype.readUIntBE=function($,Q,J){if($=$>>>0,Q=Q>>>0,!J)_0($,Q,this.length);let q=this[$+--Q],X=1;while(Q>0&&(X*=256))q+=this[$+--Q]*X;return q};b.prototype.readUint8=b.prototype.readUInt8=function($,Q){if($=$>>>0,!Q)_0($,1,this.length);return this[$]};b.prototype.readUint16LE=b.prototype.readUInt16LE=function($,Q){if($=$>>>0,!Q)_0($,2,this.length);return this[$]|this[$+1]<<8};b.prototype.readUint16BE=b.prototype.readUInt16BE=function($,Q){if($=$>>>0,!Q)_0($,2,this.length);return this[$]<<8|this[$+1]};b.prototype.readUint32LE=b.prototype.readUInt32LE=function($,Q){if($=$>>>0,!Q)_0($,4,this.length);return(this[$]|this[$+1]<<8|this[$+2]<<16)+this[$+3]*16777216};b.prototype.readUint32BE=b.prototype.readUInt32BE=function($,Q){if($=$>>>0,!Q)_0($,4,this.length);return this[$]*16777216+(this[$+1]<<16|this[$+2]<<8|this[$+3])};b.prototype.readBigUInt64LE=n2(function($){$=$>>>0,u1($,"offset");let Q=this[$],J=this[$+7];if(Q===void 0||J===void 0)S6($,this.length-8);let q=Q+this[++$]*256+this[++$]*65536+this[++$]*16777216,X=this[++$]+this[++$]*256+this[++$]*65536+J*16777216;return BigInt(q)+(BigInt(X)<<BigInt(32))});b.prototype.readBigUInt64BE=n2(function($){$=$>>>0,u1($,"offset");let Q=this[$],J=this[$+7];if(Q===void 0||J===void 0)S6($,this.length-8);let q=Q*16777216+this[++$]*65536+this[++$]*256+this[++$],X=this[++$]*16777216+this[++$]*65536+this[++$]*256+J;return(BigInt(q)<<BigInt(32))+BigInt(X)});b.prototype.readIntLE=function($,Q,J){if($=$>>>0,Q=Q>>>0,!J)_0($,Q,this.length);let q=this[$],X=1,Y=0;while(++Y<Q&&(X*=256))q+=this[$+Y]*X;if(X*=128,q>=X)q-=Math.pow(2,8*Q);return q};b.prototype.readIntBE=function($,Q,J){if($=$>>>0,Q=Q>>>0,!J)_0($,Q,this.length);let q=Q,X=1,Y=this[$+--q];while(q>0&&(X*=256))Y+=this[$+--q]*X;if(X*=128,Y>=X)Y-=Math.pow(2,8*Q);return Y};b.prototype.readInt8=function($,Q){if($=$>>>0,!Q)_0($,1,this.length);if(!(this[$]&128))return this[$];return(255-this[$]+1)*-1};b.prototype.readInt16LE=function($,Q){if($=$>>>0,!Q)_0($,2,this.length);let J=this[$]|this[$+1]<<8;return J&32768?J|4294901760:J};b.prototype.readInt16BE=function($,Q){if($=$>>>0,!Q)_0($,2,this.length);let J=this[$+1]|this[$]<<8;return J&32768?J|4294901760:J};b.prototype.readInt32LE=function($,Q){if($=$>>>0,!Q)_0($,4,this.length);return this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24};b.prototype.readInt32BE=function($,Q){if($=$>>>0,!Q)_0($,4,this.length);return this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]};b.prototype.readBigInt64LE=n2(function($){$=$>>>0,u1($,"offset");let Q=this[$],J=this[$+7];if(Q===void 0||J===void 0)S6($,this.length-8);let q=this[$+4]+this[$+5]*256+this[$+6]*65536+(J<<24);return(BigInt(q)<<BigInt(32))+BigInt(Q+this[++$]*256+this[++$]*65536+this[++$]*16777216)});b.prototype.readBigInt64BE=n2(function($){$=$>>>0,u1($,"offset");let Q=this[$],J=this[$+7];if(Q===void 0||J===void 0)S6($,this.length-8);let q=(Q<<24)+this[++$]*65536+this[++$]*256+this[++$];return(BigInt(q)<<BigInt(32))+BigInt(this[++$]*16777216+this[++$]*65536+this[++$]*256+J)});b.prototype.readFloatLE=function($,Q){if($=$>>>0,!Q)_0($,4,this.length);return H8(this,$,!0,23,4)};b.prototype.readFloatBE=function($,Q){if($=$>>>0,!Q)_0($,4,this.length);return H8(this,$,!1,23,4)};b.prototype.readDoubleLE=function($,Q){if($=$>>>0,!Q)_0($,8,this.length);return H8(this,$,!0,52,8)};b.prototype.readDoubleBE=function($,Q){if($=$>>>0,!Q)_0($,8,this.length);return H8(this,$,!1,52,8)};b.prototype.writeUintLE=b.prototype.writeUIntLE=function($,Q,J,q){if($=+$,Q=Q>>>0,J=J>>>0,!q){let B=Math.pow(2,8*J)-1;r0(this,$,Q,J,B,0)}let X=1,Y=0;this[Q]=$&255;while(++Y<J&&(X*=256))this[Q+Y]=$/X&255;return Q+J};b.prototype.writeUintBE=b.prototype.writeUIntBE=function($,Q,J,q){if($=+$,Q=Q>>>0,J=J>>>0,!q){let B=Math.pow(2,8*J)-1;r0(this,$,Q,J,B,0)}let X=J-1,Y=1;this[Q+X]=$&255;while(--X>=0&&(Y*=256))this[Q+X]=$/Y&255;return Q+J};b.prototype.writeUint8=b.prototype.writeUInt8=function($,Q,J){if($=+$,Q=Q>>>0,!J)r0(this,$,Q,1,255,0);return this[Q]=$&255,Q+1};b.prototype.writeUint16LE=b.prototype.writeUInt16LE=function($,Q,J){if($=+$,Q=Q>>>0,!J)r0(this,$,Q,2,65535,0);return this[Q]=$&255,this[Q+1]=$>>>8,Q+2};b.prototype.writeUint16BE=b.prototype.writeUInt16BE=function($,Q,J){if($=+$,Q=Q>>>0,!J)r0(this,$,Q,2,65535,0);return this[Q]=$>>>8,this[Q+1]=$&255,Q+2};b.prototype.writeUint32LE=b.prototype.writeUInt32LE=function($,Q,J){if($=+$,Q=Q>>>0,!J)r0(this,$,Q,4,4294967295,0);return this[Q+3]=$>>>24,this[Q+2]=$>>>16,this[Q+1]=$>>>8,this[Q]=$&255,Q+4};b.prototype.writeUint32BE=b.prototype.writeUInt32BE=function($,Q,J){if($=+$,Q=Q>>>0,!J)r0(this,$,Q,4,4294967295,0);return this[Q]=$>>>24,this[Q+1]=$>>>16,this[Q+2]=$>>>8,this[Q+3]=$&255,Q+4};b.prototype.writeBigUInt64LE=n2(function($,Q=0){return u7(this,$,Q,BigInt(0),BigInt("0xffffffffffffffff"))});b.prototype.writeBigUInt64BE=n2(function($,Q=0){return c7(this,$,Q,BigInt(0),BigInt("0xffffffffffffffff"))});b.prototype.writeIntLE=function($,Q,J,q){if($=+$,Q=Q>>>0,!q){let U=Math.pow(2,8*J-1);r0(this,$,Q,J,U-1,-U)}let X=0,Y=1,B=0;this[Q]=$&255;while(++X<J&&(Y*=256)){if($<0&&B===0&&this[Q+X-1]!==0)B=1;this[Q+X]=($/Y>>0)-B&255}return Q+J};b.prototype.writeIntBE=function($,Q,J,q){if($=+$,Q=Q>>>0,!q){let U=Math.pow(2,8*J-1);r0(this,$,Q,J,U-1,-U)}let X=J-1,Y=1,B=0;this[Q+X]=$&255;while(--X>=0&&(Y*=256)){if($<0&&B===0&&this[Q+X+1]!==0)B=1;this[Q+X]=($/Y>>0)-B&255}return Q+J};b.prototype.writeInt8=function($,Q,J){if($=+$,Q=Q>>>0,!J)r0(this,$,Q,1,127,-128);if($<0)$=255+$+1;return this[Q]=$&255,Q+1};b.prototype.writeInt16LE=function($,Q,J){if($=+$,Q=Q>>>0,!J)r0(this,$,Q,2,32767,-32768);return this[Q]=$&255,this[Q+1]=$>>>8,Q+2};b.prototype.writeInt16BE=function($,Q,J){if($=+$,Q=Q>>>0,!J)r0(this,$,Q,2,32767,-32768);return this[Q]=$>>>8,this[Q+1]=$&255,Q+2};b.prototype.writeInt32LE=function($,Q,J){if($=+$,Q=Q>>>0,!J)r0(this,$,Q,4,2147483647,-2147483648);return this[Q]=$&255,this[Q+1]=$>>>8,this[Q+2]=$>>>16,this[Q+3]=$>>>24,Q+4};b.prototype.writeInt32BE=function($,Q,J){if($=+$,Q=Q>>>0,!J)r0(this,$,Q,4,2147483647,-2147483648);if($<0)$=4294967295+$+1;return this[Q]=$>>>24,this[Q+1]=$>>>16,this[Q+2]=$>>>8,this[Q+3]=$&255,Q+4};b.prototype.writeBigInt64LE=n2(function($,Q=0){return u7(this,$,Q,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});b.prototype.writeBigInt64BE=n2(function($,Q=0){return c7(this,$,Q,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});b.prototype.writeFloatLE=function($,Q,J){return l7(this,$,Q,!0,J)};b.prototype.writeFloatBE=function($,Q,J){return l7(this,$,Q,!1,J)};b.prototype.writeDoubleLE=function($,Q,J){return d7(this,$,Q,!0,J)};b.prototype.writeDoubleBE=function($,Q,J){return d7(this,$,Q,!1,J)};b.prototype.copy=function($,Q,J,q){if(!b.isBuffer($))throw TypeError("argument should be a Buffer");if(!J)J=0;if(!q&&q!==0)q=this.length;if(Q>=$.length)Q=$.length;if(!Q)Q=0;if(q>0&&q<J)q=J;if(q===J)return 0;if($.length===0||this.length===0)return 0;if(Q<0)throw RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw RangeError("Index out of range");if(q<0)throw RangeError("sourceEnd out of bounds");if(q>this.length)q=this.length;if($.length-Q<q-J)q=$.length-Q+J;let X=q-J;if(this===$&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(Q,J,q);else Uint8Array.prototype.set.call($,this.subarray(J,q),Q);return X};b.prototype.fill=function($,Q,J,q){if(typeof $==="string"){if(typeof Q==="string")q=Q,Q=0,J=this.length;else if(typeof J==="string")q=J,J=this.length;if(q!==void 0&&typeof q!=="string")throw TypeError("encoding must be a string");if(typeof q==="string"&&!b.isEncoding(q))throw TypeError("Unknown encoding: "+q);if($.length===1){let Y=$.charCodeAt(0);if(q==="utf8"&&Y<128||q==="latin1")$=Y}}else if(typeof $==="number")$=$&255;else if(typeof $==="boolean")$=Number($);if(Q<0||this.length<Q||this.length<J)throw RangeError("Out of range index");if(J<=Q)return this;if(Q=Q>>>0,J=J===void 0?this.length:J>>>0,!$)$=0;let X;if(typeof $==="number")for(X=Q;X<J;++X)this[X]=$;else{let Y=b.isBuffer($)?$:b.from($,q),B=Y.length;if(B===0)throw TypeError('The value "'+$+'" is invalid for argument "value"');for(X=0;X<J-Q;++X)this[X+Q]=Y[X%B]}return this};VX=/[^+/0-9A-Za-z-_]/g;MX=function(){let $=Array(256);for(let Q=0;Q<16;++Q){let J=Q*16;for(let q=0;q<16;++q)$[J+q]="0123456789abcdef"[Q]+"0123456789abcdef"[q]}return $}();wX=R5("resolveObjectURL"),LX=R5("isUtf8"),OX=R5("transcode"),NX=b});var v6={};w5(v6,{setMaxListeners:()=>X$,once:()=>J$,listenerCount:()=>Y$,init:()=>o2,getMaxListeners:()=>U$,getEventListeners:()=>q$,default:()=>vX,captureRejectionSymbol:()=>t7,addAbortListener:()=>W$,EventEmitter:()=>o2});function e7($,Q){var{_events:J}=$;if(Q[0]??=Error("Unhandled error."),!J)throw Q[0];var q=J[s7];if(q)for(var X of r7.call(q))X.apply($,Q);var Y=J.error;if(!Y)throw Q[0];for(var X of r7.call(Y))X.apply($,Q);return!0}function AX($,Q,J,q){Q.then(void 0,function(X){queueMicrotask(()=>CX($,X,J,q))})}function CX($,Q,J,q){if(typeof $[o7]==="function")$[o7](Q,J,...q);else try{$[z1]=!1,$.emit("error",Q)}finally{$[z1]=!0}}function $$($,Q,J){J.warned=!0;let q=Error(`Possible EventEmitter memory leak detected. ${J.length} ${String(Q)} listeners added to [${$.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);q.name="MaxListenersExceededWarning",q.emitter=$,q.type=Q,q.count=J.length,console.warn(q)}function Q$($,Q,...J){this.removeListener($,Q),Q.apply(this,J)}function J$($,Q,J){var q=J?.signal;if(B$(q,"options.signal"),q?.aborted)throw new I5(void 0,{cause:q?.reason});let{resolve:X,reject:Y,promise:B}=$newPromiseCapability(Promise),U=(V)=>{if($.removeListener(Q,W),q!=null)F8(q,"abort",G);Y(V)},W=(...V)=>{if(typeof $.removeListener==="function")$.removeListener("error",U);if(q!=null)F8(q,"abort",G);X(V)};if(a7($,Q,W,{once:!0}),Q!=="error"&&typeof $.once==="function")$.once("error",U);function G(){F8($,Q,W),F8($,"error",U),Y(new I5(void 0,{cause:q?.reason}))}if(q!=null)a7(q,"abort",G,{once:!0});return B}function q$($,Q){return $.listeners(Q)}function X$($,...Q){E5($,"setMaxListeners",0);var J;if(Q&&(J=Q.length))for(let q=0;q<J;q++)Q[q].setMaxListeners($);else O1=$}function Y$($,Q){return $.listenerCount(Q)}function F8($,Q,J,q){if(typeof $.removeListener==="function")$.removeListener(Q,J);else $.removeEventListener(Q,J,q)}function a7($,Q,J,q){if(typeof $.on==="function")if(q.once)$.once(Q,J);else $.on(Q,J);else $.addEventListener(Q,J,q)}function c1($,Q,J){let q=TypeError(`The "${$}" argument must be of type ${Q}. Received ${J}`);return q.code="ERR_INVALID_ARG_TYPE",q}function SX($,Q,J){let q=RangeError(`The "${$}" argument is out of range. It must be ${Q}. Received ${J}`);return q.code="ERR_OUT_OF_RANGE",q}function B$($,Q){if($!==void 0&&($===null||typeof $!=="object"||!("aborted"in $)))throw c1(Q,"AbortSignal",$)}function E5($,Q,J,q){if(typeof $!=="number")throw c1(Q,"number",$);if(J!=null&&$<J||q!=null&&$>q||(J!=null||q!=null)&&Number.isNaN($))throw SX(Q,`${J!=null?`>= ${J}`:""}${J!=null&&q!=null?" && ":""}${q!=null?`<= ${q}`:""}`,$)}function E6($){if(typeof $!=="function")throw TypeError("The listener must be a function")}function EX($,Q){if(typeof $!=="boolean")throw c1(Q,"boolean",$)}function U$($){return $?._maxListeners??O1}function W$($,Q){if($===void 0)throw c1("signal","AbortSignal",$);if(B$($,"signal"),typeof Q!=="function")throw c1("listener","function",Q);let J;if($.aborted)queueMicrotask(()=>Q());else $.addEventListener("abort",Q,{__proto__:null,once:!0}),J=()=>{$.removeEventListener("abort",Q)};return{__proto__:null,[Symbol.dispose](){J?.()}}}var S5,z1,s7,DX,PX,o7,t7,r7,O1=10,o2=function($){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[z1]=$?.captureRejections?Boolean($?.captureRejections):k0[z1])this.emit=IX},k0,RX=function($,...Q){if($==="error")return e7(this,Q);var{_events:J}=this;if(J===void 0)return!1;var q=J[$];if(q===void 0)return!1;let X=q.length>1?q.slice():q;for(let Y=0,{length:B}=X;Y<B;Y++){let U=X[Y];switch(Q.length){case 0:U.call(this);break;case 1:U.call(this,Q[0]);break;case 2:U.call(this,Q[0],Q[1]);break;case 3:U.call(this,Q[0],Q[1],Q[2]);break;default:U.apply(this,Q);break}}return!0},IX=function($,...Q){if($==="error")return e7(this,Q);var{_events:J}=this;if(J===void 0)return!1;var q=J[$];if(q===void 0)return!1;let X=q.length>1?q.slice():q;for(let Y=0,{length:B}=X;Y<B;Y++){let U=X[Y],W;switch(Q.length){case 0:W=U.call(this);break;case 1:W=U.call(this,Q[0]);break;case 2:W=U.call(this,Q[0],Q[1]);break;case 3:W=U.call(this,Q[0],Q[1],Q[2]);break;default:W=U.apply(this,Q);break}if(W!==void 0&&typeof W?.then==="function"&&W.then===Promise.prototype.then)AX(this,W,$,Q)}return!0},I5,vX;var k6=I7(()=>{S5=Symbol.for,z1=Symbol("kCapture"),s7=S5("events.errorMonitor"),DX=Symbol("events.maxEventTargetListeners"),PX=Symbol("events.maxEventTargetListenersWarned"),o7=S5("nodejs.rejection"),t7=S5("nodejs.rejection"),r7=Array.prototype.slice,k0=o2.prototype={};k0._events=void 0;k0._eventsCount=0;k0._maxListeners=void 0;k0.setMaxListeners=function($){return E5($,"setMaxListeners",0),this._maxListeners=$,this};k0.constructor=o2;k0.getMaxListeners=function(){return this?._maxListeners??O1};k0.emit=RX;k0.addListener=function($,Q){E6(Q);var J=this._events;if(!J)J=this._events={__proto__:null},this._eventsCount=0;else if(J.newListener)this.emit("newListener",$,Q.listener??Q);var q=J[$];if(!q)J[$]=[Q],this._eventsCount++;else{q.push(Q);var X=this._maxListeners??O1;if(X>0&&q.length>X&&!q.warned)$$(this,$,q)}return this};k0.on=k0.addListener;k0.prependListener=function($,Q){E6(Q);var J=this._events;if(!J)J=this._events={__proto__:null},this._eventsCount=0;else if(J.newListener)this.emit("newListener",$,Q.listener??Q);var q=J[$];if(!q)J[$]=[Q],this._eventsCount++;else{q.unshift(Q);var X=this._maxListeners??O1;if(X>0&&q.length>X&&!q.warned)$$(this,$,q)}return this};k0.once=function($,Q){E6(Q);let J=Q$.bind(this,$,Q);return J.listener=Q,this.addListener($,J),this};k0.prependOnceListener=function($,Q){E6(Q);let J=Q$.bind(this,$,Q);return J.listener=Q,this.prependListener($,J),this};k0.removeListener=function($,Q){E6(Q);var{_events:J}=this;if(!J)return this;var q=J[$];if(!q)return this;var X=q.length;let Y=-1;for(let B=X-1;B>=0;B--)if(q[B]===Q||q[B].listener===Q){Y=B;break}if(Y<0)return this;if(Y===0)q.shift();else q.splice(Y,1);if(q.length===0)delete J[$],this._eventsCount--;return this};k0.off=k0.removeListener;k0.removeAllListeners=function($){var{_events:Q}=this;if($&&Q){if(Q[$])delete Q[$],this._eventsCount--}else this._events={__proto__:null};return this};k0.listeners=function($){var{_events:Q}=this;if(!Q)return[];var J=Q[$];if(!J)return[];return J.map((q)=>q.listener??q)};k0.rawListeners=function($){var{_events:Q}=this;if(!Q)return[];var J=Q[$];if(!J)return[];return J.slice()};k0.listenerCount=function($){var{_events:Q}=this;if(!Q)return 0;return Q[$]?.length??0};k0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};k0[z1]=!1;I5=class I5 extends Error{constructor($="The operation was aborted",Q=void 0){if(Q!==void 0&&typeof Q!=="object")throw c1("options","Object",Q);super($,Q);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(o2,{captureRejections:{get(){return k0[z1]},set($){EX($,"EventEmitter.captureRejections"),k0[z1]=$},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return O1},set:($)=>{E5($,"defaultMaxListeners",0),O1=$}},kMaxEventTargetListeners:{value:DX,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:PX,enumerable:!1,configurable:!1,writable:!1}});Object.assign(o2,{once:J$,getEventListeners:q$,getMaxListeners:U$,setMaxListeners:X$,EventEmitter:o2,usingDomains:!1,captureRejectionSymbol:t7,errorMonitor:s7,addAbortListener:W$,init:o2,listenerCount:Y$});vX=o2});var O8=H0((_K,w$)=>{var S0=($,Q)=>()=>(Q||$((Q={exports:{}}).exports,Q),Q.exports),T0=S0(($,Q)=>{class J extends Error{constructor(q){if(!Array.isArray(q))throw TypeError(`Expected input to be an Array, got ${typeof q}`);let X="";for(let Y=0;Y<q.length;Y++)X+=` ${q[Y].stack}
2
2
  `;super(X);this.name="AggregateError",this.errors=q}}Q.exports={AggregateError:J,ArrayIsArray(q){return Array.isArray(q)},ArrayPrototypeIncludes(q,X){return q.includes(X)},ArrayPrototypeIndexOf(q,X){return q.indexOf(X)},ArrayPrototypeJoin(q,X){return q.join(X)},ArrayPrototypeMap(q,X){return q.map(X)},ArrayPrototypePop(q,X){return q.pop(X)},ArrayPrototypePush(q,X){return q.push(X)},ArrayPrototypeSlice(q,X,Y){return q.slice(X,Y)},Error,FunctionPrototypeCall(q,X,...Y){return q.call(X,...Y)},FunctionPrototypeSymbolHasInstance(q,X){return Function.prototype[Symbol.hasInstance].call(q,X)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(q,X){return Object.defineProperties(q,X)},ObjectDefineProperty(q,X,Y){return Object.defineProperty(q,X,Y)},ObjectGetOwnPropertyDescriptor(q,X){return Object.getOwnPropertyDescriptor(q,X)},ObjectKeys(q){return Object.keys(q)},ObjectSetPrototypeOf(q,X){return Object.setPrototypeOf(q,X)},Promise,PromisePrototypeCatch(q,X){return q.catch(X)},PromisePrototypeThen(q,X,Y){return q.then(X,Y)},PromiseReject(q){return Promise.reject(q)},PromiseResolve(q){return Promise.resolve(q)},ReflectApply:Reflect.apply,RegExpPrototypeTest(q,X){return q.test(X)},SafeSet:Set,String,StringPrototypeSlice(q,X,Y){return q.slice(X,Y)},StringPrototypeToLowerCase(q){return q.toLowerCase()},StringPrototypeToUpperCase(q){return q.toUpperCase()},StringPrototypeTrim(q){return q.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(q,X,Y){return q.set(X,Y)},Boolean,Uint8Array}}),G$=S0(($,Q)=>{Q.exports={format(J,...q){return J.replace(/%([sdifj])/g,function(...[X,Y]){let B=q.shift();if(Y==="f")return B.toFixed(6);else if(Y==="j")return JSON.stringify(B);else if(Y==="s"&&typeof B==="object")return`${B.constructor!==Object?B.constructor.name:""} {}`.trim();else return B.toString()})},inspect(J){switch(typeof J){case"string":if(J.includes("'")){if(!J.includes('"'))return`"${J}"`;else if(!J.includes("`")&&!J.includes("${"))return`\`${J}\``}return`'${J}'`;case"number":if(isNaN(J))return"NaN";else if(Object.is(J,-0))return String(J);return J;case"bigint":return`${String(J)}n`;case"boolean":case"undefined":return String(J);case"object":return"{}"}}}}),i0=S0(($,Q)=>{var{format:J,inspect:q}=G$(),{AggregateError:X}=T0(),Y=globalThis.AggregateError||X,B=Symbol("kIsNodeError"),U=["string","function","number","object","Function","Object","boolean","bigint","symbol"],W=/^([A-Z][a-z0-9]*)+$/,G={};function V(P,K){if(!P)throw new G.ERR_INTERNAL_ASSERTION(K)}function F(P){let K="",L=P.length,z=P[0]==="-"?1:0;for(;L>=z+4;L-=3)K=`_${P.slice(L-3,L)}${K}`;return`${P.slice(0,L)}${K}`}function M(P,K,L){if(typeof K==="function")return V(K.length<=L.length,`Code: ${P}; The provided arguments length (${L.length}) does not match the required ones (${K.length}).`),K(...L);let z=(K.match(/%[dfijoOs]/g)||[]).length;if(V(z===L.length,`Code: ${P}; The provided arguments length (${L.length}) does not match the required ones (${z}).`),L.length===0)return K;return J(K,...L)}function j(P,K,L){if(!L)L=Error;class z extends L{constructor(...A){super(M(P,K,A))}toString(){return`${this.name} [${P}]: ${this.message}`}}Object.defineProperties(z.prototype,{name:{value:L.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${P}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),z.prototype.code=P,z.prototype[B]=!0,G[P]=z}function f(P){let K="__node_internal_"+P.name;return Object.defineProperty(P,"name",{value:K}),P}function T(P,K){if(P&&K&&P!==K){if(Array.isArray(K.errors))return K.errors.push(P),K;let L=new Y([K,P],K.message);return L.code=K.code,L}return P||K}class D extends Error{constructor(P="The operation was aborted",K=void 0){if(K!==void 0&&typeof K!=="object")throw new G.ERR_INVALID_ARG_TYPE("options","Object",K);super(P,K);this.code="ABORT_ERR",this.name="AbortError"}}j("ERR_ASSERTION","%s",Error),j("ERR_INVALID_ARG_TYPE",(P,K,L)=>{if(V(typeof P==="string","'name' must be a string"),!Array.isArray(K))K=[K];let z="The ";if(P.endsWith(" argument"))z+=`${P} `;else z+=`"${P}" ${P.includes(".")?"property":"argument"} `;z+="must be ";let A=[],_=[],Z=[];for(let S of K)if(V(typeof S==="string","All expected entries have to be of type string"),U.includes(S))A.push(S.toLowerCase());else if(W.test(S))_.push(S);else V(S!=="object",'The value "object" should be written as "Object"'),Z.push(S);if(_.length>0){let S=A.indexOf("object");if(S!==-1)A.splice(A,S,1),_.push("Object")}if(A.length>0){switch(A.length){case 1:z+=`of type ${A[0]}`;break;case 2:z+=`one of type ${A[0]} or ${A[1]}`;break;default:{let S=A.pop();z+=`one of type ${A.join(", ")}, or ${S}`}}if(_.length>0||Z.length>0)z+=" or "}if(_.length>0){switch(_.length){case 1:z+=`an instance of ${_[0]}`;break;case 2:z+=`an instance of ${_[0]} or ${_[1]}`;break;default:{let S=_.pop();z+=`an instance of ${_.join(", ")}, or ${S}`}}if(Z.length>0)z+=" or "}switch(Z.length){case 0:break;case 1:if(Z[0].toLowerCase()!==Z[0])z+="an ";z+=`${Z[0]}`;break;case 2:z+=`one of ${Z[0]} or ${Z[1]}`;break;default:{let S=Z.pop();z+=`one of ${Z.join(", ")}, or ${S}`}}if(L==null)z+=`. Received ${L}`;else if(typeof L==="function"&&L.name)z+=`. Received function ${L.name}`;else if(typeof L==="object"){var l;if((l=L.constructor)!==null&&l!==void 0&&l.name)z+=`. Received an instance of ${L.constructor.name}`;else{let S=q(L,{depth:-1});z+=`. Received ${S}`}}else{let S=q(L,{colors:!1});if(S.length>25)S=`${S.slice(0,25)}...`;z+=`. Received type ${typeof L} (${S})`}return z},TypeError),j("ERR_INVALID_ARG_VALUE",(P,K,L="is invalid")=>{let z=q(K);if(z.length>128)z=z.slice(0,128)+"...";return`The ${P.includes(".")?"property":"argument"} '${P}' ${L}. Received ${z}`},TypeError),j("ERR_INVALID_RETURN_VALUE",(P,K,L)=>{var z;let A=L!==null&&L!==void 0&&(z=L.constructor)!==null&&z!==void 0&&z.name?`instance of ${L.constructor.name}`:`type ${typeof L}`;return`Expected ${P} to be returned from the "${K}" function but got ${A}.`},TypeError),j("ERR_MISSING_ARGS",(...P)=>{V(P.length>0,"At least one arg needs to be specified");let K,L=P.length;switch(P=(Array.isArray(P)?P:[P]).map((z)=>`"${z}"`).join(" or "),L){case 1:K+=`The ${P[0]} argument`;break;case 2:K+=`The ${P[0]} and ${P[1]} arguments`;break;default:{let z=P.pop();K+=`The ${P.join(", ")}, and ${z} arguments`}break}return`${K} must be specified`},TypeError),j("ERR_OUT_OF_RANGE",(P,K,L)=>{V(K,'Missing "range" argument');let z;if(Number.isInteger(L)&&Math.abs(L)>4294967296)z=F(String(L));else if(typeof L==="bigint"){z=String(L);let A=BigInt(2)**BigInt(32);if(L>A||L<-A)z=F(z);z+="n"}else z=q(L);return`The value of "${P}" is out of range. It must be ${K}. Received ${z}`},RangeError),j("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),j("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),j("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),j("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),j("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),j("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),j("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),j("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),j("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),j("ERR_STREAM_WRITE_AFTER_END","write after end",Error),j("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),Q.exports={AbortError:D,aggregateTwoErrors:f(T),hideStackFrames:f,codes:G}}),kX=S0(($,Q)=>{Object.defineProperty($,"__esModule",{value:!0});var J=new WeakMap,q=new WeakMap;function X(E){let C=J.get(E);return console.assert(C!=null,"'this' is expected an Event object, but got",E),C}function Y(E){if(E.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",E.passiveListener);return}if(!E.event.cancelable)return;if(E.canceled=!0,typeof E.event.preventDefault==="function")E.event.preventDefault()}function B(E,C){J.set(this,{eventTarget:E,event:C,eventPhase:2,currentTarget:E,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:C.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let O=Object.keys(C);for(let g=0;g<O.length;++g){let y=O[g];if(!(y in this))Object.defineProperty(this,y,U(y))}}if(B.prototype={get type(){return X(this).event.type},get target(){return X(this).eventTarget},get currentTarget(){return X(this).currentTarget},composedPath(){let E=X(this).currentTarget;if(E==null)return[];return[E]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return X(this).eventPhase},stopPropagation(){let E=X(this);if(E.stopped=!0,typeof E.event.stopPropagation==="function")E.event.stopPropagation()},stopImmediatePropagation(){let E=X(this);if(E.stopped=!0,E.immediateStopped=!0,typeof E.event.stopImmediatePropagation==="function")E.event.stopImmediatePropagation()},get bubbles(){return Boolean(X(this).event.bubbles)},get cancelable(){return Boolean(X(this).event.cancelable)},preventDefault(){Y(X(this))},get defaultPrevented(){return X(this).canceled},get composed(){return Boolean(X(this).event.composed)},get timeStamp(){return X(this).timeStamp},get srcElement(){return X(this).eventTarget},get cancelBubble(){return X(this).stopped},set cancelBubble(E){if(!E)return;let C=X(this);if(C.stopped=!0,typeof C.event.cancelBubble==="boolean")C.event.cancelBubble=!0},get returnValue(){return!X(this).canceled},set returnValue(E){if(!E)Y(X(this))},initEvent(){}},Object.defineProperty(B.prototype,"constructor",{value:B,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(B.prototype,window.Event.prototype),q.set(window.Event.prototype,B);function U(E){return{get(){return X(this).event[E]},set(C){X(this).event[E]=C},configurable:!0,enumerable:!0}}function W(E){return{value(){let C=X(this).event;return C[E].apply(C,arguments)},configurable:!0,enumerable:!0}}function G(E,C){let O=Object.keys(C);if(O.length===0)return E;function g(y,k){E.call(this,y,k)}g.prototype=Object.create(E.prototype,{constructor:{value:g,configurable:!0,writable:!0}});for(let y=0;y<O.length;++y){let k=O[y];if(!(k in E.prototype)){let s=typeof Object.getOwnPropertyDescriptor(C,k).value==="function";Object.defineProperty(g.prototype,k,s?W(k):U(k))}}return g}function V(E){if(E==null||E===Object.prototype)return B;let C=q.get(E);if(C==null)C=G(V(Object.getPrototypeOf(E)),E),q.set(E,C);return C}function F(E,C){return new(V(Object.getPrototypeOf(C)))(E,C)}function M(E){return X(E).immediateStopped}function j(E,C){X(E).eventPhase=C}function f(E,C){X(E).currentTarget=C}function T(E,C){X(E).passiveListener=C}var D=new WeakMap,P=1,K=2,L=3;function z(E){return E!==null&&typeof E==="object"}function A(E){let C=D.get(E);if(C==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return C}function _(E){return{get(){let C=A(this).get(E);while(C!=null){if(C.listenerType===L)return C.listener;C=C.next}return null},set(C){if(typeof C!=="function"&&!z(C))C=null;let O=A(this),g=null,y=O.get(E);while(y!=null){if(y.listenerType===L)if(g!==null)g.next=y.next;else if(y.next!==null)O.set(E,y.next);else O.delete(E);else g=y;y=y.next}if(C!==null){let k={listener:C,listenerType:L,passive:!1,once:!1,next:null};if(g===null)O.set(E,k);else g.next=k}},configurable:!0,enumerable:!0}}function Z(E,C){Object.defineProperty(E,`on${C}`,_(C))}function l(E){function C(){S.call(this)}C.prototype=Object.create(S.prototype,{constructor:{value:C,configurable:!0,writable:!0}});for(let O=0;O<E.length;++O)Z(C.prototype,E[O]);return C}function S(){if(this instanceof S){D.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return l(arguments[0]);if(arguments.length>0){let E=Array(arguments.length);for(let C=0;C<arguments.length;++C)E[C]=arguments[C];return l(E)}throw TypeError("Cannot call a class as a function")}if(S.prototype={addEventListener(E,C,O){if(C==null)return;if(typeof C!=="function"&&!z(C))throw TypeError("'listener' should be a function or an object.");let g=A(this),y=z(O),k=(y?Boolean(O.capture):Boolean(O))?P:K,s={listener:C,listenerType:k,passive:y&&Boolean(O.passive),once:y&&Boolean(O.once),next:null},J0=g.get(E);if(J0===void 0){g.set(E,s);return}let U0=null;while(J0!=null){if(J0.listener===C&&J0.listenerType===k)return;U0=J0,J0=J0.next}U0.next=s},removeEventListener(E,C,O){if(C==null)return;let g=A(this),y=(z(O)?Boolean(O.capture):Boolean(O))?P:K,k=null,s=g.get(E);while(s!=null){if(s.listener===C&&s.listenerType===y){if(k!==null)k.next=s.next;else if(s.next!==null)g.set(E,s.next);else g.delete(E);return}k=s,s=s.next}},dispatchEvent(E){if(E==null||typeof E.type!=="string")throw TypeError('"event.type" should be a string.');let C=A(this),O=E.type,g=C.get(O);if(g==null)return!0;let y=F(this,E),k=null;while(g!=null){if(g.once)if(k!==null)k.next=g.next;else if(g.next!==null)C.set(O,g.next);else C.delete(O);else k=g;if(T(y,g.passive?g.listener:null),typeof g.listener==="function")try{g.listener.call(this,y)}catch(s){if(typeof console<"u"&&typeof console.error==="function")console.error(s)}else if(g.listenerType!==L&&typeof g.listener.handleEvent==="function")g.listener.handleEvent(y);if(M(y))break;g=g.next}return T(y,null),j(y,0),f(y,null),!y.defaultPrevented}},Object.defineProperty(S.prototype,"constructor",{value:S,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(S.prototype,window.EventTarget.prototype);$.defineEventAttribute=Z,$.EventTarget=S,$.default=S,Q.exports=S,Q.exports.EventTarget=Q.exports.default=S,Q.exports.defineEventAttribute=Z}),Z6=S0(($,Q)=>{Object.defineProperty($,"__esModule",{value:!0});var J=kX();class q extends J.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let V=B.get(this);if(typeof V!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return V}}J.defineEventAttribute(q.prototype,"abort");function X(){let V=Object.create(q.prototype);return J.EventTarget.call(V),B.set(V,!1),V}function Y(V){if(B.get(V)!==!1)return;B.set(V,!0),V.dispatchEvent({type:"abort"})}var B=new WeakMap;if(Object.defineProperties(q.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(q.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class U{constructor(){W.set(this,X())}get signal(){return G(this)}abort(){Y(G(this))}}var W=new WeakMap;function G(V){let F=W.get(V);if(F==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${V===null?"null":typeof V}`);return F}if(Object.defineProperties(U.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(U.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});$.AbortController=U,$.AbortSignal=q,$.default=U,Q.exports=U,Q.exports.AbortController=Q.exports.default=U,Q.exports.AbortSignal=q}),a0=S0(($,Q)=>{var J=(y2(),X2(f2)),{format:q,inspect:X}=G$(),{codes:{ERR_INVALID_ARG_TYPE:Y}}=i0(),{kResistStopPropagation:B,AggregateError:U,SymbolDispose:W}=T0(),G=globalThis.AbortSignal||Z6().AbortSignal,V=globalThis.AbortController||Z6().AbortController,F=Object.getPrototypeOf(async function(){}).constructor,M=globalThis.Blob||J.Blob,j=typeof M<"u"?function(D){return D instanceof M}:function(D){return!1},f=(D,P)=>{if(D!==void 0&&(D===null||typeof D!=="object"||!("aborted"in D)))throw new Y(P,"AbortSignal",D)},T=(D,P)=>{if(typeof D!=="function")throw new Y(P,"Function",D)};Q.exports={AggregateError:U,kEmptyObject:Object.freeze({}),once(D){let P=!1;return function(...K){if(P)return;P=!0,D.apply(this,K)}},createDeferredPromise:function(){let D,P;return{promise:new Promise((K,L)=>{D=K,P=L}),resolve:D,reject:P}},promisify(D){return new Promise((P,K)=>{D((L,...z)=>{if(L)return K(L);return P(...z)})})},debuglog(){return function(){}},format:q,inspect:X,types:{isAsyncFunction(D){return D instanceof F},isArrayBufferView(D){return ArrayBuffer.isView(D)}},isBlob:j,deprecate(D,P){return D},addAbortListener:(k6(),X2(v6)).addAbortListener||function(D,P){if(D===void 0)throw new Y("signal","AbortSignal",D);f(D,"signal"),T(P,"listener");let K;if(D.aborted)queueMicrotask(()=>P());else D.addEventListener("abort",P,{__proto__:null,once:!0,[B]:!0}),K=()=>{D.removeEventListener("abort",P)};return{__proto__:null,[W](){var L;(L=K)===null||L===void 0||L()}}},AbortSignalAny:G.any||function(D){if(D.length===1)return D[0];let P=new V,K=()=>P.abort();return D.forEach((L)=>{f(L,"signals"),L.addEventListener("abort",K,{once:!0})}),P.signal.addEventListener("abort",()=>{D.forEach((L)=>L.removeEventListener("abort",K))},{once:!0}),P.signal}},Q.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),T6=S0(($,Q)=>{var{ArrayIsArray:J,ArrayPrototypeIncludes:q,ArrayPrototypeJoin:X,ArrayPrototypeMap:Y,NumberIsInteger:B,NumberIsNaN:U,NumberMAX_SAFE_INTEGER:W,NumberMIN_SAFE_INTEGER:G,NumberParseInt:V,ObjectPrototypeHasOwnProperty:F,RegExpPrototypeExec:M,String:j,StringPrototypeToUpperCase:f,StringPrototypeTrim:T}=T0(),{hideStackFrames:D,codes:{ERR_SOCKET_BAD_PORT:P,ERR_INVALID_ARG_TYPE:K,ERR_INVALID_ARG_VALUE:L,ERR_OUT_OF_RANGE:z,ERR_UNKNOWN_SIGNAL:A}}=i0(),{normalizeEncoding:_}=a0(),{isAsyncFunction:Z,isArrayBufferView:l}=a0().types,S={};function E(I){return I===(I|0)}function C(I){return I===I>>>0}var O=/^[0-7]+$/,g="must be a 32-bit unsigned integer or an octal string";function y(I,i,q0){if(typeof I>"u")I=q0;if(typeof I==="string"){if(M(O,I)===null)throw new L(i,I,g);I=V(I,8)}return J0(I,i),I}var k=D((I,i,q0=G,n=W)=>{if(typeof I!=="number")throw new K(i,"number",I);if(!B(I))throw new z(i,"an integer",I);if(I<q0||I>n)throw new z(i,`>= ${q0} && <= ${n}`,I)}),s=D((I,i,q0=-2147483648,n=2147483647)=>{if(typeof I!=="number")throw new K(i,"number",I);if(!B(I))throw new z(i,"an integer",I);if(I<q0||I>n)throw new z(i,`>= ${q0} && <= ${n}`,I)}),J0=D((I,i,q0=!1)=>{if(typeof I!=="number")throw new K(i,"number",I);if(!B(I))throw new z(i,"an integer",I);let n=q0?1:0,j0=4294967295;if(I<n||I>j0)throw new z(i,`>= ${n} && <= ${j0}`,I)});function U0(I,i){if(typeof I!=="string")throw new K(i,"string",I)}function O0(I,i,q0=void 0,n){if(typeof I!=="number")throw new K(i,"number",I);if(q0!=null&&I<q0||n!=null&&I>n||(q0!=null||n!=null)&&U(I))throw new z(i,`${q0!=null?`>= ${q0}`:""}${q0!=null&&n!=null?" && ":""}${n!=null?`<= ${n}`:""}`,I)}var u=D((I,i,q0)=>{if(!q(q0,I)){let n="must be one of: "+X(Y(q0,(j0)=>typeof j0==="string"?`'${j0}'`:j(j0)),", ");throw new L(i,I,n)}});function K0(I,i){if(typeof I!=="boolean")throw new K(i,"boolean",I)}function N(I,i,q0){return I==null||!F(I,i)?q0:I[i]}var d=D((I,i,q0=null)=>{let n=N(q0,"allowArray",!1),j0=N(q0,"allowFunction",!1);if(!N(q0,"nullable",!1)&&I===null||!n&&J(I)||typeof I!=="object"&&(!j0||typeof I!=="function"))throw new K(i,"Object",I)}),Y0=D((I,i)=>{if(I!=null&&typeof I!=="object"&&typeof I!=="function")throw new K(i,"a dictionary",I)}),m=D((I,i,q0=0)=>{if(!J(I))throw new K(i,"Array",I);if(I.length<q0){let n=`must be longer than ${q0}`;throw new L(i,I,n)}});function W0(I,i){m(I,i);for(let q0=0;q0<I.length;q0++)U0(I[q0],`${i}[${q0}]`)}function M0(I,i){m(I,i);for(let q0=0;q0<I.length;q0++)K0(I[q0],`${i}[${q0}]`)}function C0(I,i){m(I,i);for(let q0=0;q0<I.length;q0++){let n=I[q0],j0=`${i}[${q0}]`;if(n==null)throw new K(j0,"AbortSignal",n);L0(n,j0)}}function N0(I,i="signal"){if(U0(I,i),S[I]===void 0){if(S[f(I)]!==void 0)throw new A(I+" (signals must use all capital letters)");throw new A(I)}}var c=D((I,i="buffer")=>{if(!l(I))throw new K(i,["Buffer","TypedArray","DataView"],I)});function p(I,i){let q0=_(i),n=I.length;if(q0==="hex"&&n%2!==0)throw new L("encoding",i,`is invalid for data of length ${n}`)}function t(I,i="Port",q0=!0){if(typeof I!=="number"&&typeof I!=="string"||typeof I==="string"&&T(I).length===0||+I!==+I>>>0||I>65535||I===0&&!q0)throw new P(i,I,q0);return I|0}var L0=D((I,i)=>{if(I!==void 0&&(I===null||typeof I!=="object"||!("aborted"in I)))throw new K(i,"AbortSignal",I)}),z0=D((I,i)=>{if(typeof I!=="function")throw new K(i,"Function",I)}),R=D((I,i)=>{if(typeof I!=="function"||Z(I))throw new K(i,"Function",I)}),v=D((I,i)=>{if(I!==void 0)throw new K(i,"undefined",I)});function h(I,i,q0){if(!q(q0,I))throw new K(i,`('${X(q0,"|")}')`,I)}var a=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Q0(I,i){if(typeof I>"u"||!M(a,I))throw new L(i,I,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function e(I){if(typeof I==="string")return Q0(I,"hints"),I;else if(J(I)){let i=I.length,q0="";if(i===0)return q0;for(let n=0;n<i;n++){let j0=I[n];if(Q0(j0,"hints"),q0+=j0,n!==i-1)q0+=", "}return q0}throw new L("hints",I,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}Q.exports={isInt32:E,isUint32:C,parseFileMode:y,validateArray:m,validateStringArray:W0,validateBooleanArray:M0,validateAbortSignalArray:C0,validateBoolean:K0,validateBuffer:c,validateDictionary:Y0,validateEncoding:p,validateFunction:z0,validateInt32:s,validateInteger:k,validateNumber:O0,validateObject:d,validateOneOf:u,validatePlainFunction:R,validatePort:t,validateSignalName:N0,validateString:U0,validateUint32:J0,validateUndefined:v,validateUnion:h,validateAbortSignal:L0,validateLinkHeaderValue:e}}),N1=S0(($,Q)=>{Q.exports=globalThis.process}),b2=S0(($,Q)=>{var{SymbolAsyncIterator:J,SymbolIterator:q,SymbolFor:X}=T0(),Y=X("nodejs.stream.destroyed"),B=X("nodejs.stream.errored"),U=X("nodejs.stream.readable"),W=X("nodejs.stream.writable"),G=X("nodejs.stream.disturbed"),V=X("nodejs.webstream.isClosedPromise"),F=X("nodejs.webstream.controllerErrorFunction");function M(N,d=!1){var Y0;return!!(N&&typeof N.pipe==="function"&&typeof N.on==="function"&&(!d||typeof N.pause==="function"&&typeof N.resume==="function")&&(!N._writableState||((Y0=N._readableState)===null||Y0===void 0?void 0:Y0.readable)!==!1)&&(!N._writableState||N._readableState))}function j(N){var d;return!!(N&&typeof N.write==="function"&&typeof N.on==="function"&&(!N._readableState||((d=N._writableState)===null||d===void 0?void 0:d.writable)!==!1))}function f(N){return!!(N&&typeof N.pipe==="function"&&N._readableState&&typeof N.on==="function"&&typeof N.write==="function")}function T(N){return N&&(N._readableState||N._writableState||typeof N.write==="function"&&typeof N.on==="function"||typeof N.pipe==="function"&&typeof N.on==="function")}function D(N){return!!(N&&!T(N)&&typeof N.pipeThrough==="function"&&typeof N.getReader==="function"&&typeof N.cancel==="function")}function P(N){return!!(N&&!T(N)&&typeof N.getWriter==="function"&&typeof N.abort==="function")}function K(N){return!!(N&&!T(N)&&typeof N.readable==="object"&&typeof N.writable==="object")}function L(N){return D(N)||P(N)||K(N)}function z(N,d){if(N==null)return!1;if(d===!0)return typeof N[J]==="function";if(d===!1)return typeof N[q]==="function";return typeof N[J]==="function"||typeof N[q]==="function"}function A(N){if(!T(N))return null;let{_writableState:d,_readableState:Y0}=N,m=d||Y0;return!!(N.destroyed||N[Y]||m!==null&&m!==void 0&&m.destroyed)}function _(N){if(!j(N))return null;if(N.writableEnded===!0)return!0;let d=N._writableState;if(d!==null&&d!==void 0&&d.errored)return!1;if(typeof(d===null||d===void 0?void 0:d.ended)!=="boolean")return null;return d.ended}function Z(N,d){if(!j(N))return null;if(N.writableFinished===!0)return!0;let Y0=N._writableState;if(Y0!==null&&Y0!==void 0&&Y0.errored)return!1;if(typeof(Y0===null||Y0===void 0?void 0:Y0.finished)!=="boolean")return null;return!!(Y0.finished||d===!1&&Y0.ended===!0&&Y0.length===0)}function l(N){if(!M(N))return null;if(N.readableEnded===!0)return!0;let d=N._readableState;if(!d||d.errored)return!1;if(typeof(d===null||d===void 0?void 0:d.ended)!=="boolean")return null;return d.ended}function S(N,d){if(!M(N))return null;let Y0=N._readableState;if(Y0!==null&&Y0!==void 0&&Y0.errored)return!1;if(typeof(Y0===null||Y0===void 0?void 0:Y0.endEmitted)!=="boolean")return null;return!!(Y0.endEmitted||d===!1&&Y0.ended===!0&&Y0.length===0)}function E(N){if(N&&N[U]!=null)return N[U];if(typeof(N===null||N===void 0?void 0:N.readable)!=="boolean")return null;if(A(N))return!1;return M(N)&&N.readable&&!S(N)}function C(N){if(N&&N[W]!=null)return N[W];if(typeof(N===null||N===void 0?void 0:N.writable)!=="boolean")return null;if(A(N))return!1;return j(N)&&N.writable&&!_(N)}function O(N,d){if(!T(N))return null;if(A(N))return!0;if((d===null||d===void 0?void 0:d.readable)!==!1&&E(N))return!1;if((d===null||d===void 0?void 0:d.writable)!==!1&&C(N))return!1;return!0}function g(N){var d,Y0;if(!T(N))return null;if(N.writableErrored)return N.writableErrored;return(d=(Y0=N._writableState)===null||Y0===void 0?void 0:Y0.errored)!==null&&d!==void 0?d:null}function y(N){var d,Y0;if(!T(N))return null;if(N.readableErrored)return N.readableErrored;return(d=(Y0=N._readableState)===null||Y0===void 0?void 0:Y0.errored)!==null&&d!==void 0?d:null}function k(N){if(!T(N))return null;if(typeof N.closed==="boolean")return N.closed;let{_writableState:d,_readableState:Y0}=N;if(typeof(d===null||d===void 0?void 0:d.closed)==="boolean"||typeof(Y0===null||Y0===void 0?void 0:Y0.closed)==="boolean")return(d===null||d===void 0?void 0:d.closed)||(Y0===null||Y0===void 0?void 0:Y0.closed);if(typeof N._closed==="boolean"&&s(N))return N._closed;return null}function s(N){return typeof N._closed==="boolean"&&typeof N._defaultKeepAlive==="boolean"&&typeof N._removedConnection==="boolean"&&typeof N._removedContLen==="boolean"}function J0(N){return typeof N._sent100==="boolean"&&s(N)}function U0(N){var d;return typeof N._consuming==="boolean"&&typeof N._dumped==="boolean"&&((d=N.req)===null||d===void 0?void 0:d.upgradeOrConnect)===void 0}function O0(N){if(!T(N))return null;let{_writableState:d,_readableState:Y0}=N,m=d||Y0;return!m&&J0(N)||!!(m&&m.autoDestroy&&m.emitClose&&m.closed===!1)}function u(N){var d;return!!(N&&((d=N[G])!==null&&d!==void 0?d:N.readableDidRead||N.readableAborted))}function K0(N){var d,Y0,m,W0,M0,C0,N0,c,p,t;return!!(N&&((d=(Y0=(m=(W0=(M0=(C0=N[B])!==null&&C0!==void 0?C0:N.readableErrored)!==null&&M0!==void 0?M0:N.writableErrored)!==null&&W0!==void 0?W0:(N0=N._readableState)===null||N0===void 0?void 0:N0.errorEmitted)!==null&&m!==void 0?m:(c=N._writableState)===null||c===void 0?void 0:c.errorEmitted)!==null&&Y0!==void 0?Y0:(p=N._readableState)===null||p===void 0?void 0:p.errored)!==null&&d!==void 0?d:(t=N._writableState)===null||t===void 0?void 0:t.errored))}Q.exports={isDestroyed:A,kIsDestroyed:Y,isDisturbed:u,kIsDisturbed:G,isErrored:K0,kIsErrored:B,isReadable:E,kIsReadable:U,kIsClosedPromise:V,kControllerErrorFunction:F,kIsWritable:W,isClosed:k,isDuplexNodeStream:f,isFinished:O,isIterable:z,isReadableNodeStream:M,isReadableStream:D,isReadableEnded:l,isReadableFinished:S,isReadableErrored:y,isNodeStream:T,isWebStream:L,isWritable:C,isWritableNodeStream:j,isWritableStream:P,isWritableEnded:_,isWritableFinished:Z,isWritableErrored:g,isServerRequest:U0,isServerResponse:J0,willEmitClose:O0,isTransformStream:K}}),r2=S0(($,Q)=>{var J=N1(),{AbortError:q,codes:X}=i0(),{ERR_INVALID_ARG_TYPE:Y,ERR_STREAM_PREMATURE_CLOSE:B}=X,{kEmptyObject:U,once:W}=a0(),{validateAbortSignal:G,validateFunction:V,validateObject:F,validateBoolean:M}=T6(),{Promise:j,PromisePrototypeThen:f,SymbolDispose:T}=T0(),{isClosed:D,isReadable:P,isReadableNodeStream:K,isReadableStream:L,isReadableFinished:z,isReadableErrored:A,isWritable:_,isWritableNodeStream:Z,isWritableStream:l,isWritableFinished:S,isWritableErrored:E,isNodeStream:C,willEmitClose:O,kIsClosedPromise:g}=b2(),y;function k(u){return u.setHeader&&typeof u.abort==="function"}var s=()=>{};function J0(u,K0,N){var d,Y0;if(arguments.length===2)N=K0,K0=U;else if(K0==null)K0=U;else F(K0,"options");if(V(N,"callback"),G(K0.signal,"options.signal"),N=W(N),L(u)||l(u))return U0(u,K0,N);if(!C(u))throw new Y("stream",["ReadableStream","WritableStream","Stream"],u);let m=(d=K0.readable)!==null&&d!==void 0?d:K(u),W0=(Y0=K0.writable)!==null&&Y0!==void 0?Y0:Z(u),M0=u._writableState,C0=u._readableState,N0=()=>{if(!u.writable)t()},c=O(u)&&K(u)===m&&Z(u)===W0,p=S(u,!1),t=()=>{if(p=!0,u.destroyed)c=!1;if(c&&(!u.readable||m))return;if(!m||L0)N.call(u)},L0=z(u,!1),z0=()=>{if(L0=!0,u.destroyed)c=!1;if(c&&(!u.writable||W0))return;if(!W0||p)N.call(u)},R=(I)=>{N.call(u,I)},v=D(u),h=()=>{v=!0;let I=E(u)||A(u);if(I&&typeof I!=="boolean")return N.call(u,I);if(m&&!L0&&K(u,!0)){if(!z(u,!1))return N.call(u,new B)}if(W0&&!p){if(!S(u,!1))return N.call(u,new B)}N.call(u)},a=()=>{v=!0;let I=E(u)||A(u);if(I&&typeof I!=="boolean")return N.call(u,I);N.call(u)},Q0=()=>{u.req.on("finish",t)};if(k(u)){if(u.on("complete",t),!c)u.on("abort",h);if(u.req)Q0();else u.on("request",Q0)}else if(W0&&!M0)u.on("end",N0),u.on("close",N0);if(!c&&typeof u.aborted==="boolean")u.on("aborted",h);if(u.on("end",z0),u.on("finish",t),K0.error!==!1)u.on("error",R);if(u.on("close",h),v)J.nextTick(h);else if(M0!==null&&M0!==void 0&&M0.errorEmitted||C0!==null&&C0!==void 0&&C0.errorEmitted){if(!c)J.nextTick(a)}else if(!m&&(!c||P(u))&&(p||_(u)===!1))J.nextTick(a);else if(!W0&&(!c||_(u))&&(L0||P(u)===!1))J.nextTick(a);else if(C0&&u.req&&u.aborted)J.nextTick(a);let e=()=>{if(N=s,u.removeListener("aborted",h),u.removeListener("complete",t),u.removeListener("abort",h),u.removeListener("request",Q0),u.req)u.req.removeListener("finish",t);u.removeListener("end",N0),u.removeListener("close",N0),u.removeListener("finish",t),u.removeListener("end",z0),u.removeListener("error",R),u.removeListener("close",h)};if(K0.signal&&!v){let I=()=>{let i=N;e(),i.call(u,new q(void 0,{cause:K0.signal.reason}))};if(K0.signal.aborted)J.nextTick(I);else{y=y||a0().addAbortListener;let i=y(K0.signal,I),q0=N;N=W((...n)=>{i[T](),q0.apply(u,n)})}}return e}function U0(u,K0,N){let d=!1,Y0=s;if(K0.signal)if(Y0=()=>{d=!0,N.call(u,new q(void 0,{cause:K0.signal.reason}))},K0.signal.aborted)J.nextTick(Y0);else{y=y||a0().addAbortListener;let W0=y(K0.signal,Y0),M0=N;N=W((...C0)=>{W0[T](),M0.apply(u,C0)})}let m=(...W0)=>{if(!d)J.nextTick(()=>N.apply(u,W0))};return f(u[g].promise,m,m),s}function O0(u,K0){var N;let d=!1;if(K0===null)K0=U;if((N=K0)!==null&&N!==void 0&&N.cleanup)M(K0.cleanup,"cleanup"),d=K0.cleanup;return new j((Y0,m)=>{let W0=J0(u,K0,(M0)=>{if(d)W0();if(M0)m(M0);else Y0()})})}Q.exports=J0,Q.exports.finished=O0}),p1=S0(($,Q)=>{var J=N1(),{aggregateTwoErrors:q,codes:{ERR_MULTIPLE_CALLBACK:X},AbortError:Y}=i0(),{Symbol:B}=T0(),{kIsDestroyed:U,isDestroyed:W,isFinished:G,isServerRequest:V}=b2(),F=B("kDestroy"),M=B("kConstruct");function j(O,g,y){if(O){if(O.stack,g&&!g.errored)g.errored=O;if(y&&!y.errored)y.errored=O}}function f(O,g){let y=this._readableState,k=this._writableState,s=k||y;if(k!==null&&k!==void 0&&k.destroyed||y!==null&&y!==void 0&&y.destroyed){if(typeof g==="function")g();return this}if(j(O,k,y),k)k.destroyed=!0;if(y)y.destroyed=!0;if(!s.constructed)this.once(F,function(J0){T(this,q(J0,O),g)});else T(this,O,g);return this}function T(O,g,y){let k=!1;function s(J0){if(k)return;k=!0;let{_readableState:U0,_writableState:O0}=O;if(j(J0,O0,U0),O0)O0.closed=!0;if(U0)U0.closed=!0;if(typeof y==="function")y(J0);if(J0)J.nextTick(D,O,J0);else J.nextTick(P,O)}try{O._destroy(g||null,s)}catch(J0){s(J0)}}function D(O,g){K(O,g),P(O)}function P(O){let{_readableState:g,_writableState:y}=O;if(y)y.closeEmitted=!0;if(g)g.closeEmitted=!0;if(y!==null&&y!==void 0&&y.emitClose||g!==null&&g!==void 0&&g.emitClose)O.emit("close")}function K(O,g){let{_readableState:y,_writableState:k}=O;if(k!==null&&k!==void 0&&k.errorEmitted||y!==null&&y!==void 0&&y.errorEmitted)return;if(k)k.errorEmitted=!0;if(y)y.errorEmitted=!0;O.emit("error",g)}function L(){let O=this._readableState,g=this._writableState;if(O)O.constructed=!0,O.closed=!1,O.closeEmitted=!1,O.destroyed=!1,O.errored=null,O.errorEmitted=!1,O.reading=!1,O.ended=O.readable===!1,O.endEmitted=O.readable===!1;if(g)g.constructed=!0,g.destroyed=!1,g.closed=!1,g.closeEmitted=!1,g.errored=null,g.errorEmitted=!1,g.finalCalled=!1,g.prefinished=!1,g.ended=g.writable===!1,g.ending=g.writable===!1,g.finished=g.writable===!1}function z(O,g,y){let{_readableState:k,_writableState:s}=O;if(s!==null&&s!==void 0&&s.destroyed||k!==null&&k!==void 0&&k.destroyed)return this;if(k!==null&&k!==void 0&&k.autoDestroy||s!==null&&s!==void 0&&s.autoDestroy)O.destroy(g);else if(g){if(g.stack,s&&!s.errored)s.errored=g;if(k&&!k.errored)k.errored=g;if(y)J.nextTick(K,O,g);else K(O,g)}}function A(O,g){if(typeof O._construct!=="function")return;let{_readableState:y,_writableState:k}=O;if(y)y.constructed=!1;if(k)k.constructed=!1;if(O.once(M,g),O.listenerCount(M)>1)return;J.nextTick(_,O)}function _(O){let g=!1;function y(k){if(g){z(O,k!==null&&k!==void 0?k:new X);return}g=!0;let{_readableState:s,_writableState:J0}=O,U0=J0||s;if(s)s.constructed=!0;if(J0)J0.constructed=!0;if(U0.destroyed)O.emit(F,k);else if(k)z(O,k,!0);else J.nextTick(Z,O)}try{O._construct((k)=>{J.nextTick(y,k)})}catch(k){J.nextTick(y,k)}}function Z(O){O.emit(M)}function l(O){return(O===null||O===void 0?void 0:O.setHeader)&&typeof O.abort==="function"}function S(O){O.emit("close")}function E(O,g){O.emit("error",g),J.nextTick(S,O)}function C(O,g){if(!O||W(O))return;if(!g&&!G(O))g=new Y;if(V(O))O.socket=null,O.destroy(g);else if(l(O))O.abort();else if(l(O.req))O.req.abort();else if(typeof O.destroy==="function")O.destroy(g);else if(typeof O.close==="function")O.close();else if(g)J.nextTick(E,O,g);else J.nextTick(S,O);if(!O.destroyed)O[U]=!0}Q.exports={construct:A,destroyer:C,destroy:f,undestroy:L,errorOrDestroy:z}}),v5=S0(($,Q)=>{var{ArrayIsArray:J,ObjectSetPrototypeOf:q}=T0(),{EventEmitter:X}=(k6(),X2(v6));function Y(U){X.call(this,U)}q(Y.prototype,X.prototype),q(Y,X),Y.prototype.pipe=function(U,W){let G=this;function V(P){if(U.writable&&U.write(P)===!1&&G.pause)G.pause()}G.on("data",V);function F(){if(G.readable&&G.resume)G.resume()}if(U.on("drain",F),!U._isStdio&&(!W||W.end!==!1))G.on("end",j),G.on("close",f);let M=!1;function j(){if(M)return;M=!0,U.end()}function f(){if(M)return;if(M=!0,typeof U.destroy==="function")U.destroy()}function T(P){if(D(),X.listenerCount(this,"error")===0)this.emit("error",P)}B(G,"error",T),B(U,"error",T);function D(){G.removeListener("data",V),U.removeListener("drain",F),G.removeListener("end",j),G.removeListener("close",f),G.removeListener("error",T),U.removeListener("error",T),G.removeListener("end",D),G.removeListener("close",D),U.removeListener("close",D)}return G.on("end",D),G.on("close",D),U.on("close",D),U.emit("pipe",G),U};function B(U,W,G){if(typeof U.prependListener==="function")return U.prependListener(W,G);if(!U._events||!U._events[W])U.on(W,G);else if(J(U._events[W]))U._events[W].unshift(G);else U._events[W]=[G,U._events[W]]}Q.exports={Stream:Y,prependListener:B}}),w8=S0(($,Q)=>{var{SymbolDispose:J}=T0(),{AbortError:q,codes:X}=i0(),{isNodeStream:Y,isWebStream:B,kControllerErrorFunction:U}=b2(),W=r2(),{ERR_INVALID_ARG_TYPE:G}=X,V,F=(M,j)=>{if(typeof M!=="object"||!("aborted"in M))throw new G(j,"AbortSignal",M)};Q.exports.addAbortSignal=function(M,j){if(F(M,"signal"),!Y(j)&&!B(j))throw new G("stream",["ReadableStream","WritableStream","Stream"],j);return Q.exports.addAbortSignalNoValidate(M,j)},Q.exports.addAbortSignalNoValidate=function(M,j){if(typeof M!=="object"||!("aborted"in M))return j;let f=Y(j)?()=>{j.destroy(new q(void 0,{cause:M.reason}))}:()=>{j[U](new q(void 0,{cause:M.reason}))};if(M.aborted)f();else{V=V||a0().addAbortListener;let T=V(M,f);W(j,T[J])}return j}}),ZX=S0(($,Q)=>{var{StringPrototypeSlice:J,SymbolIterator:q,TypedArrayPrototypeSet:X,Uint8Array:Y}=T0(),{Buffer:B}=(y2(),X2(f2)),{inspect:U}=a0();Q.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(W){let G={data:W,next:null};if(this.length>0)this.tail.next=G;else this.head=G;this.tail=G,++this.length}unshift(W){let G={data:W,next:this.head};if(this.length===0)this.tail=G;this.head=G,++this.length}shift(){if(this.length===0)return;let W=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,W}clear(){this.head=this.tail=null,this.length=0}join(W){if(this.length===0)return"";let G=this.head,V=""+G.data;while((G=G.next)!==null)V+=W+G.data;return V}concat(W){if(this.length===0)return B.alloc(0);let G=B.allocUnsafe(W>>>0),V=this.head,F=0;while(V)X(G,V.data,F),F+=V.data.length,V=V.next;return G}consume(W,G){let V=this.head.data;if(W<V.length){let F=V.slice(0,W);return this.head.data=V.slice(W),F}if(W===V.length)return this.shift();return G?this._getString(W):this._getBuffer(W)}first(){return this.head.data}*[q](){for(let W=this.head;W;W=W.next)yield W.data}_getString(W){let G="",V=this.head,F=0;do{let M=V.data;if(W>M.length)G+=M,W-=M.length;else{if(W===M.length)if(G+=M,++F,V.next)this.head=V.next;else this.head=this.tail=null;else G+=J(M,0,W),this.head=V,V.data=J(M,W);break}++F}while((V=V.next)!==null);return this.length-=F,G}_getBuffer(W){let G=B.allocUnsafe(W),V=W,F=this.head,M=0;do{let j=F.data;if(W>j.length)X(G,j,V-W),W-=j.length;else{if(W===j.length)if(X(G,j,V-W),++M,F.next)this.head=F.next;else this.head=this.tail=null;else X(G,new Y(j.buffer,j.byteOffset,W),V-W),this.head=F,F.data=j.slice(W);break}++M}while((F=F.next)!==null);return this.length-=M,G}[Symbol.for("nodejs.util.inspect.custom")](W,G){return U(this,{...G,depth:0,customInspect:!1})}}}),L8=S0(($,Q)=>{var{MathFloor:J,NumberIsInteger:q}=T0(),{validateInteger:X}=T6(),{ERR_INVALID_ARG_VALUE:Y}=i0().codes,B=16384,U=16;function W(M,j,f){return M.highWaterMark!=null?M.highWaterMark:j?M[f]:null}function G(M){return M?U:B}function V(M,j){if(X(j,"value",0),M)U=j;else B=j}function F(M,j,f,T){let D=W(j,T,f);if(D!=null){if(!q(D)||D<0){let P=T?`options.${f}`:"options.highWaterMark";throw new Y(P,D)}return J(D)}return G(M.objectMode)}Q.exports={getHighWaterMark:F,getDefaultHighWaterMark:G,setDefaultHighWaterMark:V}}),TX=S0(($,Q)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var J=(y2(),X2(f2)),q=J.Buffer;function X(B,U){for(var W in B)U[W]=B[W]}if(q.from&&q.alloc&&q.allocUnsafe&&q.allocUnsafeSlow)Q.exports=J;else X(J,$),$.Buffer=Y;function Y(B,U,W){return q(B,U,W)}Y.prototype=Object.create(q.prototype),X(q,Y),Y.from=function(B,U,W){if(typeof B==="number")throw TypeError("Argument must not be a number");return q(B,U,W)},Y.alloc=function(B,U,W){if(typeof B!=="number")throw TypeError("Argument must be a number");var G=q(B);if(U!==void 0)if(typeof W==="string")G.fill(U,W);else G.fill(U);else G.fill(0);return G},Y.allocUnsafe=function(B){if(typeof B!=="number")throw TypeError("Argument must be a number");return q(B)},Y.allocUnsafeSlow=function(B){if(typeof B!=="number")throw TypeError("Argument must be a number");return J.SlowBuffer(B)}}),gX=S0(($)=>{var Q=TX().Buffer,J=Q.isEncoding||function(K){switch(K=""+K,K&&K.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!0;default:return!1}};function q(K){if(!K)return"utf8";var L;while(!0)switch(K){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 K;default:if(L)return;K=(""+K).toLowerCase(),L=!0}}function X(K){var L=q(K);if(typeof L!=="string"&&(Q.isEncoding===J||!J(K)))throw Error("Unknown encoding: "+K);return L||K}$.StringDecoder=Y;function Y(K){this.encoding=X(K);var L;switch(this.encoding){case"utf16le":this.text=M,this.end=j,L=4;break;case"utf8":this.fillLast=G,L=4;break;case"base64":this.text=f,this.end=T,L=3;break;default:this.write=D,this.end=P;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Q.allocUnsafe(L)}Y.prototype.write=function(K){if(K.length===0)return"";var L,z;if(this.lastNeed){if(L=this.fillLast(K),L===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;if(z<K.length)return L?L+this.text(K,z):this.text(K,z);return L||""},Y.prototype.end=F,Y.prototype.text=V,Y.prototype.fillLast=function(K){if(this.lastNeed<=K.length)return K.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);K.copy(this.lastChar,this.lastTotal-this.lastNeed,0,K.length),this.lastNeed-=K.length};function B(K){if(K<=127)return 0;else if(K>>5===6)return 2;else if(K>>4===14)return 3;else if(K>>3===30)return 4;return K>>6===2?-1:-2}function U(K,L,z){var A=L.length-1;if(A<z)return 0;var _=B(L[A]);if(_>=0){if(_>0)K.lastNeed=_-1;return _}if(--A<z||_===-2)return 0;if(_=B(L[A]),_>=0){if(_>0)K.lastNeed=_-2;return _}if(--A<z||_===-2)return 0;if(_=B(L[A]),_>=0){if(_>0)if(_===2)_=0;else K.lastNeed=_-3;return _}return 0}function W(K,L,z){if((L[0]&192)!==128)return K.lastNeed=0,"�";if(K.lastNeed>1&&L.length>1){if((L[1]&192)!==128)return K.lastNeed=1,"�";if(K.lastNeed>2&&L.length>2){if((L[2]&192)!==128)return K.lastNeed=2,"�"}}}function G(K){var L=this.lastTotal-this.lastNeed,z=W(this,K,L);if(z!==void 0)return z;if(this.lastNeed<=K.length)return K.copy(this.lastChar,L,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);K.copy(this.lastChar,L,0,K.length),this.lastNeed-=K.length}function V(K,L){var z=U(this,K,L);if(!this.lastNeed)return K.toString("utf8",L);this.lastTotal=z;var A=K.length-(z-this.lastNeed);return K.copy(this.lastChar,0,A),K.toString("utf8",L,A)}function F(K){var L=K&&K.length?this.write(K):"";if(this.lastNeed)return L+"�";return L}function M(K,L){if((K.length-L)%2===0){var z=K.toString("utf16le",L);if(z){var A=z.charCodeAt(z.length-1);if(A>=55296&&A<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=K[K.length-2],this.lastChar[1]=K[K.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=K[K.length-1],K.toString("utf16le",L,K.length-1)}function j(K){var L=K&&K.length?this.write(K):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,z)}return L}function f(K,L){var z=(K.length-L)%3;if(z===0)return K.toString("base64",L);if(this.lastNeed=3-z,this.lastTotal=3,z===1)this.lastChar[0]=K[K.length-1];else this.lastChar[0]=K[K.length-2],this.lastChar[1]=K[K.length-1];return K.toString("base64",L,K.length-z)}function T(K){var L=K&&K.length?this.write(K):"";if(this.lastNeed)return L+this.lastChar.toString("base64",0,3-this.lastNeed);return L}function D(K){return K.toString(this.encoding)}function P(K){return K&&K.length?this.write(K):""}}),V$=S0(($,Q)=>{var J=N1(),{PromisePrototypeThen:q,SymbolAsyncIterator:X,SymbolIterator:Y}=T0(),{Buffer:B}=(y2(),X2(f2)),{ERR_INVALID_ARG_TYPE:U,ERR_STREAM_NULL_VALUES:W}=i0().codes;function G(V,F,M){let j;if(typeof F==="string"||F instanceof B)return new V({objectMode:!0,...M,read(){this.push(F),this.push(null)}});let f;if(F&&F[X])f=!0,j=F[X]();else if(F&&F[Y])f=!1,j=F[Y]();else throw new U("iterable",["Iterable"],F);let T=new V({objectMode:!0,highWaterMark:1,...M}),D=!1;T._read=function(){if(!D)D=!0,K()},T._destroy=function(L,z){q(P(L),()=>J.nextTick(z,L),(A)=>J.nextTick(z,A||L))};async function P(L){let z=L!==void 0&&L!==null,A=typeof j.throw==="function";if(z&&A){let{value:_,done:Z}=await j.throw(L);if(await _,Z)return}if(typeof j.return==="function"){let{value:_}=await j.return();await _}}async function K(){for(;;){try{let{value:L,done:z}=f?await j.next():j.next();if(z)T.push(null);else{let A=L&&typeof L.then==="function"?await L:L;if(A===null)throw D=!1,new W;else if(T.push(A))continue;else D=!1}}catch(L){T.destroy(L)}break}}return T}Q.exports=G}),z8=S0(($,Q)=>{var J=N1(),{ArrayPrototypeIndexOf:q,NumberIsInteger:X,NumberIsNaN:Y,NumberParseInt:B,ObjectDefineProperties:U,ObjectKeys:W,ObjectSetPrototypeOf:G,Promise:V,SafeSet:F,SymbolAsyncDispose:M,SymbolAsyncIterator:j,Symbol:f}=T0();Q.exports=n,n.ReadableState=q0;var{EventEmitter:T}=(k6(),X2(v6)),{Stream:D,prependListener:P}=v5(),{Buffer:K}=(y2(),X2(f2)),{addAbortSignal:L}=w8(),z=r2(),A=a0().debuglog("stream",(H)=>{A=H}),_=ZX(),Z=p1(),{getHighWaterMark:l,getDefaultHighWaterMark:S}=L8(),{aggregateTwoErrors:E,codes:{ERR_INVALID_ARG_TYPE:C,ERR_METHOD_NOT_IMPLEMENTED:O,ERR_OUT_OF_RANGE:g,ERR_STREAM_PUSH_AFTER_EOF:y,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:k},AbortError:s}=i0(),{validateObject:J0}=T6(),U0=f("kPaused"),{StringDecoder:O0}=gX(),u=V$();G(n.prototype,D.prototype),G(n,D);var K0=()=>{},{errorOrDestroy:N}=Z,d=1,Y0=2,m=4,W0=8,M0=16,C0=32,N0=64,c=128,p=256,t=512,L0=1024,z0=2048,R=4096,v=8192,h=16384,a=32768,Q0=65536,e=131072,I=262144;function i(H){return{enumerable:!1,get(){return(this.state&H)!==0},set(w){if(w)this.state|=H;else this.state&=~H}}}U(q0.prototype,{objectMode:i(d),ended:i(Y0),endEmitted:i(m),reading:i(W0),constructed:i(M0),sync:i(C0),needReadable:i(N0),emittedReadable:i(c),readableListening:i(p),resumeScheduled:i(t),errorEmitted:i(L0),emitClose:i(z0),autoDestroy:i(R),destroyed:i(v),closed:i(h),closeEmitted:i(a),multiAwaitDrain:i(Q0),readingMore:i(e),dataEmitted:i(I)});function q0(H,w,r){if(typeof r!=="boolean")r=w instanceof _2();if(this.state=z0|R|M0|C0,H&&H.objectMode)this.state|=d;if(r&&H&&H.readableObjectMode)this.state|=d;if(this.highWaterMark=H?l(this,H,"readableHighWaterMark",r):S(!1),this.buffer=new _,this.length=0,this.pipes=[],this.flowing=null,this[U0]=null,H&&H.emitClose===!1)this.state&=~z0;if(H&&H.autoDestroy===!1)this.state&=~R;if(this.errored=null,this.defaultEncoding=H&&H.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,H&&H.encoding)this.decoder=new O0(H.encoding),this.encoding=H.encoding}function n(H){if(!(this instanceof n))return new n(H);let w=this instanceof _2();if(this._readableState=new q0(H,this,w),H){if(typeof H.read==="function")this._read=H.read;if(typeof H.destroy==="function")this._destroy=H.destroy;if(typeof H.construct==="function")this._construct=H.construct;if(H.signal&&!w)L(H.signal,this)}D.call(this,H),Z.construct(this,()=>{if(this._readableState.needReadable)m1(this,this._readableState)})}n.prototype.destroy=Z.destroy,n.prototype._undestroy=Z.undestroy,n.prototype._destroy=function(H,w){w(H)},n.prototype[T.captureRejectionSymbol]=function(H){this.destroy(H)},n.prototype[M]=function(){let H;if(!this.destroyed)H=this.readableEnded?null:new s,this.destroy(H);return new V((w,r)=>z(this,(B0)=>B0&&B0!==H?r(B0):w(null)))},n.prototype.push=function(H,w){return j0(this,H,w,!1)},n.prototype.unshift=function(H,w){return j0(this,H,w,!0)};function j0(H,w,r,B0){A("readableAddChunk",w);let G0=H._readableState,c0;if((G0.state&d)===0){if(typeof w==="string"){if(r=r||G0.defaultEncoding,G0.encoding!==r)if(B0&&G0.encoding)w=K.from(w,r).toString(G0.encoding);else w=K.from(w,r),r=""}else if(w instanceof K)r="";else if(D._isUint8Array(w))w=D._uint8ArrayToBuffer(w),r="";else if(w!=null)c0=new C("chunk",["string","Buffer","Uint8Array"],w)}if(c0)N(H,c0);else if(w===null)G0.state&=~W0,u0(H,G0);else if((G0.state&d)!==0||w&&w.length>0)if(B0)if((G0.state&m)!==0)N(H,new k);else if(G0.destroyed||G0.errored)return!1;else E0(H,G0,w,!0);else if(G0.ended)N(H,new y);else if(G0.destroyed||G0.errored)return!1;else if(G0.state&=~W0,G0.decoder&&!r)if(w=G0.decoder.write(w),G0.objectMode||w.length!==0)E0(H,G0,w,!1);else m1(H,G0);else E0(H,G0,w,!1);else if(!B0)G0.state&=~W0,m1(H,G0);return!G0.ended&&(G0.length<G0.highWaterMark||G0.length===0)}function E0(H,w,r,B0){if(w.flowing&&w.length===0&&!w.sync&&H.listenerCount("data")>0){if((w.state&Q0)!==0)w.awaitDrainWriters.clear();else w.awaitDrainWriters=null;w.dataEmitted=!0,H.emit("data",r)}else{if(w.length+=w.objectMode?1:r.length,B0)w.buffer.unshift(r);else w.buffer.push(r);if((w.state&N0)!==0)o0(H)}m1(H,w)}n.prototype.isPaused=function(){let H=this._readableState;return H[U0]===!0||H.flowing===!1},n.prototype.setEncoding=function(H){let w=new O0(H);this._readableState.decoder=w,this._readableState.encoding=this._readableState.decoder.encoding;let r=this._readableState.buffer,B0="";for(let G0 of r)B0+=w.write(G0);if(r.clear(),B0!=="")r.push(B0);return this._readableState.length=B0.length,this};var Q2=1073741824;function J2(H){if(H>Q2)throw new g("size","<= 1GiB",H);else H--,H|=H>>>1,H|=H>>>2,H|=H>>>4,H|=H>>>8,H|=H>>>16,H++;return H}function H1(H,w){if(H<=0||w.length===0&&w.ended)return 0;if((w.state&d)!==0)return 1;if(Y(H)){if(w.flowing&&w.length)return w.buffer.first().length;return w.length}if(H<=w.length)return H;return w.ended?w.length:0}n.prototype.read=function(H){if(A("read",H),H===void 0)H=NaN;else if(!X(H))H=B(H,10);let w=this._readableState,r=H;if(H>w.highWaterMark)w.highWaterMark=J2(H);if(H!==0)w.state&=~c;if(H===0&&w.needReadable&&((w.highWaterMark!==0?w.length>=w.highWaterMark:w.length>0)||w.ended)){if(A("read: emitReadable",w.length,w.ended),w.length===0&&w.ended)K5(this);else o0(this);return null}if(H=H1(H,w),H===0&&w.ended){if(w.length===0)K5(this);return null}let B0=(w.state&N0)!==0;if(A("need readable",B0),w.length===0||w.length-H<w.highWaterMark)B0=!0,A("length less than watermark",B0);if(w.ended||w.reading||w.destroyed||w.errored||!w.constructed)B0=!1,A("reading, ended or constructing",B0);else if(B0){if(A("do read"),w.state|=W0|C0,w.length===0)w.state|=N0;try{this._read(w.highWaterMark)}catch(c0){N(this,c0)}if(w.state&=~C0,!w.reading)H=H1(r,w)}let G0;if(H>0)G0=w7(H,w);else G0=null;if(G0===null)w.needReadable=w.length<=w.highWaterMark,H=0;else if(w.length-=H,w.multiAwaitDrain)w.awaitDrainWriters.clear();else w.awaitDrainWriters=null;if(w.length===0){if(!w.ended)w.needReadable=!0;if(r!==H&&w.ended)K5(this)}if(G0!==null&&!w.errorEmitted&&!w.closeEmitted)w.dataEmitted=!0,this.emit("data",G0);return G0};function u0(H,w){if(A("onEofChunk"),w.ended)return;if(w.decoder){let r=w.decoder.end();if(r&&r.length)w.buffer.push(r),w.length+=w.objectMode?1:r.length}if(w.ended=!0,w.sync)o0(H);else w.needReadable=!1,w.emittedReadable=!0,h1(H)}function o0(H){let w=H._readableState;if(A("emitReadable",w.needReadable,w.emittedReadable),w.needReadable=!1,!w.emittedReadable)A("emitReadable",w.flowing),w.emittedReadable=!0,J.nextTick(h1,H)}function h1(H){let w=H._readableState;if(A("emitReadable_",w.destroyed,w.length,w.ended),!w.destroyed&&!w.errored&&(w.length||w.ended))H.emit("readable"),w.emittedReadable=!1;w.needReadable=!w.flowing&&!w.ended&&w.length<=w.highWaterMark,M7(H)}function m1(H,w){if(!w.readingMore&&w.constructed)w.readingMore=!0,J.nextTick(O2,H,w)}function O2(H,w){while(!w.reading&&!w.ended&&(w.length<w.highWaterMark||w.flowing&&w.length===0)){let r=w.length;if(A("maybeReadMore read 0"),H.read(0),r===w.length)break}w.readingMore=!1}n.prototype._read=function(H){throw new O("_read()")},n.prototype.pipe=function(H,w){let r=this,B0=this._readableState;if(B0.pipes.length===1){if(!B0.multiAwaitDrain)B0.multiAwaitDrain=!0,B0.awaitDrainWriters=new F(B0.awaitDrainWriters?[B0.awaitDrainWriters]:[])}B0.pipes.push(H),A("pipe count=%d opts=%j",B0.pipes.length,w);let G0=(!w||w.end!==!1)&&H!==J.stdout&&H!==J.stderr?q2:C6;if(B0.endEmitted)J.nextTick(G0);else r.once("end",G0);H.on("unpipe",c0);function c0(F1,g2){if(A("onunpipe"),F1===r){if(g2&&g2.hasUnpiped===!1)g2.hasUnpiped=!0,Sq()}}function q2(){A("onend"),H.end()}let M1,z7=!1;function Sq(){if(A("cleanup"),H.removeListener("close",M5),H.removeListener("finish",F5),M1)H.removeListener("drain",M1);if(H.removeListener("error",H5),H.removeListener("unpipe",c0),r.removeListener("end",q2),r.removeListener("end",C6),r.removeListener("data",N7),z7=!0,M1&&B0.awaitDrainWriters&&(!H._writableState||H._writableState.needDrain))M1()}function O7(){if(!z7){if(B0.pipes.length===1&&B0.pipes[0]===H)A("false write response, pause",0),B0.awaitDrainWriters=H,B0.multiAwaitDrain=!1;else if(B0.pipes.length>1&&B0.pipes.includes(H))A("false write response, pause",B0.awaitDrainWriters.size),B0.awaitDrainWriters.add(H);r.pause()}if(!M1)M1=Nq(r,H),H.on("drain",M1)}r.on("data",N7);function N7(F1){A("ondata");let g2=H.write(F1);if(A("dest.write",g2),g2===!1)O7()}function H5(F1){if(A("onerror",F1),C6(),H.removeListener("error",H5),H.listenerCount("error")===0){let g2=H._writableState||H._readableState;if(g2&&!g2.errorEmitted)N(H,F1);else H.emit("error",F1)}}P(H,"error",H5);function M5(){H.removeListener("finish",F5),C6()}H.once("close",M5);function F5(){A("onfinish"),H.removeListener("close",M5),C6()}H.once("finish",F5);function C6(){A("unpipe"),r.unpipe(H)}if(H.emit("pipe",r),H.writableNeedDrain===!0)O7();else if(!B0.flowing)A("pipe resume"),r.resume();return H};function Nq(H,w){return function(){let r=H._readableState;if(r.awaitDrainWriters===w)A("pipeOnDrain",1),r.awaitDrainWriters=null;else if(r.multiAwaitDrain)A("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(w);if((!r.awaitDrainWriters||r.awaitDrainWriters.size===0)&&H.listenerCount("data"))H.resume()}}n.prototype.unpipe=function(H){let w=this._readableState,r={hasUnpiped:!1};if(w.pipes.length===0)return this;if(!H){let G0=w.pipes;w.pipes=[],this.pause();for(let c0=0;c0<G0.length;c0++)G0[c0].emit("unpipe",this,{hasUnpiped:!1});return this}let B0=q(w.pipes,H);if(B0===-1)return this;if(w.pipes.splice(B0,1),w.pipes.length===0)this.pause();return H.emit("unpipe",this,r),this},n.prototype.on=function(H,w){let r=D.prototype.on.call(this,H,w),B0=this._readableState;if(H==="data"){if(B0.readableListening=this.listenerCount("readable")>0,B0.flowing!==!1)this.resume()}else if(H==="readable"){if(!B0.endEmitted&&!B0.readableListening){if(B0.readableListening=B0.needReadable=!0,B0.flowing=!1,B0.emittedReadable=!1,A("on readable",B0.length,B0.reading),B0.length)o0(this);else if(!B0.reading)J.nextTick(Dq,this)}}return r},n.prototype.addListener=n.prototype.on,n.prototype.removeListener=function(H,w){let r=D.prototype.removeListener.call(this,H,w);if(H==="readable")J.nextTick(H7,this);return r},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(H){let w=D.prototype.removeAllListeners.apply(this,arguments);if(H==="readable"||H===void 0)J.nextTick(H7,this);return w};function H7(H){let w=H._readableState;if(w.readableListening=H.listenerCount("readable")>0,w.resumeScheduled&&w[U0]===!1)w.flowing=!0;else if(H.listenerCount("data")>0)H.resume();else if(!w.readableListening)w.flowing=null}function Dq(H){A("readable nexttick read 0"),H.read(0)}n.prototype.resume=function(){let H=this._readableState;if(!H.flowing)A("resume"),H.flowing=!H.readableListening,Pq(this,H);return H[U0]=!1,this};function Pq(H,w){if(!w.resumeScheduled)w.resumeScheduled=!0,J.nextTick(Aq,H,w)}function Aq(H,w){if(A("resume",w.reading),!w.reading)H.read(0);if(w.resumeScheduled=!1,H.emit("resume"),M7(H),w.flowing&&!w.reading)H.read(0)}n.prototype.pause=function(){if(A("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)A("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[U0]=!0,this};function M7(H){let w=H._readableState;A("flow",w.flowing);while(w.flowing&&H.read()!==null);}n.prototype.wrap=function(H){let w=!1;H.on("data",(B0)=>{if(!this.push(B0)&&H.pause)w=!0,H.pause()}),H.on("end",()=>{this.push(null)}),H.on("error",(B0)=>{N(this,B0)}),H.on("close",()=>{this.destroy()}),H.on("destroy",()=>{this.destroy()}),this._read=()=>{if(w&&H.resume)w=!1,H.resume()};let r=W(H);for(let B0=1;B0<r.length;B0++){let G0=r[B0];if(this[G0]===void 0&&typeof H[G0]==="function")this[G0]=H[G0].bind(H)}return this},n.prototype[j]=function(){return F7(this)},n.prototype.iterator=function(H){if(H!==void 0)J0(H,"options");return F7(this,H)};function F7(H,w){if(typeof H.read!=="function")H=n.wrap(H,{objectMode:!0});let r=Cq(H,w);return r.stream=H,r}async function*Cq(H,w){let r=K0;function B0(q2){if(this===H)r(),r=K0;else r=q2}H.on("readable",B0);let G0,c0=z(H,{writable:!1},(q2)=>{G0=q2?E(G0,q2):null,r(),r=K0});try{while(!0){let q2=H.destroyed?null:H.read();if(q2!==null)yield q2;else if(G0)throw G0;else if(G0===null)return;else await new V(B0)}}catch(q2){throw G0=E(G0,q2),G0}finally{if((G0||(w===null||w===void 0?void 0:w.destroyOnReturn)!==!1)&&(G0===void 0||H._readableState.autoDestroy))Z.destroyer(H,null);else H.off("readable",B0),c0()}}U(n.prototype,{readable:{__proto__:null,get(){let H=this._readableState;return!!H&&H.readable!==!1&&!H.destroyed&&!H.errorEmitted&&!H.endEmitted},set(H){if(this._readableState)this._readableState.readable=!!H}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(H){if(this._readableState)this._readableState.flowing=H}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(H){if(!this._readableState)return;this._readableState.destroyed=H}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),U(q0.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[U0]!==!1},set(H){this[U0]=!!H}}}),n._fromList=w7;function w7(H,w){if(w.length===0)return null;let r;if(w.objectMode)r=w.buffer.shift();else if(!H||H>=w.length){if(w.decoder)r=w.buffer.join("");else if(w.buffer.length===1)r=w.buffer.first();else r=w.buffer.concat(w.length);w.buffer.clear()}else r=w.buffer.consume(H,w.decoder);return r}function K5(H){let w=H._readableState;if(A("endReadable",w.endEmitted),!w.endEmitted)w.ended=!0,J.nextTick(Rq,w,H)}function Rq(H,w){if(A("endReadableNT",H.endEmitted,H.length),!H.errored&&!H.closeEmitted&&!H.endEmitted&&H.length===0){if(H.endEmitted=!0,w.emit("end"),w.writable&&w.allowHalfOpen===!1)J.nextTick(Iq,w);else if(H.autoDestroy){let r=w._writableState;if(!r||r.autoDestroy&&(r.finished||r.writable===!1))w.destroy()}}}function Iq(H){if(H.writable&&!H.writableEnded&&!H.destroyed)H.end()}n.from=function(H,w){return u(n,H,w)};var j5;function L7(){if(j5===void 0)j5={};return j5}n.fromWeb=function(H,w){return L7().newStreamReadableFromReadableStream(H,w)},n.toWeb=function(H,w){return L7().newReadableStreamFromStreamReadable(H,w)},n.wrap=function(H,w){var r,B0;return new n({objectMode:(r=(B0=H.readableObjectMode)!==null&&B0!==void 0?B0:H.objectMode)!==null&&r!==void 0?r:!0,...w,destroy(G0,c0){Z.destroyer(H,G0),c0(G0)}}).wrap(H)}}),k5=S0(($,Q)=>{var J=N1(),{ArrayPrototypeSlice:q,Error:X,FunctionPrototypeSymbolHasInstance:Y,ObjectDefineProperty:B,ObjectDefineProperties:U,ObjectSetPrototypeOf:W,StringPrototypeToLowerCase:G,Symbol:V,SymbolHasInstance:F}=T0();Q.exports=J0,J0.WritableState=k;var{EventEmitter:M}=(k6(),X2(v6)),j=v5().Stream,{Buffer:f}=(y2(),X2(f2)),T=p1(),{addAbortSignal:D}=w8(),{getHighWaterMark:P,getDefaultHighWaterMark:K}=L8(),{ERR_INVALID_ARG_TYPE:L,ERR_METHOD_NOT_IMPLEMENTED:z,ERR_MULTIPLE_CALLBACK:A,ERR_STREAM_CANNOT_PIPE:_,ERR_STREAM_DESTROYED:Z,ERR_STREAM_ALREADY_FINISHED:l,ERR_STREAM_NULL_VALUES:S,ERR_STREAM_WRITE_AFTER_END:E,ERR_UNKNOWN_ENCODING:C}=i0().codes,{errorOrDestroy:O}=T;W(J0.prototype,j.prototype),W(J0,j);function g(){}var y=V("kOnFinished");function k(R,v,h){if(typeof h!=="boolean")h=v instanceof _2();if(this.objectMode=!!(R&&R.objectMode),h)this.objectMode=this.objectMode||!!(R&&R.writableObjectMode);this.highWaterMark=R?P(this,R,"writableHighWaterMark",h):K(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let a=!!(R&&R.decodeStrings===!1);this.decodeStrings=!a,this.defaultEncoding=R&&R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=N.bind(void 0,v),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,s(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!R||R.emitClose!==!1,this.autoDestroy=!R||R.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[y]=[]}function s(R){R.buffered=[],R.bufferedIndex=0,R.allBuffers=!0,R.allNoop=!0}k.prototype.getBuffer=function(){return q(this.buffered,this.bufferedIndex)},B(k.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function J0(R){let v=this instanceof _2();if(!v&&!Y(J0,this))return new J0(R);if(this._writableState=new k(R,this,v),R){if(typeof R.write==="function")this._write=R.write;if(typeof R.writev==="function")this._writev=R.writev;if(typeof R.destroy==="function")this._destroy=R.destroy;if(typeof R.final==="function")this._final=R.final;if(typeof R.construct==="function")this._construct=R.construct;if(R.signal)D(R.signal,this)}j.call(this,R),T.construct(this,()=>{let h=this._writableState;if(!h.writing)W0(this,h);c(this,h)})}B(J0,F,{__proto__:null,value:function(R){if(Y(this,R))return!0;if(this!==J0)return!1;return R&&R._writableState instanceof k}}),J0.prototype.pipe=function(){O(this,new _)};function U0(R,v,h,a){let Q0=R._writableState;if(typeof h==="function")a=h,h=Q0.defaultEncoding;else{if(!h)h=Q0.defaultEncoding;else if(h!=="buffer"&&!f.isEncoding(h))throw new C(h);if(typeof a!=="function")a=g}if(v===null)throw new S;else if(!Q0.objectMode)if(typeof v==="string"){if(Q0.decodeStrings!==!1)v=f.from(v,h),h="buffer"}else if(v instanceof f)h="buffer";else if(j._isUint8Array(v))v=j._uint8ArrayToBuffer(v),h="buffer";else throw new L("chunk",["string","Buffer","Uint8Array"],v);let e;if(Q0.ending)e=new E;else if(Q0.destroyed)e=new Z("write");if(e)return J.nextTick(a,e),O(R,e,!0),e;return Q0.pendingcb++,O0(R,Q0,v,h,a)}J0.prototype.write=function(R,v,h){return U0(this,R,v,h)===!0},J0.prototype.cork=function(){this._writableState.corked++},J0.prototype.uncork=function(){let R=this._writableState;if(R.corked){if(R.corked--,!R.writing)W0(this,R)}},J0.prototype.setDefaultEncoding=function(R){if(typeof R==="string")R=G(R);if(!f.isEncoding(R))throw new C(R);return this._writableState.defaultEncoding=R,this};function O0(R,v,h,a,Q0){let e=v.objectMode?1:h.length;v.length+=e;let I=v.length<v.highWaterMark;if(!I)v.needDrain=!0;if(v.writing||v.corked||v.errored||!v.constructed){if(v.buffered.push({chunk:h,encoding:a,callback:Q0}),v.allBuffers&&a!=="buffer")v.allBuffers=!1;if(v.allNoop&&Q0!==g)v.allNoop=!1}else v.writelen=e,v.writecb=Q0,v.writing=!0,v.sync=!0,R._write(h,a,v.onwrite),v.sync=!1;return I&&!v.errored&&!v.destroyed}function u(R,v,h,a,Q0,e,I){if(v.writelen=a,v.writecb=I,v.writing=!0,v.sync=!0,v.destroyed)v.onwrite(new Z("write"));else if(h)R._writev(Q0,v.onwrite);else R._write(Q0,e,v.onwrite);v.sync=!1}function K0(R,v,h,a){--v.pendingcb,a(h),m(v),O(R,h)}function N(R,v){let h=R._writableState,a=h.sync,Q0=h.writecb;if(typeof Q0!=="function"){O(R,new A);return}if(h.writing=!1,h.writecb=null,h.length-=h.writelen,h.writelen=0,v){if(v.stack,!h.errored)h.errored=v;if(R._readableState&&!R._readableState.errored)R._readableState.errored=v;if(a)J.nextTick(K0,R,h,v,Q0);else K0(R,h,v,Q0)}else{if(h.buffered.length>h.bufferedIndex)W0(R,h);if(a)if(h.afterWriteTickInfo!==null&&h.afterWriteTickInfo.cb===Q0)h.afterWriteTickInfo.count++;else h.afterWriteTickInfo={count:1,cb:Q0,stream:R,state:h},J.nextTick(d,h.afterWriteTickInfo);else Y0(R,h,1,Q0)}}function d({stream:R,state:v,count:h,cb:a}){return v.afterWriteTickInfo=null,Y0(R,v,h,a)}function Y0(R,v,h,a){if(!v.ending&&!R.destroyed&&v.length===0&&v.needDrain)v.needDrain=!1,R.emit("drain");while(h-- >0)v.pendingcb--,a();if(v.destroyed)m(v);c(R,v)}function m(R){if(R.writing)return;for(let Q0=R.bufferedIndex;Q0<R.buffered.length;++Q0){var v;let{chunk:e,callback:I}=R.buffered[Q0],i=R.objectMode?1:e.length;R.length-=i,I((v=R.errored)!==null&&v!==void 0?v:new Z("write"))}let h=R[y].splice(0);for(let Q0=0;Q0<h.length;Q0++){var a;h[Q0]((a=R.errored)!==null&&a!==void 0?a:new Z("end"))}s(R)}function W0(R,v){if(v.corked||v.bufferProcessing||v.destroyed||!v.constructed)return;let{buffered:h,bufferedIndex:a,objectMode:Q0}=v,e=h.length-a;if(!e)return;let I=a;if(v.bufferProcessing=!0,e>1&&R._writev){v.pendingcb-=e-1;let i=v.allNoop?g:(n)=>{for(let j0=I;j0<h.length;++j0)h[j0].callback(n)},q0=v.allNoop&&I===0?h:q(h,I);q0.allBuffers=v.allBuffers,u(R,v,!0,v.length,q0,"",i),s(v)}else{do{let{chunk:i,encoding:q0,callback:n}=h[I];h[I++]=null;let j0=Q0?1:i.length;u(R,v,!1,j0,i,q0,n)}while(I<h.length&&!v.writing);if(I===h.length)s(v);else if(I>256)h.splice(0,I),v.bufferedIndex=0;else v.bufferedIndex=I}v.bufferProcessing=!1}J0.prototype._write=function(R,v,h){if(this._writev)this._writev([{chunk:R,encoding:v}],h);else throw new z("_write()")},J0.prototype._writev=null,J0.prototype.end=function(R,v,h){let a=this._writableState;if(typeof R==="function")h=R,R=null,v=null;else if(typeof v==="function")h=v,v=null;let Q0;if(R!==null&&R!==void 0){let e=U0(this,R,v);if(e instanceof X)Q0=e}if(a.corked)a.corked=1,this.uncork();if(Q0);else if(!a.errored&&!a.ending)a.ending=!0,c(this,a,!0),a.ended=!0;else if(a.finished)Q0=new l("end");else if(a.destroyed)Q0=new Z("end");if(typeof h==="function")if(Q0||a.finished)J.nextTick(h,Q0);else a[y].push(h);return this};function M0(R){return R.ending&&!R.destroyed&&R.constructed&&R.length===0&&!R.errored&&R.buffered.length===0&&!R.finished&&!R.writing&&!R.errorEmitted&&!R.closeEmitted}function C0(R,v){let h=!1;function a(Q0){if(h){O(R,Q0!==null&&Q0!==void 0?Q0:A());return}if(h=!0,v.pendingcb--,Q0){let e=v[y].splice(0);for(let I=0;I<e.length;I++)e[I](Q0);O(R,Q0,v.sync)}else if(M0(v))v.prefinished=!0,R.emit("prefinish"),v.pendingcb++,J.nextTick(p,R,v)}v.sync=!0,v.pendingcb++;try{R._final(a)}catch(Q0){a(Q0)}v.sync=!1}function N0(R,v){if(!v.prefinished&&!v.finalCalled)if(typeof R._final==="function"&&!v.destroyed)v.finalCalled=!0,C0(R,v);else v.prefinished=!0,R.emit("prefinish")}function c(R,v,h){if(M0(v)){if(N0(R,v),v.pendingcb===0){if(h)v.pendingcb++,J.nextTick((a,Q0)=>{if(M0(Q0))p(a,Q0);else Q0.pendingcb--},R,v);else if(M0(v))v.pendingcb++,p(R,v)}}}function p(R,v){v.pendingcb--,v.finished=!0;let h=v[y].splice(0);for(let a=0;a<h.length;a++)h[a]();if(R.emit("finish"),v.autoDestroy){let a=R._readableState;if(!a||a.autoDestroy&&(a.endEmitted||a.readable===!1))R.destroy()}}U(J0.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(R){if(this._writableState)this._writableState.destroyed=R}},writable:{__proto__:null,get(){let R=this._writableState;return!!R&&R.writable!==!1&&!R.destroyed&&!R.errored&&!R.ending&&!R.ended},set(R){if(this._writableState)this._writableState.writable=!!R}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let R=this._writableState;if(!R)return!1;return!R.destroyed&&!R.ending&&R.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var t=T.destroy;J0.prototype.destroy=function(R,v){let h=this._writableState;if(!h.destroyed&&(h.bufferedIndex<h.buffered.length||h[y].length))J.nextTick(m,h);return t.call(this,R,v),this},J0.prototype._undestroy=T.undestroy,J0.prototype._destroy=function(R,v){v(R)},J0.prototype[M.captureRejectionSymbol]=function(R){this.destroy(R)};var L0;function z0(){if(L0===void 0)L0={};return L0}J0.fromWeb=function(R,v){return z0().newStreamWritableFromWritableStream(R,v)},J0.toWeb=function(R){return z0().newWritableStreamFromStreamWritable(R)}}),xX=S0(($,Q)=>{var J=N1(),q=(y2(),X2(f2)),{isReadable:X,isWritable:Y,isIterable:B,isNodeStream:U,isReadableNodeStream:W,isWritableNodeStream:G,isDuplexNodeStream:V,isReadableStream:F,isWritableStream:M}=b2(),j=r2(),{AbortError:f,codes:{ERR_INVALID_ARG_TYPE:T,ERR_INVALID_RETURN_VALUE:D}}=i0(),{destroyer:P}=p1(),K=_2(),L=z8(),z=k5(),{createDeferredPromise:A}=a0(),_=V$(),Z=globalThis.Blob||q.Blob,l=typeof Z<"u"?function(y){return y instanceof Z}:function(y){return!1},S=globalThis.AbortController||Z6().AbortController,{FunctionPrototypeCall:E}=T0();class C extends K{constructor(y){super(y);if((y===null||y===void 0?void 0:y.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((y===null||y===void 0?void 0:y.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}Q.exports=function y(k,s){if(V(k))return k;if(W(k))return g({readable:k});if(G(k))return g({writable:k});if(U(k))return g({writable:!1,readable:!1});if(F(k))return g({readable:L.fromWeb(k)});if(M(k))return g({writable:z.fromWeb(k)});if(typeof k==="function"){let{value:U0,write:O0,final:u,destroy:K0}=O(k);if(B(U0))return _(C,U0,{objectMode:!0,write:O0,final:u,destroy:K0});let N=U0===null||U0===void 0?void 0:U0.then;if(typeof N==="function"){let d,Y0=E(N,U0,(m)=>{if(m!=null)throw new D("nully","body",m)},(m)=>{P(d,m)});return d=new C({objectMode:!0,readable:!1,write:O0,final(m){u(async()=>{try{await Y0,J.nextTick(m,null)}catch(W0){J.nextTick(m,W0)}})},destroy:K0})}throw new D("Iterable, AsyncIterable or AsyncFunction",s,U0)}if(l(k))return y(k.arrayBuffer());if(B(k))return _(C,k,{objectMode:!0,writable:!1});if(F(k===null||k===void 0?void 0:k.readable)&&M(k===null||k===void 0?void 0:k.writable))return C.fromWeb(k);if(typeof(k===null||k===void 0?void 0:k.writable)==="object"||typeof(k===null||k===void 0?void 0:k.readable)==="object"){let U0=k!==null&&k!==void 0&&k.readable?W(k===null||k===void 0?void 0:k.readable)?k===null||k===void 0?void 0:k.readable:y(k.readable):void 0,O0=k!==null&&k!==void 0&&k.writable?G(k===null||k===void 0?void 0:k.writable)?k===null||k===void 0?void 0:k.writable:y(k.writable):void 0;return g({readable:U0,writable:O0})}let J0=k===null||k===void 0?void 0:k.then;if(typeof J0==="function"){let U0;return E(J0,k,(O0)=>{if(O0!=null)U0.push(O0);U0.push(null)},(O0)=>{P(U0,O0)}),U0=new C({objectMode:!0,writable:!1,read(){}})}throw new T(s,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],k)};function O(y){let{promise:k,resolve:s}=A(),J0=new S,U0=J0.signal;return{value:y(async function*(){while(!0){let O0=k;k=null;let{chunk:u,done:K0,cb:N}=await O0;if(J.nextTick(N),K0)return;if(U0.aborted)throw new f(void 0,{cause:U0.reason});({promise:k,resolve:s}=A()),yield u}}(),{signal:U0}),write(O0,u,K0){let N=s;s=null,N({chunk:O0,done:!1,cb:K0})},final(O0){let u=s;s=null,u({done:!0,cb:O0})},destroy(O0,u){J0.abort(),u(O0)}}}function g(y){let k=y.readable&&typeof y.readable.read!=="function"?L.wrap(y.readable):y.readable,s=y.writable,J0=!!X(k),U0=!!Y(s),O0,u,K0,N,d;function Y0(m){let W0=N;if(N=null,W0)W0(m);else if(m)d.destroy(m)}if(d=new C({readableObjectMode:!!(k!==null&&k!==void 0&&k.readableObjectMode),writableObjectMode:!!(s!==null&&s!==void 0&&s.writableObjectMode),readable:J0,writable:U0}),U0)j(s,(m)=>{if(U0=!1,m)P(k,m);Y0(m)}),d._write=function(m,W0,M0){if(s.write(m,W0))M0();else O0=M0},d._final=function(m){s.end(),u=m},s.on("drain",function(){if(O0){let m=O0;O0=null,m()}}),s.on("finish",function(){if(u){let m=u;u=null,m()}});if(J0)j(k,(m)=>{if(J0=!1,m)P(k,m);Y0(m)}),k.on("readable",function(){if(K0){let m=K0;K0=null,m()}}),k.on("end",function(){d.push(null)}),d._read=function(){while(!0){let m=k.read();if(m===null){K0=d._read;return}if(!d.push(m))return}};return d._destroy=function(m,W0){if(!m&&N!==null)m=new f;if(K0=null,O0=null,u=null,N===null)W0(m);else N=W0,P(s,m),P(k,m)},d}}),_2=S0(($,Q)=>{var{ObjectDefineProperties:J,ObjectGetOwnPropertyDescriptor:q,ObjectKeys:X,ObjectSetPrototypeOf:Y}=T0();Q.exports=W;var B=z8(),U=k5();Y(W.prototype,B.prototype),Y(W,B);{let M=X(U.prototype);for(let j=0;j<M.length;j++){let f=M[j];if(!W.prototype[f])W.prototype[f]=U.prototype[f]}}function W(M){if(!(this instanceof W))return new W(M);if(B.call(this,M),U.call(this,M),M){if(this.allowHalfOpen=M.allowHalfOpen!==!1,M.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(M.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}J(W.prototype,{writable:{__proto__:null,...q(U.prototype,"writable")},writableHighWaterMark:{__proto__:null,...q(U.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...q(U.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...q(U.prototype,"writableBuffer")},writableLength:{__proto__:null,...q(U.prototype,"writableLength")},writableFinished:{__proto__:null,...q(U.prototype,"writableFinished")},writableCorked:{__proto__:null,...q(U.prototype,"writableCorked")},writableEnded:{__proto__:null,...q(U.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...q(U.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(M){if(this._readableState&&this._writableState)this._readableState.destroyed=M,this._writableState.destroyed=M}}});var G;function V(){if(G===void 0)G={};return G}W.fromWeb=function(M,j){return V().newStreamDuplexFromReadableWritablePair(M,j)},W.toWeb=function(M){return V().newReadableWritablePairFromDuplex(M)};var F;W.from=function(M){if(!F)F=xX();return F(M,"body")}}),K$=S0(($,Q)=>{var{ObjectSetPrototypeOf:J,Symbol:q}=T0();Q.exports=W;var{ERR_METHOD_NOT_IMPLEMENTED:X}=i0().codes,Y=_2(),{getHighWaterMark:B}=L8();J(W.prototype,Y.prototype),J(W,Y);var U=q("kCallback");function W(F){if(!(this instanceof W))return new W(F);let M=F?B(this,F,"readableHighWaterMark",!0):null;if(M===0)F={...F,highWaterMark:null,readableHighWaterMark:M,writableHighWaterMark:F.writableHighWaterMark||0};if(Y.call(this,F),this._readableState.sync=!1,this[U]=null,F){if(typeof F.transform==="function")this._transform=F.transform;if(typeof F.flush==="function")this._flush=F.flush}this.on("prefinish",V)}function G(F){if(typeof this._flush==="function"&&!this.destroyed)this._flush((M,j)=>{if(M){if(F)F(M);else this.destroy(M);return}if(j!=null)this.push(j);if(this.push(null),F)F()});else if(this.push(null),F)F()}function V(){if(this._final!==G)G.call(this)}W.prototype._final=G,W.prototype._transform=function(F,M,j){throw new X("_transform()")},W.prototype._write=function(F,M,j){let f=this._readableState,T=this._writableState,D=f.length;this._transform(F,M,(P,K)=>{if(P){j(P);return}if(K!=null)this.push(K);if(T.ended||D===f.length||f.length<f.highWaterMark)j();else this[U]=j})},W.prototype._read=function(){if(this[U]){let F=this[U];this[U]=null,F()}}}),j$=S0(($,Q)=>{var{ObjectSetPrototypeOf:J}=T0();Q.exports=X;var q=K$();J(X.prototype,q.prototype),J(X,q);function X(Y){if(!(this instanceof X))return new X(Y);q.call(this,Y)}X.prototype._transform=function(Y,B,U){U(null,Y)}}),Z5=S0(($,Q)=>{var J=N1(),{ArrayIsArray:q,Promise:X,SymbolAsyncIterator:Y,SymbolDispose:B}=T0(),U=r2(),{once:W}=a0(),G=p1(),V=_2(),{aggregateTwoErrors:F,codes:{ERR_INVALID_ARG_TYPE:M,ERR_INVALID_RETURN_VALUE:j,ERR_MISSING_ARGS:f,ERR_STREAM_DESTROYED:T,ERR_STREAM_PREMATURE_CLOSE:D},AbortError:P}=i0(),{validateFunction:K,validateAbortSignal:L}=T6(),{isIterable:z,isReadable:A,isReadableNodeStream:_,isNodeStream:Z,isTransformStream:l,isWebStream:S,isReadableStream:E,isReadableFinished:C}=b2(),O=globalThis.AbortController||Z6().AbortController,g,y,k;function s(m,W0,M0){let C0=!1;m.on("close",()=>{C0=!0});let N0=U(m,{readable:W0,writable:M0},(c)=>{C0=!c});return{destroy:(c)=>{if(C0)return;C0=!0,G.destroyer(m,c||new T("pipe"))},cleanup:N0}}function J0(m){return K(m[m.length-1],"streams[stream.length - 1]"),m.pop()}function U0(m){if(z(m))return m;else if(_(m))return O0(m);throw new M("val",["Readable","Iterable","AsyncIterable"],m)}async function*O0(m){if(!y)y=z8();yield*y.prototype[Y].call(m)}async function u(m,W0,M0,{end:C0}){let N0,c=null,p=(z0)=>{if(z0)N0=z0;if(c){let R=c;c=null,R()}},t=()=>new X((z0,R)=>{if(N0)R(N0);else c=()=>{if(N0)R(N0);else z0()}});W0.on("drain",p);let L0=U(W0,{readable:!1},p);try{if(W0.writableNeedDrain)await t();for await(let z0 of m)if(!W0.write(z0))await t();if(C0)W0.end(),await t();M0()}catch(z0){M0(N0!==z0?F(N0,z0):z0)}finally{L0(),W0.off("drain",p)}}async function K0(m,W0,M0,{end:C0}){if(l(W0))W0=W0.writable;let N0=W0.getWriter();try{for await(let c of m)await N0.ready,N0.write(c).catch(()=>{});if(await N0.ready,C0)await N0.close();M0()}catch(c){try{await N0.abort(c),M0(c)}catch(p){M0(p)}}}function N(...m){return d(m,W(J0(m)))}function d(m,W0,M0){if(m.length===1&&q(m[0]))m=m[0];if(m.length<2)throw new f("streams");let C0=new O,N0=C0.signal,c=M0===null||M0===void 0?void 0:M0.signal,p=[];L(c,"options.signal");function t(){Q0(new P)}k=k||a0().addAbortListener;let L0;if(c)L0=k(c,t);let z0,R,v=[],h=0;function a(n){Q0(n,--h===0)}function Q0(n,j0){var E0;if(n&&(!z0||z0.code==="ERR_STREAM_PREMATURE_CLOSE"))z0=n;if(!z0&&!j0)return;while(v.length)v.shift()(z0);if((E0=L0)===null||E0===void 0||E0[B](),C0.abort(),j0){if(!z0)p.forEach((Q2)=>Q2());J.nextTick(W0,z0,R)}}let e;for(let n=0;n<m.length;n++){let j0=m[n],E0=n<m.length-1,Q2=n>0,J2=E0||(M0===null||M0===void 0?void 0:M0.end)!==!1,H1=n===m.length-1;if(Z(j0)){let u0=function(o0){if(o0&&o0.name!=="AbortError"&&o0.code!=="ERR_STREAM_PREMATURE_CLOSE")a(o0)};var I=u0;if(J2){let{destroy:o0,cleanup:h1}=s(j0,E0,Q2);if(v.push(o0),A(j0)&&H1)p.push(h1)}if(j0.on("error",u0),A(j0)&&H1)p.push(()=>{j0.removeListener("error",u0)})}if(n===0)if(typeof j0==="function"){if(e=j0({signal:N0}),!z(e))throw new j("Iterable, AsyncIterable or Stream","source",e)}else if(z(j0)||_(j0)||l(j0))e=j0;else e=V.from(j0);else if(typeof j0==="function"){if(l(e)){var i;e=U0((i=e)===null||i===void 0?void 0:i.readable)}else e=U0(e);if(e=j0(e,{signal:N0}),E0){if(!z(e,!0))throw new j("AsyncIterable",`transform[${n-1}]`,e)}else{var q0;if(!g)g=j$();let u0=new g({objectMode:!0}),o0=(q0=e)===null||q0===void 0?void 0:q0.then;if(typeof o0==="function")h++,o0.call(e,(O2)=>{if(R=O2,O2!=null)u0.write(O2);if(J2)u0.end();J.nextTick(a)},(O2)=>{u0.destroy(O2),J.nextTick(a,O2)});else if(z(e,!0))h++,u(e,u0,a,{end:J2});else if(E(e)||l(e)){let O2=e.readable||e;h++,u(O2,u0,a,{end:J2})}else throw new j("AsyncIterable or Promise","destination",e);e=u0;let{destroy:h1,cleanup:m1}=s(e,!1,!0);if(v.push(h1),H1)p.push(m1)}}else if(Z(j0)){if(_(e)){h+=2;let u0=Y0(e,j0,a,{end:J2});if(A(j0)&&H1)p.push(u0)}else if(l(e)||E(e)){let u0=e.readable||e;h++,u(u0,j0,a,{end:J2})}else if(z(e))h++,u(e,j0,a,{end:J2});else throw new M("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],e);e=j0}else if(S(j0)){if(_(e))h++,K0(U0(e),j0,a,{end:J2});else if(E(e)||z(e))h++,K0(e,j0,a,{end:J2});else if(l(e))h++,K0(e.readable,j0,a,{end:J2});else throw new M("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],e);e=j0}else e=V.from(j0)}if(N0!==null&&N0!==void 0&&N0.aborted||c!==null&&c!==void 0&&c.aborted)J.nextTick(t);return e}function Y0(m,W0,M0,{end:C0}){let N0=!1;if(W0.on("close",()=>{if(!N0)M0(new D)}),m.pipe(W0,{end:!1}),C0){let p=function(){N0=!0,W0.end()};var c=p;if(C(m))J.nextTick(p);else m.once("end",p)}else M0();return U(m,{readable:!0,writable:!1},(p)=>{let t=m._readableState;if(p&&p.code==="ERR_STREAM_PREMATURE_CLOSE"&&t&&t.ended&&!t.errored&&!t.errorEmitted)m.once("end",M0).once("error",M0);else M0(p)}),U(W0,{readable:!1,writable:!0},M0)}Q.exports={pipelineImpl:d,pipeline:N}}),H$=S0(($,Q)=>{var{pipeline:J}=Z5(),q=_2(),{destroyer:X}=p1(),{isNodeStream:Y,isReadable:B,isWritable:U,isWebStream:W,isTransformStream:G,isWritableStream:V,isReadableStream:F}=b2(),{AbortError:M,codes:{ERR_INVALID_ARG_VALUE:j,ERR_MISSING_ARGS:f}}=i0(),T=r2();Q.exports=function(...D){if(D.length===0)throw new f("streams");if(D.length===1)return q.from(D[0]);let P=[...D];if(typeof D[0]==="function")D[0]=q.from(D[0]);if(typeof D[D.length-1]==="function"){let O=D.length-1;D[O]=q.from(D[O])}for(let O=0;O<D.length;++O){if(!Y(D[O])&&!W(D[O]))continue;if(O<D.length-1&&!(B(D[O])||F(D[O])||G(D[O])))throw new j(`streams[${O}]`,P[O],"must be readable");if(O>0&&!(U(D[O])||V(D[O])||G(D[O])))throw new j(`streams[${O}]`,P[O],"must be writable")}let K,L,z,A,_;function Z(O){let g=A;if(A=null,g)g(O);else if(O)_.destroy(O);else if(!C&&!E)_.destroy()}let l=D[0],S=J(D,Z),E=!!(U(l)||V(l)||G(l)),C=!!(B(S)||F(S)||G(S));if(_=new q({writableObjectMode:!!(l!==null&&l!==void 0&&l.writableObjectMode),readableObjectMode:!!(S!==null&&S!==void 0&&S.readableObjectMode),writable:E,readable:C}),E){if(Y(l))_._write=function(g,y,k){if(l.write(g,y))k();else K=k},_._final=function(g){l.end(),L=g},l.on("drain",function(){if(K){let g=K;K=null,g()}});else if(W(l)){let g=(G(l)?l.writable:l).getWriter();_._write=async function(y,k,s){try{await g.ready,g.write(y).catch(()=>{}),s()}catch(J0){s(J0)}},_._final=async function(y){try{await g.ready,g.close().catch(()=>{}),L=y}catch(k){y(k)}}}let O=G(S)?S.readable:S;T(O,()=>{if(L){let g=L;L=null,g()}})}if(C){if(Y(S))S.on("readable",function(){if(z){let O=z;z=null,O()}}),S.on("end",function(){_.push(null)}),_._read=function(){while(!0){let O=S.read();if(O===null){z=_._read;return}if(!_.push(O))return}};else if(W(S)){let O=(G(S)?S.readable:S).getReader();_._read=async function(){while(!0)try{let{value:g,done:y}=await O.read();if(!_.push(g))return;if(y){_.push(null);return}}catch{return}}}}return _._destroy=function(O,g){if(!O&&A!==null)O=new M;if(z=null,K=null,L=null,A===null)g(O);else if(A=g,Y(S))X(S,O)},_}}),fX=S0(($,Q)=>{var J=globalThis.AbortController||Z6().AbortController,{codes:{ERR_INVALID_ARG_VALUE:q,ERR_INVALID_ARG_TYPE:X,ERR_MISSING_ARGS:Y,ERR_OUT_OF_RANGE:B},AbortError:U}=i0(),{validateAbortSignal:W,validateInteger:G,validateObject:V}=T6(),F=T0().Symbol("kWeak"),M=T0().Symbol("kResistStopPropagation"),{finished:j}=r2(),f=H$(),{addAbortSignalNoValidate:T}=w8(),{isWritable:D,isNodeStream:P}=b2(),{deprecate:K}=a0(),{ArrayPrototypePush:L,Boolean:z,MathFloor:A,Number:_,NumberIsNaN:Z,Promise:l,PromiseReject:S,PromiseResolve:E,PromisePrototypeThen:C,Symbol:O}=T0(),g=O("kEmpty"),y=O("kEof");function k(c,p){if(p!=null)V(p,"options");if((p===null||p===void 0?void 0:p.signal)!=null)W(p.signal,"options.signal");if(P(c)&&!D(c))throw new q("stream",c,"must be writable");let t=f(this,c);if(p!==null&&p!==void 0&&p.signal)T(p.signal,t);return t}function s(c,p){if(typeof c!=="function")throw new X("fn",["Function","AsyncFunction"],c);if(p!=null)V(p,"options");if((p===null||p===void 0?void 0:p.signal)!=null)W(p.signal,"options.signal");let t=1;if((p===null||p===void 0?void 0:p.concurrency)!=null)t=A(p.concurrency);let L0=t-1;if((p===null||p===void 0?void 0:p.highWaterMark)!=null)L0=A(p.highWaterMark);return G(t,"options.concurrency",1),G(L0,"options.highWaterMark",0),L0+=t,async function*(){let z0=a0().AbortSignalAny([p===null||p===void 0?void 0:p.signal].filter(z)),R=this,v=[],h={signal:z0},a,Q0,e=!1,I=0;function i(){e=!0,q0()}function q0(){I-=1,n()}function n(){if(Q0&&!e&&I<t&&v.length<L0)Q0(),Q0=null}async function j0(){try{for await(let E0 of R){if(e)return;if(z0.aborted)throw new U;try{if(E0=c(E0,h),E0===g)continue;E0=E(E0)}catch(Q2){E0=S(Q2)}if(I+=1,C(E0,q0,i),v.push(E0),a)a(),a=null;if(!e&&(v.length>=L0||I>=t))await new l((Q2)=>{Q0=Q2})}v.push(y)}catch(E0){let Q2=S(E0);C(Q2,q0,i),v.push(Q2)}finally{if(e=!0,a)a(),a=null}}j0();try{while(!0){while(v.length>0){let E0=await v[0];if(E0===y)return;if(z0.aborted)throw new U;if(E0!==g)yield E0;v.shift(),n()}await new l((E0)=>{a=E0})}}finally{if(e=!0,Q0)Q0(),Q0=null}}.call(this)}function J0(c=void 0){if(c!=null)V(c,"options");if((c===null||c===void 0?void 0:c.signal)!=null)W(c.signal,"options.signal");return async function*(){let p=0;for await(let L0 of this){var t;if(c!==null&&c!==void 0&&(t=c.signal)!==null&&t!==void 0&&t.aborted)throw new U({cause:c.signal.reason});yield[p++,L0]}}.call(this)}async function U0(c,p=void 0){for await(let t of N.call(this,c,p))return!0;return!1}async function O0(c,p=void 0){if(typeof c!=="function")throw new X("fn",["Function","AsyncFunction"],c);return!await U0.call(this,async(...t)=>{return!await c(...t)},p)}async function u(c,p){for await(let t of N.call(this,c,p))return t;return}async function K0(c,p){if(typeof c!=="function")throw new X("fn",["Function","AsyncFunction"],c);async function t(L0,z0){return await c(L0,z0),g}for await(let L0 of s.call(this,t,p));}function N(c,p){if(typeof c!=="function")throw new X("fn",["Function","AsyncFunction"],c);async function t(L0,z0){if(await c(L0,z0))return L0;return g}return s.call(this,t,p)}class d extends Y{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function Y0(c,p,t){var L0;if(typeof c!=="function")throw new X("reducer",["Function","AsyncFunction"],c);if(t!=null)V(t,"options");if((t===null||t===void 0?void 0:t.signal)!=null)W(t.signal,"options.signal");let z0=arguments.length>1;if(t!==null&&t!==void 0&&(L0=t.signal)!==null&&L0!==void 0&&L0.aborted){let Q0=new U(void 0,{cause:t.signal.reason});throw this.once("error",()=>{}),await j(this.destroy(Q0)),Q0}let R=new J,v=R.signal;if(t!==null&&t!==void 0&&t.signal){let Q0={once:!0,[F]:this,[M]:!0};t.signal.addEventListener("abort",()=>R.abort(),Q0)}let h=!1;try{for await(let Q0 of this){var a;if(h=!0,t!==null&&t!==void 0&&(a=t.signal)!==null&&a!==void 0&&a.aborted)throw new U;if(!z0)p=Q0,z0=!0;else p=await c(p,Q0,{signal:v})}if(!h&&!z0)throw new d}finally{R.abort()}return p}async function m(c){if(c!=null)V(c,"options");if((c===null||c===void 0?void 0:c.signal)!=null)W(c.signal,"options.signal");let p=[];for await(let L0 of this){var t;if(c!==null&&c!==void 0&&(t=c.signal)!==null&&t!==void 0&&t.aborted)throw new U(void 0,{cause:c.signal.reason});L(p,L0)}return p}function W0(c,p){let t=s.call(this,c,p);return async function*(){for await(let L0 of t)yield*L0}.call(this)}function M0(c){if(c=_(c),Z(c))return 0;if(c<0)throw new B("number",">= 0",c);return c}function C0(c,p=void 0){if(p!=null)V(p,"options");if((p===null||p===void 0?void 0:p.signal)!=null)W(p.signal,"options.signal");return c=M0(c),async function*(){var t;if(p!==null&&p!==void 0&&(t=p.signal)!==null&&t!==void 0&&t.aborted)throw new U;for await(let z0 of this){var L0;if(p!==null&&p!==void 0&&(L0=p.signal)!==null&&L0!==void 0&&L0.aborted)throw new U;if(c--<=0)yield z0}}.call(this)}function N0(c,p=void 0){if(p!=null)V(p,"options");if((p===null||p===void 0?void 0:p.signal)!=null)W(p.signal,"options.signal");return c=M0(c),async function*(){var t;if(p!==null&&p!==void 0&&(t=p.signal)!==null&&t!==void 0&&t.aborted)throw new U;for await(let z0 of this){var L0;if(p!==null&&p!==void 0&&(L0=p.signal)!==null&&L0!==void 0&&L0.aborted)throw new U;if(c-- >0)yield z0;if(c<=0)return}}.call(this)}Q.exports.streamReturningOperators={asIndexedPairs:K(J0,"readable.asIndexedPairs will be removed in a future version."),drop:C0,filter:N,flatMap:W0,map:s,take:N0,compose:k},Q.exports.promiseReturningOperators={every:O0,forEach:K0,reduce:Y0,toArray:m,some:U0,find:u}}),M$=S0(($,Q)=>{var{ArrayPrototypePop:J,Promise:q}=T0(),{isIterable:X,isNodeStream:Y,isWebStream:B}=b2(),{pipelineImpl:U}=Z5(),{finished:W}=r2();F$();function G(...V){return new q((F,M)=>{let j,f,T=V[V.length-1];if(T&&typeof T==="object"&&!Y(T)&&!X(T)&&!B(T)){let D=J(V);j=D.signal,f=D.end}U(V,(D,P)=>{if(D)M(D);else F(P)},{signal:j,end:f})})}Q.exports={finished:W,pipeline:G}}),F$=S0(($,Q)=>{var{Buffer:J}=(y2(),X2(f2)),{ObjectDefineProperty:q,ObjectKeys:X,ReflectApply:Y}=T0(),{promisify:{custom:B}}=a0(),{streamReturningOperators:U,promiseReturningOperators:W}=fX(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:G}}=i0(),V=H$(),{setDefaultHighWaterMark:F,getDefaultHighWaterMark:M}=L8(),{pipeline:j}=Z5(),{destroyer:f}=p1(),T=r2(),D=M$(),P=b2(),K=Q.exports=v5().Stream;K.isDestroyed=P.isDestroyed,K.isDisturbed=P.isDisturbed,K.isErrored=P.isErrored,K.isReadable=P.isReadable,K.isWritable=P.isWritable,K.Readable=z8();for(let z of X(U)){let A=function(...Z){if(new.target)throw G();return K.Readable.from(Y(_,this,Z))},_=U[z];q(A,"name",{__proto__:null,value:_.name}),q(A,"length",{__proto__:null,value:_.length}),q(K.Readable.prototype,z,{__proto__:null,value:A,enumerable:!1,configurable:!0,writable:!0})}for(let z of X(W)){let A=function(...Z){if(new.target)throw G();return Y(_,this,Z)},_=W[z];q(A,"name",{__proto__:null,value:_.name}),q(A,"length",{__proto__:null,value:_.length}),q(K.Readable.prototype,z,{__proto__:null,value:A,enumerable:!1,configurable:!0,writable:!0})}K.Writable=k5(),K.Duplex=_2(),K.Transform=K$(),K.PassThrough=j$(),K.pipeline=j;var{addAbortSignal:L}=w8();K.addAbortSignal=L,K.finished=T,K.destroy=f,K.compose=V,K.setDefaultHighWaterMark=F,K.getDefaultHighWaterMark=M,q(K,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return D}}),q(j,B,{__proto__:null,enumerable:!0,get(){return D.pipeline}}),q(T,B,{__proto__:null,enumerable:!0,get(){return D.finished}}),K.Stream=K,K._isUint8Array=function(z){return z instanceof Uint8Array},K._uint8ArrayToBuffer=function(z){return J.from(z.buffer,z.byteOffset,z.byteLength)}}),yX=S0(($,Q)=>{var J=O8();{let q=F$(),X=M$(),Y=q.Readable.destroy;Q.exports=q.Readable,Q.exports._uint8ArrayToBuffer=q._uint8ArrayToBuffer,Q.exports._isUint8Array=q._isUint8Array,Q.exports.isDisturbed=q.isDisturbed,Q.exports.isErrored=q.isErrored,Q.exports.isReadable=q.isReadable,Q.exports.Readable=q.Readable,Q.exports.Writable=q.Writable,Q.exports.Duplex=q.Duplex,Q.exports.Transform=q.Transform,Q.exports.PassThrough=q.PassThrough,Q.exports.addAbortSignal=q.addAbortSignal,Q.exports.finished=q.finished,Q.exports.destroy=q.destroy,Q.exports.destroy=Y,Q.exports.pipeline=q.pipeline,Q.exports.compose=q.compose,Object.defineProperty(q,"promises",{configurable:!0,enumerable:!0,get(){return X}}),Q.exports.Stream=q.Stream}Q.exports.default=Q.exports});w$.exports=yX()});var h2=H0((bX)=>{bX.base64=!0;bX.array=!0;bX.string=!0;bX.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";bX.nodebuffer=typeof Buffer<"u";bX.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")bX.blob=!1;else{N8=new ArrayBuffer(0);try{bX.blob=new Blob([N8],{type:"application/zip"}).size===0}catch($){try{g5=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,D8=new g5,D8.append(N8),bX.blob=D8.getBlob("application/zip").size===0}catch(Q){bX.blob=!1}}}var N8,g5,D8;try{bX.nodestream=!!O8().Readable}catch($){bX.nodestream=!1}});var x5=H0((nX)=>{var dX=g0(),iX=h2(),P2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";nX.encode=function($){var Q=[],J,q,X,Y,B,U,W,G=0,V=$.length,F=V,M=dX.getTypeOf($)!=="string";while(G<$.length){if(F=V-G,!M)J=$.charCodeAt(G++),q=G<V?$.charCodeAt(G++):0,X=G<V?$.charCodeAt(G++):0;else J=$[G++],q=G<V?$[G++]:0,X=G<V?$[G++]:0;Y=J>>2,B=(J&3)<<4|q>>4,U=F>1?(q&15)<<2|X>>6:64,W=F>2?X&63:64,Q.push(P2.charAt(Y)+P2.charAt(B)+P2.charAt(U)+P2.charAt(W))}return Q.join("")};nX.decode=function($){var Q,J,q,X,Y,B,U,W=0,G=0,V="data:";if($.substr(0,V.length)===V)throw Error("Invalid base64 input, it looks like a data url.");$=$.replace(/[^A-Za-z0-9+/=]/g,"");var F=$.length*3/4;if($.charAt($.length-1)===P2.charAt(64))F--;if($.charAt($.length-2)===P2.charAt(64))F--;if(F%1!==0)throw Error("Invalid base64 input, bad content length.");var M;if(iX.uint8array)M=new Uint8Array(F|0);else M=Array(F|0);while(W<$.length){if(X=P2.indexOf($.charAt(W++)),Y=P2.indexOf($.charAt(W++)),B=P2.indexOf($.charAt(W++)),U=P2.indexOf($.charAt(W++)),Q=X<<2|Y>>4,J=(Y&15)<<4|B>>2,q=(B&3)<<6|U,M[G++]=Q,B!==64)M[G++]=J;if(U!==64)M[G++]=q}return M}});var g6=H0((uK,L$)=>{L$.exports={isNode:typeof Buffer<"u",newBufferFrom:function($,Q){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from($,Q);else{if(typeof $==="number")throw Error('The "data" argument must not be a number');return new Buffer($,Q)}},allocBuffer:function($){if(Buffer.alloc)return Buffer.alloc($);else{var Q=new Buffer($);return Q.fill(0),Q}},isBuffer:function($){return Buffer.isBuffer($)},isStream:function($){return $&&typeof $.on==="function"&&typeof $.pause==="function"&&typeof $.resume==="function"}}});var N$=H0((cK,O$)=>{var z$=global.MutationObserver||global.WebKitMutationObserver,x6;if(z$)A8=0,f5=new z$(P8),C8=global.document.createTextNode(""),f5.observe(C8,{characterData:!0}),x6=function(){C8.data=A8=++A8%2};else if(!global.setImmediate&&typeof global.MessageChannel<"u")R8=new global.MessageChannel,R8.port1.onmessage=P8,x6=function(){R8.port2.postMessage(0)};else if("document"in global&&"onreadystatechange"in global.document.createElement("script"))x6=function(){var $=global.document.createElement("script");$.onreadystatechange=function(){P8(),$.onreadystatechange=null,$.parentNode.removeChild($),$=null},global.document.documentElement.appendChild($)};else x6=function(){setTimeout(P8,0)};var A8,f5,C8,R8,y5,f6=[];function P8(){y5=!0;var $,Q,J=f6.length;while(J){Q=f6,f6=[],$=-1;while(++$<J)Q[$]();J=f6.length}y5=!1}O$.exports=aX;function aX($){if(f6.push($)===1&&!y5)x6()}});var I$=H0((pK,R$)=>{var sX=N$();function l1(){}var p0={},D$=["REJECTED"],_5=["FULFILLED"],P$=["PENDING"];R$.exports=a2;function a2($){if(typeof $!=="function")throw TypeError("resolver must be a function");if(this.state=P$,this.queue=[],this.outcome=void 0,$!==l1)A$(this,$)}a2.prototype.finally=function($){if(typeof $!=="function")return this;var Q=this.constructor;return this.then(J,q);function J(X){function Y(){return X}return Q.resolve($()).then(Y)}function q(X){function Y(){throw X}return Q.resolve($()).then(Y)}};a2.prototype.catch=function($){return this.then(null,$)};a2.prototype.then=function($,Q){if(typeof $!=="function"&&this.state===_5||typeof Q!=="function"&&this.state===D$)return this;var J=new this.constructor(l1);if(this.state!==P$){var q=this.state===_5?$:Q;b5(J,q,this.outcome)}else this.queue.push(new y6(J,$,Q));return J};function y6($,Q,J){if(this.promise=$,typeof Q==="function")this.onFulfilled=Q,this.callFulfilled=this.otherCallFulfilled;if(typeof J==="function")this.onRejected=J,this.callRejected=this.otherCallRejected}y6.prototype.callFulfilled=function($){p0.resolve(this.promise,$)};y6.prototype.otherCallFulfilled=function($){b5(this.promise,this.onFulfilled,$)};y6.prototype.callRejected=function($){p0.reject(this.promise,$)};y6.prototype.otherCallRejected=function($){b5(this.promise,this.onRejected,$)};function b5($,Q,J){sX(function(){var q;try{q=Q(J)}catch(X){return p0.reject($,X)}if(q===$)p0.reject($,TypeError("Cannot resolve promise with itself"));else p0.resolve($,q)})}p0.resolve=function($,Q){var J=C$(tX,Q);if(J.status==="error")return p0.reject($,J.value);var q=J.value;if(q)A$($,q);else{$.state=_5,$.outcome=Q;var X=-1,Y=$.queue.length;while(++X<Y)$.queue[X].callFulfilled(Q)}return $};p0.reject=function($,Q){$.state=D$,$.outcome=Q;var J=-1,q=$.queue.length;while(++J<q)$.queue[J].callRejected(Q);return $};function tX($){var Q=$&&$.then;if($&&(typeof $==="object"||typeof $==="function")&&typeof Q==="function")return function(){Q.apply($,arguments)}}function A$($,Q){var J=!1;function q(U){if(J)return;J=!0,p0.reject($,U)}function X(U){if(J)return;J=!0,p0.resolve($,U)}function Y(){Q(X,q)}var B=C$(Y);if(B.status==="error")q(B.value)}function C$($,Q){var J={};try{J.value=$(Q),J.status="success"}catch(q){J.status="error",J.value=q}return J}a2.resolve=eX;function eX($){if($ instanceof this)return $;return p0.resolve(new this(l1),$)}a2.reject=$Y;function $Y($){var Q=new this(l1);return p0.reject(Q,$)}a2.all=QY;function QY($){var Q=this;if(Object.prototype.toString.call($)!=="[object Array]")return this.reject(TypeError("must be an array"));var J=$.length,q=!1;if(!J)return this.resolve([]);var X=Array(J),Y=0,B=-1,U=new this(l1);while(++B<J)W($[B],B);return U;function W(G,V){Q.resolve(G).then(F,function(M){if(!q)q=!0,p0.reject(U,M)});function F(M){if(X[V]=M,++Y===J&&!q)q=!0,p0.resolve(U,X)}}}a2.race=JY;function JY($){var Q=this;if(Object.prototype.toString.call($)!=="[object Array]")return this.reject(TypeError("must be an array"));var J=$.length,q=!1;if(!J)return this.resolve([]);var X=-1,Y=new this(l1);while(++X<J)B($[X]);return Y;function B(U){Q.resolve(U).then(function(W){if(!q)q=!0,p0.resolve(Y,W)},function(W){if(!q)q=!0,p0.reject(Y,W)})}}});var d1=H0((lK,S$)=>{var h5=null;if(typeof Promise<"u")h5=Promise;else h5=I$();S$.exports={Promise:h5}});var v$=H0((E$)=>{(function($,Q){if($.setImmediate)return;var J=1,q={},X=!1,Y=$.document,B;function U(K){if(typeof K!=="function")K=Function(""+K);var L=Array(arguments.length-1);for(var z=0;z<L.length;z++)L[z]=arguments[z+1];var A={callback:K,args:L};return q[J]=A,B(J),J++}function W(K){delete q[K]}function G(K){var{callback:L,args:z}=K;switch(z.length){case 0:L();break;case 1:L(z[0]);break;case 2:L(z[0],z[1]);break;case 3:L(z[0],z[1],z[2]);break;default:L.apply(Q,z);break}}function V(K){if(X)setTimeout(V,0,K);else{var L=q[K];if(L){X=!0;try{G(L)}finally{W(K),X=!1}}}}function F(){B=function(K){process.nextTick(function(){V(K)})}}function M(){if($.postMessage&&!$.importScripts){var K=!0,L=$.onmessage;return $.onmessage=function(){K=!1},$.postMessage("","*"),$.onmessage=L,K}}function j(){var K="setImmediate$"+Math.random()+"$",L=function(z){if(z.source===$&&typeof z.data==="string"&&z.data.indexOf(K)===0)V(+z.data.slice(K.length))};if($.addEventListener)$.addEventListener("message",L,!1);else $.attachEvent("onmessage",L);B=function(z){$.postMessage(K+z,"*")}}function f(){var K=new MessageChannel;K.port1.onmessage=function(L){var z=L.data;V(z)},B=function(L){K.port2.postMessage(L)}}function T(){var K=Y.documentElement;B=function(L){var z=Y.createElement("script");z.onreadystatechange=function(){V(L),z.onreadystatechange=null,K.removeChild(z),z=null},K.appendChild(z)}}function D(){B=function(K){setTimeout(V,0,K)}}var P=Object.getPrototypeOf&&Object.getPrototypeOf($);if(P=P&&P.setTimeout?P:$,{}.toString.call($.process)==="[object process]")F();else if(M())j();else if($.MessageChannel)f();else if(Y&&"onreadystatechange"in Y.createElement("script"))T();else D();P.setImmediate=U,P.clearImmediate=W})(typeof self>"u"?typeof global>"u"?E$:global:self)});var g0=H0((YY)=>{var s2=h2(),qY=x5(),i1=g6(),m5=d1();v$();function XY($){var Q=null;if(s2.uint8array)Q=new Uint8Array($.length);else Q=Array($.length);return S8($,Q)}YY.newBlob=function($,Q){YY.checkSupport("blob");try{return new Blob([$],{type:Q})}catch(X){try{var J=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,q=new J;return q.append($),q.getBlob(Q)}catch(Y){throw Error("Bug : can't construct the Blob.")}}};function _6($){return $}function S8($,Q){for(var J=0;J<$.length;++J)Q[J]=$.charCodeAt(J)&255;return Q}var I8={stringifyByChunk:function($,Q,J){var q=[],X=0,Y=$.length;if(Y<=J)return String.fromCharCode.apply(null,$);while(X<Y){if(Q==="array"||Q==="nodebuffer")q.push(String.fromCharCode.apply(null,$.slice(X,Math.min(X+J,Y))));else q.push(String.fromCharCode.apply(null,$.subarray(X,Math.min(X+J,Y))));X+=J}return q.join("")},stringifyByChar:function($){var Q="";for(var J=0;J<$.length;J++)Q+=String.fromCharCode($[J]);return Q},applyCanBeUsed:{uint8array:function(){try{return s2.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch($){return!1}}(),nodebuffer:function(){try{return s2.nodebuffer&&String.fromCharCode.apply(null,i1.allocBuffer(1)).length===1}catch($){return!1}}()}};function b6($){var Q=65536,J=YY.getTypeOf($),q=!0;if(J==="uint8array")q=I8.applyCanBeUsed.uint8array;else if(J==="nodebuffer")q=I8.applyCanBeUsed.nodebuffer;if(q)while(Q>1)try{return I8.stringifyByChunk($,J,Q)}catch(X){Q=Math.floor(Q/2)}return I8.stringifyByChar($)}YY.applyFromCharCode=b6;function E8($,Q){for(var J=0;J<$.length;J++)Q[J]=$[J];return Q}var t2={};t2.string={string:_6,array:function($){return S8($,Array($.length))},arraybuffer:function($){return t2.string.uint8array($).buffer},uint8array:function($){return S8($,new Uint8Array($.length))},nodebuffer:function($){return S8($,i1.allocBuffer($.length))}};t2.array={string:b6,array:_6,arraybuffer:function($){return new Uint8Array($).buffer},uint8array:function($){return new Uint8Array($)},nodebuffer:function($){return i1.newBufferFrom($)}};t2.arraybuffer={string:function($){return b6(new Uint8Array($))},array:function($){return E8(new Uint8Array($),Array($.byteLength))},arraybuffer:_6,uint8array:function($){return new Uint8Array($)},nodebuffer:function($){return i1.newBufferFrom(new Uint8Array($))}};t2.uint8array={string:b6,array:function($){return E8($,Array($.length))},arraybuffer:function($){return $.buffer},uint8array:_6,nodebuffer:function($){return i1.newBufferFrom($)}};t2.nodebuffer={string:b6,array:function($){return E8($,Array($.length))},arraybuffer:function($){return t2.nodebuffer.uint8array($).buffer},uint8array:function($){return E8($,new Uint8Array($.length))},nodebuffer:_6};YY.transformTo=function($,Q){if(!Q)Q="";if(!$)return Q;YY.checkSupport($);var J=YY.getTypeOf(Q),q=t2[J][$](Q);return q};YY.resolve=function($){var Q=$.split("/"),J=[];for(var q=0;q<Q.length;q++){var X=Q[q];if(X==="."||X===""&&q!==0&&q!==Q.length-1)continue;else if(X==="..")J.pop();else J.push(X)}return J.join("/")};YY.getTypeOf=function($){if(typeof $==="string")return"string";if(Object.prototype.toString.call($)==="[object Array]")return"array";if(s2.nodebuffer&&i1.isBuffer($))return"nodebuffer";if(s2.uint8array&&$ instanceof Uint8Array)return"uint8array";if(s2.arraybuffer&&$ instanceof ArrayBuffer)return"arraybuffer"};YY.checkSupport=function($){var Q=s2[$.toLowerCase()];if(!Q)throw Error($+" is not supported by this platform")};YY.MAX_VALUE_16BITS=65535;YY.MAX_VALUE_32BITS=-1;YY.pretty=function($){var Q="",J,q;for(q=0;q<($||"").length;q++)J=$.charCodeAt(q),Q+="\\x"+(J<16?"0":"")+J.toString(16).toUpperCase();return Q};YY.delay=function($,Q,J){setImmediate(function(){$.apply(J||null,Q||[])})};YY.inherits=function($,Q){var J=function(){};J.prototype=Q.prototype,$.prototype=new J};YY.extend=function(){var $={},Q,J;for(Q=0;Q<arguments.length;Q++)for(J in arguments[Q])if(Object.prototype.hasOwnProperty.call(arguments[Q],J)&&typeof $[J]>"u")$[J]=arguments[Q][J];return $};YY.prepareContent=function($,Q,J,q,X){var Y=m5.Promise.resolve(Q).then(function(B){var U=s2.blob&&(B instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(B))!==-1);if(U&&typeof FileReader<"u")return new m5.Promise(function(W,G){var V=new FileReader;V.onload=function(F){W(F.target.result)},V.onerror=function(F){G(F.target.error)},V.readAsArrayBuffer(B)});else return B});return Y.then(function(B){var U=YY.getTypeOf(B);if(!U)return m5.Promise.reject(Error("Can't read the data of '"+$+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));if(U==="arraybuffer")B=YY.transformTo("uint8array",B);else if(U==="string"){if(X)B=qY.decode(B);else if(J){if(q!==!0)B=XY(B)}}return B})}});var e0=H0((nK,g$)=>{function T$($){this.name=$||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}T$.prototype={push:function($){this.emit("data",$)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch($){this.emit("error",$)}return!0},error:function($){if(this.isFinished)return!1;if(this.isPaused)this.generatedError=$;else{if(this.isFinished=!0,this.emit("error",$),this.previous)this.previous.error($);this.cleanUp()}return!0},on:function($,Q){return this._listeners[$].push(Q),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function($,Q){if(this._listeners[$])for(var J=0;J<this._listeners[$].length;J++)this._listeners[$][J].call(this,Q)},pipe:function($){return $.registerPrevious(this)},registerPrevious:function($){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");this.streamInfo=$.streamInfo,this.mergeStreamInfo(),this.previous=$;var Q=this;return $.on("data",function(J){Q.processChunk(J)}),$.on("end",function(){Q.end()}),$.on("error",function(J){Q.error(J)}),this},pause:function(){if(this.isPaused||this.isFinished)return!1;if(this.isPaused=!0,this.previous)this.previous.pause();return!0},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var $=!1;if(this.generatedError)this.error(this.generatedError),$=!0;if(this.previous)this.previous.resume();return!$},flush:function(){},processChunk:function($){this.push($)},withStreamInfo:function($,Q){return this.extraStreamInfo[$]=Q,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var $ in this.extraStreamInfo){if(!Object.prototype.hasOwnProperty.call(this.extraStreamInfo,$))continue;this.streamInfo[$]=this.extraStreamInfo[$]}},lock:function(){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");if(this.isLocked=!0,this.previous)this.previous.lock()},toString:function(){var $="Worker "+this.name;if(this.previous)return this.previous+" -> "+$;else return $}};g$.exports=T$});var o1=H0((NY)=>{var n1=g0(),D1=h2(),wY=g6(),v8=e0(),h6=Array(256);for(A2=0;A2<256;A2++)h6[A2]=A2>=252?6:A2>=248?5:A2>=240?4:A2>=224?3:A2>=192?2:1;var A2;h6[254]=h6[254]=1;var LY=function($){var Q,J,q,X,Y,B=$.length,U=0;for(X=0;X<B;X++){if(J=$.charCodeAt(X),(J&64512)===55296&&X+1<B){if(q=$.charCodeAt(X+1),(q&64512)===56320)J=65536+(J-55296<<10)+(q-56320),X++}U+=J<128?1:J<2048?2:J<65536?3:4}if(D1.uint8array)Q=new Uint8Array(U);else Q=Array(U);for(Y=0,X=0;Y<U;X++){if(J=$.charCodeAt(X),(J&64512)===55296&&X+1<B){if(q=$.charCodeAt(X+1),(q&64512)===56320)J=65536+(J-55296<<10)+(q-56320),X++}if(J<128)Q[Y++]=J;else if(J<2048)Q[Y++]=192|J>>>6,Q[Y++]=128|J&63;else if(J<65536)Q[Y++]=224|J>>>12,Q[Y++]=128|J>>>6&63,Q[Y++]=128|J&63;else Q[Y++]=240|J>>>18,Q[Y++]=128|J>>>12&63,Q[Y++]=128|J>>>6&63,Q[Y++]=128|J&63}return Q},zY=function($,Q){var J;if(Q=Q||$.length,Q>$.length)Q=$.length;J=Q-1;while(J>=0&&($[J]&192)===128)J--;if(J<0)return Q;if(J===0)return Q;return J+h6[$[J]]>Q?J:Q},OY=function($){var Q,J,q,X,Y=$.length,B=Array(Y*2);for(J=0,Q=0;Q<Y;){if(q=$[Q++],q<128){B[J++]=q;continue}if(X=h6[q],X>4){B[J++]=65533,Q+=X-1;continue}q&=X===2?31:X===3?15:7;while(X>1&&Q<Y)q=q<<6|$[Q++]&63,X--;if(X>1){B[J++]=65533;continue}if(q<65536)B[J++]=q;else q-=65536,B[J++]=55296|q>>10&1023,B[J++]=56320|q&1023}if(B.length!==J)if(B.subarray)B=B.subarray(0,J);else B.length=J;return n1.applyFromCharCode(B)};NY.utf8encode=function(Q){if(D1.nodebuffer)return wY.newBufferFrom(Q,"utf-8");return LY(Q)};NY.utf8decode=function(Q){if(D1.nodebuffer)return n1.transformTo("nodebuffer",Q).toString("utf-8");return Q=n1.transformTo(D1.uint8array?"uint8array":"array",Q),OY(Q)};function k8(){v8.call(this,"utf-8 decode"),this.leftOver=null}n1.inherits(k8,v8);k8.prototype.processChunk=function($){var Q=n1.transformTo(D1.uint8array?"uint8array":"array",$.data);if(this.leftOver&&this.leftOver.length){if(D1.uint8array){var J=Q;Q=new Uint8Array(J.length+this.leftOver.length),Q.set(this.leftOver,0),Q.set(J,this.leftOver.length)}else Q=this.leftOver.concat(Q);this.leftOver=null}var q=zY(Q),X=Q;if(q!==Q.length)if(D1.uint8array)X=Q.subarray(0,q),this.leftOver=Q.subarray(q,Q.length);else X=Q.slice(0,q),this.leftOver=Q.slice(q,Q.length);this.push({data:NY.utf8decode(X),meta:$.meta})};k8.prototype.flush=function(){if(this.leftOver&&this.leftOver.length)this.push({data:NY.utf8decode(this.leftOver),meta:{}}),this.leftOver=null};NY.Utf8DecodeWorker=k8;function c5(){v8.call(this,"utf-8 encode")}n1.inherits(c5,v8);c5.prototype.processChunk=function($){this.push({data:NY.utf8encode($.data),meta:$.meta})};NY.Utf8EncodeWorker=c5});var b$=H0((rK,_$)=>{var f$=e0(),y$=g0();function l5($){f$.call(this,"ConvertWorker to "+$),this.destType=$}y$.inherits(l5,f$);l5.prototype.processChunk=function($){this.push({data:y$.transformTo(this.destType,$.data),meta:$.meta})};_$.exports=l5});var u$=H0((aK,m$)=>{var h$=O8().Readable,AY=g0();AY.inherits(d5,h$);function d5($,Q,J){h$.call(this,Q),this._helper=$;var q=this;$.on("data",function(X,Y){if(!q.push(X))q._helper.pause();if(J)J(Y)}).on("error",function(X){q.emit("error",X)}).on("end",function(){q.push(null)})}d5.prototype._read=function(){this._helper.resume()};m$.exports=d5});var i5=H0((sK,l$)=>{var P1=g0(),CY=b$(),RY=e0(),IY=x5(),SY=h2(),EY=d1(),c$=null;if(SY.nodestream)try{c$=u$()}catch($){}function vY($,Q,J){switch($){case"blob":return P1.newBlob(P1.transformTo("arraybuffer",Q),J);case"base64":return IY.encode(Q);default:return P1.transformTo($,Q)}}function kY($,Q){var J,q=0,X=null,Y=0;for(J=0;J<Q.length;J++)Y+=Q[J].length;switch($){case"string":return Q.join("");case"array":return Array.prototype.concat.apply([],Q);case"uint8array":X=new Uint8Array(Y);for(J=0;J<Q.length;J++)X.set(Q[J],q),q+=Q[J].length;return X;case"nodebuffer":return Buffer.concat(Q);default:throw Error("concat : unsupported type '"+$+"'")}}function ZY($,Q){return new EY.Promise(function(J,q){var X=[],Y=$._internalType,B=$._outputType,U=$._mimeType;$.on("data",function(W,G){if(X.push(W),Q)Q(G)}).on("error",function(W){X=[],q(W)}).on("end",function(){try{var W=vY(B,kY(Y,X),U);J(W)}catch(G){q(G)}X=[]}).resume()})}function p$($,Q,J){var q=Q;switch(Q){case"blob":case"arraybuffer":q="uint8array";break;case"base64":q="string";break}try{this._internalType=q,this._outputType=Q,this._mimeType=J,P1.checkSupport(q),this._worker=$.pipe(new CY(q)),$.lock()}catch(X){this._worker=new RY("error"),this._worker.error(X)}}p$.prototype={accumulate:function($){return ZY(this,$)},on:function($,Q){var J=this;if($==="data")this._worker.on($,function(q){Q.call(J,q.data,q.meta)});else this._worker.on($,function(){P1.delay(Q,arguments,J)});return this},resume:function(){return P1.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function($){if(P1.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw Error(this._outputType+" is not supported by this method");return new c$(this,{objectMode:this._outputType!=="nodebuffer"},$)}};l$.exports=p$});var n5=H0((TY)=>{TY.base64=!1;TY.binary=!1;TY.dir=!1;TY.createFolders=!0;TY.date=null;TY.compression=null;TY.compressionOptions=null;TY.comment=null;TY.unixPermissions=null;TY.dosPermissions=null});var o5=H0((eK,d$)=>{var Z8=g0(),T8=e0(),pY=16384;function r1($){T8.call(this,"DataWorker");var Q=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,$.then(function(J){if(Q.dataIsReady=!0,Q.data=J,Q.max=J&&J.length||0,Q.type=Z8.getTypeOf(J),!Q.isPaused)Q._tickAndRepeat()},function(J){Q.error(J)})}Z8.inherits(r1,T8);r1.prototype.cleanUp=function(){T8.prototype.cleanUp.call(this),this.data=null};r1.prototype.resume=function(){if(!T8.prototype.resume.call(this))return!1;if(!this._tickScheduled&&this.dataIsReady)this._tickScheduled=!0,Z8.delay(this._tickAndRepeat,[],this);return!0};r1.prototype._tickAndRepeat=function(){if(this._tickScheduled=!1,this.isPaused||this.isFinished)return;if(this._tick(),!this.isFinished)Z8.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0};r1.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var $=pY,Q=null,J=Math.min(this.max,this.index+$);if(this.index>=this.max)return this.end();else{switch(this.type){case"string":Q=this.data.substring(this.index,J);break;case"uint8array":Q=this.data.subarray(this.index,J);break;case"array":case"nodebuffer":Q=this.data.slice(this.index,J);break}return this.index=J,this.push({data:Q,meta:{percent:this.max?this.index/this.max*100:0}})}};d$.exports=r1});var g8=H0(($j,n$)=>{var lY=g0();function dY(){var $,Q=[];for(var J=0;J<256;J++){$=J;for(var q=0;q<8;q++)$=$&1?3988292384^$>>>1:$>>>1;Q[J]=$}return Q}var i$=dY();function iY($,Q,J,q){var X=i$,Y=q+J;$=$^-1;for(var B=q;B<Y;B++)$=$>>>8^X[($^Q[B])&255];return $^-1}function nY($,Q,J,q){var X=i$,Y=q+J;$=$^-1;for(var B=q;B<Y;B++)$=$>>>8^X[($^Q.charCodeAt(B))&255];return $^-1}n$.exports=function(Q,J){if(typeof Q>"u"||!Q.length)return 0;var q=lY.getTypeOf(Q)!=="string";if(q)return iY(J|0,Q,Q.length,0);else return nY(J|0,Q,Q.length,0)}});var a5=H0((Qj,r$)=>{var o$=e0(),oY=g8(),rY=g0();function r5(){o$.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}rY.inherits(r5,o$);r5.prototype.processChunk=function($){this.streamInfo.crc32=oY($.data,this.streamInfo.crc32||0),this.push($)};r$.exports=r5});var s$=H0((Jj,a$)=>{var aY=g0(),s5=e0();function t5($){s5.call(this,"DataLengthProbe for "+$),this.propName=$,this.withStreamInfo($,0)}aY.inherits(t5,s5);t5.prototype.processChunk=function($){if($){var Q=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=Q+$.data.length}s5.prototype.processChunk.call(this,$)};a$.exports=t5});var x8=H0((qj,$9)=>{var t$=d1(),e$=o5(),sY=a5(),e5=s$();function $4($,Q,J,q,X){this.compressedSize=$,this.uncompressedSize=Q,this.crc32=J,this.compression=q,this.compressedContent=X}$4.prototype={getContentWorker:function(){var $=new e$(t$.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new e5("data_length")),Q=this;return $.on("end",function(){if(this.streamInfo.data_length!==Q.uncompressedSize)throw Error("Bug : uncompressed data size mismatch")}),$},getCompressedWorker:function(){return new e$(t$.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};$4.createWorkerFrom=function($,Q,J){return $.pipe(new sY).pipe(new e5("uncompressedSize")).pipe(Q.compressWorker(J)).pipe(new e5("compressedSize")).withStreamInfo("compression",Q)};$9.exports=$4});var X9=H0((Xj,q9)=>{var tY=i5(),eY=o5(),Q4=o1(),J4=x8(),Q9=e0(),q4=function($,Q,J){this.name=$,this.dir=J.dir,this.date=J.date,this.comment=J.comment,this.unixPermissions=J.unixPermissions,this.dosPermissions=J.dosPermissions,this._data=Q,this._dataBinary=J.binary,this.options={compression:J.compression,compressionOptions:J.compressionOptions}};q4.prototype={internalStream:function($){var Q=null,J="string";try{if(!$)throw Error("No output type specified.");J=$.toLowerCase();var q=J==="string"||J==="text";if(J==="binarystring"||J==="text")J="string";Q=this._decompressWorker();var X=!this._dataBinary;if(X&&!q)Q=Q.pipe(new Q4.Utf8EncodeWorker);if(!X&&q)Q=Q.pipe(new Q4.Utf8DecodeWorker)}catch(Y){Q=new Q9("error"),Q.error(Y)}return new tY(Q,J,"")},async:function($,Q){return this.internalStream($).accumulate(Q)},nodeStream:function($,Q){return this.internalStream($||"nodebuffer").toNodejsStream(Q)},_compressWorker:function($,Q){if(this._data instanceof J4&&this._data.compression.magic===$.magic)return this._data.getCompressedWorker();else{var J=this._decompressWorker();if(!this._dataBinary)J=J.pipe(new Q4.Utf8EncodeWorker);return J4.createWorkerFrom(J,$,Q)}},_decompressWorker:function(){if(this._data instanceof J4)return this._data.getContentWorker();else if(this._data instanceof Q9)return this._data;else return new eY(this._data)}};var J9=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],$B=function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(m6=0;m6<J9.length;m6++)q4.prototype[J9[m6]]=$B;var m6;q9.exports=q4});var m2=H0((X4)=>{var XB=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function YB($,Q){return Object.prototype.hasOwnProperty.call($,Q)}X4.assign=function($){var Q=Array.prototype.slice.call(arguments,1);while(Q.length){var J=Q.shift();if(!J)continue;if(typeof J!=="object")throw TypeError(J+"must be non-object");for(var q in J)if(YB(J,q))$[q]=J[q]}return $};X4.shrinkBuf=function($,Q){if($.length===Q)return $;if($.subarray)return $.subarray(0,Q);return $.length=Q,$};var BB={arraySet:function($,Q,J,q,X){if(Q.subarray&&$.subarray){$.set(Q.subarray(J,J+q),X);return}for(var Y=0;Y<q;Y++)$[X+Y]=Q[J+Y]},flattenChunks:function($){var Q,J,q,X,Y,B;q=0;for(Q=0,J=$.length;Q<J;Q++)q+=$[Q].length;B=new Uint8Array(q),X=0;for(Q=0,J=$.length;Q<J;Q++)Y=$[Q],B.set(Y,X),X+=Y.length;return B}},UB={arraySet:function($,Q,J,q,X){for(var Y=0;Y<q;Y++)$[X+Y]=Q[J+Y]},flattenChunks:function($){return[].concat.apply([],$)}};X4.setTyped=function($){if($)X4.Buf8=Uint8Array,X4.Buf16=Uint16Array,X4.Buf32=Int32Array,X4.assign(X4,BB);else X4.Buf8=Array,X4.Buf16=Array,X4.Buf32=Array,X4.assign(X4,UB)};X4.setTyped(XB)});var E9=H0((kB)=>{var GB=m2(),VB=4,B9=0,U9=1,KB=2;function s1($){var Q=$.length;while(--Q>=0)$[Q]=0}var jB=0,H9=1,HB=2,MB=3,FB=258,j4=29,i6=256,c6=i6+1+j4,a1=30,H4=19,M9=2*c6+1,A1=15,B4=16,wB=7,M4=256,F9=16,w9=17,L9=18,V4=[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],f8=[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],LB=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],z9=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],zB=512,u2=Array((c6+2)*2);s1(u2);var u6=Array(a1*2);s1(u6);var p6=Array(zB);s1(p6);var l6=Array(FB-MB+1);s1(l6);var F4=Array(j4);s1(F4);var y8=Array(a1);s1(y8);function U4($,Q,J,q,X){this.static_tree=$,this.extra_bits=Q,this.extra_base=J,this.elems=q,this.max_length=X,this.has_stree=$&&$.length}var O9,N9,D9;function W4($,Q){this.dyn_tree=$,this.max_code=0,this.stat_desc=Q}function P9($){return $<256?p6[$]:p6[256+($>>>7)]}function d6($,Q){$.pending_buf[$.pending++]=Q&255,$.pending_buf[$.pending++]=Q>>>8&255}function s0($,Q,J){if($.bi_valid>B4-J)$.bi_buf|=Q<<$.bi_valid&65535,d6($,$.bi_buf),$.bi_buf=Q>>B4-$.bi_valid,$.bi_valid+=J-B4;else $.bi_buf|=Q<<$.bi_valid&65535,$.bi_valid+=J}function C2($,Q,J){s0($,J[Q*2],J[Q*2+1])}function A9($,Q){var J=0;do J|=$&1,$>>>=1,J<<=1;while(--Q>0);return J>>>1}function OB($){if($.bi_valid===16)d6($,$.bi_buf),$.bi_buf=0,$.bi_valid=0;else if($.bi_valid>=8)$.pending_buf[$.pending++]=$.bi_buf&255,$.bi_buf>>=8,$.bi_valid-=8}function NB($,Q){var{dyn_tree:J,max_code:q}=Q,X=Q.stat_desc.static_tree,Y=Q.stat_desc.has_stree,B=Q.stat_desc.extra_bits,U=Q.stat_desc.extra_base,W=Q.stat_desc.max_length,G,V,F,M,j,f,T=0;for(M=0;M<=A1;M++)$.bl_count[M]=0;J[$.heap[$.heap_max]*2+1]=0;for(G=$.heap_max+1;G<M9;G++){if(V=$.heap[G],M=J[J[V*2+1]*2+1]+1,M>W)M=W,T++;if(J[V*2+1]=M,V>q)continue;if($.bl_count[M]++,j=0,V>=U)j=B[V-U];if(f=J[V*2],$.opt_len+=f*(M+j),Y)$.static_len+=f*(X[V*2+1]+j)}if(T===0)return;do{M=W-1;while($.bl_count[M]===0)M--;$.bl_count[M]--,$.bl_count[M+1]+=2,$.bl_count[W]--,T-=2}while(T>0);for(M=W;M!==0;M--){V=$.bl_count[M];while(V!==0){if(F=$.heap[--G],F>q)continue;if(J[F*2+1]!==M)$.opt_len+=(M-J[F*2+1])*J[F*2],J[F*2+1]=M;V--}}}function C9($,Q,J){var q=Array(A1+1),X=0,Y,B;for(Y=1;Y<=A1;Y++)q[Y]=X=X+J[Y-1]<<1;for(B=0;B<=Q;B++){var U=$[B*2+1];if(U===0)continue;$[B*2]=A9(q[U]++,U)}}function DB(){var $,Q,J,q,X,Y=Array(A1+1);J=0;for(q=0;q<j4-1;q++){F4[q]=J;for($=0;$<1<<V4[q];$++)l6[J++]=q}l6[J-1]=q,X=0;for(q=0;q<16;q++){y8[q]=X;for($=0;$<1<<f8[q];$++)p6[X++]=q}X>>=7;for(;q<a1;q++){y8[q]=X<<7;for($=0;$<1<<f8[q]-7;$++)p6[256+X++]=q}for(Q=0;Q<=A1;Q++)Y[Q]=0;$=0;while($<=143)u2[$*2+1]=8,$++,Y[8]++;while($<=255)u2[$*2+1]=9,$++,Y[9]++;while($<=279)u2[$*2+1]=7,$++,Y[7]++;while($<=287)u2[$*2+1]=8,$++,Y[8]++;C9(u2,c6+1,Y);for($=0;$<a1;$++)u6[$*2+1]=5,u6[$*2]=A9($,5);O9=new U4(u2,V4,i6+1,c6,A1),N9=new U4(u6,f8,0,a1,A1),D9=new U4([],LB,0,H4,wB)}function R9($){var Q;for(Q=0;Q<c6;Q++)$.dyn_ltree[Q*2]=0;for(Q=0;Q<a1;Q++)$.dyn_dtree[Q*2]=0;for(Q=0;Q<H4;Q++)$.bl_tree[Q*2]=0;$.dyn_ltree[M4*2]=1,$.opt_len=$.static_len=0,$.last_lit=$.matches=0}function I9($){if($.bi_valid>8)d6($,$.bi_buf);else if($.bi_valid>0)$.pending_buf[$.pending++]=$.bi_buf;$.bi_buf=0,$.bi_valid=0}function PB($,Q,J,q){if(I9($),q)d6($,J),d6($,~J);GB.arraySet($.pending_buf,$.window,Q,J,$.pending),$.pending+=J}function W9($,Q,J,q){var X=Q*2,Y=J*2;return $[X]<$[Y]||$[X]===$[Y]&&q[Q]<=q[J]}function G4($,Q,J){var q=$.heap[J],X=J<<1;while(X<=$.heap_len){if(X<$.heap_len&&W9(Q,$.heap[X+1],$.heap[X],$.depth))X++;if(W9(Q,q,$.heap[X],$.depth))break;$.heap[J]=$.heap[X],J=X,X<<=1}$.heap[J]=q}function G9($,Q,J){var q,X,Y=0,B,U;if($.last_lit!==0)do if(q=$.pending_buf[$.d_buf+Y*2]<<8|$.pending_buf[$.d_buf+Y*2+1],X=$.pending_buf[$.l_buf+Y],Y++,q===0)C2($,X,Q);else{if(B=l6[X],C2($,B+i6+1,Q),U=V4[B],U!==0)X-=F4[B],s0($,X,U);if(q--,B=P9(q),C2($,B,J),U=f8[B],U!==0)q-=y8[B],s0($,q,U)}while(Y<$.last_lit);C2($,M4,Q)}function K4($,Q){var J=Q.dyn_tree,q=Q.stat_desc.static_tree,X=Q.stat_desc.has_stree,Y=Q.stat_desc.elems,B,U,W=-1,G;$.heap_len=0,$.heap_max=M9;for(B=0;B<Y;B++)if(J[B*2]!==0)$.heap[++$.heap_len]=W=B,$.depth[B]=0;else J[B*2+1]=0;while($.heap_len<2)if(G=$.heap[++$.heap_len]=W<2?++W:0,J[G*2]=1,$.depth[G]=0,$.opt_len--,X)$.static_len-=q[G*2+1];Q.max_code=W;for(B=$.heap_len>>1;B>=1;B--)G4($,J,B);G=Y;do B=$.heap[1],$.heap[1]=$.heap[$.heap_len--],G4($,J,1),U=$.heap[1],$.heap[--$.heap_max]=B,$.heap[--$.heap_max]=U,J[G*2]=J[B*2]+J[U*2],$.depth[G]=($.depth[B]>=$.depth[U]?$.depth[B]:$.depth[U])+1,J[B*2+1]=J[U*2+1]=G,$.heap[1]=G++,G4($,J,1);while($.heap_len>=2);$.heap[--$.heap_max]=$.heap[1],NB($,Q),C9(J,W,$.bl_count)}function V9($,Q,J){var q,X=-1,Y,B=Q[1],U=0,W=7,G=4;if(B===0)W=138,G=3;Q[(J+1)*2+1]=65535;for(q=0;q<=J;q++){if(Y=B,B=Q[(q+1)*2+1],++U<W&&Y===B)continue;else if(U<G)$.bl_tree[Y*2]+=U;else if(Y!==0){if(Y!==X)$.bl_tree[Y*2]++;$.bl_tree[F9*2]++}else if(U<=10)$.bl_tree[w9*2]++;else $.bl_tree[L9*2]++;if(U=0,X=Y,B===0)W=138,G=3;else if(Y===B)W=6,G=3;else W=7,G=4}}function K9($,Q,J){var q,X=-1,Y,B=Q[1],U=0,W=7,G=4;if(B===0)W=138,G=3;for(q=0;q<=J;q++){if(Y=B,B=Q[(q+1)*2+1],++U<W&&Y===B)continue;else if(U<G)do C2($,Y,$.bl_tree);while(--U!==0);else if(Y!==0){if(Y!==X)C2($,Y,$.bl_tree),U--;C2($,F9,$.bl_tree),s0($,U-3,2)}else if(U<=10)C2($,w9,$.bl_tree),s0($,U-3,3);else C2($,L9,$.bl_tree),s0($,U-11,7);if(U=0,X=Y,B===0)W=138,G=3;else if(Y===B)W=6,G=3;else W=7,G=4}}function AB($){var Q;V9($,$.dyn_ltree,$.l_desc.max_code),V9($,$.dyn_dtree,$.d_desc.max_code),K4($,$.bl_desc);for(Q=H4-1;Q>=3;Q--)if($.bl_tree[z9[Q]*2+1]!==0)break;return $.opt_len+=3*(Q+1)+5+5+4,Q}function CB($,Q,J,q){var X;s0($,Q-257,5),s0($,J-1,5),s0($,q-4,4);for(X=0;X<q;X++)s0($,$.bl_tree[z9[X]*2+1],3);K9($,$.dyn_ltree,Q-1),K9($,$.dyn_dtree,J-1)}function RB($){var Q=4093624447,J;for(J=0;J<=31;J++,Q>>>=1)if(Q&1&&$.dyn_ltree[J*2]!==0)return B9;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return U9;for(J=32;J<i6;J++)if($.dyn_ltree[J*2]!==0)return U9;return B9}var j9=!1;function IB($){if(!j9)DB(),j9=!0;$.l_desc=new W4($.dyn_ltree,O9),$.d_desc=new W4($.dyn_dtree,N9),$.bl_desc=new W4($.bl_tree,D9),$.bi_buf=0,$.bi_valid=0,R9($)}function S9($,Q,J,q){s0($,(jB<<1)+(q?1:0),3),PB($,Q,J,!0)}function SB($){s0($,H9<<1,3),C2($,M4,u2),OB($)}function EB($,Q,J,q){var X,Y,B=0;if($.level>0){if($.strm.data_type===KB)$.strm.data_type=RB($);if(K4($,$.l_desc),K4($,$.d_desc),B=AB($),X=$.opt_len+3+7>>>3,Y=$.static_len+3+7>>>3,Y<=X)X=Y}else X=Y=J+5;if(J+4<=X&&Q!==-1)S9($,Q,J,q);else if($.strategy===VB||Y===X)s0($,(H9<<1)+(q?1:0),3),G9($,u2,u6);else s0($,(HB<<1)+(q?1:0),3),CB($,$.l_desc.max_code+1,$.d_desc.max_code+1,B+1),G9($,$.dyn_ltree,$.dyn_dtree);if(R9($),q)I9($)}function vB($,Q,J){if($.pending_buf[$.d_buf+$.last_lit*2]=Q>>>8&255,$.pending_buf[$.d_buf+$.last_lit*2+1]=Q&255,$.pending_buf[$.l_buf+$.last_lit]=J&255,$.last_lit++,Q===0)$.dyn_ltree[J*2]++;else $.matches++,Q--,$.dyn_ltree[(l6[J]+i6+1)*2]++,$.dyn_dtree[P9(Q)*2]++;return $.last_lit===$.lit_bufsize-1}kB._tr_init=IB;kB._tr_stored_block=S9;kB._tr_flush_block=EB;kB._tr_tally=vB;kB._tr_align=SB});var w4=H0((Uj,v9)=>{function yB($,Q,J,q){var X=$&65535|0,Y=$>>>16&65535|0,B=0;while(J!==0){B=J>2000?2000:J,J-=B;do X=X+Q[q++]|0,Y=Y+X|0;while(--B);X%=65521,Y%=65521}return X|Y<<16|0}v9.exports=yB});var L4=H0((Wj,k9)=>{function _B(){var $,Q=[];for(var J=0;J<256;J++){$=J;for(var q=0;q<8;q++)$=$&1?3988292384^$>>>1:$>>>1;Q[J]=$}return Q}var bB=_B();function hB($,Q,J,q){var X=bB,Y=q+J;$^=-1;for(var B=q;B<Y;B++)$=$>>>8^X[($^Q[B])&255];return $^-1}k9.exports=hB});var _8=H0((Gj,Z9)=>{Z9.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 m9=H0((zU)=>{var n0=m2(),B2=E9(),f9=w4(),e2=L4(),mB=_8(),S1=0,uB=1,cB=3,X1=4,T9=5,I2=0,g9=1,U2=-2,pB=-3,z4=-5,lB=-1,dB=1,b8=2,iB=3,nB=4,oB=0,rB=2,c8=8,aB=9,sB=15,tB=8,eB=29,$U=256,N4=$U+1+eB,QU=30,JU=19,qU=2*N4+1,XU=15,R0=3,J1=258,V2=J1+R0+1,YU=32,p8=42,D4=69,h8=73,m8=91,u8=103,C1=113,o6=666,y0=1,r6=2,R1=3,$6=4,BU=3;function q1($,Q){return $.msg=mB[Q],Q}function x9($){return($<<1)-($>4?9:0)}function Q1($){var Q=$.length;while(--Q>=0)$[Q]=0}function $1($){var Q=$.state,J=Q.pending;if(J>$.avail_out)J=$.avail_out;if(J===0)return;if(n0.arraySet($.output,Q.pending_buf,Q.pending_out,J,$.next_out),$.next_out+=J,Q.pending_out+=J,$.total_out+=J,$.avail_out-=J,Q.pending-=J,Q.pending===0)Q.pending_out=0}function b0($,Q){B2._tr_flush_block($,$.block_start>=0?$.block_start:-1,$.strstart-$.block_start,Q),$.block_start=$.strstart,$1($.strm)}function I0($,Q){$.pending_buf[$.pending++]=Q}function n6($,Q){$.pending_buf[$.pending++]=Q>>>8&255,$.pending_buf[$.pending++]=Q&255}function UU($,Q,J,q){var X=$.avail_in;if(X>q)X=q;if(X===0)return 0;if($.avail_in-=X,n0.arraySet(Q,$.input,$.next_in,X,J),$.state.wrap===1)$.adler=f9($.adler,Q,X,J);else if($.state.wrap===2)$.adler=e2($.adler,Q,X,J);return $.next_in+=X,$.total_in+=X,X}function y9($,Q){var{max_chain_length:J,strstart:q}=$,X,Y,B=$.prev_length,U=$.nice_match,W=$.strstart>$.w_size-V2?$.strstart-($.w_size-V2):0,G=$.window,V=$.w_mask,F=$.prev,M=$.strstart+J1,j=G[q+B-1],f=G[q+B];if($.prev_length>=$.good_match)J>>=2;if(U>$.lookahead)U=$.lookahead;do{if(X=Q,G[X+B]!==f||G[X+B-1]!==j||G[X]!==G[q]||G[++X]!==G[q+1])continue;q+=2,X++;do;while(G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&G[++q]===G[++X]&&q<M);if(Y=J1-(M-q),q=M-J1,Y>B){if($.match_start=Q,B=Y,Y>=U)break;j=G[q+B-1],f=G[q+B]}}while((Q=F[Q&V])>W&&--J!==0);if(B<=$.lookahead)return B;return $.lookahead}function I1($){var Q=$.w_size,J,q,X,Y,B;do{if(Y=$.window_size-$.lookahead-$.strstart,$.strstart>=Q+(Q-V2)){n0.arraySet($.window,$.window,Q,Q,0),$.match_start-=Q,$.strstart-=Q,$.block_start-=Q,q=$.hash_size,J=q;do X=$.head[--J],$.head[J]=X>=Q?X-Q:0;while(--q);q=Q,J=q;do X=$.prev[--J],$.prev[J]=X>=Q?X-Q:0;while(--q);Y+=Q}if($.strm.avail_in===0)break;if(q=UU($.strm,$.window,$.strstart+$.lookahead,Y),$.lookahead+=q,$.lookahead+$.insert>=R0){B=$.strstart-$.insert,$.ins_h=$.window[B],$.ins_h=($.ins_h<<$.hash_shift^$.window[B+1])&$.hash_mask;while($.insert)if($.ins_h=($.ins_h<<$.hash_shift^$.window[B+R0-1])&$.hash_mask,$.prev[B&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=B,B++,$.insert--,$.lookahead+$.insert<R0)break}}while($.lookahead<V2&&$.strm.avail_in!==0)}function WU($,Q){var J=65535;if(J>$.pending_buf_size-5)J=$.pending_buf_size-5;for(;;){if($.lookahead<=1){if(I1($),$.lookahead===0&&Q===S1)return y0;if($.lookahead===0)break}$.strstart+=$.lookahead,$.lookahead=0;var q=$.block_start+J;if($.strstart===0||$.strstart>=q){if($.lookahead=$.strstart-q,$.strstart=q,b0($,!1),$.strm.avail_out===0)return y0}if($.strstart-$.block_start>=$.w_size-V2){if(b0($,!1),$.strm.avail_out===0)return y0}}if($.insert=0,Q===X1){if(b0($,!0),$.strm.avail_out===0)return R1;return $6}if($.strstart>$.block_start){if(b0($,!1),$.strm.avail_out===0)return y0}return y0}function O4($,Q){var J,q;for(;;){if($.lookahead<V2){if(I1($),$.lookahead<V2&&Q===S1)return y0;if($.lookahead===0)break}if(J=0,$.lookahead>=R0)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+R0-1])&$.hash_mask,J=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;if(J!==0&&$.strstart-J<=$.w_size-V2)$.match_length=y9($,J);if($.match_length>=R0)if(q=B2._tr_tally($,$.strstart-$.match_start,$.match_length-R0),$.lookahead-=$.match_length,$.match_length<=$.max_lazy_match&&$.lookahead>=R0){$.match_length--;do $.strstart++,$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+R0-1])&$.hash_mask,J=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.match_length!==0);$.strstart++}else $.strstart+=$.match_length,$.match_length=0,$.ins_h=$.window[$.strstart],$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+1])&$.hash_mask;else q=B2._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(q){if(b0($,!1),$.strm.avail_out===0)return y0}}if($.insert=$.strstart<R0-1?$.strstart:R0-1,Q===X1){if(b0($,!0),$.strm.avail_out===0)return R1;return $6}if($.last_lit){if(b0($,!1),$.strm.avail_out===0)return y0}return r6}function t1($,Q){var J,q,X;for(;;){if($.lookahead<V2){if(I1($),$.lookahead<V2&&Q===S1)return y0;if($.lookahead===0)break}if(J=0,$.lookahead>=R0)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+R0-1])&$.hash_mask,J=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;if($.prev_length=$.match_length,$.prev_match=$.match_start,$.match_length=R0-1,J!==0&&$.prev_length<$.max_lazy_match&&$.strstart-J<=$.w_size-V2){if($.match_length=y9($,J),$.match_length<=5&&($.strategy===dB||$.match_length===R0&&$.strstart-$.match_start>4096))$.match_length=R0-1}if($.prev_length>=R0&&$.match_length<=$.prev_length){X=$.strstart+$.lookahead-R0,q=B2._tr_tally($,$.strstart-1-$.prev_match,$.prev_length-R0),$.lookahead-=$.prev_length-1,$.prev_length-=2;do if(++$.strstart<=X)$.ins_h=($.ins_h<<$.hash_shift^$.window[$.strstart+R0-1])&$.hash_mask,J=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.prev_length!==0);if($.match_available=0,$.match_length=R0-1,$.strstart++,q){if(b0($,!1),$.strm.avail_out===0)return y0}}else if($.match_available){if(q=B2._tr_tally($,0,$.window[$.strstart-1]),q)b0($,!1);if($.strstart++,$.lookahead--,$.strm.avail_out===0)return y0}else $.match_available=1,$.strstart++,$.lookahead--}if($.match_available)q=B2._tr_tally($,0,$.window[$.strstart-1]),$.match_available=0;if($.insert=$.strstart<R0-1?$.strstart:R0-1,Q===X1){if(b0($,!0),$.strm.avail_out===0)return R1;return $6}if($.last_lit){if(b0($,!1),$.strm.avail_out===0)return y0}return r6}function GU($,Q){var J,q,X,Y,B=$.window;for(;;){if($.lookahead<=J1){if(I1($),$.lookahead<=J1&&Q===S1)return y0;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=R0&&$.strstart>0){if(X=$.strstart-1,q=B[X],q===B[++X]&&q===B[++X]&&q===B[++X]){Y=$.strstart+J1;do;while(q===B[++X]&&q===B[++X]&&q===B[++X]&&q===B[++X]&&q===B[++X]&&q===B[++X]&&q===B[++X]&&q===B[++X]&&X<Y);if($.match_length=J1-(Y-X),$.match_length>$.lookahead)$.match_length=$.lookahead}}if($.match_length>=R0)J=B2._tr_tally($,1,$.match_length-R0),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0;else J=B2._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(J){if(b0($,!1),$.strm.avail_out===0)return y0}}if($.insert=0,Q===X1){if(b0($,!0),$.strm.avail_out===0)return R1;return $6}if($.last_lit){if(b0($,!1),$.strm.avail_out===0)return y0}return r6}function VU($,Q){var J;for(;;){if($.lookahead===0){if(I1($),$.lookahead===0){if(Q===S1)return y0;break}}if($.match_length=0,J=B2._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,J){if(b0($,!1),$.strm.avail_out===0)return y0}}if($.insert=0,Q===X1){if(b0($,!0),$.strm.avail_out===0)return R1;return $6}if($.last_lit){if(b0($,!1),$.strm.avail_out===0)return y0}return r6}function R2($,Q,J,q,X){this.good_length=$,this.max_lazy=Q,this.nice_length=J,this.max_chain=q,this.func=X}var e1;e1=[new R2(0,0,0,0,WU),new R2(4,4,8,4,O4),new R2(4,5,16,8,O4),new R2(4,6,32,32,O4),new R2(4,4,16,16,t1),new R2(8,16,32,32,t1),new R2(8,16,128,128,t1),new R2(8,32,128,256,t1),new R2(32,128,258,1024,t1),new R2(32,258,258,4096,t1)];function KU($){$.window_size=2*$.w_size,Q1($.head),$.max_lazy_match=e1[$.level].max_lazy,$.good_match=e1[$.level].good_length,$.nice_match=e1[$.level].nice_length,$.max_chain_length=e1[$.level].max_chain,$.strstart=0,$.block_start=0,$.lookahead=0,$.insert=0,$.match_length=$.prev_length=R0-1,$.match_available=0,$.ins_h=0}function jU(){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=c8,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 n0.Buf16(qU*2),this.dyn_dtree=new n0.Buf16((2*QU+1)*2),this.bl_tree=new n0.Buf16((2*JU+1)*2),Q1(this.dyn_ltree),Q1(this.dyn_dtree),Q1(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n0.Buf16(XU+1),this.heap=new n0.Buf16(2*N4+1),Q1(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n0.Buf16(2*N4+1),Q1(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 _9($){var Q;if(!$||!$.state)return q1($,U2);if($.total_in=$.total_out=0,$.data_type=rB,Q=$.state,Q.pending=0,Q.pending_out=0,Q.wrap<0)Q.wrap=-Q.wrap;return Q.status=Q.wrap?p8:C1,$.adler=Q.wrap===2?0:1,Q.last_flush=S1,B2._tr_init(Q),I2}function b9($){var Q=_9($);if(Q===I2)KU($.state);return Q}function HU($,Q){if(!$||!$.state)return U2;if($.state.wrap!==2)return U2;return $.state.gzhead=Q,I2}function h9($,Q,J,q,X,Y){if(!$)return U2;var B=1;if(Q===lB)Q=6;if(q<0)B=0,q=-q;else if(q>15)B=2,q-=16;if(X<1||X>aB||J!==c8||q<8||q>15||Q<0||Q>9||Y<0||Y>nB)return q1($,U2);if(q===8)q=9;var U=new jU;return $.state=U,U.strm=$,U.wrap=B,U.gzhead=null,U.w_bits=q,U.w_size=1<<U.w_bits,U.w_mask=U.w_size-1,U.hash_bits=X+7,U.hash_size=1<<U.hash_bits,U.hash_mask=U.hash_size-1,U.hash_shift=~~((U.hash_bits+R0-1)/R0),U.window=new n0.Buf8(U.w_size*2),U.head=new n0.Buf16(U.hash_size),U.prev=new n0.Buf16(U.w_size),U.lit_bufsize=1<<X+6,U.pending_buf_size=U.lit_bufsize*4,U.pending_buf=new n0.Buf8(U.pending_buf_size),U.d_buf=1*U.lit_bufsize,U.l_buf=3*U.lit_bufsize,U.level=Q,U.strategy=Y,U.method=J,b9($)}function MU($,Q){return h9($,Q,c8,sB,tB,oB)}function FU($,Q){var J,q,X,Y;if(!$||!$.state||Q>T9||Q<0)return $?q1($,U2):U2;if(q=$.state,!$.output||!$.input&&$.avail_in!==0||q.status===o6&&Q!==X1)return q1($,$.avail_out===0?z4:U2);if(q.strm=$,J=q.last_flush,q.last_flush=Q,q.status===p8)if(q.wrap===2)if($.adler=0,I0(q,31),I0(q,139),I0(q,8),!q.gzhead)I0(q,0),I0(q,0),I0(q,0),I0(q,0),I0(q,0),I0(q,q.level===9?2:q.strategy>=b8||q.level<2?4:0),I0(q,BU),q.status=C1;else{if(I0(q,(q.gzhead.text?1:0)+(q.gzhead.hcrc?2:0)+(!q.gzhead.extra?0:4)+(!q.gzhead.name?0:8)+(!q.gzhead.comment?0:16)),I0(q,q.gzhead.time&255),I0(q,q.gzhead.time>>8&255),I0(q,q.gzhead.time>>16&255),I0(q,q.gzhead.time>>24&255),I0(q,q.level===9?2:q.strategy>=b8||q.level<2?4:0),I0(q,q.gzhead.os&255),q.gzhead.extra&&q.gzhead.extra.length)I0(q,q.gzhead.extra.length&255),I0(q,q.gzhead.extra.length>>8&255);if(q.gzhead.hcrc)$.adler=e2($.adler,q.pending_buf,q.pending,0);q.gzindex=0,q.status=D4}else{var B=c8+(q.w_bits-8<<4)<<8,U=-1;if(q.strategy>=b8||q.level<2)U=0;else if(q.level<6)U=1;else if(q.level===6)U=2;else U=3;if(B|=U<<6,q.strstart!==0)B|=YU;if(B+=31-B%31,q.status=C1,n6(q,B),q.strstart!==0)n6(q,$.adler>>>16),n6(q,$.adler&65535);$.adler=1}if(q.status===D4)if(q.gzhead.extra){X=q.pending;while(q.gzindex<(q.gzhead.extra.length&65535)){if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>X)$.adler=e2($.adler,q.pending_buf,q.pending-X,X);if($1($),X=q.pending,q.pending===q.pending_buf_size)break}I0(q,q.gzhead.extra[q.gzindex]&255),q.gzindex++}if(q.gzhead.hcrc&&q.pending>X)$.adler=e2($.adler,q.pending_buf,q.pending-X,X);if(q.gzindex===q.gzhead.extra.length)q.gzindex=0,q.status=h8}else q.status=h8;if(q.status===h8)if(q.gzhead.name){X=q.pending;do{if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>X)$.adler=e2($.adler,q.pending_buf,q.pending-X,X);if($1($),X=q.pending,q.pending===q.pending_buf_size){Y=1;break}}if(q.gzindex<q.gzhead.name.length)Y=q.gzhead.name.charCodeAt(q.gzindex++)&255;else Y=0;I0(q,Y)}while(Y!==0);if(q.gzhead.hcrc&&q.pending>X)$.adler=e2($.adler,q.pending_buf,q.pending-X,X);if(Y===0)q.gzindex=0,q.status=m8}else q.status=m8;if(q.status===m8)if(q.gzhead.comment){X=q.pending;do{if(q.pending===q.pending_buf_size){if(q.gzhead.hcrc&&q.pending>X)$.adler=e2($.adler,q.pending_buf,q.pending-X,X);if($1($),X=q.pending,q.pending===q.pending_buf_size){Y=1;break}}if(q.gzindex<q.gzhead.comment.length)Y=q.gzhead.comment.charCodeAt(q.gzindex++)&255;else Y=0;I0(q,Y)}while(Y!==0);if(q.gzhead.hcrc&&q.pending>X)$.adler=e2($.adler,q.pending_buf,q.pending-X,X);if(Y===0)q.status=u8}else q.status=u8;if(q.status===u8)if(q.gzhead.hcrc){if(q.pending+2>q.pending_buf_size)$1($);if(q.pending+2<=q.pending_buf_size)I0(q,$.adler&255),I0(q,$.adler>>8&255),$.adler=0,q.status=C1}else q.status=C1;if(q.pending!==0){if($1($),$.avail_out===0)return q.last_flush=-1,I2}else if($.avail_in===0&&x9(Q)<=x9(J)&&Q!==X1)return q1($,z4);if(q.status===o6&&$.avail_in!==0)return q1($,z4);if($.avail_in!==0||q.lookahead!==0||Q!==S1&&q.status!==o6){var W=q.strategy===b8?VU(q,Q):q.strategy===iB?GU(q,Q):e1[q.level].func(q,Q);if(W===R1||W===$6)q.status=o6;if(W===y0||W===R1){if($.avail_out===0)q.last_flush=-1;return I2}if(W===r6){if(Q===uB)B2._tr_align(q);else if(Q!==T9){if(B2._tr_stored_block(q,0,0,!1),Q===cB){if(Q1(q.head),q.lookahead===0)q.strstart=0,q.block_start=0,q.insert=0}}if($1($),$.avail_out===0)return q.last_flush=-1,I2}}if(Q!==X1)return I2;if(q.wrap<=0)return g9;if(q.wrap===2)I0(q,$.adler&255),I0(q,$.adler>>8&255),I0(q,$.adler>>16&255),I0(q,$.adler>>24&255),I0(q,$.total_in&255),I0(q,$.total_in>>8&255),I0(q,$.total_in>>16&255),I0(q,$.total_in>>24&255);else n6(q,$.adler>>>16),n6(q,$.adler&65535);if($1($),q.wrap>0)q.wrap=-q.wrap;return q.pending!==0?I2:g9}function wU($){var Q;if(!$||!$.state)return U2;if(Q=$.state.status,Q!==p8&&Q!==D4&&Q!==h8&&Q!==m8&&Q!==u8&&Q!==C1&&Q!==o6)return q1($,U2);return $.state=null,Q===C1?q1($,pB):I2}function LU($,Q){var J=Q.length,q,X,Y,B,U,W,G,V;if(!$||!$.state)return U2;if(q=$.state,B=q.wrap,B===2||B===1&&q.status!==p8||q.lookahead)return U2;if(B===1)$.adler=f9($.adler,Q,J,0);if(q.wrap=0,J>=q.w_size){if(B===0)Q1(q.head),q.strstart=0,q.block_start=0,q.insert=0;V=new n0.Buf8(q.w_size),n0.arraySet(V,Q,J-q.w_size,q.w_size,0),Q=V,J=q.w_size}U=$.avail_in,W=$.next_in,G=$.input,$.avail_in=J,$.next_in=0,$.input=Q,I1(q);while(q.lookahead>=R0){X=q.strstart,Y=q.lookahead-(R0-1);do q.ins_h=(q.ins_h<<q.hash_shift^q.window[X+R0-1])&q.hash_mask,q.prev[X&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=X,X++;while(--Y);q.strstart=X,q.lookahead=R0-1,I1(q)}return q.strstart+=q.lookahead,q.block_start=q.strstart,q.insert=q.lookahead,q.lookahead=0,q.match_length=q.prev_length=R0-1,q.match_available=0,$.next_in=W,$.input=G,$.avail_in=U,q.wrap=B,I2}zU.deflateInit=MU;zU.deflateInit2=h9;zU.deflateReset=b9;zU.deflateResetKeep=_9;zU.deflateSetHeader=HU;zU.deflate=FU;zU.deflateEnd=wU;zU.deflateSetDictionary=LU;zU.deflateInfo="pako deflate (from Nodeca project)"});var P4=H0((EU)=>{var l8=m2(),u9=!0,c9=!0;try{String.fromCharCode.apply(null,[0])}catch($){u9=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch($){c9=!1}var a6=new l8.Buf8(256);for(S2=0;S2<256;S2++)a6[S2]=S2>=252?6:S2>=248?5:S2>=240?4:S2>=224?3:S2>=192?2:1;var S2;a6[254]=a6[254]=1;EU.string2buf=function($){var Q,J,q,X,Y,B=$.length,U=0;for(X=0;X<B;X++){if(J=$.charCodeAt(X),(J&64512)===55296&&X+1<B){if(q=$.charCodeAt(X+1),(q&64512)===56320)J=65536+(J-55296<<10)+(q-56320),X++}U+=J<128?1:J<2048?2:J<65536?3:4}Q=new l8.Buf8(U);for(Y=0,X=0;Y<U;X++){if(J=$.charCodeAt(X),(J&64512)===55296&&X+1<B){if(q=$.charCodeAt(X+1),(q&64512)===56320)J=65536+(J-55296<<10)+(q-56320),X++}if(J<128)Q[Y++]=J;else if(J<2048)Q[Y++]=192|J>>>6,Q[Y++]=128|J&63;else if(J<65536)Q[Y++]=224|J>>>12,Q[Y++]=128|J>>>6&63,Q[Y++]=128|J&63;else Q[Y++]=240|J>>>18,Q[Y++]=128|J>>>12&63,Q[Y++]=128|J>>>6&63,Q[Y++]=128|J&63}return Q};function p9($,Q){if(Q<65534){if($.subarray&&c9||!$.subarray&&u9)return String.fromCharCode.apply(null,l8.shrinkBuf($,Q))}var J="";for(var q=0;q<Q;q++)J+=String.fromCharCode($[q]);return J}EU.buf2binstring=function($){return p9($,$.length)};EU.binstring2buf=function($){var Q=new l8.Buf8($.length);for(var J=0,q=Q.length;J<q;J++)Q[J]=$.charCodeAt(J);return Q};EU.buf2string=function($,Q){var J,q,X,Y,B=Q||$.length,U=Array(B*2);for(q=0,J=0;J<B;){if(X=$[J++],X<128){U[q++]=X;continue}if(Y=a6[X],Y>4){U[q++]=65533,J+=Y-1;continue}X&=Y===2?31:Y===3?15:7;while(Y>1&&J<B)X=X<<6|$[J++]&63,Y--;if(Y>1){U[q++]=65533;continue}if(X<65536)U[q++]=X;else X-=65536,U[q++]=55296|X>>10&1023,U[q++]=56320|X&1023}return p9(U,q)};EU.utf8border=function($,Q){var J;if(Q=Q||$.length,Q>$.length)Q=$.length;J=Q-1;while(J>=0&&($[J]&192)===128)J--;if(J<0)return Q;if(J===0)return Q;return J+a6[$[J]]>Q?J:Q}});var A4=H0((jj,l9)=>{function xU(){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}l9.exports=xU});var o9=H0((cU)=>{var s6=m9(),t6=m2(),R4=P4(),I4=_8(),fU=A4(),n9=Object.prototype.toString,yU=0,C4=4,Q6=0,d9=1,i9=2,_U=-1,bU=0,hU=8;function E1($){if(!(this instanceof E1))return new E1($);this.options=t6.assign({level:_U,method:hU,chunkSize:16384,windowBits:15,memLevel:8,strategy:bU,to:""},$||{});var Q=this.options;if(Q.raw&&Q.windowBits>0)Q.windowBits=-Q.windowBits;else if(Q.gzip&&Q.windowBits>0&&Q.windowBits<16)Q.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new fU,this.strm.avail_out=0;var J=s6.deflateInit2(this.strm,Q.level,Q.method,Q.windowBits,Q.memLevel,Q.strategy);if(J!==Q6)throw Error(I4[J]);if(Q.header)s6.deflateSetHeader(this.strm,Q.header);if(Q.dictionary){var q;if(typeof Q.dictionary==="string")q=R4.string2buf(Q.dictionary);else if(n9.call(Q.dictionary)==="[object ArrayBuffer]")q=new Uint8Array(Q.dictionary);else q=Q.dictionary;if(J=s6.deflateSetDictionary(this.strm,q),J!==Q6)throw Error(I4[J]);this._dict_set=!0}}E1.prototype.push=function($,Q){var J=this.strm,q=this.options.chunkSize,X,Y;if(this.ended)return!1;if(Y=Q===~~Q?Q:Q===!0?C4:yU,typeof $==="string")J.input=R4.string2buf($);else if(n9.call($)==="[object ArrayBuffer]")J.input=new Uint8Array($);else J.input=$;J.next_in=0,J.avail_in=J.input.length;do{if(J.avail_out===0)J.output=new t6.Buf8(q),J.next_out=0,J.avail_out=q;if(X=s6.deflate(J,Y),X!==d9&&X!==Q6)return this.onEnd(X),this.ended=!0,!1;if(J.avail_out===0||J.avail_in===0&&(Y===C4||Y===i9))if(this.options.to==="string")this.onData(R4.buf2binstring(t6.shrinkBuf(J.output,J.next_out)));else this.onData(t6.shrinkBuf(J.output,J.next_out))}while((J.avail_in>0||J.avail_out===0)&&X!==d9);if(Y===C4)return X=s6.deflateEnd(this.strm),this.onEnd(X),this.ended=!0,X===Q6;if(Y===i9)return this.onEnd(Q6),J.avail_out=0,!0;return!0};E1.prototype.onData=function($){this.chunks.push($)};E1.prototype.onEnd=function($){if($===Q6)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=t6.flattenChunks(this.chunks);this.chunks=[],this.err=$,this.msg=this.strm.msg};function S4($,Q){var J=new E1(Q);if(J.push($,!0),J.err)throw J.msg||I4[J.err];return J.result}function mU($,Q){return Q=Q||{},Q.raw=!0,S4($,Q)}function uU($,Q){return Q=Q||{},Q.gzip=!0,S4($,Q)}cU.Deflate=E1;cU.deflate=S4;cU.deflateRaw=mU;cU.gzip=uU});var a9=H0((Mj,r9)=>{var d8=30,nU=12;r9.exports=function(Q,J){var q,X,Y,B,U,W,G,V,F,M,j,f,T,D,P,K,L,z,A,_,Z,l,S,E,C;q=Q.state,X=Q.next_in,E=Q.input,Y=X+(Q.avail_in-5),B=Q.next_out,C=Q.output,U=B-(J-Q.avail_out),W=B+(Q.avail_out-257),G=q.dmax,V=q.wsize,F=q.whave,M=q.wnext,j=q.window,f=q.hold,T=q.bits,D=q.lencode,P=q.distcode,K=(1<<q.lenbits)-1,L=(1<<q.distbits)-1;$:do{if(T<15)f+=E[X++]<<T,T+=8,f+=E[X++]<<T,T+=8;z=D[f&K];Q:for(;;){if(A=z>>>24,f>>>=A,T-=A,A=z>>>16&255,A===0)C[B++]=z&65535;else if(A&16){if(_=z&65535,A&=15,A){if(T<A)f+=E[X++]<<T,T+=8;_+=f&(1<<A)-1,f>>>=A,T-=A}if(T<15)f+=E[X++]<<T,T+=8,f+=E[X++]<<T,T+=8;z=P[f&L];J:for(;;){if(A=z>>>24,f>>>=A,T-=A,A=z>>>16&255,A&16){if(Z=z&65535,A&=15,T<A){if(f+=E[X++]<<T,T+=8,T<A)f+=E[X++]<<T,T+=8}if(Z+=f&(1<<A)-1,Z>G){Q.msg="invalid distance too far back",q.mode=d8;break $}if(f>>>=A,T-=A,A=B-U,Z>A){if(A=Z-A,A>F){if(q.sane){Q.msg="invalid distance too far back",q.mode=d8;break $}}if(l=0,S=j,M===0){if(l+=V-A,A<_){_-=A;do C[B++]=j[l++];while(--A);l=B-Z,S=C}}else if(M<A){if(l+=V+M-A,A-=M,A<_){_-=A;do C[B++]=j[l++];while(--A);if(l=0,M<_){A=M,_-=A;do C[B++]=j[l++];while(--A);l=B-Z,S=C}}}else if(l+=M-A,A<_){_-=A;do C[B++]=j[l++];while(--A);l=B-Z,S=C}while(_>2)C[B++]=S[l++],C[B++]=S[l++],C[B++]=S[l++],_-=3;if(_){if(C[B++]=S[l++],_>1)C[B++]=S[l++]}}else{l=B-Z;do C[B++]=C[l++],C[B++]=C[l++],C[B++]=C[l++],_-=3;while(_>2);if(_){if(C[B++]=C[l++],_>1)C[B++]=C[l++]}}}else if((A&64)===0){z=P[(z&65535)+(f&(1<<A)-1)];continue J}else{Q.msg="invalid distance code",q.mode=d8;break $}break}}else if((A&64)===0){z=D[(z&65535)+(f&(1<<A)-1)];continue Q}else if(A&32){q.mode=nU;break $}else{Q.msg="invalid literal/length code",q.mode=d8;break $}break}}while(X<Y&&B<W);_=T>>3,X-=_,T-=_<<3,f&=(1<<T)-1,Q.next_in=X,Q.next_out=B,Q.avail_in=X<Y?5+(Y-X):5-(X-Y),Q.avail_out=B<W?257+(W-B):257-(B-W),q.hold=f,q.bits=T;return}});var qQ=H0((Fj,JQ)=>{var s9=m2(),J6=15,t9=852,e9=592,$Q=0,E4=1,QQ=2,oU=[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],rU=[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],aU=[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],sU=[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];JQ.exports=function(Q,J,q,X,Y,B,U,W){var G=W.bits,V=0,F=0,M=0,j=0,f=0,T=0,D=0,P=0,K=0,L=0,z,A,_,Z,l,S=null,E=0,C,O=new s9.Buf16(J6+1),g=new s9.Buf16(J6+1),y=null,k=0,s,J0,U0;for(V=0;V<=J6;V++)O[V]=0;for(F=0;F<X;F++)O[J[q+F]]++;f=G;for(j=J6;j>=1;j--)if(O[j]!==0)break;if(f>j)f=j;if(j===0)return Y[B++]=20971520,Y[B++]=20971520,W.bits=1,0;for(M=1;M<j;M++)if(O[M]!==0)break;if(f<M)f=M;P=1;for(V=1;V<=J6;V++)if(P<<=1,P-=O[V],P<0)return-1;if(P>0&&(Q===$Q||j!==1))return-1;g[1]=0;for(V=1;V<J6;V++)g[V+1]=g[V]+O[V];for(F=0;F<X;F++)if(J[q+F]!==0)U[g[J[q+F]]++]=F;if(Q===$Q)S=y=U,C=19;else if(Q===E4)S=oU,E-=257,y=rU,k-=257,C=256;else S=aU,y=sU,C=-1;if(L=0,F=0,V=M,l=B,T=f,D=0,_=-1,K=1<<f,Z=K-1,Q===E4&&K>t9||Q===QQ&&K>e9)return 1;for(;;){if(s=V-D,U[F]<C)J0=0,U0=U[F];else if(U[F]>C)J0=y[k+U[F]],U0=S[E+U[F]];else J0=96,U0=0;z=1<<V-D,A=1<<T,M=A;do A-=z,Y[l+(L>>D)+A]=s<<24|J0<<16|U0|0;while(A!==0);z=1<<V-1;while(L&z)z>>=1;if(z!==0)L&=z-1,L+=z;else L=0;if(F++,--O[V]===0){if(V===j)break;V=J[q+U[F]]}if(V>f&&(L&Z)!==_){if(D===0)D=f;l+=M,T=V-D,P=1<<T;while(T+D<j){if(P-=O[T+D],P<=0)break;T++,P<<=1}if(K+=1<<T,Q===E4&&K>t9||Q===QQ&&K>e9)return 1;_=L&Z,Y[_]=f<<24|T<<16|l-B|0}}if(L!==0)Y[l+L]=V-D<<24|4194304|0;return W.bits=f,0}});var bQ=H0((wW)=>{var $2=m2(),x4=w4(),E2=L4(),tU=a9(),e6=qQ(),eU=0,vQ=1,kQ=2,XQ=4,$W=5,i8=6,v1=0,QW=1,JW=2,W2=-2,ZQ=-3,f4=-4,qW=-5,YQ=8,TQ=1,BQ=2,UQ=3,WQ=4,GQ=5,VQ=6,KQ=7,jQ=8,HQ=9,MQ=10,r8=11,c2=12,v4=13,FQ=14,k4=15,wQ=16,LQ=17,zQ=18,OQ=19,n8=20,o8=21,NQ=22,DQ=23,PQ=24,AQ=25,CQ=26,Z4=27,RQ=28,IQ=29,Z0=30,y4=31,XW=32,YW=852,BW=592,UW=15,WW=UW;function SQ($){return($>>>24&255)+($>>>8&65280)+(($&65280)<<8)+(($&255)<<24)}function GW(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new $2.Buf16(320),this.work=new $2.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function gQ($){var Q;if(!$||!$.state)return W2;if(Q=$.state,$.total_in=$.total_out=Q.total=0,$.msg="",Q.wrap)$.adler=Q.wrap&1;return Q.mode=TQ,Q.last=0,Q.havedict=0,Q.dmax=32768,Q.head=null,Q.hold=0,Q.bits=0,Q.lencode=Q.lendyn=new $2.Buf32(YW),Q.distcode=Q.distdyn=new $2.Buf32(BW),Q.sane=1,Q.back=-1,v1}function xQ($){var Q;if(!$||!$.state)return W2;return Q=$.state,Q.wsize=0,Q.whave=0,Q.wnext=0,gQ($)}function fQ($,Q){var J,q;if(!$||!$.state)return W2;if(q=$.state,Q<0)J=0,Q=-Q;else if(J=(Q>>4)+1,Q<48)Q&=15;if(Q&&(Q<8||Q>15))return W2;if(q.window!==null&&q.wbits!==Q)q.window=null;return q.wrap=J,q.wbits=Q,xQ($)}function yQ($,Q){var J,q;if(!$)return W2;if(q=new GW,$.state=q,q.window=null,J=fQ($,Q),J!==v1)$.state=null;return J}function VW($){return yQ($,WW)}var EQ=!0,T4,g4;function KW($){if(EQ){var Q;T4=new $2.Buf32(512),g4=new $2.Buf32(32),Q=0;while(Q<144)$.lens[Q++]=8;while(Q<256)$.lens[Q++]=9;while(Q<280)$.lens[Q++]=7;while(Q<288)$.lens[Q++]=8;e6(vQ,$.lens,0,288,T4,0,$.work,{bits:9}),Q=0;while(Q<32)$.lens[Q++]=5;e6(kQ,$.lens,0,32,g4,0,$.work,{bits:5}),EQ=!1}$.lencode=T4,$.lenbits=9,$.distcode=g4,$.distbits=5}function _Q($,Q,J,q){var X,Y=$.state;if(Y.window===null)Y.wsize=1<<Y.wbits,Y.wnext=0,Y.whave=0,Y.window=new $2.Buf8(Y.wsize);if(q>=Y.wsize)$2.arraySet(Y.window,Q,J-Y.wsize,Y.wsize,0),Y.wnext=0,Y.whave=Y.wsize;else{if(X=Y.wsize-Y.wnext,X>q)X=q;if($2.arraySet(Y.window,Q,J-q,X,Y.wnext),q-=X,q)$2.arraySet(Y.window,Q,J-q,q,0),Y.wnext=q,Y.whave=Y.wsize;else{if(Y.wnext+=X,Y.wnext===Y.wsize)Y.wnext=0;if(Y.whave<Y.wsize)Y.whave+=X}}return 0}function jW($,Q){var J,q,X,Y,B,U,W,G,V,F,M,j,f,T,D=0,P,K,L,z,A,_,Z,l,S=new $2.Buf8(4),E,C,O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!$||!$.state||!$.output||!$.input&&$.avail_in!==0)return W2;if(J=$.state,J.mode===c2)J.mode=v4;B=$.next_out,X=$.output,W=$.avail_out,Y=$.next_in,q=$.input,U=$.avail_in,G=J.hold,V=J.bits,F=U,M=W,l=v1;$:for(;;)switch(J.mode){case TQ:if(J.wrap===0){J.mode=v4;break}while(V<16){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(J.wrap&2&&G===35615){J.check=0,S[0]=G&255,S[1]=G>>>8&255,J.check=E2(J.check,S,2,0),G=0,V=0,J.mode=BQ;break}if(J.flags=0,J.head)J.head.done=!1;if(!(J.wrap&1)||(((G&255)<<8)+(G>>8))%31){$.msg="incorrect header check",J.mode=Z0;break}if((G&15)!==YQ){$.msg="unknown compression method",J.mode=Z0;break}if(G>>>=4,V-=4,Z=(G&15)+8,J.wbits===0)J.wbits=Z;else if(Z>J.wbits){$.msg="invalid window size",J.mode=Z0;break}J.dmax=1<<Z,$.adler=J.check=1,J.mode=G&512?MQ:c2,G=0,V=0;break;case BQ:while(V<16){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(J.flags=G,(J.flags&255)!==YQ){$.msg="unknown compression method",J.mode=Z0;break}if(J.flags&57344){$.msg="unknown header flags set",J.mode=Z0;break}if(J.head)J.head.text=G>>8&1;if(J.flags&512)S[0]=G&255,S[1]=G>>>8&255,J.check=E2(J.check,S,2,0);G=0,V=0,J.mode=UQ;case UQ:while(V<32){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(J.head)J.head.time=G;if(J.flags&512)S[0]=G&255,S[1]=G>>>8&255,S[2]=G>>>16&255,S[3]=G>>>24&255,J.check=E2(J.check,S,4,0);G=0,V=0,J.mode=WQ;case WQ:while(V<16){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(J.head)J.head.xflags=G&255,J.head.os=G>>8;if(J.flags&512)S[0]=G&255,S[1]=G>>>8&255,J.check=E2(J.check,S,2,0);G=0,V=0,J.mode=GQ;case GQ:if(J.flags&1024){while(V<16){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(J.length=G,J.head)J.head.extra_len=G;if(J.flags&512)S[0]=G&255,S[1]=G>>>8&255,J.check=E2(J.check,S,2,0);G=0,V=0}else if(J.head)J.head.extra=null;J.mode=VQ;case VQ:if(J.flags&1024){if(j=J.length,j>U)j=U;if(j){if(J.head){if(Z=J.head.extra_len-J.length,!J.head.extra)J.head.extra=Array(J.head.extra_len);$2.arraySet(J.head.extra,q,Y,j,Z)}if(J.flags&512)J.check=E2(J.check,q,j,Y);U-=j,Y+=j,J.length-=j}if(J.length)break $}J.length=0,J.mode=KQ;case KQ:if(J.flags&2048){if(U===0)break $;j=0;do if(Z=q[Y+j++],J.head&&Z&&J.length<65536)J.head.name+=String.fromCharCode(Z);while(Z&&j<U);if(J.flags&512)J.check=E2(J.check,q,j,Y);if(U-=j,Y+=j,Z)break $}else if(J.head)J.head.name=null;J.length=0,J.mode=jQ;case jQ:if(J.flags&4096){if(U===0)break $;j=0;do if(Z=q[Y+j++],J.head&&Z&&J.length<65536)J.head.comment+=String.fromCharCode(Z);while(Z&&j<U);if(J.flags&512)J.check=E2(J.check,q,j,Y);if(U-=j,Y+=j,Z)break $}else if(J.head)J.head.comment=null;J.mode=HQ;case HQ:if(J.flags&512){while(V<16){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(G!==(J.check&65535)){$.msg="header crc mismatch",J.mode=Z0;break}G=0,V=0}if(J.head)J.head.hcrc=J.flags>>9&1,J.head.done=!0;$.adler=J.check=0,J.mode=c2;break;case MQ:while(V<32){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}$.adler=J.check=SQ(G),G=0,V=0,J.mode=r8;case r8:if(J.havedict===0)return $.next_out=B,$.avail_out=W,$.next_in=Y,$.avail_in=U,J.hold=G,J.bits=V,JW;$.adler=J.check=1,J.mode=c2;case c2:if(Q===$W||Q===i8)break $;case v4:if(J.last){G>>>=V&7,V-=V&7,J.mode=Z4;break}while(V<3){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}switch(J.last=G&1,G>>>=1,V-=1,G&3){case 0:J.mode=FQ;break;case 1:if(KW(J),J.mode=n8,Q===i8){G>>>=2,V-=2;break $}break;case 2:J.mode=LQ;break;case 3:$.msg="invalid block type",J.mode=Z0}G>>>=2,V-=2;break;case FQ:G>>>=V&7,V-=V&7;while(V<32){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if((G&65535)!==(G>>>16^65535)){$.msg="invalid stored block lengths",J.mode=Z0;break}if(J.length=G&65535,G=0,V=0,J.mode=k4,Q===i8)break $;case k4:J.mode=wQ;case wQ:if(j=J.length,j){if(j>U)j=U;if(j>W)j=W;if(j===0)break $;$2.arraySet(X,q,Y,j,B),U-=j,Y+=j,W-=j,B+=j,J.length-=j;break}J.mode=c2;break;case LQ:while(V<14){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(J.nlen=(G&31)+257,G>>>=5,V-=5,J.ndist=(G&31)+1,G>>>=5,V-=5,J.ncode=(G&15)+4,G>>>=4,V-=4,J.nlen>286||J.ndist>30){$.msg="too many length or distance symbols",J.mode=Z0;break}J.have=0,J.mode=zQ;case zQ:while(J.have<J.ncode){while(V<3){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}J.lens[O[J.have++]]=G&7,G>>>=3,V-=3}while(J.have<19)J.lens[O[J.have++]]=0;if(J.lencode=J.lendyn,J.lenbits=7,E={bits:J.lenbits},l=e6(eU,J.lens,0,19,J.lencode,0,J.work,E),J.lenbits=E.bits,l){$.msg="invalid code lengths set",J.mode=Z0;break}J.have=0,J.mode=OQ;case OQ:while(J.have<J.nlen+J.ndist){for(;;){if(D=J.lencode[G&(1<<J.lenbits)-1],P=D>>>24,K=D>>>16&255,L=D&65535,P<=V)break;if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(L<16)G>>>=P,V-=P,J.lens[J.have++]=L;else{if(L===16){C=P+2;while(V<C){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(G>>>=P,V-=P,J.have===0){$.msg="invalid bit length repeat",J.mode=Z0;break}Z=J.lens[J.have-1],j=3+(G&3),G>>>=2,V-=2}else if(L===17){C=P+3;while(V<C){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}G>>>=P,V-=P,Z=0,j=3+(G&7),G>>>=3,V-=3}else{C=P+7;while(V<C){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}G>>>=P,V-=P,Z=0,j=11+(G&127),G>>>=7,V-=7}if(J.have+j>J.nlen+J.ndist){$.msg="invalid bit length repeat",J.mode=Z0;break}while(j--)J.lens[J.have++]=Z}}if(J.mode===Z0)break;if(J.lens[256]===0){$.msg="invalid code -- missing end-of-block",J.mode=Z0;break}if(J.lenbits=9,E={bits:J.lenbits},l=e6(vQ,J.lens,0,J.nlen,J.lencode,0,J.work,E),J.lenbits=E.bits,l){$.msg="invalid literal/lengths set",J.mode=Z0;break}if(J.distbits=6,J.distcode=J.distdyn,E={bits:J.distbits},l=e6(kQ,J.lens,J.nlen,J.ndist,J.distcode,0,J.work,E),J.distbits=E.bits,l){$.msg="invalid distances set",J.mode=Z0;break}if(J.mode=n8,Q===i8)break $;case n8:J.mode=o8;case o8:if(U>=6&&W>=258){if($.next_out=B,$.avail_out=W,$.next_in=Y,$.avail_in=U,J.hold=G,J.bits=V,tU($,M),B=$.next_out,X=$.output,W=$.avail_out,Y=$.next_in,q=$.input,U=$.avail_in,G=J.hold,V=J.bits,J.mode===c2)J.back=-1;break}J.back=0;for(;;){if(D=J.lencode[G&(1<<J.lenbits)-1],P=D>>>24,K=D>>>16&255,L=D&65535,P<=V)break;if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(K&&(K&240)===0){z=P,A=K,_=L;for(;;){if(D=J.lencode[_+((G&(1<<z+A)-1)>>z)],P=D>>>24,K=D>>>16&255,L=D&65535,z+P<=V)break;if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}G>>>=z,V-=z,J.back+=z}if(G>>>=P,V-=P,J.back+=P,J.length=L,K===0){J.mode=CQ;break}if(K&32){J.back=-1,J.mode=c2;break}if(K&64){$.msg="invalid literal/length code",J.mode=Z0;break}J.extra=K&15,J.mode=NQ;case NQ:if(J.extra){C=J.extra;while(V<C){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}J.length+=G&(1<<J.extra)-1,G>>>=J.extra,V-=J.extra,J.back+=J.extra}J.was=J.length,J.mode=DQ;case DQ:for(;;){if(D=J.distcode[G&(1<<J.distbits)-1],P=D>>>24,K=D>>>16&255,L=D&65535,P<=V)break;if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if((K&240)===0){z=P,A=K,_=L;for(;;){if(D=J.distcode[_+((G&(1<<z+A)-1)>>z)],P=D>>>24,K=D>>>16&255,L=D&65535,z+P<=V)break;if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}G>>>=z,V-=z,J.back+=z}if(G>>>=P,V-=P,J.back+=P,K&64){$.msg="invalid distance code",J.mode=Z0;break}J.offset=L,J.extra=K&15,J.mode=PQ;case PQ:if(J.extra){C=J.extra;while(V<C){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}J.offset+=G&(1<<J.extra)-1,G>>>=J.extra,V-=J.extra,J.back+=J.extra}if(J.offset>J.dmax){$.msg="invalid distance too far back",J.mode=Z0;break}J.mode=AQ;case AQ:if(W===0)break $;if(j=M-W,J.offset>j){if(j=J.offset-j,j>J.whave){if(J.sane){$.msg="invalid distance too far back",J.mode=Z0;break}}if(j>J.wnext)j-=J.wnext,f=J.wsize-j;else f=J.wnext-j;if(j>J.length)j=J.length;T=J.window}else T=X,f=B-J.offset,j=J.length;if(j>W)j=W;W-=j,J.length-=j;do X[B++]=T[f++];while(--j);if(J.length===0)J.mode=o8;break;case CQ:if(W===0)break $;X[B++]=J.length,W--,J.mode=o8;break;case Z4:if(J.wrap){while(V<32){if(U===0)break $;U--,G|=q[Y++]<<V,V+=8}if(M-=W,$.total_out+=M,J.total+=M,M)$.adler=J.check=J.flags?E2(J.check,X,M,B-M):x4(J.check,X,M,B-M);if(M=W,(J.flags?G:SQ(G))!==J.check){$.msg="incorrect data check",J.mode=Z0;break}G=0,V=0}J.mode=RQ;case RQ:if(J.wrap&&J.flags){while(V<32){if(U===0)break $;U--,G+=q[Y++]<<V,V+=8}if(G!==(J.total&4294967295)){$.msg="incorrect length check",J.mode=Z0;break}G=0,V=0}J.mode=IQ;case IQ:l=QW;break $;case Z0:l=ZQ;break $;case y4:return f4;case XW:default:return W2}if($.next_out=B,$.avail_out=W,$.next_in=Y,$.avail_in=U,J.hold=G,J.bits=V,J.wsize||M!==$.avail_out&&J.mode<Z0&&(J.mode<Z4||Q!==XQ)){if(_Q($,$.output,$.next_out,M-$.avail_out))return J.mode=y4,f4}if(F-=$.avail_in,M-=$.avail_out,$.total_in+=F,$.total_out+=M,J.total+=M,J.wrap&&M)$.adler=J.check=J.flags?E2(J.check,X,M,$.next_out-M):x4(J.check,X,M,$.next_out-M);if($.data_type=J.bits+(J.last?64:0)+(J.mode===c2?128:0)+(J.mode===n8||J.mode===k4?256:0),(F===0&&M===0||Q===XQ)&&l===v1)l=qW;return l}function HW($){if(!$||!$.state)return W2;var Q=$.state;if(Q.window)Q.window=null;return $.state=null,v1}function MW($,Q){var J;if(!$||!$.state)return W2;if(J=$.state,(J.wrap&2)===0)return W2;return J.head=Q,Q.done=!1,v1}function FW($,Q){var J=Q.length,q,X,Y;if(!$||!$.state)return W2;if(q=$.state,q.wrap!==0&&q.mode!==r8)return W2;if(q.mode===r8){if(X=1,X=x4(X,Q,J,0),X!==q.check)return ZQ}if(Y=_Q($,Q,J,J),Y)return q.mode=y4,f4;return q.havedict=1,v1}wW.inflateReset=xQ;wW.inflateReset2=fQ;wW.inflateResetKeep=gQ;wW.inflateInit=VW;wW.inflateInit2=yQ;wW.inflate=jW;wW.inflateEnd=HW;wW.inflateGetHeader=MW;wW.inflateSetDictionary=FW;wW.inflateInfo="pako inflate (from Nodeca project)"});var _4=H0((Lj,hQ)=>{hQ.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 uQ=H0((zj,mQ)=>{function SW(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}mQ.exports=SW});var pQ=H0((ZW)=>{var q6=bQ(),$8=m2(),a8=P4(),f0=_4(),b4=_8(),EW=A4(),vW=uQ(),cQ=Object.prototype.toString;function k1($){if(!(this instanceof k1))return new k1($);this.options=$8.assign({chunkSize:16384,windowBits:0,to:""},$||{});var Q=this.options;if(Q.raw&&Q.windowBits>=0&&Q.windowBits<16){if(Q.windowBits=-Q.windowBits,Q.windowBits===0)Q.windowBits=-15}if(Q.windowBits>=0&&Q.windowBits<16&&!($&&$.windowBits))Q.windowBits+=32;if(Q.windowBits>15&&Q.windowBits<48){if((Q.windowBits&15)===0)Q.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new EW,this.strm.avail_out=0;var J=q6.inflateInit2(this.strm,Q.windowBits);if(J!==f0.Z_OK)throw Error(b4[J]);if(this.header=new vW,q6.inflateGetHeader(this.strm,this.header),Q.dictionary){if(typeof Q.dictionary==="string")Q.dictionary=a8.string2buf(Q.dictionary);else if(cQ.call(Q.dictionary)==="[object ArrayBuffer]")Q.dictionary=new Uint8Array(Q.dictionary);if(Q.raw){if(J=q6.inflateSetDictionary(this.strm,Q.dictionary),J!==f0.Z_OK)throw Error(b4[J])}}}k1.prototype.push=function($,Q){var J=this.strm,q=this.options.chunkSize,X=this.options.dictionary,Y,B,U,W,G,V=!1;if(this.ended)return!1;if(B=Q===~~Q?Q:Q===!0?f0.Z_FINISH:f0.Z_NO_FLUSH,typeof $==="string")J.input=a8.binstring2buf($);else if(cQ.call($)==="[object ArrayBuffer]")J.input=new Uint8Array($);else J.input=$;J.next_in=0,J.avail_in=J.input.length;do{if(J.avail_out===0)J.output=new $8.Buf8(q),J.next_out=0,J.avail_out=q;if(Y=q6.inflate(J,f0.Z_NO_FLUSH),Y===f0.Z_NEED_DICT&&X)Y=q6.inflateSetDictionary(this.strm,X);if(Y===f0.Z_BUF_ERROR&&V===!0)Y=f0.Z_OK,V=!1;if(Y!==f0.Z_STREAM_END&&Y!==f0.Z_OK)return this.onEnd(Y),this.ended=!0,!1;if(J.next_out){if(J.avail_out===0||Y===f0.Z_STREAM_END||J.avail_in===0&&(B===f0.Z_FINISH||B===f0.Z_SYNC_FLUSH))if(this.options.to==="string"){if(U=a8.utf8border(J.output,J.next_out),W=J.next_out-U,G=a8.buf2string(J.output,U),J.next_out=W,J.avail_out=q-W,W)$8.arraySet(J.output,J.output,U,W,0);this.onData(G)}else this.onData($8.shrinkBuf(J.output,J.next_out))}if(J.avail_in===0&&J.avail_out===0)V=!0}while((J.avail_in>0||J.avail_out===0)&&Y!==f0.Z_STREAM_END);if(Y===f0.Z_STREAM_END)B=f0.Z_FINISH;if(B===f0.Z_FINISH)return Y=q6.inflateEnd(this.strm),this.onEnd(Y),this.ended=!0,Y===f0.Z_OK;if(B===f0.Z_SYNC_FLUSH)return this.onEnd(f0.Z_OK),J.avail_out=0,!0;return!0};k1.prototype.onData=function($){this.chunks.push($)};k1.prototype.onEnd=function($){if($===f0.Z_OK)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=$8.flattenChunks(this.chunks);this.chunks=[],this.err=$,this.msg=this.strm.msg};function h4($,Q){var J=new k1(Q);if(J.push($,!0),J.err)throw J.msg||b4[J.err];return J.result}function kW($,Q){return Q=Q||{},Q.raw=!0,h4($,Q)}ZW.Inflate=k1;ZW.inflate=h4;ZW.inflateRaw=kW;ZW.ungzip=h4});var iQ=H0((Nj,dQ)=>{var yW=m2().assign,_W=o9(),bW=pQ(),hW=_4(),lQ={};yW(lQ,_W,bW,hW);dQ.exports=lQ});var oQ=H0((pW)=>{var mW=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",uW=iQ(),nQ=g0(),s8=e0(),cW=mW?"uint8array":"array";pW.magic="\b\x00";function Z1($,Q){s8.call(this,"FlateWorker/"+$),this._pako=null,this._pakoAction=$,this._pakoOptions=Q,this.meta={}}nQ.inherits(Z1,s8);Z1.prototype.processChunk=function($){if(this.meta=$.meta,this._pako===null)this._createPako();this._pako.push(nQ.transformTo(cW,$.data),!1)};Z1.prototype.flush=function(){if(s8.prototype.flush.call(this),this._pako===null)this._createPako();this._pako.push([],!0)};Z1.prototype.cleanUp=function(){s8.prototype.cleanUp.call(this),this._pako=null};Z1.prototype._createPako=function(){this._pako=new uW[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var $=this;this._pako.onData=function(Q){$.push({data:Q,meta:$.meta})}};pW.compressWorker=function($){return new Z1("Deflate",$)};pW.uncompressWorker=function(){return new Z1("Inflate",{})}});var m4=H0((nW)=>{var rQ=e0();nW.STORE={magic:"\x00\x00",compressWorker:function(){return new rQ("STORE compression")},uncompressWorker:function(){return new rQ("STORE decompression")}};nW.DEFLATE=oQ()});var u4=H0((aW)=>{aW.LOCAL_FILE_HEADER="PK\x03\x04";aW.CENTRAL_FILE_HEADER="PK\x01\x02";aW.CENTRAL_DIRECTORY_END="PK\x05\x06";aW.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07";aW.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06";aW.DATA_DESCRIPTOR="PK\x07\b"});var eQ=H0((Cj,tQ)=>{var X6=g0(),Y6=e0(),c4=o1(),aQ=g8(),t8=u4(),v0=function($,Q){var J="",q;for(q=0;q<Q;q++)J+=String.fromCharCode($&255),$=$>>>8;return J},qG=function($,Q){var J=$;if(!$)J=Q?16893:33204;return(J&65535)<<16},XG=function($){return($||0)&63},sQ=function($,Q,J,q,X,Y){var{file:B,compression:U}=$,W=Y!==c4.utf8encode,G=X6.transformTo("string",Y(B.name)),V=X6.transformTo("string",c4.utf8encode(B.name)),F=B.comment,M=X6.transformTo("string",Y(F)),j=X6.transformTo("string",c4.utf8encode(F)),f=V.length!==B.name.length,T=j.length!==F.length,D,P,K="",L="",z="",A=B.dir,_=B.date,Z={crc32:0,compressedSize:0,uncompressedSize:0};if(!Q||J)Z.crc32=$.crc32,Z.compressedSize=$.compressedSize,Z.uncompressedSize=$.uncompressedSize;var l=0;if(Q)l|=8;if(!W&&(f||T))l|=2048;var S=0,E=0;if(A)S|=16;if(X==="UNIX")E=798,S|=qG(B.unixPermissions,A);else E=20,S|=XG(B.dosPermissions,A);if(D=_.getUTCHours(),D=D<<6,D=D|_.getUTCMinutes(),D=D<<5,D=D|_.getUTCSeconds()/2,P=_.getUTCFullYear()-1980,P=P<<4,P=P|_.getUTCMonth()+1,P=P<<5,P=P|_.getUTCDate(),f)L=v0(1,1)+v0(aQ(G),4)+V,K+="up"+v0(L.length,2)+L;if(T)z=v0(1,1)+v0(aQ(M),4)+j,K+="uc"+v0(z.length,2)+z;var C="";C+=`
3
- \x00`,C+=v0(l,2),C+=U.magic,C+=v0(D,2),C+=v0(P,2),C+=v0(Z.crc32,4),C+=v0(Z.compressedSize,4),C+=v0(Z.uncompressedSize,4),C+=v0(G.length,2),C+=v0(K.length,2);var O=t8.LOCAL_FILE_HEADER+C+G+K,g=t8.CENTRAL_FILE_HEADER+v0(E,2)+C+v0(M.length,2)+"\x00\x00\x00\x00"+v0(S,4)+v0(q,4)+G+K+M;return{fileRecord:O,dirRecord:g}},YG=function($,Q,J,q,X){var Y="",B=X6.transformTo("string",X(q));return Y=t8.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+v0($,2)+v0($,2)+v0(Q,4)+v0(J,4)+v0(B.length,2)+B,Y},BG=function($){var Q="";return Q=t8.DATA_DESCRIPTOR+v0($.crc32,4)+v0($.compressedSize,4)+v0($.uncompressedSize,4),Q};function K2($,Q,J,q){Y6.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=Q,this.zipPlatform=J,this.encodeFileName=q,this.streamFiles=$,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}X6.inherits(K2,Y6);K2.prototype.push=function($){var Q=$.meta.percent||0,J=this.entriesCount,q=this._sources.length;if(this.accumulate)this.contentBuffer.push($);else this.bytesWritten+=$.data.length,Y6.prototype.push.call(this,{data:$.data,meta:{currentFile:this.currentFile,percent:J?(Q+100*(J-q-1))/J:100}})};K2.prototype.openedSource=function($){this.currentSourceOffset=this.bytesWritten,this.currentFile=$.file.name;var Q=this.streamFiles&&!$.file.dir;if(Q){var J=sQ($,Q,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:J.fileRecord,meta:{percent:0}})}else this.accumulate=!0};K2.prototype.closedSource=function($){this.accumulate=!1;var Q=this.streamFiles&&!$.file.dir,J=sQ($,Q,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(J.dirRecord),Q)this.push({data:BG($),meta:{percent:100}});else{this.push({data:J.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};K2.prototype.flush=function(){var $=this.bytesWritten;for(var Q=0;Q<this.dirRecords.length;Q++)this.push({data:this.dirRecords[Q],meta:{percent:100}});var J=this.bytesWritten-$,q=YG(this.dirRecords.length,J,$,this.zipComment,this.encodeFileName);this.push({data:q,meta:{percent:100}})};K2.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};K2.prototype.registerPrevious=function($){this._sources.push($);var Q=this;return $.on("data",function(J){Q.processChunk(J)}),$.on("end",function(){if(Q.closedSource(Q.previous.streamInfo),Q._sources.length)Q.prepareNextSource();else Q.end()}),$.on("error",function(J){Q.error(J)}),this};K2.prototype.resume=function(){if(!Y6.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};K2.prototype.error=function($){var Q=this._sources;if(!Y6.prototype.error.call(this,$))return!1;for(var J=0;J<Q.length;J++)try{Q[J].error($)}catch(q){}return!0};K2.prototype.lock=function(){Y6.prototype.lock.call(this);var $=this._sources;for(var Q=0;Q<$.length;Q++)$[Q].lock()};tQ.exports=K2});var $J=H0((VG)=>{var UG=m4(),WG=eQ(),GG=function($,Q){var J=$||Q,q=UG[J];if(!q)throw Error(J+" is not a valid compression method !");return q};VG.generateWorker=function($,Q,J){var q=new WG(Q.streamFiles,J,Q.platform,Q.encodeFileName),X=0;try{$.forEach(function(Y,B){X++;var U=GG(B.options.compression,Q.compression),W=B.options.compressionOptions||Q.compressionOptions||{},G=B.dir,V=B.date;B._compressWorker(U,W).withStreamInfo("file",{name:Y,dir:G,date:V,comment:B.comment||"",unixPermissions:B.unixPermissions,dosPermissions:B.dosPermissions}).pipe(q)}),q.entriesCount=X}catch(Y){q.error(Y)}return q}});var JJ=H0((Ij,QJ)=>{var jG=g0(),e8=e0();function Q8($,Q){e8.call(this,"Nodejs stream input adapter for "+$),this._upstreamEnded=!1,this._bindStream(Q)}jG.inherits(Q8,e8);Q8.prototype._bindStream=function($){var Q=this;this._stream=$,$.pause(),$.on("data",function(J){Q.push({data:J,meta:{percent:0}})}).on("error",function(J){if(Q.isPaused)this.generatedError=J;else Q.error(J)}).on("end",function(){if(Q.isPaused)Q._upstreamEnded=!0;else Q.end()})};Q8.prototype.pause=function(){if(!e8.prototype.pause.call(this))return!1;return this._stream.pause(),!0};Q8.prototype.resume=function(){if(!e8.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};QJ.exports=Q8});var jJ=H0((Sj,KJ)=>{var HG=o1(),J8=g0(),BJ=e0(),MG=i5(),UJ=n5(),qJ=x8(),FG=X9(),wG=$J(),XJ=g6(),LG=JJ(),WJ=function($,Q,J){var q=J8.getTypeOf(Q),X,Y=J8.extend(J||{},UJ);if(Y.date=Y.date||new Date,Y.compression!==null)Y.compression=Y.compression.toUpperCase();if(typeof Y.unixPermissions==="string")Y.unixPermissions=parseInt(Y.unixPermissions,8);if(Y.unixPermissions&&Y.unixPermissions&16384)Y.dir=!0;if(Y.dosPermissions&&Y.dosPermissions&16)Y.dir=!0;if(Y.dir)$=GJ($);if(Y.createFolders&&(X=zG($)))VJ.call(this,X,!0);var B=q==="string"&&Y.binary===!1&&Y.base64===!1;if(!J||typeof J.binary>"u")Y.binary=!B;var U=Q instanceof qJ&&Q.uncompressedSize===0;if(U||Y.dir||!Q||Q.length===0)Y.base64=!1,Y.binary=!0,Q="",Y.compression="STORE",q="string";var W=null;if(Q instanceof qJ||Q instanceof BJ)W=Q;else if(XJ.isNode&&XJ.isStream(Q))W=new LG($,Q);else W=J8.prepareContent($,Q,Y.binary,Y.optimizedBinaryString,Y.base64);var G=new FG($,W,Y);this.files[$]=G},zG=function($){if($.slice(-1)==="/")$=$.substring(0,$.length-1);var Q=$.lastIndexOf("/");return Q>0?$.substring(0,Q):""},GJ=function($){if($.slice(-1)!=="/")$+="/";return $},VJ=function($,Q){if(Q=typeof Q<"u"?Q:UJ.createFolders,$=GJ($),!this.files[$])WJ.call(this,$,null,{dir:!0,createFolders:Q});return this.files[$]};function YJ($){return Object.prototype.toString.call($)==="[object RegExp]"}var OG={load:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function($){var Q,J,q;for(Q in this.files)if(q=this.files[Q],J=Q.slice(this.root.length,Q.length),J&&Q.slice(0,this.root.length)===this.root)$(J,q)},filter:function($){var Q=[];return this.forEach(function(J,q){if($(J,q))Q.push(q)}),Q},file:function($,Q,J){if(arguments.length===1)if(YJ($)){var q=$;return this.filter(function(Y,B){return!B.dir&&q.test(Y)})}else{var X=this.files[this.root+$];if(X&&!X.dir)return X;else return null}else $=this.root+$,WJ.call(this,$,Q,J);return this},folder:function($){if(!$)return this;if(YJ($))return this.filter(function(X,Y){return Y.dir&&$.test(X)});var Q=this.root+$,J=VJ.call(this,Q),q=this.clone();return q.root=J.name,q},remove:function($){$=this.root+$;var Q=this.files[$];if(!Q){if($.slice(-1)!=="/")$+="/";Q=this.files[$]}if(Q&&!Q.dir)delete this.files[$];else{var J=this.filter(function(X,Y){return Y.name.slice(0,$.length)===$});for(var q=0;q<J.length;q++)delete this.files[J[q].name]}return this},generate:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function($){var Q,J={};try{if(J=J8.extend($||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:HG.utf8encode}),J.type=J.type.toLowerCase(),J.compression=J.compression.toUpperCase(),J.type==="binarystring")J.type="string";if(!J.type)throw Error("No output type specified.");if(J8.checkSupport(J.type),J.platform==="darwin"||J.platform==="freebsd"||J.platform==="linux"||J.platform==="sunos")J.platform="UNIX";if(J.platform==="win32")J.platform="DOS";var q=J.comment||this.comment||"";Q=wG.generateWorker(this,J,q)}catch(X){Q=new BJ("error"),Q.error(X)}return new MG(Q,J.type||"string",J.mimeType)},generateAsync:function($,Q){return this.generateInternalStream($).accumulate(Q)},generateNodeStream:function($,Q){if($=$||{},!$.type)$.type="nodebuffer";return this.generateInternalStream($).toNodejsStream(Q)}};KJ.exports=OG});var p4=H0((Ej,MJ)=>{var NG=g0();function HJ($){this.data=$,this.length=$.length,this.index=0,this.zero=0}HJ.prototype={checkOffset:function($){this.checkIndex(this.index+$)},checkIndex:function($){if(this.length<this.zero+$||$<0)throw Error("End of data reached (data length = "+this.length+", asked index = "+$+"). Corrupted zip ?")},setIndex:function($){this.checkIndex($),this.index=$},skip:function($){this.setIndex(this.index+$)},byteAt:function(){},readInt:function($){var Q=0,J;this.checkOffset($);for(J=this.index+$-1;J>=this.index;J--)Q=(Q<<8)+this.byteAt(J);return this.index+=$,Q},readString:function($){return NG.transformTo("string",this.readData($))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var $=this.readInt(4);return new Date(Date.UTC(($>>25&127)+1980,($>>21&15)-1,$>>16&31,$>>11&31,$>>5&63,($&31)<<1))}};MJ.exports=HJ});var l4=H0((vj,wJ)=>{var FJ=p4(),DG=g0();function B6($){FJ.call(this,$);for(var Q=0;Q<this.data.length;Q++)$[Q]=$[Q]&255}DG.inherits(B6,FJ);B6.prototype.byteAt=function($){return this.data[this.zero+$]};B6.prototype.lastIndexOfSignature=function($){var Q=$.charCodeAt(0),J=$.charCodeAt(1),q=$.charCodeAt(2),X=$.charCodeAt(3);for(var Y=this.length-4;Y>=0;--Y)if(this.data[Y]===Q&&this.data[Y+1]===J&&this.data[Y+2]===q&&this.data[Y+3]===X)return Y-this.zero;return-1};B6.prototype.readAndCheckSignature=function($){var Q=$.charCodeAt(0),J=$.charCodeAt(1),q=$.charCodeAt(2),X=$.charCodeAt(3),Y=this.readData(4);return Q===Y[0]&&J===Y[1]&&q===Y[2]&&X===Y[3]};B6.prototype.readData=function($){if(this.checkOffset($),$===0)return[];var Q=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Q};wJ.exports=B6});var OJ=H0((kj,zJ)=>{var LJ=p4(),PG=g0();function U6($){LJ.call(this,$)}PG.inherits(U6,LJ);U6.prototype.byteAt=function($){return this.data.charCodeAt(this.zero+$)};U6.prototype.lastIndexOfSignature=function($){return this.data.lastIndexOf($)-this.zero};U6.prototype.readAndCheckSignature=function($){var Q=this.readData(4);return $===Q};U6.prototype.readData=function($){this.checkOffset($);var Q=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Q};zJ.exports=U6});var i4=H0((Zj,DJ)=>{var NJ=l4(),AG=g0();function d4($){NJ.call(this,$)}AG.inherits(d4,NJ);d4.prototype.readData=function($){if(this.checkOffset($),$===0)return new Uint8Array(0);var Q=this.data.subarray(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Q};DJ.exports=d4});var CJ=H0((Tj,AJ)=>{var PJ=i4(),CG=g0();function n4($){PJ.call(this,$)}CG.inherits(n4,PJ);n4.prototype.readData=function($){this.checkOffset($);var Q=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Q};AJ.exports=n4});var o4=H0((gj,IJ)=>{var $5=g0(),RJ=h2(),RG=l4(),IG=OJ(),SG=CJ(),EG=i4();IJ.exports=function($){var Q=$5.getTypeOf($);if($5.checkSupport(Q),Q==="string"&&!RJ.uint8array)return new IG($);if(Q==="nodebuffer")return new SG($);if(RJ.uint8array)return new EG($5.transformTo("uint8array",$));return new RG($5.transformTo("array",$))}});var kJ=H0((xj,vJ)=>{var r4=o4(),Y1=g0(),vG=x8(),SJ=g8(),Q5=o1(),J5=m4(),kG=h2(),ZG=0,TG=3,gG=function($){for(var Q in J5){if(!Object.prototype.hasOwnProperty.call(J5,Q))continue;if(J5[Q].magic===$)return J5[Q]}return null};function EJ($,Q){this.options=$,this.loadOptions=Q}EJ.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function($){var Q,J;if($.skip(22),this.fileNameLength=$.readInt(2),J=$.readInt(2),this.fileName=$.readData(this.fileNameLength),$.skip(J),this.compressedSize===-1||this.uncompressedSize===-1)throw Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(Q=gG(this.compressionMethod),Q===null)throw Error("Corrupted zip : compression "+Y1.pretty(this.compressionMethod)+" unknown (inner file : "+Y1.transformTo("string",this.fileName)+")");this.decompressed=new vG(this.compressedSize,this.uncompressedSize,this.crc32,Q,$.readData(this.compressedSize))},readCentralPart:function($){this.versionMadeBy=$.readInt(2),$.skip(2),this.bitFlag=$.readInt(2),this.compressionMethod=$.readString(2),this.date=$.readDate(),this.crc32=$.readInt(4),this.compressedSize=$.readInt(4),this.uncompressedSize=$.readInt(4);var Q=$.readInt(2);if(this.extraFieldsLength=$.readInt(2),this.fileCommentLength=$.readInt(2),this.diskNumberStart=$.readInt(2),this.internalFileAttributes=$.readInt(2),this.externalFileAttributes=$.readInt(4),this.localHeaderOffset=$.readInt(4),this.isEncrypted())throw Error("Encrypted zip are not supported");$.skip(Q),this.readExtraFields($),this.parseZIP64ExtraField($),this.fileComment=$.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var $=this.versionMadeBy>>8;if(this.dir=this.externalFileAttributes&16?!0:!1,$===ZG)this.dosPermissions=this.externalFileAttributes&63;if($===TG)this.unixPermissions=this.externalFileAttributes>>16&65535;if(!this.dir&&this.fileNameStr.slice(-1)==="/")this.dir=!0},parseZIP64ExtraField:function(){if(!this.extraFields[1])return;var $=r4(this.extraFields[1].value);if(this.uncompressedSize===Y1.MAX_VALUE_32BITS)this.uncompressedSize=$.readInt(8);if(this.compressedSize===Y1.MAX_VALUE_32BITS)this.compressedSize=$.readInt(8);if(this.localHeaderOffset===Y1.MAX_VALUE_32BITS)this.localHeaderOffset=$.readInt(8);if(this.diskNumberStart===Y1.MAX_VALUE_32BITS)this.diskNumberStart=$.readInt(4)},readExtraFields:function($){var Q=$.index+this.extraFieldsLength,J,q,X;if(!this.extraFields)this.extraFields={};while($.index+4<Q)J=$.readInt(2),q=$.readInt(2),X=$.readData(q),this.extraFields[J]={id:J,length:q,value:X};$.setIndex(Q)},handleUTF8:function(){var $=kG.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=Q5.utf8decode(this.fileName),this.fileCommentStr=Q5.utf8decode(this.fileComment);else{var Q=this.findExtraFieldUnicodePath();if(Q!==null)this.fileNameStr=Q;else{var J=Y1.transformTo($,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(J)}var q=this.findExtraFieldUnicodeComment();if(q!==null)this.fileCommentStr=q;else{var X=Y1.transformTo($,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(X)}}},findExtraFieldUnicodePath:function(){var $=this.extraFields[28789];if($){var Q=r4($.value);if(Q.readInt(1)!==1)return null;if(SJ(this.fileName)!==Q.readInt(4))return null;return Q5.utf8decode(Q.readData($.length-5))}return null},findExtraFieldUnicodeComment:function(){var $=this.extraFields[25461];if($){var Q=r4($.value);if(Q.readInt(1)!==1)return null;if(SJ(this.fileComment)!==Q.readInt(4))return null;return Q5.utf8decode(Q.readData($.length-5))}return null}};vJ.exports=EJ});var gJ=H0((fj,TJ)=>{var xG=o4(),p2=g0(),j2=u4(),fG=kJ(),yG=h2();function ZJ($){this.files=[],this.loadOptions=$}ZJ.prototype={checkSignature:function($){if(!this.reader.readAndCheckSignature($)){this.reader.index-=4;var Q=this.reader.readString(4);throw Error("Corrupted zip or bug: unexpected signature ("+p2.pretty(Q)+", expected "+p2.pretty($)+")")}},isSignature:function($,Q){var J=this.reader.index;this.reader.setIndex($);var q=this.reader.readString(4),X=q===Q;return this.reader.setIndex(J),X},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 $=this.reader.readData(this.zipCommentLength),Q=yG.uint8array?"uint8array":"array",J=p2.transformTo(Q,$);this.zipComment=this.loadOptions.decodeFileName(J)},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={};var $=this.zip64EndOfCentralSize-44,Q=0,J,q,X;while(Q<$)J=this.reader.readInt(2),q=this.reader.readInt(4),X=this.reader.readData(q),this.zip64ExtensibleData[J]={id:J,length:q,value:X}},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 Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var $,Q;for($=0;$<this.files.length;$++)Q=this.files[$],this.reader.setIndex(Q.localHeaderOffset),this.checkSignature(j2.LOCAL_FILE_HEADER),Q.readLocalPart(this.reader),Q.handleUTF8(),Q.processAttributes()},readCentralDir:function(){var $;this.reader.setIndex(this.centralDirOffset);while(this.reader.readAndCheckSignature(j2.CENTRAL_FILE_HEADER))$=new fG({zip64:this.zip64},this.loadOptions),$.readCentralPart(this.reader),this.files.push($);if(this.centralDirRecords!==this.files.length){if(this.centralDirRecords!==0&&this.files.length===0)throw Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)}},readEndOfCentral:function(){var $=this.reader.lastIndexOfSignature(j2.CENTRAL_DIRECTORY_END);if($<0){var Q=!this.isSignature(0,j2.LOCAL_FILE_HEADER);if(Q)throw 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");else throw Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex($);var J=$;if(this.checkSignature(j2.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===p2.MAX_VALUE_16BITS||this.diskWithCentralDirStart===p2.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===p2.MAX_VALUE_16BITS||this.centralDirRecords===p2.MAX_VALUE_16BITS||this.centralDirSize===p2.MAX_VALUE_32BITS||this.centralDirOffset===p2.MAX_VALUE_32BITS){if(this.zip64=!0,$=this.reader.lastIndexOfSignature(j2.ZIP64_CENTRAL_DIRECTORY_LOCATOR),$<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex($),this.checkSignature(j2.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,j2.ZIP64_CENTRAL_DIRECTORY_END)){if(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(j2.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory")}this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(j2.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var q=this.centralDirOffset+this.centralDirSize;if(this.zip64)q+=20,q+=12+this.zip64EndOfCentralSize;var X=J-q;if(X>0)if(this.isSignature(J,j2.CENTRAL_FILE_HEADER));else this.reader.zero=X;else if(X<0)throw Error("Corrupted zip: missing "+Math.abs(X)+" bytes.")},prepareReader:function($){this.reader=xG($)},load:function($){this.prepareReader($),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};TJ.exports=ZJ});var yJ=H0((yj,fJ)=>{var a4=g0(),q5=d1(),_G=o1(),bG=gJ(),hG=a5(),xJ=g6();function mG($){return new q5.Promise(function(Q,J){var q=$.decompressed.getContentWorker().pipe(new hG);q.on("error",function(X){J(X)}).on("end",function(){if(q.streamInfo.crc32!==$.decompressed.crc32)J(Error("Corrupted zip : CRC32 mismatch"));else Q()}).resume()})}fJ.exports=function($,Q){var J=this;if(Q=a4.extend(Q||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:_G.utf8decode}),xJ.isNode&&xJ.isStream($))return q5.Promise.reject(Error("JSZip can't accept a stream when loading a zip file."));return a4.prepareContent("the loaded zip file",$,!0,Q.optimizedBinaryString,Q.base64).then(function(q){var X=new bG(Q);return X.load(q),X}).then(function(X){var Y=[q5.Promise.resolve(X)],B=X.files;if(Q.checkCRC32)for(var U=0;U<B.length;U++)Y.push(mG(B[U]));return q5.Promise.all(Y)}).then(function(X){var Y=X.shift(),B=Y.files;for(var U=0;U<B.length;U++){var W=B[U],G=W.fileNameStr,V=a4.resolve(W.fileNameStr);if(J.file(V,W.decompressed,{binary:!0,optimizedBinaryString:!0,date:W.date,dir:W.dir,comment:W.fileCommentStr.length?W.fileCommentStr:null,unixPermissions:W.unixPermissions,dosPermissions:W.dosPermissions,createFolders:Q.createFolders}),!W.dir)J.file(V).unsafeOriginalName=G}if(Y.zipComment.length)J.comment=Y.zipComment;return J})}});var bJ=H0((_j,_J)=>{function G2(){if(!(this instanceof G2))return new G2;if(arguments.length)throw 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 $=new G2;for(var Q in this)if(typeof this[Q]!=="function")$[Q]=this[Q];return $}}G2.prototype=jJ();G2.prototype.loadAsync=yJ();G2.support=h2();G2.defaults=n5();G2.version="3.10.1";G2.loadAsync=function($,Q){return new G2().loadAsync($,Q)};G2.external=d1();_J.exports=G2});var tJ=H0((J7)=>{/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */var sJ;(function($){if(typeof DO_NOT_EXPORT_CRC>"u")if(typeof J7==="object")$(J7);else if(typeof define==="function"&&define.amd)define(function(){var Q={};return $(Q),Q});else $(sJ={});else $(sJ={})})(function($){$.version="1.2.2";function Q(){var Z=0,l=Array(256);for(var S=0;S!=256;++S)Z=S,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,l[S]=Z;return typeof Int32Array<"u"?new Int32Array(l):l}var J=Q();function q(Z){var l=0,S=0,E=0,C=typeof Int32Array<"u"?new Int32Array(4096):Array(4096);for(E=0;E!=256;++E)C[E]=Z[E];for(E=0;E!=256;++E){S=Z[E];for(l=256+E;l<4096;l+=256)S=C[l]=S>>>8^Z[S&255]}var O=[];for(E=1;E!=16;++E)O[E-1]=typeof Int32Array<"u"?C.subarray(E*256,E*256+256):C.slice(E*256,E*256+256);return O}var X=q(J),Y=X[0],B=X[1],U=X[2],W=X[3],G=X[4],V=X[5],F=X[6],M=X[7],j=X[8],f=X[9],T=X[10],D=X[11],P=X[12],K=X[13],L=X[14];function z(Z,l){var S=l^-1;for(var E=0,C=Z.length;E<C;)S=S>>>8^J[(S^Z.charCodeAt(E++))&255];return~S}function A(Z,l){var S=l^-1,E=Z.length-15,C=0;for(;C<E;)S=L[Z[C++]^S&255]^K[Z[C++]^S>>8&255]^P[Z[C++]^S>>16&255]^D[Z[C++]^S>>>24]^T[Z[C++]]^f[Z[C++]]^j[Z[C++]]^M[Z[C++]]^F[Z[C++]]^V[Z[C++]]^G[Z[C++]]^W[Z[C++]]^U[Z[C++]]^B[Z[C++]]^Y[Z[C++]]^J[Z[C++]];E+=15;while(C<E)S=S>>>8^J[(S^Z[C++])&255];return~S}function _(Z,l){var S=l^-1;for(var E=0,C=Z.length,O=0,g=0;E<C;)if(O=Z.charCodeAt(E++),O<128)S=S>>>8^J[(S^O)&255];else if(O<2048)S=S>>>8^J[(S^(192|O>>6&31))&255],S=S>>>8^J[(S^(128|O&63))&255];else if(O>=55296&&O<57344)O=(O&1023)+64,g=Z.charCodeAt(E++)&1023,S=S>>>8^J[(S^(240|O>>8&7))&255],S=S>>>8^J[(S^(128|O>>2&63))&255],S=S>>>8^J[(S^(128|g>>6&15|(O&3)<<4))&255],S=S>>>8^J[(S^(128|g&63))&255];else S=S>>>8^J[(S^(224|O>>12&15))&255],S=S>>>8^J[(S^(128|O>>6&63))&255],S=S>>>8^J[(S^(128|O&63))&255];return~S}$.table=J,$.bstr=z,$.buf=A,$.str=_})});var K7=R7(bJ(),1);var uG=new Uint8Array(16);function s4(){return crypto.getRandomValues(uG)}var h0=[];for(let $=0;$<256;++$)h0.push(($+256).toString(16).slice(1));function hJ($,Q=0){return(h0[$[Q+0]]+h0[$[Q+1]]+h0[$[Q+2]]+h0[$[Q+3]]+"-"+h0[$[Q+4]]+h0[$[Q+5]]+"-"+h0[$[Q+6]]+h0[$[Q+7]]+"-"+h0[$[Q+8]]+h0[$[Q+9]]+"-"+h0[$[Q+10]]+h0[$[Q+11]]+h0[$[Q+12]]+h0[$[Q+13]]+h0[$[Q+14]]+h0[$[Q+15]]).toLowerCase()}function cG($,Q,J){if(!Q&&!$&&crypto.randomUUID)return crypto.randomUUID();return pG($,Q,J)}function pG($,Q,J){$=$||{};let q=$.random??$.rng?.()??s4();if(q.length<16)throw Error("Random bytes length must be >= 16");if(q[6]=q[6]&15|64,q[8]=q[8]&63|128,Q){if(J=J||0,J<0||J+16>Q.length)throw RangeError(`UUID byte range ${J}:${J+15} is out of buffer bounds`);for(let X=0;X<16;++X)Q[J+X]=q[X];return Q}return hJ(q)}var T1=cG;var x={};w5(x,{void:()=>SV,util:()=>A0,unknown:()=>RV,union:()=>ZV,undefined:()=>PV,tuple:()=>xV,transformer:()=>lV,symbol:()=>DV,string:()=>oJ,strictObject:()=>kV,setErrorMap:()=>iG,set:()=>_V,record:()=>fV,quotelessJson:()=>lG,promise:()=>pV,preprocess:()=>nV,pipeline:()=>oV,ostring:()=>rV,optional:()=>dV,onumber:()=>aV,oboolean:()=>sV,objectUtil:()=>t4,object:()=>vV,number:()=>rJ,nullable:()=>iV,null:()=>AV,never:()=>IV,nativeEnum:()=>cV,nan:()=>zV,map:()=>yV,makeIssue:()=>q8,literal:()=>mV,lazy:()=>hV,late:()=>wV,isValid:()=>B1,isDirty:()=>Y5,isAsync:()=>G6,isAborted:()=>X5,intersection:()=>gV,instanceof:()=>LV,getParsedType:()=>v2,getErrorMap:()=>W6,function:()=>bV,enum:()=>uV,effect:()=>lV,discriminatedUnion:()=>TV,defaultErrorMap:()=>l2,datetimeRegex:()=>dJ,date:()=>NV,custom:()=>nJ,coerce:()=>tV,boolean:()=>aJ,bigint:()=>OV,array:()=>EV,any:()=>CV,addIssueToContext:()=>X0,ZodVoid:()=>Y8,ZodUnknown:()=>U1,ZodUnion:()=>F6,ZodUndefined:()=>H6,ZodType:()=>P0,ZodTuple:()=>Z2,ZodTransformer:()=>L2,ZodSymbol:()=>X8,ZodString:()=>H2,ZodSet:()=>y1,ZodSchema:()=>P0,ZodRecord:()=>B8,ZodReadonly:()=>P6,ZodPromise:()=>_1,ZodPipeline:()=>G8,ZodParsedType:()=>$0,ZodOptional:()=>F2,ZodObject:()=>x0,ZodNumber:()=>W1,ZodNullable:()=>i2,ZodNull:()=>M6,ZodNever:()=>k2,ZodNativeEnum:()=>O6,ZodNaN:()=>W8,ZodMap:()=>U8,ZodLiteral:()=>z6,ZodLazy:()=>L6,ZodIssueCode:()=>o,ZodIntersection:()=>w6,ZodFunction:()=>K6,ZodFirstPartyTypeKind:()=>w0,ZodError:()=>t0,ZodEnum:()=>V1,ZodEffects:()=>L2,ZodDiscriminatedUnion:()=>B5,ZodDefault:()=>N6,ZodDate:()=>x1,ZodCatch:()=>D6,ZodBranded:()=>U5,ZodBoolean:()=>j6,ZodBigInt:()=>G1,ZodArray:()=>M2,ZodAny:()=>f1,Schema:()=>P0,ParseStatus:()=>m0,OK:()=>l0,NEVER:()=>eV,INVALID:()=>F0,EMPTY_PATH:()=>nG,DIRTY:()=>g1,BRAND:()=>FV});var A0;(function($){$.assertEqual=(X)=>{};function Q(X){}$.assertIs=Q;function J(X){throw Error()}$.assertNever=J,$.arrayToEnum=(X)=>{let Y={};for(let B of X)Y[B]=B;return Y},$.getValidEnumValues=(X)=>{let Y=$.objectKeys(X).filter((U)=>typeof X[X[U]]!=="number"),B={};for(let U of Y)B[U]=X[U];return $.objectValues(B)},$.objectValues=(X)=>{return $.objectKeys(X).map(function(Y){return X[Y]})},$.objectKeys=typeof Object.keys==="function"?(X)=>Object.keys(X):(X)=>{let Y=[];for(let B in X)if(Object.prototype.hasOwnProperty.call(X,B))Y.push(B);return Y},$.find=(X,Y)=>{for(let B of X)if(Y(B))return B;return},$.isInteger=typeof Number.isInteger==="function"?(X)=>Number.isInteger(X):(X)=>typeof X==="number"&&Number.isFinite(X)&&Math.floor(X)===X;function q(X,Y=" | "){return X.map((B)=>typeof B==="string"?`'${B}'`:B).join(Y)}$.joinValues=q,$.jsonStringifyReplacer=(X,Y)=>{if(typeof Y==="bigint")return Y.toString();return Y}})(A0||(A0={}));var t4;(function($){$.mergeShapes=(Q,J)=>{return{...Q,...J}}})(t4||(t4={}));var $0=A0.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),v2=($)=>{switch(typeof $){case"undefined":return $0.undefined;case"string":return $0.string;case"number":return Number.isNaN($)?$0.nan:$0.number;case"boolean":return $0.boolean;case"function":return $0.function;case"bigint":return $0.bigint;case"symbol":return $0.symbol;case"object":if(Array.isArray($))return $0.array;if($===null)return $0.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return $0.promise;if(typeof Map<"u"&&$ instanceof Map)return $0.map;if(typeof Set<"u"&&$ instanceof Set)return $0.set;if(typeof Date<"u"&&$ instanceof Date)return $0.date;return $0.object;default:return $0.unknown}};var o=A0.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),lG=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")};class t0 extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(J)=>{this.issues=[...this.issues,J]},this.addIssues=(J=[])=>{this.issues=[...this.issues,...J]};let Q=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,Q);else this.__proto__=Q;this.name="ZodError",this.issues=$}format($){let Q=$||function(X){return X.message},J={_errors:[]},q=(X)=>{for(let Y of X.issues)if(Y.code==="invalid_union")Y.unionErrors.map(q);else if(Y.code==="invalid_return_type")q(Y.returnTypeError);else if(Y.code==="invalid_arguments")q(Y.argumentsError);else if(Y.path.length===0)J._errors.push(Q(Y));else{let B=J,U=0;while(U<Y.path.length){let W=Y.path[U];if(U!==Y.path.length-1)B[W]=B[W]||{_errors:[]};else B[W]=B[W]||{_errors:[]},B[W]._errors.push(Q(Y));B=B[W],U++}}};return q(this),J}static assert($){if(!($ instanceof t0))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,A0.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(Q)=>Q.message){let Q={},J=[];for(let q of this.issues)if(q.path.length>0){let X=q.path[0];Q[X]=Q[X]||[],Q[X].push($(q))}else J.push($(q));return{formErrors:J,fieldErrors:Q}}get formErrors(){return this.flatten()}}t0.create=($)=>{return new t0($)};var dG=($,Q)=>{let J;switch($.code){case o.invalid_type:if($.received===$0.undefined)J="Required";else J=`Expected ${$.expected}, received ${$.received}`;break;case o.invalid_literal:J=`Invalid literal value, expected ${JSON.stringify($.expected,A0.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:J=`Unrecognized key(s) in object: ${A0.joinValues($.keys,", ")}`;break;case o.invalid_union:J="Invalid input";break;case o.invalid_union_discriminator:J=`Invalid discriminator value. Expected ${A0.joinValues($.options)}`;break;case o.invalid_enum_value:J=`Invalid enum value. Expected ${A0.joinValues($.options)}, received '${$.received}'`;break;case o.invalid_arguments:J="Invalid function arguments";break;case o.invalid_return_type:J="Invalid function return type";break;case o.invalid_date:J="Invalid date";break;case o.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(J=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")J=`${J} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)J=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)J=`Invalid input: must end with "${$.validation.endsWith}"`;else A0.assertNever($.validation);else if($.validation!=="regex")J=`Invalid ${$.validation}`;else J="Invalid";break;case o.too_small:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else J="Invalid input";break;case o.too_big:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")J=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else J="Invalid input";break;case o.custom:J="Invalid input";break;case o.invalid_intersection_types:J="Intersection results could not be merged";break;case o.not_multiple_of:J=`Number must be a multiple of ${$.multipleOf}`;break;case o.not_finite:J="Number must be finite";break;default:J=Q.defaultError,A0.assertNever($)}return{message:J}},l2=dG;var mJ=l2;function iG($){mJ=$}function W6(){return mJ}var q8=($)=>{let{data:Q,path:J,errorMaps:q,issueData:X}=$,Y=[...J,...X.path||[]],B={...X,path:Y};if(X.message!==void 0)return{...X,path:Y,message:X.message};let U="",W=q.filter((G)=>!!G).slice().reverse();for(let G of W)U=G(B,{data:Q,defaultError:U}).message;return{...X,path:Y,message:U}},nG=[];function X0($,Q){let J=W6(),q=q8({issueData:Q,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,J,J===l2?void 0:l2].filter((X)=>!!X)});$.common.issues.push(q)}class m0{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,Q){let J=[];for(let q of Q){if(q.status==="aborted")return F0;if(q.status==="dirty")$.dirty();J.push(q.value)}return{status:$.value,value:J}}static async mergeObjectAsync($,Q){let J=[];for(let q of Q){let X=await q.key,Y=await q.value;J.push({key:X,value:Y})}return m0.mergeObjectSync($,J)}static mergeObjectSync($,Q){let J={};for(let q of Q){let{key:X,value:Y}=q;if(X.status==="aborted")return F0;if(Y.status==="aborted")return F0;if(X.status==="dirty")$.dirty();if(Y.status==="dirty")$.dirty();if(X.value!=="__proto__"&&(typeof Y.value<"u"||q.alwaysSet))J[X.value]=Y.value}return{status:$.value,value:J}}}var F0=Object.freeze({status:"aborted"}),g1=($)=>({status:"dirty",value:$}),l0=($)=>({status:"valid",value:$}),X5=($)=>$.status==="aborted",Y5=($)=>$.status==="dirty",B1=($)=>$.status==="valid",G6=($)=>typeof Promise<"u"&&$ instanceof Promise;var V0;(function($){$.errToObj=(Q)=>typeof Q==="string"?{message:Q}:Q||{},$.toString=(Q)=>typeof Q==="string"?Q:Q?.message})(V0||(V0={}));class w2{constructor($,Q,J,q){this._cachedPath=[],this.parent=$,this.data=Q,this._path=J,this._key=q}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var uJ=($,Q)=>{if(B1(Q))return{success:!0,data:Q.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let J=new t0($.common.issues);return this._error=J,this._error}}}};function D0($){if(!$)return{};let{errorMap:Q,invalid_type_error:J,required_error:q,description:X}=$;if(Q&&(J||q))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(Q)return{errorMap:Q,description:X};return{errorMap:(B,U)=>{let{message:W}=$;if(B.code==="invalid_enum_value")return{message:W??U.defaultError};if(typeof U.data>"u")return{message:W??q??U.defaultError};if(B.code!=="invalid_type")return{message:U.defaultError};return{message:W??J??U.defaultError}},description:X}}class P0{get description(){return this._def.description}_getType($){return v2($.data)}_getOrReturnCtx($,Q){return Q||{common:$.parent.common,data:$.data,parsedType:v2($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new m0,ctx:{common:$.parent.common,data:$.data,parsedType:v2($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let Q=this._parse($);if(G6(Q))throw Error("Synchronous parse encountered promise.");return Q}_parseAsync($){let Q=this._parse($);return Promise.resolve(Q)}parse($,Q){let J=this.safeParse($,Q);if(J.success)return J.data;throw J.error}safeParse($,Q){let J={common:{issues:[],async:Q?.async??!1,contextualErrorMap:Q?.errorMap},path:Q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:v2($)},q=this._parseSync({data:$,path:J.path,parent:J});return uJ(J,q)}"~validate"($){let Q={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:v2($)};if(!this["~standard"].async)try{let J=this._parseSync({data:$,path:[],parent:Q});return B1(J)?{value:J.value}:{issues:Q.common.issues}}catch(J){if(J?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;Q.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:Q}).then((J)=>B1(J)?{value:J.value}:{issues:Q.common.issues})}async parseAsync($,Q){let J=await this.safeParseAsync($,Q);if(J.success)return J.data;throw J.error}async safeParseAsync($,Q){let J={common:{issues:[],contextualErrorMap:Q?.errorMap,async:!0},path:Q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:v2($)},q=this._parse({data:$,path:J.path,parent:J}),X=await(G6(q)?q:Promise.resolve(q));return uJ(J,X)}refine($,Q){let J=(q)=>{if(typeof Q==="string"||typeof Q>"u")return{message:Q};else if(typeof Q==="function")return Q(q);else return Q};return this._refinement((q,X)=>{let Y=$(q),B=()=>X.addIssue({code:o.custom,...J(q)});if(typeof Promise<"u"&&Y instanceof Promise)return Y.then((U)=>{if(!U)return B(),!1;else return!0});if(!Y)return B(),!1;else return!0})}refinement($,Q){return this._refinement((J,q)=>{if(!$(J))return q.addIssue(typeof Q==="function"?Q(J,q):Q),!1;else return!0})}_refinement($){return new L2({schema:this,typeName:w0.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(Q)=>this["~validate"](Q)}}optional(){return F2.create(this,this._def)}nullable(){return i2.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return M2.create(this)}promise(){return _1.create(this,this._def)}or($){return F6.create([this,$],this._def)}and($){return w6.create(this,$,this._def)}transform($){return new L2({...D0(this._def),schema:this,typeName:w0.ZodEffects,effect:{type:"transform",transform:$}})}default($){let Q=typeof $==="function"?$:()=>$;return new N6({...D0(this._def),innerType:this,defaultValue:Q,typeName:w0.ZodDefault})}brand(){return new U5({typeName:w0.ZodBranded,type:this,...D0(this._def)})}catch($){let Q=typeof $==="function"?$:()=>$;return new D6({...D0(this._def),innerType:this,catchValue:Q,typeName:w0.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return G8.create(this,$)}readonly(){return P6.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var oG=/^c[^\s-]{8,}$/i,rG=/^[0-9a-z]+$/,aG=/^[0-9A-HJKMNP-TV-Z]{26}$/i,sG=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,tG=/^[a-z0-9_-]{21}$/i,eG=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$V=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,QV=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",e4,qV=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,XV=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,YV=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,BV=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,UV=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,WV=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,pJ="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",GV=new RegExp(`^${pJ}$`);function lJ($){let Q="[0-5]\\d";if($.precision)Q=`${Q}\\.\\d{${$.precision}}`;else if($.precision==null)Q=`${Q}(\\.\\d+)?`;let J=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${Q})${J}`}function VV($){return new RegExp(`^${lJ($)}$`)}function dJ($){let Q=`${pJ}T${lJ($)}`,J=[];if(J.push($.local?"Z?":"Z"),$.offset)J.push("([+-]\\d{2}:?\\d{2})");return Q=`${Q}(${J.join("|")})`,new RegExp(`^${Q}$`)}function KV($,Q){if((Q==="v4"||!Q)&&qV.test($))return!0;if((Q==="v6"||!Q)&&YV.test($))return!0;return!1}function jV($,Q){if(!eG.test($))return!1;try{let[J]=$.split(".");if(!J)return!1;let q=J.replace(/-/g,"+").replace(/_/g,"/").padEnd(J.length+(4-J.length%4)%4,"="),X=JSON.parse(atob(q));if(typeof X!=="object"||X===null)return!1;if("typ"in X&&X?.typ!=="JWT")return!1;if(!X.alg)return!1;if(Q&&X.alg!==Q)return!1;return!0}catch{return!1}}function HV($,Q){if((Q==="v4"||!Q)&&XV.test($))return!0;if((Q==="v6"||!Q)&&BV.test($))return!0;return!1}class H2 extends P0{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==$0.string){let X=this._getOrReturnCtx($);return X0(X,{code:o.invalid_type,expected:$0.string,received:X.parsedType}),F0}let J=new m0,q=void 0;for(let X of this._def.checks)if(X.kind==="min"){if($.data.length<X.value)q=this._getOrReturnCtx($,q),X0(q,{code:o.too_small,minimum:X.value,type:"string",inclusive:!0,exact:!1,message:X.message}),J.dirty()}else if(X.kind==="max"){if($.data.length>X.value)q=this._getOrReturnCtx($,q),X0(q,{code:o.too_big,maximum:X.value,type:"string",inclusive:!0,exact:!1,message:X.message}),J.dirty()}else if(X.kind==="length"){let Y=$.data.length>X.value,B=$.data.length<X.value;if(Y||B){if(q=this._getOrReturnCtx($,q),Y)X0(q,{code:o.too_big,maximum:X.value,type:"string",inclusive:!0,exact:!0,message:X.message});else if(B)X0(q,{code:o.too_small,minimum:X.value,type:"string",inclusive:!0,exact:!0,message:X.message});J.dirty()}}else if(X.kind==="email"){if(!QV.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"email",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="emoji"){if(!e4)e4=new RegExp(JV,"u");if(!e4.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"emoji",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="uuid"){if(!sG.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"uuid",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="nanoid"){if(!tG.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"nanoid",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="cuid"){if(!oG.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"cuid",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="cuid2"){if(!rG.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"cuid2",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="ulid"){if(!aG.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"ulid",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="url")try{new URL($.data)}catch{q=this._getOrReturnCtx($,q),X0(q,{validation:"url",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="regex"){if(X.regex.lastIndex=0,!X.regex.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"regex",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="trim")$.data=$.data.trim();else if(X.kind==="includes"){if(!$.data.includes(X.value,X.position))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:{includes:X.value,position:X.position},message:X.message}),J.dirty()}else if(X.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(X.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(X.kind==="startsWith"){if(!$.data.startsWith(X.value))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:{startsWith:X.value},message:X.message}),J.dirty()}else if(X.kind==="endsWith"){if(!$.data.endsWith(X.value))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:{endsWith:X.value},message:X.message}),J.dirty()}else if(X.kind==="datetime"){if(!dJ(X).test($.data))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:"datetime",message:X.message}),J.dirty()}else if(X.kind==="date"){if(!GV.test($.data))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:"date",message:X.message}),J.dirty()}else if(X.kind==="time"){if(!VV(X).test($.data))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:"time",message:X.message}),J.dirty()}else if(X.kind==="duration"){if(!$V.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"duration",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="ip"){if(!KV($.data,X.version))q=this._getOrReturnCtx($,q),X0(q,{validation:"ip",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="jwt"){if(!jV($.data,X.alg))q=this._getOrReturnCtx($,q),X0(q,{validation:"jwt",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="cidr"){if(!HV($.data,X.version))q=this._getOrReturnCtx($,q),X0(q,{validation:"cidr",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="base64"){if(!UV.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"base64",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="base64url"){if(!WV.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"base64url",code:o.invalid_string,message:X.message}),J.dirty()}else A0.assertNever(X);return{status:J.value,value:$.data}}_regex($,Q,J){return this.refinement((q)=>$.test(q),{validation:Q,code:o.invalid_string,...V0.errToObj(J)})}_addCheck($){return new H2({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...V0.errToObj($)})}url($){return this._addCheck({kind:"url",...V0.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...V0.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...V0.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...V0.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...V0.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...V0.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...V0.errToObj($)})}base64($){return this._addCheck({kind:"base64",...V0.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...V0.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...V0.errToObj($)})}ip($){return this._addCheck({kind:"ip",...V0.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...V0.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...V0.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...V0.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...V0.errToObj($)})}regex($,Q){return this._addCheck({kind:"regex",regex:$,...V0.errToObj(Q)})}includes($,Q){return this._addCheck({kind:"includes",value:$,position:Q?.position,...V0.errToObj(Q?.message)})}startsWith($,Q){return this._addCheck({kind:"startsWith",value:$,...V0.errToObj(Q)})}endsWith($,Q){return this._addCheck({kind:"endsWith",value:$,...V0.errToObj(Q)})}min($,Q){return this._addCheck({kind:"min",value:$,...V0.errToObj(Q)})}max($,Q){return this._addCheck({kind:"max",value:$,...V0.errToObj(Q)})}length($,Q){return this._addCheck({kind:"length",value:$,...V0.errToObj(Q)})}nonempty($){return this.min(1,V0.errToObj($))}trim(){return new H2({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new H2({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new H2({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxLength(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}}H2.create=($)=>{return new H2({checks:[],typeName:w0.ZodString,coerce:$?.coerce??!1,...D0($)})};function MV($,Q){let J=($.toString().split(".")[1]||"").length,q=(Q.toString().split(".")[1]||"").length,X=J>q?J:q,Y=Number.parseInt($.toFixed(X).replace(".","")),B=Number.parseInt(Q.toFixed(X).replace(".",""));return Y%B/10**X}class W1 extends P0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==$0.number){let X=this._getOrReturnCtx($);return X0(X,{code:o.invalid_type,expected:$0.number,received:X.parsedType}),F0}let J=void 0,q=new m0;for(let X of this._def.checks)if(X.kind==="int"){if(!A0.isInteger($.data))J=this._getOrReturnCtx($,J),X0(J,{code:o.invalid_type,expected:"integer",received:"float",message:X.message}),q.dirty()}else if(X.kind==="min"){if(X.inclusive?$.data<X.value:$.data<=X.value)J=this._getOrReturnCtx($,J),X0(J,{code:o.too_small,minimum:X.value,type:"number",inclusive:X.inclusive,exact:!1,message:X.message}),q.dirty()}else if(X.kind==="max"){if(X.inclusive?$.data>X.value:$.data>=X.value)J=this._getOrReturnCtx($,J),X0(J,{code:o.too_big,maximum:X.value,type:"number",inclusive:X.inclusive,exact:!1,message:X.message}),q.dirty()}else if(X.kind==="multipleOf"){if(MV($.data,X.value)!==0)J=this._getOrReturnCtx($,J),X0(J,{code:o.not_multiple_of,multipleOf:X.value,message:X.message}),q.dirty()}else if(X.kind==="finite"){if(!Number.isFinite($.data))J=this._getOrReturnCtx($,J),X0(J,{code:o.not_finite,message:X.message}),q.dirty()}else A0.assertNever(X);return{status:q.value,value:$.data}}gte($,Q){return this.setLimit("min",$,!0,V0.toString(Q))}gt($,Q){return this.setLimit("min",$,!1,V0.toString(Q))}lte($,Q){return this.setLimit("max",$,!0,V0.toString(Q))}lt($,Q){return this.setLimit("max",$,!1,V0.toString(Q))}setLimit($,Q,J,q){return new W1({...this._def,checks:[...this._def.checks,{kind:$,value:Q,inclusive:J,message:V0.toString(q)}]})}_addCheck($){return new W1({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:V0.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:V0.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:V0.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:V0.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:V0.toString($)})}multipleOf($,Q){return this._addCheck({kind:"multipleOf",value:$,message:V0.toString(Q)})}finite($){return this._addCheck({kind:"finite",message:V0.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:V0.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:V0.toString($)})}get minValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&A0.isInteger($.value))}get isFinite(){let $=null,Q=null;for(let J of this._def.checks)if(J.kind==="finite"||J.kind==="int"||J.kind==="multipleOf")return!0;else if(J.kind==="min"){if(Q===null||J.value>Q)Q=J.value}else if(J.kind==="max"){if($===null||J.value<$)$=J.value}return Number.isFinite(Q)&&Number.isFinite($)}}W1.create=($)=>{return new W1({checks:[],typeName:w0.ZodNumber,coerce:$?.coerce||!1,...D0($)})};class G1 extends P0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==$0.bigint)return this._getInvalidInput($);let J=void 0,q=new m0;for(let X of this._def.checks)if(X.kind==="min"){if(X.inclusive?$.data<X.value:$.data<=X.value)J=this._getOrReturnCtx($,J),X0(J,{code:o.too_small,type:"bigint",minimum:X.value,inclusive:X.inclusive,message:X.message}),q.dirty()}else if(X.kind==="max"){if(X.inclusive?$.data>X.value:$.data>=X.value)J=this._getOrReturnCtx($,J),X0(J,{code:o.too_big,type:"bigint",maximum:X.value,inclusive:X.inclusive,message:X.message}),q.dirty()}else if(X.kind==="multipleOf"){if($.data%X.value!==BigInt(0))J=this._getOrReturnCtx($,J),X0(J,{code:o.not_multiple_of,multipleOf:X.value,message:X.message}),q.dirty()}else A0.assertNever(X);return{status:q.value,value:$.data}}_getInvalidInput($){let Q=this._getOrReturnCtx($);return X0(Q,{code:o.invalid_type,expected:$0.bigint,received:Q.parsedType}),F0}gte($,Q){return this.setLimit("min",$,!0,V0.toString(Q))}gt($,Q){return this.setLimit("min",$,!1,V0.toString(Q))}lte($,Q){return this.setLimit("max",$,!0,V0.toString(Q))}lt($,Q){return this.setLimit("max",$,!1,V0.toString(Q))}setLimit($,Q,J,q){return new G1({...this._def,checks:[...this._def.checks,{kind:$,value:Q,inclusive:J,message:V0.toString(q)}]})}_addCheck($){return new G1({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:V0.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:V0.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:V0.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:V0.toString($)})}multipleOf($,Q){return this._addCheck({kind:"multipleOf",value:$,message:V0.toString(Q)})}get minValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}}G1.create=($)=>{return new G1({checks:[],typeName:w0.ZodBigInt,coerce:$?.coerce??!1,...D0($)})};class j6 extends P0{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==$0.boolean){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.boolean,received:J.parsedType}),F0}return l0($.data)}}j6.create=($)=>{return new j6({typeName:w0.ZodBoolean,coerce:$?.coerce||!1,...D0($)})};class x1 extends P0{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==$0.date){let X=this._getOrReturnCtx($);return X0(X,{code:o.invalid_type,expected:$0.date,received:X.parsedType}),F0}if(Number.isNaN($.data.getTime())){let X=this._getOrReturnCtx($);return X0(X,{code:o.invalid_date}),F0}let J=new m0,q=void 0;for(let X of this._def.checks)if(X.kind==="min"){if($.data.getTime()<X.value)q=this._getOrReturnCtx($,q),X0(q,{code:o.too_small,message:X.message,inclusive:!0,exact:!1,minimum:X.value,type:"date"}),J.dirty()}else if(X.kind==="max"){if($.data.getTime()>X.value)q=this._getOrReturnCtx($,q),X0(q,{code:o.too_big,message:X.message,inclusive:!0,exact:!1,maximum:X.value,type:"date"}),J.dirty()}else A0.assertNever(X);return{status:J.value,value:new Date($.data.getTime())}}_addCheck($){return new x1({...this._def,checks:[...this._def.checks,$]})}min($,Q){return this._addCheck({kind:"min",value:$.getTime(),message:V0.toString(Q)})}max($,Q){return this._addCheck({kind:"max",value:$.getTime(),message:V0.toString(Q)})}get minDate(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $!=null?new Date($):null}}x1.create=($)=>{return new x1({checks:[],coerce:$?.coerce||!1,typeName:w0.ZodDate,...D0($)})};class X8 extends P0{_parse($){if(this._getType($)!==$0.symbol){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.symbol,received:J.parsedType}),F0}return l0($.data)}}X8.create=($)=>{return new X8({typeName:w0.ZodSymbol,...D0($)})};class H6 extends P0{_parse($){if(this._getType($)!==$0.undefined){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.undefined,received:J.parsedType}),F0}return l0($.data)}}H6.create=($)=>{return new H6({typeName:w0.ZodUndefined,...D0($)})};class M6 extends P0{_parse($){if(this._getType($)!==$0.null){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.null,received:J.parsedType}),F0}return l0($.data)}}M6.create=($)=>{return new M6({typeName:w0.ZodNull,...D0($)})};class f1 extends P0{constructor(){super(...arguments);this._any=!0}_parse($){return l0($.data)}}f1.create=($)=>{return new f1({typeName:w0.ZodAny,...D0($)})};class U1 extends P0{constructor(){super(...arguments);this._unknown=!0}_parse($){return l0($.data)}}U1.create=($)=>{return new U1({typeName:w0.ZodUnknown,...D0($)})};class k2 extends P0{_parse($){let Q=this._getOrReturnCtx($);return X0(Q,{code:o.invalid_type,expected:$0.never,received:Q.parsedType}),F0}}k2.create=($)=>{return new k2({typeName:w0.ZodNever,...D0($)})};class Y8 extends P0{_parse($){if(this._getType($)!==$0.undefined){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.void,received:J.parsedType}),F0}return l0($.data)}}Y8.create=($)=>{return new Y8({typeName:w0.ZodVoid,...D0($)})};class M2 extends P0{_parse($){let{ctx:Q,status:J}=this._processInputParams($),q=this._def;if(Q.parsedType!==$0.array)return X0(Q,{code:o.invalid_type,expected:$0.array,received:Q.parsedType}),F0;if(q.exactLength!==null){let Y=Q.data.length>q.exactLength.value,B=Q.data.length<q.exactLength.value;if(Y||B)X0(Q,{code:Y?o.too_big:o.too_small,minimum:B?q.exactLength.value:void 0,maximum:Y?q.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:q.exactLength.message}),J.dirty()}if(q.minLength!==null){if(Q.data.length<q.minLength.value)X0(Q,{code:o.too_small,minimum:q.minLength.value,type:"array",inclusive:!0,exact:!1,message:q.minLength.message}),J.dirty()}if(q.maxLength!==null){if(Q.data.length>q.maxLength.value)X0(Q,{code:o.too_big,maximum:q.maxLength.value,type:"array",inclusive:!0,exact:!1,message:q.maxLength.message}),J.dirty()}if(Q.common.async)return Promise.all([...Q.data].map((Y,B)=>{return q.type._parseAsync(new w2(Q,Y,Q.path,B))})).then((Y)=>{return m0.mergeArray(J,Y)});let X=[...Q.data].map((Y,B)=>{return q.type._parseSync(new w2(Q,Y,Q.path,B))});return m0.mergeArray(J,X)}get element(){return this._def.type}min($,Q){return new M2({...this._def,minLength:{value:$,message:V0.toString(Q)}})}max($,Q){return new M2({...this._def,maxLength:{value:$,message:V0.toString(Q)}})}length($,Q){return new M2({...this._def,exactLength:{value:$,message:V0.toString(Q)}})}nonempty($){return this.min(1,$)}}M2.create=($,Q)=>{return new M2({type:$,minLength:null,maxLength:null,exactLength:null,typeName:w0.ZodArray,...D0(Q)})};function V6($){if($ instanceof x0){let Q={};for(let J in $.shape){let q=$.shape[J];Q[J]=F2.create(V6(q))}return new x0({...$._def,shape:()=>Q})}else if($ instanceof M2)return new M2({...$._def,type:V6($.element)});else if($ instanceof F2)return F2.create(V6($.unwrap()));else if($ instanceof i2)return i2.create(V6($.unwrap()));else if($ instanceof Z2)return Z2.create($.items.map((Q)=>V6(Q)));else return $}class x0 extends P0{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),Q=A0.objectKeys($);return this._cached={shape:$,keys:Q},this._cached}_parse($){if(this._getType($)!==$0.object){let W=this._getOrReturnCtx($);return X0(W,{code:o.invalid_type,expected:$0.object,received:W.parsedType}),F0}let{status:J,ctx:q}=this._processInputParams($),{shape:X,keys:Y}=this._getCached(),B=[];if(!(this._def.catchall instanceof k2&&this._def.unknownKeys==="strip")){for(let W in q.data)if(!Y.includes(W))B.push(W)}let U=[];for(let W of Y){let G=X[W],V=q.data[W];U.push({key:{status:"valid",value:W},value:G._parse(new w2(q,V,q.path,W)),alwaysSet:W in q.data})}if(this._def.catchall instanceof k2){let W=this._def.unknownKeys;if(W==="passthrough")for(let G of B)U.push({key:{status:"valid",value:G},value:{status:"valid",value:q.data[G]}});else if(W==="strict"){if(B.length>0)X0(q,{code:o.unrecognized_keys,keys:B}),J.dirty()}else if(W==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let W=this._def.catchall;for(let G of B){let V=q.data[G];U.push({key:{status:"valid",value:G},value:W._parse(new w2(q,V,q.path,G)),alwaysSet:G in q.data})}}if(q.common.async)return Promise.resolve().then(async()=>{let W=[];for(let G of U){let V=await G.key,F=await G.value;W.push({key:V,value:F,alwaysSet:G.alwaysSet})}return W}).then((W)=>{return m0.mergeObjectSync(J,W)});else return m0.mergeObjectSync(J,U)}get shape(){return this._def.shape()}strict($){return V0.errToObj,new x0({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(Q,J)=>{let q=this._def.errorMap?.(Q,J).message??J.defaultError;if(Q.code==="unrecognized_keys")return{message:V0.errToObj($).message??q};return{message:q}}}:{}})}strip(){return new x0({...this._def,unknownKeys:"strip"})}passthrough(){return new x0({...this._def,unknownKeys:"passthrough"})}extend($){return new x0({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new x0({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:w0.ZodObject})}setKey($,Q){return this.augment({[$]:Q})}catchall($){return new x0({...this._def,catchall:$})}pick($){let Q={};for(let J of A0.objectKeys($))if($[J]&&this.shape[J])Q[J]=this.shape[J];return new x0({...this._def,shape:()=>Q})}omit($){let Q={};for(let J of A0.objectKeys(this.shape))if(!$[J])Q[J]=this.shape[J];return new x0({...this._def,shape:()=>Q})}deepPartial(){return V6(this)}partial($){let Q={};for(let J of A0.objectKeys(this.shape)){let q=this.shape[J];if($&&!$[J])Q[J]=q;else Q[J]=q.optional()}return new x0({...this._def,shape:()=>Q})}required($){let Q={};for(let J of A0.objectKeys(this.shape))if($&&!$[J])Q[J]=this.shape[J];else{let X=this.shape[J];while(X instanceof F2)X=X._def.innerType;Q[J]=X}return new x0({...this._def,shape:()=>Q})}keyof(){return iJ(A0.objectKeys(this.shape))}}x0.create=($,Q)=>{return new x0({shape:()=>$,unknownKeys:"strip",catchall:k2.create(),typeName:w0.ZodObject,...D0(Q)})};x0.strictCreate=($,Q)=>{return new x0({shape:()=>$,unknownKeys:"strict",catchall:k2.create(),typeName:w0.ZodObject,...D0(Q)})};x0.lazycreate=($,Q)=>{return new x0({shape:$,unknownKeys:"strip",catchall:k2.create(),typeName:w0.ZodObject,...D0(Q)})};class F6 extends P0{_parse($){let{ctx:Q}=this._processInputParams($),J=this._def.options;function q(X){for(let B of X)if(B.result.status==="valid")return B.result;for(let B of X)if(B.result.status==="dirty")return Q.common.issues.push(...B.ctx.common.issues),B.result;let Y=X.map((B)=>new t0(B.ctx.common.issues));return X0(Q,{code:o.invalid_union,unionErrors:Y}),F0}if(Q.common.async)return Promise.all(J.map(async(X)=>{let Y={...Q,common:{...Q.common,issues:[]},parent:null};return{result:await X._parseAsync({data:Q.data,path:Q.path,parent:Y}),ctx:Y}})).then(q);else{let X=void 0,Y=[];for(let U of J){let W={...Q,common:{...Q.common,issues:[]},parent:null},G=U._parseSync({data:Q.data,path:Q.path,parent:W});if(G.status==="valid")return G;else if(G.status==="dirty"&&!X)X={result:G,ctx:W};if(W.common.issues.length)Y.push(W.common.issues)}if(X)return Q.common.issues.push(...X.ctx.common.issues),X.result;let B=Y.map((U)=>new t0(U));return X0(Q,{code:o.invalid_union,unionErrors:B}),F0}}get options(){return this._def.options}}F6.create=($,Q)=>{return new F6({options:$,typeName:w0.ZodUnion,...D0(Q)})};var d2=($)=>{if($ instanceof L6)return d2($.schema);else if($ instanceof L2)return d2($.innerType());else if($ instanceof z6)return[$.value];else if($ instanceof V1)return $.options;else if($ instanceof O6)return A0.objectValues($.enum);else if($ instanceof N6)return d2($._def.innerType);else if($ instanceof H6)return[void 0];else if($ instanceof M6)return[null];else if($ instanceof F2)return[void 0,...d2($.unwrap())];else if($ instanceof i2)return[null,...d2($.unwrap())];else if($ instanceof U5)return d2($.unwrap());else if($ instanceof P6)return d2($.unwrap());else if($ instanceof D6)return d2($._def.innerType);else return[]};class B5 extends P0{_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==$0.object)return X0(Q,{code:o.invalid_type,expected:$0.object,received:Q.parsedType}),F0;let J=this.discriminator,q=Q.data[J],X=this.optionsMap.get(q);if(!X)return X0(Q,{code:o.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[J]}),F0;if(Q.common.async)return X._parseAsync({data:Q.data,path:Q.path,parent:Q});else return X._parseSync({data:Q.data,path:Q.path,parent:Q})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,Q,J){let q=new Map;for(let X of Q){let Y=d2(X.shape[$]);if(!Y.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let B of Y){if(q.has(B))throw Error(`Discriminator property ${String($)} has duplicate value ${String(B)}`);q.set(B,X)}}return new B5({typeName:w0.ZodDiscriminatedUnion,discriminator:$,options:Q,optionsMap:q,...D0(J)})}}function $7($,Q){let J=v2($),q=v2(Q);if($===Q)return{valid:!0,data:$};else if(J===$0.object&&q===$0.object){let X=A0.objectKeys(Q),Y=A0.objectKeys($).filter((U)=>X.indexOf(U)!==-1),B={...$,...Q};for(let U of Y){let W=$7($[U],Q[U]);if(!W.valid)return{valid:!1};B[U]=W.data}return{valid:!0,data:B}}else if(J===$0.array&&q===$0.array){if($.length!==Q.length)return{valid:!1};let X=[];for(let Y=0;Y<$.length;Y++){let B=$[Y],U=Q[Y],W=$7(B,U);if(!W.valid)return{valid:!1};X.push(W.data)}return{valid:!0,data:X}}else if(J===$0.date&&q===$0.date&&+$===+Q)return{valid:!0,data:$};else return{valid:!1}}class w6 extends P0{_parse($){let{status:Q,ctx:J}=this._processInputParams($),q=(X,Y)=>{if(X5(X)||X5(Y))return F0;let B=$7(X.value,Y.value);if(!B.valid)return X0(J,{code:o.invalid_intersection_types}),F0;if(Y5(X)||Y5(Y))Q.dirty();return{status:Q.value,value:B.data}};if(J.common.async)return Promise.all([this._def.left._parseAsync({data:J.data,path:J.path,parent:J}),this._def.right._parseAsync({data:J.data,path:J.path,parent:J})]).then(([X,Y])=>q(X,Y));else return q(this._def.left._parseSync({data:J.data,path:J.path,parent:J}),this._def.right._parseSync({data:J.data,path:J.path,parent:J}))}}w6.create=($,Q,J)=>{return new w6({left:$,right:Q,typeName:w0.ZodIntersection,...D0(J)})};class Z2 extends P0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==$0.array)return X0(J,{code:o.invalid_type,expected:$0.array,received:J.parsedType}),F0;if(J.data.length<this._def.items.length)return X0(J,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F0;if(!this._def.rest&&J.data.length>this._def.items.length)X0(J,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Q.dirty();let X=[...J.data].map((Y,B)=>{let U=this._def.items[B]||this._def.rest;if(!U)return null;return U._parse(new w2(J,Y,J.path,B))}).filter((Y)=>!!Y);if(J.common.async)return Promise.all(X).then((Y)=>{return m0.mergeArray(Q,Y)});else return m0.mergeArray(Q,X)}get items(){return this._def.items}rest($){return new Z2({...this._def,rest:$})}}Z2.create=($,Q)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z2({items:$,typeName:w0.ZodTuple,rest:null,...D0(Q)})};class B8 extends P0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==$0.object)return X0(J,{code:o.invalid_type,expected:$0.object,received:J.parsedType}),F0;let q=[],X=this._def.keyType,Y=this._def.valueType;for(let B in J.data)q.push({key:X._parse(new w2(J,B,J.path,B)),value:Y._parse(new w2(J,J.data[B],J.path,B)),alwaysSet:B in J.data});if(J.common.async)return m0.mergeObjectAsync(Q,q);else return m0.mergeObjectSync(Q,q)}get element(){return this._def.valueType}static create($,Q,J){if(Q instanceof P0)return new B8({keyType:$,valueType:Q,typeName:w0.ZodRecord,...D0(J)});return new B8({keyType:H2.create(),valueType:$,typeName:w0.ZodRecord,...D0(Q)})}}class U8 extends P0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==$0.map)return X0(J,{code:o.invalid_type,expected:$0.map,received:J.parsedType}),F0;let q=this._def.keyType,X=this._def.valueType,Y=[...J.data.entries()].map(([B,U],W)=>{return{key:q._parse(new w2(J,B,J.path,[W,"key"])),value:X._parse(new w2(J,U,J.path,[W,"value"]))}});if(J.common.async){let B=new Map;return Promise.resolve().then(async()=>{for(let U of Y){let W=await U.key,G=await U.value;if(W.status==="aborted"||G.status==="aborted")return F0;if(W.status==="dirty"||G.status==="dirty")Q.dirty();B.set(W.value,G.value)}return{status:Q.value,value:B}})}else{let B=new Map;for(let U of Y){let{key:W,value:G}=U;if(W.status==="aborted"||G.status==="aborted")return F0;if(W.status==="dirty"||G.status==="dirty")Q.dirty();B.set(W.value,G.value)}return{status:Q.value,value:B}}}}U8.create=($,Q,J)=>{return new U8({valueType:Q,keyType:$,typeName:w0.ZodMap,...D0(J)})};class y1 extends P0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==$0.set)return X0(J,{code:o.invalid_type,expected:$0.set,received:J.parsedType}),F0;let q=this._def;if(q.minSize!==null){if(J.data.size<q.minSize.value)X0(J,{code:o.too_small,minimum:q.minSize.value,type:"set",inclusive:!0,exact:!1,message:q.minSize.message}),Q.dirty()}if(q.maxSize!==null){if(J.data.size>q.maxSize.value)X0(J,{code:o.too_big,maximum:q.maxSize.value,type:"set",inclusive:!0,exact:!1,message:q.maxSize.message}),Q.dirty()}let X=this._def.valueType;function Y(U){let W=new Set;for(let G of U){if(G.status==="aborted")return F0;if(G.status==="dirty")Q.dirty();W.add(G.value)}return{status:Q.value,value:W}}let B=[...J.data.values()].map((U,W)=>X._parse(new w2(J,U,J.path,W)));if(J.common.async)return Promise.all(B).then((U)=>Y(U));else return Y(B)}min($,Q){return new y1({...this._def,minSize:{value:$,message:V0.toString(Q)}})}max($,Q){return new y1({...this._def,maxSize:{value:$,message:V0.toString(Q)}})}size($,Q){return this.min($,Q).max($,Q)}nonempty($){return this.min(1,$)}}y1.create=($,Q)=>{return new y1({valueType:$,minSize:null,maxSize:null,typeName:w0.ZodSet,...D0(Q)})};class K6 extends P0{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==$0.function)return X0(Q,{code:o.invalid_type,expected:$0.function,received:Q.parsedType}),F0;function J(B,U){return q8({data:B,path:Q.path,errorMaps:[Q.common.contextualErrorMap,Q.schemaErrorMap,W6(),l2].filter((W)=>!!W),issueData:{code:o.invalid_arguments,argumentsError:U}})}function q(B,U){return q8({data:B,path:Q.path,errorMaps:[Q.common.contextualErrorMap,Q.schemaErrorMap,W6(),l2].filter((W)=>!!W),issueData:{code:o.invalid_return_type,returnTypeError:U}})}let X={errorMap:Q.common.contextualErrorMap},Y=Q.data;if(this._def.returns instanceof _1){let B=this;return l0(async function(...U){let W=new t0([]),G=await B._def.args.parseAsync(U,X).catch((M)=>{throw W.addIssue(J(U,M)),W}),V=await Reflect.apply(Y,this,G);return await B._def.returns._def.type.parseAsync(V,X).catch((M)=>{throw W.addIssue(q(V,M)),W})})}else{let B=this;return l0(function(...U){let W=B._def.args.safeParse(U,X);if(!W.success)throw new t0([J(U,W.error)]);let G=Reflect.apply(Y,this,W.data),V=B._def.returns.safeParse(G,X);if(!V.success)throw new t0([q(G,V.error)]);return V.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new K6({...this._def,args:Z2.create($).rest(U1.create())})}returns($){return new K6({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,Q,J){return new K6({args:$?$:Z2.create([]).rest(U1.create()),returns:Q||U1.create(),typeName:w0.ZodFunction,...D0(J)})}}class L6 extends P0{get schema(){return this._def.getter()}_parse($){let{ctx:Q}=this._processInputParams($);return this._def.getter()._parse({data:Q.data,path:Q.path,parent:Q})}}L6.create=($,Q)=>{return new L6({getter:$,typeName:w0.ZodLazy,...D0(Q)})};class z6 extends P0{_parse($){if($.data!==this._def.value){let Q=this._getOrReturnCtx($);return X0(Q,{received:Q.data,code:o.invalid_literal,expected:this._def.value}),F0}return{status:"valid",value:$.data}}get value(){return this._def.value}}z6.create=($,Q)=>{return new z6({value:$,typeName:w0.ZodLiteral,...D0(Q)})};function iJ($,Q){return new V1({values:$,typeName:w0.ZodEnum,...D0(Q)})}class V1 extends P0{_parse($){if(typeof $.data!=="string"){let Q=this._getOrReturnCtx($),J=this._def.values;return X0(Q,{expected:A0.joinValues(J),received:Q.parsedType,code:o.invalid_type}),F0}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let Q=this._getOrReturnCtx($),J=this._def.values;return X0(Q,{received:Q.data,code:o.invalid_enum_value,options:J}),F0}return l0($.data)}get options(){return this._def.values}get enum(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}get Values(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}get Enum(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}extract($,Q=this._def){return V1.create($,{...this._def,...Q})}exclude($,Q=this._def){return V1.create(this.options.filter((J)=>!$.includes(J)),{...this._def,...Q})}}V1.create=iJ;class O6 extends P0{_parse($){let Q=A0.getValidEnumValues(this._def.values),J=this._getOrReturnCtx($);if(J.parsedType!==$0.string&&J.parsedType!==$0.number){let q=A0.objectValues(Q);return X0(J,{expected:A0.joinValues(q),received:J.parsedType,code:o.invalid_type}),F0}if(!this._cache)this._cache=new Set(A0.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let q=A0.objectValues(Q);return X0(J,{received:J.data,code:o.invalid_enum_value,options:q}),F0}return l0($.data)}get enum(){return this._def.values}}O6.create=($,Q)=>{return new O6({values:$,typeName:w0.ZodNativeEnum,...D0(Q)})};class _1 extends P0{unwrap(){return this._def.type}_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==$0.promise&&Q.common.async===!1)return X0(Q,{code:o.invalid_type,expected:$0.promise,received:Q.parsedType}),F0;let J=Q.parsedType===$0.promise?Q.data:Promise.resolve(Q.data);return l0(J.then((q)=>{return this._def.type.parseAsync(q,{path:Q.path,errorMap:Q.common.contextualErrorMap})}))}}_1.create=($,Q)=>{return new _1({type:$,typeName:w0.ZodPromise,...D0(Q)})};class L2 extends P0{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===w0.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:Q,ctx:J}=this._processInputParams($),q=this._def.effect||null,X={addIssue:(Y)=>{if(X0(J,Y),Y.fatal)Q.abort();else Q.dirty()},get path(){return J.path}};if(X.addIssue=X.addIssue.bind(X),q.type==="preprocess"){let Y=q.transform(J.data,X);if(J.common.async)return Promise.resolve(Y).then(async(B)=>{if(Q.value==="aborted")return F0;let U=await this._def.schema._parseAsync({data:B,path:J.path,parent:J});if(U.status==="aborted")return F0;if(U.status==="dirty")return g1(U.value);if(Q.value==="dirty")return g1(U.value);return U});else{if(Q.value==="aborted")return F0;let B=this._def.schema._parseSync({data:Y,path:J.path,parent:J});if(B.status==="aborted")return F0;if(B.status==="dirty")return g1(B.value);if(Q.value==="dirty")return g1(B.value);return B}}if(q.type==="refinement"){let Y=(B)=>{let U=q.refinement(B,X);if(J.common.async)return Promise.resolve(U);if(U instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return B};if(J.common.async===!1){let B=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(B.status==="aborted")return F0;if(B.status==="dirty")Q.dirty();return Y(B.value),{status:Q.value,value:B.value}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((B)=>{if(B.status==="aborted")return F0;if(B.status==="dirty")Q.dirty();return Y(B.value).then(()=>{return{status:Q.value,value:B.value}})})}if(q.type==="transform")if(J.common.async===!1){let Y=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(!B1(Y))return F0;let B=q.transform(Y.value,X);if(B instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:Q.value,value:B}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((Y)=>{if(!B1(Y))return F0;return Promise.resolve(q.transform(Y.value,X)).then((B)=>({status:Q.value,value:B}))});A0.assertNever(q)}}L2.create=($,Q,J)=>{return new L2({schema:$,typeName:w0.ZodEffects,effect:Q,...D0(J)})};L2.createWithPreprocess=($,Q,J)=>{return new L2({schema:Q,effect:{type:"preprocess",transform:$},typeName:w0.ZodEffects,...D0(J)})};class F2 extends P0{_parse($){if(this._getType($)===$0.undefined)return l0(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}F2.create=($,Q)=>{return new F2({innerType:$,typeName:w0.ZodOptional,...D0(Q)})};class i2 extends P0{_parse($){if(this._getType($)===$0.null)return l0(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}i2.create=($,Q)=>{return new i2({innerType:$,typeName:w0.ZodNullable,...D0(Q)})};class N6 extends P0{_parse($){let{ctx:Q}=this._processInputParams($),J=Q.data;if(Q.parsedType===$0.undefined)J=this._def.defaultValue();return this._def.innerType._parse({data:J,path:Q.path,parent:Q})}removeDefault(){return this._def.innerType}}N6.create=($,Q)=>{return new N6({innerType:$,typeName:w0.ZodDefault,defaultValue:typeof Q.default==="function"?Q.default:()=>Q.default,...D0(Q)})};class D6 extends P0{_parse($){let{ctx:Q}=this._processInputParams($),J={...Q,common:{...Q.common,issues:[]}},q=this._def.innerType._parse({data:J.data,path:J.path,parent:{...J}});if(G6(q))return q.then((X)=>{return{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new t0(J.common.issues)},input:J.data})}});else return{status:"valid",value:q.status==="valid"?q.value:this._def.catchValue({get error(){return new t0(J.common.issues)},input:J.data})}}removeCatch(){return this._def.innerType}}D6.create=($,Q)=>{return new D6({innerType:$,typeName:w0.ZodCatch,catchValue:typeof Q.catch==="function"?Q.catch:()=>Q.catch,...D0(Q)})};class W8 extends P0{_parse($){if(this._getType($)!==$0.nan){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.nan,received:J.parsedType}),F0}return{status:"valid",value:$.data}}}W8.create=($)=>{return new W8({typeName:w0.ZodNaN,...D0($)})};var FV=Symbol("zod_brand");class U5 extends P0{_parse($){let{ctx:Q}=this._processInputParams($),J=Q.data;return this._def.type._parse({data:J,path:Q.path,parent:Q})}unwrap(){return this._def.type}}class G8 extends P0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.common.async)return(async()=>{let X=await this._def.in._parseAsync({data:J.data,path:J.path,parent:J});if(X.status==="aborted")return F0;if(X.status==="dirty")return Q.dirty(),g1(X.value);else return this._def.out._parseAsync({data:X.value,path:J.path,parent:J})})();else{let q=this._def.in._parseSync({data:J.data,path:J.path,parent:J});if(q.status==="aborted")return F0;if(q.status==="dirty")return Q.dirty(),{status:"dirty",value:q.value};else return this._def.out._parseSync({data:q.value,path:J.path,parent:J})}}static create($,Q){return new G8({in:$,out:Q,typeName:w0.ZodPipeline})}}class P6 extends P0{_parse($){let Q=this._def.innerType._parse($),J=(q)=>{if(B1(q))q.value=Object.freeze(q.value);return q};return G6(Q)?Q.then((q)=>J(q)):J(Q)}unwrap(){return this._def.innerType}}P6.create=($,Q)=>{return new P6({innerType:$,typeName:w0.ZodReadonly,...D0(Q)})};function cJ($,Q){let J=typeof $==="function"?$(Q):typeof $==="string"?{message:$}:$;return typeof J==="string"?{message:J}:J}function nJ($,Q={},J){if($)return f1.create().superRefine((q,X)=>{let Y=$(q);if(Y instanceof Promise)return Y.then((B)=>{if(!B){let U=cJ(Q,q),W=U.fatal??J??!0;X.addIssue({code:"custom",...U,fatal:W})}});if(!Y){let B=cJ(Q,q),U=B.fatal??J??!0;X.addIssue({code:"custom",...B,fatal:U})}return});return f1.create()}var wV={object:x0.lazycreate},w0;(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(w0||(w0={}));var LV=($,Q={message:`Input not instance of ${$.name}`})=>nJ((J)=>J instanceof $,Q),oJ=H2.create,rJ=W1.create,zV=W8.create,OV=G1.create,aJ=j6.create,NV=x1.create,DV=X8.create,PV=H6.create,AV=M6.create,CV=f1.create,RV=U1.create,IV=k2.create,SV=Y8.create,EV=M2.create,vV=x0.create,kV=x0.strictCreate,ZV=F6.create,TV=B5.create,gV=w6.create,xV=Z2.create,fV=B8.create,yV=U8.create,_V=y1.create,bV=K6.create,hV=L6.create,mV=z6.create,uV=V1.create,cV=O6.create,pV=_1.create,lV=L2.create,dV=F2.create,iV=i2.create,nV=L2.createWithPreprocess,oV=G8.create,rV=()=>oJ().optional(),aV=()=>rJ().optional(),sV=()=>aJ().optional(),tV={string:($)=>H2.create({...$,coerce:!0}),number:($)=>W1.create({...$,coerce:!0}),boolean:($)=>j6.create({...$,coerce:!0}),bigint:($)=>G1.create({...$,coerce:!0}),date:($)=>x1.create({...$,coerce:!0})};var eV=F0;class z2 extends Error{field;regex;constructor($,Q,J){super(J);this.field=$,this.regex=Q}}class V8 extends Error{hash;constructor($){super(`'${$}' not found in the root hash`);this.hash=$}}class Q7 extends Map{#Q;#$=0;constructor($,Q=[]){super();this.#Q=$;for(let[J,q]of Q)this.set(J,q)}get($){let Q=super.get($);if(Q!==void 0)super.delete($),super.set($,Q);return Q}set($,Q){let J=super.get($);if(J===void 0)this.#$+=$.length;else if(J!==null)this.#$-=J.length;if(Q!==null)this.#$+=Q.length;super.delete($);let q;while(this.#$>this.#Q&&(q=this.entries().next().value)){let[X,Y]=q;if(super.delete(X),this.#$-=X.length,Y!==null)this.#$-=Y.length}return super.set($,Q),this}delete($){let Q=super.get($);if(Q===void 0)return!1;if(super.delete($),Q!==null)this.#$-=Q.length;return this.#$-=$.length,!0}clear(){super.clear(),this.#$=0}}var Wq=R7(tJ(),1);var $K={0:"brush",12:"brush",1:"pencil",14:"pencil",2:"ballpoint",15:"ballpoint",3:"marker",16:"marker",4:"fineliner",17:"fineliner",5:"highlighter",18:"highlighter",6:"eraser",7:"mechanicalPencil",13:"mechanicalPencil",8:"eraseArea",21:"calligraphy",23:"shader"};function QK($){return $K[$]}var JK={0:"black",1:"gray",2:"white"},K1=43,W5="reMarkable .lines file, version=";function eJ($,Q){let J=new DataView($.buffer,$.byteOffset,$.byteLength),q=K1,X=()=>{let W=J.getInt32(q,!0);return q+=4,W},Y=()=>{let W=J.getFloat32(q,!0);return q+=4,W},B=X(),U=[];for(let W=0;W<B;W++){let G=X(),V=[];for(let F=0;F<G;F++){let M=X(),j=X(),f=X(),T=Y(),D=Q===5?X():void 0,P=X(),K=Array(P);for(let z=0;z<P;z++)K[z]={x:Y(),y:Y(),speed:Y(),direction:Y(),width:Y(),pressure:Y()};let L={brushType:M,color:j,padding:f,brushBaseSize:T,points:K};if(D!==void 0)L.unknown=D;V.push(L)}U.push({lines:V})}return{version:Q,layers:U}}function $q($){let{version:Q}=$;if(Q!==3&&Q!==5)throw Error(`rendering version ${Q} .lines files is not supported (only 3 and 5)`);let J=Q===5?24:20,q=K1+4;for(let V of $.layers){q+=4;for(let F of V.lines)q+=J+F.points.length*24}let X=new Uint8Array(q),Y=new DataView(X.buffer),B=`${W5}${Q}`.padEnd(K1," ");for(let V=0;V<K1;V++)X[V]=B.charCodeAt(V);let U=K1,W=(V)=>{Y.setInt32(U,V,!0),U+=4},G=(V)=>{Y.setFloat32(U,V,!0),U+=4};W($.layers.length);for(let V of $.layers){W(V.lines.length);for(let F of V.lines){if(W(F.brushType),W(F.color),W(F.padding??0),G(F.brushBaseSize),Q===5)W(F.unknown??0);W(F.points.length);for(let M of F.points)G(M.x),G(M.y),G(M.speed),G(M.direction),G(M.width),G(M.pressure)}}return X}var q7={authorId:0,counter:1},Y7={authorId:0,counter:0};function d0($){return`${$.authorId}:${$.counter}`}var Qq=43,qK="reMarkable .lines file, version=6",Jq=1,j1=4,XK=8,b1=12,X7=15;class Xq{#Q;#$;#Y;#J=[];constructor($,Q){this.#Q=new DataView($.buffer,$.byteOffset,$.byteLength),this.#$=Q,this.#Y=$.byteLength}get offset(){return this.#$}get atFileEnd(){return this.#$>=this.#Y}#q(){return this.#J.length>0?this.#J[this.#J.length-1]:this.#Y}bytesRemaining(){return this.#q()-this.#$}u8(){let $=this.#Q.getUint8(this.#$);return this.#$+=1,$}u16(){let $=this.#Q.getUint16(this.#$,!0);return this.#$+=2,$}u32(){let $=this.#Q.getUint32(this.#$,!0);return this.#$+=4,$}f32(){let $=this.#Q.getFloat32(this.#$,!0);return this.#$+=4,$}f64(){let $=this.#Q.getFloat64(this.#$,!0);return this.#$+=8,$}varuint(){let $=0,Q=0,J;do J=this.u8(),$+=(J&127)*2**Q,Q+=7;while(J&128);return $}crdtId(){return{authorId:this.u8(),counter:this.varuint()}}bytes($){let Q=this.#Q.byteOffset+this.#$,J=new Uint8Array(this.#Q.buffer,Q,$);return this.#$+=$,J.slice()}peekTag(){if(this.#$>=this.#q())return;let $=this.#$,Q=this.varuint();return this.#$=$,[Math.floor(Q/16),Q%16]}hasTag($,Q){let J=this.peekTag();return J!==void 0&&J[0]===$&&J[1]===Q}#X($,Q){let J=this.varuint();if(Math.floor(J/16)!==$||J%16!==Q)throw Error(`unexpected v6 tag ${J} (wanted ${$}/${Q})`)}readInt($){return this.#X($,j1),this.u32()}readFloat($){return this.#X($,j1),this.f32()}readDouble($){return this.#X($,XK),this.f64()}readId($){return this.#X($,X7),this.crdtId()}readBool($){return this.#X($,Jq),this.u8()!==0}readByte($){return this.#X($,Jq),this.u8()}subblock($,Q){this.#X($,b1);let J=this.u32(),q=this.#$+J;this.#J.push(q);try{return Q()}finally{this.#J.pop(),this.#$=q}}seek($){this.#$=$}bounded($,Q){this.#J.push($);try{let J=Q();if(this.#$>$)throw Error("block body overran its declared length");return[J,this.bytes($-this.#$)]}finally{this.#J.pop(),this.#$=$}}readLww($,Q){return this.subblock($,()=>{let J=this.readId(1),q=Q();return{timestamp:J,value:q}})}readString($){return this.subblock($,()=>{let Q=this.varuint();return this.u8(),new TextDecoder().decode(this.bytes(Q))})}readStringWithFormat($){return this.subblock($,()=>{let Q=this.varuint();this.u8();let J=new TextDecoder().decode(this.bytes(Q));if(this.hasTag(2,j1))return this.readInt(2);else return J})}}function K8($,Q){let J=$.readId(1),q=$.readId(2),X=$.readId(3),Y=$.readId(4),B=$.readInt(5),U;if($.hasTag(6,b1))U=$.subblock(6,()=>{let W=$.u8();return Q(W)});return{parentId:J,item:{itemId:q,leftId:X,rightId:Y,deletedLength:B,value:U}}}function YK($,Q){let J=$.readInt(1),q=$.readInt(2),X=$.readDouble(3),Y=$.readFloat(4),B=$.subblock(5,()=>{let W=Q===1?24:14,G=$.bytesRemaining(),V=Math.floor(G/W),F=Array(V);for(let M=0;M<V;M++){let j=$.f32(),f=$.f32();if(Q===1)F[M]={x:j,y:f,speed:$.f32()*4,direction:$.f32()*255/(2*Math.PI),width:Math.round($.f32()*4),pressure:$.f32()*255};else{let T=$.u16(),D=$.u16(),P=$.u8(),K=$.u8();F[M]={x:j,y:f,speed:T,width:D,direction:P,pressure:K}}}return F}),U={tool:J,color:q,thicknessScale:X,startingLength:Y,points:B};if($.hasTag(6,X7))$.readId(6);if($.hasTag(7,X7))$.readId(7);if($.hasTag(8,j1))U.colorRgba=$.readInt(8);return U}function BK($){let Q=$.hasTag(2,j1)?$.readInt(2):void 0,J=$.hasTag(3,j1)?$.readInt(3):void 0,q=$.readInt(4),X=$.readString(5),Y=$.subblock(6,()=>{let U=$.varuint(),W=Array(U);for(let G=0;G<U;G++)W[G]={x:$.f64(),y:$.f64(),w:$.f64(),h:$.f64()};return W}),B={length:J??X.length,color:q,text:X,rectangles:Y};if(Q!==void 0)B.start=Q;if($.hasTag(10,j1))B.colorRgba=$.readInt(10);return B}function UK($){let Q=[],J=new Map;$.subblock(2,()=>{$.subblock(1,()=>{$.subblock(1,()=>{let B=$.varuint();for(let U=0;U<B;U++)Q.push($.subblock(0,()=>{let W=$.readId(2),G=$.readId(3),V=$.readId(4),F=$.readInt(5),M=$.hasTag(6,b1)?$.readStringWithFormat(6):"";return{itemId:W,leftId:G,rightId:V,deletedLength:F,value:M}}))})}),$.subblock(2,()=>{$.subblock(1,()=>{let B=$.varuint();for(let U=0;U<B;U++){let W=$.crdtId(),G=$.readId(1),V=$.subblock(2,()=>{return $.u8(),$.u8()});J.set(d0(W),{timestamp:G,value:V})}})})});let[q,X]=$.subblock(3,()=>[$.f64(),$.f64()]),Y=$.readFloat(4);return{items:Q,styles:J,posX:q,posY:X,width:Y}}function WK($,Q,J){switch(Q){case 0:return{type:"migrationInfo",migrationId:$.readId(1),isDevice:$.readBool(2)};case 1:return{type:"sceneTree",treeId:$.readId(1),nodeId:$.readId(2),isUpdate:$.readBool(3),parentId:$.subblock(4,()=>$.readId(1))};case 2:{let q=$.readId(1),X=$.readLww(2,()=>$.readString(2)),Y=$.readLww(3,()=>$.readBool(2)),B={type:"treeNode",nodeId:q,label:X,visible:Y};if($.bytesRemaining()>0&&$.hasTag(7,b1))B.anchorId=$.readLww(7,()=>$.readId(2)),B.anchorType=$.readLww(8,()=>$.readByte(2)),B.anchorThreshold=$.readLww(9,()=>$.readFloat(2)),B.anchorOriginX=$.readLww(10,()=>$.readFloat(2));return B}case 3:return{type:"sceneGlyphItem",...K8($,(q)=>q===1?BK($):void 0)};case 4:return{type:"sceneGroupItem",...K8($,(q)=>q===2?$.readId(2):void 0)};case 5:return{type:"sceneLineItem",...K8($,(q)=>q===3?YK($,J):void 0)};case 6:return{type:"sceneTextItem",...K8($,()=>{return})};case 7:return{type:"rootText",blockId:$.readId(1),text:UK($)};case 8:return{type:"sceneTombstone",...K8($,()=>{return})};case 9:{let q=new Map,X=$.varuint();for(let Y=0;Y<X;Y++)$.subblock(0,()=>{let B=$.varuint(),U=$.bytes(B),W=$.u16();q.set(W,GK(U))});return{type:"authorIds",authors:q}}case 10:return{type:"pageInfo",loadsCount:$.readInt(1),mergesCount:$.readInt(2),textCharsCount:$.readInt(3),textLinesCount:$.readInt(4),typeFolioUseCount:$.hasTag(5,j1)?$.readInt(5):0};case 13:{let q={type:"sceneInfo",currentLayer:$.readLww(1,()=>$.readId(2))};if($.hasTag(2,b1))q.backgroundVisible=$.readLww(2,()=>$.readBool(2));if($.hasTag(3,b1))q.rootDocumentVisible=$.readLww(3,()=>$.readBool(2));if($.hasTag(5,b1))q.paperSize=$.subblock(5,()=>[$.u32(),$.u32()]);return q}default:throw Error(`unknown v6 block type 0x${Q.toString(16)}`)}}function GK($){let Q=[...$],q=[Q[3],Q[2],Q[1],Q[0],Q[5],Q[4],Q[7],Q[6],Q[8],Q[9],Q[10],Q[11],Q[12],Q[13],Q[14],Q[15]].map((X)=>(X??0).toString(16).padStart(2,"0"));return`${q.slice(0,4).join("")}-${q.slice(4,6).join("")}-${q.slice(6,8).join("")}-${q.slice(8,10).join("")}-${q.slice(10,16).join("")}`}function VK($){let Q=new TextDecoder().decode($.subarray(0,Qq));if(!Q.startsWith(qK))throw Error(`not a version 6 .lines file: ${JSON.stringify(Q)}`);let J=new Xq($,Qq),q=[];while(!J.atFileEnd){if(J.bytesRemaining()<8)break;let X=J.u32();J.u8();let Y=J.u8(),B=J.u8(),U=J.u8(),W=J.offset,G=W+X,V;try{let[F,M]=J.bounded(G,()=>WK(J,U,B));V={...F,minVersion:Y,currentVersion:B,extraData:M}}catch{J.seek(W),V={type:"unknown",blockType:U,data:J.bytes(X),minVersion:Y,currentVersion:B,extraData:new Uint8Array}}J.seek(G),q.push(V)}return q}function KK($,Q){let[J,q]=$,[X,Y]=Q;return J-X||q-Y}function qq($){if($.length<=1)return[...$];let Q="\x00start",J="\x00end",q=new Set($.map((j)=>d0(j.itemId))),X=new Map([[Q,[]],[J,[]]]),Y=new Map([[Q,0],[J,0]]);for(let j of $)X.set(d0(j.itemId),[]),Y.set(d0(j.itemId),0);let B=(j,f)=>{let T=d0(j);return T===d0(Y7)||!q.has(T)?f:T},U=(j,f)=>{X.get(j).push(f),Y.set(f,(Y.get(f)??0)+1)};for(let j of $)U(B(j.leftId,Q),d0(j.itemId)),U(d0(j.itemId),B(j.rightId,J));let W=new Map($.map((j)=>[d0(j.itemId),j])),G=(j)=>{if(j===Q)return[-1/0,-1/0];if(j===J)return[1/0,1/0];let f=W.get(j);return[-f.itemId.authorId,f.itemId.counter]},V=new Set;for(let[j,f]of Y)if(f===0)V.add(j);let F=[],M=new Set;while(V.size>0){let j;for(let T of V)if(j===void 0||KK(G(T),G(j))<0)j=T;V.delete(j),M.add(j);let f=W.get(j);if(f)F.push(f);for(let T of X.get(j)??[])if(Y.set(T,Y.get(T)-1),Y.get(T)===0)V.add(T)}if(F.length<$.length){for(let j of $)if(!M.has(d0(j.itemId)))F.push(j)}return F}class Yq{version=6;blocks;authors;paperSize;#Q=new Map;#$;constructor($){this.blocks=$,this.authors=new Map;let Q=(J)=>{let q=this.#Q.get(d0(J));if(q===void 0)q={id:J,parentId:Y7,children:[]},this.#Q.set(d0(J),q);return q};Q(q7);for(let J of $)if(J.type==="sceneTree")Q(J.treeId).parentId=J.parentId;else if(J.type==="treeNode"){let q=Q(J.nodeId);q.label=J.label.value,q.visible=J.visible.value}else if(J.type==="sceneGroupItem"&&J.item.value)Q(J.parentId).children.push({...J.item,value:{kind:"group",id:J.item.value}});else if(J.type==="sceneLineItem"&&J.item.value)Q(J.parentId).children.push({...J.item,value:{kind:"line",line:J.item.value}});else if(J.type==="sceneGlyphItem"&&J.item.value)Q(J.parentId).children.push({...J.item,value:{kind:"glyph",glyph:J.item.value}});else if(J.type==="rootText")this.#$=J.text;else if(J.type==="authorIds")for(let[q,X]of J.authors)this.authors.set(q,X);else if(J.type==="sceneInfo"&&J.paperSize)this.paperSize=J.paperSize}#Y($){let Q=[];for(let q of qq($.children))if(q.value.kind==="group"){let X=this.#Q.get(d0(q.value.id));if(X)Q.push({kind:"layer",layer:this.#Y(X)})}else if(q.value.kind==="line")Q.push({kind:"line",line:q.value.line});else Q.push({kind:"glyph",glyph:q.value.glyph});let J={id:$.id,items:Q};if($.label!==void 0)J.label=$.label;if($.visible!==void 0)J.visible=$.visible;return J}layers(){let $=this.#Q.get(d0(q7));if($===void 0)return[];let Q=[];for(let J of qq($.children))if(J.value.kind==="group"){let q=this.#Q.get(d0(J.value.id));if(q)Q.push(this.#Y(q))}return Q}strokes(){let $=[],Q=(J)=>{for(let q of J.items)if(q.kind==="line")$.push(q.line);else if(q.kind==="layer")Q(q.layer)};for(let J of this.layers())Q(J);return $}text(){return this.#$}}function B7($){return new Yq(VK($))}function Bq($){let Q=$.reduce((X,Y)=>X+Y.length,0),J=new Uint8Array(Q),q=0;for(let X of $)J.set(X,q),q+=X.length;return J}var G5=/^[0-9a-f]{64}$/;function jK($){if($.length<K1)throw Error("data is too short to be a reMarkable .lines file");let Q=new TextDecoder().decode($.subarray(0,K1));if(!Q.startsWith(W5))throw Error(`unrecognized .lines header: ${JSON.stringify(Q)}`);let J=Q.charAt(W5.length);if(J==="6")return B7($);else if(J==="3"||J==="5")return eJ($,J==="3"?3:5);else throw Error(`unsupported .lines version '${J}'`)}var Gq=x.object({name:x.string(),timestamp:x.number()}).passthrough(),HK=x.object({name:x.string(),pageId:x.string(),timestamp:x.number()}).passthrough(),MK=x.object({authors:x.array(x.string()).optional(),title:x.string().optional(),publicationDate:x.string().optional(),publisher:x.string().optional()}).passthrough(),FK=x.object({id:x.string(),idx:x.object({timestamp:x.string(),value:x.string()}).passthrough(),template:x.object({timestamp:x.string(),value:x.string()}).passthrough().optional(),redir:x.object({timestamp:x.string(),value:x.number().int()}).passthrough().optional(),scrollTime:x.object({timestamp:x.string(),value:x.string().datetime({offset:!0})}).passthrough().optional(),verticalScroll:x.object({timestamp:x.string(),value:x.number()}).passthrough().optional(),deleted:x.object({timestamp:x.string(),value:x.number().int()}).passthrough().optional(),modifed:x.string().optional()}).passthrough(),wK=x.object({lastOpened:x.object({timestamp:x.string(),value:x.string()}).passthrough(),original:x.object({timestamp:x.string(),value:x.number().int()}).passthrough(),pages:x.array(FK),uuids:x.array(x.object({first:x.string(),second:x.number().int().nonnegative()}).passthrough()).nullable()}).passthrough(),LK=x.object({tags:x.array(Gq).optional()}).strict(),zK=x.object({tags:x.array(x.string()).optional()}).strict(),OK={coverPageNumber:x.number().int(),documentMetadata:MK,extraMetadata:x.record(x.string(),x.string()),fileType:x.enum(["epub","notebook","pdf"]),fontName:x.string(),lineHeight:x.number().int(),orientation:x.enum(["portrait","landscape"]),pageCount:x.number().int().nonnegative(),textAlignment:x.enum(["","justify","left"]),textScale:x.number()},NK={cPages:wK.optional(),customZoomCenterX:x.number().optional(),customZoomCenterY:x.number().optional(),customZoomOrientation:x.enum(["portrait","landscape"]).optional(),customZoomPageHeight:x.number().optional(),customZoomPageWidth:x.number().optional(),customZoomScale:x.number().optional(),dummyDocument:x.boolean().optional(),formatVersion:x.number().int().nonnegative().optional(),keyboardMetadata:x.object({count:x.number().int().nonnegative(),timestamp:x.number()}).passthrough().optional(),lastOpenedPage:x.number().int().optional(),margins:x.number().int().nonnegative().optional(),originalPageCount:x.number().int().optional(),pages:x.array(x.string()).nullable().optional(),pageTags:x.array(HK).optional(),redirectionPageMap:x.array(x.number().int()).optional(),sizeInBytes:x.string().optional(),transform:x.object({m11:x.number().optional(),m12:x.number().optional(),m13:x.number().optional(),m21:x.number().optional(),m22:x.number().optional(),m23:x.number().optional(),m31:x.number().optional(),m32:x.number().optional(),m33:x.number().optional()}).passthrough().optional(),viewBackgroundFilter:x.enum(["off","fullpage"]).optional(),zoomMode:x.enum(["bestFit","customFit","fitToHeight","fitToWidth"]).optional()},Vq=x.object({...OK,...NK}).passthrough(),DK=Vq.extend({tags:x.array(Gq).optional()}).passthrough(),PK=Vq.extend({tags:x.array(x.string()).optional()}).passthrough(),AK=x.object({id:x.string().optional(),name:x.string(),author:x.string(),iconData:x.string(),categories:x.array(x.string()),labels:x.array(x.string()).optional(),orientation:x.enum(["portrait","landscape"]),templateVersion:x.string(),supportedScreens:x.array(x.enum(["rm2","rmPP"])).optional(),constants:x.array(x.record(x.string(),x.union([x.number(),x.string()]))).optional(),items:x.array(x.unknown()),formatVersion:x.number().int().nonnegative().optional()}).passthrough(),CK=x.union([LK,zK,AK,DK,PK]),Kq=x.object({lastModified:x.string().optional(),parent:x.string(),pinned:x.boolean(),type:x.enum(["DocumentType","CollectionType","TemplateType"]),visibleName:x.string(),lastOpened:x.string().optional(),lastOpenedPage:x.number().int().optional(),createdTime:x.string().optional(),deleted:x.boolean().optional(),metadatamodified:x.boolean().optional(),modified:x.boolean().optional(),synced:x.boolean().optional(),version:x.number().int().nonnegative().optional(),new:x.boolean().optional(),source:x.string().optional()}).passthrough();function jq($){let Q=JSON.parse($);return Kq.parse(Q)}var RK=x.object({hash:x.string(),generation:x.number()}).passthrough(),IK=x.object({hash:x.string(),generation:x.number(),schemaVersion:x.number().int().nonnegative()}).passthrough(),SK=x.object({docID:x.string(),hash:x.string()}).passthrough();async function U7($){let Q=await crypto.subtle.digest("SHA-256",$);return new Uint8Array(Q).toHex()}function Uq($){let[Q,J,q,X,Y]=$.split(":");if(Q===void 0||J===void 0||q===void 0||X===void 0||Y===void 0)throw Error(`line '${$}' was not formatted correctly`);else if(J==="80000000"||J==="0")return{hash:Q,type:J==="0"?0:80000000,id:q,subfiles:parseInt(X,10),size:parseInt(Y,10)};else throw Error(`line '${$}' was not formatted correctly`)}class W7{#Q;#$;#Y;#J;constructor($,Q,J,q){this.#Q=$,this.#J=Q,this.#$=J,this.#Y=q}async getRootHash(){let Q=await(await this.#Q("GET",`${this.#$}/sync/v4/root`)).text(),J=JSON.parse(Q),{hash:q,generation:X,schemaVersion:Y}=IK.parse(J);if(Y!==3&&Y!==4)throw Error(`schema version ${Y} not supported`);else if(!Number.isSafeInteger(X))throw Error(`generation ${X} was not a safe integer; please file a bug report`);else return[q,X,Y]}async#q($,Q){if(!G5.test(Q))throw new z2(Q,G5,"hash was not a valid hash");let q=await(await this.#Q("GET",`${this.#$}/sync/v3/files/${Q}`,{headers:{"rm-filename":$}})).arrayBuffer();return new Uint8Array(q)}async getHash({id:$,hash:Q}){let J=this.#J.get(Q);if(J!=null)return new TextEncoder().encode(J);else{let q=await this.#q($,Q);if(this.#J.get(Q)===void 0)this.#J.set(Q,null);return q}}async getText({id:$,hash:Q}){let J=this.#J.get(Q);if(J!=null)return J;else{let q=await this.#q($,Q),Y=new TextDecoder().decode(q);return this.#J.set(Q,Y),Y}}async getEntries($){let Q=await this.getText($),[J,...q]=Q.slice(0,-1).split(`
3
+ \x00`,C+=v0(l,2),C+=U.magic,C+=v0(D,2),C+=v0(P,2),C+=v0(Z.crc32,4),C+=v0(Z.compressedSize,4),C+=v0(Z.uncompressedSize,4),C+=v0(G.length,2),C+=v0(K.length,2);var O=t8.LOCAL_FILE_HEADER+C+G+K,g=t8.CENTRAL_FILE_HEADER+v0(E,2)+C+v0(M.length,2)+"\x00\x00\x00\x00"+v0(S,4)+v0(q,4)+G+K+M;return{fileRecord:O,dirRecord:g}},YG=function($,Q,J,q,X){var Y="",B=X6.transformTo("string",X(q));return Y=t8.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+v0($,2)+v0($,2)+v0(Q,4)+v0(J,4)+v0(B.length,2)+B,Y},BG=function($){var Q="";return Q=t8.DATA_DESCRIPTOR+v0($.crc32,4)+v0($.compressedSize,4)+v0($.uncompressedSize,4),Q};function K2($,Q,J,q){Y6.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=Q,this.zipPlatform=J,this.encodeFileName=q,this.streamFiles=$,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}X6.inherits(K2,Y6);K2.prototype.push=function($){var Q=$.meta.percent||0,J=this.entriesCount,q=this._sources.length;if(this.accumulate)this.contentBuffer.push($);else this.bytesWritten+=$.data.length,Y6.prototype.push.call(this,{data:$.data,meta:{currentFile:this.currentFile,percent:J?(Q+100*(J-q-1))/J:100}})};K2.prototype.openedSource=function($){this.currentSourceOffset=this.bytesWritten,this.currentFile=$.file.name;var Q=this.streamFiles&&!$.file.dir;if(Q){var J=sQ($,Q,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:J.fileRecord,meta:{percent:0}})}else this.accumulate=!0};K2.prototype.closedSource=function($){this.accumulate=!1;var Q=this.streamFiles&&!$.file.dir,J=sQ($,Q,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(J.dirRecord),Q)this.push({data:BG($),meta:{percent:100}});else{this.push({data:J.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};K2.prototype.flush=function(){var $=this.bytesWritten;for(var Q=0;Q<this.dirRecords.length;Q++)this.push({data:this.dirRecords[Q],meta:{percent:100}});var J=this.bytesWritten-$,q=YG(this.dirRecords.length,J,$,this.zipComment,this.encodeFileName);this.push({data:q,meta:{percent:100}})};K2.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};K2.prototype.registerPrevious=function($){this._sources.push($);var Q=this;return $.on("data",function(J){Q.processChunk(J)}),$.on("end",function(){if(Q.closedSource(Q.previous.streamInfo),Q._sources.length)Q.prepareNextSource();else Q.end()}),$.on("error",function(J){Q.error(J)}),this};K2.prototype.resume=function(){if(!Y6.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};K2.prototype.error=function($){var Q=this._sources;if(!Y6.prototype.error.call(this,$))return!1;for(var J=0;J<Q.length;J++)try{Q[J].error($)}catch(q){}return!0};K2.prototype.lock=function(){Y6.prototype.lock.call(this);var $=this._sources;for(var Q=0;Q<$.length;Q++)$[Q].lock()};tQ.exports=K2});var $J=H0((VG)=>{var UG=m4(),WG=eQ(),GG=function($,Q){var J=$||Q,q=UG[J];if(!q)throw Error(J+" is not a valid compression method !");return q};VG.generateWorker=function($,Q,J){var q=new WG(Q.streamFiles,J,Q.platform,Q.encodeFileName),X=0;try{$.forEach(function(Y,B){X++;var U=GG(B.options.compression,Q.compression),W=B.options.compressionOptions||Q.compressionOptions||{},G=B.dir,V=B.date;B._compressWorker(U,W).withStreamInfo("file",{name:Y,dir:G,date:V,comment:B.comment||"",unixPermissions:B.unixPermissions,dosPermissions:B.dosPermissions}).pipe(q)}),q.entriesCount=X}catch(Y){q.error(Y)}return q}});var JJ=H0((Ij,QJ)=>{var jG=g0(),e8=e0();function Q8($,Q){e8.call(this,"Nodejs stream input adapter for "+$),this._upstreamEnded=!1,this._bindStream(Q)}jG.inherits(Q8,e8);Q8.prototype._bindStream=function($){var Q=this;this._stream=$,$.pause(),$.on("data",function(J){Q.push({data:J,meta:{percent:0}})}).on("error",function(J){if(Q.isPaused)this.generatedError=J;else Q.error(J)}).on("end",function(){if(Q.isPaused)Q._upstreamEnded=!0;else Q.end()})};Q8.prototype.pause=function(){if(!e8.prototype.pause.call(this))return!1;return this._stream.pause(),!0};Q8.prototype.resume=function(){if(!e8.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};QJ.exports=Q8});var jJ=H0((Sj,KJ)=>{var HG=o1(),J8=g0(),BJ=e0(),MG=i5(),UJ=n5(),qJ=x8(),FG=X9(),wG=$J(),XJ=g6(),LG=JJ(),WJ=function($,Q,J){var q=J8.getTypeOf(Q),X,Y=J8.extend(J||{},UJ);if(Y.date=Y.date||new Date,Y.compression!==null)Y.compression=Y.compression.toUpperCase();if(typeof Y.unixPermissions==="string")Y.unixPermissions=parseInt(Y.unixPermissions,8);if(Y.unixPermissions&&Y.unixPermissions&16384)Y.dir=!0;if(Y.dosPermissions&&Y.dosPermissions&16)Y.dir=!0;if(Y.dir)$=GJ($);if(Y.createFolders&&(X=zG($)))VJ.call(this,X,!0);var B=q==="string"&&Y.binary===!1&&Y.base64===!1;if(!J||typeof J.binary>"u")Y.binary=!B;var U=Q instanceof qJ&&Q.uncompressedSize===0;if(U||Y.dir||!Q||Q.length===0)Y.base64=!1,Y.binary=!0,Q="",Y.compression="STORE",q="string";var W=null;if(Q instanceof qJ||Q instanceof BJ)W=Q;else if(XJ.isNode&&XJ.isStream(Q))W=new LG($,Q);else W=J8.prepareContent($,Q,Y.binary,Y.optimizedBinaryString,Y.base64);var G=new FG($,W,Y);this.files[$]=G},zG=function($){if($.slice(-1)==="/")$=$.substring(0,$.length-1);var Q=$.lastIndexOf("/");return Q>0?$.substring(0,Q):""},GJ=function($){if($.slice(-1)!=="/")$+="/";return $},VJ=function($,Q){if(Q=typeof Q<"u"?Q:UJ.createFolders,$=GJ($),!this.files[$])WJ.call(this,$,null,{dir:!0,createFolders:Q});return this.files[$]};function YJ($){return Object.prototype.toString.call($)==="[object RegExp]"}var OG={load:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function($){var Q,J,q;for(Q in this.files)if(q=this.files[Q],J=Q.slice(this.root.length,Q.length),J&&Q.slice(0,this.root.length)===this.root)$(J,q)},filter:function($){var Q=[];return this.forEach(function(J,q){if($(J,q))Q.push(q)}),Q},file:function($,Q,J){if(arguments.length===1)if(YJ($)){var q=$;return this.filter(function(Y,B){return!B.dir&&q.test(Y)})}else{var X=this.files[this.root+$];if(X&&!X.dir)return X;else return null}else $=this.root+$,WJ.call(this,$,Q,J);return this},folder:function($){if(!$)return this;if(YJ($))return this.filter(function(X,Y){return Y.dir&&$.test(X)});var Q=this.root+$,J=VJ.call(this,Q),q=this.clone();return q.root=J.name,q},remove:function($){$=this.root+$;var Q=this.files[$];if(!Q){if($.slice(-1)!=="/")$+="/";Q=this.files[$]}if(Q&&!Q.dir)delete this.files[$];else{var J=this.filter(function(X,Y){return Y.name.slice(0,$.length)===$});for(var q=0;q<J.length;q++)delete this.files[J[q].name]}return this},generate:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function($){var Q,J={};try{if(J=J8.extend($||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:HG.utf8encode}),J.type=J.type.toLowerCase(),J.compression=J.compression.toUpperCase(),J.type==="binarystring")J.type="string";if(!J.type)throw Error("No output type specified.");if(J8.checkSupport(J.type),J.platform==="darwin"||J.platform==="freebsd"||J.platform==="linux"||J.platform==="sunos")J.platform="UNIX";if(J.platform==="win32")J.platform="DOS";var q=J.comment||this.comment||"";Q=wG.generateWorker(this,J,q)}catch(X){Q=new BJ("error"),Q.error(X)}return new MG(Q,J.type||"string",J.mimeType)},generateAsync:function($,Q){return this.generateInternalStream($).accumulate(Q)},generateNodeStream:function($,Q){if($=$||{},!$.type)$.type="nodebuffer";return this.generateInternalStream($).toNodejsStream(Q)}};KJ.exports=OG});var p4=H0((Ej,MJ)=>{var NG=g0();function HJ($){this.data=$,this.length=$.length,this.index=0,this.zero=0}HJ.prototype={checkOffset:function($){this.checkIndex(this.index+$)},checkIndex:function($){if(this.length<this.zero+$||$<0)throw Error("End of data reached (data length = "+this.length+", asked index = "+$+"). Corrupted zip ?")},setIndex:function($){this.checkIndex($),this.index=$},skip:function($){this.setIndex(this.index+$)},byteAt:function(){},readInt:function($){var Q=0,J;this.checkOffset($);for(J=this.index+$-1;J>=this.index;J--)Q=(Q<<8)+this.byteAt(J);return this.index+=$,Q},readString:function($){return NG.transformTo("string",this.readData($))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var $=this.readInt(4);return new Date(Date.UTC(($>>25&127)+1980,($>>21&15)-1,$>>16&31,$>>11&31,$>>5&63,($&31)<<1))}};MJ.exports=HJ});var l4=H0((vj,wJ)=>{var FJ=p4(),DG=g0();function B6($){FJ.call(this,$);for(var Q=0;Q<this.data.length;Q++)$[Q]=$[Q]&255}DG.inherits(B6,FJ);B6.prototype.byteAt=function($){return this.data[this.zero+$]};B6.prototype.lastIndexOfSignature=function($){var Q=$.charCodeAt(0),J=$.charCodeAt(1),q=$.charCodeAt(2),X=$.charCodeAt(3);for(var Y=this.length-4;Y>=0;--Y)if(this.data[Y]===Q&&this.data[Y+1]===J&&this.data[Y+2]===q&&this.data[Y+3]===X)return Y-this.zero;return-1};B6.prototype.readAndCheckSignature=function($){var Q=$.charCodeAt(0),J=$.charCodeAt(1),q=$.charCodeAt(2),X=$.charCodeAt(3),Y=this.readData(4);return Q===Y[0]&&J===Y[1]&&q===Y[2]&&X===Y[3]};B6.prototype.readData=function($){if(this.checkOffset($),$===0)return[];var Q=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Q};wJ.exports=B6});var OJ=H0((kj,zJ)=>{var LJ=p4(),PG=g0();function U6($){LJ.call(this,$)}PG.inherits(U6,LJ);U6.prototype.byteAt=function($){return this.data.charCodeAt(this.zero+$)};U6.prototype.lastIndexOfSignature=function($){return this.data.lastIndexOf($)-this.zero};U6.prototype.readAndCheckSignature=function($){var Q=this.readData(4);return $===Q};U6.prototype.readData=function($){this.checkOffset($);var Q=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Q};zJ.exports=U6});var i4=H0((Zj,DJ)=>{var NJ=l4(),AG=g0();function d4($){NJ.call(this,$)}AG.inherits(d4,NJ);d4.prototype.readData=function($){if(this.checkOffset($),$===0)return new Uint8Array(0);var Q=this.data.subarray(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Q};DJ.exports=d4});var CJ=H0((Tj,AJ)=>{var PJ=i4(),CG=g0();function n4($){PJ.call(this,$)}CG.inherits(n4,PJ);n4.prototype.readData=function($){this.checkOffset($);var Q=this.data.slice(this.zero+this.index,this.zero+this.index+$);return this.index+=$,Q};AJ.exports=n4});var o4=H0((gj,IJ)=>{var $5=g0(),RJ=h2(),RG=l4(),IG=OJ(),SG=CJ(),EG=i4();IJ.exports=function($){var Q=$5.getTypeOf($);if($5.checkSupport(Q),Q==="string"&&!RJ.uint8array)return new IG($);if(Q==="nodebuffer")return new SG($);if(RJ.uint8array)return new EG($5.transformTo("uint8array",$));return new RG($5.transformTo("array",$))}});var kJ=H0((xj,vJ)=>{var r4=o4(),Y1=g0(),vG=x8(),SJ=g8(),Q5=o1(),J5=m4(),kG=h2(),ZG=0,TG=3,gG=function($){for(var Q in J5){if(!Object.prototype.hasOwnProperty.call(J5,Q))continue;if(J5[Q].magic===$)return J5[Q]}return null};function EJ($,Q){this.options=$,this.loadOptions=Q}EJ.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function($){var Q,J;if($.skip(22),this.fileNameLength=$.readInt(2),J=$.readInt(2),this.fileName=$.readData(this.fileNameLength),$.skip(J),this.compressedSize===-1||this.uncompressedSize===-1)throw Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(Q=gG(this.compressionMethod),Q===null)throw Error("Corrupted zip : compression "+Y1.pretty(this.compressionMethod)+" unknown (inner file : "+Y1.transformTo("string",this.fileName)+")");this.decompressed=new vG(this.compressedSize,this.uncompressedSize,this.crc32,Q,$.readData(this.compressedSize))},readCentralPart:function($){this.versionMadeBy=$.readInt(2),$.skip(2),this.bitFlag=$.readInt(2),this.compressionMethod=$.readString(2),this.date=$.readDate(),this.crc32=$.readInt(4),this.compressedSize=$.readInt(4),this.uncompressedSize=$.readInt(4);var Q=$.readInt(2);if(this.extraFieldsLength=$.readInt(2),this.fileCommentLength=$.readInt(2),this.diskNumberStart=$.readInt(2),this.internalFileAttributes=$.readInt(2),this.externalFileAttributes=$.readInt(4),this.localHeaderOffset=$.readInt(4),this.isEncrypted())throw Error("Encrypted zip are not supported");$.skip(Q),this.readExtraFields($),this.parseZIP64ExtraField($),this.fileComment=$.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var $=this.versionMadeBy>>8;if(this.dir=this.externalFileAttributes&16?!0:!1,$===ZG)this.dosPermissions=this.externalFileAttributes&63;if($===TG)this.unixPermissions=this.externalFileAttributes>>16&65535;if(!this.dir&&this.fileNameStr.slice(-1)==="/")this.dir=!0},parseZIP64ExtraField:function(){if(!this.extraFields[1])return;var $=r4(this.extraFields[1].value);if(this.uncompressedSize===Y1.MAX_VALUE_32BITS)this.uncompressedSize=$.readInt(8);if(this.compressedSize===Y1.MAX_VALUE_32BITS)this.compressedSize=$.readInt(8);if(this.localHeaderOffset===Y1.MAX_VALUE_32BITS)this.localHeaderOffset=$.readInt(8);if(this.diskNumberStart===Y1.MAX_VALUE_32BITS)this.diskNumberStart=$.readInt(4)},readExtraFields:function($){var Q=$.index+this.extraFieldsLength,J,q,X;if(!this.extraFields)this.extraFields={};while($.index+4<Q)J=$.readInt(2),q=$.readInt(2),X=$.readData(q),this.extraFields[J]={id:J,length:q,value:X};$.setIndex(Q)},handleUTF8:function(){var $=kG.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=Q5.utf8decode(this.fileName),this.fileCommentStr=Q5.utf8decode(this.fileComment);else{var Q=this.findExtraFieldUnicodePath();if(Q!==null)this.fileNameStr=Q;else{var J=Y1.transformTo($,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(J)}var q=this.findExtraFieldUnicodeComment();if(q!==null)this.fileCommentStr=q;else{var X=Y1.transformTo($,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(X)}}},findExtraFieldUnicodePath:function(){var $=this.extraFields[28789];if($){var Q=r4($.value);if(Q.readInt(1)!==1)return null;if(SJ(this.fileName)!==Q.readInt(4))return null;return Q5.utf8decode(Q.readData($.length-5))}return null},findExtraFieldUnicodeComment:function(){var $=this.extraFields[25461];if($){var Q=r4($.value);if(Q.readInt(1)!==1)return null;if(SJ(this.fileComment)!==Q.readInt(4))return null;return Q5.utf8decode(Q.readData($.length-5))}return null}};vJ.exports=EJ});var gJ=H0((fj,TJ)=>{var xG=o4(),p2=g0(),j2=u4(),fG=kJ(),yG=h2();function ZJ($){this.files=[],this.loadOptions=$}ZJ.prototype={checkSignature:function($){if(!this.reader.readAndCheckSignature($)){this.reader.index-=4;var Q=this.reader.readString(4);throw Error("Corrupted zip or bug: unexpected signature ("+p2.pretty(Q)+", expected "+p2.pretty($)+")")}},isSignature:function($,Q){var J=this.reader.index;this.reader.setIndex($);var q=this.reader.readString(4),X=q===Q;return this.reader.setIndex(J),X},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 $=this.reader.readData(this.zipCommentLength),Q=yG.uint8array?"uint8array":"array",J=p2.transformTo(Q,$);this.zipComment=this.loadOptions.decodeFileName(J)},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={};var $=this.zip64EndOfCentralSize-44,Q=0,J,q,X;while(Q<$)J=this.reader.readInt(2),q=this.reader.readInt(4),X=this.reader.readData(q),this.zip64ExtensibleData[J]={id:J,length:q,value:X}},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 Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var $,Q;for($=0;$<this.files.length;$++)Q=this.files[$],this.reader.setIndex(Q.localHeaderOffset),this.checkSignature(j2.LOCAL_FILE_HEADER),Q.readLocalPart(this.reader),Q.handleUTF8(),Q.processAttributes()},readCentralDir:function(){var $;this.reader.setIndex(this.centralDirOffset);while(this.reader.readAndCheckSignature(j2.CENTRAL_FILE_HEADER))$=new fG({zip64:this.zip64},this.loadOptions),$.readCentralPart(this.reader),this.files.push($);if(this.centralDirRecords!==this.files.length){if(this.centralDirRecords!==0&&this.files.length===0)throw Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)}},readEndOfCentral:function(){var $=this.reader.lastIndexOfSignature(j2.CENTRAL_DIRECTORY_END);if($<0){var Q=!this.isSignature(0,j2.LOCAL_FILE_HEADER);if(Q)throw 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");else throw Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex($);var J=$;if(this.checkSignature(j2.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===p2.MAX_VALUE_16BITS||this.diskWithCentralDirStart===p2.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===p2.MAX_VALUE_16BITS||this.centralDirRecords===p2.MAX_VALUE_16BITS||this.centralDirSize===p2.MAX_VALUE_32BITS||this.centralDirOffset===p2.MAX_VALUE_32BITS){if(this.zip64=!0,$=this.reader.lastIndexOfSignature(j2.ZIP64_CENTRAL_DIRECTORY_LOCATOR),$<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex($),this.checkSignature(j2.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,j2.ZIP64_CENTRAL_DIRECTORY_END)){if(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(j2.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory")}this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(j2.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var q=this.centralDirOffset+this.centralDirSize;if(this.zip64)q+=20,q+=12+this.zip64EndOfCentralSize;var X=J-q;if(X>0)if(this.isSignature(J,j2.CENTRAL_FILE_HEADER));else this.reader.zero=X;else if(X<0)throw Error("Corrupted zip: missing "+Math.abs(X)+" bytes.")},prepareReader:function($){this.reader=xG($)},load:function($){this.prepareReader($),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};TJ.exports=ZJ});var yJ=H0((yj,fJ)=>{var a4=g0(),q5=d1(),_G=o1(),bG=gJ(),hG=a5(),xJ=g6();function mG($){return new q5.Promise(function(Q,J){var q=$.decompressed.getContentWorker().pipe(new hG);q.on("error",function(X){J(X)}).on("end",function(){if(q.streamInfo.crc32!==$.decompressed.crc32)J(Error("Corrupted zip : CRC32 mismatch"));else Q()}).resume()})}fJ.exports=function($,Q){var J=this;if(Q=a4.extend(Q||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:_G.utf8decode}),xJ.isNode&&xJ.isStream($))return q5.Promise.reject(Error("JSZip can't accept a stream when loading a zip file."));return a4.prepareContent("the loaded zip file",$,!0,Q.optimizedBinaryString,Q.base64).then(function(q){var X=new bG(Q);return X.load(q),X}).then(function(X){var Y=[q5.Promise.resolve(X)],B=X.files;if(Q.checkCRC32)for(var U=0;U<B.length;U++)Y.push(mG(B[U]));return q5.Promise.all(Y)}).then(function(X){var Y=X.shift(),B=Y.files;for(var U=0;U<B.length;U++){var W=B[U],G=W.fileNameStr,V=a4.resolve(W.fileNameStr);if(J.file(V,W.decompressed,{binary:!0,optimizedBinaryString:!0,date:W.date,dir:W.dir,comment:W.fileCommentStr.length?W.fileCommentStr:null,unixPermissions:W.unixPermissions,dosPermissions:W.dosPermissions,createFolders:Q.createFolders}),!W.dir)J.file(V).unsafeOriginalName=G}if(Y.zipComment.length)J.comment=Y.zipComment;return J})}});var bJ=H0((_j,_J)=>{function G2(){if(!(this instanceof G2))return new G2;if(arguments.length)throw 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 $=new G2;for(var Q in this)if(typeof this[Q]!=="function")$[Q]=this[Q];return $}}G2.prototype=jJ();G2.prototype.loadAsync=yJ();G2.support=h2();G2.defaults=n5();G2.version="3.10.1";G2.loadAsync=function($,Q){return new G2().loadAsync($,Q)};G2.external=d1();_J.exports=G2});var tJ=H0((J7)=>{/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */var sJ;(function($){if(typeof DO_NOT_EXPORT_CRC>"u")if(typeof J7==="object")$(J7);else if(typeof define==="function"&&define.amd)define(function(){var Q={};return $(Q),Q});else $(sJ={});else $(sJ={})})(function($){$.version="1.2.2";function Q(){var Z=0,l=Array(256);for(var S=0;S!=256;++S)Z=S,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,Z=Z&1?-2097792136^Z>>>1:Z>>>1,l[S]=Z;return typeof Int32Array<"u"?new Int32Array(l):l}var J=Q();function q(Z){var l=0,S=0,E=0,C=typeof Int32Array<"u"?new Int32Array(4096):Array(4096);for(E=0;E!=256;++E)C[E]=Z[E];for(E=0;E!=256;++E){S=Z[E];for(l=256+E;l<4096;l+=256)S=C[l]=S>>>8^Z[S&255]}var O=[];for(E=1;E!=16;++E)O[E-1]=typeof Int32Array<"u"?C.subarray(E*256,E*256+256):C.slice(E*256,E*256+256);return O}var X=q(J),Y=X[0],B=X[1],U=X[2],W=X[3],G=X[4],V=X[5],F=X[6],M=X[7],j=X[8],f=X[9],T=X[10],D=X[11],P=X[12],K=X[13],L=X[14];function z(Z,l){var S=l^-1;for(var E=0,C=Z.length;E<C;)S=S>>>8^J[(S^Z.charCodeAt(E++))&255];return~S}function A(Z,l){var S=l^-1,E=Z.length-15,C=0;for(;C<E;)S=L[Z[C++]^S&255]^K[Z[C++]^S>>8&255]^P[Z[C++]^S>>16&255]^D[Z[C++]^S>>>24]^T[Z[C++]]^f[Z[C++]]^j[Z[C++]]^M[Z[C++]]^F[Z[C++]]^V[Z[C++]]^G[Z[C++]]^W[Z[C++]]^U[Z[C++]]^B[Z[C++]]^Y[Z[C++]]^J[Z[C++]];E+=15;while(C<E)S=S>>>8^J[(S^Z[C++])&255];return~S}function _(Z,l){var S=l^-1;for(var E=0,C=Z.length,O=0,g=0;E<C;)if(O=Z.charCodeAt(E++),O<128)S=S>>>8^J[(S^O)&255];else if(O<2048)S=S>>>8^J[(S^(192|O>>6&31))&255],S=S>>>8^J[(S^(128|O&63))&255];else if(O>=55296&&O<57344)O=(O&1023)+64,g=Z.charCodeAt(E++)&1023,S=S>>>8^J[(S^(240|O>>8&7))&255],S=S>>>8^J[(S^(128|O>>2&63))&255],S=S>>>8^J[(S^(128|g>>6&15|(O&3)<<4))&255],S=S>>>8^J[(S^(128|g&63))&255];else S=S>>>8^J[(S^(224|O>>12&15))&255],S=S>>>8^J[(S^(128|O>>6&63))&255],S=S>>>8^J[(S^(128|O&63))&255];return~S}$.table=J,$.bstr=z,$.buf=A,$.str=_})});var K7=R7(bJ(),1);var uG=new Uint8Array(16);function s4(){return crypto.getRandomValues(uG)}var h0=[];for(let $=0;$<256;++$)h0.push(($+256).toString(16).slice(1));function hJ($,Q=0){return(h0[$[Q+0]]+h0[$[Q+1]]+h0[$[Q+2]]+h0[$[Q+3]]+"-"+h0[$[Q+4]]+h0[$[Q+5]]+"-"+h0[$[Q+6]]+h0[$[Q+7]]+"-"+h0[$[Q+8]]+h0[$[Q+9]]+"-"+h0[$[Q+10]]+h0[$[Q+11]]+h0[$[Q+12]]+h0[$[Q+13]]+h0[$[Q+14]]+h0[$[Q+15]]).toLowerCase()}function cG($,Q,J){if(!Q&&!$&&crypto.randomUUID)return crypto.randomUUID();return pG($,Q,J)}function pG($,Q,J){$=$||{};let q=$.random??$.rng?.()??s4();if(q.length<16)throw Error("Random bytes length must be >= 16");if(q[6]=q[6]&15|64,q[8]=q[8]&63|128,Q){if(J=J||0,J<0||J+16>Q.length)throw RangeError(`UUID byte range ${J}:${J+15} is out of buffer bounds`);for(let X=0;X<16;++X)Q[J+X]=q[X];return Q}return hJ(q)}var T1=cG;var x={};w5(x,{void:()=>SV,util:()=>A0,unknown:()=>RV,union:()=>ZV,undefined:()=>PV,tuple:()=>xV,transformer:()=>lV,symbol:()=>DV,string:()=>oJ,strictObject:()=>kV,setErrorMap:()=>iG,set:()=>_V,record:()=>fV,quotelessJson:()=>lG,promise:()=>pV,preprocess:()=>nV,pipeline:()=>oV,ostring:()=>rV,optional:()=>dV,onumber:()=>aV,oboolean:()=>sV,objectUtil:()=>t4,object:()=>vV,number:()=>rJ,nullable:()=>iV,null:()=>AV,never:()=>IV,nativeEnum:()=>cV,nan:()=>zV,map:()=>yV,makeIssue:()=>q8,literal:()=>mV,lazy:()=>hV,late:()=>wV,isValid:()=>B1,isDirty:()=>Y5,isAsync:()=>G6,isAborted:()=>X5,intersection:()=>gV,instanceof:()=>LV,getParsedType:()=>v2,getErrorMap:()=>W6,function:()=>bV,enum:()=>uV,effect:()=>lV,discriminatedUnion:()=>TV,defaultErrorMap:()=>l2,datetimeRegex:()=>dJ,date:()=>NV,custom:()=>nJ,coerce:()=>tV,boolean:()=>aJ,bigint:()=>OV,array:()=>EV,any:()=>CV,addIssueToContext:()=>X0,ZodVoid:()=>Y8,ZodUnknown:()=>U1,ZodUnion:()=>F6,ZodUndefined:()=>H6,ZodType:()=>P0,ZodTuple:()=>Z2,ZodTransformer:()=>L2,ZodSymbol:()=>X8,ZodString:()=>H2,ZodSet:()=>y1,ZodSchema:()=>P0,ZodRecord:()=>B8,ZodReadonly:()=>P6,ZodPromise:()=>_1,ZodPipeline:()=>G8,ZodParsedType:()=>$0,ZodOptional:()=>F2,ZodObject:()=>x0,ZodNumber:()=>W1,ZodNullable:()=>i2,ZodNull:()=>M6,ZodNever:()=>k2,ZodNativeEnum:()=>O6,ZodNaN:()=>W8,ZodMap:()=>U8,ZodLiteral:()=>z6,ZodLazy:()=>L6,ZodIssueCode:()=>o,ZodIntersection:()=>w6,ZodFunction:()=>K6,ZodFirstPartyTypeKind:()=>w0,ZodError:()=>t0,ZodEnum:()=>V1,ZodEffects:()=>L2,ZodDiscriminatedUnion:()=>B5,ZodDefault:()=>N6,ZodDate:()=>x1,ZodCatch:()=>D6,ZodBranded:()=>U5,ZodBoolean:()=>j6,ZodBigInt:()=>G1,ZodArray:()=>M2,ZodAny:()=>f1,Schema:()=>P0,ParseStatus:()=>m0,OK:()=>l0,NEVER:()=>eV,INVALID:()=>F0,EMPTY_PATH:()=>nG,DIRTY:()=>g1,BRAND:()=>FV});var A0;(function($){$.assertEqual=(X)=>{};function Q(X){}$.assertIs=Q;function J(X){throw Error()}$.assertNever=J,$.arrayToEnum=(X)=>{let Y={};for(let B of X)Y[B]=B;return Y},$.getValidEnumValues=(X)=>{let Y=$.objectKeys(X).filter((U)=>typeof X[X[U]]!=="number"),B={};for(let U of Y)B[U]=X[U];return $.objectValues(B)},$.objectValues=(X)=>{return $.objectKeys(X).map(function(Y){return X[Y]})},$.objectKeys=typeof Object.keys==="function"?(X)=>Object.keys(X):(X)=>{let Y=[];for(let B in X)if(Object.prototype.hasOwnProperty.call(X,B))Y.push(B);return Y},$.find=(X,Y)=>{for(let B of X)if(Y(B))return B;return},$.isInteger=typeof Number.isInteger==="function"?(X)=>Number.isInteger(X):(X)=>typeof X==="number"&&Number.isFinite(X)&&Math.floor(X)===X;function q(X,Y=" | "){return X.map((B)=>typeof B==="string"?`'${B}'`:B).join(Y)}$.joinValues=q,$.jsonStringifyReplacer=(X,Y)=>{if(typeof Y==="bigint")return Y.toString();return Y}})(A0||(A0={}));var t4;(function($){$.mergeShapes=(Q,J)=>{return{...Q,...J}}})(t4||(t4={}));var $0=A0.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),v2=($)=>{switch(typeof $){case"undefined":return $0.undefined;case"string":return $0.string;case"number":return Number.isNaN($)?$0.nan:$0.number;case"boolean":return $0.boolean;case"function":return $0.function;case"bigint":return $0.bigint;case"symbol":return $0.symbol;case"object":if(Array.isArray($))return $0.array;if($===null)return $0.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return $0.promise;if(typeof Map<"u"&&$ instanceof Map)return $0.map;if(typeof Set<"u"&&$ instanceof Set)return $0.set;if(typeof Date<"u"&&$ instanceof Date)return $0.date;return $0.object;default:return $0.unknown}};var o=A0.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),lG=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")};class t0 extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(J)=>{this.issues=[...this.issues,J]},this.addIssues=(J=[])=>{this.issues=[...this.issues,...J]};let Q=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,Q);else this.__proto__=Q;this.name="ZodError",this.issues=$}format($){let Q=$||function(X){return X.message},J={_errors:[]},q=(X)=>{for(let Y of X.issues)if(Y.code==="invalid_union")Y.unionErrors.map(q);else if(Y.code==="invalid_return_type")q(Y.returnTypeError);else if(Y.code==="invalid_arguments")q(Y.argumentsError);else if(Y.path.length===0)J._errors.push(Q(Y));else{let B=J,U=0;while(U<Y.path.length){let W=Y.path[U];if(U!==Y.path.length-1)B[W]=B[W]||{_errors:[]};else B[W]=B[W]||{_errors:[]},B[W]._errors.push(Q(Y));B=B[W],U++}}};return q(this),J}static assert($){if(!($ instanceof t0))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,A0.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(Q)=>Q.message){let Q={},J=[];for(let q of this.issues)if(q.path.length>0){let X=q.path[0];Q[X]=Q[X]||[],Q[X].push($(q))}else J.push($(q));return{formErrors:J,fieldErrors:Q}}get formErrors(){return this.flatten()}}t0.create=($)=>{return new t0($)};var dG=($,Q)=>{let J;switch($.code){case o.invalid_type:if($.received===$0.undefined)J="Required";else J=`Expected ${$.expected}, received ${$.received}`;break;case o.invalid_literal:J=`Invalid literal value, expected ${JSON.stringify($.expected,A0.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:J=`Unrecognized key(s) in object: ${A0.joinValues($.keys,", ")}`;break;case o.invalid_union:J="Invalid input";break;case o.invalid_union_discriminator:J=`Invalid discriminator value. Expected ${A0.joinValues($.options)}`;break;case o.invalid_enum_value:J=`Invalid enum value. Expected ${A0.joinValues($.options)}, received '${$.received}'`;break;case o.invalid_arguments:J="Invalid function arguments";break;case o.invalid_return_type:J="Invalid function return type";break;case o.invalid_date:J="Invalid date";break;case o.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(J=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")J=`${J} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)J=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)J=`Invalid input: must end with "${$.validation.endsWith}"`;else A0.assertNever($.validation);else if($.validation!=="regex")J=`Invalid ${$.validation}`;else J="Invalid";break;case o.too_small:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else J="Invalid input";break;case o.too_big:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")J=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else J="Invalid input";break;case o.custom:J="Invalid input";break;case o.invalid_intersection_types:J="Intersection results could not be merged";break;case o.not_multiple_of:J=`Number must be a multiple of ${$.multipleOf}`;break;case o.not_finite:J="Number must be finite";break;default:J=Q.defaultError,A0.assertNever($)}return{message:J}},l2=dG;var mJ=l2;function iG($){mJ=$}function W6(){return mJ}var q8=($)=>{let{data:Q,path:J,errorMaps:q,issueData:X}=$,Y=[...J,...X.path||[]],B={...X,path:Y};if(X.message!==void 0)return{...X,path:Y,message:X.message};let U="",W=q.filter((G)=>!!G).slice().reverse();for(let G of W)U=G(B,{data:Q,defaultError:U}).message;return{...X,path:Y,message:U}},nG=[];function X0($,Q){let J=W6(),q=q8({issueData:Q,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,J,J===l2?void 0:l2].filter((X)=>!!X)});$.common.issues.push(q)}class m0{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,Q){let J=[];for(let q of Q){if(q.status==="aborted")return F0;if(q.status==="dirty")$.dirty();J.push(q.value)}return{status:$.value,value:J}}static async mergeObjectAsync($,Q){let J=[];for(let q of Q){let X=await q.key,Y=await q.value;J.push({key:X,value:Y})}return m0.mergeObjectSync($,J)}static mergeObjectSync($,Q){let J={};for(let q of Q){let{key:X,value:Y}=q;if(X.status==="aborted")return F0;if(Y.status==="aborted")return F0;if(X.status==="dirty")$.dirty();if(Y.status==="dirty")$.dirty();if(X.value!=="__proto__"&&(typeof Y.value<"u"||q.alwaysSet))J[X.value]=Y.value}return{status:$.value,value:J}}}var F0=Object.freeze({status:"aborted"}),g1=($)=>({status:"dirty",value:$}),l0=($)=>({status:"valid",value:$}),X5=($)=>$.status==="aborted",Y5=($)=>$.status==="dirty",B1=($)=>$.status==="valid",G6=($)=>typeof Promise<"u"&&$ instanceof Promise;var V0;(function($){$.errToObj=(Q)=>typeof Q==="string"?{message:Q}:Q||{},$.toString=(Q)=>typeof Q==="string"?Q:Q?.message})(V0||(V0={}));class w2{constructor($,Q,J,q){this._cachedPath=[],this.parent=$,this.data=Q,this._path=J,this._key=q}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var uJ=($,Q)=>{if(B1(Q))return{success:!0,data:Q.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let J=new t0($.common.issues);return this._error=J,this._error}}}};function D0($){if(!$)return{};let{errorMap:Q,invalid_type_error:J,required_error:q,description:X}=$;if(Q&&(J||q))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(Q)return{errorMap:Q,description:X};return{errorMap:(B,U)=>{let{message:W}=$;if(B.code==="invalid_enum_value")return{message:W??U.defaultError};if(typeof U.data>"u")return{message:W??q??U.defaultError};if(B.code!=="invalid_type")return{message:U.defaultError};return{message:W??J??U.defaultError}},description:X}}class P0{get description(){return this._def.description}_getType($){return v2($.data)}_getOrReturnCtx($,Q){return Q||{common:$.parent.common,data:$.data,parsedType:v2($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new m0,ctx:{common:$.parent.common,data:$.data,parsedType:v2($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let Q=this._parse($);if(G6(Q))throw Error("Synchronous parse encountered promise.");return Q}_parseAsync($){let Q=this._parse($);return Promise.resolve(Q)}parse($,Q){let J=this.safeParse($,Q);if(J.success)return J.data;throw J.error}safeParse($,Q){let J={common:{issues:[],async:Q?.async??!1,contextualErrorMap:Q?.errorMap},path:Q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:v2($)},q=this._parseSync({data:$,path:J.path,parent:J});return uJ(J,q)}"~validate"($){let Q={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:v2($)};if(!this["~standard"].async)try{let J=this._parseSync({data:$,path:[],parent:Q});return B1(J)?{value:J.value}:{issues:Q.common.issues}}catch(J){if(J?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;Q.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:Q}).then((J)=>B1(J)?{value:J.value}:{issues:Q.common.issues})}async parseAsync($,Q){let J=await this.safeParseAsync($,Q);if(J.success)return J.data;throw J.error}async safeParseAsync($,Q){let J={common:{issues:[],contextualErrorMap:Q?.errorMap,async:!0},path:Q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:v2($)},q=this._parse({data:$,path:J.path,parent:J}),X=await(G6(q)?q:Promise.resolve(q));return uJ(J,X)}refine($,Q){let J=(q)=>{if(typeof Q==="string"||typeof Q>"u")return{message:Q};else if(typeof Q==="function")return Q(q);else return Q};return this._refinement((q,X)=>{let Y=$(q),B=()=>X.addIssue({code:o.custom,...J(q)});if(typeof Promise<"u"&&Y instanceof Promise)return Y.then((U)=>{if(!U)return B(),!1;else return!0});if(!Y)return B(),!1;else return!0})}refinement($,Q){return this._refinement((J,q)=>{if(!$(J))return q.addIssue(typeof Q==="function"?Q(J,q):Q),!1;else return!0})}_refinement($){return new L2({schema:this,typeName:w0.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(Q)=>this["~validate"](Q)}}optional(){return F2.create(this,this._def)}nullable(){return i2.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return M2.create(this)}promise(){return _1.create(this,this._def)}or($){return F6.create([this,$],this._def)}and($){return w6.create(this,$,this._def)}transform($){return new L2({...D0(this._def),schema:this,typeName:w0.ZodEffects,effect:{type:"transform",transform:$}})}default($){let Q=typeof $==="function"?$:()=>$;return new N6({...D0(this._def),innerType:this,defaultValue:Q,typeName:w0.ZodDefault})}brand(){return new U5({typeName:w0.ZodBranded,type:this,...D0(this._def)})}catch($){let Q=typeof $==="function"?$:()=>$;return new D6({...D0(this._def),innerType:this,catchValue:Q,typeName:w0.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return G8.create(this,$)}readonly(){return P6.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var oG=/^c[^\s-]{8,}$/i,rG=/^[0-9a-z]+$/,aG=/^[0-9A-HJKMNP-TV-Z]{26}$/i,sG=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,tG=/^[a-z0-9_-]{21}$/i,eG=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$V=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,QV=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",e4,qV=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,XV=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,YV=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,BV=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,UV=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,WV=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,pJ="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",GV=new RegExp(`^${pJ}$`);function lJ($){let Q="[0-5]\\d";if($.precision)Q=`${Q}\\.\\d{${$.precision}}`;else if($.precision==null)Q=`${Q}(\\.\\d+)?`;let J=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${Q})${J}`}function VV($){return new RegExp(`^${lJ($)}$`)}function dJ($){let Q=`${pJ}T${lJ($)}`,J=[];if(J.push($.local?"Z?":"Z"),$.offset)J.push("([+-]\\d{2}:?\\d{2})");return Q=`${Q}(${J.join("|")})`,new RegExp(`^${Q}$`)}function KV($,Q){if((Q==="v4"||!Q)&&qV.test($))return!0;if((Q==="v6"||!Q)&&YV.test($))return!0;return!1}function jV($,Q){if(!eG.test($))return!1;try{let[J]=$.split(".");if(!J)return!1;let q=J.replace(/-/g,"+").replace(/_/g,"/").padEnd(J.length+(4-J.length%4)%4,"="),X=JSON.parse(atob(q));if(typeof X!=="object"||X===null)return!1;if("typ"in X&&X?.typ!=="JWT")return!1;if(!X.alg)return!1;if(Q&&X.alg!==Q)return!1;return!0}catch{return!1}}function HV($,Q){if((Q==="v4"||!Q)&&XV.test($))return!0;if((Q==="v6"||!Q)&&BV.test($))return!0;return!1}class H2 extends P0{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==$0.string){let X=this._getOrReturnCtx($);return X0(X,{code:o.invalid_type,expected:$0.string,received:X.parsedType}),F0}let J=new m0,q=void 0;for(let X of this._def.checks)if(X.kind==="min"){if($.data.length<X.value)q=this._getOrReturnCtx($,q),X0(q,{code:o.too_small,minimum:X.value,type:"string",inclusive:!0,exact:!1,message:X.message}),J.dirty()}else if(X.kind==="max"){if($.data.length>X.value)q=this._getOrReturnCtx($,q),X0(q,{code:o.too_big,maximum:X.value,type:"string",inclusive:!0,exact:!1,message:X.message}),J.dirty()}else if(X.kind==="length"){let Y=$.data.length>X.value,B=$.data.length<X.value;if(Y||B){if(q=this._getOrReturnCtx($,q),Y)X0(q,{code:o.too_big,maximum:X.value,type:"string",inclusive:!0,exact:!0,message:X.message});else if(B)X0(q,{code:o.too_small,minimum:X.value,type:"string",inclusive:!0,exact:!0,message:X.message});J.dirty()}}else if(X.kind==="email"){if(!QV.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"email",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="emoji"){if(!e4)e4=new RegExp(JV,"u");if(!e4.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"emoji",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="uuid"){if(!sG.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"uuid",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="nanoid"){if(!tG.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"nanoid",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="cuid"){if(!oG.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"cuid",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="cuid2"){if(!rG.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"cuid2",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="ulid"){if(!aG.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"ulid",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="url")try{new URL($.data)}catch{q=this._getOrReturnCtx($,q),X0(q,{validation:"url",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="regex"){if(X.regex.lastIndex=0,!X.regex.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"regex",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="trim")$.data=$.data.trim();else if(X.kind==="includes"){if(!$.data.includes(X.value,X.position))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:{includes:X.value,position:X.position},message:X.message}),J.dirty()}else if(X.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(X.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(X.kind==="startsWith"){if(!$.data.startsWith(X.value))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:{startsWith:X.value},message:X.message}),J.dirty()}else if(X.kind==="endsWith"){if(!$.data.endsWith(X.value))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:{endsWith:X.value},message:X.message}),J.dirty()}else if(X.kind==="datetime"){if(!dJ(X).test($.data))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:"datetime",message:X.message}),J.dirty()}else if(X.kind==="date"){if(!GV.test($.data))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:"date",message:X.message}),J.dirty()}else if(X.kind==="time"){if(!VV(X).test($.data))q=this._getOrReturnCtx($,q),X0(q,{code:o.invalid_string,validation:"time",message:X.message}),J.dirty()}else if(X.kind==="duration"){if(!$V.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"duration",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="ip"){if(!KV($.data,X.version))q=this._getOrReturnCtx($,q),X0(q,{validation:"ip",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="jwt"){if(!jV($.data,X.alg))q=this._getOrReturnCtx($,q),X0(q,{validation:"jwt",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="cidr"){if(!HV($.data,X.version))q=this._getOrReturnCtx($,q),X0(q,{validation:"cidr",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="base64"){if(!UV.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"base64",code:o.invalid_string,message:X.message}),J.dirty()}else if(X.kind==="base64url"){if(!WV.test($.data))q=this._getOrReturnCtx($,q),X0(q,{validation:"base64url",code:o.invalid_string,message:X.message}),J.dirty()}else A0.assertNever(X);return{status:J.value,value:$.data}}_regex($,Q,J){return this.refinement((q)=>$.test(q),{validation:Q,code:o.invalid_string,...V0.errToObj(J)})}_addCheck($){return new H2({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...V0.errToObj($)})}url($){return this._addCheck({kind:"url",...V0.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...V0.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...V0.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...V0.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...V0.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...V0.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...V0.errToObj($)})}base64($){return this._addCheck({kind:"base64",...V0.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...V0.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...V0.errToObj($)})}ip($){return this._addCheck({kind:"ip",...V0.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...V0.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...V0.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...V0.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...V0.errToObj($)})}regex($,Q){return this._addCheck({kind:"regex",regex:$,...V0.errToObj(Q)})}includes($,Q){return this._addCheck({kind:"includes",value:$,position:Q?.position,...V0.errToObj(Q?.message)})}startsWith($,Q){return this._addCheck({kind:"startsWith",value:$,...V0.errToObj(Q)})}endsWith($,Q){return this._addCheck({kind:"endsWith",value:$,...V0.errToObj(Q)})}min($,Q){return this._addCheck({kind:"min",value:$,...V0.errToObj(Q)})}max($,Q){return this._addCheck({kind:"max",value:$,...V0.errToObj(Q)})}length($,Q){return this._addCheck({kind:"length",value:$,...V0.errToObj(Q)})}nonempty($){return this.min(1,V0.errToObj($))}trim(){return new H2({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new H2({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new H2({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxLength(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}}H2.create=($)=>{return new H2({checks:[],typeName:w0.ZodString,coerce:$?.coerce??!1,...D0($)})};function MV($,Q){let J=($.toString().split(".")[1]||"").length,q=(Q.toString().split(".")[1]||"").length,X=J>q?J:q,Y=Number.parseInt($.toFixed(X).replace(".","")),B=Number.parseInt(Q.toFixed(X).replace(".",""));return Y%B/10**X}class W1 extends P0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==$0.number){let X=this._getOrReturnCtx($);return X0(X,{code:o.invalid_type,expected:$0.number,received:X.parsedType}),F0}let J=void 0,q=new m0;for(let X of this._def.checks)if(X.kind==="int"){if(!A0.isInteger($.data))J=this._getOrReturnCtx($,J),X0(J,{code:o.invalid_type,expected:"integer",received:"float",message:X.message}),q.dirty()}else if(X.kind==="min"){if(X.inclusive?$.data<X.value:$.data<=X.value)J=this._getOrReturnCtx($,J),X0(J,{code:o.too_small,minimum:X.value,type:"number",inclusive:X.inclusive,exact:!1,message:X.message}),q.dirty()}else if(X.kind==="max"){if(X.inclusive?$.data>X.value:$.data>=X.value)J=this._getOrReturnCtx($,J),X0(J,{code:o.too_big,maximum:X.value,type:"number",inclusive:X.inclusive,exact:!1,message:X.message}),q.dirty()}else if(X.kind==="multipleOf"){if(MV($.data,X.value)!==0)J=this._getOrReturnCtx($,J),X0(J,{code:o.not_multiple_of,multipleOf:X.value,message:X.message}),q.dirty()}else if(X.kind==="finite"){if(!Number.isFinite($.data))J=this._getOrReturnCtx($,J),X0(J,{code:o.not_finite,message:X.message}),q.dirty()}else A0.assertNever(X);return{status:q.value,value:$.data}}gte($,Q){return this.setLimit("min",$,!0,V0.toString(Q))}gt($,Q){return this.setLimit("min",$,!1,V0.toString(Q))}lte($,Q){return this.setLimit("max",$,!0,V0.toString(Q))}lt($,Q){return this.setLimit("max",$,!1,V0.toString(Q))}setLimit($,Q,J,q){return new W1({...this._def,checks:[...this._def.checks,{kind:$,value:Q,inclusive:J,message:V0.toString(q)}]})}_addCheck($){return new W1({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:V0.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:V0.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:V0.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:V0.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:V0.toString($)})}multipleOf($,Q){return this._addCheck({kind:"multipleOf",value:$,message:V0.toString(Q)})}finite($){return this._addCheck({kind:"finite",message:V0.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:V0.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:V0.toString($)})}get minValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&A0.isInteger($.value))}get isFinite(){let $=null,Q=null;for(let J of this._def.checks)if(J.kind==="finite"||J.kind==="int"||J.kind==="multipleOf")return!0;else if(J.kind==="min"){if(Q===null||J.value>Q)Q=J.value}else if(J.kind==="max"){if($===null||J.value<$)$=J.value}return Number.isFinite(Q)&&Number.isFinite($)}}W1.create=($)=>{return new W1({checks:[],typeName:w0.ZodNumber,coerce:$?.coerce||!1,...D0($)})};class G1 extends P0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==$0.bigint)return this._getInvalidInput($);let J=void 0,q=new m0;for(let X of this._def.checks)if(X.kind==="min"){if(X.inclusive?$.data<X.value:$.data<=X.value)J=this._getOrReturnCtx($,J),X0(J,{code:o.too_small,type:"bigint",minimum:X.value,inclusive:X.inclusive,message:X.message}),q.dirty()}else if(X.kind==="max"){if(X.inclusive?$.data>X.value:$.data>=X.value)J=this._getOrReturnCtx($,J),X0(J,{code:o.too_big,type:"bigint",maximum:X.value,inclusive:X.inclusive,message:X.message}),q.dirty()}else if(X.kind==="multipleOf"){if($.data%X.value!==BigInt(0))J=this._getOrReturnCtx($,J),X0(J,{code:o.not_multiple_of,multipleOf:X.value,message:X.message}),q.dirty()}else A0.assertNever(X);return{status:q.value,value:$.data}}_getInvalidInput($){let Q=this._getOrReturnCtx($);return X0(Q,{code:o.invalid_type,expected:$0.bigint,received:Q.parsedType}),F0}gte($,Q){return this.setLimit("min",$,!0,V0.toString(Q))}gt($,Q){return this.setLimit("min",$,!1,V0.toString(Q))}lte($,Q){return this.setLimit("max",$,!0,V0.toString(Q))}lt($,Q){return this.setLimit("max",$,!1,V0.toString(Q))}setLimit($,Q,J,q){return new G1({...this._def,checks:[...this._def.checks,{kind:$,value:Q,inclusive:J,message:V0.toString(q)}]})}_addCheck($){return new G1({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:V0.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:V0.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:V0.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:V0.toString($)})}multipleOf($,Q){return this._addCheck({kind:"multipleOf",value:$,message:V0.toString(Q)})}get minValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}}G1.create=($)=>{return new G1({checks:[],typeName:w0.ZodBigInt,coerce:$?.coerce??!1,...D0($)})};class j6 extends P0{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==$0.boolean){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.boolean,received:J.parsedType}),F0}return l0($.data)}}j6.create=($)=>{return new j6({typeName:w0.ZodBoolean,coerce:$?.coerce||!1,...D0($)})};class x1 extends P0{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==$0.date){let X=this._getOrReturnCtx($);return X0(X,{code:o.invalid_type,expected:$0.date,received:X.parsedType}),F0}if(Number.isNaN($.data.getTime())){let X=this._getOrReturnCtx($);return X0(X,{code:o.invalid_date}),F0}let J=new m0,q=void 0;for(let X of this._def.checks)if(X.kind==="min"){if($.data.getTime()<X.value)q=this._getOrReturnCtx($,q),X0(q,{code:o.too_small,message:X.message,inclusive:!0,exact:!1,minimum:X.value,type:"date"}),J.dirty()}else if(X.kind==="max"){if($.data.getTime()>X.value)q=this._getOrReturnCtx($,q),X0(q,{code:o.too_big,message:X.message,inclusive:!0,exact:!1,maximum:X.value,type:"date"}),J.dirty()}else A0.assertNever(X);return{status:J.value,value:new Date($.data.getTime())}}_addCheck($){return new x1({...this._def,checks:[...this._def.checks,$]})}min($,Q){return this._addCheck({kind:"min",value:$.getTime(),message:V0.toString(Q)})}max($,Q){return this._addCheck({kind:"max",value:$.getTime(),message:V0.toString(Q)})}get minDate(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $!=null?new Date($):null}}x1.create=($)=>{return new x1({checks:[],coerce:$?.coerce||!1,typeName:w0.ZodDate,...D0($)})};class X8 extends P0{_parse($){if(this._getType($)!==$0.symbol){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.symbol,received:J.parsedType}),F0}return l0($.data)}}X8.create=($)=>{return new X8({typeName:w0.ZodSymbol,...D0($)})};class H6 extends P0{_parse($){if(this._getType($)!==$0.undefined){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.undefined,received:J.parsedType}),F0}return l0($.data)}}H6.create=($)=>{return new H6({typeName:w0.ZodUndefined,...D0($)})};class M6 extends P0{_parse($){if(this._getType($)!==$0.null){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.null,received:J.parsedType}),F0}return l0($.data)}}M6.create=($)=>{return new M6({typeName:w0.ZodNull,...D0($)})};class f1 extends P0{constructor(){super(...arguments);this._any=!0}_parse($){return l0($.data)}}f1.create=($)=>{return new f1({typeName:w0.ZodAny,...D0($)})};class U1 extends P0{constructor(){super(...arguments);this._unknown=!0}_parse($){return l0($.data)}}U1.create=($)=>{return new U1({typeName:w0.ZodUnknown,...D0($)})};class k2 extends P0{_parse($){let Q=this._getOrReturnCtx($);return X0(Q,{code:o.invalid_type,expected:$0.never,received:Q.parsedType}),F0}}k2.create=($)=>{return new k2({typeName:w0.ZodNever,...D0($)})};class Y8 extends P0{_parse($){if(this._getType($)!==$0.undefined){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.void,received:J.parsedType}),F0}return l0($.data)}}Y8.create=($)=>{return new Y8({typeName:w0.ZodVoid,...D0($)})};class M2 extends P0{_parse($){let{ctx:Q,status:J}=this._processInputParams($),q=this._def;if(Q.parsedType!==$0.array)return X0(Q,{code:o.invalid_type,expected:$0.array,received:Q.parsedType}),F0;if(q.exactLength!==null){let Y=Q.data.length>q.exactLength.value,B=Q.data.length<q.exactLength.value;if(Y||B)X0(Q,{code:Y?o.too_big:o.too_small,minimum:B?q.exactLength.value:void 0,maximum:Y?q.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:q.exactLength.message}),J.dirty()}if(q.minLength!==null){if(Q.data.length<q.minLength.value)X0(Q,{code:o.too_small,minimum:q.minLength.value,type:"array",inclusive:!0,exact:!1,message:q.minLength.message}),J.dirty()}if(q.maxLength!==null){if(Q.data.length>q.maxLength.value)X0(Q,{code:o.too_big,maximum:q.maxLength.value,type:"array",inclusive:!0,exact:!1,message:q.maxLength.message}),J.dirty()}if(Q.common.async)return Promise.all([...Q.data].map((Y,B)=>{return q.type._parseAsync(new w2(Q,Y,Q.path,B))})).then((Y)=>{return m0.mergeArray(J,Y)});let X=[...Q.data].map((Y,B)=>{return q.type._parseSync(new w2(Q,Y,Q.path,B))});return m0.mergeArray(J,X)}get element(){return this._def.type}min($,Q){return new M2({...this._def,minLength:{value:$,message:V0.toString(Q)}})}max($,Q){return new M2({...this._def,maxLength:{value:$,message:V0.toString(Q)}})}length($,Q){return new M2({...this._def,exactLength:{value:$,message:V0.toString(Q)}})}nonempty($){return this.min(1,$)}}M2.create=($,Q)=>{return new M2({type:$,minLength:null,maxLength:null,exactLength:null,typeName:w0.ZodArray,...D0(Q)})};function V6($){if($ instanceof x0){let Q={};for(let J in $.shape){let q=$.shape[J];Q[J]=F2.create(V6(q))}return new x0({...$._def,shape:()=>Q})}else if($ instanceof M2)return new M2({...$._def,type:V6($.element)});else if($ instanceof F2)return F2.create(V6($.unwrap()));else if($ instanceof i2)return i2.create(V6($.unwrap()));else if($ instanceof Z2)return Z2.create($.items.map((Q)=>V6(Q)));else return $}class x0 extends P0{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),Q=A0.objectKeys($);return this._cached={shape:$,keys:Q},this._cached}_parse($){if(this._getType($)!==$0.object){let W=this._getOrReturnCtx($);return X0(W,{code:o.invalid_type,expected:$0.object,received:W.parsedType}),F0}let{status:J,ctx:q}=this._processInputParams($),{shape:X,keys:Y}=this._getCached(),B=[];if(!(this._def.catchall instanceof k2&&this._def.unknownKeys==="strip")){for(let W in q.data)if(!Y.includes(W))B.push(W)}let U=[];for(let W of Y){let G=X[W],V=q.data[W];U.push({key:{status:"valid",value:W},value:G._parse(new w2(q,V,q.path,W)),alwaysSet:W in q.data})}if(this._def.catchall instanceof k2){let W=this._def.unknownKeys;if(W==="passthrough")for(let G of B)U.push({key:{status:"valid",value:G},value:{status:"valid",value:q.data[G]}});else if(W==="strict"){if(B.length>0)X0(q,{code:o.unrecognized_keys,keys:B}),J.dirty()}else if(W==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let W=this._def.catchall;for(let G of B){let V=q.data[G];U.push({key:{status:"valid",value:G},value:W._parse(new w2(q,V,q.path,G)),alwaysSet:G in q.data})}}if(q.common.async)return Promise.resolve().then(async()=>{let W=[];for(let G of U){let V=await G.key,F=await G.value;W.push({key:V,value:F,alwaysSet:G.alwaysSet})}return W}).then((W)=>{return m0.mergeObjectSync(J,W)});else return m0.mergeObjectSync(J,U)}get shape(){return this._def.shape()}strict($){return V0.errToObj,new x0({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(Q,J)=>{let q=this._def.errorMap?.(Q,J).message??J.defaultError;if(Q.code==="unrecognized_keys")return{message:V0.errToObj($).message??q};return{message:q}}}:{}})}strip(){return new x0({...this._def,unknownKeys:"strip"})}passthrough(){return new x0({...this._def,unknownKeys:"passthrough"})}extend($){return new x0({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new x0({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:w0.ZodObject})}setKey($,Q){return this.augment({[$]:Q})}catchall($){return new x0({...this._def,catchall:$})}pick($){let Q={};for(let J of A0.objectKeys($))if($[J]&&this.shape[J])Q[J]=this.shape[J];return new x0({...this._def,shape:()=>Q})}omit($){let Q={};for(let J of A0.objectKeys(this.shape))if(!$[J])Q[J]=this.shape[J];return new x0({...this._def,shape:()=>Q})}deepPartial(){return V6(this)}partial($){let Q={};for(let J of A0.objectKeys(this.shape)){let q=this.shape[J];if($&&!$[J])Q[J]=q;else Q[J]=q.optional()}return new x0({...this._def,shape:()=>Q})}required($){let Q={};for(let J of A0.objectKeys(this.shape))if($&&!$[J])Q[J]=this.shape[J];else{let X=this.shape[J];while(X instanceof F2)X=X._def.innerType;Q[J]=X}return new x0({...this._def,shape:()=>Q})}keyof(){return iJ(A0.objectKeys(this.shape))}}x0.create=($,Q)=>{return new x0({shape:()=>$,unknownKeys:"strip",catchall:k2.create(),typeName:w0.ZodObject,...D0(Q)})};x0.strictCreate=($,Q)=>{return new x0({shape:()=>$,unknownKeys:"strict",catchall:k2.create(),typeName:w0.ZodObject,...D0(Q)})};x0.lazycreate=($,Q)=>{return new x0({shape:$,unknownKeys:"strip",catchall:k2.create(),typeName:w0.ZodObject,...D0(Q)})};class F6 extends P0{_parse($){let{ctx:Q}=this._processInputParams($),J=this._def.options;function q(X){for(let B of X)if(B.result.status==="valid")return B.result;for(let B of X)if(B.result.status==="dirty")return Q.common.issues.push(...B.ctx.common.issues),B.result;let Y=X.map((B)=>new t0(B.ctx.common.issues));return X0(Q,{code:o.invalid_union,unionErrors:Y}),F0}if(Q.common.async)return Promise.all(J.map(async(X)=>{let Y={...Q,common:{...Q.common,issues:[]},parent:null};return{result:await X._parseAsync({data:Q.data,path:Q.path,parent:Y}),ctx:Y}})).then(q);else{let X=void 0,Y=[];for(let U of J){let W={...Q,common:{...Q.common,issues:[]},parent:null},G=U._parseSync({data:Q.data,path:Q.path,parent:W});if(G.status==="valid")return G;else if(G.status==="dirty"&&!X)X={result:G,ctx:W};if(W.common.issues.length)Y.push(W.common.issues)}if(X)return Q.common.issues.push(...X.ctx.common.issues),X.result;let B=Y.map((U)=>new t0(U));return X0(Q,{code:o.invalid_union,unionErrors:B}),F0}}get options(){return this._def.options}}F6.create=($,Q)=>{return new F6({options:$,typeName:w0.ZodUnion,...D0(Q)})};var d2=($)=>{if($ instanceof L6)return d2($.schema);else if($ instanceof L2)return d2($.innerType());else if($ instanceof z6)return[$.value];else if($ instanceof V1)return $.options;else if($ instanceof O6)return A0.objectValues($.enum);else if($ instanceof N6)return d2($._def.innerType);else if($ instanceof H6)return[void 0];else if($ instanceof M6)return[null];else if($ instanceof F2)return[void 0,...d2($.unwrap())];else if($ instanceof i2)return[null,...d2($.unwrap())];else if($ instanceof U5)return d2($.unwrap());else if($ instanceof P6)return d2($.unwrap());else if($ instanceof D6)return d2($._def.innerType);else return[]};class B5 extends P0{_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==$0.object)return X0(Q,{code:o.invalid_type,expected:$0.object,received:Q.parsedType}),F0;let J=this.discriminator,q=Q.data[J],X=this.optionsMap.get(q);if(!X)return X0(Q,{code:o.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[J]}),F0;if(Q.common.async)return X._parseAsync({data:Q.data,path:Q.path,parent:Q});else return X._parseSync({data:Q.data,path:Q.path,parent:Q})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,Q,J){let q=new Map;for(let X of Q){let Y=d2(X.shape[$]);if(!Y.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let B of Y){if(q.has(B))throw Error(`Discriminator property ${String($)} has duplicate value ${String(B)}`);q.set(B,X)}}return new B5({typeName:w0.ZodDiscriminatedUnion,discriminator:$,options:Q,optionsMap:q,...D0(J)})}}function $7($,Q){let J=v2($),q=v2(Q);if($===Q)return{valid:!0,data:$};else if(J===$0.object&&q===$0.object){let X=A0.objectKeys(Q),Y=A0.objectKeys($).filter((U)=>X.indexOf(U)!==-1),B={...$,...Q};for(let U of Y){let W=$7($[U],Q[U]);if(!W.valid)return{valid:!1};B[U]=W.data}return{valid:!0,data:B}}else if(J===$0.array&&q===$0.array){if($.length!==Q.length)return{valid:!1};let X=[];for(let Y=0;Y<$.length;Y++){let B=$[Y],U=Q[Y],W=$7(B,U);if(!W.valid)return{valid:!1};X.push(W.data)}return{valid:!0,data:X}}else if(J===$0.date&&q===$0.date&&+$===+Q)return{valid:!0,data:$};else return{valid:!1}}class w6 extends P0{_parse($){let{status:Q,ctx:J}=this._processInputParams($),q=(X,Y)=>{if(X5(X)||X5(Y))return F0;let B=$7(X.value,Y.value);if(!B.valid)return X0(J,{code:o.invalid_intersection_types}),F0;if(Y5(X)||Y5(Y))Q.dirty();return{status:Q.value,value:B.data}};if(J.common.async)return Promise.all([this._def.left._parseAsync({data:J.data,path:J.path,parent:J}),this._def.right._parseAsync({data:J.data,path:J.path,parent:J})]).then(([X,Y])=>q(X,Y));else return q(this._def.left._parseSync({data:J.data,path:J.path,parent:J}),this._def.right._parseSync({data:J.data,path:J.path,parent:J}))}}w6.create=($,Q,J)=>{return new w6({left:$,right:Q,typeName:w0.ZodIntersection,...D0(J)})};class Z2 extends P0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==$0.array)return X0(J,{code:o.invalid_type,expected:$0.array,received:J.parsedType}),F0;if(J.data.length<this._def.items.length)return X0(J,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F0;if(!this._def.rest&&J.data.length>this._def.items.length)X0(J,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Q.dirty();let X=[...J.data].map((Y,B)=>{let U=this._def.items[B]||this._def.rest;if(!U)return null;return U._parse(new w2(J,Y,J.path,B))}).filter((Y)=>!!Y);if(J.common.async)return Promise.all(X).then((Y)=>{return m0.mergeArray(Q,Y)});else return m0.mergeArray(Q,X)}get items(){return this._def.items}rest($){return new Z2({...this._def,rest:$})}}Z2.create=($,Q)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z2({items:$,typeName:w0.ZodTuple,rest:null,...D0(Q)})};class B8 extends P0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==$0.object)return X0(J,{code:o.invalid_type,expected:$0.object,received:J.parsedType}),F0;let q=[],X=this._def.keyType,Y=this._def.valueType;for(let B in J.data)q.push({key:X._parse(new w2(J,B,J.path,B)),value:Y._parse(new w2(J,J.data[B],J.path,B)),alwaysSet:B in J.data});if(J.common.async)return m0.mergeObjectAsync(Q,q);else return m0.mergeObjectSync(Q,q)}get element(){return this._def.valueType}static create($,Q,J){if(Q instanceof P0)return new B8({keyType:$,valueType:Q,typeName:w0.ZodRecord,...D0(J)});return new B8({keyType:H2.create(),valueType:$,typeName:w0.ZodRecord,...D0(Q)})}}class U8 extends P0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==$0.map)return X0(J,{code:o.invalid_type,expected:$0.map,received:J.parsedType}),F0;let q=this._def.keyType,X=this._def.valueType,Y=[...J.data.entries()].map(([B,U],W)=>{return{key:q._parse(new w2(J,B,J.path,[W,"key"])),value:X._parse(new w2(J,U,J.path,[W,"value"]))}});if(J.common.async){let B=new Map;return Promise.resolve().then(async()=>{for(let U of Y){let W=await U.key,G=await U.value;if(W.status==="aborted"||G.status==="aborted")return F0;if(W.status==="dirty"||G.status==="dirty")Q.dirty();B.set(W.value,G.value)}return{status:Q.value,value:B}})}else{let B=new Map;for(let U of Y){let{key:W,value:G}=U;if(W.status==="aborted"||G.status==="aborted")return F0;if(W.status==="dirty"||G.status==="dirty")Q.dirty();B.set(W.value,G.value)}return{status:Q.value,value:B}}}}U8.create=($,Q,J)=>{return new U8({valueType:Q,keyType:$,typeName:w0.ZodMap,...D0(J)})};class y1 extends P0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==$0.set)return X0(J,{code:o.invalid_type,expected:$0.set,received:J.parsedType}),F0;let q=this._def;if(q.minSize!==null){if(J.data.size<q.minSize.value)X0(J,{code:o.too_small,minimum:q.minSize.value,type:"set",inclusive:!0,exact:!1,message:q.minSize.message}),Q.dirty()}if(q.maxSize!==null){if(J.data.size>q.maxSize.value)X0(J,{code:o.too_big,maximum:q.maxSize.value,type:"set",inclusive:!0,exact:!1,message:q.maxSize.message}),Q.dirty()}let X=this._def.valueType;function Y(U){let W=new Set;for(let G of U){if(G.status==="aborted")return F0;if(G.status==="dirty")Q.dirty();W.add(G.value)}return{status:Q.value,value:W}}let B=[...J.data.values()].map((U,W)=>X._parse(new w2(J,U,J.path,W)));if(J.common.async)return Promise.all(B).then((U)=>Y(U));else return Y(B)}min($,Q){return new y1({...this._def,minSize:{value:$,message:V0.toString(Q)}})}max($,Q){return new y1({...this._def,maxSize:{value:$,message:V0.toString(Q)}})}size($,Q){return this.min($,Q).max($,Q)}nonempty($){return this.min(1,$)}}y1.create=($,Q)=>{return new y1({valueType:$,minSize:null,maxSize:null,typeName:w0.ZodSet,...D0(Q)})};class K6 extends P0{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==$0.function)return X0(Q,{code:o.invalid_type,expected:$0.function,received:Q.parsedType}),F0;function J(B,U){return q8({data:B,path:Q.path,errorMaps:[Q.common.contextualErrorMap,Q.schemaErrorMap,W6(),l2].filter((W)=>!!W),issueData:{code:o.invalid_arguments,argumentsError:U}})}function q(B,U){return q8({data:B,path:Q.path,errorMaps:[Q.common.contextualErrorMap,Q.schemaErrorMap,W6(),l2].filter((W)=>!!W),issueData:{code:o.invalid_return_type,returnTypeError:U}})}let X={errorMap:Q.common.contextualErrorMap},Y=Q.data;if(this._def.returns instanceof _1){let B=this;return l0(async function(...U){let W=new t0([]),G=await B._def.args.parseAsync(U,X).catch((M)=>{throw W.addIssue(J(U,M)),W}),V=await Reflect.apply(Y,this,G);return await B._def.returns._def.type.parseAsync(V,X).catch((M)=>{throw W.addIssue(q(V,M)),W})})}else{let B=this;return l0(function(...U){let W=B._def.args.safeParse(U,X);if(!W.success)throw new t0([J(U,W.error)]);let G=Reflect.apply(Y,this,W.data),V=B._def.returns.safeParse(G,X);if(!V.success)throw new t0([q(G,V.error)]);return V.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new K6({...this._def,args:Z2.create($).rest(U1.create())})}returns($){return new K6({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,Q,J){return new K6({args:$?$:Z2.create([]).rest(U1.create()),returns:Q||U1.create(),typeName:w0.ZodFunction,...D0(J)})}}class L6 extends P0{get schema(){return this._def.getter()}_parse($){let{ctx:Q}=this._processInputParams($);return this._def.getter()._parse({data:Q.data,path:Q.path,parent:Q})}}L6.create=($,Q)=>{return new L6({getter:$,typeName:w0.ZodLazy,...D0(Q)})};class z6 extends P0{_parse($){if($.data!==this._def.value){let Q=this._getOrReturnCtx($);return X0(Q,{received:Q.data,code:o.invalid_literal,expected:this._def.value}),F0}return{status:"valid",value:$.data}}get value(){return this._def.value}}z6.create=($,Q)=>{return new z6({value:$,typeName:w0.ZodLiteral,...D0(Q)})};function iJ($,Q){return new V1({values:$,typeName:w0.ZodEnum,...D0(Q)})}class V1 extends P0{_parse($){if(typeof $.data!=="string"){let Q=this._getOrReturnCtx($),J=this._def.values;return X0(Q,{expected:A0.joinValues(J),received:Q.parsedType,code:o.invalid_type}),F0}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let Q=this._getOrReturnCtx($),J=this._def.values;return X0(Q,{received:Q.data,code:o.invalid_enum_value,options:J}),F0}return l0($.data)}get options(){return this._def.values}get enum(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}get Values(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}get Enum(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}extract($,Q=this._def){return V1.create($,{...this._def,...Q})}exclude($,Q=this._def){return V1.create(this.options.filter((J)=>!$.includes(J)),{...this._def,...Q})}}V1.create=iJ;class O6 extends P0{_parse($){let Q=A0.getValidEnumValues(this._def.values),J=this._getOrReturnCtx($);if(J.parsedType!==$0.string&&J.parsedType!==$0.number){let q=A0.objectValues(Q);return X0(J,{expected:A0.joinValues(q),received:J.parsedType,code:o.invalid_type}),F0}if(!this._cache)this._cache=new Set(A0.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let q=A0.objectValues(Q);return X0(J,{received:J.data,code:o.invalid_enum_value,options:q}),F0}return l0($.data)}get enum(){return this._def.values}}O6.create=($,Q)=>{return new O6({values:$,typeName:w0.ZodNativeEnum,...D0(Q)})};class _1 extends P0{unwrap(){return this._def.type}_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==$0.promise&&Q.common.async===!1)return X0(Q,{code:o.invalid_type,expected:$0.promise,received:Q.parsedType}),F0;let J=Q.parsedType===$0.promise?Q.data:Promise.resolve(Q.data);return l0(J.then((q)=>{return this._def.type.parseAsync(q,{path:Q.path,errorMap:Q.common.contextualErrorMap})}))}}_1.create=($,Q)=>{return new _1({type:$,typeName:w0.ZodPromise,...D0(Q)})};class L2 extends P0{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===w0.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:Q,ctx:J}=this._processInputParams($),q=this._def.effect||null,X={addIssue:(Y)=>{if(X0(J,Y),Y.fatal)Q.abort();else Q.dirty()},get path(){return J.path}};if(X.addIssue=X.addIssue.bind(X),q.type==="preprocess"){let Y=q.transform(J.data,X);if(J.common.async)return Promise.resolve(Y).then(async(B)=>{if(Q.value==="aborted")return F0;let U=await this._def.schema._parseAsync({data:B,path:J.path,parent:J});if(U.status==="aborted")return F0;if(U.status==="dirty")return g1(U.value);if(Q.value==="dirty")return g1(U.value);return U});else{if(Q.value==="aborted")return F0;let B=this._def.schema._parseSync({data:Y,path:J.path,parent:J});if(B.status==="aborted")return F0;if(B.status==="dirty")return g1(B.value);if(Q.value==="dirty")return g1(B.value);return B}}if(q.type==="refinement"){let Y=(B)=>{let U=q.refinement(B,X);if(J.common.async)return Promise.resolve(U);if(U instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return B};if(J.common.async===!1){let B=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(B.status==="aborted")return F0;if(B.status==="dirty")Q.dirty();return Y(B.value),{status:Q.value,value:B.value}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((B)=>{if(B.status==="aborted")return F0;if(B.status==="dirty")Q.dirty();return Y(B.value).then(()=>{return{status:Q.value,value:B.value}})})}if(q.type==="transform")if(J.common.async===!1){let Y=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(!B1(Y))return F0;let B=q.transform(Y.value,X);if(B instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:Q.value,value:B}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((Y)=>{if(!B1(Y))return F0;return Promise.resolve(q.transform(Y.value,X)).then((B)=>({status:Q.value,value:B}))});A0.assertNever(q)}}L2.create=($,Q,J)=>{return new L2({schema:$,typeName:w0.ZodEffects,effect:Q,...D0(J)})};L2.createWithPreprocess=($,Q,J)=>{return new L2({schema:Q,effect:{type:"preprocess",transform:$},typeName:w0.ZodEffects,...D0(J)})};class F2 extends P0{_parse($){if(this._getType($)===$0.undefined)return l0(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}F2.create=($,Q)=>{return new F2({innerType:$,typeName:w0.ZodOptional,...D0(Q)})};class i2 extends P0{_parse($){if(this._getType($)===$0.null)return l0(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}i2.create=($,Q)=>{return new i2({innerType:$,typeName:w0.ZodNullable,...D0(Q)})};class N6 extends P0{_parse($){let{ctx:Q}=this._processInputParams($),J=Q.data;if(Q.parsedType===$0.undefined)J=this._def.defaultValue();return this._def.innerType._parse({data:J,path:Q.path,parent:Q})}removeDefault(){return this._def.innerType}}N6.create=($,Q)=>{return new N6({innerType:$,typeName:w0.ZodDefault,defaultValue:typeof Q.default==="function"?Q.default:()=>Q.default,...D0(Q)})};class D6 extends P0{_parse($){let{ctx:Q}=this._processInputParams($),J={...Q,common:{...Q.common,issues:[]}},q=this._def.innerType._parse({data:J.data,path:J.path,parent:{...J}});if(G6(q))return q.then((X)=>{return{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new t0(J.common.issues)},input:J.data})}});else return{status:"valid",value:q.status==="valid"?q.value:this._def.catchValue({get error(){return new t0(J.common.issues)},input:J.data})}}removeCatch(){return this._def.innerType}}D6.create=($,Q)=>{return new D6({innerType:$,typeName:w0.ZodCatch,catchValue:typeof Q.catch==="function"?Q.catch:()=>Q.catch,...D0(Q)})};class W8 extends P0{_parse($){if(this._getType($)!==$0.nan){let J=this._getOrReturnCtx($);return X0(J,{code:o.invalid_type,expected:$0.nan,received:J.parsedType}),F0}return{status:"valid",value:$.data}}}W8.create=($)=>{return new W8({typeName:w0.ZodNaN,...D0($)})};var FV=Symbol("zod_brand");class U5 extends P0{_parse($){let{ctx:Q}=this._processInputParams($),J=Q.data;return this._def.type._parse({data:J,path:Q.path,parent:Q})}unwrap(){return this._def.type}}class G8 extends P0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.common.async)return(async()=>{let X=await this._def.in._parseAsync({data:J.data,path:J.path,parent:J});if(X.status==="aborted")return F0;if(X.status==="dirty")return Q.dirty(),g1(X.value);else return this._def.out._parseAsync({data:X.value,path:J.path,parent:J})})();else{let q=this._def.in._parseSync({data:J.data,path:J.path,parent:J});if(q.status==="aborted")return F0;if(q.status==="dirty")return Q.dirty(),{status:"dirty",value:q.value};else return this._def.out._parseSync({data:q.value,path:J.path,parent:J})}}static create($,Q){return new G8({in:$,out:Q,typeName:w0.ZodPipeline})}}class P6 extends P0{_parse($){let Q=this._def.innerType._parse($),J=(q)=>{if(B1(q))q.value=Object.freeze(q.value);return q};return G6(Q)?Q.then((q)=>J(q)):J(Q)}unwrap(){return this._def.innerType}}P6.create=($,Q)=>{return new P6({innerType:$,typeName:w0.ZodReadonly,...D0(Q)})};function cJ($,Q){let J=typeof $==="function"?$(Q):typeof $==="string"?{message:$}:$;return typeof J==="string"?{message:J}:J}function nJ($,Q={},J){if($)return f1.create().superRefine((q,X)=>{let Y=$(q);if(Y instanceof Promise)return Y.then((B)=>{if(!B){let U=cJ(Q,q),W=U.fatal??J??!0;X.addIssue({code:"custom",...U,fatal:W})}});if(!Y){let B=cJ(Q,q),U=B.fatal??J??!0;X.addIssue({code:"custom",...B,fatal:U})}return});return f1.create()}var wV={object:x0.lazycreate},w0;(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(w0||(w0={}));var LV=($,Q={message:`Input not instance of ${$.name}`})=>nJ((J)=>J instanceof $,Q),oJ=H2.create,rJ=W1.create,zV=W8.create,OV=G1.create,aJ=j6.create,NV=x1.create,DV=X8.create,PV=H6.create,AV=M6.create,CV=f1.create,RV=U1.create,IV=k2.create,SV=Y8.create,EV=M2.create,vV=x0.create,kV=x0.strictCreate,ZV=F6.create,TV=B5.create,gV=w6.create,xV=Z2.create,fV=B8.create,yV=U8.create,_V=y1.create,bV=K6.create,hV=L6.create,mV=z6.create,uV=V1.create,cV=O6.create,pV=_1.create,lV=L2.create,dV=F2.create,iV=i2.create,nV=L2.createWithPreprocess,oV=G8.create,rV=()=>oJ().optional(),aV=()=>rJ().optional(),sV=()=>aJ().optional(),tV={string:($)=>H2.create({...$,coerce:!0}),number:($)=>W1.create({...$,coerce:!0}),boolean:($)=>j6.create({...$,coerce:!0}),bigint:($)=>G1.create({...$,coerce:!0}),date:($)=>x1.create({...$,coerce:!0})};var eV=F0;class z2 extends Error{field;regex;constructor($,Q,J){super(J);this.field=$,this.regex=Q}}class V8 extends Error{hash;constructor($){super(`'${$}' not found in the root hash`);this.hash=$}}class Q7 extends Map{#Q;#$=0;constructor($,Q=[]){super();this.#Q=$;for(let[J,q]of Q)this.set(J,q)}get($){let Q=super.get($);if(Q!==void 0)super.delete($),super.set($,Q);return Q}set($,Q){let J=super.get($);if(J===void 0)this.#$+=$.length;else if(J!==null)this.#$-=J.length;if(Q!==null)this.#$+=Q.length;super.delete($);let q;while(this.#$>this.#Q&&(q=this.entries().next().value)){let[X,Y]=q;if(super.delete(X),this.#$-=X.length,Y!==null)this.#$-=Y.length}return super.set($,Q),this}delete($){let Q=super.get($);if(Q===void 0)return!1;if(super.delete($),Q!==null)this.#$-=Q.length;return this.#$-=$.length,!0}clear(){super.clear(),this.#$=0}}var Wq=R7(tJ(),1);var $K={0:"brush",12:"brush",1:"pencil",14:"pencil",2:"ballpoint",15:"ballpoint",3:"marker",16:"marker",4:"fineliner",17:"fineliner",5:"highlighter",18:"highlighter",6:"eraser",7:"mechanicalPencil",13:"mechanicalPencil",8:"eraseArea",21:"calligraphy",23:"shader"};function QK($){return $K[$]}var JK={0:"black",1:"gray",2:"white"},K1=43,W5="reMarkable .lines file, version=";function eJ($,Q){let J=new DataView($.buffer,$.byteOffset,$.byteLength),q=K1,X=()=>{let W=J.getInt32(q,!0);return q+=4,W},Y=()=>{let W=J.getFloat32(q,!0);return q+=4,W},B=X(),U=[];for(let W=0;W<B;W++){let G=X(),V=[];for(let F=0;F<G;F++){let M=X(),j=X(),f=X(),T=Y(),D=Q===5?X():void 0,P=X(),K=Array(P);for(let z=0;z<P;z++)K[z]={x:Y(),y:Y(),speed:Y(),direction:Y(),width:Y(),pressure:Y()};let L={brushType:M,color:j,padding:f,brushBaseSize:T,points:K};if(D!==void 0)L.unknown=D;V.push(L)}U.push({lines:V})}return{version:Q,layers:U}}function $q($){let{version:Q}=$;if(Q!==3&&Q!==5)throw Error(`rendering version ${Q} .lines files is not supported (only 3 and 5)`);let J=Q===5?24:20,q=K1+4;for(let V of $.layers){q+=4;for(let F of V.lines)q+=J+F.points.length*24}let X=new Uint8Array(q),Y=new DataView(X.buffer),B=`${W5}${Q}`.padEnd(K1," ");for(let V=0;V<K1;V++)X[V]=B.charCodeAt(V);let U=K1,W=(V)=>{Y.setInt32(U,V,!0),U+=4},G=(V)=>{Y.setFloat32(U,V,!0),U+=4};W($.layers.length);for(let V of $.layers){W(V.lines.length);for(let F of V.lines){if(W(F.brushType),W(F.color),W(F.padding??0),G(F.brushBaseSize),Q===5)W(F.unknown??0);W(F.points.length);for(let M of F.points)G(M.x),G(M.y),G(M.speed),G(M.direction),G(M.width),G(M.pressure)}}return X}var q7={authorId:0,counter:1},Y7={authorId:0,counter:0};function d0($){return`${$.authorId}:${$.counter}`}var Qq=43,qK="reMarkable .lines file, version=6",Jq=1,j1=4,XK=8,b1=12,X7=15;class Xq{#Q;#$;#Y;#J=[];constructor($,Q){this.#Q=new DataView($.buffer,$.byteOffset,$.byteLength),this.#$=Q,this.#Y=$.byteLength}get offset(){return this.#$}get atFileEnd(){return this.#$>=this.#Y}#q(){return this.#J.length>0?this.#J[this.#J.length-1]:this.#Y}bytesRemaining(){return this.#q()-this.#$}u8(){let $=this.#Q.getUint8(this.#$);return this.#$+=1,$}u16(){let $=this.#Q.getUint16(this.#$,!0);return this.#$+=2,$}u32(){let $=this.#Q.getUint32(this.#$,!0);return this.#$+=4,$}f32(){let $=this.#Q.getFloat32(this.#$,!0);return this.#$+=4,$}f64(){let $=this.#Q.getFloat64(this.#$,!0);return this.#$+=8,$}varuint(){let $=0,Q=0,J;do J=this.u8(),$+=(J&127)*2**Q,Q+=7;while(J&128);return $}crdtId(){return{authorId:this.u8(),counter:this.varuint()}}bytes($){let Q=this.#Q.byteOffset+this.#$,J=new Uint8Array(this.#Q.buffer,Q,$);return this.#$+=$,J.slice()}peekTag(){if(this.#$>=this.#q())return;let $=this.#$,Q=this.varuint();return this.#$=$,[Math.floor(Q/16),Q%16]}hasTag($,Q){let J=this.peekTag();return J!==void 0&&J[0]===$&&J[1]===Q}#X($,Q){let J=this.varuint();if(Math.floor(J/16)!==$||J%16!==Q)throw Error(`unexpected v6 tag ${J} (wanted ${$}/${Q})`)}readInt($){return this.#X($,j1),this.u32()}readFloat($){return this.#X($,j1),this.f32()}readDouble($){return this.#X($,XK),this.f64()}readId($){return this.#X($,X7),this.crdtId()}readBool($){return this.#X($,Jq),this.u8()!==0}readByte($){return this.#X($,Jq),this.u8()}subblock($,Q){this.#X($,b1);let J=this.u32(),q=this.#$+J;this.#J.push(q);try{return Q()}finally{this.#J.pop(),this.#$=q}}seek($){this.#$=$}bounded($,Q){this.#J.push($);try{let J=Q();if(this.#$>$)throw Error("block body overran its declared length");return[J,this.bytes($-this.#$)]}finally{this.#J.pop(),this.#$=$}}readLww($,Q){return this.subblock($,()=>{let J=this.readId(1),q=Q();return{timestamp:J,value:q}})}readString($){return this.subblock($,()=>{let Q=this.varuint();return this.u8(),new TextDecoder().decode(this.bytes(Q))})}readStringWithFormat($){return this.subblock($,()=>{let Q=this.varuint();this.u8();let J=new TextDecoder().decode(this.bytes(Q));if(this.hasTag(2,j1))return this.readInt(2);else return J})}}function K8($,Q){let J=$.readId(1),q=$.readId(2),X=$.readId(3),Y=$.readId(4),B=$.readInt(5),U;if($.hasTag(6,b1))U=$.subblock(6,()=>{let W=$.u8();return Q(W)});return{parentId:J,item:{itemId:q,leftId:X,rightId:Y,deletedLength:B,value:U}}}function YK($,Q){let J=$.readInt(1),q=$.readInt(2),X=$.readDouble(3),Y=$.readFloat(4),B=$.subblock(5,()=>{let W=Q===1?24:14,G=$.bytesRemaining(),V=Math.floor(G/W),F=Array(V);for(let M=0;M<V;M++){let j=$.f32(),f=$.f32();if(Q===1)F[M]={x:j,y:f,speed:$.f32()*4,direction:$.f32()*255/(2*Math.PI),width:Math.round($.f32()*4),pressure:$.f32()*255};else{let T=$.u16(),D=$.u16(),P=$.u8(),K=$.u8();F[M]={x:j,y:f,speed:T,width:D,direction:P,pressure:K}}}return F}),U={tool:J,color:q,thicknessScale:X,startingLength:Y,points:B};if($.hasTag(6,X7))$.readId(6);if($.hasTag(7,X7))$.readId(7);if($.hasTag(8,j1))U.colorRgba=$.readInt(8);return U}function BK($){let Q=$.hasTag(2,j1)?$.readInt(2):void 0,J=$.hasTag(3,j1)?$.readInt(3):void 0,q=$.readInt(4),X=$.readString(5),Y=$.subblock(6,()=>{let U=$.varuint(),W=Array(U);for(let G=0;G<U;G++)W[G]={x:$.f64(),y:$.f64(),w:$.f64(),h:$.f64()};return W}),B={length:J??X.length,color:q,text:X,rectangles:Y};if(Q!==void 0)B.start=Q;if($.hasTag(10,j1))B.colorRgba=$.readInt(10);return B}function UK($){let Q=[],J=new Map;$.subblock(2,()=>{$.subblock(1,()=>{$.subblock(1,()=>{let B=$.varuint();for(let U=0;U<B;U++)Q.push($.subblock(0,()=>{let W=$.readId(2),G=$.readId(3),V=$.readId(4),F=$.readInt(5),M=$.hasTag(6,b1)?$.readStringWithFormat(6):"";return{itemId:W,leftId:G,rightId:V,deletedLength:F,value:M}}))})}),$.subblock(2,()=>{$.subblock(1,()=>{let B=$.varuint();for(let U=0;U<B;U++){let W=$.crdtId(),G=$.readId(1),V=$.subblock(2,()=>{return $.u8(),$.u8()});J.set(d0(W),{timestamp:G,value:V})}})})});let[q,X]=$.subblock(3,()=>[$.f64(),$.f64()]),Y=$.readFloat(4);return{items:Q,styles:J,posX:q,posY:X,width:Y}}function WK($,Q,J){switch(Q){case 0:return{type:"migrationInfo",migrationId:$.readId(1),isDevice:$.readBool(2)};case 1:return{type:"sceneTree",treeId:$.readId(1),nodeId:$.readId(2),isUpdate:$.readBool(3),parentId:$.subblock(4,()=>$.readId(1))};case 2:{let q=$.readId(1),X=$.readLww(2,()=>$.readString(2)),Y=$.readLww(3,()=>$.readBool(2)),B={type:"treeNode",nodeId:q,label:X,visible:Y};if($.bytesRemaining()>0&&$.hasTag(7,b1))B.anchorId=$.readLww(7,()=>$.readId(2)),B.anchorType=$.readLww(8,()=>$.readByte(2)),B.anchorThreshold=$.readLww(9,()=>$.readFloat(2)),B.anchorOriginX=$.readLww(10,()=>$.readFloat(2));return B}case 3:return{type:"sceneGlyphItem",...K8($,(q)=>q===1?BK($):void 0)};case 4:return{type:"sceneGroupItem",...K8($,(q)=>q===2?$.readId(2):void 0)};case 5:return{type:"sceneLineItem",...K8($,(q)=>q===3?YK($,J):void 0)};case 6:return{type:"sceneTextItem",...K8($,()=>{return})};case 7:return{type:"rootText",blockId:$.readId(1),text:UK($)};case 8:return{type:"sceneTombstone",...K8($,()=>{return})};case 9:{let q=new Map,X=$.varuint();for(let Y=0;Y<X;Y++)$.subblock(0,()=>{let B=$.varuint(),U=$.bytes(B),W=$.u16();q.set(W,GK(U))});return{type:"authorIds",authors:q}}case 10:return{type:"pageInfo",loadsCount:$.readInt(1),mergesCount:$.readInt(2),textCharsCount:$.readInt(3),textLinesCount:$.readInt(4),typeFolioUseCount:$.hasTag(5,j1)?$.readInt(5):0};case 13:{let q={type:"sceneInfo",currentLayer:$.readLww(1,()=>$.readId(2))};if($.hasTag(2,b1))q.backgroundVisible=$.readLww(2,()=>$.readBool(2));if($.hasTag(3,b1))q.rootDocumentVisible=$.readLww(3,()=>$.readBool(2));if($.hasTag(5,b1))q.paperSize=$.subblock(5,()=>[$.u32(),$.u32()]);return q}default:throw Error(`unknown v6 block type 0x${Q.toString(16)}`)}}function GK($){let Q=[...$],q=[Q[3],Q[2],Q[1],Q[0],Q[5],Q[4],Q[7],Q[6],Q[8],Q[9],Q[10],Q[11],Q[12],Q[13],Q[14],Q[15]].map((X)=>(X??0).toString(16).padStart(2,"0"));return`${q.slice(0,4).join("")}-${q.slice(4,6).join("")}-${q.slice(6,8).join("")}-${q.slice(8,10).join("")}-${q.slice(10,16).join("")}`}function VK($){let Q=new TextDecoder().decode($.subarray(0,Qq));if(!Q.startsWith(qK))throw Error(`not a version 6 .lines file: ${JSON.stringify(Q)}`);let J=new Xq($,Qq),q=[];while(!J.atFileEnd){if(J.bytesRemaining()<8)break;let X=J.u32();J.u8();let Y=J.u8(),B=J.u8(),U=J.u8(),W=J.offset,G=W+X,V;try{let[F,M]=J.bounded(G,()=>WK(J,U,B));V={...F,minVersion:Y,currentVersion:B,extraData:M}}catch{J.seek(W),V={type:"unknown",blockType:U,data:J.bytes(X),minVersion:Y,currentVersion:B,extraData:new Uint8Array}}J.seek(G),q.push(V)}return q}function KK($,Q){let[J,q]=$,[X,Y]=Q;return J-X||q-Y}function qq($){if($.length<=1)return[...$];let Q="\x00start",J="\x00end",q=new Set($.map((j)=>d0(j.itemId))),X=new Map([[Q,[]],[J,[]]]),Y=new Map([[Q,0],[J,0]]);for(let j of $)X.set(d0(j.itemId),[]),Y.set(d0(j.itemId),0);let B=(j,f)=>{let T=d0(j);return T===d0(Y7)||!q.has(T)?f:T},U=(j,f)=>{X.get(j).push(f),Y.set(f,(Y.get(f)??0)+1)};for(let j of $)U(B(j.leftId,Q),d0(j.itemId)),U(d0(j.itemId),B(j.rightId,J));let W=new Map($.map((j)=>[d0(j.itemId),j])),G=(j)=>{if(j===Q)return[-1/0,-1/0];if(j===J)return[1/0,1/0];let f=W.get(j);return[-f.itemId.authorId,f.itemId.counter]},V=new Set;for(let[j,f]of Y)if(f===0)V.add(j);let F=[],M=new Set;while(V.size>0){let j;for(let T of V)if(j===void 0||KK(G(T),G(j))<0)j=T;V.delete(j),M.add(j);let f=W.get(j);if(f)F.push(f);for(let T of X.get(j)??[])if(Y.set(T,Y.get(T)-1),Y.get(T)===0)V.add(T)}if(F.length<$.length){for(let j of $)if(!M.has(d0(j.itemId)))F.push(j)}return F}class Yq{version=6;blocks;authors;paperSize;#Q=new Map;#$;constructor($){this.blocks=$,this.authors=new Map;let Q=(J)=>{let q=this.#Q.get(d0(J));if(q===void 0)q={id:J,parentId:Y7,children:[]},this.#Q.set(d0(J),q);return q};Q(q7);for(let J of $)if(J.type==="sceneTree")Q(J.treeId).parentId=J.parentId;else if(J.type==="treeNode"){let q=Q(J.nodeId);q.label=J.label.value,q.visible=J.visible.value}else if(J.type==="sceneGroupItem"&&J.item.value)Q(J.parentId).children.push({...J.item,value:{kind:"group",id:J.item.value}});else if(J.type==="sceneLineItem"&&J.item.value)Q(J.parentId).children.push({...J.item,value:{kind:"line",line:J.item.value}});else if(J.type==="sceneGlyphItem"&&J.item.value)Q(J.parentId).children.push({...J.item,value:{kind:"glyph",glyph:J.item.value}});else if(J.type==="rootText")this.#$=J.text;else if(J.type==="authorIds")for(let[q,X]of J.authors)this.authors.set(q,X);else if(J.type==="sceneInfo"&&J.paperSize)this.paperSize=J.paperSize}#Y($){let Q=[];for(let q of qq($.children))if(q.value.kind==="group"){let X=this.#Q.get(d0(q.value.id));if(X)Q.push({kind:"layer",layer:this.#Y(X)})}else if(q.value.kind==="line")Q.push({kind:"line",line:q.value.line});else Q.push({kind:"glyph",glyph:q.value.glyph});let J={id:$.id,items:Q};if($.label!==void 0)J.label=$.label;if($.visible!==void 0)J.visible=$.visible;return J}layers(){let $=this.#Q.get(d0(q7));if($===void 0)return[];let Q=[];for(let J of qq($.children))if(J.value.kind==="group"){let q=this.#Q.get(d0(J.value.id));if(q)Q.push(this.#Y(q))}return Q}strokes(){let $=[],Q=(J)=>{for(let q of J.items)if(q.kind==="line")$.push(q.line);else if(q.kind==="layer")Q(q.layer)};for(let J of this.layers())Q(J);return $}text(){return this.#$}}function B7($){return new Yq(VK($))}function Bq($){let Q=$.reduce((X,Y)=>X+Y.length,0),J=new Uint8Array(Q),q=0;for(let X of $)J.set(X,q),q+=X.length;return J}var G5=/^[0-9a-f]{64}$/;function jK($){if($.length<K1)throw Error("data is too short to be a reMarkable .lines file");let Q=new TextDecoder().decode($.subarray(0,K1));if(!Q.startsWith(W5))throw Error(`unrecognized .lines header: ${JSON.stringify(Q)}`);let J=Q.charAt(W5.length);if(J==="6")return B7($);else if(J==="3"||J==="5")return eJ($,J==="3"?3:5);else throw Error(`unsupported .lines version '${J}'`)}var Gq=x.object({name:x.string(),timestamp:x.number()}).passthrough(),HK=x.object({name:x.string(),pageId:x.string(),timestamp:x.number()}).passthrough(),MK=x.object({authors:x.array(x.string()).optional(),title:x.string().optional(),publicationDate:x.string().optional(),publisher:x.string().optional()}).passthrough(),FK=x.object({id:x.string(),idx:x.object({timestamp:x.string(),value:x.string()}).passthrough(),template:x.object({timestamp:x.string(),value:x.string()}).passthrough().optional(),redir:x.object({timestamp:x.string(),value:x.number().int()}).passthrough().optional(),scrollTime:x.object({timestamp:x.string(),value:x.string().datetime({offset:!0})}).passthrough().optional(),verticalScroll:x.object({timestamp:x.string(),value:x.number()}).passthrough().optional(),deleted:x.object({timestamp:x.string(),value:x.number().int()}).passthrough().optional(),modifed:x.string().optional()}).passthrough(),wK=x.object({lastOpened:x.object({timestamp:x.string(),value:x.string()}).passthrough(),original:x.object({timestamp:x.string(),value:x.number().int()}).passthrough(),pages:x.array(FK),uuids:x.array(x.object({first:x.string(),second:x.number().int().nonnegative()}).passthrough()).nullable()}).passthrough(),LK=x.object({tags:x.array(Gq).optional()}).strict(),zK=x.object({tags:x.array(x.string()).optional()}).strict(),OK={coverPageNumber:x.number().int(),documentMetadata:MK,extraMetadata:x.record(x.string(),x.string()),fileType:x.enum(["epub","notebook","pdf"]),fontName:x.string(),lineHeight:x.number().int(),orientation:x.enum(["portrait","landscape"]),pageCount:x.number().int().nonnegative(),textAlignment:x.enum(["","justify","left"]),textScale:x.number()},NK={cPages:wK.optional(),customZoomCenterX:x.number().optional(),customZoomCenterY:x.number().optional(),customZoomOrientation:x.enum(["portrait","landscape"]).optional(),customZoomPageHeight:x.number().optional(),customZoomPageWidth:x.number().optional(),customZoomScale:x.number().optional(),dummyDocument:x.boolean().optional(),formatVersion:x.number().int().nonnegative().optional(),keyboardMetadata:x.object({count:x.number().int().nonnegative(),timestamp:x.number()}).passthrough().optional(),lastOpenedPage:x.number().int().optional(),margins:x.number().int().nonnegative().optional(),originalPageCount:x.number().int().optional(),pages:x.array(x.string()).nullable().optional(),pageTags:x.array(HK).optional(),redirectionPageMap:x.array(x.number().int()).optional(),sizeInBytes:x.string().optional(),transform:x.object({m11:x.number().optional(),m12:x.number().optional(),m13:x.number().optional(),m21:x.number().optional(),m22:x.number().optional(),m23:x.number().optional(),m31:x.number().optional(),m32:x.number().optional(),m33:x.number().optional()}).passthrough().optional(),viewBackgroundFilter:x.enum(["off","fullpage"]).optional(),zoomMode:x.enum(["bestFit","customFit","fitToHeight","fitToWidth"]).optional()},Vq=x.object({...OK,...NK}).passthrough(),DK=Vq.extend({tags:x.array(Gq).optional()}).passthrough(),PK=Vq.extend({tags:x.array(x.string()).optional()}).passthrough(),AK=x.object({id:x.string().optional(),name:x.string(),author:x.string(),iconData:x.string(),categories:x.array(x.string()),labels:x.array(x.string()).optional(),orientation:x.enum(["portrait","landscape"]),templateVersion:x.string(),supportedScreens:x.array(x.enum(["rm2","rmPP"])).optional(),constants:x.array(x.record(x.string(),x.union([x.number(),x.string()]))).optional(),items:x.array(x.unknown()),formatVersion:x.number().int().nonnegative().optional()}).passthrough(),CK=x.union([LK,zK,AK,DK,PK]),Kq=x.object({lastModified:x.string().optional(),parent:x.string(),pinned:x.boolean(),type:x.enum(["DocumentType","CollectionType","TemplateType"]),visibleName:x.string(),lastOpened:x.string().optional(),lastOpenedPage:x.number().int().optional(),createdTime:x.string().optional(),deleted:x.boolean().nullish(),metadatamodified:x.boolean().nullish(),modified:x.boolean().nullish(),synced:x.boolean().nullish(),version:x.number().int().nonnegative().optional(),new:x.boolean().optional(),source:x.string().optional()}).passthrough();function jq($){let Q=JSON.parse($);return Kq.parse(Q)}var RK=x.object({hash:x.string(),generation:x.number()}).passthrough(),IK=x.object({hash:x.string(),generation:x.number(),schemaVersion:x.number().int().nonnegative()}).passthrough(),SK=x.object({docID:x.string(),hash:x.string()}).passthrough();async function U7($){let Q=await crypto.subtle.digest("SHA-256",$);return new Uint8Array(Q).toHex()}function Uq($){let[Q,J,q,X,Y]=$.split(":");if(Q===void 0||J===void 0||q===void 0||X===void 0||Y===void 0)throw Error(`line '${$}' was not formatted correctly`);else if(J==="80000000"||J==="0")return{hash:Q,type:J==="0"?0:80000000,id:q,subfiles:parseInt(X,10),size:parseInt(Y,10)};else throw Error(`line '${$}' was not formatted correctly`)}class W7{#Q;#$;#Y;#J;constructor($,Q,J,q){this.#Q=$,this.#J=Q,this.#$=J,this.#Y=q}async getRootHash(){let Q=await(await this.#Q("GET",`${this.#$}/sync/v4/root`)).text(),J=JSON.parse(Q),{hash:q,generation:X,schemaVersion:Y}=IK.parse(J);if(Y!==3&&Y!==4)throw Error(`schema version ${Y} not supported`);else if(!Number.isSafeInteger(X))throw Error(`generation ${X} was not a safe integer; please file a bug report`);else return[q,X,Y]}async#q($,Q){if(!G5.test(Q))throw new z2(Q,G5,"hash was not a valid hash");let q=await(await this.#Q("GET",`${this.#$}/sync/v3/files/${Q}`,{headers:{"rm-filename":$}})).arrayBuffer();return new Uint8Array(q)}async getHash({id:$,hash:Q}){let J=this.#J.get(Q);if(J!=null)return new TextEncoder().encode(J);else{let q=await this.#q($,Q);if(this.#J.get(Q)===void 0)this.#J.set(Q,null);return q}}async getText({id:$,hash:Q}){let J=this.#J.get(Q);if(J!=null)return J;else{let q=await this.#q($,Q),Y=new TextDecoder().decode(q);return this.#J.set(Q,Y),Y}}async getEntries($){let Q=await this.getText($),[J,...q]=Q.slice(0,-1).split(`
4
4
  `);if(J==="3")return{entries:q.map(Uq)};else if(J==="4"){let[X,...Y]=q;if(!X)throw Error("missing info line for schema version 4");let[B,U,W,G]=X.split(":");if(B!=="0"||U===void 0||W===void 0||G===void 0)throw Error(`schema 4 info line '${X}' was not formatted correctly`);let V=Y.map(Uq);if(parseInt(W,10)!==V.length)throw Error(`schema 4 expected ${W} entries, but found ${V.length}`);else return{entries:V,id:U,size:parseInt(G,10)}}else throw Error(`schema version ${J} not supported`)}async getContent($){let Q=await this.getText($),J=JSON.parse(Q);return CK.parse(J)}async getMetadata($){let Q=await this.getText($),J=JSON.parse(Q);return Kq.parse(J)}async getRm($){let Q=await this.getHash($);return jK(Q)}async putRm($,Q){if(!$.endsWith(".rm"))throw Error(`fileName ${$} did not end with '.rm'`);else return await this.putFile($,$q(Q))}async putRootHash($,Q,J=!0){if(!Number.isSafeInteger(Q))throw Error(`generation ${Q} was not a safe integer`);else if(!G5.test($))throw new z2($,G5,"rootHash was not a valid hash");let q=JSON.stringify({hash:$,generation:Q,broadcast:J}),Y=await(await this.#Q("PUT",`${this.#$}/sync/v3/root`,{body:q})).text(),B=JSON.parse(Y),{hash:U,generation:W}=RK.parse(B);if(Number.isSafeInteger(W))return[U,W];else throw Error(`new generation ${W} was not a safe integer; please file a bug report`)}async#X($,Q,J){if(!this.#J.has(Q)){let q=Wq.default.buf(J,0),X=new ArrayBuffer(4);new DataView(X).setInt32(0,q,!1);let Y=new Uint8Array(X).toBase64();if(await this.#Q("PUT",`${this.#$}/sync/v3/files/${Q}`,{body:J,headers:{"rm-filename":$,"x-goog-hash":`crc32c=${Y}`}}),this.#J.get(Q)===void 0)this.#J.set(Q,null)}}async putFile($,Q){let J=await U7(Q);return[{id:$,hash:J,type:0,subfiles:0,size:Q.length},this.#X($,J,Q)]}async putText($,Q){let q=new TextEncoder().encode(Q),[X,Y]=await this.putFile($,q);return[X,Y.then(()=>{this.#J.set(X.hash,Q)})]}async putContent($,Q){if(!$.endsWith(".content"))throw Error(`fileName ${$} did not end with '.content'`);else return await this.putText($,JSON.stringify(Q))}async putMetadata($,Q){if(!$.endsWith(".metadata"))throw Error(`fileName ${$} did not end with '.metadata'`);else return await this.putText($,JSON.stringify(Q))}async putEntries($,Q,J){if($==="root"&&J===3)console.warn('writing a schema 3 root index, which reMarkable rejects with a 400 "Software must be updated" error; write the root index with schema version 4 instead');let q=[...Q].sort((V,F)=>V.id.localeCompare(F.id)),X=q.reduce((V,F)=>V+F.size,0),Y=[`${J}
5
5
  `];if(J===4){let V=$==="root"?".":$;Y.push(`0:${V}:${q.length}:${X}
6
6
  `)}for(let{hash:V,type:F,id:M,subfiles:j,size:f}of q){let T=J===4?0:F;Y.push(`${V}:${T}:${M}:${j}:${f}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rmapi-js",
3
- "version": "12.0.1",
3
+ "version": "12.0.2",
4
4
  "description": "JavaScript implementation of the reMarkable 1.5 api",
5
5
  "repository": {
6
6
  "type": "git",