@helia/verified-fetch
Version:
A fetch-like API for obtaining verified & trustless IPFS content on the web
3 lines • 1.18 MB
JavaScript
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.HeliaVerifiedFetch = factory()}(typeof self !== 'undefined' ? self : this, function () {
"use strict";var HeliaVerifiedFetch=(()=>{var wF=Object.create;var M0=Object.defineProperty;var xF=Object.getOwnPropertyDescriptor;var bF=Object.getOwnPropertyNames;var vF=Object.getPrototypeOf,EF=Object.prototype.hasOwnProperty;var Rt=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Dt=(r,e)=>{for(var t in e)M0(r,t,{get:e[t],enumerable:!0})},XS=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of bF(e))!EF.call(r,o)&&o!==t&&M0(r,o,{get:()=>e[o],enumerable:!(n=xF(e,o))||n.enumerable});return r};var gt=(r,e,t)=>(t=r!=null?wF(vF(r)):{},XS(e||!r||!r.__esModule?M0(t,"default",{value:r,enumerable:!0}):t,r)),SF=r=>XS(M0({},"__esModule",{value:!0}),r);var ET=Rt(ap=>{(function(){var r,e,t,n,o,i,s,a;a=function(c){var l,f,u,h;return l=(c&255<<24)>>>24,f=(c&255<<16)>>>16,u=(c&65280)>>>8,h=c&255,[l,f,u,h].join(".")},s=function(c){var l,f,u,h,d,m;for(l=[],u=h=0;h<=3&&c.length!==0;u=++h){if(u>0){if(c[0]!==".")throw new Error("Invalid IP");c=c.substring(1)}m=e(c),d=m[0],f=m[1],c=c.substring(f),l.push(d)}if(c.length!==0)throw new Error("Invalid IP");switch(l.length){case 1:if(l[0]>4294967295)throw new Error("Invalid IP");return l[0]>>>0;case 2:if(l[0]>255||l[1]>16777215)throw new Error("Invalid IP");return(l[0]<<24|l[1])>>>0;case 3:if(l[0]>255||l[1]>255||l[2]>65535)throw new Error("Invalid IP");return(l[0]<<24|l[1]<<16|l[2])>>>0;case 4:if(l[0]>255||l[1]>255||l[2]>255||l[3]>255)throw new Error("Invalid IP");return(l[0]<<24|l[1]<<16|l[2]<<8|l[3])>>>0;default:throw new Error("Invalid IP")}},t=function(c){return c.charCodeAt(0)},n=t("0"),i=t("a"),o=t("A"),e=function(c){var l,f,u,h,d;for(h=0,l=10,f="9",u=0,c.length>1&&c[u]==="0"&&(c[u+1]==="x"||c[u+1]==="X"?(u+=2,l=16):"0"<=c[u+1]&&c[u+1]<="9"&&(u++,l=8,f="7")),d=u;u<c.length;){if("0"<=c[u]&&c[u]<=f)h=h*l+(t(c[u])-n)>>>0;else if(l===16)if("a"<=c[u]&&c[u]<="f")h=h*l+(10+t(c[u])-i)>>>0;else if("A"<=c[u]&&c[u]<="F")h=h*l+(10+t(c[u])-o)>>>0;else break;else break;if(h>4294967295)throw new Error("too large");u++}if(u===d)throw new Error("empty octet");return[h,u]},r=(function(){function c(l,f){var u,h,d,m;if(typeof l!="string")throw new Error("Missing `net' parameter");if(f||(m=l.split("/",2),l=m[0],f=m[1]),f||(f=32),typeof f=="string"&&f.indexOf(".")>-1){try{this.maskLong=s(f)}catch(y){throw u=y,new Error("Invalid mask: "+f)}for(h=d=32;d>=0;h=--d)if(this.maskLong===4294967295<<32-h>>>0){this.bitmask=h;break}}else if(f||f===0)this.bitmask=parseInt(f,10),this.maskLong=0,this.bitmask>0&&(this.maskLong=4294967295<<32-this.bitmask>>>0);else throw new Error("Invalid mask: empty");try{this.netLong=(s(l)&this.maskLong)>>>0}catch(y){throw u=y,new Error("Invalid net address: "+l)}if(!(this.bitmask<=32))throw new Error("Invalid mask for ip4: "+f);this.size=Math.pow(2,32-this.bitmask),this.base=a(this.netLong),this.mask=a(this.maskLong),this.hostmask=a(~this.maskLong),this.first=this.bitmask<=30?a(this.netLong+1):this.base,this.last=this.bitmask<=30?a(this.netLong+this.size-2):a(this.netLong+this.size-1),this.broadcast=this.bitmask<=30?a(this.netLong+this.size-1):void 0}return c.prototype.contains=function(l){return typeof l=="string"&&(l.indexOf("/")>0||l.split(".").length!==4)&&(l=new c(l)),l instanceof c?this.contains(l.base)&&this.contains(l.broadcast||l.last):(s(l)&this.maskLong)>>>0===(this.netLong&this.maskLong)>>>0},c.prototype.next=function(l){return l==null&&(l=1),new c(a(this.netLong+this.size*l),this.mask)},c.prototype.forEach=function(l){var f,u,h;for(h=s(this.first),u=s(this.last),f=0;h<=u;)l(a(h),h,f),f++,h++},c.prototype.toString=function(){return this.base+"/"+this.bitmask},c})(),ap.ip2long=s,ap.long2ip=a,ap.Netmask=r}).call(ap)});var aI=Rt((cde,Ex)=>{"use strict";var Pq=Object.prototype.hasOwnProperty,dn="~";function kp(){}Object.create&&(kp.prototype=Object.create(null),new kp().__proto__||(dn=!1));function Rq(r,e,t){this.fn=r,this.context=e,this.once=t||!1}function sI(r,e,t,n,o){if(typeof t!="function")throw new TypeError("The listener must be a function");var i=new Rq(t,n||r,o),s=dn?dn+e:e;return r._events[s]?r._events[s].fn?r._events[s]=[r._events[s],i]:r._events[s].push(i):(r._events[s]=i,r._eventsCount++),r}function g2(r,e){--r._eventsCount===0?r._events=new kp:delete r._events[e]}function Qr(){this._events=new kp,this._eventsCount=0}Qr.prototype.eventNames=function(){var e=[],t,n;if(this._eventsCount===0)return e;for(n in t=this._events)Pq.call(t,n)&&e.push(dn?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};Qr.prototype.listeners=function(e){var t=dn?dn+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,s=new Array(i);o<i;o++)s[o]=n[o].fn;return s};Qr.prototype.listenerCount=function(e){var t=dn?dn+e:e,n=this._events[t];return n?n.fn?1:n.length:0};Qr.prototype.emit=function(e,t,n,o,i,s){var a=dn?dn+e:e;if(!this._events[a])return!1;var c=this._events[a],l=arguments.length,f,u;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,o),!0;case 5:return c.fn.call(c.context,t,n,o,i),!0;case 6:return c.fn.call(c.context,t,n,o,i,s),!0}for(u=1,f=new Array(l-1);u<l;u++)f[u-1]=arguments[u];c.fn.apply(c.context,f)}else{var h=c.length,d;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,o);break;default:if(!f)for(d=1,f=new Array(l-1);d<l;d++)f[d-1]=arguments[d];c[u].fn.apply(c[u].context,f)}}return!0};Qr.prototype.on=function(e,t,n){return sI(this,e,t,n,!1)};Qr.prototype.once=function(e,t,n){return sI(this,e,t,n,!0)};Qr.prototype.removeListener=function(e,t,n,o){var i=dn?dn+e:e;if(!this._events[i])return this;if(!t)return g2(this,i),this;var s=this._events[i];if(s.fn)s.fn===t&&(!o||s.once)&&(!n||s.context===n)&&g2(this,i);else{for(var a=0,c=[],l=s.length;a<l;a++)(s[a].fn!==t||o&&!s[a].once||n&&s[a].context!==n)&&c.push(s[a]);c.length?this._events[i]=c.length===1?c[0]:c:g2(this,i)}return this};Qr.prototype.removeAllListeners=function(e){var t;return e?(t=dn?dn+e:e,this._events[t]&&g2(this,t)):(this._events=new kp,this._eventsCount=0),this};Qr.prototype.off=Qr.prototype.removeListener;Qr.prototype.addListener=Qr.prototype.on;Qr.prefixed=dn;Qr.EventEmitter=Qr;typeof Ex<"u"&&(Ex.exports=Qr)});var fI=Rt((Rde,uI)=>{uI.exports=function(r){if(!r)throw Error("hashlru must have a max value, of type number, greater than 0");var e=0,t=Object.create(null),n=Object.create(null);function o(i,s){t[i]=s,e++,e>=r&&(e=0,n=t,t=Object.create(null))}return{has:function(i){return t[i]!==void 0||n[i]!==void 0},remove:function(i){t[i]!==void 0&&(t[i]=void 0),n[i]!==void 0&&(n[i]=void 0)},get:function(i){var s=t[i];if(s!==void 0)return s;if((s=n[i])!==void 0)return o(i,s),s},set:function(i,s){t[i]!==void 0?t[i]=s:o(i,s)},clear:function(){t=Object.create(null),n=Object.create(null)}}}});var by=Rt((t0e,d9)=>{var e0e=(function(){typeof d9<"u"&&(d9.exports=y);var r=86400,e=3200,t=146097*e/400,n=r*t,o=1e3*n,i=864e13,s=4294967296,a=1e6,c="000000000",l=Math.trunc||function(T){var k=T-T%1;return k==0&&(T<0||T===0&&1/T!=1/0)?-0:k},f=y.prototype,u=(y.fromDate=function(T){return new y(+T)},y.fromInt64BE=I(0,1,2,3,0,4),y.fromInt64LE=I(3,2,1,0,4,0),y.fromString=function(W){var k,z=new y,W=(W+="").replace(/^\s*[+\-]?\d+/,function(S){var S=+S,C=1970+(S-1970)%400;return z.year=S-C,C}).replace(/(?:Z|([+\-]\d{2}):?(\d{2}))$/,function($,S,C){return S<0&&(C*=-1),k=6e4*(60*+S+ +C),""}).replace(/\.\d+$/,function($){return z.nano=+($+c).substr(1,9),""}).split(/\D+/);if(1<W.length?W[1]--:W[1]=0,z.time=k=Date.UTC.apply(Date,W)-(k||0),isNaN(k))throw new TypeError("Invalid Date");return w(z)},y.fromTimeT=function(T){return v(T,0)},f.year=0,f.time=0,f.nano=0,f.addNano=function(T){return this.nano+=+T||0,this},f.getNano=function(){var T=w(this);return(T.time%1e3*a+ +T.nano+1e9)%1e9},f.getTimeT=function(){var k=w(this),T=Math.floor(k.time/1e3),k=k.year;return k&&(T+=k*t*r/e),T},f.getYear=function(){return this.toDate().getUTCFullYear()+this.year},f.toDate=function(){return x(w(this).time)},f.toJSON=function(){return this.toString().replace(/0{1,6}Z$/,"Z")},f.toString=function(T){var k=this,z=k.toDate(),W={H:function(){return V(z.getUTCHours())},L:function(){return M(z.getUTCMilliseconds(),3)},M:function(){return V(z.getUTCMinutes())},N:function(){return M(k.getNano(),9)},S:function(){return V(z.getUTCSeconds())},Y:function(){var $=k.getYear();return 999999<$?"+"+$:9999<$?"+"+M($,6):0<=$?M($,4):-999999<=$?"-"+M(-$,6):$},a:function(){return d[z.getUTCDay()]},b:function(){return h[z.getUTCMonth()]},d:function(){return V(z.getUTCDate())},e:function(){return(function($){return(9<$?"":" ")+(0|$)})(z.getUTCDate())},m:function(){return V(z.getUTCMonth()+1)}};return(function $(S){return S.replace(/%./g,function(C){var B=C[1],_=m[B],B=W[B];return _?$(_):B?B():C})})(T||u)},f.writeInt64BE=E(0,1,2,3,0,4),f.writeInt64LE=E(3,2,1,0,4,0),"%Y-%m-%dT%H:%M:%S.%NZ"),h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],d=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],m={"%":"%",F:"%Y-%m-%d",n:`
`,R:"%H:%M",T:"%H:%M:%S",t:" ",X:"%T",Z:"GMT",z:"+0000"};return y;function y(T,k,z){var W=this;if(!(W instanceof y))return new y(T,k,z);W.time=+T||0,W.nano=+k||0,W.year=+z||0,w(W)}function w(T){var k,z,W,$=T.year,S=T.time,C=T.nano,_=((C<0||a<=C)&&(C-=(z=Math.floor(C/a))*a,S+=z,z=1),$%e);return(S<-i||i<S||_)&&((k=l(S/o))&&($+=k*e,S-=k*o),(W=x(S)).setUTCFullYear(_+W.getUTCFullYear()),W=(S=+W)+(k=l(($-=_)/e))*o,k&&-i<=W&&W<=i&&($-=k*e,S=W),z=1),z&&(T.year=$,T.time=S,T.nano=C),T}function x(T){var k=new Date(0);return k.setTime(T),k}function v($,W){$=+$||0;var z=l((W=(W|0)*s)/n)+l($/n),W=W%n+$%n,$=l(W/n);return $&&(z+=$,W-=$*n),new y(1e3*W,0,z*e)}function E(T,k,z,W,$,S){return function(_,B){var G=w(this);_=_||new Array(8),U(_,B|=0);var F=Math.floor(G.time/1e3),G=G.year*(t*r/e),X=l(G/s)+l(F/s),G=G%s+F%s,F=Math.floor(G/s);return F&&(X+=F,G-=F*s),C(_,B+$,X),C(_,B+S,G),_};function C(_,B,X){_[B+T]=X>>24&255,_[B+k]=X>>16&255,_[B+z]=X>>8&255,_[B+W]=255&X}}function I(T,k,z,W,$,S){return function(_,B){U(_,B|=0);var X=C(_,B+$);return v(C(_,B+S),X)};function C(_,B){return 16777216*_[B+T]+(_[B+k]<<16|_[B+z]<<8|_[B+W])}}function U(T,k){if(T=T&&T.length,T==null)throw new TypeError("Invalid Buffer");if(T<k+8)throw new RangeError("Out of range")}function V(T){return(9<T?"":"0")+(0|T)}function M(T,k){return(c+(0|T)).substr(-k)}})()});var pP=Rt((m8e,hP)=>{"use strict";function dW(r){return r>=55296&&r<=56319}function hW(r){return r>=56320&&r<=57343}hP.exports=function(e,t,n){if(typeof t!="string")throw new Error("Input must be string");for(var o=t.length,i=0,s,a,c=0;c<o;c+=1){if(s=t.charCodeAt(c),a=t[c],dW(s)&&hW(t.charCodeAt(c+1))&&(c+=1,a+=t[c]),i+=e(a),i===n)return t.slice(0,c+1);if(i>n)return t.slice(0,c-a.length+1)}return t}});var gP=Rt((g8e,mP)=>{"use strict";function pW(r){return r>=55296&&r<=56319}function mW(r){return r>=56320&&r<=57343}mP.exports=function(e){if(typeof e!="string")throw new Error("Input must be string");for(var t=e.length,n=0,o=null,i=null,s=0;s<t;s++)o=e.charCodeAt(s),mW(o)?i!=null&&pW(i)?n+=1:n+=3:o<=127?n+=1:o>=128&&o<=2047?n+=2:o>=2048&&o<=65535&&(n+=3),i=o;return n}});var wP=Rt((y8e,yP)=>{"use strict";var gW=pP(),yW=gP();yP.exports=gW.bind(null,yW)});var vP=Rt((w8e,bP)=>{"use strict";var wW=wP(),xW=/[\/\?<>\\:\*\|"]/g,bW=/[\x00-\x1f\x80-\x9f]/g,vW=/^\.+$/,EW=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,SW=/[\. ]+$/;function xP(r,e){if(typeof r!="string")throw new Error("Input must be string");var t=r.replace(xW,e).replace(bW,e).replace(vW,e).replace(EW,e).replace(SW,e);return wW(t,255)}bP.exports=function(r,e){var t=e&&e.replacement||"",n=xP(r,t);return t===""?n:xP(n,"")}});var Hs=Rt(Zf=>{"use strict";var _W="[object ArrayBuffer]",$s=class r{static isArrayBuffer(e){return Object.prototype.toString.call(e)===_W}static toArrayBuffer(e){return this.isArrayBuffer(e)?e:e.byteLength===e.buffer.byteLength||e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:this.toUint8Array(e.buffer).slice(e.byteOffset,e.byteOffset+e.byteLength).buffer}static toUint8Array(e){return this.toView(e,Uint8Array)}static toView(e,t){if(e.constructor===t)return e;if(this.isArrayBuffer(e))return new t(e);if(this.isArrayBufferView(e))return new t(e.buffer,e.byteOffset,e.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)}static isArrayBufferView(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)}static isEqual(e,t){let n=r.toUint8Array(e),o=r.toUint8Array(t);if(n.length!==o.byteLength)return!1;for(let i=0;i<n.length;i++)if(n[i]!==o[i])return!1;return!0}static concat(...e){let t;Array.isArray(e[0])&&!(e[1]instanceof Function)||Array.isArray(e[0])&&e[1]instanceof Function?t=e[0]:e[e.length-1]instanceof Function?t=e.slice(0,e.length-1):t=e;let n=0;for(let s of t)n+=s.byteLength;let o=new Uint8Array(n),i=0;for(let s of t){let a=this.toUint8Array(s);o.set(a,i),i+=a.length}return e[e.length-1]instanceof Function?this.toView(o,e[e.length-1]):o.buffer}},q9="string",TW=/^[0-9a-f\s]+$/i,CW=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,IW=/^[a-zA-Z0-9-_]+$/,_3=class{static fromString(e){let t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n.buffer}static toString(e){let t=$s.toUint8Array(e),n="";for(let i=0;i<t.length;i++)n+=String.fromCharCode(t[i]);return decodeURIComponent(escape(n))}},No=class{static toString(e,t=!1){let n=$s.toArrayBuffer(e),o=new DataView(n),i="";for(let s=0;s<n.byteLength;s+=2){let a=o.getUint16(s,t);i+=String.fromCharCode(a)}return i}static fromString(e,t=!1){let n=new ArrayBuffer(e.length*2),o=new DataView(n);for(let i=0;i<e.length;i++)o.setUint16(i*2,e.charCodeAt(i),t);return n}},T3=class r{static isHex(e){return typeof e===q9&&TW.test(e)}static isBase64(e){return typeof e===q9&&CW.test(e)}static isBase64Url(e){return typeof e===q9&&IW.test(e)}static ToString(e,t="utf8"){let n=$s.toUint8Array(e);switch(t.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);case"utf16le":return No.toString(n,!0);case"utf16":case"utf16be":return No.toString(n);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromString(e,t="utf8"){if(!e)return new ArrayBuffer(0);switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);case"utf16le":return No.fromString(e,!0);case"utf16":case"utf16be":return No.fromString(e);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToBase64(e){let t=$s.toUint8Array(e);if(typeof btoa<"u"){let n=this.ToString(t,"binary");return btoa(n)}else return Buffer.from(t).toString("base64")}static FromBase64(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!r.isBase64(t))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return typeof atob<"u"?this.FromBinary(atob(t)):new Uint8Array(Buffer.from(t,"base64")).buffer}static FromBase64Url(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!r.isBase64Url(t))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(t.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(e,t=r.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.FromBinary(e);case"utf8":return _3.fromString(e);case"utf16":case"utf16be":return No.fromString(e);case"utf16le":case"usc2":return No.fromString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToUtf8String(e,t=r.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.ToBinary(e);case"utf8":return _3.toString(e);case"utf16":case"utf16be":return No.toString(e);case"utf16le":case"usc2":return No.toString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromBinary(e){let t=e.length,n=new Uint8Array(t);for(let o=0;o<t;o++)n[o]=e.charCodeAt(o);return n.buffer}static ToBinary(e){let t=$s.toUint8Array(e),n="";for(let o=0;o<t.length;o++)n+=String.fromCharCode(t[o]);return n}static ToHex(e){let t=$s.toUint8Array(e),n="",o=t.length;for(let i=0;i<o;i++){let s=t[i];s<16&&(n+="0"),n+=s.toString(16)}return n}static FromHex(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!r.isHex(t))throw new TypeError("Argument 'hexString' is not HEX encoded");t.length%2&&(t=`0${t}`);let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o=o+2){let i=t.slice(o,o+2);n[o/2]=parseInt(i,16)}return n.buffer}static ToUtf16String(e,t=!1){return No.toString(e,t)}static FromUtf16String(e,t=!1){return No.fromString(e,t)}static Base64Padding(e){let t=4-e.length%4;if(t<4)for(let n=0;n<t;n++)e+="=";return e}static formatString(e){return e?.replace(/[\n\r\t ]/g,"")||""}};T3.DEFAULT_UTF8_ENCODING="utf8";function kW(r,...e){let t=arguments[0];for(let n=1;n<arguments.length;n++){let o=arguments[n];for(let i in o)t[i]=o[i]}return t}function PW(...r){let e=r.map(o=>o.byteLength).reduce((o,i)=>o+i),t=new Uint8Array(e),n=0;return r.map(o=>new Uint8Array(o)).forEach(o=>{for(let i of o)t[n++]=i}),t.buffer}function RW(r,e){if(!(r&&e)||r.byteLength!==e.byteLength)return!1;let t=new Uint8Array(r),n=new Uint8Array(e);for(let o=0;o<r.byteLength;o++)if(t[o]!==n[o])return!1;return!0}Zf.BufferSourceConverter=$s;Zf.Convert=T3;Zf.assign=kW;Zf.combine=PW;Zf.isEqual=RW});var MO=Rt(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.parseCookie=LO;Gi.parse=LO;Gi.stringifyCookie=cX;Gi.stringifySetCookie=D4;Gi.serialize=D4;Gi.parseSetCookie=lX;Gi.stringifySetCookie=D4;Gi.serialize=D4;var DO=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,NO=/^[\u0021-\u003A\u003C-\u007E]*$/,nX=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,oX=/^[\u0020-\u003A\u003D-\u007E]*$/,iX=/^-?\d+$/,sX=Object.prototype.toString,aX=(()=>{let r=function(){};return r.prototype=Object.create(null),r})();function LO(r,e){let t=new aX,n=r.length;if(n<2)return t;let o=e?.decode||BO,i=0;do{let s=Fb(r,i,n);if(s===-1)break;let a=Ub(r,i,n);if(s>a){i=r.lastIndexOf(";",s-1)+1;continue}let c=ja(r,i,s);t[c]===void 0&&(t[c]=o(ja(r,s+1,a))),i=a+1}while(i<n);return t}function cX(r,e){let t=e?.encode||encodeURIComponent,n=[];for(let o of Object.keys(r)){let i=r[o];if(i===void 0)continue;if(!DO.test(o))throw new TypeError(`cookie name is invalid: ${o}`);let s=t(i);if(!NO.test(s))throw new TypeError(`cookie val is invalid: ${i}`);n.push(`${o}=${s}`)}return n.join("; ")}function D4(r,e,t){let n=typeof r=="object"?r:{...t,name:r,value:String(e)},i=(typeof e=="object"?e:t)?.encode||encodeURIComponent;if(!DO.test(n.name))throw new TypeError(`argument name is invalid: ${n.name}`);let s=n.value?i(n.value):"";if(!NO.test(s))throw new TypeError(`argument val is invalid: ${n.value}`);let a=n.name+"="+s;if(n.maxAge!==void 0){if(!Number.isInteger(n.maxAge))throw new TypeError(`option maxAge is invalid: ${n.maxAge}`);a+="; Max-Age="+n.maxAge}if(n.domain){if(!nX.test(n.domain))throw new TypeError(`option domain is invalid: ${n.domain}`);a+="; Domain="+n.domain}if(n.path){if(!oX.test(n.path))throw new TypeError(`option path is invalid: ${n.path}`);a+="; Path="+n.path}if(n.expires){if(!uX(n.expires)||!Number.isFinite(n.expires.valueOf()))throw new TypeError(`option expires is invalid: ${n.expires}`);a+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.partitioned&&(a+="; Partitioned"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():void 0){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${n.priority}`)}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"none":a+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${n.sameSite}`)}return a}function lX(r,e){let t=e?.decode||BO,n=r.length,o=Ub(r,0,n),i=Fb(r,0,o),s=i===-1?{name:"",value:t(ja(r,0,o))}:{name:ja(r,0,i),value:t(ja(r,i+1,o))},a=o+1;for(;a<n;){let c=Ub(r,a,n),l=Fb(r,a,c),f=l===-1?ja(r,a,c):ja(r,a,l),u=l===-1?void 0:ja(r,l+1,c);switch(f.toLowerCase()){case"httponly":s.httpOnly=!0;break;case"secure":s.secure=!0;break;case"partitioned":s.partitioned=!0;break;case"domain":s.domain=u;break;case"path":s.path=u;break;case"max-age":u&&iX.test(u)&&(s.maxAge=Number(u));break;case"expires":if(!u)break;let h=new Date(u);Number.isFinite(h.valueOf())&&(s.expires=h);break;case"priority":if(!u)break;let d=u.toLowerCase();(d==="low"||d==="medium"||d==="high")&&(s.priority=d);break;case"samesite":if(!u)break;let m=u.toLowerCase();(m==="lax"||m==="strict"||m==="none")&&(s.sameSite=m);break}a=c+1}return s}function Ub(r,e,t){let n=r.indexOf(";",e);return n===-1?t:n}function Fb(r,e,t){let n=r.indexOf("=",e);return n<t?n:-1}function ja(r,e,t){let n=e,o=t;do{let i=r.charCodeAt(n);if(i!==32&&i!==9)break}while(++n<o);for(;o>n;){let i=r.charCodeAt(o-1);if(i!==32&&i!==9)break;o--}return r.slice(n,o)}function BO(r){if(r.indexOf("%")===-1)return r;try{return decodeURIComponent(r)}catch{return r}}function uX(r){return sX.call(r)==="[object Date]"}});var cN=Rt(()=>{var aN;(function(r){(function(e){var t=typeof globalThis=="object"||typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof this=="object"?this:a(),n=o(r);typeof t.Reflect<"u"&&(n=o(t.Reflect,n)),e(n,t),typeof t.Reflect>"u"&&(t.Reflect=r);function o(c,l){return function(f,u){Object.defineProperty(c,f,{configurable:!0,writable:!0,value:u}),l&&l(f,u)}}function i(){try{return Function("return this;")()}catch{}}function s(){try{return(0,eval)("(function() { return this; })()")}catch{}}function a(){return i()||s()}})(function(e,t){var n=Object.prototype.hasOwnProperty,o=typeof Symbol=="function",i=o&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=o&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",a=typeof Object.create=="function",c={__proto__:[]}instanceof Array,l=!a&&!c,f={create:a?function(){return q8(Object.create(null))}:c?function(){return q8({__proto__:null})}:function(){return q8({})},has:l?function(P,L){return n.call(P,L)}:function(P,L){return L in P},get:l?function(P,L){return n.call(P,L)?P[L]:void 0}:function(P,L){return P[L]}},u=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:hF(),d=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:pF(),m=typeof WeakMap=="function"?WeakMap:mF(),y=o?Symbol.for("@reflect-metadata:registry"):void 0,w=uF(),x=fF(w);function v(P,L,q,te){if(K(q)){if(!cs(P))throw new TypeError;if(!ua(L))throw new TypeError;return $(P,L)}else{if(!cs(P))throw new TypeError;if(!he(L))throw new TypeError;if(!he(te)&&!K(te)&&!De(te))throw new TypeError;return De(te)&&(te=void 0),q=ct(q),S(P,L,q,te)}}e("decorate",v);function E(P,L){function q(te,Se){if(!he(te))throw new TypeError;if(!K(Se)&&!B0(Se))throw new TypeError;G(P,L,te,Se)}return q}e("metadata",E);function I(P,L,q,te){if(!he(q))throw new TypeError;return K(te)||(te=ct(te)),G(P,L,q,te)}e("defineMetadata",I);function U(P,L,q){if(!he(L))throw new TypeError;return K(q)||(q=ct(q)),C(P,L,q)}e("hasMetadata",U);function V(P,L,q){if(!he(L))throw new TypeError;return K(q)||(q=ct(q)),_(P,L,q)}e("hasOwnMetadata",V);function M(P,L,q){if(!he(L))throw new TypeError;return K(q)||(q=ct(q)),B(P,L,q)}e("getMetadata",M);function T(P,L,q){if(!he(L))throw new TypeError;return K(q)||(q=ct(q)),X(P,L,q)}e("getOwnMetadata",T);function k(P,L){if(!he(P))throw new TypeError;return K(L)||(L=ct(L)),F(P,L)}e("getMetadataKeys",k);function z(P,L){if(!he(P))throw new TypeError;return K(L)||(L=ct(L)),Q(P,L)}e("getOwnMetadataKeys",z);function W(P,L,q){if(!he(L))throw new TypeError;if(K(q)||(q=ct(q)),!he(L))throw new TypeError;K(q)||(q=ct(q));var te=bh(L,q,!1);return K(te)?!1:te.OrdinaryDeleteMetadata(P,L,q)}e("deleteMetadata",W);function $(P,L){for(var q=P.length-1;q>=0;--q){var te=P[q],Se=te(L);if(!K(Se)&&!De(Se)){if(!ua(Se))throw new TypeError;L=Se}}return L}function S(P,L,q,te){for(var Se=P.length-1;Se>=0;--Se){var zt=P[Se],ar=zt(L,q,te);if(!K(ar)&&!De(ar)){if(!he(ar))throw new TypeError;te=ar}}return te}function C(P,L,q){var te=_(P,L,q);if(te)return!0;var Se=V8(L);return De(Se)?!1:C(P,Se,q)}function _(P,L,q){var te=bh(L,q,!1);return K(te)?!1:Pt(te.OrdinaryHasOwnMetadata(P,L,q))}function B(P,L,q){var te=_(P,L,q);if(te)return X(P,L,q);var Se=V8(L);if(!De(Se))return B(P,Se,q)}function X(P,L,q){var te=bh(L,q,!1);if(!K(te))return te.OrdinaryGetOwnMetadata(P,L,q)}function G(P,L,q,te){var Se=bh(q,te,!0);Se.OrdinaryDefineOwnMetadata(P,L,q,te)}function F(P,L){var q=Q(P,L),te=V8(P);if(te===null)return q;var Se=F(te,L);if(Se.length<=0)return q;if(q.length<=0)return Se;for(var zt=new d,ar=[],Ue=0,ae=q;Ue<ae.length;Ue++){var fe=ae[Ue],pe=zt.has(fe);pe||(zt.add(fe),ar.push(fe))}for(var ye=0,$e=Se;ye<$e.length;ye++){var fe=$e[ye],pe=zt.has(fe);pe||(zt.add(fe),ar.push(fe))}return ar}function Q(P,L){var q=bh(P,L,!1);return q?q.OrdinaryOwnMetadataKeys(P,L):[]}function ne(P){if(P===null)return 1;switch(typeof P){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return P===null?1:6;default:return 6}}function K(P){return P===void 0}function De(P){return P===null}function Me(P){return typeof P=="symbol"}function he(P){return typeof P=="object"?P!==null:typeof P=="function"}function Ke(P,L){switch(ne(P)){case 0:return P;case 1:return P;case 2:return P;case 3:return P;case 4:return P;case 5:return P}var q=L===3?"string":L===5?"number":"default",te=xh(P,i);if(te!==void 0){var Se=te.call(P,q);if(he(Se))throw new TypeError;return Se}return at(P,q==="default"?"number":q)}function at(P,L){if(L==="string"){var q=P.toString;if(Go(q)){var te=q.call(P);if(!he(te))return te}var Se=P.valueOf;if(Go(Se)){var te=Se.call(P);if(!he(te))return te}}else{var Se=P.valueOf;if(Go(Se)){var te=Se.call(P);if(!he(te))return te}var zt=P.toString;if(Go(zt)){var te=zt.call(P);if(!he(te))return te}}throw new TypeError}function Pt(P){return!!P}function We(P){return""+P}function ct(P){var L=Ke(P,3);return Me(L)?L:We(L)}function cs(P){return Array.isArray?Array.isArray(P):P instanceof Object?P instanceof Array:Object.prototype.toString.call(P)==="[object Array]"}function Go(P){return typeof P=="function"}function ua(P){return typeof P=="function"}function B0(P){switch(ne(P)){case 3:return!0;case 4:return!0;default:return!1}}function Mu(P,L){return P===L||P!==P&&L!==L}function xh(P,L){var q=P[L];if(q!=null){if(!Go(q))throw new TypeError;return q}}function qS(P){var L=xh(P,s);if(!Go(L))throw new TypeError;var q=L.call(P);if(!he(q))throw new TypeError;return q}function zS(P){return P.value}function jS(P){var L=P.next();return L.done?!1:L}function WS(P){var L=P.return;L&&L.call(P)}function V8(P){var L=Object.getPrototypeOf(P);if(typeof P!="function"||P===u||L!==u)return L;var q=P.prototype,te=q&&Object.getPrototypeOf(q);if(te==null||te===Object.prototype)return L;var Se=te.constructor;return typeof Se!="function"||Se===P?L:Se}function lF(){var P;!K(y)&&typeof t.Reflect<"u"&&!(y in t.Reflect)&&typeof t.Reflect.defineMetadata=="function"&&(P=dF(t.Reflect));var L,q,te,Se=new m,zt={registerProvider:ar,getProvider:ae,setProvider:pe};return zt;function ar(ye){if(!Object.isExtensible(zt))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case P===ye:break;case K(L):L=ye;break;case L===ye:break;case K(q):q=ye;break;case q===ye:break;default:te===void 0&&(te=new d),te.add(ye);break}}function Ue(ye,$e){if(!K(L)){if(L.isProviderFor(ye,$e))return L;if(!K(q)){if(q.isProviderFor(ye,$e))return L;if(!K(te))for(var St=qS(te);;){var jt=jS(St);if(!jt)return;var Xo=zS(jt);if(Xo.isProviderFor(ye,$e))return WS(St),Xo}}}if(!K(P)&&P.isProviderFor(ye,$e))return P}function ae(ye,$e){var St=Se.get(ye),jt;return K(St)||(jt=St.get($e)),K(jt)&&(jt=Ue(ye,$e),K(jt)||(K(St)&&(St=new h,Se.set(ye,St)),St.set($e,jt))),jt}function fe(ye){if(K(ye))throw new TypeError;return L===ye||q===ye||!K(te)&&te.has(ye)}function pe(ye,$e,St){if(!fe(St))throw new Error("Metadata provider not registered.");var jt=ae(ye,$e);if(jt!==St){if(!K(jt))return!1;var Xo=Se.get(ye);K(Xo)&&(Xo=new h,Se.set(ye,Xo)),Xo.set($e,St)}return!0}}function uF(){var P;return!K(y)&&he(t.Reflect)&&Object.isExtensible(t.Reflect)&&(P=t.Reflect[y]),K(P)&&(P=lF()),!K(y)&&he(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,y,{enumerable:!1,configurable:!1,writable:!1,value:P}),P}function fF(P){var L=new m,q={isProviderFor:function(fe,pe){var ye=L.get(fe);return K(ye)?!1:ye.has(pe)},OrdinaryDefineOwnMetadata:ar,OrdinaryHasOwnMetadata:Se,OrdinaryGetOwnMetadata:zt,OrdinaryOwnMetadataKeys:Ue,OrdinaryDeleteMetadata:ae};return w.registerProvider(q),q;function te(fe,pe,ye){var $e=L.get(fe),St=!1;if(K($e)){if(!ye)return;$e=new h,L.set(fe,$e),St=!0}var jt=$e.get(pe);if(K(jt)){if(!ye)return;if(jt=new h,$e.set(pe,jt),!P.setProvider(fe,pe,q))throw $e.delete(pe),St&&L.delete(fe),new Error("Wrong provider for target.")}return jt}function Se(fe,pe,ye){var $e=te(pe,ye,!1);return K($e)?!1:Pt($e.has(fe))}function zt(fe,pe,ye){var $e=te(pe,ye,!1);if(!K($e))return $e.get(fe)}function ar(fe,pe,ye,$e){var St=te(ye,$e,!0);St.set(fe,pe)}function Ue(fe,pe){var ye=[],$e=te(fe,pe,!1);if(K($e))return ye;for(var St=$e.keys(),jt=qS(St),Xo=0;;){var GS=jS(jt);if(!GS)return ye.length=Xo,ye;var gF=zS(GS);try{ye[Xo]=gF}catch(yF){try{WS(jt)}finally{throw yF}}Xo++}}function ae(fe,pe,ye){var $e=te(pe,ye,!1);if(K($e)||!$e.delete(fe))return!1;if($e.size===0){var St=L.get(pe);K(St)||(St.delete(ye),St.size===0&&L.delete(St))}return!0}}function dF(P){var L=P.defineMetadata,q=P.hasOwnMetadata,te=P.getOwnMetadata,Se=P.getOwnMetadataKeys,zt=P.deleteMetadata,ar=new m,Ue={isProviderFor:function(ae,fe){var pe=ar.get(ae);return!K(pe)&&pe.has(fe)?!0:Se(ae,fe).length?(K(pe)&&(pe=new d,ar.set(ae,pe)),pe.add(fe),!0):!1},OrdinaryDefineOwnMetadata:L,OrdinaryHasOwnMetadata:q,OrdinaryGetOwnMetadata:te,OrdinaryOwnMetadataKeys:Se,OrdinaryDeleteMetadata:zt};return Ue}function bh(P,L,q){var te=w.getProvider(P,L);if(!K(te))return te;if(q){if(w.setProvider(P,L,x))return x;throw new Error("Illegal state.")}}function hF(){var P={},L=[],q=(function(){function Ue(ae,fe,pe){this._index=0,this._keys=ae,this._values=fe,this._selector=pe}return Ue.prototype["@@iterator"]=function(){return this},Ue.prototype[s]=function(){return this},Ue.prototype.next=function(){var ae=this._index;if(ae>=0&&ae<this._keys.length){var fe=this._selector(this._keys[ae],this._values[ae]);return ae+1>=this._keys.length?(this._index=-1,this._keys=L,this._values=L):this._index++,{value:fe,done:!1}}return{value:void 0,done:!0}},Ue.prototype.throw=function(ae){throw this._index>=0&&(this._index=-1,this._keys=L,this._values=L),ae},Ue.prototype.return=function(ae){return this._index>=0&&(this._index=-1,this._keys=L,this._values=L),{value:ae,done:!0}},Ue})(),te=(function(){function Ue(){this._keys=[],this._values=[],this._cacheKey=P,this._cacheIndex=-2}return Object.defineProperty(Ue.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Ue.prototype.has=function(ae){return this._find(ae,!1)>=0},Ue.prototype.get=function(ae){var fe=this._find(ae,!1);return fe>=0?this._values[fe]:void 0},Ue.prototype.set=function(ae,fe){var pe=this._find(ae,!0);return this._values[pe]=fe,this},Ue.prototype.delete=function(ae){var fe=this._find(ae,!1);if(fe>=0){for(var pe=this._keys.length,ye=fe+1;ye<pe;ye++)this._keys[ye-1]=this._keys[ye],this._values[ye-1]=this._values[ye];return this._keys.length--,this._values.length--,Mu(ae,this._cacheKey)&&(this._cacheKey=P,this._cacheIndex=-2),!0}return!1},Ue.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=P,this._cacheIndex=-2},Ue.prototype.keys=function(){return new q(this._keys,this._values,Se)},Ue.prototype.values=function(){return new q(this._keys,this._values,zt)},Ue.prototype.entries=function(){return new q(this._keys,this._values,ar)},Ue.prototype["@@iterator"]=function(){return this.entries()},Ue.prototype[s]=function(){return this.entries()},Ue.prototype._find=function(ae,fe){if(!Mu(this._cacheKey,ae)){this._cacheIndex=-1;for(var pe=0;pe<this._keys.length;pe++)if(Mu(this._keys[pe],ae)){this._cacheIndex=pe;break}}return this._cacheIndex<0&&fe&&(this._cacheIndex=this._keys.length,this._keys.push(ae),this._values.push(void 0)),this._cacheIndex},Ue})();return te;function Se(Ue,ae){return Ue}function zt(Ue,ae){return ae}function ar(Ue,ae){return[Ue,ae]}}function pF(){var P=(function(){function L(){this._map=new h}return Object.defineProperty(L.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),L.prototype.has=function(q){return this._map.has(q)},L.prototype.add=function(q){return this._map.set(q,q),this},L.prototype.delete=function(q){return this._map.delete(q)},L.prototype.clear=function(){this._map.clear()},L.prototype.keys=function(){return this._map.keys()},L.prototype.values=function(){return this._map.keys()},L.prototype.entries=function(){return this._map.entries()},L.prototype["@@iterator"]=function(){return this.keys()},L.prototype[s]=function(){return this.keys()},L})();return P}function mF(){var P=16,L=f.create(),q=te();return(function(){function ae(){this._key=te()}return ae.prototype.has=function(fe){var pe=Se(fe,!1);return pe!==void 0?f.has(pe,this._key):!1},ae.prototype.get=function(fe){var pe=Se(fe,!1);return pe!==void 0?f.get(pe,this._key):void 0},ae.prototype.set=function(fe,pe){var ye=Se(fe,!0);return ye[this._key]=pe,this},ae.prototype.delete=function(fe){var pe=Se(fe,!1);return pe!==void 0?delete pe[this._key]:!1},ae.prototype.clear=function(){this._key=te()},ae})();function te(){var ae;do ae="@@WeakMap@@"+Ue();while(f.has(L,ae));return L[ae]=!0,ae}function Se(ae,fe){if(!n.call(ae,q)){if(!fe)return;Object.defineProperty(ae,q,{value:f.create()})}return ae[q]}function zt(ae,fe){for(var pe=0;pe<fe;++pe)ae[pe]=Math.random()*255|0;return ae}function ar(ae){if(typeof Uint8Array=="function"){var fe=new Uint8Array(ae);return typeof crypto<"u"?crypto.getRandomValues(fe):typeof msCrypto<"u"?msCrypto.getRandomValues(fe):zt(fe,ae),fe}return zt(new Array(ae),ae)}function Ue(){var ae=ar(P);ae[6]=ae[6]&79|64,ae[8]=ae[8]&191|128;for(var fe="",pe=0;pe<P;++pe){var ye=ae[pe];(pe===4||pe===6||pe===8)&&(fe+="-"),ye<16&&(fe+="0"),fe+=ye.toString(16).toLowerCase()}return fe}}function q8(P){return P.__=void 0,delete P.__,P}})})(aN||(aN={}))});var yL=Rt((iKe,d5)=>{var QN,ZN,JN,eL,tL,rL,nL,oL,iL,f5,fE,sL,aL,jd,cL,lL,uL,fL,dL,hL,pL,mL,gL;(function(r){var e=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof d5=="object"&&typeof d5.exports=="object"?r(t(e,t(d5.exports))):r(t(e));function t(n,o){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(i,s){return n[i]=o?o(i,s):s}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o])};QN=function(t,n){e(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)},ZN=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},JN=function(t,n){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.indexOf(i)<0&&(o[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s<i.length;s++)n.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(o[i[s]]=t[i[s]]);return o},eL=function(t,n,o,i){var s=arguments.length,a=s<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,o):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,o,i);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(a=(s<3?c(a):s>3?c(n,o,a):c(n,o))||a);return s>3&&a&&Object.defineProperty(n,o,a),a},tL=function(t,n){return function(o,i){n(o,i,t)}},rL=function(t,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,n)},nL=function(t,n,o,i){function s(a){return a instanceof o?a:new o(function(c){c(a)})}return new(o||(o=Promise))(function(a,c){function l(h){try{u(i.next(h))}catch(d){c(d)}}function f(h){try{u(i.throw(h))}catch(d){c(d)}}function u(h){h.done?a(h.value):s(h.value).then(l,f)}u((i=i.apply(t,n||[])).next())})},oL=function(t,n){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,s,a,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(u){return function(h){return f([u,h])}}function f(u){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,s&&(a=u[0]&2?s.return:u[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,u[1])).done)return a;switch(s=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,s=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=n.call(t,o)}catch(h){u=[6,h],s=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},gL=function(t,n,o,i){i===void 0&&(i=o),t[i]=n[o]},iL=function(t,n){for(var o in t)o!=="default"&&!n.hasOwnProperty(o)&&(n[o]=t[o])},f5=function(t){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&t[n],i=0;if(o)return o.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},fE=function(t,n){var o=typeof Symbol=="function"&&t[Symbol.iterator];if(!o)return t;var i=o.call(t),s,a=[],c;try{for(;(n===void 0||n-- >0)&&!(s=i.next()).done;)a.push(s.value)}catch(l){c={error:l}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(c)throw c.error}}return a},sL=function(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(fE(arguments[n]));return t},aL=function(){for(var t=0,n=0,o=arguments.length;n<o;n++)t+=arguments[n].length;for(var i=Array(t),s=0,n=0;n<o;n++)for(var a=arguments[n],c=0,l=a.length;c<l;c++,s++)i[s]=a[c];return i},jd=function(t){return this instanceof jd?(this.v=t,this):new jd(t)},cL=function(t,n,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=o.apply(t,n||[]),s,a=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(m){i[m]&&(s[m]=function(y){return new Promise(function(w,x){a.push([m,y,w,x])>1||l(m,y)})})}function l(m,y){try{f(i[m](y))}catch(w){d(a[0][3],w)}}function f(m){m.value instanceof jd?Promise.resolve(m.value.v).then(u,h):d(a[0][2],m)}function u(m){l("next",m)}function h(m){l("throw",m)}function d(m,y){m(y),a.shift(),a.length&&l(a[0][0],a[0][1])}},lL=function(t){var n,o;return n={},i("next"),i("throw",function(s){throw s}),i("return"),n[Symbol.iterator]=function(){return this},n;function i(s,a){n[s]=t[s]?function(c){return(o=!o)?{value:jd(t[s](c)),done:s==="return"}:a?a(c):c}:a}},uL=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],o;return n?n.call(t):(t=typeof f5=="function"?f5(t):t[Symbol.iterator](),o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o);function i(a){o[a]=t[a]&&function(c){return new Promise(function(l,f){c=t[a](c),s(l,f,c.done,c.value)})}}function s(a,c,l,f){Promise.resolve(f).then(function(u){a({value:u,done:l})},c)}},fL=function(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t},dL=function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var o in t)Object.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n.default=t,n},hL=function(t){return t&&t.__esModule?t:{default:t}},pL=function(t,n){if(!n.has(t))throw new TypeError("attempted to get private field on non-instance");return n.get(t)},mL=function(t,n,o){if(!n.has(t))throw new TypeError("attempted to set private field on non-instance");return n.set(t,o),o},r("__extends",QN),r("__assign",ZN),r("__rest",JN),r("__decorate",eL),r("__param",tL),r("__metadata",rL),r("__awaiter",nL),r("__generator",oL),r("__exportStar",iL),r("__createBinding",gL),r("__values",f5),r("__read",fE),r("__spread",sL),r("__spreadArrays",aL),r("__await",jd),r("__asyncGenerator",cL),r("__asyncDelegator",lL),r("__asyncValues",uL),r("__makeTemplateObject",fL),r("__importStar",dL),r("__importDefault",hL),r("__classPrivateFieldGet",pL),r("__classPrivateFieldSet",mL)})});var hM=Rt((jYe,dM)=>{dM.exports=uS;var fM=128,MQ=127,UQ=~MQ,FQ=Math.pow(2,31);function uS(r,e,t){if(Number.MAX_SAFE_INTEGER&&r>Number.MAX_SAFE_INTEGER)throw uS.bytes=0,new RangeError("Could not encode varint");e=e||[],t=t||0;for(var n=t;r>=FQ;)e[t++]=r&255|fM,r/=128;for(;r&UQ;)e[t++]=r&255|fM,r>>>=7;return e[t]=r|0,uS.bytes=t-n+1,e}});var gM=Rt((WYe,mM)=>{mM.exports=fS;var $Q=128,pM=127;function fS(r,n){var t=0,n=n||0,o=0,i=n,s,a=r.length;do{if(i>=a||o>49)throw fS.bytes=0,new RangeError("Could not decode varint");s=r[i++],t+=o<28?(s&pM)<<o:(s&pM)*Math.pow(2,o),o+=7}while(s>=$Q);return fS.bytes=i-n,t}});var wM=Rt((GYe,yM)=>{var HQ=Math.pow(2,7),KQ=Math.pow(2,14),VQ=Math.pow(2,21),qQ=Math.pow(2,28),zQ=Math.pow(2,35),jQ=Math.pow(2,42),WQ=Math.pow(2,49),GQ=Math.pow(2,56),XQ=Math.pow(2,63);yM.exports=function(r){return r<HQ?1:r<KQ?2:r<VQ?3:r<qQ?4:r<zQ?5:r<jQ?6:r<WQ?7:r<GQ?8:r<XQ?9:10}});var e8=Rt((XYe,xM)=>{xM.exports={encode:hM(),decode:gM(),encodingLength:wM()}});var UM=Rt((_0,p8)=>{(function(r,e){"use strict";var t={version:"3.0.0",x86:{},x64:{},inputValidation:!0};function n(d){if(!Array.isArray(d)&&!ArrayBuffer.isView(d))return!1;for(var m=0;m<d.length;m++)if(!Number.isInteger(d[m])||d[m]<0||d[m]>255)return!1;return!0}function o(d,m){return(d&65535)*m+(((d>>>16)*m&65535)<<16)}function i(d,m){return d<<m|d>>>32-m}function s(d){return d^=d>>>16,d=o(d,2246822507),d^=d>>>13,d=o(d,3266489909),d^=d>>>16,d}function a(d,m){d=[d[0]>>>16,d[0]&65535,d[1]>>>16,d[1]&65535],m=[m[0]>>>16,m[0]&65535,m[1]>>>16,m[1]&65535];var y=[0,0,0,0];return y[3]+=d[3]+m[3],y[2]+=y[3]>>>16,y[3]&=65535,y[2]+=d[2]+m[2],y[1]+=y[2]>>>16,y[2]&=65535,y[1]+=d[1]+m[1],y[0]+=y[1]>>>16,y[1]&=65535,y[0]+=d[0]+m[0],y[0]&=65535,[y[0]<<16|y[1],y[2]<<16|y[3]]}function c(d,m){d=[d[0]>>>16,d[0]&65535,d[1]>>>16,d[1]&65535],m=[m[0]>>>16,m[0]&65535,m[1]>>>16,m[1]&65535];var y=[0,0,0,0];return y[3]+=d[3]*m[3],y[2]+=y[3]>>>16,y[3]&=65535,y[2]+=d[2]*m[3],y[1]+=y[2]>>>16,y[2]&=65535,y[2]+=d[3]*m[2],y[1]+=y[2]>>>16,y[2]&=65535,y[1]+=d[1]*m[3],y[0]+=y[1]>>>16,y[1]&=65535,y[1]+=d[2]*m[2],y[0]+=y[1]>>>16,y[1]&=65535,y[1]+=d[3]*m[1],y[0]+=y[1]>>>16,y[1]&=65535,y[0]+=d[0]*m[3]+d[1]*m[2]+d[2]*m[1]+d[3]*m[0],y[0]&=65535,[y[0]<<16|y[1],y[2]<<16|y[3]]}function l(d,m){return m%=64,m===32?[d[1],d[0]]:m<32?[d[0]<<m|d[1]>>>32-m,d[1]<<m|d[0]>>>32-m]:(m-=32,[d[1]<<m|d[0]>>>32-m,d[0]<<m|d[1]>>>32-m])}function f(d,m){return m%=64,m===0?d:m<32?[d[0]<<m|d[1]>>>32-m,d[1]<<m]:[d[1]<<m-32,0]}function u(d,m){return[d[0]^m[0],d[1]^m[1]]}function h(d){return d=u(d,[0,d[0]>>>1]),d=c(d,[4283543511,3981806797]),d=u(d,[0,d[0]>>>1]),d=c(d,[3301882366,444984403]),d=u(d,[0,d[0]>>>1]),d}t.x86.hash32=function(d,m){if(t.inputValidation&&!n(d))return e;m=m||0;for(var y=d.length%4,w=d.length-y,x=m,v=0,E=3432918353,I=461845907,U=0;U<w;U=U+4)v=d[U]|d[U+1]<<8|d[U+2]<<16|d[U+3]<<24,v=o(v,E),v=i(v,15),v=o(v,I),x^=v,x=i(x,13),x=o(x,5)+3864292196;switch(v=0,y){case 3:v^=d[U+2]<<16;case 2:v^=d[U+1]<<8;case 1:v^=d[U],v=o(v,E),v=i(v,15),v=o(v,I),x^=v}return x^=d.length,x=s(x),x>>>0},t.x86.hash128=function(d,m){if(t.inputValidation&&!n(d))return e;m=m||0;for(var y=d.length%16,w=d.length-y,x=m,v=m,E=m,I=m,U=0,V=0,M=0,T=0,k=597399067,z=2869860233,W=951274213,$=2716044179,S=0;S<w;S=S+16)U=d[S]|d[S+1]<<8|d[S+2]<<16|d[S+3]<<24,V=d[S+4]|d[S+5]<<8|d[S+6]<<16|d[S+7]<<24,M=d[S+8]|d[S+9]<<8|d[S+10]<<16|d[S+11]<<24,T=d[S+12]|d[S+13]<<8|d[S+14]<<16|d[S+15]<<24,U=o(U,k),U=i(U,15),U=o(U,z),x^=U,x=i(x,19),x+=v,x=o(x,5)+1444728091,V=o(V,z),V=i(V,16),V=o(V,W),v^=V,v=i(v,17),v+=E,v=o(v,5)+197830471,M=o(M,W),M=i(M,17),M=o(M,$),E^=M,E=i(E,15),E+=I,E=o(E,5)+2530024501,T=o(T,$),T=i(T,18),T=o(T,k),I^=T,I=i(I,13),I+=x,I=o(I,5)+850148119;switch(U=0,V=0,M=0,T=0,y){case 15:T^=d[S+14]<<16;case 14:T^=d[S+13]<<8;case 13:T^=d[S+12],T=o(T,$),T=i(T,18),T=o(T,k),I^=T;case 12:M^=d[S+11]<<24;case 11:M^=d[S+10]<<16;case 10:M^=d[S+9]<<8;case 9:M^=d[S+8],M=o(M,W),M=i(M,17),M=o(M,$),E^=M;case 8:V^=d[S+7]<<24;case 7:V^=d[S+6]<<16;case 6:V^=d[S+5]<<8;case 5:V^=d[S+4],V=o(V,z),V=i(V,16),V=o(V,W),v^=V;case 4:U^=d[S+3]<<24;case 3:U^=d[S+2]<<16;case 2:U^=d[S+1]<<8;case 1:U^=d[S],U=o(U,k),U=i(U,15),U=o(U,z),x^=U}return x^=d.length,v^=d.length,E^=d.length,I^=d.length,x+=v,x+=E,x+=I,v+=x,E+=x,I+=x,x=s(x),v=s(v),E=s(E),I=s(I),x+=v,x+=E,x+=I,v+=x,E+=x,I+=x,("00000000"+(x>>>0).toString(16)).slice(-8)+("00000000"+(v>>>0).toString(16)).slice(-8)+("00000000"+(E>>>0).toString(16)).slice(-8)+("00000000"+(I>>>0).toString(16)).slice(-8)},t.x64.hash128=function(d,m){if(t.inputValidation&&!n(d))return e;m=m||0;for(var y=d.length%16,w=d.length-y,x=[0,m],v=[0,m],E=[0,0],I=[0,0],U=[2277735313,289559509],V=[1291169091,658871167],M=0;M<w;M=M+16)E=[d[M+4]|d[M+5]<<8|d[M+6]<<16|d[M+7]<<24,d[M]|d[M+1]<<8|d[M+2]<<16|d[M+3]<<24],I=[d[M+12]|d[M+13]<<8|d[M+14]<<16|d[M+15]<<24,d[M+8]|d[M+9]<<8|d[M+10]<<16|d[M+11]<<24],E=c(E,U),E=l(E,31),E=c(E,V),x=u(x,E),x=l(x,27),x=a(x,v),x=a(c(x,[0,5]),[0,1390208809]),I=c(I,V),I=l(I,33),I=c(I,U),v=u(v,I),v=l(v,31),v=a(v,x),v=a(c(v,[0,5]),[0,944331445]);switch(E=[0,0],I=[0,0],y){case 15:I=u(I,f([0,d[M+14]],48));case 14:I=u(I,f([0,d[M+13]],40));case 13:I=u(I,f([0,d[M+12]],32));case 12:I=u(I,f([0,d[M+11]],24));case 11:I=u(I,f([0,d[M+10]],16));case 10:I=u(I,f([0,d[M+9]],8));case 9:I=u(I,[0,d[M+8]]),I=c(I,V),I=l(I,33),I=c(I,U),v=u(v,I);case 8:E=u(E,f([0,d[M+7]],56));case 7:E=u(E,f([0,d[M+6]],48));case 6:E=u(E,f([0,d[M+5]],40));case 5:E=u(E,f([0,d[M+4]],32));case 4:E=u(E,f([0,d[M+3]],24));case 3:E=u(E,f([0,d[M+2]],16));case 2:E=u(E,f([0,d[M+1]],8));case 1:E=u(E,[0,d[M]]),E=c(E,U),E=l(E,31),E=c(E,V),x=u(x,E)}return x=u(x,[0,d.length]),v=u(v,[0,d.length]),x=a(x,v),v=a(v,x),x=h(x),v=h(v),x=a(x,v),v=a(v,x),("00000000"+(x[0]>>>0).toString(16)).slice(-8)+("00000000"+(x[1]>>>0).toString(16)).slice(-8)+("00000000"+(v[0]>>>0).toString(16)).slice(-8)+("00000000"+(v[1]>>>0).toString(16)).slice(-8)},typeof _0<"u"?(typeof p8<"u"&&p8.exports&&(_0=p8.exports=t),_0.murmurHash3=t):typeof define=="function"&&define.amd?define([],function(){return t}):(t._murmurHash3=r.murmurHash3,t.noConflict=function(){return r.murmurHash3=t._murmurHash3,t._murmurHash3=e,t.noConflict=e,t},r.murmurHash3=t)})(_0)});var $M=Rt((QZe,FM)=>{FM.exports=UM()});var qM=Rt((oJe,VM)=>{"use strict";VM.exports=class{constructor(){this._bitArrays=[],this._data=[],this._length=0,this._changedLength=!1,this._changedData=!1}set(e,t){let n=this._internalPositionFor(e,!1);if(t===void 0)n!==-1&&(this._unsetInternalPos(n),this._unsetBit(e),this._changedLength=!0,this._changedData=!0);else{let o=!1;n===-1?(n=this._data.length,this._setBit(e),this._changedData=!0):o=!0,this._setInternalPos(n,e,t,o),this._changedLength=!0}}unset(e){this.set(e,void 0)}get(e){this._sortData();let t=this._internalPositionFor(e,!0);if(t!==-1)return this._data[t][1]}push(e){return this.set(this.length,e),this.length}get length(){if(this._sortData(),this._changedLength){let e=this._data[this._data.length-1];this._length=e?e[0]+1:0,this._changedLength=!1}return this._length}forEach(e){let t=0;for(;t<this.length;)e(this.get(t),t,this),t++}map(e){let t=0,n=new Array(this.length);for(;t<this.length;)n[t]=e(this.get(t),t,this),t++;return n}reduce(e,t){let n=0,o=t;for(;n<this.length;){let i=this.get(n);o=e(o,i,n),n++}return o}find(e){let t=0,n,o;for(;t<this.length&&!n;)o=this.get(t),n=e(o),t++;return n?o:void 0}_internalPositionFor(e,t){let n=this._bytePosFor(e,t);if(n>=this._bitArrays.length)return-1;let o=this._bitArrays[n],i=e-n*7;if(!((o&1<<i)>0))return-1;let a=this._bitArrays.slice(0,n).reduce(EZ,0),c=~(4294967295<<i+1),l=KM(o&c);return a+l-1}_bytePosFor(e,t){let n=Math.floor(e/7),o=n+1;for(;!t&&this._bitArrays.length<o;)this._bitArrays.push(0);return n}_setBit(e){let t=this._bytePosFor(e,!1);this._bitArrays[t]|=1<<e-t*7}_unsetBit(e){let t=this._bytePosFor(e,!1);this._bitArrays[t]&=~(1<<e-t*7)}_setInternalPos(e,t,n,o){let i=this._data,s=[t,n];if(o)this._sortData(),i[e]=s;else{if(i.length)if(i[i.length-1][0]>=t)i.push(s);else