diff --git a/assets/index-TqOU2Jix.js b/assets/index-TqOU2Jix.js index 700bc315..f3102935 100644 --- a/assets/index-TqOU2Jix.js +++ b/assets/index-TqOU2Jix.js @@ -1,3 +1,9 @@ +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = ["assets/ErrorBoundary-yu0qUJaQ.js","assets/Heading-_jh2ySxd.js","assets/text-D2kQ4ZI3.js","assets/useSetDocumentTitle-YCSksqpO.js","assets/Close-zRrhDe2z.js","assets/Home-Aqrob_Ko.js","assets/CardHeader-gkWy2wCO.js","assets/NotFound-VASMw1ud.js","assets/Room-pf_Wstb-.js"] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} function Gm(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Km(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var qm={exports:{}},al={},Ym={exports:{}},xe={};/** * @license React * react.production.min.js @@ -216,9 +222,3 @@ Error generating stack: `+i.message+` `)}}a.exports=v},66:(a,u)=>{u.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},u.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36,SET:258},u.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},u.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},u.SYMS={NULL:Symbol.for("github.com/hildjj/node-cbor/null"),UNDEFINED:Symbol.for("github.com/hildjj/node-cbor/undef"),PARENT:Symbol.for("github.com/hildjj/node-cbor/parent"),BREAK:Symbol.for("github.com/hildjj/node-cbor/break"),STREAM:Symbol.for("github.com/hildjj/node-cbor/stream")},u.SHIFT32=4294967296,u.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(u.SHIFT32)}},774:(a,u,l)=>{const d=l(71),h=l(785),s=l(32),f=l(873),p=l(202),c=(l(830),l(66)),{MT:y,NUMBYTES:b,SYMS:m,BI:v}=c,{Buffer:g}=l(764),S=Symbol("count"),x=Symbol("major type"),w=Symbol("error"),T=Symbol("not found");function R(J,F,H){const q=[];return q[S]=H,q[m.PARENT]=J,q[x]=F,q}function O(J,F){const H=new p;return H[S]=-1,H[m.PARENT]=J,H[x]=F,H}class B extends Error{constructor(F,H){super(`Unexpected data: 0x${F.toString(16)}`),this.name="UnexpectedDataError",this.byte=F,this.value=H}}function $(J,F){switch(typeof J){case"function":return{options:{},cb:J};case"string":return{options:{encoding:J},cb:F};case"object":return{options:J||{},cb:F};default:throw new TypeError("Unknown option type")}}class z extends d{constructor(F={}){const{tags:H={},max_depth:q=-1,preferWeb:ae=!1,required:V=!1,encoding:G="hex",extendedResults:te=!1,preventDuplicateKeys:A=!1,...C}=F;super({defaultEncoding:G,...C}),this.running=!0,this.max_depth=q,this.tags=H,this.preferWeb=ae,this.extendedResults=te,this.required=V,this.preventDuplicateKeys=A,te&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new p)}static nullcheck(F){switch(F){case m.NULL:return null;case m.UNDEFINED:return;case T:throw new Error("Value not found");default:return F}}static decodeFirstSync(F,H={}){if(F==null)throw new TypeError("input required");({options:H}=$(H));const{encoding:q="hex",...ae}=H,V=new z(ae),G=f.guessEncoding(F,q),te=V._parse();let A=te.next();for(;!A.done;){const D=G.read(A.value);if(D==null||D.length!==A.value)throw new Error("Insufficient data");V.extendedResults&&V.valueBytes.write(D),A=te.next(D)}let C=null;if(V.extendedResults)C=A.value,C.unused=G.read();else if(C=z.nullcheck(A.value),G.length>0){const D=G.read(1);throw G.unshift(D),new B(D[0],C)}return C}static decodeAllSync(F,H={}){if(F==null)throw new TypeError("input required");({options:H}=$(H));const{encoding:q="hex",...ae}=H,V=new z(ae),G=f.guessEncoding(F,q),te=[];for(;G.length>0;){const A=V._parse();let C=A.next();for(;!C.done;){const D=G.read(C.value);if(D==null||D.length!==C.value)throw new Error("Insufficient data");V.extendedResults&&V.valueBytes.write(D),C=A.next(D)}te.push(z.nullcheck(C.value))}return te}static decodeFirst(F,H={},q=null){if(F==null)throw new TypeError("input required");({options:H,cb:q}=$(H,q));const{encoding:ae="hex",required:V=!1,...G}=H,te=new z(G);let A=T;const C=f.guessEncoding(F,ae),D=new Promise((K,X)=>{te.on("data",ne=>{A=z.nullcheck(ne),te.close()}),te.once("error",ne=>te.extendedResults&&ne instanceof B?(A.unused=te.bs.slice(),K(A)):(A!==T&&(ne.value=A),A=w,te.close(),X(ne))),te.once("end",()=>{switch(A){case T:return V?X(new Error("No CBOR found")):K(A);case w:return;default:return K(A)}})});return typeof q=="function"&&D.then(K=>q(null,K),q),C.pipe(te),D}static decodeAll(F,H={},q=null){if(F==null)throw new TypeError("input required");({options:H,cb:q}=$(H,q));const{encoding:ae="hex",...V}=H,G=new z(V),te=[];G.on("data",C=>te.push(z.nullcheck(C)));const A=new Promise((C,D)=>{G.on("error",D),G.on("end",()=>C(te))});return typeof q=="function"&&A.then(C=>q(void 0,C),C=>q(C,void 0)),f.guessEncoding(F,ae).pipe(G),A}close(){this.running=!1,this.__fresh=!0}_onRead(F){this.valueBytes.write(F)}*_parse(){let F=null,H=0,q=null;for(;;){if(this.max_depth>=0&&H>this.max_depth)throw new Error(`Maximum depth ${this.max_depth} exceeded`);const[ae]=yield 1;if(!this.running)throw this.bs.unshift(g.from([ae])),new B(ae);const V=ae>>5,G=31&ae,te=F==null?void 0:F[x],A=F==null?void 0:F.length;switch(G){case b.ONE:this.emit("more-bytes",V,1,te,A),[q]=yield 1;break;case b.TWO:case b.FOUR:case b.EIGHT:{const D=1<{const d=l(830),h=l(774),s=l(873),f=l(202),{MT:p,SYMS:c}=l(66);class y extends d.Transform{constructor(m={}){const{separator:v=` `,stream_errors:g=!1,tags:S,max_depth:x,preferWeb:w,encoding:T,...R}=m;super({...R,readableObjectMode:!1,writableObjectMode:!1}),this.float_bytes=-1,this.separator=v,this.stream_errors=g,this.parser=new h({tags:S,max_depth:x,preferWeb:w,encoding:T}),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("data",this._on_data.bind(this)),this.parser.on("error",this._on_error.bind(this))}_transform(m,v,g){return this.parser.write(m,v,g)}_flush(m){return this.parser._flush(v=>this.stream_errors?(v&&this._on_error(v),m()):m(v))}static diagnose(m,v={},g=null){if(m==null)throw new TypeError("input required");({options:v,cb:g}=function(O,B){switch(typeof O){case"function":return{options:{},cb:O};case"string":return{options:{encoding:O},cb:B};case"object":return{options:O||{},cb:B};default:throw new TypeError("Unknown option type")}}(v,g));const{encoding:S="hex",...x}=v,w=new f,T=new y(x);let R=null;return typeof g=="function"?(T.on("end",()=>g(null,w.toString("utf8"))),T.on("error",g)):R=new Promise((O,B)=>{T.on("end",()=>O(w.toString("utf8"))),T.on("error",B)}),T.pipe(w),s.guessEncoding(m,S).pipe(T),R}_on_error(m){this.stream_errors?this.push(m.toString()):this.emit("error",m)}_on_more(m,v,g,S){m===p.SIMPLE_FLOAT&&(this.float_bytes={2:1,4:2,8:3}[v])}_fore(m,v){switch(m){case p.BYTE_STRING:case p.UTF8_STRING:case p.ARRAY:v>0&&this.push(", ");break;case p.MAP:v>0&&(v%2?this.push(": "):this.push(", "))}}_on_value(m,v,g){if(m===c.BREAK)return;this._fore(v,g);const S=this.float_bytes;this.float_bytes=-1,this.push(s.cborValueToString(m,S))}_on_start(m,v,g,S){switch(this._fore(g,S),m){case p.TAG:this.push(`${v}(`);break;case p.ARRAY:this.push("[");break;case p.MAP:this.push("{");break;case p.BYTE_STRING:case p.UTF8_STRING:this.push("(")}v===c.STREAM&&this.push("_ ")}_on_stop(m){switch(m){case p.TAG:this.push(")");break;case p.ARRAY:this.push("]");break;case p.MAP:this.push("}");break;case p.BYTE_STRING:case p.UTF8_STRING:this.push(")")}}_on_data(){this.push(this.separator)}}a.exports=y},666:(a,u,l)=>{const d=l(830),h=l(202),s=l(873),f=l(66),{MT:p,NUMBYTES:c,SHIFT32:y,SIMPLE:b,SYMS:m,TAG:v,BI:g}=f,{Buffer:S}=l(764),x=p.SIMPLE_FLOAT<<5|c.TWO,w=p.SIMPLE_FLOAT<<5|c.FOUR,T=p.SIMPLE_FLOAT<<5|c.EIGHT,R=p.SIMPLE_FLOAT<<5|b.TRUE,O=p.SIMPLE_FLOAT<<5|b.FALSE,B=p.SIMPLE_FLOAT<<5|b.UNDEFINED,$=p.SIMPLE_FLOAT<<5|b.NULL,z=S.from([255]),J=S.from("f97e00","hex"),F=S.from("f9fc00","hex"),H=S.from("f97c00","hex"),q=S.from("f98000","hex"),ae={};let V={};class G extends d.Transform{constructor(A={}){const{canonical:C=!1,encodeUndefined:D,disallowUndefinedKeys:K=!1,dateType:X="number",collapseBigIntegers:ne=!1,detectLoops:ie=!1,omitUndefinedProperties:he=!1,genTypes:ce=[],...be}=A;if(super({...be,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=C,this.encodeUndefined=D,this.disallowUndefinedKeys=K,this.dateType=function(me){if(!me)return"number";switch(me.toLowerCase()){case"number":return"number";case"float":return"float";case"int":case"integer":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${me}"`)}(X),this.collapseBigIntegers=!!this.canonical||ne,this.detectLoops=void 0,typeof ie=="boolean")ie&&(this.detectLoops=new WeakSet);else{if(!(ie instanceof WeakSet))throw new TypeError("detectLoops must be boolean or WeakSet");this.detectLoops=ie}if(this.omitUndefinedProperties=he,this.semanticTypes={...G.SEMANTIC_TYPES},Array.isArray(ce))for(let me=0,I=ce.length;me{const ie=typeof A[ne];return ie!=="function"&&(!this.omitUndefinedProperties||ie!=="undefined")}),K={};if(this.canonical&&D.sort((ne,ie)=>{const he=K[ne]||(K[ne]=G.encode(ne)),ce=K[ie]||(K[ie]=G.encode(ie));return he.compare(ce)}),C.indefinite){if(!this._pushUInt8(p.MAP<<5|c.INDEFINITE))return!1}else if(!this._pushInt(D.length,p.MAP))return!1;let X=null;for(let ne=0,ie=D.length;nene!==void 0)),D.indefinite){if(!A._pushUInt8(p.MAP<<5|c.INDEFINITE))return!1}else if(!A._pushInt(K.length,p.MAP))return!1;if(A.canonical){const X=new G({genTypes:A.semanticTypes,canonical:A.canonical,detectLoops:!!A.detectLoops,dateType:A.dateType,disallowUndefinedKeys:A.disallowUndefinedKeys,collapseBigIntegers:A.collapseBigIntegers}),ne=new h({highWaterMark:A.readableHighWaterMark});X.pipe(ne),K.sort(([ie],[he])=>{X.pushAny(ie);const ce=ne.read();X.pushAny(he);const be=ne.read();return ce.compare(be)});for(const[ie,he]of K){if(A.disallowUndefinedKeys&&ie===void 0)throw new Error("Invalid Map key: undefined");if(!A.pushAny(ie)||!A.pushAny(he))return!1}}else for(const[X,ne]of K){if(A.disallowUndefinedKeys&&X===void 0)throw new Error("Invalid Map key: undefined");if(!A.pushAny(X)||!A.pushAny(ne))return!1}return!(D.indefinite&&!A.push(z))}static _pushTypedArray(A,C){let D=64,K=C.BYTES_PER_ELEMENT;const{name:X}=C.constructor;return X.startsWith("Float")?(D|=16,K/=2):X.includes("U")||(D|=8),(X.includes("Clamped")||K!==1&&!s.isBigEndian())&&(D|=4),D|={1:0,2:1,4:2,8:3}[K],!!A._pushTag(D)&&G._pushBuffer(A,S.from(C.buffer,C.byteOffset,C.byteLength))}static _pushArrayBuffer(A,C){return G._pushBuffer(A,S.from(C))}static encodeIndefinite(A,C,D={}){if(C==null){if(this==null)throw new Error("No object to encode");C=this}const{chunkSize:K=4096}=D;let X=!0;const ne=typeof C;let ie=null;if(ne==="string"){X=X&&A._pushUInt8(p.UTF8_STRING<<5|c.INDEFINITE);let he=0;for(;he{const X=[],ne=new G(C);ne.on("data",ie=>X.push(ie)),ne.on("error",K),ne.on("finish",()=>D(S.concat(X))),ne.pushAny(A),ne.end()})}static get SEMANTIC_TYPES(){return V}static set SEMANTIC_TYPES(A){V=A}static reset(){G.SEMANTIC_TYPES={...ae}}}Object.assign(ae,{Array:G.pushArray,Date:G._pushDate,Buffer:G._pushBuffer,[S.name]:G._pushBuffer,Map:G._pushMap,NoFilter:G._pushNoFilter,[h.name]:G._pushNoFilter,RegExp:G._pushRegexp,Set:G._pushSet,ArrayBuffer:G._pushArrayBuffer,Uint8ClampedArray:G._pushTypedArray,Uint8Array:G._pushTypedArray,Uint16Array:G._pushTypedArray,Uint32Array:G._pushTypedArray,Int8Array:G._pushTypedArray,Int16Array:G._pushTypedArray,Int32Array:G._pushTypedArray,Float32Array:G._pushTypedArray,Float64Array:G._pushTypedArray,URL:G._pushURL,Boolean:G._pushBoxed,Number:G._pushBoxed,String:G._pushBoxed}),typeof BigUint64Array<"u"&&(ae[BigUint64Array.name]=G._pushTypedArray),typeof BigInt64Array<"u"&&(ae[BigInt64Array.name]=G._pushTypedArray),G.reset(),a.exports=G},70:(a,u,l)=>{const{Buffer:d}=l(764),h=l(666),s=l(774),{MT:f}=l(66);class p extends Map{constructor(y){super(y)}static _encode(y){return h.encodeCanonical(y).toString("base64")}static _decode(y){return s.decodeFirstSync(y,"base64")}get(y){return super.get(p._encode(y))}set(y,b){return super.set(p._encode(y),b)}delete(y){return super.delete(p._encode(y))}has(y){return super.has(p._encode(y))}*keys(){for(const y of super.keys())yield p._decode(y)}*entries(){for(const y of super.entries())yield[p._decode(y[0]),y[1]]}[Symbol.iterator](){return this.entries()}forEach(y,b){if(typeof y!="function")throw new TypeError("Must be function");for(const m of super.entries())y.call(this,m[1],p._decode(m[0]),this)}encodeCBOR(y){if(!y._pushInt(this.size,f.MAP))return!1;if(y.canonical){const b=Array.from(super.entries()).map(m=>[d.from(m[0],"base64"),m[1]]);b.sort((m,v)=>m[0].compare(v[0]));for(const m of b)if(!y.push(m[0])||!y.pushAny(m[1]))return!1}else for(const b of super.entries())if(!y.push(d.from(b[0],"base64"))||!y.pushAny(b[1]))return!1;return!0}}a.exports=p},32:(a,u,l)=>{const{MT:d,SIMPLE:h,SYMS:s}=l(66);class f{constructor(c){if(typeof c!="number")throw new Error("Invalid Simple type: "+typeof c);if(c<0||c>255||(0|c)!==c)throw new Error(`value must be a small positive integer: ${c}`);this.value=c}toString(){return`simple(${this.value})`}[Symbol.for("nodejs.util.inspect.custom")](c,y){return`simple(${this.value})`}encodeCBOR(c){return c._pushInt(this.value,d.SIMPLE_FLOAT)}static isSimple(c){return c instanceof f}static decode(c,y=!0,b=!1){switch(c){case h.FALSE:return!1;case h.TRUE:return!0;case h.NULL:return y?null:s.NULL;case h.UNDEFINED:return y?void 0:s.UNDEFINED;case-1:if(!y||!b)throw new Error("Invalid BREAK");return s.BREAK;default:return new f(c)}}}a.exports=f},785:(a,u,l)=>{const d=l(66),h=l(873),s=Symbol("INTERNAL_JSON");function f(x,w){if(h.isBufferish(x))x.toJSON=w;else if(Array.isArray(x))for(const T of x)f(T,w);else if(x&&typeof x=="object"&&(!(x instanceof S)||x.tag<21||x.tag>23))for(const T of Object.values(x))f(T,w)}function p(){return h.base64(this)}function c(){return h.base64url(this)}function y(){return this.toString("hex")}const b={0:x=>new Date(x),1:x=>new Date(1e3*x),2:x=>h.bufferToBigInt(x),3:x=>d.BI.MINUS_ONE-h.bufferToBigInt(x),21:(x,w)=>(h.isBufferish(x)?w[s]=c:f(x,c),w),22:(x,w)=>(h.isBufferish(x)?w[s]=p:f(x,p),w),23:(x,w)=>(h.isBufferish(x)?w[s]=y:f(x,y),w),32:x=>new URL(x),33:(x,w)=>{if(!x.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const T=x.length%4;if(T===1)throw new Error("Invalid base64url length");if(T===2){if("AQgw".indexOf(x[x.length-1])===-1)throw new Error("Invalid base64 padding")}else if(T===3&&"AEIMQUYcgkosw048".indexOf(x[x.length-1])===-1)throw new Error("Invalid base64 padding");return w},34:(x,w)=>{const T=x.match(/^[a-zA-Z0-9+/]+(?={0,2})$/);if(!T)throw new Error("Invalid base64 characters");if(x.length%4!=0)throw new Error("Invalid base64 length");if(T.groups.padding==="="){if("AQgw".indexOf(x[x.length-2])===-1)throw new Error("Invalid base64 padding")}else if(T.groups.padding==="=="&&"AEIMQUYcgkosw048".indexOf(x[x.length-3])===-1)throw new Error("Invalid base64 padding");return w},35:x=>new RegExp(x),258:x=>new Set(x)},m={64:Uint8Array,65:Uint16Array,66:Uint32Array,68:Uint8ClampedArray,69:Uint16Array,70:Uint32Array,72:Int8Array,73:Int16Array,74:Int32Array,77:Int16Array,78:Int32Array,81:Float32Array,82:Float64Array,85:Float32Array,86:Float64Array};function v(x,w){if(!h.isBufferish(x))throw new TypeError("val not a buffer");const{tag:T}=w,R=m[T];if(!R)throw new Error(`Invalid typed array tag: ${T}`);const O=2**(((16&T)>>4)+(3&T));return!(4&T)!==h.isBigEndian()&&O>1&&function(B,$,z,J){const F=new DataView(B),[H,q]={2:[F.getUint16,F.setUint16],4:[F.getUint32,F.setUint32],8:[F.getBigUint64,F.setBigUint64]}[$],ae=z+J;for(let V=z;V0?this.err=R.message:this.err=R,this}}static get TAGS(){return g}static set TAGS(w){g=w}static reset(){S.TAGS={...b}}}S.INTERNAL_JSON=s,S.reset(),a.exports=S},873:(a,u,l)=>{const{Buffer:d}=l(764),h=l(202),s=l(830),f=l(66),{NUMBYTES:p,SHIFT32:c,BI:y,SYMS:b}=f,m=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});u.utf8=g=>m.decode(g),u.utf8.checksUTF8=!0,u.isBufferish=function(g){return g&&typeof g=="object"&&(d.isBuffer(g)||g instanceof Uint8Array||g instanceof Uint8ClampedArray||g instanceof ArrayBuffer||g instanceof DataView)},u.bufferishToBuffer=function(g){return d.isBuffer(g)?g:ArrayBuffer.isView(g)?d.from(g.buffer,g.byteOffset,g.byteLength):g instanceof ArrayBuffer?d.from(g):null},u.parseCBORint=function(g,S){switch(g){case p.ONE:return S.readUInt8(0);case p.TWO:return S.readUInt16BE(0);case p.FOUR:return S.readUInt32BE(0);case p.EIGHT:{const x=S.readUInt32BE(0),w=S.readUInt32BE(4);return x>2097151?BigInt(x)*y.SHIFT32+BigInt(w):x*c+w}default:throw new Error(`Invalid additional info for int: ${g}`)}},u.writeHalf=function(g,S){const x=d.allocUnsafe(4);x.writeFloatBE(S,0);const w=x.readUInt32BE(0);if(8191&w)return!1;let T=w>>16&32768;const R=w>>23&255,O=8388607&w;if(R>=113&&R<=142)T+=(R-112<<10)+(O>>13);else{if(!(R>=103&&R<113)||O&(1<<126-R)-1)return!1;T+=O+8388608>>126-R}return g.writeUInt16BE(T),!0},u.parseHalf=function(g){const S=128&g[0]?-1:1,x=(124&g[0])>>2,w=(3&g[0])<<8|g[1];return x?x===31?S*(w?NaN:1/0):S*2**(x-25)*(1024+w):5960464477539063e-23*S*w},u.parseCBORfloat=function(g){switch(g.length){case 2:return u.parseHalf(g);case 4:return g.readFloatBE(0);case 8:return g.readDoubleBE(0);default:throw new Error(`Invalid float size: ${g.length}`)}},u.hex=function(g){return d.from(g.replace(/^0x/,""),"hex")},u.bin=function(g){let S=0,x=(g=g.replace(/\s/g,"")).length%8||8;const w=[];for(;x<=g.length;)w.push(parseInt(g.slice(S,x),2)),S=x,x+=8;return d.from(w)},u.arrayEqual=function(g,S){return g==null&&S==null||g!=null&&S!=null&&g.length===S.length&&g.every((x,w)=>x===S[w])},u.bufferToBigInt=function(g){return BigInt(`0x${g.toString("hex")}`)},u.cborValueToString=function(g,S=-1){switch(typeof g){case"symbol":{switch(g){case b.NULL:return"null";case b.UNDEFINED:return"undefined";case b.BREAK:return"BREAK"}if(g.description)return g.description;const x=g.toString().match(/^Symbol\((?.*)\)/);return x&&x.groups.name?x.groups.name:"Symbol"}case"string":return JSON.stringify(g);case"bigint":return g.toString();case"number":{const x=Object.is(g,-0)?"-0":String(g);return S>0?`${x}_${S}`:x}case"object":{const x=u.bufferishToBuffer(g);if(x){const w=x.toString("hex");return S===-1/0?w:`h'${w}'`}return typeof g[Symbol.for("nodejs.util.inspect.custom")]=="function"?g[Symbol.for("nodejs.util.inspect.custom")]():Array.isArray(g)?"[]":"{}"}}return String(g)},u.guessEncoding=function(g,S){if(typeof g=="string")return new h(g,S??"hex");const x=u.bufferishToBuffer(g);if(x)return new h(x);if((w=g)instanceof s.Readable||["read","on","pipe"].every(T=>typeof w[T]=="function"))return g;var w;throw new Error("Unknown input type")};const v={"=":"","+":"-","/":"_"};u.base64url=function(g){return u.bufferishToBuffer(g).toString("base64").replace(/[=+/]/g,S=>v[S])},u.base64=function(g){return u.bufferishToBuffer(g).toString("base64")},u.isBigEndian=function(){const g=new Uint8Array(4);return!((new Uint32Array(g.buffer)[0]=1)&g[0])}},202:(a,u,l)=>{const d=l(830),{Buffer:h}=l(764),s=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class f extends d.Transform{constructor(c,y,b={}){let m=null,v=null;switch(typeof c){case"object":h.isBuffer(c)?m=c:c&&(b=c);break;case"string":m=c;break;case"undefined":break;default:throw new TypeError("Invalid input")}switch(typeof y){case"object":y&&(b=y);break;case"string":v=y;break;case"undefined":break;default:throw new TypeError("Invalid inputEncoding")}if(!b||typeof b!="object")throw new TypeError("Invalid options");m==null&&(m=b.input),v==null&&(v=b.inputEncoding),delete b.input,delete b.inputEncoding;const g=b.watchPipe==null||b.watchPipe;delete b.watchPipe;const S=!!b.readError;delete b.readError,super(b),this.readError=S,g&&this.on("pipe",x=>{const w=x._readableState.objectMode;if(this.length>0&&w!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");this._readableState.objectMode=w,this._writableState.objectMode=w}),m!=null&&this.end(m,v)}static isNoFilter(c){return c instanceof this}static compare(c,y){if(!(c instanceof this))throw new TypeError("Arguments must be NoFilters");return c===y?0:c.compare(y)}static concat(c,y){if(!Array.isArray(c))throw new TypeError("list argument must be an Array of NoFilters");if(c.length===0||y===0)return h.alloc(0);y==null&&(y=c.reduce((g,S)=>{if(!(S instanceof f))throw new TypeError("list argument must be an Array of NoFilters");return g+S.length},0));let b=!0,m=!0;const v=c.map(g=>{if(!(g instanceof f))throw new TypeError("list argument must be an Array of NoFilters");const S=g.slice();return h.isBuffer(S)?m=!1:b=!1,S});if(b)return h.concat(v,y);if(m)return[].concat(...v).slice(0,y);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(c,y,b){this._readableState.objectMode||h.isBuffer(c)||(c=h.from(c,y)),this.push(c),b()}_bufArray(){let c=this._readableState.buffer;if(!Array.isArray(c)){let y=c.head;for(c=[];y!=null;)c.push(y.data),y=y.next}return c}read(c){const y=super.read(c);if(y!=null){if(this.emit("read",y),this.readError&&y.length{this.length>=c?v(this.read(c)):this.writableFinished?g(new Error(`Stream finished before ${c} bytes were available`)):(y=S=>{this.length>=c&&v(this.read(c))},b=()=>{g(new Error(`Stream finished before ${c} bytes were available`))},m=g,this.on("readable",y),this.on("error",m),this.on("finish",b))}).finally(()=>{y&&(this.removeListener("readable",y),this.removeListener("error",m),this.removeListener("finish",b))})}promise(c){let y=!1;return new Promise((b,m)=>{this.on("finish",()=>{const v=this.read();c==null||y||(y=!0,c(null,v)),b(v)}),this.on("error",v=>{c==null||y||(y=!0,c(v)),m(v)})})}compare(c){if(!(c instanceof f))throw new TypeError("Arguments must be NoFilters");if(this===c)return 0;const y=this.slice(),b=c.slice();if(h.isBuffer(y)&&h.isBuffer(b))return y.compare(b);throw new Error("Cannot compare streams in object mode")}equals(c){return this.compare(c)===0}slice(c,y){if(this._readableState.objectMode)return this._bufArray().slice(c,y);const b=this._bufArray();switch(b.length){case 0:return h.alloc(0);case 1:return b[0].slice(c,y);default:return h.concat(b).slice(c,y)}}get(c){return this.slice()[c]}toJSON(){const c=this.slice();return h.isBuffer(c)?c.toJSON():c}toString(c,y,b){const m=this.slice(y,b);return h.isBuffer(m)?c&&c!=="utf8"?m.toString(c):s.decode(m):JSON.stringify(m)}[Symbol.for("nodejs.util.inspect.custom")](c,y){const b=this._bufArray().map(m=>h.isBuffer(m)?y.stylize(m.toString("hex"),"string"):JSON.stringify(m)).join(", ");return`${this.constructor.name} [${b}]`}get length(){return this._readableState.length}writeBigInt(c){let y=c.toString(16);if(c<0){const b=BigInt(Math.floor(y.length/2));y=(c=(BigInt(1)<{const d=l(830),h=l(202);class s extends d.Transform{constructor(p){super(p),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new h,this.__restart()}_transform(p,c,y){for(this.bs.write(p);this.bs.length>=this.__needed;){let b=null;const m=this.__needed===null?void 0:this.bs.read(this.__needed);try{b=this.__parser.next(m)}catch(v){return y(v)}this.__needed&&(this.__fresh=!1),b.done?(this.push(b.value),this.__restart()):this.__needed=b.value||1/0}return y()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(p){p(this.__fresh?null:new Error("unexpected end of input"))}}a.exports=s},187:a=>{var u,l=typeof Reflect=="object"?Reflect:null,d=l&&typeof l.apply=="function"?l.apply:function(w,T,R){return Function.prototype.apply.call(w,T,R)};u=l&&typeof l.ownKeys=="function"?l.ownKeys:Object.getOwnPropertySymbols?function(w){return Object.getOwnPropertyNames(w).concat(Object.getOwnPropertySymbols(w))}:function(w){return Object.getOwnPropertyNames(w)};var h=Number.isNaN||function(w){return w!=w};function s(){s.init.call(this)}a.exports=s,a.exports.once=function(w,T){return new Promise(function(R,O){function B(z){w.removeListener(T,$),O(z)}function $(){typeof w.removeListener=="function"&&w.removeListener("error",B),R([].slice.call(arguments))}x(w,T,$,{once:!0}),T!=="error"&&function(z,J,F){typeof z.on=="function"&&x(z,"error",J,{once:!0})}(w,B)})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var f=10;function p(w){if(typeof w!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof w)}function c(w){return w._maxListeners===void 0?s.defaultMaxListeners:w._maxListeners}function y(w,T,R,O){var B,$,z,J;if(p(R),($=w._events)===void 0?($=w._events=Object.create(null),w._eventsCount=0):($.newListener!==void 0&&(w.emit("newListener",T,R.listener?R.listener:R),$=w._events),z=$[T]),z===void 0)z=$[T]=R,++w._eventsCount;else if(typeof z=="function"?z=$[T]=O?[R,z]:[z,R]:O?z.unshift(R):z.push(R),(B=c(w))>0&&z.length>B&&!z.warned){z.warned=!0;var F=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(T)+" listeners added. Use emitter.setMaxListeners() to increase limit");F.name="MaxListenersExceededWarning",F.emitter=w,F.type=T,F.count=z.length,J=F,console&&console.warn&&console.warn(J)}return w}function b(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(w,T,R){var O={fired:!1,wrapFn:void 0,target:w,type:T,listener:R},B=b.bind(O);return B.listener=R,O.wrapFn=B,B}function v(w,T,R){var O=w._events;if(O===void 0)return[];var B=O[T];return B===void 0?[]:typeof B=="function"?R?[B.listener||B]:[B]:R?function($){for(var z=new Array($.length),J=0;J0&&($=T[0]),$ instanceof Error)throw $;var z=new Error("Unhandled error."+($?" ("+$.message+")":""));throw z.context=$,z}var J=B[w];if(J===void 0)return!1;if(typeof J=="function")d(J,this,T);else{var F=J.length,H=S(J,F);for(R=0;R=0;$--)if(R[$]===T||R[$].listener===T){z=R[$].listener,B=$;break}if(B<0)return this;B===0?R.shift():function(J,F){for(;F+1=0;O--)this.removeListener(w,T[O]);return this},s.prototype.listeners=function(w){return v(this,w,!0)},s.prototype.rawListeners=function(w){return v(this,w,!1)},s.listenerCount=function(w,T){return typeof w.listenerCount=="function"?w.listenerCount(T):g.call(w,T)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?u(this._events):[]}},645:(a,u)=>{u.read=function(l,d,h,s,f){var p,c,y=8*f-s-1,b=(1<>1,v=-7,g=h?f-1:0,S=h?-1:1,x=l[d+g];for(g+=S,p=x&(1<<-v)-1,x>>=-v,v+=y;v>0;p=256*p+l[d+g],g+=S,v-=8);for(c=p&(1<<-v)-1,p>>=-v,v+=s;v>0;c=256*c+l[d+g],g+=S,v-=8);if(p===0)p=1-m;else{if(p===b)return c?NaN:1/0*(x?-1:1);c+=Math.pow(2,s),p-=m}return(x?-1:1)*c*Math.pow(2,p-s)},u.write=function(l,d,h,s,f,p){var c,y,b,m=8*p-f-1,v=(1<>1,S=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=s?0:p-1,w=s?1:-1,T=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(y=isNaN(d)?1:0,c=v):(c=Math.floor(Math.log(d)/Math.LN2),d*(b=Math.pow(2,-c))<1&&(c--,b*=2),(d+=c+g>=1?S/b:S*Math.pow(2,1-g))*b>=2&&(c++,b/=2),c+g>=v?(y=0,c=v):c+g>=1?(y=(d*b-1)*Math.pow(2,f),c+=g):(y=d*Math.pow(2,g-1)*Math.pow(2,f),c=0));f>=8;l[h+x]=255&y,x+=w,y/=256,f-=8);for(c=c<0;l[h+x]=255&c,x+=w,c/=256,m-=8);l[h+x-w]|=128*T}},717:a=>{typeof Object.create=="function"?a.exports=function(u,l){l&&(u.super_=l,u.prototype=Object.create(l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}))}:a.exports=function(u,l){if(l){u.super_=l;var d=function(){};d.prototype=l.prototype,u.prototype=new d,u.prototype.constructor=u}}},155:a=>{var u,l,d=a.exports={};function h(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function f(x){if(u===setTimeout)return setTimeout(x,0);if((u===h||!u)&&setTimeout)return u=setTimeout,setTimeout(x,0);try{return u(x,0)}catch{try{return u.call(null,x,0)}catch{return u.call(this,x,0)}}}(function(){try{u=typeof setTimeout=="function"?setTimeout:h}catch{u=h}try{l=typeof clearTimeout=="function"?clearTimeout:s}catch{l=s}})();var p,c=[],y=!1,b=-1;function m(){y&&p&&(y=!1,p.length?c=p.concat(c):b=-1,c.length&&v())}function v(){if(!y){var x=f(m);y=!0;for(var w=c.length;w;){for(p=c,c=[];++b1)for(var T=1;T{var u={};function l(h,s,f){f||(f=Error);var p=function(c){var y,b;function m(v,g,S){return c.call(this,function(x,w,T){return typeof s=="string"?s:s(x,w,T)}(v,g,S))||this}return b=c,(y=m).prototype=Object.create(b.prototype),y.prototype.constructor=y,y.__proto__=b,m}(f);p.prototype.name=f.name,p.prototype.code=h,u[h]=p}function d(h,s){if(Array.isArray(h)){var f=h.length;return h=h.map(function(p){return String(p)}),f>2?"one of ".concat(s," ").concat(h.slice(0,f-1).join(", "),", or ")+h[f-1]:f===2?"one of ".concat(s," ").concat(h[0]," or ").concat(h[1]):"of ".concat(s," ").concat(h[0])}return"of ".concat(s," ").concat(String(h))}l("ERR_INVALID_OPT_VALUE",function(h,s){return'The value "'+s+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,s,f){var p,c,y,b,m;if(typeof s=="string"&&(c="not ",s.substr(0,c.length)===c)?(p="must not be",s=s.replace(/^not /,"")):p="must be",function(g,S,x){return(x===void 0||x>g.length)&&(x=g.length),g.substring(x-S.length,x)===S}(h," argument"))y="The ".concat(h," ").concat(p," ").concat(d(s,"type"));else{var v=(typeof m!="number"&&(m=0),m+1>(b=h).length||b.indexOf(".",m)===-1?"argument":"property");y='The "'.concat(h,'" ').concat(v," ").concat(p," ").concat(d(s,"type"))}return y+". Received type ".concat(typeof f)},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),a.exports.q=u},753:(a,u,l)=>{var d=l(155),h=Object.keys||function(g){var S=[];for(var x in g)S.push(x);return S};a.exports=b;var s=l(481),f=l(229);l(717)(b,s);for(var p=h(f.prototype),c=0;c{a.exports=h;var d=l(605);function h(s){if(!(this instanceof h))return new h(s);d.call(this,s)}l(717)(h,d),h.prototype._transform=function(s,f,p){p(null,s)}},481:(a,u,l)=>{var d,h=l(155);a.exports=H,H.ReadableState=F,l(187).EventEmitter;var s,f=function(I,P){return I.listeners(P).length},p=l(503),c=l(764).Buffer,y=l.g.Uint8Array||function(){},b=l(616);s=b&&b.debuglog?b.debuglog("stream"):function(){};var m,v,g,S=l(327),x=l(195),w=l(457).getHighWaterMark,T=l(281).q,R=T.ERR_INVALID_ARG_TYPE,O=T.ERR_STREAM_PUSH_AFTER_EOF,B=T.ERR_METHOD_NOT_IMPLEMENTED,$=T.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;l(717)(H,p);var z=x.errorOrDestroy,J=["error","close","destroy","pause","resume"];function F(I,P,ee){d=d||l(753),I=I||{},typeof ee!="boolean"&&(ee=P instanceof d),this.objectMode=!!I.objectMode,ee&&(this.objectMode=this.objectMode||!!I.readableObjectMode),this.highWaterMark=w(this,I,"readableHighWaterMark",ee),this.buffer=new S,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=I.emitClose!==!1,this.autoDestroy=!!I.autoDestroy,this.destroyed=!1,this.defaultEncoding=I.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I.encoding&&(m||(m=l(553).s),this.decoder=new m(I.encoding),this.encoding=I.encoding)}function H(I){if(d=d||l(753),!(this instanceof H))return new H(I);var P=this instanceof d;this._readableState=new F(I,this,P),this.readable=!0,I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy)),p.call(this)}function q(I,P,ee,le,Pe){s("readableAddChunk",P);var De,de=I._readableState;if(P===null)de.reading=!1,function(Ue,ke){if(s("onEofChunk"),!ke.ended){if(ke.decoder){var He=ke.decoder.end();He&&He.length&&(ke.buffer.push(He),ke.length+=ke.objectMode?1:He.length)}ke.ended=!0,ke.sync?te(Ue):(ke.needReadable=!1,ke.emittedReadable||(ke.emittedReadable=!0,A(Ue)))}}(I,de);else if(Pe||(De=function(Ue,ke){var He,st;return st=ke,c.isBuffer(st)||st instanceof y||typeof ke=="string"||ke===void 0||Ue.objectMode||(He=new R("chunk",["string","Buffer","Uint8Array"],ke)),He}(de,P)),De)z(I,De);else if(de.objectMode||P&&P.length>0)if(typeof P=="string"||de.objectMode||Object.getPrototypeOf(P)===c.prototype||(P=function(Ue){return c.from(Ue)}(P)),le)de.endEmitted?z(I,new $):ae(I,de,P,!0);else if(de.ended)z(I,new O);else{if(de.destroyed)return!1;de.reading=!1,de.decoder&&!ee?(P=de.decoder.write(P),de.objectMode||P.length!==0?ae(I,de,P,!1):C(I,de)):ae(I,de,P,!1)}else le||(de.reading=!1,C(I,de));return!de.ended&&(de.lengthP.highWaterMark&&(P.highWaterMark=function(ee){return ee>=V?ee=V:(ee--,ee|=ee>>>1,ee|=ee>>>2,ee|=ee>>>4,ee|=ee>>>8,ee|=ee>>>16,ee++),ee}(I)),I<=P.length?I:P.ended?P.length:(P.needReadable=!0,0))}function te(I){var P=I._readableState;s("emitReadable",P.needReadable,P.emittedReadable),P.needReadable=!1,P.emittedReadable||(s("emitReadable",P.flowing),P.emittedReadable=!0,h.nextTick(A,I))}function A(I){var P=I._readableState;s("emitReadable_",P.destroyed,P.length,P.ended),P.destroyed||!P.length&&!P.ended||(I.emit("readable"),P.emittedReadable=!1),P.needReadable=!P.flowing&&!P.ended&&P.length<=P.highWaterMark,ie(I)}function C(I,P){P.readingMore||(P.readingMore=!0,h.nextTick(D,I,P))}function D(I,P){for(;!P.reading&&!P.ended&&(P.length0,P.resumeScheduled&&!P.paused?P.flowing=!0:I.listenerCount("data")>0&&I.resume()}function X(I){s("readable nexttick read 0"),I.read(0)}function ne(I,P){s("resume",P.reading),P.reading||I.read(0),P.resumeScheduled=!1,I.emit("resume"),ie(I),P.flowing&&!P.reading&&I.read(0)}function ie(I){var P=I._readableState;for(s("flow",P.flowing);P.flowing&&I.read()!==null;);}function he(I,P){return P.length===0?null:(P.objectMode?ee=P.buffer.shift():!I||I>=P.length?(ee=P.decoder?P.buffer.join(""):P.buffer.length===1?P.buffer.first():P.buffer.concat(P.length),P.buffer.clear()):ee=P.buffer.consume(I,P.decoder),ee);var ee}function ce(I){var P=I._readableState;s("endReadable",P.endEmitted),P.endEmitted||(P.ended=!0,h.nextTick(be,P,I))}function be(I,P){if(s("endReadableNT",I.endEmitted,I.length),!I.endEmitted&&I.length===0&&(I.endEmitted=!0,P.readable=!1,P.emit("end"),I.autoDestroy)){var ee=P._writableState;(!ee||ee.autoDestroy&&ee.finished)&&P.destroy()}}function me(I,P){for(var ee=0,le=I.length;ee=P.highWaterMark:P.length>0)||P.ended))return s("read: emitReadable",P.length,P.ended),P.length===0&&P.ended?ce(this):te(this),null;if((I=G(I,P))===0&&P.ended)return P.length===0&&ce(this),null;var le,Pe=P.needReadable;return s("need readable",Pe),(P.length===0||P.length-I0?he(I,P):null)===null?(P.needReadable=P.length<=P.highWaterMark,I=0):(P.length-=I,P.awaitDrain=0),P.length===0&&(P.ended||(P.needReadable=!0),ee!==I&&P.ended&&ce(this)),le!==null&&this.emit("data",le),le},H.prototype._read=function(I){z(this,new B("_read()"))},H.prototype.pipe=function(I,P){var ee=this,le=this._readableState;switch(le.pipesCount){case 0:le.pipes=I;break;case 1:le.pipes=[le.pipes,I];break;default:le.pipes.push(I)}le.pipesCount+=1,s("pipe count=%d opts=%j",le.pipesCount,P);var Pe=P&&P.end===!1||I===h.stdout||I===h.stderr?_:De;function De(){s("onend"),I.end()}le.endEmitted?h.nextTick(Pe):ee.once("end",Pe),I.on("unpipe",function E(k,M){s("onunpipe"),k===ee&&M&&M.hasUnpiped===!1&&(M.hasUnpiped=!0,s("cleanup"),I.removeListener("close",st),I.removeListener("finish",Sn),I.removeListener("drain",de),I.removeListener("error",He),I.removeListener("unpipe",E),ee.removeListener("end",De),ee.removeListener("end",_),ee.removeListener("data",ke),Ue=!0,!le.awaitDrain||I._writableState&&!I._writableState.needDrain||de())});var de=function(E){return function(){var k=E._readableState;s("pipeOnDrain",k.awaitDrain),k.awaitDrain&&k.awaitDrain--,k.awaitDrain===0&&f(E,"data")&&(k.flowing=!0,ie(E))}}(ee);I.on("drain",de);var Ue=!1;function ke(E){s("ondata");var k=I.write(E);s("dest.write",k),k===!1&&((le.pipesCount===1&&le.pipes===I||le.pipesCount>1&&me(le.pipes,I)!==-1)&&!Ue&&(s("false write response, pause",le.awaitDrain),le.awaitDrain++),ee.pause())}function He(E){s("onerror",E),_(),I.removeListener("error",He),f(I,"error")===0&&z(I,E)}function st(){I.removeListener("finish",Sn),_()}function Sn(){s("onfinish"),I.removeListener("close",st),_()}function _(){s("unpipe"),ee.unpipe(I)}return ee.on("data",ke),function(E,k,M){if(typeof E.prependListener=="function")return E.prependListener(k,M);E._events&&E._events.error?Array.isArray(E._events.error)?E._events.error.unshift(M):E._events.error=[M,E._events.error]:E.on(k,M)}(I,"error",He),I.once("close",st),I.once("finish",Sn),I.emit("pipe",ee),le.flowing||(s("pipe resume"),ee.resume()),I},H.prototype.unpipe=function(I){var P=this._readableState,ee={hasUnpiped:!1};if(P.pipesCount===0)return this;if(P.pipesCount===1)return I&&I!==P.pipes||(I||(I=P.pipes),P.pipes=null,P.pipesCount=0,P.flowing=!1,I&&I.emit("unpipe",this,ee)),this;if(!I){var le=P.pipes,Pe=P.pipesCount;P.pipes=null,P.pipesCount=0,P.flowing=!1;for(var De=0;De0,le.flowing!==!1&&this.resume()):I==="readable"&&(le.endEmitted||le.readableListening||(le.readableListening=le.needReadable=!0,le.flowing=!1,le.emittedReadable=!1,s("on readable",le.length,le.reading),le.length?te(this):le.reading||h.nextTick(X,this))),ee},H.prototype.addListener=H.prototype.on,H.prototype.removeListener=function(I,P){var ee=p.prototype.removeListener.call(this,I,P);return I==="readable"&&h.nextTick(K,this),ee},H.prototype.removeAllListeners=function(I){var P=p.prototype.removeAllListeners.apply(this,arguments);return I!=="readable"&&I!==void 0||h.nextTick(K,this),P},H.prototype.resume=function(){var I=this._readableState;return I.flowing||(s("resume"),I.flowing=!I.readableListening,function(P,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,h.nextTick(ne,P,ee))}(this,I)),I.paused=!1,this},H.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},H.prototype.wrap=function(I){var P=this,ee=this._readableState,le=!1;for(var Pe in I.on("end",function(){if(s("wrapped end"),ee.decoder&&!ee.ended){var de=ee.decoder.end();de&&de.length&&P.push(de)}P.push(null)}),I.on("data",function(de){s("wrapped data"),ee.decoder&&(de=ee.decoder.write(de)),ee.objectMode&&de==null||(ee.objectMode||de&&de.length)&&(P.push(de)||(le=!0,I.pause()))}),I)this[Pe]===void 0&&typeof I[Pe]=="function"&&(this[Pe]=function(de){return function(){return I[de].apply(I,arguments)}}(Pe));for(var De=0;De{a.exports=b;var d=l(281).q,h=d.ERR_METHOD_NOT_IMPLEMENTED,s=d.ERR_MULTIPLE_CALLBACK,f=d.ERR_TRANSFORM_ALREADY_TRANSFORMING,p=d.ERR_TRANSFORM_WITH_LENGTH_0,c=l(753);function y(g,S){var x=this._transformState;x.transforming=!1;var w=x.writecb;if(w===null)return this.emit("error",new s);x.writechunk=null,x.writecb=null,S!=null&&this.push(S),w(g);var T=this._readableState;T.reading=!1,(T.needReadable||T.length{var d,h=l(155);function s(C){var D=this;this.next=null,this.entry=null,this.finish=function(){(function(K,X,ne){var ie=K.entry;for(K.entry=null;ie;){var he=ie.callback;X.pendingcb--,he(void 0),ie=ie.next}X.corkedRequestsFree.next=K})(D,C)}}a.exports=H,H.WritableState=F;var f,p={deprecate:l(927)},c=l(503),y=l(764).Buffer,b=l.g.Uint8Array||function(){},m=l(195),v=l(457).getHighWaterMark,g=l(281).q,S=g.ERR_INVALID_ARG_TYPE,x=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_MULTIPLE_CALLBACK,T=g.ERR_STREAM_CANNOT_PIPE,R=g.ERR_STREAM_DESTROYED,O=g.ERR_STREAM_NULL_VALUES,B=g.ERR_STREAM_WRITE_AFTER_END,$=g.ERR_UNKNOWN_ENCODING,z=m.errorOrDestroy;function J(){}function F(C,D,K){d=d||l(753),C=C||{},typeof K!="boolean"&&(K=D instanceof d),this.objectMode=!!C.objectMode,K&&(this.objectMode=this.objectMode||!!C.writableObjectMode),this.highWaterMark=v(this,C,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var X=C.decodeStrings===!1;this.decodeStrings=!X,this.defaultEncoding=C.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){(function(ie,he){var ce=ie._writableState,be=ce.sync,me=ce.writecb;if(typeof me!="function")throw new w;if(function(P){P.writing=!1,P.writecb=null,P.length-=P.writelen,P.writelen=0}(ce),he)(function(P,ee,le,Pe,De){--ee.pendingcb,le?(h.nextTick(De,Pe),h.nextTick(A,P,ee),P._writableState.errorEmitted=!0,z(P,Pe)):(De(Pe),P._writableState.errorEmitted=!0,z(P,Pe),A(P,ee))})(ie,ce,be,he,me);else{var I=G(ce)||ie.destroyed;I||ce.corked||ce.bufferProcessing||!ce.bufferedRequest||V(ie,ce),be?h.nextTick(ae,ie,ce,I,me):ae(ie,ce,I,me)}})(D,ne)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=C.emitClose!==!1,this.autoDestroy=!!C.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function H(C){var D=this instanceof(d=d||l(753));if(!D&&!f.call(H,this))return new H(C);this._writableState=new F(C,this,D),this.writable=!0,C&&(typeof C.write=="function"&&(this._write=C.write),typeof C.writev=="function"&&(this._writev=C.writev),typeof C.destroy=="function"&&(this._destroy=C.destroy),typeof C.final=="function"&&(this._final=C.final)),c.call(this)}function q(C,D,K,X,ne,ie,he){D.writelen=X,D.writecb=he,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new R("write")):K?C._writev(ne,D.onwrite):C._write(ne,ie,D.onwrite),D.sync=!1}function ae(C,D,K,X){K||function(ne,ie){ie.length===0&&ie.needDrain&&(ie.needDrain=!1,ne.emit("drain"))}(C,D),D.pendingcb--,X(),A(C,D)}function V(C,D){D.bufferProcessing=!0;var K=D.bufferedRequest;if(C._writev&&K&&K.next){var X=D.bufferedRequestCount,ne=new Array(X),ie=D.corkedRequestsFree;ie.entry=K;for(var he=0,ce=!0;K;)ne[he]=K,K.isBuf||(ce=!1),K=K.next,he+=1;ne.allBuffers=ce,q(C,D,!0,D.length,ne,"",ie.finish),D.pendingcb++,D.lastBufferedRequest=null,ie.next?(D.corkedRequestsFree=ie.next,ie.next=null):D.corkedRequestsFree=new s(D),D.bufferedRequestCount=0}else{for(;K;){var be=K.chunk,me=K.encoding,I=K.callback;if(q(C,D,!1,D.objectMode?1:be.length,be,me,I),K=K.next,D.bufferedRequestCount--,D.writing)break}K===null&&(D.lastBufferedRequest=null)}D.bufferedRequest=K,D.bufferProcessing=!1}function G(C){return C.ending&&C.length===0&&C.bufferedRequest===null&&!C.finished&&!C.writing}function te(C,D){C._final(function(K){D.pendingcb--,K&&z(C,K),D.prefinished=!0,C.emit("prefinish"),A(C,D)})}function A(C,D){var K=G(D);if(K&&(function(ne,ie){ie.prefinished||ie.finalCalled||(typeof ne._final!="function"||ie.destroyed?(ie.prefinished=!0,ne.emit("prefinish")):(ie.pendingcb++,ie.finalCalled=!0,h.nextTick(te,ne,ie)))}(C,D),D.pendingcb===0&&(D.finished=!0,C.emit("finish"),D.autoDestroy))){var X=C._readableState;(!X||X.autoDestroy&&X.endEmitted)&&C.destroy()}return K}l(717)(H,c),F.prototype.getBuffer=function(){for(var C=this.bufferedRequest,D=[];C;)D.push(C),C=C.next;return D},function(){try{Object.defineProperty(F.prototype,"buffer",{get:p.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(H,Symbol.hasInstance,{value:function(C){return!!f.call(this,C)||this===H&&C&&C._writableState instanceof F}})):f=function(C){return C instanceof this},H.prototype.pipe=function(){z(this,new T)},H.prototype.write=function(C,D,K){var X,ne=this._writableState,ie=!1,he=!ne.objectMode&&(X=C,y.isBuffer(X)||X instanceof b);return he&&!y.isBuffer(C)&&(C=function(ce){return y.from(ce)}(C)),typeof D=="function"&&(K=D,D=null),he?D="buffer":D||(D=ne.defaultEncoding),typeof K!="function"&&(K=J),ne.ending?function(ce,be){var me=new B;z(ce,me),h.nextTick(be,me)}(this,K):(he||function(ce,be,me,I){var P;return me===null?P=new O:typeof me=="string"||be.objectMode||(P=new S("chunk",["string","Buffer"],me)),!P||(z(ce,P),h.nextTick(I,P),!1)}(this,ne,C,K))&&(ne.pendingcb++,ie=function(ce,be,me,I,P,ee){if(!me){var le=function(Ue,ke,He){return Ue.objectMode||Ue.decodeStrings===!1||typeof ke!="string"||(ke=y.from(ke,He)),ke}(be,I,P);I!==le&&(me=!0,P="buffer",I=le)}var Pe=be.objectMode?1:I.length;be.length+=Pe;var De=be.length-1))throw new $(C);return this._writableState.defaultEncoding=C,this},Object.defineProperty(H.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(H.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),H.prototype._write=function(C,D,K){K(new x("_write()"))},H.prototype._writev=null,H.prototype.end=function(C,D,K){var X=this._writableState;return typeof C=="function"?(K=C,C=null,D=null):typeof D=="function"&&(K=D,D=null),C!=null&&this.write(C,D),X.corked&&(X.corked=1,this.uncork()),X.ending||function(ne,ie,he){ie.ending=!0,A(ne,ie),he&&(ie.finished?h.nextTick(he):ne.once("finish",he)),ie.ended=!0,ne.writable=!1}(this,X,K),this},Object.defineProperty(H.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(H.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(C){this._writableState&&(this._writableState.destroyed=C)}}),H.prototype.destroy=m.destroy,H.prototype._undestroy=m.undestroy,H.prototype._destroy=function(C,D){D(C)}},850:(a,u,l)=>{var d,h=l(155);function s(O,B,$){return B in O?Object.defineProperty(O,B,{value:$,enumerable:!0,configurable:!0,writable:!0}):O[B]=$,O}var f=l(610),p=Symbol("lastResolve"),c=Symbol("lastReject"),y=Symbol("error"),b=Symbol("ended"),m=Symbol("lastPromise"),v=Symbol("handlePromise"),g=Symbol("stream");function S(O,B){return{value:O,done:B}}function x(O){var B=O[p];if(B!==null){var $=O[g].read();$!==null&&(O[m]=null,O[p]=null,O[c]=null,B(S($,!1)))}}function w(O){h.nextTick(x,O)}var T=Object.getPrototypeOf(function(){}),R=Object.setPrototypeOf((s(d={get stream(){return this[g]},next:function(){var O=this,B=this[y];if(B!==null)return Promise.reject(B);if(this[b])return Promise.resolve(S(void 0,!0));if(this[g].destroyed)return new Promise(function(F,H){h.nextTick(function(){O[y]?H(O[y]):F(S(void 0,!0))})});var $,z=this[m];if(z)$=new Promise(function(F,H){return function(q,ae){F.then(function(){H[b]?q(S(void 0,!0)):H[v](q,ae)},ae)}}(z,this));else{var J=this[g].read();if(J!==null)return Promise.resolve(S(J,!1));$=new Promise(this[v])}return this[m]=$,$}},Symbol.asyncIterator,function(){return this}),s(d,"return",function(){var O=this;return new Promise(function(B,$){O[g].destroy(null,function(z){z?$(z):B(S(void 0,!0))})})}),d),T);a.exports=function(O){var B,$=Object.create(R,(s(B={},g,{value:O,writable:!0}),s(B,p,{value:null,writable:!0}),s(B,c,{value:null,writable:!0}),s(B,y,{value:null,writable:!0}),s(B,b,{value:O._readableState.endEmitted,writable:!0}),s(B,v,{value:function(z,J){var F=$[g].read();F?($[m]=null,$[p]=null,$[c]=null,z(S(F,!1))):($[p]=z,$[c]=J)},writable:!0}),B));return $[m]=null,f(O,function(z){if(z&&z.code!=="ERR_STREAM_PREMATURE_CLOSE"){var J=$[c];return J!==null&&($[m]=null,$[p]=null,$[c]=null,J(z)),void($[y]=z)}var F=$[p];F!==null&&($[m]=null,$[p]=null,$[c]=null,F(S(void 0,!0))),$[b]=!0}),O.on("readable",w.bind(null,$)),$}},327:(a,u,l)=>{function d(y,b){var m=Object.keys(y);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(y);b&&(v=v.filter(function(g){return Object.getOwnPropertyDescriptor(y,g).enumerable})),m.push.apply(m,v)}return m}function h(y,b,m){return b in y?Object.defineProperty(y,b,{value:m,enumerable:!0,configurable:!0,writable:!0}):y[b]=m,y}function s(y,b){for(var m=0;m0?this.tail.next=g:this.head=g,this.tail=g,++this.length}},{key:"unshift",value:function(v){var g={data:v,next:this.head};this.length===0&&(this.tail=g),this.head=g,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var g=this.head,S=""+g.data;g=g.next;)S+=v+g.data;return S}},{key:"concat",value:function(v){if(this.length===0)return f.alloc(0);for(var g,S,x,w=f.allocUnsafe(v>>>0),T=this.head,R=0;T;)g=T.data,S=w,x=R,f.prototype.copy.call(g,S,x),R+=T.data.length,T=T.next;return w}},{key:"consume",value:function(v,g){var S;return vw.length?w.length:v;if(T===w.length?x+=w:x+=w.slice(0,v),(v-=T)==0){T===w.length?(++S,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=w.slice(T));break}++S}return this.length-=S,x}},{key:"_getBuffer",value:function(v){var g=f.allocUnsafe(v),S=this.head,x=1;for(S.data.copy(g),v-=S.data.length;S=S.next;){var w=S.data,T=v>w.length?w.length:v;if(w.copy(g,g.length-v,0,T),(v-=T)==0){T===w.length?(++x,S.next?this.head=S.next:this.head=this.tail=null):(this.head=S,S.data=w.slice(T));break}++x}return this.length-=x,g}},{key:c,value:function(v,g){return p(this,function(S){for(var x=1;x{var d=l(155);function h(p,c){f(p,c),s(p)}function s(p){p._writableState&&!p._writableState.emitClose||p._readableState&&!p._readableState.emitClose||p.emit("close")}function f(p,c){p.emit("error",c)}a.exports={destroy:function(p,c){var y=this,b=this._readableState&&this._readableState.destroyed,m=this._writableState&&this._writableState.destroyed;return b||m?(c?c(p):p&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,d.nextTick(f,this,p)):d.nextTick(f,this,p)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(v){!c&&v?y._writableState?y._writableState.errorEmitted?d.nextTick(s,y):(y._writableState.errorEmitted=!0,d.nextTick(h,y,v)):d.nextTick(h,y,v):c?(d.nextTick(s,y),c(v)):d.nextTick(s,y)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(p,c){var y=p._readableState,b=p._writableState;y&&y.autoDestroy||b&&b.autoDestroy?p.destroy(c):p.emit("error",c)}}},610:(a,u,l)=>{var d=l(281).q.ERR_STREAM_PREMATURE_CLOSE;function h(){}a.exports=function s(f,p,c){if(typeof p=="function")return s(f,null,p);p||(p={}),c=function(O){var B=!1;return function(){if(!B){B=!0;for(var $=arguments.length,z=new Array($),J=0;J<$;J++)z[J]=arguments[J];O.apply(this,z)}}}(c||h);var y=p.readable||p.readable!==!1&&f.readable,b=p.writable||p.writable!==!1&&f.writable,m=function(){f.writable||g()},v=f._writableState&&f._writableState.finished,g=function(){b=!1,v=!0,y||c.call(f)},S=f._readableState&&f._readableState.endEmitted,x=function(){y=!1,S=!0,b||c.call(f)},w=function(O){c.call(f,O)},T=function(){var O;return y&&!S?(f._readableState&&f._readableState.ended||(O=new d),c.call(f,O)):b&&!v?(f._writableState&&f._writableState.ended||(O=new d),c.call(f,O)):void 0},R=function(){f.req.on("finish",g)};return function(O){return O.setHeader&&typeof O.abort=="function"}(f)?(f.on("complete",g),f.on("abort",T),f.req?R():f.on("request",R)):b&&!f._writableState&&(f.on("end",m),f.on("close",m)),f.on("end",x),f.on("finish",g),p.error!==!1&&f.on("error",w),f.on("close",T),function(){f.removeListener("complete",g),f.removeListener("abort",T),f.removeListener("request",R),f.req&&f.req.removeListener("finish",g),f.removeListener("end",m),f.removeListener("close",m),f.removeListener("finish",g),f.removeListener("end",x),f.removeListener("error",w),f.removeListener("close",T)}}},167:a=>{a.exports=function(){throw new Error("Readable.from is not available in the browser")}},946:(a,u,l)=>{var d,h=l(281).q,s=h.ERR_MISSING_ARGS,f=h.ERR_STREAM_DESTROYED;function p(v){if(v)throw v}function c(v,g,S,x){x=function(R){var O=!1;return function(){O||(O=!0,R.apply(void 0,arguments))}}(x);var w=!1;v.on("close",function(){w=!0}),d===void 0&&(d=l(610)),d(v,{readable:g,writable:S},function(R){if(R)return x(R);w=!0,x()});var T=!1;return function(R){if(!w&&!T)return T=!0,function(O){return O.setHeader&&typeof O.abort=="function"}(v)?v.abort():typeof v.destroy=="function"?v.destroy():void x(R||new f("pipe"))}}function y(v){v()}function b(v,g){return v.pipe(g)}function m(v){return v.length?typeof v[v.length-1]!="function"?p:v.pop():p}a.exports=function(){for(var v=arguments.length,g=new Array(v),S=0;S0,function($){x||(x=$),$&&T.forEach(y),B||(T.forEach(y),w(x))})});return g.reduce(b)}},457:(a,u,l)=>{var d=l(281).q.ERR_INVALID_OPT_VALUE;a.exports={getHighWaterMark:function(h,s,f,p){var c=function(y,b,m){return y.highWaterMark!=null?y.highWaterMark:b?y[m]:null}(s,p,f);if(c!=null){if(!isFinite(c)||Math.floor(c)!==c||c<0)throw new d(p?f:"highWaterMark",c);return Math.floor(c)}return h.objectMode?16:16384}}},503:(a,u,l)=>{a.exports=l(187).EventEmitter},509:(a,u,l)=>{var d=l(764),h=d.Buffer;function s(p,c){for(var y in p)c[y]=p[y]}function f(p,c,y){return h(p,c,y)}h.from&&h.alloc&&h.allocUnsafe&&h.allocUnsafeSlow?a.exports=d:(s(d,u),u.Buffer=f),f.prototype=Object.create(h.prototype),s(h,f),f.from=function(p,c,y){if(typeof p=="number")throw new TypeError("Argument must not be a number");return h(p,c,y)},f.alloc=function(p,c,y){if(typeof p!="number")throw new TypeError("Argument must be a number");var b=h(p);return c!==void 0?typeof y=="string"?b.fill(c,y):b.fill(c):b.fill(0),b},f.allocUnsafe=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return h(p)},f.allocUnsafeSlow=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(p)}},830:(a,u,l)=>{a.exports=h;var d=l(187).EventEmitter;function h(){d.call(this)}l(717)(h,d),h.Readable=l(481),h.Writable=l(229),h.Duplex=l(753),h.Transform=l(605),h.PassThrough=l(725),h.finished=l(610),h.pipeline=l(946),h.Stream=h,h.prototype.pipe=function(s,f){var p=this;function c(x){s.writable&&s.write(x)===!1&&p.pause&&p.pause()}function y(){p.readable&&p.resume&&p.resume()}p.on("data",c),s.on("drain",y),s._isStdio||f&&f.end===!1||(p.on("end",m),p.on("close",v));var b=!1;function m(){b||(b=!0,s.end())}function v(){b||(b=!0,typeof s.destroy=="function"&&s.destroy())}function g(x){if(S(),d.listenerCount(this,"error")===0)throw x}function S(){p.removeListener("data",c),s.removeListener("drain",y),p.removeListener("end",m),p.removeListener("close",v),p.removeListener("error",g),s.removeListener("error",g),p.removeListener("end",S),p.removeListener("close",S),s.removeListener("close",S)}return p.on("error",g),s.on("error",g),p.on("end",S),p.on("close",S),s.on("close",S),s.emit("pipe",p),s}},553:(a,u,l)=>{var d=l(509).Buffer,h=d.isEncoding||function(S){switch((S=""+S)&&S.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 s(S){var x;switch(this.encoding=function(w){var T=function(R){if(!R)return"utf8";for(var O;;)switch(R){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 R;default:if(O)return;R=(""+R).toLowerCase(),O=!0}}(w);if(typeof T!="string"&&(d.isEncoding===h||!h(w)))throw new Error("Unknown encoding: "+w);return T||w}(S),this.encoding){case"utf16le":this.text=c,this.end=y,x=4;break;case"utf8":this.fillLast=p,x=4;break;case"base64":this.text=b,this.end=m,x=3;break;default:return this.write=v,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=d.allocUnsafe(x)}function f(S){return S<=127?0:S>>5==6?2:S>>4==14?3:S>>3==30?4:S>>6==2?-1:-2}function p(S){var x=this.lastTotal-this.lastNeed,w=function(T,R,O){if((192&R[0])!=128)return T.lastNeed=0,"�";if(T.lastNeed>1&&R.length>1){if((192&R[1])!=128)return T.lastNeed=1,"�";if(T.lastNeed>2&&R.length>2&&(192&R[2])!=128)return T.lastNeed=2,"�"}}(this,S);return w!==void 0?w:this.lastNeed<=S.length?(S.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(S.copy(this.lastChar,x,0,S.length),void(this.lastNeed-=S.length))}function c(S,x){if((S.length-x)%2==0){var w=S.toString("utf16le",x);if(w){var T=w.charCodeAt(w.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=S[S.length-2],this.lastChar[1]=S[S.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=S[S.length-1],S.toString("utf16le",x,S.length-1)}function y(S){var x=S&&S.length?this.write(S):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,w)}return x}function b(S,x){var w=(S.length-x)%3;return w===0?S.toString("base64",x):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=S[S.length-1]:(this.lastChar[0]=S[S.length-2],this.lastChar[1]=S[S.length-1]),S.toString("base64",x,S.length-w))}function m(S){var x=S&&S.length?this.write(S):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function v(S){return S.toString(this.encoding)}function g(S){return S&&S.length?this.write(S):""}u.s=s,s.prototype.write=function(S){if(S.length===0)return"";var x,w;if(this.lastNeed){if((x=this.fillLast(S))===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w=0?(z>0&&(R.lastNeed=z-1),z):--$=0?(z>0&&(R.lastNeed=z-2),z):--$=0?(z>0&&(z===2?z=0:R.lastNeed=z-3),z):0}(this,S,x);if(!this.lastNeed)return S.toString("utf8",x);this.lastTotal=w;var T=S.length-(w-this.lastNeed);return S.copy(this.lastChar,0,T),S.toString("utf8",x,T)},s.prototype.fillLast=function(S){if(this.lastNeed<=S.length)return S.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);S.copy(this.lastChar,this.lastTotal-this.lastNeed,0,S.length),this.lastNeed-=S.length}},927:(a,u,l)=>{function d(h){try{if(!l.g.localStorage)return!1}catch{return!1}var s=l.g.localStorage[h];return s!=null&&String(s).toLowerCase()==="true"}a.exports=function(h,s){if(d("noDeprecation"))return h;var f=!1;return function(){if(!f){if(d("throwDeprecation"))throw new Error(s);d("traceDeprecation")?console.trace(s):console.warn(s),f=!0}return h.apply(this,arguments)}}},361:()=>{},616:()=>{}},r={};function o(a){var u=r[a];if(u!==void 0)return u.exports;var l=r[a]={exports:{}};return n[a](l,l.exports,o),l.exports}o.d=(a,u)=>{for(var l in u)o.o(u,l)&&!o.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:u[l]})},o.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),o.o=(a,u)=>Object.prototype.hasOwnProperty.call(a,u),o.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var i={};return(()=>{o.r(i),o.d(i,{Commented:()=>a.Commented,Decoder:()=>a.Decoder,Diagnose:()=>a.Diagnose,Encoder:()=>a.Encoder,Map:()=>a.Map,Simple:()=>a.Simple,Tagged:()=>a.Tagged,comment:()=>a.UI,decode:()=>a.Jx,decodeAll:()=>a.fI,decodeAllSync:()=>a.cc,decodeFirst:()=>a.h8,decodeFirstSync:()=>a.$u,diagnose:()=>a.M,encode:()=>a.cv,encodeAsync:()=>a.WR,encodeCanonical:()=>a.N2,encodeOne:()=>a.TG,leveldb:()=>a.ww,reset:()=>a.mc});var a=o(141)})(),i})()})})(Zv);var gP=Zv.exports,hu={},vP=Ye&&Ye.__awaiter||function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function u(h){try{d(r.next(h))}catch(s){a(s)}}function l(h){try{d(r.throw(h))}catch(s){a(s)}}function d(h){h.done?i(h.value):o(h.value).then(u,l)}d((r=r.apply(e,t||[])).next())})},_P=Ye&&Ye.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(d){return function(h){return l([d,h])}}function l(d){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(n=0)),n;)try{if(r=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]t.maxPresenceInterval*2&&delete t.presence[n]},this.maxPresenceInterval)},e.prototype.destroy=function(){this.interval!==null&&clearInterval(this.interval),this.updateHandle!==null&&clearTimeout(this.updateHandle),this.db.unsubscribe(this.key,this.onMessage)},e.prototype.onMessage=function(t){var n,r=t.value;r.client!==this.clientId&&(this.presence=il(il({},this.presence),(n={},n[r.client]={value:r.value,lastSeen:Date.now()},n)),this.callback(this.presence))},e.prototype.update=function(){var t=this;this.db.send({type:"push",action:{type:"relay"},value:{value:this.state,client:this.clientId},key:this.key}),this.nextUpdate=Date.now()+this.maxPresenceInterval,this.lastUpdate=Date.now(),this.updateHandle=setTimeout(function(){t.update()},this.maxPresenceInterval)},e.prototype.updateState=function(t){var n=this;if(JSON.stringify(t)!==JSON.stringify(this.state)){this.state=t;var r=this.lastUpdate+this.minPresenceInterval;rthis.sizeThreshold&&this.lastConfirmedSeq!==0){var r=this.compactable.packState(this.lastConfirmedState);(n=this.db)===null||n===void 0||n.send({type:"push",action:{type:"compact",seq:this.lastConfirmedSeq},value:{reset:r},key:this.key})}},e}();ei.Compactor=TP;var kP=Ye&&Ye.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();vu.__esModule=!0;vu.Reducer=void 0;var e1=ei,RP=function(e){kP(t,e);function t(n,r){var o=e.call(this)||this;return o.reducer=n,o.initState=r,o.optimistic=!0,o}return t.prototype.applyAction=function(n,r){return this.reducer(n,r)},t.prototype.initialState=function(){return this.initState},t}(e1.Compactable),CP=function(){function e(t){var n=new RP(t.reducer,t.initialValue);this.compactor=new e1.Compactor({key:t.key,compactable:n,sizeThreshold:t.sizeThreshold,db:t.db,callback:t.callback}),this.dispatch=this.dispatch.bind(this)}return e.prototype.subscribe=function(){this.compactor.subscribe()},e.prototype.destroy=function(){this.compactor.destroy()},e.prototype.dispatch=function(t){this.compactor.dispatch(t)},e}();vu.Reducer=CP;var _u={};_u.__esModule=!0;_u.StateListener=void 0;var AP=function(){function e(t){var n=this,r;this.lastUpdateSent=0,this.lastValue=null,this.debounceTimeout=null,this.state=null,this.callback=t.callback,this.db=t.db,this.key=t.key,this.setStateOptimistic=this.setStateOptimistic.bind(this),this.sendUpdate=this.sendUpdate.bind(this),this.randId=Math.random().toString(36).substring(7),this.debounceMillis=(r=t.debounceMillis)!==null&&r!==void 0?r:20,this.handler=function(o){var i=o.value;i.i!==n.randId&&n.callback(i.v)}}return e.prototype.subscribe=function(){this.db.subscribe(this.key,this.handler)},e.prototype.destroy=function(){this.db.unsubscribe(this.key,this.handler)},e.prototype.onMessage=function(t){this.callback(t.value),this.state=t.value},e.prototype.sendUpdate=function(){var t;this.debounceTimeout!==null&&(clearTimeout(this.debounceTimeout),this.debounceTimeout=null);var n={v:this.lastValue,i:this.randId};(t=this.db)===null||t===void 0||t.send({type:"push",action:{type:"replace"},value:n,key:this.key})},e.prototype.setStateOptimistic=function(t){this.callback(t),this.lastValue=t;var n=performance.now();n-this.lastUpdateSent{for(var n in t)wu(e,n,{get:t[n],enumerable:!0})},t1=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of IP(t))!LP.call(e,o)&&o!==n&&wu(e,o,{get:()=>t[o],enumerable:!(r=OP(t,o))||r.enumerable});return e},BP=(e,t,n)=>(n=e!=null?PP(MP(e)):{},t1(t||!e||!e.__esModule?wu(n,"default",{value:e,enumerable:!0}):n,e)),$P=e=>t1(wu({},"__esModule",{value:!0}),e),DP=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{u(n.next(l))}catch(d){o(d)}},a=l=>{try{u(n.throw(l))}catch(d){o(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,a);u((n=n.apply(e,t)).next())}),n1={};NP(n1,{DatabaseContext:()=>ap,DriftDBProvider:()=>FP,RoomQRCode:()=>HP,StatusIndicator:()=>GP,useConnectionStatus:()=>a1,useDatabase:()=>io,useLatency:()=>s1,usePresence:()=>VP,useSharedReducer:()=>WP,useSharedState:()=>zP,useUniqueClientId:()=>i1});var jP=$P(n1),ti=Jv,at=BP(L),Dn=oe,r1="_driftdb_room";function o1(){return new URL(document.location.href).searchParams.get(r1)}function UP(e){const t=new URL(document.location.href);t.searchParams.set(r1,e),window.history.replaceState({},"",t.toString())}function FP(e){const t=(0,at.useRef)(null);return t.current===null&&(t.current=new ti.DbConnection),at.default.useEffect(()=>{let n=new ti.Api(e.api),r;e.room?r=e.room:r=o1();let o;return r?o=n.getRoom(r):o=n.newRoom(),o.then(i=>{var a;e.room||UP(i.room),(a=t.current)==null||a.connect(i.socket_url,e.useBinary)}),()=>{var i;(i=t.current)==null||i.disconnect()}},[e.room,e.useBinary,e.api]),(0,Dn.jsx)(ap.Provider,{value:t.current,children:e.children})}var ap=at.default.createContext(null);function io(){const e=at.default.useContext(ap);if(e===null)throw new Error("useDatabase must be used within a DriftDBProvider");return e}function zP(e,t){const n=io(),[r,o]=at.default.useState(t),i=(0,at.useRef)(null);(0,at.useEffect)(()=>(i.current=new ti.StateListener({key:e,db:n,callback:o}),i.current.subscribe(),()=>{i.current.destroy()}),[]);const a=(0,at.useCallback)(u=>{var l,d,h;if(typeof u=="function"){const s=(l=i.current.state)!=null?l:t,f=u(s);(d=i.current)==null||d.setStateOptimistic(f)}else(h=i.current)==null||h.setStateOptimistic(u)},[t]);return[r,a]}function HP(){const e=io(),[t,n]=(0,at.useState)(null);return(0,at.useEffect)(()=>{const r=()=>{o1()!==null&&n(document.location.href)};return e.statusListener.addListener(r),()=>{e.statusListener.removeListener(r)}},[e]),t?(0,Dn.jsx)("img",{src:`https://api.jamsocket.live/qrcode?url=${t}`}):(0,Dn.jsx)(Dn.Fragment,{})}function i1(){const e=(0,at.useRef)();return typeof window>"u"?null:(e.current||(e.current=(0,ti.uniqueClientId)()),e.current)}function WP(e,t,n,r=o=>o){const o=io(),i=(0,at.useRef)(null);i.current===null&&(i.current=structuredClone(r(n)));const[a,u]=at.default.useState(i.current),l=at.default.useRef(null);l.current===null&&(l.current=new ti.Reducer({key:e,reducer:t,initialValue:i.current,sizeThreshold:30,db:o,callback:u})),(0,at.useEffect)(()=>(l.current.subscribe(),()=>{l.current.destroy()}),[]);const d=l.current.dispatch;return[a,d]}function a1(){const e=io(),[t,n]=at.default.useState({connected:!1});return at.default.useEffect(()=>{const r=o=>{n(o)};return e==null||e.statusListener.addListener(r),()=>{e==null||e.statusListener.removeListener(r)}},[e]),t}function s1(){const e=io(),[t,n]=(0,at.useState)(null);return at.default.useEffect(()=>{const r=()=>DP(this,null,function*(){const i=yield e==null?void 0:e.testLatency();n(i)}),o=setInterval(r,5e3);return r(),()=>{clearInterval(o)}},[e]),t}function VP(e,t){const n=io(),r=i1(),[o,i]=(0,at.useState)({}),a=(0,at.useRef)();return a.current===void 0&&(a.current=new ti.PresenceListener({key:e,db:n,clientId:r,initialState:t,callback:i})),(0,at.useEffect)(()=>(a.current.subscribe(),()=>{a.current.destroy()}),[a.current]),a.current.updateState(t),o}function GP(){const e=a1(),t=s1(),n=t===null?"...":Math.round(t).toString();let r;return e.connected?r="green":r="red",(0,Dn.jsxs)("div",{style:{display:"inline-block",border:"1px solid #ccc",background:"#eee",borderRadius:10,padding:10},children:["DriftDB status:"," ",(0,Dn.jsx)("span",{style:{color:r,fontWeight:"bold"},children:e.connected?"Connected":"Disconnected"}),e.connected?(0,Dn.jsxs)(Dn.Fragment,{children:[" ",(0,Dn.jsxs)("span",{style:{fontSize:"70%",color:"#aaa"},children:[(0,Dn.jsx)("a",{target:"_blank",rel:"noreferrer",style:{textDecoration:"none",color:"#aaa"},href:e.debugUrl,children:"(ui)"}),"(",n,"ms)"]})]}):null]})}const KP=()=>p2();var l1=(e=>(e.gameState="gameState",e.host="host",e.jokes="jokes",e.players="players",e.round="round",e.votes="votes",e))(l1||{}),qP=(e=>(e.maxPlayers="maxPlayers",e.maxRounds="maxRounds",e.maxSeconds="maxSeconds",e))(qP||{}),u1=(e=>(e[e.maxPlayers=4]="maxPlayers",e[e.maxRounds=3]="maxRounds",e[e.maxSeconds=30]="maxSeconds",e))(u1||{});const YP={...u1,hostId:"",jokeIds:[],round:0};function iO(){const[e,t]=jP.useSharedState(l1.gameState,YP);return{gameState:e,setGameState:n=>t({...e,...n})}}const XP=r2;function QP(){const e=KP(),t=XP(o=>o.snackbar),n=L.useCallback((o,i)=>i!=="clickaway"&&e(ol.resetSnackbar()),[e,ol]),r=oe.jsx(Jd,{size:"small","aria-label":"Close",color:"inherit",onClick:n,children:oe.jsx(Xv,{fontSize:"small"})});return oe.jsx(yP,{action:r,onClose:n,...t})}const JP=AT(pf(UC),{basename:WT});function ZP(){return oe.jsxs(L.StrictMode,{children:[oe.jsx(Hx,{}),oe.jsxs(c2,{store:UA,children:[oe.jsx(DT,{router:JP}),oe.jsx(QP,{})]})]})}const eO=s0(document.getElementById("root"));eO.render(oe.jsx(ZP,{}));export{YA as $,er as A,Wk as B,nO as C,p0 as D,In as E,tO as F,Nd as G,Ra as H,Jd as I,jP as J,l1 as K,Sm as L,iO as M,XP as N,iT as O,Pv as P,oC as Q,KS as R,Wi as S,MR as T,tv as U,Sd as V,gx as W,yr as X,kf as Y,px as Z,Ne as _,Q as a,hx as a0,wx as a1,Sx as a2,Av as a3,iu as a4,si as a5,pa as a6,yx as a7,WA as a8,vR as a9,ai as aa,Fl as ab,Gk as ac,ZA as ad,zm as ae,KT as af,jx as ag,ua as ah,pk as ai,nP as aj,oO as ak,uu as al,u1 as am,qP as an,rO as ao,XS as ap,l0 as aq,VA as b,an as c,wk as d,Ae as e,L as f,sn as g,Vt as h,Je as i,oe as j,bn as k,vT as l,KA as m,zT as n,KP as o,ol as p,gC as q,GA as r,bt as s,US as t,Zr as u,jw as v,ev as w,Pa as x,fx as y,U0 as z}; -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/ErrorBoundary-yu0qUJaQ.js","assets/Heading-_jh2ySxd.js","assets/text-D2kQ4ZI3.js","assets/useSetDocumentTitle-YCSksqpO.js","assets/Close-zRrhDe2z.js","assets/Home-Aqrob_Ko.js","assets/CardHeader-gkWy2wCO.js","assets/NotFound-VASMw1ud.js","assets/Room-pf_Wstb-.js"] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -}