@pax-k/chrono-scope-js
Version:
Unveil the performance mysteries of your JavaScript code! This sleek profiler 🚀 hooks into your functions seamlessly, timing 🕒 their execution and providing insight into async operations. Navigate your codebase with newfound clarity, optimizing 🛠️ as y
16 lines (13 loc) • 26.5 kB
JavaScript
var ChronoScope=(()=>{var Er=Object.create;var S=Object.defineProperty;var mr=Object.getOwnPropertyDescriptor;var Fr=Object.getOwnPropertyNames;var gr=Object.getPrototypeOf,Br=Object.prototype.hasOwnProperty;var Ar=(i,r)=>()=>(i&&(r=i(i=0)),r);var R=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports),Ur=(i,r)=>{for(var t in r)S(i,t,{get:r[t],enumerable:!0})},G=(i,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of Fr(r))!Br.call(i,e)&&e!==t&&S(i,e,{get:()=>r[e],enumerable:!(n=mr(r,e))||n.enumerable});return i};var z=(i,r,t)=>(t=i!=null?Er(gr(i)):{},G(r||!i||!i.__esModule?S(t,"default",{value:i,enumerable:!0}):t,i)),Ir=i=>G(S({},"__esModule",{value:!0}),i);var j=R(_=>{"use strict";m();_.byteLength=Tr;_.toByteArray=Cr;_.fromByteArray=_r;var F=[],E=[],vr=typeof Uint8Array<"u"?Uint8Array:Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(U=0,J=b.length;U<J;++U)F[U]=b[U],E[b.charCodeAt(U)]=U;var U,J;E["-".charCodeAt(0)]=62;E["_".charCodeAt(0)]=63;function P(i){var r=i.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=i.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function Tr(i){var r=P(i),t=r[0],n=r[1];return(t+n)*3/4-n}function dr(i,r,t){return(r+t)*3/4-t}function Cr(i){var r,t=P(i),n=t[0],e=t[1],o=new vr(dr(i,n,e)),u=0,f=e>0?n-4:n,h;for(h=0;h<f;h+=4)r=E[i.charCodeAt(h)]<<18|E[i.charCodeAt(h+1)]<<12|E[i.charCodeAt(h+2)]<<6|E[i.charCodeAt(h+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return e===2&&(r=E[i.charCodeAt(h)]<<2|E[i.charCodeAt(h+1)]>>4,o[u++]=r&255),e===1&&(r=E[i.charCodeAt(h)]<<10|E[i.charCodeAt(h+1)]<<4|E[i.charCodeAt(h+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function Sr(i){return F[i>>18&63]+F[i>>12&63]+F[i>>6&63]+F[i&63]}function Rr(i,r,t){for(var n,e=[],o=r;o<t;o+=3)n=(i[o]<<16&16711680)+(i[o+1]<<8&65280)+(i[o+2]&255),e.push(Sr(n));return e.join("")}function _r(i){for(var r,t=i.length,n=t%3,e=[],o=16383,u=0,f=t-n;u<f;u+=o)e.push(Rr(i,u,u+o>f?f:u+o));return n===1?(r=i[t-1],e.push(F[r>>2]+F[r<<4&63]+"==")):n===2&&(r=(i[t-2]<<8)+i[t-1],e.push(F[r>>10]+F[r>>4&63]+F[r<<2&63]+"=")),e.join("")}});var K=R(N=>{m();N.read=function(i,r,t,n,e){var o,u,f=e*8-n-1,h=(1<<f)-1,l=h>>1,p=-7,c=t?e-1:0,x=t?-1:1,w=i[r+c];for(c+=x,o=w&(1<<-p)-1,w>>=-p,p+=f;p>0;o=o*256+i[r+c],c+=x,p-=8);for(u=o&(1<<-p)-1,o>>=-p,p+=n;p>0;u=u*256+i[r+c],c+=x,p-=8);if(o===0)o=1-l;else{if(o===h)return u?NaN:(w?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-l}return(w?-1:1)*u*Math.pow(2,o-n)};N.write=function(i,r,t,n,e,o){var u,f,h,l=o*8-e-1,p=(1<<l)-1,c=p>>1,x=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:o-1,A=n?1:-1,xr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,u=p):(u=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-u))<1&&(u--,h*=2),u+c>=1?r+=x/h:r+=x*Math.pow(2,1-c),r*h>=2&&(u++,h/=2),u+c>=p?(f=0,u=p):u+c>=1?(f=(r*h-1)*Math.pow(2,e),u=u+c):(f=r*Math.pow(2,c-1)*Math.pow(2,e),u=0));e>=8;i[t+w]=f&255,w+=A,f/=256,e-=8);for(u=u<<e|f,l+=e;l>0;i[t+w]=u&255,w+=A,u/=256,l-=8);i[t+w-A]|=xr*128}});var pr=R(d=>{"use strict";m();var $=j(),T=K(),Z=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;d.Buffer=a;d.SlowBuffer=Nr;d.INSPECT_MAX_BYTES=50;var M=2147483647;d.kMaxLength=M;a.TYPED_ARRAY_SUPPORT=kr();!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function kr(){try{var i=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(i,r),i.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function B(i){if(i>M)throw new RangeError('The value "'+i+'" is invalid for option "size"');var r=new Uint8Array(i);return Object.setPrototypeOf(r,a.prototype),r}function a(i,r,t){if(typeof i=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return H(i)}return tr(i,r,t)}a.poolSize=8192;function tr(i,r,t){if(typeof i=="string")return Lr(i,r);if(ArrayBuffer.isView(i))return Dr(i);if(i==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(g(i,ArrayBuffer)||i&&g(i.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(g(i,SharedArrayBuffer)||i&&g(i.buffer,SharedArrayBuffer)))return O(i,r,t);if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=i.valueOf&&i.valueOf();if(n!=null&&n!==i)return a.from(n,r,t);var e=br(i);if(e)return e;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof i[Symbol.toPrimitive]=="function")return a.from(i[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}a.from=function(i,r,t){return tr(i,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function ir(i){if(typeof i!="number")throw new TypeError('"size" argument must be of type number');if(i<0)throw new RangeError('The value "'+i+'" is invalid for option "size"')}function Mr(i,r,t){return ir(i),i<=0?B(i):r!==void 0?typeof t=="string"?B(i).fill(r,t):B(i).fill(r):B(i)}a.alloc=function(i,r,t){return Mr(i,r,t)};function H(i){return ir(i),B(i<0?0:V(i)|0)}a.allocUnsafe=function(i){return H(i)};a.allocUnsafeSlow=function(i){return H(i)};function Lr(i,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=nr(i,r)|0,n=B(t),e=n.write(i,r);return e!==t&&(n=n.slice(0,e)),n}function W(i){for(var r=i.length<0?0:V(i.length)|0,t=B(r),n=0;n<r;n+=1)t[n]=i[n]&255;return t}function Dr(i){if(g(i,Uint8Array)){var r=new Uint8Array(i);return O(r.buffer,r.byteOffset,r.byteLength)}return W(i)}function O(i,r,t){if(r<0||i.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(i.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');var n;return r===void 0&&t===void 0?n=new Uint8Array(i):t===void 0?n=new Uint8Array(i,r):n=new Uint8Array(i,r,t),Object.setPrototypeOf(n,a.prototype),n}function br(i){if(a.isBuffer(i)){var r=V(i.length)|0,t=B(r);return t.length===0||i.copy(t,0,0,r),t}if(i.length!==void 0)return typeof i.length!="number"||X(i.length)?B(0):W(i);if(i.type==="Buffer"&&Array.isArray(i.data))return W(i.data)}function V(i){if(i>=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return i|0}function Nr(i){return+i!=i&&(i=0),a.alloc(+i)}a.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==a.prototype};a.compare=function(r,t){if(g(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),g(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(r)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;for(var n=r.length,e=t.length,o=0,u=Math.min(n,e);o<u;++o)if(r[o]!==t[o]){n=r[o],e=t[o];break}return n<e?-1:e<n?1:0};a.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return a.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;var e=a.allocUnsafe(t),o=0;for(n=0;n<r.length;++n){var u=r[n];if(g(u,Uint8Array))o+u.length>e.length?a.from(u).copy(e,o):Uint8Array.prototype.set.call(e,u,o);else if(a.isBuffer(u))u.copy(e,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return e};function nr(i,r){if(a.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||g(i,ArrayBuffer))return i.byteLength;if(typeof i!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);var t=i.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;for(var e=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Y(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return hr(i).length;default:if(e)return n?-1:Y(i).length;r=(""+r).toLowerCase(),e=!0}}a.byteLength=nr;function $r(i,r,t){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(i||(i="utf8");;)switch(i){case"hex":return Jr(this,r,t);case"utf8":case"utf-8":return or(this,r,t);case"ascii":return Gr(this,r,t);case"latin1":case"binary":return zr(this,r,t);case"base64":return Xr(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pr(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function I(i,r,t){var n=i[r];i[r]=i[t],i[t]=n}a.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)I(this,t,t+1);return this};a.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)I(this,t,t+3),I(this,t+1,t+2);return this};a.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)I(this,t,t+7),I(this,t+1,t+6),I(this,t+2,t+5),I(this,t+3,t+4);return this};a.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?or(this,0,r):$r.apply(this,arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(r){if(!a.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:a.compare(this,r)===0};a.prototype.inspect=function(){var r="",t=d.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};Z&&(a.prototype[Z]=a.prototype.inspect);a.prototype.compare=function(r,t,n,e,o){if(g(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),!a.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),e===void 0&&(e=0),o===void 0&&(o=this.length),t<0||n>r.length||e<0||o>this.length)throw new RangeError("out of range index");if(e>=o&&t>=n)return 0;if(e>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,e>>>=0,o>>>=0,this===r)return 0;for(var u=o-e,f=n-t,h=Math.min(u,f),l=this.slice(e,o),p=r.slice(t,n),c=0;c<h;++c)if(l[c]!==p[c]){u=l[c],f=p[c];break}return u<f?-1:f<u?1:0};function er(i,r,t,n,e){if(i.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,X(t)&&(t=e?0:i.length-1),t<0&&(t=i.length+t),t>=i.length){if(e)return-1;t=i.length-1}else if(t<0)if(e)t=0;else return-1;if(typeof r=="string"&&(r=a.from(r,n)),a.isBuffer(r))return r.length===0?-1:Q(i,r,t,n,e);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?e?Uint8Array.prototype.indexOf.call(i,r,t):Uint8Array.prototype.lastIndexOf.call(i,r,t):Q(i,[r],t,n,e);throw new TypeError("val must be string, number or Buffer")}function Q(i,r,t,n,e){var o=1,u=i.length,f=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(i.length<2||r.length<2)return-1;o=2,u/=2,f/=2,t/=2}function h(w,A){return o===1?w[A]:w.readUInt16BE(A*o)}var l;if(e){var p=-1;for(l=t;l<u;l++)if(h(i,l)===h(r,p===-1?0:l-p)){if(p===-1&&(p=l),l-p+1===f)return p*o}else p!==-1&&(l-=l-p),p=-1}else for(t+f>u&&(t=u-f),l=t;l>=0;l--){for(var c=!0,x=0;x<f;x++)if(h(i,l+x)!==h(r,x)){c=!1;break}if(c)return l}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return er(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return er(this,r,t,n,!1)};function Wr(i,r,t,n){t=Number(t)||0;var e=i.length-t;n?(n=Number(n),n>e&&(n=e)):n=e;var o=r.length;n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(u*2,2),16);if(X(f))return u;i[t+u]=f}return u}function Or(i,r,t,n){return L(Y(r,i.length-t),i,t,n)}function Yr(i,r,t,n){return L(Zr(r),i,t,n)}function Hr(i,r,t,n){return L(hr(r),i,t,n)}function Vr(i,r,t,n){return L(Qr(r,i.length-t),i,t,n)}a.prototype.write=function(r,t,n,e){if(t===void 0)e="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")e=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,e===void 0&&(e="utf8")):(e=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");for(var u=!1;;)switch(e){case"hex":return Wr(this,r,t,n);case"utf8":case"utf-8":return Or(this,r,t,n);case"ascii":case"latin1":case"binary":return Yr(this,r,t,n);case"base64":return Hr(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vr(this,r,t,n);default:if(u)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),u=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Xr(i,r,t){return r===0&&t===i.length?$.fromByteArray(i):$.fromByteArray(i.slice(r,t))}function or(i,r,t){t=Math.min(i.length,t);for(var n=[],e=r;e<t;){var o=i[e],u=null,f=o>239?4:o>223?3:o>191?2:1;if(e+f<=t){var h,l,p,c;switch(f){case 1:o<128&&(u=o);break;case 2:h=i[e+1],(h&192)===128&&(c=(o&31)<<6|h&63,c>127&&(u=c));break;case 3:h=i[e+1],l=i[e+2],(h&192)===128&&(l&192)===128&&(c=(o&15)<<12|(h&63)<<6|l&63,c>2047&&(c<55296||c>57343)&&(u=c));break;case 4:h=i[e+1],l=i[e+2],p=i[e+3],(h&192)===128&&(l&192)===128&&(p&192)===128&&(c=(o&15)<<18|(h&63)<<12|(l&63)<<6|p&63,c>65535&&c<1114112&&(u=c))}}u===null?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),e+=f}return qr(n)}var rr=4096;function qr(i){var r=i.length;if(r<=rr)return String.fromCharCode.apply(String,i);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,i.slice(n,n+=rr));return t}function Gr(i,r,t){var n="";t=Math.min(i.length,t);for(var e=r;e<t;++e)n+=String.fromCharCode(i[e]&127);return n}function zr(i,r,t){var n="";t=Math.min(i.length,t);for(var e=r;e<t;++e)n+=String.fromCharCode(i[e]);return n}function Jr(i,r,t){var n=i.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);for(var e="",o=r;o<t;++o)e+=rt[i[o]];return e}function Pr(i,r,t){for(var n=i.slice(r,t),e="",o=0;o<n.length-1;o+=2)e+=String.fromCharCode(n[o]+n[o+1]*256);return e}a.prototype.slice=function(r,t){var n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);var e=this.subarray(r,t);return Object.setPrototypeOf(e,a.prototype),e};function s(i,r,t){if(i%1!==0||i<0)throw new RangeError("offset is not uint");if(i+r>t)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||s(r,t,this.length);for(var e=this[r],o=1,u=0;++u<t&&(o*=256);)e+=this[r+u]*o;return e};a.prototype.readUintBE=a.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||s(r,t,this.length);for(var e=this[r+--t],o=1;t>0&&(o*=256);)e+=this[r+--t]*o;return e};a.prototype.readUint8=a.prototype.readUInt8=function(r,t){return r=r>>>0,t||s(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||s(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||s(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||s(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};a.prototype.readUint32BE=a.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||s(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};a.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||s(r,t,this.length);for(var e=this[r],o=1,u=0;++u<t&&(o*=256);)e+=this[r+u]*o;return o*=128,e>=o&&(e-=Math.pow(2,8*t)),e};a.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||s(r,t,this.length);for(var e=t,o=1,u=this[r+--e];e>0&&(o*=256);)u+=this[r+--e]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};a.prototype.readInt8=function(r,t){return r=r>>>0,t||s(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||s(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(r,t){r=r>>>0,t||s(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(r,t){return r=r>>>0,t||s(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};a.prototype.readInt32BE=function(r,t){return r=r>>>0,t||s(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};a.prototype.readFloatLE=function(r,t){return r=r>>>0,t||s(r,4,this.length),T.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||s(r,4,this.length),T.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||s(r,8,this.length),T.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||s(r,8,this.length),T.read(this,r,!1,52,8)};function y(i,r,t,n,e,o){if(!a.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>e||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>i.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(r,t,n,e){if(r=+r,t=t>>>0,n=n>>>0,!e){var o=Math.pow(2,8*n)-1;y(this,r,t,n,o,0)}var u=1,f=0;for(this[t]=r&255;++f<n&&(u*=256);)this[t+f]=r/u&255;return t+n};a.prototype.writeUintBE=a.prototype.writeUIntBE=function(r,t,n,e){if(r=+r,t=t>>>0,n=n>>>0,!e){var o=Math.pow(2,8*n)-1;y(this,r,t,n,o,0)}var u=n-1,f=1;for(this[t+u]=r&255;--u>=0&&(f*=256);)this[t+u]=r/f&255;return t+n};a.prototype.writeUint8=a.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||y(this,r,t,1,255,0),this[t]=r&255,t+1};a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||y(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||y(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||y(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||y(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};a.prototype.writeIntLE=function(r,t,n,e){if(r=+r,t=t>>>0,!e){var o=Math.pow(2,8*n-1);y(this,r,t,n,o-1,-o)}var u=0,f=1,h=0;for(this[t]=r&255;++u<n&&(f*=256);)r<0&&h===0&&this[t+u-1]!==0&&(h=1),this[t+u]=(r/f>>0)-h&255;return t+n};a.prototype.writeIntBE=function(r,t,n,e){if(r=+r,t=t>>>0,!e){var o=Math.pow(2,8*n-1);y(this,r,t,n,o-1,-o)}var u=n-1,f=1,h=0;for(this[t+u]=r&255;--u>=0&&(f*=256);)r<0&&h===0&&this[t+u+1]!==0&&(h=1),this[t+u]=(r/f>>0)-h&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||y(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};a.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||y(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||y(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||y(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};a.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||y(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function ur(i,r,t,n,e,o){if(t+n>i.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ar(i,r,t,n,e){return r=+r,t=t>>>0,e||ur(i,r,t,4,34028234663852886e22,-34028234663852886e22),T.write(i,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return ar(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return ar(this,r,t,!1,n)};function fr(i,r,t,n,e){return r=+r,t=t>>>0,e||ur(i,r,t,8,17976931348623157e292,-17976931348623157e292),T.write(i,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return fr(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return fr(this,r,t,!1,n)};a.prototype.copy=function(r,t,n,e){if(!a.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!e&&e!==0&&(e=this.length),t>=r.length&&(t=r.length),t||(t=0),e>0&&e<n&&(e=n),e===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),r.length-t<e-n&&(e=r.length-t+n);var o=e-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,e):Uint8Array.prototype.set.call(r,this.subarray(n,e),t),o};a.prototype.fill=function(r,t,n,e){if(typeof r=="string"){if(typeof t=="string"?(e=t,t=0,n=this.length):typeof n=="string"&&(e=n,n=this.length),e!==void 0&&typeof e!="string")throw new TypeError("encoding must be a string");if(typeof e=="string"&&!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);if(r.length===1){var o=r.charCodeAt(0);(e==="utf8"&&o<128||e==="latin1")&&(r=o)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var u;if(typeof r=="number")for(u=t;u<n;++u)this[u]=r;else{var f=a.isBuffer(r)?r:a.from(r,e),h=f.length;if(h===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=f[u%h]}return this};var jr=/[^+/0-9A-Za-z-_]/g;function Kr(i){if(i=i.split("=")[0],i=i.trim().replace(jr,""),i.length<2)return"";for(;i.length%4!==0;)i=i+"=";return i}function Y(i,r){r=r||1/0;for(var t,n=i.length,e=null,o=[],u=0;u<n;++u){if(t=i.charCodeAt(u),t>55295&&t<57344){if(!e){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}e=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),e=t;continue}t=(e-55296<<10|t-56320)+65536}else e&&(r-=3)>-1&&o.push(239,191,189);if(e=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function Zr(i){for(var r=[],t=0;t<i.length;++t)r.push(i.charCodeAt(t)&255);return r}function Qr(i,r){for(var t,n,e,o=[],u=0;u<i.length&&!((r-=2)<0);++u)t=i.charCodeAt(u),n=t>>8,e=t%256,o.push(e),o.push(n);return o}function hr(i){return $.toByteArray(Kr(i))}function L(i,r,t,n){for(var e=0;e<n&&!(e+t>=r.length||e>=i.length);++e)r[e+t]=i[e];return e}function g(i,r){return i instanceof r||i!=null&&i.constructor!=null&&i.constructor.name!=null&&i.constructor.name===r.name}function X(i){return i!==i}var rt=function(){for(var i="0123456789abcdef",r=new Array(256),t=0;t<16;++t)for(var n=t*16,e=0;e<16;++e)r[n+e]=i[t]+i[e];return r}()});var lr=R((pt,cr)=>{m();cr.exports=globalThis.process});var C,v,lt,m=Ar(()=>{C=z(pr()),v=z(lr()),lt=function(i){function r(){var n=this||self;return delete i.prototype.__magic__,n}if(typeof globalThis=="object")return globalThis;if(this)return r();i.defineProperty(i.prototype,"__magic__",{configurable:!0,get:r});var t=__magic__;return t}(Object)});var it={};Ur(it,{createProfilingProxy:()=>q});m();function tt(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function wr(i){return typeof i=="object"&&i!==null}function D(i){return typeof i=="function"}function yr(i){return[Promise,Map,Set,WeakMap,WeakSet,Date,RegExp,ArrayBuffer,Error].some(t=>i instanceof t)}function sr(i,r){return function(...t){let n=performance.now();try{let e=i.apply(this,t),o=performance.now();return e instanceof Promise?e.then(u=>(console.log(`Async function ${r} took ${(o-n).toFixed(2)} ms.`),u)).catch(u=>{throw console.error(`Async function ${r} failed after ${(o-n).toFixed(2)} ms with error: ${u}`),u}):(console.log(`Function ${r} took ${(o-n).toFixed(2)} ms.`),wr(e)&&!yr(e)?q(e,r):e)}catch(e){let o=performance.now();throw console.error(`Function ${r} failed after ${(o-n).toFixed(2)} ms with error: ${e}`),e}}}function q(i,r="library"){let t={get(n,e,o){if(e===Symbol.iterator||e===Symbol.asyncIterator){let h=Reflect.get(n,e,o);if(D(h))return(...l)=>{let p=h.apply(n,l);if(p&&D(p.next)){let c=p.next;return p.__isProfiled||(p.next=function(){let x=performance.now(),w=c.apply(this,arguments),A=performance.now();return console.log(`Iterator next took ${(A-x).toFixed(2)} ms.`),w},p.__isProfiled=!0),p}return p}}let u=Object.getOwnPropertyDescriptor(n,e);if(u&&!u.configurable&&!u.writable)return Reflect.get(n,e,o);let f=Reflect.get(n,e,o);return tt(f)||e===Symbol.iterator?f:D(f)?(...h)=>{let l=`${r}.${String(e)}`;return sr(f,l).apply(o,h)}:wr(f)&&!yr(f)?q(f,`${r}.${String(e)}`):f}};return D(i)?(console.log(`Profiling function at ${r}`),sr(i,r)):new Proxy(i,t)}return Ir(it);})();
/*! Bundled license information:
ieee754/index.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
buffer/index.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
*/
//# sourceMappingURL=index.js.map