@imtbl/auth 2.12.3-alpha.1 → 2.12.4-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ import { UserManager, User, ErrorTimeout, ErrorResponse, InMemoryWebStorage, Web
2
2
  import cn from 'localforage';
3
3
  import { track, identify, getDetail, Detail, trackFlow, trackError } from '@imtbl/metrics';
4
4
 
5
- function Ae(c){throw new Error("Node.js process "+c+" is not supported by JSPM core outside of Node.js")}var K=[],te=!1,j,he=-1;function Pt(){!te||!j||(te=!1,j.length?K=j.concat(K):he=-1,K.length&&Ke());}function Ke(){if(!te){var c=setTimeout(Pt,0);te=!0;for(var n=K.length;n;){for(j=K,K=[];++he<n;)j&&j[he].run();he=-1,n=K.length;}j=null,te=!1,clearTimeout(c);}}function Ut(c){var n=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)n[a-1]=arguments[a];K.push(new We(c,n)),K.length===1&&!te&&setTimeout(Ke,0);}function We(c,n){this.fun=c,this.array=n;}We.prototype.run=function(){this.fun.apply(null,this.array);};var Bt="browser",kt="x64",bt="browser",xt={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},St=["/usr/bin/node"],Mt=[],Nt="v16.8.0",Dt={},Ft=function(c,n){console.warn((n?n+": ":"")+c);},Ht=function(c){Ae("binding");},Vt=function(c){return 0},Gt=function(){return "/"},$t=function(c){},Kt={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function b(){}var Wt=b,Zt=[];function Yt(c){Ae("_linkedBinding");}var zt={},Jt=!1,jt={};function qt(c){Ae("dlopen");}function Xt(){return []}function Qt(){return []}var er=b,tr=b,Oe=function(){return {}},rr=Oe,nr=Oe,ir=b,or=b,sr=b,ar={};function lr(c,n){if(!c)throw new Error(n||"assertion error")}var ur={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},cr=b,pr=b;function dr(){return !1}var hr=b,fr=b,mr=b,gr=b,Er=b,yr=void 0,wr=void 0,_r=void 0,Cr=b,Ir=2,Rr=1,Tr="/bin/usr/node",vr=9229,Ar="node",Or=[],Lr=b,Z={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Z.now===void 0&&(Re=Date.now(),Z.timing&&Z.timing.navigationStart&&(Re=Z.timing.navigationStart),Z.now=()=>Date.now()-Re);var Re;function Pr(){return Z.now()/1e3}var Te=1e9;function ve(c){var n=Math.floor((Date.now()-Z.now())*.001),a=Z.now()*.001,u=Math.floor(a)+n,d=Math.floor(a%1*1e9);return c&&(u=u-c[0],d=d-c[1],d<0&&(u--,d+=Te)),[u,d]}ve.bigint=function(c){var n=ve(c);return typeof BigInt>"u"?n[0]*Te+n[1]:BigInt(n[0]*Te)+BigInt(n[1])};var Ur=10,Br={},kr=0;function Y(){return v}var br=Y,xr=Y,Sr=Y,Mr=Y,Nr=Y,Dr=b,Fr=Y,Hr=Y;function Vr(c){return []}var v={version:Nt,versions:Dt,arch:kt,platform:bt,release:Kt,_rawDebug:Wt,moduleLoadList:Zt,binding:Ht,_linkedBinding:Yt,_events:Br,_eventsCount:kr,_maxListeners:Ur,on:Y,addListener:br,once:xr,off:Sr,removeListener:Mr,removeAllListeners:Nr,emit:Dr,prependListener:Fr,prependOnceListener:Hr,listeners:Vr,domain:zt,_exiting:Jt,config:jt,dlopen:qt,uptime:Pr,_getActiveRequests:Xt,_getActiveHandles:Qt,reallyExit:er,_kill:tr,cpuUsage:Oe,resourceUsage:rr,memoryUsage:nr,kill:ir,exit:or,openStdin:sr,allowedNodeEnvironmentFlags:ar,assert:lr,features:ur,_fatalExceptions:cr,setUncaughtExceptionCaptureCallback:pr,hasUncaughtExceptionCaptureCallback:dr,emitWarning:Ft,nextTick:Ut,_tickCallback:hr,_debugProcess:fr,_debugEnd:mr,_startProfilerIdleNotifier:gr,_stopProfilerIdleNotifier:Er,stdout:yr,stdin:_r,stderr:wr,abort:Cr,umask:Vt,chdir:$t,cwd:Gt,env:xt,title:Bt,argv:St,execArgv:Mt,pid:Ir,ppid:Rr,execPath:Tr,debugPort:vr,hrtime:ve,argv0:Ar,_preload_modules:Or,setSourceMapsEnabled:Lr};var se={},Ze=!1;function Gr(){if(Ze)return se;Ze=!0,se.byteLength=y,se.toByteArray=k,se.fromByteArray=F;for(var c=[],n=[],a=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,h=u.length;d<h;++d)c[d]=u[d],n[u.charCodeAt(d)]=d;n[45]=62,n[95]=63;function s(f){var E=f.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=f.indexOf("=");_===-1&&(_=E);var U=_===E?0:4-_%4;return [_,U]}function y(f){var E=s(f),_=E[0],U=E[1];return (_+U)*3/4-U}function T(f,E,_){return (E+_)*3/4-_}function k(f){var E,_=s(f),U=_[0],S=_[1],P=new a(T(f,U,S)),M=0,D=S>0?U-4:U,x;for(x=0;x<D;x+=4)E=n[f.charCodeAt(x)]<<18|n[f.charCodeAt(x+1)]<<12|n[f.charCodeAt(x+2)]<<6|n[f.charCodeAt(x+3)],P[M++]=E>>16&255,P[M++]=E>>8&255,P[M++]=E&255;return S===2&&(E=n[f.charCodeAt(x)]<<2|n[f.charCodeAt(x+1)]>>4,P[M++]=E&255),S===1&&(E=n[f.charCodeAt(x)]<<10|n[f.charCodeAt(x+1)]<<4|n[f.charCodeAt(x+2)]>>2,P[M++]=E>>8&255,P[M++]=E&255),P}function m(f){return c[f>>18&63]+c[f>>12&63]+c[f>>6&63]+c[f&63]}function I(f,E,_){for(var U,S=[],P=E;P<_;P+=3)U=(f[P]<<16&16711680)+(f[P+1]<<8&65280)+(f[P+2]&255),S.push(m(U));return S.join("")}function F(f){for(var E,_=f.length,U=_%3,S=[],P=16383,M=0,D=_-U;M<D;M+=P)S.push(I(f,M,M+P>D?D:M+P));return U===1?(E=f[_-1],S.push(c[E>>2]+c[E<<4&63]+"==")):U===2&&(E=(f[_-2]<<8)+f[_-1],S.push(c[E>>10]+c[E>>4&63]+c[E<<2&63]+"=")),S.join("")}return se}var fe={},Ye=!1;function $r(){if(Ye)return fe;Ye=!0;return fe.read=function(c,n,a,u,d){var h,s,y=d*8-u-1,T=(1<<y)-1,k=T>>1,m=-7,I=a?d-1:0,F=a?-1:1,f=c[n+I];for(I+=F,h=f&(1<<-m)-1,f>>=-m,m+=y;m>0;h=h*256+c[n+I],I+=F,m-=8);for(s=h&(1<<-m)-1,h>>=-m,m+=u;m>0;s=s*256+c[n+I],I+=F,m-=8);if(h===0)h=1-k;else {if(h===T)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,u),h=h-k;}return (f?-1:1)*s*Math.pow(2,h-u)},fe.write=function(c,n,a,u,d,h){var s,y,T,k=h*8-d-1,m=(1<<k)-1,I=m>>1,F=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=u?0:h-1,E=u?1:-1,_=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(y=isNaN(n)?1:0,s=m):(s=Math.floor(Math.log(n)/Math.LN2),n*(T=Math.pow(2,-s))<1&&(s--,T*=2),s+I>=1?n+=F/T:n+=F*Math.pow(2,1-I),n*T>=2&&(s++,T/=2),s+I>=m?(y=0,s=m):s+I>=1?(y=(n*T-1)*Math.pow(2,d),s=s+I):(y=n*Math.pow(2,I-1)*Math.pow(2,d),s=0));d>=8;c[a+f]=y&255,f+=E,y/=256,d-=8);for(s=s<<d|y,k+=d;k>0;c[a+f]=s&255,f+=E,s/=256,k-=8);c[a+f-E]|=_*128;},fe}var q={},ze=!1;function Kr(){if(ze)return q;ze=!0;let c=Gr(),n=$r(),a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;q.Buffer=s,q.SlowBuffer=S,q.INSPECT_MAX_BYTES=50;let u=2147483647;q.kMaxLength=u,s.TYPED_ARRAY_SUPPORT=d(),!s.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 d(){try{let r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return !1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function h(r){if(r>u)throw new RangeError('The value "'+r+'" is invalid for option "size"');let e=new Uint8Array(r);return Object.setPrototypeOf(e,s.prototype),e}function s(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(r)}return y(r,e,t)}s.poolSize=8192;function y(r,e,t){if(typeof r=="string")return I(r,e);if(ArrayBuffer.isView(r))return f(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(V(r,ArrayBuffer)||r&&V(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V(r,SharedArrayBuffer)||r&&V(r.buffer,SharedArrayBuffer)))return E(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=r.valueOf&&r.valueOf();if(i!=null&&i!==r)return s.from(i,e,t);let o=_(r);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return s.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}s.from=function(r,e,t){return y(r,e,t)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function T(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function k(r,e,t){return T(r),r<=0?h(r):e!==void 0?typeof t=="string"?h(r).fill(e,t):h(r).fill(e):h(r)}s.alloc=function(r,e,t){return k(r,e,t)};function m(r){return T(r),h(r<0?0:U(r)|0)}s.allocUnsafe=function(r){return m(r)},s.allocUnsafeSlow=function(r){return m(r)};function I(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let t=P(r,e)|0,i=h(t),o=i.write(r,e);return o!==t&&(i=i.slice(0,o)),i}function F(r){let e=r.length<0?0:U(r.length)|0,t=h(e);for(let i=0;i<e;i+=1)t[i]=r[i]&255;return t}function f(r){if(V(r,Uint8Array)){let e=new Uint8Array(r);return E(e.buffer,e.byteOffset,e.byteLength)}return F(r)}function E(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&t===void 0?i=new Uint8Array(r):t===void 0?i=new Uint8Array(r,e):i=new Uint8Array(r,e,t),Object.setPrototypeOf(i,s.prototype),i}function _(r){if(s.isBuffer(r)){let e=U(r.length)|0,t=h(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||Ie(r.length)?h(0):F(r);if(r.type==="Buffer"&&Array.isArray(r.data))return F(r.data)}function U(r){if(r>=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return r|0}function S(r){return +r!=r&&(r=0),s.alloc(+r)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(V(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),V(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let i=e.length,o=t.length;for(let l=0,p=Math.min(i,o);l<p;++l)if(e[l]!==t[l]){i=e[l],o=t[l];break}return i<o?-1:o<i?1:0},s.isEncoding=function(e){switch(String(e).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}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return s.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;let o=s.allocUnsafe(t),l=0;for(i=0;i<e.length;++i){let p=e[i];if(V(p,Uint8Array))l+p.length>o.length?(s.isBuffer(p)||(p=s.from(p)),p.copy(o,l)):Uint8Array.prototype.set.call(o,p,l);else if(s.isBuffer(p))p.copy(o,l);else throw new TypeError('"list" argument must be an Array of Buffers');l+=p.length;}return o};function P(r,e){if(s.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||V(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let t=r.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Ce(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return $e(r).length;default:if(o)return i?-1:Ce(r).length;e=(""+e).toLowerCase(),o=!0;}}s.byteLength=P;function M(r,e,t){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return "";for(r||(r="utf8");;)switch(r){case"hex":return _t(this,e,t);case"utf8":case"utf-8":return xe(this,e,t);case"ascii":return yt(this,e,t);case"latin1":case"binary":return wt(this,e,t);case"base64":return gt(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ct(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0;}}s.prototype._isBuffer=!0;function D(r,e,t){let i=r[e];r[e]=r[t],r[t]=i;}s.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)D(this,t,t+1);return this},s.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)D(this,t,t+3),D(this,t+1,t+2);return this},s.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)D(this,t,t+7),D(this,t+1,t+6),D(this,t+2,t+5),D(this,t+3,t+4);return this},s.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?xe(this,0,e):M.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:s.compare(this,e)===0},s.prototype.inspect=function(){let e="",t=q.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,i,o,l){if(V(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),i===void 0&&(i=e?e.length:0),o===void 0&&(o=0),l===void 0&&(l=this.length),t<0||i>e.length||o<0||l>this.length)throw new RangeError("out of range index");if(o>=l&&t>=i)return 0;if(o>=l)return -1;if(t>=i)return 1;if(t>>>=0,i>>>=0,o>>>=0,l>>>=0,this===e)return 0;let p=l-o,g=i-t,A=Math.min(p,g),R=this.slice(o,l),O=e.slice(t,i);for(let w=0;w<A;++w)if(R[w]!==O[w]){p=R[w],g=O[w];break}return p<g?-1:g<p?1:0};function x(r,e,t,i,o){if(r.length===0)return -1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Ie(t)&&(t=o?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(o)return -1;t=r.length-1;}else if(t<0)if(o)t=0;else return -1;if(typeof e=="string"&&(e=s.from(e,i)),s.isBuffer(e))return e.length===0?-1:C(r,e,t,i,o);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):C(r,[e],t,i,o);throw new TypeError("val must be string, number or Buffer")}function C(r,e,t,i,o){let l=1,p=r.length,g=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||e.length<2)return -1;l=2,p/=2,g/=2,t/=2;}function A(O,w){return l===1?O[w]:O.readUInt16BE(w*l)}let R;if(o){let O=-1;for(R=t;R<p;R++)if(A(r,R)===A(e,O===-1?0:R-O)){if(O===-1&&(O=R),R-O+1===g)return O*l}else O!==-1&&(R-=R-O),O=-1;}else for(t+g>p&&(t=p-g),R=t;R>=0;R--){let O=!0;for(let w=0;w<g;w++)if(A(r,R+w)!==A(e,w)){O=!1;break}if(O)return R}return -1}s.prototype.includes=function(e,t,i){return this.indexOf(e,t,i)!==-1},s.prototype.indexOf=function(e,t,i){return x(this,e,t,i,!0)},s.prototype.lastIndexOf=function(e,t,i){return x(this,e,t,i,!1)};function pt(r,e,t,i){t=Number(t)||0;let o=r.length-t;i?(i=Number(i),i>o&&(i=o)):i=o;let l=e.length;i>l/2&&(i=l/2);let p;for(p=0;p<i;++p){let g=parseInt(e.substr(p*2,2),16);if(Ie(g))return p;r[t+p]=g;}return p}function dt(r,e,t,i){return de(Ce(e,r.length-t),r,t,i)}function ht(r,e,t,i){return de(vt(e),r,t,i)}function ft(r,e,t,i){return de($e(e),r,t,i)}function mt(r,e,t,i){return de(At(e,r.length-t),r,t,i)}s.prototype.write=function(e,t,i,o){if(t===void 0)o="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")o=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,o===void 0&&(o="utf8")):(o=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let l=this.length-t;if((i===void 0||i>l)&&(i=l),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let p=!1;for(;;)switch(o){case"hex":return pt(this,e,t,i);case"utf8":case"utf-8":return dt(this,e,t,i);case"ascii":case"latin1":case"binary":return ht(this,e,t,i);case"base64":return ft(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mt(this,e,t,i);default:if(p)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),p=!0;}},s.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function gt(r,e,t){return e===0&&t===r.length?c.fromByteArray(r):c.fromByteArray(r.slice(e,t))}function xe(r,e,t){t=Math.min(r.length,t);let i=[],o=e;for(;o<t;){let l=r[o],p=null,g=l>239?4:l>223?3:l>191?2:1;if(o+g<=t){let A,R,O,w;switch(g){case 1:l<128&&(p=l);break;case 2:A=r[o+1],(A&192)===128&&(w=(l&31)<<6|A&63,w>127&&(p=w));break;case 3:A=r[o+1],R=r[o+2],(A&192)===128&&(R&192)===128&&(w=(l&15)<<12|(A&63)<<6|R&63,w>2047&&(w<55296||w>57343)&&(p=w));break;case 4:A=r[o+1],R=r[o+2],O=r[o+3],(A&192)===128&&(R&192)===128&&(O&192)===128&&(w=(l&15)<<18|(A&63)<<12|(R&63)<<6|O&63,w>65535&&w<1114112&&(p=w));}}p===null?(p=65533,g=1):p>65535&&(p-=65536,i.push(p>>>10&1023|55296),p=56320|p&1023),i.push(p),o+=g;}return Et(i)}let Se=4096;function Et(r){let e=r.length;if(e<=Se)return String.fromCharCode.apply(String,r);let t="",i=0;for(;i<e;)t+=String.fromCharCode.apply(String,r.slice(i,i+=Se));return t}function yt(r,e,t){let i="";t=Math.min(r.length,t);for(let o=e;o<t;++o)i+=String.fromCharCode(r[o]&127);return i}function wt(r,e,t){let i="";t=Math.min(r.length,t);for(let o=e;o<t;++o)i+=String.fromCharCode(r[o]);return i}function _t(r,e,t){let i=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>i)&&(t=i);let o="";for(let l=e;l<t;++l)o+=Ot[r[l]];return o}function Ct(r,e,t){let i=r.slice(e,t),o="";for(let l=0;l<i.length-1;l+=2)o+=String.fromCharCode(i[l]+i[l+1]*256);return o}s.prototype.slice=function(e,t){let i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);let o=this.subarray(e,t);return Object.setPrototypeOf(o,s.prototype),o};function B(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||B(e,t,this.length);let o=this[e],l=1,p=0;for(;++p<t&&(l*=256);)o+=this[e+p]*l;return o},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||B(e,t,this.length);let o=this[e+--t],l=1;for(;t>0&&(l*=256);)o+=this[e+--t]*l;return o},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e=e>>>0,t||B(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||B(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||B(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||B(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=W(function(e){e=e>>>0,ee(e,"offset");let t=this[e],i=this[e+7];(t===void 0||i===void 0)&&oe(e,this.length-8);let o=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,l=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(o)+(BigInt(l)<<BigInt(32))}),s.prototype.readBigUInt64BE=W(function(e){e=e>>>0,ee(e,"offset");let t=this[e],i=this[e+7];(t===void 0||i===void 0)&&oe(e,this.length-8);let o=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],l=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return (BigInt(o)<<BigInt(32))+BigInt(l)}),s.prototype.readIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||B(e,t,this.length);let o=this[e],l=1,p=0;for(;++p<t&&(l*=256);)o+=this[e+p]*l;return l*=128,o>=l&&(o-=Math.pow(2,8*t)),o},s.prototype.readIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||B(e,t,this.length);let o=t,l=1,p=this[e+--o];for(;o>0&&(l*=256);)p+=this[e+--o]*l;return l*=128,p>=l&&(p-=Math.pow(2,8*t)),p},s.prototype.readInt8=function(e,t){return e=e>>>0,t||B(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e=e>>>0,t||B(e,2,this.length);let i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i},s.prototype.readInt16BE=function(e,t){e=e>>>0,t||B(e,2,this.length);let i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i},s.prototype.readInt32LE=function(e,t){return e=e>>>0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e=e>>>0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=W(function(e){e=e>>>0,ee(e,"offset");let t=this[e],i=this[e+7];(t===void 0||i===void 0)&&oe(e,this.length-8);let o=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return (BigInt(o)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),s.prototype.readBigInt64BE=W(function(e){e=e>>>0,ee(e,"offset");let t=this[e],i=this[e+7];(t===void 0||i===void 0)&&oe(e,this.length-8);let o=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return (BigInt(o)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)}),s.prototype.readFloatLE=function(e,t){return e=e>>>0,t||B(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e=e>>>0,t||B(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||B(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||B(e,8,this.length),n.read(this,e,!1,52,8)};function N(r,e,t,i,o,l){if(!s.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<l)throw new RangeError('"value" argument is out of bounds');if(t+i>r.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,i,o){if(e=+e,t=t>>>0,i=i>>>0,!o){let g=Math.pow(2,8*i)-1;N(this,e,t,i,g,0);}let l=1,p=0;for(this[t]=e&255;++p<i&&(l*=256);)this[t+p]=e/l&255;return t+i},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,i,o){if(e=+e,t=t>>>0,i=i>>>0,!o){let g=Math.pow(2,8*i)-1;N(this,e,t,i,g,0);}let l=i-1,p=1;for(this[t+l]=e&255;--l>=0&&(p*=256);)this[t+l]=e/p&255;return t+i},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Me(r,e,t,i,o){Ge(e,i,o,r,t,7);let l=Number(e&BigInt(4294967295));r[t++]=l,l=l>>8,r[t++]=l,l=l>>8,r[t++]=l,l=l>>8,r[t++]=l;let p=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=p,p=p>>8,r[t++]=p,p=p>>8,r[t++]=p,p=p>>8,r[t++]=p,t}function Ne(r,e,t,i,o){Ge(e,i,o,r,t,7);let l=Number(e&BigInt(4294967295));r[t+7]=l,l=l>>8,r[t+6]=l,l=l>>8,r[t+5]=l,l=l>>8,r[t+4]=l;let p=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=p,p=p>>8,r[t+2]=p,p=p>>8,r[t+1]=p,p=p>>8,r[t]=p,t+8}s.prototype.writeBigUInt64LE=W(function(e,t=0){return Me(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=W(function(e,t=0){return Ne(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,i,o){if(e=+e,t=t>>>0,!o){let A=Math.pow(2,8*i-1);N(this,e,t,i,A-1,-A);}let l=0,p=1,g=0;for(this[t]=e&255;++l<i&&(p*=256);)e<0&&g===0&&this[t+l-1]!==0&&(g=1),this[t+l]=(e/p>>0)-g&255;return t+i},s.prototype.writeIntBE=function(e,t,i,o){if(e=+e,t=t>>>0,!o){let A=Math.pow(2,8*i-1);N(this,e,t,i,A-1,-A);}let l=i-1,p=1,g=0;for(this[t+l]=e&255;--l>=0&&(p*=256);)e<0&&g===0&&this[t+l+1]!==0&&(g=1),this[t+l]=(e/p>>0)-g&255;return t+i},s.prototype.writeInt8=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeBigInt64LE=W(function(e,t=0){return Me(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=W(function(e,t=0){return Ne(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function De(r,e,t,i,o,l){if(t+i>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Fe(r,e,t,i,o){return e=+e,t=t>>>0,o||De(r,e,t,4),n.write(r,e,t,i,23,4),t+4}s.prototype.writeFloatLE=function(e,t,i){return Fe(this,e,t,!0,i)},s.prototype.writeFloatBE=function(e,t,i){return Fe(this,e,t,!1,i)};function He(r,e,t,i,o){return e=+e,t=t>>>0,o||De(r,e,t,8),n.write(r,e,t,i,52,8),t+8}s.prototype.writeDoubleLE=function(e,t,i){return He(this,e,t,!0,i)},s.prototype.writeDoubleBE=function(e,t,i){return He(this,e,t,!1,i)},s.prototype.copy=function(e,t,i,o){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!o&&o!==0&&(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<i&&(o=i),o===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-i&&(o=e.length-t+i);let l=o-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,o):Uint8Array.prototype.set.call(e,this.subarray(i,o),t),l},s.prototype.fill=function(e,t,i,o){if(typeof e=="string"){if(typeof t=="string"?(o=t,t=0,i=this.length):typeof i=="string"&&(o=i,i=this.length),o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!s.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(e.length===1){let p=e.charCodeAt(0);(o==="utf8"&&p<128||o==="latin1")&&(e=p);}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let l;if(typeof e=="number")for(l=t;l<i;++l)this[l]=e;else {let p=s.isBuffer(e)?e:s.from(e,o),g=p.length;if(g===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(l=0;l<i-t;++l)this[l+t]=p[l%g];}return this};let Q={};function _e(r,e,t){Q[r]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name;}get code(){return r}set code(o){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:o,writable:!0});}toString(){return `${this.name} [${r}]: ${this.message}`}};}_e("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),_e("ERR_INVALID_ARG_TYPE",function(r,e){return `The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError),_e("ERR_OUT_OF_RANGE",function(r,e,t){let i=`The value of "${r}" is out of range.`,o=t;return Number.isInteger(t)&&Math.abs(t)>2**32?o=Ve(String(t)):typeof t=="bigint"&&(o=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(o=Ve(o)),o+="n"),i+=` It must be ${e}. Received ${o}`,i},RangeError);function Ve(r){let e="",t=r.length,i=r[0]==="-"?1:0;for(;t>=i+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return `${r.slice(0,t)}${e}`}function It(r,e,t){ee(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&oe(e,r.length-(t+1));}function Ge(r,e,t,i,o,l){if(r>t||r<e){let p=typeof e=="bigint"?"n":"",g;throw e===0||e===BigInt(0)?g=`>= 0${p} and < 2${p} ** ${(l+1)*8}${p}`:g=`>= -(2${p} ** ${(l+1)*8-1}${p}) and < 2 ** ${(l+1)*8-1}${p}`,new Q.ERR_OUT_OF_RANGE("value",g,r)}It(i,o,l);}function ee(r,e){if(typeof r!="number")throw new Q.ERR_INVALID_ARG_TYPE(e,"number",r)}function oe(r,e,t){throw Math.floor(r)!==r?(ee(r,t),new Q.ERR_OUT_OF_RANGE("offset","an integer",r)):e<0?new Q.ERR_BUFFER_OUT_OF_BOUNDS:new Q.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${e}`,r)}let Rt=/[^+/0-9A-Za-z-_]/g;function Tt(r){if(r=r.split("=")[0],r=r.trim().replace(Rt,""),r.length<2)return "";for(;r.length%4!==0;)r=r+"=";return r}function Ce(r,e){e=e||1/0;let t,i=r.length,o=null,l=[];for(let p=0;p<i;++p){if(t=r.charCodeAt(p),t>55295&&t<57344){if(!o){if(t>56319){(e-=3)>-1&&l.push(239,191,189);continue}else if(p+1===i){(e-=3)>-1&&l.push(239,191,189);continue}o=t;continue}if(t<56320){(e-=3)>-1&&l.push(239,191,189),o=t;continue}t=(o-55296<<10|t-56320)+65536;}else o&&(e-=3)>-1&&l.push(239,191,189);if(o=null,t<128){if((e-=1)<0)break;l.push(t);}else if(t<2048){if((e-=2)<0)break;l.push(t>>6|192,t&63|128);}else if(t<65536){if((e-=3)<0)break;l.push(t>>12|224,t>>6&63|128,t&63|128);}else if(t<1114112){if((e-=4)<0)break;l.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128);}else throw new Error("Invalid code point")}return l}function vt(r){let e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function At(r,e){let t,i,o,l=[];for(let p=0;p<r.length&&!((e-=2)<0);++p)t=r.charCodeAt(p),i=t>>8,o=t%256,l.push(o),l.push(i);return l}function $e(r){return c.toByteArray(Tt(r))}function de(r,e,t,i){let o;for(o=0;o<i&&!(o+t>=e.length||o>=r.length);++o)e[o+t]=r[o];return o}function V(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function Ie(r){return r!==r}let Ot=function(){let r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){let i=t*16;for(let o=0;o<16;++o)e[i+o]=r[t]+r[o];}return e}();function W(r){return typeof BigInt>"u"?Lt:r}function Lt(){throw new Error("BigInt not supported")}return q}var X=Kr();X.Buffer;X.SlowBuffer;X.INSPECT_MAX_BYTES;X.kMaxLength;var L=X.Buffer;X.INSPECT_MAX_BYTES;X.kMaxLength;var me=(C=>(C.AUTHENTICATION_ERROR="AUTHENTICATION_ERROR",C.INVALID_CONFIGURATION="INVALID_CONFIGURATION",C.WALLET_CONNECTION_ERROR="WALLET_CONNECTION_ERROR",C.NOT_LOGGED_IN_ERROR="NOT_LOGGED_IN_ERROR",C.SILENT_LOGIN_ERROR="SILENT_LOGIN_ERROR",C.REFRESH_TOKEN_ERROR="REFRESH_TOKEN_ERROR",C.USER_REGISTRATION_ERROR="USER_REGISTRATION_ERROR",C.USER_NOT_REGISTERED_ERROR="USER_NOT_REGISTERED_ERROR",C.LOGOUT_ERROR="LOGOUT_ERROR",C.TRANSFER_ERROR="TRANSFER_ERROR",C.CREATE_ORDER_ERROR="CREATE_ORDER_ERROR",C.CANCEL_ORDER_ERROR="CANCEL_ORDER_ERROR",C.EXCHANGE_TRANSFER_ERROR="EXCHANGE_TRANSFER_ERROR",C.CREATE_TRADE_ERROR="CREATE_TRADE_ERROR",C.OPERATION_NOT_SUPPORTED_ERROR="OPERATION_NOT_SUPPORTED_ERROR",C.LINK_WALLET_ALREADY_LINKED_ERROR="LINK_WALLET_ALREADY_LINKED_ERROR",C.LINK_WALLET_MAX_WALLETS_LINKED_ERROR="LINK_WALLET_MAX_WALLETS_LINKED_ERROR",C.LINK_WALLET_VALIDATION_ERROR="LINK_WALLET_VALIDATION_ERROR",C.LINK_WALLET_DUPLICATE_NONCE_ERROR="LINK_WALLET_DUPLICATE_NONCE_ERROR",C.LINK_WALLET_GENERIC_ERROR="LINK_WALLET_GENERIC_ERROR",C.SERVICE_UNAVAILABLE_ERROR="SERVICE_UNAVAILABLE_ERROR",C.TRANSACTION_REJECTED="TRANSACTION_REJECTED",C))(me||{});function Le(c){return typeof c=="object"&&c!==null&&"code"in c&&"message"in c}var Wr=c=>{if(Le(c))return c;if(typeof c=="object"&&c!==null&&"response"in c){let{response:n}=c;if(n?.data&&Le(n.data))return n.data}},G=class extends Error{type;constructor(n,a){super(n),this.type=a;}},z=async(c,n)=>{try{return await c()}catch(a){let u;if(a instanceof G&&a.type==="SERVICE_UNAVAILABLE_ERROR")throw new G(a.message,a.type);let d=Wr(a);throw d?u=d.message:u=a.message,new G(u,n)}};var Zr=(c,n,a)=>{let u=n.map(d=>!c[d]&&d).filter(d=>d).join(", ");if(u!==""){let d=`${u} cannot be null`;throw new G(d,"INVALID_CONFIGURATION")}},ae=class{authenticationDomain;passportDomain;oidcConfiguration;crossSdkBridgeEnabled;popupOverlayOptions;constructor({authenticationDomain:n,passportDomain:a,crossSdkBridgeEnabled:u,popupOverlayOptions:d,...h}){Zr(h,["clientId","redirectUri"]),this.oidcConfiguration=h,this.crossSdkBridgeEnabled=u||!1,this.popupOverlayOptions=d,this.authenticationDomain=n||"https://auth.immutable.com",this.passportDomain=a||"https://passport.immutable.com";}};var Je=(n=>(n.ZKEVM="zkEvm",n))(Je||{}),Pe=c=>!!c.zkEvm,je=(a=>(a.OptedIn="opted_in",a.Unsubscribed="unsubscribed",a))(je||{}),Ue=(a=>(a.LOGGED_OUT="loggedOut",a.LOGGED_IN="loggedIn",a))(Ue||{});var qe="im_passport_embedded_login_prompt";var re="passport-overlay",le="passport-overlay-contents",ge=`${re}-close`,Ee=`${re}-try-again`,Xe=`
5
+ function Ae(c){throw new Error("Node.js process "+c+" is not supported by JSPM core outside of Node.js")}var K=[],te=!1,j,he=-1;function Pt(){!te||!j||(te=!1,j.length?K=j.concat(K):he=-1,K.length&&Ke());}function Ke(){if(!te){var c=setTimeout(Pt,0);te=!0;for(var n=K.length;n;){for(j=K,K=[];++he<n;)j&&j[he].run();he=-1,n=K.length;}j=null,te=!1,clearTimeout(c);}}function Ut(c){var n=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)n[a-1]=arguments[a];K.push(new We(c,n)),K.length===1&&!te&&setTimeout(Ke,0);}function We(c,n){this.fun=c,this.array=n;}We.prototype.run=function(){this.fun.apply(null,this.array);};var Bt="browser",kt="x64",bt="browser",xt={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},St=["/usr/bin/node"],Mt=[],Nt="v16.8.0",Dt={},Ft=function(c,n){console.warn((n?n+": ":"")+c);},Ht=function(c){Ae("binding");},Vt=function(c){return 0},Gt=function(){return "/"},$t=function(c){},Kt={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function b(){}var Wt=b,Zt=[];function Yt(c){Ae("_linkedBinding");}var zt={},Jt=!1,jt={};function qt(c){Ae("dlopen");}function Xt(){return []}function Qt(){return []}var er=b,tr=b,Oe=function(){return {}},rr=Oe,nr=Oe,ir=b,or=b,sr=b,ar={};function lr(c,n){if(!c)throw new Error(n||"assertion error")}var ur={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},cr=b,pr=b;function dr(){return !1}var hr=b,fr=b,mr=b,gr=b,Er=b,yr=void 0,wr=void 0,_r=void 0,Cr=b,Ir=2,Rr=1,Tr="/bin/usr/node",vr=9229,Ar="node",Or=[],Lr=b,Z={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Z.now===void 0&&(Re=Date.now(),Z.timing&&Z.timing.navigationStart&&(Re=Z.timing.navigationStart),Z.now=()=>Date.now()-Re);var Re;function Pr(){return Z.now()/1e3}var Te=1e9;function ve(c){var n=Math.floor((Date.now()-Z.now())*.001),a=Z.now()*.001,u=Math.floor(a)+n,d=Math.floor(a%1*1e9);return c&&(u=u-c[0],d=d-c[1],d<0&&(u--,d+=Te)),[u,d]}ve.bigint=function(c){var n=ve(c);return typeof BigInt>"u"?n[0]*Te+n[1]:BigInt(n[0]*Te)+BigInt(n[1])};var Ur=10,Br={},kr=0;function Y(){return v}var br=Y,xr=Y,Sr=Y,Mr=Y,Nr=Y,Dr=b,Fr=Y,Hr=Y;function Vr(c){return []}var v={version:Nt,versions:Dt,arch:kt,platform:bt,release:Kt,_rawDebug:Wt,moduleLoadList:Zt,binding:Ht,_linkedBinding:Yt,_events:Br,_eventsCount:kr,_maxListeners:Ur,on:Y,addListener:br,once:xr,off:Sr,removeListener:Mr,removeAllListeners:Nr,emit:Dr,prependListener:Fr,prependOnceListener:Hr,listeners:Vr,domain:zt,_exiting:Jt,config:jt,dlopen:qt,uptime:Pr,_getActiveRequests:Xt,_getActiveHandles:Qt,reallyExit:er,_kill:tr,cpuUsage:Oe,resourceUsage:rr,memoryUsage:nr,kill:ir,exit:or,openStdin:sr,allowedNodeEnvironmentFlags:ar,assert:lr,features:ur,_fatalExceptions:cr,setUncaughtExceptionCaptureCallback:pr,hasUncaughtExceptionCaptureCallback:dr,emitWarning:Ft,nextTick:Ut,_tickCallback:hr,_debugProcess:fr,_debugEnd:mr,_startProfilerIdleNotifier:gr,_stopProfilerIdleNotifier:Er,stdout:yr,stdin:_r,stderr:wr,abort:Cr,umask:Vt,chdir:$t,cwd:Gt,env:xt,title:Bt,argv:St,execArgv:Mt,pid:Ir,ppid:Rr,execPath:Tr,debugPort:vr,hrtime:ve,argv0:Ar,_preload_modules:Or,setSourceMapsEnabled:Lr};var se={},Ze=!1;function Gr(){if(Ze)return se;Ze=!0,se.byteLength=y,se.toByteArray=k,se.fromByteArray=F;for(var c=[],n=[],a=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,h=u.length;d<h;++d)c[d]=u[d],n[u.charCodeAt(d)]=d;n[45]=62,n[95]=63;function s(f){var E=f.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=f.indexOf("=");_===-1&&(_=E);var U=_===E?0:4-_%4;return [_,U]}function y(f){var E=s(f),_=E[0],U=E[1];return (_+U)*3/4-U}function T(f,E,_){return (E+_)*3/4-_}function k(f){var E,_=s(f),U=_[0],S=_[1],P=new a(T(f,U,S)),M=0,D=S>0?U-4:U,x;for(x=0;x<D;x+=4)E=n[f.charCodeAt(x)]<<18|n[f.charCodeAt(x+1)]<<12|n[f.charCodeAt(x+2)]<<6|n[f.charCodeAt(x+3)],P[M++]=E>>16&255,P[M++]=E>>8&255,P[M++]=E&255;return S===2&&(E=n[f.charCodeAt(x)]<<2|n[f.charCodeAt(x+1)]>>4,P[M++]=E&255),S===1&&(E=n[f.charCodeAt(x)]<<10|n[f.charCodeAt(x+1)]<<4|n[f.charCodeAt(x+2)]>>2,P[M++]=E>>8&255,P[M++]=E&255),P}function m(f){return c[f>>18&63]+c[f>>12&63]+c[f>>6&63]+c[f&63]}function I(f,E,_){for(var U,S=[],P=E;P<_;P+=3)U=(f[P]<<16&16711680)+(f[P+1]<<8&65280)+(f[P+2]&255),S.push(m(U));return S.join("")}function F(f){for(var E,_=f.length,U=_%3,S=[],P=16383,M=0,D=_-U;M<D;M+=P)S.push(I(f,M,M+P>D?D:M+P));return U===1?(E=f[_-1],S.push(c[E>>2]+c[E<<4&63]+"==")):U===2&&(E=(f[_-2]<<8)+f[_-1],S.push(c[E>>10]+c[E>>4&63]+c[E<<2&63]+"=")),S.join("")}return se}var fe={},Ye=!1;function $r(){if(Ye)return fe;Ye=!0;return fe.read=function(c,n,a,u,d){var h,s,y=d*8-u-1,T=(1<<y)-1,k=T>>1,m=-7,I=a?d-1:0,F=a?-1:1,f=c[n+I];for(I+=F,h=f&(1<<-m)-1,f>>=-m,m+=y;m>0;h=h*256+c[n+I],I+=F,m-=8);for(s=h&(1<<-m)-1,h>>=-m,m+=u;m>0;s=s*256+c[n+I],I+=F,m-=8);if(h===0)h=1-k;else {if(h===T)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,u),h=h-k;}return (f?-1:1)*s*Math.pow(2,h-u)},fe.write=function(c,n,a,u,d,h){var s,y,T,k=h*8-d-1,m=(1<<k)-1,I=m>>1,F=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=u?0:h-1,E=u?1:-1,_=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(y=isNaN(n)?1:0,s=m):(s=Math.floor(Math.log(n)/Math.LN2),n*(T=Math.pow(2,-s))<1&&(s--,T*=2),s+I>=1?n+=F/T:n+=F*Math.pow(2,1-I),n*T>=2&&(s++,T/=2),s+I>=m?(y=0,s=m):s+I>=1?(y=(n*T-1)*Math.pow(2,d),s=s+I):(y=n*Math.pow(2,I-1)*Math.pow(2,d),s=0));d>=8;c[a+f]=y&255,f+=E,y/=256,d-=8);for(s=s<<d|y,k+=d;k>0;c[a+f]=s&255,f+=E,s/=256,k-=8);c[a+f-E]|=_*128;},fe}var q={},ze=!1;function Kr(){if(ze)return q;ze=!0;let c=Gr(),n=$r(),a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;q.Buffer=s,q.SlowBuffer=S,q.INSPECT_MAX_BYTES=50;let u=2147483647;q.kMaxLength=u,s.TYPED_ARRAY_SUPPORT=d(),!s.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 d(){try{let r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return !1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function h(r){if(r>u)throw new RangeError('The value "'+r+'" is invalid for option "size"');let e=new Uint8Array(r);return Object.setPrototypeOf(e,s.prototype),e}function s(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(r)}return y(r,e,t)}s.poolSize=8192;function y(r,e,t){if(typeof r=="string")return I(r,e);if(ArrayBuffer.isView(r))return f(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(V(r,ArrayBuffer)||r&&V(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V(r,SharedArrayBuffer)||r&&V(r.buffer,SharedArrayBuffer)))return E(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=r.valueOf&&r.valueOf();if(i!=null&&i!==r)return s.from(i,e,t);let o=_(r);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return s.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}s.from=function(r,e,t){return y(r,e,t)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function T(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function k(r,e,t){return T(r),r<=0?h(r):e!==void 0?typeof t=="string"?h(r).fill(e,t):h(r).fill(e):h(r)}s.alloc=function(r,e,t){return k(r,e,t)};function m(r){return T(r),h(r<0?0:U(r)|0)}s.allocUnsafe=function(r){return m(r)},s.allocUnsafeSlow=function(r){return m(r)};function I(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let t=P(r,e)|0,i=h(t),o=i.write(r,e);return o!==t&&(i=i.slice(0,o)),i}function F(r){let e=r.length<0?0:U(r.length)|0,t=h(e);for(let i=0;i<e;i+=1)t[i]=r[i]&255;return t}function f(r){if(V(r,Uint8Array)){let e=new Uint8Array(r);return E(e.buffer,e.byteOffset,e.byteLength)}return F(r)}function E(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&t===void 0?i=new Uint8Array(r):t===void 0?i=new Uint8Array(r,e):i=new Uint8Array(r,e,t),Object.setPrototypeOf(i,s.prototype),i}function _(r){if(s.isBuffer(r)){let e=U(r.length)|0,t=h(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||Ie(r.length)?h(0):F(r);if(r.type==="Buffer"&&Array.isArray(r.data))return F(r.data)}function U(r){if(r>=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return r|0}function S(r){return +r!=r&&(r=0),s.alloc(+r)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(V(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),V(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let i=e.length,o=t.length;for(let l=0,p=Math.min(i,o);l<p;++l)if(e[l]!==t[l]){i=e[l],o=t[l];break}return i<o?-1:o<i?1:0},s.isEncoding=function(e){switch(String(e).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}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return s.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;let o=s.allocUnsafe(t),l=0;for(i=0;i<e.length;++i){let p=e[i];if(V(p,Uint8Array))l+p.length>o.length?(s.isBuffer(p)||(p=s.from(p)),p.copy(o,l)):Uint8Array.prototype.set.call(o,p,l);else if(s.isBuffer(p))p.copy(o,l);else throw new TypeError('"list" argument must be an Array of Buffers');l+=p.length;}return o};function P(r,e){if(s.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||V(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let t=r.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Ce(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return $e(r).length;default:if(o)return i?-1:Ce(r).length;e=(""+e).toLowerCase(),o=!0;}}s.byteLength=P;function M(r,e,t){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return "";for(r||(r="utf8");;)switch(r){case"hex":return _t(this,e,t);case"utf8":case"utf-8":return xe(this,e,t);case"ascii":return yt(this,e,t);case"latin1":case"binary":return wt(this,e,t);case"base64":return gt(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ct(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0;}}s.prototype._isBuffer=!0;function D(r,e,t){let i=r[e];r[e]=r[t],r[t]=i;}s.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)D(this,t,t+1);return this},s.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)D(this,t,t+3),D(this,t+1,t+2);return this},s.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)D(this,t,t+7),D(this,t+1,t+6),D(this,t+2,t+5),D(this,t+3,t+4);return this},s.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?xe(this,0,e):M.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:s.compare(this,e)===0},s.prototype.inspect=function(){let e="",t=q.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,i,o,l){if(V(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),i===void 0&&(i=e?e.length:0),o===void 0&&(o=0),l===void 0&&(l=this.length),t<0||i>e.length||o<0||l>this.length)throw new RangeError("out of range index");if(o>=l&&t>=i)return 0;if(o>=l)return -1;if(t>=i)return 1;if(t>>>=0,i>>>=0,o>>>=0,l>>>=0,this===e)return 0;let p=l-o,g=i-t,A=Math.min(p,g),R=this.slice(o,l),O=e.slice(t,i);for(let w=0;w<A;++w)if(R[w]!==O[w]){p=R[w],g=O[w];break}return p<g?-1:g<p?1:0};function x(r,e,t,i,o){if(r.length===0)return -1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Ie(t)&&(t=o?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(o)return -1;t=r.length-1;}else if(t<0)if(o)t=0;else return -1;if(typeof e=="string"&&(e=s.from(e,i)),s.isBuffer(e))return e.length===0?-1:C(r,e,t,i,o);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):C(r,[e],t,i,o);throw new TypeError("val must be string, number or Buffer")}function C(r,e,t,i,o){let l=1,p=r.length,g=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||e.length<2)return -1;l=2,p/=2,g/=2,t/=2;}function A(O,w){return l===1?O[w]:O.readUInt16BE(w*l)}let R;if(o){let O=-1;for(R=t;R<p;R++)if(A(r,R)===A(e,O===-1?0:R-O)){if(O===-1&&(O=R),R-O+1===g)return O*l}else O!==-1&&(R-=R-O),O=-1;}else for(t+g>p&&(t=p-g),R=t;R>=0;R--){let O=!0;for(let w=0;w<g;w++)if(A(r,R+w)!==A(e,w)){O=!1;break}if(O)return R}return -1}s.prototype.includes=function(e,t,i){return this.indexOf(e,t,i)!==-1},s.prototype.indexOf=function(e,t,i){return x(this,e,t,i,!0)},s.prototype.lastIndexOf=function(e,t,i){return x(this,e,t,i,!1)};function pt(r,e,t,i){t=Number(t)||0;let o=r.length-t;i?(i=Number(i),i>o&&(i=o)):i=o;let l=e.length;i>l/2&&(i=l/2);let p;for(p=0;p<i;++p){let g=parseInt(e.substr(p*2,2),16);if(Ie(g))return p;r[t+p]=g;}return p}function dt(r,e,t,i){return de(Ce(e,r.length-t),r,t,i)}function ht(r,e,t,i){return de(vt(e),r,t,i)}function ft(r,e,t,i){return de($e(e),r,t,i)}function mt(r,e,t,i){return de(At(e,r.length-t),r,t,i)}s.prototype.write=function(e,t,i,o){if(t===void 0)o="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")o=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,o===void 0&&(o="utf8")):(o=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let l=this.length-t;if((i===void 0||i>l)&&(i=l),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let p=!1;for(;;)switch(o){case"hex":return pt(this,e,t,i);case"utf8":case"utf-8":return dt(this,e,t,i);case"ascii":case"latin1":case"binary":return ht(this,e,t,i);case"base64":return ft(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mt(this,e,t,i);default:if(p)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),p=!0;}},s.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function gt(r,e,t){return e===0&&t===r.length?c.fromByteArray(r):c.fromByteArray(r.slice(e,t))}function xe(r,e,t){t=Math.min(r.length,t);let i=[],o=e;for(;o<t;){let l=r[o],p=null,g=l>239?4:l>223?3:l>191?2:1;if(o+g<=t){let A,R,O,w;switch(g){case 1:l<128&&(p=l);break;case 2:A=r[o+1],(A&192)===128&&(w=(l&31)<<6|A&63,w>127&&(p=w));break;case 3:A=r[o+1],R=r[o+2],(A&192)===128&&(R&192)===128&&(w=(l&15)<<12|(A&63)<<6|R&63,w>2047&&(w<55296||w>57343)&&(p=w));break;case 4:A=r[o+1],R=r[o+2],O=r[o+3],(A&192)===128&&(R&192)===128&&(O&192)===128&&(w=(l&15)<<18|(A&63)<<12|(R&63)<<6|O&63,w>65535&&w<1114112&&(p=w));}}p===null?(p=65533,g=1):p>65535&&(p-=65536,i.push(p>>>10&1023|55296),p=56320|p&1023),i.push(p),o+=g;}return Et(i)}let Se=4096;function Et(r){let e=r.length;if(e<=Se)return String.fromCharCode.apply(String,r);let t="",i=0;for(;i<e;)t+=String.fromCharCode.apply(String,r.slice(i,i+=Se));return t}function yt(r,e,t){let i="";t=Math.min(r.length,t);for(let o=e;o<t;++o)i+=String.fromCharCode(r[o]&127);return i}function wt(r,e,t){let i="";t=Math.min(r.length,t);for(let o=e;o<t;++o)i+=String.fromCharCode(r[o]);return i}function _t(r,e,t){let i=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>i)&&(t=i);let o="";for(let l=e;l<t;++l)o+=Ot[r[l]];return o}function Ct(r,e,t){let i=r.slice(e,t),o="";for(let l=0;l<i.length-1;l+=2)o+=String.fromCharCode(i[l]+i[l+1]*256);return o}s.prototype.slice=function(e,t){let i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);let o=this.subarray(e,t);return Object.setPrototypeOf(o,s.prototype),o};function B(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||B(e,t,this.length);let o=this[e],l=1,p=0;for(;++p<t&&(l*=256);)o+=this[e+p]*l;return o},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||B(e,t,this.length);let o=this[e+--t],l=1;for(;t>0&&(l*=256);)o+=this[e+--t]*l;return o},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e=e>>>0,t||B(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||B(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||B(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||B(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=W(function(e){e=e>>>0,ee(e,"offset");let t=this[e],i=this[e+7];(t===void 0||i===void 0)&&oe(e,this.length-8);let o=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,l=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(o)+(BigInt(l)<<BigInt(32))}),s.prototype.readBigUInt64BE=W(function(e){e=e>>>0,ee(e,"offset");let t=this[e],i=this[e+7];(t===void 0||i===void 0)&&oe(e,this.length-8);let o=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],l=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return (BigInt(o)<<BigInt(32))+BigInt(l)}),s.prototype.readIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||B(e,t,this.length);let o=this[e],l=1,p=0;for(;++p<t&&(l*=256);)o+=this[e+p]*l;return l*=128,o>=l&&(o-=Math.pow(2,8*t)),o},s.prototype.readIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||B(e,t,this.length);let o=t,l=1,p=this[e+--o];for(;o>0&&(l*=256);)p+=this[e+--o]*l;return l*=128,p>=l&&(p-=Math.pow(2,8*t)),p},s.prototype.readInt8=function(e,t){return e=e>>>0,t||B(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e=e>>>0,t||B(e,2,this.length);let i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i},s.prototype.readInt16BE=function(e,t){e=e>>>0,t||B(e,2,this.length);let i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i},s.prototype.readInt32LE=function(e,t){return e=e>>>0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e=e>>>0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=W(function(e){e=e>>>0,ee(e,"offset");let t=this[e],i=this[e+7];(t===void 0||i===void 0)&&oe(e,this.length-8);let o=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return (BigInt(o)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),s.prototype.readBigInt64BE=W(function(e){e=e>>>0,ee(e,"offset");let t=this[e],i=this[e+7];(t===void 0||i===void 0)&&oe(e,this.length-8);let o=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return (BigInt(o)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)}),s.prototype.readFloatLE=function(e,t){return e=e>>>0,t||B(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e=e>>>0,t||B(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||B(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||B(e,8,this.length),n.read(this,e,!1,52,8)};function N(r,e,t,i,o,l){if(!s.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<l)throw new RangeError('"value" argument is out of bounds');if(t+i>r.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,i,o){if(e=+e,t=t>>>0,i=i>>>0,!o){let g=Math.pow(2,8*i)-1;N(this,e,t,i,g,0);}let l=1,p=0;for(this[t]=e&255;++p<i&&(l*=256);)this[t+p]=e/l&255;return t+i},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,i,o){if(e=+e,t=t>>>0,i=i>>>0,!o){let g=Math.pow(2,8*i)-1;N(this,e,t,i,g,0);}let l=i-1,p=1;for(this[t+l]=e&255;--l>=0&&(p*=256);)this[t+l]=e/p&255;return t+i},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Me(r,e,t,i,o){Ge(e,i,o,r,t,7);let l=Number(e&BigInt(4294967295));r[t++]=l,l=l>>8,r[t++]=l,l=l>>8,r[t++]=l,l=l>>8,r[t++]=l;let p=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=p,p=p>>8,r[t++]=p,p=p>>8,r[t++]=p,p=p>>8,r[t++]=p,t}function Ne(r,e,t,i,o){Ge(e,i,o,r,t,7);let l=Number(e&BigInt(4294967295));r[t+7]=l,l=l>>8,r[t+6]=l,l=l>>8,r[t+5]=l,l=l>>8,r[t+4]=l;let p=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=p,p=p>>8,r[t+2]=p,p=p>>8,r[t+1]=p,p=p>>8,r[t]=p,t+8}s.prototype.writeBigUInt64LE=W(function(e,t=0){return Me(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=W(function(e,t=0){return Ne(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,i,o){if(e=+e,t=t>>>0,!o){let A=Math.pow(2,8*i-1);N(this,e,t,i,A-1,-A);}let l=0,p=1,g=0;for(this[t]=e&255;++l<i&&(p*=256);)e<0&&g===0&&this[t+l-1]!==0&&(g=1),this[t+l]=(e/p>>0)-g&255;return t+i},s.prototype.writeIntBE=function(e,t,i,o){if(e=+e,t=t>>>0,!o){let A=Math.pow(2,8*i-1);N(this,e,t,i,A-1,-A);}let l=i-1,p=1,g=0;for(this[t+l]=e&255;--l>=0&&(p*=256);)e<0&&g===0&&this[t+l+1]!==0&&(g=1),this[t+l]=(e/p>>0)-g&255;return t+i},s.prototype.writeInt8=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeBigInt64LE=W(function(e,t=0){return Me(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=W(function(e,t=0){return Ne(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function De(r,e,t,i,o,l){if(t+i>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Fe(r,e,t,i,o){return e=+e,t=t>>>0,o||De(r,e,t,4),n.write(r,e,t,i,23,4),t+4}s.prototype.writeFloatLE=function(e,t,i){return Fe(this,e,t,!0,i)},s.prototype.writeFloatBE=function(e,t,i){return Fe(this,e,t,!1,i)};function He(r,e,t,i,o){return e=+e,t=t>>>0,o||De(r,e,t,8),n.write(r,e,t,i,52,8),t+8}s.prototype.writeDoubleLE=function(e,t,i){return He(this,e,t,!0,i)},s.prototype.writeDoubleBE=function(e,t,i){return He(this,e,t,!1,i)},s.prototype.copy=function(e,t,i,o){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!o&&o!==0&&(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<i&&(o=i),o===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-i&&(o=e.length-t+i);let l=o-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,o):Uint8Array.prototype.set.call(e,this.subarray(i,o),t),l},s.prototype.fill=function(e,t,i,o){if(typeof e=="string"){if(typeof t=="string"?(o=t,t=0,i=this.length):typeof i=="string"&&(o=i,i=this.length),o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!s.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(e.length===1){let p=e.charCodeAt(0);(o==="utf8"&&p<128||o==="latin1")&&(e=p);}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let l;if(typeof e=="number")for(l=t;l<i;++l)this[l]=e;else {let p=s.isBuffer(e)?e:s.from(e,o),g=p.length;if(g===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(l=0;l<i-t;++l)this[l+t]=p[l%g];}return this};let Q={};function _e(r,e,t){Q[r]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name;}get code(){return r}set code(o){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:o,writable:!0});}toString(){return `${this.name} [${r}]: ${this.message}`}};}_e("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),_e("ERR_INVALID_ARG_TYPE",function(r,e){return `The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError),_e("ERR_OUT_OF_RANGE",function(r,e,t){let i=`The value of "${r}" is out of range.`,o=t;return Number.isInteger(t)&&Math.abs(t)>2**32?o=Ve(String(t)):typeof t=="bigint"&&(o=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(o=Ve(o)),o+="n"),i+=` It must be ${e}. Received ${o}`,i},RangeError);function Ve(r){let e="",t=r.length,i=r[0]==="-"?1:0;for(;t>=i+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return `${r.slice(0,t)}${e}`}function It(r,e,t){ee(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&oe(e,r.length-(t+1));}function Ge(r,e,t,i,o,l){if(r>t||r<e){let p=typeof e=="bigint"?"n":"",g;throw e===0||e===BigInt(0)?g=`>= 0${p} and < 2${p} ** ${(l+1)*8}${p}`:g=`>= -(2${p} ** ${(l+1)*8-1}${p}) and < 2 ** ${(l+1)*8-1}${p}`,new Q.ERR_OUT_OF_RANGE("value",g,r)}It(i,o,l);}function ee(r,e){if(typeof r!="number")throw new Q.ERR_INVALID_ARG_TYPE(e,"number",r)}function oe(r,e,t){throw Math.floor(r)!==r?(ee(r,t),new Q.ERR_OUT_OF_RANGE("offset","an integer",r)):e<0?new Q.ERR_BUFFER_OUT_OF_BOUNDS:new Q.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${e}`,r)}let Rt=/[^+/0-9A-Za-z-_]/g;function Tt(r){if(r=r.split("=")[0],r=r.trim().replace(Rt,""),r.length<2)return "";for(;r.length%4!==0;)r=r+"=";return r}function Ce(r,e){e=e||1/0;let t,i=r.length,o=null,l=[];for(let p=0;p<i;++p){if(t=r.charCodeAt(p),t>55295&&t<57344){if(!o){if(t>56319){(e-=3)>-1&&l.push(239,191,189);continue}else if(p+1===i){(e-=3)>-1&&l.push(239,191,189);continue}o=t;continue}if(t<56320){(e-=3)>-1&&l.push(239,191,189),o=t;continue}t=(o-55296<<10|t-56320)+65536;}else o&&(e-=3)>-1&&l.push(239,191,189);if(o=null,t<128){if((e-=1)<0)break;l.push(t);}else if(t<2048){if((e-=2)<0)break;l.push(t>>6|192,t&63|128);}else if(t<65536){if((e-=3)<0)break;l.push(t>>12|224,t>>6&63|128,t&63|128);}else if(t<1114112){if((e-=4)<0)break;l.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128);}else throw new Error("Invalid code point")}return l}function vt(r){let e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function At(r,e){let t,i,o,l=[];for(let p=0;p<r.length&&!((e-=2)<0);++p)t=r.charCodeAt(p),i=t>>8,o=t%256,l.push(o),l.push(i);return l}function $e(r){return c.toByteArray(Tt(r))}function de(r,e,t,i){let o;for(o=0;o<i&&!(o+t>=e.length||o>=r.length);++o)e[o+t]=r[o];return o}function V(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function Ie(r){return r!==r}let Ot=function(){let r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){let i=t*16;for(let o=0;o<16;++o)e[i+o]=r[t]+r[o];}return e}();function W(r){return typeof BigInt>"u"?Lt:r}function Lt(){throw new Error("BigInt not supported")}return q}var X=Kr();X.Buffer;X.SlowBuffer;X.INSPECT_MAX_BYTES;X.kMaxLength;var L=X.Buffer;X.INSPECT_MAX_BYTES;X.kMaxLength;var me=(C=>(C.AUTHENTICATION_ERROR="AUTHENTICATION_ERROR",C.INVALID_CONFIGURATION="INVALID_CONFIGURATION",C.WALLET_CONNECTION_ERROR="WALLET_CONNECTION_ERROR",C.NOT_LOGGED_IN_ERROR="NOT_LOGGED_IN_ERROR",C.SILENT_LOGIN_ERROR="SILENT_LOGIN_ERROR",C.REFRESH_TOKEN_ERROR="REFRESH_TOKEN_ERROR",C.USER_REGISTRATION_ERROR="USER_REGISTRATION_ERROR",C.USER_NOT_REGISTERED_ERROR="USER_NOT_REGISTERED_ERROR",C.LOGOUT_ERROR="LOGOUT_ERROR",C.TRANSFER_ERROR="TRANSFER_ERROR",C.CREATE_ORDER_ERROR="CREATE_ORDER_ERROR",C.CANCEL_ORDER_ERROR="CANCEL_ORDER_ERROR",C.EXCHANGE_TRANSFER_ERROR="EXCHANGE_TRANSFER_ERROR",C.CREATE_TRADE_ERROR="CREATE_TRADE_ERROR",C.OPERATION_NOT_SUPPORTED_ERROR="OPERATION_NOT_SUPPORTED_ERROR",C.LINK_WALLET_ALREADY_LINKED_ERROR="LINK_WALLET_ALREADY_LINKED_ERROR",C.LINK_WALLET_MAX_WALLETS_LINKED_ERROR="LINK_WALLET_MAX_WALLETS_LINKED_ERROR",C.LINK_WALLET_VALIDATION_ERROR="LINK_WALLET_VALIDATION_ERROR",C.LINK_WALLET_DUPLICATE_NONCE_ERROR="LINK_WALLET_DUPLICATE_NONCE_ERROR",C.LINK_WALLET_GENERIC_ERROR="LINK_WALLET_GENERIC_ERROR",C.SERVICE_UNAVAILABLE_ERROR="SERVICE_UNAVAILABLE_ERROR",C.TRANSACTION_REJECTED="TRANSACTION_REJECTED",C))(me||{});function Le(c){return typeof c=="object"&&c!==null&&"code"in c&&"message"in c}var Wr=c=>{if(Le(c))return c;if(typeof c=="object"&&c!==null&&"response"in c){let{response:n}=c;if(n?.data&&Le(n.data))return n.data}},G=class extends Error{type;constructor(n,a){super(n),this.type=a;}},z=async(c,n)=>{try{return await c()}catch(a){let u;if(a instanceof G&&a.type==="SERVICE_UNAVAILABLE_ERROR")throw new G(a.message,a.type);let d=Wr(a);throw d?u=d.message:u=a.message,new G(u,n)}};var Zr=(c,n,a)=>{let u=n.map(d=>!c[d]&&d).filter(d=>d).join(", ");if(u!==""){let d=`${u} cannot be null`;throw new G(d,"INVALID_CONFIGURATION")}},ae=class{authenticationDomain;passportDomain;oidcConfiguration;crossSdkBridgeEnabled;popupOverlayOptions;constructor({authenticationDomain:n,passportDomain:a,crossSdkBridgeEnabled:u,popupOverlayOptions:d,...h}){Zr(h,["clientId","redirectUri"]),this.oidcConfiguration=h,this.crossSdkBridgeEnabled=u||!1,this.popupOverlayOptions=d,this.authenticationDomain=n||"https://auth.immutable.com",this.passportDomain=a||"https://passport.immutable.com";}};var Je=(n=>(n.ZKEVM="zkEvm",n))(Je||{}),Pe=c=>!!c.zkEvm,je=(u=>(u.OptedIn="opted_in",u.Unsubscribed="unsubscribed",u.Subscribed="subscribed",u))(je||{}),Ue=(a=>(a.LOGGED_OUT="loggedOut",a.LOGGED_IN="loggedIn",a))(Ue||{});var qe="im_passport_embedded_login_prompt";var re="passport-overlay",le="passport-overlay-contents",ge=`${re}-close`,Ee=`${re}-try-again`,Xe=`
6
6
  <svg
7
7
  viewBox="0 0 20 20"
8
8
  fill="none"
@@ -8,7 +8,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
8
 
9
9
  var he__default = /*#__PURE__*/_interopDefault(he);
10
10
 
11
- var P=(s=>(s.AUTHENTICATION_ERROR="AUTHENTICATION_ERROR",s.INVALID_CONFIGURATION="INVALID_CONFIGURATION",s.WALLET_CONNECTION_ERROR="WALLET_CONNECTION_ERROR",s.NOT_LOGGED_IN_ERROR="NOT_LOGGED_IN_ERROR",s.SILENT_LOGIN_ERROR="SILENT_LOGIN_ERROR",s.REFRESH_TOKEN_ERROR="REFRESH_TOKEN_ERROR",s.USER_REGISTRATION_ERROR="USER_REGISTRATION_ERROR",s.USER_NOT_REGISTERED_ERROR="USER_NOT_REGISTERED_ERROR",s.LOGOUT_ERROR="LOGOUT_ERROR",s.TRANSFER_ERROR="TRANSFER_ERROR",s.CREATE_ORDER_ERROR="CREATE_ORDER_ERROR",s.CANCEL_ORDER_ERROR="CANCEL_ORDER_ERROR",s.EXCHANGE_TRANSFER_ERROR="EXCHANGE_TRANSFER_ERROR",s.CREATE_TRADE_ERROR="CREATE_TRADE_ERROR",s.OPERATION_NOT_SUPPORTED_ERROR="OPERATION_NOT_SUPPORTED_ERROR",s.LINK_WALLET_ALREADY_LINKED_ERROR="LINK_WALLET_ALREADY_LINKED_ERROR",s.LINK_WALLET_MAX_WALLETS_LINKED_ERROR="LINK_WALLET_MAX_WALLETS_LINKED_ERROR",s.LINK_WALLET_VALIDATION_ERROR="LINK_WALLET_VALIDATION_ERROR",s.LINK_WALLET_DUPLICATE_NONCE_ERROR="LINK_WALLET_DUPLICATE_NONCE_ERROR",s.LINK_WALLET_GENERIC_ERROR="LINK_WALLET_GENERIC_ERROR",s.SERVICE_UNAVAILABLE_ERROR="SERVICE_UNAVAILABLE_ERROR",s.TRANSACTION_REJECTED="TRANSACTION_REJECTED",s))(P||{});function b(n){return typeof n=="object"&&n!==null&&"code"in n&&"message"in n}var X=n=>{if(b(n))return n;if(typeof n=="object"&&n!==null&&"response"in n){let{response:e}=n;if(e?.data&&b(e.data))return e.data}},p=class extends Error{type;constructor(e,t){super(e),this.type=t;}},g=async(n,e)=>{try{return await n()}catch(t){let r;if(t instanceof p&&t.type==="SERVICE_UNAVAILABLE_ERROR")throw new p(t.message,t.type);let i=X(t);throw i?r=i.message:r=t.message,new p(r,e)}};var ee=(n,e,t)=>{let r=e.map(i=>!n[i]&&i).filter(i=>i).join(", ");if(r!==""){let i=`${r} cannot be null`;throw new p(i,"INVALID_CONFIGURATION")}},_=class{authenticationDomain;passportDomain;oidcConfiguration;crossSdkBridgeEnabled;popupOverlayOptions;constructor({authenticationDomain:e,passportDomain:t,crossSdkBridgeEnabled:r,popupOverlayOptions:i,...o}){ee(o,["clientId","redirectUri"]),this.oidcConfiguration=o,this.crossSdkBridgeEnabled=r||!1,this.popupOverlayOptions=i,this.authenticationDomain=e||"https://auth.immutable.com",this.passportDomain=t||"https://passport.immutable.com";}};var D=(e=>(e.ZKEVM="zkEvm",e))(D||{}),U=n=>!!n.zkEvm,F=(t=>(t.OptedIn="opted_in",t.Unsubscribed="unsubscribed",t))(F||{}),x=(t=>(t.LOGGED_OUT="loggedOut",t.LOGGED_IN="loggedIn",t))(x||{});var H="im_passport_embedded_login_prompt";var h="passport-overlay",R="passport-overlay-contents",I=`${h}-close`,w=`${h}-try-again`,V=`
11
+ var P=(s=>(s.AUTHENTICATION_ERROR="AUTHENTICATION_ERROR",s.INVALID_CONFIGURATION="INVALID_CONFIGURATION",s.WALLET_CONNECTION_ERROR="WALLET_CONNECTION_ERROR",s.NOT_LOGGED_IN_ERROR="NOT_LOGGED_IN_ERROR",s.SILENT_LOGIN_ERROR="SILENT_LOGIN_ERROR",s.REFRESH_TOKEN_ERROR="REFRESH_TOKEN_ERROR",s.USER_REGISTRATION_ERROR="USER_REGISTRATION_ERROR",s.USER_NOT_REGISTERED_ERROR="USER_NOT_REGISTERED_ERROR",s.LOGOUT_ERROR="LOGOUT_ERROR",s.TRANSFER_ERROR="TRANSFER_ERROR",s.CREATE_ORDER_ERROR="CREATE_ORDER_ERROR",s.CANCEL_ORDER_ERROR="CANCEL_ORDER_ERROR",s.EXCHANGE_TRANSFER_ERROR="EXCHANGE_TRANSFER_ERROR",s.CREATE_TRADE_ERROR="CREATE_TRADE_ERROR",s.OPERATION_NOT_SUPPORTED_ERROR="OPERATION_NOT_SUPPORTED_ERROR",s.LINK_WALLET_ALREADY_LINKED_ERROR="LINK_WALLET_ALREADY_LINKED_ERROR",s.LINK_WALLET_MAX_WALLETS_LINKED_ERROR="LINK_WALLET_MAX_WALLETS_LINKED_ERROR",s.LINK_WALLET_VALIDATION_ERROR="LINK_WALLET_VALIDATION_ERROR",s.LINK_WALLET_DUPLICATE_NONCE_ERROR="LINK_WALLET_DUPLICATE_NONCE_ERROR",s.LINK_WALLET_GENERIC_ERROR="LINK_WALLET_GENERIC_ERROR",s.SERVICE_UNAVAILABLE_ERROR="SERVICE_UNAVAILABLE_ERROR",s.TRANSACTION_REJECTED="TRANSACTION_REJECTED",s))(P||{});function b(n){return typeof n=="object"&&n!==null&&"code"in n&&"message"in n}var X=n=>{if(b(n))return n;if(typeof n=="object"&&n!==null&&"response"in n){let{response:e}=n;if(e?.data&&b(e.data))return e.data}},p=class extends Error{type;constructor(e,t){super(e),this.type=t;}},g=async(n,e)=>{try{return await n()}catch(t){let r;if(t instanceof p&&t.type==="SERVICE_UNAVAILABLE_ERROR")throw new p(t.message,t.type);let i=X(t);throw i?r=i.message:r=t.message,new p(r,e)}};var ee=(n,e,t)=>{let r=e.map(i=>!n[i]&&i).filter(i=>i).join(", ");if(r!==""){let i=`${r} cannot be null`;throw new p(i,"INVALID_CONFIGURATION")}},_=class{authenticationDomain;passportDomain;oidcConfiguration;crossSdkBridgeEnabled;popupOverlayOptions;constructor({authenticationDomain:e,passportDomain:t,crossSdkBridgeEnabled:r,popupOverlayOptions:i,...o}){ee(o,["clientId","redirectUri"]),this.oidcConfiguration=o,this.crossSdkBridgeEnabled=r||!1,this.popupOverlayOptions=i,this.authenticationDomain=e||"https://auth.immutable.com",this.passportDomain=t||"https://passport.immutable.com";}};var D=(e=>(e.ZKEVM="zkEvm",e))(D||{}),U=n=>!!n.zkEvm,F=(r=>(r.OptedIn="opted_in",r.Unsubscribed="unsubscribed",r.Subscribed="subscribed",r))(F||{}),x=(t=>(t.LOGGED_OUT="loggedOut",t.LOGGED_IN="loggedIn",t))(x||{});var H="im_passport_embedded_login_prompt";var h="passport-overlay",R="passport-overlay-contents",I=`${h}-close`,w=`${h}-try-again`,V=`
12
12
  <svg
13
13
  viewBox="0 0 20 20"
14
14
  fill="none"
@@ -2,7 +2,7 @@ import { UserManager, User, ErrorTimeout, ErrorResponse, InMemoryWebStorage, Web
2
2
  import he from 'localforage';
3
3
  import { track, identify, getDetail, Detail, trackFlow, trackError } from '@imtbl/metrics';
4
4
 
5
- var P=(s=>(s.AUTHENTICATION_ERROR="AUTHENTICATION_ERROR",s.INVALID_CONFIGURATION="INVALID_CONFIGURATION",s.WALLET_CONNECTION_ERROR="WALLET_CONNECTION_ERROR",s.NOT_LOGGED_IN_ERROR="NOT_LOGGED_IN_ERROR",s.SILENT_LOGIN_ERROR="SILENT_LOGIN_ERROR",s.REFRESH_TOKEN_ERROR="REFRESH_TOKEN_ERROR",s.USER_REGISTRATION_ERROR="USER_REGISTRATION_ERROR",s.USER_NOT_REGISTERED_ERROR="USER_NOT_REGISTERED_ERROR",s.LOGOUT_ERROR="LOGOUT_ERROR",s.TRANSFER_ERROR="TRANSFER_ERROR",s.CREATE_ORDER_ERROR="CREATE_ORDER_ERROR",s.CANCEL_ORDER_ERROR="CANCEL_ORDER_ERROR",s.EXCHANGE_TRANSFER_ERROR="EXCHANGE_TRANSFER_ERROR",s.CREATE_TRADE_ERROR="CREATE_TRADE_ERROR",s.OPERATION_NOT_SUPPORTED_ERROR="OPERATION_NOT_SUPPORTED_ERROR",s.LINK_WALLET_ALREADY_LINKED_ERROR="LINK_WALLET_ALREADY_LINKED_ERROR",s.LINK_WALLET_MAX_WALLETS_LINKED_ERROR="LINK_WALLET_MAX_WALLETS_LINKED_ERROR",s.LINK_WALLET_VALIDATION_ERROR="LINK_WALLET_VALIDATION_ERROR",s.LINK_WALLET_DUPLICATE_NONCE_ERROR="LINK_WALLET_DUPLICATE_NONCE_ERROR",s.LINK_WALLET_GENERIC_ERROR="LINK_WALLET_GENERIC_ERROR",s.SERVICE_UNAVAILABLE_ERROR="SERVICE_UNAVAILABLE_ERROR",s.TRANSACTION_REJECTED="TRANSACTION_REJECTED",s))(P||{});function b(n){return typeof n=="object"&&n!==null&&"code"in n&&"message"in n}var X=n=>{if(b(n))return n;if(typeof n=="object"&&n!==null&&"response"in n){let{response:e}=n;if(e?.data&&b(e.data))return e.data}},p=class extends Error{type;constructor(e,t){super(e),this.type=t;}},g=async(n,e)=>{try{return await n()}catch(t){let r;if(t instanceof p&&t.type==="SERVICE_UNAVAILABLE_ERROR")throw new p(t.message,t.type);let i=X(t);throw i?r=i.message:r=t.message,new p(r,e)}};var ee=(n,e,t)=>{let r=e.map(i=>!n[i]&&i).filter(i=>i).join(", ");if(r!==""){let i=`${r} cannot be null`;throw new p(i,"INVALID_CONFIGURATION")}},_=class{authenticationDomain;passportDomain;oidcConfiguration;crossSdkBridgeEnabled;popupOverlayOptions;constructor({authenticationDomain:e,passportDomain:t,crossSdkBridgeEnabled:r,popupOverlayOptions:i,...o}){ee(o,["clientId","redirectUri"]),this.oidcConfiguration=o,this.crossSdkBridgeEnabled=r||!1,this.popupOverlayOptions=i,this.authenticationDomain=e||"https://auth.immutable.com",this.passportDomain=t||"https://passport.immutable.com";}};var D=(e=>(e.ZKEVM="zkEvm",e))(D||{}),U=n=>!!n.zkEvm,F=(t=>(t.OptedIn="opted_in",t.Unsubscribed="unsubscribed",t))(F||{}),x=(t=>(t.LOGGED_OUT="loggedOut",t.LOGGED_IN="loggedIn",t))(x||{});var H="im_passport_embedded_login_prompt";var h="passport-overlay",R="passport-overlay-contents",I=`${h}-close`,w=`${h}-try-again`,V=`
5
+ var P=(s=>(s.AUTHENTICATION_ERROR="AUTHENTICATION_ERROR",s.INVALID_CONFIGURATION="INVALID_CONFIGURATION",s.WALLET_CONNECTION_ERROR="WALLET_CONNECTION_ERROR",s.NOT_LOGGED_IN_ERROR="NOT_LOGGED_IN_ERROR",s.SILENT_LOGIN_ERROR="SILENT_LOGIN_ERROR",s.REFRESH_TOKEN_ERROR="REFRESH_TOKEN_ERROR",s.USER_REGISTRATION_ERROR="USER_REGISTRATION_ERROR",s.USER_NOT_REGISTERED_ERROR="USER_NOT_REGISTERED_ERROR",s.LOGOUT_ERROR="LOGOUT_ERROR",s.TRANSFER_ERROR="TRANSFER_ERROR",s.CREATE_ORDER_ERROR="CREATE_ORDER_ERROR",s.CANCEL_ORDER_ERROR="CANCEL_ORDER_ERROR",s.EXCHANGE_TRANSFER_ERROR="EXCHANGE_TRANSFER_ERROR",s.CREATE_TRADE_ERROR="CREATE_TRADE_ERROR",s.OPERATION_NOT_SUPPORTED_ERROR="OPERATION_NOT_SUPPORTED_ERROR",s.LINK_WALLET_ALREADY_LINKED_ERROR="LINK_WALLET_ALREADY_LINKED_ERROR",s.LINK_WALLET_MAX_WALLETS_LINKED_ERROR="LINK_WALLET_MAX_WALLETS_LINKED_ERROR",s.LINK_WALLET_VALIDATION_ERROR="LINK_WALLET_VALIDATION_ERROR",s.LINK_WALLET_DUPLICATE_NONCE_ERROR="LINK_WALLET_DUPLICATE_NONCE_ERROR",s.LINK_WALLET_GENERIC_ERROR="LINK_WALLET_GENERIC_ERROR",s.SERVICE_UNAVAILABLE_ERROR="SERVICE_UNAVAILABLE_ERROR",s.TRANSACTION_REJECTED="TRANSACTION_REJECTED",s))(P||{});function b(n){return typeof n=="object"&&n!==null&&"code"in n&&"message"in n}var X=n=>{if(b(n))return n;if(typeof n=="object"&&n!==null&&"response"in n){let{response:e}=n;if(e?.data&&b(e.data))return e.data}},p=class extends Error{type;constructor(e,t){super(e),this.type=t;}},g=async(n,e)=>{try{return await n()}catch(t){let r;if(t instanceof p&&t.type==="SERVICE_UNAVAILABLE_ERROR")throw new p(t.message,t.type);let i=X(t);throw i?r=i.message:r=t.message,new p(r,e)}};var ee=(n,e,t)=>{let r=e.map(i=>!n[i]&&i).filter(i=>i).join(", ");if(r!==""){let i=`${r} cannot be null`;throw new p(i,"INVALID_CONFIGURATION")}},_=class{authenticationDomain;passportDomain;oidcConfiguration;crossSdkBridgeEnabled;popupOverlayOptions;constructor({authenticationDomain:e,passportDomain:t,crossSdkBridgeEnabled:r,popupOverlayOptions:i,...o}){ee(o,["clientId","redirectUri"]),this.oidcConfiguration=o,this.crossSdkBridgeEnabled=r||!1,this.popupOverlayOptions=i,this.authenticationDomain=e||"https://auth.immutable.com",this.passportDomain=t||"https://passport.immutable.com";}};var D=(e=>(e.ZKEVM="zkEvm",e))(D||{}),U=n=>!!n.zkEvm,F=(r=>(r.OptedIn="opted_in",r.Unsubscribed="unsubscribed",r.Subscribed="subscribed",r))(F||{}),x=(t=>(t.LOGGED_OUT="loggedOut",t.LOGGED_IN="loggedIn",t))(x||{});var H="im_passport_embedded_login_prompt";var h="passport-overlay",R="passport-overlay-contents",I=`${h}-close`,w=`${h}-try-again`,V=`
6
6
  <svg
7
7
  viewBox="0 0 20 20"
8
8
  fill="none"
@@ -93,7 +93,8 @@ export type PKCEData = {
93
93
  };
94
94
  export declare enum MarketingConsentStatus {
95
95
  OptedIn = "opted_in",
96
- Unsubscribed = "unsubscribed"
96
+ Unsubscribed = "unsubscribed",
97
+ Subscribed = "subscribed"
97
98
  }
98
99
  export type DirectLoginOptions = {
99
100
  marketingConsentStatus: MarketingConsentStatus;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imtbl/auth",
3
- "version": "2.12.3-alpha.1",
3
+ "version": "2.12.4-alpha.0",
4
4
  "description": "Authentication SDK for Immutable",
5
5
  "author": "Immutable",
6
6
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
@@ -25,8 +25,8 @@
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "@imtbl/generated-clients": "2.12.3-alpha.1",
29
- "@imtbl/metrics": "2.12.3-alpha.1",
28
+ "@imtbl/generated-clients": "2.12.4-alpha.0",
29
+ "@imtbl/metrics": "2.12.4-alpha.0",
30
30
  "localforage": "^1.10.0",
31
31
  "oidc-client-ts": "3.4.1"
32
32
  },
package/src/types.ts CHANGED
@@ -110,6 +110,7 @@ export type PKCEData = {
110
110
  export enum MarketingConsentStatus {
111
111
  OptedIn = 'opted_in',
112
112
  Unsubscribed = 'unsubscribed',
113
+ Subscribed = 'subscribed',
113
114
  }
114
115
 
115
116
  export type DirectLoginOptions = {