@web3auth/no-modal 8.2.0 → 8.3.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.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see noModal.umd.min.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.NoModal=e():t.NoModal=e()}(self,(()=>(()=>{var t={9363:(t,e,r)=>{"use strict";const{SymbolDispose:n}=r(3670),{AbortError:i,codes:o}=r(5443),{isNodeStream:s,isWebStream:a,kControllerErrorFunction:c}=r(4579),u=r(862),{ERR_INVALID_ARG_TYPE:f}=o;let l;t.exports.addAbortSignal=function(e,r){if(((t,e)=>{if("object"!=typeof t||!("aborted"in t))throw new f("signal","AbortSignal",t)})(e),!s(r)&&!a(r))throw new f("stream",["ReadableStream","WritableStream","Stream"],r);return t.exports.addAbortSignalNoValidate(e,r)},t.exports.addAbortSignalNoValidate=function(t,e){if("object"!=typeof t||!("aborted"in t))return e;const o=s(e)?()=>{e.destroy(new i(void 0,{cause:t.reason}))}:()=>{e[c](new i(void 0,{cause:t.reason}))};if(t.aborted)o();else{l=l||r(3968).addAbortListener;const i=l(t,o);u(e,i[n])}return e}},1753:(t,e,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(3670),{Buffer:a}=r(1048),{inspect:c}=r(3968);t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){const e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}shift(){if(0===this.length)return;const t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(0===this.length)return"";let e=this.head,r=""+e.data;for(;null!==(e=e.next);)r+=t+e.data;return r}concat(t){if(0===this.length)return a.alloc(0);const e=a.allocUnsafe(t>>>0);let r=this.head,n=0;for(;r;)o(e,r.data,n),n+=r.data.length,r=r.next;return e}consume(t,e){const r=this.head.data;if(t<r.length){const e=r.slice(0,t);return this.head.data=r.slice(t),e}return t===r.length?this.shift():e?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[i](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let e="",r=this.head,i=0;do{const o=r.data;if(!(t>o.length)){t===o.length?(e+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(e+=n(o,0,t),this.head=r,r.data=n(o,t));break}e+=o,t-=o.length,++i}while(null!==(r=r.next));return this.length-=i,e}_getBuffer(t){const e=a.allocUnsafe(t),r=t;let n=this.head,i=0;do{const a=n.data;if(!(t>a.length)){t===a.length?(o(e,a,r-t),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(e,new s(a.buffer,a.byteOffset,t),r-t),this.head=n,n.data=a.slice(t));break}o(e,a,r-t),t-=a.length,++i}while(null!==(n=n.next));return this.length-=i,e}[Symbol.for("nodejs.util.inspect.custom")](t,e){return c(this,{...e,depth:0,customInspect:!1})}}},5366:(t,e,r)=>{"use strict";const{pipeline:n}=r(4846),i=r(8842),{destroyer:o}=r(3432),{isNodeStream:s,isReadable:a,isWritable:c,isWebStream:u,isTransformStream:f,isWritableStream:l,isReadableStream:d}=r(4579),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(5443),g=r(862);t.exports=function(...t){if(0===t.length)throw new b("streams");if(1===t.length)return i.from(t[0]);const e=[...t];if("function"==typeof t[0]&&(t[0]=i.from(t[0])),"function"==typeof t[t.length-1]){const e=t.length-1;t[e]=i.from(t[e])}for(let r=0;r<t.length;++r)if(s(t[r])||u(t[r])){if(r<t.length-1&&!(a(t[r])||d(t[r])||f(t[r])))throw new p(`streams[${r}]`,e[r],"must be readable");if(r>0&&!(c(t[r])||l(t[r])||f(t[r])))throw new p(`streams[${r}]`,e[r],"must be writable")}let r,y,m,v,w;const _=t[0],S=n(t,(function(t){const e=v;v=null,e?e(t):t?w.destroy(t):E||A||w.destroy()})),A=!!(c(_)||l(_)||f(_)),E=!!(a(S)||d(S)||f(S));if(w=new i({writableObjectMode:!(null==_||!_.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:A,readable:E}),A){if(s(_))w._write=function(t,e,n){_.write(t,e)?n():r=n},w._final=function(t){_.end(),y=t},_.on("drain",(function(){if(r){const t=r;r=null,t()}}));else if(u(_)){const t=(f(_)?_.writable:_).getWriter();w._write=async function(e,r,n){try{await t.ready,t.write(e).catch((()=>{})),n()}catch(t){n(t)}},w._final=async function(e){try{await t.ready,t.close().catch((()=>{})),y=e}catch(t){e(t)}}}const t=f(S)?S.readable:S;g(t,(()=>{if(y){const t=y;y=null,t()}}))}if(E)if(s(S))S.on("readable",(function(){if(m){const t=m;m=null,t()}})),S.on("end",(function(){w.push(null)})),w._read=function(){for(;;){const t=S.read();if(null===t)return void(m=w._read);if(!w.push(t))return}};else if(u(S)){const t=(f(S)?S.readable:S).getReader();w._read=async function(){for(;;)try{const{value:e,done:r}=await t.read();if(!w.push(e))return;if(r)return void w.push(null)}catch{return}}}return w._destroy=function(t,e){t||null===v||(t=new h),m=null,r=null,y=null,null===v?e(t):(v=e,s(S)&&o(S,t))},w}},3432:(t,e,r)=>{"use strict";const n=r(9907),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(5443),{Symbol:a}=r(3670),{kIsDestroyed:c,isDestroyed:u,isFinished:f,isServerRequest:l}=r(4579),d=a("kDestroy"),h=a("kConstruct");function p(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function b(t,e,r){let i=!1;function o(e){if(i)return;i=!0;const o=t._readableState,s=t._writableState;p(e,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(e),e?n.nextTick(g,t,e):n.nextTick(y,t)}try{t._destroy(e||null,o)}catch(e){o(e)}}function g(t,e){m(t,e),y(t)}function y(t){const e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(null!=r&&r.emitClose||null!=e&&e.emitClose)&&t.emit("close")}function m(t,e){const r=t._readableState,n=t._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function v(t,e,r){const i=t._readableState,o=t._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?t.destroy(e):e&&(e.stack,o&&!o.errored&&(o.errored=e),i&&!i.errored&&(i.errored=e),r?n.nextTick(m,t,e):m(t,e))}function w(t){let e=!1;function r(r){if(e)return void v(t,null!=r?r:new o);e=!0;const i=t._readableState,s=t._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?t.emit(d,r):r?v(t,r,!0):n.nextTick(_,t)}try{t._construct((t=>{n.nextTick(r,t)}))}catch(t){n.nextTick(r,t)}}function _(t){t.emit(h)}function S(t){return(null==t?void 0:t.setHeader)&&"function"==typeof t.abort}function A(t){t.emit("close")}function E(t,e){t.emit("error",e),n.nextTick(A,t)}t.exports={construct:function(t,e){if("function"!=typeof t._construct)return;const r=t._readableState,i=t._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),t.once(h,e),t.listenerCount(h)>1||n.nextTick(w,t)},destroyer:function(t,e){t&&!u(t)&&(e||f(t)||(e=new s),l(t)?(t.socket=null,t.destroy(e)):S(t)?t.abort():S(t.req)?t.req.abort():"function"==typeof t.destroy?t.destroy(e):"function"==typeof t.close?t.close():e?n.nextTick(E,t,e):n.nextTick(A,t),t.destroyed||(t[c]=!0))},destroy:function(t,e){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof e&&e(),this):(p(t,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?b(this,t,e):this.once(d,(function(r){b(this,i(r,t),e)})),this)},undestroy:function(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=!1===t.readable,t.endEmitted=!1===t.readable),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=!1===e.writable,e.ending=!1===e.writable,e.finished=!1===e.writable)},errorOrDestroy:v}},8842:(t,e,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(3670);t.exports=u;const a=r(4664),c=r(5672);s(u.prototype,a.prototype),s(u,a);{const t=o(c.prototype);for(let e=0;e<t.length;e++){const r=t[e];u.prototype[r]||(u.prototype[r]=c.prototype[r])}}function u(t){if(!(this instanceof u))return new u(t);a.call(this,t),c.call(this,t),t?(this.allowHalfOpen=!1!==t.allowHalfOpen,!1===t.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===t.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let f,l;function d(){return void 0===f&&(f={}),f}n(u.prototype,{writable:{__proto__:null,...i(c.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(c.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(c.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(c.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(c.prototype,"writableLength")},writableFinished:{__proto__:null,...i(c.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(c.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(c.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(c.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}}),u.fromWeb=function(t,e){return d().newStreamDuplexFromReadableWritablePair(t,e)},u.toWeb=function(t){return d().newReadableWritablePairFromDuplex(t)},u.from=function(t){return l||(l=r(7426)),l(t,"body")}},7426:(t,e,r)=>{const n=r(9907),i=r(1048),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:c,isReadableNodeStream:u,isWritableNodeStream:f,isDuplexNodeStream:l,isReadableStream:d,isWritableStream:h}=r(4579),p=r(862),{AbortError:b,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:y}}=r(5443),{destroyer:m}=r(3432),v=r(8842),w=r(4664),_=r(5672),{createDeferredPromise:S}=r(3968),A=r(7556),E=globalThis.Blob||i.Blob,M=void 0!==E?function(t){return t instanceof E}:function(t){return!1},x=globalThis.AbortController||r(7083).AbortController,{FunctionPrototypeCall:R}=r(3670);class O extends v{constructor(t){super(t),!1===(null==t?void 0:t.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==t?void 0:t.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(t){const e=t.readable&&"function"!=typeof t.readable.read?w.wrap(t.readable):t.readable,r=t.writable;let n,i,a,c,u,f=!!o(e),l=!!s(r);function d(t){const e=c;c=null,e?e(t):t&&u.destroy(t)}return u=new O({readableObjectMode:!(null==e||!e.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:f,writable:l}),l&&(p(r,(t=>{l=!1,t&&m(e,t),d(t)})),u._write=function(t,e,i){r.write(t,e)?i():n=i},u._final=function(t){r.end(),i=t},r.on("drain",(function(){if(n){const t=n;n=null,t()}})),r.on("finish",(function(){if(i){const t=i;i=null,t()}}))),f&&(p(e,(t=>{f=!1,t&&m(e,t),d(t)})),e.on("readable",(function(){if(a){const t=a;a=null,t()}})),e.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const t=e.read();if(null===t)return void(a=u._read);if(!u.push(t))return}}),u._destroy=function(t,o){t||null===c||(t=new b),a=null,n=null,i=null,null===c?o(t):(c=o,m(r,t),m(e,t))},u}t.exports=function t(e,r){if(l(e))return e;if(u(e))return I({readable:e});if(f(e))return I({writable:e});if(c(e))return I({writable:!1,readable:!1});if(d(e))return I({readable:w.fromWeb(e)});if(h(e))return I({writable:_.fromWeb(e)});if("function"==typeof e){const{value:t,write:i,final:o,destroy:s}=function(t){let{promise:e,resolve:r}=S();const i=new x,o=i.signal;return{value:t(async function*(){for(;;){const t=e;e=null;const{chunk:i,done:s,cb:a}=await t;if(n.nextTick(a),s)return;if(o.aborted)throw new b(void 0,{cause:o.reason});({promise:e,resolve:r}=S()),yield i}}(),{signal:o}),write(t,e,n){const i=r;r=null,i({chunk:t,done:!1,cb:n})},final(t){const e=r;r=null,e({done:!0,cb:t})},destroy(t,e){i.abort(),e(t)}}}(e);if(a(t))return A(O,t,{objectMode:!0,write:i,final:o,destroy:s});const c=null==t?void 0:t.then;if("function"==typeof c){let e;const r=R(c,t,(t=>{if(null!=t)throw new y("nully","body",t)}),(t=>{m(e,t)}));return e=new O({objectMode:!0,readable:!1,write:i,final(t){o((async()=>{try{await r,n.nextTick(t,null)}catch(e){n.nextTick(t,e)}}))},destroy:s})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,t)}if(M(e))return t(e.arrayBuffer());if(a(e))return A(O,e,{objectMode:!0,writable:!1});if(d(null==e?void 0:e.readable)&&h(null==e?void 0:e.writable))return O.fromWeb(e);if("object"==typeof(null==e?void 0:e.writable)||"object"==typeof(null==e?void 0:e.readable))return I({readable:null!=e&&e.readable?u(null==e?void 0:e.readable)?null==e?void 0:e.readable:t(e.readable):void 0,writable:null!=e&&e.writable?f(null==e?void 0:e.writable)?null==e?void 0:e.writable:t(e.writable):void 0});const i=null==e?void 0:e.then;if("function"==typeof i){let t;return R(i,e,(e=>{null!=e&&t.push(e),t.push(null)}),(e=>{m(t,e)})),t=new O({objectMode:!0,writable:!1,read(){}})}throw new g(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)}},862:(t,e,r)=>{const n=r(9907),{AbortError:i,codes:o}=r(5443),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:c,once:u}=r(3968),{validateAbortSignal:f,validateFunction:l,validateObject:d,validateBoolean:h}=r(3045),{Promise:p,PromisePrototypeThen:b,SymbolDispose:g}=r(3670),{isClosed:y,isReadable:m,isReadableNodeStream:v,isReadableStream:w,isReadableFinished:_,isReadableErrored:S,isWritable:A,isWritableNodeStream:E,isWritableStream:M,isWritableFinished:x,isWritableErrored:R,isNodeStream:O,willEmitClose:I,kIsClosedPromise:k}=r(4579);let P;const N=()=>{};function T(t,e,o){var h,p;if(2===arguments.length?(o=e,e=c):null==e?e=c:d(e,"options"),l(o,"callback"),f(e.signal,"options.signal"),o=u(o),w(t)||M(t))return function(t,e,o){let s=!1,a=N;if(e.signal)if(a=()=>{s=!0,o.call(t,new i(void 0,{cause:e.signal.reason}))},e.signal.aborted)n.nextTick(a);else{P=P||r(3968).addAbortListener;const n=P(e.signal,a),i=o;o=u(((...e)=>{n[g](),i.apply(t,e)}))}const c=(...e)=>{s||n.nextTick((()=>o.apply(t,e)))};return b(t[k].promise,c,c),N}(t,e,o);if(!O(t))throw new s("stream",["ReadableStream","WritableStream","Stream"],t);const T=null!==(h=e.readable)&&void 0!==h?h:v(t),B=null!==(p=e.writable)&&void 0!==p?p:E(t),C=t._writableState,j=t._readableState,L=()=>{t.writable||D()};let F=I(t)&&v(t)===T&&E(t)===B,U=x(t,!1);const D=()=>{U=!0,t.destroyed&&(F=!1),(!F||t.readable&&!T)&&(T&&!q||o.call(t))};let q=_(t,!1);const z=()=>{q=!0,t.destroyed&&(F=!1),(!F||t.writable&&!B)&&(B&&!U||o.call(t))},$=e=>{o.call(t,e)};let W=y(t);const H=()=>{W=!0;const e=R(t)||S(t);return e&&"boolean"!=typeof e?o.call(t,e):T&&!q&&v(t,!0)&&!_(t,!1)?o.call(t,new a):!B||U||x(t,!1)?void o.call(t):o.call(t,new a)},V=()=>{W=!0;const e=R(t)||S(t);if(e&&"boolean"!=typeof e)return o.call(t,e);o.call(t)},G=()=>{t.req.on("finish",D)};!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?B&&!C&&(t.on("end",L),t.on("close",L)):(t.on("complete",D),F||t.on("abort",H),t.req?G():t.on("request",G)),F||"boolean"!=typeof t.aborted||t.on("aborted",H),t.on("end",z),t.on("finish",D),!1!==e.error&&t.on("error",$),t.on("close",H),W?n.nextTick(H):null!=C&&C.errorEmitted||null!=j&&j.errorEmitted?F||n.nextTick(V):(T||F&&!m(t)||!U&&!1!==A(t))&&(B||F&&!A(t)||!q&&!1!==m(t))?j&&t.req&&t.aborted&&n.nextTick(V):n.nextTick(V);const K=()=>{o=N,t.removeListener("aborted",H),t.removeListener("complete",D),t.removeListener("abort",H),t.removeListener("request",G),t.req&&t.req.removeListener("finish",D),t.removeListener("end",L),t.removeListener("close",L),t.removeListener("finish",D),t.removeListener("end",z),t.removeListener("error",$),t.removeListener("close",H)};if(e.signal&&!W){const s=()=>{const r=o;K(),r.call(t,new i(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)n.nextTick(s);else{P=P||r(3968).addAbortListener;const n=P(e.signal,s),i=o;o=u(((...e)=>{n[g](),i.apply(t,e)}))}}return K}t.exports=T,t.exports.finished=function(t,e){var r;let n=!1;return null===e&&(e=c),null!==(r=e)&&void 0!==r&&r.cleanup&&(h(e.cleanup,"cleanup"),n=e.cleanup),new p(((r,i)=>{const o=T(t,e,(t=>{n&&o(),t?i(t):r()}))}))}},7556:(t,e,r)=>{"use strict";const n=r(9907),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(3670),{Buffer:a}=r(1048),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:u}=r(5443).codes;t.exports=function(t,e,r){let f,l;if("string"==typeof e||e instanceof a)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null)}});if(e&&e[o])l=!0,f=e[o]();else{if(!e||!e[s])throw new c("iterable",["Iterable"],e);l=!1,f=e[s]()}const d=new t({objectMode:!0,highWaterMark:1,...r});let h=!1;return d._read=function(){h||(h=!0,async function(){for(;;){try{const{value:t,done:e}=l?await f.next():f.next();if(e)d.push(null);else{const e=t&&"function"==typeof t.then?await t:t;if(null===e)throw h=!1,new u;if(d.push(e))continue;h=!1}}catch(t){d.destroy(t)}break}}())},d._destroy=function(t,e){i(async function(t){const e=null!=t,r="function"==typeof f.throw;if(e&&r){const{value:e,done:r}=await f.throw(t);if(await e,r)return}if("function"==typeof f.return){const{value:t}=await f.return();await t}}(t),(()=>n.nextTick(e,t)),(r=>n.nextTick(e,r||t)))},d}},9731:(t,e,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(3670),{EventEmitter:o}=r(46);function s(t){o.call(this,t)}function a(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?n(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(t,e){const r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",i),t._isStdio||e&&!1===e.end||(r.on("end",c),r.on("close",u));let s=!1;function c(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){l(),0===o.listenerCount(this,"error")&&this.emit("error",t)}function l(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",c),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return a(r,"error",f),a(t,"error",f),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t},t.exports={Stream:s,prependListener:a}},1543:(t,e,r)=>{"use strict";const n=globalThis.AbortController||r(7083).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:c}=r(5443),{validateAbortSignal:u,validateInteger:f,validateObject:l}=r(3045),d=r(3670).Symbol("kWeak"),h=r(3670).Symbol("kResistStopPropagation"),{finished:p}=r(862),b=r(5366),{addAbortSignalNoValidate:g}=r(9363),{isWritable:y,isNodeStream:m}=r(4579),{deprecate:v}=r(3968),{ArrayPrototypePush:w,Boolean:_,MathFloor:S,Number:A,NumberIsNaN:E,Promise:M,PromiseReject:x,PromiseResolve:R,PromisePrototypeThen:O,Symbol:I}=r(3670),k=I("kEmpty"),P=I("kEof");function N(t,e){if("function"!=typeof t)throw new o("fn",["Function","AsyncFunction"],t);null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");let n=1;null!=(null==e?void 0:e.concurrency)&&(n=S(e.concurrency));let i=n-1;return null!=(null==e?void 0:e.highWaterMark)&&(i=S(e.highWaterMark)),f(n,"options.concurrency",1),f(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(3968).AbortSignalAny([null==e?void 0:e.signal].filter(_)),s=this,a=[],u={signal:o};let f,l,d=!1,h=0;function p(){d=!0,b()}function b(){h-=1,g()}function g(){l&&!d&&h<n&&a.length<i&&(l(),l=null)}!async function(){try{for await(let e of s){if(d)return;if(o.aborted)throw new c;try{if(e=t(e,u),e===k)continue;e=R(e)}catch(t){e=x(t)}h+=1,O(e,b,p),a.push(e),f&&(f(),f=null),!d&&(a.length>=i||h>=n)&&await new M((t=>{l=t}))}a.push(P)}catch(t){const e=x(t);O(e,b,p),a.push(e)}finally{d=!0,f&&(f(),f=null)}}();try{for(;;){for(;a.length>0;){const t=await a[0];if(t===P)return;if(o.aborted)throw new c;t!==k&&(yield t),a.shift(),g()}await new M((t=>{f=t}))}}finally{d=!0,l&&(l(),l=null)}}.call(this)}async function T(t,e=void 0){for await(const r of B.call(this,t,e))return!0;return!1}function B(t,e){if("function"!=typeof t)throw new o("fn",["Function","AsyncFunction"],t);return N.call(this,(async function(e,r){return await t(e,r)?e:k}),e)}class C extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function j(t){if(t=A(t),E(t))return 0;if(t<0)throw new a("number",">= 0",t);return t}t.exports.streamReturningOperators={asIndexedPairs:v((function(t=void 0){return null!=t&&l(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),async function*(){let e=0;for await(const n of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c({cause:t.signal.reason});yield[e++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(t,e=void 0){return null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),t=j(t),async function*(){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new c;t--<=0&&(yield r)}}.call(this)},filter:B,flatMap:function(t,e){const r=N.call(this,t,e);return async function*(){for await(const t of r)yield*t}.call(this)},map:N,take:function(t,e=void 0){return null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),t=j(t),async function*(){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new c;if(t-- >0&&(yield r),t<=0)return}}.call(this)},compose:function(t,e){if(null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),m(t)&&!y(t))throw new i("stream",t,"must be writable");const r=b(this,t);return null!=e&&e.signal&&g(e.signal,r),r}},t.exports.promiseReturningOperators={every:async function(t,e=void 0){if("function"!=typeof t)throw new o("fn",["Function","AsyncFunction"],t);return!await T.call(this,(async(...e)=>!await t(...e)),e)},forEach:async function(t,e){if("function"!=typeof t)throw new o("fn",["Function","AsyncFunction"],t);for await(const r of N.call(this,(async function(e,r){return await t(e,r),k}),e));},reduce:async function(t,e,r){var i;if("function"!=typeof t)throw new o("reducer",["Function","AsyncFunction"],t);null!=r&&l(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const t=new c(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(t)),t}const a=new n,f=a.signal;if(null!=r&&r.signal){const t={once:!0,[d]:this,[h]:!0};r.signal.addEventListener("abort",(()=>a.abort()),t)}let b=!1;try{for await(const n of this){var g;if(b=!0,null!=r&&null!==(g=r.signal)&&void 0!==g&&g.aborted)throw new c;s?e=await t(e,n,{signal:f}):(e=n,s=!0)}if(!b&&!s)throw new C}finally{a.abort()}return e},toArray:async function(t){null!=t&&l(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");const e=[];for await(const n of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c(void 0,{cause:t.signal.reason});w(e,n)}return e},some:T,find:async function(t,e){for await(const r of B.call(this,t,e))return r}}},7932:(t,e,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(3670);t.exports=o;const i=r(8102);function o(t){if(!(this instanceof o))return new o(t);i.call(this,t)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(t,e,r){r(null,t)}},4846:(t,e,r)=>{const n=r(9907),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s,SymbolDispose:a}=r(3670),c=r(862),{once:u}=r(3968),f=r(3432),l=r(8842),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:b,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:m}=r(5443),{validateFunction:v,validateAbortSignal:w}=r(3045),{isIterable:_,isReadable:S,isReadableNodeStream:A,isNodeStream:E,isTransformStream:M,isWebStream:x,isReadableStream:R,isReadableFinished:O}=r(4579),I=globalThis.AbortController||r(7083).AbortController;let k,P,N;function T(t,e,r){let n=!1;return t.on("close",(()=>{n=!0})),{destroy:e=>{n||(n=!0,f.destroyer(t,e||new g("pipe")))},cleanup:c(t,{readable:e,writable:r},(t=>{n=!t}))}}function B(t){if(_(t))return t;if(A(t))return async function*(t){P||(P=r(4664)),yield*P.prototype[s].call(t)}(t);throw new h("val",["Readable","Iterable","AsyncIterable"],t)}async function C(t,e,r,{end:n}){let i,s=null;const a=t=>{if(t&&(i=t),s){const t=s;s=null,t()}},u=()=>new o(((t,e)=>{i?e(i):s=()=>{i?e(i):t()}}));e.on("drain",a);const f=c(e,{readable:!1},a);try{e.writableNeedDrain&&await u();for await(const r of t)e.write(r)||await u();n&&(e.end(),await u()),r()}catch(t){r(i!==t?d(i,t):t)}finally{f(),e.off("drain",a)}}async function j(t,e,r,{end:n}){M(e)&&(e=e.writable);const i=e.getWriter();try{for await(const e of t)await i.ready,i.write(e).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(t){try{await i.abort(t),r(t)}catch(t){r(t)}}}function L(t,e,o){if(1===t.length&&i(t[0])&&(t=t[0]),t.length<2)throw new b("streams");const s=new I,c=s.signal,u=null==o?void 0:o.signal,f=[];function d(){D(new m)}let g,y,v;w(u,"options.signal"),N=N||r(3968).addAbortListener,u&&(g=N(u,d));const O=[];let P,L=0;function U(t){D(t,0==--L)}function D(t,r){var i;if(!t||y&&"ERR_STREAM_PREMATURE_CLOSE"!==y.code||(y=t),y||r){for(;O.length;)O.shift()(y);null===(i=g)||void 0===i||i[a](),s.abort(),r&&(y||f.forEach((t=>t())),n.nextTick(e,y,v))}}for(let W=0;W<t.length;W++){const H=t[W],V=W<t.length-1,G=W>0,K=V||!1!==(null==o?void 0:o.end),J=W===t.length-1;if(E(H)){if(K){const{destroy:Y,cleanup:Z}=T(H,V,G);O.push(Y),S(H)&&J&&f.push(Z)}function q(t){t&&"AbortError"!==t.name&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code&&U(t)}H.on("error",q),S(H)&&J&&f.push((()=>{H.removeListener("error",q)}))}if(0===W)if("function"==typeof H){if(P=H({signal:c}),!_(P))throw new p("Iterable, AsyncIterable or Stream","source",P)}else P=_(H)||A(H)||M(H)?H:l.from(H);else if("function"==typeof H){var z;if(P=M(P)?B(null===(z=P)||void 0===z?void 0:z.readable):B(P),P=H(P,{signal:c}),V){if(!_(P,!0))throw new p("AsyncIterable",`transform[${W-1}]`,P)}else{var $;k||(k=r(7932));const X=new k({objectMode:!0}),Q=null===($=P)||void 0===$?void 0:$.then;if("function"==typeof Q)L++,Q.call(P,(t=>{v=t,null!=t&&X.write(t),K&&X.end(),n.nextTick(U)}),(t=>{X.destroy(t),n.nextTick(U,t)}));else if(_(P,!0))L++,C(P,X,U,{end:K});else{if(!R(P)&&!M(P))throw new p("AsyncIterable or Promise","destination",P);{const rt=P.readable||P;L++,C(rt,X,U,{end:K})}}P=X;const{destroy:tt,cleanup:et}=T(P,!1,!0);O.push(tt),J&&f.push(et)}}else if(E(H)){if(A(P)){L+=2;const nt=F(P,H,U,{end:K});S(H)&&J&&f.push(nt)}else if(M(P)||R(P)){const it=P.readable||P;L++,C(it,H,U,{end:K})}else{if(!_(P))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],P);L++,C(P,H,U,{end:K})}P=H}else if(x(H)){if(A(P))L++,j(B(P),H,U,{end:K});else if(R(P)||_(P))L++,j(P,H,U,{end:K});else{if(!M(P))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],P);L++,j(P.readable,H,U,{end:K})}P=H}else P=l.from(H)}return(null!=c&&c.aborted||null!=u&&u.aborted)&&n.nextTick(d),P}function F(t,e,r,{end:i}){let o=!1;if(e.on("close",(()=>{o||r(new y)})),t.pipe(e,{end:!1}),i){function s(){o=!0,e.end()}O(t)?n.nextTick(s):t.once("end",s)}else r();return c(t,{readable:!0,writable:!1},(e=>{const n=t._readableState;e&&"ERR_STREAM_PREMATURE_CLOSE"===e.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?t.once("end",r).once("error",r):r(e)})),c(e,{readable:!1,writable:!0},r)}t.exports={pipelineImpl:L,pipeline:function(...t){return L(t,u(function(t){return v(t[t.length-1],"streams[stream.length - 1]"),t.pop()}(t)))}}},4664:(t,e,r)=>{const n=r(9907),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:c,ObjectKeys:u,ObjectSetPrototypeOf:f,Promise:l,SafeSet:d,SymbolAsyncDispose:h,SymbolAsyncIterator:p,Symbol:b}=r(3670);t.exports=J,J.ReadableState=K;const{EventEmitter:g}=r(46),{Stream:y,prependListener:m}=r(9731),{Buffer:v}=r(1048),{addAbortSignal:w}=r(9363),_=r(862);let S=r(3968).debuglog("stream",(t=>{S=t}));const A=r(1753),E=r(3432),{getHighWaterMark:M,getDefaultHighWaterMark:x}=r(107),{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:O,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:k,ERR_STREAM_PUSH_AFTER_EOF:P,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:T}=r(5443),{validateObject:B}=r(3045),C=b("kPaused"),{StringDecoder:j}=r(9301),L=r(7556);f(J.prototype,y.prototype),f(J,y);const F=()=>{},{errorOrDestroy:U}=E,D=1,q=16,z=32,$=64,W=2048,H=4096,V=65536;function G(t){return{enumerable:!1,get(){return!!(this.state&t)},set(e){e?this.state|=t:this.state&=~t}}}function K(t,e,n){"boolean"!=typeof n&&(n=e instanceof r(8842)),this.state=W|H|q|z,t&&t.objectMode&&(this.state|=D),n&&t&&t.readableObjectMode&&(this.state|=D),this.highWaterMark=t?M(this,t,"readableHighWaterMark",n):x(!1),this.buffer=new A,this.length=0,this.pipes=[],this.flowing=null,this[C]=null,t&&!1===t.emitClose&&(this.state&=~W),t&&!1===t.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new j(t.encoding),this.encoding=t.encoding)}function J(t){if(!(this instanceof J))return new J(t);const e=this instanceof r(8842);this._readableState=new K(t,this,e),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!e&&w(t.signal,this)),y.call(this,t),E.construct(this,(()=>{this._readableState.needReadable&&et(this,this._readableState)}))}function Y(t,e,r,n){S("readableAddChunk",e);const i=t._readableState;let o;if(i.state&D||("string"==typeof e?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?e=v.from(e,r).toString(i.encoding):(e=v.from(e,r),r=""))):e instanceof v?r="":y._isUint8Array(e)?(e=y._uint8ArrayToBuffer(e),r=""):null!=e&&(o=new O("chunk",["string","Buffer","Uint8Array"],e))),o)U(t,o);else if(null===e)i.state&=-9,function(t,e){if(S("onEofChunk"),!e.ended){if(e.decoder){const t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,e.sync?Q(t):(e.needReadable=!1,e.emittedReadable=!0,tt(t))}}(t,i);else if(i.state&D||e&&e.length>0)if(n)if(4&i.state)U(t,new N);else{if(i.destroyed||i.errored)return!1;Z(t,i,e,!0)}else if(i.ended)U(t,new P);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(e=i.decoder.write(e),i.objectMode||0!==e.length?Z(t,i,e,!1):et(t,i)):Z(t,i,e,!1)}else n||(i.state&=-9,et(t,i));return!i.ended&&(i.length<i.highWaterMark||0===i.length)}function Z(t,e,r,n){e.flowing&&0===e.length&&!e.sync&&t.listenerCount("data")>0?(e.state&V?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.state&$&&Q(t)),et(t,e)}function X(t,e){return t<=0||0===e.length&&e.ended?0:e.state&D?1:s(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}function Q(t){const e=t._readableState;S("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(S("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(tt,t))}function tt(t){const e=t._readableState;S("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||e.errored||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,st(t)}function et(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,n.nextTick(rt,t,e))}function rt(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){const r=e.length;if(S("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function nt(t){const e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!1===e[C]?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function it(t){S("readable nexttick read 0"),t.read(0)}function ot(t,e){S("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),st(t),e.flowing&&!e.reading&&t.read(0)}function st(t){const e=t._readableState;for(S("flow",e.flowing);e.flowing&&null!==t.read(););}function at(t,e){"function"!=typeof t.read&&(t=J.wrap(t,{objectMode:!0}));const r=async function*(t,e){let r,n=F;function i(e){this===t?(n(),n=F):n=e}t.on("readable",i);const o=_(t,{writable:!1},(t=>{r=t?R(r,t):null,n(),n=F}));try{for(;;){const e=t.destroyed?null:t.read();if(null!==e)yield e;else{if(r)throw r;if(null===r)return;await new l(i)}}}catch(t){throw r=R(r,t),r}finally{!r&&!1===(null==e?void 0:e.destroyOnReturn)||void 0!==r&&!t._readableState.autoDestroy?(t.off("readable",i),o()):E.destroyer(t,null)}}(t,e);return r.stream=t,r}function ct(t,e){if(0===e.length)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ut(t){const e=t._readableState;S("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(ft,e,t))}function ft(t,e){if(S("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&0===t.length)if(t.endEmitted=!0,e.emit("end"),e.writable&&!1===e.allowHalfOpen)n.nextTick(lt,e);else if(t.autoDestroy){const t=e._writableState;(!t||t.autoDestroy&&(t.finished||!1===t.writable))&&e.destroy()}}function lt(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}let dt;function ht(){return void 0===dt&&(dt={}),dt}c(K.prototype,{objectMode:G(D),ended:G(2),endEmitted:G(4),reading:G(8),constructed:G(q),sync:G(z),needReadable:G($),emittedReadable:G(128),readableListening:G(256),resumeScheduled:G(512),errorEmitted:G(1024),emitClose:G(W),autoDestroy:G(H),destroyed:G(8192),closed:G(16384),closeEmitted:G(32768),multiAwaitDrain:G(V),readingMore:G(1<<17),dataEmitted:G(1<<18)}),J.prototype.destroy=E.destroy,J.prototype._undestroy=E.undestroy,J.prototype._destroy=function(t,e){e(t)},J.prototype[g.captureRejectionSymbol]=function(t){this.destroy(t)},J.prototype[h]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new T,this.destroy(t)),new l(((e,r)=>_(this,(n=>n&&n!==t?r(n):e(null)))))},J.prototype.push=function(t,e){return Y(this,t,e,!1)},J.prototype.unshift=function(t,e){return Y(this,t,e,!0)},J.prototype.isPaused=function(){const t=this._readableState;return!0===t[C]||!1===t.flowing},J.prototype.setEncoding=function(t){const e=new j(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const t of r)n+=e.write(t);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},J.prototype.read=function(t){S("read",t),void 0===t?t=NaN:o(t)||(t=a(t,10));const e=this._readableState,r=t;if(t>e.highWaterMark&&(e.highWaterMark=function(t){if(t>1073741824)throw new k("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,++t}(t)),0!==t&&(e.state&=-129),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return S("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?ut(this):Q(this),null;if(0===(t=X(t,e))&&e.ended)return 0===e.length&&ut(this),null;let n,i=!!(e.state&$);if(S("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&(i=!0,S("length less than watermark",i)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)i=!1,S("reading, ended or constructing",i);else if(i){S("do read"),e.state|=8|z,0===e.length&&(e.state|=$);try{this._read(e.highWaterMark)}catch(t){U(this,t)}e.state&=~z,e.reading||(t=X(r,e))}return n=t>0?ct(t,e):null,null===n?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ut(this)),null===n||e.errorEmitted||e.closeEmitted||(e.dataEmitted=!0,this.emit("data",n)),n},J.prototype._read=function(t){throw new I("_read()")},J.prototype.pipe=function(t,e){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new d(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(t),S("pipe count=%d opts=%j",i.pipes.length,e);const o=e&&!1===e.end||t===n.stdout||t===n.stderr?b:s;function s(){S("onend"),t.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),t.on("unpipe",(function e(n,o){S("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,S("cleanup"),t.removeListener("close",h),t.removeListener("finish",p),a&&t.removeListener("drain",a),t.removeListener("error",l),t.removeListener("unpipe",e),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",f),c=!0,a&&i.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&a())}));let c=!1;function u(){c||(1===i.pipes.length&&i.pipes[0]===t?(S("false write response, pause",0),i.awaitDrainWriters=t,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(t)&&(S("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(t)),r.pause()),a||(a=function(t,e){return function(){const r=t._readableState;r.awaitDrainWriters===e?(S("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(S("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(e)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!t.listenerCount("data")||t.resume()}}(r,t),t.on("drain",a))}function f(e){S("ondata");const r=t.write(e);S("dest.write",r),!1===r&&u()}function l(e){if(S("onerror",e),b(),t.removeListener("error",l),0===t.listenerCount("error")){const r=t._writableState||t._readableState;r&&!r.errorEmitted?U(t,e):t.emit("error",e)}}function h(){t.removeListener("finish",p),b()}function p(){S("onfinish"),t.removeListener("close",h),b()}function b(){S("unpipe"),r.unpipe(t)}return r.on("data",f),m(t,"error",l),t.once("close",h),t.once("finish",p),t.emit("pipe",r),!0===t.writableNeedDrain?u():i.flowing||(S("pipe resume"),r.resume()),t},J.prototype.unpipe=function(t){const e=this._readableState;if(0===e.pipes.length)return this;if(!t){const t=e.pipes;e.pipes=[],this.pause();for(let e=0;e<t.length;e++)t[e].emit("unpipe",this,{hasUnpiped:!1});return this}const r=i(e.pipes,t);return-1===r||(e.pipes.splice(r,1),0===e.pipes.length&&this.pause(),t.emit("unpipe",this,{hasUnpiped:!1})),this},J.prototype.on=function(t,e){const r=y.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,S("on readable",i.length,i.reading),i.length?Q(this):i.reading||n.nextTick(it,this))),r},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(t,e){const r=y.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(nt,this),r},J.prototype.off=J.prototype.removeListener,J.prototype.removeAllListeners=function(t){const e=y.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(nt,this),e},J.prototype.resume=function(){const t=this._readableState;return t.flowing||(S("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(ot,t,e))}(this,t)),t[C]=!1,this},J.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[C]=!0,this},J.prototype.wrap=function(t){let e=!1;t.on("data",(r=>{!this.push(r)&&t.pause&&(e=!0,t.pause())})),t.on("end",(()=>{this.push(null)})),t.on("error",(t=>{U(this,t)})),t.on("close",(()=>{this.destroy()})),t.on("destroy",(()=>{this.destroy()})),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};const r=u(t);for(let e=1;e<r.length;e++){const n=r[e];void 0===this[n]&&"function"==typeof t[n]&&(this[n]=t[n].bind(t))}return this},J.prototype[p]=function(){return at(this)},J.prototype.iterator=function(t){return void 0!==t&&B(t,"options"),at(this,t)},c(J.prototype,{readable:{__proto__:null,get(){const t=this._readableState;return!(!t||!1===t.readable||t.destroyed||t.errorEmitted||t.endEmitted)},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),c(K.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[C]},set(t){this[C]=!!t}}}),J._fromList=ct,J.from=function(t,e){return L(J,t,e)},J.fromWeb=function(t,e){return ht().newStreamReadableFromReadableStream(t,e)},J.toWeb=function(t,e){return ht().newReadableStreamFromStreamReadable(t,e)},J.wrap=function(t,e){var r,n;return new J({objectMode:null===(r=null!==(n=t.readableObjectMode)&&void 0!==n?n:t.objectMode)||void 0===r||r,...e,destroy(e,r){E.destroyer(t,e),r(e)}}).wrap(t)}},107:(t,e,r)=>{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(3670),{validateInteger:o}=r(3045),{ERR_INVALID_ARG_VALUE:s}=r(5443).codes;let a=16384,c=16;function u(t){return t?c:a}t.exports={getHighWaterMark:function(t,e,r,o){const a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,o,r);if(null!=a){if(!i(a)||a<0)throw new s(o?`options.${r}`:"options.highWaterMark",a);return n(a)}return u(t.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(t,e){o(e,"value",0),t?c=e:a=e}}},8102:(t,e,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(3670);t.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(5443).codes,s=r(8842),{getHighWaterMark:a}=r(107);n(u.prototype,s.prototype),n(u,s);const c=i("kCallback");function u(t){if(!(this instanceof u))return new u(t);const e=t?a(this,t,"readableHighWaterMark",!0):null;0===e&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),s.call(this,t),this._readableState.sync=!1,this[c]=null,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",l)}function f(t){"function"!=typeof this._flush||this.destroyed?(this.push(null),t&&t()):this._flush(((e,r)=>{e?t?t(e):this.destroy(e):(null!=r&&this.push(r),this.push(null),t&&t())}))}function l(){this._final!==f&&f.call(this)}u.prototype._final=f,u.prototype._transform=function(t,e,r){throw new o("_transform()")},u.prototype._write=function(t,e,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(t,e,((t,e)=>{t?r(t):(null!=e&&this.push(e),i.ended||o===n.length||n.length<n.highWaterMark?r():this[c]=r)}))},u.prototype._read=function(){if(this[c]){const t=this[c];this[c]=null,t()}}},4579:(t,e,r)=>{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(3670),s=o("nodejs.stream.destroyed"),a=o("nodejs.stream.errored"),c=o("nodejs.stream.readable"),u=o("nodejs.stream.writable"),f=o("nodejs.stream.disturbed"),l=o("nodejs.webstream.isClosedPromise"),d=o("nodejs.webstream.controllerErrorFunction");function h(t,e=!1){var r;return!(!t||"function"!=typeof t.pipe||"function"!=typeof t.on||e&&("function"!=typeof t.pause||"function"!=typeof t.resume)||t._writableState&&!1===(null===(r=t._readableState)||void 0===r?void 0:r.readable)||t._writableState&&!t._readableState)}function p(t){var e;return!(!t||"function"!=typeof t.write||"function"!=typeof t.on||t._readableState&&!1===(null===(e=t._writableState)||void 0===e?void 0:e.writable))}function b(t){return t&&(t._readableState||t._writableState||"function"==typeof t.write&&"function"==typeof t.on||"function"==typeof t.pipe&&"function"==typeof t.on)}function g(t){return!(!t||b(t)||"function"!=typeof t.pipeThrough||"function"!=typeof t.getReader||"function"!=typeof t.cancel)}function y(t){return!(!t||b(t)||"function"!=typeof t.getWriter||"function"!=typeof t.abort)}function m(t){return!(!t||b(t)||"object"!=typeof t.readable||"object"!=typeof t.writable)}function v(t){if(!b(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[s]||null!=n&&n.destroyed)}function w(t){if(!p(t))return null;if(!0===t.writableEnded)return!0;const e=t._writableState;return(null==e||!e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)}function _(t,e){if(!h(t))return null;const r=t._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===e&&!0===r.ended&&0===r.length))}function S(t){return t&&null!=t[c]?t[c]:"boolean"!=typeof(null==t?void 0:t.readable)?null:!v(t)&&h(t)&&t.readable&&!_(t)}function A(t){return t&&null!=t[u]?t[u]:"boolean"!=typeof(null==t?void 0:t.writable)?null:!v(t)&&p(t)&&t.writable&&!w(t)}function E(t){return"boolean"==typeof t._closed&&"boolean"==typeof t._defaultKeepAlive&&"boolean"==typeof t._removedConnection&&"boolean"==typeof t._removedContLen}function M(t){return"boolean"==typeof t._sent100&&E(t)}t.exports={isDestroyed:v,kIsDestroyed:s,isDisturbed:function(t){var e;return!(!t||!(null!==(e=t[f])&&void 0!==e?e:t.readableDidRead||t.readableAborted))},kIsDisturbed:f,isErrored:function(t){var e,r,n,i,o,s,c,u,f,l;return!(!t||!(null!==(e=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=t[a])&&void 0!==s?s:t.readableErrored)&&void 0!==o?o:t.writableErrored)&&void 0!==i?i:null===(c=t._readableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==n?n:null===(u=t._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(f=t._readableState)||void 0===f?void 0:f.errored)&&void 0!==e?e:null===(l=t._writableState)||void 0===l?void 0:l.errored))},kIsErrored:a,isReadable:S,kIsReadable:c,kIsClosedPromise:l,kControllerErrorFunction:d,kIsWritable:u,isClosed:function(t){if(!b(t))return null;if("boolean"==typeof t.closed)return t.closed;const e=t._writableState,r=t._readableState;return"boolean"==typeof(null==e?void 0:e.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==e?void 0:e.closed)||(null==r?void 0:r.closed):"boolean"==typeof t._closed&&E(t)?t._closed:null},isDuplexNodeStream:function(t){return!(!t||"function"!=typeof t.pipe||!t._readableState||"function"!=typeof t.on||"function"!=typeof t.write)},isFinished:function(t,e){return b(t)?!(!v(t)&&(!1!==(null==e?void 0:e.readable)&&S(t)||!1!==(null==e?void 0:e.writable)&&A(t))):null},isIterable:function(t,e){return null!=t&&(!0===e?"function"==typeof t[n]:!1===e?"function"==typeof t[i]:"function"==typeof t[n]||"function"==typeof t[i])},isReadableNodeStream:h,isReadableStream:g,isReadableEnded:function(t){if(!h(t))return null;if(!0===t.readableEnded)return!0;const e=t._readableState;return!(!e||e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)},isReadableFinished:_,isReadableErrored:function(t){var e,r;return b(t)?t.readableErrored?t.readableErrored:null!==(e=null===(r=t._readableState)||void 0===r?void 0:r.errored)&&void 0!==e?e:null:null},isNodeStream:b,isWebStream:function(t){return g(t)||y(t)||m(t)},isWritable:A,isWritableNodeStream:p,isWritableStream:y,isWritableEnded:w,isWritableFinished:function(t,e){if(!p(t))return null;if(!0===t.writableFinished)return!0;const r=t._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===e&&!0===r.ended&&0===r.length))},isWritableErrored:function(t){var e,r;return b(t)?t.writableErrored?t.writableErrored:null!==(e=null===(r=t._writableState)||void 0===r?void 0:r.errored)&&void 0!==e?e:null:null},isServerRequest:function(t){var e;return"boolean"==typeof t._consuming&&"boolean"==typeof t._dumped&&void 0===(null===(e=t.req)||void 0===e?void 0:e.upgradeOrConnect)},isServerResponse:M,willEmitClose:function(t){if(!b(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!n&&M(t)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:m}},5672:(t,e,r)=>{const n=r(9907),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:c,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:f,Symbol:l,SymbolHasInstance:d}=r(3670);t.exports=B,B.WritableState=N;const{EventEmitter:h}=r(46),p=r(9731).Stream,{Buffer:b}=r(1048),g=r(3432),{addAbortSignal:y}=r(9363),{getHighWaterMark:m,getDefaultHighWaterMark:v}=r(107),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:A,ERR_STREAM_DESTROYED:E,ERR_STREAM_ALREADY_FINISHED:M,ERR_STREAM_NULL_VALUES:x,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:O}=r(5443).codes,{errorOrDestroy:I}=g;function k(){}u(B.prototype,p.prototype),u(B,p);const P=l("kOnFinished");function N(t,e,n){"boolean"!=typeof n&&(n=e instanceof r(8842)),this.objectMode=!(!t||!t.objectMode),n&&(this.objectMode=this.objectMode||!(!t||!t.writableObjectMode)),this.highWaterMark=t?m(this,t,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!t||!1!==t.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=F.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,T(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[P]=[]}function T(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}function B(t){const e=this instanceof r(8842);if(!e&&!s(B,this))return new B(t);this._writableState=new N(t,this,e),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&y(t.signal,this)),p.call(this,t),g.construct(this,(()=>{const t=this._writableState;t.writing||z(this,t),W(this,t)}))}function C(t,e,r,i){const o=t._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new O(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=k)}if(null===e)throw new x;if(!o.objectMode)if("string"==typeof e)!1!==o.decodeStrings&&(e=b.from(e,r),r="buffer");else if(e instanceof b)r="buffer";else{if(!p._isUint8Array(e))throw new w("chunk",["string","Buffer","Uint8Array"],e);e=p._uint8ArrayToBuffer(e),r="buffer"}let s;return o.ending?s=new R:o.destroyed&&(s=new E("write")),s?(n.nextTick(i,s),I(t,s,!0),s):(o.pendingcb++,function(t,e,r,n,i){const o=e.objectMode?1:r.length;e.length+=o;const s=e.length<e.highWaterMark;return s||(e.needDrain=!0),e.writing||e.corked||e.errored||!e.constructed?(e.buffered.push({chunk:r,encoding:n,callback:i}),e.allBuffers&&"buffer"!==n&&(e.allBuffers=!1),e.allNoop&&i!==k&&(e.allNoop=!1)):(e.writelen=o,e.writecb=i,e.writing=!0,e.sync=!0,t._write(r,n,e.onwrite),e.sync=!1),s&&!e.errored&&!e.destroyed}(t,o,e,r,i))}function j(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new E("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function L(t,e,r,n){--e.pendingcb,n(r),q(e),I(t,r)}function F(t,e){const r=t._writableState,i=r.sync,o=r.writecb;"function"==typeof o?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,e?(e.stack,r.errored||(r.errored=e),t._readableState&&!t._readableState.errored&&(t._readableState.errored=e),i?n.nextTick(L,t,r,e,o):L(t,r,e,o)):(r.buffered.length>r.bufferedIndex&&z(t,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:t,state:r},n.nextTick(U,r.afterWriteTickInfo)):D(t,r,1,o))):I(t,new S)}function U({stream:t,state:e,count:r,cb:n}){return e.afterWriteTickInfo=null,D(t,e,r,n)}function D(t,e,r,n){for(!e.ending&&!t.destroyed&&0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));r-- >0;)e.pendingcb--,n();e.destroyed&&q(e),W(t,e)}function q(t){if(t.writing)return;for(let r=t.bufferedIndex;r<t.buffered.length;++r){var e;const{chunk:n,callback:i}=t.buffered[r],o=t.objectMode?1:n.length;t.length-=o,i(null!==(e=t.errored)&&void 0!==e?e:new E("write"))}const r=t[P].splice(0);for(let e=0;e<r.length;e++){var n;r[e](null!==(n=t.errored)&&void 0!==n?n:new E("end"))}T(t)}function z(t,e){if(e.corked||e.bufferProcessing||e.destroyed||!e.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:o}=e,s=r.length-n;if(!s)return;let a=n;if(e.bufferProcessing=!0,s>1&&t._writev){e.pendingcb-=s-1;const n=e.allNoop?k:t=>{for(let e=a;e<r.length;++e)r[e].callback(t)},o=e.allNoop&&0===a?r:i(r,a);o.allBuffers=e.allBuffers,j(t,e,!0,e.length,o,"",n),T(e)}else{do{const{chunk:n,encoding:i,callback:s}=r[a];r[a++]=null,j(t,e,!1,o?1:n.length,n,i,s)}while(a<r.length&&!e.writing);a===r.length?T(e):a>256?(r.splice(0,a),e.bufferedIndex=0):e.bufferedIndex=a}e.bufferProcessing=!1}function $(t){return t.ending&&!t.destroyed&&t.constructed&&0===t.length&&!t.errored&&0===t.buffered.length&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function W(t,e,r){$(e)&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.finalCalled=!0,function(t,e){let r=!1;function i(i){if(r)I(t,null!=i?i:S());else if(r=!0,e.pendingcb--,i){const r=e[P].splice(0);for(let t=0;t<r.length;t++)r[t](i);I(t,i,e.sync)}else $(e)&&(e.prefinished=!0,t.emit("prefinish"),e.pendingcb++,n.nextTick(H,t,e))}e.sync=!0,e.pendingcb++;try{t._final(i)}catch(t){i(t)}e.sync=!1}(t,e)))}(t,e),0===e.pendingcb&&(r?(e.pendingcb++,n.nextTick(((t,e)=>{$(e)?H(t,e):e.pendingcb--}),t,e)):$(e)&&(e.pendingcb++,H(t,e))))}function H(t,e){e.pendingcb--,e.finished=!0;const r=e[P].splice(0);for(let t=0;t<r.length;t++)r[t]();if(t.emit("finish"),e.autoDestroy){const e=t._readableState;(!e||e.autoDestroy&&(e.endEmitted||!1===e.readable))&&t.destroy()}}N.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},a(N.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),a(B,d,{__proto__:null,value:function(t){return!!s(this,t)||this===B&&t&&t._writableState instanceof N}}),B.prototype.pipe=function(){I(this,new A)},B.prototype.write=function(t,e,r){return!0===C(this,t,e,r)},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){const t=this._writableState;t.corked&&(t.corked--,t.writing||z(this,t))},B.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=f(t)),!b.isEncoding(t))throw new O(t);return this._writableState.defaultEncoding=t,this},B.prototype._write=function(t,e,r){if(!this._writev)throw new _("_write()");this._writev([{chunk:t,encoding:e}],r)},B.prototype._writev=null,B.prototype.end=function(t,e,r){const i=this._writableState;let s;if("function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t){const r=C(this,t,e);r instanceof o&&(s=r)}return i.corked&&(i.corked=1,this.uncork()),s||(i.errored||i.ending?i.finished?s=new M("end"):i.destroyed&&(s=new E("end")):(i.ending=!0,W(this,i,!0),i.ended=!0)),"function"==typeof r&&(s||i.finished?n.nextTick(r,s):i[P].push(r)),this},c(B.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){const t=this._writableState;return!(!t||!1===t.writable||t.destroyed||t.errored||t.ending||t.ended)},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const t=this._writableState;return!!t&&!t.destroyed&&!t.ending&&t.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const V=g.destroy;let G;function K(){return void 0===G&&(G={}),G}B.prototype.destroy=function(t,e){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[P].length)&&n.nextTick(q,r),V.call(this,t,e),this},B.prototype._undestroy=g.undestroy,B.prototype._destroy=function(t,e){e(t)},B.prototype[h.captureRejectionSymbol]=function(t){this.destroy(t)},B.fromWeb=function(t,e){return K().newStreamWritableFromWritableStream(t,e)},B.toWeb=function(t){return K().newWritableStreamFromStreamWritable(t)}},3045:(t,e,r)=>{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:f,NumberParseInt:l,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:g}=r(3670),{hideStackFrames:y,codes:{ERR_SOCKET_BAD_PORT:m,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:S}}=r(5443),{normalizeEncoding:A}=r(3968),{isAsyncFunction:E,isArrayBufferView:M}=r(3968).types,x={},R=/^[0-7]+$/,O=y(((t,e,r=f,n=u)=>{if("number"!=typeof t)throw new v(e,"number",t);if(!a(t))throw new _(e,"an integer",t);if(t<r||t>n)throw new _(e,`>= ${r} && <= ${n}`,t)})),I=y(((t,e,r=-2147483648,n=2147483647)=>{if("number"!=typeof t)throw new v(e,"number",t);if(!a(t))throw new _(e,"an integer",t);if(t<r||t>n)throw new _(e,`>= ${r} && <= ${n}`,t)})),k=y(((t,e,r=!1)=>{if("number"!=typeof t)throw new v(e,"number",t);if(!a(t))throw new _(e,"an integer",t);const n=r?1:0,i=4294967295;if(t<n||t>i)throw new _(e,`>= ${n} && <= ${i}`,t)}));function P(t,e){if("string"!=typeof t)throw new v(e,"string",t)}const N=y(((t,e,r)=>{if(!i(r,t)){const n=o(s(r,(t=>"string"==typeof t?`'${t}'`:p(t))),", ");throw new w(e,t,"must be one of: "+n)}}));function T(t,e){if("boolean"!=typeof t)throw new v(e,"boolean",t)}function B(t,e,r){return null!=t&&d(t,e)?t[e]:r}const C=y(((t,e,r=null)=>{const i=B(r,"allowArray",!1),o=B(r,"allowFunction",!1);if(!B(r,"nullable",!1)&&null===t||!i&&n(t)||"object"!=typeof t&&(!o||"function"!=typeof t))throw new v(e,"Object",t)})),j=y(((t,e)=>{if(null!=t&&"object"!=typeof t&&"function"!=typeof t)throw new v(e,"a dictionary",t)})),L=y(((t,e,r=0)=>{if(!n(t))throw new v(e,"Array",t);if(t.length<r)throw new w(e,t,`must be longer than ${r}`)})),F=y(((t,e="buffer")=>{if(!M(t))throw new v(e,["Buffer","TypedArray","DataView"],t)})),U=y(((t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new v(e,"AbortSignal",t)})),D=y(((t,e)=>{if("function"!=typeof t)throw new v(e,"Function",t)})),q=y(((t,e)=>{if("function"!=typeof t||E(t))throw new v(e,"Function",t)})),z=y(((t,e)=>{if(void 0!==t)throw new v(e,"undefined",t)})),$=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function W(t,e){if(void 0===t||!h($,t))throw new w(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32:function(t){return t===(0|t)},isUint32:function(t){return t===t>>>0},parseFileMode:function(t,e,r){if(void 0===t&&(t=r),"string"==typeof t){if(null===h(R,t))throw new w(e,t,"must be a 32-bit unsigned integer or an octal string");t=l(t,8)}return k(t,e),t},validateArray:L,validateStringArray:function(t,e){L(t,e);for(let r=0;r<t.length;r++)P(t[r],`${e}[${r}]`)},validateBooleanArray:function(t,e){L(t,e);for(let r=0;r<t.length;r++)T(t[r],`${e}[${r}]`)},validateAbortSignalArray:function(t,e){L(t,e);for(let r=0;r<t.length;r++){const n=t[r],i=`${e}[${r}]`;if(null==n)throw new v(i,"AbortSignal",n);U(n,i)}},validateBoolean:T,validateBuffer:F,validateDictionary:j,validateEncoding:function(t,e){const r=A(e),n=t.length;if("hex"===r&&n%2!=0)throw new w("encoding",e,`is invalid for data of length ${n}`)},validateFunction:D,validateInt32:I,validateInteger:O,validateNumber:function(t,e,r=void 0,n){if("number"!=typeof t)throw new v(e,"number",t);if(null!=r&&t<r||null!=n&&t>n||(null!=r||null!=n)&&c(t))throw new _(e,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,t)},validateObject:C,validateOneOf:N,validatePlainFunction:q,validatePort:function(t,e="Port",r=!0){if("number"!=typeof t&&"string"!=typeof t||"string"==typeof t&&0===g(t).length||+t!=+t>>>0||t>65535||0===t&&!r)throw new m(e,t,r);return 0|t},validateSignalName:function(t,e="signal"){if(P(t,e),void 0===x[t]){if(void 0!==x[b(t)])throw new S(t+" (signals must use all capital letters)");throw new S(t)}},validateString:P,validateUint32:k,validateUndefined:z,validateUnion:function(t,e,r){if(!i(r,t))throw new v(e,`('${o(r,"|")}')`,t)},validateAbortSignal:U,validateLinkHeaderValue:function(t){if("string"==typeof t)return W(t,"hints"),t;if(n(t)){const e=t.length;let r="";if(0===e)return r;for(let n=0;n<e;n++){const i=t[n];W(i,"hints"),r+=i,n!==e-1&&(r+=", ")}return r}throw new w("hints",t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},446:(t,e,r)=>{"use strict";const n=r(8690),i=r(359),o=n.Readable.destroy;t.exports=n.Readable,t.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,t.exports._isUint8Array=n._isUint8Array,t.exports.isDisturbed=n.isDisturbed,t.exports.isErrored=n.isErrored,t.exports.isReadable=n.isReadable,t.exports.Readable=n.Readable,t.exports.Writable=n.Writable,t.exports.Duplex=n.Duplex,t.exports.Transform=n.Transform,t.exports.PassThrough=n.PassThrough,t.exports.addAbortSignal=n.addAbortSignal,t.exports.finished=n.finished,t.exports.destroy=n.destroy,t.exports.destroy=o,t.exports.pipeline=n.pipeline,t.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),t.exports.Stream=n.Stream,t.exports.default=t.exports},5443:(t,e,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(3968),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,f={};function l(t,e){if(!t)throw new f.ERR_INTERNAL_ASSERTION(e)}function d(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function h(t,e,r){r||(r=Error);class i extends r{constructor(...r){super(function(t,e,r){if("function"==typeof e)return l(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);const i=(e.match(/%[dfijoOs]/g)||[]).length;return l(i===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?e:n(e,...r)}(t,e,r))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=t,i.prototype[a]=!0,f[t]=i}function p(t){const e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t}class b extends Error{constructor(t="The operation was aborted",e=void 0){if(void 0!==e&&"object"!=typeof e)throw new f.ERR_INVALID_ARG_TYPE("options","Object",e);super(t,e),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",((t,e,r)=>{l("string"==typeof t,"'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const t of e)l("string"==typeof t,"All expected entries have to be of type string"),c.includes(t)?o.push(t.toLowerCase()):u.test(t)?s.push(t):(l("object"!==t,'The value "object" should be written as "Object"'),a.push(t));if(s.length>0){const t=o.indexOf("object");-1!==t&&(o.splice(o,t,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const t=o.pop();n+=`one of type ${o.join(", ")}, or ${t}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const t=s.pop();n+=`an instance of ${s.join(", ")}, or ${t}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const t=a.pop();n+=`one of ${a.join(", ")}, or ${t}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var f;null!==(f=r.constructor)&&void 0!==f&&f.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let t=i(r,{colors:!1});t.length>25&&(t=`${t.slice(0,25)}...`),n+=`. Received type ${typeof r} (${t})`}return n}),TypeError),h("ERR_INVALID_ARG_VALUE",((t,e,r="is invalid")=>{let n=i(e);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${n}`}),TypeError),h("ERR_INVALID_RETURN_VALUE",((t,e,r)=>{var n;return`Expected ${t} to be returned from the "${e}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),h("ERR_MISSING_ARGS",((...t)=>{let e;l(t.length>0,"At least one arg needs to be specified");const r=t.length;switch(t=(Array.isArray(t)?t:[t]).map((t=>`"${t}"`)).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const r=t.pop();e+=`The ${t.join(", ")}, and ${r} arguments`}}return`${e} must be specified`}),TypeError),h("ERR_OUT_OF_RANGE",((t,e,r)=>{let n;return l(e,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=d(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=d(n)),n+="n"):n=i(r),`The value of "${t}" is out of range. It must be ${e}. Received ${n}`}),RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exports={AbortError:b,aggregateTwoErrors:p((function(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const r=new s([e,t],e.message);return r.code=e.code,r}return t||e})),hideStackFrames:p,codes:f}},3670:t=>{"use strict";t.exports={ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,e)=>t.includes(e),ArrayPrototypeIndexOf:(t,e)=>t.indexOf(e),ArrayPrototypeJoin:(t,e)=>t.join(e),ArrayPrototypeMap:(t,e)=>t.map(e),ArrayPrototypePop:(t,e)=>t.pop(e),ArrayPrototypePush:(t,e)=>t.push(e),ArrayPrototypeSlice:(t,e,r)=>t.slice(e,r),Error,FunctionPrototypeCall:(t,e,...r)=>t.call(e,...r),FunctionPrototypeSymbolHasInstance:(t,e)=>Function.prototype[Symbol.hasInstance].call(t,e),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,e)=>Object.defineProperties(t,e),ObjectDefineProperty:(t,e,r)=>Object.defineProperty(t,e,r),ObjectGetOwnPropertyDescriptor:(t,e)=>Object.getOwnPropertyDescriptor(t,e),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,e)=>Object.setPrototypeOf(t,e),Promise,PromisePrototypeCatch:(t,e)=>t.catch(e),PromisePrototypeThen:(t,e,r)=>t.then(e,r),PromiseReject:t=>Promise.reject(t),PromiseResolve:t=>Promise.resolve(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,e)=>t.test(e),SafeSet:Set,String,StringPrototypeSlice:(t,e,r)=>t.slice(e,r),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(t,e,r)=>t.set(e,r),Boolean,Uint8Array}},3968:(t,e,r)=>{"use strict";const n=r(1048),{kResistStopPropagation:i,SymbolDispose:o}=r(3670),s=globalThis.AbortSignal||r(7083).AbortSignal,a=globalThis.AbortController||r(7083).AbortController,c=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,f=void 0!==u?function(t){return t instanceof u}:function(t){return!1},l=(t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new ERR_INVALID_ARG_TYPE(e,"AbortSignal",t)};class d extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError("Expected input to be an Array, got "+typeof t);let e="";for(let r=0;r<t.length;r++)e+=` ${t[r].stack}\n`;super(e),this.name="AggregateError",this.errors=t}}t.exports={AggregateError:d,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise(((r,n)=>{t=r,e=n})),resolve:t,reject:e}},promisify:t=>new Promise(((e,r)=>{t(((t,...n)=>t?r(t):e(...n)))})),debuglog:()=>function(){},format:(t,...e)=>t.replace(/%([sdifj])/g,(function(...[t,r]){const n=e.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(t){switch(typeof t){case"string":if(t.includes("'")){if(!t.includes('"'))return`"${t}"`;if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}},types:{isAsyncFunction:t=>t instanceof c,isArrayBufferView:t=>ArrayBuffer.isView(t)},isBlob:f,deprecate:(t,e)=>t,addAbortListener:r(46).addAbortListener||function(t,e){if(void 0===t)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",t);let r;return l(t,"signal"),((t,e)=>{if("function"!=typeof t)throw new ERR_INVALID_ARG_TYPE("listener","Function",t)})(e),t.aborted?queueMicrotask((()=>e())):(t.addEventListener("abort",e,{__proto__:null,once:!0,[i]:!0}),r=()=>{t.removeEventListener("abort",e)}),{__proto__:null,[o](){var t;null===(t=r)||void 0===t||t()}}},AbortSignalAny:s.any||function(t){if(1===t.length)return t[0];const e=new a,r=()=>e.abort();return t.forEach((t=>{l(t,"signals"),t.addEventListener("abort",r,{once:!0})})),e.signal.addEventListener("abort",(()=>{t.forEach((t=>t.removeEventListener("abort",r)))}),{once:!0}),e.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},8690:(t,e,r)=>{const{Buffer:n}=r(1048),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(3670),{promisify:{custom:a}}=r(3968),{streamReturningOperators:c,promiseReturningOperators:u}=r(1543),{codes:{ERR_ILLEGAL_CONSTRUCTOR:f}}=r(5443),l=r(5366),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(107),{pipeline:p}=r(4846),{destroyer:b}=r(3432),g=r(862),y=r(359),m=r(4579),v=t.exports=r(9731).Stream;v.isDestroyed=m.isDestroyed,v.isDisturbed=m.isDisturbed,v.isErrored=m.isErrored,v.isReadable=m.isReadable,v.isWritable=m.isWritable,v.Readable=r(4664);for(const S of o(c)){const A=c[S];function w(...t){if(new.target)throw f();return v.Readable.from(s(A,this,t))}i(w,"name",{__proto__:null,value:A.name}),i(w,"length",{__proto__:null,value:A.length}),i(v.Readable.prototype,S,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(const E of o(u)){const M=u[E];function w(...t){if(new.target)throw f();return s(M,this,t)}i(w,"name",{__proto__:null,value:M.name}),i(w,"length",{__proto__:null,value:M.length}),i(v.Readable.prototype,E,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}v.Writable=r(5672),v.Duplex=r(8842),v.Transform=r(8102),v.PassThrough=r(7932),v.pipeline=p;const{addAbortSignal:_}=r(9363);v.addAbortSignal=_,v.finished=g,v.destroy=b,v.compose=l,v.setDefaultHighWaterMark=d,v.getDefaultHighWaterMark=h,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(p,a,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(g,a,{__proto__:null,enumerable:!0,get:()=>y.finished}),v.Stream=v,v._isUint8Array=function(t){return t instanceof Uint8Array},v._uint8ArrayToBuffer=function(t){return n.from(t.buffer,t.byteOffset,t.byteLength)}},359:(t,e,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(3670),{isIterable:o,isNodeStream:s,isWebStream:a}=r(4579),{pipelineImpl:c}=r(4846),{finished:u}=r(862);r(8690),t.exports={finished:u,pipeline:function(...t){return new i(((e,r)=>{let i,u;const f=t[t.length-1];if(f&&"object"==typeof f&&!s(f)&&!o(f)&&!a(f)){const e=n(t);i=e.signal,u=e.end}c(t,((t,n)=>{t?r(t):e(n)}),{signal:i,end:u})}))}}},9301:(t,e,r)=>{"use strict";var n=r(5636).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=u,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function h(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},7083:t=>{"use strict";const{AbortController:e,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;t.exports=e,t.exports.AbortSignal=r,t.exports.default=e},7991:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],c=o[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,c)),f=0,l=c>0?s-4:s;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;return 2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[f++]=255&e),1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(t,a,a+s>u?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},527:(t,e,r)=>{"use strict";var n=r(1048).Buffer,i=r(3330);function o(t,e){return void 0===e&&(e="utf8"),n.isBuffer(t)?a(t.toString("base64")):a(n.from(t,e).toString("base64"))}function s(t){return t=t.toString(),i.default(t).replace(/\-/g,"+").replace(/_/g,"/")}function a(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var c=o;c.encode=o,c.decode=function(t,e){return void 0===e&&(e="utf8"),n.from(s(t),"base64").toString(e)},c.toBase64=s,c.fromBase64=a,c.toBuffer=function(t){return n.from(s(t),"base64")},e.default=c},3330:(t,e,r)=>{"use strict";var n=r(1048).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.length,r=e%4;if(!r)return t;var i=e,o=4-r,s=e+o,a=n.alloc(s);for(a.write(t);o--;)a.write("=",i++);return a.toString()}},7702:(t,e,r)=>{t.exports=r(527).default,t.exports.default=t.exports},2823:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8379).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function c(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function u(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),c=e;c<a;c++){var u=t.charCodeAt(c)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),o+=s}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=c(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=c(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,f=r;f<a;f+=n)c=u(t,f,f+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var l=1;for(c=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){f(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(t){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function b(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var u=1;u<n;u++){for(var f=c>>>26,l=67108863&c,d=Math.min(u,e.length-1),h=Math.max(0,u-t.length+1);h<=d;h++){var p=u-h|0;f+=(s=(i=0|t.words[p])*(o=0|e.words[h])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=h[t],f=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var b=l.modrn(f).toString(t);r=(l=l.idivn(f)).isZero()?b+r:d[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(!(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(!(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(!(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,o,s=t.words,a=e.words,c=r.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,h=0|s[1],p=8191&h,b=h>>>13,g=0|s[2],y=8191&g,m=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],A=8191&S,E=S>>>13,M=0|s[5],x=8191&M,R=M>>>13,O=0|s[6],I=8191&O,k=O>>>13,P=0|s[7],N=8191&P,T=P>>>13,B=0|s[8],C=8191&B,j=B>>>13,L=0|s[9],F=8191&L,U=L>>>13,D=0|a[0],q=8191&D,z=D>>>13,$=0|a[1],W=8191&$,H=$>>>13,V=0|a[2],G=8191&V,K=V>>>13,J=0|a[3],Y=8191&J,Z=J>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ct=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,dt=ft>>>13,ht=0|a[9],pt=8191&ht,bt=ht>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(n=Math.imul(l,q))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(b,q)|0,o=Math.imul(b,z);var yt=(u+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,H)|0)+Math.imul(d,W)|0))<<13)|0;u=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,z))+Math.imul(m,q)|0,o=Math.imul(m,z),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,H)|0;var mt=(u+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(d,G)|0))<<13)|0;u=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(_,q)|0,o=Math.imul(_,z),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0;var vt=(u+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(d,Y)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,z))+Math.imul(E,q)|0,o=Math.imul(E,z),n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0;var wt=(u+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(R,q)|0,o=Math.imul(R,z),n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,H)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var _t=(u+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(d,rt)|0))<<13)|0;u=((o=o+Math.imul(d,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(k,q)|0,o=Math.imul(k,z),n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var St=(u+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,z))+Math.imul(T,q)|0,o=Math.imul(T,z),n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0;var At=(u+(n=n+Math.imul(l,ct)|0)|0)+((8191&(i=(i=i+Math.imul(l,ut)|0)+Math.imul(d,ct)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(j,q)|0,o=Math.imul(j,z),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,n=n+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(b,ct)|0,o=o+Math.imul(b,ut)|0;var Et=(u+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,z))+Math.imul(U,q)|0,o=Math.imul(U,z),n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,H)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(y,ct)|0,i=(i=i+Math.imul(y,ut)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ut)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var Mt=(u+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,bt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,bt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,W),i=(i=Math.imul(F,H))+Math.imul(U,W)|0,o=Math.imul(U,H),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(w,ct)|0,i=(i=i+Math.imul(w,ut)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var xt=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,K))+Math.imul(U,G)|0,o=Math.imul(U,K),n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(A,ct)|0,i=(i=i+Math.imul(A,ut)|0)+Math.imul(E,ct)|0,o=o+Math.imul(E,ut)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0;var Rt=(u+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,bt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ct)|0,i=(i=i+Math.imul(x,ut)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,ut)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var Ot=(u+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(U,Q)|0,o=Math.imul(U,tt),n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,ut)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,ut)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var It=(u+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,bt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(N,ct)|0,i=(i=i+Math.imul(N,ut)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,ut)|0,n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var kt=(u+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(C,ct)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ut)|0,n=n+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Pt=(u+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,bt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((o=o+Math.imul(k,bt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(F,ct),i=(i=Math.imul(F,ut))+Math.imul(U,ct)|0,o=Math.imul(U,ut),n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var Nt=(u+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,bt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,bt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(F,lt),i=(i=Math.imul(F,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Tt=(u+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,bt)|0)+Math.imul(j,pt)|0))<<13)|0;u=((o=o+Math.imul(j,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Bt=(u+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,bt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,bt))+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,c[0]=gt,c[1]=yt,c[2]=mt,c[3]=vt,c[4]=wt,c[5]=_t,c[6]=St,c[7]=At,c[8]=Et,c[9]=Mt,c[10]=xt,c[11]=Rt,c[12]=Ot,c[13]=It,c[14]=kt,c[15]=Pt,c[16]=Nt,c[17]=Tt,c[18]=Bt,0!==u&&(c[19]=u,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,c=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=c;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;a=67108863&(d=d+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(g=b),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?b(this,t,e):r<1024?y(this,t,e):m(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,c=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var l=c,d=u,h=0;h<s;h++){var p=r[f+h],b=n[f+h],g=r[f+h+s],y=n[f+h+s],m=l*g-d*y;y=l*y+d*g,g=m,r[f+h]=p+g,n[f+h]=b+y,r[f+h+s]=p-g,n[f+h+s]=b-y,h!==a&&(m=c*l-u*d,d=c*d+u*l,l=m)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(!(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),l=new Array(n),d=r.words;d.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,u,n),this.transform(s,o,a,c,n,i),this.transform(u,o,f,l,n,i);for(var h=0;h<n;h++){var p=a[h]*f[h]-c[h]*l[h];c[h]=a[h]*l[h]+c[h]*f[h],a[h]=p}return this.conjugate(a,c,n),this.transform(a,c,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,c=(0|this.words[e])-a<<r;this.words[e]=c|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var c=(0|t.words[i])*e;a=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==e){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var f=n.clone()._ishlnsubmul(i,1,c);0===f.negative&&(n=f,a&&(a.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=d)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,h=1;!(e.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;!(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(f),c.isub(l)),a.iushrn(1),c.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(c)):(r.isub(e),a.isub(i),c.isub(s))}return{a,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),c=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var l=0,d=1;!(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function R(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(S,_),S.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(A,_),i(E,_),i(M,_),M.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new A;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return w[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var l=this.pow(f,i),d=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=s;0!==h.cmp(a);){for(var b=h,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g<p);var y=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(y),l=y.redSqr(),h=h.redMul(l),p=g}return d},x.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},x.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,c=e.bitLength()%26;for(0===c&&(c=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],f=c-1;f>=0;f--){var l=u>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new R(t)},i(R,x),R.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},R.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},R.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},R.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},R.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},3643:function(t){t.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=90)}({17:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n=r(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var r=e.match(t);return r&&r.length>0&&r[1]||""},t.getSecondMatch=function(t,e){var r=e.match(t);return r&&r.length>1&&r[2]||""},t.matchAndReturnConst=function(t,e,r){if(t.test(e))return r},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,r,n){void 0===n&&(n=!1);var i=t.getVersionPrecision(e),o=t.getVersionPrecision(r),s=Math.max(i,o),a=0,c=t.map([e,r],(function(e){var r=s-t.getVersionPrecision(e),n=e+new Array(r+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},t.map=function(t,e){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(r=0;r<t.length;r+=1)n.push(e(t[r]));return n},t.find=function(t,e){var r,n;if(Array.prototype.find)return Array.prototype.find.call(t,e);for(r=0,n=t.length;r<n;r+=1){var i=t[r];if(e(i,r))return i}},t.assign=function(t){for(var e,r,n=t,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[t].concat(o));var a=function(){var t=o[e];"object"==typeof t&&null!==t&&Object.keys(t).forEach((function(e){n[e]=t[e]}))};for(e=0,r=o.length;e<r;e+=1)a();return t},t.getBrowserAlias=function(t){return n.BROWSER_ALIASES_MAP[t]},t.getBrowserTypeByAlias=function(t){return n.BROWSER_MAP[t]||""},t}();e.default=i,t.exports=e.default},18:function(t,e,r){"use strict";e.__esModule=!0,e.ENGINE_MAP=e.OS_MAP=e.PLATFORMS_MAP=e.BROWSER_MAP=e.BROWSER_ALIASES_MAP=void 0,e.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},e.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},e.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},e.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},e.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function(){function t(){}var e,r;return t.getParser=function(t,e){if(void 0===e&&(e=!1),"string"!=typeof t)throw new Error("UserAgent should be a string");return new i.default(t,e)},t.parse=function(t){return new i.default(t).getResult()},e=t,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(e.prototype,null),r&&s(e,r),t}();e.default=a,t.exports=e.default},91:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n=c(r(92)),i=c(r(93)),o=c(r(94)),s=c(r(95)),a=c(r(17));function c(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(t,e){if(void 0===e&&(e=!1),null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==e&&this.parse()}var e=t.prototype;return e.getUA=function(){return this._ua},e.test=function(t){return t.test(this._ua)},e.parseBrowser=function(){var t=this;this.parsedResult.browser={};var e=a.default.find(n.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser},e.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},e.getBrowserName=function(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},e.getBrowserVersion=function(){return this.getBrowser().version},e.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},e.parseOS=function(){var t=this;this.parsedResult.os={};var e=a.default.find(i.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os},e.getOSName=function(t){var e=this.getOS().name;return t?String(e).toLowerCase()||"":e||""},e.getOSVersion=function(){return this.getOS().version},e.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},e.getPlatformType=function(t){void 0===t&&(t=!1);var e=this.getPlatform().type;return t?String(e).toLowerCase()||"":e||""},e.parsePlatform=function(){var t=this;this.parsedResult.platform={};var e=a.default.find(o.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform},e.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},e.getEngineName=function(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},e.parseEngine=function(){var t=this;this.parsedResult.engine={};var e=a.default.find(s.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine},e.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},e.getResult=function(){return a.default.assign({},this.parsedResult)},e.satisfies=function(t){var e=this,r={},n=0,i={},o=0;if(Object.keys(t).forEach((function(e){var s=t[e];"string"==typeof s?(i[e]=s,o+=1):"object"==typeof s&&(r[e]=s,n+=1)})),n>0){var s=Object.keys(r),c=a.default.find(s,(function(t){return e.isOS(t)}));if(c){var u=this.satisfies(r[c]);if(void 0!==u)return u}var f=a.default.find(s,(function(t){return e.isPlatform(t)}));if(f){var l=this.satisfies(r[f]);if(void 0!==l)return l}}if(o>0){var d=Object.keys(i),h=a.default.find(d,(function(t){return e.isBrowser(t,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var r=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),i=a.default.getBrowserTypeByAlias(n);return e&&i&&(n=i.toLowerCase()),n===r},e.compareVersion=function(t){var e=[0],r=t,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(r=t.substr(1),"="===t[1]?(n=!0,r=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?r=t.substr(1):"~"===t[0]&&(n=!0,r=t.substr(1)),e.indexOf(a.default.compareVersions(i,r,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=u,t.exports=e.default},92:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return r&&(e.version=r),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:function(t){var e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe:function(t){var e={name:"Android Browser"},r=i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},r=i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},r=i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=s,t.exports=e.default},93:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:o.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=i.default.getWindowsVersionName(e);return{name:o.OS_MAP.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(e),n={name:o.OS_MAP.MacOS,version:e};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=i.default.getAndroidVersionName(e),n={name:o.OS_MAP.Android,version:e};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:o.OS_MAP.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:o.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.PlayStation4,version:e}}}];e.default=s,t.exports=e.default},94:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];e.default=s,t.exports=e.default},95:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:o.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:o.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:function(t){var e=t.test(/gecko/i),r=t.test(/like gecko/i);return e&&!r},describe:function(t){var e={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];e.default=s,t.exports=e.default}})},7048:(t,e,r)=>{var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(3553);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},1048:(t,e,r)=>{"use strict";const n=r(7991),i=r(9318),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|b(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){const e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer))return h(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const i=function(t){if(c.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Y(t.length)?a(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),a(t<0?0:0|p(t))}function d(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function b(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(i)return n?-1:V(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return M(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){let o,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(u(t,o+n)!==u(e,n)){r=!1;break}if(r)return o}return-1}function w(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(Y(n))return s;t[r+s]=n}return s}function _(t,e,r,n){return K(V(e,t.length-r),t,r,n)}function S(t,e,r,n){return K(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function A(t,e,r,n){return K(G(e),t,r,n)}function E(t,e,r,n){return K(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function M(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(o=c));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=R)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=R));return r}(n)}e.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},c.allocUnsafe=function(t){return l(t)},c.allocUnsafeSlow=function(t){return l(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).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}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=c.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(J(e,Uint8Array))i+e.length>n.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},c.byteLength=b,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)y(this,e,e+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?x(this,0,t):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),u=this.slice(n,i),f=t.slice(e,r);for(let t=0;t<a;++t)if(u[t]!==f[t]){o=u[t],s=f[t];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return S(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function O(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=Z[t[n]];return i}function P(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function N(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function B(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function C(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=X((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=X((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),c.prototype.readBigInt64BE=X((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),c.prototype.readFloatLE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||T(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||T(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=X((function(t,e=0){return B(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=X((function(t,e=0){return B(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=c.isBuffer(t)?t:c.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const U={};function D(t,e,r){U[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function q(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function z(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){$(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||W(e,t.length-(r+1))}(n,i,o)}function $(t,e){if("number"!=typeof t)throw new U.ERR_INVALID_ARG_TYPE(e,"number",t)}function W(t,e,r){if(Math.floor(t)!==t)throw $(t,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Y(t){return t!=t}const Z=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},9818:(t,e,r)=>{"use strict";var n=r(528),i=r(8498),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},8498:(t,e,r)=>{"use strict";var n=r(9138),i=r(528),o=r(6108),s=r(3468),a=i("%Function.prototype.apply%"),c=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||n.call(c,a),f=r(4940),l=i("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new s("a function is required");var e=u(n,c,arguments);return o(e,1+l(0,t.length-(arguments.length-1)),!0)};var d=function(){return u(n,a,arguments)};f?f(t.exports,"apply",{value:d}):t.exports.apply=d},686:(t,e,r)=>{"use strict";var n=r(4940),i=r(5731),o=r(3468),s=r(9336);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],l=!!s&&s(t,e);if(n)n(t,e,{configurable:null===u&&l?l.configurable:!u,enumerable:null===a&&l?l.enumerable:!a,value:r,writable:null===c&&l?l.writable:!c});else{if(!f&&(a||c||u))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},3360:(t,e,r)=>{"use strict";var n=e;n.version=r(183).rE,n.utils=r(1874),n.rand=r(7048),n.curve=r(7131),n.curves=r(6443),n.ec=r(5064),n.eddsa=r(4807)},5174:(t,e,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.getNAF,s=i.getJSF,a=i.assert;function c(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,c,u=[];for(s=0;s<n.length;s+=r.step){c=0;for(var f=s+r.step-1;f>=s;f--)c=(c<<1)+n[f];u.push(c)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(s=0;s<u.length;s++)(c=u[s])===h?d=d.mixedAdd(r.points[s]):c===-h&&(d=d.mixedAdd(r.points[s].neg()));l=l.add(d)}return l.toP()},c.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(e,r,this._bitLength),c=this.jpoint(null,null,null),u=s.length-1;u>=0;u--){for(var f=0;u>=0&&0===s[u];u--)f++;if(u>=0&&f++,c=c.dblp(f),u<0)break;var l=s[u];a(0!==l),c="affine"===t.type?l>0?c.mixedAdd(i[l-1>>1]):c.mixedAdd(i[-l-1>>1].neg()):l>0?c.add(i[l-1>>1]):c.add(i[-l-1>>1].neg())}return"affine"===t.type?c.toP():c},c.prototype._wnafMulAdd=function(t,e,r,n,i){var a,c,u,f=this._wnafT1,l=this._wnafT2,d=this._wnafT3,h=0;for(a=0;a<n;a++){var p=(u=e[a])._getNAFPoints(t);f[a]=p.wnd,l[a]=p.points}for(a=n-1;a>=1;a-=2){var b=a-1,g=a;if(1===f[b]&&1===f[g]){var y=[e[b],null,null,e[g]];0===e[b].y.cmp(e[g].y)?(y[1]=e[b].add(e[g]),y[2]=e[b].toJ().mixedAdd(e[g].neg())):0===e[b].y.cmp(e[g].y.redNeg())?(y[1]=e[b].toJ().mixedAdd(e[g]),y[2]=e[b].add(e[g].neg())):(y[1]=e[b].toJ().mixedAdd(e[g]),y[2]=e[b].toJ().mixedAdd(e[g].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[b],r[g]);for(h=Math.max(v[0].length,h),d[b]=new Array(h),d[g]=new Array(h),c=0;c<h;c++){var w=0|v[0][c],_=0|v[1][c];d[b][c]=m[3*(w+1)+(_+1)],d[g][c]=0,l[b]=y}}else d[b]=o(r[b],f[b],this._bitLength),d[g]=o(r[g],f[g],this._bitLength),h=Math.max(d[b].length,h),h=Math.max(d[g].length,h)}var S=this.jpoint(null,null,null),A=this._wnafT4;for(a=h;a>=0;a--){for(var E=0;a>=0;){var M=!0;for(c=0;c<n;c++)A[c]=0|d[c][a],0!==A[c]&&(M=!1);if(!M)break;E++,a--}if(a>=0&&E++,S=S.dblp(E),a<0)break;for(c=0;c<n;c++){var x=A[c];0!==x&&(x>0?u=l[c][x-1>>1]:x<0&&(u=l[c][-x-1>>1].neg()),S="affine"===u.type?S.mixedAdd(u):S.add(u))}}for(a=0;a<n;a++)l[a]=null;return i?S:S.toP()},c.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(t){return this.encode(t,!0)},u.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},u.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},u.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},u.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},u.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},1547:(t,e,r)=>{"use strict";var n=r(1874),i=r(2823),o=r(5615),s=r(5174),a=n.assert;function c(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function u(t,e,r,n,o){s.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,s),t.exports=c,c.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},c.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},c.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},c.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var c=a.fromRed().isOdd();return(e&&!c||!e&&c)&&(a=a.redNeg()),this.point(t,a)},c.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},c.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(u,s.BasePoint),c.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},c.prototype.point=function(t,e,r,n){return new u(this,t,e,r,n)},u.fromJSON=function(t,e){return new u(t,e[0],e[1],e[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),s=o.redSub(r),a=n.redSub(e),c=i.redMul(s),u=o.redMul(a),f=i.redMul(a),l=s.redMul(o);return this.curve.point(c,u,l,f)},u.prototype._projDbl=function(){var t,e,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(a)).redAdd(c);this.zOne?(t=s.redSub(a).redSub(c).redMul(u.redSub(this.curve.two)),e=u.redMul(n.redSub(c)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),t=s.redSub(a).redISub(c).redMul(o),e=u.redMul(n.redSub(c)),r=u.redMul(o))}else n=a.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(a.redISub(c)),r=n.redMul(o);return this.curve.point(t,e,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=i.redSub(n),a=i.redAdd(n),c=r.redAdd(e),u=o.redMul(s),f=a.redMul(c),l=o.redMul(c),d=s.redMul(a);return this.curve.point(u,f,d,l)},u.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),c=i.redSub(a),u=i.redAdd(a),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),l=n.redMul(c).redMul(f);return this.curve.twisted?(e=n.redMul(u).redMul(s.redSub(this.curve._mulA(o))),r=c.redMul(u)):(e=n.redMul(u).redMul(s.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(l,e,r)},u.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},u.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},u.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},u.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},7131:(t,e,r)=>{"use strict";var n=e;n.base=r(5174),n.short=r(277),n.mont=r(3245),n.edwards=r(1547)},3245:(t,e,r)=>{"use strict";var n=r(2823),i=r(5615),o=r(5174),s=r(1874);function a(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new c(this,t,e)},a.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(t,e){return new c(t,e[0],e[1]||t.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),c=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,c)},c.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},277:(t,e,r)=>{"use strict";var n=r(1874),i=r(2823),o=r(5615),s=r(5174),a=n.assert;function c(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(t,e,r,n){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,r,n){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,s),t.exports=c,c.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(t){for(var e,r,n,o,s,a,c,u,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,h=this.n.clone(),p=new i(1),b=new i(0),g=new i(0),y=new i(1),m=0;0!==d.cmpn(0);){var v=h.div(d);u=h.sub(v.mul(d)),f=g.sub(v.mul(p));var w=y.sub(v.mul(b));if(!n&&u.cmp(l)<0)e=c.neg(),r=p,n=u.neg(),o=f;else if(n&&2==++m)break;c=u,h=d,d=u,g=p,p=f,y=b,b=w}s=u.neg(),a=f;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},c.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:c.add(u).neg()}},c.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},c.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],c=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),n[2*o]=a,n[2*o+1]=c,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var u=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return u},o(u,s.BasePoint),c.prototype.point=function(t,e,r){return new u(this,t,e,r)},c.prototype.pointFromJSON=function(t,e){return u.fromJSON(this,t,e)},u.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},u.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,s.BasePoint),c.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),c=o.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),f=u.redMul(a),l=n.redMul(u),d=c.redSqr().redIAdd(f).redISub(l).redISub(l),h=c.redMul(l.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(d,h,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),f=r.redMul(c),l=a.redSqr().redIAdd(u).redISub(f).redISub(f),d=a.redMul(f.redISub(l)).redISub(i.redMul(u)),h=this.z.redMul(s);return this.curve.jpoint(l,d,h)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,c=a.redSqr().redSqr(),u=s.redAdd(s);for(e=0;e<t;e++){var f=o.redSqr(),l=u.redSqr(),d=l.redSqr(),h=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(c)),p=o.redMul(l),b=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(b),y=h.redMul(g);y=y.redIAdd(y).redISub(d);var m=u.redMul(a);e+1<t&&(c=c.redMul(d)),o=b,a=m,u=y}return this.curve.jpoint(o,u.redMul(i),a)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),c=a.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=c,e=a.redMul(s.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),h=this.x.redAdd(l).redSqr().redISub(f).redISub(d);h=h.redIAdd(h);var p=f.redAdd(f).redIAdd(f),b=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),t=b.redISub(h).redISub(h),e=p.redMul(h.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},f.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=a.redSqr().redISub(s).redISub(s);t=c;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=a.redMul(s.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),h=this.x.redSub(f).redMul(this.x.redAdd(f));h=h.redAdd(h).redIAdd(h);var p=d.redIAdd(d),b=(p=p.redIAdd(p)).redAdd(p);t=h.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=h.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},f.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),c=e.redAdd(e),u=(c=c.redIAdd(c)).redMul(s),f=a.redSqr().redISub(u.redAdd(u)),l=u.redISub(f),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=a.redMul(l).redISub(d),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,h,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(c),f=e.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(a).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(l,d,h)},f.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},f.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},6443:(t,e,r)=>{"use strict";var n,i=e,o=r(9499),s=r(7131),a=r(1874).assert;function c(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new c(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(3986)}catch(t){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},5064:(t,e,r)=>{"use strict";var n=r(2823),i=r(4742),o=r(1874),s=r(6443),a=r(7048),c=o.assert,u=r(7531),f=r(7782);function l(t){if(!(this instanceof l))return new l(t);"string"==typeof t&&(c(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=l,l.prototype.keyPair=function(t){return new u(this,t)},l.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},l.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},l.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),c=t.toArray("be",s),u=new i({hash:this.hash,entropy:a,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new n(1)),d=0;;d++){var h=o.k?o.k(d):new n(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(l)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var y=h.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(y=y.umod(this.n)).cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),m^=1),new f({r:g,s:y,recoveryParam:m})}}}}}},l.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new f(e,"hex")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,c=s.invm(this.n),u=c.mul(t).umod(this.n),l=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(t,e,r,i){c((3&r)===r,"The recovery param is more than two bits"),e=new f(e,i);var o=this.n,s=new n(t),a=e.r,u=e.s,l=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),l):this.curve.pointFromX(a,l);var h=e.r.invm(o),p=o.sub(s).mul(h).umod(o),b=u.mul(h).umod(o);return this.g.mulAdd(p,a,b)},l.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new f(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},7531:(t,e,r)=>{"use strict";var n=r(2823),i=r(1874).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},7782:(t,e,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function c(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function u(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function f(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=c(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=c(t,r);if(!1===s)return!1;var u=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var f=c(t,r);if(!1===f)return!1;if(t.length!==f+r.place)return!1;var l=t.slice(r.place,f+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(u),this.s=new n(l),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=u(e),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,e.length),(n=n.concat(e)).push(2),f(n,r.length);var o=n.concat(r),s=[48];return f(s,o.length),s=s.concat(o),i.encode(s,t)}},4807:(t,e,r)=>{"use strict";var n=r(9499),i=r(6443),o=r(1874),s=o.assert,a=o.parseBytes,c=r(4672),u=r(8401);function f(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=f,f.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),c=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},f.prototype.verify=function(t,e,r){t=a(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(t){return c.fromPublic(this,t)},f.prototype.keyFromSecret=function(t){return c.fromSecret(this,t)},f.prototype.makeSignature=function(t){return t instanceof u?t:new u(this,t)},f.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},f.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=!!(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(t){return o.intFromLE(t)},f.prototype.isPoint=function(t){return t instanceof this.pointClass}},4672:(t,e,r)=>{"use strict";var n=r(1874),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},8401:(t,e,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function c(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=c},3986:t=>{t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},1874:(t,e,r)=>{"use strict";var n=e,i=r(2823),o=r(7784),s=r(9042);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e,r){var n,i=new Array(Math.max(t.bitLength(),r)+1);for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<e+1,s=t.clone();for(n=0;n<i.length;n++){var a,c=s.andln(o-1);s.isOdd()?(a=c>(o>>1)-1?(o>>1)-c:c,s.isubn(a)):a=0,i[n]=a,s.iushrn(1)}return i},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,c=t.andln(3)+i&3,u=e.andln(3)+o&3;3===c&&(c=-1),3===u&&(u=-1),s=1&c?3!=(n=t.andln(7)+i&7)&&5!==n||2!==u?c:-c:0,r[0].push(s),a=1&u?3!=(n=e.andln(7)+o&7)&&5!==n||2!==c?u:-u:0,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},1822:(t,e,r)=>{var n=r(9907),i=r(3358),o=function(){},s=function(t,e,r){if("function"==typeof e)return s(t,null,e);e||(e={}),r=i(r||o);var a=t._writableState,c=t._readableState,u=e.readable||!1!==e.readable&&t.readable,f=e.writable||!1!==e.writable&&t.writable,l=!1,d=function(){t.writable||h()},h=function(){f=!1,u||r.call(t)},p=function(){u=!1,f||r.call(t)},b=function(e){r.call(t,e?new Error("exited with error code: "+e):null)},g=function(e){r.call(t,e)},y=function(){n.nextTick(m)},m=function(){if(!l)return(!u||c&&c.ended&&!c.destroyed)&&(!f||a&&a.ended&&!a.destroyed)?void 0:r.call(t,new Error("premature close"))},v=function(){t.req.on("finish",h)};return function(t){return t.setHeader&&"function"==typeof t.abort}(t)?(t.on("complete",h),t.on("abort",y),t.req?v():t.on("request",v)):f&&!a&&(t.on("end",d),t.on("close",d)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",b),t.on("end",p),t.on("finish",h),!1!==e.error&&t.on("error",g),t.on("close",y),function(){l=!0,t.removeListener("complete",h),t.removeListener("abort",y),t.removeListener("request",v),t.req&&t.req.removeListener("finish",h),t.removeListener("end",d),t.removeListener("close",d),t.removeListener("finish",h),t.removeListener("exit",b),t.removeListener("end",p),t.removeListener("error",g),t.removeListener("close",y)}};t.exports=s},4940:(t,e,r)=>{"use strict";var n=r(528)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(t){n=!1}t.exports=n},9110:t=>{"use strict";t.exports=EvalError},9838:t=>{"use strict";t.exports=Error},1155:t=>{"use strict";t.exports=RangeError},4943:t=>{"use strict";t.exports=ReferenceError},5731:t=>{"use strict";t.exports=SyntaxError},3468:t=>{"use strict";t.exports=TypeError},2140:t=>{"use strict";t.exports=URIError},46:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}b(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&b(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function u(t,e,r,n){var i,o,s,u;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(t))>0&&s.length>i&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=s.length,u=f,console&&console.warn&&console.warn(u)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function h(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function b(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)n(c,this,e);else{var u=c.length,f=p(c,u);for(r=0;r<u;++r)n(f[r],this,e)}return!0},o.prototype.addListener=function(t,e){return u(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return u(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,l(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,l(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},282:t=>{t.exports=s,s.default=s,s.stable=f,s.stableStringify=f;var e="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(t,e,r,s){var a;void 0===s&&(s=o()),c(t,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(t,e,r):JSON.stringify(t,d(e),r)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function a(t,e,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:t}),n.push([o,r,e,s])):i.push([e,r,t]):(o[r]=t,n.push([o,r,e]))}function c(t,n,i,o,s,u,f){var l;if(u+=1,"object"==typeof t&&null!==t){for(l=0;l<o.length;l++)if(o[l]===t)return void a(r,t,n,s);if(void 0!==f.depthLimit&&u>f.depthLimit)return void a(e,t,n,s);if(void 0!==f.edgesLimit&&i+1>f.edgesLimit)return void a(e,t,n,s);if(o.push(t),Array.isArray(t))for(l=0;l<t.length;l++)c(t[l],l,l,o,t,u,f);else{var d=Object.keys(t);for(l=0;l<d.length;l++){var h=d[l];c(t[h],h,l,o,t,u,f)}}o.pop()}}function u(t,e){return t<e?-1:t>e?1:0}function f(t,e,r,s){void 0===s&&(s=o());var a,c=l(t,"",0,[],void 0,0,s)||t;try{a=0===i.length?JSON.stringify(c,e,r):JSON.stringify(c,d(e),r)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function l(t,i,o,s,c,f,d){var h;if(f+=1,"object"==typeof t&&null!==t){for(h=0;h<s.length;h++)if(s[h]===t)return void a(r,t,i,c);try{if("function"==typeof t.toJSON)return}catch(t){return}if(void 0!==d.depthLimit&&f>d.depthLimit)return void a(e,t,i,c);if(void 0!==d.edgesLimit&&o+1>d.edgesLimit)return void a(e,t,i,c);if(s.push(t),Array.isArray(t))for(h=0;h<t.length;h++)l(t[h],h,h,s,t,f,d);else{var p={},b=Object.keys(t).sort(u);for(h=0;h<b.length;h++){var g=b[h];l(t[g],g,h,s,t,f,d),p[g]=t[g]}if(void 0===c)return p;n.push([c,i,t]),c[i]=p}s.pop()}}function d(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===e&&o[0]===r){r=o[2],i.splice(n,1);break}}return t.call(this,e,r)}}},8794:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var i=0;i<e.length;i+=1)r[i+t.length]=e[i];return r};t.exports=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var o,s=function(t,e){for(var r=[],n=1,i=0;n<t.length;n+=1,i+=1)r[i]=t[n];return r}(arguments),a=r(0,i.length-s.length),c=[],u=0;u<a;u++)c[u]="$"+u;if(o=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=",");return r}(c)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var e=i.apply(this,n(s,arguments));return Object(e)===e?e:this}return i.apply(t,n(s,arguments))})),i.prototype){var f=function(){};f.prototype=i.prototype,o.prototype=new f,f.prototype=null}return o}},9138:(t,e,r)=>{"use strict";var n=r(8794);t.exports=Function.prototype.bind||n},528:(t,e,r)=>{"use strict";var n,i=r(9838),o=r(9110),s=r(1155),a=r(4943),c=r(5731),u=r(3468),f=r(2140),l=Function,d=function(t){try{return l('"use strict"; return ('+t+").constructor;")()}catch(t){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(t){h=null}var p=function(){throw new u},b=h?function(){try{return p}catch(t){try{return h(arguments,"callee").get}catch(t){return p}}}():p,g=r(3558)(),y=r(6869)(),m=Object.getPrototypeOf||(y?function(t){return t.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&m?m(Uint8Array):n,_={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&m?m([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&m?m(m([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&m?m((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&m?m((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&m?m(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":b,"%TypedArray%":w,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(m)try{null.error}catch(t){var S=m(m(t));_["%Error.prototype%"]=S}var A=function t(e){var r;if("%AsyncFunction%"===e)r=d("async function () {}");else if("%GeneratorFunction%"===e)r=d("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=d("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&m&&(r=m(i.prototype))}return _[e]=r,r},E={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=r(9138),x=r(8554),R=M.call(Function.call,Array.prototype.concat),O=M.call(Function.apply,Array.prototype.splice),I=M.call(Function.call,String.prototype.replace),k=M.call(Function.call,String.prototype.slice),P=M.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,B=function(t,e){var r,n=t;if(x(E,n)&&(n="%"+(r=E[n])[0]+"%"),x(_,n)){var i=_[n];if(i===v&&(i=A(n)),void 0===i&&!e)throw new u("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new u('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=k(t,0,1),r=k(t,-1);if("%"===e&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return I(t,N,(function(t,e,r,i){n[n.length]=r?I(i,T,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=B("%"+n+"%",e),o=i.name,s=i.value,a=!1,f=i.alias;f&&(n=f[0],O(r,R([0,1],f)));for(var l=1,d=!0;l<r.length;l+=1){var p=r[l],b=k(p,0,1),g=k(p,-1);if(('"'===b||"'"===b||"`"===b||'"'===g||"'"===g||"`"===g)&&b!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==p&&d||(a=!0),x(_,o="%"+(n+="."+p)+"%"))s=_[o];else if(null!=s){if(!(p in s)){if(!e)throw new u("base intrinsic for "+t+" exists, but the property is not available.");return}if(h&&l+1>=r.length){var y=h(s,p);s=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[p]}else d=x(s,p),s=s[p];d&&!a&&(_[o]=s)}}return s}},9336:(t,e,r)=>{"use strict";var n=r(528)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},7239:(t,e,r)=>{"use strict";var n=r(4940),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},6869:t=>{"use strict";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},3558:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(2908);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},2908:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9499:(t,e,r)=>{var n=e;n.utils=r(461),n.common=r(2191),n.sha=r(5746),n.ripemd=r(4169),n.hmac=r(1825),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},2191:(t,e,r)=>{"use strict";var n=r(461),i=r(7784);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},1825:(t,e,r)=>{"use strict";var n=r(461),i=r(7784);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},4169:(t,e,r)=>{"use strict";var n=r(461),i=r(2191),o=n.rotl32,s=n.sum32,a=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function d(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function h(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(f,u),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],f=this.h[4],m=r,v=n,w=i,_=u,S=f,A=0;A<80;A++){var E=s(o(c(r,l(A,n,i,u),t[p[A]+e],d(A)),g[A]),f);r=f,f=u,u=o(i,10),i=n,n=E,E=s(o(c(m,l(79-A,v,w,_),t[b[A]+e],h(A)),y[A]),S),m=S,S=_,_=o(w,10),w=v,v=E}E=a(this.h[1],i,_),this.h[1]=a(this.h[2],u,S),this.h[2]=a(this.h[3],f,m),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},5746:(t,e,r)=>{"use strict";e.sha1=r(2986),e.sha224=r(5393),e.sha256=r(536),e.sha384=r(2348),e.sha512=r(2157)},2986:(t,e,r)=>{"use strict";var n=r(461),i=r(2191),o=r(600),s=n.rotl32,a=n.sum32,c=n.sum32_5,u=o.ft_1,f=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,f),t.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],d=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),b=c(s(i,5),u(p,o,f,d),h,r[n],l[p]);h=d,d=f,f=s(o,30),o=i,i=b}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],f),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],h)},d.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},5393:(t,e,r)=>{"use strict";var n=r(461),i=r(536);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},536:(t,e,r)=>{"use strict";var n=r(461),i=r(2191),o=r(600),s=r(7784),a=n.sum32,c=n.sum32_4,u=n.sum32_5,f=o.ch32,l=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,g=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(m,g),t.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=c(b(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],m=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var S=u(_,h(m),f(m,v,w),this.k[n],r[n]),A=a(d(i),l(i,o,g));_=w,w=v,v=m,m=a(y,S),y=g,g=o,o=i,i=a(S,A)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],m),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},m.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},2348:(t,e,r)=>{"use strict";var n=r(461),i=r(2157);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},2157:(t,e,r)=>{"use strict";var n=r(461),i=r(2191),o=r(7784),s=n.rotr64_hi,a=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,f=n.sum64,l=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function w(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function S(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function A(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function E(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function M(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function x(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function R(t,e){var r=s(t,e,1)^s(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function O(t,e){var r=a(t,e,1)^a(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=a(t,e,19)^a(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(v,y),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=(g=r[n-4],y=r[n-3],m=void 0,(m=s(g,y,19)^s(y,g,29)^c(g,y,6))<0&&(m+=4294967296),m),o=I(r[n-4],r[n-3]),a=r[n-14],u=r[n-13],f=R(r[n-30],r[n-29]),l=O(r[n-30],r[n-29]),d=r[n-32],b=r[n-31];r[n]=h(i,o,a,u,f,l,d,b),r[n+1]=p(i,o,a,u,f,l,d,b)}var g,y,m},v.prototype._update=function(t,e){this._prepareBlock(t,e);var r,n,i,a=this.W,c=this.h[0],u=this.h[1],h=this.h[2],p=this.h[3],y=this.h[4],m=this.h[5],v=this.h[6],R=this.h[7],O=this.h[8],I=this.h[9],k=this.h[10],P=this.h[11],N=this.h[12],T=this.h[13],B=this.h[14],C=this.h[15];o(this.k.length===a.length);for(var j=0;j<a.length;j+=2){var L=B,F=C,U=(i=void 0,(i=s(r=O,n=I,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),D=x(O,I),q=w(O,0,k,0,N),z=_(0,I,0,P,0,T),$=this.k[j],W=this.k[j+1],H=a[j],V=a[j+1],G=b(L,F,U,D,q,z,$,W,H,V),K=g(L,F,U,D,q,z,$,W,H,V);L=E(c,u),F=M(c,u),U=S(c,0,h,0,y),D=A(0,u,0,p,0,m);var J=l(L,F,U,D),Y=d(L,F,U,D);B=N,C=T,N=k,T=P,k=O,P=I,O=l(v,R,G,K),I=d(R,R,G,K),v=y,R=m,y=h,m=p,h=c,p=u,c=l(G,K,J,Y),u=d(G,K,J,Y)}f(this.h,0,c,u),f(this.h,2,h,p),f(this.h,4,y,m),f(this.h,6,v,R),f(this.h,8,O,I),f(this.h,10,k,P),f(this.h,12,N,T),f(this.h,14,B,C)},v.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},600:(t,e,r)=>{"use strict";var n=r(461).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},461:(t,e,r)=>{"use strict";var n=r(7784),i=r(5615);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function c(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=c(i.toString(16))}return r},e.zero2=a,e.zero8=c,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,c=e;a<s.length;a++,c+=4){var u;u="big"===i?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],s[a]=u>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var c=0,u=e;return c+=(u=u+n>>>0)<e?1:0,c+=(u=u+o>>>0)<o?1:0,t+r+i+s+(c+=(u=u+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,c,u){var f=0,l=e;return f+=(l=l+n>>>0)<e?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+a>>>0)<a?1:0,t+r+i+s+c+(f+=(l=l+u>>>0)<u?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,c,u){return e+n+o+a+u>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},8554:(t,e,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(9138);t.exports=o.call(n,i)},4742:(t,e,r)=>{"use strict";var n=r(9499),i=r(9042),o=r(7784);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(r),this._reseed++,i.encode(s,e)}},9318:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,f=-7,l=r?i-1:0,d=r?-1:1,h=t[e+l];for(l+=d,o=h&(1<<-f)-1,h>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=d,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=d,f-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=u}return(h?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,f=(1<<u)-1,l=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+l>=1?d/c:d*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*c-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+h]=255&s,h+=p,s/=256,u-=8);t[r+h-p]|=128*b}},5615:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},6512:t=>{t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==t.start?t.start:Math.floor(Math.random()*e);return function(){return r%=e,r++}}},5172:(t,e,r)=>{"use strict";var n=("undefined"!=typeof JSON?JSON:r(6998)).stringify,i=r(9549),o=r(9228),s=r(8498),a=r(9818),c=a("Array.prototype.join"),u=a("Array.prototype.push"),f=function(t,e){for(var r="",n=0;n<t;n+=1)r+=e;return r},l=function(t,e,r){return r};t.exports=function(t){var e=arguments.length>1?arguments[1]:void 0,r=e&&e.space||"";"number"==typeof r&&(r=f(r," "));var a=!!e&&"boolean"==typeof e.cycles&&e.cycles,d=e&&e.replacer?s(e.replacer):l,h="function"==typeof e?e:e&&e.cmp,p=h&&function(t){var e=h.length>2&&function(e){return t[e]};return function(r,n){return h({key:r,value:t[r]},{key:n,value:t[n]},e?{__proto__:null,get:e}:void 0)}},b=[];return function t(e,s,l,h){var g=r?"\n"+f(h,r):"",y=r?": ":":";if(l&&l.toJSON&&"function"==typeof l.toJSON&&(l=l.toJSON()),void 0!==(l=d(e,s,l))){if("object"!=typeof l||null===l)return n(l);if(i(l)){for(var m=[],v=0;v<l.length;v++){var w=t(l,v,l[v],h+1)||n(null);u(m,g+r+w)}return"["+c(m,",")+g+"]"}if(-1!==b.indexOf(l)){if(a)return n("__cycle__");throw new TypeError("Converting circular structure to JSON")}u(b,l);var _=o(l).sort(p&&p(l));for(m=[],v=0;v<_.length;v++){var S=t(l,s=_[v],l[s],h+1);if(S){var A=n(s)+y+S;u(m,g+r+A)}}return b.splice(b.indexOf(l),1),"{"+c(m,",")+g+"}"}}({"":t},"",t,0)}},9549:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},6998:(t,e,r)=>{"use strict";e.parse=r(6921),e.stringify=r(9191)},6921:t=>{"use strict";var e,r,n,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function o(t){throw{name:"SyntaxError",message:t,at:e,text:n}}function s(t){return t&&t!==r&&o("Expected '"+t+"' instead of '"+r+"'"),r=n.charAt(e),e+=1,r}function a(){var t,e="";for("-"===r&&(e="-",s("-"));r>="0"&&r<="9";)e+=r,s();if("."===r)for(e+=".";s()&&r>="0"&&r<="9";)e+=r;if("e"===r||"E"===r)for(e+=r,s(),"-"!==r&&"+"!==r||(e+=r,s());r>="0"&&r<="9";)e+=r,s();return t=Number(e),isFinite(t)||o("Bad number"),t}function c(){var t,e,n,a="";if('"'===r)for(;s();){if('"'===r)return s(),a;if("\\"===r)if(s(),"u"===r){for(n=0,e=0;e<4&&(t=parseInt(s(),16),isFinite(t));e+=1)n=16*n+t;a+=String.fromCharCode(n)}else{if("string"!=typeof i[r])break;a+=i[r]}else a+=r}o("Bad string")}function u(){for(;r&&r<=" ";)s()}function f(){switch(u(),r){case"{":return function(){var t,e={};if("{"===r){if(s("{"),u(),"}"===r)return s("}"),e;for(;r;){if(t=c(),u(),s(":"),Object.prototype.hasOwnProperty.call(e,t)&&o('Duplicate key "'+t+'"'),e[t]=f(),u(),"}"===r)return s("}"),e;s(","),u()}}o("Bad object")}();case"[":return function(){var t=[];if("["===r){if(s("["),u(),"]"===r)return s("]"),t;for(;r;){if(t.push(f()),u(),"]"===r)return s("]"),t;s(","),u()}}o("Bad array")}();case'"':return c();case"-":return a();default:return r>="0"&&r<="9"?a():function(){switch(r){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null;default:o("Unexpected '"+r+"'")}}()}}t.exports=function(t,i){var s;return n=t,e=0,r=" ",s=f(),u(),r&&o("Syntax error"),"function"==typeof i?function t(e,r){var n,o,s=e[r];if(s&&"object"==typeof s)for(n in f)Object.prototype.hasOwnProperty.call(s,n)&&(void 0===(o=t(s,n))?delete s[n]:s[n]=o);return i.call(e,r,s)}({"":s},""):s}},9191:t=>{"use strict";var e,r,n,i=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(t){return i.lastIndex=0,i.test(t)?'"'+t.replace(i,(function(t){var e=o[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function a(t,i){var o,c,u,f,l,d=e,h=i[t];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(t)),"function"==typeof n&&(h=n.call(i,t,h)),typeof h){case"string":return s(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(e+=r,l=[],"[object Array]"===Object.prototype.toString.apply(h)){for(f=h.length,o=0;o<f;o+=1)l[o]=a(o,h)||"null";return u=0===l.length?"[]":e?"[\n"+e+l.join(",\n"+e)+"\n"+d+"]":"["+l.join(",")+"]",e=d,u}if(n&&"object"==typeof n)for(f=n.length,o=0;o<f;o+=1)"string"==typeof(c=n[o])&&(u=a(c,h))&&l.push(s(c)+(e?": ":":")+u);else for(c in h)Object.prototype.hasOwnProperty.call(h,c)&&(u=a(c,h))&&l.push(s(c)+(e?": ":":")+u);return u=0===l.length?"{}":e?"{\n"+e+l.join(",\n"+e)+"\n"+d+"}":"{"+l.join(",")+"}",e=d,u}}t.exports=function(t,i,o){var s;if(e="",r="","number"==typeof o)for(s=0;s<o;s+=1)r+=" ";else"string"==typeof o&&(r=o);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return a("",{"":t})}},8290:(t,e,r)=>{t=r.nmd(t);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Boolean]",a="[object Date]",c="[object Function]",u="[object GeneratorFunction]",f="[object Map]",l="[object Number]",d="[object Object]",h="[object Promise]",p="[object RegExp]",b="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",_="[object Float32Array]",S="[object Float64Array]",A="[object Int8Array]",E="[object Int16Array]",M="[object Int32Array]",x="[object Uint8Array]",R="[object Uint8ClampedArray]",O="[object Uint16Array]",I="[object Uint32Array]",k=/\w*$/,P=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,T={};T[o]=T["[object Array]"]=T[v]=T[w]=T[s]=T[a]=T[_]=T[S]=T[A]=T[E]=T[M]=T[f]=T[l]=T[d]=T[p]=T[b]=T[g]=T[y]=T[x]=T[R]=T[O]=T[I]=!0,T["[object Error]"]=T[c]=T[m]=!1;var B="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,C="object"==typeof self&&self&&self.Object===Object&&self,j=B||C||Function("return this")(),L=e&&!e.nodeType&&e,F=L&&t&&!t.nodeType&&t,U=F&&F.exports===L;function D(t,e){return t.set(e[0],e[1]),t}function q(t,e){return t.add(e),t}function z(t,e,r,n){var i=-1,o=t?t.length:0;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function $(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function W(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function H(t,e){return function(r){return t(e(r))}}function V(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var G,K=Array.prototype,J=Function.prototype,Y=Object.prototype,Z=j["__core-js_shared__"],X=(G=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",Q=J.toString,tt=Y.hasOwnProperty,et=Y.toString,rt=RegExp("^"+Q.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nt=U?j.Buffer:void 0,it=j.Symbol,ot=j.Uint8Array,st=H(Object.getPrototypeOf,Object),at=Object.create,ct=Y.propertyIsEnumerable,ut=K.splice,ft=Object.getOwnPropertySymbols,lt=nt?nt.isBuffer:void 0,dt=H(Object.keys,Object),ht=jt(j,"DataView"),pt=jt(j,"Map"),bt=jt(j,"Promise"),gt=jt(j,"Set"),yt=jt(j,"WeakMap"),mt=jt(Object,"create"),vt=qt(ht),wt=qt(pt),_t=qt(bt),St=qt(gt),At=qt(yt),Et=it?it.prototype:void 0,Mt=Et?Et.valueOf:void 0;function xt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Rt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ot(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function It(t){this.__data__=new Rt(t)}function kt(t,e,r){var n=t[e];tt.call(t,e)&&zt(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function Pt(t,e){for(var r=t.length;r--;)if(zt(t[r][0],e))return r;return-1}function Nt(t,e,r,n,i,h,m){var P;if(n&&(P=h?n(t,i,h,m):n(t)),void 0!==P)return P;if(!Gt(t))return t;var N=$t(t);if(N){if(P=function(t){var e=t.length,r=t.constructor(e);return e&&"string"==typeof t[0]&&tt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!e)return function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(t,P)}else{var B=Ft(t),C=B==c||B==u;if(Ht(t))return function(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}(t,e);if(B==d||B==o||C&&!h){if($(t))return h?t:{};if(P=function(t){return"function"!=typeof t.constructor||Dt(t)?{}:Gt(e=st(t))?at(e):{};var e}(C?{}:t),!e)return function(t,e){return Bt(t,Lt(t),e)}(t,function(t,e){return t&&Bt(e,Kt(e),t)}(P,t))}else{if(!T[B])return h?t:{};P=function(t,e,r,n){var i,o=t.constructor;switch(e){case v:return Tt(t);case s:case a:return new o(+t);case w:return function(t,e){var r=e?Tt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,n);case _:case S:case A:case E:case M:case x:case R:case O:case I:return function(t,e){var r=e?Tt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,n);case f:return function(t,e,r){return z(e?r(W(t),!0):W(t),D,new t.constructor)}(t,n,r);case l:case g:return new o(t);case p:return function(t){var e=new t.constructor(t.source,k.exec(t));return e.lastIndex=t.lastIndex,e}(t);case b:return function(t,e,r){return z(e?r(V(t),!0):V(t),q,new t.constructor)}(t,n,r);case y:return i=t,Mt?Object(Mt.call(i)):{}}}(t,B,Nt,e)}}m||(m=new It);var j=m.get(t);if(j)return j;if(m.set(t,P),!N)var L=r?function(t){return function(t,e,r){var n=e(t);return $t(t)?n:function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}(n,r(t))}(t,Kt,Lt)}(t):Kt(t);return function(t,e){for(var r=-1,n=t?t.length:0;++r<n&&!1!==e(t[r],r););}(L||t,(function(i,o){L&&(i=t[o=i]),kt(P,o,Nt(i,e,r,n,o,t,m))})),P}function Tt(t){var e=new t.constructor(t.byteLength);return new ot(e).set(new ot(t)),e}function Bt(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var s=e[i],a=n?n(r[s],t[s],s,r,t):void 0;kt(r,s,void 0===a?t[s]:a)}return r}function Ct(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function jt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Gt(t)||(e=t,X&&X in e))&&(Vt(t)||$(t)?rt:P).test(qt(t));var e}(r)?r:void 0}xt.prototype.clear=function(){this.__data__=mt?mt(null):{}},xt.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},xt.prototype.get=function(t){var e=this.__data__;if(mt){var r=e[t];return r===n?void 0:r}return tt.call(e,t)?e[t]:void 0},xt.prototype.has=function(t){var e=this.__data__;return mt?void 0!==e[t]:tt.call(e,t)},xt.prototype.set=function(t,e){return this.__data__[t]=mt&&void 0===e?n:e,this},Rt.prototype.clear=function(){this.__data__=[]},Rt.prototype.delete=function(t){var e=this.__data__,r=Pt(e,t);return!(r<0||(r==e.length-1?e.pop():ut.call(e,r,1),0))},Rt.prototype.get=function(t){var e=this.__data__,r=Pt(e,t);return r<0?void 0:e[r][1]},Rt.prototype.has=function(t){return Pt(this.__data__,t)>-1},Rt.prototype.set=function(t,e){var r=this.__data__,n=Pt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Ot.prototype.clear=function(){this.__data__={hash:new xt,map:new(pt||Rt),string:new xt}},Ot.prototype.delete=function(t){return Ct(this,t).delete(t)},Ot.prototype.get=function(t){return Ct(this,t).get(t)},Ot.prototype.has=function(t){return Ct(this,t).has(t)},Ot.prototype.set=function(t,e){return Ct(this,t).set(t,e),this},It.prototype.clear=function(){this.__data__=new Rt},It.prototype.delete=function(t){return this.__data__.delete(t)},It.prototype.get=function(t){return this.__data__.get(t)},It.prototype.has=function(t){return this.__data__.has(t)},It.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Rt){var n=r.__data__;if(!pt||n.length<199)return n.push([t,e]),this;r=this.__data__=new Ot(n)}return r.set(t,e),this};var Lt=ft?H(ft,Object):function(){return[]},Ft=function(t){return et.call(t)};function Ut(t,e){return!!(e=null==e?i:e)&&("number"==typeof t||N.test(t))&&t>-1&&t%1==0&&t<e}function Dt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Y)}function qt(t){if(null!=t){try{return Q.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zt(t,e){return t===e||t!=t&&e!=e}(ht&&Ft(new ht(new ArrayBuffer(1)))!=w||pt&&Ft(new pt)!=f||bt&&Ft(bt.resolve())!=h||gt&&Ft(new gt)!=b||yt&&Ft(new yt)!=m)&&(Ft=function(t){var e=et.call(t),r=e==d?t.constructor:void 0,n=r?qt(r):void 0;if(n)switch(n){case vt:return w;case wt:return f;case _t:return h;case St:return b;case At:return m}return e});var $t=Array.isArray;function Wt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}(t.length)&&!Vt(t)}var Ht=lt||function(){return!1};function Vt(t){var e=Gt(t)?et.call(t):"";return e==c||e==u}function Gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Kt(t){return Wt(t)?function(t,e){var r=$t(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&Wt(t)}(t)&&tt.call(t,"callee")&&(!ct.call(t,"callee")||et.call(t)==o)}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,i=!!n;for(var s in t)!e&&!tt.call(t,s)||i&&("length"==s||Ut(s,n))||r.push(s);return r}(t):function(t){if(!Dt(t))return dt(t);var e=[];for(var r in Object(t))tt.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}t.exports=function(t){return Nt(t,!0,!0)}},8089:(t,e,r)=>{t=r.nmd(t);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",u="[object Null]",f="[object Object]",l="[object Proxy]",d="[object Undefined]",h=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[o]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b[a]=b["[object Map]"]=b["[object Number]"]=b[f]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object WeakMap]"]=!1;var g,y,m,v="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,w="object"==typeof self&&self&&self.Object===Object&&self,_=v||w||Function("return this")(),S=e&&!e.nodeType&&e,A=S&&t&&!t.nodeType&&t,E=A&&A.exports===S,M=E&&v.process,x=function(){try{return A&&A.require&&A.require("util").types||M&&M.binding&&M.binding("util")}catch(t){}}(),R=x&&x.isTypedArray,O=Array.prototype,I=Function.prototype,k=Object.prototype,P=_["__core-js_shared__"],N=I.toString,T=k.hasOwnProperty,B=(g=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",C=k.toString,j=N.call(Object),L=RegExp("^"+N.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=E?_.Buffer:void 0,U=_.Symbol,D=_.Uint8Array,q=(F&&F.allocUnsafe,y=Object.getPrototypeOf,m=Object,function(t){return y(m(t))}),z=Object.create,$=k.propertyIsEnumerable,W=O.splice,H=U?U.toStringTag:void 0,V=function(){try{var t=dt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),G=F?F.isBuffer:void 0,K=Math.max,J=Date.now,Y=dt(_,"Map"),Z=dt(Object,"create"),X=function(){function t(){}return function(e){if(!Et(e))return{};if(z)return z(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function Q(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function tt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function et(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function rt(t){var e=this.__data__=new tt(t);this.size=e.size}function nt(t,e,r){(void 0!==r&&!yt(t[e],r)||void 0===r&&!(e in t))&&st(t,e,r)}function it(t,e,r){var n=t[e];T.call(t,e)&&yt(n,r)&&(void 0!==r||e in t)||st(t,e,r)}function ot(t,e){for(var r=t.length;r--;)if(yt(t[r][0],e))return r;return-1}function st(t,e,r){"__proto__"==e&&V?V(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Q.prototype.clear=function(){this.__data__=Z?Z(null):{},this.size=0},Q.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Q.prototype.get=function(t){var e=this.__data__;if(Z){var r=e[t];return r===n?void 0:r}return T.call(e,t)?e[t]:void 0},Q.prototype.has=function(t){var e=this.__data__;return Z?void 0!==e[t]:T.call(e,t)},Q.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Z&&void 0===e?n:e,this},tt.prototype.clear=function(){this.__data__=[],this.size=0},tt.prototype.delete=function(t){var e=this.__data__,r=ot(e,t);return!(r<0||(r==e.length-1?e.pop():W.call(e,r,1),--this.size,0))},tt.prototype.get=function(t){var e=this.__data__,r=ot(e,t);return r<0?void 0:e[r][1]},tt.prototype.has=function(t){return ot(this.__data__,t)>-1},tt.prototype.set=function(t,e){var r=this.__data__,n=ot(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},et.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(Y||tt),string:new Q}},et.prototype.delete=function(t){var e=lt(this,t).delete(t);return this.size-=e?1:0,e},et.prototype.get=function(t){return lt(this,t).get(t)},et.prototype.has=function(t){return lt(this,t).has(t)},et.prototype.set=function(t,e){var r=lt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},rt.prototype.clear=function(){this.__data__=new tt,this.size=0},rt.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},rt.prototype.get=function(t){return this.__data__.get(t)},rt.prototype.has=function(t){return this.__data__.has(t)},rt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof tt){var n=r.__data__;if(!Y||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new et(n)}return r.set(t,e),this.size=r.size,this};function at(t){return null==t?void 0===t?d:u:H&&H in Object(t)?function(t){var e=T.call(t,H),r=t[H];try{t[H]=void 0;var n=!0}catch(t){}var i=C.call(t);return n&&(e?t[H]=r:delete t[H]),i}(t):function(t){return C.call(t)}(t)}function ct(t){return Mt(t)&&at(t)==o}function ut(t,e,r,n,i){t!==e&&function(t,e,r){for(var n=-1,i=Object(t),o=r(t),s=o.length;s--;){var a=o[++n];if(!1===e(i[a],a,i))break}}(e,(function(o,s){if(i||(i=new rt),Et(o))!function(t,e,r,n,i,o,s){var a=bt(t,r),c=bt(e,r),u=s.get(c);if(u)nt(t,r,u);else{var l,d,h,p,b,g=o?o(a,c,r+"",t,e,s):void 0,y=void 0===g;if(y){var m=vt(c),v=!m&&_t(c),w=!m&&!v&&xt(c);g=c,m||v||w?vt(a)?g=a:Mt(b=a)&&wt(b)?g=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(a):v?(y=!1,g=function(t,e){return t.slice()}(c)):w?(y=!1,p=new(h=(l=c).buffer).constructor(h.byteLength),new D(p).set(new D(h)),d=p,g=new l.constructor(d,l.byteOffset,l.length)):g=[]:function(t){if(!Mt(t)||at(t)!=f)return!1;var e=q(t);if(null===e)return!0;var r=T.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&N.call(r)==j}(c)||mt(c)?(g=a,mt(a)?g=function(t){return function(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=void 0;void 0===c&&(c=t[a]),i?st(r,a,c):it(r,a,c)}return r}(t,Rt(t))}(a):Et(a)&&!St(a)||(g=function(t){return"function"!=typeof t.constructor||pt(t)?{}:X(q(t))}(c))):y=!1}y&&(s.set(c,g),i(g,c,n,o,s),s.delete(c)),nt(t,r,g)}}(t,e,s,r,ut,n,i);else{var a=n?n(bt(t,s),o,s+"",t,e,i):void 0;void 0===a&&(a=o),nt(t,s,a)}}),Rt)}var ft=V?function(t,e){return V(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:kt;function lt(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function dt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Et(t)||function(t){return!!B&&B in t}(t))&&(St(t)?L:h).test(function(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}(r)?r:void 0}function ht(t,e){var r=typeof t;return!!(e=null==e?i:e)&&("number"==r||"symbol"!=r&&p.test(t))&&t>-1&&t%1==0&&t<e}function pt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||k)}function bt(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var gt=function(t){var e=0,r=0;return function(){var n=J(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ft);function yt(t,e){return t===e||t!=t&&e!=e}var mt=ct(function(){return arguments}())?ct:function(t){return Mt(t)&&T.call(t,"callee")&&!$.call(t,"callee")},vt=Array.isArray;function wt(t){return null!=t&&At(t.length)&&!St(t)}var _t=G||function(){return!1};function St(t){if(!Et(t))return!1;var e=at(t);return e==a||e==c||e==s||e==l}function At(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}function Et(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Mt(t){return null!=t&&"object"==typeof t}var xt=R?function(t){return function(e){return t(e)}}(R):function(t){return Mt(t)&&At(t.length)&&!!b[at(t)]};function Rt(t){return wt(t)?function(t,e){var r=vt(t),n=!r&&mt(t),i=!r&&!n&&_t(t),o=!r&&!n&&!i&&xt(t),s=r||n||i||o,a=s?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=a.length;for(var u in t)!e&&!T.call(t,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ht(u,c))||a.push(u);return a}(t,!0):function(t){if(!Et(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=pt(t),r=[];for(var n in t)("constructor"!=n||!e&&T.call(t,n))&&r.push(n);return r}(t)}var Ot,It=(Ot=function(t,e,r){ut(t,e,r)},function(t,e){return gt(function(t,e,r){return e=K(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=K(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(t,this,a)}}(t,e,kt),t+"")}((function(t,e){var r=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=Ot.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(t,e,r){if(!Et(r))return!1;var n=typeof e;return!!("number"==n?wt(r)&&ht(e,r.length):"string"==n&&e in r)&&yt(r[e],t)}(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var s=e[r];s&&Ot(t,s,r)}return t})));function kt(t){return t}t.exports=It},5250:function(t,e,r){var n;t=r.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,u=128,f=1/0,l=9007199254740991,d=NaN,h=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],b="[object Arguments]",g="[object Array]",y="[object Boolean]",m="[object Date]",v="[object Error]",w="[object Function]",_="[object GeneratorFunction]",S="[object Map]",A="[object Number]",E="[object Object]",M="[object Promise]",x="[object RegExp]",R="[object Set]",O="[object String]",I="[object Symbol]",k="[object WeakMap]",P="[object ArrayBuffer]",N="[object DataView]",T="[object Float32Array]",B="[object Float64Array]",C="[object Int8Array]",j="[object Int16Array]",L="[object Int32Array]",F="[object Uint8Array]",U="[object Uint8ClampedArray]",D="[object Uint16Array]",q="[object Uint32Array]",z=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,G=RegExp(H.source),K=RegExp(V.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(et.source),nt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ut=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,ht=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,_t="\\ud800-\\udfff",St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",At="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",Mt="A-Z\\xc0-\\xd6\\xd8-\\xde",xt="\\ufe0e\\ufe0f",Rt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ot="["+_t+"]",It="["+Rt+"]",kt="["+St+"]",Pt="\\d+",Nt="["+At+"]",Tt="["+Et+"]",Bt="[^"+_t+Rt+Pt+At+Et+Mt+"]",Ct="\\ud83c[\\udffb-\\udfff]",jt="[^"+_t+"]",Lt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",Ut="["+Mt+"]",Dt="\\u200d",qt="(?:"+Tt+"|"+Bt+")",zt="(?:"+Ut+"|"+Bt+")",$t="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ht="(?:"+kt+"|"+Ct+")?",Vt="["+xt+"]?",Gt=Vt+Ht+"(?:"+Dt+"(?:"+[jt,Lt,Ft].join("|")+")"+Vt+Ht+")*",Kt="(?:"+[Nt,Lt,Ft].join("|")+")"+Gt,Jt="(?:"+[jt+kt+"?",kt,Lt,Ft,Ot].join("|")+")",Yt=RegExp("['’]","g"),Zt=RegExp(kt,"g"),Xt=RegExp(Ct+"(?="+Ct+")|"+Jt+Gt,"g"),Qt=RegExp([Ut+"?"+Tt+"+"+$t+"(?="+[It,Ut,"$"].join("|")+")",zt+"+"+Wt+"(?="+[It,Ut+qt,"$"].join("|")+")",Ut+"?"+qt+"+"+$t,Ut+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pt,Kt].join("|"),"g"),te=RegExp("["+Dt+_t+St+xt+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ne=-1,ie={};ie[T]=ie[B]=ie[C]=ie[j]=ie[L]=ie[F]=ie[U]=ie[D]=ie[q]=!0,ie[b]=ie[g]=ie[P]=ie[y]=ie[N]=ie[m]=ie[v]=ie[w]=ie[S]=ie[A]=ie[E]=ie[x]=ie[R]=ie[O]=ie[k]=!1;var oe={};oe[b]=oe[g]=oe[P]=oe[N]=oe[y]=oe[m]=oe[T]=oe[B]=oe[C]=oe[j]=oe[L]=oe[S]=oe[A]=oe[E]=oe[x]=oe[R]=oe[O]=oe[I]=oe[F]=oe[U]=oe[D]=oe[q]=!0,oe[v]=oe[w]=oe[k]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ce=parseInt,ue="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,fe="object"==typeof self&&self&&self.Object===Object&&self,le=ue||fe||Function("return this")(),de=e&&!e.nodeType&&e,he=de&&t&&!t.nodeType&&t,pe=he&&he.exports===de,be=pe&&ue.process,ge=function(){try{return he&&he.require&&he.require("util").types||be&&be.binding&&be.binding("util")}catch(t){}}(),ye=ge&&ge.isArrayBuffer,me=ge&&ge.isDate,ve=ge&&ge.isMap,we=ge&&ge.isRegExp,_e=ge&&ge.isSet,Se=ge&&ge.isTypedArray;function Ae(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Ee(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(n,s,r(s),t)}return n}function Me(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function xe(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function Re(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Oe(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}function Ie(t,e){return!(null==t||!t.length)&&Ue(t,e,0)>-1}function ke(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Pe(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function Ne(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Te(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Be(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function Ce(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var je=$e("length");function Le(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function Fe(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ue(t,e,r){return e==e?function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):Fe(t,qe,r)}function De(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function qe(t){return t!=t}function ze(t,e){var r=null==t?0:t.length;return r?Ve(t,e)/r:d}function $e(t){return function(e){return null==e?i:e[t]}}function We(t){return function(e){return null==t?i:t[e]}}function He(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Ve(t,e){for(var r,n=-1,o=t.length;++n<o;){var s=e(t[n]);s!==i&&(r=r===i?s:r+s)}return r}function Ge(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Ke(t){return t?t.slice(0,lr(t)+1).replace(nt,""):t}function Je(t){return function(e){return t(e)}}function Ye(t,e){return Pe(e,(function(e){return t[e]}))}function Ze(t,e){return t.has(e)}function Xe(t,e){for(var r=-1,n=t.length;++r<n&&Ue(e,t[r],0)>-1;);return r}function Qe(t,e){for(var r=t.length;r--&&Ue(e,t[r],0)>-1;);return r}var tr=We({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),er=We({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rr(t){return"\\"+se[t]}function nr(t){return te.test(t)}function ir(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function or(t,e){return function(r){return t(e(r))}}function sr(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r];s!==e&&s!==a||(t[r]=a,o[i++]=r)}return o}function ar(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function cr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function ur(t){return nr(t)?function(t){for(var e=Xt.lastIndex=0;Xt.test(t);)++e;return e}(t):je(t)}function fr(t){return nr(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.split("")}(t)}function lr(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var dr=We({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),hr=function t(e){var r,n=(e=null==e?le:hr.defaults(le.Object(),e,hr.pick(le,re))).Array,it=e.Date,_t=e.Error,St=e.Function,At=e.Math,Et=e.Object,Mt=e.RegExp,xt=e.String,Rt=e.TypeError,Ot=n.prototype,It=St.prototype,kt=Et.prototype,Pt=e["__core-js_shared__"],Nt=It.toString,Tt=kt.hasOwnProperty,Bt=0,Ct=(r=/[^.]+$/.exec(Pt&&Pt.keys&&Pt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",jt=kt.toString,Lt=Nt.call(Et),Ft=le._,Ut=Mt("^"+Nt.call(Tt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dt=pe?e.Buffer:i,qt=e.Symbol,zt=e.Uint8Array,$t=Dt?Dt.allocUnsafe:i,Wt=or(Et.getPrototypeOf,Et),Ht=Et.create,Vt=kt.propertyIsEnumerable,Gt=Ot.splice,Kt=qt?qt.isConcatSpreadable:i,Jt=qt?qt.iterator:i,Xt=qt?qt.toStringTag:i,te=function(){try{var t=co(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==le.clearTimeout&&e.clearTimeout,ue=it&&it.now!==le.Date.now&&it.now,fe=e.setTimeout!==le.setTimeout&&e.setTimeout,de=At.ceil,he=At.floor,be=Et.getOwnPropertySymbols,ge=Dt?Dt.isBuffer:i,je=e.isFinite,We=Ot.join,pr=or(Et.keys,Et),br=At.max,gr=At.min,yr=it.now,mr=e.parseInt,vr=At.random,wr=Ot.reverse,_r=co(e,"DataView"),Sr=co(e,"Map"),Ar=co(e,"Promise"),Er=co(e,"Set"),Mr=co(e,"WeakMap"),xr=co(Et,"create"),Rr=Mr&&new Mr,Or={},Ir=Lo(_r),kr=Lo(Sr),Pr=Lo(Ar),Nr=Lo(Er),Tr=Lo(Mr),Br=qt?qt.prototype:i,Cr=Br?Br.valueOf:i,jr=Br?Br.toString:i;function Lr(t){if(ta(t)&&!$s(t)&&!(t instanceof qr)){if(t instanceof Dr)return t;if(Tt.call(t,"__wrapped__"))return Fo(t)}return new Dr(t)}var Fr=function(){function t(){}return function(e){if(!Qs(e))return{};if(Ht)return Ht(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function Ur(){}function Dr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function qr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function zr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function $r(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Hr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Wr;++e<r;)this.add(t[e])}function Vr(t){var e=this.__data__=new $r(t);this.size=e.size}function Gr(t,e){var r=$s(t),n=!r&&zs(t),i=!r&&!n&&Gs(t),o=!r&&!n&&!i&&ca(t),s=r||n||i||o,a=s?Ge(t.length,xt):[],c=a.length;for(var u in t)!e&&!Tt.call(t,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||go(u,c))||a.push(u);return a}function Kr(t){var e=t.length;return e?t[Hn(0,e-1)]:i}function Jr(t,e){return No(xi(t),on(e,0,t.length))}function Yr(t){return No(xi(t))}function Zr(t,e,r){(r!==i&&!Us(t[e],r)||r===i&&!(e in t))&&rn(t,e,r)}function Xr(t,e,r){var n=t[e];Tt.call(t,e)&&Us(n,r)&&(r!==i||e in t)||rn(t,e,r)}function Qr(t,e){for(var r=t.length;r--;)if(Us(t[r][0],e))return r;return-1}function tn(t,e,r,n){return fn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function en(t,e){return t&&Ri(e,ka(e),t)}function rn(t,e,r){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function nn(t,e){for(var r=-1,o=e.length,s=n(o),a=null==t;++r<o;)s[r]=a?i:Ma(t,e[r]);return s}function on(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function sn(t,e,r,n,o,s){var a,c=1&e,u=2&e,f=4&e;if(r&&(a=o?r(t,n,o,s):r(t)),a!==i)return a;if(!Qs(t))return t;var l=$s(t);if(l){if(a=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Tt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!c)return xi(t,a)}else{var d=lo(t),h=d==w||d==_;if(Gs(t))return wi(t,c);if(d==E||d==b||h&&!o){if(a=u||h?{}:po(t),!c)return u?function(t,e){return Ri(t,fo(t),e)}(t,function(t,e){return t&&Ri(e,Pa(e),t)}(a,t)):function(t,e){return Ri(t,uo(t),e)}(t,en(a,t))}else{if(!oe[d])return o?t:{};a=function(t,e,r){var n,i=t.constructor;switch(e){case P:return _i(t);case y:case m:return new i(+t);case N:return function(t,e){var r=e?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case T:case B:case C:case j:case L:case F:case U:case D:case q:return Si(t,r);case S:return new i;case A:case O:return new i(t);case x:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case R:return new i;case I:return n=t,Cr?Et(Cr.call(n)):{}}}(t,d,c)}}s||(s=new Vr);var p=s.get(t);if(p)return p;s.set(t,a),oa(t)?t.forEach((function(n){a.add(sn(n,e,r,n,t,s))})):ea(t)&&t.forEach((function(n,i){a.set(i,sn(n,e,r,i,t,s))}));var g=l?i:(f?u?eo:to:u?Pa:ka)(t);return Me(g||t,(function(n,i){g&&(n=t[i=n]),Xr(a,i,sn(n,e,r,i,t,s))})),a}function an(t,e,r){var n=r.length;if(null==t)return!n;for(t=Et(t);n--;){var o=r[n],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function cn(t,e,r){if("function"!=typeof t)throw new Rt(o);return Oo((function(){t.apply(i,r)}),e)}function un(t,e,r,n){var i=-1,o=Ie,s=!0,a=t.length,c=[],u=e.length;if(!a)return c;r&&(e=Pe(e,Je(r))),n?(o=ke,s=!1):e.length>=200&&(o=Ze,s=!1,e=new Hr(e));t:for(;++i<a;){var f=t[i],l=null==r?f:r(f);if(f=n||0!==f?f:0,s&&l==l){for(var d=u;d--;)if(e[d]===l)continue t;c.push(f)}else o(e,l,n)||c.push(f)}return c}Lr.templateSettings={escape:J,evaluate:Y,interpolate:Z,variable:"",imports:{_:Lr}},Lr.prototype=Ur.prototype,Lr.prototype.constructor=Lr,Dr.prototype=Fr(Ur.prototype),Dr.prototype.constructor=Dr,qr.prototype=Fr(Ur.prototype),qr.prototype.constructor=qr,zr.prototype.clear=function(){this.__data__=xr?xr(null):{},this.size=0},zr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},zr.prototype.get=function(t){var e=this.__data__;if(xr){var r=e[t];return r===s?i:r}return Tt.call(e,t)?e[t]:i},zr.prototype.has=function(t){var e=this.__data__;return xr?e[t]!==i:Tt.call(e,t)},zr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=xr&&e===i?s:e,this},$r.prototype.clear=function(){this.__data__=[],this.size=0},$r.prototype.delete=function(t){var e=this.__data__,r=Qr(e,t);return!(r<0||(r==e.length-1?e.pop():Gt.call(e,r,1),--this.size,0))},$r.prototype.get=function(t){var e=this.__data__,r=Qr(e,t);return r<0?i:e[r][1]},$r.prototype.has=function(t){return Qr(this.__data__,t)>-1},$r.prototype.set=function(t,e){var r=this.__data__,n=Qr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Wr.prototype.clear=function(){this.size=0,this.__data__={hash:new zr,map:new(Sr||$r),string:new zr}},Wr.prototype.delete=function(t){var e=so(this,t).delete(t);return this.size-=e?1:0,e},Wr.prototype.get=function(t){return so(this,t).get(t)},Wr.prototype.has=function(t){return so(this,t).has(t)},Wr.prototype.set=function(t,e){var r=so(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Hr.prototype.add=Hr.prototype.push=function(t){return this.__data__.set(t,s),this},Hr.prototype.has=function(t){return this.__data__.has(t)},Vr.prototype.clear=function(){this.__data__=new $r,this.size=0},Vr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Vr.prototype.get=function(t){return this.__data__.get(t)},Vr.prototype.has=function(t){return this.__data__.has(t)},Vr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof $r){var n=r.__data__;if(!Sr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Wr(n)}return r.set(t,e),this.size=r.size,this};var fn=ki(mn),ln=ki(vn,!0);function dn(t,e){var r=!0;return fn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function hn(t,e,r){for(var n=-1,o=t.length;++n<o;){var s=t[n],a=e(s);if(null!=a&&(c===i?a==a&&!aa(a):r(a,c)))var c=a,u=s}return u}function pn(t,e){var r=[];return fn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function bn(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=bo),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?bn(a,e-1,r,n,i):Ne(i,a):n||(i[i.length]=a)}return i}var gn=Pi(),yn=Pi(!0);function mn(t,e){return t&&gn(t,e,ka)}function vn(t,e){return t&&yn(t,e,ka)}function wn(t,e){return Oe(e,(function(e){return Ys(t[e])}))}function _n(t,e){for(var r=0,n=(e=gi(e,t)).length;null!=t&&r<n;)t=t[jo(e[r++])];return r&&r==n?t:i}function Sn(t,e,r){var n=e(t);return $s(t)?n:Ne(n,r(t))}function An(t){return null==t?t===i?"[object Undefined]":"[object Null]":Xt&&Xt in Et(t)?function(t){var e=Tt.call(t,Xt),r=t[Xt];try{t[Xt]=i;var n=!0}catch(t){}var o=jt.call(t);return n&&(e?t[Xt]=r:delete t[Xt]),o}(t):function(t){return jt.call(t)}(t)}function En(t,e){return t>e}function Mn(t,e){return null!=t&&Tt.call(t,e)}function xn(t,e){return null!=t&&e in Et(t)}function Rn(t,e,r){for(var o=r?ke:Ie,s=t[0].length,a=t.length,c=a,u=n(a),f=1/0,l=[];c--;){var d=t[c];c&&e&&(d=Pe(d,Je(e))),f=gr(d.length,f),u[c]=!r&&(e||s>=120&&d.length>=120)?new Hr(c&&d):i}d=t[0];var h=-1,p=u[0];t:for(;++h<s&&l.length<f;){var b=d[h],g=e?e(b):b;if(b=r||0!==b?b:0,!(p?Ze(p,g):o(l,g,r))){for(c=a;--c;){var y=u[c];if(!(y?Ze(y,g):o(t[c],g,r)))continue t}p&&p.push(g),l.push(b)}}return l}function On(t,e,r){var n=null==(t=Mo(t,e=gi(e,t)))?t:t[jo(Jo(e))];return null==n?i:Ae(n,t,r)}function In(t){return ta(t)&&An(t)==b}function kn(t,e,r,n,o){return t===e||(null==t||null==e||!ta(t)&&!ta(e)?t!=t&&e!=e:function(t,e,r,n,o,s){var a=$s(t),c=$s(e),u=a?g:lo(t),f=c?g:lo(e),l=(u=u==b?E:u)==E,d=(f=f==b?E:f)==E,h=u==f;if(h&&Gs(t)){if(!Gs(e))return!1;a=!0,l=!1}if(h&&!l)return s||(s=new Vr),a||ca(t)?Xi(t,e,r,n,o,s):function(t,e,r,n,i,o,s){switch(r){case N:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case P:return!(t.byteLength!=e.byteLength||!o(new zt(t),new zt(e)));case y:case m:case A:return Us(+t,+e);case v:return t.name==e.name&&t.message==e.message;case x:case O:return t==e+"";case S:var a=ir;case R:var c=1&n;if(a||(a=ar),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;n|=2,s.set(t,e);var f=Xi(a(t),a(e),n,i,o,s);return s.delete(t),f;case I:if(Cr)return Cr.call(t)==Cr.call(e)}return!1}(t,e,u,r,n,o,s);if(!(1&r)){var p=l&&Tt.call(t,"__wrapped__"),w=d&&Tt.call(e,"__wrapped__");if(p||w){var _=p?t.value():t,M=w?e.value():e;return s||(s=new Vr),o(_,M,r,n,s)}}return!!h&&(s||(s=new Vr),function(t,e,r,n,o,s){var a=1&r,c=to(t),u=c.length;if(u!=to(e).length&&!a)return!1;for(var f=u;f--;){var l=c[f];if(!(a?l in e:Tt.call(e,l)))return!1}var d=s.get(t),h=s.get(e);if(d&&h)return d==e&&h==t;var p=!0;s.set(t,e),s.set(e,t);for(var b=a;++f<u;){var g=t[l=c[f]],y=e[l];if(n)var m=a?n(y,g,l,e,t,s):n(g,y,l,t,e,s);if(!(m===i?g===y||o(g,y,r,n,s):m)){p=!1;break}b||(b="constructor"==l)}if(p&&!b){var v=t.constructor,w=e.constructor;v==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(t),s.delete(e),p}(t,e,r,n,o,s))}(t,e,r,n,kn,o))}function Pn(t,e,r,n){var o=r.length,s=o,a=!n;if(null==t)return!s;for(t=Et(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<s;){var u=(c=r[o])[0],f=t[u],l=c[1];if(a&&c[2]){if(f===i&&!(u in t))return!1}else{var d=new Vr;if(n)var h=n(f,l,u,t,e,d);if(!(h===i?kn(l,f,3,n,d):h))return!1}}return!0}function Nn(t){return!(!Qs(t)||(e=t,Ct&&Ct in e))&&(Ys(t)?Ut:bt).test(Lo(t));var e}function Tn(t){return"function"==typeof t?t:null==t?rc:"object"==typeof t?$s(t)?Fn(t[0],t[1]):Ln(t):lc(t)}function Bn(t){if(!_o(t))return pr(t);var e=[];for(var r in Et(t))Tt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Cn(t,e){return t<e}function jn(t,e){var r=-1,i=Hs(t)?n(t.length):[];return fn(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function Ln(t){var e=ao(t);return 1==e.length&&e[0][2]?Ao(e[0][0],e[0][1]):function(r){return r===t||Pn(r,t,e)}}function Fn(t,e){return mo(t)&&So(e)?Ao(jo(t),e):function(r){var n=Ma(r,t);return n===i&&n===e?xa(r,t):kn(e,n,3)}}function Un(t,e,r,n,o){t!==e&&gn(e,(function(s,a){if(o||(o=new Vr),Qs(s))!function(t,e,r,n,o,s,a){var c=xo(t,r),u=xo(e,r),f=a.get(u);if(f)Zr(t,r,f);else{var l=s?s(c,u,r+"",t,e,a):i,d=l===i;if(d){var h=$s(u),p=!h&&Gs(u),b=!h&&!p&&ca(u);l=u,h||p||b?$s(c)?l=c:Vs(c)?l=xi(c):p?(d=!1,l=wi(u,!0)):b?(d=!1,l=Si(u,!0)):l=[]:na(u)||zs(u)?(l=c,zs(c)?l=ga(c):Qs(c)&&!Ys(c)||(l=po(u))):d=!1}d&&(a.set(u,l),o(l,u,n,s,a),a.delete(u)),Zr(t,r,l)}}(t,e,a,r,Un,n,o);else{var c=n?n(xo(t,a),s,a+"",t,e,o):i;c===i&&(c=s),Zr(t,a,c)}}),Pa)}function Dn(t,e){var r=t.length;if(r)return go(e+=e<0?r:0,r)?t[e]:i}function qn(t,e,r){e=e.length?Pe(e,(function(t){return $s(t)?function(e){return _n(e,1===t.length?t[0]:t)}:t})):[rc];var n=-1;e=Pe(e,Je(oo()));var i=jn(t,(function(t,r,i){var o=Pe(e,(function(e){return e(t)}));return{criteria:o,index:++n,value:t}}));return function(t,e){var n=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,s=i.length,a=r.length;++n<s;){var c=Ai(i[n],o[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}));n--;)t[n]=t[n].value;return t}(i)}function zn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var s=e[n],a=_n(t,s);r(a,s)&&Yn(o,gi(s,t),a)}return o}function $n(t,e,r,n){var i=n?De:Ue,o=-1,s=e.length,a=t;for(t===e&&(e=xi(e)),r&&(a=Pe(t,Je(r)));++o<s;)for(var c=0,u=e[o],f=r?r(u):u;(c=i(a,f,c,n))>-1;)a!==t&&Gt.call(a,c,1),Gt.call(t,c,1);return t}function Wn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;go(i)?Gt.call(t,i,1):ci(t,i)}}return t}function Hn(t,e){return t+he(vr()*(e-t+1))}function Vn(t,e){var r="";if(!t||e<1||e>l)return r;do{e%2&&(r+=t),(e=he(e/2))&&(t+=t)}while(e);return r}function Gn(t,e){return Io(Eo(t,e,rc),t+"")}function Kn(t){return Kr(Ua(t))}function Jn(t,e){var r=Ua(t);return No(r,on(e,0,r.length))}function Yn(t,e,r,n){if(!Qs(t))return t;for(var o=-1,s=(e=gi(e,t)).length,a=s-1,c=t;null!=c&&++o<s;){var u=jo(e[o]),f=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(o!=a){var l=c[u];(f=n?n(l,u,c):i)===i&&(f=Qs(l)?l:go(e[o+1])?[]:{})}Xr(c,u,f),c=c[u]}return t}var Zn=Rr?function(t,e){return Rr.set(t,e),t}:rc,Xn=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Qa(e),writable:!0})}:rc;function Qn(t){return No(Ua(t))}function ti(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var s=n(o);++i<o;)s[i]=t[i+e];return s}function ei(t,e){var r;return fn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ri(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=t[o];null!==s&&!aa(s)&&(r?s<=e:s<e)?n=o+1:i=o}return i}return ni(t,e,rc,r)}function ni(t,e,r,n){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=r(e))!=e,c=null===e,u=aa(e),f=e===i;o<s;){var l=he((o+s)/2),d=r(t[l]),h=d!==i,p=null===d,b=d==d,g=aa(d);if(a)var y=n||b;else y=f?b&&(n||h):c?b&&h&&(n||!p):u?b&&h&&!p&&(n||!g):!p&&!g&&(n?d<=e:d<e);y?o=l+1:s=l}return gr(s,4294967294)}function ii(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r],a=e?e(s):s;if(!r||!Us(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function oi(t){return"number"==typeof t?t:aa(t)?d:+t}function si(t){if("string"==typeof t)return t;if($s(t))return Pe(t,si)+"";if(aa(t))return jr?jr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ai(t,e,r){var n=-1,i=Ie,o=t.length,s=!0,a=[],c=a;if(r)s=!1,i=ke;else if(o>=200){var u=e?null:Vi(t);if(u)return ar(u);s=!1,i=Ze,c=new Hr}else c=e?[]:a;t:for(;++n<o;){var f=t[n],l=e?e(f):f;if(f=r||0!==f?f:0,s&&l==l){for(var d=c.length;d--;)if(c[d]===l)continue t;e&&c.push(l),a.push(f)}else i(c,l,r)||(c!==a&&c.push(l),a.push(f))}return a}function ci(t,e){return null==(t=Mo(t,e=gi(e,t)))||delete t[jo(Jo(e))]}function ui(t,e,r,n){return Yn(t,e,r(_n(t,e)),n)}function fi(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?ti(t,n?0:o,n?o+1:i):ti(t,n?o+1:0,n?i:o)}function li(t,e){var r=t;return r instanceof qr&&(r=r.value()),Te(e,(function(t,e){return e.func.apply(e.thisArg,Ne([t],e.args))}),r)}function di(t,e,r){var i=t.length;if(i<2)return i?ai(t[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=t[o],c=-1;++c<i;)c!=o&&(s[o]=un(s[o]||a,t[c],e,r));return ai(bn(s,1),e,r)}function hi(t,e,r){for(var n=-1,o=t.length,s=e.length,a={};++n<o;){var c=n<s?e[n]:i;r(a,t[n],c)}return a}function pi(t){return Vs(t)?t:[]}function bi(t){return"function"==typeof t?t:rc}function gi(t,e){return $s(t)?t:mo(t,e)?[t]:Co(ya(t))}var yi=Gn;function mi(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:ti(t,e,r)}var vi=se||function(t){return le.clearTimeout(t)};function wi(t,e){if(e)return t.slice();var r=t.length,n=$t?$t(r):new t.constructor(r);return t.copy(n),n}function _i(t){var e=new t.constructor(t.byteLength);return new zt(e).set(new zt(t)),e}function Si(t,e){var r=e?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ai(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,s=aa(t),a=e!==i,c=null===e,u=e==e,f=aa(e);if(!c&&!f&&!s&&t>e||s&&a&&u&&!c&&!f||n&&a&&u||!r&&u||!o)return 1;if(!n&&!s&&!f&&t<e||f&&r&&o&&!n&&!s||c&&r&&o||!a&&o||!u)return-1}return 0}function Ei(t,e,r,i){for(var o=-1,s=t.length,a=r.length,c=-1,u=e.length,f=br(s-a,0),l=n(u+f),d=!i;++c<u;)l[c]=e[c];for(;++o<a;)(d||o<s)&&(l[r[o]]=t[o]);for(;f--;)l[c++]=t[o++];return l}function Mi(t,e,r,i){for(var o=-1,s=t.length,a=-1,c=r.length,u=-1,f=e.length,l=br(s-c,0),d=n(l+f),h=!i;++o<l;)d[o]=t[o];for(var p=o;++u<f;)d[p+u]=e[u];for(;++a<c;)(h||o<s)&&(d[p+r[a]]=t[o++]);return d}function xi(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function Ri(t,e,r,n){var o=!r;r||(r={});for(var s=-1,a=e.length;++s<a;){var c=e[s],u=n?n(r[c],t[c],c,r,t):i;u===i&&(u=t[c]),o?rn(r,c,u):Xr(r,c,u)}return r}function Oi(t,e){return function(r,n){var i=$s(r)?Ee:tn,o=e?e():{};return i(r,t,oo(n,2),o)}}function Ii(t){return Gn((function(e,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&yo(r[0],r[1],a)&&(s=o<3?i:s,o=1),e=Et(e);++n<o;){var c=r[n];c&&t(e,c,n,s)}return e}))}function ki(t,e){return function(r,n){if(null==r)return r;if(!Hs(r))return t(r,n);for(var i=r.length,o=e?i:-1,s=Et(r);(e?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Pi(t){return function(e,r,n){for(var i=-1,o=Et(e),s=n(e),a=s.length;a--;){var c=s[t?a:++i];if(!1===r(o[c],c,o))break}return e}}function Ni(t){return function(e){var r=nr(e=ya(e))?fr(e):i,n=r?r[0]:e.charAt(0),o=r?mi(r,1).join(""):e.slice(1);return n[t]()+o}}function Ti(t){return function(e){return Te(Ya(za(e).replace(Yt,"")),t,"")}}function Bi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Fr(t.prototype),n=t.apply(r,e);return Qs(n)?n:r}}function Ci(t){return function(e,r,n){var o=Et(e);if(!Hs(e)){var s=oo(r,3);e=ka(e),r=function(t){return s(o[t],t,o)}}var a=t(e,r,n);return a>-1?o[s?e[a]:a]:i}}function ji(t){return Qi((function(e){var r=e.length,n=r,s=Dr.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new Rt(o);if(s&&!c&&"wrapper"==no(a))var c=new Dr([],!0)}for(n=c?n:r;++n<r;){var u=no(a=e[n]),f="wrapper"==u?ro(a):i;c=f&&vo(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?c[no(f[0])].apply(c,f[3]):1==a.length&&vo(a)?c[u]():c.thru(a)}return function(){var t=arguments,n=t[0];if(c&&1==t.length&&$s(n))return c.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Li(t,e,r,o,s,a,c,f,l,d){var h=e&u,p=1&e,b=2&e,g=24&e,y=512&e,m=b?i:Bi(t);return function u(){for(var v=arguments.length,w=n(v),_=v;_--;)w[_]=arguments[_];if(g)var S=io(u),A=function(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}(w,S);if(o&&(w=Ei(w,o,s,g)),a&&(w=Mi(w,a,c,g)),v-=A,g&&v<d){var E=sr(w,S);return Wi(t,e,Li,u.placeholder,r,w,E,f,l,d-v)}var M=p?r:this,x=b?M[t]:t;return v=w.length,f?w=function(t,e){for(var r=t.length,n=gr(e.length,r),o=xi(t);n--;){var s=e[n];t[n]=go(s,r)?o[s]:i}return t}(w,f):y&&v>1&&w.reverse(),h&&l<v&&(w.length=l),this&&this!==le&&this instanceof u&&(x=m||Bi(x)),x.apply(M,w)}}function Fi(t,e){return function(r,n){return function(t,e,r,n){return mn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function Ui(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=si(r),n=si(n)):(r=oi(r),n=oi(n)),o=t(r,n)}return o}}function Di(t){return Qi((function(e){return e=Pe(e,Je(oo())),Gn((function(r){var n=this;return t(e,(function(t){return Ae(t,n,r)}))}))}))}function qi(t,e){var r=(e=e===i?" ":si(e)).length;if(r<2)return r?Vn(e,t):e;var n=Vn(e,de(t/ur(e)));return nr(e)?mi(fr(n),0,t).join(""):n.slice(0,t)}function zi(t){return function(e,r,o){return o&&"number"!=typeof o&&yo(e,r,o)&&(r=o=i),e=da(e),r===i?(r=e,e=0):r=da(r),function(t,e,r,i){for(var o=-1,s=br(de((e-t)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=t,t+=r;return a}(e,r,o=o===i?e<r?1:-1:da(o),t)}}function $i(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=ba(e),r=ba(r)),t(e,r)}}function Wi(t,e,r,n,o,s,a,u,f,l){var d=8&e;e|=d?c:64,4&(e&=~(d?64:c))||(e&=-4);var h=[t,e,o,d?s:i,d?a:i,d?i:s,d?i:a,u,f,l],p=r.apply(i,h);return vo(t)&&Ro(p,h),p.placeholder=n,ko(p,t,e)}function Hi(t){var e=At[t];return function(t,r){if(t=ba(t),(r=null==r?0:gr(ha(r),292))&&je(t)){var n=(ya(t)+"e").split("e");return+((n=(ya(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Vi=Er&&1/ar(new Er([,-0]))[1]==f?function(t){return new Er(t)}:ac;function Gi(t){return function(e){var r=lo(e);return r==S?ir(e):r==R?cr(e):function(t,e){return Pe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Ki(t,e,r,s,f,l,d,h){var p=2&e;if(!p&&"function"!=typeof t)throw new Rt(o);var b=s?s.length:0;if(b||(e&=-97,s=f=i),d=d===i?d:br(ha(d),0),h=h===i?h:ha(h),b-=f?f.length:0,64&e){var g=s,y=f;s=f=i}var m=p?i:ro(t),v=[t,e,r,s,f,g,y,l,d,h];if(m&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<131,s=n==u&&8==r||n==u&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!o&&!s)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var c=e[3];if(c){var f=t[3];t[3]=f?Ei(f,c,e[4]):c,t[4]=f?sr(t[3],a):e[4]}(c=e[5])&&(f=t[5],t[5]=f?Mi(f,c,e[6]):c,t[6]=f?sr(t[5],a):e[6]),(c=e[7])&&(t[7]=c),n&u&&(t[8]=null==t[8]?e[8]:gr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(v,m),t=v[0],e=v[1],r=v[2],s=v[3],f=v[4],!(h=v[9]=v[9]===i?p?0:t.length:br(v[9]-b,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,r){var o=Bi(t);return function s(){for(var a=arguments.length,c=n(a),u=a,f=io(s);u--;)c[u]=arguments[u];var l=a<3&&c[0]!==f&&c[a-1]!==f?[]:sr(c,f);return(a-=l.length)<r?Wi(t,e,Li,s.placeholder,i,c,l,i,i,r-a):Ae(this&&this!==le&&this instanceof s?o:t,this,c)}}(t,e,h):e!=c&&33!=e||f.length?Li.apply(i,v):function(t,e,r,i){var o=1&e,s=Bi(t);return function e(){for(var a=-1,c=arguments.length,u=-1,f=i.length,l=n(f+c),d=this&&this!==le&&this instanceof e?s:t;++u<f;)l[u]=i[u];for(;c--;)l[u++]=arguments[++a];return Ae(d,o?r:this,l)}}(t,e,r,s);else var w=function(t,e,r){var n=1&e,i=Bi(t);return function e(){return(this&&this!==le&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,r);return ko((m?Zn:Ro)(w,v),t,e)}function Ji(t,e,r,n){return t===i||Us(t,kt[r])&&!Tt.call(n,r)?e:t}function Yi(t,e,r,n,o,s){return Qs(t)&&Qs(e)&&(s.set(e,t),Un(t,e,i,Yi,s),s.delete(e)),t}function Zi(t){return na(t)?i:t}function Xi(t,e,r,n,o,s){var a=1&r,c=t.length,u=e.length;if(c!=u&&!(a&&u>c))return!1;var f=s.get(t),l=s.get(e);if(f&&l)return f==e&&l==t;var d=-1,h=!0,p=2&r?new Hr:i;for(s.set(t,e),s.set(e,t);++d<c;){var b=t[d],g=e[d];if(n)var y=a?n(g,b,d,e,t,s):n(b,g,d,t,e,s);if(y!==i){if(y)continue;h=!1;break}if(p){if(!Ce(e,(function(t,e){if(!Ze(p,e)&&(b===t||o(b,t,r,n,s)))return p.push(e)}))){h=!1;break}}else if(b!==g&&!o(b,g,r,n,s)){h=!1;break}}return s.delete(t),s.delete(e),h}function Qi(t){return Io(Eo(t,i,Wo),t+"")}function to(t){return Sn(t,ka,uo)}function eo(t){return Sn(t,Pa,fo)}var ro=Rr?function(t){return Rr.get(t)}:ac;function no(t){for(var e=t.name+"",r=Or[e],n=Tt.call(Or,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function io(t){return(Tt.call(Lr,"placeholder")?Lr:t).placeholder}function oo(){var t=Lr.iteratee||nc;return t=t===nc?Tn:t,arguments.length?t(arguments[0],arguments[1]):t}function so(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function ao(t){for(var e=ka(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,So(i)]}return e}function co(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return Nn(r)?r:i}var uo=be?function(t){return null==t?[]:(t=Et(t),Oe(be(t),(function(e){return Vt.call(t,e)})))}:pc,fo=be?function(t){for(var e=[];t;)Ne(e,uo(t)),t=Wt(t);return e}:pc,lo=An;function ho(t,e,r){for(var n=-1,i=(e=gi(e,t)).length,o=!1;++n<i;){var s=jo(e[n]);if(!(o=null!=t&&r(t,s)))break;t=t[s]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&Xs(i)&&go(s,i)&&($s(t)||zs(t))}function po(t){return"function"!=typeof t.constructor||_o(t)?{}:Fr(Wt(t))}function bo(t){return $s(t)||zs(t)||!!(Kt&&t&&t[Kt])}function go(t,e){var r=typeof t;return!!(e=null==e?l:e)&&("number"==r||"symbol"!=r&&yt.test(t))&&t>-1&&t%1==0&&t<e}function yo(t,e,r){if(!Qs(r))return!1;var n=typeof e;return!!("number"==n?Hs(r)&&go(e,r.length):"string"==n&&e in r)&&Us(r[e],t)}function mo(t,e){if($s(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!aa(t))||Q.test(t)||!X.test(t)||null!=e&&t in Et(e)}function vo(t){var e=no(t),r=Lr[e];if("function"!=typeof r||!(e in qr.prototype))return!1;if(t===r)return!0;var n=ro(r);return!!n&&t===n[0]}(_r&&lo(new _r(new ArrayBuffer(1)))!=N||Sr&&lo(new Sr)!=S||Ar&&lo(Ar.resolve())!=M||Er&&lo(new Er)!=R||Mr&&lo(new Mr)!=k)&&(lo=function(t){var e=An(t),r=e==E?t.constructor:i,n=r?Lo(r):"";if(n)switch(n){case Ir:return N;case kr:return S;case Pr:return M;case Nr:return R;case Tr:return k}return e});var wo=Pt?Ys:bc;function _o(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||kt)}function So(t){return t==t&&!Qs(t)}function Ao(t,e){return function(r){return null!=r&&r[t]===e&&(e!==i||t in Et(r))}}function Eo(t,e,r){return e=br(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,s=br(i.length-e,0),a=n(s);++o<s;)a[o]=i[e+o];o=-1;for(var c=n(e+1);++o<e;)c[o]=i[o];return c[e]=r(a),Ae(t,this,c)}}function Mo(t,e){return e.length<2?t:_n(t,ti(e,0,-1))}function xo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ro=Po(Zn),Oo=fe||function(t,e){return le.setTimeout(t,e)},Io=Po(Xn);function ko(t,e,r){var n=e+"";return Io(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return Me(p,(function(r){var n="_."+r[0];e&r[1]&&!Ie(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(n),r)))}function Po(t){var e=0,r=0;return function(){var n=yr(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function No(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var s=Hn(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=e,t}var To,Bo,Co=(To=Ts((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,r,n,i){e.push(n?i.replace(ft,"$1"):r||t)})),e}),(function(t){return 500===Bo.size&&Bo.clear(),t})),Bo=To.cache,To);function jo(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Lo(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Fo(t){if(t instanceof qr)return t.clone();var e=new Dr(t.__wrapped__,t.__chain__);return e.__actions__=xi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Uo=Gn((function(t,e){return Vs(t)?un(t,bn(e,1,Vs,!0)):[]})),Do=Gn((function(t,e){var r=Jo(e);return Vs(r)&&(r=i),Vs(t)?un(t,bn(e,1,Vs,!0),oo(r,2)):[]})),qo=Gn((function(t,e){var r=Jo(e);return Vs(r)&&(r=i),Vs(t)?un(t,bn(e,1,Vs,!0),i,r):[]}));function zo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:ha(r);return i<0&&(i=br(n+i,0)),Fe(t,oo(e,3),i)}function $o(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ha(r),o=r<0?br(n+o,0):gr(o,n-1)),Fe(t,oo(e,3),o,!0)}function Wo(t){return null!=t&&t.length?bn(t,1):[]}function Ho(t){return t&&t.length?t[0]:i}var Vo=Gn((function(t){var e=Pe(t,pi);return e.length&&e[0]===t[0]?Rn(e):[]})),Go=Gn((function(t){var e=Jo(t),r=Pe(t,pi);return e===Jo(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Rn(r,oo(e,2)):[]})),Ko=Gn((function(t){var e=Jo(t),r=Pe(t,pi);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Rn(r,i,e):[]}));function Jo(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Yo=Gn(Zo);function Zo(t,e){return t&&t.length&&e&&e.length?$n(t,e):t}var Xo=Qi((function(t,e){var r=null==t?0:t.length,n=nn(t,e);return Wn(t,Pe(e,(function(t){return go(t,r)?+t:t})).sort(Ai)),n}));function Qo(t){return null==t?t:wr.call(t)}var ts=Gn((function(t){return ai(bn(t,1,Vs,!0))})),es=Gn((function(t){var e=Jo(t);return Vs(e)&&(e=i),ai(bn(t,1,Vs,!0),oo(e,2))})),rs=Gn((function(t){var e=Jo(t);return e="function"==typeof e?e:i,ai(bn(t,1,Vs,!0),i,e)}));function ns(t){if(!t||!t.length)return[];var e=0;return t=Oe(t,(function(t){if(Vs(t))return e=br(t.length,e),!0})),Ge(e,(function(e){return Pe(t,$e(e))}))}function is(t,e){if(!t||!t.length)return[];var r=ns(t);return null==e?r:Pe(r,(function(t){return Ae(e,i,t)}))}var os=Gn((function(t,e){return Vs(t)?un(t,e):[]})),ss=Gn((function(t){return di(Oe(t,Vs))})),as=Gn((function(t){var e=Jo(t);return Vs(e)&&(e=i),di(Oe(t,Vs),oo(e,2))})),cs=Gn((function(t){var e=Jo(t);return e="function"==typeof e?e:i,di(Oe(t,Vs),i,e)})),us=Gn(ns),fs=Gn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,is(t,r)}));function ls(t){var e=Lr(t);return e.__chain__=!0,e}function ds(t,e){return e(t)}var hs=Qi((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return nn(e,t)};return!(e>1||this.__actions__.length)&&n instanceof qr&&go(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:ds,args:[o],thisArg:i}),new Dr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ps=Oi((function(t,e,r){Tt.call(t,r)?++t[r]:rn(t,r,1)})),bs=Ci(zo),gs=Ci($o);function ys(t,e){return($s(t)?Me:fn)(t,oo(e,3))}function ms(t,e){return($s(t)?xe:ln)(t,oo(e,3))}var vs=Oi((function(t,e,r){Tt.call(t,r)?t[r].push(e):rn(t,r,[e])})),ws=Gn((function(t,e,r){var i=-1,o="function"==typeof e,s=Hs(t)?n(t.length):[];return fn(t,(function(t){s[++i]=o?Ae(e,t,r):On(t,e,r)})),s})),_s=Oi((function(t,e,r){rn(t,r,e)}));function Ss(t,e){return($s(t)?Pe:jn)(t,oo(e,3))}var As=Oi((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),Es=Gn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&yo(t,e[0],e[1])?e=[]:r>2&&yo(e[0],e[1],e[2])&&(e=[e[0]]),qn(t,bn(e,1),[])})),Ms=ue||function(){return le.Date.now()};function xs(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,Ki(t,u,i,i,i,i,e)}function Rs(t,e){var r;if("function"!=typeof e)throw new Rt(o);return t=ha(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Os=Gn((function(t,e,r){var n=1;if(r.length){var i=sr(r,io(Os));n|=c}return Ki(t,n,e,r,i)})),Is=Gn((function(t,e,r){var n=3;if(r.length){var i=sr(r,io(Is));n|=c}return Ki(e,n,t,r,i)}));function ks(t,e,r){var n,s,a,c,u,f,l=0,d=!1,h=!1,p=!0;if("function"!=typeof t)throw new Rt(o);function b(e){var r=n,o=s;return n=s=i,l=e,c=t.apply(o,r)}function g(t){var r=t-f;return f===i||r>=e||r<0||h&&t-l>=a}function y(){var t=Ms();if(g(t))return m(t);u=Oo(y,function(t){var r=e-(t-f);return h?gr(r,a-(t-l)):r}(t))}function m(t){return u=i,p&&n?b(t):(n=s=i,c)}function v(){var t=Ms(),r=g(t);if(n=arguments,s=this,f=t,r){if(u===i)return function(t){return l=t,u=Oo(y,e),d?b(t):c}(f);if(h)return vi(u),u=Oo(y,e),b(f)}return u===i&&(u=Oo(y,e)),c}return e=ba(e)||0,Qs(r)&&(d=!!r.leading,a=(h="maxWait"in r)?br(ba(r.maxWait)||0,e):a,p="trailing"in r?!!r.trailing:p),v.cancel=function(){u!==i&&vi(u),l=0,n=f=s=u=i},v.flush=function(){return u===i?c:m(Ms())},v}var Ps=Gn((function(t,e){return cn(t,1,e)})),Ns=Gn((function(t,e,r){return cn(t,ba(e)||0,r)}));function Ts(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Rt(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Ts.Cache||Wr),r}function Bs(t){if("function"!=typeof t)throw new Rt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ts.Cache=Wr;var Cs=yi((function(t,e){var r=(e=1==e.length&&$s(e[0])?Pe(e[0],Je(oo())):Pe(bn(e,1),Je(oo()))).length;return Gn((function(n){for(var i=-1,o=gr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return Ae(t,this,n)}))})),js=Gn((function(t,e){var r=sr(e,io(js));return Ki(t,c,i,e,r)})),Ls=Gn((function(t,e){var r=sr(e,io(Ls));return Ki(t,64,i,e,r)})),Fs=Qi((function(t,e){return Ki(t,256,i,i,i,e)}));function Us(t,e){return t===e||t!=t&&e!=e}var Ds=$i(En),qs=$i((function(t,e){return t>=e})),zs=In(function(){return arguments}())?In:function(t){return ta(t)&&Tt.call(t,"callee")&&!Vt.call(t,"callee")},$s=n.isArray,Ws=ye?Je(ye):function(t){return ta(t)&&An(t)==P};function Hs(t){return null!=t&&Xs(t.length)&&!Ys(t)}function Vs(t){return ta(t)&&Hs(t)}var Gs=ge||bc,Ks=me?Je(me):function(t){return ta(t)&&An(t)==m};function Js(t){if(!ta(t))return!1;var e=An(t);return e==v||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!na(t)}function Ys(t){if(!Qs(t))return!1;var e=An(t);return e==w||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Zs(t){return"number"==typeof t&&t==ha(t)}function Xs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Qs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=ve?Je(ve):function(t){return ta(t)&&lo(t)==S};function ra(t){return"number"==typeof t||ta(t)&&An(t)==A}function na(t){if(!ta(t)||An(t)!=E)return!1;var e=Wt(t);if(null===e)return!0;var r=Tt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Nt.call(r)==Lt}var ia=we?Je(we):function(t){return ta(t)&&An(t)==x},oa=_e?Je(_e):function(t){return ta(t)&&lo(t)==R};function sa(t){return"string"==typeof t||!$s(t)&&ta(t)&&An(t)==O}function aa(t){return"symbol"==typeof t||ta(t)&&An(t)==I}var ca=Se?Je(Se):function(t){return ta(t)&&Xs(t.length)&&!!ie[An(t)]},ua=$i(Cn),fa=$i((function(t,e){return t<=e}));function la(t){if(!t)return[];if(Hs(t))return sa(t)?fr(t):xi(t);if(Jt&&t[Jt])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Jt]());var e=lo(t);return(e==S?ir:e==R?ar:Ua)(t)}function da(t){return t?(t=ba(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ha(t){var e=da(t),r=e%1;return e==e?r?e-r:e:0}function pa(t){return t?on(ha(t),0,h):0}function ba(t){if("number"==typeof t)return t;if(aa(t))return d;if(Qs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Qs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var r=pt.test(t);return r||gt.test(t)?ce(t.slice(2),r?2:8):ht.test(t)?d:+t}function ga(t){return Ri(t,Pa(t))}function ya(t){return null==t?"":si(t)}var ma=Ii((function(t,e){if(_o(e)||Hs(e))Ri(e,ka(e),t);else for(var r in e)Tt.call(e,r)&&Xr(t,r,e[r])})),va=Ii((function(t,e){Ri(e,Pa(e),t)})),wa=Ii((function(t,e,r,n){Ri(e,Pa(e),t,n)})),_a=Ii((function(t,e,r,n){Ri(e,ka(e),t,n)})),Sa=Qi(nn),Aa=Gn((function(t,e){t=Et(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&yo(e[0],e[1],o)&&(n=1);++r<n;)for(var s=e[r],a=Pa(s),c=-1,u=a.length;++c<u;){var f=a[c],l=t[f];(l===i||Us(l,kt[f])&&!Tt.call(t,f))&&(t[f]=s[f])}return t})),Ea=Gn((function(t){return t.push(i,Yi),Ae(Ta,i,t)}));function Ma(t,e,r){var n=null==t?i:_n(t,e);return n===i?r:n}function xa(t,e){return null!=t&&ho(t,e,xn)}var Ra=Fi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=r}),Qa(rc)),Oa=Fi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),Tt.call(t,e)?t[e].push(r):t[e]=[r]}),oo),Ia=Gn(On);function ka(t){return Hs(t)?Gr(t):Bn(t)}function Pa(t){return Hs(t)?Gr(t,!0):function(t){if(!Qs(t))return function(t){var e=[];if(null!=t)for(var r in Et(t))e.push(r);return e}(t);var e=_o(t),r=[];for(var n in t)("constructor"!=n||!e&&Tt.call(t,n))&&r.push(n);return r}(t)}var Na=Ii((function(t,e,r){Un(t,e,r)})),Ta=Ii((function(t,e,r,n){Un(t,e,r,n)})),Ba=Qi((function(t,e){var r={};if(null==t)return r;var n=!1;e=Pe(e,(function(e){return e=gi(e,t),n||(n=e.length>1),e})),Ri(t,eo(t),r),n&&(r=sn(r,7,Zi));for(var i=e.length;i--;)ci(r,e[i]);return r})),Ca=Qi((function(t,e){return null==t?{}:function(t,e){return zn(t,e,(function(e,r){return xa(t,r)}))}(t,e)}));function ja(t,e){if(null==t)return{};var r=Pe(eo(t),(function(t){return[t]}));return e=oo(e),zn(t,r,(function(t,r){return e(t,r[0])}))}var La=Gi(ka),Fa=Gi(Pa);function Ua(t){return null==t?[]:Ye(t,ka(t))}var Da=Ti((function(t,e,r){return e=e.toLowerCase(),t+(r?qa(e):e)}));function qa(t){return Ja(ya(t).toLowerCase())}function za(t){return(t=ya(t))&&t.replace(mt,tr).replace(Zt,"")}var $a=Ti((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Wa=Ti((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Ha=Ni("toLowerCase"),Va=Ti((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Ga=Ti((function(t,e,r){return t+(r?" ":"")+Ja(e)})),Ka=Ti((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Ja=Ni("toUpperCase");function Ya(t,e,r){return t=ya(t),(e=r?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(e)||[]}var Za=Gn((function(t,e){try{return Ae(t,i,e)}catch(t){return Js(t)?t:new _t(t)}})),Xa=Qi((function(t,e){return Me(e,(function(e){e=jo(e),rn(t,e,Os(t[e],t))})),t}));function Qa(t){return function(){return t}}var tc=ji(),ec=ji(!0);function rc(t){return t}function nc(t){return Tn("function"==typeof t?t:sn(t,1))}var ic=Gn((function(t,e){return function(r){return On(r,t,e)}})),oc=Gn((function(t,e){return function(r){return On(t,r,e)}}));function sc(t,e,r){var n=ka(e),i=wn(e,n);null!=r||Qs(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=wn(e,ka(e)));var o=!(Qs(r)&&"chain"in r&&!r.chain),s=Ys(t);return Me(i,(function(r){var n=e[r];t[r]=n,s&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__);return(r.__actions__=xi(this.__actions__)).push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,Ne([this.value()],arguments))})})),t}function ac(){}var cc=Di(Pe),uc=Di(Re),fc=Di(Ce);function lc(t){return mo(t)?$e(jo(t)):function(t){return function(e){return _n(e,t)}}(t)}var dc=zi(),hc=zi(!0);function pc(){return[]}function bc(){return!1}var gc,yc=Ui((function(t,e){return t+e}),0),mc=Hi("ceil"),vc=Ui((function(t,e){return t/e}),1),wc=Hi("floor"),_c=Ui((function(t,e){return t*e}),1),Sc=Hi("round"),Ac=Ui((function(t,e){return t-e}),0);return Lr.after=function(t,e){if("function"!=typeof e)throw new Rt(o);return t=ha(t),function(){if(--t<1)return e.apply(this,arguments)}},Lr.ary=xs,Lr.assign=ma,Lr.assignIn=va,Lr.assignInWith=wa,Lr.assignWith=_a,Lr.at=Sa,Lr.before=Rs,Lr.bind=Os,Lr.bindAll=Xa,Lr.bindKey=Is,Lr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return $s(t)?t:[t]},Lr.chain=ls,Lr.chunk=function(t,e,r){e=(r?yo(t,e,r):e===i)?1:br(ha(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,c=n(de(o/e));s<o;)c[a++]=ti(t,s,s+=e);return c},Lr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},Lr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Ne($s(r)?xi(r):[r],bn(e,1))},Lr.cond=function(t){var e=null==t?0:t.length,r=oo();return t=e?Pe(t,(function(t){if("function"!=typeof t[1])throw new Rt(o);return[r(t[0]),t[1]]})):[],Gn((function(r){for(var n=-1;++n<e;){var i=t[n];if(Ae(i[0],this,r))return Ae(i[1],this,r)}}))},Lr.conforms=function(t){return function(t){var e=ka(t);return function(r){return an(r,t,e)}}(sn(t,1))},Lr.constant=Qa,Lr.countBy=ps,Lr.create=function(t,e){var r=Fr(t);return null==e?r:en(r,e)},Lr.curry=function t(e,r,n){var o=Ki(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Lr.curryRight=function t(e,r,n){var o=Ki(e,16,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Lr.debounce=ks,Lr.defaults=Aa,Lr.defaultsDeep=Ea,Lr.defer=Ps,Lr.delay=Ns,Lr.difference=Uo,Lr.differenceBy=Do,Lr.differenceWith=qo,Lr.drop=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,(e=r||e===i?1:ha(e))<0?0:e,n):[]},Lr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,0,(e=n-(e=r||e===i?1:ha(e)))<0?0:e):[]},Lr.dropRightWhile=function(t,e){return t&&t.length?fi(t,oo(e,3),!0,!0):[]},Lr.dropWhile=function(t,e){return t&&t.length?fi(t,oo(e,3),!0):[]},Lr.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&yo(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=ha(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ha(n))<0&&(n+=o),n=r>n?0:pa(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Lr.filter=function(t,e){return($s(t)?Oe:pn)(t,oo(e,3))},Lr.flatMap=function(t,e){return bn(Ss(t,e),1)},Lr.flatMapDeep=function(t,e){return bn(Ss(t,e),f)},Lr.flatMapDepth=function(t,e,r){return r=r===i?1:ha(r),bn(Ss(t,e),r)},Lr.flatten=Wo,Lr.flattenDeep=function(t){return null!=t&&t.length?bn(t,f):[]},Lr.flattenDepth=function(t,e){return null!=t&&t.length?bn(t,e=e===i?1:ha(e)):[]},Lr.flip=function(t){return Ki(t,512)},Lr.flow=tc,Lr.flowRight=ec,Lr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},Lr.functions=function(t){return null==t?[]:wn(t,ka(t))},Lr.functionsIn=function(t){return null==t?[]:wn(t,Pa(t))},Lr.groupBy=vs,Lr.initial=function(t){return null!=t&&t.length?ti(t,0,-1):[]},Lr.intersection=Vo,Lr.intersectionBy=Go,Lr.intersectionWith=Ko,Lr.invert=Ra,Lr.invertBy=Oa,Lr.invokeMap=ws,Lr.iteratee=nc,Lr.keyBy=_s,Lr.keys=ka,Lr.keysIn=Pa,Lr.map=Ss,Lr.mapKeys=function(t,e){var r={};return e=oo(e,3),mn(t,(function(t,n,i){rn(r,e(t,n,i),t)})),r},Lr.mapValues=function(t,e){var r={};return e=oo(e,3),mn(t,(function(t,n,i){rn(r,n,e(t,n,i))})),r},Lr.matches=function(t){return Ln(sn(t,1))},Lr.matchesProperty=function(t,e){return Fn(t,sn(e,1))},Lr.memoize=Ts,Lr.merge=Na,Lr.mergeWith=Ta,Lr.method=ic,Lr.methodOf=oc,Lr.mixin=sc,Lr.negate=Bs,Lr.nthArg=function(t){return t=ha(t),Gn((function(e){return Dn(e,t)}))},Lr.omit=Ba,Lr.omitBy=function(t,e){return ja(t,Bs(oo(e)))},Lr.once=function(t){return Rs(2,t)},Lr.orderBy=function(t,e,r,n){return null==t?[]:($s(e)||(e=null==e?[]:[e]),$s(r=n?i:r)||(r=null==r?[]:[r]),qn(t,e,r))},Lr.over=cc,Lr.overArgs=Cs,Lr.overEvery=uc,Lr.overSome=fc,Lr.partial=js,Lr.partialRight=Ls,Lr.partition=As,Lr.pick=Ca,Lr.pickBy=ja,Lr.property=lc,Lr.propertyOf=function(t){return function(e){return null==t?i:_n(t,e)}},Lr.pull=Yo,Lr.pullAll=Zo,Lr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?$n(t,e,oo(r,2)):t},Lr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?$n(t,e,i,r):t},Lr.pullAt=Xo,Lr.range=dc,Lr.rangeRight=hc,Lr.rearg=Fs,Lr.reject=function(t,e){return($s(t)?Oe:pn)(t,Bs(oo(e,3)))},Lr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=oo(e,3);++n<o;){var s=t[n];e(s,n,t)&&(r.push(s),i.push(n))}return Wn(t,i),r},Lr.rest=function(t,e){if("function"!=typeof t)throw new Rt(o);return Gn(t,e=e===i?e:ha(e))},Lr.reverse=Qo,Lr.sampleSize=function(t,e,r){return e=(r?yo(t,e,r):e===i)?1:ha(e),($s(t)?Jr:Jn)(t,e)},Lr.set=function(t,e,r){return null==t?t:Yn(t,e,r)},Lr.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:Yn(t,e,r,n)},Lr.shuffle=function(t){return($s(t)?Yr:Qn)(t)},Lr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&yo(t,e,r)?(e=0,r=n):(e=null==e?0:ha(e),r=r===i?n:ha(r)),ti(t,e,r)):[]},Lr.sortBy=Es,Lr.sortedUniq=function(t){return t&&t.length?ii(t):[]},Lr.sortedUniqBy=function(t,e){return t&&t.length?ii(t,oo(e,2)):[]},Lr.split=function(t,e,r){return r&&"number"!=typeof r&&yo(t,e,r)&&(e=r=i),(r=r===i?h:r>>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!ia(e))&&!(e=si(e))&&nr(t)?mi(fr(t),0,r):t.split(e,r):[]},Lr.spread=function(t,e){if("function"!=typeof t)throw new Rt(o);return e=null==e?0:br(ha(e),0),Gn((function(r){var n=r[e],i=mi(r,0,e);return n&&Ne(i,n),Ae(t,this,i)}))},Lr.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},Lr.take=function(t,e,r){return t&&t.length?ti(t,0,(e=r||e===i?1:ha(e))<0?0:e):[]},Lr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,(e=n-(e=r||e===i?1:ha(e)))<0?0:e,n):[]},Lr.takeRightWhile=function(t,e){return t&&t.length?fi(t,oo(e,3),!1,!0):[]},Lr.takeWhile=function(t,e){return t&&t.length?fi(t,oo(e,3)):[]},Lr.tap=function(t,e){return e(t),t},Lr.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new Rt(o);return Qs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ks(t,e,{leading:n,maxWait:e,trailing:i})},Lr.thru=ds,Lr.toArray=la,Lr.toPairs=La,Lr.toPairsIn=Fa,Lr.toPath=function(t){return $s(t)?Pe(t,jo):aa(t)?[t]:xi(Co(ya(t)))},Lr.toPlainObject=ga,Lr.transform=function(t,e,r){var n=$s(t),i=n||Gs(t)||ca(t);if(e=oo(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:Qs(t)&&Ys(o)?Fr(Wt(t)):{}}return(i?Me:mn)(t,(function(t,n,i){return e(r,t,n,i)})),r},Lr.unary=function(t){return xs(t,1)},Lr.union=ts,Lr.unionBy=es,Lr.unionWith=rs,Lr.uniq=function(t){return t&&t.length?ai(t):[]},Lr.uniqBy=function(t,e){return t&&t.length?ai(t,oo(e,2)):[]},Lr.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ai(t,i,e):[]},Lr.unset=function(t,e){return null==t||ci(t,e)},Lr.unzip=ns,Lr.unzipWith=is,Lr.update=function(t,e,r){return null==t?t:ui(t,e,bi(r))},Lr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:ui(t,e,bi(r),n)},Lr.values=Ua,Lr.valuesIn=function(t){return null==t?[]:Ye(t,Pa(t))},Lr.without=os,Lr.words=Ya,Lr.wrap=function(t,e){return js(bi(e),t)},Lr.xor=ss,Lr.xorBy=as,Lr.xorWith=cs,Lr.zip=us,Lr.zipObject=function(t,e){return hi(t||[],e||[],Xr)},Lr.zipObjectDeep=function(t,e){return hi(t||[],e||[],Yn)},Lr.zipWith=fs,Lr.entries=La,Lr.entriesIn=Fa,Lr.extend=va,Lr.extendWith=wa,sc(Lr,Lr),Lr.add=yc,Lr.attempt=Za,Lr.camelCase=Da,Lr.capitalize=qa,Lr.ceil=mc,Lr.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=ba(r))==r?r:0),e!==i&&(e=(e=ba(e))==e?e:0),on(ba(t),e,r)},Lr.clone=function(t){return sn(t,4)},Lr.cloneDeep=function(t){return sn(t,5)},Lr.cloneDeepWith=function(t,e){return sn(t,5,e="function"==typeof e?e:i)},Lr.cloneWith=function(t,e){return sn(t,4,e="function"==typeof e?e:i)},Lr.conformsTo=function(t,e){return null==e||an(t,e,ka(e))},Lr.deburr=za,Lr.defaultTo=function(t,e){return null==t||t!=t?e:t},Lr.divide=vc,Lr.endsWith=function(t,e,r){t=ya(t),e=si(e);var n=t.length,o=r=r===i?n:on(ha(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},Lr.eq=Us,Lr.escape=function(t){return(t=ya(t))&&K.test(t)?t.replace(V,er):t},Lr.escapeRegExp=function(t){return(t=ya(t))&&rt.test(t)?t.replace(et,"\\$&"):t},Lr.every=function(t,e,r){var n=$s(t)?Re:dn;return r&&yo(t,e,r)&&(e=i),n(t,oo(e,3))},Lr.find=bs,Lr.findIndex=zo,Lr.findKey=function(t,e){return Le(t,oo(e,3),mn)},Lr.findLast=gs,Lr.findLastIndex=$o,Lr.findLastKey=function(t,e){return Le(t,oo(e,3),vn)},Lr.floor=wc,Lr.forEach=ys,Lr.forEachRight=ms,Lr.forIn=function(t,e){return null==t?t:gn(t,oo(e,3),Pa)},Lr.forInRight=function(t,e){return null==t?t:yn(t,oo(e,3),Pa)},Lr.forOwn=function(t,e){return t&&mn(t,oo(e,3))},Lr.forOwnRight=function(t,e){return t&&vn(t,oo(e,3))},Lr.get=Ma,Lr.gt=Ds,Lr.gte=qs,Lr.has=function(t,e){return null!=t&&ho(t,e,Mn)},Lr.hasIn=xa,Lr.head=Ho,Lr.identity=rc,Lr.includes=function(t,e,r,n){t=Hs(t)?t:Ua(t),r=r&&!n?ha(r):0;var i=t.length;return r<0&&(r=br(i+r,0)),sa(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Ue(t,e,r)>-1},Lr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:ha(r);return i<0&&(i=br(n+i,0)),Ue(t,e,i)},Lr.inRange=function(t,e,r){return e=da(e),r===i?(r=e,e=0):r=da(r),function(t,e,r){return t>=gr(e,r)&&t<br(e,r)}(t=ba(t),e,r)},Lr.invoke=Ia,Lr.isArguments=zs,Lr.isArray=$s,Lr.isArrayBuffer=Ws,Lr.isArrayLike=Hs,Lr.isArrayLikeObject=Vs,Lr.isBoolean=function(t){return!0===t||!1===t||ta(t)&&An(t)==y},Lr.isBuffer=Gs,Lr.isDate=Ks,Lr.isElement=function(t){return ta(t)&&1===t.nodeType&&!na(t)},Lr.isEmpty=function(t){if(null==t)return!0;if(Hs(t)&&($s(t)||"string"==typeof t||"function"==typeof t.splice||Gs(t)||ca(t)||zs(t)))return!t.length;var e=lo(t);if(e==S||e==R)return!t.size;if(_o(t))return!Bn(t).length;for(var r in t)if(Tt.call(t,r))return!1;return!0},Lr.isEqual=function(t,e){return kn(t,e)},Lr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?kn(t,e,i,r):!!n},Lr.isError=Js,Lr.isFinite=function(t){return"number"==typeof t&&je(t)},Lr.isFunction=Ys,Lr.isInteger=Zs,Lr.isLength=Xs,Lr.isMap=ea,Lr.isMatch=function(t,e){return t===e||Pn(t,e,ao(e))},Lr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,Pn(t,e,ao(e),r)},Lr.isNaN=function(t){return ra(t)&&t!=+t},Lr.isNative=function(t){if(wo(t))throw new _t("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nn(t)},Lr.isNil=function(t){return null==t},Lr.isNull=function(t){return null===t},Lr.isNumber=ra,Lr.isObject=Qs,Lr.isObjectLike=ta,Lr.isPlainObject=na,Lr.isRegExp=ia,Lr.isSafeInteger=function(t){return Zs(t)&&t>=-9007199254740991&&t<=l},Lr.isSet=oa,Lr.isString=sa,Lr.isSymbol=aa,Lr.isTypedArray=ca,Lr.isUndefined=function(t){return t===i},Lr.isWeakMap=function(t){return ta(t)&&lo(t)==k},Lr.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==An(t)},Lr.join=function(t,e){return null==t?"":We.call(t,e)},Lr.kebabCase=$a,Lr.last=Jo,Lr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ha(r))<0?br(n+o,0):gr(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Fe(t,qe,o,!0)},Lr.lowerCase=Wa,Lr.lowerFirst=Ha,Lr.lt=ua,Lr.lte=fa,Lr.max=function(t){return t&&t.length?hn(t,rc,En):i},Lr.maxBy=function(t,e){return t&&t.length?hn(t,oo(e,2),En):i},Lr.mean=function(t){return ze(t,rc)},Lr.meanBy=function(t,e){return ze(t,oo(e,2))},Lr.min=function(t){return t&&t.length?hn(t,rc,Cn):i},Lr.minBy=function(t,e){return t&&t.length?hn(t,oo(e,2),Cn):i},Lr.stubArray=pc,Lr.stubFalse=bc,Lr.stubObject=function(){return{}},Lr.stubString=function(){return""},Lr.stubTrue=function(){return!0},Lr.multiply=_c,Lr.nth=function(t,e){return t&&t.length?Dn(t,ha(e)):i},Lr.noConflict=function(){return le._===this&&(le._=Ft),this},Lr.noop=ac,Lr.now=Ms,Lr.pad=function(t,e,r){t=ya(t);var n=(e=ha(e))?ur(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return qi(he(i),r)+t+qi(de(i),r)},Lr.padEnd=function(t,e,r){t=ya(t);var n=(e=ha(e))?ur(t):0;return e&&n<e?t+qi(e-n,r):t},Lr.padStart=function(t,e,r){t=ya(t);var n=(e=ha(e))?ur(t):0;return e&&n<e?qi(e-n,r)+t:t},Lr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),mr(ya(t).replace(nt,""),e||0)},Lr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&yo(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=da(t),e===i?(e=t,t=0):e=da(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=vr();return gr(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return Hn(t,e)},Lr.reduce=function(t,e,r){var n=$s(t)?Te:He,i=arguments.length<3;return n(t,oo(e,4),r,i,fn)},Lr.reduceRight=function(t,e,r){var n=$s(t)?Be:He,i=arguments.length<3;return n(t,oo(e,4),r,i,ln)},Lr.repeat=function(t,e,r){return e=(r?yo(t,e,r):e===i)?1:ha(e),Vn(ya(t),e)},Lr.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Lr.result=function(t,e,r){var n=-1,o=(e=gi(e,t)).length;for(o||(o=1,t=i);++n<o;){var s=null==t?i:t[jo(e[n])];s===i&&(n=o,s=r),t=Ys(s)?s.call(t):s}return t},Lr.round=Sc,Lr.runInContext=t,Lr.sample=function(t){return($s(t)?Kr:Kn)(t)},Lr.size=function(t){if(null==t)return 0;if(Hs(t))return sa(t)?ur(t):t.length;var e=lo(t);return e==S||e==R?t.size:Bn(t).length},Lr.snakeCase=Va,Lr.some=function(t,e,r){var n=$s(t)?Ce:ei;return r&&yo(t,e,r)&&(e=i),n(t,oo(e,3))},Lr.sortedIndex=function(t,e){return ri(t,e)},Lr.sortedIndexBy=function(t,e,r){return ni(t,e,oo(r,2))},Lr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ri(t,e);if(n<r&&Us(t[n],e))return n}return-1},Lr.sortedLastIndex=function(t,e){return ri(t,e,!0)},Lr.sortedLastIndexBy=function(t,e,r){return ni(t,e,oo(r,2),!0)},Lr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=ri(t,e,!0)-1;if(Us(t[r],e))return r}return-1},Lr.startCase=Ga,Lr.startsWith=function(t,e,r){return t=ya(t),r=null==r?0:on(ha(r),0,t.length),e=si(e),t.slice(r,r+e.length)==e},Lr.subtract=Ac,Lr.sum=function(t){return t&&t.length?Ve(t,rc):0},Lr.sumBy=function(t,e){return t&&t.length?Ve(t,oo(e,2)):0},Lr.template=function(t,e,r){var n=Lr.templateSettings;r&&yo(t,e,r)&&(e=i),t=ya(t),e=wa({},e,n,Ji);var o,s,a=wa({},e.imports,n.imports,Ji),c=ka(a),u=Ye(a,c),f=0,l=e.interpolate||vt,d="__p += '",h=Mt((e.escape||vt).source+"|"+l.source+"|"+(l===Z?lt:vt).source+"|"+(e.evaluate||vt).source+"|$","g"),p="//# sourceURL="+(Tt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ne+"]")+"\n";t.replace(h,(function(e,r,n,i,a,c){return n||(n=i),d+=t.slice(f,c).replace(wt,rr),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),f=c+e.length,e})),d+="';\n";var b=Tt.call(e,"variable")&&e.variable;if(b){if(ut.test(b))throw new _t("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(z,""):d).replace($,"$1").replace(W,"$1;"),d="function("+(b||"obj")+") {\n"+(b?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Za((function(){return St(c,p+"return "+d).apply(i,u)}));if(g.source=d,Js(g))throw g;return g},Lr.times=function(t,e){if((t=ha(t))<1||t>l)return[];var r=h,n=gr(t,h);e=oo(e),t-=h;for(var i=Ge(n,e);++r<t;)e(r);return i},Lr.toFinite=da,Lr.toInteger=ha,Lr.toLength=pa,Lr.toLower=function(t){return ya(t).toLowerCase()},Lr.toNumber=ba,Lr.toSafeInteger=function(t){return t?on(ha(t),-9007199254740991,l):0===t?t:0},Lr.toString=ya,Lr.toUpper=function(t){return ya(t).toUpperCase()},Lr.trim=function(t,e,r){if((t=ya(t))&&(r||e===i))return Ke(t);if(!t||!(e=si(e)))return t;var n=fr(t),o=fr(e);return mi(n,Xe(n,o),Qe(n,o)+1).join("")},Lr.trimEnd=function(t,e,r){if((t=ya(t))&&(r||e===i))return t.slice(0,lr(t)+1);if(!t||!(e=si(e)))return t;var n=fr(t);return mi(n,0,Qe(n,fr(e))+1).join("")},Lr.trimStart=function(t,e,r){if((t=ya(t))&&(r||e===i))return t.replace(nt,"");if(!t||!(e=si(e)))return t;var n=fr(t);return mi(n,Xe(n,fr(e))).join("")},Lr.truncate=function(t,e){var r=30,n="...";if(Qs(e)){var o="separator"in e?e.separator:o;r="length"in e?ha(e.length):r,n="omission"in e?si(e.omission):n}var s=(t=ya(t)).length;if(nr(t)){var a=fr(t);s=a.length}if(r>=s)return t;var c=r-ur(n);if(c<1)return n;var u=a?mi(a,0,c).join(""):t.slice(0,c);if(o===i)return u+n;if(a&&(c+=u.length-c),ia(o)){if(t.slice(c).search(o)){var f,l=u;for(o.global||(o=Mt(o.source,ya(dt.exec(o))+"g")),o.lastIndex=0;f=o.exec(l);)var d=f.index;u=u.slice(0,d===i?c:d)}}else if(t.indexOf(si(o),c)!=c){var h=u.lastIndexOf(o);h>-1&&(u=u.slice(0,h))}return u+n},Lr.unescape=function(t){return(t=ya(t))&&G.test(t)?t.replace(H,dr):t},Lr.uniqueId=function(t){var e=++Bt;return ya(t)+e},Lr.upperCase=Ka,Lr.upperFirst=Ja,Lr.each=ys,Lr.eachRight=ms,Lr.first=Ho,sc(Lr,(gc={},mn(Lr,(function(t,e){Tt.call(Lr.prototype,e)||(gc[e]=t)})),gc),{chain:!1}),Lr.VERSION="4.17.21",Me(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Lr[t].placeholder=Lr})),Me(["drop","take"],(function(t,e){qr.prototype[t]=function(r){r=r===i?1:br(ha(r),0);var n=this.__filtered__&&!e?new qr(this):this.clone();return n.__filtered__?n.__takeCount__=gr(r,n.__takeCount__):n.__views__.push({size:gr(r,h),type:t+(n.__dir__<0?"Right":"")}),n},qr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Me(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;qr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),Me(["head","last"],(function(t,e){var r="take"+(e?"Right":"");qr.prototype[t]=function(){return this[r](1).value()[0]}})),Me(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");qr.prototype[t]=function(){return this.__filtered__?new qr(this):this[r](1)}})),qr.prototype.compact=function(){return this.filter(rc)},qr.prototype.find=function(t){return this.filter(t).head()},qr.prototype.findLast=function(t){return this.reverse().find(t)},qr.prototype.invokeMap=Gn((function(t,e){return"function"==typeof t?new qr(this):this.map((function(r){return On(r,t,e)}))})),qr.prototype.reject=function(t){return this.filter(Bs(oo(t)))},qr.prototype.slice=function(t,e){t=ha(t);var r=this;return r.__filtered__&&(t>0||e<0)?new qr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=ha(e))<0?r.dropRight(-e):r.take(e-t)),r)},qr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qr.prototype.toArray=function(){return this.take(h)},mn(qr.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Lr[n?"take"+("last"==e?"Right":""):e],s=n||/^find/.test(e);o&&(Lr.prototype[e]=function(){var e=this.__wrapped__,a=n?[1]:arguments,c=e instanceof qr,u=a[0],f=c||$s(e),l=function(t){var e=o.apply(Lr,Ne([t],a));return n&&d?e[0]:e};f&&r&&"function"==typeof u&&1!=u.length&&(c=f=!1);var d=this.__chain__,h=!!this.__actions__.length,p=s&&!d,b=c&&!h;if(!s&&f){e=b?e:new qr(this);var g=t.apply(e,a);return g.__actions__.push({func:ds,args:[l],thisArg:i}),new Dr(g,d)}return p&&b?t.apply(this,a):(g=this.thru(l),p?n?g.value()[0]:g.value():g)})})),Me(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ot[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Lr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply($s(i)?i:[],t)}return this[r]((function(r){return e.apply($s(r)?r:[],t)}))}})),mn(qr.prototype,(function(t,e){var r=Lr[e];if(r){var n=r.name+"";Tt.call(Or,n)||(Or[n]=[]),Or[n].push({name:e,func:r})}})),Or[Li(i,2).name]=[{name:"wrapper",func:i}],qr.prototype.clone=function(){var t=new qr(this.__wrapped__);return t.__actions__=xi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=xi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=xi(this.__views__),t},qr.prototype.reverse=function(){if(this.__filtered__){var t=new qr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=$s(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=gr(e,t+s);break;case"takeRight":t=br(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=o.start,a=o.end,c=a-s,u=n?a:s-1,f=this.__iteratees__,l=f.length,d=0,h=gr(c,this.__takeCount__);if(!r||!n&&i==c&&h==c)return li(t,this.__actions__);var p=[];t:for(;c--&&d<h;){for(var b=-1,g=t[u+=e];++b<l;){var y=f[b],m=y.iteratee,v=y.type,w=m(g);if(2==v)g=w;else if(!w){if(1==v)continue t;break t}}p[d++]=g}return p},Lr.prototype.at=hs,Lr.prototype.chain=function(){return ls(this)},Lr.prototype.commit=function(){return new Dr(this.value(),this.__chain__)},Lr.prototype.next=function(){this.__values__===i&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Lr.prototype.plant=function(t){for(var e,r=this;r instanceof Ur;){var n=Fo(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},Lr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qr){var e=t;return this.__actions__.length&&(e=new qr(this)),(e=e.reverse()).__actions__.push({func:ds,args:[Qo],thisArg:i}),new Dr(e,this.__chain__)}return this.thru(Qo)},Lr.prototype.toJSON=Lr.prototype.valueOf=Lr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Lr.prototype.first=Lr.prototype.head,Jt&&(Lr.prototype[Jt]=function(){return this}),Lr}();le._=hr,(n=function(){return hr}.call(e,r,e,t))===i||(t.exports=n)}.call(this)},5880:function(t,e,r){var n,i;!function(o,s){"use strict";n=function(){var t=function(){},e="undefined",r=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},o=null;function s(t,e){var r=t[e];if("function"==typeof r.bind)return r.bind(t);try{return Function.prototype.bind.call(r,t)}catch(e){return function(){return Function.prototype.apply.apply(r,[t,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(){for(var r=this.getLevel(),i=0;i<n.length;i++){var o=n[i];this[o]=i<r?t:this.methodFactory(o,r,this.name)}if(this.log=this.debug,typeof console===e&&r<this.levels.SILENT)return"No console available for logging"}function u(t){return function(){typeof console!==e&&(c.call(this),this[t].apply(this,arguments))}}function f(n,i,o){return function(n){return"debug"===n&&(n="log"),typeof console!==e&&("trace"===n&&r?a:void 0!==console[n]?s(console,n):void 0!==console.log?s(console,"log"):t)}(n)||u.apply(this,arguments)}function l(t,r){var s,a,u,l=this,d="loglevel";function h(){var t;if(typeof window!==e&&d){try{t=window.localStorage[d]}catch(t){}if(typeof t===e)try{var r=window.document.cookie,n=encodeURIComponent(d),i=r.indexOf(n+"=");-1!==i&&(t=/^([^;]+)/.exec(r.slice(i+n.length+1))[1])}catch(t){}return void 0===l.levels[t]&&(t=void 0),t}}function p(t){var e=t;if("string"==typeof e&&void 0!==l.levels[e.toUpperCase()]&&(e=l.levels[e.toUpperCase()]),"number"==typeof e&&e>=0&&e<=l.levels.SILENT)return e;throw new TypeError("log.setLevel() called with invalid level: "+t)}"string"==typeof t?d+=":"+t:"symbol"==typeof t&&(d=void 0),l.name=t,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=r||f,l.getLevel=function(){return null!=u?u:null!=a?a:s},l.setLevel=function(t,r){return u=p(t),!1!==r&&function(t){var r=(n[t]||"silent").toUpperCase();if(typeof window!==e&&d){try{return void(window.localStorage[d]=r)}catch(t){}try{window.document.cookie=encodeURIComponent(d)+"="+r+";"}catch(t){}}}(u),c.call(l)},l.setDefaultLevel=function(t){a=p(t),h()||l.setLevel(t,!1)},l.resetLevel=function(){u=null,function(){if(typeof window!==e&&d){try{window.localStorage.removeItem(d)}catch(t){}try{window.document.cookie=encodeURIComponent(d)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}(),c.call(l)},l.enableAll=function(t){l.setLevel(l.levels.TRACE,t)},l.disableAll=function(t){l.setLevel(l.levels.SILENT,t)},l.rebuild=function(){if(o!==l&&(s=p(o.getLevel())),c.call(l),o===l)for(var t in i)i[t].rebuild()},s=p(o?o.getLevel():"WARN");var b=h();null!=b&&(u=p(b)),c.call(l)}(o=new l).getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=i[t];return e||(e=i[t]=new l(t,o.methodFactory)),e};var d=typeof window!==e?window.log:void 0;return o.noConflict=function(){return typeof window!==e&&window.log===o&&(window.log=d),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i=n.call(e,r,e,t))||(t.exports=i)}()},7784:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},9042:(t,e)=>{"use strict";var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16));else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},8160:(t,e,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(968),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),u=a.call((function(){}),"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!d["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=s(t),a=e&&"[object String]"===o.call(t),d=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=u&&r;if(a&&t.length>0&&!i.call(t,0))for(var b=0;b<t.length;++b)d.push(String(b));if(n&&t.length>0)for(var g=0;g<t.length;++g)d.push(String(g));else for(var y in t)p&&"prototype"===y||!i.call(t,y)||d.push(String(y));if(c)for(var m=function(t){if("undefined"==typeof window||!h)return l(t);try{return l(t)}catch(t){return!1}}(t),v=0;v<f.length;++v)m&&"constructor"===f[v]||!i.call(t,f[v])||d.push(f[v]);return d}}t.exports=n},9228:(t,e,r)=>{"use strict";var n=Array.prototype.slice,i=r(968),o=Object.keys,s=o?function(t){return o(t)}:r(8160),a=Object.keys;s.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?a(n.call(t)):a(t)})}else Object.keys=s;return Object.keys||s},t.exports=s},968:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},3358:(t,e,r)=>{var n=r(7086);function i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function o(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}t.exports=n(i),t.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},9907:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a,c=[],u=!1,f=-1;function l(){u&&a&&(u=!1,a.length?c=a.concat(c):f=-1,c.length&&d())}function d(){if(!u){var t=s(l);u=!0;for(var e=c.length;e;){for(a=c,c=[];++f<e;)a&&a[f].run();f=-1,e=c.length}a=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new h(t,e)),1!==c.length||u||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},2720:(t,e,r)=>{var n=r(9907),i=r(3358),o=r(1822),s=r(9467),a=function(){},c=/^v?\.0/.test(n.version),u=function(t){return"function"==typeof t},f=function(t){t()},l=function(t,e){return t.pipe(e)};t.exports=function(){var t,e=Array.prototype.slice.call(arguments),r=u(e[e.length-1]||a)&&e.pop()||a;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var n=e.map((function(l,d){var h=d<e.length-1;return function(t,e,r,n){n=i(n);var f=!1;t.on("close",(function(){f=!0})),o(t,{readable:e,writable:r},(function(t){if(t)return n(t);f=!0,n()}));var l=!1;return function(e){if(!f&&!l)return l=!0,function(t){return!!c&&!!s&&(t instanceof(s.ReadStream||a)||t instanceof(s.WriteStream||a))&&u(t.close)}(t)?t.close(a):function(t){return t.setHeader&&u(t.abort)}(t)?t.abort():u(t.destroy)?t.destroy():void n(e||new Error("stream was destroyed"))}}(l,h,d>0,(function(e){t||(t=e),e&&n.forEach(f),h||(n.forEach(f),r(t))}))}));return e.reduce(l)}},5636:(t,e,r)=>{var n=r(1048),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},6108:(t,e,r)=>{"use strict";var n=r(528),i=r(686),o=r(7239)(),s=r(9336),a=r(3468),c=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||c(e)!==e)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in t&&s){var f=s(t,"length");f&&!f.configurable&&(n=!1),f&&!f.writable&&(u=!1)}return(n||u||!r)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},7086:t=>{t.exports=function t(e,r){if(e&&r)return t(e)(r);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){n[t]=e[t]})),n;function n(){for(var t=new Array(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];var n=e.apply(this,t),i=t[t.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(t){n[t]=i[t]})),n}}},2671:()=>{},8379:()=>{},3553:()=>{},9467:()=>{},183:t=>{"use strict";t.exports={rE:"6.5.5"}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};return(()=>{"use strict";r.r(n),r.d(n,{Web3AuthNoModal:()=>Ws});var t={};r.r(t),r.d(t,{OG:()=>Ge,My:()=>je,bytesToNumberBE:()=>qe,lX:()=>ze,Id:()=>Ve,fg:()=>Ye,qj:()=>He,hexToBytes:()=>De,aY:()=>Be,lq:()=>$e,z:()=>We,Q5:()=>Xe});var e={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}r.r(e),r.d(e,{Decoder:()=>Vi,Encoder:()=>Wi,PacketType:()=>$i,protocol:()=>zi});var c=r(446),u=r(46),f=r(282),l=r.n(f),d=-32e3,h=-32001,p=-32002,b=-32003,g=-32004,y=-32005,m=-32700,v=-32600,w=-32601,_=-32602,S=-32603,A={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};function E(t){return Boolean(t)&&"object"==typeof t&&!Array.isArray(t)}var M=(t,e)=>Object.hasOwnProperty.call(t,e);Error;class x extends TypeError{constructor(t,e){let r;const{message:n,explanation:i,...o}=t,{path:s}=t,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[t,...e()])}}function R(t){return"object"==typeof t&&null!=t}function O(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function I(t,e,r,n){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:i,branch:o}=e,{type:s}=r,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${O(n)}\``}=t;return{value:n,type:s,refinement:a,key:i[i.length-1],path:i,branch:o,...t,message:c}}function*k(t,e,r,n){var i;R(i=t)&&"function"==typeof i[Symbol.iterator]||(t=[t]);for(const i of t){const t=I(i,e,r,n);t&&(yield t)}}function*P(t,e,r={}){const{path:n=[],branch:i=[t],coerce:o=!1,mask:s=!1}=r,a={path:n,branch:i};if(o&&(t=e.coercer(t,a),s&&"type"!==e.type&&R(e.schema)&&R(t)&&!Array.isArray(t)))for(const r in t)void 0===e.schema[r]&&delete t[r];let c="valid";for(const n of e.validator(t,a))n.explanation=r.message,c="not_valid",yield[n,void 0];for(let[u,f,l]of e.entries(t,a)){const e=P(f,l,{path:void 0===u?n:[...n,u],branch:void 0===u?i:[...i,f],coerce:o,mask:s,message:r.message});for(const r of e)r[0]?(c=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):o&&(f=r[1],void 0===u?t=f:t instanceof Map?t.set(u,f):t instanceof Set?t.add(f):R(t)&&(void 0!==f||u in t)&&(t[u]=f))}if("not_valid"!==c)for(const n of e.refiner(t,a))n.explanation=r.message,c="not_refined",yield[n,void 0];"valid"===c&&(yield[void 0,t])}class N{constructor(t){const{type:e,schema:r,validator:n,refiner:i,coercer:o=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=r,this.entries=s,this.coercer=o,this.validator=n?(t,e)=>k(n(t,e),e,this,t):()=>[],this.refiner=i?(t,e)=>k(i(t,e),e,this,t):()=>[]}assert(t,e){return T(t,this,e)}create(t,e){return B(t,this,e)}is(t){return C(t,this)}mask(t,e){return function(t,e,r){const n=j(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(t,this,e)}validate(t,e={}){return j(t,this,e)}}function T(t,e,r){const n=j(t,e,{message:r});if(n[0])throw n[0]}function B(t,e,r){const n=j(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function C(t,e){return!j(t,e)[0]}function j(t,e,r={}){const n=P(t,e,r),i=function(t){const{done:e,value:r}=t.next();return e?void 0:r}(n);return i[0]?[new x(i[0],(function*(){for(const t of n)t[0]&&(yield t[0])})),void 0]:[void 0,i[1]]}function L(t,e){return new N({type:t,schema:null,validator:e})}function F(t){let e;return new N({type:"lazy",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator:(r,n)=>(e??(e=t()),e.validator(r,n)),coercer:(r,n)=>(e??(e=t()),e.coercer(r,n)),refiner:(r,n)=>(e??(e=t()),e.refiner(r,n))})}function U(t){return new N({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${O(t)}`})}function D(t){const e=O(t),r=typeof t;return new N({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?t:null,validator:r=>r===t||`Expected the literal \`${e}\`, but received: ${O(r)}`})}function q(){return L("number",(t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${O(t)}`))}function z(t){const e=t?Object.keys(t):[],r=L("never",(()=>!1));return new N({type:"object",schema:t||null,*entries(n){if(t&&R(n)){const i=new Set(Object.keys(n));for(const r of e)i.delete(r),yield[r,n[r],t[r]];for(const t of i)yield[t,n[t],r]}},validator:t=>R(t)||`Expected an object, but received: ${O(t)}`,coercer:t=>R(t)?{...t}:t})}function $(t){return new N({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function W(t,e){return new N({type:"record",schema:null,*entries(r){if(R(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>R(t)||`Expected an object, but received: ${O(t)}`})}function H(){return L("string",(t=>"string"==typeof t||`Expected a string, but received: ${O(t)}`))}function V(t){const e=t.map((t=>t.type)).join(" | ");return new N({type:"union",schema:null,coercer(e){for(const r of t){const[t,n]=r.validate(e,{coerce:!0});if(!t)return n}return e},validator(r,n){const i=[];for(const e of t){const[...t]=P(r,e,n),[o]=t;if(!o[0])return[];for(const[e]of t)e&&i.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${O(r)}`,...i]}})}var G=class extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}},K=t=>z(t);function J({path:t,branch:e}){const r=t[t.length-1];return M(e[e.length-2],r)}function Y(t){return new N({...t,type:`optional ${t.type}`,validator:(e,r)=>!J(r)||t.validator(e,r),refiner:(e,r)=>!J(r)||t.refiner(e,r)})}var Z,X,Q,tt=V([D(null),L("boolean",(t=>"boolean"==typeof t)),L("finite number",(t=>C(t,q())&&Number.isFinite(t))),H(),U(F((()=>tt))),W(H(),F((()=>tt)))]),et=(Z=tt,X=L("any",(()=>!0)),Q=t=>(function(t,e,r="Assertion failed",n=G){try{T(t,e)}catch(t){throw function(t,e){return r=t,Boolean("string"==typeof r?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var r}(n,`${r}: ${function(t){return function(t){return function(t){return"object"==typeof t&&null!==t&&"message"in t}(t)&&"string"==typeof t.message?t.message:function(t){return null==t}(t)?"":String(t)}(t).replace(/\.$/u,"")}(t)}.`)}}(t,tt),JSON.parse(JSON.stringify(t,((t,e)=>{if("__proto__"!==t&&"constructor"!==t)return e})))),new N({...Z,coercer:(t,e)=>C(t,X)?Z.coercer(Q(t,e),e):Z.coercer(t,e)}));function rt(t){try{return function(t){B(t,et)}(t),!0}catch{return!1}}var nt=D("2.0"),it=function(t){return new N({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}(V([q(),H()])),ot=K({code:L("integer",(t=>"number"==typeof t&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${O(t)}`)),message:H(),data:Y(et),stack:Y(H())}),st=V([W(H(),et),U(et)]);function at(t){return C(t,ot)}K({id:it,jsonrpc:nt,method:H(),params:Y(st)}),K({jsonrpc:nt,method:H(),params:Y(st)}),z({id:it,jsonrpc:nt,result:$(L("unknown",(()=>!0))),error:$(ot)}),V([K({id:it,jsonrpc:nt,result:et}),K({id:it,jsonrpc:nt,error:ot})]);var ct="Unspecified error message. This is a bug, please report it.",ut={code:S,message:lt(S)},ft="Unspecified server error.";function lt(t,e=ct){if(function(t){return Number.isInteger(t)}(t)){const e=t.toString();if(M(A,e))return A[e].message;if(function(t){return t>=-32099&&t<=-32e3}(t))return ft}return e}function dt(t,{fallbackError:e=ut,shouldIncludeStack:r=!0}={}){if(!at(e))throw new Error("Must provide fallback error with integer number code and string message.");const n=function(t,e){if(t&&"object"==typeof t&&"serialize"in t&&"function"==typeof t.serialize)return t.serialize();if(at(t))return t;return{...e,data:{cause:ht(t)}}}(t,e);return r||delete n.stack,n}function ht(t){return Array.isArray(t)?t.map((t=>rt(t)?t:E(t)?pt(t):null)):E(t)?pt(t):rt(t)?t:null}function pt(t){return Object.getOwnPropertyNames(t).reduce(((e,r)=>{const n=t[r];return rt(n)&&(e[r]=n),e}),{})}var bt=class extends Error{constructor(t,e,r){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a non-empty string.');super(e),this.code=t,void 0!==r&&(this.data=r)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data,function(t){if("object"!=typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(t){return!1}}(this.data)&&(t.data.cause=ht(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return f(this.serialize(),yt,2)}},gt=class extends bt{constructor(t,e,r){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,r)}};function yt(t,e){if("[Circular]"!==e)return e}var mt={parse:t=>vt(m,t),invalidRequest:t=>vt(v,t),invalidParams:t=>vt(_,t),methodNotFound:t=>vt(w,t),internal:t=>vt(S,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return vt(e,t)},invalidInput:t=>vt(d,t),resourceNotFound:t=>vt(h,t),resourceUnavailable:t=>vt(p,t),transactionRejected:t=>vt(b,t),methodNotSupported:t=>vt(g,t),limitExceeded:t=>vt(y,t)};function vt(t,e){const[r,n]=function(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e??void 0,r]}}return[]}(e);return new bt(t,r??lt(t),n)}function wt(t,e,r){try{Reflect.apply(t,e,r)}catch(t){setTimeout((()=>{throw t}))}}r(1822),r(3358),r(2720),c.Duplex;class _t extends u.EventEmitter{emit(t){let e="error"===t;const r=this._events;if(void 0!==r)e=e&&void 0===r.error;else if(!e)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(e){let t;if(i.length>0&&([t]=i),t instanceof Error)throw t;const e=new Error("Unhandled error."+(t?` (${t.message})`:""));throw e.context=t,e}const s=r[t];if(void 0===s)return!1;if("function"==typeof s)wt(s,this,i);else{const t=s.length,e=function(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}(s);for(let r=0;r<t;r+=1)wt(e[r],this,i)}return!0}}class St extends Error{constructor(t){let{code:e,message:r,data:n}=t;if(!Number.isInteger(e))throw new Error("code must be an integer");if(!r||"string"!=typeof r)throw new Error("message must be string");super(r),o(this,"code",void 0),o(this,"data",void 0),this.code=e,void 0!==n&&(this.data=n)}toString(){return l()({code:this.code,message:this.message,data:this.data,stack:this.stack})}}function At(t){return async(e,r,n,i)=>{let o;const s=new Promise((t=>{o=t}));let a=null,c=!1;const u=async()=>{c=!0,n((t=>{a=t,o()})),await s};try{await t(e,r,u),c?(await s,a(null)):i(null)}catch(t){const e=t;a?a(e):i(e)}}}class Et extends _t{constructor(){super(),o(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(t,e,r){const n=[];let i=null,o=!1;for(const s of r)if([i,o]=await Et._runMiddleware(t,e,s,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(t,e,r,n){return new Promise((i=>{const o=t=>{const r=t||e.error;r&&("object"==typeof r&&!1===Object.keys(r).includes("stack")&&(r.stack="Stack trace is not available."),e.error=dt(r,{shouldIncludeStack:!0,fallbackError:{message:(null==r?void 0:r.message)||(null==r?void 0:r.toString()),code:(null==r?void 0:r.code)||-32603,stack:(null==r?void 0:r.stack)||"Stack trace is not available.",data:(null==r?void 0:r.data)||(null==r?void 0:r.message)||(null==r?void 0:r.toString())}})),i([r,!0])},s=t=>{e.error?o(e.error):(t&&("function"!=typeof t&&o(new St({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(t)),i([null,!1]))};try{r(t,e,s,o)}catch(t){o(t)}}))}static async _runReturnHandlers(t){for(const e of t)await new Promise(((t,r)=>{e((e=>e?r(e):t()))}))}static _checkForCompletion(t,e,r){if(!("result"in e)&&!("error"in e))throw new St({code:-32603,message:"Response has no error or result for request"});if(!r)throw new St({code:-32603,message:"Nothing ended request"})}push(t){this._middleware.push(t)}handle(t,e){if(e&&"function"!=typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,r,n)=>{try{const[i,o,s]=await Et._runAllMiddleware(t,e,this._middleware);return o?(await Et._runReturnHandlers(s),n(i)):r((async t=>{try{await Et._runReturnHandlers(s)}catch(e){return t(e)}return t()}))}catch(t){return n(t)}}}async _handleBatch(t,e){try{const r=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,r):r}catch(t){if(e)return e(t);throw t}}_promiseHandle(t){return new Promise(((e,r)=>{this._handle(t,((t,n)=>{t&&void 0===n?r(t):e(n)})).catch(r)}))}async _handle(t,e){if(!t||Array.isArray(t)||"object"!=typeof t){const t=new St({code:-32603,message:"request must be plain object"});return e(t,{id:void 0,jsonrpc:"2.0",error:t})}if("string"!=typeof t.method){const r=new St({code:-32603,message:"method must be string"});return e(r,{id:t.id,jsonrpc:"2.0",error:r})}const r=a({},t),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(t){i=t}var o,s,c,u,f,l,d;return i&&(delete n.result,n.error||("object"==typeof i&&!1===Object.keys(i).includes("stack")&&(i.stack="Stack trace is not available."),n.error=dt(i,{shouldIncludeStack:!0,fallbackError:{message:(null===(o=i)||void 0===o?void 0:o.message)||(null===(s=i)||void 0===s?void 0:s.toString()),code:(null===(c=i)||void 0===c?void 0:c.code)||-32603,stack:(null===(u=i)||void 0===u?void 0:u.stack)||"Stack trace is not available.",data:(null===(f=i)||void 0===f?void 0:f.data)||(null===(l=i)||void 0===l?void 0:l.message)||(null===(d=i)||void 0===d?void 0:d.toString())}}))),e(i,n)}async _processRequest(t,e){const[r,n,i]=await Et._runAllMiddleware(t,e,this._middleware);if(Et._checkForCompletion(t,e,n),await Et._runReturnHandlers(i),r)throw r}}function Mt(t){const e=new Et;return t.forEach((t=>e.push(t))),e.asMiddleware()}function xt(t){const e=new _t;return e.sendAsync=async e=>{const r=await t.handle(e);if(r.error){var n,i,o,s,a,c,u;"object"==typeof r.error&&!1===Object.keys(r.error).includes("stack")&&(r.error.stack="Stack trace is not available.");const t=dt(r.error,{fallbackError:{message:(null===(n=r.error)||void 0===n?void 0:n.message)||(null===(i=r.error)||void 0===i?void 0:i.toString()),code:(null===(o=r.error)||void 0===o?void 0:o.code)||-32603,stack:(null===(s=r.error)||void 0===s?void 0:s.stack)||"Stack trace is not available.",data:(null===(a=r.error)||void 0===a?void 0:a.data)||(null===(c=r.error)||void 0===c?void 0:c.message)||(null===(u=r.error)||void 0===u?void 0:u.toString())},shouldIncludeStack:!0});throw mt.internal(t)}return r.result},e.send=(e,r)=>{if("function"!=typeof r)throw new Error('Must provide callback to "send" method.');t.handle(e,r)},t.on&&t.on("notification",(t=>{e.emit("data",null,t)})),e.request=async t=>{const r=a(a({},t),{},{id:Math.random().toString(36).slice(2),jsonrpc:"2.0"});return await e.sendAsync(r)},e}c.Duplex,Symbol("IGNORE_SUBSTREAM"),c.Duplex;var Rt=r(7702),Ot=r.n(Rt);const It={MAINNET:"mainnet",TESTNET:"testnet",CYAN:"cyan",AQUA:"aqua",CELESTE:"celeste"},kt={SAPPHIRE_DEVNET:"sapphire_devnet",SAPPHIRE_MAINNET:"sapphire_mainnet"},Pt={[kt.SAPPHIRE_MAINNET]:"https://signer.web3auth.io",[kt.SAPPHIRE_DEVNET]:"https://signer.web3auth.io",[It.MAINNET]:"https://signer.web3auth.io",[It.TESTNET]:"https://signer.web3auth.io",[It.CYAN]:"https://signer-polygon.web3auth.io",[It.AQUA]:"https://signer-polygon.web3auth.io",[It.CELESTE]:"https://signer-polygon.web3auth.io"};function Nt(t){let e,r=!1,n=0;try{e=window[t],r=!0,n=e.length;const i="__storage_test__";return e.setItem(i,i),e.removeItem(i),!0}catch(t){const e=t;return e&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&r&&0!==n}}Ot();class Tt{constructor(){o(this,"store",new Map)}getItem(t){return this.store.get(t)||null}setItem(t,e){this.store.set(t,e)}removeItem(t){this.store.delete(t)}}o(class{constructor(t,e){o(this,"storage",void 0),o(this,"_storeKey",void 0),this.storage=e,this._storeKey=t;try{e.getItem(t)||this.resetStore()}catch(t){}}static getInstance(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(!this.instanceMap.has(t)){let r;r="local"===e&&Nt("localStorage")?window.localStorage:"session"===e&&Nt("sessionStorage")?window.sessionStorage:new Tt,this.instanceMap.set(t,new this(t,r))}return this.instanceMap.get(t)}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const t=this.getStore();return this.storage.removeItem(this._storeKey),t}getStore(){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")}get(t){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")[t]}set(t,e){const r=JSON.parse(this.storage.getItem(this._storeKey)||"{}");r[t]=e,this.storage.setItem(this._storeKey,JSON.stringify(r))}},"instanceMap",new Map);const Bt=a(a({},kt),It),Ct="sms_passwordless";var jt,Lt=(jt=function(t,e){return jt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},jt(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}jt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),Ft=function(t){function e(e,r){var n,i,o,s=this.constructor,a=t.call(this,e,r)||this;return Object.defineProperty(a,"name",{value:s.name,enumerable:!1,configurable:!0}),n=a,i=s.prototype,(o=Object.setPrototypeOf)?o(n,i):n.__proto__=i,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(a),a}return Lt(e,t),e}(Error);class Ut extends Error{}Ut.prototype.name="InvalidTokenError";var Dt=r(8089),qt=r.n(Dt),zt=r(5880),$t=r.n(zt);const Wt=$t().getLogger("http-helpers");Wt.setLevel(zt.levels.INFO);let Ht="torus-default";const Vt=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={mode:"cors",headers:{}};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).useAPIKey&&(r.headers=a(a({},r.headers),function(){const t={};return Ht&&(t["x-api-key"]=Ht),t}()));const n=qt()(r,e,{method:"GET"}),i=await async function(t,e){let r=null;try{r=new URL(t)}catch(t){}return fetch(t,e)}(t,n);if(i.ok){const t=i.headers.get("content-type");return null!=t&&t.includes("application/json")?i.json():i.text()}throw function(t){Wt.info(`Response: ${t.status} ${t.statusText}`),Wt.info(`Url: ${t.url}`)}(i),i},Gt={EIP155:"eip155",SOLANA:"solana",CASPER:"casper",XRPL:"xrpl",OTHER:"other"},Kt="multichain",Jt=(t,e)=>{if(t===Gt.OTHER)return null;const r=e?"number"==typeof e?e:parseInt(e,16):(t=>{if(t===Gt.EIP155)return 1;if(t===Gt.SOLANA)return 1;if(t===Gt.XRPL)return 1;throw new Error(`Chain namespace ${t} is not supported`)})(t);return t===Gt.EIP155?(t=>{const e=Gt.EIP155;return 1===t?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:e,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/eth",displayName:"Ethereum Mainnet",blockExplorerUrl:"https://etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:5===t?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:e,chainId:"0x5",rpcTarget:"https://rpc.ankr.com/eth_goerli",displayName:"Goerli Testnet",blockExplorerUrl:"https://goerli.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:11155111===t?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:e,chainId:"0xaa36a7",rpcTarget:"https://rpc.ankr.com/eth_sepolia",displayName:"Sepolia Testnet",blockExplorerUrl:"https://sepolia.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:137===t?{logo:"https://images.toruswallet.io/polygon.svg",chainNamespace:e,chainId:"0x89",rpcTarget:"https://rpc.ankr.com/polygon",displayName:"Polygon Mainnet",blockExplorerUrl:"https://polygonscan.com",ticker:"MATIC",tickerName:"Polygon"}:80002===t?{logo:"https://images.toruswallet.io/polygon.svg",chainNamespace:e,chainId:"0x13882",rpcTarget:"https://rpc.ankr.com/polygon_amoy",displayName:"Polygon Amoy Testnet",blockExplorerUrl:"https://www.oklink.com/amoy",ticker:"MATIC",tickerName:"Polygon",decimals:18}:56===t?{logo:"https://images.toruswallet.io/bnb.png",chainNamespace:e,chainId:"0x38",rpcTarget:"https://rpc.ankr.com/bsc",displayName:"Binance SmartChain Mainnet",blockExplorerUrl:"https://bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:97===t?{logo:"https://images.toruswallet.io/bnb.png",chainNamespace:e,chainId:"0x61",rpcTarget:"https://rpc.ankr.com/bsc_testnet_chapel",displayName:"Binance SmartChain Testnet",blockExplorerUrl:"https://testnet.bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:25===t?{logo:"https://images.toruswallet.io/cro.svg",chainNamespace:e,chainId:"0x19",rpcTarget:"https://rpc.cronos.org",displayName:"Cronos Mainnet",blockExplorerUrl:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:338===t?{logo:"https://images.toruswallet.io/cro.svg",chainNamespace:e,chainId:"0x152",rpcTarget:"https://rpc-t3.cronos.org/",displayName:"Cronos Testnet",blockExplorerUrl:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos",decimals:18}:8217===t?{logo:"https://images.toruswallet.io/klay.svg",chainNamespace:e,chainId:"0x2019",rpcTarget:"https://public-node-api.klaytnapi.com/v1/cypress",displayName:"Klaytn Mainnet",blockExplorerUrl:"https://scope.klaytn.com",ticker:"KLAY",tickerName:"Klaytn",decimals:18}:null})(r):t===Gt.SOLANA?(t=>{const e=Gt.SOLANA;return 1===t?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:e,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/solana",displayName:"Solana Mainnet",blockExplorerUrl:"https://explorer.solana.com",ticker:"SOL",tickerName:"Solana",decimals:9}:2===t?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:e,chainId:"0x2",rpcTarget:"https://api.testnet.solana.com",displayName:"Solana Testnet",blockExplorerUrl:"https://explorer.solana.com?cluster=testnet",ticker:"SOL",tickerName:"Solana",decimals:9}:3===t?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:e,chainId:"0x3",rpcTarget:"https://api.devnet.solana.com",displayName:"Solana Devnet",blockExplorerUrl:"https://explorer.solana.com?cluster=devnet",ticker:"SOL",tickerName:"Solana",decimals:9}:null})(r):t===Gt.XRPL?(t=>{const e=Gt.XRPL;return 1===t?{chainNamespace:e,decimals:15,chainId:"0x1",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://ripple-node.tor.us",wsTarget:"wss://s2.ripple.com",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl mainnet",blockExplorerUrl:"https://livenet.xrpl.org"}:2===t?{chainNamespace:e,decimals:15,chainId:"0x2",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://testnet-ripple-node.tor.us",wsTarget:"wss://s.altnet.rippletest.net",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl testnet",blockExplorerUrl:"https://testnet.xrpl.org",isTestnet:!0}:3===t?{chainNamespace:e,decimals:15,chainId:"0x3",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://devnet-ripple-node.tor.us",wsTarget:"wss://s.devnet.rippletest.net/",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl devnet",blockExplorerUrl:"https://devnet.xrpl.org",isTestnet:!0}:null})(r):null};class Yt extends Ft{constructor(t,e){super(e),o(this,"code",void 0),o(this,"message",void 0),this.code=t,this.message=e||"",Object.defineProperty(this,"name",{value:"Web3AuthError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class Zt extends Yt{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletInitializationError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Zt(t,`${Zt.messages[t]}, ${e}`)}static notFound(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5001,t)}static notInstalled(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5002,t)}static notReady(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5003,t)}static windowBlocked(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5004,t)}static windowClosed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5005,t)}static incompatibleChainNameSpace(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5006,t)}static duplicateAdapterError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5007,t)}static invalidProviderConfigError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5008,t)}static providerNotReadyError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5009,t)}static rpcConnectionError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5010,t)}static invalidParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5011,t)}static invalidNetwork(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5013,t)}}o(Zt,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});class Xt extends Yt{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletLoginError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Xt(t,`${Xt.messages[t]}. ${e}`)}static connectionError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5111,t)}static disconnectionError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5112,t)}static notConnectedError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5113,t)}static popupClosed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5114,t)}static mfaEnabled(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5115,t)}static chainConfigNotAdded(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5116,t)}static unsupportedOperation(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5117,t)}static coreKitKeyNotFound(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5118,t)}static userNotLoggedIn(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5119,t)}}o(Xt,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user",5115:"User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa",5116:"Chain config has not been added. Please add the chain config before calling switchChain",5117:"Unsupported operation",5118:"useCoreKitKey flag is enabled but coreKitKey is not available",5119:"User not logged in."});class Qt extends Yt{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletOperationsError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Qt(t,`${Qt.messages[t]}, ${e}`)}static chainIDNotAllowed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5201,t)}static operationNotAllowed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5202,t)}static chainNamespaceNotAllowed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5203,t)}}o(Qt,"messages",{5e3:"Custom",5201:"Provided chainId is not allowed",5202:"This operation is not allowed"});class te extends Yt{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletProviderError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Qt(t,`${te.messages[t]}, ${e}`)}static invalidRequestArgs(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5301,t)}static invalidRequestMethod(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5302,t)}static invalidRequestParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5303,t)}}o(te,"messages",{5e3:"Custom",5301:"Expected a single, non-array, object argument.",5302:"'args.method' must be a non-empty string.",5303:"'args.params' must be an object or array if provided."});const ee={OPENLOGIN:"openlogin",WALLET_CONNECT_V2:"wallet-connect-v2"},re=a({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLFLARE:"solflare",SLOPE:"slope"},ee),ne=a({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},ee),ie=a(a({},ne),re),oe=(re.TORUS_SOLANA,re.PHANTOM,re.SOLFLARE,re.SLOPE,ne.TORUS_EVM,ne.METAMASK,ne.COINBASE,Bt),se={NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"},ae=a(a({},se),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated",CACHE_CLEAR:"cache_clear"});function ce(t){let e,r=!1,n=0;try{e=window[t],r=!0,n=e.length;const i="__storage_test__";return e.setItem(i,i),e.removeItem(i),!0}catch(t){const e=t;return!(!e||22!==e.code&&1014!==e.code&&"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||!r||0===n)}}var ue=$t().getLogger("web3auth-logger");const fe=a(a({},Gt),{},{MULTICHAIN:"multichain"});function le(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function de(t,...e){if(!((r=t)instanceof Uint8Array||null!=r&&"object"==typeof r&&"Uint8Array"===r.constructor.name))throw new Error("Expected Uint8Array");var r;if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function he(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");le(t.outputLen),le(t.blockLen)}function pe(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function be(t,e){de(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}a({},{READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"}),a(a({},{WALLET_SERVICES:"wallet-services"}),{SOLANA:"solana"});const ge={number:le,bool:function(t){if("boolean"!=typeof t)throw new Error(`Expected boolean, not ${t}`)},bytes:de,hash:he,exists:pe,output:be},ye="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function me(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}const ve=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),we=(t,e)=>t<<32-e|t>>>e;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function _e(t){if("string"==typeof t&&(t=function(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),!me(t))throw new Error("expected Uint8Array, got "+typeof t);return t}class Se{clone(){return this._cloneInto()}}function Ae(t){const e=e=>t().update(_e(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Ee(t=32){if(ye&&"function"==typeof ye.getRandomValues)return ye.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class Me extends Se{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ve(this.buffer)}update(t){pe(this);const{view:e,buffer:r,blockLen:n}=this,i=(t=_e(t)).length;for(let o=0;o<i;){const s=Math.min(n-this.pos,i-o);if(s!==n)r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(e,0),this.pos=0);else{const e=ve(t);for(;n<=i-o;o+=n)this.process(e,o)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){pe(this),be(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:n,isLE:i}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let t=o;t<n;t++)e[t]=0;!function(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,u=n?0:4;t.setUint32(e+c,s,n),t.setUint32(e+u,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const s=ve(t),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<c;t++)s.setUint32(4*t,u[t],i)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}const xe=(t,e,r)=>t&e^t&r^e&r,Re=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Oe=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ie=new Uint32Array(64);class ke extends Me{constructor(){super(64,32,8,!1),this.A=0|Oe[0],this.B=0|Oe[1],this.C=0|Oe[2],this.D=0|Oe[3],this.E=0|Oe[4],this.F=0|Oe[5],this.G=0|Oe[6],this.H=0|Oe[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)Ie[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=Ie[t-15],r=Ie[t-2],n=we(e,7)^we(e,18)^e>>>3,i=we(r,17)^we(r,19)^r>>>10;Ie[t]=i+Ie[t-7]+n+Ie[t-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:c,H:u}=this;for(let t=0;t<64;t++){const e=u+(we(s,6)^we(s,11)^we(s,25))+((f=s)&a^~f&c)+Re[t]+Ie[t]|0,l=(we(r,2)^we(r,13)^we(r,22))+xe(r,n,i)|0;u=c,c=a,a=s,s=o+e|0,o=i,i=n,n=r,r=e+l|0}var f;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,i,o,s,a,c,u)}roundClean(){Ie.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Pe=Ae((()=>new ke)),Ne=(BigInt(0),BigInt(1)),Te=BigInt(2);function Be(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}const Ce=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function je(t){if(!Be(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=Ce[t[r]];return e}function Le(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":`0x${t}`)}const Fe={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function Ue(t){return t>=Fe._0&&t<=Fe._9?t-Fe._0:t>=Fe._A&&t<=Fe._F?t-(Fe._A-10):t>=Fe._a&&t<=Fe._f?t-(Fe._a-10):void 0}function De(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){const r=Ue(t.charCodeAt(i)),o=Ue(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+e+'" at index '+i)}n[e]=16*r+o}return n}function qe(t){return Le(je(t))}function ze(t){if(!Be(t))throw new Error("Uint8Array expected");return Le(je(Uint8Array.from(t).reverse()))}function $e(t,e){return De(t.toString(16).padStart(2*e,"0"))}function We(t,e){return $e(t,e).reverse()}function He(t,e,r){let n;if("string"==typeof e)try{n=De(e)}catch(r){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${r}`)}else{if(!Be(e))throw new Error(`${t} must be hex string or Uint8Array`);n=Uint8Array.from(e)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n}function Ve(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];if(!Be(n))throw new Error("Uint8Array expected");e+=n.length}let r=new Uint8Array(e),n=0;for(let e=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}const Ge=t=>(Te<<BigInt(t-1))-Ne,Ke=t=>new Uint8Array(t),Je=t=>Uint8Array.from(t);function Ye(t,e,r){if("number"!=typeof t||t<2)throw new Error("hashLen must be a number");if("number"!=typeof e||e<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=Ke(t),i=Ke(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...t)=>r(i,n,...t),c=(t=Ke())=>{i=a(Je([0]),t),n=a(),0!==t.length&&(i=a(Je([1]),t),n=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let t=0;const r=[];for(;t<e;){n=a();const e=n.slice();r.push(e),t+=n.length}return Ve(...r)};return(t,e)=>{let r;for(s(),c(t);!(r=e(u()));)c();return s(),r}}const Ze={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||Be(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function Xe(t,e,r={}){const n=(e,r,n)=>{const i=Ze[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=t[e];if(!(n&&void 0===o||i(o,t)))throw new Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`)};for(const[t,r]of Object.entries(e))n(t,r,!1);for(const[t,e]of Object.entries(r))n(t,e,!0);return t}const Qe=BigInt(0),tr=BigInt(1),er=BigInt(2),rr=BigInt(3),nr=BigInt(4),ir=BigInt(5),or=BigInt(8);function sr(t,e){const r=t%e;return r>=Qe?r:e+r}function ar(t,e,r){if(r<=Qe||e<Qe)throw new Error("Expected power/modulo > 0");if(r===tr)return Qe;let n=tr;for(;e>Qe;)e&tr&&(n=n*t%r),t=t*t%r,e>>=tr;return n}function cr(t,e,r){let n=t;for(;e-- >Qe;)n*=n,n%=r;return n}function ur(t,e){if(t===Qe||e<=Qe)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=sr(t,e),n=e,i=Qe,o=tr,s=tr,a=Qe;for(;r!==Qe;){const t=n/r,e=n%r,c=i-s*t,u=o-a*t;n=r,r=e,i=s,o=a,s=c,a=u}if(n!==tr)throw new Error("invert: does not exist");return sr(i,e)}BigInt(9),BigInt(16);const fr=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function lr(t,e){const r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function dr(t){if("bigint"!=typeof t)throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function hr(t){const e=dr(t);return e+Math.ceil(e/2)}class pr extends Se{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,he(t);const r=_e(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?t.create().update(r).digest():r);for(let t=0;t<i.length;t++)i[t]^=54;this.iHash.update(i),this.oHash=t.create();for(let t=0;t<i.length;t++)i[t]^=106;this.oHash.update(i),i.fill(0)}update(t){return pe(this),this.iHash.update(t),this}digestInto(t){pe(this),de(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const br=(t,e,r)=>new pr(t,e).update(r).digest();br.create=(t,e)=>new pr(t,e);const gr=BigInt(0),yr=BigInt(1);function mr(t){return Xe(t.Fp,fr.reduce(((t,e)=>(t[e]="function",t)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),Xe(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...lr(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const{bytesToNumberBE:vr,hexToBytes:wr}=t,_r={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){const{Err:e}=_r;if(t.length<2||2!==t[0])throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(128&n[0])throw new e("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new e("Invalid signature integer: unnecessary leading zero");return{d:vr(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=_r,r="string"==typeof t?wr(t):t;if(!Be(r))throw new Error("ui8a expected");let n=r.length;if(n<2||48!=r[0])throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:o}=_r._parseInt(r.subarray(2)),{d:s,l:a}=_r._parseInt(o);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(t){const e=t=>8&Number.parseInt(t[0],16)?"00"+t:t,r=t=>{const e=t.toString(16);return 1&e.length?`0${e}`:e},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,a=r(o),c=r(s);return`30${r(s+o+4)}02${c}${i}02${a}${n}`}},Sr=BigInt(0),Ar=BigInt(1),Er=(BigInt(2),BigInt(3));function Mr(t){const e=function(t){const e=mr(t);return Xe(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function s(t){return sr(t,n)}function a(t){return ur(t,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:f,isWithinCurveOrder:l}=function(t){const e=function(t){const e=mr(t);Xe(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}(t),{Fp:r}=e,n=e.toBytes||((t,e,n)=>{const i=e.toAffine();return Ve(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=e.fromBytes||(t=>{const e=t.subarray(1);return{x:r.fromBytes(e.subarray(0,r.BYTES)),y:r.fromBytes(e.subarray(r.BYTES,2*r.BYTES))}});function o(t){const{a:n,b:i}=e,o=r.sqr(t),s=r.mul(o,t);return r.add(r.add(s,r.mul(t,n)),i)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error("bad generator point: equation left != right");function s(t){return"bigint"==typeof t&&Sr<t&&t<e.n}function a(t){if(!s(t))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(t){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:i,n:o}=e;if(r&&"bigint"!=typeof t){if(Be(t)&&(t=je(t)),"string"!=typeof t||!r.includes(t.length))throw new Error("Invalid key");t=t.padStart(2*n,"0")}let s;try{s="bigint"==typeof t?t:qe(He("private key",t,n))}catch(e){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof t}`)}return i&&(s=sr(s,o)),a(s),s}const u=new Map;function f(t){if(!(t instanceof l))throw new Error("ProjectivePoint expected")}class l{constructor(t,e,n){if(this.px=t,this.py=e,this.pz=n,null==t||!r.isValid(t))throw new Error("x required");if(null==e||!r.isValid(e))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(t){const{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw new Error("invalid affine point");if(t instanceof l)throw new Error("projective point not allowed");const i=t=>r.eql(t,r.ZERO);return i(e)&&i(n)?l.ZERO:new l(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(l.fromAffine)}static fromHex(t){const e=l.fromAffine(i(He("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return l.BASE.multiply(c(t))}_setWindowSize(t){this._WINDOW_SIZE=t,u.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:t,y:n}=this.toAffine();if(!r.isValid(t)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),s=o(t);if(!r.eql(i,s))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw new Error("Field doesn't support isOdd")}equals(t){f(t);const{px:e,py:n,pz:i}=this,{px:o,py:s,pz:a}=t,c=r.eql(r.mul(e,a),r.mul(o,i)),u=r.eql(r.mul(n,a),r.mul(s,i));return c&&u}negate(){return new l(this.px,r.neg(this.py),this.pz)}double(){const{a:t,b:n}=e,i=r.mul(n,Er),{px:o,py:s,pz:a}=this;let c=r.ZERO,u=r.ZERO,f=r.ZERO,d=r.mul(o,o),h=r.mul(s,s),p=r.mul(a,a),b=r.mul(o,s);return b=r.add(b,b),f=r.mul(o,a),f=r.add(f,f),c=r.mul(t,f),u=r.mul(i,p),u=r.add(c,u),c=r.sub(h,u),u=r.add(h,u),u=r.mul(c,u),c=r.mul(b,c),f=r.mul(i,f),p=r.mul(t,p),b=r.sub(d,p),b=r.mul(t,b),b=r.add(b,f),f=r.add(d,d),d=r.add(f,d),d=r.add(d,p),d=r.mul(d,b),u=r.add(u,d),p=r.mul(s,a),p=r.add(p,p),d=r.mul(p,b),c=r.sub(c,d),f=r.mul(p,h),f=r.add(f,f),f=r.add(f,f),new l(c,u,f)}add(t){f(t);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:c}=t;let u=r.ZERO,d=r.ZERO,h=r.ZERO;const p=e.a,b=r.mul(e.b,Er);let g=r.mul(n,s),y=r.mul(i,a),m=r.mul(o,c),v=r.add(n,i),w=r.add(s,a);v=r.mul(v,w),w=r.add(g,y),v=r.sub(v,w),w=r.add(n,o);let _=r.add(s,c);return w=r.mul(w,_),_=r.add(g,m),w=r.sub(w,_),_=r.add(i,o),u=r.add(a,c),_=r.mul(_,u),u=r.add(y,m),_=r.sub(_,u),h=r.mul(p,w),u=r.mul(b,m),h=r.add(u,h),u=r.sub(y,h),h=r.add(y,h),d=r.mul(u,h),y=r.add(g,g),y=r.add(y,g),m=r.mul(p,m),w=r.mul(b,w),y=r.add(y,m),m=r.sub(g,m),m=r.mul(p,m),w=r.add(w,m),g=r.mul(y,w),d=r.add(d,g),g=r.mul(_,w),u=r.mul(v,u),u=r.sub(u,g),g=r.mul(v,y),h=r.mul(_,h),h=r.add(h,g),new l(u,d,h)}subtract(t){return this.add(t.negate())}is0(){return this.equals(l.ZERO)}wNAF(t){return h.wNAFCached(this,u,t,(t=>{const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(l.fromAffine)}))}multiplyUnsafe(t){const n=l.ZERO;if(t===Sr)return n;if(a(t),t===Ar)return this;const{endo:i}=e;if(!i)return h.unsafeLadder(this,t);let{k1neg:o,k1:s,k2neg:c,k2:u}=i.splitScalar(t),f=n,d=n,p=this;for(;s>Sr||u>Sr;)s&Ar&&(f=f.add(p)),u&Ar&&(d=d.add(p)),p=p.double(),s>>=Ar,u>>=Ar;return o&&(f=f.negate()),c&&(d=d.negate()),d=new l(r.mul(d.px,i.beta),d.py,d.pz),f.add(d)}multiply(t){a(t);let n,i,o=t;const{endo:s}=e;if(s){const{k1neg:t,k1:e,k2neg:a,k2:c}=s.splitScalar(o);let{p:u,f}=this.wNAF(e),{p:d,f:p}=this.wNAF(c);u=h.constTimeNegate(t,u),d=h.constTimeNegate(a,d),d=new l(r.mul(d.px,s.beta),d.py,d.pz),n=u.add(d),i=f.add(p)}else{const{p:t,f:e}=this.wNAF(o);n=t,i=e}return l.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){const n=l.BASE,i=(t,e)=>e!==Sr&&e!==Ar&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){const{px:e,py:n,pz:i}=this,o=this.is0();null==t&&(t=o?r.ONE:r.inv(i));const s=r.mul(e,t),a=r.mul(n,t),c=r.mul(i,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:t,isTorsionFree:r}=e;if(t===Ar)return!0;if(r)return r(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:t,clearCofactor:r}=e;return t===Ar?this:r?r(l,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),n(l,this,t)}toHex(t=!0){return je(this.toRawBytes(t))}}l.BASE=new l(e.Gx,e.Gy,r.ONE),l.ZERO=new l(r.ZERO,r.ONE,r.ZERO);const d=e.nBitLength,h=function(t,e){const r=(t,e)=>{const r=e.negate();return t?r:e},n=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>gr;)r&yr&&(n=n.add(i)),i=i.double(),r>>=yr;return n},precomputeWindow(t,e){const{windows:r,windowSize:i}=n(e),o=[];let s=t,a=s;for(let t=0;t<r;t++){a=s,o.push(a);for(let t=1;t<i;t++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(e,i,o){const{windows:s,windowSize:a}=n(e);let c=t.ZERO,u=t.BASE;const f=BigInt(2**e-1),l=2**e,d=BigInt(e);for(let t=0;t<s;t++){const e=t*a;let n=Number(o&f);o>>=d,n>a&&(n-=l,o+=yr);const s=e,h=e+Math.abs(n)-1,p=t%2!=0,b=n<0;0===n?u=u.add(r(p,i[s])):c=c.add(r(b,i[h]))}return{p:c,f:u}},wNAFCached(t,e,r,n){const i=t._WINDOW_SIZE||1;let o=e.get(t);return o||(o=this.precomputeWindow(t,i),1!==i&&e.set(t,n(o))),this.wNAF(i,o,r)}}}(l,e.endo?Math.ceil(d/2):d);return{CURVE:e,ProjectivePoint:l,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:s}}({...e,toBytes(t,e,n){const i=e.toAffine(),o=r.toBytes(i.x),s=Ve;return n?s(Uint8Array.from([e.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(t){const e=t.length,n=t[0],s=t.subarray(1);if(e!==i||2!==n&&3!==n){if(e===o&&4===n)return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))};throw new Error(`Point of length ${e} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}{const t=qe(s);if(!(Sr<(a=t)&&a<r.ORDER))throw new Error("Point is not on curve");const e=f(t);let i=r.sqrt(e);return!(1&~n)!=((i&Ar)===Ar)&&(i=r.neg(i)),{x:t,y:i}}var a}}),d=t=>je($e(t,e.nByteLength));function h(t){return t>n>>Ar}const p=(t,e,r)=>qe(t.slice(e,r));class b{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){const r=e.nByteLength;return t=He("compactSignature",t,2*r),new b(p(t,0,r),p(t,r,2*r))}static fromDER(t){const{r:e,s:r}=_r.toSig(He("DER",t));return new b(e,r)}assertValidity(){if(!l(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!l(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(t){return new b(this.r,this.s,t)}recoverPublicKey(t){const{r:n,s:i,recovery:o}=this,u=v(He("msgHash",t));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const f=2===o||3===o?n+e.n:n;if(f>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const l=1&o?"03":"02",h=c.fromHex(l+d(f)),p=a(f),b=s(-u*p),g=s(i*p),y=c.BASE.multiplyAndAddUnsafe(h,b,g);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return De(this.toDERHex())}toDERHex(){return _r.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return De(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}const g={isValidPrivateKey(t){try{return u(t),!0}catch(t){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const t=hr(e.n);return function(t,e,r=!1){const n=t.length,i=dr(e),o=hr(e);if(n<16||n<o||n>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);const s=sr(r?qe(t):ze(t),e-tr)+tr;return r?We(s,i):$e(s,i)}(e.randomBytes(t),e.n)},precompute:(t=8,e=c.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)};function y(t){const e=Be(t),r="string"==typeof t,n=(e||r)&&t.length;return e?n===i||n===o:r?n===2*i||n===2*o:t instanceof c}const m=e.bits2int||function(t){const r=qe(t),n=8*t.length-e.nBitLength;return n>0?r>>BigInt(n):r},v=e.bits2int_modN||function(t){return s(m(t))},w=Ge(e.nBitLength);function _(t){if("bigint"!=typeof t)throw new Error("bigint expected");if(!(Sr<=t&&t<w))throw new Error(`bigint expected < 2^${e.nBitLength}`);return $e(t,e.nByteLength)}const S={lowS:e.lowS,prehash:!1},A={lowS:e.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return c.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(y(t))throw new Error("first arg must be private key");if(!y(e))throw new Error("second arg must be public key");return c.fromHex(e).multiply(u(t)).toRawBytes(r)},sign:function(t,n,i=S){const{seed:o,k2sig:f}=function(t,n,i=S){if(["recovered","canonical"].some((t=>t in i)))throw new Error("sign() legacy options not supported");const{hash:o,randomBytes:f}=e;let{lowS:d,prehash:p,extraEntropy:g}=i;null==d&&(d=!0),t=He("msgHash",t),p&&(t=He("prehashed msgHash",o(t)));const y=v(t),w=u(n),A=[_(w),_(y)];if(null!=g){const t=!0===g?f(r.BYTES):g;A.push(He("extraEntropy",t))}const E=Ve(...A),M=y;return{seed:E,k2sig:function(t){const e=m(t);if(!l(e))return;const r=a(e),n=c.BASE.multiply(e).toAffine(),i=s(n.x);if(i===Sr)return;const o=s(r*s(M+i*w));if(o===Sr)return;let u=(n.x===i?0:2)|Number(n.y&Ar),f=o;return d&&h(o)&&(f=function(t){return h(t)?s(-t):t}(o),u^=1),new b(i,f,u)}}}(t,n,i),d=e;return Ye(d.hash.outputLen,d.nByteLength,d.hmac)(o,f)},verify:function(t,r,n,i=A){const o=t;if(r=He("msgHash",r),n=He("publicKey",n),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:f}=i;let l,d;try{if("string"==typeof o||Be(o))try{l=b.fromDER(o)}catch(t){if(!(t instanceof _r.Err))throw t;l=b.fromCompact(o)}else{if("object"!=typeof o||"bigint"!=typeof o.r||"bigint"!=typeof o.s)throw new Error("PARSE");{const{r:t,s:e}=o;l=new b(t,e)}}d=c.fromHex(n)}catch(t){if("PARSE"===t.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;f&&(r=e.hash(r));const{r:h,s:p}=l,g=v(r),y=a(p),m=s(g*y),w=s(h*y),_=c.BASE.multiplyAndAddUnsafe(d,m,w)?.toAffine();return!!_&&s(_.x)===h},ProjectivePoint:c,Signature:b,utils:g}}function xr(t){return{hash:t,hmac:(e,...r)=>br(t,e,function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];if(!me(n))throw new Error("Uint8Array expected");e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}(...r)),randomBytes:Ee}}BigInt(4);const Rr=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Or=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Ir=BigInt(1),kr=BigInt(2),Pr=(t,e)=>(t+e/kr)/e;const Nr=function(t,e,r=!1,n={}){if(t<=Qe)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:o}=lr(t,e);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=function(t){if(t%nr===rr){const e=(t+tr)/nr;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error("Cannot find square root");return n}}if(t%or===ir){const e=(t-ir)/or;return function(t,r){const n=t.mul(r,er),i=t.pow(n,e),o=t.mul(r,i),s=t.mul(t.mul(o,er),i),a=t.mul(o,t.sub(s,t.ONE));if(!t.eql(t.sqr(a),r))throw new Error("Cannot find square root");return a}}return function(t){const e=(t-tr)/er;let r,n,i;for(r=t-tr,n=0;r%er===Qe;r/=er,n++);for(i=er;i<t&&ar(i,e,t)!==t-tr;i++);if(1===n){const e=(t+tr)/nr;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error("Cannot find square root");return n}}const o=(r+tr)/er;return function(t,s){if(t.pow(s,e)===t.neg(t.ONE))throw new Error("Cannot find square root");let a=n,c=t.pow(t.mul(t.ONE,i),r),u=t.pow(s,o),f=t.pow(s,r);for(;!t.eql(f,t.ONE);){if(t.eql(f,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(f);e<a&&!t.eql(r,t.ONE);e++)r=t.sqr(r);const r=t.pow(c,tr<<BigInt(a-e-1));c=t.sqr(r),u=t.mul(u,r),f=t.mul(f,c),a=e}return u}}(t)}(t),a=Object.freeze({ORDER:t,BITS:i,BYTES:o,MASK:Ge(i),ZERO:Qe,ONE:tr,create:e=>sr(e,t),isValid:e=>{if("bigint"!=typeof e)throw new Error("Invalid field element: expected bigint, got "+typeof e);return Qe<=e&&e<t},is0:t=>t===Qe,isOdd:t=>(t&tr)===tr,neg:e=>sr(-e,t),eql:(t,e)=>t===e,sqr:e=>sr(e*e,t),add:(e,r)=>sr(e+r,t),sub:(e,r)=>sr(e-r,t),mul:(e,r)=>sr(e*r,t),pow:(t,e)=>function(t,e,r){if(r<Qe)throw new Error("Expected power > 0");if(r===Qe)return t.ONE;if(r===tr)return e;let n=t.ONE,i=e;for(;r>Qe;)r&tr&&(n=t.mul(n,i)),i=t.sqr(i),r>>=tr;return n}(a,t,e),div:(e,r)=>sr(e*ur(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>ur(e,t),sqrt:n.sqrt||(t=>s(a,t)),invertBatch:t=>function(t,e){const r=new Array(e.length),n=e.reduce(((e,n,i)=>t.is0(n)?e:(r[i]=e,t.mul(e,n))),t.ONE),i=t.inv(n);return e.reduceRight(((e,n,i)=>t.is0(n)?e:(r[i]=t.mul(e,r[i]),t.mul(e,n))),i),r}(a,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?We(t,o):$e(t,o),fromBytes:t=>{if(t.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${t.length}`);return r?ze(t):qe(t)}});return Object.freeze(a)}(Rr,void 0,void 0,{sqrt:function(t){const e=Rr,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=t*t*t%e,f=u*u*t%e,l=cr(f,r,e)*f%e,d=cr(l,r,e)*f%e,h=cr(d,kr,e)*u%e,p=cr(h,i,e)*h%e,b=cr(p,o,e)*p%e,g=cr(b,a,e)*b%e,y=cr(g,c,e)*g%e,m=cr(y,a,e)*b%e,v=cr(m,r,e)*f%e,w=cr(v,s,e)*p%e,_=cr(w,n,e)*u%e,S=cr(_,kr,e);if(!Nr.eql(Nr.sqr(S),t))throw new Error("Cannot find square root");return S}}),Tr=function(t,e){const r=e=>Mr({...t,...xr(e)});return Object.freeze({...r(e),create:r})}({a:BigInt(0),b:BigInt(7),Fp:Nr,n:Or,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=Or,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Ir*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),a=Pr(o*t,e),c=Pr(-n*t,e);let u=sr(t-a*r-c*i,e),f=sr(-a*n-c*o,e);const l=u>s,d=f>s;if(l&&(u=e-u),d&&(f=e-f),u>s||f>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:l,k1:u,k2neg:d,k2:f}}}},Pe);function Br(t){return e=>(ge.bytes(e),t(e))}BigInt(0),Tr.ProjectivePoint,ge.bool,ge.bytes,(()=>{const t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,e="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);e&&!t&&e("crypto")})(),BigInt(0);const Cr={},jr={};for(let t=0;t<16;t++){const e=t,r=16*t,n=t.toString(16).toLowerCase();jr[n]=e,jr[n.toUpperCase()]=e,Cr[n]=r,Cr[n.toUpperCase()]=r}Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));const Lr=[];for(let t=0;t<=65535;t++)Lr[t]=BigInt(t);const Fr=t=>{if("string"!=typeof t)throw new Error(`hex argument type ${typeof t} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(t))throw new Error(`Input must be a 0x-prefixed hexadecimal string, got ${t}`);return(t=t.slice(2)).length%2!=0&&(t=function(t){let e=t;if("string"!=typeof e)throw new Error("[padToEven] value must be type 'string', received "+typeof e);return e.length%2&&(e=`0${e}`),e}(t)),function(t){const e=t.length,r=new Uint8Array(e/2);for(let n=0;n<e;n+=2)r[n/2]=Cr[t[n]]+jr[t[n+1]];return r}(t)};BigInt("0xffffffffffffffff"),BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),Tr.CURVE.n,Tr.CURVE.n,BigInt(2),BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),Fr("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"),Fr("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"),Fr("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"),Uint8Array.from([128]),BigInt(-1),BigInt(0),BigInt(1),BigInt(2),BigInt(3),BigInt(7),BigInt(8),BigInt(27),BigInt(28),BigInt(31),BigInt(32),BigInt(64),BigInt(128),BigInt(255),BigInt(256),BigInt(96),BigInt(100),BigInt(160),BigInt(224),BigInt(7922816251426434e13),BigInt(1461501637330903e33),BigInt(2695994666715064e52),BigInt(1e9),Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));const Ur=BigInt(2**32-1),Dr=BigInt(32);function qr(t,e=!1){return e?{h:Number(t&Ur),l:Number(t>>Dr&Ur)}:{h:0|Number(t>>Dr&Ur),l:0|Number(t&Ur)}}function zr(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:o,l:s}=qr(t[i],e);[r[i],n[i]]=[o,s]}return[r,n]}const[$r,Wr,Hr]=[[],[],[]],Vr=BigInt(0),Gr=BigInt(1),Kr=BigInt(2),Jr=BigInt(7),Yr=BigInt(256),Zr=BigInt(113);for(let t=0,e=Gr,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],$r.push(2*(5*n+r)),Wr.push((t+1)*(t+2)/2%64);let i=Vr;for(let t=0;t<7;t++)e=(e<<Gr^(e>>Jr)*Zr)%Yr,e&Kr&&(i^=Gr<<(Gr<<BigInt(t))-Gr);Hr.push(i)}const[Xr,Qr]=zr(Hr,!0),tn=(t,e,r)=>r>32?((t,e,r)=>e<<r-32|t>>>64-r)(t,e,r):((t,e,r)=>t<<r|e>>>32-r)(t,e,r),en=(t,e,r)=>r>32?((t,e,r)=>t<<r-32|e>>>64-r)(t,e,r):((t,e,r)=>e<<r|t>>>32-r)(t,e,r);class rn extends Se{constructor(t,e,r,n=!1,i=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,le(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}keccak(){!function(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=tn(o,s,1)^r[n],c=en(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=a,t[e+r+1]^=c}let e=t[2],i=t[3];for(let r=0;r<24;r++){const n=Wr[r],o=tn(e,i,n),s=en(e,i,n),a=$r[r];e=t[a],i=t[a+1],t[a]=o,t[a+1]=s}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=Xr[n],t[1]^=Qr[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){pe(this);const{blockLen:e,state:r}=this,n=(t=_e(t)).length;for(let i=0;i<n;){const o=Math.min(e-this.pos,n-i);for(let e=0;e<o;e++)r[this.pos++]^=t[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,128&e&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){pe(this,!1),de(t),this.finish();const e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return le(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(be(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new rn(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}const nn=(t,e,r)=>Ae((()=>new rn(e,t,r))),on=nn(1,144,28),sn=nn(1,136,32),an=nn(1,104,48),cn=nn(1,72,64),un=(Br(on),(()=>{const t=Br(sn);return t.create=sn.create,t})());var fn,ln,dn,hn;Br(an),Br(cn),new Uint8Array(0),function(t){t.String="string",t.Bytes="view",t.Number="number"}(fn||(fn={})),function(t){t.String="string",t.Bytes="view",t.JSON="json"}(ln||(ln={})),(hn=dn||(dn={}))[hn.Number=0]="Number",hn[hn.BigInt=1]="BigInt",hn[hn.Uint8Array=2]="Uint8Array",hn[hn.PrefixedHexString=3]="PrefixedHexString",Br(Pe);var pn=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,bn=Math.ceil,gn=Math.floor,yn="[BigNumber Error] ",mn=yn+"Number primitive has more than 15 significant digits: ",vn=1e14,wn=14,_n=9007199254740991,Sn=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],An=1e7,En=1e9;function Mn(t){var e=0|t;return t>0||t===e?e:e-1}function xn(t){for(var e,r,n=1,i=t.length,o=t[0]+"";n<i;){for(e=t[n++]+"",r=wn-e.length;r--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function Rn(t,e){var r,n,i=t.c,o=e.c,s=t.s,a=e.s,c=t.e,u=e.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=c==u,!i||!o)return n?0:!i^r?1:-1;if(!n)return c>u^r?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function On(t,e,r,n){if(t<e||t>r||t!==gn(t))throw Error(yn+(n||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function In(t){var e=t.c.length-1;return Mn(t.e/wn)==e&&t.c[e]%2!=0}function kn(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function Pn(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}!function t(e){var r,n,i,o,s,a,c,u,f,l,d=x.prototype={constructor:x,toString:null,valueOf:null},h=new x(1),p=20,b=4,g=-7,y=21,m=-1e7,v=1e7,w=!1,_=1,S=0,A={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",M=!0;function x(t,e){var r,o,s,a,c,u,f,l,d=this;if(!(d instanceof x))return new x(t,e);if(null==e){if(t&&!0===t._isBigNumber)return d.s=t.s,void(!t.c||t.e>v?d.c=d.e=null:t.e<m?d.c=[d.e=0]:(d.e=t.e,d.c=t.c.slice()));if((u="number"==typeof t)&&0*t==0){if(d.s=1/t<0?(t=-t,-1):1,t===~~t){for(a=0,c=t;c>=10;c/=10,a++);return void(a>v?d.c=d.e=null:(d.e=a,d.c=[t]))}l=String(t)}else{if(!pn.test(l=String(t)))return i(d,l,u);d.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}(a=l.indexOf("."))>-1&&(l=l.replace(".","")),(c=l.search(/e/i))>0?(a<0&&(a=c),a+=+l.slice(c+1),l=l.substring(0,c)):a<0&&(a=l.length)}else{if(On(e,2,E.length,"Base"),10==e&&M)return k(d=new x(t),p+d.e+1,b);if(l=String(t),u="number"==typeof t){if(0*t!=0)return i(d,l,u,e);if(d.s=1/t<0?(l=l.slice(1),-1):1,x.DEBUG&&l.replace(/^0\.0*|\./,"").length>15)throw Error(mn+t)}else d.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(r=E.slice(0,e),a=c=0,f=l.length;c<f;c++)if(r.indexOf(o=l.charAt(c))<0){if("."==o){if(c>a){a=f;continue}}else if(!s&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){s=!0,c=-1,a=0;continue}return i(d,String(t),u,e)}u=!1,(a=(l=n(l,e,10,d.s)).indexOf("."))>-1?l=l.replace(".",""):a=l.length}for(c=0;48===l.charCodeAt(c);c++);for(f=l.length;48===l.charCodeAt(--f););if(l=l.slice(c,++f)){if(f-=c,u&&x.DEBUG&&f>15&&(t>_n||t!==gn(t)))throw Error(mn+d.s*t);if((a=a-c-1)>v)d.c=d.e=null;else if(a<m)d.c=[d.e=0];else{if(d.e=a,d.c=[],c=(a+1)%wn,a<0&&(c+=wn),c<f){for(c&&d.c.push(+l.slice(0,c)),f-=wn;c<f;)d.c.push(+l.slice(c,c+=wn));c=wn-(l=l.slice(c)).length}else c-=f;for(;c--;l+="0");d.c.push(+l)}}else d.c=[d.e=0]}function R(t,e,r,n){var i,o,s,a,c;if(null==r?r=b:On(r,0,8),!t.c)return t.toString();if(i=t.c[0],s=t.e,null==e)c=xn(t.c),c=1==n||2==n&&(s<=g||s>=y)?kn(c,s):Pn(c,s,"0");else if(o=(t=k(new x(t),e,r)).e,a=(c=xn(t.c)).length,1==n||2==n&&(e<=o||o<=g)){for(;a<e;c+="0",a++);c=kn(c,o)}else if(e-=s,c=Pn(c,o,"0"),o+1>a){if(--e>0)for(c+=".";e--;c+="0");}else if((e+=o-a)>0)for(o+1==a&&(c+=".");e--;c+="0");return t.s<0&&i?"-"+c:c}function O(t,e){for(var r,n,i=1,o=new x(t[0]);i<t.length;i++)(!(n=new x(t[i])).s||(r=Rn(o,n))===e||0===r&&o.s===e)&&(o=n);return o}function I(t,e,r){for(var n=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,n++);return(r=n+r*wn-1)>v?t.c=t.e=null:r<m?t.c=[t.e=0]:(t.e=r,t.c=e),t}function k(t,e,r,n){var i,o,s,a,c,u,f,l=t.c,d=Sn;if(l){t:{for(i=1,a=l[0];a>=10;a/=10,i++);if((o=e-i)<0)o+=wn,s=e,c=l[u=0],f=gn(c/d[i-s-1]%10);else if((u=bn((o+1)/wn))>=l.length){if(!n)break t;for(;l.length<=u;l.push(0));c=f=0,i=1,s=(o%=wn)-wn+1}else{for(c=a=l[u],i=1;a>=10;a/=10,i++);f=(s=(o%=wn)-wn+i)<0?0:gn(c/d[i-s-1]%10)}if(n=n||e<0||null!=l[u+1]||(s<0?c:c%d[i-s-1]),n=r<4?(f||n)&&(0==r||r==(t.s<0?3:2)):f>5||5==f&&(4==r||n||6==r&&(o>0?s>0?c/d[i-s]:0:l[u-1])%10&1||r==(t.s<0?8:7)),e<1||!l[0])return l.length=0,n?(e-=t.e+1,l[0]=d[(wn-e%wn)%wn],t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=u,a=1,u--):(l.length=u+1,a=d[wn-o],l[u]=s>0?gn(c/d[i-s]%d[s])*a:0),n)for(;;){if(0==u){for(o=1,s=l[0];s>=10;s/=10,o++);for(s=l[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(t.e++,l[0]==vn&&(l[0]=1));break}if(l[u]+=a,l[u]!=vn)break;l[u--]=0,a=1}for(o=l.length;0===l[--o];l.pop());}t.e>v?t.c=t.e=null:t.e<m&&(t.c=[t.e=0])}return t}function P(t){var e,r=t.e;return null===r?t.toString():(e=xn(t.c),e=r<=g||r>=y?kn(e,r):Pn(e,r,"0"),t.s<0?"-"+e:e)}return x.clone=t,x.ROUND_UP=0,x.ROUND_DOWN=1,x.ROUND_CEIL=2,x.ROUND_FLOOR=3,x.ROUND_HALF_UP=4,x.ROUND_HALF_DOWN=5,x.ROUND_HALF_EVEN=6,x.ROUND_HALF_CEIL=7,x.ROUND_HALF_FLOOR=8,x.EUCLID=9,x.config=x.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(yn+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(On(r=t[e],0,En,e),p=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(On(r=t[e],0,8,e),b=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(On(r[0],-En,0,e),On(r[1],0,En,e),g=r[0],y=r[1]):(On(r,-En,En,e),g=-(y=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)On(r[0],-En,-1,e),On(r[1],1,En,e),m=r[0],v=r[1];else{if(On(r,-En,En,e),!r)throw Error(yn+e+" cannot be zero: "+r);m=-(v=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(yn+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(yn+"crypto unavailable");w=r}else w=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(On(r=t[e],0,9,e),_=r),t.hasOwnProperty(e="POW_PRECISION")&&(On(r=t[e],0,En,e),S=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(yn+e+" not an object: "+r);A=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(yn+e+" invalid: "+r);M="0123456789"==r.slice(0,10),E=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:b,EXPONENTIAL_AT:[g,y],RANGE:[m,v],CRYPTO:w,MODULO_MODE:_,POW_PRECISION:S,FORMAT:A,ALPHABET:E}},x.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!x.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-En&&i<=En&&i===gn(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%wn)<1&&(e+=wn),String(n[0]).length==e){for(e=0;e<n.length;e++)if((r=n[e])<0||r>=vn||r!==gn(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(yn+"Invalid BigNumber: "+t)},x.maximum=x.max=function(){return O(arguments,-1)},x.minimum=x.min=function(){return O(arguments,1)},x.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return gn(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,i,o,a=0,c=[],u=new x(h);if(null==t?t=p:On(t,0,En),i=bn(t/wn),w)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*e[a]+(e[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[a]=r[0],e[a+1]=r[1]):(c.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw w=!1,Error(yn+"crypto unavailable");for(e=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&e[a])+1099511627776*e[a+1]+4294967296*e[a+2]+16777216*e[a+3]+(e[a+4]<<16)+(e[a+5]<<8)+e[a+6])>=9e15?crypto.randomBytes(7).copy(e,a):(c.push(o%1e14),a+=7);a=i/7}if(!w)for(;a<i;)(o=s())<9e15&&(c[a++]=o%1e14);for(i=c[--a],t%=wn,i&&t&&(o=Sn[wn-t],c[a]=gn(i/o)*o);0===c[a];c.pop(),a--);if(a<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=wn);for(a=1,o=c[0];o>=10;o/=10,a++);a<wn&&(n-=wn-a)}return u.e=n,u.c=c,u}),x.sum=function(){for(var t=1,e=arguments,r=new x(e[0]);t<e.length;)r=r.plus(e[t++]);return r},n=function(){var t="0123456789";function e(t,e,r,n){for(var i,o,s=[0],a=0,c=t.length;a<c;){for(o=s.length;o--;s[o]*=e);for(s[0]+=n.indexOf(t.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var c,u,f,l,d,h,g,y,m=n.indexOf("."),v=p,w=b;for(m>=0&&(l=S,S=0,n=n.replace(".",""),h=(y=new x(i)).pow(n.length-m),S=l,y.c=e(Pn(xn(h.c),h.e,"0"),10,o,t),y.e=y.c.length),f=l=(g=e(n,i,o,a?(c=E,t):(c=t,E))).length;0==g[--l];g.pop());if(!g[0])return c.charAt(0);if(m<0?--f:(h.c=g,h.e=f,h.s=s,g=(h=r(h,y,v,w,o)).c,d=h.r,f=h.e),m=g[u=f+v+1],l=o/2,d=d||u<0||null!=g[u+1],d=w<4?(null!=m||d)&&(0==w||w==(h.s<0?3:2)):m>l||m==l&&(4==w||d||6==w&&1&g[u-1]||w==(h.s<0?8:7)),u<1||!g[0])n=d?Pn(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(g.length=u,d)for(--o;++g[--u]>o;)g[u]=0,u||(++f,g=[1].concat(g));for(l=g.length;!g[--l];);for(m=0,n="";m<=l;n+=c.charAt(g[m++]));n=Pn(n,f,c.charAt(0))}return n}}(),r=function(){function t(t,e,r){var n,i,o,s,a=0,c=t.length,u=e%An,f=e/An|0;for(t=t.slice();c--;)a=((i=u*(o=t[c]%An)+(n=f*o+(s=t[c]/An|0)*u)%An*An+a)/r|0)+(n/An|0)+f*s,t[c]=i%r;return a&&(t=[a].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]<e[r]?1:0,t[r]=i*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,i,o,s,a){var c,u,f,l,d,h,p,b,g,y,m,v,w,_,S,A,E,M=n.s==i.s?1:-1,R=n.c,O=i.c;if(!(R&&R[0]&&O&&O[0]))return new x(n.s&&i.s&&(R?!O||R[0]!=O[0]:O)?R&&0==R[0]||!O?0*M:M/0:NaN);for(g=(b=new x(M)).c=[],M=o+(u=n.e-i.e)+1,a||(a=vn,u=Mn(n.e/wn)-Mn(i.e/wn),M=M/wn|0),f=0;O[f]==(R[f]||0);f++);if(O[f]>(R[f]||0)&&u--,M<0)g.push(1),l=!0;else{for(_=R.length,A=O.length,f=0,M+=2,(d=gn(a/(O[0]+1)))>1&&(O=t(O,d,a),R=t(R,d,a),A=O.length,_=R.length),w=A,m=(y=R.slice(0,A)).length;m<A;y[m++]=0);E=O.slice(),E=[0].concat(E),S=O[0],O[1]>=a/2&&S++;do{if(d=0,(c=e(O,y,A,m))<0){if(v=y[0],A!=m&&(v=v*a+(y[1]||0)),(d=gn(v/S))>1)for(d>=a&&(d=a-1),p=(h=t(O,d,a)).length,m=y.length;1==e(h,y,p,m);)d--,r(h,A<p?E:O,p,a),p=h.length,c=1;else 0==d&&(c=d=1),p=(h=O.slice()).length;if(p<m&&(h=[0].concat(h)),r(y,h,m,a),m=y.length,-1==c)for(;e(O,y,A,m)<1;)d++,r(y,A<m?E:O,m,a),m=y.length}else 0===c&&(d++,y=[0]);g[f++]=d,y[0]?y[m++]=R[w]||0:(y=[R[w]],m=1)}while((w++<_||null!=y[0])&&M--);l=null!=y[0],g[0]||g.splice(0,1)}if(a==vn){for(f=1,M=g[0];M>=10;M/=10,f++);k(b,o+(b.e=f+u*wn-1)+1,s,l)}else b.e=u,b.r=+l;return b}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,f=/^-?(Infinity|NaN)$/,l=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,r,n){var i,o=r?e:e.replace(l,"");if(f.test(o))t.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,(function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e})),n&&(i=n,o=o.replace(c,"$1").replace(u,"0.$1")),e!=o))return new x(o,i);if(x.DEBUG)throw Error(yn+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},d.absoluteValue=d.abs=function(){var t=new x(this);return t.s<0&&(t.s=1),t},d.comparedTo=function(t,e){return Rn(this,new x(t,e))},d.decimalPlaces=d.dp=function(t,e){var r,n,i,o=this;if(null!=t)return On(t,0,En),null==e?e=b:On(e,0,8),k(new x(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=((i=r.length-1)-Mn(this.e/wn))*wn,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},d.dividedBy=d.div=function(t,e){return r(this,new x(t,e),p,b)},d.dividedToIntegerBy=d.idiv=function(t,e){return r(this,new x(t,e),0,1)},d.exponentiatedBy=d.pow=function(t,e){var r,n,i,o,s,a,c,u,f=this;if((t=new x(t)).c&&!t.isInteger())throw Error(yn+"Exponent not an integer: "+P(t));if(null!=e&&(e=new x(e)),s=t.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!t.c||!t.c[0])return u=new x(Math.pow(+P(f),s?t.s*(2-In(t)):+P(t))),e?u.mod(e):u;if(a=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new x(NaN);(n=!a&&f.isInteger()&&e.isInteger())&&(f=f.mod(e))}else{if(t.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||s&&f.c[1]>=24e7:f.c[0]<8e13||s&&f.c[0]<=9999975e7)))return o=f.s<0&&In(t)?-0:0,f.e>-1&&(o=1/o),new x(a?1/o:o);S&&(o=bn(S/wn+2))}for(s?(r=new x(.5),a&&(t.s=1),c=In(t)):c=(i=Math.abs(+P(t)))%2,u=new x(h);;){if(c){if(!(u=u.times(f)).c)break;o?u.c.length>o&&(u.c.length=o):n&&(u=u.mod(e))}if(i){if(0===(i=gn(i/2)))break;c=i%2}else if(k(t=t.times(r),t.e+1,1),t.e>14)c=In(t);else{if(0==(i=+P(t)))break;c=i%2}f=f.times(f),o?f.c&&f.c.length>o&&(f.c.length=o):n&&(f=f.mod(e))}return n?u:(a&&(u=h.div(u)),e?u.mod(e):o?k(u,S,b,void 0):u)},d.integerValue=function(t){var e=new x(this);return null==t?t=b:On(t,0,8),k(e,e.e+1,t)},d.isEqualTo=d.eq=function(t,e){return 0===Rn(this,new x(t,e))},d.isFinite=function(){return!!this.c},d.isGreaterThan=d.gt=function(t,e){return Rn(this,new x(t,e))>0},d.isGreaterThanOrEqualTo=d.gte=function(t,e){return 1===(e=Rn(this,new x(t,e)))||0===e},d.isInteger=function(){return!!this.c&&Mn(this.e/wn)>this.c.length-2},d.isLessThan=d.lt=function(t,e){return Rn(this,new x(t,e))<0},d.isLessThanOrEqualTo=d.lte=function(t,e){return-1===(e=Rn(this,new x(t,e)))||0===e},d.isNaN=function(){return!this.s},d.isNegative=function(){return this.s<0},d.isPositive=function(){return this.s>0},d.isZero=function(){return!!this.c&&0==this.c[0]},d.minus=function(t,e){var r,n,i,o,s=this,a=s.s;if(e=(t=new x(t,e)).s,!a||!e)return new x(NaN);if(a!=e)return t.s=-e,s.plus(t);var c=s.e/wn,u=t.e/wn,f=s.c,l=t.c;if(!c||!u){if(!f||!l)return f?(t.s=-e,t):new x(l?s:NaN);if(!f[0]||!l[0])return l[0]?(t.s=-e,t):new x(f[0]?s:3==b?-0:0)}if(c=Mn(c),u=Mn(u),f=f.slice(),a=c-u){for((o=a<0)?(a=-a,i=f):(u=c,i=l),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(n=(o=(a=f.length)<(e=l.length))?a:e,a=e=0;e<n;e++)if(f[e]!=l[e]){o=f[e]<l[e];break}if(o&&(i=f,f=l,l=i,t.s=-t.s),(e=(n=l.length)-(r=f.length))>0)for(;e--;f[r++]=0);for(e=vn-1;n>a;){if(f[--n]<l[n]){for(r=n;r&&!f[--r];f[r]=e);--f[r],f[n]+=vn}f[n]-=l[n]}for(;0==f[0];f.splice(0,1),--u);return f[0]?I(t,f,u):(t.s=3==b?-1:1,t.c=[t.e=0],t)},d.modulo=d.mod=function(t,e){var n,i,o=this;return t=new x(t,e),!o.c||!t.s||t.c&&!t.c[0]?new x(NaN):!t.c||o.c&&!o.c[0]?new x(o):(9==_?(i=t.s,t.s=1,n=r(o,t,0,3),t.s=i,n.s*=i):n=r(o,t,0,_),(t=o.minus(n.times(t))).c[0]||1!=_||(t.s=o.s),t)},d.multipliedBy=d.times=function(t,e){var r,n,i,o,s,a,c,u,f,l,d,h,p,b,g,y=this,m=y.c,v=(t=new x(t,e)).c;if(!(m&&v&&m[0]&&v[0]))return!y.s||!t.s||m&&!m[0]&&!v||v&&!v[0]&&!m?t.c=t.e=t.s=null:(t.s*=y.s,m&&v?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=Mn(y.e/wn)+Mn(t.e/wn),t.s*=y.s,(c=m.length)<(l=v.length)&&(p=m,m=v,v=p,i=c,c=l,l=i),i=c+l,p=[];i--;p.push(0));for(b=vn,g=An,i=l;--i>=0;){for(r=0,d=v[i]%g,h=v[i]/g|0,o=i+(s=c);o>i;)r=((u=d*(u=m[--s]%g)+(a=h*u+(f=m[s]/g|0)*d)%g*g+p[o]+r)/b|0)+(a/g|0)+h*f,p[o--]=u%b;p[o]=r}return r?++n:p.splice(0,1),I(t,p,n)},d.negated=function(){var t=new x(this);return t.s=-t.s||null,t},d.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new x(t,e)).s,!i||!e)return new x(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/wn,s=t.e/wn,a=n.c,c=t.c;if(!o||!s){if(!a||!c)return new x(i/0);if(!a[0]||!c[0])return c[0]?t:new x(a[0]?n:0*i)}if(o=Mn(o),s=Mn(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=c):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(e=c.length)<0&&(r=c,c=a,a=r,e=i),i=0;e;)i=(a[--e]=a[e]+c[e]+i)/vn|0,a[e]=vn===a[e]?0:a[e]%vn;return i&&(a=[i].concat(a),++s),I(t,a,s)},d.precision=d.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return On(t,1,En),null==e?e=b:On(e,0,8),k(new x(o),t,e);if(!(r=o.c))return null;if(n=(i=r.length-1)*wn+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},d.shiftedBy=function(t){return On(t,-9007199254740991,_n),this.times("1e"+t)},d.squareRoot=d.sqrt=function(){var t,e,n,i,o,s=this,a=s.c,c=s.s,u=s.e,f=p+4,l=new x("0.5");if(1!==c||!a||!a[0])return new x(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+P(s)))||c==1/0?(((e=xn(a)).length+u)%2==0&&(e+="0"),c=Math.sqrt(+e),u=Mn((u+1)/2)-(u<0||u%2),n=new x(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):n=new x(c+""),n.c[0])for((c=(u=n.e)+f)<3&&(c=0);;)if(o=n,n=l.times(o.plus(r(s,o,f,1))),xn(o.c).slice(0,c)===(e=xn(n.c)).slice(0,c)){if(n.e<u&&--c,"9999"!=(e=e.slice(c-3,c+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(k(n,n.e+p+2,1),t=!n.times(n).eq(s));break}if(!i&&(k(o,o.e+p+2,0),o.times(o).eq(s))){n=o;break}f+=4,c+=4,i=1}return k(n,n.e+p+1,b,t)},d.toExponential=function(t,e){return null!=t&&(On(t,0,En),t++),R(this,t,e,1)},d.toFixed=function(t,e){return null!=t&&(On(t,0,En),t=t+this.e+1),R(this,t,e)},d.toFormat=function(t,e,r){var n,i=this;if(null==r)null!=t&&e&&"object"==typeof e?(r=e,e=null):t&&"object"==typeof t?(r=t,t=e=null):r=A;else if("object"!=typeof r)throw Error(yn+"Argument not an object: "+r);if(n=i.toFixed(t,e),i.c){var o,s=n.split("."),a=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",f=s[0],l=s[1],d=i.s<0,h=d?f.slice(1):f,p=h.length;if(c&&(o=a,a=c,c=o,p-=o),a>0&&p>0){for(o=p%a||a,f=h.substr(0,o);o<p;o+=a)f+=u+h.substr(o,a);c>0&&(f+=u+h.slice(o)),d&&(f="-"+f)}n=l?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):f}return(r.prefix||"")+n+(r.suffix||"")},d.toFraction=function(t){var e,n,i,o,s,a,c,u,f,l,d,p,g=this,y=g.c;if(null!=t&&(!(c=new x(t)).isInteger()&&(c.c||1!==c.s)||c.lt(h)))throw Error(yn+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+P(c));if(!y)return new x(g);for(e=new x(h),f=n=new x(h),i=u=new x(h),p=xn(y),s=e.e=p.length-g.e-1,e.c[0]=Sn[(a=s%wn)<0?wn+a:a],t=!t||c.comparedTo(e)>0?s>0?e:f:c,a=v,v=1/0,c=new x(p),u.c[0]=0;l=r(c,e,0,1),1!=(o=n.plus(l.times(i))).comparedTo(t);)n=i,i=o,f=u.plus(l.times(o=f)),u=o,e=c.minus(l.times(o=e)),c=o;return o=r(t.minus(n),i,0,1),u=u.plus(o.times(f)),n=n.plus(o.times(i)),u.s=f.s=g.s,d=r(f,i,s*=2,b).minus(g).abs().comparedTo(r(u,n,s,b).minus(g).abs())<1?[f,i]:[u,n],v=a,d},d.toNumber=function(){return+P(this)},d.toPrecision=function(t,e){return null!=t&&On(t,1,En),R(this,t,e,2)},d.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=g||o>=y?kn(xn(r.c),o):Pn(xn(r.c),o,"0"):10===t&&M?e=Pn(xn((r=k(new x(r),p+o+1,b)).c),r.e,"0"):(On(t,2,E.length,"Base"),e=n(Pn(xn(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},d.valueOf=d.toJSON=function(){return P(this)},d._isBigNumber=!0,d[Symbol.toStringTag]="BigNumber",d[Symbol.for("nodejs.util.inspect.custom")]=d.valueOf,null!=e&&x.set(e),x}();class Nn{ttl;map=new Map;_to=!1;constructor(t){this.ttl=t}has(t){return this.map.has(t)}add(t){this.map.set(t,Tn()),this._to||(this._to=!0,setTimeout((()=>{this._to=!1,function(t){const e=Tn()-t.ttl,r=t.map[Symbol.iterator]();for(;;){const n=r.next().value;if(!n)return;const i=n[0];if(!(n[1]<e))return;t.map.delete(i)}}(this)}),0))}clear(){this.map.clear()}}function Tn(){return Date.now()}const Bn=Object.create(null);Bn.open="0",Bn.close="1",Bn.ping="2",Bn.pong="3",Bn.message="4",Bn.upgrade="5",Bn.noop="6";const Cn=Object.create(null);Object.keys(Bn).forEach((t=>{Cn[Bn[t]]=t}));const jn={type:"error",data:"parser error"},Ln="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Fn="function"==typeof ArrayBuffer,Un=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Dn=({type:t,data:e},r,n)=>Ln&&e instanceof Blob?r?n(e):qn(e,n):Fn&&(e instanceof ArrayBuffer||Un(e))?r?n(e):qn(new Blob([e]),n):n(Bn[t]+(e||"")),qn=(t,e)=>{const r=new FileReader;return r.onload=function(){const t=r.result.split(",")[1];e("b"+(t||""))},r.readAsDataURL(t)};function zn(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let $n;const Wn="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)Wn["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t)]=t;const Hn="function"==typeof ArrayBuffer,Vn=(t,e)=>{if("string"!=typeof t)return{type:"message",data:Kn(t,e)};const r=t.charAt(0);return"b"===r?{type:"message",data:Gn(t.substring(1),e)}:Cn[r]?t.length>1?{type:Cn[r],data:t.substring(1)}:{type:Cn[r]}:jn},Gn=(t,e)=>{if(Hn){const r=(t=>{let e,r,n,i,o,s=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);const u=new ArrayBuffer(s),f=new Uint8Array(u);for(e=0;e<a;e+=4)r=Wn[t.charCodeAt(e)],n=Wn[t.charCodeAt(e+1)],i=Wn[t.charCodeAt(e+2)],o=Wn[t.charCodeAt(e+3)],f[c++]=r<<2|n>>4,f[c++]=(15&n)<<4|i>>2,f[c++]=(3&i)<<6|63&o;return u})(t);return Kn(r,e)}return{base64:!0,data:t}},Kn=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,Jn=String.fromCharCode(30);let Yn;function Zn(t){return t.reduce(((t,e)=>t+e.length),0)}function Xn(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let i=0;i<e;i++)r[i]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function Qn(t){if(t)return function(t){for(var e in Qn.prototype)t[e]=Qn.prototype[e];return t}(t)}Qn.prototype.on=Qn.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Qn.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},Qn.prototype.off=Qn.prototype.removeListener=Qn.prototype.removeAllListeners=Qn.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<n.length;i++)if((r=n[i])===e||r.fn===e){n.splice(i,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},Qn.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var i=(r=r.slice(0)).length;n<i;++n)r[n].apply(this,e)}return this},Qn.prototype.emitReserved=Qn.prototype.emit,Qn.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Qn.prototype.hasListeners=function(t){return!!this.listeners(t).length};const ti="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function ei(t,...e){return e.reduce(((e,r)=>(t.hasOwnProperty(r)&&(e[r]=t[r]),e)),{})}const ri=ti.setTimeout,ni=ti.clearTimeout;function ii(t,e){e.useNativeTimers?(t.setTimeoutFn=ri.bind(ti),t.clearTimeoutFn=ni.bind(ti)):(t.setTimeoutFn=ti.setTimeout.bind(ti),t.clearTimeoutFn=ti.clearTimeout.bind(ti))}class oi extends Error{constructor(t,e,r){super(t),this.description=e,this.context=r,this.type="TransportError"}}class si extends Qn{constructor(t){super(),this.writable=!1,ii(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,e,r){return super.emitReserved("error",new oi(t,e,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=Vn(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}(t);return e.length?"?"+e:""}}const ai="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ci=64,ui={};let fi,li=0,di=0;function hi(t){let e="";do{e=ai[t%ci]+e,t=Math.floor(t/ci)}while(t>0);return e}function pi(){const t=hi(+new Date);return t!==fi?(li=0,fi=t):t+"."+hi(li++)}for(;di<ci;di++)ui[ai[di]]=di;let bi=!1;try{bi="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const gi=bi;function yi(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||gi))return new XMLHttpRequest}catch(t){}if(!e)try{return new(ti[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}function mi(){}const vi=null!=new yi({xdomain:!1}).responseType;class wi extends Qn{constructor(t,e){super(),ii(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.data=void 0!==e.data?e.data:null,this.create()}create(){var t;const e=ei(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const r=this.xhr=new yi(e);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&r.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{r.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var t;3===r.readyState&&(null===(t=this.opts.cookieJar)||void 0===t||t.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=wi.requestsCount++,wi.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=mi,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete wi.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}function _i(){for(let t in wi.requests)wi.requests.hasOwnProperty(t)&&wi.requests[t].abort()}wi.requestsCount=0,wi.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",_i):"function"==typeof addEventListener&&addEventListener("onpagehide"in ti?"pagehide":"unload",_i,!1));const Si="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),Ai=ti.WebSocket||ti.MozWebSocket;r(1048).Buffer;const Ei="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),Mi={websocket:class extends si{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,r=Ei?{}:ei(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Ei?new Ai(t,e,r):e?new Ai(t,e):new Ai(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;Dn(r,this.supportsBinary,(t=>{try{this.ws.send(t)}catch(t){}n&&Si((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=pi()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}check(){return!!Ai}},webtransport:class extends si{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((t=>{this.onError("webtransport error",t)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((t=>{const e=function(t,e){Yn||(Yn=new TextDecoder);const r=[];let n=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(r.push(s);;){if(0===n){if(Zn(r)<1)break;const t=Xn(r,1);o=!(128&~t[0]),i=127&t[0],n=i<126?3:126===i?1:2}else if(1===n){if(Zn(r)<2)break;const t=Xn(r,2);i=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(Zn(r)<8)break;const t=Xn(r,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(jn);break}i=o*Math.pow(2,32)+e.getUint32(4),n=3}else{if(Zn(r)<i)break;const t=Xn(r,i);a.enqueue(Vn(o?t:Yn.decode(t),e)),n=0}if(0===i||i>t){a.enqueue(jn);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(e).getReader(),n=new TransformStream({transform(t,e){!function(t,e){Ln&&t.data instanceof Blob?t.data.arrayBuffer().then(zn).then(e):Fn&&(t.data instanceof ArrayBuffer||Un(t.data))?e(zn(t.data)):Dn(t,!1,(t=>{$n||($n=new TextEncoder),e($n.encode(t))}))}(t,(r=>{const n=r.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const t=new DataView(i.buffer);t.setUint8(0,126),t.setUint16(1,n)}else{i=new Uint8Array(9);const t=new DataView(i.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(n))}t.data&&"string"!=typeof t.data&&(i[0]|=128),e.enqueue(i),e.enqueue(r)}))}});n.readable.pipeTo(t.writable),this.writer=n.writable.getWriter();const i=()=>{r.read().then((({done:t,value:e})=>{t||(this.onPacket(e),i())})).catch((t=>{}))};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then((()=>this.onOpen()))}))})))}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;this.writer.write(r).then((()=>{n&&Si((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this.transport)||void 0===t||t.close()}},polling:class extends si{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let r=location.port;r||(r=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port}const e=t&&t.forceBase64;this.supportsBinary=vi&&!e,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(t++,this.once("pollComplete",(function(){--t||e()}))),this.writable||(t++,this.once("drain",(function(){--t||e()})))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const r=t.split(Jn),n=[];for(let t=0;t<r.length;t++){const i=Vn(r[t],e);if(n.push(i),"error"===i.type)break}return n})(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const r=t.length,n=new Array(r);let i=0;t.forEach(((t,o)=>{Dn(t,!1,(t=>{n[o]=t,++i===r&&e(n.join(Jn))}))}))})(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=pi()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new wi(this.uri(),t)}doWrite(t,e){const r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}},xi=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ri=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Oi(t){if(t.length>2e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");-1!=r&&-1!=n&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let i=xi.exec(t||""),o={},s=14;for(;s--;)o[Ri[s]]=i[s]||"";return-1!=r&&-1!=n&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(t,e){const r=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||r.splice(0,1),"/"==e.slice(-1)&&r.splice(r.length-1,1),r}(0,o.path),o.queryKey=function(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,n){e&&(r[e]=n)})),r}(0,o.query),o}class Ii extends Qn{constructor(t,e={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=Oi(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=Oi(e.host).host),ii(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},r=t.split("&");for(let t=0,n=r.length;t<n;t++){let n=r[t].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const r=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new Mi[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ii.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(t){let e=this.createTransport(t),r=!1;Ii.priorWebsocketSuccess=!1;const n=()=>{r||(e.send([{type:"ping",data:"probe"}]),e.once("packet",(t=>{if(!r)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Ii.priorWebsocketSuccess="websocket"===e.name,this.transport.pause((()=>{r||"closed"!==this.readyState&&(u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}})))};function i(){r||(r=!0,u(),e.close(),e=null)}const o=t=>{const r=new Error("probe error: "+t);r.transport=e.name,i(),this.emitReserved("upgradeError",r)};function s(){o("transport closed")}function a(){o("socket closed")}function c(t){e&&t.name!==e.name&&i()}const u=()=>{e.removeListener("open",n),e.removeListener("error",o),e.removeListener("close",s),this.off("close",a),this.off("upgrading",c)};e.once("open",n),e.once("error",o),e.once("close",s),this.once("close",a),this.once("upgrading",c),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{r||e.open()}),200):e.open()}onOpen(){if(this.readyState="open",Ii.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r<this.writeBuffer.length;r++){const n=this.writeBuffer[r].data;if(n&&(t+="string"==typeof(e=n)?function(t){let e=0,r=0;for(let n=0,i=t.length;n<i;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}(e):Math.ceil(1.33*(e.byteLength||e.size))),r>0&&t>this.maxPayload)return this.writeBuffer.slice(0,r);t+=2}var e;return this.writeBuffer}write(t,e,r){return this.sendPacket("message",t,e,r),this}send(t,e,r){return this.sendPacket("message",t,e,r),this}sendPacket(t,e,r,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const i={type:t,data:e,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),n&&this.once("flush",n),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?r():t()})):this.upgrading?r():t()),this}onError(t){Ii.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let r=0;const n=t.length;for(;r<n;r++)~this.transports.indexOf(t[r])&&e.push(t[r]);return e}}Ii.protocol=4,Ii.protocol;const ki="function"==typeof ArrayBuffer,Pi=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Ni=Object.prototype.toString,Ti="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Ni.call(Blob),Bi="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Ni.call(File);function Ci(t){return ki&&(t instanceof ArrayBuffer||Pi(t))||Ti&&t instanceof Blob||Bi&&t instanceof File}function ji(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,r=t.length;e<r;e++)if(ji(t[e]))return!0;return!1}if(Ci(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return ji(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&ji(t[e]))return!0;return!1}function Li(t){const e=[],r=t.data,n=t;return n.data=Fi(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Fi(t,e){if(!t)return t;if(Ci(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=Fi(t[n],e);return r}if("object"==typeof t&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=Fi(t[n],e));return r}return t}function Ui(t,e){return t.data=Di(t.data,e),delete t.attachments,t}function Di(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=Di(t[r],e);else if("object"==typeof t)for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Di(t[r],e));return t}const qi=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],zi=5;var $i;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}($i||($i={}));class Wi{constructor(t){this.replacer=t}encode(t){return t.type!==$i.EVENT&&t.type!==$i.ACK||!ji(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===$i.EVENT?$i.BINARY_EVENT:$i.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==$i.BINARY_EVENT&&t.type!==$i.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=Li(t),r=this.encodeAsString(e.packet),n=e.buffers;return n.unshift(r),n}}function Hi(t){return"[object Object]"===Object.prototype.toString.call(t)}class Vi extends Qn{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const r=e.type===$i.BINARY_EVENT;r||e.type===$i.BINARY_ACK?(e.type=r?$i.EVENT:$i.ACK,this.reconstructor=new Gi(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!Ci(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const r={type:Number(t.charAt(0))};if(void 0===$i[r.type])throw new Error("unknown packet type "+r.type);if(r.type===$i.BINARY_EVENT||r.type===$i.BINARY_ACK){const n=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const i=t.substring(n,e);if(i!=Number(i)||"-"!==t.charAt(e))throw new Error("Illegal attachments");r.attachments=Number(i)}if("/"===t.charAt(e+1)){const n=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);r.nsp=t.substring(n,e)}else r.nsp="/";const n=t.charAt(e+1);if(""!==n&&Number(n)==n){const n=e+1;for(;++e;){const r=t.charAt(e);if(null==r||Number(r)!=r){--e;break}if(e===t.length)break}r.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){const n=this.tryParse(t.substr(e));if(!Vi.isPayloadValid(r.type,n))throw new Error("invalid payload");r.data=n}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case $i.CONNECT:return Hi(e);case $i.DISCONNECT:return void 0===e;case $i.CONNECT_ERROR:return"string"==typeof e||Hi(e);case $i.EVENT:case $i.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===qi.indexOf(e[0]));case $i.ACK:case $i.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Gi{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=Ui(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Ki(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const Ji=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Yi extends Qn{constructor(t,e,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Ki(t,"open",this.onopen.bind(this)),Ki(t,"packet",this.onpacket.bind(this)),Ki(t,"error",this.onerror.bind(this)),Ki(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(Ji.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const r={type:$i.EVENT,data:e,options:{}};if(r.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++,n=e.pop();this._registerAckCallback(t,n),r.id=t}const n=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!n||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,e){var r;const n=null!==(r=this.flags.timeout)&&void 0!==r?r:this._opts.ackTimeout;if(void 0===n)return void(this.acks[t]=e);const i=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))}),n),o=(...t)=>{this.io.clearTimeoutFn(i),e.apply(this,t)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...e){return new Promise(((r,n)=>{const i=(t,e)=>t?n(t):r(e);i.withError=!0,e.push(i),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...n)=>{if(r===this._queue[0])return null!==t?r.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...n)),r.pending=!1,this._drainQueue()})),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:$i.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((t=>{if(!this.sendBuffer.some((e=>String(e.id)===t))){const e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}}))}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case $i.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case $i.EVENT:case $i.BINARY_EVENT:this.onevent(t);break;case $i.ACK:case $i.BINARY_ACK:this.onack(t);break;case $i.DISCONNECT:this.ondisconnect();break;case $i.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const r of e)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let r=!1;return function(...n){r||(r=!0,e.packet({type:$i.ACK,id:t,data:n}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:$i.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let r=0;r<e.length;r++)if(t===e[r])return e.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let r=0;r<e.length;r++)if(t===e[r])return e.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const r of e)r.apply(this,t.data)}}}function Zi(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Zi.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+r:t-r}return 0|Math.min(t,this.max)},Zi.prototype.reset=function(){this.attempts=0},Zi.prototype.setMin=function(t){this.ms=t},Zi.prototype.setMax=function(t){this.max=t},Zi.prototype.setJitter=function(t){this.jitter=t};class Xi extends Qn{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(r=t,t=void 0),(r=r||{}).path=r.path||"/socket.io",this.opts=r,ii(this,r),this.reconnection(!1!==r.reconnection),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=r.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new Zi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==r.timeout?2e4:r.timeout),this._readyState="closed",this.uri=t;const i=r.parser||e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=!1!==r.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Ii(this.uri,this.opts);const e=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const n=Ki(e,"open",(function(){r.onopen(),t&&t()})),i=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},o=Ki(e,"error",i);if(!1!==this._timeout){const t=this._timeout,r=this.setTimeoutFn((()=>{n(),i(new Error("timeout")),e.close()}),t);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}return this.subs.push(n),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ki(t,"ping",this.onping.bind(this)),Ki(t,"data",this.ondata.bind(this)),Ki(t,"error",this.onerror.bind(this)),Ki(t,"close",this.onclose.bind(this)),Ki(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){Si((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Yi(this,t,e),this.nsps[t]=r),r}_destroy(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return;this._close()}_packet(t){const e=this.encoder.encode(t);for(let r=0;r<e.length;r++)this.engine.write(e[r],t.options)}cleanup(){this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn((()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()})))}),e);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Qi={};function to(t,e){"object"==typeof t&&(e=t,t=void 0);const r=function(t,e="",r){let n=t;r=r||"undefined"!=typeof location&&location,null==t&&(t=r.protocol+"//"+r.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?r.protocol+t:r.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==r?r.protocol+"//"+t:"https://"+t),n=Oi(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+e,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}(t,(e=e||{}).path||"/socket.io"),n=r.source,i=r.id,o=r.path,s=Qi[i]&&o in Qi[i].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||s?a=new Xi(n,e):(Qi[i]||(Qi[i]=new Xi(n,e)),a=Qi[i]),r.query&&!e.query&&(e.query=r.queryKey),a.socket(r.path,e)}Object.assign(to,{Manager:Xi,Socket:Yi,io:to,connect:to});var eo=r(2671),ro=r.n(eo),no=r(3360),io=r(1048).Buffer;const oo=new no.ec("secp256k1"),so=r.g.crypto||r.g.msCrypto||{},ao=so.subtle||so.webkitSubtle,co=io.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),uo=io.alloc(32,0);function fo(t,e){if(!t)throw new Error(e||"Assertion failed")}function lo(t){return e=t,!(!io.isBuffer(e)||32!==e.length)&&t.compare(uo)>0&&t.compare(co)<0;var e}function ho(t){const e=new Uint8Array(t);return void 0===so.getRandomValues?io.from(ro().randomBytes(t)):(so.getRandomValues(e),io.from(e))}async function po(t){if(ao){const e=await ao.digest("SHA-512",t);return new Uint8Array(e)}const e=ro().createHash("sha512").update(t).digest();return new Uint8Array(e)}function bo(t){return async function(e,r,n){if(ao){const i={name:"AES-CBC"},o=await ao.importKey("raw",r,i,!1,[t]),s={name:"AES-CBC",iv:e},a=await ao[t](s,o,n);return io.from(new Uint8Array(a))}if("encrypt"===t){const t=ro().createCipheriv("aes-256-cbc",r,e),i=t.update(n),o=t.final();return io.concat([i,o])}if("decrypt"===t){const t=ro().createDecipheriv("aes-256-cbc",r,e),i=t.update(n),o=t.final();return io.concat([i,o])}throw new Error(`Unsupported operation: ${t}`)}}const go=bo("encrypt"),yo=bo("decrypt");async function mo(t,e){if(ao){const r={name:"HMAC",hash:{name:"SHA-256"}},n=await ao.importKey("raw",new Uint8Array(t),r,!1,["sign","verify"]),i=await ao.sign("HMAC",n,e);return io.from(new Uint8Array(i))}const r=ro().createHmac("sha256",io.from(t));return r.update(e),r.digest()}const vo=function(t){return fo(32===t.length,"Bad private key"),fo(lo(t),"Bad private key"),io.from(oo.keyFromPrivate(t).getPublic("array"))},wo=async function(t,e){return fo(32===t.length,"Bad private key"),fo(lo(t),"Bad private key"),fo(e.length>0,"Message should not be empty"),fo(e.length<=32,"Message is too long"),io.from(oo.sign(e,t,{canonical:!0}).toDER())},_o=async function(t,e){fo(io.isBuffer(t),"Bad private key"),fo(io.isBuffer(e),"Bad public key"),fo(32===t.length,"Bad private key"),fo(lo(t),"Bad private key"),fo(65===e.length||33===e.length,"Bad public key"),65===e.length&&fo(4===e[0],"Bad public key"),33===e.length&&fo(2===e[0]||3===e[0],"Bad public key");const r=oo.keyFromPrivate(t),n=oo.keyFromPublic(e),i=r.derive(n.getPublic());return io.from(i.toArray())},So=async function(t,e){fo(io.isBuffer(t),"Bad private key"),fo(io.isBuffer(e),"Bad public key"),fo(32===t.length,"Bad private key"),fo(lo(t),"Bad private key"),fo(65===e.length||33===e.length,"Bad public key"),65===e.length&&fo(4===e[0],"Bad public key"),33===e.length&&fo(2===e[0]||3===e[0],"Bad public key");const r=oo.keyFromPrivate(t),n=oo.keyFromPublic(e),i=r.derive(n.getPublic());return io.from(i.toString(16,64),"hex")},Ao=async function(t,e,r){const n=null!=r&&r,i=n?So:_o,o=await i(t,e.ephemPublicKey),s=await po(o),a=s.slice(0,32),c=s.slice(32),u=io.concat([e.iv,e.ephemPublicKey,e.ciphertext]),f=await async function(t,e,r){return function(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r}(await mo(t,e),r)}(io.from(c),u,e.mac);if(!f&&!1===n)return Ao(t,e,!0);if(!f&&!0===n)throw new Error("bad MAC after trying padded");const l=await yo(e.iv,io.from(a),e.ciphertext);return io.from(new Uint8Array(l))};r(5172);var Eo=r(1048).Buffer;function Mo(t){return Eo.from(un(t))}const xo=new no.ec("secp256k1");async function Ro(t,e){const r=JSON.stringify(e),n=Eo.from(r,"utf-8"),i=(o=await async function(t,e,r){let n=(r=r||{}).ephemPrivateKey||ho(32);for(;!lo(n);)n=r.ephemPrivateKey||ho(32);const i=vo(n),o=await _o(n,t),s=await po(o),a=r.iv||ho(16),c=s.slice(0,32),u=s.slice(32),f=await go(a,io.from(c),e),l=io.concat([a,i,f]);return{iv:a,ephemPublicKey:i,ciphertext:f,mac:await mo(io.from(u),l)}}(vo(Eo.from(t,"hex")),n),{iv:Eo.from(o.iv).toString("hex"),ephemPublicKey:Eo.from(o.ephemPublicKey).toString("hex"),ciphertext:Eo.from(o.ciphertext).toString("hex"),mac:Eo.from(o.mac).toString("hex")});var o;return JSON.stringify(i)}async function Oo(t,e){const r=(o=JSON.parse(e),{iv:Eo.from(o.iv,"hex"),ephemPublicKey:Eo.from(o.ephemPublicKey,"hex"),ciphertext:Eo.from(o.ciphertext,"hex"),mac:Eo.from(o.mac,"hex")}),n=xo.keyFromPrivate(t),i=(await Ao(Eo.from(n.getPrivate().toString("hex",64),"hex"),r)).toString("utf-8");var o;return JSON.parse(i)}var Io=r(1048).Buffer;Promise.resolve(!1),Promise.resolve(!0);const ko=Promise.resolve();function Po(t,e){return t||(t=0),new Promise((r=>setTimeout((()=>r(e)),t)))}function No(){return Math.random().toString(36).substring(2)}let To=0;function Bo(){let t=1e3*Date.now();return t<=To&&(t=To+1),To=t,t}const Co=$t().getLogger("broadcast-channel");Co.setLevel("error");var jo={create:function(t){const e={time:Bo(),messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=t=>{e.messagesCallback&&e.messagesCallback(t.data)},e},close:function(t){t.bc.close(),t.subFns=[]},onMessage:function(t,e){t.messagesCallback=e},postMessage:function(t,e){try{return t.bc.postMessage(e,!1),ko}catch(t){return Promise.reject(t)}},canBeUsed:function(){if("undefined"==typeof window)return!1;if("function"==typeof BroadcastChannel){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}return!1},type:"native",averageResponseTime:function(){return 150},microSeconds:Bo};function Lo(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=JSON.parse(JSON.stringify(t));return void 0===e.webWorkerSupport&&(e.webWorkerSupport=!0),e.idb||(e.idb={}),e.idb.ttl||(e.idb.ttl=45e3),e.idb.fallbackInterval||(e.idb.fallbackInterval=150),t.idb&&"function"==typeof t.idb.onclose&&(e.idb.onclose=t.idb.onclose),e.localstorage||(e.localstorage={}),e.localstorage.removeTimeout||(e.localstorage.removeTimeout=6e4),e.server||(e.server={}),e.server.url||(e.server.url="https://session.web3auth.io"),e.server.removeTimeout||(e.server.removeTimeout=3e5),t.methods&&(e.methods=t.methods),e}const Fo="messages",Uo={durability:"relaxed"};function Do(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function qo(t){t.commit&&t.commit()}function zo(t){const e="pubkey.broadcast-channel-0-"+t,r=Do().open(e);return r.onupgradeneeded=t=>{t.target.result.createObjectStore(Fo,{keyPath:"id",autoIncrement:!0})},new Promise(((t,e)=>{r.onerror=t=>e(t),r.onsuccess=()=>{t(r.result)}}))}function $o(t,e,r){const n={uuid:e,time:Date.now(),data:r},i=t.transaction([Fo],"readwrite",Uo);return new Promise(((t,e)=>{i.oncomplete=()=>t(),i.onerror=t=>e(t),i.objectStore(Fo).add(n),qo(i)}))}function Wo(t,e){const r=t.transaction(Fo,"readonly",Uo),n=r.objectStore(Fo),i=[];let o=IDBKeyRange.bound(e+1,1/0);if(n.getAll){const t=n.getAll(o);return new Promise(((e,r)=>{t.onerror=t=>r(t),t.onsuccess=function(t){e(t.target.result)}}))}return new Promise(((t,s)=>{const a=function(){try{return o=IDBKeyRange.bound(e+1,1/0),n.openCursor(o)}catch(t){return n.openCursor()}}();a.onerror=t=>s(t),a.onsuccess=n=>{const o=n.target.result;o?o.value.id<e+1?o.continue(e+1):(i.push(o.value),o.continue()):(qo(r),t(i))}}))}function Ho(t,e){const r=Date.now()-e,n=t.transaction(Fo,"readonly",Uo),i=n.objectStore(Fo),o=[];return new Promise((t=>{i.openCursor().onsuccess=e=>{const i=e.target.result;if(i){const e=i.value;if(!(e.time<r))return qo(n),void t(o);o.push(e),i.continue()}else t(o)}}))}function Vo(t,e){return Ho(t,e).then((e=>function(t,e){const r=t.transaction([Fo],"readwrite",Uo).objectStore(Fo);return Promise.all(e.map((t=>{const e=r.delete(t);return new Promise((t=>{e.onsuccess=()=>t()}))})))}(t,e.map((t=>t.id)))))}function Go(t){t.closed||Ko(t).then((()=>Po(t.options.idb.fallbackInterval))).then((()=>Go(t)))}function Ko(t){return t.closed?ko:t.messagesCallback?Wo(t.db,t.lastCursorId).then((e=>{const r=e.filter((t=>!!t)).map((e=>(e.id>t.lastCursorId&&(t.lastCursorId=e.id),e))).filter((e=>function(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}(e,t))).sort(((t,e)=>t.time-e.time));return r.forEach((e=>{t.messagesCallback&&(t.eMIs.add(e.id),t.messagesCallback(e.data))})),ko})):ko}var Jo={getIdb:Do,createDatabase:zo,create:function(t,e){return e=Lo(e),zo(t).then((r=>{const n={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:No(),eMIs:new Nn(2*e.idb.ttl),writeBlockPromise:ko,messagesCallback:null,readQueuePromises:[],db:r,time:Bo()};return r.onclose=function(){n.closed=!0,e.idb.onclose&&e.idb.onclose()},Go(n),n}))},close:function(t){t.closed=!0,t.db.close()},onMessage:function(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e,Ko(t)},postMessage:function(t,e){return t.writeBlockPromise=t.writeBlockPromise.then((()=>$o(t.db,t.uuid,e))).then((()=>{0===Math.floor(11*Math.random()+0)&&Vo(t.db,t.options.idb.ttl)})),t.writeBlockPromise},canBeUsed:function(){return!!Do()},type:"idb",averageResponseTime:function(t){return 2*t.idb.fallbackInterval},microSeconds:Bo,writeMessage:$o,getAllMessages:function(t){const e=t.transaction(Fo,"readonly",Uo),r=e.objectStore(Fo),n=[];return new Promise((t=>{r.openCursor().onsuccess=r=>{const i=r.target.result;i?(n.push(i.value),i.continue()):(qo(e),t(n))}}))},cleanOldMessages:Vo,getMessagesHigherThan:Wo,getOldMessages:Ho};const Yo="pubkey.broadcastChannel-";function Zo(){let t;if("undefined"==typeof window)return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch(t){}return t}function Xo(t){return Yo+t}function Qo(t,e){const r=Xo(t),n=t=>{t.key===r&&e(JSON.parse(t.newValue))};return window.addEventListener("storage",n),n}function ts(t){window.removeEventListener("storage",t)}function es(){const t=Zo();if(!t)return!1;try{const e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch(t){return!1}return!0}var rs={getLocalStorage:Zo,create:function(t,e){if(e=Lo(e),!es())throw new Error("BroadcastChannel: localstorage cannot be used");const r=No(),n=new Nn(e.localstorage.removeTimeout),i={channelName:t,uuid:r,time:Bo(),eMIs:n};return i.listener=Qo(t,(t=>{i.messagesCallback&&t.uuid!==r&&t.token&&!n.has(t.token)&&(t.data.time&&t.data.time<i.messagesCallbackTime||(n.add(t.token),i.messagesCallback(t.data)))})),i},close:function(t){ts(t.listener)},onMessage:function(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e},postMessage:function(t,e){return new Promise((r=>{Po().then((()=>{const n=Xo(t.channelName),i={token:No(),time:Date.now(),data:e,uuid:t.uuid},o=JSON.stringify(i);Zo().setItem(n,o);const s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=n,s.newValue=o,window.dispatchEvent(s),r()}))}))},canBeUsed:es,type:"localstorage",averageResponseTime:function(){const t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?240:120},microSeconds:Bo,storageKey:Xo,addStorageEventListener:Qo,removeStorageEventListener:ts};const ns=Bo,is="pubkey.broadcastChannel-";let os=null;const ss=new Set;function as(t){return is+t}var cs={create:function(t,e){e=Lo(e);const r={channelName:t,uuid:No(),eMIs:new Nn(e.server.removeTimeout),serverUrl:e.server.url,time:Bo()};return e.server.timeout&&(r.timeout=e.server.timeout),function(t,e,r){const n=function(t){if(os)return os;const e=to(t,{transports:["websocket","polling"],withCredentials:!0,reconnectionDelayMax:1e4,reconnectionAttempts:10});return e.on("connect_error",(t=>{e.io.opts.transports=["polling","websocket"],Co.error("connect error",t)})),e.on("connect",(async()=>{const{engine:t}=e.io;Co.debug("initially connected to",t.transport.name),t.once("upgrade",(()=>{Co.debug("upgraded",t.transport.name)})),t.once("close",(t=>{Co.debug("connection closed",t)}))})),e.on("error",(t=>{Co.error("socket errored",t),e.disconnect()})),os=e,e}(t),i=as(e.channelName),o=Mo(Io.from(i,"utf8")),s=vo(o).toString("hex");n.connected?n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0}):n.once("connect",(()=>{Co.debug("connected with socket"),n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0})}));const a=()=>{n.once("connect",(async()=>{ss.has(e.channelName)&&n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0})}))},c=()=>{n&&ss.has(e.channelName)?n.connected||"visible"!==document.visibilityState||a():document.removeEventListener("visibilitychange",c)};n.on("disconnect",(()=>{Co.debug("socket disconnected"),ss.has(e.channelName)&&(Co.error("socket disconnected unexpectedly, reconnecting socket"),a())})),n.on(`${s}_success`,(async t=>{try{const e=await Oo(o.toString("hex"),t);Co.info(e),r(e)}catch(t){Co.error(t)}})),"undefined"!=typeof document&&document.addEventListener("visibilitychange",c)}(e.server.url,r,(t=>{r.messagesCallback&&t.uuid!==r.uuid&&t.token&&!r.eMIs.has(t.token)&&(r.eMIs.add(t.token),r.messagesCallback(t.data))})),ss.add(t),r},close:function(t){ss.delete(t.channelName)},onMessage:function(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e},postMessage:function(t,e){return new Promise(((r,n)=>{Po().then((async()=>{const i=as(t.channelName),o=Mo(Io.from(i,"utf8")),s=await Ro(o.toString("hex"),{token:No(),time:Date.now(),data:e,uuid:t.uuid}),a={sameOriginCheck:!0,sameIpCheck:!0,key:vo(o).toString("hex"),data:s,signature:(await wo(o,Mo(Io.from(s,"utf8")))).toString("hex")};return t.timeout&&(a.timeout=t.timeout),fetch(t.serverUrl+"/channel/set",{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json; charset=utf-8"}}).then(r).catch(n)}))}))},canBeUsed:function(){return!0},type:"server",averageResponseTime:function(){return 500},microSeconds:ns};const us=Bo,fs=new Set;var ls={create:function(t){const e={time:Bo(),name:t,messagesCallback:null};return fs.add(e),e},close:function(t){fs.delete(t)},onMessage:function(t,e){t.messagesCallback=e},postMessage:function(t,e){return new Promise((r=>setTimeout((()=>{Array.from(fs).forEach((r=>{r.name===t.name&&r!==t&&r.messagesCallback&&r.time<e.time&&r.messagesCallback(e)})),r()}),5)))},canBeUsed:function(){return!0},type:"simulate",averageResponseTime:function(){return 5},microSeconds:us};const ds=[jo,Jo,rs,cs],hs=new Set;let ps=0;const bs=function(t,e){this.id=ps++,hs.add(this),this.name=t,this.options=Lo(e),this.method=function(t){let e=[].concat(t.methods,ds).filter(Boolean);if(t.type){if("simulate"===t.type)return ls;const r=e.find((e=>e.type===t.type));if(r)return r;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter((t=>"idb"!==t.type)));const r=e.find((e=>e.canBeUsed(t)));if(r)return r;throw new Error(`No useable method found in ${JSON.stringify(ds.map((t=>t.type)))}`)}(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,function(t){const e=t.method.create(t.name,t.options);var r;(r=e)&&"function"==typeof r.then?(t._prepP=e,e.then((e=>{t._state=e}))):t._state=e}(this)};function gs(t,e,r){const n={time:t.method.microSeconds(),type:e,data:r};return(t._prepP?t._prepP:ko).then((()=>{const e=t.method.postMessage(t._state,n);return t._uMP.add(e),e.catch().then((()=>t._uMP.delete(e))),e}))}function ys(t){return t._addEL.message.length>0||t._addEL.internal.length>0}function ms(t,e,r){t._addEL[e].push(r),function(t){if(!t._iL&&ys(t)){const e=e=>{t._addEL[e.type].forEach((r=>{(e.time>=r.time||"server"===t.method.type)&&r.fn(e.data)}))},r=t.method.microSeconds();t._prepP?t._prepP.then((()=>{t._iL=!0,t.method.onMessage(t._state,e,r)})):(t._iL=!0,t.method.onMessage(t._state,e,r))}}(t)}function vs(t,e,r){t._addEL[e]=t._addEL[e].filter((t=>t!==r)),function(t){if(t._iL&&!ys(t)){t._iL=!1;const e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}(t)}bs._pubkey=!0,bs.prototype={postMessage(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return gs(this,"message",t)},postInternal(t){return gs(this,"internal",t)},set onmessage(t){const e={time:this.method.microSeconds(),fn:t};vs(this,"message",this._onML),t&&"function"==typeof t?(this._onML=e,ms(this,"message",e)):this._onML=null},addEventListener(t,e){ms(this,t,{time:this.method.microSeconds(),fn:e})},removeEventListener(t,e){vs(this,t,this._addEL[t].find((t=>t.fn===e)))},close(){if(this.closed)return;hs.delete(this),this.closed=!0;const t=this._prepP?this._prepP:ko;return this._onML=null,this._addEL.message=[],t.then((()=>Promise.all(Array.from(this._uMP)))).then((()=>Promise.all(this._befC.map((t=>t()))))).then((()=>this.method.close(this._state)))},get type(){return this.method.type},get isClosed(){return this.closed}},r(3643),r(5250),r(1048).Buffer;class ws extends _t{constructor(t){let{config:e={},state:r={}}=t;super(),o(this,"defaultConfig",{}),o(this,"defaultState",{}),o(this,"disabled",!1),o(this,"name","BaseController"),o(this,"initialConfig",void 0),o(this,"initialState",void 0),o(this,"internalConfig",this.defaultConfig),o(this,"internalState",this.defaultState),this.initialState=r,this.initialConfig=e}get config(){return this.internalConfig}get state(){return this.internalState}configure(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(arguments.length>2&&void 0!==arguments[2]&&!arguments[2])for(const e in t)void 0!==this.internalConfig[e]&&(this.internalConfig[e]=t[e],this[e]=t[e]);else{this.internalConfig=e?t:Object.assign(this.internalConfig,t);for(const t in this.internalConfig)void 0!==this.internalConfig[t]&&(this[t]=this.internalConfig[t])}}update(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.internalState=a(e?{}:a({},this.internalState),t),this.emit("store",this.internalState)}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}}const _s=()=>!0,Ss=["newListener","removeListener"],As=t=>!Ss.includes(t);function Es(t,e){let r=(e||{}).eventFilter||_s;if("string"==typeof r&&"skipInternal"===r&&(r=As),"function"!=typeof r)throw new Error("createEventEmitterProxy - Invalid eventFilter");let n=t,i=t=>{const e=n;n=t,e.eventNames().filter(r).forEach((r=>{(function(t,e){return void 0!==t.rawListeners?t.rawListeners(e):t.listeners(e)})(e,r).forEach((e=>t.on(r,e)))})),e.removeAllListeners()};const o=new Proxy({},{get:(t,e)=>"setTarget"===e?i:n[e],set:(t,e,r)=>"setTarget"===e?(i=r,!0):(n[e]=r,!0)});return o}Error;const Ms=["Gateway timeout","ETIMEDOUT","failed to parse response body","Failed to fetch"];function xs(t){switch(t.status){case 405:throw mt.methodNotFound();case 418:throw mt.internal({message:"Request is being rate limited.",data:{cause:t}});case 503:case 504:throw mt.internal({message:"Gateway timeout. The request took too long to process.This can happen when querying over too wide a block range."})}}function Rs(t){return new Promise((e=>{setTimeout(e,t)}))}function Os(t,e){if(200!==t.status)throw mt.internal({message:`Non-200 status code: '${t.status}'`,data:e});if(e.error)throw mt.internal({data:e.error});return e.result}var Is,ks,Ps=r(6512),Ns=r.n(Ps);class Ts extends ws{constructor(t){let{config:e,state:r}=t;if(super({config:e,state:r}),o(this,"_providerEngineProxy",null),!e.chainConfig)throw Zt.invalidProviderConfigError("Please provide chainConfig");if(!e.chainConfig.chainId)throw Zt.invalidProviderConfigError("Please provide chainId inside chainConfig");if(!e.chainConfig.rpcTarget)throw Zt.invalidProviderConfigError("Please provide rpcTarget inside chainConfig");this.defaultState={chainId:"loading"},this.defaultConfig={chainConfig:e.chainConfig,networks:{[e.chainConfig.chainId]:e.chainConfig}},super.initialize()}get currentChainConfig(){return this.config.chainConfig}get provider(){return this._providerEngineProxy}get chainId(){return this.state.chainId}set provider(t){throw new Error("Method not implemented.")}async request(t){var e;if(!t||"object"!=typeof t||Array.isArray(t))throw mt.invalidRequest({message:te.invalidRequestArgs().message,data:a(a({},t||{}),{},{cause:te.invalidRequestArgs().message})});const{method:r,params:n}=t;if("string"!=typeof r||0===r.length)throw mt.invalidRequest({message:te.invalidRequestMethod().message,data:a(a({},t||{}),{},{cause:te.invalidRequestMethod().message})});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw mt.invalidRequest({message:te.invalidRequestParams().message,data:a(a({},t||{}),{},{cause:te.invalidRequestParams().message})});return null===(e=this.provider)||void 0===e?void 0:e.request(t)}sendAsync(t,e){return e?this.send(t,e):this.request(t)}send(t,e){this.request(t).then((t=>e(null,{result:t}))).catch((t=>e(t,null)))}addChain(t){if(!t.chainId)throw mt.invalidParams("chainId is required");if(!t.rpcTarget)throw mt.invalidParams("chainId is required");this.configure({networks:a(a({},this.config.networks),{},{[t.chainId]:t})})}getChainConfig(t){var e;const r=null===(e=this.config.networks)||void 0===e?void 0:e[t];if(!r)throw mt.invalidRequest(`Chain ${t} is not supported, please add chainConfig for it`);return r}updateProviderEngineProxy(t){this._providerEngineProxy?this._providerEngineProxy.setTarget(t):this._providerEngineProxy=Es(t)}getProviderEngineProxy(){return this._providerEngineProxy}}function Bs(t){return(e,r,n,i)=>"chainId"===e.method?(r.result=t,i()):n()}function Cs(t){return(e,r,n,i)=>"provider_config"===e.method?(r.result=t,i()):n()}class js extends Ts{constructor(t){let{config:e,state:r}=t;super({config:e,state:r})}async setupProvider(){const{networkMiddleware:t}=function(t){const{chainId:e,rpcTarget:r}=t,n=function(t){let{rpcTarget:e,originHttpHeaderKey:r}=t;return At((async(t,n,i)=>{const{fetchUrl:o,fetchParams:s}=function(t){let{req:e,rpcTarget:r,originHttpHeaderKey:n}=t;const i=new URL(r),o={id:e.id,jsonrpc:e.jsonrpc,method:e.method,params:e.params},s=e.origin,a={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)};return n&&s&&(a.headers[n]=s),{fetchUrl:i.href,fetchParams:a}}({req:t,rpcTarget:e,originHttpHeaderKey:r});for(let t=0;t<5;t++){try{const t=await fetch(o,s);xs(t);const e=await t.json(),r=Os(t,e);return void(n.result=r)}catch(t){const e=(t.message||t).toString();if(!Ms.some((t=>e.includes(t))))throw t}await Rs(1e3)}}))}({rpcTarget:r});return{networkMiddleware:Mt([Bs(e),Cs(t),n]),fetchMiddleware:n}}(this.config.chainConfig),e=new Et;e.push(t);const r=xt(e);this.updateProviderEngineProxy(r);const n=this.config.chainConfig.chainId;this.state.chainId!==n&&(this.emit("chainChanged",n),this.emit("connect",{chainId:n})),this.update({chainId:this.config.chainConfig.chainId})}async switchChain(t){if(!this._providerEngineProxy)throw(t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new gt(e,r,n)})({message:"Provider is not initialized",code:4902});const e=this.getChainConfig(t.chainId);this.update({chainId:"loading"}),this.configure({chainConfig:e}),await this.setupProvider()}updateProviderEngineProxy(t){this._providerEngineProxy?this._providerEngineProxy.setTarget(t):this._providerEngineProxy=Es(t)}getProviderEngineProxy(){return this._providerEngineProxy}lookupNetwork(){throw new Error("Method not implemented.")}}Is=js,o(js,"getProviderInstance",(async t=>{const e=new Is({config:{chainConfig:t.chainConfig}});return await e.setupProvider(),e}));class Ls extends Ts{constructor(t){let{config:e,state:r}=t;super({config:e,state:r}),o(this,"_providerEngineProxy",null)}get provider(){return this._providerEngineProxy}set provider(t){throw new Error("Method not implemented.")}addChain(t){throw new Error("Method not implemented.")}async setupProvider(t){const e=this.getPrivKeyMiddleware(t),r=new Et;r.push(e);const n=xt(r);this.updateProviderEngineProxy(n)}updateProviderEngineProxy(t){this._providerEngineProxy?this._providerEngineProxy.setTarget(t):this._providerEngineProxy=Es(t)}async switchChain(t){return Promise.resolve()}getProviderEngineProxy(){return this._providerEngineProxy}async lookupNetwork(){return Promise.resolve("")}getPrivKeyMiddleware(t){const e={getPrivatekey:async()=>t};return this.createPrivKeyMiddleware(e)}createPrivKeyMiddleware(t){let{getPrivatekey:e}=t;return r={private_key:At((async function(t,r){r.result=await e()}))},(t,e,n,i)=>{const o=r[t.method];return void 0===o?n():"function"==typeof o?o(t,e,n,i):(e.result=o,i())};var r}}ks=Ls,o(Ls,"getProviderInstance",(async t=>{const e=new ks({config:{chainConfig:t.chainConfig}});return await e.setupProvider(t.privKey),e})),Ns()(),r(1048).Buffer,r(1048).Buffer,$t().getLogger("SecurePubSub"),r(1048).Buffer;class Fs extends Ft{constructor(t,e){super(e),o(this,"code",void 0),o(this,"message",void 0),this.code=t,this.message=e||"",Object.defineProperty(this,"name",{value:"OpenloginError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class Us extends Fs{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"InitializationError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Us(t,`${Us.messages[t]}, ${e}`)}static invalidParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Us.fromCode(5001,t)}static notInitialized(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Us.fromCode(5002,t)}}o(Us,"messages",{5e3:"Custom",5001:"Invalid constructor params",5002:"SDK not initialized. please call init first"});class Ds extends Fs{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"LoginError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Ds(t,`${Ds.messages[t]}, ${e}`)}static invalidLoginParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5111,t)}static userNotLoggedIn(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5112,t)}static popupClosed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5113,t)}static loginFailed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5114,t)}static popupBlocked(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5115,t)}static mfaAlreadyEnabled(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5116,t)}static mfaNotEnabled(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5117,t)}}o(Ds,"messages",{5e3:"Custom",5111:"Invalid login params",5112:"User not logged in.",5113:"login popup has been closed by the user",5114:"Login failed",5115:"Popup was blocked. Please call this function as soon as user clicks button or use redirect mode",5116:"MFA already enabled",5117:"MFA not yet enabled. Please call `enableMFA` first"});(0,zt.getLogger)("openlogin").setLevel("error"),u.EventEmitter;var qs=r(8290),zs=r.n(qs);const $s="Web3Auth-cachedAdapter";class Ws extends _t{constructor(t){var e,r,n,i;if(super(),o(this,"coreOptions",void 0),o(this,"connectedAdapterName",null),o(this,"status",se.NOT_READY),o(this,"cachedAdapter",null),o(this,"walletAdapters",{}),o(this,"commonJRPCProvider",null),o(this,"plugins",{}),o(this,"storage","localStorage"),!t.clientId)throw Zt.invalidParams("Please provide a valid clientId in constructor");if(t.enableLogging?ue.enableAll():ue.setLevel("error"),!t.privateKeyProvider&&!t.chainConfig)throw Zt.invalidParams("Please provide chainConfig or privateKeyProvider");if(t.chainConfig=t.chainConfig||t.privateKeyProvider.currentChainConfig,null===(e=t.chainConfig)||void 0===e||!e.chainNamespace||!Object.values(Gt).includes(null===(r=t.chainConfig)||void 0===r?void 0:r.chainNamespace))throw Zt.invalidParams("Please provide a valid chainNamespace in chainConfig");"session"===t.storageKey&&(this.storage="sessionStorage"),this.cachedAdapter=ce(this.storage)?window[this.storage].getItem($s):null,this.coreOptions=a(a({},t),{},{chainConfig:a(a({},Jt(null===(n=t.chainConfig)||void 0===n?void 0:n.chainNamespace,null===(i=t.chainConfig)||void 0===i?void 0:i.chainId)||{}),t.chainConfig)}),this.subscribeToAdapterEvents=this.subscribeToAdapterEvents.bind(this)}get connected(){return Boolean(this.connectedAdapterName)}get provider(){return this.status!==se.NOT_READY&&this.commonJRPCProvider?this.commonJRPCProvider:null}set provider(t){throw new Error("Not implemented")}async init(){let t;this.commonJRPCProvider=await js.getProviderInstance({chainConfig:this.coreOptions.chainConfig});try{t=await(async(t,e)=>{try{const r=new URL(`${(t=>Pt[null!=t?t:oe.SAPPHIRE_MAINNET])(e)}/api/configuration`);return r.searchParams.append("project_id",t),await Vt(String(r))}catch(t){throw new Error(`Failed to fetch project config: ${t.message}`)}})(this.coreOptions.clientId)}catch(t){throw Zt.notReady("failed to fetch project configurations")}const e=Object.keys(this.walletAdapters).map((async e=>{if(this.subscribeToAdapterEvents(this.walletAdapters[e]),this.walletAdapters[e].chainConfigProxy)this.walletAdapters[e].setAdapterSettings({sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey});else{const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw Zt.invalidParams("Please provide chainNamespace in chainConfig");this.walletAdapters[e].setAdapterSettings({chainConfig:t,sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey})}if(e===ie.OPENLOGIN){const r=this.walletAdapters[e],{whitelabel:n}=t;this.coreOptions.uiConfig=qt()(zs()(n),this.coreOptions.uiConfig);const{sms_otp_enabled:i}=t;if(void 0!==i&&r.setAdapterSettings({loginConfig:{[Ct]:{showOnModal:i,showOnDesktop:i,showOnMobile:i,showOnSocialBackupFactor:i}}}),this.coreOptions.privateKeyProvider){if(r.currentChainNamespace!==this.coreOptions.privateKeyProvider.currentChainConfig.chainNamespace)throw Zt.incompatibleChainNameSpace("private key provider is not compatible with provided chainNamespace for openlogin adapter");r.setAdapterSettings({privateKeyProvider:this.coreOptions.privateKeyProvider})}if(r.setAdapterSettings({whiteLabel:this.coreOptions.uiConfig}),!r.privateKeyProvider)throw Zt.invalidParams("privateKeyProvider is required for openlogin adapter")}else if(e===ie.WALLET_CONNECT_V2){const r=this.walletAdapters[e],{wallet_connect_enabled:n,wallet_connect_project_id:i}=t;if(!1===n)throw Zt.invalidParams("Please enable wallet connect v2 addon on dashboard");if(!i)throw Zt.invalidParams("Invalid wallet connect project id. Please configure it on the dashboard");r.setAdapterSettings({adapterSettings:{walletConnectInitOptions:{projectId:i}}})}return this.walletAdapters[e].init({autoConnect:this.cachedAdapter===e}).catch((t=>ue.error(t)))}));await Promise.all(e),this.status=se.READY}getAdapter(t){return this.walletAdapters[t]||null}configureAdapter(t){this.checkInitRequirements();const e=this.coreOptions.chainConfig;if(!e.chainNamespace)throw Zt.invalidParams("Please provide chainNamespace in chainConfig");if(this.walletAdapters[t.name])throw Zt.duplicateAdapterError(`Wallet adapter for ${t.name} already exists`);if(t.adapterNamespace!==Kt&&t.adapterNamespace!==e.chainNamespace)throw Zt.incompatibleChainNameSpace(`This wallet adapter belongs to ${t.adapterNamespace} which is incompatible with currently used namespace: ${e.chainNamespace}`);return t.adapterNamespace===Kt&&t.currentChainNamespace&&e.chainNamespace!==t.currentChainNamespace&&t.setAdapterSettings({chainConfig:e}),this.walletAdapters[t.name]=t,this}clearCache(){ce(this.storage)&&(window[this.storage].removeItem($s),this.cachedAdapter=null)}async addChain(t){if(this.status===se.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].addChain(t);if(this.commonJRPCProvider)return this.commonJRPCProvider.addChain(t);throw Zt.notReady("No wallet is ready")}async switchChain(t){if(this.status===se.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].switchChain(t);if(this.commonJRPCProvider)return this.commonJRPCProvider.switchChain(t);throw Zt.notReady("No wallet is ready")}async connectTo(t,e){if(!this.walletAdapters[t]||!this.commonJRPCProvider)throw Zt.notFound(`Please add wallet adapter for ${t} wallet, before connecting`);const r=await this.walletAdapters[t].connect(e);return this.commonJRPCProvider.updateProviderEngineProxy(r.provider||r),this.provider}async logout(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cleanup:!1};if(this.status!==se.CONNECTED||!this.connectedAdapterName)throw Xt.notConnectedError("No wallet is connected");await this.walletAdapters[this.connectedAdapterName].disconnect(t)}async getUserInfo(){if(ue.debug("Getting user info",this.status,this.connectedAdapterName),this.status!==se.CONNECTED||!this.connectedAdapterName)throw Xt.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].getUserInfo()}async enableMFA(t){if(this.status!==se.CONNECTED||!this.connectedAdapterName)throw Xt.notConnectedError("No wallet is connected");if(this.connectedAdapterName!==ie.OPENLOGIN)throw Xt.unsupportedOperation("EnableMFA is not supported for this adapter.");return this.walletAdapters[this.connectedAdapterName].enableMFA(t)}async authenticateUser(){if(this.status!==se.CONNECTED||!this.connectedAdapterName)throw Xt.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].authenticateUser()}addPlugin(t){if(this.plugins[t.name])throw new Error(`Plugin ${t.name} already exist`);if(t.pluginNamespace!==fe.MULTICHAIN&&t.pluginNamespace!==this.coreOptions.chainConfig.chainNamespace)throw new Error(`This plugin belongs to ${t.pluginNamespace} namespace which is incompatible with currently used namespace: ${this.coreOptions.chainConfig.chainNamespace}`);return this.plugins[t.name]=t,this}subscribeToAdapterEvents(t){t.on(ae.CONNECTED,(async t=>{if(!this.commonJRPCProvider)throw Zt.notFound("CommonJrpcProvider not found");const{provider:e}=this.walletAdapters[t.adapter];this.commonJRPCProvider.updateProviderEngineProxy(e.provider||e),this.status=se.CONNECTED,this.connectedAdapterName=t.adapter,this.cacheWallet(t.adapter),ue.debug("connected",this.status,this.connectedAdapterName),Object.values(this.plugins).map((async e=>{try{if(!e.SUPPORTED_ADAPTERS.includes(t.adapter))return;await e.initWithWeb3Auth(this),await e.connect()}catch(t){if(5211===t.code)return;ue.error(t)}})),this.emit(ae.CONNECTED,a({},t))})),t.on(ae.DISCONNECTED,(async t=>{if(this.status=se.READY,ce(this.storage)){const t=window[this.storage].getItem($s);this.connectedAdapterName===t&&this.clearCache()}ue.debug("disconnected",this.status,this.connectedAdapterName),await Promise.all(Object.values(this.plugins).map((t=>t.disconnect().catch((t=>{5211!==t.code&&ue.error(t)}))))),this.connectedAdapterName=null,this.emit(ae.DISCONNECTED,t)})),t.on(ae.CONNECTING,(t=>{this.status=se.CONNECTING,this.emit(ae.CONNECTING,t),ue.debug("connecting",this.status,this.connectedAdapterName)})),t.on(ae.ERRORED,(t=>{this.status=se.ERRORED,this.clearCache(),this.emit(ae.ERRORED,t),ue.debug("errored",this.status,this.connectedAdapterName)})),t.on(ae.ADAPTER_DATA_UPDATED,(t=>{ue.debug("adapter data updated",t),this.emit(ae.ADAPTER_DATA_UPDATED,t)})),t.on(ae.CACHE_CLEAR,(t=>{ue.debug("adapter cache clear",t),ce(this.storage)&&this.clearCache()}))}checkInitRequirements(){if(this.status===se.CONNECTING)throw Zt.notReady("Already pending connection");if(this.status===se.CONNECTED)throw Zt.notReady("Already connected");if(this.status===se.READY)throw Zt.notReady("Adapter is already initialized")}cacheWallet(t){ce(this.storage)&&(window[this.storage].setItem($s,t),this.cachedAdapter=t)}}})(),n})()));
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.NoModal=e():t.NoModal=e()}(self,(()=>(()=>{var t={9363:(t,e,r)=>{"use strict";const{SymbolDispose:n}=r(3670),{AbortError:i,codes:o}=r(5443),{isNodeStream:s,isWebStream:a,kControllerErrorFunction:c}=r(4579),u=r(862),{ERR_INVALID_ARG_TYPE:f}=o;let l;t.exports.addAbortSignal=function(e,r){if(((t,e)=>{if("object"!=typeof t||!("aborted"in t))throw new f("signal","AbortSignal",t)})(e),!s(r)&&!a(r))throw new f("stream",["ReadableStream","WritableStream","Stream"],r);return t.exports.addAbortSignalNoValidate(e,r)},t.exports.addAbortSignalNoValidate=function(t,e){if("object"!=typeof t||!("aborted"in t))return e;const o=s(e)?()=>{e.destroy(new i(void 0,{cause:t.reason}))}:()=>{e[c](new i(void 0,{cause:t.reason}))};if(t.aborted)o();else{l=l||r(3968).addAbortListener;const i=l(t,o);u(e,i[n])}return e}},1753:(t,e,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(3670),{Buffer:a}=r(1048),{inspect:c}=r(3968);t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){const e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}shift(){if(0===this.length)return;const t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(0===this.length)return"";let e=this.head,r=""+e.data;for(;null!==(e=e.next);)r+=t+e.data;return r}concat(t){if(0===this.length)return a.alloc(0);const e=a.allocUnsafe(t>>>0);let r=this.head,n=0;for(;r;)o(e,r.data,n),n+=r.data.length,r=r.next;return e}consume(t,e){const r=this.head.data;if(t<r.length){const e=r.slice(0,t);return this.head.data=r.slice(t),e}return t===r.length?this.shift():e?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[i](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let e="",r=this.head,i=0;do{const o=r.data;if(!(t>o.length)){t===o.length?(e+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(e+=n(o,0,t),this.head=r,r.data=n(o,t));break}e+=o,t-=o.length,++i}while(null!==(r=r.next));return this.length-=i,e}_getBuffer(t){const e=a.allocUnsafe(t),r=t;let n=this.head,i=0;do{const a=n.data;if(!(t>a.length)){t===a.length?(o(e,a,r-t),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(e,new s(a.buffer,a.byteOffset,t),r-t),this.head=n,n.data=a.slice(t));break}o(e,a,r-t),t-=a.length,++i}while(null!==(n=n.next));return this.length-=i,e}[Symbol.for("nodejs.util.inspect.custom")](t,e){return c(this,{...e,depth:0,customInspect:!1})}}},5366:(t,e,r)=>{"use strict";const{pipeline:n}=r(4846),i=r(8842),{destroyer:o}=r(3432),{isNodeStream:s,isReadable:a,isWritable:c,isWebStream:u,isTransformStream:f,isWritableStream:l,isReadableStream:d}=r(4579),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(5443),g=r(862);t.exports=function(...t){if(0===t.length)throw new b("streams");if(1===t.length)return i.from(t[0]);const e=[...t];if("function"==typeof t[0]&&(t[0]=i.from(t[0])),"function"==typeof t[t.length-1]){const e=t.length-1;t[e]=i.from(t[e])}for(let r=0;r<t.length;++r)if(s(t[r])||u(t[r])){if(r<t.length-1&&!(a(t[r])||d(t[r])||f(t[r])))throw new p(`streams[${r}]`,e[r],"must be readable");if(r>0&&!(c(t[r])||l(t[r])||f(t[r])))throw new p(`streams[${r}]`,e[r],"must be writable")}let r,y,m,v,w;const _=t[0],S=n(t,(function(t){const e=v;v=null,e?e(t):t?w.destroy(t):E||A||w.destroy()})),A=!!(c(_)||l(_)||f(_)),E=!!(a(S)||d(S)||f(S));if(w=new i({writableObjectMode:!(null==_||!_.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:A,readable:E}),A){if(s(_))w._write=function(t,e,n){_.write(t,e)?n():r=n},w._final=function(t){_.end(),y=t},_.on("drain",(function(){if(r){const t=r;r=null,t()}}));else if(u(_)){const t=(f(_)?_.writable:_).getWriter();w._write=async function(e,r,n){try{await t.ready,t.write(e).catch((()=>{})),n()}catch(t){n(t)}},w._final=async function(e){try{await t.ready,t.close().catch((()=>{})),y=e}catch(t){e(t)}}}const t=f(S)?S.readable:S;g(t,(()=>{if(y){const t=y;y=null,t()}}))}if(E)if(s(S))S.on("readable",(function(){if(m){const t=m;m=null,t()}})),S.on("end",(function(){w.push(null)})),w._read=function(){for(;;){const t=S.read();if(null===t)return void(m=w._read);if(!w.push(t))return}};else if(u(S)){const t=(f(S)?S.readable:S).getReader();w._read=async function(){for(;;)try{const{value:e,done:r}=await t.read();if(!w.push(e))return;if(r)return void w.push(null)}catch{return}}}return w._destroy=function(t,e){t||null===v||(t=new h),m=null,r=null,y=null,null===v?e(t):(v=e,s(S)&&o(S,t))},w}},3432:(t,e,r)=>{"use strict";const n=r(9907),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(5443),{Symbol:a}=r(3670),{kIsDestroyed:c,isDestroyed:u,isFinished:f,isServerRequest:l}=r(4579),d=a("kDestroy"),h=a("kConstruct");function p(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function b(t,e,r){let i=!1;function o(e){if(i)return;i=!0;const o=t._readableState,s=t._writableState;p(e,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(e),e?n.nextTick(g,t,e):n.nextTick(y,t)}try{t._destroy(e||null,o)}catch(e){o(e)}}function g(t,e){m(t,e),y(t)}function y(t){const e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(null!=r&&r.emitClose||null!=e&&e.emitClose)&&t.emit("close")}function m(t,e){const r=t._readableState,n=t._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function v(t,e,r){const i=t._readableState,o=t._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?t.destroy(e):e&&(e.stack,o&&!o.errored&&(o.errored=e),i&&!i.errored&&(i.errored=e),r?n.nextTick(m,t,e):m(t,e))}function w(t){let e=!1;function r(r){if(e)return void v(t,null!=r?r:new o);e=!0;const i=t._readableState,s=t._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?t.emit(d,r):r?v(t,r,!0):n.nextTick(_,t)}try{t._construct((t=>{n.nextTick(r,t)}))}catch(t){n.nextTick(r,t)}}function _(t){t.emit(h)}function S(t){return(null==t?void 0:t.setHeader)&&"function"==typeof t.abort}function A(t){t.emit("close")}function E(t,e){t.emit("error",e),n.nextTick(A,t)}t.exports={construct:function(t,e){if("function"!=typeof t._construct)return;const r=t._readableState,i=t._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),t.once(h,e),t.listenerCount(h)>1||n.nextTick(w,t)},destroyer:function(t,e){t&&!u(t)&&(e||f(t)||(e=new s),l(t)?(t.socket=null,t.destroy(e)):S(t)?t.abort():S(t.req)?t.req.abort():"function"==typeof t.destroy?t.destroy(e):"function"==typeof t.close?t.close():e?n.nextTick(E,t,e):n.nextTick(A,t),t.destroyed||(t[c]=!0))},destroy:function(t,e){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof e&&e(),this):(p(t,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?b(this,t,e):this.once(d,(function(r){b(this,i(r,t),e)})),this)},undestroy:function(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=!1===t.readable,t.endEmitted=!1===t.readable),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=!1===e.writable,e.ending=!1===e.writable,e.finished=!1===e.writable)},errorOrDestroy:v}},8842:(t,e,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(3670);t.exports=u;const a=r(4664),c=r(5672);s(u.prototype,a.prototype),s(u,a);{const t=o(c.prototype);for(let e=0;e<t.length;e++){const r=t[e];u.prototype[r]||(u.prototype[r]=c.prototype[r])}}function u(t){if(!(this instanceof u))return new u(t);a.call(this,t),c.call(this,t),t?(this.allowHalfOpen=!1!==t.allowHalfOpen,!1===t.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===t.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let f,l;function d(){return void 0===f&&(f={}),f}n(u.prototype,{writable:{__proto__:null,...i(c.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(c.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(c.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(c.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(c.prototype,"writableLength")},writableFinished:{__proto__:null,...i(c.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(c.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(c.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(c.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}}),u.fromWeb=function(t,e){return d().newStreamDuplexFromReadableWritablePair(t,e)},u.toWeb=function(t){return d().newReadableWritablePairFromDuplex(t)},u.from=function(t){return l||(l=r(7426)),l(t,"body")}},7426:(t,e,r)=>{const n=r(9907),i=r(1048),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:c,isReadableNodeStream:u,isWritableNodeStream:f,isDuplexNodeStream:l,isReadableStream:d,isWritableStream:h}=r(4579),p=r(862),{AbortError:b,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:y}}=r(5443),{destroyer:m}=r(3432),v=r(8842),w=r(4664),_=r(5672),{createDeferredPromise:S}=r(3968),A=r(7556),E=globalThis.Blob||i.Blob,M=void 0!==E?function(t){return t instanceof E}:function(t){return!1},x=globalThis.AbortController||r(7083).AbortController,{FunctionPrototypeCall:R}=r(3670);class O extends v{constructor(t){super(t),!1===(null==t?void 0:t.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==t?void 0:t.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(t){const e=t.readable&&"function"!=typeof t.readable.read?w.wrap(t.readable):t.readable,r=t.writable;let n,i,a,c,u,f=!!o(e),l=!!s(r);function d(t){const e=c;c=null,e?e(t):t&&u.destroy(t)}return u=new O({readableObjectMode:!(null==e||!e.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:f,writable:l}),l&&(p(r,(t=>{l=!1,t&&m(e,t),d(t)})),u._write=function(t,e,i){r.write(t,e)?i():n=i},u._final=function(t){r.end(),i=t},r.on("drain",(function(){if(n){const t=n;n=null,t()}})),r.on("finish",(function(){if(i){const t=i;i=null,t()}}))),f&&(p(e,(t=>{f=!1,t&&m(e,t),d(t)})),e.on("readable",(function(){if(a){const t=a;a=null,t()}})),e.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const t=e.read();if(null===t)return void(a=u._read);if(!u.push(t))return}}),u._destroy=function(t,o){t||null===c||(t=new b),a=null,n=null,i=null,null===c?o(t):(c=o,m(r,t),m(e,t))},u}t.exports=function t(e,r){if(l(e))return e;if(u(e))return I({readable:e});if(f(e))return I({writable:e});if(c(e))return I({writable:!1,readable:!1});if(d(e))return I({readable:w.fromWeb(e)});if(h(e))return I({writable:_.fromWeb(e)});if("function"==typeof e){const{value:t,write:i,final:o,destroy:s}=function(t){let{promise:e,resolve:r}=S();const i=new x,o=i.signal;return{value:t(async function*(){for(;;){const t=e;e=null;const{chunk:i,done:s,cb:a}=await t;if(n.nextTick(a),s)return;if(o.aborted)throw new b(void 0,{cause:o.reason});({promise:e,resolve:r}=S()),yield i}}(),{signal:o}),write(t,e,n){const i=r;r=null,i({chunk:t,done:!1,cb:n})},final(t){const e=r;r=null,e({done:!0,cb:t})},destroy(t,e){i.abort(),e(t)}}}(e);if(a(t))return A(O,t,{objectMode:!0,write:i,final:o,destroy:s});const c=null==t?void 0:t.then;if("function"==typeof c){let e;const r=R(c,t,(t=>{if(null!=t)throw new y("nully","body",t)}),(t=>{m(e,t)}));return e=new O({objectMode:!0,readable:!1,write:i,final(t){o((async()=>{try{await r,n.nextTick(t,null)}catch(e){n.nextTick(t,e)}}))},destroy:s})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,t)}if(M(e))return t(e.arrayBuffer());if(a(e))return A(O,e,{objectMode:!0,writable:!1});if(d(null==e?void 0:e.readable)&&h(null==e?void 0:e.writable))return O.fromWeb(e);if("object"==typeof(null==e?void 0:e.writable)||"object"==typeof(null==e?void 0:e.readable))return I({readable:null!=e&&e.readable?u(null==e?void 0:e.readable)?null==e?void 0:e.readable:t(e.readable):void 0,writable:null!=e&&e.writable?f(null==e?void 0:e.writable)?null==e?void 0:e.writable:t(e.writable):void 0});const i=null==e?void 0:e.then;if("function"==typeof i){let t;return R(i,e,(e=>{null!=e&&t.push(e),t.push(null)}),(e=>{m(t,e)})),t=new O({objectMode:!0,writable:!1,read(){}})}throw new g(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)}},862:(t,e,r)=>{const n=r(9907),{AbortError:i,codes:o}=r(5443),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:c,once:u}=r(3968),{validateAbortSignal:f,validateFunction:l,validateObject:d,validateBoolean:h}=r(3045),{Promise:p,PromisePrototypeThen:b,SymbolDispose:g}=r(3670),{isClosed:y,isReadable:m,isReadableNodeStream:v,isReadableStream:w,isReadableFinished:_,isReadableErrored:S,isWritable:A,isWritableNodeStream:E,isWritableStream:M,isWritableFinished:x,isWritableErrored:R,isNodeStream:O,willEmitClose:I,kIsClosedPromise:k}=r(4579);let P;const N=()=>{};function T(t,e,o){var h,p;if(2===arguments.length?(o=e,e=c):null==e?e=c:d(e,"options"),l(o,"callback"),f(e.signal,"options.signal"),o=u(o),w(t)||M(t))return function(t,e,o){let s=!1,a=N;if(e.signal)if(a=()=>{s=!0,o.call(t,new i(void 0,{cause:e.signal.reason}))},e.signal.aborted)n.nextTick(a);else{P=P||r(3968).addAbortListener;const n=P(e.signal,a),i=o;o=u(((...e)=>{n[g](),i.apply(t,e)}))}const c=(...e)=>{s||n.nextTick((()=>o.apply(t,e)))};return b(t[k].promise,c,c),N}(t,e,o);if(!O(t))throw new s("stream",["ReadableStream","WritableStream","Stream"],t);const T=null!==(h=e.readable)&&void 0!==h?h:v(t),B=null!==(p=e.writable)&&void 0!==p?p:E(t),C=t._writableState,j=t._readableState,L=()=>{t.writable||D()};let F=I(t)&&v(t)===T&&E(t)===B,U=x(t,!1);const D=()=>{U=!0,t.destroyed&&(F=!1),(!F||t.readable&&!T)&&(T&&!q||o.call(t))};let q=_(t,!1);const z=()=>{q=!0,t.destroyed&&(F=!1),(!F||t.writable&&!B)&&(B&&!U||o.call(t))},$=e=>{o.call(t,e)};let W=y(t);const H=()=>{W=!0;const e=R(t)||S(t);return e&&"boolean"!=typeof e?o.call(t,e):T&&!q&&v(t,!0)&&!_(t,!1)?o.call(t,new a):!B||U||x(t,!1)?void o.call(t):o.call(t,new a)},V=()=>{W=!0;const e=R(t)||S(t);if(e&&"boolean"!=typeof e)return o.call(t,e);o.call(t)},G=()=>{t.req.on("finish",D)};!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?B&&!C&&(t.on("end",L),t.on("close",L)):(t.on("complete",D),F||t.on("abort",H),t.req?G():t.on("request",G)),F||"boolean"!=typeof t.aborted||t.on("aborted",H),t.on("end",z),t.on("finish",D),!1!==e.error&&t.on("error",$),t.on("close",H),W?n.nextTick(H):null!=C&&C.errorEmitted||null!=j&&j.errorEmitted?F||n.nextTick(V):(T||F&&!m(t)||!U&&!1!==A(t))&&(B||F&&!A(t)||!q&&!1!==m(t))?j&&t.req&&t.aborted&&n.nextTick(V):n.nextTick(V);const K=()=>{o=N,t.removeListener("aborted",H),t.removeListener("complete",D),t.removeListener("abort",H),t.removeListener("request",G),t.req&&t.req.removeListener("finish",D),t.removeListener("end",L),t.removeListener("close",L),t.removeListener("finish",D),t.removeListener("end",z),t.removeListener("error",$),t.removeListener("close",H)};if(e.signal&&!W){const s=()=>{const r=o;K(),r.call(t,new i(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)n.nextTick(s);else{P=P||r(3968).addAbortListener;const n=P(e.signal,s),i=o;o=u(((...e)=>{n[g](),i.apply(t,e)}))}}return K}t.exports=T,t.exports.finished=function(t,e){var r;let n=!1;return null===e&&(e=c),null!==(r=e)&&void 0!==r&&r.cleanup&&(h(e.cleanup,"cleanup"),n=e.cleanup),new p(((r,i)=>{const o=T(t,e,(t=>{n&&o(),t?i(t):r()}))}))}},7556:(t,e,r)=>{"use strict";const n=r(9907),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(3670),{Buffer:a}=r(1048),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:u}=r(5443).codes;t.exports=function(t,e,r){let f,l;if("string"==typeof e||e instanceof a)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null)}});if(e&&e[o])l=!0,f=e[o]();else{if(!e||!e[s])throw new c("iterable",["Iterable"],e);l=!1,f=e[s]()}const d=new t({objectMode:!0,highWaterMark:1,...r});let h=!1;return d._read=function(){h||(h=!0,async function(){for(;;){try{const{value:t,done:e}=l?await f.next():f.next();if(e)d.push(null);else{const e=t&&"function"==typeof t.then?await t:t;if(null===e)throw h=!1,new u;if(d.push(e))continue;h=!1}}catch(t){d.destroy(t)}break}}())},d._destroy=function(t,e){i(async function(t){const e=null!=t,r="function"==typeof f.throw;if(e&&r){const{value:e,done:r}=await f.throw(t);if(await e,r)return}if("function"==typeof f.return){const{value:t}=await f.return();await t}}(t),(()=>n.nextTick(e,t)),(r=>n.nextTick(e,r||t)))},d}},9731:(t,e,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(3670),{EventEmitter:o}=r(46);function s(t){o.call(this,t)}function a(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?n(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(t,e){const r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",i),t._isStdio||e&&!1===e.end||(r.on("end",c),r.on("close",u));let s=!1;function c(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){l(),0===o.listenerCount(this,"error")&&this.emit("error",t)}function l(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",c),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return a(r,"error",f),a(t,"error",f),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t},t.exports={Stream:s,prependListener:a}},1543:(t,e,r)=>{"use strict";const n=globalThis.AbortController||r(7083).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:c}=r(5443),{validateAbortSignal:u,validateInteger:f,validateObject:l}=r(3045),d=r(3670).Symbol("kWeak"),h=r(3670).Symbol("kResistStopPropagation"),{finished:p}=r(862),b=r(5366),{addAbortSignalNoValidate:g}=r(9363),{isWritable:y,isNodeStream:m}=r(4579),{deprecate:v}=r(3968),{ArrayPrototypePush:w,Boolean:_,MathFloor:S,Number:A,NumberIsNaN:E,Promise:M,PromiseReject:x,PromiseResolve:R,PromisePrototypeThen:O,Symbol:I}=r(3670),k=I("kEmpty"),P=I("kEof");function N(t,e){if("function"!=typeof t)throw new o("fn",["Function","AsyncFunction"],t);null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");let n=1;null!=(null==e?void 0:e.concurrency)&&(n=S(e.concurrency));let i=n-1;return null!=(null==e?void 0:e.highWaterMark)&&(i=S(e.highWaterMark)),f(n,"options.concurrency",1),f(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(3968).AbortSignalAny([null==e?void 0:e.signal].filter(_)),s=this,a=[],u={signal:o};let f,l,d=!1,h=0;function p(){d=!0,b()}function b(){h-=1,g()}function g(){l&&!d&&h<n&&a.length<i&&(l(),l=null)}!async function(){try{for await(let e of s){if(d)return;if(o.aborted)throw new c;try{if(e=t(e,u),e===k)continue;e=R(e)}catch(t){e=x(t)}h+=1,O(e,b,p),a.push(e),f&&(f(),f=null),!d&&(a.length>=i||h>=n)&&await new M((t=>{l=t}))}a.push(P)}catch(t){const e=x(t);O(e,b,p),a.push(e)}finally{d=!0,f&&(f(),f=null)}}();try{for(;;){for(;a.length>0;){const t=await a[0];if(t===P)return;if(o.aborted)throw new c;t!==k&&(yield t),a.shift(),g()}await new M((t=>{f=t}))}}finally{d=!0,l&&(l(),l=null)}}.call(this)}async function T(t,e=void 0){for await(const r of B.call(this,t,e))return!0;return!1}function B(t,e){if("function"!=typeof t)throw new o("fn",["Function","AsyncFunction"],t);return N.call(this,(async function(e,r){return await t(e,r)?e:k}),e)}class C extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function j(t){if(t=A(t),E(t))return 0;if(t<0)throw new a("number",">= 0",t);return t}t.exports.streamReturningOperators={asIndexedPairs:v((function(t=void 0){return null!=t&&l(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),async function*(){let e=0;for await(const n of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c({cause:t.signal.reason});yield[e++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(t,e=void 0){return null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),t=j(t),async function*(){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new c;t--<=0&&(yield r)}}.call(this)},filter:B,flatMap:function(t,e){const r=N.call(this,t,e);return async function*(){for await(const t of r)yield*t}.call(this)},map:N,take:function(t,e=void 0){return null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),t=j(t),async function*(){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new c;if(t-- >0&&(yield r),t<=0)return}}.call(this)},compose:function(t,e){if(null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),m(t)&&!y(t))throw new i("stream",t,"must be writable");const r=b(this,t);return null!=e&&e.signal&&g(e.signal,r),r}},t.exports.promiseReturningOperators={every:async function(t,e=void 0){if("function"!=typeof t)throw new o("fn",["Function","AsyncFunction"],t);return!await T.call(this,(async(...e)=>!await t(...e)),e)},forEach:async function(t,e){if("function"!=typeof t)throw new o("fn",["Function","AsyncFunction"],t);for await(const r of N.call(this,(async function(e,r){return await t(e,r),k}),e));},reduce:async function(t,e,r){var i;if("function"!=typeof t)throw new o("reducer",["Function","AsyncFunction"],t);null!=r&&l(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const t=new c(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(t)),t}const a=new n,f=a.signal;if(null!=r&&r.signal){const t={once:!0,[d]:this,[h]:!0};r.signal.addEventListener("abort",(()=>a.abort()),t)}let b=!1;try{for await(const n of this){var g;if(b=!0,null!=r&&null!==(g=r.signal)&&void 0!==g&&g.aborted)throw new c;s?e=await t(e,n,{signal:f}):(e=n,s=!0)}if(!b&&!s)throw new C}finally{a.abort()}return e},toArray:async function(t){null!=t&&l(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");const e=[];for await(const n of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c(void 0,{cause:t.signal.reason});w(e,n)}return e},some:T,find:async function(t,e){for await(const r of B.call(this,t,e))return r}}},7932:(t,e,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(3670);t.exports=o;const i=r(8102);function o(t){if(!(this instanceof o))return new o(t);i.call(this,t)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(t,e,r){r(null,t)}},4846:(t,e,r)=>{const n=r(9907),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s,SymbolDispose:a}=r(3670),c=r(862),{once:u}=r(3968),f=r(3432),l=r(8842),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:p,ERR_MISSING_ARGS:b,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:m}=r(5443),{validateFunction:v,validateAbortSignal:w}=r(3045),{isIterable:_,isReadable:S,isReadableNodeStream:A,isNodeStream:E,isTransformStream:M,isWebStream:x,isReadableStream:R,isReadableFinished:O}=r(4579),I=globalThis.AbortController||r(7083).AbortController;let k,P,N;function T(t,e,r){let n=!1;return t.on("close",(()=>{n=!0})),{destroy:e=>{n||(n=!0,f.destroyer(t,e||new g("pipe")))},cleanup:c(t,{readable:e,writable:r},(t=>{n=!t}))}}function B(t){if(_(t))return t;if(A(t))return async function*(t){P||(P=r(4664)),yield*P.prototype[s].call(t)}(t);throw new h("val",["Readable","Iterable","AsyncIterable"],t)}async function C(t,e,r,{end:n}){let i,s=null;const a=t=>{if(t&&(i=t),s){const t=s;s=null,t()}},u=()=>new o(((t,e)=>{i?e(i):s=()=>{i?e(i):t()}}));e.on("drain",a);const f=c(e,{readable:!1},a);try{e.writableNeedDrain&&await u();for await(const r of t)e.write(r)||await u();n&&(e.end(),await u()),r()}catch(t){r(i!==t?d(i,t):t)}finally{f(),e.off("drain",a)}}async function j(t,e,r,{end:n}){M(e)&&(e=e.writable);const i=e.getWriter();try{for await(const e of t)await i.ready,i.write(e).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(t){try{await i.abort(t),r(t)}catch(t){r(t)}}}function L(t,e,o){if(1===t.length&&i(t[0])&&(t=t[0]),t.length<2)throw new b("streams");const s=new I,c=s.signal,u=null==o?void 0:o.signal,f=[];function d(){D(new m)}let g,y,v;w(u,"options.signal"),N=N||r(3968).addAbortListener,u&&(g=N(u,d));const O=[];let P,L=0;function U(t){D(t,0==--L)}function D(t,r){var i;if(!t||y&&"ERR_STREAM_PREMATURE_CLOSE"!==y.code||(y=t),y||r){for(;O.length;)O.shift()(y);null===(i=g)||void 0===i||i[a](),s.abort(),r&&(y||f.forEach((t=>t())),n.nextTick(e,y,v))}}for(let W=0;W<t.length;W++){const H=t[W],V=W<t.length-1,G=W>0,K=V||!1!==(null==o?void 0:o.end),J=W===t.length-1;if(E(H)){if(K){const{destroy:Y,cleanup:Z}=T(H,V,G);O.push(Y),S(H)&&J&&f.push(Z)}function q(t){t&&"AbortError"!==t.name&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code&&U(t)}H.on("error",q),S(H)&&J&&f.push((()=>{H.removeListener("error",q)}))}if(0===W)if("function"==typeof H){if(P=H({signal:c}),!_(P))throw new p("Iterable, AsyncIterable or Stream","source",P)}else P=_(H)||A(H)||M(H)?H:l.from(H);else if("function"==typeof H){var z;if(P=M(P)?B(null===(z=P)||void 0===z?void 0:z.readable):B(P),P=H(P,{signal:c}),V){if(!_(P,!0))throw new p("AsyncIterable",`transform[${W-1}]`,P)}else{var $;k||(k=r(7932));const X=new k({objectMode:!0}),Q=null===($=P)||void 0===$?void 0:$.then;if("function"==typeof Q)L++,Q.call(P,(t=>{v=t,null!=t&&X.write(t),K&&X.end(),n.nextTick(U)}),(t=>{X.destroy(t),n.nextTick(U,t)}));else if(_(P,!0))L++,C(P,X,U,{end:K});else{if(!R(P)&&!M(P))throw new p("AsyncIterable or Promise","destination",P);{const rt=P.readable||P;L++,C(rt,X,U,{end:K})}}P=X;const{destroy:tt,cleanup:et}=T(P,!1,!0);O.push(tt),J&&f.push(et)}}else if(E(H)){if(A(P)){L+=2;const nt=F(P,H,U,{end:K});S(H)&&J&&f.push(nt)}else if(M(P)||R(P)){const it=P.readable||P;L++,C(it,H,U,{end:K})}else{if(!_(P))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],P);L++,C(P,H,U,{end:K})}P=H}else if(x(H)){if(A(P))L++,j(B(P),H,U,{end:K});else if(R(P)||_(P))L++,j(P,H,U,{end:K});else{if(!M(P))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],P);L++,j(P.readable,H,U,{end:K})}P=H}else P=l.from(H)}return(null!=c&&c.aborted||null!=u&&u.aborted)&&n.nextTick(d),P}function F(t,e,r,{end:i}){let o=!1;if(e.on("close",(()=>{o||r(new y)})),t.pipe(e,{end:!1}),i){function s(){o=!0,e.end()}O(t)?n.nextTick(s):t.once("end",s)}else r();return c(t,{readable:!0,writable:!1},(e=>{const n=t._readableState;e&&"ERR_STREAM_PREMATURE_CLOSE"===e.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?t.once("end",r).once("error",r):r(e)})),c(e,{readable:!1,writable:!0},r)}t.exports={pipelineImpl:L,pipeline:function(...t){return L(t,u(function(t){return v(t[t.length-1],"streams[stream.length - 1]"),t.pop()}(t)))}}},4664:(t,e,r)=>{const n=r(9907),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:c,ObjectKeys:u,ObjectSetPrototypeOf:f,Promise:l,SafeSet:d,SymbolAsyncDispose:h,SymbolAsyncIterator:p,Symbol:b}=r(3670);t.exports=J,J.ReadableState=K;const{EventEmitter:g}=r(46),{Stream:y,prependListener:m}=r(9731),{Buffer:v}=r(1048),{addAbortSignal:w}=r(9363),_=r(862);let S=r(3968).debuglog("stream",(t=>{S=t}));const A=r(1753),E=r(3432),{getHighWaterMark:M,getDefaultHighWaterMark:x}=r(107),{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:O,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:k,ERR_STREAM_PUSH_AFTER_EOF:P,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:T}=r(5443),{validateObject:B}=r(3045),C=b("kPaused"),{StringDecoder:j}=r(9301),L=r(7556);f(J.prototype,y.prototype),f(J,y);const F=()=>{},{errorOrDestroy:U}=E,D=1,q=16,z=32,$=64,W=2048,H=4096,V=65536;function G(t){return{enumerable:!1,get(){return!!(this.state&t)},set(e){e?this.state|=t:this.state&=~t}}}function K(t,e,n){"boolean"!=typeof n&&(n=e instanceof r(8842)),this.state=W|H|q|z,t&&t.objectMode&&(this.state|=D),n&&t&&t.readableObjectMode&&(this.state|=D),this.highWaterMark=t?M(this,t,"readableHighWaterMark",n):x(!1),this.buffer=new A,this.length=0,this.pipes=[],this.flowing=null,this[C]=null,t&&!1===t.emitClose&&(this.state&=~W),t&&!1===t.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new j(t.encoding),this.encoding=t.encoding)}function J(t){if(!(this instanceof J))return new J(t);const e=this instanceof r(8842);this._readableState=new K(t,this,e),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!e&&w(t.signal,this)),y.call(this,t),E.construct(this,(()=>{this._readableState.needReadable&&et(this,this._readableState)}))}function Y(t,e,r,n){S("readableAddChunk",e);const i=t._readableState;let o;if(i.state&D||("string"==typeof e?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?e=v.from(e,r).toString(i.encoding):(e=v.from(e,r),r=""))):e instanceof v?r="":y._isUint8Array(e)?(e=y._uint8ArrayToBuffer(e),r=""):null!=e&&(o=new O("chunk",["string","Buffer","Uint8Array"],e))),o)U(t,o);else if(null===e)i.state&=-9,function(t,e){if(S("onEofChunk"),!e.ended){if(e.decoder){const t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,e.sync?Q(t):(e.needReadable=!1,e.emittedReadable=!0,tt(t))}}(t,i);else if(i.state&D||e&&e.length>0)if(n)if(4&i.state)U(t,new N);else{if(i.destroyed||i.errored)return!1;Z(t,i,e,!0)}else if(i.ended)U(t,new P);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(e=i.decoder.write(e),i.objectMode||0!==e.length?Z(t,i,e,!1):et(t,i)):Z(t,i,e,!1)}else n||(i.state&=-9,et(t,i));return!i.ended&&(i.length<i.highWaterMark||0===i.length)}function Z(t,e,r,n){e.flowing&&0===e.length&&!e.sync&&t.listenerCount("data")>0?(e.state&V?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.state&$&&Q(t)),et(t,e)}function X(t,e){return t<=0||0===e.length&&e.ended?0:e.state&D?1:s(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}function Q(t){const e=t._readableState;S("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(S("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(tt,t))}function tt(t){const e=t._readableState;S("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||e.errored||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,st(t)}function et(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,n.nextTick(rt,t,e))}function rt(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){const r=e.length;if(S("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function nt(t){const e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!1===e[C]?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function it(t){S("readable nexttick read 0"),t.read(0)}function ot(t,e){S("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),st(t),e.flowing&&!e.reading&&t.read(0)}function st(t){const e=t._readableState;for(S("flow",e.flowing);e.flowing&&null!==t.read(););}function at(t,e){"function"!=typeof t.read&&(t=J.wrap(t,{objectMode:!0}));const r=async function*(t,e){let r,n=F;function i(e){this===t?(n(),n=F):n=e}t.on("readable",i);const o=_(t,{writable:!1},(t=>{r=t?R(r,t):null,n(),n=F}));try{for(;;){const e=t.destroyed?null:t.read();if(null!==e)yield e;else{if(r)throw r;if(null===r)return;await new l(i)}}}catch(t){throw r=R(r,t),r}finally{!r&&!1===(null==e?void 0:e.destroyOnReturn)||void 0!==r&&!t._readableState.autoDestroy?(t.off("readable",i),o()):E.destroyer(t,null)}}(t,e);return r.stream=t,r}function ct(t,e){if(0===e.length)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ut(t){const e=t._readableState;S("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(ft,e,t))}function ft(t,e){if(S("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&0===t.length)if(t.endEmitted=!0,e.emit("end"),e.writable&&!1===e.allowHalfOpen)n.nextTick(lt,e);else if(t.autoDestroy){const t=e._writableState;(!t||t.autoDestroy&&(t.finished||!1===t.writable))&&e.destroy()}}function lt(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}let dt;function ht(){return void 0===dt&&(dt={}),dt}c(K.prototype,{objectMode:G(D),ended:G(2),endEmitted:G(4),reading:G(8),constructed:G(q),sync:G(z),needReadable:G($),emittedReadable:G(128),readableListening:G(256),resumeScheduled:G(512),errorEmitted:G(1024),emitClose:G(W),autoDestroy:G(H),destroyed:G(8192),closed:G(16384),closeEmitted:G(32768),multiAwaitDrain:G(V),readingMore:G(1<<17),dataEmitted:G(1<<18)}),J.prototype.destroy=E.destroy,J.prototype._undestroy=E.undestroy,J.prototype._destroy=function(t,e){e(t)},J.prototype[g.captureRejectionSymbol]=function(t){this.destroy(t)},J.prototype[h]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new T,this.destroy(t)),new l(((e,r)=>_(this,(n=>n&&n!==t?r(n):e(null)))))},J.prototype.push=function(t,e){return Y(this,t,e,!1)},J.prototype.unshift=function(t,e){return Y(this,t,e,!0)},J.prototype.isPaused=function(){const t=this._readableState;return!0===t[C]||!1===t.flowing},J.prototype.setEncoding=function(t){const e=new j(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const t of r)n+=e.write(t);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},J.prototype.read=function(t){S("read",t),void 0===t?t=NaN:o(t)||(t=a(t,10));const e=this._readableState,r=t;if(t>e.highWaterMark&&(e.highWaterMark=function(t){if(t>1073741824)throw new k("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,++t}(t)),0!==t&&(e.state&=-129),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return S("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?ut(this):Q(this),null;if(0===(t=X(t,e))&&e.ended)return 0===e.length&&ut(this),null;let n,i=!!(e.state&$);if(S("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&(i=!0,S("length less than watermark",i)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)i=!1,S("reading, ended or constructing",i);else if(i){S("do read"),e.state|=8|z,0===e.length&&(e.state|=$);try{this._read(e.highWaterMark)}catch(t){U(this,t)}e.state&=~z,e.reading||(t=X(r,e))}return n=t>0?ct(t,e):null,null===n?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ut(this)),null===n||e.errorEmitted||e.closeEmitted||(e.dataEmitted=!0,this.emit("data",n)),n},J.prototype._read=function(t){throw new I("_read()")},J.prototype.pipe=function(t,e){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new d(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(t),S("pipe count=%d opts=%j",i.pipes.length,e);const o=e&&!1===e.end||t===n.stdout||t===n.stderr?b:s;function s(){S("onend"),t.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),t.on("unpipe",(function e(n,o){S("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,S("cleanup"),t.removeListener("close",h),t.removeListener("finish",p),a&&t.removeListener("drain",a),t.removeListener("error",l),t.removeListener("unpipe",e),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",f),c=!0,a&&i.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&a())}));let c=!1;function u(){c||(1===i.pipes.length&&i.pipes[0]===t?(S("false write response, pause",0),i.awaitDrainWriters=t,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(t)&&(S("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(t)),r.pause()),a||(a=function(t,e){return function(){const r=t._readableState;r.awaitDrainWriters===e?(S("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(S("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(e)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!t.listenerCount("data")||t.resume()}}(r,t),t.on("drain",a))}function f(e){S("ondata");const r=t.write(e);S("dest.write",r),!1===r&&u()}function l(e){if(S("onerror",e),b(),t.removeListener("error",l),0===t.listenerCount("error")){const r=t._writableState||t._readableState;r&&!r.errorEmitted?U(t,e):t.emit("error",e)}}function h(){t.removeListener("finish",p),b()}function p(){S("onfinish"),t.removeListener("close",h),b()}function b(){S("unpipe"),r.unpipe(t)}return r.on("data",f),m(t,"error",l),t.once("close",h),t.once("finish",p),t.emit("pipe",r),!0===t.writableNeedDrain?u():i.flowing||(S("pipe resume"),r.resume()),t},J.prototype.unpipe=function(t){const e=this._readableState;if(0===e.pipes.length)return this;if(!t){const t=e.pipes;e.pipes=[],this.pause();for(let e=0;e<t.length;e++)t[e].emit("unpipe",this,{hasUnpiped:!1});return this}const r=i(e.pipes,t);return-1===r||(e.pipes.splice(r,1),0===e.pipes.length&&this.pause(),t.emit("unpipe",this,{hasUnpiped:!1})),this},J.prototype.on=function(t,e){const r=y.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,S("on readable",i.length,i.reading),i.length?Q(this):i.reading||n.nextTick(it,this))),r},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(t,e){const r=y.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(nt,this),r},J.prototype.off=J.prototype.removeListener,J.prototype.removeAllListeners=function(t){const e=y.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(nt,this),e},J.prototype.resume=function(){const t=this._readableState;return t.flowing||(S("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(ot,t,e))}(this,t)),t[C]=!1,this},J.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[C]=!0,this},J.prototype.wrap=function(t){let e=!1;t.on("data",(r=>{!this.push(r)&&t.pause&&(e=!0,t.pause())})),t.on("end",(()=>{this.push(null)})),t.on("error",(t=>{U(this,t)})),t.on("close",(()=>{this.destroy()})),t.on("destroy",(()=>{this.destroy()})),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};const r=u(t);for(let e=1;e<r.length;e++){const n=r[e];void 0===this[n]&&"function"==typeof t[n]&&(this[n]=t[n].bind(t))}return this},J.prototype[p]=function(){return at(this)},J.prototype.iterator=function(t){return void 0!==t&&B(t,"options"),at(this,t)},c(J.prototype,{readable:{__proto__:null,get(){const t=this._readableState;return!(!t||!1===t.readable||t.destroyed||t.errorEmitted||t.endEmitted)},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),c(K.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[C]},set(t){this[C]=!!t}}}),J._fromList=ct,J.from=function(t,e){return L(J,t,e)},J.fromWeb=function(t,e){return ht().newStreamReadableFromReadableStream(t,e)},J.toWeb=function(t,e){return ht().newReadableStreamFromStreamReadable(t,e)},J.wrap=function(t,e){var r,n;return new J({objectMode:null===(r=null!==(n=t.readableObjectMode)&&void 0!==n?n:t.objectMode)||void 0===r||r,...e,destroy(e,r){E.destroyer(t,e),r(e)}}).wrap(t)}},107:(t,e,r)=>{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(3670),{validateInteger:o}=r(3045),{ERR_INVALID_ARG_VALUE:s}=r(5443).codes;let a=16384,c=16;function u(t){return t?c:a}t.exports={getHighWaterMark:function(t,e,r,o){const a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,o,r);if(null!=a){if(!i(a)||a<0)throw new s(o?`options.${r}`:"options.highWaterMark",a);return n(a)}return u(t.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(t,e){o(e,"value",0),t?c=e:a=e}}},8102:(t,e,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(3670);t.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(5443).codes,s=r(8842),{getHighWaterMark:a}=r(107);n(u.prototype,s.prototype),n(u,s);const c=i("kCallback");function u(t){if(!(this instanceof u))return new u(t);const e=t?a(this,t,"readableHighWaterMark",!0):null;0===e&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),s.call(this,t),this._readableState.sync=!1,this[c]=null,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",l)}function f(t){"function"!=typeof this._flush||this.destroyed?(this.push(null),t&&t()):this._flush(((e,r)=>{e?t?t(e):this.destroy(e):(null!=r&&this.push(r),this.push(null),t&&t())}))}function l(){this._final!==f&&f.call(this)}u.prototype._final=f,u.prototype._transform=function(t,e,r){throw new o("_transform()")},u.prototype._write=function(t,e,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(t,e,((t,e)=>{t?r(t):(null!=e&&this.push(e),i.ended||o===n.length||n.length<n.highWaterMark?r():this[c]=r)}))},u.prototype._read=function(){if(this[c]){const t=this[c];this[c]=null,t()}}},4579:(t,e,r)=>{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(3670),s=o("nodejs.stream.destroyed"),a=o("nodejs.stream.errored"),c=o("nodejs.stream.readable"),u=o("nodejs.stream.writable"),f=o("nodejs.stream.disturbed"),l=o("nodejs.webstream.isClosedPromise"),d=o("nodejs.webstream.controllerErrorFunction");function h(t,e=!1){var r;return!(!t||"function"!=typeof t.pipe||"function"!=typeof t.on||e&&("function"!=typeof t.pause||"function"!=typeof t.resume)||t._writableState&&!1===(null===(r=t._readableState)||void 0===r?void 0:r.readable)||t._writableState&&!t._readableState)}function p(t){var e;return!(!t||"function"!=typeof t.write||"function"!=typeof t.on||t._readableState&&!1===(null===(e=t._writableState)||void 0===e?void 0:e.writable))}function b(t){return t&&(t._readableState||t._writableState||"function"==typeof t.write&&"function"==typeof t.on||"function"==typeof t.pipe&&"function"==typeof t.on)}function g(t){return!(!t||b(t)||"function"!=typeof t.pipeThrough||"function"!=typeof t.getReader||"function"!=typeof t.cancel)}function y(t){return!(!t||b(t)||"function"!=typeof t.getWriter||"function"!=typeof t.abort)}function m(t){return!(!t||b(t)||"object"!=typeof t.readable||"object"!=typeof t.writable)}function v(t){if(!b(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[s]||null!=n&&n.destroyed)}function w(t){if(!p(t))return null;if(!0===t.writableEnded)return!0;const e=t._writableState;return(null==e||!e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)}function _(t,e){if(!h(t))return null;const r=t._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===e&&!0===r.ended&&0===r.length))}function S(t){return t&&null!=t[c]?t[c]:"boolean"!=typeof(null==t?void 0:t.readable)?null:!v(t)&&h(t)&&t.readable&&!_(t)}function A(t){return t&&null!=t[u]?t[u]:"boolean"!=typeof(null==t?void 0:t.writable)?null:!v(t)&&p(t)&&t.writable&&!w(t)}function E(t){return"boolean"==typeof t._closed&&"boolean"==typeof t._defaultKeepAlive&&"boolean"==typeof t._removedConnection&&"boolean"==typeof t._removedContLen}function M(t){return"boolean"==typeof t._sent100&&E(t)}t.exports={isDestroyed:v,kIsDestroyed:s,isDisturbed:function(t){var e;return!(!t||!(null!==(e=t[f])&&void 0!==e?e:t.readableDidRead||t.readableAborted))},kIsDisturbed:f,isErrored:function(t){var e,r,n,i,o,s,c,u,f,l;return!(!t||!(null!==(e=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=t[a])&&void 0!==s?s:t.readableErrored)&&void 0!==o?o:t.writableErrored)&&void 0!==i?i:null===(c=t._readableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==n?n:null===(u=t._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(f=t._readableState)||void 0===f?void 0:f.errored)&&void 0!==e?e:null===(l=t._writableState)||void 0===l?void 0:l.errored))},kIsErrored:a,isReadable:S,kIsReadable:c,kIsClosedPromise:l,kControllerErrorFunction:d,kIsWritable:u,isClosed:function(t){if(!b(t))return null;if("boolean"==typeof t.closed)return t.closed;const e=t._writableState,r=t._readableState;return"boolean"==typeof(null==e?void 0:e.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==e?void 0:e.closed)||(null==r?void 0:r.closed):"boolean"==typeof t._closed&&E(t)?t._closed:null},isDuplexNodeStream:function(t){return!(!t||"function"!=typeof t.pipe||!t._readableState||"function"!=typeof t.on||"function"!=typeof t.write)},isFinished:function(t,e){return b(t)?!(!v(t)&&(!1!==(null==e?void 0:e.readable)&&S(t)||!1!==(null==e?void 0:e.writable)&&A(t))):null},isIterable:function(t,e){return null!=t&&(!0===e?"function"==typeof t[n]:!1===e?"function"==typeof t[i]:"function"==typeof t[n]||"function"==typeof t[i])},isReadableNodeStream:h,isReadableStream:g,isReadableEnded:function(t){if(!h(t))return null;if(!0===t.readableEnded)return!0;const e=t._readableState;return!(!e||e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)},isReadableFinished:_,isReadableErrored:function(t){var e,r;return b(t)?t.readableErrored?t.readableErrored:null!==(e=null===(r=t._readableState)||void 0===r?void 0:r.errored)&&void 0!==e?e:null:null},isNodeStream:b,isWebStream:function(t){return g(t)||y(t)||m(t)},isWritable:A,isWritableNodeStream:p,isWritableStream:y,isWritableEnded:w,isWritableFinished:function(t,e){if(!p(t))return null;if(!0===t.writableFinished)return!0;const r=t._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===e&&!0===r.ended&&0===r.length))},isWritableErrored:function(t){var e,r;return b(t)?t.writableErrored?t.writableErrored:null!==(e=null===(r=t._writableState)||void 0===r?void 0:r.errored)&&void 0!==e?e:null:null},isServerRequest:function(t){var e;return"boolean"==typeof t._consuming&&"boolean"==typeof t._dumped&&void 0===(null===(e=t.req)||void 0===e?void 0:e.upgradeOrConnect)},isServerResponse:M,willEmitClose:function(t){if(!b(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!n&&M(t)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:m}},5672:(t,e,r)=>{const n=r(9907),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:c,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:f,Symbol:l,SymbolHasInstance:d}=r(3670);t.exports=B,B.WritableState=N;const{EventEmitter:h}=r(46),p=r(9731).Stream,{Buffer:b}=r(1048),g=r(3432),{addAbortSignal:y}=r(9363),{getHighWaterMark:m,getDefaultHighWaterMark:v}=r(107),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:A,ERR_STREAM_DESTROYED:E,ERR_STREAM_ALREADY_FINISHED:M,ERR_STREAM_NULL_VALUES:x,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:O}=r(5443).codes,{errorOrDestroy:I}=g;function k(){}u(B.prototype,p.prototype),u(B,p);const P=l("kOnFinished");function N(t,e,n){"boolean"!=typeof n&&(n=e instanceof r(8842)),this.objectMode=!(!t||!t.objectMode),n&&(this.objectMode=this.objectMode||!(!t||!t.writableObjectMode)),this.highWaterMark=t?m(this,t,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!t||!1!==t.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=F.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,T(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[P]=[]}function T(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}function B(t){const e=this instanceof r(8842);if(!e&&!s(B,this))return new B(t);this._writableState=new N(t,this,e),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&y(t.signal,this)),p.call(this,t),g.construct(this,(()=>{const t=this._writableState;t.writing||z(this,t),W(this,t)}))}function C(t,e,r,i){const o=t._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new O(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=k)}if(null===e)throw new x;if(!o.objectMode)if("string"==typeof e)!1!==o.decodeStrings&&(e=b.from(e,r),r="buffer");else if(e instanceof b)r="buffer";else{if(!p._isUint8Array(e))throw new w("chunk",["string","Buffer","Uint8Array"],e);e=p._uint8ArrayToBuffer(e),r="buffer"}let s;return o.ending?s=new R:o.destroyed&&(s=new E("write")),s?(n.nextTick(i,s),I(t,s,!0),s):(o.pendingcb++,function(t,e,r,n,i){const o=e.objectMode?1:r.length;e.length+=o;const s=e.length<e.highWaterMark;return s||(e.needDrain=!0),e.writing||e.corked||e.errored||!e.constructed?(e.buffered.push({chunk:r,encoding:n,callback:i}),e.allBuffers&&"buffer"!==n&&(e.allBuffers=!1),e.allNoop&&i!==k&&(e.allNoop=!1)):(e.writelen=o,e.writecb=i,e.writing=!0,e.sync=!0,t._write(r,n,e.onwrite),e.sync=!1),s&&!e.errored&&!e.destroyed}(t,o,e,r,i))}function j(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new E("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function L(t,e,r,n){--e.pendingcb,n(r),q(e),I(t,r)}function F(t,e){const r=t._writableState,i=r.sync,o=r.writecb;"function"==typeof o?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,e?(e.stack,r.errored||(r.errored=e),t._readableState&&!t._readableState.errored&&(t._readableState.errored=e),i?n.nextTick(L,t,r,e,o):L(t,r,e,o)):(r.buffered.length>r.bufferedIndex&&z(t,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:t,state:r},n.nextTick(U,r.afterWriteTickInfo)):D(t,r,1,o))):I(t,new S)}function U({stream:t,state:e,count:r,cb:n}){return e.afterWriteTickInfo=null,D(t,e,r,n)}function D(t,e,r,n){for(!e.ending&&!t.destroyed&&0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));r-- >0;)e.pendingcb--,n();e.destroyed&&q(e),W(t,e)}function q(t){if(t.writing)return;for(let r=t.bufferedIndex;r<t.buffered.length;++r){var e;const{chunk:n,callback:i}=t.buffered[r],o=t.objectMode?1:n.length;t.length-=o,i(null!==(e=t.errored)&&void 0!==e?e:new E("write"))}const r=t[P].splice(0);for(let e=0;e<r.length;e++){var n;r[e](null!==(n=t.errored)&&void 0!==n?n:new E("end"))}T(t)}function z(t,e){if(e.corked||e.bufferProcessing||e.destroyed||!e.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:o}=e,s=r.length-n;if(!s)return;let a=n;if(e.bufferProcessing=!0,s>1&&t._writev){e.pendingcb-=s-1;const n=e.allNoop?k:t=>{for(let e=a;e<r.length;++e)r[e].callback(t)},o=e.allNoop&&0===a?r:i(r,a);o.allBuffers=e.allBuffers,j(t,e,!0,e.length,o,"",n),T(e)}else{do{const{chunk:n,encoding:i,callback:s}=r[a];r[a++]=null,j(t,e,!1,o?1:n.length,n,i,s)}while(a<r.length&&!e.writing);a===r.length?T(e):a>256?(r.splice(0,a),e.bufferedIndex=0):e.bufferedIndex=a}e.bufferProcessing=!1}function $(t){return t.ending&&!t.destroyed&&t.constructed&&0===t.length&&!t.errored&&0===t.buffered.length&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function W(t,e,r){$(e)&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.finalCalled=!0,function(t,e){let r=!1;function i(i){if(r)I(t,null!=i?i:S());else if(r=!0,e.pendingcb--,i){const r=e[P].splice(0);for(let t=0;t<r.length;t++)r[t](i);I(t,i,e.sync)}else $(e)&&(e.prefinished=!0,t.emit("prefinish"),e.pendingcb++,n.nextTick(H,t,e))}e.sync=!0,e.pendingcb++;try{t._final(i)}catch(t){i(t)}e.sync=!1}(t,e)))}(t,e),0===e.pendingcb&&(r?(e.pendingcb++,n.nextTick(((t,e)=>{$(e)?H(t,e):e.pendingcb--}),t,e)):$(e)&&(e.pendingcb++,H(t,e))))}function H(t,e){e.pendingcb--,e.finished=!0;const r=e[P].splice(0);for(let t=0;t<r.length;t++)r[t]();if(t.emit("finish"),e.autoDestroy){const e=t._readableState;(!e||e.autoDestroy&&(e.endEmitted||!1===e.readable))&&t.destroy()}}N.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},a(N.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),a(B,d,{__proto__:null,value:function(t){return!!s(this,t)||this===B&&t&&t._writableState instanceof N}}),B.prototype.pipe=function(){I(this,new A)},B.prototype.write=function(t,e,r){return!0===C(this,t,e,r)},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){const t=this._writableState;t.corked&&(t.corked--,t.writing||z(this,t))},B.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=f(t)),!b.isEncoding(t))throw new O(t);return this._writableState.defaultEncoding=t,this},B.prototype._write=function(t,e,r){if(!this._writev)throw new _("_write()");this._writev([{chunk:t,encoding:e}],r)},B.prototype._writev=null,B.prototype.end=function(t,e,r){const i=this._writableState;let s;if("function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t){const r=C(this,t,e);r instanceof o&&(s=r)}return i.corked&&(i.corked=1,this.uncork()),s||(i.errored||i.ending?i.finished?s=new M("end"):i.destroyed&&(s=new E("end")):(i.ending=!0,W(this,i,!0),i.ended=!0)),"function"==typeof r&&(s||i.finished?n.nextTick(r,s):i[P].push(r)),this},c(B.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){const t=this._writableState;return!(!t||!1===t.writable||t.destroyed||t.errored||t.ending||t.ended)},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const t=this._writableState;return!!t&&!t.destroyed&&!t.ending&&t.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const V=g.destroy;let G;function K(){return void 0===G&&(G={}),G}B.prototype.destroy=function(t,e){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[P].length)&&n.nextTick(q,r),V.call(this,t,e),this},B.prototype._undestroy=g.undestroy,B.prototype._destroy=function(t,e){e(t)},B.prototype[h.captureRejectionSymbol]=function(t){this.destroy(t)},B.fromWeb=function(t,e){return K().newStreamWritableFromWritableStream(t,e)},B.toWeb=function(t){return K().newWritableStreamFromStreamWritable(t)}},3045:(t,e,r)=>{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:f,NumberParseInt:l,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:g}=r(3670),{hideStackFrames:y,codes:{ERR_SOCKET_BAD_PORT:m,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:S}}=r(5443),{normalizeEncoding:A}=r(3968),{isAsyncFunction:E,isArrayBufferView:M}=r(3968).types,x={},R=/^[0-7]+$/,O=y(((t,e,r=f,n=u)=>{if("number"!=typeof t)throw new v(e,"number",t);if(!a(t))throw new _(e,"an integer",t);if(t<r||t>n)throw new _(e,`>= ${r} && <= ${n}`,t)})),I=y(((t,e,r=-2147483648,n=2147483647)=>{if("number"!=typeof t)throw new v(e,"number",t);if(!a(t))throw new _(e,"an integer",t);if(t<r||t>n)throw new _(e,`>= ${r} && <= ${n}`,t)})),k=y(((t,e,r=!1)=>{if("number"!=typeof t)throw new v(e,"number",t);if(!a(t))throw new _(e,"an integer",t);const n=r?1:0,i=4294967295;if(t<n||t>i)throw new _(e,`>= ${n} && <= ${i}`,t)}));function P(t,e){if("string"!=typeof t)throw new v(e,"string",t)}const N=y(((t,e,r)=>{if(!i(r,t)){const n=o(s(r,(t=>"string"==typeof t?`'${t}'`:p(t))),", ");throw new w(e,t,"must be one of: "+n)}}));function T(t,e){if("boolean"!=typeof t)throw new v(e,"boolean",t)}function B(t,e,r){return null!=t&&d(t,e)?t[e]:r}const C=y(((t,e,r=null)=>{const i=B(r,"allowArray",!1),o=B(r,"allowFunction",!1);if(!B(r,"nullable",!1)&&null===t||!i&&n(t)||"object"!=typeof t&&(!o||"function"!=typeof t))throw new v(e,"Object",t)})),j=y(((t,e)=>{if(null!=t&&"object"!=typeof t&&"function"!=typeof t)throw new v(e,"a dictionary",t)})),L=y(((t,e,r=0)=>{if(!n(t))throw new v(e,"Array",t);if(t.length<r)throw new w(e,t,`must be longer than ${r}`)})),F=y(((t,e="buffer")=>{if(!M(t))throw new v(e,["Buffer","TypedArray","DataView"],t)})),U=y(((t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new v(e,"AbortSignal",t)})),D=y(((t,e)=>{if("function"!=typeof t)throw new v(e,"Function",t)})),q=y(((t,e)=>{if("function"!=typeof t||E(t))throw new v(e,"Function",t)})),z=y(((t,e)=>{if(void 0!==t)throw new v(e,"undefined",t)})),$=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function W(t,e){if(void 0===t||!h($,t))throw new w(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32:function(t){return t===(0|t)},isUint32:function(t){return t===t>>>0},parseFileMode:function(t,e,r){if(void 0===t&&(t=r),"string"==typeof t){if(null===h(R,t))throw new w(e,t,"must be a 32-bit unsigned integer or an octal string");t=l(t,8)}return k(t,e),t},validateArray:L,validateStringArray:function(t,e){L(t,e);for(let r=0;r<t.length;r++)P(t[r],`${e}[${r}]`)},validateBooleanArray:function(t,e){L(t,e);for(let r=0;r<t.length;r++)T(t[r],`${e}[${r}]`)},validateAbortSignalArray:function(t,e){L(t,e);for(let r=0;r<t.length;r++){const n=t[r],i=`${e}[${r}]`;if(null==n)throw new v(i,"AbortSignal",n);U(n,i)}},validateBoolean:T,validateBuffer:F,validateDictionary:j,validateEncoding:function(t,e){const r=A(e),n=t.length;if("hex"===r&&n%2!=0)throw new w("encoding",e,`is invalid for data of length ${n}`)},validateFunction:D,validateInt32:I,validateInteger:O,validateNumber:function(t,e,r=void 0,n){if("number"!=typeof t)throw new v(e,"number",t);if(null!=r&&t<r||null!=n&&t>n||(null!=r||null!=n)&&c(t))throw new _(e,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,t)},validateObject:C,validateOneOf:N,validatePlainFunction:q,validatePort:function(t,e="Port",r=!0){if("number"!=typeof t&&"string"!=typeof t||"string"==typeof t&&0===g(t).length||+t!=+t>>>0||t>65535||0===t&&!r)throw new m(e,t,r);return 0|t},validateSignalName:function(t,e="signal"){if(P(t,e),void 0===x[t]){if(void 0!==x[b(t)])throw new S(t+" (signals must use all capital letters)");throw new S(t)}},validateString:P,validateUint32:k,validateUndefined:z,validateUnion:function(t,e,r){if(!i(r,t))throw new v(e,`('${o(r,"|")}')`,t)},validateAbortSignal:U,validateLinkHeaderValue:function(t){if("string"==typeof t)return W(t,"hints"),t;if(n(t)){const e=t.length;let r="";if(0===e)return r;for(let n=0;n<e;n++){const i=t[n];W(i,"hints"),r+=i,n!==e-1&&(r+=", ")}return r}throw new w("hints",t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},446:(t,e,r)=>{"use strict";const n=r(8690),i=r(359),o=n.Readable.destroy;t.exports=n.Readable,t.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,t.exports._isUint8Array=n._isUint8Array,t.exports.isDisturbed=n.isDisturbed,t.exports.isErrored=n.isErrored,t.exports.isReadable=n.isReadable,t.exports.Readable=n.Readable,t.exports.Writable=n.Writable,t.exports.Duplex=n.Duplex,t.exports.Transform=n.Transform,t.exports.PassThrough=n.PassThrough,t.exports.addAbortSignal=n.addAbortSignal,t.exports.finished=n.finished,t.exports.destroy=n.destroy,t.exports.destroy=o,t.exports.pipeline=n.pipeline,t.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),t.exports.Stream=n.Stream,t.exports.default=t.exports},5443:(t,e,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(3968),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,f={};function l(t,e){if(!t)throw new f.ERR_INTERNAL_ASSERTION(e)}function d(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function h(t,e,r){r||(r=Error);class i extends r{constructor(...r){super(function(t,e,r){if("function"==typeof e)return l(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);const i=(e.match(/%[dfijoOs]/g)||[]).length;return l(i===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?e:n(e,...r)}(t,e,r))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=t,i.prototype[a]=!0,f[t]=i}function p(t){const e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t}class b extends Error{constructor(t="The operation was aborted",e=void 0){if(void 0!==e&&"object"!=typeof e)throw new f.ERR_INVALID_ARG_TYPE("options","Object",e);super(t,e),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",((t,e,r)=>{l("string"==typeof t,"'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const t of e)l("string"==typeof t,"All expected entries have to be of type string"),c.includes(t)?o.push(t.toLowerCase()):u.test(t)?s.push(t):(l("object"!==t,'The value "object" should be written as "Object"'),a.push(t));if(s.length>0){const t=o.indexOf("object");-1!==t&&(o.splice(o,t,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const t=o.pop();n+=`one of type ${o.join(", ")}, or ${t}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const t=s.pop();n+=`an instance of ${s.join(", ")}, or ${t}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const t=a.pop();n+=`one of ${a.join(", ")}, or ${t}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var f;null!==(f=r.constructor)&&void 0!==f&&f.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let t=i(r,{colors:!1});t.length>25&&(t=`${t.slice(0,25)}...`),n+=`. Received type ${typeof r} (${t})`}return n}),TypeError),h("ERR_INVALID_ARG_VALUE",((t,e,r="is invalid")=>{let n=i(e);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${n}`}),TypeError),h("ERR_INVALID_RETURN_VALUE",((t,e,r)=>{var n;return`Expected ${t} to be returned from the "${e}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),h("ERR_MISSING_ARGS",((...t)=>{let e;l(t.length>0,"At least one arg needs to be specified");const r=t.length;switch(t=(Array.isArray(t)?t:[t]).map((t=>`"${t}"`)).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const r=t.pop();e+=`The ${t.join(", ")}, and ${r} arguments`}}return`${e} must be specified`}),TypeError),h("ERR_OUT_OF_RANGE",((t,e,r)=>{let n;return l(e,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=d(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=d(n)),n+="n"):n=i(r),`The value of "${t}" is out of range. It must be ${e}. Received ${n}`}),RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exports={AbortError:b,aggregateTwoErrors:p((function(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const r=new s([e,t],e.message);return r.code=e.code,r}return t||e})),hideStackFrames:p,codes:f}},3670:t=>{"use strict";t.exports={ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,e)=>t.includes(e),ArrayPrototypeIndexOf:(t,e)=>t.indexOf(e),ArrayPrototypeJoin:(t,e)=>t.join(e),ArrayPrototypeMap:(t,e)=>t.map(e),ArrayPrototypePop:(t,e)=>t.pop(e),ArrayPrototypePush:(t,e)=>t.push(e),ArrayPrototypeSlice:(t,e,r)=>t.slice(e,r),Error,FunctionPrototypeCall:(t,e,...r)=>t.call(e,...r),FunctionPrototypeSymbolHasInstance:(t,e)=>Function.prototype[Symbol.hasInstance].call(t,e),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,e)=>Object.defineProperties(t,e),ObjectDefineProperty:(t,e,r)=>Object.defineProperty(t,e,r),ObjectGetOwnPropertyDescriptor:(t,e)=>Object.getOwnPropertyDescriptor(t,e),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,e)=>Object.setPrototypeOf(t,e),Promise,PromisePrototypeCatch:(t,e)=>t.catch(e),PromisePrototypeThen:(t,e,r)=>t.then(e,r),PromiseReject:t=>Promise.reject(t),PromiseResolve:t=>Promise.resolve(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,e)=>t.test(e),SafeSet:Set,String,StringPrototypeSlice:(t,e,r)=>t.slice(e,r),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(t,e,r)=>t.set(e,r),Boolean,Uint8Array}},3968:(t,e,r)=>{"use strict";const n=r(1048),{kResistStopPropagation:i,SymbolDispose:o}=r(3670),s=globalThis.AbortSignal||r(7083).AbortSignal,a=globalThis.AbortController||r(7083).AbortController,c=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,f=void 0!==u?function(t){return t instanceof u}:function(t){return!1},l=(t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new ERR_INVALID_ARG_TYPE(e,"AbortSignal",t)};class d extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError("Expected input to be an Array, got "+typeof t);let e="";for(let r=0;r<t.length;r++)e+=` ${t[r].stack}\n`;super(e),this.name="AggregateError",this.errors=t}}t.exports={AggregateError:d,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise(((r,n)=>{t=r,e=n})),resolve:t,reject:e}},promisify:t=>new Promise(((e,r)=>{t(((t,...n)=>t?r(t):e(...n)))})),debuglog:()=>function(){},format:(t,...e)=>t.replace(/%([sdifj])/g,(function(...[t,r]){const n=e.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(t){switch(typeof t){case"string":if(t.includes("'")){if(!t.includes('"'))return`"${t}"`;if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}},types:{isAsyncFunction:t=>t instanceof c,isArrayBufferView:t=>ArrayBuffer.isView(t)},isBlob:f,deprecate:(t,e)=>t,addAbortListener:r(46).addAbortListener||function(t,e){if(void 0===t)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",t);let r;return l(t,"signal"),((t,e)=>{if("function"!=typeof t)throw new ERR_INVALID_ARG_TYPE("listener","Function",t)})(e),t.aborted?queueMicrotask((()=>e())):(t.addEventListener("abort",e,{__proto__:null,once:!0,[i]:!0}),r=()=>{t.removeEventListener("abort",e)}),{__proto__:null,[o](){var t;null===(t=r)||void 0===t||t()}}},AbortSignalAny:s.any||function(t){if(1===t.length)return t[0];const e=new a,r=()=>e.abort();return t.forEach((t=>{l(t,"signals"),t.addEventListener("abort",r,{once:!0})})),e.signal.addEventListener("abort",(()=>{t.forEach((t=>t.removeEventListener("abort",r)))}),{once:!0}),e.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},8690:(t,e,r)=>{const{Buffer:n}=r(1048),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(3670),{promisify:{custom:a}}=r(3968),{streamReturningOperators:c,promiseReturningOperators:u}=r(1543),{codes:{ERR_ILLEGAL_CONSTRUCTOR:f}}=r(5443),l=r(5366),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(107),{pipeline:p}=r(4846),{destroyer:b}=r(3432),g=r(862),y=r(359),m=r(4579),v=t.exports=r(9731).Stream;v.isDestroyed=m.isDestroyed,v.isDisturbed=m.isDisturbed,v.isErrored=m.isErrored,v.isReadable=m.isReadable,v.isWritable=m.isWritable,v.Readable=r(4664);for(const S of o(c)){const A=c[S];function w(...t){if(new.target)throw f();return v.Readable.from(s(A,this,t))}i(w,"name",{__proto__:null,value:A.name}),i(w,"length",{__proto__:null,value:A.length}),i(v.Readable.prototype,S,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(const E of o(u)){const M=u[E];function w(...t){if(new.target)throw f();return s(M,this,t)}i(w,"name",{__proto__:null,value:M.name}),i(w,"length",{__proto__:null,value:M.length}),i(v.Readable.prototype,E,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}v.Writable=r(5672),v.Duplex=r(8842),v.Transform=r(8102),v.PassThrough=r(7932),v.pipeline=p;const{addAbortSignal:_}=r(9363);v.addAbortSignal=_,v.finished=g,v.destroy=b,v.compose=l,v.setDefaultHighWaterMark=d,v.getDefaultHighWaterMark=h,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(p,a,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(g,a,{__proto__:null,enumerable:!0,get:()=>y.finished}),v.Stream=v,v._isUint8Array=function(t){return t instanceof Uint8Array},v._uint8ArrayToBuffer=function(t){return n.from(t.buffer,t.byteOffset,t.byteLength)}},359:(t,e,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(3670),{isIterable:o,isNodeStream:s,isWebStream:a}=r(4579),{pipelineImpl:c}=r(4846),{finished:u}=r(862);r(8690),t.exports={finished:u,pipeline:function(...t){return new i(((e,r)=>{let i,u;const f=t[t.length-1];if(f&&"object"==typeof f&&!s(f)&&!o(f)&&!a(f)){const e=n(t);i=e.signal,u=e.end}c(t,((t,n)=>{t?r(t):e(n)}),{signal:i,end:u})}))}}},9301:(t,e,r)=>{"use strict";var n=r(5636).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=u,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function h(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},7083:t=>{"use strict";const{AbortController:e,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;t.exports=e,t.exports.AbortSignal=r,t.exports.default=e},7991:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],c=o[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,c)),f=0,l=c>0?s-4:s;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;return 2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[f++]=255&e),1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(t,a,a+s>u?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},527:(t,e,r)=>{"use strict";var n=r(1048).Buffer,i=r(3330);function o(t,e){return void 0===e&&(e="utf8"),n.isBuffer(t)?a(t.toString("base64")):a(n.from(t,e).toString("base64"))}function s(t){return t=t.toString(),i.default(t).replace(/\-/g,"+").replace(/_/g,"/")}function a(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var c=o;c.encode=o,c.decode=function(t,e){return void 0===e&&(e="utf8"),n.from(s(t),"base64").toString(e)},c.toBase64=s,c.fromBase64=a,c.toBuffer=function(t){return n.from(s(t),"base64")},e.default=c},3330:(t,e,r)=>{"use strict";var n=r(1048).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.length,r=e%4;if(!r)return t;var i=e,o=4-r,s=e+o,a=n.alloc(s);for(a.write(t);o--;)a.write("=",i++);return a.toString()}},7702:(t,e,r)=>{t.exports=r(527).default,t.exports.default=t.exports},2823:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8379).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function c(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function u(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),c=e;c<a;c++){var u=t.charCodeAt(c)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),o+=s}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=c(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=c(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,c=0,f=r;f<a;f+=n)c=u(t,f,f+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var l=1;for(c=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){f(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(t){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function b(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var u=1;u<n;u++){for(var f=c>>>26,l=67108863&c,d=Math.min(u,e.length-1),h=Math.max(0,u-t.length+1);h<=d;h++){var p=u-h|0;f+=(s=(i=0|t.words[p])*(o=0|e.words[h])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r._strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=h[t],f=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var b=l.modrn(f).toString(t);r=(l=l.idivn(f)).isZero()?b+r:d[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(!(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(!(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(!(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,o,s=t.words,a=e.words,c=r.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,h=0|s[1],p=8191&h,b=h>>>13,g=0|s[2],y=8191&g,m=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],A=8191&S,E=S>>>13,M=0|s[5],x=8191&M,R=M>>>13,O=0|s[6],I=8191&O,k=O>>>13,P=0|s[7],N=8191&P,T=P>>>13,B=0|s[8],C=8191&B,j=B>>>13,L=0|s[9],F=8191&L,U=L>>>13,D=0|a[0],q=8191&D,z=D>>>13,$=0|a[1],W=8191&$,H=$>>>13,V=0|a[2],G=8191&V,K=V>>>13,J=0|a[3],Y=8191&J,Z=J>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ct=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,dt=ft>>>13,ht=0|a[9],pt=8191&ht,bt=ht>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(n=Math.imul(l,q))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(b,q)|0,o=Math.imul(b,z);var yt=(u+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,H)|0)+Math.imul(d,W)|0))<<13)|0;u=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,z))+Math.imul(m,q)|0,o=Math.imul(m,z),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,H)|0;var mt=(u+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(d,G)|0))<<13)|0;u=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(_,q)|0,o=Math.imul(_,z),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,K)|0;var vt=(u+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(d,Y)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,z))+Math.imul(E,q)|0,o=Math.imul(E,z),n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0;var wt=(u+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(R,q)|0,o=Math.imul(R,z),n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,H)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var _t=(u+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(d,rt)|0))<<13)|0;u=((o=o+Math.imul(d,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(k,q)|0,o=Math.imul(k,z),n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var St=(u+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,z))+Math.imul(T,q)|0,o=Math.imul(T,z),n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0;var At=(u+(n=n+Math.imul(l,ct)|0)|0)+((8191&(i=(i=i+Math.imul(l,ut)|0)+Math.imul(d,ct)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(j,q)|0,o=Math.imul(j,z),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,n=n+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(b,ct)|0,o=o+Math.imul(b,ut)|0;var Et=(u+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,z))+Math.imul(U,q)|0,o=Math.imul(U,z),n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,H)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(y,ct)|0,i=(i=i+Math.imul(y,ut)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ut)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var Mt=(u+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,bt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,bt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,W),i=(i=Math.imul(F,H))+Math.imul(U,W)|0,o=Math.imul(U,H),n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(w,ct)|0,i=(i=i+Math.imul(w,ut)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var xt=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,K))+Math.imul(U,G)|0,o=Math.imul(U,K),n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(A,ct)|0,i=(i=i+Math.imul(A,ut)|0)+Math.imul(E,ct)|0,o=o+Math.imul(E,ut)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0;var Rt=(u+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,bt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(x,ct)|0,i=(i=i+Math.imul(x,ut)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,ut)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var Ot=(u+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(U,Q)|0,o=Math.imul(U,tt),n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,ut)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,ut)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var It=(u+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,bt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(N,ct)|0,i=(i=i+Math.imul(N,ut)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,ut)|0,n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var kt=(u+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),n=n+Math.imul(C,ct)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ut)|0,n=n+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Pt=(u+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,bt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((o=o+Math.imul(k,bt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(F,ct),i=(i=Math.imul(F,ut))+Math.imul(U,ct)|0,o=Math.imul(U,ut),n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var Nt=(u+(n=n+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,bt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,bt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(F,lt),i=(i=Math.imul(F,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Tt=(u+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,bt)|0)+Math.imul(j,pt)|0))<<13)|0;u=((o=o+Math.imul(j,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Bt=(u+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,bt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,bt))+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,c[0]=gt,c[1]=yt,c[2]=mt,c[3]=vt,c[4]=wt,c[5]=_t,c[6]=St,c[7]=At,c[8]=Et,c[9]=Mt,c[10]=xt,c[11]=Rt,c[12]=Ot,c[13]=It,c[14]=kt,c[15]=Pt,c[16]=Nt,c[17]=Tt,c[18]=Bt,0!==u&&(c[19]=u,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,c=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=c;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;a=67108863&(d=d+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(g=b),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?b(this,t,e):r<1024?y(this,t,e):m(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,c=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var l=c,d=u,h=0;h<s;h++){var p=r[f+h],b=n[f+h],g=r[f+h+s],y=n[f+h+s],m=l*g-d*y;y=l*y+d*g,g=m,r[f+h]=p+g,n[f+h]=b+y,r[f+h+s]=p-g,n[f+h+s]=b-y,h!==a&&(m=c*l-u*d,d=c*d+u*l,l=m)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(!(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),l=new Array(n),d=r.words;d.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,u,n),this.transform(s,o,a,c,n,i),this.transform(u,o,f,l,n,i);for(var h=0;h<n;h++){var p=a[h]*f[h]-c[h]*l[h];c[h]=a[h]*l[h]+c[h]*f[h],a[h]=p}return this.conjugate(a,c,n),this.transform(a,c,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,c=(0|this.words[e])-a<<r;this.words[e]=c|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var c=(0|t.words[i])*e;a=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==e){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var f=n.clone()._ishlnsubmul(i,1,c);0===f.negative&&(n=f,a&&(a.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=d)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,h=1;!(e.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;!(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(f),c.isub(l)),a.iushrn(1),c.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(c)):(r.isub(e),a.isub(i),c.isub(s))}return{a,b:c,gcd:r.iushln(u)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),c=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var l=0,d=1;!(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function R(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(S,_),S.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(A,_),i(E,_),i(M,_),M.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new A;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return w[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var l=this.pow(f,i),d=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=s;0!==h.cmp(a);){for(var b=h,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g<p);var y=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(y),l=y.redSqr(),h=h.redMul(l),p=g}return d},x.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},x.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,c=e.bitLength()%26;for(0===c&&(c=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],f=c-1;f>=0;f--){var l=u>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new R(t)},i(R,x),R.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},R.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},R.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},R.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},R.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},3643:function(t){t.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=90)}({17:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n=r(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var r=e.match(t);return r&&r.length>0&&r[1]||""},t.getSecondMatch=function(t,e){var r=e.match(t);return r&&r.length>1&&r[2]||""},t.matchAndReturnConst=function(t,e,r){if(t.test(e))return r},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,r,n){void 0===n&&(n=!1);var i=t.getVersionPrecision(e),o=t.getVersionPrecision(r),s=Math.max(i,o),a=0,c=t.map([e,r],(function(e){var r=s-t.getVersionPrecision(e),n=e+new Array(r+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},t.map=function(t,e){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(r=0;r<t.length;r+=1)n.push(e(t[r]));return n},t.find=function(t,e){var r,n;if(Array.prototype.find)return Array.prototype.find.call(t,e);for(r=0,n=t.length;r<n;r+=1){var i=t[r];if(e(i,r))return i}},t.assign=function(t){for(var e,r,n=t,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[t].concat(o));var a=function(){var t=o[e];"object"==typeof t&&null!==t&&Object.keys(t).forEach((function(e){n[e]=t[e]}))};for(e=0,r=o.length;e<r;e+=1)a();return t},t.getBrowserAlias=function(t){return n.BROWSER_ALIASES_MAP[t]},t.getBrowserTypeByAlias=function(t){return n.BROWSER_MAP[t]||""},t}();e.default=i,t.exports=e.default},18:function(t,e,r){"use strict";e.__esModule=!0,e.ENGINE_MAP=e.OS_MAP=e.PLATFORMS_MAP=e.BROWSER_MAP=e.BROWSER_ALIASES_MAP=void 0,e.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},e.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},e.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},e.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},e.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function(){function t(){}var e,r;return t.getParser=function(t,e){if(void 0===e&&(e=!1),"string"!=typeof t)throw new Error("UserAgent should be a string");return new i.default(t,e)},t.parse=function(t){return new i.default(t).getResult()},e=t,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(e.prototype,null),r&&s(e,r),t}();e.default=a,t.exports=e.default},91:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n=c(r(92)),i=c(r(93)),o=c(r(94)),s=c(r(95)),a=c(r(17));function c(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(t,e){if(void 0===e&&(e=!1),null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==e&&this.parse()}var e=t.prototype;return e.getUA=function(){return this._ua},e.test=function(t){return t.test(this._ua)},e.parseBrowser=function(){var t=this;this.parsedResult.browser={};var e=a.default.find(n.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser},e.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},e.getBrowserName=function(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},e.getBrowserVersion=function(){return this.getBrowser().version},e.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},e.parseOS=function(){var t=this;this.parsedResult.os={};var e=a.default.find(i.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os},e.getOSName=function(t){var e=this.getOS().name;return t?String(e).toLowerCase()||"":e||""},e.getOSVersion=function(){return this.getOS().version},e.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},e.getPlatformType=function(t){void 0===t&&(t=!1);var e=this.getPlatform().type;return t?String(e).toLowerCase()||"":e||""},e.parsePlatform=function(){var t=this;this.parsedResult.platform={};var e=a.default.find(o.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform},e.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},e.getEngineName=function(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},e.parseEngine=function(){var t=this;this.parsedResult.engine={};var e=a.default.find(s.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine},e.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},e.getResult=function(){return a.default.assign({},this.parsedResult)},e.satisfies=function(t){var e=this,r={},n=0,i={},o=0;if(Object.keys(t).forEach((function(e){var s=t[e];"string"==typeof s?(i[e]=s,o+=1):"object"==typeof s&&(r[e]=s,n+=1)})),n>0){var s=Object.keys(r),c=a.default.find(s,(function(t){return e.isOS(t)}));if(c){var u=this.satisfies(r[c]);if(void 0!==u)return u}var f=a.default.find(s,(function(t){return e.isPlatform(t)}));if(f){var l=this.satisfies(r[f]);if(void 0!==l)return l}}if(o>0){var d=Object.keys(i),h=a.default.find(d,(function(t){return e.isBrowser(t,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var r=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),i=a.default.getBrowserTypeByAlias(n);return e&&i&&(n=i.toLowerCase()),n===r},e.compareVersion=function(t){var e=[0],r=t,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(r=t.substr(1),"="===t[1]?(n=!0,r=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?r=t.substr(1):"~"===t[0]&&(n=!0,r=t.substr(1)),e.indexOf(a.default.compareVersions(i,r,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=u,t.exports=e.default},92:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return r&&(e.version=r),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},r=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:function(t){var e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe:function(t){var e={name:"Android Browser"},r=i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},r=i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},r=i.default.getFirstMatch(o,t);return r&&(e.version=r),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=s,t.exports=e.default},93:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:o.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=i.default.getWindowsVersionName(e);return{name:o.OS_MAP.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(e),n={name:o.OS_MAP.MacOS,version:e};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=i.default.getAndroidVersionName(e),n={name:o.OS_MAP.Android,version:e};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:o.OS_MAP.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:o.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.PlayStation4,version:e}}}];e.default=s,t.exports=e.default},94:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];e.default=s,t.exports=e.default},95:function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:o.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:o.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:function(t){var e=t.test(/gecko/i),r=t.test(/like gecko/i);return e&&!r},describe:function(t){var e={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];e.default=s,t.exports=e.default}})},7048:(t,e,r)=>{var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(3553);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},1048:(t,e,r)=>{"use strict";const n=r(7991),i=r(9318),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|b(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){const e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer))return h(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const i=function(t){if(c.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Y(t.length)?a(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),a(t<0?0:0|p(t))}function d(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function b(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(i)return n?-1:V(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return M(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){let o,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(u(t,o+n)!==u(e,n)){r=!1;break}if(r)return o}return-1}function w(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(Y(n))return s;t[r+s]=n}return s}function _(t,e,r,n){return K(V(e,t.length-r),t,r,n)}function S(t,e,r,n){return K(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function A(t,e,r,n){return K(G(e),t,r,n)}function E(t,e,r,n){return K(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function M(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(o=c));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=R)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=R));return r}(n)}e.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},c.allocUnsafe=function(t){return l(t)},c.allocUnsafeSlow=function(t){return l(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).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}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=c.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(J(e,Uint8Array))i+e.length>n.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},c.byteLength=b,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)y(this,e,e+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?x(this,0,t):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),u=this.slice(n,i),f=t.slice(e,r);for(let t=0;t<a;++t)if(u[t]!==f[t]){o=u[t],s=f[t];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return S(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function O(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=Z[t[n]];return i}function P(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function N(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function B(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function C(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=X((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=X((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),c.prototype.readBigInt64BE=X((function(t){$(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),c.prototype.readFloatLE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||T(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||T(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=X((function(t,e=0){return B(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=X((function(t,e=0){return B(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=c.isBuffer(t)?t:c.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const U={};function D(t,e,r){U[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function q(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function z(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){$(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||W(e,t.length-(r+1))}(n,i,o)}function $(t,e){if("number"!=typeof t)throw new U.ERR_INVALID_ARG_TYPE(e,"number",t)}function W(t,e,r){if(Math.floor(t)!==t)throw $(t,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Y(t){return t!=t}const Z=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},9818:(t,e,r)=>{"use strict";var n=r(528),i=r(8498),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},8498:(t,e,r)=>{"use strict";var n=r(9138),i=r(528),o=r(6108),s=r(3468),a=i("%Function.prototype.apply%"),c=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||n.call(c,a),f=r(4940),l=i("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new s("a function is required");var e=u(n,c,arguments);return o(e,1+l(0,t.length-(arguments.length-1)),!0)};var d=function(){return u(n,a,arguments)};f?f(t.exports,"apply",{value:d}):t.exports.apply=d},686:(t,e,r)=>{"use strict";var n=r(4940),i=r(5731),o=r(3468),s=r(9336);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],l=!!s&&s(t,e);if(n)n(t,e,{configurable:null===u&&l?l.configurable:!u,enumerable:null===a&&l?l.enumerable:!a,value:r,writable:null===c&&l?l.writable:!c});else{if(!f&&(a||c||u))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},3360:(t,e,r)=>{"use strict";var n=e;n.version=r(183).rE,n.utils=r(1874),n.rand=r(7048),n.curve=r(7131),n.curves=r(6443),n.ec=r(5064),n.eddsa=r(4807)},5174:(t,e,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.getNAF,s=i.getJSF,a=i.assert;function c(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,c,u=[];for(s=0;s<n.length;s+=r.step){c=0;for(var f=s+r.step-1;f>=s;f--)c=(c<<1)+n[f];u.push(c)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(s=0;s<u.length;s++)(c=u[s])===h?d=d.mixedAdd(r.points[s]):c===-h&&(d=d.mixedAdd(r.points[s].neg()));l=l.add(d)}return l.toP()},c.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(e,r,this._bitLength),c=this.jpoint(null,null,null),u=s.length-1;u>=0;u--){for(var f=0;u>=0&&0===s[u];u--)f++;if(u>=0&&f++,c=c.dblp(f),u<0)break;var l=s[u];a(0!==l),c="affine"===t.type?l>0?c.mixedAdd(i[l-1>>1]):c.mixedAdd(i[-l-1>>1].neg()):l>0?c.add(i[l-1>>1]):c.add(i[-l-1>>1].neg())}return"affine"===t.type?c.toP():c},c.prototype._wnafMulAdd=function(t,e,r,n,i){var a,c,u,f=this._wnafT1,l=this._wnafT2,d=this._wnafT3,h=0;for(a=0;a<n;a++){var p=(u=e[a])._getNAFPoints(t);f[a]=p.wnd,l[a]=p.points}for(a=n-1;a>=1;a-=2){var b=a-1,g=a;if(1===f[b]&&1===f[g]){var y=[e[b],null,null,e[g]];0===e[b].y.cmp(e[g].y)?(y[1]=e[b].add(e[g]),y[2]=e[b].toJ().mixedAdd(e[g].neg())):0===e[b].y.cmp(e[g].y.redNeg())?(y[1]=e[b].toJ().mixedAdd(e[g]),y[2]=e[b].add(e[g].neg())):(y[1]=e[b].toJ().mixedAdd(e[g]),y[2]=e[b].toJ().mixedAdd(e[g].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[b],r[g]);for(h=Math.max(v[0].length,h),d[b]=new Array(h),d[g]=new Array(h),c=0;c<h;c++){var w=0|v[0][c],_=0|v[1][c];d[b][c]=m[3*(w+1)+(_+1)],d[g][c]=0,l[b]=y}}else d[b]=o(r[b],f[b],this._bitLength),d[g]=o(r[g],f[g],this._bitLength),h=Math.max(d[b].length,h),h=Math.max(d[g].length,h)}var S=this.jpoint(null,null,null),A=this._wnafT4;for(a=h;a>=0;a--){for(var E=0;a>=0;){var M=!0;for(c=0;c<n;c++)A[c]=0|d[c][a],0!==A[c]&&(M=!1);if(!M)break;E++,a--}if(a>=0&&E++,S=S.dblp(E),a<0)break;for(c=0;c<n;c++){var x=A[c];0!==x&&(x>0?u=l[c][x-1>>1]:x<0&&(u=l[c][-x-1>>1].neg()),S="affine"===u.type?S.mixedAdd(u):S.add(u))}}for(a=0;a<n;a++)l[a]=null;return i?S:S.toP()},c.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(t){return this.encode(t,!0)},u.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},u.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},u.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},u.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},u.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},1547:(t,e,r)=>{"use strict";var n=r(1874),i=r(2823),o=r(5615),s=r(5174),a=n.assert;function c(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function u(t,e,r,n,o){s.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,s),t.exports=c,c.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},c.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},c.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},c.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var c=a.fromRed().isOdd();return(e&&!c||!e&&c)&&(a=a.redNeg()),this.point(t,a)},c.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},c.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(u,s.BasePoint),c.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},c.prototype.point=function(t,e,r,n){return new u(this,t,e,r,n)},u.fromJSON=function(t,e){return new u(t,e[0],e[1],e[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),s=o.redSub(r),a=n.redSub(e),c=i.redMul(s),u=o.redMul(a),f=i.redMul(a),l=s.redMul(o);return this.curve.point(c,u,l,f)},u.prototype._projDbl=function(){var t,e,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(a)).redAdd(c);this.zOne?(t=s.redSub(a).redSub(c).redMul(u.redSub(this.curve.two)),e=u.redMul(n.redSub(c)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),t=s.redSub(a).redISub(c).redMul(o),e=u.redMul(n.redSub(c)),r=u.redMul(o))}else n=a.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(a.redISub(c)),r=n.redMul(o);return this.curve.point(t,e,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=i.redSub(n),a=i.redAdd(n),c=r.redAdd(e),u=o.redMul(s),f=a.redMul(c),l=o.redMul(c),d=s.redMul(a);return this.curve.point(u,f,d,l)},u.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),c=i.redSub(a),u=i.redAdd(a),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),l=n.redMul(c).redMul(f);return this.curve.twisted?(e=n.redMul(u).redMul(s.redSub(this.curve._mulA(o))),r=c.redMul(u)):(e=n.redMul(u).redMul(s.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(l,e,r)},u.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},u.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},u.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},u.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},7131:(t,e,r)=>{"use strict";var n=e;n.base=r(5174),n.short=r(277),n.mont=r(3245),n.edwards=r(1547)},3245:(t,e,r)=>{"use strict";var n=r(2823),i=r(5615),o=r(5174),s=r(1874);function a(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new c(this,t,e)},a.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(t,e){return new c(t,e[0],e[1]||t.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),c=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,c)},c.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},277:(t,e,r)=>{"use strict";var n=r(1874),i=r(2823),o=r(5615),s=r(5174),a=n.assert;function c(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(t,e,r,n){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,r,n){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,s),t.exports=c,c.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(t){for(var e,r,n,o,s,a,c,u,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,h=this.n.clone(),p=new i(1),b=new i(0),g=new i(0),y=new i(1),m=0;0!==d.cmpn(0);){var v=h.div(d);u=h.sub(v.mul(d)),f=g.sub(v.mul(p));var w=y.sub(v.mul(b));if(!n&&u.cmp(l)<0)e=c.neg(),r=p,n=u.neg(),o=f;else if(n&&2==++m)break;c=u,h=d,d=u,g=p,p=f,y=b,b=w}s=u.neg(),a=f;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},c.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:c.add(u).neg()}},c.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},c.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],c=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),n[2*o]=a,n[2*o+1]=c,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var u=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return u},o(u,s.BasePoint),c.prototype.point=function(t,e,r){return new u(this,t,e,r)},c.prototype.pointFromJSON=function(t,e){return u.fromJSON(this,t,e)},u.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},u.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,s.BasePoint),c.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),c=o.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),f=u.redMul(a),l=n.redMul(u),d=c.redSqr().redIAdd(f).redISub(l).redISub(l),h=c.redMul(l.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(d,h,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),f=r.redMul(c),l=a.redSqr().redIAdd(u).redISub(f).redISub(f),d=a.redMul(f.redISub(l)).redISub(i.redMul(u)),h=this.z.redMul(s);return this.curve.jpoint(l,d,h)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,c=a.redSqr().redSqr(),u=s.redAdd(s);for(e=0;e<t;e++){var f=o.redSqr(),l=u.redSqr(),d=l.redSqr(),h=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(c)),p=o.redMul(l),b=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(b),y=h.redMul(g);y=y.redIAdd(y).redISub(d);var m=u.redMul(a);e+1<t&&(c=c.redMul(d)),o=b,a=m,u=y}return this.curve.jpoint(o,u.redMul(i),a)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),c=a.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=c,e=a.redMul(s.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),h=this.x.redAdd(l).redSqr().redISub(f).redISub(d);h=h.redIAdd(h);var p=f.redAdd(f).redIAdd(f),b=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),t=b.redISub(h).redISub(h),e=p.redMul(h.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},f.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=a.redSqr().redISub(s).redISub(s);t=c;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=a.redMul(s.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),h=this.x.redSub(f).redMul(this.x.redAdd(f));h=h.redAdd(h).redIAdd(h);var p=d.redIAdd(d),b=(p=p.redIAdd(p)).redAdd(p);t=h.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=h.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},f.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),c=e.redAdd(e),u=(c=c.redIAdd(c)).redMul(s),f=a.redSqr().redISub(u.redAdd(u)),l=u.redISub(f),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=a.redMul(l).redISub(d),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,h,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(c),f=e.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(a).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(l,d,h)},f.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},f.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},6443:(t,e,r)=>{"use strict";var n,i=e,o=r(9499),s=r(7131),a=r(1874).assert;function c(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new c(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(3986)}catch(t){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},5064:(t,e,r)=>{"use strict";var n=r(2823),i=r(4742),o=r(1874),s=r(6443),a=r(7048),c=o.assert,u=r(7531),f=r(7782);function l(t){if(!(this instanceof l))return new l(t);"string"==typeof t&&(c(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=l,l.prototype.keyPair=function(t){return new u(this,t)},l.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},l.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},l.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),c=t.toArray("be",s),u=new i({hash:this.hash,entropy:a,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new n(1)),d=0;;d++){var h=o.k?o.k(d):new n(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(l)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var y=h.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(y=y.umod(this.n)).cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),m^=1),new f({r:g,s:y,recoveryParam:m})}}}}}},l.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new f(e,"hex")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,c=s.invm(this.n),u=c.mul(t).umod(this.n),l=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(t,e,r,i){c((3&r)===r,"The recovery param is more than two bits"),e=new f(e,i);var o=this.n,s=new n(t),a=e.r,u=e.s,l=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),l):this.curve.pointFromX(a,l);var h=e.r.invm(o),p=o.sub(s).mul(h).umod(o),b=u.mul(h).umod(o);return this.g.mulAdd(p,a,b)},l.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new f(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},7531:(t,e,r)=>{"use strict";var n=r(2823),i=r(1874).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},7782:(t,e,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function c(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function u(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function f(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=c(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=c(t,r);if(!1===s)return!1;var u=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var f=c(t,r);if(!1===f)return!1;if(t.length!==f+r.place)return!1;var l=t.slice(r.place,f+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(u),this.s=new n(l),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=u(e),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,e.length),(n=n.concat(e)).push(2),f(n,r.length);var o=n.concat(r),s=[48];return f(s,o.length),s=s.concat(o),i.encode(s,t)}},4807:(t,e,r)=>{"use strict";var n=r(9499),i=r(6443),o=r(1874),s=o.assert,a=o.parseBytes,c=r(4672),u=r(8401);function f(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=f,f.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),c=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},f.prototype.verify=function(t,e,r){t=a(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(t){return c.fromPublic(this,t)},f.prototype.keyFromSecret=function(t){return c.fromSecret(this,t)},f.prototype.makeSignature=function(t){return t instanceof u?t:new u(this,t)},f.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},f.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=!!(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(t){return o.intFromLE(t)},f.prototype.isPoint=function(t){return t instanceof this.pointClass}},4672:(t,e,r)=>{"use strict";var n=r(1874),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},8401:(t,e,r)=>{"use strict";var n=r(2823),i=r(1874),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function c(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=c},3986:t=>{t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},1874:(t,e,r)=>{"use strict";var n=e,i=r(2823),o=r(7784),s=r(9042);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e,r){var n,i=new Array(Math.max(t.bitLength(),r)+1);for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<e+1,s=t.clone();for(n=0;n<i.length;n++){var a,c=s.andln(o-1);s.isOdd()?(a=c>(o>>1)-1?(o>>1)-c:c,s.isubn(a)):a=0,i[n]=a,s.iushrn(1)}return i},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,c=t.andln(3)+i&3,u=e.andln(3)+o&3;3===c&&(c=-1),3===u&&(u=-1),s=1&c?3!=(n=t.andln(7)+i&7)&&5!==n||2!==u?c:-c:0,r[0].push(s),a=1&u?3!=(n=e.andln(7)+o&7)&&5!==n||2!==c?u:-u:0,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},1822:(t,e,r)=>{var n=r(9907),i=r(3358),o=function(){},s=function(t,e,r){if("function"==typeof e)return s(t,null,e);e||(e={}),r=i(r||o);var a=t._writableState,c=t._readableState,u=e.readable||!1!==e.readable&&t.readable,f=e.writable||!1!==e.writable&&t.writable,l=!1,d=function(){t.writable||h()},h=function(){f=!1,u||r.call(t)},p=function(){u=!1,f||r.call(t)},b=function(e){r.call(t,e?new Error("exited with error code: "+e):null)},g=function(e){r.call(t,e)},y=function(){n.nextTick(m)},m=function(){if(!l)return(!u||c&&c.ended&&!c.destroyed)&&(!f||a&&a.ended&&!a.destroyed)?void 0:r.call(t,new Error("premature close"))},v=function(){t.req.on("finish",h)};return function(t){return t.setHeader&&"function"==typeof t.abort}(t)?(t.on("complete",h),t.on("abort",y),t.req?v():t.on("request",v)):f&&!a&&(t.on("end",d),t.on("close",d)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",b),t.on("end",p),t.on("finish",h),!1!==e.error&&t.on("error",g),t.on("close",y),function(){l=!0,t.removeListener("complete",h),t.removeListener("abort",y),t.removeListener("request",v),t.req&&t.req.removeListener("finish",h),t.removeListener("end",d),t.removeListener("close",d),t.removeListener("finish",h),t.removeListener("exit",b),t.removeListener("end",p),t.removeListener("error",g),t.removeListener("close",y)}};t.exports=s},4940:(t,e,r)=>{"use strict";var n=r(528)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(t){n=!1}t.exports=n},9110:t=>{"use strict";t.exports=EvalError},9838:t=>{"use strict";t.exports=Error},1155:t=>{"use strict";t.exports=RangeError},4943:t=>{"use strict";t.exports=ReferenceError},5731:t=>{"use strict";t.exports=SyntaxError},3468:t=>{"use strict";t.exports=TypeError},2140:t=>{"use strict";t.exports=URIError},46:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}b(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&b(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function u(t,e,r,n){var i,o,s,u;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(t))>0&&s.length>i&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=s.length,u=f,console&&console.warn&&console.warn(u)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function h(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function b(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)n(c,this,e);else{var u=c.length,f=p(c,u);for(r=0;r<u;++r)n(f[r],this,e)}return!0},o.prototype.addListener=function(t,e){return u(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return u(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,l(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,l(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},282:t=>{t.exports=s,s.default=s,s.stable=f,s.stableStringify=f;var e="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(t,e,r,s){var a;void 0===s&&(s=o()),c(t,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(t,e,r):JSON.stringify(t,d(e),r)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function a(t,e,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:t}),n.push([o,r,e,s])):i.push([e,r,t]):(o[r]=t,n.push([o,r,e]))}function c(t,n,i,o,s,u,f){var l;if(u+=1,"object"==typeof t&&null!==t){for(l=0;l<o.length;l++)if(o[l]===t)return void a(r,t,n,s);if(void 0!==f.depthLimit&&u>f.depthLimit)return void a(e,t,n,s);if(void 0!==f.edgesLimit&&i+1>f.edgesLimit)return void a(e,t,n,s);if(o.push(t),Array.isArray(t))for(l=0;l<t.length;l++)c(t[l],l,l,o,t,u,f);else{var d=Object.keys(t);for(l=0;l<d.length;l++){var h=d[l];c(t[h],h,l,o,t,u,f)}}o.pop()}}function u(t,e){return t<e?-1:t>e?1:0}function f(t,e,r,s){void 0===s&&(s=o());var a,c=l(t,"",0,[],void 0,0,s)||t;try{a=0===i.length?JSON.stringify(c,e,r):JSON.stringify(c,d(e),r)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function l(t,i,o,s,c,f,d){var h;if(f+=1,"object"==typeof t&&null!==t){for(h=0;h<s.length;h++)if(s[h]===t)return void a(r,t,i,c);try{if("function"==typeof t.toJSON)return}catch(t){return}if(void 0!==d.depthLimit&&f>d.depthLimit)return void a(e,t,i,c);if(void 0!==d.edgesLimit&&o+1>d.edgesLimit)return void a(e,t,i,c);if(s.push(t),Array.isArray(t))for(h=0;h<t.length;h++)l(t[h],h,h,s,t,f,d);else{var p={},b=Object.keys(t).sort(u);for(h=0;h<b.length;h++){var g=b[h];l(t[g],g,h,s,t,f,d),p[g]=t[g]}if(void 0===c)return p;n.push([c,i,t]),c[i]=p}s.pop()}}function d(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===e&&o[0]===r){r=o[2],i.splice(n,1);break}}return t.call(this,e,r)}}},8794:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var i=0;i<e.length;i+=1)r[i+t.length]=e[i];return r};t.exports=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var o,s=function(t,e){for(var r=[],n=1,i=0;n<t.length;n+=1,i+=1)r[i]=t[n];return r}(arguments),a=r(0,i.length-s.length),c=[],u=0;u<a;u++)c[u]="$"+u;if(o=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=",");return r}(c)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var e=i.apply(this,n(s,arguments));return Object(e)===e?e:this}return i.apply(t,n(s,arguments))})),i.prototype){var f=function(){};f.prototype=i.prototype,o.prototype=new f,f.prototype=null}return o}},9138:(t,e,r)=>{"use strict";var n=r(8794);t.exports=Function.prototype.bind||n},528:(t,e,r)=>{"use strict";var n,i=r(9838),o=r(9110),s=r(1155),a=r(4943),c=r(5731),u=r(3468),f=r(2140),l=Function,d=function(t){try{return l('"use strict"; return ('+t+").constructor;")()}catch(t){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(t){h=null}var p=function(){throw new u},b=h?function(){try{return p}catch(t){try{return h(arguments,"callee").get}catch(t){return p}}}():p,g=r(3558)(),y=r(6869)(),m=Object.getPrototypeOf||(y?function(t){return t.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&m?m(Uint8Array):n,_={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&m?m([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&m?m(m([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&m?m((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&m?m((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&m?m(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":b,"%TypedArray%":w,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(m)try{null.error}catch(t){var S=m(m(t));_["%Error.prototype%"]=S}var A=function t(e){var r;if("%AsyncFunction%"===e)r=d("async function () {}");else if("%GeneratorFunction%"===e)r=d("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=d("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&m&&(r=m(i.prototype))}return _[e]=r,r},E={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=r(9138),x=r(8554),R=M.call(Function.call,Array.prototype.concat),O=M.call(Function.apply,Array.prototype.splice),I=M.call(Function.call,String.prototype.replace),k=M.call(Function.call,String.prototype.slice),P=M.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,B=function(t,e){var r,n=t;if(x(E,n)&&(n="%"+(r=E[n])[0]+"%"),x(_,n)){var i=_[n];if(i===v&&(i=A(n)),void 0===i&&!e)throw new u("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new u('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=k(t,0,1),r=k(t,-1);if("%"===e&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return I(t,N,(function(t,e,r,i){n[n.length]=r?I(i,T,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=B("%"+n+"%",e),o=i.name,s=i.value,a=!1,f=i.alias;f&&(n=f[0],O(r,R([0,1],f)));for(var l=1,d=!0;l<r.length;l+=1){var p=r[l],b=k(p,0,1),g=k(p,-1);if(('"'===b||"'"===b||"`"===b||'"'===g||"'"===g||"`"===g)&&b!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==p&&d||(a=!0),x(_,o="%"+(n+="."+p)+"%"))s=_[o];else if(null!=s){if(!(p in s)){if(!e)throw new u("base intrinsic for "+t+" exists, but the property is not available.");return}if(h&&l+1>=r.length){var y=h(s,p);s=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[p]}else d=x(s,p),s=s[p];d&&!a&&(_[o]=s)}}return s}},9336:(t,e,r)=>{"use strict";var n=r(528)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},7239:(t,e,r)=>{"use strict";var n=r(4940),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},6869:t=>{"use strict";var e={__proto__:null,foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof r)}},3558:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(2908);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},2908:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9499:(t,e,r)=>{var n=e;n.utils=r(461),n.common=r(2191),n.sha=r(5746),n.ripemd=r(4169),n.hmac=r(1825),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},2191:(t,e,r)=>{"use strict";var n=r(461),i=r(7784);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},1825:(t,e,r)=>{"use strict";var n=r(461),i=r(7784);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},4169:(t,e,r)=>{"use strict";var n=r(461),i=r(2191),o=n.rotl32,s=n.sum32,a=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function d(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function h(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(f,u),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],f=this.h[4],m=r,v=n,w=i,_=u,S=f,A=0;A<80;A++){var E=s(o(c(r,l(A,n,i,u),t[p[A]+e],d(A)),g[A]),f);r=f,f=u,u=o(i,10),i=n,n=E,E=s(o(c(m,l(79-A,v,w,_),t[b[A]+e],h(A)),y[A]),S),m=S,S=_,_=o(w,10),w=v,v=E}E=a(this.h[1],i,_),this.h[1]=a(this.h[2],u,S),this.h[2]=a(this.h[3],f,m),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},5746:(t,e,r)=>{"use strict";e.sha1=r(2986),e.sha224=r(5393),e.sha256=r(536),e.sha384=r(2348),e.sha512=r(2157)},2986:(t,e,r)=>{"use strict";var n=r(461),i=r(2191),o=r(600),s=n.rotl32,a=n.sum32,c=n.sum32_5,u=o.ft_1,f=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,f),t.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],d=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),b=c(s(i,5),u(p,o,f,d),h,r[n],l[p]);h=d,d=f,f=s(o,30),o=i,i=b}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],f),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],h)},d.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},5393:(t,e,r)=>{"use strict";var n=r(461),i=r(536);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},536:(t,e,r)=>{"use strict";var n=r(461),i=r(2191),o=r(600),s=r(7784),a=n.sum32,c=n.sum32_4,u=n.sum32_5,f=o.ch32,l=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,g=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(m,g),t.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=c(b(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],m=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var S=u(_,h(m),f(m,v,w),this.k[n],r[n]),A=a(d(i),l(i,o,g));_=w,w=v,v=m,m=a(y,S),y=g,g=o,o=i,i=a(S,A)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],m),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},m.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},2348:(t,e,r)=>{"use strict";var n=r(461),i=r(2157);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},2157:(t,e,r)=>{"use strict";var n=r(461),i=r(2191),o=r(7784),s=n.rotr64_hi,a=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,f=n.sum64,l=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function w(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function S(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function A(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function E(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function M(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function x(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function R(t,e){var r=s(t,e,1)^s(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function O(t,e){var r=a(t,e,1)^a(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=a(t,e,19)^a(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(v,y),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=(g=r[n-4],y=r[n-3],m=void 0,(m=s(g,y,19)^s(y,g,29)^c(g,y,6))<0&&(m+=4294967296),m),o=I(r[n-4],r[n-3]),a=r[n-14],u=r[n-13],f=R(r[n-30],r[n-29]),l=O(r[n-30],r[n-29]),d=r[n-32],b=r[n-31];r[n]=h(i,o,a,u,f,l,d,b),r[n+1]=p(i,o,a,u,f,l,d,b)}var g,y,m},v.prototype._update=function(t,e){this._prepareBlock(t,e);var r,n,i,a=this.W,c=this.h[0],u=this.h[1],h=this.h[2],p=this.h[3],y=this.h[4],m=this.h[5],v=this.h[6],R=this.h[7],O=this.h[8],I=this.h[9],k=this.h[10],P=this.h[11],N=this.h[12],T=this.h[13],B=this.h[14],C=this.h[15];o(this.k.length===a.length);for(var j=0;j<a.length;j+=2){var L=B,F=C,U=(i=void 0,(i=s(r=O,n=I,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),D=x(O,I),q=w(O,0,k,0,N),z=_(0,I,0,P,0,T),$=this.k[j],W=this.k[j+1],H=a[j],V=a[j+1],G=b(L,F,U,D,q,z,$,W,H,V),K=g(L,F,U,D,q,z,$,W,H,V);L=E(c,u),F=M(c,u),U=S(c,0,h,0,y),D=A(0,u,0,p,0,m);var J=l(L,F,U,D),Y=d(L,F,U,D);B=N,C=T,N=k,T=P,k=O,P=I,O=l(v,R,G,K),I=d(R,R,G,K),v=y,R=m,y=h,m=p,h=c,p=u,c=l(G,K,J,Y),u=d(G,K,J,Y)}f(this.h,0,c,u),f(this.h,2,h,p),f(this.h,4,y,m),f(this.h,6,v,R),f(this.h,8,O,I),f(this.h,10,k,P),f(this.h,12,N,T),f(this.h,14,B,C)},v.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},600:(t,e,r)=>{"use strict";var n=r(461).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},461:(t,e,r)=>{"use strict";var n=r(7784),i=r(5615);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function c(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=c(i.toString(16))}return r},e.zero2=a,e.zero8=c,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,c=e;a<s.length;a++,c+=4){var u;u="big"===i?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],s[a]=u>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var c=0,u=e;return c+=(u=u+n>>>0)<e?1:0,c+=(u=u+o>>>0)<o?1:0,t+r+i+s+(c+=(u=u+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,c,u){var f=0,l=e;return f+=(l=l+n>>>0)<e?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+a>>>0)<a?1:0,t+r+i+s+c+(f+=(l=l+u>>>0)<u?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,c,u){return e+n+o+a+u>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},8554:(t,e,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(9138);t.exports=o.call(n,i)},4742:(t,e,r)=>{"use strict";var n=r(9499),i=r(9042),o=r(7784);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(r),this._reseed++,i.encode(s,e)}},9318:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,f=-7,l=r?i-1:0,d=r?-1:1,h=t[e+l];for(l+=d,o=h&(1<<-f)-1,h>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=d,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=d,f-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=u}return(h?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,f=(1<<u)-1,l=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+l>=1?d/c:d*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*c-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+h]=255&s,h+=p,s/=256,u-=8);t[r+h-p]|=128*b}},5615:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},6512:t=>{t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==t.start?t.start:Math.floor(Math.random()*e);return function(){return r%=e,r++}}},5172:(t,e,r)=>{"use strict";var n=("undefined"!=typeof JSON?JSON:r(6998)).stringify,i=r(9549),o=r(9228),s=r(8498),a=r(9818),c=a("Array.prototype.join"),u=a("Array.prototype.push"),f=function(t,e){for(var r="",n=0;n<t;n+=1)r+=e;return r},l=function(t,e,r){return r};t.exports=function(t){var e=arguments.length>1?arguments[1]:void 0,r=e&&e.space||"";"number"==typeof r&&(r=f(r," "));var a=!!e&&"boolean"==typeof e.cycles&&e.cycles,d=e&&e.replacer?s(e.replacer):l,h="function"==typeof e?e:e&&e.cmp,p=h&&function(t){var e=h.length>2&&function(e){return t[e]};return function(r,n){return h({key:r,value:t[r]},{key:n,value:t[n]},e?{__proto__:null,get:e}:void 0)}},b=[];return function t(e,s,l,h){var g=r?"\n"+f(h,r):"",y=r?": ":":";if(l&&l.toJSON&&"function"==typeof l.toJSON&&(l=l.toJSON()),void 0!==(l=d(e,s,l))){if("object"!=typeof l||null===l)return n(l);if(i(l)){for(var m=[],v=0;v<l.length;v++){var w=t(l,v,l[v],h+1)||n(null);u(m,g+r+w)}return"["+c(m,",")+g+"]"}if(-1!==b.indexOf(l)){if(a)return n("__cycle__");throw new TypeError("Converting circular structure to JSON")}u(b,l);var _=o(l).sort(p&&p(l));for(m=[],v=0;v<_.length;v++){var S=t(l,s=_[v],l[s],h+1);if(S){var A=n(s)+y+S;u(m,g+r+A)}}return b.splice(b.indexOf(l),1),"{"+c(m,",")+g+"}"}}({"":t},"",t,0)}},9549:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},6998:(t,e,r)=>{"use strict";e.parse=r(6921),e.stringify=r(9191)},6921:t=>{"use strict";var e,r,n,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function o(t){throw{name:"SyntaxError",message:t,at:e,text:n}}function s(t){return t&&t!==r&&o("Expected '"+t+"' instead of '"+r+"'"),r=n.charAt(e),e+=1,r}function a(){var t,e="";for("-"===r&&(e="-",s("-"));r>="0"&&r<="9";)e+=r,s();if("."===r)for(e+=".";s()&&r>="0"&&r<="9";)e+=r;if("e"===r||"E"===r)for(e+=r,s(),"-"!==r&&"+"!==r||(e+=r,s());r>="0"&&r<="9";)e+=r,s();return t=Number(e),isFinite(t)||o("Bad number"),t}function c(){var t,e,n,a="";if('"'===r)for(;s();){if('"'===r)return s(),a;if("\\"===r)if(s(),"u"===r){for(n=0,e=0;e<4&&(t=parseInt(s(),16),isFinite(t));e+=1)n=16*n+t;a+=String.fromCharCode(n)}else{if("string"!=typeof i[r])break;a+=i[r]}else a+=r}o("Bad string")}function u(){for(;r&&r<=" ";)s()}function f(){switch(u(),r){case"{":return function(){var t,e={};if("{"===r){if(s("{"),u(),"}"===r)return s("}"),e;for(;r;){if(t=c(),u(),s(":"),Object.prototype.hasOwnProperty.call(e,t)&&o('Duplicate key "'+t+'"'),e[t]=f(),u(),"}"===r)return s("}"),e;s(","),u()}}o("Bad object")}();case"[":return function(){var t=[];if("["===r){if(s("["),u(),"]"===r)return s("]"),t;for(;r;){if(t.push(f()),u(),"]"===r)return s("]"),t;s(","),u()}}o("Bad array")}();case'"':return c();case"-":return a();default:return r>="0"&&r<="9"?a():function(){switch(r){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null;default:o("Unexpected '"+r+"'")}}()}}t.exports=function(t,i){var s;return n=t,e=0,r=" ",s=f(),u(),r&&o("Syntax error"),"function"==typeof i?function t(e,r){var n,o,s=e[r];if(s&&"object"==typeof s)for(n in f)Object.prototype.hasOwnProperty.call(s,n)&&(void 0===(o=t(s,n))?delete s[n]:s[n]=o);return i.call(e,r,s)}({"":s},""):s}},9191:t=>{"use strict";var e,r,n,i=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(t){return i.lastIndex=0,i.test(t)?'"'+t.replace(i,(function(t){var e=o[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function a(t,i){var o,c,u,f,l,d=e,h=i[t];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(t)),"function"==typeof n&&(h=n.call(i,t,h)),typeof h){case"string":return s(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(e+=r,l=[],"[object Array]"===Object.prototype.toString.apply(h)){for(f=h.length,o=0;o<f;o+=1)l[o]=a(o,h)||"null";return u=0===l.length?"[]":e?"[\n"+e+l.join(",\n"+e)+"\n"+d+"]":"["+l.join(",")+"]",e=d,u}if(n&&"object"==typeof n)for(f=n.length,o=0;o<f;o+=1)"string"==typeof(c=n[o])&&(u=a(c,h))&&l.push(s(c)+(e?": ":":")+u);else for(c in h)Object.prototype.hasOwnProperty.call(h,c)&&(u=a(c,h))&&l.push(s(c)+(e?": ":":")+u);return u=0===l.length?"{}":e?"{\n"+e+l.join(",\n"+e)+"\n"+d+"}":"{"+l.join(",")+"}",e=d,u}}t.exports=function(t,i,o){var s;if(e="",r="","number"==typeof o)for(s=0;s<o;s+=1)r+=" ";else"string"==typeof o&&(r=o);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return a("",{"":t})}},8290:(t,e,r)=>{t=r.nmd(t);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Boolean]",a="[object Date]",c="[object Function]",u="[object GeneratorFunction]",f="[object Map]",l="[object Number]",d="[object Object]",h="[object Promise]",p="[object RegExp]",b="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",_="[object Float32Array]",S="[object Float64Array]",A="[object Int8Array]",E="[object Int16Array]",M="[object Int32Array]",x="[object Uint8Array]",R="[object Uint8ClampedArray]",O="[object Uint16Array]",I="[object Uint32Array]",k=/\w*$/,P=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,T={};T[o]=T["[object Array]"]=T[v]=T[w]=T[s]=T[a]=T[_]=T[S]=T[A]=T[E]=T[M]=T[f]=T[l]=T[d]=T[p]=T[b]=T[g]=T[y]=T[x]=T[R]=T[O]=T[I]=!0,T["[object Error]"]=T[c]=T[m]=!1;var B="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,C="object"==typeof self&&self&&self.Object===Object&&self,j=B||C||Function("return this")(),L=e&&!e.nodeType&&e,F=L&&t&&!t.nodeType&&t,U=F&&F.exports===L;function D(t,e){return t.set(e[0],e[1]),t}function q(t,e){return t.add(e),t}function z(t,e,r,n){var i=-1,o=t?t.length:0;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function $(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function W(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function H(t,e){return function(r){return t(e(r))}}function V(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var G,K=Array.prototype,J=Function.prototype,Y=Object.prototype,Z=j["__core-js_shared__"],X=(G=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",Q=J.toString,tt=Y.hasOwnProperty,et=Y.toString,rt=RegExp("^"+Q.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nt=U?j.Buffer:void 0,it=j.Symbol,ot=j.Uint8Array,st=H(Object.getPrototypeOf,Object),at=Object.create,ct=Y.propertyIsEnumerable,ut=K.splice,ft=Object.getOwnPropertySymbols,lt=nt?nt.isBuffer:void 0,dt=H(Object.keys,Object),ht=jt(j,"DataView"),pt=jt(j,"Map"),bt=jt(j,"Promise"),gt=jt(j,"Set"),yt=jt(j,"WeakMap"),mt=jt(Object,"create"),vt=qt(ht),wt=qt(pt),_t=qt(bt),St=qt(gt),At=qt(yt),Et=it?it.prototype:void 0,Mt=Et?Et.valueOf:void 0;function xt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Rt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ot(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function It(t){this.__data__=new Rt(t)}function kt(t,e,r){var n=t[e];tt.call(t,e)&&zt(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function Pt(t,e){for(var r=t.length;r--;)if(zt(t[r][0],e))return r;return-1}function Nt(t,e,r,n,i,h,m){var P;if(n&&(P=h?n(t,i,h,m):n(t)),void 0!==P)return P;if(!Gt(t))return t;var N=$t(t);if(N){if(P=function(t){var e=t.length,r=t.constructor(e);return e&&"string"==typeof t[0]&&tt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!e)return function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(t,P)}else{var B=Ft(t),C=B==c||B==u;if(Ht(t))return function(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}(t,e);if(B==d||B==o||C&&!h){if($(t))return h?t:{};if(P=function(t){return"function"!=typeof t.constructor||Dt(t)?{}:Gt(e=st(t))?at(e):{};var e}(C?{}:t),!e)return function(t,e){return Bt(t,Lt(t),e)}(t,function(t,e){return t&&Bt(e,Kt(e),t)}(P,t))}else{if(!T[B])return h?t:{};P=function(t,e,r,n){var i,o=t.constructor;switch(e){case v:return Tt(t);case s:case a:return new o(+t);case w:return function(t,e){var r=e?Tt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,n);case _:case S:case A:case E:case M:case x:case R:case O:case I:return function(t,e){var r=e?Tt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,n);case f:return function(t,e,r){return z(e?r(W(t),!0):W(t),D,new t.constructor)}(t,n,r);case l:case g:return new o(t);case p:return function(t){var e=new t.constructor(t.source,k.exec(t));return e.lastIndex=t.lastIndex,e}(t);case b:return function(t,e,r){return z(e?r(V(t),!0):V(t),q,new t.constructor)}(t,n,r);case y:return i=t,Mt?Object(Mt.call(i)):{}}}(t,B,Nt,e)}}m||(m=new It);var j=m.get(t);if(j)return j;if(m.set(t,P),!N)var L=r?function(t){return function(t,e,r){var n=e(t);return $t(t)?n:function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}(n,r(t))}(t,Kt,Lt)}(t):Kt(t);return function(t,e){for(var r=-1,n=t?t.length:0;++r<n&&!1!==e(t[r],r););}(L||t,(function(i,o){L&&(i=t[o=i]),kt(P,o,Nt(i,e,r,n,o,t,m))})),P}function Tt(t){var e=new t.constructor(t.byteLength);return new ot(e).set(new ot(t)),e}function Bt(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var s=e[i],a=n?n(r[s],t[s],s,r,t):void 0;kt(r,s,void 0===a?t[s]:a)}return r}function Ct(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function jt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Gt(t)||(e=t,X&&X in e))&&(Vt(t)||$(t)?rt:P).test(qt(t));var e}(r)?r:void 0}xt.prototype.clear=function(){this.__data__=mt?mt(null):{}},xt.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},xt.prototype.get=function(t){var e=this.__data__;if(mt){var r=e[t];return r===n?void 0:r}return tt.call(e,t)?e[t]:void 0},xt.prototype.has=function(t){var e=this.__data__;return mt?void 0!==e[t]:tt.call(e,t)},xt.prototype.set=function(t,e){return this.__data__[t]=mt&&void 0===e?n:e,this},Rt.prototype.clear=function(){this.__data__=[]},Rt.prototype.delete=function(t){var e=this.__data__,r=Pt(e,t);return!(r<0||(r==e.length-1?e.pop():ut.call(e,r,1),0))},Rt.prototype.get=function(t){var e=this.__data__,r=Pt(e,t);return r<0?void 0:e[r][1]},Rt.prototype.has=function(t){return Pt(this.__data__,t)>-1},Rt.prototype.set=function(t,e){var r=this.__data__,n=Pt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Ot.prototype.clear=function(){this.__data__={hash:new xt,map:new(pt||Rt),string:new xt}},Ot.prototype.delete=function(t){return Ct(this,t).delete(t)},Ot.prototype.get=function(t){return Ct(this,t).get(t)},Ot.prototype.has=function(t){return Ct(this,t).has(t)},Ot.prototype.set=function(t,e){return Ct(this,t).set(t,e),this},It.prototype.clear=function(){this.__data__=new Rt},It.prototype.delete=function(t){return this.__data__.delete(t)},It.prototype.get=function(t){return this.__data__.get(t)},It.prototype.has=function(t){return this.__data__.has(t)},It.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Rt){var n=r.__data__;if(!pt||n.length<199)return n.push([t,e]),this;r=this.__data__=new Ot(n)}return r.set(t,e),this};var Lt=ft?H(ft,Object):function(){return[]},Ft=function(t){return et.call(t)};function Ut(t,e){return!!(e=null==e?i:e)&&("number"==typeof t||N.test(t))&&t>-1&&t%1==0&&t<e}function Dt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Y)}function qt(t){if(null!=t){try{return Q.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zt(t,e){return t===e||t!=t&&e!=e}(ht&&Ft(new ht(new ArrayBuffer(1)))!=w||pt&&Ft(new pt)!=f||bt&&Ft(bt.resolve())!=h||gt&&Ft(new gt)!=b||yt&&Ft(new yt)!=m)&&(Ft=function(t){var e=et.call(t),r=e==d?t.constructor:void 0,n=r?qt(r):void 0;if(n)switch(n){case vt:return w;case wt:return f;case _t:return h;case St:return b;case At:return m}return e});var $t=Array.isArray;function Wt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}(t.length)&&!Vt(t)}var Ht=lt||function(){return!1};function Vt(t){var e=Gt(t)?et.call(t):"";return e==c||e==u}function Gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Kt(t){return Wt(t)?function(t,e){var r=$t(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&Wt(t)}(t)&&tt.call(t,"callee")&&(!ct.call(t,"callee")||et.call(t)==o)}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,i=!!n;for(var s in t)!e&&!tt.call(t,s)||i&&("length"==s||Ut(s,n))||r.push(s);return r}(t):function(t){if(!Dt(t))return dt(t);var e=[];for(var r in Object(t))tt.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}t.exports=function(t){return Nt(t,!0,!0)}},8089:(t,e,r)=>{t=r.nmd(t);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",u="[object Null]",f="[object Object]",l="[object Proxy]",d="[object Undefined]",h=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[o]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b[a]=b["[object Map]"]=b["[object Number]"]=b[f]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object WeakMap]"]=!1;var g,y,m,v="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,w="object"==typeof self&&self&&self.Object===Object&&self,_=v||w||Function("return this")(),S=e&&!e.nodeType&&e,A=S&&t&&!t.nodeType&&t,E=A&&A.exports===S,M=E&&v.process,x=function(){try{return A&&A.require&&A.require("util").types||M&&M.binding&&M.binding("util")}catch(t){}}(),R=x&&x.isTypedArray,O=Array.prototype,I=Function.prototype,k=Object.prototype,P=_["__core-js_shared__"],N=I.toString,T=k.hasOwnProperty,B=(g=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",C=k.toString,j=N.call(Object),L=RegExp("^"+N.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=E?_.Buffer:void 0,U=_.Symbol,D=_.Uint8Array,q=(F&&F.allocUnsafe,y=Object.getPrototypeOf,m=Object,function(t){return y(m(t))}),z=Object.create,$=k.propertyIsEnumerable,W=O.splice,H=U?U.toStringTag:void 0,V=function(){try{var t=dt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),G=F?F.isBuffer:void 0,K=Math.max,J=Date.now,Y=dt(_,"Map"),Z=dt(Object,"create"),X=function(){function t(){}return function(e){if(!Et(e))return{};if(z)return z(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function Q(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function tt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function et(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function rt(t){var e=this.__data__=new tt(t);this.size=e.size}function nt(t,e,r){(void 0!==r&&!yt(t[e],r)||void 0===r&&!(e in t))&&st(t,e,r)}function it(t,e,r){var n=t[e];T.call(t,e)&&yt(n,r)&&(void 0!==r||e in t)||st(t,e,r)}function ot(t,e){for(var r=t.length;r--;)if(yt(t[r][0],e))return r;return-1}function st(t,e,r){"__proto__"==e&&V?V(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Q.prototype.clear=function(){this.__data__=Z?Z(null):{},this.size=0},Q.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Q.prototype.get=function(t){var e=this.__data__;if(Z){var r=e[t];return r===n?void 0:r}return T.call(e,t)?e[t]:void 0},Q.prototype.has=function(t){var e=this.__data__;return Z?void 0!==e[t]:T.call(e,t)},Q.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Z&&void 0===e?n:e,this},tt.prototype.clear=function(){this.__data__=[],this.size=0},tt.prototype.delete=function(t){var e=this.__data__,r=ot(e,t);return!(r<0||(r==e.length-1?e.pop():W.call(e,r,1),--this.size,0))},tt.prototype.get=function(t){var e=this.__data__,r=ot(e,t);return r<0?void 0:e[r][1]},tt.prototype.has=function(t){return ot(this.__data__,t)>-1},tt.prototype.set=function(t,e){var r=this.__data__,n=ot(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},et.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(Y||tt),string:new Q}},et.prototype.delete=function(t){var e=lt(this,t).delete(t);return this.size-=e?1:0,e},et.prototype.get=function(t){return lt(this,t).get(t)},et.prototype.has=function(t){return lt(this,t).has(t)},et.prototype.set=function(t,e){var r=lt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},rt.prototype.clear=function(){this.__data__=new tt,this.size=0},rt.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},rt.prototype.get=function(t){return this.__data__.get(t)},rt.prototype.has=function(t){return this.__data__.has(t)},rt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof tt){var n=r.__data__;if(!Y||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new et(n)}return r.set(t,e),this.size=r.size,this};function at(t){return null==t?void 0===t?d:u:H&&H in Object(t)?function(t){var e=T.call(t,H),r=t[H];try{t[H]=void 0;var n=!0}catch(t){}var i=C.call(t);return n&&(e?t[H]=r:delete t[H]),i}(t):function(t){return C.call(t)}(t)}function ct(t){return Mt(t)&&at(t)==o}function ut(t,e,r,n,i){t!==e&&function(t,e,r){for(var n=-1,i=Object(t),o=r(t),s=o.length;s--;){var a=o[++n];if(!1===e(i[a],a,i))break}}(e,(function(o,s){if(i||(i=new rt),Et(o))!function(t,e,r,n,i,o,s){var a=bt(t,r),c=bt(e,r),u=s.get(c);if(u)nt(t,r,u);else{var l,d,h,p,b,g=o?o(a,c,r+"",t,e,s):void 0,y=void 0===g;if(y){var m=vt(c),v=!m&&_t(c),w=!m&&!v&&xt(c);g=c,m||v||w?vt(a)?g=a:Mt(b=a)&&wt(b)?g=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(a):v?(y=!1,g=function(t,e){return t.slice()}(c)):w?(y=!1,p=new(h=(l=c).buffer).constructor(h.byteLength),new D(p).set(new D(h)),d=p,g=new l.constructor(d,l.byteOffset,l.length)):g=[]:function(t){if(!Mt(t)||at(t)!=f)return!1;var e=q(t);if(null===e)return!0;var r=T.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&N.call(r)==j}(c)||mt(c)?(g=a,mt(a)?g=function(t){return function(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=void 0;void 0===c&&(c=t[a]),i?st(r,a,c):it(r,a,c)}return r}(t,Rt(t))}(a):Et(a)&&!St(a)||(g=function(t){return"function"!=typeof t.constructor||pt(t)?{}:X(q(t))}(c))):y=!1}y&&(s.set(c,g),i(g,c,n,o,s),s.delete(c)),nt(t,r,g)}}(t,e,s,r,ut,n,i);else{var a=n?n(bt(t,s),o,s+"",t,e,i):void 0;void 0===a&&(a=o),nt(t,s,a)}}),Rt)}var ft=V?function(t,e){return V(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:kt;function lt(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function dt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Et(t)||function(t){return!!B&&B in t}(t))&&(St(t)?L:h).test(function(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}(r)?r:void 0}function ht(t,e){var r=typeof t;return!!(e=null==e?i:e)&&("number"==r||"symbol"!=r&&p.test(t))&&t>-1&&t%1==0&&t<e}function pt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||k)}function bt(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var gt=function(t){var e=0,r=0;return function(){var n=J(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ft);function yt(t,e){return t===e||t!=t&&e!=e}var mt=ct(function(){return arguments}())?ct:function(t){return Mt(t)&&T.call(t,"callee")&&!$.call(t,"callee")},vt=Array.isArray;function wt(t){return null!=t&&At(t.length)&&!St(t)}var _t=G||function(){return!1};function St(t){if(!Et(t))return!1;var e=at(t);return e==a||e==c||e==s||e==l}function At(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}function Et(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Mt(t){return null!=t&&"object"==typeof t}var xt=R?function(t){return function(e){return t(e)}}(R):function(t){return Mt(t)&&At(t.length)&&!!b[at(t)]};function Rt(t){return wt(t)?function(t,e){var r=vt(t),n=!r&&mt(t),i=!r&&!n&&_t(t),o=!r&&!n&&!i&&xt(t),s=r||n||i||o,a=s?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=a.length;for(var u in t)!e&&!T.call(t,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ht(u,c))||a.push(u);return a}(t,!0):function(t){if(!Et(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=pt(t),r=[];for(var n in t)("constructor"!=n||!e&&T.call(t,n))&&r.push(n);return r}(t)}var Ot,It=(Ot=function(t,e,r){ut(t,e,r)},function(t,e){return gt(function(t,e,r){return e=K(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=K(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(t,this,a)}}(t,e,kt),t+"")}((function(t,e){var r=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=Ot.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(t,e,r){if(!Et(r))return!1;var n=typeof e;return!!("number"==n?wt(r)&&ht(e,r.length):"string"==n&&e in r)&&yt(r[e],t)}(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var s=e[r];s&&Ot(t,s,r)}return t})));function kt(t){return t}t.exports=It},5250:function(t,e,r){var n;t=r.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,u=128,f=1/0,l=9007199254740991,d=NaN,h=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],b="[object Arguments]",g="[object Array]",y="[object Boolean]",m="[object Date]",v="[object Error]",w="[object Function]",_="[object GeneratorFunction]",S="[object Map]",A="[object Number]",E="[object Object]",M="[object Promise]",x="[object RegExp]",R="[object Set]",O="[object String]",I="[object Symbol]",k="[object WeakMap]",P="[object ArrayBuffer]",N="[object DataView]",T="[object Float32Array]",B="[object Float64Array]",C="[object Int8Array]",j="[object Int16Array]",L="[object Int32Array]",F="[object Uint8Array]",U="[object Uint8ClampedArray]",D="[object Uint16Array]",q="[object Uint32Array]",z=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,G=RegExp(H.source),K=RegExp(V.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(et.source),nt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ut=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,ht=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,_t="\\ud800-\\udfff",St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",At="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",Mt="A-Z\\xc0-\\xd6\\xd8-\\xde",xt="\\ufe0e\\ufe0f",Rt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ot="["+_t+"]",It="["+Rt+"]",kt="["+St+"]",Pt="\\d+",Nt="["+At+"]",Tt="["+Et+"]",Bt="[^"+_t+Rt+Pt+At+Et+Mt+"]",Ct="\\ud83c[\\udffb-\\udfff]",jt="[^"+_t+"]",Lt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",Ut="["+Mt+"]",Dt="\\u200d",qt="(?:"+Tt+"|"+Bt+")",zt="(?:"+Ut+"|"+Bt+")",$t="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ht="(?:"+kt+"|"+Ct+")?",Vt="["+xt+"]?",Gt=Vt+Ht+"(?:"+Dt+"(?:"+[jt,Lt,Ft].join("|")+")"+Vt+Ht+")*",Kt="(?:"+[Nt,Lt,Ft].join("|")+")"+Gt,Jt="(?:"+[jt+kt+"?",kt,Lt,Ft,Ot].join("|")+")",Yt=RegExp("['’]","g"),Zt=RegExp(kt,"g"),Xt=RegExp(Ct+"(?="+Ct+")|"+Jt+Gt,"g"),Qt=RegExp([Ut+"?"+Tt+"+"+$t+"(?="+[It,Ut,"$"].join("|")+")",zt+"+"+Wt+"(?="+[It,Ut+qt,"$"].join("|")+")",Ut+"?"+qt+"+"+$t,Ut+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pt,Kt].join("|"),"g"),te=RegExp("["+Dt+_t+St+xt+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ne=-1,ie={};ie[T]=ie[B]=ie[C]=ie[j]=ie[L]=ie[F]=ie[U]=ie[D]=ie[q]=!0,ie[b]=ie[g]=ie[P]=ie[y]=ie[N]=ie[m]=ie[v]=ie[w]=ie[S]=ie[A]=ie[E]=ie[x]=ie[R]=ie[O]=ie[k]=!1;var oe={};oe[b]=oe[g]=oe[P]=oe[N]=oe[y]=oe[m]=oe[T]=oe[B]=oe[C]=oe[j]=oe[L]=oe[S]=oe[A]=oe[E]=oe[x]=oe[R]=oe[O]=oe[I]=oe[F]=oe[U]=oe[D]=oe[q]=!0,oe[v]=oe[w]=oe[k]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ce=parseInt,ue="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,fe="object"==typeof self&&self&&self.Object===Object&&self,le=ue||fe||Function("return this")(),de=e&&!e.nodeType&&e,he=de&&t&&!t.nodeType&&t,pe=he&&he.exports===de,be=pe&&ue.process,ge=function(){try{return he&&he.require&&he.require("util").types||be&&be.binding&&be.binding("util")}catch(t){}}(),ye=ge&&ge.isArrayBuffer,me=ge&&ge.isDate,ve=ge&&ge.isMap,we=ge&&ge.isRegExp,_e=ge&&ge.isSet,Se=ge&&ge.isTypedArray;function Ae(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Ee(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(n,s,r(s),t)}return n}function Me(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function xe(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function Re(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Oe(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}function Ie(t,e){return!(null==t||!t.length)&&Ue(t,e,0)>-1}function ke(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Pe(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function Ne(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Te(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Be(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function Ce(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var je=$e("length");function Le(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function Fe(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ue(t,e,r){return e==e?function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):Fe(t,qe,r)}function De(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function qe(t){return t!=t}function ze(t,e){var r=null==t?0:t.length;return r?Ve(t,e)/r:d}function $e(t){return function(e){return null==e?i:e[t]}}function We(t){return function(e){return null==t?i:t[e]}}function He(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Ve(t,e){for(var r,n=-1,o=t.length;++n<o;){var s=e(t[n]);s!==i&&(r=r===i?s:r+s)}return r}function Ge(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Ke(t){return t?t.slice(0,lr(t)+1).replace(nt,""):t}function Je(t){return function(e){return t(e)}}function Ye(t,e){return Pe(e,(function(e){return t[e]}))}function Ze(t,e){return t.has(e)}function Xe(t,e){for(var r=-1,n=t.length;++r<n&&Ue(e,t[r],0)>-1;);return r}function Qe(t,e){for(var r=t.length;r--&&Ue(e,t[r],0)>-1;);return r}var tr=We({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),er=We({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rr(t){return"\\"+se[t]}function nr(t){return te.test(t)}function ir(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function or(t,e){return function(r){return t(e(r))}}function sr(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r];s!==e&&s!==a||(t[r]=a,o[i++]=r)}return o}function ar(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function cr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function ur(t){return nr(t)?function(t){for(var e=Xt.lastIndex=0;Xt.test(t);)++e;return e}(t):je(t)}function fr(t){return nr(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.split("")}(t)}function lr(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var dr=We({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),hr=function t(e){var r,n=(e=null==e?le:hr.defaults(le.Object(),e,hr.pick(le,re))).Array,it=e.Date,_t=e.Error,St=e.Function,At=e.Math,Et=e.Object,Mt=e.RegExp,xt=e.String,Rt=e.TypeError,Ot=n.prototype,It=St.prototype,kt=Et.prototype,Pt=e["__core-js_shared__"],Nt=It.toString,Tt=kt.hasOwnProperty,Bt=0,Ct=(r=/[^.]+$/.exec(Pt&&Pt.keys&&Pt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",jt=kt.toString,Lt=Nt.call(Et),Ft=le._,Ut=Mt("^"+Nt.call(Tt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dt=pe?e.Buffer:i,qt=e.Symbol,zt=e.Uint8Array,$t=Dt?Dt.allocUnsafe:i,Wt=or(Et.getPrototypeOf,Et),Ht=Et.create,Vt=kt.propertyIsEnumerable,Gt=Ot.splice,Kt=qt?qt.isConcatSpreadable:i,Jt=qt?qt.iterator:i,Xt=qt?qt.toStringTag:i,te=function(){try{var t=co(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==le.clearTimeout&&e.clearTimeout,ue=it&&it.now!==le.Date.now&&it.now,fe=e.setTimeout!==le.setTimeout&&e.setTimeout,de=At.ceil,he=At.floor,be=Et.getOwnPropertySymbols,ge=Dt?Dt.isBuffer:i,je=e.isFinite,We=Ot.join,pr=or(Et.keys,Et),br=At.max,gr=At.min,yr=it.now,mr=e.parseInt,vr=At.random,wr=Ot.reverse,_r=co(e,"DataView"),Sr=co(e,"Map"),Ar=co(e,"Promise"),Er=co(e,"Set"),Mr=co(e,"WeakMap"),xr=co(Et,"create"),Rr=Mr&&new Mr,Or={},Ir=Lo(_r),kr=Lo(Sr),Pr=Lo(Ar),Nr=Lo(Er),Tr=Lo(Mr),Br=qt?qt.prototype:i,Cr=Br?Br.valueOf:i,jr=Br?Br.toString:i;function Lr(t){if(ta(t)&&!$s(t)&&!(t instanceof qr)){if(t instanceof Dr)return t;if(Tt.call(t,"__wrapped__"))return Fo(t)}return new Dr(t)}var Fr=function(){function t(){}return function(e){if(!Qs(e))return{};if(Ht)return Ht(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function Ur(){}function Dr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function qr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function zr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function $r(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Hr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Wr;++e<r;)this.add(t[e])}function Vr(t){var e=this.__data__=new $r(t);this.size=e.size}function Gr(t,e){var r=$s(t),n=!r&&zs(t),i=!r&&!n&&Gs(t),o=!r&&!n&&!i&&ca(t),s=r||n||i||o,a=s?Ge(t.length,xt):[],c=a.length;for(var u in t)!e&&!Tt.call(t,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||go(u,c))||a.push(u);return a}function Kr(t){var e=t.length;return e?t[Hn(0,e-1)]:i}function Jr(t,e){return No(xi(t),on(e,0,t.length))}function Yr(t){return No(xi(t))}function Zr(t,e,r){(r!==i&&!Us(t[e],r)||r===i&&!(e in t))&&rn(t,e,r)}function Xr(t,e,r){var n=t[e];Tt.call(t,e)&&Us(n,r)&&(r!==i||e in t)||rn(t,e,r)}function Qr(t,e){for(var r=t.length;r--;)if(Us(t[r][0],e))return r;return-1}function tn(t,e,r,n){return fn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function en(t,e){return t&&Ri(e,ka(e),t)}function rn(t,e,r){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function nn(t,e){for(var r=-1,o=e.length,s=n(o),a=null==t;++r<o;)s[r]=a?i:Ma(t,e[r]);return s}function on(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function sn(t,e,r,n,o,s){var a,c=1&e,u=2&e,f=4&e;if(r&&(a=o?r(t,n,o,s):r(t)),a!==i)return a;if(!Qs(t))return t;var l=$s(t);if(l){if(a=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Tt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!c)return xi(t,a)}else{var d=lo(t),h=d==w||d==_;if(Gs(t))return wi(t,c);if(d==E||d==b||h&&!o){if(a=u||h?{}:po(t),!c)return u?function(t,e){return Ri(t,fo(t),e)}(t,function(t,e){return t&&Ri(e,Pa(e),t)}(a,t)):function(t,e){return Ri(t,uo(t),e)}(t,en(a,t))}else{if(!oe[d])return o?t:{};a=function(t,e,r){var n,i=t.constructor;switch(e){case P:return _i(t);case y:case m:return new i(+t);case N:return function(t,e){var r=e?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case T:case B:case C:case j:case L:case F:case U:case D:case q:return Si(t,r);case S:return new i;case A:case O:return new i(t);case x:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case R:return new i;case I:return n=t,Cr?Et(Cr.call(n)):{}}}(t,d,c)}}s||(s=new Vr);var p=s.get(t);if(p)return p;s.set(t,a),oa(t)?t.forEach((function(n){a.add(sn(n,e,r,n,t,s))})):ea(t)&&t.forEach((function(n,i){a.set(i,sn(n,e,r,i,t,s))}));var g=l?i:(f?u?eo:to:u?Pa:ka)(t);return Me(g||t,(function(n,i){g&&(n=t[i=n]),Xr(a,i,sn(n,e,r,i,t,s))})),a}function an(t,e,r){var n=r.length;if(null==t)return!n;for(t=Et(t);n--;){var o=r[n],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function cn(t,e,r){if("function"!=typeof t)throw new Rt(o);return Oo((function(){t.apply(i,r)}),e)}function un(t,e,r,n){var i=-1,o=Ie,s=!0,a=t.length,c=[],u=e.length;if(!a)return c;r&&(e=Pe(e,Je(r))),n?(o=ke,s=!1):e.length>=200&&(o=Ze,s=!1,e=new Hr(e));t:for(;++i<a;){var f=t[i],l=null==r?f:r(f);if(f=n||0!==f?f:0,s&&l==l){for(var d=u;d--;)if(e[d]===l)continue t;c.push(f)}else o(e,l,n)||c.push(f)}return c}Lr.templateSettings={escape:J,evaluate:Y,interpolate:Z,variable:"",imports:{_:Lr}},Lr.prototype=Ur.prototype,Lr.prototype.constructor=Lr,Dr.prototype=Fr(Ur.prototype),Dr.prototype.constructor=Dr,qr.prototype=Fr(Ur.prototype),qr.prototype.constructor=qr,zr.prototype.clear=function(){this.__data__=xr?xr(null):{},this.size=0},zr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},zr.prototype.get=function(t){var e=this.__data__;if(xr){var r=e[t];return r===s?i:r}return Tt.call(e,t)?e[t]:i},zr.prototype.has=function(t){var e=this.__data__;return xr?e[t]!==i:Tt.call(e,t)},zr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=xr&&e===i?s:e,this},$r.prototype.clear=function(){this.__data__=[],this.size=0},$r.prototype.delete=function(t){var e=this.__data__,r=Qr(e,t);return!(r<0||(r==e.length-1?e.pop():Gt.call(e,r,1),--this.size,0))},$r.prototype.get=function(t){var e=this.__data__,r=Qr(e,t);return r<0?i:e[r][1]},$r.prototype.has=function(t){return Qr(this.__data__,t)>-1},$r.prototype.set=function(t,e){var r=this.__data__,n=Qr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Wr.prototype.clear=function(){this.size=0,this.__data__={hash:new zr,map:new(Sr||$r),string:new zr}},Wr.prototype.delete=function(t){var e=so(this,t).delete(t);return this.size-=e?1:0,e},Wr.prototype.get=function(t){return so(this,t).get(t)},Wr.prototype.has=function(t){return so(this,t).has(t)},Wr.prototype.set=function(t,e){var r=so(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Hr.prototype.add=Hr.prototype.push=function(t){return this.__data__.set(t,s),this},Hr.prototype.has=function(t){return this.__data__.has(t)},Vr.prototype.clear=function(){this.__data__=new $r,this.size=0},Vr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Vr.prototype.get=function(t){return this.__data__.get(t)},Vr.prototype.has=function(t){return this.__data__.has(t)},Vr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof $r){var n=r.__data__;if(!Sr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Wr(n)}return r.set(t,e),this.size=r.size,this};var fn=ki(mn),ln=ki(vn,!0);function dn(t,e){var r=!0;return fn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function hn(t,e,r){for(var n=-1,o=t.length;++n<o;){var s=t[n],a=e(s);if(null!=a&&(c===i?a==a&&!aa(a):r(a,c)))var c=a,u=s}return u}function pn(t,e){var r=[];return fn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function bn(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=bo),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?bn(a,e-1,r,n,i):Ne(i,a):n||(i[i.length]=a)}return i}var gn=Pi(),yn=Pi(!0);function mn(t,e){return t&&gn(t,e,ka)}function vn(t,e){return t&&yn(t,e,ka)}function wn(t,e){return Oe(e,(function(e){return Ys(t[e])}))}function _n(t,e){for(var r=0,n=(e=gi(e,t)).length;null!=t&&r<n;)t=t[jo(e[r++])];return r&&r==n?t:i}function Sn(t,e,r){var n=e(t);return $s(t)?n:Ne(n,r(t))}function An(t){return null==t?t===i?"[object Undefined]":"[object Null]":Xt&&Xt in Et(t)?function(t){var e=Tt.call(t,Xt),r=t[Xt];try{t[Xt]=i;var n=!0}catch(t){}var o=jt.call(t);return n&&(e?t[Xt]=r:delete t[Xt]),o}(t):function(t){return jt.call(t)}(t)}function En(t,e){return t>e}function Mn(t,e){return null!=t&&Tt.call(t,e)}function xn(t,e){return null!=t&&e in Et(t)}function Rn(t,e,r){for(var o=r?ke:Ie,s=t[0].length,a=t.length,c=a,u=n(a),f=1/0,l=[];c--;){var d=t[c];c&&e&&(d=Pe(d,Je(e))),f=gr(d.length,f),u[c]=!r&&(e||s>=120&&d.length>=120)?new Hr(c&&d):i}d=t[0];var h=-1,p=u[0];t:for(;++h<s&&l.length<f;){var b=d[h],g=e?e(b):b;if(b=r||0!==b?b:0,!(p?Ze(p,g):o(l,g,r))){for(c=a;--c;){var y=u[c];if(!(y?Ze(y,g):o(t[c],g,r)))continue t}p&&p.push(g),l.push(b)}}return l}function On(t,e,r){var n=null==(t=Mo(t,e=gi(e,t)))?t:t[jo(Jo(e))];return null==n?i:Ae(n,t,r)}function In(t){return ta(t)&&An(t)==b}function kn(t,e,r,n,o){return t===e||(null==t||null==e||!ta(t)&&!ta(e)?t!=t&&e!=e:function(t,e,r,n,o,s){var a=$s(t),c=$s(e),u=a?g:lo(t),f=c?g:lo(e),l=(u=u==b?E:u)==E,d=(f=f==b?E:f)==E,h=u==f;if(h&&Gs(t)){if(!Gs(e))return!1;a=!0,l=!1}if(h&&!l)return s||(s=new Vr),a||ca(t)?Xi(t,e,r,n,o,s):function(t,e,r,n,i,o,s){switch(r){case N:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case P:return!(t.byteLength!=e.byteLength||!o(new zt(t),new zt(e)));case y:case m:case A:return Us(+t,+e);case v:return t.name==e.name&&t.message==e.message;case x:case O:return t==e+"";case S:var a=ir;case R:var c=1&n;if(a||(a=ar),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;n|=2,s.set(t,e);var f=Xi(a(t),a(e),n,i,o,s);return s.delete(t),f;case I:if(Cr)return Cr.call(t)==Cr.call(e)}return!1}(t,e,u,r,n,o,s);if(!(1&r)){var p=l&&Tt.call(t,"__wrapped__"),w=d&&Tt.call(e,"__wrapped__");if(p||w){var _=p?t.value():t,M=w?e.value():e;return s||(s=new Vr),o(_,M,r,n,s)}}return!!h&&(s||(s=new Vr),function(t,e,r,n,o,s){var a=1&r,c=to(t),u=c.length;if(u!=to(e).length&&!a)return!1;for(var f=u;f--;){var l=c[f];if(!(a?l in e:Tt.call(e,l)))return!1}var d=s.get(t),h=s.get(e);if(d&&h)return d==e&&h==t;var p=!0;s.set(t,e),s.set(e,t);for(var b=a;++f<u;){var g=t[l=c[f]],y=e[l];if(n)var m=a?n(y,g,l,e,t,s):n(g,y,l,t,e,s);if(!(m===i?g===y||o(g,y,r,n,s):m)){p=!1;break}b||(b="constructor"==l)}if(p&&!b){var v=t.constructor,w=e.constructor;v==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(t),s.delete(e),p}(t,e,r,n,o,s))}(t,e,r,n,kn,o))}function Pn(t,e,r,n){var o=r.length,s=o,a=!n;if(null==t)return!s;for(t=Et(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<s;){var u=(c=r[o])[0],f=t[u],l=c[1];if(a&&c[2]){if(f===i&&!(u in t))return!1}else{var d=new Vr;if(n)var h=n(f,l,u,t,e,d);if(!(h===i?kn(l,f,3,n,d):h))return!1}}return!0}function Nn(t){return!(!Qs(t)||(e=t,Ct&&Ct in e))&&(Ys(t)?Ut:bt).test(Lo(t));var e}function Tn(t){return"function"==typeof t?t:null==t?rc:"object"==typeof t?$s(t)?Fn(t[0],t[1]):Ln(t):lc(t)}function Bn(t){if(!_o(t))return pr(t);var e=[];for(var r in Et(t))Tt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Cn(t,e){return t<e}function jn(t,e){var r=-1,i=Hs(t)?n(t.length):[];return fn(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function Ln(t){var e=ao(t);return 1==e.length&&e[0][2]?Ao(e[0][0],e[0][1]):function(r){return r===t||Pn(r,t,e)}}function Fn(t,e){return mo(t)&&So(e)?Ao(jo(t),e):function(r){var n=Ma(r,t);return n===i&&n===e?xa(r,t):kn(e,n,3)}}function Un(t,e,r,n,o){t!==e&&gn(e,(function(s,a){if(o||(o=new Vr),Qs(s))!function(t,e,r,n,o,s,a){var c=xo(t,r),u=xo(e,r),f=a.get(u);if(f)Zr(t,r,f);else{var l=s?s(c,u,r+"",t,e,a):i,d=l===i;if(d){var h=$s(u),p=!h&&Gs(u),b=!h&&!p&&ca(u);l=u,h||p||b?$s(c)?l=c:Vs(c)?l=xi(c):p?(d=!1,l=wi(u,!0)):b?(d=!1,l=Si(u,!0)):l=[]:na(u)||zs(u)?(l=c,zs(c)?l=ga(c):Qs(c)&&!Ys(c)||(l=po(u))):d=!1}d&&(a.set(u,l),o(l,u,n,s,a),a.delete(u)),Zr(t,r,l)}}(t,e,a,r,Un,n,o);else{var c=n?n(xo(t,a),s,a+"",t,e,o):i;c===i&&(c=s),Zr(t,a,c)}}),Pa)}function Dn(t,e){var r=t.length;if(r)return go(e+=e<0?r:0,r)?t[e]:i}function qn(t,e,r){e=e.length?Pe(e,(function(t){return $s(t)?function(e){return _n(e,1===t.length?t[0]:t)}:t})):[rc];var n=-1;e=Pe(e,Je(oo()));var i=jn(t,(function(t,r,i){var o=Pe(e,(function(e){return e(t)}));return{criteria:o,index:++n,value:t}}));return function(t,e){var n=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,s=i.length,a=r.length;++n<s;){var c=Ai(i[n],o[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}));n--;)t[n]=t[n].value;return t}(i)}function zn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var s=e[n],a=_n(t,s);r(a,s)&&Yn(o,gi(s,t),a)}return o}function $n(t,e,r,n){var i=n?De:Ue,o=-1,s=e.length,a=t;for(t===e&&(e=xi(e)),r&&(a=Pe(t,Je(r)));++o<s;)for(var c=0,u=e[o],f=r?r(u):u;(c=i(a,f,c,n))>-1;)a!==t&&Gt.call(a,c,1),Gt.call(t,c,1);return t}function Wn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;go(i)?Gt.call(t,i,1):ci(t,i)}}return t}function Hn(t,e){return t+he(vr()*(e-t+1))}function Vn(t,e){var r="";if(!t||e<1||e>l)return r;do{e%2&&(r+=t),(e=he(e/2))&&(t+=t)}while(e);return r}function Gn(t,e){return Io(Eo(t,e,rc),t+"")}function Kn(t){return Kr(Ua(t))}function Jn(t,e){var r=Ua(t);return No(r,on(e,0,r.length))}function Yn(t,e,r,n){if(!Qs(t))return t;for(var o=-1,s=(e=gi(e,t)).length,a=s-1,c=t;null!=c&&++o<s;){var u=jo(e[o]),f=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(o!=a){var l=c[u];(f=n?n(l,u,c):i)===i&&(f=Qs(l)?l:go(e[o+1])?[]:{})}Xr(c,u,f),c=c[u]}return t}var Zn=Rr?function(t,e){return Rr.set(t,e),t}:rc,Xn=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Qa(e),writable:!0})}:rc;function Qn(t){return No(Ua(t))}function ti(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var s=n(o);++i<o;)s[i]=t[i+e];return s}function ei(t,e){var r;return fn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ri(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=t[o];null!==s&&!aa(s)&&(r?s<=e:s<e)?n=o+1:i=o}return i}return ni(t,e,rc,r)}function ni(t,e,r,n){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=r(e))!=e,c=null===e,u=aa(e),f=e===i;o<s;){var l=he((o+s)/2),d=r(t[l]),h=d!==i,p=null===d,b=d==d,g=aa(d);if(a)var y=n||b;else y=f?b&&(n||h):c?b&&h&&(n||!p):u?b&&h&&!p&&(n||!g):!p&&!g&&(n?d<=e:d<e);y?o=l+1:s=l}return gr(s,4294967294)}function ii(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r],a=e?e(s):s;if(!r||!Us(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function oi(t){return"number"==typeof t?t:aa(t)?d:+t}function si(t){if("string"==typeof t)return t;if($s(t))return Pe(t,si)+"";if(aa(t))return jr?jr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ai(t,e,r){var n=-1,i=Ie,o=t.length,s=!0,a=[],c=a;if(r)s=!1,i=ke;else if(o>=200){var u=e?null:Vi(t);if(u)return ar(u);s=!1,i=Ze,c=new Hr}else c=e?[]:a;t:for(;++n<o;){var f=t[n],l=e?e(f):f;if(f=r||0!==f?f:0,s&&l==l){for(var d=c.length;d--;)if(c[d]===l)continue t;e&&c.push(l),a.push(f)}else i(c,l,r)||(c!==a&&c.push(l),a.push(f))}return a}function ci(t,e){return null==(t=Mo(t,e=gi(e,t)))||delete t[jo(Jo(e))]}function ui(t,e,r,n){return Yn(t,e,r(_n(t,e)),n)}function fi(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?ti(t,n?0:o,n?o+1:i):ti(t,n?o+1:0,n?i:o)}function li(t,e){var r=t;return r instanceof qr&&(r=r.value()),Te(e,(function(t,e){return e.func.apply(e.thisArg,Ne([t],e.args))}),r)}function di(t,e,r){var i=t.length;if(i<2)return i?ai(t[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=t[o],c=-1;++c<i;)c!=o&&(s[o]=un(s[o]||a,t[c],e,r));return ai(bn(s,1),e,r)}function hi(t,e,r){for(var n=-1,o=t.length,s=e.length,a={};++n<o;){var c=n<s?e[n]:i;r(a,t[n],c)}return a}function pi(t){return Vs(t)?t:[]}function bi(t){return"function"==typeof t?t:rc}function gi(t,e){return $s(t)?t:mo(t,e)?[t]:Co(ya(t))}var yi=Gn;function mi(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:ti(t,e,r)}var vi=se||function(t){return le.clearTimeout(t)};function wi(t,e){if(e)return t.slice();var r=t.length,n=$t?$t(r):new t.constructor(r);return t.copy(n),n}function _i(t){var e=new t.constructor(t.byteLength);return new zt(e).set(new zt(t)),e}function Si(t,e){var r=e?_i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ai(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,s=aa(t),a=e!==i,c=null===e,u=e==e,f=aa(e);if(!c&&!f&&!s&&t>e||s&&a&&u&&!c&&!f||n&&a&&u||!r&&u||!o)return 1;if(!n&&!s&&!f&&t<e||f&&r&&o&&!n&&!s||c&&r&&o||!a&&o||!u)return-1}return 0}function Ei(t,e,r,i){for(var o=-1,s=t.length,a=r.length,c=-1,u=e.length,f=br(s-a,0),l=n(u+f),d=!i;++c<u;)l[c]=e[c];for(;++o<a;)(d||o<s)&&(l[r[o]]=t[o]);for(;f--;)l[c++]=t[o++];return l}function Mi(t,e,r,i){for(var o=-1,s=t.length,a=-1,c=r.length,u=-1,f=e.length,l=br(s-c,0),d=n(l+f),h=!i;++o<l;)d[o]=t[o];for(var p=o;++u<f;)d[p+u]=e[u];for(;++a<c;)(h||o<s)&&(d[p+r[a]]=t[o++]);return d}function xi(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function Ri(t,e,r,n){var o=!r;r||(r={});for(var s=-1,a=e.length;++s<a;){var c=e[s],u=n?n(r[c],t[c],c,r,t):i;u===i&&(u=t[c]),o?rn(r,c,u):Xr(r,c,u)}return r}function Oi(t,e){return function(r,n){var i=$s(r)?Ee:tn,o=e?e():{};return i(r,t,oo(n,2),o)}}function Ii(t){return Gn((function(e,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&yo(r[0],r[1],a)&&(s=o<3?i:s,o=1),e=Et(e);++n<o;){var c=r[n];c&&t(e,c,n,s)}return e}))}function ki(t,e){return function(r,n){if(null==r)return r;if(!Hs(r))return t(r,n);for(var i=r.length,o=e?i:-1,s=Et(r);(e?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Pi(t){return function(e,r,n){for(var i=-1,o=Et(e),s=n(e),a=s.length;a--;){var c=s[t?a:++i];if(!1===r(o[c],c,o))break}return e}}function Ni(t){return function(e){var r=nr(e=ya(e))?fr(e):i,n=r?r[0]:e.charAt(0),o=r?mi(r,1).join(""):e.slice(1);return n[t]()+o}}function Ti(t){return function(e){return Te(Ya(za(e).replace(Yt,"")),t,"")}}function Bi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Fr(t.prototype),n=t.apply(r,e);return Qs(n)?n:r}}function Ci(t){return function(e,r,n){var o=Et(e);if(!Hs(e)){var s=oo(r,3);e=ka(e),r=function(t){return s(o[t],t,o)}}var a=t(e,r,n);return a>-1?o[s?e[a]:a]:i}}function ji(t){return Qi((function(e){var r=e.length,n=r,s=Dr.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new Rt(o);if(s&&!c&&"wrapper"==no(a))var c=new Dr([],!0)}for(n=c?n:r;++n<r;){var u=no(a=e[n]),f="wrapper"==u?ro(a):i;c=f&&vo(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?c[no(f[0])].apply(c,f[3]):1==a.length&&vo(a)?c[u]():c.thru(a)}return function(){var t=arguments,n=t[0];if(c&&1==t.length&&$s(n))return c.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Li(t,e,r,o,s,a,c,f,l,d){var h=e&u,p=1&e,b=2&e,g=24&e,y=512&e,m=b?i:Bi(t);return function u(){for(var v=arguments.length,w=n(v),_=v;_--;)w[_]=arguments[_];if(g)var S=io(u),A=function(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}(w,S);if(o&&(w=Ei(w,o,s,g)),a&&(w=Mi(w,a,c,g)),v-=A,g&&v<d){var E=sr(w,S);return Wi(t,e,Li,u.placeholder,r,w,E,f,l,d-v)}var M=p?r:this,x=b?M[t]:t;return v=w.length,f?w=function(t,e){for(var r=t.length,n=gr(e.length,r),o=xi(t);n--;){var s=e[n];t[n]=go(s,r)?o[s]:i}return t}(w,f):y&&v>1&&w.reverse(),h&&l<v&&(w.length=l),this&&this!==le&&this instanceof u&&(x=m||Bi(x)),x.apply(M,w)}}function Fi(t,e){return function(r,n){return function(t,e,r,n){return mn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function Ui(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=si(r),n=si(n)):(r=oi(r),n=oi(n)),o=t(r,n)}return o}}function Di(t){return Qi((function(e){return e=Pe(e,Je(oo())),Gn((function(r){var n=this;return t(e,(function(t){return Ae(t,n,r)}))}))}))}function qi(t,e){var r=(e=e===i?" ":si(e)).length;if(r<2)return r?Vn(e,t):e;var n=Vn(e,de(t/ur(e)));return nr(e)?mi(fr(n),0,t).join(""):n.slice(0,t)}function zi(t){return function(e,r,o){return o&&"number"!=typeof o&&yo(e,r,o)&&(r=o=i),e=da(e),r===i?(r=e,e=0):r=da(r),function(t,e,r,i){for(var o=-1,s=br(de((e-t)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=t,t+=r;return a}(e,r,o=o===i?e<r?1:-1:da(o),t)}}function $i(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=ba(e),r=ba(r)),t(e,r)}}function Wi(t,e,r,n,o,s,a,u,f,l){var d=8&e;e|=d?c:64,4&(e&=~(d?64:c))||(e&=-4);var h=[t,e,o,d?s:i,d?a:i,d?i:s,d?i:a,u,f,l],p=r.apply(i,h);return vo(t)&&Ro(p,h),p.placeholder=n,ko(p,t,e)}function Hi(t){var e=At[t];return function(t,r){if(t=ba(t),(r=null==r?0:gr(ha(r),292))&&je(t)){var n=(ya(t)+"e").split("e");return+((n=(ya(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Vi=Er&&1/ar(new Er([,-0]))[1]==f?function(t){return new Er(t)}:ac;function Gi(t){return function(e){var r=lo(e);return r==S?ir(e):r==R?cr(e):function(t,e){return Pe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Ki(t,e,r,s,f,l,d,h){var p=2&e;if(!p&&"function"!=typeof t)throw new Rt(o);var b=s?s.length:0;if(b||(e&=-97,s=f=i),d=d===i?d:br(ha(d),0),h=h===i?h:ha(h),b-=f?f.length:0,64&e){var g=s,y=f;s=f=i}var m=p?i:ro(t),v=[t,e,r,s,f,g,y,l,d,h];if(m&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<131,s=n==u&&8==r||n==u&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!o&&!s)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var c=e[3];if(c){var f=t[3];t[3]=f?Ei(f,c,e[4]):c,t[4]=f?sr(t[3],a):e[4]}(c=e[5])&&(f=t[5],t[5]=f?Mi(f,c,e[6]):c,t[6]=f?sr(t[5],a):e[6]),(c=e[7])&&(t[7]=c),n&u&&(t[8]=null==t[8]?e[8]:gr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(v,m),t=v[0],e=v[1],r=v[2],s=v[3],f=v[4],!(h=v[9]=v[9]===i?p?0:t.length:br(v[9]-b,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,r){var o=Bi(t);return function s(){for(var a=arguments.length,c=n(a),u=a,f=io(s);u--;)c[u]=arguments[u];var l=a<3&&c[0]!==f&&c[a-1]!==f?[]:sr(c,f);return(a-=l.length)<r?Wi(t,e,Li,s.placeholder,i,c,l,i,i,r-a):Ae(this&&this!==le&&this instanceof s?o:t,this,c)}}(t,e,h):e!=c&&33!=e||f.length?Li.apply(i,v):function(t,e,r,i){var o=1&e,s=Bi(t);return function e(){for(var a=-1,c=arguments.length,u=-1,f=i.length,l=n(f+c),d=this&&this!==le&&this instanceof e?s:t;++u<f;)l[u]=i[u];for(;c--;)l[u++]=arguments[++a];return Ae(d,o?r:this,l)}}(t,e,r,s);else var w=function(t,e,r){var n=1&e,i=Bi(t);return function e(){return(this&&this!==le&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,r);return ko((m?Zn:Ro)(w,v),t,e)}function Ji(t,e,r,n){return t===i||Us(t,kt[r])&&!Tt.call(n,r)?e:t}function Yi(t,e,r,n,o,s){return Qs(t)&&Qs(e)&&(s.set(e,t),Un(t,e,i,Yi,s),s.delete(e)),t}function Zi(t){return na(t)?i:t}function Xi(t,e,r,n,o,s){var a=1&r,c=t.length,u=e.length;if(c!=u&&!(a&&u>c))return!1;var f=s.get(t),l=s.get(e);if(f&&l)return f==e&&l==t;var d=-1,h=!0,p=2&r?new Hr:i;for(s.set(t,e),s.set(e,t);++d<c;){var b=t[d],g=e[d];if(n)var y=a?n(g,b,d,e,t,s):n(b,g,d,t,e,s);if(y!==i){if(y)continue;h=!1;break}if(p){if(!Ce(e,(function(t,e){if(!Ze(p,e)&&(b===t||o(b,t,r,n,s)))return p.push(e)}))){h=!1;break}}else if(b!==g&&!o(b,g,r,n,s)){h=!1;break}}return s.delete(t),s.delete(e),h}function Qi(t){return Io(Eo(t,i,Wo),t+"")}function to(t){return Sn(t,ka,uo)}function eo(t){return Sn(t,Pa,fo)}var ro=Rr?function(t){return Rr.get(t)}:ac;function no(t){for(var e=t.name+"",r=Or[e],n=Tt.call(Or,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function io(t){return(Tt.call(Lr,"placeholder")?Lr:t).placeholder}function oo(){var t=Lr.iteratee||nc;return t=t===nc?Tn:t,arguments.length?t(arguments[0],arguments[1]):t}function so(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function ao(t){for(var e=ka(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,So(i)]}return e}function co(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return Nn(r)?r:i}var uo=be?function(t){return null==t?[]:(t=Et(t),Oe(be(t),(function(e){return Vt.call(t,e)})))}:pc,fo=be?function(t){for(var e=[];t;)Ne(e,uo(t)),t=Wt(t);return e}:pc,lo=An;function ho(t,e,r){for(var n=-1,i=(e=gi(e,t)).length,o=!1;++n<i;){var s=jo(e[n]);if(!(o=null!=t&&r(t,s)))break;t=t[s]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&Xs(i)&&go(s,i)&&($s(t)||zs(t))}function po(t){return"function"!=typeof t.constructor||_o(t)?{}:Fr(Wt(t))}function bo(t){return $s(t)||zs(t)||!!(Kt&&t&&t[Kt])}function go(t,e){var r=typeof t;return!!(e=null==e?l:e)&&("number"==r||"symbol"!=r&&yt.test(t))&&t>-1&&t%1==0&&t<e}function yo(t,e,r){if(!Qs(r))return!1;var n=typeof e;return!!("number"==n?Hs(r)&&go(e,r.length):"string"==n&&e in r)&&Us(r[e],t)}function mo(t,e){if($s(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!aa(t))||Q.test(t)||!X.test(t)||null!=e&&t in Et(e)}function vo(t){var e=no(t),r=Lr[e];if("function"!=typeof r||!(e in qr.prototype))return!1;if(t===r)return!0;var n=ro(r);return!!n&&t===n[0]}(_r&&lo(new _r(new ArrayBuffer(1)))!=N||Sr&&lo(new Sr)!=S||Ar&&lo(Ar.resolve())!=M||Er&&lo(new Er)!=R||Mr&&lo(new Mr)!=k)&&(lo=function(t){var e=An(t),r=e==E?t.constructor:i,n=r?Lo(r):"";if(n)switch(n){case Ir:return N;case kr:return S;case Pr:return M;case Nr:return R;case Tr:return k}return e});var wo=Pt?Ys:bc;function _o(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||kt)}function So(t){return t==t&&!Qs(t)}function Ao(t,e){return function(r){return null!=r&&r[t]===e&&(e!==i||t in Et(r))}}function Eo(t,e,r){return e=br(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,s=br(i.length-e,0),a=n(s);++o<s;)a[o]=i[e+o];o=-1;for(var c=n(e+1);++o<e;)c[o]=i[o];return c[e]=r(a),Ae(t,this,c)}}function Mo(t,e){return e.length<2?t:_n(t,ti(e,0,-1))}function xo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ro=Po(Zn),Oo=fe||function(t,e){return le.setTimeout(t,e)},Io=Po(Xn);function ko(t,e,r){var n=e+"";return Io(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return Me(p,(function(r){var n="_."+r[0];e&r[1]&&!Ie(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(n),r)))}function Po(t){var e=0,r=0;return function(){var n=yr(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function No(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var s=Hn(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=e,t}var To,Bo,Co=(To=Ts((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,r,n,i){e.push(n?i.replace(ft,"$1"):r||t)})),e}),(function(t){return 500===Bo.size&&Bo.clear(),t})),Bo=To.cache,To);function jo(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Lo(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Fo(t){if(t instanceof qr)return t.clone();var e=new Dr(t.__wrapped__,t.__chain__);return e.__actions__=xi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Uo=Gn((function(t,e){return Vs(t)?un(t,bn(e,1,Vs,!0)):[]})),Do=Gn((function(t,e){var r=Jo(e);return Vs(r)&&(r=i),Vs(t)?un(t,bn(e,1,Vs,!0),oo(r,2)):[]})),qo=Gn((function(t,e){var r=Jo(e);return Vs(r)&&(r=i),Vs(t)?un(t,bn(e,1,Vs,!0),i,r):[]}));function zo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:ha(r);return i<0&&(i=br(n+i,0)),Fe(t,oo(e,3),i)}function $o(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ha(r),o=r<0?br(n+o,0):gr(o,n-1)),Fe(t,oo(e,3),o,!0)}function Wo(t){return null!=t&&t.length?bn(t,1):[]}function Ho(t){return t&&t.length?t[0]:i}var Vo=Gn((function(t){var e=Pe(t,pi);return e.length&&e[0]===t[0]?Rn(e):[]})),Go=Gn((function(t){var e=Jo(t),r=Pe(t,pi);return e===Jo(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Rn(r,oo(e,2)):[]})),Ko=Gn((function(t){var e=Jo(t),r=Pe(t,pi);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Rn(r,i,e):[]}));function Jo(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Yo=Gn(Zo);function Zo(t,e){return t&&t.length&&e&&e.length?$n(t,e):t}var Xo=Qi((function(t,e){var r=null==t?0:t.length,n=nn(t,e);return Wn(t,Pe(e,(function(t){return go(t,r)?+t:t})).sort(Ai)),n}));function Qo(t){return null==t?t:wr.call(t)}var ts=Gn((function(t){return ai(bn(t,1,Vs,!0))})),es=Gn((function(t){var e=Jo(t);return Vs(e)&&(e=i),ai(bn(t,1,Vs,!0),oo(e,2))})),rs=Gn((function(t){var e=Jo(t);return e="function"==typeof e?e:i,ai(bn(t,1,Vs,!0),i,e)}));function ns(t){if(!t||!t.length)return[];var e=0;return t=Oe(t,(function(t){if(Vs(t))return e=br(t.length,e),!0})),Ge(e,(function(e){return Pe(t,$e(e))}))}function is(t,e){if(!t||!t.length)return[];var r=ns(t);return null==e?r:Pe(r,(function(t){return Ae(e,i,t)}))}var os=Gn((function(t,e){return Vs(t)?un(t,e):[]})),ss=Gn((function(t){return di(Oe(t,Vs))})),as=Gn((function(t){var e=Jo(t);return Vs(e)&&(e=i),di(Oe(t,Vs),oo(e,2))})),cs=Gn((function(t){var e=Jo(t);return e="function"==typeof e?e:i,di(Oe(t,Vs),i,e)})),us=Gn(ns),fs=Gn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,is(t,r)}));function ls(t){var e=Lr(t);return e.__chain__=!0,e}function ds(t,e){return e(t)}var hs=Qi((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return nn(e,t)};return!(e>1||this.__actions__.length)&&n instanceof qr&&go(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:ds,args:[o],thisArg:i}),new Dr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ps=Oi((function(t,e,r){Tt.call(t,r)?++t[r]:rn(t,r,1)})),bs=Ci(zo),gs=Ci($o);function ys(t,e){return($s(t)?Me:fn)(t,oo(e,3))}function ms(t,e){return($s(t)?xe:ln)(t,oo(e,3))}var vs=Oi((function(t,e,r){Tt.call(t,r)?t[r].push(e):rn(t,r,[e])})),ws=Gn((function(t,e,r){var i=-1,o="function"==typeof e,s=Hs(t)?n(t.length):[];return fn(t,(function(t){s[++i]=o?Ae(e,t,r):On(t,e,r)})),s})),_s=Oi((function(t,e,r){rn(t,r,e)}));function Ss(t,e){return($s(t)?Pe:jn)(t,oo(e,3))}var As=Oi((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),Es=Gn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&yo(t,e[0],e[1])?e=[]:r>2&&yo(e[0],e[1],e[2])&&(e=[e[0]]),qn(t,bn(e,1),[])})),Ms=ue||function(){return le.Date.now()};function xs(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,Ki(t,u,i,i,i,i,e)}function Rs(t,e){var r;if("function"!=typeof e)throw new Rt(o);return t=ha(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Os=Gn((function(t,e,r){var n=1;if(r.length){var i=sr(r,io(Os));n|=c}return Ki(t,n,e,r,i)})),Is=Gn((function(t,e,r){var n=3;if(r.length){var i=sr(r,io(Is));n|=c}return Ki(e,n,t,r,i)}));function ks(t,e,r){var n,s,a,c,u,f,l=0,d=!1,h=!1,p=!0;if("function"!=typeof t)throw new Rt(o);function b(e){var r=n,o=s;return n=s=i,l=e,c=t.apply(o,r)}function g(t){var r=t-f;return f===i||r>=e||r<0||h&&t-l>=a}function y(){var t=Ms();if(g(t))return m(t);u=Oo(y,function(t){var r=e-(t-f);return h?gr(r,a-(t-l)):r}(t))}function m(t){return u=i,p&&n?b(t):(n=s=i,c)}function v(){var t=Ms(),r=g(t);if(n=arguments,s=this,f=t,r){if(u===i)return function(t){return l=t,u=Oo(y,e),d?b(t):c}(f);if(h)return vi(u),u=Oo(y,e),b(f)}return u===i&&(u=Oo(y,e)),c}return e=ba(e)||0,Qs(r)&&(d=!!r.leading,a=(h="maxWait"in r)?br(ba(r.maxWait)||0,e):a,p="trailing"in r?!!r.trailing:p),v.cancel=function(){u!==i&&vi(u),l=0,n=f=s=u=i},v.flush=function(){return u===i?c:m(Ms())},v}var Ps=Gn((function(t,e){return cn(t,1,e)})),Ns=Gn((function(t,e,r){return cn(t,ba(e)||0,r)}));function Ts(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Rt(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Ts.Cache||Wr),r}function Bs(t){if("function"!=typeof t)throw new Rt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ts.Cache=Wr;var Cs=yi((function(t,e){var r=(e=1==e.length&&$s(e[0])?Pe(e[0],Je(oo())):Pe(bn(e,1),Je(oo()))).length;return Gn((function(n){for(var i=-1,o=gr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return Ae(t,this,n)}))})),js=Gn((function(t,e){var r=sr(e,io(js));return Ki(t,c,i,e,r)})),Ls=Gn((function(t,e){var r=sr(e,io(Ls));return Ki(t,64,i,e,r)})),Fs=Qi((function(t,e){return Ki(t,256,i,i,i,e)}));function Us(t,e){return t===e||t!=t&&e!=e}var Ds=$i(En),qs=$i((function(t,e){return t>=e})),zs=In(function(){return arguments}())?In:function(t){return ta(t)&&Tt.call(t,"callee")&&!Vt.call(t,"callee")},$s=n.isArray,Ws=ye?Je(ye):function(t){return ta(t)&&An(t)==P};function Hs(t){return null!=t&&Xs(t.length)&&!Ys(t)}function Vs(t){return ta(t)&&Hs(t)}var Gs=ge||bc,Ks=me?Je(me):function(t){return ta(t)&&An(t)==m};function Js(t){if(!ta(t))return!1;var e=An(t);return e==v||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!na(t)}function Ys(t){if(!Qs(t))return!1;var e=An(t);return e==w||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Zs(t){return"number"==typeof t&&t==ha(t)}function Xs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Qs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=ve?Je(ve):function(t){return ta(t)&&lo(t)==S};function ra(t){return"number"==typeof t||ta(t)&&An(t)==A}function na(t){if(!ta(t)||An(t)!=E)return!1;var e=Wt(t);if(null===e)return!0;var r=Tt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Nt.call(r)==Lt}var ia=we?Je(we):function(t){return ta(t)&&An(t)==x},oa=_e?Je(_e):function(t){return ta(t)&&lo(t)==R};function sa(t){return"string"==typeof t||!$s(t)&&ta(t)&&An(t)==O}function aa(t){return"symbol"==typeof t||ta(t)&&An(t)==I}var ca=Se?Je(Se):function(t){return ta(t)&&Xs(t.length)&&!!ie[An(t)]},ua=$i(Cn),fa=$i((function(t,e){return t<=e}));function la(t){if(!t)return[];if(Hs(t))return sa(t)?fr(t):xi(t);if(Jt&&t[Jt])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Jt]());var e=lo(t);return(e==S?ir:e==R?ar:Ua)(t)}function da(t){return t?(t=ba(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ha(t){var e=da(t),r=e%1;return e==e?r?e-r:e:0}function pa(t){return t?on(ha(t),0,h):0}function ba(t){if("number"==typeof t)return t;if(aa(t))return d;if(Qs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Qs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var r=pt.test(t);return r||gt.test(t)?ce(t.slice(2),r?2:8):ht.test(t)?d:+t}function ga(t){return Ri(t,Pa(t))}function ya(t){return null==t?"":si(t)}var ma=Ii((function(t,e){if(_o(e)||Hs(e))Ri(e,ka(e),t);else for(var r in e)Tt.call(e,r)&&Xr(t,r,e[r])})),va=Ii((function(t,e){Ri(e,Pa(e),t)})),wa=Ii((function(t,e,r,n){Ri(e,Pa(e),t,n)})),_a=Ii((function(t,e,r,n){Ri(e,ka(e),t,n)})),Sa=Qi(nn),Aa=Gn((function(t,e){t=Et(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&yo(e[0],e[1],o)&&(n=1);++r<n;)for(var s=e[r],a=Pa(s),c=-1,u=a.length;++c<u;){var f=a[c],l=t[f];(l===i||Us(l,kt[f])&&!Tt.call(t,f))&&(t[f]=s[f])}return t})),Ea=Gn((function(t){return t.push(i,Yi),Ae(Ta,i,t)}));function Ma(t,e,r){var n=null==t?i:_n(t,e);return n===i?r:n}function xa(t,e){return null!=t&&ho(t,e,xn)}var Ra=Fi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=r}),Qa(rc)),Oa=Fi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),Tt.call(t,e)?t[e].push(r):t[e]=[r]}),oo),Ia=Gn(On);function ka(t){return Hs(t)?Gr(t):Bn(t)}function Pa(t){return Hs(t)?Gr(t,!0):function(t){if(!Qs(t))return function(t){var e=[];if(null!=t)for(var r in Et(t))e.push(r);return e}(t);var e=_o(t),r=[];for(var n in t)("constructor"!=n||!e&&Tt.call(t,n))&&r.push(n);return r}(t)}var Na=Ii((function(t,e,r){Un(t,e,r)})),Ta=Ii((function(t,e,r,n){Un(t,e,r,n)})),Ba=Qi((function(t,e){var r={};if(null==t)return r;var n=!1;e=Pe(e,(function(e){return e=gi(e,t),n||(n=e.length>1),e})),Ri(t,eo(t),r),n&&(r=sn(r,7,Zi));for(var i=e.length;i--;)ci(r,e[i]);return r})),Ca=Qi((function(t,e){return null==t?{}:function(t,e){return zn(t,e,(function(e,r){return xa(t,r)}))}(t,e)}));function ja(t,e){if(null==t)return{};var r=Pe(eo(t),(function(t){return[t]}));return e=oo(e),zn(t,r,(function(t,r){return e(t,r[0])}))}var La=Gi(ka),Fa=Gi(Pa);function Ua(t){return null==t?[]:Ye(t,ka(t))}var Da=Ti((function(t,e,r){return e=e.toLowerCase(),t+(r?qa(e):e)}));function qa(t){return Ja(ya(t).toLowerCase())}function za(t){return(t=ya(t))&&t.replace(mt,tr).replace(Zt,"")}var $a=Ti((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Wa=Ti((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Ha=Ni("toLowerCase"),Va=Ti((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Ga=Ti((function(t,e,r){return t+(r?" ":"")+Ja(e)})),Ka=Ti((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Ja=Ni("toUpperCase");function Ya(t,e,r){return t=ya(t),(e=r?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(e)||[]}var Za=Gn((function(t,e){try{return Ae(t,i,e)}catch(t){return Js(t)?t:new _t(t)}})),Xa=Qi((function(t,e){return Me(e,(function(e){e=jo(e),rn(t,e,Os(t[e],t))})),t}));function Qa(t){return function(){return t}}var tc=ji(),ec=ji(!0);function rc(t){return t}function nc(t){return Tn("function"==typeof t?t:sn(t,1))}var ic=Gn((function(t,e){return function(r){return On(r,t,e)}})),oc=Gn((function(t,e){return function(r){return On(t,r,e)}}));function sc(t,e,r){var n=ka(e),i=wn(e,n);null!=r||Qs(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=wn(e,ka(e)));var o=!(Qs(r)&&"chain"in r&&!r.chain),s=Ys(t);return Me(i,(function(r){var n=e[r];t[r]=n,s&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__);return(r.__actions__=xi(this.__actions__)).push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,Ne([this.value()],arguments))})})),t}function ac(){}var cc=Di(Pe),uc=Di(Re),fc=Di(Ce);function lc(t){return mo(t)?$e(jo(t)):function(t){return function(e){return _n(e,t)}}(t)}var dc=zi(),hc=zi(!0);function pc(){return[]}function bc(){return!1}var gc,yc=Ui((function(t,e){return t+e}),0),mc=Hi("ceil"),vc=Ui((function(t,e){return t/e}),1),wc=Hi("floor"),_c=Ui((function(t,e){return t*e}),1),Sc=Hi("round"),Ac=Ui((function(t,e){return t-e}),0);return Lr.after=function(t,e){if("function"!=typeof e)throw new Rt(o);return t=ha(t),function(){if(--t<1)return e.apply(this,arguments)}},Lr.ary=xs,Lr.assign=ma,Lr.assignIn=va,Lr.assignInWith=wa,Lr.assignWith=_a,Lr.at=Sa,Lr.before=Rs,Lr.bind=Os,Lr.bindAll=Xa,Lr.bindKey=Is,Lr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return $s(t)?t:[t]},Lr.chain=ls,Lr.chunk=function(t,e,r){e=(r?yo(t,e,r):e===i)?1:br(ha(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,c=n(de(o/e));s<o;)c[a++]=ti(t,s,s+=e);return c},Lr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},Lr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Ne($s(r)?xi(r):[r],bn(e,1))},Lr.cond=function(t){var e=null==t?0:t.length,r=oo();return t=e?Pe(t,(function(t){if("function"!=typeof t[1])throw new Rt(o);return[r(t[0]),t[1]]})):[],Gn((function(r){for(var n=-1;++n<e;){var i=t[n];if(Ae(i[0],this,r))return Ae(i[1],this,r)}}))},Lr.conforms=function(t){return function(t){var e=ka(t);return function(r){return an(r,t,e)}}(sn(t,1))},Lr.constant=Qa,Lr.countBy=ps,Lr.create=function(t,e){var r=Fr(t);return null==e?r:en(r,e)},Lr.curry=function t(e,r,n){var o=Ki(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Lr.curryRight=function t(e,r,n){var o=Ki(e,16,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Lr.debounce=ks,Lr.defaults=Aa,Lr.defaultsDeep=Ea,Lr.defer=Ps,Lr.delay=Ns,Lr.difference=Uo,Lr.differenceBy=Do,Lr.differenceWith=qo,Lr.drop=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,(e=r||e===i?1:ha(e))<0?0:e,n):[]},Lr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,0,(e=n-(e=r||e===i?1:ha(e)))<0?0:e):[]},Lr.dropRightWhile=function(t,e){return t&&t.length?fi(t,oo(e,3),!0,!0):[]},Lr.dropWhile=function(t,e){return t&&t.length?fi(t,oo(e,3),!0):[]},Lr.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&yo(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=ha(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ha(n))<0&&(n+=o),n=r>n?0:pa(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Lr.filter=function(t,e){return($s(t)?Oe:pn)(t,oo(e,3))},Lr.flatMap=function(t,e){return bn(Ss(t,e),1)},Lr.flatMapDeep=function(t,e){return bn(Ss(t,e),f)},Lr.flatMapDepth=function(t,e,r){return r=r===i?1:ha(r),bn(Ss(t,e),r)},Lr.flatten=Wo,Lr.flattenDeep=function(t){return null!=t&&t.length?bn(t,f):[]},Lr.flattenDepth=function(t,e){return null!=t&&t.length?bn(t,e=e===i?1:ha(e)):[]},Lr.flip=function(t){return Ki(t,512)},Lr.flow=tc,Lr.flowRight=ec,Lr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},Lr.functions=function(t){return null==t?[]:wn(t,ka(t))},Lr.functionsIn=function(t){return null==t?[]:wn(t,Pa(t))},Lr.groupBy=vs,Lr.initial=function(t){return null!=t&&t.length?ti(t,0,-1):[]},Lr.intersection=Vo,Lr.intersectionBy=Go,Lr.intersectionWith=Ko,Lr.invert=Ra,Lr.invertBy=Oa,Lr.invokeMap=ws,Lr.iteratee=nc,Lr.keyBy=_s,Lr.keys=ka,Lr.keysIn=Pa,Lr.map=Ss,Lr.mapKeys=function(t,e){var r={};return e=oo(e,3),mn(t,(function(t,n,i){rn(r,e(t,n,i),t)})),r},Lr.mapValues=function(t,e){var r={};return e=oo(e,3),mn(t,(function(t,n,i){rn(r,n,e(t,n,i))})),r},Lr.matches=function(t){return Ln(sn(t,1))},Lr.matchesProperty=function(t,e){return Fn(t,sn(e,1))},Lr.memoize=Ts,Lr.merge=Na,Lr.mergeWith=Ta,Lr.method=ic,Lr.methodOf=oc,Lr.mixin=sc,Lr.negate=Bs,Lr.nthArg=function(t){return t=ha(t),Gn((function(e){return Dn(e,t)}))},Lr.omit=Ba,Lr.omitBy=function(t,e){return ja(t,Bs(oo(e)))},Lr.once=function(t){return Rs(2,t)},Lr.orderBy=function(t,e,r,n){return null==t?[]:($s(e)||(e=null==e?[]:[e]),$s(r=n?i:r)||(r=null==r?[]:[r]),qn(t,e,r))},Lr.over=cc,Lr.overArgs=Cs,Lr.overEvery=uc,Lr.overSome=fc,Lr.partial=js,Lr.partialRight=Ls,Lr.partition=As,Lr.pick=Ca,Lr.pickBy=ja,Lr.property=lc,Lr.propertyOf=function(t){return function(e){return null==t?i:_n(t,e)}},Lr.pull=Yo,Lr.pullAll=Zo,Lr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?$n(t,e,oo(r,2)):t},Lr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?$n(t,e,i,r):t},Lr.pullAt=Xo,Lr.range=dc,Lr.rangeRight=hc,Lr.rearg=Fs,Lr.reject=function(t,e){return($s(t)?Oe:pn)(t,Bs(oo(e,3)))},Lr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=oo(e,3);++n<o;){var s=t[n];e(s,n,t)&&(r.push(s),i.push(n))}return Wn(t,i),r},Lr.rest=function(t,e){if("function"!=typeof t)throw new Rt(o);return Gn(t,e=e===i?e:ha(e))},Lr.reverse=Qo,Lr.sampleSize=function(t,e,r){return e=(r?yo(t,e,r):e===i)?1:ha(e),($s(t)?Jr:Jn)(t,e)},Lr.set=function(t,e,r){return null==t?t:Yn(t,e,r)},Lr.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:Yn(t,e,r,n)},Lr.shuffle=function(t){return($s(t)?Yr:Qn)(t)},Lr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&yo(t,e,r)?(e=0,r=n):(e=null==e?0:ha(e),r=r===i?n:ha(r)),ti(t,e,r)):[]},Lr.sortBy=Es,Lr.sortedUniq=function(t){return t&&t.length?ii(t):[]},Lr.sortedUniqBy=function(t,e){return t&&t.length?ii(t,oo(e,2)):[]},Lr.split=function(t,e,r){return r&&"number"!=typeof r&&yo(t,e,r)&&(e=r=i),(r=r===i?h:r>>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!ia(e))&&!(e=si(e))&&nr(t)?mi(fr(t),0,r):t.split(e,r):[]},Lr.spread=function(t,e){if("function"!=typeof t)throw new Rt(o);return e=null==e?0:br(ha(e),0),Gn((function(r){var n=r[e],i=mi(r,0,e);return n&&Ne(i,n),Ae(t,this,i)}))},Lr.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},Lr.take=function(t,e,r){return t&&t.length?ti(t,0,(e=r||e===i?1:ha(e))<0?0:e):[]},Lr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?ti(t,(e=n-(e=r||e===i?1:ha(e)))<0?0:e,n):[]},Lr.takeRightWhile=function(t,e){return t&&t.length?fi(t,oo(e,3),!1,!0):[]},Lr.takeWhile=function(t,e){return t&&t.length?fi(t,oo(e,3)):[]},Lr.tap=function(t,e){return e(t),t},Lr.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new Rt(o);return Qs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ks(t,e,{leading:n,maxWait:e,trailing:i})},Lr.thru=ds,Lr.toArray=la,Lr.toPairs=La,Lr.toPairsIn=Fa,Lr.toPath=function(t){return $s(t)?Pe(t,jo):aa(t)?[t]:xi(Co(ya(t)))},Lr.toPlainObject=ga,Lr.transform=function(t,e,r){var n=$s(t),i=n||Gs(t)||ca(t);if(e=oo(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:Qs(t)&&Ys(o)?Fr(Wt(t)):{}}return(i?Me:mn)(t,(function(t,n,i){return e(r,t,n,i)})),r},Lr.unary=function(t){return xs(t,1)},Lr.union=ts,Lr.unionBy=es,Lr.unionWith=rs,Lr.uniq=function(t){return t&&t.length?ai(t):[]},Lr.uniqBy=function(t,e){return t&&t.length?ai(t,oo(e,2)):[]},Lr.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ai(t,i,e):[]},Lr.unset=function(t,e){return null==t||ci(t,e)},Lr.unzip=ns,Lr.unzipWith=is,Lr.update=function(t,e,r){return null==t?t:ui(t,e,bi(r))},Lr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:ui(t,e,bi(r),n)},Lr.values=Ua,Lr.valuesIn=function(t){return null==t?[]:Ye(t,Pa(t))},Lr.without=os,Lr.words=Ya,Lr.wrap=function(t,e){return js(bi(e),t)},Lr.xor=ss,Lr.xorBy=as,Lr.xorWith=cs,Lr.zip=us,Lr.zipObject=function(t,e){return hi(t||[],e||[],Xr)},Lr.zipObjectDeep=function(t,e){return hi(t||[],e||[],Yn)},Lr.zipWith=fs,Lr.entries=La,Lr.entriesIn=Fa,Lr.extend=va,Lr.extendWith=wa,sc(Lr,Lr),Lr.add=yc,Lr.attempt=Za,Lr.camelCase=Da,Lr.capitalize=qa,Lr.ceil=mc,Lr.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=ba(r))==r?r:0),e!==i&&(e=(e=ba(e))==e?e:0),on(ba(t),e,r)},Lr.clone=function(t){return sn(t,4)},Lr.cloneDeep=function(t){return sn(t,5)},Lr.cloneDeepWith=function(t,e){return sn(t,5,e="function"==typeof e?e:i)},Lr.cloneWith=function(t,e){return sn(t,4,e="function"==typeof e?e:i)},Lr.conformsTo=function(t,e){return null==e||an(t,e,ka(e))},Lr.deburr=za,Lr.defaultTo=function(t,e){return null==t||t!=t?e:t},Lr.divide=vc,Lr.endsWith=function(t,e,r){t=ya(t),e=si(e);var n=t.length,o=r=r===i?n:on(ha(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},Lr.eq=Us,Lr.escape=function(t){return(t=ya(t))&&K.test(t)?t.replace(V,er):t},Lr.escapeRegExp=function(t){return(t=ya(t))&&rt.test(t)?t.replace(et,"\\$&"):t},Lr.every=function(t,e,r){var n=$s(t)?Re:dn;return r&&yo(t,e,r)&&(e=i),n(t,oo(e,3))},Lr.find=bs,Lr.findIndex=zo,Lr.findKey=function(t,e){return Le(t,oo(e,3),mn)},Lr.findLast=gs,Lr.findLastIndex=$o,Lr.findLastKey=function(t,e){return Le(t,oo(e,3),vn)},Lr.floor=wc,Lr.forEach=ys,Lr.forEachRight=ms,Lr.forIn=function(t,e){return null==t?t:gn(t,oo(e,3),Pa)},Lr.forInRight=function(t,e){return null==t?t:yn(t,oo(e,3),Pa)},Lr.forOwn=function(t,e){return t&&mn(t,oo(e,3))},Lr.forOwnRight=function(t,e){return t&&vn(t,oo(e,3))},Lr.get=Ma,Lr.gt=Ds,Lr.gte=qs,Lr.has=function(t,e){return null!=t&&ho(t,e,Mn)},Lr.hasIn=xa,Lr.head=Ho,Lr.identity=rc,Lr.includes=function(t,e,r,n){t=Hs(t)?t:Ua(t),r=r&&!n?ha(r):0;var i=t.length;return r<0&&(r=br(i+r,0)),sa(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Ue(t,e,r)>-1},Lr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:ha(r);return i<0&&(i=br(n+i,0)),Ue(t,e,i)},Lr.inRange=function(t,e,r){return e=da(e),r===i?(r=e,e=0):r=da(r),function(t,e,r){return t>=gr(e,r)&&t<br(e,r)}(t=ba(t),e,r)},Lr.invoke=Ia,Lr.isArguments=zs,Lr.isArray=$s,Lr.isArrayBuffer=Ws,Lr.isArrayLike=Hs,Lr.isArrayLikeObject=Vs,Lr.isBoolean=function(t){return!0===t||!1===t||ta(t)&&An(t)==y},Lr.isBuffer=Gs,Lr.isDate=Ks,Lr.isElement=function(t){return ta(t)&&1===t.nodeType&&!na(t)},Lr.isEmpty=function(t){if(null==t)return!0;if(Hs(t)&&($s(t)||"string"==typeof t||"function"==typeof t.splice||Gs(t)||ca(t)||zs(t)))return!t.length;var e=lo(t);if(e==S||e==R)return!t.size;if(_o(t))return!Bn(t).length;for(var r in t)if(Tt.call(t,r))return!1;return!0},Lr.isEqual=function(t,e){return kn(t,e)},Lr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?kn(t,e,i,r):!!n},Lr.isError=Js,Lr.isFinite=function(t){return"number"==typeof t&&je(t)},Lr.isFunction=Ys,Lr.isInteger=Zs,Lr.isLength=Xs,Lr.isMap=ea,Lr.isMatch=function(t,e){return t===e||Pn(t,e,ao(e))},Lr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,Pn(t,e,ao(e),r)},Lr.isNaN=function(t){return ra(t)&&t!=+t},Lr.isNative=function(t){if(wo(t))throw new _t("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nn(t)},Lr.isNil=function(t){return null==t},Lr.isNull=function(t){return null===t},Lr.isNumber=ra,Lr.isObject=Qs,Lr.isObjectLike=ta,Lr.isPlainObject=na,Lr.isRegExp=ia,Lr.isSafeInteger=function(t){return Zs(t)&&t>=-9007199254740991&&t<=l},Lr.isSet=oa,Lr.isString=sa,Lr.isSymbol=aa,Lr.isTypedArray=ca,Lr.isUndefined=function(t){return t===i},Lr.isWeakMap=function(t){return ta(t)&&lo(t)==k},Lr.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==An(t)},Lr.join=function(t,e){return null==t?"":We.call(t,e)},Lr.kebabCase=$a,Lr.last=Jo,Lr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ha(r))<0?br(n+o,0):gr(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Fe(t,qe,o,!0)},Lr.lowerCase=Wa,Lr.lowerFirst=Ha,Lr.lt=ua,Lr.lte=fa,Lr.max=function(t){return t&&t.length?hn(t,rc,En):i},Lr.maxBy=function(t,e){return t&&t.length?hn(t,oo(e,2),En):i},Lr.mean=function(t){return ze(t,rc)},Lr.meanBy=function(t,e){return ze(t,oo(e,2))},Lr.min=function(t){return t&&t.length?hn(t,rc,Cn):i},Lr.minBy=function(t,e){return t&&t.length?hn(t,oo(e,2),Cn):i},Lr.stubArray=pc,Lr.stubFalse=bc,Lr.stubObject=function(){return{}},Lr.stubString=function(){return""},Lr.stubTrue=function(){return!0},Lr.multiply=_c,Lr.nth=function(t,e){return t&&t.length?Dn(t,ha(e)):i},Lr.noConflict=function(){return le._===this&&(le._=Ft),this},Lr.noop=ac,Lr.now=Ms,Lr.pad=function(t,e,r){t=ya(t);var n=(e=ha(e))?ur(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return qi(he(i),r)+t+qi(de(i),r)},Lr.padEnd=function(t,e,r){t=ya(t);var n=(e=ha(e))?ur(t):0;return e&&n<e?t+qi(e-n,r):t},Lr.padStart=function(t,e,r){t=ya(t);var n=(e=ha(e))?ur(t):0;return e&&n<e?qi(e-n,r)+t:t},Lr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),mr(ya(t).replace(nt,""),e||0)},Lr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&yo(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=da(t),e===i?(e=t,t=0):e=da(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=vr();return gr(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return Hn(t,e)},Lr.reduce=function(t,e,r){var n=$s(t)?Te:He,i=arguments.length<3;return n(t,oo(e,4),r,i,fn)},Lr.reduceRight=function(t,e,r){var n=$s(t)?Be:He,i=arguments.length<3;return n(t,oo(e,4),r,i,ln)},Lr.repeat=function(t,e,r){return e=(r?yo(t,e,r):e===i)?1:ha(e),Vn(ya(t),e)},Lr.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Lr.result=function(t,e,r){var n=-1,o=(e=gi(e,t)).length;for(o||(o=1,t=i);++n<o;){var s=null==t?i:t[jo(e[n])];s===i&&(n=o,s=r),t=Ys(s)?s.call(t):s}return t},Lr.round=Sc,Lr.runInContext=t,Lr.sample=function(t){return($s(t)?Kr:Kn)(t)},Lr.size=function(t){if(null==t)return 0;if(Hs(t))return sa(t)?ur(t):t.length;var e=lo(t);return e==S||e==R?t.size:Bn(t).length},Lr.snakeCase=Va,Lr.some=function(t,e,r){var n=$s(t)?Ce:ei;return r&&yo(t,e,r)&&(e=i),n(t,oo(e,3))},Lr.sortedIndex=function(t,e){return ri(t,e)},Lr.sortedIndexBy=function(t,e,r){return ni(t,e,oo(r,2))},Lr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ri(t,e);if(n<r&&Us(t[n],e))return n}return-1},Lr.sortedLastIndex=function(t,e){return ri(t,e,!0)},Lr.sortedLastIndexBy=function(t,e,r){return ni(t,e,oo(r,2),!0)},Lr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=ri(t,e,!0)-1;if(Us(t[r],e))return r}return-1},Lr.startCase=Ga,Lr.startsWith=function(t,e,r){return t=ya(t),r=null==r?0:on(ha(r),0,t.length),e=si(e),t.slice(r,r+e.length)==e},Lr.subtract=Ac,Lr.sum=function(t){return t&&t.length?Ve(t,rc):0},Lr.sumBy=function(t,e){return t&&t.length?Ve(t,oo(e,2)):0},Lr.template=function(t,e,r){var n=Lr.templateSettings;r&&yo(t,e,r)&&(e=i),t=ya(t),e=wa({},e,n,Ji);var o,s,a=wa({},e.imports,n.imports,Ji),c=ka(a),u=Ye(a,c),f=0,l=e.interpolate||vt,d="__p += '",h=Mt((e.escape||vt).source+"|"+l.source+"|"+(l===Z?lt:vt).source+"|"+(e.evaluate||vt).source+"|$","g"),p="//# sourceURL="+(Tt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ne+"]")+"\n";t.replace(h,(function(e,r,n,i,a,c){return n||(n=i),d+=t.slice(f,c).replace(wt,rr),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),f=c+e.length,e})),d+="';\n";var b=Tt.call(e,"variable")&&e.variable;if(b){if(ut.test(b))throw new _t("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(z,""):d).replace($,"$1").replace(W,"$1;"),d="function("+(b||"obj")+") {\n"+(b?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Za((function(){return St(c,p+"return "+d).apply(i,u)}));if(g.source=d,Js(g))throw g;return g},Lr.times=function(t,e){if((t=ha(t))<1||t>l)return[];var r=h,n=gr(t,h);e=oo(e),t-=h;for(var i=Ge(n,e);++r<t;)e(r);return i},Lr.toFinite=da,Lr.toInteger=ha,Lr.toLength=pa,Lr.toLower=function(t){return ya(t).toLowerCase()},Lr.toNumber=ba,Lr.toSafeInteger=function(t){return t?on(ha(t),-9007199254740991,l):0===t?t:0},Lr.toString=ya,Lr.toUpper=function(t){return ya(t).toUpperCase()},Lr.trim=function(t,e,r){if((t=ya(t))&&(r||e===i))return Ke(t);if(!t||!(e=si(e)))return t;var n=fr(t),o=fr(e);return mi(n,Xe(n,o),Qe(n,o)+1).join("")},Lr.trimEnd=function(t,e,r){if((t=ya(t))&&(r||e===i))return t.slice(0,lr(t)+1);if(!t||!(e=si(e)))return t;var n=fr(t);return mi(n,0,Qe(n,fr(e))+1).join("")},Lr.trimStart=function(t,e,r){if((t=ya(t))&&(r||e===i))return t.replace(nt,"");if(!t||!(e=si(e)))return t;var n=fr(t);return mi(n,Xe(n,fr(e))).join("")},Lr.truncate=function(t,e){var r=30,n="...";if(Qs(e)){var o="separator"in e?e.separator:o;r="length"in e?ha(e.length):r,n="omission"in e?si(e.omission):n}var s=(t=ya(t)).length;if(nr(t)){var a=fr(t);s=a.length}if(r>=s)return t;var c=r-ur(n);if(c<1)return n;var u=a?mi(a,0,c).join(""):t.slice(0,c);if(o===i)return u+n;if(a&&(c+=u.length-c),ia(o)){if(t.slice(c).search(o)){var f,l=u;for(o.global||(o=Mt(o.source,ya(dt.exec(o))+"g")),o.lastIndex=0;f=o.exec(l);)var d=f.index;u=u.slice(0,d===i?c:d)}}else if(t.indexOf(si(o),c)!=c){var h=u.lastIndexOf(o);h>-1&&(u=u.slice(0,h))}return u+n},Lr.unescape=function(t){return(t=ya(t))&&G.test(t)?t.replace(H,dr):t},Lr.uniqueId=function(t){var e=++Bt;return ya(t)+e},Lr.upperCase=Ka,Lr.upperFirst=Ja,Lr.each=ys,Lr.eachRight=ms,Lr.first=Ho,sc(Lr,(gc={},mn(Lr,(function(t,e){Tt.call(Lr.prototype,e)||(gc[e]=t)})),gc),{chain:!1}),Lr.VERSION="4.17.21",Me(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Lr[t].placeholder=Lr})),Me(["drop","take"],(function(t,e){qr.prototype[t]=function(r){r=r===i?1:br(ha(r),0);var n=this.__filtered__&&!e?new qr(this):this.clone();return n.__filtered__?n.__takeCount__=gr(r,n.__takeCount__):n.__views__.push({size:gr(r,h),type:t+(n.__dir__<0?"Right":"")}),n},qr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Me(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;qr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),Me(["head","last"],(function(t,e){var r="take"+(e?"Right":"");qr.prototype[t]=function(){return this[r](1).value()[0]}})),Me(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");qr.prototype[t]=function(){return this.__filtered__?new qr(this):this[r](1)}})),qr.prototype.compact=function(){return this.filter(rc)},qr.prototype.find=function(t){return this.filter(t).head()},qr.prototype.findLast=function(t){return this.reverse().find(t)},qr.prototype.invokeMap=Gn((function(t,e){return"function"==typeof t?new qr(this):this.map((function(r){return On(r,t,e)}))})),qr.prototype.reject=function(t){return this.filter(Bs(oo(t)))},qr.prototype.slice=function(t,e){t=ha(t);var r=this;return r.__filtered__&&(t>0||e<0)?new qr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=ha(e))<0?r.dropRight(-e):r.take(e-t)),r)},qr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qr.prototype.toArray=function(){return this.take(h)},mn(qr.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Lr[n?"take"+("last"==e?"Right":""):e],s=n||/^find/.test(e);o&&(Lr.prototype[e]=function(){var e=this.__wrapped__,a=n?[1]:arguments,c=e instanceof qr,u=a[0],f=c||$s(e),l=function(t){var e=o.apply(Lr,Ne([t],a));return n&&d?e[0]:e};f&&r&&"function"==typeof u&&1!=u.length&&(c=f=!1);var d=this.__chain__,h=!!this.__actions__.length,p=s&&!d,b=c&&!h;if(!s&&f){e=b?e:new qr(this);var g=t.apply(e,a);return g.__actions__.push({func:ds,args:[l],thisArg:i}),new Dr(g,d)}return p&&b?t.apply(this,a):(g=this.thru(l),p?n?g.value()[0]:g.value():g)})})),Me(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ot[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Lr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply($s(i)?i:[],t)}return this[r]((function(r){return e.apply($s(r)?r:[],t)}))}})),mn(qr.prototype,(function(t,e){var r=Lr[e];if(r){var n=r.name+"";Tt.call(Or,n)||(Or[n]=[]),Or[n].push({name:e,func:r})}})),Or[Li(i,2).name]=[{name:"wrapper",func:i}],qr.prototype.clone=function(){var t=new qr(this.__wrapped__);return t.__actions__=xi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=xi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=xi(this.__views__),t},qr.prototype.reverse=function(){if(this.__filtered__){var t=new qr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=$s(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=gr(e,t+s);break;case"takeRight":t=br(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=o.start,a=o.end,c=a-s,u=n?a:s-1,f=this.__iteratees__,l=f.length,d=0,h=gr(c,this.__takeCount__);if(!r||!n&&i==c&&h==c)return li(t,this.__actions__);var p=[];t:for(;c--&&d<h;){for(var b=-1,g=t[u+=e];++b<l;){var y=f[b],m=y.iteratee,v=y.type,w=m(g);if(2==v)g=w;else if(!w){if(1==v)continue t;break t}}p[d++]=g}return p},Lr.prototype.at=hs,Lr.prototype.chain=function(){return ls(this)},Lr.prototype.commit=function(){return new Dr(this.value(),this.__chain__)},Lr.prototype.next=function(){this.__values__===i&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Lr.prototype.plant=function(t){for(var e,r=this;r instanceof Ur;){var n=Fo(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},Lr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qr){var e=t;return this.__actions__.length&&(e=new qr(this)),(e=e.reverse()).__actions__.push({func:ds,args:[Qo],thisArg:i}),new Dr(e,this.__chain__)}return this.thru(Qo)},Lr.prototype.toJSON=Lr.prototype.valueOf=Lr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Lr.prototype.first=Lr.prototype.head,Jt&&(Lr.prototype[Jt]=function(){return this}),Lr}();le._=hr,(n=function(){return hr}.call(e,r,e,t))===i||(t.exports=n)}.call(this)},5880:function(t,e,r){var n,i;!function(o,s){"use strict";n=function(){var t=function(){},e="undefined",r=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},o=null;function s(t,e){var r=t[e];if("function"==typeof r.bind)return r.bind(t);try{return Function.prototype.bind.call(r,t)}catch(e){return function(){return Function.prototype.apply.apply(r,[t,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(){for(var r=this.getLevel(),i=0;i<n.length;i++){var o=n[i];this[o]=i<r?t:this.methodFactory(o,r,this.name)}if(this.log=this.debug,typeof console===e&&r<this.levels.SILENT)return"No console available for logging"}function u(t){return function(){typeof console!==e&&(c.call(this),this[t].apply(this,arguments))}}function f(n,i,o){return function(n){return"debug"===n&&(n="log"),typeof console!==e&&("trace"===n&&r?a:void 0!==console[n]?s(console,n):void 0!==console.log?s(console,"log"):t)}(n)||u.apply(this,arguments)}function l(t,r){var s,a,u,l=this,d="loglevel";function h(){var t;if(typeof window!==e&&d){try{t=window.localStorage[d]}catch(t){}if(typeof t===e)try{var r=window.document.cookie,n=encodeURIComponent(d),i=r.indexOf(n+"=");-1!==i&&(t=/^([^;]+)/.exec(r.slice(i+n.length+1))[1])}catch(t){}return void 0===l.levels[t]&&(t=void 0),t}}function p(t){var e=t;if("string"==typeof e&&void 0!==l.levels[e.toUpperCase()]&&(e=l.levels[e.toUpperCase()]),"number"==typeof e&&e>=0&&e<=l.levels.SILENT)return e;throw new TypeError("log.setLevel() called with invalid level: "+t)}"string"==typeof t?d+=":"+t:"symbol"==typeof t&&(d=void 0),l.name=t,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=r||f,l.getLevel=function(){return null!=u?u:null!=a?a:s},l.setLevel=function(t,r){return u=p(t),!1!==r&&function(t){var r=(n[t]||"silent").toUpperCase();if(typeof window!==e&&d){try{return void(window.localStorage[d]=r)}catch(t){}try{window.document.cookie=encodeURIComponent(d)+"="+r+";"}catch(t){}}}(u),c.call(l)},l.setDefaultLevel=function(t){a=p(t),h()||l.setLevel(t,!1)},l.resetLevel=function(){u=null,function(){if(typeof window!==e&&d){try{window.localStorage.removeItem(d)}catch(t){}try{window.document.cookie=encodeURIComponent(d)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}(),c.call(l)},l.enableAll=function(t){l.setLevel(l.levels.TRACE,t)},l.disableAll=function(t){l.setLevel(l.levels.SILENT,t)},l.rebuild=function(){if(o!==l&&(s=p(o.getLevel())),c.call(l),o===l)for(var t in i)i[t].rebuild()},s=p(o?o.getLevel():"WARN");var b=h();null!=b&&(u=p(b)),c.call(l)}(o=new l).getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=i[t];return e||(e=i[t]=new l(t,o.methodFactory)),e};var d=typeof window!==e?window.log:void 0;return o.noConflict=function(){return typeof window!==e&&window.log===o&&(window.log=d),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i=n.call(e,r,e,t))||(t.exports=i)}()},7784:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},9042:(t,e)=>{"use strict";var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16));else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},8160:(t,e,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(968),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),u=a.call((function(){}),"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!d["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=s(t),a=e&&"[object String]"===o.call(t),d=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=u&&r;if(a&&t.length>0&&!i.call(t,0))for(var b=0;b<t.length;++b)d.push(String(b));if(n&&t.length>0)for(var g=0;g<t.length;++g)d.push(String(g));else for(var y in t)p&&"prototype"===y||!i.call(t,y)||d.push(String(y));if(c)for(var m=function(t){if("undefined"==typeof window||!h)return l(t);try{return l(t)}catch(t){return!1}}(t),v=0;v<f.length;++v)m&&"constructor"===f[v]||!i.call(t,f[v])||d.push(f[v]);return d}}t.exports=n},9228:(t,e,r)=>{"use strict";var n=Array.prototype.slice,i=r(968),o=Object.keys,s=o?function(t){return o(t)}:r(8160),a=Object.keys;s.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?a(n.call(t)):a(t)})}else Object.keys=s;return Object.keys||s},t.exports=s},968:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},3358:(t,e,r)=>{var n=r(7086);function i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function o(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}t.exports=n(i),t.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},9907:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a,c=[],u=!1,f=-1;function l(){u&&a&&(u=!1,a.length?c=a.concat(c):f=-1,c.length&&d())}function d(){if(!u){var t=s(l);u=!0;for(var e=c.length;e;){for(a=c,c=[];++f<e;)a&&a[f].run();f=-1,e=c.length}a=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new h(t,e)),1!==c.length||u||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},2720:(t,e,r)=>{var n=r(9907),i=r(3358),o=r(1822),s=r(9467),a=function(){},c=/^v?\.0/.test(n.version),u=function(t){return"function"==typeof t},f=function(t){t()},l=function(t,e){return t.pipe(e)};t.exports=function(){var t,e=Array.prototype.slice.call(arguments),r=u(e[e.length-1]||a)&&e.pop()||a;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var n=e.map((function(l,d){var h=d<e.length-1;return function(t,e,r,n){n=i(n);var f=!1;t.on("close",(function(){f=!0})),o(t,{readable:e,writable:r},(function(t){if(t)return n(t);f=!0,n()}));var l=!1;return function(e){if(!f&&!l)return l=!0,function(t){return!!c&&!!s&&(t instanceof(s.ReadStream||a)||t instanceof(s.WriteStream||a))&&u(t.close)}(t)?t.close(a):function(t){return t.setHeader&&u(t.abort)}(t)?t.abort():u(t.destroy)?t.destroy():void n(e||new Error("stream was destroyed"))}}(l,h,d>0,(function(e){t||(t=e),e&&n.forEach(f),h||(n.forEach(f),r(t))}))}));return e.reduce(l)}},5636:(t,e,r)=>{var n=r(1048),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},6108:(t,e,r)=>{"use strict";var n=r(528),i=r(686),o=r(7239)(),s=r(9336),a=r(3468),c=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||c(e)!==e)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in t&&s){var f=s(t,"length");f&&!f.configurable&&(n=!1),f&&!f.writable&&(u=!1)}return(n||u||!r)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},7086:t=>{t.exports=function t(e,r){if(e&&r)return t(e)(r);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){n[t]=e[t]})),n;function n(){for(var t=new Array(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];var n=e.apply(this,t),i=t[t.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(t){n[t]=i[t]})),n}}},2671:()=>{},8379:()=>{},3553:()=>{},9467:()=>{},183:t=>{"use strict";t.exports={rE:"6.5.5"}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};return(()=>{"use strict";r.r(n),r.d(n,{Web3AuthNoModal:()=>Ws});var t={};r.r(t),r.d(t,{OG:()=>Ge,My:()=>je,bytesToNumberBE:()=>qe,lX:()=>ze,Id:()=>Ve,fg:()=>Ye,qj:()=>He,hexToBytes:()=>De,aY:()=>Be,lq:()=>$e,z:()=>We,Q5:()=>Xe});var e={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}r.r(e),r.d(e,{Decoder:()=>Vi,Encoder:()=>Wi,PacketType:()=>$i,protocol:()=>zi});var c=r(446),u=r(46),f=r(282),l=r.n(f),d=-32e3,h=-32001,p=-32002,b=-32003,g=-32004,y=-32005,m=-32700,v=-32600,w=-32601,_=-32602,S=-32603,A={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};function E(t){return Boolean(t)&&"object"==typeof t&&!Array.isArray(t)}var M=(t,e)=>Object.hasOwnProperty.call(t,e);Error;class x extends TypeError{constructor(t,e){let r;const{message:n,explanation:i,...o}=t,{path:s}=t,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[t,...e()])}}function R(t){return"object"==typeof t&&null!=t}function O(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function I(t,e,r,n){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:i,branch:o}=e,{type:s}=r,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${O(n)}\``}=t;return{value:n,type:s,refinement:a,key:i[i.length-1],path:i,branch:o,...t,message:c}}function*k(t,e,r,n){var i;R(i=t)&&"function"==typeof i[Symbol.iterator]||(t=[t]);for(const i of t){const t=I(i,e,r,n);t&&(yield t)}}function*P(t,e,r={}){const{path:n=[],branch:i=[t],coerce:o=!1,mask:s=!1}=r,a={path:n,branch:i};if(o&&(t=e.coercer(t,a),s&&"type"!==e.type&&R(e.schema)&&R(t)&&!Array.isArray(t)))for(const r in t)void 0===e.schema[r]&&delete t[r];let c="valid";for(const n of e.validator(t,a))n.explanation=r.message,c="not_valid",yield[n,void 0];for(let[u,f,l]of e.entries(t,a)){const e=P(f,l,{path:void 0===u?n:[...n,u],branch:void 0===u?i:[...i,f],coerce:o,mask:s,message:r.message});for(const r of e)r[0]?(c=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):o&&(f=r[1],void 0===u?t=f:t instanceof Map?t.set(u,f):t instanceof Set?t.add(f):R(t)&&(void 0!==f||u in t)&&(t[u]=f))}if("not_valid"!==c)for(const n of e.refiner(t,a))n.explanation=r.message,c="not_refined",yield[n,void 0];"valid"===c&&(yield[void 0,t])}class N{constructor(t){const{type:e,schema:r,validator:n,refiner:i,coercer:o=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=r,this.entries=s,this.coercer=o,this.validator=n?(t,e)=>k(n(t,e),e,this,t):()=>[],this.refiner=i?(t,e)=>k(i(t,e),e,this,t):()=>[]}assert(t,e){return T(t,this,e)}create(t,e){return B(t,this,e)}is(t){return C(t,this)}mask(t,e){return function(t,e,r){const n=j(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(t,this,e)}validate(t,e={}){return j(t,this,e)}}function T(t,e,r){const n=j(t,e,{message:r});if(n[0])throw n[0]}function B(t,e,r){const n=j(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function C(t,e){return!j(t,e)[0]}function j(t,e,r={}){const n=P(t,e,r),i=function(t){const{done:e,value:r}=t.next();return e?void 0:r}(n);return i[0]?[new x(i[0],(function*(){for(const t of n)t[0]&&(yield t[0])})),void 0]:[void 0,i[1]]}function L(t,e){return new N({type:t,schema:null,validator:e})}function F(t){let e;return new N({type:"lazy",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator:(r,n)=>(e??(e=t()),e.validator(r,n)),coercer:(r,n)=>(e??(e=t()),e.coercer(r,n)),refiner:(r,n)=>(e??(e=t()),e.refiner(r,n))})}function U(t){return new N({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${O(t)}`})}function D(t){const e=O(t),r=typeof t;return new N({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?t:null,validator:r=>r===t||`Expected the literal \`${e}\`, but received: ${O(r)}`})}function q(){return L("number",(t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${O(t)}`))}function z(t){const e=t?Object.keys(t):[],r=L("never",(()=>!1));return new N({type:"object",schema:t||null,*entries(n){if(t&&R(n)){const i=new Set(Object.keys(n));for(const r of e)i.delete(r),yield[r,n[r],t[r]];for(const t of i)yield[t,n[t],r]}},validator:t=>R(t)||`Expected an object, but received: ${O(t)}`,coercer:t=>R(t)?{...t}:t})}function $(t){return new N({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function W(t,e){return new N({type:"record",schema:null,*entries(r){if(R(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>R(t)||`Expected an object, but received: ${O(t)}`})}function H(){return L("string",(t=>"string"==typeof t||`Expected a string, but received: ${O(t)}`))}function V(t){const e=t.map((t=>t.type)).join(" | ");return new N({type:"union",schema:null,coercer(e){for(const r of t){const[t,n]=r.validate(e,{coerce:!0});if(!t)return n}return e},validator(r,n){const i=[];for(const e of t){const[...t]=P(r,e,n),[o]=t;if(!o[0])return[];for(const[e]of t)e&&i.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${O(r)}`,...i]}})}var G=class extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}},K=t=>z(t);function J({path:t,branch:e}){const r=t[t.length-1];return M(e[e.length-2],r)}function Y(t){return new N({...t,type:`optional ${t.type}`,validator:(e,r)=>!J(r)||t.validator(e,r),refiner:(e,r)=>!J(r)||t.refiner(e,r)})}var Z,X,Q,tt=V([D(null),L("boolean",(t=>"boolean"==typeof t)),L("finite number",(t=>C(t,q())&&Number.isFinite(t))),H(),U(F((()=>tt))),W(H(),F((()=>tt)))]),et=(Z=tt,X=L("any",(()=>!0)),Q=t=>(function(t,e,r="Assertion failed",n=G){try{T(t,e)}catch(t){throw function(t,e){return r=t,Boolean("string"==typeof r?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var r}(n,`${r}: ${function(t){return function(t){return function(t){return"object"==typeof t&&null!==t&&"message"in t}(t)&&"string"==typeof t.message?t.message:function(t){return null==t}(t)?"":String(t)}(t).replace(/\.$/u,"")}(t)}.`)}}(t,tt),JSON.parse(JSON.stringify(t,((t,e)=>{if("__proto__"!==t&&"constructor"!==t)return e})))),new N({...Z,coercer:(t,e)=>C(t,X)?Z.coercer(Q(t,e),e):Z.coercer(t,e)}));function rt(t){try{return function(t){B(t,et)}(t),!0}catch{return!1}}var nt=D("2.0"),it=function(t){return new N({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}(V([q(),H()])),ot=K({code:L("integer",(t=>"number"==typeof t&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${O(t)}`)),message:H(),data:Y(et),stack:Y(H())}),st=V([W(H(),et),U(et)]);function at(t){return C(t,ot)}K({id:it,jsonrpc:nt,method:H(),params:Y(st)}),K({jsonrpc:nt,method:H(),params:Y(st)}),z({id:it,jsonrpc:nt,result:$(L("unknown",(()=>!0))),error:$(ot)}),V([K({id:it,jsonrpc:nt,result:et}),K({id:it,jsonrpc:nt,error:ot})]);var ct="Unspecified error message. This is a bug, please report it.",ut={code:S,message:lt(S)},ft="Unspecified server error.";function lt(t,e=ct){if(function(t){return Number.isInteger(t)}(t)){const e=t.toString();if(M(A,e))return A[e].message;if(function(t){return t>=-32099&&t<=-32e3}(t))return ft}return e}function dt(t,{fallbackError:e=ut,shouldIncludeStack:r=!0}={}){if(!at(e))throw new Error("Must provide fallback error with integer number code and string message.");const n=function(t,e){if(t&&"object"==typeof t&&"serialize"in t&&"function"==typeof t.serialize)return t.serialize();if(at(t))return t;return{...e,data:{cause:ht(t)}}}(t,e);return r||delete n.stack,n}function ht(t){return Array.isArray(t)?t.map((t=>rt(t)?t:E(t)?pt(t):null)):E(t)?pt(t):rt(t)?t:null}function pt(t){return Object.getOwnPropertyNames(t).reduce(((e,r)=>{const n=t[r];return rt(n)&&(e[r]=n),e}),{})}var bt=class extends Error{constructor(t,e,r){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a non-empty string.');super(e),this.code=t,void 0!==r&&(this.data=r)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data,function(t){if("object"!=typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(t){return!1}}(this.data)&&(t.data.cause=ht(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return f(this.serialize(),yt,2)}},gt=class extends bt{constructor(t,e,r){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,r)}};function yt(t,e){if("[Circular]"!==e)return e}var mt={parse:t=>vt(m,t),invalidRequest:t=>vt(v,t),invalidParams:t=>vt(_,t),methodNotFound:t=>vt(w,t),internal:t=>vt(S,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return vt(e,t)},invalidInput:t=>vt(d,t),resourceNotFound:t=>vt(h,t),resourceUnavailable:t=>vt(p,t),transactionRejected:t=>vt(b,t),methodNotSupported:t=>vt(g,t),limitExceeded:t=>vt(y,t)};function vt(t,e){const[r,n]=function(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e??void 0,r]}}return[]}(e);return new bt(t,r??lt(t),n)}function wt(t,e,r){try{Reflect.apply(t,e,r)}catch(t){setTimeout((()=>{throw t}))}}r(1822),r(3358),r(2720),c.Duplex;class _t extends u.EventEmitter{emit(t){let e="error"===t;const r=this._events;if(void 0!==r)e=e&&void 0===r.error;else if(!e)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(e){let t;if(i.length>0&&([t]=i),t instanceof Error)throw t;const e=new Error("Unhandled error."+(t?` (${t.message})`:""));throw e.context=t,e}const s=r[t];if(void 0===s)return!1;if("function"==typeof s)wt(s,this,i);else{const t=s.length,e=function(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}(s);for(let r=0;r<t;r+=1)wt(e[r],this,i)}return!0}}class St extends Error{constructor(t){let{code:e,message:r,data:n}=t;if(!Number.isInteger(e))throw new Error("code must be an integer");if(!r||"string"!=typeof r)throw new Error("message must be string");super(r),o(this,"code",void 0),o(this,"data",void 0),this.code=e,void 0!==n&&(this.data=n)}toString(){return l()({code:this.code,message:this.message,data:this.data,stack:this.stack})}}function At(t){return async(e,r,n,i)=>{let o;const s=new Promise((t=>{o=t}));let a=null,c=!1;const u=async()=>{c=!0,n((t=>{a=t,o()})),await s};try{await t(e,r,u),c?(await s,a(null)):i(null)}catch(t){const e=t;a?a(e):i(e)}}}class Et extends _t{constructor(){super(),o(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(t,e,r){const n=[];let i=null,o=!1;for(const s of r)if([i,o]=await Et._runMiddleware(t,e,s,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(t,e,r,n){return new Promise((i=>{const o=t=>{const r=t||e.error;r&&("object"==typeof r&&!1===Object.keys(r).includes("stack")&&(r.stack="Stack trace is not available."),e.error=dt(r,{shouldIncludeStack:!0,fallbackError:{message:(null==r?void 0:r.message)||(null==r?void 0:r.toString()),code:(null==r?void 0:r.code)||-32603,stack:(null==r?void 0:r.stack)||"Stack trace is not available.",data:(null==r?void 0:r.data)||(null==r?void 0:r.message)||(null==r?void 0:r.toString())}})),i([r,!0])},s=t=>{e.error?o(e.error):(t&&("function"!=typeof t&&o(new St({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(t)),i([null,!1]))};try{r(t,e,s,o)}catch(t){o(t)}}))}static async _runReturnHandlers(t){for(const e of t)await new Promise(((t,r)=>{e((e=>e?r(e):t()))}))}static _checkForCompletion(t,e,r){if(!("result"in e)&&!("error"in e))throw new St({code:-32603,message:"Response has no error or result for request"});if(!r)throw new St({code:-32603,message:"Nothing ended request"})}push(t){this._middleware.push(t)}handle(t,e){if(e&&"function"!=typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,r,n)=>{try{const[i,o,s]=await Et._runAllMiddleware(t,e,this._middleware);return o?(await Et._runReturnHandlers(s),n(i)):r((async t=>{try{await Et._runReturnHandlers(s)}catch(e){return t(e)}return t()}))}catch(t){return n(t)}}}async _handleBatch(t,e){try{const r=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,r):r}catch(t){if(e)return e(t);throw t}}_promiseHandle(t){return new Promise(((e,r)=>{this._handle(t,((t,n)=>{t&&void 0===n?r(t):e(n)})).catch(r)}))}async _handle(t,e){if(!t||Array.isArray(t)||"object"!=typeof t){const t=new St({code:-32603,message:"request must be plain object"});return e(t,{id:void 0,jsonrpc:"2.0",error:t})}if("string"!=typeof t.method){const r=new St({code:-32603,message:"method must be string"});return e(r,{id:t.id,jsonrpc:"2.0",error:r})}const r=a({},t),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(t){i=t}var o,s,c,u,f,l,d;return i&&(delete n.result,n.error||("object"==typeof i&&!1===Object.keys(i).includes("stack")&&(i.stack="Stack trace is not available."),n.error=dt(i,{shouldIncludeStack:!0,fallbackError:{message:(null===(o=i)||void 0===o?void 0:o.message)||(null===(s=i)||void 0===s?void 0:s.toString()),code:(null===(c=i)||void 0===c?void 0:c.code)||-32603,stack:(null===(u=i)||void 0===u?void 0:u.stack)||"Stack trace is not available.",data:(null===(f=i)||void 0===f?void 0:f.data)||(null===(l=i)||void 0===l?void 0:l.message)||(null===(d=i)||void 0===d?void 0:d.toString())}}))),e(i,n)}async _processRequest(t,e){const[r,n,i]=await Et._runAllMiddleware(t,e,this._middleware);if(Et._checkForCompletion(t,e,n),await Et._runReturnHandlers(i),r)throw r}}function Mt(t){const e=new Et;return t.forEach((t=>e.push(t))),e.asMiddleware()}function xt(t){const e=new _t;return e.sendAsync=async e=>{const r=await t.handle(e);if(r.error){var n,i,o,s,a,c,u;"object"==typeof r.error&&!1===Object.keys(r.error).includes("stack")&&(r.error.stack="Stack trace is not available.");const t=dt(r.error,{fallbackError:{message:(null===(n=r.error)||void 0===n?void 0:n.message)||(null===(i=r.error)||void 0===i?void 0:i.toString()),code:(null===(o=r.error)||void 0===o?void 0:o.code)||-32603,stack:(null===(s=r.error)||void 0===s?void 0:s.stack)||"Stack trace is not available.",data:(null===(a=r.error)||void 0===a?void 0:a.data)||(null===(c=r.error)||void 0===c?void 0:c.message)||(null===(u=r.error)||void 0===u?void 0:u.toString())},shouldIncludeStack:!0});throw mt.internal(t)}return r.result},e.send=(e,r)=>{if("function"!=typeof r)throw new Error('Must provide callback to "send" method.');t.handle(e,r)},t.on&&t.on("notification",(t=>{e.emit("data",null,t)})),e.request=async t=>{const r=a(a({},t),{},{id:Math.random().toString(36).slice(2),jsonrpc:"2.0"});return await e.sendAsync(r)},e}c.Duplex,Symbol("IGNORE_SUBSTREAM"),c.Duplex;var Rt=r(7702),Ot=r.n(Rt);const It={MAINNET:"mainnet",TESTNET:"testnet",CYAN:"cyan",AQUA:"aqua",CELESTE:"celeste"},kt={SAPPHIRE_DEVNET:"sapphire_devnet",SAPPHIRE_MAINNET:"sapphire_mainnet"},Pt={[kt.SAPPHIRE_MAINNET]:"https://signer.web3auth.io",[kt.SAPPHIRE_DEVNET]:"https://signer.web3auth.io",[It.MAINNET]:"https://signer.web3auth.io",[It.TESTNET]:"https://signer.web3auth.io",[It.CYAN]:"https://signer-polygon.web3auth.io",[It.AQUA]:"https://signer-polygon.web3auth.io",[It.CELESTE]:"https://signer-polygon.web3auth.io"};function Nt(t){let e,r=!1,n=0;try{e=window[t],r=!0,n=e.length;const i="__storage_test__";return e.setItem(i,i),e.removeItem(i),!0}catch(t){const e=t;return e&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&r&&0!==n}}Ot();class Tt{constructor(){o(this,"store",new Map)}getItem(t){return this.store.get(t)||null}setItem(t,e){this.store.set(t,e)}removeItem(t){this.store.delete(t)}}o(class{constructor(t,e){o(this,"storage",void 0),o(this,"_storeKey",void 0),this.storage=e,this._storeKey=t;try{e.getItem(t)||this.resetStore()}catch(t){}}static getInstance(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(!this.instanceMap.has(t)){let r;r="local"===e&&Nt("localStorage")?window.localStorage:"session"===e&&Nt("sessionStorage")?window.sessionStorage:new Tt,this.instanceMap.set(t,new this(t,r))}return this.instanceMap.get(t)}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const t=this.getStore();return this.storage.removeItem(this._storeKey),t}getStore(){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")}get(t){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")[t]}set(t,e){const r=JSON.parse(this.storage.getItem(this._storeKey)||"{}");r[t]=e,this.storage.setItem(this._storeKey,JSON.stringify(r))}},"instanceMap",new Map);const Bt=a(a({},kt),It),Ct="sms_passwordless";var jt,Lt=(jt=function(t,e){return jt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},jt(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}jt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),Ft=function(t){function e(e,r){var n,i,o,s=this.constructor,a=t.call(this,e,r)||this;return Object.defineProperty(a,"name",{value:s.name,enumerable:!1,configurable:!0}),n=a,i=s.prototype,(o=Object.setPrototypeOf)?o(n,i):n.__proto__=i,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(a),a}return Lt(e,t),e}(Error);class Ut extends Error{}Ut.prototype.name="InvalidTokenError";var Dt=r(8089),qt=r.n(Dt),zt=r(5880),$t=r.n(zt);const Wt=$t().getLogger("http-helpers");Wt.setLevel(zt.levels.INFO);let Ht="torus-default";const Vt=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={mode:"cors",headers:{}};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).useAPIKey&&(r.headers=a(a({},r.headers),function(){const t={};return Ht&&(t["x-api-key"]=Ht),t}()));const n=qt()(r,e,{method:"GET"}),i=await async function(t,e){let r=null;try{r=new URL(t)}catch(t){}return fetch(t,e)}(t,n);if(i.ok){const t=i.headers.get("content-type");return null!=t&&t.includes("application/json")?i.json():i.text()}throw function(t){Wt.info(`Response: ${t.status} ${t.statusText}`),Wt.info(`Url: ${t.url}`)}(i),i},Gt={EIP155:"eip155",SOLANA:"solana",CASPER:"casper",XRPL:"xrpl",OTHER:"other"},Kt="multichain",Jt=(t,e)=>{if(t===Gt.OTHER)return null;const r=e?"number"==typeof e?e:parseInt(e,16):(t=>{if(t===Gt.EIP155)return 1;if(t===Gt.SOLANA)return 1;if(t===Gt.XRPL)return 1;throw new Error(`Chain namespace ${t} is not supported`)})(t);return t===Gt.EIP155?(t=>{const e=Gt.EIP155;return 1===t?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:e,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/eth",displayName:"Ethereum Mainnet",blockExplorerUrl:"https://etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:5===t?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:e,chainId:"0x5",rpcTarget:"https://rpc.ankr.com/eth_goerli",displayName:"Goerli Testnet",blockExplorerUrl:"https://goerli.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:11155111===t?{logo:"https://images.toruswallet.io/eth.svg",chainNamespace:e,chainId:"0xaa36a7",rpcTarget:"https://rpc.ankr.com/eth_sepolia",displayName:"Sepolia Testnet",blockExplorerUrl:"https://sepolia.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:137===t?{logo:"https://images.toruswallet.io/polygon.svg",chainNamespace:e,chainId:"0x89",rpcTarget:"https://rpc.ankr.com/polygon",displayName:"Polygon Mainnet",blockExplorerUrl:"https://polygonscan.com",ticker:"MATIC",tickerName:"Polygon"}:80002===t?{logo:"https://images.toruswallet.io/polygon.svg",chainNamespace:e,chainId:"0x13882",rpcTarget:"https://rpc.ankr.com/polygon_amoy",displayName:"Polygon Amoy Testnet",blockExplorerUrl:"https://www.oklink.com/amoy",ticker:"MATIC",tickerName:"Polygon",decimals:18}:56===t?{logo:"https://images.toruswallet.io/bnb.png",chainNamespace:e,chainId:"0x38",rpcTarget:"https://rpc.ankr.com/bsc",displayName:"Binance SmartChain Mainnet",blockExplorerUrl:"https://bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:97===t?{logo:"https://images.toruswallet.io/bnb.png",chainNamespace:e,chainId:"0x61",rpcTarget:"https://rpc.ankr.com/bsc_testnet_chapel",displayName:"Binance SmartChain Testnet",blockExplorerUrl:"https://testnet.bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:25===t?{logo:"https://images.toruswallet.io/cro.svg",chainNamespace:e,chainId:"0x19",rpcTarget:"https://rpc.cronos.org",displayName:"Cronos Mainnet",blockExplorerUrl:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:338===t?{logo:"https://images.toruswallet.io/cro.svg",chainNamespace:e,chainId:"0x152",rpcTarget:"https://rpc-t3.cronos.org/",displayName:"Cronos Testnet",blockExplorerUrl:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos",decimals:18}:8217===t?{logo:"https://images.toruswallet.io/klay.svg",chainNamespace:e,chainId:"0x2019",rpcTarget:"https://public-node-api.klaytnapi.com/v1/cypress",displayName:"Klaytn Mainnet",blockExplorerUrl:"https://scope.klaytn.com",ticker:"KLAY",tickerName:"Klaytn",decimals:18}:null})(r):t===Gt.SOLANA?(t=>{const e=Gt.SOLANA;return 1===t?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:e,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/solana",displayName:"Solana Mainnet",blockExplorerUrl:"https://explorer.solana.com",ticker:"SOL",tickerName:"Solana",decimals:9}:2===t?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:e,chainId:"0x2",rpcTarget:"https://api.testnet.solana.com",displayName:"Solana Testnet",blockExplorerUrl:"https://explorer.solana.com?cluster=testnet",ticker:"SOL",tickerName:"Solana",decimals:9}:3===t?{logo:"https://images.toruswallet.io/sol.svg",chainNamespace:e,chainId:"0x3",rpcTarget:"https://api.devnet.solana.com",displayName:"Solana Devnet",blockExplorerUrl:"https://explorer.solana.com?cluster=devnet",ticker:"SOL",tickerName:"Solana",decimals:9}:null})(r):t===Gt.XRPL?(t=>{const e=Gt.XRPL;return 1===t?{chainNamespace:e,decimals:15,chainId:"0x1",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://ripple-node.tor.us",wsTarget:"wss://s2.ripple.com",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl mainnet",blockExplorerUrl:"https://livenet.xrpl.org"}:2===t?{chainNamespace:e,decimals:15,chainId:"0x2",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://testnet-ripple-node.tor.us",wsTarget:"wss://s.altnet.rippletest.net",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl testnet",blockExplorerUrl:"https://testnet.xrpl.org",isTestnet:!0}:3===t?{chainNamespace:e,decimals:15,chainId:"0x3",logo:"https://images.toruswallet.io/XRP.svg",rpcTarget:"https://devnet-ripple-node.tor.us",wsTarget:"wss://s.devnet.rippletest.net/",ticker:"XRP",tickerName:"XRPL",displayName:"xrpl devnet",blockExplorerUrl:"https://devnet.xrpl.org",isTestnet:!0}:null})(r):null};class Yt extends Ft{constructor(t,e){super(e),o(this,"code",void 0),o(this,"message",void 0),this.code=t,this.message=e||"",Object.defineProperty(this,"name",{value:"Web3AuthError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class Zt extends Yt{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletInitializationError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Zt(t,`${Zt.messages[t]}, ${e}`)}static notFound(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5001,t)}static notInstalled(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5002,t)}static notReady(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5003,t)}static windowBlocked(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5004,t)}static windowClosed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5005,t)}static incompatibleChainNameSpace(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5006,t)}static duplicateAdapterError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5007,t)}static invalidProviderConfigError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5008,t)}static providerNotReadyError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5009,t)}static rpcConnectionError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5010,t)}static invalidParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5011,t)}static invalidNetwork(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zt.fromCode(5013,t)}}o(Zt,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});class Xt extends Yt{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletLoginError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Xt(t,`${Xt.messages[t]}. ${e}`)}static connectionError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5111,t)}static disconnectionError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5112,t)}static notConnectedError(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5113,t)}static popupClosed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5114,t)}static mfaEnabled(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5115,t)}static chainConfigNotAdded(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5116,t)}static unsupportedOperation(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5117,t)}static coreKitKeyNotFound(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5118,t)}static userNotLoggedIn(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Xt.fromCode(5119,t)}}o(Xt,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user",5115:"User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa",5116:"Chain config has not been added. Please add the chain config before calling switchChain",5117:"Unsupported operation",5118:"useCoreKitKey flag is enabled but coreKitKey is not available",5119:"User not logged in."});class Qt extends Yt{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletOperationsError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Qt(t,`${Qt.messages[t]}, ${e}`)}static chainIDNotAllowed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5201,t)}static operationNotAllowed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5202,t)}static chainNamespaceNotAllowed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5203,t)}}o(Qt,"messages",{5e3:"Custom",5201:"Provided chainId is not allowed",5202:"This operation is not allowed"});class te extends Yt{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"WalletProviderError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Qt(t,`${te.messages[t]}, ${e}`)}static invalidRequestArgs(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5301,t)}static invalidRequestMethod(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5302,t)}static invalidRequestParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Qt.fromCode(5303,t)}}o(te,"messages",{5e3:"Custom",5301:"Expected a single, non-array, object argument.",5302:"'args.method' must be a non-empty string.",5303:"'args.params' must be an object or array if provided."});const ee={OPENLOGIN:"openlogin",WALLET_CONNECT_V2:"wallet-connect-v2"},re=a({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLFLARE:"solflare",SLOPE:"slope"},ee),ne=a({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},ee),ie=a(a({},ne),re),oe=(re.TORUS_SOLANA,re.PHANTOM,re.SOLFLARE,re.SLOPE,ne.TORUS_EVM,ne.METAMASK,ne.COINBASE,Bt),se={NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"},ae=a(a({},se),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated",CACHE_CLEAR:"cache_clear"});function ce(t){let e,r=!1,n=0;try{e=window[t],r=!0,n=e.length;const i="__storage_test__";return e.setItem(i,i),e.removeItem(i),!0}catch(t){const e=t;return!(!e||22!==e.code&&1014!==e.code&&"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||!r||0===n)}}var ue=$t().getLogger("web3auth-logger");const fe=a(a({},Gt),{},{MULTICHAIN:"multichain"});function le(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function de(t,...e){if(!((r=t)instanceof Uint8Array||null!=r&&"object"==typeof r&&"Uint8Array"===r.constructor.name))throw new Error("Expected Uint8Array");var r;if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function he(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");le(t.outputLen),le(t.blockLen)}function pe(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function be(t,e){de(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}a({},{READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"}),a(a({},{WALLET_SERVICES:"wallet-services"}),{SOLANA:"solana"});const ge={number:le,bool:function(t){if("boolean"!=typeof t)throw new Error(`Expected boolean, not ${t}`)},bytes:de,hash:he,exists:pe,output:be},ye="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function me(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}const ve=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),we=(t,e)=>t<<32-e|t>>>e;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function _e(t){if("string"==typeof t&&(t=function(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),!me(t))throw new Error("expected Uint8Array, got "+typeof t);return t}class Se{clone(){return this._cloneInto()}}function Ae(t){const e=e=>t().update(_e(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Ee(t=32){if(ye&&"function"==typeof ye.getRandomValues)return ye.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class Me extends Se{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ve(this.buffer)}update(t){pe(this);const{view:e,buffer:r,blockLen:n}=this,i=(t=_e(t)).length;for(let o=0;o<i;){const s=Math.min(n-this.pos,i-o);if(s!==n)r.set(t.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(e,0),this.pos=0);else{const e=ve(t);for(;n<=i-o;o+=n)this.process(e,o)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){pe(this),be(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:n,isLE:i}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let t=o;t<n;t++)e[t]=0;!function(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,u=n?0:4;t.setUint32(e+c,s,n),t.setUint32(e+u,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const s=ve(t),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<c;t++)s.setUint32(4*t,u[t],i)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}const xe=(t,e,r)=>t&e^t&r^e&r,Re=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Oe=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ie=new Uint32Array(64);class ke extends Me{constructor(){super(64,32,8,!1),this.A=0|Oe[0],this.B=0|Oe[1],this.C=0|Oe[2],this.D=0|Oe[3],this.E=0|Oe[4],this.F=0|Oe[5],this.G=0|Oe[6],this.H=0|Oe[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)Ie[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=Ie[t-15],r=Ie[t-2],n=we(e,7)^we(e,18)^e>>>3,i=we(r,17)^we(r,19)^r>>>10;Ie[t]=i+Ie[t-7]+n+Ie[t-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:c,H:u}=this;for(let t=0;t<64;t++){const e=u+(we(s,6)^we(s,11)^we(s,25))+((f=s)&a^~f&c)+Re[t]+Ie[t]|0,l=(we(r,2)^we(r,13)^we(r,22))+xe(r,n,i)|0;u=c,c=a,a=s,s=o+e|0,o=i,i=n,n=r,r=e+l|0}var f;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,i,o,s,a,c,u)}roundClean(){Ie.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Pe=Ae((()=>new ke)),Ne=(BigInt(0),BigInt(1)),Te=BigInt(2);function Be(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}const Ce=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function je(t){if(!Be(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=Ce[t[r]];return e}function Le(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":`0x${t}`)}const Fe={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function Ue(t){return t>=Fe._0&&t<=Fe._9?t-Fe._0:t>=Fe._A&&t<=Fe._F?t-(Fe._A-10):t>=Fe._a&&t<=Fe._f?t-(Fe._a-10):void 0}function De(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){const r=Ue(t.charCodeAt(i)),o=Ue(t.charCodeAt(i+1));if(void 0===r||void 0===o){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+e+'" at index '+i)}n[e]=16*r+o}return n}function qe(t){return Le(je(t))}function ze(t){if(!Be(t))throw new Error("Uint8Array expected");return Le(je(Uint8Array.from(t).reverse()))}function $e(t,e){return De(t.toString(16).padStart(2*e,"0"))}function We(t,e){return $e(t,e).reverse()}function He(t,e,r){let n;if("string"==typeof e)try{n=De(e)}catch(r){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${r}`)}else{if(!Be(e))throw new Error(`${t} must be hex string or Uint8Array`);n=Uint8Array.from(e)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n}function Ve(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];if(!Be(n))throw new Error("Uint8Array expected");e+=n.length}let r=new Uint8Array(e),n=0;for(let e=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}const Ge=t=>(Te<<BigInt(t-1))-Ne,Ke=t=>new Uint8Array(t),Je=t=>Uint8Array.from(t);function Ye(t,e,r){if("number"!=typeof t||t<2)throw new Error("hashLen must be a number");if("number"!=typeof e||e<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=Ke(t),i=Ke(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...t)=>r(i,n,...t),c=(t=Ke())=>{i=a(Je([0]),t),n=a(),0!==t.length&&(i=a(Je([1]),t),n=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let t=0;const r=[];for(;t<e;){n=a();const e=n.slice();r.push(e),t+=n.length}return Ve(...r)};return(t,e)=>{let r;for(s(),c(t);!(r=e(u()));)c();return s(),r}}const Ze={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||Be(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function Xe(t,e,r={}){const n=(e,r,n)=>{const i=Ze[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=t[e];if(!(n&&void 0===o||i(o,t)))throw new Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`)};for(const[t,r]of Object.entries(e))n(t,r,!1);for(const[t,e]of Object.entries(r))n(t,e,!0);return t}const Qe=BigInt(0),tr=BigInt(1),er=BigInt(2),rr=BigInt(3),nr=BigInt(4),ir=BigInt(5),or=BigInt(8);function sr(t,e){const r=t%e;return r>=Qe?r:e+r}function ar(t,e,r){if(r<=Qe||e<Qe)throw new Error("Expected power/modulo > 0");if(r===tr)return Qe;let n=tr;for(;e>Qe;)e&tr&&(n=n*t%r),t=t*t%r,e>>=tr;return n}function cr(t,e,r){let n=t;for(;e-- >Qe;)n*=n,n%=r;return n}function ur(t,e){if(t===Qe||e<=Qe)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=sr(t,e),n=e,i=Qe,o=tr,s=tr,a=Qe;for(;r!==Qe;){const t=n/r,e=n%r,c=i-s*t,u=o-a*t;n=r,r=e,i=s,o=a,s=c,a=u}if(n!==tr)throw new Error("invert: does not exist");return sr(i,e)}BigInt(9),BigInt(16);const fr=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function lr(t,e){const r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function dr(t){if("bigint"!=typeof t)throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function hr(t){const e=dr(t);return e+Math.ceil(e/2)}class pr extends Se{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,he(t);const r=_e(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?t.create().update(r).digest():r);for(let t=0;t<i.length;t++)i[t]^=54;this.iHash.update(i),this.oHash=t.create();for(let t=0;t<i.length;t++)i[t]^=106;this.oHash.update(i),i.fill(0)}update(t){return pe(this),this.iHash.update(t),this}digestInto(t){pe(this),de(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const br=(t,e,r)=>new pr(t,e).update(r).digest();br.create=(t,e)=>new pr(t,e);const gr=BigInt(0),yr=BigInt(1);function mr(t){return Xe(t.Fp,fr.reduce(((t,e)=>(t[e]="function",t)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),Xe(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...lr(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const{bytesToNumberBE:vr,hexToBytes:wr}=t,_r={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){const{Err:e}=_r;if(t.length<2||2!==t[0])throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(128&n[0])throw new e("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new e("Invalid signature integer: unnecessary leading zero");return{d:vr(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=_r,r="string"==typeof t?wr(t):t;if(!Be(r))throw new Error("ui8a expected");let n=r.length;if(n<2||48!=r[0])throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:o}=_r._parseInt(r.subarray(2)),{d:s,l:a}=_r._parseInt(o);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(t){const e=t=>8&Number.parseInt(t[0],16)?"00"+t:t,r=t=>{const e=t.toString(16);return 1&e.length?`0${e}`:e},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,a=r(o),c=r(s);return`30${r(s+o+4)}02${c}${i}02${a}${n}`}},Sr=BigInt(0),Ar=BigInt(1),Er=(BigInt(2),BigInt(3));function Mr(t){const e=function(t){const e=mr(t);return Xe(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function s(t){return sr(t,n)}function a(t){return ur(t,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:f,isWithinCurveOrder:l}=function(t){const e=function(t){const e=mr(t);Xe(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}(t),{Fp:r}=e,n=e.toBytes||((t,e,n)=>{const i=e.toAffine();return Ve(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=e.fromBytes||(t=>{const e=t.subarray(1);return{x:r.fromBytes(e.subarray(0,r.BYTES)),y:r.fromBytes(e.subarray(r.BYTES,2*r.BYTES))}});function o(t){const{a:n,b:i}=e,o=r.sqr(t),s=r.mul(o,t);return r.add(r.add(s,r.mul(t,n)),i)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error("bad generator point: equation left != right");function s(t){return"bigint"==typeof t&&Sr<t&&t<e.n}function a(t){if(!s(t))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(t){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:i,n:o}=e;if(r&&"bigint"!=typeof t){if(Be(t)&&(t=je(t)),"string"!=typeof t||!r.includes(t.length))throw new Error("Invalid key");t=t.padStart(2*n,"0")}let s;try{s="bigint"==typeof t?t:qe(He("private key",t,n))}catch(e){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof t}`)}return i&&(s=sr(s,o)),a(s),s}const u=new Map;function f(t){if(!(t instanceof l))throw new Error("ProjectivePoint expected")}class l{constructor(t,e,n){if(this.px=t,this.py=e,this.pz=n,null==t||!r.isValid(t))throw new Error("x required");if(null==e||!r.isValid(e))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(t){const{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw new Error("invalid affine point");if(t instanceof l)throw new Error("projective point not allowed");const i=t=>r.eql(t,r.ZERO);return i(e)&&i(n)?l.ZERO:new l(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(l.fromAffine)}static fromHex(t){const e=l.fromAffine(i(He("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return l.BASE.multiply(c(t))}_setWindowSize(t){this._WINDOW_SIZE=t,u.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:t,y:n}=this.toAffine();if(!r.isValid(t)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),s=o(t);if(!r.eql(i,s))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw new Error("Field doesn't support isOdd")}equals(t){f(t);const{px:e,py:n,pz:i}=this,{px:o,py:s,pz:a}=t,c=r.eql(r.mul(e,a),r.mul(o,i)),u=r.eql(r.mul(n,a),r.mul(s,i));return c&&u}negate(){return new l(this.px,r.neg(this.py),this.pz)}double(){const{a:t,b:n}=e,i=r.mul(n,Er),{px:o,py:s,pz:a}=this;let c=r.ZERO,u=r.ZERO,f=r.ZERO,d=r.mul(o,o),h=r.mul(s,s),p=r.mul(a,a),b=r.mul(o,s);return b=r.add(b,b),f=r.mul(o,a),f=r.add(f,f),c=r.mul(t,f),u=r.mul(i,p),u=r.add(c,u),c=r.sub(h,u),u=r.add(h,u),u=r.mul(c,u),c=r.mul(b,c),f=r.mul(i,f),p=r.mul(t,p),b=r.sub(d,p),b=r.mul(t,b),b=r.add(b,f),f=r.add(d,d),d=r.add(f,d),d=r.add(d,p),d=r.mul(d,b),u=r.add(u,d),p=r.mul(s,a),p=r.add(p,p),d=r.mul(p,b),c=r.sub(c,d),f=r.mul(p,h),f=r.add(f,f),f=r.add(f,f),new l(c,u,f)}add(t){f(t);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:c}=t;let u=r.ZERO,d=r.ZERO,h=r.ZERO;const p=e.a,b=r.mul(e.b,Er);let g=r.mul(n,s),y=r.mul(i,a),m=r.mul(o,c),v=r.add(n,i),w=r.add(s,a);v=r.mul(v,w),w=r.add(g,y),v=r.sub(v,w),w=r.add(n,o);let _=r.add(s,c);return w=r.mul(w,_),_=r.add(g,m),w=r.sub(w,_),_=r.add(i,o),u=r.add(a,c),_=r.mul(_,u),u=r.add(y,m),_=r.sub(_,u),h=r.mul(p,w),u=r.mul(b,m),h=r.add(u,h),u=r.sub(y,h),h=r.add(y,h),d=r.mul(u,h),y=r.add(g,g),y=r.add(y,g),m=r.mul(p,m),w=r.mul(b,w),y=r.add(y,m),m=r.sub(g,m),m=r.mul(p,m),w=r.add(w,m),g=r.mul(y,w),d=r.add(d,g),g=r.mul(_,w),u=r.mul(v,u),u=r.sub(u,g),g=r.mul(v,y),h=r.mul(_,h),h=r.add(h,g),new l(u,d,h)}subtract(t){return this.add(t.negate())}is0(){return this.equals(l.ZERO)}wNAF(t){return h.wNAFCached(this,u,t,(t=>{const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(l.fromAffine)}))}multiplyUnsafe(t){const n=l.ZERO;if(t===Sr)return n;if(a(t),t===Ar)return this;const{endo:i}=e;if(!i)return h.unsafeLadder(this,t);let{k1neg:o,k1:s,k2neg:c,k2:u}=i.splitScalar(t),f=n,d=n,p=this;for(;s>Sr||u>Sr;)s&Ar&&(f=f.add(p)),u&Ar&&(d=d.add(p)),p=p.double(),s>>=Ar,u>>=Ar;return o&&(f=f.negate()),c&&(d=d.negate()),d=new l(r.mul(d.px,i.beta),d.py,d.pz),f.add(d)}multiply(t){a(t);let n,i,o=t;const{endo:s}=e;if(s){const{k1neg:t,k1:e,k2neg:a,k2:c}=s.splitScalar(o);let{p:u,f}=this.wNAF(e),{p:d,f:p}=this.wNAF(c);u=h.constTimeNegate(t,u),d=h.constTimeNegate(a,d),d=new l(r.mul(d.px,s.beta),d.py,d.pz),n=u.add(d),i=f.add(p)}else{const{p:t,f:e}=this.wNAF(o);n=t,i=e}return l.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){const n=l.BASE,i=(t,e)=>e!==Sr&&e!==Ar&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){const{px:e,py:n,pz:i}=this,o=this.is0();null==t&&(t=o?r.ONE:r.inv(i));const s=r.mul(e,t),a=r.mul(n,t),c=r.mul(i,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:t,isTorsionFree:r}=e;if(t===Ar)return!0;if(r)return r(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:t,clearCofactor:r}=e;return t===Ar?this:r?r(l,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),n(l,this,t)}toHex(t=!0){return je(this.toRawBytes(t))}}l.BASE=new l(e.Gx,e.Gy,r.ONE),l.ZERO=new l(r.ZERO,r.ONE,r.ZERO);const d=e.nBitLength,h=function(t,e){const r=(t,e)=>{const r=e.negate();return t?r:e},n=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>gr;)r&yr&&(n=n.add(i)),i=i.double(),r>>=yr;return n},precomputeWindow(t,e){const{windows:r,windowSize:i}=n(e),o=[];let s=t,a=s;for(let t=0;t<r;t++){a=s,o.push(a);for(let t=1;t<i;t++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(e,i,o){const{windows:s,windowSize:a}=n(e);let c=t.ZERO,u=t.BASE;const f=BigInt(2**e-1),l=2**e,d=BigInt(e);for(let t=0;t<s;t++){const e=t*a;let n=Number(o&f);o>>=d,n>a&&(n-=l,o+=yr);const s=e,h=e+Math.abs(n)-1,p=t%2!=0,b=n<0;0===n?u=u.add(r(p,i[s])):c=c.add(r(b,i[h]))}return{p:c,f:u}},wNAFCached(t,e,r,n){const i=t._WINDOW_SIZE||1;let o=e.get(t);return o||(o=this.precomputeWindow(t,i),1!==i&&e.set(t,n(o))),this.wNAF(i,o,r)}}}(l,e.endo?Math.ceil(d/2):d);return{CURVE:e,ProjectivePoint:l,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:s}}({...e,toBytes(t,e,n){const i=e.toAffine(),o=r.toBytes(i.x),s=Ve;return n?s(Uint8Array.from([e.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(t){const e=t.length,n=t[0],s=t.subarray(1);if(e!==i||2!==n&&3!==n){if(e===o&&4===n)return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))};throw new Error(`Point of length ${e} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}{const t=qe(s);if(!(Sr<(a=t)&&a<r.ORDER))throw new Error("Point is not on curve");const e=f(t);let i=r.sqrt(e);return!(1&~n)!=((i&Ar)===Ar)&&(i=r.neg(i)),{x:t,y:i}}var a}}),d=t=>je($e(t,e.nByteLength));function h(t){return t>n>>Ar}const p=(t,e,r)=>qe(t.slice(e,r));class b{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){const r=e.nByteLength;return t=He("compactSignature",t,2*r),new b(p(t,0,r),p(t,r,2*r))}static fromDER(t){const{r:e,s:r}=_r.toSig(He("DER",t));return new b(e,r)}assertValidity(){if(!l(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!l(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(t){return new b(this.r,this.s,t)}recoverPublicKey(t){const{r:n,s:i,recovery:o}=this,u=v(He("msgHash",t));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const f=2===o||3===o?n+e.n:n;if(f>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const l=1&o?"03":"02",h=c.fromHex(l+d(f)),p=a(f),b=s(-u*p),g=s(i*p),y=c.BASE.multiplyAndAddUnsafe(h,b,g);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return De(this.toDERHex())}toDERHex(){return _r.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return De(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}const g={isValidPrivateKey(t){try{return u(t),!0}catch(t){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const t=hr(e.n);return function(t,e,r=!1){const n=t.length,i=dr(e),o=hr(e);if(n<16||n<o||n>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);const s=sr(r?qe(t):ze(t),e-tr)+tr;return r?We(s,i):$e(s,i)}(e.randomBytes(t),e.n)},precompute:(t=8,e=c.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)};function y(t){const e=Be(t),r="string"==typeof t,n=(e||r)&&t.length;return e?n===i||n===o:r?n===2*i||n===2*o:t instanceof c}const m=e.bits2int||function(t){const r=qe(t),n=8*t.length-e.nBitLength;return n>0?r>>BigInt(n):r},v=e.bits2int_modN||function(t){return s(m(t))},w=Ge(e.nBitLength);function _(t){if("bigint"!=typeof t)throw new Error("bigint expected");if(!(Sr<=t&&t<w))throw new Error(`bigint expected < 2^${e.nBitLength}`);return $e(t,e.nByteLength)}const S={lowS:e.lowS,prehash:!1},A={lowS:e.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return c.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(y(t))throw new Error("first arg must be private key");if(!y(e))throw new Error("second arg must be public key");return c.fromHex(e).multiply(u(t)).toRawBytes(r)},sign:function(t,n,i=S){const{seed:o,k2sig:f}=function(t,n,i=S){if(["recovered","canonical"].some((t=>t in i)))throw new Error("sign() legacy options not supported");const{hash:o,randomBytes:f}=e;let{lowS:d,prehash:p,extraEntropy:g}=i;null==d&&(d=!0),t=He("msgHash",t),p&&(t=He("prehashed msgHash",o(t)));const y=v(t),w=u(n),A=[_(w),_(y)];if(null!=g){const t=!0===g?f(r.BYTES):g;A.push(He("extraEntropy",t))}const E=Ve(...A),M=y;return{seed:E,k2sig:function(t){const e=m(t);if(!l(e))return;const r=a(e),n=c.BASE.multiply(e).toAffine(),i=s(n.x);if(i===Sr)return;const o=s(r*s(M+i*w));if(o===Sr)return;let u=(n.x===i?0:2)|Number(n.y&Ar),f=o;return d&&h(o)&&(f=function(t){return h(t)?s(-t):t}(o),u^=1),new b(i,f,u)}}}(t,n,i),d=e;return Ye(d.hash.outputLen,d.nByteLength,d.hmac)(o,f)},verify:function(t,r,n,i=A){const o=t;if(r=He("msgHash",r),n=He("publicKey",n),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:f}=i;let l,d;try{if("string"==typeof o||Be(o))try{l=b.fromDER(o)}catch(t){if(!(t instanceof _r.Err))throw t;l=b.fromCompact(o)}else{if("object"!=typeof o||"bigint"!=typeof o.r||"bigint"!=typeof o.s)throw new Error("PARSE");{const{r:t,s:e}=o;l=new b(t,e)}}d=c.fromHex(n)}catch(t){if("PARSE"===t.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;f&&(r=e.hash(r));const{r:h,s:p}=l,g=v(r),y=a(p),m=s(g*y),w=s(h*y),_=c.BASE.multiplyAndAddUnsafe(d,m,w)?.toAffine();return!!_&&s(_.x)===h},ProjectivePoint:c,Signature:b,utils:g}}function xr(t){return{hash:t,hmac:(e,...r)=>br(t,e,function(...t){let e=0;for(let r=0;r<t.length;r++){const n=t[r];if(!me(n))throw new Error("Uint8Array expected");e+=n.length}const r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){const i=t[e];r.set(i,n),n+=i.length}return r}(...r)),randomBytes:Ee}}BigInt(4);const Rr=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Or=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Ir=BigInt(1),kr=BigInt(2),Pr=(t,e)=>(t+e/kr)/e;const Nr=function(t,e,r=!1,n={}){if(t<=Qe)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:o}=lr(t,e);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=function(t){if(t%nr===rr){const e=(t+tr)/nr;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error("Cannot find square root");return n}}if(t%or===ir){const e=(t-ir)/or;return function(t,r){const n=t.mul(r,er),i=t.pow(n,e),o=t.mul(r,i),s=t.mul(t.mul(o,er),i),a=t.mul(o,t.sub(s,t.ONE));if(!t.eql(t.sqr(a),r))throw new Error("Cannot find square root");return a}}return function(t){const e=(t-tr)/er;let r,n,i;for(r=t-tr,n=0;r%er===Qe;r/=er,n++);for(i=er;i<t&&ar(i,e,t)!==t-tr;i++);if(1===n){const e=(t+tr)/nr;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error("Cannot find square root");return n}}const o=(r+tr)/er;return function(t,s){if(t.pow(s,e)===t.neg(t.ONE))throw new Error("Cannot find square root");let a=n,c=t.pow(t.mul(t.ONE,i),r),u=t.pow(s,o),f=t.pow(s,r);for(;!t.eql(f,t.ONE);){if(t.eql(f,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(f);e<a&&!t.eql(r,t.ONE);e++)r=t.sqr(r);const r=t.pow(c,tr<<BigInt(a-e-1));c=t.sqr(r),u=t.mul(u,r),f=t.mul(f,c),a=e}return u}}(t)}(t),a=Object.freeze({ORDER:t,BITS:i,BYTES:o,MASK:Ge(i),ZERO:Qe,ONE:tr,create:e=>sr(e,t),isValid:e=>{if("bigint"!=typeof e)throw new Error("Invalid field element: expected bigint, got "+typeof e);return Qe<=e&&e<t},is0:t=>t===Qe,isOdd:t=>(t&tr)===tr,neg:e=>sr(-e,t),eql:(t,e)=>t===e,sqr:e=>sr(e*e,t),add:(e,r)=>sr(e+r,t),sub:(e,r)=>sr(e-r,t),mul:(e,r)=>sr(e*r,t),pow:(t,e)=>function(t,e,r){if(r<Qe)throw new Error("Expected power > 0");if(r===Qe)return t.ONE;if(r===tr)return e;let n=t.ONE,i=e;for(;r>Qe;)r&tr&&(n=t.mul(n,i)),i=t.sqr(i),r>>=tr;return n}(a,t,e),div:(e,r)=>sr(e*ur(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>ur(e,t),sqrt:n.sqrt||(t=>s(a,t)),invertBatch:t=>function(t,e){const r=new Array(e.length),n=e.reduce(((e,n,i)=>t.is0(n)?e:(r[i]=e,t.mul(e,n))),t.ONE),i=t.inv(n);return e.reduceRight(((e,n,i)=>t.is0(n)?e:(r[i]=t.mul(e,r[i]),t.mul(e,n))),i),r}(a,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?We(t,o):$e(t,o),fromBytes:t=>{if(t.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${t.length}`);return r?ze(t):qe(t)}});return Object.freeze(a)}(Rr,void 0,void 0,{sqrt:function(t){const e=Rr,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=t*t*t%e,f=u*u*t%e,l=cr(f,r,e)*f%e,d=cr(l,r,e)*f%e,h=cr(d,kr,e)*u%e,p=cr(h,i,e)*h%e,b=cr(p,o,e)*p%e,g=cr(b,a,e)*b%e,y=cr(g,c,e)*g%e,m=cr(y,a,e)*b%e,v=cr(m,r,e)*f%e,w=cr(v,s,e)*p%e,_=cr(w,n,e)*u%e,S=cr(_,kr,e);if(!Nr.eql(Nr.sqr(S),t))throw new Error("Cannot find square root");return S}}),Tr=function(t,e){const r=e=>Mr({...t,...xr(e)});return Object.freeze({...r(e),create:r})}({a:BigInt(0),b:BigInt(7),Fp:Nr,n:Or,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=Or,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Ir*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),a=Pr(o*t,e),c=Pr(-n*t,e);let u=sr(t-a*r-c*i,e),f=sr(-a*n-c*o,e);const l=u>s,d=f>s;if(l&&(u=e-u),d&&(f=e-f),u>s||f>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:l,k1:u,k2neg:d,k2:f}}}},Pe);function Br(t){return e=>(ge.bytes(e),t(e))}BigInt(0),Tr.ProjectivePoint,ge.bool,ge.bytes,(()=>{const t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,e="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);e&&!t&&e("crypto")})(),BigInt(0);const Cr={},jr={};for(let t=0;t<16;t++){const e=t,r=16*t,n=t.toString(16).toLowerCase();jr[n]=e,jr[n.toUpperCase()]=e,Cr[n]=r,Cr[n.toUpperCase()]=r}Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));const Lr=[];for(let t=0;t<=65535;t++)Lr[t]=BigInt(t);const Fr=t=>{if("string"!=typeof t)throw new Error(`hex argument type ${typeof t} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(t))throw new Error(`Input must be a 0x-prefixed hexadecimal string, got ${t}`);return(t=t.slice(2)).length%2!=0&&(t=function(t){let e=t;if("string"!=typeof e)throw new Error("[padToEven] value must be type 'string', received "+typeof e);return e.length%2&&(e=`0${e}`),e}(t)),function(t){const e=t.length,r=new Uint8Array(e/2);for(let n=0;n<e;n+=2)r[n/2]=Cr[t[n]]+jr[t[n+1]];return r}(t)};BigInt("0xffffffffffffffff"),BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),Tr.CURVE.n,Tr.CURVE.n,BigInt(2),BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),Fr("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"),Fr("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"),Fr("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"),Uint8Array.from([128]),BigInt(-1),BigInt(0),BigInt(1),BigInt(2),BigInt(3),BigInt(7),BigInt(8),BigInt(27),BigInt(28),BigInt(31),BigInt(32),BigInt(64),BigInt(128),BigInt(255),BigInt(256),BigInt(96),BigInt(100),BigInt(160),BigInt(224),BigInt(7922816251426434e13),BigInt(1461501637330903e33),BigInt(2695994666715064e52),BigInt(1e9),Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));const Ur=BigInt(2**32-1),Dr=BigInt(32);function qr(t,e=!1){return e?{h:Number(t&Ur),l:Number(t>>Dr&Ur)}:{h:0|Number(t>>Dr&Ur),l:0|Number(t&Ur)}}function zr(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:o,l:s}=qr(t[i],e);[r[i],n[i]]=[o,s]}return[r,n]}const[$r,Wr,Hr]=[[],[],[]],Vr=BigInt(0),Gr=BigInt(1),Kr=BigInt(2),Jr=BigInt(7),Yr=BigInt(256),Zr=BigInt(113);for(let t=0,e=Gr,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],$r.push(2*(5*n+r)),Wr.push((t+1)*(t+2)/2%64);let i=Vr;for(let t=0;t<7;t++)e=(e<<Gr^(e>>Jr)*Zr)%Yr,e&Kr&&(i^=Gr<<(Gr<<BigInt(t))-Gr);Hr.push(i)}const[Xr,Qr]=zr(Hr,!0),tn=(t,e,r)=>r>32?((t,e,r)=>e<<r-32|t>>>64-r)(t,e,r):((t,e,r)=>t<<r|e>>>32-r)(t,e,r),en=(t,e,r)=>r>32?((t,e,r)=>t<<r-32|e>>>64-r)(t,e,r):((t,e,r)=>e<<r|t>>>32-r)(t,e,r);class rn extends Se{constructor(t,e,r,n=!1,i=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,le(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}keccak(){!function(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=tn(o,s,1)^r[n],c=en(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=a,t[e+r+1]^=c}let e=t[2],i=t[3];for(let r=0;r<24;r++){const n=Wr[r],o=tn(e,i,n),s=en(e,i,n),a=$r[r];e=t[a],i=t[a+1],t[a]=o,t[a+1]=s}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=Xr[n],t[1]^=Qr[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){pe(this);const{blockLen:e,state:r}=this,n=(t=_e(t)).length;for(let i=0;i<n;){const o=Math.min(e-this.pos,n-i);for(let e=0;e<o;e++)r[this.pos++]^=t[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,128&e&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){pe(this,!1),de(t),this.finish();const e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return le(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(be(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new rn(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}const nn=(t,e,r)=>Ae((()=>new rn(e,t,r))),on=nn(1,144,28),sn=nn(1,136,32),an=nn(1,104,48),cn=nn(1,72,64),un=(Br(on),(()=>{const t=Br(sn);return t.create=sn.create,t})());var fn,ln,dn,hn;Br(an),Br(cn),new Uint8Array(0),function(t){t.String="string",t.Bytes="view",t.Number="number"}(fn||(fn={})),function(t){t.String="string",t.Bytes="view",t.JSON="json"}(ln||(ln={})),(hn=dn||(dn={}))[hn.Number=0]="Number",hn[hn.BigInt=1]="BigInt",hn[hn.Uint8Array=2]="Uint8Array",hn[hn.PrefixedHexString=3]="PrefixedHexString",Br(Pe);var pn=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,bn=Math.ceil,gn=Math.floor,yn="[BigNumber Error] ",mn=yn+"Number primitive has more than 15 significant digits: ",vn=1e14,wn=14,_n=9007199254740991,Sn=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],An=1e7,En=1e9;function Mn(t){var e=0|t;return t>0||t===e?e:e-1}function xn(t){for(var e,r,n=1,i=t.length,o=t[0]+"";n<i;){for(e=t[n++]+"",r=wn-e.length;r--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function Rn(t,e){var r,n,i=t.c,o=e.c,s=t.s,a=e.s,c=t.e,u=e.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=c==u,!i||!o)return n?0:!i^r?1:-1;if(!n)return c>u^r?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function On(t,e,r,n){if(t<e||t>r||t!==gn(t))throw Error(yn+(n||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function In(t){var e=t.c.length-1;return Mn(t.e/wn)==e&&t.c[e]%2!=0}function kn(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function Pn(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}!function t(e){var r,n,i,o,s,a,c,u,f,l,d=x.prototype={constructor:x,toString:null,valueOf:null},h=new x(1),p=20,b=4,g=-7,y=21,m=-1e7,v=1e7,w=!1,_=1,S=0,A={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",M=!0;function x(t,e){var r,o,s,a,c,u,f,l,d=this;if(!(d instanceof x))return new x(t,e);if(null==e){if(t&&!0===t._isBigNumber)return d.s=t.s,void(!t.c||t.e>v?d.c=d.e=null:t.e<m?d.c=[d.e=0]:(d.e=t.e,d.c=t.c.slice()));if((u="number"==typeof t)&&0*t==0){if(d.s=1/t<0?(t=-t,-1):1,t===~~t){for(a=0,c=t;c>=10;c/=10,a++);return void(a>v?d.c=d.e=null:(d.e=a,d.c=[t]))}l=String(t)}else{if(!pn.test(l=String(t)))return i(d,l,u);d.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}(a=l.indexOf("."))>-1&&(l=l.replace(".","")),(c=l.search(/e/i))>0?(a<0&&(a=c),a+=+l.slice(c+1),l=l.substring(0,c)):a<0&&(a=l.length)}else{if(On(e,2,E.length,"Base"),10==e&&M)return k(d=new x(t),p+d.e+1,b);if(l=String(t),u="number"==typeof t){if(0*t!=0)return i(d,l,u,e);if(d.s=1/t<0?(l=l.slice(1),-1):1,x.DEBUG&&l.replace(/^0\.0*|\./,"").length>15)throw Error(mn+t)}else d.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(r=E.slice(0,e),a=c=0,f=l.length;c<f;c++)if(r.indexOf(o=l.charAt(c))<0){if("."==o){if(c>a){a=f;continue}}else if(!s&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){s=!0,c=-1,a=0;continue}return i(d,String(t),u,e)}u=!1,(a=(l=n(l,e,10,d.s)).indexOf("."))>-1?l=l.replace(".",""):a=l.length}for(c=0;48===l.charCodeAt(c);c++);for(f=l.length;48===l.charCodeAt(--f););if(l=l.slice(c,++f)){if(f-=c,u&&x.DEBUG&&f>15&&(t>_n||t!==gn(t)))throw Error(mn+d.s*t);if((a=a-c-1)>v)d.c=d.e=null;else if(a<m)d.c=[d.e=0];else{if(d.e=a,d.c=[],c=(a+1)%wn,a<0&&(c+=wn),c<f){for(c&&d.c.push(+l.slice(0,c)),f-=wn;c<f;)d.c.push(+l.slice(c,c+=wn));c=wn-(l=l.slice(c)).length}else c-=f;for(;c--;l+="0");d.c.push(+l)}}else d.c=[d.e=0]}function R(t,e,r,n){var i,o,s,a,c;if(null==r?r=b:On(r,0,8),!t.c)return t.toString();if(i=t.c[0],s=t.e,null==e)c=xn(t.c),c=1==n||2==n&&(s<=g||s>=y)?kn(c,s):Pn(c,s,"0");else if(o=(t=k(new x(t),e,r)).e,a=(c=xn(t.c)).length,1==n||2==n&&(e<=o||o<=g)){for(;a<e;c+="0",a++);c=kn(c,o)}else if(e-=s,c=Pn(c,o,"0"),o+1>a){if(--e>0)for(c+=".";e--;c+="0");}else if((e+=o-a)>0)for(o+1==a&&(c+=".");e--;c+="0");return t.s<0&&i?"-"+c:c}function O(t,e){for(var r,n,i=1,o=new x(t[0]);i<t.length;i++)(!(n=new x(t[i])).s||(r=Rn(o,n))===e||0===r&&o.s===e)&&(o=n);return o}function I(t,e,r){for(var n=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,n++);return(r=n+r*wn-1)>v?t.c=t.e=null:r<m?t.c=[t.e=0]:(t.e=r,t.c=e),t}function k(t,e,r,n){var i,o,s,a,c,u,f,l=t.c,d=Sn;if(l){t:{for(i=1,a=l[0];a>=10;a/=10,i++);if((o=e-i)<0)o+=wn,s=e,c=l[u=0],f=gn(c/d[i-s-1]%10);else if((u=bn((o+1)/wn))>=l.length){if(!n)break t;for(;l.length<=u;l.push(0));c=f=0,i=1,s=(o%=wn)-wn+1}else{for(c=a=l[u],i=1;a>=10;a/=10,i++);f=(s=(o%=wn)-wn+i)<0?0:gn(c/d[i-s-1]%10)}if(n=n||e<0||null!=l[u+1]||(s<0?c:c%d[i-s-1]),n=r<4?(f||n)&&(0==r||r==(t.s<0?3:2)):f>5||5==f&&(4==r||n||6==r&&(o>0?s>0?c/d[i-s]:0:l[u-1])%10&1||r==(t.s<0?8:7)),e<1||!l[0])return l.length=0,n?(e-=t.e+1,l[0]=d[(wn-e%wn)%wn],t.e=-e||0):l[0]=t.e=0,t;if(0==o?(l.length=u,a=1,u--):(l.length=u+1,a=d[wn-o],l[u]=s>0?gn(c/d[i-s]%d[s])*a:0),n)for(;;){if(0==u){for(o=1,s=l[0];s>=10;s/=10,o++);for(s=l[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(t.e++,l[0]==vn&&(l[0]=1));break}if(l[u]+=a,l[u]!=vn)break;l[u--]=0,a=1}for(o=l.length;0===l[--o];l.pop());}t.e>v?t.c=t.e=null:t.e<m&&(t.c=[t.e=0])}return t}function P(t){var e,r=t.e;return null===r?t.toString():(e=xn(t.c),e=r<=g||r>=y?kn(e,r):Pn(e,r,"0"),t.s<0?"-"+e:e)}return x.clone=t,x.ROUND_UP=0,x.ROUND_DOWN=1,x.ROUND_CEIL=2,x.ROUND_FLOOR=3,x.ROUND_HALF_UP=4,x.ROUND_HALF_DOWN=5,x.ROUND_HALF_EVEN=6,x.ROUND_HALF_CEIL=7,x.ROUND_HALF_FLOOR=8,x.EUCLID=9,x.config=x.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(yn+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(On(r=t[e],0,En,e),p=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(On(r=t[e],0,8,e),b=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(On(r[0],-En,0,e),On(r[1],0,En,e),g=r[0],y=r[1]):(On(r,-En,En,e),g=-(y=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)On(r[0],-En,-1,e),On(r[1],1,En,e),m=r[0],v=r[1];else{if(On(r,-En,En,e),!r)throw Error(yn+e+" cannot be zero: "+r);m=-(v=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(yn+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(yn+"crypto unavailable");w=r}else w=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(On(r=t[e],0,9,e),_=r),t.hasOwnProperty(e="POW_PRECISION")&&(On(r=t[e],0,En,e),S=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(yn+e+" not an object: "+r);A=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(yn+e+" invalid: "+r);M="0123456789"==r.slice(0,10),E=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:b,EXPONENTIAL_AT:[g,y],RANGE:[m,v],CRYPTO:w,MODULO_MODE:_,POW_PRECISION:S,FORMAT:A,ALPHABET:E}},x.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!x.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-En&&i<=En&&i===gn(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%wn)<1&&(e+=wn),String(n[0]).length==e){for(e=0;e<n.length;e++)if((r=n[e])<0||r>=vn||r!==gn(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(yn+"Invalid BigNumber: "+t)},x.maximum=x.max=function(){return O(arguments,-1)},x.minimum=x.min=function(){return O(arguments,1)},x.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return gn(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,i,o,a=0,c=[],u=new x(h);if(null==t?t=p:On(t,0,En),i=bn(t/wn),w)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*e[a]+(e[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[a]=r[0],e[a+1]=r[1]):(c.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw w=!1,Error(yn+"crypto unavailable");for(e=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&e[a])+1099511627776*e[a+1]+4294967296*e[a+2]+16777216*e[a+3]+(e[a+4]<<16)+(e[a+5]<<8)+e[a+6])>=9e15?crypto.randomBytes(7).copy(e,a):(c.push(o%1e14),a+=7);a=i/7}if(!w)for(;a<i;)(o=s())<9e15&&(c[a++]=o%1e14);for(i=c[--a],t%=wn,i&&t&&(o=Sn[wn-t],c[a]=gn(i/o)*o);0===c[a];c.pop(),a--);if(a<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=wn);for(a=1,o=c[0];o>=10;o/=10,a++);a<wn&&(n-=wn-a)}return u.e=n,u.c=c,u}),x.sum=function(){for(var t=1,e=arguments,r=new x(e[0]);t<e.length;)r=r.plus(e[t++]);return r},n=function(){var t="0123456789";function e(t,e,r,n){for(var i,o,s=[0],a=0,c=t.length;a<c;){for(o=s.length;o--;s[o]*=e);for(s[0]+=n.indexOf(t.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var c,u,f,l,d,h,g,y,m=n.indexOf("."),v=p,w=b;for(m>=0&&(l=S,S=0,n=n.replace(".",""),h=(y=new x(i)).pow(n.length-m),S=l,y.c=e(Pn(xn(h.c),h.e,"0"),10,o,t),y.e=y.c.length),f=l=(g=e(n,i,o,a?(c=E,t):(c=t,E))).length;0==g[--l];g.pop());if(!g[0])return c.charAt(0);if(m<0?--f:(h.c=g,h.e=f,h.s=s,g=(h=r(h,y,v,w,o)).c,d=h.r,f=h.e),m=g[u=f+v+1],l=o/2,d=d||u<0||null!=g[u+1],d=w<4?(null!=m||d)&&(0==w||w==(h.s<0?3:2)):m>l||m==l&&(4==w||d||6==w&&1&g[u-1]||w==(h.s<0?8:7)),u<1||!g[0])n=d?Pn(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(g.length=u,d)for(--o;++g[--u]>o;)g[u]=0,u||(++f,g=[1].concat(g));for(l=g.length;!g[--l];);for(m=0,n="";m<=l;n+=c.charAt(g[m++]));n=Pn(n,f,c.charAt(0))}return n}}(),r=function(){function t(t,e,r){var n,i,o,s,a=0,c=t.length,u=e%An,f=e/An|0;for(t=t.slice();c--;)a=((i=u*(o=t[c]%An)+(n=f*o+(s=t[c]/An|0)*u)%An*An+a)/r|0)+(n/An|0)+f*s,t[c]=i%r;return a&&(t=[a].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]<e[r]?1:0,t[r]=i*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,i,o,s,a){var c,u,f,l,d,h,p,b,g,y,m,v,w,_,S,A,E,M=n.s==i.s?1:-1,R=n.c,O=i.c;if(!(R&&R[0]&&O&&O[0]))return new x(n.s&&i.s&&(R?!O||R[0]!=O[0]:O)?R&&0==R[0]||!O?0*M:M/0:NaN);for(g=(b=new x(M)).c=[],M=o+(u=n.e-i.e)+1,a||(a=vn,u=Mn(n.e/wn)-Mn(i.e/wn),M=M/wn|0),f=0;O[f]==(R[f]||0);f++);if(O[f]>(R[f]||0)&&u--,M<0)g.push(1),l=!0;else{for(_=R.length,A=O.length,f=0,M+=2,(d=gn(a/(O[0]+1)))>1&&(O=t(O,d,a),R=t(R,d,a),A=O.length,_=R.length),w=A,m=(y=R.slice(0,A)).length;m<A;y[m++]=0);E=O.slice(),E=[0].concat(E),S=O[0],O[1]>=a/2&&S++;do{if(d=0,(c=e(O,y,A,m))<0){if(v=y[0],A!=m&&(v=v*a+(y[1]||0)),(d=gn(v/S))>1)for(d>=a&&(d=a-1),p=(h=t(O,d,a)).length,m=y.length;1==e(h,y,p,m);)d--,r(h,A<p?E:O,p,a),p=h.length,c=1;else 0==d&&(c=d=1),p=(h=O.slice()).length;if(p<m&&(h=[0].concat(h)),r(y,h,m,a),m=y.length,-1==c)for(;e(O,y,A,m)<1;)d++,r(y,A<m?E:O,m,a),m=y.length}else 0===c&&(d++,y=[0]);g[f++]=d,y[0]?y[m++]=R[w]||0:(y=[R[w]],m=1)}while((w++<_||null!=y[0])&&M--);l=null!=y[0],g[0]||g.splice(0,1)}if(a==vn){for(f=1,M=g[0];M>=10;M/=10,f++);k(b,o+(b.e=f+u*wn-1)+1,s,l)}else b.e=u,b.r=+l;return b}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,f=/^-?(Infinity|NaN)$/,l=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,r,n){var i,o=r?e:e.replace(l,"");if(f.test(o))t.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,(function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e})),n&&(i=n,o=o.replace(c,"$1").replace(u,"0.$1")),e!=o))return new x(o,i);if(x.DEBUG)throw Error(yn+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},d.absoluteValue=d.abs=function(){var t=new x(this);return t.s<0&&(t.s=1),t},d.comparedTo=function(t,e){return Rn(this,new x(t,e))},d.decimalPlaces=d.dp=function(t,e){var r,n,i,o=this;if(null!=t)return On(t,0,En),null==e?e=b:On(e,0,8),k(new x(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=((i=r.length-1)-Mn(this.e/wn))*wn,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},d.dividedBy=d.div=function(t,e){return r(this,new x(t,e),p,b)},d.dividedToIntegerBy=d.idiv=function(t,e){return r(this,new x(t,e),0,1)},d.exponentiatedBy=d.pow=function(t,e){var r,n,i,o,s,a,c,u,f=this;if((t=new x(t)).c&&!t.isInteger())throw Error(yn+"Exponent not an integer: "+P(t));if(null!=e&&(e=new x(e)),s=t.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!t.c||!t.c[0])return u=new x(Math.pow(+P(f),s?t.s*(2-In(t)):+P(t))),e?u.mod(e):u;if(a=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new x(NaN);(n=!a&&f.isInteger()&&e.isInteger())&&(f=f.mod(e))}else{if(t.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||s&&f.c[1]>=24e7:f.c[0]<8e13||s&&f.c[0]<=9999975e7)))return o=f.s<0&&In(t)?-0:0,f.e>-1&&(o=1/o),new x(a?1/o:o);S&&(o=bn(S/wn+2))}for(s?(r=new x(.5),a&&(t.s=1),c=In(t)):c=(i=Math.abs(+P(t)))%2,u=new x(h);;){if(c){if(!(u=u.times(f)).c)break;o?u.c.length>o&&(u.c.length=o):n&&(u=u.mod(e))}if(i){if(0===(i=gn(i/2)))break;c=i%2}else if(k(t=t.times(r),t.e+1,1),t.e>14)c=In(t);else{if(0==(i=+P(t)))break;c=i%2}f=f.times(f),o?f.c&&f.c.length>o&&(f.c.length=o):n&&(f=f.mod(e))}return n?u:(a&&(u=h.div(u)),e?u.mod(e):o?k(u,S,b,void 0):u)},d.integerValue=function(t){var e=new x(this);return null==t?t=b:On(t,0,8),k(e,e.e+1,t)},d.isEqualTo=d.eq=function(t,e){return 0===Rn(this,new x(t,e))},d.isFinite=function(){return!!this.c},d.isGreaterThan=d.gt=function(t,e){return Rn(this,new x(t,e))>0},d.isGreaterThanOrEqualTo=d.gte=function(t,e){return 1===(e=Rn(this,new x(t,e)))||0===e},d.isInteger=function(){return!!this.c&&Mn(this.e/wn)>this.c.length-2},d.isLessThan=d.lt=function(t,e){return Rn(this,new x(t,e))<0},d.isLessThanOrEqualTo=d.lte=function(t,e){return-1===(e=Rn(this,new x(t,e)))||0===e},d.isNaN=function(){return!this.s},d.isNegative=function(){return this.s<0},d.isPositive=function(){return this.s>0},d.isZero=function(){return!!this.c&&0==this.c[0]},d.minus=function(t,e){var r,n,i,o,s=this,a=s.s;if(e=(t=new x(t,e)).s,!a||!e)return new x(NaN);if(a!=e)return t.s=-e,s.plus(t);var c=s.e/wn,u=t.e/wn,f=s.c,l=t.c;if(!c||!u){if(!f||!l)return f?(t.s=-e,t):new x(l?s:NaN);if(!f[0]||!l[0])return l[0]?(t.s=-e,t):new x(f[0]?s:3==b?-0:0)}if(c=Mn(c),u=Mn(u),f=f.slice(),a=c-u){for((o=a<0)?(a=-a,i=f):(u=c,i=l),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(n=(o=(a=f.length)<(e=l.length))?a:e,a=e=0;e<n;e++)if(f[e]!=l[e]){o=f[e]<l[e];break}if(o&&(i=f,f=l,l=i,t.s=-t.s),(e=(n=l.length)-(r=f.length))>0)for(;e--;f[r++]=0);for(e=vn-1;n>a;){if(f[--n]<l[n]){for(r=n;r&&!f[--r];f[r]=e);--f[r],f[n]+=vn}f[n]-=l[n]}for(;0==f[0];f.splice(0,1),--u);return f[0]?I(t,f,u):(t.s=3==b?-1:1,t.c=[t.e=0],t)},d.modulo=d.mod=function(t,e){var n,i,o=this;return t=new x(t,e),!o.c||!t.s||t.c&&!t.c[0]?new x(NaN):!t.c||o.c&&!o.c[0]?new x(o):(9==_?(i=t.s,t.s=1,n=r(o,t,0,3),t.s=i,n.s*=i):n=r(o,t,0,_),(t=o.minus(n.times(t))).c[0]||1!=_||(t.s=o.s),t)},d.multipliedBy=d.times=function(t,e){var r,n,i,o,s,a,c,u,f,l,d,h,p,b,g,y=this,m=y.c,v=(t=new x(t,e)).c;if(!(m&&v&&m[0]&&v[0]))return!y.s||!t.s||m&&!m[0]&&!v||v&&!v[0]&&!m?t.c=t.e=t.s=null:(t.s*=y.s,m&&v?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=Mn(y.e/wn)+Mn(t.e/wn),t.s*=y.s,(c=m.length)<(l=v.length)&&(p=m,m=v,v=p,i=c,c=l,l=i),i=c+l,p=[];i--;p.push(0));for(b=vn,g=An,i=l;--i>=0;){for(r=0,d=v[i]%g,h=v[i]/g|0,o=i+(s=c);o>i;)r=((u=d*(u=m[--s]%g)+(a=h*u+(f=m[s]/g|0)*d)%g*g+p[o]+r)/b|0)+(a/g|0)+h*f,p[o--]=u%b;p[o]=r}return r?++n:p.splice(0,1),I(t,p,n)},d.negated=function(){var t=new x(this);return t.s=-t.s||null,t},d.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new x(t,e)).s,!i||!e)return new x(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/wn,s=t.e/wn,a=n.c,c=t.c;if(!o||!s){if(!a||!c)return new x(i/0);if(!a[0]||!c[0])return c[0]?t:new x(a[0]?n:0*i)}if(o=Mn(o),s=Mn(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=c):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(e=c.length)<0&&(r=c,c=a,a=r,e=i),i=0;e;)i=(a[--e]=a[e]+c[e]+i)/vn|0,a[e]=vn===a[e]?0:a[e]%vn;return i&&(a=[i].concat(a),++s),I(t,a,s)},d.precision=d.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return On(t,1,En),null==e?e=b:On(e,0,8),k(new x(o),t,e);if(!(r=o.c))return null;if(n=(i=r.length-1)*wn+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},d.shiftedBy=function(t){return On(t,-9007199254740991,_n),this.times("1e"+t)},d.squareRoot=d.sqrt=function(){var t,e,n,i,o,s=this,a=s.c,c=s.s,u=s.e,f=p+4,l=new x("0.5");if(1!==c||!a||!a[0])return new x(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+P(s)))||c==1/0?(((e=xn(a)).length+u)%2==0&&(e+="0"),c=Math.sqrt(+e),u=Mn((u+1)/2)-(u<0||u%2),n=new x(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):n=new x(c+""),n.c[0])for((c=(u=n.e)+f)<3&&(c=0);;)if(o=n,n=l.times(o.plus(r(s,o,f,1))),xn(o.c).slice(0,c)===(e=xn(n.c)).slice(0,c)){if(n.e<u&&--c,"9999"!=(e=e.slice(c-3,c+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(k(n,n.e+p+2,1),t=!n.times(n).eq(s));break}if(!i&&(k(o,o.e+p+2,0),o.times(o).eq(s))){n=o;break}f+=4,c+=4,i=1}return k(n,n.e+p+1,b,t)},d.toExponential=function(t,e){return null!=t&&(On(t,0,En),t++),R(this,t,e,1)},d.toFixed=function(t,e){return null!=t&&(On(t,0,En),t=t+this.e+1),R(this,t,e)},d.toFormat=function(t,e,r){var n,i=this;if(null==r)null!=t&&e&&"object"==typeof e?(r=e,e=null):t&&"object"==typeof t?(r=t,t=e=null):r=A;else if("object"!=typeof r)throw Error(yn+"Argument not an object: "+r);if(n=i.toFixed(t,e),i.c){var o,s=n.split("."),a=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",f=s[0],l=s[1],d=i.s<0,h=d?f.slice(1):f,p=h.length;if(c&&(o=a,a=c,c=o,p-=o),a>0&&p>0){for(o=p%a||a,f=h.substr(0,o);o<p;o+=a)f+=u+h.substr(o,a);c>0&&(f+=u+h.slice(o)),d&&(f="-"+f)}n=l?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):f}return(r.prefix||"")+n+(r.suffix||"")},d.toFraction=function(t){var e,n,i,o,s,a,c,u,f,l,d,p,g=this,y=g.c;if(null!=t&&(!(c=new x(t)).isInteger()&&(c.c||1!==c.s)||c.lt(h)))throw Error(yn+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+P(c));if(!y)return new x(g);for(e=new x(h),f=n=new x(h),i=u=new x(h),p=xn(y),s=e.e=p.length-g.e-1,e.c[0]=Sn[(a=s%wn)<0?wn+a:a],t=!t||c.comparedTo(e)>0?s>0?e:f:c,a=v,v=1/0,c=new x(p),u.c[0]=0;l=r(c,e,0,1),1!=(o=n.plus(l.times(i))).comparedTo(t);)n=i,i=o,f=u.plus(l.times(o=f)),u=o,e=c.minus(l.times(o=e)),c=o;return o=r(t.minus(n),i,0,1),u=u.plus(o.times(f)),n=n.plus(o.times(i)),u.s=f.s=g.s,d=r(f,i,s*=2,b).minus(g).abs().comparedTo(r(u,n,s,b).minus(g).abs())<1?[f,i]:[u,n],v=a,d},d.toNumber=function(){return+P(this)},d.toPrecision=function(t,e){return null!=t&&On(t,1,En),R(this,t,e,2)},d.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=g||o>=y?kn(xn(r.c),o):Pn(xn(r.c),o,"0"):10===t&&M?e=Pn(xn((r=k(new x(r),p+o+1,b)).c),r.e,"0"):(On(t,2,E.length,"Base"),e=n(Pn(xn(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},d.valueOf=d.toJSON=function(){return P(this)},d._isBigNumber=!0,d[Symbol.toStringTag]="BigNumber",d[Symbol.for("nodejs.util.inspect.custom")]=d.valueOf,null!=e&&x.set(e),x}();class Nn{ttl;map=new Map;_to=!1;constructor(t){this.ttl=t}has(t){return this.map.has(t)}add(t){this.map.set(t,Tn()),this._to||(this._to=!0,setTimeout((()=>{this._to=!1,function(t){const e=Tn()-t.ttl,r=t.map[Symbol.iterator]();for(;;){const n=r.next().value;if(!n)return;const i=n[0];if(!(n[1]<e))return;t.map.delete(i)}}(this)}),0))}clear(){this.map.clear()}}function Tn(){return Date.now()}const Bn=Object.create(null);Bn.open="0",Bn.close="1",Bn.ping="2",Bn.pong="3",Bn.message="4",Bn.upgrade="5",Bn.noop="6";const Cn=Object.create(null);Object.keys(Bn).forEach((t=>{Cn[Bn[t]]=t}));const jn={type:"error",data:"parser error"},Ln="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Fn="function"==typeof ArrayBuffer,Un=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Dn=({type:t,data:e},r,n)=>Ln&&e instanceof Blob?r?n(e):qn(e,n):Fn&&(e instanceof ArrayBuffer||Un(e))?r?n(e):qn(new Blob([e]),n):n(Bn[t]+(e||"")),qn=(t,e)=>{const r=new FileReader;return r.onload=function(){const t=r.result.split(",")[1];e("b"+(t||""))},r.readAsDataURL(t)};function zn(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let $n;const Wn="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)Wn["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t)]=t;const Hn="function"==typeof ArrayBuffer,Vn=(t,e)=>{if("string"!=typeof t)return{type:"message",data:Kn(t,e)};const r=t.charAt(0);return"b"===r?{type:"message",data:Gn(t.substring(1),e)}:Cn[r]?t.length>1?{type:Cn[r],data:t.substring(1)}:{type:Cn[r]}:jn},Gn=(t,e)=>{if(Hn){const r=(t=>{let e,r,n,i,o,s=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);const u=new ArrayBuffer(s),f=new Uint8Array(u);for(e=0;e<a;e+=4)r=Wn[t.charCodeAt(e)],n=Wn[t.charCodeAt(e+1)],i=Wn[t.charCodeAt(e+2)],o=Wn[t.charCodeAt(e+3)],f[c++]=r<<2|n>>4,f[c++]=(15&n)<<4|i>>2,f[c++]=(3&i)<<6|63&o;return u})(t);return Kn(r,e)}return{base64:!0,data:t}},Kn=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,Jn=String.fromCharCode(30);let Yn;function Zn(t){return t.reduce(((t,e)=>t+e.length),0)}function Xn(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let i=0;i<e;i++)r[i]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function Qn(t){if(t)return function(t){for(var e in Qn.prototype)t[e]=Qn.prototype[e];return t}(t)}Qn.prototype.on=Qn.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Qn.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},Qn.prototype.off=Qn.prototype.removeListener=Qn.prototype.removeAllListeners=Qn.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<n.length;i++)if((r=n[i])===e||r.fn===e){n.splice(i,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},Qn.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var i=(r=r.slice(0)).length;n<i;++n)r[n].apply(this,e)}return this},Qn.prototype.emitReserved=Qn.prototype.emit,Qn.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Qn.prototype.hasListeners=function(t){return!!this.listeners(t).length};const ti="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function ei(t,...e){return e.reduce(((e,r)=>(t.hasOwnProperty(r)&&(e[r]=t[r]),e)),{})}const ri=ti.setTimeout,ni=ti.clearTimeout;function ii(t,e){e.useNativeTimers?(t.setTimeoutFn=ri.bind(ti),t.clearTimeoutFn=ni.bind(ti)):(t.setTimeoutFn=ti.setTimeout.bind(ti),t.clearTimeoutFn=ti.clearTimeout.bind(ti))}class oi extends Error{constructor(t,e,r){super(t),this.description=e,this.context=r,this.type="TransportError"}}class si extends Qn{constructor(t){super(),this.writable=!1,ii(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,e,r){return super.emitReserved("error",new oi(t,e,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=Vn(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}(t);return e.length?"?"+e:""}}const ai="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ci=64,ui={};let fi,li=0,di=0;function hi(t){let e="";do{e=ai[t%ci]+e,t=Math.floor(t/ci)}while(t>0);return e}function pi(){const t=hi(+new Date);return t!==fi?(li=0,fi=t):t+"."+hi(li++)}for(;di<ci;di++)ui[ai[di]]=di;let bi=!1;try{bi="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const gi=bi;function yi(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||gi))return new XMLHttpRequest}catch(t){}if(!e)try{return new(ti[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}function mi(){}const vi=null!=new yi({xdomain:!1}).responseType;class wi extends Qn{constructor(t,e){super(),ii(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.data=void 0!==e.data?e.data:null,this.create()}create(){var t;const e=ei(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const r=this.xhr=new yi(e);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&r.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{r.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var t;3===r.readyState&&(null===(t=this.opts.cookieJar)||void 0===t||t.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=wi.requestsCount++,wi.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=mi,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete wi.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}function _i(){for(let t in wi.requests)wi.requests.hasOwnProperty(t)&&wi.requests[t].abort()}wi.requestsCount=0,wi.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",_i):"function"==typeof addEventListener&&addEventListener("onpagehide"in ti?"pagehide":"unload",_i,!1));const Si="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),Ai=ti.WebSocket||ti.MozWebSocket;r(1048).Buffer;const Ei="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),Mi={websocket:class extends si{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,r=Ei?{}:ei(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Ei?new Ai(t,e,r):e?new Ai(t,e):new Ai(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;Dn(r,this.supportsBinary,(t=>{try{this.ws.send(t)}catch(t){}n&&Si((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=pi()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}check(){return!!Ai}},webtransport:class extends si{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((t=>{this.onError("webtransport error",t)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((t=>{const e=function(t,e){Yn||(Yn=new TextDecoder);const r=[];let n=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(r.push(s);;){if(0===n){if(Zn(r)<1)break;const t=Xn(r,1);o=!(128&~t[0]),i=127&t[0],n=i<126?3:126===i?1:2}else if(1===n){if(Zn(r)<2)break;const t=Xn(r,2);i=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(Zn(r)<8)break;const t=Xn(r,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(jn);break}i=o*Math.pow(2,32)+e.getUint32(4),n=3}else{if(Zn(r)<i)break;const t=Xn(r,i);a.enqueue(Vn(o?t:Yn.decode(t),e)),n=0}if(0===i||i>t){a.enqueue(jn);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(e).getReader(),n=new TransformStream({transform(t,e){!function(t,e){Ln&&t.data instanceof Blob?t.data.arrayBuffer().then(zn).then(e):Fn&&(t.data instanceof ArrayBuffer||Un(t.data))?e(zn(t.data)):Dn(t,!1,(t=>{$n||($n=new TextEncoder),e($n.encode(t))}))}(t,(r=>{const n=r.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const t=new DataView(i.buffer);t.setUint8(0,126),t.setUint16(1,n)}else{i=new Uint8Array(9);const t=new DataView(i.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(n))}t.data&&"string"!=typeof t.data&&(i[0]|=128),e.enqueue(i),e.enqueue(r)}))}});n.readable.pipeTo(t.writable),this.writer=n.writable.getWriter();const i=()=>{r.read().then((({done:t,value:e})=>{t||(this.onPacket(e),i())})).catch((t=>{}))};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then((()=>this.onOpen()))}))})))}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;this.writer.write(r).then((()=>{n&&Si((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this.transport)||void 0===t||t.close()}},polling:class extends si{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let r=location.port;r||(r=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port}const e=t&&t.forceBase64;this.supportsBinary=vi&&!e,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(t++,this.once("pollComplete",(function(){--t||e()}))),this.writable||(t++,this.once("drain",(function(){--t||e()})))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const r=t.split(Jn),n=[];for(let t=0;t<r.length;t++){const i=Vn(r[t],e);if(n.push(i),"error"===i.type)break}return n})(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const r=t.length,n=new Array(r);let i=0;t.forEach(((t,o)=>{Dn(t,!1,(t=>{n[o]=t,++i===r&&e(n.join(Jn))}))}))})(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=pi()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new wi(this.uri(),t)}doWrite(t,e){const r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}},xi=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ri=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Oi(t){if(t.length>2e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");-1!=r&&-1!=n&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let i=xi.exec(t||""),o={},s=14;for(;s--;)o[Ri[s]]=i[s]||"";return-1!=r&&-1!=n&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(t,e){const r=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||r.splice(0,1),"/"==e.slice(-1)&&r.splice(r.length-1,1),r}(0,o.path),o.queryKey=function(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,n){e&&(r[e]=n)})),r}(0,o.query),o}class Ii extends Qn{constructor(t,e={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=Oi(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=Oi(e.host).host),ii(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},r=t.split("&");for(let t=0,n=r.length;t<n;t++){let n=r[t].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const r=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new Mi[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ii.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(t){let e=this.createTransport(t),r=!1;Ii.priorWebsocketSuccess=!1;const n=()=>{r||(e.send([{type:"ping",data:"probe"}]),e.once("packet",(t=>{if(!r)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Ii.priorWebsocketSuccess="websocket"===e.name,this.transport.pause((()=>{r||"closed"!==this.readyState&&(u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}})))};function i(){r||(r=!0,u(),e.close(),e=null)}const o=t=>{const r=new Error("probe error: "+t);r.transport=e.name,i(),this.emitReserved("upgradeError",r)};function s(){o("transport closed")}function a(){o("socket closed")}function c(t){e&&t.name!==e.name&&i()}const u=()=>{e.removeListener("open",n),e.removeListener("error",o),e.removeListener("close",s),this.off("close",a),this.off("upgrading",c)};e.once("open",n),e.once("error",o),e.once("close",s),this.once("close",a),this.once("upgrading",c),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{r||e.open()}),200):e.open()}onOpen(){if(this.readyState="open",Ii.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r<this.writeBuffer.length;r++){const n=this.writeBuffer[r].data;if(n&&(t+="string"==typeof(e=n)?function(t){let e=0,r=0;for(let n=0,i=t.length;n<i;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}(e):Math.ceil(1.33*(e.byteLength||e.size))),r>0&&t>this.maxPayload)return this.writeBuffer.slice(0,r);t+=2}var e;return this.writeBuffer}write(t,e,r){return this.sendPacket("message",t,e,r),this}send(t,e,r){return this.sendPacket("message",t,e,r),this}sendPacket(t,e,r,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const i={type:t,data:e,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),n&&this.once("flush",n),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?r():t()})):this.upgrading?r():t()),this}onError(t){Ii.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let r=0;const n=t.length;for(;r<n;r++)~this.transports.indexOf(t[r])&&e.push(t[r]);return e}}Ii.protocol=4,Ii.protocol;const ki="function"==typeof ArrayBuffer,Pi=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Ni=Object.prototype.toString,Ti="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Ni.call(Blob),Bi="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Ni.call(File);function Ci(t){return ki&&(t instanceof ArrayBuffer||Pi(t))||Ti&&t instanceof Blob||Bi&&t instanceof File}function ji(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,r=t.length;e<r;e++)if(ji(t[e]))return!0;return!1}if(Ci(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return ji(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&ji(t[e]))return!0;return!1}function Li(t){const e=[],r=t.data,n=t;return n.data=Fi(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Fi(t,e){if(!t)return t;if(Ci(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=Fi(t[n],e);return r}if("object"==typeof t&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=Fi(t[n],e));return r}return t}function Ui(t,e){return t.data=Di(t.data,e),delete t.attachments,t}function Di(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=Di(t[r],e);else if("object"==typeof t)for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Di(t[r],e));return t}const qi=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],zi=5;var $i;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}($i||($i={}));class Wi{constructor(t){this.replacer=t}encode(t){return t.type!==$i.EVENT&&t.type!==$i.ACK||!ji(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===$i.EVENT?$i.BINARY_EVENT:$i.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==$i.BINARY_EVENT&&t.type!==$i.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=Li(t),r=this.encodeAsString(e.packet),n=e.buffers;return n.unshift(r),n}}function Hi(t){return"[object Object]"===Object.prototype.toString.call(t)}class Vi extends Qn{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const r=e.type===$i.BINARY_EVENT;r||e.type===$i.BINARY_ACK?(e.type=r?$i.EVENT:$i.ACK,this.reconstructor=new Gi(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!Ci(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const r={type:Number(t.charAt(0))};if(void 0===$i[r.type])throw new Error("unknown packet type "+r.type);if(r.type===$i.BINARY_EVENT||r.type===$i.BINARY_ACK){const n=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const i=t.substring(n,e);if(i!=Number(i)||"-"!==t.charAt(e))throw new Error("Illegal attachments");r.attachments=Number(i)}if("/"===t.charAt(e+1)){const n=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);r.nsp=t.substring(n,e)}else r.nsp="/";const n=t.charAt(e+1);if(""!==n&&Number(n)==n){const n=e+1;for(;++e;){const r=t.charAt(e);if(null==r||Number(r)!=r){--e;break}if(e===t.length)break}r.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){const n=this.tryParse(t.substr(e));if(!Vi.isPayloadValid(r.type,n))throw new Error("invalid payload");r.data=n}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case $i.CONNECT:return Hi(e);case $i.DISCONNECT:return void 0===e;case $i.CONNECT_ERROR:return"string"==typeof e||Hi(e);case $i.EVENT:case $i.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===qi.indexOf(e[0]));case $i.ACK:case $i.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Gi{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=Ui(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Ki(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const Ji=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Yi extends Qn{constructor(t,e,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Ki(t,"open",this.onopen.bind(this)),Ki(t,"packet",this.onpacket.bind(this)),Ki(t,"error",this.onerror.bind(this)),Ki(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(Ji.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const r={type:$i.EVENT,data:e,options:{}};if(r.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++,n=e.pop();this._registerAckCallback(t,n),r.id=t}const n=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!n||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,e){var r;const n=null!==(r=this.flags.timeout)&&void 0!==r?r:this._opts.ackTimeout;if(void 0===n)return void(this.acks[t]=e);const i=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))}),n),o=(...t)=>{this.io.clearTimeoutFn(i),e.apply(this,t)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...e){return new Promise(((r,n)=>{const i=(t,e)=>t?n(t):r(e);i.withError=!0,e.push(i),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...n)=>{if(r===this._queue[0])return null!==t?r.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...n)),r.pending=!1,this._drainQueue()})),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:$i.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((t=>{if(!this.sendBuffer.some((e=>String(e.id)===t))){const e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}}))}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case $i.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case $i.EVENT:case $i.BINARY_EVENT:this.onevent(t);break;case $i.ACK:case $i.BINARY_ACK:this.onack(t);break;case $i.DISCONNECT:this.ondisconnect();break;case $i.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const r of e)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let r=!1;return function(...n){r||(r=!0,e.packet({type:$i.ACK,id:t,data:n}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:$i.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let r=0;r<e.length;r++)if(t===e[r])return e.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let r=0;r<e.length;r++)if(t===e[r])return e.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const r of e)r.apply(this,t.data)}}}function Zi(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Zi.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+r:t-r}return 0|Math.min(t,this.max)},Zi.prototype.reset=function(){this.attempts=0},Zi.prototype.setMin=function(t){this.ms=t},Zi.prototype.setMax=function(t){this.max=t},Zi.prototype.setJitter=function(t){this.jitter=t};class Xi extends Qn{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(r=t,t=void 0),(r=r||{}).path=r.path||"/socket.io",this.opts=r,ii(this,r),this.reconnection(!1!==r.reconnection),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=r.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new Zi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==r.timeout?2e4:r.timeout),this._readyState="closed",this.uri=t;const i=r.parser||e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=!1!==r.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Ii(this.uri,this.opts);const e=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const n=Ki(e,"open",(function(){r.onopen(),t&&t()})),i=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},o=Ki(e,"error",i);if(!1!==this._timeout){const t=this._timeout,r=this.setTimeoutFn((()=>{n(),i(new Error("timeout")),e.close()}),t);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}return this.subs.push(n),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ki(t,"ping",this.onping.bind(this)),Ki(t,"data",this.ondata.bind(this)),Ki(t,"error",this.onerror.bind(this)),Ki(t,"close",this.onclose.bind(this)),Ki(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){Si((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Yi(this,t,e),this.nsps[t]=r),r}_destroy(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return;this._close()}_packet(t){const e=this.encoder.encode(t);for(let r=0;r<e.length;r++)this.engine.write(e[r],t.options)}cleanup(){this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn((()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()})))}),e);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Qi={};function to(t,e){"object"==typeof t&&(e=t,t=void 0);const r=function(t,e="",r){let n=t;r=r||"undefined"!=typeof location&&location,null==t&&(t=r.protocol+"//"+r.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?r.protocol+t:r.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==r?r.protocol+"//"+t:"https://"+t),n=Oi(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+e,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}(t,(e=e||{}).path||"/socket.io"),n=r.source,i=r.id,o=r.path,s=Qi[i]&&o in Qi[i].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||s?a=new Xi(n,e):(Qi[i]||(Qi[i]=new Xi(n,e)),a=Qi[i]),r.query&&!e.query&&(e.query=r.queryKey),a.socket(r.path,e)}Object.assign(to,{Manager:Xi,Socket:Yi,io:to,connect:to});var eo=r(2671),ro=r.n(eo),no=r(3360),io=r(1048).Buffer;const oo=new no.ec("secp256k1"),so=r.g.crypto||r.g.msCrypto||{},ao=so.subtle||so.webkitSubtle,co=io.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),uo=io.alloc(32,0);function fo(t,e){if(!t)throw new Error(e||"Assertion failed")}function lo(t){return e=t,!(!io.isBuffer(e)||32!==e.length)&&t.compare(uo)>0&&t.compare(co)<0;var e}function ho(t){const e=new Uint8Array(t);return void 0===so.getRandomValues?io.from(ro().randomBytes(t)):(so.getRandomValues(e),io.from(e))}async function po(t){if(ao){const e=await ao.digest("SHA-512",t);return new Uint8Array(e)}const e=ro().createHash("sha512").update(t).digest();return new Uint8Array(e)}function bo(t){return async function(e,r,n){if(ao){const i={name:"AES-CBC"},o=await ao.importKey("raw",r,i,!1,[t]),s={name:"AES-CBC",iv:e},a=await ao[t](s,o,n);return io.from(new Uint8Array(a))}if("encrypt"===t){const t=ro().createCipheriv("aes-256-cbc",r,e),i=t.update(n),o=t.final();return io.concat([i,o])}if("decrypt"===t){const t=ro().createDecipheriv("aes-256-cbc",r,e),i=t.update(n),o=t.final();return io.concat([i,o])}throw new Error(`Unsupported operation: ${t}`)}}const go=bo("encrypt"),yo=bo("decrypt");async function mo(t,e){if(ao){const r={name:"HMAC",hash:{name:"SHA-256"}},n=await ao.importKey("raw",new Uint8Array(t),r,!1,["sign","verify"]),i=await ao.sign("HMAC",n,e);return io.from(new Uint8Array(i))}const r=ro().createHmac("sha256",io.from(t));return r.update(e),r.digest()}const vo=function(t){return fo(32===t.length,"Bad private key"),fo(lo(t),"Bad private key"),io.from(oo.keyFromPrivate(t).getPublic("array"))},wo=async function(t,e){return fo(32===t.length,"Bad private key"),fo(lo(t),"Bad private key"),fo(e.length>0,"Message should not be empty"),fo(e.length<=32,"Message is too long"),io.from(oo.sign(e,t,{canonical:!0}).toDER())},_o=async function(t,e){fo(io.isBuffer(t),"Bad private key"),fo(io.isBuffer(e),"Bad public key"),fo(32===t.length,"Bad private key"),fo(lo(t),"Bad private key"),fo(65===e.length||33===e.length,"Bad public key"),65===e.length&&fo(4===e[0],"Bad public key"),33===e.length&&fo(2===e[0]||3===e[0],"Bad public key");const r=oo.keyFromPrivate(t),n=oo.keyFromPublic(e),i=r.derive(n.getPublic());return io.from(i.toArray())},So=async function(t,e){fo(io.isBuffer(t),"Bad private key"),fo(io.isBuffer(e),"Bad public key"),fo(32===t.length,"Bad private key"),fo(lo(t),"Bad private key"),fo(65===e.length||33===e.length,"Bad public key"),65===e.length&&fo(4===e[0],"Bad public key"),33===e.length&&fo(2===e[0]||3===e[0],"Bad public key");const r=oo.keyFromPrivate(t),n=oo.keyFromPublic(e),i=r.derive(n.getPublic());return io.from(i.toString(16,64),"hex")},Ao=async function(t,e,r){const n=null!=r&&r,i=n?So:_o,o=await i(t,e.ephemPublicKey),s=await po(o),a=s.slice(0,32),c=s.slice(32),u=io.concat([e.iv,e.ephemPublicKey,e.ciphertext]),f=await async function(t,e,r){return function(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r}(await mo(t,e),r)}(io.from(c),u,e.mac);if(!f&&!1===n)return Ao(t,e,!0);if(!f&&!0===n)throw new Error("bad MAC after trying padded");const l=await yo(e.iv,io.from(a),e.ciphertext);return io.from(new Uint8Array(l))};r(5172);var Eo=r(1048).Buffer;function Mo(t){return Eo.from(un(t))}const xo=new no.ec("secp256k1");async function Ro(t,e){const r=JSON.stringify(e),n=Eo.from(r,"utf-8"),i=(o=await async function(t,e,r){let n=(r=r||{}).ephemPrivateKey||ho(32);for(;!lo(n);)n=r.ephemPrivateKey||ho(32);const i=vo(n),o=await _o(n,t),s=await po(o),a=r.iv||ho(16),c=s.slice(0,32),u=s.slice(32),f=await go(a,io.from(c),e),l=io.concat([a,i,f]);return{iv:a,ephemPublicKey:i,ciphertext:f,mac:await mo(io.from(u),l)}}(vo(Eo.from(t,"hex")),n),{iv:Eo.from(o.iv).toString("hex"),ephemPublicKey:Eo.from(o.ephemPublicKey).toString("hex"),ciphertext:Eo.from(o.ciphertext).toString("hex"),mac:Eo.from(o.mac).toString("hex")});var o;return JSON.stringify(i)}async function Oo(t,e){const r=(o=JSON.parse(e),{iv:Eo.from(o.iv,"hex"),ephemPublicKey:Eo.from(o.ephemPublicKey,"hex"),ciphertext:Eo.from(o.ciphertext,"hex"),mac:Eo.from(o.mac,"hex")}),n=xo.keyFromPrivate(t),i=(await Ao(Eo.from(n.getPrivate().toString("hex",64),"hex"),r)).toString("utf-8");var o;return JSON.parse(i)}var Io=r(1048).Buffer;Promise.resolve(!1),Promise.resolve(!0);const ko=Promise.resolve();function Po(t,e){return t||(t=0),new Promise((r=>setTimeout((()=>r(e)),t)))}function No(){return Math.random().toString(36).substring(2)}let To=0;function Bo(){let t=1e3*Date.now();return t<=To&&(t=To+1),To=t,t}const Co=$t().getLogger("broadcast-channel");Co.setLevel("error");var jo={create:function(t){const e={time:Bo(),messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=t=>{e.messagesCallback&&e.messagesCallback(t.data)},e},close:function(t){t.bc.close(),t.subFns=[]},onMessage:function(t,e){t.messagesCallback=e},postMessage:function(t,e){try{return t.bc.postMessage(e,!1),ko}catch(t){return Promise.reject(t)}},canBeUsed:function(){if("undefined"==typeof window)return!1;if("function"==typeof BroadcastChannel){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}return!1},type:"native",averageResponseTime:function(){return 150},microSeconds:Bo};function Lo(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=JSON.parse(JSON.stringify(t));return void 0===e.webWorkerSupport&&(e.webWorkerSupport=!0),e.idb||(e.idb={}),e.idb.ttl||(e.idb.ttl=45e3),e.idb.fallbackInterval||(e.idb.fallbackInterval=150),t.idb&&"function"==typeof t.idb.onclose&&(e.idb.onclose=t.idb.onclose),e.localstorage||(e.localstorage={}),e.localstorage.removeTimeout||(e.localstorage.removeTimeout=6e4),e.server||(e.server={}),e.server.url||(e.server.url="https://session.web3auth.io"),e.server.removeTimeout||(e.server.removeTimeout=3e5),t.methods&&(e.methods=t.methods),e}const Fo="messages",Uo={durability:"relaxed"};function Do(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function qo(t){t.commit&&t.commit()}function zo(t){const e="pubkey.broadcast-channel-0-"+t,r=Do().open(e);return r.onupgradeneeded=t=>{t.target.result.createObjectStore(Fo,{keyPath:"id",autoIncrement:!0})},new Promise(((t,e)=>{r.onerror=t=>e(t),r.onsuccess=()=>{t(r.result)}}))}function $o(t,e,r){const n={uuid:e,time:Date.now(),data:r},i=t.transaction([Fo],"readwrite",Uo);return new Promise(((t,e)=>{i.oncomplete=()=>t(),i.onerror=t=>e(t),i.objectStore(Fo).add(n),qo(i)}))}function Wo(t,e){const r=t.transaction(Fo,"readonly",Uo),n=r.objectStore(Fo),i=[];let o=IDBKeyRange.bound(e+1,1/0);if(n.getAll){const t=n.getAll(o);return new Promise(((e,r)=>{t.onerror=t=>r(t),t.onsuccess=function(t){e(t.target.result)}}))}return new Promise(((t,s)=>{const a=function(){try{return o=IDBKeyRange.bound(e+1,1/0),n.openCursor(o)}catch(t){return n.openCursor()}}();a.onerror=t=>s(t),a.onsuccess=n=>{const o=n.target.result;o?o.value.id<e+1?o.continue(e+1):(i.push(o.value),o.continue()):(qo(r),t(i))}}))}function Ho(t,e){const r=Date.now()-e,n=t.transaction(Fo,"readonly",Uo),i=n.objectStore(Fo),o=[];return new Promise((t=>{i.openCursor().onsuccess=e=>{const i=e.target.result;if(i){const e=i.value;if(!(e.time<r))return qo(n),void t(o);o.push(e),i.continue()}else t(o)}}))}function Vo(t,e){return Ho(t,e).then((e=>function(t,e){const r=t.transaction([Fo],"readwrite",Uo).objectStore(Fo);return Promise.all(e.map((t=>{const e=r.delete(t);return new Promise((t=>{e.onsuccess=()=>t()}))})))}(t,e.map((t=>t.id)))))}function Go(t){t.closed||Ko(t).then((()=>Po(t.options.idb.fallbackInterval))).then((()=>Go(t)))}function Ko(t){return t.closed?ko:t.messagesCallback?Wo(t.db,t.lastCursorId).then((e=>{const r=e.filter((t=>!!t)).map((e=>(e.id>t.lastCursorId&&(t.lastCursorId=e.id),e))).filter((e=>function(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}(e,t))).sort(((t,e)=>t.time-e.time));return r.forEach((e=>{t.messagesCallback&&(t.eMIs.add(e.id),t.messagesCallback(e.data))})),ko})):ko}var Jo={getIdb:Do,createDatabase:zo,create:function(t,e){return e=Lo(e),zo(t).then((r=>{const n={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:No(),eMIs:new Nn(2*e.idb.ttl),writeBlockPromise:ko,messagesCallback:null,readQueuePromises:[],db:r,time:Bo()};return r.onclose=function(){n.closed=!0,e.idb.onclose&&e.idb.onclose()},Go(n),n}))},close:function(t){t.closed=!0,t.db.close()},onMessage:function(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e,Ko(t)},postMessage:function(t,e){return t.writeBlockPromise=t.writeBlockPromise.then((()=>$o(t.db,t.uuid,e))).then((()=>{0===Math.floor(11*Math.random()+0)&&Vo(t.db,t.options.idb.ttl)})),t.writeBlockPromise},canBeUsed:function(){return!!Do()},type:"idb",averageResponseTime:function(t){return 2*t.idb.fallbackInterval},microSeconds:Bo,writeMessage:$o,getAllMessages:function(t){const e=t.transaction(Fo,"readonly",Uo),r=e.objectStore(Fo),n=[];return new Promise((t=>{r.openCursor().onsuccess=r=>{const i=r.target.result;i?(n.push(i.value),i.continue()):(qo(e),t(n))}}))},cleanOldMessages:Vo,getMessagesHigherThan:Wo,getOldMessages:Ho};const Yo="pubkey.broadcastChannel-";function Zo(){let t;if("undefined"==typeof window)return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch(t){}return t}function Xo(t){return Yo+t}function Qo(t,e){const r=Xo(t),n=t=>{t.key===r&&e(JSON.parse(t.newValue))};return window.addEventListener("storage",n),n}function ts(t){window.removeEventListener("storage",t)}function es(){const t=Zo();if(!t)return!1;try{const e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch(t){return!1}return!0}var rs={getLocalStorage:Zo,create:function(t,e){if(e=Lo(e),!es())throw new Error("BroadcastChannel: localstorage cannot be used");const r=No(),n=new Nn(e.localstorage.removeTimeout),i={channelName:t,uuid:r,time:Bo(),eMIs:n};return i.listener=Qo(t,(t=>{i.messagesCallback&&t.uuid!==r&&t.token&&!n.has(t.token)&&(t.data.time&&t.data.time<i.messagesCallbackTime||(n.add(t.token),i.messagesCallback(t.data)))})),i},close:function(t){ts(t.listener)},onMessage:function(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e},postMessage:function(t,e){return new Promise((r=>{Po().then((()=>{const n=Xo(t.channelName),i={token:No(),time:Date.now(),data:e,uuid:t.uuid},o=JSON.stringify(i);Zo().setItem(n,o);const s=document.createEvent("Event");s.initEvent("storage",!0,!0),s.key=n,s.newValue=o,window.dispatchEvent(s),r()}))}))},canBeUsed:es,type:"localstorage",averageResponseTime:function(){const t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?240:120},microSeconds:Bo,storageKey:Xo,addStorageEventListener:Qo,removeStorageEventListener:ts};const ns=Bo,is="pubkey.broadcastChannel-";let os=null;const ss=new Set;function as(t){return is+t}var cs={create:function(t,e){e=Lo(e);const r={channelName:t,uuid:No(),eMIs:new Nn(e.server.removeTimeout),serverUrl:e.server.url,time:Bo()};return e.server.timeout&&(r.timeout=e.server.timeout),function(t,e,r){const n=function(t){if(os)return os;const e=to(t,{transports:["websocket","polling"],withCredentials:!0,reconnectionDelayMax:1e4,reconnectionAttempts:10});return e.on("connect_error",(t=>{e.io.opts.transports=["polling","websocket"],Co.error("connect error",t)})),e.on("connect",(async()=>{const{engine:t}=e.io;Co.debug("initially connected to",t.transport.name),t.once("upgrade",(()=>{Co.debug("upgraded",t.transport.name)})),t.once("close",(t=>{Co.debug("connection closed",t)}))})),e.on("error",(t=>{Co.error("socket errored",t),e.disconnect()})),os=e,e}(t),i=as(e.channelName),o=Mo(Io.from(i,"utf8")),s=vo(o).toString("hex");n.connected?n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0}):n.once("connect",(()=>{Co.debug("connected with socket"),n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0})}));const a=()=>{n.once("connect",(async()=>{ss.has(e.channelName)&&n.emit("check_auth_status",s,{sameOriginCheck:!0,sameIpCheck:!0})}))},c=()=>{n&&ss.has(e.channelName)?n.connected||"visible"!==document.visibilityState||a():document.removeEventListener("visibilitychange",c)};n.on("disconnect",(()=>{Co.debug("socket disconnected"),ss.has(e.channelName)&&(Co.error("socket disconnected unexpectedly, reconnecting socket"),a())})),n.on(`${s}_success`,(async t=>{try{const e=await Oo(o.toString("hex"),t);Co.info(e),r(e)}catch(t){Co.error(t)}})),"undefined"!=typeof document&&document.addEventListener("visibilitychange",c)}(e.server.url,r,(t=>{r.messagesCallback&&t.uuid!==r.uuid&&t.token&&!r.eMIs.has(t.token)&&(r.eMIs.add(t.token),r.messagesCallback(t.data))})),ss.add(t),r},close:function(t){ss.delete(t.channelName)},onMessage:function(t,e,r){t.messagesCallbackTime=r,t.messagesCallback=e},postMessage:function(t,e){return new Promise(((r,n)=>{Po().then((async()=>{const i=as(t.channelName),o=Mo(Io.from(i,"utf8")),s=await Ro(o.toString("hex"),{token:No(),time:Date.now(),data:e,uuid:t.uuid}),a={sameOriginCheck:!0,sameIpCheck:!0,key:vo(o).toString("hex"),data:s,signature:(await wo(o,Mo(Io.from(s,"utf8")))).toString("hex")};return t.timeout&&(a.timeout=t.timeout),fetch(t.serverUrl+"/channel/set",{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json; charset=utf-8"}}).then(r).catch(n)}))}))},canBeUsed:function(){return!0},type:"server",averageResponseTime:function(){return 500},microSeconds:ns};const us=Bo,fs=new Set;var ls={create:function(t){const e={time:Bo(),name:t,messagesCallback:null};return fs.add(e),e},close:function(t){fs.delete(t)},onMessage:function(t,e){t.messagesCallback=e},postMessage:function(t,e){return new Promise((r=>setTimeout((()=>{Array.from(fs).forEach((r=>{r.name===t.name&&r!==t&&r.messagesCallback&&r.time<e.time&&r.messagesCallback(e)})),r()}),5)))},canBeUsed:function(){return!0},type:"simulate",averageResponseTime:function(){return 5},microSeconds:us};const ds=[jo,Jo,rs,cs],hs=new Set;let ps=0;const bs=function(t,e){this.id=ps++,hs.add(this),this.name=t,this.options=Lo(e),this.method=function(t){let e=[].concat(t.methods,ds).filter(Boolean);if(t.type){if("simulate"===t.type)return ls;const r=e.find((e=>e.type===t.type));if(r)return r;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter((t=>"idb"!==t.type)));const r=e.find((e=>e.canBeUsed(t)));if(r)return r;throw new Error(`No useable method found in ${JSON.stringify(ds.map((t=>t.type)))}`)}(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,function(t){const e=t.method.create(t.name,t.options);var r;(r=e)&&"function"==typeof r.then?(t._prepP=e,e.then((e=>{t._state=e}))):t._state=e}(this)};function gs(t,e,r){const n={time:t.method.microSeconds(),type:e,data:r};return(t._prepP?t._prepP:ko).then((()=>{const e=t.method.postMessage(t._state,n);return t._uMP.add(e),e.catch().then((()=>t._uMP.delete(e))),e}))}function ys(t){return t._addEL.message.length>0||t._addEL.internal.length>0}function ms(t,e,r){t._addEL[e].push(r),function(t){if(!t._iL&&ys(t)){const e=e=>{t._addEL[e.type].forEach((r=>{(e.time>=r.time||"server"===t.method.type)&&r.fn(e.data)}))},r=t.method.microSeconds();t._prepP?t._prepP.then((()=>{t._iL=!0,t.method.onMessage(t._state,e,r)})):(t._iL=!0,t.method.onMessage(t._state,e,r))}}(t)}function vs(t,e,r){t._addEL[e]=t._addEL[e].filter((t=>t!==r)),function(t){if(t._iL&&!ys(t)){t._iL=!1;const e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}(t)}bs._pubkey=!0,bs.prototype={postMessage(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return gs(this,"message",t)},postInternal(t){return gs(this,"internal",t)},set onmessage(t){const e={time:this.method.microSeconds(),fn:t};vs(this,"message",this._onML),t&&"function"==typeof t?(this._onML=e,ms(this,"message",e)):this._onML=null},addEventListener(t,e){ms(this,t,{time:this.method.microSeconds(),fn:e})},removeEventListener(t,e){vs(this,t,this._addEL[t].find((t=>t.fn===e)))},close(){if(this.closed)return;hs.delete(this),this.closed=!0;const t=this._prepP?this._prepP:ko;return this._onML=null,this._addEL.message=[],t.then((()=>Promise.all(Array.from(this._uMP)))).then((()=>Promise.all(this._befC.map((t=>t()))))).then((()=>this.method.close(this._state)))},get type(){return this.method.type},get isClosed(){return this.closed}},r(3643),r(5250),r(1048).Buffer;class ws extends _t{constructor(t){let{config:e={},state:r={}}=t;super(),o(this,"defaultConfig",{}),o(this,"defaultState",{}),o(this,"disabled",!1),o(this,"name","BaseController"),o(this,"initialConfig",void 0),o(this,"initialState",void 0),o(this,"internalConfig",this.defaultConfig),o(this,"internalState",this.defaultState),this.initialState=r,this.initialConfig=e}get config(){return this.internalConfig}get state(){return this.internalState}configure(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(arguments.length>2&&void 0!==arguments[2]&&!arguments[2])for(const e in t)void 0!==this.internalConfig[e]&&(this.internalConfig[e]=t[e],this[e]=t[e]);else{this.internalConfig=e?t:Object.assign(this.internalConfig,t);for(const t in this.internalConfig)void 0!==this.internalConfig[t]&&(this[t]=this.internalConfig[t])}}update(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.internalState=a(e?{}:a({},this.internalState),t),this.emit("store",this.internalState)}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}}const _s=()=>!0,Ss=["newListener","removeListener"],As=t=>!Ss.includes(t);function Es(t,e){let r=(e||{}).eventFilter||_s;if("string"==typeof r&&"skipInternal"===r&&(r=As),"function"!=typeof r)throw new Error("createEventEmitterProxy - Invalid eventFilter");let n=t,i=t=>{const e=n;n=t,e.eventNames().filter(r).forEach((r=>{(function(t,e){return void 0!==t.rawListeners?t.rawListeners(e):t.listeners(e)})(e,r).forEach((e=>t.on(r,e)))})),e.removeAllListeners()};const o=new Proxy({},{get:(t,e)=>"setTarget"===e?i:n[e],set:(t,e,r)=>"setTarget"===e?(i=r,!0):(n[e]=r,!0)});return o}Error;const Ms=["Gateway timeout","ETIMEDOUT","failed to parse response body","Failed to fetch"];function xs(t){switch(t.status){case 405:throw mt.methodNotFound();case 418:throw mt.internal({message:"Request is being rate limited.",data:{cause:t}});case 503:case 504:throw mt.internal({message:"Gateway timeout. The request took too long to process.This can happen when querying over too wide a block range."})}}function Rs(t){return new Promise((e=>{setTimeout(e,t)}))}function Os(t,e){if(200!==t.status)throw mt.internal({message:`Non-200 status code: '${t.status}'`,data:e});if(e.error)throw mt.internal({data:e.error});return e.result}var Is,ks,Ps=r(6512),Ns=r.n(Ps);class Ts extends ws{constructor(t){let{config:e,state:r}=t;if(super({config:e,state:r}),o(this,"_providerEngineProxy",null),!e.chainConfig)throw Zt.invalidProviderConfigError("Please provide chainConfig");if(!e.chainConfig.chainId)throw Zt.invalidProviderConfigError("Please provide chainId inside chainConfig");if(!e.chainConfig.rpcTarget)throw Zt.invalidProviderConfigError("Please provide rpcTarget inside chainConfig");this.defaultState={chainId:"loading"},this.defaultConfig={chainConfig:e.chainConfig,networks:{[e.chainConfig.chainId]:e.chainConfig}},super.initialize()}get currentChainConfig(){return this.config.chainConfig}get provider(){return this._providerEngineProxy}get chainId(){return this.state.chainId}set provider(t){throw new Error("Method not implemented.")}async request(t){var e;if(!t||"object"!=typeof t||Array.isArray(t))throw mt.invalidRequest({message:te.invalidRequestArgs().message,data:a(a({},t||{}),{},{cause:te.invalidRequestArgs().message})});const{method:r,params:n}=t;if("string"!=typeof r||0===r.length)throw mt.invalidRequest({message:te.invalidRequestMethod().message,data:a(a({},t||{}),{},{cause:te.invalidRequestMethod().message})});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw mt.invalidRequest({message:te.invalidRequestParams().message,data:a(a({},t||{}),{},{cause:te.invalidRequestParams().message})});return null===(e=this.provider)||void 0===e?void 0:e.request(t)}sendAsync(t,e){return e?this.send(t,e):this.request(t)}send(t,e){this.request(t).then((t=>e(null,{result:t}))).catch((t=>e(t,null)))}addChain(t){if(!t.chainId)throw mt.invalidParams("chainId is required");if(!t.rpcTarget)throw mt.invalidParams("chainId is required");this.configure({networks:a(a({},this.config.networks),{},{[t.chainId]:t})})}getChainConfig(t){var e;const r=null===(e=this.config.networks)||void 0===e?void 0:e[t];if(!r)throw mt.invalidRequest(`Chain ${t} is not supported, please add chainConfig for it`);return r}updateProviderEngineProxy(t){this._providerEngineProxy?this._providerEngineProxy.setTarget(t):this._providerEngineProxy=Es(t)}getProviderEngineProxy(){return this._providerEngineProxy}}function Bs(t){return(e,r,n,i)=>"chainId"===e.method?(r.result=t,i()):n()}function Cs(t){return(e,r,n,i)=>"provider_config"===e.method?(r.result=t,i()):n()}class js extends Ts{constructor(t){let{config:e,state:r}=t;super({config:e,state:r})}async setupProvider(){const{networkMiddleware:t}=function(t){const{chainId:e,rpcTarget:r}=t,n=function(t){let{rpcTarget:e,originHttpHeaderKey:r}=t;return At((async(t,n,i)=>{const{fetchUrl:o,fetchParams:s}=function(t){let{req:e,rpcTarget:r,originHttpHeaderKey:n}=t;const i=new URL(r),o={id:e.id,jsonrpc:e.jsonrpc,method:e.method,params:e.params},s=e.origin,a={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)};return n&&s&&(a.headers[n]=s),{fetchUrl:i.href,fetchParams:a}}({req:t,rpcTarget:e,originHttpHeaderKey:r});for(let t=0;t<5;t++){try{const t=await fetch(o,s);xs(t);const e=await t.json(),r=Os(t,e);return void(n.result=r)}catch(t){const e=(t.message||t).toString();if(!Ms.some((t=>e.includes(t))))throw t}await Rs(1e3)}}))}({rpcTarget:r});return{networkMiddleware:Mt([Bs(e),Cs(t),n]),fetchMiddleware:n}}(this.config.chainConfig),e=new Et;e.push(t);const r=xt(e);this.updateProviderEngineProxy(r);const n=this.config.chainConfig.chainId;this.state.chainId!==n&&(this.emit("chainChanged",n),this.emit("connect",{chainId:n})),this.update({chainId:this.config.chainConfig.chainId})}async switchChain(t){if(!this._providerEngineProxy)throw(t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new gt(e,r,n)})({message:"Provider is not initialized",code:4902});const e=this.getChainConfig(t.chainId);this.update({chainId:"loading"}),this.configure({chainConfig:e}),await this.setupProvider()}updateProviderEngineProxy(t){this._providerEngineProxy?this._providerEngineProxy.setTarget(t):this._providerEngineProxy=Es(t)}getProviderEngineProxy(){return this._providerEngineProxy}lookupNetwork(){throw new Error("Method not implemented.")}}Is=js,o(js,"getProviderInstance",(async t=>{const e=new Is({config:{chainConfig:t.chainConfig}});return await e.setupProvider(),e}));class Ls extends Ts{constructor(t){let{config:e,state:r}=t;super({config:e,state:r}),o(this,"_providerEngineProxy",null)}get provider(){return this._providerEngineProxy}set provider(t){throw new Error("Method not implemented.")}addChain(t){throw new Error("Method not implemented.")}async setupProvider(t){const e=this.getPrivKeyMiddleware(t),r=new Et;r.push(e);const n=xt(r);this.updateProviderEngineProxy(n)}updateProviderEngineProxy(t){this._providerEngineProxy?this._providerEngineProxy.setTarget(t):this._providerEngineProxy=Es(t)}async switchChain(t){return Promise.resolve()}getProviderEngineProxy(){return this._providerEngineProxy}async lookupNetwork(){return Promise.resolve("")}getPrivKeyMiddleware(t){const e={getPrivatekey:async()=>t};return this.createPrivKeyMiddleware(e)}createPrivKeyMiddleware(t){let{getPrivatekey:e}=t;return r={private_key:At((async function(t,r){r.result=await e()}))},(t,e,n,i)=>{const o=r[t.method];return void 0===o?n():"function"==typeof o?o(t,e,n,i):(e.result=o,i())};var r}}ks=Ls,o(Ls,"getProviderInstance",(async t=>{const e=new ks({config:{chainConfig:t.chainConfig}});return await e.setupProvider(t.privKey),e})),Ns()(),r(1048).Buffer,r(1048).Buffer,$t().getLogger("SecurePubSub"),r(1048).Buffer;class Fs extends Ft{constructor(t,e){super(e),o(this,"code",void 0),o(this,"message",void 0),this.code=t,this.message=e||"",Object.defineProperty(this,"name",{value:"OpenloginError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class Us extends Fs{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"InitializationError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Us(t,`${Us.messages[t]}, ${e}`)}static invalidParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Us.fromCode(5001,t)}static notInitialized(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Us.fromCode(5002,t)}}o(Us,"messages",{5e3:"Custom",5001:"Invalid constructor params",5002:"SDK not initialized. please call init first"});class Ds extends Fs{constructor(t,e){super(t,e),Object.defineProperty(this,"name",{value:"LoginError"})}static fromCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Ds(t,`${Ds.messages[t]}, ${e}`)}static invalidLoginParams(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5111,t)}static userNotLoggedIn(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5112,t)}static popupClosed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5113,t)}static loginFailed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5114,t)}static popupBlocked(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5115,t)}static mfaAlreadyEnabled(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5116,t)}static mfaNotEnabled(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ds.fromCode(5117,t)}}o(Ds,"messages",{5e3:"Custom",5111:"Invalid login params",5112:"User not logged in.",5113:"login popup has been closed by the user",5114:"Login failed",5115:"Popup was blocked. Please call this function as soon as user clicks button or use redirect mode",5116:"MFA already enabled",5117:"MFA not yet enabled. Please call `enableMFA` first"});(0,zt.getLogger)("openlogin").setLevel("error"),u.EventEmitter;var qs=r(8290),zs=r.n(qs);const $s="Web3Auth-cachedAdapter";class Ws extends _t{constructor(t){var e,r,n,i;if(super(),o(this,"coreOptions",void 0),o(this,"connectedAdapterName",null),o(this,"status",se.NOT_READY),o(this,"cachedAdapter",null),o(this,"walletAdapters",{}),o(this,"commonJRPCProvider",null),o(this,"plugins",{}),o(this,"storage","localStorage"),!t.clientId)throw Zt.invalidParams("Please provide a valid clientId in constructor");if(t.enableLogging?ue.enableAll():ue.setLevel("error"),!t.privateKeyProvider&&!t.chainConfig)throw Zt.invalidParams("Please provide chainConfig or privateKeyProvider");if(t.chainConfig=t.chainConfig||t.privateKeyProvider.currentChainConfig,null===(e=t.chainConfig)||void 0===e||!e.chainNamespace||!Object.values(Gt).includes(null===(r=t.chainConfig)||void 0===r?void 0:r.chainNamespace))throw Zt.invalidParams("Please provide a valid chainNamespace in chainConfig");"session"===t.storageKey&&(this.storage="sessionStorage"),this.cachedAdapter=ce(this.storage)?window[this.storage].getItem($s):null,this.coreOptions=a(a({},t),{},{chainConfig:a(a({},Jt(null===(n=t.chainConfig)||void 0===n?void 0:n.chainNamespace,null===(i=t.chainConfig)||void 0===i?void 0:i.chainId)||{}),t.chainConfig)}),this.subscribeToAdapterEvents=this.subscribeToAdapterEvents.bind(this)}get connected(){return Boolean(this.connectedAdapterName)}get provider(){return this.status!==se.NOT_READY&&this.commonJRPCProvider?this.commonJRPCProvider:null}set provider(t){throw new Error("Not implemented")}async init(){let t;this.commonJRPCProvider=await js.getProviderInstance({chainConfig:this.coreOptions.chainConfig});try{t=await(async(t,e)=>{try{const r=new URL(`${(t=>Pt[null!=t?t:oe.SAPPHIRE_MAINNET])(e)}/api/configuration`);return r.searchParams.append("project_id",t),r.searchParams.append("network",e),r.searchParams.append("whitelist","true"),await Vt(r.href)}catch(t){throw new Error(`Failed to fetch project config: ${t.message}`)}})(this.coreOptions.clientId,this.coreOptions.web3AuthNetwork)}catch(t){throw Zt.notReady("failed to fetch project configurations")}const e=Object.keys(this.walletAdapters).map((async e=>{if(this.subscribeToAdapterEvents(this.walletAdapters[e]),this.walletAdapters[e].chainConfigProxy)this.walletAdapters[e].setAdapterSettings({sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey});else{const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw Zt.invalidParams("Please provide chainNamespace in chainConfig");this.walletAdapters[e].setAdapterSettings({chainConfig:t,sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey})}if(e===ie.OPENLOGIN){const r=this.walletAdapters[e],{whitelabel:n}=t;this.coreOptions.uiConfig=qt()(zs()(n),this.coreOptions.uiConfig);const{sms_otp_enabled:i,whitelist:o}=t;if(void 0!==i&&r.setAdapterSettings({loginConfig:{[Ct]:{showOnModal:i,showOnDesktop:i,showOnMobile:i,showOnSocialBackupFactor:i}}}),o&&r.setAdapterSettings({originData:o.signed_urls}),this.coreOptions.privateKeyProvider){if(r.currentChainNamespace!==this.coreOptions.privateKeyProvider.currentChainConfig.chainNamespace)throw Zt.incompatibleChainNameSpace("private key provider is not compatible with provided chainNamespace for openlogin adapter");r.setAdapterSettings({privateKeyProvider:this.coreOptions.privateKeyProvider})}if(r.setAdapterSettings({whiteLabel:this.coreOptions.uiConfig}),!r.privateKeyProvider)throw Zt.invalidParams("privateKeyProvider is required for openlogin adapter")}else if(e===ie.WALLET_CONNECT_V2){const r=this.walletAdapters[e],{wallet_connect_enabled:n,wallet_connect_project_id:i}=t;if(!1===n)throw Zt.invalidParams("Please enable wallet connect v2 addon on dashboard");if(!i)throw Zt.invalidParams("Invalid wallet connect project id. Please configure it on the dashboard");r.setAdapterSettings({adapterSettings:{walletConnectInitOptions:{projectId:i}}})}return this.walletAdapters[e].init({autoConnect:this.cachedAdapter===e}).catch((t=>ue.error(t)))}));await Promise.all(e),this.status===se.NOT_READY&&(this.status=se.READY)}getAdapter(t){return this.walletAdapters[t]||null}configureAdapter(t){this.checkInitRequirements();const e=this.coreOptions.chainConfig;if(!e.chainNamespace)throw Zt.invalidParams("Please provide chainNamespace in chainConfig");if(this.walletAdapters[t.name])throw Zt.duplicateAdapterError(`Wallet adapter for ${t.name} already exists`);if(t.adapterNamespace!==Kt&&t.adapterNamespace!==e.chainNamespace)throw Zt.incompatibleChainNameSpace(`This wallet adapter belongs to ${t.adapterNamespace} which is incompatible with currently used namespace: ${e.chainNamespace}`);return t.adapterNamespace===Kt&&t.currentChainNamespace&&e.chainNamespace!==t.currentChainNamespace&&t.setAdapterSettings({chainConfig:e}),this.walletAdapters[t.name]=t,this}clearCache(){ce(this.storage)&&(window[this.storage].removeItem($s),this.cachedAdapter=null)}async addChain(t){if(this.status===se.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].addChain(t);if(this.commonJRPCProvider)return this.commonJRPCProvider.addChain(t);throw Zt.notReady("No wallet is ready")}async switchChain(t){if(this.status===se.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].switchChain(t);if(this.commonJRPCProvider)return this.commonJRPCProvider.switchChain(t);throw Zt.notReady("No wallet is ready")}async connectTo(t,e){if(!this.walletAdapters[t]||!this.commonJRPCProvider)throw Zt.notFound(`Please add wallet adapter for ${t} wallet, before connecting`);const r=await this.walletAdapters[t].connect(e);return this.commonJRPCProvider.updateProviderEngineProxy(r.provider||r),this.provider}async logout(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cleanup:!1};if(this.status!==se.CONNECTED||!this.connectedAdapterName)throw Xt.notConnectedError("No wallet is connected");await this.walletAdapters[this.connectedAdapterName].disconnect(t)}async getUserInfo(){if(ue.debug("Getting user info",this.status,this.connectedAdapterName),this.status!==se.CONNECTED||!this.connectedAdapterName)throw Xt.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].getUserInfo()}async enableMFA(t){if(this.status!==se.CONNECTED||!this.connectedAdapterName)throw Xt.notConnectedError("No wallet is connected");if(this.connectedAdapterName!==ie.OPENLOGIN)throw Xt.unsupportedOperation("EnableMFA is not supported for this adapter.");return this.walletAdapters[this.connectedAdapterName].enableMFA(t)}async authenticateUser(){if(this.status!==se.CONNECTED||!this.connectedAdapterName)throw Xt.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].authenticateUser()}addPlugin(t){if(this.plugins[t.name])throw new Error(`Plugin ${t.name} already exist`);if(t.pluginNamespace!==fe.MULTICHAIN&&t.pluginNamespace!==this.coreOptions.chainConfig.chainNamespace)throw new Error(`This plugin belongs to ${t.pluginNamespace} namespace which is incompatible with currently used namespace: ${this.coreOptions.chainConfig.chainNamespace}`);return this.plugins[t.name]=t,this}subscribeToAdapterEvents(t){t.on(ae.CONNECTED,(async t=>{if(!this.commonJRPCProvider)throw Zt.notFound("CommonJrpcProvider not found");const{provider:e}=this.walletAdapters[t.adapter];this.commonJRPCProvider.updateProviderEngineProxy(e.provider||e),this.status=se.CONNECTED,this.connectedAdapterName=t.adapter,this.cacheWallet(t.adapter),ue.debug("connected",this.status,this.connectedAdapterName),Object.values(this.plugins).map((async e=>{try{if(!e.SUPPORTED_ADAPTERS.includes(t.adapter))return;await e.initWithWeb3Auth(this),await e.connect()}catch(t){if(5211===t.code)return;ue.error(t)}})),this.emit(ae.CONNECTED,a({},t))})),t.on(ae.DISCONNECTED,(async t=>{if(this.status=se.READY,ce(this.storage)){const t=window[this.storage].getItem($s);this.connectedAdapterName===t&&this.clearCache()}ue.debug("disconnected",this.status,this.connectedAdapterName),await Promise.all(Object.values(this.plugins).map((t=>t.disconnect().catch((t=>{5211!==t.code&&ue.error(t)}))))),this.connectedAdapterName=null,this.emit(ae.DISCONNECTED,t)})),t.on(ae.CONNECTING,(t=>{this.status=se.CONNECTING,this.emit(ae.CONNECTING,t),ue.debug("connecting",this.status,this.connectedAdapterName)})),t.on(ae.ERRORED,(t=>{this.status=se.ERRORED,this.clearCache(),this.emit(ae.ERRORED,t),ue.debug("errored",this.status,this.connectedAdapterName)})),t.on(ae.ADAPTER_DATA_UPDATED,(t=>{ue.debug("adapter data updated",t),this.emit(ae.ADAPTER_DATA_UPDATED,t)})),t.on(ae.CACHE_CLEAR,(t=>{ue.debug("adapter cache clear",t),ce(this.storage)&&this.clearCache()}))}checkInitRequirements(){if(this.status===se.CONNECTING)throw Zt.notReady("Already pending connection");if(this.status===se.CONNECTED)throw Zt.notReady("Already connected");if(this.status===se.READY)throw Zt.notReady("Adapter is already initialized")}cacheWallet(t){ce(this.storage)&&(window[this.storage].setItem($s,t),this.cachedAdapter=t)}}})(),n})()));