From 9c8fbca7e097be9ca148042cb251fa2bfd71a493 Mon Sep 17 00:00:00 2001 From: trechriron Date: Wed, 3 Apr 2024 19:54:35 +0000 Subject: [PATCH] deploy: 0c558b4bfda3f8269e9a49ab9213723c9c31253a --- index.html | 2 +- main.050a681a77bb32cb.js | 7 ------- main.978ad2d0ff1d6c80.js | 7 +++++++ 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 main.050a681a77bb32cb.js create mode 100644 main.978ad2d0ff1d6c80.js diff --git a/index.html b/index.html index 84ce77745..15280c171 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ - + \ No newline at end of file diff --git a/main.050a681a77bb32cb.js b/main.050a681a77bb32cb.js deleted file mode 100644 index 2ab48c9d5..000000000 --- a/main.050a681a77bb32cb.js +++ /dev/null @@ -1,7 +0,0 @@ -(self.webpackChunkangular=self.webpackChunkangular||[]).push([[179],{21699:(ne,s,p)=>{"use strict";var h={};p.r(h),p.d(h,{identity:()=>aW});var M={};p.r(M),p.d(M,{base2:()=>uW});var w={};p.r(w),p.d(w,{base8:()=>cW});var E={};p.r(E),p.d(E,{base10:()=>lW});var l={};p.r(l),p.d(l,{base16:()=>fW,base16upper:()=>dW});var m={};p.r(m),p.d(m,{base32:()=>hW,base32hex:()=>mW,base32hexpad:()=>bW,base32hexpadupper:()=>wW,base32hexupper:()=>vW,base32pad:()=>gW,base32padupper:()=>yW,base32upper:()=>pW,base32z:()=>AW});var y={};p.r(y),p.d(y,{base36:()=>EW,base36upper:()=>SW});var b={};p.r(b),p.d(b,{base58btc:()=>_W,base58flickr:()=>MW});var S={};p.r(S),p.d(S,{base64:()=>DW,base64pad:()=>IW,base64url:()=>CW,base64urlpad:()=>xW});var _={};p.r(_),p.d(_,{base256emoji:()=>RW});var A={};p.r(A),p.d(A,{sha256:()=>eG,sha512:()=>tG});var P={};p.r(P),p.d(P,{identity:()=>rG});var x={};p.r(x),p.d(x,{code:()=>oG,decode:()=>aG,encode:()=>sG,name:()=>iG});var T={};p.r(T),p.d(T,{code:()=>fG,decode:()=>hG,encode:()=>dG,name:()=>lG});var L={};p.r(L),p.d(L,{identity:()=>KG});var N={};p.r(N),p.d(N,{base2:()=>zG});var j={};p.r(j),p.d(j,{base8:()=>VG});var B={};p.r(B),p.d(B,{base10:()=>HG});var V={};p.r(V),p.d(V,{base16:()=>WG,base16upper:()=>GG});var G={};p.r(G),p.d(G,{base32:()=>ZG,base32hex:()=>XG,base32hexpad:()=>$G,base32hexpadupper:()=>eZ,base32hexupper:()=>qG,base32pad:()=>JG,base32padupper:()=>QG,base32upper:()=>YG,base32z:()=>tZ});var W={};p.r(W),p.d(W,{base36:()=>nZ,base36upper:()=>rZ});var Q={};p.r(Q),p.d(Q,{base58btc:()=>iZ,base58flickr:()=>oZ});var q={};p.r(q),p.d(q,{base64:()=>sZ,base64pad:()=>aZ,base64url:()=>uZ,base64urlpad:()=>cZ});var J={};p.r(J),p.d(J,{base256emoji:()=>pZ});var Z={};p.r(Z),p.d(Z,{sha256:()=>RZ,sha512:()=>kZ});var ee={};p.r(ee),p.d(ee,{identity:()=>FZ});var I={};p.r(I),p.d(I,{code:()=>jZ,decode:()=>KZ,encode:()=>UZ,name:()=>BZ});var o={};p.r(o),p.d(o,{code:()=>WZ,decode:()=>ZZ,encode:()=>GZ,name:()=>HZ});var a={};p.r(a),p.d(a,{identity:()=>cQ});var d={};p.r(d),p.d(d,{base2:()=>lQ});var g={};p.r(g),p.d(g,{base8:()=>fQ});var D={};p.r(D),p.d(D,{base10:()=>dQ});var F={};p.r(F),p.d(F,{base16:()=>hQ,base16upper:()=>pQ});var z={};p.r(z),p.d(z,{base32:()=>gQ,base32hex:()=>bQ,base32hexpad:()=>AQ,base32hexpadupper:()=>EQ,base32hexupper:()=>wQ,base32pad:()=>mQ,base32padupper:()=>vQ,base32upper:()=>yQ,base32z:()=>SQ});var C={};p.r(C),p.d(C,{base36:()=>_Q,base36upper:()=>MQ});var f={};p.r(f),p.d(f,{base58btc:()=>DQ,base58flickr:()=>IQ});var k={};p.r(k),p.d(k,{base64:()=>CQ,base64pad:()=>xQ,base64url:()=>TQ,base64urlpad:()=>OQ});var se={};p.r(se),p.d(se,{base256emoji:()=>LQ});var te={};p.r(te),p.d(te,{sha256:()=>nX,sha512:()=>rX});var oe={};p.r(oe),p.d(oe,{identity:()=>oX});var de={};p.r(de),p.d(de,{code:()=>aX,decode:()=>cX,encode:()=>uX,name:()=>sX});var Ie={};function ye(t){return"function"==typeof t}function ve(t){const n=t(r=>{Error.call(r),r.stack=(new Error).stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}p.r(Ie),p.d(Ie,{code:()=>hX,decode:()=>gX,encode:()=>pX,name:()=>dX});const ae=ve(t=>function(n){t(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((r,u)=>`${u+1}) ${r.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n});function fe(t,e){if(t){const n=t.indexOf(e);0<=n&&t.splice(n,1)}}class pe{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(const v of n)v.remove(this);else n.remove(this);const{initialTeardown:r}=this;if(ye(r))try{r()}catch(v){e=v instanceof ae?v.errors:[v]}const{_finalizers:u}=this;if(u){this._finalizers=null;for(const v of u)try{be(v)}catch(O){e=e??[],O instanceof ae?e=[...e,...O.errors]:e.push(O)}}if(e)throw new ae(e)}}add(e){var n;if(e&&e!==this)if(this.closed)be(e);else{if(e instanceof pe){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}}_hasParent(e){const{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){const{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){const{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&fe(n,e)}remove(e){const{_finalizers:n}=this;n&&fe(n,e),e instanceof pe&&e._removeParent(this)}}pe.EMPTY=(()=>{const t=new pe;return t.closed=!0,t})();const Se=pe.EMPTY;function ce(t){return t instanceof pe||t&&"closed"in t&&ye(t.remove)&&ye(t.add)&&ye(t.unsubscribe)}function be(t){ye(t)?t():t.unsubscribe()}const Ne={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Fe={setTimeout(t,e,...n){const{delegate:r}=Fe;return r?.setTimeout?r.setTimeout(t,e,...n):setTimeout(t,e,...n)},clearTimeout(t){const{delegate:e}=Fe;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function lt(t){Fe.setTimeout(()=>{const{onUnhandledError:e}=Ne;if(!e)throw t;e(t)})}function Ge(){}const He=nt("C",void 0,void 0);function nt(t,e,n){return{kind:t,value:e,error:n}}let Vt=null;function ot(t){if(Ne.useDeprecatedSynchronousErrorHandling){const e=!Vt;if(e&&(Vt={errorThrown:!1,error:null}),t(),e){const{errorThrown:n,error:r}=Vt;if(Vt=null,n)throw r}}else t()}class Gt extends pe{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,ce(e)&&e.add(this)):this.destination=ct}static create(e,n,r){return new Be(e,n,r)}next(e){this.isStopped?Ze(function tt(t){return nt("N",t,void 0)}(e),this):this._next(e)}error(e){this.isStopped?Ze(function Kt(t){return nt("E",void 0,t)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Ze(He,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Re=Function.prototype.bind;function Ae(t,e){return Re.call(t,e)}class Te{constructor(e){this.partialObserver=e}next(e){const{partialObserver:n}=this;if(n.next)try{n.next(e)}catch(r){Ve(r)}}error(e){const{partialObserver:n}=this;if(n.error)try{n.error(e)}catch(r){Ve(r)}else Ve(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(n){Ve(n)}}}class Be extends Gt{constructor(e,n,r){let u;if(super(),ye(e)||!e)u={next:e??void 0,error:n??void 0,complete:r??void 0};else{let v;this&&Ne.useDeprecatedNextContext?(v=Object.create(e),v.unsubscribe=()=>this.unsubscribe(),u={next:e.next&&Ae(e.next,v),error:e.error&&Ae(e.error,v),complete:e.complete&&Ae(e.complete,v)}):u=e}this.destination=new Te(u)}}function Ve(t){Ne.useDeprecatedSynchronousErrorHandling?function at(t){Ne.useDeprecatedSynchronousErrorHandling&&Vt&&(Vt.errorThrown=!0,Vt.error=t)}(t):lt(t)}function Ze(t,e){const{onStoppedNotification:n}=Ne;n&&Fe.setTimeout(()=>n(t,e))}const ct={closed:!0,next:Ge,error:function mt(t){throw t},complete:Ge},hn="function"==typeof Symbol&&Symbol.observable||"@@observable";function ft(t){return t}function wn(t){return 0===t.length?ft:1===t.length?t[0]:function(n){return t.reduce((r,u)=>u(r),n)}}class ze{constructor(e){e&&(this._subscribe=e)}lift(e){const n=new ze;return n.source=this,n.operator=e,n}subscribe(e,n,r){const u=function pt(t){return t&&t instanceof Gt||function Ht(t){return t&&ye(t.next)&&ye(t.error)&&ye(t.complete)}(t)&&ce(t)}(e)?e:new Be(e,n,r);return ot(()=>{const{operator:v,source:O}=this;u.add(v?v.call(u,O):O?this._subscribe(u):this._trySubscribe(u))}),u}_trySubscribe(e){try{return this._subscribe(e)}catch(n){e.error(n)}}forEach(e,n){return new(n=Qe(n))((r,u)=>{const v=new Be({next:O=>{try{e(O)}catch(Y){u(Y),v.unsubscribe()}},error:u,complete:r});this.subscribe(v)})}_subscribe(e){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(e)}[hn](){return this}pipe(...e){return wn(e)(this)}toPromise(e){return new(e=Qe(e))((n,r)=>{let u;this.subscribe(v=>u=v,v=>r(v),()=>n(u))})}}function Qe(t){var e;return null!==(e=t??Ne.Promise)&&void 0!==e?e:Promise}ze.create=t=>new ze(t);const vt=ve(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});class $t extends ze{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new dt(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new vt}next(e){ot(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){ot(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:n}=this;for(;n.length;)n.shift().error(e)}})}complete(){ot(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){const{hasError:n,isStopped:r,observers:u}=this;return n||r?Se:(this.currentObservers=null,u.push(e),new pe(()=>{this.currentObservers=null,fe(u,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:u}=this;n?e.error(r):u&&e.complete()}asObservable(){const e=new ze;return e.source=this,e}}$t.create=(t,e)=>new dt(t,e);class dt extends $t{constructor(e,n){super(),this.destination=e,this.source=n}next(e){var n,r;null===(r=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===r||r.call(n,e)}error(e){var n,r;null===(r=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===r||r.call(n,e)}complete(){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===n||n.call(e)}_subscribe(e){var n,r;return null!==(r=null===(n=this.source)||void 0===n?void 0:n.subscribe(e))&&void 0!==r?r:Se}}function mn(t){return e=>{if(function gt(t){return ye(t?.lift)}(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function ut(t,e,n,r,u){return new wt(t,e,n,r,u)}class wt extends Gt{constructor(e,n,r,u,v,O){super(e),this.onFinalize=v,this.shouldUnsubscribe=O,this._next=n?function(Y){try{n(Y)}catch($){e.error($)}}:super._next,this._error=u?function(Y){try{u(Y)}catch($){e.error($)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(Y){e.error(Y)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:n}=this;super.unsubscribe(),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function Sn(t,e){return mn((n,r)=>{let u=0;n.subscribe(ut(r,v=>{r.next(t.call(e,v,u++))}))})}function Bt(t,e,n,r){return new(n||(n=Promise))(function(v,O){function Y(ue){try{ie(r.next(ue))}catch(he){O(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){O(he)}}function ie(ue){ue.done?v(ue.value):function u(v){return v instanceof n?v:new n(function(O){O(v)})}(ue.value).then(Y,$)}ie((r=r.apply(t,e||[])).next())})}Object.create;function Nt(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function an(t){return this instanceof an?(this.v=t,this):new an(t)}function tn(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u,r=n.apply(t,e||[]),v=[];return u={},O("next"),O("throw"),O("return"),u[Symbol.asyncIterator]=function(){return this},u;function O(we){r[we]&&(u[we]=function(xe){return new Promise(function(Ce,Le){v.push([we,xe,Ce,Le])>1||Y(we,xe)})})}function Y(we,xe){try{!function $(we){we.value instanceof an?Promise.resolve(we.value.v).then(ie,ue):he(v[0][2],we)}(r[we](xe))}catch(Ce){he(v[0][3],Ce)}}function ie(we){Y("next",we)}function ue(we){Y("throw",we)}function he(we,xe){we(xe),v.shift(),v.length&&Y(v[0][0],v[0][1])}}function cn(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=Nt(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(v){n[v]=t[v]&&function(O){return new Promise(function(Y,$){(function u(v,O,Y,$){Promise.resolve($).then(function(ie){v({value:ie,done:Y})},O)})(Y,$,(O=t[v](O)).done,O.value)})}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;const Kn=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function jn(t){return ye(t?.then)}function Hn(t){return ye(t[hn])}function st(t){return Symbol.asyncIterator&&ye(t?.[Symbol.asyncIterator])}function Qn(t){return new TypeError(`You provided ${null!==t&&"object"==typeof t?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Xn=function cr(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Zn(t){return ye(t?.[Xn])}function qn(t){return tn(this,arguments,function*(){const n=t.getReader();try{for(;;){const{value:r,done:u}=yield an(n.read());if(u)return yield an(void 0);yield yield an(r)}}finally{n.releaseLock()}})}function nr(t){return ye(t?.getReader)}function wr(t){if(t instanceof ze)return t;if(null!=t){if(Hn(t))return function dr(t){return new ze(e=>{const n=t[hn]();if(ye(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if(Kn(t))return function Ln(t){return new ze(e=>{for(let n=0;n{t.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,lt)})}(t);if(st(t))return Br(t);if(Zn(t))return function Sr(t){return new ze(e=>{for(const n of t)if(e.next(n),e.closed)return;e.complete()})}(t);if(nr(t))return function Wr(t){return Br(qn(t))}(t)}throw Qn(t)}function Br(t){return new ze(e=>{(function bi(t,e){var n,r,u,v;return Bt(this,void 0,void 0,function*(){try{for(n=cn(t);!(r=yield n.next()).done;){const O=r.value;if(e.next(O),e.closed)return}}catch(O){u={error:O}}finally{try{r&&!r.done&&(v=n.return)&&(yield v.call(n))}finally{if(u)throw u.error}}e.complete()})})(t,e).catch(n=>e.error(n))})}function Ir(t,e,n,r=0,u=!1){const v=e.schedule(function(){n(),u?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(v),!u)return v}function go(t,e,n=1/0){return ye(e)?go((r,u)=>Sn((v,O)=>e(r,v,u,O))(wr(t(r,u))),n):("number"==typeof e&&(n=e),mn((r,u)=>function $s(t,e,n,r,u,v,O,Y){const $=[];let ie=0,ue=0,he=!1;const we=()=>{he&&!$.length&&!ie&&e.complete()},xe=Le=>ie{v&&e.next(Le),ie++;let je=!1;wr(n(Le,ue++)).subscribe(ut(e,Ue=>{u?.(Ue),v?xe(Ue):e.next(Ue)},()=>{je=!0},void 0,()=>{if(je)try{for(ie--;$.length&&ieCe(Ue)):Ce(Ue)}we()}catch(Ue){e.error(Ue)}}))};return t.subscribe(ut(e,xe,()=>{he=!0,we()})),()=>{Y?.()}}(r,u,t,n)))}const as=new ze(t=>t.complete());function us(t){return t[t.length-1]}function Il(t){return function Sa(t){return t&&ye(t.schedule)}(us(t))?t.pop():void 0}function tu(t,e=0){return mn((n,r)=>{n.subscribe(ut(r,u=>Ir(r,t,()=>r.next(u),e),()=>Ir(r,t,()=>r.complete(),e),u=>Ir(r,t,()=>r.error(u),e)))})}function Cl(t,e=0){return mn((n,r)=>{r.add(t.schedule(()=>n.subscribe(r),e))})}function _t(t,e){if(!t)throw new Error("Iterable cannot be null");return new ze(n=>{Ir(n,e,()=>{const r=t[Symbol.asyncIterator]();Ir(n,e,()=>{r.next().then(u=>{u.done?n.complete():n.next(u.value)})},0,!0)})})}function In(t,e){if(null!=t){if(Hn(t))return function xl(t,e){return wr(t).pipe(Cl(e),tu(e))}(t,e);if(Kn(t))return function Yp(t,e){return new ze(n=>{let r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}(t,e);if(jn(t))return function vh(t,e){return wr(t).pipe(Cl(e),tu(e))}(t,e);if(st(t))return _t(t,e);if(Zn(t))return function et(t,e){return new ze(n=>{let r;return Ir(n,e,()=>{r=t[Xn](),Ir(n,e,()=>{let u,v;try{({value:u,done:v}=r.next())}catch(O){return void n.error(O)}v?n.complete():n.next(u)},0,!0)}),()=>ye(r?.return)&&r.return()})}(t,e);if(nr(t))return function en(t,e){return _t(qn(t),e)}(t,e)}throw Qn(t)}function Gr(t,e){return e?In(t,e):wr(t)}function lr(...t){const e=Il(t),n=function eu(t,e){return"number"==typeof us(t)?t.pop():e}(t,1/0),r=t;return r.length?1===r.length?wr(r[0]):function ss(t=1/0){return go(ft,t)}(n)(Gr(r,e)):as}function ri(t,e,...n){if(!0===e)return void t();if(!1===e)return;const r=new Be({next:()=>{r.unsubscribe(),t()}});return wr(e(...n)).subscribe(r)}function $n(t){for(let e in t)if(t[e]===$n)return e;throw Error("Could not find renamed property on target object.")}function Zr(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function er(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(er).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function so(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const Ii=$n({__forward_ref__:$n});function vr(t){return t.__forward_ref__=vr,t.toString=function(){return er(this())},t}function Pn(t){return Io(t)?t():t}function Io(t){return"function"==typeof t&&t.hasOwnProperty(Ii)&&t.__forward_ref__===vr}function Vo(t){return t&&!!t.\u0275providers}const Ns="https://g.co/ng/security#xss";class yn extends Error{constructor(e,n){super(wi(e,n)),this.code=e}}function wi(t,e){return`NG0${Math.abs(t)}${e?": "+e.trim():""}`}function ar(t){return"string"==typeof t?t:null==t?"":String(t)}function kr(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():ar(t)}function Bf(t,e){throw new yn(-201,!1)}function Ku(t,e,n){t!=e&&Lr(n,t,e,"==")}function Rs(t,e){null==t&&Lr(e,t,null,"!=")}function Lr(t,e,n,r){throw new Error(`ASSERTION ERROR: ${t}`+(null==r?"":` [Expected=> ${n} ${r} ${e} <=Actual]`))}function rr(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function ks(t){return{providers:t.providers||[],imports:t.imports||[]}}function Ah(t){return sv(t,Tl)||sv(t,uv)}function sv(t,e){return t.hasOwnProperty(e)?t[e]:null}function av(t){return t&&(t.hasOwnProperty(Ac)||t.hasOwnProperty(cv))?t[Ac]:null}const Tl=$n({\u0275prov:$n}),Ac=$n({\u0275inj:$n}),uv=$n({ngInjectableDef:$n}),cv=$n({ngInjectorDef:$n});var Mr,t;let Eh;function ls(t){const e=Eh;return Eh=t,e}function Ec(t,e,n){const r=Ah(t);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:n&Mr.Optional?null:void 0!==e?e:void Bf(er(t))}(t=Mr||(Mr={}))[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional";const ii=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)();const Ls={},Sc="__NG_DI_FLAG__",Sh="ngTempTokenPath",_h="ngTokenPath",Dw=/\n/gm,fv="\u0275",Mh="__source";let _c;function Mc(t){const e=_c;return _c=t,e}function dv(t,e=Mr.Default){if(void 0===_c)throw new yn(-203,!1);return null===_c?Ec(t,void 0,e):_c.get(t,e&Mr.Optional?null:void 0,e)}function Wn(t,e=Mr.Default){return(function lv(){return Eh}()||dv)(Pn(t),e)}function hv(t){throw new yn(202,!1)}function Ki(t,e=Mr.Default){return Wn(t,Dh(e))}function Dh(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function Qp(t){const e=[];for(let n=0;n ");else if("object"==typeof e){let v=[];for(let O in e)if(e.hasOwnProperty(O)){let Y=e[O];v.push(O+":"+("string"==typeof Y?JSON.stringify(Y):er(Y)))}u=`{${v.join(", ")}}`}return`${n}${r?"("+r+")":""}[${u}]: ${t.replace(Dw,"\n ")}`}("\n"+t.message,u,n,r),t[_h]=u,t[Sh]=null,t}function _a(t){return{toString:t}.toString()}var Dc,Ma;!function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"}(Dc||(Dc={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(Ma||(Ma={}));const ta={},jr=[],Ih=$n({\u0275cmp:$n}),zu=$n({\u0275dir:$n}),Kf=$n({\u0275pipe:$n}),Ol=$n({\u0275mod:$n}),na=$n({\u0275fac:$n}),Pl=$n({__NG_ELEMENT_ID__:$n});let Ch=0;function Ho(t){return _a(()=>{const e=mv(t),n={...e,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Dc.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,data:t.data||{},encapsulation:t.encapsulation||Ma.Emulated,id:"c"+Ch++,styles:t.styles||jr,_:null,schemas:t.schemas||null,tView:null};Nl(n);const r=t.dependencies;return n.directiveDefs=Th(r,!1),n.pipeDefs=Th(r,!0),n})}function Xp(t,e,n){const r=t.\u0275cmp;r.directiveDefs=Th(e,!1),r.pipeDefs=Th(n,!0)}function gv(t){return Ur(t)||yi(t)}function xh(t){return null!==t}function Fs(t){return _a(()=>({type:t.type,bootstrap:t.bootstrap||jr,declarations:t.declarations||jr,imports:t.imports||jr,exports:t.exports||jr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function yv(t,e){return _a(()=>{const n=fs(t,!0);n.declarations=e.declarations||jr,n.imports=e.imports||jr,n.exports=e.exports||jr})}function qp(t,e){if(null==t)return ta;const n={};for(const r in t)if(t.hasOwnProperty(r)){let u=t[r],v=u;Array.isArray(u)&&(v=u[1],u=u[0]),n[u]=r,e&&(e[u]=v)}return n}function ir(t){return _a(()=>{const e=mv(t);return Nl(e),e})}function Co(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function Ur(t){return t[Ih]||null}function yi(t){return t[zu]||null}function yo(t){return t[Kf]||null}function Ic(t){const e=Ur(t)||yi(t)||yo(t);return null!==e&&e.standalone}function fs(t,e){const n=t[Ol]||null;if(!n&&!0===e)throw new Error(`Type ${er(t)} does not have '\u0275mod' property.`);return n}function mv(t){const e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,exportAs:t.exportAs||null,standalone:!0===t.standalone,selectors:t.selectors||jr,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:qp(t.inputs,e),outputs:qp(t.outputs)}}function Nl(t){t.features?.forEach(e=>e(t))}function Th(t,e){if(!t)return null;const n=e?yo:gv;return()=>("function"==typeof t?t():t).map(r=>n(r)).filter(xh)}const Da=0,Cn=1,kn=2,li=3,Wo=4,ra=5,ao=6,Vu=7,oi=8,Cc=9,nu=10,yr=11,$p=12,zf=13,eg=14,ru=15,zi=16,xc=17,Hu=18,Bs=19,Tc=20,vv=21,ei=22,tg=1,Oh=2,ia=7,Vf=8,oa=9,fi=10;function Ci(t){return Array.isArray(t)&&"object"==typeof t[tg]}function ds(t){return Array.isArray(t)&&!0===t[tg]}function ng(t){return 0!=(4&t.flags)}function Hf(t){return t.componentOffset>-1}function Ia(t){return 1==(1&t.flags)}function xo(t){return!!t.template}function Rl(t){return 0!=(256&t[kn])}function Gu(t,e){return t.hasOwnProperty(na)?t[na]:null}class xw{constructor(e,n,r){this.previousValue=e,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}}function uo(){return Nc}function Nc(t){return t.type.prototype.ngOnChanges&&(t.setInput=Nh),Fl}function Fl(){const t=gs(this),e=t?.current;if(e){const n=t.previous;if(n===ta)t.previous=e;else for(let r in e)n[r]=e[r];t.current=null,this.ngOnChanges(e)}}function Nh(t,e,n,r){const u=this.declaredInputs[n],v=gs(t)||function js(t,e){return t[Zf]=e}(t,{previous:ta,current:null}),O=v.current||(v.current={}),Y=v.previous,$=Y[u];O[u]=new xw($&&$.currentValue,e,Y===ta),t[r]=e}uo.ngInherit=!0;const Zf="__ngSimpleChanges__";function gs(t){return t[Zf]||null}let iu=null;const ki=function(t,e,n){iu?.(t,e,n)},Zu="svg",ug="math";function Vi(t){for(;Array.isArray(t);)t=t[Da];return t}function mo(t,e){return Vi(e[t])}function ai(t,e){return Vi(e[t.index])}function Us(t,e){return t.data[e]}function Rc(t,e){return t[e]}function Oo(t,e){const n=e[t];return Ci(n)?n:n[Da]}function Bl(t){return 64==(64&t[kn])}function sa(t,e){return null==e?null:t[e]}function fg(t){t[Hu]=0}function Yu(t,e){t[ra]+=e;let n=t,r=t[li];for(;null!==r&&(1===e&&1===n[ra]||-1===e&&0===n[ra]);)r[ra]+=e,n=r,r=r[li]}const or={lFrame:ua(null),bindingsEnabled:!0};function Lh(){return or.bindingsEnabled}function dg(){or.bindingsEnabled=!0}function hg(){or.bindingsEnabled=!1}function sn(){return or.lFrame.lView}function Ar(){return or.lFrame.tView}function Li(t){return or.lFrame.contextLView=t,t[oi]}function Po(t){return or.lFrame.contextLView=null,t}function Hi(){let t=pg();for(;null!==t&&64===t.type;)t=t.parent;return t}function pg(){return or.lFrame.currentTNode}function ys(){const t=or.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function co(t,e){const n=or.lFrame;n.currentTNode=t,n.isParent=e}function Yf(){return or.lFrame.isParent}function Fh(){or.lFrame.isParent=!1}function vo(){const t=or.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Ks(){return or.lFrame.bindingIndex}function gg(t){return or.lFrame.bindingIndex=t}function Lc(){return or.lFrame.bindingIndex++}function aa(t){const e=or.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function yg(t){or.lFrame.inI18n=t}function Ev(t,e){const n=or.lFrame;n.bindingIndex=n.bindingRootIndex=t,Qf(e)}function Qf(t){or.lFrame.currentDirectiveIndex=t}function Fc(t){const e=or.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function Xf(){return or.lFrame.currentQueryIndex}function jh(t){or.lFrame.currentQueryIndex=t}function _v(t){const e=t[Cn];return 2===e.type?e.declTNode:1===e.type?t[ao]:null}function Bc(t,e,n){if(n&Mr.SkipSelf){let u=e,v=t;for(;(u=u.parent,null===u&&!(n&Mr.Host))&&(u=_v(v),!(null===u||(v=v[ru],10&u.type))););if(null===u)return!1;e=u,t=v}const r=or.lFrame=Ul();return r.currentTNode=e,r.lView=t,!0}function Uh(t){const e=Ul(),n=t[Cn];or.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function Ul(){const t=or.lFrame,e=null===t?null:t.child;return null===e?ua(t):e}function ua(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Kl(){const t=or.lFrame;return or.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const zl=Kl;function au(){const t=Kl();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function mg(t){return(or.lFrame.contextLView=function Vl(t,e){for(;t>0;)e=e[ru],t--;return e}(t,or.lFrame.contextLView))[oi]}function bo(){return or.lFrame.selectedIndex}function uu(t){or.lFrame.selectedIndex=t}function sr(){const t=or.lFrame;return Us(t.tView,t.selectedIndex)}function Kh(){or.lFrame.currentNamespace=Zu}function vg(){or.lFrame.currentNamespace=ug}function bg(){!function zh(){or.lFrame.currentNamespace=null}()}function ti(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n=r)break}else e[$]<0&&(t[Hu]+=65536),(Y>11>16&&(3&t[kn])===e){t[kn]+=2048,ki(4,Y,v);try{v.call(Y)}finally{ki(5,Y,v)}}}else{ki(4,Y,v);try{v.call(Y)}finally{ki(5,Y,v)}}}const Gl=-1;class Fi{constructor(e,n,r){this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r}}function Vh(t,e,n){let r=0;for(;re){O=v-1;break}}}for(;v>16}(t),r=e;for(;n>0;)r=r[ru],n--;return r}let Hh=!0;function Uc(t){const e=Hh;return Hh=t,e}const Ig=255,Wh=5;let xv=0;const ca={};function nd(t,e){const n=Cg(t,e);if(-1!==n)return n;const r=e[Cn];r.firstCreatePass&&(t.injectorIndex=e.length,rd(r.data,t),rd(e,null),rd(r.blueprint,null));const u=Gh(t,e),v=t.injectorIndex;if(Mg(u)){const O=td(u),Y=Ju(u,e),$=Y[Cn].data;for(let ie=0;ie<8;ie++)e[v+ie]=Y[O+ie]|$[O+ie]}return e[v+8]=u,v}function rd(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Cg(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function Gh(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,r=null,u=e;for(;null!==u;){if(r=Ng(u),null===r)return Gl;if(n++,u=u[ru],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return Gl}function Zh(t,e,n){!function Tv(t,e,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Pl)&&(r=n[Pl]),null==r&&(r=n[Pl]=xv++);const u=r&Ig,v=1<>Wh)]|=v}(t,e,n)}function xg(t,e,n){if(n&Mr.Optional||void 0!==t)return t;Bf()}function Ov(t,e,n,r){if(n&Mr.Optional&&void 0===r&&(r=null),!(n&(Mr.Self|Mr.Host))){const u=t[Cc],v=ls(void 0);try{return u?u.get(e,r,n&Mr.Optional):Ec(e,r,n&Mr.Optional)}finally{ls(v)}}return xg(r,0,n)}function Pv(t,e,n,r=Mr.Default,u){if(null!==t){if(1024&e[kn]){const O=function Lv(t,e,n,r,u){let v=t,O=e;for(;null!==v&&null!==O&&1024&O[kn]&&!(256&O[kn]);){const Y=Tg(v,O,n,r|Mr.Self,ca);if(Y!==ca)return Y;let $=v.parent;if(!$){const ie=O[vv];if(ie){const ue=ie.get(n,ca,r);if(ue!==ca)return ue}$=Ng(O),O=O[ru]}v=$}return u}(t,e,n,r,ca);if(O!==ca)return O}const v=Tg(t,e,n,r,ca);if(v!==ca)return v}return Ov(e,n,r,u)}function Tg(t,e,n,r,u){const v=function Ow(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(Pl)?t[Pl]:void 0;return"number"==typeof e?e>=0?e&Ig:Og:e}(n);if("function"==typeof v){if(!Bc(e,t,r))return r&Mr.Host?xg(u,0,r):Ov(e,n,r,u);try{const O=v(r);if(null!=O||r&Mr.Optional)return O;Bf()}finally{zl()}}else if("number"==typeof v){let O=null,Y=Cg(t,e),$=Gl,ie=r&Mr.Host?e[zi][ao]:null;for((-1===Y||r&Mr.SkipSelf)&&($=-1===Y?Gh(t,e):e[Y+8],$!==Gl&&kv(r,!1)?(O=e[Cn],Y=td($),e=Ju($,e)):Y=-1);-1!==Y;){const ue=e[Cn];if(Rv(v,Y,ue.data)){const he=Nv(Y,e,n,O,r,ie);if(he!==ca)return he}$=e[Y+8],$!==Gl&&kv(r,e[Cn].data[Y+8]===ie)&&Rv(v,Y,e)?(O=ue,Y=td($),e=Ju($,e)):Y=-1}}return u}function Nv(t,e,n,r,u,v){const O=e[Cn],Y=O.data[t+8],ue=id(Y,O,n,null==r?Hf(Y)&&Hh:r!=O&&0!=(3&Y.type),u&Mr.Host&&v===Y);return null!==ue?xa(e,O,ue,Y):ca}function id(t,e,n,r,u){const v=t.providerIndexes,O=e.data,Y=1048575&v,$=t.directiveStart,ie=t.directiveEnd,ue=v>>20,we=u?Y+ue:ie;for(let xe=r?Y:Y+ue;xe=$&&Ce.type===n)return xe}if(u){const xe=O[$];if(xe&&xo(xe)&&xe.type===n)return $}return null}function xa(t,e,n,r){let u=t[n];const v=e.data;if(function Ag(t){return t instanceof Fi}(u)){const O=u;O.resolving&&function Jp(t,e){const n=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new yn(-200,`Circular dependency in DI detected for ${t}${n}`)}(kr(v[n]));const Y=Uc(O.canSeeViewProviders);O.resolving=!0;const $=O.injectImpl?ls(O.injectImpl):null;Bc(t,r,Mr.Default);try{u=t[n]=O.factory(void 0,v,t,r),e.firstCreatePass&&n>=r.directiveStart&&function jc(t,e,n){const{ngOnChanges:r,ngOnInit:u,ngDoCheck:v}=e.type.prototype;if(r){const O=Nc(e);(n.preOrderHooks??(n.preOrderHooks=[])).push(t,O),(n.preOrderCheckHooks??(n.preOrderCheckHooks=[])).push(t,O)}u&&(n.preOrderHooks??(n.preOrderHooks=[])).push(0-t,u),v&&((n.preOrderHooks??(n.preOrderHooks=[])).push(t,v),(n.preOrderCheckHooks??(n.preOrderCheckHooks=[])).push(t,v))}(n,v[n],e)}finally{null!==$&&ls($),Uc(Y),O.resolving=!1,zl()}}return u}function Rv(t,e,n){const r=1<>Wh)]&r)}function kv(t,e){return!(t&Mr.Self||t&Mr.Host&&e)}class la{constructor(e,n){this._tNode=e,this._lView=n}get(e,n,r){return Pv(this._tNode,this._lView,e,Dh(r),n)}}function Og(){return new la(Hi(),sn())}function Wi(t){return _a(()=>{const e=t.prototype.constructor,n=e[na]||Pg(e),r=Object.prototype;let u=Object.getPrototypeOf(t.prototype).constructor;for(;u&&u!==r;){const v=u[na]||Pg(u);if(v&&v!==n)return v;u=Object.getPrototypeOf(u)}return v=>new v})}function Pg(t){return Io(t)?()=>{const e=Pg(Pn(t));return e&&e()}:Gu(t)}function Ng(t){const e=t[Cn],n=e.type;return 2===n?e.declTNode:1===n?t[ao]:null}function Yh(t){return function Tw(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const n=t.attrs;if(n){const r=n.length;let u=0;for(;u{const v=lo(e);function O(...Y){if(this instanceof O)return v.call(this,...Y),this;const $=new O(...Y);return function(ue){return u&&u(ue,...Y),(ue.hasOwnProperty(Kc)?ue[Kc]:Object.defineProperty(ue,Kc,{value:[]})[Kc]).push($),r&&r(ue),ue}}return n&&(O.prototype=Object.create(n.prototype)),O.prototype.ngMetadataName=t,O.annotationCls=O,O})}function lo(t){return function(...n){if(t){const r=t(...n);for(const u in r)this[u]=r[u]}}}function Vc(t,e,n){return _a(()=>{const r=lo(e);function u(...v){if(this instanceof u)return r.apply(this,v),this;const O=new u(...v);return Y.annotation=O,Y;function Y($,ie,ue){const he=$.hasOwnProperty(zc)?$[zc]:Object.defineProperty($,zc,{value:[]})[zc];for(;he.length<=ue;)he.push(null);return(he[ue]=he[ue]||[]).push(O),$}}return n&&(u.prototype=Object.create(n.prototype)),u.prototype.ngMetadataName=t,u.annotationCls=u,u})}function lu(t,e,n,r){return _a(()=>{const u=lo(e);function v(...O){if(this instanceof v)return u.apply(this,O),this;const Y=new v(...O);return function $(ie,ue){const he=ie.constructor,we=he.hasOwnProperty(Yl)?he[Yl]:Object.defineProperty(he,Yl,{value:{}})[Yl];we[ue]=we.hasOwnProperty(ue)&&we[ue]||[],we[ue].unshift(Y),r&&r(ie,ue,...O)}}return n&&(v.prototype=Object.create(n.prototype)),v.prototype.ngMetadataName=t,v.annotationCls=v,v})}const Fv=Vc("Attribute",t=>({attributeName:t,__NG_ELEMENT_ID__:()=>Yh(t)}));class tr{constructor(e,n){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=rr({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}new tr("AnalyzeForEntryComponents");class od{}lu("ContentChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!1,descendants:!1,emitDistinctChangesOnly:true,...e}),od),lu("ContentChild",(t,e={})=>({selector:t,first:!0,isViewQuery:!1,descendants:!0,...e}),od),lu("ViewChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!0,descendants:!0,emitDistinctChangesOnly:true,...e}),od),lu("ViewChild",(t,e)=>({selector:t,first:!0,isViewQuery:!0,descendants:!0,...e}),od);var fu,Rg,Qh;function Ei(t){const e=ii.ng;if(e&&e.\u0275compilerFacade)return e.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}!function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"}(fu||(fu={})),function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"}(Rg||(Rg={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(Qh||(Qh={}));const kg=Function;function Jl(t){return"function"==typeof t}function ms(t){return t.flat(Number.POSITIVE_INFINITY)}function Ta(t,e){t.forEach(n=>Array.isArray(n)?Ta(n,e):e(n))}function Oa(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Xh(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Ql(t,e){const n=[];for(let r=0;r=0?t[1|r]=n:(r=~r,function Uv(t,e,n,r){let u=t.length;if(u==e)t.push(n,r);else if(1===u)t.push(r,t[0]),t[0]=n;else{for(u--,t.push(t[u-1],t[u]);u>e;){const v=u-2;t[u]=t[v],u--}t[e]=n,t[e+1]=r}}(t,r,e,n)),r}function Bg(t,e){const n=Xl(t,e);if(n>=0)return t[1|n]}function Xl(t,e){return fo(t,e,1)}function fo(t,e,n){let r=0,u=t.length>>n;for(;u!==r;){const v=r+(u-r>>1),O=t[v<e?u=v:r=v+1}return~(u<new e(...n)}_zipTypesAndAnnotations(e,n){let r;r=Ql(typeof e>"u"?n.length:e.length);for(let u=0;u"u"?r[u]=[]:e[u]&&e[u]!=Object?r[u]=[e[u]]:r[u]=[],n&&null!=n[u]&&(r[u]=r[u].concat(n[u]));return r}_ownParameters(e,n){if(function Kv(t){return Lw.test(t)||Ug.test(t)||Nn.test(t)&&!ql.test(t)}(e.toString()))return null;if(e.parameters&&e.parameters!==n.parameters)return e.parameters;const u=e.ctorParameters;if(u&&u!==n.ctorParameters){const Y="function"==typeof u?u():u,$=Y.map(ue=>ue&&ue.type),ie=Y.map(ue=>ue&&Hc(ue.decorators));return this._zipTypesAndAnnotations($,ie)}const v=e.hasOwnProperty(zc)&&e[zc],O=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",e);return O||v?this._zipTypesAndAnnotations(O,v):Ql(e.length)}parameters(e){if(!Jl(e))return[];const n=Wc(e);let r=this._ownParameters(e,n);return!r&&n!==Object&&(r=this.parameters(n)),r||[]}_ownAnnotations(e,n){if(e.annotations&&e.annotations!==n.annotations){let r=e.annotations;return"function"==typeof r&&r.annotations&&(r=r.annotations),r}return e.decorators&&e.decorators!==n.decorators?Hc(e.decorators):e.hasOwnProperty(Kc)?e[Kc]:null}annotations(e){if(!Jl(e))return[];const n=Wc(e),r=this._ownAnnotations(e,n)||[];return(n!==Object?this.annotations(n):[]).concat(r)}_ownPropMetadata(e,n){if(e.propMetadata&&e.propMetadata!==n.propMetadata){let r=e.propMetadata;return"function"==typeof r&&r.propMetadata&&(r=r.propMetadata),r}if(e.propDecorators&&e.propDecorators!==n.propDecorators){const r=e.propDecorators,u={};return Object.keys(r).forEach(v=>{u[v]=Hc(r[v])}),u}return e.hasOwnProperty(Yl)?e[Yl]:null}propMetadata(e){if(!Jl(e))return{};const n=Wc(e),r={};if(n!==Object){const v=this.propMetadata(n);Object.keys(v).forEach(O=>{r[O]=v[O]})}const u=this._ownPropMetadata(e,n);return u&&Object.keys(u).forEach(v=>{const O=[];r.hasOwnProperty(v)&&O.push(...r[v]),O.push(...u[v]),r[v]=O}),r}ownPropMetadata(e){return Jl(e)&&this._ownPropMetadata(e,Wc(e))||{}}hasLifecycleHook(e,n){return e instanceof kg&&n in e.prototype}}function Hc(t){return t?t.map(e=>new(0,e.type.annotationCls)(...e.args?e.args:[])):[]}function Wc(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}const sd=jf(Vc("Inject",t=>({token:t})),-1),$l=jf(Vc("Optional"),8),$h=jf(Vc("Self"),2),ef=jf(Vc("SkipSelf"),4),Kg=jf(Vc("Host"),1);let e0=null;function Ti(){return e0=e0||new Fw}function Go(t){return du(Ti().parameters(t))}function du(t){return t.map(e=>function zv(t){const e={token:null,attribute:null,host:!1,optional:!1,self:!1,skipSelf:!1};if(Array.isArray(t)&&t.length>0)for(let n=0;n|^->||--!>|)/,s0="\u200b$1\u200b";function Ao(t){return t.replace(Hg,e=>e.replace(o0,s0))}const Ra=new Map;let fa=0;const pu="__ngContext__";function to(t,e){Ci(e)?(t[pu]=e[Tc],function Zv(t){Ra.set(t[Tc],t)}(e)):t[pu]=e}let Xu;function l0(t,e){return Xu(t,e)}function dd(t){const e=t[li];return ds(e)?e[li]:e}function Qg(t){return Xg(t[zf])}function f0(t){return Xg(t[Wo])}function Xg(t){for(;null!==t&&!ds(t);)t=t[Wo];return t}function sf(t,e,n,r,u){if(null!=r){let v,O=!1;ds(r)?v=r:Ci(r)&&(O=!0,r=r[Da]);const Y=Vi(r);0===t&&null!==n?null==u?ry(e,n,Y):Jc(e,n,Y,u||null,!0):1===t&&null!==n?Jc(e,n,Y,u||null,!0):2===t?le(e,Y,O):3===t&&e.destroyNode(Y),null!=v&&function bt(t,e,n,r,u){const v=n[ia],O=Vi(n);v!==O&&sf(e,t,r,v,u);for(let Y=fi;Y0&&(n[u-1][Wo]=e),r0&&(t[n-1][Wo]=r[Wo]);const v=Xh(t,fi+e);!function h0(t,e){Pe(t,e,e[yr],2,null,null),e[Da]=null,e[ao]=null}(r[Cn],r);const O=v[Bs];null!==O&&O.detachView(v[Cn]),r[li]=null,r[Wo]=null,r[kn]&=-65}return r}function ty(t,e){if(!(128&e[kn])){const n=e[yr];n.destroyNode&&Pe(t,e,n,3,null,null),function qg(t){let e=t[zf];if(!e)return y0(t[Cn],t);for(;e;){let n=null;if(Ci(e))n=e[zf];else{const r=e[fi];r&&(n=r)}if(!n){for(;e&&!e[Wo]&&e!==t;)Ci(e)&&y0(e[Cn],e),e=e[li];null===e&&(e=t),Ci(e)&&y0(e[Cn],e),n=e&&e[Wo]}e=n}}(e)}}function y0(t,e){if(!(128&e[kn])){e[kn]&=-65,e[kn]|=128,function v0(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let r=0;r=0?r[u=O]():r[u=-O].unsubscribe(),v+=2}else{const O=r[u=n[v+1]];n[v].call(O)}if(null!==r){for(let v=u+1;v-1){const{encapsulation:v}=t.data[r.directiveStart+u];if(v===Ma.None||v===Ma.Emulated)return null}return ai(r,n)}}function Jc(t,e,n,r,u){t.insertBefore(e,n,r,u)}function ry(t,e,n){t.appendChild(e,n)}function w0(t,e,n,r,u){null!==r?Jc(t,e,n,r,u):ry(t,e,n)}function Qc(t,e){return t.parentNode(e)}function $v(t,e,n){return e1(t,e,n)}function hd(t,e,n){return 40&t.type?ai(t,n):null}let Xc,Mn,vn,zn,e1=hd;function t1(t,e){e1=t,Xc=e}function qc(t,e,n,r){const u=ny(t,r,e),v=e[yr],Y=$v(r.parent||e[ao],r,e);if(null!=u)if(Array.isArray(n))for(let $=0;$t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Mn}function Tn(t){return Rn()?.createHTML(t)||t}function Pt(t,e,n){const r=sn(),u=sr(),v=ai(u,r);if(2===u.type&&"iframe"===e.toLowerCase()){const O=v;O.src="",O.srcdoc=Tn(""),le(r[yr],O);throw new yn(-910,!1)}return t}function Gn(){return void 0!==vn?vn:typeof document<"u"?document:void 0}function Yn(){if(void 0===zn&&(zn=null,ii.trustedTypes))try{zn=ii.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return zn}function Ji(t){return Yn()?.createHTML(t)||t}function Or(t){return Yn()?.createScript(t)||t}function gu(t){return Yn()?.createScriptURL(t)||t}class $c{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Ns})`}}class EO extends $c{getTypeName(){return"HTML"}}class SO extends $c{getTypeName(){return"Style"}}class _O extends $c{getTypeName(){return"Script"}}class MO extends $c{getTypeName(){return"URL"}}class DO extends $c{getTypeName(){return"ResourceURL"}}function ha(t){return t instanceof $c?t.changingThisBreaksApplicationSecurity:t}function qu(t,e){const n=function IO(t){return t instanceof $c&&t.getTypeName()||null}(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see ${Ns})`)}return n===e}function KS(t){const e=new RO(t);return function kO(){try{return!!(new window.DOMParser).parseFromString(Tn(""),"text/html")}catch{return!1}}()?new NO(e):e}class NO{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const n=(new window.DOMParser).parseFromString(Tn(e),"text/html").body;return null===n?this.inertDocumentHelper.getInertBodyElement(e):(n.removeChild(n.firstChild),n)}catch{return null}}}class RO{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){const n=this.inertDocument.createElement("template");return n.innerHTML=Tn(e),n}}const LO=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function n1(t){return(t=String(t)).match(LO)?t:"unsafe:"+t}function el(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function iy(...t){const e={};for(const n of t)for(const r in n)n.hasOwnProperty(r)&&(e[r]=!0);return e}const zS=el("area,br,col,hr,img,wbr"),VS=el("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),HS=el("rp,rt"),FO=iy(HS,VS),BO=iy(VS,el("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),jO=iy(HS,el("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Gw=iy(zS,BO,jO,FO),Zw=el("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),UO=el("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),KO=el("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),WS=iy(Zw,UO,KO),zO=el("script,style,template");class VO{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let n=e.firstChild,r=!0;for(;n;)if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild)n=n.firstChild;else for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let u=this.checkClobberedElement(n,n.nextSibling);if(u){n=u;break}n=this.checkClobberedElement(n,n.parentNode)}return this.buf.join("")}startElement(e){const n=e.nodeName.toLowerCase();if(!Gw.hasOwnProperty(n))return this.sanitizedSomething=!0,!zO.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);const r=e.attributes;for(let u=0;u"),!0}endElement(e){const n=e.nodeName.toLowerCase();Gw.hasOwnProperty(n)&&!zS.hasOwnProperty(n)&&(this.buf.push(""))}chars(e){this.buf.push(GS(e))}checkClobberedElement(e,n){if(n&&(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return n}}const HO=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,WO=/([^\#-~ |!])/g;function GS(t){return t.replace(/&/g,"&").replace(HO,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(WO,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let r1;function ZS(t,e){let n=null;try{r1=r1||KS(t);let r=e?String(e):"";n=r1.getInertBodyElement(r);let u=5,v=r;do{if(0===u)throw new Error("Failed to sanitize html because the input is unstable");u--,r=v,v=n.innerHTML,n=r1.getInertBodyElement(r)}while(r!==v);return Tn((new VO).sanitizeChildren(Yw(n)||n))}finally{if(n){const r=Yw(n)||n;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function Yw(t){return"content"in t&&function GO(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var pa;function ZO(t){const e=oy();return e?Ji(e.sanitize(pa.HTML,t)||""):qu(t,"HTML")?Ji(ha(t)):ZS(Gn(),ar(t))}function YO(t){const e=oy();return e?e.sanitize(pa.STYLE,t)||"":qu(t,"Style")?ha(t):ar(t)}function YS(t){const e=oy();return e?e.sanitize(pa.URL,t)||"":qu(t,"URL")?ha(t):n1(ar(t))}function JS(t){const e=oy();if(e)return gu(e.sanitize(pa.RESOURCE_URL,t)||"");if(qu(t,"ResourceURL"))return gu(ha(t));throw new yn(904,!1)}function JO(t){const e=oy();if(e)return Or(e.sanitize(pa.SCRIPT,t)||"");if(qu(t,"Script"))return Or(ha(t));throw new yn(905,!1)}function QO(t){return Tn(t[0])}function XO(t){return function Ct(t){return Rn()?.createScriptURL(t)||t}(t[0])}function $O(t,e,n){return function qO(t,e){return"src"===e&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===e&&("base"===t||"link"===t)?JS:YS}(e,n)(t)}function oy(){const t=sn();return t&&t[$p]}!function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}(pa||(pa={}));const QS=new tr("ENVIRONMENT_INITIALIZER"),XS=new tr("INJECTOR",-1),qS=new tr("INJECTOR_DEF_TYPES");class $S{get(e,n=Ls){if(n===Ls){const r=new Error(`NullInjectorError: No provider for ${er(e)}!`);throw r.name="NullInjectorError",r}return n}}function e9(...t){return{\u0275providers:e_(!0,t),\u0275fromNgModule:!0}}function e_(t,...e){const n=[],r=new Set;let u;return Ta(e,v=>{const O=v;Jw(O,n,[],r)&&(u||(u=[]),u.push(O))}),void 0!==u&&t_(u,n),n}function t_(t,e){for(let n=0;n{e.push(v)})}}function Jw(t,e,n,r){if(!(t=Pn(t)))return!1;let u=null,v=av(t);const O=!v&&Ur(t);if(v||O){if(O&&!O.standalone)return!1;u=t}else{const $=t.ngModule;if(v=av($),!v)return!1;u=$}const Y=r.has(u);if(O){if(Y)return!1;if(r.add(u),O.dependencies){const $="function"==typeof O.dependencies?O.dependencies():O.dependencies;for(const ie of $)Jw(ie,e,n,r)}}else{if(!v)return!1;{if(null!=v.imports&&!Y){let ie;r.add(u);try{Ta(v.imports,ue=>{Jw(ue,e,n,r)&&(ie||(ie=[]),ie.push(ue))})}finally{}void 0!==ie&&t_(ie,e)}if(!Y){const ie=Gu(u)||(()=>new u);e.push({provide:u,useFactory:ie,deps:jr},{provide:qS,useValue:u,multi:!0},{provide:QS,useValue:()=>Wn(u),multi:!0})}const $=v.providers;if(null!=$&&!Y){Qw($,ue=>{e.push(ue)})}}}return u!==t&&void 0!==t.providers}function Qw(t,e){for(let n of t)Vo(n)&&(n=n.\u0275providers),Array.isArray(n)?Qw(n,e):e(n)}const t9=$n({provide:String,useValue:$n});function Xw(t){return null!==t&&"object"==typeof t&&t9 in t}function n_(t){return!(!t||!t.useExisting)}function r_(t){return!(!t||!t.useFactory)}function pd(t){return"function"==typeof t}const qw=new tr("Set Injector scope."),i1={},r9={};let $w;function o1(){return void 0===$w&&($w=new $S),$w}class E0{}class i_ extends E0{get destroyed(){return this._destroyed}constructor(e,n,r,u){super(),this.parent=n,this.source=r,this.scopes=u,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,tA(e,O=>this.processProvider(O)),this.records.set(XS,S0(void 0,this)),u.has("environment")&&this.records.set(E0,S0(void 0,this));const v=this.records.get(qw);null!=v&&"string"==typeof v.value&&this.scopes.add(v.value),this.injectorDefTypes=new Set(this.get(qS.multi,jr,Mr.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const e of this._ngOnDestroyHooks)e.ngOnDestroy();for(const e of this._onDestroyHooks)e()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(e){this._onDestroyHooks.push(e)}runInContext(e){this.assertNotDestroyed();const n=Mc(this),r=ls(void 0);try{return e()}finally{Mc(n),ls(r)}}get(e,n=Ls,r=Mr.Default){this.assertNotDestroyed(),r=Dh(r);const u=Mc(this),v=ls(void 0);try{if(!(r&Mr.SkipSelf)){let Y=this.records.get(e);if(void 0===Y){const $=function u9(t){return"function"==typeof t||"object"==typeof t&&t instanceof tr}(e)&&Ah(e);Y=$&&this.injectableDefInScope($)?S0(eA(e),i1):null,this.records.set(e,Y)}if(null!=Y)return this.hydrate(e,Y)}const O=r&Mr.Self?o1():this.parent;return n=r&Mr.Optional&&n===Ls?null:n,O.get(e,n)}catch(O){if("NullInjectorError"===O.name){if((O[Sh]=O[Sh]||[]).unshift(er(e)),u)throw O;return Uf(O,e,"R3InjectorError",this.source)}throw O}finally{ls(v),Mc(u)}}resolveInjectorInitializers(){const e=Mc(this),n=ls(void 0);try{const r=this.get(QS.multi,jr,Mr.Self);for(const u of r)u()}finally{Mc(e),ls(n)}}toString(){const e=[],n=this.records;for(const r of n.keys())e.push(er(r));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new yn(205,!1)}processProvider(e){let n=pd(e=Pn(e))?e:Pn(e&&e.provide);const r=function o9(t){if(Xw(t))return S0(void 0,t.useValue);return S0(o_(t),i1)}(e);if(pd(e)||!0!==e.multi){this.records.get(n)}else{let u=this.records.get(n);u||(u=S0(void 0,i1,!0),u.factory=()=>Qp(u.multi),this.records.set(n,u)),n=e,u.multi.push(e)}this.records.set(n,r)}hydrate(e,n){return n.value===i1&&(n.value=r9,n.value=n.factory()),"object"==typeof n.value&&n.value&&function a9(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}injectableDefInScope(e){if(!e.providedIn)return!1;const n=Pn(e.providedIn);return"string"==typeof n?"any"===n||this.scopes.has(n):this.injectorDefTypes.has(n)}}function eA(t){const e=Ah(t),n=null!==e?e.factory:Gu(t);if(null!==n)return n;if(t instanceof tr)throw new yn(204,!1);if(t instanceof Function)return function i9(t){const e=t.length;if(e>0){Ql(e,"?");throw new yn(204,!1)}const n=function Sw(t){return t&&(t[Tl]||t[uv])||null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new yn(204,!1)}function o_(t,e,n){let r;if(pd(t)){const u=Pn(t);return Gu(u)||eA(u)}if(Xw(t))r=()=>Pn(t.useValue);else if(r_(t))r=()=>t.useFactory(...Qp(t.deps||[]));else if(n_(t))r=()=>Wn(Pn(t.useExisting));else{const u=Pn(t&&(t.useClass||t.provide));if(!function s9(t){return!!t.deps}(t))return Gu(u)||eA(u);r=()=>new u(...Qp(t.deps))}return r}function S0(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function tA(t,e){for(const n of t)Array.isArray(n)?tA(n,e):n&&Vo(n)?tA(n.\u0275providers,e):e(n)}class c9{}class s_{}const a_="ngComponent";class f9{resolveComponentFactory(e){throw function l9(t){const e=Error(`No component factory found for ${er(t)}. Did you add it to @NgModule.entryComponents?`);return e[a_]=t,e}(e)}}class sy{}function _0(t,e){return new ga(ai(t,e))}sy.NULL=new f9;class ga{constructor(e){this.nativeElement=e}}function h9(t){return t instanceof ga?t.nativeElement:t}ga.__NG_ELEMENT_ID__=function d9(){return _0(Hi(),sn())};class u_{}class tl{}tl.__NG_ELEMENT_ID__=()=>function p9(){const t=sn(),n=Oo(Hi().index,t);return(Ci(n)?n:t)[yr]}();class nA{}nA.\u0275prov=rr({token:nA,providedIn:"root",factory:()=>null});class s1{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const g9=new s1("15.2.9"),rA={},iA="ngOriginalError";function oA(t){return t[iA]}class M0{constructor(){this._console=console}handleError(e){const n=this._findOriginalError(e);this._console.error("ERROR",e),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(e){let n=e&&oA(e);for(;n&&oA(n);)n=oA(n);return n||null}}function A9(t){return t.ownerDocument.defaultView}function E9(t){return t.ownerDocument}function S9(t){return t.ownerDocument.body}function nl(t){return t instanceof Function?t():t}function l_(t,e,n){let r=t.length;for(;;){const u=t.indexOf(e,n);if(-1===u)return u;if(0===u||t.charCodeAt(u-1)<=32){const v=e.length;if(u+v===r||t.charCodeAt(u+v)<=32)return u}n=u+1}}const f_="ng-template";function D9(t,e,n){let r=0,u=!0;for(;rv?"":u[he+1].toLowerCase();const xe=8&r?we:null;if(xe&&-1!==l_(xe,ie,0)||2&r&&ie!==we){if(yu(r))return!1;O=!0}}}}else{if(!O&&!yu(r)&&!yu($))return!1;if(O&&yu($))continue;O=!1,r=$|1&r}}return yu(r)||O}function yu(t){return 0==(1&t)}function x9(t,e,n,r){if(null===e)return-1;let u=0;if(r||!n){let v=!1;for(;u-1)for(n++;n0?'="'+Y+'"':"")+"]"}else 8&r?u+="."+O:4&r&&(u+=" "+O);else""!==u&&!yu(O)&&(e+=p_(v,u),u=""),r=O,v=v||!yu(r);n++}return""!==u&&(e+=p_(v,u)),e}const hr={};function Jo(t){g_(Ar(),sn(),bo()+t,!1)}function g_(t,e,n,r){if(!r)if(3==(3&e[kn])){const v=t.preOrderCheckHooks;null!==v&&Ai(e,v,n)}else{const v=t.preOrderHooks;null!==v&&xi(e,v,0,n)}uu(n)}const y_={\u0275\u0275defineInjectable:rr,\u0275\u0275defineInjector:ks,\u0275\u0275inject:Wn,\u0275\u0275invalidFactoryDep:hv,resolveForwardRef:Pn};function F9(t,e){let n=null,r=null;t.hasOwnProperty(Tl)||Object.defineProperty(t,Tl,{get:()=>(null===n&&(n=Ei().compileInjectable(y_,`ng:///${t.name}/\u0275prov.js`,function K9(t,e){const n=e||{providedIn:null},r={name:t.name,type:t,typeArgumentCount:0,providedIn:n.providedIn};return(m_(n)||v_(n))&&void 0!==n.deps&&(r.deps=du(n.deps)),m_(n)?r.useClass=n.useClass:function j9(t){return B9 in t}(n)?r.useValue=n.useValue:v_(n)?r.useFactory=n.useFactory:function U9(t){return void 0!==t.useExisting}(n)&&(r.useExisting=n.useExisting),r}(t,e))),n)}),t.hasOwnProperty(na)||Object.defineProperty(t,na,{get:()=>{if(null===r){const u=Ei();r=u.compileFactory(y_,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,typeArgumentCount:0,deps:Go(t),target:u.FactoryTarget.Injectable})}return r},configurable:!0})}const B9=$n({provide:String,useValue:$n});function m_(t){return void 0!==t.useClass}function v_(t){return void 0!==t.useFactory}$i("Injectable",void 0,void 0,void 0,(t,e)=>F9(t,e));function b_(t,e=null,n=null,r){const u=w_(t,e,n,r);return u.resolveInjectorInitializers(),u}function w_(t,e=null,n=null,r,u=new Set){const v=[n||jr,e9(t)];return r=r||("object"==typeof t?void 0:er(t)),new i_(v,e||o1(),r||null,u)}class Qo{static create(e,n){if(Array.isArray(e))return b_({name:""},n,e,"");{const r=e.name??"";return b_({name:r},e.parent,e.providers,r)}}}function sA(t){return t.length>1?" ("+function z9(t){const e=[];for(let n=0;n-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(r=>er(r.token)).join(" -> ")+")":""}function aA(t,e,n,r){const u=[e],v=n(u),O=r?function y9(t,e){const n=`${t} caused by: ${e instanceof Error?e.message:e}`,r=Error(n);return r[iA]=e,r}(v,r):Error(v);return O.addKey=V9,O.keys=u,O.injectors=[t],O.constructResolvingMessage=n,O[iA]=r,O}function V9(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function A_(t,e){const n=[];for(let r=0,u=e.length;rWn(XS)}),Qo.__NG_ELEMENT_ID__=-1;class af{constructor(e,n){if(this.token=e,this.id=n,!e)throw new yn(208,!1);this.displayName=er(this.token)}static get(e){return E_.get(Pn(e))}static get numberOfKeys(){return E_.numberOfKeys}}const E_=new class Q9{constructor(){this._allKeys=new Map}get(e){if(e instanceof af)return e;if(this._allKeys.has(e))return this._allKeys.get(e);const n=new af(e,af.numberOfKeys);return this._allKeys.set(e,n),n}get numberOfKeys(){return this._allKeys.size}};class a1{constructor(e,n,r){this.key=e,this.optional=n,this.visibility=r}static fromKey(e){return new a1(e,!1,null)}}const X9=[];class S_{constructor(e,n,r){this.key=e,this.resolvedFactories=n,this.multiProvider=r,this.resolvedFactory=this.resolvedFactories[0]}}class q9{constructor(e,n){this.factory=e,this.dependencies=n}}function $9(t){let e,n;if(t.useClass){const r=Pn(t.useClass);e=Ti().factory(r),n=M_(r)}else t.useExisting?(e=r=>r,n=[a1.fromKey(af.get(t.useExisting))]):t.useFactory?(e=t.useFactory,n=function rP(t,e){if(e){const n=e.map(r=>[r]);return e.map(r=>D_(t,r,n))}return M_(t)}(t.useFactory,t.deps)):(e=()=>t.useValue,n=X9);return new q9(e,n)}function eP(t){return new S_(af.get(t.provide),[$9(t)],t.multi||!1)}function tP(t){const r=function nP(t,e){for(let n=0;n{if(n instanceof kg)e.push({provide:n,useClass:n});else if(n&&"object"==typeof n&&void 0!==n.provide)e.push(n);else{if(!Array.isArray(n))throw function Z9(t){return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${t}`)}(n);__(n,e)}}),e}function M_(t){const e=Ti().parameters(t);if(!e)return[];if(e.some(n=>null==n))throw A_(t,e);return e.map(n=>D_(t,n,e))}function D_(t,e,n){let r=null,u=!1;if(!Array.isArray(e))return uA(e instanceof sd?e.token:e,u,null);let v=null;for(let O=0;O=this._providers.length)throw function Y9(t){return Error(`Index ${t} is out-of-bounds.`)}(e);return this._providers[e]}_new(e){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function W9(t,e){return aA(t,e,function(n){return`Cannot instantiate cyclic dependency!${sA(n)}`})}(this,e.key);return this._instantiateProvider(e)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(e){if(e.multiProvider){const n=[];for(let r=0;rthis._getByReflectiveDependency(O))}catch(O){throw O.addKey&&O.addKey(this,e.key),O}try{v=r(...u)}catch(O){throw function G9(t,e,n,r){return aA(t,r,function(u){const v=er(u[0].token);return`${e.message}: Error during instantiation of ${v}!${sA(u)}.`},e)}(this,O,O.stack,e.key)}return v}_getByReflectiveDependency(e){return this._getByKey(e.key,e.visibility,e.optional?null:Ls)}_getByKey(e,n,r){return e===I0.INJECTOR_KEY?this:n instanceof $h?this._getByKeySelf(e,r):this._getByKeyDefault(e,r,n)}_getObjByKeyId(e){for(let n=0;n' "'+n.key.displayName+'" ').join(", ")}])`}toString(){return this.displayName}}function bn(t,e=Mr.Default){const n=sn();if(null===n)return Wn(t,e);return Pv(Hi(),n,Pn(t),e)}function oP(){throw new Error("invalid")}function I_(t,e){const n=t.contentQueries;if(null!==n)for(let r=0;rei&&g_(t,e,ei,!1),ki(O?2:0,u),n(r,u)}finally{uu(v),ki(O?3:1,u)}}function fA(t,e,n){if(ng(e)){const r=e.directiveStart,u=e.directiveEnd;for(let v=r;v0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(O)!=Y&&O.push(Y),O.push(n,r,v)}}(t,e,r,cy(t,n,u.hostVars,hr),u)}function $u(t,e,n,r,u,v){const O=ai(t,e);mA(e[yr],O,v,t.value,n,r,u)}function mA(t,e,n,r,u,v,O){if(null==v)t.removeAttribute(e,u,n);else{const Y=null==O?ar(v):O(v,r||"",u);t.setAttribute(e,u,Y,n)}}function DP(t,e,n,r,u,v){const O=v[e];if(null!==O){const Y=r.setInput;for(let $=0;$0&&vA(n)}}function vA(t){for(let r=Qg(t);null!==r;r=f0(r))for(let u=fi;u0&&vA(v)}const n=t[Cn].components;if(null!==n)for(let r=0;r0&&vA(u)}}function OP(t,e){const n=Oo(e,t),r=n[Cn];(function PP(t,e){for(let n=e.length;n-1&&(ey(e,r),Xh(n,r))}this._attachedToViewContainer=!1}ty(this._lView[Cn],this._lView)}onDestroy(e){T_(this._lView[Cn],this._lView,null,e)}markForCheck(){f1(this._cdRefInjectingView||this._lView)}detach(){this._lView[kn]&=-65}reattach(){this._lView[kn]|=64}detectChanges(){d1(this._lView[Cn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new yn(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function p0(t,e){Pe(t,e,e[yr],2,null,null)}(this._lView[Cn],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new yn(902,!1);this._appRef=e}}class NP extends ly{constructor(e){super(e),this._view=e}detectChanges(){const e=this._view;d1(e[Cn],e,e[oi],!1)}checkNoChanges(){}get context(){return null}}class U_ extends sy{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const n=Ur(e);return new fy(n,this.ngModule)}}function K_(t){const e=[];for(let n in t)if(t.hasOwnProperty(n)){const r=t[n];e.push({propName:r,templateName:n})}return e}class kP{constructor(e,n){this.injector=e,this.parentInjector=n}get(e,n,r){r=Dh(r);const u=this.injector.get(e,rA,r);return u!==rA||n===rA?u:this.parentInjector.get(e,n,r)}}class fy extends s_{get inputs(){return K_(this.componentDef.inputs)}get outputs(){return K_(this.componentDef.outputs)}constructor(e,n){super(),this.componentDef=e,this.ngModule=n,this.componentType=e.type,this.selector=function k9(t){return t.map(R9).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!n}create(e,n,r,u){let v=(u=u||this.ngModule)instanceof E0?u:u?.injector;v&&null!==this.componentDef.getStandaloneInjector&&(v=this.componentDef.getStandaloneInjector(v)||v);const O=v?new kP(e,v):e,Y=O.get(u_,null);if(null===Y)throw new yn(407,!1);const $=O.get(nA,null),ie=Y.createRenderer(null,this.componentDef),ue=this.componentDef.selectors[0][0]||"div",he=r?function lP(t,e,n){const r=n===Ma.ShadowDom;return t.selectRootElement(e,r)}(ie,r,this.componentDef.encapsulation):ka(ie,ue,function RP(t){const e=t.toLowerCase();return"svg"===e?Zu:"math"===e?ug:null}(ue)),we=this.componentDef.onPush?288:272,xe=pA(0,null,null,1,0,null,null,null,null,null),Ce=u1(null,xe,null,we,null,null,Y,ie,$,O,null);let Le,je;Uh(Ce);try{const Ue=this.componentDef;let $e,Je=null;Ue.findHostDirectiveDefs?($e=[],Je=new Map,Ue.findHostDirectiveDefs(Ue,$e,Je),$e.push(Ue)):$e=[Ue];const ht=function FP(t,e){const n=t[Cn],r=ei;return t[r]=e,C0(n,r,2,"#host",null)}(Ce,he),xt=function BP(t,e,n,r,u,v,O,Y){const $=u[Cn];!function jP(t,e,n,r){for(const u of t)e.mergedAttrs=Zl(e.mergedAttrs,u.hostAttrs);null!==e.mergedAttrs&&(h1(e,e.mergedAttrs,!0),null!==n&&ln(r,n,e))}(r,t,e,O);const ie=v.createRenderer(e,n),ue=u1(u,x_(n),null,n.onPush?32:16,u[t.index],t,v,ie,Y||null,null,null);return $.firstCreatePass&&yA($,t,r.length-1),l1(u,ue),u[t.index]=ue}(ht,he,Ue,$e,Ce,Y,ie);je=Us(xe,ei),he&&function KP(t,e,n,r){if(r)Vh(t,n,["ng-version",g9.full]);else{const{attrs:u,classes:v}=function L9(t){const e=[],n=[];let r=1,u=2;for(;r0&&pn(t,n,v.join(" "))}}(ie,Ue,he,r),void 0!==n&&function zP(t,e,n){const r=t.projection=[];for(let u=0;u=0;r--){const u=t[r];u.hostVars=e+=u.hostVars,u.hostAttrs=Zl(u.hostAttrs,n=Zl(n,u.hostAttrs))}}(r)}function AA(t){return t===ta?{}:t===jr?[]:t}function WP(t,e){const n=t.viewQuery;t.viewQuery=n?(r,u)=>{e(r,u),n(r,u)}:e}function GP(t,e){const n=t.contentQueries;t.contentQueries=n?(r,u,v)=>{e(r,u,v),n(r,u,v)}:e}function ZP(t,e){const n=t.hostBindings;t.hostBindings=n?(r,u)=>{e(r,u),n(r,u)}:e}const YP=["providersResolver"],JP=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function QP(t){let n,e=z_(t.type);n=xo(t)?e.\u0275cmp:e.\u0275dir;const r=t;for(const u of YP)r[u]=n[u];if(xo(n))for(const u of JP)r[u]=n[u]}function XP(t){return e=>{e.findHostDirectiveDefs=V_,e.hostDirectives=(Array.isArray(t)?t:t()).map(n=>"function"==typeof n?{directive:Pn(n),inputs:ta,outputs:ta}:{directive:Pn(n.directive),inputs:H_(n.inputs),outputs:H_(n.outputs)})}}function V_(t,e,n){if(null!==t.hostDirectives)for(const r of t.hostDirectives){const u=yi(r.directive);qP(u.declaredInputs,r.inputs),V_(u,e,n),n.set(u,r),e.push(u)}}function H_(t){if(void 0===t||0===t.length)return ta;const e={};for(let n=0;nO(Vi(ht[r.index])):r.index;let Je=null;if(!O&&Y&&(Je=function uN(t,e,n,r){const u=t.cleanup;if(null!=u)for(let v=0;v$?Y[$]:null}"string"==typeof O&&(v+=2)}return null}(t,e,u,r.index)),null!==Je){(Je.__ngLastListenerFn__||Je).__ngNextListenerFn__=v,Je.__ngLastListenerFn__=v,we=!1}else{v=a6(r,e,ue,v,!1);const ht=n.listen(je,u,v);he.push(v,ht),ie&&ie.push(u,$e,Ue,Ue+1)}}else v=a6(r,e,ue,v,!1);const xe=r.outputs;let Ce;if(we&&null!==xe&&(Ce=xe[u])){const Le=Ce.length;if(Le)for(let je=0;je-1?Oo(t.index,e):e);let $=s6(e,n,r,O),ie=v.__ngNextListenerFn__;for(;ie;)$=s6(e,n,ie,O)&&$,ie=ie.__ngNextListenerFn__;return u&&!1===$&&(O.preventDefault(),O.returnValue=!1),$}}function Ba(t=1){return mg(t)}function cN(t,e){let n=null;const r=function T9(t){const e=t.attrs;if(null!=e){const n=e.indexOf(5);if(!(1&n))return e[n+1]}return null}(t);for(let u=0;u>17&32767}function DA(t){return 2|t}function yd(t){return(131068&t)>>2}function IA(t,e){return-131069&t|e<<2}function CA(t){return 1|t}function gN(t,e,n,r,u,v){let O=v?e.classBindings:e.styleBindings,Y=uf(O),$=yd(O);t[r]=n;let ue,ie=!1;if(Array.isArray(n)){const he=n;ue=he[1],(null===ue||Xl(he,ue)>0)&&(ie=!0)}else ue=n;if(u)if(0!==$){const we=uf(t[Y+1]);t[r+1]=v1(we,Y),0!==we&&(t[we+1]=IA(t[we+1],r)),t[Y+1]=function hN(t,e){return 131071&t|e<<17}(t[Y+1],r)}else t[r+1]=v1(Y,0),0!==Y&&(t[Y+1]=IA(t[Y+1],r)),Y=r;else t[r+1]=v1($,0),0===Y?Y=r:t[$+1]=IA(t[$+1],r),$=r;ie&&(t[r+1]=DA(t[r+1])),y6(t,ue,r,!0,v),y6(t,ue,r,!1,v),function yN(t,e,n,r,u){const v=u?t.residualClasses:t.residualStyles;null!=v&&"string"==typeof e&&Xl(v,e)>=0&&(n[r+1]=CA(n[r+1]))}(e,ue,t,r,v),O=v1(Y,$),v?e.classBindings=O:e.styleBindings=O}function y6(t,e,n,r,u){const v=t[n+1],O=null===e;let Y=r?uf(v):yd(v),$=!1;for(;0!==Y&&(!1===$||O);){const ie=t[Y],ue=t[Y+1];mN(ie,e)&&($=!0,t[Y+1]=r?CA(ue):DA(ue)),Y=r?uf(ue):yd(ue)}$&&(t[n+1]=r?DA(v):CA(v))}function mN(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Xl(t,e)>=0}const ho={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function m6(t){return t.substring(ho.key,ho.keyEnd)}function vN(t){return t.substring(ho.value,ho.valueEnd)}function v6(t,e){const n=ho.textEnd;return n===e?-1:(e=ho.keyEnd=function AN(t,e,n){for(;e32;)e++;return e}(t,ho.key=e,n),B0(t,e,n))}function b6(t,e){const n=ho.textEnd;let r=ho.key=B0(t,e,n);return n===r?-1:(r=ho.keyEnd=function EN(t,e,n){let r;for(;e=65&&(-33&r)<=90||r>=48&&r<=57);)e++;return e}(t,r,n),r=A6(t,r,n,58),r=ho.value=B0(t,r,n),r=ho.valueEnd=function SN(t,e,n){let r=-1,u=-1,v=-1,O=e,Y=O;for(;O32&&(Y=O),v=u,u=r,r=-33&$}return Y}(t,r,n),A6(t,r,n,59))}function w6(t){ho.key=0,ho.keyEnd=0,ho.value=0,ho.valueEnd=0,ho.textEnd=t.length}function B0(t,e,n){for(;e=0;n=b6(e,n))M6(t,m6(e),vN(e))}function MN(t){vu(ON,nc,t,!0)}function nc(t,e){for(let n=function bN(t){return w6(t),v6(t,B0(t,0,ho.textEnd))}(e);n>=0;n=v6(e,n))Yr(t,m6(e),!0)}function mu(t,e,n,r){const u=sn(),v=Ar(),O=aa(2);if(v.firstUpdatePass&&_6(v,t,O,r),e!==hr&&Xo(u,O,e)){D6(v,v.data[bo()],u,u[yr],t,u[O+1]=function NN(t,e){return null==t||""===t||("string"==typeof e?t+=e:"object"==typeof t&&(t=er(ha(t)))),t}(e,n),r,O)}}function vu(t,e,n,r){const u=Ar(),v=aa(2);u.firstUpdatePass&&_6(u,null,v,r);const O=sn();if(n!==hr&&Xo(O,v,n)){const Y=u.data[bo()];if(C6(Y,r)&&!S6(u,v)){let $=r?Y.classesWithoutHost:Y.stylesWithoutHost;null!==$&&(n=so($,n||"")),SA(u,Y,O,n,r)}else!function PN(t,e,n,r,u,v,O,Y){u===hr&&(u=jr);let $=0,ie=0,ue=0=t.expandoStartIndex}function _6(t,e,n,r){const u=t.data;if(null===u[n+1]){const v=u[bo()],O=S6(t,n);C6(v,r)&&null===e&&!O&&(e=!1),e=function DN(t,e,n,r){const u=Fc(t);let v=r?e.residualClasses:e.residualStyles;if(null===u)0===(r?e.classBindings:e.styleBindings)&&(n=TA(null,t,e,n,r),n=yy(n,e.attrs,r),v=null);else{const O=e.directiveStylingLast;if(-1===O||t[O]!==u)if(n=TA(u,t,e,n,r),null===v){let $=function IN(t,e,n){const r=n?e.classBindings:e.styleBindings;if(0!==yd(r))return t[uf(r)]}(t,e,r);void 0!==$&&Array.isArray($)&&($=TA(null,t,e,$[1],r),$=yy($,e.attrs,r),function CN(t,e,n,r){const u=n?e.classBindings:e.styleBindings;t[uf(u)]=r}(t,e,r,$))}else v=function xN(t,e,n){let r;const u=e.directiveEnd;for(let v=1+e.directiveStylingLast;v0;){const $=t[u],ie=Array.isArray($),ue=ie?$[1]:$,he=null===ue;let we=n[u+1];we===hr&&(we=he?jr:void 0);let xe=he?Bg(we,r):ue===r?we:void 0;if(ie&&!w1(xe)&&(xe=Bg($,r)),w1(xe)&&(Y=xe,O))return Y;const Ce=t[u+1];u=O?uf(Ce):yd(Ce)}if(null!==e){let $=v?e.residualClasses:e.residualStyles;null!=$&&(Y=Bg($,r))}return Y}function w1(t){return void 0!==t}function C6(t,e){return 0!=(t.flags&(e?8:16))}function _i(t,e=""){const n=sn(),r=Ar(),u=t+ei,v=r.firstCreatePass?C0(r,u,1,e,null):r.data[u],O=n[u]=Yo(n[yr],e);qc(r,n,O,v),co(v,!1)}function A1(t){return j0("",t,""),A1}function j0(t,e,n){const r=sn(),u=T0(r,t,e,n);return u!==hr&&rl(r,bo(),u),j0}function x6(t,e,n,r,u){const v=sn(),O=O0(v,t,e,n,r,u);return O!==hr&&rl(v,bo(),O),x6}function T6(t,e,n,r,u,v,O){const Y=sn(),$=P0(Y,t,e,n,r,u,v,O);return $!==hr&&rl(Y,bo(),$),T6}function O6(t,e,n,r,u,v,O,Y,$){const ie=sn(),ue=N0(ie,t,e,n,r,u,v,O,Y,$);return ue!==hr&&rl(ie,bo(),ue),O6}function P6(t,e,n,r,u,v,O,Y,$,ie,ue){const he=sn(),we=R0(he,t,e,n,r,u,v,O,Y,$,ie,ue);return we!==hr&&rl(he,bo(),we),P6}function N6(t,e,n,r,u,v,O,Y,$,ie,ue,he,we){const xe=sn(),Ce=k0(xe,t,e,n,r,u,v,O,Y,$,ie,ue,he,we);return Ce!==hr&&rl(xe,bo(),Ce),N6}function R6(t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce){const Le=sn(),je=L0(Le,t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce);return je!==hr&&rl(Le,bo(),je),R6}function k6(t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce,Le,je){const Ue=sn(),$e=F0(Ue,t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce,Le,je);return $e!==hr&&rl(Ue,bo(),$e),k6}function L6(t){const e=sn(),n=x0(e,t);return n!==hr&&rl(e,bo(),n),L6}function RN(t,e,n){vu(Yr,nc,T0(sn(),t,e,n),!0)}function kN(t,e,n,r,u){vu(Yr,nc,O0(sn(),t,e,n,r,u),!0)}function LN(t,e,n,r,u,v,O){vu(Yr,nc,P0(sn(),t,e,n,r,u,v,O),!0)}function FN(t,e,n,r,u,v,O,Y,$){vu(Yr,nc,N0(sn(),t,e,n,r,u,v,O,Y,$),!0)}function jN(t,e,n,r,u,v,O,Y,$,ie,ue){vu(Yr,nc,R0(sn(),t,e,n,r,u,v,O,Y,$,ie,ue),!0)}function UN(t,e,n,r,u,v,O,Y,$,ie,ue,he,we){vu(Yr,nc,k0(sn(),t,e,n,r,u,v,O,Y,$,ie,ue,he,we),!0)}function KN(t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce){vu(Yr,nc,L0(sn(),t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce),!0)}function zN(t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce,Le,je){vu(Yr,nc,F0(sn(),t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce,Le,je),!0)}function VN(t){vu(Yr,nc,x0(sn(),t),!0)}function HN(t,e,n){tc(T0(sn(),t,e,n))}function WN(t,e,n,r,u){tc(O0(sn(),t,e,n,r,u))}function GN(t,e,n,r,u,v,O){tc(P0(sn(),t,e,n,r,u,v,O))}function ZN(t,e,n,r,u,v,O,Y,$){tc(N0(sn(),t,e,n,r,u,v,O,Y,$))}function YN(t,e,n,r,u,v,O,Y,$,ie,ue){tc(R0(sn(),t,e,n,r,u,v,O,Y,$,ie,ue))}function JN(t,e,n,r,u,v,O,Y,$,ie,ue,he,we){tc(k0(sn(),t,e,n,r,u,v,O,Y,$,ie,ue,he,we))}function QN(t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce){tc(L0(sn(),t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce))}function XN(t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce,Le,je){tc(F0(sn(),t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce,Le,je))}function qN(t){tc(x0(sn(),t))}function F6(t,e,n,r,u){return mu(t,T0(sn(),e,n,r),u,!1),F6}function B6(t,e,n,r,u,v,O){return mu(t,O0(sn(),e,n,r,u,v),O,!1),B6}function j6(t,e,n,r,u,v,O,Y,$){return mu(t,P0(sn(),e,n,r,u,v,O,Y),$,!1),j6}function U6(t,e,n,r,u,v,O,Y,$,ie,ue){return mu(t,N0(sn(),e,n,r,u,v,O,Y,$,ie),ue,!1),U6}function K6(t,e,n,r,u,v,O,Y,$,ie,ue,he,we){return mu(t,R0(sn(),e,n,r,u,v,O,Y,$,ie,ue,he),we,!1),K6}function z6(t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce){return mu(t,k0(sn(),e,n,r,u,v,O,Y,$,ie,ue,he,we,xe),Ce,!1),z6}function V6(t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce,Le,je){return mu(t,L0(sn(),e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce,Le),je,!1),V6}function H6(t,e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce,Le,je,Ue,$e){return mu(t,F0(sn(),e,n,r,u,v,O,Y,$,ie,ue,he,we,xe,Ce,Le,je,Ue),$e,!1),H6}function W6(t,e,n){return mu(t,x0(sn(),e),n,!1),W6}function G6(t,e,n){const r=sn();if(Xo(r,Lc(),e)){ya(Ar(),sr(),r,t,e,r[yr],n,!0)}return G6}function Z6(t,e,n){const r=sn();if(Xo(r,Lc(),e)){const v=Ar(),O=sr();ya(v,O,r,t,e,B_(Fc(v.data),O,r),n,!0)}return Z6}const md=void 0;var e7=["en",[["a","p"],["AM","PM"],md],[["AM","PM"],md,md],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],md,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],md,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",md,"{1} 'at' {0}",md],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function $N(t){const n=Math.floor(Math.abs(t)),r=t.toString().replace(/^[^.]*\.?/,"").length;return 1===n&&0===r?1:5}];let U0={};function As(t){const e=function t7(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=J6(e);if(n)return n;const r=e.split("-")[0];if(n=J6(r),n)return n;if("en"===r)return e7;throw new yn(701,!1)}function Y6(t){return As(t)[ci.PluralCase]}function J6(t){return t in U0||(U0[t]=ii.ng&&ii.ng.common&&ii.ng.common.locales&&ii.ng.common.locales[t]),U0[t]}var ci;!function(t){t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData"}(ci||(ci={}));const n7=["zero","one","two","few","many"];const K0="en-US",E1={marker:"element"},S1={marker:"ICU"};var Es;!function(t){t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT"}(Es||(Es={}));let Q6=K0;function X6(t){Rs(t,"Expected localeId to be defined"),"string"==typeof t&&(Q6=t.toLowerCase().replace(/_/g,"-"))}function q6(t,e,n){const r=e.insertBeforeIndex,u=Array.isArray(r)?r[0]:r;return null===u?hd(t,0,n):Vi(n[u])}function $6(t,e,n,r,u){const v=e.insertBeforeIndex;if(Array.isArray(v)){let O=r,Y=null;if(3&e.type||(Y=O,O=u),null!==O&&-1===e.componentOffset)for(let $=1;$1)for(let n=t.length-2;n>=0;n--){const r=t[n];tM(r)||s7(r,e)&&null===a7(r)&&u7(r,e.index)}}function tM(t){return!(64&t.type)}function s7(t,e){return tM(e)||t.index>e.index}function a7(t){const e=t.insertBeforeIndex;return Array.isArray(e)?e[0]:e}function u7(t,e){const n=t.insertBeforeIndex;Array.isArray(n)?n[0]=e:(t1(q6,$6),t.insertBeforeIndex=e)}function my(t,e){const n=t.data[e];return null===n||"string"==typeof n?null:n.hasOwnProperty("currentCaseLViewIndex")?n:n.value}function f7(t,e,n){const r=cA(t,n,64,null,null);return eM(e,r),r}function _1(t,e){const n=e[t.currentCaseLViewIndex];return null===n?n:n<0?~n:n}function nM(t){return t>>>17}function rM(t){return(131070&t)>>>1}let vy=0,by=0;function oM(t,e,n,r){const u=n[yr];let O,v=null;for(let Y=0;Y>>1,xe=e[++Y],Ce=e[++Y];mA(u,mo(we,n),null,null,xe,Ce,null)}else switch($){case S1:const ie=e[++Y],ue=e[++Y];if(null===n[ue]){to(n[ue]=Hw(u,ie),n)}break;case E1:const he=e[++Y],we=e[++Y];if(null===n[we]){to(n[we]=ka(u,he,null),n)}}}}function sM(t,e,n,r,u){for(let v=0;v>>2;switch(3&ue){case 1:const we=n[++ie],xe=n[++ie],Ce=t.data[he];"string"==typeof Ce?mA(e[yr],e[he],null,Ce,we,$,xe):ya(t,Ce,e,we,$,e[yr],xe,!1);break;case 0:const Le=e[he];null!==Le&&d0(e[yr],Le,$);break;case 2:y7(t,my(t,he),e,$);break;case 3:aM(t,my(t,he),r,e)}}}}else{const $=n[v+1];if($>0&&3==(3&$)){const ue=my(t,$>>>2);e[ue.currentCaseLViewIndex]<0&&aM(t,ue,r,e)}}v+=Y}}function aM(t,e,n,r){let u=r[e.currentCaseLViewIndex];if(null!==u){let v=vy;u<0&&(u=r[e.currentCaseLViewIndex]=~u,v=-1),sM(t,r,e.update[u],n,v)}}function y7(t,e,n,r){const u=function m7(t,e){let n=t.cases.indexOf(e);if(-1===n)switch(t.type){case 1:{const r=function r7(t,e){const n=Y6(e)(parseInt(t,10)),r=n7[n];return void 0!==r?r:"other"}(e,function o7(){return Q6}());n=t.cases.indexOf(r),-1===n&&"other"!==r&&(n=t.cases.indexOf("other"));break}case 0:n=t.cases.indexOf("other")}return-1===n?null:n}(e,r);if(_1(e,n)!==u&&(uM(t,e,n),n[e.currentCaseLViewIndex]=null===u?null:~u,null!==u)){const O=n[e.anchorIdx];O&&oM(t,e.create[u],n,O)}}function uM(t,e,n){let r=_1(e,n);if(null!==r){const u=e.remove[r];for(let v=0;v0){const Y=mo(O,n);null!==Y&&le(n[yr],Y)}else uM(t,my(t,~O),n)}}}function v7(){const t=[];let n,r,e=-1;function v(Y,$){e=0;const ie=_1(Y,$);r=null!==ie?Y.remove[ie]:jr}function O(){if(e0)return n[Y];{t.push(e,r);const $=~Y;return v(n[Cn].data[$],n),O()}}return 0===t.length?null:(r=t.pop(),e=t.pop(),O())}return function u(Y,$){for(n=$;t.length;)t.pop();return v(Y.value,$),O}}const M1=/\ufffd(\d+):?\d*\ufffd/gi,b7=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,w7=/\ufffd(\d+)\ufffd/,lM=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,wy="\ufffd",A7=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,E7=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,S7=/\uE500/g;function M7(t,e,n,r,u,v){const O=ys(),Y=[],$=[],ie=[[]];u=function T7(t,e){if(function x7(t){return-1===t}(e))return hM(t);{const n=t.indexOf(`:${e}${wy}`)+2+e.toString().length,r=t.search(new RegExp(`${wy}\\/\\*\\d+:${e}${wy}`));return hM(t.substring(n,r))}}(u,v);const ue=function _7(t){return t.replace(S7," ")}(u).split(E7);for(let he=0;hen.length&&n.push($)}return{type:r,mainBinding:u,cases:e,values:n}}function OA(t){if(!t)return[];let e=0;const n=[],r=[],u=/[{}]/g;let v;for(u.lastIndex=0;v=u.exec(t);){const Y=v.index;if("}"==v[0]){if(n.pop(),0==n.length){const $=t.substring(e,Y);lM.test($)?r.push(O7($)):r.push($),e=Y+1}}else{if(0==n.length){const $=t.substring(e,Y);r.push($),e=Y+1}n.push("{")}}const O=t.substring(e);return r.push(O),r}function P7(t,e,n,r,u,v,O,Y){const $=[],ie=[],ue=[];e.cases.push(v),e.create.push($),e.remove.push(ie),e.update.push(ue);const we=KS(Gn()).getInertBodyElement(O),xe=Yw(we)||we;return xe?gM(t,e,n,r,$,ie,ue,xe,u,Y,0):0}function gM(t,e,n,r,u,v,O,Y,$,ie,ue){let he=0,we=Y.firstChild;for(;we;){const xe=cy(t,n,1,null);switch(we.nodeType){case Node.ELEMENT_NODE:const Ce=we,Le=Ce.tagName.toLowerCase();if(Gw.hasOwnProperty(Le)){PA(u,E1,Le,$,xe),t.data[xe]=Le;const Je=Ce.attributes;for(let ht=0;ht>>Es.SHIFT;let he=t[ue];null===he&&(he=t[ue]=$?u.createComment(Y):Yo(u,Y)),ie&&null!==n&&Jc(u,n,he,r,!1)}})(u,$.create,ue,he),yg(!0)}function bM(){yg(!1)}function W7(t,e,n){vM(t,e,n),bM()}function G7(t,e){const n=Ar(),r=sa(n.consts,e);!function I7(t,e,n){const u=Hi().index,v=[];if(t.firstCreatePass&&null===t.data[e]){for(let O=0;O0){const r=t.data[n];sM(t,e,Array.isArray(r)?r:r.update,Ks()-by-1,vy)}vy=0,by=0}(Ar(),sn(),t+ei)}function Y7(t,e={}){return function H7(t,e={}){let n=t;if(F7.test(t)){const r={},u=[mM];n=n.replace(B7,(v,O,Y)=>{const $=O||Y,ie=r[$]||[];if(ie.length||($.split("|").forEach(Le=>{const je=Le.match(V7),Ue=je?parseInt(je[1],10):mM,$e=z7.test(Le);ie.push([Ue,$e,Le])}),r[$]=ie),!ie.length)throw new Error(`i18n postprocess: unmatched placeholder - ${$}`);const ue=u[u.length-1];let he=0;for(let Le=0;Lee.hasOwnProperty(v)?`${u}${e[v]}${$}`:r),n=n.replace(U7,(r,u)=>e.hasOwnProperty(u)?e[u]:r),n=n.replace(K7,(r,u)=>{if(e.hasOwnProperty(u)){const v=e[u];if(!v.length)throw new Error(`i18n postprocess: unmatched ICU - ${r} with key: ${u}`);return v.shift()}return r})),n}(t,e)}function NA(t,e,n,r,u){if(t=Pn(t),Array.isArray(t))for(let v=0;v>20;if(pd(t)||!t.multi){const xe=new Fi($,u,bn),Ce=kA(Y,e,u?ue:ue+we,he);-1===Ce?(Zh(nd(ie,O),v,Y),RA(v,t,e.length),e.push(Y),ie.directiveStart++,ie.directiveEnd++,u&&(ie.providerIndexes+=1048576),n.push(xe),O.push(xe)):(n[Ce]=xe,O[Ce]=xe)}else{const xe=kA(Y,e,ue+we,he),Ce=kA(Y,e,ue,ue+we),Le=xe>=0&&n[xe],je=Ce>=0&&n[Ce];if(u&&!je||!u&&!Le){Zh(nd(ie,O),v,Y);const Ue=function q7(t,e,n,r,u){const v=new Fi(t,n,bn);return v.multi=[],v.index=e,v.componentProviders=0,AM(v,u,r&&!n),v}(u?X7:Q7,n.length,u,r,$);!u&&je&&(n[Ce].providerFactory=Ue),RA(v,t,e.length,0),e.push(Y),ie.directiveStart++,ie.directiveEnd++,u&&(ie.providerIndexes+=1048576),n.push(Ue),O.push(Ue)}else{RA(v,t,xe>-1?xe:Ce,AM(n[u?Ce:xe],$,!u&&r))}!u&&r&&je&&n[Ce].componentProviders++}}}function RA(t,e,n,r){const u=pd(e),v=function n9(t){return!!t.useClass}(e);if(u||v){const $=(v?Pn(e.useClass):e).prototype.ngOnDestroy;if($){const ie=t.destroyHooks||(t.destroyHooks=[]);if(!u&&e.multi){const ue=ie.indexOf(n);-1===ue?ie.push(n,[r,$]):ie[ue+1].push(r,$)}else ie.push(n,$)}}}function AM(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function kA(t,e,n,r){for(let u=n;u{n.providersResolver=(r,u)=>function J7(t,e,n){const r=Ar();if(r.firstCreatePass){const u=xo(t);NA(n,r.data,r.blueprint,u,!0),NA(e,r.data,r.blueprint,u,!1)}}(r,u?u(t):t,e)}}class z0{}class $7{}class EM extends z0{constructor(e,n){super(),this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new U_(this);const r=fs(e);this._bootstrapComponents=nl(r.bootstrap),this._r3Injector=w_(e,n,[{provide:z0,useValue:this},{provide:sy,useValue:this.componentFactoryResolver}],er(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class FA extends $7{constructor(e){super(),this.moduleType=e}create(e){return new EM(this.moduleType,e)}}class tR extends z0{constructor(e,n,r){super(),this.componentFactoryResolver=new U_(this),this.instance=null;const u=new i_([...e,{provide:z0,useValue:this},{provide:sy,useValue:this.componentFactoryResolver}],n||o1(),r,new Set(["environment"]));this.injector=u,u.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function SM(t,e,n=null){return new tR(t,e,n).injector}class D1{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const n=e_(0,e.type),r=n.length>0?SM([n],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}function nR(t){t.getStandaloneInjector=e=>e.get(D1).getOrCreateStandaloneInjector(t)}function fR(t,e,n){const r=vo()+t,u=sn();return u[r]===hr?ec(u,r,n?e.call(n):e()):dy(u,r)}function TM(t,e,n,r){return OM(sn(),vo(),t,e,n,r)}function dR(t,e,n,r,u){return PM(sn(),vo(),t,e,n,r,u)}function hR(t,e,n,r,u,v){return NM(sn(),vo(),t,e,n,r,u,v)}function pR(t,e,n,r,u,v,O){return RM(sn(),vo(),t,e,n,r,u,v,O)}function gR(t,e,n,r,u,v,O,Y){const $=vo()+t,ie=sn(),ue=La(ie,$,n,r,u,v);return Xo(ie,$+4,O)||ue?ec(ie,$+5,Y?e.call(Y,n,r,u,v,O):e(n,r,u,v,O)):dy(ie,$+5)}function yR(t,e,n,r,u,v,O,Y,$){const ie=vo()+t,ue=sn(),he=La(ue,ie,n,r,u,v);return gd(ue,ie+4,O,Y)||he?ec(ue,ie+6,$?e.call($,n,r,u,v,O,Y):e(n,r,u,v,O,Y)):dy(ue,ie+6)}function mR(t,e,n,r,u,v,O,Y,$,ie){const ue=vo()+t,he=sn();let we=La(he,ue,n,r,u,v);return y1(he,ue+4,O,Y,$)||we?ec(he,ue+7,ie?e.call(ie,n,r,u,v,O,Y,$):e(n,r,u,v,O,Y,$)):dy(he,ue+7)}function vR(t,e,n,r,u,v,O,Y,$,ie,ue){const he=vo()+t,we=sn(),xe=La(we,he,n,r,u,v);return La(we,he+4,O,Y,$,ie)||xe?ec(we,he+8,ue?e.call(ue,n,r,u,v,O,Y,$,ie):e(n,r,u,v,O,Y,$,ie)):dy(we,he+8)}function bR(t,e,n,r){return kM(sn(),vo(),t,e,n,r)}function Ey(t,e){const n=t[e];return n===hr?void 0:n}function OM(t,e,n,r,u,v){const O=e+n;return Xo(t,O,u)?ec(t,O+1,v?r.call(v,u):r(u)):Ey(t,O+1)}function PM(t,e,n,r,u,v,O){const Y=e+n;return gd(t,Y,u,v)?ec(t,Y+2,O?r.call(O,u,v):r(u,v)):Ey(t,Y+2)}function NM(t,e,n,r,u,v,O,Y){const $=e+n;return y1(t,$,u,v,O)?ec(t,$+3,Y?r.call(Y,u,v,O):r(u,v,O)):Ey(t,$+3)}function RM(t,e,n,r,u,v,O,Y,$){const ie=e+n;return La(t,ie,u,v,O,Y)?ec(t,ie+4,$?r.call($,u,v,O,Y):r(u,v,O,Y)):Ey(t,ie+4)}function kM(t,e,n,r,u,v){let O=e+n,Y=!1;for(let $=0;$=0;n--){const r=e[n];if(t===r.name)return r}}(e,n.pipeRegistry),n.data[u]=r,r.onDestroy&&(n.destroyHooks??(n.destroyHooks=[])).push(u,r.onDestroy)):r=n.data[u];const v=r.factory||(r.factory=Gu(r.type)),O=ls(bn);try{const Y=Uc(!1),$=v();return Uc(Y),function iN(t,e,n,r){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=r}(n,sn(),u,$),$}finally{ls(O)}}function ER(t,e,n){const r=t+ei,u=sn(),v=Rc(u,r);return Sy(u,r)?OM(u,vo(),e,v.transform,n,v):v.transform(n)}function SR(t,e,n,r){const u=t+ei,v=sn(),O=Rc(v,u);return Sy(v,u)?PM(v,vo(),e,O.transform,n,r,O):O.transform(n,r)}function _R(t,e,n,r,u){const v=t+ei,O=sn(),Y=Rc(O,v);return Sy(O,v)?NM(O,vo(),e,Y.transform,n,r,u,Y):Y.transform(n,r,u)}function MR(t,e,n,r,u,v){const O=t+ei,Y=sn(),$=Rc(Y,O);return Sy(Y,O)?RM(Y,vo(),e,$.transform,n,r,u,v,$):$.transform(n,r,u,v)}function DR(t,e,n){const r=t+ei,u=sn(),v=Rc(u,r);return Sy(u,r)?kM(u,vo(),e,v.transform,n,v):v.transform.apply(v,n)}function Sy(t,e){return t[Cn].data[e].pure}D1.\u0275prov=rr({token:D1,providedIn:"environment",factory:()=>new D1(Wn(E0))});function jA(t){return e=>{setTimeout(t,void 0,e)}}const So=class IR extends $t{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,n,r){let u=e,v=n||(()=>null),O=r;if(e&&"object"==typeof e){const $=e;u=$.next?.bind($),v=$.error?.bind($),O=$.complete?.bind($)}this.__isAsync&&(v=jA(v),u&&(u=jA(u)),O&&(O=jA(O)));const Y=super.subscribe({next:u,error:v,complete:O});return e instanceof pe&&e.add(Y),Y}};function CR(){return this._results[Symbol.iterator]()}class UA{get changes(){return this._changes||(this._changes=new So)}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const n=UA.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=CR)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,n){return this._results.reduce(e,n)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,n){const r=this;r.dirty=!1;const u=ms(e);(this._changesDetected=!function Lg(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r0;)this.remove(this.length-1)}get(e){const n=FM(this._lContainer);return null!==n&&n[e]||null}get length(){return this._lContainer.length-fi}createEmbeddedView(e,n,r){let u,v;"number"==typeof r?u=r:null!=r&&(u=r.index,v=r.injector);const O=e.createEmbeddedView(n||{},v);return this.insert(O,u),O}createComponent(e,n,r,u,v){const O=e&&!Jl(e);let Y;if(O)Y=n;else{const he=n||{};Y=he.index,r=he.injector,u=he.projectableNodes,v=he.environmentInjector||he.ngModuleRef}const $=O?e:new fy(Ur(e)),ie=r||this.parentInjector;if(!v&&null==$.ngModule){const we=(O?ie:this.parentInjector).get(E0,null);we&&(v=we)}const ue=$.create(ie,u,void 0,v);return this.insert(ue.hostView,Y),ue}insert(e,n){const r=e._lView,u=r[Cn];if(function wv(t){return ds(t[li])}(r)){const ue=this.indexOf(e);if(-1!==ue)this.detach(ue);else{const he=r[li],we=new LM(he,he[ao],he[li]);we.detach(we.indexOf(e))}}const v=this._adjustIndex(n),O=this._lContainer;$g(u,r,O,v);const Y=re(v,O),$=r[yr],ie=Qc($,O[ia]);return null!==ie&&function Yc(t,e,n,r,u,v){r[Da]=u,r[ao]=e,Pe(t,r,n,1,u,v)}(u,O[ao],$,r,ie,Y),e.attachToViewContainerRef(),Oa(KA(O),v,e),e}move(e,n){return this.insert(e,n)}indexOf(e){const n=FM(this._lContainer);return null!==n?n.indexOf(e):-1}remove(e){const n=this._adjustIndex(e,-1),r=ey(this._lContainer,n);r&&(Xh(KA(this._lContainer),n),ty(r[Cn],r))}detach(e){const n=this._adjustIndex(e,-1),r=ey(this._lContainer,n);return r&&null!=Xh(KA(this._lContainer),n)?new ly(r):null}_adjustIndex(e,n=0){return e??this.length+n}};function FM(t){return t[Vf]}function KA(t){return t[Vf]||(t[Vf]=[])}function BM(t,e){let n;const r=e[t.index];if(ds(r))n=r;else{let u;if(8&t.type)u=Vi(r);else{const v=e[yr];u=v.createComment("");const O=ai(t,e);Jc(v,Qc(v,O),u,function qv(t,e){return t.nextSibling(e)}(v,O),!1)}e[t.index]=n=k_(r,e,u,t),l1(e,n)}return new LM(n,t,e)}class zA{constructor(e){this.queryList=e,this.matches=null}clone(){return new zA(this.queryList)}setDirty(){this.queryList.setDirty()}}class VA{constructor(e=[]){this.queries=e}createEmbeddedView(e){const n=e.queries;if(null!==n){const r=null!==e.contentQueries?e.contentQueries[0]:n.length,u=[];for(let v=0;v0)r.push(O[Y/2]);else{const ie=v[Y+1],ue=e[-$];for(let he=fi;he(null===u&&(u=Ei().compileNgModule(Ss,`ng:///${t.name}/\u0275mod.js`,{type:t,bootstrap:ms(e.bootstrap||jr).map(Pn),declarations:r.map(Pn),imports:ms(e.imports||jr).map(Pn).map(XM),exports:ms(e.exports||jr).map(Pn).map(XM),schemas:e.schemas?ms(e.schemas):null,id:e.id||null}),u.schemas||(u.schemas=[])),u)});let v=null;Object.defineProperty(t,na,{get:()=>{if(null===v){const Y=Ei();v=Y.compileFactory(Ss,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,deps:Go(t),target:Y.FactoryTarget.NgModule,typeArgumentCount:0})}return v},configurable:!1});let O=null;Object.defineProperty(t,Ac,{get:()=>{if(null===O){const Y={name:t.name,type:t,providers:e.providers||jr,imports:[(e.imports||jr).map(Pn),(e.exports||jr).map(Pn)]};O=Ei().compileInjector(Ss,`ng:///${t.name}/\u0275inj.js`,Y)}return O},configurable:!1})})(t,e),void 0!==e.id&&Gi(t,e.id),function ZR(t,e){_y.push({moduleType:t,ngModule:e})}(t,e)}function qR(t,e){const n=ms(e.declarations||jr),r=H0(t);n.forEach(u=>{if((u=Pn(u)).hasOwnProperty(Ih)){QM(Ur(u),r)}else!u.hasOwnProperty(zu)&&!u.hasOwnProperty(Kf)&&(u.ngSelectorScope=t)})}function QM(t,e){t.directiveDefs=()=>Array.from(e.compilation.directives).map(n=>n.hasOwnProperty(Ih)?Ur(n):yi(n)).filter(n=>!!n),t.pipeDefs=()=>Array.from(e.compilation.pipes).map(n=>yo(n)),t.schemas=e.schemas,t.tView=null}function H0(t){if(WM(t))return function $R(t){const e=fs(t,!0);if(null!==e.transitiveCompileScopes)return e.transitiveCompileScopes;const n={schemas:e.schemas||null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set}};return nl(e.imports).forEach(r=>{const u=H0(r);u.exported.directives.forEach(v=>n.compilation.directives.add(v)),u.exported.pipes.forEach(v=>n.compilation.pipes.add(v))}),nl(e.declarations).forEach(r=>{yo(r)?n.compilation.pipes.add(r):n.compilation.directives.add(r)}),nl(e.exports).forEach(r=>{const u=r;if(WM(u)){const v=H0(u);v.exported.directives.forEach(O=>{n.compilation.directives.add(O),n.exported.directives.add(O)}),v.exported.pipes.forEach(O=>{n.compilation.pipes.add(O),n.exported.pipes.add(O)})}else yo(u)?n.exported.pipes.add(u):n.exported.directives.add(u)}),e.transitiveCompileScopes=n,n}(t);if(Ic(t)){if(null!==(Ur(t)||yi(t)))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set([t]),pipes:new Set}};if(null!==yo(t))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set([t])}}}throw new Error(`${t.name} does not have a module def (\u0275mod property)`)}function XM(t){return HM(t)?t.ngModule:t}let QA=0;function ek(t,e){let n=null;(function Pa(t,e){zg(e)&&(wo.set(t,e),tf.add(t))})(t,e),e5(t,e),Object.defineProperty(t,Ih,{get:()=>{if(null===n){const r=Ei();if(zg(e)){const ie=[`Component '${t.name}' is not resolved:`];throw e.templateUrl&&ie.push(` - templateUrl: ${e.templateUrl}`),e.styleUrls&&e.styleUrls.length&&ie.push(` - styleUrls: ${JSON.stringify(e.styleUrls)}`),ie.push("Did you run and wait for 'resolveComponentResources()'?"),new Error(ie.join("\n"))}const u=function GR(){return V0}();let v=e.preserveWhitespaces;void 0===v&&(v=null!==u&&void 0!==u.preserveWhitespaces&&u.preserveWhitespaces);let O=e.encapsulation;void 0===O&&(O=null!==u&&void 0!==u.defaultEncapsulation?u.defaultEncapsulation:Ma.Emulated);const Y=e.templateUrl||`ng:///${t.name}/template.html`,$={...t5(t,e),typeSourceSpan:r.createParseSourceSpan("Component",t.name,Y),template:e.template||"",preserveWhitespaces:v,styles:e.styles||jr,animations:e.animations,declarations:[],changeDetection:e.changeDetection,encapsulation:O,interpolation:e.interpolation,viewProviders:e.viewProviders||null};QA++;try{if($.usesInheritance&&n5(t),n=r.compileComponent(Ss,Y,$),e.standalone){const ie=ms(e.imports||jr),{directiveDefs:ue,pipeDefs:he}=function nk(t,e){let n=null,r=null;return{directiveDefs:()=>{if(null===n){n=[Ur(t)];const O=new Set;for(const Y of e){const $=Pn(Y);if(!O.has($))if(O.add($),fs($)){const ie=H0($);for(const ue of ie.exported.directives){const he=Ur(ue)||yi(ue);he&&!O.has(ue)&&(O.add(ue),n.push(he))}}else{const ie=Ur($)||yi($);ie&&n.push(ie)}}}return n},pipeDefs:()=>{if(null===r){r=[];const O=new Set;for(const Y of e){const $=Pn(Y);if(!O.has($))if(O.add($),fs($)){const ie=H0($);for(const ue of ie.exported.pipes){const he=yo(ue);he&&!O.has(ue)&&(O.add(ue),r.push(he))}}else{const ie=yo($);ie&&r.push(ie)}}}return r}}}(t,ie);n.directiveDefs=ue,n.pipeDefs=he,n.dependencies=()=>ie.map(Pn)}}finally{QA--}if(0===QA&&function YR(){if(!ZA){ZA=!0;try{for(let t=_y.length-1;t>=0;t--){const{moduleType:e,ngModule:n}=_y[t];n.declarations&&n.declarations.every(GM)&&(_y.splice(t,1),qR(e,n))}}finally{ZA=!1}}}(),function rk(t){return void 0!==t.ngSelectorScope}(t)){const ie=H0(t.ngSelectorScope);QM(n,ie)}if(e.schemas){if(!e.standalone)throw new Error(`The 'schemas' was specified for the ${kr(t)} but is only valid on a component that is standalone.`);n.schemas=e.schemas}else e.standalone&&(n.schemas=[])}return n},configurable:!1})}function qM(t,e){let n=null;e5(t,e||{}),Object.defineProperty(t,zu,{get:()=>{if(null===n){const r=$M(t,e||{});n=Ei().compileDirective(Ss,r.sourceMapUrl,r.metadata)}return n},configurable:!1})}function $M(t,e){const n=t&&t.name,r=`ng:///${n}/\u0275dir.js`,u=Ei(),v=t5(t,e);return v.typeSourceSpan=u.createParseSourceSpan("Directive",n,r),v.usesInheritance&&n5(t),{metadata:v,sourceMapUrl:r}}function e5(t,e){let n=null;Object.defineProperty(t,na,{get:()=>{if(null===n){const r=$M(t,e),u=Ei();n=u.compileFactory(Ss,`ng:///${t.name}/\u0275fac.js`,{name:r.metadata.name,type:r.metadata.type,typeArgumentCount:0,deps:Go(t),target:u.FactoryTarget.Directive})}return n},configurable:!1})}function ik(t){return Object.getPrototypeOf(t.prototype)===Object.prototype}function t5(t,e){const n=Ti(),r=n.ownPropMetadata(t);return{name:t.name,type:t,selector:void 0!==e.selector?e.selector:null,host:e.host||ta,propMetadata:r,inputs:e.inputs||jr,outputs:e.outputs||jr,queries:r5(t,r,i5),lifecycle:{usesOnChanges:n.hasLifecycleHook(t,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!ik(t),exportAs:ak(e.exportAs),providers:e.providers||null,viewQueries:r5(t,r,o5),isStandalone:!!e.standalone,hostDirectives:e.hostDirectives?.map(u=>"function"==typeof u?{directive:u}:u)||null}}function n5(t){const e=Object.prototype;let n=Object.getPrototypeOf(t.prototype).constructor;for(;n&&n!==e;)!yi(n)&&!Ur(n)&&ck(n)&&qM(n,null),n=Object.getPrototypeOf(n)}function ok(t){return"string"==typeof t?a5(t):Pn(t)}function sk(t,e){return{propertyName:t,predicate:ok(e.selector),descendants:e.descendants,first:e.first,read:e.read?e.read:null,static:!!e.static,emitDistinctChangesOnly:!!e.emitDistinctChangesOnly}}function r5(t,e,n){const r=[];for(const u in e)if(e.hasOwnProperty(u)){const v=e[u];v.forEach(O=>{if(n(O)){if(!O.selector)throw new Error(`Can't construct a query for the property "${u}" of "${kr(t)}" since the query selector wasn't defined.`);if(v.some(s5))throw new Error("Cannot combine @Input decorators with query decorators");r.push(sk(u,O))}})}return r}function ak(t){return void 0===t?null:a5(t)}function i5(t){const e=t.ngMetadataName;return"ContentChild"===e||"ContentChildren"===e}function o5(t){const e=t.ngMetadataName;return"ViewChild"===e||"ViewChildren"===e}function s5(t){return"Input"===t.ngMetadataName}function a5(t){return t.split(",").map(e=>e.trim())}const uk=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function ck(t){const e=Ti();if(uk.some(r=>e.hasLifecycleHook(t,r)))return!0;const n=e.propMetadata(t);for(const r in n){const u=n[r];for(let v=0;vt,void 0,void 0,(t,e)=>qM(t,e));$i("Component",(t={})=>({changeDetection:Dc.Default,...t}),fk,void 0,(t,e)=>ek(t,e)),$i("Pipe",t=>({pure:!0,...t}),void 0,void 0,(t,e)=>function lk(t,e){let n=null,r=null;Object.defineProperty(t,na,{get:()=>{if(null===r){const u=u5(t,e),v=Ei(u.type);r=v.compileFactory(Ss,`ng:///${u.name}/\u0275fac.js`,{name:u.name,type:u.type,typeArgumentCount:0,deps:Go(t),target:v.FactoryTarget.Pipe})}return r},configurable:!1}),Object.defineProperty(t,Kf,{get:()=>{if(null===n){const u=u5(t,e);n=Ei(u.type).compilePipe(Ss,`ng:///${u.name}/\u0275pipe.js`,u)}return n},configurable:!1})}(t,e)),lu("Input",t=>({bindingPropertyName:t})),lu("Output",t=>({bindingPropertyName:t})),lu("HostBinding",t=>({hostPropertyName:t})),lu("HostListener",(t,e)=>({eventName:t,args:e})),$i("NgModule",t=>t,void 0,void 0,(t,e)=>JR(t,e));function x1(...t){}const c5=new tr("Application Initializer");class ol{constructor(e){this.appInits=e,this.resolve=x1,this.reject=x1,this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],n=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{u.subscribe({complete:O,error:Y})});e.push(v)}}Promise.all(e).then(()=>{n()}).catch(r=>{this.reject(r)}),0===e.length&&n(),this.initialized=!0}}ol.\u0275fac=function(e){return new(e||ol)(Wn(c5,8))},ol.\u0275prov=rr({token:ol,factory:ol.\u0275fac,providedIn:"root"});const W0=new tr("AppId",{providedIn:"root",factory:l5});function l5(){return`${XA()}${XA()}${XA()}`}function XA(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const f5=new tr("Platform Initializer"),qA=new tr("Platform ID",{providedIn:"platform",factory:()=>"unknown"});new tr("Application Packages Root URL"),new tr("AnimationModuleType");class vd{log(e){console.log(e)}warn(e){console.warn(e)}}vd.\u0275fac=function(e){return new(e||vd)},vd.\u0275prov=rr({token:vd,factory:vd.\u0275fac,providedIn:"platform"});const sl=new tr("LocaleId",{providedIn:"root",factory:()=>Ki(sl,Mr.Optional|Mr.SkipSelf)||function dk(){return typeof $localize<"u"&&$localize.locale||K0}()}),hk=new tr("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});new tr("Translations"),new tr("TranslationsFormat");var d5;!function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"}(d5||(d5={}));class pk{constructor(e,n){this.ngModuleFactory=e,this.componentFactories=n}}class My{compileModuleSync(e){return new FA(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),u=nl(fs(e).declarations).reduce((v,O)=>{const Y=Ur(O);return Y&&v.push(new fy(Y)),v},[]);return new pk(n,u)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}My.\u0275fac=function(e){return new(e||My)},My.\u0275prov=rr({token:My,factory:My.\u0275fac,providedIn:"root"});new tr("compilerOptions");const mk=Promise.resolve(0);function $A(t){typeof Zone>"u"?mk.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class qo{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new So(!1),this.onMicrotaskEmpty=new So(!1),this.onStable=new So(!1),this.onError=new So(!1),typeof Zone>"u")throw new yn(908,!1);Zone.assertZonePatched();const u=this;u._nesting=0,u._outer=u._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(u._inner=u._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(u._inner=u._inner.fork(Zone.longStackTraceZoneSpec)),u.shouldCoalesceEventChangeDetection=!r&&n,u.shouldCoalesceRunChangeDetection=r,u.lastRequestAnimationFrameId=-1,u.nativeRequestAnimationFrame=function vk(){let t=ii.requestAnimationFrame,e=ii.cancelAnimationFrame;if(typeof Zone<"u"&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function Ak(t){const e=()=>{!function wk(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(ii,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,t2(t),t.isCheckStableRunning=!0,e2(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),t2(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,u,v,O,Y)=>{try{return g5(t),n.invokeTask(u,v,O,Y)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===v.type||t.shouldCoalesceRunChangeDetection)&&e(),y5(t)}},onInvoke:(n,r,u,v,O,Y,$)=>{try{return g5(t),n.invoke(u,v,O,Y,$)}finally{t.shouldCoalesceRunChangeDetection&&e(),y5(t)}},onHasTask:(n,r,u,v)=>{n.hasTask(u,v),r===u&&("microTask"==v.change?(t._hasPendingMicrotasks=v.microTask,t2(t),e2(t)):"macroTask"==v.change&&(t.hasPendingMacrotasks=v.macroTask))},onHandleError:(n,r,u,v)=>(n.handleError(u,v),t.runOutsideAngular(()=>t.onError.emit(v)),!1)})}(u)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!qo.isInAngularZone())throw new yn(909,!1)}static assertNotInAngularZone(){if(qo.isInAngularZone())throw new yn(909,!1)}run(e,n,r){return this._inner.run(e,n,r)}runTask(e,n,r,u){const v=this._inner,O=v.scheduleEventTask("NgZoneEvent: "+u,e,bk,x1,x1);try{return v.runTask(O,n,r)}finally{v.cancelTask(O)}}runGuarded(e,n,r){return this._inner.runGuarded(e,n,r)}runOutsideAngular(e){return this._outer.run(e)}}const bk={};function e2(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function t2(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function g5(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function y5(t){t._nesting--,e2(t)}class Ek{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new So,this.onMicrotaskEmpty=new So,this.onStable=new So,this.onError=new So}run(e,n,r){return e.apply(n,r)}runGuarded(e,n,r){return e.apply(n,r)}runOutsideAngular(e){return e()}runTask(e,n,r,u){return e.apply(n,r)}}const m5=new tr(""),T1=new tr("");class cf{constructor(e,n,r){this._ngZone=e,this.registry=n,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,n2||(function Sk(t){n2=t}(r),r.addToWindow(n)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{qo.assertNotInAngularZone(),$A(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())$A(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>!n.updateCb||!n.updateCb(e)||(clearTimeout(n.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,n,r){let u=-1;n&&n>0&&(u=setTimeout(()=>{this._callbacks=this._callbacks.filter(v=>v.timeoutId!==u),e(this._didWork,this.getPendingTasks())},n)),this._callbacks.push({doneCb:e,timeoutId:u,updateCb:r})}whenStable(e,n,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,n,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,n,r){return[]}}cf.\u0275fac=function(e){return new(e||cf)(Wn(qo),Wn(lf),Wn(T1))},cf.\u0275prov=rr({token:cf,factory:cf.\u0275fac});class lf{constructor(){this._applications=new Map}registerApplication(e,n){this._applications.set(e,n)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,n=!0){return n2?.findTestabilityInTree(this,e,n)??null}}let n2;lf.\u0275fac=function(e){return new(e||lf)},lf.\u0275prov=rr({token:lf,factory:lf.\u0275fac,providedIn:"platform"});const al=!1;let ff=null;const v5=new tr("AllowMultipleToken"),r2=new tr("PlatformDestroyListeners"),_k=new tr("appBootstrapListener");function b5(t){const e=t.get(f5,null);e&&e.forEach(n=>n())}function w5(t,e,n=[]){const r=`Platform: ${e}`,u=new tr(r);return(v=[])=>{let O=i2();if(!O||O.injector.get(v5,!1)){const Y=[...n,...v,{provide:u,useValue:!0}];t?t(Y):function Ik(t){if(ff&&!ff.get(v5,!1))throw new yn(400,!1);ff=t;const e=t.get(bd);return b5(t),e}(A5(Y,r))}return function xk(t){const e=i2();if(!e)throw new yn(401,!1);return e}()}}function A5(t=[],e){return Qo.create({name:e,providers:[{provide:qw,useValue:"platform"},{provide:r2,useValue:new Set([()=>ff=null])},...t]})}function i2(){return ff?.get(bd)??null}class bd{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=S5(n?.ngZone,E5(n)),u=[{provide:qo,useValue:r}];return r.run(()=>{const v=Qo.create({providers:u,parent:this.injector,name:e.moduleType.name}),O=e.create(v),Y=O.injector.get(M0,null);if(!Y)throw new yn(402,!1);return r.runOutsideAngular(()=>{const $=r.onError.subscribe({next:ie=>{Y.handleError(ie)}});O.onDestroy(()=>{O1(this._modules,O),$.unsubscribe()})}),_5(Y,r,()=>{const $=O.injector.get(ol);return $.runInitializers(),$.donePromise.then(()=>(X6(O.injector.get(sl,K0)||K0),this._moduleDoBootstrap(O),O))})})}bootstrapModule(e,n=[]){const r=M5({},n);return function Mk(t,e,n){const r=new FA(n);return Promise.resolve(r)}(this.injector,0,e).then(u=>this.bootstrapModuleFactory(u,r))}_moduleDoBootstrap(e){const n=e.injector.get(df);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new yn(-403,!1);e.instance.ngDoBootstrap(n)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new yn(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(r2,null);e&&(e.forEach(n=>n()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}function E5(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}function S5(t,e){let n;return n="noop"===t?new Ek:("zone.js"===t?void 0:t)||new qo(e),n}function _5(t,e,n){try{const r=n();return m1(r)?r.catch(u=>{throw e.runOutsideAngular(()=>t.handleError(u)),u}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}function M5(t,e){return t=Array.isArray(e)?e.reduce(M5,t):{...t,...e}}bd.\u0275fac=function(e){return new(e||bd)(Wn(Qo))},bd.\u0275prov=rr({token:bd,factory:bd.\u0275fac,providedIn:"platform"});class df{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,n,r){this._zone=e,this._injector=n,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const u=new ze(O=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{O.next(this._stable),O.complete()})}),v=new ze(O=>{let Y;this._zone.runOutsideAngular(()=>{Y=this._zone.onStable.subscribe(()=>{qo.assertNotInAngularZone(),$A(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,O.next(!0))})})});const $=this._zone.onUnstable.subscribe(()=>{qo.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{O.next(!1)}))});return()=>{Y.unsubscribe(),$.unsubscribe()}});this.isStable=lr(u,v.pipe(function $r(t={}){const{connector:e=(()=>new $t),resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:u=!0}=t;return v=>{let O,Y,$,ie=0,ue=!1,he=!1;const we=()=>{Y?.unsubscribe(),Y=void 0},xe=()=>{we(),O=$=void 0,ue=he=!1},Ce=()=>{const Le=O;xe(),Le?.unsubscribe()};return mn((Le,je)=>{ie++,!he&&!ue&&we();const Ue=$=$??e();je.add(()=>{ie--,0===ie&&!he&&!ue&&(Y=ri(Ce,u))}),Ue.subscribe(je),!O&&ie>0&&(O=new Be({next:$e=>Ue.next($e),error:$e=>{he=!0,we(),Y=ri(xe,n,$e),Ue.error($e)},complete:()=>{ue=!0,we(),Y=ri(xe,r),Ue.complete()}}),wr(Le).subscribe(O))})(v)}}()))}bootstrap(e,n){al&&this.warnIfDestroyed();const r=e instanceof s_;if(!this._injector.get(ol).done){const we="Cannot bootstrap as there are still asynchronous initializers running."+(!r&&Ic(e)?"":" Bootstrap components in the `ngDoBootstrap` method of the root module.");throw new yn(405,al&&we)}let v;v=r?e:this._injector.get(sy).resolveComponentFactory(e),this.componentTypes.push(v.componentType);const O=function Dk(t){return t.isBoundToModule}(v)?void 0:this._injector.get(z0),Y=n||v.selector,$=v.create(Qo.NULL,[],Y,O),ie=$.location.nativeElement,ue=$.injector.get(m5,null);return ue?.registerApplication(ie),$.onDestroy(()=>{this.detachView($.hostView),O1(this.components,$),ue?.unregisterApplication(ie)}),this._loadComponent($),$}tick(){if(al&&this.warnIfDestroyed(),this._runningTick)throw new yn(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){al&&this.warnIfDestroyed();const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){al&&this.warnIfDestroyed();const n=e;O1(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(_k,[]);n.push(...this._bootstrapListeners),n.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return al&&this.warnIfDestroyed(),this._destroyListeners.push(e),()=>O1(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new yn(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){al&&this._destroyed&&console.warn(wi(406,"This instance of the `ApplicationRef` has already been destroyed."))}}function O1(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}df.\u0275fac=function(e){return new(e||df)(Wn(qo),Wn(E0),Wn(M0))},df.\u0275prov=rr({token:df,factory:df.\u0275fac,providedIn:"root"});class o2{}o2.__NG_ELEMENT_ID__=function Ok(t){return function Pk(t,e,n){if(Hf(t)&&!n){const r=Oo(t.index,e);return new ly(r,r)}if(47&t.type){const r=e[zi];return new ly(r,e)}return null}(Hi(),sn(),16==(16&t))};class T5{constructor(){}supports(e){return g1(e)}create(e){return new Bk(e)}}const Fk=(t,e)=>e;class Bk{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Fk}forEachItem(e){let n;for(n=this._itHead;null!==n;n=n._next)e(n)}forEachOperation(e){let n=this._itHead,r=this._removalsHead,u=0,v=null;for(;n||r;){const O=!r||n&&n.currentIndex{O=this._trackByFn(u,Y),null!==n&&Object.is(n.trackById,O)?(r&&(n=this._verifyReinsertion(n,Y,O,u)),Object.is(n.item,Y)||this._addIdentityChange(n,Y)):(n=this._mismatch(n,Y,O,u),r=!0),n=n._next,u++}),this.length=u;return this._truncate(n),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,n,r,u){let v;return null===e?v=this._itTail:(v=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(e.item,n)||this._addIdentityChange(e,n),this._reinsertAfter(e,v,u)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(r,u))?(Object.is(e.item,n)||this._addIdentityChange(e,n),this._moveAfter(e,v,u)):e=this._addAfter(new jk(n,r),v,u),e}_verifyReinsertion(e,n,r,u){let v=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==v?e=this._reinsertAfter(v,e._prev,u):e.currentIndex!=u&&(e.currentIndex=u,this._addToMoves(e,u)),e}_truncate(e){for(;null!==e;){const n=e._next;this._addToRemovals(this._unlink(e)),e=n}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,n,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const u=e._prevRemoved,v=e._nextRemoved;return null===u?this._removalsHead=v:u._nextRemoved=v,null===v?this._removalsTail=u:v._prevRemoved=u,this._insertAfter(e,n,r),this._addToMoves(e,r),e}_moveAfter(e,n,r){return this._unlink(e),this._insertAfter(e,n,r),this._addToMoves(e,r),e}_addAfter(e,n,r){return this._insertAfter(e,n,r),null===this._additionsTail?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,n,r){const u=null===n?this._itHead:n._next;return e._next=u,e._prev=n,null===u?this._itTail=e:u._prev=e,null===n?this._itHead=e:n._next=e,null===this._linkedRecords&&(this._linkedRecords=new O5),this._linkedRecords.put(e),e.currentIndex=r,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const n=e._prev,r=e._next;return null===n?this._itHead=r:n._next=r,null===r?this._itTail=n:r._prev=n,e}_addToMoves(e,n){return e.previousIndex===n||(null===this._movesTail?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new O5),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,n){return e.item=n,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}}class jk{constructor(e,n){this.item=e,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Uk{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,n){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===n||n<=r.currentIndex)&&Object.is(r.trackById,e))return r;return null}remove(e){const n=e._prevDup,r=e._nextDup;return null===n?this._head=r:n._nextDup=r,null===r?this._tail=n:r._prevDup=n,null===this._head}}class O5{constructor(){this.map=new Map}put(e){const n=e.trackById;let r=this.map.get(n);r||(r=new Uk,this.map.set(n,r)),r.add(e)}get(e,n){const r=e,u=this.map.get(r);return u?u.get(e,n):null}remove(e){const n=e.trackById;return this.map.get(n).remove(e)&&this.map.delete(n),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function P5(t,e,n){const r=t.previousIndex;if(null===r)return r;let u=0;return n&&r{if(n&&n.key===u)this._maybeAddToChanges(n,r),this._appendAfter=n,n=n._next;else{const v=this._getOrCreateRecordForKey(u,r);n=this._insertBeforeOrAppend(n,v)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,n){if(e){const r=e._prev;return n._next=e,n._prev=r,e._prev=n,r&&(r._next=n),e===this._mapHead&&(this._mapHead=n),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(e,n){if(this._records.has(e)){const u=this._records.get(e);this._maybeAddToChanges(u,n);const v=u._prev,O=u._next;return v&&(v._next=O),O&&(O._prev=v),u._next=null,u._prev=null,u}const r=new zk(e);return this._records.set(e,r),r.currentValue=n,this._addToAdditions(r),r}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,n){Object.is(n,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=n,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,n){e instanceof Map?e.forEach(n):Object.keys(e).forEach(r=>n(e[r],r))}}class zk{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function R5(){return new Au([new T5])}class Au{constructor(e){this.factories=e}static create(e,n){if(null!=n){const r=n.factories.slice();e=e.concat(r)}return new Au(e)}static extend(e){return{provide:Au,useFactory:n=>Au.create(e,n||R5()),deps:[[Au,new ef,new $l]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new yn(901,!1)}}function k5(){return new ja([new N5])}Au.\u0275prov=rr({token:Au,providedIn:"root",factory:R5});class ja{constructor(e){this.factories=e}static create(e,n){if(n){const r=n.factories.slice();e=e.concat(r)}return new ja(e)}static extend(e){return{provide:ja,useFactory:n=>ja.create(e,n||k5()),deps:[[ja,new ef,new $l]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new yn(901,!1)}}ja.\u0275prov=rr({token:ja,providedIn:"root",factory:k5});const Vk=[new N5],Hk=[new T5],Wk=(new Au(Hk),new ja(Vk),w5(null,"core",[]));class G0{constructor(e){}}function l2(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}G0.\u0275fac=function(e){return new(e||G0)(Wn(df))},G0.\u0275mod=Fs({type:G0}),G0.\u0275inj=ks({});let f2=null;function ic(){return f2}class Yk{}const Di=new tr("DocumentToken");class Ad{historyGo(e){throw new Error("Not implemented")}}Ad.\u0275fac=function(e){return new(e||Ad)},Ad.\u0275prov=rr({token:Ad,factory:function(){return function Jk(){return Wn(Z0)}()},providedIn:"platform"});new tr("Location Initialized");class Z0 extends Ad{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ic().getBaseHref(this._doc)}onPopState(e){const n=ic().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=ic().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,n,r){L5()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){L5()?this._history.replaceState(e,n,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}function L5(){return!!window.history.pushState}function d2(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function F5(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length,r=n-("/"===t[n-1]?1:0);return t.slice(0,r)+t.slice(n)}function ul(t){return t&&"?"!==t[0]?"?"+t:t}Z0.\u0275fac=function(e){return new(e||Z0)(Wn(Di))},Z0.\u0275prov=rr({token:Z0,factory:function(){return function Qk(){return new Z0(Wn(Di))}()},providedIn:"platform"});class hf{historyGo(e){throw new Error("Not implemented")}}hf.\u0275fac=function(e){return new(e||hf)},hf.\u0275prov=rr({token:hf,factory:function(){return Ki(Y0)},providedIn:"root"});const B5=new tr("appBaseHref");class Y0 extends hf{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ki(Di).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return d2(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+ul(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,u){const v=this.prepareExternalUrl(r+ul(u));this._platformLocation.pushState(e,n,v)}replaceState(e,n,r,u){const v=this.prepareExternalUrl(r+ul(u));this._platformLocation.replaceState(e,n,v)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}Y0.\u0275fac=function(e){return new(e||Y0)(Wn(Ad),Wn(B5,8))},Y0.\u0275prov=rr({token:Y0,factory:Y0.\u0275fac,providedIn:"root"});class Dy extends hf{constructor(e,n){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=n&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let n=this._platformLocation.hash;return null==n&&(n="#"),n.length>0?n.substring(1):n}prepareExternalUrl(e){const n=d2(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,u){let v=this.prepareExternalUrl(r+ul(u));0==v.length&&(v=this._platformLocation.pathname),this._platformLocation.pushState(e,n,v)}replaceState(e,n,r,u){let v=this.prepareExternalUrl(r+ul(u));0==v.length&&(v=this._platformLocation.pathname),this._platformLocation.replaceState(e,n,v)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}Dy.\u0275fac=function(e){return new(e||Dy)(Wn(Ad),Wn(B5,8))},Dy.\u0275prov=rr({token:Dy,factory:Dy.\u0275fac});class oc{constructor(e){this._subject=new So,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function $k(t){if(new RegExp("^(https?:)?//").test(t)){const[,n]=t.split(/\/\/[^\/]+/);return n}return t}(F5(j5(n))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+ul(n))}normalize(e){return oc.stripTrailingSlash(function qk(t,e){if(!t||!e.startsWith(t))return e;const n=e.substring(t.length);return""===n||["/",";","?","#"].includes(n[0])?n:e}(this._basePath,j5(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",r=null){this._locationStrategy.pushState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+ul(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+ul(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)})),()=>{const n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(r=>r(e,n))}subscribe(e,n,r){return this._subject.subscribe({next:e,error:n,complete:r})}}function j5(t){return t.replace(/\/index.html$/,"")}oc.normalizeQueryParams=ul,oc.joinWithSlash=d2,oc.stripTrailingSlash=F5,oc.\u0275fac=function(e){return new(e||oc)(Wn(hf))},oc.\u0275prov=rr({token:oc,factory:function(){return function Xk(){return new oc(Wn(hf))}()},providedIn:"root"});const U5={ADP:[void 0,void 0,0],AFN:[void 0,"\u060b",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058f",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20bc"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GHS:[void 0,"GH\u20b5"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202fCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var Iy,Ed,$o,ni,Ws,Bi,K5;function R1(t,e){return Ka(As(t)[ci.DateFormat],e)}function k1(t,e){return Ka(As(t)[ci.TimeFormat],e)}function L1(t,e){return Ka(As(t)[ci.DateTimeFormat],e)}function Ua(t,e){const n=As(t),r=n[ci.NumberSymbols][e];if(typeof r>"u"){if(e===Bi.CurrencyDecimal)return n[ci.NumberSymbols][Bi.Decimal];if(e===Bi.CurrencyGroup)return n[ci.NumberSymbols][Bi.Group]}return r}function h2(t,e){return As(t)[ci.NumberFormats][e]}!function(t){t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific"}(Iy||(Iy={})),function(t){t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other"}(Ed||(Ed={})),function(t){t[t.Format=0]="Format",t[t.Standalone=1]="Standalone"}($o||($o={})),function(t){t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short"}(ni||(ni={})),function(t){t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full"}(Ws||(Ws={})),function(t){t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t.Infinity=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup"}(Bi||(Bi={})),function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(K5||(K5={}));const sL=Y6;function z5(t){if(!t[ci.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[ci.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Ka(t,e){for(let n=e;n>-1;n--)if(typeof t[n]<"u")return t[n];throw new Error("Locale data API: locale data undefined")}function p2(t){const[e,n]=t.split(":");return{hours:+e,minutes:+n}}function cL(t,e,n="en"){const r=function oL(t){return As(t)[ci.Currencies]}(n)[t]||U5[t]||[],u=r[1];return"narrow"===e&&"string"==typeof u?u:r[0]||t}const lL=2;const dL=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Cy={},hL=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var sc,zr,Vr;function pL(t,e,n,r){let u=function SL(t){if(W5(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[u,v=1,O=1]=t.split("-").map(Y=>+Y);return F1(u,v-1,O)}const n=parseFloat(t);if(!isNaN(t-n))return new Date(n);let r;if(r=t.match(dL))return function _L(t){const e=new Date(0);let n=0,r=0;const u=t[8]?e.setUTCFullYear:e.setFullYear,v=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),r=Number(t[9]+t[11])),u.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const O=Number(t[4]||0)-n,Y=Number(t[5]||0)-r,$=Number(t[6]||0),ie=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return v.call(e,O,Y,$,ie),e}(r)}const e=new Date(t);if(!W5(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=cl(n,e)||e;let Y,O=[];for(;e;){if(Y=hL.exec(e),!Y){O.push(e);break}{O=O.concat(Y.slice(1));const ue=O.pop();if(!ue)break;e=ue}}let $=u.getTimezoneOffset();r&&($=H5(r,$),u=function EL(t,e,n){const r=n?-1:1,u=t.getTimezoneOffset(),v=H5(e,u);return function AL(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}(t,r*(v-u))}(u,r,!0));let ie="";return O.forEach(ue=>{const he=function wL(t){if(y2[t])return y2[t];let e;switch(t){case"G":case"GG":case"GGG":e=pi(Vr.Eras,ni.Abbreviated);break;case"GGGG":e=pi(Vr.Eras,ni.Wide);break;case"GGGGG":e=pi(Vr.Eras,ni.Narrow);break;case"y":e=no(zr.FullYear,1,0,!1,!0);break;case"yy":e=no(zr.FullYear,2,0,!0,!0);break;case"yyy":e=no(zr.FullYear,3,0,!1,!0);break;case"yyyy":e=no(zr.FullYear,4,0,!1,!0);break;case"Y":e=K1(1);break;case"YY":e=K1(2,!0);break;case"YYY":e=K1(3);break;case"YYYY":e=K1(4);break;case"M":case"L":e=no(zr.Month,1,1);break;case"MM":case"LL":e=no(zr.Month,2,1);break;case"MMM":e=pi(Vr.Months,ni.Abbreviated);break;case"MMMM":e=pi(Vr.Months,ni.Wide);break;case"MMMMM":e=pi(Vr.Months,ni.Narrow);break;case"LLL":e=pi(Vr.Months,ni.Abbreviated,$o.Standalone);break;case"LLLL":e=pi(Vr.Months,ni.Wide,$o.Standalone);break;case"LLLLL":e=pi(Vr.Months,ni.Narrow,$o.Standalone);break;case"w":e=g2(1);break;case"ww":e=g2(2);break;case"W":e=g2(1,!0);break;case"d":e=no(zr.Date,1);break;case"dd":e=no(zr.Date,2);break;case"c":case"cc":e=no(zr.Day,1);break;case"ccc":e=pi(Vr.Days,ni.Abbreviated,$o.Standalone);break;case"cccc":e=pi(Vr.Days,ni.Wide,$o.Standalone);break;case"ccccc":e=pi(Vr.Days,ni.Narrow,$o.Standalone);break;case"cccccc":e=pi(Vr.Days,ni.Short,$o.Standalone);break;case"E":case"EE":case"EEE":e=pi(Vr.Days,ni.Abbreviated);break;case"EEEE":e=pi(Vr.Days,ni.Wide);break;case"EEEEE":e=pi(Vr.Days,ni.Narrow);break;case"EEEEEE":e=pi(Vr.Days,ni.Short);break;case"a":case"aa":case"aaa":e=pi(Vr.DayPeriods,ni.Abbreviated);break;case"aaaa":e=pi(Vr.DayPeriods,ni.Wide);break;case"aaaaa":e=pi(Vr.DayPeriods,ni.Narrow);break;case"b":case"bb":case"bbb":e=pi(Vr.DayPeriods,ni.Abbreviated,$o.Standalone,!0);break;case"bbbb":e=pi(Vr.DayPeriods,ni.Wide,$o.Standalone,!0);break;case"bbbbb":e=pi(Vr.DayPeriods,ni.Narrow,$o.Standalone,!0);break;case"B":case"BB":case"BBB":e=pi(Vr.DayPeriods,ni.Abbreviated,$o.Format,!0);break;case"BBBB":e=pi(Vr.DayPeriods,ni.Wide,$o.Format,!0);break;case"BBBBB":e=pi(Vr.DayPeriods,ni.Narrow,$o.Format,!0);break;case"h":e=no(zr.Hours,1,-12);break;case"hh":e=no(zr.Hours,2,-12);break;case"H":e=no(zr.Hours,1);break;case"HH":e=no(zr.Hours,2);break;case"m":e=no(zr.Minutes,1);break;case"mm":e=no(zr.Minutes,2);break;case"s":e=no(zr.Seconds,1);break;case"ss":e=no(zr.Seconds,2);break;case"S":e=no(zr.FractionalSeconds,1);break;case"SS":e=no(zr.FractionalSeconds,2);break;case"SSS":e=no(zr.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=j1(sc.Short);break;case"ZZZZZ":e=j1(sc.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=j1(sc.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=j1(sc.Long);break;default:return null}return y2[t]=e,e}(ue);ie+=he?he(u,n,$):"''"===ue?"'":ue.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),ie}function F1(t,e,n){const r=new Date(0);return r.setFullYear(t,e,n),r.setHours(0,0,0),r}function cl(t,e){const n=function eL(t){return As(t)[ci.LocaleId]}(t);if(Cy[n]=Cy[n]||{},Cy[n][e])return Cy[n][e];let r="";switch(e){case"shortDate":r=R1(t,Ws.Short);break;case"mediumDate":r=R1(t,Ws.Medium);break;case"longDate":r=R1(t,Ws.Long);break;case"fullDate":r=R1(t,Ws.Full);break;case"shortTime":r=k1(t,Ws.Short);break;case"mediumTime":r=k1(t,Ws.Medium);break;case"longTime":r=k1(t,Ws.Long);break;case"fullTime":r=k1(t,Ws.Full);break;case"short":const u=cl(t,"shortTime"),v=cl(t,"shortDate");r=B1(L1(t,Ws.Short),[u,v]);break;case"medium":const O=cl(t,"mediumTime"),Y=cl(t,"mediumDate");r=B1(L1(t,Ws.Medium),[O,Y]);break;case"long":const $=cl(t,"longTime"),ie=cl(t,"longDate");r=B1(L1(t,Ws.Long),[$,ie]);break;case"full":const ue=cl(t,"fullTime"),he=cl(t,"fullDate");r=B1(L1(t,Ws.Full),[ue,he])}return r&&(Cy[n][e]=r),r}function B1(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(n,r){return null!=e&&r in e?e[r]:n})),t}function Eu(t,e,n="-",r,u){let v="";(t<0||u&&t<=0)&&(u?t=1-t:(t=-t,v=n));let O=String(t);for(;O.length0||Y>-n)&&(Y+=n),t===zr.Hours)0===Y&&-12===n&&(Y=12);else if(t===zr.FractionalSeconds)return function gL(t,e){return Eu(t,3).substring(0,e)}(Y,e);const $=Ua(O,Bi.MinusSign);return Eu(Y,e,$,r,u)}}function pi(t,e,n=$o.Format,r=!1){return function(u,v){return function mL(t,e,n,r,u,v){switch(n){case Vr.Months:return function rL(t,e,n){const r=As(t),v=Ka([r[ci.MonthsFormat],r[ci.MonthsStandalone]],e);return Ka(v,n)}(e,u,r)[t.getMonth()];case Vr.Days:return function nL(t,e,n){const r=As(t),v=Ka([r[ci.DaysFormat],r[ci.DaysStandalone]],e);return Ka(v,n)}(e,u,r)[t.getDay()];case Vr.DayPeriods:const O=t.getHours(),Y=t.getMinutes();if(v){const ie=function aL(t){const e=As(t);return z5(e),(e[ci.ExtraData][2]||[]).map(r=>"string"==typeof r?p2(r):[p2(r[0]),p2(r[1])])}(e),ue=function uL(t,e,n){const r=As(t);z5(r);const v=Ka([r[ci.ExtraData][0],r[ci.ExtraData][1]],e)||[];return Ka(v,n)||[]}(e,u,r),he=ie.findIndex(we=>{if(Array.isArray(we)){const[xe,Ce]=we,Le=O>=xe.hours&&Y>=xe.minutes,je=O0?Math.floor(u/60):Math.ceil(u/60);switch(t){case sc.Short:return(u>=0?"+":"")+Eu(O,2,v)+Eu(Math.abs(u%60),2,v);case sc.ShortGMT:return"GMT"+(u>=0?"+":"")+Eu(O,1,v);case sc.Long:return"GMT"+(u>=0?"+":"")+Eu(O,2,v)+":"+Eu(Math.abs(u%60),2,v);case sc.Extended:return 0===r?"Z":(u>=0?"+":"")+Eu(O,2,v)+":"+Eu(Math.abs(u%60),2,v);default:throw new Error(`Unknown zone width "${t}"`)}}}!function(t){t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended"}(sc||(sc={})),function(t){t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day"}(zr||(zr={})),function(t){t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras"}(Vr||(Vr={}));const vL=0,U1=4;function V5(t){return F1(t.getFullYear(),t.getMonth(),t.getDate()+(U1-t.getDay()))}function g2(t,e=!1){return function(n,r){let u;if(e){const v=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,O=n.getDate();u=1+Math.floor((O+v)/7)}else{const v=V5(n),O=function bL(t){const e=F1(t,vL,1).getDay();return F1(t,0,1+(e<=U1?U1:U1+7)-e)}(v.getFullYear()),Y=v.getTime()-O.getTime();u=1+Math.round(Y/6048e5)}return Eu(u,t,Ua(r,Bi.MinusSign))}}function K1(t,e=!1){return function(n,r){return Eu(V5(n).getFullYear(),t,Ua(r,Bi.MinusSign),e)}}const y2={};function H5(t,e){t=t.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function W5(t){return t instanceof Date&&!isNaN(t.valueOf())}const ML=/^(\d+)?\.((\d+)(-(\d+))?)?$/,G5=22,z1=".",xy="0",DL=";",IL=",",m2="#",Z5="\xa4",CL="%";function v2(t,e,n,r,u,v,O=!1){let Y="",$=!1;if(isFinite(t)){let ie=function NL(t){let r,u,v,O,Y,e=Math.abs(t)+"",n=0;for((u=e.indexOf(z1))>-1&&(e=e.replace(z1,"")),(v=e.search(/e/i))>0?(u<0&&(u=v),u+=+e.slice(v+1),e=e.substring(0,v)):u<0&&(u=e.length),v=0;e.charAt(v)===xy;v++);if(v===(Y=e.length))r=[0],u=1;else{for(Y--;e.charAt(Y)===xy;)Y--;for(u-=v,r=[],O=0;v<=Y;v++,O++)r[O]=Number(e.charAt(v))}return u>G5&&(r=r.splice(0,G5-1),n=u-1,u=1),{digits:r,exponent:n,integerLen:u}}(t);O&&(ie=function PL(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(ie));let ue=e.minInt,he=e.minFrac,we=e.maxFrac;if(v){const $e=v.match(ML);if(null===$e)throw new Error(`${v} is not a valid digit info`);const Je=$e[1],ht=$e[3],xt=$e[5];null!=Je&&(ue=w2(Je)),null!=ht&&(he=w2(ht)),null!=xt?we=w2(xt):null!=ht&&he>we&&(we=he)}!function RL(t,e,n){if(e>n)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${n}).`);let r=t.digits,u=r.length-t.integerLen;const v=Math.min(Math.max(e,u),n);let O=v+t.integerLen,Y=r[O];if(O>0){r.splice(Math.max(t.integerLen,O));for(let he=O;he=5)if(O-1<0){for(let he=0;he>O;he--)r.unshift(0),t.integerLen++;r.unshift(1),t.integerLen++}else r[O-1]++;for(;u=ie?Ce.pop():$=!1),we>=10?1:0},0);ue&&(r.unshift(ue),t.integerLen++)}(ie,he,we);let xe=ie.digits,Ce=ie.integerLen;const Le=ie.exponent;let je=[];for($=xe.every($e=>!$e);Ce0?je=xe.splice(Ce,xe.length):(je=xe,xe=[0]);const Ue=[];for(xe.length>=e.lgSize&&Ue.unshift(xe.splice(-e.lgSize,xe.length).join(""));xe.length>e.gSize;)Ue.unshift(xe.splice(-e.gSize,xe.length).join(""));xe.length&&Ue.unshift(xe.join("")),Y=Ue.join(Ua(n,r)),je.length&&(Y+=Ua(n,u)+je.join("")),Le&&(Y+=Ua(n,Bi.Exponential)+"+"+Le)}else Y=Ua(n,Bi.Infinity);return Y=t<0&&!$?e.negPre+Y+e.negSuf:e.posPre+Y+e.posSuf,Y}function xL(t,e,n,r,u){const O=b2(h2(e,Iy.Currency),Ua(e,Bi.MinusSign));return O.minFrac=function fL(t){let e;const n=U5[t];return n&&(e=n[2]),"number"==typeof e?e:lL}(r),O.maxFrac=O.minFrac,v2(t,O,e,Bi.CurrencyGroup,Bi.CurrencyDecimal,u).replace(Z5,n).replace(Z5,"").trim()}function b2(t,e="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=t.split(DL),u=r[0],v=r[1],O=-1!==u.indexOf(z1)?u.split(z1):[u.substring(0,u.lastIndexOf(xy)+1),u.substring(u.lastIndexOf(xy)+1)],Y=O[0],$=O[1]||"";n.posPre=Y.substring(0,Y.indexOf(m2));for(let ue=0;ue<$.length;ue++){const he=$.charAt(ue);he===xy?n.minFrac=n.maxFrac=ue+1:he===m2?n.maxFrac=ue+1:n.posSuf+=he}const ie=Y.split(IL);if(n.gSize=ie[1]?ie[1].length:0,n.lgSize=ie[2]||ie[1]?(ie[2]||ie[1]).length:0,v){const ue=u.length-n.posPre.length-n.posSuf.length,he=v.indexOf(m2);n.negPre=v.substring(0,he).replace(/'/g,""),n.negSuf=v.slice(he+ue).replace(/'/g,"")}else n.negPre=e+n.posPre,n.negSuf=n.posSuf;return n}function w2(t){const e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}class Sd{}function Y5(t,e,n,r){let u=`=${t}`;if(e.indexOf(u)>-1||(u=n.getPluralCategory(t,r),e.indexOf(u)>-1))return u;if(e.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${t}"`)}Sd.\u0275fac=function(e){return new(e||Sd)},Sd.\u0275prov=rr({token:Sd,factory:function(e){let n=null;return e?n=new e:(r=Wn(sl),n=new J0(r)),n;var r},providedIn:"root"});class J0 extends Sd{constructor(e){super(),this.locale=e}getPluralCategory(e,n){switch(sL(n||this.locale)(e)){case Ed.Zero:return"zero";case Ed.One:return"one";case Ed.Two:return"two";case Ed.Few:return"few";case Ed.Many:return"many";default:return"other"}}}J0.\u0275fac=function(e){return new(e||J0)(Wn(sl))},J0.\u0275prov=rr({token:J0,factory:J0.\u0275fac});const A2=/\s+/,J5=[];class Q0{constructor(e,n,r,u){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=u,this.initialClasses=J5,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(A2):J5}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(A2):e}ngDoCheck(){for(const n of this.initialClasses)this._updateState(n,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const n of e)this._updateState(n,!0);else if(null!=e)for(const n of Object.keys(e))this._updateState(n,Boolean(e[n]));this._applyStateDiff()}_updateState(e,n){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const n=e[0],r=e[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(e,n){(e=e.trim()).length>0&&e.split(A2).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}Q0.\u0275fac=function(e){return new(e||Q0)(bn(Au),bn(ja),bn(ga),bn(tl))},Q0.\u0275dir=ir({type:Q0,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0});class Ty{constructor(e){this._viewContainerRef=e,this.ngComponentOutlet=null}ngOnChanges(e){const{_viewContainerRef:n,ngComponentOutletNgModule:r,ngComponentOutletNgModuleFactory:u}=this;if(n.clear(),this._componentRef=void 0,this.ngComponentOutlet){const v=this.ngComponentOutletInjector||n.parentInjector;(e.ngComponentOutletNgModule||e.ngComponentOutletNgModuleFactory)&&(this._moduleRef&&this._moduleRef.destroy(),this._moduleRef=r?function eR(t,e){return new EM(t,e??null)}(r,Q5(v)):u?u.create(Q5(v)):void 0),this._componentRef=n.createComponent(this.ngComponentOutlet,{index:n.length,injector:v,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngOnDestroy(){this._moduleRef&&this._moduleRef.destroy()}}function Q5(t){return t.get(z0).injector}Ty.\u0275fac=function(e){return new(e||Ty)(bn(bu))},Ty.\u0275dir=ir({type:Ty,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[uo]});class LL{constructor(e,n,r,u){this.$implicit=e,this.ngForOf=n,this.index=r,this.count=u}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}class X0{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,n,r){this._viewContainer=e,this._template=n,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const n=this._viewContainer;e.forEachOperation((r,u,v)=>{if(null==r.previousIndex)n.createEmbeddedView(this._template,new LL(r.item,this._ngForOf,-1,-1),null===v?void 0:v);else if(null==v)n.remove(null===u?void 0:u);else if(null!==u){const O=n.get(u);n.move(O,v),q5(O,r)}});for(let r=0,u=n.length;r{q5(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}function q5(t,e){t.context.$implicit=e.item}X0.\u0275fac=function(e){return new(e||X0)(bn(bu),bn(rc),bn(Au))},X0.\u0275dir=ir({type:X0,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});class ll{constructor(e,n){this._viewContainer=e,this._context=new BL,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){$5("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){$5("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,n){return!0}}ll.\u0275fac=function(e){return new(e||ll)(bn(bu),bn(rc))},ll.\u0275dir=ir({type:ll,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});class BL{constructor(){this.$implicit=null,this.ngIf=null}}function $5(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${er(e)}'.`)}class E2{constructor(e,n){this._viewContainerRef=e,this._templateRef=n,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}class _d{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const n=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const n of this._defaultViews)n.enforceState(e)}}}_d.\u0275fac=function(e){return new(e||_d)},_d.\u0275dir=ir({type:_d,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});class Oy{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new E2(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}Oy.\u0275fac=function(e){return new(e||Oy)(bn(bu),bn(rc),bn(_d,9))},Oy.\u0275dir=ir({type:Oy,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});class Py{constructor(e,n,r){r._addDefault(new E2(e,n))}}Py.\u0275fac=function(e){return new(e||Py)(bn(bu),bn(rc),bn(_d,9))},Py.\u0275dir=ir({type:Py,selectors:[["","ngSwitchDefault",""]],standalone:!0});class q0{constructor(e){this._localization=e,this._caseViews={}}set ngPlural(e){this._updateView(e)}addCase(e,n){this._caseViews[e]=n}_updateView(e){this._clearViews();const r=Y5(e,Object.keys(this._caseViews),this._localization);this._activateView(this._caseViews[r])}_clearViews(){this._activeView&&this._activeView.destroy()}_activateView(e){e&&(this._activeView=e,this._activeView.create())}}q0.\u0275fac=function(e){return new(e||q0)(bn(Sd))},q0.\u0275dir=ir({type:q0,selectors:[["","ngPlural",""]],inputs:{ngPlural:"ngPlural"},standalone:!0});class Ny{constructor(e,n,r,u){this.value=e;const v=!isNaN(Number(e));u.addCase(v?`=${e}`:e,new E2(r,n))}}Ny.\u0275fac=function(e){return new(e||Ny)(Yh("ngPluralCase"),bn(rc),bn(bu),bn(q0,1))},Ny.\u0275dir=ir({type:Ny,selectors:[["","ngPluralCase",""]],standalone:!0});class Ry{constructor(e,n,r){this._ngEl=e,this._differs=n,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,n){const[r,u]=e.split("."),v=-1===r.indexOf("-")?void 0:ws.DashCase;null!=n?this._renderer.setStyle(this._ngEl.nativeElement,r,u?`${n}${u}`:n,v):this._renderer.removeStyle(this._ngEl.nativeElement,r,v)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}}Ry.\u0275fac=function(e){return new(e||Ry)(bn(ga),bn(ja),bn(tl))},Ry.\u0275dir=ir({type:Ry,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});class ky{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:u,ngTemplateOutletInjector:v}=this;this._viewRef=n.createEmbeddedView(r,u,v?{injector:v}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}ky.\u0275fac=function(e){return new(e||ky)(bn(bu))},ky.\u0275dir=ir({type:ky,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[uo]});function Su(t,e){return new yn(2100,!1)}const KL=new class UL{createSubscription(e,n){return e.then(n,r=>{throw r})}dispose(e){}},zL=new class jL{createSubscription(e,n){return e.subscribe({next:n,error:r=>{throw r}})}dispose(e){e.unsubscribe()}};class Md{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,n=>this._updateLatestValue(e,n))}_selectStrategy(e){if(m1(e))return KL;if(n6(e))return zL;throw Su()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,n){e===this._obj&&(this._latestValue=n,this._ref.markForCheck())}}Md.\u0275fac=function(e){return new(e||Md)(bn(o2,16))},Md.\u0275pipe=Co({name:"async",type:Md,pure:!1,standalone:!0});class Dd{transform(e){if(null==e)return null;if("string"!=typeof e)throw Su();return e.toLowerCase()}}Dd.\u0275fac=function(e){return new(e||Dd)},Dd.\u0275pipe=Co({name:"lowercase",type:Dd,pure:!0,standalone:!0});const VL=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA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FB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;class Id{transform(e){if(null==e)return null;if("string"!=typeof e)throw Su();return e.replace(VL,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}}Id.\u0275fac=function(e){return new(e||Id)},Id.\u0275pipe=Co({name:"titlecase",type:Id,pure:!0,standalone:!0});class Cd{transform(e){if(null==e)return null;if("string"!=typeof e)throw Su();return e.toUpperCase()}}Cd.\u0275fac=function(e){return new(e||Cd)},Cd.\u0275pipe=Co({name:"uppercase",type:Cd,pure:!0,standalone:!0});const WL=new tr("DATE_PIPE_DEFAULT_TIMEZONE"),GL=new tr("DATE_PIPE_DEFAULT_OPTIONS");class xd{constructor(e,n,r){this.locale=e,this.defaultTimezone=n,this.defaultOptions=r}transform(e,n,r,u){if(null==e||""===e||e!=e)return null;try{const v=n??this.defaultOptions?.dateFormat??"mediumDate",O=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return pL(e,v,u||this.locale,O)}catch(v){throw Su(0,v.message)}}}xd.\u0275fac=function(e){return new(e||xd)(bn(sl,16),bn(WL,24),bn(GL,24))},xd.\u0275pipe=Co({name:"date",type:xd,pure:!0,standalone:!0});const ZL=/#/g;class Td{constructor(e){this._localization=e}transform(e,n,r){if(null==e)return"";if("object"!=typeof n||null===n)throw Su();return n[Y5(e,Object.keys(n),this._localization,r)].replace(ZL,e.toString())}}Td.\u0275fac=function(e){return new(e||Td)(bn(Sd,16))},Td.\u0275pipe=Co({name:"i18nPlural",type:Td,pure:!0,standalone:!0});class Od{transform(e,n){if(null==e)return"";if("object"!=typeof n||"string"!=typeof e)throw Su();return n.hasOwnProperty(e)?n[e]:n.hasOwnProperty("other")?n.other:""}}Od.\u0275fac=function(e){return new(e||Od)},Od.\u0275pipe=Co({name:"i18nSelect",type:Od,pure:!0,standalone:!0});class Ly{transform(e){return JSON.stringify(e,null,2)}}Ly.\u0275fac=function(e){return new(e||Ly)},Ly.\u0275pipe=Co({name:"json",type:Ly,pure:!1,standalone:!0});class Fy{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=e4}transform(e,n=e4){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const r=this.differ.diff(e),u=n!==this.compareFn;return r&&(this.keyValues=[],r.forEachItem(v=>{this.keyValues.push(function YL(t,e){return{key:t,value:e}}(v.key,v.currentValue))})),(r||u)&&(this.keyValues.sort(n),this.compareFn=n),this.keyValues}}function e4(t,e){const n=t.key,r=e.key;if(n===r)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(null===n)return 1;if(null===r)return-1;if("string"==typeof n&&"string"==typeof r)return nnew $L(Wn(Di),window)});class $L{constructor(e,n){this.document=e,this.window=n,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const n=function eF(t,e){const n=t.getElementById(e)||t.getElementsByName(e)[0];if(n)return n;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const r=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let u=r.currentNode;for(;u;){const v=u.shadowRoot;if(v){const O=v.getElementById(e)||v.querySelector(`[name="${e}"]`);if(O)return O}u=r.nextNode()}}return null}(this.document,e);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const n=this.window.history;n&&n.scrollRestoration&&(n.scrollRestoration=e)}}scrollToElement(e){const n=e.getBoundingClientRect(),r=n.left+this.window.pageXOffset,u=n.top+this.window.pageYOffset,v=this.offset();this.window.scrollTo(r-v[0],u-v[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=r4(this.window.history)||r4(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function r4(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}function V1(t,e){return M2(t)?new URL(t):new URL(t,e.location.href)}function M2(t){return/^https?:\/\//.test(t)}function i4(t){return M2(t)?new URL(t).hostname:t}function iF(t){return t.startsWith("/")?t.slice(1):t}const By=t=>t.src,o4=new tr("ImageLoader",{providedIn:"root",factory:()=>By});function H1(t,e){return function(r){return function nF(t){if("string"!=typeof t||""===t.trim())return!1;try{return new URL(t),!0}catch{return!1}}(r)||function oF(t,e){throw new yn(2959,!1)}(),r=function rF(t){return t.endsWith("/")?t.slice(0,-1):t}(r),[{provide:o4,useValue:O=>(M2(O.src)&&function sF(t,e){throw new yn(2959,!1)}(0,O.src),t(r,{...O,src:iF(O.src)}))}]}}H1(function aF(t,e){let n="format=auto";return e.width&&(n+=`,width=${e.width}`),`${t}/cdn-cgi/image/${n}/${e.src}`});H1(function fF(t,e){let n="f_auto,q_auto";return e.width&&(n+=`,w_${e.width}`),`${t}/image/upload/${n}/${e.src}`});H1(function gF(t,e){const{src:n,width:r}=e;let u;if(r){u=[t,`tr:w-${r}`,n]}else u=[t,n];return u.join("/")});H1(function bF(t,e){const n=new URL(`${t}/${e.src}`);return n.searchParams.set("auto","format"),e.width&&n.searchParams.set("w",e.width.toString()),n.href});function ji(t,e=!0){return`The NgOptimizedImage directive ${e?`(activated on an element with the \`ngSrc="${t}"\`) `:""}has detected that`}function s4(t){throw new yn(2958,`Unexpected invocation of the ${t} in the prod mode. Please make sure that the prod mode is enabled for production builds.`)}class jy{constructor(){this.images=new Map,this.alreadyWarned=new Set,this.window=null,this.observer=null,s4("LCP checker");const e=Ki(Di).defaultView;typeof e<"u"&&typeof PerformanceObserver<"u"&&(this.window=e,this.observer=this.initPerformanceObserver())}initPerformanceObserver(){const e=new PerformanceObserver(n=>{const r=n.getEntries();if(0===r.length)return;const v=r[r.length-1].element?.src??"";v.startsWith("data:")||v.startsWith("blob:")||this.images.get(v)&&!this.alreadyWarned.has(v)&&(this.alreadyWarned.add(v),function wF(t){const e=ji(t);console.warn(wi(2955,`${e} this image is the Largest Contentful Paint (LCP) element but was not marked "priority". This image should be marked "priority" in order to prioritize its loading. To fix this, add the "priority" attribute.`))}(v))});return e.observe({type:"largest-contentful-paint",buffered:!0}),e}registerImage(e,n){this.observer&&this.images.set(V1(e,this.window).href,n)}unregisterImage(e){this.observer&&this.images.delete(V1(e,this.window).href)}ngOnDestroy(){this.observer&&(this.observer.disconnect(),this.images.clear(),this.alreadyWarned.clear())}}jy.\u0275fac=function(e){return new(e||jy)},jy.\u0275prov=rr({token:jy,factory:jy.\u0275fac,providedIn:"root"});const AF=new Set(["localhost","127.0.0.1","0.0.0.0"]),EF=new tr("PRECONNECT_CHECK_BLOCKLIST");class Uy{constructor(){this.document=Ki(Di),this.preconnectLinks=null,this.alreadySeen=new Set,this.window=null,this.blocklist=new Set(AF),s4("preconnect link checker");const e=this.document.defaultView;typeof e<"u"&&(this.window=e);const n=Ki(EF,{optional:!0});n&&this.populateBlocklist(n)}populateBlocklist(e){Array.isArray(e)?a4(e,n=>{this.blocklist.add(i4(n))}):this.blocklist.add(i4(e))}assertPreconnect(e,n){if(!this.window)return;const r=V1(e,this.window);this.blocklist.has(r.hostname)||this.alreadySeen.has(r.origin)||(this.alreadySeen.add(r.origin),this.preconnectLinks||(this.preconnectLinks=this.queryPreconnectLinks()),this.preconnectLinks.has(r.origin)||console.warn(wi(2956,`${ji(n)} there is no preconnect tag present for this image. Preconnecting to the origin(s) that serve priority images ensures that these images are delivered as soon as possible. To fix this, please add the following element into the of the document:\n `)))}queryPreconnectLinks(){const e=new Set,r=Array.from(this.document.querySelectorAll("link[rel=preconnect]"));for(let u of r){const v=V1(u.href,this.window);e.add(v.origin)}return e}ngOnDestroy(){this.preconnectLinks?.clear(),this.alreadySeen.clear()}}function a4(t,e){for(let n of t)Array.isArray(n)?a4(n,e):e(n)}Uy.\u0275fac=function(e){return new(e||Uy)},Uy.\u0275prov=rr({token:Uy,factory:Uy.\u0275fac,providedIn:"root"});const SF=new tr("NG_OPTIMIZED_PRELOADED_IMAGES",{providedIn:"root",factory:()=>new Set});class ep{constructor(){this.preloadedImages=Ki(SF),this.document=Ki(Di)}createPreloadLinkTag(e,n,r,u){if(this.preloadedImages.has(n))return;this.preloadedImages.add(n);const v=e.createElement("link");e.setAttribute(v,"as","image"),e.setAttribute(v,"href",n),e.setAttribute(v,"rel","preload"),e.setAttribute(v,"fetchpriority","high"),u&&e.setAttribute(v,"imageSizes",u),r&&e.setAttribute(v,"imageSrcset",r),e.appendChild(this.document.head,v)}}ep.\u0275fac=function(e){return new(e||ep)},ep.\u0275prov=rr({token:ep,factory:ep.\u0275fac,providedIn:"root"});const c4=/^((\s*\d+w\s*(,|$)){1,})$/,MF=[1,2],d4={breakpoints:[16,32,48,64,96,128,256,384,640,750,828,1080,1200,1920,2048,3840]},TF=new tr("ImageConfig",{providedIn:"root",factory:()=>d4});class W1{constructor(){this.imageLoader=Ki(o4),this.config=function OF(t){let e={};return t.breakpoints&&(e.breakpoints=t.breakpoints.sort((n,r)=>n-r)),Object.assign({},d4,t,e)}(Ki(TF)),this.renderer=Ki(tl),this.imgElement=Ki(ga).nativeElement,this.injector=Ki(Qo),this.isServer=function qL(t){return t===JL}(Ki(qA)),this.preloadLinkChecker=Ki(ep),this.lcpObserver=null,this._renderedSrc=null,this._priority=!1,this._disableOptimizedSrcset=!1,this._fill=!1}set width(e){this._width=h4(e)}get width(){return this._width}set height(e){this._height=h4(e)}get height(){return this._height}set priority(e){this._priority=I2(e)}get priority(){return this._priority}set disableOptimizedSrcset(e){this._disableOptimizedSrcset=I2(e)}get disableOptimizedSrcset(){return this._disableOptimizedSrcset}set fill(e){this._fill=I2(e)}get fill(){return this._fill}ngOnInit(){this.setHostAttributes()}setHostAttributes(){this.fill?this.sizes||(this.sizes="100vw"):(this.setHostAttribute("width",this.width.toString()),this.setHostAttribute("height",this.height.toString())),this.setHostAttribute("loading",this.getLoadingBehavior()),this.setHostAttribute("fetchpriority",this.getFetchPriority()),this.setHostAttribute("ng-img","true");const e=this.getRewrittenSrc();let n;this.setHostAttribute("src",e),this.sizes&&this.setHostAttribute("sizes",this.sizes),this.ngSrcset?n=this.getRewrittenSrcset():this.shouldGenerateAutomaticSrcset()&&(n=this.getAutomaticSrcset()),n&&this.setHostAttribute("srcset",n),this.isServer&&this.priority&&this.preloadLinkChecker.createPreloadLinkTag(this.renderer,e,n,this.sizes)}ngOnChanges(e){}callImageLoader(e){let n=e;return this.loaderParams&&(n.loaderParams=this.loaderParams),this.imageLoader(n)}getLoadingBehavior(){return this.priority||void 0===this.loading?this.priority?"eager":"lazy":this.loading}getFetchPriority(){return this.priority?"high":"auto"}getRewrittenSrc(){if(!this._renderedSrc){const e={src:this.ngSrc};this._renderedSrc=this.callImageLoader(e)}return this._renderedSrc}getRewrittenSrcset(){const e=c4.test(this.ngSrcset);return this.ngSrcset.split(",").filter(r=>""!==r).map(r=>{r=r.trim();const u=e?parseFloat(r):parseFloat(r)*this.width;return`${this.callImageLoader({src:this.ngSrc,width:u})} ${r}`}).join(", ")}getAutomaticSrcset(){return this.sizes?this.getResponsiveSrcset():this.getFixedSrcset()}getResponsiveSrcset(){const{breakpoints:e}=this.config;let n=e;return"100vw"===this.sizes?.trim()&&(n=e.filter(u=>u>=640)),n.map(u=>`${this.callImageLoader({src:this.ngSrc,width:u})} ${u}w`).join(", ")}getFixedSrcset(){return MF.map(n=>`${this.callImageLoader({src:this.ngSrc,width:this.width*n})} ${n}x`).join(", ")}shouldGenerateAutomaticSrcset(){return!this._disableOptimizedSrcset&&!this.srcset&&this.imageLoader!==By&&!(this.width>1920||this.height>1080)}ngOnDestroy(){}setHostAttribute(e,n){this.renderer.setAttribute(this.imgElement,e,n)}}function h4(t){return"string"==typeof t?parseInt(t,10):t}function I2(t){return null!=t&&"false"!=`${t}`}W1.\u0275fac=function(e){return new(e||W1)},W1.\u0275dir=ir({type:W1,selectors:[["img","ngSrc",""]],hostVars:8,hostBindings:function(e,n){2&e&&xA("position",n.fill?"absolute":null)("width",n.fill?"100%":null)("height",n.fill?"100%":null)("inset",n.fill?"0px":null)},inputs:{ngSrc:"ngSrc",ngSrcset:"ngSrcset",sizes:"sizes",width:"width",height:"height",loading:"loading",priority:"priority",loaderParams:"loaderParams",disableOptimizedSrcset:"disableOptimizedSrcset",fill:"fill",src:"src",srcset:"srcset"},standalone:!0,features:[uo]});class kF extends Yk{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class C2 extends kF{static makeCurrent(){!function Zk(t){f2||(f2=t)}(new C2)}onAndCancel(e,n,r){return e.addEventListener(n,r,!1),()=>{e.removeEventListener(n,r,!1)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,n){return(n=n||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return"window"===n?window:"document"===n?e:"body"===n?e.body:null}getBaseHref(e){const n=function LF(){return zy=zy||document.querySelector("base"),zy?zy.getAttribute("href"):null}();return null==n?null:function FF(t){G1=G1||document.createElement("a"),G1.setAttribute("href",t);const e=G1.pathname;return"/"===e.charAt(0)?e:`/${e}`}(n)}resetBaseElement(){zy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function kL(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const r=n.indexOf("="),[u,v]=-1==r?[n,""]:[n.slice(0,r),n.slice(r+1)];if(u.trim()===e)return decodeURIComponent(v)}return null}(document.cookie,e)}}let G1,zy=null;const p4=new tr("TRANSITION_ID");const jF=[{provide:c5,useFactory:function BF(t,e,n){return()=>{n.get(ol).donePromise.then(()=>{const r=ic(),u=e.querySelectorAll(`style[ng-transition="${t}"]`);for(let v=0;v{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,r){return this._findPluginFor(n).addEventListener(e,n,r)}addGlobalEventListener(e,n,r){return this._findPluginFor(n).addGlobalEventListener(e,n,r)}getZone(){return this._zone}_findPluginFor(e){const n=this._eventNameToPlugin.get(e);if(n)return n;const r=this._plugins;for(let u=0;u0?r.set(e,u):r.delete(e),u}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}Ld.\u0275fac=function(e){return new(e||Ld)},Ld.\u0275prov=rr({token:Ld,factory:Ld.\u0275fac});class ac extends Ld{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const n of this.hostNodes)this.addStyleToHost(n,e)}onStyleRemoved(e){const n=this.styleRef;n.get(e)?.forEach(u=>u.remove()),n.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const n of this.getAllStyles())this.addStyleToHost(e,n)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,n){const r=this.doc.createElement("style");r.textContent=n,e.appendChild(r);const u=this.styleRef.get(n);u?u.push(r):this.styleRef.set(n,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}ac.\u0275fac=function(e){return new(e||ac)(Wn(Di))},ac.\u0275prov=rr({token:ac,factory:ac.\u0275fac});const T2={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},O2=/%COMP%/g,KF="_nghost-%COMP%",zF="_ngcontent-%COMP%",m4=new tr("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>false});function v4(t,e){return e.flat(100).map(n=>n.replace(O2,t))}function b4(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}class pf{constructor(e,n,r,u){this.eventManager=e,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestory=u,this.rendererByCompId=new Map,this.defaultRenderer=new P2(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof E4?r.applyToHost(e):r instanceof N2&&r.applyStyles(),r}getOrCreateRenderer(e,n){const r=this.rendererByCompId;let u=r.get(n.id);if(!u){const v=this.eventManager,O=this.sharedStylesHost,Y=this.removeStylesOnCompDestory;switch(n.encapsulation){case Ma.Emulated:u=new E4(v,O,n,this.appId,Y);break;case Ma.ShadowDom:return new ZF(v,O,e,n);default:u=new N2(v,O,n,Y)}u.onDestroy=()=>r.delete(n.id),r.set(n.id,u)}return u}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}pf.\u0275fac=function(e){return new(e||pf)(Wn(fl),Wn(ac),Wn(W0),Wn(m4))},pf.\u0275prov=rr({token:pf,factory:pf.\u0275fac});class P2{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,n){return n?document.createElementNS(T2[n]||n,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,n){(A4(e)?e.content:e).appendChild(n)}insertBefore(e,n,r){e&&(A4(e)?e.content:e).insertBefore(n,r)}removeChild(e,n){e&&e.removeChild(n)}selectRootElement(e,n){let r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error(`The selector "${e}" did not match any elements`);return n||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,n,r,u){if(u){n=u+":"+n;const v=T2[u];v?e.setAttributeNS(v,n,r):e.setAttribute(n,r)}else e.setAttribute(n,r)}removeAttribute(e,n,r){if(r){const u=T2[r];u?e.removeAttributeNS(u,n):e.removeAttribute(`${r}:${n}`)}else e.removeAttribute(n)}addClass(e,n){e.classList.add(n)}removeClass(e,n){e.classList.remove(n)}setStyle(e,n,r,u){u&(ws.DashCase|ws.Important)?e.style.setProperty(n,r,u&ws.Important?"important":""):e.style[n]=r}removeStyle(e,n,r){r&ws.DashCase?e.style.removeProperty(n):e.style[n]=""}setProperty(e,n,r){e[n]=r}setValue(e,n){e.nodeValue=n}listen(e,n,r){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,n,b4(r)):this.eventManager.addEventListener(e,n,b4(r))}}"@".charCodeAt(0);function A4(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class ZF extends P2{constructor(e,n,r,u){super(e),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const v=v4(u.id,u.styles);for(const O of v){const Y=document.createElement("style");Y.textContent=O,this.shadowRoot.appendChild(Y)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,n){return super.appendChild(this.nodeOrShadowRoot(e),n)}insertBefore(e,n,r){return super.insertBefore(this.nodeOrShadowRoot(e),n,r)}removeChild(e,n){return super.removeChild(this.nodeOrShadowRoot(e),n)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class N2 extends P2{constructor(e,n,r,u,v=r.id){super(e),this.sharedStylesHost=n,this.removeStylesOnCompDestory=u,this.rendererUsageCount=0,this.styles=v4(v,r.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class E4 extends N2{constructor(e,n,r,u,v){const O=u+"-"+r.id;super(e,n,r,v,O),this.contentAttr=function HF(t){return zF.replace(O2,t)}(O),this.hostAttr=function WF(t){return KF.replace(O2,t)}(O)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,n){const r=super.createElement(e,n);return super.setAttribute(r,this.contentAttr,""),r}}class np extends x2{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,r){return e.addEventListener(n,r,!1),()=>this.removeEventListener(e,n,r)}removeEventListener(e,n,r){return e.removeEventListener(n,r)}}np.\u0275fac=function(e){return new(e||np)(Wn(Di))},np.\u0275prov=rr({token:np,factory:np.\u0275fac});const S4=["alt","control","meta","shift"],YF={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},JF={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};class za extends x2{constructor(e){super(e)}supports(e){return null!=za.parseEventName(e)}addEventListener(e,n,r){const u=za.parseEventName(n),v=za.eventCallback(u.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ic().onAndCancel(e,u.domEventName,v))}static parseEventName(e){const n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;const u=za._normalizeKey(n.pop());let v="",O=n.indexOf("code");if(O>-1&&(n.splice(O,1),v="code."),S4.forEach($=>{const ie=n.indexOf($);ie>-1&&(n.splice(ie,1),v+=$+".")}),v+=u,0!=n.length||0===u.length)return null;const Y={};return Y.domEventName=r,Y.fullKey=v,Y}static matchEventFullKeyCode(e,n){let r=YF[e.key]||e.key,u="";return n.indexOf("code.")>-1&&(r=e.code,u="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),S4.forEach(v=>{if(v!==r){(0,JF[v])(e)&&(u+=v+".")}}),u+=r,u===n)}static eventCallback(e,n,r){return u=>{za.matchEventFullKeyCode(u,e)&&r.runGuarded(()=>n(u))}}static _normalizeKey(e){return"esc"===e?"escape":e}}za.\u0275fac=function(e){return new(e||za)(Wn(Di))},za.\u0275prov=rr({token:za,factory:za.\u0275fac});const M4=[{provide:qA,useValue:t4},{provide:f5,useValue:function QF(){C2.makeCurrent()},multi:!0},{provide:Di,useFactory:function qF(){return function Bn(t){vn=t}(document),document},deps:[]}],$F=w5(Wk,"browser",M4),D4=new tr(""),I4=[{provide:T1,useClass:class UF{addToWindow(e){ii.getAngularTestability=(r,u=!0)=>{const v=e.findTestabilityInTree(r,u);if(null==v)throw new Error("Could not find testability for element.");return v},ii.getAllAngularTestabilities=()=>e.getAllTestabilities(),ii.getAllAngularRootElements=()=>e.getAllRootElements();ii.frameworkStabilizers||(ii.frameworkStabilizers=[]),ii.frameworkStabilizers.push(r=>{const u=ii.getAllAngularTestabilities();let v=u.length,O=!1;const Y=function($){O=O||$,v--,0==v&&r(O)};u.forEach(function($){$.whenStable(Y)})})}findTestabilityInTree(e,n,r){if(null==n)return null;return e.getTestability(n)??(r?ic().isShadowRoot(n)?this.findTestabilityInTree(e,n.host,!0):this.findTestabilityInTree(e,n.parentElement,!0):null)}},deps:[]},{provide:m5,useClass:cf,deps:[qo,lf,T1]},{provide:cf,useClass:cf,deps:[qo,lf,T1]}],C4=[{provide:qw,useValue:"root"},{provide:M0,useFactory:function XF(){return new M0},deps:[]},{provide:Vy,useClass:np,multi:!0,deps:[Di,qo,qA]},{provide:Vy,useClass:za,multi:!0,deps:[Di]},{provide:pf,useClass:pf,deps:[fl,ac,W0,m4]},{provide:u_,useExisting:pf},{provide:Ld,useExisting:ac},{provide:ac,useClass:ac,deps:[Di]},{provide:fl,useClass:fl,deps:[Vy,qo]},{provide:class tF{},useClass:tp,deps:[]},[]];class gf{constructor(e){false}static withServerTransition(e){return{ngModule:gf,providers:[{provide:W0,useValue:e.appId},{provide:p4,useExisting:W0},jF]}}}gf.\u0275fac=function(e){return new(e||gf)(Wn(D4,12))},gf.\u0275mod=Fs({type:gf}),gf.\u0275inj=ks({providers:[...C4,...I4],imports:[$0,G0]});class Hy{constructor(e){this._doc=e,this._dom=ic()}addTag(e,n=!1){return e?this._getOrCreateElement(e,n):null}addTags(e,n=!1){return e?e.reduce((r,u)=>(u&&r.push(this._getOrCreateElement(u,n)),r),[]):[]}getTag(e){return e&&this._doc.querySelector(`meta[${e}]`)||null}getTags(e){if(!e)return[];const n=this._doc.querySelectorAll(`meta[${e}]`);return n?[].slice.call(n):[]}updateTag(e,n){if(!e)return null;n=n||this._parseSelector(e);const r=this.getTag(n);return r?this._setMetaElementAttributes(e,r):this._getOrCreateElement(e,!0)}removeTag(e){this.removeTagElement(this.getTag(e))}removeTagElement(e){e&&this._dom.remove(e)}_getOrCreateElement(e,n=!1){if(!n){const v=this._parseSelector(e),O=this.getTags(v).filter(Y=>this._containsAttributes(e,Y))[0];if(void 0!==O)return O}const r=this._dom.createElement("meta");return this._setMetaElementAttributes(e,r),this._doc.getElementsByTagName("head")[0].appendChild(r),r}_setMetaElementAttributes(e,n){return Object.keys(e).forEach(r=>n.setAttribute(this._getMetaKeyMap(r),e[r])),n}_parseSelector(e){const n=e.name?"name":"property";return`${n}="${e[n]}"`}_containsAttributes(e,n){return Object.keys(e).every(r=>n.getAttribute(this._getMetaKeyMap(r))===e[r])}_getMetaKeyMap(e){return tB[e]||e}}Hy.\u0275fac=function(e){return new(e||Hy)(Wn(Di))},Hy.\u0275prov=rr({token:Hy,factory:function(e){let n=null;return n=e?new e:function eB(){return new Hy(Wn(Di))}(),n},providedIn:"root"});const tB={httpEquiv:"http-equiv"};class Wy{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}Wy.\u0275fac=function(e){return new(e||Wy)(Wn(Di))},Wy.\u0275prov=rr({token:Wy,factory:function(e){let n=null;return n=e?new e:function nB(){return new Wy(Wn(Di))}(),n},providedIn:"root"});typeof window<"u"&&window;class Gy{constructor(){this.store={},this.onSerializeCallbacks={},this.store=function sB(t,e){const n=t.getElementById(e+"-state");let r={};if(n&&n.textContent)try{r=JSON.parse(function oB(t){const e={"&a;":"&","&q;":'"',"&s;":"'","&l;":"<","&g;":">"};return t.replace(/&[^;]+;/g,n=>e[n])}(n.textContent))}catch(u){console.warn("Exception while restoring TransferState for app "+e,u)}return r}(Ki(Di),Ki(W0))}get(e,n){return void 0!==this.store[e]?this.store[e]:n}set(e,n){this.store[e]=n}remove(e){delete this.store[e]}hasKey(e){return this.store.hasOwnProperty(e)}get isEmpty(){return 0===Object.keys(this.store).length}onSerialize(e,n){this.onSerializeCallbacks[e]=n}toJson(){for(const e in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(e))try{this.store[e]=this.onSerializeCallbacks[e]()}catch(n){console.warn("Exception in onSerialize callback: ",n)}return JSON.stringify(this.store)}}Gy.\u0275fac=function(e){return new(e||Gy)},Gy.\u0275prov=rr({token:Gy,factory:Gy.\u0275fac,providedIn:"root"});class Zy{}Zy.\u0275fac=function(e){return new(e||Zy)},Zy.\u0275mod=Fs({type:Zy}),Zy.\u0275inj=ks({});const uB={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0,doubletap:!0},L2=new tr("HammerGestureConfig"),O4=new tr("HammerLoader");class rp{constructor(){this.events=[],this.overrides={}}buildHammer(e){const n=new Hammer(e,this.options);n.get("pinch").set({enable:!0}),n.get("rotate").set({enable:!0});for(const r in this.overrides)n.get(r).set(this.overrides[r]);return n}}rp.\u0275fac=function(e){return new(e||rp)},rp.\u0275prov=rr({token:rp,factory:rp.\u0275fac});class ip extends x2{constructor(e,n,r,u){super(e),this._config=n,this.console=r,this.loader=u,this._loaderPromise=null}supports(e){return!(!uB.hasOwnProperty(e.toLowerCase())&&!this.isCustomEvent(e)||!window.Hammer&&!this.loader)}addEventListener(e,n,r){const u=this.manager.getZone();if(n=n.toLowerCase(),!window.Hammer&&this.loader){this._loaderPromise=this._loaderPromise||u.runOutsideAngular(()=>this.loader());let v=!1,O=()=>{v=!0};return u.runOutsideAngular(()=>this._loaderPromise.then(()=>{window.Hammer?v||(O=this.addEventListener(e,n,r)):O=()=>{}}).catch(()=>{O=()=>{}})),()=>{O()}}return u.runOutsideAngular(()=>{const v=this._config.buildHammer(e),O=function(Y){u.runGuarded(function(){r(Y)})};return v.on(n,O),()=>{v.off(n,O),"function"==typeof v.destroy&&v.destroy()}})}isCustomEvent(e){return this._config.events.indexOf(e)>-1}}ip.\u0275fac=function(e){return new(e||ip)(Wn(Di),Wn(L2),Wn(vd),Wn(O4,8))},ip.\u0275prov=rr({token:ip,factory:ip.\u0275fac});class Yy{}Yy.\u0275fac=function(e){return new(e||Yy)},Yy.\u0275mod=Fs({type:Yy}),Yy.\u0275inj=ks({providers:[{provide:Vy,useClass:ip,multi:!0,deps:[Di,L2,vd,[new $l,O4]]},{provide:L2,useClass:rp,deps:[]}]});class op{}op.\u0275fac=function(e){return new(e||op)},op.\u0275prov=rr({token:op,factory:function(e){let n=null;return n=e?new(e||op):Wn(sp),n},providedIn:"root"});class sp extends op{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case pa.NONE:return n;case pa.HTML:return qu(n,"HTML")?ha(n):ZS(this._doc,String(n)).toString();case pa.STYLE:return qu(n,"Style")?ha(n):n;case pa.SCRIPT:if(qu(n,"Script"))return ha(n);throw new Error("unsafe value used in a script context");case pa.URL:return qu(n,"URL")?ha(n):n1(String(n));case pa.RESOURCE_URL:if(qu(n,"ResourceURL"))return ha(n);throw new Error(`unsafe value used in a resource URL context (see ${Ns})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Ns})`)}}bypassSecurityTrustHtml(e){return function CO(t){return new EO(t)}(e)}bypassSecurityTrustStyle(e){return function xO(t){return new SO(t)}(e)}bypassSecurityTrustScript(e){return function TO(t){return new _O(t)}(e)}bypassSecurityTrustUrl(e){return function OO(t){return new MO(t)}(e)}bypassSecurityTrustResourceUrl(e){return function PO(t){return new DO(t)}(e)}}sp.\u0275fac=function(e){return new(e||sp)(Wn(Di))},sp.\u0275prov=rr({token:sp,factory:function(e){let n=null;return n=e?new e:function cB(t){return new sp(t.get(Di))}(Wn(Qo)),n},providedIn:"root"});new s1("15.2.9");const{isArray:lB}=Array,{getPrototypeOf:fB,prototype:dB,keys:hB}=Object;function pB(t){if(1===t.length){const e=t[0];if(lB(e))return{args:e,keys:null};if(function gB(t){return t&&"object"==typeof t&&fB(t)===dB}(e)){const n=hB(e);return{args:n.map(r=>e[r]),keys:n}}}return{args:t,keys:null}}const{isArray:yB}=Array;function vB(t){return Sn(e=>function mB(t,e){return yB(e)?t(...e):t(e)}(t,e))}function bB(t,e){return t.reduce((n,r,u)=>(n[r]=e[u],n),{})}function wB(...t){const e=function Ff(t){return ye(us(t))?t.pop():void 0}(t),{args:n,keys:r}=pB(t),u=new ze(v=>{const{length:O}=n;if(!O)return void v.complete();const Y=new Array(O);let $=O,ie=O;for(let ue=0;ue{he||(he=!0,ie--),Y[ue]=we},()=>$--,void 0,()=>{(!$||!he)&&(ie||v.next(r?bB(r,Y):Y),v.complete())}))}});return e?u.pipe(vB(e)):u}class ap{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}ap.\u0275fac=function(e){return new(e||ap)(bn(tl),bn(ga))},ap.\u0275dir=ir({type:ap});class Va extends ap{}Va.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Va)))(n||Va)}}(),Va.\u0275dir=ir({type:Va,features:[Qr]});const uc=new tr("NgValueAccessor"),AB={provide:uc,useExisting:vr(()=>Fd),multi:!0};class Fd extends Va{writeValue(e){this.setProperty("checked",e)}}Fd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Fd)))(n||Fd)}}(),Fd.\u0275dir=ir({type:Fd,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,n){1&e&&Qi("change",function(u){return n.onChange(u.target.checked)})("blur",function(){return n.onTouched()})},features:[Mi([AB]),Qr]});const EB={provide:uc,useExisting:vr(()=>Bd),multi:!0};const _B=new tr("CompositionEventMode");class Bd extends ap{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function SB(){const t=ic()?ic().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){const n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}Bd.\u0275fac=function(e){return new(e||Bd)(bn(tl),bn(ga),bn(_B,8))},Bd.\u0275dir=ir({type:Bd,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,n){1&e&&Qi("input",function(u){return n._handleInput(u.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(u){return n._compositionEnd(u.target.value)})},features:[Mi([EB]),Qr]});const MB=!1;function mf(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function P4(t){return null!=t&&"number"==typeof t.length}const es=new tr("NgValidators"),vf=new tr("NgAsyncValidators"),DB=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function N4(t){return e=>{if(mf(e.value)||mf(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n{if(mf(e.value)||mf(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}function k4(t){return mf(t.value)?{required:!0}:null}function L4(t){return!0===t.value?null:{required:!0}}function F4(t){return mf(t.value)||DB.test(t.value)?null:{email:!0}}function B4(t){return e=>mf(e.value)||!P4(e.value)?null:e.value.lengthP4(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function U4(t){if(!t)return Z1;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),r=>{if(mf(r.value))return null;const u=r.value;return e.test(u)?null:{pattern:{requiredPattern:n,actualValue:u}}}}function Z1(t){return null}function K4(t){return null!=t}function z4(t){const e=m1(t)?Gr(t):t;if(MB&&!r6(e)){let n="Expected async validator to return Promise or Observable.";throw"object"==typeof t&&(n+=" Are you using a synchronous validator where an async validator is expected?"),new yn(-1101,n)}return e}function V4(t){let e={};return t.forEach(n=>{e=null!=n?{...e,...n}:e}),0===Object.keys(e).length?null:e}function H4(t,e){return e.map(n=>n(t))}function W4(t){return t.map(e=>function IB(t){return!t.validate}(e)?e:n=>e.validate(n))}function G4(t){if(!t)return null;const e=t.filter(K4);return 0==e.length?null:function(n){return V4(H4(n,e))}}function F2(t){return null!=t?G4(W4(t)):null}function Z4(t){if(!t)return null;const e=t.filter(K4);return 0==e.length?null:function(n){return wB(H4(n,e).map(z4)).pipe(Sn(V4))}}function B2(t){return null!=t?Z4(W4(t)):null}function Y4(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function J4(t){return t._rawValidators}function Q4(t){return t._rawAsyncValidators}function j2(t){return t?Array.isArray(t)?t:[t]:[]}function Y1(t,e){return Array.isArray(t)?t.includes(e):t===e}function X4(t,e){const n=j2(e);return j2(t).forEach(u=>{Y1(n,u)||n.push(u)}),n}function q4(t,e){return j2(e).filter(n=>!Y1(t,n))}class $4{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=F2(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=B2(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,n){return!!this.control&&this.control.hasError(e,n)}getError(e,n){return this.control?this.control.getError(e,n):null}}class _s extends $4{get formDirective(){return null}get path(){return null}}class bf extends $4{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class e8{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}class Jy extends e8{constructor(e){super(e)}}Jy.\u0275fac=function(e){return new(e||Jy)(bn(bf,2))},Jy.\u0275dir=ir({type:Jy,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&b1("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},features:[Qr]});class up extends e8{constructor(e){super(e)}}up.\u0275fac=function(e){return new(e||up)(bn(_s,10))},up.\u0275dir=ir({type:up,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&b1("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},features:[Qr]});function t8(t,e){return t?`with name: '${e}'`:`at index: ${e}`}const z2=!1,Qy="VALID",Q1="INVALID",cp="PENDING",Xy="DISABLED";function V2(t){return(X1(t)?t.validators:t)||null}function H2(t,e){return(X1(e)?e.asyncValidators:t)||null}function X1(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function n8(t,e,n){const r=t.controls;if(!(e?Object.keys(r):r).length)throw new yn(1e3,z2?function OB(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(e):"");if(!r[n])throw new yn(1001,z2?function PB(t,e){return`Cannot find form control ${t8(t,e)}`}(e,n):"")}function r8(t,e,n){t._forEachChild((r,u)=>{if(void 0===n[u])throw new yn(1002,z2?function NB(t,e){return`Must supply a value for form control ${t8(t,e)}`}(e,u):"")})}class q1{constructor(e,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===Qy}get invalid(){return this.status===Q1}get pending(){return this.status==cp}get disabled(){return this.status===Xy}get enabled(){return this.status!==Xy}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(X4(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(X4(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(q4(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(q4(e,this._rawAsyncValidators))}hasValidator(e){return Y1(this._rawValidators,e)}hasAsyncValidator(e){return Y1(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(n=>{n.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=cp,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const n=this._parentMarkedDirty(e.onlySelf);this.status=Xy,this.errors=null,this._forEachChild(r=>{r.disable({...e,onlySelf:!0})}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:n}),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){const n=this._parentMarkedDirty(e.onlySelf);this.status=Qy,this._forEachChild(r=>{r.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:n}),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Qy||this.status===cp)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Xy:Qy}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=cp,this._hasOwnPendingAsyncValidator=!0;const n=z4(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,n={}){this.errors=e,this._updateControlsErrors(!1!==n.emitEvent)}get(e){let n=e;return null==n||(Array.isArray(n)||(n=n.split(".")),0===n.length)?null:n.reduce((r,u)=>r&&r._find(u),this)}getError(e,n){const r=n?this.get(n):this;return r&&r.errors?r.errors[e]:null}hasError(e,n){return!!this.getError(e,n)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new So,this.statusChanges=new So}_calculateStatus(){return this._allControlsDisabled()?Xy:this.errors?Q1:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(cp)?cp:this._anyControlsHaveStatus(Q1)?Q1:Qy}_anyControlsHaveStatus(e){return this._anyControls(n=>n.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){X1(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){const n=this._parent&&this._parent.dirty;return!e&&!!n&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function RB(t){return Array.isArray(t)?F2(t):t||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function kB(t){return Array.isArray(t)?B2(t):t||null}(this._rawAsyncValidators)}}class qy extends q1{constructor(e,n,r){super(V2(n),H2(r,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,n){return this.controls[e]?this.controls[e]:(this.controls[e]=n,n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange),n)}addControl(e,n,r={}){this.registerControl(e,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(e,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}setControl(e,n,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],n&&this.registerControl(e,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,n={}){r8(this,!0,e),Object.keys(e).forEach(r=>{n8(this,!0,r),this.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){null!=e&&(Object.keys(e).forEach(r=>{const u=this.controls[r];u&&u.patchValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e={},n={}){this._forEachChild((r,u)=>{r.reset(e[u],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n),this._updateTouched(n),this.updateValueAndValidity(n)}getRawValue(){return this._reduceChildren({},(e,n,r)=>(e[r]=n.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(n,r)=>!!r._syncPendingControls()||n);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(n=>{const r=this.controls[n];r&&e(r,n)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const[n,r]of Object.entries(this.controls))if(this.contains(n)&&e(r))return!0;return!1}_reduceValue(){return this._reduceChildren({},(n,r,u)=>((r.enabled||this.disabled)&&(n[u]=r.value),n))}_reduceChildren(e,n){let r=e;return this._forEachChild((u,v)=>{r=n(r,u,v)}),r}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}}class i8 extends qy{}const jd=new tr("CallSetDisabledState",{providedIn:"root",factory:()=>$y}),$y="always";function $1(t,e){return[...e.path,t]}function em(t,e,n=$y){W2(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||"always"===n)&&e.valueAccessor.setDisabledState?.(t.disabled),function FB(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&o8(t,e)})}(t,e),function jB(t,e){const n=(r,u)=>{e.valueAccessor.writeValue(r),u&&e.viewToModelUpdate(r)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}(t,e),function BB(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&o8(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function LB(t,e){if(e.valueAccessor.setDisabledState){const n=r=>{e.valueAccessor.setDisabledState(r)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}(t,e)}function eb(t,e,n=!0){const r=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(r),e.valueAccessor.registerOnTouched(r)),nb(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function tb(t,e){t.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(e)})}function W2(t,e){const n=J4(t);null!==e.validator?t.setValidators(Y4(n,e.validator)):"function"==typeof n&&t.setValidators([n]);const r=Q4(t);null!==e.asyncValidator?t.setAsyncValidators(Y4(r,e.asyncValidator)):"function"==typeof r&&t.setAsyncValidators([r]);const u=()=>t.updateValueAndValidity();tb(e._rawValidators,u),tb(e._rawAsyncValidators,u)}function nb(t,e){let n=!1;if(null!==t){if(null!==e.validator){const u=J4(t);if(Array.isArray(u)&&u.length>0){const v=u.filter(O=>O!==e.validator);v.length!==u.length&&(n=!0,t.setValidators(v))}}if(null!==e.asyncValidator){const u=Q4(t);if(Array.isArray(u)&&u.length>0){const v=u.filter(O=>O!==e.asyncValidator);v.length!==u.length&&(n=!0,t.setAsyncValidators(v))}}}const r=()=>{};return tb(e._rawValidators,r),tb(e._rawAsyncValidators,r),n}function o8(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function s8(t,e){W2(t,e)}function Z2(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}function a8(t,e){t._syncPendingControls(),e.forEach(n=>{const r=n.control;"submit"===r.updateOn&&r._pendingChange&&(n.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function Y2(t,e){if(!e)return null;let n,r,u;return Array.isArray(e),e.forEach(v=>{v.constructor===Bd?n=v:function zB(t){return Object.getPrototypeOf(t.constructor)===Va}(v)?r=v:u=v}),u||r||n||null}const HB={provide:_s,useExisting:vr(()=>wf)},tm=Promise.resolve();class wf extends _s{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new So,this.form=new qy({},F2(e),B2(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){tm.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),em(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){tm.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){tm.then(()=>{const n=this._findContainer(e.path),r=new qy({});s8(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){tm.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){tm.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,a8(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}function u8(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function c8(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}wf.\u0275fac=function(e){return new(e||wf)(bn(es,10),bn(vf,10),bn(jd,8))},wf.\u0275dir=ir({type:wf,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Qi("submit",function(u){return n.onSubmit(u)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Mi([HB]),Qr]});const nm=class extends q1{constructor(e=null,n,r){super(V2(n),H2(r,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),X1(n)&&(n.nonNullable||n.initialValueIsDefault)&&(c8(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,n={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==n.emitViewToModelChange)),this.updateValueAndValidity(n)}patchValue(e,n={}){this.setValue(e,n)}reset(e=this.defaultValue,n={}){this._applyFormState(e),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){u8(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){u8(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(e){c8(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};class Ud extends _s{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return $1(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}Ud.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Ud)))(n||Ud)}}(),Ud.\u0275dir=ir({type:Ud,features:[Qr]});const GB={provide:_s,useExisting:vr(()=>Af)};class Af extends Ud{constructor(e,n,r){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}_checkParentType(){!(this._parent instanceof Af)&&this._parent}}Af.\u0275fac=function(e){return new(e||Af)(bn(_s,5),bn(es,10),bn(vf,10))},Af.\u0275dir=ir({type:Af,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[Mi([GB]),Qr]});const ZB={provide:bf,useExisting:vr(()=>lp)},l8=Promise.resolve();class lp extends bf{constructor(e,n,r,u,v,O){super(),this._changeDetectorRef=v,this.callSetDisabledState=O,this.control=new nm,this._registered=!1,this.update=new So,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Y2(0,u)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Z2(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){em(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){l8.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&l2(n);l8.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?$1(e,this._parent):[e]}}lp.\u0275fac=function(e){return new(e||lp)(bn(_s,9),bn(es,10),bn(vf,10),bn(uc,10),bn(o2,8),bn(jd,8))},lp.\u0275dir=ir({type:lp,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Mi([ZB]),Qr,uo]});class fp{}fp.\u0275fac=function(e){return new(e||fp)},fp.\u0275dir=ir({type:fp,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});const YB={provide:uc,useExisting:vr(()=>Kd),multi:!0};class Kd extends Va{writeValue(e){const n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}Kd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Kd)))(n||Kd)}}(),Kd.\u0275dir=ir({type:Kd,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Qi("input",function(u){return n.onChange(u.target.value)})("blur",function(){return n.onTouched()})},features:[Mi([YB]),Qr]});const JB={provide:uc,useExisting:vr(()=>hp),multi:!0};class zd{}zd.\u0275fac=function(e){return new(e||zd)},zd.\u0275mod=Fs({type:zd}),zd.\u0275inj=ks({});class dp{constructor(){this._accessors=[]}add(e,n){this._accessors.push([e,n])}remove(e){for(let n=this._accessors.length-1;n>=0;--n)if(this._accessors[n][1]===e)return void this._accessors.splice(n,1)}select(e){this._accessors.forEach(n=>{this._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}_isSameGroup(e,n){return!!e[0].control&&(e[0]._parent===n._control._parent&&e[1].name===n.name)}}dp.\u0275fac=function(e){return new(e||dp)},dp.\u0275prov=rr({token:dp,factory:dp.\u0275fac,providedIn:zd});class hp extends Va{constructor(e,n,r,u){super(e,n),this._registry=r,this._injector=u,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=Ki(jd,{optional:!0})??$y}ngOnInit(){this._control=this._injector.get(bf),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}}hp.\u0275fac=function(e){return new(e||hp)(bn(tl),bn(ga),bn(dp),bn(Qo))},hp.\u0275dir=ir({type:hp,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,n){1&e&&Qi("change",function(){return n.onChange()})("blur",function(){return n.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Mi([JB]),Qr]});const QB={provide:uc,useExisting:vr(()=>Vd),multi:!0};class Vd extends Va{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}Vd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Vd)))(n||Vd)}}(),Vd.\u0275dir=ir({type:Vd,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,n){1&e&&Qi("change",function(u){return n.onChange(u.target.value)})("input",function(u){return n.onChange(u.target.value)})("blur",function(){return n.onTouched()})},features:[Mi([QB]),Qr]});const J2=new tr("NgModelWithFormControlWarning"),XB={provide:bf,useExisting:vr(()=>Hd)};class Hd extends bf{set isDisabled(e){}constructor(e,n,r,u,v){super(),this._ngModelWarningConfig=u,this.callSetDisabledState=v,this.update=new So,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=Y2(0,r)}ngOnChanges(e){if(this._isControlChanged(e)){const n=e.form.previousValue;n&&eb(n,this,!1),em(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Z2(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&eb(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}Hd._ngModelWarningSentOnce=!1,Hd.\u0275fac=function(e){return new(e||Hd)(bn(es,10),bn(vf,10),bn(uc,10),bn(J2,8),bn(jd,8))},Hd.\u0275dir=ir({type:Hd,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Mi([XB]),Qr,uo]});const qB={provide:_s,useExisting:vr(()=>Wd)};class Wd extends _s{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new So,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(nb(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const n=this.form.get(e.path);return em(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){eb(e.control||null,e,!1),function VB(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this.submitted=!0,a8(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const n=e.control,r=this.form.get(e.path);n!==r&&(eb(n||null,e),(t=>t instanceof nm)(r)&&(em(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);s8(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function UB(t,e){return nb(t,e)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){W2(this.form,this),this._oldForm&&nb(this._oldForm,this)}_checkFormPresent(){this.form}}Wd.\u0275fac=function(e){return new(e||Wd)(bn(es,10),bn(vf,10),bn(jd,8))},Wd.\u0275dir=ir({type:Wd,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Qi("submit",function(u){return n.onSubmit(u)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Mi([qB]),Qr,uo]});const $B={provide:_s,useExisting:vr(()=>Gd)};class Gd extends Ud{constructor(e,n,r){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}_checkParentType(){f8(this._parent)}}Gd.\u0275fac=function(e){return new(e||Gd)(bn(_s,13),bn(es,10),bn(vf,10))},Gd.\u0275dir=ir({type:Gd,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[Mi([$B]),Qr]});const ej={provide:_s,useExisting:vr(()=>Zd)};class Zd extends _s{constructor(e,n,r){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return $1(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){f8(this._parent)}}function f8(t){return!(t instanceof Gd||t instanceof Wd||t instanceof Zd)}Zd.\u0275fac=function(e){return new(e||Zd)(bn(_s,13),bn(es,10),bn(vf,10))},Zd.\u0275dir=ir({type:Zd,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[Mi([ej]),Qr]});const tj={provide:bf,useExisting:vr(()=>Yd)};class Yd extends bf{set isDisabled(e){}constructor(e,n,r,u,v){super(),this._ngModelWarningConfig=v,this._added=!1,this.update=new So,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Y2(0,u)}ngOnChanges(e){this._added||this._setUpControl(),Z2(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return $1(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}Yd._ngModelWarningSentOnce=!1,Yd.\u0275fac=function(e){return new(e||Yd)(bn(_s,13),bn(es,10),bn(vf,10),bn(uc,10),bn(J2,8))},Yd.\u0275dir=ir({type:Yd,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Mi([tj]),Qr,uo]});const nj={provide:uc,useExisting:vr(()=>Ef),multi:!0};function d8(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class Ef extends Va{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const r=d8(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=n=>{this.value=this._getOptionValue(n),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const n of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(n),e))return n;return null}_getOptionValue(e){const n=function rj(t){return t.split(":")[0]}(e);return this._optionMap.has(n)?this._optionMap.get(n):e}}Ef.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Ef)))(n||Ef)}}(),Ef.\u0275dir=ir({type:Ef,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,n){1&e&&Qi("change",function(u){return n.onChange(u.target.value)})("blur",function(){return n.onTouched()})},inputs:{compareWith:"compareWith"},features:[Mi([nj]),Qr]});class rm{constructor(e,n,r){this._element=e,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(d8(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}rm.\u0275fac=function(e){return new(e||rm)(bn(ga),bn(tl),bn(Ef,9))},rm.\u0275dir=ir({type:rm,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});const ij={provide:uc,useExisting:vr(()=>Sf),multi:!0};function h8(t,e){return null==t?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class Sf extends Va{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let n;if(this.value=e,Array.isArray(e)){const r=e.map(u=>this._getOptionId(u));n=(u,v)=>{u._setSelected(r.indexOf(v.toString())>-1)}}else n=(r,u)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(e){this.onChange=n=>{const r=[],u=n.selectedOptions;if(void 0!==u){const v=u;for(let O=0;OJd),multi:!0};class Jd extends _u{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>g8(e),this.createValidator=e=>R4(e)}}Jd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Jd)))(n||Jd)}}(),Jd.\u0275dir=ir({type:Jd,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&il("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Mi([sj]),Qr]});const aj={provide:es,useExisting:vr(()=>Qd),multi:!0};class Qd extends _u{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>g8(e),this.createValidator=e=>N4(e)}}Qd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Qd)))(n||Qd)}}(),Qd.\u0275dir=ir({type:Qd,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&il("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Mi([aj]),Qr]});const uj={provide:es,useExisting:vr(()=>_f),multi:!0},cj={provide:es,useExisting:vr(()=>Xd),multi:!0};class _f extends _u{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=l2,this.createValidator=e=>k4}enabled(e){return e}}_f.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(_f)))(n||_f)}}(),_f.\u0275dir=ir({type:_f,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,n){2&e&&il("required",n._enabled?"":null)},inputs:{required:"required"},features:[Mi([uj]),Qr]});class Xd extends _f{constructor(){super(...arguments),this.createValidator=e=>L4}}Xd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Xd)))(n||Xd)}}(),Xd.\u0275dir=ir({type:Xd,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&il("required",n._enabled?"":null)},features:[Mi([cj]),Qr]});const lj={provide:es,useExisting:vr(()=>qd),multi:!0};class qd extends _u{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=l2,this.createValidator=e=>F4}enabled(e){return e}}qd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(qd)))(n||qd)}}(),qd.\u0275dir=ir({type:qd,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[Mi([lj]),Qr]});const fj={provide:es,useExisting:vr(()=>$d),multi:!0};class $d extends _u{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>p8(e),this.createValidator=e=>B4(e)}}$d.\u0275fac=function(){let t;return function(n){return(t||(t=Wi($d)))(n||$d)}}(),$d.\u0275dir=ir({type:$d,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&il("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Mi([fj]),Qr]});const dj={provide:es,useExisting:vr(()=>eh),multi:!0};class eh extends _u{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>p8(e),this.createValidator=e=>j4(e)}}eh.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(eh)))(n||eh)}}(),eh.\u0275dir=ir({type:eh,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&il("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Mi([dj]),Qr]});const hj={provide:es,useExisting:vr(()=>th),multi:!0};class th extends _u{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>U4(e)}}th.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(th)))(n||th)}}(),th.\u0275dir=ir({type:th,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&il("pattern",n._enabled?n.pattern:null)},inputs:{pattern:"pattern"},features:[Mi([hj]),Qr]});class nh{}nh.\u0275fac=function(e){return new(e||nh)},nh.\u0275mod=Fs({type:nh}),nh.\u0275inj=ks({imports:[zd]});class y8 extends q1{constructor(e,n,r){super(V2(n),H2(r,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,n={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}insert(e,n,r={}){this.controls.splice(e,0,n),this._registerControl(n),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(e,n={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:n.emitEvent})}setControl(e,n,r={}){let u=this._adjustIndex(e);u<0&&(u=0),this.controls[u]&&this.controls[u]._registerOnCollectionChange(()=>{}),this.controls.splice(u,1),n&&(this.controls.splice(u,0,n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,n={}){r8(this,!1,e),e.forEach((r,u)=>{n8(this,!1,u),this.at(u).setValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){null!=e&&(e.forEach((r,u)=>{this.at(u)&&this.at(u).patchValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e=[],n={}){this._forEachChild((r,u)=>{r.reset(e[u],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n),this._updateTouched(n),this.updateValueAndValidity(n)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(n=>n._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((n,r)=>!!r._syncPendingControls()||n,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((n,r)=>{e(n,r)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(n=>n.enabled&&e(n))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}}function m8(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}class dl{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new dl;return e.useNonNullable=!0,e}group(e,n=null){const r=this._reduceControls(e);let u={};return m8(n)?u=n:null!==n&&(u.validators=n.validator,u.asyncValidators=n.asyncValidator),new qy(r,u)}record(e,n=null){const r=this._reduceControls(e);return new i8(r,n)}control(e,n,r){let u={};return this.useNonNullable?(m8(n)?u=n:(u.validators=n,u.asyncValidators=r),new nm(e,{...u,nonNullable:!0})):new nm(e,n,r)}array(e,n,r){const u=e.map(v=>this._createControl(v));return new y8(u,n,r)}_reduceControls(e){const n={};return Object.keys(e).forEach(r=>{n[r]=this._createControl(e[r])}),n}_createControl(e){if(e instanceof nm)return e;if(e instanceof q1)return e;if(Array.isArray(e)){const n=e[0],r=e.length>1?e[1]:null,u=e.length>2?e[2]:null;return this.control(n,r,u)}return this.control(e)}}dl.\u0275fac=function(e){return new(e||dl)},dl.\u0275prov=rr({token:dl,factory:dl.\u0275fac,providedIn:"root"});class rb{}rb.\u0275fac=function(e){return new(e||rb)},rb.\u0275prov=rr({token:rb,factory:function(){return Ki(dl).nonNullable},providedIn:"root"});class pp extends dl{group(e,n=null){return super.group(e,n)}control(e,n,r){return super.control(e,n,r)}array(e,n,r){return super.array(e,n,r)}}pp.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(pp)))(n||pp)}}(),pp.\u0275prov=rr({token:pp,factory:pp.\u0275fac,providedIn:"root"});new s1("15.2.9");class Mf{static withConfig(e){return{ngModule:Mf,providers:[{provide:jd,useValue:e.callSetDisabledState??$y}]}}}Mf.\u0275fac=function(e){return new(e||Mf)},Mf.\u0275mod=Fs({type:Mf}),Mf.\u0275inj=ks({imports:[nh]});class rh{static withConfig(e){return{ngModule:rh,providers:[{provide:J2,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:jd,useValue:e.callSetDisabledState??$y}]}}}rh.\u0275fac=function(e){return new(e||rh)},rh.\u0275mod=Fs({type:rh}),rh.\u0275inj=ks({imports:[nh]});var ke=p(49671),Jn=p(71836);class pj{constructor(e){this.provider=new Jn.providers.JsonRpcProvider({url:e})}query(e){return this.provider.query(e)}viewAccessKey({accountId:e,publicKey:n}){return this.query({request_type:"view_access_key",finality:"final",account_id:e,public_key:n})}block(e){return this.provider.block(e)}sendTransaction(e){return this.provider.sendTransaction(e)}}class om{constructor(e,n){this.storage=e,this.namespace=Array.isArray(n)?n.join(":"):n}resolveKey(e){return[this.namespace,e].join(":")}getItem(e){return this.storage.getItem(this.resolveKey(e)).then(n=>"string"==typeof n?JSON.parse(n):null)}setItem(e,n){return this.storage.setItem(this.resolveKey(e),JSON.stringify(n))}removeItem(e){return this.storage.removeItem(this.resolveKey(e))}}class gj{getItem(e){return new Promise(n=>{n(localStorage.getItem(e))})}setItem(e,n){return new Promise(r=>{localStorage.setItem(e,n),r()})}removeItem(e){return new Promise(n=>{localStorage.removeItem(e),n()})}}class gp{constructor(e){this.namespace=e}emit(e,...n){if(gp.debug){if(this.namespace&&"error"!==e)return void console[e](this.namespace,...n);console[e](...n)}}log(...e){this.emit("log",...e)}info(...e){this.emit("info",...e)}warn(...e){this.emit("warn",...e)}error(...e){this.emit("error",...e)}}gp.debug=!1;const cc=new gp;var Mu=p(59069),Q2=p.n(Mu);class X2{constructor(){this.emitter=new Mu.EventEmitter}on(e,n){return this.emitter.on(e,n),{remove:()=>this.emitter.off(e,n)}}off(e,n){this.emitter.off(e,n)}emit(e,n){this.emitter.emit(e,n)}}const sm="near-wallet-selector",am="recentlySignedInWallets",b8="contract",q2="contract:pending",w8="selectedWalletId",$2="selectedWalletId:pending";class yj{constructor({factories:e,storage:n,options:r,store:u,emitter:v,provider:O}){this.factories=e,this.storage=n,this.options=r,this.store=u,this.emitter=v,this.provider=O,this.modules=[],this.instances={}}validateWallet(e){var n=this;return(0,ke.Z)(function*(){let r=[];const u=yield n.getWallet(e);return u&&(r=yield u.getAccounts().catch(v=>(cc.log(`Failed to validate ${u.id} during setup`),cc.error(v),[]))),r})()}resolveStorageState(){var e=this;return(0,ke.Z)(function*(){const n=new om(e.storage,sm),r=yield n.getItem($2),u=yield n.getItem(q2);if(r&&u){const ie=yield e.validateWallet(r);if(yield n.removeItem($2),yield n.removeItem(q2),ie.length){const{selectedWalletId:ue}=e.store.getState(),he=yield e.getWallet(ue);he&&r!==ue&&(yield he.signOut().catch(xe=>{cc.log("Failed to sign out existing wallet"),cc.error(xe)}));return{accounts:ie,contract:u,selectedWalletId:r,recentlySignedInWallets:yield e.setWalletAsRecentlySignedIn(r)}}}const{contract:v,selectedWalletId:O}=e.store.getState(),Y=yield e.validateWallet(O),$=yield n.getItem(am);return Y.length?{accounts:Y,contract:v,selectedWalletId:O,recentlySignedInWallets:$||[]}:{accounts:[],contract:null,selectedWalletId:null,recentlySignedInWallets:$||[]}})()}setWalletAsRecentlySignedIn(e){var n=this;return(0,ke.Z)(function*(){const r=new om(n.storage,sm);let u=yield r.getItem(am);return u||(u=[]),u.includes(e)||(u.unshift(e),u=u.slice(0,5),yield r.setItem(am,u)),u})()}signOutWallet(e){var n=this;return(0,ke.Z)(function*(){const r=yield n.getWallet(e);yield r.signOut().catch(u=>{cc.log(`Failed to sign out ${r.id}`),cc.error(u),n.onWalletSignedOut(r.id)})})()}onWalletSignedIn(e,{accounts:n,contractId:r,methodNames:u}){var v=this;return(0,ke.Z)(function*(){const{selectedWalletId:O}=v.store.getState(),Y=new om(v.storage,sm),$={contractId:r,methodNames:u};if(!n.length)return void("browser"===v.getModule(e).type&&(yield Y.setItem($2,e),yield Y.setItem(q2,$)));O&&O!==e&&(yield v.signOutWallet(O));const ie=yield v.setWalletAsRecentlySignedIn(e);v.store.dispatch({type:"WALLET_CONNECTED",payload:{walletId:e,contract:$,accounts:n,recentlySignedInWallets:ie}}),v.emitter.emit("signedIn",{walletId:e,contractId:r,methodNames:u,accounts:n})})()}onWalletSignedOut(e){this.store.dispatch({type:"WALLET_DISCONNECTED",payload:{walletId:e}}),this.emitter.emit("signedOut",{walletId:e})}setupWalletEmitter(e){var n=this;const r=new X2;return r.on("signedOut",()=>{this.onWalletSignedOut(e.id)}),r.on("signedIn",u=>{this.onWalletSignedIn(e.id,u)}),r.on("accountsChanged",function(){var u=(0,ke.Z)(function*({accounts:v}){if(n.emitter.emit("accountsChanged",{walletId:e.id,accounts:v}),!v.length)return n.signOutWallet(e.id);n.store.dispatch({type:"ACCOUNTS_CHANGED",payload:{walletId:e.id,accounts:v}})});return function(v){return u.apply(this,arguments)}}()),r.on("networkChanged",({networkId:u})=>{this.emitter.emit("networkChanged",{walletId:e.id,networkId:u})}),r.on("uriChanged",({uri:u})=>{this.emitter.emit("uriChanged",{walletId:e.id,uri:u})}),r}validateSignMessageParams({message:e,nonce:n,recipient:r}){if(!e||""===e.trim())throw new Error("Invalid message. It must be a non-empty string.");if(!Buffer.isBuffer(n)||32!==n.length)throw new Error("Invalid nonce. It must be a Buffer with a length of 32 bytes.");if(!r||""===r.trim())throw new Error("Invalid recipient. It must be a non-empty string.")}decorateWallet(e){var n=this;const r=e.signIn,u=e.signOut,v=e.signMessage;return e.signIn=function(){var O=(0,ke.Z)(function*(Y){const $=yield r(Y),{contractId:ie,methodNames:ue=[]}=Y;return yield n.onWalletSignedIn(e.id,{accounts:$,contractId:ie,methodNames:ue}),$});return function(Y){return O.apply(this,arguments)}}(),e.signOut=(0,ke.Z)(function*(){yield u(),n.onWalletSignedOut(e.id)}),e.signMessage=function(){var O=(0,ke.Z)(function*(Y){if(void 0===v)throw Error(`The signMessage method is not supported by ${e.metadata.name}`);return n.validateSignMessageParams(Y),yield v(Y)});return function(Y){return O.apply(this,arguments)}}(),e}setupInstance(e){var n=this;return(0,ke.Z)(function*(){if(!e.metadata.available){const u="injected"===e.type?"not installed":"not available";throw Error(`${e.metadata.name} is ${u}`)}const r={id:e.id,type:e.type,metadata:e.metadata,...yield e.init({id:e.id,type:e.type,metadata:e.metadata,options:n.options,store:n.store.toReadOnly(),provider:n.provider,emitter:n.setupWalletEmitter(e),logger:new gp(e.id),storage:new om(n.storage,[sm,e.id])})};return n.decorateWallet(r)})()}getModule(e){return this.modules.find(n=>n.id===e)}getWallet(e){var n=this;return(0,ke.Z)(function*(){const r=n.getModule(e);if(!r)return null;const{selectedWalletId:u}=n.store.getState();return!r.metadata.available&&u?(n.onWalletSignedOut(u),null):yield r.wallet()})()}setup(){var e=this;return(0,ke.Z)(function*(){const n=[];for(let Y=0;Y(cc.log("Failed to setup module"),cc.error(ie),null));$&&(n.some(ie=>ie.id===$.id)||n.push({id:$.id,type:$.type,metadata:$.metadata,wallet:function(){var ie=(0,ke.Z)(function*(){let ue=e.instances[$.id];return ue||(ue=yield e.setupInstance($),e.instances[$.id]=ue,ue)});return function(){return ie.apply(this,arguments)}}()}))}e.modules=n;const{accounts:r,contract:u,selectedWalletId:v,recentlySignedInWallets:O}=yield e.resolveStorageState();e.store.dispatch({type:"SETUP_WALLET_MODULES",payload:{modules:n,accounts:r,contract:u,selectedWalletId:v,recentlySignedInWallets:O}});for(let Y=0;Y"string"==typeof t?(t=>{switch(t){case"mainnet":return{networkId:t,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://nearblocks.io",indexerUrl:"https://api.kitwallet.app"};case"testnet":return{networkId:t,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://testnet.nearblocks.io",indexerUrl:"https://testnet-api.kitwallet.app"};default:throw Error(`Failed to find config for: '${t}'`)}})(t):t;class wj extends $t{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const n=super._subscribe(e);return!n.closed&&e.next(this._value),n}getValue(){const{hasError:e,thrownError:n,_value:r}=this;if(e)throw n;return this._throwIfClosed(),r}next(e){super.next(this._value=e)}}function Ej(t,e){return mn(function Aj(t,e,n,r,u){return(v,O)=>{let Y=n,$=e,ie=0;v.subscribe(ut(O,ue=>{const he=ie++;$=Y?t($,ue,he):(Y=!0,ue),r&&O.next($)},u&&(()=>{Y&&O.next($),O.complete()})))}}(t,e,arguments.length>=2,!0))}const Sj=(t,e)=>{switch(cc.log("Store Action",e),e.type){case"SETUP_WALLET_MODULES":{const{modules:n,accounts:r,contract:u,selectedWalletId:v,recentlySignedInWallets:O}=e.payload,Y=r.map(($,ie)=>({...$,active:0===ie}));return{...t,modules:n,accounts:Y,contract:u,selectedWalletId:v,recentlySignedInWallets:O}}case"WALLET_CONNECTED":{const{walletId:n,contract:r,accounts:u,recentlySignedInWallets:v}=e.payload;if(!u.length)return t;const O=t.accounts.findIndex($=>$.active),Y=u.map(($,ie)=>({...$,active:ie===(O>-1?O:0)}));return{...t,contract:r,accounts:Y,selectedWalletId:n,recentlySignedInWallets:v}}case"WALLET_DISCONNECTED":{const{walletId:n}=e.payload;return n!==t.selectedWalletId?t:{...t,contract:null,accounts:[],selectedWalletId:null}}case"ACCOUNTS_CHANGED":{const{walletId:n,accounts:r}=e.payload;if(n!==t.selectedWalletId)return t;const u=t.accounts.find(Y=>Y.active),v=!r.some(Y=>Y.accountId===u?.accountId),O=r.map((Y,$)=>({...Y,active:v?0===$:Y.accountId===u?.accountId}));return{...t,accounts:O}}case"SET_ACTIVE_ACCOUNT":{const{accountId:n}=e.payload,r=t.accounts.map(u=>({...u,active:u.accountId===n}));return{...t,accounts:r}}default:return t}},_j=function(){var t=(0,ke.Z)(function*(e){const n=new om(e,sm),r={modules:[],accounts:[],contract:yield n.getItem(b8),selectedWalletId:yield n.getItem(w8),recentlySignedInWallets:(yield n.getItem(am))||[]},u=new wj(r),v=new $t;v.pipe(Ej(Sj,r)).subscribe(u);const O=function(){var $=(0,ke.Z)(function*(ie,ue,he,we){if(ue[we]!==ie[we]){if(ue[we])return void(yield n.setItem(he,ue[we]));yield n.removeItem(he)}});return function(ue,he,we,xe){return $.apply(this,arguments)}}();let Y=u.getValue();return u.subscribe($=>{O(Y,$,w8,"selectedWalletId"),O(Y,$,b8,"contract"),O(Y,$,am,"recentlySignedInWallets"),Y=$}),{observable:u,getState:()=>u.getValue(),dispatch:$=>v.next($),toReadOnly:()=>({getState:()=>u.getValue(),observable:u.asObservable()})}});return function(n){return t.apply(this,arguments)}}();let eE=null;const A8=(t,e,n,r)=>{return{options:t,store:e.toReadOnly(),wallet:(u=(0,ke.Z)(function*(v){const{selectedWalletId:O}=e.getState(),Y=yield n.getWallet(v||O);if(!Y)throw v?new Error("Invalid wallet id"):new Error("No wallet selected");return Y}),function(O){return u.apply(this,arguments)}),setActiveAccount:u=>{const{accounts:v}=e.getState();if(!v.some(O=>O.accountId===u))throw new Error("Invalid account id");e.dispatch({type:"SET_ACTIVE_ACCOUNT",payload:{accountId:u}})},isSignedIn(){const{accounts:u}=e.getState();return Boolean(u.length)},on:(u,v)=>r.on(u,v),off:(u,v)=>{r.off(u,v)}};var u},E8=function(){var t=(0,ke.Z)(function*(e){const{options:n,storage:r}=(t=>({options:{languageCode:t.languageCode||void 0,network:vj(t.network),debug:t.debug||!1,optimizeWalletOrder:!1!==t.optimizeWalletOrder,randomizeWalletOrder:t.randomizeWalletOrder||!1,relayerUrl:t.relayerUrl||void 0},storage:t.storage||new gj}))(e);gp.debug=n.debug;const u=new X2,v=yield _j(r),O=new yj({factories:e.modules,storage:r,options:n,store:v,emitter:u,provider:new pj(n.network.nodeUrl)});return yield O.setup(),e.allowMultipleSelectors?A8(n,v,O,u):(eE||(eE=A8(n,v,O,u)),eE)});return function(n){return t.apply(this,arguments)}}(),S8=t=>new Promise(e=>setTimeout(e,t)),_8=function(){var t=(0,ke.Z)(function*(e,n,r){const u=e();if(u)return u;if(!r)throw new Error("Exceeded timeout");return S8(n).then(()=>_8(e,n,r-1))});return function(n,r,u){return t.apply(this,arguments)}}(),lc=function(){var t=(0,ke.Z)(function*(e,n={}){const{timeout:r=100,interval:u=50}=n;return Promise.race([S8(r).then(()=>{throw new Error("Exceeded timeout")}),_8(e,u,Math.floor(r/u))])});return function(n){return t.apply(this,arguments)}}(),Df=t=>t.accounts.find(e=>e.active)||null,Mj=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],Ij=t=>{if(typeof navigator>"u")return!1;const e=(t=>""!==t&&Mj.reduce((e,[n,r])=>{if(e)return e;const u=r.exec(t);return!!u&&[n,u]},!1))(navigator.userAgent);if(!e)return!1;const[n]=e;return"searchbot"!==n&&!!t.find(r=>r===n)};var M8=p(21531),Cj=p(1520);class tE{constructor(e){this.tag=2147484061,this.message=e.message,this.nonce=e.nonce,this.recipient=e.recipient,e.callbackUrl&&(this.callbackUrl=e.callbackUrl)}}const D8=new Map([[tE,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),Oj=function(){var t=(0,ke.Z)(function*({accountId:e,network:n,publicKey:r}){return yield new Jn.providers.JsonRpcProvider({url:n.nodeUrl}).query({request_type:"view_access_key",account_id:e,finality:"final",public_key:r})});return function(n){return t.apply(this,arguments)}}(),Pj=function(){var t=(0,ke.Z)(function*({publicKey:e,accountId:n,network:r}){const{permission:u}=yield Oj({accountId:n,network:r,publicKey:e});return"FullAccess"===u});return function(n){return t.apply(this,arguments)}}(),I8=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Connect Your Wallet","whatIsAWallet":"What is a Wallet?","secureAndManage":"Secure & Manage Your Digital Assets","safelyStore":"Safely store and transfer your crypto and NFTs.","logInToAny":"Log In to Any NEAR App","noNeedToCreate":"No need to create new accounts or credentials. Connect your wallet and you are good to go!","getAWallet":"Get a Wallet","useAWallet":"Use a wallet to secure and manage your NEAR assets, and to log in to any NEAR app without the need for usernames and passwords.","connectionFailed":"Connection Failed","connectionSuccessful":"Connection Successful","connected":"Connected","connectingTo":"Connecting to","connectingMessage":{"injected":"Confirm the connection in the extension window","browser":"Confirm the connection in the wallet after redirect","hardware":"Confirm the connection in the ledger device","bridge":"Confirm the connection in the wallet"}},"ledger":{"connectWithLedger":"Connect with Ledger","makeSureYourLedger":"Make sure your Ledger is connected securely, and that the NEAR app is open on your device","continue":"Continue","specifyHDPath":"Specify HD Path","enterYourPreferredHDPath":"Enter your preferred HD path, then scan for any active accounts.","scan":"Scan","retry":"Retry","ledgerIsNotAvailable":"Ledger is not available","accessDeniedToUseLedgerDevice":"Access denied to use Ledger device","noAccountsFound":"No Accounts Found","selectYourAccounts":"Select Your Accounts","connecting1Account":"Connecting 1 Account","cantFindAnyAccount":"Can\'t find any account associated with this Ledger. Please create a new NEAR account on","orConnectAnAnotherLedger":"or connect an another Ledger.","connecting":"Connecting","ofAccounts":"of Accounts","failedToAutomatically":"Failed to automatically find account id. Provide it manually:","overviewTheListOfAuthorized":"Overview the list of authorized account(s), complete sign in by clicking the button below.","finish":"Finish"},"install":{"youllNeedToInstall":"You\'ll need to install","toContinueAfterInstalling":"to continue. After installing","refreshThePage":"refresh the page.","open":"Open"},"qr":{"copiedToClipboard":"Copied to clipboard","failedToCopy":"Failed to copy to clipboard","scanWithYourMobile":"Scan with Your Mobile Device","copyToClipboard":" Copy to clipboard","preferTheOfficial":"Prefer the official dialogue of","open":"Open"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"},"exportAccounts":{"chooseAWallet":"Choose a Wallet","transferYourAccounts":"Transfer Your Accounts","selectAWallet":"Select a wallet that fits your needs and supports your connected accounts.","selectYourAccounts":"Select Your Accounts","afterDecide":"After you decide on a wallet, you can select which accounts you want to transfer.","disclaimer":"You won\u2019t be able to transfer accounts that have never been funded or used on NEAR.","warning":"does not support account export at this time. Please select another wallet.","walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet"},"selectAccounts":{"title":"Select Accounts to Transfer","button":"Continue","deselectAll":"Deselect All","selectAll":"Select All","unavailable":"Transfer Unavailable","error":"Account does not exist","warningLedger":"Ledger support required","noBalance":"Account not funded"},"getPassphrase":{"title":"Copy Temporary Password","desc":"You\u2019ll need to enter this password when you begin exporting your accounts to a different wallet.","button":"Continue","transferButton":"Transfer Accounts","label":"Click to Copy","checkLabel":"I copied or wrote down the password"},"complete":{"title":"Complete the Transfer","descOne":"You will now be redirected to the wallet you selected to complete the transfer.","descTwo":"Once import part of process is completed from selected wallet, press button to complete the transfer process.","startOverButton":"Start Over","button":"Complete"}}},"component":{"clickToCopy":{"label":"Copied","tooltip":"Click to copy"}}}'),Nj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Conecta Tu Billetera","whatIsAWallet":"\xbfQue es una Billetera?","secureAndManage":"Resguarda y Administrar Tus Activos Digitales","safelyStore":"Almacena de forma segura y transfiere tus cryptos y NFT\'s","logInToAny":"Inicie sesi\xf3n en Cualquier Aplicacion NEAR","noNeedToCreate":"No es necesario crear nuevas cuentas o credenciales, \xa1Conecta tu billetera y listo!","getAWallet":"Obten una Billetera","useAWallet":"Usa tu Billetera para resguardar y administrar tus activos en NEAR, e Iniciar sesi\xf3n en cualquier aplicacion NEAR sin la necesidad de nombres de usuarios y contrase\xf1as","connectionFailed":"Conexi\xf3n Fallida","connectionSuccessful":"Conexi\xf3n Existosa","connected":"Conectado","connectingTo":"Conectando a ","connectingMessage":{"injected":"Confirme la conexi\xf3n en la ventana de extensi\xf3n","browser":"Confirme la conexi\xf3n en la billetera despu\xe9s de la redirecci\xf3n","hardware":"Confirme la conexi\xf3n en el dispositivo de libro mayor","bridge":"Confirmar la conexi\xf3n en la billetera"}},"ledger":{"connectWithLedger":"Conectar con Ledger","makeSureYourLedger":"Aseg\xfarese de que su ledger est\xe1 conectada de forma segura y que la aplicacion NEAR est\xe9 abierta en su dispositivo","continue":"Continuar","specifyHDPath":"Especifique la ruta HD","enterYourPreferredHDPath":"Ingrese su ruta HD prerida,y luego busque cualquier cuenta activa.","scan":"Escanear","retry":"Reintentar","ledgerIsNotAvailable":"El Ledger no est\xe1 disponible","accessDeniedToUseLedgerDevice":"Acceso denegado para usar el dispositivo ledger","noAccountsFound":"No se encontraron cuentas","selectYourAccounts":"Selecciona tus cuentas","connecting1Account":"Conectando a 1 cuenta","cantFindAnyAccount":"No se pudo encontrar ninguna cuenta asociada con este ledger,Por favor crea una nueva cuenta en NEAR","orConnectAnAnotherLedger":"o conecta otro ledger","connecting":"Conectando","ofAccounts":"de Cuentas","failedToAutomatically":"No se pudo encontrar automaticamente el id de la cuenta,Ingresalo manualmente:","overviewTheListOfAuthorized":"Revise la lista de las cuentas autorizadas,Complete el inicio de sesi\xf3n haciedo click a countinuacion.","finish":"Finalizar"},"install":{"youllNeedToInstall":"Tendr\xe1s que instalar","toContinueAfterInstalling":"Para continuar, Despues de instalar","refreshThePage":"Recarga la pagina","open":"Abrir"},"qr":{"copiedToClipboard":"Copiado al Portapapeles","failedToCopy":"Fall\xf3 la copia al Portapapeles","scanWithYourMobile":"Busca con tu dispositivo movil","copyToClipboard":" Copiar al Portapapeles","preferTheOfficial":"\xbfPrefires el di\xe1logo oficial de","open":"Abrir"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),Rj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u8fde\u63a5\u4f60\u7684\u94b1\u5305","whatIsAWallet":"\u4ec0\u4e48\u662f\u94b1\u5305\uff1f","secureAndManage":"\u4fdd\u62a4\u548c\u7ba1\u7406\u4f60\u7684\u6570\u5b57\u8d44\u4ea7","safelyStore":"\u5b89\u5168\u5b58\u50a8\u548c\u8f6c\u79fb\u4f60\u7684\u52a0\u5bc6\u8d27\u5e01\u548cNFT","logInToAny":"\u767b\u5f55\u4efb\u4f55 NEAR \u5e94\u7528","noNeedToCreate":"\u4e0d\u9700\u8981\u521b\u5efa\u65b0\u8d26\u6237\u6216\u5bc6\u7801\u3002\u8fde\u63a5\u4f60\u7684\u94b1\u5305\uff0c\u5373\u53ef\u5f00\u59cb\u4f7f\u7528\uff01","getAWallet":"\u83b7\u53d6\u65b0\u8d26\u6237","useAWallet":"\u4f7f\u7528\u94b1\u5305\u6765\u4fdd\u62a4\u548c\u7ba1\u7406\u4f60\u7684 NEAR \u8d44\u4ea7\uff0c\u65e0\u9700\u7528\u6237\u540d\u548c\u5bc6\u7801\u5373\u53ef\u767b\u5f55\u4efb\u4f55 NEAR \u5e94\u7528","connectionFailed":"\u8fde\u63a5\u5931\u8d25","connectionSuccessful":"\u8fde\u63a5\u6210\u529f","connected":"\u5df2\u8fde\u63a5","connectingTo":"\u6b63\u5728\u8fde\u63a5"},"ledger":{"connectWithLedger":"\u8fde\u63a5 Ledger","makeSureYourLedger":"\u786e\u4fdd\u4f60\u7684 Ledger \u5df2\u7ecf\u5b89\u5168\u8fde\u63a5\uff0c\u5e76\u4e14 NEAR \u5e94\u7528\u5df2\u7ecf\u5728\u4f60\u8bbe\u5907\u4e0a\u6253\u5f00","continue":"\u7ee7\u7eed","specifyHDPath":"\u6307\u5b9a HD \u8def\u5f84","enterYourPreferredHDPath":"\u8f93\u5165\u4f60\u504f\u597d\u7684 HD \u8def\u5f84\uff0c\u7136\u540e\u4e3a\u4efb\u610f\u6d3b\u8dc3\u8d26\u6237\u626b\u7801","scan":"\u626b\u7801","retry":"\u91cd\u8bd5","ledgerIsNotAvailable":"Ledger \u4e0d\u53ef\u7528","accessDeniedToUseLedgerDevice":"\u8bbf\u95ee Ledger \u8bbe\u5907\u88ab\u62d2\u7edd","noAccountsFound":"\u6ca1\u6709\u627e\u5230\u8d26\u6237","selectYourAccounts":"\u9009\u62e9\u4f60\u7684\u8d26\u6237","connecting1Account":"\u6b63\u5728\u8fde\u63a51\u4e2a\u8d26\u6237","cantFindAnyAccount":"\u6ca1\u6709\u627e\u5230\u4efb\u4f55\u4e0e\u8fd9\u4e2a Ledger \u76f8\u5173\u8054\u7684\u8d26\u6237\u3002\u8bf7\u521b\u5efa\u65b0\u8d26\u6237\u4e8e","orConnectAnAnotherLedger.":"\u6216\u8fde\u63a5\u53e6\u4e00\u4e2a Ledger","connecting":"\u6b63\u5728\u8fde\u63a5","ofAccounts":"\u4e2a\u8d26\u6237","failedToAutomatically":"\u65e0\u6cd5\u81ea\u52a8\u627e\u5230\u8d26\u6237ID\uff0c\u8bf7\u4e3b\u52a8\u63d0\u4f9b\uff1a","overviewTheListOfAuthorized":"\u8bf7\u67e5\u770b\u5df2\u6388\u6743\u7684\u8d26\u6237\u5217\u8868\uff0c\u70b9\u51fb\u4ee5\u4e0b\u6309\u94ae\u5b8c\u6210\u767b\u5f55","finish":"\u5b8c\u6210"},"install":{"youllNeedToInstall":"\u4f60\u5c06\u9700\u8981\u5b89\u88c5","toContinueAfterInstalling":"\u4ee5\u7ee7\u7eed\u3002\u5b89\u88c5\u5b8c","refreshThePage":"\u8bf7\u5237\u65b0\u9875\u9762","open":"\u6253\u5f00"},"qr":{"copiedToClipboard":"\u590d\u5236\u5230\u4e86\u526a\u8d34\u677f","failedToCopy":"\u590d\u5236\u5230\u526a\u8d34\u677f\u5931\u8d25","scanWithYourMobile":"\u7528\u4f60\u7684\u79fb\u52a8\u8bbe\u5907\u626b\u7801","copyToClipboard":" \u590d\u5236\u5230\u526a\u8d34\u677f","preferTheOfficial":"\u5e0c\u671b\u4f7f\u7528\u5b98\u65b9\u5bf9\u8bdd\u6846\u4e8e","open":"\u6253\u5f00"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),kj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u044f \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","whatIsAWallet":"\u041a\u0430\u043a\u0432\u043e \u0435 \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b?","secureAndManage":"\u0417\u0430\u0449\u0438\u0442\u0435\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0432\u0430\u0439\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u0438\u0442\u0435 \u0441\u0438 \u0430\u043a\u0442\u0438\u0432\u0438","safelyStore":"\u0421\u044a\u0445\u0440\u0430\u043d\u044f\u0432\u0430\u0439\u0442\u0435 \u0438 \u043f\u0440\u0435\u0445\u0432\u044a\u0440\u043b\u044f\u0439\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e \u0438 NFT.","logInToAny":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u044f\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 NEAR","noNeedToCreate":"\u041d\u044f\u043c\u0430 \u043d\u0443\u0436\u0434\u0430 \u0434\u0430 \u0441\u044a\u0437\u0434\u0430\u0432\u0430\u0442\u0435 \u043d\u043e\u0432\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438. \u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430 \u0441\u0438 \u0438 \u0441\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u0438!","getAWallet":"\u0421\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","useAWallet":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430, \u0437\u0430 \u0434\u0430 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0432\u0430\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0435 \u0441\u0438 \u043d\u0430 NEAR \u043a\u0430\u043a\u0442\u043e \u0438 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0432\u0441\u044f\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 NEAR \u0431\u0435\u0437 \u043d\u0443\u0436\u0434\u0430 \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0441\u043a\u0438 \u0438\u043c\u0435\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u0438.","connectionFailed":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e","connectionSuccessful":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e","connected":"\u0421\u0432\u044a\u0440\u0437\u0430\u043d","connectingTo":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u043a\u044a\u043c","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430 \u043d\u0430 \u0440\u0430\u0437\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u0442\u043e","browser":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430 \u0441\u043b\u0435\u0434 \u043f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0432\u0430\u043d\u0435\u0442\u043e","hardware":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u0445\u0430\u0440\u0434\u0443\u0435\u0440\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","bridge":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430 \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430"}},"ledger":{"connectWithLedger":"\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0441\u0435 \u0441 Ledger","makeSureYourLedger":"\u0423\u0432\u0435\u0440\u0435\u0442\u0435 \u0441\u0435, \u0447\u0435 \u0432\u0430\u0448\u0438\u044f\u0442 Ledger \u0435 \u0441\u0432\u044a\u0440\u0437\u0430\u043d \u0438 \u0447\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0442\u043e NEAR \u0435 \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u043e \u043da \u043d\u0435\u0433\u043e.","continue":"\u041f\u0440\u043e\u0434\u044a\u043b\u0436\u0435\u0442\u0435","specifyHDPath":"\u041f\u043e\u0441\u043e\u0447\u0435\u0442\u0435 HD \u043f\u044a\u0442","enterYourPreferredHDPath":"\u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u043d\u0438\u044f HD \u043f\u044a\u0442, \u0441\u043b\u0435\u0434 \u043a\u043e\u0435\u0442\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435 \u0437\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0438 \u0430\u043a\u0430\u0443\u043d\u0442\u0438.","scan":"\u0421\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435","retry":"\u041e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e","ledgerIsNotAvailable":"Ledger \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e","accessDeniedToUseLedgerDevice":"\u0414\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0437\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u043d\u0435 \u043d\u0430 Ledger \u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d","noAccountsFound":"\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","connecting1Account":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u043d\u0430 1 \u043f\u0440\u043e\u0444\u0438\u043b","cantFindAnyAccount":"\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0441\u044a\u0432\u0440\u0437\u0430\u043d\u0438 \u0441 \u0442\u043e\u0437\u0438 Ledger. \u041c\u043e\u043b\u044f, \u0441\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432 NEAR \u043f\u0440\u043e\u0444\u0438\u043b \u043d\u0430","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u0441\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 Ledger.","connecting":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435","ofAccounts":"\u043e\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","failedToAutomatically":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0442\u043e \u043d\u0430\u043c\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0430 \u043d\u0435 \u0431\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u0433\u043e \u0440\u044a\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0439\u0442\u0435 \u0441\u043f\u0438\u0441\u044a\u043a\u0430 \u0441 \u0443\u043f\u044a\u043b\u043d\u043e\u043c\u043e\u0449\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0437\u0430\u0432\u044a\u0440\u0448\u0435\u0442\u0435 \u0432\u043b\u0438\u0437\u0430\u043d\u0435\u0442\u043e, \u043a\u0430\u0442\u043e \u0449\u0440\u0430\u043a\u043d\u0435\u0442\u0435 \u0432\u044a\u0440\u0445\u0443 \u0431\u0443\u0442\u043e\u043d\u0430 \u043f\u043e-\u0434\u043e\u043b\u0443..","finish":"\u0417\u0430\u0432\u044a\u0440\u0448\u0435\u0442\u0435"},"install":{"youllNeedToInstall":"\u0429\u0435 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u0434\u0430 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438\u0442\u0435. \u0421\u043b\u0435\u0434 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u0435","refreshThePage":"\u043f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0442\u0430.","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","failedToCopy":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u0430\u043d\u0435 \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","scanWithYourMobile":" \u0421\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435 \u0441 \u043c\u043e\u0431\u0438\u043b\u043d\u043e\u0442\u043e \u0441\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e","copyToClipboard":" \u041a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435 \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","preferTheOfficial":"\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u043d \u0435\u0437\u0438\u043a \u0437\u0430 \u043a\u043e\u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0446\u0438\u044f","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),Lj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\uc9c0\uac11 \uc5f0\uacb0\ud558\uae30","whatIsAWallet":"\uc9c0\uac11\uc740 \ubb34\uc2a8 \uc5ed\ud560\uc744 \ud558\ub098\uc694?","secureAndManage":"\ub2f9\uc2e0\uc758 \ub514\uc9c0\ud138 \uc790\uc0b0\uc744 \ubcf4\ud638\ud558\uace0 \uad00\ub9ac\ud569\ub2c8\ub2e4.","safelyStore":"\uc554\ud638\ud654\ud3d0\uc640 NFT\ub97c \uc548\uc804\ud558\uac8c \uc800\uc7a5\ud558\uace0 \uc804\uc1a1\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","logInToAny":"NEAR App\uc5d0 \ub85c\uadf8\uc778\ud569\ub2c8\ub2e4.","noNeedToCreate":"\uc0c8\ub85c\uc6b4 \uacc4\uc815\uc774\ub098 \ube44\ubc00\ubc88\ud638\ub97c \ub9cc\ub4e4 \ud544\uc694 \uc5c6\uc774 \uc9c0\uac11\uc744 \uc5f0\uacb0\ud55c \ud6c4 \ubc14\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","getAWallet":"\uc9c0\uac11 \uac00\uc838\uc624\uae30","useAWallet":"\uc9c0\uac11\uc744 \uc0ac\uc6a9\ud558\uc5ec NEAR \uc790\uc0b0\uc744 \ubcf4\ud638\xb7\uad00\ub9ac\ud558\uace0, \uc544\uc774\ub514\uc640 \ube44\ubc00\ubc88\ud638 \uc5c6\uc774 NEAR \uc571\uc5d0 \ub85c\uadf8\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","connectionFailed":"\uc5f0\uacb0 \uc2e4\ud328","connectionSuccessful":"\uc5f0\uacb0 \uc131\uacf5","connected":"Connected","connectingTo":"\uc5f0\uacb0 \uc911: ","connectingMessage":{"injected":"\uc775\uc2a4\ud150\uc158 \ucc3d\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","browser":"\ub9ac\ub2e4\uc774\ub809\ud2b8 \ub41c \uc9c0\uac11\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","hardware":"Ledger \uae30\uae30\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","bridge":"\uc9c0\uac11\uc5d0\uc11c \uc5f0\uacb0 \ud655\uc778"}},"ledger":{"connectWithLedger":"Ledger \uc5f0\uacb0\ud558\uae30","makeSureYourLedger":"Ledger\uac00 \uc548\uc804\ud558\uac8c \uc5f0\uacb0\ub418\uc5b4 \uc788\uace0, NEAR \uc571\uc774 \uc5f4\ub824 \uc788\ub294 \uc9c0 \ud655\uc778\ud558\uc138\uc694","continue":"\uacc4\uc18d\ud558\uae30","specifyHDPath":"HD Path \uc9c0\uc815\ud558\uae30","enterYourPreferredHDPath":"\uc6d0\ud558\ub294 HD Path\ub97c \uc120\ud0dd\ud558\uace0, \ud65c\uc131\ud654\ub41c \uacc4\uc815\uc774 \uc788\ub294 \uc9c0 \uac80\uc0c9\ud558\uc138\uc694","scan":"\uac80\uc0c9","retry":"\ub2e4\uc2dc \uc2dc\ub3c4","ledgerIsNotAvailable":"Ledger\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4","accessDeniedToUseLedgerDevice":"Ledger \uae30\uae30 \uc811\uadfc \uad8c\ud55c\uc774 \uac70\ubd80\ub418\uc5c8\uc2b5\ub2c8\ub2e4","noAccountsFound":"\uacc4\uc815\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4","selectYourAccounts":"\uacc4\uc815 \uc120\ud0dd\ud558\uae30","connecting1Account":"\ud558\ub098\uc758 \uacc4\uc815\uc5d0 \uc5f0\uacb0","cantFindAnyAccount":"Ledger\uc640 \uc5f0\uacb0\ub41c \uacc4\uc815\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc0c8\ub85c\uc6b4 \uacc4\uc815\uc744 \uc0dd\uc131\ud558\uac70\ub098 ","orConnectAnAnotherLedger":"\ub2e4\ub978 Ledger\ub97c \uc5f0\uacb0\ud558\uc138\uc694","connecting":"\uacc4\uc815 \uc5f0\uacb0\ud558\uae30: ","ofAccounts":"\uac1c \uacc4\uc815\uc744 \ucc3e\uc558\uc2b5\ub2c8\ub2e4","failedToAutomatically":"\uacc4\uc815 ID\ub97c \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc218\ub3d9\uc73c\ub85c \uc785\ub825\ud574\uc8fc\uc138\uc694.","overviewTheListOfAuthorized":"\uc778\uc99d\ub41c \uacc4\uc815 \ubaa9\ub85d\uc744 \ud655\uc778\ud55c \ud6c4 \uc544\ub798 \ubc84\ud2bc\uc744 \ud074\ub9ad\ud558\uc5ec \ub85c\uadf8\uc778\uc744 \uc644\ub8cc\ud558\uc138\uc694","finish":"\uc644\ub8cc"},"walletTypes":{"hardware":"\ud558\ub4dc\uc6e8\uc5b4 \uc9c0\uac11","browser":"\ube0c\ub77c\uc6b0\uc800 \uc9c0\uac11","injected":"\uc9c0\uac11 \ud655\uc7a5","bridge":"\ube0c\ub9ac\uc9c0 \uc9c0\uac11","mobile":"\ubaa8\ubc14\uc77c \uc9c0\uac11","instant-link":"\uc778\uc2a4\ud134\ud2b8 \uc9c0\uac11"},"install":{"youllNeedToInstall":"\ub2e4\uc74c \ud655\uc7a5 \ud504\ub85c\uadf8\ub7a8\uc744 \uc124\uce58\ud574\uc8fc\uc138\uc694:","toContinueAfterInstalling":". \uc124\uce58 \uc644\ub8cc \ud6c4 \ud398\uc774\uc9c0 \uc0c8\ub85c \uace0\uce68\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. ","refreshThePage":"\uc0c8\ub85c \uace0\uce68","open":"Open"},"qr":{"copiedToClipboard":"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac \uc644\ub8cc","failedToCopy":"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac \uc2e4\ud328","scanWithYourMobile":"\ubaa8\ubc14\uc77c \uc7a5\uce58\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2a4\uce94\ud574\uc8fc\uc138\uc694","copyToClipboard":" \ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ud558\uae30","preferTheOfficial":"\ub2e4\uc74c \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \uacf5\uc2dd \ud504\ub85c\uc138\uc2a4\ub97c \uc120\ud638\ud558\uc2ed\ub2c8\uae4c: ","open":"Open"}}}'),Fj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"K\u1ebft n\u1ed1i v\xed c\u1ee7a b\u1ea1n","whatIsAWallet":"V\xed l\xe0 g\xec?","secureAndManage":"B\u1ea3o m\u1eadt & Qu\u1ea3n l\xfd t\xe0i s\u1ea3n s\u1ed1 c\u1ee7a b\u1ea1n","safelyStore":"L\u01b0u tr\u1eef v\xe0 chuy\u1ec3n ti\u1ec1n \u0111i\u1ec7n t\u1eed v\xe0 NFT c\u1ee7a b\u1ea1n m\u1ed9t c\xe1ch an to\xe0n.","logInToAny":"\u0110\u0103ng nh\u1eadp v\xe0o b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng tr\xean NEAR","noNeedToCreate":"Kh\xf4ng c\u1ea7n t\u1ea1o t\xe0i kho\u1ea3n ho\u1eb7c th\xf4ng tin \u0111\u0103ng nh\u1eadp m\u1edbi. K\u1ebft n\u1ed1i v\xed c\u1ee7a b\u1ea1n v\xe0 b\u1eaft \u0111\u1ea7u!","getAWallet":"T\u1ea1o V\xed","useAWallet":"S\u1eed d\u1ee5ng v\xed \u0111\u1ec3 b\u1ea3o m\u1eadt v\xe0 qu\u1ea3n l\xfd t\xe0i s\u1ea3n tr\xean NEAR c\u1ee7a b\u1ea1n v\xe0 \u0111\u0103ng nh\u1eadp v\xe0o b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng NEAR n\xe0o, kh\xf4ng c\u1ea7n t\xean ng\u01b0\u1eddi d\xf9ng v\xe0 m\u1eadt kh\u1ea9u.","connectionFailed":"K\u1ebft n\u1ed1i th\u1ea5t b\u1ea1i","connectionSuccessful":"K\u1ebft n\u1ed1i th\xe0nh c\xf4ng","connected":"\u0110\xe3 k\u1ebft n\u1ed1i","connectingTo":"\u0110ang k\u1ebft n\u1ed1i t\u1edbi","connectingMessage":{"injected":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong c\u1eeda s\u1ed5 ti\u1ec7n \xedch m\u1edf r\u1ed9ng","browser":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong v\xed sau khi \u0111\u01b0\u1ee3c chuy\u1ec3n h\u01b0\u1edbng","hardware":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i v\u1edbi v\xed l\u1ea1nh","bridge":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong v\xed"}},"ledger":{"connectWithLedger":"K\u1ebft n\u1ed1i v\xed Ledger","makeSureYourLedger":"\u0110\u1ea3m b\u1ea3o Ledger c\u1ee7a b\u1ea1n \u0111\u01b0\u1ee3c k\u1ebft n\u1ed1i an to\xe0n v\xe0 \u1ee9ng d\u1ee5ng NEAR \u0111ang m\u1edf s\u1eb5n tr\xean thi\u1ebft b\u1ecb","continue":"Ti\u1ebfp t\u1ee5c","specifyHDPath":"Ch\u1ec9 \u0111\u1ecbnh HD Path","enterYourPreferredHDPath":"Nh\u1eadp HD Path c\u1ee7a b\u1ea1n, sau \u0111\xf3 qu\xe9t t\xecm c\xe1c t\xe0i kho\u1ea3n ho\u1ea1t \u0111\u1ed9ng","scan":"Qu\xe9t","retry":"Th\u1eed l\u1ea1i","ledgerIsNotAvailable":"Ledger kh\xf4ng kh\u1ea3 d\u1ee5ng","accessDeniedToUseLedgerDevice":"Truy c\u1eadp Ledger b\u1ecb t\u1eeb ch\u1ed1i","noAccountsFound":"Kh\xf4ng t\xecm th\u1ea5y t\xe0i kho\u1ea3n","selectYourAccounts":"Ch\u1ecdn t\xe0i kho\u1ea3n c\u1ee7a b\u1ea1n","connecting1Account":"\u0110ang k\u1ebft n\u1ed1i 1 t\xe0i kho\u1ea3n","cantFindAnyAccount":"Kh\xf4ng th\u1ec3 t\xecm th\u1ea5y b\u1ea5t k\u1ef3 t\xe0i kho\u1ea3n n\xe0o \u0111\u01b0\u1ee3c li\xean k\u1ebft v\u1edbi Ledger n\xe0y. Vui l\xf2ng t\u1ea1o m\u1ed9t t\xe0i kho\u1ea3n NEAR m\u1edbi","orConnectAnAnotherLedger":"ho\u1eb7c k\u1ebft n\u1ed1i v\u1edbi v\xed Ledger kh\xe1c.","connecting":"\u0110ang k\u1ebft n\u1ed1i","ofAccounts":"c\u1ee7a t\xe0i kho\u1ea3n","failedToAutomatically":"Kh\xf4ng th\u1ec3 t\u1ef1 \u0111\u1ed9ng t\xecm id t\xe0i kho\u1ea3n. Nh\u1eadp th\u1ee7 c\xf4ng:","overviewTheListOfAuthorized":"T\u1ed5ng quan danh s\xe1ch c\xe1c t\xe0i kho\u1ea3n \u0111\u01b0\u1ee3c \u1ee7y quy\u1ec1n, ho\xe0n t\u1ea5t \u0111\u0103ng nh\u1eadp b\u1eb1ng c\xe1ch b\u1ea5m v\xe0o n\xfat b\xean d\u01b0\u1edbi.","finish":"Ho\xe0n th\xe0nh"},"install":{"youllNeedToInstall":"B\u1ea1n s\u1ebd c\u1ea7n c\xe0i \u0111\u1eb7t","toContinueAfterInstalling":"\u0111\u1ec3 b\u1eaft \u0111\u1ea7u. Sau khi c\xe0i \u0111\u1eb7t xong","refreshThePage":"T\u1ea3i l\u1ea1i trang.","open":"M\u1edf"},"qr":{"copiedToClipboard":"\u0110\xe3 sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m","failedToCopy":"Sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m th\u1ea5t b\u1ea1i","scanWithYourMobile":"Qu\xe9t v\u1edbi \u0111i\u1ec7n tho\u1ea1i c\u1ee7a b\u1ea1n","copyToClipboard":" Sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m","preferTheOfficial":"Dialogue ch\xednh th\u1ee9c c\u1ee7a","open":"M\u1edf"},"walletTypes":{"hardware":"V\xed l\u1ea1nh","browser":"V\xed tr\xecnh duy\u1ec7t","injected":"V\xed ti\u1ec7n \xedch m\u1edf r\u1ed9ng","bridge":"V\xed C\u1ea7u","mobile":"V\xed Mobile","instant-link":"V\xed t\u1ee9c th\xec"},"exportAccounts":{"chooseAWallet":"Ch\u1ecdn v\xed","transferYourAccounts":"Chuy\u1ec3n t\xe0i kho\u1ea3n","selectAWallet":"Ch\u1ecdn v\xed ph\xf9 h\u1ee3p v\u1edbi nhu c\u1ea7u c\u1ee7a b\u1ea1n, v\xed \u0111\u01b0\u1ee3c ch\u1ecdn c\u1ea7n h\u1ed7 tr\u1ee3 c\xe1c t\xe0i kho\u1ea3n \u0111ang s\u1eed d\u1ee5ng.","selectYourAccounts":"Ch\u1ecdn t\xe0i kho\u1ea3n","afterDecide":"Sau khi ch\u1ecdn \u0111\u01b0\u1ee3c t\xe0i kho\u1ea3n b\u1ea1n c\xf3 chuy\u1ec3n.","disclaimer":"B\u1ea1n kh\xf4ng th\u1ec3 chuy\u1ec3n t\xe0i kho\u1ea3n n\u1ebfu t\xe0i kho\u1ea3n \u0111\xf3 ch\u01b0a \u0111\u01b0\u1ee3c nh\u1eadn ti\u1ec1n ho\u1eb7c ch\u01b0a ph\xe1t sinh giao d\u1ecbch tr\xean NEAR.","warning":"kh\xf4ng h\u1ed7 tr\u1ee3 xu\u1ea5t t\xe0i kho\u1ea3n. Vui l\xf2ng ch\u1ecdn v\xed kh\xe1c.","walletTypes":{"hardware":"V\xed l\u1ea1nh","browser":"V\xed tr\xecnh duy\u1ec7t","injected":"V\xed ti\u1ec7n \xedch m\u1edf r\u1ed9ng","bridge":"V\xed C\u1ea7u","mobile":"V\xed Mobile"},"selectAccounts":{"title":"Ch\u1ecdn t\xe0i kho\u1ea3n \u0111\u1ec3 chuy\u1ec3n","button":"L\u1ea5y c\u1ee5m m\u1eadt kh\u1ea9u","deselectAll":"B\u1ecf ch\u1ecdn t\u1ea5t c\u1ea3","selectAll":"Ch\u1ecdn t\u1ea5t c\u1ea3","unavailable":"Chuy\u1ec3n kh\xf4ng kh\u1ea3 d\u1ee5ng","error":"T\xe0i kho\u1ea3n kh\xf4ng t\u1ed3n t\u1ea1i","warningLedger":"Y\xeau c\u1ea7u h\u1ed7 tr\u1ee3 Ledger","noBalance":"T\xe0i kho\u1ea3n tr\u1ed1ng"},"getPassphrase":{"title":"Sao ch\xe9p m\u1eadt kh\u1ea9u t\u1ea1m th\u1eddi","desc":"B\u1ea1n s\u1ebd c\u1ea7n nh\u1eadp m\u1eadt kh\u1ea9u khi b\u1eaft \u0111\u1ea7u xu\u1ea5t c\xe1c kho\u1ea3n t\u1edbi v\xed kh\xe1c.","button":"Ti\u1ebfp t\u1ee5c","label":"B\u1ea5m \u0111\u1ec3 sao ch\xe9p","checkLabel":"T\xf4i \u0111\xe3 ch\xe9p ho\u1eb7c ghi l\u1ea1i m\u1eadt kh\u1ea9u"},"complete":{"title":"Ho\xe0n th\xe0nh chuy\u1ec3n","descOne":"B\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c chuy\u1ec3n h\u01b0\u1edbng t\u1edbi t\xe0i kho\u1ea3n \u0111\xe3 ch\u1ecdn \u0111\u1ec3 ho\xe0n t\u1ea5t qu\xe1 tr\xecnh.","descTwo":"Sau khi nh\u1eadp, nh\u1ea5n n\xfat \u0111\u1ec3 ho\xe0n t\u1ea5t quy tr\xecnh chuy\u1ec3n.","button":"Ho\xe0n th\xe0nh"}}},"component":{"clickToCopy":{"label":"\u0110\xe3 sao ch\xe9p","tooltip":"B\u1ea5m \u0111\u1ec3 sao ch\xe9p"}}}'),Bj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0905\u092a\u0928\u093e \u0935\u0949\u0932\u0947\u091f (Wallet) \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902\u0964","whatIsAWallet":"\u0935\u0949\u0932\u0947\u091f \u0915\u094d\u092f\u093e \u0939\u0948?","secureAndManage":"\u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0914\u0930 \u092a\u094d\u0930\u092c\u0902\u0927\u093f\u0924 \u0915\u0930\u0947\u0902\u0964","safelyStore":"\u0905\u092a\u0928\u0940 \u0915\u094d\u0930\u093f\u092a\u094d\u091f\u094b\u0915\u0930\u0947\u0902\u0938\u0940 \u0914\u0930 \u090f\u0928\u090f\u092b\u091f\u0940 \u0915\u094b \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0938\u094d\u091f\u094b\u0930 \u0914\u0930 \u091f\u094d\u0930\u093e\u0902\u0938\u092b\u0930 \u0915\u0930\u0947\u0902\u0964","logInToAny":"NEAR \u092a\u0930 \u0915\u093f\u0938\u0940 \u092d\u0940 \u0910\u092a \u092e\u0947\u0902 \u0938\u093e\u0907\u0928 \u0907\u0928 \u0915\u0930\u0947\u0902\u0964","noNeedToCreate":"\u0928\u090f \u0916\u093e\u0924\u0947 \u092f\u093e \u0932\u0949\u0917\u093f\u0928 \u092c\u0928\u093e\u0928\u0947 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0905\u092a\u0928\u093e \u0935\u0949\u0932\u0947\u091f(NEAR Wallet)\u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902 \u0914\u0930 \u0906\u0930\u0902\u092d \u0915\u0930\u0947\u0902\u0964","getAWallet":"\u090f\u0915 \u0935\u0949\u0932\u0947\u091f \u092c\u0928\u093e\u090f\u0901\u0964","useAWallet":"\u0905\u092a\u0928\u0940 NEAR \u0938\u0902\u092a\u0924\u094d\u0924\u093f\u092f\u094b\u0902 \u0915\u094b \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0914\u0930 \u092a\u094d\u0930\u092c\u0902\u0927\u093f\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0935\u0949\u0932\u0947\u091f \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0947\u0902 \u0914\u0930 \u0915\u093f\u0938\u0940 \u092d\u0940 NEAR \u0910\u092a (app) \u092e\u0947\u0902 \u0932\u0949\u0917 \u0907\u0928 \u0915\u0930\u0947\u0902, \u0915\u093f\u0938\u0940 \u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e (user) \u0928\u093e\u092e \u0914\u0930 \u092a\u093e\u0938\u0935\u0930\u094d\u0921 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948\u0964","connectionFailed":"\u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0935\u093f\u092b\u0932|","connectionSuccessful":"\u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0938\u092b\u0932|","connected":"\u0935\u0949\u0932\u0947\u091f \u091c\u0941\u095c \u0917\u092f\u093e|","connectingTo":"\u0935\u0949\u0932\u0947\u091f \u091c\u0941\u095c \u0930\u0939\u093e \u0939\u0947|","connectingMessage":{"injected":"\u090f\u0915\u094d\u0938\u091f\u0947\u0902\u0936\u0928 \u0935\u093f\u0902\u0921\u094b \u092e\u0947\u0902 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|","browser":"\u0930\u0940\u0921\u093e\u092f\u0930\u0947\u0915\u094d\u091f \u0939\u094b\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u0935\u0949\u0932\u0947\u091f \u092e\u0947\u0902 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|","hardware":"\u0915\u094b\u0932\u094d\u0921 \u0935\u0949\u0932\u0947\u091f \u0915\u0947 \u0938\u093e\u0925 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|"}},"ledger":{"connectWithLedger":"\u0932\u0947\u091c\u0930(Ledger)\u0935\u0949\u0932\u0947\u091f \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902|","makeSureYourLedger":"\u0938\u0941\u0928\u093f\u0936\u094d\u091a\u093f\u0924 \u0915\u0930\u0947\u0902 \u0915\u093f \u0906\u092a\u0915\u093e \u0932\u0947\u091c\u0930 \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u091c\u0941\u0921\u093c\u093e \u0939\u0941\u0906 \u0939\u0948 \u0914\u0930 NEAR \u0910\u092a \u0906\u092a\u0915\u0947 \u0921\u093f\u0935\u093e\u0907\u0938 (Device)\u092a\u0930 \u092a\u0939\u0932\u0947 \u0938\u0947 \u0939\u0940 \u0916\u0941\u0932\u093e \u0939\u0948|","continue":"\u091c\u093e\u0930\u0940 \u0930\u0916\u0947|","specifyHDPath":"\u0939\u093e\u0930\u094d\u0921 \u0921\u093f\u0938\u094d\u0915(Hard Disk)\u092a\u0925(Path)\u0928\u093f\u0930\u094d\u0927\u093e\u0930\u093f\u0924 \u0915\u0930\u0947|","enterYourPreferredHDPath":"\u0905\u092a\u0928\u093e \u090f\u091a\u0921\u0940 \u092a\u0925 \u0926\u0930\u094d\u091c \u0915\u0930\u0947\u0902, \u092b\u093f\u0930 \u0938\u0915\u094d\u0930\u093f\u092f \u0916\u093e\u0924\u094b\u0902 \u0915\u0947 \u0932\u093f\u090f \u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|","scan":"\u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947|","retry":"\u0926\u094b\u092c\u093e\u0930\u093e \u092a\u094d\u0930\u092f\u093e\u0938 \u0915\u0930\u0947|","ledgerIsNotAvailable":"\u0932\u0947\u091c\u0930 \u0909\u092a\u0932\u092c\u094d\u0927 \u0928\u0939\u0940\u0902 \u0939\u0948|","accessDeniedToUseLedgerDevice":"\u0932\u0947\u091c\u0930 \u0921\u093f\u0935\u093e\u0907\u0938 \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u092a\u094d\u0930\u0935\u0947\u0936 \u0928\u093f\u0937\u0947\u0927|","noAccountsFound":"\u0916\u093e\u0924\u093e \u0928\u0939\u0940\u0902 \u092e\u093f\u0932\u093e|","selectYourAccounts":"\u0905\u092a\u0928\u0947 \u0916\u093e\u0924\u0947 \u091a\u0941\u0928\u0947\u0902|","connecting1Account":"\u090f\u0915 \u0916\u093e\u0924\u093e \u0915\u0928\u0947\u0915\u094d\u091f \u0939\u094b \u0930\u0939\u093e \u0939\u0948|","cantFindAnyAccount":"\u0907\u0938 \u0932\u0947\u091c\u0930 \u0938\u0947 \u091c\u0941\u0921\u093c\u093e \u0915\u094b\u0908 \u0916\u093e\u0924\u093e \u0928\u0939\u0940\u0902 \u092e\u093f\u0932\u093e\u0964 \u0915\u0943\u092a\u092f\u093e \u090f\u0915 \u0928\u092f\u093e NEAR \u0916\u093e\u0924\u093e \u092c\u0928\u093e\u090f\u0901|","orConnectAnAnotherLedger":"\u0905\u0925\u0935\u093e \u0926\u0942\u0938\u0930\u0947 \u0932\u0947\u091c\u0930 \u0935\u0949\u0932\u0947\u091f \u0938\u0947 \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902\u0964","connecting":"\u091c\u0941\u095c \u0930\u0939\u093e \u0939\u0947|","ofAccounts":"\u0916\u093e\u0924\u093e \u0905\u092c \u091c\u0941\u095c\u093e \u0928\u0939\u0940\u0902 \u0939\u0947|","failedToAutomatically":"\u0916\u093e\u0924\u093e \u0906\u0908\u0921\u0940 \u0938\u094d\u0935\u091a\u093e\u0932\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0916\u094b\u091c\u0928\u0947 \u092e\u0947\u0902 \u0905\u0938\u092e\u0930\u094d\u0925\u0964 \u092e\u0948\u0928\u094d\u092f\u0941\u0905\u0932 (Manuall) \u0930\u0942\u092a \u0938\u0947 \u0915\u094b\u0936\u093f\u0936 \u0915\u0930\u0947\u0902|","overviewTheListOfAuthorized":"\u0905\u0935\u0932\u094b\u0915\u0928 \u0905\u0927\u093f\u0915\u0943\u0924 \u0915\u0940 \u0938\u0942\u091a\u0940, \u0928\u0940\u091a\u0947 \u0926\u093f\u090f \u0917\u090f \u092c\u091f\u0928 \u092a\u0930 \u0915\u094d\u0932\u093f\u0915 \u0915\u0930\u0915\u0947 \u0932\u0949\u0917\u093f\u0928 \u092a\u0942\u0930\u093e \u0915\u0930\u0947\u0902\u0964","finish":"\u0938\u092e\u093e\u092a\u094d\u0924|"},"install":{"youllNeedToInstall":"\u0906\u092a\u0915\u094b \u0907\u0902\u0938\u094d\u091f\u0949\u0932 \u0915\u0930\u0928\u093e \u0939\u094b\u0917\u093e|","toContinueAfterInstalling":"\u0907\u0902\u0938\u094d\u091f\u0949\u0932 \u0915\u0930\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u091c\u093e\u0930\u0940 \u0930\u0916\u0947|","refreshThePage":"\u092a\u0941\u0928: \u0932\u094b\u0921 \u0915\u0930\u0947\u0902\u0964","open":"\u0916\u094b\u0932\u0947|"},"qr":{"copiedToClipboard":"\u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921(Clipboard)\u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u093f\u092f\u093e \u0917\u092f\u093e|","failedToCopy":"\u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921 \u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u0930\u0928\u093e \u0935\u093f\u092b\u0932 \u0930\u0939\u093e|","scanWithYourMobile":"\u0905\u092a\u0928\u0947 \u092b\u094b\u0928 (Mobile)\u0938\u0947 \u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|","copyToClipboard":" \u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921 \u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u0930\u0947\u0902|","preferTheOfficial":"\u0906\u0927\u093f\u0915\u093e\u0930\u093f\u0915 \u0938\u0902\u0935\u093e\u0926 \u0915\u094b \u092a\u094d\u0930\u093e\u0925\u092e\u093f\u0915\u0924\u093e \u0926\u0947\u0902|","open":"\u0916\u094b\u0932\u0947|"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),jj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0635\u0644 \u0645\u062d\u0641\u0638\u062a\u0643","whatIsAWallet":"\u0645\u0627 \u0647\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629\u061f","secureAndManage":"\u062a\u0623\u0645\u064a\u0646 \u0648\u0625\u062f\u0627\u0631\u0629 \u0627\u0644\u0645\u0645\u062a\u0644\u0643\u0627\u062a \u0627\u0644\u0631\u0642\u0645\u064a\u0629 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643","safelyStore":"\u0642\u0645 \u0628\u062a\u062e\u0632\u064a\u0646 \u0648 \u0627\u0631\u0633\u0627\u0644 \u0639\u0645\u0644\u0627\u062a\u0643 \u0648 \u0623\u0635\u0648\u0644\u0643 \u0627\u0644\u0631\u0642\u0645\u064a\u0629 \u0628\u0623\u0645\u0627\u0646","logInToAny":"\u0633\u062c\u0644 \u0627\u0644\u062f\u062e\u0648\u0644 \u0625\u0644\u0649 \u0623\u064a \u062a\u0637\u0628\u064a\u0642 \u064a\u0633\u062a\u062e\u062f\u0645 \u0646\u064a\u0631","noNeedToCreate":".\u0644\u0627 \u062f\u0627\u0639\u064a \u0644\u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u062c\u062f\u064a\u062f. \u0641\u0642\u0637 \u0642\u0645 \u0628\u062a\u0648\u0635\u064a\u0644 \u0645\u062d\u0641\u0638\u062a\u0643 \u0648\u0627\u0646\u0637\u0644\u0642","getAWallet":"\u0627\u062d\u0635\u0644 \u0639\u0644\u0649 \u0645\u062d\u0641\u0638\u0629","useAWallet":"\u0627\u0633\u062a\u062e\u062f\u0645 \u0645\u062d\u0641\u0638\u0629 \u0644\u062a\u0623\u0645\u064a\u0646 \u0648\u0625\u062f\u0627\u0631\u0629 \u0623\u0635\u0648\u0644 \u0646\u064a\u0631 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643\u060c \u0648\u0627\u062f\u062e\u0644 \u0644\u0623\u064a \u062a\u0637\u0628\u064a\u0642 \u064a\u0633\u062a\u062e\u062f\u0645 \u0646\u064a\u0631 \u062f\u0648\u0646 \u0627\u0644\u062d\u0627\u062c\u0629 \u0625\u0644\u0649 \u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u0648\u0643\u0644\u0645\u0629\u0627\u0644\u0645\u0631\u0648\u0631","connectionFailed":"\u0627\u062a\u0635\u0627\u0644 \u0641\u0627\u0634\u0644","connectionSuccessful":"\u0627\u062a\u0635\u0627\u0644 \u0646\u0627\u062c\u062d","connected":"\u0645\u062a\u0635\u0644","connectingTo":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628","connectingMessage":{"injected":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0625\u0636\u0627\u0641\u0629","browser":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629 \u0628\u0639\u062f \u0625\u0639\u0627\u062f\u0629 \u062a\u0648\u062c\u064a\u0647","hardware":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u062c\u0647\u0627\u0632 \u0644\u064a\u062f\u062c\u0631","bridge":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629"}},"ledger":{"connectWithLedger":"\u0627\u062a\u0635\u0644 \u0645\u0639 \u0644\u064a\u062f\u062c\u0631","makeSureYourLedger":"\u062a\u0623\u0643\u062f \u0623\u0646 \u0644\u064a\u062f\u062c\u0631 \u0645\u062a\u0635\u0644 \u0628\u0623\u0645\u0627\u0646, \u0648 \u0623\u0646 \u062a\u0637\u0628\u064a\u0642 \u0646\u064a\u0631 \u0645\u0641\u062a\u0648\u062d \u0641\u064a \u062c\u0647\u0627\u0632\u0643","continue":"\u062a\u0627\u0628\u0639","specifyHDPath":"\u062d\u062f\u062f \u0645\u0633\u0627\u0631 \u0627\u0644\u062d\u0633\u0627\u0628","enterYourPreferredHDPath":"\u0623\u062f\u062e\u0644 \u0645\u0633\u0627\u0631 \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0645\u0641\u0636\u0644\u060c \u062b\u0645 \u0627\u0628\u062d\u062b \u0639\u0646 \u0643\u0644 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0644\u0646\u0634\u0637\u0629","scan":"\u0645\u0633\u062d","retry":"\u0623\u0639\u062f \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629","ledgerIsNotAvailable":"\u0644\u064a\u062f\u062c\u0631 \u063a\u064a\u0631 \u0645\u062a\u0648\u0641\u0631","accessDeniedToUseLedgerDevice":"\u062a\u0645 \u0631\u0641\u0636 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0644\u064a\u062f\u062c\u0631","noAccountsFound":"\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u064a \u062d\u0633\u0627\u0628\u0627\u062a","selectYourAccounts":"\u062d\u062f\u062f \u062d\u0633\u0627\u0628\u0627\u062a\u0643","connecting1Account":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u062d\u0633\u0627\u0628 \u0648\u0627\u062d\u062f","cantFindAnyAccount":"\u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u064a \u062d\u0633\u0627\u0628 \u0645\u0631\u062a\u0628\u0637 \u0628\u0647\u0630\u0627 \u0644\u064a\u062f\u062c\u0631 \u0627\u0644\u0631\u062c\u0627\u0621 \u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u0646\u064a\u0631 \u062c\u062f\u064a\u062f \u0639\u0644\u0649","orConnectAnAnotherLedger":"\u0627\u0648 \u0627\u0631\u0628\u0637 \u062c\u0647\u0627\u0632 \u0644\u064a\u062f\u062c\u0631 \u0622\u062e\u0631","connecting":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644","ofAccounts":"\u0645\u0646 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a","failedToAutomatically":"\u0641\u0634\u0644 \u0641\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062d\u0633\u0627\u0628 \u062a\u0644\u0642\u0627\u0626\u064a\u0627. \u064a\u0631\u062c\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062d\u0633\u0627\u0628 \u064a\u062f\u0648\u064a\u0627","overviewTheListOfAuthorized":"\u0644\u0627\u0626\u062d\u0629 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0644\u0645\u0635\u0631\u062d \u0628\u0647\u0627, \u0623\u0643\u0645\u0644 \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u062f\u062e\u0648\u0644 \u0628\u0627\u0644\u0646\u0642\u0631 \u0639\u0644\u0649 \u0627\u0644\u0632\u0631 \u0623\u062f\u0646\u0627\u0647","finish":"\u0625\u0646\u0647\u0627\u0621"},"install":{"youllNeedToInstall":"\u0633\u062a\u062d\u062a\u0627\u062c \u0644\u062a\u062b\u0628\u064a\u062a","toContinueAfterInstalling":"\u0644\u0644\u0627\u0633\u062a\u0643\u0645\u0627\u0644. \u0628\u0639\u062f \u0627\u0644\u062a\u062b\u0628\u064a\u062a","refreshThePage":"\u0642\u0645 \u0628\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641\u062d\u0629","open":"\u0627\u0641\u062a\u062d"},"qr":{"copiedToClipboard":"\u062a\u0645 \u0627\u0644\u0646\u0633\u062e","failedToCopy":"\u0641\u0634\u0644 \u0627\u0644\u0646\u0633\u062e","scanWithYourMobile":"\u0627\u0645\u0633\u062d \u0628\u062c\u0647\u0627\u0632\u0643 \u0627\u0644\u0645\u062d\u0645\u0648\u0644","copyToClipboard":"\u0646\u0633\u062e","preferTheOfficial":"\u062a\u0641\u0636\u0644 \u0627\u0644\u062d\u0648\u0627\u0631 \u0627\u0644\u0631\u0633\u0645\u064a \u0644","open":"\u0641\u062a\u062d"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),Uj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Spojite crypto nov\u010danik!","whatIsAWallet":"\u0160to je to crypto nov\u010danik?","secureAndManage":"Osigurajte i upravljajte svojom digitalnom imovinom.","safelyStore":"Sigurno pohranite i prebacite svoj crypto i NFT-eve.","logInToAny":" Prijavite se u bilo koju NEAR aplikaciju","noNeedToCreate":"Nema potrebe za stvaranjem novih naloga ili korisni\u010dkih podataka. Spojite svoj crypto nov\u010danik i spremni ste!","getAWallet":"Otvorite crypto nov\u010danik","useAWallet":"Koristite crypto nov\u010danik da biste osigurali i upravljali svojom NEAR imovinom, te se prijavite u bilo koju NEAR aplikaciju bez korisni\u010dkog imena i lozinke.","connectionFailed":"Neuspje\u0161no povezivanje.","connectionSuccessful":"Uspje\u0161no povezivanje.","connected":"Povezano.","connectingTo":"Povezivanje u tijeku","connectingMessage":{"injected":"Potvrdite vezu u eksternom prozoru","browser":"Nakon redirekcije, potvrdite vezu u nov\u010daniku","hardware":"Potvrdite vezu sa nov\u010danikom","bridge":"Potvrdite vezu u nov\u010daniku"}},"ledger":{"connectWithLedger":"Pove\u017eite se hardverskim nov\u010danikom","makeSureYourLedger":"Osigurajte sigurnu vezu s hardverskim nov\u010danikom, te da je NEAR aplikacija otvorena na va\u0161em ure\u0111aju","continue":"Nastavite","specifyHDPath":"Specificirajte HD putanju","enterYourPreferredHDPath":"Upi\u0161ite preferiranu HD putanju, zatim skenirajte aktivne naloge","scan":"Skenirajte","retry":"Poku\u0161ajte ponovno","ledgerIsNotAvailable":"Hardverski nov\u010danik nije dostupan.","accessDeniedToUseLedgerDevice":"Odbijen pristup za kori\u0161tenjem hardverskog nov\u010danika","noAccountsFound":"Nalozi nisu prona\u0111eni","selectYourAccounts":"Odaberite svoje naloge","connecting1Account":"Povezivanje 1 naloga","cantFindAnyAccount":"Nije mogu\u0107e prona\u0107i niti jedan nalog povezan s ovim hardverskim nov\u010danikom. Molimo vas, kreirajte novi NEAR nalog","orConnectAnAnotherLedger":"Ili pove\u017eite drugi hardverski nov\u010danik.","connecting":"Povezivanje","ofAccounts":"naloga","failedToAutomatically":"Neuspje\u0161no automatsko pronala\u017eenje ID naloga. Unesite ru\u010dno:","overviewTheListOfAuthorized":"Pregledajte popis odobrenih naloga, zavr\u0161ite prijavu pritiskom na ni\u017ee prikazani gumb.","finish":"Zavr\u0161ite"},"install":{"youllNeedToInstall":" Potrebno je instalirati modal","toContinueAfterInstalling":"za nastavak. Nakon instalacije","refreshThePage":"osvje\u017eite stranicu.","open":"Otvorite QR modal"},"qr":{"copiedToClipboard":"Kopirano u me\u0111uspremnik","failedToCopy":"Neupsje\u0161no kopiranje u me\u0111uspremnik","scanWithYourMobile":"Skenirajte svojim mobilnim ure\u0111ajem","copyToClipboard":" Kopirajte u me\u0111uspremnik","preferTheOfficial":"Odaberite slu\u017ebeni dijalog","open":"Otvorite"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"},"exportAccounts":{"chooseAWallet":"Odaberi Wallet","transferYourAccounts":"Prenesi svoje naloge","selectAWallet":"Odaberite wallet koji odgovara va\u0161im potrebama i podr\u017eava va\u0161e povezane naloge.","selectYourAccounts":"Odaberi svoje naloge","afterDecide":"Nakon \u0161to odlu\u010dite koji wallet koristite, mo\u017eete odabrati koje ra\u010dune \u017eelite prebaciti.","disclaimer":"Ne\u0107ete mo\u0107i prebaciti naloge koji nisu nikada bili kori\u0161teni na NEAR-u.","warning":"ne podr\u017eava izvoz naloga u ovom trenutku. Molimo odaberite drugi wallet.","walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet"},"selectAccounts":{"title":"Odaberi naloge za prijenos","button":"Generiraj lozinku","deselectAll":"Makni odabir sa svih","selectAll":"Odaberi sve","unavailable":"Prijenos nije dostupan","error":"Nalog ne postoji","warningLedger":"Potrebna ledger podr\u0161ka","noBalance":"Nalog nema sredstava"},"getPassphrase":{"title":"Kopiraj privremenu lozinku","desc":"Bit \u0107e potrebno unijeti ovu lozinku na po\u010detku izvoza naloga na drugi wallet.","button":"Nastavi","label":"Klikni za kopiju","checkLabel":"Kopirao sam ili zapisao lozinku"},"complete":{"title":"Zavr\u0161i prijenos","descOne":"You will now be redirected to the wallet you selected to complete the transfer.","descTwo":"Kada je unos s odabranog walleta zavr\u0161en, pritisnite gumb da biste zavr\u0161ili prijenos.","button":"Zavr\u0161i"}}}}'),Kj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a!","whatIsAWallet":"\u0428\u0442\u043e \u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a?","secureAndManage":"\u0417\u0430\u0448\u0442\u0438\u0442\u0435\u0442\u0435 \u0433\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u0443\u0432\u0430\u0458\u0442\u0435 \u0441\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430.","safelyStore":"\u0411\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u0441\u043a\u043b\u0430\u0434\u0438\u0440\u0430\u0458\u0442\u0435 \u0438 \u0438\u0437\u0432\u0440\u0448\u0443\u0432\u0430\u0458\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0430\u043a\u0446\u0438\u0438 \u0441\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e \u0438 NFT.","logInToAny":"\u041d\u0430\u0458\u0430\u0432\u0435\u0442\u0435 \u0441\u0435 \u043d\u0430 \u043a\u043e\u0458\u0430 \u0431\u0438\u043b\u043e NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430","noNeedToCreate":"\u041d\u0435\u043c\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u043a\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043d\u043e\u0432\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0438\u043b\u0438 \u0438\u043d\u0433\u0435\u0440\u0435\u043d\u0446\u0438\u0438. \u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a \u0438 \u0441\u0442\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u0432\u0435\u043d\u0438!","getAWallet":"\u041d\u0430\u043f\u0440\u0430\u0432\u0435\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","useAWallet":"\u041a\u043e\u0440\u0438\u0441\u0442\u0435\u0442\u0435 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a \u0437\u0430 \u0434\u0430 \u0433\u0438 \u0437\u0430\u0448\u0442\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043d\u0430\u0458\u0430\u0432\u0438\u0442\u0435 \u043d\u0430 \u043a\u043e\u0458\u0430 \u0431\u0438\u043b\u043e NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430 \u0431\u0435\u0437 \u043f\u043e\u0442\u0440\u0435\u0431\u0430 \u043e\u0434 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0438\u043c\u0438\u045a\u0430 \u0438 \u043b\u043e\u0437\u0438\u043d\u043a\u0438.","connectionFailed":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u043d\u0435 \u0431\u0435\u0448\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.","connectionSuccessful":"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435.","connected":"\u041f\u043e\u0432\u0440\u0437\u0430\u043d\u043e.","connectingTo":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435 \u0441\u043e","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u0432\u043e \u0435\u043a\u0441\u0442\u0435\u0440\u043d\u0438\u043e\u0442 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","browser":"\u041f\u043e \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0443\u0432\u0430\u045a\u0435\u0442\u043e, \u043f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u043e\u0434 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043e\u043a\u0442","hardware":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u0441\u043e \u043b\u0430\u0434\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0458\u0430 \u0432\u0440\u0441\u043a\u0430\u0442\u0430 \u0432\u043e \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u0442"}},"ledger":{"connectWithLedger":"\u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0441\u0435 \u0441\u043e \u041b\u0435\u045f\u0435\u0440","makeSureYourLedger":"\u041e\u0441\u0438\u0433\u0443\u0440\u0430\u0458\u0442\u0435 \u0441\u0435 \u0434\u0435\u043a\u0430 \u0432\u0430\u0448\u0438\u043e\u0442 \u041b\u0435\u045f\u0435\u0440 \u0435 \u043f\u043e\u0432\u0440\u0437\u0430\u043d \u0431\u0435\u0437\u0431\u0435\u0434\u043d\u043e, \u0438 \u0434\u0435\u043a\u0430 NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430\u0442\u0430 \u0435 \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0438\u043e\u0442 \u0443\u0440\u0435\u0434","continue":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u0442\u0435","specifyHDPath":"\u041d\u0430\u0432\u0435\u0434\u0435\u0442\u0435 \u0425\u0414 \u043b\u043e\u043a\u0430\u0446\u0438\u0458\u0430","enterYourPreferredHDPath":"\u0412\u043d\u0435\u0441\u0435\u0442\u0435 \u0458\u0430 \u0432\u0430\u0448\u0430\u0442\u0430 \u043f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u043d\u0430 \u0425\u0414 \u043b\u043e\u043a\u0430\u0446\u0438\u0458\u0430, \u0430 \u043f\u043e\u0442\u043e\u0430 \u0441\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043d\u0430\u0458\u0434\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438.","scan":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435","retry":"\u041e\u0431\u0438\u0434\u0435\u0442\u0435 \u0441\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e","ledgerIsNotAvailable":"\u041b\u0435\u045f\u0435\u0440\u043e\u0442 \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u0430\u043f\u0435\u043d.","accessDeniedToUseLedgerDevice":"\u041f\u0440\u0438\u0441\u0442\u0430\u043f\u043e\u0442 \u0437\u0430 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u045a\u0435 \u043d\u0430 \u041b\u0435\u045f\u0435\u0440 \u0443\u0440\u0435\u0434 \u0435 \u043e\u0434\u0431\u0438\u0435\u043d","noAccountsFound":"\u041d\u0435\u043c\u0430 \u043d\u0430\u0458\u0434\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438","connecting1Account":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u0435\u0434\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430","cantFindAnyAccount":"\u041d\u0435 \u0441\u0435 \u043d\u0430\u0458\u0434\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u043f\u043e\u0432\u0440\u0437\u0430\u043d\u0438 \u0441\u043e \u043e\u0432\u043e\u0458 \u041b\u0435\u045f\u0435\u0440. \u0412\u0435 \u043c\u043e\u043b\u0438\u043c\u0435 \u043a\u0440\u0435\u0438\u0440\u0430\u0458\u0442\u0435 \u043d\u043e\u0432\u0430 NEAR \u0441\u043c\u0435\u0442\u043a\u0430 ","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u043f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u041b\u0435\u045f\u0435\u0440.","connecting":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435","ofAccounts":"\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0438","failedToAutomatically":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u043e \u0431\u0430\u0440\u0430\u045a\u0435 \u043d\u0430 \u0418\u0414 \u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430\u0442\u0430. \u0412\u043d\u0435\u0441\u0435\u0442\u0435 \u0433\u043e \u0440\u0430\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u043b\u0438\u0441\u0442\u0430\u0442\u0430 \u043d\u0430 \u043e\u0432\u043b\u0430\u0441\u0442\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438, \u0437\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0441\u0435 \u043d\u0430\u0458\u0430\u0432\u0430\u0442\u0430 \u0441\u043e \u043a\u043b\u0438\u043a\u043d\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043a\u043e\u043f\u0447\u0435\u0442\u043e \u043f\u043e\u0434\u043e\u043b\u0443.","finish":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"},"install":{"youllNeedToInstall":"\u0422\u0440\u0435\u0431\u0430 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u0434\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435. \u041f\u043e \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u045a\u0435\u0442\u043e","refreshThePage":"\u041e\u0441\u0432\u0435\u0436\u0435\u0442\u0435 \u0458\u0430 \u0441\u0442\u0440\u0430\u043d\u0430\u0442\u0430.","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u043e\u0442","failedToCopy":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u0430\u045a\u0435 \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434","scanWithYourMobile":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0441\u043a\u0438 \u0443\u0440\u0435\u0434","copyToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458\u0442\u0435 \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434","preferTheOfficial":"\u041f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0458\u0442\u0435 \u043e\u0444\u0438\u0446\u0438\u0458\u0430\u043b\u0435\u043d \u0434\u0438\u0430\u043b\u043e\u0433 \u043d\u0430","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0435\u043b\u0438\u0441\u0442\u0443\u0432\u0430\u0447","injected":"\u0415\u043a\u0441\u0442\u0435\u043d\u0437\u0438\u0458\u0430 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","instant-link":"\u0418\u043d\u0441\u0442\u0430\u043d\u0442 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a"},"exportAccounts":{"chooseAWallet":"\u041e\u0434\u0431\u0435\u0440\u0435\u0442\u0435 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a","transferYourAccounts":"\u041f\u0440\u0435\u0444\u0440\u043b\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","selectAWallet":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458 \u0433\u0438 \u0437\u0430\u0434\u043e\u0432\u043e\u043b\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u0431\u0430\u0440\u0430\u043d\u045a\u0430 \u0438 \u0433\u0438 \u043f\u043e\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u043f\u043e\u0432\u0440\u0437\u0430\u043d\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438.","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","afterDecide":"\u041e\u0434\u043a\u0430\u043a\u043e \u045c\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043a\u043e\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0441\u0430\u043a\u0430\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043f\u0440\u0435\u0444\u0440\u043b\u0438\u0442\u0435.","disclaimer":"\u041d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u043f\u0440\u0444\u0440\u043b\u0430\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u043a\u043e\u0438 \u043d\u0438\u043a\u043e\u0433\u0430\u0448 \u043d\u0435 \u0431\u0438\u043b\u0435 \u043d\u0430\u0434\u043e\u043f\u043e\u043b\u043d\u0430\u0442\u0438 \u0438\u043b\u0438 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u043d\u0438 \u043d\u0430 NEAR.","warning":"\u043d\u0435 \u043f\u043e\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0432\u043e \u043e\u0432\u043e\u0458 \u043c\u043e\u043c\u0435\u043d\u0442. \u0412\u0435 \u043c\u043e\u043b\u0438\u043c\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0435\u043b\u0438\u0441\u0442\u0443\u0432\u0430\u0447","injected":"\u0415\u043a\u0441\u0442\u0435\u043d\u0437\u0438\u0458\u0430 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"selectAccounts":{"title":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438 \u0437\u0430 \u0434\u0430 \u0433\u0438 \u043f\u0440\u0435\u0444\u0440\u043b\u0438\u0442\u0435.","button":"\u0414\u043e\u0431\u0438\u0458\u0442\u0435 \u043b\u043e\u0437\u0438\u043d\u043a\u0430","deselectAll":"\u041e\u0442\u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0435","selectAll":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0435","unavailable":"\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440\u043e\u0442 \u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u043f\u0435\u043d","error":"\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0430\u0442\u0430 \u0441\u043c\u0435\u0442\u043a\u0430 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u0438","warningLedger":"\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u0430 \u0435 \u043f\u043e\u0434\u0434\u0440\u0448\u043a\u0430 \u043e\u0434 \u041b\u0435\u045f\u0435\u0440","noBalance":"\u0421\u043c\u0435\u0442\u043a\u0430\u0442\u0430 \u043d\u0435 \u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d\u0430"},"getPassphrase":{"title":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458\u0442\u0435 \u0458\u0430 \u043f\u0440\u0438\u0432\u0440\u0435\u043c\u0435\u043d\u0430\u0442\u0430 \u043b\u043e\u0437\u0438\u043d\u043a\u0430","desc":"\u040c\u0435 \u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u0458\u0430 \u0432\u043d\u0435\u0441\u0435\u0442\u0435 \u043e\u0432\u0430\u0430 \u043b\u043e\u0437\u0438\u043d\u043a\u0430 \u043a\u043e\u0433\u0430 \u045c\u0435 \u0437\u0430\u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","button":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u0442\u0435","label":"\u041a\u043b\u0438\u043a\u043d\u0435\u0442\u0435 \u0437\u0430 \u0434\u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0442\u0435","checkLabel":"\u0408\u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0432 \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0448\u0430\u0432 \u043b\u043e\u0437\u0438\u043d\u043a\u0430\u0442\u0430"},"complete":{"title":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0433\u043e \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442","descOne":"\u0421\u0435\u0433\u0430 \u045c\u0435 \u0431\u0438\u0434\u0435\u0442\u0435 \u043f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0435\u043d\u0438 \u043d\u0430 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442.","descTwo":"\u041e\u0442\u043a\u0430\u043a\u043e \u045c\u0435 \u0437\u0430\u0432\u0440\u0448\u0438 \u0443\u0432\u043e\u0437\u043e\u0442 \u043e\u0434 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043f\u0440\u0438\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u0433\u043e \u043a\u043e\u043f\u0447\u0435\u0442\u043e \u0437\u0430 \u0434\u0430 \u0433\u043e \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442.","button":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"}}}}'),zj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Pove\u017eite svojo denarnico!","whatIsAWallet":"Kaj je denarnica?","secureAndManage":"Zavarujte in upravljajte svoja digitalna sredstva.","safelyStore":"Varno shranjujte in prena\u0161ajte svoje kriptovalute in NFTje.","logInToAny":"Prijavite se v katero koli aplikacijo na NEAR","noNeedToCreate":"Ni vam treba ustvarjati novih ra\u010dunov. Pove\u017eite svojo denarnico in za\u010dnite!","getAWallet":"Ustvarite denarnico","useAWallet":"Uporabite denarnico, da bi zavarovali in upravljali s svoja NEAR digitalna sredstva, in se prijavite v katero koli aplikacijo ekosistema NEAR","connectionFailed":"Povezava ni bila uspe\u0161na.","connectionSuccessful":"Povezava je bila uspe\u0161na.","connected":"Va\u0161a denarnica je povezana.","connectingTo":"Povezovanje z","connectingMessage":{"injected":"Potrdite povezavo v oknu raz\u0161iritve","browser":"Po preusmeritvi potrdite povezavo v denarnici","hardware":"Potrdite povezavo s hladno denarnico","bridge":"Potrdite povezavo v denarnici"}},"ledger":{"connectWithLedger":"Pove\u017eite se z Ledger","makeSureYourLedger":"Prepri\u010dajte se, da je va\u0161 Ledger varno povezan in da je aplikacija NEAR odprta v va\u0161i napravi","continue":"Nadaljuj","specifyHDPath":"Dolo\u010dite HD pot","enterYourPreferredHDPath":"Vnesite \u017eeleno HD pot, nato poi\u0161\u010dite vse aktivne ra\u010dune.","scan":"Skenirajte","retry":"Poskusite znova","ledgerIsNotAvailable":"Ledger ni na voljo","accessDeniedToUseLedgerDevice":"Dostop za uporabo naprave Ledger zavrnjen","noAccountsFound":"Ni najdenih ra\u010dunov","selectYourAccounts":"Izberite Va\u0161i ra\u010duni","connecting1Account":"Povezovanje enega ra\u010duna","cantFindAnyAccount":"Ni mogo\u010de najti nobenega ra\u010duna, povezanega s tem Ledgerjem. Ustvarite nov NEAR ra\u010dun ","orConnectAnAnotherLedger":"ali pove\u017eite drug Ledger..","connecting":"Povezovanje","ofAccounts":"ra\u010dunov","failedToAutomatically":"ID-ja ra\u010duna ni bilo mogo\u010de samodejno najti. Zagotovite ga ro\u010dno:","overviewTheListOfAuthorized":"Oglejte si seznam poobla\u0161\u010denih ra\u010dunov, dokon\u010dajte prijavo s klikom na spodnji gumb.","finish":"Kon\u010dajte"},"install":{"youllNeedToInstall":"Morali ga boste namestiti","toContinueAfterInstalling":"nadaljevati. Po namestitvi","refreshThePage":"Osve\u017eite stran.","open":"Odprite"},"qr":{"copiedToClipboard":"Kopirano v podlo\u017eni mapi","failedToCopy":"Kopiranje v podlo\u017eni mapi ni uspelo","scanWithYourMobile":"Skenirajte s svojo mobilno napravo","copyToClipboard":" Kopirajte v podlo\u017eni mapi","preferTheOfficial":"Preferirajte uradno pogovorno okno","open":"Odprite"},"walletTypes":{"hardware":"Hladna denarnica","browser":"Denarnica brskalnika","injected":"Raz\u0161iritev za denarnico","bridge":"Bridge denarnica","mobile":"Mobilna denarnica","instant-link":"Takoj\u0161nja denarnica"},"exportAccounts":{"chooseAWallet":"Izberite denarnico","transferYourAccounts":"Prenesite svoje ra\u010dune","selectAWallet":"Izberite denarnico, ki ustreza va\u0161im potrebam in podpira va\u0161e povezane ra\u010dune.","selectYourAccounts":"Izberite va\u0161i ra\u010duni","afterDecide":"Ko se odlo\u010dite za denarnico, lahko izberete, katere ra\u010dune \u017eelite prenesti.","disclaimer":"Ne boste mogli prenesti Ra\u010dunov, ki nikoli niso bili financirani ali uporabljeni na NEAR.","warning":"trenutno ne podpira izvoza ra\u010duna. Izberite drugo denarnico","walletTypes":{"hardware":"Hladna denarnica","browser":"Denarnica brskalnika","injected":"Raz\u0161iritev za denarnico","bridge":"Bridge denarnica","mobile":"Mobilna denarnica"},"selectAccounts":{"title":"Izberite ra\u010duni za prenos.","button":"Pridobite geslo","deselectAll":"Prekli\u010di izbiro vseh","selectAll":"Izberi vse","unavailable":"Prenos ni na voljo","error":"Ra\u010dun ne obstaja","warningLedger":"Potrebna je podpora za Ledger","noBalance":"Ra\u010dun ni financiran"},"getPassphrase":{"title":"Kopiraj za\u010dasno geslo","desc":"To geslo boste morali vnesti, ko boste za\u010deli izva\u017eati svoje ra\u010dune v drugo denarnico.","button":"Nadaljujte","label":"Kliknite za kopiranje","checkLabel":"Geslo sem kopiral ali zapisal"},"complete":{"title":"Dokon\u010dajte prenos","descOne":"Zdaj boste preusmerjeni v denarnico, ki ste jo izbrali za dokon\u010danje prenosa.","descTwo":"Ko je uvozni del postopka kon\u010dan iz izbrane denarnice, pritisnite gumb za dokon\u010danje postopka prenosa.","button":"Kon\u010dajte"}}}}'),Vj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0432\u043e\u0458 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a!","whatIsAWallet":"\u0428\u0442\u0430 \u0458\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a?","secureAndManage":"\u041e\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0459\u0430\u0458\u0442\u0435 \u0441\u0432\u043e\u0458\u043e\u043c \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u043e\u043c \u0438\u043c\u043e\u0432\u0438\u043d\u043e\u043c.","safelyStore":"\u0411\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u0447\u0443\u0432\u0430\u0458\u0442\u0435 \u0438 \u043f\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u0443\u0442\u0435 \u0438 NFT.","logInToAny":"\u041f\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0441\u0435 \u043d\u0430 \u0431\u0438\u043b\u043e \u043a\u043e\u0458\u0443 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0443 NEAR","noNeedToCreate":"\u041d\u0435\u043c\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0435 \u0434\u0430 \u043a\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043d\u043e\u0432\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0438\u043b\u0438 \u0430\u043a\u0440\u0435\u0434\u0438\u0442\u0438\u0432\u0435. \u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0438 \u0441\u043f\u0440\u0435\u043c\u043d\u0438 \u0441\u0442e!","getAWallet":"\u041d\u0430\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","useAWallet":"\u041a\u043e\u0440\u0438\u0441\u0442\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0434\u0430 \u043e\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0459\u0430\u0442\u0435 \u0441\u0432\u043e\u0458\u0438\u043c NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0438\u043c\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043f\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0443 \u0431\u0438\u043b\u043e \u043a\u043e\u0458\u0443 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0443 NEAR \u0431\u0435\u0437 \u043f\u043e\u0442\u0440\u0435\u0431\u0435 \u0437\u0430 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u0438 \u043b\u043e\u0437\u0438\u043d\u043a\u0430\u043c\u0430.","connectionFailed":"\u0412\u0435\u0437\u0430 \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u043e\u0441\u0442\u0430\u0432\u0459\u0435\u043d\u0430.","connectionSuccessful":"\u0412\u0435\u0437\u0430 \u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u0430.","connected":"\u041f\u043e\u0432\u0435\u0437\u0430\u043d.","connectingTo":"\u041f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435 \u043d\u0430","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u0441\u043f\u043e\u0459\u043d\u043e\u043c \u043f\u0440\u043e\u0437\u043e\u0440\u0443","browser":"\u041d\u0430\u043a\u043e\u043d \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0430\u0432\u0430\u045a\u0430, \u043f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u0443","hardware":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u0445\u043b\u0430\u0434\u043d\u0438\u043c \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u043c","bridge":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u043c"}},"ledger":{"connectWithLedger":"\u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0435 \u0441\u0430 Ledger","makeSureYourLedger":"\u0423\u0432\u0435\u0440\u0438\u0442\u0435 \u0441\u0435 \u0434\u0430 \u0458\u0435 \u0432\u0430\u0448 Ledger \u0431\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u043f\u043e\u0432\u0435\u0437\u0430\u043d \u0438 \u0434\u0430 \u0458\u0435 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430 NEAR \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0443\u0440\u0435\u0452\u0430\u0458\u0443","continue":"\u041d\u0430\u0441\u0442\u0430\u0432\u0438","specifyHDPath":"\u041d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0425\u0414 \u043f\u0443\u0442\u0430\u045a\u0443","enterYourPreferredHDPath":"\u0423\u043d\u0435\u0441\u0438\u0442\u0435 \u0436\u0435\u0459\u0435\u043d\u0443 \u0436\u0435\u0459\u0435\u043d\u0443 \u0425\u0414 \u043f\u0443\u0442\u0430\u045a\u0443, \u0430 \u0437\u0430\u0442\u0438\u043c \u0441\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0432\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0435 \u043d\u0430\u043b\u043e\u0433\u0435.","scan":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435","retry":"\u041f\u043e\u043a\u0443\u0448\u0430\u0458 \u043f\u043e\u043d\u043e\u0432\u043e","ledgerIsNotAvailable":"Ledger \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043d.","accessDeniedToUseLedgerDevice":"\u041f\u0440\u0438\u0441\u0442\u0443\u043f \u0458\u0435 \u043e\u0434\u0431\u0438\u0458\u0435\u043d \u0437\u0430 \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u045a\u0435 Ledger \u0443\u0440\u0435\u0452\u0430\u0458\u0430","noAccountsFound":"\u041d\u0430l\u043e\u0437\u0438 \u043d\u0438\u0441\u0443 \u043f\u0440\u043e\u043d\u0430\u0452\u0435\u043d\u0438","selectYourAccounts":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0412\u0430\u0448 \u043d\u0430l\u043e\u0433","connecting1Account":"\u041f\u043e\u0432\u0435\u0437\u0430\u0442\u0438 1 \u043d\u0430l\u043e\u0433","cantFindAnyAccount":"\u041d\u0438\u0458\u0435 \u043c\u043e\u0433\u0443\u045b\u0435 \u043f\u0440\u043e\u043d\u0430\u045b\u0438 \u043d\u0438\u0458\u0435\u0434\u0430\u043d \u043d\u0430l\u043e\u0433 \u043f\u043e\u0432\u0435\u0437\u0430\u043d \u0441\u0430 \u043e\u0432\u0438\u043c Ledger-\u043e\u043c. \u041d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u0438 NEAR \u043d\u0430l\u043e\u0433","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 Ledger.","connecting":"\u041f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435","ofAccounts":"\u043d\u0430l\u043e\u0433\u0430","failedToAutomatically":"\u0410\u0443\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u043e \u043f\u0440\u043e\u043d\u0430\u043b\u0430\u0436\u0435\u045a\u0435 ID-a \u043d\u0430l\u043e\u0433\u0430 \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u043e. \u041d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0433\u0430 \u0440\u0443\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0458\u0442\u0435 \u043b\u0438\u0441\u0442\u0443 \u043e\u0432\u043b\u0430\u0448\u045b\u0435\u043d\u0438\u0445 \u0440\u0430\u0447\u0443\u043d\u0430, \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u0438\u0458\u0430\u0432\u0443 \u043a\u043b\u0438\u043a\u043e\u043c \u043d\u0430 \u0434\u0443\u0433\u043c\u0435 \u0438\u0441\u043f\u043e\u0434.","finish":"\u0417\u0430\u0432\u0440\u0448\u0438"},"install":{"youllNeedToInstall":"\u041c\u043e\u0440\u0430\u045b\u0435\u0442\u0435 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u043d\u0430\u0441\u0442\u0430\u0432\u0430\u043a. \u041d\u0430\u043a\u043e\u043d \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u045a\u0430","refreshThePage":"\u043f\u043e\u043d\u043e\u0432\u043e \u0443\u0447\u0438\u0442\u0430\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.","open":"\u041e\u0442\u0432\u043e\u0440\u0438"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a","failedToCopy":"\u041a\u043e\u043f\u0438\u0440\u0430\u045a\u0435 \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u043e","scanWithYourMobile":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u043f\u043e\u043c\u043e\u045b\u0443 \u043c\u043e\u0431\u0438\u043b\u043d\u043e\u0433 \u0443\u0440\u0435\u0452\u0430\u0458\u0430","copyToClipboard":" \u041a\u043e\u043f\u0438\u0440\u0430\u0458 \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a","preferTheOfficial":"\u041f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0442\u0435 \u0437\u0432\u0430\u043d\u0438\u0447\u043d\u0438 \u0434\u0438\u0458\u0430\u043b\u043e\u0433 \u043e\u0434","open":"\u041e\u0442\u0432\u043e\u0440\u0438"},"walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,","injected":"\u0414\u043e\u0434\u0430\u0442\u0430\u043a \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a,","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","instant-link":"\u0418\u043d\u0441\u0442\u0430\u043d\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"exportAccounts":{"chooseAWallet":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","transferYourAccounts":"\u041f\u0440\u0435\u043d\u0435\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435","selectAWallet":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458\u0438 \u043e\u0434\u0433\u043e\u0432\u0430\u0440\u0430 \u0432\u0430\u0448\u0438\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0430\u043c\u0430 \u0438 \u043a\u043e\u0458\u0438 \u043f\u043e\u0434\u0440\u0436\u0430\u0432\u0430 \u0432\u0430\u0448\u0435 \u043f\u043e\u0432\u0435\u0437\u0430\u043d\u0435 \u043d\u0430\u043b\u043e\u0433\u0435.","selectYourAccounts":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u043d\u0430\u043b\u043e\u0433\u0435","afterDecide":"\u041d\u0430\u043a\u043e\u043d \u0448\u0442\u043e \u0441\u0435 \u043e\u0434\u043b\u0443\u0447\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0436\u0435\u043b\u0438\u0442\u0435 \u0434\u0430 \u043f\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435.","disclaimer":"\u041d\u0435\u045b\u0435\u0442\u0435 \u043c\u043e\u045b\u0438 \u0434\u0430 \u043f\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u043a\u043e\u0458\u0438 \u043d\u0438\u043a\u0430\u0434\u0430 \u043d\u0438\u0441\u0443 \u0431\u0438\u043b\u0438 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d\u0438 \u0438\u043b\u0438 \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u043d\u0438 \u043d\u0430 NEAR.","warning":"\u0442\u0440\u0435\u043d\u0443\u0442\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0440\u0436\u0430\u0432\u0430 \u0438\u0437\u0432\u043e\u0437 \u043d\u0430\u043b\u043e\u0433\u0430. \u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,","injected":"\u0414\u043e\u0434\u0430\u0442\u0430\u043a \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a,","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"selectAccounts":{"title":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0437\u0430 \u043f\u0440\u0435\u043d\u043e\u0441.","button":"\u0414\u043e\u0431\u0438\u0458\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u043d\u0443 \u0444\u0440\u0430\u0437\u0443","deselectAll":"\u041f\u043e\u043d\u0438\u0448\u0442\u0438\u0442\u0435 \u0438\u0437\u0431\u043e\u0440","selectAll":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0432\u0435","unavailable":"\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440 \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043d","error":"\u041d\u0430\u043b\u043e\u0433 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u0458\u0438","warningLedger":"\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u0430 \u043f\u043e\u0434\u0440\u0448\u043a\u0430 \u0437\u0430 Ledger","noBalance":"\u041d\u0430\u043b\u043e\u0433 \u043d\u0438\u0458\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d"},"getPassphrase":{"title":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458 \u043f\u0440\u0438\u0432\u0440\u0435\u043c\u0435\u043d\u0443 \u043b\u043e\u0437\u0438\u043d\u043a\u0443","desc":"\u041c\u043e\u0440\u0430\u045b\u0435\u0442\u0435 \u0434\u0430 \u0443\u043d\u0435\u0441\u0435\u0442\u0435 \u043e\u0432\u0443 \u043b\u043e\u0437\u0438\u043d\u043a\u0443 \u043a\u0430\u0434\u0430 \u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0432\u043e\u0437\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0443 \u0434\u0440\u0443\u0433\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","button":"\u041d\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u0435","label":"\u041a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u0434\u0430 \u0431\u0438\u0441\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u0430\u043b\u0438","checkLabel":"\u041a\u043e\u043f\u0438\u0440\u0430\u043e \u0441\u0430\u043c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043e \u043b\u043e\u0437\u0438\u043d\u043a\u0443"},"complete":{"title":"\u0414\u043e\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440","descOne":"\u0421\u0430\u0434\u0430 \u045b\u0435\u0442\u0435 \u0431\u0438\u0442\u0438 \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0435\u043d\u0438 \u043d\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458\u0438 \u0441\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043b\u0438 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440.","descTwo":"\u041a\u0430\u0434\u0430 \u0441\u0435 \u0434\u0435\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0430 \u0443\u0432\u043e\u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0438 \u0438\u0437 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u043e\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u0430, \u043f\u0440\u0438\u0442\u0438\u0441\u043d\u0438\u0442\u0435 \u0434\u0443\u0433\u043c\u0435 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u0440\u0435\u043d\u043e\u0441\u0430.","button":"\u0417\u0430\u0432\u0440\u0448\u0438\u0442\u0435"}}}}');let C8;const x8=(t,e)=>{if(!t)return"";const n=e.indexOf(".");if(n>-1){const r=e.substring(0,n),u=e.substring(n+1);return x8(t[r],u)}return t[e]},Dn=t=>{let e=window.navigator.languages?window.navigator.languages[0]:null;e=e||window.navigator.language;const n=(t=>-1!==t.indexOf("-")?t.split("-")[0]:t.split("_")[0])(C8||e),r=(t=>{switch(t){case"en":default:return I8;case"es":return Nj;case"zh":return Rj;case"bg":return kj;case"ko":return Lj;case"vi":return Fj;case"hi":return Bj;case"ar":return jj;case"hr":return Uj;case"mk":return Kj;case"sl":return zj;case"sr":return Vj}})(n),u=x8(r,t);return u&&"string"==typeof u?u:t},yp='\n\n \n \n',Ha='\n\n \n \n \n';function nE(t,e){return rE.apply(this,arguments)}function rE(){return rE=(0,ke.Z)(function*(t,e){if(En){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

${Dn("modal.ledger.selectYourAccounts")}

\n \n
\n
\n
\n \n
\n `;for(let n=0;n
\n `);document.getElementById("change-derivation-path-button")?.addEventListener("click",()=>{P8(t)}),document.getElementById("connect-button")?.addEventListener("click",n=>{n.preventDefault();const r=Array.from(document.querySelectorAll("input[name='account']")).map(v=>v.checked),u=e.filter((v,O)=>r[O]);u.length<1||oE(t,e,u)})}}),rE.apply(this,arguments)}const Zj='\n\n \n \n \n';function ib(t,e){return iE.apply(this,arguments)}function iE(){return iE=(0,ke.Z)(function*(t,e){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
${t.metadata.name}
\n

${t.metadata.name}

\n
\n
\n
\n
\n ${Zj}\n ${Dn("modal.wallet.connectionFailed")}\n
\n

${e&&e.message?e.message:""}

\n ${!t?.metadata.deprecated&&t?.metadata.available?``:""}\n
\n
\n
\n
\n
\n
\n `,document.getElementById("retry-button")?.addEventListener("click",()=>{um(t,!1)})}),iE.apply(this,arguments)}function oE(t,e,n){return sE.apply(this,arguments)}function sE(){return sE=(0,ke.Z)(function*(t,e,n){document.querySelector(".modal-right").innerHTML=`\n
\n
\n \n
\n

\n ${Dn("modal.ledger.connecting")} ${n.length} ${Dn("modal.ledger.ofAccounts")}\n

\n \n
\n
\n
\n
\n

\n ${Dn("modal.ledger.overviewTheListOfAuthorized")}\n

\n
\n
\n \n
\n
\n
\n
\n `;for(let r=0;r\n \n \n `);document.getElementById("back-button")?.addEventListener("click",()=>{nE(t,e)}),document.getElementById("finish-button")?.addEventListener("click",(0,ke.Z)(function*(){try{if(!En)return;(yield t.wallet()).signIn({contractId:En.options.contractId,methodNames:En.options.methodNames,accounts:n}),En.container.children[0].classList.remove("open"),En.emitter.emit("onHide",{hideReason:"wallet-navigation"})}catch(r){yield ib(t,r)}}))}),sE.apply(this,arguments)}function T8(t){return aE.apply(this,arguments)}function aE(){return aE=(0,ke.Z)(function*(t){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${Dn("modal.ledger.noAccountsFound")}\n

\n \n
\n
\n
\n
\n

\n ${Dn("modal.ledger.cantFindAnyAccount")}\n MyNearWallet\n ${Dn("modal.ledger.orConnectAnAnotherLedger")}\n

\n
\n
\n
\n `,document.getElementById("back-button")?.addEventListener("click",()=>{cE(t)})}),aE.apply(this,arguments)}function O8(){return uE.apply(this,arguments)}function uE(){return uE=(0,ke.Z)(function*(t=null){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
\n ${t?.metadata.name}\n
\n

${t?.metadata.name}

\n
\n
\n \n ${Dn("modal.wallet.connectingTo")} ${t?.metadata.name}...\n \n
\n
\n \n ${Dn("modal.wallet.connectingMessage."+t?.type)}\n \n
\n
\n
\n
\n `}),uE.apply(this,arguments)}const Yj='\n\n \n',Jj='\n\n \n';function P8(t){if(!En)return;document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${Dn("modal.ledger.specifyHDPath")}\n

\n \n
\n
\n
\n
\n
\n
44'/397'/0'/0'/
\n
\n
\n
\n \n \n
\n
\n
\n

\n ${Dn("modal.ledger.enterYourPreferredHDPath")}\n

\n \n
\n \n
\n
\n
\n
\n `;const e=document.getElementById("derivation-path-index");e.innerText=En.derivationPath.slice(-2,-1),document.getElementById("increase-index-button")?.addEventListener("click",()=>{if(!En)return;const n=parseInt(e.innerText)+1;En.derivationPath=En.derivationPath.slice(0,-2)+n.toString()+"'",e.innerText=n.toString()}),document.getElementById("decrease-index-button")?.addEventListener("click",()=>{if(!En)return;const n=parseInt(e.innerText)-1;En.derivationPath=En.derivationPath.slice(0,-2)+n.toString()+"'",n>=0&&(e.innerText=n.toString())}),document.getElementById("back-button")?.addEventListener("click",()=>{cE(t)}),document.getElementById("scan-button")?.addEventListener("click",(0,ke.Z)(function*(){try{const n=yield t.wallet();O8(t);const r=yield F8(n);if(!r||r.length<1)return T8(t);1===r.length&&oE(t,r,r),nE(t,r)}catch(n){yield ib(t,n)}}))}const Qj='\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ';function cE(t){En&&(En.derivationPath=U8,document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${Dn("modal.ledger.connectWithLedger")}\n

\n \n
\n
\n
\n
\n
\n ${Qj}\n
\n
\n

${Dn("modal.ledger.makeSureYourLedger")}

\n

${Dn("modal.ledger.specifyHDPath")}

\n
\n
\n
\n
\n
\n `,document.getElementById("continue-button")?.addEventListener("click",()=>{um(t,!1)}),document.getElementById("specify-derivation-path-button")?.addEventListener("click",()=>{P8(t)}))}const Xj='\n\n \n \n \n \n \n \n \n',qj='\n\n \n \n \n';function N8(t){if(!En)return;let e="";return"injected"===t.type&&(e=t.metadata.downloadUrl),"browser"===t.type&&(e=t.metadata.walletUrl),e}function R8(){return lE.apply(this,arguments)}function lE(){return(lE=(0,ke.Z)(function*(){if(!En)return;document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n \n
\n

${Dn("modal.wallet.getAWallet")}

\n \n
\n
\n
\n\n
\n
\n
\n `;const e=En.modules.filter(n=>"bridge"!==n.type&&"hardware"!==n.type&&"instant-link"!==n.type);for(let n=0;n\n
\n ${r&&v?`${Xj}`:!r&&v?`${qj}`:""}\n\n
\n
\n
\n
\n
${e[n].metadata.name}
\n
${Dn(`modal.walletTypes.${u||e[n].type}`)}
\n
\n \n`)}Array.from(document.querySelectorAll(".single-wallet-get")).forEach(n=>{n.addEventListener("click",()=>{if(!En)return;const r=En.modules.find(v=>v.id===n.id);if(!r)return;const u=N8(r);u&&window.open(u,"_blank")})}),document.getElementById("back-button")?.addEventListener("click",()=>{fE()})})).apply(this,arguments)}const $j='\n\n \n',eU='\n\n \n \n \n';function fE(){return dE.apply(this,arguments)}function dE(){return(dE=(0,ke.Z)(function*(){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n
\n

${Dn("modal.wallet.whatIsAWallet")}

\n \n
\n
\n\n
\n
\n
\n ${$j}\n
\n
\n

${Dn("modal.wallet.secureAndManage")}

\n

${Dn("modal.wallet.safelyStore")}

\n
\n
\n\n
\n
\n ${eU}\n
\n
\n

${Dn("modal.wallet.logInToAny")}

\n

${Dn("modal.wallet.noNeedToCreate")}

\n
\n
\n\n
\n \n
\n\n
\n

\n ${Dn("modal.wallet.useAWallet")}\n

\n \n
\n\n
\n \n
\n\n
\n
\n `,document.getElementById("get-a-wallet-button")?.addEventListener("click",()=>{R8()}),document.getElementById("get-a-wallet-button-mobile")?.addEventListener("click",()=>{R8()})})).apply(this,arguments)}const nU='\n\n \n \n';function k8(){return hE.apply(this,arguments)}function hE(){return hE=(0,ke.Z)(function*(t=null){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
\n
\n ${t?.metadata.name}\n
\n

${t?.metadata.name}

\n
\n ${nU}\n \n ${Dn("modal.wallet.connectionSuccessful")}\n \n
\n
\n
\n
\n `}),hE.apply(this,arguments)}var rU=p(89093),iU=p.n(rU),oU=p(3259);const sU='\n\n \n \n';function pE(){return pE=(0,ke.Z)(function*(t,e){function r(){return(r=(0,ke.Z)(function*(ie){return yield oU.toString(ie,{margin:0,type:"svg"})})).apply(this,arguments)}const u=yield function n(ie){return r.apply(this,arguments)}(e.uri);document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

${Dn("modal.qr.scanWithYourMobile")}

\n \n
\n
\n
\n ${u}\n
\n
\n
\n ${sU}\n ${Dn("modal.qr.copyToClipboard")}\n
\n
\n
\n

${Dn("modal.qr.preferTheOfficial")} ${t.metadata.name}?

\n \n
\n
\n
\n`,document.getElementById("continue-button")?.addEventListener("click",()=>{um(t,!1)});const v=document.getElementById("copy-uri-to-clipboard"),O=document.getElementById("uri-copy-notification"),Y=ie=>{O&&v&&(O.innerHTML=ie,O.style.display="block",v.style.display="none")},$=()=>{O&&v&&(v.style.display="flex",O.style.display="none")};document.getElementById("copy-uri-to-clipboard")?.addEventListener("click",()=>{e.uri&&(iU()(e.uri)?(Y(Dn("modal.qr.copiedToClipboard")),setTimeout(()=>$(),1200)):(Y(Dn("modal.qr.failedToCopy")),setTimeout(()=>$(),1200)))}),document.getElementById("default-modal-trigger")?.addEventListener("click",()=>{e.handleOpenDefaultModal()})}),pE.apply(this,arguments)}const uU='\n\n \n \n \n ';let L8=!0;const cU=function(){var t=(0,ke.Z)(function*(e){if(!En)return[];const n=yield fetch(`${En.selector.options.network.indexerUrl}/publicKey/ed25519:${e}/accounts`);if(!n.ok)throw new Error("Failed to get account id from public key");const r=yield n.json();return Array.isArray(r)&&r.length?r:[]});return function(n){return t.apply(this,arguments)}}(),F8=function(){var t=(0,ke.Z)(function*(e){if(!En)return[];const n=yield e.getPublicKey(En.derivationPath);try{return(yield cU(n)).map((u,v)=>({derivationPath:En.derivationPath,publicKey:n,accountId:u,selected:0===v}))}catch{return null}});return function(n){return t.apply(this,arguments)}}();function um(t){return gE.apply(this,arguments)}function gE(){return gE=(0,ke.Z)(function*(t,e=!1){if(!En)return;const{selectedWalletId:n}=En.selector.store.getState();if(n!==t.id)try{if("injected"===t.type&&!t.metadata.available)return function tU(t){En&&(document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n
\n
\n
\n
\n
\n
\n

\n ${t.metadata.name}\n

\n
\n

\n ${Dn("modal.install.youllNeedToInstall")} ${t.metadata.name}\n ${Dn("modal.install.toContinueAfterInstalling")}\n  \n ${Dn("modal.install.refreshThePage")}\n \n

\n
\n \n
\n
\n
\n `,document.getElementById("back-button")?.addEventListener("click",()=>{fE()}),document.getElementById("refresh-page-lint")?.addEventListener("click",()=>{window.location.reload()}),document.getElementById("download-button")?.addEventListener("click",()=>{"injected"===t.type&&window.open(t.metadata.downloadUrl,"_blank")}))}(t);if(t.metadata.deprecated)return ib(t,new Error("Wallet is deprecated"));const r=yield t.wallet();if(yield O8(t),"hardware"===r.type){const u=yield F8(r);return!u||u.length<1?T8(t):1===u.length?oE(t,u,u):nE(t,u)}if("bridge"===r.type){const u=En.selector.on("uriChanged",({uri:v})=>{!function aU(t,e){return pE.apply(this,arguments)}(t,{uri:v,handleOpenDefaultModal:()=>{um(t,!0)}})});return yield r.signIn({contractId:En.options.contractId,methodNames:En.options.methodNames,qrCodeModal:e}),u.remove(),En.container.children[0].classList.remove("open"),void En.emitter.emit("onHide",{hideReason:"wallet-navigation"})}if("browser"===r.type)return yield r.signIn({contractId:En.options.contractId,methodNames:En.options.methodNames,successUrl:r.metadata.successUrl,failureUrl:r.metadata.failureUrl}),En.container.children[0].classList.remove("open"),void En.emitter.emit("onHide",{hideReason:"wallet-navigation"});yield r.signIn({contractId:En.options.contractId,methodNames:En.options.methodNames}),En.container.children[0].classList.remove("open"),En.emitter.emit("onHide",{hideReason:"wallet-navigation"})}catch(r){const{name:u}=t.metadata,v=r&&"object"==typeof r&&"message"in r?r.message:"Something went wrong";yield ib(t,new Error(`Failed to sign in with ${u}: ${v}`))}else k8(t)}),gE.apply(this,arguments)}function ob(t,e){if(En)for(let n=0;n\n
${u}
\n
\n
${u}
\n
${v}
\n
\n ${r.metadata.deprecated?`\n
\n ${uU}\n
\n `:""}\n \n `),document.getElementById("module-"+r.id)?.addEventListener("click",()=>{if(document.querySelectorAll(".selected-wallet").forEach(Y=>{Y.classList.remove("selected-wallet")}),document.getElementById("module-"+r.id)?.classList.add("selected-wallet"),"hardware"===r.type)return cE(r);um(r,!1)})}}function B8(){if(!En)return;En.container.innerHTML=`\n
\n
\n
\n \n \n
\n
\n `;const t=[],e=[];En.modules.forEach(n=>{En?.selector.store.getState().recentlySignedInWallets.includes(n.id)?e.push(n):t.push(n)}),En.selector.options.optimizeWalletOrder&&e.length>0?(document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'\n
\n
Recent
\n
\n
\n '),document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'\n
\n
More
\n
\n
\n '),ob(".recent-options-list-content",e),En.selector.options.randomizeWalletOrder?ob(".more-options-list-content",t.sort(()=>Math.random()-.5)):ob(".more-options-list-content",t)):(document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'
'),ob(".options-list",En.modules)),document.querySelector(".nws-modal-overlay")?.addEventListener("click",()=>{En&&(En.container.children[0].classList.remove("open"),En.emitter.emit("onHide",{hideReason:"user-triggered"}))}),L8&&(document.addEventListener("click",n=>{if(!En)return;const r=n.target;r&&"close-button"===r.className&&(En.container.children[0].classList.remove("open"),En.emitter.emit("onHide",{hideReason:"user-triggered"}))}),L8=!1)}const j8="near-wallet-selector-modal",U8="44'/397'/0'/0'/1'";let yE=null,En=null;if(typeof window<"u"){const t=document.createElement("div");t.id=j8,document.body.appendChild(t)}const lU=(t,e)=>{const n=new X2;En={container:document.getElementById(j8),selector:t,options:e,route:{name:"WalletOptions"},modules:[],derivationPath:U8,emitter:n},En.selector.store.observable.subscribe(u=>{En&&(t.options.optimizeWalletOrder&&(u.modules.sort((v,O)=>v.metadata.deprecated===O.metadata.deprecated?0:v.metadata.deprecated?1:-1),u.modules.sort((v,O)=>O.metadata.available===v.metadata.available?0:O.metadata.available?1:-1)),En.modules=u.modules)});return window.addEventListener("keydown",u=>{if("Escape"===u.key){if(!En)return;En.container.children[0].classList.remove("open"),En.emitter.emit("onHide",{hideReason:"user-triggered"})}}),B8(),yE||(yE={show:()=>{if(!En)return;(t=>{C8=t})(En.selector.options.languageCode),B8();const u=En.selector.store.getState().selectedWalletId;if(u){k8(En.modules.find(O=>O.id===u))}else fE();En.container.children[0].classList.add("open")},hide:()=>{En&&En.container.children[0].classList.remove("open")},on:(u,v)=>En.emitter.on(u,v),off:(u,v)=>{En.emitter.off(u,v)}}),yE};var Wa=p(48214),K8=p.n(Wa);const fU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQ4AAAEOCAYAAAB4sfmlAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5gYXDA8FsK/ZnQAAAAFvck5UAc+id5oAACF9SURBVHja7d19gJRlvTfw7++a2ZnlVQFRJGBneU1gZ0EyszpHy15OnvJRj5rlU5aVnTJEAnZ3dkFHZXeWtwBJe/FkVk9lUumpTm9Hj1SPmSXCzgKGLOwMi4gKaLwsO2/X7/lDMvThZXeZmd/98vv8FbUx3/tm5rvXfc91XxdBKXVSNQ3pYaDCnYboF20t1b+RzuMEQekASjnWNRyITk5/ni3fSaARbOlZ6UhOocWh1HFEG1LvBXWugqUaOvrfEVGVdC6n0OJQ6hjRhalqFLAc4KsAesP/xrBaHEdpcSgFIDp/zyCEemJc4HkEVJ7gx0ZK53QKLQ7lc0y1jTuvZ+5pBfNb6OQ/PFw6rVNocSjfmtaw/YIApVcz80W9+XnW4nidFofynemNL54TQHerZXwSYNPb/x8BQ6WzO4UWh/KNqfHNoWB20Bzm7oUMDKW+/gVE+nk5Sk+E8oVoU/oj6LErQDypz4Xxd8wV0sfhFFocytOmL0ydRwVeBWs/gH43xmsY0OI4SotDedKMeOeZNmNuR8HejCJ94AmUkz4up9DiUN5yzUOB2okXfNZmcBdgizzvgnukD88ptDiUZ9TEui4m5FcxMKM0r0BHpI/RKbQ4lOvNqt89Lk/Z5YzC1cDp3sk4qcPSx+oUWhzKtWbFdw/MZjL1OWQWABhQ+lfkvdLH7BRaHMqVoo07r8tlMksJGFu2F2V+Sfq4nUKLQ7lKtDF1PoDV4MK7y/7iZLQ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MDowMIbbr3kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDYtMjNUMTI6MTM6NDIrMDA6MDD3hhfFAAAAAElFTkSuQmCC",dU=()=>lc(()=>!!window.near?.isSender).catch(()=>!1),pU=function(){var t=(0,ke.Z)(function*({options:e,metadata:n,store:r,provider:u,emitter:v,logger:O,id:Y}){const $={wallet:window.near},ue=function(){var je=(0,ke.Z)(function*(){if(!$.wallet.isSignedIn())return;(()=>{for(const je in $.wallet.callbacks)$.wallet.remove(je)})();const Ue=yield $.wallet.signOut();if(!0===Ue)return;const $e=new Error("string"==typeof Ue.error?Ue.error:Ue.error.type);if("User reject"===$e.message)throw $e;O.log("Failed to sign out"),O.error($e)});return function(){return je.apply(this,arguments)}}(),he=()=>{$.wallet.on("accountChanged",function(){var je=(0,ke.Z)(function*(Ue){O.log("onAccountChange",Ue),v.emit("signedOut",null)});return function(Ue){return je.apply(this,arguments)}}()),$.wallet.on("rpcChanged",function(){var je=(0,ke.Z)(function*(Ue){O.log("onNetworkChange",Ue),e.network.networkId!==Ue.networkId&&(yield ue(),v.emit("signedOut",null),v.emit("networkChanged",{networkId:Ue.networkId}))});return function(Ue){return je.apply(this,arguments)}}())},we=function(){var je=(0,ke.Z)(function*(){const{selectedWalletId:Ue}=r.getState();Ue===Y&&(yield lc(()=>!!$.wallet?.isSignedIn(),{timeout:1e3}).catch());const $e=$.wallet.getAccountId();if(!$e)return[];yield lc(()=>!!$.wallet.account(),{timeout:100});const Je=$.wallet.account();if(!Je.connection.signer.getPublicKey)return[{accountId:$e,publicKey:void 0}];const ht=yield Je.connection.signer.getPublicKey(Je.accountId,e.network.networkId);return[{accountId:$e,publicKey:ht?ht.toString():void 0}]});return function(){return je.apply(this,arguments)}}(),Ce=je=>{if(!(je=>je.every(Ue=>"FunctionCall"===Ue.type))(je))throw new Error(`Only 'FunctionCall' actions types are supported by ${n.name}`);return je.map($e=>$e.params)},Le=je=>je.map(Ue=>({receiverId:Ue.receiverId,actions:Ce(Ue.actions)}));return $.wallet&&$.wallet.isSignedIn()&&he(),{signIn:({contractId:je,methodNames:Ue})=>(0,ke.Z)(function*(){const $e=yield we();if($e.length)return $e;const{accessKey:Je,error:ht}=yield $.wallet.requestSignIn({contractId:je,methodNames:Ue});if(!Je||ht)throw yield ue(),new Error(("string"==typeof ht?ht:ht.type)||"Failed to sign in");return he(),yield we()})(),signOut:ue,getAccounts:()=>(0,ke.Z)(function*(){return we()})(),verifyOwner:({message:je})=>(0,ke.Z)(function*(){O.log("Sender:verifyOwner",{message:je});const Ue=$.wallet.account();if(!Ue)throw new Error("Wallet not signed in");if(!Ue.connection.signer.signMessage)throw new Error("Wallet is locked");const $e=e.network.networkId,Je=Ue.accountId,ht=yield Ue.connection.signer.getPublicKey(Je,$e),xt=yield u.block({finality:"final"}),Wt={accountId:Je,message:je,blockId:xt.header.hash,publicKey:Buffer.from(ht.data).toString("base64"),keyType:ht.keyType},An=JSON.stringify(Wt),rn=yield Ue.connection.signer.signMessage(new Uint8Array(Buffer.from(An)),Je,$e);return{...Wt,signature:Buffer.from(rn.signature).toString("base64"),keyType:rn.publicKey.keyType}})(),signMessage:je=>(0,ke.Z)(function*(){return $.wallet.signMessage(je).then(Ue=>{if(Ue.error)throw new Error(Ue.error);if(!Ue?.response)throw new Error("Invalid response");return Ue.response})})(),signAndSendTransaction:({signerId:je,receiverId:Ue,actions:$e})=>(0,ke.Z)(function*(){O.log("signAndSendTransaction",{signerId:je,receiverId:Ue,actions:$e});const{contract:Je}=r.getState();if(!$.wallet.isSignedIn()||!Je)throw new Error("Wallet not signed in");return $.wallet.signAndSendTransaction({receiverId:Ue||Je.contractId,actions:Ce($e)}).then(ht=>{if(ht.error)throw new Error(ht.error);if(ht.response&&"error"in ht.response)throw new Error(ht.response.error.message);if(!ht.response?.length)throw new Error("Invalid response");return ht.response[0]})})(),signAndSendTransactions:({transactions:je})=>(0,ke.Z)(function*(){if(O.log("signAndSendTransactions",{transactions:je}),!$.wallet.isSignedIn())throw new Error("Wallet not signed in");return $.wallet.requestSignTransactions({transactions:Le(je)}).then(Ue=>{if(Ue.error)throw new Error(Ue.error);if(Ue.response&&"error"in Ue.response)throw new Error(Ue.response.error.message);if(!Ue.response?.length)throw new Error("Invalid response");return Ue.response})})(),importAccountsInSecureContext:({accounts:je})=>(0,ke.Z)(function*(){window.near&&window.near.isSender&&(yield window.near.batchImport({keystore:je,network:e.network.networkId}))})()}});return function(n){return t.apply(this,arguments)}}();function z8({iconUrl:t=fU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){if((0,Wa.isMobile)())return null;const r=yield dU();return{id:"sender",type:"injected",metadata:{name:"Sender",description:"Browser extension wallet built on NEAR.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/sender-wallet/epapihdplajcdnnkdeiahlgigofloibg",deprecated:e,available:r},init:pU}})}const gU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAC8VBMVEUAAACS3/uZ5/rF4v7h/f9K6Pdi0vtTyvqnt/5T1PlH9fakpf/p//88/fXs//5G8vXy//5F8/Zj1vqvuv514PrI7v2J3/o6/PTE7/1A9fbU+/3Y+/1R0vo7/fXh//7G5/3l//6jov6k8fuxs/6ppP6/1f5O6Pfv//7n//+bsv4AAADy//7r//7l//45//RE/vTg//1I/vVB/vRL+vXb//09//RM/vXV/v19/vhQ/vXw+/5z/fc++vVh+feC/fii/fpf9PdQ1Pmxr/6y/vuM/fm8/vun/frB/vyt/vpq9vi3/vtZ9fdRyvq1s/5N4Ph4/vfj9v6tqv7e+f1q/PbK//xS3fhS6fdl+/bX2f6c/fmS/flw6fng7/7f4/66uP5O2fmB8Pla5/jQ//2H/fjT1P6X/fl47vlV/vXLy/5p7fhc+fbHx/5v7/hL5vdR5fhT+fbP0P6T7/p15Pp09PhB9fWL7fp6+vhn8/di8PdG8Pbb3f7F/vyppf586Ppu/feK8/rX+v1W2PlN8vbW7/1Vzvrb8/6D6fpE+vXO+/zj6P5x+P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vdwQ2r+YWmZTDBsq3HK6XZr77qfPRGdbzK7ve7YKM2tA1bxHqTHy3bQrmMlcVpviuV6yKai2SKRm1oZ2NWdYeiW3e2arBrH6fAG+BWQ7l0t6o86eiqWwOZ2W+Yo8ZMasYb1J6RFy1iL5pfKd3NHoKdol3NswmgpQ6KaDJzxl4ki+Tt0XtKdznYoCneOurnjlc1Okxan7eBHc2o21k8gwVZXia++2RnO9pv43ZjpvjADWrY/hRZfFQPd0jI8+862dl1UQ16h6kdjVrNZOb9bkZdFWf536xc9+SNo+bpFTWjpvCYIfE0p6x2czv7sfv/RbKPG7Tf5+8WtLCzxwxhA0ettbOtMORy6T+p/FBdLVrMR33SvPTh2aiWp5O/lebP+2/EPu+nFd1t+ROdiDEfYEU1aHp07j3l0n9fBbijpYim6ifCAc/7P4BdPm/u06DNjDqSQWsL5s77X0w4rVJ5aN7cuU8/vWABo+Y59gULFsyfi3aWuf8ADHnSl6eWnZwAAAAASUVORK5CYII=",yU=()=>lc(()=>!!window.bitkeep.near).catch(()=>!1),vU=function(){var t=(0,ke.Z)(function*({options:e,store:n,provider:r,emitter:u,logger:v}){const O={wallet:window.bitkeep.near},$=function(){var we=(0,ke.Z)(function*(){if(!O.wallet.isSignedIn())return;(()=>{for(const we in O.wallet.callbacks)O.wallet.remove(we)})();const xe=yield O.wallet.signOut();if(!0===xe)return;const Ce=new Error("string"==typeof xe.error?xe.error:xe.error.type);if("User reject"===Ce.message)throw Ce;v.log("Failed to sign out"),v.error(Ce)});return function(){return we.apply(this,arguments)}}(),ie=()=>{O.wallet.on("accountChanged",function(){var we=(0,ke.Z)(function*(xe){v.log("onAccountChange",xe),u.emit("signedOut",null)});return function(xe){return we.apply(this,arguments)}}()),O.wallet.on("rpcChanged",function(){var we=(0,ke.Z)(function*(xe){v.log("onNetworkChange",xe),e.network.networkId!==xe.networkId&&(yield $(),u.emit("signedOut",null),u.emit("networkChanged",{networkId:xe.networkId}))});return function(xe){return we.apply(this,arguments)}}())},ue=function(){var we=(0,ke.Z)(function*(){const xe=O.wallet.getAccountId()||"";if(!xe)return[];const Ce=yield O.wallet.getPublicKey();return[{accountId:xe,publicKey:Ce?Ce.toString():void 0}]});return function(){return we.apply(this,arguments)}}(),he=we=>we.map(xe=>({receiverId:xe.receiverId,actions:xe.actions}));return O.wallet&&O.wallet.isSignedIn()&&ie(),{signIn:({contractId:we,methodNames:xe})=>(0,ke.Z)(function*(){const Ce=yield ue();if(Ce.length)return Ce;const{accessKey:Le,error:je}=yield O.wallet.requestSignIn({contractId:we,methodNames:xe});if(!Le||je)throw yield $(),new Error(("string"==typeof je?je:je.type)||"Failed to sign in");return ie(),yield ue()})(),signOut:$,getAccounts:()=>(0,ke.Z)(function*(){return ue()})(),verifyOwner:({message:we})=>(0,ke.Z)(function*(){v.log("Bitget-wallet:verifyOwner",{message:we});const xe=e.network.networkId,Ce=yield O.wallet.getAccountId(),Le=yield O.wallet.getPublicKey(),je=yield r.block({finality:"final"}),Ue={accountId:Ce,message:we,blockId:je.header.hash,publicKey:Le,keyType:"0"},$e=JSON.stringify(Ue),Je=yield O.wallet.verifyOwner($e,Ce,xe);return{...Ue,signature:Je.signature,keyType:Je.keyType}})(),signAndSendTransaction:({signerId:we,receiverId:xe,actions:Ce})=>(0,ke.Z)(function*(){v.log("signAndSendTransaction",{signerId:we,receiverId:xe,actions:Ce});const{contract:Le}=n.getState();if(!O.wallet.isSignedIn()||!Le)throw new Error("Wallet not signed in");return O.wallet.signAndSendTransaction({receiverId:xe||Le.contractId,actions:Ce}).then(je=>{if(je.error)throw new Error(je.error);if(je.response&&"error"in je.response)throw new Error(je.response.error.message);if(!je.response?.length)throw new Error("Invalid response");return je.response[0]})})(),signAndSendTransactions:({transactions:we})=>(0,ke.Z)(function*(){if(v.log("signAndSendTransactions",{transactions:we}),!O.wallet.isSignedIn())throw new Error("Wallet not signed in");return O.wallet.requestSignTransactions({transactions:he(we)}).then(xe=>{if(xe.error)throw new Error(xe.error);if(xe.response&&"error"in xe.response)throw new Error(xe.response.error.message);if(!xe.response?.length)throw new Error("Invalid response");return xe.response})})()}});return function(n){return t.apply(this,arguments)}}();function V8({iconUrl:t=gU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){if((0,Wa.isMobile)())return null;const r=yield yU();return r&&(yield lc(()=>!!window.bitkeep?.near?.isSignedIn()).catch(()=>!1)),{id:"bitget-wallet",type:"injected",metadata:{name:"Bitget Wallet",description:"Browser extension wallet built on NEAR.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/bitkeep-crypto-nft-wallet/jiidiaalihmmhddjgbnbgdfflelocpak",deprecated:e,available:r},init:vU}})}const bU="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iYXV0byIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMTQuMjYyNyAxMy40MDEzQzEyLjQyMjcgMTQuNTMwNyA5Ljk1OTg3IDE1LjExMjQgNy40NjU1OCAxNC45ODgxQzUuMzY4NDQgMTQuODg2NSAzLjY0ODQ0IDE0LjE0MTEgMi42MDg0NCAxMi45MTU3QzEuNjk0MTYgMTEuODIwMSAxLjMzOTg3IDEwLjM3NDUgMS41Nzk4NyA4LjcxMTQzQzEuNjYxMjEgOC4xNTg3NCAxLjgyNzkxIDcuNjIxNjYgMi4wNzQxNSA3LjExODk2TDIuMTA4NDQgNy4wNDgzN0MyLjk3MTcgNS40MDU5NSA0LjI1MjgyIDQuMDEzOTcgNS44MjU3MyAzLjAwOTQyQzcuMzk4NjQgMi4wMDQ4NiA5LjIwOTEzIDEuNDIyMzYgMTEuMDc5IDEuMzE5MjRDMTIuOTQ4OSAxLjIxNjExIDE0LjgxMzcgMS41OTU5MiAxNi40OSAyLjQyMTI4QzE4LjE2NjIgMy4yNDY2NSAxOS41OTYxIDQuNDg5MTIgMjAuNjM4OSA2LjAyNjQxQzIxLjY4MT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E4LjEwMzQgOS4yMDg1IDE3LjYzMTMgOS42NzQ5NiAxNy42MzEzIDEwLjI1MDRDMTcuNjMxMyAxMC44MjU4IDE4LjEwMzQgMTEuMjkyMyAxOC42ODU2IDExLjI5MjNaIiBmaWxsPSIjMjA0MUUwIj48L3BhdGg+Cjwvc3ZnPgo=",wU=function(){var t=(0,ke.Z)(function*(e,n){const{selectedWalletId:r}=e.getState(),u=window.xfi.near;return"xdefi"===r&&(yield u.connect(n.networkId).catch(()=>null)),{wallet:u,network:n}});return function(n,r){return t.apply(this,arguments)}}(),AU=()=>lc(()=>!!window.xfi?.near).catch(()=>!1),EU=function(){var t=(0,ke.Z)(function*({metadata:e,store:n,logger:r,options:u}){const v=yield wU(n,u.network),O=()=>v.wallet.accounts?v.wallet.accounts:[],Y=$=>{const ie=O(),{contract:ue}=n.getState();if(!ie.length||!ue)throw new Error("Wallet not signed in");return $.map(he=>({signerId:he.signerId||ie[0].accountId,receiverId:he.receiverId||ue.contractId,actions:he.actions}))};return{signIn:()=>(0,ke.Z)(function*(){const $=O().map(ie=>({accountId:ie.accountId,publicKey:ie.publicKey.toString()}));return $.length?$:(yield v.wallet.connect(v.network.networkId),O().map(ie=>({accountId:ie.accountId,publicKey:ie.publicKey.toString()})))})(),signOut:()=>(0,ke.Z)(function*(){yield v.wallet.disconnect()})(),getAccounts:()=>(0,ke.Z)(function*(){return O().map($=>({accountId:$.accountId,publicKey:$.publicKey.toString()}))})(),verifyOwner:({message:$})=>(0,ke.Z)(function*(){throw r.log("XDEFI:verifyOwner",{message:$}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:$=>(0,ke.Z)(function*(){r.log("signAndSendTransaction",$);const{contract:ie}=n.getState();if(!O().length||!ie)throw new Error("Wallet not signed in");return yield v.wallet.signAndSendTransaction(Y([$])[0])})(),signAndSendTransactions:({transactions:$})=>(0,ke.Z)(function*(){return r.log("signAndSendTransactions",{transactions:$}),yield v.wallet.signAndSendTransactions(Y($))})()}});return function(n){return t.apply(this,arguments)}}();function H8({iconUrl:t=bU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){if((0,Wa.isMobile)())return null;const r=yield AU();return{id:"xdefi",type:"injected",metadata:{name:"XDEFI Wallet",description:"One wallet for all your Crypto",iconUrl:t,downloadUrl:"https://www.xdefi.io",deprecated:e,available:r},init:EU}})}var mp=p(98538),fr=p.n(mp);const{transactions:fc,utils:mE}=Jn,ih=t=>{switch(t.type){case"CreateAccount":return fc.createAccount();case"DeployContract":{const{code:e}=t.params;return fc.deployContract(e)}case"FunctionCall":{const{methodName:e,args:n,gas:r,deposit:u}=t.params;return fc.functionCall(e,n,new mp.BN(r),new mp.BN(u))}case"Transfer":{const{deposit:e}=t.params;return fc.transfer(new mp.BN(e))}case"Stake":{const{stake:e,publicKey:n}=t.params;return fc.stake(new mp.BN(e),mE.PublicKey.from(n))}case"AddKey":{const{publicKey:e,accessKey:n}=t.params;return fc.addKey(mE.PublicKey.from(e),(t=>{if("FullAccess"===t)return fc.fullAccessKey();const{receiverId:e,methodNames:n=[]}=t,r=t.allowance?new mp.BN(t.allowance):void 0;return fc.functionCallAccessKey(e,n,r)})(n.permission))}case"DeleteKey":{const{publicKey:e}=t.params;return fc.deleteKey(mE.PublicKey.from(e))}case"DeleteAccount":{const{beneficiaryId:e}=t.params;return fc.deleteAccount(e)}default:throw new Error("Invalid action type")}},dc=function(){var t=(0,ke.Z)(function*(e,n,r){const u=new Jn.providers.JsonRpcProvider({url:r.nodeUrl}),v=[];for(let O=0;Oih(xe)),he=Jn.transactions.createTransaction(e[O].signerId,Jn.utils.PublicKey.from(Y.toString()),e[O].receiverId,ie.nonce+O+1,ue,Jn.utils.serialize.base_decode($.header.hash)),we=yield Jn.transactions.signTransaction(he,n,e[O].signerId,r.networkId);v.push(we[1])}return v});return function(n,r,u){return t.apply(this,arguments)}}(),IU=function(){var t=(0,ke.Z)(function*({metadata:e,options:n,store:r,provider:u,logger:v}){const O={wallet:window.nearWalletApi},Y=function(){var ie=(0,ke.Z)(function*(){const ue=O.wallet.signer.account;return ue?[{accountId:ue.accountId,publicKey:ue.publicKey}]:[]});return function(){return ie.apply(this,arguments)}}(),$=ie=>{const{contract:ue}=r.getState();if(!ue)throw new Error("Wallet not signed in");const he=Df(r.getState());if(!he)throw new Error("No active account");return ie.map(we=>({signerId:we.signerId||he.accountId,receiverId:we.receiverId||ue.contractId,actions:we.actions}))};return{signIn:({contractId:ie})=>(0,ke.Z)(function*(){const ue=yield Y();return ue.length?ue:(yield O.wallet.login({contractId:ie}),Y())})(),signOut:()=>(0,ke.Z)(function*(){yield O.wallet.logout()})(),getAccounts:()=>(0,ke.Z)(function*(){return Y()})(),verifyOwner:({message:ie})=>(0,ke.Z)(function*(){v.log("MathWallet:verifyOwner",{message:ie});const ue=Df(r.getState());if(!ue)throw new Error("No active account");const he=ue.accountId,we=yield O.wallet.signer.getPublicKey(he),xe=yield u.block({finality:"final"}),Ce={accountId:he,message:ie,blockId:xe.header.hash,publicKey:Buffer.from(we.data).toString("base64"),keyType:we.keyType};JSON.stringify(Ce);throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:ie,receiverId:ue,actions:he})=>(0,ke.Z)(function*(){v.log("signAndSendTransaction",{signerId:ie,receiverId:ue,actions:he});const we=yield dc($([{signerId:ie,receiverId:ue,actions:he}]),O.wallet.signer,n.network);return u.sendTransaction(we[0])})(),signAndSendTransactions:({transactions:ie})=>(0,ke.Z)(function*(){v.log("signAndSendTransactions",{transactions:ie});const ue=yield dc($(ie),O.wallet.signer,n.network);v.log("signAndSendTransactions:signedTransactions",ue);const he=[];for(let we=0;we(0,ke.Z)(function*(){if((0,Wa.isMobile)())return null;const r=yield!!window.nearWalletApi;return{id:"math-wallet",type:"injected",metadata:{name:"Math Wallet",description:"World's First Insured Crypto Wallet.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/math-wallet/afbcbjpbpfadlkmhmclhkeeodmamcflc",deprecated:e,available:r},init:IU}}),CU="data:image/png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SnX38NHZE7aBgsPUBfTEGbms9BTysnAx6H6jLRitz76Be+ruv3Qctg6QH6YlvXz2+6/i5AzygmAROAUqAQyAKygRQgDeidBM6H9q/rQDteNKEtclVAOdoDZwd6CnfS8P9uV4QPHOBjVAAAAABJRU5ErkJggg==",xU=function(){var t=(0,ke.Z)(function*(e,n){const{selectedWalletId:r}=e.getState(),u=window.nightly.near;return"nightly"===r&&(yield u.connect(v=>{v?n.emit("accountsChanged",{accounts:[{accountId:v.accountId,publicKey:u.account.publicKey.toString()}]}):n.emit("signedOut",null)},!0).catch(()=>null)),{wallet:u}});return function(n,r){return t.apply(this,arguments)}}(),TU=()=>lc(()=>!!window.nightly?.near).catch(()=>!1),OU=function(){var t=(0,ke.Z)(function*({metadata:e,options:n,store:r,logger:u,provider:v,emitter:O}){const Y=yield xU(r,O),$=()=>{const{accountId:he,publicKey:we}=Y.wallet.account;return he?[{accountId:he,publicKey:we.toString()}]:[]},ie=he=>{const we=$(),{contract:xe}=r.getState();if(!we.length||!xe)throw new Error("Wallet not signed in");return he.map(Ce=>({signerId:Ce.signerId||we[0].accountId,receiverId:Ce.receiverId||xe.contractId,actions:Ce.actions}))},ue={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(he=(0,ke.Z)(function*(we){const Ce=$().find(Le=>Le.accountId===we);if(!Ce)throw new Error("Failed to find public key for account");return Jn.utils.PublicKey.from(Ce.publicKey)}),function(xe){return he.apply(this,arguments)}),signMessage:function(){var he=(0,ke.Z)(function*(we,xe){if(!$().find(je=>je.accountId===xe))throw new Error("Failed to find account for signing");try{const je=Jn.transactions.Transaction.decode(Buffer.from(we));return{signature:(yield Y.wallet.signTransaction(je)).signature.data,publicKey:je.publicKey}}catch(je){throw u.log("Failed to sign message"),u.error(je),Error("Invalid message. Only transactions can be signed")}});return function(xe,Ce){return he.apply(this,arguments)}}()};var he;return{signIn:()=>(0,ke.Z)(function*(){const he=$();return he.length?he:(yield Y.wallet.connect(we=>{we?O.emit("accountsChanged",{accounts:[{accountId:we.accountId,publicKey:Y.wallet.account.publicKey.toString()}]}):O.emit("signedOut",null)}),$())})(),signOut:()=>(0,ke.Z)(function*(){yield Y.wallet.disconnect()})(),getAccounts:()=>(0,ke.Z)(function*(){return $()})(),verifyOwner:({message:he})=>(0,ke.Z)(function*(){throw u.log("Nightly:verifyOwner",{message:he}),new Error(`Method not supported by ${e.name}`)})(),signMessage:({message:he,nonce:we,recipient:xe,state:Ce})=>(0,ke.Z)(function*(){return u.log("Nightly:signMessage",{message:he,nonce:we,recipient:xe,state:Ce}),Y.wallet.isConnected||(yield Y.wallet.connect()),yield Y.wallet.signMessage({message:he,nonce:we,recipient:xe,state:Ce})})(),signAndSendTransaction:({signerId:he,receiverId:we,actions:xe})=>(0,ke.Z)(function*(){u.log("signAndSendTransaction",{signerId:he,receiverId:we,actions:xe});const{contract:Ce}=r.getState();if(!$().length||!Ce)throw new Error("Wallet not signed in");const[je]=yield dc(ie([{signerId:he,receiverId:we,actions:xe}]),ue,n.network);return v.sendTransaction(je)})(),signAndSendTransactions:({transactions:he})=>(0,ke.Z)(function*(){u.log("signAndSendTransactions",{transactions:he});const we=yield dc(ie(he),ue,n.network),xe=[];for(let Ce=0;Ce(0,ke.Z)(function*(){Y.wallet.importWalletsNear(he.accounts)})()}});return function(n){return t.apply(this,arguments)}}();function G8({iconUrl:t=CU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){if((0,Wa.isMobile)())return null;const r=yield TU();return{id:"nightly",type:"injected",metadata:{name:"Nightly",description:"Multichain crypto wallet.",iconUrl:t,downloadUrl:"https://wallet.nightly.app/download",deprecated:e,available:r},init:OU}})}var vE=p(96831);const PU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZsAAAGbCAMAAAAlRs3KAAAC/VBMVEUAAAB1gdddWs6cq+JsadRdXalLTJhFRXtTU415iNhOTo5+pe41NXxjYM8qKmscHGuRn+MSGZl0ovJ3eL6EqPEXF19QUcFdnfNlctZZmvNvc9prbdaMsPA1NoY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AAAAASUVORK5CYII=",NU=function(){var t=(0,ke.Z)(function*(e,n){const r=new Jn.keyStores.BrowserLocalStorageKeyStore(window.localStorage,"_meteor_wallet"),u=yield Jn.connect({keyStore:r,...n,headers:{}});return{wallet:new vE.MeteorWallet({near:u,appKeyPrefix:"near_app"}),keyStore:r}});return function(n,r){return t.apply(this,arguments)}}(),RU=function(){var t=(0,ke.Z)(function*({options:e,logger:n,store:r,params:u}){const v=yield NU(u,e.network),O=function(){var Y=(0,ke.Z)(function*(){const $=v.wallet.getAccountId(),ie=v.wallet.account();if(!$||!ie)return[];const ue=yield ie.connection.signer.getPublicKey(ie.accountId,e.network.networkId);return[{accountId:$,publicKey:ue?ue.toString():""}]});return function(){return Y.apply(this,arguments)}}();return{signIn:({contractId:Y,methodNames:$=[]})=>(0,ke.Z)(function*(){n.log("MeteorWallet:signIn",{contractId:Y,methodNames:$}),$.length?yield v.wallet.requestSignIn({methods:$,type:vE.EMeteorWalletSignInType.SELECTED_METHODS,contract_id:Y}):yield v.wallet.requestSignIn({type:vE.EMeteorWalletSignInType.ALL_METHODS,contract_id:Y});const ie=yield O();return n.log("MeteorWallet:signIn",{contractId:Y,methodNames:$,account:ie[0]}),ie})(),signOut:()=>(0,ke.Z)(function*(){v.wallet.isSignedIn()&&(yield v.wallet.signOut())})(),isSignedIn:()=>(0,ke.Z)(function*(){return!!v.wallet&&v.wallet.isSignedIn()})(),getAccounts:()=>(0,ke.Z)(function*(){return O()})(),verifyOwner:({message:Y})=>(0,ke.Z)(function*(){n.log("MeteorWallet:verifyOwner",{message:Y});const $=yield v.wallet.verifyOwner({message:Y});if($.success)return $.payload;throw new Error(`Couldn't verify owner: ${$.message}`)})(),signMessage:({message:Y,nonce:$,recipient:ie,state:ue})=>(0,ke.Z)(function*(){n.log("MeteorWallet:signMessage",{message:Y,nonce:$,recipient:ie,state:ue});const he=v.wallet.getAccountId(),we=yield v.wallet.signMessage({message:Y,nonce:$,recipient:ie,accountId:he,state:ue});if(we.success)return we.payload;throw new Error(`Couldn't sign message owner: ${we.message}`)})(),signAndSendTransaction:({signerId:Y,receiverId:$,actions:ie})=>(0,ke.Z)(function*(){n.log("MeteorWallet:signAndSendTransaction",{signerId:Y,receiverId:$,actions:ie});const{contract:ue}=r.getState();if(!v.wallet.isSignedIn())throw new Error("Wallet not signed in");if(!$&&!ue)throw new Error("No receiver found to send the transaction to");return v.wallet.account().signAndSendTransaction_direct({receiverId:$??ue.contractId,actions:ie})})(),signAndSendTransactions:({transactions:Y})=>(0,ke.Z)(function*(){if(n.log("MeteorWallet:signAndSendTransactions",{transactions:Y}),!v.wallet.isSignedIn())throw new Error("Wallet not signed in");return v.wallet.requestSignTransactions({transactions:Y})})(),buildImportAccountsUrl:()=>`https://wallet.meteorwallet.app/batch-import?network=${v.wallet._networkId}`}});return function(n){return t.apply(this,arguments)}}();function Z8({iconUrl:t=PU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){return{id:"meteor-wallet",type:"injected",metadata:{available:!0,name:"Meteor Wallet",description:"Securely store and stake your NEAR tokens and compatible assets with Meteor.",iconUrl:t,deprecated:e,downloadUrl:"https://wallet.meteorwallet.app",useUrlAccountImport:!0},init:n=>RU({...n,params:{iconUrl:t}})}})}const vp_SIGN_IN="sign-in",vp_IS_SIGNED_IN="is-signed-in",vp_GET_ACCOUNT_ID="get-account-id",vp_SIGN_AND_SEND_TRANSACTION="sign-and-send-transaction",vp_SIGN_AND_SEND_TRANSACTIONS="sign-and-send-transactions";let bE=0;const sb=[],bp=(t,e=!1,n)=>new Promise((u,v)=>{let O;bE++,e&&(O=setTimeout(()=>v(Error("timeout")),2e3)),sb.push({id_wallet_selector:bE,code:t,resolve:u,reject:v,timeout:O}),window.postMessage({id:bE,src:"ws",type:"nw",code:t,dest:"ext",params:n})}),LU=function(){var t=(0,ke.Z)(function*(){return lc(()=>!!window.narwallets).catch(()=>!1)});return function(){return t.apply(this,arguments)}}(),Y8=()=>bp(vp_IS_SIGNED_IN,!0),zU=()=>{window.addEventListener("message",t=>{if(t.source!==window)return;const{data:e}=t;if(e&&"page"===e.dest&&e.id&&"nw"===e.type){const n=(t=>sb.filter(e=>e.id_wallet_selector===t)[0])(e.id);n&&((t=>{const e=sb.indexOf(t);e>-1&&sb.splice(e,1)})(n),n.timeout&&clearTimeout(n.timeout),e.result?e.result.err?n.reject(e.result.err):n.resolve(e.result.data):n.reject("result is empty"))}})},VU=function(){var t=(0,ke.Z)(function*({metadata:e,store:n,logger:r}){return{signIn:()=>(0,ke.Z)(function*(){let O;return O=(yield Y8())?vp_GET_ACCOUNT_ID:vp_SIGN_IN,[{accountId:yield bp(O)}]})(),signOut:function(){var v=(0,ke.Z)(function*(){if(!(yield Y8()))return;const O=yield bp("sign-out");if(!0===O)return;const Y=O,$=new Error("string"==typeof Y.error?Y.error:Y.error.type);if("User reject"===$.message)throw $;r.log("Failed to sign out"),r.error($)});return function(){return v.apply(this,arguments)}}(),getAccounts:()=>(0,ke.Z)(function*(){return[{accountId:yield bp(vp_GET_ACCOUNT_ID,!1)}]})(),verifyOwner:({message:v})=>(0,ke.Z)(function*(){throw r.log("Narwallets:verifyOwner",{message:v}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:v,receiverId:O,actions:Y})=>(0,ke.Z)(function*(){r.log("signAndSendTransaction",{signerId:v,receiverId:O,actions:Y});const{contract:$,accounts:ie}=n.getState();if(!ie||0===ie.length||!$)throw new Error("Wallet not signed in");return(t=>bp(vp_SIGN_AND_SEND_TRANSACTION,!1,t))({signerId:v,receiverId:O||$.contractId,actions:Y})})(),signAndSendTransactions:({transactions:v})=>(0,ke.Z)(function*(){r.log("signAndSendTransactions",{transactions:v});const{contract:O,accounts:Y}=n.getState();if(!Y||0===Y.length||!O)throw new Error("Wallet not signed in");return(t=>bp(vp_SIGN_AND_SEND_TRANSACTIONS,!1,t))(v)})()}});return function(n){return t.apply(this,arguments)}}(),J8=({iconUrl:t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAAC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easzSuC622MVAReleEuB8pH8E4U8eI4oGRniRz3JAAgII9hKyCyF9AOXSpA3tAxCD1NTpy+9SenZPKc8wTomIbKYi7EHR3FmFsewWarChlIsTkBNX2QVE756YGwMVJ3dBQEfr7IB65Ct1nOyJvHHTcoq0fApEFMgOhpEupZwupZANIofsLofgj9eoO+0EGgNLSWW+/4I/fVRjjAhQxxp3s3ZsSAEWWhXCE+A/Qmf8N2oQQrzjyLK8viYo0K+bVG7og9UkeRhFvIJJbQLxxtV27GxYARTRCCIoyFin/jifh0grKdSAa5AeW8E7LKtrgREWeOWf84O8gngMa32CMP40Qc5B8aQkPPVxRByluhJkctHatqYVd7QliCNAPqFFBh5oKcjFC+TFBtUVfD6v+pgTA5UGXrK5I2QshegGtr/OQ9iLECqS+Ilmruq6k4FQlAK4ijY5eV68KpjCQYTi2jdvi6ircK6N0HAGbrUAciPXlkZVTCYByNyI3NAF5B0I2BdHEaT/UBQKdf/xwFMiqWhiMATuQg2MPPwXkGRBJII6CfhSp7CuvLJyKRP8/AIZkfQXsT/DhAAAAAElFTkSuQmCC",deprecated:e=!1}={})=>(0,ke.Z)(function*(){if((0,Wa.isMobile)())return null;zU();const r=yield LU();return{id:"narwallets",type:"injected",metadata:{name:"Narwallets",description:null,iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/narwallets-v4/lkpeokpdkmcdaiadpmnnpimlgmdobkdj",deprecated:e,available:r},init:VU}}),HU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAETCAYAAAAVqeK4AAAAAXNSR0IArs4c6QAAAJZlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgExAAIAAAARAAAAWodpAAQAAAABAAAAbAAAAAAAAAEsAAAAAQAAASwAAAABd3d3Lmlua3NjYXBlLm9yZwAAAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAROgAwAEAAAAAQAAARMAAAAAwzPlUAAAAAlwSFlzAAAuIwAALiMBeK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OTRTTMdRjE3btrZ3t72/oW3zpjde27r53V93bd70mAjHQ+t/8qW+X8SUuzKOmLqffeQ6/Qvse4tz0oILJ1Y1Djuqunbwwqr6IbNrGkeOaRg8saGiutFFkdGrED1/9Klf5xNi0ncXXyCHZ4npHID0U3e3177x5S1t7730SseHbz6+te2Du6c3tT6wbu0p1twNeOHxG18UkGo37Qa6bFn59HdmLqlqaDm5pmnkAhGXcfWDJ1bnctYO6enY25Vi3xKzpm/E11AJMekbX4ccPl7sl2Kj+s4az9HNG1/Zuun3zz3Xsen1dV2d79/y9I++pL+Iu9PTu7cs3li7dtt6b+39EoHajjR14QXjK+tbz64bOPZTjUOnT2sYPMmWwZh1EsD5Yq/ujCQ7PxGT/vv6TcmyTOwRsdhP6G2d7d7GN3/1Rvu7Gx7s2rLx5qfu//yT/bvoXo7nHvvbDRLV5bvMm7Lo0nm1TeNW1Q+asKR59NxRBv5b9Kz4eqHYT8UymRCT4rr9Ccm2SmxNcdmD5drW2bbl3Vd+8Vb7xlfXbe388Oqn77vEqFXHg0UTT+7nH/26Xh2qecP2P7q+ZcTCcxpapq1sGDRhfDwtFl2rLlp0jdi3xXSwlQSBogjoCaN3QHoas2aLQmd0Jh1s79mnxWzruMhXxZqMjgznjCVQKZ7pZWzPkw0xMba7inYsiJi0S606ZWBY0bWTEQI+BAbLfh0EzQsKYuIDyqLdxYiJDsbfLDbSorgSddXae2+JUurd2Lvy9USxtt67+eYogY0Slz7ZO05Mx82cmwYvMZFSJqArYukaKFyZpNwRETRf6Mpkg9S7WmxgBPVTBQT6JaADcIhJv5iMz5AXE/3joGNiOhWAO53Gd5tbDpZLOH/sVkiZjOYKiVpnq07LZPQEDQEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAgQQJ/D/LxtSxjmI1fwAAAABJRU5ErkJggg==",wE="account",WU=()=>lc(()=>!!window.dapp).catch(()=>!1);function AE(){return AE=(0,ke.Z)(function*(t){const e=yield t.getItem(wE);return window.dapp?{wallet:window.dapp,account:e||void 0}:{}}),AE.apply(this,arguments)}const ZU=function(){var t=(0,ke.Z)(function*({options:e,store:n,emitter:r,logger:u,storage:v,provider:O}){const Y=yield function GU(t){return AE.apply(this,arguments)}(v),$=function(){var je=(0,ke.Z)(function*(){if(Y.wallet){const Ue=yield Y.wallet.request("near",{method:"dapp:accounts"});return Ue.near?[Ue.near.address,Ue.near.pubKey]:[]}return[]});return function(){return je.apply(this,arguments)}}(),ie=function(){var je=(0,ke.Z)(function*({accountId:Ue,publicKey:$e}){if(u.log("validateAccessKey",{accountId:Ue,publicKey:$e}),!Y.wallet)throw new Error("Wallet is not installed");const Je=yield Y.wallet.request("near",{method:"query",params:{request_type:"view_access_key",finality:"final",account_id:Ue,public_key:$e}});if(u.log("validateAccessKey:accessKey",{accessKey:Je}),"FullAccess"!==Je.permission)throw new Error("Public key requires 'FullAccess' permission");return Je});return function($e){return je.apply(this,arguments)}}(),he=()=>Y.account?[{accountId:Y.account.accountId,publicKey:Y.account.publicKey}]:[],we=function(){var je=(0,ke.Z)(function*(){Y.account&&(v.removeItem(wE),delete Y.account),r.emit("signedOut",null)});return function(){return je.apply(this,arguments)}}(),xe=()=>{Y.wallet&&(Y.wallet.on("dapp:accountsChanged",function(){var je=(0,ke.Z)(function*(Ue){u.log("onAccountChange",Ue),yield we()});return function(Ue){return je.apply(this,arguments)}}()),Y.wallet.on("dapp:chainChanged",function(){var je=(0,ke.Z)(function*(Ue){u.log("onNetworkChange",Ue);const $e="near"===Ue.split(":")[1]?"mainnet":"testnet";e.network.networkId!==$e&&(yield we(),r.emit("networkChanged",{networkId:$e}))});return function(Ue){return je.apply(this,arguments)}}()))},Ce={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(je=(0,ke.Z)(function*(Ue){const Je=he().find(ht=>ht.accountId===Ue);if(!Je)throw new Error("Failed to find public key for account");return Jn.utils.PublicKey.from(Je.publicKey)}),function($e){return je.apply(this,arguments)}),signMessage:function(){var je=(0,ke.Z)(function*(Ue,$e){if(!Y.wallet)throw new Error("Wallet is not installed");if(!he().find(xt=>xt.accountId===$e))throw new Error("Failed to find account for signing");try{const xt=Jn.transactions.Transaction.decode(Buffer.from(Ue)),Wt=Buffer.from(xt.encode()).toString("hex"),An=yield Y.wallet.request("near",{method:"dapp:signTransaction",params:["0x"+Wt]});return{signature:Buffer.from(An[0].signature.substr(2),"hex"),publicKey:Jn.utils.PublicKey.from(An[0].publicKey)}}catch{const Wt=yield Y.wallet.request("near",{method:"dapp:signMessage",params:["0x"+Buffer.from(Ue).toString("hex")]});return{signature:Buffer.from(Wt[0].signature.substr(2),"hex"),publicKey:Jn.utils.PublicKey.from(Wt[0].publicKey)}}});return function($e,Je){return je.apply(this,arguments)}}()},Le=je=>{const Ue=he(),{contract:$e}=n.getState();if(!Ue.length||!$e)throw new Error("Wallet not signed in");return je.map(Je=>({signerId:Je.signerId||Ue[0].accountId,receiverId:Je.receiverId||$e.contractId,actions:Je.actions}))};var je;return{signIn:()=>(0,ke.Z)(function*(){const je=he();if(je.length)return je;Y.account&&(yield we());const Ue=yield $();if(!(yield ie({accountId:Ue[0],publicKey:Ue[1]})))throw we(),new Error(`Public key (${Ue[1]}) is not registered with the account '${Ue[0]}'.`);return yield v.setItem(wE,{accountId:Ue[0],publicKey:Ue[1]}),Y.account={accountId:Ue[0],publicKey:Ue[1]},xe(),he()})(),getAccounts:()=>(0,ke.Z)(function*(){return he()})(),signOut:we,verifyOwner:({message:je})=>(0,ke.Z)(function*(){if(u.log("verifyOwner",{message:je}),!Y.wallet)throw new Error("Wallet is not installed");const Ue=Y.account;if(!Ue)throw new Error("Wallet not signed in");const $e=Ue.accountId,Je=Jn.utils.PublicKey.fromString(Ue.publicKey),ht=yield O.block({finality:"final"}),xt={accountId:$e,message:je,blockId:ht.header.hash,publicKey:Buffer.from(Je.data).toString("base64"),keyType:Je.keyType},Wt=JSON.stringify(xt),An=yield Ce.signMessage(new Uint8Array(Buffer.from(Wt)),$e);return{...xt,signature:Buffer.from(An.signature).toString("base64")}})(),signMessage:je=>(0,ke.Z)(function*(){if(!Y.wallet)throw new Error("Wallet is not installed");const $e=(yield $())[0];if(!$e)throw new Error("Failed to find account for signing");const Je=(t=>{const e=new tE({...t});return Buffer.from((0,M8.serialize)(D8,e))})(je),ht=yield Y.wallet.request("near",{method:"dapp:signMessage",params:["0x"+Je.toString("hex")]}),xt={accountId:$e,publicKey:ht[0].publicKey,signature:Buffer.from(ht[0].signature.substr(2),"hex").toString("base64")};return je.state?{...xt,state:je.state}:xt})(),signAndSendTransaction:({signerId:je,receiverId:Ue,actions:$e})=>(0,ke.Z)(function*(){u.log("signAndSendTransaction",{signerId:je,receiverId:Ue,actions:$e});const{contract:Je}=n.getState();if(!he().length||!Je)throw new Error("Wallet not signed in");const[xt]=yield dc(Le([{signerId:je,receiverId:Ue,actions:$e}]),Ce,e.network);return O.sendTransaction(xt)})(),signAndSendTransactions:({transactions:je})=>(0,ke.Z)(function*(){u.log("signAndSendTransactions",{transactions:je});const Ue=yield dc(Le(je),Ce,e.network),$e=[];for(let Je=0;Je(0,ke.Z)(function*(){if(!Y.wallet)throw new Error("Wallet is not installed");const Ue=[];je.forEach(({privateKey:Je})=>{"ed25519:"===Je.slice(0,8)?Ue.push(Je.slice(8)):Ue.push(Je)});const $e={privateKey:Ue,network:e.network.networkId};yield Y.wallet.request("near",{method:"experimental:near:importPrivatekey",params:[$e]})})()}});return function(n){return t.apply(this,arguments)}}();function Q8({iconUrl:t=HU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){const n=K8()(),r=Ij(["chrome","edge-chromium","opera"]);if(n||!r)return null;const u=yield WU();return{id:"welldone-wallet",type:"injected",metadata:{name:"WELLDONE Wallet",description:"WELLDONE Wallet for Multichains",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/welldone-wallet/bmkakpenjmcpfhhjadflneinmhboecjf",deprecated:e,available:u},init:ZU}})}var YU=p(84960);const JU=function(){var t=(0,ke.Z)(function*(e){const{store:n,logger:r,emitter:u,options:v,defaultProvider:O,defaultStrategy:Y}=e,$=new YU.HereWallet({networkId:v.network.networkId,nodeUrl:v.network.nodeUrl,defaultProvider:O,defaultStrategy:Y});function ie(){return ue.apply(this,arguments)}function ue(){return(ue=(0,ke.Z)(function*(){r.log("HereWallet:getAccounts");const he=yield $.getAccounts(),we=[];for(let xe=0;xe`https://my.herewallet.app/import?network=${v.network.networkId}`,account:he=>(0,ke.Z)(function*(){return r.log("HereWallet:account"),yield $.account(he)})(),switchAccount:he=>(0,ke.Z)(function*(){r.log("HereWallet:switchAccount"),yield $.switchAccount(he)})(),getAccountId:()=>(0,ke.Z)(function*(){return r.log("HereWallet:getAccountId"),yield $.getAccountId()})(),isSignedIn:()=>(0,ke.Z)(function*(){return r.log("HereWallet:isSignedIn"),yield $.isSignedIn()})(),signIn:he=>(0,ke.Z)(function*(){r.log("HereWallet:signIn");const we=""!==he.contractId?he.contractId:void 0;return yield $.signIn({...he,contractId:we}),u.emit("signedIn",{contractId:he.contractId,methodNames:he.methodNames??[],accounts:yield ie()}),yield ie()})(),getHereBalance:()=>(0,ke.Z)(function*(){return r.log("HereWallet:getHereBalance"),yield $.getHereBalance()})(),getAvailableBalance:()=>(0,ke.Z)(function*(){return r.log("HereWallet:getAvailableBalance"),yield $.getAvailableBalance()})(),signOut:()=>(0,ke.Z)(function*(){r.log("HereWallet:signOut"),yield $.signOut()})(),getAccounts:()=>(0,ke.Z)(function*(){return ie()})(),signAndSendTransaction:he=>(0,ke.Z)(function*(){r.log("HereWallet:signAndSendTransaction",he);const{contract:we}=n.getState();if(!$.isSignedIn||!we)throw new Error("Wallet not signed in");return yield $.signAndSendTransaction({receiverId:we.contractId,...he})})(),verifyOwner:()=>(0,ke.Z)(function*(){throw Error("HereWallet:verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})(),signMessage:he=>(0,ke.Z)(function*(){return r.log("HereWallet:signMessage",he),yield $.signMessage(he)})(),signAndSendTransactions:he=>(0,ke.Z)(function*(){return r.log("HereWallet:signAndSendTransactions",he),yield $.signAndSendTransactions(he)})()}});return function(n){return t.apply(this,arguments)}}(),QU="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOS43MzM1IDExLjY4MzFMMjEuNzA4OSA4TDI0LjI5ODMgMTYuNjc2NkwyMC40MTYgMTQuOTIxNUwxOS43MzM1IDExLjY4MzFaTTUuNzYzODggMTUuNTQwOUwzLjc1NTYyIDE5LjE2MjFMOS44OTYwNSAyMi4xNjYxTDE4LjM0NzMgMjEuNTgyOEw1Ljc2Mzg4IDE1LjU0MDlaTTQuNjQ0NjQgMjIuMzY5NEwyLjY0ODY1IDI1Ljk3MTNMMTQuOTA4MyAzMi4wNTc1TDM1LjMzODggMzAuODE3NEwzNy4zMzQ4IDI3LjIxNTRMMTYuOTA0MyAyOC40NTU3TDQuNjQ0NjQgMjIuMzY5NFoiIGZpbGw9IiMyQzMwMzQiLz4KPHBhdGggZD0iTTM3LjMzNTkgMjcuMjE1N0wxNi45MTEyIDI4LjQ1NjFMNC41NDYzMyAyMi4zNTU0TDE3LjkzNTggMjEuNTQ1M0w1Ljc2Mzg3IDE1LjU0MDlMMTEuNzQxIDEwLjQ3ODZMMjQuMTQwMSAxNi41NzYzTDIxLjcwOSA4TDMzLjU1NyAxMy44MUwzNy4zMzU5IDI3LjIxNTdaIiBmaWxsPSIjRkRCRjFDIi8+Cjwvc3ZnPgo=";function X8({deprecated:t=!1,iconUrl:e=QU,defaultStrategy:n,defaultProvider:r}={}){return(0,ke.Z)(function*(){return{id:"here-wallet",type:"injected",metadata:{name:"Here Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!0,downloadUrl:"https://herewallet.app",iconUrl:e,deprecated:t,available:!0},init:u=>JU({...u,defaultStrategy:n,defaultProvider:r})}})}const eK=function(){var t=(0,ke.Z)(function*({metadata:e,options:n,store:r,provider:u,logger:v}){const O={wallet:window.coin98},Y=function(){var ie=(0,ke.Z)(function*(){const ue=O.wallet.near.account;if(!ue)return[];const he=yield O.wallet.near.signer.getPublicKey(ue,n.network.networkId);return[{accountId:ue,publicKey:he?he.toString():void 0}]});return function(){return ie.apply(this,arguments)}}(),$=ie=>{const{contract:ue}=r.getState();if(!ue)throw new Error("Wallet not signed in");const he=Df(r.getState());if(!he)throw new Error("No active account");return ie.map(we=>({signerId:we.signerId||he.accountId,receiverId:we.receiverId||ue.contractId,actions:we.actions}))};return{signIn:({contractId:ie})=>(0,ke.Z)(function*(){const ue=yield Y();return ue.length?ue:(yield O.wallet.near.connect({prefix:"near_selector",contractId:ie}),Y())})(),signOut:()=>(0,ke.Z)(function*(){yield O.wallet.near.disconnect()})(),getAccounts:()=>(0,ke.Z)(function*(){return Y()})(),verifyOwner:()=>(0,ke.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:ie,receiverId:ue,actions:he})=>(0,ke.Z)(function*(){v.log("signAndSendTransaction",{signerId:ie,receiverId:ue,actions:he});const we=yield dc($([{signerId:ie,receiverId:ue,actions:he}]),O.wallet.near.signer,n.network);return u.sendTransaction(we[0])})(),signAndSendTransactions:({transactions:ie})=>(0,ke.Z)(function*(){v.log("signAndSendTransactions",{transactions:ie});const ue=yield dc($(ie),O.wallet.near.signer,n.network);v.log("signAndSendTransactions:signedTransactions",ue);const he=[];for(let we=0;we(0,ke.Z)(function*(){if((0,Wa.isMobile)())return null;const r=!!window.coin98;return{id:"coin98-wallet",type:"injected",metadata:{name:"Coin98 Wallet",description:"Using a Decentralized Wallet With Experiences of a Centralized One",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoe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ECLEQu4FqkV+kGeqEuAquUP5dozoh8oHXKKjx4KrSNDbACWAiE7A3+wVMmZfc2H2AFsBCIFMBVp6TelrPKadVZxgoLRxGIdL0AHnpdV4JtbPKGFZY1IBCpRMui5JXyE93TqoEVwEIg5IarVXj4dZ7f4j24TGAFsBAI+V8UD79eVbqnVVvACmAhEJKj9YZFqfvDxGoWsUrj3lIAC4FYGS6z8MgbwTY2LWAFsBAI+V8oj7xhUHqnVfMwEVgBLARCfrje5FN8gmPIgBXAQiAkf9H85E2LUleCbWzSiBU/5mDhKAKRJ7hMyml65fOOp2aqsMKOowhEXuF6yyg8+hb3tvxtbIAVwEIgZH8xPfrWoj9MXARWAAuBSANaFuUcuTBBOBjACmAhEPK/sB57q1V4zFp6WjWwAlgIhLxwWXXKYBmEBawAFgKRBrh0f/1WVQqsHAXbyyAQiBVebCcti7L3tGpRWKGHhUAghoPrtwalt43NkvVbSWKFhaMIBGJ4uGh4GN7GBlgBLARC5hfg47+1KHUChOGqAyuAhUCkAK7fmZTTZMmA06qBFcBCIGR8Qf70dwZldxsbYAWwEIgUwFVV3Nt8nMXYsMKyBgQCESFaVuGnb/ecVp1nrAAWApGGF2nzbZNycsxbv2XmFSuAhUCkKMaabxuUGwgc6nU5Vt6wAlgIRBrhar0dbGNTXR9WWDiKQCASQet/LErvtGqe38oBVgALgUg/XC3K0DY2a8LKTN3/F085ApGdcHb+nk5vjlOWVsNq7Of/twE9LAQCIa4H8rP/1f1hYnUFrHhfruk0/v/+X4ABAA6s0eytIzCSAAAAAElFTkSuQmCC",nK=()=>lc(()=>!!window.nearFiWallet?.isNearFi,{timeout:200}).catch(()=>!1),iK=function(){var t=(0,ke.Z)(function*({options:e,metadata:n,store:r,emitter:u,logger:v}){const O={wallet:window.nearFiWallet},Y=function(){var xe=(0,ke.Z)(function*(){if(!O.wallet.isSignedIn())return;const Ce=yield O.wallet.signOut();if(!0===Ce)return;const Le=new Error("string"==typeof Ce.error?Ce.error:Ce.error.type);if("User reject"===Le.message)throw Le;v.log("Failed to sign out"),v.error(Le)});return function(){return xe.apply(this,arguments)}}(),$=()=>{O.wallet.on("accountChanged",function(){var xe=(0,ke.Z)(function*(Ce){v.log("onAccountChange",Ce),u.emit("signedOut",null)});return function(Ce){return xe.apply(this,arguments)}}()),O.wallet.on("rpcChanged",function(){var xe=(0,ke.Z)(function*(Ce){v.log("onNetworkChange",Ce),e.network.networkId!==Ce.networkId&&(yield Y(),u.emit("signedOut",null),u.emit("networkChanged",{networkId:Ce.networkId}))});return function(Ce){return xe.apply(this,arguments)}}())},ie=function(){var xe=(0,ke.Z)(function*(){let Ce=O.wallet.getAccountId();return Ce||(yield O.wallet.resolveSignInState(),Ce=O.wallet.getAccountId(),Ce)?[{accountId:Ce}]:[]});return function(){return xe.apply(this,arguments)}}(),he=xe=>{if(!(xe=>xe.every(Ce=>"FunctionCall"===Ce.type))(xe))throw new Error(`Only 'FunctionCall' actions types are supported by ${n.name}`);return xe.map(Le=>Le.params)},we=xe=>xe.map(Ce=>({receiverId:Ce.receiverId,actions:he(Ce.actions)}));return O.wallet&&O.wallet.isSignedIn()&&$(),{signIn:({contractId:xe,methodNames:Ce})=>(0,ke.Z)(function*(){const Le=yield ie();if(Le.length)return Le;const{accessKey:je,error:Ue}=yield O.wallet.requestSignIn({contractId:xe,methodNames:Ce});if(!je||Ue)throw yield Y(),new Error(("string"==typeof Ue?Ue:Ue.type)||"Failed to sign in");return $(),yield ie()})(),signOut:Y,getAccounts:()=>(0,ke.Z)(function*(){return yield ie()})(),verifyOwner:({message:xe})=>(0,ke.Z)(function*(){throw v.log("NearFi:verifyOwner",{message:xe}),new Error(`Method not supported by ${n.name}`)})(),signAndSendTransaction:({signerId:xe,receiverId:Ce,actions:Le})=>(0,ke.Z)(function*(){v.log("signAndSendTransaction",{signerId:xe,receiverId:Ce,actions:Le});const{contract:je}=r.getState();if(!O.wallet.isSignedIn()||!je)throw new Error("Wallet not signed in");return O.wallet.signAndSendTransaction({receiverId:Ce||je.contractId,actions:he(Le)}).then(Ue=>{if(Ue.error)throw new Error(Ue.error);if(!Ue.response?.length)throw new Error("Invalid response");return Ue.response[0]})})(),signAndSendTransactions:({transactions:xe})=>(0,ke.Z)(function*(){if(v.log("signAndSendTransactions",{transactions:xe}),!O.wallet.isSignedIn())throw new Error("Wallet not signed in");return O.wallet.requestSignTransactions({transactions:we(xe)}).then(Ce=>{if(Ce.error)throw new Error(Ce.error);if(!Ce.response?.length)throw new Error("Invalid response");return Ce.response})})()}});return function(n){return t.apply(this,arguments)}}();function $8({iconUrl:t=tK,deprecated:e=!1}={}){return(0,ke.Z)(function*(){const n=(0,Wa.isMobile)(),r=yield nK();return n&&r?{id:"nearfi",type:"injected",metadata:{name:"NearFi",description:"Your NEAR DeFi experience On The Go",iconUrl:t,downloadUrl:"https://nearfi.finance",deprecated:e,available:r},init:iK}:null})}var EE=p(72487);const SE=new EE.NearSnap,oK=function(){var t=(0,ke.Z)(function*(e){const{store:n,logger:r,options:u}=e,v=u.network.networkId;let O=yield EE.NearSnapAccount.restore({network:v,snap:SE});return{isSignedIn:()=>(0,ke.Z)(function*(){return r.log("NearSnap:isSignedIn"),null!=O})(),signIn:({contractId:Y,methodNames:$})=>(0,ke.Z)(function*(){return r.log("NearSnap:signIn"),O=yield EE.NearSnapAccount.connect({contractId:""===Y?void 0:Y,methods:$,network:v,snap:SE}),[{accountId:O.accountId}]})(),signOut:()=>(0,ke.Z)(function*(){r.log("NearSnap:signOut"),yield O?.disconnect()})(),getAccounts:()=>(0,ke.Z)(function*(){return O?[{accountId:O.accountId}]:[]})(),signAndSendTransaction:Y=>(0,ke.Z)(function*(){if(r.log("NearSnap:signAndSendTransaction",Y),null==O)throw new Error("Wallet not signed in");const{contract:$}=n.getState(),ie=Y.receiverId??$?.contractId;if(null==ie)throw new Error("ReceiverId is not defined");return yield O.executeTransaction({receiverId:ie,...Y})})(),signMessage:({message:Y,nonce:$,recipient:ie})=>(0,ke.Z)(function*(){if(null==O)throw new Error("Wallet not signed in");return yield O.signMessage({message:Y,nonce:$,recipient:ie})})(),verifyOwner:()=>(0,ke.Z)(function*(){throw Error("NearSnap:verifyOwner is not released yet")})(),signAndSendTransactions:({transactions:Y})=>(0,ke.Z)(function*(){if(r.log("NearSnap:signAndSendTransactions",{transactions:Y}),null==O)throw new Error("Wallet not signed in");return yield O.executeTransactions(Y)})()}});return function(n){return t.apply(this,arguments)}}(),sK="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIGlkPSJMYXllcl8xIiB4PSIwIiB5PSIwIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAzMTguNiAzMTguNiI+CiAgPHN0eWxlPgogICAgLnN0MSwuc3Q2e2ZpbGw6I2U0NzYxYjtzdHJva2U6I2U0NzYxYjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmR9LnN0NntmaWxsOiNmNjg1MWI7c3Ryb2tlOiNmNjg1MWJ9CiAgPC9zdHlsZT4KICA8cGF0aCBmaWxsPSIjZTI3NjFiIiBzdHJva2U9IiNlMjc2MWIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTI3NC4xIDM1LjUtOTkuNSA3My45TDE5MyA2NS44eiIvPgogIDxwYXRoIGQ9Im00NC40IDM1LjUgOTguNyA3NC42LTE3LjUtNDQuM3ptMTkzLjkgMTcxLjMtMjYuNSA0MC42IDU2LjcgMTUuNiAxNi4zLTU1LjN6bS0yMDQuNC45TDUwLjEgMjYzbDU2LjctMTUuNi0yNi41LTQwLjZ6IiBjbGFzcz0ic3QxIi8+CiAgPHBhdGggZD0ibTEwMy42IDEzOC4yLTE1LjggMjMuOSA1Ni4zIDIuNS0yLTYwLjV6bTExMS4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IDUyLjMtMTUuMyAzNy0zMS4zLTk2LjItNzEuNHoiLz4KICA8cGF0aCBkPSJtMjY3LjIgMTUzLjUtNTIuMy0xNS4zIDE1LjkgMjMuOS0yMy43IDQ2IDMxLjItLjRoNDYuNXptLTE2My42LTE1LjMtNTIuMyAxNS4zLTE3LjQgNTQuMmg0Ni40bDMxLjEuNC0yMy42LTQ2em03MSAyNi40IDMuMy01Ny43IDE1LjItNDEuMWgtNjcuNWwxNSA0MS4xIDMuNSA1Ny43IDEuMiAxOC4yLjEgNDQuOGgyNy43bC4yLTQ0Ljh6IiBjbGFzcz0ic3Q2Ii8+Cjwvc3ZnPg==";function aK({deprecated:t=!1,iconUrl:e=sK}={}){return(0,ke.Z)(function*(){return(0,Wa.isMobile)()?null:{id:"near-snap",type:"injected",init:oK,metadata:{name:"Near Snap",description:"Metamask Snap for NEAR Protocol",downloadUrl:"https://near-snap.surge.sh",available:yield SE.provider.isSnapsAvailable(),deprecated:t,iconUrl:e}}})}var uK=p(35469),_E=p.n(uK);const cK="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABiCAYAAACmu3ZJAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAEqVJREFUeJztnHtUVXWbx797n/uBIxcvwNG4CGqCikZKpIFKr5TayItm5qsD1Vuu0bIsXSOrSJmVjk6OC8fpNisTWWW6alLGZLQy31ReFRIjSxAvIAYCcr+c+9nP/MFIL3I4Z1/O4eb7WWv/wTl7P8+zn+/ev9/zuxwYIiLcQ1VVFT799FMcPXoU169fR21tLex2O2QyGQICAhAaGor58+dj2bJlCA8Pv/fyIU1paSlycnLw/fff4+rVq2hpacGoUaMwduxYLFiwAMuXL0dISIh4B/Q3mM1mSk9PJ41GQwBcHnK5nNatW0etra001Kmvr6fU1FRiWdZpTpRKJa1bt446OjpE+ekSpKGhgeLj43kJce8xbdo0qq+vd9vNDzRKSkooLCxMU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tHH78VXiJCwBaDYMXF+t6TK0w5GDzVG1tLT7//HMcPXoUpaWlqK2thbe3N8aPH4/ExESkpqZi/PjxogLpLyxWwr/va3H5+wxnTAhVYH2qL85dMsFsIRw9ZRC8Kgh0LoS9+icfRIb3HCs5FGSo0mEkbPukmdcva3tjyR+84KNjkX/RhNJy4eIyDPDnlGFd444e399PggCdouz6rEXQSt7fIpMBM6JUOHfJLLiqksuA5/84DLGTex8f3XeCAJ0zux9/1YaiEnHtvxiGebFY9fQwPBjmfOX0vhQE6OyoT5w34r+/6xA11SGEyLFK/DlFBx8e5fd9K8hd6pvtOPC/HbhY6v63xVfHYuk8b8T20l844r4X5C7lVTYcPWVAcZlZ0KKSI0b4yZD0qAaPPaTu8SMfV/xdkHtoaeNw/pIZxWVmXL9lg9XGLz2j/GWIDFcidrIK44IVon4QCvxdEKdYrITfam1dy7NmC8FsJbAMA7WK6dw6NEKG0aPk8Bvmnlnu/wNWcf8As19BPQAAAABJRU5ErkJggg==";let eD=!1,tD=!1;const ab={debug:1,default:2,info:2,warning:3,error:4,off:5};let nD=ab.default,ME=null;const rD=function fK(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var DE,Du;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(DE||(DE={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(Du||(Du={}));const iD="0123456789abcdef";class zt{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,n){const r=e.toLowerCase();null==ab[r]&&this.throwArgumentError("invalid log level name","logLevel",e),!(nD>ab[r])&&console.log.apply(console,n)}debug(...e){this._log(zt.levels.DEBUG,e)}info(...e){this._log(zt.levels.INFO,e)}warn(...e){this._log(zt.levels.WARNING,e)}makeError(e,n,r){if(tD)return this.makeError("censored error",n,{});n||(n=zt.errors.UNKNOWN_ERROR),r||(r={});const u=[];Object.keys(r).forEach($=>{const ie=r[$];try{if(ie instanceof Uint8Array){let ue="";for(let he=0;he>4],ue+=iD[15&ie[he]];u.push($+"=Uint8Array(0x"+ue+")")}else u.push($+"="+JSON.stringify(ie))}catch{u.push($+"="+JSON.stringify(r[$].toString()))}}),u.push(`code=${n}`),u.push(`version=${this.version}`);const v=e;let O="";switch(n){case Du.NUMERIC_FAULT:{O="NUMERIC_FAULT";const $=e;switch($){case"overflow":case"underflow":case"division-by-zero":O+="-"+$;break;case"negative-power":case"negative-width":O+="-unsupported";break;case"unbound-bitwise-result":O+="-unbound-result"}break}case Du.CALL_EXCEPTION:case Du.INSUFFICIENT_FUNDS:case Du.MISSING_NEW:case Du.NONCE_EXPIRED:case Du.REPLACEMENT_UNDERPRICED:case Du.TRANSACTION_REPLACED:case Du.UNPREDICTABLE_GAS_LIMIT:O=n}O&&(e+=" [ See: https://links.ethers.org/v5-errors-"+O+" ]"),u.length&&(e+=" ("+u.join(", ")+")");const Y=new Error(e);return Y.reason=v,Y.code=n,Object.keys(r).forEach(function($){Y[$]=r[$]}),Y}throwError(e,n,r){throw this.makeError(e,n,r)}throwArgumentError(e,n,r){return this.throwError(e,zt.errors.INVALID_ARGUMENT,{argument:n,value:r})}assert(e,n,r,u){e||this.throwError(n,r,u)}assertArgument(e,n,r,u){e||this.throwArgumentError(n,r,u)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),rD&&this.throwError("platform missing String.prototype.normalize",zt.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:rD})}checkSafeUint53(e,n){"number"==typeof e&&(null==n&&(n="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(n,zt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(n,zt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,n,r){r=r?": "+r:"",en&&this.throwError("too many arguments"+r,zt.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:n})}checkNew(e,n){(e===Object||null==e)&&this.throwError("missing new",zt.errors.MISSING_NEW,{name:n.name})}checkAbstract(e,n){e===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.name)+" directly; use a sub-class",zt.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",zt.errors.MISSING_NEW,{name:n.name})}static globalLogger(){return ME||(ME=new zt("logger/5.7.0")),ME}static setCensorship(e,n){if(!e&&n&&this.globalLogger().throwError("cannot permanently disable censorship",zt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),eD){if(!e)return;this.globalLogger().throwError("error censorship permanent",zt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}tD=!!e,eD=!!n}static setLogLevel(e){const n=ab[e.toLowerCase()];null!=n?nD=n:zt.globalLogger().warn("invalid log level - "+e)}static from(e){return new zt(e)}}zt.errors=Du,zt.levels=DE;const Ui=new zt("bytes/5.7.0");function oD(t){return!!t.toHexString}function wp(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return wp(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function IE(t){return gi(t)&&!(t.length%2)||ub(t)}function sD(t){return"number"==typeof t&&t==t&&t%1==0}function ub(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t||!sD(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function _r(t,e){if(e||(e={}),"number"==typeof t){Ui.checkSafeUint53(t,"invalid arrayify value");const n=[];for(;t;)n.unshift(255&t),t=parseInt(String(t/256));return 0===n.length&&n.push(0),wp(new Uint8Array(n))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),oD(t)&&(t=t.toHexString()),gi(t)){let n=t.substring(2);n.length%2&&("left"===e.hexPad?n="0"+n:"right"===e.hexPad?n+="0":Ui.throwArgumentError("hex data is odd-length","value",t));const r=[];for(let u=0;u_r(u)),n=e.reduce((u,v)=>u+v.length,0),r=new Uint8Array(n);return e.reduce((u,v)=>(r.set(v,u),u+v.length),0),wp(r)}function Ap(t){let e=_r(t);if(0===e.length)return e;let n=0;for(;n>4]+CE[15&u]}return n}return Ui.throwArgumentError("invalid hexlify value","value",t)}function oh(t){if("string"!=typeof t)t=pr(t);else if(!gi(t)||t.length%2)return null;return(t.length-2)/2}function Ms(t,e,n){return"string"!=typeof t?t=pr(t):(!gi(t)||t.length%2)&&Ui.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=n?"0x"+t.substring(e,2+2*n):"0x"+t.substring(e)}function ma(t){let e="0x";return t.forEach(n=>{e+=pr(n).substring(2)}),e}function xE(t){const e=function pK(t){"string"!=typeof t&&(t=pr(t)),gi(t)||Ui.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Ui.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function cm(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(IE(t)){let n=_r(t);64===n.length?(e.v=27+(n[32]>>7),n[32]&=127,e.r=pr(n.slice(0,32)),e.s=pr(n.slice(32,64))):65===n.length?(e.r=pr(n.slice(0,32)),e.s=pr(n.slice(32,64)),e.v=n[64]):Ui.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:Ui.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(n[32]|=128),e._vs=pr(n.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const u=function hK(t,e){(t=_r(t)).length>e&&Ui.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(e);return n.set(t,e-t.length),wp(n)}(_r(e._vs),32);e._vs=pr(u);const v=u[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=v:e.recoveryParam!==v&&Ui.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),u[0]&=127;const O=pr(u);null==e.s?e.s=O:e.s!==O&&Ui.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?Ui.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const u=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==u&&Ui.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&gi(e.r)?e.r=ro(e.r,32):Ui.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&gi(e.s)?e.s=ro(e.s,32):Ui.throwArgumentError("signature missing or invalid s","signature",t);const n=_r(e.s);n[0]>=128&&Ui.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(n[0]|=128);const r=pr(n);e._vs&&(gi(e._vs)||Ui.throwArgumentError("signature invalid _vs","signature",t),e._vs=ro(e._vs,32)),null==e._vs?e._vs=r:e._vs!==r&&Ui.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}var gK=p(54237),yK=p.n(gK);function No(t){return"0x"+yK().keccak_256(_r(t))}const aD=new zt("strings/5.7.0");var lm,va;function uD(t,e,n,r,u){if(t===va.BAD_PREFIX||t===va.UNEXPECTED_CONTINUE){let v=0;for(let O=e+1;O>6==2;O++)v++;return v}return t===va.OVERRUN?n.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(lm||(lm={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(va||(va={}));const wK=Object.freeze({error:function vK(t,e,n,r,u){return aD.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",n)},ignore:uD,replace:function bK(t,e,n,r,u){return t===va.OVERLONG?(r.push(u),0):(r.push(65533),uD(t,e,n))}});function TE(t,e){null==e&&(e=wK.error),t=_r(t);const n=[];let r=0;for(;r>7)){n.push(u);continue}let v=null,O=null;if(192==(224&u))v=1,O=127;else if(224==(240&u))v=2,O=2047;else{if(240!=(248&u)){r+=e(128==(192&u)?va.UNEXPECTED_CONTINUE:va.BAD_PREFIX,r-1,t,n);continue}v=3,O=65535}if(r-1+v>=t.length){r+=e(va.OVERRUN,r-1,t,n);continue}let Y=u&(1<<8-v-1)-1;for(let $=0;$1114111){r+=e(va.OUT_OF_RANGE,r-1-v,t,n,Y);continue}if(Y>=55296&&Y<=57343){r+=e(va.UTF16_SURROGATE,r-1-v,t,n,Y);continue}if(Y<=O){r+=e(va.OVERLONG,r-1-v,t,n,Y);continue}n.push(Y)}}return n}function hl(t,e=lm.current){e!=lm.current&&(aD.checkNormalize(),t=t.normalize(e));let n=[];for(let r=0;r>6|192),n.push(63&u|128);else if(55296==(64512&u)){r++;const v=t.charCodeAt(r);if(r>=t.length||56320!=(64512&v))throw new Error("invalid utf-8 string");const O=65536+((1023&u)<<10)+(1023&v);n.push(O>>18|240),n.push(O>>12&63|128),n.push(O>>6&63|128),n.push(63&O|128)}else n.push(u>>12|224),n.push(u>>6&63|128),n.push(63&u|128)}return _r(n)}function cb(t,e){return function AK(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join("")}(TE(t,e))}function PE(t){return No(hl(t))}var _K=function(t,e,n,r){return new(n||(n=Promise))(function(v,O){function Y(ue){try{ie(r.next(ue))}catch(he){O(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){O(he)}}function ie(ue){ue.done?v(ue.value):function u(v){return v instanceof n?v:new n(function(O){O(v)})}(ue.value).then(Y,$)}ie((r=r.apply(t,e||[])).next())})};const lb=new zt("properties/5.7.0");function Pr(t,e,n){Object.defineProperty(t,e,{enumerable:!0,value:n,writable:!1})}function fm(t,e){for(let n=0;n<32;n++){if(t[e])return t[e];if(!t.prototype||"object"!=typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function Ro(t){return _K(this,void 0,void 0,function*(){const e=Object.keys(t).map(r=>{const u=t[r];return Promise.resolve(u).then(v=>({key:r,value:v}))});return(yield Promise.all(e)).reduce((r,u)=>(r[u.key]=u.value,r),{})})}function Gs(t){const e={};for(const n in t)e[n]=t[n];return e}const DK={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function cD(t){if(null==t||DK[typeof t])return!0;if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let n=0;nsh(e)));if("object"==typeof t){const e={};for(const n in t){const r=t[n];void 0!==r&&Pr(e,n,sh(r))}return e}return lb.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function sh(t){return IK(t)}class CK{constructor(e){for(const n in e)this[n]=sh(e[n])}}const fb="providers/5.7.2";var Iu=function(t,e,n,r){return new(n||(n=Promise))(function(v,O){function Y(ue){try{ie(r.next(ue))}catch(he){O(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){O(he)}}function ie(ue){ue.done?v(ue.value):function u(v){return v instanceof n?v:new n(function(O){O(v)})}(ue.value).then(Y,$)}ie((r=r.apply(t,e||[])).next())})};const Ga=new zt("abstract-signer/5.7.0"),TK=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],OK=[zt.errors.INSUFFICIENT_FUNDS,zt.errors.NONCE_EXPIRED,zt.errors.REPLACEMENT_UNDERPRICED];class NE{constructor(){Ga.checkAbstract(new.target,NE),Pr(this,"_isSigner",!0)}getBalance(e){return Iu(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Iu(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Iu(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const n=yield Ro(this.checkTransaction(e));return yield this.provider.estimateGas(n)})}call(e,n){return Iu(this,void 0,void 0,function*(){this._checkProvider("call");const r=yield Ro(this.checkTransaction(e));return yield this.provider.call(r,n)})}sendTransaction(e){return Iu(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const n=yield this.populateTransaction(e),r=yield this.signTransaction(n);return yield this.provider.sendTransaction(r)})}getChainId(){return Iu(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Iu(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Iu(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Iu(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const r in e)-1===TK.indexOf(r)&&Ga.throwArgumentError("invalid transaction key: "+r,"transaction",e);const n=Gs(e);return null==n.from?n.from=this.getAddress():n.from=Promise.all([Promise.resolve(n.from),this.getAddress()]).then(r=>(r[0].toLowerCase()!==r[1].toLowerCase()&&Ga.throwArgumentError("from address mismatch","transaction",e),r[0])),n}populateTransaction(e){return Iu(this,void 0,void 0,function*(){const n=yield Ro(this.checkTransaction(e));null!=n.to&&(n.to=Promise.resolve(n.to).then(u=>Iu(this,void 0,void 0,function*(){if(null==u)return null;const v=yield this.resolveName(u);return null==v&&Ga.throwArgumentError("provided ENS name resolves to null","tx.to",u),v})),n.to.catch(u=>{}));const r=null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas;if(null==n.gasPrice||2!==n.type&&!r?(0===n.type||1===n.type)&&r&&Ga.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):Ga.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==n.type&&null!=n.type||null==n.maxFeePerGas||null==n.maxPriorityFeePerGas)if(0===n.type||1===n.type)null==n.gasPrice&&(n.gasPrice=this.getGasPrice());else{const u=yield this.getFeeData();if(null==n.type)if(null!=u.maxFeePerGas&&null!=u.maxPriorityFeePerGas)if(n.type=2,null!=n.gasPrice){const v=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=v,n.maxPriorityFeePerGas=v}else null==n.maxFeePerGas&&(n.maxFeePerGas=u.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=u.maxPriorityFeePerGas);else null!=u.gasPrice?(r&&Ga.throwError("network does not support EIP-1559",zt.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==n.gasPrice&&(n.gasPrice=u.gasPrice),n.type=0):Ga.throwError("failed to get consistent fee data",zt.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===n.type&&(null==n.maxFeePerGas&&(n.maxFeePerGas=u.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=u.maxPriorityFeePerGas))}else n.type=2;return null==n.nonce&&(n.nonce=this.getTransactionCount("pending")),null==n.gasLimit&&(n.gasLimit=this.estimateGas(n).catch(u=>{if(OK.indexOf(u.code)>=0)throw u;return Ga.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",zt.errors.UNPREDICTABLE_GAS_LIMIT,{error:u,tx:n})})),null==n.chainId?n.chainId=this.getChainId():n.chainId=Promise.all([Promise.resolve(n.chainId),this.getChainId()]).then(u=>(0!==u[1]&&u[0]!==u[1]&&Ga.throwArgumentError("chainId address mismatch","transaction",e),u[0])),yield Ro(n)})}_checkProvider(e){this.provider||Ga.throwError("missing provider",zt.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}var dm=fr().BN;const pl=new zt("bignumber/5.7.0"),RE={},fD=9007199254740991;let dD=!1;class Un{constructor(e,n){e!==RE&&pl.throwError("cannot call constructor directly; use BigNumber.from",zt.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=n,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Zs(xr(this).fromTwos(e))}toTwos(e){return Zs(xr(this).toTwos(e))}abs(){return"-"===this._hex[0]?Un.from(this._hex.substring(1)):this}add(e){return Zs(xr(this).add(xr(e)))}sub(e){return Zs(xr(this).sub(xr(e)))}div(e){return Un.from(e).isZero()&&Za("division-by-zero","div"),Zs(xr(this).div(xr(e)))}mul(e){return Zs(xr(this).mul(xr(e)))}mod(e){const n=xr(e);return n.isNeg()&&Za("division-by-zero","mod"),Zs(xr(this).umod(n))}pow(e){const n=xr(e);return n.isNeg()&&Za("negative-power","pow"),Zs(xr(this).pow(n))}and(e){const n=xr(e);return(this.isNegative()||n.isNeg())&&Za("unbound-bitwise-result","and"),Zs(xr(this).and(n))}or(e){const n=xr(e);return(this.isNegative()||n.isNeg())&&Za("unbound-bitwise-result","or"),Zs(xr(this).or(n))}xor(e){const n=xr(e);return(this.isNegative()||n.isNeg())&&Za("unbound-bitwise-result","xor"),Zs(xr(this).xor(n))}mask(e){return(this.isNegative()||e<0)&&Za("negative-width","mask"),Zs(xr(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Za("negative-width","shl"),Zs(xr(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Za("negative-width","shr"),Zs(xr(this).shrn(e))}eq(e){return xr(this).eq(xr(e))}lt(e){return xr(this).lt(xr(e))}lte(e){return xr(this).lte(xr(e))}gt(e){return xr(this).gt(xr(e))}gte(e){return xr(this).gte(xr(e))}isNegative(){return"-"===this._hex[0]}isZero(){return xr(this).isZero()}toNumber(){try{return xr(this).toNumber()}catch{Za("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return pl.throwError("this platform does not support BigInt",zt.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?dD||(dD=!0,pl.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?pl.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",zt.errors.UNEXPECTED_ARGUMENT,{}):pl.throwError("BigNumber.toString does not accept parameters",zt.errors.UNEXPECTED_ARGUMENT,{})),xr(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Un)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new Un(RE,hm(e)):e.match(/^-?[0-9]+$/)?new Un(RE,hm(new dm(e))):pl.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&Za("underflow","BigNumber.from",e),(e>=fD||e<=-fD)&&Za("overflow","BigNumber.from",e),Un.from(String(e));const n=e;if("bigint"==typeof n)return Un.from(n.toString());if(ub(n))return Un.from(pr(n));if(n)if(n.toHexString){const r=n.toHexString();if("string"==typeof r)return Un.from(r)}else{let r=n._hex;if(null==r&&"BigNumber"===n.type&&(r=n.hex),"string"==typeof r&&(gi(r)||"-"===r[0]&&gi(r.substring(1))))return Un.from(r)}return pl.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function hm(t){if("string"!=typeof t)return hm(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&pl.throwArgumentError("invalid hex","value",t),"0x00"===(t=hm(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function Zs(t){return Un.from(hm(t))}function xr(t){const e=Un.from(t).toHexString();return"-"===e[0]?new dm("-"+e.substring(3),16):new dm(e.substring(2),16)}function Za(t,e,n){const r={fault:t,operation:e};return null!=n&&(r.value=n),pl.throwError(t,zt.errors.NUMERIC_FAULT,r)}const hc=new zt("rlp/5.7.0");function hD(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function pD(t,e,n){let r=0;for(let u=0;ue+1+r&&hc.throwError("child data too short",zt.errors.BUFFER_OVERRUN,{})}return{consumed:1+r,result:u}}function mD(t,e){if(0===t.length&&hc.throwError("data too short",zt.errors.BUFFER_OVERRUN,{}),t[e]>=248){const n=t[e]-247;e+1+n>t.length&&hc.throwError("data short segment too short",zt.errors.BUFFER_OVERRUN,{});const r=pD(t,e+1,n);return e+1+n+r>t.length&&hc.throwError("data long segment too short",zt.errors.BUFFER_OVERRUN,{}),yD(t,e,e+1+n,n+r)}if(t[e]>=192){const n=t[e]-192;return e+1+n>t.length&&hc.throwError("data array too short",zt.errors.BUFFER_OVERRUN,{}),yD(t,e,e+1,n)}if(t[e]>=184){const n=t[e]-183;e+1+n>t.length&&hc.throwError("data array too short",zt.errors.BUFFER_OVERRUN,{});const r=pD(t,e+1,n);e+1+n+r>t.length&&hc.throwError("data array too short",zt.errors.BUFFER_OVERRUN,{});return{consumed:1+n+r,result:pr(t.slice(e+1+n,e+1+n+r))}}if(t[e]>=128){const n=t[e]-128;e+1+n>t.length&&hc.throwError("data too short",zt.errors.BUFFER_OVERRUN,{});return{consumed:1+n,result:pr(t.slice(e+1,e+1+n))}}return{consumed:1,result:pr(t[e])}}function kE(t){const e=_r(t),n=mD(e,0);return n.consumed!==e.length&&hc.throwArgumentError("invalid rlp data","data",t),n.result}const Cf=new zt("address/5.7.0");function vD(t){gi(t,20)||Cf.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let u=0;u<40;u++)n[u]=e[u].charCodeAt(0);const r=_r(No(n));for(let u=0;u<40;u+=2)r[u>>1]>>4>=8&&(e[u]=e[u].toUpperCase()),(15&r[u>>1])>=8&&(e[u+1]=e[u+1].toUpperCase());return"0x"+e.join("")}const LE={};for(let t=0;t<10;t++)LE[String(t)]=String(t);for(let t=0;t<26;t++)LE[String.fromCharCode(65+t)]=String(10+t);const bD=Math.floor(function FK(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}(9007199254740991));function wD(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map(r=>LE[r]).join("");for(;e.length>=bD;){let r=e.substring(0,bD);e=parseInt(r,10)%97+e.substring(r.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}function Ds(t){let e=null;if("string"!=typeof t&&Cf.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=vD(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Cf.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==wD(t)&&Cf.throwArgumentError("bad icap checksum","address",t),e=function NK(t){return new dm(t,36).toString(16)}(t.substring(4));e.length<40;)e="0"+e;e=vD("0x"+e)}else Cf.throwArgumentError("invalid address","address",t);return e}const AD="hash/5.7.0";var jK=function(t,e,n,r){return new(n||(n=Promise))(function(v,O){function Y(ue){try{ie(r.next(ue))}catch(he){O(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){O(he)}}function ie(ue){ue.done?v(ue.value):function u(v){return v instanceof n?v:new n(function(O){O(v)})}(ue.value).then(Y,$)}ie((r=r.apply(t,e||[])).next())})};const Ni=new zt(AD),ED=new Uint8Array(32);ED.fill(0);const UK=Un.from(-1),SD=Un.from(0),_D=Un.from(1),KK=Un.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const VK=ro(_D.toHexString(),32),HK=ro(SD.toHexString(),32),MD={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},FE=["name","version","chainId","verifyingContract","salt"];function DD(t){return function(e){return"string"!=typeof e&&Ni.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const WK={name:DD("name"),version:DD("version"),chainId:function(t){try{return Un.from(t).toString()}catch{}return Ni.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Ds(t).toLowerCase()}catch{}return Ni.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=_r(t);if(32!==e.length)throw new Error("bad length");return pr(e)}catch{}return Ni.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function BE(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const n=""===e[1],r=parseInt(e[2]||"256");(r%8!=0||r>256||e[2]&&e[2]!==String(r))&&Ni.throwArgumentError("invalid numeric width","type",t);const u=KK.mask(n?r-1:r),v=n?u.add(_D).mul(UK):SD;return function(O){const Y=Un.from(O);return(Y.lt(v)||Y.gt(u))&&Ni.throwArgumentError(`value out-of-bounds for ${t}`,"value",O),ro(Y.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const n=parseInt(e[1]);return(0===n||n>32||e[1]!==String(n))&&Ni.throwArgumentError("invalid bytes width","type",t),function(r){return _r(r).length!==n&&Ni.throwArgumentError(`invalid length for ${t}`,"value",r),function zK(t){const e=_r(t),n=e.length%32;return n?ma([e,ED.slice(n)]):pr(e)}(r)}}}switch(t){case"address":return function(e){return ro(Ds(e),32)};case"bool":return function(e){return e?VK:HK};case"bytes":return function(e){return No(e)};case"string":return function(e){return PE(e)}}return null}function ID(t,e){return`${t}(${e.map(({name:n,type:r})=>r+" "+n).join(",")})`}class ba{constructor(e){Pr(this,"types",Object.freeze(sh(e))),Pr(this,"_encoderCache",{}),Pr(this,"_types",{});const n={},r={},u={};Object.keys(e).forEach(Y=>{n[Y]={},r[Y]=[],u[Y]={}});for(const Y in e){const $={};e[Y].forEach(ie=>{$[ie.name]&&Ni.throwArgumentError(`duplicate variable name ${JSON.stringify(ie.name)} in ${JSON.stringify(Y)}`,"types",e),$[ie.name]=!0;const ue=ie.type.match(/^([^\x5b]*)(\x5b|$)/)[1];ue===Y&&Ni.throwArgumentError(`circular type reference to ${JSON.stringify(ue)}`,"types",e),!BE(ue)&&(r[ue]||Ni.throwArgumentError(`unknown type ${JSON.stringify(ue)}`,"types",e),r[ue].push(Y),n[Y][ue]=!0)})}const v=Object.keys(r).filter(Y=>0===r[Y].length);0===v.length?Ni.throwArgumentError("missing primary type","types",e):v.length>1&&Ni.throwArgumentError(`ambiguous primary types or unused types: ${v.map(Y=>JSON.stringify(Y)).join(", ")}`,"types",e),Pr(this,"primaryType",v[0]),function O(Y,$){$[Y]&&Ni.throwArgumentError(`circular type reference to ${JSON.stringify(Y)}`,"types",e),$[Y]=!0,Object.keys(n[Y]).forEach(ie=>{r[ie]&&(O(ie,$),Object.keys($).forEach(ue=>{u[ue][ie]=!0}))}),delete $[Y]}(this.primaryType,{});for(const Y in u){const $=Object.keys(u[Y]);$.sort(),this._types[Y]=ID(Y,e[Y])+$.map(ie=>ID(ie,e[ie])).join("")}}getEncoder(e){let n=this._encoderCache[e];return n||(n=this._encoderCache[e]=this._getEncoder(e)),n}_getEncoder(e){{const u=BE(e);if(u)return u}const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const u=n[1],v=this.getEncoder(u),O=parseInt(n[3]);return Y=>{O>=0&&Y.length!==O&&Ni.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",Y);let $=Y.map(v);return this._types[u]&&($=$.map(No)),No(ma($))}}const r=this.types[e];if(r){const u=PE(this._types[e]);return v=>{const O=r.map(({name:Y,type:$})=>{const ie=this.getEncoder($)(v[Y]);return this._types[$]?No(ie):ie});return O.unshift(u),ma(O)}}return Ni.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const n=this._types[e];return n||Ni.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),n}encodeData(e,n){return this.getEncoder(e)(n)}hashStruct(e,n){return No(this.encodeData(e,n))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,n,r){if(BE(e))return r(e,n);const u=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(u){const O=u[1],Y=parseInt(u[3]);return Y>=0&&n.length!==Y&&Ni.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",n),n.map($=>this._visit(O,$,r))}const v=this.types[e];return v?v.reduce((O,{name:Y,type:$})=>(O[Y]=this._visit($,n[Y],r),O),{}):Ni.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,n){return this._visit(this.primaryType,e,n)}static from(e){return new ba(e)}static getPrimaryType(e){return ba.from(e).primaryType}static hashStruct(e,n,r){return ba.from(n).hashStruct(e,r)}static hashDomain(e){const n=[];for(const r in e){const u=MD[r];u||Ni.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),n.push({name:r,type:u})}return n.sort((r,u)=>FE.indexOf(r.name)-FE.indexOf(u.name)),ba.hashStruct("EIP712Domain",{EIP712Domain:n},e)}static encode(e,n,r){return ma(["0x1901",ba.hashDomain(e),ba.from(n).hash(r)])}static hash(e,n,r){return No(ba.encode(e,n,r))}static resolveNames(e,n,r,u){return jK(this,void 0,void 0,function*(){e=Gs(e);const v={};e.verifyingContract&&!gi(e.verifyingContract,20)&&(v[e.verifyingContract]="0x");const O=ba.from(n);O.visit(r,(Y,$)=>("address"===Y&&!gi($,20)&&(v[$]="0x"),$));for(const Y in v)v[Y]=yield u(Y);return e.verifyingContract&&v[e.verifyingContract]&&(e.verifyingContract=v[e.verifyingContract]),r=O.visit(r,(Y,$)=>"address"===Y&&v[$]?v[$]:$),{domain:e,value:r}})}static getPayload(e,n,r){ba.hashDomain(e);const u={},v=[];FE.forEach($=>{const ie=e[$];null!=ie&&(u[$]=WK[$](ie),v.push({name:$,type:MD[$]}))});const O=ba.from(n),Y=Gs(n);return Y.EIP712Domain?Ni.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",n):Y.EIP712Domain=v,O.encode(r),{types:Y,domain:u,primaryType:O.primaryType,message:O.visit(r,($,ie)=>{if($.match(/^bytes(\d*)/))return pr(_r(ie));if($.match(/^u?int/))return Un.from(ie).toString();switch($){case"address":return ie.toLowerCase();case"bool":return!!ie;case"string":return"string"!=typeof ie&&Ni.throwArgumentError("invalid string","value",ie),ie}return Ni.throwArgumentError("unsupported type","type",$)})}}}const GK=Un.from(0);var ZK=p(37084),pc=p.n(ZK);typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"&&self;function Ep(t,e,n){return t(n={path:e,exports:{},require:function(r,u){return function YK(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(u??n.path)}},n.exports),n.exports}var jE=CD;function CD(t,e){if(!t)throw new Error(e||"Assertion failed")}CD.equal=function(e,n,r){if(e!=n)throw new Error(r||"Assertion failed: "+e+" != "+n)};var Cu=Ep(function(t,e){var n=e;function u(O){return 1===O.length?"0"+O:O}function v(O){for(var Y="",$=0;$>8,we=255&ue;he?$.push(he,we):$.push(we)}return $},n.zero2=u,n.toHex=v,n.encode=function(Y,$){return"hex"===$?v(Y):Y}}),wa=Ep(function(t,e){var n=e;n.assert=jE,n.toArray=Cu.toArray,n.zero2=Cu.zero2,n.toHex=Cu.toHex,n.encode=Cu.encode,n.getNAF=function r($,ie,ue){var he=new Array(Math.max($.bitLength(),ue)+1);he.fill(0);for(var we=1<(we>>1)-1?(we>>1)-je:je,xe.isubn(Le)):Le=0,he[Ce]=Le,xe.iushrn(1)}return he},n.getJSF=function u($,ie){var ue=[[],[]];$=$.clone(),ie=ie.clone();for(var xe,he=0,we=0;$.cmpn(-he)>0||ie.cmpn(-we)>0;){var je,Ue,Ce=$.andln(3)+he&3,Le=ie.andln(3)+we&3;3===Ce&&(Ce=-1),3===Le&&(Le=-1),1&Ce?je=3!==(xe=$.andln(7)+he&7)&&5!==xe||2!==Le?Ce:-Ce:je=0,ue[0].push(je),1&Le?Ue=3!==(xe=ie.andln(7)+we&7)&&5!==xe||2!==Ce?Le:-Le:Ue=0,ue[1].push(Ue),2*he===je+1&&(he=1-he),2*we===Ue+1&&(we=1-we),$.iushrn(1),ie.iushrn(1)}return ue},n.cachedProperty=function v($,ie,ue){var he="_"+ie;$.prototype[ie]=function(){return void 0!==this[he]?this[he]:this[he]=ue.call(this)}},n.parseBytes=function O($){return"string"==typeof $?n.toArray($,"hex"):$},n.intFromLE=function Y($){return new(fr())($,"hex","le")}}),pb=wa.getNAF,JK=wa.getJSF,gb=wa.assert;function xf(t,e){this.type=t,this.p=new(fr())(e.p,16),this.red=e.prime?fr().red(e.prime):fr().mont(this.p),this.zero=new(fr())(0).toRed(this.red),this.one=new(fr())(1).toRed(this.red),this.two=new(fr())(2).toRed(this.red),this.n=e.n&&new(fr())(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 n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var ah=xf;function Ya(t,e){this.curve=t,this.type=e,this.precomputed=null}xf.prototype.point=function(){throw new Error("Not implemented")},xf.prototype.validate=function(){throw new Error("Not implemented")},xf.prototype._fixedNafMul=function(e,n){gb(e.precomputed);var r=e._getDoubles(),u=pb(n,1,this._bitLength),v=(1<=Y;ie--)$=($<<1)+u[ie];O.push($)}for(var ue=this.jpoint(null,null,null),he=this.jpoint(null,null,null),we=v;we>0;we--){for(Y=0;Y=0;$--){for(var ie=0;$>=0&&0===O[$];$--)ie++;if($>=0&&ie++,Y=Y.dblp(ie),$<0)break;var ue=O[$];gb(0!==ue),Y="affine"===e.type?ue>0?Y.mixedAdd(v[ue-1>>1]):Y.mixedAdd(v[-ue-1>>1].neg()):ue>0?Y.add(v[ue-1>>1]):Y.add(v[-ue-1>>1].neg())}return"affine"===e.type?Y.toP():Y},xf.prototype._wnafMulAdd=function(e,n,r,u,v){var ue,he,we,O=this._wnafT1,Y=this._wnafT2,$=this._wnafT3,ie=0;for(ue=0;ue=1;ue-=2){var Ce=ue-1,Le=ue;if(1===O[Ce]&&1===O[Le]){var je=[n[Ce],null,null,n[Le]];0===n[Ce].y.cmp(n[Le].y)?(je[1]=n[Ce].add(n[Le]),je[2]=n[Ce].toJ().mixedAdd(n[Le].neg())):0===n[Ce].y.cmp(n[Le].y.redNeg())?(je[1]=n[Ce].toJ().mixedAdd(n[Le]),je[2]=n[Ce].add(n[Le].neg())):(je[1]=n[Ce].toJ().mixedAdd(n[Le]),je[2]=n[Ce].toJ().mixedAdd(n[Le].neg()));var Ue=[-3,-1,-5,-7,0,7,5,1,3],$e=JK(r[Ce],r[Le]);for(ie=Math.max($e[0].length,ie),$[Ce]=new Array(ie),$[Le]=new Array(ie),he=0;he=0;ue--){for(var An=0;ue>=0;){var rn=!0;for(he=0;he=0&&An++,xt=xt.dblp(An),ue<0)break;for(he=0;he0?we=Y[he][un-1>>1]:un<0&&(we=Y[he][-un-1>>1].neg()),xt="affine"===we.type?xt.mixedAdd(we):xt.add(we))}}for(ue=0;ue=Math.ceil((e.bitLength()+1)/n.step)},Ya.prototype._getDoubles=function(e,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],u=this,v=0;v=0&&(xe=ie,Ce=ue),he.negative&&(he=he.neg(),we=we.neg()),xe.negative&&(xe=xe.neg(),Ce=Ce.neg()),[{a:he,b:we},{a:xe,b:Ce}]},Ja.prototype._endoSplit=function(e){var n=this.endo.basis,r=n[0],u=n[1],v=u.b.mul(e).divRound(this.n),O=r.b.neg().mul(e).divRound(this.n),Y=v.mul(r.a),$=O.mul(u.a),ie=v.mul(r.b),ue=O.mul(u.b);return{k1:e.sub(Y).sub($),k2:ie.add(ue).neg()}},Ja.prototype.pointFromX=function(e,n){(e=new(fr())(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),u=r.redSqrt();if(0!==u.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var v=u.fromRed().isOdd();return(n&&!v||!n&&v)&&(u=u.redNeg()),this.point(e,u)},Ja.prototype.validate=function(e){if(e.inf)return!0;var n=e.x,r=e.y,u=this.a.redMul(n),v=n.redSqr().redMul(n).redIAdd(u).redIAdd(this.b);return 0===r.redSqr().redISub(v).cmpn(0)},Ja.prototype._endoWnafMulAdd=function(e,n,r){for(var u=this._endoWnafT1,v=this._endoWnafT2,O=0;O":""},_o.prototype.isInfinity=function(){return this.inf},_o.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var n=this.y.redSub(e.y);0!==n.cmpn(0)&&(n=n.redMul(this.x.redSub(e.x).redInvm()));var r=n.redSqr().redISub(this.x).redISub(e.x),u=n.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,u)},_o.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var n=this.curve.a,r=this.x.redSqr(),u=e.redInvm(),v=r.redAdd(r).redIAdd(r).redIAdd(n).redMul(u),O=v.redSqr().redISub(this.x.redAdd(this.x)),Y=v.redMul(this.x.redSub(O)).redISub(this.y);return this.curve.point(O,Y)},_o.prototype.getX=function(){return this.x.fromRed()},_o.prototype.getY=function(){return this.y.fromRed()},_o.prototype.mul=function(e){return e=new(fr())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},_o.prototype.mulAdd=function(e,n,r){var u=[this,n],v=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(u,v):this.curve._wnafMulAdd(1,u,v,2)},_o.prototype.jmulAdd=function(e,n,r){var u=[this,n],v=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(u,v,!0):this.curve._wnafMulAdd(1,u,v,2,!0)},_o.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},_o.prototype.neg=function(e){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,u=function(v){return v.neg()};n.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(u)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(u)}}}return n},_o.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},UE(ko,ah.BasePoint),Ja.prototype.jpoint=function(e,n,r){return new ko(this,e,n,r)},ko.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),n=e.redSqr(),r=this.x.redMul(n),u=this.y.redMul(n).redMul(e);return this.curve.point(r,u)},ko.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ko.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var n=e.z.redSqr(),r=this.z.redSqr(),u=this.x.redMul(n),v=e.x.redMul(r),O=this.y.redMul(n.redMul(e.z)),Y=e.y.redMul(r.redMul(this.z)),$=u.redSub(v),ie=O.redSub(Y);if(0===$.cmpn(0))return 0!==ie.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var ue=$.redSqr(),he=ue.redMul($),we=u.redMul(ue),xe=ie.redSqr().redIAdd(he).redISub(we).redISub(we),Ce=ie.redMul(we.redISub(xe)).redISub(O.redMul(he)),Le=this.z.redMul(e.z).redMul($);return this.curve.jpoint(xe,Ce,Le)},ko.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var n=this.z.redSqr(),r=this.x,u=e.x.redMul(n),v=this.y,O=e.y.redMul(n).redMul(this.z),Y=r.redSub(u),$=v.redSub(O);if(0===Y.cmpn(0))return 0!==$.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var ie=Y.redSqr(),ue=ie.redMul(Y),he=r.redMul(ie),we=$.redSqr().redIAdd(ue).redISub(he).redISub(he),xe=$.redMul(he.redISub(we)).redISub(v.redMul(ue)),Ce=this.z.redMul(Y);return this.curve.jpoint(we,xe,Ce)},ko.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var n;if(this.curve.zeroA||this.curve.threeA){var r=this;for(n=0;n=0)return!1;if(r.redIAdd(v),0===this.x.cmp(r))return!0}},ko.prototype.inspect=function(){return this.isInfinity()?"":""},ko.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var yb=Ep(function(t,e){var n=e;n.base=ah,n.short=XK,n.mont=null,n.edwards=null}),mb=Ep(function(t,e){var O,n=e,r=wa.assert;function u(Y){"short"===Y.type?this.curve=new yb.short(Y):"edwards"===Y.type?this.curve=new yb.edwards(Y):this.curve=new yb.mont(Y),this.g=this.curve.g,this.n=this.curve.n,this.hash=Y.hash,r(this.g.validate(),"Invalid curve"),r(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function v(Y,$){Object.defineProperty(n,Y,{configurable:!0,enumerable:!0,get:function(){var ie=new u($);return Object.defineProperty(n,Y,{configurable:!0,enumerable:!0,value:ie}),ie}})}n.PresetCurve=u,v("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:pc().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),v("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:pc().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),v("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:pc().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),v("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:pc().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"]}),v("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:pc().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"]}),v("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:pc().sha256,gRed:!1,g:["9"]}),v("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:pc().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{O=null.crash()}catch{O=void 0}v("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:pc().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",O]})});function Tf(t){if(!(this instanceof Tf))return new Tf(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=Cu.toArray(t.entropy,t.entropyEnc||"hex"),n=Cu.toArray(t.nonce,t.nonceEnc||"hex"),r=Cu.toArray(t.pers,t.persEnc||"hex");jE(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,r)}var xD=Tf;Tf.prototype._init=function(e,n,r){var u=e.concat(n).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var v=0;v=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},Tf.prototype.generate=function(e,n,r,u){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(u=r,r=n,n=null),r&&(r=Cu.toArray(r,u||"hex"),this._update(r));for(var v=[];v.length"};var qK=wa.assert;function vb(t,e){if(t instanceof vb)return t;this._importDER(t,e)||(qK(t.r&&t.s,"Signature without r or s"),this.r=new(fr())(t.r,16),this.s=new(fr())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var bb=vb;function $K(){this.place=0}function VE(t,e){var n=t[e.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var u=0,v=0,O=e.place;v>>=0;return!(u<=127)&&(e.place=O,u)}function TD(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}vb.prototype._importDER=function(e,n){e=wa.toArray(e,n);var r=new $K;if(48!==e[r.place++])return!1;var u=VE(e,r);if(!1===u||u+r.place!==e.length||2!==e[r.place++])return!1;var v=VE(e,r);if(!1===v)return!1;var O=e.slice(r.place,v+r.place);if(r.place+=v,2!==e[r.place++])return!1;var Y=VE(e,r);if(!1===Y||e.length!==Y+r.place)return!1;var $=e.slice(r.place,Y+r.place);if(0===O[0]){if(!(128&O[1]))return!1;O=O.slice(1)}if(0===$[0]){if(!(128&$[1]))return!1;$=$.slice(1)}return this.r=new(fr())(O),this.s=new(fr())($),this.recoveryParam=null,!0},vb.prototype.toDER=function(e){var n=this.r.toArray(),r=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&r[0]&&(r=[0].concat(r)),n=TD(n),r=TD(r);!(r[0]||128&r[1]);)r=r.slice(1);var u=[2];HE(u,n.length),(u=u.concat(n)).push(2),HE(u,r.length);var v=u.concat(r),O=[48];return HE(O,v.length),O=O.concat(v),wa.encode(O,e)};var ez=function(){throw new Error("unsupported")},OD=wa.assert;function Qa(t){if(!(this instanceof Qa))return new Qa(t);"string"==typeof t&&(OD(Object.prototype.hasOwnProperty.call(mb,t),"Unknown curve "+t),t=mb[t]),t instanceof mb.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}var tz=Qa;Qa.prototype.keyPair=function(e){return new zE(this,e)},Qa.prototype.keyFromPrivate=function(e,n){return zE.fromPrivate(this,e,n)},Qa.prototype.keyFromPublic=function(e,n){return zE.fromPublic(this,e,n)},Qa.prototype.genKeyPair=function(e){e||(e={});for(var n=new xD({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||ez(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),u=this.n.sub(new(fr())(2));;){var v=new(fr())(n.generate(r));if(!(v.cmp(u)>0))return v.iaddn(1),this.keyFromPrivate(v)}},Qa.prototype._truncateToN=function(e,n){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!n&&e.cmp(this.n)>=0?e.sub(this.n):e},Qa.prototype.sign=function(e,n,r,u){"object"==typeof r&&(u=r,r=null),u||(u={}),n=this.keyFromPrivate(n,r),e=this._truncateToN(new(fr())(e,16));for(var v=this.n.byteLength(),O=n.getPrivate().toArray("be",v),Y=e.toArray("be",v),$=new xD({hash:this.hash,entropy:O,nonce:Y,pers:u.pers,persEnc:u.persEnc||"utf8"}),ie=this.n.sub(new(fr())(1)),ue=0;;ue++){var he=u.k?u.k(ue):new(fr())($.generate(this.n.byteLength()));if(!((he=this._truncateToN(he,!0)).cmpn(1)<=0||he.cmp(ie)>=0)){var we=this.g.mul(he);if(!we.isInfinity()){var xe=we.getX(),Ce=xe.umod(this.n);if(0!==Ce.cmpn(0)){var Le=he.invm(this.n).mul(Ce.mul(n.getPrivate()).iadd(e));if(0!==(Le=Le.umod(this.n)).cmpn(0)){var je=(we.getY().isOdd()?1:0)|(0!==xe.cmp(Ce)?2:0);return u.canonical&&Le.cmp(this.nh)>0&&(Le=this.n.sub(Le),je^=1),new bb({r:Ce,s:Le,recoveryParam:je})}}}}}},Qa.prototype.verify=function(e,n,r,u){e=this._truncateToN(new(fr())(e,16)),r=this.keyFromPublic(r,u);var v=(n=new bb(n,"hex")).r,O=n.s;if(v.cmpn(1)<0||v.cmp(this.n)>=0||O.cmpn(1)<0||O.cmp(this.n)>=0)return!1;var ue,Y=O.invm(this.n),$=Y.mul(e).umod(this.n),ie=Y.mul(v).umod(this.n);return this.curve._maxwellTrick?!(ue=this.g.jmulAdd($,r.getPublic(),ie)).isInfinity()&&ue.eqXToP(v):!(ue=this.g.mulAdd($,r.getPublic(),ie)).isInfinity()&&0===ue.getX().umod(this.n).cmp(v)},Qa.prototype.recoverPubKey=function(t,e,n,r){OD((3&n)===n,"The recovery param is more than two bits"),e=new bb(e,r);var u=this.n,v=new(fr())(t),O=e.r,Y=e.s,$=1&n,ie=n>>1;if(O.cmp(this.curve.p.umod(this.curve.n))>=0&&ie)throw new Error("Unable to find sencond key candinate");O=ie?this.curve.pointFromX(O.add(this.curve.n),$):this.curve.pointFromX(O,$);var ue=e.r.invm(u),he=u.sub(v).mul(ue).umod(u),we=Y.mul(ue).umod(u);return this.g.mulAdd(he,O,we)},Qa.prototype.getKeyRecoveryParam=function(t,e,n,r){if(null!==(e=new bb(e,r)).recoveryParam)return e.recoveryParam;for(var u=0;u<4;u++){var v;try{v=this.recoverPubKey(t,e,u)}catch{continue}if(v.eq(n))return u}throw new Error("Unable to find valid recovery factor")};var rz=Ep(function(t,e){var n=e;n.version="6.5.4",n.utils=wa,n.rand=function(){throw new Error("unsupported")},n.curve=yb,n.curves=mb,n.ec=tz,n.eddsa=null}).ec;const WE=new zt("signing-key/5.7.0");let GE=null;function gc(){return GE||(GE=new rz("secp256k1")),GE}class oz{constructor(e){Pr(this,"curve","secp256k1"),Pr(this,"privateKey",pr(e)),32!==oh(this.privateKey)&&WE.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const n=gc().keyFromPrivate(_r(this.privateKey));Pr(this,"publicKey","0x"+n.getPublic(!1,"hex")),Pr(this,"compressedPublicKey","0x"+n.getPublic(!0,"hex")),Pr(this,"_isSigningKey",!0)}_addPoint(e){const n=gc().keyFromPublic(_r(this.publicKey)),r=gc().keyFromPublic(_r(e));return"0x"+n.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const n=gc().keyFromPrivate(_r(this.privateKey)),r=_r(e);32!==r.length&&WE.throwArgumentError("bad digest length","digest",e);const u=n.sign(r,{canonical:!0});return cm({recoveryParam:u.recoveryParam,r:ro("0x"+u.r.toString(16),32),s:ro("0x"+u.s.toString(16),32)})}computeSharedSecret(e){const n=gc().keyFromPrivate(_r(this.privateKey)),r=gc().keyFromPublic(_r(PD(e)));return ro("0x"+n.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function PD(t,e){const n=_r(t);if(32===n.length){const r=new oz(n);return e?"0x"+gc().keyFromPrivate(n).getPublic(!0,"hex"):r.publicKey}return 33===n.length?e?pr(n):"0x"+gc().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?e?"0x"+gc().keyFromPublic(n).getPublic(!0,"hex"):pr(n):WE.throwArgumentError("invalid public or private key","key","[REDACTED]")}const ns=new zt("transactions/5.7.0");var ND;function ZE(t){return"0x"===t?null:Ds(t)}function rs(t){return"0x"===t?GK:Un.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(ND||(ND={}));function RD(t,e){return function lz(t){return Ds(Ms(No(Ms(PD(t),1)),12))}(function sz(t,e){const n=cm(e),r={r:_r(n.r),s:_r(n.s)};return"0x"+gc().recoverPubKey(_r(t),r,n.recoveryParam).encode("hex",!1)}(_r(t),e))}function Aa(t,e){const n=Ap(Un.from(t).toHexString());return n.length>32&&ns.throwArgumentError("invalid length for "+e,"transaction:"+e,t),n}function YE(t,e){return{address:Ds(t),storageKeys:(e||[]).map((n,r)=>(32!==oh(n)&&ns.throwArgumentError("invalid access list storageKey",`accessList[${t}:${r}]`,n),n.toLowerCase()))}}function pm(t){if(Array.isArray(t))return t.map((n,r)=>Array.isArray(n)?(n.length>2&&ns.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${r}]`,n),YE(n[0],n[1])):YE(n.address,n.storageKeys));const e=Object.keys(t).map(n=>{const r=t[n].reduce((u,v)=>(u[v]=!0,u),{});return YE(n,Object.keys(r).sort())});return e.sort((n,r)=>n.address.localeCompare(r.address)),e}function kD(t){return pm(t).map(e=>[e.address,e.storageKeys])}function LD(t,e){if(null!=t.gasPrice){const r=Un.from(t.gasPrice),u=Un.from(t.maxFeePerGas||0);r.eq(u)||ns.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:u})}const n=[Aa(t.chainId||0,"chainId"),Aa(t.nonce||0,"nonce"),Aa(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Aa(t.maxFeePerGas||0,"maxFeePerGas"),Aa(t.gasLimit||0,"gasLimit"),null!=t.to?Ds(t.to):"0x",Aa(t.value||0,"value"),t.data||"0x",kD(t.accessList||[])];if(e){const r=cm(e);n.push(Aa(r.recoveryParam,"recoveryParam")),n.push(Ap(r.r)),n.push(Ap(r.s))}return ma(["0x02",hb(n)])}function FD(t,e){const n=[Aa(t.chainId||0,"chainId"),Aa(t.nonce||0,"nonce"),Aa(t.gasPrice||0,"gasPrice"),Aa(t.gasLimit||0,"gasLimit"),null!=t.to?Ds(t.to):"0x",Aa(t.value||0,"value"),t.data||"0x",kD(t.accessList||[])];if(e){const r=cm(e);n.push(Aa(r.recoveryParam,"recoveryParam")),n.push(Ap(r.r)),n.push(Ap(r.s))}return ma(["0x01",hb(n)])}function BD(t,e,n){try{const r=rs(e[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");t.v=r}catch{ns.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=ro(e[1],32),t.s=ro(e[2],32);try{const r=No(n(t));t.from=RD(r,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function gz(t){const e=_r(t);if(e[0]>127)return function pz(t){const e=kE(t);9!==e.length&&6!==e.length&&ns.throwArgumentError("invalid raw transaction","rawTransaction",t);const n={nonce:rs(e[0]).toNumber(),gasPrice:rs(e[1]),gasLimit:rs(e[2]),to:ZE(e[3]),value:rs(e[4]),data:e[5],chainId:0};if(6===e.length)return n;try{n.v=Un.from(e[6]).toNumber()}catch{return n}if(n.r=ro(e[7],32),n.s=ro(e[8],32),Un.from(n.r).isZero()&&Un.from(n.s).isZero())n.chainId=n.v,n.v=0;else{n.chainId=Math.floor((n.v-35)/2),n.chainId<0&&(n.chainId=0);let r=n.v-27;const u=e.slice(0,6);0!==n.chainId&&(u.push(pr(n.chainId)),u.push("0x"),u.push("0x"),r-=2*n.chainId+8);const v=No(hb(u));try{n.from=RD(v,{r:pr(n.r),s:pr(n.s),recoveryParam:r})}catch{}n.hash=No(t)}return n.type=null,n}(e);switch(e[0]){case 1:return function hz(t){const e=kE(t.slice(1));8!==e.length&&11!==e.length&&ns.throwArgumentError("invalid component count for transaction type: 1","payload",pr(t));const n={type:1,chainId:rs(e[0]).toNumber(),nonce:rs(e[1]).toNumber(),gasPrice:rs(e[2]),gasLimit:rs(e[3]),to:ZE(e[4]),value:rs(e[5]),data:e[6],accessList:pm(e[7])};return 8===e.length||(n.hash=No(t),BD(n,e.slice(8),FD)),n}(e);case 2:return function dz(t){const e=kE(t.slice(1));9!==e.length&&12!==e.length&&ns.throwArgumentError("invalid component count for transaction type: 2","payload",pr(t));const n=rs(e[2]),r=rs(e[3]),u={type:2,chainId:rs(e[0]).toNumber(),nonce:rs(e[1]).toNumber(),maxPriorityFeePerGas:n,maxFeePerGas:r,gasPrice:null,gasLimit:rs(e[4]),to:ZE(e[5]),value:rs(e[6]),data:e[7],accessList:pm(e[8])};return 9===e.length||(u.hash=No(t),BD(u,e.slice(9),LD)),u}(e)}return ns.throwError(`unsupported transaction type: ${e[0]}`,zt.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}function jD(t){t=atob(t);const e=[];for(let n=0;n{v[Y.toLowerCase()]=O}):r.headers.keys().forEach(O=>{v[O.toLowerCase()]=r.headers.get(O)}),{headers:v,statusCode:r.status,statusMessage:r.statusText,body:_r(new Uint8Array(u))}})}var bz=function(t,e,n,r){return new(n||(n=Promise))(function(v,O){function Y(ue){try{ie(r.next(ue))}catch(he){O(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){O(he)}}function ie(ue){ue.done?v(ue.value):function u(v){return v instanceof n?v:new n(function(O){O(v)})}(ue.value).then(Y,$)}ie((r=r.apply(t,e||[])).next())})};const xu=new zt("web/5.7.1");function KD(t){return new Promise(e=>{setTimeout(e,t)})}function Of(t,e){if(null==t)return null;if("string"==typeof t)return t;if(IE(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return cb(t)}catch{}return pr(t)}return t}function wz(t){return hl(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,n)=>String.fromCharCode(parseInt(n,16))))}function JE(t,e,n){let u=null;if(null!=e){u=hl(e);const v="string"==typeof t?{url:t}:Gs(t);v.headers?0!==Object.keys(v.headers).filter(Y=>"content-type"===Y.toLowerCase()).length||(v.headers=Gs(v.headers),v.headers["content-type"]="application/json"):v.headers={"content-type":"application/json"},t=v}return function Az(t,e,n){const r="object"==typeof t&&null!=t.throttleLimit?t.throttleLimit:12;xu.assertArgument(r>0&&r%1==0,"invalid connection throttle limit","connection.throttleLimit",r);const u="object"==typeof t?t.throttleCallback:null,v="object"==typeof t&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;xu.assertArgument(v>0&&v%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",v);const O="object"==typeof t&&!!t.errorPassThrough,Y={};let $=null;const ie={method:"GET"};let ue=!1,he=12e4;if("string"==typeof t)$=t;else if("object"==typeof t){if((null==t||null==t.url)&&xu.throwArgumentError("missing URL","connection.url",t),$=t.url,"number"==typeof t.timeout&&t.timeout>0&&(he=t.timeout),t.headers)for(const Ue in t.headers)Y[Ue.toLowerCase()]={key:Ue,value:String(t.headers[Ue])},["if-none-match","if-modified-since"].indexOf(Ue.toLowerCase())>=0&&(ue=!0);if(ie.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==$.substring(0,6)&&!0!==t.allowInsecureAuthentication&&xu.throwError("basic authentication requires a secure https url",zt.errors.INVALID_ARGUMENT,{argument:"url",url:$,user:t.user,password:"[REDACTED]"});const Ue=t.user+":"+t.password;Y.authorization={key:"Authorization",value:"Basic "+UD(hl(Ue))}}null!=t.skipFetchSetup&&(ie.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(ie.fetchOptions=Gs(t.fetchOptions))}const we=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),xe=$?$.match(we):null;if(xe)try{const Ue={statusCode:200,statusMessage:"OK",headers:{"content-type":xe[1]||"text/plain"},body:xe[2]?jD(xe[3]):wz(xe[3])};let $e=Ue.body;return n&&($e=n(Ue.body,Ue)),Promise.resolve($e)}catch(Ue){xu.throwError("processing response error",zt.errors.SERVER_ERROR,{body:Of(xe[1],xe[2]),error:Ue,requestBody:null,requestMethod:"GET",url:$})}e&&(ie.method="POST",ie.body=e,null==Y["content-type"]&&(Y["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==Y["content-length"]&&(Y["content-length"]={key:"Content-Length",value:String(e.length)}));const Ce={};Object.keys(Y).forEach(Ue=>{const $e=Y[Ue];Ce[$e.key]=$e.value}),ie.headers=Ce;const Le=function(){let Ue=null;return{promise:new Promise(function(ht,xt){he&&(Ue=setTimeout(()=>{null!=Ue&&(Ue=null,xt(xu.makeError("timeout",zt.errors.TIMEOUT,{requestBody:Of(ie.body,Ce["content-type"]),requestMethod:ie.method,timeout:he,url:$})))},he))}),cancel:function(){null!=Ue&&(clearTimeout(Ue),Ue=null)}}}(),je=function(){return bz(this,void 0,void 0,function*(){for(let Ue=0;Ue=300)&&(Le.cancel(),xu.throwError("bad response",zt.errors.SERVER_ERROR,{status:$e.statusCode,headers:$e.headers,body:Of(Je,$e.headers?$e.headers["content-type"]:null),requestBody:Of(ie.body,Ce["content-type"]),requestMethod:ie.method,url:$})),n)try{const ht=yield n(Je,$e);return Le.cancel(),ht}catch(ht){if(ht.throttleRetry&&Ue{let Y=null;if(null!=v)try{Y=JSON.parse(cb(v))}catch($){xu.throwError("invalid JSON",zt.errors.SERVER_ERROR,{body:v,error:$})}return n&&(Y=n(Y,O)),Y})}function gm(t,e){return e||(e={}),null==(e=Gs(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise(function(n,r){let u=null,v=!1;const O=()=>!v&&(v=!0,u&&clearTimeout(u),!0);e.timeout&&(u=setTimeout(()=>{O()&&r(new Error("timeout"))},e.timeout));const Y=e.retryLimit;let $=0;!function ie(){return t().then(function(ue){if(void 0!==ue)O()&&n(ue);else if(e.oncePoll)e.oncePoll.once("poll",ie);else if(e.onceBlock)e.onceBlock.once("block",ie);else if(!v){if($++,$>Y)return void(O()&&r(new Error("retry limit reached")));let he=e.interval*parseInt(String(Math.random()*Math.pow(2,$)));hee.ceiling&&(he=e.ceiling),setTimeout(ie,he)}return null},function(ue){O()&&r(ue)})}()})}var Sz=function(t,e,n,r){return new(n||(n=Promise))(function(v,O){function Y(ue){try{ie(r.next(ue))}catch(he){O(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){O(he)}}function ie(ue){ue.done?v(ue.value):function u(v){return v instanceof n?v:new n(function(O){O(v)})}(ue.value).then(Y,$)}ie((r=r.apply(t,e||[])).next())})};const ym=new zt("abstract-provider/5.7.0");class _z extends CK{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class QE{constructor(){ym.checkAbstract(new.target,QE),Pr(this,"_isProvider",!0)}getFeeData(){return Sz(this,void 0,void 0,function*(){const{block:e,gasPrice:n}=yield Ro({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(O=>null)});let r=null,u=null,v=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,v=Un.from("1500000000"),u=e.baseFeePerGas.mul(2).add(v)),{lastBaseFeePerGas:r,maxFeePerGas:u,maxPriorityFeePerGas:v,gasPrice:n}})}addListener(e,n){return this.on(e,n)}removeListener(e,n){return this.off(e,n)}static isProvider(e){return!(!e||!e._isProvider)}}class zD{constructor(e){Pr(this,"alphabet",e),Pr(this,"base",e.length),Pr(this,"_alphabetMap",{}),Pr(this,"_leader",e.charAt(0));for(let n=0;n0;)r.push(O%this.base),O=O/this.base|0}let u="";for(let v=0;0===n[v]&&v=0;--v)u+=this.alphabet[r[v]];return u}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let n=[];if(0===e.length)return new Uint8Array(n);n.push(0);for(let r=0;r>=8;for(;v>0;)n.push(255&v),v>>=8}for(let r=0;e[r]===this._leader&&r0&&Array.isArray(Y)?u(Y,O-1):n.push(Y)})};return u(t,e),n}function xz(t){return function Cz(t){let e=0;return()=>t[e++]}(function Iz(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),u=1,v=[0,1];for(let xt=1;xt>--$&1}const we=Math.pow(2,31),xe=we>>>1,Ce=xe>>1,Le=we-1;let je=0;for(let xt=0;xt<31;xt++)je=je<<1|ue();let Ue=[],$e=0,Je=we;for(;;){let xt=Math.floor(((je-$e+1)*u-1)/Je),Wt=0,An=r;for(;An-Wt>1;){let xn=Wt+An>>>1;xt>>1|ue(),rn=rn<<1^xe,un=(un^xe)<<1|xe|1;$e=rn,Je=1+un-rn}let ht=r-4;return Ue.map(xt=>{switch(xt-ht){case 3:return ht+65792+(t[Y++]<<16|t[Y++]<<8|t[Y++]);case 2:return ht+256+(t[Y++]<<8|t[Y++]);case 1:return ht+t[Y++];default:return xt-1}})}(t))}function Tz(t){return 1&t?~t>>1:t>>1}function HD(t,e){let n=Array(t);for(let r=0,u=-1;re[O]):n}function WD(t,e,n){let r=Array(t).fill(void 0).map(()=>[]);for(let u=0;ur[O].push(v));return r}function kz(t,e){let n=1+e(),r=e(),u=function Rz(t){let e=[];for(;;){let n=t();if(0==n)break;e.push(n)}return e}(e);return VD(WD(u.length,1+t,e).map((O,Y)=>{const $=O[0],ie=O.slice(1);return Array(u[Y]).fill(void 0).map((ue,he)=>{let we=he*r;return[$+he*n,ie.map(xe=>xe+we)]})}))}function Lz(t,e){return WD(1+e(),1+t,e).map(u=>[u[0],u.slice(1)])}const Ab=function Bz(){return xz(jD("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH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zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}(),jz=new Set(wb(Ab)),Uz=new Set(wb(Ab)),Kz=function Nz(t){let e=[];for(;;){let n=t();if(0==n)break;e.push(kz(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(Lz(n,t))}return function Dz(t){const e={};for(let n=0;nr-u);return function n(){let r=[];for(;;){let ie=wb(t,e);if(0==ie.length)break;r.push({set:new Set(ie),node:n()})}r.sort((ie,ue)=>ue.set.size-ie.set.size);let u=t(),v=u%3;u=u/3|0;let O=!!(1&u);return u>>=1,{branches:r,valid:v,fe0f:O,save:1==u,check:2==u}}()}(Ab),GD=45,ZD=95;function YD(t){return function EK(t,e=lm.current){return TE(hl(t,e))}(t)}function Vz(t){return t.filter(e=>65039!=e)}function JD(t){for(let e of t.split(".")){let n=YD(e);try{for(let r=n.lastIndexOf(ZD)-1;r>=0;r--)if(n[r]!==ZD)throw new Error("underscore only allowed at start");if(n.length>=4&&n.every(r=>r<128)&&n[2]===GD&&n[3]===GD)throw new Error("invalid label extension")}catch(r){throw new Error(`Invalid label "${e}": ${r.message}`)}}return t}function Hz(t){return JD(function Wz(t,e){let n=YD(t).reverse(),r=[];for(;n.length;){let u=Zz(n);if(u){r.push(...e(u));continue}let v=n.pop();if(jz.has(v)){r.push(v);continue}if(Uz.has(v))continue;let O=Kz[v];if(!O)throw new Error(`Disallowed codepoint: 0x${v.toString(16).toUpperCase()}`);r.push(...O)}return JD(function Gz(t){return t.normalize("NFC")}(String.fromCodePoint(...r)))}(t,Vz))}function Zz(t,e){var n;let u,v,r=zz,O=[],Y=t.length;for(e&&(e.length=0);Y;){let $=t[--Y];if(r=null===(n=r.branches.find(ie=>ie.set.has($)))||void 0===n?void 0:n.node,!r)break;if(r.save)v=$;else if(r.check&&$===v)break;O.push($),r.fe0f&&(O.push(65039),Y>0&&65039==t[Y-1]&&Y--),r.valid&&(u=O.slice(),2==r.valid&&u.splice(1,1),e&&e.push(...t.slice(Y).reverse()),t.length=Y)}return u}const Yz=new zt(AD),QD=new Uint8Array(32);function XD(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function Eb(t){const e=hl(Hz(t)),n=[];if(0===t.length)return n;let r=0;for(let u=0;u=e.length)throw new Error("invalid ENS name; empty component");return n.push(XD(e.slice(r))),n}function Sb(t){"string"!=typeof t&&Yz.throwArgumentError("invalid ENS name; not a string","name",t);let e=QD;const n=Eb(t);for(;n.length;)e=No(If([e,No(n.pop())]));return pr(e)}function Jz(t){return pr(If(Eb(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const n=new Uint8Array(e.length+1);return n.set(e,1),n[0]=n.length-1,n})))+"00"}QD.fill(0);const qD=new zt("networks/5.7.1");function gl(t){const e=function(n,r){null==r&&(r={});const u=[];if(n.InfuraProvider&&"-"!==r.infura)try{u.push(new n.InfuraProvider(t,r.infura))}catch{}if(n.EtherscanProvider&&"-"!==r.etherscan)try{u.push(new n.EtherscanProvider(t,r.etherscan))}catch{}if(n.AlchemyProvider&&"-"!==r.alchemy)try{u.push(new n.AlchemyProvider(t,r.alchemy))}catch{}if(n.PocketProvider&&"-"!==r.pocket){const v=["goerli","ropsten","rinkeby","sepolia"];try{const O=new n.PocketProvider(t,r.pocket);O.network&&-1===v.indexOf(O.network.name)&&u.push(O)}catch{}}if(n.CloudflareProvider&&"-"!==r.cloudflare)try{u.push(new n.CloudflareProvider(t))}catch{}if(n.AnkrProvider&&"-"!==r.ankr)try{const v=["ropsten"],O=new n.AnkrProvider(t,r.ankr);O.network&&-1===v.indexOf(O.network.name)&&u.push(O)}catch{}if(0===u.length)return null;if(n.FallbackProvider){let v=1;return null!=r.quorum?v=r.quorum:"homestead"===t&&(v=2),new n.FallbackProvider(u,v)}return u[0]};return e.renetwork=function(n){return gl(n)},e}function _b(t,e){const n=function(r,u){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null};return n.renetwork=function(r){return _b(t,r)},n}const $D={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:gl("homestead")},eI={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:gl("ropsten")},tI={chainId:63,name:"classicMordor",_defaultProvider:_b("https://www.ethercluster.com/mordor","classicMordor")},Mb={unspecified:{chainId:0,name:"unspecified"},homestead:$D,mainnet:$D,morden:{chainId:2,name:"morden"},ropsten:eI,testnet:eI,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:gl("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:gl("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:gl("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:gl("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:_b("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:tI,classicTestnet:tI,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:_b("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:gl("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:gl("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};new zt("sha2/5.7.0");function nI(t){return"0x"+pc().sha256().update(_r(t)).digest("hex")}var tV=p(70988),rI=p.n(tV);const mm=new zt(fb);class Fn{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},n=this.address.bind(this),r=this.bigNumber.bind(this),u=this.blockTag.bind(this),v=this.data.bind(this),O=this.hash.bind(this),Y=this.hex.bind(this),$=this.number.bind(this),ie=this.type.bind(this);return e.transaction={hash:O,type:ie,accessList:Fn.allowNull(this.accessList.bind(this),null),blockHash:Fn.allowNull(O,null),blockNumber:Fn.allowNull($,null),transactionIndex:Fn.allowNull($,null),confirmations:Fn.allowNull($,null),from:n,gasPrice:Fn.allowNull(r),maxPriorityFeePerGas:Fn.allowNull(r),maxFeePerGas:Fn.allowNull(r),gasLimit:r,to:Fn.allowNull(n,null),value:r,nonce:$,data:v,r:Fn.allowNull(this.uint256),s:Fn.allowNull(this.uint256),v:Fn.allowNull($),creates:Fn.allowNull(n,null),raw:Fn.allowNull(v)},e.transactionRequest={from:Fn.allowNull(n),nonce:Fn.allowNull($),gasLimit:Fn.allowNull(r),gasPrice:Fn.allowNull(r),maxPriorityFeePerGas:Fn.allowNull(r),maxFeePerGas:Fn.allowNull(r),to:Fn.allowNull(n),value:Fn.allowNull(r),data:Fn.allowNull(he=>this.data(he,!0)),type:Fn.allowNull($),accessList:Fn.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:$,blockNumber:$,transactionHash:O,address:n,topics:Fn.arrayOf(O),data:v,logIndex:$,blockHash:O},e.receipt={to:Fn.allowNull(this.address,null),from:Fn.allowNull(this.address,null),contractAddress:Fn.allowNull(n,null),transactionIndex:$,root:Fn.allowNull(Y),gasUsed:r,logsBloom:Fn.allowNull(v),blockHash:O,transactionHash:O,logs:Fn.arrayOf(this.receiptLog.bind(this)),blockNumber:$,confirmations:Fn.allowNull($,null),cumulativeGasUsed:r,effectiveGasPrice:Fn.allowNull(r),status:Fn.allowNull($),type:ie},e.block={hash:Fn.allowNull(O),parentHash:O,number:$,timestamp:$,nonce:Fn.allowNull(Y),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:Fn.allowNull(n),extraData:v,transactions:Fn.allowNull(Fn.arrayOf(O)),baseFeePerGas:Fn.allowNull(r)},e.blockWithTransactions=Gs(e.block),e.blockWithTransactions.transactions=Fn.allowNull(Fn.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Fn.allowNull(u,void 0),toBlock:Fn.allowNull(u,void 0),blockHash:Fn.allowNull(O,void 0),address:Fn.allowNull(n,void 0),topics:Fn.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Fn.allowNull($),blockHash:Fn.allowNull(O),transactionIndex:$,removed:Fn.allowNull(this.boolean.bind(this)),address:n,data:Fn.allowFalsish(v,"0x"),topics:Fn.arrayOf(O),transactionHash:O,logIndex:$},e}accessList(e){return pm(e||[])}number(e){return"0x"===e?0:Un.from(e).toNumber()}type(e){return"0x"===e||null==e?0:Un.from(e).toNumber()}bigNumber(e){return Un.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,n){return"string"==typeof e&&(!n&&"0x"!==e.substring(0,2)&&(e="0x"+e),gi(e))?e.toLowerCase():mm.throwArgumentError("invalid hash","value",e)}data(e,n){const r=this.hex(e,n);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return Ds(e)}callAddress(e){if(!gi(e,32))return null;const n=Ds(Ms(e,12));return"0x0000000000000000000000000000000000000000"===n?null:n}contractAddress(e){return function BK(t){let e=null;try{e=Ds(t.from)}catch{Cf.throwArgumentError("missing from address","transaction",t)}return Ds(Ms(No(hb([e,Ap(_r(Un.from(t.nonce).toHexString()))])),12))}(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||gi(e))return xE(e);throw new Error("invalid blockTag")}hash(e,n){const r=this.hex(e,n);return 32!==oh(r)?mm.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const n=Un.from(e);try{return n.toNumber()}catch{}return null}uint256(e){if(!gi(e))throw new Error("invalid uint256");return ro(e,32)}_block(e,n){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,u=Fn.check(n,e);return u._difficulty=null==r?null:Un.from(r),u}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Fn.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&Un.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),(1===e.type||2===e.type)&&null==e.accessList&&(e.accessList=[]);const n=Fn.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;gi(r)&&(r=Un.from(r).toNumber()),n.chainId=r}else{let r=e.networkId;null==r&&null==n.v&&(r=e.chainId),gi(r)&&(r=Un.from(r).toNumber()),"number"!=typeof r&&null!=n.v&&(r=(n.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),n.chainId=r}return n.blockHash&&"x"===n.blockHash.replace(/0/g,"")&&(n.blockHash=null),n}transaction(e){return gz(e)}receiptLog(e){return Fn.check(this.formats.receiptLog,e)}receipt(e){const n=Fn.check(this.formats.receipt,e);if(null!=n.root)if(n.root.length<=4){const r=Un.from(n.root).toNumber();0===r||1===r?(null!=n.status&&n.status!==r&&mm.throwArgumentError("alt-root-status/status mismatch","value",{root:n.root,status:n.status}),n.status=r,delete n.root):mm.throwArgumentError("invalid alt-root-status","value.root",n.root)}else 66!==n.root.length&&mm.throwArgumentError("invalid root hash","value.root",n.root);return null!=n.status&&(n.byzantium=!0),n}topics(e){return Array.isArray(e)?e.map(n=>this.topics(n)):null!=e?this.hash(e,!0):null}filter(e){return Fn.check(this.formats.filter,e)}filterLog(e){return Fn.check(this.formats.filterLog,e)}static check(e,n){const r={};for(const u in e)try{const v=e[u](n[u]);void 0!==v&&(r[u]=v)}catch(v){throw v.checkKey=u,v.checkValue=n[u],v}return r}static allowNull(e,n){return function(r){return null==r?n:e(r)}}static allowFalsish(e,n){return function(r){return r?e(r):n}}static arrayOf(e){return function(n){if(!Array.isArray(n))throw new Error("not an array");const r=[];return n.forEach(function(u){r.push(e(u))}),r}}}var gr=function(t,e,n,r){return new(n||(n=Promise))(function(v,O){function Y(ue){try{ie(r.next(ue))}catch(he){O(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){O(he)}}function ie(ue){ue.done?v(ue.value):function u(v){return v instanceof n?v:new n(function(O){O(v)})}(ue.value).then(Y,$)}ie((r=r.apply(t,e||[])).next())})};const Dr=new zt(fb);function oI(t){return null==t?"null":(32!==oh(t)&&Dr.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function sI(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map(e=>{if(Array.isArray(e)){const n={};e.forEach(u=>{n[oI(u)]=!0});const r=Object.keys(n);return r.sort(),r.join("|")}return oI(e)}).join("&")}function Sp(t){if("string"==typeof t){if(32===oh(t=t.toLowerCase()))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+sI(t);if(_z.isForkEvent(t))throw Dr.warn("not implemented"),new Error("not implemented");if(t&&"object"==typeof t)return"filter:"+(t.address||"*")+":"+sI(t.topics||[])}throw new Error("invalid event - "+t)}function vm(){return(new Date).getTime()}function aI(t){return new Promise(e=>{setTimeout(e,t)})}const sV=["block","network","pending","poll"];class aV{constructor(e,n,r){Pr(this,"tag",e),Pr(this,"listener",n),Pr(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const n=e[1],r=function oV(t){return""===t?[]:t.split(/&/g).map(e=>{if(""===e)return[];const n=e.split("|").map(r=>"null"===r?null:r);return 1===n.length?n[0]:n})}(e[2]),u={};return r.length>0&&(u.topics=r),n&&"*"!==n&&(u.address=n),u}pollable(){return this.tag.indexOf(":")>=0||sV.indexOf(this.tag)>=0}}const uV={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function qE(t){return ro(Un.from(t).toHexString(),32)}function uI(t){return XE.encode(If([t,Ms(nI(nI(t)),0,4)]))}const cI=new RegExp("^(ipfs)://(.*)$","i"),lI=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),cI,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Db(t,e){try{return cb(bm(t,e))}catch{}return null}function bm(t,e){if("0x"===t)return null;const n=Un.from(Ms(t,e,e+32)).toNumber(),r=Un.from(Ms(t,n,n+32)).toNumber();return Ms(t,n+32,n+32+r)}function $E(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Dr.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function fI(t){const e=_r(t);if(e.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(e,32-e.length),n}function cV(t){if(t.length%32==0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function dI(t){const e=[];let n=0;for(let r=0;rUn.from(e).eq(1)).catch(e=>{if(e.code===zt.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,n){return gr(this,void 0,void 0,function*(){const r={to:this.address,ccipReadEnabled:!0,data:ma([e,Sb(this.name),n||"0x"])};let u=!1;(yield this.supportsWildcard())&&(u=!0,r.data=ma(["0x9061b923",dI([Jz(this.name),r.data])]));try{let v=yield this.provider.call(r);return _r(v).length%32==4&&Dr.throwError("resolver threw error",zt.errors.CALL_EXCEPTION,{transaction:r,data:v}),u&&(v=bm(v,0)),v}catch(v){if(v.code===zt.errors.CALL_EXCEPTION)return null;throw v}})}_fetchBytes(e,n){return gr(this,void 0,void 0,function*(){const r=yield this._fetch(e,n);return null!=r?bm(r,0):null})}_getAddress(e,n){const r=uV[String(e)];if(null==r&&Dr.throwError(`unsupported coin type: ${e}`,zt.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(n);const u=_r(n);if(null!=r.p2pkh){const v=n.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(v){const O=parseInt(v[1],16);if(v[2].length===2*O&&O>=1&&O<=75)return uI(If([[r.p2pkh],"0x"+v[2]]))}}if(null!=r.p2sh){const v=n.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(v){const O=parseInt(v[1],16);if(v[2].length===2*O&&O>=1&&O<=75)return uI(If([[r.p2sh],"0x"+v[2]]))}}if(null!=r.prefix){const v=u[1];let O=u[0];if(0===O?20!==v&&32!==v&&(O=-1):O=-1,O>=0&&u.length===2+v&&v>=1&&v<=75){const Y=rI().toWords(u.slice(2));return Y.unshift(O),rI().encode(r.prefix,Y)}}return null}getAddress(e){return gr(this,void 0,void 0,function*(){if(null==e&&(e=60),60===e)try{const u=yield this._fetch("0x3b3b57de");return"0x"===u||"0x0000000000000000000000000000000000000000000000000000000000000000"===u?null:this.provider.formatter.callAddress(u)}catch(u){if(u.code===zt.errors.CALL_EXCEPTION)return null;throw u}const n=yield this._fetchBytes("0xf1cb7e06",qE(e));if(null==n||"0x"===n)return null;const r=this._getAddress(e,n);return null==r&&Dr.throwError("invalid or unsupported coin data",zt.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:n}),r})}getAvatar(){return gr(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const n=yield this.getText("avatar");if(null==n)return null;for(let r=0;rO[$])}return Dr.throwError("invalid or unsupported content hash data",zt.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return gr(this,void 0,void 0,function*(){let n=hl(e);n=If([qE(64),qE(n.length),n]),n.length%32!=0&&(n=If([n,ro("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",pr(n));return null==r||"0x"===r?null:cb(r)})}}let e3=null,lV=1;class fV extends QE{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),Pr(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(n=>{}),this._ready().catch(n=>{});else{const n=fm(new.target,"getNetwork")(e);n?(Pr(this,"_network",n),this.emit("network",n,null)):Dr.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return gr(this,void 0,void 0,function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}null==e&&(e=yield this.detectNetwork()),e||Dr.throwError("no network detected",zt.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:Pr(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return gm(()=>this._ready().then(e=>e,e=>{if(e.code!==zt.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}static getFormatter(){return null==e3&&(e3=new Fn),e3}static getNetwork(e){return function qz(t){if(null==t)return null;if("number"==typeof t){for(const r in Mb){const u=Mb[r];if(u.chainId===t)return{name:u.name,chainId:u.chainId,ensAddress:u.ensAddress||null,_defaultProvider:u._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"==typeof t){const r=Mb[t];return null==r?null:{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress,_defaultProvider:r._defaultProvider||null}}const e=Mb[t.name];if(!e)return"number"!=typeof t.chainId&&qD.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&qD.throwArgumentError("network chainId mismatch","network",t);let n=t._defaultProvider||null;return null==n&&e._defaultProvider&&(n=function Xz(t){return t&&"function"==typeof t.renetwork}(e._defaultProvider)?e._defaultProvider.renetwork(t):e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:n}}(e??"homestead")}ccipReadFetch(e,n,r){return gr(this,void 0,void 0,function*(){if(this.disableCcipRead||0===r.length)return null;const u=e.to.toLowerCase(),v=n.toLowerCase(),O=[];for(let Y=0;Y=0?null:JSON.stringify({data:v,sender:u}),he=yield JE({url:ie,errorPassThrough:!0},ue,(xe,Ce)=>(xe.status=Ce.statusCode,xe));if(he.data)return he.data;const we=he.message||"unknown error";if(he.status>=400&&he.status<500)return Dr.throwError(`response not found during CCIP fetch: ${we}`,zt.errors.SERVER_ERROR,{url:$,errorMessage:we});O.push(we)}return Dr.throwError(`error encountered during CCIP fetch: ${O.map(Y=>JSON.stringify(Y)).join(", ")}`,zt.errors.SERVER_ERROR,{urls:r,errorMessages:O})})}_getInternalBlockNumber(e){return gr(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const u=this._internalBlockNumber;try{const v=yield u;if(vm()-v.respTime<=e)return v.blockNumber;break}catch{if(this._internalBlockNumber===u)break}}const n=vm(),r=Ro({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(u=>null,u=>u)}).then(({blockNumber:u,networkError:v})=>{if(v)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),v;const O=vm();return(u=Un.from(u).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)}),(yield r).blockNumber})}poll(){return gr(this,void 0,void 0,function*(){const e=lV++,n=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(u){return void this.emit("error",u)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)Dr.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",Dr.makeError("network block skew detected",zt.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let u=this._emitted.block+1;u<=r;u++)this.emit("block",u);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach(u=>{if("block"===u)return;const v=this._emitted[u];"pending"!==v&&r-v>12&&delete this._emitted[u]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach(u=>{switch(u.type){case"tx":{const v=u.hash;let O=this.getTransactionReceipt(v).then(Y=>(!Y||null==Y.blockNumber||(this._emitted["t:"+v]=Y.blockNumber,this.emit(v,Y)),null)).catch(Y=>{this.emit("error",Y)});n.push(O);break}case"filter":if(!u._inflight){u._inflight=!0,-2===u._lastBlockNumber&&(u._lastBlockNumber=r-1);const v=u.filter;v.fromBlock=u._lastBlockNumber+1,v.toBlock=r;const O=v.toBlock-this._maxFilterBlockRange;O>v.fromBlock&&(v.fromBlock=O),v.fromBlock<0&&(v.fromBlock=0);const Y=this.getLogs(v).then($=>{u._inflight=!1,0!==$.length&&$.forEach(ie=>{ie.blockNumber>u._lastBlockNumber&&(u._lastBlockNumber=ie.blockNumber),this._emitted["b:"+ie.blockHash]=ie.blockNumber,this._emitted["t:"+ie.transactionHash]=ie.blockNumber,this.emit(v,ie)})}).catch($=>{this.emit("error",$),u._inflight=!1});n.push(Y)}}}),this._lastBlockNumber=r,Promise.all(n).then(()=>{this.emit("didPoll",e)}).catch(u=>{this.emit("error",u)})}else this.emit("didPoll",e)})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return gr(this,void 0,void 0,function*(){return Dr.throwError("provider does not support network detection",zt.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return gr(this,void 0,void 0,function*(){const e=yield this._ready(),n=yield this.detectNetwork();if(e.chainId!==n.chainId){if(this.anyNetwork)return this._network=n,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",n,e),yield aI(0),this._network;const r=Dr.makeError("underlying network changed",zt.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:n});throw this.emit("error",r),r}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=vm();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(n=>((null==this._fastBlockNumber||n>this._fastBlockNumber)&&(this._fastBlockNumber=n),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,n,r){return gr(this,void 0,void 0,function*(){return this._waitForTransaction(e,n??1,r||0,null)})}_waitForTransaction(e,n,r,u){return gr(this,void 0,void 0,function*(){const v=yield this.getTransactionReceipt(e);return(v?v.confirmations:0)>=n?v:new Promise((O,Y)=>{const $=[];let ie=!1;const ue=function(){return!!ie||(ie=!0,$.forEach(we=>{we()}),!1)},he=we=>{we.confirmations{this.removeListener(e,he)}),u){let we=u.startBlock,xe=null;const Ce=Le=>gr(this,void 0,void 0,function*(){ie||(yield aI(1e3),this.getTransactionCount(u.from).then(je=>gr(this,void 0,void 0,function*(){if(!ie){if(je<=u.nonce)we=Le;else{{const Ue=yield this.getTransaction(e);if(Ue&&null!=Ue.blockNumber)return}for(null==xe&&(xe=we-3,xe{ie||this.once("block",Ce)}))});if(ie)return;this.once("block",Ce),$.push(()=>{this.removeListener("block",Ce)})}if("number"==typeof r&&r>0){const we=setTimeout(()=>{ue()||Y(Dr.makeError("timeout exceeded",zt.errors.TIMEOUT,{timeout:r}))},r);we.unref&&we.unref(),$.push(()=>{clearTimeout(we)})}})})}getBlockNumber(){return gr(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Un.from(e)}catch(n){return Dr.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:n})}})}getBalance(e,n){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),u=yield this.perform("getBalance",r);try{return Un.from(u)}catch(v){return Dr.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getBalance",params:r,result:u,error:v})}})}getTransactionCount(e,n){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),u=yield this.perform("getTransactionCount",r);try{return Un.from(u).toNumber()}catch(v){return Dr.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:u,error:v})}})}getCode(e,n){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),u=yield this.perform("getCode",r);try{return pr(u)}catch(v){return Dr.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getCode",params:r,result:u,error:v})}})}getStorageAt(e,n,r){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const u=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(n).then(O=>xE(O))}),v=yield this.perform("getStorageAt",u);try{return pr(v)}catch(O){return Dr.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getStorageAt",params:u,result:v,error:O})}})}_wrapTransaction(e,n,r){if(null!=n&&32!==oh(n))throw new Error("invalid response - sendTransaction");const u=e;return null!=n&&e.hash!==n&&Dr.throwError("Transaction hash mismatch from Provider.sendTransaction.",zt.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:n}),u.wait=(v,O)=>gr(this,void 0,void 0,function*(){let Y;null==v&&(v=1),null==O&&(O=0),0!==v&&null!=r&&(Y={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const $=yield this._waitForTransaction(e.hash,v,O,Y);return null==$&&0===v?null:(this._emitted["t:"+e.hash]=$.blockNumber,0===$.status&&Dr.throwError("transaction failed",zt.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:$}),$)}),u}sendTransaction(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Promise.resolve(e).then(v=>pr(v)),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const u=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const v=yield this.perform("sendTransaction",{signedTransaction:n});return this._wrapTransaction(r,v,u)}catch(v){throw v.transaction=r,v.transactionHash=r.hash,v}})}_getTransactionRequest(e){return gr(this,void 0,void 0,function*(){const n=yield e,r={};return["from","to"].forEach(u=>{null!=n[u]&&(r[u]=Promise.resolve(n[u]).then(v=>v?this._getAddress(v):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(u=>{null!=n[u]&&(r[u]=Promise.resolve(n[u]).then(v=>v?Un.from(v):null))}),["type"].forEach(u=>{null!=n[u]&&(r[u]=Promise.resolve(n[u]).then(v=>v??null))}),n.accessList&&(r.accessList=this.formatter.accessList(n.accessList)),["data"].forEach(u=>{null!=n[u]&&(r[u]=Promise.resolve(n[u]).then(v=>v?pr(v):null))}),this.formatter.transactionRequest(yield Ro(r))})}_getFilter(e){return gr(this,void 0,void 0,function*(){e=yield e;const n={};return null!=e.address&&(n.address=this._getAddress(e.address)),["blockHash","topics"].forEach(r=>{null!=e[r]&&(n[r]=e[r])}),["fromBlock","toBlock"].forEach(r=>{null!=e[r]&&(n[r]=this._getBlockTag(e[r]))}),this.formatter.filter(yield Ro(n))})}_call(e,n,r){return gr(this,void 0,void 0,function*(){r>=10&&Dr.throwError("CCIP read exceeded maximum redirections",zt.errors.SERVER_ERROR,{redirects:r,transaction:e});const u=e.to,v=yield this.perform("call",{transaction:e,blockTag:n});if(r>=0&&"latest"===n&&null!=u&&"0x556f1830"===v.substring(0,10)&&oh(v)%32==4)try{const O=Ms(v,4),Y=Ms(O,0,32);Un.from(Y).eq(u)||Dr.throwError("CCIP Read sender did not match",zt.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:v});const $=[],ie=Un.from(Ms(O,32,64)).toNumber(),ue=Un.from(Ms(O,ie,ie+32)).toNumber(),he=Ms(O,ie+32);for(let Ue=0;Uegr(this,void 0,void 0,function*(){const v=yield this.perform("getBlock",u);if(null==v)return null!=u.blockHash&&null==this._emitted["b:"+u.blockHash]||null!=u.blockTag&&r>this._emitted.block?null:void 0;if(n){let O=null;for(let $=0;$this._wrapTransaction($)),Y}return this.formatter.block(v)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const n={transactionHash:this.formatter.hash(e,!0)};return gm(()=>gr(this,void 0,void 0,function*(){const r=yield this.perform("getTransaction",n);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const u=this.formatter.transactionResponse(r);if(null==u.blockNumber)u.confirmations=0;else if(null==u.confirmations){let O=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-u.blockNumber+1;O<=0&&(O=1),u.confirmations=O}return this._wrapTransaction(u)}),{oncePoll:this})})}getTransactionReceipt(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const n={transactionHash:this.formatter.hash(e,!0)};return gm(()=>gr(this,void 0,void 0,function*(){const r=yield this.perform("getTransactionReceipt",n);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const u=this.formatter.receipt(r);if(null==u.blockNumber)u.confirmations=0;else if(null==u.confirmations){let O=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-u.blockNumber+1;O<=0&&(O=1),u.confirmations=O}return u}),{oncePoll:this})})}getLogs(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ro({filter:this._getFilter(e)}),r=yield this.perform("getLogs",n);return r.forEach(u=>{null==u.removed&&(u.removed=!1)}),Fn.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)})}getEtherPrice(){return gr(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return gr(this,void 0,void 0,function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&Dr.throwArgumentError("invalid BlockTag","blockTag",e);let n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return n+=e,n<0&&(n=0),this.formatter.blockTag(n)}return this.formatter.blockTag(e)})}getResolver(e){return gr(this,void 0,void 0,function*(){let n=e;for(;;){if(""===n||"."===n||"eth"!==e&&"eth"===n)return null;const r=yield this._getResolver(n,"getResolver");if(null!=r){const u=new hI(this,r,e);return n===e||(yield u.supportsWildcard())?u:null}n=n.split(".").slice(1).join(".")}})}_getResolver(e,n){return gr(this,void 0,void 0,function*(){null==n&&(n="ENS");const r=yield this.getNetwork();r.ensAddress||Dr.throwError("network does not support ENS",zt.errors.UNSUPPORTED_OPERATION,{operation:n,network:r.name});try{const u=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+Sb(e).substring(2)});return this.formatter.callAddress(u)}catch{}return null})}resolveName(e){return gr(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(r){if(gi(e))throw r}"string"!=typeof e&&Dr.throwArgumentError("invalid ENS name","name",e);const n=yield this.getResolver(e);return n?yield n.getAddress():null})}lookupAddress(e){return gr(this,void 0,void 0,function*(){e=yield e;const n=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(n,"lookupAddress");if(null==r)return null;const u=Db(yield this.call({to:r,data:"0x691f3431"+Sb(n).substring(2)}),0);return(yield this.resolveName(u))!=e?null:u})}getAvatar(e){return gr(this,void 0,void 0,function*(){let n=null;if(gi(e)){const v=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",O=yield this._getResolver(v,"getAvatar");if(!O)return null;n=new hI(this,O,v);try{const Y=yield n.getAvatar();if(Y)return Y.url}catch(Y){if(Y.code!==zt.errors.CALL_EXCEPTION)throw Y}try{const Y=Db(yield this.call({to:O,data:"0x691f3431"+Sb(v).substring(2)}),0);n=yield this.getResolver(Y)}catch(Y){if(Y.code!==zt.errors.CALL_EXCEPTION)throw Y;return null}}else if(n=yield this.getResolver(e),!n)return null;const r=yield n.getAvatar();return null==r?null:r.url})}perform(e,n){return Dr.throwError(e+" not implemented",zt.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(n=>n.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(n=>n.pollable()).length>0}_addEventListener(e,n,r){const u=new aV(Sp(e),n,r);return this._events.push(u),this._startEvent(u),this}on(e,n){return this._addEventListener(e,n,!1)}once(e,n){return this._addEventListener(e,n,!0)}emit(e,...n){let r=!1,u=[],v=Sp(e);return this._events=this._events.filter(O=>O.tag!==v||(setTimeout(()=>{O.listener.apply(this,n)},0),r=!0,!O.once||(u.push(O),!1))),u.forEach(O=>{this._stopEvent(O)}),r}listenerCount(e){if(!e)return this._events.length;let n=Sp(e);return this._events.filter(r=>r.tag===n).length}listeners(e){if(null==e)return this._events.map(r=>r.listener);let n=Sp(e);return this._events.filter(r=>r.tag===n).map(r=>r.listener)}off(e,n){if(null==n)return this.removeAllListeners(e);const r=[];let u=!1,v=Sp(e);return this._events=this._events.filter(O=>!(O.tag===v&&O.listener==n&&!u)||(u=!0,r.push(O),!1)),r.forEach(O=>{this._stopEvent(O)}),this}removeAllListeners(e){let n=[];if(null==e)n=this._events,this._events=[];else{const r=Sp(e);this._events=this._events.filter(u=>u.tag!==r||(n.push(u),!1))}return n.forEach(r=>{this._stopEvent(r)}),this}}var yl=function(t,e,n,r){return new(n||(n=Promise))(function(v,O){function Y(ue){try{ie(r.next(ue))}catch(he){O(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){O(he)}}function ie(ue){ue.done?v(ue.value):function u(v){return v instanceof n?v:new n(function(O){O(v)})}(ue.value).then(Y,$)}ie((r=r.apply(t,e||[])).next())})};const io=new zt(fb),dV=["call","estimateGas"];function wm(t,e){if(null==t)return null;if("string"==typeof t.message&&t.message.match("reverted")){const n=gi(t.data)?t.data:null;if(!e||n)return{message:t.message,data:n}}if("object"==typeof t){for(const n in t){const r=wm(t[n],e);if(r)return r}return null}if("string"==typeof t)try{return wm(JSON.parse(t),e)}catch{}return null}function pI(t,e,n){const r=n.transaction||n.signedTransaction;if("call"===t){const v=wm(e,!0);if(v)return v.data;io.throwError("missing revert data in call exception; Transaction reverted without a reason string",zt.errors.CALL_EXCEPTION,{data:"0x",transaction:r,error:e})}if("estimateGas"===t){let v=wm(e.body,!1);null==v&&(v=wm(e,!1)),v&&io.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",zt.errors.UNPREDICTABLE_GAS_LIMIT,{reason:v.message,method:t,transaction:r,error:e})}let u=e.message;throw e.code===zt.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?u=e.error.message:"string"==typeof e.body?u=e.body:"string"==typeof e.responseText&&(u=e.responseText),u=(u||"").toLowerCase(),u.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&io.throwError("insufficient funds for intrinsic transaction cost",zt.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:r}),u.match(/nonce (is )?too low/i)&&io.throwError("nonce has already been used",zt.errors.NONCE_EXPIRED,{error:e,method:t,transaction:r}),u.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&io.throwError("replacement fee too low",zt.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:r}),u.match(/only replay-protected/i)&&io.throwError("legacy pre-eip-155 transactions not supported",zt.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:r}),dV.indexOf(t)>=0&&u.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&io.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",zt.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:r}),e}function gI(t){return new Promise(function(e){setTimeout(e,t)})}function hV(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function Am(t){return t&&t.toLowerCase()}const t3={};class yI extends NE{constructor(e,n,r){if(super(),e!==t3)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");Pr(this,"provider",n),null==r&&(r=0),"string"==typeof r?(Pr(this,"_address",this.provider.formatter.address(r)),Pr(this,"_index",null)):"number"==typeof r?(Pr(this,"_index",r),Pr(this,"_address",null)):io.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return io.throwError("cannot alter JSON-RPC Signer connection",zt.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new pV(t3,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&io.throwError("unknown account #"+this._index,zt.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Gs(e);const n=this.getAddress().then(r=>(r&&(r=r.toLowerCase()),r));if(null==e.gasLimit){const r=Gs(e);r.from=n,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then(r=>yl(this,void 0,void 0,function*(){if(null==r)return null;const u=yield this.provider.resolveName(r);return null==u&&io.throwArgumentError("provided ENS name resolves to null","tx.to",r),u}))),Ro({tx:Ro(e),sender:n}).then(({tx:r,sender:u})=>{null!=r.from?r.from.toLowerCase()!==u&&io.throwArgumentError("from address mismatch","transaction",e):r.from=u;const v=this.provider.constructor.hexlifyTransaction(r,{from:!0});return this.provider.send("eth_sendTransaction",[v]).then(O=>O,O=>("string"==typeof O.message&&O.message.match(/user denied/i)&&io.throwError("user rejected transaction",zt.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:r}),pI("sendTransaction",O,v)))})}signTransaction(e){return io.throwError("signing transactions is unsupported",zt.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return yl(this,void 0,void 0,function*(){const n=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield gm(()=>yl(this,void 0,void 0,function*(){const u=yield this.provider.getTransaction(r);if(null!==u)return this.provider._wrapTransaction(u,r,n)}),{oncePoll:this.provider})}catch(u){throw u.transactionHash=r,u}})}signMessage(e){return yl(this,void 0,void 0,function*(){const n="string"==typeof e?hl(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[pr(n),r.toLowerCase()])}catch(u){throw"string"==typeof u.message&&u.message.match(/user denied/i)&&io.throwError("user rejected signing",zt.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),u}})}_legacySignMessage(e){return yl(this,void 0,void 0,function*(){const n="string"==typeof e?hl(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),pr(n)])}catch(u){throw"string"==typeof u.message&&u.message.match(/user denied/i)&&io.throwError("user rejected signing",zt.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),u}})}_signTypedData(e,n,r){return yl(this,void 0,void 0,function*(){const u=yield ba.resolveNames(e,n,r,O=>this.provider.resolveName(O)),v=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[v.toLowerCase(),JSON.stringify(ba.getPayload(u.domain,n,u.value))])}catch(O){throw"string"==typeof O.message&&O.message.match(/user denied/i)&&io.throwError("user rejected signing",zt.errors.ACTION_REJECTED,{action:"_signTypedData",from:v,messageData:{domain:u.domain,types:n,value:u.value}}),O}})}unlock(e){return yl(this,void 0,void 0,function*(){const n=this.provider,r=yield this.getAddress();return n.send("personal_unlockAccount",[r.toLowerCase(),e,null])})}}class pV extends yI{sendTransaction(e){return this.sendUncheckedTransaction(e).then(n=>({hash:n,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:r=>this.provider.waitForTransaction(n,r)}))}}const gV={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class yV extends fV{constructor(e,n){let r=n;null==r&&(r=new Promise((u,v)=>{setTimeout(()=>{this.detectNetwork().then(O=>{u(O)},O=>{v(O)})},0)})),super(r),e||(e=fm(this.constructor,"defaultUrl")()),Pr(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(Gs(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return yl(this,void 0,void 0,function*(){yield gI(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(null!=e){const n=fm(this.constructor,"getNetwork");try{return n(Un.from(e).toNumber())}catch(r){return io.throwError("could not detect network",zt.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:r})}}return io.throwError("could not detect network",zt.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new yI(t3,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(n=>this.formatter.address(n)))}send(e,n){const r={method:e,params:n,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:sh(r),provider:this});const u=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(u&&this._cache[e])return this._cache[e];const v=JE(this.connection,JSON.stringify(r),hV).then(O=>(this.emit("debug",{action:"response",request:r,response:O,provider:this}),O),O=>{throw this.emit("debug",{action:"response",error:O,request:r,provider:this}),O});return u&&(this._cache[e]=v,setTimeout(()=>{this._cache[e]=null},0)),v}prepareRequest(e,n){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Am(n.address),n.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Am(n.address),n.blockTag]];case"getCode":return["eth_getCode",[Am(n.address),n.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Am(n.address),ro(n.position,32),n.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[n.signedTransaction]];case"getBlock":return n.blockTag?["eth_getBlockByNumber",[n.blockTag,!!n.includeTransactions]]:n.blockHash?["eth_getBlockByHash",[n.blockHash,!!n.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[n.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[n.transactionHash]];case"call":return["eth_call",[fm(this.constructor,"hexlifyTransaction")(n.transaction,{from:!0}),n.blockTag]];case"estimateGas":return["eth_estimateGas",[fm(this.constructor,"hexlifyTransaction")(n.transaction,{from:!0})]];case"getLogs":return n.filter&&null!=n.filter.address&&(n.filter.address=Am(n.filter.address)),["eth_getLogs",[n.filter]]}return null}perform(e,n){return yl(this,void 0,void 0,function*(){if("call"===e||"estimateGas"===e){const u=n.transaction;if(u&&null!=u.type&&Un.from(u.type).isZero()&&null==u.maxFeePerGas&&null==u.maxPriorityFeePerGas){const v=yield this.getFeeData();null==v.maxFeePerGas&&null==v.maxPriorityFeePerGas&&((n=Gs(n)).transaction=Gs(u),delete n.transaction.type)}}const r=this.prepareRequest(e,n);null==r&&io.throwError(e+" not implemented",zt.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(u){return pI(e,u,n)}})}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,n=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=n,n.then(function(r){return function u(){e.send("eth_getFilterChanges",[r]).then(function(v){if(e._pendingFilter!=n)return null;let O=Promise.resolve();return v.forEach(function(Y){e._emitted["t:"+Y.toLowerCase()]="pending",O=O.then(function(){return e.getTransaction(Y).then(function($){return e.emit("pending",$),null})})}),O.then(function(){return gI(1e3)})}).then(function(){if(e._pendingFilter==n)return setTimeout(function(){u()},0),null;e.send("eth_uninstallFilter",[r])}).catch(v=>{})}(),r}).catch(r=>{})}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,n){const r=Gs(gV);if(n)for(const v in n)n[v]&&(r[v]=!0);!function MK(t,e){(!t||"object"!=typeof t)&&lb.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(n=>{e[n]||lb.throwArgumentError("invalid object key - "+n,"transaction:"+n,t)})}(e,r);const u={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(v){if(null==e[v])return;const O=xE(Un.from(e[v]));"gasLimit"===v&&(v="gas"),u[v]=O}),["from","to","data"].forEach(function(v){null!=e[v]&&(u[v]=pr(e[v]))}),e.accessList&&(u.accessList=pm(e.accessList)),u}}const mI=new zt(fb);let mV=1;function vI(t,e){const n="Web3LegacyFetcher";return function(r,u){const v={method:r,params:u,id:mV++,jsonrpc:"2.0"};return new Promise((O,Y)=>{this.emit("debug",{action:"request",fetcher:n,request:sh(v),provider:this}),e(v,($,ie)=>{if($)return this.emit("debug",{action:"response",fetcher:n,error:$,request:v,provider:this}),Y($);if(this.emit("debug",{action:"response",fetcher:n,request:v,response:ie,provider:this}),ie.error){const ue=new Error(ie.error.message);return ue.code=ie.error.code,ue.data=ie.error.data,Y(ue)}O(ie.result)})})}}class bI extends yV{constructor(e,n){null==e&&mI.throwArgumentError("missing provider","provider",e);let r=null,u=null,v=null;"function"==typeof e?(r="unknown:",u=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),v=e,e.request?(""===r&&(r="eip-1193:"),u=function vV(t){return function(e,n){null==n&&(n=[]);const r={method:e,params:n};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:sh(r),provider:this}),t.request(r).then(u=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:r,response:u,provider:this}),u),u=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:r,error:u,provider:this}),u})}}(e)):e.sendAsync?u=vI(0,e.sendAsync.bind(e)):e.send?u=vI(0,e.send.bind(e)):mI.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,n),Pr(this,"jsonRpcFetchFunc",u),Pr(this,"provider",v)}send(e,n){return this.jsonRpcFetchFunc(e,n)}}var bV=p(21087);const{Near:wV,Account:Ib,KeyPair:n3,keyStores:{BrowserLocalStorageKeyStore:AV},transactions:{addKey:Fse,deleteKey:Bse,functionCallAccessKey:jse},utils:{PublicKey:EV,format:{parseNearAmount:uh}}}=Jn,Cb="https://neth.app",_V={testnet:{FUNDING_ACCOUNT_ID:"neth.testnet",MAP_ACCOUNT_ID:"map.neth.testnet",ROOT_ACCOUNT_ID:"testnet"},mainnet:{MAP_ACCOUNT_ID:"nethmap.near",ROOT_ACCOUNT_ID:"near"}},xb="__TX_ARGS_ATTEMPT",Em="__APP_KEY_SECRET",_p="__APP_KEY_ACCOUNT_ID",wI=(uh("0.4"),uh("0.49"),uh("0.5"),uh("0.05"),(t="")=>({getItem:e=>{const n=localStorage.getItem(t+e);if("{"!==n?.charAt(0))return n;try{return JSON.parse(n)}catch{}},setItem:(e,n)=>localStorage.setItem(t+e,"string"==typeof n?n:JSON.stringify(n)),removeItem:e=>localStorage.removeItem(t+e)})),TV=()=>({log:t=>console.log(...t)});let r3,i3,Mp,ml,is,Dp,Ea,Tb,AI;const o3=t=>pr(EV.fromString(t).data).substring(2),EI=t=>t.some(e=>{const n=e?.access_key?.permission?.FunctionCall;return null!==n.allowance&&"execute"===n.method_names[0]}),PV=function(){var t=(0,ke.Z)(function*(e,n){const{account:r,accountId:u}=yield SI(e,n),v=parseInt(yield r.viewFunction({contractId:u,methodName:"get_nonce"}),16).toString(),{publicKey:O,secretKey:Y}=yield Pb(e,s3(u,v)),$=o3(O),ie=[{type:"AddKey",public_key:$,allowance:uh("1"),receiver_id:u,method_names:"execute"}],ue=yield r.getAccessKeys();if(EI(ue)){const xe=parseInt(yield r.viewFunction({contractId:u,methodName:"get_app_key_nonce"}),16).toString(),{publicKey:Ce}=yield Pb(e,s3(u,xe)),Le=o3(Ce);ie.unshift({type:"DeleteKey",public_key:Le})}const he=yield Ob(e,{nonce:v,receivers:[u],transactions:[{actions:ie}]});return""!==(yield r.functionCall({contractId:u,methodName:"execute",args:he,gas:i3}))?.status?.SuccessValue?ml.log("App key rotation unsuccessful. Please refresh the page and try again."):(yield is.removeItem(Em),yield is.removeItem(_p),{publicKey:$,secretKey:Y})});return function(n,r){return t.apply(this,arguments)}}(),SI=function(){var t=(0,ke.Z)(function*(e,n,r=!1){let u,v=yield is.getItem("__ATTEMPT_SECRET_KEY");if(v)u=yield is.getItem("__ATTEMPT_ACCOUNT_ID");else{u=yield CI(n);const{secretKey:ue}=yield Pb(e,NV(u,r));v=ue}const O=new Ib(Dp,u),Y=n3.fromString(v),$=Y.getPublicKey().toString();return(yield O.getAccessKeys()).some(({public_key:ue})=>$===ue)?(Mp.setKey(Ea,u,Y),{account:O,accountId:u,secretKey:v}):yield SI(e,n,!0)});return function(n,r){return t.apply(this,arguments)}}(),s3=(t,e)=>({WARNING:`Creating key for: ${t}`,nonce:e,description:"ONLY sign this on apps you trust! This key CAN use up to 1 N for transactions."}),NV=(t,e)=>({WARNING:`Creates a key with access to your (new) paired NEAR Account: ${t}`,description:`ONLY sign this message on this website: ${e?"neardefi.github.io/neth":Cb}`}),a3={name:"NETH",version:"1",chainId:1313161554},DI=t=>t.map(e=>{const n="string"==typeof e?e:Object.entries(e).map(([u,v])=>`|NETH_${u}:${"string"==typeof v?v:JSON.stringify(v)}_NETH|`).join("");return"NETH"+n.length.toString().padStart(8,"0")+"__"+n}).join(""),Ob=function(){var t=(0,ke.Z)(function*(e,n){const u={Transaction:[]};if(Object.entries(n).forEach(([Y])=>{u.Transaction.push({type:"string",name:Y})}),n.transactions&&(Object.values(n.transactions).forEach((Y,$)=>{Y.actions.forEach(ie=>{if(ie.args){if(Buffer.isBuffer(ie.args))return void(ie.args="0x"+ie.args.toString("hex"));Object.entries(ie.args).forEach(([ue,he])=>{/receiver_id|account_id/g.test(ue)&&(ie.args[ue]="|~-_NETH~-_-~RECEIVER_-~|",n.receivers.splice($+1,0,he))})}})}),n.transactions=DI(n.transactions.map(({actions:Y})=>DI(Y)))),n.receivers){const Y=n.receivers.length.toString();n.receivers="NETH"+n.receivers.join(",").length.toString().padStart(8,"0")+"__"+n.receivers.join(","),n.receivers=n.receivers.substring(0,4)+Y.padStart(3,"0")+n.receivers.substring(7)}return{sig:yield e._signTypedData(a3,u,n),msg:n}});return function(n,r){return t.apply(this,arguments)}}(),Pb=function(){var t=(0,ke.Z)(function*(e,n){const{sig:r}=yield Ob(e,n),u=PE(r);return(0,bV.generateSeedPhrase)(u.substring(2,34))});return function(n,r){return t.apply(this,arguments)}}(),II=function(){var t=(0,ke.Z)(function*(){if(!(yield _E()()))return alert("Please install/activate MetaMask and try again.");try{yield window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+a3.chainId.toString(16)}]})}catch(v){if(ml.log(v),4902!==(v?.code||v?.data?.originalError?.code))throw v;try{yield window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0x"+a3.chainId.toString(16),chainName:"Aurora Mainnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},blockExplorerUrls:["https://explorer.mainnet.aurora.dev/"],rpcUrls:["https://mainnet.aurora.dev"]}]})}catch(Y){throw alert('Error adding chain. Please click "Choose Ethereum Account" and add the Aurora Network to continue.'),Y}}const n=new bI(window.ethereum);0===(yield n.listAccounts()).length&&(yield n.send("eth_requestAccounts",[]));const u=n.getSigner();return{signer:u,ethAddress:yield u.getAddress()}});return function(){return t.apply(this,arguments)}}(),FV=function(){var t=(0,ke.Z)(function*(){yield(yield _E()()).send("wallet_requestPermissions",[{eth_accounts:{}}]);const r=new bI(window.ethereum).getSigner();return{signer:r,ethAddress:yield r.getAddress()}});return function(){return t.apply(this,arguments)}}(),CI=function(){var t=(0,ke.Z)(function*(e){return Tb.viewFunction({contractId:_V[Ea].MAP_ACCOUNT_ID,methodName:"get_near",args:{eth_address:e}})});return function(n){return t.apply(this,arguments)}}(),Ip=function(){var t=(0,ke.Z)(function*(){const e=yield is.getItem(Em),n=yield is.getItem(_p);if(!e||!n){const v=yield II();return!!(yield xI(v))&&(yield Ip())}const r=new Ib(Dp,n),u=n3.fromString(e);return Mp.setKey(Ea,n,u),{account:r,accountId:n,keyPair:u,secretKey:e}});return function(){return t.apply(this,arguments)}}(),BV=Ip,jV=function(){var t=(0,ke.Z)(function*(){const e=yield is.getItem(_p);return e?(yield is.removeItem(Em),yield is.removeItem(_p),{accountId:e}):ml.log("already signed out")});return function(){return t.apply(this,arguments)}}(),UV=function(){var t=(0,ke.Z)(function*({message:e,provider:n,account:r}){let u;if(r)({accountId:u}=r);else{const we=yield Ip();we&&({account:r,accountId:u}=we)}if(!r)throw new Error("Wallet not signed in");const v=yield r.connection.signer.getPublicKey(u,Ea),O=Buffer.from(v.data).toString("base64"),ie={accountId:u,message:e,blockId:(yield n.block({finality:"final"})).header.hash,publicKey:O,keyType:v.keyType},ue=JSON.stringify(ie),he=yield r.connection.signer.signMessage(new Uint8Array(Buffer.from(ue)),u,Ea);return{...ie,signature:Buffer.from(he.signature).toString("base64")}});return function(n){return t.apply(this,arguments)}}(),KV=function(){var t=(0,ke.Z)(function*(){const e=wI("near-wallet-selector:neth:");return!!(yield e.getItem(Em))||!!(yield e.getItem(_p))});return function(){return t.apply(this,arguments)}}(),xI=function(){var t=(0,ke.Z)(function*({signer:e,ethAddress:n}){const r=yield CI(n);if(!r){if(window.confirm(`Ethereum account ${n} is not connected to a NETH account. Would you like to try another Ethereum account?`)){try{const{signer:we,ethAddress:xe}=yield FV();return yield xI({signer:we,ethAddress:xe})}catch(we){ml.log(we)}return}const he=`${Cb}/${"testnet"===Ea?"?network=testnet":""}`;window.prompt("We couldn't find a NETH account. To set up a NETH account visit",he)}const u=parseInt(yield Tb.viewFunction({contractId:r,methodName:"get_app_key_nonce"}),16).toString(),{publicKey:v,secretKey:O}=yield Pb(e,s3(r,u)),Y=new Ib(Dp,r),$=yield Y.getAccessKeys();EI($)||(yield PV(e,n));const ie=n3.fromString(O);return Mp.setKey(Ea,r,ie),yield is.setItem(Em,O),yield is.setItem(_p,Y.accountId),{publicKey:v,secretKey:O,account:Y}});return function(n){return t.apply(this,arguments)}}(),TI=function(){var t=(0,ke.Z)(function*(){const e=yield Ip();if(!e)return void ml.log("NETH: ERROR broadcasting tx. No account found.");const{account:n,accountId:r}=e,u=yield is.getItem(xb);if(!u||0===u.length)return;const v=[];for(;u.length>0;){const O=u.shift();ml.log("NETH: broadcasting tx",O);try{const Y=yield n.functionCall({contractId:r,methodName:"execute",args:O,gas:i3});yield is.setItem(xb,u),v.push(Y)}catch(Y){ml.log("NETH: ERROR broadcasting tx",Y)}}return yield is.removeItem(xb),v});return function(){return t.apply(this,arguments)}}(),zV=function(){var t=(0,ke.Z)(function*({transactions:e,bundle:n}){const r=yield II(),{signer:u}=r,v=yield Ip();if(!v)return void ml.log("NETH: ERROR signing and sending transactions. No account found.");const{account:O,accountId:Y}=v,$=e.map(({receiverId:xe})=>xe),ie=e.map(({receiverId:xe,actions:Ce})=>({actions:VV(Ce,Y,xe)})),ue=parseInt(yield O.viewFunction({contractId:Y,methodName:"get_nonce"}),16),he=[];if(n)he.push(yield Ob(u,{nonce:ue.toString(),receivers:$,transactions:ie}));else for(let xe=0;xet.map(r=>{const{enum:u}=r,{gas:v,publicKey:O,methodName:Y,args:$,deposit:ie,accessKey:ue,code:he}=r[u]||r,we={type:u&&u[0].toUpperCase()+u.substr(1)||"FunctionCall",gas:v&&v.toString()||void 0,public_key:O&&o3(O)||void 0,method_name:Y,args:$||void 0,code:he||void 0,amount:ie&&ie.toString()||void 0,permission:void 0};if(Object.keys(we).forEach(xe=>{void 0===we[xe]&&delete we[xe]}),ue)if(n===e)we.allowance=uh("1"),we.method_names="execute",we.receiver_id=e;else if("functionCall"===ue.permission.enum){const{receiverId:xe,methodNames:Ce,allowance:Le}=ue.permission.functionCall;we.receiver_id=xe,we.allowance=Le&&Le.toString()||uh("0.25"),we.method_names=Ce.join(",")}return we}),HV=function(){var t=(0,ke.Z)(function*(){return yield _E()({timeout:100}),!!window.ethereum});return function(){return t.apply(this,arguments)}}();let PI,OI=!0,u3=!1;const WV=function(){var t=(0,ke.Z)(function*({metadata:e,logger:n,store:r,storage:u,options:v,provider:O}){const Y=(({network:t,gas:e="200000000000000",logger:n=TV(),storage:r=wI()})=>{i3=e,ml=n,is=r,Mp=new AV,r3=new wV({...t,keyStore:Mp}),Dp=r3.connection,Ea=t.networkId,Tb=new Ib(Dp,"mainnet"===Ea?"near":Ea),AI="mainnet"===Ea?".near":"."+Ea;const u=document.createElement("div");return u.style.display="none",u.style.width="100%",u.style.height="100vh",u.style.zIndex="999999",u.style.position="fixed",u.style.top="0",u.style.background="rgba(0, 0, 0, 0.5)",document.body.appendChild(u),TI(),u})({network:v.network,gas:PI,logger:n,storage:u}),ie=he=>{if(!(he=>he.every(we=>"FunctionCall"===we.type))(he))throw new Error(`Only 'FunctionCall' actions types are supported by ${e.name}`);return he.map(xe=>xe.params)},ue=function(){var he=(0,ke.Z)(function*(we){n.log("NETH:signAndSendTransactions",{transactions:we});const{contract:xe}=r.getState();if(!(yield KV())||!xe)throw new Error("Wallet not signed in");u3&&(Y.style.display="block");const Ce=we.map(({receiverId:je,actions:Ue})=>({receiverId:je||xe.contractId,actions:ie(Ue)}));let Le;try{Le=yield zV({transactions:Ce,bundle:OI})}catch(je){throw n.log("NETH:signAndSendTransactions Error",je),je}return u3&&(Y.style.display="none"),Le});return function(xe){return he.apply(this,arguments)}}();return{signIn:()=>(0,ke.Z)(function*(){let he;try{if(he=yield BV(),!he)return[]}catch(we){if(!/not connected/.test(we.toString()))throw we}return[he]})(),signOut:()=>(0,ke.Z)(function*(){yield jV()})(),verifyOwner:({message:he})=>(0,ke.Z)(function*(){return n.log("NETH:verifyOwner",{message:he}),UV({message:he,provider:O,account:null})})(),getAccounts:()=>(0,ke.Z)(function*(){const he=yield Ip();if(!he)return n.log("NETH:getAccounts"),[];const{account:we,accountId:xe}=he;return[{accountId:xe,publicKey:(yield we.connection.signer.getPublicKey(we.accountId,v.network.networkId)).toString()}]})(),signAndSendTransaction:(he=(0,ke.Z)(function*({receiverId:we,actions:xe}){return ue([{receiverId:we,actions:xe}])}),function(xe){return he.apply(this,arguments)}),signAndSendTransactions:function(){var he=(0,ke.Z)(function*({transactions:we}){return ue(we)});return function(xe){return he.apply(this,arguments)}}()};var he});return function(n){return t.apply(this,arguments)}}();function NI({iconUrl:t=cK,gas:e,useModalCover:n=!1,bundle:r=!0,deprecated:u=!1}={}){return(0,ke.Z)(function*(){if(u3=n,PI=e,OI=r,K8()())return null;const O=yield HV();return{id:"neth",type:"injected",metadata:{name:"NETH Account",description:null,iconUrl:t,downloadUrl:Cb,deprecated:!1,available:O},deprecated:u,init:WV}})}const GV=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,ZV=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,YV=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function JV(t,e){if(!("__proto__"===t||"constructor"===t&&e&&"object"==typeof e&&"prototype"in e))return e;(function QV(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)})(t)}function Sm(t,e={}){if("string"!=typeof t)return t;const n=t.trim();if('"'===t[0]&&'"'===t.at(-1)&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if("true"===r)return!0;if("false"===r)return!1;if("undefined"===r)return;if("null"===r)return null;if("nan"===r)return Number.NaN;if("infinity"===r)return Number.POSITIVE_INFINITY;if("-infinity"===r)return Number.NEGATIVE_INFINITY}if(!YV.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(GV.test(t)||ZV.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,JV)}return JSON.parse(t)}catch(r){if(e.strict)throw r;return t}}function Mo(t,...e){try{return function XV(t){return t&&"function"==typeof t.then?t:Promise.resolve(t)}(t(...e))}catch(n){return Promise.reject(n)}}function Nb(t){if(function qV(t){const e=typeof t;return null===t||"object"!==e&&"function"!==e}(t))return String(t);if(function $V(t){const e=Object.getPrototypeOf(t);return!e||e.isPrototypeOf(Object)}(t)||Array.isArray(t))return JSON.stringify(t);if("function"==typeof t.toJSON)return Nb(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function RI(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const c3="base64:";function Ys(t){return t?t.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function rH(...t){return Ys(t.join(":"))}function _m(t){return(t=Ys(t))?t+":":""}const oH=()=>{const t=new Map;return{name:"memory",options:{},hasItem:e=>t.has(e),getItem:e=>t.get(e)??null,getItemRaw:e=>t.get(e)??null,setItem(e,n){t.set(e,n)},setItemRaw(e,n){t.set(e,n)},removeItem(e){t.delete(e)},getKeys:()=>Array.from(t.keys()),clear(){t.clear()},dispose(){t.clear()}}};function sH(t={}){const e={mounts:{"":t.driver||oH()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=ie=>{for(const ue of e.mountpoints)if(ie.startsWith(ue))return{base:ue,relativeKey:ie.slice(ue.length),driver:e.mounts[ue]};return{base:"",relativeKey:ie,driver:e.mounts[""]}},r=(ie,ue)=>e.mountpoints.filter(he=>he.startsWith(ie)||ue&&ie.startsWith(he)).map(he=>({relativeBase:ie.length>he.length?ie.slice(he.length):void 0,mountpoint:he,driver:e.mounts[he]})),u=(ie,ue)=>{if(e.watching){ue=Ys(ue);for(const he of e.watchListeners)he(ie,ue)}},v=function(){var ie=(0,ke.Z)(function*(){if(!e.watching){e.watching=!0;for(const ue in e.mounts)e.unwatch[ue]=yield kI(e.mounts[ue],u,ue)}});return function(){return ie.apply(this,arguments)}}(),O=function(){var ie=(0,ke.Z)(function*(){if(e.watching){for(const ue in e.unwatch)yield e.unwatch[ue]();e.unwatch={},e.watching=!1}});return function(){return ie.apply(this,arguments)}}(),Y=(ie,ue,he)=>{const we=new Map,xe=Ce=>{let Le=we.get(Ce.base);return Le||(Le={driver:Ce.driver,base:Ce.base,items:[]},we.set(Ce.base,Le)),Le};for(const Ce of ie){const Le="string"==typeof Ce,je=Ys(Le?Ce:Ce.key),Ue=Le?void 0:Ce.value,$e=Le||!Ce.options?ue:{...ue,...Ce.options},Je=n(je);xe(Je).items.push({key:je,value:Ue,relativeKey:Je.relativeKey,options:$e})}return Promise.all([...we.values()].map(Ce=>he(Ce))).then(Ce=>Ce.flat())},$={hasItem(ie,ue={}){ie=Ys(ie);const{relativeKey:he,driver:we}=n(ie);return Mo(we.hasItem,he,ue)},getItem(ie,ue={}){ie=Ys(ie);const{relativeKey:he,driver:we}=n(ie);return Mo(we.getItem,he,ue).then(xe=>Sm(xe))},getItems:(ie,ue)=>Y(ie,ue,he=>he.driver.getItems?Mo(he.driver.getItems,he.items.map(we=>({key:we.relativeKey,options:we.options})),ue).then(we=>we.map(xe=>({key:rH(he.base,xe.key),value:Sm(xe.value)}))):Promise.all(he.items.map(we=>Mo(he.driver.getItem,we.relativeKey,we.options).then(xe=>({key:we.key,value:Sm(xe)}))))),getItemRaw(ie,ue={}){ie=Ys(ie);const{relativeKey:he,driver:we}=n(ie);return we.getItemRaw?Mo(we.getItemRaw,he,ue):Mo(we.getItem,he,ue).then(xe=>function tH(t){return"string"==typeof t&&t.startsWith(c3)?(RI(),Buffer.from(t.slice(c3.length),"base64")):t}(xe))},setItem:(ie,ue,he={})=>(0,ke.Z)(function*(){if(void 0===ue)return $.removeItem(ie);ie=Ys(ie);const{relativeKey:we,driver:xe}=n(ie);xe.setItem&&(yield Mo(xe.setItem,we,Nb(ue),he),xe.watch||u("update",ie))})(),setItems:(ie,ue)=>(0,ke.Z)(function*(){yield Y(ie,ue,function(){var he=(0,ke.Z)(function*(we){we.driver.setItems&&(yield Mo(we.driver.setItems,we.items.map(xe=>({key:xe.relativeKey,value:Nb(xe.value),options:xe.options})),ue)),we.driver.setItem&&(yield Promise.all(we.items.map(xe=>Mo(we.driver.setItem,xe.relativeKey,Nb(xe.value),xe.options))))});return function(we){return he.apply(this,arguments)}}())})(),setItemRaw:(ie,ue,he={})=>(0,ke.Z)(function*(){if(void 0===ue)return $.removeItem(ie,he);ie=Ys(ie);const{relativeKey:we,driver:xe}=n(ie);if(xe.setItemRaw)yield Mo(xe.setItemRaw,we,ue,he);else{if(!xe.setItem)return;yield Mo(xe.setItem,we,function eH(t){if("string"==typeof t)return t;RI();const e=Buffer.from(t).toString("base64");return c3+e}(ue),he)}xe.watch||u("update",ie)})(),removeItem:(ie,ue={})=>(0,ke.Z)(function*(){"boolean"==typeof ue&&(ue={removeMeta:ue}),ie=Ys(ie);const{relativeKey:he,driver:we}=n(ie);we.removeItem&&(yield Mo(we.removeItem,he,ue),(ue.removeMeta||ue.removeMata)&&(yield Mo(we.removeItem,he+"$",ue)),we.watch||u("remove",ie))})(),getMeta:(ie,ue={})=>(0,ke.Z)(function*(){"boolean"==typeof ue&&(ue={nativeOnly:ue}),ie=Ys(ie);const{relativeKey:he,driver:we}=n(ie),xe=Object.create(null);if(we.getMeta&&Object.assign(xe,yield Mo(we.getMeta,he,ue)),!ue.nativeOnly){const Ce=yield Mo(we.getItem,he+"$",ue).then(Le=>Sm(Le));Ce&&"object"==typeof Ce&&("string"==typeof Ce.atime&&(Ce.atime=new Date(Ce.atime)),"string"==typeof Ce.mtime&&(Ce.mtime=new Date(Ce.mtime)),Object.assign(xe,Ce))}return xe})(),setMeta(ie,ue,he={}){return this.setItem(ie+"$",ue,he)},removeMeta(ie,ue={}){return this.removeItem(ie+"$",ue)},getKeys:(ie,ue={})=>(0,ke.Z)(function*(){ie=_m(ie);const he=r(ie,!0);let we=[];const xe=[];for(const Ce of he){const je=(yield Mo(Ce.driver.getKeys,Ce.relativeBase,ue)).map(Ue=>Ce.mountpoint+Ys(Ue)).filter(Ue=>!we.some($e=>Ue.startsWith($e)));xe.push(...je),we=[Ce.mountpoint,...we.filter(Ue=>!Ue.startsWith(Ce.mountpoint))]}return ie?xe.filter(Ce=>Ce.startsWith(ie)&&!Ce.endsWith("$")):xe.filter(Ce=>!Ce.endsWith("$"))})(),clear:(ie,ue={})=>(0,ke.Z)(function*(){ie=_m(ie),yield Promise.all(r(ie,!1).map(function(){var he=(0,ke.Z)(function*(we){if(we.driver.clear)return Mo(we.driver.clear,we.relativeBase,ue);if(we.driver.removeItem){const xe=yield we.driver.getKeys(we.relativeBase||"",ue);return Promise.all(xe.map(Ce=>we.driver.removeItem(Ce,ue)))}});return function(we){return he.apply(this,arguments)}}()))})(),dispose:()=>(0,ke.Z)(function*(){yield Promise.all(Object.values(e.mounts).map(ie=>LI(ie)))})(),watch:ie=>(0,ke.Z)(function*(){return yield v(),e.watchListeners.push(ie),(0,ke.Z)(function*(){e.watchListeners=e.watchListeners.filter(ue=>ue!==ie),0===e.watchListeners.length&&(yield O())})})(),unwatch:()=>(0,ke.Z)(function*(){e.watchListeners=[],yield O()})(),mount(ie,ue){if((ie=_m(ie))&&e.mounts[ie])throw new Error(`already mounted at ${ie}`);return ie&&(e.mountpoints.push(ie),e.mountpoints.sort((he,we)=>we.length-he.length)),e.mounts[ie]=ue,e.watching&&Promise.resolve(kI(ue,u,ie)).then(he=>{e.unwatch[ie]=he}).catch(console.error),$},unmount:(ie,ue=!0)=>(0,ke.Z)(function*(){(ie=_m(ie))&&e.mounts[ie]&&(e.watching&&ie in e.unwatch&&(e.unwatch[ie](),delete e.unwatch[ie]),ue&&(yield LI(e.mounts[ie])),e.mountpoints=e.mountpoints.filter(he=>he!==ie),delete e.mounts[ie])})(),getMount(ie=""){ie=Ys(ie)+":";const ue=n(ie);return{driver:ue.driver,base:ue.base}},getMounts:(ie="",ue={})=>(ie=Ys(ie),r(ie,ue.parents).map(we=>({driver:we.driver,base:we.mountpoint})))};return $}function kI(t,e,n){return t.watch?t.watch((r,u)=>e(r,n+u)):()=>{}}function LI(t){return d3.apply(this,arguments)}function d3(){return d3=(0,ke.Z)(function*(t){"function"==typeof t.dispose&&(yield Mo(t.dispose))}),d3.apply(this,arguments)}function Js(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function FI(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const r=Js(n);return(u,v)=>r.then(O=>v(O.transaction(e,u).objectStore(e)))}let h3;function Tu(){return h3||(h3=FI("keyval-store","keyval")),h3}function BI(t,e=Tu()){return e("readonly",n=>Js(n.get(t)))}function p3(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Js(t.transaction)}function jI(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return JSON.parse(t)}catch{return t}}function UI(t){return"string"==typeof t?t:JSON.stringify(t)}var dH=(t={})=>{const e=t.base&&t.base.length>0?`${t.base}:`:"",n=u=>e+u;let r;return t.dbName&&t.storeName&&(r=FI(t.dbName,t.storeName)),{name:"idb-keyval",options:t,hasItem:u=>(0,ke.Z)(function*(){return!(typeof(yield BI(n(u),r))>"u")})(),getItem:u=>(0,ke.Z)(function*(){return(yield BI(n(u),r))??null})(),setItem:(u,v)=>function aH(t,e,n=Tu()){return n("readwrite",r=>(r.put(e,t),Js(r.transaction)))}(n(u),v,r),removeItem:u=>function uH(t,e=Tu()){return e("readwrite",n=>(n.delete(t),Js(n.transaction)))}(n(u),r),getKeys:()=>function lH(t=Tu()){return t("readonly",e=>{if(e.getAllKeys)return Js(e.getAllKeys());const n=[];return p3(e,r=>n.push(r.key)).then(()=>n)})}(r),clear:()=>function cH(t=Tu()){return t("readwrite",e=>(e.clear(),Js(e.transaction)))}(r)}};class gH{constructor(){this.indexedDb=sH({driver:dH({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}getKeys(){var e=this;return(0,ke.Z)(function*(){return e.indexedDb.getKeys()})()}getEntries(){var e=this;return(0,ke.Z)(function*(){return(yield e.indexedDb.getItems(yield e.indexedDb.getKeys())).map(n=>[n.key,n.value])})()}getItem(e){var n=this;return(0,ke.Z)(function*(){const r=yield n.indexedDb.getItem(e);if(null!==r)return r})()}setItem(e,n){var r=this;return(0,ke.Z)(function*(){yield r.indexedDb.setItem(e,UI(n))})()}removeItem(e){var n=this;return(0,ke.Z)(function*(){yield n.indexedDb.removeItem(e)})()}}var g3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Rb={exports:{}};function yH(t){var e;return[t[0],jI(null!=(e=t[1])?e:"")]}!function(){let t;function e(){}t=e,t.prototype.getItem=function(n){return this.hasOwnProperty(n)?String(this[n]):null},t.prototype.setItem=function(n,r){this[n]=String(r)},t.prototype.removeItem=function(n){delete this[n]},t.prototype.clear=function(){const n=this;Object.keys(n).forEach(function(r){n[r]=void 0,delete n[r]})},t.prototype.key=function(n){return n=n||0,Object.keys(this)[n]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof g3<"u"&&g3.localStorage?Rb.exports=g3.localStorage:typeof window<"u"&&window.localStorage?Rb.exports=window.localStorage:Rb.exports=new e}();class mH{constructor(){this.localStorage=Rb.exports}getKeys(){var e=this;return(0,ke.Z)(function*(){return Object.keys(e.localStorage)})()}getEntries(){var e=this;return(0,ke.Z)(function*(){return Object.entries(e.localStorage).map(yH)})()}getItem(e){var n=this;return(0,ke.Z)(function*(){const r=n.localStorage.getItem(e);if(null!==r)return jI(r)})()}setItem(e,n){var r=this;return(0,ke.Z)(function*(){r.localStorage.setItem(e,UI(n))})()}removeItem(e){var n=this;return(0,ke.Z)(function*(){n.localStorage.removeItem(e)})()}}const bH=function(){var t=(0,ke.Z)(function*(e,n,r){const u="wc_storage_version",v=yield n.getItem(u);if(v&&v>=1)return void r(n);const O=yield e.getKeys();if(!O.length)return void r(n);const Y=[];for(;O.length;){const $=O.shift();if(!$)continue;const ie=$.toLowerCase();if(ie.includes("wc@")||ie.includes("walletconnect")||ie.includes("wc_")||ie.includes("wallet_connect")){const ue=yield e.getItem($);yield n.setItem($,ue),Y.push($)}}yield n.setItem(u,1),r(n),wH(e,Y)});return function(n,r,u){return t.apply(this,arguments)}}(),wH=function(){var t=(0,ke.Z)(function*(e,n){n.length&&n.forEach(function(){var r=(0,ke.Z)(function*(u){yield e.removeItem(u)});return function(u){return r.apply(this,arguments)}}())});return function(n,r){return t.apply(this,arguments)}}();class AH{constructor(){this.initialized=!1,this.setInitialized=n=>{this.storage=n,this.initialized=!0};const e=new mH;this.storage=e;try{const n=new gH;bH(e,n,this.setInitialized)}catch{this.initialized=!0}}getKeys(){var e=this;return(0,ke.Z)(function*(){return yield e.initialize(),e.storage.getKeys()})()}getEntries(){var e=this;return(0,ke.Z)(function*(){return yield e.initialize(),e.storage.getEntries()})()}getItem(e){var n=this;return(0,ke.Z)(function*(){return yield n.initialize(),n.storage.getItem(e)})()}setItem(e,n){var r=this;return(0,ke.Z)(function*(){return yield r.initialize(),r.storage.setItem(e,n)})()}removeItem(e){var n=this;return(0,ke.Z)(function*(){return yield n.initialize(),n.storage.removeItem(e)})()}initialize(){var e=this;return(0,ke.Z)(function*(){e.initialized||(yield new Promise(n=>{const r=setInterval(()=>{e.initialized&&(clearInterval(r),n())},20)}))})()}}var Mm=p(72062),Kr=p(83767),Cp=p(42092);class EH extends Cp.q{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class SH extends Cp.q{constructor(e,n){super(),this.core=e,this.logger=n,this.records=new Map}}class _H{constructor(e,n){this.logger=e,this.core=n}}class MH extends Cp.q{constructor(e,n){super(),this.relayer=e,this.logger=n}}class DH extends Cp.q{constructor(e){super()}}class IH{constructor(e,n,r,u){this.core=e,this.logger=n,this.name=r}}class CH extends Cp.q{constructor(e,n){super(),this.relayer=e,this.logger=n}}class xH extends Cp.q{constructor(e,n){super(),this.core=e,this.logger=n}}class TH{constructor(e,n){this.projectId=e,this.logger=n}}class OH{constructor(e,n){this.projectId=e,this.logger=n}}class PH{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class NH{constructor(e){this.client=e}}const RH=t=>JSON.stringify(t,(e,n)=>"bigint"==typeof n?n.toString()+"n":n),kH=t=>{const n=t.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(n,(r,u)=>"string"==typeof u&&u.match(/^\d+n$/)?BigInt(u.substring(0,u.length-1)):u)};function zI(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return kH(t)}catch{return t}}function VI(t){return"string"==typeof t?t:RH(t)||""}var HI=p(65553),LH=p(5784),Vn=p(43961);const FH="EdDSA",BH="JWT",WI=".",GI="base64url",jH="utf8",UH="utf8",KH=":",zH="did",VH="key",ZI="base58btc",HH="z",WH="K36",GH=32;var JH=function YH(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,Je=new Uint8Array($e);Ce[Le];){var ht=n[Ce.charCodeAt(Le)];if(255===ht)return;for(var xt=0,Wt=$e-1;(0!==ht||xt>>0,Je[Wt]=ht%256>>>0,ht=ht/256>>>0;if(0!==ht)throw new Error("Non-zero carry");Ue=xt,Le++}if(" "!==Ce[Le]){for(var An=$e-Ue;An!==$e&&0===Je[An];)An++;for(var rn=new Uint8Array(je+($e-An)),un=je;An!==$e;)rn[un++]=Je[An++];return rn}}}return{encode:function he(Ce){if(Ce instanceof Uint8Array||(ArrayBuffer.isView(Ce)?Ce=new Uint8Array(Ce.buffer,Ce.byteOffset,Ce.byteLength):Array.isArray(Ce)&&(Ce=Uint8Array.from(Ce))),!(Ce instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ce.length)return"";for(var Le=0,je=0,Ue=0,$e=Ce.length;Ue!==$e&&0===Ce[Ue];)Ue++,Le++;for(var Je=($e-Ue)*ue+1>>>0,ht=new Uint8Array(Je);Ue!==$e;){for(var xt=Ce[Ue],Wt=0,An=Je-1;(0!==xt||Wt>>0,ht[An]=xt%Y>>>0,xt=xt/Y>>>0;if(0!==xt)throw new Error("Non-zero carry");je=Wt,Ue++}for(var rn=Je-je;rn!==Je&&0===ht[rn];)rn++;for(var un=$.repeat(Le);rn{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class tW{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class nW{constructor(e,n,r){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return YI(this,e)}}class rW{constructor(e){this.decoders=e}or(e){return YI(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const YI=(t,e)=>new rW({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class iW{constructor(e,n,r,u){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=u,this.encoder=new tW(e,n,r),this.decoder=new nW(e,n,u)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Lb=({name:t,prefix:e,encode:n,decode:r})=>new iW(t,e,n,r),Dm=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:u}=XH(n,e);return Lb({prefix:t,name:e,encode:r,decode:v=>kb(u(v))})},Lo=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>Lb({prefix:e,name:t,encode:u=>((t,e,n)=>{const r="="===e[e.length-1],u=(1<n;)O-=n,v+=e[u&Y>>O];if(O&&(v+=e[u&Y<((t,e,n,r)=>{const u={};for(let ue=0;ue=8&&(Y-=8,O[ie++]=255&$>>Y)}if(Y>=n||255&$<<8-Y)throw new SyntaxError("Unexpected end of data");return O})(u,r,n,t)}),aW=Lb({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),uW=Lo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),cW=Lo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),lW=Dm({prefix:"9",name:"base10",alphabet:"0123456789"}),fW=Lo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),dW=Lo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),hW=Lo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),pW=Lo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),gW=Lo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),yW=Lo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),mW=Lo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),vW=Lo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),bW=Lo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),wW=Lo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),AW=Lo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),EW=Dm({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),SW=Dm({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),_W=Dm({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),MW=Dm({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),DW=Lo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),IW=Lo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),CW=Lo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),xW=Lo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),JI=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),TW=JI.reduce((t,e,n)=>(t[n]=e,t),[]),OW=JI.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const RW=Lb({prefix:"\u{1f680}",name:"base256emoji",encode:function PW(t){return t.reduce((e,n)=>e+=TW[n],"")},decode:function NW(t){const e=[];for(const n of t){const r=OW[n.codePointAt(0)];if(void 0===r)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}});var kW=function XI(t,e,n){e=e||[];for(var r=n=n||0;t>=BW;)e[n++]=255&t|QI,t/=128;for(;t&FW;)e[n++]=255&t|QI,t>>>=7;return e[n]=0|t,XI.bytes=n-r+1,e},QI=128,FW=-128,BW=Math.pow(2,31);var jW=function y3(t,r){var O,n=0,u=0,v=r=r||0,Y=t.length;do{if(v>=Y)throw y3.bytes=0,new RangeError("Could not decode varint");O=t[v++],n+=u<28?(O&qI)<=UW);return y3.bytes=v-r,n},UW=128,qI=127;var KW=Math.pow(2,7),zW=Math.pow(2,14),VW=Math.pow(2,21),HW=Math.pow(2,28),WW=Math.pow(2,35),GW=Math.pow(2,42),ZW=Math.pow(2,49),YW=Math.pow(2,56),JW=Math.pow(2,63),XW={encode:kW,decode:jW,encodingLength:function(t){return t($I.encode(t,e,n),e),tC=t=>$I.encodingLength(t),m3=(t,e)=>{const n=e.byteLength,r=tC(t),u=r+tC(n),v=new Uint8Array(u+n);return eC(t,v,0),eC(n,v,r),v.set(e,u),new nC(t,n,e,v)};class nC{constructor(e,n,r,u){this.code=e,this.size=n,this.digest=r,this.bytes=u}}const rC=({name:t,code:e,encode:n})=>new $W(t,e,n);class $W{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?m3(this.code,n):n.then(r=>m3(this.code,r))}throw Error("Unknown type, must be binary type")}}const iC=t=>function(){var e=(0,ke.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),eG=rC({name:"sha2-256",code:18,encode:iC("SHA-256")}),tG=rC({name:"sha2-512",code:19,encode:iC("SHA-512")}),sC=kb,rG={code:0,name:"identity",encode:sC,digest:t=>m3(0,sC(t))},iG="raw",oG=85,sG=t=>kb(t),aG=t=>kb(t),uG=new TextEncoder,cG=new TextDecoder,lG="json",fG=512,dG=t=>uG.encode(JSON.stringify(t)),hG=t=>JSON.parse(cG.decode(t));class Is{constructor(e,n,r,u){this.code=n,this.version=e,this.multihash=r,this.bytes=u,this.byteOffset=u.byteOffset,this.byteLength=u.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Bb,byteLength:Bb,code:Fb,version:Fb,multihash:Fb,bytes:Fb,_baseCache:Bb,asCID:Bb})}toV0(){if(0===this.version)return this;{const{code:e,multihash:n}=this;if(e!==Im)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==mG)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Is.createV0(n)}}toV1(){switch(this.version){case 0:{const{code:e,digest:n}=this.multihash,r=Digest.create(e,n);return Is.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:n,version:r,_baseCache:u}=this;return 0===r?gG(n,u,e||base58btc.encoder):yG(n,u,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return bG(/^0\.0/,wG),!(!e||!e[uC]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Is)return e;if(null!=e&&e.asCID===e){const{version:n,code:r,multihash:u,bytes:v}=e;return new Is(n,r,u,v||aC(n,r,u.bytes))}if(null!=e&&!0===e[uC]){const{version:n,multihash:r,code:u}=e,v=Digest.decode(r);return Is.create(n,u,v)}return null}static create(e,n,r){if("number"!=typeof n)throw new Error("String codecs are no longer supported");switch(e){case 0:if(n!==Im)throw new Error(`Version 0 CID must use dag-pb (code: ${Im}) block encoding`);return new Is(e,n,r,r.bytes);case 1:{const u=aC(e,n,r.bytes);return new Is(e,n,r,u)}default:throw new Error("Invalid version")}}static createV0(e){return Is.create(0,Im,e)}static createV1(e,n){return Is.create(1,e,n)}static decode(e){const[n,r]=Is.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return n}static decodeFirst(e){const n=Is.inspectBytes(e),r=n.size-n.multihashSize,u=coerce(e.subarray(r,r+n.multihashSize));if(u.byteLength!==n.multihashSize)throw new Error("Incorrect length");const v=u.subarray(n.multihashSize-n.digestSize),O=new Digest.Digest(n.multihashCode,n.digestSize,v,u);return[0===n.version?Is.createV0(O):Is.createV1(n.codec,O),e.subarray(n.size)]}static inspectBytes(e){let n=0;const r=()=>{const[he,we]=varint.decode(e.subarray(n));return we,he};let u=r(),v=Im;if(18===u?(0,0):1===u&&r(),0!==u&&1!==u)throw new RangeError(`Invalid CID version ${u}`);const O=n,Y=r(),$=r(),ie=n+$;return{version:u,codec:v,multihashCode:Y,digestSize:$,multihashSize:ie-O,size:ie}}static parse(e,n){const[r,u]=pG(e,n),v=Is.decode(u);return v._baseCache.set(r,e),v}}Symbol.for("@ipld/js-cid/CID");const cC={...h,...M,...w,...E,...l,...m,...y,...b,...S,..._};function lC(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const fC=lC("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),v3=lC("ascii","a",t=>{let e="a";for(let n=0;n{t=t.substring(1);const e=new Uint8Array(t.length);for(let n=0;nu+v.length,0));const n=new Uint8Array(e);let r=0;for(const u of t)n.set(u,r),r+=u.length;return n}([e,t]),ZI);return[zH,VH,n].join(KH)}function EG(t){return b3(t,GI)}function pC(t=(0,LH.randomBytes)(GH)){return HI._w(t)}function A3(){return A3=(0,ke.Z)(function*(t,e,n,r,u=(0,Vn.fromMiliseconds)(Date.now())){const v={alg:FH,typ:BH},$={iss:hC(r.publicKey),sub:t,aud:e,iat:u,exp:u+n},ie=function _G(t){return w3([Ub(t.header),Ub(t.payload)].join(WI),UH)}({header:v,payload:$});return function MG(t){return[Ub(t.header),Ub(t.payload),EG(t.signature)].join(WI)}({header:v,payload:$,signature:HI.Xx(r.secretKey,ie)})}),A3.apply(this,arguments)}p(6375);var gC=p(95876),IG=p(85705),yC=p(10976),S3=p(10893),mC=p(25006);function _3(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function vC(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?_3(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function bC(t,e){e||(e=t.reduce((u,v)=>u+v.length,0));const n=vC(e);let r=0;for(const u of t)n.set(u,r),r+=u.length;return _3(n)}var xG=function CG(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,Je=new Uint8Array($e);Ce[Le];){var ht=n[Ce.charCodeAt(Le)];if(255===ht)return;for(var xt=0,Wt=$e-1;(0!==ht||xt>>0,Je[Wt]=ht%256>>>0,ht=ht/256>>>0;if(0!==ht)throw new Error("Non-zero carry");Ue=xt,Le++}if(" "!==Ce[Le]){for(var An=$e-Ue;An!==$e&&0===Je[An];)An++;for(var rn=new Uint8Array(je+($e-An)),un=je;An!==$e;)rn[un++]=Je[An++];return rn}}}return{encode:function he(Ce){if(Ce instanceof Uint8Array||(ArrayBuffer.isView(Ce)?Ce=new Uint8Array(Ce.buffer,Ce.byteOffset,Ce.byteLength):Array.isArray(Ce)&&(Ce=Uint8Array.from(Ce))),!(Ce instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ce.length)return"";for(var Le=0,je=0,Ue=0,$e=Ce.length;Ue!==$e&&0===Ce[Ue];)Ue++,Le++;for(var Je=($e-Ue)*ue+1>>>0,ht=new Uint8Array(Je);Ue!==$e;){for(var xt=Ce[Ue],Wt=0,An=Je-1;(0!==xt||Wt>>0,ht[An]=xt%Y>>>0,xt=xt/Y>>>0;if(0!==xt)throw new Error("Non-zero carry");je=Wt,Ue++}for(var rn=Je-je;rn!==Je&&0===ht[rn];)rn++;for(var un=$.repeat(Le);rn{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class kG{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class LG{constructor(e,n,r){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return wC(this,e)}}class FG{constructor(e){this.decoders=e}or(e){return wC(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const wC=(t,e)=>new FG({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class BG{constructor(e,n,r,u){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=u,this.encoder=new kG(e,n,r),this.decoder=new LG(e,n,u)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const zb=({name:t,prefix:e,encode:n,decode:r})=>new BG(t,e,n,r),Cm=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:u}=OG(n,e);return zb({prefix:t,name:e,encode:r,decode:v=>Kb(u(v))})},Fo=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>zb({prefix:e,name:t,encode:u=>((t,e,n)=>{const r="="===e[e.length-1],u=(1<n;)O-=n,v+=e[u&Y>>O];if(O&&(v+=e[u&Y<((t,e,n,r)=>{const u={};for(let ue=0;ue=8&&(Y-=8,O[ie++]=255&$>>Y)}if(Y>=n||255&$<<8-Y)throw new SyntaxError("Unexpected end of data");return O})(u,r,n,t)}),KG=zb({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),zG=Fo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),VG=Fo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),HG=Cm({prefix:"9",name:"base10",alphabet:"0123456789"}),WG=Fo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),GG=Fo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),ZG=Fo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),YG=Fo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),JG=Fo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),QG=Fo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),XG=Fo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),qG=Fo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),$G=Fo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),eZ=Fo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),tZ=Fo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),nZ=Cm({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),rZ=Cm({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),iZ=Cm({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),oZ=Cm({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),sZ=Fo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),aZ=Fo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),uZ=Fo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),cZ=Fo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),AC=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),lZ=AC.reduce((t,e,n)=>(t[n]=e,t),[]),fZ=AC.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const pZ=zb({prefix:"\u{1f680}",name:"base256emoji",encode:function dZ(t){return t.reduce((e,n)=>e+=lZ[n],"")},decode:function hZ(t){const e=[];for(const n of t){const r=fZ[n.codePointAt(0)];if(void 0===r)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}});var gZ=function SC(t,e,n){e=e||[];for(var r=n=n||0;t>=vZ;)e[n++]=255&t|EC,t/=128;for(;t&mZ;)e[n++]=255&t|EC,t>>>=7;return e[n]=0|t,SC.bytes=n-r+1,e},EC=128,mZ=-128,vZ=Math.pow(2,31);var bZ=function M3(t,r){var O,n=0,u=0,v=r=r||0,Y=t.length;do{if(v>=Y)throw M3.bytes=0,new RangeError("Could not decode varint");O=t[v++],n+=u<28?(O&_C)<=wZ);return M3.bytes=v-r,n},wZ=128,_C=127;var AZ=Math.pow(2,7),EZ=Math.pow(2,14),SZ=Math.pow(2,21),_Z=Math.pow(2,28),MZ=Math.pow(2,35),DZ=Math.pow(2,42),IZ=Math.pow(2,49),CZ=Math.pow(2,56),xZ=Math.pow(2,63),OZ={encode:gZ,decode:bZ,encodingLength:function(t){return t(MC.encode(t,e,n),e),IC=t=>MC.encodingLength(t),D3=(t,e)=>{const n=e.byteLength,r=IC(t),u=r+IC(n),v=new Uint8Array(u+n);return DC(t,v,0),DC(n,v,r),v.set(e,u),new CC(t,n,e,v)};class CC{constructor(e,n,r,u){this.code=e,this.size=n,this.digest=r,this.bytes=u}}const xC=({name:t,code:e,encode:n})=>new NZ(t,e,n);class NZ{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?D3(this.code,n):n.then(r=>D3(this.code,r))}throw Error("Unknown type, must be binary type")}}const TC=t=>function(){var e=(0,ke.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),RZ=xC({name:"sha2-256",code:18,encode:TC("SHA-256")}),kZ=xC({name:"sha2-512",code:19,encode:TC("SHA-512")}),PC=Kb,FZ={code:0,name:"identity",encode:PC,digest:t=>D3(0,PC(t))},BZ="raw",jZ=85,UZ=t=>Kb(t),KZ=t=>Kb(t),zZ=new TextEncoder,VZ=new TextDecoder,HZ="json",WZ=512,GZ=t=>zZ.encode(JSON.stringify(t)),ZZ=t=>JSON.parse(VZ.decode(t));class Cs{constructor(e,n,r,u){this.code=n,this.version=e,this.multihash=r,this.bytes=u,this.byteOffset=u.byteOffset,this.byteLength=u.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Hb,byteLength:Hb,code:Vb,version:Vb,multihash:Vb,bytes:Vb,_baseCache:Hb,asCID:Hb})}toV0(){if(0===this.version)return this;{const{code:e,multihash:n}=this;if(e!==xm)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==XZ)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Cs.createV0(n)}}toV1(){switch(this.version){case 0:{const{code:e,digest:n}=this.multihash,r=Digest.create(e,n);return Cs.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:n,version:r,_baseCache:u}=this;return 0===r?JZ(n,u,e||base58btc.encoder):QZ(n,u,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return $Z(/^0\.0/,eY),!(!e||!e[RC]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Cs)return e;if(null!=e&&e.asCID===e){const{version:n,code:r,multihash:u,bytes:v}=e;return new Cs(n,r,u,v||NC(n,r,u.bytes))}if(null!=e&&!0===e[RC]){const{version:n,multihash:r,code:u}=e,v=Digest.decode(r);return Cs.create(n,u,v)}return null}static create(e,n,r){if("number"!=typeof n)throw new Error("String codecs are no longer supported");switch(e){case 0:if(n!==xm)throw new Error(`Version 0 CID must use dag-pb (code: ${xm}) block encoding`);return new Cs(e,n,r,r.bytes);case 1:{const u=NC(e,n,r.bytes);return new Cs(e,n,r,u)}default:throw new Error("Invalid version")}}static createV0(e){return Cs.create(0,xm,e)}static createV1(e,n){return Cs.create(1,e,n)}static decode(e){const[n,r]=Cs.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return n}static decodeFirst(e){const n=Cs.inspectBytes(e),r=n.size-n.multihashSize,u=coerce(e.subarray(r,r+n.multihashSize));if(u.byteLength!==n.multihashSize)throw new Error("Incorrect length");const v=u.subarray(n.multihashSize-n.digestSize),O=new Digest.Digest(n.multihashCode,n.digestSize,v,u);return[0===n.version?Cs.createV0(O):Cs.createV1(n.codec,O),e.subarray(n.size)]}static inspectBytes(e){let n=0;const r=()=>{const[he,we]=varint.decode(e.subarray(n));return we,he};let u=r(),v=xm;if(18===u?(0,0):1===u&&r(),0!==u&&1!==u)throw new RangeError(`Invalid CID version ${u}`);const O=n,Y=r(),$=r(),ie=n+$;return{version:u,codec:v,multihashCode:Y,digestSize:$,multihashSize:ie-O,size:ie}}static parse(e,n){const[r,u]=YZ(e,n),v=Cs.decode(u);return v._baseCache.set(r,e),v}}Symbol.for("@ipld/js-cid/CID");const kC={...L,...N,...j,...B,...V,...G,...W,...Q,...q,...J};function LC(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const FC=LC("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),I3=LC("ascii","a",t=>{let e="a";for(let n=0;n{const e=vC((t=t.substring(1)).length);for(let n=0;n"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new oY:typeof navigator<"u"?VC(navigator.userAgent):function fY(){var t=typeof process<"u"&&process.version;return t?new nY(process.version.slice(1)):null}()}function zC(t){return""!==t&&uY.reduce(function(e,n){var r=n[0],u=n[1];if(e)return e;var v=u.exec(t);return!!v&&[r,v]},!1)}function VC(t){var e=zC(t);if(!e)return null;var n=e[0],r=e[1];if("searchbot"===n)return new iY;var u=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);u?u.length"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof t.senderPublicKey<"u"?Ou(t.senderPublicKey,xs):void 0,r=typeof t.iv<"u"?Ou(t.iv,xs):(0,yC.O6)(P3);return function TY(t){if(Om(t.type)===ch){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Pu(bC([t.type,t.senderPublicKey,t.iv,t.sealed]),T3)}return Pu(bC([t.type,t.iv,t.sealed]),T3)}({type:e,sealed:new gC.OK(Ou(t.symKey,xs)).seal(r,Ou(t.message,O3)),iv:r,senderPublicKey:n})}function Zb(t){const e=Ou(t,T3),n=e.slice(SY,YC),r=YC;if(Om(n)===ch){const Y=r+N3,$=Y+P3,ie=e.slice(r,Y),ue=e.slice(Y,$);return{type:n,sealed:e.slice($),iv:ue,senderPublicKey:ie}}const u=r+P3,v=e.slice(r,u);return{type:n,sealed:e.slice(u),iv:v}}function JC(t){const e=t?.type||ZC;if(e===ch){if(typeof t?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof t?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t?.senderPublicKey,receiverPublicKey:t?.receiverPublicKey}}function QC(t){return t.type===ch&&"string"==typeof t.senderPublicKey&&"string"==typeof t.receiverPublicKey}var PY=Object.defineProperty,XC=Object.getOwnPropertySymbols,NY=Object.prototype.hasOwnProperty,RY=Object.prototype.propertyIsEnumerable,qC=(t,e,n)=>e in t?PY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$C=(t,e)=>{for(var n in e||(e={}))NY.call(e,n)&&qC(t,n,e[n]);if(XC)for(var n of XC(e))RY.call(e,n)&&qC(t,n,e[n]);return t};const kY="ReactNative",Qs={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},FY="js";function L3(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Tp(){return!(0,Tm.getDocument)()&&!!(0,Tm.getNavigator)()&&navigator.product===kY}function Op(){return!L3()&&!!(0,Tm.getNavigator)()&&!!(0,Tm.getDocument)()}function Pp(){return Tp()?Qs.reactNative:L3()?Qs.node:Op()?Qs.browser:Qs.unknown}function VY(t,e,n){const r=function KY(){if(Pp()===Qs.reactNative&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:n,Version:r}=global.Platform;return[n,r].join("-")}const t=cY();if(null===t)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return"browser"===t.type?[e,t.name,t.version].join("-"):[e,t.version].join("-")}(),u=function zY(){var t;const e=Pp();return e===Qs.browser?[e,(null==(t=(0,Tm.getLocation)())?void 0:t.host)||"unknown"].join(":"):e}();return[[t,e].join("-"),[FY,n].join("-"),r,u].join("/")}function HY({protocol:t,version:e,relayUrl:n,sdkVersion:r,auth:u,projectId:v,useOnCloseEvent:O,bundleId:Y}){const $=n.split("?"),ue={auth:u,ua:VY(t,e,r),projectId:v,useOnCloseEvent:O||void 0,origin:Y||void 0},he=function jY(t,e){let n=Wb.parse(t);return n=$C($C({},n),e),Wb.stringify(n)}($[1]||"",ue);return $[0]+"?"+he}function lh(t,e){return t.filter(n=>e.includes(n)).length===t.length}function tx(t){return Object.fromEntries(t.entries())}function nx(t){return new Map(Object.entries(t))}function Np(t=Vn.FIVE_MINUTES,e){const n=(0,Vn.toMiliseconds)(t||Vn.FIVE_MINUTES);let r,u,v;return{resolve:O=>{v&&r&&(clearTimeout(v),r(O))},reject:O=>{v&&u&&(clearTimeout(v),u(O))},done:()=>new Promise((O,Y)=>{v=setTimeout(()=>{Y(new Error(e))},n),r=O,u=Y})}}function Pm(t,e,n){return new Promise(function(){var r=(0,ke.Z)(function*(u,v){const O=setTimeout(()=>v(new Error(n)),e);try{u(yield t)}catch(Y){v(Y)}clearTimeout(O)});return function(u,v){return r.apply(this,arguments)}}())}function rx(t,e){if("string"==typeof e&&e.startsWith(`${t}:`))return e;if("topic"===t.toLowerCase()){if("string"!=typeof e)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}if("id"===t.toLowerCase()){if("number"!=typeof e)throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function ix(t){const[e,n]=t.split(":"),r={id:void 0,topic:void 0};if("topic"===e&&"string"==typeof n)r.topic=n;else{if("id"!==e||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${n}`);r.id=Number(n)}return r}function Nu(t,e){return(0,Vn.fromMiliseconds)((e||Date.now())+(0,Vn.toMiliseconds)(t))}function Pf(t){return Date.now()>=(0,Vn.toMiliseconds)(t)}function oo(t,e){return`${t}${e?`:${e}`:""}`}function F3(){return F3=(0,ke.Z)(function*({id:t,topic:e,wcDeepLink:n}){try{if(!n)return;let u=("string"==typeof n?JSON.parse(n):n)?.href;if("string"!=typeof u)return;u.endsWith("/")&&(u=u.slice(0,-1));const v=`${u}/wc?requestId=${t}&sessionTopic=${e}`,O=Pp();O===Qs.browser?v.startsWith("https://")?window.open(v,"_blank","noreferrer noopener"):window.open(v,"_self","noreferrer noopener"):O===Qs.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&(yield global.Linking.openURL(v))}catch(r){console.error(r)}}),F3.apply(this,arguments)}function B3(){return B3=(0,ke.Z)(function*(t,e){try{return(yield t.getItem(e))||(Op()?localStorage.getItem(e):void 0)}catch(n){console.error(n)}}),B3.apply(this,arguments)}const qY="irn";function j3(t){return t?.relay||{protocol:qY}}function Yb(t){const e=pY[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var $Y=Object.defineProperty,ox=Object.getOwnPropertySymbols,eJ=Object.prototype.hasOwnProperty,tJ=Object.prototype.propertyIsEnumerable,sx=(t,e,n)=>e in t?$Y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nJ=(t,e)=>{for(var n in e||(e={}))eJ.call(e,n)&&sx(t,n,e[n]);if(ox)for(var n of ox(e))tJ.call(e,n)&&sx(t,n,e[n]);return t};function rJ(t,e="-"){const n={},r="relay"+e;return Object.keys(t).forEach(u=>{if(u.startsWith(r)){const v=u.replace(r,""),O=t[u];n[v]=O}}),n}function ax(t){const e=(t=(t=t.includes("wc://")?t.replace("wc://",""):t).includes("wc:")?t.replace("wc:",""):t).indexOf(":"),n=-1!==t.indexOf("?")?t.indexOf("?"):void 0,r=t.substring(0,e),u=t.substring(e+1,n).split("@"),v=typeof n<"u"?t.substring(n):"",O=Wb.parse(v);return{protocol:r,topic:iJ(u[0]),version:parseInt(u[1],10),symKey:O.symKey,relay:rJ(O)}}function iJ(t){return t.startsWith("//")?t.substring(2):t}function sJ(t){return`${t.protocol}:${t.topic}@${t.version}?`+Wb.stringify(nJ({symKey:t.symKey},function oJ(t,e="-"){const r={};return Object.keys(t).forEach(u=>{const v="relay"+e+u;t[u]&&(r[v]=t[u])}),r}(t.relay)))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function Rp(t){const e=[];return t.forEach(n=>{const[r,u]=n.split(":");e.push(`${r}:${u}`)}),e}const bJ={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},wJ={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function _n(t,e){const{message:n,code:r}=wJ[t];return{message:e?`${n} ${e}`:n,code:r}}function po(t,e){const{message:n,code:r}=bJ[t];return{message:e?`${n} ${e}`:n,code:r}}function Nm(t,e){return!!Array.isArray(t)&&(!(typeof e<"u"&&t.length)||t.every(e))}function kp(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function Ts(t){return typeof t>"u"}function Do(t,e){return!(!e||!Ts(t))||"string"==typeof t&&!!t.trim().length}function U3(t,e){return!(!e||!Ts(t))||"number"==typeof t&&!isNaN(t)}function Jb(t){return!(!Do(t,!1)||!t.includes(":"))&&2===t.split(":").length}function dx(t){let e=!0;return Nm(t)?t.length&&(e=t.every(n=>Do(n,!1))):e=!1,e}function CJ(t,e,n){let r=null;return Object.entries(t).forEach(([u,v])=>{if(r)return;const O=function IJ(t,e,n){let r=null;return Nm(e)&&e.length?e.forEach(u=>{r||Jb(u)||(r=po("UNSUPPORTED_CHAINS",`${n}, chain ${u} should be a string and conform to "namespace:chainId" format`))}):Jb(t)||(r=po("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),r}(u,C3(u,v),`${e} ${n}`);O&&(r=O)}),r}function xJ(t,e){let n=null;return Nm(t)?t.forEach(r=>{n||function EJ(t){if(Do(t,!1)&&t.includes(":")){const e=t.split(":");if(3===e.length){const n=e[0]+":"+e[1];return!!e[2]&&Jb(n)}}return!1}(r)||(n=po("UNSUPPORTED_ACCOUNTS",`${e}, account ${r} should be a string and conform to "namespace:chainId:address" format`))}):n=po("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function hx(t,e){let n=null;return Object.values(t).forEach(r=>{if(n)return;const u=function OJ(t,e){let n=null;return dx(t?.methods)?dx(t?.events)||(n=po("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):n=po("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),n}(r,`${e}, namespace`);u&&(n=u)}),n}function Qb(t,e){let n=null;if(t&&kp(t)){const r=hx(t,e);r&&(n=r);const u=function TJ(t,e){let n=null;return Object.values(t).forEach(r=>{if(n)return;const u=xJ(r?.accounts,`${e} namespace`);u&&(n=u)}),n}(t,e);u&&(n=u)}else n=_n("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return n}function px(t){return Do(t.protocol,!0)}function Xs(t){return typeof t<"u"&&null!==typeof t}function gx(t,e){return!(!Jb(e)||!function pJ(t){const e=[];return Object.values(t).forEach(n=>{e.push(...Rp(n.accounts))}),e}(t).includes(e))}function jJ(t,e,n){return!!Do(n,!1)&&function gJ(t,e){const n=[];return Object.values(t).forEach(r=>{Rp(r.accounts).includes(e)&&n.push(...r.methods)}),n}(t,e).includes(n)}function UJ(t,e,n){return!!Do(n,!1)&&function yJ(t,e){const n=[];return Object.values(t).forEach(r=>{Rp(r.accounts).includes(e)&&n.push(...r.events)}),n}(t,e).includes(n)}function K3(t,e,n){let r=null;const u=function KJ(t){const e={};return Object.keys(t).forEach(n=>{var r;n.includes(":")?e[n]=t[n]:null==(r=t[n].chains)||r.forEach(u=>{e[u]={methods:t[n].methods,events:t[n].events}})}),e}(t),v=function zJ(t){const e={};return Object.keys(t).forEach(n=>{n.includes(":")?e[n]=t[n]:Rp(t[n].accounts)?.forEach(u=>{e[u]={accounts:t[n].accounts.filter(v=>v.includes(`${u}:`)),methods:t[n].methods,events:t[n].events}})}),e}(e),O=Object.keys(u),Y=Object.keys(v),$=yx(Object.keys(t)),ie=yx(Object.keys(e)),ue=$.filter(he=>!ie.includes(he));return ue.length&&(r=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${ue.toString()}\n Received: ${Object.keys(e).toString()}`)),lh(O,Y)||(r=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${O.toString()}\n Approved: ${Y.toString()}`)),Object.keys(e).forEach(he=>{if(!he.includes(":")||r)return;const we=Rp(e[he].accounts);we.includes(he)||(r=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${he}\n Required: ${he}\n Approved: ${we.toString()}`))}),O.forEach(he=>{r||(lh(u[he].methods,v[he].methods)?lh(u[he].events,v[he].events)||(r=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${he}`)):r=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${he}`))}),r}function yx(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function mx(){const t=Pp();return new Promise(e=>{switch(t){case Qs.browser:e(function HJ(){return Op()&&navigator?.onLine}());break;case Qs.reactNative:e(function WJ(){return z3.apply(this,arguments)}());break;case Qs.node:default:e(!0)}})}function z3(){return(z3=(0,ke.Z)(function*(){return!(Tp()&&typeof global<"u"&&null!=global&&global.NetInfo)||(yield null==global?void 0:global.NetInfo.fetch())?.isConnected})).apply(this,arguments)}function ZJ(t){switch(Pp()){case Qs.browser:!function YJ(t){!Tp()&&Op()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}(t);break;case Qs.reactNative:!function JJ(t){Tp()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener(e=>t(e?.isConnected))}(t);case Qs.node:}}const V3={};class Xb{static get(e){return V3[e]}static set(e,n){V3[e]=n}static delete(e){delete V3[e]}}var XJ=function QJ(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,Je=new Uint8Array($e);Ce[Le];){var ht=n[Ce.charCodeAt(Le)];if(255===ht)return;for(var xt=0,Wt=$e-1;(0!==ht||xt>>0,Je[Wt]=ht%256>>>0,ht=ht/256>>>0;if(0!==ht)throw new Error("Non-zero carry");Ue=xt,Le++}if(" "!==Ce[Le]){for(var An=$e-Ue;An!==$e&&0===Je[An];)An++;for(var rn=new Uint8Array(je+($e-An)),un=je;An!==$e;)rn[un++]=Je[An++];return rn}}}return{encode:function he(Ce){if(Ce instanceof Uint8Array||(ArrayBuffer.isView(Ce)?Ce=new Uint8Array(Ce.buffer,Ce.byteOffset,Ce.byteLength):Array.isArray(Ce)&&(Ce=Uint8Array.from(Ce))),!(Ce instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ce.length)return"";for(var Le=0,je=0,Ue=0,$e=Ce.length;Ue!==$e&&0===Ce[Ue];)Ue++,Le++;for(var Je=($e-Ue)*ue+1>>>0,ht=new Uint8Array(Je);Ue!==$e;){for(var xt=Ce[Ue],Wt=0,An=Je-1;(0!==xt||Wt>>0,ht[An]=xt%Y>>>0,xt=xt/Y>>>0;if(0!==xt)throw new Error("Non-zero carry");je=Wt,Ue++}for(var rn=Je-je;rn!==Je&&0===ht[rn];)rn++;for(var un=$.repeat(Le);rn{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class rQ{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class iQ{constructor(e,n,r){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return vx(this,e)}}class oQ{constructor(e){this.decoders=e}or(e){return vx(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const vx=(t,e)=>new oQ({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class sQ{constructor(e,n,r,u){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=u,this.encoder=new rQ(e,n,r),this.decoder=new iQ(e,n,u)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const $b=({name:t,prefix:e,encode:n,decode:r})=>new sQ(t,e,n,r),Rm=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:u}=$J(n,e);return $b({prefix:t,name:e,encode:r,decode:v=>qb(u(v))})},Bo=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>$b({prefix:e,name:t,encode:u=>((t,e,n)=>{const r="="===e[e.length-1],u=(1<n;)O-=n,v+=e[u&Y>>O];if(O&&(v+=e[u&Y<((t,e,n,r)=>{const u={};for(let ue=0;ue=8&&(Y-=8,O[ie++]=255&$>>Y)}if(Y>=n||255&$<<8-Y)throw new SyntaxError("Unexpected end of data");return O})(u,r,n,t)}),cQ=$b({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),lQ=Bo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),fQ=Bo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),dQ=Rm({prefix:"9",name:"base10",alphabet:"0123456789"}),hQ=Bo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),pQ=Bo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),gQ=Bo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),yQ=Bo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),mQ=Bo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),vQ=Bo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),bQ=Bo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),wQ=Bo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),AQ=Bo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),EQ=Bo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),SQ=Bo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),_Q=Rm({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),MQ=Rm({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),DQ=Rm({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),IQ=Rm({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),CQ=Bo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),xQ=Bo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),TQ=Bo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),OQ=Bo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),bx=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),PQ=bx.reduce((t,e,n)=>(t[n]=e,t),[]),NQ=bx.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const LQ=$b({prefix:"\u{1f680}",name:"base256emoji",encode:function RQ(t){return t.reduce((e,n)=>e+=PQ[n],"")},decode:function kQ(t){const e=[];for(const n of t){const r=NQ[n.codePointAt(0)];if(void 0===r)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}});var FQ=function Ax(t,e,n){e=e||[];for(var r=n=n||0;t>=UQ;)e[n++]=255&t|wx,t/=128;for(;t&jQ;)e[n++]=255&t|wx,t>>>=7;return e[n]=0|t,Ax.bytes=n-r+1,e},wx=128,jQ=-128,UQ=Math.pow(2,31);var KQ=function H3(t,r){var O,n=0,u=0,v=r=r||0,Y=t.length;do{if(v>=Y)throw H3.bytes=0,new RangeError("Could not decode varint");O=t[v++],n+=u<28?(O&Ex)<=zQ);return H3.bytes=v-r,n},zQ=128,Ex=127;var VQ=Math.pow(2,7),HQ=Math.pow(2,14),WQ=Math.pow(2,21),GQ=Math.pow(2,28),ZQ=Math.pow(2,35),YQ=Math.pow(2,42),JQ=Math.pow(2,49),QQ=Math.pow(2,56),XQ=Math.pow(2,63),$Q={encode:FQ,decode:KQ,encodingLength:function(t){return t(Sx.encode(t,e,n),e),Mx=t=>Sx.encodingLength(t),W3=(t,e)=>{const n=e.byteLength,r=Mx(t),u=r+Mx(n),v=new Uint8Array(u+n);return _x(t,v,0),_x(n,v,r),v.set(e,u),new Dx(t,n,e,v)};class Dx{constructor(e,n,r,u){this.code=e,this.size=n,this.digest=r,this.bytes=u}}const Ix=({name:t,code:e,encode:n})=>new tX(t,e,n);class tX{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?W3(this.code,n):n.then(r=>W3(this.code,r))}throw Error("Unknown type, must be binary type")}}const Cx=t=>function(){var e=(0,ke.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),nX=Ix({name:"sha2-256",code:18,encode:Cx("SHA-256")}),rX=Ix({name:"sha2-512",code:19,encode:Cx("SHA-512")}),Tx=qb,oX={code:0,name:"identity",encode:Tx,digest:t=>W3(0,Tx(t))},sX="raw",aX=85,uX=t=>qb(t),cX=t=>qb(t),lX=new TextEncoder,fX=new TextDecoder,dX="json",hX=512,pX=t=>lX.encode(JSON.stringify(t)),gX=t=>JSON.parse(fX.decode(t));class Os{constructor(e,n,r,u){this.code=n,this.version=e,this.multihash=r,this.bytes=u,this.byteOffset=u.byteOffset,this.byteLength=u.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:tw,byteLength:tw,code:ew,version:ew,multihash:ew,bytes:ew,_baseCache:tw,asCID:tw})}toV0(){if(0===this.version)return this;{const{code:e,multihash:n}=this;if(e!==km)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==bX)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Os.createV0(n)}}toV1(){switch(this.version){case 0:{const{code:e,digest:n}=this.multihash,r=Digest.create(e,n);return Os.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:n,version:r,_baseCache:u}=this;return 0===r?mX(n,u,e||base58btc.encoder):vX(n,u,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return AX(/^0\.0/,EX),!(!e||!e[Px]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Os)return e;if(null!=e&&e.asCID===e){const{version:n,code:r,multihash:u,bytes:v}=e;return new Os(n,r,u,v||Ox(n,r,u.bytes))}if(null!=e&&!0===e[Px]){const{version:n,multihash:r,code:u}=e,v=Digest.decode(r);return Os.create(n,u,v)}return null}static create(e,n,r){if("number"!=typeof n)throw new Error("String codecs are no longer supported");switch(e){case 0:if(n!==km)throw new Error(`Version 0 CID must use dag-pb (code: ${km}) block encoding`);return new Os(e,n,r,r.bytes);case 1:{const u=Ox(e,n,r.bytes);return new Os(e,n,r,u)}default:throw new Error("Invalid version")}}static createV0(e){return Os.create(0,km,e)}static createV1(e,n){return Os.create(1,e,n)}static decode(e){const[n,r]=Os.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return n}static decodeFirst(e){const n=Os.inspectBytes(e),r=n.size-n.multihashSize,u=coerce(e.subarray(r,r+n.multihashSize));if(u.byteLength!==n.multihashSize)throw new Error("Incorrect length");const v=u.subarray(n.multihashSize-n.digestSize),O=new Digest.Digest(n.multihashCode,n.digestSize,v,u);return[0===n.version?Os.createV0(O):Os.createV1(n.codec,O),e.subarray(n.size)]}static inspectBytes(e){let n=0;const r=()=>{const[he,we]=varint.decode(e.subarray(n));return we,he};let u=r(),v=km;if(18===u?(0,0):1===u&&r(),0!==u&&1!==u)throw new RangeError(`Invalid CID version ${u}`);const O=n,Y=r(),$=r(),ie=n+$;return{version:u,codec:v,multihashCode:Y,digestSize:$,multihashSize:ie-O,size:ie}}static parse(e,n){const[r,u]=yX(e,n),v=Os.decode(u);return v._baseCache.set(r,e),v}}Symbol.for("@ipld/js-cid/CID");const Nx={...a,...d,...g,...D,...F,...z,...C,...f,...k,...se};function _X(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?function SX(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function Rx(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const kx=Rx("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),G3=Rx("ascii","a",t=>{let e="a";for(let n=0;n{const e=_X((t=t.substring(1)).length);for(let n=0;nn.code===t)||Lm[Fx]}var RX=p(71948);function Y3(t=3){return Date.now()*Math.pow(10,t)+Math.floor(Math.random()*Math.pow(10,t))}function Kx(t=6){return BigInt(Y3(t))}function Lp(t,e,n){return{id:n||Y3(),jsonrpc:"2.0",method:t,params:e}}function J3(t,e){return{id:t,jsonrpc:"2.0",result:e}}function Q3(t,e,n){return{id:t,jsonrpc:"2.0",error:kX(e,n)}}function kX(t,e){return typeof t>"u"?jx(Lx):("string"==typeof t&&(t=Object.assign(Object.assign({},jx(Z3)),{message:t})),typeof e<"u"&&(t.data=e),Bx(t.code)&&(t=Ux(t.code)),t)}class LX{}class FX extends LX{constructor(){super()}}class BX extends FX{constructor(e){super()}}const UX="^wss?:";function zx(t,e){const n=function KX(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(e&&e.length)return e[0]}(t);return!(typeof n>"u")&&new RegExp(e).test(n)}function Vx(t){return zx(t,UX)}function zX(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function Hx(t){return"object"==typeof t&&"id"in t&&"jsonrpc"in t&&"2.0"===t.jsonrpc}function X3(t){return Hx(t)&&"method"in t}function nw(t){return Hx(t)&&(vl(t)||Ru(t))}function vl(t){return"result"in t}function Ru(t){return"error"in t}class VX extends BX{constructor(e){super(e),this.events=new Mu.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}connect(e=this.connection){var n=this;return(0,ke.Z)(function*(){yield n.open(e)})()}disconnect(){var e=this;return(0,ke.Z)(function*(){yield e.close()})()}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}request(e,n){var r=this;return(0,ke.Z)(function*(){return r.requestStrict(Lp(e.method,e.params||[],e.id||Kx().toString()),n)})()}requestStrict(e,n){var r=this;return(0,ke.Z)(function*(){return new Promise(function(){var u=(0,ke.Z)(function*(v,O){if(!r.connection.connected)try{yield r.open()}catch(Y){O(Y)}r.events.on(`${e.id}`,Y=>{Ru(Y)?O(Y.error):v(Y.result)});try{yield r.connection.send(e,n)}catch(Y){O(Y)}});return function(v,O){return u.apply(this,arguments)}}())})()}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),nw(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}open(e=this.connection){var n=this;return(0,ke.Z)(function*(){n.connection===e&&n.connection.connected||(n.connection.connected&&n.close(),"string"==typeof e&&(yield n.connection.open(e),e=n.connection),n.connection=n.setConnection(e),yield n.connection.open(),n.registerEventListeners(),n.events.emit("connect"))})()}close(){var e=this;return(0,ke.Z)(function*(){yield e.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const Wx=t=>t.split("?")[0],GX=typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:p(25504);class ZX{constructor(e){if(this.url=e,this.events=new Mu.EventEmitter,this.registering=!1,!Vx(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}open(e=this.url){var n=this;return(0,ke.Z)(function*(){yield n.register(e)})()}close(){var e=this;return(0,ke.Z)(function*(){return new Promise((n,r)=>{typeof e.socket>"u"?r(new Error("Connection already closed")):(e.socket.onclose=u=>{e.onClose(u),n()},e.socket.close())})})()}send(e){var n=this;return(0,ke.Z)(function*(){typeof n.socket>"u"&&(n.socket=yield n.register());try{n.socket.send(VI(e))}catch(r){n.onError(e.id,r)}})()}register(e=this.url){if(!Vx(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const n=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=n||this.events.listenerCount("open")>=n)&&this.events.setMaxListeners(n+1),new Promise((r,u)=>{this.events.once("register_error",v=>{this.resetMaxListeners(),u(v)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return u(new Error("WebSocket connection is missing or invalid"));r(this.socket)})})}return this.url=e,this.registering=!0,new Promise((n,r)=>{const u=new URLSearchParams(e).get("origin"),v=(0,RX.isReactNative)()?{headers:{origin:u}}:{rejectUnauthorized:!zX(e)},O=new GX(e,[],v);typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?O.onerror=Y=>{const $=Y;r(this.emitError($.error))}:O.on("error",Y=>{r(this.emitError(Y))}),O.onopen=()=>{this.onOpen(O),n(O)}})}onOpen(e){e.onmessage=n=>this.onPayload(n),e.onclose=n=>this.onClose(n),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const n="string"==typeof e.data?zI(e.data):e.data;this.events.emit("payload",n)}onError(e,n){const r=this.parseError(n),v=Q3(e,r.message||r.toString());this.events.emit("payload",v)}parseError(e,n=this.url){return function NX(t,e,n){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${e}`):t}(e,Wx(n),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const n=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${Wx(this.url)}`));return this.events.emit("register_error",n),n}}var YX=p(88222),JX=p.n(YX),QX=p(33024),XX=p.n(QX);var $X=function qX(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,Je=new Uint8Array($e);Ce[Le];){var ht=n[Ce.charCodeAt(Le)];if(255===ht)return;for(var xt=0,Wt=$e-1;(0!==ht||xt>>0,Je[Wt]=ht%256>>>0,ht=ht/256>>>0;if(0!==ht)throw new Error("Non-zero carry");Ue=xt,Le++}if(" "!==Ce[Le]){for(var An=$e-Ue;An!==$e&&0===Je[An];)An++;for(var rn=new Uint8Array(je+($e-An)),un=je;An!==$e;)rn[un++]=Je[An++];return rn}}}return{encode:function he(Ce){if(Ce instanceof Uint8Array||(ArrayBuffer.isView(Ce)?Ce=new Uint8Array(Ce.buffer,Ce.byteOffset,Ce.byteLength):Array.isArray(Ce)&&(Ce=Uint8Array.from(Ce))),!(Ce instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ce.length)return"";for(var Le=0,je=0,Ue=0,$e=Ce.length;Ue!==$e&&0===Ce[Ue];)Ue++,Le++;for(var Je=($e-Ue)*ue+1>>>0,ht=new Uint8Array(Je);Ue!==$e;){for(var xt=Ce[Ue],Wt=0,An=Je-1;(0!==xt||Wt>>0,ht[An]=xt%Y>>>0,xt=xt/Y>>>0;if(0!==xt)throw new Error("Non-zero carry");je=Wt,Ue++}for(var rn=Je-je;rn!==Je&&0===ht[rn];)rn++;for(var un=$.repeat(Le);rn{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")};class rq{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class iq{constructor(e,n,r){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Yx(this,e)}}class oq{constructor(e){this.decoders=e}or(e){return Yx(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Yx=(t,e)=>new oq({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class sq{constructor(e,n,r,u){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=u,this.encoder=new rq(e,n,r),this.decoder=new iq(e,n,u)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const rw=({name:t,prefix:e,encode:n,decode:r})=>new sq(t,e,n,r),Fm=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:u}=eq(n,e);return rw({prefix:t,name:e,encode:r,decode:v=>Zx(u(v))})},jo=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>rw({prefix:e,name:t,encode:u=>((t,e,n)=>{const r="="===e[e.length-1],u=(1<n;)O-=n,v+=e[u&Y>>O];if(O&&(v+=e[u&Y<((t,e,n,r)=>{const u={};for(let ue=0;ue=8&&(Y-=8,O[ie++]=255&$>>Y)}if(Y>=n||255&$<<8-Y)throw new SyntaxError("Unexpected end of data");return O})(u,r,n,t)}),cq=rw({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)});var lq=Object.freeze({__proto__:null,identity:cq});const fq=jo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var dq=Object.freeze({__proto__:null,base2:fq});const hq=jo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var pq=Object.freeze({__proto__:null,base8:hq});const gq=Fm({prefix:"9",name:"base10",alphabet:"0123456789"});var yq=Object.freeze({__proto__:null,base10:gq});const mq=jo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),vq=jo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var bq=Object.freeze({__proto__:null,base16:mq,base16upper:vq});const wq=jo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Aq=jo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Eq=jo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Sq=jo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),_q=jo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Mq=jo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Dq=jo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Iq=jo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Cq=jo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var xq=Object.freeze({__proto__:null,base32:wq,base32upper:Aq,base32pad:Eq,base32padupper:Sq,base32hex:_q,base32hexupper:Mq,base32hexpad:Dq,base32hexpadupper:Iq,base32z:Cq});const Tq=Fm({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Oq=Fm({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Pq=Object.freeze({__proto__:null,base36:Tq,base36upper:Oq});const Nq=Fm({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Rq=Fm({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var kq=Object.freeze({__proto__:null,base58btc:Nq,base58flickr:Rq});const Lq=jo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Fq=jo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Bq=jo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),jq=jo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Uq=Object.freeze({__proto__:null,base64:Lq,base64pad:Fq,base64url:Bq,base64urlpad:jq});const Jx=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),Kq=Jx.reduce((t,e,n)=>(t[n]=e,t),[]),zq=Jx.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const Wq=rw({prefix:"\u{1f680}",name:"base256emoji",encode:function Vq(t){return t.reduce((e,n)=>e+=Kq[n],"")},decode:function Hq(t){const e=[];for(const n of t){const r=zq[n.codePointAt(0)];if(void 0===r)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}});var Gq=Object.freeze({__proto__:null,base256emoji:Wq}),Zq=function Xx(t,e,n){e=e||[];for(var r=n=n||0;t>=Qq;)e[n++]=255&t|Qx,t/=128;for(;t&Jq;)e[n++]=255&t|Qx,t>>>=7;return e[n]=0|t,Xx.bytes=n-r+1,e},Qx=128,Jq=-128,Qq=Math.pow(2,31);var Xq=function q3(t,r){var O,n=0,u=0,v=r=r||0,Y=t.length;do{if(v>=Y)throw q3.bytes=0,new RangeError("Could not decode varint");O=t[v++],n+=u<28?(O&qx)<=qq);return q3.bytes=v-r,n},qq=128,qx=127;var $q=Math.pow(2,7),e$=Math.pow(2,14),t$=Math.pow(2,21),n$=Math.pow(2,28),r$=Math.pow(2,35),i$=Math.pow(2,42),o$=Math.pow(2,49),s$=Math.pow(2,56),a$=Math.pow(2,63),c$={encode:Zq,decode:Xq,encodingLength:function(t){return t<$q?1:t($x.encode(t,e,n),e),tT=t=>$x.encodingLength(t),$3=(t,e)=>{const n=e.byteLength,r=tT(t),u=r+tT(n),v=new Uint8Array(u+n);return eT(t,v,0),eT(n,v,r),v.set(e,u),new l$(t,n,e,v)};class l${constructor(e,n,r,u){this.code=e,this.size=n,this.digest=r,this.bytes=u}}const nT=({name:t,code:e,encode:n})=>new f$(t,e,n);class f${constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?$3(this.code,n):n.then(r=>$3(this.code,r))}throw Error("Unknown type, must be binary type")}}const rT=t=>function(){var e=(0,ke.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),d$=nT({name:"sha2-256",code:18,encode:rT("SHA-256")}),h$=nT({name:"sha2-512",code:19,encode:rT("SHA-512")});Object.freeze({__proto__:null,sha256:d$,sha512:h$});const oT=Zx;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:oT,digest:t=>$3(0,oT(t))}});new TextEncoder,new TextDecoder;const sT={...lq,...dq,...pq,...yq,...bq,...xq,...Pq,...kq,...Uq,...Gq};function aT(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function uT(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const cT=uT("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),eS=uT("ascii","a",t=>{let e="a";for(let n=0;n{const e=function m$(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?aT(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}((t=t.substring(1)).length);for(let n=0;n(this.isInitialized(),this.keychain.has(u)),this.set=function(){var u=(0,ke.Z)(function*(v,O){r.isInitialized(),r.keychain.set(v,O),yield r.persist()});return function(v,O){return u.apply(this,arguments)}}(),this.get=u=>{this.isInitialized();const v=this.keychain.get(u);if(typeof v>"u"){const{message:O}=_n("NO_MATCHING_KEY",`${this.name}: ${u}`);throw new Error(O)}return v},this.del=function(){var u=(0,ke.Z)(function*(v){r.isInitialized(),r.keychain.delete(v),yield r.persist()});return function(v){return u.apply(this,arguments)}}(),this.core=e,this.logger=(0,Kr.generateChildLogger)(n,this.name)}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setKeyChain(e){var n=this;return(0,ke.Z)(function*(){yield n.core.storage.setItem(n.storageKey,tx(e))})()}getKeyChain(){var e=this;return(0,ke.Z)(function*(){const n=yield e.core.storage.getItem(e.storageKey);return typeof n<"u"?nx(n):void 0})()}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setKeyChain(e.keychain)})()}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class q${constructor(e,n,r){var u=this;this.core=e,this.logger=n,this.name="crypto",this.initialized=!1,this.init=(0,ke.Z)(function*(){u.initialized||(yield u.keychain.init(),u.initialized=!0)}),this.hasKeys=v=>(this.isInitialized(),this.keychain.has(v)),this.getClientId=(0,ke.Z)(function*(){u.isInitialized();return hC(pC(yield u.getClientSeed()).publicKey)}),this.generateKeyPair=()=>{this.isInitialized();const v=function _Y(){const t=mC.Au();return{privateKey:Pu(t.secretKey,xs),publicKey:Pu(t.publicKey,xs)}}();return this.setPrivateKey(v.publicKey,v.privateKey)},this.signJWT=function(){var v=(0,ke.Z)(function*(O){u.isInitialized();const $=pC(yield u.getClientSeed()),ie=R3();return yield function DG(t,e,n,r){return A3.apply(this,arguments)}(ie,O,_$,$)});return function(O){return v.apply(this,arguments)}}(),this.generateSharedKey=(v,O,Y)=>{this.isInitialized();const ie=function MY(t,e){const n=mC.gi(Ou(t,xs),Ou(e,xs),!0);return Pu(new IG.t(S3.mE,n).expand(N3),xs)}(this.getPrivateKey(v),O);return this.setSymKey(ie,Y)},this.setSymKey=function(){var v=(0,ke.Z)(function*(O,Y){u.isInitialized();const $=Y||function DY(t){return Pu((0,S3.vp)(Ou(t,xs)),xs)}(O);return yield u.keychain.set($,O),$});return function(O,Y){return v.apply(this,arguments)}}(),this.deleteKeyPair=function(){var v=(0,ke.Z)(function*(O){u.isInitialized(),yield u.keychain.del(O)});return function(O){return v.apply(this,arguments)}}(),this.deleteSymKey=function(){var v=(0,ke.Z)(function*(O){u.isInitialized(),yield u.keychain.del(O)});return function(O){return v.apply(this,arguments)}}(),this.encode=function(){var v=(0,ke.Z)(function*(O,Y,$){u.isInitialized();const ie=JC($),ue=VI(Y);if(QC(ie)){const Ce=ie.senderPublicKey,Le=ie.receiverPublicKey;O=yield u.generateSharedKey(Ce,Le)}const he=u.getSymKey(O),{type:we,senderPublicKey:xe}=ie;return CY({type:we,symKey:he,message:ue,senderPublicKey:xe})});return function(O,Y,$){return v.apply(this,arguments)}}(),this.decode=function(){var v=(0,ke.Z)(function*(O,Y,$){u.isInitialized();const ie=function OY(t,e){const n=Zb(t);return JC({type:Om(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?Pu(n.senderPublicKey,xs):void 0,receiverPublicKey:e?.receiverPublicKey})}(Y,$);if(QC(ie)){const ue=ie.receiverPublicKey,he=ie.senderPublicKey;O=yield u.generateSharedKey(ue,he)}try{const he=function xY(t){const e=new gC.OK(Ou(t.symKey,xs)),{sealed:n,iv:r}=Zb(t.encoded),u=e.open(r,n);if(null===u)throw new Error("Failed to decrypt");return Pu(u,O3)}({symKey:u.getSymKey(O),encoded:Y});return zI(he)}catch(ue){u.logger.error(`Failed to decode message from topic: '${O}', clientId: '${yield u.getClientId()}'`),u.logger.error(ue)}});return function(O,Y,$){return v.apply(this,arguments)}}(),this.getPayloadType=v=>Om(Zb(v).type),this.getPayloadSenderPublicKey=v=>{const O=Zb(v);return O.senderPublicKey?function DX(t,e="utf8"){const n=MX[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(t).substring(1):globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8")}(O.senderPublicKey,xs):void 0},this.core=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.keychain=r||new X$(this.core,this.logger)}get context(){return(0,Kr.getLoggerContext)(this.logger)}setPrivateKey(e,n){var r=this;return(0,ke.Z)(function*(){return yield r.keychain.set(e,n),e})()}getPrivateKey(e){return this.keychain.get(e)}getClientSeed(){var e=this;return(0,ke.Z)(function*(){let n="";try{n=e.keychain.get(fT)}catch{n=R3(),yield e.keychain.set(fT,n)}return function b$(t,e="utf8"){const n=v$[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${t}`):aT(globalThis.Buffer.from(t,"utf-8"))}(n,"base16")})()}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class $$ extends _H{constructor(e,n){var r;super(e,n),r=this,this.logger=e,this.core=n,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Nf,this.init=(0,ke.Z)(function*(){if(!r.initialized){r.logger.trace("Initialized");try{const u=yield r.getRelayerMessages();typeof u<"u"&&(r.messages=u),r.logger.debug(`Successfully Restored records for ${r.name}`),r.logger.trace({type:"method",method:"restore",size:r.messages.size})}catch(u){r.logger.debug(`Failed to Restore records for ${r.name}`),r.logger.error(u)}finally{r.initialized=!0}}}),this.set=function(){var u=(0,ke.Z)(function*(v,O){r.isInitialized();const Y=xp(O);let $=r.messages.get(v);return typeof $>"u"&&($={}),typeof $[Y]<"u"||($[Y]=O,r.messages.set(v,$),yield r.persist()),Y});return function(v,O){return u.apply(this,arguments)}}(),this.get=u=>{this.isInitialized();let v=this.messages.get(u);return typeof v>"u"&&(v={}),v},this.has=(u,v)=>{this.isInitialized();return typeof this.get(u)[xp(v)]<"u"},this.del=function(){var u=(0,ke.Z)(function*(v){r.isInitialized(),r.messages.delete(v),yield r.persist()});return function(v){return u.apply(this,arguments)}}(),this.logger=(0,Kr.generateChildLogger)(e,this.name),this.core=n}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setRelayerMessages(e){var n=this;return(0,ke.Z)(function*(){yield n.core.storage.setItem(n.storageKey,tx(e))})()}getRelayerMessages(){var e=this;return(0,ke.Z)(function*(){const n=yield e.core.storage.getItem(e.storageKey);return typeof n<"u"?nx(n):void 0})()}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setRelayerMessages(e.messages)})()}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class eee extends MH{constructor(e,n){var r;super(e,n),r=this,this.relayer=e,this.logger=n,this.events=new Mu.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,Vn.toMiliseconds)(Vn.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=function(){var u=(0,ke.Z)(function*(v,O,Y){var $;r.logger.debug("Publishing Payload"),r.logger.trace({type:"method",method:"publish",params:{topic:v,message:O,opts:Y}});try{const ie=Y?.ttl||x$,ue=j3(Y),he=Y?.prompt||!1,we=Y?.tag||0,xe=Y?.id||Kx().toString(),Ce={topic:v,message:O,opts:{ttl:ie,relay:ue,prompt:he,tag:we,id:xe}},Le=setTimeout(()=>r.queue.set(xe,Ce),r.publishTimeout);try{yield yield Pm(r.rpcPublish(v,O,ie,ue,he,we,xe),r.publishTimeout,"Failed to publish payload, please try again."),r.removeRequestFromQueue(xe),r.relayer.events.emit(os_publish,Ce)}catch(je){if(r.logger.debug("Publishing Payload stalled"),r.needsTransportRestart=!0,null!=($=Y?.internal)&&$.throwOnFailedPublish)throw r.removeRequestFromQueue(xe),je;return}finally{clearTimeout(Le)}r.logger.debug("Successfully Published Payload"),r.logger.trace({type:"method",method:"publish",params:{topic:v,message:O,opts:Y}})}catch(ie){throw r.logger.debug("Failed to Publish Payload"),r.logger.error(ie),ie}});return function(v,O,Y){return u.apply(this,arguments)}}(),this.on=(u,v)=>{this.events.on(u,v)},this.once=(u,v)=>{this.events.once(u,v)},this.off=(u,v)=>{this.events.off(u,v)},this.removeListener=(u,v)=>{this.events.removeListener(u,v)},this.relayer=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.registerEventListeners()}get context(){return(0,Kr.getLoggerContext)(this.logger)}rpcPublish(e,n,r,u,v,O,Y){var $,ie,ue,he;const we={method:Yb(u.protocol).publish,params:{topic:e,message:n,ttl:r,prompt:v,tag:O},id:Y};return Ts(null==($=we.params)?void 0:$.prompt)&&(null==(ie=we.params)||delete ie.prompt),Ts(null==(ue=we.params)?void 0:ue.tag)&&(null==(he=we.params)||delete he.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:we}),this.relayer.request(we)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){var e=this;this.queue.forEach(function(){var n=(0,ke.Z)(function*(r){const{topic:u,message:v,opts:O}=r;yield e.publish(u,v,O)});return function(r){return n.apply(this,arguments)}}())}registerEventListeners(){this.relayer.core.heartbeat.on(Mm.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(os_connection_stalled);this.checkQueue()}),this.relayer.on(os_message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class tee{constructor(){this.map=new Map,this.set=(e,n)=>{const r=this.get(e);this.exists(e,n)||this.map.set(e,[...r,n])},this.get=e=>this.map.get(e)||[],this.exists=(e,n)=>this.get(e).includes(n),this.delete=(e,n)=>{if(typeof n>"u")return void this.map.delete(e);if(!this.map.has(e))return;const r=this.get(e);if(!this.exists(e,n))return;const u=r.filter(v=>v!==n);u.length?this.map.set(e,u):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var nee=Object.defineProperty,ree=Object.defineProperties,iee=Object.getOwnPropertyDescriptors,gT=Object.getOwnPropertySymbols,oee=Object.prototype.hasOwnProperty,see=Object.prototype.propertyIsEnumerable,yT=(t,e,n)=>e in t?nee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Um=(t,e)=>{for(var n in e||(e={}))oee.call(e,n)&&yT(t,n,e[n]);if(gT)for(var n of gT(e))see.call(e,n)&&yT(t,n,e[n]);return t},iS=(t,e)=>ree(t,iee(e));class aee extends CH{constructor(e,n){var r;super(e,n),r=this,this.relayer=e,this.logger=n,this.subscriptions=new Map,this.topicMap=new tee,this.events=new Mu.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Nf,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=(0,ke.Z)(function*(){r.initialized||(r.logger.trace("Initialized"),r.registerEventListeners(),r.clientId=yield r.relayer.core.crypto.getClientId())}),this.subscribe=function(){var u=(0,ke.Z)(function*(v,O){yield r.restartToComplete(),r.isInitialized(),r.logger.debug("Subscribing Topic"),r.logger.trace({type:"method",method:"subscribe",params:{topic:v,opts:O}});try{const Y=j3(O),$={topic:v,relay:Y};r.pending.set(v,$);const ie=yield r.rpcSubscribe(v,Y);return r.onSubscribe(ie,$),r.logger.debug("Successfully Subscribed Topic"),r.logger.trace({type:"method",method:"subscribe",params:{topic:v,opts:O}}),ie}catch(Y){throw r.logger.debug("Failed to Subscribe Topic"),r.logger.error(Y),Y}});return function(v,O){return u.apply(this,arguments)}}(),this.unsubscribe=function(){var u=(0,ke.Z)(function*(v,O){yield r.restartToComplete(),r.isInitialized(),typeof O?.id<"u"?yield r.unsubscribeById(v,O.id,O):yield r.unsubscribeByTopic(v,O)});return function(v,O){return u.apply(this,arguments)}}(),this.isSubscribed=function(){var u=(0,ke.Z)(function*(v){return!!r.topics.includes(v)||(yield new Promise((O,Y)=>{const $=new Vn.Watch;$.start(r.pendingSubscriptionWatchLabel);const ie=setInterval(()=>{!r.pending.has(v)&&r.topics.includes(v)&&(clearInterval(ie),$.stop(r.pendingSubscriptionWatchLabel),O(!0)),$.elapsed(r.pendingSubscriptionWatchLabel)>=K$&&(clearInterval(ie),$.stop(r.pendingSubscriptionWatchLabel),Y(new Error("Subscription resolution timeout")))},r.pollingInterval)}).catch(()=>!1))});return function(v){return u.apply(this,arguments)}}(),this.on=(u,v)=>{this.events.on(u,v)},this.once=(u,v)=>{this.events.once(u,v)},this.off=(u,v)=>{this.events.off(u,v)},this.removeListener=(u,v)=>{this.events.removeListener(u,v)},this.restart=(0,ke.Z)(function*(){r.restartInProgress=!0,yield r.restore(),yield r.reset(),r.restartInProgress=!1}),this.relayer=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.clientId=""}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,n){let r=!1;try{r=this.getSubscription(e).topic===n}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}unsubscribeByTopic(e,n){var r=this;return(0,ke.Z)(function*(){const u=r.topicMap.get(e);yield Promise.all(u.map(function(){var v=(0,ke.Z)(function*(O){return yield r.unsubscribeById(e,O,n)});return function(O){return v.apply(this,arguments)}}()))})()}unsubscribeById(e,n,r){var u=this;return(0,ke.Z)(function*(){u.logger.debug("Unsubscribing Topic"),u.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:r}});try{const v=j3(r);yield u.rpcUnsubscribe(e,n,v);const O=po("USER_DISCONNECTED",`${u.name}, ${e}`);yield u.onUnsubscribe(e,n,O),u.logger.debug("Successfully Unsubscribed Topic"),u.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:r}})}catch(v){throw u.logger.debug("Failed to Unsubscribe Topic"),u.logger.error(v),v}})()}rpcSubscribe(e,n){var r=this;return(0,ke.Z)(function*(){const u={method:Yb(n.protocol).subscribe,params:{topic:e}};r.logger.debug("Outgoing Relay Payload"),r.logger.trace({type:"payload",direction:"outgoing",request:u});try{yield yield Pm(r.relayer.request(u),r.subscribeTimeout)}catch{r.logger.debug("Outgoing Relay Subscribe Payload stalled"),r.relayer.events.emit(os_connection_stalled)}return xp(e+r.clientId)})()}rpcBatchSubscribe(e){var n=this;return(0,ke.Z)(function*(){if(!e.length)return;const u={method:Yb(e[0].relay.protocol).batchSubscribe,params:{topics:e.map(v=>v.topic)}};n.logger.debug("Outgoing Relay Payload"),n.logger.trace({type:"payload",direction:"outgoing",request:u});try{return yield yield Pm(n.relayer.request(u),n.subscribeTimeout)}catch{n.logger.debug("Outgoing Relay Payload stalled"),n.relayer.events.emit(os_connection_stalled)}})()}rpcUnsubscribe(e,n,r){const u={method:Yb(r.protocol).unsubscribe,params:{topic:e,id:n}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:u}),this.relayer.request(u)}onSubscribe(e,n){this.setSubscription(e,iS(Um({},n),{id:e})),this.pending.delete(n.topic)}onBatchSubscribe(e){e.length&&e.forEach(n=>{this.setSubscription(n.id,Um({},n)),this.pending.delete(n.topic)})}onUnsubscribe(e,n,r){var u=this;return(0,ke.Z)(function*(){u.events.removeAllListeners(n),u.hasSubscription(n,e)&&u.deleteSubscription(n,r),yield u.relayer.messages.del(e)})()}setRelayerSubscriptions(e){var n=this;return(0,ke.Z)(function*(){yield n.relayer.core.storage.setItem(n.storageKey,e)})()}getRelayerSubscriptions(){var e=this;return(0,ke.Z)(function*(){return yield e.relayer.core.storage.getItem(e.storageKey)})()}setSubscription(e,n){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:n}),this.addSubscription(e,n))}addSubscription(e,n){this.subscriptions.set(e,Um({},n)),this.topicMap.set(n.topic,e),this.events.emit(ku_created,n)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const n=this.subscriptions.get(e);if(!n){const{message:r}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(r)}return n}deleteSubscription(e,n){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:n});const r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(ku_deleted,iS(Um({},r),{reason:n}))}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setRelayerSubscriptions(e.values),e.events.emit(ku_sync)})()}reset(){var e=this;return(0,ke.Z)(function*(){if(e.cached.length){const n=Math.ceil(e.cached.length/e.batchSubscribeTopicsLimit);for(let r=0;r"u"||!n.length)return;if(e.subscriptions.size){const{message:r}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(r),e.logger.error(`${e.name}: ${JSON.stringify(e.values)}`),new Error(r)}e.cached=n,e.logger.debug(`Successfully Restored subscriptions for ${e.name}`),e.logger.trace({type:"method",method:"restore",subscriptions:e.values})}catch(n){e.logger.debug(`Failed to Restore subscriptions for ${e.name}`),e.logger.error(n)}})()}batchSubscribe(e){var n=this;return(0,ke.Z)(function*(){if(!e.length)return;const r=yield n.rpcBatchSubscribe(e);Nm(r)&&n.onBatchSubscribe(r.map((u,v)=>iS(Um({},e[v]),{id:u})))})()}onConnect(){var e=this;return(0,ke.Z)(function*(){e.restartInProgress||(yield e.restart(),e.onEnable())})()}onDisconnect(){this.onDisable()}checkPending(){var e=this;return(0,ke.Z)(function*(){if(!e.initialized||e.relayer.transportExplicitlyClosed)return;const n=[];e.pending.forEach(r=>{n.push(r)}),yield e.batchSubscribe(n)})()}registerEventListeners(){var e=this;this.relayer.core.heartbeat.on(Mm.HEARTBEAT_EVENTS.pulse,(0,ke.Z)(function*(){yield e.checkPending()})),this.relayer.on(os_connect,(0,ke.Z)(function*(){yield e.onConnect()})),this.relayer.on(os_disconnect,()=>{this.onDisconnect()}),this.events.on(ku_created,function(){var n=(0,ke.Z)(function*(r){const u=ku_created;e.logger.info(`Emitting ${u}`),e.logger.debug({type:"event",event:u,data:r}),yield e.persist()});return function(r){return n.apply(this,arguments)}}()),this.events.on(ku_deleted,function(){var n=(0,ke.Z)(function*(r){const u=ku_deleted;e.logger.info(`Emitting ${u}`),e.logger.debug({type:"event",event:u,data:r}),yield e.persist()});return function(r){return n.apply(this,arguments)}}())}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}restartToComplete(){var e=this;return(0,ke.Z)(function*(){e.restartInProgress&&(yield new Promise(n=>{const r=setInterval(()=>{e.restartInProgress||(clearInterval(r),n())},e.pollingInterval)}))})()}}var uee=Object.defineProperty,mT=Object.getOwnPropertySymbols,cee=Object.prototype.hasOwnProperty,lee=Object.prototype.propertyIsEnumerable,vT=(t,e,n)=>e in t?uee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class dee extends DH{constructor(e){var n;super(e),n=this,this.protocol="wc",this.version=2,this.events=new Mu.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=function(){var r=(0,ke.Z)(function*(u){n.logger.debug("Publishing Request Payload");try{return yield n.toEstablishConnection(),yield n.provider.request(u)}catch(v){throw n.logger.debug("Failed to Publish Request"),n.logger.error(v),v}});return function(u){return r.apply(this,arguments)}}(),this.onPayloadHandler=r=>{this.onProviderPayload(r)},this.onConnectHandler=()=>{this.events.emit(os_connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=r=>{this.logger.error(r),this.events.emit(os_error,r),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(bl_payload,this.onPayloadHandler),this.provider.on(bl_connect,this.onConnectHandler),this.provider.on(bl_disconnect,this.onDisconnectHandler),this.provider.on(bl_error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?(0,Kr.generateChildLogger)(e.logger,this.name):(0,Kr.pino)((0,Kr.getDefaultLoggerOptions)({level:e.logger||"error"})),this.messages=new $$(this.logger,e.core),this.subscriber=new aee(this,this.logger),this.publisher=new eee(this,this.logger),this.relayUrl=e?.relayUrl||hT,this.projectId=e.projectId,this.bundleId=function BY(){var t;try{return Tp()&&typeof global<"u"&&typeof(null==global?void 0:global.Application)<"u"?null==(t=global.Application)?void 0:t.applicationId:void 0}catch{return}}(),this.provider={}}init(){var e=this;return(0,ke.Z)(function*(){e.logger.trace("Initialized"),e.registerEventListeners(),yield e.createProvider(),yield Promise.all([e.messages.init(),e.subscriber.init()]);try{yield e.transportOpen()}catch{e.logger.warn(`Connection via ${e.relayUrl} failed, attempting to connect via failover domain ${pT}...`),yield e.restartTransport(pT)}e.initialized=!0,setTimeout((0,ke.Z)(function*(){0===e.subscriber.topics.length&&(e.logger.info("No topics subscribed to after init, closing transport"),yield e.transportClose(),e.transportExplicitlyClosed=!1)}),1e4)})()}get context(){return(0,Kr.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}publish(e,n,r){var u=this;return(0,ke.Z)(function*(){u.isInitialized(),yield u.publisher.publish(e,n,r),yield u.recordMessageEvent({topic:e,message:n,publishedAt:Date.now()})})()}subscribe(e,n){var r=this;return(0,ke.Z)(function*(){var u;r.isInitialized();let O,v=(null==(u=r.subscriber.topicMap.get(e))?void 0:u[0])||"";if(v)return v;const Y=$=>{$.topic===e&&(r.subscriber.off(ku_created,Y),O())};return yield Promise.all([new Promise($=>{O=$,r.subscriber.on(ku_created,Y)}),new Promise(function(){var $=(0,ke.Z)(function*(ie){v=yield r.subscriber.subscribe(e,n),ie()});return function(ie){return $.apply(this,arguments)}}())]),v})()}unsubscribe(e,n){var r=this;return(0,ke.Z)(function*(){r.isInitialized(),yield r.subscriber.unsubscribe(e,n)})()}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}transportClose(){var e=this;return(0,ke.Z)(function*(){e.transportExplicitlyClosed=!0,e.hasExperiencedNetworkDisruption&&e.connected?yield Pm(e.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>e.onProviderDisconnect()):e.connected&&(yield e.provider.disconnect())})()}transportOpen(e){var n=this;return(0,ke.Z)(function*(){if(n.transportExplicitlyClosed=!1,yield n.confirmOnlineStateOrThrow(),!n.connectionAttemptInProgress){e&&e!==n.relayUrl&&(n.relayUrl=e,yield n.transportClose(),yield n.createProvider()),n.connectionAttemptInProgress=!0;try{yield Promise.all([new Promise(r=>{if(!n.initialized)return r();n.subscriber.once(ku_resubscribed,()=>{r()})}),new Promise(function(){var r=(0,ke.Z)(function*(u,v){try{yield Pm(n.provider.connect(),1e4,`Socket stalled when trying to connect to ${n.relayUrl}`)}catch(O){return void v(O)}u()});return function(u,v){return r.apply(this,arguments)}}())])}catch(r){n.logger.error(r);const u=r;if(!n.isConnectionStalled(u.message))throw r;n.provider.events.emit(bl_disconnect)}finally{n.connectionAttemptInProgress=!1,n.hasExperiencedNetworkDisruption=!1}}})()}restartTransport(e){var n=this;return(0,ke.Z)(function*(){yield n.confirmOnlineStateOrThrow(),!n.connectionAttemptInProgress&&(n.relayUrl=e||n.relayUrl,yield n.transportClose(),yield n.createProvider(),yield n.transportOpen())})()}confirmOnlineStateOrThrow(){return(0,ke.Z)(function*(){if(!(yield mx()))throw new Error("No internet connection detected. Please restart your network and try again.")})()}isConnectionStalled(e){return this.staleConnectionErrors.some(n=>e.includes(n))}createProvider(){var e=this;return(0,ke.Z)(function*(){e.provider.connection&&e.unregisterProviderListeners();const n=yield e.core.crypto.signJWT(e.relayUrl);e.provider=new VX(new ZX(HY({sdkVersion:"2.11.0",protocol:e.protocol,version:e.version,relayUrl:e.relayUrl,projectId:e.projectId,auth:n,useOnCloseEvent:!0,bundleId:e.bundleId}))),e.registerProviderListeners()})()}recordMessageEvent(e){var n=this;return(0,ke.Z)(function*(){const{topic:r,message:u}=e;yield n.messages.set(r,u)})()}shouldIgnoreMessageEvent(e){var n=this;return(0,ke.Z)(function*(){const{topic:r,message:u}=e;if(!u||0===u.length)return n.logger.debug(`Ignoring invalid/empty message: ${u}`),!0;if(!(yield n.subscriber.isSubscribed(r)))return n.logger.debug(`Ignoring message for non-subscribed topic ${r}`),!0;const v=n.messages.has(r,u);return v&&n.logger.debug(`Ignoring duplicate message: ${u}`),v})()}onProviderPayload(e){var n=this;return(0,ke.Z)(function*(){if(n.logger.debug("Incoming Relay Payload"),n.logger.trace({type:"payload",direction:"incoming",payload:e}),X3(e)){if(!e.method.endsWith("_subscription"))return;const r=e.params,{topic:u,message:v,publishedAt:O}=r.data,Y={topic:u,message:v,publishedAt:O};n.logger.debug("Emitting Relayer Payload"),n.logger.trace(((t,e)=>{for(var n in e||(e={}))cee.call(e,n)&&vT(t,n,e[n]);if(mT)for(var n of mT(e))lee.call(e,n)&&vT(t,n,e[n]);return t})({type:"event",event:r.id},Y)),n.events.emit(r.id,Y),yield n.acknowledgePayload(e),yield n.onMessageEvent(Y)}else nw(e)&&n.events.emit(os_message_ack,e)})()}onMessageEvent(e){var n=this;return(0,ke.Z)(function*(){(yield n.shouldIgnoreMessageEvent(e))||(n.events.emit(os_message,e),yield n.recordMessageEvent(e))})()}acknowledgePayload(e){var n=this;return(0,ke.Z)(function*(){const r=J3(e.id,!0);yield n.provider.connection.send(r)})()}unregisterProviderListeners(){this.provider.off(bl_payload,this.onPayloadHandler),this.provider.off(bl_connect,this.onConnectHandler),this.provider.off(bl_disconnect,this.onDisconnectHandler),this.provider.off(bl_error,this.onProviderErrorHandler)}registerEventListeners(){var e=this;return(0,ke.Z)(function*(){e.events.on(os_connection_stalled,()=>{e.restartTransport().catch(r=>e.logger.error(r))});let n=yield mx();ZJ(function(){var r=(0,ke.Z)(function*(u){e.initialized&&n!==u&&(n=u,u?yield e.restartTransport().catch(v=>e.logger.error(v)):(e.hasExperiencedNetworkDisruption=!0,yield e.transportClose().catch(v=>e.logger.error(v))))});return function(u){return r.apply(this,arguments)}}())})()}onProviderDisconnect(){this.events.emit(os_disconnect),this.attemptToReconnect()}attemptToReconnect(){var e=this;this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((0,ke.Z)(function*(){yield e.restartTransport().catch(n=>e.logger.error(n))}),(0,Vn.toMiliseconds)(R$)))}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}toEstablishConnection(){var e=this;return(0,ke.Z)(function*(){if(yield e.confirmOnlineStateOrThrow(),!e.connected){if(e.connectionAttemptInProgress)return yield new Promise(n=>{const r=setInterval(()=>{e.connected&&(clearInterval(r),n())},e.connectionStatusPollingInterval)});yield e.restartTransport()}})()}}var hee=Object.defineProperty,bT=Object.getOwnPropertySymbols,pee=Object.prototype.hasOwnProperty,gee=Object.prototype.propertyIsEnumerable,wT=(t,e,n)=>e in t?hee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AT=(t,e)=>{for(var n in e||(e={}))pee.call(e,n)&&wT(t,n,e[n]);if(bT)for(var n of bT(e))gee.call(e,n)&&wT(t,n,e[n]);return t};class iw extends IH{constructor(e,n,r,u=Nf,v){var O;super(e,n,r,u),O=this,this.core=e,this.logger=n,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Nf,this.init=(0,ke.Z)(function*(){O.initialized||(O.logger.trace("Initialized"),yield O.restore(),O.cached.forEach(Y=>{O.getKey&&null!==Y&&!Ts(Y)?O.map.set(O.getKey(Y),Y):function _J(t){var e;return null==(e=t?.proposer)?void 0:e.publicKey}(Y)?O.map.set(Y.id,Y):function MJ(t){return t?.topic}(Y)&&O.map.set(Y.topic,Y)}),O.cached=[],O.initialized=!0)}),this.set=function(){var Y=(0,ke.Z)(function*($,ie){O.isInitialized(),O.map.has($)?yield O.update($,ie):(O.logger.debug("Setting value"),O.logger.trace({type:"method",method:"set",key:$,value:ie}),O.map.set($,ie),yield O.persist())});return function($,ie){return Y.apply(this,arguments)}}(),this.get=Y=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:Y}),this.getData(Y)),this.getAll=Y=>(this.isInitialized(),Y?this.values.filter($=>Object.keys(Y).every(ie=>JX()($[ie],Y[ie]))):this.values),this.update=function(){var Y=(0,ke.Z)(function*($,ie){O.isInitialized(),O.logger.debug("Updating value"),O.logger.trace({type:"method",method:"update",key:$,update:ie});const ue=AT(AT({},O.getData($)),ie);O.map.set($,ue),yield O.persist()});return function($,ie){return Y.apply(this,arguments)}}(),this.delete=function(){var Y=(0,ke.Z)(function*($,ie){O.isInitialized(),O.map.has($)&&(O.logger.debug("Deleting value"),O.logger.trace({type:"method",method:"delete",key:$,reason:ie}),O.map.delete($),yield O.persist())});return function($,ie){return Y.apply(this,arguments)}}(),this.logger=(0,Kr.generateChildLogger)(n,this.name),this.storagePrefix=u,this.getKey=v}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}setDataStore(e){var n=this;return(0,ke.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getDataStore(){var e=this;return(0,ke.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getData(e){const n=this.map.get(e);if(!n){const{message:r}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(r),new Error(r)}return n}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setDataStore(e.values)})()}restore(){var e=this;return(0,ke.Z)(function*(){try{const n=yield e.getDataStore();if(typeof n>"u"||!n.length)return;if(e.map.size){const{message:r}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(r),new Error(r)}e.cached=n,e.logger.debug(`Successfully Restored value for ${e.name}`),e.logger.trace({type:"method",method:"restore",value:e.values})}catch(n){e.logger.debug(`Failed to Restore value for ${e.name}`),e.logger.error(n)}})()}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class yee{constructor(e,n){var r=this;this.core=e,this.logger=n,this.name="pairing",this.version="0.3",this.events=new(Q2()),this.initialized=!1,this.storagePrefix=Nf,this.ignoredPayloadTypes=[ch],this.registeredMethods=[],this.init=(0,ke.Z)(function*(){r.initialized||(yield r.pairings.init(),yield r.cleanup(),r.registerRelayerEvents(),r.registerExpirerEvents(),r.initialized=!0,r.logger.trace("Initialized"))}),this.register=({methods:u})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...u])]},this.create=(0,ke.Z)(function*(){r.isInitialized();const u=R3(),v=yield r.core.crypto.setSymKey(u),O=Nu(Vn.FIVE_MINUTES),Y={protocol:"irn"},$={topic:v,expiry:O,relay:Y,active:!1},ie=sJ({protocol:r.core.protocol,version:r.core.version,topic:v,symKey:u,relay:Y});return yield r.pairings.set(v,$),yield r.core.relayer.subscribe(v),r.core.expirer.set(v,O),{topic:v,uri:ie}}),this.pair=function(){var u=(0,ke.Z)(function*(v){r.isInitialized(),r.isValidPair(v);const{topic:O,symKey:Y,relay:$}=ax(v.uri);let ie;if(r.pairings.keys.includes(O)&&(ie=r.pairings.get(O),ie.active))throw new Error(`Pairing already exists: ${O}. Please try again with a new connection URI.`);const ue=Nu(Vn.FIVE_MINUTES),he={topic:O,relay:$,expiry:ue,active:!1};return yield r.pairings.set(O,he),r.core.expirer.set(O,ue),v.activatePairing&&(yield r.activate({topic:O})),r.events.emit(jm_create,he),r.core.crypto.keychain.has(O)||(yield r.core.crypto.setSymKey(Y,O),yield r.core.relayer.subscribe(O,{relay:$})),he});return function(v){return u.apply(this,arguments)}}(),this.activate=function(){var u=(0,ke.Z)(function*({topic:v}){r.isInitialized();const O=Nu(Vn.THIRTY_DAYS);yield r.pairings.update(v,{active:!0,expiry:O}),r.core.expirer.set(v,O)});return function(v){return u.apply(this,arguments)}}(),this.ping=function(){var u=(0,ke.Z)(function*(v){r.isInitialized(),yield r.isValidPing(v);const{topic:O}=v;if(r.pairings.keys.includes(O)){const Y=yield r.sendRequest(O,"wc_pairingPing",{}),{done:$,resolve:ie,reject:ue}=Np();r.events.once(oo("pairing_ping",Y),({error:he})=>{he?ue(he):ie()}),yield $()}});return function(v){return u.apply(this,arguments)}}(),this.updateExpiry=function(){var u=(0,ke.Z)(function*({topic:v,expiry:O}){r.isInitialized(),yield r.pairings.update(v,{expiry:O})});return function(v){return u.apply(this,arguments)}}(),this.updateMetadata=function(){var u=(0,ke.Z)(function*({topic:v,metadata:O}){r.isInitialized(),yield r.pairings.update(v,{peerMetadata:O})});return function(v){return u.apply(this,arguments)}}(),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=function(){var u=(0,ke.Z)(function*(v){r.isInitialized(),yield r.isValidDisconnect(v);const{topic:O}=v;r.pairings.keys.includes(O)&&(yield r.sendRequest(O,"wc_pairingDelete",po("USER_DISCONNECTED")),yield r.deletePairing(O))});return function(v){return u.apply(this,arguments)}}(),this.sendRequest=function(){var u=(0,ke.Z)(function*(v,O,Y){const $=Lp(O,Y),ie=yield r.core.crypto.encode(v,$),ue=Bm[O].req;return r.core.history.set(v,$),r.core.relayer.publish(v,ie,ue),$.id});return function(v,O,Y){return u.apply(this,arguments)}}(),this.sendResult=function(){var u=(0,ke.Z)(function*(v,O,Y){const $=J3(v,Y),ie=yield r.core.crypto.encode(O,$),ue=yield r.core.history.get(O,v),he=Bm[ue.request.method].res;yield r.core.relayer.publish(O,ie,he),yield r.core.history.resolve($)});return function(v,O,Y){return u.apply(this,arguments)}}(),this.sendError=function(){var u=(0,ke.Z)(function*(v,O,Y){const $=Q3(v,Y),ie=yield r.core.crypto.encode(O,$),ue=yield r.core.history.get(O,v),he=Bm[ue.request.method]?Bm[ue.request.method].res:Bm.unregistered_method.res;yield r.core.relayer.publish(O,ie,he),yield r.core.history.resolve($)});return function(v,O,Y){return u.apply(this,arguments)}}(),this.deletePairing=function(){var u=(0,ke.Z)(function*(v,O){yield r.core.relayer.unsubscribe(v),yield Promise.all([r.pairings.delete(v,po("USER_DISCONNECTED")),r.core.crypto.deleteSymKey(v),O?Promise.resolve():r.core.expirer.del(v)])});return function(v,O){return u.apply(this,arguments)}}(),this.cleanup=(0,ke.Z)(function*(){const u=r.pairings.getAll().filter(v=>Pf(v.expiry));yield Promise.all(u.map(v=>r.deletePairing(v.topic)))}),this.onRelayEventRequest=u=>{const{topic:v,payload:O}=u;switch(O.method){case"wc_pairingPing":return this.onPairingPingRequest(v,O);case"wc_pairingDelete":return this.onPairingDeleteRequest(v,O);default:return this.onUnknownRpcMethodRequest(v,O)}},this.onRelayEventResponse=function(){var u=(0,ke.Z)(function*(v){const{topic:O,payload:Y}=v,$=(yield r.core.history.get(O,Y.id)).request.method;return"wc_pairingPing"===$?r.onPairingPingResponse(O,Y):r.onUnknownRpcMethodResponse($)});return function(v){return u.apply(this,arguments)}}(),this.onPairingPingRequest=function(){var u=(0,ke.Z)(function*(v,O){const{id:Y}=O;try{r.isValidPing({topic:v}),yield r.sendResult(Y,v,!0),r.events.emit(jm_ping,{id:Y,topic:v})}catch($){yield r.sendError(Y,v,$),r.logger.error($)}});return function(v,O){return u.apply(this,arguments)}}(),this.onPairingPingResponse=(u,v)=>{const{id:O}=v;setTimeout(()=>{vl(v)?this.events.emit(oo("pairing_ping",O),{}):Ru(v)&&this.events.emit(oo("pairing_ping",O),{error:v.error})},500)},this.onPairingDeleteRequest=function(){var u=(0,ke.Z)(function*(v,O){const{id:Y}=O;try{r.isValidDisconnect({topic:v}),yield r.deletePairing(v),r.events.emit(jm_delete,{id:Y,topic:v})}catch($){yield r.sendError(Y,v,$),r.logger.error($)}});return function(v,O){return u.apply(this,arguments)}}(),this.onUnknownRpcMethodRequest=function(){var u=(0,ke.Z)(function*(v,O){const{id:Y,method:$}=O;try{if(r.registeredMethods.includes($))return;const ie=po("WC_METHOD_UNSUPPORTED",$);yield r.sendError(Y,v,ie),r.logger.error(ie)}catch(ie){yield r.sendError(Y,v,ie),r.logger.error(ie)}});return function(v,O){return u.apply(this,arguments)}}(),this.onUnknownRpcMethodResponse=u=>{this.registeredMethods.includes(u)||this.logger.error(po("WC_METHOD_UNSUPPORTED",u))},this.isValidPair=u=>{var v;if(!Xs(u)){const{message:Y}=_n("MISSING_OR_INVALID",`pair() params: ${u}`);throw new Error(Y)}if(!function SJ(t){if(Do(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}(u.uri)){const{message:Y}=_n("MISSING_OR_INVALID",`pair() uri: ${u.uri}`);throw new Error(Y)}const O=ax(u.uri);if(null==(v=O?.relay)||!v.protocol){const{message:Y}=_n("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(Y)}if(null==O||!O.symKey){const{message:Y}=_n("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(Y)}},this.isValidPing=function(){var u=(0,ke.Z)(function*(v){if(!Xs(v)){const{message:Y}=_n("MISSING_OR_INVALID",`ping() params: ${v}`);throw new Error(Y)}const{topic:O}=v;yield r.isValidPairingTopic(O)});return function(v){return u.apply(this,arguments)}}(),this.isValidDisconnect=function(){var u=(0,ke.Z)(function*(v){if(!Xs(v)){const{message:Y}=_n("MISSING_OR_INVALID",`disconnect() params: ${v}`);throw new Error(Y)}const{topic:O}=v;yield r.isValidPairingTopic(O)});return function(v){return u.apply(this,arguments)}}(),this.isValidPairingTopic=function(){var u=(0,ke.Z)(function*(v){if(!Do(v,!1)){const{message:O}=_n("MISSING_OR_INVALID",`pairing topic should be a string: ${v}`);throw new Error(O)}if(!r.pairings.keys.includes(v)){const{message:O}=_n("NO_MATCHING_KEY",`pairing topic doesn't exist: ${v}`);throw new Error(O)}if(Pf(r.pairings.get(v).expiry)){yield r.deletePairing(v);const{message:O}=_n("EXPIRED",`pairing topic: ${v}`);throw new Error(O)}});return function(v){return u.apply(this,arguments)}}(),this.core=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.pairings=new iw(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,Kr.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){var e=this;this.core.relayer.on(os_message,function(){var n=(0,ke.Z)(function*(r){const{topic:u,message:v}=r;if(!e.pairings.keys.includes(u)||e.ignoredPayloadTypes.includes(e.core.crypto.getPayloadType(v)))return;const O=yield e.core.crypto.decode(u,v);try{X3(O)?(e.core.history.set(u,O),e.onRelayEventRequest({topic:u,payload:O})):nw(O)&&(yield e.core.history.resolve(O),yield e.onRelayEventResponse({topic:u,payload:O}),e.core.history.delete(u,O.id))}catch(Y){e.logger.error(Y)}});return function(r){return n.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.core.expirer.on(Xa_expired,function(){var n=(0,ke.Z)(function*(r){const{topic:u}=ix(r.target);u&&e.pairings.keys.includes(u)&&(yield e.deletePairing(u,!0),e.events.emit(jm_expire,{topic:u}))});return function(r){return n.apply(this,arguments)}}())}}class mee extends SH{constructor(e,n){var r;super(e,n),r=this,this.core=e,this.logger=n,this.records=new Map,this.events=new Mu.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Nf,this.init=(0,ke.Z)(function*(){r.initialized||(r.logger.trace("Initialized"),yield r.restore(),r.cached.forEach(u=>r.records.set(u.id,u)),r.cached=[],r.registerEventListeners(),r.initialized=!0)}),this.set=(u,v,O)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:u,request:v,chainId:O}),this.records.has(v.id))return;const Y={id:v.id,topic:u,request:{method:v.method,params:v.params||null},chainId:O,expiry:Nu(Vn.THIRTY_DAYS)};this.records.set(Y.id,Y),this.events.emit(yc_created,Y)},this.resolve=function(){var u=(0,ke.Z)(function*(v){if(r.isInitialized(),r.logger.debug("Updating JSON-RPC response history record"),r.logger.trace({type:"method",method:"update",response:v}),!r.records.has(v.id))return;const O=yield r.getRecord(v.id);typeof O.response>"u"&&(O.response=Ru(v)?{error:v.error}:{result:v.result},r.records.set(O.id,O),r.events.emit(yc_updated,O))});return function(v){return u.apply(this,arguments)}}(),this.get=function(){var u=(0,ke.Z)(function*(v,O){return r.isInitialized(),r.logger.debug("Getting record"),r.logger.trace({type:"method",method:"get",topic:v,id:O}),yield r.getRecord(O)});return function(v,O){return u.apply(this,arguments)}}(),this.delete=(u,v)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:v}),this.values.forEach(O=>{if(O.topic===u){if(typeof v<"u"&&O.id!==v)return;this.records.delete(O.id),this.events.emit(yc_deleted,O)}})},this.exists=function(){var u=(0,ke.Z)(function*(v,O){return r.isInitialized(),!!r.records.has(O)&&(yield r.getRecord(O)).topic===v});return function(v,O){return u.apply(this,arguments)}}(),this.on=(u,v)=>{this.events.on(u,v)},this.once=(u,v)=>{this.events.once(u,v)},this.off=(u,v)=>{this.events.off(u,v)},this.removeListener=(u,v)=>{this.events.removeListener(u,v)},this.logger=(0,Kr.generateChildLogger)(n,this.name)}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(n=>{if(typeof n.response<"u")return;const r={topic:n.topic,request:Lp(n.request.method,n.request.params,n.id),chainId:n.chainId};return e.push(r)}),e}setJsonRpcRecords(e){var n=this;return(0,ke.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getJsonRpcRecords(){var e=this;return(0,ke.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getRecord(e){this.isInitialized();const n=this.records.get(e);if(!n){const{message:r}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(r)}return n}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setJsonRpcRecords(e.values),e.events.emit(yc_sync)})()}restore(){var e=this;return(0,ke.Z)(function*(){try{const n=yield e.getJsonRpcRecords();if(typeof n>"u"||!n.length)return;if(e.records.size){const{message:r}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(r),new Error(r)}e.cached=n,e.logger.debug(`Successfully Restored records for ${e.name}`),e.logger.trace({type:"method",method:"restore",records:e.values})}catch(n){e.logger.debug(`Failed to Restore records for ${e.name}`),e.logger.error(n)}})()}registerEventListeners(){this.events.on(yc_created,e=>{const n=yc_created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(yc_updated,e=>{const n=yc_updated;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(yc_deleted,e=>{const n=yc_deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.core.heartbeat.on(Mm.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{(0,Vn.toMiliseconds)(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class vee extends xH{constructor(e,n){var r;super(e,n),r=this,this.core=e,this.logger=n,this.expirations=new Map,this.events=new Mu.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Nf,this.init=(0,ke.Z)(function*(){r.initialized||(r.logger.trace("Initialized"),yield r.restore(),r.cached.forEach(u=>r.expirations.set(u.target,u)),r.cached=[],r.registerEventListeners(),r.initialized=!0)}),this.has=u=>{try{const v=this.formatTarget(u);return typeof this.getExpiration(v)<"u"}catch{return!1}},this.set=(u,v)=>{this.isInitialized();const O=this.formatTarget(u),Y={target:O,expiry:v};this.expirations.set(O,Y),this.checkExpiry(O,Y),this.events.emit(Xa_created,{target:O,expiration:Y})},this.get=u=>{this.isInitialized();const v=this.formatTarget(u);return this.getExpiration(v)},this.del=u=>{if(this.isInitialized(),this.has(u)){const v=this.formatTarget(u),O=this.getExpiration(v);this.expirations.delete(v),this.events.emit(Xa_deleted,{target:v,expiration:O})}},this.on=(u,v)=>{this.events.on(u,v)},this.once=(u,v)=>{this.events.once(u,v)},this.off=(u,v)=>{this.events.off(u,v)},this.removeListener=(u,v)=>{this.events.removeListener(u,v)},this.logger=(0,Kr.generateChildLogger)(n,this.name)}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function YY(t){return rx("topic",t)}(e);if("number"==typeof e)return function JY(t){return rx("id",t)}(e);const{message:n}=_n("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(n)}setExpirations(e){var n=this;return(0,ke.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getExpirations(){var e=this;return(0,ke.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setExpirations(e.values),e.events.emit(Xa_sync)})()}restore(){var e=this;return(0,ke.Z)(function*(){try{const n=yield e.getExpirations();if(typeof n>"u"||!n.length)return;if(e.expirations.size){const{message:r}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(r),new Error(r)}e.cached=n,e.logger.debug(`Successfully Restored expirations for ${e.name}`),e.logger.trace({type:"method",method:"restore",expirations:e.values})}catch(n){e.logger.debug(`Failed to Restore expirations for ${e.name}`),e.logger.error(n)}})()}getExpiration(e){const n=this.expirations.get(e);if(!n){const{message:r}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(r),new Error(r)}return n}checkExpiry(e,n){const{expiry:r}=n;(0,Vn.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,n)}expire(e,n){this.expirations.delete(e),this.events.emit(Xa_expired,{target:e,expiration:n})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,n)=>this.checkExpiry(n,e))}registerEventListeners(){this.core.heartbeat.on(Mm.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Xa_created,e=>{const n=Xa_created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(Xa_expired,e=>{const n=Xa_expired;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(Xa_deleted,e=>{const n=Xa_deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class bee extends TH{constructor(e,n){var r;super(e,n),r=this,this.projectId=e,this.logger=n,this.name=nS,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=function(){var u=(0,ke.Z)(function*(v){if(r.verifyDisabled||Tp()||!Op())return;const O=r.getVerifyUrl(v?.verifyUrl);r.verifyUrl!==O&&r.removeIframe(),r.verifyUrl=O;try{yield r.createIframe()}catch(Y){r.logger.info(`Verify iframe failed to load: ${r.verifyUrl}`),r.logger.info(Y)}if(!r.initialized){r.removeIframe(),r.verifyUrl=rS;try{yield r.createIframe()}catch(Y){r.logger.info(`Verify iframe failed to load: ${r.verifyUrl}`),r.logger.info(Y),r.verifyDisabled=!0}}});return function(v){return u.apply(this,arguments)}}(),this.register=function(){var u=(0,ke.Z)(function*(v){r.initialized?r.sendPost(v.attestationId):(r.addToQueue(v.attestationId),yield r.init())});return function(v){return u.apply(this,arguments)}}(),this.resolve=function(){var u=(0,ke.Z)(function*(v){if(r.isDevEnv)return"";const O=r.getVerifyUrl(v?.verifyUrl);let Y;try{Y=yield r.fetchAttestation(v.attestationId,O)}catch($){r.logger.info(`failed to resolve attestation: ${v.attestationId} from url: ${O}`),r.logger.info($),Y=yield r.fetchAttestation(v.attestationId,rS)}return Y});return function(v){return u.apply(this,arguments)}}(),this.fetchAttestation=function(){var u=(0,ke.Z)(function*(v,O){r.logger.info(`resolving attestation: ${v} from url: ${O}`);const Y=r.startAbortTimer(2*Vn.ONE_SECOND),$=yield fetch(`${O}/attestation/${v}`,{signal:r.abortController.signal});return clearTimeout(Y),200===$.status?yield $.json():void 0});return function(v,O){return u.apply(this,arguments)}}(),this.addToQueue=u=>{this.queue.push(u)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach(u=>this.sendPost(u)),this.queue=[])},this.sendPost=u=>{var v;try{if(!this.iframe)return;null==(v=this.iframe.contentWindow)||v.postMessage(u,"*"),this.logger.info(`postMessage sent: ${u} ${this.verifyUrl}`)}catch{}},this.createIframe=(0,ke.Z)(function*(){let u;const v=O=>{"verify_ready"===O.data&&(r.initialized=!0,r.processQueue(),window.removeEventListener("message",v),u())};yield Promise.race([new Promise(O=>{if(document.getElementById(nS))return O();window.addEventListener("message",v);const Y=document.createElement("iframe");Y.id=nS,Y.src=`${r.verifyUrl}/${r.projectId}`,Y.style.display="none",document.body.append(Y),r.iframe=Y,u=O}),new Promise((O,Y)=>setTimeout(()=>{window.removeEventListener("message",v),Y("verify iframe load timeout")},(0,Vn.toMiliseconds)(Vn.FIVE_SECONDS)))])}),this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=u=>{let v=u||Fp;return Y$.includes(v)||(this.logger.info(`verify url: ${v}, not included in trusted list, assigning default: ${Fp}`),v=Fp),v},this.logger=(0,Kr.generateChildLogger)(n,this.name),this.verifyUrl=Fp,this.abortController=new AbortController,this.isDevEnv=L3()&&process.env.IS_VITEST}get context(){return(0,Kr.getLoggerContext)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,Vn.toMiliseconds)(e))}}class wee extends OH{constructor(e,n){var r;super(e,n),r=this,this.projectId=e,this.logger=n,this.context="echo",this.registerDeviceToken=function(){var u=(0,ke.Z)(function*(v){const{clientId:O,token:Y,notificationType:$,enableEncrypted:ie=!1}=v,ue=`https://echo.walletconnect.com/${r.projectId}/clients`;yield XX()(ue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:O,type:$,token:Y,always_raw:ie})})});return function(v){return u.apply(this,arguments)}}(),this.logger=(0,Kr.generateChildLogger)(n,this.context)}}var Aee=Object.defineProperty,ET=Object.getOwnPropertySymbols,Eee=Object.prototype.hasOwnProperty,See=Object.prototype.propertyIsEnumerable,ST=(t,e,n)=>e in t?Aee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_T=(t,e)=>{for(var n in e||(e={}))Eee.call(e,n)&&ST(t,n,e[n]);if(ET)for(var n of ET(e))See.call(e,n)&&ST(t,n,e[n]);return t};class oS extends EH{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=tS,this.events=new Mu.EventEmitter,this.initialized=!1,this.on=(r,u)=>this.events.on(r,u),this.once=(r,u)=>this.events.once(r,u),this.off=(r,u)=>this.events.off(r,u),this.removeListener=(r,u)=>this.events.removeListener(r,u),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||hT,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const n=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,Kr.pino)((0,Kr.getDefaultLoggerOptions)({level:e?.logger||A$_logger}));this.logger=(0,Kr.generateChildLogger)(n,this.name),this.heartbeat=new Mm.HeartBeat,this.crypto=new q$(this,this.logger,e?.keychain),this.history=new mee(this,this.logger),this.expirer=new vee(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new AH(_T(_T({},E$),e?.storageOptions)),this.relayer=new dee({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new yee(this,this.logger),this.verify=new bee(this.projectId||"",this.logger),this.echoClient=new wee(this.projectId||"",this.logger)}static init(e){return(0,ke.Z)(function*(){const n=new oS(e);yield n.initialize();const r=yield n.crypto.getClientId();return yield n.storage.setItem("WALLETCONNECT_CLIENT_ID",r),n})()}get context(){return(0,Kr.getLoggerContext)(this.logger)}start(){var e=this;return(0,ke.Z)(function*(){e.initialized||(yield e.initialize())})()}initialize(){var e=this;return(0,ke.Z)(function*(){e.logger.trace("Initialized");try{yield e.crypto.init(),yield e.history.init(),yield e.expirer.init(),yield e.relayer.init(),yield e.heartbeat.init(),yield e.pairing.init(),e.initialized=!0,e.logger.info("Core Initialization Success")}catch(n){throw e.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,n),e.logger.error(n.message),n}})()}}const _ee=oS,sS="wc@2:client:",aS_name="client",aS_logger="error",CT="WALLETCONNECT_DEEPLINK_CHOICE",ow=Vn.SEVEN_DAYS,Km={wc_sessionPropose:{req:{ttl:Vn.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Vn.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Vn.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Vn.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Vn.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Vn.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Vn.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Vn.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Vn.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Vn.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Vn.THIRTY_SECONDS,prompt:!1,tag:1115}}},uS={min:Vn.FIVE_MINUTES,max:Vn.SEVEN_DAYS},wl_idle="IDLE",wl_active="ACTIVE",Tee=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Oee=Object.defineProperty,Pee=Object.defineProperties,Nee=Object.getOwnPropertyDescriptors,xT=Object.getOwnPropertySymbols,Ree=Object.prototype.hasOwnProperty,kee=Object.prototype.propertyIsEnumerable,TT=(t,e,n)=>e in t?Oee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qs=(t,e)=>{for(var n in e||(e={}))Ree.call(e,n)&&TT(t,n,e[n]);if(xT)for(var n of xT(e))kee.call(e,n)&&TT(t,n,e[n]);return t},zm=(t,e)=>Pee(t,Nee(e));class Lee extends NH{constructor(e){var n;super(e),n=this,this.name="engine",this.events=new(Q2()),this.initialized=!1,this.ignoredPayloadTypes=[ch],this.requestQueue={state:wl_idle,queue:[]},this.sessionRequestQueue={state:wl_idle,queue:[]},this.requestQueueDelay=Vn.ONE_SECOND,this.init=(0,ke.Z)(function*(){n.initialized||(yield n.cleanup(),n.registerRelayerEvents(),n.registerExpirerEvents(),n.registerPairingEvents(),n.client.core.pairing.register({methods:Object.keys(Km)}),n.initialized=!0,setTimeout(()=>{n.sessionRequestQueue.queue=n.getPendingSessionRequests(),n.processSessionRequestQueue()},(0,Vn.toMiliseconds)(n.requestQueueDelay)))}),this.connect=function(){var r=(0,ke.Z)(function*(u){yield n.isInitialized();const v=zm(qs({},u),{requiredNamespaces:u.requiredNamespaces||{},optionalNamespaces:u.optionalNamespaces||{}});yield n.isValidConnect(v);const{pairingTopic:O,requiredNamespaces:Y,optionalNamespaces:$,sessionProperties:ie,relays:ue}=v;let we,he=O,xe=!1;if(he&&(xe=n.client.core.pairing.pairings.get(he).active),!he||!xe){const{topic:xt,uri:Wt}=yield n.client.core.pairing.create();he=xt,we=Wt}const Ce=yield n.client.core.crypto.generateKeyPair(),Le=qs({requiredNamespaces:Y,optionalNamespaces:$,relays:ue??[{protocol:"irn"}],proposer:{publicKey:Ce,metadata:n.client.metadata}},ie&&{sessionProperties:ie}),{reject:je,resolve:Ue,done:$e}=Np(Vn.FIVE_MINUTES,"Proposal expired");if(n.events.once(oo("session_connect"),function(){var xt=(0,ke.Z)(function*({error:Wt,session:An}){if(Wt)je(Wt);else if(An){An.self.publicKey=Ce;const rn=zm(qs({},An),{requiredNamespaces:An.requiredNamespaces,optionalNamespaces:An.optionalNamespaces});yield n.client.session.set(An.topic,rn),yield n.setExpiry(An.topic,An.expiry),he&&(yield n.client.core.pairing.updateMetadata({topic:he,metadata:An.peer.metadata})),Ue(rn)}});return function(Wt){return xt.apply(this,arguments)}}()),!he){const{message:xt}=_n("NO_MATCHING_KEY",`connect() pairing topic: ${he}`);throw new Error(xt)}const Je=yield n.sendRequest({topic:he,method:"wc_sessionPropose",params:Le}),ht=Nu(Vn.FIVE_MINUTES);return yield n.setProposal(Je,qs({id:Je,expiry:ht},Le)),{uri:we,approval:$e}});return function(u){return r.apply(this,arguments)}}(),this.pair=function(){var r=(0,ke.Z)(function*(u){return yield n.isInitialized(),yield n.client.core.pairing.pair(u)});return function(u){return r.apply(this,arguments)}}(),this.approve=function(){var r=(0,ke.Z)(function*(u){yield n.isInitialized(),yield n.isValidApprove(u);const{id:v,relayProtocol:O,namespaces:Y,sessionProperties:$}=u,ie=n.client.proposal.get(v);let{pairingTopic:ue,proposer:he,requiredNamespaces:we,optionalNamespaces:xe}=ie;ue=ue||"",kp(we)||(we=function mJ(t,e){const n=Qb(t,e);if(n)throw new Error(n.message);const r={};for(const[u,v]of Object.entries(t))r[u]={methods:v.methods,events:v.events,chains:v.accounts.map(O=>`${O.split(":")[0]}:${O.split(":")[1]}`)};return r}(Y,"approve()"));const Ce=yield n.client.core.crypto.generateKeyPair(),Le=he.publicKey,je=yield n.client.core.crypto.generateSharedKey(Ce,Le);ue&&v&&(yield n.client.core.pairing.updateMetadata({topic:ue,metadata:he.metadata}),yield n.sendResult({id:v,topic:ue,result:{relay:{protocol:O??"irn"},responderPublicKey:Ce}}),yield n.client.proposal.delete(v,po("USER_DISCONNECTED")),yield n.client.core.pairing.activate({topic:ue}));const Ue=qs({relay:{protocol:O??"irn"},namespaces:Y,requiredNamespaces:we,optionalNamespaces:xe,pairingTopic:ue,controller:{publicKey:Ce,metadata:n.client.metadata},expiry:Nu(ow)},$&&{sessionProperties:$});yield n.client.core.relayer.subscribe(je),yield n.sendRequest({topic:je,method:"wc_sessionSettle",params:Ue,throwOnFailedPublish:!0});const $e=zm(qs({},Ue),{topic:je,pairingTopic:ue,acknowledged:!1,self:Ue.controller,peer:{publicKey:he.publicKey,metadata:he.metadata},controller:Ce});return yield n.client.session.set(je,$e),yield n.setExpiry(je,Nu(ow)),{topic:je,acknowledged:()=>new Promise(Je=>setTimeout(()=>Je(n.client.session.get(je)),500))}});return function(u){return r.apply(this,arguments)}}(),this.reject=function(){var r=(0,ke.Z)(function*(u){yield n.isInitialized(),yield n.isValidReject(u);const{id:v,reason:O}=u,{pairingTopic:Y}=n.client.proposal.get(v);Y&&(yield n.sendError(v,Y,O),yield n.client.proposal.delete(v,po("USER_DISCONNECTED")))});return function(u){return r.apply(this,arguments)}}(),this.update=function(){var r=(0,ke.Z)(function*(u){yield n.isInitialized(),yield n.isValidUpdate(u);const{topic:v,namespaces:O}=u,Y=yield n.sendRequest({topic:v,method:"wc_sessionUpdate",params:{namespaces:O}}),{done:$,resolve:ie,reject:ue}=Np();return n.events.once(oo("session_update",Y),({error:he})=>{he?ue(he):ie()}),yield n.client.session.update(v,{namespaces:O}),{acknowledged:$}});return function(u){return r.apply(this,arguments)}}(),this.extend=function(){var r=(0,ke.Z)(function*(u){yield n.isInitialized(),yield n.isValidExtend(u);const{topic:v}=u,O=yield n.sendRequest({topic:v,method:"wc_sessionExtend",params:{}}),{done:Y,resolve:$,reject:ie}=Np();return n.events.once(oo("session_extend",O),({error:ue})=>{ue?ie(ue):$()}),yield n.setExpiry(v,Nu(ow)),{acknowledged:Y}});return function(u){return r.apply(this,arguments)}}(),this.request=function(){var r=(0,ke.Z)(function*(u){yield n.isInitialized(),yield n.isValidRequest(u);const{chainId:v,request:O,topic:Y,expiry:$}=u,ie=Y3(),{done:ue,resolve:he,reject:we}=Np($,"Request expired. Please try again.");return n.events.once(oo("session_request",ie),({error:xe,result:Ce})=>{xe?we(xe):he(Ce)}),yield Promise.all([new Promise(function(){var xe=(0,ke.Z)(function*(Ce){yield n.sendRequest({clientRpcId:ie,topic:Y,method:"wc_sessionRequest",params:{request:O,chainId:v},expiry:$,throwOnFailedPublish:!0}).catch(Le=>we(Le)),n.client.events.emit("session_request_sent",{topic:Y,request:O,chainId:v,id:ie}),Ce()});return function(Ce){return xe.apply(this,arguments)}}()),new Promise(function(){var xe=(0,ke.Z)(function*(Ce){const Le=yield function XY(t,e){return B3.apply(this,arguments)}(n.client.core.storage,CT);(function QY(t){return F3.apply(this,arguments)})({id:ie,topic:Y,wcDeepLink:Le}),Ce()});return function(Ce){return xe.apply(this,arguments)}}()),ue()]).then(xe=>xe[2])});return function(u){return r.apply(this,arguments)}}(),this.respond=function(){var r=(0,ke.Z)(function*(u){yield n.isInitialized(),yield n.isValidRespond(u);const{topic:v,response:O}=u,{id:Y}=O;vl(O)?yield n.sendResult({id:Y,topic:v,result:O.result,throwOnFailedPublish:!0}):Ru(O)&&(yield n.sendError(Y,v,O.error)),n.cleanupAfterResponse(u)});return function(u){return r.apply(this,arguments)}}(),this.ping=function(){var r=(0,ke.Z)(function*(u){yield n.isInitialized(),yield n.isValidPing(u);const{topic:v}=u;if(n.client.session.keys.includes(v)){const O=yield n.sendRequest({topic:v,method:"wc_sessionPing",params:{}}),{done:Y,resolve:$,reject:ie}=Np();n.events.once(oo("session_ping",O),({error:ue})=>{ue?ie(ue):$()}),yield Y()}else n.client.core.pairing.pairings.keys.includes(v)&&(yield n.client.core.pairing.ping({topic:v}))});return function(u){return r.apply(this,arguments)}}(),this.emit=function(){var r=(0,ke.Z)(function*(u){yield n.isInitialized(),yield n.isValidEmit(u);const{topic:v,event:O,chainId:Y}=u;yield n.sendRequest({topic:v,method:"wc_sessionEvent",params:{event:O,chainId:Y}})});return function(u){return r.apply(this,arguments)}}(),this.disconnect=function(){var r=(0,ke.Z)(function*(u){yield n.isInitialized(),yield n.isValidDisconnect(u);const{topic:v}=u;n.client.session.keys.includes(v)?(yield n.sendRequest({topic:v,method:"wc_sessionDelete",params:po("USER_DISCONNECTED"),throwOnFailedPublish:!0}),yield n.deleteSession(v)):yield n.client.core.pairing.disconnect({topic:v})});return function(u){return r.apply(this,arguments)}}(),this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(u=>function AJ(t,e){const{requiredNamespaces:n}=e,r=Object.keys(t.namespaces),u=Object.keys(n);let v=!0;return!!lh(u,r)&&(r.forEach(O=>{const{accounts:Y,methods:$,events:ie}=t.namespaces[O],ue=Rp(Y),he=n[O];lh(C3(O,he),ue)&&lh(he.methods,$)&&lh(he.events,ie)||(v=!1)}),v)}(u,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=function(){var r=(0,ke.Z)(function*(u){if(u.pairingTopic)try{const v=n.client.core.pairing.pairings.get(u.pairingTopic),O=n.client.core.pairing.pairings.getAll().filter(Y=>{var $,ie;return(null==($=Y.peerMetadata)?void 0:$.url)&&(null==(ie=Y.peerMetadata)?void 0:ie.url)===u.peer.metadata.url&&Y.topic&&Y.topic!==v.topic});if(0===O.length)return;n.client.logger.info(`Cleaning up ${O.length} duplicate pairing(s)`),yield Promise.all(O.map(Y=>n.client.core.pairing.disconnect({topic:Y.topic}))),n.client.logger.info("Duplicate pairings clean up finished")}catch(v){n.client.logger.error(v)}});return function(u){return r.apply(this,arguments)}}(),this.deleteSession=function(){var r=(0,ke.Z)(function*(u,v){const{self:O}=n.client.session.get(u);yield n.client.core.relayer.unsubscribe(u),n.client.session.delete(u,po("USER_DISCONNECTED")),n.client.core.crypto.keychain.has(O.publicKey)&&(yield n.client.core.crypto.deleteKeyPair(O.publicKey)),n.client.core.crypto.keychain.has(u)&&(yield n.client.core.crypto.deleteSymKey(u)),v||n.client.core.expirer.del(u),n.client.core.storage.removeItem(CT).catch(Y=>n.client.logger.warn(Y)),n.getPendingSessionRequests().forEach(Y=>{Y.topic===u&&n.deletePendingSessionRequest(Y.id,po("USER_DISCONNECTED"))})});return function(u,v){return r.apply(this,arguments)}}(),this.deleteProposal=function(){var r=(0,ke.Z)(function*(u,v){yield Promise.all([n.client.proposal.delete(u,po("USER_DISCONNECTED")),v?Promise.resolve():n.client.core.expirer.del(u)])});return function(u,v){return r.apply(this,arguments)}}(),this.deletePendingSessionRequest=function(){var r=(0,ke.Z)(function*(u,v,O=!1){yield Promise.all([n.client.pendingRequest.delete(u,v),O?Promise.resolve():n.client.core.expirer.del(u)]),n.sessionRequestQueue.queue=n.sessionRequestQueue.queue.filter(Y=>Y.id!==u),O&&(n.sessionRequestQueue.state=wl_idle)});return function(u,v){return r.apply(this,arguments)}}(),this.setExpiry=function(){var r=(0,ke.Z)(function*(u,v){n.client.session.keys.includes(u)&&(yield n.client.session.update(u,{expiry:v})),n.client.core.expirer.set(u,v)});return function(u,v){return r.apply(this,arguments)}}(),this.setProposal=function(){var r=(0,ke.Z)(function*(u,v){yield n.client.proposal.set(u,v),n.client.core.expirer.set(u,v.expiry)});return function(u,v){return r.apply(this,arguments)}}(),this.setPendingSessionRequest=function(){var r=(0,ke.Z)(function*(u){const v=Km.wc_sessionRequest.req.ttl,{id:O,topic:Y,params:$,verifyContext:ie}=u;yield n.client.pendingRequest.set(O,{id:O,topic:Y,params:$,verifyContext:ie}),v&&n.client.core.expirer.set(O,Nu(v))});return function(u){return r.apply(this,arguments)}}(),this.sendRequest=function(){var r=(0,ke.Z)(function*(u){const{topic:v,method:O,params:Y,expiry:$,relayRpcId:ie,clientRpcId:ue,throwOnFailedPublish:he}=u,we=Lp(O,Y,ue);if(Op()&&Tee.includes(O)){const Le=xp(JSON.stringify(we));n.client.core.verify.register({attestationId:Le})}const xe=yield n.client.core.crypto.encode(v,we),Ce=Km[O].req;return $&&(Ce.ttl=$),ie&&(Ce.id=ie),n.client.core.history.set(v,we),he?(Ce.internal=zm(qs({},Ce.internal),{throwOnFailedPublish:!0}),yield n.client.core.relayer.publish(v,xe,Ce)):n.client.core.relayer.publish(v,xe,Ce).catch(Le=>n.client.logger.error(Le)),we.id});return function(u){return r.apply(this,arguments)}}(),this.sendResult=function(){var r=(0,ke.Z)(function*(u){const{id:v,topic:O,result:Y,throwOnFailedPublish:$}=u,ie=J3(v,Y),ue=yield n.client.core.crypto.encode(O,ie),he=yield n.client.core.history.get(O,v),we=Km[he.request.method].res;$?(we.internal=zm(qs({},we.internal),{throwOnFailedPublish:!0}),yield n.client.core.relayer.publish(O,ue,we)):n.client.core.relayer.publish(O,ue,we).catch(xe=>n.client.logger.error(xe)),yield n.client.core.history.resolve(ie)});return function(u){return r.apply(this,arguments)}}(),this.sendError=function(){var r=(0,ke.Z)(function*(u,v,O){const Y=Q3(u,O),$=yield n.client.core.crypto.encode(v,Y),ie=yield n.client.core.history.get(v,u),ue=Km[ie.request.method].res;n.client.core.relayer.publish(v,$,ue),yield n.client.core.history.resolve(Y)});return function(u,v,O){return r.apply(this,arguments)}}(),this.cleanup=(0,ke.Z)(function*(){const r=[],u=[];n.client.session.getAll().forEach(v=>{Pf(v.expiry)&&r.push(v.topic)}),n.client.proposal.getAll().forEach(v=>{Pf(v.expiry)&&u.push(v.id)}),yield Promise.all([...r.map(v=>n.deleteSession(v)),...u.map(v=>n.deleteProposal(v))])}),this.onRelayEventRequest=function(){var r=(0,ke.Z)(function*(u){n.requestQueue.queue.push(u),yield n.processRequestsQueue()});return function(u){return r.apply(this,arguments)}}(),this.processRequestsQueue=(0,ke.Z)(function*(){if(n.requestQueue.state!==wl_active){for(n.client.logger.info(`Request queue starting with ${n.requestQueue.queue.length} requests`);n.requestQueue.queue.length>0;){n.requestQueue.state=wl_active;const r=n.requestQueue.queue.shift();if(r)try{n.processRequest(r),yield new Promise(u=>setTimeout(u,300))}catch(u){n.client.logger.warn(u)}}n.requestQueue.state=wl_idle}else n.client.logger.info("Request queue already active, skipping...")}),this.processRequest=r=>{const{topic:u,payload:v}=r,O=v.method;switch(O){case"wc_sessionPropose":return this.onSessionProposeRequest(u,v);case"wc_sessionSettle":return this.onSessionSettleRequest(u,v);case"wc_sessionUpdate":return this.onSessionUpdateRequest(u,v);case"wc_sessionExtend":return this.onSessionExtendRequest(u,v);case"wc_sessionPing":return this.onSessionPingRequest(u,v);case"wc_sessionDelete":return this.onSessionDeleteRequest(u,v);case"wc_sessionRequest":return this.onSessionRequest(u,v);case"wc_sessionEvent":return this.onSessionEventRequest(u,v);default:return this.client.logger.info(`Unsupported request method ${O}`)}},this.onRelayEventResponse=function(){var r=(0,ke.Z)(function*(u){const{topic:v,payload:O}=u,Y=(yield n.client.core.history.get(v,O.id)).request.method;switch(Y){case"wc_sessionPropose":return n.onSessionProposeResponse(v,O);case"wc_sessionSettle":return n.onSessionSettleResponse(v,O);case"wc_sessionUpdate":return n.onSessionUpdateResponse(v,O);case"wc_sessionExtend":return n.onSessionExtendResponse(v,O);case"wc_sessionPing":return n.onSessionPingResponse(v,O);case"wc_sessionRequest":return n.onSessionRequestResponse(v,O);default:return n.client.logger.info(`Unsupported response method ${Y}`)}});return function(u){return r.apply(this,arguments)}}(),this.onRelayEventUnknownPayload=r=>{const{topic:u}=r,{message:v}=_n("MISSING_OR_INVALID",`Decoded payload on topic ${u} is not identifiable as a JSON-RPC request or a response.`);throw new Error(v)},this.onSessionProposeRequest=function(){var r=(0,ke.Z)(function*(u,v){const{params:O,id:Y}=v;try{n.isValidConnect(qs({},v.params));const $=Nu(Vn.FIVE_MINUTES),ie=qs({id:Y,pairingTopic:u,expiry:$},O);yield n.setProposal(Y,ie);const ue=xp(JSON.stringify(v)),he=yield n.getVerifyContext(ue,ie.proposer.metadata);n.client.events.emit("session_proposal",{id:Y,params:ie,verifyContext:he})}catch($){yield n.sendError(Y,u,$),n.client.logger.error($)}});return function(u,v){return r.apply(this,arguments)}}(),this.onSessionProposeResponse=function(){var r=(0,ke.Z)(function*(u,v){const{id:O}=v;if(vl(v)){const{result:Y}=v;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:Y});const $=n.client.proposal.get(O);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:$});const ie=$.proposer.publicKey;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:ie});const ue=Y.responderPublicKey;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:ue});const he=yield n.client.core.crypto.generateSharedKey(ie,ue);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:he});const we=yield n.client.core.relayer.subscribe(he);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:we}),yield n.client.core.pairing.activate({topic:u})}else Ru(v)&&(yield n.client.proposal.delete(O,po("USER_DISCONNECTED")),n.events.emit(oo("session_connect"),{error:v.error}))});return function(u,v){return r.apply(this,arguments)}}(),this.onSessionSettleRequest=function(){var r=(0,ke.Z)(function*(u,v){const{id:O,params:Y}=v;try{n.isValidSessionSettleRequest(Y);const{relay:$,controller:ie,expiry:ue,namespaces:he,requiredNamespaces:we,optionalNamespaces:xe,sessionProperties:Ce,pairingTopic:Le}=v.params,je=qs({topic:u,relay:$,expiry:ue,namespaces:he,acknowledged:!0,pairingTopic:Le,requiredNamespaces:we,optionalNamespaces:xe,controller:ie.publicKey,self:{publicKey:"",metadata:n.client.metadata},peer:{publicKey:ie.publicKey,metadata:ie.metadata}},Ce&&{sessionProperties:Ce});yield n.sendResult({id:v.id,topic:u,result:!0}),n.events.emit(oo("session_connect"),{session:je}),n.cleanupDuplicatePairings(je)}catch($){yield n.sendError(O,u,$),n.client.logger.error($)}});return function(u,v){return r.apply(this,arguments)}}(),this.onSessionSettleResponse=function(){var r=(0,ke.Z)(function*(u,v){const{id:O}=v;vl(v)?(yield n.client.session.update(u,{acknowledged:!0}),n.events.emit(oo("session_approve",O),{})):Ru(v)&&(yield n.client.session.delete(u,po("USER_DISCONNECTED")),n.events.emit(oo("session_approve",O),{error:v.error}))});return function(u,v){return r.apply(this,arguments)}}(),this.onSessionUpdateRequest=function(){var r=(0,ke.Z)(function*(u,v){const{params:O,id:Y}=v;try{const $=`${u}_session_update`,ie=Xb.get($);if(ie&&n.isRequestOutOfSync(ie,Y))return void n.client.logger.info(`Discarding out of sync request - ${Y}`);n.isValidUpdate(qs({topic:u},O)),yield n.client.session.update(u,{namespaces:O.namespaces}),yield n.sendResult({id:Y,topic:u,result:!0}),n.client.events.emit("session_update",{id:Y,topic:u,params:O}),Xb.set($,Y)}catch($){yield n.sendError(Y,u,$),n.client.logger.error($)}});return function(u,v){return r.apply(this,arguments)}}(),this.isRequestOutOfSync=(r,u)=>parseInt(u.toString().slice(0,-3))<=parseInt(r.toString().slice(0,-3)),this.onSessionUpdateResponse=(r,u)=>{const{id:v}=u;vl(u)?this.events.emit(oo("session_update",v),{}):Ru(u)&&this.events.emit(oo("session_update",v),{error:u.error})},this.onSessionExtendRequest=function(){var r=(0,ke.Z)(function*(u,v){const{id:O}=v;try{n.isValidExtend({topic:u}),yield n.setExpiry(u,Nu(ow)),yield n.sendResult({id:O,topic:u,result:!0}),n.client.events.emit("session_extend",{id:O,topic:u})}catch(Y){yield n.sendError(O,u,Y),n.client.logger.error(Y)}});return function(u,v){return r.apply(this,arguments)}}(),this.onSessionExtendResponse=(r,u)=>{const{id:v}=u;vl(u)?this.events.emit(oo("session_extend",v),{}):Ru(u)&&this.events.emit(oo("session_extend",v),{error:u.error})},this.onSessionPingRequest=function(){var r=(0,ke.Z)(function*(u,v){const{id:O}=v;try{n.isValidPing({topic:u}),yield n.sendResult({id:O,topic:u,result:!0}),n.client.events.emit("session_ping",{id:O,topic:u})}catch(Y){yield n.sendError(O,u,Y),n.client.logger.error(Y)}});return function(u,v){return r.apply(this,arguments)}}(),this.onSessionPingResponse=(r,u)=>{const{id:v}=u;setTimeout(()=>{vl(u)?this.events.emit(oo("session_ping",v),{}):Ru(u)&&this.events.emit(oo("session_ping",v),{error:u.error})},500)},this.onSessionDeleteRequest=function(){var r=(0,ke.Z)(function*(u,v){const{id:O}=v;try{n.isValidDisconnect({topic:u,reason:v.params}),yield Promise.all([new Promise(Y=>{n.client.core.relayer.once(os_publish,(0,ke.Z)(function*(){Y(yield n.deleteSession(u))}))}),n.sendResult({id:O,topic:u,result:!0})]),n.client.events.emit("session_delete",{id:O,topic:u})}catch(Y){n.client.logger.error(Y)}});return function(u,v){return r.apply(this,arguments)}}(),this.onSessionRequest=function(){var r=(0,ke.Z)(function*(u,v){const{id:O,params:Y}=v;try{n.isValidRequest(qs({topic:u},Y));const $=xp(JSON.stringify(Lp("wc_sessionRequest",Y,O))),ie=n.client.session.get(u),he={id:O,topic:u,params:Y,verifyContext:yield n.getVerifyContext($,ie.peer.metadata)};yield n.setPendingSessionRequest(he),n.addSessionRequestToSessionRequestQueue(he),n.processSessionRequestQueue()}catch($){yield n.sendError(O,u,$),n.client.logger.error($)}});return function(u,v){return r.apply(this,arguments)}}(),this.onSessionRequestResponse=(r,u)=>{const{id:v}=u;vl(u)?this.events.emit(oo("session_request",v),{result:u.result}):Ru(u)&&this.events.emit(oo("session_request",v),{error:u.error})},this.onSessionEventRequest=function(){var r=(0,ke.Z)(function*(u,v){const{id:O,params:Y}=v;try{const $=`${u}_session_event_${Y.event.name}`,ie=Xb.get($);if(ie&&n.isRequestOutOfSync(ie,O))return void n.client.logger.info(`Discarding out of sync request - ${O}`);n.isValidEmit(qs({topic:u},Y)),n.client.events.emit("session_event",{id:O,topic:u,params:Y}),Xb.set($,O)}catch($){yield n.sendError(O,u,$),n.client.logger.error($)}});return function(u,v){return r.apply(this,arguments)}}(),this.addSessionRequestToSessionRequestQueue=r=>{this.sessionRequestQueue.queue.push(r)},this.cleanupAfterResponse=r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=wl_idle,this.processSessionRequestQueue()},(0,Vn.toMiliseconds)(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===wl_active)return void this.client.logger.info("session request queue is already active.");const r=this.sessionRequestQueue.queue[0];if(r)try{this.sessionRequestQueue.state=wl_active,this.client.events.emit("session_request",r)}catch(u){this.client.logger.error(u)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=r=>{if(r.active)return;const u=this.client.proposal.getAll().find(v=>v.pairingTopic===r.topic);u&&this.onSessionProposeRequest(r.topic,Lp("wc_sessionPropose",{requiredNamespaces:u.requiredNamespaces,optionalNamespaces:u.optionalNamespaces,relays:u.relays,proposer:u.proposer,sessionProperties:u.sessionProperties},u.id))},this.isValidConnect=function(){var r=(0,ke.Z)(function*(u){if(!Xs(u)){const{message:ue}=_n("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(u)}`);throw new Error(ue)}const{pairingTopic:v,requiredNamespaces:O,optionalNamespaces:Y,sessionProperties:$,relays:ie}=u;if(Ts(v)||(yield n.isValidPairingTopic(v)),!function NJ(t,e){let n=!1;return e&&!t?n=!0:t&&Nm(t)&&t.length&&t.forEach(r=>{n=px(r)}),n}(ie,!0)){const{message:ue}=_n("MISSING_OR_INVALID",`connect() relays: ${ie}`);throw new Error(ue)}!Ts(O)&&0!==kp(O)&&n.validateNamespaces(O,"requiredNamespaces"),!Ts(Y)&&0!==kp(Y)&&n.validateNamespaces(Y,"optionalNamespaces"),Ts($)||n.validateSessionProps($,"sessionProperties")});return function(u){return r.apply(this,arguments)}}(),this.validateNamespaces=(r,u)=>{const v=function PJ(t,e,n){let r=null;if(t&&kp(t)){const u=hx(t,e);u&&(r=u);const v=CJ(t,e,n);v&&(r=v)}else r=_n("MISSING_OR_INVALID",`${e}, ${n} should be an object with data`);return r}(r,"connect()",u);if(v)throw new Error(v.message)},this.isValidApprove=function(){var r=(0,ke.Z)(function*(u){if(!Xs(u))throw new Error(_n("MISSING_OR_INVALID",`approve() params: ${u}`).message);const{id:v,namespaces:O,relayProtocol:Y,sessionProperties:$}=u;yield n.isValidProposalId(v);const ie=n.client.proposal.get(v),ue=Qb(O,"approve()");if(ue)throw new Error(ue.message);const he=K3(ie.requiredNamespaces,O,"approve()");if(he)throw new Error(he.message);if(!Do(Y,!0)){const{message:we}=_n("MISSING_OR_INVALID",`approve() relayProtocol: ${Y}`);throw new Error(we)}Ts($)||n.validateSessionProps($,"sessionProperties")});return function(u){return r.apply(this,arguments)}}(),this.isValidReject=function(){var r=(0,ke.Z)(function*(u){if(!Xs(u)){const{message:Y}=_n("MISSING_OR_INVALID",`reject() params: ${u}`);throw new Error(Y)}const{id:v,reason:O}=u;if(yield n.isValidProposalId(v),!function kJ(t){return!!(t&&"object"==typeof t&&t.code&&U3(t.code,!1)&&t.message&&Do(t.message,!1))}(O)){const{message:Y}=_n("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(O)}`);throw new Error(Y)}});return function(u){return r.apply(this,arguments)}}(),this.isValidSessionSettleRequest=r=>{if(!Xs(r)){const{message:ue}=_n("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(ue)}const{relay:u,controller:v,namespaces:O,expiry:Y}=r;if(!px(u)){const{message:ue}=_n("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(ue)}const $=function DJ(t,e){let n=null;return Do(t?.publicKey,!1)||(n=_n("MISSING_OR_INVALID",`${e} controller public key should be a string`)),n}(v,"onSessionSettleRequest()");if($)throw new Error($.message);const ie=Qb(O,"onSessionSettleRequest()");if(ie)throw new Error(ie.message);if(Pf(Y)){const{message:ue}=_n("EXPIRED","onSessionSettleRequest()");throw new Error(ue)}},this.isValidUpdate=function(){var r=(0,ke.Z)(function*(u){if(!Xs(u)){const{message:ue}=_n("MISSING_OR_INVALID",`update() params: ${u}`);throw new Error(ue)}const{topic:v,namespaces:O}=u;yield n.isValidSessionTopic(v);const Y=n.client.session.get(v),$=Qb(O,"update()");if($)throw new Error($.message);const ie=K3(Y.requiredNamespaces,O,"update()");if(ie)throw new Error(ie.message)});return function(u){return r.apply(this,arguments)}}(),this.isValidExtend=function(){var r=(0,ke.Z)(function*(u){if(!Xs(u)){const{message:O}=_n("MISSING_OR_INVALID",`extend() params: ${u}`);throw new Error(O)}const{topic:v}=u;yield n.isValidSessionTopic(v)});return function(u){return r.apply(this,arguments)}}(),this.isValidRequest=function(){var r=(0,ke.Z)(function*(u){if(!Xs(u)){const{message:ue}=_n("MISSING_OR_INVALID",`request() params: ${u}`);throw new Error(ue)}const{topic:v,request:O,chainId:Y,expiry:$}=u;yield n.isValidSessionTopic(v);const{namespaces:ie}=n.client.session.get(v);if(!gx(ie,Y)){const{message:ue}=_n("MISSING_OR_INVALID",`request() chainId: ${Y}`);throw new Error(ue)}if(!function LJ(t){return!(Ts(t)||!Do(t.method,!1))}(O)){const{message:ue}=_n("MISSING_OR_INVALID",`request() ${JSON.stringify(O)}`);throw new Error(ue)}if(!jJ(ie,Y,O.method)){const{message:ue}=_n("MISSING_OR_INVALID",`request() method: ${O.method}`);throw new Error(ue)}if($&&!function VJ(t,e){return U3(t,!1)&&t<=e.max&&t>=e.min}($,uS)){const{message:ue}=_n("MISSING_OR_INVALID",`request() expiry: ${$}. Expiry must be a number (in seconds) between ${uS.min} and ${uS.max}`);throw new Error(ue)}});return function(u){return r.apply(this,arguments)}}(),this.isValidRespond=function(){var r=(0,ke.Z)(function*(u){var v;if(!Xs(u)){const{message:$}=_n("MISSING_OR_INVALID",`respond() params: ${u}`);throw new Error($)}const{topic:O,response:Y}=u;try{yield n.isValidSessionTopic(O)}catch($){throw null!=(v=u?.response)&&v.id&&n.cleanupAfterResponse(u),$}if(!function FJ(t){return!(Ts(t)||Ts(t.result)&&Ts(t.error)||!U3(t.id,!1)||!Do(t.jsonrpc,!1))}(Y)){const{message:$}=_n("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(Y)}`);throw new Error($)}});return function(u){return r.apply(this,arguments)}}(),this.isValidPing=function(){var r=(0,ke.Z)(function*(u){if(!Xs(u)){const{message:O}=_n("MISSING_OR_INVALID",`ping() params: ${u}`);throw new Error(O)}const{topic:v}=u;yield n.isValidSessionOrPairingTopic(v)});return function(u){return r.apply(this,arguments)}}(),this.isValidEmit=function(){var r=(0,ke.Z)(function*(u){if(!Xs(u)){const{message:ie}=_n("MISSING_OR_INVALID",`emit() params: ${u}`);throw new Error(ie)}const{topic:v,event:O,chainId:Y}=u;yield n.isValidSessionTopic(v);const{namespaces:$}=n.client.session.get(v);if(!gx($,Y)){const{message:ie}=_n("MISSING_OR_INVALID",`emit() chainId: ${Y}`);throw new Error(ie)}if(!function BJ(t){return!(Ts(t)||!Do(t.name,!1))}(O)){const{message:ie}=_n("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(O)}`);throw new Error(ie)}if(!UJ($,Y,O.name)){const{message:ie}=_n("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(O)}`);throw new Error(ie)}});return function(u){return r.apply(this,arguments)}}(),this.isValidDisconnect=function(){var r=(0,ke.Z)(function*(u){if(!Xs(u)){const{message:O}=_n("MISSING_OR_INVALID",`disconnect() params: ${u}`);throw new Error(O)}const{topic:v}=u;yield n.isValidSessionOrPairingTopic(v)});return function(u){return r.apply(this,arguments)}}(),this.getVerifyContext=function(){var r=(0,ke.Z)(function*(u,v){const O={verified:{verifyUrl:v.verifyUrl||Fp,validation:"UNKNOWN",origin:v.url||""}};try{const Y=yield n.client.core.verify.resolve({attestationId:u,verifyUrl:v.verifyUrl});Y&&(O.verified.origin=Y.origin,O.verified.isScam=Y.isScam,O.verified.validation=Y.origin===new URL(v.url).origin?"VALID":"INVALID")}catch(Y){n.client.logger.info(Y)}return n.client.logger.info(`Verify context: ${JSON.stringify(O)}`),O});return function(u,v){return r.apply(this,arguments)}}(),this.validateSessionProps=(r,u)=>{Object.values(r).forEach(v=>{if(!Do(v,!1)){const{message:O}=_n("MISSING_OR_INVALID",`${u} must be in Record format. Received: ${JSON.stringify(v)}`);throw new Error(O)}})}}isInitialized(){var e=this;return(0,ke.Z)(function*(){if(!e.initialized){const{message:n}=_n("NOT_INITIALIZED",e.name);throw new Error(n)}yield e.client.core.relayer.confirmOnlineStateOrThrow()})()}registerRelayerEvents(){var e=this;this.client.core.relayer.on(os_message,function(){var n=(0,ke.Z)(function*(r){const{topic:u,message:v}=r;if(e.ignoredPayloadTypes.includes(e.client.core.crypto.getPayloadType(v)))return;const O=yield e.client.core.crypto.decode(u,v);try{X3(O)?(e.client.core.history.set(u,O),e.onRelayEventRequest({topic:u,payload:O})):nw(O)?(yield e.client.core.history.resolve(O),yield e.onRelayEventResponse({topic:u,payload:O}),e.client.core.history.delete(u,O.id)):e.onRelayEventUnknownPayload({topic:u,payload:O})}catch(Y){e.client.logger.error(Y)}});return function(r){return n.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.client.core.expirer.on(Xa_expired,function(){var n=(0,ke.Z)(function*(r){const{topic:u,id:v}=ix(r.target);if(v&&e.client.pendingRequest.keys.includes(v))return yield e.deletePendingSessionRequest(v,_n("EXPIRED"),!0);u?e.client.session.keys.includes(u)&&(yield e.deleteSession(u,!0),e.client.events.emit("session_expire",{topic:u})):v&&(yield e.deleteProposal(v,!0),e.client.events.emit("proposal_expire",{id:v}))});return function(r){return n.apply(this,arguments)}}())}registerPairingEvents(){this.client.core.pairing.events.on(jm_create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!Do(e,!1)){const{message:n}=_n("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(n)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:n}=_n("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(n)}if(Pf(this.client.core.pairing.pairings.get(e).expiry)){const{message:n}=_n("EXPIRED",`pairing topic: ${e}`);throw new Error(n)}}isValidSessionTopic(e){var n=this;return(0,ke.Z)(function*(){if(!Do(e,!1)){const{message:r}=_n("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(r)}if(!n.client.session.keys.includes(e)){const{message:r}=_n("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(r)}if(Pf(n.client.session.get(e).expiry)){yield n.deleteSession(e);const{message:r}=_n("EXPIRED",`session topic: ${e}`);throw new Error(r)}})()}isValidSessionOrPairingTopic(e){var n=this;return(0,ke.Z)(function*(){if(n.client.session.keys.includes(e))yield n.isValidSessionTopic(e);else{if(!n.client.core.pairing.pairings.keys.includes(e)){if(Do(e,!1)){const{message:r}=_n("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}{const{message:r}=_n("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}n.isValidPairingTopic(e)}})()}isValidProposalId(e){var n=this;return(0,ke.Z)(function*(){if(!function RJ(t){return"number"==typeof t}(e)){const{message:r}=_n("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(r)}if(!n.client.proposal.keys.includes(e)){const{message:r}=_n("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(Pf(n.client.proposal.get(e).expiry)){yield n.deleteProposal(e);const{message:r}=_n("EXPIRED",`proposal id: ${e}`);throw new Error(r)}})()}}class Fee extends iw{constructor(e,n){super(e,n,"proposal",sS),this.core=e,this.logger=n}}class Bee extends iw{constructor(e,n){super(e,n,"session",sS),this.core=e,this.logger=n}}class jee extends iw{constructor(e,n){super(e,n,"request",sS,r=>r.id),this.core=e,this.logger=n}}class cS extends PH{constructor(e){var n;super(e),n=this,this.protocol="wc",this.version=2,this.name=aS_name,this.events=new Mu.EventEmitter,this.on=(u,v)=>this.events.on(u,v),this.once=(u,v)=>this.events.once(u,v),this.off=(u,v)=>this.events.off(u,v),this.removeListener=(u,v)=>this.events.removeListener(u,v),this.removeAllListeners=u=>this.events.removeAllListeners(u),this.connect=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.connect(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.pair=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.pair(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.approve=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.approve(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.reject=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.reject(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.update=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.update(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.extend=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.extend(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.request=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.request(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.respond=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.respond(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.ping=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.ping(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.emit=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.emit(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.disconnect=function(){var u=(0,ke.Z)(function*(v){try{return yield n.engine.disconnect(v)}catch(O){throw n.logger.error(O.message),O}});return function(v){return u.apply(this,arguments)}}(),this.find=u=>{try{return this.engine.find(u)}catch(v){throw this.logger.error(v.message),v}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(u){throw this.logger.error(u.message),u}},this.name=e?.name||aS_name,this.metadata=e?.metadata||function UY(){return(0,hY.D)()||{name:"",description:"",url:"",icons:[""]}}();const r=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,Kr.pino)((0,Kr.getDefaultLoggerOptions)({level:e?.logger||aS_logger}));this.core=e?.core||new _ee(e),this.logger=(0,Kr.generateChildLogger)(r,this.name),this.session=new Bee(this.core,this.logger),this.proposal=new Fee(this.core,this.logger),this.pendingRequest=new jee(this.core,this.logger),this.engine=new Lee(this)}static init(e){return(0,ke.Z)(function*(){const n=new cS(e);return yield n.initialize(),n})()}get context(){return(0,Kr.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){var e=this;return(0,ke.Z)(function*(){e.logger.trace("Initialized");try{yield e.core.start(),yield e.session.init(),yield e.proposal.init(),yield e.pendingRequest.init(),yield e.engine.init(),e.core.verify.init({verifyUrl:e.metadata.verifyUrl}),e.logger.info("SignClient Initialization Success")}catch(n){throw e.logger.info("SignClient Initialization Failure"),e.logger.error(n.message),n}})()}}var dh=p(36953);class Uee{constructor(e){this.openModal=dh.jb.open,this.closeModal=dh.jb.close,this.subscribeModal=dh.jb.subscribe,this.setTheme=dh.Ic.setThemeConfig,dh.Ic.setThemeConfig(e),dh.t0.setConfig(e),this.initUi()}initUi(){return(0,ke.Z)(function*(){if(typeof window<"u"){yield p.e(390).then(p.bind(p,52390));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),dh.zb.setIsUiLoaded(!0)}})()}}const zee=class Kee{init(e){var n=this;return(0,ke.Z)(function*(){n.client=yield cS.init(e)})()}constructor(e){this.emitter=e}get session(){return this.client.session}on(e,n){return this.client.on(e,n),{remove:()=>this.client.removeListener(e,n)}}once(e,n){this.client.once(e,n)}connect(e,n,r,u){var v=this;return(0,ke.Z)(function*(){return v.modal||(v.modal=new Uee({projectId:r,chains:[u],explorerExcludedWalletIds:"ALL"})),new Promise((O,Y)=>{v.client.connect(e).then(({uri:$,approval:ie})=>{$&&(n?(v.modal.openModal({uri:$,standaloneChains:[u]}),v.modal.subscribeModal(({open:ue})=>{ue||Y(new Error("User cancelled pairing"))})):v.emitter.emit("uriChanged",{uri:$})),ie().then(O).catch(Y).finally(()=>v.modal.closeModal())}).catch(Y)})})()}request(e){var n=this;return(0,ke.Z)(function*(){return n.client.request(e)})()}disconnect(e){var n=this;return(0,ke.Z)(function*(){return n.client.disconnect(e)})()}},Vee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAir0lEQVR42u3deZxcVZn/8c9zbnV3dhIim6CMCIyK4rigM6S6AUEZcRu3EQGRJV0NmA3CYiASCGtkT0Do6gRB1AEFdRBRfrKYdAUU1JERl0FUUBCCQEL2dNc9398f1RGMZOmku+pW1/N+vfrVL0hX3adu3ee555577jngnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc85tO6t1AG7gTCimAcgBORO5JrNR5cDOpHqVjFcB4xGjgGZBi0ELgGCdwTqgB2Ml8LyJ5yyx55oiz6yTVsooQ+VncSGJtf6sbmB4Aahj+WI6CjHGAqMlxkvaG9gd2BV4tcFYwXAqib7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nYNxeKiSNvGzZZuU700TwYSpF4J828+dLzOw0sP8qFfxyamt4AdgG+WJMQJ+SdBmw80b+7HHDpgLfK3V48m+JCZ1pYvABoavYSBEweAbsVILdUmr35N9a3gm4DUqFkJqFWzCbAvyev1+UtGzwiGEnAXd48m+5xR1JinGHmZ0EPMLfr+mQAr/HbCoWbvbk3zbeAhgAE7oUAulb08gJwexNSBGzhw2ulfhtqSNRrWOsR63F1IA3SDoReCtmQdKvE6xTwX7R3R5irWOsd14ABtD+16UjRjeHsWvSSBRLfQjqwMgX0+G5xMY1AytTLbvfH+pxzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOecy5f8DP47LVlAysbUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDYtMjNUMTQ6MzU6MDkrMDA6MDD1AeMiAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA2LTIzVDE0OjM1OjA5KzAwOjAwhFxbngAAAABJRU5ErkJggg==",Hee=["near_signIn","near_signOut","near_getAccounts","near_signTransaction","near_signTransactions","near_verifyOwner","near_signMessage"],Wee=["chainChanged","accountsChanged"],Gee=function(){var t=(0,ke.Z)(function*(e,n,r){const u=new zee(r);let v=null;const O=new Jn.keyStores.BrowserLocalStorageKeyStore(window.localStorage,`near-wallet-selector:${e}:keystore:`);if(yield u.init({projectId:n.projectId,metadata:n.metadata,relayUrl:n.relayUrl}),u.session.length){const Y=u.session.keys.length-1;v=u.session.get(u.session.keys[Y])}return{client:u,session:v,keystore:O,subscriptions:[]}});return function(n,r,u){return t.apply(this,arguments)}}(),OT=function(){var t=(0,ke.Z)(function*({state:e,chainId:n,qrCodeModal:r,projectId:u,methods:v,events:O}){return yield e.client.connect({requiredNamespaces:{near:{chains:[n],methods:v||Hee,events:O||Wee}}},r,u,n)});return function(n){return t.apply(this,arguments)}}(),lS=function(){var t=(0,ke.Z)(function*({state:e}){yield e.client.disconnect({topic:e.session.topic,reason:{code:5900,message:"User disconnected"}})});return function(n){return t.apply(this,arguments)}}(),Zee=function(){var t=(0,ke.Z)(function*({id:e,options:n,store:r,params:u,provider:v,emitter:O,logger:Y}){const $=yield Gee(e,u,O),ie=()=>{if(u.chainId)return u.chainId;const{networkId:rn}=n.network;if(["mainnet","testnet"].includes(rn))return`near:${rn}`;throw new Error("Invalid chain id")},ue=function(){var rn=(0,ke.Z)(function*(){const un=$.session?.namespaces.near.accounts||[],xn=[];for(let br=0;brun.remove()),$.subscriptions=[],$.session=null});return function(){return rn.apply(this,arguments)}}(),we=(rn,un)=>{if("FullAccess"===un.permission)return un;const{receiver_id:xn,method_names:br}=un.permission.FunctionCall;return rn.receiverId!==xn?null:rn.actions.every(mr=>{if("FunctionCall"!==mr.type)return!1;const{methodName:ur,deposit:Er}=mr.params;return(!br.length||!br.includes(ur))&&parseFloat(Er)<=0})},xe=function(){var rn=(0,ke.Z)(function*(un){const xn=new Jn.InMemorySigner($.keystore),br=[],mr=yield v.block({finality:"final"});for(let ur=0;urih($a)),Jn.utils.serialize.base_decode(mr.header.hash)),[,bc]=yield Jn.transactions.signTransaction(vc,xn,un[ur].signerId,n.network.networkId);br.push(bc)}return br});return function(xn){return rn.apply(this,arguments)}}(),Ce=function(){var rn=(0,ke.Z)(function*(){return $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_getAccounts",params:{}}})});return function(){return rn.apply(this,arguments)}}(),Le=function(){var rn=(0,ke.Z)(function*(un,xn){return $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_verifyOwner",params:{accountId:un,message:xn}}})});return function(xn,br){return rn.apply(this,arguments)}}(),je=function(){var rn=(0,ke.Z)(function*(un){const{message:xn,nonce:br,recipient:mr,callbackUrl:ur,accountId:Er}=un;return $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_signMessage",params:{message:xn,nonce:br,recipient:mr,...ur&&{callbackUrl:ur},...Er&&{accountId:Er}}}})});return function(xn){return rn.apply(this,arguments)}}(),Ue=function(){var rn=(0,ke.Z)(function*(un){const br=(yield Ce()).find(Ko=>Ko.accountId===un.signerId);if(!br)throw new Error("Invalid signer id");const[mr,ur]=yield Promise.all([v.block({finality:"final"}),v.query({request_type:"view_access_key",finality:"final",account_id:un.signerId,public_key:br.publicKey})]),Er=Jn.transactions.createTransaction(un.signerId,Jn.utils.PublicKey.from(br.publicKey),un.receiverId,ur.nonce+1,un.actions.map(Ko=>ih(Ko)),Jn.utils.serialize.base_decode(mr.header.hash)),Xi=yield $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_signTransaction",params:{transaction:Er.encode()}}});return Jn.transactions.SignedTransaction.decode(Buffer.from(Xi))});return function(xn){return rn.apply(this,arguments)}}(),$e=function(){var rn=(0,ke.Z)(function*(un){if(!un.length)return[];const xn=[],[br,mr]=yield Promise.all([v.block({finality:"final"}),Ce()]);for(let Er=0;Erbc.accountId===Xi.signerId);if(!Ko)throw new Error("Invalid signer id");const vc=yield v.query({request_type:"view_access_key",finality:"final",account_id:Xi.signerId,public_key:Ko.publicKey});xn.push(Jn.transactions.createTransaction(Xi.signerId,Jn.utils.PublicKey.from(Ko.publicKey),Xi.receiverId,vc.nonce+Er+1,Xi.actions.map(bc=>ih(bc)),Jn.utils.serialize.base_decode(br.header.hash)))}return(yield $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_signTransactions",params:{transactions:xn.map(Er=>Er.encode())}}})).map(Er=>Jn.transactions.SignedTransaction.decode(Buffer.from(Er)))});return function(xn){return rn.apply(this,arguments)}}(),Je=function(){var rn=(0,ke.Z)(function*(){return(yield ue()).map(({accountId:xn})=>({accountId:xn,keyPair:Jn.utils.KeyPair.fromRandom("ed25519")}))});return function(){return rn.apply(this,arguments)}}(),ht=function(){var rn=(0,ke.Z)(function*(un){const xn=yield Je(),br=xn.map(({accountId:mr,keyPair:ur})=>({accountId:mr,publicKey:ur.getPublicKey().toString()}));yield $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_signIn",params:{permission:un,accounts:br}}});for(let mr=0;mr(0,ke.Z)(function*(){try{const{contract:br}=r.getState();$.session&&!br&&(yield lS({state:$}),yield he());const mr=ie();return $.session=yield OT({state:$,chainId:mr,qrCodeModal:xn,projectId:u.projectId,methods:u.methods,events:u.events}),yield ht({receiverId:rn,methodNames:un}),yield An(),yield ue()}catch(br){throw yield Wt(),br}})(),signOut:Wt,getAccounts:()=>(0,ke.Z)(function*(){return ue()})(),verifyOwner:({message:rn})=>(0,ke.Z)(function*(){Y.log("WalletConnect:verifyOwner",{message:rn});const{contract:un}=r.getState();if(!$.session||!un)throw new Error("Wallet not signed in");const xn=Df(r.getState());if(!xn)throw new Error("No active account");return Le(xn.accountId,rn)})(),signMessage:({message:rn,nonce:un,recipient:xn,callbackUrl:br})=>(0,ke.Z)(function*(){Y.log("WalletConnect:signMessage",{message:rn,nonce:un,recipient:xn});try{const mr=ie();$.session||($.session=$.session=yield OT({state:$,chainId:mr,qrCodeModal:!0,projectId:u.projectId}));const ur=Df(r.getState());return yield je({message:rn,nonce:un,recipient:xn,callbackUrl:br,accountId:ur?.accountId})}catch(mr){throw yield lS({state:$}),yield he(),mr}})(),signAndSendTransaction:({signerId:rn,receiverId:un,actions:xn})=>(0,ke.Z)(function*(){Y.log("signAndSendTransaction",{signerId:rn,receiverId:un,actions:xn});const{contract:br}=r.getState();if(!$.session||!br)throw new Error("Wallet not signed in");const mr=Df(r.getState());if(!mr)throw new Error("No active account");const ur={signerId:rn||mr.accountId,receiverId:un||br.contractId,actions:xn};try{const[Er]=yield xe([ur]);return v.sendTransaction(Er)}catch(Er){Y.log("Falling back to WalletConnect to sign transaction",Er);const Xi=yield Ue(ur);return v.sendTransaction(Xi)}})(),signAndSendTransactions:({transactions:rn})=>(0,ke.Z)(function*(){Y.log("signAndSendTransactions",{transactions:rn});const{contract:un}=r.getState();if(!$.session||!un)throw new Error("Wallet not signed in");const xn=Df(r.getState());if(!xn)throw new Error("No active account");const br=rn.map(mr=>({signerId:mr.signerId||xn.accountId,receiverId:mr.receiverId,actions:mr.actions}));try{const mr=yield xe(br),ur=[];for(let Er=0;ErZee({...$,params:{projectId:t,metadata:e,relayUrl:r,chainId:n,methods:O,events:Y}})}})}const Yee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAMAAABOo35HAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAD8UExURUdwTGx5rpLO8YOYx1Og0ly29X5ezR4mT0tiji4eWJ953KGn1Jxs7qB9xvfD/Us0gduu8yeh4HOq74dD647R91256eSz+j82cbvg/dSj/LuL79Wp6zCf24KN9xANGRANF59d/0W+/taa/8iN/3HL9uOn/z638Bil7l3G84TP+FHB8o5A/0i9/ZjU+47S+vq8/4Qy/S6w8O+x/5Rp/wyg7G2T/s+T/vO2/+qt/1qp/qDV/HyD/ki4+4R7/qnY/tyh/1Gx/ptU/76E/2bJ9Ld8/4t0/pxe+XvN9iOq7rB0/0i88aRk/6ps/z++/naL/mab/mGh/pVM/wub5mGd+fAEOhEAAAAgdFJOUwBEyWKA47EKJhnFluGA6l3H67Du6crdNOXs5q/I65rcQbfB9AAAIABJREFUeNrsnE9r4zoXxidOG9tNQqBvSrLKeKGF7WIz4J0WgSCuDc1s7vf/Mq/+S0d2p7Zkd7i0SsZJh3th+PGcR4+OpP748T3+4yNODofDKY2/SYxgdbhcfl4ul9M3rY9ZpZefbFwu6TeMD8dJwPp5Sb6l9eFIL5zW5TDoWrEc35wEjtOFDWPxjE2aJMkqWa3W6/WevuigPyVJ+tWngTg+HQ58PmSDQlqvt5Eax+jIBv2UY7umyL6u0JiMBK6DpETp4KqmL/ngX9hnwcEJYl8TGIV1EpzOEaNUCUBqFPwPfRX0W8GfFSPGgX255JCcTpwUByVY1WAU/FHwLxRWV3RdIYGtvhIvKqoVI0Wriw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TXo1oRs5KTQ8otDVXdKmEf8deeTdf6rrCWLv31c7b5KlqZX9j84321DPfAPKd6NatGTqsvATydhFDWapwKxEf4Zvbv0b5JdzbbrL+QVki6cjq5v+azBK5AMrIIkiXq8aEycE1e1xv9rF+nky+Hypw1Ci4U/PHWsExrVjzDd3CJZf4EqEwlLLJskmWJW31fVoyGXTJK30WsWXUqKiXMWj4Nqv/LA9oVtF57L5s3hHEYmRtquPQlHrvwoKklalV/Stb/ZqjMyaivptalbKRbCHGpgyDxn2hxCRrkNFLCkGrxt0NlqvFjqvGSOpZx8QxCy2+V+mtiUI3KqgOCLSA1yb4DUgSvrbYSNbpsWCYyeCCU8lOaW8Cpt+k3QsrhpW9AA2CWXLWguXJtL7IKW4MA1E5xavHdoPKGRhFspRADWkkMV+0WQ+D8g5vA6l97n35XoJCjmb7rS/Y5YMYaRGCTvpY/zb45UKQmgWQ7hRl5dj8wXaPZQr/PQeGTLfQLHn5A+Xl+np/n53nC8x/tAMljWkeBnAAAAABJRU5ErkJggg==",NT=(t,e)=>{if(e)return e;switch(t.networkId){case"mainnet":return"https://app.mynearwallet.com";case"testnet":return"https://testnet.mynearwallet.com";default:throw new Error("Invalid wallet url")}},Jee=function(){var t=(0,ke.Z)(function*(e,n){const r=new Jn.keyStores.BrowserLocalStorageKeyStore,u=yield Jn.connect({keyStore:r,walletUrl:e.walletUrl,...n,headers:{}});return{wallet:new Jn.WalletConnection(u,"near_app"),keyStore:r}});return function(n,r){return t.apply(this,arguments)}}(),Qee=function(){var t=(0,ke.Z)(function*({metadata:e,options:n,store:r,params:u,logger:v,id:O}){const Y=yield Jee(u,n.network),$=function(){var ue=(0,ke.Z)(function*(){const he=Y.wallet.getAccountId(),we=Y.wallet.account();if(!he||!we)return[];const xe=yield we.connection.signer.getPublicKey(we.accountId,n.network.networkId);return[{accountId:he,publicKey:xe?xe.toString():""}]});return function(){return ue.apply(this,arguments)}}(),ie=function(){var ue=(0,ke.Z)(function*(he){const we=Y.wallet.account(),{networkId:xe,signer:Ce,provider:Le}=we.connection,je=yield Ce.getPublicKey(we.accountId,xe);return Promise.all(he.map(function(){var Ue=(0,ke.Z)(function*($e,Je){const ht=$e.actions.map(An=>ih(An)),xt=yield we.accessKeyForTransaction($e.receiverId,ht,je);if(!xt)throw new Error(`Failed to find matching key for transaction sent to ${$e.receiverId}`);const Wt=yield Le.block({finality:"final"});return Jn.transactions.createTransaction(we.accountId,Jn.utils.PublicKey.from(xt.public_key),$e.receiverId,xt.access_key.nonce+Je+1,ht,Jn.utils.serialize.base_decode(Wt.header.hash))});return function($e,Je){return Ue.apply(this,arguments)}}()))});return function(we){return ue.apply(this,arguments)}}();return{signIn:({contractId:ue,methodNames:he,successUrl:we,failureUrl:xe})=>(0,ke.Z)(function*(){const Ce=yield $();return Ce.length?Ce:(yield Y.wallet.requestSignIn({contractId:ue,methodNames:he,successUrl:we,failureUrl:xe}),$())})(),signOut:()=>(0,ke.Z)(function*(){Y.wallet.isSignedIn()&&Y.wallet.signOut()})(),getAccounts:()=>(0,ke.Z)(function*(){return $()})(),verifyOwner:()=>(0,ke.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signMessage:({message:ue,nonce:he,recipient:we,callbackUrl:xe,state:Ce})=>(0,ke.Z)(function*(){if(v.log("sign message",{message:ue}),"my-near-wallet"!==O)throw Error(`The signMessage method is not supported by ${e.name}`);const Le=typeof window<"u"?window.location.href:"",je=xe||Le;if(!je)throw new Error(`The callbackUrl is missing for ${e.name}`);const Ue=new URL(u.walletUrl);Ue.pathname="sign-message",Ue.searchParams.append("message",ue),Ue.searchParams.append("nonce",he.toString("base64")),Ue.searchParams.append("recipient",we),Ue.searchParams.append("callbackUrl",je),Ce&&Ue.searchParams.append("state",Ce),window.location.replace(Ue.toString())})(),signAndSendTransaction:({signerId:ue,receiverId:he,actions:we,callbackUrl:xe})=>(0,ke.Z)(function*(){v.log("signAndSendTransaction",{signerId:ue,receiverId:he,actions:we,callbackUrl:xe});const{contract:Ce}=r.getState();if(!Y.wallet.isSignedIn()||!Ce)throw new Error("Wallet not signed in");return Y.wallet.account().signAndSendTransaction({receiverId:he||Ce.contractId,actions:we.map(je=>ih(je)),walletCallbackUrl:xe})})(),signAndSendTransactions:({transactions:ue,callbackUrl:he})=>(0,ke.Z)(function*(){if(v.log("signAndSendTransactions",{transactions:ue,callbackUrl:he}),!Y.wallet.isSignedIn())throw new Error("Wallet not signed in");return Y.wallet.requestSignTransactions({transactions:yield ie(ue),callbackUrl:he})})(),buildImportAccountsUrl:()=>`${u.walletUrl}/batch-import`}});return function(n){return t.apply(this,arguments)}}();function RT({walletUrl:t,iconUrl:e=Yee,deprecated:n=!1,successUrl:r="",failureUrl:u=""}={}){return function(){var v=(0,ke.Z)(function*(O){return{id:"my-near-wallet",type:"browser",metadata:{name:"MyNearWallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:e,deprecated:n,available:!0,successUrl:r,failureUrl:u,walletUrl:NT(O.options.network,t)},init:Y=>Qee({...Y,params:{walletUrl:NT(Y.options.network,t)}})}});return function(O){return v.apply(this,arguments)}}()}const Xee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAe+0lEQVR42u2dV3ccV7bff7tCRyQiMIAgSIJJ1ChwNGNRWRqF0QTPeHxf/C38KfzkZ38Gey2v67m+9rWX585ao5E0IzETjCLFBBAAAZJgQu7uOuf44dRBg6QCQ8dC/dYCwwHQXVW9/7t27bPPPmKMMaSkNAtj7JeI/QKimzcoH/+S3Nuf4HX3Vr9fB4Jmn3/KOsUYjDGI51nj1prS1cssH/6C8tHPyQwOUvjNf7A/Wyfjh1QAKY3GGOvQPUFE0KUyi+fPsvD3L6hcPo9fWcSPlsm8+rr9ea3B8+p2OKkAUhqC0cY6chFEoHJ/jgcnTjF39AjR5DUCiQhCHwkKSAUyP/mZ/cU6en9IBZBSTwxxmCOIZw15aeoWs0dGmR89jb43S+ArMoUCni4jVDDLy4Q7duJvGmzIIaYCSK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84+FP26hzMoyZHPw3vs+v/t9wJ693kOhTmr4Kc9L3QXgJptKJThx/PvDHxe+RBEsLNj1Ae9/4PP7PwTs3VctUEsNP6WWNEQAInD6tGLiunls5ZcLdZzhd3UJv/ltwO9+H7Bt2Bq+E0xq+Cm1pmEh0PFjmnLZkM0JRlUXmUeVap3Or34d8stf+QwPVxtKrZYrpKTUgboKwBnv/Lzh1KgNf4jLocslWClZw//dvwv57b8N6O9PKzNTGkvdBSACly9pZqYN+bxda1suGQa3enzyacgHv/AZGKjO2kJq+CmNo+4CADh0yGZ/lBK2bhU++jjkk1/6dPdImsNPaSp1E4Bb+fXggeHYEc2uXR5/+IeAd971KRRSw09pDcSY+nTjceHP+Jjm+HHNb34brNbpuO+lYU5Ks/n/VnKP4Bbx7PAAAAAASUVORK5CYII=";var kT,LT,FT;function qee(t,e,n,r){return new(n||(n=Promise))(function(v,O){function Y(ue){try{ie(r.next(ue))}catch(he){O(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){O(he)}}function ie(ue){ue.done?v(ue.value):function u(v){return v instanceof n?v:new n(function(O){O(v)})}(ue.value).then(Y,$)}ie((r=r.apply(t,e||[])).next())})}const Vm=null!=(kT={}.NEXT_PUBLIC_RAMPER_ENV)?kT:globalThis.RAMPER_ENV,mi_LOCAL="local",mi_PREVIEW="preview",mi_DEV="dev",mi_STAGING="staging",mi_PROD="prod",Hm=(LT={}.NEXT_PUBLIC_VERCEL_URL,FT={}.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF,()=>void 0===globalThis.window),Lu=()=>!Hm()&&window.location.hostname.includes("dev.ramper.xyz")?mi_DEV:!Hm()&&window.location.hostname.includes("preview.ramper.xyz")?mi_PREVIEW:!Hm()&&window.location.hostname.includes("staging.ramper.xyz")?mi_STAGING:Vm===mi_PROD?mi_PROD:Vm===mi_STAGING?mi_STAGING:Vm===mi_DEV?mi_DEV:Vm===mi_PREVIEW?mi_PREVIEW:Vm===mi_LOCAL?mi_LOCAL:mi_PROD;var BT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ite(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}),e}var fS={exports:{}};(function(t,e){!function(n,r){var Y="function",$="undefined",ie="object",ue="string",we="model",xe="name",Ce="type",Le="vendor",je="version",Ue="architecture",$e="console",Je="mobile",ht="tablet",xt="smarttv",Wt="wearable",An="embedded",un="Amazon",xn="Apple",mr="BlackBerry",ur="Browser",Er="Chrome",Ko="Firefox",vc="Google",Fu="Microsoft",Ps="Motorola",Ml="Opera",ev="Samsung",Dl="Sony",Wp="Zebra",vw="Facebook",Gp=function(Nr){for(var qr={},Rr=0;Rr0?2===vi.length?typeof vi[1]==Y?this[vi[0]]=vi[1].call(this,wc):this[vi[0]]=vi[1]:3===vi.length?typeof vi[1]!==Y||vi[1].exec&&vi[1].test?this[vi[0]]=wc?wc.replace(vi[1],vi[2]):r:this[vi[0]]=wc?vi[1].call(this,wc,vi[2]):r:4===vi.length&&(this[vi[0]]=wc?vi[3].call(this,wc.replace(vi[1],vi[2])):r):this[vi]=wc||r;Rr+=2}},_S=function(Nr,qr){for(var Rr in qr)if(typeof qr[Rr]===ie&&qr[Rr].length>0){for(var qi=0;qi255?SS(Fr,255):Fr,this},this.setUA(Rr),this};ju.VERSION="1.0.2",ju.BROWSER=Gp([xe,je,"major"]),ju.CPU=Gp([Ue]),ju.DEVICE=Gp([we,Le,Ce,$e,Je,xt,ht,Wt,An]),ju.ENGINE=ju.OS=Gp([xe,je]),t.exports&&(e=t.exports=ju),e.UAParser=ju;var Zp=typeof n!==$&&(n.jQuery||n.Zepto);if(Zp&&!Zp.ua){var bw=new ju;Zp.ua=bw.getResult(),Zp.ua.get=function(){return bw.getUA()},Zp.ua.set=function(Nr){bw.setUA(Nr);var qr=bw.getResult();for(var Rr in qr)Zp.ua[Rr]=qr[Rr]}}}("object"==typeof window?window:BT)})(fS,fS.exports),(new fS.exports.UAParser).getBrowser;!function(t,e){var u;u=function(){var n=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014c":"O","\u014d":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u018f":"E","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u0259":"e","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E\'","\u0538":"Y\'","\u0539":"T\'","\u053a":"JH","\u053b":"I","\u053c":"L","\u053d":"X","\u053e":"C\'","\u053f":"K","\u0540":"H","\u0541":"D\'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054a":"P","\u054b":"J","\u054c":"R\'","\u054d":"S","\u054e":"V","\u054f":"T","\u0550":"R","\u0551":"C","\u0553":"P\'","\u0554":"Q\'","\u0555":"O\'\'","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062a":"t","\u062b":"th","\u062c":"j","\u062d":"h","\u062e":"kh","\u062f":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063a":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064a":"y","\u064b":"an","\u064c":"on","\u064d":"en","\u064e":"a","\u064f":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067e":"p","\u0686":"ch","\u0698":"zh","\u06a9":"k","\u06af":"g","\u06cc":"y","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e62":"S","\u1e63":"s","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2013":"-","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u201e":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20ba":"turkish lira","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial","\ufef5":"laa","\ufef7":"laa","\ufef9":"lai","\ufefb":"la"}'),r=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042a":"A","\u042c":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044a":"a","\u044c":"y"},"de":{"\xc4":"AE","\xe4":"ae","\xd6":"OE","\xf6":"oe","\xdc":"UE","\xfc":"ue","\xdf":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221e":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xa2":"centavos","\xa3":"libras","\xa4":"moneda","\u20a3":"francos","\u2211":"suma","\u221e":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xa2":"centime","\xa3":"livre","\xa4":"devise","\u20a3":"franc","\u2211":"somme","\u221e":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xa2":"centavo","\u2211":"soma","\xa3":"libra","\u221e":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xd8":"OE","\xf8":"oe","\xc5":"AA","\xe5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xf8rre end"},"nb":{"&":"og","\xc5":"AA","\xc6":"AE","\xd8":"OE","\xe5":"aa","\xe6":"ae","\xf8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xc5":"AA","\xc4":"AE","\xd6":"OE","\xe5":"aa","\xe4":"ae","\xf6":"oe"}}');function u(v,O){if("string"!=typeof v)throw new Error("slugify: string argument expected");var Y=r[(O="string"==typeof O?{replacement:O}:O||{}).locale]||{},$=void 0===O.replacement?"-":O.replacement,ie=void 0===O.trim||O.trim,ue=v.normalize().split("").reduce(function(he,we){var xe=Y[we]||n[we]||we;return xe===$&&(xe=" "),he+xe.replace(O.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return O.strict&&(ue=ue.replace(/[^A-Za-z0-9\s]/g,"")),ie&&(ue=ue.trim()),ue=ue.replace(/\s+/g,$),O.lower&&(ue=ue.toLowerCase()),ue}return u.extend=function(v){Object.assign(n,v)},u},t.exports=u(),t.exports.default=u()}({exports:{}});const Bp=()=>Hm()?"localhost":window.location.hostname;({local:`http://${Bp()}:3000`,preview:"https://auth.v1.preview.ramper.xyz",dev:"https://auth.v1.dev.ramper.xyz",staging:"https://auth.v1.staging.ramper.xyz",prod:"https://auth.v1.ramper.xyz"})[Lu()];({local:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",preview:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",dev:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",staging:"https://us-central1-ramper-prod.cloudfunctions.net",prod:"https://us-central1-ramper-prod.cloudfunctions.net"})[Lu()],{local:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",preview:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",dev:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",staging:"wss://tauokxd7fh.execute-api.us-west-2.amazonaws.com/prod",prod:"wss://tauokxd7fh.execute-api.us-west-2.amazonaws.com/prod"}[Lu()],{local:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",preview:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",dev:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",staging:"https://cjbz1h17i7.execute-api.us-west-2.amazonaws.com/prod/v1_0",prod:"https://cjbz1h17i7.execute-api.us-west-2.amazonaws.com/prod/v1_0"}[Lu()],{local:"G-QDW3GW421L",preview:"G-QDW3GW421L",dev:"G-QDW3GW421L",staging:"G-7NRREF51EB",prod:"G-7NRREF51EB"}[Lu()],{local:`http://${Bp()}:3001`,preview:"https://example.preview.ramper.xyz",dev:"https://example.dev.ramper.xyz",staging:"https://example.staging.ramper.xyz",prod:"https://example.ramper.xyz"}[Lu()];({local:`http://${Bp()}:3002`,preview:"https://static.preview.ramper.xyz",dev:"https://static.dev.ramper.xyz",staging:"https://static.staging.ramper.xyz",prod:"https://static.ramper.xyz"})[Lu()];({local:`http://${Bp()}:3004`,preview:"https://docs.preview.ramper.xyz",dev:"https://docs.dev.ramper.xyz",staging:"https://docs.staging.ramper.xyz",prod:"https://docs.ramper.xyz"})[Lu()];const jT={local:`http://${Bp()}:3005`,preview:"https://js.preview.ramper.xyz",dev:"https://js.dev.ramper.xyz",staging:"https://js.staging.ramper.xyz",prod:"https://js.ramper.xyz"};jT[Lu()],{local:"suyklxmori",preview:"suyklxmori",dev:"suyklxmori",staging:"dtofgevaxu",prod:"dtofgevaxu"}[Lu()],{local:`http://${Bp()}:3008`,preview:"https://developer.preview.ramper.xyz",dev:"https://developer.dev.ramper.xyz",staging:"https://developer.staging.ramper.xyz",prod:"https://developer.ramper.xyz"}[Lu()];const sw=t=>window[t];let aw;const Rf_GOOGLE="google",Rf_FACEBOOK="facebook",Rf_APPLE="apple",Rf_TWITTER="twitter",Rf_EMAIL="email",jp={MAINNET:"mainnet",ROPSTEN:"ropsten",GOERLI:"goerli",MATIC:"matic",MATICMUM:"maticmum"},UT_DARK=(jp.MAINNET,jp.GOERLI,jp.MATIC,jp.MATICMUM,"dark"),Up=(jp.MAINNET,{ALL:"ALL",DEBUG:"DEBUG",INFO:"INFO",WARN:"WARN",ERROR:"ERROR"}),dS=Up.DEBUG,uw=(t,...e)=>{};class pte{constructor(e=dS){this.debug=uw,this.info=uw,this.warn=uw,this.error=uw;const n=Object.values(Up).includes(e)?e:dS;this.error=console.error.bind(console),n!==Up.ERROR&&(this.warn=console.warn.bind(console),n!==Up.WARN&&(this.info=console.info.bind(console),n!==Up.INFO&&(this.debug=console.log.bind(console),Up.DEBUG)))}}let gte;if(void 0!==globalThis.window){gte=new pte(window.localStorage.getItem("ramper_loggingLevel")||dS)}function hS(t){this.message=t}hS.prototype=new Error,hS.prototype.name="InvalidCharacterError";typeof window<"u"&&window.atob&&window.atob.bind(window);function cw(t){this.message=t}cw.prototype=new Error,cw.prototype.name="InvalidTokenError";!function(){try{window&&window.Promise}catch{return null}}();var Ste=ite(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));!function(t){var e=Ste,n={HS256:"sha256",HS384:"sha384",HS512:"sha512",RS256:"RSA-SHA256"},r={HS256:"hmac",HS384:"hmac",HS512:"hmac",RS256:"sign"},u=t.exports;function Y(we,xe,Ce,Le){var je;if("hmac"===Le)je=e.createHmac(Ce,xe).update(we).digest("base64");else{if("sign"!=Le)throw new Error("Algorithm type not recognized");je=e.createSign(Ce).update(we).sign(xe,"base64")}return he(je)}function $(we){return Buffer.from(ie(we),"base64").toString()}function ie(we){return(we+=new Array(5-we.length%4).join("=")).replace(/\-/g,"+").replace(/_/g,"/")}function ue(we){return he(Buffer.from(we).toString("base64"))}function he(we){return we.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}u.version="0.5.6",u.decode=function(xe,Ce,Le,je){if(!xe)throw new Error("No token supplied");var Ue=xe.split(".");if(3!==Ue.length)throw new Error("Not enough or too many segments");var $e=Ue[0],Je=Ue[1],ht=Ue[2],xt=JSON.parse($($e)),Wt=JSON.parse($(Je));if(!Le){!je&&/BEGIN( RSA)? PUBLIC KEY/.test(Ce.toString())&&(je="RS256");var An=n[je||xt.alg],rn=r[je||xt.alg];if(!An||!rn)throw new Error("Algorithm not supported");if(!function O(we,xe,Ce,Le,je){if("hmac"===Le)return je===Y(we,xe,Ce,Le);if("sign"==Le)return e.createVerify(Ce).update(we).verify(xe,ie(je),"base64");throw new Error("Algorithm type not recognized")}([$e,Je].join("."),Ce,An,rn,ht))throw new Error("Signature verification failed");if(Wt.nbf&&Date.now()<1e3*Wt.nbf)throw new Error("Token not yet active");if(Wt.exp&&Date.now()>1e3*Wt.exp)throw new Error("Token expired")}return Wt},u.encode=function(xe,Ce,Le,je){if(!Ce)throw new Error("Require key");Le||(Le="HS256");var Ue=n[Le],$e=r[Le];if(!Ue||!$e)throw new Error("Algorithm not supported");var Je={typ:"JWT",alg:Le};je&&je.header&&function v(we,xe){for(var Ce in xe)xe.hasOwnProperty(Ce)&&(we[Ce]=xe[Ce])}(Je,je.header);var ht=[];return ht.push(ue(JSON.stringify(Je))),ht.push(ue(JSON.stringify(xe))),ht.push(Y(ht.join("."),Ce,Ue,$e)),ht.join(".")}}({exports:{}});const Mte=()=>`${jT[(()=>{const t=globalThis.RAMPER_ENV;return t===mi_PROD?mi_PROD:t===mi_STAGING?mi_STAGING:t===mi_DEV?mi_DEV:t===mi_PREVIEW?mi_PREVIEW:t===mi_LOCAL?mi_LOCAL:mi_PROD})()]}/v1/near`,Dte=({src:t})=>Hm()?Promise.resolve({}):((t,e)=>{const n=document.querySelector(`[src="${t}"]`);if(null!=n&&void 0!==aw)return aw;if(null!=n&&void 0!==sw(e))return Promise.resolve(sw(e));const r=document.createElement("script");return r.src=t,aw=new Promise((u,v)=>{document.head.appendChild(r),window.addEventListener(`initialize:${e}`,()=>{void 0!==sw(e)?u(sw(e)):v(new Error(`Failed to load script: [${t}]`))})}),aw})(t,"ramper"),Al=()=>globalThis.ramper,VT=(...t)=>{var e;return null===(e=Al())||void 0===e?void 0:e.sendTransaction(...t)},Tte=function(){var t=(0,ke.Z)(function*({metadata:e,store:n,options:r,logger:u}){yield((...t)=>qee(void 0,void 0,void 0,function*(){const e=yield Dte({src:Mte()});return yield e?.init(...t),e}))({appName:"Ramper Wallet",authProviders:[Rf_GOOGLE,Rf_FACEBOOK,Rf_TWITTER,Rf_APPLE,Rf_EMAIL],walletProviders:[],network:r.network.networkId,theme:UT_DARK});const v={wallet:window.ramper},O=function(){var $=(0,ke.Z)(function*(){const{wallets:ie}=v.wallet.getUser(),{publicKey:ue}=ie.near;return ue?[{accountId:ue}]:[]});return function(){return $.apply(this,arguments)}}(),Y=function(){var $=(0,ke.Z)(function*(ie){const ue=yield O(),{contract:he}=n.getState();if(!ue.length||!he)throw new Error("Wallet not signed in");return ie.map(we=>{const xe=we.actions.map(Ce=>ih(Ce));return{receiverId:we.receiverId||he.contractId,actions:xe}})});return function(ue){return $.apply(this,arguments)}}();return{signIn:()=>(0,ke.Z)(function*(){const $=yield((...t)=>{var e;return null===(e=Al())||void 0===e?void 0:e.signIn(...t)})();if("cancel"===$.method||"none"===$.method)throw new Error("Something went wrong");const ie=yield O();return ie.length?ie:O()})(),signOut:()=>(0,ke.Z)(function*(){v.wallet.signOut()})(),getAccounts:()=>(0,ke.Z)(function*(){return O()})(),verifyOwner:({message:$})=>(0,ke.Z)(function*(){throw u.log("Ramper Wallet:verifyOwner",{message:$}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({receiverId:$,actions:ie})=>(0,ke.Z)(function*(){u.log("signAndSendTransaction",{receiverId:$,actions:ie});const{contract:ue}=n.getState();if(!(yield O()).length||!ue)throw new Error("Wallet not signed in");const we=yield Y([{receiverId:$,actions:ie}]);try{const{result:xe}=yield VT({transactionActions:we});if(0===Object.keys(xe[0]).length&&xe[0].constructor===Object)throw new Error;return xe[0]}catch{throw new Error("Failed to send transaction")}})(),signAndSendTransactions:({transactions:$})=>(0,ke.Z)(function*(){u.log("signAndSendTransactions",{transactions:$});const ie=yield Y($);try{const{result:ue}=yield VT({transactionActions:ie});if(0===Object.keys(ue[0]).length&&ue[0].constructor===Object)throw new Error;return ue}catch{throw new Error("Failed to send transactions")}})()}});return function(n){return t.apply(this,arguments)}}();function HT({iconUrl:t=Xee,deprecated:e=!1}={}){return(0,ke.Z)(function*(){return(0,Wa.isMobile)()?null:{id:"ramper-wallet",type:"injected",metadata:{name:"Ramper Wallet",description:null,iconUrl:t,downloadUrl:"https://docs.ramper.xyz/",deprecated:e,available:!0},init:Tte}})}const WT={},GT={},ZT=(t,e)=>{GT[t]=e},qt=t=>{class e extends Error{constructor(r,u,v){if(super(r||t,v),Object.setPrototypeOf(this,e.prototype),this.name=t,u)for(const O in u)this[O]=u[O];if(v&&function Ote(t){return"object"==typeof t}(v)&&"cause"in v&&!("cause"in this)){const O=v.cause;this.cause=O,"stack"in O&&(this.stack=this.stack+"\nCAUSE: "+O.stack)}}}return WT[t]=e,e};qt("AccountNameRequired"),qt("AccountNotSupported"),qt("AmountRequired"),qt("BluetoothRequired"),qt("BtcUnmatchedApp"),qt("CantOpenDevice"),qt("CashAddrNotSupported"),qt("ClaimRewardsFeesWarning"),qt("CurrencyNotSupported"),qt("DeviceAppVerifyNotSupported"),qt("DeviceGenuineSocketEarlyClose"),qt("DeviceNotGenuine"),qt("DeviceOnDashboardExpected"),qt("DeviceOnDashboardUnexpected"),qt("DeviceInOSUExpected"),qt("DeviceHalted"),qt("DeviceNameInvalid"),qt("DeviceSocketFail"),qt("DeviceSocketNoBulkStatus"),qt("DeviceSocketNoBulkStatus"),qt("UnresponsiveDeviceError");const Nte=qt("DisconnectedDevice"),Rte=qt("DisconnectedDeviceDuringOperation"),JT=(qt("DeviceExtractOnboardingStateError"),qt("DeviceOnboardingStatePollingError"),qt("EnpointConfig"),qt("EthAppPleaseEnableContractData"),qt("FeeEstimationFailed"),qt("FirmwareNotRecognized"),qt("HardResetFail"),qt("InvalidXRPTag"),qt("InvalidAddress"),qt("InvalidNonce"),qt("InvalidAddressBecauseDestinationIsAlsoSource"),qt("LatestMCUInstalledError"),qt("UnknownMCU"),qt("LedgerAPIError"),qt("LedgerAPIErrorWithMessage"),qt("LedgerAPINotAvailable"),qt("ManagerAppAlreadyInstalled"),qt("ManagerAppRelyOnBTC"),qt("ManagerAppDepInstallRequired"),qt("ManagerAppDepUninstallRequired"),qt("ManagerDeviceLocked"),qt("ManagerFirmwareNotEnoughSpace"),qt("ManagerNotEnoughSpace"),qt("ManagerUninstallBTCDep"),qt("NetworkDown"),qt("NetworkError"),qt("NoAddressesFound"),qt("NotEnoughBalance"),qt("NotEnoughBalanceToDelegate"),qt("NotEnoughBalanceInParentAccount"),qt("NotEnoughSpendableBalance"),qt("NotEnoughBalanceBecauseDestinationNotCreated"),qt("NoAccessToCamera"),qt("NotEnoughGas"),qt("NotEnoughGasSwap"),qt("NotSupportedLegacyAddress"),qt("GasLessThanEstimate"),qt("PriorityFeeTooLow"),qt("PriorityFeeTooHigh"),qt("PriorityFeeHigherThanMaxFee"),qt("MaxFeeTooLow"),qt("PasswordsDontMatch"),qt("PasswordIncorrect"),qt("RecommendSubAccountsToEmpty"),qt("RecommendUndelegation"),qt("TimeoutTagged"),qt("UnexpectedBootloader"),qt("MCUNotGenuineToDashboard"),qt("RecipientRequired"),qt("UnavailableTezosOriginatedAccountReceive"),qt("UnavailableTezosOriginatedAccountSend"),qt("UpdateFetchFileFail"),qt("UpdateIncorrectHash"),qt("UpdateIncorrectSig"),qt("UpdateYourApp"),qt("UserRefusedDeviceNameChange"),qt("UserRefusedAddress"),qt("UserRefusedFirmwareUpdate"),qt("UserRefusedAllowManager"),qt("UserRefusedOnDevice"),qt("ExpertModeRequired"),qt("TransportOpenUserCancelled")),kte=(qt("TransportInterfaceNotAvailable"),qt("TransportRaceCondition"));qt("TransportWebUSBGestureRequired"),qt("TransactionHasBeenValidatedError"),qt("TransportExchangeTimeoutError"),qt("DeviceShouldStayInApp"),qt("WebsocketConnectionError"),qt("WebsocketConnectionFailed"),qt("WrongDeviceForAccount"),qt("WrongAppForCurrency"),qt("ETHAddressNonEIP"),qt("CantScanQRCode"),qt("FeeNotLoaded"),qt("FeeNotLoadedSwap"),qt("FeeRequired"),qt("FeeTooHigh"),qt("PendingOperation"),qt("SyncError"),qt("PairingFailed"),qt("PeerRemovedPairing"),qt("GenuineCheckFailed"),qt("LedgerAPI4xx"),qt("LedgerAPI5xx"),qt("FirmwareOrAppUpdateRequired"),qt("ReplacementTransactionUnderpriced"),qt("OpReturnSizeLimit"),qt("DustLimit"),qt("LanguageNotFound"),qt("NoDBPathGiven"),qt("DBWrongPassword"),qt("DBNotReset");var QT;!function(t){t.Unknown="Unknown",t.LocationServicesDisabled="LocationServicesDisabled",t.LocationServicesUnauthorized="LocationServicesUnauthorized",t.BluetoothScanStartFailed="BluetoothScanStartFailed"}(QT||(QT={}));class XT extends Error{constructor(e,n){super(n),this.name="HwTransportError",this.type=e,Object.setPrototypeOf(this,XT.prototype)}}class El extends Error{constructor(e,n){const r="TransportError";super(e||r),this.name=r,this.message=e,this.stack=new Error(e).stack,this.id=n}}ZT("TransportError",t=>new El(t.message,t.id));const Kp={ACCESS_CONDITION_NOT_FULFILLED:38916,ALGORITHM_NOT_SUPPORTED:38020,CLA_NOT_SUPPORTED:28160,CODE_BLOCKED:38976,CODE_NOT_INITIALIZED:38914,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,CONDITIONS_OF_USE_NOT_SATISFIED:27013,CONTRADICTION_INVALIDATION:38928,CONTRADICTION_SECRET_CODE_STATUS:38920,CUSTOM_IMAGE_BOOTLOADER:26159,CUSTOM_IMAGE_EMPTY:26158,FILE_ALREADY_EXISTS:27273,FILE_NOT_FOUND:37892,GP_AUTH_FAILED:25344,HALTED:28586,INCONSISTENT_FILE:37896,INCORRECT_DATA:27264,INCORRECT_LENGTH:26368,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,DEVICE_NOT_ONBOARDED:27911,DEVICE_NOT_ONBOARDED_2:26129,INVALID_KCV:38021,INVALID_OFFSET:37890,LICENSING:28482,LOCKED_DEVICE:21781,MAX_VALUE_REACHED:38992,MEMORY_PROBLEM:37440,MISSING_CRITICAL_PARAMETER:26624,NO_EF_SELECTED:37888,NOT_ENOUGH_MEMORY_SPACE:27268,OK:36864,PIN_REMAINING_ATTEMPTS:25536,REFERENCED_DATA_NOT_FOUND:27272,SECURITY_STATUS_NOT_SATISFIED:27010,TECHNICAL_PROBLEM:28416,UNKNOWN_APDU:27906,USER_REFUSED_ON_DEVICE:21761,NOT_ENOUGH_SPACE:20738};class lw extends Error{constructor(e,{canBeMappedToChildError:n=!0}={}){const r=Object.keys(Kp).find(Y=>Kp[Y]===e)||"UNKNOWN_ERROR",u=function Lte(t){switch(t){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received";case 21781:return"Locked device"}if(28416<=t&&t<=28671)return"Internal error, please report"}(e)||r,O=`Ledger device: ${u} (0x${e.toString(16)})`;if(super(O),this.name="TransportStatusError",this.statusCode=e,this.statusText=r,n&&e===Kp.LOCKED_DEVICE)return new Fte(O)}}class Fte extends lw{constructor(e){super(Kp.LOCKED_DEVICE,{canBeMappedToChildError:!1}),e&&(this.message=e),this.name="LockedDeviceError"}}ZT("TransportStatusError",t=>new lw(t.statusCode));let qT=0;const kf=[],$T=(t,e,n)=>{const r={type:t,id:String(++qT),date:new Date};e&&(r.message=e),n&&(r.data=n),eO(r)};class Wm{constructor(e,n){this.type=e,this.context=n}trace(e,n){(({type:t,message:e,data:n,context:r})=>{const u={type:t,id:String(++qT),date:new Date};e&&(u.message=e),n&&(u.data=n),r&&(u.context=r),eO(u)})({type:this.type,message:e,data:n,context:this.context})}getContext(){return this.context}setContext(e){this.context=e}updateContext(e){this.context=Object.assign(Object.assign({},this.context),e)}getType(){return this.type}setType(e){this.type=e}withType(e){return new Wm(e,this.context)}withContext(e){return new Wm(this.type,e)}withUpdatedContext(e){return new Wm(this.type,Object.assign(Object.assign({},this.context),e))}}function eO(t){for(let e=0;e(kf.push(t),()=>{const e=kf.indexOf(t);-1!==e&&(kf[e]=kf[kf.length-1],kf.pop())}));var fw=function(t,e,n,r){return new(n||(n=Promise))(function(v,O){function Y(ue){try{ie(r.next(ue))}catch(he){O(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){O(he)}}function ie(ue){ue.done?v(ue.value):function u(v){return v instanceof n?v:new n(function(O){O(v)})}(ue.value).then(Y,$)}ie((r=r.apply(t,e||[])).next())})};class pS{constructor({context:e,logType:n}={}){this.exchangeTimeout=3e4,this.unresponsiveTimeout=15e3,this.deviceModel=null,this._events=new(Q2()),this.send=(r,u,v,O,Y=Buffer.alloc(0),$=[Kp.OK],{abortTimeoutMs:ie}={})=>fw(this,void 0,void 0,function*(){const ue=this.tracer.withUpdatedContext({function:"send"});if(Y.length>=256)throw ue.trace("data.length exceeded 256 bytes limit",{dataLength:Y.length}),new El("data.length exceed 256 bytes limit. Got: "+Y.length,"DataLengthTooBig");ue.trace("Starting an exchange",{abortTimeoutMs:ie});const he=yield this.exchange(Buffer.concat([Buffer.from([r,u,v,O]),Buffer.from([Y.length]),Y]),{abortTimeoutMs:ie});ue.trace("Received response from exchange");const we=he.readUInt16BE(he.length-2);if(!$.some(xe=>xe===we))throw new lw(we);return he}),this._appAPIlock=null,this.tracer=new Wm(n??"transport",e)}exchange(e,{abortTimeoutMs:n}={}){throw new Error("exchange not implemented")}exchangeBulk(e,n){let r=!1;return(()=>fw(this,void 0,void 0,function*(){if(!r)for(const O of e){const Y=yield this.exchange(O);if(r)return;const $=Y.readUInt16BE(Y.length-2);if($!==Kp.OK)throw new lw($);n.next(Y)}}))().then(()=>!r&&n.complete(),O=>!r&&n.error(O)),{unsubscribe:()=>{r=!0}}}setScrambleKey(e){}close(){return Promise.resolve()}on(e,n){this._events.on(e,n)}off(e,n){this._events.removeListener(e,n)}emit(e,...n){this._events.emit(e,...n)}setDebugMode(){console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.")}setExchangeTimeout(e){this.exchangeTimeout=e}setExchangeUnresponsiveTimeout(e){this.unresponsiveTimeout=e}static create(e=3e3,n){return new Promise((r,u)=>{let v=!1;const O=this.listen({next:$=>{v=!0,O&&O.unsubscribe(),Y&&clearTimeout(Y),this.open($.descriptor,e).then(r,u)},error:$=>{Y&&clearTimeout(Y),u($)},complete:()=>{Y&&clearTimeout(Y),v||u(new El(this.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),Y=n?setTimeout(()=>{O.unsubscribe(),u(new El(this.ErrorMessage_ListenTimeout,"ListenTimeout"))},n):null})}exchangeAtomicImpl(e){return fw(this,void 0,void 0,function*(){const n=this.tracer.withUpdatedContext({function:"exchangeAtomicImpl",unresponsiveTimeout:this.unresponsiveTimeout});if(this.exchangeBusyPromise)throw n.trace("Atomic exchange is already busy"),new kte("An action was already pending on the Ledger device. Please deny or reconnect.");let r;const u=new Promise(Y=>{r=Y});this.exchangeBusyPromise=u;let v=!1;const O=setTimeout(()=>{n.trace('Timeout reached, emitting Transport event "unresponsive"',{unresponsiveTimeout:this.unresponsiveTimeout}),v=!0,this.emit("unresponsive")},this.unresponsiveTimeout);try{const Y=yield e();return v&&(n.trace("Device was unresponsive, emitting responsive"),this.emit("responsive")),Y}finally{n.trace("Finalize, clearing busy guard"),clearTimeout(O),r&&r(),this.exchangeBusyPromise=null}})}decorateAppAPIMethods(e,n,r){for(const u of n)e[u]=this.decorateAppAPIMethod(u,e[u],e,r)}decorateAppAPIMethod(e,n,r,u){return(...v)=>fw(this,void 0,void 0,function*(){const{_appAPIlock:O}=this;if(O)return Promise.reject(new El("Ledger Device is busy (lock "+O+")","TransportLocked"));try{return this._appAPIlock=e,this.setScrambleKey(u),yield n.apply(r,v)}finally{this._appAPIlock=null}})}setTraceContext(e){this.tracer=this.tracer.withContext(e)}updateTraceContext(e){this.tracer.updateContext(e)}getTraceContext(){return this.tracer.getContext()}}pS.ErrorMessage_ListenTimeout="No Ledger device found (timeout)",pS.ErrorMessage_NoDeviceFound="No Ledger device found";const Kte=pS;function zte(t){const e=Buffer.alloc(2);return e.writeUInt16BE(t,0),e}const Vte={data:Buffer.alloc(0),dataLength:0,sequence:0};var Wte=p(97858),nO=p.n(Wte);var Uo;!function(t){t.blue="blue",t.nanoS="nanoS",t.nanoSP="nanoSP",t.nanoX="nanoX",t.stax="stax"}(Uo||(Uo={}));const dw={[Uo.blue]:{id:Uo.blue,productName:"Ledger\xa0Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:491520,masks:[822083584,822149120],getBlockSize:t=>4096},[Uo.nanoS]:{id:Uo.nanoS,productName:"Ledger\xa0Nano\xa0S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:327680,masks:[823132160],getBlockSize:t=>{var e;return nO().lt(null!==(e=nO().coerce(t))&&void 0!==e?e:"","2.0.0")?4096:2048}},[Uo.nanoSP]:{id:Uo.nanoSP,productName:"Ledger Nano S Plus",productIdMM:80,legacyUsbProductId:5,usbOnly:!0,memorySize:1572864,masks:[856686592],getBlockSize:t=>32},[Uo.nanoX]:{id:Uo.nanoX,productName:"Ledger\xa0Nano\xa0X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2097152,masks:[855638016],getBlockSize:t=>4096,bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]},[Uo.stax]:{id:Uo.stax,productName:"Ledger\xa0Stax",productIdMM:96,legacyUsbProductId:6,usbOnly:!1,memorySize:1572864,masks:[857735168],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]}},hw=(Uo.blue,Uo.nanoS,Uo.nanoSP,Uo.nanoX,Uo.stax,Object.values(dw)),rO=11415,iO=t=>{const e=hw.find(u=>u.legacyUsbProductId===t);if(e)return e;const n=t>>8;return hw.find(u=>u.productIdMM===n)},oO=[],gS={};for(const t in dw){const e=dw[t],{bluetoothSpec:n}=e;if(n)for(let r=0;r{const{hid:t}=navigator;if(!t)throw new El("navigator.hid is not supported","HIDNotSupported");return t};function sO(){return Sl(this,void 0,void 0,function*(){const t=yield pw().requestDevice({filters:Zte});return Array.isArray(t)?t:[t]})}function yS(){return Sl(this,void 0,void 0,function*(){return(yield pw().getDevices()).filter(e=>e.vendorId===rO)})}class Lf extends Kte{constructor(e){super(),this.channel=Math.floor(65535*Math.random()),this.packetSize=64,this.inputs=[],this.read=()=>this.inputs.length?Promise.resolve(this.inputs.shift()):new Promise(n=>{this.inputCallback=n}),this.onInputReport=n=>{const r=Buffer.from(n.data.buffer);this.inputCallback?(this.inputCallback(r),this.inputCallback=null):this.inputs.push(r)},this._disconnectEmitted=!1,this._emitDisconnect=n=>{this._disconnectEmitted||(this._disconnectEmitted=!0,this.emit("disconnect",n))},this.exchange=n=>Sl(this,void 0,void 0,function*(){return yield this.exchangeAtomicImpl(()=>Sl(this,void 0,void 0,function*(){const{channel:u,packetSize:v}=this;$T("apdu","=> "+n.toString("hex"));const O=((t,e)=>({makeBlocks(n){let r=Buffer.concat([zte(n.length),n]);const u=e-5,v=Math.ceil(r.length/u);r=Buffer.concat([r,Buffer.alloc(v*u-r.length+1).fill(0)]);const O=[];for(let Y=0;Yv&&(u=u.slice(0,v)),{data:u,dataLength:v,sequence:O}},getReducedResult(n){if(n&&n.dataLength===n.data.length)return n.data}}))(u,v),Y=O.makeBlocks(n);for(let ue=0;ue{throw u&&u.message&&u.message.includes("write")?(this._emitDisconnect(u),new Rte(u.message)):u})}),this.device=e,this.deviceModel="number"==typeof e.productId?iO(e.productId):void 0,e.addEventListener("inputreport",this.onInputReport)}static request(){return Sl(this,void 0,void 0,function*(){const[e]=yield sO();return Lf.open(e)})}static openConnected(){return Sl(this,void 0,void 0,function*(){const e=yield yS();return 0===e.length?null:Lf.open(e[0])})}static open(e){return Sl(this,void 0,void 0,function*(){yield e.open();const n=new Lf(e),r=u=>{e===u.device&&(pw().removeEventListener("disconnect",r),n._emitDisconnect(new Nte))};return pw().addEventListener("disconnect",r),n})}close(){return Sl(this,void 0,void 0,function*(){yield this.exchangeBusyPromise,this.device.removeEventListener("inputreport",this.onInputReport),yield this.device.close()})}setScrambleKey(){}}Lf.isSupported=()=>Promise.resolve(!(!window.navigator||!window.navigator.hid)),Lf.list=yS,Lf.listen=t=>{let e=!1;return function Jte(){return Sl(this,void 0,void 0,function*(){const t=yield yS();return t.length>0?t[0]:(yield sO())[0]})}().then(r=>{if(r){if(!e){const u="number"==typeof r.productId?iO(r.productId):void 0;t.next({type:"add",descriptor:r,deviceModel:u}),t.complete()}}else t.error(new JT("Access denied to use Ledger device"))},r=>{t.error(new JT(r.message))}),{unsubscribe:function n(){e=!0}}};const Qte=Lf;function aO(t){const e=t.split("/");return Buffer.concat(e.map(n=>n.endsWith("'")?2147483648|Math.abs(parseInt(n.slice(0,-1))):Math.abs(parseInt(n))).map(n=>Buffer.from([n>>24&255,n>>16&255,n>>8&255,255&n])))}const rne="W".charCodeAt(0),ine=()=>!!window.navigator?.hid;class one{constructor(){var e=this;this.transport=null,this.isConnected=()=>Boolean(this.transport),this.connect=(0,ke.Z)(function*(){e.transport=yield Qte.create();const n=()=>{e.transport?.off("disconnect",n),e.transport=null};e.transport.on("disconnect",n)}),this.disconnect=(0,ke.Z)(function*(){if(!e.transport)throw new Error("Device not connected");yield e.transport.close(),e.transport=null}),this.setScrambleKey=n=>{if(!this.transport)throw new Error("Device not connected");this.transport.setScrambleKey(n)},this.on=(n,r)=>{if(!this.transport)throw new Error("Device not connected");return this.transport.on(n,r),{remove:()=>this.transport?.off(n,r)}},this.off=(n,r)=>{if(!this.transport)throw new Error("Device not connected");this.transport.off(n,r)},this.getVersion=(0,ke.Z)(function*(){if(!e.transport)throw new Error("Device not connected");const n=yield e.transport.send(128,6,0,0),[r,u,v]=Array.from(n);return`${r}.${u}.${v}`}),this.getPublicKey=function(){var n=(0,ke.Z)(function*({derivationPath:r}){if(!e.transport)throw new Error("Device not connected");const u=yield e.transport.send(128,4,0,rne,aO(r));return Jn.utils.serialize.base_encode(u.subarray(0,-2))});return function(r){return n.apply(this,arguments)}}(),this.sign=function(){var n=(0,ke.Z)(function*({data:r,derivationPath:u}){if(!e.transport)throw new Error("Device not connected");yield e.getVersion();const O=Buffer.concat([aO(u),Buffer.from(r)]);for(let Y=0;Y=O.length,ie=yield e.transport.send(128,2,$?128:0,0,Buffer.from(O.subarray(Y,Y+123)));if($)return Buffer.from(ie.subarray(0,-2))}throw new Error("Invalid data or derivation path")});return function(r){return n.apply(this,arguments)}}()}}const sne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAQAAADTdEb+AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAFQkAABUJATOjLtcAAAAHd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1P9fab8nY/yx+jlboKwkmTKWxt6p5fywujFboZzrM062pWzOWFRISwqhEWFsKgQFhXCokJYVAiLCmFRsSthTTk7eoQkybkNXJHcCvPXCt/O+7PZTbmXG3k6evglHORGfs/R4CmmPMw/o3fFUs7ng+zNXoY6ys/5c9mX3M9BFrOPW7k4es1LmrbkcbJczK1jKjjI/tyGq/674eRdSj15E2+HFffbrpxjsWHCokJYVAiLCmFRISwqhEWFsKgQFhXCokJYVAiLCmFRISwqhEWFsKgQFhXCokJYVAiLCmFRISwqhEWFsKgQFhXCokJYVAiLCmFRISwqhEWFsKgQFhXCokJYVAiLCmFRISwqhEWFsKgQFhXCokJYVAiLCmFRISwqhEWFsKgQFhWrhzX6/spswspHedVb917NdyfoZuNncj/f58HoMZK8ls9z+QR9KM/n6mobrhrWXj4dveal/JXrWxHWy/kkb44eYhN25Rzr2egBtnCSql0Jiw0TFhXCokJYVAiLCmFRISwqhEWFsKgQFhXComI+rClnRw+3Rtuzlu2ZZB1rmeaemv93w518eWp2wpSHeTR6iCTJo3yTS1mMHmNNDnNn9AgAAAAAAAAAAAAAAAAAAAAAAIz0H5C/bp2MgRJCAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA4LTIyVDE3OjIwOjM2KzAwOjAwLb5rZQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wOC0yMlQxNzoyMDozNiswMDowMFzj09kAAAAASUVORK5CYII=",bS="accounts",ane=function(){var t=(0,ke.Z)(function*(e){const n=yield e.getItem(bS);return{client:new one,subscriptions:[],accounts:n||[]}});return function(n){return t.apply(this,arguments)}}(),une=function(){var t=(0,ke.Z)(function*({options:e,store:n,provider:r,logger:u,storage:v,metadata:O}){const Y=yield ane(v),$={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(Le=(0,ke.Z)(function*(je){const Ue=Y.accounts.find($e=>$e.accountId===je);if(!Ue)throw new Error("Failed to find public key for account");return Jn.utils.PublicKey.from(Ue.publicKey)}),function(Ue){return Le.apply(this,arguments)}),signMessage:function(){var Le=(0,ke.Z)(function*(je,Ue){const $e=Y.accounts.find(ht=>ht.accountId===Ue);if(!$e)throw new Error("Failed to find account for signing");return{signature:yield Y.client.sign({data:je,derivationPath:$e.derivationPath}),publicKey:Jn.utils.PublicKey.from($e.publicKey)}});return function(Ue,$e){return Le.apply(this,arguments)}}()},ie=()=>Y.accounts.map(Le=>({accountId:Le.accountId,publicKey:"ed25519:"+Le.publicKey})),he=function(){var Le=(0,ke.Z)(function*(){Y.client.isConnected()&&(yield Y.client.disconnect().catch(je=>{u.log("Failed to disconnect device"),u.error(je)})),Y.subscriptions.forEach(Le=>Le.remove()),Y.subscriptions=[],Y.accounts=[],v.removeItem(bS)});return function(){return Le.apply(this,arguments)}}(),we=function(){var Le=(0,ke.Z)(function*(){Y.client.isConnected()||(yield Y.client.connect())});return function(){return Le.apply(this,arguments)}}(),xe=({accountId:Le,publicKey:je})=>(u.log("validateAccessKey",{accountId:Le,publicKey:je}),r.viewAccessKey({accountId:Le,publicKey:je}).then(Ue=>{if(u.log("validateAccessKey:accessKey",{accessKey:Ue}),"FullAccess"!==Ue.permission)throw new Error("Public key requires 'FullAccess' permission");return Ue},Ue=>{if("AccessKeyDoesNotExist"===Ue.type)return null;throw Ue})),Ce=Le=>{const{contract:je}=n.getState();if(!je)throw new Error("Wallet not signed in");const Ue=Df(n.getState());if(!Ue)throw new Error("No active account");return Le.map($e=>({signerId:$e.signerId||Ue.accountId,receiverId:$e.receiverId||je.contractId,actions:$e.actions}))};var Le;return{signIn:({accounts:Le})=>(0,ke.Z)(function*(){const je=ie();if(je.length)return je;const Ue=[];for(let $e=0;$e(0,ke.Z)(function*(){return ie()})(),verifyOwner:({message:Le})=>(0,ke.Z)(function*(){throw u.log("Ledger:verifyOwner",{message:Le}),new Error(`Method not supported by ${O.name}`)})(),signAndSendTransaction:({signerId:Le,receiverId:je,actions:Ue})=>(0,ke.Z)(function*(){if(u.log("signAndSendTransaction",{signerId:Le,receiverId:je,actions:Ue}),!Y.accounts.length)throw new Error("Wallet not signed in");yield we();const $e=yield dc(Ce([{signerId:Le,receiverId:je,actions:Ue}]),$,e.network);return r.sendTransaction($e[0])})(),signAndSendTransactions:({transactions:Le})=>(0,ke.Z)(function*(){if(u.log("signAndSendTransactions",{transactions:Le}),!Y.accounts.length)throw new Error("Wallet not signed in");yield we();const je=yield dc(Ce(Le),$,e.network),Ue=[];for(let $e=0;$e(0,ke.Z)(function*(){return yield we(),yield Y.client.getPublicKey({derivationPath:Le})})()}});return function(n){return t.apply(this,arguments)}}();function uO({iconUrl:t=sne,deprecated:e=!1}={}){return(0,ke.Z)(function*(){const n=(0,Wa.isMobile)(),r=ine();return n?null:{id:"ledger",type:"hardware",metadata:{name:"Ledger",description:"Protect crypto assets with the most popular hardware wallet.",iconUrl:t,deprecated:e,available:r},init:une}})}var cne=p(96105);const lne=function(){var t=(0,ke.Z)(function*(e){const{store:n,options:r,logger:u,dAppMetadata:v}=e,O=new cne.NearMobileWallet({network:r.network.networkId,nodeUrl:r.network.nodeUrl,metadata:v});function Y(){return $.apply(this,arguments)}function $(){return($=(0,ke.Z)(function*(){u.log("[NearMobileWallet]:getAccounts");const ie=yield O.getAccounts(),ue=[];for(let he=0;he(0,ke.Z)(function*(){u.log("[NearMobileWallet]: signIn");const ue=""!==ie.contractId?ie.contractId:void 0;return yield O.signIn({...ie,contractId:ue}),yield Y()})(),signOut:()=>(0,ke.Z)(function*(){u.log("[NearMobileWallet]: signOut"),yield O.signOut()})(),getAccounts:()=>(0,ke.Z)(function*(){return Y()})(),signAndSendTransaction:ie=>(0,ke.Z)(function*(){u.log("[NearMobileWallet]: signAndSendTransaction",ie);const{contract:ue}=n.getState();if(!ue)throw new Error("Wallet not signed in");return yield O.signAndSendTransaction({receiverId:ue.contractId,...ie})})(),verifyOwner:()=>(0,ke.Z)(function*(){throw Error("[NearMobileWallet]: verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})(),signMessage:ie=>(0,ke.Z)(function*(){const{recipient:ue,nonce:he,...we}=ie;u.log("[NearMobileWallet]: signMessage",ie);const xe=yield O.signMessage({...we,receiver:ue,nonce:Array.from(he)});return{accountId:xe.accountId,signature:xe.signature.toString(),publicKey:xe.publicKey.toString()}})(),signAndSendTransactions:ie=>(0,ke.Z)(function*(){return u.log("[NearMobileWallet]: signAndSendTransactions",ie),yield O.signAndSendTransactions(ie)})()}});return function(n){return t.apply(this,arguments)}}(),fne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADkeSURBVHgB7X0JvCVFfe7Xfc/d5m5z7519hp1h34ZlAFFQUFxCgJBIRH68SCIkRn2aiEZ88Rfz3i/PLCpGxReigD7WgEbjhqADijDMALMAszIzDAPMPnfuvt9zOlV9Tp9TXV3Vp8853dXdZ+r7Mdyurn//q7q7vvp/VdXdx0AFuO7FTQtnGo0rDcu4Aoa5DLCOhYUWaCQLFrttwAhia//NWxoeH/wxpni/8DjDs1/u3xD6MGT+pX7IMazPAMcY5Wy5/QZMaZ7cv5+tIam/6BiDtRsmd3g7kFsHy3p82ppa8ej1JwwiIIwgRlev37bMMLK30U1ySDs0kguuQZVveHA3KE8ef5ybpEY5Oy5P7N+Q1EtEfrltsYwKyZ+3DEp+w11Gtdc1qK3fdS3kc/fgIPn3UIPV8PX7rl+wE2Xg2wFcvXbLImSMfyIn+0GSbIZGslFsNEwkZ/eL0mGQ38dn0slviFQHm+bI7x+Z2e2g5K8u8jv5sntsWcYIyfxm61Djl+/5s7nDkEDaAVyzftt7YeTuJpuLoZF8BCW/wLZor8nvTvPkl+YhCZFfbGvhJcMwb3rg+gWvQADTs4d0Hde8/OqfE/L/FzT50wG24aNM5A+T/BZSS/6yaY788jwkk/yle3O2ZeWevOGRPe+DAB4FcM16Qn5Y3yI5GWgkH0ei7OfqqGU/Z8vvz5cxYubMa+778IInXfvZx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ZznTeRG2/Ig9eSHn/+QIr+njDjJ790Pqf8ayQ/ZMbVFfqHPqGS/yEbovw7Ib+HNBjRdw5KfwuTtHrp+0S9h5a4lBxxIPfmlN0vLfmG+JfKvH/IR+ksXNs8Y1hXf+Iaxjc8wRdYP3LBkhTFjXUrOeKW9I23ktyBpzG5bd71E/n1kf5zkB+8/eDTXs/0GxJ0X6pH8OfLvUSr77/pGyzaRgSk78v6bFm893LXwcnLit5HkgWJG0skPP/8hRX5PGVr2V0t+qU89218rdjQ04Ia5PU0f4mU/CwMBcPMje+dOzeBmciH+hCRPMoofE02B7Jc0vtTKfpf/kCN/DdfftacC8iuL/EfGhN8U+beOPuTT2tz4H1/5ijFa7oBAHYCDd37pqczRJ51+ZjY3c5lpmBfkYBxnWFaXtEHlJL2vCExDMf0aX87ZMF15BnyOQZlomhPYMvmG9Fjx5TOyknIQYL9f4yvUs8HOMwP6s2sktsuJHNQo+2XHUWQltkEJzSMrFbD2OZhsaQGuv11yLl3kp6/0wjC3k8u2aiZrPbtoTtOrX/qSkQt6/H8DRMdL1OqM1CwAAAAASUVORK5CYII=";function cO({dAppMetadata:t}={}){return(0,ke.Z)(function*(){return{id:"near-mobile-wallet",type:"injected",metadata:{iconUrl:fne,name:"Near Mobile Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!1,downloadUrl:"https://nearmobile.app/",deprecated:!1,available:!0},init:e=>lne({...e,dAppMetadata:t})}})}var lO=p(73597);const fO="guest-book.testnet";function hne(t,e){return t===e}class Gm{}Gm.\u0275fac=function(e){return new(e||Gm)},Gm.\u0275cmp=Ho({type:Gm,selectors:[["near-wallet-selector-sign-in"]],decls:6,vars:0,template:function(e,n){1&e&&(ui(0,"p"),_i(1," This app demonstrates a key element of NEAR\u2019s UX: once an app has permission to make calls on behalf of a user (that is, once a user signs in), the app can make calls to the blockchain for them without prompting extra confirmation. So you\u2019ll see that if you don\u2019t include a donation, your message gets posted right to the guest book.\n"),Hr(),ui(2,"p"),_i(3," But if you do add a donation, then NEAR will double-check that you\u2019re ok with sending money to this app.\n"),Hr(),ui(4,"p"),_i(5,"Go ahead and sign in to try it out!"),Hr())}});const pne=function(t){return{"is-premium":t}};function gne(t,e){if(1&t&&(ui(0,"p",1)(1,"strong"),_i(2),Hr(),_i(3,":"),Hs(4,"br"),_i(5),Hr()),2&t){const n=e.$implicit;Eo("ngClass",TM(3,pne,n.premium)),Jo(2),A1(n.sender),Jo(3),j0(" ",n.text,"\n")}}class Zm{}Zm.\u0275fac=function(e){return new(e||Zm)},Zm.\u0275cmp=Ho({type:Zm,selectors:[["near-wallet-selector-messages"]],inputs:{messages:"messages"},decls:3,vars:1,consts:[[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(e,n){1&e&&(ui(0,"h2"),_i(1,"Messages"),Hr(),Fa(2,gne,6,5,"p",0)),2&e&&(Jo(2),Eo("ngForOf",n.messages))},dependencies:[Q0,X0]});var yne=20,mne=1,ph=1e6,vne=-7,bne=21,wne=!1,Ym="[big.js] ",gh=Ym+"Invalid ",gw=gh+"decimal places",Ane=gh+"rounding mode",hO=Ym+"Division by zero",Xr={},mc=void 0,Ene=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function yh(t,e,n,r){var u=t.c;if(n===mc&&(n=t.constructor.RM),0!==n&&1!==n&&2!==n&&3!==n)throw Error(Ane);if(e<1)r=3===n&&(r||!!u[0])||0===e&&(1===n&&u[0]>=5||2===n&&(u[0]>5||5===u[0]&&(r||u[1]!==mc))),u.length=1,r?(t.e=t.e-e+1,u[0]=1):u[0]=t.e=0;else if(e=5||2===n&&(u[e]>5||5===u[e]&&(r||u[e+1]!==mc||1&u[e-1]))||3===n&&(r||!!u[0]),u.length=e,r)for(;++u[--e]>9;)if(u[e]=0,0===e){++t.e,u.unshift(1);break}for(e=u.length;!u[--e];)u.pop()}return t}function zp(t,e,n){var r=t.e,u=t.c.join(""),v=u.length;if(e)u=u.charAt(0)+(v>1?"."+u.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)u="0"+u;u="0."+u}else if(r>0)if(++r>v)for(r-=v;r--;)u+="0";else r1&&(u=u.charAt(0)+"."+u.slice(1));return t.s<0&&n?"-"+u:u}Xr.abs=function(){var t=new this.constructor(this);return t.s=1,t},Xr.cmp=function(t){var e,n=this,r=n.c,u=(t=new n.constructor(t)).c,v=n.s,O=t.s,Y=n.e,$=t.e;if(!r[0]||!u[0])return r[0]?v:u[0]?-O:0;if(v!=O)return v;if(e=v<0,Y!=$)return Y>$^e?1:-1;for(O=(Y=r.length)<($=u.length)?Y:$,v=-1;++vu[v]^e?1:-1;return Y==$?0:Y>$^e?1:-1},Xr.div=function(t){var e=this,n=e.constructor,r=e.c,u=(t=new n(t)).c,v=e.s==t.s?1:-1,O=n.DP;if(O!==~~O||O<0||O>ph)throw Error(gw);if(!u[0])throw Error(hO);if(!r[0])return t.s=v,t.c=[t.e=0],t;var Y,$,ie,ue,he,we=u.slice(),xe=Y=u.length,Ce=r.length,Le=r.slice(0,Y),je=Le.length,Ue=t,$e=Ue.c=[],Je=0,ht=O+(Ue.e=e.e-t.e)+1;for(Ue.s=v,v=ht<0?0:ht,we.unshift(0);je++je?1:-1;else for(he=-1,ue=0;++heLe[he]?1:-1;break}if(!(ue<0))break;for($=je==Y?u:we;je;){if(Le[--je]<$[je]){for(he=je;he&&!Le[--he];)Le[he]=9;--Le[he],Le[je]+=10}Le[je]-=$[je]}for(;!Le[0];)Le.shift()}$e[Je++]=ue?ie:++ie,Le[0]&&ue?Le[je]=r[xe]||0:Le=[r[xe]]}while((xe++ht&&yh(Ue,ht,n.RM,Le[0]!==mc),Ue},Xr.eq=function(t){return 0===this.cmp(t)},Xr.gt=function(t){return this.cmp(t)>0},Xr.gte=function(t){return this.cmp(t)>-1},Xr.lt=function(t){return this.cmp(t)<0},Xr.lte=function(t){return this.cmp(t)<1},Xr.minus=Xr.sub=function(t){var e,n,r,u,v=this,O=v.constructor,Y=v.s,$=(t=new O(t)).s;if(Y!=$)return t.s=-$,v.plus(t);var ie=v.c.slice(),ue=v.e,he=t.c,we=t.e;if(!ie[0]||!he[0])return he[0]?t.s=-$:ie[0]?t=new O(v):t.s=1,t;if(Y=ue-we){for((u=Y<0)?(Y=-Y,r=ie):(we=ue,r=he),r.reverse(),$=Y;$--;)r.push(0);r.reverse()}else for(n=((u=ie.length0)for(;$--;)ie[e++]=0;for($=e;n>Y;){if(ie[--n]0?($=O,r=ie):(e=-e,r=Y),r.reverse();e--;)r.push(0);r.reverse()}for(Y.length-ie.length<0&&(r=ie,ie=Y,Y=r),e=ie.length,n=0;e;Y[e]%=10)n=(Y[--e]=Y[e]+ie[e]+n)/10|0;for(n&&(Y.unshift(n),++$),e=Y.length;0===Y[--e];)Y.pop();return t.c=Y,t.e=$,t},Xr.pow=function(t){var e=this,n=new e.constructor("1"),r=n,u=t<0;if(t!==~~t||t<-1e6||t>1e6)throw Error(gh+"exponent");for(u&&(t=-t);1&t&&(r=r.times(e)),t>>=1;)e=e.times(e);return u?n.div(r):r},Xr.prec=function(t,e){if(t!==~~t||t<1||t>ph)throw Error(gh+"precision");return yh(new this.constructor(this),t,e)},Xr.round=function(t,e){if(t===mc)t=0;else if(t!==~~t||t<-ph||t>ph)throw Error(gw);return yh(new this.constructor(this),t+this.e+1,e)},Xr.sqrt=function(){var t,e,n,r=this,u=r.constructor,v=r.s,O=r.e,Y=new u("0.5");if(!r.c[0])return new u(r);if(v<0)throw Error(Ym+"No square root");0===(v=Math.sqrt(r+""))||v===1/0?((e=r.c.join("")).length+O&1||(e+="0"),O=((O+1)/2|0)-(O<0||1&O),t=new u(((v=Math.sqrt(e))==1/0?"5e":(v=v.toExponential()).slice(0,v.indexOf("e")+1))+O)):t=new u(v+""),O=t.e+(u.DP+=4);do{n=t,t=Y.times(n.plus(r.div(n)))}while(n.c.slice(0,O).join("")!==t.c.slice(0,O).join(""));return yh(t,(u.DP-=4)+t.e+1,u.RM)},Xr.times=Xr.mul=function(t){var e,n=this,r=n.constructor,u=n.c,v=(t=new r(t)).c,O=u.length,Y=v.length,$=n.e,ie=t.e;if(t.s=n.s==t.s?1:-1,!u[0]||!v[0])return t.c=[t.e=0],t;for(t.e=$+ie,O$;)Y=e[ie]+v[$]*u[ie-$-1]+Y,e[ie--]=Y%10,Y=Y/10|0;e[ie]=Y}for(Y?++t.e:e.shift(),$=e.length;!e[--$];)e.pop();return t.c=e,t},Xr.toExponential=function(t,e){var n=this,r=n.c[0];if(t!==mc){if(t!==~~t||t<0||t>ph)throw Error(gw);for(n=yh(new n.constructor(n),++t,e);n.c.lengthph)throw Error(gw);for(t=t+(n=yh(new n.constructor(n),t+n.e+1,e)).e+1;n.c.length=e.PE,!!t.c[0])},Xr.toNumber=function(){var t=Number(zp(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(t.toString()))throw Error(Ym+"Imprecise conversion");return t},Xr.toPrecision=function(t,e){var n=this,r=n.constructor,u=n.c[0];if(t!==mc){if(t!==~~t||t<1||t>ph)throw Error(gh+"precision");for(n=yh(new r(n),t,e);n.c.length=r.PE,!!u)},Xr.valueOf=function(){var t=this,e=t.constructor;if(!0===e.strict)throw Error(Ym+"valueOf disallowed");return zp(t,t.e<=e.NE||t.e>=e.PE,!0)};var _ne=function pO(){function t(e){var n=this;if(!(n instanceof t))return e===mc?pO():new t(e);if(e instanceof t)n.s=e.s,n.e=e.e,n.c=e.c.slice();else{if("string"!=typeof e){if(!0===t.strict&&"bigint"!=typeof e)throw TypeError(gh+"value");e=0===e&&1/e<0?"-0":String(e)}!function Sne(t,e){var n,r,u;if(!Ene.test(e))throw Error(gh+"number");for(t.s="-"==e.charAt(0)?(e=e.slice(1),-1):1,(n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),u=e.length,r=0;r0&&"0"==e.charAt(--u););for(t.e=n-r-1,t.c=[],n=0;r<=u;)t.c[n++]=+e.charAt(r++)}return t}(n,e)}n.constructor=t}return t.prototype=Xr,t.DP=yne,t.RM=mne,t.NE=vne,t.PE=bne,t.strict=wne,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}();const Mne=_ne;class Jm{constructor(){this.addMessage=new So}ngOnInit(){this.maxValue=Mne(this.account.amount).div(10**24).toString()}onSubmit(e){this.addMessage.emit(e)}}function Dne(t,e){if(1&t){const n=gy();ui(0,"button",1),Qi("click",function(){Li(n);return Po(Ba(2).switchAccount())}),_i(1," Switch Account "),Hr()}}function Ine(t,e){if(1&t&&Hs(0,"near-wallet-selector-messages",5),2&t){Eo("messages",Ba(2).messages)}}function Cne(t,e){if(1&t){const n=gy();hy(0),ui(1,"div")(2,"button",1),Qi("click",function(){Li(n);return Po(Ba().signOut())}),_i(3,"Log out"),Hr(),ui(4,"button",1),Qi("click",function(){Li(n);return Po(Ba().switchWallet())}),_i(5,"Switch Wallet"),Hr(),ui(6,"button",1),Qi("click",function(){Li(n);return Po(Ba().onVerifyOwner())}),_i(7,"Verify Owner"),Hr(),ui(8,"button",1),Qi("click",function(){Li(n);return Po(Ba().onSignMessage())}),_i(9,"Sign Message"),Hr(),Fa(10,Dne,2,0,"button",2),Hr(),ui(11,"near-wallet-selector-form",3),Qi("addMessage",function(u){Li(n);return Po(Ba().onSubmit(u))}),Hr(),Fa(12,Ine,1,1,"near-wallet-selector-messages",4),py()}if(2&t){const n=Ba();Jo(10),Eo("ngIf",n.accounts.length>1),Jo(1),Eo("account",n.account),Jo(1),Eo("ngIf",!!n.messages.length)}}function xne(t,e){if(1&t){const n=gy();hy(0),ui(1,"button",1),Qi("click",function(){Li(n);return Po(Ba().signIn())}),_i(2,"Log In"),Hr(),Hs(3,"near-wallet-selector-sign-in"),py()}}Jm.\u0275fac=function(e){return new(e||Jm)},Jm.\u0275cmp=Ho({type:Jm,selectors:[["near-wallet-selector-form"]],inputs:{account:"account"},outputs:{addMessage:"addMessage"},decls:20,vars:3,consts:[[3,"ngSubmit"],["id","fieldset"],[1,"highlight"],["for","message"],["autoComplete","off","autoFocus","","id","message","required",""],["for","donation"],["autocomplete","off","id","donation","min","0","step","0.01","type","number",3,"defaultValue","max"],["title","NEAR Tokens"],["htmlFor","multiple"],["id","multiple","type","checkbox"],["type","submit"]],template:function(e,n){1&e&&(ui(0,"form",0),Qi("ngSubmit",function(u){return n.onSubmit(u)}),ui(1,"fieldset",1)(2,"p"),_i(3),Hr(),ui(4,"p",2)(5,"label",3),_i(6,"Message:"),Hr(),Hs(7,"input",4),Hr(),ui(8,"p")(9,"label",5),_i(10,"Donation (optional):"),Hr(),Hs(11,"input",6),ui(12,"span",7),_i(13,"\u24c3"),Hr()(),ui(14,"p")(15,"label",8),_i(16,"Multiple Transactions:"),Hr(),Hs(17,"input",9),Hr(),ui(18,"button",10),_i(19,"Sign"),Hr()()()),2&e&&(Jo(3),j0("Sign the guest book, ",n.account.account_id,"!"),Jo(8),_A("max",n.maxValue),Eo("defaultValue","0"))},dependencies:[fp,up,wf]});const gO=Jn.utils.format.parseNearAmount("0.00000000003");class Qm{ngOnInit(){var e=this;return(0,ke.Z)(function*(){const[n,r]=yield Promise.all([e.getMessages(),e.getAccount()]);e.account=r,e.messages=n,e.subscribeToEvents(),yield e.verifyMessageBrowserWallet()})()}getAccountBalance({provider:e,accountId:n}){return(0,ke.Z)(function*(){try{const{amount:r}=yield e.query({request_type:"view_account",finality:"final",account_id:n});return{hasBalance:!new(fr())(r).isZero()}}catch{return{hasBalance:!1}}})()}getAccount(){var e=this;return(0,ke.Z)(function*(){if(!e.accountId)return null;const{network:n}=e.selector.options,r=new Jn.providers.JsonRpcProvider({url:n.nodeUrl}),{hasBalance:u}=yield e.getAccountBalance({provider:r,accountId:e.accountId});return u?r.query({request_type:"view_account",finality:"final",account_id:e.accountId}).then(v=>({...v,account_id:e.accountId})):(window.alert(`Account ID: ${e.accountId} has not been founded. Please send some NEAR into this account.`),yield(yield e.selector.wallet()).signOut(),null)})()}signIn(){this.modal.show()}signOut(){var e=this;return(0,ke.Z)(function*(){(yield e.selector.wallet()).signOut().catch(r=>{console.log("Failed to sign out"),console.error(r)})})()}switchWallet(){this.modal.show()}getMessages(){const{network:e}=this.selector.options;return new Jn.providers.JsonRpcProvider({url:e.nodeUrl}).query({request_type:"call_function",account_id:fO,method_name:"getMessages",args_base64:"",finality:"optimistic"}).then(r=>JSON.parse(Buffer.from(r.result).toString()))}switchAccount(){const e=this.accounts.findIndex(u=>u.accountId===this.accountId),n=e{const O=new tE({message:n,nonce:r,recipient:u,callbackUrl:v}),Y=(0,M8.serialize)(D8,O),$=Uint8Array.from(Cj.sha256.array(Y)),ie=Buffer.from(e,"base64");return Jn.utils.PublicKey.from(t).verify($,ie)})({message:e.message,nonce:e.nonce,recipient:e.recipient,publicKey:n.publicKey,signature:n.signature,callbackUrl:e.callbackUrl}),Y=(yield Pj({publicKey:n.publicKey,accountId:n.accountId,network:r.selector.options.network}))&&u?"Successfully verified":"Failed to verify";alert(`${Y} signed message: '${e.message}': \n ${JSON.stringify(n)}`)})()}verifyMessageBrowserWallet(){var e=this;return(0,ke.Z)(function*(){const n=new URLSearchParams(window.location.hash.substring(1)),r=n.get("accountId"),u=n.get("publicKey"),v=n.get("signature");if(!r&&!u&&!v)return;const O=JSON.parse(localStorage.getItem("message")),Y={accountId:r,publicKey:u,signature:v};yield e.verifyMessage(O,Y);const $=new URL(location.href);$.hash="",$.search="",window.history.replaceState({},document.title,$),localStorage.removeItem("message")})()}onSignMessage(){var e=this;return(0,ke.Z)(function*(){const n=yield e.selector.wallet(),r="test message to sign",u=Buffer.from(crypto.getRandomValues(new Uint8Array(32))),v="guest-book.testnet";"browser"===n.type&&localStorage.setItem("message",JSON.stringify({message:r,nonce:[...u],recipient:v,callbackUrl:location.href}));try{const O=yield n.signMessage({message:r,nonce:u,recipient:v});O&&(yield e.verifyMessage({message:r,nonce:u,recipient:v},O))}catch(O){const Y=O instanceof Error?O.message:"Something went wrong";alert(Y)}})()}subscribeToEvents(){this.subscription=this.selector.store.observable.pipe(Sn(e=>e.accounts),function dne(t,e=ft){return t=t??hne,mn((n,r)=>{let u,v=!0;n.subscribe(ut(r,O=>{const Y=e(O);(v||!t(u,Y))&&(v=!1,u=Y,r.next(O))}))})}()).subscribe(e=>{console.log("Accounts Update",e),this.accounts=e,this.accountId=e.find(n=>n.active)?.accountId||null,this.getAccount().then(n=>{this.account=n})}),this.modal.on("onHide",({hideReason:e})=>{console.log(`The reason for hiding the modal ${e}`)})}addMessages(e,n,r){var u=this;return(0,ke.Z)(function*(){const{contract:v}=u.selector.store.getState(),O=yield u.selector.wallet();if(!r)return O.signAndSendTransaction({signerId:u.accountId,actions:[{type:"FunctionCall",params:{methodName:"addMessage",args:{text:e},gas:gO,deposit:Jn.utils.format.parseNearAmount(n)}}]}).catch($=>{throw alert("Failed to add message"),console.log("Failed to add message"),$});const Y=[];for(let $=0;$<2;$+=1)Y.push({signerId:u.accountId,receiverId:v.contractId,actions:[{type:"FunctionCall",params:{methodName:"addMessage",args:{text:`${e} (${$+1}/2)`},gas:gO,deposit:Jn.utils.format.parseNearAmount(n)}}]});return O.signAndSendTransactions({transactions:Y}).catch($=>{throw alert("Failed to add messages"),console.log("Failed to add messages"),$})})()}onSubmit(e){var n=this;return(0,ke.Z)(function*(){const{fieldset:r,message:u,donation:v,multiple:O}=e.target.elements;r.disabled=!0,n.addMessages(u.value,v.value||"0",O.checked).then(()=>n.getMessages().then(Y=>{n.messages=Y,u.value="",v.value="0",r.disabled=!1,O.checked=!1,u.focus()}).catch(Y=>{throw alert("Failed to refresh messages"),console.log("Failed to refresh messages"),Y})).catch(Y=>{console.error(Y),r.disabled=!1})})()}ngOnDestroy(){this.subscription?.unsubscribe()}}Qm.\u0275fac=function(e){return new(e||Qm)},Qm.\u0275cmp=Ho({type:Qm,selectors:[["near-wallet-selector-content"]],inputs:{selector:"selector",modal:"modal",accounts:"accounts",accountId:"accountId"},decls:2,vars:2,consts:[[4,"ngIf"],[3,"click"],[3,"click",4,"ngIf"],[3,"account","addMessage"],[3,"messages",4,"ngIf"],[3,"messages"]],template:function(e,n){1&e&&(Fa(0,Cne,13,3,"ng-container",0),Fa(1,xne,4,0,"ng-container",0)),2&e&&(Eo("ngIf",n.account),Jo(1),Eo("ngIf",!n.accountId))},dependencies:[ll,Gm,Zm,Jm]});class Vp{}function One(t,e){1&t&&Hs(0,"near-wallet-selector-loading")}function Pne(t,e){if(1&t&&Hs(0,"near-wallet-selector-content",2),2&t){const n=Ba();Eo("selector",n.selector)("accounts",n.accounts)("accountId",n.accountId)("modal",n.modal)}}Vp.\u0275fac=function(e){return new(e||Vp)},Vp.\u0275cmp=Ho({type:Vp,selectors:[["near-wallet-selector-loading"]],decls:5,vars:0,consts:[[1,"lds-ellipsis"]],template:function(e,n){1&e&&(ui(0,"div",0),Hs(1,"div")(2,"div")(3,"div")(4,"div"),Hr())},styles:[".lds-ellipsis[_ngcontent-%COMP%]{position:relative;width:80px;height:80px;margin:auto}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--fg);animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){left:8px;animation:_ngcontent-%COMP%_lds-ellipsis1 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){left:8px;animation:_ngcontent-%COMP%_lds-ellipsis2 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){left:32px;animation:_ngcontent-%COMP%_lds-ellipsis2 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){left:56px;animation:_ngcontent-%COMP%_lds-ellipsis3 .6s infinite}@keyframes _ngcontent-%COMP%_lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes _ngcontent-%COMP%_lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes _ngcontent-%COMP%_lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}"]});class Xm{constructor(){this.accounts=[]}ngOnInit(){var e=this;return(0,ke.Z)(function*(){yield e.initialize().catch(n=>{console.error(n),alert("Failed to initialise wallet selector")})})()}initialize(){var e=this;return(0,ke.Z)(function*(){const n=yield E8({network:"testnet",debug:!0,modules:[RT(),uO(),z8(),V8(),H8(),W8(),G8(),Z8(),J8(),Q8(),X8(),q8(),$8(),aK(),NI({bundle:!1}),PT({projectId:"c8cb6204543639c31aef44ea4837a554",methods:["near_signIn","near_signOut","near_getAccounts","near_signTransaction","near_signTransactions"],metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"]}}),HT(),cO(),(0,lO.h)()]}),r=lU(n,{contractId:fO}),u=n.store.getState();e.accounts=u.accounts,e.accountId=u.accounts.find(v=>v.active)?.accountId||null,window.selector=n,window.modal=r,e.selector=n,e.modal=r})()}}Xm.\u0275fac=function(e){return new(e||Xm)},Xm.\u0275cmp=Ho({type:Xm,selectors:[["near-wallet-selector-wallet-selector"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"selector","accounts","accountId","modal",4,"ngIf"],[3,"selector","accounts","accountId","modal"]],template:function(e,n){1&e&&(Fa(0,One,1,0,"near-wallet-selector-loading",0),Fa(1,Pne,1,4,"near-wallet-selector-content",1)),2&e&&(Eo("ngIf",!n.modal||!n.selector),Jo(1),Eo("ngIf",!!n.selector))},dependencies:[ll,Qm,Vp]});var Tt=p(18348),Nne=p(49965),Jr=p(54284);const Rne=({selector:t,handleWalletClick:e})=>{const[n,r]=(0,Jr.useState)([]),[u,v]=(0,Jr.useState)("");function O(Y){return Y.reduce(($,ie,ue)=>{const{selectedWalletId:he}=t.store.getState(),{name:we,iconUrl:xe,deprecated:Ce}=ie.metadata,Le=ie.id===he;return $.push((0,Tt.jsxs)("li",{tabIndex:0,className:`single-wallet ${u===ie.id?"selected-wallet":""} ${Le?"connected-wallet":""} ${Ce?"deprecated-wallet":""} sidebar ${ie.id}`,onClick:()=>(ie.id===Y[ue].id&&v(ie.id),e(ie)),children:[(0,Tt.jsx)("div",{className:"icon",children:(0,Tt.jsx)("img",{src:xe,alt:we})}),(0,Tt.jsxs)("div",{className:"import-content",children:[(0,Tt.jsx)("div",{className:"title",children:we}),(0,Tt.jsx)("div",{className:"import-type",children:Dn(`modal.exportAccounts.walletTypes.${ie.type}`)})]}),Ce&&(0,Tt.jsx)("div",{className:"warning-triangle",children:(0,Tt.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Tt.jsx)("path",{d:"M4.95215 16.3536L10.2152 5.85657C10.9531 4.38481 13.0538 4.38519 13.7912 5.85723L19.0494 16.3543C19.7156 17.6841 18.7486 19.25 17.2612 19.25H6.74001C5.25228 19.25 4.28535 17.6835 4.95215 16.3536Z",stroke:"#E6B73E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Tt.jsx)("path",{d:"M12 10V12",stroke:"#E6B73E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Tt.jsx)("path",{d:"M12.5 16C12.5 16.2761 12.2761 16.5 12 16.5C11.7239 16.5 11.5 16.2761 11.5 16C11.5 15.7239 11.7239 15.5 12 15.5C12.2761 15.5 12.5 15.7239 12.5 16Z",stroke:"#E6B73E"})]})})]},ie.id)),$},[])}return(0,Jr.useEffect)(()=>{const Y=t.store.observable.subscribe($=>{r($.modules)});return()=>Y.unsubscribe()},[]),(0,Tt.jsx)("div",{children:t.options.optimizeWalletOrder&&t.store.getState().recentlySignedInWallets.length>0?(0,Tt.jsx)("div",{className:"wallet-options-wrapper",children:(0,Tt.jsx)("div",{className:"options-list-section",children:(0,Tt.jsx)("div",{className:"options-list more-options-list-content",children:O(n)})})}):(0,Tt.jsx)("div",{className:"wallet-options-wrapper",children:(0,Tt.jsx)("div",{className:"options-list",children:O(n)})})})},yO=({onClick:t})=>(0,Tt.jsx)("button",{onClick:t,className:"back-button",children:(0,Tt.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Tt.jsx)("path",{d:"M7 13L1 7L7 1",stroke:"#6494EE",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),kne=({onClick:t})=>(0,Tt.jsx)("button",{onClick:t,className:"close-button",children:(0,Tt.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"#C1C1C1",children:[(0,Tt.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Tt.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})]})}),mh=({title:t,onCloseModal:e,onBack:n})=>{const r="Get a Wallet"===t?" -open":"";return(0,Tt.jsxs)("div",{className:"nws-modal-header",children:[n&&(0,Tt.jsx)(yO,{onClick:n}),(0,Tt.jsx)("h3",{className:`middleTitle ${r}`,children:t}),(0,Tt.jsx)(kne,{onClick:e})]})},Lne=({message:t,module:e,onBack:n,onCloseModal:r})=>(0,Tt.jsxs)(Jr.Fragment,{children:[(0,Tt.jsx)(mh,{title:"",onCloseModal:r,onBack:n}),(0,Tt.jsx)("div",{className:"alert-message connecting-wrapper connecting-wrapper-err",children:(0,Tt.jsxs)("div",{className:"content",children:[(0,Tt.jsx)("div",{className:"icon",children:(0,Tt.jsx)("img",{src:e?.metadata.iconUrl,alt:e?.metadata.name})}),(0,Tt.jsx)("h3",{className:"connecting-name",children:e?.metadata.name}),(0,Tt.jsx)("h4",{children:t})]})})]}),Fne=({module:t,onBack:e,onCloseModal:n})=>(0,Tt.jsxs)(Jr.Fragment,{children:[(0,Tt.jsxs)("div",{className:"nws-modal-header-wrapper",children:[(0,Tt.jsx)(yO,{onClick:e}),(0,Tt.jsx)(mh,{title:"",onCloseModal:n})]}),(0,Tt.jsxs)("div",{className:"wallet-not-installed-wrapper",children:[(0,Tt.jsxs)("div",{className:"wallet-data",children:[(0,Tt.jsx)("div",{className:`wallet-icon-box ${t.id}`,children:(0,Tt.jsx)("img",{src:t.metadata.iconUrl,alt:t.metadata.name})}),(0,Tt.jsx)("p",{children:t.metadata.name})]}),(0,Tt.jsxs)("p",{children:[Dn("modal.install.youllNeedToInstall")," ",t.metadata.name," ",Dn("modal.install.toContinueAfterInstalling"),(0,Tt.jsxs)("span",{className:"refresh-link",onClick:()=>window.location.reload(),children:[" ",Dn("modal.install.refreshThePage")]})]}),(0,Tt.jsx)("div",{className:"action-buttons",children:(0,Tt.jsxs)("button",{className:"middleButton",onClick:()=>{"injected"===t.type&&window.open(t.metadata.downloadUrl,"_blank")},children:[Dn("modal.install.open")," ",t.metadata.name]})})]})]}),Bne=({onCloseModal:t})=>(0,Tt.jsxs)("div",{className:"wallet-home-wrapper",children:[(0,Tt.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Tt.jsx)(mh,{title:Dn("modal.exportAccounts.transferYourAccounts"),onCloseModal:t})}),(0,Tt.jsxs)("div",{className:"wallet-info-wrapper what-wallet-hide",children:[(0,Tt.jsxs)("div",{className:"wallet-what",children:[(0,Tt.jsxs)("svg",{width:"56",height:"57",viewBox:"0 0 56 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Tt.jsx)("rect",{y:"0.5",width:"56",height:"56",rx:"12",fill:"url(#paint0_radial_2563_17897)"}),(0,Tt.jsx)("g",{opacity:"0.7",children:(0,Tt.jsx)("path",{d:"M23 43.5H16.3333C15.4493 43.5 14.6014 43.1488 13.9763 42.5237C13.3512 41.8986 13 41.0507 13 40.1667V16.8333C13 15.9493 13.3512 15.1014 13.9763 14.4763C14.6014 13.8512 15.4493 13.5 16.3333 13.5H23M34.6667 36.8333L43 28.5M43 28.5L34.6667 20.1667M43 28.5H23",stroke:"#568FFC",strokeWidth:"3.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,Tt.jsx)("defs",{children:(0,Tt.jsxs)("radialGradient",{id:"paint0_radial_2563_17897",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(-3.5 79.5) rotate(-47.8271) scale(114.691 121.528)",children:[(0,Tt.jsx)("stop",{stopColor:"#112140"}),(0,Tt.jsx)("stop",{offset:"1",stopColor:"#1D5D72"})]})})]}),(0,Tt.jsxs)("div",{className:"content-side",children:[(0,Tt.jsx)("h3",{children:Dn("modal.exportAccounts.chooseAWallet")}),(0,Tt.jsx)("p",{children:Dn("modal.exportAccounts.selectAWallet")})]})]}),(0,Tt.jsxs)("div",{className:"wallet-what",children:[(0,Tt.jsxs)("svg",{width:"56",height:"57",viewBox:"0 0 56 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Tt.jsx)("rect",{y:"0.5",width:"56",height:"56",rx:"12",fill:"url(#paint0_radial_2563_17904)"}),(0,Tt.jsxs)("g",{opacity:"0.7",children:[(0,Tt.jsx)("path",{d:"M13 28.5C13 20.2157 19.7157 13.5 28 13.5C36.2843 13.5 43 20.2157 43 28.5C43 29.4205 43.7462 30.1667 44.6667 30.1667C45.5871 30.1667 46.3333 29.4205 46.3333 28.5C46.3333 18.3748 38.1252 10.1667 28 10.1667C17.8748 10.1667 9.66667 18.3748 9.66667 28.5C9.66667 29.4205 10.4129 30.1667 11.3333 30.1667C12.2538 30.1667 13 29.4205 13 28.5Z",fill:"#568FFC"}),(0,Tt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38 28.5C38 31.0612 37.0372 33.3975 35.4537 35.1667H42.6434C43.8167 35.1667 44.6152 36.3476 44.0465 37.3738C40.9203 43.0147 34.9061 46.8333 28 46.8333C21.0939 46.8333 15.0796 43.0147 11.9535 37.3738C11.3848 36.3476 12.1833 35.1667 13.3566 35.1667H20.5463C18.9628 33.3975 18 31.0612 18 28.5C18 22.9771 22.4772 18.5 28 18.5C33.5228 18.5 38 22.9771 38 28.5ZM28 35.1667C31.6819 35.1667 34.6667 32.1819 34.6667 28.5C34.6667 24.8181 31.6819 21.8333 28 21.8333C24.3181 21.8333 21.3333 24.8181 21.3333 28.5C21.3333 32.1819 24.3181 35.1667 28 35.1667ZM16.8189 38.5H39.1811C36.4319 41.572 32.4397 43.5 28 43.5C23.5603 43.5 19.5681 41.572 16.8189 38.5Z",fill:"#568FFC"})]}),(0,Tt.jsx)("defs",{children:(0,Tt.jsxs)("radialGradient",{id:"paint0_radial_2563_17904",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(-3.5 79.5) rotate(-47.8271) scale(114.691 121.528)",children:[(0,Tt.jsx)("stop",{stopColor:"#112140"}),(0,Tt.jsx)("stop",{offset:"1",stopColor:"#1D5D72"})]})})]}),(0,Tt.jsxs)("div",{className:"content-side",children:[(0,Tt.jsx)("h3",{children:Dn("modal.exportAccounts.selectYourAccounts")}),(0,Tt.jsx)("p",{children:Dn("modal.exportAccounts.afterDecide")})]})]}),(0,Tt.jsx)("div",{className:"button-spacing"}),(0,Tt.jsx)("div",{className:"middleContainer",children:(0,Tt.jsx)("p",{children:Dn("modal.exportAccounts.disclaimer")})})]})]}),Une=({hasBalance:t,type:e})=>e===_l.UNKNOWN?(0,Tt.jsx)("span",{className:"error",children:Dn("modal.exportAccounts.selectAccounts.error")}):e===_l.LEDGER?(0,Tt.jsx)("span",{className:"warning",children:Dn("modal.exportAccounts.selectAccounts.warningLedger")}):t?null:(0,Tt.jsx)("span",{className:"warning",children:Dn("modal.exportAccounts.selectAccounts.noBalance")}),Kne=({onCloseModal:t,onBack:e,selectedAccounts:n,setSelectedAccounts:r,accountsWithDetail:u,disabledAccounts:v,onNextStep:O,isLoading:Y,buttonLabel:$})=>{const ie=(we,xe)=>{r(xe?[...n,we]:n.filter(Ce=>Ce!==we))},he=n.length===u.length?Dn("modal.exportAccounts.selectAccounts.deselectAll"):Dn("modal.exportAccounts.selectAccounts.selectAll");return(0,Jr.useEffect)(()=>{n.length||r(u.map(({accountId:we})=>we))},[u.length]),(0,Tt.jsxs)(Jr.Fragment,{children:[(0,Tt.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Tt.jsx)(mh,{title:Dn("modal.exportAccounts.selectAccounts.title"),onCloseModal:t,onBack:e})}),(0,Tt.jsx)("div",{className:"account-export connecting-wrapper",children:(0,Tt.jsx)("div",{className:"content",children:Y?(0,Tt.jsx)("div",{className:"connecting-details",children:(0,Tt.jsx)("div",{className:"spinner account-selection-spinner",children:(0,Tt.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR3SURBVHgBpVZ9aJVVGH+e55z33bi7zY9hMz+yMAeNoEIq6A9ZRKQWEsQNFIIpsf5Y9E+GsD9iBEEDMUkDa6ShRKKZYIWiRkaKaUGUGCKOTGMF84PNO99773vOefq9720yK5ZzD/dwPt/nd37P17lEk5Qnuz9roUkKT7T5bNe+QjTNLCHv24h1Xgh+OmtwQYPH2jUXwlnW9NRooqePfLS6MmmQ59cdeEGJlkJZA5MGVecoAwghBYZTVY9ftuaDSy8x8w9fbFl95JZAXuw9dmelkvRAyXxS7wMFryG4bIyWZiqzPgMhaFfGfn3NY3AZG9sPf/Dy8HidZvxkZc/h1pqnPlKey6yspMqUd9jVAEYY6RCGDQTwjGDwGTgAlbwRijV1C9vanz577tT+6r+YrOz5rlXFrQ/qZ+FbDxCfXS5oOgxln4v473f3rbgwdn7FK5/MCaH2eAg6X8g3K2iBMTiBkNJVKbod+ze9mgPZsY/UaicYzCE1HgpZc558olCTjTvWLxv9p1n3bV45iO7T5zq3TU9j9xTOLwQ5D9t48aEYrtGj2P/2BpNS78nZJoRdlDsYd8vphz273lqyhW5Rnlnz3hOe6SEwghvxPUMTVfYe2rpuUOqOkZeIxdSbsSJ8eTIAmXy5tftrMPkzi0C4B2ZDNHp+INvLQURkhYiJ6gDGko376DbEJ8k3mcnYBSeSM2ptL/XGsurNnxfnDIQNwCKADO1845Ef6Tbk0M51g4joMgncDyBmkrtsNEMQovcDxGYsGL2yDNAUxPv0VySs4yxhfeYbabJg0Awg+ILylEB6nKMpSOp0WCR1+QSuD4ELljNDEfyRrdXPCU1BTEgD7pyOzVmC2iBm0KgYAMCEeXovoClIjdKiVdQ3FYbzmatxWRqMPcNsDHyfNWskWk5TkJhNEwVyxA6hLL5clLJsW7voFxa6LiR5CCOeWzo3XFxKtyEdy3tnp7VahAoDp6PEVGvJye09l3P7K9k9WQijXBv4B6WG+0pvD0ybFEBHZ6OPh+/OGaBsIvNRAGp/ZHv1jJeon+omszBkFsr3FhsLB7rev3JLQKVSyfjmaW2BJSavDlqR7c5VrR+4AbLttbkXMehH7gjA8gZiD/tq+Or/ABZ3dUW/J62LcPUGcrW8pKSVFAg6cHz3O0l25qZHa/XGwWPg9aAwwzdZAaDX+7tbNsMYf5+bpaUS0dDQEF8rtsUxCbI5e5KRzGhBMiqNxllKju7d8NOYXjseRBytQngcVDL3wD9H+7vf3YS7mnnzqrZpwSxrwkh04cpM5NTMyJdHbIgaESyxJ6tZ5cDbw3qd0tqVCp25Se/4yYdr5/zm/ehjwvpxZHgN0Wlub0/Yt7awdykqRYFHy6NUQVrBd4o6p6ngrVL2Bo8ksuJqoXzq9Ln9m6rj9U74b6Wjo8OeP082aY5NUxRsYzwDkeFsU+MdUU3U4PG0QtbahqhadDMuHTy4fvS/9EwIUpdeuW/ZiShOipFxURRbNdWETFMRZrCFlEZGkuPHdycTafgLExNiI6YfUpcAAAAASUVORK5CYII=",alt:"loading-icon"})})}):(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsxs)("div",{className:"account-selection-container",children:[(0,Tt.jsx)("span",{className:"account-select-all",onClick:()=>{n.length!==u.length?r(u.map(({accountId:we})=>we)):r([])},children:he}),(0,Tt.jsx)("div",{className:"account-selection",children:u.map(({accountId:we})=>(0,Tt.jsx)("div",{className:"account-selection-row",children:(0,Tt.jsxs)("div",{className:"checkbox",children:[(0,Tt.jsx)("input",{onChange:xe=>{ie(we,xe.target.checked)},checked:n.includes(we),type:"checkbox",id:we,name:we,value:we}),(0,Tt.jsx)("label",{htmlFor:we,title:we,children:(0,Tt.jsx)("span",{className:"label",children:we})})]})},we))}),v.length>0&&(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsx)("span",{className:"account-unavailable",children:Dn("modal.exportAccounts.selectAccounts.unavailable")}),(0,Tt.jsx)("div",{className:"account-selection",children:v.map(({accountId:we,type:xe,hasBalance:Ce})=>(0,Tt.jsx)("div",{className:"account-selection-row",children:(0,Tt.jsxs)("div",{className:"checkbox",children:[(0,Tt.jsx)("input",{onChange:Le=>{ie(we,Le.target.checked)},checked:n.includes(we),type:"checkbox",id:we,name:we,value:we,disabled:!0}),(0,Tt.jsxs)("label",{htmlFor:we,title:we,children:[(0,Tt.jsx)("span",{className:"account-id",children:we}),Une({hasBalance:Ce,type:xe})]})]})},we))})]}),(0,Tt.jsx)("div",{className:"filler"})]}),(0,Tt.jsx)("button",{className:"middleButton account-export-button",onClick:O,disabled:0===n.length,children:Dn($)})]})})})]})};var zne=p(40489),yw=p.n(zne),mw=p(47768);const Wne=({children:t,copy:e,onClick:n,id:r})=>{const[u,v]=(0,Jr.useState)(!1);return(0,Tt.jsxs)("button",{title:Dn("component.clickToCopy.tooltip"),className:"click-to-copy",onClick:()=>{v(!0),setTimeout(()=>v(!1),2e3);const Y=document.createElement("textarea");Y.innerHTML=e,document.body.appendChild(Y),Y.select();const $=document.execCommand("copy");return document.body.removeChild(Y),n&&n(e),$},id:r,children:[t,(0,Tt.jsx)("div",{className:"copy-success"+(u?" show":""),children:Dn("component.clickToCopy.label")})]})},Gne=({onNextStep:t,hasCopied:e,setHasCopied:n,onCloseModal:r,onBack:u,onPassphraseSave:v})=>{const[O,Y]=(0,Jr.useState)("");(0,Jr.useEffect)(()=>{const ue=(()=>{const t=yw().randomBytes(24);return(0,mw.encodeBase64)(t)})();Y(ue)},[]);return(0,Tt.jsxs)(Jr.Fragment,{children:[(0,Tt.jsx)(mh,{title:Dn("modal.exportAccounts.getPassphrase.title"),onCloseModal:r,onBack:u}),(0,Tt.jsx)("div",{className:"account-export",children:(0,Tt.jsxs)("div",{className:"content",children:[(0,Tt.jsx)("h4",{className:"passphrase-title",children:Dn("modal.exportAccounts.getPassphrase.desc")}),(0,Tt.jsx)(Wne,{copy:O,id:"passphraseButton",children:(0,Tt.jsx)("div",{className:"passphrase-text",children:O})}),(0,Tt.jsx)("label",{htmlFor:"passphraseButton",className:"passphrase-label",children:Dn("modal.exportAccounts.getPassphrase.label")}),(0,Tt.jsx)("div",{className:"filler"}),(0,Tt.jsx)("div",{className:"passphrase-check-container",children:(0,Tt.jsxs)("div",{className:"checkbox",children:[(0,Tt.jsx)("input",{onChange:ue=>{n(ue.target.checked),v(O)},checked:e,type:"checkbox",id:"passphrase-check",name:"passphrase-check",value:"passphrase-check"}),(0,Tt.jsx)("label",{htmlFor:"passphrase-check",children:(0,Tt.jsx)("span",{className:"label",children:Dn("modal.exportAccounts.getPassphrase.checkLabel")})})]})}),(0,Tt.jsx)("button",{className:"middleButton account-export-button",onClick:()=>{t()},disabled:!e,children:Dn("modal.exportAccounts.getPassphrase.transferButton")})]})})]})},Zne=({src:t,name:e,alertMessage:n,onCloseModal:r,onBack:u})=>(0,Tt.jsxs)("div",{className:"account-export connecting-wrapper",children:[(0,Tt.jsx)(mh,{title:"No interface found",onCloseModal:r,onBack:u}),(0,Tt.jsxs)("div",{className:"content",children:[(0,Tt.jsx)("div",{className:"icon",children:(0,Tt.jsx)("img",{src:t,alt:e})}),(0,Tt.jsx)("h3",{className:"connecting-name",children:e}),(0,Tt.jsx)("p",{children:n})]})]}),Yne=({onComplete:t,onBack:e,onCloseModal:n,onStartOver:r})=>(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Tt.jsx)(mh,{title:Dn("modal.exportAccounts.complete.title"),onCloseModal:n,onBack:e})}),(0,Tt.jsxs)("div",{className:"complete-desc",children:[(0,Tt.jsx)("h4",{className:"content",children:Dn("modal.exportAccounts.complete.descOne")}),(0,Tt.jsx)("h4",{className:"content",children:Dn("modal.exportAccounts.complete.descTwo")})]}),(0,Tt.jsx)("button",{className:"middleButton account-export-button secondary",onClick:r,children:Dn("modal.exportAccounts.complete.startOverButton")}),(0,Tt.jsx)("button",{className:"middleButton account-export-button",onClick:()=>{t(),n()},children:Dn("modal.exportAccounts.complete.button")})]}),qa_ACCOUNT_SELECTION="ACCOUNT_SELECTION",qa_GET_PASSPHRASE="GET_PASSPHRASE",qa_NO_INTERFACE="NO_INTERFACE",qa_COMPLETE="COMPLETE",_l={LEDGER:"Ledger",FULL_ACCESS_KEY:"Full Access Key",MULTI_SIG:"Multi-Sig",UNKNOWN:"Unknown"},Jne=t=>{if("FullAccess"===t)return _l.FULL_ACCESS_KEY;if(t?.FunctionCall?.method_names.includes("__wallet__metadata"))return _l.LEDGER;const e=["add_request","add_request_and_confirm","delete_request","confirm"];return t?.FunctionCall?.method_names.every(n=>e.includes(n))?_l.MULTI_SIG:_l.UNKNOWN},Qne=function(){var t=(0,ke.Z)(function*({provider:e,accountId:n,publicKey:r}){try{const{permission:u}=yield e.query({request_type:"view_access_key",account_id:n,public_key:r,finality:"final"});return{type:Jne(u)}}catch{return{type:_l.UNKNOWN}}});return function(n){return t.apply(this,arguments)}}(),Xne=function(){var t=(0,ke.Z)(function*({provider:e,accountId:n}){try{const{amount:r}=yield e.query({request_type:"view_account",finality:"final",account_id:n});return{hasBalance:!new(fr())(r).isZero()}}catch{return{hasBalance:!1}}});return function(n){return t.apply(this,arguments)}}(),qne=({alertMessage:t,module:e,onCloseModal:n,onWarning:r,accounts:u,selector:v,wallet:O,onBack:Y,onComplete:$})=>{const[ie,ue]=(0,Jr.useState)([]),[he,we]=(0,Jr.useState)(!1),[xe,Ce]=(0,Jr.useState)([]),[Le,je]=(0,Jr.useState)([]),[Ue,$e]=(0,Jr.useState)(""),[Je,ht]=(0,Jr.useState)({});(0,Jr.useEffect)(()=>{!function(){var Fu=(0,ke.Z)(function*(){try{const{buildImportAccountsUrl:Ps,importAccountsInSecureContext:Ml}=yield O.wallet();ht({buildImportAccountsUrl:Ps,importAccountsInSecureContext:Ml}),!Ps&&!Ml&&r()}catch{r()}});return function(){return Fu.apply(this,arguments)}}()()},[e?.metadata.name,t]);const{network:xt}=v.options,Wt=new Jn.providers.JsonRpcProvider({url:xt.nodeUrl}),[An,rn]=(0,Jr.useState)(!1);(0,Jr.useEffect)(()=>{const $a=function(){var Fu=(0,ke.Z)(function*(){we(!0);const Ps=yield Promise.all(u.map(function(){var Dl=(0,ke.Z)(function*({accountId:Bu,privateKey:Wp}){const vw=Jn.utils.KeyPair.fromString(Wp),{type:ES}=yield Qne({provider:Wt,accountId:Bu,publicKey:vw.getPublicKey().toString()}),{hasBalance:Gp}=yield Xne({provider:Wt,accountId:Bu});return{accountId:Bu,privateKey:Wp,type:ES,hasBalance:Gp}});return function(Bu){return Dl.apply(this,arguments)}}())),Ml=Ps.filter(({hasBalance:Dl,type:Bu})=>Dl&&Bu===_l.FULL_ACCESS_KEY);Ce(Ml);const ev=Ps.filter(({hasBalance:Dl,type:Bu})=>!Dl||Bu!==_l.FULL_ACCESS_KEY);je(ev),we(!1)});return function(){return Fu.apply(this,arguments)}}();0===xe.length&&$a()},[Je.buildImportAccountsUrl,Je.importAccountsInSecureContext]);const[un,xn]=(0,Jr.useState)(qa_ACCOUNT_SELECTION);(0,Jr.useEffect)(()=>{xn(t?qa_NO_INTERFACE:qa_ACCOUNT_SELECTION)},[t]);const mr=()=>{xn(qa_GET_PASSPHRASE)},{buildImportAccountsUrl:ur,importAccountsInSecureContext:Er}=Je,Ko=function(){var $a=(0,ke.Z)(function*(){Er?yield Er({accounts:u.filter(({accountId:Fu})=>ie.includes(Fu))}):xn(qa_NO_INTERFACE)});return function(){return $a.apply(this,arguments)}}();return(0,Tt.jsxs)(Jr.Fragment,{children:[un===qa_NO_INTERFACE&&(0,Tt.jsx)(Zne,{src:e?.metadata.iconUrl,name:e?.metadata.name,alertMessage:t,onBack:Y,onCloseModal:n}),un===qa_ACCOUNT_SELECTION&&(0,Tt.jsx)(Kne,{onCloseModal:n,onBack:Y,selectedAccounts:ie,setSelectedAccounts:ue,accountsWithDetail:xe,disabledAccounts:Le,onNextStep:()=>{"injected"!==O.type||O.metadata.useUrlAccountImport?mr():(Ko(),xn(qa_COMPLETE))},isLoading:he,buttonLabel:"injected"===O.type?"modal.exportAccounts.getPassphrase.button":"modal.exportAccounts.selectAccounts.button"}),un===qa_GET_PASSPHRASE&&(0,Tt.jsx)(Gne,{onNextStep:()=>{const $a=(({accountData:t,secretKey:e})=>{if(!e)throw new Error("Secret key is required");try{const n=(0,mw.decodeBase64)(Buffer.from(e).toString("base64")),r=(0,mw.decodeUTF8)(JSON.stringify(t)),u=yw().randomBytes(yw().secretbox.nonceLength),v=yw().secretbox(r,u,n),O=new Uint8Array(u.length+v.length);return O.set(u),O.set(v,u.length),(0,mw.encodeBase64)(O)}catch{throw new Error("Unable to encrypt account data")}})({accountData:u.filter(({accountId:Ps})=>ie.includes(Ps)),secretKey:Ue});if(("browser"===O.type||O.metadata.useUrlAccountImport)&&ur){const Ps=`${ur()}#${$a}`;window.open(Ps,"_blank")}xn(qa_COMPLETE)},hasCopied:An,setHasCopied:rn,onCloseModal:n,onBack:()=>xn(qa_ACCOUNT_SELECTION),onPassphraseSave:$e}),un===qa_COMPLETE&&(0,Tt.jsx)(Yne,{onCloseModal:n,onBack:mr,onComplete:()=>{$&&$({accounts:ie,walletName:e?.metadata.name||"Unknown"})},onStartOver:Y})]})},$ne=t=>{switch(t){case"dark":return"dark-theme";case"light":return"light-theme";default:return""}},ere=({selector:t,options:e,visible:n,hide:r})=>{const[u,v]=(0,Jr.useState)({name:"WalletHome"}),[O,Y]=(0,Jr.useState)(null),[$,ie]=(0,Jr.useState)(),ue=()=>{v({name:"WalletHome"})};(0,Jr.useEffect)(()=>{v({name:"WalletHome"});const{selectedWalletId:Ce,modules:Le}=t.store.getState();if(Ce){const je=Le.find(Ue=>Ue.id===Ce);ie(je)}},[n]);const he=(0,Jr.useCallback)(()=>{Y(null),ue(),r()},[r]);(0,Jr.useEffect)(()=>{const Ce=Le=>{"Escape"===Le.key&&he()};return window.addEventListener("keydown",Ce),()=>window.removeEventListener("keydown",Ce)},[he]);const we=function(){var Ce=(0,ke.Z)(function*(Le){Y(null),ie(Le);try{const{deprecated:je,available:Ue}=Le.metadata;return"injected"!==Le.type||Ue?je?(Y(`${Le.metadata.name} is deprecated. Please select another wallet.`),void v({name:"AlertMessage",params:{module:Le}})):void v({name:"ExportAccounts",params:{module:Le}}):void v({name:"WalletNotInstalled",params:{module:Le}})}catch(je){const{name:Ue}=Le.metadata,$e=je instanceof Error?je.message:"Something went wrong";Y(`Failed to sign in with ${Ue}: ${$e}`),v({name:"AlertMessage",params:{module:Le}})}});return function(je){return Ce.apply(this,arguments)}}(),xe=(0,Jr.useCallback)(()=>{$&&(Y(`${$?.metadata.name} ${Dn("modal.exportAccounts.warning")}`),v({name:"AlertMessage",params:{module:$}}))},[$]);return n?(0,Tt.jsxs)("div",{className:`nws-modal-wrapper ${$ne(e?.theme)} ${n?"open":""}`,children:[(0,Tt.jsx)("div",{className:"nws-modal-overlay",onClick:he}),(0,Tt.jsxs)("div",{className:"nws-modal",children:[(0,Tt.jsxs)("div",{className:"modal-left",children:[(0,Tt.jsx)("div",{className:"modal-left-title",children:(0,Tt.jsx)("h2",{children:Dn("modal.exportAccounts.chooseAWallet")})}),(0,Tt.jsx)(Rne,{handleWalletClick:Ce=>{we(Ce)},selector:t})]}),(0,Tt.jsx)("div",{className:"modal-right",children:(0,Tt.jsxs)("div",{className:"nws-modal-body account-export-body",children:["AlertMessage"===u.name&&O&&(0,Tt.jsx)(Lne,{message:O,module:u.params?.module,onBack:()=>{Y(null),ue()},onCloseModal:he}),"WalletNotInstalled"===u.name&&(0,Tt.jsx)(Fne,{module:u.params?.module,onBack:()=>{ue()},onCloseModal:he}),"WalletHome"===u.name&&(0,Tt.jsx)(Bne,{onCloseModal:he}),"ExportAccounts"===u.name&&(0,Tt.jsx)(qne,{module:u.params?.module,alertMessage:O,onCloseModal:he,onWarning:xe,onBack:ue,selector:t,accounts:e.accounts,wallet:$,onComplete:e?.onComplete})]})})]})]}):null};let wS=null,AS=null;function rre(t,e){1&t&&Hs(0,"near-wallet-selector-loading")}function ire(t,e){if(1&t){const n=gy();ui(0,"div")(1,"button",1),Qi("click",function(){Li(n);return Po(Ba().show())}),_i(2,"Open Modal"),Hr(),ui(3,"p"),_i(4," The Export Accounts modal assists users in migrating their accounts to any Wallet Selector wallet supporting account imports. Any sensitive data in transit during this process will be encrypted with a randomly-generated password which the user will be required to copy down and use in the account import process on the target wallet. "),Hr()()}}class qm{constructor(){this.accounts=[]}ngOnInit(){var e=this;return(0,ke.Z)(function*(){yield e.initialize().catch(n=>{console.error(n),alert("Failed to initialise wallet selector")})})()}initialize(){var e=this;return(0,ke.Z)(function*(){const n=yield E8({network:"testnet",debug:!0,modules:[RT(),uO(),z8(),V8(),H8(),W8(),G8(),Z8(),J8(),Q8(),X8(),q8(),$8(),NI({bundle:!1}),PT({projectId:"c4f79cc...",metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"]}}),HT(),cO(),(0,lO.h)()]}),r=((t,e)=>{if(!AS){const r=document.body,u=document.createElement("div");u.id="near-wallet-selector-modal",r.appendChild(u),AS=(0,Nne.s)(u)}const n=r=>{AS.render((0,Tt.jsx)(ere,{selector:t,options:e,visible:r,hide:()=>n(!1)}))};return wS||(wS={show:()=>{n(!0)},hide:()=>{n(!1)}}),wS})(n,{accounts:[],onComplete:v=>{console.log("Transfer Completed: ",v)}}),u=n.store.getState();e.accounts=u.accounts,e.accountId=u.accounts.find(v=>v.active)?.accountId||null,window.exportSelector=n,window.exportModal=r,e.exportSelector=n,e.exportModal=r})()}show(){this.exportModal.show()}}function ore(t,e){1&t&&Hs(0,"near-wallet-selector-wallet-selector")}function sre(t,e){1&t&&Hs(0,"near-wallet-selector-wallet-selector-export")}qm.\u0275fac=function(e){return new(e||qm)},qm.\u0275cmp=Ho({type:qm,selectors:[["near-wallet-selector-wallet-selector-export"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"click"]],template:function(e,n){1&e&&(Fa(0,rre,1,0,"near-wallet-selector-loading",0),Fa(1,ire,5,0,"div",0)),2&e&&(Eo("ngIf",!n.exportModal||!n.exportSelector),Jo(1),Eo("ngIf",n.exportModal||n.exportSelector))},dependencies:[ll,Vp]});class $m{}$m.\u0275fac=function(e){return new(e||$m)},$m.\u0275cmp=Ho({type:$m,selectors:[["near-wallet-selector-root"]],decls:8,vars:4,consts:[[1,"title-container"],[3,"click"],[4,"ngIf"]],template:function(e,n){1&e&&(ui(0,"main")(1,"div",0)(2,"h1"),_i(3),Hr(),ui(4,"button",1),Qi("click",function(){return n.showImport=!n.showImport}),_i(5),Hr()(),Fa(6,ore,1,0,"near-wallet-selector-wallet-selector",2),Fa(7,sre,1,0,"near-wallet-selector-wallet-selector-export",2),Hr()),2&e&&(Jo(3),A1(n.showImport?"Export Account":"NEAR Guest Book"),Jo(2),j0(" ",n.showImport?"Back to Log in":"Try Export Account"," "),Jo(1),Eo("ngIf",!n.showImport),Jo(1),Eo("ngIf",n.showImport))},dependencies:[ll,Xm,qm]});class Hp{}Hp.\u0275fac=function(e){return new(e||Hp)},Hp.\u0275mod=Fs({type:Hp,bootstrap:[$m]}),Hp.\u0275inj=ks({imports:[gf,Mf]}),$F().bootstrapModule(Hp).catch(t=>console.error(t))},35469:ne=>{"use strict";ne.exports=function s({mustBeMetaMask:p=!1,silent:h=!1,timeout:M=3e3}={}){!function E(){if("boolean"!=typeof p)throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if("boolean"!=typeof h)throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if("number"!=typeof M)throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}();let w=!1;return new Promise(l=>{function m(){if(w)return;w=!0,window.removeEventListener("ethereum#initialized",m);const{ethereum:y}=window;!y||p&&!y.isMetaMask?(!h&&console.error("@metamask/detect-provider:",p&&y?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),l(null)):l(y)}window.ethereum?m():(window.addEventListener("ethereum#initialized",m,{once:!0}),setTimeout(()=>{m()},M))})}},73597:(ne,s,p)=>{"use strict";s.h=void 0;var M=p(1310);Object.defineProperty(s,"h",{enumerable:!0,get:function(){return M.setupMintbaseWallet}})},25697:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(S,_,A,P){void 0===P&&(P=A);var x=Object.getOwnPropertyDescriptor(_,A);(!x||("get"in x?!_.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return _[A]}}),Object.defineProperty(S,P,x)}:function(S,_,A,P){void 0===P&&(P=A),S[P]=_[A]}),M=this&&this.__setModuleDefault||(Object.create?function(S,_){Object.defineProperty(S,"default",{enumerable:!0,value:_})}:function(S,_){S.default=_}),w=this&&this.__importStar||function(S){if(S&&S.__esModule)return S;var _={};if(null!=S)for(var A in S)"default"!==A&&Object.prototype.hasOwnProperty.call(S,A)&&h(_,S,A);return M(_,S),_},E=this&&this.__awaiter||function(S,_,A,P){return new(A||(A=Promise))(function(T,L){function N(V){try{B(P.next(V))}catch(G){L(G)}}function j(V){try{B(P.throw(V))}catch(G){L(G)}}function B(V){V.done?T(V.value):function x(T){return T instanceof A?T:new A(function(L){L(T)})}(V.value).then(N,j)}B((P=P.apply(S,_||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.MintbaseWallet=s.TransactionSuccessEnum=void 0;const l=w(p(36237)),m=p(52107);var S;(S=s.TransactionSuccessEnum||(s.TransactionSuccessEnum={})).MINT="mint",S.TRANSFER="transfer",S.BURN="burn",S.DEPLOY_STORE="deploy-store",S.MAKE_OFFER="make-offer",S.REVOKE_MINTER="revoke-minter",S.ADD_MINTER="add-minter",S.TRANSFER_STORE_OWNERSHIP="transfer-store-ownership",S.AUCTION_LIST="list",S.SIMPLE_SALE_LIST="simple-sale-list",S.UNLIST="unlist",S.TAKE_OFFER="take-offer",S.WITHDRAW_OFFER="withdraw-offer";s.MintbaseWallet=({metadata:S,options:_,successUrl:A,failureUrl:P,contractId:x,callback:T,networkId:L})=>E(void 0,void 0,void 0,function*(){const j=yield E(void 0,void 0,void 0,function*(){if(void 0!==typeof window){const{connect:D,WalletConnection:F,keyStores:z}=l,C={networkId:L,keyStore:new z.BrowserLocalStorageKeyStore,nodeUrl:_.network.nodeUrl,walletUrl:S.walletUrl,headers:{}},k=new URL(window.location.href).searchParams.get("account_id");return k&&k?.length>0&&(localStorage.setItem("mintbase-wallet:callback_url",T),localStorage.setItem("mintbase-wallet_wallet_auth_key",JSON.stringify({accountId:k,allKeys:[]}))),{wallet:new F(yield D(C),"mintbase-wallet")}}return null});let B;const q=D=>{if(D&&D!==j.wallet.getAccountId())throw new Error(`Cannot sign transactions for ${D} while signed in as ${B}`)},a=()=>E(void 0,void 0,void 0,function*(){var D;const F=j.wallet.getAccountId(),z=j.wallet.account();if(!F||!z)return[];const C=window.localStorage.getItem("mintbase-wallet:account-creation-data");return[{accountId:F,publicKey:null===(D=JSON.parse(C))||void 0===D?void 0:D.devicePublicKey}]}),g=D=>(B=D,window.localStorage.setItem("mintbase-wallet:activeAccountId",D),null);return{getAccountId:()=>B,isSignedIn:()=>E(void 0,void 0,void 0,function*(){return!!B}),signIn:()=>E(void 0,void 0,void 0,function*(){var D;const F=yield a(),z=encodeURI(null===(D=window?.location)||void 0===D?void 0:D.origin);return F.length?F:(yield j.wallet.requestSignIn({methodNames:[],successUrl:z,failureUrl:z}),a())}),signOut:()=>E(void 0,void 0,void 0,function*(){window.localStorage.removeItem("mintbase-wallet:account-data"),j.wallet.isSignedIn()&&j.wallet.signOut()}),signAndSendTransaction:({receiverId:D,actions:F,signerId:z,callbackUrl:C})=>E(void 0,void 0,void 0,function*(){if(q(z),!D&&!x)throw new Error("No receiver found to send the transaction to");const f=JSON.stringify([{receiverId:D,signerId:z,actions:F}]),{cbUrl:k}=(0,m.getCallbackUrl)(C??""),se=encodeURIComponent(f),te=new URL(window.location.href),oe=new URL(`${S.walletUrl}/sign-transaction`);oe.searchParams.set("transactions_data",se),A&&A&&A.length>0&&oe.searchParams.set("success_url",A||te.toString()),oe.searchParams.set("callback_url",k),window.location.assign(oe.toString())}),verifyOwner:()=>E(void 0,void 0,void 0,function*(){throw new Error(`The verifyOwner method is not supported by ${S.name}`)}),signMessage:()=>E(void 0,void 0,void 0,function*(){throw new Error(`The signMessage method is not supported by ${S.name}`)}),getAvailableBalance:()=>E(void 0,void 0,void 0,function*(){throw`The getAvailableBalance method is not supported by ${S.name}`}),getAccounts:a,switchAccount:D=>E(void 0,void 0,void 0,function*(){return g(D),null}),signAndSendTransactions:({transactions:D,callbackUrl:F})=>E(void 0,void 0,void 0,function*(){const{cbUrl:z}=(0,m.getCallbackUrl)(F??"");for(const{signerId:se}of D)q(se);const C=JSON.stringify(D),f=encodeURIComponent(C),k=new URL(`${S.walletUrl}/sign-transaction`);k.searchParams.set("transactions_data",f),k.searchParams.set("callback_url",z),window.location.assign(k.toString())})}})},1310:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.setupMintbaseWallet=void 0;const M=p(25697),w=p(52107),E="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAnySURBVHgB7Z0HjBVFHMa/B/YK9u6BvUSwd8EeGyrWxMKJRk3sRBNb4NDYGyQaje3EXqJCrIkN7N2zS2gHhCJVaujnfDe37szcvvd273Zv/27mlyz3Zt6+t7z9dqd+/9kSImhqauqi/vRTW2+19VRbDTxp0KC2RrUNL5VKw6J2KLkZSozT1J96tXWBJ0smqG2wK0wnM6HEeEj9eRNejI6gm9rq1TkfZGb+d4e0vFEHTx48pO6UAXzRLIgSoxa6mPLkQ5Pa+ipRhgeCsDyrgSdP5qqte+eWu6MWnrxZS21/s1I/FR4JsLTqRUFq4JFCj5IqsprgkULTaigqixYB77wDjBgBfPttmH/QQUCfPsApp6hSey1Io3h3yMyZwMMPA2+8ASxZUn6/jTYCbrgBOPNMCKKpWIJMnw6cey4wZUr8z5x0EvDgg2rMohME0CTif5EaF14YLcaaawJ77BH9GRZrd98NKRRHkKFD1XDdBDvvqKOA114DfvtNja8OB8aMAZ54AthlF3u/Z54BfvoJEihGkcUK/MADgaVLw7zbb9fFVxT8yYMHAy+8EObtvz/w4ovImYIUWR98YItxzDHlxSAl1Qe76SZgu+3CvO+/1w2CnCmGIN99Z6cvuqj6Z1ivnH++nffll8ibYggycaKd3nVXxGLnncPXLMaStM4yohiCLFtmpzfYALHYeGM7PWcO8qYYgmy6qZ0ePRqx+PNPO71yJfKmGIK4zdiXX67+GRZRL71k5wnoHBZDkFOdGQQ2Z6v1K9jEdfdZtQp5UwxBtt9eN3UDePVfcgnw0Uet9+V7Tz4J3HEHJFKc0d6BA3WzdfFinZ4/H7j8cuCww3SnkS2qX34BRo4Efv89+js6d0beFEeQLbcEHn9c90GWLw/zP/9cb3HwlXrK8E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7lyhBwxmsk+YIdNWq5fwnWp2JOfN09PELFFxvrGbSGlBe9SLsrPJ0VzfI1FFdfD4jA7V4DgIGi1YZ2Op2APJ/7/U7CHExcACtIIjxQaKEgDPFKYSEFGwSMB1uVvslLnooE0RnWFJ08mlEql7p3UP/+oRH948oR3Rx1fNLeylCh0GgyBJw8oxmClwbNMWN1ZVXzVqT8D3XxPZlCMoUqM64KMVideiVILLUoNvDBZQSE4XdlfiTHCfKPsCW8Rpg+0MG1c1cXj0AjdzRiptmdb6m+LfwEGoUIy8K/6BwAAAABJRU5ErkJggg==";s.setupMintbaseWallet=function l({walletUrl:m="",deprecated:y=!1,successUrl:b="",failureUrl:S="",callbackUrl:_="",contractId:A=""}={}){return P=>h(this,void 0,void 0,function*(){return{id:"mintbase-wallet",type:"browser",metadata:{name:"Mintbase Wallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:E,deprecated:y,available:!0,successUrl:b,failureUrl:S,walletUrl:(0,w.resolveWalletUrl)(P.options.network.networkId,m)},init:T=>(0,M.MintbaseWallet)(Object.assign({callback:_,networkId:P.options.network,successUrl:b,failureUrl:S,contractId:A},T))}})}},52107:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.resolveWalletUrl=s.getCallbackUrl=s.checkCallbackUrl=void 0;const p=w=>{function E(l){return/^(https?|ftp|http?):\/\/[^\s/$.?#].[^\s]*$/.test(l)}if(!(null!==w&&w.length>0)){const l=localStorage.getItem("mintbase-wallet:callback_url");return E(l)?l:(console.error("please set your callbackUrl property on setupMintbaseWallet - further help available on our telegram channel: https://t.me/mintdev"),new URL(window.location.href).toString())}return E(w)?w.startsWith("https://")||w.startsWith("http://")?w.endsWith("/")?w.slice(0,-1):w:new URL(window.location.href).toString():(console.error("callbackUrl set with wrong format. please use an URL with http:// or https:// instead.Further help available on our telegram channel: https://t.me/mintdev"),new URL(window.location.href).toString())};s.checkCallbackUrl=p;s.getCallbackUrl=w=>{var E,l,m,y,b,S;if(void 0!==typeof window){let _="";null!==(l=null===(E=window?.mbjs)||void 0===E?void 0:E.keys)&&void 0!==l&&l.callbackUrl&&(null===(y=null===(m=window?.mbjs)||void 0===m?void 0:m.keys)||void 0===y?void 0:y.callbackUrl.length)>0&&(_=null===(S=null===(b=window?.mbjs)||void 0===b?void 0:b.keys)||void 0===S?void 0:S.callbackUrl);const A=(null==localStorage?void 0:localStorage.getItem("mintbase-wallet:callback_url"))||_;return{cbUrl:p(w??A)}}return null};s.resolveWalletUrl=(w,E)=>{if(E)return E;switch(w){case"mainnet":return"https://wallet.mintbase.xyz";case"testnet":return"https://testnet.wallet.mintbase.xyz/";default:throw new Error("Invalid wallet url")}}},99139:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(ee,I,o,a){return new(o||(o=Promise))(function(g,D){function F(f){try{C(a.next(f))}catch(k){D(k)}}function z(f){try{C(a.throw(f))}catch(k){D(k)}}function C(f){f.done?g(f.value):function d(g){return g instanceof o?g:new o(function(D){D(g)})}(f.value).then(F,z)}C((a=a.apply(ee,I||[])).next())})},M=this&&this.__importDefault||function(ee){return ee&&ee.__esModule?ee:{default:ee}};Object.defineProperty(s,"__esModule",{value:!0}),s.Account=void 0;const w=p(35425),E=p(50242),l=p(86184),m=p(17527),y=p(41166),b=M(p(98538)),S=p(21531),{addKey:_,createAccount:A,deleteAccount:P,deleteKey:x,deployContract:T,fullAccessKey:L,functionCall:N,functionCallAccessKey:j,stake:B,transfer:V}=l.actionCreators;function q(ee){return JSON.parse(Buffer.from(ee).toString())}function J(ee){return Buffer.from(JSON.stringify(ee))}class Z{constructor(I,o){this.accessKeyByPublicKeyCache={},this.connection=I,this.accountId=o}state(){return h(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(I,o){return h(this,void 0,void 0,function*(){const a=yield this.findAccessKey(I,o);if(!a)throw new m.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:d}=a,D=(yield this.connection.provider.block({finality:"final"})).header.hash,F=d.nonce.add(new b.default(1));return yield(0,l.signTransaction)(I,F,o,(0,S.baseDecode)(D),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:I,actions:o,returnError:a}){return h(this,void 0,void 0,function*(){let d,g;const D=yield(0,E.exponentialBackoff)(500,12,1.5,()=>h(this,void 0,void 0,function*(){[d,g]=yield this.signTransaction(I,o);const F=g.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(g)}catch(z){if("InvalidNonce"===z.type)return(0,y.logWarning)(`Retrying transaction ${I}:${(0,S.baseEncode)(d)} with new nonce.`),delete this.accessKeyByPublicKeyCache[F.toString()],null;if("Expired"===z.type)return(0,y.logWarning)(`Retrying transaction ${I}:${(0,S.baseEncode)(d)} due to expired block hash`),null;throw z.context=new m.ErrorContext((0,S.baseEncode)(d)),z}}));if(!D)throw new m.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,y.printTxOutcomeLogsAndFailures)({contractId:g.transaction.receiverId,outcome:D}),!a&&"object"==typeof D.status&&"object"==typeof D.status.Failure&&null!==D.status.Failure)throw D.status.Failure.error_message&&D.status.Failure.error_type?new m.TypedError(`Transaction ${D.transaction_outcome.id} failed. ${D.status.Failure.error_message}`,D.status.Failure.error_type):(0,y.parseResultError)(D);return D})}findAccessKey(I,o){return h(this,void 0,void 0,function*(){const a=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!a)throw new m.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const d=this.accessKeyByPublicKeyCache[a.toString()];if(void 0!==d)return{publicKey:a,accessKey:d};try{const g=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:a.toString(),finality:"optimistic"}),D=Object.assign(Object.assign({},g),{nonce:new b.default(g.nonce)});return this.accessKeyByPublicKeyCache[a.toString()]?{publicKey:a,accessKey:this.accessKeyByPublicKeyCache[a.toString()]}:(this.accessKeyByPublicKeyCache[a.toString()]=D,{publicKey:a,accessKey:D})}catch(g){if("AccessKeyDoesNotExist"==g.type)return null;throw g}})}createAndDeployContract(I,o,a,d){return h(this,void 0,void 0,function*(){const g=L();return yield this.signAndSendTransaction({receiverId:I,actions:[A(),V(d),_(w.PublicKey.from(o),g),T(a)]}),new Z(this.connection,I)})}sendMoney(I,o){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:I,actions:[V(o)]})})}createAccount(I,o,a){return h(this,void 0,void 0,function*(){const d=L();return this.signAndSendTransaction({receiverId:I,actions:[A(),V(a),_(w.PublicKey.from(o),d)]})})}deleteAccount(I){return h(this,void 0,void 0,function*(){return process.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[P(I)]})})}deployContract(I){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[T(I)]})})}encodeJSContractArgs(I,o,a){return Buffer.concat([Buffer.from(I),Buffer.from([0]),Buffer.from(o),Buffer.from([0]),Buffer.from(a)])}functionCall({contractId:I,methodName:o,args:a={},gas:d=y.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:g,walletMeta:D,walletCallbackUrl:F,stringify:z,jsContract:C}){return h(this,void 0,void 0,function*(){let f;if(this.validateArgs(a),C)f=["call_js_contract",this.encodeJSContractArgs(I,o,JSON.stringify(a)),d,g,null,!0];else{const k=void 0===z?l.stringifyJsonOrBytes:z;f=[o,a,d,g,k,!1]}return this.signAndSendTransaction({receiverId:C?this.connection.jsvmAccountId:I,actions:[N.apply(void 0,f)],walletMeta:D,walletCallbackUrl:F})})}addKey(I,o,a,d){return h(this,void 0,void 0,function*(){let g;return a||(a=[]),Array.isArray(a)||(a=[a]),g=o?j(o,a,d):L(),this.signAndSendTransaction({receiverId:this.accountId,actions:[_(w.PublicKey.from(I),g)]})})}deleteKey(I){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[x(w.PublicKey.from(I))]})})}stake(I,o){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[B(o,w.PublicKey.from(I))]})})}signedDelegate({actions:I,blockHeightTtl:o,receiverId:a}){return h(this,void 0,void 0,function*(){const{provider:d,signer:g}=this.connection,{header:D}=yield d.block({finality:"final"}),{accessKey:F,publicKey:z}=yield this.findAccessKey(null,null),C=(0,l.buildDelegateAction)({actions:I,maxBlockHeight:new b.default(D.height).add(new b.default(o)),nonce:new b.default(F.nonce).add(new b.default(1)),publicKey:z,receiverId:a,senderId:this.accountId}),{signedDelegateAction:f}=yield(0,l.signDelegateAction)({delegateAction:C,signer:{sign:k=>h(this,void 0,void 0,function*(){const{signature:se}=yield g.signMessage(k,C.senderId,this.connection.networkId);return se})}});return f})}validateArgs(I){if((void 0===I.byteLength||I.byteLength!==I.length)&&(Array.isArray(I)||"object"!=typeof I))throw new m.PositionalArgsError}viewFunction({contractId:I,methodName:o,args:a={},parse:d=q,stringify:g=J,jsContract:D=!1,blockQuery:F={finality:"optimistic"}}){return h(this,void 0,void 0,function*(){let z;this.validateArgs(a),z=D?this.encodeJSContractArgs(I,o,Object.keys(a).length>0?JSON.stringify(a):""):g(a);const C=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},F),{account_id:D?this.connection.jsvmAccountId:I,method_name:D?"view_js_contract":o,args_base64:z.toString("base64")}));return C.logs&&(0,y.printTxOutcomeLogs)({contractId:I,logs:C.logs}),C.result&&C.result.length>0&&d(Buffer.from(C.result))})}viewState(I,o={finality:"optimistic"}){return h(this,void 0,void 0,function*(){const{values:a}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},o),{account_id:this.accountId,prefix_base64:Buffer.from(I).toString("base64")}));return a.map(({key:d,value:g})=>({key:Buffer.from(d,"base64"),value:Buffer.from(g,"base64")}))})}getAccessKeys(){var I;return h(this,void 0,void 0,function*(){const o=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(I=o?.keys)||void 0===I?void 0:I.map(a=>Object.assign(Object.assign({},a),{access_key:Object.assign(Object.assign({},a.access_key),{nonce:new b.default(a.access_key.nonce)})}))})}getAccountDetails(){return h(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(a=>"FullAccess"!==a.access_key.permission).map(a=>{const d=a.access_key.permission;return{contractId:d.FunctionCall.receiver_id,amount:d.FunctionCall.allowance,publicKey:a.public_key}})}})}getAccountBalance(){return h(this,void 0,void 0,function*(){const I=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),o=yield this.state(),a=new b.default(I.runtime_config.storage_amount_per_byte),d=new b.default(o.storage_usage).mul(a),g=new b.default(o.locked),D=new b.default(o.amount).add(g),F=D.sub(b.default.max(g,d));return{total:D.toString(),stateStaked:d.toString(),staked:g.toString(),available:F.toString()}})}getActiveDelegatedStakeBalance(){return h(this,void 0,void 0,function*(){const I=yield this.connection.provider.block({finality:"final"}),o=I.header.hash,a=I.header.epoch_id,{current_validators:d,next_validators:g,current_proposals:D}=yield this.connection.provider.validators(a),F=new Set;[...d,...g,...D].forEach(te=>F.add(te.account_id));const z=[...F],C=z.map(te=>this.viewFunction({contractId:te,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:o}})),f=yield Promise.allSettled(C);if(f.some(te=>"rejected"===te.status&&"TimeoutError"===te.reason.type))throw new Error("Failed to get delegated stake balance");const se=f.reduce((te,oe,de)=>{const Ie=z[de];if("fulfilled"===oe.status){const ye=new b.default(oe.value);if(!ye.isZero())return Object.assign(Object.assign({},te),{stakedValidators:[...te.stakedValidators,{validatorId:Ie,amount:ye.toString()}],total:te.total.add(ye)})}return"rejected"===oe.status?Object.assign(Object.assign({},te),{failedValidators:[...te.failedValidators,{validatorId:Ie,error:oe.reason}]}):te},{stakedValidators:[],failedValidators:[],total:new b.default(0)});return Object.assign(Object.assign({},se),{total:se.total.toString()})})}}s.Account=Z},95760:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(V,G,W,Q){return new(W||(W=Promise))(function(J,Z){function ee(a){try{o(Q.next(a))}catch(d){Z(d)}}function I(a){try{o(Q.throw(a))}catch(d){Z(d)}}function o(a){a.done?J(a.value):function q(J){return J instanceof W?J:new W(function(Z){Z(J)})}(a.value).then(ee,I)}o((Q=Q.apply(V,G||[])).next())})},M=this&&this.__importDefault||function(V){return V&&V.__esModule?V:{default:V}};Object.defineProperty(s,"__esModule",{value:!0}),s.Account2FA=void 0;const w=p(35425),E=p(17527),l=p(50242),m=p(86184),y=M(p(98538)),b=p(63565),S=p(76401),_=p(25929),{addKey:A,deleteKey:P,deployContract:x,fullAccessKey:T,functionCall:L,functionCallAccessKey:N}=m.actionCreators;class j extends b.AccountMultisig{constructor(G,W,Q){super(G,W,Q),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=Q.helperUrl||this.helperUrl,this.storage=Q.storage,this.sendCode=Q.sendCode||this.sendCodeDefault,this.getCode=Q.getCode||this.getCodeDefault,this.verifyCode=Q.verifyCode||this.verifyCodeDefault,this.onConfirmResult=Q.onConfirmResult}signAndSendTransaction({receiverId:G,actions:W}){const Q=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){yield Q.signAndSendTransaction.call(this,{receiverId:G,actions:W}),yield this.sendCode();const q=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(q)),q})}deployMultisig(G){const W=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return h(this,void 0,void 0,function*(){const{accountId:Q}=this,q=(yield this.getRecoveryMethods()).data.filter(({kind:d,publicKey:g})=>("phrase"===d||"ledger"===d)&&null!==g).map(d=>d.publicKey),J=(yield this.getAccessKeys()).filter(({public_key:d,access_key:{permission:g}})=>"FullAccess"===g&&!q.includes(d)).map(d=>d.public_key).map(B),Z=B((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Q})).publicKey),ee=Buffer.from(JSON.stringify({num_confirmations:2})),I=[...J.map(d=>P(d)),...J.map(d=>A(d,N(Q,S.MULTISIG_CHANGE_METHODS,null))),A(Z,N(Q,S.MULTISIG_CONFIRM_METHODS,null)),x(G)],o=I.concat(L("new",ee,S.MULTISIG_GAS,S.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",Q);const{stateStatus:a}=yield this.checkMultisigCodeAndStateStatus(G);switch(a){case _.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield W.signAndSendTransactionWithAccount.call(this,Q,o);case _.MultisigStateStatus.VALID_STATE:return yield W.signAndSendTransactionWithAccount.call(this,Q,I);case _.MultisigStateStatus.INVALID_STATE:throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:G,cleanupContractBytes:W}){return h(this,void 0,void 0,function*(){let Q=[];W&&(yield this.deleteAllRequests().catch(ee=>ee),Q=yield this.get2faDisableCleanupActions(W));const q=yield this.get2faDisableKeyConversionActions(),J=[...Q,...q,x(G)],Z=yield this.findAccessKey(this.accountId,J);if(Z&&Z.accessKey&&"FullAccess"!==Z.accessKey.permission)throw new E.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,J)})}get2faDisableCleanupActions(G){return h(this,void 0,void 0,function*(){const W=yield this.viewState("").catch(q=>{const J=q.cause&&q.cause.name;if("NO_CONTRACT_CODE"==J)return[];throw"TOO_LARGE_CONTRACT_STATE"==J?new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):q}),Q=W.map(({key:q})=>q.toString("base64"));return W.length?[x(G),L("clean",{keys:Q},S.MULTISIG_GAS,new y.default("0"))]:[]})}get2faDisableKeyConversionActions(){return h(this,void 0,void 0,function*(){const{accountId:G}=this,Q=(yield this.getAccessKeys()).filter(({access_key:J})=>"FullAccess"!==J.permission).filter(({access_key:J})=>{const Z=J.permission.FunctionCall;return Z.receiver_id===G&&4===Z.method_names.length&&Z.method_names.includes("add_request_and_confirm")}),q=w.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:G})).publicKey);return[P(q),...Q.map(({public_key:J})=>P(w.PublicKey.from(J))),...Q.map(({public_key:J})=>A(w.PublicKey.from(J),T()))]})}disable(G,W){return h(this,void 0,void 0,function*(){const{stateStatus:Q}=yield this.checkMultisigCodeAndStateStatus();if(Q!==_.MultisigStateStatus.VALID_STATE&&Q!==_.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let q;yield this.deleteAllRequests().catch(ee=>q=ee);const Z=[...yield this.get2faDisableCleanupActions(W).catch(ee=>{throw"ContractHasExistingState"===ee.type&&q||ee}),...yield this.get2faDisableKeyConversionActions(),x(G)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:Z})})}sendCodeDefault(){return h(this,void 0,void 0,function*(){const{accountId:G}=this,{requestId:W}=this.getRequest(),Q=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:G,method:Q,requestId:W}),W})}getCodeDefault(){return h(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return h(this,void 0,void 0,function*(){const G=yield this.get2faMethod(),W=yield this.getCode(G);try{return yield this.verifyCode(W)}catch(Q){if(console.warn("Error validating security code:",Q),Q.toString().includes("invalid 2fa code provided")||Q.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw Q}})}verifyCodeDefault(G){return h(this,void 0,void 0,function*(){const{accountId:W}=this,Q=this.getRequest();if(!Q)throw new Error("no request pending");const{requestId:q}=Q;return yield this.postSignedJson("/2fa/verify",{accountId:W,securityCode:G,requestId:q})})}getRecoveryMethods(){return h(this,void 0,void 0,function*(){const{accountId:G}=this;return{accountId:G,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:G})}})}get2faMethod(){return h(this,void 0,void 0,function*(){let{data:G}=yield this.getRecoveryMethods();if(G&&G.length&&(G=G.find(q=>0===q.kind.indexOf("2fa-"))),!G)return null;const{kind:W,detail:Q}=G;return{kind:W,detail:Q}})}signatureFor(){return h(this,void 0,void 0,function*(){const{accountId:G}=this,Q=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),q=yield this.connection.signer.signMessage(Buffer.from(Q),G,this.connection.networkId);return{blockNumber:Q,blockNumberSignature:Buffer.from(q.signature).toString("base64")}})}postSignedJson(G,W){return h(this,void 0,void 0,function*(){return yield(0,l.fetchJson)(this.helperUrl+G,JSON.stringify(Object.assign(Object.assign({},W),yield this.signatureFor())))})}}s.Account2FA=j;const B=V=>w.PublicKey.from(V)},29853:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.UrlAccountCreator=s.LocalAccountCreator=s.AccountCreator=void 0;const M=p(50242);class w{}s.AccountCreator=w;s.LocalAccountCreator=class E extends w{constructor(y,b){super(),this.masterAccount=y,this.initialBalance=b}createAccount(y,b){return h(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(y,b,this.initialBalance)})}};s.UrlAccountCreator=class l extends w{constructor(y,b){super(),this.connection=y,this.helperUrl=b}createAccount(y,b){return h(this,void 0,void 0,function*(){yield(0,M.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:y,newAccountPublicKey:b.toString()}))})}}},63565:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(x,T,L,N){return new(L||(L=Promise))(function(B,V){function G(q){try{Q(N.next(q))}catch(J){V(J)}}function W(q){try{Q(N.throw(q))}catch(J){V(J)}}function Q(q){q.done?B(q.value):function j(B){return B instanceof L?B:new L(function(V){V(B)})}(q.value).then(G,W)}Q((N=N.apply(x,T||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.AccountMultisig=void 0;const M=p(86184),w=p(99139),E=p(76401),l=p(25929),{deployContract:m,functionCall:y}=M.actionCreators;var b,x;(x=b||(b={}))[x.INVALID_CODE=0]="INVALID_CODE",x[x.VALID_CODE=1]="VALID_CODE",x[x.UNKNOWN_CODE=2]="UNKNOWN_CODE";const S={[E.MULTISIG_STORAGE_KEY]:null};class _ extends w.Account{constructor(T,L,N){super(T,L),this.storage=N.storage,this.onAddRequestResult=N.onAddRequestResult}signAndSendTransactionWithAccount(T,L){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){return N.signAndSendTransaction.call(this,{receiverId:T,actions:L})})}signAndSendTransaction({receiverId:T,actions:L}){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const{accountId:j}=this,B=Buffer.from(JSON.stringify({request:{receiver_id:T,actions:P(L,j,T)}}));let V;try{V=yield N.signAndSendTransaction.call(this,{receiverId:j,actions:[y("add_request_and_confirm",B,E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]})}catch(W){if(W.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:T,actions:L});throw W}if(!V.status)throw new Error("Request failed");const G=Object.assign({},V.status);if(!G.SuccessValue||"string"!=typeof G.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:j,actions:L,requestId:parseInt(Buffer.from(G.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(V)),this.deleteUnconfirmedRequests(),V})}checkMultisigCodeAndStateStatus(T){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const j=T?b.UNKNOWN_CODE:b.VALID_CODE;try{return T?yield L.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[m(T),y("delete_request",{request_id:4294967295},E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:b.VALID_CODE,stateStatus:l.MultisigStateStatus.VALID_STATE}}catch(B){if(new RegExp(l.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(B&&B.kind&&B.kind.ExecutionError))return{codeStatus:j,stateStatus:l.MultisigStateStatus.INVALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(B&&B.kind&&B.kind.ExecutionError))return{codeStatus:j,stateStatus:l.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(l.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(B&&B.kind&&B.kind.ExecutionError))return{codeStatus:j,stateStatus:l.MultisigStateStatus.VALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(B&&B.message))return{codeStatus:b.INVALID_CODE,stateStatus:l.MultisigStateStatus.UNKNOWN_STATE};throw B}})}deleteRequest(T){return super.signAndSendTransaction({receiverId:this.accountId,actions:[y("delete_request",{request_id:T},E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return h(this,void 0,void 0,function*(){const T=yield this.getRequestIds();T.length&&(yield Promise.all(T.map(L=>this.deleteRequest(L))))})}deleteUnconfirmedRequests(){const T=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const L=yield this.getRequestIds(),{requestId:N}=this.getRequest();for(const j of L)if(j!=N)try{yield T.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[y("delete_request",{request_id:j},E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]})}catch{console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return h(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(E.MULTISIG_STORAGE_KEY)||"{}"):S[E.MULTISIG_STORAGE_KEY]}setRequest(T){if(this.storage)return this.storage.setItem(E.MULTISIG_STORAGE_KEY,JSON.stringify(T));S[E.MULTISIG_STORAGE_KEY]=T}}s.AccountMultisig=_;const A=x=>x.toString().replace("ed25519:",""),P=(x,T,L)=>x.map(N=>{const j=N.enum,{gas:B,publicKey:V,methodName:G,args:W,deposit:Q,accessKey:q,code:J}=N[j],Z={type:j[0].toUpperCase()+j.substr(1),gas:B&&B.toString()||void 0,public_key:V&&A(V)||void 0,method_name:G,args:W&&Buffer.from(W).toString("base64")||void 0,code:J&&Buffer.from(J).toString("base64")||void 0,amount:Q&&Q.toString()||void 0,deposit:Q&&Q.toString()||"0",permission:void 0};if(q&&(L===T&&"fullAccess"!==q.permission.enum&&(Z.permission={receiver_id:T,allowance:E.MULTISIG_ALLOWANCE.toString(),method_names:E.MULTISIG_CHANGE_METHODS}),"functionCall"===q.permission.enum)){const{receiverId:ee,methodNames:I,allowance:o}=q.permission.functionCall;Z.permission={receiver_id:ee,allowance:o&&o.toString()||void 0,method_names:I}}return Z})},27525:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Connection=void 0;const h=p(65297),M=p(50242);class l{constructor(y,b,S,_){this.networkId=y,this.provider=b,this.signer=S,this.jsvmAccountId=_}static fromConfig(y){const b=function w(m){switch(m.type){case void 0:return m;case"JsonRpcProvider":return new M.JsonRpcProvider(Object.assign({},m.args));default:throw new Error(`Unknown provider type ${m.type}`)}}(y.provider),S=function E(m){switch(m.type){case void 0:return m;case"InMemorySigner":return new h.InMemorySigner(m.keyStore);default:throw new Error(`Unknown signer type ${m.type}`)}}(y.signer);return new l(y.networkId,b,S,y.jsvmAccountId)}}s.Connection=l},76401:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(s,"__esModule",{value:!0}),s.MULTISIG_CONFIRM_METHODS=s.MULTISIG_CHANGE_METHODS=s.MULTISIG_DEPOSIT=s.MULTISIG_GAS=s.MULTISIG_ALLOWANCE=s.MULTISIG_STORAGE_KEY=void 0;const M=p(41166),w=h(p(98538));s.MULTISIG_STORAGE_KEY="__multisigRequest",s.MULTISIG_ALLOWANCE=new w.default((0,M.parseNearAmount)("1")),s.MULTISIG_GAS=new w.default("100000000000000"),s.MULTISIG_DEPOSIT=new w.default("0"),s.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],s.MULTISIG_CONFIRM_METHODS=["confirm"]},13724:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(B,V,G,W){return new(G||(G=Promise))(function(q,J){function Z(o){try{I(W.next(o))}catch(a){J(a)}}function ee(o){try{I(W.throw(o))}catch(a){J(a)}}function I(o){o.done?q(o.value):function Q(q){return q instanceof G?q:new G(function(J){J(q)})}(o.value).then(Z,ee)}I((W=W.apply(B,V||[])).next())})},M=this&&this.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(s,"__esModule",{value:!0}),s.Contract=void 0;const w=p(41166),E=p(17527),l=M(p(74411)),m=M(p(26474)),y=M(p(98538)),b=M(p(89176)),S=p(84778),_=p(45817);function A(B,V){return{[B]:(...G)=>V(...G)}[B]}function P(B,V,G,W){var Q;if(!L(B))return;if(V.params&&V.params.serialization_type!==S.AbiSerializationType.Json)throw new _.UnsupportedSerializationError(V.name,V.params.serialization_type);if(V.result&&V.result.serialization_type!==S.AbiSerializationType.Json)throw new _.UnsupportedSerializationError(V.name,V.result.serialization_type);const q=(null===(Q=V.params)||void 0===Q?void 0:Q.args)||[];for(const J of q){const Z=B[J.name],ee=J.type_schema;ee.definitions=W.body.root_schema.definitions;const I=G.compile(ee);if(!I(Z))throw new _.ArgumentSchemaError(J.name,I.errors)}for(const J of Object.keys(B))if(!q.find(ee=>ee.name===J))throw new _.UnknownArgumentError(J,q.map(ee=>ee.name))}const T=B=>B&&void 0!==B.byteLength&&B.byteLength===B.length,L=B=>"[object Object]"===Object.prototype.toString.call(B);s.Contract=class N{constructor(V,G,W){this.account=V,this.contractId=G;const{viewMethods:Q=[],changeMethods:q=[],abi:J}=W;let Z=Q.map(o=>({name:o,abi:null})),ee=q.map(o=>({name:o,abi:null}));if(J){if(Z.length>0||ee.length>0)throw new _.ConflictingOptions;Z=J.body.functions.filter(o=>o.kind===S.AbiFunctionKind.View).map(o=>({name:o.name,abi:o})),ee=J.body.functions.filter(o=>o.kind===S.AbiFunctionKind.Call).map(o=>({name:o.name,abi:o}))}const I=function x(){const B=new l.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,m.default)(B),B}();Z.forEach(({name:o,abi:a})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(d={},g={},...D)=>h(this,void 0,void 0,function*(){if(D.length||!L(d)&&!T(d)||!L(g))throw new E.PositionalArgsError;return a&&P(d,a,I,J),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:d},g))}))})}),ee.forEach(({name:o,abi:a})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(...d)=>h(this,void 0,void 0,function*(){if(d.length&&(d.length>3||!L(d[0])&&!T(d[0])))throw new E.PositionalArgsError;return(d.length>1||!(d[0]&&d[0].args))&&((0,b.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),d[0]={args:d[0],gas:d[1],amount:d[2]}),a&&P(d[0].args,a,I,J),this._changeMethod(Object.assign({methodName:o},d[0]))}))})})}_changeMethod({args:V,methodName:G,gas:W,amount:Q,meta:q,callbackUrl:J}){return h(this,void 0,void 0,function*(){!function j(B){const V="number, decimal string or BN";for(const G of Object.keys(B)){const W=B[G];if(W&&!y.default.isBN(W)&&isNaN(W))throw new E.ArgumentTypeError(G,V,W)}}({gas:W,amount:Q});const Z=yield this.account.functionCall({contractId:this.contractId,methodName:G,args:V,gas:W,attachedDeposit:Q,walletMeta:q,walletCallbackUrl:J});return(0,w.getTransactionLastResult)(Z)})}}},45817:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ConflictingOptions=s.ArgumentSchemaError=s.UnknownArgumentError=s.UnsupportedSerializationError=void 0;class p extends Error{constructor(l,m){super(`Contract method '${l}' is using an unsupported serialization type ${m}`)}}s.UnsupportedSerializationError=p;class h extends Error{constructor(l,m){super(`Unrecognized argument '${l}', expected '${JSON.stringify(m)}'`)}}s.UnknownArgumentError=h;class M extends Error{constructor(l,m){super(`Argument '${l}' does not conform to the specified ABI schema: '${JSON.stringify(m)}'`)}}s.ArgumentSchemaError=M;class w extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}s.ConflictingOptions=w},31221:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MultisigStateStatus=s.MultisigDeleteRequestRejectionError=s.UnsupportedSerializationError=s.UnknownArgumentError=s.ConflictingOptions=s.ArgumentSchemaError=s.Contract=s.MULTISIG_CONFIRM_METHODS=s.MULTISIG_CHANGE_METHODS=s.MULTISIG_DEPOSIT=s.MULTISIG_GAS=s.MULTISIG_ALLOWANCE=s.MULTISIG_STORAGE_KEY=s.Connection=s.AccountMultisig=s.UrlAccountCreator=s.LocalAccountCreator=s.AccountCreator=s.Account2FA=s.Account=void 0;var h=p(99139);Object.defineProperty(s,"Account",{enumerable:!0,get:function(){return h.Account}});var M=p(95760);Object.defineProperty(s,"Account2FA",{enumerable:!0,get:function(){return M.Account2FA}});var w=p(29853);Object.defineProperty(s,"AccountCreator",{enumerable:!0,get:function(){return w.AccountCreator}}),Object.defineProperty(s,"LocalAccountCreator",{enumerable:!0,get:function(){return w.LocalAccountCreator}}),Object.defineProperty(s,"UrlAccountCreator",{enumerable:!0,get:function(){return w.UrlAccountCreator}});var E=p(63565);Object.defineProperty(s,"AccountMultisig",{enumerable:!0,get:function(){return E.AccountMultisig}});var l=p(27525);Object.defineProperty(s,"Connection",{enumerable:!0,get:function(){return l.Connection}});var m=p(76401);Object.defineProperty(s,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return m.MULTISIG_STORAGE_KEY}}),Object.defineProperty(s,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return m.MULTISIG_ALLOWANCE}}),Object.defineProperty(s,"MULTISIG_GAS",{enumerable:!0,get:function(){return m.MULTISIG_GAS}}),Object.defineProperty(s,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return m.MULTISIG_DEPOSIT}}),Object.defineProperty(s,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return m.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(s,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return m.MULTISIG_CONFIRM_METHODS}});var y=p(13724);Object.defineProperty(s,"Contract",{enumerable:!0,get:function(){return y.Contract}});var b=p(45817);Object.defineProperty(s,"ArgumentSchemaError",{enumerable:!0,get:function(){return b.ArgumentSchemaError}}),Object.defineProperty(s,"ConflictingOptions",{enumerable:!0,get:function(){return b.ConflictingOptions}}),Object.defineProperty(s,"UnknownArgumentError",{enumerable:!0,get:function(){return b.UnknownArgumentError}}),Object.defineProperty(s,"UnsupportedSerializationError",{enumerable:!0,get:function(){return b.UnsupportedSerializationError}});var S=p(25929);Object.defineProperty(s,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return S.MultisigDeleteRequestRejectionError}}),Object.defineProperty(s,"MultisigStateStatus",{enumerable:!0,get:function(){return S.MultisigStateStatus}})},25929:(ne,s)=>{"use strict";var M;Object.defineProperty(s,"__esModule",{value:!0}),s.MultisigStateStatus=s.MultisigDeleteRequestRejectionError=void 0,(M=s.MultisigDeleteRequestRejectionError||(s.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",M.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",M.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",M.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",M.METHOD_NOT_FOUND="Contract method is not found",function(M){M[M.INVALID_STATE=0]="INVALID_STATE",M[M.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",M[M.VALID_STATE=2]="VALID_STATE",M[M.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(s.MultisigStateStatus||(s.MultisigStateStatus={}))},89182:(ne,s)=>{"use strict";var h;Object.defineProperty(s,"__esModule",{value:!0}),s.KeyType=void 0,(h=s.KeyType||(s.KeyType={}))[h.ED25519=0]="ED25519"},35425:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.PublicKey=s.KeyPairEd25519=s.KeyPair=s.KeyType=void 0;var h=p(89182);Object.defineProperty(s,"KeyType",{enumerable:!0,get:function(){return h.KeyType}});var M=p(47994);Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return M.KeyPair}});var w=p(96136);Object.defineProperty(s,"KeyPairEd25519",{enumerable:!0,get:function(){return w.KeyPairEd25519}});var E=p(97845);Object.defineProperty(s,"PublicKey",{enumerable:!0,get:function(){return E.PublicKey}})},47994:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyPair=void 0;const h=p(30045),M=p(96136);class w extends h.KeyPairBase{static fromRandom(l){if("ED25519"===l.toUpperCase())return M.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${l}`)}static fromString(l){const m=l.split(":");if(1===m.length)return new M.KeyPairEd25519(m[0]);if(2===m.length){if("ED25519"===m[0].toUpperCase())return new M.KeyPairEd25519(m[1]);throw new Error(`Unknown curve: ${m[0]}`)}throw new Error("Invalid encoded key format, must be :")}}s.KeyPair=w},30045:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyPairBase=void 0;s.KeyPairBase=class p{}},96136:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(s,"__esModule",{value:!0}),s.KeyPairEd25519=void 0;const M=p(21531),w=h(p(40489)),E=p(89182),l=p(30045),m=p(97845);class y extends l.KeyPairBase{constructor(S){super();const _=w.default.sign.keyPair.fromSecretKey((0,M.baseDecode)(S));this.publicKey=new m.PublicKey({keyType:E.KeyType.ED25519,data:_.publicKey}),this.secretKey=S}static fromRandom(){const S=w.default.sign.keyPair();return new y((0,M.baseEncode)(S.secretKey))}sign(S){return{signature:w.default.sign.detached(S,(0,M.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(S,_){return this.publicKey.verify(S,_)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}s.KeyPairEd25519=y},97845:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(s,"__esModule",{value:!0}),s.PublicKey=void 0;const M=p(17527),w=p(21531),E=h(p(40489)),l=p(89182);class b extends M.Assignable{static from(_){return"string"==typeof _?b.fromString(_):_}static fromString(_){const A=_.split(":");let P,x=l.KeyType.ED25519;if(1===A.length)P=A[0];else{if(2!==A.length)throw new Error("Invalid encoded key format, must be :");P=A[1],x=function y(S){if("ed25519"===S.toLowerCase())return l.KeyType.ED25519;throw new Error(`Unknown key type ${S}`)}(A[0])}const T=(0,w.baseDecode)(P);if(T.length!==E.default.box.publicKeyLength)throw new Error(`Invalid public key size (${T.length}), must be ${E.default.box.publicKeyLength}`);return new b({keyType:x,data:T})}toString(){return`${function m(S){if(S===l.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${S}`)}(this.keyType)}:${(0,w.baseEncode)(this.data)}`}verify(_,A){if(this.keyType===l.KeyType.ED25519)return E.default.sign.detached.verify(_,A,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}s.PublicKey=b},34035:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserLocalStorageKeyStore=void 0;const M=p(35425),w=p(64296);class l extends w.KeyStore{constructor(y=window.localStorage,b="near-api-js:keystore:"){super(),this.localStorage=y,this.prefix=b}setKey(y,b,S){return h(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(y,b),S.toString())})}getKey(y,b){return h(this,void 0,void 0,function*(){const S=this.localStorage.getItem(this.storageKeyForSecretKey(y,b));return S?M.KeyPair.fromString(S):null})}removeKey(y,b){return h(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(y,b))})}clear(){return h(this,void 0,void 0,function*(){for(const y of this.storageKeys())y.startsWith(this.prefix)&&this.localStorage.removeItem(y)})}getNetworks(){return h(this,void 0,void 0,function*(){const y=new Set;for(const b of this.storageKeys())if(b.startsWith(this.prefix)){const S=b.substring(this.prefix.length).split(":");y.add(S[1])}return Array.from(y.values())})}getAccounts(y){return h(this,void 0,void 0,function*(){const b=new Array;for(const S of this.storageKeys())if(S.startsWith(this.prefix)){const _=S.substring(this.prefix.length).split(":");_[1]===y&&b.push(_[0])}return b})}storageKeyForSecretKey(y,b){return`${this.prefix}${b}:${y}`}*storageKeys(){for(let y=0;y{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserLocalStorageKeyStore=void 0;var h=p(34035);Object.defineProperty(s,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return h.BrowserLocalStorageKeyStore}})},97256:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(l,m,y,b){return new(y||(y=Promise))(function(_,A){function P(L){try{T(b.next(L))}catch(N){A(N)}}function x(L){try{T(b.throw(L))}catch(N){A(N)}}function T(L){L.done?_(L.value):function S(_){return _ instanceof y?_:new y(function(A){A(_)})}(L.value).then(P,x)}T((b=b.apply(l,m||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.InMemoryKeyStore=void 0;const M=p(35425),w=p(52589);class E extends w.KeyStore{constructor(){super(),this.keys={}}setKey(m,y,b){return h(this,void 0,void 0,function*(){this.keys[`${y}:${m}`]=b.toString()})}getKey(m,y){return h(this,void 0,void 0,function*(){const b=this.keys[`${y}:${m}`];return b?M.KeyPair.fromString(b):null})}removeKey(m,y){return h(this,void 0,void 0,function*(){delete this.keys[`${y}:${m}`]})}clear(){return h(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return h(this,void 0,void 0,function*(){const m=new Set;return Object.keys(this.keys).forEach(y=>{const b=y.split(":");m.add(b[1])}),Array.from(m.values())})}getAccounts(m){return h(this,void 0,void 0,function*(){const y=new Array;return Object.keys(this.keys).forEach(b=>{const S=b.split(":");S[S.length-1]===m&&y.push(S.slice(0,S.length-1).join(":"))}),y})}toString(){return"InMemoryKeyStore"}}s.InMemoryKeyStore=E},64296:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=s.KeyStore=s.InMemoryKeyStore=void 0;var h=p(97256);Object.defineProperty(s,"InMemoryKeyStore",{enumerable:!0,get:function(){return h.InMemoryKeyStore}});var M=p(52589);Object.defineProperty(s,"KeyStore",{enumerable:!0,get:function(){return M.KeyStore}});var w=p(95094);Object.defineProperty(s,"MergeKeyStore",{enumerable:!0,get:function(){return w.MergeKeyStore}})},52589:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyStore=void 0;s.KeyStore=class p{}},95094:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(E,l,m,y){return new(m||(m=Promise))(function(S,_){function A(T){try{x(y.next(T))}catch(L){_(L)}}function P(T){try{x(y.throw(T))}catch(L){_(L)}}function x(T){T.done?S(T.value):function b(S){return S instanceof m?S:new m(function(_){_(S)})}(T.value).then(A,P)}x((y=y.apply(E,l||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=void 0;const M=p(52589);class w extends M.KeyStore{constructor(l,m={writeKeyStoreIndex:0}){super(),this.options=m,this.keyStores=l}setKey(l,m,y){return h(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(l,m,y)})}getKey(l,m){return h(this,void 0,void 0,function*(){for(const y of this.keyStores){const b=yield y.getKey(l,m);if(b)return b}return null})}removeKey(l,m){return h(this,void 0,void 0,function*(){for(const y of this.keyStores)yield y.removeKey(l,m)})}clear(){return h(this,void 0,void 0,function*(){for(const l of this.keyStores)yield l.clear()})}getNetworks(){return h(this,void 0,void 0,function*(){const l=new Set;for(const m of this.keyStores)for(const y of yield m.getNetworks())l.add(y);return Array.from(l)})}getAccounts(l){return h(this,void 0,void 0,function*(){const m=new Set;for(const y of this.keyStores)for(const b of yield y.getAccounts(l))m.add(b);return Array.from(m)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}s.MergeKeyStore=w},89645:function(ne,s){"use strict";var p=this&&this.__awaiter||function(w,E,l,m){return new(l||(l=Promise))(function(b,S){function _(x){try{P(m.next(x))}catch(T){S(T)}}function A(x){try{P(m.throw(x))}catch(T){S(T)}}function P(x){x.done?b(x.value):function y(b){return b instanceof l?b:new l(function(S){S(b)})}(x.value).then(_,A)}P((m=m.apply(w,E||[])).next())})};function M(w){return new Promise(E=>setTimeout(E,w))}Object.defineProperty(s,"__esModule",{value:!0}),s.exponentialBackoff=void 0,s.exponentialBackoff=function h(w,E,l,m){return p(this,void 0,void 0,function*(){let y=w;for(let b=0;b!process.env.NEAR_NO_LOGS&&console.warn(...T);s.fetchJson=function x(T,L){return E(this,void 0,void 0,function*(){let N={url:null};"string"==typeof T?N.url=T:N=T;const j=yield(0,b.exponentialBackoff)(S,A,_,()=>E(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>w(p(11681)))).default);const B=yield global.fetch(N.url,{method:L?"POST":"GET",body:L||void 0,headers:Object.assign(Object.assign({},N.headers),{"Content-Type":"application/json"})});if(!B.ok){if(503===B.status)return P(`Retrying HTTP request for ${N.url} as it's not available now`),null;throw(0,y.default)(B.status,yield B.text())}return B}catch(B){if(B.toString().includes("FetchError")||B.toString().includes("Failed to fetch"))return P(`Retrying HTTP request for ${N.url} because of error: ${B}`),null;throw B}}));if(!j)throw new m.TypedError(`Exceeded ${A} attempts for ${N.url}.`,"RetriesExceeded");return yield j.json()})}},50242:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.fetchJson=s.Provider=s.JsonRpcProvider=s.exponentialBackoff=void 0;var h=p(89645);Object.defineProperty(s,"exponentialBackoff",{enumerable:!0,get:function(){return h.exponentialBackoff}});var M=p(86748);Object.defineProperty(s,"JsonRpcProvider",{enumerable:!0,get:function(){return M.JsonRpcProvider}});var w=p(40961);Object.defineProperty(s,"Provider",{enumerable:!0,get:function(){return w.Provider}});var E=p(68226);Object.defineProperty(s,"fetchJson",{enumerable:!0,get:function(){return E.fetchJson}})},86748:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(L,N,j,B){return new(j||(j=Promise))(function(G,W){function Q(Z){try{J(B.next(Z))}catch(ee){W(ee)}}function q(Z){try{J(B.throw(Z))}catch(ee){W(ee)}}function J(Z){Z.done?G(Z.value):function V(G){return G instanceof j?G:new j(function(W){W(G)})}(Z.value).then(Q,q)}J((B=B.apply(L,N||[])).next())})},M=this&&this.__rest||function(L,N){var j={};for(var B in L)Object.prototype.hasOwnProperty.call(L,B)&&N.indexOf(B)<0&&(j[B]=L[B]);if(null!=L&&"function"==typeof Object.getOwnPropertySymbols){var V=0;for(B=Object.getOwnPropertySymbols(L);Vh(this,void 0,void 0,function*(){try{const G={method:N,params:j,id:x++,jsonrpc:"2.0"},W=yield(0,S.fetchJson)(this.connection,JSON.stringify(G));if(W.error){if("object"==typeof W.error.data)throw"string"==typeof W.error.data.error_message&&"string"==typeof W.error.data.error_type?new E.TypedError(W.error.data.error_message,W.error.data.error_type):(0,w.parseRpcError)(W.error.data);{const Q=`[${W.error.code}] ${W.error.message}: ${W.error.data}`;throw"Timeout"===W.error.data||Q.includes("Timeout error")||Q.includes("query has timed out")?new E.TypedError(Q,"TimeoutError"):new E.TypedError(Q,(0,w.getErrorTypeFromErrorMessage)(W.error.data,W.error.name))}}return W}catch(G){if("TimeoutError"===G.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${N} as it has timed out`,j),null;throw G}})),{result:V}=B;if(typeof V>"u")throw new E.TypedError(`Exceeded 12 attempts for request to ${N}.`,"RetriesExceeded");return V})}}s.JsonRpcProvider=T},40961:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Provider=void 0;s.Provider=class p{}},19222:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(b,S,_,A){return new(_||(_=Promise))(function(x,T){function L(B){try{j(A.next(B))}catch(V){T(V)}}function N(B){try{j(A.throw(B))}catch(V){T(V)}}function j(B){B.done?x(B.value):function P(x){return x instanceof _?x:new _(function(T){T(x)})}(B.value).then(L,N)}j((A=A.apply(b,S||[])).next())})},M=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(s,"__esModule",{value:!0}),s.InMemorySigner=void 0;const w=p(35425),E=p(64296),l=M(p(1520)),m=p(45024);class y extends m.Signer{constructor(S){super(),this.keyStore=S}static fromKeyPair(S,_,A){return h(this,void 0,void 0,function*(){const P=new E.InMemoryKeyStore;return yield P.setKey(S,_,A),new y(P)})}createKey(S,_){return h(this,void 0,void 0,function*(){const A=w.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(_,S,A),A.getPublicKey()})}getPublicKey(S,_){return h(this,void 0,void 0,function*(){const A=yield this.keyStore.getKey(_,S);return null===A?null:A.getPublicKey()})}signMessage(S,_,A){return h(this,void 0,void 0,function*(){const P=new Uint8Array(l.default.sha256.array(S));if(!_)throw new Error("InMemorySigner requires provided account id");const x=yield this.keyStore.getKey(A,_);if(null===x)throw new Error(`Key for ${_} not found in ${A}`);return x.sign(P)})}toString(){return`InMemorySigner(${this.keyStore})`}}s.InMemorySigner=y},65297:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signer=s.InMemorySigner=void 0;var h=p(19222);Object.defineProperty(s,"InMemorySigner",{enumerable:!0,get:function(){return h.InMemorySigner}});var M=p(45024);Object.defineProperty(s,"Signer",{enumerable:!0,get:function(){return M.Signer}})},45024:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signer=void 0;s.Signer=class p{}},94790:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.actionCreators=s.stringifyJsonOrBytes=void 0;const h=p(99963);function m(T){return void 0!==T.byteLength&&T.byteLength===T.length?T:Buffer.from(JSON.stringify(T))}s.stringifyJsonOrBytes=m,s.actionCreators={addKey:function _(T,L){return new h.Action({addKey:new h.AddKey({publicKey:T,accessKey:L})})},createAccount:function E(){return new h.Action({createAccount:new h.CreateAccount({})})},deleteAccount:function P(T){return new h.Action({deleteAccount:new h.DeleteAccount({beneficiaryId:T})})},deleteKey:function A(T){return new h.Action({deleteKey:new h.DeleteKey({publicKey:T})})},deployContract:function l(T){return new h.Action({deployContract:new h.DeployContract({code:T})})},fullAccessKey:function M(){return new h.AccessKey({permission:new h.AccessKeyPermission({fullAccess:new h.FullAccessPermission({})})})},functionCall:function y(T,L,N,j,B=m,V=!1){return V?new h.Action({functionCall:new h.FunctionCall({methodName:T,args:L,gas:N,deposit:j})}):new h.Action({functionCall:new h.FunctionCall({methodName:T,args:B(L),gas:N,deposit:j})})},functionCallAccessKey:function w(T,L,N){return new h.AccessKey({permission:new h.AccessKeyPermission({functionCall:new h.FunctionCallPermission({receiverId:T,allowance:N,methodNames:L})})})},signedDelegate:function x({delegateAction:T,signature:L}){return new h.Action({signedDelegate:new h.SignedDelegate({delegateAction:T,signature:L})})},stake:function S(T,L){return new h.Action({stake:new h.Stake({stake:T,publicKey:L})})},transfer:function b(T){return new h.Action({transfer:new h.Transfer({deposit:T})})}}},99963:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Action=s.SignedDelegate=s.DeleteAccount=s.DeleteKey=s.AddKey=s.Stake=s.Transfer=s.FunctionCall=s.DeployContract=s.CreateAccount=s.IAction=s.AccessKey=s.AccessKeyPermission=s.FullAccessPermission=s.FunctionCallPermission=void 0;const h=p(17527);class M{constructor(V){if(1!==Object.keys(V).length)throw new Error("Enum can only take single value");Object.keys(V).map(G=>{this[G]=V[G],this.enum=G})}}class w extends h.Assignable{}s.FunctionCallPermission=w;class E extends h.Assignable{}s.FullAccessPermission=E;s.AccessKeyPermission=class l extends M{};class m extends h.Assignable{}s.AccessKey=m;class y extends h.Assignable{}s.IAction=y;s.CreateAccount=class b extends y{};s.DeployContract=class S extends y{};s.FunctionCall=class _ extends y{};s.Transfer=class A extends y{};s.Stake=class P extends y{};s.AddKey=class x extends y{};s.DeleteKey=class T extends y{};s.DeleteAccount=class L extends y{};s.SignedDelegate=class N extends y{};s.Action=class j extends M{}},65326:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.createTransaction=void 0;const h=p(23704);s.createTransaction=function M(w,E,l,m,y,b){return new h.Transaction({signerId:w,publicKey:E,nonce:m,receiverId:l,actions:y,blockHash:b})}},65080:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.buildDelegateAction=s.DelegateAction=void 0;const h=p(17527),M=p(94790),{addKey:w,createAccount:E,deleteAccount:l,deleteKey:m,deployContract:y,functionCall:b,stake:S,transfer:_}=M.actionCreators;class A extends h.Assignable{}s.DelegateAction=A,s.buildDelegateAction=function P({actions:x,maxBlockHeight:T,nonce:L,publicKey:N,receiverId:j,senderId:B}){return new A({senderId:B,receiverId:j,actions:x.map(V=>{if(!V.type&&!V.params)return V;switch(V.type){case"AddKey":{const{publicKey:G,accessKey:W}=V.params;return w(G,W)}case"CreateAccount":return E(V.params.createAccount);case"DeleteAccount":return l(V.params.deleteAccount);case"DeleteKey":return m(V.params.publicKey);case"DeployContract":return y(V.params.code);case"FunctionCall":{const{methodName:G,args:W,gas:Q,deposit:q}=V.params;return b(G,W,Q,q)}case"Stake":return S(V.params.stake,V.params.publicKey);case"Transfer":{const{deposit:G}=V.params;return _(G)}}throw new Error("Unrecognized action")}),nonce:L,maxBlockHeight:T,publicKey:N})}},86184:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(w,E,l,m){void 0===m&&(m=l);var y=Object.getOwnPropertyDescriptor(E,l);(!y||("get"in y?!E.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return E[l]}}),Object.defineProperty(w,m,y)}:function(w,E,l,m){void 0===m&&(m=l),w[m]=E[l]}),M=this&&this.__exportStar||function(w,E){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(E,l)&&h(E,w,l)};Object.defineProperty(s,"__esModule",{value:!0}),M(p(94790),s),M(p(99963),s),M(p(65326),s),M(p(65080),s),M(p(23704),s),M(p(64040),s),M(p(67540),s)},33004:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.DelegateActionPrefix=void 0;const h=p(17527),M=Math.pow(2,30),w_MetaTransactions=366;class E extends h.Assignable{}class l extends E{constructor(b){super({prefix:M+b})}}s.DelegateActionPrefix=class m extends l{constructor(){super(w_MetaTransactions)}}},23704:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SCHEMA=s.SignedTransaction=s.Transaction=s.decodeSignedTransaction=s.decodeTransaction=s.encodeTransaction=s.encodeSignedDelegate=s.encodeDelegateAction=void 0;const h=p(35425),M=p(17527),w=p(21531),E=p(99963),l=p(65080),m=p(33004),y=p(67540);function _(L){return(0,w.serialize)(s.SCHEMA,L)}function A(L){return(0,w.deserialize)(s.SCHEMA,x,L)}function P(L){return(0,w.deserialize)(s.SCHEMA,T,L)}s.encodeDelegateAction=function b(L){return new Uint8Array([...(0,w.serialize)(s.SCHEMA,new m.DelegateActionPrefix),...(0,w.serialize)(s.SCHEMA,L)])},s.encodeSignedDelegate=function S(L){return(0,w.serialize)(s.SCHEMA,L)},s.encodeTransaction=_,s.decodeTransaction=A,s.decodeSignedTransaction=P;class x extends M.Assignable{encode(){return _(this)}static decode(N){return A(N)}}s.Transaction=x;class T extends M.Assignable{encode(){return _(this)}static decode(N){return P(N)}}s.SignedTransaction=T,s.SCHEMA=new Map([[y.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[T,{kind:"struct",fields:[["transaction",x],["signature",y.Signature]]}],[x,{kind:"struct",fields:[["signerId","string"],["publicKey",h.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[E.Action]]]}],[h.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[E.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",E.AccessKeyPermission]]}],[E.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",E.FunctionCallPermission],["fullAccess",E.FullAccessPermission]]}],[E.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[E.FullAccessPermission,{kind:"struct",fields:[]}],[E.Action,{kind:"enum",field:"enum",values:[["createAccount",E.CreateAccount],["deployContract",E.DeployContract],["functionCall",E.FunctionCall],["transfer",E.Transfer],["stake",E.Stake],["addKey",E.AddKey],["deleteKey",E.DeleteKey],["deleteAccount",E.DeleteAccount],["signedDelegate",E.SignedDelegate]]}],[E.CreateAccount,{kind:"struct",fields:[]}],[E.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[E.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[E.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[E.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",h.PublicKey]]}],[E.AddKey,{kind:"struct",fields:[["publicKey",h.PublicKey],["accessKey",E.AccessKey]]}],[E.DeleteKey,{kind:"struct",fields:[["publicKey",h.PublicKey]]}],[E.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[l.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[E.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",h.PublicKey]]}],[m.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[E.SignedDelegate,{kind:"struct",fields:[["delegateAction",l.DelegateAction],["signature",y.Signature]]}]])},64040:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(A,P,x,T){return new(x||(x=Promise))(function(N,j){function B(W){try{G(T.next(W))}catch(Q){j(Q)}}function V(W){try{G(T.throw(W))}catch(Q){j(Q)}}function G(W){W.done?N(W.value):function L(N){return N instanceof x?N:new x(function(j){j(N)})}(W.value).then(B,V)}G((T=T.apply(A,P||[])).next())})},M=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(s,"__esModule",{value:!0}),s.signDelegateAction=s.signTransaction=void 0;const w=M(p(1520)),E=p(99963),l=p(65326),m=p(23704),y=p(67540);function b(A,P,x,T){return h(this,void 0,void 0,function*(){const L=(0,m.encodeTransaction)(A),N=new Uint8Array(w.default.sha256.array(L)),j=yield P.signMessage(L,x,T);return[N,new m.SignedTransaction({transaction:A,signature:new y.Signature({keyType:A.publicKey.keyType,data:j.signature})})]})}s.signTransaction=function S(...A){return h(this,void 0,void 0,function*(){if(A[0].constructor===m.Transaction){const[P,x,T,L]=A;return b(P,x,T,L)}{const[P,x,T,L,N,j,B]=A,V=yield N.getPublicKey(j,B);return b((0,l.createTransaction)(j,V,P,x,T,L),N,j,B)}})},s.signDelegateAction=function _({delegateAction:A,signer:P}){return h(this,void 0,void 0,function*(){const x=(0,m.encodeDelegateAction)(A),T=yield P.sign(x),L=new E.SignedDelegate({delegateAction:A,signature:new y.Signature({keyType:A.publicKey.keyType,data:T})});return{hash:new Uint8Array(w.default.sha256.array(x)),signedDelegateAction:L}})}},67540:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signature=void 0;const h=p(17527);class M extends h.Assignable{}s.Signature=M},15167:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WalletConnection=s.ConnectedWalletAccount=s.Near=void 0;var h=p(59640);Object.defineProperty(s,"Near",{enumerable:!0,get:function(){return h.Near}});var M=p(51409);Object.defineProperty(s,"ConnectedWalletAccount",{enumerable:!0,get:function(){return M.ConnectedWalletAccount}}),Object.defineProperty(s,"WalletConnection",{enumerable:!0,get:function(){return M.WalletConnection}})},59640:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})},M=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(s,"__esModule",{value:!0}),s.Near=void 0;const w=p(31221),E=M(p(98538));s.Near=class l{constructor(y){var b;if(this.config=y,this.connection=w.Connection.fromConfig({networkId:y.networkId,provider:{type:"JsonRpcProvider",args:{url:y.nodeUrl,headers:y.headers}},signer:y.signer||{type:"InMemorySigner",keyStore:y.keyStore||(null===(b=y.deps)||void 0===b?void 0:b.keyStore)},jsvmAccountId:y.jsvmAccountId||`jsvm.${y.networkId}`}),y.masterAccount){const S=y.initialBalance?new E.default(y.initialBalance):new E.default("500000000000000000000000000");this.accountCreator=new w.LocalAccountCreator(new w.Account(this.connection,y.masterAccount),S)}else y.helperUrl?this.accountCreator=new w.UrlAccountCreator(this.connection,y.helperUrl):this.accountCreator=null}account(y){return h(this,void 0,void 0,function*(){return new w.Account(this.connection,y)})}createAccount(y,b){return h(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(y,b),new w.Account(this.connection,y)})}}},51409:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(T,L,N,j){return new(N||(N=Promise))(function(V,G){function W(J){try{q(j.next(J))}catch(Z){G(Z)}}function Q(J){try{q(j.throw(J))}catch(Z){G(Z)}}function q(J){J.done?V(J.value):function B(V){return V instanceof N?V:new N(function(G){G(V)})}(J.value).then(W,Q)}q((j=j.apply(T,L||[])).next())})},M=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(s,"__esModule",{value:!0}),s.ConnectedWalletAccount=s.WalletConnection=void 0;const w=p(31221),E=p(35425),l=p(86184),m=M(p(98538)),y=p(21531),A="pending_key";s.WalletConnection=class P{constructor(L,N){if("string"!=typeof N)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(V,G)=>"isSignedIn"===G?()=>!1:"getAccountId"===G?()=>"":V[G]&&"function"==typeof V[G]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:V[G]});this._near=L;const j=N+"_wallet_auth_key",B=JSON.parse(window.localStorage.getItem(j));this._networkId=L.config.networkId,this._walletBaseUrl=L.config.walletUrl,N=N||L.config.contractName||"default",this._keyStore=L.connection.signer.keyStore,this._authData=B||{allKeys:[]},this._authDataKey=j,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return h(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:L,methodNames:N,successUrl:j,failureUrl:B}){return h(this,void 0,void 0,function*(){const V=new URL(window.location.href),G=new URL(this._walletBaseUrl+"/login/");if(G.searchParams.set("success_url",j||V.href),G.searchParams.set("failure_url",B||V.href),L){yield(yield this._near.account(L)).state(),G.searchParams.set("contract_id",L);const Q=E.KeyPair.fromRandom("ed25519");G.searchParams.set("public_key",Q.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,A+Q.getPublicKey(),Q)}N&&N.forEach(W=>{G.searchParams.append("methodNames",W)}),window.location.assign(G.toString())})}requestSignTransactions({transactions:L,meta:N,callbackUrl:j}){return h(this,void 0,void 0,function*(){const B=new URL(window.location.href),V=new URL("sign",this._walletBaseUrl);V.searchParams.set("transactions",L.map(G=>(0,y.serialize)(l.SCHEMA,G)).map(G=>Buffer.from(G).toString("base64")).join(",")),V.searchParams.set("callbackUrl",j||B.href),N&&V.searchParams.set("meta",N),window.location.assign(V.toString())})}_completeSignInWithAccessKey(){return h(this,void 0,void 0,function*(){const L=new URL(window.location.href),N=L.searchParams.get("public_key")||"",j=(L.searchParams.get("all_keys")||"").split(","),B=L.searchParams.get("account_id")||"";if(B){const V={accountId:B,allKeys:j};window.localStorage.setItem(this._authDataKey,JSON.stringify(V)),N&&(yield this._moveKeyFromTempToPermanent(B,N)),this._authData=V}L.searchParams.delete("public_key"),L.searchParams.delete("all_keys"),L.searchParams.delete("account_id"),L.searchParams.delete("meta"),L.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,L.toString())})}_moveKeyFromTempToPermanent(L,N){return h(this,void 0,void 0,function*(){const j=yield this._keyStore.getKey(this._networkId,A+N);yield this._keyStore.setKey(this._networkId,L,j),yield this._keyStore.removeKey(this._networkId,A+N)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new x(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class x extends w.Account{constructor(L,N,j){super(N,j),this.walletConnection=L}signAndSendTransaction({receiverId:L,actions:N,walletMeta:j,walletCallbackUrl:B=window.location.href}){const V=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const G=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let W=yield this.accessKeyForTransaction(L,N,G);if(!W)throw new Error(`Cannot find matching key for transaction sent to ${L}`);if(G&&G.toString()===W.public_key)try{return yield V.signAndSendTransaction.call(this,{receiverId:L,actions:N})}catch(I){if("NotEnoughAllowance"!==I.type)throw I;W=yield this.accessKeyForTransaction(L,N)}const Q=yield this.connection.provider.block({finality:"final"}),q=(0,y.baseDecode)(Q.header.hash),J=E.PublicKey.from(W.public_key),Z=W.access_key.nonce.add(new m.default(1)),ee=(0,l.createTransaction)(this.accountId,J,L,Z,N,q);return yield this.walletConnection.requestSignTransactions({transactions:[ee],meta:j,callbackUrl:B}),new Promise((I,o)=>{setTimeout(()=>{o(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(L,N,j){return h(this,void 0,void 0,function*(){const{access_key:{permission:B}}=L;if("FullAccess"===B)return!0;if(B.FunctionCall){const{receiver_id:V,method_names:G}=B.FunctionCall;if(V===this.accountId&&G.includes("add_request_and_confirm"))return!0;if(V===N){if(1!==j.length)return!1;const[{functionCall:W}]=j;return W&&(!W.deposit||"0"===W.deposit.toString())&&(0===G.length||G.includes(W.methodName))}}return!1})}accessKeyForTransaction(L,N,j){return h(this,void 0,void 0,function*(){const B=yield this.getAccessKeys();if(j){const G=B.find(W=>W.public_key.toString()===j.toString());if(G&&(yield this.accessKeyMatchesTransaction(G,L,N)))return G}const V=this.walletConnection._authData.allKeys;for(const G of B)if(-1!==V.indexOf(G.public_key)&&(yield this.accessKeyMatchesTransaction(G,L,N)))return G;return null})}}s.ConnectedWalletAccount=x},91226:(ne,s,p)=>{"use strict";var h=p(63216)("http-errors"),M=p(1106),w=p(25890),E=p(83894),l=p(77721);function m(L){return Number(String(L).charAt(0)+"00")}function P(L,N){var j=Object.getOwnPropertyDescriptor(L,"name");j&&j.configurable&&(j.value=N,Object.defineProperty(L,"name",j))}function T(L){return"Error"!==L.substr(-5)?L+"Error":L}ne.exports=function y(){for(var L,N,j=500,B={},V=0;V=600)&&h("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof j||!w[j]&&(j<400||j>=600))&&(j=500);var W=y[j]||y[m(j)];for(var Q in L||(L=W?new W(N):new Error(N||w[j]),Error.captureStackTrace(L,y)),(!W||!(L instanceof W)||L.status!==j)&&(L.expose=j<500,L.status=L.statusCode=j),B)"status"!==Q&&"statusCode"!==Q&&(L[Q]=B[Q]);return L},ne.exports.HttpError=function b(){function L(){throw new TypeError("cannot construct abstract class")}return E(L,Error),L}(),ne.exports.isHttpError=function _(L){return function(j){return!(!j||"object"!=typeof j)&&(j instanceof L||j instanceof Error&&"boolean"==typeof j.expose&&"number"==typeof j.statusCode&&j.status===j.statusCode)}}(ne.exports.HttpError),function x(L,N,j){N.forEach(function(V){var G,W=l(w[V]);switch(m(V)){case 400:G=function S(L,N,j){var B=T(N);function V(G){var W=G??w[j],Q=new Error(W);return Error.captureStackTrace(Q,V),M(Q,V.prototype),Object.defineProperty(Q,"message",{enumerable:!0,configurable:!0,value:W,writable:!0}),Object.defineProperty(Q,"name",{enumerable:!1,configurable:!0,value:B,writable:!0}),Q}return E(V,L),P(V,B),V.prototype.status=j,V.prototype.statusCode=j,V.prototype.expose=!0,V}(j,W,V);break;case 500:G=function A(L,N,j){var B=T(N);function V(G){var W=G??w[j],Q=new Error(W);return Error.captureStackTrace(Q,V),M(Q,V.prototype),Object.defineProperty(Q,"message",{enumerable:!0,configurable:!0,value:W,writable:!0}),Object.defineProperty(Q,"name",{enumerable:!1,configurable:!0,value:B,writable:!0}),Q}return E(V,L),P(V,B),V.prototype.status=j,V.prototype.statusCode=j,V.prototype.expose=!1,V}(j,W,V)}G&&(L[V]=G,L[W]=G)}),L["I'mateapot"]=h.function(L.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(ne.exports,w.codes,ne.exports.HttpError)},63216:ne=>{"use strict";function p(M,w){if("function"!=typeof M)throw new TypeError("argument fn must be a function");return M}function h(M,w,E){if(!M||"object"!=typeof M&&"function"!=typeof M)throw new TypeError("argument obj must be object");var l=Object.getOwnPropertyDescriptor(M,w);if(!l)throw new TypeError("must call property on owner object");if(!l.configurable)throw new TypeError("property must be configurable")}ne.exports=function s(M){if(!M)throw new TypeError("argument namespace is required");function w(E){}return w._file=void 0,w._ignored=!0,w._namespace=M,w._traced=!1,w._warned=Object.create(null),w.function=p,w.property=h,w}},29472:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Account=void 0;var h=p(31221);Object.defineProperty(s,"Account",{enumerable:!0,get:function(){return h.Account}})},69645:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.UrlAccountCreator=s.LocalAccountCreator=s.AccountCreator=void 0;var h=p(31221);Object.defineProperty(s,"AccountCreator",{enumerable:!0,get:function(){return h.AccountCreator}}),Object.defineProperty(s,"LocalAccountCreator",{enumerable:!0,get:function(){return h.LocalAccountCreator}}),Object.defineProperty(s,"UrlAccountCreator",{enumerable:!0,get:function(){return h.UrlAccountCreator}})},87509:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MultisigStateStatus=s.MultisigDeleteRequestRejectionError=s.MULTISIG_CONFIRM_METHODS=s.MULTISIG_CHANGE_METHODS=s.MULTISIG_DEPOSIT=s.MULTISIG_GAS=s.MULTISIG_ALLOWANCE=s.MULTISIG_STORAGE_KEY=s.AccountMultisig=s.Account2FA=void 0;var h=p(31221);Object.defineProperty(s,"Account2FA",{enumerable:!0,get:function(){return h.Account2FA}}),Object.defineProperty(s,"AccountMultisig",{enumerable:!0,get:function(){return h.AccountMultisig}}),Object.defineProperty(s,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return h.MULTISIG_STORAGE_KEY}}),Object.defineProperty(s,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return h.MULTISIG_ALLOWANCE}}),Object.defineProperty(s,"MULTISIG_GAS",{enumerable:!0,get:function(){return h.MULTISIG_GAS}}),Object.defineProperty(s,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return h.MULTISIG_DEPOSIT}}),Object.defineProperty(s,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(s,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(s,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return h.MultisigDeleteRequestRejectionError}}),Object.defineProperty(s,"MultisigStateStatus",{enumerable:!0,get:function(){return h.MultisigStateStatus}})},58050:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(E,l,m,y){return new(m||(m=Promise))(function(S,_){function A(T){try{x(y.next(T))}catch(L){_(L)}}function P(T){try{x(y.throw(T))}catch(L){_(L)}}function x(T){T.done?S(T.value):function b(S){return S instanceof m?S:new m(function(_){_(S)})}(T.value).then(A,P)}x((y=y.apply(E,l||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.connect=void 0;const M=p(49990);s.connect=function w(E){return h(this,void 0,void 0,function*(){return new M.Near(E)})}},36237:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(l,m,y,b){void 0===b&&(b=y);var S=Object.getOwnPropertyDescriptor(m,y);(!S||("get"in S?!m.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return m[y]}}),Object.defineProperty(l,b,S)}:function(l,m,y,b){void 0===b&&(b=y),l[b]=m[y]}),M=this&&this.__setModuleDefault||(Object.create?function(l,m){Object.defineProperty(l,"default",{enumerable:!0,value:m})}:function(l,m){l.default=m}),w=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var m={};if(null!=l)for(var y in l)"default"!==y&&Object.prototype.hasOwnProperty.call(l,y)&&h(m,l,y);return M(m,l),m},E=this&&this.__exportStar||function(l,m){for(var y in l)"default"!==y&&!Object.prototype.hasOwnProperty.call(m,y)&&h(m,l,y)};Object.defineProperty(s,"__esModule",{value:!0}),s.keyStores=void 0,s.keyStores=w(p(8823)),E(p(18929),s),E(p(58050),s),p(4073)},18929:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(j,B,V,G){void 0===G&&(G=V);var W=Object.getOwnPropertyDescriptor(B,V);(!W||("get"in W?!B.__esModule:W.writable||W.configurable))&&(W={enumerable:!0,get:function(){return B[V]}}),Object.defineProperty(j,G,W)}:function(j,B,V,G){void 0===G&&(G=V),j[G]=B[V]}),M=this&&this.__setModuleDefault||(Object.create?function(j,B){Object.defineProperty(j,"default",{enumerable:!0,value:B})}:function(j,B){j.default=B}),w=this&&this.__importStar||function(j){if(j&&j.__esModule)return j;var B={};if(null!=j)for(var V in j)"default"!==V&&Object.prototype.hasOwnProperty.call(j,V)&&h(B,j,V);return M(B,j),B};Object.defineProperty(s,"__esModule",{value:!0}),s.WalletConnection=s.ConnectedWalletAccount=s.Near=s.KeyPair=s.Signer=s.InMemorySigner=s.Contract=s.Connection=s.Account=s.multisig=s.validators=s.transactions=s.utils=s.providers=s.accountCreator=void 0;const E=w(p(97812));s.providers=E;const l=w(p(61016));s.utils=l;const m=w(p(56232));s.transactions=m;const y=w(p(68182));s.validators=y;const b=p(29472);Object.defineProperty(s,"Account",{enumerable:!0,get:function(){return b.Account}});const S=w(p(87509));s.multisig=S;const _=w(p(69645));s.accountCreator=_;const A=p(44596);Object.defineProperty(s,"Connection",{enumerable:!0,get:function(){return A.Connection}});const P=p(64193);Object.defineProperty(s,"Signer",{enumerable:!0,get:function(){return P.Signer}}),Object.defineProperty(s,"InMemorySigner",{enumerable:!0,get:function(){return P.InMemorySigner}});const x=p(34);Object.defineProperty(s,"Contract",{enumerable:!0,get:function(){return x.Contract}});const T=p(44625);Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return T.KeyPair}});const L=p(49990);Object.defineProperty(s,"Near",{enumerable:!0,get:function(){return L.Near}});const N=p(17567);Object.defineProperty(s,"ConnectedWalletAccount",{enumerable:!0,get:function(){return N.ConnectedWalletAccount}}),Object.defineProperty(s,"WalletConnection",{enumerable:!0,get:function(){return N.WalletConnection}})},44596:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Connection=void 0;var h=p(31221);Object.defineProperty(s,"Connection",{enumerable:!0,get:function(){return h.Connection}})},34:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Contract=void 0;var h=p(31221);Object.defineProperty(s,"Contract",{enumerable:!0,get:function(){return h.Contract}})},8823:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=s.BrowserLocalStorageKeyStore=s.InMemoryKeyStore=s.KeyStore=void 0;const h=p(84827);Object.defineProperty(s,"KeyStore",{enumerable:!0,get:function(){return h.KeyStore}});const M=p(90718);Object.defineProperty(s,"InMemoryKeyStore",{enumerable:!0,get:function(){return M.InMemoryKeyStore}});const w=p(18781);Object.defineProperty(s,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return w.BrowserLocalStorageKeyStore}});const E=p(46724);Object.defineProperty(s,"MergeKeyStore",{enumerable:!0,get:function(){return E.MergeKeyStore}})},18781:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserLocalStorageKeyStore=void 0;var h=p(27579);Object.defineProperty(s,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return h.BrowserLocalStorageKeyStore}})},90718:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.InMemoryKeyStore=void 0;var h=p(64296);Object.defineProperty(s,"InMemoryKeyStore",{enumerable:!0,get:function(){return h.InMemoryKeyStore}})},84827:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyStore=void 0;var h=p(64296);Object.defineProperty(s,"KeyStore",{enumerable:!0,get:function(){return h.KeyStore}})},46724:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=void 0;var h=p(64296);Object.defineProperty(s,"MergeKeyStore",{enumerable:!0,get:function(){return h.MergeKeyStore}})},49990:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Near=void 0;var h=p(15167);Object.defineProperty(s,"Near",{enumerable:!0,get:function(){return h.Near}})},97812:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ErrorContext=s.TypedError=s.getTransactionLastResult=s.FinalExecutionStatusBasic=s.JsonRpcProvider=s.Provider=void 0;const h=p(99637);Object.defineProperty(s,"Provider",{enumerable:!0,get:function(){return h.Provider}}),Object.defineProperty(s,"getTransactionLastResult",{enumerable:!0,get:function(){return h.getTransactionLastResult}}),Object.defineProperty(s,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return h.FinalExecutionStatusBasic}});const M=p(91504);Object.defineProperty(s,"JsonRpcProvider",{enumerable:!0,get:function(){return M.JsonRpcProvider}}),Object.defineProperty(s,"TypedError",{enumerable:!0,get:function(){return M.TypedError}}),Object.defineProperty(s,"ErrorContext",{enumerable:!0,get:function(){return M.ErrorContext}})},91504:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.JsonRpcProvider=s.TypedError=s.ErrorContext=void 0;var h=p(17527);Object.defineProperty(s,"ErrorContext",{enumerable:!0,get:function(){return h.ErrorContext}}),Object.defineProperty(s,"TypedError",{enumerable:!0,get:function(){return h.TypedError}});var M=p(50242);Object.defineProperty(s,"JsonRpcProvider",{enumerable:!0,get:function(){return M.JsonRpcProvider}})},99637:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.FinalExecutionStatusBasic=s.ExecutionStatusBasic=s.IdType=s.Provider=s.getTransactionLastResult=void 0;var h=p(41166);Object.defineProperty(s,"getTransactionLastResult",{enumerable:!0,get:function(){return h.getTransactionLastResult}});var M=p(50242);Object.defineProperty(s,"Provider",{enumerable:!0,get:function(){return M.Provider}});var w=p(17527);Object.defineProperty(s,"IdType",{enumerable:!0,get:function(){return w.IdType}}),Object.defineProperty(s,"ExecutionStatusBasic",{enumerable:!0,get:function(){return w.ExecutionStatusBasic}}),Object.defineProperty(s,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return w.FinalExecutionStatusBasic}})},64193:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signer=s.InMemorySigner=void 0;var h=p(65297);Object.defineProperty(s,"InMemorySigner",{enumerable:!0,get:function(){return h.InMemorySigner}}),Object.defineProperty(s,"Signer",{enumerable:!0,get:function(){return h.Signer}})},56232:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.transfer=s.stake=s.functionCallAccessKey=s.functionCall=s.fullAccessKey=s.deployContract=s.deleteKey=s.deleteAccount=s.createAccount=s.addKey=s.encodeDelegateAction=s.encodeSignedDelegate=s.Transaction=s.SignedTransaction=s.Signature=s.signTransaction=s.createTransaction=s.SCHEMA=s.Transfer=s.Stake=s.FunctionCallPermission=s.FunctionCall=s.FullAccessPermission=s.DeployContract=s.DeleteKey=s.DeleteAccount=s.CreateAccount=s.AddKey=s.AccessKeyPermission=s.AccessKey=s.Action=s.stringifyJsonOrBytes=void 0;var h=p(86184);Object.defineProperty(s,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return h.stringifyJsonOrBytes}}),Object.defineProperty(s,"Action",{enumerable:!0,get:function(){return h.Action}}),Object.defineProperty(s,"AccessKey",{enumerable:!0,get:function(){return h.AccessKey}}),Object.defineProperty(s,"AccessKeyPermission",{enumerable:!0,get:function(){return h.AccessKeyPermission}}),Object.defineProperty(s,"AddKey",{enumerable:!0,get:function(){return h.AddKey}}),Object.defineProperty(s,"CreateAccount",{enumerable:!0,get:function(){return h.CreateAccount}}),Object.defineProperty(s,"DeleteAccount",{enumerable:!0,get:function(){return h.DeleteAccount}}),Object.defineProperty(s,"DeleteKey",{enumerable:!0,get:function(){return h.DeleteKey}}),Object.defineProperty(s,"DeployContract",{enumerable:!0,get:function(){return h.DeployContract}}),Object.defineProperty(s,"FullAccessPermission",{enumerable:!0,get:function(){return h.FullAccessPermission}}),Object.defineProperty(s,"FunctionCall",{enumerable:!0,get:function(){return h.FunctionCall}}),Object.defineProperty(s,"FunctionCallPermission",{enumerable:!0,get:function(){return h.FunctionCallPermission}}),Object.defineProperty(s,"Stake",{enumerable:!0,get:function(){return h.Stake}}),Object.defineProperty(s,"Transfer",{enumerable:!0,get:function(){return h.Transfer}}),Object.defineProperty(s,"SCHEMA",{enumerable:!0,get:function(){return h.SCHEMA}}),Object.defineProperty(s,"createTransaction",{enumerable:!0,get:function(){return h.createTransaction}}),Object.defineProperty(s,"signTransaction",{enumerable:!0,get:function(){return h.signTransaction}}),Object.defineProperty(s,"Signature",{enumerable:!0,get:function(){return h.Signature}}),Object.defineProperty(s,"SignedTransaction",{enumerable:!0,get:function(){return h.SignedTransaction}}),Object.defineProperty(s,"Transaction",{enumerable:!0,get:function(){return h.Transaction}}),Object.defineProperty(s,"encodeSignedDelegate",{enumerable:!0,get:function(){return h.encodeSignedDelegate}}),Object.defineProperty(s,"encodeDelegateAction",{enumerable:!0,get:function(){return h.encodeDelegateAction}});const M=p(86184);s.addKey=(x,T)=>M.actionCreators.addKey(x,T);s.createAccount=()=>M.actionCreators.createAccount();s.deleteAccount=x=>M.actionCreators.deleteAccount(x);s.deleteKey=x=>M.actionCreators.deleteKey(x);s.deployContract=x=>M.actionCreators.deployContract(x);s.fullAccessKey=()=>M.actionCreators.fullAccessKey();s.functionCall=(x,T,L,N,j,B)=>M.actionCreators.functionCall(x,T,L,N,j,B);s.functionCallAccessKey=(x,T,L)=>M.actionCreators.functionCallAccessKey(x,T,L);s.stake=(x,T)=>M.actionCreators.stake(x,T);s.transfer=x=>M.actionCreators.transfer(x)},84539:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Enum=s.Assignable=void 0;var h=p(17527);Object.defineProperty(s,"Assignable",{enumerable:!0,get:function(){return h.Assignable}});s.Enum=class M{constructor(E){if(1!==Object.keys(E).length)throw new Error("Enum can only take single value");Object.keys(E).map(l=>{this[l]=E[l],this.enum=l})}}},14427:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.logWarning=s.TypedError=s.PositionalArgsError=s.ErrorContext=s.ArgumentTypeError=s.UnsupportedSerializationError=s.UnknownArgumentError=s.ConflictingOptions=s.ArgumentSchemaError=void 0;var h=p(31221);Object.defineProperty(s,"ArgumentSchemaError",{enumerable:!0,get:function(){return h.ArgumentSchemaError}}),Object.defineProperty(s,"ConflictingOptions",{enumerable:!0,get:function(){return h.ConflictingOptions}}),Object.defineProperty(s,"UnknownArgumentError",{enumerable:!0,get:function(){return h.UnknownArgumentError}}),Object.defineProperty(s,"UnsupportedSerializationError",{enumerable:!0,get:function(){return h.UnsupportedSerializationError}});var M=p(17527);Object.defineProperty(s,"ArgumentTypeError",{enumerable:!0,get:function(){return M.ArgumentTypeError}}),Object.defineProperty(s,"ErrorContext",{enumerable:!0,get:function(){return M.ErrorContext}}),Object.defineProperty(s,"PositionalArgsError",{enumerable:!0,get:function(){return M.PositionalArgsError}}),Object.defineProperty(s,"TypedError",{enumerable:!0,get:function(){return M.TypedError}});var w=p(41166);Object.defineProperty(s,"logWarning",{enumerable:!0,get:function(){return w.logWarning}})},5782:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.parseNearAmount=s.formatNearAmount=s.NEAR_NOMINATION_EXP=s.NEAR_NOMINATION=void 0;var h=p(41166);Object.defineProperty(s,"NEAR_NOMINATION",{enumerable:!0,get:function(){return h.NEAR_NOMINATION}}),Object.defineProperty(s,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return h.NEAR_NOMINATION_EXP}}),Object.defineProperty(s,"formatNearAmount",{enumerable:!0,get:function(){return h.formatNearAmount}}),Object.defineProperty(s,"parseNearAmount",{enumerable:!0,get:function(){return h.parseNearAmount}})},61016:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(P,x,T,L){void 0===L&&(L=T);var N=Object.getOwnPropertyDescriptor(x,T);(!N||("get"in N?!x.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return x[T]}}),Object.defineProperty(P,L,N)}:function(P,x,T,L){void 0===L&&(L=T),P[L]=x[T]}),M=this&&this.__setModuleDefault||(Object.create?function(P,x){Object.defineProperty(P,"default",{enumerable:!0,value:x})}:function(P,x){P.default=x}),w=this&&this.__importStar||function(P){if(P&&P.__esModule)return P;var x={};if(null!=P)for(var T in P)"default"!==T&&Object.prototype.hasOwnProperty.call(P,T)&&h(x,P,T);return M(x,P),x};Object.defineProperty(s,"__esModule",{value:!0}),s.logWarning=s.rpc_errors=s.KeyPairEd25519=s.KeyPair=s.PublicKey=s.format=s.enums=s.web=s.serialize=s.key_pair=void 0;const E=w(p(44625));s.key_pair=E;const l=w(p(74500));s.serialize=l;const m=w(p(65073));s.web=m;const y=w(p(84539));s.enums=y;const b=w(p(5782));s.format=b;const S=w(p(56098));s.rpc_errors=S;const _=p(44625);Object.defineProperty(s,"PublicKey",{enumerable:!0,get:function(){return _.PublicKey}}),Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return _.KeyPair}}),Object.defineProperty(s,"KeyPairEd25519",{enumerable:!0,get:function(){return _.KeyPairEd25519}});const A=p(14427);Object.defineProperty(s,"logWarning",{enumerable:!0,get:function(){return A.logWarning}})},44625:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.PublicKey=s.KeyType=s.KeyPairEd25519=s.KeyPair=void 0;var h=p(35425);Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return h.KeyPair}}),Object.defineProperty(s,"KeyPairEd25519",{enumerable:!0,get:function(){return h.KeyPairEd25519}}),Object.defineProperty(s,"KeyType",{enumerable:!0,get:function(){return h.KeyType}}),Object.defineProperty(s,"PublicKey",{enumerable:!0,get:function(){return h.PublicKey}})},56098:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ServerError=s.getErrorTypeFromErrorMessage=s.formatError=s.parseResultError=s.parseRpcError=void 0;var h=p(41166);Object.defineProperty(s,"parseRpcError",{enumerable:!0,get:function(){return h.parseRpcError}}),Object.defineProperty(s,"parseResultError",{enumerable:!0,get:function(){return h.parseResultError}}),Object.defineProperty(s,"formatError",{enumerable:!0,get:function(){return h.formatError}}),Object.defineProperty(s,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return h.getErrorTypeFromErrorMessage}}),Object.defineProperty(s,"ServerError",{enumerable:!0,get:function(){return h.ServerError}})},74500:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BinaryReader=s.BinaryWriter=s.BorshError=s.deserialize=s.serialize=s.base_decode=s.base_encode=void 0;var h=p(21531);Object.defineProperty(s,"base_encode",{enumerable:!0,get:function(){return h.baseEncode}}),Object.defineProperty(s,"base_decode",{enumerable:!0,get:function(){return h.baseDecode}}),Object.defineProperty(s,"serialize",{enumerable:!0,get:function(){return h.serialize}}),Object.defineProperty(s,"deserialize",{enumerable:!0,get:function(){return h.deserialize}}),Object.defineProperty(s,"BorshError",{enumerable:!0,get:function(){return h.BorshError}}),Object.defineProperty(s,"BinaryWriter",{enumerable:!0,get:function(){return h.BinaryWriter}}),Object.defineProperty(s,"BinaryReader",{enumerable:!0,get:function(){return h.BinaryReader}})},65073:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.fetchJson=void 0;var h=p(50242);Object.defineProperty(s,"fetchJson",{enumerable:!0,get:function(){return h.fetchJson}})},68182:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.findSeatPrice=s.diffEpochValidators=void 0;var h=p(41166);Object.defineProperty(s,"diffEpochValidators",{enumerable:!0,get:function(){return h.diffEpochValidators}}),Object.defineProperty(s,"findSeatPrice",{enumerable:!0,get:function(){return h.findSeatPrice}})},17567:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WalletConnection=s.ConnectedWalletAccount=void 0;var h=p(15167);Object.defineProperty(s,"ConnectedWalletAccount",{enumerable:!0,get:function(){return h.ConnectedWalletAccount}}),Object.defineProperty(s,"WalletConnection",{enumerable:!0,get:function(){return h.WalletConnection}})},25890:(ne,s,p)=>{"use strict";var h=p(88546);function w(E){if("number"==typeof E){if(!w[E])throw new Error("invalid status code: "+E);return E}if("string"!=typeof E)throw new TypeError("code must be a number or string");var l=parseInt(E,10);if(!isNaN(l)){if(!w[l])throw new Error("invalid status code: "+l);return l}if(!(l=w[E.toLowerCase()]))throw new Error('invalid status message: "'+E+'"');return l}ne.exports=w,w.STATUS_CODES=h,w.codes=function M(E,l){var m=[];return Object.keys(l).forEach(function(b){var S=l[b],_=Number(b);E[_]=S,E[S]=_,E[S.toLowerCase()]=_,m.push(_)}),m}(w,h),w.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},w.empty={204:!0,205:!0,304:!0},w.retry={502:!0,503:!0,504:!0}},15139:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(ee,I,o,a){return new(o||(o=Promise))(function(g,D){function F(f){try{C(a.next(f))}catch(k){D(k)}}function z(f){try{C(a.throw(f))}catch(k){D(k)}}function C(f){f.done?g(f.value):function d(g){return g instanceof o?g:new o(function(D){D(g)})}(f.value).then(F,z)}C((a=a.apply(ee,I||[])).next())})},M=this&&this.__importDefault||function(ee){return ee&&ee.__esModule?ee:{default:ee}};Object.defineProperty(s,"__esModule",{value:!0}),s.Account=void 0;const w=p(29761),E=p(1656),l=p(38445),m=p(17527),y=p(41166),b=M(p(98538)),S=p(21531),{addKey:_,createAccount:A,deleteAccount:P,deleteKey:x,deployContract:T,fullAccessKey:L,functionCall:N,functionCallAccessKey:j,stake:B,transfer:V}=l.actionCreators;function q(ee){return JSON.parse(Buffer.from(ee).toString())}function J(ee){return Buffer.from(JSON.stringify(ee))}class Z{constructor(I,o){this.accessKeyByPublicKeyCache={},this.connection=I,this.accountId=o}state(){return h(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(I,o){return h(this,void 0,void 0,function*(){const a=yield this.findAccessKey(I,o);if(!a)throw new m.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:d}=a,D=(yield this.connection.provider.block({finality:"final"})).header.hash,F=d.nonce.add(new b.default(1));return yield(0,l.signTransaction)(I,F,o,(0,S.baseDecode)(D),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:I,actions:o,returnError:a}){return h(this,void 0,void 0,function*(){let d,g;const D=yield(0,E.exponentialBackoff)(500,12,1.5,()=>h(this,void 0,void 0,function*(){[d,g]=yield this.signTransaction(I,o);const F=g.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(g)}catch(z){if("InvalidNonce"===z.type)return(0,y.logWarning)(`Retrying transaction ${I}:${(0,S.baseEncode)(d)} with new nonce.`),delete this.accessKeyByPublicKeyCache[F.toString()],null;if("Expired"===z.type)return(0,y.logWarning)(`Retrying transaction ${I}:${(0,S.baseEncode)(d)} due to expired block hash`),null;throw z.context=new m.ErrorContext((0,S.baseEncode)(d)),z}}));if(!D)throw new m.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,y.printTxOutcomeLogsAndFailures)({contractId:g.transaction.receiverId,outcome:D}),!a&&"object"==typeof D.status&&"object"==typeof D.status.Failure&&null!==D.status.Failure)throw D.status.Failure.error_message&&D.status.Failure.error_type?new m.TypedError(`Transaction ${D.transaction_outcome.id} failed. ${D.status.Failure.error_message}`,D.status.Failure.error_type):(0,y.parseResultError)(D);return D})}findAccessKey(I,o){return h(this,void 0,void 0,function*(){const a=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!a)throw new m.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const d=this.accessKeyByPublicKeyCache[a.toString()];if(void 0!==d)return{publicKey:a,accessKey:d};try{const g=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:a.toString(),finality:"optimistic"}),D=Object.assign(Object.assign({},g),{nonce:new b.default(g.nonce)});return this.accessKeyByPublicKeyCache[a.toString()]?{publicKey:a,accessKey:this.accessKeyByPublicKeyCache[a.toString()]}:(this.accessKeyByPublicKeyCache[a.toString()]=D,{publicKey:a,accessKey:D})}catch(g){if("AccessKeyDoesNotExist"==g.type)return null;throw g}})}createAndDeployContract(I,o,a,d){return h(this,void 0,void 0,function*(){const g=L();return yield this.signAndSendTransaction({receiverId:I,actions:[A(),V(d),_(w.PublicKey.from(o),g),T(a)]}),new Z(this.connection,I)})}sendMoney(I,o){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:I,actions:[V(o)]})})}createAccount(I,o,a){return h(this,void 0,void 0,function*(){const d=L();return this.signAndSendTransaction({receiverId:I,actions:[A(),V(a),_(w.PublicKey.from(o),d)]})})}deleteAccount(I){return h(this,void 0,void 0,function*(){return process.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[P(I)]})})}deployContract(I){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[T(I)]})})}encodeJSContractArgs(I,o,a){return Buffer.concat([Buffer.from(I),Buffer.from([0]),Buffer.from(o),Buffer.from([0]),Buffer.from(a)])}functionCall({contractId:I,methodName:o,args:a={},gas:d=y.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:g,walletMeta:D,walletCallbackUrl:F,stringify:z,jsContract:C}){return h(this,void 0,void 0,function*(){let f;if(this.validateArgs(a),C)f=["call_js_contract",this.encodeJSContractArgs(I,o,JSON.stringify(a)),d,g,null,!0];else{const k=void 0===z?l.stringifyJsonOrBytes:z;f=[o,a,d,g,k,!1]}return this.signAndSendTransaction({receiverId:C?this.connection.jsvmAccountId:I,actions:[N.apply(void 0,f)],walletMeta:D,walletCallbackUrl:F})})}addKey(I,o,a,d){return h(this,void 0,void 0,function*(){let g;return a||(a=[]),Array.isArray(a)||(a=[a]),g=o?j(o,a,d):L(),this.signAndSendTransaction({receiverId:this.accountId,actions:[_(w.PublicKey.from(I),g)]})})}deleteKey(I){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[x(w.PublicKey.from(I))]})})}stake(I,o){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[B(o,w.PublicKey.from(I))]})})}signedDelegate({actions:I,blockHeightTtl:o,receiverId:a}){return h(this,void 0,void 0,function*(){const{provider:d,signer:g}=this.connection,{header:D}=yield d.block({finality:"final"}),{accessKey:F,publicKey:z}=yield this.findAccessKey(null,null),C=(0,l.buildDelegateAction)({actions:I,maxBlockHeight:new b.default(D.height).add(new b.default(o)),nonce:new b.default(F.nonce).add(new b.default(1)),publicKey:z,receiverId:a,senderId:this.accountId}),{signedDelegateAction:f}=yield(0,l.signDelegateAction)({delegateAction:C,signer:{sign:k=>h(this,void 0,void 0,function*(){const{signature:se}=yield g.signMessage(k,C.senderId,this.connection.networkId);return se})}});return f})}validateArgs(I){if((void 0===I.byteLength||I.byteLength!==I.length)&&(Array.isArray(I)||"object"!=typeof I))throw new m.PositionalArgsError}viewFunction({contractId:I,methodName:o,args:a={},parse:d=q,stringify:g=J,jsContract:D=!1,blockQuery:F={finality:"optimistic"}}){return h(this,void 0,void 0,function*(){let z;this.validateArgs(a),z=D?this.encodeJSContractArgs(I,o,Object.keys(a).length>0?JSON.stringify(a):""):g(a);const C=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},F),{account_id:D?this.connection.jsvmAccountId:I,method_name:D?"view_js_contract":o,args_base64:z.toString("base64")}));return C.logs&&(0,y.printTxOutcomeLogs)({contractId:I,logs:C.logs}),C.result&&C.result.length>0&&d(Buffer.from(C.result))})}viewState(I,o={finality:"optimistic"}){return h(this,void 0,void 0,function*(){const{values:a}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},o),{account_id:this.accountId,prefix_base64:Buffer.from(I).toString("base64")}));return a.map(({key:d,value:g})=>({key:Buffer.from(d,"base64"),value:Buffer.from(g,"base64")}))})}getAccessKeys(){var I;return h(this,void 0,void 0,function*(){const o=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(I=o?.keys)||void 0===I?void 0:I.map(a=>Object.assign(Object.assign({},a),{access_key:Object.assign(Object.assign({},a.access_key),{nonce:new b.default(a.access_key.nonce)})}))})}getAccountDetails(){return h(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(a=>"FullAccess"!==a.access_key.permission).map(a=>{const d=a.access_key.permission;return{contractId:d.FunctionCall.receiver_id,amount:d.FunctionCall.allowance,publicKey:a.public_key}})}})}getAccountBalance(){return h(this,void 0,void 0,function*(){const I=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),o=yield this.state(),a=new b.default(I.runtime_config.storage_amount_per_byte),d=new b.default(o.storage_usage).mul(a),g=new b.default(o.locked),D=new b.default(o.amount).add(g),F=D.sub(b.default.max(g,d));return{total:D.toString(),stateStaked:d.toString(),staked:g.toString(),available:F.toString()}})}getActiveDelegatedStakeBalance(){return h(this,void 0,void 0,function*(){const I=yield this.connection.provider.block({finality:"final"}),o=I.header.hash,a=I.header.epoch_id,{current_validators:d,next_validators:g,current_proposals:D}=yield this.connection.provider.validators(a),F=new Set;[...d,...g,...D].forEach(te=>F.add(te.account_id));const z=[...F],C=z.map(te=>this.viewFunction({contractId:te,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:o}})),f=yield Promise.allSettled(C);if(f.some(te=>"rejected"===te.status&&"TimeoutError"===te.reason.type))throw new Error("Failed to get delegated stake balance");const se=f.reduce((te,oe,de)=>{const Ie=z[de];if("fulfilled"===oe.status){const ye=new b.default(oe.value);if(!ye.isZero())return Object.assign(Object.assign({},te),{stakedValidators:[...te.stakedValidators,{validatorId:Ie,amount:ye.toString()}],total:te.total.add(ye)})}return"rejected"===oe.status?Object.assign(Object.assign({},te),{failedValidators:[...te.failedValidators,{validatorId:Ie,error:oe.reason}]}):te},{stakedValidators:[],failedValidators:[],total:new b.default(0)});return Object.assign(Object.assign({},se),{total:se.total.toString()})})}}s.Account=Z},46398:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(V,G,W,Q){return new(W||(W=Promise))(function(J,Z){function ee(a){try{o(Q.next(a))}catch(d){Z(d)}}function I(a){try{o(Q.throw(a))}catch(d){Z(d)}}function o(a){a.done?J(a.value):function q(J){return J instanceof W?J:new W(function(Z){Z(J)})}(a.value).then(ee,I)}o((Q=Q.apply(V,G||[])).next())})},M=this&&this.__importDefault||function(V){return V&&V.__esModule?V:{default:V}};Object.defineProperty(s,"__esModule",{value:!0}),s.Account2FA=void 0;const w=p(29761),E=p(17527),l=p(1656),m=p(38445),y=M(p(98538)),b=p(64706),S=p(69865),_=p(3725),{addKey:A,deleteKey:P,deployContract:x,fullAccessKey:T,functionCall:L,functionCallAccessKey:N}=m.actionCreators;class j extends b.AccountMultisig{constructor(G,W,Q){super(G,W,Q),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=Q.helperUrl||this.helperUrl,this.storage=Q.storage,this.sendCode=Q.sendCode||this.sendCodeDefault,this.getCode=Q.getCode||this.getCodeDefault,this.verifyCode=Q.verifyCode||this.verifyCodeDefault,this.onConfirmResult=Q.onConfirmResult}signAndSendTransaction({receiverId:G,actions:W}){const Q=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){yield Q.signAndSendTransaction.call(this,{receiverId:G,actions:W}),yield this.sendCode();const q=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(q)),q})}deployMultisig(G){const W=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return h(this,void 0,void 0,function*(){const{accountId:Q}=this,q=(yield this.getRecoveryMethods()).data.filter(({kind:d,publicKey:g})=>("phrase"===d||"ledger"===d)&&null!==g).map(d=>d.publicKey),J=(yield this.getAccessKeys()).filter(({public_key:d,access_key:{permission:g}})=>"FullAccess"===g&&!q.includes(d)).map(d=>d.public_key).map(B),Z=B((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Q})).publicKey),ee=Buffer.from(JSON.stringify({num_confirmations:2})),I=[...J.map(d=>P(d)),...J.map(d=>A(d,N(Q,S.MULTISIG_CHANGE_METHODS,null))),A(Z,N(Q,S.MULTISIG_CONFIRM_METHODS,null)),x(G)],o=I.concat(L("new",ee,S.MULTISIG_GAS,S.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",Q);const{stateStatus:a}=yield this.checkMultisigCodeAndStateStatus(G);switch(a){case _.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield W.signAndSendTransactionWithAccount.call(this,Q,o);case _.MultisigStateStatus.VALID_STATE:return yield W.signAndSendTransactionWithAccount.call(this,Q,I);case _.MultisigStateStatus.INVALID_STATE:throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:G,cleanupContractBytes:W}){return h(this,void 0,void 0,function*(){let Q=[];W&&(yield this.deleteAllRequests().catch(ee=>ee),Q=yield this.get2faDisableCleanupActions(W));const q=yield this.get2faDisableKeyConversionActions(),J=[...Q,...q,x(G)],Z=yield this.findAccessKey(this.accountId,J);if(Z&&Z.accessKey&&"FullAccess"!==Z.accessKey.permission)throw new E.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,J)})}get2faDisableCleanupActions(G){return h(this,void 0,void 0,function*(){const W=yield this.viewState("").catch(q=>{const J=q.cause&&q.cause.name;if("NO_CONTRACT_CODE"==J)return[];throw"TOO_LARGE_CONTRACT_STATE"==J?new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):q}),Q=W.map(({key:q})=>q.toString("base64"));return W.length?[x(G),L("clean",{keys:Q},S.MULTISIG_GAS,new y.default("0"))]:[]})}get2faDisableKeyConversionActions(){return h(this,void 0,void 0,function*(){const{accountId:G}=this,Q=(yield this.getAccessKeys()).filter(({access_key:J})=>"FullAccess"!==J.permission).filter(({access_key:J})=>{const Z=J.permission.FunctionCall;return Z.receiver_id===G&&4===Z.method_names.length&&Z.method_names.includes("add_request_and_confirm")}),q=w.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:G})).publicKey);return[P(q),...Q.map(({public_key:J})=>P(w.PublicKey.from(J))),...Q.map(({public_key:J})=>A(w.PublicKey.from(J),T()))]})}disable(G,W){return h(this,void 0,void 0,function*(){const{stateStatus:Q}=yield this.checkMultisigCodeAndStateStatus();if(Q!==_.MultisigStateStatus.VALID_STATE&&Q!==_.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let q;yield this.deleteAllRequests().catch(ee=>q=ee);const Z=[...yield this.get2faDisableCleanupActions(W).catch(ee=>{throw"ContractHasExistingState"===ee.type&&q||ee}),...yield this.get2faDisableKeyConversionActions(),x(G)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:Z})})}sendCodeDefault(){return h(this,void 0,void 0,function*(){const{accountId:G}=this,{requestId:W}=this.getRequest(),Q=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:G,method:Q,requestId:W}),W})}getCodeDefault(){return h(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return h(this,void 0,void 0,function*(){const G=yield this.get2faMethod(),W=yield this.getCode(G);try{return yield this.verifyCode(W)}catch(Q){if(console.warn("Error validating security code:",Q),Q.toString().includes("invalid 2fa code provided")||Q.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw Q}})}verifyCodeDefault(G){return h(this,void 0,void 0,function*(){const{accountId:W}=this,Q=this.getRequest();if(!Q)throw new Error("no request pending");const{requestId:q}=Q;return yield this.postSignedJson("/2fa/verify",{accountId:W,securityCode:G,requestId:q})})}getRecoveryMethods(){return h(this,void 0,void 0,function*(){const{accountId:G}=this;return{accountId:G,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:G})}})}get2faMethod(){return h(this,void 0,void 0,function*(){let{data:G}=yield this.getRecoveryMethods();if(G&&G.length&&(G=G.find(q=>0===q.kind.indexOf("2fa-"))),!G)return null;const{kind:W,detail:Q}=G;return{kind:W,detail:Q}})}signatureFor(){return h(this,void 0,void 0,function*(){const{accountId:G}=this,Q=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),q=yield this.connection.signer.signMessage(Buffer.from(Q),G,this.connection.networkId);return{blockNumber:Q,blockNumberSignature:Buffer.from(q.signature).toString("base64")}})}postSignedJson(G,W){return h(this,void 0,void 0,function*(){return yield(0,l.fetchJson)(this.helperUrl+G,JSON.stringify(Object.assign(Object.assign({},W),yield this.signatureFor())))})}}s.Account2FA=j;const B=V=>w.PublicKey.from(V)},53683:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.UrlAccountCreator=s.LocalAccountCreator=s.AccountCreator=void 0;const M=p(1656);class w{}s.AccountCreator=w;s.LocalAccountCreator=class E extends w{constructor(y,b){super(),this.masterAccount=y,this.initialBalance=b}createAccount(y,b){return h(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(y,b,this.initialBalance)})}};s.UrlAccountCreator=class l extends w{constructor(y,b){super(),this.connection=y,this.helperUrl=b}createAccount(y,b){return h(this,void 0,void 0,function*(){yield(0,M.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:y,newAccountPublicKey:b.toString()}))})}}},64706:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(x,T,L,N){return new(L||(L=Promise))(function(B,V){function G(q){try{Q(N.next(q))}catch(J){V(J)}}function W(q){try{Q(N.throw(q))}catch(J){V(J)}}function Q(q){q.done?B(q.value):function j(B){return B instanceof L?B:new L(function(V){V(B)})}(q.value).then(G,W)}Q((N=N.apply(x,T||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.AccountMultisig=void 0;const M=p(38445),w=p(15139),E=p(69865),l=p(3725),{deployContract:m,functionCall:y}=M.actionCreators;var b,x;(x=b||(b={}))[x.INVALID_CODE=0]="INVALID_CODE",x[x.VALID_CODE=1]="VALID_CODE",x[x.UNKNOWN_CODE=2]="UNKNOWN_CODE";const S={[E.MULTISIG_STORAGE_KEY]:null};class _ extends w.Account{constructor(T,L,N){super(T,L),this.storage=N.storage,this.onAddRequestResult=N.onAddRequestResult}signAndSendTransactionWithAccount(T,L){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){return N.signAndSendTransaction.call(this,{receiverId:T,actions:L})})}signAndSendTransaction({receiverId:T,actions:L}){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const{accountId:j}=this,B=Buffer.from(JSON.stringify({request:{receiver_id:T,actions:P(L,j,T)}}));let V;try{V=yield N.signAndSendTransaction.call(this,{receiverId:j,actions:[y("add_request_and_confirm",B,E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]})}catch(W){if(W.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:T,actions:L});throw W}if(!V.status)throw new Error("Request failed");const G=Object.assign({},V.status);if(!G.SuccessValue||"string"!=typeof G.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:j,actions:L,requestId:parseInt(Buffer.from(G.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(V)),this.deleteUnconfirmedRequests(),V})}checkMultisigCodeAndStateStatus(T){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const j=T?b.UNKNOWN_CODE:b.VALID_CODE;try{return T?yield L.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[m(T),y("delete_request",{request_id:4294967295},E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:b.VALID_CODE,stateStatus:l.MultisigStateStatus.VALID_STATE}}catch(B){if(new RegExp(l.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(B&&B.kind&&B.kind.ExecutionError))return{codeStatus:j,stateStatus:l.MultisigStateStatus.INVALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(B&&B.kind&&B.kind.ExecutionError))return{codeStatus:j,stateStatus:l.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(l.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(B&&B.kind&&B.kind.ExecutionError))return{codeStatus:j,stateStatus:l.MultisigStateStatus.VALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(B&&B.message))return{codeStatus:b.INVALID_CODE,stateStatus:l.MultisigStateStatus.UNKNOWN_STATE};throw B}})}deleteRequest(T){return super.signAndSendTransaction({receiverId:this.accountId,actions:[y("delete_request",{request_id:T},E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return h(this,void 0,void 0,function*(){const T=yield this.getRequestIds();T.length&&(yield Promise.all(T.map(L=>this.deleteRequest(L))))})}deleteUnconfirmedRequests(){const T=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const L=yield this.getRequestIds(),{requestId:N}=this.getRequest();for(const j of L)if(j!=N)try{yield T.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[y("delete_request",{request_id:j},E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]})}catch{console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return h(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(E.MULTISIG_STORAGE_KEY)||"{}"):S[E.MULTISIG_STORAGE_KEY]}setRequest(T){if(this.storage)return this.storage.setItem(E.MULTISIG_STORAGE_KEY,JSON.stringify(T));S[E.MULTISIG_STORAGE_KEY]=T}}s.AccountMultisig=_;const A=x=>x.toString().replace("ed25519:",""),P=(x,T,L)=>x.map(N=>{const j=N.enum,{gas:B,publicKey:V,methodName:G,args:W,deposit:Q,accessKey:q,code:J}=N[j],Z={type:j[0].toUpperCase()+j.substr(1),gas:B&&B.toString()||void 0,public_key:V&&A(V)||void 0,method_name:G,args:W&&Buffer.from(W).toString("base64")||void 0,code:J&&Buffer.from(J).toString("base64")||void 0,amount:Q&&Q.toString()||void 0,deposit:Q&&Q.toString()||"0",permission:void 0};if(q&&(L===T&&"fullAccess"!==q.permission.enum&&(Z.permission={receiver_id:T,allowance:E.MULTISIG_ALLOWANCE.toString(),method_names:E.MULTISIG_CHANGE_METHODS}),"functionCall"===q.permission.enum)){const{receiverId:ee,methodNames:I,allowance:o}=q.permission.functionCall;Z.permission={receiver_id:ee,allowance:o&&o.toString()||void 0,method_names:I}}return Z})},52357:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Connection=void 0;const h=p(82613),M=p(1656);class l{constructor(y,b,S,_){this.networkId=y,this.provider=b,this.signer=S,this.jsvmAccountId=_}static fromConfig(y){const b=function w(m){switch(m.type){case void 0:return m;case"JsonRpcProvider":return new M.JsonRpcProvider(Object.assign({},m.args));default:throw new Error(`Unknown provider type ${m.type}`)}}(y.provider),S=function E(m){switch(m.type){case void 0:return m;case"InMemorySigner":return new h.InMemorySigner(m.keyStore);default:throw new Error(`Unknown signer type ${m.type}`)}}(y.signer);return new l(y.networkId,b,S,y.jsvmAccountId)}}s.Connection=l},69865:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(s,"__esModule",{value:!0}),s.MULTISIG_CONFIRM_METHODS=s.MULTISIG_CHANGE_METHODS=s.MULTISIG_DEPOSIT=s.MULTISIG_GAS=s.MULTISIG_ALLOWANCE=s.MULTISIG_STORAGE_KEY=void 0;const M=p(41166),w=h(p(98538));s.MULTISIG_STORAGE_KEY="__multisigRequest",s.MULTISIG_ALLOWANCE=new w.default((0,M.parseNearAmount)("1")),s.MULTISIG_GAS=new w.default("100000000000000"),s.MULTISIG_DEPOSIT=new w.default("0"),s.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],s.MULTISIG_CONFIRM_METHODS=["confirm"]},44575:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(B,V,G,W){return new(G||(G=Promise))(function(q,J){function Z(o){try{I(W.next(o))}catch(a){J(a)}}function ee(o){try{I(W.throw(o))}catch(a){J(a)}}function I(o){o.done?q(o.value):function Q(q){return q instanceof G?q:new G(function(J){J(q)})}(o.value).then(Z,ee)}I((W=W.apply(B,V||[])).next())})},M=this&&this.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(s,"__esModule",{value:!0}),s.Contract=void 0;const w=p(41166),E=p(17527),l=M(p(74411)),m=M(p(26474)),y=M(p(98538)),b=M(p(89176)),S=p(84778),_=p(43506);function A(B,V){return{[B]:(...G)=>V(...G)}[B]}function P(B,V,G,W){var Q;if(!L(B))return;if(V.params&&V.params.serialization_type!==S.AbiSerializationType.Json)throw new _.UnsupportedSerializationError(V.name,V.params.serialization_type);if(V.result&&V.result.serialization_type!==S.AbiSerializationType.Json)throw new _.UnsupportedSerializationError(V.name,V.result.serialization_type);const q=(null===(Q=V.params)||void 0===Q?void 0:Q.args)||[];for(const J of q){const Z=B[J.name],ee=J.type_schema;ee.definitions=W.body.root_schema.definitions;const I=G.compile(ee);if(!I(Z))throw new _.ArgumentSchemaError(J.name,I.errors)}for(const J of Object.keys(B))if(!q.find(ee=>ee.name===J))throw new _.UnknownArgumentError(J,q.map(ee=>ee.name))}const T=B=>B&&void 0!==B.byteLength&&B.byteLength===B.length,L=B=>"[object Object]"===Object.prototype.toString.call(B);s.Contract=class N{constructor(V,G,W){this.account=V,this.contractId=G;const{viewMethods:Q=[],changeMethods:q=[],abi:J}=W;let Z=Q.map(o=>({name:o,abi:null})),ee=q.map(o=>({name:o,abi:null}));if(J){if(Z.length>0||ee.length>0)throw new _.ConflictingOptions;Z=J.body.functions.filter(o=>o.kind===S.AbiFunctionKind.View).map(o=>({name:o.name,abi:o})),ee=J.body.functions.filter(o=>o.kind===S.AbiFunctionKind.Call).map(o=>({name:o.name,abi:o}))}const I=function x(){const B=new l.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,m.default)(B),B}();Z.forEach(({name:o,abi:a})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(d={},g={},...D)=>h(this,void 0,void 0,function*(){if(D.length||!L(d)&&!T(d)||!L(g))throw new E.PositionalArgsError;return a&&P(d,a,I,J),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:d},g))}))})}),ee.forEach(({name:o,abi:a})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(...d)=>h(this,void 0,void 0,function*(){if(d.length&&(d.length>3||!L(d[0])&&!T(d[0])))throw new E.PositionalArgsError;return(d.length>1||!(d[0]&&d[0].args))&&((0,b.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),d[0]={args:d[0],gas:d[1],amount:d[2]}),a&&P(d[0].args,a,I,J),this._changeMethod(Object.assign({methodName:o},d[0]))}))})})}_changeMethod({args:V,methodName:G,gas:W,amount:Q,meta:q,callbackUrl:J}){return h(this,void 0,void 0,function*(){!function j(B){const V="number, decimal string or BN";for(const G of Object.keys(B)){const W=B[G];if(W&&!y.default.isBN(W)&&isNaN(W))throw new E.ArgumentTypeError(G,V,W)}}({gas:W,amount:Q});const Z=yield this.account.functionCall({contractId:this.contractId,methodName:G,args:V,gas:W,attachedDeposit:Q,walletMeta:q,walletCallbackUrl:J});return(0,w.getTransactionLastResult)(Z)})}}},43506:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ConflictingOptions=s.ArgumentSchemaError=s.UnknownArgumentError=s.UnsupportedSerializationError=void 0;class p extends Error{constructor(l,m){super(`Contract method '${l}' is using an unsupported serialization type ${m}`)}}s.UnsupportedSerializationError=p;class h extends Error{constructor(l,m){super(`Unrecognized argument '${l}', expected '${JSON.stringify(m)}'`)}}s.UnknownArgumentError=h;class M extends Error{constructor(l,m){super(`Argument '${l}' does not conform to the specified ABI schema: '${JSON.stringify(m)}'`)}}s.ArgumentSchemaError=M;class w extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}s.ConflictingOptions=w},74931:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MultisigStateStatus=s.MultisigDeleteRequestRejectionError=s.UnsupportedSerializationError=s.UnknownArgumentError=s.ConflictingOptions=s.ArgumentSchemaError=s.Contract=s.MULTISIG_CONFIRM_METHODS=s.MULTISIG_CHANGE_METHODS=s.MULTISIG_DEPOSIT=s.MULTISIG_GAS=s.MULTISIG_ALLOWANCE=s.MULTISIG_STORAGE_KEY=s.Connection=s.AccountMultisig=s.UrlAccountCreator=s.LocalAccountCreator=s.AccountCreator=s.Account2FA=s.Account=void 0;var h=p(15139);Object.defineProperty(s,"Account",{enumerable:!0,get:function(){return h.Account}});var M=p(46398);Object.defineProperty(s,"Account2FA",{enumerable:!0,get:function(){return M.Account2FA}});var w=p(53683);Object.defineProperty(s,"AccountCreator",{enumerable:!0,get:function(){return w.AccountCreator}}),Object.defineProperty(s,"LocalAccountCreator",{enumerable:!0,get:function(){return w.LocalAccountCreator}}),Object.defineProperty(s,"UrlAccountCreator",{enumerable:!0,get:function(){return w.UrlAccountCreator}});var E=p(64706);Object.defineProperty(s,"AccountMultisig",{enumerable:!0,get:function(){return E.AccountMultisig}});var l=p(52357);Object.defineProperty(s,"Connection",{enumerable:!0,get:function(){return l.Connection}});var m=p(69865);Object.defineProperty(s,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return m.MULTISIG_STORAGE_KEY}}),Object.defineProperty(s,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return m.MULTISIG_ALLOWANCE}}),Object.defineProperty(s,"MULTISIG_GAS",{enumerable:!0,get:function(){return m.MULTISIG_GAS}}),Object.defineProperty(s,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return m.MULTISIG_DEPOSIT}}),Object.defineProperty(s,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return m.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(s,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return m.MULTISIG_CONFIRM_METHODS}});var y=p(44575);Object.defineProperty(s,"Contract",{enumerable:!0,get:function(){return y.Contract}});var b=p(43506);Object.defineProperty(s,"ArgumentSchemaError",{enumerable:!0,get:function(){return b.ArgumentSchemaError}}),Object.defineProperty(s,"ConflictingOptions",{enumerable:!0,get:function(){return b.ConflictingOptions}}),Object.defineProperty(s,"UnknownArgumentError",{enumerable:!0,get:function(){return b.UnknownArgumentError}}),Object.defineProperty(s,"UnsupportedSerializationError",{enumerable:!0,get:function(){return b.UnsupportedSerializationError}});var S=p(3725);Object.defineProperty(s,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return S.MultisigDeleteRequestRejectionError}}),Object.defineProperty(s,"MultisigStateStatus",{enumerable:!0,get:function(){return S.MultisigStateStatus}})},3725:(ne,s)=>{"use strict";var M;Object.defineProperty(s,"__esModule",{value:!0}),s.MultisigStateStatus=s.MultisigDeleteRequestRejectionError=void 0,(M=s.MultisigDeleteRequestRejectionError||(s.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",M.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",M.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",M.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",M.METHOD_NOT_FOUND="Contract method is not found",function(M){M[M.INVALID_STATE=0]="INVALID_STATE",M[M.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",M[M.VALID_STATE=2]="VALID_STATE",M[M.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(s.MultisigStateStatus||(s.MultisigStateStatus={}))},15932:(ne,s)=>{"use strict";var h;Object.defineProperty(s,"__esModule",{value:!0}),s.KeyType=void 0,(h=s.KeyType||(s.KeyType={}))[h.ED25519=0]="ED25519"},29761:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.PublicKey=s.KeyPairEd25519=s.KeyPair=s.KeyType=void 0;var h=p(15932);Object.defineProperty(s,"KeyType",{enumerable:!0,get:function(){return h.KeyType}});var M=p(82568);Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return M.KeyPair}});var w=p(56510);Object.defineProperty(s,"KeyPairEd25519",{enumerable:!0,get:function(){return w.KeyPairEd25519}});var E=p(987);Object.defineProperty(s,"PublicKey",{enumerable:!0,get:function(){return E.PublicKey}})},82568:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyPair=void 0;const h=p(98475),M=p(56510);class w extends h.KeyPairBase{static fromRandom(l){if("ED25519"===l.toUpperCase())return M.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${l}`)}static fromString(l){const m=l.split(":");if(1===m.length)return new M.KeyPairEd25519(m[0]);if(2===m.length){if("ED25519"===m[0].toUpperCase())return new M.KeyPairEd25519(m[1]);throw new Error(`Unknown curve: ${m[0]}`)}throw new Error("Invalid encoded key format, must be :")}}s.KeyPair=w},98475:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyPairBase=void 0;s.KeyPairBase=class p{}},56510:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(s,"__esModule",{value:!0}),s.KeyPairEd25519=void 0;const M=p(21531),w=h(p(40489)),E=p(15932),l=p(98475),m=p(987);class y extends l.KeyPairBase{constructor(S){super();const _=w.default.sign.keyPair.fromSecretKey((0,M.baseDecode)(S));this.publicKey=new m.PublicKey({keyType:E.KeyType.ED25519,data:_.publicKey}),this.secretKey=S}static fromRandom(){const S=w.default.sign.keyPair();return new y((0,M.baseEncode)(S.secretKey))}sign(S){return{signature:w.default.sign.detached(S,(0,M.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(S,_){return this.publicKey.verify(S,_)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}s.KeyPairEd25519=y},987:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(s,"__esModule",{value:!0}),s.PublicKey=void 0;const M=p(17527),w=p(21531),E=h(p(40489)),l=p(15932);function y(S){if("ed25519"===S.toLowerCase())return l.KeyType.ED25519;throw new Error(`Unknown key type ${S}`)}class b extends M.Assignable{static from(_){return"string"==typeof _?b.fromString(_):_}static fromString(_){const A=_.split(":");if(1===A.length)return new b({keyType:l.KeyType.ED25519,data:(0,w.baseDecode)(A[0])});if(2===A.length)return new b({keyType:y(A[0]),data:(0,w.baseDecode)(A[1])});throw new Error("Invalid encoded key format, must be :")}toString(){return`${function m(S){if(S===l.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${S}`)}(this.keyType)}:${(0,w.baseEncode)(this.data)}`}verify(_,A){if(this.keyType===l.KeyType.ED25519)return E.default.sign.detached.verify(_,A,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}s.PublicKey=b},9454:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserLocalStorageKeyStore=void 0;const M=p(29761),w=p(69170);class l extends w.KeyStore{constructor(y=window.localStorage,b="near-api-js:keystore:"){super(),this.localStorage=y,this.prefix=b}setKey(y,b,S){return h(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(y,b),S.toString())})}getKey(y,b){return h(this,void 0,void 0,function*(){const S=this.localStorage.getItem(this.storageKeyForSecretKey(y,b));return S?M.KeyPair.fromString(S):null})}removeKey(y,b){return h(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(y,b))})}clear(){return h(this,void 0,void 0,function*(){for(const y of this.storageKeys())y.startsWith(this.prefix)&&this.localStorage.removeItem(y)})}getNetworks(){return h(this,void 0,void 0,function*(){const y=new Set;for(const b of this.storageKeys())if(b.startsWith(this.prefix)){const S=b.substring(this.prefix.length).split(":");y.add(S[1])}return Array.from(y.values())})}getAccounts(y){return h(this,void 0,void 0,function*(){const b=new Array;for(const S of this.storageKeys())if(S.startsWith(this.prefix)){const _=S.substring(this.prefix.length).split(":");_[1]===y&&b.push(_[0])}return b})}storageKeyForSecretKey(y,b){return`${this.prefix}${b}:${y}`}*storageKeys(){for(let y=0;y{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserLocalStorageKeyStore=void 0;var h=p(9454);Object.defineProperty(s,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return h.BrowserLocalStorageKeyStore}})},55738:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.UnencryptedFileSystemKeyStore=s.readKeyFile=void 0;var h=p(2252);Object.defineProperty(s,"readKeyFile",{enumerable:!0,get:function(){return h.readKeyFile}}),Object.defineProperty(s,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return h.UnencryptedFileSystemKeyStore}})},2252:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(V,G,W,Q){return new(W||(W=Promise))(function(J,Z){function ee(a){try{o(Q.next(a))}catch(d){Z(d)}}function I(a){try{o(Q.throw(a))}catch(d){Z(d)}}function o(a){a.done?J(a.value):function q(J){return J instanceof W?J:new W(function(Z){Z(J)})}(a.value).then(ee,I)}o((Q=Q.apply(V,G||[])).next())})},M=this&&this.__importDefault||function(V){return V&&V.__esModule?V:{default:V}};Object.defineProperty(s,"__esModule",{value:!0}),s.UnencryptedFileSystemKeyStore=s.readKeyFile=void 0;const w=p(29761),E=p(69170),l=M(p(6581)),m=M(p(63928)),y=p(26788),b=V=>V?(0,y.promisify)(V):()=>{throw new Error("Trying to use unimplemented function. `fs` module not available in web build?")},S=b(l.default.exists),_=b(l.default.readFile),A=b(l.default.writeFile),P=b(l.default.unlink),x=b(l.default.readdir),T=b(l.default.mkdir);function j(V){return h(this,void 0,void 0,function*(){const G=yield function L(V){return h(this,void 0,void 0,function*(){const G=yield _(V);return JSON.parse(G.toString())})}(V);let W=G.private_key;return!W&&G.secret_key&&(W=G.secret_key),[G.account_id,w.KeyPair.fromString(W)]})}s.readKeyFile=j;class B extends E.KeyStore{constructor(G){super(),this.keyDir=m.default.resolve(G)}setKey(G,W,Q){return h(this,void 0,void 0,function*(){yield function N(V){return h(this,void 0,void 0,function*(){try{yield T(V,{recursive:!0})}catch(G){if("EEXIST"!==G.code)throw G}})}(`${this.keyDir}/${G}`);const q={account_id:W,public_key:Q.getPublicKey().toString(),private_key:Q.toString()};yield A(this.getKeyFilePath(G,W),JSON.stringify(q),{mode:384})})}getKey(G,W){return h(this,void 0,void 0,function*(){return(yield S(this.getKeyFilePath(G,W)))?(yield j(this.getKeyFilePath(G,W)))[1]:null})}removeKey(G,W){return h(this,void 0,void 0,function*(){(yield S(this.getKeyFilePath(G,W)))&&(yield P(this.getKeyFilePath(G,W)))})}clear(){return h(this,void 0,void 0,function*(){for(const G of yield this.getNetworks())for(const W of yield this.getAccounts(G))yield this.removeKey(G,W)})}getKeyFilePath(G,W){return`${this.keyDir}/${G}/${W}.json`}getNetworks(){return h(this,void 0,void 0,function*(){const G=yield x(this.keyDir),W=new Array;return G.forEach(Q=>{W.push(Q)}),W})}getAccounts(G){return h(this,void 0,void 0,function*(){return(yield S(`${this.keyDir}/${G}`))?(yield x(`${this.keyDir}/${G}`)).filter(Q=>Q.endsWith(".json")).map(Q=>Q.replace(/.json$/,"")):[]})}toString(){return`UnencryptedFileSystemKeyStore(${this.keyDir})`}}s.UnencryptedFileSystemKeyStore=B},14484:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(l,m,y,b){return new(y||(y=Promise))(function(_,A){function P(L){try{T(b.next(L))}catch(N){A(N)}}function x(L){try{T(b.throw(L))}catch(N){A(N)}}function T(L){L.done?_(L.value):function S(_){return _ instanceof y?_:new y(function(A){A(_)})}(L.value).then(P,x)}T((b=b.apply(l,m||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.InMemoryKeyStore=void 0;const M=p(29761),w=p(99749);class E extends w.KeyStore{constructor(){super(),this.keys={}}setKey(m,y,b){return h(this,void 0,void 0,function*(){this.keys[`${y}:${m}`]=b.toString()})}getKey(m,y){return h(this,void 0,void 0,function*(){const b=this.keys[`${y}:${m}`];return b?M.KeyPair.fromString(b):null})}removeKey(m,y){return h(this,void 0,void 0,function*(){delete this.keys[`${y}:${m}`]})}clear(){return h(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return h(this,void 0,void 0,function*(){const m=new Set;return Object.keys(this.keys).forEach(y=>{const b=y.split(":");m.add(b[1])}),Array.from(m.values())})}getAccounts(m){return h(this,void 0,void 0,function*(){const y=new Array;return Object.keys(this.keys).forEach(b=>{const S=b.split(":");S[S.length-1]===m&&y.push(S.slice(0,S.length-1).join(":"))}),y})}toString(){return"InMemoryKeyStore"}}s.InMemoryKeyStore=E},69170:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=s.KeyStore=s.InMemoryKeyStore=void 0;var h=p(14484);Object.defineProperty(s,"InMemoryKeyStore",{enumerable:!0,get:function(){return h.InMemoryKeyStore}});var M=p(99749);Object.defineProperty(s,"KeyStore",{enumerable:!0,get:function(){return M.KeyStore}});var w=p(93669);Object.defineProperty(s,"MergeKeyStore",{enumerable:!0,get:function(){return w.MergeKeyStore}})},99749:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyStore=void 0;s.KeyStore=class p{}},93669:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(E,l,m,y){return new(m||(m=Promise))(function(S,_){function A(T){try{x(y.next(T))}catch(L){_(L)}}function P(T){try{x(y.throw(T))}catch(L){_(L)}}function x(T){T.done?S(T.value):function b(S){return S instanceof m?S:new m(function(_){_(S)})}(T.value).then(A,P)}x((y=y.apply(E,l||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=void 0;const M=p(99749);class w extends M.KeyStore{constructor(l,m={writeKeyStoreIndex:0}){super(),this.options=m,this.keyStores=l}setKey(l,m,y){return h(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(l,m,y)})}getKey(l,m){return h(this,void 0,void 0,function*(){for(const y of this.keyStores){const b=yield y.getKey(l,m);if(b)return b}return null})}removeKey(l,m){return h(this,void 0,void 0,function*(){for(const y of this.keyStores)yield y.removeKey(l,m)})}clear(){return h(this,void 0,void 0,function*(){for(const l of this.keyStores)yield l.clear()})}getNetworks(){return h(this,void 0,void 0,function*(){const l=new Set;for(const m of this.keyStores)for(const y of yield m.getNetworks())l.add(y);return Array.from(l)})}getAccounts(l){return h(this,void 0,void 0,function*(){const m=new Set;for(const y of this.keyStores)for(const b of yield y.getAccounts(l))m.add(b);return Array.from(m)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}s.MergeKeyStore=w},82420:function(ne,s){"use strict";var p=this&&this.__awaiter||function(w,E,l,m){return new(l||(l=Promise))(function(b,S){function _(x){try{P(m.next(x))}catch(T){S(T)}}function A(x){try{P(m.throw(x))}catch(T){S(T)}}function P(x){x.done?b(x.value):function y(b){return b instanceof l?b:new l(function(S){S(b)})}(x.value).then(_,A)}P((m=m.apply(w,E||[])).next())})};function M(w){return new Promise(E=>setTimeout(E,w))}Object.defineProperty(s,"__esModule",{value:!0}),s.exponentialBackoff=void 0,s.exponentialBackoff=function h(w,E,l,m){return p(this,void 0,void 0,function*(){let y=w;for(let b=0;b!process.env.NEAR_NO_LOGS&&console.warn(...T);s.fetchJson=function x(T,L){return E(this,void 0,void 0,function*(){let N={url:null};"string"==typeof T?N.url=T:N=T;const j=yield(0,b.exponentialBackoff)(S,A,_,()=>E(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>w(p(60778)))).default);const B=yield global.fetch(N.url,{method:L?"POST":"GET",body:L||void 0,headers:Object.assign(Object.assign({},N.headers),{"Content-Type":"application/json"})});if(!B.ok){if(503===B.status)return P(`Retrying HTTP request for ${N.url} as it's not available now`),null;throw(0,y.default)(B.status,yield B.text())}return B}catch(B){if(B.toString().includes("FetchError")||B.toString().includes("Failed to fetch"))return P(`Retrying HTTP request for ${N.url} because of error: ${B}`),null;throw B}}));if(!j)throw new m.TypedError(`Exceeded ${A} attempts for ${N.url}.`,"RetriesExceeded");return yield j.json()})}},1656:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.fetchJson=s.Provider=s.JsonRpcProvider=s.exponentialBackoff=void 0;var h=p(82420);Object.defineProperty(s,"exponentialBackoff",{enumerable:!0,get:function(){return h.exponentialBackoff}});var M=p(71935);Object.defineProperty(s,"JsonRpcProvider",{enumerable:!0,get:function(){return M.JsonRpcProvider}});var w=p(10488);Object.defineProperty(s,"Provider",{enumerable:!0,get:function(){return w.Provider}});var E=p(22292);Object.defineProperty(s,"fetchJson",{enumerable:!0,get:function(){return E.fetchJson}})},71935:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(L,N,j,B){return new(j||(j=Promise))(function(G,W){function Q(Z){try{J(B.next(Z))}catch(ee){W(ee)}}function q(Z){try{J(B.throw(Z))}catch(ee){W(ee)}}function J(Z){Z.done?G(Z.value):function V(G){return G instanceof j?G:new j(function(W){W(G)})}(Z.value).then(Q,q)}J((B=B.apply(L,N||[])).next())})},M=this&&this.__rest||function(L,N){var j={};for(var B in L)Object.prototype.hasOwnProperty.call(L,B)&&N.indexOf(B)<0&&(j[B]=L[B]);if(null!=L&&"function"==typeof Object.getOwnPropertySymbols){var V=0;for(B=Object.getOwnPropertySymbols(L);Vh(this,void 0,void 0,function*(){try{const G={method:N,params:j,id:x++,jsonrpc:"2.0"},W=yield(0,S.fetchJson)(this.connection,JSON.stringify(G));if(W.error){if("object"==typeof W.error.data)throw"string"==typeof W.error.data.error_message&&"string"==typeof W.error.data.error_type?new E.TypedError(W.error.data.error_message,W.error.data.error_type):(0,w.parseRpcError)(W.error.data);{const Q=`[${W.error.code}] ${W.error.message}: ${W.error.data}`;throw"Timeout"===W.error.data||Q.includes("Timeout error")||Q.includes("query has timed out")?new E.TypedError(Q,"TimeoutError"):new E.TypedError(Q,(0,w.getErrorTypeFromErrorMessage)(W.error.data,W.error.name))}}return W}catch(G){if("TimeoutError"===G.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${N} as it has timed out`,j),null;throw G}})),{result:V}=B;if(typeof V>"u")throw new E.TypedError(`Exceeded 12 attempts for request to ${N}.`,"RetriesExceeded");return V})}}s.JsonRpcProvider=T},10488:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Provider=void 0;s.Provider=class p{}},89614:ne=>{"use strict";function p(M,w){if("function"!=typeof M)throw new TypeError("argument fn must be a function");return M}function h(M,w,E){if(!M||"object"!=typeof M&&"function"!=typeof M)throw new TypeError("argument obj must be object");var l=Object.getOwnPropertyDescriptor(M,w);if(!l)throw new TypeError("must call property on owner object");if(!l.configurable)throw new TypeError("property must be configurable")}ne.exports=function s(M){if(!M)throw new TypeError("argument namespace is required");function w(E){}return w._file=void 0,w._ignored=!0,w._namespace=M,w._traced=!1,w._warned=Object.create(null),w.function=p,w.property=h,w}},31400:(ne,s,p)=>{"use strict";var h=p(89614)("http-errors"),M=p(1106),w=p(99881),E=p(83894),l=p(77721);function m(L){return Number(String(L).charAt(0)+"00")}function P(L,N){var j=Object.getOwnPropertyDescriptor(L,"name");j&&j.configurable&&(j.value=N,Object.defineProperty(L,"name",j))}function T(L){return"Error"!==L.substr(-5)?L+"Error":L}ne.exports=function y(){for(var L,N,j=500,B={},V=0;V=600)&&h("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof j||!w[j]&&(j<400||j>=600))&&(j=500);var W=y[j]||y[m(j)];for(var Q in L||(L=W?new W(N):new Error(N||w[j]),Error.captureStackTrace(L,y)),(!W||!(L instanceof W)||L.status!==j)&&(L.expose=j<500,L.status=L.statusCode=j),B)"status"!==Q&&"statusCode"!==Q&&(L[Q]=B[Q]);return L},ne.exports.HttpError=function b(){function L(){throw new TypeError("cannot construct abstract class")}return E(L,Error),L}(),ne.exports.isHttpError=function _(L){return function(j){return!(!j||"object"!=typeof j)&&(j instanceof L||j instanceof Error&&"boolean"==typeof j.expose&&"number"==typeof j.statusCode&&j.status===j.statusCode)}}(ne.exports.HttpError),function x(L,N,j){N.forEach(function(V){var G,W=l(w[V]);switch(m(V)){case 400:G=function S(L,N,j){var B=T(N);function V(G){var W=G??w[j],Q=new Error(W);return Error.captureStackTrace(Q,V),M(Q,V.prototype),Object.defineProperty(Q,"message",{enumerable:!0,configurable:!0,value:W,writable:!0}),Object.defineProperty(Q,"name",{enumerable:!1,configurable:!0,value:B,writable:!0}),Q}return E(V,L),P(V,B),V.prototype.status=j,V.prototype.statusCode=j,V.prototype.expose=!0,V}(j,W,V);break;case 500:G=function A(L,N,j){var B=T(N);function V(G){var W=G??w[j],Q=new Error(W);return Error.captureStackTrace(Q,V),M(Q,V.prototype),Object.defineProperty(Q,"message",{enumerable:!0,configurable:!0,value:W,writable:!0}),Object.defineProperty(Q,"name",{enumerable:!1,configurable:!0,value:B,writable:!0}),Q}return E(V,L),P(V,B),V.prototype.status=j,V.prototype.statusCode=j,V.prototype.expose=!1,V}(j,W,V)}G&&(L[V]=G,L[W]=G)}),L["I'mateapot"]=h.function(L.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(ne.exports,w.codes,ne.exports.HttpError)},99881:(ne,s,p)=>{"use strict";var h=p(20863);function w(E){if("number"==typeof E){if(!w[E])throw new Error("invalid status code: "+E);return E}if("string"!=typeof E)throw new TypeError("code must be a number or string");var l=parseInt(E,10);if(!isNaN(l)){if(!w[l])throw new Error("invalid status code: "+l);return l}if(!(l=w[E.toLowerCase()]))throw new Error('invalid status message: "'+E+'"');return l}ne.exports=w,w.STATUS_CODES=h,w.codes=function M(E,l){var m=[];return Object.keys(l).forEach(function(b){var S=l[b],_=Number(b);E[_]=S,E[S]=_,E[S.toLowerCase()]=_,m.push(_)}),m}(w,h),w.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},w.empty={204:!0,205:!0,304:!0},w.retry={502:!0,503:!0,504:!0}},68492:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(b,S,_,A){return new(_||(_=Promise))(function(x,T){function L(B){try{j(A.next(B))}catch(V){T(V)}}function N(B){try{j(A.throw(B))}catch(V){T(V)}}function j(B){B.done?x(B.value):function P(x){return x instanceof _?x:new _(function(T){T(x)})}(B.value).then(L,N)}j((A=A.apply(b,S||[])).next())})},M=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(s,"__esModule",{value:!0}),s.InMemorySigner=void 0;const w=p(29761),E=p(69170),l=M(p(1520)),m=p(2345);class y extends m.Signer{constructor(S){super(),this.keyStore=S}static fromKeyPair(S,_,A){return h(this,void 0,void 0,function*(){const P=new E.InMemoryKeyStore;return yield P.setKey(S,_,A),new y(P)})}createKey(S,_){return h(this,void 0,void 0,function*(){const A=w.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(_,S,A),A.getPublicKey()})}getPublicKey(S,_){return h(this,void 0,void 0,function*(){const A=yield this.keyStore.getKey(_,S);return null===A?null:A.getPublicKey()})}signMessage(S,_,A){return h(this,void 0,void 0,function*(){const P=new Uint8Array(l.default.sha256.array(S));if(!_)throw new Error("InMemorySigner requires provided account id");const x=yield this.keyStore.getKey(A,_);if(null===x)throw new Error(`Key for ${_} not found in ${A}`);return x.sign(P)})}toString(){return`InMemorySigner(${this.keyStore})`}}s.InMemorySigner=y},82613:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signer=s.InMemorySigner=void 0;var h=p(68492);Object.defineProperty(s,"InMemorySigner",{enumerable:!0,get:function(){return h.InMemorySigner}});var M=p(2345);Object.defineProperty(s,"Signer",{enumerable:!0,get:function(){return M.Signer}})},2345:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signer=void 0;s.Signer=class p{}},39779:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.actionCreators=s.stringifyJsonOrBytes=void 0;const h=p(83407);function m(T){return void 0!==T.byteLength&&T.byteLength===T.length?T:Buffer.from(JSON.stringify(T))}s.stringifyJsonOrBytes=m,s.actionCreators={addKey:function _(T,L){return new h.Action({addKey:new h.AddKey({publicKey:T,accessKey:L})})},createAccount:function E(){return new h.Action({createAccount:new h.CreateAccount({})})},deleteAccount:function P(T){return new h.Action({deleteAccount:new h.DeleteAccount({beneficiaryId:T})})},deleteKey:function A(T){return new h.Action({deleteKey:new h.DeleteKey({publicKey:T})})},deployContract:function l(T){return new h.Action({deployContract:new h.DeployContract({code:T})})},fullAccessKey:function M(){return new h.AccessKey({permission:new h.AccessKeyPermission({fullAccess:new h.FullAccessPermission({})})})},functionCall:function y(T,L,N,j,B=m,V=!1){return V?new h.Action({functionCall:new h.FunctionCall({methodName:T,args:L,gas:N,deposit:j})}):new h.Action({functionCall:new h.FunctionCall({methodName:T,args:B(L),gas:N,deposit:j})})},functionCallAccessKey:function w(T,L,N){return new h.AccessKey({permission:new h.AccessKeyPermission({functionCall:new h.FunctionCallPermission({receiverId:T,allowance:N,methodNames:L})})})},signedDelegate:function x({delegateAction:T,signature:L}){return new h.Action({signedDelegate:new h.SignedDelegate({delegateAction:T,signature:L})})},stake:function S(T,L){return new h.Action({stake:new h.Stake({stake:T,publicKey:L})})},transfer:function b(T){return new h.Action({transfer:new h.Transfer({deposit:T})})}}},83407:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Action=s.SignedDelegate=s.DeleteAccount=s.DeleteKey=s.AddKey=s.Stake=s.Transfer=s.FunctionCall=s.DeployContract=s.CreateAccount=s.IAction=s.AccessKey=s.AccessKeyPermission=s.FullAccessPermission=s.FunctionCallPermission=void 0;const h=p(17527);class M{constructor(V){if(1!==Object.keys(V).length)throw new Error("Enum can only take single value");Object.keys(V).map(G=>{this[G]=V[G],this.enum=G})}}class w extends h.Assignable{}s.FunctionCallPermission=w;class E extends h.Assignable{}s.FullAccessPermission=E;s.AccessKeyPermission=class l extends M{};class m extends h.Assignable{}s.AccessKey=m;class y extends h.Assignable{}s.IAction=y;s.CreateAccount=class b extends y{};s.DeployContract=class S extends y{};s.FunctionCall=class _ extends y{};s.Transfer=class A extends y{};s.Stake=class P extends y{};s.AddKey=class x extends y{};s.DeleteKey=class T extends y{};s.DeleteAccount=class L extends y{};s.SignedDelegate=class N extends y{};s.Action=class j extends M{}},71354:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.createTransaction=void 0;const h=p(73315);s.createTransaction=function M(w,E,l,m,y,b){return new h.Transaction({signerId:w,publicKey:E,nonce:m,receiverId:l,actions:y,blockHash:b})}},91396:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.buildDelegateAction=s.DelegateAction=void 0;const h=p(17527),M=p(39779),{addKey:w,createAccount:E,deleteAccount:l,deleteKey:m,deployContract:y,functionCall:b,stake:S,transfer:_}=M.actionCreators;class A extends h.Assignable{}s.DelegateAction=A,s.buildDelegateAction=function P({actions:x,maxBlockHeight:T,nonce:L,publicKey:N,receiverId:j,senderId:B}){return new A({senderId:B,receiverId:j,actions:x.map(V=>{if(!V.type&&!V.params)return V;switch(V.type){case"AddKey":{const{publicKey:G,accessKey:W}=V.params;return w(G,W)}case"CreateAccount":return E(V.params.createAccount);case"DeleteAccount":return l(V.params.deleteAccount);case"DeleteKey":return m(V.params.publicKey);case"DeployContract":return y(V.params.code);case"FunctionCall":{const{methodName:G,args:W,gas:Q,deposit:q}=V.params;return b(G,W,Q,q)}case"Stake":return S(V.params.stake,V.params.publicKey);case"Transfer":{const{deposit:G}=V.params;return _(G)}}throw new Error("Unrecognized action")}),nonce:L,maxBlockHeight:T,publicKey:N})}},38445:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(w,E,l,m){void 0===m&&(m=l);var y=Object.getOwnPropertyDescriptor(E,l);(!y||("get"in y?!E.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return E[l]}}),Object.defineProperty(w,m,y)}:function(w,E,l,m){void 0===m&&(m=l),w[m]=E[l]}),M=this&&this.__exportStar||function(w,E){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(E,l)&&h(E,w,l)};Object.defineProperty(s,"__esModule",{value:!0}),M(p(39779),s),M(p(83407),s),M(p(71354),s),M(p(91396),s),M(p(73315),s),M(p(20373),s),M(p(95758),s)},11739:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.DelegateActionPrefix=void 0;const h=p(17527),M=Math.pow(2,30),w_MetaTransactions=366;class E extends h.Assignable{}class l extends E{constructor(b){super({prefix:M+b})}}s.DelegateActionPrefix=class m extends l{constructor(){super(w_MetaTransactions)}}},73315:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SCHEMA=s.SignedTransaction=s.Transaction=s.decodeSignedTransaction=s.decodeTransaction=s.encodeTransaction=s.encodeSignedDelegate=s.encodeDelegateAction=void 0;const h=p(29761),M=p(17527),w=p(21531),E=p(83407),l=p(91396),m=p(11739),y=p(95758);function _(L){return(0,w.serialize)(s.SCHEMA,L)}function A(L){return(0,w.deserialize)(s.SCHEMA,x,L)}function P(L){return(0,w.deserialize)(s.SCHEMA,T,L)}s.encodeDelegateAction=function b(L){return new Uint8Array([...(0,w.serialize)(s.SCHEMA,new m.DelegateActionPrefix),...(0,w.serialize)(s.SCHEMA,L)])},s.encodeSignedDelegate=function S(L){return(0,w.serialize)(s.SCHEMA,L)},s.encodeTransaction=_,s.decodeTransaction=A,s.decodeSignedTransaction=P;class x extends M.Assignable{encode(){return _(this)}static decode(N){return A(N)}}s.Transaction=x;class T extends M.Assignable{encode(){return _(this)}static decode(N){return P(N)}}s.SignedTransaction=T,s.SCHEMA=new Map([[y.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[T,{kind:"struct",fields:[["transaction",x],["signature",y.Signature]]}],[x,{kind:"struct",fields:[["signerId","string"],["publicKey",h.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[E.Action]]]}],[h.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[E.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",E.AccessKeyPermission]]}],[E.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",E.FunctionCallPermission],["fullAccess",E.FullAccessPermission]]}],[E.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[E.FullAccessPermission,{kind:"struct",fields:[]}],[E.Action,{kind:"enum",field:"enum",values:[["createAccount",E.CreateAccount],["deployContract",E.DeployContract],["functionCall",E.FunctionCall],["transfer",E.Transfer],["stake",E.Stake],["addKey",E.AddKey],["deleteKey",E.DeleteKey],["deleteAccount",E.DeleteAccount],["signedDelegate",E.SignedDelegate]]}],[E.CreateAccount,{kind:"struct",fields:[]}],[E.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[E.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[E.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[E.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",h.PublicKey]]}],[E.AddKey,{kind:"struct",fields:[["publicKey",h.PublicKey],["accessKey",E.AccessKey]]}],[E.DeleteKey,{kind:"struct",fields:[["publicKey",h.PublicKey]]}],[E.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[l.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[E.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",h.PublicKey]]}],[m.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[E.SignedDelegate,{kind:"struct",fields:[["delegateAction",l.DelegateAction],["signature",y.Signature]]}]])},20373:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(A,P,x,T){return new(x||(x=Promise))(function(N,j){function B(W){try{G(T.next(W))}catch(Q){j(Q)}}function V(W){try{G(T.throw(W))}catch(Q){j(Q)}}function G(W){W.done?N(W.value):function L(N){return N instanceof x?N:new x(function(j){j(N)})}(W.value).then(B,V)}G((T=T.apply(A,P||[])).next())})},M=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(s,"__esModule",{value:!0}),s.signDelegateAction=s.signTransaction=void 0;const w=M(p(1520)),E=p(83407),l=p(71354),m=p(73315),y=p(95758);function b(A,P,x,T){return h(this,void 0,void 0,function*(){const L=(0,m.encodeTransaction)(A),N=new Uint8Array(w.default.sha256.array(L)),j=yield P.signMessage(L,x,T);return[N,new m.SignedTransaction({transaction:A,signature:new y.Signature({keyType:A.publicKey.keyType,data:j.signature})})]})}s.signTransaction=function S(...A){return h(this,void 0,void 0,function*(){if(A[0].constructor===m.Transaction){const[P,x,T,L]=A;return b(P,x,T,L)}{const[P,x,T,L,N,j,B]=A,V=yield N.getPublicKey(j,B);return b((0,l.createTransaction)(j,V,P,x,T,L),N,j,B)}})},s.signDelegateAction=function _({delegateAction:A,signer:P}){return h(this,void 0,void 0,function*(){const x=(0,m.encodeDelegateAction)(A),T=yield P.sign(x),L=new E.SignedDelegate({delegateAction:A,signature:new y.Signature({keyType:A.publicKey.keyType,data:T})});return{hash:new Uint8Array(w.default.sha256.array(x)),signedDelegateAction:L}})}},95758:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signature=void 0;const h=p(17527);class M extends h.Assignable{}s.Signature=M},32272:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Assignable=void 0;s.Assignable=class p{constructor(M){Object.keys(M).map(w=>{this[w]=M[w]})}}},27876:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ErrorContext=s.TypedError=s.ArgumentTypeError=s.PositionalArgsError=void 0;class p extends Error{constructor(){super("Contract method calls expect named arguments wrapped in object, e.g. { argName1: argValue1, argName2: argValue2 }")}}s.PositionalArgsError=p;class h extends Error{constructor(l,m,y){super(`Expected ${m} for '${l}' argument, but got '${JSON.stringify(y)}'`)}}s.ArgumentTypeError=h;class M extends Error{constructor(l,m,y){super(l),this.type=m||"UntypedError",this.context=y}}s.TypedError=M;s.ErrorContext=class w{constructor(l){this.transactionHash=l}}},17527:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(w,E,l,m){void 0===m&&(m=l);var y=Object.getOwnPropertyDescriptor(E,l);(!y||("get"in y?!E.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return E[l]}}),Object.defineProperty(w,m,y)}:function(w,E,l,m){void 0===m&&(m=l),w[m]=E[l]}),M=this&&this.__exportStar||function(w,E){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(E,l)&&h(E,w,l)};Object.defineProperty(s,"__esModule",{value:!0}),M(p(32272),s),M(p(27876),s),M(p(39077),s)},39077:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.FinalExecutionStatusBasic=s.ExecutionStatusBasic=s.IdType=void 0;var h=p(16365);Object.defineProperty(s,"IdType",{enumerable:!0,get:function(){return h.IdType}});var M=p(83706);Object.defineProperty(s,"ExecutionStatusBasic",{enumerable:!0,get:function(){return M.ExecutionStatusBasic}}),Object.defineProperty(s,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return M.FinalExecutionStatusBasic}})},16365:(ne,s)=>{"use strict";var h;Object.defineProperty(s,"__esModule",{value:!0}),s.IdType=void 0,(h=s.IdType||(s.IdType={})).Transaction="transaction",h.Receipt="receipt"},83706:(ne,s)=>{"use strict";var M;Object.defineProperty(s,"__esModule",{value:!0}),s.FinalExecutionStatusBasic=s.ExecutionStatusBasic=void 0,(M=s.ExecutionStatusBasic||(s.ExecutionStatusBasic={})).Unknown="Unknown",M.Pending="Pending",M.Failure="Failure",function(M){M.NotStarted="NotStarted",M.Started="Started",M.Failure="Failure"}(s.FinalExecutionStatusBasic||(s.FinalExecutionStatusBasic={}))},73215:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(s,"__esModule",{value:!0}),s.DEFAULT_FUNCTION_CALL_GAS=void 0;const M=h(p(98538));s.DEFAULT_FUNCTION_CALL_GAS=new M.default("30000000000000")},38668:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.logWarning=void 0,s.logWarning=function p(...h){process.env.NEAR_NO_LOGS||console.warn(...h)}},359:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.parseRpcError=s.parseResultError=s.getErrorTypeFromErrorMessage=s.formatError=s.ServerError=s.logWarning=void 0;var h=p(38668);Object.defineProperty(s,"logWarning",{enumerable:!0,get:function(){return h.logWarning}});var M=p(97217);Object.defineProperty(s,"ServerError",{enumerable:!0,get:function(){return M.ServerError}}),Object.defineProperty(s,"formatError",{enumerable:!0,get:function(){return M.formatError}}),Object.defineProperty(s,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return M.getErrorTypeFromErrorMessage}}),Object.defineProperty(s,"parseResultError",{enumerable:!0,get:function(){return M.parseResultError}}),Object.defineProperty(s,"parseRpcError",{enumerable:!0,get:function(){return M.parseRpcError}})},97217:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(s,"__esModule",{value:!0}),s.getErrorTypeFromErrorMessage=s.formatError=s.parseResultError=s.parseRpcError=s.ServerError=void 0;const M=p(17527),w=h(p(11346)),E=p(67112),l=h(p(56584)),m=h(p(96747)),y={formatNear:()=>(j,B)=>(0,E.formatNearAmount)(B(j))};class b extends M.TypedError{}s.ServerError=b;class S extends b{}function _(j){const B={},V=x(j,m.default.schema,B,""),G=new b(P(V,B),V);return Object.assign(G,B),G}function P(j,B){return"string"==typeof l.default[j]?w.default.render(l.default[j],Object.assign(Object.assign({},B),y)):JSON.stringify(B)}function x(j,B,V,G){let W,Q,q;for(const J in B){if(N(j[J]))return j[J];if(L(j[J]))W=j[J],Q=B[J],q=J;else{if(!L(j.kind)||!L(j.kind[J]))continue;W=j.kind[J],Q=B[J],q=J}}if(W&&Q){for(const J of Object.keys(Q.props))V[J]=W[J];return x(W,B,V,q)}return V.kind=j,G}function L(j){return"[object Object]"===Object.prototype.toString.call(j)}function N(j){return"[object String]"===Object.prototype.toString.call(j)}s.parseRpcError=_,s.parseResultError=function A(j){const B=_(j.status.Failure),V=new S;return Object.assign(V,B),V.type=B.type,V.message=B.message,V.transaction_outcome=j.transaction_outcome,V},s.formatError=P,s.getErrorTypeFromErrorMessage=function T(j,B){switch(!0){case/^account .*? does not exist while viewing$/.test(j):case/^Account .*? doesn't exist$/.test(j):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(j):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(j):return"CodeDoesNotExist";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(j):return"InvalidNonce";default:return B}}},67112:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(s,"__esModule",{value:!0}),s.parseNearAmount=s.formatNearAmount=s.NEAR_NOMINATION=s.NEAR_NOMINATION_EXP=void 0;const M=h(p(98538));s.NEAR_NOMINATION_EXP=24,s.NEAR_NOMINATION=new M.default("10",10).pow(new M.default(s.NEAR_NOMINATION_EXP,10));const w=[],E=new M.default(10);for(let A=0,P=new M.default(5);A0&&x.iadd(w[N])}const T=(A=x.toString()).substring(0,A.length-s.NEAR_NOMINATION_EXP)||"0",L=A.substring(A.length-s.NEAR_NOMINATION_EXP).padStart(s.NEAR_NOMINATION_EXP,"0").substring(0,P);return function b(A){return A.replace(/\.?0*$/,"")}(`${function _(A){const P=/(-?\d+)(\d{3})/;for(;P.test(A);)A=A.replace(P,"$1,$2");return A}(T)}.${L}`)},s.parseNearAmount=function m(A){if(!A)return null;const P=(A=function y(A){return A.replace(/,/g,"").trim()}(A)).split("."),x=P[0],T=P[1]||"";if(P.length>2||T.length>s.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${A}' as NEAR amount`);return function S(A){return A=A.replace(/^0+/,""),""===A?"0":A}(x+T.padEnd(s.NEAR_NOMINATION_EXP,"0"))}},41166:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(w,E,l,m){void 0===m&&(m=l);var y=Object.getOwnPropertyDescriptor(E,l);(!y||("get"in y?!E.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return E[l]}}),Object.defineProperty(w,m,y)}:function(w,E,l,m){void 0===m&&(m=l),w[m]=E[l]}),M=this&&this.__exportStar||function(w,E){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(E,l)&&h(E,w,l)};Object.defineProperty(s,"__esModule",{value:!0}),M(p(73215),s),M(p(359),s),M(p(67112),s),M(p(30279),s),M(p(11305),s),M(p(85406),s)},30279:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.printTxOutcomeLogs=s.printTxOutcomeLogsAndFailures=void 0;const h=p(359),M=!!process.env.NEAR_NO_LOGS;function E({contractId:l,logs:m,prefix:y=""}){if(!M)for(const b of m)console.log(`${y}Log [${l}]: ${b}`)}s.printTxOutcomeLogsAndFailures=function w({contractId:l,outcome:m}){if(M)return;const y=[m.transaction_outcome,...m.receipts_outcome].reduce((b,S)=>{const _="object"==typeof S.outcome.status&&"object"==typeof S.outcome.status.Failure;return S.outcome.logs.length||_?b.concat({receiptIds:S.outcome.receipt_ids,logs:S.outcome.logs,failure:"object"==typeof S.outcome.status&&void 0!==S.outcome.status.Failure?(0,h.parseRpcError)(S.outcome.status.Failure):null}):b},[]);for(const b of y)console.log(`Receipt${b.receiptIds.length>1?"s":""}: ${b.receiptIds.join(", ")}`),E({contractId:l,logs:b.logs,prefix:"\t"}),b.failure&&console.warn(`\tFailure [${l}]: ${b.failure}`)},s.printTxOutcomeLogs=E},11305:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.getTransactionLastResult=void 0,s.getTransactionLastResult=function p(h){if("object"==typeof h.status&&"string"==typeof h.status.SuccessValue){const M=Buffer.from(h.status.SuccessValue,"base64").toString();try{return JSON.parse(M)}catch{return M}}return null}},85406:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(s,"__esModule",{value:!0}),s.diffEpochValidators=s.findSeatPrice=void 0;const M=h(p(98538)),w=h(p(89176));s.findSeatPrice=function E(b,S,_,A){return A&&A<49?function l(b,S){const _=b.map(L=>new M.default(L.stake,10)).sort((L,N)=>L.cmp(N)),A=new M.default(S),P=_.reduce((L,N)=>L.add(N));if(P.lt(A))throw new Error("Stakes are below seats");let x=new M.default(1),T=P.add(new M.default(1));for(;!x.eq(T.sub(new M.default(1)));){const L=x.add(T).div(new M.default(2));let N=!1,j=new M.default(0);for(let B=0;B<_.length;++B)if(j=j.add(_[B].div(L)),j.gte(A)){x=L,N=!0;break}N||(T=L)}return x}(b,S):(_||((0,w.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),_=[1,6250]),function m(b,S,_){if(2!=_.length)throw Error("minimumStakeRatio should have 2 elements");const A=b.map(x=>new M.default(x.stake,10)).sort((x,T)=>x.cmp(T)),P=A.reduce((x,T)=>x.add(T));return b.length_.set(P.account_id,P));const A=new Set(S.map(P=>P.account_id));return{newValidators:S.filter(P=>!_.has(P.account_id)),removedValidators:b.filter(P=>!A.has(P.account_id)),changedValidators:S.filter(P=>_.has(P.account_id)&&_.get(P.account_id).stake!=P.stake).map(P=>({current:_.get(P.account_id),next:P}))}}},9855:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WalletConnection=s.ConnectedWalletAccount=s.Near=void 0;var h=p(75754);Object.defineProperty(s,"Near",{enumerable:!0,get:function(){return h.Near}});var M=p(55859);Object.defineProperty(s,"ConnectedWalletAccount",{enumerable:!0,get:function(){return M.ConnectedWalletAccount}}),Object.defineProperty(s,"WalletConnection",{enumerable:!0,get:function(){return M.WalletConnection}})},75754:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})},M=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(s,"__esModule",{value:!0}),s.Near=void 0;const w=p(74931),E=M(p(98538));s.Near=class l{constructor(y){var b;if(this.config=y,this.connection=w.Connection.fromConfig({networkId:y.networkId,provider:{type:"JsonRpcProvider",args:{url:y.nodeUrl,headers:y.headers}},signer:y.signer||{type:"InMemorySigner",keyStore:y.keyStore||(null===(b=y.deps)||void 0===b?void 0:b.keyStore)},jsvmAccountId:y.jsvmAccountId||`jsvm.${y.networkId}`}),y.masterAccount){const S=y.initialBalance?new E.default(y.initialBalance):new E.default("500000000000000000000000000");this.accountCreator=new w.LocalAccountCreator(new w.Account(this.connection,y.masterAccount),S)}else y.helperUrl?this.accountCreator=new w.UrlAccountCreator(this.connection,y.helperUrl):this.accountCreator=null}account(y){return h(this,void 0,void 0,function*(){return new w.Account(this.connection,y)})}createAccount(y,b){return h(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(y,b),new w.Account(this.connection,y)})}}},55859:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(T,L,N,j){return new(N||(N=Promise))(function(V,G){function W(J){try{q(j.next(J))}catch(Z){G(Z)}}function Q(J){try{q(j.throw(J))}catch(Z){G(Z)}}function q(J){J.done?V(J.value):function B(V){return V instanceof N?V:new N(function(G){G(V)})}(J.value).then(W,Q)}q((j=j.apply(T,L||[])).next())})},M=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(s,"__esModule",{value:!0}),s.ConnectedWalletAccount=s.WalletConnection=void 0;const w=p(74931),E=p(29761),l=p(38445),m=M(p(98538)),y=p(21531),A="pending_key";s.WalletConnection=class P{constructor(L,N){if("string"!=typeof N)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(V,G)=>"isSignedIn"===G?()=>!1:"getAccountId"===G?()=>"":V[G]&&"function"==typeof V[G]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:V[G]});this._near=L;const j=N+"_wallet_auth_key",B=JSON.parse(window.localStorage.getItem(j));this._networkId=L.config.networkId,this._walletBaseUrl=L.config.walletUrl,N=N||L.config.contractName||"default",this._keyStore=L.connection.signer.keyStore,this._authData=B||{allKeys:[]},this._authDataKey=j,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return h(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:L,methodNames:N,successUrl:j,failureUrl:B}){return h(this,void 0,void 0,function*(){const V=new URL(window.location.href),G=new URL(this._walletBaseUrl+"/login/");if(G.searchParams.set("success_url",j||V.href),G.searchParams.set("failure_url",B||V.href),L){yield(yield this._near.account(L)).state(),G.searchParams.set("contract_id",L);const Q=E.KeyPair.fromRandom("ed25519");G.searchParams.set("public_key",Q.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,A+Q.getPublicKey(),Q)}N&&N.forEach(W=>{G.searchParams.append("methodNames",W)}),window.location.assign(G.toString())})}requestSignTransactions({transactions:L,meta:N,callbackUrl:j}){return h(this,void 0,void 0,function*(){const B=new URL(window.location.href),V=new URL("sign",this._walletBaseUrl);V.searchParams.set("transactions",L.map(G=>(0,y.serialize)(l.SCHEMA,G)).map(G=>Buffer.from(G).toString("base64")).join(",")),V.searchParams.set("callbackUrl",j||B.href),N&&V.searchParams.set("meta",N),window.location.assign(V.toString())})}_completeSignInWithAccessKey(){return h(this,void 0,void 0,function*(){const L=new URL(window.location.href),N=L.searchParams.get("public_key")||"",j=(L.searchParams.get("all_keys")||"").split(","),B=L.searchParams.get("account_id")||"";if(B){const V={accountId:B,allKeys:j};window.localStorage.setItem(this._authDataKey,JSON.stringify(V)),N&&(yield this._moveKeyFromTempToPermanent(B,N)),this._authData=V}L.searchParams.delete("public_key"),L.searchParams.delete("all_keys"),L.searchParams.delete("account_id"),L.searchParams.delete("meta"),L.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,L.toString())})}_moveKeyFromTempToPermanent(L,N){return h(this,void 0,void 0,function*(){const j=yield this._keyStore.getKey(this._networkId,A+N);yield this._keyStore.setKey(this._networkId,L,j),yield this._keyStore.removeKey(this._networkId,A+N)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new x(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class x extends w.Account{constructor(L,N,j){super(N,j),this.walletConnection=L}signAndSendTransaction({receiverId:L,actions:N,walletMeta:j,walletCallbackUrl:B=window.location.href}){const V=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const G=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let W=yield this.accessKeyForTransaction(L,N,G);if(!W)throw new Error(`Cannot find matching key for transaction sent to ${L}`);if(G&&G.toString()===W.public_key)try{return yield V.signAndSendTransaction.call(this,{receiverId:L,actions:N})}catch(I){if("NotEnoughAllowance"!==I.type)throw I;W=yield this.accessKeyForTransaction(L,N)}const Q=yield this.connection.provider.block({finality:"final"}),q=(0,y.baseDecode)(Q.header.hash),J=E.PublicKey.from(W.public_key),Z=W.access_key.nonce.add(new m.default(1)),ee=(0,l.createTransaction)(this.accountId,J,L,Z,N,q);return yield this.walletConnection.requestSignTransactions({transactions:[ee],meta:j,callbackUrl:B}),new Promise((I,o)=>{setTimeout(()=>{o(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(L,N,j){return h(this,void 0,void 0,function*(){const{access_key:{permission:B}}=L;if("FullAccess"===B)return!0;if(B.FunctionCall){const{receiver_id:V,method_names:G}=B.FunctionCall;if(V===this.accountId&&G.includes("add_request_and_confirm"))return!0;if(V===N){if(1!==j.length)return!1;const[{functionCall:W}]=j;return W&&(!W.deposit||"0"===W.deposit.toString())&&(0===G.length||G.includes(W.methodName))}}return!1})}accessKeyForTransaction(L,N,j){return h(this,void 0,void 0,function*(){const B=yield this.getAccessKeys();if(j){const G=B.find(W=>W.public_key.toString()===j.toString());if(G&&(yield this.accessKeyMatchesTransaction(G,L,N)))return G}const V=this.walletConnection._authData.allKeys;for(const G of B)if(-1!==V.indexOf(G.public_key)&&(yield this.accessKeyMatchesTransaction(G,L,N)))return G;return null})}}s.ConnectedWalletAccount=x},67497:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(ee,I,o,a){void 0===a&&(a=o);var d=Object.getOwnPropertyDescriptor(I,o);(!d||("get"in d?!I.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return I[o]}}),Object.defineProperty(ee,a,d)}:function(ee,I,o,a){void 0===a&&(a=o),ee[a]=I[o]}),M=this&&this.__setModuleDefault||(Object.create?function(ee,I){Object.defineProperty(ee,"default",{enumerable:!0,value:I})}:function(ee,I){ee.default=I}),w=this&&this.__importStar||function(ee){if(ee&&ee.__esModule)return ee;var I={};if(null!=ee)for(var o in ee)"default"!==o&&Object.prototype.hasOwnProperty.call(ee,o)&&h(I,ee,o);return M(I,ee),I},E=this&&this.__awaiter||function(ee,I,o,a){return new(o||(o=Promise))(function(g,D){function F(f){try{C(a.next(f))}catch(k){D(k)}}function z(f){try{C(a.throw(f))}catch(k){D(k)}}function C(f){f.done?g(f.value):function d(g){return g instanceof o?g:new o(function(D){D(g)})}(f.value).then(F,z)}C((a=a.apply(ee,I||[])).next())})},l=this&&this.__importDefault||function(ee){return ee&&ee.__esModule?ee:{default:ee}};Object.defineProperty(s,"__esModule",{value:!0});const m=l(p(41348)),y=p(38445),b=p(71836),S=p(91001),_=p(91311),A=p(7123),P=p(45733),x=p(46358),T=p(8127),L=p(98538),N=p(46260),j=p(67388),B=p(89764),V=w(p(65645)),G=p(35737),W=p(30684),Q=l(p(59881)),q=p(70560),J={mainnet:"https://rpc.mainnet.near.org",testnet:"https://rpc.testnet.near.org"};class Z extends b.Account{constructor(I){var o,a;super({networkId:I.network,jsvmAccountId:`jsvm.${I.network}`,signer:new b.InMemorySigner(new S.InMemoryKeyStore),provider:new _.JsonRpcProvider({url:J[I.network]})},I.accountId),this.publicKey=I.publicKey,this.snap=null!==(o=I.snap)&&void 0!==o?o:new Q.default,this.delegateProvider=null!==(a=I.delegateProvider)&&void 0!==a?a:new q.HEREDelegateProvider}get network(){return this.connection.networkId}connect(I,o=[]){return E(this,void 0,void 0,function*(){return yield this.snap.connect({network:this.network,contractId:I,methods:o})})}disconnect(){return E(this,void 0,void 0,function*(){return yield this.snap.disconnect({network:this.network})})}authenticate(I,o){return E(this,void 0,void 0,function*(){yield this.activateIfNeeded();const a=m.default.randomBytes(32),d={message:o,recipient:I,nonce:a,network:this.network},g=yield this.signMessage(d);if(!V.verifySignature(d,g))throw Error("Signature is incorrect");if(!(yield this.getAccessKeys()).some(C=>C.public_key===g.publicKey&&"FullAccess"===C.access_key.permission))throw Error("Signer public key is not full access");return g})}signMessage(I){return E(this,void 0,void 0,function*(){const o=yield this.snap.signMessage({message:I.message,nonce:Array.from(I.nonce),recipient:I.recipient,network:this.network});if(!o)throw Error("Signed result is undefined");const{accountId:a,publicKey:d,signature:g}=o;if(!a||!d||!g)throw Error("Signed result is undefined");return{accountId:a,publicKey:d,signature:g}})}signTransaction(I,o){return E(this,void 0,void 0,function*(){const a=yield this.getLastNonce(),{total:d}=yield this.getAccountBalance(),g=yield this.snap.signTransactions({network:this.connection.networkId,hintBalance:d,transactions:[{recentBlockHash:a.block_hash,nonce:new L.BN(a.nonce).iaddn(1).toNumber(),actions:o.map(j.convertAction),receiverId:I}]});if(!g?.[0])throw Error("Access denided");return[(0,A.base_decode)(g[0][0]),P.SignedTransaction.decode((0,A.base_decode)(g[0][1]))]})}activateIfNeeded(I=2){return E(this,void 0,void 0,function*(){if(I<=0)return null;try{return yield this.getLastNonce()}catch{try{if(!this.delegateProvider)throw Error();return yield this.delegateProvider.activateAccount(this.accountId,this.publicKey.toString(),this.network),yield(0,N.wait)(1e3),yield this.activateIfNeeded(I-1)}catch{return yield this.snap.needActivate(this.network),yield(0,N.wait)(1e3),yield this.activateIfNeeded(I-1)}}})}getLastNonce(){return E(this,void 0,void 0,function*(){return yield this.connection.provider.query({request_type:"view_access_key",public_key:this.publicKey.toString(),account_id:this.accountId,finality:"final"})})}signedDelegate({actions:I,blockHeightTtl:o,receiverId:a,payer:d}){return E(this,void 0,void 0,function*(){const g=yield this.getLastNonce(),D=(0,y.buildDelegateAction)({maxBlockHeight:new L.BN(g.block_height).add(new L.BN(o)),nonce:new L.BN(g.nonce).add(new L.BN(1)),publicKey:this.publicKey,senderId:this.accountId,receiverId:a,actions:I}),{total:F}=yield this.getAccountBalance(),z=yield this.snap.signDelegatedTransactions({payer:d,hintBalance:F,network:this.connection.networkId,delegateAction:{maxBlockHeight:D.maxBlockHeight.toString(),actions:D.actions.map(j.convertAction),publicKey:D.publicKey.toString(),nonce:D.nonce.toString(),receiverId:D.receiverId,senderId:D.senderId}});if(!z?.signature||!z?.transaction)throw Error("Access denied");return{delegateAction:D,signature:{keyType:x.KeyType.ED25519,data:(0,A.base_decode)(z.signature)}}})}signAndSendTransaction({receiverId:I,actions:o}){return E(this,void 0,void 0,function*(){return(yield this.executeTransactions([{actions:o.map(j.convertAction),receiverId:I}]))[0]})}buildDelegateAction(I){return E(this,void 0,void 0,function*(){if(!this.delegateProvider)throw new q.DelegateNotAllowed;if(I instanceof y.DelegateAction){const D=this.connection.networkId,F=yield this.delegateProvider.isCanDelegate(I,D);return{action:I,allowed:F}}const o=yield this.getLastNonce(),a=(0,y.buildDelegateAction)({actions:I.actions.map(B.createAction),maxBlockHeight:new L.BN(o.block_height).add(new L.BN(100)),nonce:new L.BN(o.nonce).add(new L.BN(1)),publicKey:this.publicKey,senderId:this.accountId,receiverId:I.receiverId}),d=this.connection.networkId;return{action:a,allowed:yield this.delegateProvider.isCanDelegate(a,d)}})}executeDelegate(I){return E(this,void 0,void 0,function*(){if(!this.delegateProvider)throw new q.DelegateNotAllowed;yield this.activateIfNeeded();const{action:o,allowed:a}=yield this.buildDelegateAction(I);if(!a){const z=`Delegated transaction is now allowed by ${this.delegateProvider.payer}. Try other DelegateProvider`;throw new q.DelegateNotAllowed(z)}const d=yield this.signedDelegate({payer:this.delegateProvider.payer,actions:o.actions,receiverId:I.receiverId,blockHeightTtl:100}),{provider:g,networkId:D}=this.connection,F=yield this.delegateProvider.sendDelegate(d,D);return yield(0,N.waitTransactionResult)(F,this.accountId,g)})}executeTransaction(I){return E(this,void 0,void 0,function*(){try{if(I.disableDelegate)throw new q.DelegateNotAllowed;return yield this.executeDelegate(I)}catch(o){if(o instanceof q.DelegateNotAllowed||o instanceof q.DelegateRequestError)return(yield this.executeTransactions([I]))[0];throw o}})}executeTransactions(I){return E(this,void 0,void 0,function*(){yield this.activateIfNeeded();const o=yield this.getLastNonce(),{total:a}=yield this.getAccountBalance(),d=yield this.snap.signTransactions({hintBalance:a,network:this.connection.networkId,transactions:I.map((D,F)=>Object.assign({nonce:new L.BN(o.nonce).iaddn(F+1).toNumber(),recentBlockHash:o.block_hash},D))});if(null==d)throw new G.TransactionSignRejected;const g=[];d?.forEach((D,F)=>{if(null==D)throw new G.TransactionSignRejected(I[F])});try{for(const D of d){const F=D,z=P.SignedTransaction.decode(Buffer.from(F[1],"hex"));g.push(yield this.connection.provider.sendTransaction(z))}}catch(D){throw new G.TransactionInListError(g,D)}return g})}static restore({network:I,delegateProvider:o,snap:a=new Q.default}){return E(this,void 0,void 0,function*(){const d=yield a.getAccount(I).catch(()=>null);if(!d?.accountId||!d?.publicKey)return null;const g=new Z({publicKey:T.PublicKey.fromString(d.publicKey),accountId:d.accountId,delegateProvider:o,network:I,snap:a});return yield g.activateIfNeeded(),g})}static connect({snap:I=new Q.default,delegateProvider:o,contractId:a,methods:d,network:g}){return E(this,void 0,void 0,function*(){const D=yield I.getStatus();if(D===W.NearSnapStatus.NOT_SUPPORTED)throw Error("You need install Metamask no lower than version 11");D===W.NearSnapStatus.NOT_INSTALLED&&(yield I.install());const F=yield I.connect({contractId:a,methods:d,network:g});if(!F?.accountId)throw Error("Metamask Near Snap did not return account id");if(!F?.publicKey)throw Error("Metamask Near Snap did not return public key");const z=new Z({delegateProvider:o,publicKey:T.PublicKey.fromString(F.publicKey),accountId:F.accountId,network:g,snap:I});return yield z.activateIfNeeded(),z})}}s.default=Z},70560:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(y,b,S,_){return new(S||(S=Promise))(function(P,x){function T(j){try{N(_.next(j))}catch(B){x(B)}}function L(j){try{N(_.throw(j))}catch(B){x(B)}}function N(j){j.done?P(j.value):function A(P){return P instanceof S?P:new S(function(x){x(P)})}(j.value).then(T,L)}N((_=_.apply(y,b||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.HEREDelegateProvider=s.DelegateRequestError=s.DelegateNotAllowed=void 0;const M=p(7123),w=p(71836);class E extends Error{}s.DelegateNotAllowed=E;class l extends Error{}s.DelegateRequestError=l;s.HEREDelegateProvider=class m{constructor(){this.endpoint="https://api.herewallet.app/api/v1",this.payer="here"}activateAccount(b,S,_){return h(this,void 0,void 0,function*(){const A=yield fetch(`${this.endpoint}/user/create_near_username`,{method:"POST",body:JSON.stringify({near_account_id:b,device_id:"metamask",public_key:S,sign:""}),headers:{Network:_}});if(!A.ok)throw new l(yield A.text())})}isCanDelegate(b,S="mainnet"){return h(this,void 0,void 0,function*(){if("mainnet"!==S)return!1;const _=Buffer.from(w.transactions.encodeDelegateAction(b)).toString("base64"),A=yield fetch(`${this.endpoint}/transactions/is_delegate`,{body:JSON.stringify({transaction:_}),method:"POST"});if(!A.ok)throw new l(yield A.text());const{allowed:P}=yield A.json();return P})}sendDelegate(b,S="mainnet"){return h(this,void 0,void 0,function*(){if("mainnet"!==S)throw new E;const _=Buffer.from(w.transactions.encodeDelegateAction(b.delegateAction)).toString("base64"),A=yield fetch(`${this.endpoint}/transactions/call_delegate`,{method:"POST",body:JSON.stringify({signature:(0,M.base_encode)(b.signature.data),transaction:_})});if(!A.ok)throw new l(yield A.text());const{hash:P}=yield A.json();return P})}}},35737:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.TransactionInListError=s.TransactionSignRejected=void 0;class p extends Error{constructor(w){super("Transaction was rejected by Metamask user"),this.name="TransactionSignRejected",this.trx=w}}s.TransactionSignRejected=p;class h extends Error{constructor(w,E){super(E instanceof Error?E.message:String(E)),this.name="ListOfTransactionsError",this.completed=w,this.reason=E}}s.TransactionInListError=h},72487:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(b,S,_,A){void 0===A&&(A=_);var P=Object.getOwnPropertyDescriptor(S,_);(!P||("get"in P?!S.__esModule:P.writable||P.configurable))&&(P={enumerable:!0,get:function(){return S[_]}}),Object.defineProperty(b,A,P)}:function(b,S,_,A){void 0===A&&(A=_),b[A]=S[_]}),M=this&&this.__exportStar||function(b,S){for(var _ in b)"default"!==_&&!Object.prototype.hasOwnProperty.call(S,_)&&h(S,b,_)},w=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(s,"__esModule",{value:!0}),s.NearSnapAccount=s.TransactionSignRejected=s.TransactionInListError=s.NearSnapProvider=s.NearSnap=void 0,M(p(30684),s);var E=p(59881);Object.defineProperty(s,"NearSnap",{enumerable:!0,get:function(){return w(E).default}});var l=p(10243);Object.defineProperty(s,"NearSnapProvider",{enumerable:!0,get:function(){return w(l).default}});var m=p(35737);Object.defineProperty(s,"TransactionInListError",{enumerable:!0,get:function(){return m.TransactionInListError}}),Object.defineProperty(s,"TransactionSignRejected",{enumerable:!0,get:function(){return m.TransactionSignRejected}});var y=p(67497);Object.defineProperty(s,"NearSnapAccount",{enumerable:!0,get:function(){return w(y).default}})},10243:function(ne,s){"use strict";var p=this&&this.__awaiter||function(M,w,E,l){return new(E||(E=Promise))(function(y,b){function S(P){try{A(l.next(P))}catch(x){b(x)}}function _(P){try{A(l.throw(P))}catch(x){b(x)}}function A(P){P.done?y(P.value):function m(y){return y instanceof E?y:new E(function(b){b(y)})}(P.value).then(S,_)}A((l=l.apply(M,w||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0});s.default=class h{isSnapsAvailable(w=11){return p(this,void 0,void 0,function*(){const E=window.ethereum,l=yield E?.request({method:"web3_clientVersion"}).catch(()=>null);if("string"!=typeof l)return!1;const m=l.replace("MetaMask/v","").split(".")[0];return Number(m)>=w})}getSnaps(){return p(this,void 0,void 0,function*(){return yield window.ethereum.request({method:"wallet_getSnaps"})})}connectSnap(w,E={}){return p(this,void 0,void 0,function*(){yield window.ethereum.request({method:"wallet_requestSnaps",params:{[w]:E}})})}getSnap(w,E){return p(this,void 0,void 0,function*(){try{const l=yield this.getSnaps();return Object.values(l).find(m=>m.id===w&&(!E||m.version===E))}catch(l){return void console.log("Failed to obtain installed snap",l)}})}invokeSnap(w,E,l){return p(this,void 0,void 0,function*(){return yield window.ethereum.request({method:"wallet_invokeSnap",params:{snapId:w,request:{method:E,params:l}}})})}}},59881:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})},M=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(s,"__esModule",{value:!0});const w=M(p(10243)),E=p(30684);s.default=class l{constructor(y){var b,S;this.provider=null!==(b=y?.provider)&&void 0!==b?b:new w.default,this.id=null!==(S=y?.id)&&void 0!==S?S:"npm:@near-snap/plugin"}get isLocal(){return this.id.startsWith("local:")}getStatus(){return h(this,void 0,void 0,function*(){return(yield this.provider.isSnapsAvailable())?(yield this.provider.getSnap(this.id))?E.NearSnapStatus.INSTALLED:E.NearSnapStatus.NOT_INSTALLED:E.NearSnapStatus.NOT_SUPPORTED})}install(){return h(this,void 0,void 0,function*(){yield this.provider.connectSnap(this.id)})}getAccount(y){return h(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_getAccount",{network:y})})}connect(y){return h(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_connect",y)})}disconnect(y){return h(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_disconnect",y)})}getPermissions(y){return h(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_getPermissions",{network:y})})}needActivate(y){return h(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_needActivate",{network:y})})}signMessage(y){return h(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signMessage",y)})}signDelegatedTransactions(y){return h(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signDelegate",y)})}signTransactions(y){return h(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signTransactions",y)})}}},30684:(ne,s)=>{"use strict";var p,h;Object.defineProperty(s,"__esModule",{value:!0}),s.NearSnapStatus=void 0,(h=p||(s.NearSnapStatus=p={}))[h.NOT_SUPPORTED=0]="NOT_SUPPORTED",h[h.NOT_INSTALLED=1]="NOT_INSTALLED",h[h.INSTALLED=2]="INSTALLED"},67388:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.convertAction=s.TGAS=void 0,s.TGAS=Math.pow(10,12);const p=M=>{try{return JSON.parse(Buffer.from(M).toString("utf8"))}catch{return Array.from(M)}};s.convertAction=M=>{var w,E,l,m,y,b;if(M.addKey){const{accessKey:S,publicKey:_}=M.addKey;if(S.permission.fullAccess)return{type:"AddKey",params:{accessKey:{permission:"FullAccess"},publicKey:_.toString()}};if(S.permission.functionCall){const A=S.permission.functionCall;return{type:"AddKey",params:{publicKey:_.toString(),accessKey:{permission:{receiverId:A.receiverId,methodNames:A.methodNames,allowance:null===(w=A.allowance)||void 0===w?void 0:w.toString(10)}}}}}}if(M.createAccount)return{type:"CreateAccount"};if(M.deleteAccount)return{type:"DeleteAccount",params:{beneficiaryId:M.deleteAccount.beneficiaryId}};if(M.deleteKey)return{type:"DeleteKey",params:{publicKey:M.deleteKey.publicKey.toString()}};if(M.deployContract)return{type:"DeployContract",params:{code:M.deployContract.code}};if(M.functionCall)return{type:"FunctionCall",params:{args:p(M.functionCall.args),deposit:null!==(l=null===(E=M.functionCall.deposit)||void 0===E?void 0:E.toString())&&void 0!==l?l:"0",gas:null!==(y=null===(m=M.functionCall.gas)||void 0===m?void 0:m.toString())&&void 0!==y?y:String(300*s.TGAS),methodName:null!==(b=M.functionCall.methodName)&&void 0!==b?b:""}};if(M.transfer)return{type:"Transfer",params:{deposit:M.transfer.deposit.toString()}};if(M.stake)return{type:"Stake",params:{publicKey:M.stake.publicKey.toString(),stake:M.stake.stake.toString()}};throw Error(`Action ${M.enum} is not supported`)}},89764:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(S,_,A,P){void 0===P&&(P=A);var x=Object.getOwnPropertyDescriptor(_,A);(!x||("get"in x?!_.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return _[A]}}),Object.defineProperty(S,P,x)}:function(S,_,A,P){void 0===P&&(P=A),S[P]=_[A]}),M=this&&this.__setModuleDefault||(Object.create?function(S,_){Object.defineProperty(S,"default",{enumerable:!0,value:_})}:function(S,_){S.default=_}),w=this&&this.__importStar||function(S){if(S&&S.__esModule)return S;var _={};if(null!=S)for(var A in S)"default"!==A&&Object.prototype.hasOwnProperty.call(S,A)&&h(_,S,A);return M(_,S),_};Object.defineProperty(s,"__esModule",{value:!0}),s.createAction=void 0;const E=p(98538),l=w(p(45733)),m=p(8127);s.createAction=S=>{switch(S.type){case"CreateAccount":return l.createAccount();case"DeployContract":{const{code:_}=S.params;return l.deployContract(_)}case"FunctionCall":{const{methodName:_,args:A,gas:P,deposit:x}=S.params;return l.functionCall(_,A,new E.BN(P),new E.BN(x))}case"Transfer":{const{deposit:_}=S.params;return l.transfer(new E.BN(_))}case"Stake":{const{stake:_,publicKey:A}=S.params;return l.stake(new E.BN(_),m.PublicKey.from(A))}case"AddKey":{const{publicKey:_,accessKey:A}=S.params;return l.addKey(m.PublicKey.from(_),(S=>{if("FullAccess"===S)return l.fullAccessKey();const{receiverId:_,methodNames:A=[]}=S,P=S.allowance?new E.BN(S.allowance):void 0;return l.functionCallAccessKey(_,A,P)})(A.permission))}case"DeleteKey":{const{publicKey:_}=S.params;return l.deleteKey(m.PublicKey.from(_))}case"DeleteAccount":{const{beneficiaryId:_}=S.params;return l.deleteAccount(_)}default:throw new Error("Invalid action type")}}},65645:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(s,"__esModule",{value:!0}),s.verifySignature=s.authPayloadSchema=s.AuthPayload=void 0;const M=h(p(41348)),w=p(8127),E=p(7123);class l{constructor({message:b,nonce:S,recipient:_,callbackUrl:A}){this.tag=2147484061,this.message=b,this.nonce=S,this.recipient=_,A&&(this.callbackUrl=A)}}s.AuthPayload=l,s.authPayloadSchema=new Map([[l,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),s.verifySignature=function m(y,b){const S=new l(y),_=(0,E.serialize)(s.authPayloadSchema,S),A=M.default.createHash("sha256"),P=Uint8Array.from(A.update(_).digest()),x=new Uint8Array(Buffer.from(b.signature,"base64"));return w.PublicKey.from(b.publicKey).verify(P,x)}},46260:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(l,m,y,b){return new(y||(y=Promise))(function(_,A){function P(L){try{T(b.next(L))}catch(N){A(N)}}function x(L){try{T(b.throw(L))}catch(N){A(N)}}function T(L){L.done?_(L.value):function S(_){return _ instanceof y?_:new y(function(A){A(_)})}(L.value).then(P,x)}T((b=b.apply(l,m||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.waitTransactionResult=s.wait=void 0;const M=p(5754);s.wait=l=>new Promise(m=>setTimeout(m,l));s.waitTransactionResult=(l,m,y)=>h(void 0,void 0,void 0,function*(){let b;yield(0,s.wait)(2e3);try{b=yield y.txStatus(l,m)}catch{return yield(0,s.waitTransactionResult)(l,m,y)}const S=[],_=b.transaction_outcome.outcome,A=b.receipts_outcome.reduce((T,L)=>(T[L.id]=L.outcome,T),{}),P=T=>T.some(L=>{if(!A[L])return!1;const{status:N}=A[L];return"string"==typeof N?(N===M.ExecutionStatusBasic.Failure&&S.push(N),!1):N.Failure?(S.push(N.Failure),!1):"string"==typeof N.SuccessValue&&0===A[L].receipt_ids.length||P(A[L].receipt_ids)}),x=P(_.receipt_ids);if(S.length>0)throw Error(JSON.stringify(S,null,2));return x?b:yield(0,s.waitTransactionResult)(l,m,y)})},76913:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(s,"__esModule",{value:!0});const M=h(p(87908)),w=h(p(98593)),E=h(p(50539)),l=h(p(13917)),m=h(p(15247)),y={development:Object.assign(Object.assign({},E.default),M.default),test:Object.assign({},w.default),staging:Object.assign(Object.assign({},E.default),m.default),production:Object.assign(Object.assign({},E.default),l.default)},b=process.env.CONFIG_ENV||"production";if(!(b in y))throw new Error(`${b} is not a valid env config`);const S=y[b];s.default=S},863:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(s,"__esModule",{value:!0}),s.createAction=s.parseArgs=void 0;const M=p(8597),w=h(p(98538));s.parseArgs=y=>"string"==typeof y?Buffer.from(y,"base64"):y;s.createAction=y=>{switch(y.type){case"CreateAccount":return M.transactions.createAccount();case"DeployContract":{const{code:b}=y.params;return M.transactions.deployContract(b)}case"FunctionCall":{const{methodName:b,args:S,gas:_,deposit:A}=y.params;return M.transactions.functionCall(b,(0,s.parseArgs)(S),new w.default(_),new w.default(A))}case"Transfer":{const{deposit:b}=y.params;return M.transactions.transfer(new w.default(b))}case"Stake":{const{stake:b,publicKey:S}=y.params;return M.transactions.stake(new w.default(b),M.utils.PublicKey.from(S))}case"AddKey":{const{publicKey:b,accessKey:S}=y.params;return M.transactions.addKey(M.utils.PublicKey.from(b),(y=>{if("FullAccess"===y)return M.transactions.fullAccessKey();const{receiverId:b,methodNames:S=[]}=y,_=y.allowance?new w.default(y.allowance):void 0;return M.transactions.functionCallAccessKey(b,S,_)})(S.permission))}case"DeleteKey":{const{publicKey:b}=y.params;return M.transactions.deleteKey(M.utils.PublicKey.from(b))}case"DeleteAccount":{const{beneficiaryId:b}=y.params;return M.transactions.deleteAccount(b)}default:throw new Error("Invalid action type")}}},23183:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.isValidAccessKey=void 0;s.isValidAccessKey=(h,M,w,E)=>{if(M.public_key===w)return!0;const{permission:l}=M.access_key;if("FullAccess"===l)return!0;if(E&&l.FunctionCall){const{receiver_id:m,method_names:y}=l.FunctionCall;if(m===h&&y.includes("add_request_and_confirm"))return!0;if(m===E.receiverId)return 1===E.actions.length&&E.actions.every(b=>"FunctionCall"===b.type&&((!b.params.deposit||"0"===b.params.deposit.toString())&&(0===y.length||y.includes(b.params.methodName))))}return!1}},33492:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(y,b,S,_){void 0===_&&(_=S);var A=Object.getOwnPropertyDescriptor(b,S);(!A||("get"in A?!b.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return b[S]}}),Object.defineProperty(y,_,A)}:function(y,b,S,_){void 0===_&&(_=S),y[_]=b[S]}),M=this&&this.__setModuleDefault||(Object.create?function(y,b){Object.defineProperty(y,"default",{enumerable:!0,value:b})}:function(y,b){y.default=b}),w=this&&this.__importStar||function(y){if(y&&y.__esModule)return y;var b={};if(null!=y)for(var S in y)"default"!==S&&Object.prototype.hasOwnProperty.call(y,S)&&h(b,y,S);return M(b,y),b},E=this&&this.__awaiter||function(y,b,S,_){return new(S||(S=Promise))(function(P,x){function T(j){try{N(_.next(j))}catch(B){x(B)}}function L(j){try{N(_.throw(j))}catch(B){x(B)}}function N(j){j.done?P(j.value):function A(P){return P instanceof S?P:new S(function(x){x(P)})}(j.value).then(T,L)}N((_=_.apply(y,b||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0});const l=w(p(27682));s.default=function m(y,b,S={}){let _,A=!1;const x=(()=>E(this,void 0,void 0,function*(){const{delay:T=1e3,maxIterations:L,timeout:N}=S;let V,j=0,B=!1;function G(){return E(this,void 0,void 0,function*(){B=!1;try{return yield void 0!==N?(0,l.default)(y(),N):y()}catch(W){if(!(W instanceof l.TimeoutPromiseError))throw W;B=!0}})}for(V=yield G();!A&&(B||b(V));){if(j===L)throw new Error("Polling executed the maximum number iterations");yield new Promise(W=>{_=setTimeout(()=>E(this,void 0,void 0,function*(){j++,V=yield G(),W()}),T)})}return V}))();return x.abort=()=>{A=!0,clearTimeout(_)},x}},27682:function(ne,s){"use strict";var p=this&&this.__awaiter||function(w,E,l,m){return new(l||(l=Promise))(function(b,S){function _(x){try{P(m.next(x))}catch(T){S(T)}}function A(x){try{P(m.throw(x))}catch(T){S(T)}}function P(x){x.done?b(x.value):function y(b){return b instanceof l?b:new l(function(S){S(b)})}(x.value).then(_,A)}P((m=m.apply(w,E||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.TimeoutPromiseError=void 0;class h extends Error{constructor(){super("Promise timeout")}}s.TimeoutPromiseError=h,s.default=function M(w,E){return p(this,void 0,void 0,function*(){let l;const m=new Promise((b,S)=>{l=setTimeout(()=>{S(new h)},E)}),y=yield Promise.race([w,m]);return clearTimeout(l),y})}},39825:(ne,s)=>{"use strict";var p,h;Object.defineProperty(s,"__esModule",{value:!0}),s.SignerRequestStatus=void 0,(h=p||(s.SignerRequestStatus=p={})).PENDING="pending",h.APPROVED="approved",h.REJECTED="rejected"},96299:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ApiError=void 0;class p extends Error{constructor(M,w,E){super(E),this.name="ApiError",this.url=w.url,this.status=w.status,this.statusText=w.statusText,this.body=w.body,this.request=M}}s.ApiError=p},43868:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.CancelablePromise=s.CancelError=void 0;class p extends Error{constructor(w){super(w),this.name="CancelError"}get isCancelled(){return!0}}s.CancelError=p;s.CancelablePromise=class h{constructor(w){this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((E,l)=>{this._resolve=E,this._reject=l;const b=S=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(S)};return Object.defineProperty(b,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(b,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(b,"isCancelled",{get:()=>this._isCancelled}),w(S=>{var _;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,null===(_=this._resolve)||void 0===_||_.call(this,S))},S=>{var _;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,null===(_=this._reject)||void 0===_||_.call(this,S))},b)})}then(w,E){return this._promise.then(w,E)}catch(w){return this._promise.catch(w)}finally(w){return this._promise.finally(w)}cancel(){var w;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const E of this._cancelHandlers)E()}catch(E){return void console.warn("Cancellation threw an error",E)}this._cancelHandlers.length=0,null===(w=this._reject)||void 0===w||w.call(this,new p("Request aborted"))}}get isCancelled(){return this._isCancelled}}},75023:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(s,"__esModule",{value:!0}),s.OpenAPI=void 0;const M=h(p(76913));s.OpenAPI={BASE:M.default.proxyUrl,VERSION:"0.0.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0}},51022:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(W,Q,q,J){return new(q||(q=Promise))(function(ee,I){function o(g){try{d(J.next(g))}catch(D){I(D)}}function a(g){try{d(J.throw(g))}catch(D){I(D)}}function d(g){g.done?ee(g.value):function Z(ee){return ee instanceof q?ee:new q(function(I){I(ee)})}(g.value).then(o,a)}d((J=J.apply(W,Q||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.request=s.sendRequest=void 0;const M=p(96299),w=p(43868),E=W=>null!=W,l=W=>"string"==typeof W,m=W=>l(W)&&""!==W,y=W=>"object"==typeof W&&"string"==typeof W.type&&"function"==typeof W.stream&&"function"==typeof W.arrayBuffer&&"function"==typeof W.constructor&&"string"==typeof W.constructor.name&&/^(Blob|File)$/.test(W.constructor.name)&&/^(Blob|File)$/.test(W[Symbol.toStringTag]),b=W=>W instanceof FormData,_=W=>{const Q=[],J=(Z,ee)=>{E(ee)&&(Array.isArray(ee)?ee.forEach(I=>{J(Z,I)}):"object"==typeof ee?Object.entries(ee).forEach(([I,o])=>{J(`${Z}[${I}]`,o)}):((Z,ee)=>{Q.push(`${encodeURIComponent(Z)}=${encodeURIComponent(String(ee))}`)})(Z,ee))};return Object.entries(W).forEach(([Z,ee])=>{J(Z,ee)}),Q.length>0?`?${Q.join("&")}`:""},x=(W,Q)=>h(void 0,void 0,void 0,function*(){return"function"==typeof Q?Q(W):Q}),T=(W,Q)=>h(void 0,void 0,void 0,function*(){const q=yield x(Q,W.TOKEN),J=yield x(Q,W.USERNAME),Z=yield x(Q,W.PASSWORD),ee=yield x(Q,W.HEADERS),I=Object.entries(Object.assign(Object.assign({Accept:"application/json"},ee),Q.headers)).filter(([o,a])=>E(a)).reduce((o,[a,d])=>Object.assign(Object.assign({},o),{[a]:String(d)}),{});if(m(q)&&(I.Authorization=`Bearer ${q}`),m(J)&&m(Z)){const o=(W=>{try{return btoa(W)}catch{return Buffer.from(W).toString("base64")}})(`${J}:${Z}`);I.Authorization=`Basic ${o}`}return Q.body&&(Q.mediaType?I["Content-Type"]=Q.mediaType:y(Q.body)?I["Content-Type"]=Q.body.type||"application/octet-stream":l(Q.body)?I["Content-Type"]="text/plain":b(Q.body)||(I["Content-Type"]="application/json")),new Headers(I)});s.sendRequest=(W,Q,q,J,Z,ee,I)=>h(void 0,void 0,void 0,function*(){const o=new AbortController,a={headers:ee,body:J??Z,method:Q.method,signal:o.signal};return W.WITH_CREDENTIALS&&(a.credentials=W.CREDENTIALS),I(()=>o.abort()),yield fetch(q,a)});s.request=(W,Q)=>new w.CancelablePromise((q,J,Z)=>h(void 0,void 0,void 0,function*(){try{const ee=((W,Q)=>{const q=W.ENCODE_PATH||encodeURI,J=Q.url.replace("{api-version}",W.VERSION).replace(/{(.*?)}/g,(ee,I)=>{var o;return null!==(o=Q.path)&&void 0!==o&&o.hasOwnProperty(I)?q(String(Q.path[I])):ee}),Z=`${W.BASE}${J}`;return Q.query?`${Z}${_(Q.query)}`:Z})(W,Q),I=(W=>{if(W.formData){const Q=new FormData,q=(J,Z)=>{l(Z)||y(Z)?Q.append(J,Z):Q.append(J,JSON.stringify(Z))};return Object.entries(W.formData).filter(([J,Z])=>E(Z)).forEach(([J,Z])=>{Array.isArray(Z)?Z.forEach(ee=>q(J,ee)):q(J,Z)}),Q}})(Q),o=(W=>{var Q;if(W.body)return null!==(Q=W.mediaType)&&void 0!==Q&&Q.includes("/json")?JSON.stringify(W.body):l(W.body)||y(W.body)||b(W.body)?W.body:JSON.stringify(W.body)})(Q),a=yield T(W,Q);if(!Z.isCancelled){const d=yield(0,s.sendRequest)(W,Q,ee,o,I,a,Z),g=yield(W=>h(void 0,void 0,void 0,function*(){if(204!==W.status)try{const Q=W.headers.get("Content-Type");if(Q)return Q.toLowerCase().startsWith("application/json")?yield W.json():yield W.text()}catch(Q){console.error(Q)}}))(d),D=((W,Q)=>{if(Q){const q=W.headers.get(Q);if(l(q))return q}})(d,Q.responseHeader),F={url:ee,ok:d.ok,status:d.status,statusText:d.statusText,body:D??g};((W,Q)=>{const J=Object.assign({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},W.errors)[Q.status];if(J)throw new M.ApiError(W,Q,J);if(!Q.ok)throw new M.ApiError(W,Q,"Generic Error")})(Q,F),q(F.body)}}catch(ee){J(ee)}}))},9273:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SignerRequestApi=s.$SignRequest=s.$SignMessageRequestPayload=s.$SignMessageRequestDto=s.$SignerTransactionDto=s.$SignerRequestStatusDto=s.$SignerRequestDto=s.$DAppMetadatRequest=s.$DAppMetadataDto=s.$CreateSignMessageRequest=s.$CreateSignerRequest=s.OpenAPI=s.CancelError=s.CancelablePromise=s.ApiError=void 0;var h=p(96299);Object.defineProperty(s,"ApiError",{enumerable:!0,get:function(){return h.ApiError}});var M=p(43868);Object.defineProperty(s,"CancelablePromise",{enumerable:!0,get:function(){return M.CancelablePromise}}),Object.defineProperty(s,"CancelError",{enumerable:!0,get:function(){return M.CancelError}});var w=p(75023);Object.defineProperty(s,"OpenAPI",{enumerable:!0,get:function(){return w.OpenAPI}});var E=p(16588);Object.defineProperty(s,"$CreateSignerRequest",{enumerable:!0,get:function(){return E.$CreateSignerRequest}});var l=p(82988);Object.defineProperty(s,"$CreateSignMessageRequest",{enumerable:!0,get:function(){return l.$CreateSignMessageRequest}});var m=p(57470);Object.defineProperty(s,"$DAppMetadataDto",{enumerable:!0,get:function(){return m.$DAppMetadataDto}});var y=p(71482);Object.defineProperty(s,"$DAppMetadatRequest",{enumerable:!0,get:function(){return y.$DAppMetadatRequest}});var b=p(48322);Object.defineProperty(s,"$SignerRequestDto",{enumerable:!0,get:function(){return b.$SignerRequestDto}});var S=p(47282);Object.defineProperty(s,"$SignerRequestStatusDto",{enumerable:!0,get:function(){return S.$SignerRequestStatusDto}});var _=p(34652);Object.defineProperty(s,"$SignerTransactionDto",{enumerable:!0,get:function(){return _.$SignerTransactionDto}});var A=p(25654);Object.defineProperty(s,"$SignMessageRequestDto",{enumerable:!0,get:function(){return A.$SignMessageRequestDto}});var P=p(93089);Object.defineProperty(s,"$SignMessageRequestPayload",{enumerable:!0,get:function(){return P.$SignMessageRequestPayload}});var x=p(53951);Object.defineProperty(s,"$SignRequest",{enumerable:!0,get:function(){return x.$SignRequest}});var T=p(61123);Object.defineProperty(s,"SignerRequestApi",{enumerable:!0,get:function(){return T.SignerRequestApi}})},82988:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$CreateSignMessageRequest=void 0,s.$CreateSignMessageRequest={properties:{network:{type:"Enum",isRequired:!0},message:{type:"string",isRequired:!0},receiver:{type:"string",isRequired:!0},nonce:{type:"array",contains:{type:"number"},isRequired:!0},callbackUrl:{type:"string"},receiverMetadata:{type:"DAppMetadatRequest"}}}},16588:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$CreateSignerRequest=void 0,s.$CreateSignerRequest={properties:{network:{type:"Enum",isRequired:!0},transactions:{type:"array",contains:{type:"one-of",contains:[{type:"SignerTransactionDto"}]},isRequired:!0},dAppMetadata:{type:"DAppMetadatRequest"}}}},71482:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$DAppMetadatRequest=void 0,s.$DAppMetadatRequest={properties:{}}},57470:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$DAppMetadataDto=void 0,s.$DAppMetadataDto={properties:{name:{type:"string",isRequired:!0},logoUrl:{type:"string",isRequired:!0},url:{type:"string"}}}},25654:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$SignMessageRequestDto=void 0,s.$SignMessageRequestDto={properties:{id:{type:"string",isRequired:!0},message:{type:"string",isRequired:!0},receiver:{type:"string",isRequired:!0},nonce:{type:"array",contains:{type:"number"},isRequired:!0},callbackUrl:{type:"string"},network:{type:"Enum",isRequired:!0},response:{properties:{},isRequired:!0},receiverMetadata:{type:"DAppMetadataDto"},status:{type:"Enum",isRequired:!0}}}},93089:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$SignMessageRequestPayload=void 0,s.$SignMessageRequestPayload={properties:{accountId:{type:"string",isRequired:!0},signature:{type:"string",isRequired:!0},publicKey:{type:"string",isRequired:!0}}}},53951:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$SignRequest=void 0,s.$SignRequest={properties:{signerAccountId:{type:"string",isRequired:!0},txHash:{type:"array",contains:{type:"string"},isRequired:!0}}}},48322:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$SignerRequestDto=void 0,s.$SignerRequestDto={properties:{id:{type:"string",isRequired:!0},status:{type:"Enum",isRequired:!0},network:{type:"Enum",isRequired:!0},signerAccountId:{type:"string",isRequired:!0},requests:{type:"array",contains:{properties:{}},isRequired:!0},dAppMetadata:{type:"DAppMetadataDto"},txHash:{type:"array",contains:{type:"string"}},createdAt:{type:"string",isRequired:!0,format:"date-time"},updatedAt:{type:"string",isRequired:!0,format:"date-time"}}}},47282:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$SignerRequestStatusDto=void 0,s.$SignerRequestStatusDto={properties:{id:{type:"string",isRequired:!0},status:{type:"Enum",isRequired:!0}}}},34652:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$SignerTransactionDto=void 0,s.$SignerTransactionDto={properties:{signerId:{type:"string"},receiverId:{type:"string"},actions:{type:"array",contains:{properties:{}},isRequired:!0}}}},61123:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SignerRequestApi=void 0;const h=p(75023),M=p(51022);s.SignerRequestApi=class w{static createSignerRequest(l){return(0,M.request)(h.OpenAPI,{method:"POST",url:"/api/signer-request",body:l,mediaType:"application/json"})}static getSignerRequestStatus(l){return(0,M.request)(h.OpenAPI,{method:"GET",url:"/api/signer-request/{id}/status",path:{id:l}})}static approveSignerRequest(l,m){return(0,M.request)(h.OpenAPI,{method:"POST",url:"/api/signer-request/{id}/approve",path:{id:l},body:m,mediaType:"application/json"})}static rejectSignerRequest(l){return(0,M.request)(h.OpenAPI,{method:"POST",url:"/api/signer-request/{id}/reject",path:{id:l}})}static getSignerRequest(l){return(0,M.request)(h.OpenAPI,{method:"GET",url:"/api/signer-request/{id}",path:{id:l}})}static createSignMessageRequest(l){return(0,M.request)(h.OpenAPI,{method:"POST",url:"/api/signer-request/message",body:l,mediaType:"application/json"})}static getSignMessageRequest(l){return(0,M.request)(h.OpenAPI,{method:"GET",url:"/api/signer-request/message/{id}",path:{id:l}})}static signMessageRequest(l,m){return(0,M.request)(h.OpenAPI,{method:"POST",url:"/api/signer-request/message/{id}/sign",path:{id:l},body:m,mediaType:"application/json"})}static rejectMessageRequest(l){return(0,M.request)(h.OpenAPI,{method:"POST",url:"/api/signer-request/message/{id}/reject",path:{id:l}})}}},2199:(ne,s)=>{"use strict";var p,h;Object.defineProperty(s,"__esModule",{value:!0}),s.RepositoryErrorCodes=s.SessionRepositoryErrorCodes=void 0,(h=p||(s.SessionRepositoryErrorCodes=p={})).INVALID_ACCOUNT_ID="INVALID_ACCOUNT_ID",h.ACCOUNT_KEY_NOT_FOUND="ACCOUNT_KEY_NOT_FOUND",s.RepositoryErrorCodes=p},21251:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(w,E,l,m){void 0===m&&(m=l);var y=Object.getOwnPropertyDescriptor(E,l);(!y||("get"in y?!E.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return E[l]}}),Object.defineProperty(w,m,y)}:function(w,E,l,m){void 0===m&&(m=l),w[m]=E[l]}),M=this&&this.__exportStar||function(w,E){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(E,l)&&h(E,w,l)};Object.defineProperty(s,"__esModule",{value:!0}),M(p(69560),s)},45358:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.SessionRepository=void 0;const M=p(82687),w=p(2199),E=p(8597);class l extends M.WindowLocalStorageRepository{constructor(){super("session"),this.loadSessionState()}loadSessionState(){return h(this,void 0,void 0,function*(){(yield this.get())||(yield this.set({mainnet:{activeAccount:null,accounts:{}},testnet:{activeAccount:null,accounts:{}}}))})}getKey(y,b){var S;return h(this,void 0,void 0,function*(){const A=null===(S=(yield this.get())[y])||void 0===S?void 0:S.accounts[b];if(!A)throw new Error(w.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND);return E.KeyPair.fromString(A)})}setKey(y,b,S){return h(this,void 0,void 0,function*(){const _=yield this.get();_[y].accounts[b]=S.toString(),yield this.set(_)})}removeKey(y,b){return h(this,void 0,void 0,function*(){const S=yield this.get();S[y].activeAccount===b&&(S[y].activeAccount=null),delete S[y].accounts[b],yield this.set(S)})}getActiveAccount(y){return h(this,void 0,void 0,function*(){return(yield this.get())[y].activeAccount})}setActiveAccount(y,b){return h(this,void 0,void 0,function*(){const S=yield this.get();if(!Object.keys(S[y].accounts).includes(b))throw new Error(w.RepositoryErrorCodes.INVALID_ACCOUNT_ID);S[y].activeAccount=b,yield this.set(S)})}getAccounts(y){return h(this,void 0,void 0,function*(){const S=(yield this.get())[y].accounts;return Object.keys(S)})}getNetworks(){return h(this,void 0,void 0,function*(){const y=yield this.get();return Object.keys(y)})}clear(){return h(this,void 0,void 0,function*(){yield this.clear()})}}s.SessionRepository=l},98494:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(w,E,l,m){void 0===m&&(m=l);var y=Object.getOwnPropertyDescriptor(E,l);(!y||("get"in y?!E.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return E[l]}}),Object.defineProperty(w,m,y)}:function(w,E,l,m){void 0===m&&(m=l),w[m]=E[l]}),M=this&&this.__exportStar||function(w,E){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(E,l)&&h(E,w,l)};Object.defineProperty(s,"__esModule",{value:!0}),M(p(45358),s)},61439:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Repository=void 0;s.Repository=class p{constructor(M){this.projectName="near-mobile-signer",this.key=`${this.projectName}:${M}`}}},82687:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WindowLocalStorageRepository=void 0;const h=p(61439);class M extends h.Repository{set(E){return Promise.resolve(window.localStorage.setItem(this.key,JSON.stringify(E)))}get(){const E=window.localStorage.getItem(this.key);return Promise.resolve(E?JSON.parse(E):void 0)}clear(){return Promise.resolve(window.localStorage.removeItem(this.key))}}s.WindowLocalStorageRepository=M},75729:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WindowLocalStorageRepository=s.Repository=void 0;var h=p(61439);Object.defineProperty(s,"Repository",{enumerable:!0,get:function(){return h.Repository}});var M=p(82687);Object.defineProperty(s,"WindowLocalStorageRepository",{enumerable:!0,get:function(){return M.WindowLocalStorageRepository}})},69560:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(w,E,l,m){void 0===m&&(m=l);var y=Object.getOwnPropertyDescriptor(E,l);(!y||("get"in y?!E.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return E[l]}}),Object.defineProperty(w,m,y)}:function(w,E,l,m){void 0===m&&(m=l),w[m]=E[l]}),M=this&&this.__exportStar||function(w,E){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(E,l)&&h(E,w,l)};Object.defineProperty(s,"__esModule",{value:!0}),M(p(98494),s),M(p(75729),s)},96105:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(T,L,N,j){return new(N||(N=Promise))(function(V,G){function W(J){try{q(j.next(J))}catch(Z){G(Z)}}function Q(J){try{q(j.throw(J))}catch(Z){G(Z)}}function q(J){J.done?V(J.value):function B(V){return V instanceof N?V:new N(function(G){G(V)})}(J.value).then(W,Q)}q((j=j.apply(T,L||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.NearMobileWallet=void 0;const M=p(8597),w=p(87974),E=p(97186),l=p(12139),m=p(39825),y=p(23183),b=p(863),S=p(93730),_=p(21251),A=p(94196),P=p(2199);s.NearMobileWallet=class x{handleRequestStatus(L){var N,j,B,V;L===m.SignerRequestStatus.APPROVED?null===(j=(N=this.defaultStrategy).onApproved)||void 0===j||j.call(N):L===m.SignerRequestStatus.REJECTED&&(null===(V=(B=this.defaultStrategy).onError)||void 0===V||V.call(B))}loadConnection(L,N){const j=new M.InMemorySigner(this.sessionRepository),B=new w.JsonRpcProvider({url:L??`https://rpc.${N}.near.org`});this.connection=M.Connection.fromConfig({jsvmAccountId:`jsvm.${N}`,provider:B,network:N,signer:j})}retryTransaction({requests:L}){var N,j,B,V;return h(this,void 0,void 0,function*(){try{const{id:G,network:W,requests:Q}=yield this.defaultProvider.createRequest(this.network,L,this.dAppMetadata);null===(j=(N=this.defaultStrategy).onRequested)||void 0===j||j.call(N,G,{network:W,request:Q});const{status:q}=yield this.defaultProvider.awaitActionSignatureResolution(G);this.handleRequestStatus(q);const{signerAccountId:J,txHash:Z}=yield this.defaultProvider.getRequest(G);if(!J||!Z)throw new Error(S.WalletErrors.REQUEST_NOT_SIGNED);if(1===Z.length)return yield this.rpc.txStatus(Z[0],J);throw new Error(S.WalletErrors.OPERATION_FAILED)}catch(G){throw null===(V=(B=this.defaultStrategy).onError)||void 0===V||V.call(B),new Error(G)}})}constructor({nodeUrl:L,network:N="testnet",sessionRepository:j=new _.SessionRepository,metadata:B}={}){this.network=N,this.sessionRepository=j,this.defaultStrategy=new E.WidgetStrategy,this.defaultProvider=new l.NearMobileSignerProxy,this.dAppMetadata=B,this.loadConnection(L,N)}get rpc(){return this.connection.provider}get signer(){return this.connection.signer}get networkId(){return this.connection.networkId}getAccounts(){return h(this,void 0,void 0,function*(){return this.sessionRepository.getAccounts(this.network)})}isSignedIn(L){return h(this,void 0,void 0,function*(){try{const N=yield this.sessionRepository.getActiveAccount(this.network);if(L&&N!==L||null===N)return!1;const j=yield this.sessionRepository.getKey(this.network,N);if(null===j)throw new Error(P.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND);return void 0!==(yield(yield this.account(N)).getAccessKeys()).find(W=>W.public_key===j.getPublicKey().toString())}catch(N){if(N.message===P.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND)return!1;throw new Error(N)}})}signOut(){return h(this,void 0,void 0,function*(){const L=yield this.isSignedIn(),N=yield this.sessionRepository.getActiveAccount(this.network);if(!L)return void(yield this.sessionRepository.removeKey(this.network,N));const j=yield this.sessionRepository.getKey(this.network,N);if(null===j)throw new Error(S.WalletErrors.NO_ACCOUNT_LOCAL_KEY);const B=j.getPublicKey().toString();try{yield this.silentSignAndSendTransaction({signerId:N,receiverId:N,actions:[{type:"DeleteKey",params:{publicKey:B}}]}),yield this.sessionRepository.removeKey(this.network,N)}catch{yield this.retryTransaction({requests:[{actions:[{type:"DeleteKey",params:{publicKey:B}}],signerId:N,receiverId:N}]}),yield this.sessionRepository.removeKey(this.network,N)}})}signIn({contractId:L,allowance:N,methodNames:j=[]}){var B,V;return h(this,void 0,void 0,function*(){try{const G=M.KeyPair.fromRandom("ed25519"),W={receiverId:L,methodNames:j,allowance:N},Q=[{actions:[{type:"AddKey",params:{publicKey:G.getPublicKey().toString(),accessKey:{permission:W}}}]}],{id:q,network:J,requests:Z}=yield this.defaultProvider.createRequest(this.network,Q,this.dAppMetadata),ee=()=>h(this,void 0,void 0,function*(){return yield this.defaultProvider.rejectSignerRequest(q)});null===(V=(B=this.defaultStrategy).onRequested)||void 0===V||V.call(B,q,{network:J,request:Z},ee);const{status:I}=yield this.defaultProvider.awaitActionSignatureResolution(q);this.handleRequestStatus(I);const{signerAccountId:o}=yield this.defaultProvider.getRequest(q);if(!o)throw new Error(S.WalletErrors.REQUEST_NOT_SIGNED);return yield this.sessionRepository.setKey(this.network,o,G),yield this.sessionRepository.setActiveAccount(this.network,o),o}catch(G){throw new Error(G)}})}account(L){return h(this,void 0,void 0,function*(){const N=L??(yield this.sessionRepository.getActiveAccount(this.network));if(null===N)throw new Error(S.WalletErrors.NO_ACTIVE_ACCOUNT);return new M.Account(this.connection,N)})}silentSignAndSendTransaction({signerId:L,receiverId:N,actions:j}){return h(this,void 0,void 0,function*(){const B=yield this.account(L),V=yield this.sessionRepository.getKey(this.network,B.accountId);if(null===V)throw new Error(S.WalletErrors.NO_ACTIVE_ACCOUNT);if(!(yield this.isSignedIn(B.accountId)))throw new Error(S.WalletErrors.NO_ACTIVE_ACCOUNT);const W=V.getPublicKey().toString(),Q=yield B.getAccessKeys(),q={receiverId:N,actions:j};if(!Q.some(Z=>(0,y.isValidAccessKey)(B.accountId,Z,W,q)))throw new Error(S.WalletErrors.INVALID_ACCESS_KEY);return yield B.signAndSendTransaction({actions:j.map(Z=>(0,b.createAction)(Z)),receiverId:N??B.accountId})})}signAndSendTransaction({signerId:L,receiverId:N,actions:j}){var B,V;return h(this,void 0,void 0,function*(){try{if(!(yield this.isSignedIn(L)))throw yield this.sessionRepository.removeKey(this.network,L),new Error(S.WalletErrors.NO_ACTIVE_ACCOUNT);const W=yield this.silentSignAndSendTransaction({signerId:L,receiverId:N,actions:j});return null===(V=(B=this.defaultStrategy).onSuccess)||void 0===V||V.call(B),W}catch(G){if(G.message===S.WalletErrors.NO_ACTIVE_ACCOUNT)throw new Error(G);return yield this.retryTransaction({requests:[{actions:j,receiverId:N,signerId:L}]})}})}signAndSendTransactions({transactions:L}){var N,j,B,V;return h(this,void 0,void 0,function*(){try{if(!(yield this.isSignedIn(L[0].signerId)))throw yield this.sessionRepository.removeKey(this.network,L[0].signerId),new Error(S.WalletErrors.NO_ACTIVE_ACCOUNT);const{id:W,network:Q,requests:q}=yield this.defaultProvider.createRequest(this.network,L,this.dAppMetadata);null===(j=(N=this.defaultStrategy).onRequested)||void 0===j||j.call(N,W,{network:Q,request:q});const{status:J}=yield this.defaultProvider.awaitActionSignatureResolution(W);this.handleRequestStatus(J);const{signerAccountId:Z,txHash:ee}=yield this.defaultProvider.getRequest(W);if(!Z||!ee)throw new Error(S.WalletErrors.REQUEST_NOT_SIGNED);const I=[];for(const o of ee){const a=yield this.rpc.txStatus(o,Z);I.push(a)}return I}catch(G){throw null===(V=(B=this.defaultStrategy).onError)||void 0===V||V.call(B),new Error(G)}})}signMessage({message:L,receiver:N,nonce:j,callbackUrl:B}){var V,G,W,Q,q,J;return h(this,void 0,void 0,function*(){const{id:Z}=yield this.defaultProvider.createSignMessage(this.network,L,N,j,B,this.dAppMetadata);null===(G=(V=this.defaultStrategy).onRequested)||void 0===G||G.call(V,Z,{network:this.network,message:L,receiver:N,nonce:j,callbackUrl:B});const{response:ee,status:I}=yield this.defaultProvider.awaitMessageSignatureResolution(Z);if(this.handleRequestStatus(I),!ee&&I!==m.SignerRequestStatus.APPROVED)throw new Error(S.WalletErrors.NO_SIGNATURE);try{const{publicKey:o,signature:a,accountId:d}=ee;if(!(0,A.verifySignature)({publicKey:o,signature:a,message:L,nonce:Buffer.from(j),recipient:N}))throw new Error(S.WalletErrors.INVALID_SIGNATURE);if(!(yield(yield this.account(d)).getAccessKeys()).some(C=>!(C.public_key!==o||"FullAccess"!==C.access_key.permission)))throw Error(S.WalletErrors.INVALID_ACCESS_KEY);return null===(Q=(W=this.defaultStrategy).onSuccess)||void 0===Q||Q.call(W),{signature:a,publicKey:o,message:L,accountId:d,receiver:N,nonce:j,callbackUrl:B}}catch(o){throw null===(J=(q=this.defaultStrategy).onError)||void 0===J||J.call(q),new Error(o)}})}}},93730:(ne,s)=>{"use strict";var p,h;Object.defineProperty(s,"__esModule",{value:!0}),s.WalletErrors=void 0,(h=p||(s.WalletErrors=p={})).NO_ACTIVE_ACCOUNT="NO_ACTIVE_ACCOUNT",h.NO_ACCOUNT_LOCAL_KEY="NO_ACCOUNT_LOCAL_KEY",h.INVALID_ACCESS_KEY="INVALID_ACCESS_KEY",h.NO_SIGNER_ACCOUNT_ID="NO_SIGNER_ACCOUNT_ID",h.REQUEST_NOT_SIGNED="REQUEST_NOT_SIGNED",h.NO_SIGNATURE="NO_SIGNATURE",h.INVALID_SIGNATURE="INVALID_SIGNATURE",h.OPERATION_FAILED="OPERATION_FAILED"},12139:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(b,S,_,A){return new(_||(_=Promise))(function(x,T){function L(B){try{j(A.next(B))}catch(V){T(V)}}function N(B){try{j(A.throw(B))}catch(V){T(V)}}function j(B){B.done?x(B.value):function P(x){return x instanceof _?x:new _(function(T){T(x)})}(B.value).then(L,N)}j((A=A.apply(b,S||[])).next())})},M=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(s,"__esModule",{value:!0}),s.NearMobileSignerProxy=void 0;const w=M(p(76913)),E=M(p(33492)),l=p(39825),m=p(9273);s.NearMobileSignerProxy=class y{createRequest(S,_,A){return h(this,void 0,void 0,function*(){return yield m.SignerRequestApi.createSignerRequest({network:S,transactions:_,dAppMetadata:A})})}awaitActionSignatureResolution(S){return h(this,void 0,void 0,function*(){return yield(0,E.default)(()=>m.SignerRequestApi.getSignerRequestStatus(S),({status:_})=>_===l.SignerRequestStatus.PENDING,{maxIterations:w.default.polling.maxIterations})})}getRequest(S){return h(this,void 0,void 0,function*(){return yield m.SignerRequestApi.getSignerRequest(S)})}createSignMessage(S,_,A,P,x,T){return h(this,void 0,void 0,function*(){return yield m.SignerRequestApi.createSignMessageRequest({network:S,message:_,receiver:A,nonce:P,callbackUrl:x,receiverMetadata:T})})}awaitMessageSignatureResolution(S){return h(this,void 0,void 0,function*(){return yield(0,E.default)(()=>m.SignerRequestApi.getSignMessageRequest(S),({response:_,status:A})=>!_&&A===l.SignerRequestStatus.PENDING,{maxIterations:w.default.polling.maxIterations})})}rejectSignerRequest(S){return h(this,void 0,void 0,function*(){yield m.SignerRequestApi.rejectSignerRequest(S)})}}},97186:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(s,"__esModule",{value:!0}),s.WidgetStrategy=void 0;const M=h(p(76913));class E{constructor(){this.widgetUrl=M.default.widgetUrl,null==E.connector&&(E.connector=(l=>{const m=document.createElement("iframe");return m.src=l,m.style.border="none",m.style.zIndex="10000",m.style.position="fixed",m.style.display="none",m.style.top="0",m.style.left="0",m.style.width="100%",m.style.height="100%",document.body.appendChild(m),m})(this.widgetUrl),E.connector.addEventListener("load",()=>{E.isLoaded=!0}))}close(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0),null!=E.connector&&(E.connector.style.display="none")}onRequested(m,y,b){if(null==E.connector)return;E.connector.style.display="block";const S=()=>{var _,A;E.connector.removeEventListener("load",S);const P="message"in y?"message":"request",x=`${M.default.nearMobileWalletUrl}/${P}/${m}`;null===(A=null===(_=E.connector)||void 0===_?void 0:_.contentWindow)||void 0===A||A.postMessage({requestUrl:x},new URL(this.widgetUrl).origin)};E.isLoaded?S():E.connector.addEventListener("load",S),this.messageHandler=_=>{_.origin===new URL(this.widgetUrl).origin&&"close"===_.data&&(b?.(),this.onError())},window.addEventListener("message",this.messageHandler)}onApproved(){this.close()}onSuccess(){this.close()}onError(){this.close()}}s.WidgetStrategy=E,E.isLoaded=!1},99868:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.payloadSchema=s.Payload=void 0;class p{constructor(M){this.tag=2147484061,this.message=M.message,this.nonce=M.nonce,this.recipient=M.recipient,M.callbackUrl&&(this.callbackUrl=M.callbackUrl)}}s.Payload=p,s.payloadSchema=new Map([[p,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]])},94196:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.verifySignature=void 0;const h=p(8597),M=p(21531),w=p(1520),E=p(99868);s.verifySignature=({publicKey:m,signature:y,message:b,nonce:S,recipient:_,callbackUrl:A})=>{const P=new E.Payload({message:b,nonce:S,recipient:_,callbackUrl:A}),x=(0,M.serialize)(E.payloadSchema,P),T=Uint8Array.from(w.sha256.array(x)),L=Buffer.from(y,"base64");return h.utils.PublicKey.from(m).verify(T,L)}},77118:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(ee,I,o,a){return new(o||(o=Promise))(function(g,D){function F(f){try{C(a.next(f))}catch(k){D(k)}}function z(f){try{C(a.throw(f))}catch(k){D(k)}}function C(f){f.done?g(f.value):function d(g){return g instanceof o?g:new o(function(D){D(g)})}(f.value).then(F,z)}C((a=a.apply(ee,I||[])).next())})},M=this&&this.__importDefault||function(ee){return ee&&ee.__esModule?ee:{default:ee}};Object.defineProperty(s,"__esModule",{value:!0}),s.Account=void 0;const w=p(55911),E=p(1739),l=p(30448),m=p(17527),y=p(41166),b=M(p(98538)),S=p(21531),{addKey:_,createAccount:A,deleteAccount:P,deleteKey:x,deployContract:T,fullAccessKey:L,functionCall:N,functionCallAccessKey:j,stake:B,transfer:V}=l.actionCreators;function q(ee){return JSON.parse(Buffer.from(ee).toString())}function J(ee){return Buffer.from(JSON.stringify(ee))}class Z{constructor(I,o){this.accessKeyByPublicKeyCache={},this.connection=I,this.accountId=o}state(){return h(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(I,o){return h(this,void 0,void 0,function*(){const a=yield this.findAccessKey(I,o);if(!a)throw new m.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:d}=a,D=(yield this.connection.provider.block({finality:"final"})).header.hash,F=d.nonce.add(new b.default(1));return yield(0,l.signTransaction)(I,F,o,(0,S.baseDecode)(D),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:I,actions:o,returnError:a}){return h(this,void 0,void 0,function*(){let d,g;const D=yield(0,E.exponentialBackoff)(500,12,1.5,()=>h(this,void 0,void 0,function*(){[d,g]=yield this.signTransaction(I,o);const F=g.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(g)}catch(z){if("InvalidNonce"===z.type)return(0,y.logWarning)(`Retrying transaction ${I}:${(0,S.baseEncode)(d)} with new nonce.`),delete this.accessKeyByPublicKeyCache[F.toString()],null;if("Expired"===z.type)return(0,y.logWarning)(`Retrying transaction ${I}:${(0,S.baseEncode)(d)} due to expired block hash`),null;throw z.context=new m.ErrorContext((0,S.baseEncode)(d)),z}}));if(!D)throw new m.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,y.printTxOutcomeLogsAndFailures)({contractId:g.transaction.receiverId,outcome:D}),!a&&"object"==typeof D.status&&"object"==typeof D.status.Failure&&null!==D.status.Failure)throw D.status.Failure.error_message&&D.status.Failure.error_type?new m.TypedError(`Transaction ${D.transaction_outcome.id} failed. ${D.status.Failure.error_message}`,D.status.Failure.error_type):(0,y.parseResultError)(D);return D})}findAccessKey(I,o){return h(this,void 0,void 0,function*(){const a=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!a)throw new m.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const d=this.accessKeyByPublicKeyCache[a.toString()];if(void 0!==d)return{publicKey:a,accessKey:d};try{const g=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:a.toString(),finality:"optimistic"}),D=Object.assign(Object.assign({},g),{nonce:new b.default(g.nonce)});return this.accessKeyByPublicKeyCache[a.toString()]?{publicKey:a,accessKey:this.accessKeyByPublicKeyCache[a.toString()]}:(this.accessKeyByPublicKeyCache[a.toString()]=D,{publicKey:a,accessKey:D})}catch(g){if("AccessKeyDoesNotExist"==g.type)return null;throw g}})}createAndDeployContract(I,o,a,d){return h(this,void 0,void 0,function*(){const g=L();return yield this.signAndSendTransaction({receiverId:I,actions:[A(),V(d),_(w.PublicKey.from(o),g),T(a)]}),new Z(this.connection,I)})}sendMoney(I,o){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:I,actions:[V(o)]})})}createAccount(I,o,a){return h(this,void 0,void 0,function*(){const d=L();return this.signAndSendTransaction({receiverId:I,actions:[A(),V(a),_(w.PublicKey.from(o),d)]})})}deleteAccount(I){return h(this,void 0,void 0,function*(){return process.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[P(I)]})})}deployContract(I){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[T(I)]})})}encodeJSContractArgs(I,o,a){return Buffer.concat([Buffer.from(I),Buffer.from([0]),Buffer.from(o),Buffer.from([0]),Buffer.from(a)])}functionCall({contractId:I,methodName:o,args:a={},gas:d=y.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:g,walletMeta:D,walletCallbackUrl:F,stringify:z,jsContract:C}){return h(this,void 0,void 0,function*(){let f;if(this.validateArgs(a),C)f=["call_js_contract",this.encodeJSContractArgs(I,o,JSON.stringify(a)),d,g,null,!0];else{const k=void 0===z?l.stringifyJsonOrBytes:z;f=[o,a,d,g,k,!1]}return this.signAndSendTransaction({receiverId:C?this.connection.jsvmAccountId:I,actions:[N.apply(void 0,f)],walletMeta:D,walletCallbackUrl:F})})}addKey(I,o,a,d){return h(this,void 0,void 0,function*(){let g;return a||(a=[]),Array.isArray(a)||(a=[a]),g=o?j(o,a,d):L(),this.signAndSendTransaction({receiverId:this.accountId,actions:[_(w.PublicKey.from(I),g)]})})}deleteKey(I){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[x(w.PublicKey.from(I))]})})}stake(I,o){return h(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[B(o,w.PublicKey.from(I))]})})}signedDelegate({actions:I,blockHeightTtl:o,receiverId:a}){return h(this,void 0,void 0,function*(){const{provider:d,signer:g}=this.connection,{header:D}=yield d.block({finality:"final"}),{accessKey:F,publicKey:z}=yield this.findAccessKey(null,null),C=(0,l.buildDelegateAction)({actions:I,maxBlockHeight:new b.default(D.height).add(new b.default(o)),nonce:new b.default(F.nonce).add(new b.default(1)),publicKey:z,receiverId:a,senderId:this.accountId}),{signedDelegateAction:f}=yield(0,l.signDelegateAction)({delegateAction:C,signer:{sign:k=>h(this,void 0,void 0,function*(){const{signature:se}=yield g.signMessage(k,C.senderId,this.connection.networkId);return se})}});return f})}validateArgs(I){if((void 0===I.byteLength||I.byteLength!==I.length)&&(Array.isArray(I)||"object"!=typeof I))throw new m.PositionalArgsError}viewFunction({contractId:I,methodName:o,args:a={},parse:d=q,stringify:g=J,jsContract:D=!1,blockQuery:F={finality:"optimistic"}}){return h(this,void 0,void 0,function*(){let z;this.validateArgs(a),z=D?this.encodeJSContractArgs(I,o,Object.keys(a).length>0?JSON.stringify(a):""):g(a);const C=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},F),{account_id:D?this.connection.jsvmAccountId:I,method_name:D?"view_js_contract":o,args_base64:z.toString("base64")}));return C.logs&&(0,y.printTxOutcomeLogs)({contractId:I,logs:C.logs}),C.result&&C.result.length>0&&d(Buffer.from(C.result))})}viewState(I,o={finality:"optimistic"}){return h(this,void 0,void 0,function*(){const{values:a}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},o),{account_id:this.accountId,prefix_base64:Buffer.from(I).toString("base64")}));return a.map(({key:d,value:g})=>({key:Buffer.from(d,"base64"),value:Buffer.from(g,"base64")}))})}getAccessKeys(){var I;return h(this,void 0,void 0,function*(){const o=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(I=o?.keys)||void 0===I?void 0:I.map(a=>Object.assign(Object.assign({},a),{access_key:Object.assign(Object.assign({},a.access_key),{nonce:new b.default(a.access_key.nonce)})}))})}getAccountDetails(){return h(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(a=>"FullAccess"!==a.access_key.permission).map(a=>{const d=a.access_key.permission;return{contractId:d.FunctionCall.receiver_id,amount:d.FunctionCall.allowance,publicKey:a.public_key}})}})}getAccountBalance(){return h(this,void 0,void 0,function*(){const I=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),o=yield this.state(),a=new b.default(I.runtime_config.storage_amount_per_byte),d=new b.default(o.storage_usage).mul(a),g=new b.default(o.locked),D=new b.default(o.amount).add(g),F=D.sub(b.default.max(g,d));return{total:D.toString(),stateStaked:d.toString(),staked:g.toString(),available:F.toString()}})}getActiveDelegatedStakeBalance(){return h(this,void 0,void 0,function*(){const I=yield this.connection.provider.block({finality:"final"}),o=I.header.hash,a=I.header.epoch_id,{current_validators:d,next_validators:g,current_proposals:D}=yield this.connection.provider.validators(a),F=new Set;[...d,...g,...D].forEach(te=>F.add(te.account_id));const z=[...F],C=z.map(te=>this.viewFunction({contractId:te,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:o}})),f=yield Promise.allSettled(C);if(f.some(te=>"rejected"===te.status&&"TimeoutError"===te.reason.type))throw new Error("Failed to get delegated stake balance");const se=f.reduce((te,oe,de)=>{const Ie=z[de];if("fulfilled"===oe.status){const ye=new b.default(oe.value);if(!ye.isZero())return Object.assign(Object.assign({},te),{stakedValidators:[...te.stakedValidators,{validatorId:Ie,amount:ye.toString()}],total:te.total.add(ye)})}return"rejected"===oe.status?Object.assign(Object.assign({},te),{failedValidators:[...te.failedValidators,{validatorId:Ie,error:oe.reason}]}):te},{stakedValidators:[],failedValidators:[],total:new b.default(0)});return Object.assign(Object.assign({},se),{total:se.total.toString()})})}}s.Account=Z},71339:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(V,G,W,Q){return new(W||(W=Promise))(function(J,Z){function ee(a){try{o(Q.next(a))}catch(d){Z(d)}}function I(a){try{o(Q.throw(a))}catch(d){Z(d)}}function o(a){a.done?J(a.value):function q(J){return J instanceof W?J:new W(function(Z){Z(J)})}(a.value).then(ee,I)}o((Q=Q.apply(V,G||[])).next())})},M=this&&this.__importDefault||function(V){return V&&V.__esModule?V:{default:V}};Object.defineProperty(s,"__esModule",{value:!0}),s.Account2FA=void 0;const w=p(55911),E=p(17527),l=p(1739),m=p(30448),y=M(p(98538)),b=p(30776),S=p(94914),_=p(87932),{addKey:A,deleteKey:P,deployContract:x,fullAccessKey:T,functionCall:L,functionCallAccessKey:N}=m.actionCreators;class j extends b.AccountMultisig{constructor(G,W,Q){super(G,W,Q),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=Q.helperUrl||this.helperUrl,this.storage=Q.storage,this.sendCode=Q.sendCode||this.sendCodeDefault,this.getCode=Q.getCode||this.getCodeDefault,this.verifyCode=Q.verifyCode||this.verifyCodeDefault,this.onConfirmResult=Q.onConfirmResult}signAndSendTransaction({receiverId:G,actions:W}){const Q=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){yield Q.signAndSendTransaction.call(this,{receiverId:G,actions:W}),yield this.sendCode();const q=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(q)),q})}deployMultisig(G){const W=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return h(this,void 0,void 0,function*(){const{accountId:Q}=this,q=(yield this.getRecoveryMethods()).data.filter(({kind:d,publicKey:g})=>("phrase"===d||"ledger"===d)&&null!==g).map(d=>d.publicKey),J=(yield this.getAccessKeys()).filter(({public_key:d,access_key:{permission:g}})=>"FullAccess"===g&&!q.includes(d)).map(d=>d.public_key).map(B),Z=B((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Q})).publicKey),ee=Buffer.from(JSON.stringify({num_confirmations:2})),I=[...J.map(d=>P(d)),...J.map(d=>A(d,N(Q,S.MULTISIG_CHANGE_METHODS,null))),A(Z,N(Q,S.MULTISIG_CONFIRM_METHODS,null)),x(G)],o=I.concat(L("new",ee,S.MULTISIG_GAS,S.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",Q);const{stateStatus:a}=yield this.checkMultisigCodeAndStateStatus(G);switch(a){case _.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield W.signAndSendTransactionWithAccount.call(this,Q,o);case _.MultisigStateStatus.VALID_STATE:return yield W.signAndSendTransactionWithAccount.call(this,Q,I);case _.MultisigStateStatus.INVALID_STATE:throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:G,cleanupContractBytes:W}){return h(this,void 0,void 0,function*(){let Q=[];W&&(yield this.deleteAllRequests().catch(ee=>ee),Q=yield this.get2faDisableCleanupActions(W));const q=yield this.get2faDisableKeyConversionActions(),J=[...Q,...q,x(G)],Z=yield this.findAccessKey(this.accountId,J);if(Z&&Z.accessKey&&"FullAccess"!==Z.accessKey.permission)throw new E.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,J)})}get2faDisableCleanupActions(G){return h(this,void 0,void 0,function*(){const W=yield this.viewState("").catch(q=>{const J=q.cause&&q.cause.name;if("NO_CONTRACT_CODE"==J)return[];throw"TOO_LARGE_CONTRACT_STATE"==J?new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):q}),Q=W.map(({key:q})=>q.toString("base64"));return W.length?[x(G),L("clean",{keys:Q},S.MULTISIG_GAS,new y.default("0"))]:[]})}get2faDisableKeyConversionActions(){return h(this,void 0,void 0,function*(){const{accountId:G}=this,Q=(yield this.getAccessKeys()).filter(({access_key:J})=>"FullAccess"!==J.permission).filter(({access_key:J})=>{const Z=J.permission.FunctionCall;return Z.receiver_id===G&&4===Z.method_names.length&&Z.method_names.includes("add_request_and_confirm")}),q=w.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:G})).publicKey);return[P(q),...Q.map(({public_key:J})=>P(w.PublicKey.from(J))),...Q.map(({public_key:J})=>A(w.PublicKey.from(J),T()))]})}disable(G,W){return h(this,void 0,void 0,function*(){const{stateStatus:Q}=yield this.checkMultisigCodeAndStateStatus();if(Q!==_.MultisigStateStatus.VALID_STATE&&Q!==_.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let q;yield this.deleteAllRequests().catch(ee=>q=ee);const Z=[...yield this.get2faDisableCleanupActions(W).catch(ee=>{throw"ContractHasExistingState"===ee.type&&q||ee}),...yield this.get2faDisableKeyConversionActions(),x(G)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:Z})})}sendCodeDefault(){return h(this,void 0,void 0,function*(){const{accountId:G}=this,{requestId:W}=this.getRequest(),Q=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:G,method:Q,requestId:W}),W})}getCodeDefault(){return h(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return h(this,void 0,void 0,function*(){const G=yield this.get2faMethod(),W=yield this.getCode(G);try{return yield this.verifyCode(W)}catch(Q){if(console.warn("Error validating security code:",Q),Q.toString().includes("invalid 2fa code provided")||Q.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw Q}})}verifyCodeDefault(G){return h(this,void 0,void 0,function*(){const{accountId:W}=this,Q=this.getRequest();if(!Q)throw new Error("no request pending");const{requestId:q}=Q;return yield this.postSignedJson("/2fa/verify",{accountId:W,securityCode:G,requestId:q})})}getRecoveryMethods(){return h(this,void 0,void 0,function*(){const{accountId:G}=this;return{accountId:G,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:G})}})}get2faMethod(){return h(this,void 0,void 0,function*(){let{data:G}=yield this.getRecoveryMethods();if(G&&G.length&&(G=G.find(q=>0===q.kind.indexOf("2fa-"))),!G)return null;const{kind:W,detail:Q}=G;return{kind:W,detail:Q}})}signatureFor(){return h(this,void 0,void 0,function*(){const{accountId:G}=this,Q=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),q=yield this.connection.signer.signMessage(Buffer.from(Q),G,this.connection.networkId);return{blockNumber:Q,blockNumberSignature:Buffer.from(q.signature).toString("base64")}})}postSignedJson(G,W){return h(this,void 0,void 0,function*(){return yield(0,l.fetchJson)(this.helperUrl+G,JSON.stringify(Object.assign(Object.assign({},W),yield this.signatureFor())))})}}s.Account2FA=j;const B=V=>w.PublicKey.from(V)},57107:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.UrlAccountCreator=s.LocalAccountCreator=s.AccountCreator=void 0;const M=p(1739);class w{}s.AccountCreator=w;s.LocalAccountCreator=class E extends w{constructor(y,b){super(),this.masterAccount=y,this.initialBalance=b}createAccount(y,b){return h(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(y,b,this.initialBalance)})}};s.UrlAccountCreator=class l extends w{constructor(y,b){super(),this.connection=y,this.helperUrl=b}createAccount(y,b){return h(this,void 0,void 0,function*(){yield(0,M.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:y,newAccountPublicKey:b.toString()}))})}}},30776:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(x,T,L,N){return new(L||(L=Promise))(function(B,V){function G(q){try{Q(N.next(q))}catch(J){V(J)}}function W(q){try{Q(N.throw(q))}catch(J){V(J)}}function Q(q){q.done?B(q.value):function j(B){return B instanceof L?B:new L(function(V){V(B)})}(q.value).then(G,W)}Q((N=N.apply(x,T||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.AccountMultisig=void 0;const M=p(30448),w=p(77118),E=p(94914),l=p(87932),{deployContract:m,functionCall:y}=M.actionCreators;var b,x;(x=b||(b={}))[x.INVALID_CODE=0]="INVALID_CODE",x[x.VALID_CODE=1]="VALID_CODE",x[x.UNKNOWN_CODE=2]="UNKNOWN_CODE";const S={[E.MULTISIG_STORAGE_KEY]:null};class _ extends w.Account{constructor(T,L,N){super(T,L),this.storage=N.storage,this.onAddRequestResult=N.onAddRequestResult}signAndSendTransactionWithAccount(T,L){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){return N.signAndSendTransaction.call(this,{receiverId:T,actions:L})})}signAndSendTransaction({receiverId:T,actions:L}){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const{accountId:j}=this,B=Buffer.from(JSON.stringify({request:{receiver_id:T,actions:P(L,j,T)}}));let V;try{V=yield N.signAndSendTransaction.call(this,{receiverId:j,actions:[y("add_request_and_confirm",B,E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]})}catch(W){if(W.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:T,actions:L});throw W}if(!V.status)throw new Error("Request failed");const G=Object.assign({},V.status);if(!G.SuccessValue||"string"!=typeof G.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:j,actions:L,requestId:parseInt(Buffer.from(G.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(V)),this.deleteUnconfirmedRequests(),V})}checkMultisigCodeAndStateStatus(T){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const j=T?b.UNKNOWN_CODE:b.VALID_CODE;try{return T?yield L.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[m(T),y("delete_request",{request_id:4294967295},E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:b.VALID_CODE,stateStatus:l.MultisigStateStatus.VALID_STATE}}catch(B){if(new RegExp(l.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(B&&B.kind&&B.kind.ExecutionError))return{codeStatus:j,stateStatus:l.MultisigStateStatus.INVALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(B&&B.kind&&B.kind.ExecutionError))return{codeStatus:j,stateStatus:l.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(l.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(B&&B.kind&&B.kind.ExecutionError))return{codeStatus:j,stateStatus:l.MultisigStateStatus.VALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(B&&B.message))return{codeStatus:b.INVALID_CODE,stateStatus:l.MultisigStateStatus.UNKNOWN_STATE};throw B}})}deleteRequest(T){return super.signAndSendTransaction({receiverId:this.accountId,actions:[y("delete_request",{request_id:T},E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return h(this,void 0,void 0,function*(){const T=yield this.getRequestIds();T.length&&(yield Promise.all(T.map(L=>this.deleteRequest(L))))})}deleteUnconfirmedRequests(){const T=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const L=yield this.getRequestIds(),{requestId:N}=this.getRequest();for(const j of L)if(j!=N)try{yield T.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[y("delete_request",{request_id:j},E.MULTISIG_GAS,E.MULTISIG_DEPOSIT)]})}catch{console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return h(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(E.MULTISIG_STORAGE_KEY)||"{}"):S[E.MULTISIG_STORAGE_KEY]}setRequest(T){if(this.storage)return this.storage.setItem(E.MULTISIG_STORAGE_KEY,JSON.stringify(T));S[E.MULTISIG_STORAGE_KEY]=T}}s.AccountMultisig=_;const A=x=>x.toString().replace("ed25519:",""),P=(x,T,L)=>x.map(N=>{const j=N.enum,{gas:B,publicKey:V,methodName:G,args:W,deposit:Q,accessKey:q,code:J}=N[j],Z={type:j[0].toUpperCase()+j.substr(1),gas:B&&B.toString()||void 0,public_key:V&&A(V)||void 0,method_name:G,args:W&&Buffer.from(W).toString("base64")||void 0,code:J&&Buffer.from(J).toString("base64")||void 0,amount:Q&&Q.toString()||void 0,deposit:Q&&Q.toString()||"0",permission:void 0};if(q&&(L===T&&"fullAccess"!==q.permission.enum&&(Z.permission={receiver_id:T,allowance:E.MULTISIG_ALLOWANCE.toString(),method_names:E.MULTISIG_CHANGE_METHODS}),"functionCall"===q.permission.enum)){const{receiverId:ee,methodNames:I,allowance:o}=q.permission.functionCall;Z.permission={receiver_id:ee,allowance:o&&o.toString()||void 0,method_names:I}}return Z})},35999:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Connection=void 0;const h=p(25035),M=p(1739);class l{constructor(y,b,S,_){this.networkId=y,this.provider=b,this.signer=S,this.jsvmAccountId=_}static fromConfig(y){const b=function w(m){switch(m.type){case void 0:return m;case"JsonRpcProvider":return new M.JsonRpcProvider(Object.assign({},m.args));default:throw new Error(`Unknown provider type ${m.type}`)}}(y.provider),S=function E(m){switch(m.type){case void 0:return m;case"InMemorySigner":return new h.InMemorySigner(m.keyStore);default:throw new Error(`Unknown signer type ${m.type}`)}}(y.signer);return new l(y.networkId,b,S,y.jsvmAccountId)}}s.Connection=l},94914:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(s,"__esModule",{value:!0}),s.MULTISIG_CONFIRM_METHODS=s.MULTISIG_CHANGE_METHODS=s.MULTISIG_DEPOSIT=s.MULTISIG_GAS=s.MULTISIG_ALLOWANCE=s.MULTISIG_STORAGE_KEY=void 0;const M=p(41166),w=h(p(98538));s.MULTISIG_STORAGE_KEY="__multisigRequest",s.MULTISIG_ALLOWANCE=new w.default((0,M.parseNearAmount)("1")),s.MULTISIG_GAS=new w.default("100000000000000"),s.MULTISIG_DEPOSIT=new w.default("0"),s.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],s.MULTISIG_CONFIRM_METHODS=["confirm"]},43017:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(B,V,G,W){return new(G||(G=Promise))(function(q,J){function Z(o){try{I(W.next(o))}catch(a){J(a)}}function ee(o){try{I(W.throw(o))}catch(a){J(a)}}function I(o){o.done?q(o.value):function Q(q){return q instanceof G?q:new G(function(J){J(q)})}(o.value).then(Z,ee)}I((W=W.apply(B,V||[])).next())})},M=this&&this.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(s,"__esModule",{value:!0}),s.Contract=void 0;const w=p(41166),E=p(17527),l=M(p(74411)),m=M(p(26474)),y=M(p(98538)),b=M(p(89176)),S=p(84778),_=p(49467);function A(B,V){return{[B]:(...G)=>V(...G)}[B]}function P(B,V,G,W){var Q;if(!L(B))return;if(V.params&&V.params.serialization_type!==S.AbiSerializationType.Json)throw new _.UnsupportedSerializationError(V.name,V.params.serialization_type);if(V.result&&V.result.serialization_type!==S.AbiSerializationType.Json)throw new _.UnsupportedSerializationError(V.name,V.result.serialization_type);const q=(null===(Q=V.params)||void 0===Q?void 0:Q.args)||[];for(const J of q){const Z=B[J.name],ee=J.type_schema;ee.definitions=W.body.root_schema.definitions;const I=G.compile(ee);if(!I(Z))throw new _.ArgumentSchemaError(J.name,I.errors)}for(const J of Object.keys(B))if(!q.find(ee=>ee.name===J))throw new _.UnknownArgumentError(J,q.map(ee=>ee.name))}const T=B=>B&&void 0!==B.byteLength&&B.byteLength===B.length,L=B=>"[object Object]"===Object.prototype.toString.call(B);s.Contract=class N{constructor(V,G,W){this.account=V,this.contractId=G;const{viewMethods:Q=[],changeMethods:q=[],abi:J}=W;let Z=Q.map(o=>({name:o,abi:null})),ee=q.map(o=>({name:o,abi:null}));if(J){if(Z.length>0||ee.length>0)throw new _.ConflictingOptions;Z=J.body.functions.filter(o=>o.kind===S.AbiFunctionKind.View).map(o=>({name:o.name,abi:o})),ee=J.body.functions.filter(o=>o.kind===S.AbiFunctionKind.Call).map(o=>({name:o.name,abi:o}))}const I=function x(){const B=new l.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,m.default)(B),B}();Z.forEach(({name:o,abi:a})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(d={},g={},...D)=>h(this,void 0,void 0,function*(){if(D.length||!L(d)&&!T(d)||!L(g))throw new E.PositionalArgsError;return a&&P(d,a,I,J),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:d},g))}))})}),ee.forEach(({name:o,abi:a})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(...d)=>h(this,void 0,void 0,function*(){if(d.length&&(d.length>3||!L(d[0])&&!T(d[0])))throw new E.PositionalArgsError;return(d.length>1||!(d[0]&&d[0].args))&&((0,b.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),d[0]={args:d[0],gas:d[1],amount:d[2]}),a&&P(d[0].args,a,I,J),this._changeMethod(Object.assign({methodName:o},d[0]))}))})})}_changeMethod({args:V,methodName:G,gas:W,amount:Q,meta:q,callbackUrl:J}){return h(this,void 0,void 0,function*(){!function j(B){const V="number, decimal string or BN";for(const G of Object.keys(B)){const W=B[G];if(W&&!y.default.isBN(W)&&isNaN(W))throw new E.ArgumentTypeError(G,V,W)}}({gas:W,amount:Q});const Z=yield this.account.functionCall({contractId:this.contractId,methodName:G,args:V,gas:W,attachedDeposit:Q,walletMeta:q,walletCallbackUrl:J});return(0,w.getTransactionLastResult)(Z)})}}},49467:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ConflictingOptions=s.ArgumentSchemaError=s.UnknownArgumentError=s.UnsupportedSerializationError=void 0;class p extends Error{constructor(l,m){super(`Contract method '${l}' is using an unsupported serialization type ${m}`)}}s.UnsupportedSerializationError=p;class h extends Error{constructor(l,m){super(`Unrecognized argument '${l}', expected '${JSON.stringify(m)}'`)}}s.UnknownArgumentError=h;class M extends Error{constructor(l,m){super(`Argument '${l}' does not conform to the specified ABI schema: '${JSON.stringify(m)}'`)}}s.ArgumentSchemaError=M;class w extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}s.ConflictingOptions=w},11538:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MultisigStateStatus=s.MultisigDeleteRequestRejectionError=s.UnsupportedSerializationError=s.UnknownArgumentError=s.ConflictingOptions=s.ArgumentSchemaError=s.Contract=s.MULTISIG_CONFIRM_METHODS=s.MULTISIG_CHANGE_METHODS=s.MULTISIG_DEPOSIT=s.MULTISIG_GAS=s.MULTISIG_ALLOWANCE=s.MULTISIG_STORAGE_KEY=s.Connection=s.AccountMultisig=s.UrlAccountCreator=s.LocalAccountCreator=s.AccountCreator=s.Account2FA=s.Account=void 0;var h=p(77118);Object.defineProperty(s,"Account",{enumerable:!0,get:function(){return h.Account}});var M=p(71339);Object.defineProperty(s,"Account2FA",{enumerable:!0,get:function(){return M.Account2FA}});var w=p(57107);Object.defineProperty(s,"AccountCreator",{enumerable:!0,get:function(){return w.AccountCreator}}),Object.defineProperty(s,"LocalAccountCreator",{enumerable:!0,get:function(){return w.LocalAccountCreator}}),Object.defineProperty(s,"UrlAccountCreator",{enumerable:!0,get:function(){return w.UrlAccountCreator}});var E=p(30776);Object.defineProperty(s,"AccountMultisig",{enumerable:!0,get:function(){return E.AccountMultisig}});var l=p(35999);Object.defineProperty(s,"Connection",{enumerable:!0,get:function(){return l.Connection}});var m=p(94914);Object.defineProperty(s,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return m.MULTISIG_STORAGE_KEY}}),Object.defineProperty(s,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return m.MULTISIG_ALLOWANCE}}),Object.defineProperty(s,"MULTISIG_GAS",{enumerable:!0,get:function(){return m.MULTISIG_GAS}}),Object.defineProperty(s,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return m.MULTISIG_DEPOSIT}}),Object.defineProperty(s,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return m.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(s,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return m.MULTISIG_CONFIRM_METHODS}});var y=p(43017);Object.defineProperty(s,"Contract",{enumerable:!0,get:function(){return y.Contract}});var b=p(49467);Object.defineProperty(s,"ArgumentSchemaError",{enumerable:!0,get:function(){return b.ArgumentSchemaError}}),Object.defineProperty(s,"ConflictingOptions",{enumerable:!0,get:function(){return b.ConflictingOptions}}),Object.defineProperty(s,"UnknownArgumentError",{enumerable:!0,get:function(){return b.UnknownArgumentError}}),Object.defineProperty(s,"UnsupportedSerializationError",{enumerable:!0,get:function(){return b.UnsupportedSerializationError}});var S=p(87932);Object.defineProperty(s,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return S.MultisigDeleteRequestRejectionError}}),Object.defineProperty(s,"MultisigStateStatus",{enumerable:!0,get:function(){return S.MultisigStateStatus}})},87932:(ne,s)=>{"use strict";var M;Object.defineProperty(s,"__esModule",{value:!0}),s.MultisigStateStatus=s.MultisigDeleteRequestRejectionError=void 0,(M=s.MultisigDeleteRequestRejectionError||(s.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",M.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",M.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",M.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",M.METHOD_NOT_FOUND="Contract method is not found",function(M){M[M.INVALID_STATE=0]="INVALID_STATE",M[M.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",M[M.VALID_STATE=2]="VALID_STATE",M[M.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(s.MultisigStateStatus||(s.MultisigStateStatus={}))},36999:(ne,s)=>{"use strict";var h;Object.defineProperty(s,"__esModule",{value:!0}),s.KeyType=void 0,(h=s.KeyType||(s.KeyType={}))[h.ED25519=0]="ED25519"},55911:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.PublicKey=s.KeyPairEd25519=s.KeyPair=s.KeyType=void 0;var h=p(36999);Object.defineProperty(s,"KeyType",{enumerable:!0,get:function(){return h.KeyType}});var M=p(53087);Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return M.KeyPair}});var w=p(46735);Object.defineProperty(s,"KeyPairEd25519",{enumerable:!0,get:function(){return w.KeyPairEd25519}});var E=p(73833);Object.defineProperty(s,"PublicKey",{enumerable:!0,get:function(){return E.PublicKey}})},53087:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyPair=void 0;const h=p(25387),M=p(46735);class w extends h.KeyPairBase{static fromRandom(l){if("ED25519"===l.toUpperCase())return M.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${l}`)}static fromString(l){const m=l.split(":");if(1===m.length)return new M.KeyPairEd25519(m[0]);if(2===m.length){if("ED25519"===m[0].toUpperCase())return new M.KeyPairEd25519(m[1]);throw new Error(`Unknown curve: ${m[0]}`)}throw new Error("Invalid encoded key format, must be :")}}s.KeyPair=w},25387:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyPairBase=void 0;s.KeyPairBase=class p{}},46735:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(s,"__esModule",{value:!0}),s.KeyPairEd25519=void 0;const M=p(21531),w=h(p(40489)),E=p(36999),l=p(25387),m=p(73833);class y extends l.KeyPairBase{constructor(S){super();const _=w.default.sign.keyPair.fromSecretKey((0,M.baseDecode)(S));this.publicKey=new m.PublicKey({keyType:E.KeyType.ED25519,data:_.publicKey}),this.secretKey=S}static fromRandom(){const S=w.default.sign.keyPair();return new y((0,M.baseEncode)(S.secretKey))}sign(S){return{signature:w.default.sign.detached(S,(0,M.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(S,_){return this.publicKey.verify(S,_)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}s.KeyPairEd25519=y},73833:function(ne,s,p){"use strict";var h=this&&this.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(s,"__esModule",{value:!0}),s.PublicKey=void 0;const M=p(17527),w=p(21531),E=h(p(40489)),l=p(36999);class b extends M.Assignable{static from(_){return"string"==typeof _?b.fromString(_):_}static fromString(_){const A=_.split(":");let P,x=l.KeyType.ED25519;if(1===A.length)P=A[0];else{if(2!==A.length)throw new Error("Invalid encoded key format, must be :");P=A[1],x=function y(S){if("ed25519"===S.toLowerCase())return l.KeyType.ED25519;throw new Error(`Unknown key type ${S}`)}(A[0])}const T=(0,w.baseDecode)(P);if(T.length!==E.default.box.publicKeyLength)throw new Error(`Invalid public key size (${T.length}), must be ${E.default.box.publicKeyLength}`);return new b({keyType:x,data:T})}toString(){return`${function m(S){if(S===l.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${S}`)}(this.keyType)}:${(0,w.baseEncode)(this.data)}`}verify(_,A){if(this.keyType===l.KeyType.ED25519)return E.default.sign.detached.verify(_,A,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}s.PublicKey=b},85051:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserLocalStorageKeyStore=void 0;const M=p(55911),w=p(90793);class l extends w.KeyStore{constructor(y=window.localStorage,b="near-api-js:keystore:"){super(),this.localStorage=y,this.prefix=b}setKey(y,b,S){return h(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(y,b),S.toString())})}getKey(y,b){return h(this,void 0,void 0,function*(){const S=this.localStorage.getItem(this.storageKeyForSecretKey(y,b));return S?M.KeyPair.fromString(S):null})}removeKey(y,b){return h(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(y,b))})}clear(){return h(this,void 0,void 0,function*(){for(const y of this.storageKeys())y.startsWith(this.prefix)&&this.localStorage.removeItem(y)})}getNetworks(){return h(this,void 0,void 0,function*(){const y=new Set;for(const b of this.storageKeys())if(b.startsWith(this.prefix)){const S=b.substring(this.prefix.length).split(":");y.add(S[1])}return Array.from(y.values())})}getAccounts(y){return h(this,void 0,void 0,function*(){const b=new Array;for(const S of this.storageKeys())if(S.startsWith(this.prefix)){const _=S.substring(this.prefix.length).split(":");_[1]===y&&b.push(_[0])}return b})}storageKeyForSecretKey(y,b){return`${this.prefix}${b}:${y}`}*storageKeys(){for(let y=0;y{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserLocalStorageKeyStore=void 0;var h=p(85051);Object.defineProperty(s,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return h.BrowserLocalStorageKeyStore}})},93414:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(l,m,y,b){return new(y||(y=Promise))(function(_,A){function P(L){try{T(b.next(L))}catch(N){A(N)}}function x(L){try{T(b.throw(L))}catch(N){A(N)}}function T(L){L.done?_(L.value):function S(_){return _ instanceof y?_:new y(function(A){A(_)})}(L.value).then(P,x)}T((b=b.apply(l,m||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.InMemoryKeyStore=void 0;const M=p(55911),w=p(86614);class E extends w.KeyStore{constructor(){super(),this.keys={}}setKey(m,y,b){return h(this,void 0,void 0,function*(){this.keys[`${y}:${m}`]=b.toString()})}getKey(m,y){return h(this,void 0,void 0,function*(){const b=this.keys[`${y}:${m}`];return b?M.KeyPair.fromString(b):null})}removeKey(m,y){return h(this,void 0,void 0,function*(){delete this.keys[`${y}:${m}`]})}clear(){return h(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return h(this,void 0,void 0,function*(){const m=new Set;return Object.keys(this.keys).forEach(y=>{const b=y.split(":");m.add(b[1])}),Array.from(m.values())})}getAccounts(m){return h(this,void 0,void 0,function*(){const y=new Array;return Object.keys(this.keys).forEach(b=>{const S=b.split(":");S[S.length-1]===m&&y.push(S.slice(0,S.length-1).join(":"))}),y})}toString(){return"InMemoryKeyStore"}}s.InMemoryKeyStore=E},90793:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=s.KeyStore=s.InMemoryKeyStore=void 0;var h=p(93414);Object.defineProperty(s,"InMemoryKeyStore",{enumerable:!0,get:function(){return h.InMemoryKeyStore}});var M=p(86614);Object.defineProperty(s,"KeyStore",{enumerable:!0,get:function(){return M.KeyStore}});var w=p(51731);Object.defineProperty(s,"MergeKeyStore",{enumerable:!0,get:function(){return w.MergeKeyStore}})},86614:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyStore=void 0;s.KeyStore=class p{}},51731:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(E,l,m,y){return new(m||(m=Promise))(function(S,_){function A(T){try{x(y.next(T))}catch(L){_(L)}}function P(T){try{x(y.throw(T))}catch(L){_(L)}}function x(T){T.done?S(T.value):function b(S){return S instanceof m?S:new m(function(_){_(S)})}(T.value).then(A,P)}x((y=y.apply(E,l||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=void 0;const M=p(86614);class w extends M.KeyStore{constructor(l,m={writeKeyStoreIndex:0}){super(),this.options=m,this.keyStores=l}setKey(l,m,y){return h(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(l,m,y)})}getKey(l,m){return h(this,void 0,void 0,function*(){for(const y of this.keyStores){const b=yield y.getKey(l,m);if(b)return b}return null})}removeKey(l,m){return h(this,void 0,void 0,function*(){for(const y of this.keyStores)yield y.removeKey(l,m)})}clear(){return h(this,void 0,void 0,function*(){for(const l of this.keyStores)yield l.clear()})}getNetworks(){return h(this,void 0,void 0,function*(){const l=new Set;for(const m of this.keyStores)for(const y of yield m.getNetworks())l.add(y);return Array.from(l)})}getAccounts(l){return h(this,void 0,void 0,function*(){const m=new Set;for(const y of this.keyStores)for(const b of yield y.getAccounts(l))m.add(b);return Array.from(m)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}s.MergeKeyStore=w},35103:function(ne,s){"use strict";var p=this&&this.__awaiter||function(w,E,l,m){return new(l||(l=Promise))(function(b,S){function _(x){try{P(m.next(x))}catch(T){S(T)}}function A(x){try{P(m.throw(x))}catch(T){S(T)}}function P(x){x.done?b(x.value):function y(b){return b instanceof l?b:new l(function(S){S(b)})}(x.value).then(_,A)}P((m=m.apply(w,E||[])).next())})};function M(w){return new Promise(E=>setTimeout(E,w))}Object.defineProperty(s,"__esModule",{value:!0}),s.exponentialBackoff=void 0,s.exponentialBackoff=function h(w,E,l,m){return p(this,void 0,void 0,function*(){let y=w;for(let b=0;b!process.env.NEAR_NO_LOGS&&console.warn(...T);s.fetchJson=function x(T,L){return E(this,void 0,void 0,function*(){let N={url:null};"string"==typeof T?N.url=T:N=T;const j=yield(0,b.exponentialBackoff)(S,A,_,()=>E(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>w(p(75645)))).default);const B=yield global.fetch(N.url,{method:L?"POST":"GET",body:L||void 0,headers:Object.assign(Object.assign({},N.headers),{"Content-Type":"application/json"})});if(!B.ok){if(503===B.status)return P(`Retrying HTTP request for ${N.url} as it's not available now`),null;throw(0,y.default)(B.status,yield B.text())}return B}catch(B){if(B.toString().includes("FetchError")||B.toString().includes("Failed to fetch"))return P(`Retrying HTTP request for ${N.url} because of error: ${B}`),null;throw B}}));if(!j)throw new m.TypedError(`Exceeded ${A} attempts for ${N.url}.`,"RetriesExceeded");return yield j.json()})}},1739:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.fetchJson=s.Provider=s.JsonRpcProvider=s.exponentialBackoff=void 0;var h=p(35103);Object.defineProperty(s,"exponentialBackoff",{enumerable:!0,get:function(){return h.exponentialBackoff}});var M=p(44459);Object.defineProperty(s,"JsonRpcProvider",{enumerable:!0,get:function(){return M.JsonRpcProvider}});var w=p(95326);Object.defineProperty(s,"Provider",{enumerable:!0,get:function(){return w.Provider}});var E=p(243);Object.defineProperty(s,"fetchJson",{enumerable:!0,get:function(){return E.fetchJson}})},44459:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(L,N,j,B){return new(j||(j=Promise))(function(G,W){function Q(Z){try{J(B.next(Z))}catch(ee){W(ee)}}function q(Z){try{J(B.throw(Z))}catch(ee){W(ee)}}function J(Z){Z.done?G(Z.value):function V(G){return G instanceof j?G:new j(function(W){W(G)})}(Z.value).then(Q,q)}J((B=B.apply(L,N||[])).next())})},M=this&&this.__rest||function(L,N){var j={};for(var B in L)Object.prototype.hasOwnProperty.call(L,B)&&N.indexOf(B)<0&&(j[B]=L[B]);if(null!=L&&"function"==typeof Object.getOwnPropertySymbols){var V=0;for(B=Object.getOwnPropertySymbols(L);Vh(this,void 0,void 0,function*(){try{const G={method:N,params:j,id:x++,jsonrpc:"2.0"},W=yield(0,S.fetchJson)(this.connection,JSON.stringify(G));if(W.error){if("object"==typeof W.error.data)throw"string"==typeof W.error.data.error_message&&"string"==typeof W.error.data.error_type?new E.TypedError(W.error.data.error_message,W.error.data.error_type):(0,w.parseRpcError)(W.error.data);{const Q=`[${W.error.code}] ${W.error.message}: ${W.error.data}`;throw"Timeout"===W.error.data||Q.includes("Timeout error")||Q.includes("query has timed out")?new E.TypedError(Q,"TimeoutError"):new E.TypedError(Q,(0,w.getErrorTypeFromErrorMessage)(W.error.data,W.error.name))}}return W}catch(G){if("TimeoutError"===G.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${N} as it has timed out`,j),null;throw G}})),{result:V}=B;if(typeof V>"u")throw new E.TypedError(`Exceeded 12 attempts for request to ${N}.`,"RetriesExceeded");return V})}}s.JsonRpcProvider=T},95326:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Provider=void 0;s.Provider=class p{}},22972:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(b,S,_,A){return new(_||(_=Promise))(function(x,T){function L(B){try{j(A.next(B))}catch(V){T(V)}}function N(B){try{j(A.throw(B))}catch(V){T(V)}}function j(B){B.done?x(B.value):function P(x){return x instanceof _?x:new _(function(T){T(x)})}(B.value).then(L,N)}j((A=A.apply(b,S||[])).next())})},M=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(s,"__esModule",{value:!0}),s.InMemorySigner=void 0;const w=p(55911),E=p(90793),l=M(p(1520)),m=p(83159);class y extends m.Signer{constructor(S){super(),this.keyStore=S}static fromKeyPair(S,_,A){return h(this,void 0,void 0,function*(){const P=new E.InMemoryKeyStore;return yield P.setKey(S,_,A),new y(P)})}createKey(S,_){return h(this,void 0,void 0,function*(){const A=w.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(_,S,A),A.getPublicKey()})}getPublicKey(S,_){return h(this,void 0,void 0,function*(){const A=yield this.keyStore.getKey(_,S);return null===A?null:A.getPublicKey()})}signMessage(S,_,A){return h(this,void 0,void 0,function*(){const P=new Uint8Array(l.default.sha256.array(S));if(!_)throw new Error("InMemorySigner requires provided account id");const x=yield this.keyStore.getKey(A,_);if(null===x)throw new Error(`Key for ${_} not found in ${A}`);return x.sign(P)})}toString(){return`InMemorySigner(${this.keyStore})`}}s.InMemorySigner=y},25035:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signer=s.InMemorySigner=void 0;var h=p(22972);Object.defineProperty(s,"InMemorySigner",{enumerable:!0,get:function(){return h.InMemorySigner}});var M=p(83159);Object.defineProperty(s,"Signer",{enumerable:!0,get:function(){return M.Signer}})},83159:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signer=void 0;s.Signer=class p{}},79344:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.actionCreators=s.stringifyJsonOrBytes=void 0;const h=p(86041);function m(T){return void 0!==T.byteLength&&T.byteLength===T.length?T:Buffer.from(JSON.stringify(T))}s.stringifyJsonOrBytes=m,s.actionCreators={addKey:function _(T,L){return new h.Action({addKey:new h.AddKey({publicKey:T,accessKey:L})})},createAccount:function E(){return new h.Action({createAccount:new h.CreateAccount({})})},deleteAccount:function P(T){return new h.Action({deleteAccount:new h.DeleteAccount({beneficiaryId:T})})},deleteKey:function A(T){return new h.Action({deleteKey:new h.DeleteKey({publicKey:T})})},deployContract:function l(T){return new h.Action({deployContract:new h.DeployContract({code:T})})},fullAccessKey:function M(){return new h.AccessKey({permission:new h.AccessKeyPermission({fullAccess:new h.FullAccessPermission({})})})},functionCall:function y(T,L,N,j,B=m,V=!1){return V?new h.Action({functionCall:new h.FunctionCall({methodName:T,args:L,gas:N,deposit:j})}):new h.Action({functionCall:new h.FunctionCall({methodName:T,args:B(L),gas:N,deposit:j})})},functionCallAccessKey:function w(T,L,N){return new h.AccessKey({permission:new h.AccessKeyPermission({functionCall:new h.FunctionCallPermission({receiverId:T,allowance:N,methodNames:L})})})},signedDelegate:function x({delegateAction:T,signature:L}){return new h.Action({signedDelegate:new h.SignedDelegate({delegateAction:T,signature:L})})},stake:function S(T,L){return new h.Action({stake:new h.Stake({stake:T,publicKey:L})})},transfer:function b(T){return new h.Action({transfer:new h.Transfer({deposit:T})})}}},86041:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Action=s.SignedDelegate=s.DeleteAccount=s.DeleteKey=s.AddKey=s.Stake=s.Transfer=s.FunctionCall=s.DeployContract=s.CreateAccount=s.IAction=s.AccessKey=s.AccessKeyPermission=s.FullAccessPermission=s.FunctionCallPermission=void 0;const h=p(17527);class M{constructor(V){if(1!==Object.keys(V).length)throw new Error("Enum can only take single value");Object.keys(V).map(G=>{this[G]=V[G],this.enum=G})}}class w extends h.Assignable{}s.FunctionCallPermission=w;class E extends h.Assignable{}s.FullAccessPermission=E;s.AccessKeyPermission=class l extends M{};class m extends h.Assignable{}s.AccessKey=m;class y extends h.Assignable{}s.IAction=y;s.CreateAccount=class b extends y{};s.DeployContract=class S extends y{};s.FunctionCall=class _ extends y{};s.Transfer=class A extends y{};s.Stake=class P extends y{};s.AddKey=class x extends y{};s.DeleteKey=class T extends y{};s.DeleteAccount=class L extends y{};s.SignedDelegate=class N extends y{};s.Action=class j extends M{}},11889:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.createTransaction=void 0;const h=p(53699);s.createTransaction=function M(w,E,l,m,y,b){return new h.Transaction({signerId:w,publicKey:E,nonce:m,receiverId:l,actions:y,blockHash:b})}},34169:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.buildDelegateAction=s.DelegateAction=void 0;const h=p(17527),M=p(79344),{addKey:w,createAccount:E,deleteAccount:l,deleteKey:m,deployContract:y,functionCall:b,stake:S,transfer:_}=M.actionCreators;class A extends h.Assignable{}s.DelegateAction=A,s.buildDelegateAction=function P({actions:x,maxBlockHeight:T,nonce:L,publicKey:N,receiverId:j,senderId:B}){return new A({senderId:B,receiverId:j,actions:x.map(V=>{if(!V.type&&!V.params)return V;switch(V.type){case"AddKey":{const{publicKey:G,accessKey:W}=V.params;return w(G,W)}case"CreateAccount":return E(V.params.createAccount);case"DeleteAccount":return l(V.params.deleteAccount);case"DeleteKey":return m(V.params.publicKey);case"DeployContract":return y(V.params.code);case"FunctionCall":{const{methodName:G,args:W,gas:Q,deposit:q}=V.params;return b(G,W,Q,q)}case"Stake":return S(V.params.stake,V.params.publicKey);case"Transfer":{const{deposit:G}=V.params;return _(G)}}throw new Error("Unrecognized action")}),nonce:L,maxBlockHeight:T,publicKey:N})}},30448:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(w,E,l,m){void 0===m&&(m=l);var y=Object.getOwnPropertyDescriptor(E,l);(!y||("get"in y?!E.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return E[l]}}),Object.defineProperty(w,m,y)}:function(w,E,l,m){void 0===m&&(m=l),w[m]=E[l]}),M=this&&this.__exportStar||function(w,E){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(E,l)&&h(E,w,l)};Object.defineProperty(s,"__esModule",{value:!0}),M(p(79344),s),M(p(86041),s),M(p(11889),s),M(p(34169),s),M(p(53699),s),M(p(33033),s),M(p(13904),s)},37665:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.DelegateActionPrefix=void 0;const h=p(17527),M=Math.pow(2,30),w_MetaTransactions=366;class E extends h.Assignable{}class l extends E{constructor(b){super({prefix:M+b})}}s.DelegateActionPrefix=class m extends l{constructor(){super(w_MetaTransactions)}}},53699:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SCHEMA=s.SignedTransaction=s.Transaction=s.decodeSignedTransaction=s.decodeTransaction=s.encodeTransaction=s.encodeSignedDelegate=s.encodeDelegateAction=void 0;const h=p(55911),M=p(17527),w=p(21531),E=p(86041),l=p(34169),m=p(37665),y=p(13904);function _(L){return(0,w.serialize)(s.SCHEMA,L)}function A(L){return(0,w.deserialize)(s.SCHEMA,x,L)}function P(L){return(0,w.deserialize)(s.SCHEMA,T,L)}s.encodeDelegateAction=function b(L){return new Uint8Array([...(0,w.serialize)(s.SCHEMA,new m.DelegateActionPrefix),...(0,w.serialize)(s.SCHEMA,L)])},s.encodeSignedDelegate=function S(L){return(0,w.serialize)(s.SCHEMA,L)},s.encodeTransaction=_,s.decodeTransaction=A,s.decodeSignedTransaction=P;class x extends M.Assignable{encode(){return _(this)}static decode(N){return A(N)}}s.Transaction=x;class T extends M.Assignable{encode(){return _(this)}static decode(N){return P(N)}}s.SignedTransaction=T,s.SCHEMA=new Map([[y.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[T,{kind:"struct",fields:[["transaction",x],["signature",y.Signature]]}],[x,{kind:"struct",fields:[["signerId","string"],["publicKey",h.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[E.Action]]]}],[h.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[E.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",E.AccessKeyPermission]]}],[E.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",E.FunctionCallPermission],["fullAccess",E.FullAccessPermission]]}],[E.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[E.FullAccessPermission,{kind:"struct",fields:[]}],[E.Action,{kind:"enum",field:"enum",values:[["createAccount",E.CreateAccount],["deployContract",E.DeployContract],["functionCall",E.FunctionCall],["transfer",E.Transfer],["stake",E.Stake],["addKey",E.AddKey],["deleteKey",E.DeleteKey],["deleteAccount",E.DeleteAccount],["signedDelegate",E.SignedDelegate]]}],[E.CreateAccount,{kind:"struct",fields:[]}],[E.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[E.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[E.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[E.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",h.PublicKey]]}],[E.AddKey,{kind:"struct",fields:[["publicKey",h.PublicKey],["accessKey",E.AccessKey]]}],[E.DeleteKey,{kind:"struct",fields:[["publicKey",h.PublicKey]]}],[E.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[l.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[E.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",h.PublicKey]]}],[m.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[E.SignedDelegate,{kind:"struct",fields:[["delegateAction",l.DelegateAction],["signature",y.Signature]]}]])},33033:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(A,P,x,T){return new(x||(x=Promise))(function(N,j){function B(W){try{G(T.next(W))}catch(Q){j(Q)}}function V(W){try{G(T.throw(W))}catch(Q){j(Q)}}function G(W){W.done?N(W.value):function L(N){return N instanceof x?N:new x(function(j){j(N)})}(W.value).then(B,V)}G((T=T.apply(A,P||[])).next())})},M=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(s,"__esModule",{value:!0}),s.signDelegateAction=s.signTransaction=void 0;const w=M(p(1520)),E=p(86041),l=p(11889),m=p(53699),y=p(13904);function b(A,P,x,T){return h(this,void 0,void 0,function*(){const L=(0,m.encodeTransaction)(A),N=new Uint8Array(w.default.sha256.array(L)),j=yield P.signMessage(L,x,T);return[N,new m.SignedTransaction({transaction:A,signature:new y.Signature({keyType:A.publicKey.keyType,data:j.signature})})]})}s.signTransaction=function S(...A){return h(this,void 0,void 0,function*(){if(A[0].constructor===m.Transaction){const[P,x,T,L]=A;return b(P,x,T,L)}{const[P,x,T,L,N,j,B]=A,V=yield N.getPublicKey(j,B);return b((0,l.createTransaction)(j,V,P,x,T,L),N,j,B)}})},s.signDelegateAction=function _({delegateAction:A,signer:P}){return h(this,void 0,void 0,function*(){const x=(0,m.encodeDelegateAction)(A),T=yield P.sign(x),L=new E.SignedDelegate({delegateAction:A,signature:new y.Signature({keyType:A.publicKey.keyType,data:T})});return{hash:new Uint8Array(w.default.sha256.array(x)),signedDelegateAction:L}})}},13904:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signature=void 0;const h=p(17527);class M extends h.Assignable{}s.Signature=M},52596:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WalletConnection=s.ConnectedWalletAccount=s.Near=void 0;var h=p(56557);Object.defineProperty(s,"Near",{enumerable:!0,get:function(){return h.Near}});var M=p(55193);Object.defineProperty(s,"ConnectedWalletAccount",{enumerable:!0,get:function(){return M.ConnectedWalletAccount}}),Object.defineProperty(s,"WalletConnection",{enumerable:!0,get:function(){return M.WalletConnection}})},56557:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(m,y,b,S){return new(b||(b=Promise))(function(A,P){function x(N){try{L(S.next(N))}catch(j){P(j)}}function T(N){try{L(S.throw(N))}catch(j){P(j)}}function L(N){N.done?A(N.value):function _(A){return A instanceof b?A:new b(function(P){P(A)})}(N.value).then(x,T)}L((S=S.apply(m,y||[])).next())})},M=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(s,"__esModule",{value:!0}),s.Near=void 0;const w=p(11538),E=M(p(98538));s.Near=class l{constructor(y){var b;if(this.config=y,this.connection=w.Connection.fromConfig({networkId:y.networkId,provider:{type:"JsonRpcProvider",args:{url:y.nodeUrl,headers:y.headers}},signer:y.signer||{type:"InMemorySigner",keyStore:y.keyStore||(null===(b=y.deps)||void 0===b?void 0:b.keyStore)},jsvmAccountId:y.jsvmAccountId||`jsvm.${y.networkId}`}),y.masterAccount){const S=y.initialBalance?new E.default(y.initialBalance):new E.default("500000000000000000000000000");this.accountCreator=new w.LocalAccountCreator(new w.Account(this.connection,y.masterAccount),S)}else y.helperUrl?this.accountCreator=new w.UrlAccountCreator(this.connection,y.helperUrl):this.accountCreator=null}account(y){return h(this,void 0,void 0,function*(){return new w.Account(this.connection,y)})}createAccount(y,b){return h(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(y,b),new w.Account(this.connection,y)})}}},55193:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(T,L,N,j){return new(N||(N=Promise))(function(V,G){function W(J){try{q(j.next(J))}catch(Z){G(Z)}}function Q(J){try{q(j.throw(J))}catch(Z){G(Z)}}function q(J){J.done?V(J.value):function B(V){return V instanceof N?V:new N(function(G){G(V)})}(J.value).then(W,Q)}q((j=j.apply(T,L||[])).next())})},M=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(s,"__esModule",{value:!0}),s.ConnectedWalletAccount=s.WalletConnection=void 0;const w=p(11538),E=p(55911),l=p(30448),m=M(p(98538)),y=p(21531),A="pending_key";s.WalletConnection=class P{constructor(L,N){if("string"!=typeof N)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(V,G)=>"isSignedIn"===G?()=>!1:"getAccountId"===G?()=>"":V[G]&&"function"==typeof V[G]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:V[G]});this._near=L;const j=N+"_wallet_auth_key",B=JSON.parse(window.localStorage.getItem(j));this._networkId=L.config.networkId,this._walletBaseUrl=L.config.walletUrl,N=N||L.config.contractName||"default",this._keyStore=L.connection.signer.keyStore,this._authData=B||{allKeys:[]},this._authDataKey=j,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return h(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:L,methodNames:N,successUrl:j,failureUrl:B}){return h(this,void 0,void 0,function*(){const V=new URL(window.location.href),G=new URL(this._walletBaseUrl+"/login/");if(G.searchParams.set("success_url",j||V.href),G.searchParams.set("failure_url",B||V.href),L){yield(yield this._near.account(L)).state(),G.searchParams.set("contract_id",L);const Q=E.KeyPair.fromRandom("ed25519");G.searchParams.set("public_key",Q.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,A+Q.getPublicKey(),Q)}N&&N.forEach(W=>{G.searchParams.append("methodNames",W)}),window.location.assign(G.toString())})}requestSignTransactions({transactions:L,meta:N,callbackUrl:j}){return h(this,void 0,void 0,function*(){const B=new URL(window.location.href),V=new URL("sign",this._walletBaseUrl);V.searchParams.set("transactions",L.map(G=>(0,y.serialize)(l.SCHEMA,G)).map(G=>Buffer.from(G).toString("base64")).join(",")),V.searchParams.set("callbackUrl",j||B.href),N&&V.searchParams.set("meta",N),window.location.assign(V.toString())})}_completeSignInWithAccessKey(){return h(this,void 0,void 0,function*(){const L=new URL(window.location.href),N=L.searchParams.get("public_key")||"",j=(L.searchParams.get("all_keys")||"").split(","),B=L.searchParams.get("account_id")||"";if(B){const V={accountId:B,allKeys:j};window.localStorage.setItem(this._authDataKey,JSON.stringify(V)),N&&(yield this._moveKeyFromTempToPermanent(B,N)),this._authData=V}L.searchParams.delete("public_key"),L.searchParams.delete("all_keys"),L.searchParams.delete("account_id"),L.searchParams.delete("meta"),L.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,L.toString())})}_moveKeyFromTempToPermanent(L,N){return h(this,void 0,void 0,function*(){const j=yield this._keyStore.getKey(this._networkId,A+N);yield this._keyStore.setKey(this._networkId,L,j),yield this._keyStore.removeKey(this._networkId,A+N)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new x(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class x extends w.Account{constructor(L,N,j){super(N,j),this.walletConnection=L}signAndSendTransaction({receiverId:L,actions:N,walletMeta:j,walletCallbackUrl:B=window.location.href}){const V=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return h(this,void 0,void 0,function*(){const G=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let W=yield this.accessKeyForTransaction(L,N,G);if(!W)throw new Error(`Cannot find matching key for transaction sent to ${L}`);if(G&&G.toString()===W.public_key)try{return yield V.signAndSendTransaction.call(this,{receiverId:L,actions:N})}catch(I){if("NotEnoughAllowance"!==I.type)throw I;W=yield this.accessKeyForTransaction(L,N)}const Q=yield this.connection.provider.block({finality:"final"}),q=(0,y.baseDecode)(Q.header.hash),J=E.PublicKey.from(W.public_key),Z=W.access_key.nonce.add(new m.default(1)),ee=(0,l.createTransaction)(this.accountId,J,L,Z,N,q);return yield this.walletConnection.requestSignTransactions({transactions:[ee],meta:j,callbackUrl:B}),new Promise((I,o)=>{setTimeout(()=>{o(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(L,N,j){return h(this,void 0,void 0,function*(){const{access_key:{permission:B}}=L;if("FullAccess"===B)return!0;if(B.FunctionCall){const{receiver_id:V,method_names:G}=B.FunctionCall;if(V===this.accountId&&G.includes("add_request_and_confirm"))return!0;if(V===N){if(1!==j.length)return!1;const[{functionCall:W}]=j;return W&&(!W.deposit||"0"===W.deposit.toString())&&(0===G.length||G.includes(W.methodName))}}return!1})}accessKeyForTransaction(L,N,j){return h(this,void 0,void 0,function*(){const B=yield this.getAccessKeys();if(j){const G=B.find(W=>W.public_key.toString()===j.toString());if(G&&(yield this.accessKeyMatchesTransaction(G,L,N)))return G}const V=this.walletConnection._authData.allKeys;for(const G of B)if(-1!==V.indexOf(G.public_key)&&(yield this.accessKeyMatchesTransaction(G,L,N)))return G;return null})}}s.ConnectedWalletAccount=x},52602:(ne,s,p)=>{"use strict";var h=p(9028)("http-errors"),M=p(1106),w=p(31831),E=p(83894),l=p(77721);function m(L){return Number(String(L).charAt(0)+"00")}function P(L,N){var j=Object.getOwnPropertyDescriptor(L,"name");j&&j.configurable&&(j.value=N,Object.defineProperty(L,"name",j))}function T(L){return"Error"!==L.substr(-5)?L+"Error":L}ne.exports=function y(){for(var L,N,j=500,B={},V=0;V=600)&&h("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof j||!w[j]&&(j<400||j>=600))&&(j=500);var W=y[j]||y[m(j)];for(var Q in L||(L=W?new W(N):new Error(N||w[j]),Error.captureStackTrace(L,y)),(!W||!(L instanceof W)||L.status!==j)&&(L.expose=j<500,L.status=L.statusCode=j),B)"status"!==Q&&"statusCode"!==Q&&(L[Q]=B[Q]);return L},ne.exports.HttpError=function b(){function L(){throw new TypeError("cannot construct abstract class")}return E(L,Error),L}(),ne.exports.isHttpError=function _(L){return function(j){return!(!j||"object"!=typeof j)&&(j instanceof L||j instanceof Error&&"boolean"==typeof j.expose&&"number"==typeof j.statusCode&&j.status===j.statusCode)}}(ne.exports.HttpError),function x(L,N,j){N.forEach(function(V){var G,W=l(w[V]);switch(m(V)){case 400:G=function S(L,N,j){var B=T(N);function V(G){var W=G??w[j],Q=new Error(W);return Error.captureStackTrace(Q,V),M(Q,V.prototype),Object.defineProperty(Q,"message",{enumerable:!0,configurable:!0,value:W,writable:!0}),Object.defineProperty(Q,"name",{enumerable:!1,configurable:!0,value:B,writable:!0}),Q}return E(V,L),P(V,B),V.prototype.status=j,V.prototype.statusCode=j,V.prototype.expose=!0,V}(j,W,V);break;case 500:G=function A(L,N,j){var B=T(N);function V(G){var W=G??w[j],Q=new Error(W);return Error.captureStackTrace(Q,V),M(Q,V.prototype),Object.defineProperty(Q,"message",{enumerable:!0,configurable:!0,value:W,writable:!0}),Object.defineProperty(Q,"name",{enumerable:!1,configurable:!0,value:B,writable:!0}),Q}return E(V,L),P(V,B),V.prototype.status=j,V.prototype.statusCode=j,V.prototype.expose=!1,V}(j,W,V)}G&&(L[V]=G,L[W]=G)}),L["I'mateapot"]=h.function(L.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(ne.exports,w.codes,ne.exports.HttpError)},9028:ne=>{"use strict";function p(M,w){if("function"!=typeof M)throw new TypeError("argument fn must be a function");return M}function h(M,w,E){if(!M||"object"!=typeof M&&"function"!=typeof M)throw new TypeError("argument obj must be object");var l=Object.getOwnPropertyDescriptor(M,w);if(!l)throw new TypeError("must call property on owner object");if(!l.configurable)throw new TypeError("property must be configurable")}ne.exports=function s(M){if(!M)throw new TypeError("argument namespace is required");function w(E){}return w._file=void 0,w._ignored=!0,w._namespace=M,w._traced=!1,w._warned=Object.create(null),w.function=p,w.property=h,w}},60144:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Account=void 0;var h=p(11538);Object.defineProperty(s,"Account",{enumerable:!0,get:function(){return h.Account}})},30115:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.UrlAccountCreator=s.LocalAccountCreator=s.AccountCreator=void 0;var h=p(11538);Object.defineProperty(s,"AccountCreator",{enumerable:!0,get:function(){return h.AccountCreator}}),Object.defineProperty(s,"LocalAccountCreator",{enumerable:!0,get:function(){return h.LocalAccountCreator}}),Object.defineProperty(s,"UrlAccountCreator",{enumerable:!0,get:function(){return h.UrlAccountCreator}})},32164:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MultisigStateStatus=s.MultisigDeleteRequestRejectionError=s.MULTISIG_CONFIRM_METHODS=s.MULTISIG_CHANGE_METHODS=s.MULTISIG_DEPOSIT=s.MULTISIG_GAS=s.MULTISIG_ALLOWANCE=s.MULTISIG_STORAGE_KEY=s.AccountMultisig=s.Account2FA=void 0;var h=p(11538);Object.defineProperty(s,"Account2FA",{enumerable:!0,get:function(){return h.Account2FA}}),Object.defineProperty(s,"AccountMultisig",{enumerable:!0,get:function(){return h.AccountMultisig}}),Object.defineProperty(s,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return h.MULTISIG_STORAGE_KEY}}),Object.defineProperty(s,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return h.MULTISIG_ALLOWANCE}}),Object.defineProperty(s,"MULTISIG_GAS",{enumerable:!0,get:function(){return h.MULTISIG_GAS}}),Object.defineProperty(s,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return h.MULTISIG_DEPOSIT}}),Object.defineProperty(s,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(s,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(s,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return h.MultisigDeleteRequestRejectionError}}),Object.defineProperty(s,"MultisigStateStatus",{enumerable:!0,get:function(){return h.MultisigStateStatus}})},76207:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(E,l,m,y){return new(m||(m=Promise))(function(S,_){function A(T){try{x(y.next(T))}catch(L){_(L)}}function P(T){try{x(y.throw(T))}catch(L){_(L)}}function x(T){T.done?S(T.value):function b(S){return S instanceof m?S:new m(function(_){_(S)})}(T.value).then(A,P)}x((y=y.apply(E,l||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.connect=void 0;const M=p(33906);s.connect=function w(E){return h(this,void 0,void 0,function*(){return new M.Near(E)})}},8597:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(l,m,y,b){void 0===b&&(b=y);var S=Object.getOwnPropertyDescriptor(m,y);(!S||("get"in S?!m.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return m[y]}}),Object.defineProperty(l,b,S)}:function(l,m,y,b){void 0===b&&(b=y),l[b]=m[y]}),M=this&&this.__setModuleDefault||(Object.create?function(l,m){Object.defineProperty(l,"default",{enumerable:!0,value:m})}:function(l,m){l.default=m}),w=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var m={};if(null!=l)for(var y in l)"default"!==y&&Object.prototype.hasOwnProperty.call(l,y)&&h(m,l,y);return M(m,l),m},E=this&&this.__exportStar||function(l,m){for(var y in l)"default"!==y&&!Object.prototype.hasOwnProperty.call(m,y)&&h(m,l,y)};Object.defineProperty(s,"__esModule",{value:!0}),s.keyStores=void 0,s.keyStores=w(p(46015)),E(p(29424),s),E(p(76207),s),p(4073)},29424:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(j,B,V,G){void 0===G&&(G=V);var W=Object.getOwnPropertyDescriptor(B,V);(!W||("get"in W?!B.__esModule:W.writable||W.configurable))&&(W={enumerable:!0,get:function(){return B[V]}}),Object.defineProperty(j,G,W)}:function(j,B,V,G){void 0===G&&(G=V),j[G]=B[V]}),M=this&&this.__setModuleDefault||(Object.create?function(j,B){Object.defineProperty(j,"default",{enumerable:!0,value:B})}:function(j,B){j.default=B}),w=this&&this.__importStar||function(j){if(j&&j.__esModule)return j;var B={};if(null!=j)for(var V in j)"default"!==V&&Object.prototype.hasOwnProperty.call(j,V)&&h(B,j,V);return M(B,j),B};Object.defineProperty(s,"__esModule",{value:!0}),s.WalletConnection=s.ConnectedWalletAccount=s.Near=s.KeyPair=s.Signer=s.InMemorySigner=s.Contract=s.Connection=s.Account=s.multisig=s.validators=s.transactions=s.utils=s.providers=s.accountCreator=void 0;const E=w(p(87974));s.providers=E;const l=w(p(75141));s.utils=l;const m=w(p(41468));s.transactions=m;const y=w(p(90744));s.validators=y;const b=p(60144);Object.defineProperty(s,"Account",{enumerable:!0,get:function(){return b.Account}});const S=w(p(32164));s.multisig=S;const _=w(p(30115));s.accountCreator=_;const A=p(60177);Object.defineProperty(s,"Connection",{enumerable:!0,get:function(){return A.Connection}});const P=p(96519);Object.defineProperty(s,"Signer",{enumerable:!0,get:function(){return P.Signer}}),Object.defineProperty(s,"InMemorySigner",{enumerable:!0,get:function(){return P.InMemorySigner}});const x=p(20866);Object.defineProperty(s,"Contract",{enumerable:!0,get:function(){return x.Contract}});const T=p(93633);Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return T.KeyPair}});const L=p(33906);Object.defineProperty(s,"Near",{enumerable:!0,get:function(){return L.Near}});const N=p(85091);Object.defineProperty(s,"ConnectedWalletAccount",{enumerable:!0,get:function(){return N.ConnectedWalletAccount}}),Object.defineProperty(s,"WalletConnection",{enumerable:!0,get:function(){return N.WalletConnection}})},60177:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Connection=void 0;var h=p(11538);Object.defineProperty(s,"Connection",{enumerable:!0,get:function(){return h.Connection}})},20866:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Contract=void 0;var h=p(11538);Object.defineProperty(s,"Contract",{enumerable:!0,get:function(){return h.Contract}})},46015:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=s.BrowserLocalStorageKeyStore=s.InMemoryKeyStore=s.KeyStore=void 0;const h=p(60987);Object.defineProperty(s,"KeyStore",{enumerable:!0,get:function(){return h.KeyStore}});const M=p(21473);Object.defineProperty(s,"InMemoryKeyStore",{enumerable:!0,get:function(){return M.InMemoryKeyStore}});const w=p(94974);Object.defineProperty(s,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return w.BrowserLocalStorageKeyStore}});const E=p(26523);Object.defineProperty(s,"MergeKeyStore",{enumerable:!0,get:function(){return E.MergeKeyStore}})},94974:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserLocalStorageKeyStore=void 0;var h=p(82540);Object.defineProperty(s,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return h.BrowserLocalStorageKeyStore}})},21473:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.InMemoryKeyStore=void 0;var h=p(90793);Object.defineProperty(s,"InMemoryKeyStore",{enumerable:!0,get:function(){return h.InMemoryKeyStore}})},60987:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyStore=void 0;var h=p(90793);Object.defineProperty(s,"KeyStore",{enumerable:!0,get:function(){return h.KeyStore}})},26523:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=void 0;var h=p(90793);Object.defineProperty(s,"MergeKeyStore",{enumerable:!0,get:function(){return h.MergeKeyStore}})},33906:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Near=void 0;var h=p(52596);Object.defineProperty(s,"Near",{enumerable:!0,get:function(){return h.Near}})},87974:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ErrorContext=s.TypedError=s.getTransactionLastResult=s.FinalExecutionStatusBasic=s.JsonRpcProvider=s.Provider=void 0;const h=p(71308);Object.defineProperty(s,"Provider",{enumerable:!0,get:function(){return h.Provider}}),Object.defineProperty(s,"getTransactionLastResult",{enumerable:!0,get:function(){return h.getTransactionLastResult}}),Object.defineProperty(s,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return h.FinalExecutionStatusBasic}});const M=p(21355);Object.defineProperty(s,"JsonRpcProvider",{enumerable:!0,get:function(){return M.JsonRpcProvider}}),Object.defineProperty(s,"TypedError",{enumerable:!0,get:function(){return M.TypedError}}),Object.defineProperty(s,"ErrorContext",{enumerable:!0,get:function(){return M.ErrorContext}})},21355:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.JsonRpcProvider=s.TypedError=s.ErrorContext=void 0;var h=p(17527);Object.defineProperty(s,"ErrorContext",{enumerable:!0,get:function(){return h.ErrorContext}}),Object.defineProperty(s,"TypedError",{enumerable:!0,get:function(){return h.TypedError}});var M=p(1739);Object.defineProperty(s,"JsonRpcProvider",{enumerable:!0,get:function(){return M.JsonRpcProvider}})},71308:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.FinalExecutionStatusBasic=s.ExecutionStatusBasic=s.IdType=s.Provider=s.getTransactionLastResult=void 0;var h=p(41166);Object.defineProperty(s,"getTransactionLastResult",{enumerable:!0,get:function(){return h.getTransactionLastResult}});var M=p(1739);Object.defineProperty(s,"Provider",{enumerable:!0,get:function(){return M.Provider}});var w=p(17527);Object.defineProperty(s,"IdType",{enumerable:!0,get:function(){return w.IdType}}),Object.defineProperty(s,"ExecutionStatusBasic",{enumerable:!0,get:function(){return w.ExecutionStatusBasic}}),Object.defineProperty(s,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return w.FinalExecutionStatusBasic}})},96519:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signer=s.InMemorySigner=void 0;var h=p(25035);Object.defineProperty(s,"InMemorySigner",{enumerable:!0,get:function(){return h.InMemorySigner}}),Object.defineProperty(s,"Signer",{enumerable:!0,get:function(){return h.Signer}})},41468:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.transfer=s.stake=s.functionCallAccessKey=s.functionCall=s.fullAccessKey=s.deployContract=s.deleteKey=s.deleteAccount=s.createAccount=s.addKey=s.encodeDelegateAction=s.encodeSignedDelegate=s.Transaction=s.SignedTransaction=s.Signature=s.signTransaction=s.createTransaction=s.SCHEMA=s.Transfer=s.Stake=s.FunctionCallPermission=s.FunctionCall=s.FullAccessPermission=s.DeployContract=s.DeleteKey=s.DeleteAccount=s.CreateAccount=s.AddKey=s.AccessKeyPermission=s.AccessKey=s.Action=s.stringifyJsonOrBytes=void 0;var h=p(30448);Object.defineProperty(s,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return h.stringifyJsonOrBytes}}),Object.defineProperty(s,"Action",{enumerable:!0,get:function(){return h.Action}}),Object.defineProperty(s,"AccessKey",{enumerable:!0,get:function(){return h.AccessKey}}),Object.defineProperty(s,"AccessKeyPermission",{enumerable:!0,get:function(){return h.AccessKeyPermission}}),Object.defineProperty(s,"AddKey",{enumerable:!0,get:function(){return h.AddKey}}),Object.defineProperty(s,"CreateAccount",{enumerable:!0,get:function(){return h.CreateAccount}}),Object.defineProperty(s,"DeleteAccount",{enumerable:!0,get:function(){return h.DeleteAccount}}),Object.defineProperty(s,"DeleteKey",{enumerable:!0,get:function(){return h.DeleteKey}}),Object.defineProperty(s,"DeployContract",{enumerable:!0,get:function(){return h.DeployContract}}),Object.defineProperty(s,"FullAccessPermission",{enumerable:!0,get:function(){return h.FullAccessPermission}}),Object.defineProperty(s,"FunctionCall",{enumerable:!0,get:function(){return h.FunctionCall}}),Object.defineProperty(s,"FunctionCallPermission",{enumerable:!0,get:function(){return h.FunctionCallPermission}}),Object.defineProperty(s,"Stake",{enumerable:!0,get:function(){return h.Stake}}),Object.defineProperty(s,"Transfer",{enumerable:!0,get:function(){return h.Transfer}}),Object.defineProperty(s,"SCHEMA",{enumerable:!0,get:function(){return h.SCHEMA}}),Object.defineProperty(s,"createTransaction",{enumerable:!0,get:function(){return h.createTransaction}}),Object.defineProperty(s,"signTransaction",{enumerable:!0,get:function(){return h.signTransaction}}),Object.defineProperty(s,"Signature",{enumerable:!0,get:function(){return h.Signature}}),Object.defineProperty(s,"SignedTransaction",{enumerable:!0,get:function(){return h.SignedTransaction}}),Object.defineProperty(s,"Transaction",{enumerable:!0,get:function(){return h.Transaction}}),Object.defineProperty(s,"encodeSignedDelegate",{enumerable:!0,get:function(){return h.encodeSignedDelegate}}),Object.defineProperty(s,"encodeDelegateAction",{enumerable:!0,get:function(){return h.encodeDelegateAction}});const M=p(30448);s.addKey=(x,T)=>M.actionCreators.addKey(x,T);s.createAccount=()=>M.actionCreators.createAccount();s.deleteAccount=x=>M.actionCreators.deleteAccount(x);s.deleteKey=x=>M.actionCreators.deleteKey(x);s.deployContract=x=>M.actionCreators.deployContract(x);s.fullAccessKey=()=>M.actionCreators.fullAccessKey();s.functionCall=(x,T,L,N,j,B)=>M.actionCreators.functionCall(x,T,L,N,j,B);s.functionCallAccessKey=(x,T,L)=>M.actionCreators.functionCallAccessKey(x,T,L);s.stake=(x,T)=>M.actionCreators.stake(x,T);s.transfer=x=>M.actionCreators.transfer(x)},64179:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Enum=s.Assignable=void 0;var h=p(17527);Object.defineProperty(s,"Assignable",{enumerable:!0,get:function(){return h.Assignable}});s.Enum=class M{constructor(E){if(1!==Object.keys(E).length)throw new Error("Enum can only take single value");Object.keys(E).map(l=>{this[l]=E[l],this.enum=l})}}},342:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.logWarning=s.TypedError=s.PositionalArgsError=s.ErrorContext=s.ArgumentTypeError=s.UnsupportedSerializationError=s.UnknownArgumentError=s.ConflictingOptions=s.ArgumentSchemaError=void 0;var h=p(11538);Object.defineProperty(s,"ArgumentSchemaError",{enumerable:!0,get:function(){return h.ArgumentSchemaError}}),Object.defineProperty(s,"ConflictingOptions",{enumerable:!0,get:function(){return h.ConflictingOptions}}),Object.defineProperty(s,"UnknownArgumentError",{enumerable:!0,get:function(){return h.UnknownArgumentError}}),Object.defineProperty(s,"UnsupportedSerializationError",{enumerable:!0,get:function(){return h.UnsupportedSerializationError}});var M=p(17527);Object.defineProperty(s,"ArgumentTypeError",{enumerable:!0,get:function(){return M.ArgumentTypeError}}),Object.defineProperty(s,"ErrorContext",{enumerable:!0,get:function(){return M.ErrorContext}}),Object.defineProperty(s,"PositionalArgsError",{enumerable:!0,get:function(){return M.PositionalArgsError}}),Object.defineProperty(s,"TypedError",{enumerable:!0,get:function(){return M.TypedError}});var w=p(41166);Object.defineProperty(s,"logWarning",{enumerable:!0,get:function(){return w.logWarning}})},76185:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.parseNearAmount=s.formatNearAmount=s.NEAR_NOMINATION_EXP=s.NEAR_NOMINATION=void 0;var h=p(41166);Object.defineProperty(s,"NEAR_NOMINATION",{enumerable:!0,get:function(){return h.NEAR_NOMINATION}}),Object.defineProperty(s,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return h.NEAR_NOMINATION_EXP}}),Object.defineProperty(s,"formatNearAmount",{enumerable:!0,get:function(){return h.formatNearAmount}}),Object.defineProperty(s,"parseNearAmount",{enumerable:!0,get:function(){return h.parseNearAmount}})},75141:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(P,x,T,L){void 0===L&&(L=T);var N=Object.getOwnPropertyDescriptor(x,T);(!N||("get"in N?!x.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return x[T]}}),Object.defineProperty(P,L,N)}:function(P,x,T,L){void 0===L&&(L=T),P[L]=x[T]}),M=this&&this.__setModuleDefault||(Object.create?function(P,x){Object.defineProperty(P,"default",{enumerable:!0,value:x})}:function(P,x){P.default=x}),w=this&&this.__importStar||function(P){if(P&&P.__esModule)return P;var x={};if(null!=P)for(var T in P)"default"!==T&&Object.prototype.hasOwnProperty.call(P,T)&&h(x,P,T);return M(x,P),x};Object.defineProperty(s,"__esModule",{value:!0}),s.logWarning=s.rpc_errors=s.KeyPairEd25519=s.KeyPair=s.PublicKey=s.format=s.enums=s.web=s.serialize=s.key_pair=void 0;const E=w(p(93633));s.key_pair=E;const l=w(p(55822));s.serialize=l;const m=w(p(63770));s.web=m;const y=w(p(64179));s.enums=y;const b=w(p(76185));s.format=b;const S=w(p(1158));s.rpc_errors=S;const _=p(93633);Object.defineProperty(s,"PublicKey",{enumerable:!0,get:function(){return _.PublicKey}}),Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return _.KeyPair}}),Object.defineProperty(s,"KeyPairEd25519",{enumerable:!0,get:function(){return _.KeyPairEd25519}});const A=p(342);Object.defineProperty(s,"logWarning",{enumerable:!0,get:function(){return A.logWarning}})},93633:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.PublicKey=s.KeyType=s.KeyPairEd25519=s.KeyPair=void 0;var h=p(55911);Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return h.KeyPair}}),Object.defineProperty(s,"KeyPairEd25519",{enumerable:!0,get:function(){return h.KeyPairEd25519}}),Object.defineProperty(s,"KeyType",{enumerable:!0,get:function(){return h.KeyType}}),Object.defineProperty(s,"PublicKey",{enumerable:!0,get:function(){return h.PublicKey}})},1158:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ServerError=s.getErrorTypeFromErrorMessage=s.formatError=s.parseResultError=s.parseRpcError=void 0;var h=p(41166);Object.defineProperty(s,"parseRpcError",{enumerable:!0,get:function(){return h.parseRpcError}}),Object.defineProperty(s,"parseResultError",{enumerable:!0,get:function(){return h.parseResultError}}),Object.defineProperty(s,"formatError",{enumerable:!0,get:function(){return h.formatError}}),Object.defineProperty(s,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return h.getErrorTypeFromErrorMessage}}),Object.defineProperty(s,"ServerError",{enumerable:!0,get:function(){return h.ServerError}})},55822:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BinaryReader=s.BinaryWriter=s.BorshError=s.deserialize=s.serialize=s.base_decode=s.base_encode=void 0;var h=p(21531);Object.defineProperty(s,"base_encode",{enumerable:!0,get:function(){return h.baseEncode}}),Object.defineProperty(s,"base_decode",{enumerable:!0,get:function(){return h.baseDecode}}),Object.defineProperty(s,"serialize",{enumerable:!0,get:function(){return h.serialize}}),Object.defineProperty(s,"deserialize",{enumerable:!0,get:function(){return h.deserialize}}),Object.defineProperty(s,"BorshError",{enumerable:!0,get:function(){return h.BorshError}}),Object.defineProperty(s,"BinaryWriter",{enumerable:!0,get:function(){return h.BinaryWriter}}),Object.defineProperty(s,"BinaryReader",{enumerable:!0,get:function(){return h.BinaryReader}})},63770:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.fetchJson=void 0;var h=p(1739);Object.defineProperty(s,"fetchJson",{enumerable:!0,get:function(){return h.fetchJson}})},90744:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.findSeatPrice=s.diffEpochValidators=void 0;var h=p(41166);Object.defineProperty(s,"diffEpochValidators",{enumerable:!0,get:function(){return h.diffEpochValidators}}),Object.defineProperty(s,"findSeatPrice",{enumerable:!0,get:function(){return h.findSeatPrice}})},85091:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WalletConnection=s.ConnectedWalletAccount=void 0;var h=p(52596);Object.defineProperty(s,"ConnectedWalletAccount",{enumerable:!0,get:function(){return h.ConnectedWalletAccount}}),Object.defineProperty(s,"WalletConnection",{enumerable:!0,get:function(){return h.WalletConnection}})},31831:(ne,s,p)=>{"use strict";var h=p(31008);function w(E){if("number"==typeof E){if(!w[E])throw new Error("invalid status code: "+E);return E}if("string"!=typeof E)throw new TypeError("code must be a number or string");var l=parseInt(E,10);if(!isNaN(l)){if(!w[l])throw new Error("invalid status code: "+l);return l}if(!(l=w[E.toLowerCase()]))throw new Error('invalid status message: "'+E+'"');return l}ne.exports=w,w.STATUS_CODES=h,w.codes=function M(E,l){var m=[];return Object.keys(l).forEach(function(b){var S=l[b],_=Number(b);E[_]=S,E[S]=_,E[S.toLowerCase()]=_,m.push(_)}),m}(w,h),w.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},w.empty={204:!0,205:!0,304:!0},w.retry={502:!0,503:!0,504:!0}},54502:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var h=p(8046);function m(D,F,z){return void 0===F&&(F=new Uint8Array(2)),void 0===z&&(z=0),F[z+0]=D>>>8,F[z+1]=D>>>0,F}function y(D,F,z){return void 0===F&&(F=new Uint8Array(2)),void 0===z&&(z=0),F[z+0]=D>>>0,F[z+1]=D>>>8,F}function b(D,F){return void 0===F&&(F=0),D[F]<<24|D[F+1]<<16|D[F+2]<<8|D[F+3]}function S(D,F){return void 0===F&&(F=0),(D[F]<<24|D[F+1]<<16|D[F+2]<<8|D[F+3])>>>0}function _(D,F){return void 0===F&&(F=0),D[F+3]<<24|D[F+2]<<16|D[F+1]<<8|D[F]}function A(D,F){return void 0===F&&(F=0),(D[F+3]<<24|D[F+2]<<16|D[F+1]<<8|D[F])>>>0}function P(D,F,z){return void 0===F&&(F=new Uint8Array(4)),void 0===z&&(z=0),F[z+0]=D>>>24,F[z+1]=D>>>16,F[z+2]=D>>>8,F[z+3]=D>>>0,F}function x(D,F,z){return void 0===F&&(F=new Uint8Array(4)),void 0===z&&(z=0),F[z+0]=D>>>0,F[z+1]=D>>>8,F[z+2]=D>>>16,F[z+3]=D>>>24,F}function B(D,F,z){return void 0===F&&(F=new Uint8Array(8)),void 0===z&&(z=0),P(D/4294967296>>>0,F,z),P(D>>>0,F,z+4),F}function V(D,F,z){return void 0===F&&(F=new Uint8Array(8)),void 0===z&&(z=0),x(D>>>0,F,z),x(D/4294967296>>>0,F,z+4),F}s.readInt16BE=function M(D,F){return void 0===F&&(F=0),(D[F+0]<<8|D[F+1])<<16>>16},s.readUint16BE=function w(D,F){return void 0===F&&(F=0),(D[F+0]<<8|D[F+1])>>>0},s.readInt16LE=function E(D,F){return void 0===F&&(F=0),(D[F+1]<<8|D[F])<<16>>16},s.readUint16LE=function l(D,F){return void 0===F&&(F=0),(D[F+1]<<8|D[F])>>>0},s.writeUint16BE=m,s.writeInt16BE=m,s.writeUint16LE=y,s.writeInt16LE=y,s.readInt32BE=b,s.readUint32BE=S,s.readInt32LE=_,s.readUint32LE=A,s.writeUint32BE=P,s.writeInt32BE=P,s.writeUint32LE=x,s.writeInt32LE=x,s.readInt64BE=function T(D,F){void 0===F&&(F=0);var z=b(D,F),C=b(D,F+4);return 4294967296*z+C-4294967296*(C>>31)},s.readUint64BE=function L(D,F){return void 0===F&&(F=0),4294967296*S(D,F)+S(D,F+4)},s.readInt64LE=function N(D,F){void 0===F&&(F=0);var z=_(D,F);return 4294967296*_(D,F+4)+z-4294967296*(z>>31)},s.readUint64LE=function j(D,F){void 0===F&&(F=0);var z=A(D,F);return 4294967296*A(D,F+4)+z},s.writeUint64BE=B,s.writeInt64BE=B,s.writeUint64LE=V,s.writeInt64LE=V,s.readUintBE=function G(D,F,z){if(void 0===z&&(z=0),D%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(D/8>F.length-z)throw new Error("readUintBE: array is too short for the given bitLength");for(var C=0,f=1,k=D/8+z-1;k>=z;k--)C+=F[k]*f,f*=256;return C},s.readUintLE=function W(D,F,z){if(void 0===z&&(z=0),D%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(D/8>F.length-z)throw new Error("readUintLE: array is too short for the given bitLength");for(var C=0,f=1,k=z;k=C;k--)z[k]=F/f&255,f*=256;return z},s.writeUintLE=function q(D,F,z,C){if(void 0===z&&(z=new Uint8Array(D/8)),void 0===C&&(C=0),D%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!h.isSafeInteger(F))throw new Error("writeUintLE value must be an integer");for(var f=1,k=C;k{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var h=p(54502),M=p(69815),w=20;function E(b,S,_){for(var A=1634760805,P=857760878,x=2036477234,T=1797285236,L=_[3]<<24|_[2]<<16|_[1]<<8|_[0],N=_[7]<<24|_[6]<<16|_[5]<<8|_[4],j=_[11]<<24|_[10]<<16|_[9]<<8|_[8],B=_[15]<<24|_[14]<<16|_[13]<<8|_[12],V=_[19]<<24|_[18]<<16|_[17]<<8|_[16],G=_[23]<<24|_[22]<<16|_[21]<<8|_[20],W=_[27]<<24|_[26]<<16|_[25]<<8|_[24],Q=_[31]<<24|_[30]<<16|_[29]<<8|_[28],q=S[3]<<24|S[2]<<16|S[1]<<8|S[0],J=S[7]<<24|S[6]<<16|S[5]<<8|S[4],Z=S[11]<<24|S[10]<<16|S[9]<<8|S[8],ee=S[15]<<24|S[14]<<16|S[13]<<8|S[12],I=A,o=P,a=x,d=T,g=L,D=N,F=j,z=B,C=V,f=G,k=W,se=Q,te=q,oe=J,de=Z,Ie=ee,ye=0;ye>>16|te<<16)|0)>>>20|g<<12,D=(D^=f=f+(oe=(oe^=o=o+D|0)>>>16|oe<<16)|0)>>>20|D<<12,F=(F^=k=k+(de=(de^=a=a+F|0)>>>16|de<<16)|0)>>>20|F<<12,z=(z^=se=se+(Ie=(Ie^=d=d+z|0)>>>16|Ie<<16)|0)>>>20|z<<12,F=(F^=k=k+(de=(de^=a=a+F|0)>>>24|de<<8)|0)>>>25|F<<7,z=(z^=se=se+(Ie=(Ie^=d=d+z|0)>>>24|Ie<<8)|0)>>>25|z<<7,D=(D^=f=f+(oe=(oe^=o=o+D|0)>>>24|oe<<8)|0)>>>25|D<<7,g=(g^=C=C+(te=(te^=I=I+g|0)>>>24|te<<8)|0)>>>25|g<<7,D=(D^=k=k+(Ie=(Ie^=I=I+D|0)>>>16|Ie<<16)|0)>>>20|D<<12,F=(F^=se=se+(te=(te^=o=o+F|0)>>>16|te<<16)|0)>>>20|F<<12,z=(z^=C=C+(oe=(oe^=a=a+z|0)>>>16|oe<<16)|0)>>>20|z<<12,g=(g^=f=f+(de=(de^=d=d+g|0)>>>16|de<<16)|0)>>>20|g<<12,z=(z^=C=C+(oe=(oe^=a=a+z|0)>>>24|oe<<8)|0)>>>25|z<<7,g=(g^=f=f+(de=(de^=d=d+g|0)>>>24|de<<8)|0)>>>25|g<<7,F=(F^=se=se+(te=(te^=o=o+F|0)>>>24|te<<8)|0)>>>25|F<<7,D=(D^=k=k+(Ie=(Ie^=I=I+D|0)>>>24|Ie<<8)|0)>>>25|D<<7;h.writeUint32LE(I+A|0,b,0),h.writeUint32LE(o+P|0,b,4),h.writeUint32LE(a+x|0,b,8),h.writeUint32LE(d+T|0,b,12),h.writeUint32LE(g+L|0,b,16),h.writeUint32LE(D+N|0,b,20),h.writeUint32LE(F+j|0,b,24),h.writeUint32LE(z+B|0,b,28),h.writeUint32LE(C+V|0,b,32),h.writeUint32LE(f+G|0,b,36),h.writeUint32LE(k+W|0,b,40),h.writeUint32LE(se+Q|0,b,44),h.writeUint32LE(te+q|0,b,48),h.writeUint32LE(oe+J|0,b,52),h.writeUint32LE(de+Z|0,b,56),h.writeUint32LE(Ie+ee|0,b,60)}function l(b,S,_,A,P){if(void 0===P&&(P=0),32!==b.length)throw new Error("ChaCha: key size must be 32 bytes");if(A.length<_.length)throw new Error("ChaCha: destination is shorter than source");var x,T;if(0===P){if(8!==S.length&&12!==S.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");T=(x=new Uint8Array(16)).length-S.length,x.set(S,T)}else{if(16!==S.length)throw new Error("ChaCha nonce with counter must be 16 bytes");x=S,T=P}for(var L=new Uint8Array(64),N=0;N<_.length;N+=64){E(L,x,b);for(var j=N;j>>=8,S++;if(A>0)throw new Error("ChaCha: counter overflow")}s.streamXOR=l,s.stream=function m(b,S,_,A){return void 0===A&&(A=0),M.wipe(_),l(b,S,_,_,A)}},95876:(ne,s,p)=>{"use strict";var M=p(4484),w=p(60314),E=p(69815),l=p(54502),m=p(19976);s.Cv=32,s.WH=12,s.pg=16;var y=new Uint8Array(16),b=function(){function S(_){if(this.nonceLength=s.WH,this.tagLength=s.pg,_.length!==s.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(_)}return S.prototype.seal=function(_,A,P,x){if(_.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var T=new Uint8Array(16);T.set(_,T.length-_.length);var L=new Uint8Array(32);M.stream(this._key,T,L,4);var j,N=A.length+this.tagLength;if(x){if(x.length!==N)throw new Error("ChaCha20Poly1305: incorrect destination length");j=x}else j=new Uint8Array(N);return M.streamXOR(this._key,T,A,j,4),this._authenticate(j.subarray(j.length-this.tagLength,j.length),L,j.subarray(0,j.length-this.tagLength),P),E.wipe(T),j},S.prototype.open=function(_,A,P,x){if(_.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(A.length0&&T.update(y.subarray(x.length%16))),T.update(P),P.length%16>0&&T.update(y.subarray(P.length%16));var L=new Uint8Array(8);x&&l.writeUint64LE(x.length,L),T.update(L),l.writeUint64LE(P.length,L),T.update(L);for(var N=T.digest(),j=0;j{"use strict";function M(E,l){if(E.length!==l.length)return 0;for(var m=0,y=0;y>>8}Object.defineProperty(s,"__esModule",{value:!0}),s.select=function p(E,l,m){return~(E-1)&l|E-1&m},s.lessOrEqual=function h(E,l){return(0|E)-(0|l)-1>>>31&1},s.compare=M,s.equal=function w(E,l){return 0!==E.length&&0!==l.length&&0!==M(E,l)}},65553:(ne,s,p)=>{"use strict";var M=p(5784),w=p(86375),E=p(69815);function l(ve){var ae=new Float64Array(16);if(ve)for(var fe=0;fe>16&1),fe[Se-1]&=65535;fe[15]=pe[15]-32767-(fe[14]>>16&1);var be=fe[15]>>16&1;fe[14]&=65535,N(pe,fe,1-be)}for(Se=0;Se<16;Se++)ve[2*Se]=255&pe[Se],ve[2*Se+1]=pe[Se]>>8}function B(ve,ae){for(var fe=0,pe=0;pe<32;pe++)fe|=ve[pe]^ae[pe];return(1&fe-1>>>8)-1}function V(ve,ae){var fe=new Uint8Array(32),pe=new Uint8Array(32);return j(fe,ve),j(pe,ae),B(fe,pe)}function G(ve){var ae=new Uint8Array(32);return j(ae,ve),1&ae[0]}function Q(ve,ae,fe){for(var pe=0;pe<16;pe++)ve[pe]=ae[pe]+fe[pe]}function q(ve,ae,fe){for(var pe=0;pe<16;pe++)ve[pe]=ae[pe]-fe[pe]}function J(ve,ae,fe){var pe,Se,ce=0,be=0,Ne=0,Fe=0,lt=0,Ge=0,He=0,Kt=0,tt=0,nt=0,Vt=0,ot=0,at=0,Gt=0,Re=0,Ae=0,Te=0,Be=0,Ve=0,mt=0,Ze=0,ct=0,hn=0,ft=0,At=0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pe/65536)),be=(pe=be+Se+65535)-65536*(Se=Math.floor(pe/65536)),Ne=(pe=Ne+Se+65535)-65536*(Se=Math.floor(pe/65536)),Fe=(pe=Fe+Se+65535)-65536*(Se=Math.floor(pe/65536)),lt=(pe=lt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Ge=(pe=Ge+Se+65535)-65536*(Se=Math.floor(pe/65536)),He=(pe=He+Se+65535)-65536*(Se=Math.floor(pe/65536)),Kt=(pe=Kt+Se+65535)-65536*(Se=Math.floor(pe/65536)),tt=(pe=tt+Se+65535)-65536*(Se=Math.floor(pe/65536)),nt=(pe=nt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Vt=(pe=Vt+Se+65535)-65536*(Se=Math.floor(pe/65536)),ot=(pe=ot+Se+65535)-65536*(Se=Math.floor(pe/65536)),at=(pe=at+Se+65535)-65536*(Se=Math.floor(pe/65536)),Gt=(pe=Gt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Re=(pe=Re+Se+65535)-65536*(Se=Math.floor(pe/65536)),Ae=(pe=Ae+Se+65535)-65536*(Se=Math.floor(pe/65536)),ce=(pe=(ce+=Se-1+37*(Se-1))+(Se=1)+65535)-65536*(Se=Math.floor(pe/65536)),be=(pe=be+Se+65535)-65536*(Se=Math.floor(pe/65536)),Ne=(pe=Ne+Se+65535)-65536*(Se=Math.floor(pe/65536)),Fe=(pe=Fe+Se+65535)-65536*(Se=Math.floor(pe/65536)),lt=(pe=lt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Ge=(pe=Ge+Se+65535)-65536*(Se=Math.floor(pe/65536)),He=(pe=He+Se+65535)-65536*(Se=Math.floor(pe/65536)),Kt=(pe=Kt+Se+65535)-65536*(Se=Math.floor(pe/65536)),tt=(pe=tt+Se+65535)-65536*(Se=Math.floor(pe/65536)),nt=(pe=nt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Vt=(pe=Vt+Se+65535)-65536*(Se=Math.floor(pe/65536)),ot=(pe=ot+Se+65535)-65536*(Se=Math.floor(pe/65536)),at=(pe=at+Se+65535)-65536*(Se=Math.floor(pe/65536)),Gt=(pe=Gt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Re=(pe=Re+Se+65535)-65536*(Se=Math.floor(pe/65536)),Ae=(pe=Ae+Se+65535)-65536*(Se=Math.floor(pe/65536)),ce+=Se-1+37*(Se-1),ve[0]=ce,ve[1]=be,ve[2]=Ne,ve[3]=Fe,ve[4]=lt,ve[5]=Ge,ve[6]=He,ve[7]=Kt,ve[8]=tt,ve[9]=nt,ve[10]=Vt,ve[11]=ot,ve[12]=at,ve[13]=Gt,ve[14]=Re,ve[15]=Ae}function Z(ve,ae){J(ve,ae,ae)}function ee(ve,ae){var pe,fe=l();for(pe=0;pe<16;pe++)fe[pe]=ae[pe];for(pe=253;pe>=0;pe--)Z(fe,fe),2!==pe&&4!==pe&&J(fe,fe,ae);for(pe=0;pe<16;pe++)ve[pe]=fe[pe]}function o(ve,ae){var fe=l(),pe=l(),Se=l(),ce=l(),be=l(),Ne=l(),Fe=l(),lt=l(),Ge=l();q(fe,ve[1],ve[0]),q(Ge,ae[1],ae[0]),J(fe,fe,Ge),Q(pe,ve[0],ve[1]),Q(Ge,ae[0],ae[1]),J(pe,pe,Ge),J(Se,ve[3],ae[3]),J(Se,Se,_),J(ce,ve[2],ae[2]),Q(ce,ce,ce),q(be,pe,fe),q(Ne,ce,Se),Q(Fe,ce,Se),Q(lt,pe,fe),J(ve[0],be,Ne),J(ve[1],lt,Fe),J(ve[2],Fe,Ne),J(ve[3],be,lt)}function a(ve,ae,fe){for(var pe=0;pe<4;pe++)N(ve[pe],ae[pe],fe)}function d(ve,ae){var fe=l(),pe=l(),Se=l();ee(Se,ae[2]),J(fe,ae[0],Se),J(pe,ae[1],Se),j(ve,pe),ve[31]^=G(fe)<<7}function g(ve,ae,fe){T(ve[0],y),T(ve[1],b),T(ve[2],b),T(ve[3],y);for(var pe=255;pe>=0;--pe){var Se=fe[pe/8|0]>>(7&pe)&1;a(ve,ae,Se),o(ae,ve),o(ve,ve),a(ve,ae,Se)}}function D(ve,ae){var fe=[l(),l(),l(),l()];T(fe[0],A),T(fe[1],P),T(fe[2],b),J(fe[3],A,P),g(ve,fe,ae)}function F(ve){if(ve.length!==s.aP)throw new Error("ed25519: seed must be "+s.aP+" bytes");var ae=w.hash(ve);ae[0]&=248,ae[31]&=127,ae[31]|=64;var fe=new Uint8Array(32),pe=[l(),l(),l(),l()];D(pe,ae),d(fe,pe);var Se=new Uint8Array(64);return Se.set(ve),Se.set(fe,32),{publicKey:fe,secretKey:Se}}s._w=F;var f=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function k(ve,ae){var fe,pe,Se,ce;for(pe=63;pe>=32;--pe){for(fe=0,Se=pe-32,ce=pe-12;Se>4)*f[Se],fe=ae[Se]>>8,ae[Se]&=255;for(Se=0;Se<32;Se++)ae[Se]-=fe*f[Se];for(pe=0;pe<32;pe++)ae[pe+1]+=ae[pe]>>8,ve[pe]=255&ae[pe]}function se(ve){for(var ae=new Float64Array(64),fe=0;fe<64;fe++)ae[fe]=ve[fe];for(fe=0;fe<64;fe++)ve[fe]=0;k(ve,ae)}function oe(ve,ae){var fe=l(),pe=l(),Se=l(),ce=l(),be=l(),Ne=l(),Fe=l();return T(ve[2],b),function W(ve,ae){for(var fe=0;fe<16;fe++)ve[fe]=ae[2*fe]+(ae[2*fe+1]<<8);ve[15]&=32767}(ve[1],ae),Z(Se,ve[1]),J(ce,Se,S),q(Se,Se,ve[2]),Q(ce,ve[2],ce),Z(be,ce),Z(Ne,be),J(Fe,Ne,be),J(fe,Fe,Se),J(fe,fe,ce),function I(ve,ae){var pe,fe=l();for(pe=0;pe<16;pe++)fe[pe]=ae[pe];for(pe=250;pe>=0;pe--)Z(fe,fe),1!==pe&&J(fe,fe,ae);for(pe=0;pe<16;pe++)ve[pe]=fe[pe]}(fe,fe),J(fe,fe,Se),J(fe,fe,ce),J(fe,fe,ce),J(ve[0],fe,ce),Z(pe,ve[0]),J(pe,pe,ce),V(pe,Se)&&J(ve[0],ve[0],x),Z(pe,ve[0]),J(pe,pe,ce),V(pe,Se)?-1:(G(ve[0])===ae[31]>>7&&q(ve[0],y,ve[0]),J(ve[3],ve[0],ve[1]),0)}s.Xx=function te(ve,ae){var fe=new Float64Array(64),pe=[l(),l(),l(),l()],Se=w.hash(ve.subarray(0,32));Se[0]&=248,Se[31]&=127,Se[31]|=64;var ce=new Uint8Array(64);ce.set(Se.subarray(32),32);var be=new w.SHA512;be.update(ce.subarray(32)),be.update(ae);var Ne=be.digest();be.clean(),se(Ne),D(pe,Ne),d(ce,pe),be.reset(),be.update(ce.subarray(0,32)),be.update(ve.subarray(32)),be.update(ae);var Fe=be.digest();se(Fe);for(var lt=0;lt<32;lt++)fe[lt]=Ne[lt];for(lt=0;lt<32;lt++)for(var Ge=0;Ge<32;Ge++)fe[lt+Ge]+=Fe[lt]*Se[Ge];return k(ce.subarray(32),fe),ce}},35571:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.isSerializableHash=function p(h){return typeof h.saveState<"u"&&typeof h.restoreState<"u"&&typeof h.cleanSavedState<"u"}},85705:(ne,s,p)=>{"use strict";var M=p(54193),w=p(69815),E=function(){function l(m,y,b,S){void 0===b&&(b=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=m,this._info=S;var _=M.hmac(this._hash,b,y);this._hmac=new M.HMAC(m,_),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return l.prototype._fillBuffer=function(){this._counter[0]++;var m=this._counter[0];if(0===m)throw new Error("hkdf: cannot expand more");this._hmac.reset(),m>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},l.prototype.expand=function(m){for(var y=new Uint8Array(m),b=0;b{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var h=p(35571),M=p(19976),w=p(69815),E=function(){function m(y,b){this._finished=!1,this._inner=new y,this._outer=new y,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var S=new Uint8Array(this.blockSize);b.length>this.blockSize?this._inner.update(b).finish(S).clean():S.set(b);for(var _=0;_{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.mul=Math.imul||function p(m,y){var S=65535&m,A=65535&y;return S*A+((m>>>16&65535)*A+S*(y>>>16&65535)<<16>>>0)|0},s.add=function h(m,y){return m+y|0},s.sub=function M(m,y){return m-y|0},s.rotl=function w(m,y){return m<>>32-y},s.rotr=function E(m,y){return m<<32-y|m>>>y},s.isInteger=Number.isInteger||function l(m){return"number"==typeof m&&isFinite(m)&&Math.floor(m)===m},s.MAX_SAFE_INTEGER=9007199254740991,s.isSafeInteger=function(m){return s.isInteger(m)&&m>=-s.MAX_SAFE_INTEGER&&m<=s.MAX_SAFE_INTEGER}},60314:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var h=p(19976),M=p(69815);s.DIGEST_LENGTH=16;var w=function(){function m(y){this.digestLength=s.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var b=y[0]|y[1]<<8;this._r[0]=8191&b;var S=y[2]|y[3]<<8;this._r[1]=8191&(b>>>13|S<<3);var _=y[4]|y[5]<<8;this._r[2]=7939&(S>>>10|_<<6);var A=y[6]|y[7]<<8;this._r[3]=8191&(_>>>7|A<<9);var P=y[8]|y[9]<<8;this._r[4]=255&(A>>>4|P<<12),this._r[5]=P>>>1&8190;var x=y[10]|y[11]<<8;this._r[6]=8191&(P>>>14|x<<2);var T=y[12]|y[13]<<8;this._r[7]=8065&(x>>>11|T<<5);var L=y[14]|y[15]<<8;this._r[8]=8191&(T>>>8|L<<8),this._r[9]=L>>>5&127,this._pad[0]=y[16]|y[17]<<8,this._pad[1]=y[18]|y[19]<<8,this._pad[2]=y[20]|y[21]<<8,this._pad[3]=y[22]|y[23]<<8,this._pad[4]=y[24]|y[25]<<8,this._pad[5]=y[26]|y[27]<<8,this._pad[6]=y[28]|y[29]<<8,this._pad[7]=y[30]|y[31]<<8}return m.prototype._blocks=function(y,b,S){for(var _=this._fin?0:2048,A=this._h[0],P=this._h[1],x=this._h[2],T=this._h[3],L=this._h[4],N=this._h[5],j=this._h[6],B=this._h[7],V=this._h[8],G=this._h[9],W=this._r[0],Q=this._r[1],q=this._r[2],J=this._r[3],Z=this._r[4],ee=this._r[5],I=this._r[6],o=this._r[7],a=this._r[8],d=this._r[9];S>=16;){var g=y[b+0]|y[b+1]<<8;A+=8191&g;var D=y[b+2]|y[b+3]<<8;P+=8191&(g>>>13|D<<3);var F=y[b+4]|y[b+5]<<8;x+=8191&(D>>>10|F<<6);var z=y[b+6]|y[b+7]<<8;T+=8191&(F>>>7|z<<9);var C=y[b+8]|y[b+9]<<8;L+=8191&(z>>>4|C<<12),N+=C>>>1&8191;var f=y[b+10]|y[b+11]<<8;j+=8191&(C>>>14|f<<2);var k=y[b+12]|y[b+13]<<8;B+=8191&(f>>>11|k<<5);var se=y[b+14]|y[b+15]<<8,te=0,oe=te;oe+=A*W,oe+=P*(5*d),oe+=x*(5*a),oe+=T*(5*o),te=(oe+=L*(5*I))>>>13,oe&=8191,oe+=N*(5*ee),oe+=j*(5*Z),oe+=B*(5*J),oe+=(V+=8191&(k>>>8|se<<8))*(5*q);var de=te+=(oe+=(G+=se>>>5|_)*(5*Q))>>>13;de+=A*Q,de+=P*W,de+=x*(5*d),de+=T*(5*a),te=(de+=L*(5*o))>>>13,de&=8191,de+=N*(5*I),de+=j*(5*ee),de+=B*(5*Z),de+=V*(5*J),te+=(de+=G*(5*q))>>>13,de&=8191;var Ie=te;Ie+=A*q,Ie+=P*Q,Ie+=x*W,Ie+=T*(5*d),te=(Ie+=L*(5*a))>>>13,Ie&=8191,Ie+=N*(5*o),Ie+=j*(5*I),Ie+=B*(5*ee),Ie+=V*(5*Z);var ye=te+=(Ie+=G*(5*J))>>>13;ye+=A*J,ye+=P*q,ye+=x*Q,ye+=T*W,te=(ye+=L*(5*d))>>>13,ye&=8191,ye+=N*(5*a),ye+=j*(5*o),ye+=B*(5*I),ye+=V*(5*ee);var ve=te+=(ye+=G*(5*Z))>>>13;ve+=A*Z,ve+=P*J,ve+=x*q,ve+=T*Q,te=(ve+=L*W)>>>13,ve&=8191,ve+=N*(5*d),ve+=j*(5*a),ve+=B*(5*o),ve+=V*(5*I);var ae=te+=(ve+=G*(5*ee))>>>13;ae+=A*ee,ae+=P*Z,ae+=x*J,ae+=T*q,te=(ae+=L*Q)>>>13,ae&=8191,ae+=N*W,ae+=j*(5*d),ae+=B*(5*a),ae+=V*(5*o);var fe=te+=(ae+=G*(5*I))>>>13;fe+=A*I,fe+=P*ee,fe+=x*Z,fe+=T*J,te=(fe+=L*q)>>>13,fe&=8191,fe+=N*Q,fe+=j*W,fe+=B*(5*d),fe+=V*(5*a);var pe=te+=(fe+=G*(5*o))>>>13;pe+=A*o,pe+=P*I,pe+=x*ee,pe+=T*Z,te=(pe+=L*J)>>>13,pe&=8191,pe+=N*q,pe+=j*Q,pe+=B*W,pe+=V*(5*d);var Se=te+=(pe+=G*(5*a))>>>13;Se+=A*a,Se+=P*o,Se+=x*I,Se+=T*ee,te=(Se+=L*Z)>>>13,Se&=8191,Se+=N*J,Se+=j*q,Se+=B*Q,Se+=V*W;var ce=te+=(Se+=G*(5*d))>>>13;ce+=A*d,ce+=P*a,ce+=x*o,ce+=T*I,te=(ce+=L*ee)>>>13,ce&=8191,ce+=N*Z,ce+=j*J,ce+=B*q,ce+=V*Q,A=oe=8191&(te=(te=((te+=(ce+=G*W)>>>13)<<2)+te|0)+(oe&=8191)|0),P=de+=te>>>=13,x=Ie&=8191,T=ye&=8191,L=ve&=8191,N=ae&=8191,j=fe&=8191,B=pe&=8191,V=Se&=8191,G=ce&=8191,b+=16,S-=16}this._h[0]=A,this._h[1]=P,this._h[2]=x,this._h[3]=T,this._h[4]=L,this._h[5]=N,this._h[6]=j,this._h[7]=B,this._h[8]=V,this._h[9]=G},m.prototype.finish=function(y,b){void 0===b&&(b=0);var _,A,P,x,S=new Uint16Array(10);if(this._leftover){for(x=this._leftover,this._buffer[x++]=1;x<16;x++)this._buffer[x]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(_=this._h[1]>>>13,this._h[1]&=8191,x=2;x<10;x++)this._h[x]+=_,_=this._h[x]>>>13,this._h[x]&=8191;for(this._h[0]+=5*_,_=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=_,_=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=_,S[0]=this._h[0]+5,_=S[0]>>>13,S[0]&=8191,x=1;x<10;x++)S[x]=this._h[x]+_,_=S[x]>>>13,S[x]&=8191;for(S[9]-=8192,A=(1^_)-1,x=0;x<10;x++)S[x]&=A;for(A=~A,x=0;x<10;x++)this._h[x]=this._h[x]&A|S[x];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),P=this._h[0]+this._pad[0],this._h[0]=65535&P,x=1;x<8;x++)P=(this._h[x]+this._pad[x]|0)+(P>>>16)|0,this._h[x]=65535&P;return y[b+0]=this._h[0]>>>0,y[b+1]=this._h[0]>>>8,y[b+2]=this._h[1]>>>0,y[b+3]=this._h[1]>>>8,y[b+4]=this._h[2]>>>0,y[b+5]=this._h[2]>>>8,y[b+6]=this._h[3]>>>0,y[b+7]=this._h[3]>>>8,y[b+8]=this._h[4]>>>0,y[b+9]=this._h[4]>>>8,y[b+10]=this._h[5]>>>0,y[b+11]=this._h[5]>>>8,y[b+12]=this._h[6]>>>0,y[b+13]=this._h[6]>>>8,y[b+14]=this._h[7]>>>0,y[b+15]=this._h[7]>>>8,this._finished=!0,this},m.prototype.update=function(y){var _,b=0,S=y.length;if(this._leftover){(_=16-this._leftover)>S&&(_=S);for(var A=0;A<_;A++)this._buffer[this._leftover+A]=y[b+A];if(S-=_,b+=_,this._leftover+=_,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(S>=16&&(_=S-S%16,this._blocks(y,b,_),b+=_,S-=_),S){for(A=0;A{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var h=p(59753),M=p(54502),w=p(69815);function E(S,_){return void 0===_&&(_=s.defaultRandomSource),_.randomBytes(S)}s.defaultRandomSource=new h.SystemRandomSource,s.randomBytes=E,s.randomUint32=function l(S){void 0===S&&(S=s.defaultRandomSource);var _=E(4,S),A=M.readUint32LE(_);return w.wipe(_),A};var m="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function y(S,_,A){if(void 0===_&&(_=m),void 0===A&&(A=s.defaultRandomSource),_.length<2)throw new Error("randomString charset is too short");if(_.length>256)throw new Error("randomString charset is too long");for(var P="",x=_.length,T=256-256%x;S>0;){for(var L=E(Math.ceil(256*S/T),A),N=0;N0;N++){var j=L[N];j{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var h=function(){function M(){this.isAvailable=!1,this.isInstantiated=!1;var w=typeof self<"u"?self.crypto||self.msCrypto:null;w&&w.getRandomValues&&(this._crypto=w,this.isAvailable=!0,this.isInstantiated=!0)}return M.prototype.randomBytes=function(w){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");for(var E=new Uint8Array(w),l=0;l{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var h=p(69815),M=function(){function w(){this.isAvailable=!1,this.isInstantiated=!1;var E=p(41348);E&&E.randomBytes&&(this._crypto=E,this.isAvailable=!0,this.isInstantiated=!0)}return w.prototype.randomBytes=function(E){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");var l=this._crypto.randomBytes(E);if(l.length!==E)throw new Error("NodeRandomSource: got fewer bytes than requested");for(var m=new Uint8Array(E),y=0;y{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var h=p(77170),M=p(1382),w=function(){function E(){return this.isAvailable=!1,this.name="",this._source=new h.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new M.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}return E.prototype.randomBytes=function(l){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(l)},E}();s.SystemRandomSource=w},10893:(ne,s,p)=>{"use strict";var M=p(54502),w=p(69815);s.k=32,s.cn=64;var E=function(){function b(){this.digestLength=s.k,this.blockSize=s.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return b.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},b.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},b.prototype.clean=function(){w.wipe(this._buffer),w.wipe(this._temp),this.reset()},b.prototype.update=function(S,_){if(void 0===_&&(_=S.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var A=0;if(this._bytesHashed+=_,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=S[A++],_--;this._bufferLength===this.blockSize&&(m(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(_>=this.blockSize&&(A=m(this._temp,this._state,S,A,_),_%=this.blockSize);_>0;)this._buffer[this._bufferLength++]=S[A++],_--;return this},b.prototype.finish=function(S){if(!this._finished){var _=this._bytesHashed,A=this._bufferLength,P=_/536870912|0,x=_<<3,T=_%64<56?64:128;this._buffer[A]=128;for(var L=A+1;L0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},b.prototype.restoreState=function(S){return this._state.set(S.state),this._bufferLength=S.bufferLength,S.buffer&&this._buffer.set(S.buffer),this._bytesHashed=S.bytesHashed,this._finished=!1,this},b.prototype.cleanSavedState=function(S){w.wipe(S.state),S.buffer&&w.wipe(S.buffer),S.bufferLength=0,S.bytesHashed=0},b}();s.mE=E;var l=new Int32Array([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(b,S,_,A,P){for(;P>=64;){for(var x=S[0],T=S[1],L=S[2],N=S[3],j=S[4],B=S[5],V=S[6],G=S[7],W=0;W<16;W++){var Q=A+4*W;b[W]=M.readUint32BE(_,Q)}for(W=16;W<64;W++){var q=b[W-2],J=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,Z=((q=b[W-15])>>>7|q<<25)^(q>>>18|q<<14)^q>>>3;b[W]=(J+b[W-7]|0)+(Z+b[W-16]|0)}for(W=0;W<64;W++){J=(((j>>>6|j<<26)^(j>>>11|j<<21)^(j>>>25|j<<7))+(j&B^~j&V)|0)+(G+(l[W]+b[W]|0)|0)|0,Z=((x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10))+(x&T^x&L^T&L)|0;G=V,V=B,B=j,j=N+J|0,N=L,L=T,T=x,x=J+Z|0}S[0]+=x,S[1]+=T,S[2]+=L,S[3]+=N,S[4]+=j,S[5]+=B,S[6]+=V,S[7]+=G,A+=64,P-=64}return A}s.vp=function y(b){var S=new E;S.update(b);var _=S.digest();return S.clean(),_}},86375:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var h=p(54502),M=p(69815);s.DIGEST_LENGTH=64,s.BLOCK_SIZE=128;var w=function(){function y(){this.digestLength=s.DIGEST_LENGTH,this.blockSize=s.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return y.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},y.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},y.prototype.clean=function(){M.wipe(this._buffer),M.wipe(this._tempHi),M.wipe(this._tempLo),this.reset()},y.prototype.update=function(b,S){if(void 0===S&&(S=b.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var _=0;if(this._bytesHashed+=S,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=b[_++],S--;this._bufferLength===this.blockSize&&(l(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(S>=this.blockSize&&(_=l(this._tempHi,this._tempLo,this._stateHi,this._stateLo,b,_,S),S%=this.blockSize);S>0;)this._buffer[this._bufferLength++]=b[_++],S--;return this},y.prototype.finish=function(b){if(!this._finished){var S=this._bytesHashed,_=this._bufferLength,A=S/536870912|0,P=S<<3,x=S%128<112?128:256;this._buffer[_]=128;for(var T=_+1;T0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},y.prototype.restoreState=function(b){return this._stateHi.set(b.stateHi),this._stateLo.set(b.stateLo),this._bufferLength=b.bufferLength,b.buffer&&this._buffer.set(b.buffer),this._bytesHashed=b.bytesHashed,this._finished=!1,this},y.prototype.cleanSavedState=function(b){M.wipe(b.stateHi),M.wipe(b.stateLo),b.buffer&&M.wipe(b.buffer),b.bufferLength=0,b.bytesHashed=0},y}();s.SHA512=w;var E=new Int32Array([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 l(y,b,S,_,A,P,x){for(var d,g,D,F,z,C,f,k,T=S[0],L=S[1],N=S[2],j=S[3],B=S[4],V=S[5],G=S[6],W=S[7],Q=_[0],q=_[1],J=_[2],Z=_[3],ee=_[4],I=_[5],o=_[6],a=_[7];x>=128;){for(var se=0;se<16;se++){var te=8*se+P;y[se]=h.readUint32BE(A,te),b[se]=h.readUint32BE(A,te+4)}for(se=0;se<80;se++){var pe,He,oe=T,de=L,Ie=N,ye=j,ve=B,ae=V,fe=G,Se=Q,ce=q,be=J,Ne=Z,Fe=ee,lt=I,Ge=o;if(z=65535&(g=a),C=g>>>16,f=65535&(d=W),k=d>>>16,z+=65535&(g=(ee>>>14|B<<18)^(ee>>>18|B<<14)^(B>>>9|ee<<23)),C+=g>>>16,f+=65535&(d=(B>>>14|ee<<18)^(B>>>18|ee<<14)^(ee>>>9|B<<23)),k+=d>>>16,z+=65535&(g=ee&I^~ee&o),C+=g>>>16,f+=65535&(d=B&V^~B&G),k+=d>>>16,d=E[2*se],z+=65535&(g=E[2*se+1]),C+=g>>>16,f+=65535&d,k+=d>>>16,d=y[se%16],C+=(g=b[se%16])>>>16,f+=65535&d,k+=d>>>16,f+=(C+=(z+=65535&g)>>>16)>>>16,z=65535&(g=F=65535&z|C<<16),C=g>>>16,f=65535&(d=D=65535&f|(k+=f>>>16)<<16),k=d>>>16,z+=65535&(g=(Q>>>28|T<<4)^(T>>>2|Q<<30)^(T>>>7|Q<<25)),C+=g>>>16,f+=65535&(d=(T>>>28|Q<<4)^(Q>>>2|T<<30)^(Q>>>7|T<<25)),k+=d>>>16,C+=(g=Q&q^Q&J^q&J)>>>16,f+=65535&(d=T&L^T&N^L&N),k+=d>>>16,pe=65535&(f+=(C+=(z+=65535&g)>>>16)>>>16)|(k+=f>>>16)<<16,He=65535&z|C<<16,z=65535&(g=Ne),C=g>>>16,f=65535&(d=ye),k=d>>>16,C+=(g=F)>>>16,f+=65535&(d=D),k+=d>>>16,L=oe,N=de,j=Ie,B=ye=65535&(f+=(C+=(z+=65535&g)>>>16)>>>16)|(k+=f>>>16)<<16,V=ve,G=ae,W=fe,T=pe,q=Se,J=ce,Z=be,ee=Ne=65535&z|C<<16,I=Fe,o=lt,a=Ge,Q=He,se%16==15)for(te=0;te<16;te++)d=y[te],z=65535&(g=b[te]),C=g>>>16,f=65535&d,k=d>>>16,d=y[(te+9)%16],z+=65535&(g=b[(te+9)%16]),C+=g>>>16,f+=65535&d,k+=d>>>16,D=y[(te+1)%16],z+=65535&(g=((F=b[(te+1)%16])>>>1|D<<31)^(F>>>8|D<<24)^(F>>>7|D<<25)),C+=g>>>16,f+=65535&(d=(D>>>1|F<<31)^(D>>>8|F<<24)^D>>>7),k+=d>>>16,D=y[(te+14)%16],C+=(g=((F=b[(te+14)%16])>>>19|D<<13)^(D>>>29|F<<3)^(F>>>6|D<<26))>>>16,f+=65535&(d=(D>>>19|F<<13)^(F>>>29|D<<3)^D>>>6),k+=d>>>16,k+=(f+=(C+=(z+=65535&g)>>>16)>>>16)>>>16,y[te]=65535&f|k<<16,b[te]=65535&z|C<<16}z=65535&(g=Q),C=g>>>16,f=65535&(d=T),k=d>>>16,d=S[0],C+=(g=_[0])>>>16,f+=65535&d,k+=d>>>16,k+=(f+=(C+=(z+=65535&g)>>>16)>>>16)>>>16,S[0]=T=65535&f|k<<16,_[0]=Q=65535&z|C<<16,z=65535&(g=q),C=g>>>16,f=65535&(d=L),k=d>>>16,d=S[1],C+=(g=_[1])>>>16,f+=65535&d,k+=d>>>16,k+=(f+=(C+=(z+=65535&g)>>>16)>>>16)>>>16,S[1]=L=65535&f|k<<16,_[1]=q=65535&z|C<<16,z=65535&(g=J),C=g>>>16,f=65535&(d=N),k=d>>>16,d=S[2],C+=(g=_[2])>>>16,f+=65535&d,k+=d>>>16,k+=(f+=(C+=(z+=65535&g)>>>16)>>>16)>>>16,S[2]=N=65535&f|k<<16,_[2]=J=65535&z|C<<16,z=65535&(g=Z),C=g>>>16,f=65535&(d=j),k=d>>>16,d=S[3],C+=(g=_[3])>>>16,f+=65535&d,k+=d>>>16,k+=(f+=(C+=(z+=65535&g)>>>16)>>>16)>>>16,S[3]=j=65535&f|k<<16,_[3]=Z=65535&z|C<<16,z=65535&(g=ee),C=g>>>16,f=65535&(d=B),k=d>>>16,d=S[4],C+=(g=_[4])>>>16,f+=65535&d,k+=d>>>16,k+=(f+=(C+=(z+=65535&g)>>>16)>>>16)>>>16,S[4]=B=65535&f|k<<16,_[4]=ee=65535&z|C<<16,z=65535&(g=I),C=g>>>16,f=65535&(d=V),k=d>>>16,d=S[5],C+=(g=_[5])>>>16,f+=65535&d,k+=d>>>16,k+=(f+=(C+=(z+=65535&g)>>>16)>>>16)>>>16,S[5]=V=65535&f|k<<16,_[5]=I=65535&z|C<<16,z=65535&(g=o),C=g>>>16,f=65535&(d=G),k=d>>>16,d=S[6],C+=(g=_[6])>>>16,f+=65535&d,k+=d>>>16,k+=(f+=(C+=(z+=65535&g)>>>16)>>>16)>>>16,S[6]=G=65535&f|k<<16,_[6]=o=65535&z|C<<16,z=65535&(g=a),C=g>>>16,f=65535&(d=W),k=d>>>16,d=S[7],C+=(g=_[7])>>>16,f+=65535&d,k+=d>>>16,k+=(f+=(C+=(z+=65535&g)>>>16)>>>16)>>>16,S[7]=W=65535&f|k<<16,_[7]=a=65535&z|C<<16,P+=128,x-=128}return P}s.hash=function m(y){var b=new w;b.update(y);var S=b.digest();return b.clean(),S}},69815:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.wipe=function p(h){for(var M=0;M{"use strict";s.gi=s.Au=s.KS=s.kz=void 0;const M=p(52579),w=p(69815);function E(W){const Q=new Float64Array(16);if(W)for(let q=0;q=0;--z){const C=q[z>>>3]>>>(7&z)&1;b(Z,ee,C),b(I,o,C),A(a,Z,I),P(Z,Z,I),A(I,ee,o),P(ee,ee,o),T(o,a),T(d,Z),x(Z,I,Z),x(I,ee,a),A(a,Z,I),P(Z,Z,I),T(ee,Z),P(I,o,d),x(Z,I,m),A(Z,Z,o),x(I,I,Z),x(Z,o,d),x(o,ee,J),T(ee,a),b(Z,ee,C),b(I,o,C)}for(let z=0;z<16;z++)J[z+16]=Z[z],J[z+32]=I[z],J[z+48]=ee[z],J[z+64]=o[z];const g=J.subarray(32),D=J.subarray(16);(function L(W,Q){const q=E();for(let J=0;J<16;J++)q[J]=Q[J];for(let J=253;J>=0;J--)T(q,q),2!==J&&4!==J&&x(q,q,Q);for(let J=0;J<16;J++)W[J]=q[J]})(g,g),x(D,D,g);const F=new Uint8Array(32);return function S(W,Q){const q=E(),J=E();for(let Z=0;Z<16;Z++)J[Z]=Q[Z];y(J),y(J),y(J);for(let Z=0;Z<2;Z++){q[0]=J[0]-65517;for(let I=1;I<15;I++)q[I]=J[I]-65535-(q[I-1]>>16&1),q[I-1]&=65535;q[15]=J[15]-32767-(q[14]>>16&1);const ee=q[15]>>16&1;q[14]&=65535,b(J,q,1-ee)}for(let Z=0;Z<16;Z++)W[2*Z]=255&J[Z],W[2*Z+1]=J[Z]>>8}(F,D),F}function j(W){return N(W,l)}function B(W){if(W.length!==s.KS)throw new Error(`x25519: seed must be ${s.KS} bytes`);const Q=new Uint8Array(W);return{publicKey:j(Q),secretKey:Q}}s.Au=function V(W){const Q=(0,M.randomBytes)(32,W),q=B(Q);return(0,w.wipe)(Q),q},s.gi=function G(W,Q,q=!1){if(W.length!==s.kz)throw new Error("X25519: incorrect secret key length");if(Q.length!==s.kz)throw new Error("X25519: incorrect public key length");const J=N(W,Q);if(q){let Z=0;for(let ee=0;ee{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.randomStringForEntropy=s.randomString=s.randomUint32=s.randomBytes=s.defaultRandomSource=void 0;const h=p(65615),M=p(54502),w=p(69815);function E(S,_=s.defaultRandomSource){return _.randomBytes(S)}s.defaultRandomSource=new h.SystemRandomSource,s.randomBytes=E,s.randomUint32=function l(S=s.defaultRandomSource){const _=E(4,S),A=(0,M.readUint32LE)(_);return(0,w.wipe)(_),A};const m="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function y(S,_=m,A=s.defaultRandomSource){if(_.length<2)throw new Error("randomString charset is too short");if(_.length>256)throw new Error("randomString charset is too long");let P="";const x=_.length,T=256-256%x;for(;S>0;){const L=E(Math.ceil(256*S/T),A);for(let N=0;N0;N++){const j=L[N];j{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserRandomSource=void 0;s.BrowserRandomSource=class h{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const w=typeof self<"u"?self.crypto||self.msCrypto:null;w&&void 0!==w.getRandomValues&&(this._crypto=w,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(w){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const E=new Uint8Array(w);for(let l=0;l{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.NodeRandomSource=void 0;const h=p(69815);s.NodeRandomSource=class M{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const E=p(41348);E&&E.randomBytes&&(this._crypto=E,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(E){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let l=this._crypto.randomBytes(E);if(l.length!==E)throw new Error("NodeRandomSource: got fewer bytes than requested");const m=new Uint8Array(E);for(let y=0;y{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SystemRandomSource=void 0;const h=p(72773),M=p(5447);s.SystemRandomSource=class w{constructor(){return this.isAvailable=!1,this.name="",this._source=new h.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new M.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(l){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(l)}}},31688:(ne,s)=>{"use strict";function p(){return(null==global?void 0:global.crypto)||(null==global?void 0:global.msCrypto)||{}}function h(){const w=p();return w.subtle||w.webkitSubtle}Object.defineProperty(s,"__esModule",{value:!0}),s.isBrowserCryptoAvailable=s.getSubtleCrypto=s.getBrowerCrypto=void 0,s.getBrowerCrypto=p,s.getSubtleCrypto=h,s.isBrowserCryptoAvailable=function M(){return!!p()&&!!h()}},32220:(ne,s)=>{"use strict";function p(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function h(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Object.defineProperty(s,"__esModule",{value:!0}),s.isBrowser=s.isNode=s.isReactNative=void 0,s.isReactNative=p,s.isNode=h,s.isBrowser=function M(){return!p()&&!h()}},71948:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(34308);h.__exportStar(p(31688),s),h.__exportStar(p(32220),s)},42092:(ne,s,p)=>{"use strict";p.d(s,{q:()=>h});class h{}},1252:(ne,s,p)=>{"use strict";p.r(s),p.d(s,{IEvents:()=>h.q});var h=p(42092)},63510:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.HEARTBEAT_EVENTS=s.HEARTBEAT_INTERVAL=void 0;const h=p(43961);s.HEARTBEAT_INTERVAL=h.FIVE_SECONDS,s.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},46844:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),p(39653).__exportStar(p(63510),s)},72271:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.HeartBeat=void 0;const h=p(39653),M=p(59069),w=p(43961),E=p(76925),l=p(46844);class m extends E.IHeartBeat{constructor(b){super(b),this.events=new M.EventEmitter,this.interval=l.HEARTBEAT_INTERVAL,this.interval=b?.interval||l.HEARTBEAT_INTERVAL}static init(b){return h.__awaiter(this,void 0,void 0,function*(){const S=new m(b);return yield S.init(),S})}init(){return h.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(b,S){this.events.on(b,S)}once(b,S){this.events.once(b,S)}off(b,S){this.events.off(b,S)}removeListener(b,S){this.events.removeListener(b,S)}initialize(){return h.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),w.toMiliseconds(this.interval))})}pulse(){this.events.emit(l.HEARTBEAT_EVENTS.pulse)}}s.HeartBeat=m},72062:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(39653);h.__exportStar(p(72271),s),h.__exportStar(p(76925),s),h.__exportStar(p(46844),s)},88891:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.IHeartBeat=void 0;const h=p(1252);class M extends h.IEvents{constructor(E){super()}}s.IHeartBeat=M},76925:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),p(39653).__exportStar(p(88891),s)},25504:ne=>{"use strict";ne.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},46499:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.PINO_CUSTOM_CONTEXT_KEY=s.PINO_LOGGER_DEFAULTS=void 0,s.PINO_LOGGER_DEFAULTS={level:"info"},s.PINO_CUSTOM_CONTEXT_KEY="custom_context"},83767:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.pino=void 0;const h=p(57121),M=h.__importDefault(p(28544));Object.defineProperty(s,"pino",{enumerable:!0,get:function(){return M.default}}),h.__exportStar(p(46499),s),h.__exportStar(p(96873),s)},96873:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.generateChildLogger=s.formatChildLoggerContext=s.getLoggerContext=s.setBrowserLoggerContext=s.getBrowserLoggerContext=s.getDefaultLoggerOptions=void 0;const h=p(46499);function w(b,S=h.PINO_CUSTOM_CONTEXT_KEY){return b[S]||""}function E(b,S,_=h.PINO_CUSTOM_CONTEXT_KEY){return b[_]=S,b}function l(b,S=h.PINO_CUSTOM_CONTEXT_KEY){let _="";return _=typeof b.bindings>"u"?w(b,S):b.bindings().context||"",_}function m(b,S,_=h.PINO_CUSTOM_CONTEXT_KEY){const A=l(b,_);return A.trim()?`${A}/${S}`:S}s.getDefaultLoggerOptions=function M(b){return Object.assign(Object.assign({},b),{level:b?.level||h.PINO_LOGGER_DEFAULTS.level})},s.getBrowserLoggerContext=w,s.setBrowserLoggerContext=E,s.getLoggerContext=l,s.formatChildLoggerContext=m,s.generateChildLogger=function y(b,S,_=h.PINO_CUSTOM_CONTEXT_KEY){const A=m(b,S,_);return E(b.child({context:A}),A,_)}},62079:()=>{},6375:()=>{},86205:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(30004);h.__exportStar(p(20725),s),h.__exportStar(p(48562),s)},20725:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ONE_THOUSAND=s.ONE_HUNDRED=void 0,s.ONE_HUNDRED=100,s.ONE_THOUSAND=1e3},48562:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ONE_YEAR=s.FOUR_WEEKS=s.THREE_WEEKS=s.TWO_WEEKS=s.ONE_WEEK=s.THIRTY_DAYS=s.SEVEN_DAYS=s.FIVE_DAYS=s.THREE_DAYS=s.ONE_DAY=s.TWENTY_FOUR_HOURS=s.TWELVE_HOURS=s.SIX_HOURS=s.THREE_HOURS=s.ONE_HOUR=s.SIXTY_MINUTES=s.THIRTY_MINUTES=s.TEN_MINUTES=s.FIVE_MINUTES=s.ONE_MINUTE=s.SIXTY_SECONDS=s.THIRTY_SECONDS=s.TEN_SECONDS=s.FIVE_SECONDS=s.ONE_SECOND=void 0,s.ONE_SECOND=1,s.FIVE_SECONDS=5,s.TEN_SECONDS=10,s.THIRTY_SECONDS=30,s.SIXTY_SECONDS=60,s.ONE_MINUTE=s.SIXTY_SECONDS,s.FIVE_MINUTES=5*s.ONE_MINUTE,s.TEN_MINUTES=10*s.ONE_MINUTE,s.THIRTY_MINUTES=30*s.ONE_MINUTE,s.SIXTY_MINUTES=60*s.ONE_MINUTE,s.ONE_HOUR=s.SIXTY_MINUTES,s.THREE_HOURS=3*s.ONE_HOUR,s.SIX_HOURS=6*s.ONE_HOUR,s.TWELVE_HOURS=12*s.ONE_HOUR,s.TWENTY_FOUR_HOURS=24*s.ONE_HOUR,s.ONE_DAY=s.TWENTY_FOUR_HOURS,s.THREE_DAYS=3*s.ONE_DAY,s.FIVE_DAYS=5*s.ONE_DAY,s.SEVEN_DAYS=7*s.ONE_DAY,s.THIRTY_DAYS=30*s.ONE_DAY,s.ONE_WEEK=s.SEVEN_DAYS,s.TWO_WEEKS=2*s.ONE_WEEK,s.THREE_WEEKS=3*s.ONE_WEEK,s.FOUR_WEEKS=4*s.ONE_WEEK,s.ONE_YEAR=365*s.ONE_DAY},43961:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(30004);h.__exportStar(p(64497),s),h.__exportStar(p(63509),s),h.__exportStar(p(43622),s),h.__exportStar(p(86205),s)},43622:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),p(30004).__exportStar(p(99761),s)},99761:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.IWatch=void 0;s.IWatch=class p{}},88784:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.fromMiliseconds=s.toMiliseconds=void 0;const h=p(86205);s.toMiliseconds=function M(E){return E*h.ONE_THOUSAND},s.fromMiliseconds=function w(E){return Math.floor(E/h.ONE_THOUSAND)}},77657:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.delay=void 0,s.delay=function p(h){return new Promise(M=>{setTimeout(()=>{M(!0)},h)})}},64497:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(30004);h.__exportStar(p(77657),s),h.__exportStar(p(88784),s)},63509:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Watch=void 0;class p{constructor(){this.timestamps=new Map}start(M){if(this.timestamps.has(M))throw new Error(`Watch already started for label: ${M}`);this.timestamps.set(M,{started:Date.now()})}stop(M){const w=this.get(M);if(typeof w.elapsed<"u")throw new Error(`Watch already stopped for label: ${M}`);const E=Date.now()-w.started;this.timestamps.set(M,{started:w.started,elapsed:E})}get(M){const w=this.timestamps.get(M);if(typeof w>"u")throw new Error(`No timestamp found for label: ${M}`);return w}elapsed(M){const w=this.get(M);return w.elapsed||Date.now()-w.started}}s.Watch=p,s.default=p},10976:(ne,s,p)=>{"use strict";s.O6=s.hf=void 0;const M=p(85639),w=p(54502),E=p(69815);function l(_,A=s.hf){return A.randomBytes(_)}s.hf=new M.SystemRandomSource,s.O6=l;const y="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function b(_,A=y,P=s.hf){if(A.length<2)throw new Error("randomString charset is too short");if(A.length>256)throw new Error("randomString charset is too long");let x="";const T=A.length,L=256-256%T;for(;_>0;){const N=l(Math.ceil(256*_/L),P);for(let j=0;j0;j++){const B=N[j];B{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserRandomSource=void 0;s.BrowserRandomSource=class h{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const w=typeof self<"u"?self.crypto||self.msCrypto:null;w&&void 0!==w.getRandomValues&&(this._crypto=w,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(w){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const E=new Uint8Array(w);for(let l=0;l{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.NodeRandomSource=void 0;const h=p(69815);s.NodeRandomSource=class M{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const E=p(41348);E&&E.randomBytes&&(this._crypto=E,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(E){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let l=this._crypto.randomBytes(E);if(l.length!==E)throw new Error("NodeRandomSource: got fewer bytes than requested");const m=new Uint8Array(E);for(let y=0;y{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SystemRandomSource=void 0;const h=p(38459),M=p(41981);s.SystemRandomSource=class w{constructor(){return this.isAvailable=!1,this.name="",this._source=new h.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new M.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(l){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(l)}}},6499:(ne,s)=>{"use strict";function p(P){let x;return typeof window<"u"&&typeof window[P]<"u"&&(x=window[P]),x}function h(P){const x=p(P);if(!x)throw new Error(`${P} is not defined in Window`);return x}Object.defineProperty(s,"__esModule",{value:!0}),s.getLocalStorage=s.getLocalStorageOrThrow=s.getCrypto=s.getCryptoOrThrow=s.getLocation=s.getLocationOrThrow=s.getNavigator=s.getNavigatorOrThrow=s.getDocument=s.getDocumentOrThrow=s.getFromWindowOrThrow=s.getFromWindow=void 0,s.getFromWindow=p,s.getFromWindowOrThrow=h,s.getDocumentOrThrow=function M(){return h("document")},s.getDocument=function w(){return p("document")},s.getNavigatorOrThrow=function E(){return h("navigator")},s.getNavigator=function l(){return p("navigator")},s.getLocationOrThrow=function m(){return h("location")},s.getLocation=function y(){return p("location")},s.getCryptoOrThrow=function b(){return h("crypto")},s.getCrypto=function S(){return p("crypto")},s.getLocalStorageOrThrow=function _(){return h("localStorage")},s.getLocalStorage=function A(){return p("localStorage")}},30543:(ne,s,p)=>{"use strict";s.D=void 0;const M=p(6499);s.D=function w(){let E,l;try{E=M.getDocumentOrThrow(),l=M.getLocationOrThrow()}catch{return null}function y(...L){const N=E.getElementsByTagName("meta");for(let j=0;jB.getAttribute(G)).filter(G=>!!G&&L.includes(G));if(V.length&&V){const G=B.getAttribute("content");if(G)return G}}return""}const _=function b(){let L=y("name","og:site_name","og:title","twitter:title");return L||(L=E.title),L}();return{description:function S(){return y("description","og:description","twitter:description","keywords")}(),url:l.origin,icons:function m(){const L=E.getElementsByTagName("link"),N=[];for(let j=0;j-1){const G=B.getAttribute("href");if(G)if(-1===G.toLowerCase().indexOf("https:")&&-1===G.toLowerCase().indexOf("http:")&&0!==G.indexOf("//")){let W=l.protocol+"//"+l.host;if(0===G.indexOf("/"))W+=G;else{const Q=l.pathname.split("/");Q.pop();W+=Q.join("/")+"/"+G}N.push(W)}else if(0===G.indexOf("//")){const W=l.protocol+G;N.push(W)}else N.push(G)}}return N}(),name:_}}},88599:ne=>{function s(p){this._db=p,this._operations=[],this._written=!1}s.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},s.prototype.put=function(p,h){this._checkWritten();var M=this._db._checkKeyValue(p,"key",this._db._isBuffer);if(M||(M=this._db._checkKeyValue(h,"value",this._db._isBuffer)))throw M;return this._db._isBuffer(p)||(p=String(p)),this._db._isBuffer(h)||(h=String(h)),"function"==typeof this._put?this._put(p,h):this._operations.push({type:"put",key:p,value:h}),this},s.prototype.del=function(p){this._checkWritten();var h=this._db._checkKeyValue(p,"key",this._db._isBuffer);if(h)throw h;return this._db._isBuffer(p)||(p=String(p)),"function"==typeof this._del?this._del(p):this._operations.push({type:"del",key:p}),this},s.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},s.prototype.write=function(p,h){if(this._checkWritten(),"function"==typeof p&&(h=p),"function"!=typeof h)throw new Error("write() requires a callback argument");return"object"!=typeof p&&(p={}),this._written=!0,"function"==typeof this._write?this._write(h):"function"==typeof this._db._batch?this._db._batch(this._operations,p,h):void process.nextTick(h)},ne.exports=s},14968:ne=>{function s(p){this.db=p,this._ended=!1,this._nexting=!1}s.prototype.next=function(p){var h=this;if("function"!=typeof p)throw new Error("next() requires a callback argument");return h._ended?p(new Error("cannot call next() after end()")):h._nexting?p(new Error("cannot call next() before previous next() has completed")):(h._nexting=!0,"function"==typeof h._next?h._next(function(){h._nexting=!1,p.apply(null,arguments)}):void process.nextTick(function(){h._nexting=!1,p()}))},s.prototype.end=function(p){if("function"!=typeof p)throw new Error("end() requires a callback argument");return this._ended?p(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(p):void process.nextTick(p))},ne.exports=s},30826:(ne,s,p)=>{var M=p(78677),w=p(14968),E=p(88599);function l(m){if(!arguments.length||void 0===m)throw new Error("constructor requires at least a location argument");if("string"!=typeof m)throw new Error("constructor requires a location string argument");this.location=m}l.prototype.open=function(m,y){if("function"==typeof m&&(y=m),"function"!=typeof y)throw new Error("open() requires a callback argument");if("object"!=typeof m&&(m={}),"function"==typeof this._open)return this._open(m,y);process.nextTick(y)},l.prototype.close=function(m){if("function"!=typeof m)throw new Error("close() requires a callback argument");if("function"==typeof this._close)return this._close(m);process.nextTick(m)},l.prototype.get=function(m,y,b){var S;if("function"==typeof y&&(b=y),"function"!=typeof b)throw new Error("get() requires a callback argument");return(S=this._checkKeyValue(m,"key",this._isBuffer))?b(S):(this._isBuffer(m)||(m=String(m)),"object"!=typeof y&&(y={}),"function"==typeof this._get?this._get(m,y,b):void process.nextTick(function(){b(new Error("NotFound"))}))},l.prototype.put=function(m,y,b,S){var _;if("function"==typeof b&&(S=b),"function"!=typeof S)throw new Error("put() requires a callback argument");return(_=this._checkKeyValue(m,"key",this._isBuffer))||(_=this._checkKeyValue(y,"value",this._isBuffer))?S(_):(this._isBuffer(m)||(m=String(m)),!this._isBuffer(y)&&!process.browser&&(y=String(y)),"object"!=typeof b&&(b={}),"function"==typeof this._put?this._put(m,y,b,S):void process.nextTick(S))},l.prototype.del=function(m,y,b){var S;if("function"==typeof y&&(b=y),"function"!=typeof b)throw new Error("del() requires a callback argument");return(S=this._checkKeyValue(m,"key",this._isBuffer))?b(S):(this._isBuffer(m)||(m=String(m)),"object"!=typeof y&&(y={}),"function"==typeof this._del?this._del(m,y,b):void process.nextTick(b))},l.prototype.batch=function(m,y,b){if(!arguments.length)return this._chainedBatch();if("function"==typeof y&&(b=y),"function"!=typeof b)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(m))return b(new Error("batch(array) requires an array argument"));"object"!=typeof y&&(y={});for(var A,P,S=0,_=m.length;S<_;S++)if("object"==typeof(A=m[S])&&((P=this._checkKeyValue(A.type,"type",this._isBuffer))||(P=this._checkKeyValue(A.key,"key",this._isBuffer))||"put"==A.type&&(P=this._checkKeyValue(A.value,"value",this._isBuffer))))return b(P);if("function"==typeof this._batch)return this._batch(m,y,b);process.nextTick(b)},l.prototype.approximateSize=function(m,y,b){if(null==m||null==y||"function"==typeof m||"function"==typeof y)throw new Error("approximateSize() requires valid `start`, `end` and `callback` arguments");if("function"!=typeof b)throw new Error("approximateSize() requires a callback argument");if(this._isBuffer(m)||(m=String(m)),this._isBuffer(y)||(y=String(y)),"function"==typeof this._approximateSize)return this._approximateSize(m,y,b);process.nextTick(function(){b(null,0)})},l.prototype._setupIteratorOptions=function(m){var y=this;return m=M(m),["start","end","gt","gte","lt","lte"].forEach(function(b){m[b]&&y._isBuffer(m[b])&&0===m[b].length&&delete m[b]}),m.reverse=!!m.reverse,m.reverse&&m.lt&&(m.start=m.lt),m.reverse&&m.lte&&(m.start=m.lte),!m.reverse&&m.gt&&(m.start=m.gt),!m.reverse&&m.gte&&(m.start=m.gte),(m.reverse&&m.lt&&!m.lte||!m.reverse&&m.gt&&!m.gte)&&(m.exclusiveStart=!0),m},l.prototype.iterator=function(m){return"object"!=typeof m&&(m={}),m=this._setupIteratorOptions(m),"function"==typeof this._iterator?this._iterator(m):new w(this)},l.prototype._chainedBatch=function(){return new E(this)},l.prototype._isBuffer=function(m){return Buffer.isBuffer(m)},l.prototype._checkKeyValue=function(m,y){if(null==m)return new Error(y+" cannot be `null` or `undefined`");if(this._isBuffer(m)){if(0===m.length)return new Error(y+" cannot be an empty Buffer")}else if(""===String(m))return new Error(y+" cannot be an empty String")},ne.exports.NI=l,ne.exports.YI=w},35180:(ne,s)=>{"use strict";function p(J,Z){return{validate:J,compare:Z}}Object.defineProperty(s,"__esModule",{value:!0}),s.formatNames=s.fastFormats=s.fullFormats=void 0,s.fullFormats={date:p(E,l),time:p(y,b),"date-time":p(function _(J){const Z=J.split(S);return 2===Z.length&&E(Z[0])&&y(Z[1],!0)},A),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function T(J){return P.test(J)&&x.test(J)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d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2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function q(J){if(Q.test(J))return!1;try{return new RegExp(J),!0}catch{return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function N(J){return L.lastIndex=0,L.test(J)},int32:{type:"number",validate:function V(J){return Number.isInteger(J)&&J<=B&&J>=j}},int64:{type:"number",validate:function G(J){return Number.isInteger(J)}},float:{type:"number",validate:W},double:{type:"number",validate:W},password:!0,binary:!0},s.fastFormats={...s.fullFormats,date:p(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:p(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),"date-time":p(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,A),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},s.formatNames=Object.keys(s.fullFormats);const M=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,w=[0,31,28,31,30,31,30,31,31,30,31,30,31];function E(J){const Z=M.exec(J);if(!Z)return!1;const ee=+Z[1],I=+Z[2],o=+Z[3];return I>=1&&I<=12&&o>=1&&o<=(2===I&&function h(J){return J%4==0&&(J%100!=0||J%400==0)}(ee)?29:w[I])}function l(J,Z){if(J&&Z)return J>Z?1:J(Z=I[1]+I[2]+I[3]+(I[4]||""))?1:J{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(35180),M=p(65413),w=p(56382),E=new w.Name("fullFormats"),l=new w.Name("fastFormats"),m=(b,S={keywords:!0})=>{if(Array.isArray(S))return y(b,S,h.fullFormats,E),b;const[_,A]="fast"===S.mode?[h.fastFormats,l]:[h.fullFormats,E];return y(b,S.formats||h.formatNames,_,A),S.keywords&&M.default(b),b};function y(b,S,_,A){var P,x;null!==(P=(x=b.opts.code).formats)&&void 0!==P||(x.formats=w._`require("ajv-formats/dist/formats").${A}`);for(const T of S)b.addFormat(T,_[T])}m.get=(b,S="full")=>{const A=("fast"===S?h.fastFormats:h.fullFormats)[b];if(!A)throw new Error(`Unknown format "${b}"`);return A},ne.exports=s=m,Object.defineProperty(s,"__esModule",{value:!0}),s.default=m},65413:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.formatLimitDefinition=void 0;const h=p(74411),M=p(56382),w=M.operators,E={formatMaximum:{okStr:"<=",ok:w.LTE,fail:w.GT},formatMinimum:{okStr:">=",ok:w.GTE,fail:w.LT},formatExclusiveMaximum:{okStr:"<",ok:w.LT,fail:w.GTE},formatExclusiveMinimum:{okStr:">",ok:w.GT,fail:w.LTE}},l={message:({keyword:y,schemaCode:b})=>M.str`should be ${E[y].okStr} ${b}`,params:({keyword:y,schemaCode:b})=>M._`{comparison: ${E[y].okStr}, limit: ${b}}`};s.formatLimitDefinition={keyword:Object.keys(E),type:"string",schemaType:"string",$data:!0,error:l,code(y){const{gen:b,data:S,schemaCode:_,keyword:A,it:P}=y,{opts:x,self:T}=P;if(!x.validateFormats)return;const L=new h.KeywordCxt(P,T.RULES.all.format.definition,"format");function B(V){return M._`${V}.compare(${S}, ${_}) ${E[A].fail} 0`}L.$data?function N(){const V=b.scopeValue("formats",{ref:T.formats,code:x.code.formats}),G=b.const("fmt",M._`${V}[${L.schemaCode}]`);y.fail$data(M.or(M._`typeof ${G} != "object"`,M._`${G} instanceof RegExp`,M._`typeof ${G}.compare != "function"`,B(G)))}():function j(){const V=L.schema,G=T.formats[V];if(!G||!0===G)return;if("object"!=typeof G||G instanceof RegExp||"function"!=typeof G.compare)throw new Error(`"${A}": format "${V}" does not define "compare" function`);const W=b.scopeValue("formats",{key:V,ref:G,code:x.code.formats?M._`${x.code.formats}${M.getProperty(V)}`:void 0});y.fail$data(B(W))}()},dependencies:["format"]};s.default=y=>(y.addKeyword(s.formatLimitDefinition),y)},74411:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MissingRefError=s.ValidationError=s.CodeGen=s.Name=s.nil=s.stringify=s.str=s._=s.KeywordCxt=void 0;const h=p(25910),M=p(77032),w=p(81849),E=p(98),l=["/properties"],m="http://json-schema.org/draft-07/schema";class y extends h.default{_addVocabularies(){super._addVocabularies(),M.default.forEach(x=>this.addVocabulary(x)),this.opts.discriminator&&this.addKeyword(w.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const x=this.opts.$data?this.$dataMetaSchema(E,l):E;this.addMetaSchema(x,m,!1),this.refs["http://json-schema.org/schema"]=m}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(m)?m:void 0)}}ne.exports=s=y,Object.defineProperty(s,"__esModule",{value:!0}),s.default=y;var b=p(66764);Object.defineProperty(s,"KeywordCxt",{enumerable:!0,get:function(){return b.KeywordCxt}});var S=p(56382);Object.defineProperty(s,"_",{enumerable:!0,get:function(){return S._}}),Object.defineProperty(s,"str",{enumerable:!0,get:function(){return S.str}}),Object.defineProperty(s,"stringify",{enumerable:!0,get:function(){return S.stringify}}),Object.defineProperty(s,"nil",{enumerable:!0,get:function(){return S.nil}}),Object.defineProperty(s,"Name",{enumerable:!0,get:function(){return S.Name}}),Object.defineProperty(s,"CodeGen",{enumerable:!0,get:function(){return S.CodeGen}});var _=p(20496);Object.defineProperty(s,"ValidationError",{enumerable:!0,get:function(){return _.default}});var A=p(80140);Object.defineProperty(s,"MissingRefError",{enumerable:!0,get:function(){return A.default}})},26295:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.regexpCode=s.getEsmExportName=s.getProperty=s.safeStringify=s.stringify=s.strConcat=s.addCodeArg=s.str=s._=s.nil=s._Code=s.Name=s.IDENTIFIER=s._CodeOrName=void 0;class p{}s._CodeOrName=p,s.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class h extends p{constructor(j){if(super(),!s.IDENTIFIER.test(j))throw new Error("CodeGen: name must be a valid identifier");this.str=j}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}s.Name=h;class M extends p{constructor(j){super(),this._items="string"==typeof j?[j]:j}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const j=this._items[0];return""===j||'""'===j}get str(){var j;return null!==(j=this._str)&&void 0!==j?j:this._str=this._items.reduce((B,V)=>`${B}${V}`,"")}get names(){var j;return null!==(j=this._names)&&void 0!==j?j:this._names=this._items.reduce((B,V)=>(V instanceof h&&(B[V.str]=(B[V.str]||0)+1),B),{})}}function w(N,...j){const B=[N[0]];let V=0;for(;V{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.or=s.and=s.not=s.CodeGen=s.operators=s.varKinds=s.ValueScopeName=s.ValueScope=s.Scope=s.Name=s.regexpCode=s.stringify=s.getProperty=s.nil=s.strConcat=s.str=s._=void 0;const h=p(26295),M=p(1917);var w=p(26295);Object.defineProperty(s,"_",{enumerable:!0,get:function(){return w._}}),Object.defineProperty(s,"str",{enumerable:!0,get:function(){return w.str}}),Object.defineProperty(s,"strConcat",{enumerable:!0,get:function(){return w.strConcat}}),Object.defineProperty(s,"nil",{enumerable:!0,get:function(){return w.nil}}),Object.defineProperty(s,"getProperty",{enumerable:!0,get:function(){return w.getProperty}}),Object.defineProperty(s,"stringify",{enumerable:!0,get:function(){return w.stringify}}),Object.defineProperty(s,"regexpCode",{enumerable:!0,get:function(){return w.regexpCode}}),Object.defineProperty(s,"Name",{enumerable:!0,get:function(){return w.Name}});var E=p(1917);Object.defineProperty(s,"Scope",{enumerable:!0,get:function(){return E.Scope}}),Object.defineProperty(s,"ValueScope",{enumerable:!0,get:function(){return E.ValueScope}}),Object.defineProperty(s,"ValueScopeName",{enumerable:!0,get:function(){return E.ValueScopeName}}),Object.defineProperty(s,"varKinds",{enumerable:!0,get:function(){return E.varKinds}}),s.operators={GT:new h._Code(">"),GTE:new h._Code(">="),LT:new h._Code("<"),LTE:new h._Code("<="),EQ:new h._Code("==="),NEQ:new h._Code("!=="),NOT:new h._Code("!"),OR:new h._Code("||"),AND:new h._Code("&&"),ADD:new h._Code("+")};class l{optimizeNodes(){return this}optimizeNames(oe,de){return this}}class m extends l{constructor(oe,de,Ie){super(),this.varKind=oe,this.name=de,this.rhs=Ie}render({es5:oe,_n:de}){const Ie=oe?M.varKinds.var:this.varKind,ye=void 0===this.rhs?"":` = ${this.rhs}`;return`${Ie} ${this.name}${ye};`+de}optimizeNames(oe,de){if(oe[this.name.str])return this.rhs&&(this.rhs=d(this.rhs,oe,de)),this}get names(){return this.rhs instanceof h._CodeOrName?this.rhs.names:{}}}class y extends l{constructor(oe,de,Ie){super(),this.lhs=oe,this.rhs=de,this.sideEffects=Ie}render({_n:oe}){return`${this.lhs} = ${this.rhs};`+oe}optimizeNames(oe,de){if(!(this.lhs instanceof h.Name)||oe[this.lhs.str]||this.sideEffects)return this.rhs=d(this.rhs,oe,de),this}get names(){return a(this.lhs instanceof h.Name?{}:{...this.lhs.names},this.rhs)}}class b extends y{constructor(oe,de,Ie,ye){super(oe,Ie,ye),this.op=de}render({_n:oe}){return`${this.lhs} ${this.op}= ${this.rhs};`+oe}}class S extends l{constructor(oe){super(),this.label=oe,this.names={}}render({_n:oe}){return`${this.label}:`+oe}}class _ extends l{constructor(oe){super(),this.label=oe,this.names={}}render({_n:oe}){return`break${this.label?` ${this.label}`:""};`+oe}}class A extends l{constructor(oe){super(),this.error=oe}render({_n:oe}){return`throw ${this.error};`+oe}get names(){return this.error.names}}class P extends l{constructor(oe){super(),this.code=oe}render({_n:oe}){return`${this.code};`+oe}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(oe,de){return this.code=d(this.code,oe,de),this}get names(){return this.code instanceof h._CodeOrName?this.code.names:{}}}class x extends l{constructor(oe=[]){super(),this.nodes=oe}render(oe){return this.nodes.reduce((de,Ie)=>de+Ie.render(oe),"")}optimizeNodes(){const{nodes:oe}=this;let de=oe.length;for(;de--;){const Ie=oe[de].optimizeNodes();Array.isArray(Ie)?oe.splice(de,1,...Ie):Ie?oe[de]=Ie:oe.splice(de,1)}return oe.length>0?this:void 0}optimizeNames(oe,de){const{nodes:Ie}=this;let ye=Ie.length;for(;ye--;){const ve=Ie[ye];ve.optimizeNames(oe,de)||(g(oe,ve.names),Ie.splice(ye,1))}return Ie.length>0?this:void 0}get names(){return this.nodes.reduce((oe,de)=>o(oe,de.names),{})}}class T extends x{render(oe){return"{"+oe._n+super.render(oe)+"}"+oe._n}}class L extends x{}class N extends T{}N.kind="else";class j extends T{constructor(oe,de){super(de),this.condition=oe}render(oe){let de=`if(${this.condition})`+super.render(oe);return this.else&&(de+="else "+this.else.render(oe)),de}optimizeNodes(){super.optimizeNodes();const oe=this.condition;if(!0===oe)return this.nodes;let de=this.else;if(de){const Ie=de.optimizeNodes();de=this.else=Array.isArray(Ie)?new N(Ie):Ie}return de?!1===oe?de instanceof j?de:de.nodes:this.nodes.length?this:new j(D(oe),de instanceof j?[de]:de.nodes):!1!==oe&&this.nodes.length?this:void 0}optimizeNames(oe,de){var Ie;if(this.else=null===(Ie=this.else)||void 0===Ie?void 0:Ie.optimizeNames(oe,de),super.optimizeNames(oe,de)||this.else)return this.condition=d(this.condition,oe,de),this}get names(){const oe=super.names;return a(oe,this.condition),this.else&&o(oe,this.else.names),oe}}j.kind="if";class B extends T{}B.kind="for";class V extends B{constructor(oe){super(),this.iteration=oe}render(oe){return`for(${this.iteration})`+super.render(oe)}optimizeNames(oe,de){if(super.optimizeNames(oe,de))return this.iteration=d(this.iteration,oe,de),this}get names(){return o(super.names,this.iteration.names)}}class G extends B{constructor(oe,de,Ie,ye){super(),this.varKind=oe,this.name=de,this.from=Ie,this.to=ye}render(oe){const de=oe.es5?M.varKinds.var:this.varKind,{name:Ie,from:ye,to:ve}=this;return`for(${de} ${Ie}=${ye}; ${Ie}<${ve}; ${Ie}++)`+super.render(oe)}get names(){const oe=a(super.names,this.from);return a(oe,this.to)}}class W extends B{constructor(oe,de,Ie,ye){super(),this.loop=oe,this.varKind=de,this.name=Ie,this.iterable=ye}render(oe){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(oe)}optimizeNames(oe,de){if(super.optimizeNames(oe,de))return this.iterable=d(this.iterable,oe,de),this}get names(){return o(super.names,this.iterable.names)}}class Q extends T{constructor(oe,de,Ie){super(),this.name=oe,this.args=de,this.async=Ie}render(oe){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(oe)}}Q.kind="func";class q extends x{render(oe){return"return "+super.render(oe)}}q.kind="return";class J extends T{render(oe){let de="try"+super.render(oe);return this.catch&&(de+=this.catch.render(oe)),this.finally&&(de+=this.finally.render(oe)),de}optimizeNodes(){var oe,de;return super.optimizeNodes(),null===(oe=this.catch)||void 0===oe||oe.optimizeNodes(),null===(de=this.finally)||void 0===de||de.optimizeNodes(),this}optimizeNames(oe,de){var Ie,ye;return super.optimizeNames(oe,de),null===(Ie=this.catch)||void 0===Ie||Ie.optimizeNames(oe,de),null===(ye=this.finally)||void 0===ye||ye.optimizeNames(oe,de),this}get names(){const oe=super.names;return this.catch&&o(oe,this.catch.names),this.finally&&o(oe,this.finally.names),oe}}class Z extends T{constructor(oe){super(),this.error=oe}render(oe){return`catch(${this.error})`+super.render(oe)}}Z.kind="catch";class ee extends T{render(oe){return"finally"+super.render(oe)}}ee.kind="finally";function o(te,oe){for(const de in oe)te[de]=(te[de]||0)+(oe[de]||0);return te}function a(te,oe){return oe instanceof h._CodeOrName?o(te,oe.names):te}function d(te,oe,de){return te instanceof h.Name?Ie(te):function ye(ve){return ve instanceof h._Code&&ve._items.some(ae=>ae instanceof h.Name&&1===oe[ae.str]&&void 0!==de[ae.str])}(te)?new h._Code(te._items.reduce((ve,ae)=>(ae instanceof h.Name&&(ae=Ie(ae)),ae instanceof h._Code?ve.push(...ae._items):ve.push(ae),ve),[])):te;function Ie(ve){const ae=de[ve.str];return void 0===ae||1!==oe[ve.str]?ve:(delete oe[ve.str],ae)}}function g(te,oe){for(const de in oe)te[de]=(te[de]||0)-(oe[de]||0)}function D(te){return"boolean"==typeof te||"number"==typeof te||null===te?!te:h._`!${se(te)}`}s.CodeGen=class I{constructor(oe,de={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...de,_n:de.lines?"\n":""},this._extScope=oe,this._scope=new M.Scope({parent:oe}),this._nodes=[new L]}toString(){return this._root.render(this.opts)}name(oe){return this._scope.name(oe)}scopeName(oe){return this._extScope.name(oe)}scopeValue(oe,de){const Ie=this._extScope.value(oe,de);return(this._values[Ie.prefix]||(this._values[Ie.prefix]=new Set)).add(Ie),Ie}getScopeValue(oe,de){return this._extScope.getValue(oe,de)}scopeRefs(oe){return this._extScope.scopeRefs(oe,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(oe,de,Ie,ye){const ve=this._scope.toName(de);return void 0!==Ie&&ye&&(this._constants[ve.str]=Ie),this._leafNode(new m(oe,ve,Ie)),ve}const(oe,de,Ie){return this._def(M.varKinds.const,oe,de,Ie)}let(oe,de,Ie){return this._def(M.varKinds.let,oe,de,Ie)}var(oe,de,Ie){return this._def(M.varKinds.var,oe,de,Ie)}assign(oe,de,Ie){return this._leafNode(new y(oe,de,Ie))}add(oe,de){return this._leafNode(new b(oe,s.operators.ADD,de))}code(oe){return"function"==typeof oe?oe():oe!==h.nil&&this._leafNode(new P(oe)),this}object(...oe){const de=["{"];for(const[Ie,ye]of oe)de.length>1&&de.push(","),de.push(Ie),(Ie!==ye||this.opts.es5)&&(de.push(":"),(0,h.addCodeArg)(de,ye));return de.push("}"),new h._Code(de)}if(oe,de,Ie){if(this._blockNode(new j(oe)),de&&Ie)this.code(de).else().code(Ie).endIf();else if(de)this.code(de).endIf();else if(Ie)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(oe){return this._elseNode(new j(oe))}else(){return this._elseNode(new N)}endIf(){return this._endBlockNode(j,N)}_for(oe,de){return this._blockNode(oe),de&&this.code(de).endFor(),this}for(oe,de){return this._for(new V(oe),de)}forRange(oe,de,Ie,ye,ve=(this.opts.es5?M.varKinds.var:M.varKinds.let)){const ae=this._scope.toName(oe);return this._for(new G(ve,ae,de,Ie),()=>ye(ae))}forOf(oe,de,Ie,ye=M.varKinds.const){const ve=this._scope.toName(oe);if(this.opts.es5){const ae=de instanceof h.Name?de:this.var("_arr",de);return this.forRange("_i",0,h._`${ae}.length`,fe=>{this.var(ve,h._`${ae}[${fe}]`),Ie(ve)})}return this._for(new W("of",ye,ve,de),()=>Ie(ve))}forIn(oe,de,Ie,ye=(this.opts.es5?M.varKinds.var:M.varKinds.const)){if(this.opts.ownProperties)return this.forOf(oe,h._`Object.keys(${de})`,Ie);const ve=this._scope.toName(oe);return this._for(new W("in",ye,ve,de),()=>Ie(ve))}endFor(){return this._endBlockNode(B)}label(oe){return this._leafNode(new S(oe))}break(oe){return this._leafNode(new _(oe))}return(oe){const de=new q;if(this._blockNode(de),this.code(oe),1!==de.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(q)}try(oe,de,Ie){if(!de&&!Ie)throw new Error('CodeGen: "try" without "catch" and "finally"');const ye=new J;if(this._blockNode(ye),this.code(oe),de){const ve=this.name("e");this._currNode=ye.catch=new Z(ve),de(ve)}return Ie&&(this._currNode=ye.finally=new ee,this.code(Ie)),this._endBlockNode(Z,ee)}throw(oe){return this._leafNode(new A(oe))}block(oe,de){return this._blockStarts.push(this._nodes.length),oe&&this.code(oe).endBlock(de),this}endBlock(oe){const de=this._blockStarts.pop();if(void 0===de)throw new Error("CodeGen: not in self-balancing block");const Ie=this._nodes.length-de;if(Ie<0||void 0!==oe&&Ie!==oe)throw new Error(`CodeGen: wrong number of nodes: ${Ie} vs ${oe} expected`);return this._nodes.length=de,this}func(oe,de=h.nil,Ie,ye){return this._blockNode(new Q(oe,de,Ie)),ye&&this.code(ye).endFunc(),this}endFunc(){return this._endBlockNode(Q)}optimize(oe=1){for(;oe-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(oe){return this._currNode.nodes.push(oe),this}_blockNode(oe){this._currNode.nodes.push(oe),this._nodes.push(oe)}_endBlockNode(oe,de){const Ie=this._currNode;if(Ie instanceof oe||de&&Ie instanceof de)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${de?`${oe.kind}/${de.kind}`:oe.kind}"`)}_elseNode(oe){const de=this._currNode;if(!(de instanceof j))throw new Error('CodeGen: "else" without "if"');return this._currNode=de.else=oe,this}get _root(){return this._nodes[0]}get _currNode(){const oe=this._nodes;return oe[oe.length-1]}set _currNode(oe){const de=this._nodes;de[de.length-1]=oe}},s.not=D;const F=k(s.operators.AND);s.and=function z(...te){return te.reduce(F)};const C=k(s.operators.OR);function k(te){return(oe,de)=>oe===h.nil?de:de===h.nil?oe:h._`${se(oe)} ${te} ${se(de)}`}function se(te){return te instanceof h.Name?te:h._`(${te})`}s.or=function f(...te){return te.reduce(C)}},1917:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ValueScope=s.ValueScopeName=s.Scope=s.varKinds=s.UsedValueState=void 0;const h=p(26295);class M extends Error{constructor(S){super(`CodeGen: "code" for ${S} not defined`),this.value=S.value}}var w,b;(b=w=s.UsedValueState||(s.UsedValueState={}))[b.Started=0]="Started",b[b.Completed=1]="Completed",s.varKinds={const:new h.Name("const"),let:new h.Name("let"),var:new h.Name("var")};class E{constructor({prefixes:S,parent:_}={}){this._names={},this._prefixes=S,this._parent=_}toName(S){return S instanceof h.Name?S:this.name(S)}name(S){return new h.Name(this._newName(S))}_newName(S){return`${S}${(this._names[S]||this._nameGroup(S)).index++}`}_nameGroup(S){var _,A;if(null!==(A=null===(_=this._parent)||void 0===_?void 0:_._prefixes)&&void 0!==A&&A.has(S)||this._prefixes&&!this._prefixes.has(S))throw new Error(`CodeGen: prefix "${S}" is not allowed in this scope`);return this._names[S]={prefix:S,index:0}}}s.Scope=E;class l extends h.Name{constructor(S,_){super(_),this.prefix=S}setValue(S,{property:_,itemIndex:A}){this.value=S,this.scopePath=h._`.${new h.Name(_)}[${A}]`}}s.ValueScopeName=l;const m=h._`\n`;s.ValueScope=class y extends E{constructor(S){super(S),this._values={},this._scope=S.scope,this.opts={...S,_n:S.lines?m:h.nil}}get(){return this._scope}name(S){return new l(S,this._newName(S))}value(S,_){var A;if(void 0===_.ref)throw new Error("CodeGen: ref must be passed in value");const P=this.toName(S),{prefix:x}=P,T=null!==(A=_.key)&&void 0!==A?A:_.ref;let L=this._values[x];if(L){const B=L.get(T);if(B)return B}else L=this._values[x]=new Map;L.set(T,P);const N=this._scope[x]||(this._scope[x]=[]),j=N.length;return N[j]=_.ref,P.setValue(_,{property:x,itemIndex:j}),P}getValue(S,_){const A=this._values[S];if(A)return A.get(_)}scopeRefs(S,_=this._values){return this._reduceValues(_,A=>{if(void 0===A.scopePath)throw new Error(`CodeGen: name "${A}" has no value`);return h._`${S}${A.scopePath}`})}scopeCode(S=this._values,_,A){return this._reduceValues(S,P=>{if(void 0===P.value)throw new Error(`CodeGen: name "${P}" has no value`);return P.value.code},_,A)}_reduceValues(S,_,A={},P){let x=h.nil;for(const T in S){const L=S[T];if(!L)continue;const N=A[T]=A[T]||new Map;L.forEach(j=>{if(N.has(j))return;N.set(j,w.Started);let B=_(j);if(B){const V=this.opts.es5?s.varKinds.var:s.varKinds.const;x=h._`${x}${V} ${j} = ${B};${this.opts._n}`}else{if(!(B=P?.(j)))throw new M(j);x=h._`${x}${B}${this.opts._n}`}N.set(j,w.Completed)})}return x}}},75091:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.extendErrors=s.resetErrorsCount=s.reportExtraError=s.reportError=s.keyword$DataError=s.keywordError=void 0;const h=p(56382),M=p(97990),w=p(5976);function b(N,j){const B=N.const("err",j);N.if(h._`${w.default.vErrors} === null`,()=>N.assign(w.default.vErrors,h._`[${B}]`),h._`${w.default.vErrors}.push(${B})`),N.code(h._`${w.default.errors}++`)}function S(N,j){const{gen:B,validateName:V,schemaEnv:G}=N;G.$async?B.throw(h._`new ${N.ValidationError}(${j})`):(B.assign(h._`${V}.errors`,j),B.return(!1))}s.keywordError={message:({keyword:N})=>h.str`must pass "${N}" keyword validation`},s.keyword$DataError={message:({keyword:N,schemaType:j})=>j?h.str`"${N}" keyword must be ${j} ($data)`:h.str`"${N}" keyword is invalid ($data)`},s.reportError=function E(N,j=s.keywordError,B,V){const{it:G}=N,{gen:W,compositeRule:Q,allErrors:q}=G,J=A(N,j,B);V??(Q||q)?b(W,J):S(G,h._`[${J}]`)},s.reportExtraError=function l(N,j=s.keywordError,B){const{it:V}=N,{gen:G,compositeRule:W,allErrors:Q}=V;b(G,A(N,j,B)),W||Q||S(V,w.default.vErrors)},s.resetErrorsCount=function m(N,j){N.assign(w.default.errors,j),N.if(h._`${w.default.vErrors} !== null`,()=>N.if(j,()=>N.assign(h._`${w.default.vErrors}.length`,j),()=>N.assign(w.default.vErrors,null)))},s.extendErrors=function y({gen:N,keyword:j,schemaValue:B,data:V,errsCount:G,it:W}){if(void 0===G)throw new Error("ajv implementation error");const Q=N.name("err");N.forRange("i",G,w.default.errors,q=>{N.const(Q,h._`${w.default.vErrors}[${q}]`),N.if(h._`${Q}.instancePath === undefined`,()=>N.assign(h._`${Q}.instancePath`,(0,h.strConcat)(w.default.instancePath,W.errorPath))),N.assign(h._`${Q}.schemaPath`,h.str`${W.errSchemaPath}/${j}`),W.opts.verbose&&(N.assign(h._`${Q}.schema`,B),N.assign(h._`${Q}.data`,V))})};const _={keyword:new h.Name("keyword"),schemaPath:new h.Name("schemaPath"),params:new h.Name("params"),propertyName:new h.Name("propertyName"),message:new h.Name("message"),schema:new h.Name("schema"),parentSchema:new h.Name("parentSchema")};function A(N,j,B){const{createErrors:V}=N.it;return!1===V?h._`{}`:function P(N,j,B={}){const{gen:V,it:G}=N,W=[x(G,B),T(N,B)];return function L(N,{params:j,message:B},V){const{keyword:G,data:W,schemaValue:Q,it:q}=N,{opts:J,propertyName:Z,topSchemaRef:ee,schemaPath:I}=q;V.push([_.keyword,G],[_.params,"function"==typeof j?j(N):j||h._`{}`]),J.messages&&V.push([_.message,"function"==typeof B?B(N):B]),J.verbose&&V.push([_.schema,Q],[_.parentSchema,h._`${ee}${I}`],[w.default.data,W]),Z&&V.push([_.propertyName,Z])}(N,j,W),V.object(...W)}(N,j,B)}function x({errorPath:N},{instancePath:j}){const B=j?h.str`${N}${(0,M.getErrorPath)(j,M.Type.Str)}`:N;return[w.default.instancePath,(0,h.strConcat)(w.default.instancePath,B)]}function T({keyword:N,it:{errSchemaPath:j}},{schemaPath:B,parentSchema:V}){let G=V?j:h.str`${j}/${N}`;return B&&(G=h.str`${G}${(0,M.getErrorPath)(B,M.Type.Str)}`),[_.schemaPath,G]}},17140:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.resolveSchema=s.getCompilingSchema=s.resolveRef=s.compileSchema=s.SchemaEnv=void 0;const h=p(56382),M=p(20496),w=p(5976),E=p(31880),l=p(97990),m=p(66764);class y{constructor(B){var V;let G;this.refs={},this.dynamicAnchors={},"object"==typeof B.schema&&(G=B.schema),this.schema=B.schema,this.schemaId=B.schemaId,this.root=B.root||this,this.baseId=null!==(V=B.baseId)&&void 0!==V?V:(0,E.normalizeId)(G?.[B.schemaId||"$id"]),this.schemaPath=B.schemaPath,this.localRefs=B.localRefs,this.meta=B.meta,this.$async=G?.$async,this.refs={}}}function b(j){const B=A.call(this,j);if(B)return B;const V=(0,E.getFullPath)(this.opts.uriResolver,j.root.baseId),{es5:G,lines:W}=this.opts.code,{ownProperties:Q}=this.opts,q=new h.CodeGen(this.scope,{es5:G,lines:W,ownProperties:Q});let J;j.$async&&(J=q.scopeValue("Error",{ref:M.default,code:h._`require("ajv/dist/runtime/validation_error").default`}));const Z=q.scopeName("validate");j.validateName=Z;const ee={gen:q,allErrors:this.opts.allErrors,data:w.default.data,parentData:w.default.parentData,parentDataProperty:w.default.parentDataProperty,dataNames:[w.default.data],dataPathArr:[h.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:q.scopeValue("schema",!0===this.opts.code.source?{ref:j.schema,code:(0,h.stringify)(j.schema)}:{ref:j.schema}),validateName:Z,ValidationError:J,schema:j.schema,schemaEnv:j,rootId:V,baseId:j.baseId||V,schemaPath:h.nil,errSchemaPath:j.schemaPath||(this.opts.jtd?"":"#"),errorPath:h._`""`,opts:this.opts,self:this};let I;try{this._compilations.add(j),(0,m.validateFunctionCode)(ee),q.optimize(this.opts.code.optimize);const o=q.toString();I=`${q.scopeRefs(w.default.scope)}return ${o}`,this.opts.code.process&&(I=this.opts.code.process(I,j));const d=new Function(`${w.default.self}`,`${w.default.scope}`,I)(this,this.scope.get());if(this.scope.value(Z,{ref:d}),d.errors=null,d.schema=j.schema,d.schemaEnv=j,j.$async&&(d.$async=!0),!0===this.opts.code.source&&(d.source={validateName:Z,validateCode:o,scopeValues:q._values}),this.opts.unevaluated){const{props:g,items:D}=ee;d.evaluated={props:g instanceof h.Name?void 0:g,items:D instanceof h.Name?void 0:D,dynamicProps:g instanceof h.Name,dynamicItems:D instanceof h.Name},d.source&&(d.source.evaluated=(0,h.stringify)(d.evaluated))}return j.validate=d,j}catch(o){throw delete j.validate,delete j.validateName,I&&this.logger.error("Error compiling schema, function code:",I),o}finally{this._compilations.delete(j)}}function _(j){return(0,E.inlineRef)(j.schema,this.opts.inlineRefs)?j.schema:j.validate?j:b.call(this,j)}function A(j){for(const B of this._compilations)if(P(B,j))return B}function P(j,B){return j.schema===B.schema&&j.root===B.root&&j.baseId===B.baseId}function x(j,B){let V;for(;"string"==typeof(V=this.refs[B]);)B=V;return V||this.schemas[B]||T.call(this,j,B)}function T(j,B){const V=this.opts.uriResolver.parse(B),G=(0,E._getFullPath)(this.opts.uriResolver,V);let W=(0,E.getFullPath)(this.opts.uriResolver,j.baseId,void 0);if(Object.keys(j.schema).length>0&&G===W)return N.call(this,V,j);const Q=(0,E.normalizeId)(G),q=this.refs[Q]||this.schemas[Q];if("string"==typeof q){const J=T.call(this,j,q);return"object"!=typeof J?.schema?void 0:N.call(this,V,J)}if("object"==typeof q?.schema){if(q.validate||b.call(this,q),Q===(0,E.normalizeId)(B)){const{schema:J}=q,{schemaId:Z}=this.opts,ee=J[Z];return ee&&(W=(0,E.resolveUrl)(this.opts.uriResolver,W,ee)),new y({schema:J,schemaId:Z,root:j,baseId:W})}return N.call(this,V,q)}}s.SchemaEnv=y,s.compileSchema=b,s.resolveRef=function S(j,B,V){var G;V=(0,E.resolveUrl)(this.opts.uriResolver,B,V);const W=j.refs[V];if(W)return W;let Q=x.call(this,j,V);if(void 0===Q){const q=null===(G=j.localRefs)||void 0===G?void 0:G[V],{schemaId:J}=this.opts;q&&(Q=new y({schema:q,schemaId:J,root:j,baseId:B}))}return void 0!==Q?j.refs[V]=_.call(this,Q):void 0},s.getCompilingSchema=A,s.resolveSchema=T;const L=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function N(j,{baseId:B,schema:V,root:G}){var W;if("/"!==(null===(W=j.fragment)||void 0===W?void 0:W[0]))return;for(const J of j.fragment.slice(1).split("/")){if("boolean"==typeof V)return;const Z=V[(0,l.unescapeFragment)(J)];if(void 0===Z)return;const ee="object"==typeof(V=Z)&&V[this.opts.schemaId];!L.has(J)&&ee&&(B=(0,E.resolveUrl)(this.opts.uriResolver,B,ee))}let Q;if("boolean"!=typeof V&&V.$ref&&!(0,l.schemaHasRulesButRef)(V,this.RULES)){const J=(0,E.resolveUrl)(this.opts.uriResolver,B,V.$ref);Q=T.call(this,G,J)}const{schemaId:q}=this.opts;return Q=Q||new y({schema:V,schemaId:q,root:G,baseId:B}),Q.schema!==Q.root.schema?Q:void 0}},5976:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M={data:new h.Name("data"),valCxt:new h.Name("valCxt"),instancePath:new h.Name("instancePath"),parentData:new h.Name("parentData"),parentDataProperty:new h.Name("parentDataProperty"),rootData:new h.Name("rootData"),dynamicAnchors:new h.Name("dynamicAnchors"),vErrors:new h.Name("vErrors"),errors:new h.Name("errors"),this:new h.Name("this"),self:new h.Name("self"),scope:new h.Name("scope"),json:new h.Name("json"),jsonPos:new h.Name("jsonPos"),jsonLen:new h.Name("jsonLen"),jsonPart:new h.Name("jsonPart")};s.default=M},80140:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(31880);class M extends Error{constructor(E,l,m,y){super(y||`can't resolve reference ${m} from id ${l}`),this.missingRef=(0,h.resolveUrl)(E,l,m),this.missingSchema=(0,h.normalizeId)((0,h.getFullPath)(E,this.missingRef))}}s.default=M},31880:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.getSchemaRefs=s.resolveUrl=s.normalizeId=s._getFullPath=s.getFullPath=s.inlineRef=void 0;const h=p(97990),M=p(12559),w=p(23366),E=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);s.inlineRef=function l(N,j=!0){return"boolean"==typeof N||(!0===j?!y(N):!!j&&b(N)<=j)};const m=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function y(N){for(const j in N){if(m.has(j))return!0;const B=N[j];if(Array.isArray(B)&&B.some(y)||"object"==typeof B&&y(B))return!0}return!1}function b(N){let j=0;for(const B in N){if("$ref"===B)return 1/0;if(j++,!E.has(B)&&("object"==typeof N[B]&&(0,h.eachItem)(N[B],V=>j+=b(V)),j===1/0))return 1/0}return j}function S(N,j="",B){!1!==B&&(j=P(j));const V=N.parse(j);return _(N,V)}function _(N,j){return N.serialize(j).split("#")[0]+"#"}s.getFullPath=S,s._getFullPath=_;const A=/#\/?$/;function P(N){return N?N.replace(A,""):""}s.normalizeId=P,s.resolveUrl=function x(N,j,B){return B=P(B),N.resolve(j,B)};const T=/^[a-z_][-a-z0-9._]*$/i;s.getSchemaRefs=function L(N,j){if("boolean"==typeof N)return{};const{schemaId:B,uriResolver:V}=this.opts,G=P(N[B]||j),W={"":G},Q=S(V,G,!1),q={},J=new Set;return w(N,{allKeys:!0},(I,o,a,d)=>{if(void 0===d)return;const g=Q+o;let D=W[d];function F(C){const f=this.opts.uriResolver.resolve;if(C=P(D?f(D,C):C),J.has(C))throw ee(C);J.add(C);let k=this.refs[C];return"string"==typeof k&&(k=this.refs[k]),"object"==typeof k?Z(I,k.schema,C):C!==P(g)&&("#"===C[0]?(Z(I,q[C],C),q[C]=I):this.refs[C]=g),C}function z(C){if("string"==typeof C){if(!T.test(C))throw new Error(`invalid anchor "${C}"`);F.call(this,`#${C}`)}}"string"==typeof I[B]&&(D=F.call(this,I[B])),z.call(this,I.$anchor),z.call(this,I.$dynamicAnchor),W[o]=D}),q;function Z(I,o,a){if(void 0!==o&&!M(I,o))throw ee(a)}function ee(I){return new Error(`reference "${I}" resolves to more than one schema`)}}},62848:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.getRules=s.isJSONType=void 0;const h=new Set(["string","number","integer","boolean","null","object","array"]);s.isJSONType=function M(E){return"string"==typeof E&&h.has(E)},s.getRules=function w(){const E={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...E,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},E.number,E.string,E.array,E.object],post:{rules:[]},all:{},keywords:{}}}},97990:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.checkStrictMode=s.getErrorPath=s.Type=s.useFunc=s.setEvaluated=s.evaluatedPropsToName=s.mergeEvaluated=s.eachItem=s.unescapeJsonPointer=s.escapeJsonPointer=s.escapeFragment=s.unescapeFragment=s.schemaRefOrVal=s.schemaHasRulesButRef=s.schemaHasRules=s.checkUnknownRules=s.alwaysValidSchema=s.toHash=void 0;const h=p(56382),M=p(26295);function l(Q,q=Q.schema){const{opts:J,self:Z}=Q;if(!J.strictSchema||"boolean"==typeof q)return;const ee=Z.RULES.keywords;for(const I in q)ee[I]||W(Q,`unknown keyword: "${I}"`)}function m(Q,q){if("boolean"==typeof Q)return!Q;for(const J in Q)if(q[J])return!0;return!1}function A(Q){return"number"==typeof Q?`${Q}`:Q.replace(/~/g,"~0").replace(/\//g,"~1")}function P(Q){return Q.replace(/~1/g,"/").replace(/~0/g,"~")}function T({mergeNames:Q,mergeToName:q,mergeValues:J,resultToName:Z}){return(ee,I,o,a)=>{const d=void 0===o?I:o instanceof h.Name?(I instanceof h.Name?Q(ee,I,o):q(ee,I,o),o):I instanceof h.Name?(q(ee,o,I),I):J(I,o);return a!==h.Name||d instanceof h.Name?d:Z(ee,d)}}function L(Q,q){if(!0===q)return Q.var("props",!0);const J=Q.var("props",h._`{}`);return void 0!==q&&N(Q,J,q),J}function N(Q,q,J){Object.keys(J).forEach(Z=>Q.assign(h._`${q}${(0,h.getProperty)(Z)}`,!0))}s.toHash=function w(Q){const q={};for(const J of Q)q[J]=!0;return q},s.alwaysValidSchema=function E(Q,q){return"boolean"==typeof q?q:0===Object.keys(q).length||(l(Q,q),!m(q,Q.self.RULES.all))},s.checkUnknownRules=l,s.schemaHasRules=m,s.schemaHasRulesButRef=function y(Q,q){if("boolean"==typeof Q)return!Q;for(const J in Q)if("$ref"!==J&&q.all[J])return!0;return!1},s.schemaRefOrVal=function b({topSchemaRef:Q,schemaPath:q},J,Z,ee){if(!ee){if("number"==typeof J||"boolean"==typeof J)return J;if("string"==typeof J)return h._`${J}`}return h._`${Q}${q}${(0,h.getProperty)(Z)}`},s.unescapeFragment=function S(Q){return P(decodeURIComponent(Q))},s.escapeFragment=function _(Q){return encodeURIComponent(A(Q))},s.escapeJsonPointer=A,s.unescapeJsonPointer=P,s.eachItem=function x(Q,q){if(Array.isArray(Q))for(const J of Q)q(J);else q(Q)},s.mergeEvaluated={props:T({mergeNames:(Q,q,J)=>Q.if(h._`${J} !== true && ${q} !== undefined`,()=>{Q.if(h._`${q} === true`,()=>Q.assign(J,!0),()=>Q.assign(J,h._`${J} || {}`).code(h._`Object.assign(${J}, ${q})`))}),mergeToName:(Q,q,J)=>Q.if(h._`${J} !== true`,()=>{!0===q?Q.assign(J,!0):(Q.assign(J,h._`${J} || {}`),N(Q,J,q))}),mergeValues:(Q,q)=>!0===Q||{...Q,...q},resultToName:L}),items:T({mergeNames:(Q,q,J)=>Q.if(h._`${J} !== true && ${q} !== undefined`,()=>Q.assign(J,h._`${q} === true ? true : ${J} > ${q} ? ${J} : ${q}`)),mergeToName:(Q,q,J)=>Q.if(h._`${J} !== true`,()=>Q.assign(J,!0===q||h._`${J} > ${q} ? ${J} : ${q}`)),mergeValues:(Q,q)=>!0===Q||Math.max(Q,q),resultToName:(Q,q)=>Q.var("items",q)})},s.evaluatedPropsToName=L,s.setEvaluated=N;const j={};var V,Q;function W(Q,q,J=Q.opts.strictSchema){if(J){if(q=`strict mode: ${q}`,!0===J)throw new Error(q);Q.self.logger.warn(q)}}s.useFunc=function B(Q,q){return Q.scopeValue("func",{ref:q,code:j[q.code]||(j[q.code]=new M._Code(q.code))})},(Q=V=s.Type||(s.Type={}))[Q.Num=0]="Num",Q[Q.Str=1]="Str",s.getErrorPath=function G(Q,q,J){if(Q instanceof h.Name){const Z=q===V.Num;return J?Z?h._`"[" + ${Q} + "]"`:h._`"['" + ${Q} + "']"`:Z?h._`"/" + ${Q}`:h._`"/" + ${Q}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return J?(0,h.getProperty)(Q).toString():"/"+A(Q)},s.checkStrictMode=W},20368:(ne,s)=>{"use strict";function h(w,E){return E.rules.some(l=>M(w,l))}function M(w,E){var l;return void 0!==w[E.keyword]||(null===(l=E.definition.implements)||void 0===l?void 0:l.some(m=>void 0!==w[m]))}Object.defineProperty(s,"__esModule",{value:!0}),s.shouldUseRule=s.shouldUseGroup=s.schemaHasRulesForType=void 0,s.schemaHasRulesForType=function p({schema:w,self:E},l){const m=E.RULES.types[l];return m&&!0!==m&&h(w,m)},s.shouldUseGroup=h,s.shouldUseRule=M},8007:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.boolOrEmptySchema=s.topBoolOrEmptySchema=void 0;const h=p(75091),M=p(56382),w=p(5976),E={message:"boolean schema is false"};function y(b,S){const{gen:_,data:A}=b,P={gen:_,keyword:"false schema",data:A,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:b};(0,h.reportError)(P,E,void 0,S)}s.topBoolOrEmptySchema=function l(b){const{gen:S,schema:_,validateName:A}=b;!1===_?y(b,!1):"object"==typeof _&&!0===_.$async?S.return(w.default.data):(S.assign(M._`${A}.errors`,null),S.return(!0))},s.boolOrEmptySchema=function m(b,S){const{gen:_,schema:A}=b;!1===A?(_.var(S,!1),y(b)):_.var(S,!0)}},59078:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.reportTypeError=s.checkDataTypes=s.checkDataType=s.coerceAndCheckDataType=s.getJSONTypes=s.getSchemaTypes=s.DataType=void 0;const h=p(62848),M=p(20368),w=p(75091),E=p(56382),l=p(97990);var m,V;function b(V){const G=Array.isArray(V)?V:V?[V]:[];if(G.every(h.isJSONType))return G;throw new Error("type must be JSONType or JSONType[]: "+G.join(","))}(V=m=s.DataType||(s.DataType={}))[V.Correct=0]="Correct",V[V.Wrong=1]="Wrong",s.getSchemaTypes=function y(V){const G=b(V.type);if(G.includes("null")){if(!1===V.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!G.length&&void 0!==V.nullable)throw new Error('"nullable" cannot be used without "type"');!0===V.nullable&&G.push("null")}return G},s.getJSONTypes=b,s.coerceAndCheckDataType=function S(V,G){const{gen:W,data:Q,opts:q}=V,J=function A(V,G){return G?V.filter(W=>_.has(W)||"array"===G&&"array"===W):[]}(G,q.coerceTypes),Z=G.length>0&&!(0===J.length&&1===G.length&&(0,M.schemaHasRulesForType)(V,G[0]));if(Z){const ee=L(G,Q,q.strictNumbers,m.Wrong);W.if(ee,()=>{J.length?function P(V,G,W){const{gen:Q,data:q,opts:J}=V,Z=Q.let("dataType",E._`typeof ${q}`),ee=Q.let("coerced",E._`undefined`);"array"===J.coerceTypes&&Q.if(E._`${Z} == 'object' && Array.isArray(${q}) && ${q}.length == 1`,()=>Q.assign(q,E._`${q}[0]`).assign(Z,E._`typeof ${q}`).if(L(G,q,J.strictNumbers),()=>Q.assign(ee,q))),Q.if(E._`${ee} !== undefined`);for(const o of W)(_.has(o)||"array"===o&&"array"===J.coerceTypes)&&I(o);function I(o){switch(o){case"string":return void Q.elseIf(E._`${Z} == "number" || ${Z} == "boolean"`).assign(ee,E._`"" + ${q}`).elseIf(E._`${q} === null`).assign(ee,E._`""`);case"number":return void Q.elseIf(E._`${Z} == "boolean" || ${q} === null - || (${Z} == "string" && ${q} && ${q} == +${q})`).assign(ee,E._`+${q}`);case"integer":return void Q.elseIf(E._`${Z} === "boolean" || ${q} === null - || (${Z} === "string" && ${q} && ${q} == +${q} && !(${q} % 1))`).assign(ee,E._`+${q}`);case"boolean":return void Q.elseIf(E._`${q} === "false" || ${q} === 0 || ${q} === null`).assign(ee,!1).elseIf(E._`${q} === "true" || ${q} === 1`).assign(ee,!0);case"null":return Q.elseIf(E._`${q} === "" || ${q} === 0 || ${q} === false`),void Q.assign(ee,null);case"array":Q.elseIf(E._`${Z} === "string" || ${Z} === "number" - || ${Z} === "boolean" || ${q} === null`).assign(ee,E._`[${q}]`)}}Q.else(),j(V),Q.endIf(),Q.if(E._`${ee} !== undefined`,()=>{Q.assign(q,ee),function x({gen:V,parentData:G,parentDataProperty:W},Q){V.if(E._`${G} !== undefined`,()=>V.assign(E._`${G}[${W}]`,Q))}(V,ee)})}(V,G,J):j(V)})}return Z};const _=new Set(["string","number","integer","boolean","null"]);function T(V,G,W,Q=m.Correct){const q=Q===m.Correct?E.operators.EQ:E.operators.NEQ;let J;switch(V){case"null":return E._`${G} ${q} null`;case"array":J=E._`Array.isArray(${G})`;break;case"object":J=E._`${G} && typeof ${G} == "object" && !Array.isArray(${G})`;break;case"integer":J=Z(E._`!(${G} % 1) && !isNaN(${G})`);break;case"number":J=Z();break;default:return E._`typeof ${G} ${q} ${V}`}return Q===m.Correct?J:(0,E.not)(J);function Z(ee=E.nil){return(0,E.and)(E._`typeof ${G} == "number"`,ee,W?E._`isFinite(${G})`:E.nil)}}function L(V,G,W,Q){if(1===V.length)return T(V[0],G,W,Q);let q;const J=(0,l.toHash)(V);if(J.array&&J.object){const Z=E._`typeof ${G} != "object"`;q=J.null?Z:E._`!${G} || ${Z}`,delete J.null,delete J.array,delete J.object}else q=E.nil;J.number&&delete J.integer;for(const Z in J)q=(0,E.and)(q,T(Z,G,W,Q));return q}s.checkDataType=T,s.checkDataTypes=L;const N={message:({schema:V})=>`must be ${V}`,params:({schema:V,schemaValue:G})=>"string"==typeof V?E._`{type: ${V}}`:E._`{type: ${G}}`};function j(V){const G=function B(V){const{gen:G,data:W,schema:Q}=V,q=(0,l.schemaRefOrVal)(V,Q,"type");return{gen:G,keyword:"type",data:W,schema:Q.type,schemaCode:q,schemaValue:q,parentSchema:Q,params:{},it:V}}(V);(0,w.reportError)(G,N)}s.reportTypeError=j},57866:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.assignDefaults=void 0;const h=p(56382),M=p(97990);function E(l,m,y){const{gen:b,compositeRule:S,data:_,opts:A}=l;if(void 0===y)return;const P=h._`${_}${(0,h.getProperty)(m)}`;if(S)return void(0,M.checkStrictMode)(l,`default is ignored for: ${P}`);let x=h._`${P} === undefined`;"empty"===A.useDefaults&&(x=h._`${x} || ${P} === null || ${P} === ""`),b.if(x,h._`${P} = ${(0,h.stringify)(y)}`)}s.assignDefaults=function w(l,m){const{properties:y,items:b}=l.schema;if("object"===m&&y)for(const S in y)E(l,S,y[S].default);else"array"===m&&Array.isArray(b)&&b.forEach((S,_)=>E(l,_,S.default))}},66764:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.getData=s.KeywordCxt=s.validateFunctionCode=void 0;const h=p(8007),M=p(59078),w=p(20368),E=p(59078),l=p(57866),m=p(22707),y=p(62639),b=p(56382),S=p(5976),_=p(31880),A=p(97990),P=p(75091);function T({gen:Se,validateName:ce,schema:be,schemaEnv:Ne,opts:Fe},lt){Fe.code.es5?Se.func(ce,b._`${S.default.data}, ${S.default.valCxt}`,Ne.$async,()=>{Se.code(b._`"use strict"; ${V(be,Fe)}`),function N(Se,ce){Se.if(S.default.valCxt,()=>{Se.var(S.default.instancePath,b._`${S.default.valCxt}.${S.default.instancePath}`),Se.var(S.default.parentData,b._`${S.default.valCxt}.${S.default.parentData}`),Se.var(S.default.parentDataProperty,b._`${S.default.valCxt}.${S.default.parentDataProperty}`),Se.var(S.default.rootData,b._`${S.default.valCxt}.${S.default.rootData}`),ce.dynamicRef&&Se.var(S.default.dynamicAnchors,b._`${S.default.valCxt}.${S.default.dynamicAnchors}`)},()=>{Se.var(S.default.instancePath,b._`""`),Se.var(S.default.parentData,b._`undefined`),Se.var(S.default.parentDataProperty,b._`undefined`),Se.var(S.default.rootData,S.default.data),ce.dynamicRef&&Se.var(S.default.dynamicAnchors,b._`{}`)})}(Se,Fe),Se.code(lt)}):Se.func(ce,b._`${S.default.data}, ${function L(Se){return b._`{${S.default.instancePath}="", ${S.default.parentData}, ${S.default.parentDataProperty}, ${S.default.rootData}=${S.default.data}${Se.dynamicRef?b._`, ${S.default.dynamicAnchors}={}`:b.nil}}={}`}(Fe)}`,Ne.$async,()=>Se.code(V(be,Fe)).code(lt))}function V(Se,ce){const be="object"==typeof Se&&Se[ce.schemaId];return be&&(ce.code.source||ce.code.process)?b._`/*# sourceURL=${be} */`:b.nil}function G(Se,ce){Q(Se)&&(J(Se),W(Se))?function q(Se,ce){const{schema:be,gen:Ne,opts:Fe}=Se;Fe.$comment&&be.$comment&&d(Se),function o(Se){const ce=Se.schema[Se.opts.schemaId];ce&&(Se.baseId=(0,_.resolveUrl)(Se.opts.uriResolver,Se.baseId,ce))}(Se),function a(Se){if(Se.schema.$async&&!Se.schemaEnv.$async)throw new Error("async schema in sync schema")}(Se);const lt=Ne.const("_errs",S.default.errors);Z(Se,lt),Ne.var(ce,b._`${lt} === ${S.default.errors}`)}(Se,ce):(0,h.boolOrEmptySchema)(Se,ce)}function W({schema:Se,self:ce}){if("boolean"==typeof Se)return!Se;for(const be in Se)if(ce.RULES.all[be])return!0;return!1}function Q(Se){return"boolean"!=typeof Se.schema}function J(Se){(0,A.checkUnknownRules)(Se),function ee(Se){const{schema:ce,errSchemaPath:be,opts:Ne,self:Fe}=Se;ce.$ref&&Ne.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(ce,Fe.RULES)&&Fe.logger.warn(`$ref: keywords ignored in schema at path "${be}"`)}(Se)}function Z(Se,ce){if(Se.opts.jtd)return F(Se,[],!1,ce);const be=(0,M.getSchemaTypes)(Se.schema);F(Se,be,!(0,M.coerceAndCheckDataType)(Se,be),ce)}function d({gen:Se,schemaEnv:ce,schema:be,errSchemaPath:Ne,opts:Fe}){const lt=be.$comment;if(!0===Fe.$comment)Se.code(b._`${S.default.self}.logger.log(${lt})`);else if("function"==typeof Fe.$comment){const Ge=b.str`${Ne}/$comment`,He=Se.scopeValue("root",{ref:ce.root});Se.code(b._`${S.default.self}.opts.$comment(${lt}, ${Ge}, ${He}.schema)`)}}function F(Se,ce,be,Ne){const{gen:Fe,schema:lt,data:Ge,allErrors:He,opts:Kt,self:tt}=Se,{RULES:nt}=tt;function Vt(ot){(0,w.shouldUseGroup)(lt,ot)&&(ot.type?(Fe.if((0,E.checkDataType)(ot.type,Ge,Kt.strictNumbers)),z(Se,ot),1===ce.length&&ce[0]===ot.type&&be&&(Fe.else(),(0,E.reportTypeError)(Se)),Fe.endIf()):z(Se,ot),He||Fe.if(b._`${S.default.errors} === ${Ne||0}`))}!lt.$ref||!Kt.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(lt,nt)?(Kt.jtd||function C(Se,ce){Se.schemaEnv.meta||!Se.opts.strictTypes||(function f(Se,ce){if(ce.length){if(!Se.dataTypes.length)return void(Se.dataTypes=ce);ce.forEach(be=>{oe(Se.dataTypes,be)||Ie(Se,`type "${be}" not allowed by context "${Se.dataTypes.join(",")}"`)}),function de(Se,ce){const be=[];for(const Ne of Se.dataTypes)oe(ce,Ne)?be.push(Ne):ce.includes("integer")&&"number"===Ne&&be.push("integer");Se.dataTypes=be}(Se,ce)}}(Se,ce),Se.opts.allowUnionTypes||function k(Se,ce){ce.length>1&&(2!==ce.length||!ce.includes("null"))&&Ie(Se,"use allowUnionTypes to allow union type keyword")}(Se,ce),function se(Se,ce){const be=Se.self.RULES.all;for(const Ne in be){const Fe=be[Ne];if("object"==typeof Fe&&(0,w.shouldUseRule)(Se.schema,Fe)){const{type:lt}=Fe.definition;lt.length&&!lt.some(Ge=>te(ce,Ge))&&Ie(Se,`missing type "${lt.join(",")}" for keyword "${Ne}"`)}}}(Se,Se.dataTypes))}(Se,ce),Fe.block(()=>{for(const ot of nt.rules)Vt(ot);Vt(nt.post)})):Fe.block(()=>ve(Se,"$ref",nt.all.$ref.definition))}function z(Se,ce){const{gen:be,schema:Ne,opts:{useDefaults:Fe}}=Se;Fe&&(0,l.assignDefaults)(Se,ce.type),be.block(()=>{for(const lt of ce.rules)(0,w.shouldUseRule)(Ne,lt)&&ve(Se,lt.keyword,lt.definition,ce.type)})}function te(Se,ce){return Se.includes(ce)||"number"===ce&&Se.includes("integer")}function oe(Se,ce){return Se.includes(ce)||"integer"===ce&&Se.includes("number")}function Ie(Se,ce){ce+=` at "${Se.schemaEnv.baseId+Se.errSchemaPath}" (strictTypes)`,(0,A.checkStrictMode)(Se,ce,Se.opts.strictTypes)}s.validateFunctionCode=function x(Se){Q(Se)&&(J(Se),W(Se))?function j(Se){const{schema:ce,opts:be,gen:Ne}=Se;T(Se,()=>{be.$comment&&ce.$comment&&d(Se),function I(Se){const{schema:ce,opts:be}=Se;void 0!==ce.default&&be.useDefaults&&be.strictSchema&&(0,A.checkStrictMode)(Se,"default is ignored in the schema root")}(Se),Ne.let(S.default.vErrors,null),Ne.let(S.default.errors,0),be.unevaluated&&function B(Se){const{gen:ce,validateName:be}=Se;Se.evaluated=ce.const("evaluated",b._`${be}.evaluated`),ce.if(b._`${Se.evaluated}.dynamicProps`,()=>ce.assign(b._`${Se.evaluated}.props`,b._`undefined`)),ce.if(b._`${Se.evaluated}.dynamicItems`,()=>ce.assign(b._`${Se.evaluated}.items`,b._`undefined`))}(Se),Z(Se),function g(Se){const{gen:ce,schemaEnv:be,validateName:Ne,ValidationError:Fe,opts:lt}=Se;be.$async?ce.if(b._`${S.default.errors} === 0`,()=>ce.return(S.default.data),()=>ce.throw(b._`new ${Fe}(${S.default.vErrors})`)):(ce.assign(b._`${Ne}.errors`,S.default.vErrors),lt.unevaluated&&function D({gen:Se,evaluated:ce,props:be,items:Ne}){be instanceof b.Name&&Se.assign(b._`${ce}.props`,be),Ne instanceof b.Name&&Se.assign(b._`${ce}.items`,Ne)}(Se),ce.return(b._`${S.default.errors} === 0`))}(Se)})}(Se):T(Se,()=>(0,h.topBoolOrEmptySchema)(Se))};class ye{constructor(ce,be,Ne){if((0,m.validateKeywordUsage)(ce,be,Ne),this.gen=ce.gen,this.allErrors=ce.allErrors,this.keyword=Ne,this.data=ce.data,this.schema=ce.schema[Ne],this.$data=be.$data&&ce.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,A.schemaRefOrVal)(ce,this.schema,Ne,this.$data),this.schemaType=be.schemaType,this.parentSchema=ce.schema,this.params={},this.it=ce,this.def=be,this.$data)this.schemaCode=ce.gen.const("vSchema",pe(this.$data,ce));else if(this.schemaCode=this.schemaValue,!(0,m.validSchemaType)(this.schema,be.schemaType,be.allowUndefined))throw new Error(`${Ne} value must be ${JSON.stringify(be.schemaType)}`);("code"in be?be.trackErrors:!1!==be.errors)&&(this.errsCount=ce.gen.const("_errs",S.default.errors))}result(ce,be,Ne){this.failResult((0,b.not)(ce),be,Ne)}failResult(ce,be,Ne){this.gen.if(ce),Ne?Ne():this.error(),be?(this.gen.else(),be(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ce,be){this.failResult((0,b.not)(ce),void 0,be)}fail(ce){if(void 0===ce)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(ce),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ce){if(!this.$data)return this.fail(ce);const{schemaCode:be}=this;this.fail(b._`${be} !== undefined && (${(0,b.or)(this.invalid$data(),ce)})`)}error(ce,be,Ne){if(be)return this.setParams(be),this._error(ce,Ne),void this.setParams({});this._error(ce,Ne)}_error(ce,be){(ce?P.reportExtraError:P.reportError)(this,this.def.error,be)}$dataError(){(0,P.reportError)(this,this.def.$dataError||P.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,P.resetErrorsCount)(this.gen,this.errsCount)}ok(ce){this.allErrors||this.gen.if(ce)}setParams(ce,be){be?Object.assign(this.params,ce):this.params=ce}block$data(ce,be,Ne=b.nil){this.gen.block(()=>{this.check$data(ce,Ne),be()})}check$data(ce=b.nil,be=b.nil){if(!this.$data)return;const{gen:Ne,schemaCode:Fe,schemaType:lt,def:Ge}=this;Ne.if((0,b.or)(b._`${Fe} === undefined`,be)),ce!==b.nil&&Ne.assign(ce,!0),(lt.length||Ge.validateSchema)&&(Ne.elseIf(this.invalid$data()),this.$dataError(),ce!==b.nil&&Ne.assign(ce,!1)),Ne.else()}invalid$data(){const{gen:ce,schemaCode:be,schemaType:Ne,def:Fe,it:lt}=this;return(0,b.or)(function Ge(){if(Ne.length){if(!(be instanceof b.Name))throw new Error("ajv implementation error");const Kt=Array.isArray(Ne)?Ne:[Ne];return b._`${(0,E.checkDataTypes)(Kt,be,lt.opts.strictNumbers,E.DataType.Wrong)}`}return b.nil}(),function He(){if(Fe.validateSchema){const Kt=ce.scopeValue("validate$data",{ref:Fe.validateSchema});return b._`!${Kt}(${be})`}return b.nil}())}subschema(ce,be){const Ne=(0,y.getSubschema)(this.it,ce);(0,y.extendSubschemaData)(Ne,this.it,ce),(0,y.extendSubschemaMode)(Ne,ce);const Fe={...this.it,...Ne,items:void 0,props:void 0};return G(Fe,be),Fe}mergeEvaluated(ce,be){const{it:Ne,gen:Fe}=this;Ne.opts.unevaluated&&(!0!==Ne.props&&void 0!==ce.props&&(Ne.props=A.mergeEvaluated.props(Fe,ce.props,Ne.props,be)),!0!==Ne.items&&void 0!==ce.items&&(Ne.items=A.mergeEvaluated.items(Fe,ce.items,Ne.items,be)))}mergeValidEvaluated(ce,be){const{it:Ne,gen:Fe}=this;if(Ne.opts.unevaluated&&(!0!==Ne.props||!0!==Ne.items))return Fe.if(be,()=>this.mergeEvaluated(ce,b.Name)),!0}}function ve(Se,ce,be,Ne){const Fe=new ye(Se,be,ce);"code"in be?be.code(Fe,Ne):Fe.$data&&be.validate?(0,m.funcKeywordCode)(Fe,be):"macro"in be?(0,m.macroKeywordCode)(Fe,be):(be.compile||be.validate)&&(0,m.funcKeywordCode)(Fe,be)}s.KeywordCxt=ye;const ae=/^\/(?:[^~]|~0|~1)*$/,fe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function pe(Se,{dataLevel:ce,dataNames:be,dataPathArr:Ne}){let Fe,lt;if(""===Se)return S.default.rootData;if("/"===Se[0]){if(!ae.test(Se))throw new Error(`Invalid JSON-pointer: ${Se}`);Fe=Se,lt=S.default.rootData}else{const tt=fe.exec(Se);if(!tt)throw new Error(`Invalid JSON-pointer: ${Se}`);const nt=+tt[1];if(Fe=tt[2],"#"===Fe){if(nt>=ce)throw new Error(Kt("property/index",nt));return Ne[ce-nt]}if(nt>ce)throw new Error(Kt("data",nt));if(lt=be[ce-nt],!Fe)return lt}let Ge=lt;const He=Fe.split("/");for(const tt of He)tt&&(lt=b._`${lt}${(0,b.getProperty)((0,A.unescapeJsonPointer)(tt))}`,Ge=b._`${Ge} && ${lt}`);return Ge;function Kt(tt,nt){return`Cannot access ${tt} ${nt} levels up, current level is ${ce}`}}s.getData=pe},22707:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.validateKeywordUsage=s.validSchemaType=s.funcKeywordCode=s.macroKeywordCode=void 0;const h=p(56382),M=p(5976),w=p(92812),E=p(75091);function y(x){const{gen:T,data:L,it:N}=x;T.if(N.parentData,()=>T.assign(L,h._`${N.parentData}[${N.parentDataProperty}]`))}function _(x,T,L){if(void 0===L)throw new Error(`keyword "${T}" failed to compile`);return x.scopeValue("keyword","function"==typeof L?{ref:L}:{ref:L,code:(0,h.stringify)(L)})}s.macroKeywordCode=function l(x,T){const{gen:L,keyword:N,schema:j,parentSchema:B,it:V}=x,G=T.macro.call(V.self,j,B,V),W=_(L,N,G);!1!==V.opts.validateSchema&&V.self.validateSchema(G,!0);const Q=L.name("valid");x.subschema({schema:G,schemaPath:h.nil,errSchemaPath:`${V.errSchemaPath}/${N}`,topSchemaRef:W,compositeRule:!0},Q),x.pass(Q,()=>x.error(!0))},s.funcKeywordCode=function m(x,T){var L;const{gen:N,keyword:j,schema:B,parentSchema:V,$data:G,it:W}=x;!function S({schemaEnv:x},T){if(T.async&&!x.$async)throw new Error("async keyword in sync schema")}(W,T);const Q=!G&&T.compile?T.compile.call(W.self,B,V,W):T.validate,q=_(N,j,Q),J=N.let("valid");function o(d=(T.async?h._`await `:h.nil)){const g=W.opts.passContext?M.default.this:M.default.self,D=!("compile"in T&&!G||!1===T.schema);N.assign(J,h._`${d}${(0,w.callValidateCode)(x,q,g,D)}`,T.modifying)}function a(d){var g;N.if((0,h.not)(null!==(g=T.valid)&&void 0!==g?g:J),d)}x.block$data(J,function Z(){if(!1===T.errors)o(),T.modifying&&y(x),a(()=>x.error());else{const d=T.async?function ee(){const d=N.let("ruleErrs",null);return N.try(()=>o(h._`await `),g=>N.assign(J,!1).if(h._`${g} instanceof ${W.ValidationError}`,()=>N.assign(d,h._`${g}.errors`),()=>N.throw(g))),d}():function I(){const d=h._`${q}.errors`;return N.assign(d,null),o(h.nil),d}();T.modifying&&y(x),a(()=>function b(x,T){const{gen:L}=x;L.if(h._`Array.isArray(${T})`,()=>{L.assign(M.default.vErrors,h._`${M.default.vErrors} === null ? ${T} : ${M.default.vErrors}.concat(${T})`).assign(M.default.errors,h._`${M.default.vErrors}.length`),(0,E.extendErrors)(x)},()=>x.error())}(x,d))}}),x.ok(null!==(L=T.valid)&&void 0!==L?L:J)},s.validSchemaType=function A(x,T,L=!1){return!T.length||T.some(N=>"array"===N?Array.isArray(x):"object"===N?x&&"object"==typeof x&&!Array.isArray(x):typeof x==N||L&&typeof x>"u")},s.validateKeywordUsage=function P({schema:x,opts:T,self:L,errSchemaPath:N},j,B){if(Array.isArray(j.keyword)?!j.keyword.includes(B):j.keyword!==B)throw new Error("ajv implementation error");const V=j.dependencies;if(V?.some(G=>!Object.prototype.hasOwnProperty.call(x,G)))throw new Error(`parent schema must have dependencies of ${B}: ${V.join(",")}`);if(j.validateSchema&&!j.validateSchema(x[B])){const W=`keyword "${B}" value is invalid at path "${N}": `+L.errorsText(j.validateSchema.errors);if("log"!==T.validateSchema)throw new Error(W);L.logger.error(W)}}},62639:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.extendSubschemaMode=s.extendSubschemaData=s.getSubschema=void 0;const h=p(56382),M=p(97990);s.getSubschema=function w(m,{keyword:y,schemaProp:b,schema:S,schemaPath:_,errSchemaPath:A,topSchemaRef:P}){if(void 0!==y&&void 0!==S)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==y){const x=m.schema[y];return void 0===b?{schema:x,schemaPath:h._`${m.schemaPath}${(0,h.getProperty)(y)}`,errSchemaPath:`${m.errSchemaPath}/${y}`}:{schema:x[b],schemaPath:h._`${m.schemaPath}${(0,h.getProperty)(y)}${(0,h.getProperty)(b)}`,errSchemaPath:`${m.errSchemaPath}/${y}/${(0,M.escapeFragment)(b)}`}}if(void 0!==S){if(void 0===_||void 0===A||void 0===P)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:S,schemaPath:_,topSchemaRef:P,errSchemaPath:A}}throw new Error('either "keyword" or "schema" must be passed')},s.extendSubschemaData=function E(m,y,{dataProp:b,dataPropType:S,data:_,dataTypes:A,propertyName:P}){if(void 0!==_&&void 0!==b)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:x}=y;if(void 0!==b){const{errorPath:L,dataPathArr:N,opts:j}=y;T(x.let("data",h._`${y.data}${(0,h.getProperty)(b)}`,!0)),m.errorPath=h.str`${L}${(0,M.getErrorPath)(b,S,j.jsPropertySyntax)}`,m.parentDataProperty=h._`${b}`,m.dataPathArr=[...N,m.parentDataProperty]}if(void 0!==_){T(_ instanceof h.Name?_:x.let("data",_,!0)),void 0!==P&&(m.propertyName=P)}function T(L){m.data=L,m.dataLevel=y.dataLevel+1,m.dataTypes=[],y.definedProperties=new Set,m.parentData=y.data,m.dataNames=[...y.dataNames,L]}A&&(m.dataTypes=A)},s.extendSubschemaMode=function l(m,{jtdDiscriminator:y,jtdMetadata:b,compositeRule:S,createErrors:_,allErrors:A}){void 0!==S&&(m.compositeRule=S),void 0!==_&&(m.createErrors=_),void 0!==A&&(m.allErrors=A),m.jtdDiscriminator=y,m.jtdMetadata=b}},25910:(ne,s,p)=>{"use strict";var h=p(59344).default;Object.defineProperty(s,"__esModule",{value:!0}),s.CodeGen=s.Name=s.nil=s.stringify=s.str=s._=s.KeywordCxt=void 0;var M=p(66764);Object.defineProperty(s,"KeywordCxt",{enumerable:!0,get:function(){return M.KeywordCxt}});var w=p(56382);Object.defineProperty(s,"_",{enumerable:!0,get:function(){return w._}}),Object.defineProperty(s,"str",{enumerable:!0,get:function(){return w.str}}),Object.defineProperty(s,"stringify",{enumerable:!0,get:function(){return w.stringify}}),Object.defineProperty(s,"nil",{enumerable:!0,get:function(){return w.nil}}),Object.defineProperty(s,"Name",{enumerable:!0,get:function(){return w.Name}}),Object.defineProperty(s,"CodeGen",{enumerable:!0,get:function(){return w.CodeGen}});const E=p(20496),l=p(80140),m=p(62848),y=p(17140),b=p(56382),S=p(31880),_=p(59078),A=p(97990),P=p(64775),x=p(51364),T=(k,se)=>new RegExp(k,se);T.code="new RegExp";const L=["removeAdditional","useDefaults","coerceTypes"],N=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),j={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},B={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},V=200;function G(k){var se,te,oe,de,Ie,ye,ve,ae,fe,pe,Se,ce,be,Ne,Fe,lt,Ge,He,Kt,tt,nt,Vt,ot,at,Gt;const Re=k.strict,Ae=null===(se=k.code)||void 0===se?void 0:se.optimize,Te=!0===Ae||void 0===Ae?1:Ae||0,Be=null!==(oe=null===(te=k.code)||void 0===te?void 0:te.regExp)&&void 0!==oe?oe:T,Ve=null!==(de=k.uriResolver)&&void 0!==de?de:x.default;return{strictSchema:null===(ye=null!==(Ie=k.strictSchema)&&void 0!==Ie?Ie:Re)||void 0===ye||ye,strictNumbers:null===(ae=null!==(ve=k.strictNumbers)&&void 0!==ve?ve:Re)||void 0===ae||ae,strictTypes:null!==(pe=null!==(fe=k.strictTypes)&&void 0!==fe?fe:Re)&&void 0!==pe?pe:"log",strictTuples:null!==(ce=null!==(Se=k.strictTuples)&&void 0!==Se?Se:Re)&&void 0!==ce?ce:"log",strictRequired:null!==(Ne=null!==(be=k.strictRequired)&&void 0!==be?be:Re)&&void 0!==Ne&&Ne,code:k.code?{...k.code,optimize:Te,regExp:Be}:{optimize:Te,regExp:Be},loopRequired:null!==(Fe=k.loopRequired)&&void 0!==Fe?Fe:V,loopEnum:null!==(lt=k.loopEnum)&&void 0!==lt?lt:V,meta:null===(Ge=k.meta)||void 0===Ge||Ge,messages:null===(He=k.messages)||void 0===He||He,inlineRefs:null===(Kt=k.inlineRefs)||void 0===Kt||Kt,schemaId:null!==(tt=k.schemaId)&&void 0!==tt?tt:"$id",addUsedSchema:null===(nt=k.addUsedSchema)||void 0===nt||nt,validateSchema:null===(Vt=k.validateSchema)||void 0===Vt||Vt,validateFormats:null===(ot=k.validateFormats)||void 0===ot||ot,unicodeRegExp:null===(at=k.unicodeRegExp)||void 0===at||at,int32range:null===(Gt=k.int32range)||void 0===Gt||Gt,uriResolver:Ve}}class W{constructor(se={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,se=this.opts={...se,...G(se)};const{es5:te,lines:oe}=this.opts.code;this.scope=new b.ValueScope({scope:{},prefixes:N,es5:te,lines:oe}),this.logger=function a(k){if(!1===k)return o;if(void 0===k)return console;if(k.log&&k.warn&&k.error)return k;throw new Error("logger must implement log, warn and error methods")}(se.logger);const de=se.validateFormats;se.validateFormats=!1,this.RULES=(0,m.getRules)(),Q.call(this,j,se,"NOT SUPPORTED"),Q.call(this,B,se,"DEPRECATED","warn"),this._metaOpts=I.call(this),se.formats&&Z.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),se.keywords&&ee.call(this,se.keywords),"object"==typeof se.meta&&this.addMetaSchema(se.meta),J.call(this),se.validateFormats=de}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:se,meta:te,schemaId:oe}=this.opts;let de=P;"id"===oe&&(de={...P},de.id=de.$id,delete de.$id),te&&se&&this.addMetaSchema(de,de[oe],!1)}defaultMeta(){const{meta:se,schemaId:te}=this.opts;return this.opts.defaultMeta="object"==typeof se?se[te]||se:void 0}validate(se,te){let oe;if("string"==typeof se){if(oe=this.getSchema(se),!oe)throw new Error(`no schema with key or ref "${se}"`)}else oe=this.compile(se);const de=oe(te);return"$async"in oe||(this.errors=oe.errors),de}compile(se,te){const oe=this._addSchema(se,te);return oe.validate||this._compileSchemaEnv(oe)}compileAsync(se,te){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:oe}=this.opts;return de.call(this,se,te);function de(Fe,lt){return Ie.apply(this,arguments)}function Ie(){return(Ie=h(function*(Fe,lt){yield ye.call(this,Fe.$schema);const Ge=this._addSchema(Fe,lt);return Ge.validate||ae.call(this,Ge)})).apply(this,arguments)}function ye(Fe){return ve.apply(this,arguments)}function ve(){return(ve=h(function*(Fe){Fe&&!this.getSchema(Fe)&&(yield de.call(this,{$ref:Fe},!0))})).apply(this,arguments)}function ae(Fe){return fe.apply(this,arguments)}function fe(){return(fe=h(function*(Fe){try{return this._compileSchemaEnv(Fe)}catch(lt){if(!(lt instanceof l.default))throw lt;return pe.call(this,lt),yield Se.call(this,lt.missingSchema),ae.call(this,Fe)}})).apply(this,arguments)}function pe({missingSchema:Fe,missingRef:lt}){if(this.refs[Fe])throw new Error(`AnySchema ${Fe} is loaded but ${lt} cannot be resolved`)}function Se(Fe){return ce.apply(this,arguments)}function ce(){return(ce=h(function*(Fe){const lt=yield be.call(this,Fe);this.refs[Fe]||(yield ye.call(this,lt.$schema)),this.refs[Fe]||this.addSchema(lt,Fe,te)})).apply(this,arguments)}function be(Fe){return Ne.apply(this,arguments)}function Ne(){return(Ne=h(function*(Fe){const lt=this._loading[Fe];if(lt)return lt;try{return yield this._loading[Fe]=oe(Fe)}finally{delete this._loading[Fe]}})).apply(this,arguments)}}addSchema(se,te,oe,de=this.opts.validateSchema){if(Array.isArray(se)){for(const ye of se)this.addSchema(ye,void 0,oe,de);return this}let Ie;if("object"==typeof se){const{schemaId:ye}=this.opts;if(Ie=se[ye],void 0!==Ie&&"string"!=typeof Ie)throw new Error(`schema ${ye} must be string`)}return te=(0,S.normalizeId)(te||Ie),this._checkUnique(te),this.schemas[te]=this._addSchema(se,oe,te,de,!0),this}addMetaSchema(se,te,oe=this.opts.validateSchema){return this.addSchema(se,te,!0,oe),this}validateSchema(se,te){if("boolean"==typeof se)return!0;let oe;if(oe=se.$schema,void 0!==oe&&"string"!=typeof oe)throw new Error("$schema must be a string");if(oe=oe||this.opts.defaultMeta||this.defaultMeta(),!oe)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const de=this.validate(oe,se);if(!de&&te){const Ie="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(Ie);this.logger.error(Ie)}return de}getSchema(se){let te;for(;"string"==typeof(te=q.call(this,se));)se=te;if(void 0===te){const{schemaId:oe}=this.opts,de=new y.SchemaEnv({schema:{},schemaId:oe});if(te=y.resolveSchema.call(this,de,se),!te)return;this.refs[se]=te}return te.validate||this._compileSchemaEnv(te)}removeSchema(se){if(se instanceof RegExp)return this._removeAllSchemas(this.schemas,se),this._removeAllSchemas(this.refs,se),this;switch(typeof se){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const te=q.call(this,se);return"object"==typeof te&&this._cache.delete(te.schema),delete this.schemas[se],delete this.refs[se],this}case"object":{const te=se;this._cache.delete(te);let oe=se[this.opts.schemaId];return oe&&(oe=(0,S.normalizeId)(oe),delete this.schemas[oe],delete this.refs[oe]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(se){for(const te of se)this.addKeyword(te);return this}addKeyword(se,te){let oe;if("string"==typeof se)oe=se,"object"==typeof te&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),te.keyword=oe);else{if("object"!=typeof se||void 0!==te)throw new Error("invalid addKeywords parameters");if(oe=(te=se).keyword,Array.isArray(oe)&&!oe.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(g.call(this,oe,te),!te)return(0,A.eachItem)(oe,Ie=>D.call(this,Ie)),this;z.call(this,te);const de={...te,type:(0,_.getJSONTypes)(te.type),schemaType:(0,_.getJSONTypes)(te.schemaType)};return(0,A.eachItem)(oe,0===de.type.length?Ie=>D.call(this,Ie,de):Ie=>de.type.forEach(ye=>D.call(this,Ie,de,ye))),this}getKeyword(se){const te=this.RULES.all[se];return"object"==typeof te?te.definition:!!te}removeKeyword(se){const{RULES:te}=this;delete te.keywords[se],delete te.all[se];for(const oe of te.rules){const de=oe.rules.findIndex(Ie=>Ie.keyword===se);de>=0&&oe.rules.splice(de,1)}return this}addFormat(se,te){return"string"==typeof te&&(te=new RegExp(te)),this.formats[se]=te,this}errorsText(se=this.errors,{separator:te=", ",dataVar:oe="data"}={}){return se&&0!==se.length?se.map(de=>`${oe}${de.instancePath} ${de.message}`).reduce((de,Ie)=>de+te+Ie):"No errors"}$dataMetaSchema(se,te){const oe=this.RULES.all;se=JSON.parse(JSON.stringify(se));for(const de of te){const Ie=de.split("/").slice(1);let ye=se;for(const ve of Ie)ye=ye[ve];for(const ve in oe){const ae=oe[ve];if("object"!=typeof ae)continue;const{$data:fe}=ae.definition,pe=ye[ve];fe&&pe&&(ye[ve]=f(pe))}}return se}_removeAllSchemas(se,te){for(const oe in se){const de=se[oe];(!te||te.test(oe))&&("string"==typeof de?delete se[oe]:de&&!de.meta&&(this._cache.delete(de.schema),delete se[oe]))}}_addSchema(se,te,oe,de=this.opts.validateSchema,Ie=this.opts.addUsedSchema){let ye;const{schemaId:ve}=this.opts;if("object"==typeof se)ye=se[ve];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof se)throw new Error("schema must be object or boolean")}let ae=this._cache.get(se);if(void 0!==ae)return ae;oe=(0,S.normalizeId)(ye||oe);const fe=S.getSchemaRefs.call(this,se,oe);return ae=new y.SchemaEnv({schema:se,schemaId:ve,meta:te,baseId:oe,localRefs:fe}),this._cache.set(ae.schema,ae),Ie&&!oe.startsWith("#")&&(oe&&this._checkUnique(oe),this.refs[oe]=ae),de&&this.validateSchema(se,!0),ae}_checkUnique(se){if(this.schemas[se]||this.refs[se])throw new Error(`schema with key or id "${se}" already exists`)}_compileSchemaEnv(se){if(se.meta?this._compileMetaSchema(se):y.compileSchema.call(this,se),!se.validate)throw new Error("ajv implementation error");return se.validate}_compileMetaSchema(se){const te=this.opts;this.opts=this._metaOpts;try{y.compileSchema.call(this,se)}finally{this.opts=te}}}function Q(k,se,te,oe="error"){for(const de in k){const Ie=de;Ie in se&&this.logger[oe](`${te}: option ${de}. ${k[Ie]}`)}}function q(k){return k=(0,S.normalizeId)(k),this.schemas[k]||this.refs[k]}function J(){const k=this.opts.schemas;if(k)if(Array.isArray(k))this.addSchema(k);else for(const se in k)this.addSchema(k[se],se)}function Z(){for(const k in this.opts.formats){const se=this.opts.formats[k];se&&this.addFormat(k,se)}}function ee(k){if(Array.isArray(k))this.addVocabulary(k);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const se in k){const te=k[se];te.keyword||(te.keyword=se),this.addKeyword(te)}}}function I(){const k={...this.opts};for(const se of L)delete k[se];return k}s.default=W,W.ValidationError=E.default,W.MissingRefError=l.default;const o={log(){},warn(){},error(){}};const d=/^[a-z_$][a-z0-9_$:-]*$/i;function g(k,se){const{RULES:te}=this;if((0,A.eachItem)(k,oe=>{if(te.keywords[oe])throw new Error(`Keyword ${oe} is already defined`);if(!d.test(oe))throw new Error(`Keyword ${oe} has invalid name`)}),se&&se.$data&&!("code"in se)&&!("validate"in se))throw new Error('$data keyword must have "code" or "validate" function')}function D(k,se,te){var oe;const de=se?.post;if(te&&de)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:Ie}=this;let ye=de?Ie.post:Ie.rules.find(({type:ae})=>ae===te);if(ye||(ye={type:te,rules:[]},Ie.rules.push(ye)),Ie.keywords[k]=!0,!se)return;const ve={keyword:k,definition:{...se,type:(0,_.getJSONTypes)(se.type),schemaType:(0,_.getJSONTypes)(se.schemaType)}};se.before?F.call(this,ye,ve,se.before):ye.rules.push(ve),Ie.all[k]=ve,null===(oe=se.implements)||void 0===oe||oe.forEach(ae=>this.addKeyword(ae))}function F(k,se,te){const oe=k.rules.findIndex(de=>de.keyword===te);oe>=0?k.rules.splice(oe,0,se):(k.rules.push(se),this.logger.warn(`rule ${te} is not defined`))}function z(k){let{metaSchema:se}=k;void 0!==se&&(k.$data&&this.opts.$data&&(se=f(se)),k.validateSchema=this.compile(se,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function f(k){return{anyOf:[k,C]}}},40834:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(12559);h.code='require("ajv/dist/runtime/equal").default',s.default=h},26344:(ne,s)=>{"use strict";function p(h){const M=h.length;let l,w=0,E=0;for(;E=55296&&l<=56319&&E{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(96482);h.code='require("ajv/dist/runtime/uri").default',s.default=h},20496:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});class p extends Error{constructor(M){super("validation failed"),this.errors=M,this.ajv=this.validation=!0}}s.default=p},29282:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.validateAdditionalItems=void 0;const h=p(56382),M=p(97990),E={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:m}})=>h.str`must NOT have more than ${m} items`,params:({params:{len:m}})=>h._`{limit: ${m}}`},code(m){const{parentSchema:y,it:b}=m,{items:S}=y;Array.isArray(S)?l(m,S):(0,M.checkStrictMode)(b,'"additionalItems" is ignored when "items" is not an array of schemas')}};function l(m,y){const{gen:b,schema:S,data:_,keyword:A,it:P}=m;P.items=!0;const x=b.const("len",h._`${_}.length`);if(!1===S)m.setParams({len:y.length}),m.pass(h._`${x} <= ${y.length}`);else if("object"==typeof S&&!(0,M.alwaysValidSchema)(P,S)){const L=b.var("valid",h._`${x} <= ${y.length}`);b.if((0,h.not)(L),()=>function T(L){b.forRange("i",y.length,x,N=>{m.subschema({keyword:A,dataProp:N,dataPropType:M.Type.Num},L),P.allErrors||b.if((0,h.not)(L),()=>b.break())})}(L)),m.ok(L)}}s.validateAdditionalItems=l,s.default=E},75459:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(92812),M=p(56382),w=p(5976),E=p(97990),m={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:y})=>M._`{additionalProperty: ${y.additionalProperty}}`},code(y){const{gen:b,schema:S,parentSchema:_,data:A,errsCount:P,it:x}=y;if(!P)throw new Error("ajv implementation error");const{allErrors:T,opts:L}=x;if(x.props=!0,"all"!==L.removeAdditional&&(0,E.alwaysValidSchema)(x,S))return;const N=(0,h.allSchemaProperties)(_.properties),j=(0,h.allSchemaProperties)(_.patternProperties);function G(q){b.code(M._`delete ${A}[${q}]`)}function W(q){if("all"===L.removeAdditional||L.removeAdditional&&!1===S)G(q);else{if(!1===S)return y.setParams({additionalProperty:q}),y.error(),void(T||b.break());if("object"==typeof S&&!(0,E.alwaysValidSchema)(x,S)){const J=b.name("valid");"failing"===L.removeAdditional?(Q(q,J,!1),b.if((0,M.not)(J),()=>{y.reset(),G(q)})):(Q(q,J),T||b.if((0,M.not)(J),()=>b.break()))}}}function Q(q,J,Z){const ee={keyword:"additionalProperties",dataProp:q,dataPropType:E.Type.Str};!1===Z&&Object.assign(ee,{compositeRule:!0,createErrors:!1,allErrors:!1}),y.subschema(ee,J)}(function B(){b.forIn("key",A,q=>{N.length||j.length?b.if(function V(q){let J;if(N.length>8){const Z=(0,E.schemaRefOrVal)(x,_.properties,"properties");J=(0,h.isOwnProperty)(b,Z,q)}else J=N.length?(0,M.or)(...N.map(Z=>M._`${q} === ${Z}`)):M.nil;return j.length&&(J=(0,M.or)(J,...j.map(Z=>M._`${(0,h.usePattern)(y,Z)}.test(${q})`))),(0,M.not)(J)}(q),()=>W(q)):W(q)})})(),y.ok(M._`${P} === ${w.default.errors}`)}};s.default=m},46186:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(97990),M={keyword:"allOf",schemaType:"array",code(w){const{gen:E,schema:l,it:m}=w;if(!Array.isArray(l))throw new Error("ajv implementation error");const y=E.name("valid");l.forEach((b,S)=>{if((0,h.alwaysValidSchema)(m,b))return;const _=w.subschema({keyword:"allOf",schemaProp:S},y);w.ok(y),w.mergeEvaluated(_)})}};s.default=M},60290:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const M={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:p(92812).validateUnion,error:{message:"must match a schema in anyOf"}};s.default=M},25738:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M=p(97990),E={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:l,max:m}})=>void 0===m?h.str`must contain at least ${l} valid item(s)`:h.str`must contain at least ${l} and no more than ${m} valid item(s)`,params:({params:{min:l,max:m}})=>void 0===m?h._`{minContains: ${l}}`:h._`{minContains: ${l}, maxContains: ${m}}`},code(l){const{gen:m,schema:y,parentSchema:b,data:S,it:_}=l;let A,P;const{minContains:x,maxContains:T}=b;_.opts.next?(A=void 0===x?1:x,P=T):A=1;const L=m.const("len",h._`${S}.length`);if(l.setParams({min:A,max:P}),void 0===P&&0===A)return void(0,M.checkStrictMode)(_,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==P&&A>P)return(0,M.checkStrictMode)(_,'"minContains" > "maxContains" is always invalid'),void l.fail();if((0,M.alwaysValidSchema)(_,y)){let G=h._`${L} >= ${A}`;return void 0!==P&&(G=h._`${G} && ${L} <= ${P}`),void l.pass(G)}_.items=!0;const N=m.name("valid");function j(){const G=m.name("_valid"),W=m.let("count",0);B(G,()=>m.if(G,()=>function V(G){m.code(h._`${G}++`),void 0===P?m.if(h._`${G} >= ${A}`,()=>m.assign(N,!0).break()):(m.if(h._`${G} > ${P}`,()=>m.assign(N,!1).break()),1===A?m.assign(N,!0):m.if(h._`${G} >= ${A}`,()=>m.assign(N,!0)))}(W)))}function B(G,W){m.forRange("i",0,L,Q=>{l.subschema({keyword:"contains",dataProp:Q,dataPropType:M.Type.Num,compositeRule:!0},G),W()})}void 0===P&&1===A?B(N,()=>m.if(N,()=>m.break())):0===A?(m.let(N,!0),void 0!==P&&m.if(h._`${S}.length > 0`,j)):(m.let(N,!1),j()),l.result(N,()=>l.reset())}};s.default=E},1886:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.validateSchemaDeps=s.validatePropertyDeps=s.error=void 0;const h=p(56382),M=p(97990),w=p(92812);s.error={message:({params:{property:b,depsCount:S,deps:_}})=>{const A=1===S?"property":"properties";return h.str`must have ${A} ${_} when property ${b} is present`},params:({params:{property:b,depsCount:S,deps:_,missingProperty:A}})=>h._`{property: ${b}, - missingProperty: ${A}, - depsCount: ${S}, - deps: ${_}}`};const E={keyword:"dependencies",type:"object",schemaType:"object",error:s.error,code(b){const[S,_]=function l({schema:b}){const S={},_={};for(const A in b){if("__proto__"===A)continue;(Array.isArray(b[A])?S:_)[A]=b[A]}return[S,_]}(b);m(b,S),y(b,_)}};function m(b,S=b.schema){const{gen:_,data:A,it:P}=b;if(0===Object.keys(S).length)return;const x=_.let("missing");for(const T in S){const L=S[T];if(0===L.length)continue;const N=(0,w.propertyInData)(_,A,T,P.opts.ownProperties);b.setParams({property:T,depsCount:L.length,deps:L.join(", ")}),P.allErrors?_.if(N,()=>{for(const j of L)(0,w.checkReportMissingProp)(b,j)}):(_.if(h._`${N} && (${(0,w.checkMissingProp)(b,L,x)})`),(0,w.reportMissingProp)(b,x),_.else())}}function y(b,S=b.schema){const{gen:_,data:A,keyword:P,it:x}=b,T=_.name("valid");for(const L in S)(0,M.alwaysValidSchema)(x,S[L])||(_.if((0,w.propertyInData)(_,A,L,x.opts.ownProperties),()=>{const N=b.subschema({keyword:P,schemaProp:L},T);b.mergeValidEvaluated(N,T)},()=>_.var(T,!0)),b.ok(T))}s.validatePropertyDeps=m,s.validateSchemaDeps=y,s.default=E},43632:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M=p(97990),E={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:m})=>h.str`must match "${m.ifClause}" schema`,params:({params:m})=>h._`{failingKeyword: ${m.ifClause}}`},code(m){const{gen:y,parentSchema:b,it:S}=m;void 0===b.then&&void 0===b.else&&(0,M.checkStrictMode)(S,'"if" without "then" and "else" is ignored');const _=l(S,"then"),A=l(S,"else");if(!_&&!A)return;const P=y.let("valid",!0),x=y.name("_valid");if(function T(){const N=m.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},x);m.mergeEvaluated(N)}(),m.reset(),_&&A){const N=y.let("ifClause");m.setParams({ifClause:N}),y.if(x,L("then",N),L("else",N))}else _?y.if(x,L("then")):y.if((0,h.not)(x),L("else"));function L(N,j){return()=>{const B=m.subschema({keyword:N},x);y.assign(P,x),m.mergeValidEvaluated(B,P),j?y.assign(j,h._`${N}`):m.setParams({ifClause:N})}}m.pass(P,()=>m.error(!0))}};function l(m,y){const b=m.schema[y];return void 0!==b&&!(0,M.alwaysValidSchema)(m,b)}s.default=E},17737:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(29282),M=p(84947),w=p(69180),E=p(41785),l=p(25738),m=p(1886),y=p(37947),b=p(75459),S=p(68415),_=p(50896),A=p(36330),P=p(60290),x=p(92337),T=p(46186),L=p(43632),N=p(71344);s.default=function j(B=!1){const V=[A.default,P.default,x.default,T.default,L.default,N.default,y.default,b.default,m.default,S.default,_.default];return B?V.push(M.default,E.default):V.push(h.default,w.default),V.push(l.default),V}},69180:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.validateTuple=void 0;const h=p(56382),M=p(97990),w=p(92812),E={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(m){const{schema:y,it:b}=m;if(Array.isArray(y))return l(m,"additionalItems",y);b.items=!0,!(0,M.alwaysValidSchema)(b,y)&&m.ok((0,w.validateArray)(m))}};function l(m,y,b=m.schema){const{gen:S,parentSchema:_,data:A,keyword:P,it:x}=m;(function N(j){const{opts:B,errSchemaPath:V}=x,G=b.length,W=G===j.minItems&&(G===j.maxItems||!1===j[y]);if(B.strictTuples&&!W){const Q=`"${P}" is ${G}-tuple, but minItems or maxItems/${y} are not specified or different at path "${V}"`;(0,M.checkStrictMode)(x,Q,B.strictTuples)}})(_),x.opts.unevaluated&&b.length&&!0!==x.items&&(x.items=M.mergeEvaluated.items(S,b.length,x.items));const T=S.name("valid"),L=S.const("len",h._`${A}.length`);b.forEach((j,B)=>{(0,M.alwaysValidSchema)(x,j)||(S.if(h._`${L} > ${B}`,()=>m.subschema({keyword:P,schemaProp:B,dataProp:B},T)),m.ok(T))})}s.validateTuple=l,s.default=E},41785:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M=p(97990),w=p(92812),E=p(29282),m={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:y}})=>h.str`must NOT have more than ${y} items`,params:({params:{len:y}})=>h._`{limit: ${y}}`},code(y){const{schema:b,parentSchema:S,it:_}=y,{prefixItems:A}=S;_.items=!0,!(0,M.alwaysValidSchema)(_,b)&&(A?(0,E.validateAdditionalItems)(y,A):y.ok((0,w.validateArray)(y)))}};s.default=m},36330:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(97990),M={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(w){const{gen:E,schema:l,it:m}=w;if((0,h.alwaysValidSchema)(m,l))return void w.fail();const y=E.name("valid");w.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},y),w.failResult(y,()=>w.reset(),()=>w.error())},error:{message:"must NOT be valid"}};s.default=M},92337:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M=p(97990),E={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:l})=>h._`{passingSchemas: ${l.passing}}`},code(l){const{gen:m,schema:y,parentSchema:b,it:S}=l;if(!Array.isArray(y))throw new Error("ajv implementation error");if(S.opts.discriminator&&b.discriminator)return;const _=y,A=m.let("valid",!1),P=m.let("passing",null),x=m.name("_valid");l.setParams({passing:P}),m.block(function T(){_.forEach((L,N)=>{let j;(0,M.alwaysValidSchema)(S,L)?m.var(x,!0):j=l.subschema({keyword:"oneOf",schemaProp:N,compositeRule:!0},x),N>0&&m.if(h._`${x} && ${A}`).assign(A,!1).assign(P,h._`[${P}, ${N}]`).else(),m.if(x,()=>{m.assign(A,!0),m.assign(P,N),j&&l.mergeEvaluated(j,h.Name)})})}),l.result(A,()=>l.reset(),()=>l.error(!0))}};s.default=E},50896:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(92812),M=p(56382),w=p(97990),E=p(97990),l={keyword:"patternProperties",type:"object",schemaType:"object",code(m){const{gen:y,schema:b,data:S,parentSchema:_,it:A}=m,{opts:P}=A,x=(0,h.allSchemaProperties)(b),T=x.filter(W=>(0,w.alwaysValidSchema)(A,b[W]));if(0===x.length||T.length===x.length&&(!A.opts.unevaluated||!0===A.props))return;const L=P.strictSchema&&!P.allowMatchingProperties&&_.properties,N=y.name("valid");!0!==A.props&&!(A.props instanceof M.Name)&&(A.props=(0,E.evaluatedPropsToName)(y,A.props));const{props:j}=A;function V(W){for(const Q in L)new RegExp(W).test(Q)&&(0,w.checkStrictMode)(A,`property ${Q} matches pattern ${W} (use allowMatchingProperties)`)}function G(W){y.forIn("key",S,Q=>{y.if(M._`${(0,h.usePattern)(m,W)}.test(${Q})`,()=>{const q=T.includes(W);q||m.subschema({keyword:"patternProperties",schemaProp:W,dataProp:Q,dataPropType:E.Type.Str},N),A.opts.unevaluated&&!0!==j?y.assign(M._`${j}[${Q}]`,!0):!q&&!A.allErrors&&y.if((0,M.not)(N),()=>y.break())})})}!function B(){for(const W of x)L&&V(W),A.allErrors?G(W):(y.var(N,!0),G(W),y.if(N))}()}};s.default=l},84947:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(69180),M={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:w=>(0,h.validateTuple)(w,"items")};s.default=M},68415:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(66764),M=p(92812),w=p(97990),E=p(75459),l={keyword:"properties",type:"object",schemaType:"object",code(m){const{gen:y,schema:b,parentSchema:S,data:_,it:A}=m;"all"===A.opts.removeAdditional&&void 0===S.additionalProperties&&E.default.code(new h.KeywordCxt(A,E.default,"additionalProperties"));const P=(0,M.allSchemaProperties)(b);for(const j of P)A.definedProperties.add(j);A.opts.unevaluated&&P.length&&!0!==A.props&&(A.props=w.mergeEvaluated.props(y,(0,w.toHash)(P),A.props));const x=P.filter(j=>!(0,w.alwaysValidSchema)(A,b[j]));if(0===x.length)return;const T=y.name("valid");for(const j of x)L(j)?N(j):(y.if((0,M.propertyInData)(y,_,j,A.opts.ownProperties)),N(j),A.allErrors||y.else().var(T,!0),y.endIf()),m.it.definedProperties.add(j),m.ok(T);function L(j){return A.opts.useDefaults&&!A.compositeRule&&void 0!==b[j].default}function N(j){m.subschema({keyword:"properties",schemaProp:j,dataProp:j},T)}}};s.default=l},37947:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M=p(97990),E={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:l})=>h._`{propertyName: ${l.propertyName}}`},code(l){const{gen:m,schema:y,data:b,it:S}=l;if((0,M.alwaysValidSchema)(S,y))return;const _=m.name("valid");m.forIn("key",b,A=>{l.setParams({propertyName:A}),l.subschema({keyword:"propertyNames",data:A,dataTypes:["string"],propertyName:A,compositeRule:!0},_),m.if((0,h.not)(_),()=>{l.error(!0),S.allErrors||m.break()})}),l.ok(_)}};s.default=E},71344:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(97990),M={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:w,parentSchema:E,it:l}){void 0===E.if&&(0,h.checkStrictMode)(l,`"${w}" without "if" is ignored`)}};s.default=M},92812:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.validateUnion=s.validateArray=s.usePattern=s.callValidateCode=s.schemaProperties=s.allSchemaProperties=s.noPropertyInData=s.propertyInData=s.isOwnProperty=s.hasPropFunc=s.reportMissingProp=s.checkMissingProp=s.checkReportMissingProp=void 0;const h=p(56382),M=p(97990),w=p(5976),E=p(97990);function b(V){return V.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:h._`Object.prototype.hasOwnProperty`})}function S(V,G,W){return h._`${b(V)}.call(${G}, ${W})`}function A(V,G,W,Q){const q=h._`${G}${(0,h.getProperty)(W)} === undefined`;return Q?(0,h.or)(q,(0,h.not)(S(V,G,W))):q}function P(V){return V?Object.keys(V).filter(G=>"__proto__"!==G):[]}s.checkReportMissingProp=function l(V,G){const{gen:W,data:Q,it:q}=V;W.if(A(W,Q,G,q.opts.ownProperties),()=>{V.setParams({missingProperty:h._`${G}`},!0),V.error()})},s.checkMissingProp=function m({gen:V,data:G,it:{opts:W}},Q,q){return(0,h.or)(...Q.map(J=>(0,h.and)(A(V,G,J,W.ownProperties),h._`${q} = ${J}`)))},s.reportMissingProp=function y(V,G){V.setParams({missingProperty:G},!0),V.error()},s.hasPropFunc=b,s.isOwnProperty=S,s.propertyInData=function _(V,G,W,Q){const q=h._`${G}${(0,h.getProperty)(W)} !== undefined`;return Q?h._`${q} && ${S(V,G,W)}`:q},s.noPropertyInData=A,s.allSchemaProperties=P,s.schemaProperties=function x(V,G){return P(G).filter(W=>!(0,M.alwaysValidSchema)(V,G[W]))},s.callValidateCode=function T({schemaCode:V,data:G,it:{gen:W,topSchemaRef:Q,schemaPath:q,errorPath:J},it:Z},ee,I,o){const a=o?h._`${V}, ${G}, ${Q}${q}`:G,d=[[w.default.instancePath,(0,h.strConcat)(w.default.instancePath,J)],[w.default.parentData,Z.parentData],[w.default.parentDataProperty,Z.parentDataProperty],[w.default.rootData,w.default.rootData]];Z.opts.dynamicRef&&d.push([w.default.dynamicAnchors,w.default.dynamicAnchors]);const g=h._`${a}, ${W.object(...d)}`;return I!==h.nil?h._`${ee}.call(${I}, ${g})`:h._`${ee}(${g})`};const L=h._`new RegExp`;s.usePattern=function N({gen:V,it:{opts:G}},W){const Q=G.unicodeRegExp?"u":"",{regExp:q}=G.code,J=q(W,Q);return V.scopeValue("pattern",{key:J.toString(),ref:J,code:h._`${"new RegExp"===q.code?L:(0,E.useFunc)(V,q)}(${W}, ${Q})`})},s.validateArray=function j(V){const{gen:G,data:W,keyword:Q,it:q}=V,J=G.name("valid");if(q.allErrors){const ee=G.let("valid",!0);return Z(()=>G.assign(ee,!1)),ee}return G.var(J,!0),Z(()=>G.break()),J;function Z(ee){const I=G.const("len",h._`${W}.length`);G.forRange("i",0,I,o=>{V.subschema({keyword:Q,dataProp:o,dataPropType:M.Type.Num},J),G.if((0,h.not)(J),ee)})}},s.validateUnion=function B(V){const{gen:G,schema:W,keyword:Q,it:q}=V;if(!Array.isArray(W))throw new Error("ajv implementation error");if(W.some(I=>(0,M.alwaysValidSchema)(q,I))&&!q.opts.unevaluated)return;const Z=G.let("valid",!1),ee=G.name("_valid");G.block(()=>W.forEach((I,o)=>{const a=V.subschema({keyword:Q,schemaProp:o,compositeRule:!0},ee);G.assign(Z,h._`${Z} || ${ee}`),V.mergeValidEvaluated(a,ee)||G.if((0,h.not)(Z))})),V.result(Z,()=>V.reset(),()=>V.error(!0))}},11167:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const p={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};s.default=p},31093:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(11167),M=p(64703),w=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",h.default,M.default];s.default=w},64703:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.callRef=s.getValidate=void 0;const h=p(80140),M=p(92812),w=p(56382),E=p(5976),l=p(17140),m=p(97990),y={keyword:"$ref",schemaType:"string",code(_){const{gen:A,schema:P,it:x}=_,{baseId:T,schemaEnv:L,validateName:N,opts:j,self:B}=x,{root:V}=L;if(("#"===P||"#/"===P)&&T===V.baseId)return function W(){if(L===V)return S(_,N,L,L.$async);const J=A.scopeValue("root",{ref:V});return S(_,w._`${J}.validate`,V,V.$async)}();const G=l.resolveRef.call(B,V,T,P);if(void 0===G)throw new h.default(x.opts.uriResolver,T,P);return G instanceof l.SchemaEnv?function Q(J){const Z=b(_,J);S(_,Z,J,J.$async)}(G):function q(J){const Z=A.scopeValue("schema",!0===j.code.source?{ref:J,code:(0,w.stringify)(J)}:{ref:J}),ee=A.name("valid"),I=_.subschema({schema:J,dataTypes:[],schemaPath:w.nil,topSchemaRef:Z,errSchemaPath:P},ee);_.mergeEvaluated(I),_.ok(ee)}(G)}};function b(_,A){const{gen:P}=_;return A.validate?P.scopeValue("validate",{ref:A.validate}):w._`${P.scopeValue("wrapper",{ref:A})}.validate`}function S(_,A,P,x){const{gen:T,it:L}=_,{allErrors:N,schemaEnv:j,opts:B}=L,V=B.passContext?E.default.this:w.nil;function Q(J){const Z=w._`${J}.errors`;T.assign(E.default.vErrors,w._`${E.default.vErrors} === null ? ${Z} : ${E.default.vErrors}.concat(${Z})`),T.assign(E.default.errors,w._`${E.default.vErrors}.length`)}function q(J){var Z;if(!L.opts.unevaluated)return;const ee=null===(Z=P?.validate)||void 0===Z?void 0:Z.evaluated;if(!0!==L.props)if(ee&&!ee.dynamicProps)void 0!==ee.props&&(L.props=m.mergeEvaluated.props(T,ee.props,L.props));else{const I=T.var("props",w._`${J}.evaluated.props`);L.props=m.mergeEvaluated.props(T,I,L.props,w.Name)}if(!0!==L.items)if(ee&&!ee.dynamicItems)void 0!==ee.items&&(L.items=m.mergeEvaluated.items(T,ee.items,L.items));else{const I=T.var("items",w._`${J}.evaluated.items`);L.items=m.mergeEvaluated.items(T,I,L.items,w.Name)}}x?function G(){if(!j.$async)throw new Error("async schema referenced by sync schema");const J=T.let("valid");T.try(()=>{T.code(w._`await ${(0,M.callValidateCode)(_,A,V)}`),q(A),N||T.assign(J,!0)},Z=>{T.if(w._`!(${Z} instanceof ${L.ValidationError})`,()=>T.throw(Z)),Q(Z),N||T.assign(J,!1)}),_.ok(J)}():function W(){_.result((0,M.callValidateCode)(_,A,V),()=>q(A),()=>Q(A))}()}s.getValidate=b,s.callRef=S,s.default=y},81849:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M=p(60797),w=p(17140),E=p(97990),m={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:y,tagName:b}})=>y===M.DiscrError.Tag?`tag "${b}" must be string`:`value of tag "${b}" must be in oneOf`,params:({params:{discrError:y,tag:b,tagName:S}})=>h._`{error: ${y}, tag: ${S}, tagValue: ${b}}`},code(y){const{gen:b,data:S,schema:_,parentSchema:A,it:P}=y,{oneOf:x}=A;if(!P.opts.discriminator)throw new Error("discriminator: requires discriminator option");const T=_.propertyName;if("string"!=typeof T)throw new Error("discriminator: requires propertyName");if(_.mapping)throw new Error("discriminator: mapping is not supported");if(!x)throw new Error("discriminator: requires oneOf keyword");const L=b.let("valid",!1),N=b.const("tag",h._`${S}${(0,h.getProperty)(T)}`);function B(G){const W=b.name("valid"),Q=y.subschema({keyword:"oneOf",schemaProp:G},W);return y.mergeEvaluated(Q,h.Name),W}b.if(h._`typeof ${N} == "string"`,()=>function j(){const G=function V(){var G;const W={},Q=J(A);let q=!0;for(let I=0;Iy.error(!1,{discrError:M.DiscrError.Tag,tag:N,tagName:T})),y.ok(L)}};s.default=m},60797:(ne,s)=>{"use strict";var h;Object.defineProperty(s,"__esModule",{value:!0}),s.DiscrError=void 0,(h=s.DiscrError||(s.DiscrError={})).Tag="tag",h.Mapping="mapping"},77032:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(31093),M=p(77887),w=p(17737),E=p(57447),l=p(10760),m=[h.default,M.default,(0,w.default)(),E.default,l.metadataVocabulary,l.contentVocabulary];s.default=m},22364:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),w={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:E})=>h.str`must match format "${E}"`,params:({schemaCode:E})=>h._`{format: ${E}}`},code(E,l){const{gen:m,data:y,$data:b,schema:S,schemaCode:_,it:A}=E,{opts:P,errSchemaPath:x,schemaEnv:T,self:L}=A;P.validateFormats&&(b?function N(){const B=m.scopeValue("formats",{ref:L.formats,code:P.code.formats}),V=m.const("fDef",h._`${B}[${_}]`),G=m.let("fType"),W=m.let("format");m.if(h._`typeof ${V} == "object" && !(${V} instanceof RegExp)`,()=>m.assign(G,h._`${V}.type || "string"`).assign(W,h._`${V}.validate`),()=>m.assign(G,h._`"string"`).assign(W,V)),E.fail$data((0,h.or)(function Q(){return!1===P.strictSchema?h.nil:h._`${_} && !${W}`}(),function q(){const J=T.$async?h._`(${V}.async ? await ${W}(${y}) : ${W}(${y}))`:h._`${W}(${y})`,Z=h._`(typeof ${W} == "function" ? ${J} : ${W}.test(${y}))`;return h._`${W} && ${W} !== true && ${G} === ${l} && !${Z}`}()))}():function j(){const B=L.formats[S];if(!B)return void function Q(){if(!1===P.strictSchema)return void L.logger.warn(Z());throw new Error(Z());function Z(){return`unknown format "${S}" ignored in schema at path "${x}"`}}();if(!0===B)return;const[V,G,W]=function q(Z){const ee=Z instanceof RegExp?(0,h.regexpCode)(Z):P.code.formats?h._`${P.code.formats}${(0,h.getProperty)(S)}`:void 0,I=m.scopeValue("formats",{key:S,ref:Z,code:ee});return"object"!=typeof Z||Z instanceof RegExp?["string",Z,I]:[Z.type||"string",Z.validate,h._`${I}.validate`]}(B);V===l&&E.pass(function J(){if("object"==typeof B&&!(B instanceof RegExp)&&B.async){if(!T.$async)throw new Error("async format in sync schema");return h._`await ${W}(${y})`}return"function"==typeof G?h._`${W}(${y})`:h._`${W}.test(${y})`}())}())}};s.default=w},57447:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const M=[p(22364).default];s.default=M},10760:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.contentVocabulary=s.metadataVocabulary=void 0,s.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],s.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},37677:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M=p(97990),w=p(40834),l={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:m})=>h._`{allowedValue: ${m}}`},code(m){const{gen:y,data:b,$data:S,schemaCode:_,schema:A}=m;S||A&&"object"==typeof A?m.fail$data(h._`!${(0,M.useFunc)(y,w.default)}(${b}, ${_})`):m.fail(h._`${A} !== ${b}`)}};s.default=l},38373:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M=p(97990),w=p(40834),l={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:m})=>h._`{allowedValues: ${m}}`},code(m){const{gen:y,data:b,$data:S,schema:_,schemaCode:A,it:P}=m;if(!S&&0===_.length)throw new Error("enum must have non-empty array");const x=_.length>=P.opts.loopEnum;let T;const L=()=>T??(T=(0,M.useFunc)(y,w.default));let N;if(x||S)N=y.let("valid"),m.block$data(N,function j(){y.assign(N,!1),y.forOf("v",A,V=>y.if(h._`${L()}(${b}, ${V})`,()=>y.assign(N,!0).break()))});else{if(!Array.isArray(_))throw new Error("ajv implementation error");const V=y.const("vSchema",A);N=(0,h.or)(..._.map((G,W)=>function B(V,G){const W=_[G];return"object"==typeof W&&null!==W?h._`${L()}(${b}, ${V}[${G}])`:h._`${b} === ${W}`}(V,W)))}m.pass(N)}};s.default=l},77887:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(37126),M=p(52018),w=p(56230),E=p(58455),l=p(25608),m=p(70109),y=p(45132),b=p(74097),S=p(37677),_=p(38373),A=[h.default,M.default,w.default,E.default,l.default,m.default,y.default,b.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},S.default,_.default];s.default=A},45132:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),w={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:E,schemaCode:l}){const m="maxItems"===E?"more":"fewer";return h.str`must NOT have ${m} than ${l} items`},params:({schemaCode:E})=>h._`{limit: ${E}}`},code(E){const{keyword:l,data:m,schemaCode:y}=E,b="maxItems"===l?h.operators.GT:h.operators.LT;E.fail$data(h._`${m}.length ${b} ${y}`)}};s.default=w},56230:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M=p(97990),w=p(26344),l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:m,schemaCode:y}){const b="maxLength"===m?"more":"fewer";return h.str`must NOT have ${b} than ${y} characters`},params:({schemaCode:m})=>h._`{limit: ${m}}`},code(m){const{keyword:y,data:b,schemaCode:S,it:_}=m,A="maxLength"===y?h.operators.GT:h.operators.LT,P=!1===_.opts.unicode?h._`${b}.length`:h._`${(0,M.useFunc)(m.gen,w.default)}(${b})`;m.fail$data(h._`${P} ${A} ${S}`)}};s.default=l},37126:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),M=h.operators,w={maximum:{okStr:"<=",ok:M.LTE,fail:M.GT},minimum:{okStr:">=",ok:M.GTE,fail:M.LT},exclusiveMaximum:{okStr:"<",ok:M.LT,fail:M.GTE},exclusiveMinimum:{okStr:">",ok:M.GT,fail:M.LTE}},E={message:({keyword:m,schemaCode:y})=>h.str`must be ${w[m].okStr} ${y}`,params:({keyword:m,schemaCode:y})=>h._`{comparison: ${w[m].okStr}, limit: ${y}}`},l={keyword:Object.keys(w),type:"number",schemaType:"number",$data:!0,error:E,code(m){const{keyword:y,data:b,schemaCode:S}=m;m.fail$data(h._`${b} ${w[y].fail} ${S} || isNaN(${b})`)}};s.default=l},25608:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),w={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:E,schemaCode:l}){const m="maxProperties"===E?"more":"fewer";return h.str`must NOT have ${m} than ${l} properties`},params:({schemaCode:E})=>h._`{limit: ${E}}`},code(E){const{keyword:l,data:m,schemaCode:y}=E,b="maxProperties"===l?h.operators.GT:h.operators.LT;E.fail$data(h._`Object.keys(${m}).length ${b} ${y}`)}};s.default=w},52018:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(56382),w={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:E})=>h.str`must be multiple of ${E}`,params:({schemaCode:E})=>h._`{multipleOf: ${E}}`},code(E){const{gen:l,data:m,schemaCode:y,it:b}=E,S=b.opts.multipleOfPrecision,_=l.let("res"),A=S?h._`Math.abs(Math.round(${_}) - ${_}) > 1e-${S}`:h._`${_} !== parseInt(${_})`;E.fail$data(h._`(${y} === 0 || (${_} = ${m}/${y}, ${A}))`)}};s.default=w},58455:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(92812),M=p(56382),E={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:l})=>M.str`must match pattern "${l}"`,params:({schemaCode:l})=>M._`{pattern: ${l}}`},code(l){const{data:m,$data:y,schema:b,schemaCode:S,it:_}=l,A=_.opts.unicodeRegExp?"u":"",P=y?M._`(new RegExp(${S}, ${A}))`:(0,h.usePattern)(l,b);l.fail$data(M._`!${P}.test(${m})`)}};s.default=E},70109:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(92812),M=p(56382),w=p(97990),l={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:m}})=>M.str`must have required property '${m}'`,params:({params:{missingProperty:m}})=>M._`{missingProperty: ${m}}`},code(m){const{gen:y,schema:b,schemaCode:S,data:_,$data:A,it:P}=m,{opts:x}=P;if(!A&&0===b.length)return;const T=b.length>=x.loopRequired;if(P.allErrors?function L(){if(T||A)m.block$data(M.nil,j);else for(const V of b)(0,h.checkReportMissingProp)(m,V)}():function N(){const V=y.let("missing");if(T||A){const G=y.let("valid",!0);m.block$data(G,()=>function B(V,G){m.setParams({missingProperty:V}),y.forOf(V,S,()=>{y.assign(G,(0,h.propertyInData)(y,_,V,x.ownProperties)),y.if((0,M.not)(G),()=>{m.error(),y.break()})},M.nil)}(V,G)),m.ok(G)}else y.if((0,h.checkMissingProp)(m,b,V)),(0,h.reportMissingProp)(m,V),y.else()}(),x.strictRequired){const V=m.parentSchema.properties,{definedProperties:G}=m.it;for(const W of b)if(void 0===V?.[W]&&!G.has(W)){const q=`required property "${W}" is not defined at "${P.schemaEnv.baseId+P.errSchemaPath}" (strictRequired)`;(0,w.checkStrictMode)(P,q,P.opts.strictRequired)}}function j(){y.forOf("prop",S,V=>{m.setParams({missingProperty:V}),y.if((0,h.noPropertyInData)(y,_,V,x.ownProperties),()=>m.error())})}}};s.default=l},74097:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});const h=p(59078),M=p(56382),w=p(97990),E=p(40834),m={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:y,j:b}})=>M.str`must NOT have duplicate items (items ## ${b} and ${y} are identical)`,params:({params:{i:y,j:b}})=>M._`{i: ${y}, j: ${b}}`},code(y){const{gen:b,data:S,$data:_,schema:A,parentSchema:P,schemaCode:x,it:T}=y;if(!_&&!A)return;const L=b.let("valid"),N=P.items?(0,h.getSchemaTypes)(P.items):[];function V(W,Q){const q=b.name("item"),J=(0,h.checkDataTypes)(N,q,T.opts.strictNumbers,h.DataType.Wrong),Z=b.const("indices",M._`{}`);b.for(M._`;${W}--;`,()=>{b.let(q,M._`${S}[${W}]`),b.if(J,M._`continue`),N.length>1&&b.if(M._`typeof ${q} == "string"`,M._`${q} += "_"`),b.if(M._`typeof ${Z}[${q}] == "number"`,()=>{b.assign(Q,M._`${Z}[${q}]`),y.error(),b.assign(L,!1).break()}).code(M._`${Z}[${q}] = ${W}`)})}function G(W,Q){const q=(0,w.useFunc)(b,E.default),J=b.name("outer");b.label(J).for(M._`;${W}--;`,()=>b.for(M._`${Q} = ${W}; ${Q}--;`,()=>b.if(M._`${q}(${S}[${W}], ${S}[${Q}])`,()=>{y.error(),b.assign(L,!1).break(J)})))}y.block$data(L,function j(){const W=b.let("i",M._`${S}.length`),Q=b.let("j");y.setParams({i:W,j:Q}),b.assign(L,!0),b.if(M._`${W} > 1`,()=>(function B(){return N.length>0&&!N.some(W=>"object"===W||"array"===W)}()?V:G)(W,Q))},M._`${x} === false`),y.ok(L)}};s.default=m},87977:(ne,s,p)=>{"use strict";const h=s;h.bignum=p(13854),h.define=p(39516).define,h.base=p(87813),h.constants=p(5459),h.decoders=p(70196),h.encoders=p(21131)},39516:(ne,s,p)=>{"use strict";const h=p(21131),M=p(70196),w=p(83894);function l(m,y){this.name=m,this.body=y,this.decoders={},this.encoders={}}s.define=function(y,b){return new l(y,b)},l.prototype._createNamed=function(y){const b=this.name;function S(_){this._initNamed(_,b)}return w(S,y),S.prototype._initNamed=function(A,P){y.call(this,A,P)},new S(this)},l.prototype._getDecoder=function(y){return y=y||"der",this.decoders.hasOwnProperty(y)||(this.decoders[y]=this._createNamed(M[y])),this.decoders[y]},l.prototype.decode=function(y,b,S){return this._getDecoder(b).decode(y,S)},l.prototype._getEncoder=function(y){return y=y||"der",this.encoders.hasOwnProperty(y)||(this.encoders[y]=this._createNamed(h[y])),this.encoders[y]},l.prototype.encode=function(y,b,S){return this._getEncoder(b).encode(y,S)}},12769:(ne,s,p)=>{"use strict";const h=p(83894),M=p(4919).b,w=p(62038).Buffer;function E(m,y){M.call(this,y),w.isBuffer(m)?(this.base=m,this.offset=0,this.length=m.length):this.error("Input not Buffer")}function l(m,y){if(Array.isArray(m))this.length=0,this.value=m.map(function(b){return l.isEncoderBuffer(b)||(b=new l(b,y)),this.length+=b.length,b},this);else if("number"==typeof m){if(!(0<=m&&m<=255))return y.error("non-byte EncoderBuffer value");this.value=m,this.length=1}else if("string"==typeof m)this.value=m,this.length=w.byteLength(m);else{if(!w.isBuffer(m))return y.error("Unsupported type: "+typeof m);this.value=m,this.length=m.length}}h(E,M),s.C=E,E.isDecoderBuffer=function(y){return y instanceof E||"object"==typeof y&&w.isBuffer(y.base)&&"DecoderBuffer"===y.constructor.name&&"number"==typeof y.offset&&"number"==typeof y.length&&"function"==typeof y.save&&"function"==typeof y.restore&&"function"==typeof y.isEmpty&&"function"==typeof y.readUInt8&&"function"==typeof y.skip&&"function"==typeof y.raw},E.prototype.save=function(){return{offset:this.offset,reporter:M.prototype.save.call(this)}},E.prototype.restore=function(y){const b=new E(this.base);return b.offset=y.offset,b.length=this.offset,this.offset=y.offset,M.prototype.restore.call(this,y.reporter),b},E.prototype.isEmpty=function(){return this.offset===this.length},E.prototype.readUInt8=function(y){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(y||"DecoderBuffer overrun")},E.prototype.skip=function(y,b){if(!(this.offset+y<=this.length))return this.error(b||"DecoderBuffer overrun");const S=new E(this.base);return S._reporterState=this._reporterState,S.offset=this.offset,S.length=this.offset+y,this.offset+=y,S},E.prototype.raw=function(y){return this.base.slice(y?y.offset:this.offset,this.length)},s.R=l,l.isEncoderBuffer=function(y){return y instanceof l||"object"==typeof y&&"EncoderBuffer"===y.constructor.name&&"number"==typeof y.length&&"function"==typeof y.join},l.prototype.join=function(y,b){return y||(y=w.alloc(this.length)),b||(b=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(S){S.join(y,b),b+=S.length}):("number"==typeof this.value?y[b]=this.value:"string"==typeof this.value?y.write(this.value,b):w.isBuffer(this.value)&&this.value.copy(y,b),b+=this.length)),y}},87813:(ne,s,p)=>{"use strict";const h=s;h.Reporter=p(4919).b,h.DecoderBuffer=p(12769).C,h.EncoderBuffer=p(12769).R,h.Node=p(31430)},31430:(ne,s,p)=>{"use strict";const h=p(4919).b,M=p(12769).R,w=p(12769).C,E=p(32391),l=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],m=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(l);function b(_,A,P){const x={};this._baseState=x,x.name=P,x.enc=_,x.parent=A||null,x.children=null,x.tag=null,x.args=null,x.reverseArgs=null,x.choice=null,x.optional=!1,x.any=!1,x.obj=!1,x.use=null,x.useDecoder=null,x.key=null,x.default=null,x.explicit=null,x.implicit=null,x.contains=null,x.parent||(x.children=[],this._wrap())}ne.exports=b;const S=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];b.prototype.clone=function(){const A=this._baseState,P={};S.forEach(function(T){P[T]=A[T]});const x=new this.constructor(P.parent);return x._baseState=P,x},b.prototype._wrap=function(){const A=this._baseState;m.forEach(function(P){this[P]=function(){const T=new this.constructor(this);return A.children.push(T),T[P].apply(T,arguments)}},this)},b.prototype._init=function(A){const P=this._baseState;E(null===P.parent),A.call(this),P.children=P.children.filter(function(x){return x._baseState.parent===this},this),E.equal(P.children.length,1,"Root node can have only one child")},b.prototype._useArgs=function(A){const P=this._baseState,x=A.filter(function(T){return T instanceof this.constructor},this);A=A.filter(function(T){return!(T instanceof this.constructor)},this),0!==x.length&&(E(null===P.children),P.children=x,x.forEach(function(T){T._baseState.parent=this},this)),0!==A.length&&(E(null===P.args),P.args=A,P.reverseArgs=A.map(function(T){if("object"!=typeof T||T.constructor!==Object)return T;const L={};return Object.keys(T).forEach(function(N){N==(0|N)&&(N|=0);const j=T[N];L[j]=N}),L}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(_){b.prototype[_]=function(){const P=this._baseState;throw new Error(_+" not implemented for encoding: "+P.enc)}}),l.forEach(function(_){b.prototype[_]=function(){const P=this._baseState,x=Array.prototype.slice.call(arguments);return E(null===P.tag),P.tag=_,this._useArgs(x),this}}),b.prototype.use=function(A){E(A);const P=this._baseState;return E(null===P.use),P.use=A,this},b.prototype.optional=function(){return this._baseState.optional=!0,this},b.prototype.def=function(A){const P=this._baseState;return E(null===P.default),P.default=A,P.optional=!0,this},b.prototype.explicit=function(A){const P=this._baseState;return E(null===P.explicit&&null===P.implicit),P.explicit=A,this},b.prototype.implicit=function(A){const P=this._baseState;return E(null===P.explicit&&null===P.implicit),P.implicit=A,this},b.prototype.obj=function(){const A=this._baseState,P=Array.prototype.slice.call(arguments);return A.obj=!0,0!==P.length&&this._useArgs(P),this},b.prototype.key=function(A){const P=this._baseState;return E(null===P.key),P.key=A,this},b.prototype.any=function(){return this._baseState.any=!0,this},b.prototype.choice=function(A){const P=this._baseState;return E(null===P.choice),P.choice=A,this._useArgs(Object.keys(A).map(function(x){return A[x]})),this},b.prototype.contains=function(A){const P=this._baseState;return E(null===P.use),P.contains=A,this},b.prototype._decode=function(A,P){const x=this._baseState;if(null===x.parent)return A.wrapResult(x.children[0]._decode(A,P));let j,T=x.default,L=!0,N=null;if(null!==x.key&&(N=A.enterKey(x.key)),x.optional){let B=null;if(null!==x.explicit?B=x.explicit:null!==x.implicit?B=x.implicit:null!==x.tag&&(B=x.tag),null!==B||x.any){if(L=this._peekTag(A,B,x.any),A.isError(L))return L}else{const V=A.save();try{null===x.choice?this._decodeGeneric(x.tag,A,P):this._decodeChoice(A,P),L=!0}catch{L=!1}A.restore(V)}}if(x.obj&&L&&(j=A.enterObject()),L){if(null!==x.explicit){const V=this._decodeTag(A,x.explicit);if(A.isError(V))return V;A=V}const B=A.offset;if(null===x.use&&null===x.choice){let V;x.any&&(V=A.save());const G=this._decodeTag(A,null!==x.implicit?x.implicit:x.tag,x.any);if(A.isError(G))return G;x.any?T=A.raw(V):A=G}if(P&&P.track&&null!==x.tag&&P.track(A.path(),B,A.length,"tagged"),P&&P.track&&null!==x.tag&&P.track(A.path(),A.offset,A.length,"content"),x.any||(T=null===x.choice?this._decodeGeneric(x.tag,A,P):this._decodeChoice(A,P)),A.isError(T))return T;if(!x.any&&null===x.choice&&null!==x.children&&x.children.forEach(function(G){G._decode(A,P)}),x.contains&&("octstr"===x.tag||"bitstr"===x.tag)){const V=new w(T);T=this._getUse(x.contains,A._reporterState.obj)._decode(V,P)}}return x.obj&&L&&(T=A.leaveObject(j)),null===x.key||null===T&&!0!==L?null!==N&&A.exitKey(N):A.leaveKey(N,x.key,T),T},b.prototype._decodeGeneric=function(A,P,x){const T=this._baseState;return"seq"===A||"set"===A?null:"seqof"===A||"setof"===A?this._decodeList(P,A,T.args[0],x):/str$/.test(A)?this._decodeStr(P,A,x):"objid"===A&&T.args?this._decodeObjid(P,T.args[0],T.args[1],x):"objid"===A?this._decodeObjid(P,null,null,x):"gentime"===A||"utctime"===A?this._decodeTime(P,A,x):"null_"===A?this._decodeNull(P,x):"bool"===A?this._decodeBool(P,x):"objDesc"===A?this._decodeStr(P,A,x):"int"===A||"enum"===A?this._decodeInt(P,T.args&&T.args[0],x):null!==T.use?this._getUse(T.use,P._reporterState.obj)._decode(P,x):P.error("unknown tag: "+A)},b.prototype._getUse=function(A,P){const x=this._baseState;return x.useDecoder=this._use(A,P),E(null===x.useDecoder._baseState.parent),x.useDecoder=x.useDecoder._baseState.children[0],x.implicit!==x.useDecoder._baseState.implicit&&(x.useDecoder=x.useDecoder.clone(),x.useDecoder._baseState.implicit=x.implicit),x.useDecoder},b.prototype._decodeChoice=function(A,P){const x=this._baseState;let T=null,L=!1;return Object.keys(x.choice).some(function(N){const j=A.save(),B=x.choice[N];try{const V=B._decode(A,P);if(A.isError(V))return!1;T={type:N,value:V},L=!0}catch{return A.restore(j),!1}return!0},this),L?T:A.error("Choice not matched")},b.prototype._createEncoderBuffer=function(A){return new M(A,this.reporter)},b.prototype._encode=function(A,P,x){const T=this._baseState;if(null!==T.default&&T.default===A)return;const L=this._encodeValue(A,P,x);return void 0===L||this._skipDefault(L,P,x)?void 0:L},b.prototype._encodeValue=function(A,P,x){const T=this._baseState;if(null===T.parent)return T.children[0]._encode(A,P||new h);let L=null;if(this.reporter=P,T.optional&&void 0===A){if(null===T.default)return;A=T.default}let N=null,j=!1;if(T.any)L=this._createEncoderBuffer(A);else if(T.choice)L=this._encodeChoice(A,P);else if(T.contains)N=this._getUse(T.contains,x)._encode(A,P),j=!0;else if(T.children)N=T.children.map(function(B){if("null_"===B._baseState.tag)return B._encode(null,P,A);if(null===B._baseState.key)return P.error("Child should have a key");const V=P.enterKey(B._baseState.key);if("object"!=typeof A)return P.error("Child expected, but input is not object");const G=B._encode(A[B._baseState.key],P,A);return P.leaveKey(V),G},this).filter(function(B){return B}),N=this._createEncoderBuffer(N);else if("seqof"===T.tag||"setof"===T.tag){if(!T.args||1!==T.args.length)return P.error("Too many args for : "+T.tag);if(!Array.isArray(A))return P.error("seqof/setof, but data is not Array");const B=this.clone();B._baseState.implicit=null,N=this._createEncoderBuffer(A.map(function(V){const G=this._baseState;return this._getUse(G.args[0],A)._encode(V,P)},B))}else null!==T.use?L=this._getUse(T.use,x)._encode(A,P):(N=this._encodePrimitive(T.tag,A),j=!0);if(!T.any&&null===T.choice){const B=null!==T.implicit?T.implicit:T.tag,V=null===T.implicit?"universal":"context";null===B?null===T.use&&P.error("Tag could be omitted only for .use()"):null===T.use&&(L=this._encodeComposite(B,j,V,N))}return null!==T.explicit&&(L=this._encodeComposite(T.explicit,!1,"context",L)),L},b.prototype._encodeChoice=function(A,P){const x=this._baseState,T=x.choice[A.type];return T||E(!1,A.type+" not found in "+JSON.stringify(Object.keys(x.choice))),T._encode(A.value,P)},b.prototype._encodePrimitive=function(A,P){const x=this._baseState;if(/str$/.test(A))return this._encodeStr(P,A);if("objid"===A&&x.args)return this._encodeObjid(P,x.reverseArgs[0],x.args[1]);if("objid"===A)return this._encodeObjid(P,null,null);if("gentime"===A||"utctime"===A)return this._encodeTime(P,A);if("null_"===A)return this._encodeNull();if("int"===A||"enum"===A)return this._encodeInt(P,x.args&&x.reverseArgs[0]);if("bool"===A)return this._encodeBool(P);if("objDesc"===A)return this._encodeStr(P,A);throw new Error("Unsupported tag: "+A)},b.prototype._isNumstr=function(A){return/^[0-9 ]*$/.test(A)},b.prototype._isPrintstr=function(A){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(A)}},4919:(ne,s,p)=>{"use strict";const h=p(83894);function M(E){this._reporterState={obj:null,path:[],options:E||{},errors:[]}}function w(E,l){this.path=E,this.rethrow(l)}s.b=M,M.prototype.isError=function(l){return l instanceof w},M.prototype.save=function(){const l=this._reporterState;return{obj:l.obj,pathLen:l.path.length}},M.prototype.restore=function(l){const m=this._reporterState;m.obj=l.obj,m.path=m.path.slice(0,l.pathLen)},M.prototype.enterKey=function(l){return this._reporterState.path.push(l)},M.prototype.exitKey=function(l){const m=this._reporterState;m.path=m.path.slice(0,l-1)},M.prototype.leaveKey=function(l,m,y){const b=this._reporterState;this.exitKey(l),null!==b.obj&&(b.obj[m]=y)},M.prototype.path=function(){return this._reporterState.path.join("/")},M.prototype.enterObject=function(){const l=this._reporterState,m=l.obj;return l.obj={},m},M.prototype.leaveObject=function(l){const m=this._reporterState,y=m.obj;return m.obj=l,y},M.prototype.error=function(l){let m;const y=this._reporterState,b=l instanceof w;if(m=b?l:new w(y.path.map(function(S){return"["+JSON.stringify(S)+"]"}).join(""),l.message||l,l.stack),!y.options.partial)throw m;return b||y.errors.push(m),m},M.prototype.wrapResult=function(l){const m=this._reporterState;return m.options.partial?{result:this.isError(l)?null:l,errors:m.errors}:l},h(w,Error),w.prototype.rethrow=function(l){if(this.message=l+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,w),!this.stack)try{throw new Error(this.message)}catch(m){this.stack=m.stack}return this}},25496:(ne,s)=>{"use strict";function p(h){const M={};return Object.keys(h).forEach(function(w){(0|w)==w&&(w|=0);const E=h[w];M[E]=w}),M}s.tagClass={0:"universal",1:"application",2:"context",3:"private"},s.tagClassByName=p(s.tagClass),s.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},s.tagByName=p(s.tag)},5459:(ne,s,p)=>{"use strict";const h=s;h._reverse=function(w){const E={};return Object.keys(w).forEach(function(l){(0|l)==l&&(l|=0);const m=w[l];E[m]=l}),E},h.der=p(25496)},87127:(ne,s,p)=>{"use strict";const h=p(83894),M=p(13854),w=p(12769).C,E=p(31430),l=p(25496);function m(_){this.enc="der",this.name=_.name,this.entity=_,this.tree=new y,this.tree._init(_.body)}function y(_){E.call(this,"der",_)}function b(_,A){let P=_.readUInt8(A);if(_.isError(P))return P;const x=l.tagClass[P>>6],T=0==(32&P);if(31==(31&P)){let N=P;for(P=0;128==(128&N);){if(N=_.readUInt8(A),_.isError(N))return N;P<<=7,P|=127&N}}else P&=31;return{cls:x,primitive:T,tag:P,tagStr:l.tag[P]}}function S(_,A,P){let x=_.readUInt8(P);if(_.isError(x))return x;if(!A&&128===x)return null;if(!(128&x))return x;const T=127&x;if(T>4)return _.error("length octect is too long");x=0;for(let L=0;L{"use strict";const h=s;h.der=p(87127),h.pem=p(99617)},99617:(ne,s,p)=>{"use strict";const h=p(83894),M=p(62038).Buffer,w=p(87127);function E(l){w.call(this,l),this.enc="pem"}h(E,w),ne.exports=E,E.prototype.decode=function(m,y){const b=m.toString().split(/[\r\n]+/g),S=y.label.toUpperCase(),_=/^-----(BEGIN|END) ([^-]+)-----$/;let A=-1,P=-1;for(let L=0;L{"use strict";const h=p(83894),M=p(62038).Buffer,w=p(31430),E=p(25496);function l(S){this.enc="der",this.name=S.name,this.entity=S,this.tree=new m,this.tree._init(S.body)}function m(S){w.call(this,"der",S)}function y(S){return S<10?"0"+S:S}ne.exports=l,l.prototype.encode=function(_,A){return this.tree._encode(_,A).join()},h(m,w),m.prototype._encodeComposite=function(_,A,P,x){const T=function b(S,_,A,P){let x;if("seqof"===S?S="seq":"setof"===S&&(S="set"),E.tagByName.hasOwnProperty(S))x=E.tagByName[S];else{if("number"!=typeof S||(0|S)!==S)return P.error("Unknown tag: "+S);x=S}return x>=31?P.error("Multi-octet tag encoding unsupported"):(_||(x|=32),x|=E.tagClassByName[A||"universal"]<<6,x)}(_,A,P,this.reporter);if(x.length<128){const j=M.alloc(2);return j[0]=T,j[1]=x.length,this._createEncoderBuffer([j,x])}let L=1;for(let j=x.length;j>=256;j>>=8)L++;const N=M.alloc(2+L);N[0]=T,N[1]=128|L;for(let j=1+L,B=x.length;B>0;j--,B>>=8)N[j]=255&B;return this._createEncoderBuffer([N,x])},m.prototype._encodeStr=function(_,A){if("bitstr"===A)return this._createEncoderBuffer([0|_.unused,_.data]);if("bmpstr"===A){const P=M.alloc(2*_.length);for(let x=0;x<_.length;x++)P.writeUInt16BE(_.charCodeAt(x),2*x);return this._createEncoderBuffer(P)}return"numstr"===A?this._isNumstr(_)?this._createEncoderBuffer(_):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===A?this._isPrintstr(_)?this._createEncoderBuffer(_):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(A)||"objDesc"===A?this._createEncoderBuffer(_):this.reporter.error("Encoding of string type: "+A+" unsupported")},m.prototype._encodeObjid=function(_,A,P){if("string"==typeof _){if(!A)return this.reporter.error("string objid given, but no values map found");if(!A.hasOwnProperty(_))return this.reporter.error("objid not found in values map");_=A[_].split(/[\s.]+/g);for(let N=0;N<_.length;N++)_[N]|=0}else if(Array.isArray(_)){_=_.slice();for(let N=0;N<_.length;N++)_[N]|=0}if(!Array.isArray(_))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(_));if(!P){if(_[1]>=40)return this.reporter.error("Second objid identifier OOB");_.splice(0,2,40*_[0]+_[1])}let x=0;for(let N=0;N<_.length;N++){let j=_[N];for(x++;j>=128;j>>=7)x++}const T=M.alloc(x);let L=T.length-1;for(let N=_.length-1;N>=0;N--){let j=_[N];for(T[L--]=127&j;(j>>=7)>0;)T[L--]=128|127&j}return this._createEncoderBuffer(T)},m.prototype._encodeTime=function(_,A){let P;const x=new Date(_);return"gentime"===A?P=[y(x.getUTCFullYear()),y(x.getUTCMonth()+1),y(x.getUTCDate()),y(x.getUTCHours()),y(x.getUTCMinutes()),y(x.getUTCSeconds()),"Z"].join(""):"utctime"===A?P=[y(x.getUTCFullYear()%100),y(x.getUTCMonth()+1),y(x.getUTCDate()),y(x.getUTCHours()),y(x.getUTCMinutes()),y(x.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+A+" time is not supported yet"),this._encodeStr(P,"octstr")},m.prototype._encodeNull=function(){return this._createEncoderBuffer("")},m.prototype._encodeInt=function(_,A){if("string"==typeof _){if(!A)return this.reporter.error("String int or enum given, but no values map");if(!A.hasOwnProperty(_))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(_));_=A[_]}if("number"!=typeof _&&!M.isBuffer(_)){const T=_.toArray();!_.sign&&128&T[0]&&T.unshift(0),_=M.from(T)}if(M.isBuffer(_)){let T=_.length;0===_.length&&T++;const L=M.alloc(T);return _.copy(L),0===_.length&&(L[0]=0),this._createEncoderBuffer(L)}if(_<128)return this._createEncoderBuffer(_);if(_<256)return this._createEncoderBuffer([0,_]);let P=1;for(let T=_;T>=256;T>>=8)P++;const x=new Array(P);for(let T=x.length-1;T>=0;T--)x[T]=255&_,_>>=8;return 128&x[0]&&x.unshift(0),this._createEncoderBuffer(M.from(x))},m.prototype._encodeBool=function(_){return this._createEncoderBuffer(_?255:0)},m.prototype._use=function(_,A){return"function"==typeof _&&(_=_(A)),_._getEncoder("der").tree},m.prototype._skipDefault=function(_,A,P){const x=this._baseState;let T;if(null===x.default)return!1;const L=_.join();if(void 0===x.defaultBuffer&&(x.defaultBuffer=this._encodeValue(x.default,A,P).join()),L.length!==x.defaultBuffer.length)return!1;for(T=0;T{"use strict";const h=s;h.der=p(16374),h.pem=p(3530)},3530:(ne,s,p)=>{"use strict";const h=p(83894),M=p(16374);function w(E){M.call(this,E),this.enc="pem"}h(w,M),ne.exports=w,w.prototype.encode=function(l,m){const b=M.prototype.encode.call(this,l).toString("base64"),S=["-----BEGIN "+m.label+"-----"];for(let _=0;_=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function b(I,o,a){var d=y(I,a);return a-1>=o&&(d|=y(I,a-1)<<4),d}function S(I,o,a,d){for(var g=0,D=Math.min(I.length,a),F=o;F=49?z-49+10:z>=17?z-17+10:z}return g}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,a){return o.cmp(a)>0?o:a},l.min=function(o,a){return o.cmp(a)<0?o:a},l.prototype._init=function(o,a,d){if("number"==typeof o)return this._initNumber(o,a,d);if("object"==typeof o)return this._initArray(o,a,d);"hex"===a&&(a=16),w(a===(0|a)&&a>=2&&a<=36);var g=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(g++,this.negative=1),g=0;g-=3)F=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[D]|=F<>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);else if("le"===d)for(g=0,D=0;g>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);return this.strip()},l.prototype._parseHex=function(o,a,d){this.length=Math.ceil((o.length-a)/6),this.words=new Array(this.length);for(var g=0;g=a;g-=2)z=b(o,a,g)<=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;else for(g=(o.length-a)%2==0?a+1:a;g=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;this.strip()},l.prototype._parseBase=function(o,a,d){this.words=[0],this.length=1;for(var g=0,D=1;D<=67108863;D*=a)g++;g--,D=D/a|0;for(var F=o.length-d,z=F%g,C=Math.min(F,F-z)+d,f=0,k=d;k1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var _=["","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"],A=[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 T(I,o,a){a.negative=o.negative^I.negative;var d=I.length+o.length|0;a.length=d,d=d-1|0;var g=0|I.words[0],D=0|o.words[0],F=g*D,z=67108863&F,C=F/67108864|0;a.words[0]=z;for(var f=1;f>>26,se=67108863&C,te=Math.min(f,o.length-1),oe=Math.max(0,f-I.length+1);oe<=te;oe++){var de=f-oe|0;k+=(F=(g=0|I.words[de])*(D=0|o.words[oe])+se)/67108864|0,se=67108863&F}a.words[f]=0|se,C=0|k}return 0!==C?a.words[f]=0|C:a.length--,a.strip()}l.prototype.toString=function(o,a){var d;if(a=0|a||1,16===(o=o||10)||"hex"===o){d="";for(var g=0,D=0,F=0;F>>24-g&16777215)||F!==this.length-1?_[6-C.length]+C+d:C+d,(g+=2)>=26&&(g-=26,F--)}for(0!==D&&(d=D.toString(16)+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],k=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(k).toString(o);d=(se=se.idivn(k)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,a){return w(typeof m<"u"),this.toArrayLike(m,o,a)},l.prototype.toArray=function(o,a){return this.toArrayLike(Array,o,a)},l.prototype.toArrayLike=function(o,a,d){var g=this.byteLength(),D=d||Math.max(1,g);w(g<=D,"byte array longer than desired length"),w(D>0,"Requested array length <= 0"),this.strip();var C,f,F="le"===a,z=new o(D),k=this.clone();if(F){for(f=0;!k.isZero();f++)C=k.andln(255),k.iushrn(8),z[f]=C;for(;f=4096&&(d+=13,a>>>=13),a>=64&&(d+=7,a>>>=7),a>=8&&(d+=4,a>>>=4),a>=2&&(d+=2,a>>>=2),d+a},l.prototype._zeroBits=function(o){if(0===o)return 26;var a=o,d=0;return 8191&a||(d+=13,a>>>=13),127&a||(d+=7,a>>>=7),15&a||(d+=4,a>>>=4),3&a||(d+=2,a>>>=2),1&a||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],a=this._countBits(o);return 26*(this.length-1)+a},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,a=0;ao.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var a;a=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var a,d;this.length>o.length?(a=this,d=o):(a=o,d=this);for(var g=0;go.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var a=0|Math.ceil(o/26),d=o%26;this._expand(a),d>0&&a--;for(var g=0;g0&&(this.words[g]=~this.words[g]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,a){w("number"==typeof o&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),this.words[d]=a?this.words[d]|1<o.length?(d=this,g=o):(d=o,g=this);for(var D=0,F=0;F>>26;for(;0!==D&&F>>26;if(this.length=d.length,0!==D)this.words[this.length]=D,this.length++;else if(d!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var a=this.iadd(o);return o.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var g,D,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(g=this,D=o):(g=o,D=this);for(var F=0,z=0;z>26,this.words[z]=67108863&a;for(;0!==F&&z>26,this.words[z]=67108863&a;if(0===F&&z>>13,de=0|g[1],Ie=8191&de,ye=de>>>13,ve=0|g[2],ae=8191&ve,fe=ve>>>13,pe=0|g[3],Se=8191&pe,ce=pe>>>13,be=0|g[4],Ne=8191&be,Fe=be>>>13,lt=0|g[5],Ge=8191<,He=lt>>>13,Kt=0|g[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|g[7],ot=8191&Vt,at=Vt>>>13,Gt=0|g[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|g[9],Be=8191&Te,Ve=Te>>>13,mt=0|D[0],Ze=8191&mt,ct=mt>>>13,hn=0|D[1],ft=8191&hn,At=hn>>>13,wn=0|D[2],ze=8191&wn,Qe=wn>>>13,Ht=0|D[3],pt=8191&Ht,vt=Ht>>>13,$t=0|D[4],dt=8191&$t,gt=$t>>>13,mn=0|D[5],ut=8191&mn,wt=mn>>>13,Sn=0|D[6],yt=8191&Sn,Et=Sn>>>13,_e=0|D[7],Ee=8191&_e,Me=_e>>>13,me=0|D[8],Oe=8191&me,Ke=me>>>13,it=0|D[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^a.negative,d.length=19;var Bt=(z+(C=Math.imul(te,Ze))|0)+((8191&(f=(f=Math.imul(te,ct))+Math.imul(oe,Ze)|0))<<13)|0;z=((k=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,C=Math.imul(Ie,Ze),f=(f=Math.imul(Ie,ct))+Math.imul(ye,Ze)|0,k=Math.imul(ye,ct);var It=(z+(C=C+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(oe,ft)|0))<<13)|0;z=((k=k+Math.imul(oe,At)|0)+(f>>>13)|0)+(It>>>26)|0,It&=67108863,C=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,k=Math.imul(fe,ct),C=C+Math.imul(Ie,ft)|0,f=(f=f+Math.imul(Ie,At)|0)+Math.imul(ye,ft)|0,k=k+Math.imul(ye,At)|0;var kt=(z+(C=C+Math.imul(te,ze)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;z=((k=k+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,C=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,k=Math.imul(ce,ct),C=C+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,k=k+Math.imul(fe,At)|0,C=C+Math.imul(Ie,ze)|0,f=(f=f+Math.imul(Ie,Qe)|0)+Math.imul(ye,ze)|0,k=k+Math.imul(ye,Qe)|0;var Ot=(z+(C=C+Math.imul(te,pt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;z=((k=k+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,C=Math.imul(Ne,Ze),f=(f=Math.imul(Ne,ct))+Math.imul(Fe,Ze)|0,k=Math.imul(Fe,ct),C=C+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,k=k+Math.imul(ce,At)|0,C=C+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,k=k+Math.imul(fe,Qe)|0,C=C+Math.imul(Ie,pt)|0,f=(f=f+Math.imul(Ie,vt)|0)+Math.imul(ye,pt)|0,k=k+Math.imul(ye,vt)|0;var Nt=(z+(C=C+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;z=((k=k+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,C=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,k=Math.imul(He,ct),C=C+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,ft)|0,k=k+Math.imul(Fe,At)|0,C=C+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,k=k+Math.imul(ce,Qe)|0,C=C+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,k=k+Math.imul(fe,vt)|0,C=C+Math.imul(Ie,dt)|0,f=(f=f+Math.imul(Ie,gt)|0)+Math.imul(ye,dt)|0,k=k+Math.imul(ye,gt)|0;var Lt=(z+(C=C+Math.imul(te,ut)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;z=((k=k+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,C=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,k=Math.imul(nt,ct),C=C+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,k=k+Math.imul(He,At)|0,C=C+Math.imul(Ne,ze)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,ze)|0,k=k+Math.imul(Fe,Qe)|0,C=C+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,k=k+Math.imul(ce,vt)|0,C=C+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,k=k+Math.imul(fe,gt)|0,C=C+Math.imul(Ie,ut)|0,f=(f=f+Math.imul(Ie,wt)|0)+Math.imul(ye,ut)|0,k=k+Math.imul(ye,wt)|0;var nn=(z+(C=C+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;z=((k=k+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,k=Math.imul(at,ct),C=C+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,k=k+Math.imul(nt,At)|0,C=C+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,k=k+Math.imul(He,Qe)|0,C=C+Math.imul(Ne,pt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,pt)|0,k=k+Math.imul(Fe,vt)|0,C=C+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,k=k+Math.imul(ce,gt)|0,C=C+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,k=k+Math.imul(fe,wt)|0,C=C+Math.imul(Ie,yt)|0,f=(f=f+Math.imul(Ie,Et)|0)+Math.imul(ye,yt)|0,k=k+Math.imul(ye,Et)|0;var Yt=(z+(C=C+Math.imul(te,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(te,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;z=((k=k+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,C=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,k=Math.imul(Ae,ct),C=C+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,k=k+Math.imul(at,At)|0,C=C+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,k=k+Math.imul(nt,Qe)|0,C=C+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,k=k+Math.imul(He,vt)|0,C=C+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,dt)|0,k=k+Math.imul(Fe,gt)|0,C=C+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,k=k+Math.imul(ce,wt)|0,C=C+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,k=k+Math.imul(fe,Et)|0,C=C+Math.imul(Ie,Ee)|0,f=(f=f+Math.imul(Ie,Me)|0)+Math.imul(ye,Ee)|0,k=k+Math.imul(ye,Me)|0;var gn=(z+(C=C+Math.imul(te,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;z=((k=k+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,C=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,k=Math.imul(Ve,ct),C=C+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,k=k+Math.imul(Ae,At)|0,C=C+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,k=k+Math.imul(at,Qe)|0,C=C+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,k=k+Math.imul(nt,vt)|0,C=C+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,k=k+Math.imul(He,gt)|0,C=C+Math.imul(Ne,ut)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ut)|0,k=k+Math.imul(Fe,wt)|0,C=C+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,k=k+Math.imul(ce,Et)|0,C=C+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,k=k+Math.imul(fe,Me)|0,C=C+Math.imul(Ie,Oe)|0,f=(f=f+Math.imul(Ie,Ke)|0)+Math.imul(ye,Oe)|0,k=k+Math.imul(ye,Ke)|0;var an=(z+(C=C+Math.imul(te,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;z=((k=k+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,C=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,k=Math.imul(Ve,At),C=C+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,k=k+Math.imul(Ae,Qe)|0,C=C+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,k=k+Math.imul(at,vt)|0,C=C+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,k=k+Math.imul(nt,gt)|0,C=C+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,k=k+Math.imul(He,wt)|0,C=C+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,Et)|0)+Math.imul(Fe,yt)|0,k=k+Math.imul(Fe,Et)|0,C=C+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,k=k+Math.imul(ce,Me)|0,C=C+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,k=k+Math.imul(fe,Ke)|0;var tn=(z+(C=C+Math.imul(Ie,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ie,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;z=((k=k+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,k=Math.imul(Ve,Qe),C=C+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,k=k+Math.imul(Ae,vt)|0,C=C+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,k=k+Math.imul(at,gt)|0,C=C+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,k=k+Math.imul(nt,wt)|0,C=C+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,k=k+Math.imul(He,Et)|0,C=C+Math.imul(Ne,Ee)|0,f=(f=f+Math.imul(Ne,Me)|0)+Math.imul(Fe,Ee)|0,k=k+Math.imul(Fe,Me)|0,C=C+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,k=k+Math.imul(ce,Ke)|0;var Ut=(z+(C=C+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,C=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,k=Math.imul(Ve,vt),C=C+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,k=k+Math.imul(Ae,gt)|0,C=C+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,k=k+Math.imul(at,wt)|0,C=C+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,k=k+Math.imul(nt,Et)|0,C=C+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,k=k+Math.imul(He,Me)|0,C=C+Math.imul(Ne,Oe)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,Oe)|0,k=k+Math.imul(Fe,Ke)|0;var cn=(z+(C=C+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;z=((k=k+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,C=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,k=Math.imul(Ve,gt),C=C+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,k=k+Math.imul(Ae,wt)|0,C=C+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,k=k+Math.imul(at,Et)|0,C=C+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,k=k+Math.imul(nt,Me)|0,C=C+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,k=k+Math.imul(He,Ke)|0;var Jt=(z+(C=C+Math.imul(Ne,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,C=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,k=Math.imul(Ve,wt),C=C+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,k=k+Math.imul(Ae,Et)|0,C=C+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,k=k+Math.imul(at,Me)|0,C=C+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,k=k+Math.imul(nt,Ke)|0;var Zt=(z+(C=C+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;z=((k=k+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,C=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,k=Math.imul(Ve,Et),C=C+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,k=k+Math.imul(Ae,Me)|0,C=C+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,k=k+Math.imul(at,Ke)|0;var fn=(z+(C=C+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;z=((k=k+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,C=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,k=Math.imul(Ve,Me),C=C+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,k=k+Math.imul(Ae,Ke)|0;var Qt=(z+(C=C+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;z=((k=k+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,C=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,k=Math.imul(Ve,Ke);var Dt=(z+(C=C+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;z=((k=k+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(z+(C=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return z=((k=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,F[0]=Bt,F[1]=It,F[2]=kt,F[3]=Ot,F[4]=Nt,F[5]=Lt,F[6]=nn,F[7]=Yt,F[8]=gn,F[9]=an,F[10]=tn,F[11]=Ut,F[12]=cn,F[13]=Jt,F[14]=Zt,F[15]=fn,F[16]=Qt,F[17]=Dt,F[18]=Mt,0!==z&&(F[19]=z,d.length++),d};function j(I,o,a){return(new B).mulp(I,o,a)}function B(I,o){this.x=I,this.y=o}Math.imul||(L=T),l.prototype.mulTo=function(o,a){var d,g=this.length+o.length;return d=10===this.length&&10===o.length?L(this,o,a):g<63?T(this,o,a):g<1024?function N(I,o,a){a.negative=o.negative^I.negative,a.length=I.length+o.length;for(var d=0,g=0,D=0;D>>26)|0)>>>26,F&=67108863}a.words[D]=z,d=F,F=g}return 0!==d?a.words[D]=d:a.length--,a.strip()}(this,o,a):j(this,o,a),d},B.prototype.makeRBT=function(o){for(var a=new Array(o),d=l.prototype._countBits(o)-1,g=0;g>=1;return g},B.prototype.permute=function(o,a,d,g,D,F){for(var z=0;z>>=1)D++;return 1<>>=13,d[2*F+1]=8191&D,D>>>=13;for(F=2*a;F>=26,a+=g/67108864|0,a+=D>>>26,this.words[d]=67108863&D}return 0!==a&&(this.words[d]=a,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var a=function x(I){for(var o=new Array(I.bitLength()),a=0;a>>g}return o}(o);if(0===a.length)return new l(1);for(var d=this,g=0;g=0);var D,a=o%26,d=(o-a)/26,g=67108863>>>26-a<<26-a;if(0!==a){var F=0;for(D=0;D>>26-a}F&&(this.words[D]=F,this.length++)}if(0!==d){for(D=this.length-1;D>=0;D--)this.words[D+d]=this.words[D];for(D=0;D=0),g=a?(a-a%26)/26:0;var D=o%26,F=Math.min((o-D)/26,this.length),z=67108863^67108863>>>D<F)for(this.length-=F,f=0;f=0&&(0!==k||f>=g);f--){var se=0|this.words[f];this.words[f]=k<<26-D|se>>>D,k=se&z}return C&&0!==k&&(C.words[C.length++]=k),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,a,d){return w(0===this.negative),this.iushrn(o,a,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var a=o%26,d=(o-a)/26,g=1<=0);var a=o%26,d=(o-a)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==a&&d++,this.length=Math.min(d,this.length),0!==a){var g=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(C/67108864|0),this.words[D+d]=67108863&F}for(;D>26,this.words[D+d]=67108863&F;if(0===z)return this.strip();for(w(-1===z),z=0,D=0;D>26,this.words[D]=67108863&F;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,a){var d=(this.length,o.length),g=this.clone(),D=o,F=0|D.words[D.length-1];0!==(d=26-this._countBits(F))&&(D=D.ushln(d),g.iushln(d),F=0|D.words[D.length-1]);var f,C=g.length-D.length;if("mod"!==a){(f=new l(null)).length=C+1,f.words=new Array(f.length);for(var k=0;k=0;te--){var oe=67108864*(0|g.words[D.length+te])+(0|g.words[D.length+te-1]);for(oe=Math.min(oe/F|0,67108863),g._ishlnsubmul(D,oe,te);0!==g.negative;)oe--,g.negative=0,g._ishlnsubmul(D,1,te),g.isZero()||(g.negative^=1);f&&(f.words[te]=oe)}return f&&f.strip(),g.strip(),"div"!==a&&0!==d&&g.iushrn(d),{div:f||null,mod:g}},l.prototype.divmod=function(o,a,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,a),"mod"!==a&&(g=F.div.neg()),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.iadd(o)),{div:g,mod:D}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),a),"mod"!==a&&(g=F.div.neg()),{div:g,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),a),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.isub(o)),{div:F.div,mod:D}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===a?{div:this.divn(o.words[0]),mod:null}:"mod"===a?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,a);var g,D,F},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var a=this.divmod(o);if(a.mod.isZero())return a.div;var d=0!==a.div.negative?a.mod.isub(o):a.mod,g=o.ushrn(1),D=o.andln(1),F=d.cmp(g);return F<0||1===D&&0===F?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var a=(1<<26)%o,d=0,g=this.length-1;g>=0;g--)d=(a*d+(0|this.words[g]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var a=0,d=this.length-1;d>=0;d--){var g=(0|this.words[d])+67108864*a;this.words[d]=g/o|0,a=g%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=new l(0),z=new l(1),C=0;a.isEven()&&d.isEven();)a.iushrn(1),d.iushrn(1),++C;for(var f=d.clone(),k=a.clone();!a.isZero();){for(var se=0,te=1;!(a.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(a.iushrn(se);se-- >0;)(g.isOdd()||D.isOdd())&&(g.iadd(f),D.isub(k)),g.iushrn(1),D.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(F.isOdd()||z.isOdd())&&(F.iadd(f),z.isub(k)),F.iushrn(1),z.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(F),D.isub(z)):(d.isub(a),F.isub(g),z.isub(D))}return{a:F,b:z,gcd:d.iushln(C)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=d.clone();a.cmpn(1)>0&&d.cmpn(1)>0;){for(var z=0,C=1;!(a.words[0]&C)&&z<26;++z,C<<=1);if(z>0)for(a.iushrn(z);z-- >0;)g.isOdd()&&g.iadd(F),g.iushrn(1);for(var f=0,k=1;!(d.words[0]&k)&&f<26;++f,k<<=1);if(f>0)for(d.iushrn(f);f-- >0;)D.isOdd()&&D.iadd(F),D.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(D)):(d.isub(a),D.isub(g))}return(se=0===a.cmpn(1)?g:D).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var a=this.clone(),d=o.clone();a.negative=0,d.negative=0;for(var g=0;a.isEven()&&d.isEven();g++)a.iushrn(1),d.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;d.isEven();)d.iushrn(1);var D=a.cmp(d);if(D<0){var F=a;a=d,d=F}else if(0===D||0===d.cmpn(1))break;a.isub(d)}return d.iushln(g)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var a=o%26,d=(o-a)/26,g=1<>>26,z&=67108863,this.words[F]=z}return 0!==D&&(this.words[F]=D,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,a=o<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)d=1;else{a&&(o=-o),w(o<=67108863,"Number is too big");var g=0|this.words[0];d=g===o?0:go.length)return 1;if(this.length=0;d--){var g=0|this.words[d],D=0|o.words[d];if(g!==D){gD&&(a=1);break}}return a},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new Z(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var V={k256:null,p224:null,p192:null,p25519:null};function G(I,o){this.name=I,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function W(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Z(I){if("string"==typeof I){var o=l._prime(I);this.m=o.p,this.prime=o}else w(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}function ee(I){Z.call(this,I),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}G.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},G.prototype.ireduce=function(o){var d,a=o;do{this.split(a,this.tmp),d=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(d>this.n);var g=d0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},G.prototype.split=function(o,a){o.iushrn(this.n,0,a)},G.prototype.imulK=function(o){return o.imul(this.k)},E(W,G),W.prototype.split=function(o,a){for(var d=4194303,g=Math.min(o.length,9),D=0;D>>22,F=z}F>>>=22,o.words[D-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},W.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var a=0,d=0;d>>=26,o.words[d]=D,a=g}return 0!==a&&(o.words[o.length++]=a),o},l._prime=function(o){if(V[o])return V[o];var a;if("k256"===o)a=new W;else if("p224"===o)a=new Q;else if("p192"===o)a=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);a=new J}return V[o]=a,a},Z.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},Z.prototype._verify2=function(o,a){w(0==(o.negative|a.negative),"red works only with positives"),w(o.red&&o.red===a.red,"red works only with red numbers")},Z.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},Z.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},Z.prototype.add=function(o,a){this._verify2(o,a);var d=o.add(a);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},Z.prototype.iadd=function(o,a){this._verify2(o,a);var d=o.iadd(a);return d.cmp(this.m)>=0&&d.isub(this.m),d},Z.prototype.sub=function(o,a){this._verify2(o,a);var d=o.sub(a);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},Z.prototype.isub=function(o,a){this._verify2(o,a);var d=o.isub(a);return d.cmpn(0)<0&&d.iadd(this.m),d},Z.prototype.shl=function(o,a){return this._verify1(o),this.imod(o.ushln(a))},Z.prototype.imul=function(o,a){return this._verify2(o,a),this.imod(o.imul(a))},Z.prototype.mul=function(o,a){return this._verify2(o,a),this.imod(o.mul(a))},Z.prototype.isqr=function(o){return this.imul(o,o.clone())},Z.prototype.sqr=function(o){return this.mul(o,o)},Z.prototype.sqrt=function(o){if(o.isZero())return o.clone();var a=this.m.andln(3);if(w(a%2==1),3===a){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),D=0;!g.isZero()&&0===g.andln(1);)D++,g.iushrn(1);w(!g.isZero());var F=new l(1).toRed(this),z=F.redNeg(),C=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,C).cmp(z);)f.redIAdd(z);for(var k=this.pow(f,g),se=this.pow(o,g.addn(1).iushrn(1)),te=this.pow(o,g),oe=D;0!==te.cmp(F);){for(var de=te,Ie=0;0!==de.cmp(F);Ie++)de=de.redSqr();w(Ie=0;D--){for(var k=a.words[D],se=f-1;se>=0;se--){var te=k>>se&1;(F!==g[0]&&(F=this.sqr(F)),0!==te||0!==z)?(z<<=1,z|=te,(4===++C||0===D&&0===se)&&(F=this.mul(F,g[z]),C=0,z=0)):C=0}f=26}return F},Z.prototype.convertTo=function(o){var a=o.umod(this.m);return a===o?a.clone():a},Z.prototype.convertFrom=function(o){var a=o.clone();return a.red=null,a},l.mont=function(o){return new ee(o)},E(ee,Z),ee.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},ee.prototype.convertFrom=function(o){var a=this.imod(o.mul(this.rinv));return a.red=null,a},ee.prototype.imul=function(o,a){if(o.isZero()||a.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.mul=function(o,a){if(o.isZero()||a.isZero())return new l(0)._forceRed(this);var d=o.mul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=p.nmd(ne),this)},21082:(ne,s,p)=>{"use strict";var h=p(73502).Buffer;ne.exports=function M(w){if(w.length>=255)throw new TypeError("Alphabet too long");for(var E=new Uint8Array(256),l=0;l>>0,W=new Uint8Array(G);N[j];){var Q=E[N.charCodeAt(j)];if(255===Q)return;for(var q=0,J=G-1;(0!==Q||q>>0,W[J]=Q%256>>>0,Q=Q/256>>>0;if(0!==Q)throw new Error("Non-zero carry");V=q,j++}for(var Z=G-V;Z!==G&&0===W[Z];)Z++;var ee=h.allocUnsafe(B+(G-Z));ee.fill(0,0,B);for(var I=B;Z!==G;)ee[I++]=W[Z++];return ee}return{encode:function x(N){if((Array.isArray(N)||N instanceof Uint8Array)&&(N=h.from(N)),!h.isBuffer(N))throw new TypeError("Expected Buffer");if(0===N.length)return"";for(var j=0,B=0,V=0,G=N.length;V!==G&&0===N[V];)V++,j++;for(var W=(G-V)*P+1>>>0,Q=new Uint8Array(W);V!==G;){for(var q=N[V],J=0,Z=W-1;(0!==q||J>>0,Q[Z]=q%S>>>0,q=q/S>>>0;if(0!==q)throw new Error("Non-zero carry");B=J,V++}for(var ee=W-B;ee!==W&&0===Q[ee];)ee++;for(var I=_.repeat(j);ee{"use strict";s.byteLength=function y(x){var T=m(x),L=T[0],N=T[1];return 3*(L+N)/4-N},s.toByteArray=function S(x){var T,W,L=m(x),N=L[0],j=L[1],B=new M(function b(x,T,L){return 3*(T+L)/4-L}(0,N,j)),V=0,G=j>0?N-4:N;for(W=0;W>16&255,B[V++]=T>>8&255,B[V++]=255&T;return 2===j&&(T=h[x.charCodeAt(W)]<<2|h[x.charCodeAt(W+1)]>>4,B[V++]=255&T),1===j&&(T=h[x.charCodeAt(W)]<<10|h[x.charCodeAt(W+1)]<<4|h[x.charCodeAt(W+2)]>>2,B[V++]=T>>8&255,B[V++]=255&T),B},s.fromByteArray=function P(x){for(var T,L=x.length,N=L%3,j=[],B=16383,V=0,G=L-N;VG?G:V+B));return 1===N?(T=x[L-1],j.push(p[T>>2]+p[T<<4&63]+"==")):2===N&&(T=(x[L-2]<<8)+x[L-1],j.push(p[T>>10]+p[T>>4&63]+p[T<<2&63]+"=")),j.join("")};for(var p=[],h=[],M=typeof Uint8Array<"u"?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=0,l=w.length;E0)throw new Error("Invalid string. Length must be a multiple of 4");var L=x.indexOf("=");return-1===L&&(L=T),[L,L===T?0:4-L%4]}function _(x){return p[x>>18&63]+p[x>>12&63]+p[x>>6&63]+p[63&x]}function A(x,T,L){for(var N,j=[],B=T;B{"use strict";for(var s="qpzry9x8gf2tvdw0s3jn54khce6mua7l",p={},h=0;h>25;return(33554431&T)<<5^996825010&-(L>>0&1)^642813549&-(L>>1&1)^513874426&-(L>>2&1)^1027748829&-(L>>3&1)^705979059&-(L>>4&1)}function E(T){for(var L=1,N=0;N126)return"Invalid prefix ("+T+")";L=w(L)^j>>5}for(L=w(L),N=0;NL)return"Exceeds length limit";var N=T.toLowerCase(),j=T.toUpperCase();if(T!==N&&T!==j)return"Mixed-case string "+T;var B=(T=N).lastIndexOf("1");if(-1===B)return"No separator character for "+T;if(0===B)return"Missing prefix for "+T;var V=T.slice(0,B),G=T.slice(B+1);if(G.length<6)return"Data too short";var W=E(V);if("string"==typeof W)return W;for(var Q=[],q=0;q=G.length)&&Q.push(Z)}return 1!==W?"Invalid checksum for "+T:{prefix:V,words:Q}}function S(T,L,N,j){for(var B=0,V=0,G=(1<=N;)V-=N,W.push(B>>V&G);if(j)V>0&&W.push(B<=L)return"Excess padding";if(B<N)throw new TypeError("Exceeds length limit");var j=E(T=T.toLowerCase());if("string"==typeof j)throw new Error(j);for(var B=T+"1",V=0;V>5)throw new Error("Non 5-bit word");j=w(j)^G,B+=s.charAt(G)}for(V=0;V<6;++V)j=w(j);for(j^=1,V=0;V<6;++V){var W=j>>5*(5-V)&31;B+=s.charAt(W)}return B},toWordsUnsafe:function _(T){var L=S(T,8,5,!0);if(Array.isArray(L))return L},toWords:function A(T){var L=S(T,8,5,!0);if(Array.isArray(L))return L;throw new Error(L)},fromWordsUnsafe:function P(T){var L=S(T,5,8,!1);if(Array.isArray(L))return L},fromWords:function x(T){var L=S(T,5,8,!1);if(Array.isArray(L))return L;throw new Error(L)}}},48670:(ne,s,p)=>{var h;h=typeof window<"u"&&window.crypto?function(G){var W=new Uint32Array(G);return Buffer.from(window.crypto.getRandomValues(W))}:p(41348).randomBytes;var M=p(96386),w=p(99357).pbkdf2Sync,E=p(24457),l=E,m="Invalid mnemonic",y="Invalid entropy",b="Invalid mnemonic checksum";function S(G,W,Q){for(;G.length32)throw new Error(y);if(I.length%4!=0)throw new Error(y);var o=Buffer.from(I);if(P(o)!==ee)throw new Error(b);return o.toString("hex")}function j(G,W){if(Buffer.isBuffer(G)||(G=Buffer.from(G,"hex")),W=W||l,G.length<16)throw new TypeError(y);if(G.length>32)throw new TypeError(y);if(G.length%4!=0)throw new TypeError(y);return(A([].slice.call(G))+P(G)).match(/(.{1,11})/g).map(function(I){var o=_(I);return W[o]}).join(" ")}ne.exports={mnemonicToSeed:T,mnemonicToSeedHex:function L(G,W){return T(G,W).toString("hex")},mnemonicToEntropy:N,entropyToMnemonic:j,generateMnemonic:function B(G,W,Q){if((G=G||128)%32!=0)throw new TypeError(y);return j((W=W||h)(G/8),Q)},validateMnemonic:function V(G,W){try{N(G,W)}catch{return!1}return!0},wordlists:{EN:E}}},98538:function(ne,s,p){(function(h,M){"use strict";function w(d,g){if(!d)throw new Error(g||"Assertion failed")}function E(d,g){d.super_=g;var D=function(){};D.prototype=g.prototype,d.prototype=new D,d.prototype.constructor=d}function l(d,g,D){if(l.isBN(d))return d;this.negative=0,this.words=null,this.length=0,this.red=null,null!==d&&(("le"===g||"be"===g)&&(D=g,g=10),this._init(d||0,g||10,D||"be"))}var m;"object"==typeof h?h.exports=l:M.BN=l,l.BN=l,l.wordSize=26;try{m=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:p(46601).Buffer}catch{}function y(d,g){var D=d.charCodeAt(g);return D>=48&&D<=57?D-48:D>=65&&D<=70?D-55:D>=97&&D<=102?D-87:void w(!1,"Invalid character in "+d)}function b(d,g,D){var F=y(d,D);return D-1>=g&&(F|=y(d,D-1)<<4),F}function S(d,g,D,F){for(var z=0,C=0,f=Math.min(d.length,D),k=g;k=49?se-49+10:se>=17?se-17+10:se,w(se>=0&&C0?g:D},l.min=function(g,D){return g.cmp(D)<0?g:D},l.prototype._init=function(g,D,F){if("number"==typeof g)return this._initNumber(g,D,F);if("object"==typeof g)return this._initArray(g,D,F);"hex"===D&&(D=16),w(D===(0|D)&&D>=2&&D<=36);var z=0;"-"===(g=g.toString().replace(/\s+/g,""))[0]&&(z++,this.negative=1),z=0;z-=3)f=g[z]|g[z-1]<<8|g[z-2]<<16,this.words[C]|=f<>>26-k&67108863,(k+=24)>=26&&(k-=26,C++);else if("le"===F)for(z=0,C=0;z>>26-k&67108863,(k+=24)>=26&&(k-=26,C++);return this._strip()},l.prototype._parseHex=function(g,D,F){this.length=Math.ceil((g.length-D)/6),this.words=new Array(this.length);for(var z=0;z=D;z-=2)k=b(g,D,z)<=18?(C-=18,f+=1,this.words[f]|=k>>>26):C+=8;else for(z=(g.length-D)%2==0?D+1:D;z=18?(C-=18,f+=1,this.words[f]|=k>>>26):C+=8;this._strip()},l.prototype._parseBase=function(g,D,F){this.words=[0],this.length=1;for(var z=0,C=1;C<=67108863;C*=D)z++;z--,C=C/D|0;for(var f=g.length-F,k=f%z,se=Math.min(f,f-k)+F,te=0,oe=F;oe1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},typeof Symbol<"u"&&"function"==typeof Symbol.for)try{l.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{l.prototype.inspect=A}else l.prototype.inspect=A;function A(){return(this.red?""}var P=["","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"],x=[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],T=[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];l.prototype.toString=function(g,D){var F;if(D=0|D||1,16===(g=g||10)||"hex"===g){F="";for(var z=0,C=0,f=0;f>>24-z&16777215,(z+=2)>=26&&(z-=26,f--),F=0!==C||f!==this.length-1?P[6-se.length]+se+F:se+F}for(0!==C&&(F=C.toString(16)+F);F.length%D!=0;)F="0"+F;return 0!==this.negative&&(F="-"+F),F}if(g===(0|g)&&g>=2&&g<=36){var te=x[g],oe=T[g];F="";var de=this.clone();for(de.negative=0;!de.isZero();){var Ie=de.modrn(oe).toString(g);F=(de=de.idivn(oe)).isZero()?Ie+F:P[te-Ie.length]+Ie+F}for(this.isZero()&&(F="0"+F);F.length%D!=0;)F="0"+F;return 0!==this.negative&&(F="-"+F),F}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var g=this.words[0];return 2===this.length?g+=67108864*this.words[1]:3===this.length&&1===this.words[2]?g+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-g:g},l.prototype.toJSON=function(){return this.toString(16,2)},m&&(l.prototype.toBuffer=function(g,D){return this.toArrayLike(m,g,D)}),l.prototype.toArray=function(g,D){return this.toArrayLike(Array,g,D)};function j(d,g,D){D.negative=g.negative^d.negative;var F=d.length+g.length|0;D.length=F,F=F-1|0;var z=0|d.words[0],C=0|g.words[0],f=z*C,k=67108863&f,se=f/67108864|0;D.words[0]=k;for(var te=1;te>>26,de=67108863&se,Ie=Math.min(te,g.length-1),ye=Math.max(0,te-d.length+1);ye<=Ie;ye++){var ve=te-ye|0;oe+=(f=(z=0|d.words[ve])*(C=0|g.words[ye])+de)/67108864|0,de=67108863&f}D.words[te]=0|de,se=0|oe}return 0!==se?D.words[te]=0|se:D.length--,D._strip()}l.prototype.toArrayLike=function(g,D,F){this._strip();var z=this.byteLength(),C=F||Math.max(1,z);w(z<=C,"byte array longer than desired length"),w(C>0,"Requested array length <= 0");var f=function(g,D){return g.allocUnsafe?g.allocUnsafe(D):new g(D)}(g,C);return this["_toArrayLike"+("le"===D?"LE":"BE")](f,z),f},l.prototype._toArrayLikeLE=function(g,D){for(var F=0,z=0,C=0,f=0;C>8&255),F>16&255),6===f?(F>24&255),z=0,f=0):(z=k>>>24,f+=2)}if(F=0&&(g[F--]=k>>8&255),F>=0&&(g[F--]=k>>16&255),6===f?(F>=0&&(g[F--]=k>>24&255),z=0,f=0):(z=k>>>24,f+=2)}if(F>=0)for(g[F--]=z;F>=0;)g[F--]=0},Math.clz32?l.prototype._countBits=function(g){return 32-Math.clz32(g)}:l.prototype._countBits=function(g){var D=g,F=0;return D>=4096&&(F+=13,D>>>=13),D>=64&&(F+=7,D>>>=7),D>=8&&(F+=4,D>>>=4),D>=2&&(F+=2,D>>>=2),F+D},l.prototype._zeroBits=function(g){if(0===g)return 26;var D=g,F=0;return 8191&D||(F+=13,D>>>=13),127&D||(F+=7,D>>>=7),15&D||(F+=4,D>>>=4),3&D||(F+=2,D>>>=2),1&D||F++,F},l.prototype.bitLength=function(){var g=this.words[this.length-1],D=this._countBits(g);return 26*(this.length-1)+D},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,D=0;Dg.length?this.clone().ior(g):g.clone().ior(this)},l.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},l.prototype.iuand=function(g){var D;D=this.length>g.length?g:this;for(var F=0;Fg.length?this.clone().iand(g):g.clone().iand(this)},l.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},l.prototype.iuxor=function(g){var D,F;this.length>g.length?(D=this,F=g):(D=g,F=this);for(var z=0;zg.length?this.clone().ixor(g):g.clone().ixor(this)},l.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},l.prototype.inotn=function(g){w("number"==typeof g&&g>=0);var D=0|Math.ceil(g/26),F=g%26;this._expand(D),F>0&&D--;for(var z=0;z0&&(this.words[z]=~this.words[z]&67108863>>26-F),this._strip()},l.prototype.notn=function(g){return this.clone().inotn(g)},l.prototype.setn=function(g,D){w("number"==typeof g&&g>=0);var F=g/26|0,z=g%26;return this._expand(F+1),this.words[F]=D?this.words[F]|1<g.length?(F=this,z=g):(F=g,z=this);for(var C=0,f=0;f>>26;for(;0!==C&&f>>26;if(this.length=F.length,0!==C)this.words[this.length]=C,this.length++;else if(F!==this)for(;fg.length?this.clone().iadd(g):g.clone().iadd(this)},l.prototype.isub=function(g){if(0!==g.negative){g.negative=0;var D=this.iadd(g);return g.negative=1,D._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var z,C,F=this.cmp(g);if(0===F)return this.negative=0,this.length=1,this.words[0]=0,this;F>0?(z=this,C=g):(z=g,C=this);for(var f=0,k=0;k>26,this.words[k]=67108863&D;for(;0!==f&&k>26,this.words[k]=67108863&D;if(0===f&&k>>13,ve=0|z[1],ae=8191&ve,fe=ve>>>13,pe=0|z[2],Se=8191&pe,ce=pe>>>13,be=0|z[3],Ne=8191&be,Fe=be>>>13,lt=0|z[4],Ge=8191<,He=lt>>>13,Kt=0|z[5],tt=8191&Kt,nt=Kt>>>13,Vt=0|z[6],ot=8191&Vt,at=Vt>>>13,Gt=0|z[7],Re=8191&Gt,Ae=Gt>>>13,Te=0|z[8],Be=8191&Te,Ve=Te>>>13,mt=0|z[9],Ze=8191&mt,ct=mt>>>13,hn=0|C[0],ft=8191&hn,At=hn>>>13,wn=0|C[1],ze=8191&wn,Qe=wn>>>13,Ht=0|C[2],pt=8191&Ht,vt=Ht>>>13,$t=0|C[3],dt=8191&$t,gt=$t>>>13,mn=0|C[4],ut=8191&mn,wt=mn>>>13,Sn=0|C[5],yt=8191&Sn,Et=Sn>>>13,_e=0|C[6],Ee=8191&_e,Me=_e>>>13,me=0|C[7],Oe=8191&me,Ke=me>>>13,it=0|C[8],Ye=8191&it,qe=it>>>13,Bt=0|C[9],It=8191&Bt,kt=Bt>>>13;F.negative=g.negative^D.negative,F.length=19;var Ot=(k+(se=Math.imul(Ie,ft))|0)+((8191&(te=(te=Math.imul(Ie,At))+Math.imul(ye,ft)|0))<<13)|0;k=((oe=Math.imul(ye,At))+(te>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,se=Math.imul(ae,ft),te=(te=Math.imul(ae,At))+Math.imul(fe,ft)|0,oe=Math.imul(fe,At);var Nt=(k+(se=se+Math.imul(Ie,ze)|0)|0)+((8191&(te=(te=te+Math.imul(Ie,Qe)|0)+Math.imul(ye,ze)|0))<<13)|0;k=((oe=oe+Math.imul(ye,Qe)|0)+(te>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,se=Math.imul(Se,ft),te=(te=Math.imul(Se,At))+Math.imul(ce,ft)|0,oe=Math.imul(ce,At),se=se+Math.imul(ae,ze)|0,te=(te=te+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,oe=oe+Math.imul(fe,Qe)|0;var Lt=(k+(se=se+Math.imul(Ie,pt)|0)|0)+((8191&(te=(te=te+Math.imul(Ie,vt)|0)+Math.imul(ye,pt)|0))<<13)|0;k=((oe=oe+Math.imul(ye,vt)|0)+(te>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,se=Math.imul(Ne,ft),te=(te=Math.imul(Ne,At))+Math.imul(Fe,ft)|0,oe=Math.imul(Fe,At),se=se+Math.imul(Se,ze)|0,te=(te=te+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,oe=oe+Math.imul(ce,Qe)|0,se=se+Math.imul(ae,pt)|0,te=(te=te+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,oe=oe+Math.imul(fe,vt)|0;var nn=(k+(se=se+Math.imul(Ie,dt)|0)|0)+((8191&(te=(te=te+Math.imul(Ie,gt)|0)+Math.imul(ye,dt)|0))<<13)|0;k=((oe=oe+Math.imul(ye,gt)|0)+(te>>>13)|0)+(nn>>>26)|0,nn&=67108863,se=Math.imul(Ge,ft),te=(te=Math.imul(Ge,At))+Math.imul(He,ft)|0,oe=Math.imul(He,At),se=se+Math.imul(Ne,ze)|0,te=(te=te+Math.imul(Ne,Qe)|0)+Math.imul(Fe,ze)|0,oe=oe+Math.imul(Fe,Qe)|0,se=se+Math.imul(Se,pt)|0,te=(te=te+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,oe=oe+Math.imul(ce,vt)|0,se=se+Math.imul(ae,dt)|0,te=(te=te+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,oe=oe+Math.imul(fe,gt)|0;var Yt=(k+(se=se+Math.imul(Ie,ut)|0)|0)+((8191&(te=(te=te+Math.imul(Ie,wt)|0)+Math.imul(ye,ut)|0))<<13)|0;k=((oe=oe+Math.imul(ye,wt)|0)+(te>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,se=Math.imul(tt,ft),te=(te=Math.imul(tt,At))+Math.imul(nt,ft)|0,oe=Math.imul(nt,At),se=se+Math.imul(Ge,ze)|0,te=(te=te+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,oe=oe+Math.imul(He,Qe)|0,se=se+Math.imul(Ne,pt)|0,te=(te=te+Math.imul(Ne,vt)|0)+Math.imul(Fe,pt)|0,oe=oe+Math.imul(Fe,vt)|0,se=se+Math.imul(Se,dt)|0,te=(te=te+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,oe=oe+Math.imul(ce,gt)|0,se=se+Math.imul(ae,ut)|0,te=(te=te+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,oe=oe+Math.imul(fe,wt)|0;var gn=(k+(se=se+Math.imul(Ie,yt)|0)|0)+((8191&(te=(te=te+Math.imul(Ie,Et)|0)+Math.imul(ye,yt)|0))<<13)|0;k=((oe=oe+Math.imul(ye,Et)|0)+(te>>>13)|0)+(gn>>>26)|0,gn&=67108863,se=Math.imul(ot,ft),te=(te=Math.imul(ot,At))+Math.imul(at,ft)|0,oe=Math.imul(at,At),se=se+Math.imul(tt,ze)|0,te=(te=te+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,oe=oe+Math.imul(nt,Qe)|0,se=se+Math.imul(Ge,pt)|0,te=(te=te+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,oe=oe+Math.imul(He,vt)|0,se=se+Math.imul(Ne,dt)|0,te=(te=te+Math.imul(Ne,gt)|0)+Math.imul(Fe,dt)|0,oe=oe+Math.imul(Fe,gt)|0,se=se+Math.imul(Se,ut)|0,te=(te=te+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,oe=oe+Math.imul(ce,wt)|0,se=se+Math.imul(ae,yt)|0,te=(te=te+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,oe=oe+Math.imul(fe,Et)|0;var an=(k+(se=se+Math.imul(Ie,Ee)|0)|0)+((8191&(te=(te=te+Math.imul(Ie,Me)|0)+Math.imul(ye,Ee)|0))<<13)|0;k=((oe=oe+Math.imul(ye,Me)|0)+(te>>>13)|0)+(an>>>26)|0,an&=67108863,se=Math.imul(Re,ft),te=(te=Math.imul(Re,At))+Math.imul(Ae,ft)|0,oe=Math.imul(Ae,At),se=se+Math.imul(ot,ze)|0,te=(te=te+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,oe=oe+Math.imul(at,Qe)|0,se=se+Math.imul(tt,pt)|0,te=(te=te+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,oe=oe+Math.imul(nt,vt)|0,se=se+Math.imul(Ge,dt)|0,te=(te=te+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,oe=oe+Math.imul(He,gt)|0,se=se+Math.imul(Ne,ut)|0,te=(te=te+Math.imul(Ne,wt)|0)+Math.imul(Fe,ut)|0,oe=oe+Math.imul(Fe,wt)|0,se=se+Math.imul(Se,yt)|0,te=(te=te+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,oe=oe+Math.imul(ce,Et)|0,se=se+Math.imul(ae,Ee)|0,te=(te=te+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,oe=oe+Math.imul(fe,Me)|0;var tn=(k+(se=se+Math.imul(Ie,Oe)|0)|0)+((8191&(te=(te=te+Math.imul(Ie,Ke)|0)+Math.imul(ye,Oe)|0))<<13)|0;k=((oe=oe+Math.imul(ye,Ke)|0)+(te>>>13)|0)+(tn>>>26)|0,tn&=67108863,se=Math.imul(Be,ft),te=(te=Math.imul(Be,At))+Math.imul(Ve,ft)|0,oe=Math.imul(Ve,At),se=se+Math.imul(Re,ze)|0,te=(te=te+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,oe=oe+Math.imul(Ae,Qe)|0,se=se+Math.imul(ot,pt)|0,te=(te=te+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,oe=oe+Math.imul(at,vt)|0,se=se+Math.imul(tt,dt)|0,te=(te=te+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,oe=oe+Math.imul(nt,gt)|0,se=se+Math.imul(Ge,ut)|0,te=(te=te+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,oe=oe+Math.imul(He,wt)|0,se=se+Math.imul(Ne,yt)|0,te=(te=te+Math.imul(Ne,Et)|0)+Math.imul(Fe,yt)|0,oe=oe+Math.imul(Fe,Et)|0,se=se+Math.imul(Se,Ee)|0,te=(te=te+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,oe=oe+Math.imul(ce,Me)|0,se=se+Math.imul(ae,Oe)|0,te=(te=te+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,oe=oe+Math.imul(fe,Ke)|0;var Ut=(k+(se=se+Math.imul(Ie,Ye)|0)|0)+((8191&(te=(te=te+Math.imul(Ie,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;k=((oe=oe+Math.imul(ye,qe)|0)+(te>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,se=Math.imul(Ze,ft),te=(te=Math.imul(Ze,At))+Math.imul(ct,ft)|0,oe=Math.imul(ct,At),se=se+Math.imul(Be,ze)|0,te=(te=te+Math.imul(Be,Qe)|0)+Math.imul(Ve,ze)|0,oe=oe+Math.imul(Ve,Qe)|0,se=se+Math.imul(Re,pt)|0,te=(te=te+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,oe=oe+Math.imul(Ae,vt)|0,se=se+Math.imul(ot,dt)|0,te=(te=te+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,oe=oe+Math.imul(at,gt)|0,se=se+Math.imul(tt,ut)|0,te=(te=te+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,oe=oe+Math.imul(nt,wt)|0,se=se+Math.imul(Ge,yt)|0,te=(te=te+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,oe=oe+Math.imul(He,Et)|0,se=se+Math.imul(Ne,Ee)|0,te=(te=te+Math.imul(Ne,Me)|0)+Math.imul(Fe,Ee)|0,oe=oe+Math.imul(Fe,Me)|0,se=se+Math.imul(Se,Oe)|0,te=(te=te+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,oe=oe+Math.imul(ce,Ke)|0,se=se+Math.imul(ae,Ye)|0,te=(te=te+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0,oe=oe+Math.imul(fe,qe)|0;var cn=(k+(se=se+Math.imul(Ie,It)|0)|0)+((8191&(te=(te=te+Math.imul(Ie,kt)|0)+Math.imul(ye,It)|0))<<13)|0;k=((oe=oe+Math.imul(ye,kt)|0)+(te>>>13)|0)+(cn>>>26)|0,cn&=67108863,se=Math.imul(Ze,ze),te=(te=Math.imul(Ze,Qe))+Math.imul(ct,ze)|0,oe=Math.imul(ct,Qe),se=se+Math.imul(Be,pt)|0,te=(te=te+Math.imul(Be,vt)|0)+Math.imul(Ve,pt)|0,oe=oe+Math.imul(Ve,vt)|0,se=se+Math.imul(Re,dt)|0,te=(te=te+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,oe=oe+Math.imul(Ae,gt)|0,se=se+Math.imul(ot,ut)|0,te=(te=te+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,oe=oe+Math.imul(at,wt)|0,se=se+Math.imul(tt,yt)|0,te=(te=te+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,oe=oe+Math.imul(nt,Et)|0,se=se+Math.imul(Ge,Ee)|0,te=(te=te+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,oe=oe+Math.imul(He,Me)|0,se=se+Math.imul(Ne,Oe)|0,te=(te=te+Math.imul(Ne,Ke)|0)+Math.imul(Fe,Oe)|0,oe=oe+Math.imul(Fe,Ke)|0,se=se+Math.imul(Se,Ye)|0,te=(te=te+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0,oe=oe+Math.imul(ce,qe)|0;var Jt=(k+(se=se+Math.imul(ae,It)|0)|0)+((8191&(te=(te=te+Math.imul(ae,kt)|0)+Math.imul(fe,It)|0))<<13)|0;k=((oe=oe+Math.imul(fe,kt)|0)+(te>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,se=Math.imul(Ze,pt),te=(te=Math.imul(Ze,vt))+Math.imul(ct,pt)|0,oe=Math.imul(ct,vt),se=se+Math.imul(Be,dt)|0,te=(te=te+Math.imul(Be,gt)|0)+Math.imul(Ve,dt)|0,oe=oe+Math.imul(Ve,gt)|0,se=se+Math.imul(Re,ut)|0,te=(te=te+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,oe=oe+Math.imul(Ae,wt)|0,se=se+Math.imul(ot,yt)|0,te=(te=te+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,oe=oe+Math.imul(at,Et)|0,se=se+Math.imul(tt,Ee)|0,te=(te=te+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,oe=oe+Math.imul(nt,Me)|0,se=se+Math.imul(Ge,Oe)|0,te=(te=te+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,oe=oe+Math.imul(He,Ke)|0,se=se+Math.imul(Ne,Ye)|0,te=(te=te+Math.imul(Ne,qe)|0)+Math.imul(Fe,Ye)|0,oe=oe+Math.imul(Fe,qe)|0;var Zt=(k+(se=se+Math.imul(Se,It)|0)|0)+((8191&(te=(te=te+Math.imul(Se,kt)|0)+Math.imul(ce,It)|0))<<13)|0;k=((oe=oe+Math.imul(ce,kt)|0)+(te>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,se=Math.imul(Ze,dt),te=(te=Math.imul(Ze,gt))+Math.imul(ct,dt)|0,oe=Math.imul(ct,gt),se=se+Math.imul(Be,ut)|0,te=(te=te+Math.imul(Be,wt)|0)+Math.imul(Ve,ut)|0,oe=oe+Math.imul(Ve,wt)|0,se=se+Math.imul(Re,yt)|0,te=(te=te+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,oe=oe+Math.imul(Ae,Et)|0,se=se+Math.imul(ot,Ee)|0,te=(te=te+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,oe=oe+Math.imul(at,Me)|0,se=se+Math.imul(tt,Oe)|0,te=(te=te+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,oe=oe+Math.imul(nt,Ke)|0,se=se+Math.imul(Ge,Ye)|0,te=(te=te+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0,oe=oe+Math.imul(He,qe)|0;var fn=(k+(se=se+Math.imul(Ne,It)|0)|0)+((8191&(te=(te=te+Math.imul(Ne,kt)|0)+Math.imul(Fe,It)|0))<<13)|0;k=((oe=oe+Math.imul(Fe,kt)|0)+(te>>>13)|0)+(fn>>>26)|0,fn&=67108863,se=Math.imul(Ze,ut),te=(te=Math.imul(Ze,wt))+Math.imul(ct,ut)|0,oe=Math.imul(ct,wt),se=se+Math.imul(Be,yt)|0,te=(te=te+Math.imul(Be,Et)|0)+Math.imul(Ve,yt)|0,oe=oe+Math.imul(Ve,Et)|0,se=se+Math.imul(Re,Ee)|0,te=(te=te+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,oe=oe+Math.imul(Ae,Me)|0,se=se+Math.imul(ot,Oe)|0,te=(te=te+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,oe=oe+Math.imul(at,Ke)|0,se=se+Math.imul(tt,Ye)|0,te=(te=te+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0,oe=oe+Math.imul(nt,qe)|0;var Qt=(k+(se=se+Math.imul(Ge,It)|0)|0)+((8191&(te=(te=te+Math.imul(Ge,kt)|0)+Math.imul(He,It)|0))<<13)|0;k=((oe=oe+Math.imul(He,kt)|0)+(te>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,se=Math.imul(Ze,yt),te=(te=Math.imul(Ze,Et))+Math.imul(ct,yt)|0,oe=Math.imul(ct,Et),se=se+Math.imul(Be,Ee)|0,te=(te=te+Math.imul(Be,Me)|0)+Math.imul(Ve,Ee)|0,oe=oe+Math.imul(Ve,Me)|0,se=se+Math.imul(Re,Oe)|0,te=(te=te+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,oe=oe+Math.imul(Ae,Ke)|0,se=se+Math.imul(ot,Ye)|0,te=(te=te+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0,oe=oe+Math.imul(at,qe)|0;var Dt=(k+(se=se+Math.imul(tt,It)|0)|0)+((8191&(te=(te=te+Math.imul(tt,kt)|0)+Math.imul(nt,It)|0))<<13)|0;k=((oe=oe+Math.imul(nt,kt)|0)+(te>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,se=Math.imul(Ze,Ee),te=(te=Math.imul(Ze,Me))+Math.imul(ct,Ee)|0,oe=Math.imul(ct,Me),se=se+Math.imul(Be,Oe)|0,te=(te=te+Math.imul(Be,Ke)|0)+Math.imul(Ve,Oe)|0,oe=oe+Math.imul(Ve,Ke)|0,se=se+Math.imul(Re,Ye)|0,te=(te=te+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0,oe=oe+Math.imul(Ae,qe)|0;var Mt=(k+(se=se+Math.imul(ot,It)|0)|0)+((8191&(te=(te=te+Math.imul(ot,kt)|0)+Math.imul(at,It)|0))<<13)|0;k=((oe=oe+Math.imul(at,kt)|0)+(te>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,se=Math.imul(Ze,Oe),te=(te=Math.imul(Ze,Ke))+Math.imul(ct,Oe)|0,oe=Math.imul(ct,Ke),se=se+Math.imul(Be,Ye)|0,te=(te=te+Math.imul(Be,qe)|0)+Math.imul(Ve,Ye)|0,oe=oe+Math.imul(Ve,qe)|0;var Xt=(k+(se=se+Math.imul(Re,It)|0)|0)+((8191&(te=(te=te+Math.imul(Re,kt)|0)+Math.imul(Ae,It)|0))<<13)|0;k=((oe=oe+Math.imul(Ae,kt)|0)+(te>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,se=Math.imul(Ze,Ye),te=(te=Math.imul(Ze,qe))+Math.imul(ct,Ye)|0,oe=Math.imul(ct,qe);var Ft=(k+(se=se+Math.imul(Be,It)|0)|0)+((8191&(te=(te=te+Math.imul(Be,kt)|0)+Math.imul(Ve,It)|0))<<13)|0;k=((oe=oe+Math.imul(Ve,kt)|0)+(te>>>13)|0)+(Ft>>>26)|0,Ft&=67108863;var jt=(k+(se=Math.imul(Ze,It))|0)+((8191&(te=(te=Math.imul(Ze,kt))+Math.imul(ct,It)|0))<<13)|0;return k=((oe=Math.imul(ct,kt))+(te>>>13)|0)+(jt>>>26)|0,jt&=67108863,f[0]=Ot,f[1]=Nt,f[2]=Lt,f[3]=nn,f[4]=Yt,f[5]=gn,f[6]=an,f[7]=tn,f[8]=Ut,f[9]=cn,f[10]=Jt,f[11]=Zt,f[12]=fn,f[13]=Qt,f[14]=Dt,f[15]=Mt,f[16]=Xt,f[17]=Ft,f[18]=jt,0!==k&&(f[19]=k,F.length++),F};function V(d,g,D){D.negative=g.negative^d.negative,D.length=d.length+g.length;for(var F=0,z=0,C=0;C>>26)|0)>>>26,f&=67108863}D.words[C]=k,F=f,f=z}return 0!==F?D.words[C]=F:D.length--,D._strip()}function G(d,g,D){return V(d,g,D)}function W(d,g){this.x=d,this.y=g}Math.imul||(B=j),l.prototype.mulTo=function(g,D){var z=this.length+g.length;return 10===this.length&&10===g.length?B(this,g,D):z<63?j(this,g,D):z<1024?V(this,g,D):G(this,g,D)},W.prototype.makeRBT=function(g){for(var D=new Array(g),F=l.prototype._countBits(g)-1,z=0;z>=1;return z},W.prototype.permute=function(g,D,F,z,C,f){for(var k=0;k>>=1)C++;return 1<>>=13,F[2*f+1]=8191&C,C>>>=13;for(f=2*D;f>=26,F+=C/67108864|0,F+=f>>>26,this.words[z]=67108863&f}return 0!==F&&(this.words[z]=F,this.length++),D?this.ineg():this},l.prototype.muln=function(g){return this.clone().imuln(g)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(g){var D=function N(d){for(var g=new Array(d.bitLength()),D=0;D>>z&1}return g}(g);if(0===D.length)return new l(1);for(var F=this,z=0;z=0);var C,D=g%26,F=(g-D)/26,z=67108863>>>26-D<<26-D;if(0!==D){var f=0;for(C=0;C>>26-D}f&&(this.words[C]=f,this.length++)}if(0!==F){for(C=this.length-1;C>=0;C--)this.words[C+F]=this.words[C];for(C=0;C=0),z=D?(D-D%26)/26:0;var C=g%26,f=Math.min((g-C)/26,this.length),k=67108863^67108863>>>C<f)for(this.length-=f,te=0;te=0&&(0!==oe||te>=z);te--){var de=0|this.words[te];this.words[te]=oe<<26-C|de>>>C,oe=de&k}return se&&0!==oe&&(se.words[se.length++]=oe),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},l.prototype.ishrn=function(g,D,F){return w(0===this.negative),this.iushrn(g,D,F)},l.prototype.shln=function(g){return this.clone().ishln(g)},l.prototype.ushln=function(g){return this.clone().iushln(g)},l.prototype.shrn=function(g){return this.clone().ishrn(g)},l.prototype.ushrn=function(g){return this.clone().iushrn(g)},l.prototype.testn=function(g){w("number"==typeof g&&g>=0);var D=g%26,F=(g-D)/26,z=1<=0);var D=g%26,F=(g-D)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=F)return this;if(0!==D&&F++,this.length=Math.min(F,this.length),0!==D){var z=67108863^67108863>>>D<=67108864;D++)this.words[D]-=67108864,D===this.length-1?this.words[D+1]=1:this.words[D+1]++;return this.length=Math.max(this.length,D+1),this},l.prototype.isubn=function(g){if(w("number"==typeof g),w(g<67108864),g<0)return this.iaddn(-g);if(0!==this.negative)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var D=0;D>26)-(se/67108864|0),this.words[C+F]=67108863&f}for(;C>26,this.words[C+F]=67108863&f;if(0===k)return this._strip();for(w(-1===k),k=0,C=0;C>26,this.words[C]=67108863&f;return this.negative=1,this._strip()},l.prototype._wordDiv=function(g,D){var F=(this.length,g.length),z=this.clone(),C=g,f=0|C.words[C.length-1];0!==(F=26-this._countBits(f))&&(C=C.ushln(F),z.iushln(F),f=0|C.words[C.length-1]);var te,se=z.length-C.length;if("mod"!==D){(te=new l(null)).length=se+1,te.words=new Array(te.length);for(var oe=0;oe=0;Ie--){var ye=67108864*(0|z.words[C.length+Ie])+(0|z.words[C.length+Ie-1]);for(ye=Math.min(ye/f|0,67108863),z._ishlnsubmul(C,ye,Ie);0!==z.negative;)ye--,z.negative=0,z._ishlnsubmul(C,1,Ie),z.isZero()||(z.negative^=1);te&&(te.words[Ie]=ye)}return te&&te._strip(),z._strip(),"div"!==D&&0!==F&&z.iushrn(F),{div:te||null,mod:z}},l.prototype.divmod=function(g,D,F){return w(!g.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===g.negative?(f=this.neg().divmod(g,D),"mod"!==D&&(z=f.div.neg()),"div"!==D&&(C=f.mod.neg(),F&&0!==C.negative&&C.iadd(g)),{div:z,mod:C}):0===this.negative&&0!==g.negative?(f=this.divmod(g.neg(),D),"mod"!==D&&(z=f.div.neg()),{div:z,mod:f.mod}):this.negative&g.negative?(f=this.neg().divmod(g.neg(),D),"div"!==D&&(C=f.mod.neg(),F&&0!==C.negative&&C.isub(g)),{div:f.div,mod:C}):g.length>this.length||this.cmp(g)<0?{div:new l(0),mod:this}:1===g.length?"div"===D?{div:this.divn(g.words[0]),mod:null}:"mod"===D?{div:null,mod:new l(this.modrn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new l(this.modrn(g.words[0]))}:this._wordDiv(g,D);var z,C,f},l.prototype.div=function(g){return this.divmod(g,"div",!1).div},l.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},l.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},l.prototype.divRound=function(g){var D=this.divmod(g);if(D.mod.isZero())return D.div;var F=0!==D.div.negative?D.mod.isub(g):D.mod,z=g.ushrn(1),C=g.andln(1),f=F.cmp(z);return f<0||1===C&&0===f?D.div:0!==D.div.negative?D.div.isubn(1):D.div.iaddn(1)},l.prototype.modrn=function(g){var D=g<0;D&&(g=-g),w(g<=67108863);for(var F=(1<<26)%g,z=0,C=this.length-1;C>=0;C--)z=(F*z+(0|this.words[C]))%g;return D?-z:z},l.prototype.modn=function(g){return this.modrn(g)},l.prototype.idivn=function(g){var D=g<0;D&&(g=-g),w(g<=67108863);for(var F=0,z=this.length-1;z>=0;z--){var C=(0|this.words[z])+67108864*F;this.words[z]=C/g|0,F=C%g}return this._strip(),D?this.ineg():this},l.prototype.divn=function(g){return this.clone().idivn(g)},l.prototype.egcd=function(g){w(0===g.negative),w(!g.isZero());var D=this,F=g.clone();D=0!==D.negative?D.umod(g):D.clone();for(var z=new l(1),C=new l(0),f=new l(0),k=new l(1),se=0;D.isEven()&&F.isEven();)D.iushrn(1),F.iushrn(1),++se;for(var te=F.clone(),oe=D.clone();!D.isZero();){for(var de=0,Ie=1;!(D.words[0]&Ie)&&de<26;++de,Ie<<=1);if(de>0)for(D.iushrn(de);de-- >0;)(z.isOdd()||C.isOdd())&&(z.iadd(te),C.isub(oe)),z.iushrn(1),C.iushrn(1);for(var ye=0,ve=1;!(F.words[0]&ve)&&ye<26;++ye,ve<<=1);if(ye>0)for(F.iushrn(ye);ye-- >0;)(f.isOdd()||k.isOdd())&&(f.iadd(te),k.isub(oe)),f.iushrn(1),k.iushrn(1);D.cmp(F)>=0?(D.isub(F),z.isub(f),C.isub(k)):(F.isub(D),f.isub(z),k.isub(C))}return{a:f,b:k,gcd:F.iushln(se)}},l.prototype._invmp=function(g){w(0===g.negative),w(!g.isZero());var de,D=this,F=g.clone();D=0!==D.negative?D.umod(g):D.clone();for(var z=new l(1),C=new l(0),f=F.clone();D.cmpn(1)>0&&F.cmpn(1)>0;){for(var k=0,se=1;!(D.words[0]&se)&&k<26;++k,se<<=1);if(k>0)for(D.iushrn(k);k-- >0;)z.isOdd()&&z.iadd(f),z.iushrn(1);for(var te=0,oe=1;!(F.words[0]&oe)&&te<26;++te,oe<<=1);if(te>0)for(F.iushrn(te);te-- >0;)C.isOdd()&&C.iadd(f),C.iushrn(1);D.cmp(F)>=0?(D.isub(F),z.isub(C)):(F.isub(D),C.isub(z))}return(de=0===D.cmpn(1)?z:C).cmpn(0)<0&&de.iadd(g),de},l.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var D=this.clone(),F=g.clone();D.negative=0,F.negative=0;for(var z=0;D.isEven()&&F.isEven();z++)D.iushrn(1),F.iushrn(1);for(;;){for(;D.isEven();)D.iushrn(1);for(;F.isEven();)F.iushrn(1);var C=D.cmp(F);if(C<0){var f=D;D=F,F=f}else if(0===C||0===F.cmpn(1))break;D.isub(F)}return F.iushln(z)},l.prototype.invm=function(g){return this.egcd(g).a.umod(g)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(g){return this.words[0]&g},l.prototype.bincn=function(g){w("number"==typeof g);var D=g%26,F=(g-D)/26,z=1<>>26,k&=67108863,this.words[f]=k}return 0!==C&&(this.words[f]=C,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(g){var F,D=g<0;if(0!==this.negative&&!D)return-1;if(0===this.negative&&D)return 1;if(this._strip(),this.length>1)F=1;else{D&&(g=-g),w(g<=67108863,"Number is too big");var z=0|this.words[0];F=z===g?0:zg.length)return 1;if(this.length=0;F--){var z=0|this.words[F],C=0|g.words[F];if(z!==C){zC&&(D=1);break}}return D},l.prototype.gtn=function(g){return 1===this.cmpn(g)},l.prototype.gt=function(g){return 1===this.cmp(g)},l.prototype.gten=function(g){return this.cmpn(g)>=0},l.prototype.gte=function(g){return this.cmp(g)>=0},l.prototype.ltn=function(g){return-1===this.cmpn(g)},l.prototype.lt=function(g){return-1===this.cmp(g)},l.prototype.lten=function(g){return this.cmpn(g)<=0},l.prototype.lte=function(g){return this.cmp(g)<=0},l.prototype.eqn=function(g){return 0===this.cmpn(g)},l.prototype.eq=function(g){return 0===this.cmp(g)},l.red=function(g){return new o(g)},l.prototype.toRed=function(g){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),g.convertTo(this)._forceRed(g)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(g){return this.red=g,this},l.prototype.forceRed=function(g){return w(!this.red,"Already a number in reduction context"),this._forceRed(g)},l.prototype.redAdd=function(g){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},l.prototype.redIAdd=function(g){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},l.prototype.redSub=function(g){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},l.prototype.redISub=function(g){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},l.prototype.redShl=function(g){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},l.prototype.redMul=function(g){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},l.prototype.redIMul=function(g){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(g){return w(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var Q={k256:null,p224:null,p192:null,p25519:null};function q(d,g){this.name=d,this.p=new l(g,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function J(){q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Z(){q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function ee(){q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function o(d){if("string"==typeof d){var g=l._prime(d);this.m=g.p,this.prime=g}else w(d.gtn(1),"modulus must be greater than 1"),this.m=d,this.prime=null}function a(d){o.call(this,d),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}q.prototype._tmp=function(){var g=new l(null);return g.words=new Array(Math.ceil(this.n/13)),g},q.prototype.ireduce=function(g){var F,D=g;do{this.split(D,this.tmp),F=(D=(D=this.imulK(D)).iadd(this.tmp)).bitLength()}while(F>this.n);var z=F0?D.isub(this.p):void 0!==D.strip?D.strip():D._strip(),D},q.prototype.split=function(g,D){g.iushrn(this.n,0,D)},q.prototype.imulK=function(g){return g.imul(this.k)},E(J,q),J.prototype.split=function(g,D){for(var F=4194303,z=Math.min(g.length,9),C=0;C>>22,f=k}f>>>=22,g.words[C-10]=f,0===f&&g.length>10?g.length-=10:g.length-=9},J.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var D=0,F=0;F>>=26,g.words[F]=C,D=z}return 0!==D&&(g.words[g.length++]=D),g},l._prime=function(g){if(Q[g])return Q[g];var D;if("k256"===g)D=new J;else if("p224"===g)D=new Z;else if("p192"===g)D=new ee;else{if("p25519"!==g)throw new Error("Unknown prime "+g);D=new I}return Q[g]=D,D},o.prototype._verify1=function(g){w(0===g.negative,"red works only with positives"),w(g.red,"red works only with red numbers")},o.prototype._verify2=function(g,D){w(0==(g.negative|D.negative),"red works only with positives"),w(g.red&&g.red===D.red,"red works only with red numbers")},o.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):(_(g,g.umod(this.m)._forceRed(this)),g)},o.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},o.prototype.add=function(g,D){this._verify2(g,D);var F=g.add(D);return F.cmp(this.m)>=0&&F.isub(this.m),F._forceRed(this)},o.prototype.iadd=function(g,D){this._verify2(g,D);var F=g.iadd(D);return F.cmp(this.m)>=0&&F.isub(this.m),F},o.prototype.sub=function(g,D){this._verify2(g,D);var F=g.sub(D);return F.cmpn(0)<0&&F.iadd(this.m),F._forceRed(this)},o.prototype.isub=function(g,D){this._verify2(g,D);var F=g.isub(D);return F.cmpn(0)<0&&F.iadd(this.m),F},o.prototype.shl=function(g,D){return this._verify1(g),this.imod(g.ushln(D))},o.prototype.imul=function(g,D){return this._verify2(g,D),this.imod(g.imul(D))},o.prototype.mul=function(g,D){return this._verify2(g,D),this.imod(g.mul(D))},o.prototype.isqr=function(g){return this.imul(g,g.clone())},o.prototype.sqr=function(g){return this.mul(g,g)},o.prototype.sqrt=function(g){if(g.isZero())return g.clone();var D=this.m.andln(3);if(w(D%2==1),3===D){var F=this.m.add(new l(1)).iushrn(2);return this.pow(g,F)}for(var z=this.m.subn(1),C=0;!z.isZero()&&0===z.andln(1);)C++,z.iushrn(1);w(!z.isZero());var f=new l(1).toRed(this),k=f.redNeg(),se=this.m.subn(1).iushrn(1),te=this.m.bitLength();for(te=new l(2*te*te).toRed(this);0!==this.pow(te,se).cmp(k);)te.redIAdd(k);for(var oe=this.pow(te,z),de=this.pow(g,z.addn(1).iushrn(1)),Ie=this.pow(g,z),ye=C;0!==Ie.cmp(f);){for(var ve=Ie,ae=0;0!==ve.cmp(f);ae++)ve=ve.redSqr();w(ae=0;C--){for(var oe=D.words[C],de=te-1;de>=0;de--){var Ie=oe>>de&1;(f!==z[0]&&(f=this.sqr(f)),0!==Ie||0!==k)?(k<<=1,k|=Ie,(4===++se||0===C&&0===de)&&(f=this.mul(f,z[k]),se=0,k=0)):se=0}te=26}return f},o.prototype.convertTo=function(g){var D=g.umod(this.m);return D===g?D.clone():D},o.prototype.convertFrom=function(g){var D=g.clone();return D.red=null,D},l.mont=function(g){return new a(g)},E(a,o),a.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},a.prototype.convertFrom=function(g){var D=this.imod(g.mul(this.rinv));return D.red=null,D},a.prototype.imul=function(g,D){if(g.isZero()||D.isZero())return g.words[0]=0,g.length=1,g;var F=g.imul(D),z=F.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=F.isub(z).iushrn(this.shift),f=C;return C.cmp(this.m)>=0?f=C.isub(this.m):C.cmpn(0)<0&&(f=C.iadd(this.m)),f._forceRed(this)},a.prototype.mul=function(g,D){if(g.isZero()||D.isZero())return new l(0)._forceRed(this);var F=g.mul(D),z=F.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=F.isub(z).iushrn(this.shift),f=C;return C.cmp(this.m)>=0?f=C.isub(this.m):C.cmpn(0)<0&&(f=C.iadd(this.m)),f._forceRed(this)},a.prototype.invm=function(g){return this.imod(g._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=p.nmd(ne),this)},21531:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(ee,I,o,a){void 0===a&&(a=o),Object.defineProperty(ee,a,{enumerable:!0,get:function(){return I[o]}})}:function(ee,I,o,a){void 0===a&&(a=o),ee[a]=I[o]}),M=this&&this.__setModuleDefault||(Object.create?function(ee,I){Object.defineProperty(ee,"default",{enumerable:!0,value:I})}:function(ee,I){ee.default=I}),w=this&&this.__decorate||function(ee,I,o,a){var D,d=arguments.length,g=d<3?I:null===a?a=Object.getOwnPropertyDescriptor(I,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(ee,I,o,a);else for(var F=ee.length-1;F>=0;F--)(D=ee[F])&&(g=(d<3?D(g):d>3?D(I,o,g):D(I,o))||g);return d>3&&g&&Object.defineProperty(I,o,g),g},E=this&&this.__importStar||function(ee){if(ee&&ee.__esModule)return ee;var I={};if(null!=ee)for(var o in ee)"default"!==o&&Object.hasOwnProperty.call(ee,o)&&h(I,ee,o);return M(I,ee),I},l=this&&this.__importDefault||function(ee){return ee&&ee.__esModule?ee:{default:ee}};Object.defineProperty(s,"__esModule",{value:!0}),s.deserializeUnchecked=s.deserialize=s.serialize=s.BinaryReader=s.BinaryWriter=s.BorshError=s.baseDecode=s.baseEncode=void 0;const m=l(p(98538)),y=l(p(39076)),b=E(p(62949)),_=new("function"!=typeof TextDecoder?b.TextDecoder:TextDecoder)("utf-8",{fatal:!0});s.baseEncode=function A(ee){return"string"==typeof ee&&(ee=Buffer.from(ee,"utf8")),y.default.encode(Buffer.from(ee))},s.baseDecode=function P(ee){return Buffer.from(y.default.decode(ee))};const x=1024;class T extends Error{constructor(I){super(I),this.fieldPath=[],this.originalMessage=I}addToFieldPath(I){this.fieldPath.splice(0,0,I),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}s.BorshError=T;class L{constructor(){this.buf=Buffer.alloc(x),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(x)]))}writeU8(I){this.maybeResize(),this.buf.writeUInt8(I,this.length),this.length+=1}writeU16(I){this.maybeResize(),this.buf.writeUInt16LE(I,this.length),this.length+=2}writeU32(I){this.maybeResize(),this.buf.writeUInt32LE(I,this.length),this.length+=4}writeU64(I){this.maybeResize(),this.writeBuffer(Buffer.from(new m.default(I).toArray("le",8)))}writeU128(I){this.maybeResize(),this.writeBuffer(Buffer.from(new m.default(I).toArray("le",16)))}writeU256(I){this.maybeResize(),this.writeBuffer(Buffer.from(new m.default(I).toArray("le",32)))}writeU512(I){this.maybeResize(),this.writeBuffer(Buffer.from(new m.default(I).toArray("le",64)))}writeBuffer(I){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),I,Buffer.alloc(x)]),this.length+=I.length}writeString(I){this.maybeResize();const o=Buffer.from(I,"utf8");this.writeU32(o.length),this.writeBuffer(o)}writeFixedArray(I){this.writeBuffer(Buffer.from(I))}writeArray(I,o){this.maybeResize(),this.writeU32(I.length);for(const a of I)this.maybeResize(),o(a)}toArray(){return this.buf.subarray(0,this.length)}}function N(ee,I,o){const a=o.value;o.value=function(...d){try{return a.apply(this,d)}catch(g){if(g instanceof RangeError){const D=g.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(D)>=0)throw new T("Reached the end of buffer when deserializing")}throw g}}}s.BinaryWriter=L;class j{constructor(I){this.buf=I,this.offset=0}readU8(){const I=this.buf.readUInt8(this.offset);return this.offset+=1,I}readU16(){const I=this.buf.readUInt16LE(this.offset);return this.offset+=2,I}readU32(){const I=this.buf.readUInt32LE(this.offset);return this.offset+=4,I}readU64(){const I=this.readBuffer(8);return new m.default(I,"le")}readU128(){const I=this.readBuffer(16);return new m.default(I,"le")}readU256(){const I=this.readBuffer(32);return new m.default(I,"le")}readU512(){const I=this.readBuffer(64);return new m.default(I,"le")}readBuffer(I){if(this.offset+I>this.buf.length)throw new T(`Expected buffer length ${I} isn't within bounds`);const o=this.buf.slice(this.offset,this.offset+I);return this.offset+=I,o}readString(){const I=this.readU32(),o=this.readBuffer(I);try{return _.decode(o)}catch(a){throw new T(`Error decoding UTF-8 string: ${a}`)}}readFixedArray(I){return new Uint8Array(this.readBuffer(I))}readArray(I){const o=this.readU32(),a=Array();for(let d=0;d{V(ee,I,g,a[0],d)});else if(void 0!==a.kind)switch(a.kind){case"option":null==o?d.writeU8(0):(d.writeU8(1),V(ee,I,o,a.type,d));break;case"map":d.writeU32(o.size),o.forEach((g,D)=>{V(ee,I,D,a.key,d),V(ee,I,g,a.value,d)});break;default:throw new T(`FieldType ${a} unrecognized`)}else G(ee,o,d)}catch(g){throw g instanceof T&&g.addToFieldPath(I),g}}function G(ee,I,o){if("function"==typeof I.borshSerialize)return void I.borshSerialize(o);const a=ee.get(I.constructor);if(!a)throw new T(`Class ${I.constructor.name} is missing in schema`);if("struct"===a.kind)a.fields.map(([d,g])=>{V(ee,d,I[d],g,o)});else{if("enum"!==a.kind)throw new T(`Unexpected schema kind: ${a.kind} for ${I.constructor.name}`);{const d=I[a.field];for(let g=0;gQ(ee,I,o[0],a))}if("option"===o.kind)return a.readU8()?Q(ee,I,o.type,a):void 0;if("map"===o.kind){let d=new Map;const g=a.readU32();for(let D=0;D=a.values.length)throw new T(`Enum index: ${d} is out of range`);const[g,D]=a.values[d];return new I({[g]:Q(ee,g,D,o)})}throw new T(`Unexpected schema kind: ${a.kind} for ${I.constructor.name}`)}w([N],j.prototype,"readU8",null),w([N],j.prototype,"readU16",null),w([N],j.prototype,"readU32",null),w([N],j.prototype,"readU64",null),w([N],j.prototype,"readU128",null),w([N],j.prototype,"readU256",null),w([N],j.prototype,"readU512",null),w([N],j.prototype,"readString",null),w([N],j.prototype,"readFixedArray",null),w([N],j.prototype,"readArray",null),s.BinaryReader=j,s.serialize=function W(ee,I,o=L){const a=new o;return G(ee,I,a),a.toArray()},s.deserialize=function J(ee,I,o,a=j){const d=new a(o),g=q(ee,I,d);if(d.offset{var h=p(21082);ne.exports=h("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},37950:(ne,s,p)=>{var h;function M(E){this.rand=E}if(ne.exports=function(l){return h||(h=new M(null)),h.generate(l)},ne.exports.Rand=M,M.prototype.generate=function(l){return this._rand(l)},M.prototype._rand=function(l){if(this.rand.getBytes)return this.rand.getBytes(l);for(var m=new Uint8Array(l),y=0;y{var h=p(73502).Buffer;function M(b){h.isBuffer(b)||(b=h.from(b));for(var S=b.length/4|0,_=new Array(S),A=0;A>>24]^T[B>>>16&255]^L[V>>>8&255]^N[255&G]^S[Z++],Q=x[B>>>24]^T[V>>>16&255]^L[G>>>8&255]^N[255&j]^S[Z++],q=x[V>>>24]^T[G>>>16&255]^L[j>>>8&255]^N[255&B]^S[Z++],J=x[G>>>24]^T[j>>>16&255]^L[B>>>8&255]^N[255&V]^S[Z++],j=W,B=Q,V=q,G=J;return W=(A[j>>>24]<<24|A[B>>>16&255]<<16|A[V>>>8&255]<<8|A[255&G])^S[Z++],Q=(A[B>>>24]<<24|A[V>>>16&255]<<16|A[G>>>8&255]<<8|A[255&j])^S[Z++],q=(A[V>>>24]<<24|A[G>>>16&255]<<16|A[j>>>8&255]<<8|A[255&B])^S[Z++],J=(A[G>>>24]<<24|A[j>>>16&255]<<16|A[B>>>8&255]<<8|A[255&V])^S[Z++],[W>>>=0,Q>>>=0,q>>>=0,J>>>=0]}var l=[0,1,2,4,8,16,32,64,128,27,54],m=function(){for(var b=new Array(256),S=0;S<256;S++)b[S]=S<128?S<<1:S<<1^283;for(var _=[],A=[],P=[[],[],[],[]],x=[[],[],[],[]],T=0,L=0,N=0;N<256;++N){var j=L^L<<1^L<<2^L<<3^L<<4;j=j>>>8^255&j^99,_[T]=j,A[j]=T;var B=b[T],V=b[B],G=b[V],W=257*b[j]^16843008*j;P[0][T]=W<<24|W>>>8,P[1][T]=W<<16|W>>>16,P[2][T]=W<<8|W>>>24,P[3][T]=W,W=16843009*G^65537*V^257*B^16843008*T,x[0][j]=W<<24|W>>>8,x[1][j]=W<<16|W>>>16,x[2][j]=W<<8|W>>>24,x[3][j]=W,0===T?T=L=1:(T=B^b[b[b[G^B]]],L^=b[b[L]])}return{SBOX:_,INV_SBOX:A,SUB_MIX:P,INV_SUB_MIX:x}}();function y(b){this._key=M(b),this._reset()}y.blockSize=16,y.keySize=32,y.prototype.blockSize=y.blockSize,y.prototype.keySize=y.keySize,y.prototype._reset=function(){for(var b=this._key,S=b.length,_=S+6,A=4*(_+1),P=[],x=0;x>>24,T=m.SBOX[T>>>24]<<24|m.SBOX[T>>>16&255]<<16|m.SBOX[T>>>8&255]<<8|m.SBOX[255&T],T^=l[x/S|0]<<24):S>6&&x%S==4&&(T=m.SBOX[T>>>24]<<24|m.SBOX[T>>>16&255]<<16|m.SBOX[T>>>8&255]<<8|m.SBOX[255&T]),P[x]=P[x-S]^T}for(var L=[],N=0;N>>24]]^m.INV_SUB_MIX[1][m.SBOX[B>>>16&255]]^m.INV_SUB_MIX[2][m.SBOX[B>>>8&255]]^m.INV_SUB_MIX[3][m.SBOX[255&B]]}this._nRounds=_,this._keySchedule=P,this._invKeySchedule=L},y.prototype.encryptBlockRaw=function(b){return E(b=M(b),this._keySchedule,m.SUB_MIX,m.SBOX,this._nRounds)},y.prototype.encryptBlock=function(b){var S=this.encryptBlockRaw(b),_=h.allocUnsafe(16);return _.writeUInt32BE(S[0],0),_.writeUInt32BE(S[1],4),_.writeUInt32BE(S[2],8),_.writeUInt32BE(S[3],12),_},y.prototype.decryptBlock=function(b){var S=(b=M(b))[1];b[1]=b[3],b[3]=S;var _=E(b,this._invKeySchedule,m.INV_SUB_MIX,m.INV_SBOX,this._nRounds),A=h.allocUnsafe(16);return A.writeUInt32BE(_[0],0),A.writeUInt32BE(_[3],4),A.writeUInt32BE(_[2],8),A.writeUInt32BE(_[1],12),A},y.prototype.scrub=function(){w(this._keySchedule),w(this._invKeySchedule),w(this._key)},ne.exports.AES=y},69382:(ne,s,p)=>{var h=p(41899),M=p(73502).Buffer,w=p(61052),E=p(83894),l=p(68857),m=p(58789),y=p(7968);function _(A,P,x,T){w.call(this);var L=M.alloc(4,0);this._cipher=new h.AES(P);var N=this._cipher.encryptBlock(L);this._ghash=new l(N),x=function S(A,P,x){if(12===P.length)return A._finID=M.concat([P,M.from([0,0,0,1])]),M.concat([P,M.from([0,0,0,2])]);var T=new l(x),L=P.length,N=L%16;T.update(P),N&&(N=16-N,T.update(M.alloc(N,0))),T.update(M.alloc(8,0));var j=8*L,B=M.alloc(8);B.writeUIntBE(j,0,8),T.update(B),A._finID=T.state;var V=M.from(A._finID);return y(V),V}(this,x,N),this._prev=M.from(x),this._cache=M.allocUnsafe(0),this._secCache=M.allocUnsafe(0),this._decrypt=T,this._alen=0,this._len=0,this._mode=A,this._authTag=null,this._called=!1}E(_,w),_.prototype._update=function(A){if(!this._called&&this._alen){var P=16-this._alen%16;P<16&&(P=M.alloc(P,0),this._ghash.update(P))}this._called=!0;var x=this._mode.encrypt(this,A);return this._decrypt?this._ghash.update(A):this._ghash.update(x),this._len+=A.length,x},_.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var A=m(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function b(A,P){var x=0;A.length!==P.length&&x++;for(var T=Math.min(A.length,P.length),L=0;L{var h=p(96900),M=p(40856),w=p(44946);s.createCipher=s.Cipher=h.createCipher,s.createCipheriv=s.Cipheriv=h.createCipheriv,s.createDecipher=s.Decipher=M.createDecipher,s.createDecipheriv=s.Decipheriv=M.createDecipheriv,s.listCiphers=s.getCiphers=function E(){return Object.keys(w)}},40856:(ne,s,p)=>{var h=p(69382),M=p(73502).Buffer,w=p(29171),E=p(38441),l=p(61052),m=p(41899),y=p(40347);function S(T,L,N){l.call(this),this._cache=new _,this._last=void 0,this._cipher=new m.AES(L),this._prev=M.from(N),this._mode=T,this._autopadding=!0}function _(){this.cache=M.allocUnsafe(0)}function P(T,L,N){var j=w[T.toLowerCase()];if(!j)throw new TypeError("invalid suite type");if("string"==typeof N&&(N=M.from(N)),"GCM"!==j.mode&&N.length!==j.iv)throw new TypeError("invalid iv length "+N.length);if("string"==typeof L&&(L=M.from(L)),L.length!==j.key/8)throw new TypeError("invalid key length "+L.length);return"stream"===j.type?new E(j.module,L,N,!0):"auth"===j.type?new h(j.module,L,N,!0):new S(j.module,L,N)}p(83894)(S,l),S.prototype._update=function(T){this._cache.add(T);for(var L,N,j=[];L=this._cache.get(this._autopadding);)N=this._mode.decrypt(this,L),j.push(N);return M.concat(j)},S.prototype._final=function(){var T=this._cache.flush();if(this._autopadding)return function A(T){var L=T[15];if(L<1||L>16)throw new Error("unable to decrypt data");for(var N=-1;++N16)return L=this.cache.slice(0,16),this.cache=this.cache.slice(16),L}else if(this.cache.length>=16)return L=this.cache.slice(0,16),this.cache=this.cache.slice(16),L;return null},_.prototype.flush=function(){if(this.cache.length)return this.cache},s.createDecipher=function x(T,L){var N=w[T.toLowerCase()];if(!N)throw new TypeError("invalid suite type");var j=y(L,!1,N.key,N.iv);return P(T,j.key,j.iv)},s.createDecipheriv=P},96900:(ne,s,p)=>{var h=p(29171),M=p(69382),w=p(73502).Buffer,E=p(38441),l=p(61052),m=p(41899),y=p(40347);function S(T,L,N){l.call(this),this._cache=new A,this._cipher=new m.AES(L),this._prev=w.from(N),this._mode=T,this._autopadding=!0}p(83894)(S,l),S.prototype._update=function(T){this._cache.add(T);for(var L,N,j=[];L=this._cache.get();)N=this._mode.encrypt(this,L),j.push(N);return w.concat(j)};var _=w.alloc(16,16);function A(){this.cache=w.allocUnsafe(0)}function P(T,L,N){var j=h[T.toLowerCase()];if(!j)throw new TypeError("invalid suite type");if("string"==typeof L&&(L=w.from(L)),L.length!==j.key/8)throw new TypeError("invalid key length "+L.length);if("string"==typeof N&&(N=w.from(N)),"GCM"!==j.mode&&N.length!==j.iv)throw new TypeError("invalid iv length "+N.length);return"stream"===j.type?new E(j.module,L,N):"auth"===j.type?new M(j.module,L,N):new S(j.module,L,N)}S.prototype._final=function(){var T=this._cache.flush();if(this._autopadding)return T=this._mode.encrypt(this,T),this._cipher.scrub(),T;if(!T.equals(_))throw this._cipher.scrub(),new Error("data not multiple of block length")},S.prototype.setAutoPadding=function(T){return this._autopadding=!!T,this},A.prototype.add=function(T){this.cache=w.concat([this.cache,T])},A.prototype.get=function(){if(this.cache.length>15){var T=this.cache.slice(0,16);return this.cache=this.cache.slice(16),T}return null},A.prototype.flush=function(){for(var T=16-this.cache.length,L=w.allocUnsafe(T),N=-1;++N{var h=p(73502).Buffer,M=h.alloc(16,0);function E(m){var y=h.allocUnsafe(16);return y.writeUInt32BE(m[0]>>>0,0),y.writeUInt32BE(m[1]>>>0,4),y.writeUInt32BE(m[2]>>>0,8),y.writeUInt32BE(m[3]>>>0,12),y}function l(m){this.h=m,this.state=h.alloc(16,0),this.cache=h.allocUnsafe(0)}l.prototype.ghash=function(m){for(var y=-1;++y0;b--)m[b]=m[b]>>>1|(1&m[b-1])<<31;m[0]=m[0]>>>1,_&&(m[0]=m[0]^225<<24)}this.state=E(y)},l.prototype.update=function(m){this.cache=h.concat([this.cache,m]);for(var y;this.cache.length>=16;)y=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(y)},l.prototype.final=function(m,y){return this.cache.length&&this.ghash(h.concat([this.cache,M],16)),this.ghash(E([0,m,0,y])),this.state},ne.exports=l},7968:ne=>{ne.exports=function s(p){for(var M,h=p.length;h--;){if(255!==(M=p.readUInt8(h))){M++,p.writeUInt8(M,h);break}p.writeUInt8(0,h)}}},64903:(ne,s,p)=>{var h=p(58789);s.encrypt=function(M,w){var E=h(w,M._prev);return M._prev=M._cipher.encryptBlock(E),M._prev},s.decrypt=function(M,w){var E=M._prev;M._prev=w;var l=M._cipher.decryptBlock(w);return h(l,E)}},59885:(ne,s,p)=>{var h=p(73502).Buffer,M=p(58789);function w(E,l,m){var y=l.length,b=M(l,E._cache);return E._cache=E._cache.slice(y),E._prev=h.concat([E._prev,m?l:b]),b}s.encrypt=function(E,l,m){for(var b,y=h.allocUnsafe(0);l.length;){if(0===E._cache.length&&(E._cache=E._cipher.encryptBlock(E._prev),E._prev=h.allocUnsafe(0)),!(E._cache.length<=l.length)){y=h.concat([y,w(E,l,m)]);break}b=E._cache.length,y=h.concat([y,w(E,l.slice(0,b),m)]),l=l.slice(b)}return y}},86531:(ne,s,p)=>{var h=p(73502).Buffer;function M(E,l,m){for(var A,P,b=-1,_=0;++b<8;)A=l&1<<7-b?128:0,_+=(128&(P=E._cipher.encryptBlock(E._prev)[0]^A))>>b%8,E._prev=w(E._prev,m?A:P);return _}function w(E,l){var m=E.length,y=-1,b=h.allocUnsafe(E.length);for(E=h.concat([E,h.from([l])]);++y>7;return b}s.encrypt=function(E,l,m){for(var y=l.length,b=h.allocUnsafe(y),S=-1;++S{var h=p(73502).Buffer;function M(w,E,l){var y=w._cipher.encryptBlock(w._prev)[0]^E;return w._prev=h.concat([w._prev.slice(1),h.from([l?E:y])]),y}s.encrypt=function(w,E,l){for(var m=E.length,y=h.allocUnsafe(m),b=-1;++b{var h=p(58789),M=p(73502).Buffer,w=p(7968);function E(m){var y=m._cipher.encryptBlockRaw(m._prev);return w(m._prev),y}s.encrypt=function(m,y){var b=Math.ceil(y.length/16),S=m._cache.length;m._cache=M.concat([m._cache,M.allocUnsafe(16*b)]);for(var _=0;_{s.encrypt=function(p,h){return p._cipher.encryptBlock(h)},s.decrypt=function(p,h){return p._cipher.decryptBlock(h)}},29171:(ne,s,p)=>{var h={ECB:p(21704),CBC:p(64903),CFB:p(59885),CFB8:p(21641),CFB1:p(86531),OFB:p(86816),CTR:p(11150),GCM:p(11150)},M=p(44946);for(var w in M)M[w].module=h[M[w].mode];ne.exports=M},86816:(ne,s,p)=>{var h=p(58789);function M(w){return w._prev=w._cipher.encryptBlock(w._prev),w._prev}s.encrypt=function(w,E){for(;w._cache.length{var h=p(41899),M=p(73502).Buffer,w=p(61052);function l(m,y,b,S){w.call(this),this._cipher=new h.AES(y),this._prev=M.from(b),this._cache=M.allocUnsafe(0),this._secCache=M.allocUnsafe(0),this._decrypt=S,this._mode=m}p(83894)(l,w),l.prototype._update=function(m){return this._mode.encrypt(this,m,this._decrypt)},l.prototype._final=function(){this._cipher.scrub()},ne.exports=l},55255:(ne,s,p)=>{var h=p(9004),M=p(84330),w=p(29171),E=p(51115),l=p(40347);function b(A,P,x){if(A=A.toLowerCase(),w[A])return M.createCipheriv(A,P,x);if(E[A])return new h({key:P,iv:x,mode:A});throw new TypeError("invalid suite type")}function S(A,P,x){if(A=A.toLowerCase(),w[A])return M.createDecipheriv(A,P,x);if(E[A])return new h({key:P,iv:x,mode:A,decrypt:!0});throw new TypeError("invalid suite type")}s.createCipher=s.Cipher=function m(A,P){var x,T;if(A=A.toLowerCase(),w[A])x=w[A].key,T=w[A].iv;else{if(!E[A])throw new TypeError("invalid suite type");x=8*E[A].key,T=E[A].iv}var L=l(P,!1,x,T);return b(A,L.key,L.iv)},s.createCipheriv=s.Cipheriv=b,s.createDecipher=s.Decipher=function y(A,P){var x,T;if(A=A.toLowerCase(),w[A])x=w[A].key,T=w[A].iv;else{if(!E[A])throw new TypeError("invalid suite type");x=8*E[A].key,T=E[A].iv}var L=l(P,!1,x,T);return S(A,L.key,L.iv)},s.createDecipheriv=s.Decipheriv=S,s.listCiphers=s.getCiphers=function _(){return Object.keys(E).concat(M.getCiphers())}},9004:(ne,s,p)=>{var h=p(61052),M=p(73684),w=p(83894),E=p(73502).Buffer,l={"des-ede3-cbc":M.CBC.instantiate(M.EDE),"des-ede3":M.EDE,"des-ede-cbc":M.CBC.instantiate(M.EDE),"des-ede":M.EDE,"des-cbc":M.CBC.instantiate(M.DES),"des-ecb":M.DES};function m(y){h.call(this);var _,b=y.mode.toLowerCase(),S=l[b];_=y.decrypt?"decrypt":"encrypt";var A=y.key;E.isBuffer(A)||(A=E.from(A)),("des-ede"===b||"des-ede-cbc"===b)&&(A=E.concat([A,A.slice(0,8)]));var P=y.iv;E.isBuffer(P)||(P=E.from(P)),this._des=S.create({key:A,iv:P,type:_})}l.des=l["des-cbc"],l.des3=l["des-ede3-cbc"],ne.exports=m,w(m,h),m.prototype._update=function(y){return E.from(this._des.update(y))},m.prototype._final=function(){return E.from(this._des.final())}},51115:(ne,s)=>{s["des-ecb"]={key:8,iv:0},s["des-cbc"]=s.des={key:8,iv:8},s["des-ede3-cbc"]=s.des3={key:24,iv:8},s["des-ede3"]={key:24,iv:0},s["des-ede-cbc"]={key:16,iv:8},s["des-ede"]={key:16,iv:0}},6581:(ne,s,p)=>{var h=p(77105),M=p(4427),w=p(94115),E=M("level-filesystem",{db:h});ne.exports=w(E)},8466:(ne,s,p)=>{var h=p(98538),M=p(53753);function E(m){var b,y=m.modulus.byteLength();do{b=new h(M(y))}while(b.cmp(m.modulus)>=0||!b.umod(m.prime1)||!b.umod(m.prime2));return b}function l(m,y){var b=function w(m){var y=E(m);return{blinder:y.toRed(h.mont(m.modulus)).redPow(new h(m.publicExponent)).fromRed(),unblinder:y.invm(m.modulus)}}(y),S=y.modulus.byteLength(),_=new h(m).mul(b.blinder).umod(y.modulus),A=_.toRed(h.mont(y.prime1)),P=_.toRed(h.mont(y.prime2)),x=y.coefficient,T=y.prime1,L=y.prime2,N=A.redPow(y.exponent1).fromRed(),j=P.redPow(y.exponent2).fromRed(),B=N.isub(j).imul(x).umod(T).imul(L);return j.iadd(B).imul(b.unblinder).umod(y.modulus).toArrayLike(Buffer,"be",S)}l.getr=E,ne.exports=l},87793:(ne,s,p)=>{"use strict";ne.exports=p(75207)},3923:(ne,s,p)=>{"use strict";var h=p(73502).Buffer,M=p(96386),w=p(31496),E=p(83894),l=p(79947),m=p(3946),y=p(75207);function b(P){w.Writable.call(this);var x=y[P];if(!x)throw new Error("Unknown message digest");this._hashType=x.hash,this._hash=M(x.hash),this._tag=x.id,this._signType=x.sign}function S(P){w.Writable.call(this);var x=y[P];if(!x)throw new Error("Unknown message digest");this._hash=M(x.hash),this._tag=x.id,this._signType=x.sign}function _(P){return new b(P)}function A(P){return new S(P)}Object.keys(y).forEach(function(P){y[P].id=h.from(y[P].id,"hex"),y[P.toLowerCase()]=y[P]}),E(b,w.Writable),b.prototype._write=function(x,T,L){this._hash.update(x),L()},b.prototype.update=function(x,T){return this._hash.update("string"==typeof x?h.from(x,T):x),this},b.prototype.sign=function(x,T){this.end();var L=this._hash.digest(),N=l(L,x,this._hashType,this._signType,this._tag);return T?N.toString(T):N},E(S,w.Writable),S.prototype._write=function(x,T,L){this._hash.update(x),L()},S.prototype.update=function(x,T){return this._hash.update("string"==typeof x?h.from(x,T):x),this},S.prototype.verify=function(x,T,L){var N="string"==typeof T?h.from(T,L):T;this.end();var j=this._hash.digest();return m(N,j,x,this._signType,this._tag)},ne.exports={Sign:_,Verify:A,createSign:_,createVerify:A}},79947:(ne,s,p)=>{"use strict";var h=p(73502).Buffer,M=p(74529),w=p(8466),E=p(57715).ec,l=p(98538),m=p(22772),y=p(1308),b=1;function x(B,V,G,W){if((B=h.from(B.toArray())).length0&&G.ishrn(W),G}function N(B,V,G){var W,Q;do{for(W=h.alloc(0);8*W.length{"use strict";var h=p(73502).Buffer,M=p(98538),w=p(57715).ec,E=p(22772),l=p(1308);function S(_,A){if(_.cmpn(0)<=0)throw new Error("invalid sig");if(_.cmp(A)>=0)throw new Error("invalid sig")}ne.exports=function m(_,A,P,x,T){var L=E(P);if("ec"===L.type){if("ecdsa"!==x&&"ecdsa/rsa"!==x)throw new Error("wrong public key type");return function y(_,A,P){var x=l[P.data.algorithm.curve.join(".")];if(!x)throw new Error("unknown curve "+P.data.algorithm.curve.join("."));var T=new w(x),L=P.data.subjectPrivateKey.data;return T.verify(A,_,L)}(_,A,L)}if("dsa"===L.type){if("dsa"!==x)throw new Error("wrong public key type");return function b(_,A,P){var x=P.data.p,T=P.data.q,L=P.data.g,N=P.data.pub_key,j=E.signature.decode(_,"der"),B=j.s,V=j.r;S(B,T),S(V,T);var G=M.mont(x),W=B.invm(T),Q=L.toRed(G).redPow(new M(A).mul(W).mod(T)).fromRed().mul(N.toRed(G).redPow(V.mul(W).mod(T)).fromRed()).mod(x).mod(T);return 0===Q.cmp(V)}(_,A,L)}if("rsa"!==x&&"ecdsa/rsa"!==x)throw new Error("wrong public key type");A=h.concat([T,A]);for(var N=L.modulus.byteLength(),j=[1],B=0;A.length+j.length+2{"use strict";var p={};function h(m,y,b){b||(b=Error);var _=function(A){function P(x,T,L){return A.call(this,function S(A,P,x){return"string"==typeof y?y:y(A,P,x)}(x,T,L))||this}return function s(m,y){m.prototype=Object.create(y.prototype),m.prototype.constructor=m,m.__proto__=y}(P,A),P}(b);_.prototype.name=b.name,_.prototype.code=m,p[m]=_}function M(m,y){if(Array.isArray(m)){var b=m.length;return m=m.map(function(S){return String(S)}),b>2?"one of ".concat(y," ").concat(m.slice(0,b-1).join(", "),", or ")+m[b-1]:2===b?"one of ".concat(y," ").concat(m[0]," or ").concat(m[1]):"of ".concat(y," ").concat(m[0])}return"of ".concat(y," ").concat(String(m))}h("ERR_INVALID_OPT_VALUE",function(m,y){return'The value "'+y+'" is invalid for option "'+m+'"'},TypeError),h("ERR_INVALID_ARG_TYPE",function(m,y,b){var S,_;if("string"==typeof y&&function w(m,y,b){return m.substr(!b||b<0?0:+b,y.length)===y}(y,"not ")?(S="must not be",y=y.replace(/^not /,"")):S="must be",function E(m,y,b){return(void 0===b||b>m.length)&&(b=m.length),m.substring(b-y.length,b)===y}(m," argument"))_="The ".concat(m," ").concat(S," ").concat(M(y,"type"));else{var A=function l(m,y,b){return"number"!=typeof b&&(b=0),!(b+y.length>m.length)&&-1!==m.indexOf(y,b)}(m,".")?"property":"argument";_='The "'.concat(m,'" ').concat(A," ").concat(S," ").concat(M(y,"type"))}return _+=". Received type ".concat(typeof b)},TypeError),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),h("ERR_METHOD_NOT_IMPLEMENTED",function(m){return"The "+m+" method is not implemented"}),h("ERR_STREAM_PREMATURE_CLOSE","Premature close"),h("ERR_STREAM_DESTROYED",function(m){return"Cannot call "+m+" after a stream was destroyed"}),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),h("ERR_STREAM_WRITE_AFTER_END","write after end"),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_UNKNOWN_ENCODING",function(m){return"Unknown encoding: "+m},TypeError),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ne.exports.q=p},55986:(ne,s,p)=>{"use strict";var h=Object.keys||function(_){var A=[];for(var P in _)A.push(P);return A};ne.exports=y;var M=p(14473),w=p(3766);p(83894)(y,M);for(var E=h(w.prototype),l=0;l{"use strict";ne.exports=M;var h=p(3556);function M(w){if(!(this instanceof M))return new M(w);h.call(this,w)}p(83894)(M,h),M.prototype._transform=function(w,E,l){l(null,w)}},14473:(ne,s,p)=>{"use strict";var h;ne.exports=I,I.ReadableState=ee;p(59069).EventEmitter;var w=function(be,Ne){return be.listeners(Ne).length},E=p(2228),l=p(93172).Buffer,m=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var _,S=p(56353);_=S&&S.debuglog?S.debuglog("stream"):function(){};var G,W,Q,A=p(76083),P=p(34936),T=p(47890).getHighWaterMark,L=p(84162).q,N=L.ERR_INVALID_ARG_TYPE,j=L.ERR_STREAM_PUSH_AFTER_EOF,B=L.ERR_METHOD_NOT_IMPLEMENTED,V=L.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;p(83894)(I,E);var q=P.errorOrDestroy,J=["error","close","destroy","pause","resume"];function ee(ce,be,Ne){h=h||p(55986),ce=ce||{},"boolean"!=typeof Ne&&(Ne=be instanceof h),this.objectMode=!!ce.objectMode,Ne&&(this.objectMode=this.objectMode||!!ce.readableObjectMode),this.highWaterMark=T(this,ce,"readableHighWaterMark",Ne),this.buffer=new A,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==ce.emitClose,this.autoDestroy=!!ce.autoDestroy,this.destroyed=!1,this.defaultEncoding=ce.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ce.encoding&&(G||(G=p(13465).s),this.decoder=new G(ce.encoding),this.encoding=ce.encoding)}function I(ce){if(h=h||p(55986),!(this instanceof I))return new I(ce);var be=this instanceof h;this._readableState=new ee(ce,this,be),this.readable=!0,ce&&("function"==typeof ce.read&&(this._read=ce.read),"function"==typeof ce.destroy&&(this._destroy=ce.destroy)),E.call(this)}function o(ce,be,Ne,Fe,lt){_("readableAddChunk",be);var He,Ge=ce._readableState;if(null===be)Ge.reading=!1,function z(ce,be){if(_("onEofChunk"),!be.ended){if(be.decoder){var Ne=be.decoder.end();Ne&&Ne.length&&(be.buffer.push(Ne),be.length+=be.objectMode?1:Ne.length)}be.ended=!0,be.sync?C(ce):(be.needReadable=!1,be.emittedReadable||(be.emittedReadable=!0,f(ce)))}}(ce,Ge);else if(lt||(He=function d(ce,be){var Ne;return!function b(ce){return l.isBuffer(ce)||ce instanceof m}(be)&&"string"!=typeof be&&void 0!==be&&!ce.objectMode&&(Ne=new N("chunk",["string","Buffer","Uint8Array"],be)),Ne}(Ge,be)),He)q(ce,He);else if(Ge.objectMode||be&&be.length>0)if("string"!=typeof be&&!Ge.objectMode&&Object.getPrototypeOf(be)!==l.prototype&&(be=function y(ce){return l.from(ce)}(be)),Fe)Ge.endEmitted?q(ce,new V):a(ce,Ge,be,!0);else if(Ge.ended)q(ce,new j);else{if(Ge.destroyed)return!1;Ge.reading=!1,Ge.decoder&&!Ne?(be=Ge.decoder.write(be),Ge.objectMode||0!==be.length?a(ce,Ge,be,!1):k(ce,Ge)):a(ce,Ge,be,!1)}else Fe||(Ge.reading=!1,k(ce,Ge));return!Ge.ended&&(Ge.lengthbe.highWaterMark&&(be.highWaterMark=function D(ce){return ce>=g?ce=g:(ce--,ce|=ce>>>1,ce|=ce>>>2,ce|=ce>>>4,ce|=ce>>>8,ce|=ce>>>16,ce++),ce}(ce)),ce<=be.length?ce:be.ended?be.length:(be.needReadable=!0,0))}function C(ce){var be=ce._readableState;_("emitReadable",be.needReadable,be.emittedReadable),be.needReadable=!1,be.emittedReadable||(_("emitReadable",be.flowing),be.emittedReadable=!0,process.nextTick(f,ce))}function f(ce){var be=ce._readableState;_("emitReadable_",be.destroyed,be.length,be.ended),!be.destroyed&&(be.length||be.ended)&&(ce.emit("readable"),be.emittedReadable=!1),be.needReadable=!be.flowing&&!be.ended&&be.length<=be.highWaterMark,ve(ce)}function k(ce,be){be.readingMore||(be.readingMore=!0,process.nextTick(se,ce,be))}function se(ce,be){for(;!be.reading&&!be.ended&&(be.length0,be.resumeScheduled&&!be.paused?be.flowing=!0:ce.listenerCount("data")>0&&ce.resume()}function de(ce){_("readable nexttick read 0"),ce.read(0)}function ye(ce,be){_("resume",be.reading),be.reading||ce.read(0),be.resumeScheduled=!1,ce.emit("resume"),ve(ce),be.flowing&&!be.reading&&ce.read(0)}function ve(ce){var be=ce._readableState;for(_("flow",be.flowing);be.flowing&&null!==ce.read(););}function ae(ce,be){return 0===be.length?null:(be.objectMode?Ne=be.buffer.shift():!ce||ce>=be.length?(Ne=be.decoder?be.buffer.join(""):1===be.buffer.length?be.buffer.first():be.buffer.concat(be.length),be.buffer.clear()):Ne=be.buffer.consume(ce,be.decoder),Ne);var Ne}function fe(ce){var be=ce._readableState;_("endReadable",be.endEmitted),be.endEmitted||(be.ended=!0,process.nextTick(pe,be,ce))}function pe(ce,be){if(_("endReadableNT",ce.endEmitted,ce.length),!ce.endEmitted&&0===ce.length&&(ce.endEmitted=!0,be.readable=!1,be.emit("end"),ce.autoDestroy)){var Ne=be._writableState;(!Ne||Ne.autoDestroy&&Ne.finished)&&be.destroy()}}function Se(ce,be){for(var Ne=0,Fe=ce.length;Ne=be.highWaterMark:be.length>0)||be.ended))return _("read: emitReadable",be.length,be.ended),0===be.length&&be.ended?fe(this):C(this),null;if(0===(ce=F(ce,be))&&be.ended)return 0===be.length&&fe(this),null;var lt,Fe=be.needReadable;return _("need readable",Fe),(0===be.length||be.length-ce0?ae(ce,be):null)?(be.needReadable=be.length<=be.highWaterMark,ce=0):(be.length-=ce,be.awaitDrain=0),0===be.length&&(be.ended||(be.needReadable=!0),Ne!==ce&&be.ended&&fe(this)),null!==lt&&this.emit("data",lt),lt},I.prototype._read=function(ce){q(this,new B("_read()"))},I.prototype.pipe=function(ce,be){var Ne=this,Fe=this._readableState;switch(Fe.pipesCount){case 0:Fe.pipes=ce;break;case 1:Fe.pipes=[Fe.pipes,ce];break;default:Fe.pipes.push(ce)}Fe.pipesCount+=1,_("pipe count=%d opts=%j",Fe.pipesCount,be);var Ge=(!be||!1!==be.end)&&ce!==process.stdout&&ce!==process.stderr?Kt:Ae;function He(Te,Be){_("onunpipe"),Te===Ne&&Be&&!1===Be.hasUnpiped&&(Be.hasUnpiped=!0,function Vt(){_("cleanup"),ce.removeListener("close",Gt),ce.removeListener("finish",Re),ce.removeListener("drain",tt),ce.removeListener("error",at),ce.removeListener("unpipe",He),Ne.removeListener("end",Kt),Ne.removeListener("end",Ae),Ne.removeListener("data",ot),nt=!0,Fe.awaitDrain&&(!ce._writableState||ce._writableState.needDrain)&&tt()}())}function Kt(){_("onend"),ce.end()}Fe.endEmitted?process.nextTick(Ge):Ne.once("end",Ge),ce.on("unpipe",He);var tt=function te(ce){return function(){var Ne=ce._readableState;_("pipeOnDrain",Ne.awaitDrain),Ne.awaitDrain&&Ne.awaitDrain--,0===Ne.awaitDrain&&w(ce,"data")&&(Ne.flowing=!0,ve(ce))}}(Ne);ce.on("drain",tt);var nt=!1;function ot(Te){_("ondata");var Be=ce.write(Te);_("dest.write",Be),!1===Be&&((1===Fe.pipesCount&&Fe.pipes===ce||Fe.pipesCount>1&&-1!==Se(Fe.pipes,ce))&&!nt&&(_("false write response, pause",Fe.awaitDrain),Fe.awaitDrain++),Ne.pause())}function at(Te){_("onerror",Te),Ae(),ce.removeListener("error",at),0===w(ce,"error")&&q(ce,Te)}function Gt(){ce.removeListener("finish",Re),Ae()}function Re(){_("onfinish"),ce.removeListener("close",Gt),Ae()}function Ae(){_("unpipe"),Ne.unpipe(ce)}return Ne.on("data",ot),function Z(ce,be,Ne){if("function"==typeof ce.prependListener)return ce.prependListener(be,Ne);ce._events&&ce._events[be]?Array.isArray(ce._events[be])?ce._events[be].unshift(Ne):ce._events[be]=[Ne,ce._events[be]]:ce.on(be,Ne)}(ce,"error",at),ce.once("close",Gt),ce.once("finish",Re),ce.emit("pipe",Ne),Fe.flowing||(_("pipe resume"),Ne.resume()),ce},I.prototype.unpipe=function(ce){var be=this._readableState,Ne={hasUnpiped:!1};if(0===be.pipesCount)return this;if(1===be.pipesCount)return ce&&ce!==be.pipes||(ce||(ce=be.pipes),be.pipes=null,be.pipesCount=0,be.flowing=!1,ce&&ce.emit("unpipe",this,Ne)),this;if(!ce){var Fe=be.pipes,lt=be.pipesCount;be.pipes=null,be.pipesCount=0,be.flowing=!1;for(var Ge=0;Ge0,!1!==Fe.flowing&&this.resume()):"readable"===ce&&!Fe.endEmitted&&!Fe.readableListening&&(Fe.readableListening=Fe.needReadable=!0,Fe.flowing=!1,Fe.emittedReadable=!1,_("on readable",Fe.length,Fe.reading),Fe.length?C(this):Fe.reading||process.nextTick(de,this)),Ne},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(ce,be){var Ne=E.prototype.removeListener.call(this,ce,be);return"readable"===ce&&process.nextTick(oe,this),Ne},I.prototype.removeAllListeners=function(ce){var be=E.prototype.removeAllListeners.apply(this,arguments);return("readable"===ce||void 0===ce)&&process.nextTick(oe,this),be},I.prototype.resume=function(){var ce=this._readableState;return ce.flowing||(_("resume"),ce.flowing=!ce.readableListening,function Ie(ce,be){be.resumeScheduled||(be.resumeScheduled=!0,process.nextTick(ye,ce,be))}(this,ce)),ce.paused=!1,this},I.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(ce){var be=this,Ne=this._readableState,Fe=!1;for(var lt in ce.on("end",function(){if(_("wrapped end"),Ne.decoder&&!Ne.ended){var He=Ne.decoder.end();He&&He.length&&be.push(He)}be.push(null)}),ce.on("data",function(He){(_("wrapped data"),Ne.decoder&&(He=Ne.decoder.write(He)),Ne.objectMode&&null==He||!(Ne.objectMode||He&&He.length))||(be.push(He)||(Fe=!0,ce.pause()))}),ce)void 0===this[lt]&&"function"==typeof ce[lt]&&(this[lt]=function(Kt){return function(){return ce[Kt].apply(ce,arguments)}}(lt));for(var Ge=0;Ge{"use strict";ne.exports=b;var h=p(84162).q,M=h.ERR_METHOD_NOT_IMPLEMENTED,w=h.ERR_MULTIPLE_CALLBACK,E=h.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=h.ERR_TRANSFORM_WITH_LENGTH_0,m=p(55986);function y(A,P){var x=this._transformState;x.transforming=!1;var T=x.writecb;if(null===T)return this.emit("error",new w);x.writechunk=null,x.writecb=null,null!=P&&this.push(P),T(A);var L=this._readableState;L.reading=!1,(L.needReadable||L.length{"use strict";function M(ve){var ae=this;this.next=null,this.entry=null,this.finish=function(){!function ye(ve,ae,fe){var pe=ve.entry;for(ve.entry=null;pe;){var Se=pe.callback;ae.pendingcb--,Se(fe),pe=pe.next}ae.corkedRequestsFree.next=ve}(ae,ve)}}var w;ne.exports=ee,ee.WritableState=J;var E={deprecate:p(23532)},l=p(2228),m=p(93172).Buffer,y=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var Z,_=p(34936),P=p(47890).getHighWaterMark,x=p(84162).q,T=x.ERR_INVALID_ARG_TYPE,L=x.ERR_METHOD_NOT_IMPLEMENTED,N=x.ERR_MULTIPLE_CALLBACK,j=x.ERR_STREAM_CANNOT_PIPE,B=x.ERR_STREAM_DESTROYED,V=x.ERR_STREAM_NULL_VALUES,G=x.ERR_STREAM_WRITE_AFTER_END,W=x.ERR_UNKNOWN_ENCODING,Q=_.errorOrDestroy;function q(){}function J(ve,ae,fe){w=w||p(55986),ve=ve||{},"boolean"!=typeof fe&&(fe=ae instanceof w),this.objectMode=!!ve.objectMode,fe&&(this.objectMode=this.objectMode||!!ve.writableObjectMode),this.highWaterMark=P(this,ve,"writableHighWaterMark",fe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var pe=!1===ve.decodeStrings;this.decodeStrings=!pe,this.defaultEncoding=ve.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Se){!function z(ve,ae){var fe=ve._writableState,pe=fe.sync,Se=fe.writecb;if("function"!=typeof Se)throw new N;if(function F(ve){ve.writing=!1,ve.writecb=null,ve.length-=ve.writelen,ve.writelen=0}(fe),ae)!function D(ve,ae,fe,pe,Se){--ae.pendingcb,fe?(process.nextTick(Se,pe),process.nextTick(de,ve,ae),ve._writableState.errorEmitted=!0,Q(ve,pe)):(Se(pe),ve._writableState.errorEmitted=!0,Q(ve,pe),de(ve,ae))}(ve,fe,pe,ae,Se);else{var ce=se(fe)||ve.destroyed;!ce&&!fe.corked&&!fe.bufferProcessing&&fe.bufferedRequest&&k(ve,fe),pe?process.nextTick(C,ve,fe,ce,Se):C(ve,fe,ce,Se)}}(ae,Se)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==ve.emitClose,this.autoDestroy=!!ve.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new M(this)}function ee(ve){var ae=this instanceof(w=w||p(55986));if(!ae&&!Z.call(ee,this))return new ee(ve);this._writableState=new J(ve,this,ae),this.writable=!0,ve&&("function"==typeof ve.write&&(this._write=ve.write),"function"==typeof ve.writev&&(this._writev=ve.writev),"function"==typeof ve.destroy&&(this._destroy=ve.destroy),"function"==typeof ve.final&&(this._final=ve.final)),l.call(this)}function g(ve,ae,fe,pe,Se,ce,be){ae.writelen=pe,ae.writecb=be,ae.writing=!0,ae.sync=!0,ae.destroyed?ae.onwrite(new B("write")):fe?ve._writev(Se,ae.onwrite):ve._write(Se,ce,ae.onwrite),ae.sync=!1}function C(ve,ae,fe,pe){fe||function f(ve,ae){0===ae.length&&ae.needDrain&&(ae.needDrain=!1,ve.emit("drain"))}(ve,ae),ae.pendingcb--,pe(),de(ve,ae)}function k(ve,ae){ae.bufferProcessing=!0;var fe=ae.bufferedRequest;if(ve._writev&&fe&&fe.next){var pe=ae.bufferedRequestCount,Se=new Array(pe),ce=ae.corkedRequestsFree;ce.entry=fe;for(var be=0,Ne=!0;fe;)Se[be]=fe,fe.isBuf||(Ne=!1),fe=fe.next,be+=1;Se.allBuffers=Ne,g(ve,ae,!0,ae.length,Se,"",ce.finish),ae.pendingcb++,ae.lastBufferedRequest=null,ce.next?(ae.corkedRequestsFree=ce.next,ce.next=null):ae.corkedRequestsFree=new M(ae),ae.bufferedRequestCount=0}else{for(;fe;){var Fe=fe.chunk,lt=fe.encoding,Ge=fe.callback;if(g(ve,ae,!1,ae.objectMode?1:Fe.length,Fe,lt,Ge),fe=fe.next,ae.bufferedRequestCount--,ae.writing)break}null===fe&&(ae.lastBufferedRequest=null)}ae.bufferedRequest=fe,ae.bufferProcessing=!1}function se(ve){return ve.ending&&0===ve.length&&null===ve.bufferedRequest&&!ve.finished&&!ve.writing}function te(ve,ae){ve._final(function(fe){ae.pendingcb--,fe&&Q(ve,fe),ae.prefinished=!0,ve.emit("prefinish"),de(ve,ae)})}function de(ve,ae){var fe=se(ae);if(fe&&(function oe(ve,ae){!ae.prefinished&&!ae.finalCalled&&("function"!=typeof ve._final||ae.destroyed?(ae.prefinished=!0,ve.emit("prefinish")):(ae.pendingcb++,ae.finalCalled=!0,process.nextTick(te,ve,ae)))}(ve,ae),0===ae.pendingcb&&(ae.finished=!0,ve.emit("finish"),ae.autoDestroy))){var pe=ve._readableState;(!pe||pe.autoDestroy&&pe.endEmitted)&&ve.destroy()}return fe}p(83894)(ee,l),J.prototype.getBuffer=function(){for(var ae=this.bufferedRequest,fe=[];ae;)fe.push(ae),ae=ae.next;return fe},function(){try{Object.defineProperty(J.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(Z=Function.prototype[Symbol.hasInstance],Object.defineProperty(ee,Symbol.hasInstance,{value:function(ae){return!!Z.call(this,ae)||this===ee&&(ae&&ae._writableState instanceof J)}})):Z=function(ae){return ae instanceof this},ee.prototype.pipe=function(){Q(this,new j)},ee.prototype.write=function(ve,ae,fe){var pe=this._writableState,Se=!1,ce=!pe.objectMode&&function S(ve){return m.isBuffer(ve)||ve instanceof y}(ve);return ce&&!m.isBuffer(ve)&&(ve=function b(ve){return m.from(ve)}(ve)),"function"==typeof ae&&(fe=ae,ae=null),ce?ae="buffer":ae||(ae=pe.defaultEncoding),"function"!=typeof fe&&(fe=q),pe.ending?function I(ve,ae){var fe=new G;Q(ve,fe),process.nextTick(ae,fe)}(this,fe):(ce||function o(ve,ae,fe,pe){var Se;return null===fe?Se=new V:"string"!=typeof fe&&!ae.objectMode&&(Se=new T("chunk",["string","Buffer"],fe)),!Se||(Q(ve,Se),process.nextTick(pe,Se),!1)}(this,pe,ve,fe))&&(pe.pendingcb++,Se=function d(ve,ae,fe,pe,Se,ce){if(!fe){var be=function a(ve,ae,fe){return!ve.objectMode&&!1!==ve.decodeStrings&&"string"==typeof ae&&(ae=m.from(ae,fe)),ae}(ae,pe,Se);pe!==be&&(fe=!0,Se="buffer",pe=be)}var Ne=ae.objectMode?1:pe.length;ae.length+=Ne;var Fe=ae.length-1))throw new W(ae);return this._writableState.defaultEncoding=ae,this},Object.defineProperty(ee.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(ee.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),ee.prototype._write=function(ve,ae,fe){fe(new L("_write()"))},ee.prototype._writev=null,ee.prototype.end=function(ve,ae,fe){var pe=this._writableState;return"function"==typeof ve?(fe=ve,ve=null,ae=null):"function"==typeof ae&&(fe=ae,ae=null),null!=ve&&this.write(ve,ae),pe.corked&&(pe.corked=1,this.uncork()),pe.ending||function Ie(ve,ae,fe){ae.ending=!0,de(ve,ae),fe&&(ae.finished?process.nextTick(fe):ve.once("finish",fe)),ae.ended=!0,ve.writable=!1}(this,pe,fe),this},Object.defineProperty(ee.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ae){this._writableState&&(this._writableState.destroyed=ae)}}),ee.prototype.destroy=_.destroy,ee.prototype._undestroy=_.undestroy,ee.prototype._destroy=function(ve,ae){ae(ve)}},56121:(ne,s,p)=>{"use strict";var h;function M(G,W,Q){return W=function w(G){var W=function E(G,W){if("object"!=typeof G||null===G)return G;var Q=G[Symbol.toPrimitive];if(void 0!==Q){var q=Q.call(G,W||"default");if("object"!=typeof q)return q;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===W?String:Number)(G)}(G,"string");return"symbol"==typeof W?W:String(W)}(W),W in G?Object.defineProperty(G,W,{value:Q,enumerable:!0,configurable:!0,writable:!0}):G[W]=Q,G}var l=p(81291),m=Symbol("lastResolve"),y=Symbol("lastReject"),b=Symbol("error"),S=Symbol("ended"),_=Symbol("lastPromise"),A=Symbol("handlePromise"),P=Symbol("stream");function x(G,W){return{value:G,done:W}}function T(G){var W=G[m];if(null!==W){var Q=G[P].read();null!==Q&&(G[_]=null,G[m]=null,G[y]=null,W(x(Q,!1)))}}function L(G){process.nextTick(T,G)}var j=Object.getPrototypeOf(function(){}),B=Object.setPrototypeOf((M(h={get stream(){return this[P]},next:function(){var W=this,Q=this[b];if(null!==Q)return Promise.reject(Q);if(this[S])return Promise.resolve(x(void 0,!0));if(this[P].destroyed)return new Promise(function(ee,I){process.nextTick(function(){W[b]?I(W[b]):ee(x(void 0,!0))})});var J,q=this[_];if(q)J=new Promise(function N(G,W){return function(Q,q){G.then(function(){W[S]?Q(x(void 0,!0)):W[A](Q,q)},q)}}(q,this));else{var Z=this[P].read();if(null!==Z)return Promise.resolve(x(Z,!1));J=new Promise(this[A])}return this[_]=J,J}},Symbol.asyncIterator,function(){return this}),M(h,"return",function(){var W=this;return new Promise(function(Q,q){W[P].destroy(null,function(J){J?q(J):Q(x(void 0,!0))})})}),h),j);ne.exports=function(W){var Q,q=Object.create(B,(M(Q={},P,{value:W,writable:!0}),M(Q,m,{value:null,writable:!0}),M(Q,y,{value:null,writable:!0}),M(Q,b,{value:null,writable:!0}),M(Q,S,{value:W._readableState.endEmitted,writable:!0}),M(Q,A,{value:function(Z,ee){var I=q[P].read();I?(q[_]=null,q[m]=null,q[y]=null,Z(x(I,!1))):(q[m]=Z,q[y]=ee)},writable:!0}),Q));return q[_]=null,l(W,function(J){if(J&&"ERR_STREAM_PREMATURE_CLOSE"!==J.code){var Z=q[y];return null!==Z&&(q[_]=null,q[m]=null,q[y]=null,Z(J)),void(q[b]=J)}var ee=q[m];null!==ee&&(q[_]=null,q[m]=null,q[y]=null,ee(x(void 0,!0))),q[S]=!0}),W.on("readable",L.bind(null,q)),q}},76083:(ne,s,p)=>{"use strict";function h(L,N){var j=Object.keys(L);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(L);N&&(B=B.filter(function(V){return Object.getOwnPropertyDescriptor(L,V).enumerable})),j.push.apply(j,B)}return j}function M(L){for(var N=1;N0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(j){var B={data:j,next:this.head};0===this.length&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(0!==this.length){var j=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,j}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(j){if(0===this.length)return"";for(var B=this.head,V=""+B.data;B=B.next;)V+=j+B.data;return V}},{key:"concat",value:function(j){if(0===this.length)return _.alloc(0);for(var B=_.allocUnsafe(j>>>0),V=this.head,G=0;V;)T(V.data,B,G),G+=V.data.length,V=V.next;return B}},{key:"consume",value:function(j,B){var V;return jW.length?W.length:j;if(Q===W.length?G+=W:G+=W.slice(0,j),0===(j-=Q)){Q===W.length?(++V,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=W.slice(Q));break}++V}return this.length-=V,G}},{key:"_getBuffer",value:function(j){var B=_.allocUnsafe(j),V=this.head,G=1;for(V.data.copy(B),j-=V.data.length;V=V.next;){var W=V.data,Q=j>W.length?W.length:j;if(W.copy(B,B.length-j,0,Q),0===(j-=Q)){Q===W.length?(++G,V.next?this.head=V.next:this.head=this.tail=null):(this.head=V,V.data=W.slice(Q));break}++G}return this.length-=G,B}},{key:x,value:function(j,B){return P(this,M(M({},B),{},{depth:0,customInspect:!1}))}}]),L}()},34936:ne=>{"use strict";function p(l,m){w(l,m),h(l)}function h(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function w(l,m){l.emit("error",m)}ne.exports={destroy:function s(l,m){var y=this,b=this._readableState&&this._readableState.destroyed,S=this._writableState&&this._writableState.destroyed;return b||S?(m?m(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(w,this,l)):process.nextTick(w,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(_){!m&&_?y._writableState?y._writableState.errorEmitted?process.nextTick(h,y):(y._writableState.errorEmitted=!0,process.nextTick(p,y,_)):process.nextTick(p,y,_):m?(process.nextTick(h,y),m(_)):process.nextTick(h,y)}),this)},undestroy:function M(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function E(l,m){var y=l._readableState,b=l._writableState;y&&y.autoDestroy||b&&b.autoDestroy?l.destroy(m):l.emit("error",m)}}},81291:(ne,s,p)=>{"use strict";var h=p(84162).q.ERR_STREAM_PREMATURE_CLOSE;function w(){}ne.exports=function l(m,y,b){if("function"==typeof y)return l(m,null,y);y||(y={}),b=function M(m){var y=!1;return function(){if(!y){y=!0;for(var b=arguments.length,S=new Array(b),_=0;_{ne.exports=function(){throw new Error("Readable.from is not available in the browser")}},33795:(ne,s,p)=>{"use strict";var h;var w=p(84162).q,E=w.ERR_MISSING_ARGS,l=w.ERR_STREAM_DESTROYED;function m(x){if(x)throw x}function S(x){x()}function _(x,T){return x.pipe(T)}ne.exports=function P(){for(var x=arguments.length,T=new Array(x),L=0;L0,function(q){j||(j=q),q&&B.forEach(S),!W&&(B.forEach(S),N(j))})});return T.reduce(_)}},47890:(ne,s,p)=>{"use strict";var h=p(84162).q.ERR_INVALID_OPT_VALUE;ne.exports={getHighWaterMark:function w(E,l,m,y){var b=function M(E,l,m){return null!=E.highWaterMark?E.highWaterMark:l?E[m]:null}(l,y,m);if(null!=b){if(!isFinite(b)||Math.floor(b)!==b||b<0)throw new h(y?m:"highWaterMark",b);return Math.floor(b)}return E.objectMode?16:16384}}},2228:(ne,s,p)=>{ne.exports=p(59069).EventEmitter},31496:(ne,s,p)=>{(s=ne.exports=p(14473)).Stream=s,s.Readable=s,s.Writable=p(3766),s.Duplex=p(55986),s.Transform=p(3556),s.PassThrough=p(1576),s.finished=p(81291),s.pipeline=p(33795)},13465:(ne,s,p)=>{"use strict";var h=p(73502).Buffer,M=h.isEncoding||function(B){switch((B=""+B)&&B.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 l(B){var V;switch(this.encoding=function E(B){var V=function w(B){if(!B)return"utf8";for(var V;;)switch(B){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 B;default:if(V)return;B=(""+B).toLowerCase(),V=!0}}(B);if("string"!=typeof V&&(h.isEncoding===M||!M(B)))throw new Error("Unknown encoding: "+B);return V||B}(B),this.encoding){case"utf16le":this.text=P,this.end=x,V=4;break;case"utf8":this.fillLast=S,V=4;break;case"base64":this.text=T,this.end=L,V=3;break;default:return this.write=N,void(this.end=j)}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(V)}function m(B){return B<=127?0:B>>5==6?2:B>>4==14?3:B>>3==30?4:B>>6==2?-1:-2}function S(B){var V=this.lastTotal-this.lastNeed,G=function b(B,V,G){if(128!=(192&V[0]))return B.lastNeed=0,"\ufffd";if(B.lastNeed>1&&V.length>1){if(128!=(192&V[1]))return B.lastNeed=1,"\ufffd";if(B.lastNeed>2&&V.length>2&&128!=(192&V[2]))return B.lastNeed=2,"\ufffd"}}(this,B);return void 0!==G?G:this.lastNeed<=B.length?(B.copy(this.lastChar,V,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(B.copy(this.lastChar,V,0,B.length),void(this.lastNeed-=B.length))}function P(B,V){if((B.length-V)%2==0){var G=B.toString("utf16le",V);if(G){var W=G.charCodeAt(G.length-1);if(W>=55296&&W<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=B[B.length-2],this.lastChar[1]=B[B.length-1],G.slice(0,-1)}return G}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=B[B.length-1],B.toString("utf16le",V,B.length-1)}function x(B){var V=B&&B.length?this.write(B):"";if(this.lastNeed){var G=this.lastTotal-this.lastNeed;return V+this.lastChar.toString("utf16le",0,G)}return V}function T(B,V){var G=(B.length-V)%3;return 0===G?B.toString("base64",V):(this.lastNeed=3-G,this.lastTotal=3,1===G?this.lastChar[0]=B[B.length-1]:(this.lastChar[0]=B[B.length-2],this.lastChar[1]=B[B.length-1]),B.toString("base64",V,B.length-G))}function L(B){var V=B&&B.length?this.write(B):"";return this.lastNeed?V+this.lastChar.toString("base64",0,3-this.lastNeed):V}function N(B){return B.toString(this.encoding)}function j(B){return B&&B.length?this.write(B):""}s.s=l,l.prototype.write=function(B){if(0===B.length)return"";var V,G;if(this.lastNeed){if(void 0===(V=this.fillLast(B)))return"";G=this.lastNeed,this.lastNeed=0}else G=0;return G=0?(Q>0&&(B.lastNeed=Q-1),Q):--W=0?(Q>0&&(B.lastNeed=Q-2),Q):--W=0?(Q>0&&(2===Q?Q=0:B.lastNeed=Q-3),Q):0))}(this,B,V);if(!this.lastNeed)return B.toString("utf8",V);this.lastTotal=G;var W=B.length-(G-this.lastNeed);return B.copy(this.lastChar,0,W),B.toString("utf8",V,W)},l.prototype.fillLast=function(B){if(this.lastNeed<=B.length)return B.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);B.copy(this.lastChar,this.lastTotal-this.lastNeed,0,B.length),this.lastNeed-=B.length}},58905:ne=>{var s=Object.prototype.toString,p=typeof Buffer<"u"&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;ne.exports=function E(l,m,y){if("number"==typeof l)throw new TypeError('"value" argument must not be a number');return function h(l){return"ArrayBuffer"===s.call(l).slice(8,-1)}(l)?function M(l,m,y){m>>>=0;var b=l.byteLength-m;if(b<0)throw new RangeError("'offset' is out of bounds");if(void 0===y)y=b;else if((y>>>=0)>b)throw new RangeError("'length' is out of bounds");return p?Buffer.from(l.slice(m,m+y)):new Buffer(new Uint8Array(l.slice(m,m+y)))}(l,m,y):"string"==typeof l?function w(l,m){if(("string"!=typeof m||""===m)&&(m="utf8"),!Buffer.isEncoding(m))throw new TypeError('"encoding" must be a valid string encoding');return p?Buffer.from(l,m):new Buffer(l,m)}(l,m):p?Buffer.from(l):new Buffer(l)}},58789:ne=>{ne.exports=function(p,h){for(var M=Math.min(p.length,h.length),w=new Buffer(M),E=0;E{"use strict";const h=p(5343),M=p(48461),w="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;s.Buffer=y,s.SlowBuffer=function B(Re){return+Re!=Re&&(Re=0),y.alloc(+Re)},s.INSPECT_MAX_BYTES=50;const E=2147483647;function m(Re){if(Re>E)throw new RangeError('The value "'+Re+'" is invalid for option "size"');const Ae=new Uint8Array(Re);return Object.setPrototypeOf(Ae,y.prototype),Ae}function y(Re,Ae,Te){if("number"==typeof Re){if("string"==typeof Ae)throw new TypeError('The "string" argument must be of type string. Received type number');return A(Re)}return b(Re,Ae,Te)}function b(Re,Ae,Te){if("string"==typeof Re)return function P(Re,Ae){if(("string"!=typeof Ae||""===Ae)&&(Ae="utf8"),!y.isEncoding(Ae))throw new TypeError("Unknown encoding: "+Ae);const Te=0|V(Re,Ae);let Be=m(Te);const Ve=Be.write(Re,Ae);return Ve!==Te&&(Be=Be.slice(0,Ve)),Be}(Re,Ae);if(ArrayBuffer.isView(Re))return function T(Re){if(nt(Re,Uint8Array)){const Ae=new Uint8Array(Re);return L(Ae.buffer,Ae.byteOffset,Ae.byteLength)}return x(Re)}(Re);if(null==Re)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Re);if(nt(Re,ArrayBuffer)||Re&&nt(Re.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(nt(Re,SharedArrayBuffer)||Re&&nt(Re.buffer,SharedArrayBuffer)))return L(Re,Ae,Te);if("number"==typeof Re)throw new TypeError('The "value" argument must not be of type number. Received type number');const Be=Re.valueOf&&Re.valueOf();if(null!=Be&&Be!==Re)return y.from(Be,Ae,Te);const Ve=function N(Re){if(y.isBuffer(Re)){const Ae=0|j(Re.length),Te=m(Ae);return 0===Te.length||Re.copy(Te,0,0,Ae),Te}if(void 0!==Re.length)return"number"!=typeof Re.length||Vt(Re.length)?m(0):x(Re);if("Buffer"===Re.type&&Array.isArray(Re.data))return x(Re.data)}(Re);if(Ve)return Ve;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof Re[Symbol.toPrimitive])return y.from(Re[Symbol.toPrimitive]("string"),Ae,Te);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Re)}function S(Re){if("number"!=typeof Re)throw new TypeError('"size" argument must be of type number');if(Re<0)throw new RangeError('The value "'+Re+'" is invalid for option "size"')}function A(Re){return S(Re),m(Re<0?0:0|j(Re))}function x(Re){const Ae=Re.length<0?0:0|j(Re.length),Te=m(Ae);for(let Be=0;Be=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return 0|Re}function V(Re,Ae){if(y.isBuffer(Re))return Re.length;if(ArrayBuffer.isView(Re)||nt(Re,ArrayBuffer))return Re.byteLength;if("string"!=typeof Re)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Re);const Te=Re.length,Be=arguments.length>2&&!0===arguments[2];if(!Be&&0===Te)return 0;let Ve=!1;for(;;)switch(Ae){case"ascii":case"latin1":case"binary":return Te;case"utf8":case"utf-8":return lt(Re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Te;case"hex":return Te>>>1;case"base64":return Kt(Re).length;default:if(Ve)return Be?-1:lt(Re).length;Ae=(""+Ae).toLowerCase(),Ve=!0}}function G(Re,Ae,Te){let Be=!1;if((void 0===Ae||Ae<0)&&(Ae=0),Ae>this.length||((void 0===Te||Te>this.length)&&(Te=this.length),Te<=0)||(Te>>>=0)<=(Ae>>>=0))return"";for(Re||(Re="utf8");;)switch(Re){case"hex":return C(this,Ae,Te);case"utf8":case"utf-8":return d(this,Ae,Te);case"ascii":return F(this,Ae,Te);case"latin1":case"binary":return z(this,Ae,Te);case"base64":return a(this,Ae,Te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,Ae,Te);default:if(Be)throw new TypeError("Unknown encoding: "+Re);Re=(Re+"").toLowerCase(),Be=!0}}function W(Re,Ae,Te){const Be=Re[Ae];Re[Ae]=Re[Te],Re[Te]=Be}function Q(Re,Ae,Te,Be,Ve){if(0===Re.length)return-1;if("string"==typeof Te?(Be=Te,Te=0):Te>2147483647?Te=2147483647:Te<-2147483648&&(Te=-2147483648),Vt(Te=+Te)&&(Te=Ve?0:Re.length-1),Te<0&&(Te=Re.length+Te),Te>=Re.length){if(Ve)return-1;Te=Re.length-1}else if(Te<0){if(!Ve)return-1;Te=0}if("string"==typeof Ae&&(Ae=y.from(Ae,Be)),y.isBuffer(Ae))return 0===Ae.length?-1:q(Re,Ae,Te,Be,Ve);if("number"==typeof Ae)return Ae&=255,"function"==typeof Uint8Array.prototype.indexOf?Ve?Uint8Array.prototype.indexOf.call(Re,Ae,Te):Uint8Array.prototype.lastIndexOf.call(Re,Ae,Te):q(Re,[Ae],Te,Be,Ve);throw new TypeError("val must be string, number or Buffer")}function q(Re,Ae,Te,Be,Ve){let ft,mt=1,Ze=Re.length,ct=Ae.length;if(void 0!==Be&&("ucs2"===(Be=String(Be).toLowerCase())||"ucs-2"===Be||"utf16le"===Be||"utf-16le"===Be)){if(Re.length<2||Ae.length<2)return-1;mt=2,Ze/=2,ct/=2,Te/=2}function hn(At,wn){return 1===mt?At[wn]:At.readUInt16BE(wn*mt)}if(Ve){let At=-1;for(ft=Te;ftZe&&(Te=Ze-ct),ft=Te;ft>=0;ft--){let At=!0;for(let wn=0;wnVe&&(Be=Ve):Be=Ve;const mt=Ae.length;let Ze;for(Be>mt/2&&(Be=mt/2),Ze=0;Ze>8,Ve=Te%256,mt.push(Ve),mt.push(Be);return mt}(Ae,Re.length-Te),Re,Te,Be)}function a(Re,Ae,Te){return 0===Ae&&Te===Re.length?h.fromByteArray(Re):h.fromByteArray(Re.slice(Ae,Te))}function d(Re,Ae,Te){Te=Math.min(Re.length,Te);const Be=[];let Ve=Ae;for(;Ve239?4:mt>223?3:mt>191?2:1;if(Ve+ct<=Te){let hn,ft,At,wn;switch(ct){case 1:mt<128&&(Ze=mt);break;case 2:hn=Re[Ve+1],128==(192&hn)&&(wn=(31&mt)<<6|63&hn,wn>127&&(Ze=wn));break;case 3:hn=Re[Ve+1],ft=Re[Ve+2],128==(192&hn)&&128==(192&ft)&&(wn=(15&mt)<<12|(63&hn)<<6|63&ft,wn>2047&&(wn<55296||wn>57343)&&(Ze=wn));break;case 4:hn=Re[Ve+1],ft=Re[Ve+2],At=Re[Ve+3],128==(192&hn)&&128==(192&ft)&&128==(192&At)&&(wn=(15&mt)<<18|(63&hn)<<12|(63&ft)<<6|63&At,wn>65535&&wn<1114112&&(Ze=wn))}}null===Ze?(Ze=65533,ct=1):Ze>65535&&(Ze-=65536,Be.push(Ze>>>10&1023|55296),Ze=56320|1023&Ze),Be.push(Ze),Ve+=ct}return function D(Re){const Ae=Re.length;if(Ae<=g)return String.fromCharCode.apply(String,Re);let Te="",Be=0;for(;BeVe.length?(y.isBuffer(Ze)||(Ze=y.from(Ze)),Ze.copy(Ve,mt)):Uint8Array.prototype.set.call(Ve,Ze,mt);else{if(!y.isBuffer(Ze))throw new TypeError('"list" argument must be an Array of Buffers');Ze.copy(Ve,mt)}mt+=Ze.length}return Ve},y.byteLength=V,y.prototype._isBuffer=!0,y.prototype.swap16=function(){const Ae=this.length;if(Ae%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Te=0;TeTe&&(Ae+=" ... "),""},w&&(y.prototype[w]=y.prototype.inspect),y.prototype.compare=function(Ae,Te,Be,Ve,mt){if(nt(Ae,Uint8Array)&&(Ae=y.from(Ae,Ae.offset,Ae.byteLength)),!y.isBuffer(Ae))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ae);if(void 0===Te&&(Te=0),void 0===Be&&(Be=Ae?Ae.length:0),void 0===Ve&&(Ve=0),void 0===mt&&(mt=this.length),Te<0||Be>Ae.length||Ve<0||mt>this.length)throw new RangeError("out of range index");if(Ve>=mt&&Te>=Be)return 0;if(Ve>=mt)return-1;if(Te>=Be)return 1;if(this===Ae)return 0;let Ze=(mt>>>=0)-(Ve>>>=0),ct=(Be>>>=0)-(Te>>>=0);const hn=Math.min(Ze,ct),ft=this.slice(Ve,mt),At=Ae.slice(Te,Be);for(let wn=0;wn>>=0,isFinite(Be)?(Be>>>=0,void 0===Ve&&(Ve="utf8")):(Ve=Be,Be=void 0)}const mt=this.length-Te;if((void 0===Be||Be>mt)&&(Be=mt),Ae.length>0&&(Be<0||Te<0)||Te>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ve||(Ve="utf8");let Ze=!1;for(;;)switch(Ve){case"hex":return J(this,Ae,Te,Be);case"utf8":case"utf-8":return Z(this,Ae,Te,Be);case"ascii":case"latin1":case"binary":return ee(this,Ae,Te,Be);case"base64":return I(this,Ae,Te,Be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,Ae,Te,Be);default:if(Ze)throw new TypeError("Unknown encoding: "+Ve);Ve=(""+Ve).toLowerCase(),Ze=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const g=4096;function F(Re,Ae,Te){let Be="";Te=Math.min(Re.length,Te);for(let Ve=Ae;VeBe)&&(Te=Be);let Ve="";for(let mt=Ae;mtTe)throw new RangeError("Trying to access beyond buffer length")}function se(Re,Ae,Te,Be,Ve,mt){if(!y.isBuffer(Re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ae>Ve||AeRe.length)throw new RangeError("Index out of range")}function te(Re,Ae,Te,Be,Ve){Se(Ae,Be,Ve,Re,Te,7);let mt=Number(Ae&BigInt(4294967295));Re[Te++]=mt,mt>>=8,Re[Te++]=mt,mt>>=8,Re[Te++]=mt,mt>>=8,Re[Te++]=mt;let Ze=Number(Ae>>BigInt(32)&BigInt(4294967295));return Re[Te++]=Ze,Ze>>=8,Re[Te++]=Ze,Ze>>=8,Re[Te++]=Ze,Ze>>=8,Re[Te++]=Ze,Te}function oe(Re,Ae,Te,Be,Ve){Se(Ae,Be,Ve,Re,Te,7);let mt=Number(Ae&BigInt(4294967295));Re[Te+7]=mt,mt>>=8,Re[Te+6]=mt,mt>>=8,Re[Te+5]=mt,mt>>=8,Re[Te+4]=mt;let Ze=Number(Ae>>BigInt(32)&BigInt(4294967295));return Re[Te+3]=Ze,Ze>>=8,Re[Te+2]=Ze,Ze>>=8,Re[Te+1]=Ze,Ze>>=8,Re[Te]=Ze,Te+8}function de(Re,Ae,Te,Be,Ve,mt){if(Te+Be>Re.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("Index out of range")}function Ie(Re,Ae,Te,Be,Ve){return Ae=+Ae,Te>>>=0,Ve||de(Re,0,Te,4),M.write(Re,Ae,Te,Be,23,4),Te+4}function ye(Re,Ae,Te,Be,Ve){return Ae=+Ae,Te>>>=0,Ve||de(Re,0,Te,8),M.write(Re,Ae,Te,Be,52,8),Te+8}y.prototype.slice=function(Ae,Te){const Be=this.length;(Ae=~~Ae)<0?(Ae+=Be)<0&&(Ae=0):Ae>Be&&(Ae=Be),(Te=void 0===Te?Be:~~Te)<0?(Te+=Be)<0&&(Te=0):Te>Be&&(Te=Be),Te>>=0,Te>>>=0,Be||k(Ae,Te,this.length);let Ve=this[Ae],mt=1,Ze=0;for(;++Ze>>=0,Te>>>=0,Be||k(Ae,Te,this.length);let Ve=this[Ae+--Te],mt=1;for(;Te>0&&(mt*=256);)Ve+=this[Ae+--Te]*mt;return Ve},y.prototype.readUint8=y.prototype.readUInt8=function(Ae,Te){return Ae>>>=0,Te||k(Ae,1,this.length),this[Ae]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(Ae,Te){return Ae>>>=0,Te||k(Ae,2,this.length),this[Ae]|this[Ae+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(Ae,Te){return Ae>>>=0,Te||k(Ae,2,this.length),this[Ae]<<8|this[Ae+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(Ae,Te){return Ae>>>=0,Te||k(Ae,4,this.length),(this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16)+16777216*this[Ae+3]},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(Ae,Te){return Ae>>>=0,Te||k(Ae,4,this.length),16777216*this[Ae]+(this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3])},y.prototype.readBigUInt64LE=at(function(Ae){ce(Ae>>>=0,"offset");const Te=this[Ae],Be=this[Ae+7];(void 0===Te||void 0===Be)&&be(Ae,this.length-8);const Ve=Te+256*this[++Ae]+65536*this[++Ae]+this[++Ae]*2**24,mt=this[++Ae]+256*this[++Ae]+65536*this[++Ae]+Be*2**24;return BigInt(Ve)+(BigInt(mt)<>>=0,"offset");const Te=this[Ae],Be=this[Ae+7];(void 0===Te||void 0===Be)&&be(Ae,this.length-8);const Ve=Te*2**24+65536*this[++Ae]+256*this[++Ae]+this[++Ae],mt=this[++Ae]*2**24+65536*this[++Ae]+256*this[++Ae]+Be;return(BigInt(Ve)<>>=0,Te>>>=0,Be||k(Ae,Te,this.length);let Ve=this[Ae],mt=1,Ze=0;for(;++Ze=mt&&(Ve-=Math.pow(2,8*Te)),Ve},y.prototype.readIntBE=function(Ae,Te,Be){Ae>>>=0,Te>>>=0,Be||k(Ae,Te,this.length);let Ve=Te,mt=1,Ze=this[Ae+--Ve];for(;Ve>0&&(mt*=256);)Ze+=this[Ae+--Ve]*mt;return mt*=128,Ze>=mt&&(Ze-=Math.pow(2,8*Te)),Ze},y.prototype.readInt8=function(Ae,Te){return Ae>>>=0,Te||k(Ae,1,this.length),128&this[Ae]?-1*(255-this[Ae]+1):this[Ae]},y.prototype.readInt16LE=function(Ae,Te){Ae>>>=0,Te||k(Ae,2,this.length);const Be=this[Ae]|this[Ae+1]<<8;return 32768&Be?4294901760|Be:Be},y.prototype.readInt16BE=function(Ae,Te){Ae>>>=0,Te||k(Ae,2,this.length);const Be=this[Ae+1]|this[Ae]<<8;return 32768&Be?4294901760|Be:Be},y.prototype.readInt32LE=function(Ae,Te){return Ae>>>=0,Te||k(Ae,4,this.length),this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16|this[Ae+3]<<24},y.prototype.readInt32BE=function(Ae,Te){return Ae>>>=0,Te||k(Ae,4,this.length),this[Ae]<<24|this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3]},y.prototype.readBigInt64LE=at(function(Ae){ce(Ae>>>=0,"offset");const Te=this[Ae],Be=this[Ae+7];(void 0===Te||void 0===Be)&&be(Ae,this.length-8);const Ve=this[Ae+4]+256*this[Ae+5]+65536*this[Ae+6]+(Be<<24);return(BigInt(Ve)<>>=0,"offset");const Te=this[Ae],Be=this[Ae+7];(void 0===Te||void 0===Be)&&be(Ae,this.length-8);const Ve=(Te<<24)+65536*this[++Ae]+256*this[++Ae]+this[++Ae];return(BigInt(Ve)<>>=0,Te||k(Ae,4,this.length),M.read(this,Ae,!0,23,4)},y.prototype.readFloatBE=function(Ae,Te){return Ae>>>=0,Te||k(Ae,4,this.length),M.read(this,Ae,!1,23,4)},y.prototype.readDoubleLE=function(Ae,Te){return Ae>>>=0,Te||k(Ae,8,this.length),M.read(this,Ae,!0,52,8)},y.prototype.readDoubleBE=function(Ae,Te){return Ae>>>=0,Te||k(Ae,8,this.length),M.read(this,Ae,!1,52,8)},y.prototype.writeUintLE=y.prototype.writeUIntLE=function(Ae,Te,Be,Ve){if(Ae=+Ae,Te>>>=0,Be>>>=0,!Ve){se(this,Ae,Te,Be,Math.pow(2,8*Be)-1,0)}let mt=1,Ze=0;for(this[Te]=255&Ae;++Ze>>=0,Be>>>=0,!Ve){se(this,Ae,Te,Be,Math.pow(2,8*Be)-1,0)}let mt=Be-1,Ze=1;for(this[Te+mt]=255&Ae;--mt>=0&&(Ze*=256);)this[Te+mt]=Ae/Ze&255;return Te+Be},y.prototype.writeUint8=y.prototype.writeUInt8=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,1,255,0),this[Te]=255&Ae,Te+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,2,65535,0),this[Te]=255&Ae,this[Te+1]=Ae>>>8,Te+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,2,65535,0),this[Te]=Ae>>>8,this[Te+1]=255&Ae,Te+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,4,4294967295,0),this[Te+3]=Ae>>>24,this[Te+2]=Ae>>>16,this[Te+1]=Ae>>>8,this[Te]=255&Ae,Te+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,4,4294967295,0),this[Te]=Ae>>>24,this[Te+1]=Ae>>>16,this[Te+2]=Ae>>>8,this[Te+3]=255&Ae,Te+4},y.prototype.writeBigUInt64LE=at(function(Ae,Te=0){return te(this,Ae,Te,BigInt(0),BigInt("0xffffffffffffffff"))}),y.prototype.writeBigUInt64BE=at(function(Ae,Te=0){return oe(this,Ae,Te,BigInt(0),BigInt("0xffffffffffffffff"))}),y.prototype.writeIntLE=function(Ae,Te,Be,Ve){if(Ae=+Ae,Te>>>=0,!Ve){const hn=Math.pow(2,8*Be-1);se(this,Ae,Te,Be,hn-1,-hn)}let mt=0,Ze=1,ct=0;for(this[Te]=255&Ae;++mt>0)-ct&255;return Te+Be},y.prototype.writeIntBE=function(Ae,Te,Be,Ve){if(Ae=+Ae,Te>>>=0,!Ve){const hn=Math.pow(2,8*Be-1);se(this,Ae,Te,Be,hn-1,-hn)}let mt=Be-1,Ze=1,ct=0;for(this[Te+mt]=255&Ae;--mt>=0&&(Ze*=256);)Ae<0&&0===ct&&0!==this[Te+mt+1]&&(ct=1),this[Te+mt]=(Ae/Ze>>0)-ct&255;return Te+Be},y.prototype.writeInt8=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,1,127,-128),Ae<0&&(Ae=255+Ae+1),this[Te]=255&Ae,Te+1},y.prototype.writeInt16LE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,2,32767,-32768),this[Te]=255&Ae,this[Te+1]=Ae>>>8,Te+2},y.prototype.writeInt16BE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,2,32767,-32768),this[Te]=Ae>>>8,this[Te+1]=255&Ae,Te+2},y.prototype.writeInt32LE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,4,2147483647,-2147483648),this[Te]=255&Ae,this[Te+1]=Ae>>>8,this[Te+2]=Ae>>>16,this[Te+3]=Ae>>>24,Te+4},y.prototype.writeInt32BE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,4,2147483647,-2147483648),Ae<0&&(Ae=4294967295+Ae+1),this[Te]=Ae>>>24,this[Te+1]=Ae>>>16,this[Te+2]=Ae>>>8,this[Te+3]=255&Ae,Te+4},y.prototype.writeBigInt64LE=at(function(Ae,Te=0){return te(this,Ae,Te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),y.prototype.writeBigInt64BE=at(function(Ae,Te=0){return oe(this,Ae,Te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),y.prototype.writeFloatLE=function(Ae,Te,Be){return Ie(this,Ae,Te,!0,Be)},y.prototype.writeFloatBE=function(Ae,Te,Be){return Ie(this,Ae,Te,!1,Be)},y.prototype.writeDoubleLE=function(Ae,Te,Be){return ye(this,Ae,Te,!0,Be)},y.prototype.writeDoubleBE=function(Ae,Te,Be){return ye(this,Ae,Te,!1,Be)},y.prototype.copy=function(Ae,Te,Be,Ve){if(!y.isBuffer(Ae))throw new TypeError("argument should be a Buffer");if(Be||(Be=0),!Ve&&0!==Ve&&(Ve=this.length),Te>=Ae.length&&(Te=Ae.length),Te||(Te=0),Ve>0&&Ve=this.length)throw new RangeError("Index out of range");if(Ve<0)throw new RangeError("sourceEnd out of bounds");Ve>this.length&&(Ve=this.length),Ae.length-Te>>=0,Be=void 0===Be?this.length:Be>>>0,Ae||(Ae=0),"number"==typeof Ae)for(mt=Te;mt=Be+4;Te-=3)Ae=`_${Re.slice(Te-3,Te)}${Ae}`;return`${Re.slice(0,Te)}${Ae}`}function Se(Re,Ae,Te,Be,Ve,mt){if(Re>Te||Re3?0===Ae||Ae===BigInt(0)?`>= 0${Ze} and < 2${Ze} ** ${8*(mt+1)}${Ze}`:`>= -(2${Ze} ** ${8*(mt+1)-1}${Ze}) and < 2 ** ${8*(mt+1)-1}${Ze}`:`>= ${Ae}${Ze} and <= ${Te}${Ze}`,new ve.ERR_OUT_OF_RANGE("value",ct,Re)}!function pe(Re,Ae,Te){ce(Ae,"offset"),(void 0===Re[Ae]||void 0===Re[Ae+Te])&&be(Ae,Re.length-(Te+1))}(Be,Ve,mt)}function ce(Re,Ae){if("number"!=typeof Re)throw new ve.ERR_INVALID_ARG_TYPE(Ae,"number",Re)}function be(Re,Ae,Te){throw Math.floor(Re)!==Re?(ce(Re,Te),new ve.ERR_OUT_OF_RANGE(Te||"offset","an integer",Re)):Ae<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE(Te||"offset",`>= ${Te?1:0} and <= ${Ae}`,Re)}ae("ERR_BUFFER_OUT_OF_BOUNDS",function(Re){return Re?`${Re} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ae("ERR_INVALID_ARG_TYPE",function(Re,Ae){return`The "${Re}" argument must be of type number. Received type ${typeof Ae}`},TypeError),ae("ERR_OUT_OF_RANGE",function(Re,Ae,Te){let Be=`The value of "${Re}" is out of range.`,Ve=Te;return Number.isInteger(Te)&&Math.abs(Te)>2**32?Ve=fe(String(Te)):"bigint"==typeof Te&&(Ve=String(Te),(Te>BigInt(2)**BigInt(32)||Te<-(BigInt(2)**BigInt(32)))&&(Ve=fe(Ve)),Ve+="n"),Be+=` It must be ${Ae}. Received ${Ve}`,Be},RangeError);const Ne=/[^+/0-9A-Za-z-_]/g;function lt(Re,Ae){let Te;Ae=Ae||1/0;const Be=Re.length;let Ve=null;const mt=[];for(let Ze=0;Ze55295&&Te<57344){if(!Ve){if(Te>56319){(Ae-=3)>-1&&mt.push(239,191,189);continue}if(Ze+1===Be){(Ae-=3)>-1&&mt.push(239,191,189);continue}Ve=Te;continue}if(Te<56320){(Ae-=3)>-1&&mt.push(239,191,189),Ve=Te;continue}Te=65536+(Ve-55296<<10|Te-56320)}else Ve&&(Ae-=3)>-1&&mt.push(239,191,189);if(Ve=null,Te<128){if((Ae-=1)<0)break;mt.push(Te)}else if(Te<2048){if((Ae-=2)<0)break;mt.push(Te>>6|192,63&Te|128)}else if(Te<65536){if((Ae-=3)<0)break;mt.push(Te>>12|224,Te>>6&63|128,63&Te|128)}else{if(!(Te<1114112))throw new Error("Invalid code point");if((Ae-=4)<0)break;mt.push(Te>>18|240,Te>>12&63|128,Te>>6&63|128,63&Te|128)}}return mt}function Kt(Re){return h.toByteArray(function Fe(Re){if((Re=(Re=Re.split("=")[0]).trim().replace(Ne,"")).length<2)return"";for(;Re.length%4!=0;)Re+="=";return Re}(Re))}function tt(Re,Ae,Te,Be){let Ve;for(Ve=0;Ve=Ae.length||Ve>=Re.length);++Ve)Ae[Ve+Te]=Re[Ve];return Ve}function nt(Re,Ae){return Re instanceof Ae||null!=Re&&null!=Re.constructor&&null!=Re.constructor.name&&Re.constructor.name===Ae.name}function Vt(Re){return Re!=Re}const ot=function(){const Re="0123456789abcdef",Ae=new Array(256);for(let Te=0;Te<16;++Te){const Be=16*Te;for(let Ve=0;Ve<16;++Ve)Ae[Be+Ve]=Re[Te]+Re[Ve]}return Ae}();function at(Re){return typeof BigInt>"u"?Gt:Re}function Gt(){throw new Error("BigInt not supported")}},94525:ne=>{ne.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},75834:(ne,s,p)=>{"use strict";var h=p(60399),M=p(55685),w=M(h("String.prototype.indexOf"));ne.exports=function(l,m){var y=h(l,!!m);return"function"==typeof y&&w(l,".prototype.")>-1?M(y):y}},55685:(ne,s,p)=>{"use strict";var h=p(84444),M=p(60399),w=M("%Function.prototype.apply%"),E=M("%Function.prototype.call%"),l=M("%Reflect.apply%",!0)||h.call(E,w),m=M("%Object.getOwnPropertyDescriptor%",!0),y=M("%Object.defineProperty%",!0),b=M("%Math.max%");if(y)try{y({},"a",{value:1})}catch{y=null}ne.exports=function(A){var P=l(h,E,arguments);m&&y&&(m(P,"length").configurable&&y(P,"length",{value:1+b(0,A.length-(arguments.length-1))}));return P};var S=function(){return l(h,w,arguments)};y?y(ne.exports,"apply",{value:S}):ne.exports.apply=S},60399:(ne,s,p)=>{"use strict";var h,M=SyntaxError,w=Function,E=TypeError,l=function(I){try{return w('"use strict"; return ('+I+").constructor;")()}catch{}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch{m=null}var y=function(){throw new E},b=m?function(){try{return arguments.callee,y}catch{try{return m(arguments,"callee").get}catch{return y}}}():y,S=p(92969)(),_=Object.getPrototypeOf||function(I){return I.__proto__},A={},P=typeof Uint8Array>"u"?h:_(Uint8Array),x={"%AggregateError%":typeof AggregateError>"u"?h:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?h:ArrayBuffer,"%ArrayIteratorPrototype%":S?_([][Symbol.iterator]()):h,"%AsyncFromSyncIteratorPrototype%":h,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>"u"?h:Atomics,"%BigInt%":typeof BigInt>"u"?h:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?h:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?h:Float32Array,"%Float64Array%":typeof Float64Array>"u"?h:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?h:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>"u"?h:Int8Array,"%Int16Array%":typeof Int16Array>"u"?h:Int16Array,"%Int32Array%":typeof Int32Array>"u"?h:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S?_(_([][Symbol.iterator]())):h,"%JSON%":"object"==typeof JSON?JSON:h,"%Map%":typeof Map>"u"?h:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S?h:_((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?h:Promise,"%Proxy%":typeof Proxy>"u"?h:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?h:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?h:Set,"%SetIteratorPrototype%":typeof Set>"u"||!S?h:_((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?h:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S?_(""[Symbol.iterator]()):h,"%Symbol%":S?Symbol:h,"%SyntaxError%":M,"%ThrowTypeError%":b,"%TypedArray%":P,"%TypeError%":E,"%Uint8Array%":typeof Uint8Array>"u"?h:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?h:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?h:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?h:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?h:WeakMap,"%WeakRef%":typeof WeakRef>"u"?h:WeakRef,"%WeakSet%":typeof WeakSet>"u"?h:WeakSet},T=function I(o){var a;if("%AsyncFunction%"===o)a=l("async function () {}");else if("%GeneratorFunction%"===o)a=l("function* () {}");else if("%AsyncGeneratorFunction%"===o)a=l("async function* () {}");else if("%AsyncGenerator%"===o){var d=I("%AsyncGeneratorFunction%");d&&(a=d.prototype)}else if("%AsyncIteratorPrototype%"===o){var g=I("%AsyncGenerator%");g&&(a=_(g.prototype))}return x[o]=a,a},L={"%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"]},N=p(84444),j=p(93164),B=N.call(Function.call,Array.prototype.concat),V=N.call(Function.apply,Array.prototype.splice),G=N.call(Function.call,String.prototype.replace),W=N.call(Function.call,String.prototype.slice),Q=N.call(Function.call,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,J=/\\(\\)?/g,Z=function(o){var a=W(o,0,1),d=W(o,-1);if("%"===a&&"%"!==d)throw new M("invalid intrinsic syntax, expected closing `%`");if("%"===d&&"%"!==a)throw new M("invalid intrinsic syntax, expected opening `%`");var g=[];return G(o,q,function(D,F,z,C){g[g.length]=z?G(C,J,"$1"):F||D}),g},ee=function(o,a){var g,d=o;if(j(L,d)&&(d="%"+(g=L[d])[0]+"%"),j(x,d)){var D=x[d];if(D===A&&(D=T(d)),typeof D>"u"&&!a)throw new E("intrinsic "+o+" exists, but is not available. Please file an issue!");return{alias:g,name:d,value:D}}throw new M("intrinsic "+o+" does not exist!")};ne.exports=function(o,a){if("string"!=typeof o||0===o.length)throw new E("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof a)throw new E('"allowMissing" argument must be a boolean');if(null===Q(/^%?[^%]*%?$/g,o))throw new M("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var d=Z(o),g=d.length>0?d[0]:"",D=ee("%"+g+"%",a),F=D.name,z=D.value,C=!1,f=D.alias;f&&(g=f[0],V(d,B([0,1],f)));for(var k=1,se=!0;k=d.length){var Ie=m(z,te);z=(se=!!Ie)&&"get"in Ie&&!("originalValue"in Ie.get)?Ie.get:z[te]}else se=j(z,te),z=z[te];se&&!C&&(x[F]=z)}}return z}},53495:(ne,s,p)=>{p(37131).check("es5")},37131:(ne,s,p)=>{p(58690),ne.exports=p(21034)},27247:ne=>{var s=function(){this.tests={},this.cache={}};s.prototype={constructor:s,define:function(p,h){if("string"!=typeof p||!(h instanceof Function))throw new Error("Invalid capability definition.");if(this.tests[p])throw new Error('Duplicated capability definition by "'+p+'".');this.tests[p]=h},check:function(p){if(!this.test(p))throw new Error('The current environment does not support "'+p+'", therefore we cannot continue.')},test:function(p){if(void 0!==this.cache[p])return this.cache[p];if(!this.tests[p])throw new Error('Unknown capability with name "'+p+'".');var h=this.tests[p];return this.cache[p]=!!h(),this.cache[p]}},ne.exports=s},58690:(ne,s,p)=>{var h=p(21034),M=h.define,w=h.test;M("strict mode",function(){return void 0===this}),M("arguments.callee.caller",function(){try{return function(){return arguments.callee.caller}()===arguments.callee}catch{return!1}}),M("es5",function(){return w("Array.prototype.forEach")&&w("Array.prototype.map")&&w("Function.prototype.bind")&&w("Object.create")&&w("Object.defineProperties")&&w("Object.defineProperty")&&w("Object.prototype.hasOwnProperty")}),M("Array.prototype.forEach",function(){return Array.prototype.forEach}),M("Array.prototype.map",function(){return Array.prototype.map}),M("Function.prototype.bind",function(){return Function.prototype.bind}),M("Object.create",function(){return Object.create}),M("Object.defineProperties",function(){return Object.defineProperties}),M("Object.defineProperty",function(){return Object.defineProperty}),M("Object.prototype.hasOwnProperty",function(){return Object.prototype.hasOwnProperty}),M("Error.captureStackTrace",function(){return Error.captureStackTrace}),M("Error.prototype.stack",function(){try{throw new Error}catch(E){return E.stack||E.stacktrace}})},21034:(ne,s,p)=>{var M=new(p(27247)),w=function(E){return M.test(E)};w.define=function(E,l){M.define(E,l)},w.check=function(E){M.check(E)},w.test=w,ne.exports=w},83018:ne=>{var s={utf8:{stringToBytes:function(p){return s.bin.stringToBytes(unescape(encodeURIComponent(p)))},bytesToString:function(p){return decodeURIComponent(escape(s.bin.bytesToString(p)))}},bin:{stringToBytes:function(p){for(var h=[],M=0;M{var h=p(73502).Buffer,M=p(295).Transform,w=p(15453).s;function l(m){M.call(this),this.hashMode="string"==typeof m,this.hashMode?this[m]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}p(83894)(l,M),l.prototype.update=function(m,y,b){"string"==typeof m&&(m=h.from(m,y));var S=this._update(m);return this.hashMode?this:(b&&(S=this._toString(S,b)),S)},l.prototype.setAutoPadding=function(){},l.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},l.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},l.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},l.prototype._transform=function(m,y,b){var S;try{this.hashMode?this._update(m):this.push(this._update(m))}catch(_){S=_}finally{b(S)}},l.prototype._flush=function(m){var y;try{this.push(this.__final())}catch(b){y=b}m(y)},l.prototype._finalOrDigest=function(m){var y=this.__final()||h.alloc(0);return m&&(y=this._toString(y,m,!0)),y},l.prototype._toString=function(m,y,b){if(this._decoder||(this._decoder=new w(y),this._encoding=y),this._encoding!==y)throw new Error("can't switch encodings");var S=this._decoder.write(m);return b&&(S+=this._decoder.end()),S},ne.exports=l},39448:(ne,s,p)=>{var h=p(72969).Writable,M=p(83894),w=p(58905);if(typeof Uint8Array>"u")var E=p(69830).U2;else E=Uint8Array;function l(x,T){if(!(this instanceof l))return new l(x,T);"function"==typeof x&&(T=x,x={}),x||(x={});var L=x.encoding,N=!1;L?("u8"===(L=String(L).toLowerCase())||"uint8"===L)&&(L="uint8array"):N=!0,h.call(this,{objectMode:!0}),this.encoding=L,this.shouldInferEncoding=N,T&&this.on("finish",function(){T(this.getBody())}),this.body=[]}ne.exports=l,M(l,h),l.prototype._write=function(x,T,L){this.body.push(x),L()},l.prototype.inferEncoding=function(x){var T=void 0===x?this.body[0]:x;return Buffer.isBuffer(T)?"buffer":typeof Uint8Array<"u"&&T instanceof Uint8Array?"uint8array":Array.isArray(T)?"array":"string"==typeof T?"string":"[object Object]"===Object.prototype.toString.call(T)?"object":"buffer"},l.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?function A(x){for(var T=[],L=0;L{var s={}.toString;ne.exports=Array.isArray||function(p){return"[object Array]"==s.call(p)}},83308:(ne,s,p)=>{"use strict";var h=p(95857),M=Object.keys||function(P){var x=[];for(var T in P)x.push(T);return x};ne.exports=S;var w=Object.create(p(26156));w.inherits=p(83894);var E=p(58044),l=p(46615);w.inherits(S,E);for(var m=M(l.prototype),y=0;y{"use strict";ne.exports=w;var h=p(55446),M=Object.create(p(26156));function w(E){if(!(this instanceof w))return new w(E);h.call(this,E)}M.inherits=p(83894),M.inherits(w,h),w.prototype._transform=function(E,l,m){m(null,E)}},58044:(ne,s,p)=>{"use strict";var h=p(95857);ne.exports=G;var w,M=p(77322);G.ReadableState=V;p(59069).EventEmitter;var l=function(ae,fe){return ae.listeners(fe).length},m=p(18228),y=p(11079).Buffer,b=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var A=Object.create(p(26156));A.inherits=p(83894);var P=p(53383),x=void 0;x=P&&P.debuglog?P.debuglog("stream"):function(){};var N,T=p(81054),L=p(8064);A.inherits(G,m);var j=["error","close","destroy","pause","resume"];function V(ae,fe){ae=ae||{};var pe=fe instanceof(w=w||p(83308));this.objectMode=!!ae.objectMode,pe&&(this.objectMode=this.objectMode||!!ae.readableObjectMode);var Se=ae.highWaterMark,ce=ae.readableHighWaterMark,be=this.objectMode?16:16384;this.highWaterMark=Se||0===Se?Se:pe&&(ce||0===ce)?ce:be,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new T,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=ae.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ae.encoding&&(N||(N=p(95139).s),this.decoder=new N(ae.encoding),this.encoding=ae.encoding)}function G(ae){if(w=w||p(83308),!(this instanceof G))return new G(ae);this._readableState=new V(ae,this),this.readable=!0,ae&&("function"==typeof ae.read&&(this._read=ae.read),"function"==typeof ae.destroy&&(this._destroy=ae.destroy)),m.call(this)}function W(ae,fe,pe,Se,ce){var Ne,be=ae._readableState;null===fe?(be.reading=!1,function o(ae,fe){if(!fe.ended){if(fe.decoder){var pe=fe.decoder.end();pe&&pe.length&&(fe.buffer.push(pe),fe.length+=fe.objectMode?1:pe.length)}fe.ended=!0,a(ae)}}(ae,be)):(ce||(Ne=function q(ae,fe){var pe;return!function _(ae){return y.isBuffer(ae)||ae instanceof b}(fe)&&"string"!=typeof fe&&void 0!==fe&&!ae.objectMode&&(pe=new TypeError("Invalid non-string/buffer chunk")),pe}(be,fe)),Ne?ae.emit("error",Ne):be.objectMode||fe&&fe.length>0?("string"!=typeof fe&&!be.objectMode&&Object.getPrototypeOf(fe)!==y.prototype&&(fe=function S(ae){return y.from(ae)}(fe)),Se?be.endEmitted?ae.emit("error",new Error("stream.unshift() after end event")):Q(ae,be,fe,!0):be.ended?ae.emit("error",new Error("stream.push() after EOF")):(be.reading=!1,be.decoder&&!pe?(fe=be.decoder.write(fe),be.objectMode||0!==fe.length?Q(ae,be,fe,!1):g(ae,be)):Q(ae,be,fe,!1))):Se||(be.reading=!1));return function J(ae){return!ae.ended&&(ae.needReadable||ae.lengthfe.highWaterMark&&(fe.highWaterMark=function ee(ae){return ae>=Z?ae=Z:(ae--,ae|=ae>>>1,ae|=ae>>>2,ae|=ae>>>4,ae|=ae>>>8,ae|=ae>>>16,ae++),ae}(ae)),ae<=fe.length?ae:fe.ended?fe.length:(fe.needReadable=!0,0))}function a(ae){var fe=ae._readableState;fe.needReadable=!1,fe.emittedReadable||(x("emitReadable",fe.flowing),fe.emittedReadable=!0,fe.sync?h.nextTick(d,ae):d(ae))}function d(ae){x("emit readable"),ae.emit("readable"),k(ae)}function g(ae,fe){fe.readingMore||(fe.readingMore=!0,h.nextTick(D,ae,fe))}function D(ae,fe){for(var pe=fe.length;!fe.reading&&!fe.flowing&&!fe.ended&&fe.length=fe.length?(pe=fe.decoder?fe.buffer.join(""):1===fe.buffer.length?fe.buffer.head.data:fe.buffer.concat(fe.length),fe.buffer.clear()):pe=function te(ae,fe,pe){var Se;return aebe.length?be.length:ae;if(Ne===be.length?ce+=be:ce+=be.slice(0,ae),0===(ae-=Ne)){Ne===be.length?(++Se,pe.next?fe.head=pe.next:fe.head=fe.tail=null):(fe.head=pe,pe.data=be.slice(Ne));break}++Se}return fe.length-=Se,ce}(ae,fe):function de(ae,fe){var pe=y.allocUnsafe(ae),Se=fe.head,ce=1;for(Se.data.copy(pe),ae-=Se.data.length;Se=Se.next;){var be=Se.data,Ne=ae>be.length?be.length:ae;if(be.copy(pe,pe.length-ae,0,Ne),0===(ae-=Ne)){Ne===be.length?(++ce,Se.next?fe.head=Se.next:fe.head=fe.tail=null):(fe.head=Se,Se.data=be.slice(Ne));break}++ce}return fe.length-=ce,pe}(ae,fe),Se}(ae,fe.buffer,fe.decoder),pe);var pe}function Ie(ae){var fe=ae._readableState;if(fe.length>0)throw new Error('"endReadable()" called on non-empty stream');fe.endEmitted||(fe.ended=!0,h.nextTick(ye,fe,ae))}function ye(ae,fe){!ae.endEmitted&&0===ae.length&&(ae.endEmitted=!0,fe.readable=!1,fe.emit("end"))}function ve(ae,fe){for(var pe=0,Se=ae.length;pe=fe.highWaterMark||fe.ended))return x("read: emitReadable",fe.length,fe.ended),0===fe.length&&fe.ended?Ie(this):a(this),null;if(0===(ae=I(ae,fe))&&fe.ended)return 0===fe.length&&Ie(this),null;var ce,Se=fe.needReadable;return x("need readable",Se),(0===fe.length||fe.length-ae0?se(ae,fe):null)?(fe.needReadable=!0,ae=0):fe.length-=ae,0===fe.length&&(fe.ended||(fe.needReadable=!0),pe!==ae&&fe.ended&&Ie(this)),null!==ce&&this.emit("data",ce),ce},G.prototype._read=function(ae){this.emit("error",new Error("_read() is not implemented"))},G.prototype.pipe=function(ae,fe){var pe=this,Se=this._readableState;switch(Se.pipesCount){case 0:Se.pipes=ae;break;case 1:Se.pipes=[Se.pipes,ae];break;default:Se.pipes.push(ae)}Se.pipesCount+=1,x("pipe count=%d opts=%j",Se.pipesCount,fe);var be=(!fe||!1!==fe.end)&&ae!==process.stdout&&ae!==process.stderr?Fe:at;function Ne(Gt,Re){x("onunpipe"),Gt===pe&&Re&&!1===Re.hasUnpiped&&(Re.hasUnpiped=!0,function He(){x("cleanup"),ae.removeListener("close",Vt),ae.removeListener("finish",ot),ae.removeListener("drain",lt),ae.removeListener("error",nt),ae.removeListener("unpipe",Ne),pe.removeListener("end",Fe),pe.removeListener("end",at),pe.removeListener("data",tt),Ge=!0,Se.awaitDrain&&(!ae._writableState||ae._writableState.needDrain)&<()}())}function Fe(){x("onend"),ae.end()}Se.endEmitted?h.nextTick(be):pe.once("end",be),ae.on("unpipe",Ne);var lt=function F(ae){return function(){var fe=ae._readableState;x("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,0===fe.awaitDrain&&l(ae,"data")&&(fe.flowing=!0,k(ae))}}(pe);ae.on("drain",lt);var Ge=!1;var Kt=!1;function tt(Gt){x("ondata"),Kt=!1,!1===ae.write(Gt)&&!Kt&&((1===Se.pipesCount&&Se.pipes===ae||Se.pipesCount>1&&-1!==ve(Se.pipes,ae))&&!Ge&&(x("false write response, pause",Se.awaitDrain),Se.awaitDrain++,Kt=!0),pe.pause())}function nt(Gt){x("onerror",Gt),at(),ae.removeListener("error",nt),0===l(ae,"error")&&ae.emit("error",Gt)}function Vt(){ae.removeListener("finish",ot),at()}function ot(){x("onfinish"),ae.removeListener("close",Vt),at()}function at(){x("unpipe"),pe.unpipe(ae)}return pe.on("data",tt),function B(ae,fe,pe){if("function"==typeof ae.prependListener)return ae.prependListener(fe,pe);ae._events&&ae._events[fe]?M(ae._events[fe])?ae._events[fe].unshift(pe):ae._events[fe]=[pe,ae._events[fe]]:ae.on(fe,pe)}(ae,"error",nt),ae.once("close",Vt),ae.once("finish",ot),ae.emit("pipe",pe),Se.flowing||(x("pipe resume"),pe.resume()),ae},G.prototype.unpipe=function(ae){var fe=this._readableState,pe={hasUnpiped:!1};if(0===fe.pipesCount)return this;if(1===fe.pipesCount)return ae&&ae!==fe.pipes||(ae||(ae=fe.pipes),fe.pipes=null,fe.pipesCount=0,fe.flowing=!1,ae&&ae.emit("unpipe",this,pe)),this;if(!ae){var Se=fe.pipes,ce=fe.pipesCount;fe.pipes=null,fe.pipesCount=0,fe.flowing=!1;for(var be=0;be{"use strict";ne.exports=E;var h=p(83308),M=Object.create(p(26156));function w(y,b){var S=this._transformState;S.transforming=!1;var _=S.writecb;if(!_)return this.emit("error",new Error("write callback called multiple times"));S.writechunk=null,S.writecb=null,null!=b&&this.push(b),_(y);var A=this._readableState;A.reading=!1,(A.needReadable||A.length{"use strict";var h=p(95857);function w(C){var f=this;this.next=null,this.entry=null,this.finish=function(){!function z(C,f,k){var se=C.entry;for(C.entry=null;se;){var te=se.callback;f.pendingcb--,te(k),se=se.next}f.corkedRequestsFree.next=C}(f,C)}}ne.exports=j;var l,E=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:h.nextTick;j.WritableState=L;var m=Object.create(p(26156));m.inherits=p(83894);var y={deprecate:p(23532)},b=p(18228),S=p(11079).Buffer,_=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var N,x=p(8064);function T(){}function L(C,f){l=l||p(83308),C=C||{};var k=f instanceof l;this.objectMode=!!C.objectMode,k&&(this.objectMode=this.objectMode||!!C.writableObjectMode);var se=C.highWaterMark,te=C.writableHighWaterMark,oe=this.objectMode?16:16384;this.highWaterMark=se||0===se?se:k&&(te||0===te)?te:oe,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var de=!1===C.decodeStrings;this.decodeStrings=!de,this.defaultEncoding=C.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ie){!function Z(C,f){var k=C._writableState,se=k.sync,te=k.writecb;if(function J(C){C.writing=!1,C.writecb=null,C.length-=C.writelen,C.writelen=0}(k),f)!function q(C,f,k,se,te){--f.pendingcb,k?(h.nextTick(te,se),h.nextTick(D,C,f),C._writableState.errorEmitted=!0,C.emit("error",se)):(te(se),C._writableState.errorEmitted=!0,C.emit("error",se),D(C,f))}(C,k,se,f,te);else{var oe=a(k);!oe&&!k.corked&&!k.bufferProcessing&&k.bufferedRequest&&o(C,k),se?E(ee,C,k,oe,te):ee(C,k,oe,te)}}(f,Ie)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}function j(C){if(l=l||p(83308),!(N.call(j,this)||this instanceof l))return new j(C);this._writableState=new L(C,this),this.writable=!0,C&&("function"==typeof C.write&&(this._write=C.write),"function"==typeof C.writev&&(this._writev=C.writev),"function"==typeof C.destroy&&(this._destroy=C.destroy),"function"==typeof C.final&&(this._final=C.final)),b.call(this)}function Q(C,f,k,se,te,oe,de){f.writelen=se,f.writecb=de,f.writing=!0,f.sync=!0,k?C._writev(te,f.onwrite):C._write(te,oe,f.onwrite),f.sync=!1}function ee(C,f,k,se){k||function I(C,f){0===f.length&&f.needDrain&&(f.needDrain=!1,C.emit("drain"))}(C,f),f.pendingcb--,se(),D(C,f)}function o(C,f){f.bufferProcessing=!0;var k=f.bufferedRequest;if(C._writev&&k&&k.next){var se=f.bufferedRequestCount,te=new Array(se),oe=f.corkedRequestsFree;oe.entry=k;for(var de=0,Ie=!0;k;)te[de]=k,k.isBuf||(Ie=!1),k=k.next,de+=1;te.allBuffers=Ie,Q(C,f,!0,f.length,te,"",oe.finish),f.pendingcb++,f.lastBufferedRequest=null,oe.next?(f.corkedRequestsFree=oe.next,oe.next=null):f.corkedRequestsFree=new w(f),f.bufferedRequestCount=0}else{for(;k;){var ye=k.chunk,ve=k.encoding,ae=k.callback;if(Q(C,f,!1,f.objectMode?1:ye.length,ye,ve,ae),k=k.next,f.bufferedRequestCount--,f.writing)break}null===k&&(f.lastBufferedRequest=null)}f.bufferedRequest=k,f.bufferProcessing=!1}function a(C){return C.ending&&0===C.length&&null===C.bufferedRequest&&!C.finished&&!C.writing}function d(C,f){C._final(function(k){f.pendingcb--,k&&C.emit("error",k),f.prefinished=!0,C.emit("prefinish"),D(C,f)})}function D(C,f){var k=a(f);return k&&(function g(C,f){!f.prefinished&&!f.finalCalled&&("function"==typeof C._final?(f.pendingcb++,f.finalCalled=!0,h.nextTick(d,C,f)):(f.prefinished=!0,C.emit("prefinish")))}(C,f),0===f.pendingcb&&(f.finished=!0,C.emit("finish"))),k}m.inherits(j,b),L.prototype.getBuffer=function(){for(var f=this.bufferedRequest,k=[];f;)k.push(f),f=f.next;return k},function(){try{Object.defineProperty(L.prototype,"buffer",{get:y.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(N=Function.prototype[Symbol.hasInstance],Object.defineProperty(j,Symbol.hasInstance,{value:function(C){return!!N.call(this,C)||this===j&&(C&&C._writableState instanceof L)}})):N=function(C){return C instanceof this},j.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},j.prototype.write=function(C,f,k){var se=this._writableState,te=!1,oe=!se.objectMode&&function P(C){return S.isBuffer(C)||C instanceof _}(C);return oe&&!S.isBuffer(C)&&(C=function A(C){return S.from(C)}(C)),"function"==typeof f&&(k=f,f=null),oe?f="buffer":f||(f=se.defaultEncoding),"function"!=typeof k&&(k=T),se.ended?function B(C,f){var k=new Error("write after end");C.emit("error",k),h.nextTick(f,k)}(this,k):(oe||function V(C,f,k,se){var te=!0,oe=!1;return null===k?oe=new TypeError("May not write null values to stream"):"string"!=typeof k&&void 0!==k&&!f.objectMode&&(oe=new TypeError("Invalid non-string/buffer chunk")),oe&&(C.emit("error",oe),h.nextTick(se,oe),te=!1),te}(this,se,C,k))&&(se.pendingcb++,te=function W(C,f,k,se,te,oe){if(!k){var de=function G(C,f,k){return!C.objectMode&&!1!==C.decodeStrings&&"string"==typeof f&&(f=S.from(f,k)),f}(f,se,te);se!==de&&(k=!0,te="buffer",se=de)}var Ie=f.objectMode?1:se.length;f.length+=Ie;var ye=f.length-1))throw new TypeError("Unknown encoding: "+f);return this._writableState.defaultEncoding=f,this},Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),j.prototype._write=function(C,f,k){k(new Error("_write() is not implemented"))},j.prototype._writev=null,j.prototype.end=function(C,f,k){var se=this._writableState;"function"==typeof C?(k=C,C=null,f=null):"function"==typeof f&&(k=f,f=null),null!=C&&this.write(C,f),se.corked&&(se.corked=1,this.uncork()),se.ending||function F(C,f,k){f.ending=!0,D(C,f),k&&(f.finished?h.nextTick(k):C.once("finish",k)),f.ended=!0,C.writable=!1}(this,se,k)},Object.defineProperty(j.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(C){this._writableState&&(this._writableState.destroyed=C)}}),j.prototype.destroy=x.destroy,j.prototype._undestroy=x.undestroy,j.prototype._destroy=function(C,f){this.end(),f(C)}},81054:(ne,s,p)=>{"use strict";var M=p(11079).Buffer,w=p(7716);function E(l,m,y){l.copy(m,y)}ne.exports=function(){function l(){(function h(l,m){if(!(l instanceof m))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(y){var b={data:y,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},l.prototype.unshift=function(y){var b={data:y,next:this.head};0===this.length&&(this.tail=b),this.head=b,++this.length},l.prototype.shift=function(){if(0!==this.length){var y=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,y}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(y){if(0===this.length)return"";for(var b=this.head,S=""+b.data;b=b.next;)S+=y+b.data;return S},l.prototype.concat=function(y){if(0===this.length)return M.alloc(0);for(var b=M.allocUnsafe(y>>>0),S=this.head,_=0;S;)E(S.data,b,_),_+=S.data.length,S=S.next;return b},l}(),w&&w.inspect&&w.inspect.custom&&(ne.exports.prototype[w.inspect.custom]=function(){var l=w.inspect({length:this.length});return this.constructor.name+" "+l})},8064:(ne,s,p)=>{"use strict";var h=p(95857);function E(l,m){l.emit("error",m)}ne.exports={destroy:function M(l,m){var y=this,b=this._readableState&&this._readableState.destroyed,S=this._writableState&&this._writableState.destroyed;return b||S?(m?m(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,h.nextTick(E,this,l)):h.nextTick(E,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(_){!m&&_?y._writableState?y._writableState.errorEmitted||(y._writableState.errorEmitted=!0,h.nextTick(E,y,_)):h.nextTick(E,y,_):m&&m(_)}),this)},undestroy:function w(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},18228:(ne,s,p)=>{ne.exports=p(59069).EventEmitter},72969:(ne,s,p)=>{(s=ne.exports=p(58044)).Stream=s,s.Readable=s,s.Writable=p(46615),s.Duplex=p(83308),s.Transform=p(55446),s.PassThrough=p(60757)},11079:(ne,s,p)=>{var h=p(93172),M=h.Buffer;function w(l,m){for(var y in l)m[y]=l[y]}function E(l,m,y){return M(l,m,y)}M.from&&M.alloc&&M.allocUnsafe&&M.allocUnsafeSlow?ne.exports=h:(w(h,s),s.Buffer=E),w(M,E),E.from=function(l,m,y){if("number"==typeof l)throw new TypeError("Argument must not be a number");return M(l,m,y)},E.alloc=function(l,m,y){if("number"!=typeof l)throw new TypeError("Argument must be a number");var b=M(l);return void 0!==m?"string"==typeof y?b.fill(m,y):b.fill(m):b.fill(0),b},E.allocUnsafe=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return M(l)},E.allocUnsafeSlow=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return h.SlowBuffer(l)}},95139:(ne,s,p)=>{"use strict";var h=p(11079).Buffer,M=h.isEncoding||function(B){switch((B=""+B)&&B.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 l(B){var V;switch(this.encoding=function E(B){var V=function w(B){if(!B)return"utf8";for(var V;;)switch(B){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 B;default:if(V)return;B=(""+B).toLowerCase(),V=!0}}(B);if("string"!=typeof V&&(h.isEncoding===M||!M(B)))throw new Error("Unknown encoding: "+B);return V||B}(B),this.encoding){case"utf16le":this.text=P,this.end=x,V=4;break;case"utf8":this.fillLast=S,V=4;break;case"base64":this.text=T,this.end=L,V=3;break;default:return this.write=N,void(this.end=j)}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(V)}function m(B){return B<=127?0:B>>5==6?2:B>>4==14?3:B>>3==30?4:B>>6==2?-1:-2}function S(B){var V=this.lastTotal-this.lastNeed,G=function b(B,V,G){if(128!=(192&V[0]))return B.lastNeed=0,"\ufffd";if(B.lastNeed>1&&V.length>1){if(128!=(192&V[1]))return B.lastNeed=1,"\ufffd";if(B.lastNeed>2&&V.length>2&&128!=(192&V[2]))return B.lastNeed=2,"\ufffd"}}(this,B);return void 0!==G?G:this.lastNeed<=B.length?(B.copy(this.lastChar,V,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(B.copy(this.lastChar,V,0,B.length),void(this.lastNeed-=B.length))}function P(B,V){if((B.length-V)%2==0){var G=B.toString("utf16le",V);if(G){var W=G.charCodeAt(G.length-1);if(W>=55296&&W<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=B[B.length-2],this.lastChar[1]=B[B.length-1],G.slice(0,-1)}return G}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=B[B.length-1],B.toString("utf16le",V,B.length-1)}function x(B){var V=B&&B.length?this.write(B):"";if(this.lastNeed){var G=this.lastTotal-this.lastNeed;return V+this.lastChar.toString("utf16le",0,G)}return V}function T(B,V){var G=(B.length-V)%3;return 0===G?B.toString("base64",V):(this.lastNeed=3-G,this.lastTotal=3,1===G?this.lastChar[0]=B[B.length-1]:(this.lastChar[0]=B[B.length-2],this.lastChar[1]=B[B.length-1]),B.toString("base64",V,B.length-G))}function L(B){var V=B&&B.length?this.write(B):"";return this.lastNeed?V+this.lastChar.toString("base64",0,3-this.lastNeed):V}function N(B){return B.toString(this.encoding)}function j(B){return B&&B.length?this.write(B):""}s.s=l,l.prototype.write=function(B){if(0===B.length)return"";var V,G;if(this.lastNeed){if(void 0===(V=this.fillLast(B)))return"";G=this.lastNeed,this.lastNeed=0}else G=0;return G=0?(Q>0&&(B.lastNeed=Q-1),Q):--W=0?(Q>0&&(B.lastNeed=Q-2),Q):--W=0?(Q>0&&(2===Q?Q=0:B.lastNeed=Q-3),Q):0))}(this,B,V);if(!this.lastNeed)return B.toString("utf8",V);this.lastTotal=G;var W=B.length-(G-this.lastNeed);return B.copy(this.lastChar,0,W),B.toString("utf8",V,W)},l.prototype.fillLast=function(B){if(this.lastNeed<=B.length)return B.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);B.copy(this.lastChar,this.lastTotal-this.lastNeed,0,B.length),this.lastNeed-=B.length}},89093:(ne,s,p)=>{"use strict";var h=p(43675),M={"text/plain":"Text","text/html":"Url",default:"Text"},w="Copy to clipboard: #{key}, Enter";ne.exports=function l(m,y){var b,S,_,A,P,x,T=!1;y||(y={}),b=y.debug||!1;try{if(_=h(),A=document.createRange(),P=document.getSelection(),(x=document.createElement("span")).textContent=m,x.ariaHidden="true",x.style.all="unset",x.style.position="fixed",x.style.top=0,x.style.clip="rect(0, 0, 0, 0)",x.style.whiteSpace="pre",x.style.webkitUserSelect="text",x.style.MozUserSelect="text",x.style.msUserSelect="text",x.style.userSelect="text",x.addEventListener("copy",function(N){if(N.stopPropagation(),y.format)if(N.preventDefault(),typeof N.clipboardData>"u"){b&&console.warn("unable to use e.clipboardData"),b&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var j=M[y.format]||M.default;window.clipboardData.setData(j,m)}else N.clipboardData.clearData(),N.clipboardData.setData(y.format,m);y.onCopy&&(N.preventDefault(),y.onCopy(N.clipboardData))}),document.body.appendChild(x),A.selectNodeContents(x),P.addRange(A),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");T=!0}catch(N){b&&console.error("unable to copy using execCommand: ",N),b&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(y.format||"text",m),y.onCopy&&y.onCopy(window.clipboardData),T=!0}catch(j){b&&console.error("unable to copy using clipboardData: ",j),b&&console.error("falling back to prompt"),S=function E(m){var y=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return m.replace(/#{\s*key\s*}/g,y)}("message"in y?y.message:w),window.prompt(S,m)}}finally{P&&("function"==typeof P.removeRange?P.removeRange(A):P.removeAllRanges()),x&&document.body.removeChild(x),_()}return T}},26156:(ne,s,p)=>{function L(N){return Object.prototype.toString.call(N)}s.isArray=function h(N){return Array.isArray?Array.isArray(N):"[object Array]"===L(N)},s.isBoolean=function M(N){return"boolean"==typeof N},s.isNull=function w(N){return null===N},s.isNullOrUndefined=function E(N){return null==N},s.isNumber=function l(N){return"number"==typeof N},s.isString=function m(N){return"string"==typeof N},s.isSymbol=function y(N){return"symbol"==typeof N},s.isUndefined=function b(N){return void 0===N},s.isRegExp=function S(N){return"[object RegExp]"===L(N)},s.isObject=function _(N){return"object"==typeof N&&null!==N},s.isDate=function A(N){return"[object Date]"===L(N)},s.isError=function P(N){return"[object Error]"===L(N)||N instanceof Error},s.isFunction=function x(N){return"function"==typeof N},s.isPrimitive=function T(N){return null===N||"boolean"==typeof N||"number"==typeof N||"string"==typeof N||"symbol"==typeof N||typeof N>"u"},s.isBuffer=p(93172).Buffer.isBuffer},74746:(ne,s,p)=>{var h=p(57715),M=p(46422);ne.exports=function(y){return new E(y)};var w={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function E(m){this.curveType=w[m],this.curveType||(this.curveType={name:m}),this.curve=new h.ec(this.curveType.name),this.keys=void 0}function l(m,y,b){Array.isArray(m)||(m=m.toArray());var S=new Buffer(m);if(b&&S.length=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function b(I,o,a){var d=y(I,a);return a-1>=o&&(d|=y(I,a-1)<<4),d}function S(I,o,a,d){for(var g=0,D=Math.min(I.length,a),F=o;F=49?z-49+10:z>=17?z-17+10:z}return g}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,a){return o.cmp(a)>0?o:a},l.min=function(o,a){return o.cmp(a)<0?o:a},l.prototype._init=function(o,a,d){if("number"==typeof o)return this._initNumber(o,a,d);if("object"==typeof o)return this._initArray(o,a,d);"hex"===a&&(a=16),w(a===(0|a)&&a>=2&&a<=36);var g=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(g++,this.negative=1),g=0;g-=3)F=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[D]|=F<>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);else if("le"===d)for(g=0,D=0;g>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);return this.strip()},l.prototype._parseHex=function(o,a,d){this.length=Math.ceil((o.length-a)/6),this.words=new Array(this.length);for(var g=0;g=a;g-=2)z=b(o,a,g)<=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;else for(g=(o.length-a)%2==0?a+1:a;g=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;this.strip()},l.prototype._parseBase=function(o,a,d){this.words=[0],this.length=1;for(var g=0,D=1;D<=67108863;D*=a)g++;g--,D=D/a|0;for(var F=o.length-d,z=F%g,C=Math.min(F,F-z)+d,f=0,k=d;k1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var _=["","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"],A=[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 T(I,o,a){a.negative=o.negative^I.negative;var d=I.length+o.length|0;a.length=d,d=d-1|0;var g=0|I.words[0],D=0|o.words[0],F=g*D,z=67108863&F,C=F/67108864|0;a.words[0]=z;for(var f=1;f>>26,se=67108863&C,te=Math.min(f,o.length-1),oe=Math.max(0,f-I.length+1);oe<=te;oe++){var de=f-oe|0;k+=(F=(g=0|I.words[de])*(D=0|o.words[oe])+se)/67108864|0,se=67108863&F}a.words[f]=0|se,C=0|k}return 0!==C?a.words[f]=0|C:a.length--,a.strip()}l.prototype.toString=function(o,a){var d;if(a=0|a||1,16===(o=o||10)||"hex"===o){d="";for(var g=0,D=0,F=0;F>>24-g&16777215)||F!==this.length-1?_[6-C.length]+C+d:C+d,(g+=2)>=26&&(g-=26,F--)}for(0!==D&&(d=D.toString(16)+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],k=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(k).toString(o);d=(se=se.idivn(k)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,a){return w(typeof m<"u"),this.toArrayLike(m,o,a)},l.prototype.toArray=function(o,a){return this.toArrayLike(Array,o,a)},l.prototype.toArrayLike=function(o,a,d){var g=this.byteLength(),D=d||Math.max(1,g);w(g<=D,"byte array longer than desired length"),w(D>0,"Requested array length <= 0"),this.strip();var C,f,F="le"===a,z=new o(D),k=this.clone();if(F){for(f=0;!k.isZero();f++)C=k.andln(255),k.iushrn(8),z[f]=C;for(;f=4096&&(d+=13,a>>>=13),a>=64&&(d+=7,a>>>=7),a>=8&&(d+=4,a>>>=4),a>=2&&(d+=2,a>>>=2),d+a},l.prototype._zeroBits=function(o){if(0===o)return 26;var a=o,d=0;return 8191&a||(d+=13,a>>>=13),127&a||(d+=7,a>>>=7),15&a||(d+=4,a>>>=4),3&a||(d+=2,a>>>=2),1&a||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],a=this._countBits(o);return 26*(this.length-1)+a},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,a=0;ao.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var a;a=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var a,d;this.length>o.length?(a=this,d=o):(a=o,d=this);for(var g=0;go.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var a=0|Math.ceil(o/26),d=o%26;this._expand(a),d>0&&a--;for(var g=0;g0&&(this.words[g]=~this.words[g]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,a){w("number"==typeof o&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),this.words[d]=a?this.words[d]|1<o.length?(d=this,g=o):(d=o,g=this);for(var D=0,F=0;F>>26;for(;0!==D&&F>>26;if(this.length=d.length,0!==D)this.words[this.length]=D,this.length++;else if(d!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var a=this.iadd(o);return o.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var g,D,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(g=this,D=o):(g=o,D=this);for(var F=0,z=0;z>26,this.words[z]=67108863&a;for(;0!==F&&z>26,this.words[z]=67108863&a;if(0===F&&z>>13,de=0|g[1],Ie=8191&de,ye=de>>>13,ve=0|g[2],ae=8191&ve,fe=ve>>>13,pe=0|g[3],Se=8191&pe,ce=pe>>>13,be=0|g[4],Ne=8191&be,Fe=be>>>13,lt=0|g[5],Ge=8191<,He=lt>>>13,Kt=0|g[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|g[7],ot=8191&Vt,at=Vt>>>13,Gt=0|g[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|g[9],Be=8191&Te,Ve=Te>>>13,mt=0|D[0],Ze=8191&mt,ct=mt>>>13,hn=0|D[1],ft=8191&hn,At=hn>>>13,wn=0|D[2],ze=8191&wn,Qe=wn>>>13,Ht=0|D[3],pt=8191&Ht,vt=Ht>>>13,$t=0|D[4],dt=8191&$t,gt=$t>>>13,mn=0|D[5],ut=8191&mn,wt=mn>>>13,Sn=0|D[6],yt=8191&Sn,Et=Sn>>>13,_e=0|D[7],Ee=8191&_e,Me=_e>>>13,me=0|D[8],Oe=8191&me,Ke=me>>>13,it=0|D[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^a.negative,d.length=19;var Bt=(z+(C=Math.imul(te,Ze))|0)+((8191&(f=(f=Math.imul(te,ct))+Math.imul(oe,Ze)|0))<<13)|0;z=((k=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,C=Math.imul(Ie,Ze),f=(f=Math.imul(Ie,ct))+Math.imul(ye,Ze)|0,k=Math.imul(ye,ct);var It=(z+(C=C+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(oe,ft)|0))<<13)|0;z=((k=k+Math.imul(oe,At)|0)+(f>>>13)|0)+(It>>>26)|0,It&=67108863,C=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,k=Math.imul(fe,ct),C=C+Math.imul(Ie,ft)|0,f=(f=f+Math.imul(Ie,At)|0)+Math.imul(ye,ft)|0,k=k+Math.imul(ye,At)|0;var kt=(z+(C=C+Math.imul(te,ze)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;z=((k=k+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,C=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,k=Math.imul(ce,ct),C=C+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,k=k+Math.imul(fe,At)|0,C=C+Math.imul(Ie,ze)|0,f=(f=f+Math.imul(Ie,Qe)|0)+Math.imul(ye,ze)|0,k=k+Math.imul(ye,Qe)|0;var Ot=(z+(C=C+Math.imul(te,pt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;z=((k=k+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,C=Math.imul(Ne,Ze),f=(f=Math.imul(Ne,ct))+Math.imul(Fe,Ze)|0,k=Math.imul(Fe,ct),C=C+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,k=k+Math.imul(ce,At)|0,C=C+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,k=k+Math.imul(fe,Qe)|0,C=C+Math.imul(Ie,pt)|0,f=(f=f+Math.imul(Ie,vt)|0)+Math.imul(ye,pt)|0,k=k+Math.imul(ye,vt)|0;var Nt=(z+(C=C+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;z=((k=k+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,C=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,k=Math.imul(He,ct),C=C+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,ft)|0,k=k+Math.imul(Fe,At)|0,C=C+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,k=k+Math.imul(ce,Qe)|0,C=C+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,k=k+Math.imul(fe,vt)|0,C=C+Math.imul(Ie,dt)|0,f=(f=f+Math.imul(Ie,gt)|0)+Math.imul(ye,dt)|0,k=k+Math.imul(ye,gt)|0;var Lt=(z+(C=C+Math.imul(te,ut)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;z=((k=k+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,C=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,k=Math.imul(nt,ct),C=C+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,k=k+Math.imul(He,At)|0,C=C+Math.imul(Ne,ze)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,ze)|0,k=k+Math.imul(Fe,Qe)|0,C=C+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,k=k+Math.imul(ce,vt)|0,C=C+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,k=k+Math.imul(fe,gt)|0,C=C+Math.imul(Ie,ut)|0,f=(f=f+Math.imul(Ie,wt)|0)+Math.imul(ye,ut)|0,k=k+Math.imul(ye,wt)|0;var nn=(z+(C=C+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;z=((k=k+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,k=Math.imul(at,ct),C=C+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,k=k+Math.imul(nt,At)|0,C=C+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,k=k+Math.imul(He,Qe)|0,C=C+Math.imul(Ne,pt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,pt)|0,k=k+Math.imul(Fe,vt)|0,C=C+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,k=k+Math.imul(ce,gt)|0,C=C+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,k=k+Math.imul(fe,wt)|0,C=C+Math.imul(Ie,yt)|0,f=(f=f+Math.imul(Ie,Et)|0)+Math.imul(ye,yt)|0,k=k+Math.imul(ye,Et)|0;var Yt=(z+(C=C+Math.imul(te,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(te,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;z=((k=k+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,C=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,k=Math.imul(Ae,ct),C=C+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,k=k+Math.imul(at,At)|0,C=C+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,k=k+Math.imul(nt,Qe)|0,C=C+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,k=k+Math.imul(He,vt)|0,C=C+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,dt)|0,k=k+Math.imul(Fe,gt)|0,C=C+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,k=k+Math.imul(ce,wt)|0,C=C+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,k=k+Math.imul(fe,Et)|0,C=C+Math.imul(Ie,Ee)|0,f=(f=f+Math.imul(Ie,Me)|0)+Math.imul(ye,Ee)|0,k=k+Math.imul(ye,Me)|0;var gn=(z+(C=C+Math.imul(te,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;z=((k=k+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,C=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,k=Math.imul(Ve,ct),C=C+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,k=k+Math.imul(Ae,At)|0,C=C+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,k=k+Math.imul(at,Qe)|0,C=C+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,k=k+Math.imul(nt,vt)|0,C=C+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,k=k+Math.imul(He,gt)|0,C=C+Math.imul(Ne,ut)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ut)|0,k=k+Math.imul(Fe,wt)|0,C=C+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,k=k+Math.imul(ce,Et)|0,C=C+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,k=k+Math.imul(fe,Me)|0,C=C+Math.imul(Ie,Oe)|0,f=(f=f+Math.imul(Ie,Ke)|0)+Math.imul(ye,Oe)|0,k=k+Math.imul(ye,Ke)|0;var an=(z+(C=C+Math.imul(te,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;z=((k=k+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,C=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,k=Math.imul(Ve,At),C=C+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,k=k+Math.imul(Ae,Qe)|0,C=C+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,k=k+Math.imul(at,vt)|0,C=C+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,k=k+Math.imul(nt,gt)|0,C=C+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,k=k+Math.imul(He,wt)|0,C=C+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,Et)|0)+Math.imul(Fe,yt)|0,k=k+Math.imul(Fe,Et)|0,C=C+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,k=k+Math.imul(ce,Me)|0,C=C+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,k=k+Math.imul(fe,Ke)|0;var tn=(z+(C=C+Math.imul(Ie,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ie,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;z=((k=k+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,k=Math.imul(Ve,Qe),C=C+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,k=k+Math.imul(Ae,vt)|0,C=C+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,k=k+Math.imul(at,gt)|0,C=C+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,k=k+Math.imul(nt,wt)|0,C=C+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,k=k+Math.imul(He,Et)|0,C=C+Math.imul(Ne,Ee)|0,f=(f=f+Math.imul(Ne,Me)|0)+Math.imul(Fe,Ee)|0,k=k+Math.imul(Fe,Me)|0,C=C+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,k=k+Math.imul(ce,Ke)|0;var Ut=(z+(C=C+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,C=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,k=Math.imul(Ve,vt),C=C+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,k=k+Math.imul(Ae,gt)|0,C=C+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,k=k+Math.imul(at,wt)|0,C=C+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,k=k+Math.imul(nt,Et)|0,C=C+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,k=k+Math.imul(He,Me)|0,C=C+Math.imul(Ne,Oe)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,Oe)|0,k=k+Math.imul(Fe,Ke)|0;var cn=(z+(C=C+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;z=((k=k+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,C=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,k=Math.imul(Ve,gt),C=C+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,k=k+Math.imul(Ae,wt)|0,C=C+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,k=k+Math.imul(at,Et)|0,C=C+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,k=k+Math.imul(nt,Me)|0,C=C+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,k=k+Math.imul(He,Ke)|0;var Jt=(z+(C=C+Math.imul(Ne,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,C=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,k=Math.imul(Ve,wt),C=C+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,k=k+Math.imul(Ae,Et)|0,C=C+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,k=k+Math.imul(at,Me)|0,C=C+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,k=k+Math.imul(nt,Ke)|0;var Zt=(z+(C=C+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;z=((k=k+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,C=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,k=Math.imul(Ve,Et),C=C+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,k=k+Math.imul(Ae,Me)|0,C=C+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,k=k+Math.imul(at,Ke)|0;var fn=(z+(C=C+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;z=((k=k+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,C=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,k=Math.imul(Ve,Me),C=C+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,k=k+Math.imul(Ae,Ke)|0;var Qt=(z+(C=C+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;z=((k=k+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,C=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,k=Math.imul(Ve,Ke);var Dt=(z+(C=C+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;z=((k=k+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(z+(C=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return z=((k=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,F[0]=Bt,F[1]=It,F[2]=kt,F[3]=Ot,F[4]=Nt,F[5]=Lt,F[6]=nn,F[7]=Yt,F[8]=gn,F[9]=an,F[10]=tn,F[11]=Ut,F[12]=cn,F[13]=Jt,F[14]=Zt,F[15]=fn,F[16]=Qt,F[17]=Dt,F[18]=Mt,0!==z&&(F[19]=z,d.length++),d};function j(I,o,a){return(new B).mulp(I,o,a)}function B(I,o){this.x=I,this.y=o}Math.imul||(L=T),l.prototype.mulTo=function(o,a){var d,g=this.length+o.length;return d=10===this.length&&10===o.length?L(this,o,a):g<63?T(this,o,a):g<1024?function N(I,o,a){a.negative=o.negative^I.negative,a.length=I.length+o.length;for(var d=0,g=0,D=0;D>>26)|0)>>>26,F&=67108863}a.words[D]=z,d=F,F=g}return 0!==d?a.words[D]=d:a.length--,a.strip()}(this,o,a):j(this,o,a),d},B.prototype.makeRBT=function(o){for(var a=new Array(o),d=l.prototype._countBits(o)-1,g=0;g>=1;return g},B.prototype.permute=function(o,a,d,g,D,F){for(var z=0;z>>=1)D++;return 1<>>=13,d[2*F+1]=8191&D,D>>>=13;for(F=2*a;F>=26,a+=g/67108864|0,a+=D>>>26,this.words[d]=67108863&D}return 0!==a&&(this.words[d]=a,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var a=function x(I){for(var o=new Array(I.bitLength()),a=0;a>>g}return o}(o);if(0===a.length)return new l(1);for(var d=this,g=0;g=0);var D,a=o%26,d=(o-a)/26,g=67108863>>>26-a<<26-a;if(0!==a){var F=0;for(D=0;D>>26-a}F&&(this.words[D]=F,this.length++)}if(0!==d){for(D=this.length-1;D>=0;D--)this.words[D+d]=this.words[D];for(D=0;D=0),g=a?(a-a%26)/26:0;var D=o%26,F=Math.min((o-D)/26,this.length),z=67108863^67108863>>>D<F)for(this.length-=F,f=0;f=0&&(0!==k||f>=g);f--){var se=0|this.words[f];this.words[f]=k<<26-D|se>>>D,k=se&z}return C&&0!==k&&(C.words[C.length++]=k),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,a,d){return w(0===this.negative),this.iushrn(o,a,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var a=o%26,d=(o-a)/26,g=1<=0);var a=o%26,d=(o-a)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==a&&d++,this.length=Math.min(d,this.length),0!==a){var g=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(C/67108864|0),this.words[D+d]=67108863&F}for(;D>26,this.words[D+d]=67108863&F;if(0===z)return this.strip();for(w(-1===z),z=0,D=0;D>26,this.words[D]=67108863&F;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,a){var d=(this.length,o.length),g=this.clone(),D=o,F=0|D.words[D.length-1];0!==(d=26-this._countBits(F))&&(D=D.ushln(d),g.iushln(d),F=0|D.words[D.length-1]);var f,C=g.length-D.length;if("mod"!==a){(f=new l(null)).length=C+1,f.words=new Array(f.length);for(var k=0;k=0;te--){var oe=67108864*(0|g.words[D.length+te])+(0|g.words[D.length+te-1]);for(oe=Math.min(oe/F|0,67108863),g._ishlnsubmul(D,oe,te);0!==g.negative;)oe--,g.negative=0,g._ishlnsubmul(D,1,te),g.isZero()||(g.negative^=1);f&&(f.words[te]=oe)}return f&&f.strip(),g.strip(),"div"!==a&&0!==d&&g.iushrn(d),{div:f||null,mod:g}},l.prototype.divmod=function(o,a,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,a),"mod"!==a&&(g=F.div.neg()),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.iadd(o)),{div:g,mod:D}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),a),"mod"!==a&&(g=F.div.neg()),{div:g,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),a),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.isub(o)),{div:F.div,mod:D}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===a?{div:this.divn(o.words[0]),mod:null}:"mod"===a?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,a);var g,D,F},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var a=this.divmod(o);if(a.mod.isZero())return a.div;var d=0!==a.div.negative?a.mod.isub(o):a.mod,g=o.ushrn(1),D=o.andln(1),F=d.cmp(g);return F<0||1===D&&0===F?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var a=(1<<26)%o,d=0,g=this.length-1;g>=0;g--)d=(a*d+(0|this.words[g]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var a=0,d=this.length-1;d>=0;d--){var g=(0|this.words[d])+67108864*a;this.words[d]=g/o|0,a=g%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=new l(0),z=new l(1),C=0;a.isEven()&&d.isEven();)a.iushrn(1),d.iushrn(1),++C;for(var f=d.clone(),k=a.clone();!a.isZero();){for(var se=0,te=1;!(a.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(a.iushrn(se);se-- >0;)(g.isOdd()||D.isOdd())&&(g.iadd(f),D.isub(k)),g.iushrn(1),D.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(F.isOdd()||z.isOdd())&&(F.iadd(f),z.isub(k)),F.iushrn(1),z.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(F),D.isub(z)):(d.isub(a),F.isub(g),z.isub(D))}return{a:F,b:z,gcd:d.iushln(C)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=d.clone();a.cmpn(1)>0&&d.cmpn(1)>0;){for(var z=0,C=1;!(a.words[0]&C)&&z<26;++z,C<<=1);if(z>0)for(a.iushrn(z);z-- >0;)g.isOdd()&&g.iadd(F),g.iushrn(1);for(var f=0,k=1;!(d.words[0]&k)&&f<26;++f,k<<=1);if(f>0)for(d.iushrn(f);f-- >0;)D.isOdd()&&D.iadd(F),D.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(D)):(d.isub(a),D.isub(g))}return(se=0===a.cmpn(1)?g:D).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var a=this.clone(),d=o.clone();a.negative=0,d.negative=0;for(var g=0;a.isEven()&&d.isEven();g++)a.iushrn(1),d.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;d.isEven();)d.iushrn(1);var D=a.cmp(d);if(D<0){var F=a;a=d,d=F}else if(0===D||0===d.cmpn(1))break;a.isub(d)}return d.iushln(g)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var a=o%26,d=(o-a)/26,g=1<>>26,z&=67108863,this.words[F]=z}return 0!==D&&(this.words[F]=D,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,a=o<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)d=1;else{a&&(o=-o),w(o<=67108863,"Number is too big");var g=0|this.words[0];d=g===o?0:go.length)return 1;if(this.length=0;d--){var g=0|this.words[d],D=0|o.words[d];if(g!==D){gD&&(a=1);break}}return a},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new Z(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var V={k256:null,p224:null,p192:null,p25519:null};function G(I,o){this.name=I,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function W(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Z(I){if("string"==typeof I){var o=l._prime(I);this.m=o.p,this.prime=o}else w(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}function ee(I){Z.call(this,I),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}G.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},G.prototype.ireduce=function(o){var d,a=o;do{this.split(a,this.tmp),d=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(d>this.n);var g=d0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},G.prototype.split=function(o,a){o.iushrn(this.n,0,a)},G.prototype.imulK=function(o){return o.imul(this.k)},E(W,G),W.prototype.split=function(o,a){for(var d=4194303,g=Math.min(o.length,9),D=0;D>>22,F=z}F>>>=22,o.words[D-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},W.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var a=0,d=0;d>>=26,o.words[d]=D,a=g}return 0!==a&&(o.words[o.length++]=a),o},l._prime=function(o){if(V[o])return V[o];var a;if("k256"===o)a=new W;else if("p224"===o)a=new Q;else if("p192"===o)a=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);a=new J}return V[o]=a,a},Z.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},Z.prototype._verify2=function(o,a){w(0==(o.negative|a.negative),"red works only with positives"),w(o.red&&o.red===a.red,"red works only with red numbers")},Z.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},Z.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},Z.prototype.add=function(o,a){this._verify2(o,a);var d=o.add(a);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},Z.prototype.iadd=function(o,a){this._verify2(o,a);var d=o.iadd(a);return d.cmp(this.m)>=0&&d.isub(this.m),d},Z.prototype.sub=function(o,a){this._verify2(o,a);var d=o.sub(a);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},Z.prototype.isub=function(o,a){this._verify2(o,a);var d=o.isub(a);return d.cmpn(0)<0&&d.iadd(this.m),d},Z.prototype.shl=function(o,a){return this._verify1(o),this.imod(o.ushln(a))},Z.prototype.imul=function(o,a){return this._verify2(o,a),this.imod(o.imul(a))},Z.prototype.mul=function(o,a){return this._verify2(o,a),this.imod(o.mul(a))},Z.prototype.isqr=function(o){return this.imul(o,o.clone())},Z.prototype.sqr=function(o){return this.mul(o,o)},Z.prototype.sqrt=function(o){if(o.isZero())return o.clone();var a=this.m.andln(3);if(w(a%2==1),3===a){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),D=0;!g.isZero()&&0===g.andln(1);)D++,g.iushrn(1);w(!g.isZero());var F=new l(1).toRed(this),z=F.redNeg(),C=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,C).cmp(z);)f.redIAdd(z);for(var k=this.pow(f,g),se=this.pow(o,g.addn(1).iushrn(1)),te=this.pow(o,g),oe=D;0!==te.cmp(F);){for(var de=te,Ie=0;0!==de.cmp(F);Ie++)de=de.redSqr();w(Ie=0;D--){for(var k=a.words[D],se=f-1;se>=0;se--){var te=k>>se&1;(F!==g[0]&&(F=this.sqr(F)),0!==te||0!==z)?(z<<=1,z|=te,(4===++C||0===D&&0===se)&&(F=this.mul(F,g[z]),C=0,z=0)):C=0}f=26}return F},Z.prototype.convertTo=function(o){var a=o.umod(this.m);return a===o?a.clone():a},Z.prototype.convertFrom=function(o){var a=o.clone();return a.red=null,a},l.mont=function(o){return new ee(o)},E(ee,Z),ee.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},ee.prototype.convertFrom=function(o){var a=this.imod(o.mul(this.rinv));return a.red=null,a},ee.prototype.imul=function(o,a){if(o.isZero()||a.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.mul=function(o,a){if(o.isZero()||a.isZero())return new l(0)._forceRed(this);var d=o.mul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=p.nmd(ne),this)},96386:(ne,s,p)=>{"use strict";var h=p(83894),M=p(8095),w=p(75634),E=p(95244),l=p(61052);function m(y){l.call(this,"digest"),this._hash=y}h(m,l),m.prototype._update=function(y){this._hash.update(y)},m.prototype._final=function(){return this._hash.digest()},ne.exports=function(b){return"md5"===(b=b.toLowerCase())?new M:"rmd160"===b||"ripemd160"===b?new w:new m(E(b))}},55640:(ne,s,p)=>{var h=p(8095);ne.exports=function(M){return(new h).update(M).digest()}},74529:(ne,s,p)=>{"use strict";var h=p(83894),M=p(7309),w=p(61052),E=p(73502).Buffer,l=p(55640),m=p(75634),y=p(95244),b=E.alloc(128);function S(_,A){w.call(this,"digest"),"string"==typeof A&&(A=E.from(A));var P="sha512"===_||"sha384"===_?128:64;(this._alg=_,this._key=A,A.length>P)?A=("rmd160"===_?new m:y(_)).update(A).digest():A.length{"use strict";var h=p(83894),M=p(73502).Buffer,w=p(61052),E=M.alloc(128),l=64;function m(y,b){w.call(this,"digest"),"string"==typeof b&&(b=M.from(b)),this._alg=y,this._key=b,b.length>l?b=y(b):b.length{var s,p;s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p={rotl:function(h,M){return h<>>32-M},rotr:function(h,M){return h<<32-M|h>>>M},endian:function(h){if(h.constructor==Number)return 16711935&p.rotl(h,8)|4278255360&p.rotl(h,24);for(var M=0;M0;h--)M.push(Math.floor(256*Math.random()));return M},bytesToWords:function(h){for(var M=[],w=0,E=0;w>>5]|=h[w]<<24-E%32;return M},wordsToBytes:function(h){for(var M=[],w=0;w<32*h.length;w+=8)M.push(h[w>>>5]>>>24-w%32&255);return M},bytesToHex:function(h){for(var M=[],w=0;w>>4).toString(16)),M.push((15&h[w]).toString(16));return M.join("")},hexToBytes:function(h){for(var M=[],w=0;w>>6*(3-l)&63)):M.push("=");return M.join("")},base64ToBytes:function(h){h=h.replace(/[^A-Z0-9+\/]/gi,"");for(var M=[],w=0,E=0;w>>6-2*E);return M}},ne.exports=p},41348:(ne,s,p)=>{"use strict";s.randomBytes=s.rng=s.pseudoRandomBytes=s.prng=p(53753),s.createHash=s.Hash=p(96386),s.createHmac=s.Hmac=p(74529);var h=p(87793),M=Object.keys(h),w=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(M);s.getHashes=function(){return w};var E=p(99357);s.pbkdf2=E.pbkdf2,s.pbkdf2Sync=E.pbkdf2Sync;var l=p(55255);s.Cipher=l.Cipher,s.createCipher=l.createCipher,s.Cipheriv=l.Cipheriv,s.createCipheriv=l.createCipheriv,s.Decipher=l.Decipher,s.createDecipher=l.createDecipher,s.Decipheriv=l.Decipheriv,s.createDecipheriv=l.createDecipheriv,s.getCiphers=l.getCiphers,s.listCiphers=l.listCiphers;var m=p(98829);s.DiffieHellmanGroup=m.DiffieHellmanGroup,s.createDiffieHellmanGroup=m.createDiffieHellmanGroup,s.getDiffieHellman=m.getDiffieHellman,s.createDiffieHellman=m.createDiffieHellman,s.DiffieHellman=m.DiffieHellman;var y=p(3923);s.createSign=y.createSign,s.Sign=y.Sign,s.createVerify=y.createVerify,s.Verify=y.Verify,s.createECDH=p(74746);var b=p(63701);s.publicEncrypt=b.publicEncrypt,s.privateEncrypt=b.privateEncrypt,s.publicDecrypt=b.publicDecrypt,s.privateDecrypt=b.privateDecrypt;var S=p(14275);s.randomFill=S.randomFill,s.randomFillSync=S.randomFillSync,s.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},s.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},12761:ne=>{"use strict";var s="%[a-f0-9]{2}",p=new RegExp("("+s+")|([^%]+?)","gi"),h=new RegExp("("+s+")+","gi");function M(l,m){try{return[decodeURIComponent(l.join(""))]}catch{}if(1===l.length)return l;m=m||1;var y=l.slice(0,m),b=l.slice(m);return Array.prototype.concat.call([],M(y),M(b))}function w(l){try{return decodeURIComponent(l)}catch{for(var m=l.match(p)||[],y=1;y{var h=p(26788),M=p(30826).NI;function w(E){M.call(this,"string"==typeof E?E:""),this._db=void 0,this._operations=[]}h.inherits(w,M),w.prototype.setDb=function(E){this._db=E,this._operations.forEach(function(l){E[l.method].apply(E,l.args)})},w.prototype._open=function(E,l){return process.nextTick(l)},w.prototype._operation=function(E,l){if(this._db)return this._db[E].apply(this._db,l);this._operations.push({method:E,args:l})},"put get del batch approximateSize".split(" ").forEach(function(E){w.prototype["_"+E]=function(){this._operation(E,arguments)}}),w.prototype._isBuffer=function(E){return Buffer.isBuffer(E)},w.prototype._iterator=function(){throw new TypeError("not implemented")},ne.exports=w},89176:ne=>{"use strict";function p(M,w){if("function"!=typeof M)throw new TypeError("argument fn must be a function");return M}function h(M,w,E){if(!M||"object"!=typeof M&&"function"!=typeof M)throw new TypeError("argument obj must be object");var l=Object.getOwnPropertyDescriptor(M,w);if(!l)throw new TypeError("must call property on owner object");if(!l.configurable)throw new TypeError("property must be configurable")}ne.exports=function s(M){if(!M)throw new TypeError("argument namespace is required");function w(E){}return w._file=void 0,w._ignored=!0,w._namespace=M,w._traced=!1,w._warned=Object.create(null),w.function=p,w.property=h,w}},73684:(ne,s,p)=>{"use strict";s.utils=p(77451),s.Cipher=p(38170),s.DES=p(4631),s.CBC=p(79454),s.EDE=p(21862)},79454:(ne,s,p)=>{"use strict";var h=p(32391),M=p(83894),w={};function E(m){h.equal(m.length,8,"Invalid IV length"),this.iv=new Array(8);for(var y=0;y{"use strict";var h=p(32391);function M(w){this.options=w,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}ne.exports=M,M.prototype._init=function(){},M.prototype.update=function(E){return 0===E.length?[]:"decrypt"===this.type?this._updateDecrypt(E):this._updateEncrypt(E)},M.prototype._buffer=function(E,l){for(var m=Math.min(this.buffer.length-this.bufferOff,E.length-l),y=0;y0;y--)l+=this._buffer(E,l),m+=this._flushBuffer(b,m);return l+=this._buffer(E,l),b},M.prototype.final=function(E){var l,m;return E&&(l=this.update(E)),m="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),l?l.concat(m):m},M.prototype._pad=function(E,l){if(0===l)return!1;for(;l{"use strict";var h=p(32391),M=p(83894),w=p(77451),E=p(38170);function l(){this.tmp=new Array(2),this.keys=null}function m(b){E.call(this,b);var S=new l;this._desState=S,this.deriveKeys(S,b.key)}M(m,E),ne.exports=m,m.create=function(S){return new m(S)};var y=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];m.prototype.deriveKeys=function(S,_){S.keys=new Array(32),h.equal(_.length,this.blockSize,"Invalid key length");var A=w.readUInt32BE(_,0),P=w.readUInt32BE(_,4);w.pc1(A,P,S.tmp,0),A=S.tmp[0],P=S.tmp[1];for(var x=0;x>>1];A=w.r28shl(A,T),P=w.r28shl(P,T),w.pc2(A,P,S.keys,x)}},m.prototype._update=function(S,_,A,P){var x=this._desState,T=w.readUInt32BE(S,_),L=w.readUInt32BE(S,_+4);w.ip(T,L,x.tmp,0),T=x.tmp[0],L=x.tmp[1],"encrypt"===this.type?this._encrypt(x,T,L,x.tmp,0):this._decrypt(x,T,L,x.tmp,0),T=x.tmp[0],L=x.tmp[1],w.writeUInt32BE(A,T,P),w.writeUInt32BE(A,L,P+4)},m.prototype._pad=function(S,_){for(var A=S.length-_,P=_;P>>0,T=W}w.rip(L,T,P,x)},m.prototype._decrypt=function(S,_,A,P,x){for(var T=A,L=_,N=S.keys.length-2;N>=0;N-=2){var j=S.keys[N],B=S.keys[N+1];w.expand(T,S.tmp,0),j^=S.tmp[0],B^=S.tmp[1];var V=w.substitute(j,B),W=T;T=(L^w.permute(V))>>>0,L=W}w.rip(T,L,P,x)}},21862:(ne,s,p)=>{"use strict";var h=p(32391),M=p(83894),w=p(38170),E=p(4631);function l(y,b){h.equal(b.length,24,"Invalid key length");var S=b.slice(0,8),_=b.slice(8,16),A=b.slice(16,24);this.ciphers="encrypt"===y?[E.create({type:"encrypt",key:S}),E.create({type:"decrypt",key:_}),E.create({type:"encrypt",key:A})]:[E.create({type:"decrypt",key:A}),E.create({type:"encrypt",key:_}),E.create({type:"decrypt",key:S})]}function m(y){w.call(this,y);var b=new l(this.type,this.options.key);this._edeState=b}M(m,w),ne.exports=m,m.create=function(b){return new m(b)},m.prototype._update=function(b,S,_,A){var P=this._edeState;P.ciphers[0]._update(b,S,_,A),P.ciphers[1]._update(_,A,_,A),P.ciphers[2]._update(_,A,_,A)},m.prototype._pad=E.prototype._pad,m.prototype._unpad=E.prototype._unpad},77451:(ne,s)=>{"use strict";s.readUInt32BE=function(E,l){return(E[0+l]<<24|E[1+l]<<16|E[2+l]<<8|E[3+l])>>>0},s.writeUInt32BE=function(E,l,m){E[0+m]=l>>>24,E[1+m]=l>>>16&255,E[2+m]=l>>>8&255,E[3+m]=255&l},s.ip=function(E,l,m,y){for(var b=0,S=0,_=6;_>=0;_-=2){for(var A=0;A<=24;A+=8)b<<=1,b|=l>>>A+_&1;for(A=0;A<=24;A+=8)b<<=1,b|=E>>>A+_&1}for(_=6;_>=0;_-=2){for(A=1;A<=25;A+=8)S<<=1,S|=l>>>A+_&1;for(A=1;A<=25;A+=8)S<<=1,S|=E>>>A+_&1}m[y+0]=b>>>0,m[y+1]=S>>>0},s.rip=function(E,l,m,y){for(var b=0,S=0,_=0;_<4;_++)for(var A=24;A>=0;A-=8)b<<=1,b|=l>>>A+_&1,b<<=1,b|=E>>>A+_&1;for(_=4;_<8;_++)for(A=24;A>=0;A-=8)S<<=1,S|=l>>>A+_&1,S<<=1,S|=E>>>A+_&1;m[y+0]=b>>>0,m[y+1]=S>>>0},s.pc1=function(E,l,m,y){for(var b=0,S=0,_=7;_>=5;_--){for(var A=0;A<=24;A+=8)b<<=1,b|=l>>A+_&1;for(A=0;A<=24;A+=8)b<<=1,b|=E>>A+_&1}for(A=0;A<=24;A+=8)b<<=1,b|=l>>A+_&1;for(_=1;_<=3;_++){for(A=0;A<=24;A+=8)S<<=1,S|=l>>A+_&1;for(A=0;A<=24;A+=8)S<<=1,S|=E>>A+_&1}for(A=0;A<=24;A+=8)S<<=1,S|=E>>A+_&1;m[y+0]=b>>>0,m[y+1]=S>>>0},s.r28shl=function(E,l){return E<>>28-l};var p=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];s.pc2=function(E,l,m,y){for(var b=0,S=0,_=p.length>>>1,A=0;A<_;A++)b<<=1,b|=E>>>p[A]&1;for(A=_;A>>p[A]&1;m[y+0]=b>>>0,m[y+1]=S>>>0},s.expand=function(E,l,m){var y=0,b=0;y=(1&E)<<5|E>>>27;for(var S=23;S>=15;S-=4)y<<=6,y|=E>>>S&63;for(S=11;S>=3;S-=4)b|=E>>>S&63,b<<=6;b|=(31&E)<<1|E>>>31,l[m+0]=y>>>0,l[m+1]=b>>>0};var h=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];s.substitute=function(E,l){for(var m=0,y=0;y<4;y++){m<<=4,m|=h[64*y+(E>>>18-6*y&63)]}for(y=0;y<4;y++){m<<=4,m|=h[256+64*y+(l>>>18-6*y&63)]}return m>>>0};var M=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];s.permute=function(E){for(var l=0,m=0;m>>M[m]&1;return l>>>0},s.padSplit=function(E,l,m){for(var y=E.toString(2);y.length{var h=p(85563),M=p(29799),w=p(21419);var l={binary:!0,hex:!0,base64:!0};s.DiffieHellmanGroup=s.createDiffieHellmanGroup=s.getDiffieHellman=function E(y){var b=new Buffer(M[y].prime,"hex"),S=new Buffer(M[y].gen,"hex");return new w(b,S)},s.createDiffieHellman=s.DiffieHellman=function m(y,b,S,_){return Buffer.isBuffer(b)||void 0===l[b]?m(y,"binary",b,S):(b=b||"binary",_=_||"binary",S=S||new Buffer([2]),Buffer.isBuffer(S)||(S=new Buffer(S,_)),"number"==typeof y?new w(h(y,S),S,!0):(Buffer.isBuffer(y)||(y=new Buffer(y,b)),new w(y,S,!0)))}},21419:(ne,s,p)=>{var h=p(88313),w=new(p(17079)),E=new h(24),l=new h(11),m=new h(10),y=new h(3),b=new h(7),S=p(85563),_=p(53753);function A(j,B){return B=B||"utf8",Buffer.isBuffer(j)||(j=new Buffer(j,B)),this._pub=new h(j),this}function P(j,B){return B=B||"utf8",Buffer.isBuffer(j)||(j=new Buffer(j,B)),this._priv=new h(j),this}ne.exports=L;var x={};function L(j,B,V){this.setGenerator(B),this.__prime=new h(j),this._prime=h.mont(this.__prime),this._primeLen=j.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,V?(this.setPublicKey=A,this.setPrivateKey=P):this._primeCode=8}function N(j,B){var V=new Buffer(j.toArray());return B?V.toString(B):V}Object.defineProperty(L.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function T(j,B){var V=B.toString("hex"),G=[V,j.toString(16)].join("_");if(G in x)return x[G];var Q,W=0;if(j.isEven()||!S.simpleSieve||!S.fermatTest(j)||!w.test(j))return W+=1,W+="02"===V||"05"===V?8:4,x[G]=W,W;switch(w.test(j.shrn(1))||(W+=2),V){case"02":j.mod(E).cmp(l)&&(W+=8);break;case"05":(Q=j.mod(m)).cmp(y)&&Q.cmp(b)&&(W+=8);break;default:W+=4}return x[G]=W,W}(this.__prime,this.__gen)),this._primeCode}}),L.prototype.generateKeys=function(){return this._priv||(this._priv=new h(_(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},L.prototype.computeSecret=function(j){var B=(j=(j=new h(j)).toRed(this._prime)).redPow(this._priv).fromRed(),V=new Buffer(B.toArray()),G=this.getPrime();if(V.length{var h=p(53753);ne.exports=W,W.simpleSieve=V,W.fermatTest=G;var M=p(88313),w=new M(24),l=new(p(17079)),m=new M(1),y=new M(2),b=new M(5),A=(new M(16),new M(8),new M(10)),P=new M(3),T=(new M(7),new M(11)),L=new M(4),j=(new M(12),null);function V(Q){for(var q=function B(){if(null!==j)return j;var q=[];q[0]=2;for(var J=1,Z=3;Z<1048576;Z+=2){for(var ee=Math.ceil(Math.sqrt(Z)),I=0;IQ;)J.ishrn(1);if(J.isEven()&&J.iadd(m),J.testn(1)||J.iadd(y),q.cmp(y)){if(!q.cmp(b))for(;J.mod(A).cmp(P);)J.iadd(L)}else for(;J.mod(w).cmp(T);)J.iadd(L);if(V(Z=J.shrn(1))&&V(J)&&G(Z)&&G(J)&&l.test(Z)&&l.test(J))return J}}},88313:function(ne,s,p){(function(h,M){"use strict";function w(I,o){if(!I)throw new Error(o||"Assertion failed")}function E(I,o){I.super_=o;var a=function(){};a.prototype=o.prototype,I.prototype=new a,I.prototype.constructor=I}function l(I,o,a){if(l.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,null!==I&&(("le"===o||"be"===o)&&(a=o,o=10),this._init(I||0,o||10,a||"be"))}var m;"object"==typeof h?h.exports=l:M.BN=l,l.BN=l,l.wordSize=26;try{m=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:p(7748).Buffer}catch{}function y(I,o){var a=I.charCodeAt(o);return a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function b(I,o,a){var d=y(I,a);return a-1>=o&&(d|=y(I,a-1)<<4),d}function S(I,o,a,d){for(var g=0,D=Math.min(I.length,a),F=o;F=49?z-49+10:z>=17?z-17+10:z}return g}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,a){return o.cmp(a)>0?o:a},l.min=function(o,a){return o.cmp(a)<0?o:a},l.prototype._init=function(o,a,d){if("number"==typeof o)return this._initNumber(o,a,d);if("object"==typeof o)return this._initArray(o,a,d);"hex"===a&&(a=16),w(a===(0|a)&&a>=2&&a<=36);var g=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(g++,this.negative=1),g=0;g-=3)F=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[D]|=F<>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);else if("le"===d)for(g=0,D=0;g>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);return this.strip()},l.prototype._parseHex=function(o,a,d){this.length=Math.ceil((o.length-a)/6),this.words=new Array(this.length);for(var g=0;g=a;g-=2)z=b(o,a,g)<=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;else for(g=(o.length-a)%2==0?a+1:a;g=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;this.strip()},l.prototype._parseBase=function(o,a,d){this.words=[0],this.length=1;for(var g=0,D=1;D<=67108863;D*=a)g++;g--,D=D/a|0;for(var F=o.length-d,z=F%g,C=Math.min(F,F-z)+d,f=0,k=d;k1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var _=["","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"],A=[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 T(I,o,a){a.negative=o.negative^I.negative;var d=I.length+o.length|0;a.length=d,d=d-1|0;var g=0|I.words[0],D=0|o.words[0],F=g*D,z=67108863&F,C=F/67108864|0;a.words[0]=z;for(var f=1;f>>26,se=67108863&C,te=Math.min(f,o.length-1),oe=Math.max(0,f-I.length+1);oe<=te;oe++){var de=f-oe|0;k+=(F=(g=0|I.words[de])*(D=0|o.words[oe])+se)/67108864|0,se=67108863&F}a.words[f]=0|se,C=0|k}return 0!==C?a.words[f]=0|C:a.length--,a.strip()}l.prototype.toString=function(o,a){var d;if(a=0|a||1,16===(o=o||10)||"hex"===o){d="";for(var g=0,D=0,F=0;F>>24-g&16777215)||F!==this.length-1?_[6-C.length]+C+d:C+d,(g+=2)>=26&&(g-=26,F--)}for(0!==D&&(d=D.toString(16)+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],k=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(k).toString(o);d=(se=se.idivn(k)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,a){return w(typeof m<"u"),this.toArrayLike(m,o,a)},l.prototype.toArray=function(o,a){return this.toArrayLike(Array,o,a)},l.prototype.toArrayLike=function(o,a,d){var g=this.byteLength(),D=d||Math.max(1,g);w(g<=D,"byte array longer than desired length"),w(D>0,"Requested array length <= 0"),this.strip();var C,f,F="le"===a,z=new o(D),k=this.clone();if(F){for(f=0;!k.isZero();f++)C=k.andln(255),k.iushrn(8),z[f]=C;for(;f=4096&&(d+=13,a>>>=13),a>=64&&(d+=7,a>>>=7),a>=8&&(d+=4,a>>>=4),a>=2&&(d+=2,a>>>=2),d+a},l.prototype._zeroBits=function(o){if(0===o)return 26;var a=o,d=0;return 8191&a||(d+=13,a>>>=13),127&a||(d+=7,a>>>=7),15&a||(d+=4,a>>>=4),3&a||(d+=2,a>>>=2),1&a||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],a=this._countBits(o);return 26*(this.length-1)+a},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,a=0;ao.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var a;a=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var a,d;this.length>o.length?(a=this,d=o):(a=o,d=this);for(var g=0;go.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var a=0|Math.ceil(o/26),d=o%26;this._expand(a),d>0&&a--;for(var g=0;g0&&(this.words[g]=~this.words[g]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,a){w("number"==typeof o&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),this.words[d]=a?this.words[d]|1<o.length?(d=this,g=o):(d=o,g=this);for(var D=0,F=0;F>>26;for(;0!==D&&F>>26;if(this.length=d.length,0!==D)this.words[this.length]=D,this.length++;else if(d!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var a=this.iadd(o);return o.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var g,D,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(g=this,D=o):(g=o,D=this);for(var F=0,z=0;z>26,this.words[z]=67108863&a;for(;0!==F&&z>26,this.words[z]=67108863&a;if(0===F&&z>>13,de=0|g[1],Ie=8191&de,ye=de>>>13,ve=0|g[2],ae=8191&ve,fe=ve>>>13,pe=0|g[3],Se=8191&pe,ce=pe>>>13,be=0|g[4],Ne=8191&be,Fe=be>>>13,lt=0|g[5],Ge=8191<,He=lt>>>13,Kt=0|g[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|g[7],ot=8191&Vt,at=Vt>>>13,Gt=0|g[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|g[9],Be=8191&Te,Ve=Te>>>13,mt=0|D[0],Ze=8191&mt,ct=mt>>>13,hn=0|D[1],ft=8191&hn,At=hn>>>13,wn=0|D[2],ze=8191&wn,Qe=wn>>>13,Ht=0|D[3],pt=8191&Ht,vt=Ht>>>13,$t=0|D[4],dt=8191&$t,gt=$t>>>13,mn=0|D[5],ut=8191&mn,wt=mn>>>13,Sn=0|D[6],yt=8191&Sn,Et=Sn>>>13,_e=0|D[7],Ee=8191&_e,Me=_e>>>13,me=0|D[8],Oe=8191&me,Ke=me>>>13,it=0|D[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^a.negative,d.length=19;var Bt=(z+(C=Math.imul(te,Ze))|0)+((8191&(f=(f=Math.imul(te,ct))+Math.imul(oe,Ze)|0))<<13)|0;z=((k=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,C=Math.imul(Ie,Ze),f=(f=Math.imul(Ie,ct))+Math.imul(ye,Ze)|0,k=Math.imul(ye,ct);var It=(z+(C=C+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(oe,ft)|0))<<13)|0;z=((k=k+Math.imul(oe,At)|0)+(f>>>13)|0)+(It>>>26)|0,It&=67108863,C=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,k=Math.imul(fe,ct),C=C+Math.imul(Ie,ft)|0,f=(f=f+Math.imul(Ie,At)|0)+Math.imul(ye,ft)|0,k=k+Math.imul(ye,At)|0;var kt=(z+(C=C+Math.imul(te,ze)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;z=((k=k+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,C=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,k=Math.imul(ce,ct),C=C+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,k=k+Math.imul(fe,At)|0,C=C+Math.imul(Ie,ze)|0,f=(f=f+Math.imul(Ie,Qe)|0)+Math.imul(ye,ze)|0,k=k+Math.imul(ye,Qe)|0;var Ot=(z+(C=C+Math.imul(te,pt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;z=((k=k+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,C=Math.imul(Ne,Ze),f=(f=Math.imul(Ne,ct))+Math.imul(Fe,Ze)|0,k=Math.imul(Fe,ct),C=C+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,k=k+Math.imul(ce,At)|0,C=C+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,k=k+Math.imul(fe,Qe)|0,C=C+Math.imul(Ie,pt)|0,f=(f=f+Math.imul(Ie,vt)|0)+Math.imul(ye,pt)|0,k=k+Math.imul(ye,vt)|0;var Nt=(z+(C=C+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;z=((k=k+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,C=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,k=Math.imul(He,ct),C=C+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,ft)|0,k=k+Math.imul(Fe,At)|0,C=C+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,k=k+Math.imul(ce,Qe)|0,C=C+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,k=k+Math.imul(fe,vt)|0,C=C+Math.imul(Ie,dt)|0,f=(f=f+Math.imul(Ie,gt)|0)+Math.imul(ye,dt)|0,k=k+Math.imul(ye,gt)|0;var Lt=(z+(C=C+Math.imul(te,ut)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;z=((k=k+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,C=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,k=Math.imul(nt,ct),C=C+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,k=k+Math.imul(He,At)|0,C=C+Math.imul(Ne,ze)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,ze)|0,k=k+Math.imul(Fe,Qe)|0,C=C+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,k=k+Math.imul(ce,vt)|0,C=C+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,k=k+Math.imul(fe,gt)|0,C=C+Math.imul(Ie,ut)|0,f=(f=f+Math.imul(Ie,wt)|0)+Math.imul(ye,ut)|0,k=k+Math.imul(ye,wt)|0;var nn=(z+(C=C+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;z=((k=k+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,k=Math.imul(at,ct),C=C+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,k=k+Math.imul(nt,At)|0,C=C+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,k=k+Math.imul(He,Qe)|0,C=C+Math.imul(Ne,pt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,pt)|0,k=k+Math.imul(Fe,vt)|0,C=C+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,k=k+Math.imul(ce,gt)|0,C=C+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,k=k+Math.imul(fe,wt)|0,C=C+Math.imul(Ie,yt)|0,f=(f=f+Math.imul(Ie,Et)|0)+Math.imul(ye,yt)|0,k=k+Math.imul(ye,Et)|0;var Yt=(z+(C=C+Math.imul(te,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(te,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;z=((k=k+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,C=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,k=Math.imul(Ae,ct),C=C+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,k=k+Math.imul(at,At)|0,C=C+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,k=k+Math.imul(nt,Qe)|0,C=C+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,k=k+Math.imul(He,vt)|0,C=C+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,dt)|0,k=k+Math.imul(Fe,gt)|0,C=C+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,k=k+Math.imul(ce,wt)|0,C=C+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,k=k+Math.imul(fe,Et)|0,C=C+Math.imul(Ie,Ee)|0,f=(f=f+Math.imul(Ie,Me)|0)+Math.imul(ye,Ee)|0,k=k+Math.imul(ye,Me)|0;var gn=(z+(C=C+Math.imul(te,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;z=((k=k+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,C=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,k=Math.imul(Ve,ct),C=C+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,k=k+Math.imul(Ae,At)|0,C=C+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,k=k+Math.imul(at,Qe)|0,C=C+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,k=k+Math.imul(nt,vt)|0,C=C+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,k=k+Math.imul(He,gt)|0,C=C+Math.imul(Ne,ut)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ut)|0,k=k+Math.imul(Fe,wt)|0,C=C+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,k=k+Math.imul(ce,Et)|0,C=C+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,k=k+Math.imul(fe,Me)|0,C=C+Math.imul(Ie,Oe)|0,f=(f=f+Math.imul(Ie,Ke)|0)+Math.imul(ye,Oe)|0,k=k+Math.imul(ye,Ke)|0;var an=(z+(C=C+Math.imul(te,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;z=((k=k+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,C=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,k=Math.imul(Ve,At),C=C+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,k=k+Math.imul(Ae,Qe)|0,C=C+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,k=k+Math.imul(at,vt)|0,C=C+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,k=k+Math.imul(nt,gt)|0,C=C+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,k=k+Math.imul(He,wt)|0,C=C+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,Et)|0)+Math.imul(Fe,yt)|0,k=k+Math.imul(Fe,Et)|0,C=C+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,k=k+Math.imul(ce,Me)|0,C=C+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,k=k+Math.imul(fe,Ke)|0;var tn=(z+(C=C+Math.imul(Ie,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ie,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;z=((k=k+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,k=Math.imul(Ve,Qe),C=C+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,k=k+Math.imul(Ae,vt)|0,C=C+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,k=k+Math.imul(at,gt)|0,C=C+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,k=k+Math.imul(nt,wt)|0,C=C+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,k=k+Math.imul(He,Et)|0,C=C+Math.imul(Ne,Ee)|0,f=(f=f+Math.imul(Ne,Me)|0)+Math.imul(Fe,Ee)|0,k=k+Math.imul(Fe,Me)|0,C=C+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,k=k+Math.imul(ce,Ke)|0;var Ut=(z+(C=C+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,C=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,k=Math.imul(Ve,vt),C=C+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,k=k+Math.imul(Ae,gt)|0,C=C+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,k=k+Math.imul(at,wt)|0,C=C+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,k=k+Math.imul(nt,Et)|0,C=C+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,k=k+Math.imul(He,Me)|0,C=C+Math.imul(Ne,Oe)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,Oe)|0,k=k+Math.imul(Fe,Ke)|0;var cn=(z+(C=C+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;z=((k=k+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,C=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,k=Math.imul(Ve,gt),C=C+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,k=k+Math.imul(Ae,wt)|0,C=C+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,k=k+Math.imul(at,Et)|0,C=C+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,k=k+Math.imul(nt,Me)|0,C=C+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,k=k+Math.imul(He,Ke)|0;var Jt=(z+(C=C+Math.imul(Ne,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,C=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,k=Math.imul(Ve,wt),C=C+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,k=k+Math.imul(Ae,Et)|0,C=C+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,k=k+Math.imul(at,Me)|0,C=C+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,k=k+Math.imul(nt,Ke)|0;var Zt=(z+(C=C+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;z=((k=k+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,C=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,k=Math.imul(Ve,Et),C=C+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,k=k+Math.imul(Ae,Me)|0,C=C+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,k=k+Math.imul(at,Ke)|0;var fn=(z+(C=C+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;z=((k=k+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,C=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,k=Math.imul(Ve,Me),C=C+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,k=k+Math.imul(Ae,Ke)|0;var Qt=(z+(C=C+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;z=((k=k+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,C=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,k=Math.imul(Ve,Ke);var Dt=(z+(C=C+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;z=((k=k+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(z+(C=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return z=((k=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,F[0]=Bt,F[1]=It,F[2]=kt,F[3]=Ot,F[4]=Nt,F[5]=Lt,F[6]=nn,F[7]=Yt,F[8]=gn,F[9]=an,F[10]=tn,F[11]=Ut,F[12]=cn,F[13]=Jt,F[14]=Zt,F[15]=fn,F[16]=Qt,F[17]=Dt,F[18]=Mt,0!==z&&(F[19]=z,d.length++),d};function j(I,o,a){return(new B).mulp(I,o,a)}function B(I,o){this.x=I,this.y=o}Math.imul||(L=T),l.prototype.mulTo=function(o,a){var d,g=this.length+o.length;return d=10===this.length&&10===o.length?L(this,o,a):g<63?T(this,o,a):g<1024?function N(I,o,a){a.negative=o.negative^I.negative,a.length=I.length+o.length;for(var d=0,g=0,D=0;D>>26)|0)>>>26,F&=67108863}a.words[D]=z,d=F,F=g}return 0!==d?a.words[D]=d:a.length--,a.strip()}(this,o,a):j(this,o,a),d},B.prototype.makeRBT=function(o){for(var a=new Array(o),d=l.prototype._countBits(o)-1,g=0;g>=1;return g},B.prototype.permute=function(o,a,d,g,D,F){for(var z=0;z>>=1)D++;return 1<>>=13,d[2*F+1]=8191&D,D>>>=13;for(F=2*a;F>=26,a+=g/67108864|0,a+=D>>>26,this.words[d]=67108863&D}return 0!==a&&(this.words[d]=a,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var a=function x(I){for(var o=new Array(I.bitLength()),a=0;a>>g}return o}(o);if(0===a.length)return new l(1);for(var d=this,g=0;g=0);var D,a=o%26,d=(o-a)/26,g=67108863>>>26-a<<26-a;if(0!==a){var F=0;for(D=0;D>>26-a}F&&(this.words[D]=F,this.length++)}if(0!==d){for(D=this.length-1;D>=0;D--)this.words[D+d]=this.words[D];for(D=0;D=0),g=a?(a-a%26)/26:0;var D=o%26,F=Math.min((o-D)/26,this.length),z=67108863^67108863>>>D<F)for(this.length-=F,f=0;f=0&&(0!==k||f>=g);f--){var se=0|this.words[f];this.words[f]=k<<26-D|se>>>D,k=se&z}return C&&0!==k&&(C.words[C.length++]=k),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,a,d){return w(0===this.negative),this.iushrn(o,a,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var a=o%26,d=(o-a)/26,g=1<=0);var a=o%26,d=(o-a)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==a&&d++,this.length=Math.min(d,this.length),0!==a){var g=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(C/67108864|0),this.words[D+d]=67108863&F}for(;D>26,this.words[D+d]=67108863&F;if(0===z)return this.strip();for(w(-1===z),z=0,D=0;D>26,this.words[D]=67108863&F;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,a){var d=(this.length,o.length),g=this.clone(),D=o,F=0|D.words[D.length-1];0!==(d=26-this._countBits(F))&&(D=D.ushln(d),g.iushln(d),F=0|D.words[D.length-1]);var f,C=g.length-D.length;if("mod"!==a){(f=new l(null)).length=C+1,f.words=new Array(f.length);for(var k=0;k=0;te--){var oe=67108864*(0|g.words[D.length+te])+(0|g.words[D.length+te-1]);for(oe=Math.min(oe/F|0,67108863),g._ishlnsubmul(D,oe,te);0!==g.negative;)oe--,g.negative=0,g._ishlnsubmul(D,1,te),g.isZero()||(g.negative^=1);f&&(f.words[te]=oe)}return f&&f.strip(),g.strip(),"div"!==a&&0!==d&&g.iushrn(d),{div:f||null,mod:g}},l.prototype.divmod=function(o,a,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,a),"mod"!==a&&(g=F.div.neg()),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.iadd(o)),{div:g,mod:D}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),a),"mod"!==a&&(g=F.div.neg()),{div:g,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),a),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.isub(o)),{div:F.div,mod:D}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===a?{div:this.divn(o.words[0]),mod:null}:"mod"===a?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,a);var g,D,F},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var a=this.divmod(o);if(a.mod.isZero())return a.div;var d=0!==a.div.negative?a.mod.isub(o):a.mod,g=o.ushrn(1),D=o.andln(1),F=d.cmp(g);return F<0||1===D&&0===F?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var a=(1<<26)%o,d=0,g=this.length-1;g>=0;g--)d=(a*d+(0|this.words[g]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var a=0,d=this.length-1;d>=0;d--){var g=(0|this.words[d])+67108864*a;this.words[d]=g/o|0,a=g%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=new l(0),z=new l(1),C=0;a.isEven()&&d.isEven();)a.iushrn(1),d.iushrn(1),++C;for(var f=d.clone(),k=a.clone();!a.isZero();){for(var se=0,te=1;!(a.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(a.iushrn(se);se-- >0;)(g.isOdd()||D.isOdd())&&(g.iadd(f),D.isub(k)),g.iushrn(1),D.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(F.isOdd()||z.isOdd())&&(F.iadd(f),z.isub(k)),F.iushrn(1),z.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(F),D.isub(z)):(d.isub(a),F.isub(g),z.isub(D))}return{a:F,b:z,gcd:d.iushln(C)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=d.clone();a.cmpn(1)>0&&d.cmpn(1)>0;){for(var z=0,C=1;!(a.words[0]&C)&&z<26;++z,C<<=1);if(z>0)for(a.iushrn(z);z-- >0;)g.isOdd()&&g.iadd(F),g.iushrn(1);for(var f=0,k=1;!(d.words[0]&k)&&f<26;++f,k<<=1);if(f>0)for(d.iushrn(f);f-- >0;)D.isOdd()&&D.iadd(F),D.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(D)):(d.isub(a),D.isub(g))}return(se=0===a.cmpn(1)?g:D).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var a=this.clone(),d=o.clone();a.negative=0,d.negative=0;for(var g=0;a.isEven()&&d.isEven();g++)a.iushrn(1),d.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;d.isEven();)d.iushrn(1);var D=a.cmp(d);if(D<0){var F=a;a=d,d=F}else if(0===D||0===d.cmpn(1))break;a.isub(d)}return d.iushln(g)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var a=o%26,d=(o-a)/26,g=1<>>26,z&=67108863,this.words[F]=z}return 0!==D&&(this.words[F]=D,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,a=o<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)d=1;else{a&&(o=-o),w(o<=67108863,"Number is too big");var g=0|this.words[0];d=g===o?0:go.length)return 1;if(this.length=0;d--){var g=0|this.words[d],D=0|o.words[d];if(g!==D){gD&&(a=1);break}}return a},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new Z(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var V={k256:null,p224:null,p192:null,p25519:null};function G(I,o){this.name=I,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function W(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Z(I){if("string"==typeof I){var o=l._prime(I);this.m=o.p,this.prime=o}else w(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}function ee(I){Z.call(this,I),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}G.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},G.prototype.ireduce=function(o){var d,a=o;do{this.split(a,this.tmp),d=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(d>this.n);var g=d0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},G.prototype.split=function(o,a){o.iushrn(this.n,0,a)},G.prototype.imulK=function(o){return o.imul(this.k)},E(W,G),W.prototype.split=function(o,a){for(var d=4194303,g=Math.min(o.length,9),D=0;D>>22,F=z}F>>>=22,o.words[D-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},W.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var a=0,d=0;d>>=26,o.words[d]=D,a=g}return 0!==a&&(o.words[o.length++]=a),o},l._prime=function(o){if(V[o])return V[o];var a;if("k256"===o)a=new W;else if("p224"===o)a=new Q;else if("p192"===o)a=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);a=new J}return V[o]=a,a},Z.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},Z.prototype._verify2=function(o,a){w(0==(o.negative|a.negative),"red works only with positives"),w(o.red&&o.red===a.red,"red works only with red numbers")},Z.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},Z.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},Z.prototype.add=function(o,a){this._verify2(o,a);var d=o.add(a);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},Z.prototype.iadd=function(o,a){this._verify2(o,a);var d=o.iadd(a);return d.cmp(this.m)>=0&&d.isub(this.m),d},Z.prototype.sub=function(o,a){this._verify2(o,a);var d=o.sub(a);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},Z.prototype.isub=function(o,a){this._verify2(o,a);var d=o.isub(a);return d.cmpn(0)<0&&d.iadd(this.m),d},Z.prototype.shl=function(o,a){return this._verify1(o),this.imod(o.ushln(a))},Z.prototype.imul=function(o,a){return this._verify2(o,a),this.imod(o.imul(a))},Z.prototype.mul=function(o,a){return this._verify2(o,a),this.imod(o.mul(a))},Z.prototype.isqr=function(o){return this.imul(o,o.clone())},Z.prototype.sqr=function(o){return this.mul(o,o)},Z.prototype.sqrt=function(o){if(o.isZero())return o.clone();var a=this.m.andln(3);if(w(a%2==1),3===a){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),D=0;!g.isZero()&&0===g.andln(1);)D++,g.iushrn(1);w(!g.isZero());var F=new l(1).toRed(this),z=F.redNeg(),C=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,C).cmp(z);)f.redIAdd(z);for(var k=this.pow(f,g),se=this.pow(o,g.addn(1).iushrn(1)),te=this.pow(o,g),oe=D;0!==te.cmp(F);){for(var de=te,Ie=0;0!==de.cmp(F);Ie++)de=de.redSqr();w(Ie=0;D--){for(var k=a.words[D],se=f-1;se>=0;se--){var te=k>>se&1;(F!==g[0]&&(F=this.sqr(F)),0!==te||0!==z)?(z<<=1,z|=te,(4===++C||0===D&&0===se)&&(F=this.mul(F,g[z]),C=0,z=0)):C=0}f=26}return F},Z.prototype.convertTo=function(o){var a=o.umod(this.m);return a===o?a.clone():a},Z.prototype.convertFrom=function(o){var a=o.clone();return a.red=null,a},l.mont=function(o){return new ee(o)},E(ee,Z),ee.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},ee.prototype.convertFrom=function(o){var a=this.imod(o.mul(this.rinv));return a.red=null,a},ee.prototype.imul=function(o,a){if(o.isZero()||a.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.mul=function(o,a){if(o.isZero()||a.isZero())return new l(0)._forceRed(this);var d=o.mul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=p.nmd(ne),this)},74901:ne=>{"use strict";var s={single_source_shortest_paths:function(p,h,M){var w={},E={};E[h]=0;var m,y,b,S,_,P,x,l=s.PriorityQueue.make();for(l.push(h,0);!l.empty();)for(b in y=(m=l.pop()).value,S=m.cost,_=p[y]||{})_.hasOwnProperty(b)&&(P=S+_[b],x=E[b],(typeof E[b]>"u"||x>P)&&(E[b]=P,l.push(b,P),w[b]=y));if(typeof M<"u"&&typeof E[M]>"u"){var L=["Could not find a path from ",h," to ",M,"."].join("");throw new Error(L)}return w},extract_shortest_path_from_predecessor_list:function(p,h){for(var M=[],w=h;w;)M.push(w),p[w],w=p[w];return M.reverse(),M},find_path:function(p,h,M){var w=s.single_source_shortest_paths(p,h,M);return s.extract_shortest_path_from_predecessor_list(w,M)},PriorityQueue:{make:function(p){var w,h=s.PriorityQueue,M={};for(w in p=p||{},h)h.hasOwnProperty(w)&&(M[w]=h[w]);return M.queue=[],M.sorter=p.sorter||h.default_sorter,M},default_sorter:function(p,h){return p.cost-h.cost},push:function(p,h){var M={value:p,cost:h};this.queue.push(M),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};ne.exports=s},57715:(ne,s,p)=>{"use strict";var h=s;h.version=p(18597).i8,h.utils=p(61970),h.rand=p(37950),h.curve=p(46270),h.curves=p(52916),h.ec=p(67626),h.eddsa=p(81885)},97902:(ne,s,p)=>{"use strict";var h=p(17433),M=p(61970),w=M.getNAF,E=M.getJSF,l=M.assert;function m(b,S){this.type=b,this.p=new h(S.p,16),this.red=S.prime?h.red(S.prime):h.mont(this.p),this.zero=new h(0).toRed(this.red),this.one=new h(1).toRed(this.red),this.two=new h(2).toRed(this.red),this.n=S.n&&new h(S.n,16),this.g=S.g&&this.pointFromJSON(S.g,S.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 _=this.n&&this.p.div(this.n);!_||_.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function y(b,S){this.curve=b,this.type=S,this.precomputed=null}ne.exports=m,m.prototype.point=function(){throw new Error("Not implemented")},m.prototype.validate=function(){throw new Error("Not implemented")},m.prototype._fixedNafMul=function(S,_){l(S.precomputed);var A=S._getDoubles(),P=w(_,1,this._bitLength),x=(1<=L;j--)N=(N<<1)+P[j];T.push(N)}for(var B=this.jpoint(null,null,null),V=this.jpoint(null,null,null),G=x;G>0;G--){for(L=0;L=0;N--){for(var j=0;N>=0&&0===T[N];N--)j++;if(N>=0&&j++,L=L.dblp(j),N<0)break;var B=T[N];l(0!==B),L="affine"===S.type?B>0?L.mixedAdd(x[B-1>>1]):L.mixedAdd(x[-B-1>>1].neg()):B>0?L.add(x[B-1>>1]):L.add(x[-B-1>>1].neg())}return"affine"===S.type?L.toP():L},m.prototype._wnafMulAdd=function(S,_,A,P,x){var B,V,G,T=this._wnafT1,L=this._wnafT2,N=this._wnafT3,j=0;for(B=0;B=1;B-=2){var Q=B-1,q=B;if(1===T[Q]&&1===T[q]){var J=[_[Q],null,null,_[q]];0===_[Q].y.cmp(_[q].y)?(J[1]=_[Q].add(_[q]),J[2]=_[Q].toJ().mixedAdd(_[q].neg())):0===_[Q].y.cmp(_[q].y.redNeg())?(J[1]=_[Q].toJ().mixedAdd(_[q]),J[2]=_[Q].add(_[q].neg())):(J[1]=_[Q].toJ().mixedAdd(_[q]),J[2]=_[Q].toJ().mixedAdd(_[q].neg()));var Z=[-3,-1,-5,-7,0,7,5,1,3],ee=E(A[Q],A[q]);for(j=Math.max(ee[0].length,j),N[Q]=new Array(j),N[q]=new Array(j),V=0;V=0;B--){for(var g=0;B>=0;){var D=!0;for(V=0;V=0&&g++,a=a.dblp(g),B<0)break;for(V=0;V0?G=L[V][F-1>>1]:F<0&&(G=L[V][-F-1>>1].neg()),a="affine"===G.type?a.mixedAdd(G):a.add(G))}}for(B=0;B=Math.ceil((S.bitLength()+1)/_.step)},y.prototype._getDoubles=function(S,_){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var A=[this],P=this,x=0;x<_;x+=S){for(var T=0;T{"use strict";var h=p(61970),M=p(17433),w=p(83894),E=p(97902),l=h.assert;function m(b){this.twisted=1!=(0|b.a),this.mOneA=this.twisted&&-1==(0|b.a),this.extended=this.mOneA,E.call(this,"edwards",b),this.a=new M(b.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new M(b.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new M(b.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),l(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|b.c)}function y(b,S,_,A,P){E.BasePoint.call(this,b,"projective"),null===S&&null===_&&null===A?(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 M(S,16),this.y=new M(_,16),this.z=A?new M(A,16):this.curve.one,this.t=P&&new M(P,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()))))}w(m,E),ne.exports=m,m.prototype._mulA=function(S){return this.mOneA?S.redNeg():this.a.redMul(S)},m.prototype._mulC=function(S){return this.oneC?S:this.c.redMul(S)},m.prototype.jpoint=function(S,_,A,P){return this.point(S,_,A,P)},m.prototype.pointFromX=function(S,_){(S=new M(S,16)).red||(S=S.toRed(this.red));var A=S.redSqr(),P=this.c2.redSub(this.a.redMul(A)),x=this.one.redSub(this.c2.redMul(this.d).redMul(A)),T=P.redMul(x.redInvm()),L=T.redSqrt();if(0!==L.redSqr().redSub(T).cmp(this.zero))throw new Error("invalid point");var N=L.fromRed().isOdd();return(_&&!N||!_&&N)&&(L=L.redNeg()),this.point(S,L)},m.prototype.pointFromY=function(S,_){(S=new M(S,16)).red||(S=S.toRed(this.red));var A=S.redSqr(),P=A.redSub(this.c2),x=A.redMul(this.d).redMul(this.c2).redSub(this.a),T=P.redMul(x.redInvm());if(0===T.cmp(this.zero)){if(_)throw new Error("invalid point");return this.point(this.zero,S)}var L=T.redSqrt();if(0!==L.redSqr().redSub(T).cmp(this.zero))throw new Error("invalid point");return L.fromRed().isOdd()!==_&&(L=L.redNeg()),this.point(L,S)},m.prototype.validate=function(S){if(S.isInfinity())return!0;S.normalize();var _=S.x.redSqr(),A=S.y.redSqr(),P=_.redMul(this.a).redAdd(A),x=this.c2.redMul(this.one.redAdd(this.d.redMul(_).redMul(A)));return 0===P.cmp(x)},w(y,E.BasePoint),m.prototype.pointFromJSON=function(S){return y.fromJSON(this,S)},m.prototype.point=function(S,_,A,P){return new y(this,S,_,A,P)},y.fromJSON=function(S,_){return new y(S,_[0],_[1],_[2])},y.prototype.inspect=function(){return this.isInfinity()?"":""},y.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},y.prototype._extDbl=function(){var S=this.x.redSqr(),_=this.y.redSqr(),A=this.z.redSqr();A=A.redIAdd(A);var P=this.curve._mulA(S),x=this.x.redAdd(this.y).redSqr().redISub(S).redISub(_),T=P.redAdd(_),L=T.redSub(A),N=P.redSub(_),j=x.redMul(L),B=T.redMul(N),V=x.redMul(N),G=L.redMul(T);return this.curve.point(j,B,G,V)},y.prototype._projDbl=function(){var P,x,T,L,N,j,S=this.x.redAdd(this.y).redSqr(),_=this.x.redSqr(),A=this.y.redSqr();if(this.curve.twisted){var B=(L=this.curve._mulA(_)).redAdd(A);this.zOne?(P=S.redSub(_).redSub(A).redMul(B.redSub(this.curve.two)),x=B.redMul(L.redSub(A)),T=B.redSqr().redSub(B).redSub(B)):(N=this.z.redSqr(),j=B.redSub(N).redISub(N),P=S.redSub(_).redISub(A).redMul(j),x=B.redMul(L.redSub(A)),T=B.redMul(j))}else L=_.redAdd(A),N=this.curve._mulC(this.z).redSqr(),j=L.redSub(N).redSub(N),P=this.curve._mulC(S.redISub(L)).redMul(j),x=this.curve._mulC(L).redMul(_.redISub(A)),T=L.redMul(j);return this.curve.point(P,x,T)},y.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},y.prototype._extAdd=function(S){var _=this.y.redSub(this.x).redMul(S.y.redSub(S.x)),A=this.y.redAdd(this.x).redMul(S.y.redAdd(S.x)),P=this.t.redMul(this.curve.dd).redMul(S.t),x=this.z.redMul(S.z.redAdd(S.z)),T=A.redSub(_),L=x.redSub(P),N=x.redAdd(P),j=A.redAdd(_),B=T.redMul(L),V=N.redMul(j),G=T.redMul(j),W=L.redMul(N);return this.curve.point(B,V,W,G)},y.prototype._projAdd=function(S){var V,G,_=this.z.redMul(S.z),A=_.redSqr(),P=this.x.redMul(S.x),x=this.y.redMul(S.y),T=this.curve.d.redMul(P).redMul(x),L=A.redSub(T),N=A.redAdd(T),j=this.x.redAdd(this.y).redMul(S.x.redAdd(S.y)).redISub(P).redISub(x),B=_.redMul(L).redMul(j);return this.curve.twisted?(V=_.redMul(N).redMul(x.redSub(this.curve._mulA(P))),G=L.redMul(N)):(V=_.redMul(N).redMul(x.redSub(P)),G=this.curve._mulC(L).redMul(N)),this.curve.point(B,V,G)},y.prototype.add=function(S){return this.isInfinity()?S:S.isInfinity()?this:this.curve.extended?this._extAdd(S):this._projAdd(S)},y.prototype.mul=function(S){return this._hasDoubles(S)?this.curve._fixedNafMul(this,S):this.curve._wnafMul(this,S)},y.prototype.mulAdd=function(S,_,A){return this.curve._wnafMulAdd(1,[this,_],[S,A],2,!1)},y.prototype.jmulAdd=function(S,_,A){return this.curve._wnafMulAdd(1,[this,_],[S,A],2,!0)},y.prototype.normalize=function(){if(this.zOne)return this;var S=this.z.redInvm();return this.x=this.x.redMul(S),this.y=this.y.redMul(S),this.t&&(this.t=this.t.redMul(S)),this.z=this.curve.one,this.zOne=!0,this},y.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},y.prototype.getX=function(){return this.normalize(),this.x.fromRed()},y.prototype.getY=function(){return this.normalize(),this.y.fromRed()},y.prototype.eq=function(S){return this===S||0===this.getX().cmp(S.getX())&&0===this.getY().cmp(S.getY())},y.prototype.eqXToP=function(S){var _=S.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(_))return!0;for(var A=S.clone(),P=this.curve.redN.redMul(this.z);;){if(A.iadd(this.curve.n),A.cmp(this.curve.p)>=0)return!1;if(_.redIAdd(P),0===this.x.cmp(_))return!0}},y.prototype.toP=y.prototype.normalize,y.prototype.mixedAdd=y.prototype.add},46270:(ne,s,p)=>{"use strict";var h=s;h.base=p(97902),h.short=p(41781),h.mont=p(97064),h.edwards=p(13835)},97064:(ne,s,p)=>{"use strict";var h=p(17433),M=p(83894),w=p(97902),E=p(61970);function l(y){w.call(this,"mont",y),this.a=new h(y.a,16).toRed(this.red),this.b=new h(y.b,16).toRed(this.red),this.i4=new h(4).toRed(this.red).redInvm(),this.two=new h(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function m(y,b,S){w.BasePoint.call(this,y,"projective"),null===b&&null===S?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new h(b,16),this.z=new h(S,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}M(l,w),ne.exports=l,l.prototype.validate=function(b){var S=b.normalize().x,_=S.redSqr(),A=_.redMul(S).redAdd(_.redMul(this.a)).redAdd(S);return 0===A.redSqrt().redSqr().cmp(A)},M(m,w.BasePoint),l.prototype.decodePoint=function(b,S){return this.point(E.toArray(b,S),1)},l.prototype.point=function(b,S){return new m(this,b,S)},l.prototype.pointFromJSON=function(b){return m.fromJSON(this,b)},m.prototype.precompute=function(){},m.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},m.fromJSON=function(b,S){return new m(b,S[0],S[1]||b.one)},m.prototype.inspect=function(){return this.isInfinity()?"":""},m.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},m.prototype.dbl=function(){var S=this.x.redAdd(this.z).redSqr(),A=this.x.redSub(this.z).redSqr(),P=S.redSub(A),x=S.redMul(A),T=P.redMul(A.redAdd(this.curve.a24.redMul(P)));return this.curve.point(x,T)},m.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},m.prototype.diffAdd=function(b,S){var _=this.x.redAdd(this.z),A=this.x.redSub(this.z),P=b.x.redAdd(b.z),T=b.x.redSub(b.z).redMul(_),L=P.redMul(A),N=S.z.redMul(T.redAdd(L).redSqr()),j=S.x.redMul(T.redISub(L).redSqr());return this.curve.point(N,j)},m.prototype.mul=function(b){for(var S=b.clone(),_=this,A=this.curve.point(null,null),x=[];0!==S.cmpn(0);S.iushrn(1))x.push(S.andln(1));for(var T=x.length-1;T>=0;T--)0===x[T]?(_=_.diffAdd(A,this),A=A.dbl()):(A=_.diffAdd(A,this),_=_.dbl());return A},m.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},m.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},m.prototype.eq=function(b){return 0===this.getX().cmp(b.getX())},m.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},m.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},41781:(ne,s,p)=>{"use strict";var h=p(61970),M=p(17433),w=p(83894),E=p(97902),l=h.assert;function m(S){E.call(this,"short",S),this.a=new M(S.a,16).toRed(this.red),this.b=new M(S.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(S),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function y(S,_,A,P){E.BasePoint.call(this,S,"affine"),null===_&&null===A?(this.x=null,this.y=null,this.inf=!0):(this.x=new M(_,16),this.y=new M(A,16),P&&(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 b(S,_,A,P){E.BasePoint.call(this,S,"jacobian"),null===_&&null===A&&null===P?(this.x=this.curve.one,this.y=this.curve.one,this.z=new M(0)):(this.x=new M(_,16),this.y=new M(A,16),this.z=new M(P,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}w(m,E),ne.exports=m,m.prototype._getEndomorphism=function(_){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var A,P;if(_.beta)A=new M(_.beta,16).toRed(this.red);else{var x=this._getEndoRoots(this.p);A=(A=x[0].cmp(x[1])<0?x[0]:x[1]).toRed(this.red)}if(_.lambda)P=new M(_.lambda,16);else{var T=this._getEndoRoots(this.n);0===this.g.mul(T[0]).x.cmp(this.g.x.redMul(A))?P=T[0]:(P=T[1],l(0===this.g.mul(P).x.cmp(this.g.x.redMul(A))))}return{beta:A,lambda:P,basis:_.basis?_.basis.map(function(N){return{a:new M(N.a,16),b:new M(N.b,16)}}):this._getEndoBasis(P)}}},m.prototype._getEndoRoots=function(_){var A=_===this.p?this.red:M.mont(_),P=new M(2).toRed(A).redInvm(),x=P.redNeg(),T=new M(3).toRed(A).redNeg().redSqrt().redMul(P);return[x.redAdd(T).fromRed(),x.redSub(T).fromRed()]},m.prototype._getEndoBasis=function(_){for(var B,V,G,W,Q,q,J,ee,I,A=this.n.ushrn(Math.floor(this.n.bitLength()/2)),P=_,x=this.n.clone(),T=new M(1),L=new M(0),N=new M(0),j=new M(1),Z=0;0!==P.cmpn(0);){var o=x.div(P);ee=x.sub(o.mul(P)),I=N.sub(o.mul(T));var a=j.sub(o.mul(L));if(!G&&ee.cmp(A)<0)B=J.neg(),V=T,G=ee.neg(),W=I;else if(G&&2==++Z)break;J=ee,x=P,P=ee,N=T,T=I,j=L,L=a}Q=ee.neg(),q=I;var d=G.sqr().add(W.sqr());return Q.sqr().add(q.sqr()).cmp(d)>=0&&(Q=B,q=V),G.negative&&(G=G.neg(),W=W.neg()),Q.negative&&(Q=Q.neg(),q=q.neg()),[{a:G,b:W},{a:Q,b:q}]},m.prototype._endoSplit=function(_){var A=this.endo.basis,P=A[0],x=A[1],T=x.b.mul(_).divRound(this.n),L=P.b.neg().mul(_).divRound(this.n),N=T.mul(P.a),j=L.mul(x.a),B=T.mul(P.b),V=L.mul(x.b);return{k1:_.sub(N).sub(j),k2:B.add(V).neg()}},m.prototype.pointFromX=function(_,A){(_=new M(_,16)).red||(_=_.toRed(this.red));var P=_.redSqr().redMul(_).redIAdd(_.redMul(this.a)).redIAdd(this.b),x=P.redSqrt();if(0!==x.redSqr().redSub(P).cmp(this.zero))throw new Error("invalid point");var T=x.fromRed().isOdd();return(A&&!T||!A&&T)&&(x=x.redNeg()),this.point(_,x)},m.prototype.validate=function(_){if(_.inf)return!0;var A=_.x,P=_.y,x=this.a.redMul(A),T=A.redSqr().redMul(A).redIAdd(x).redIAdd(this.b);return 0===P.redSqr().redISub(T).cmpn(0)},m.prototype._endoWnafMulAdd=function(_,A,P){for(var x=this._endoWnafT1,T=this._endoWnafT2,L=0;L<_.length;L++){var N=this._endoSplit(A[L]),j=_[L],B=j._getBeta();N.k1.negative&&(N.k1.ineg(),j=j.neg(!0)),N.k2.negative&&(N.k2.ineg(),B=B.neg(!0)),x[2*L]=j,x[2*L+1]=B,T[2*L]=N.k1,T[2*L+1]=N.k2}for(var V=this._wnafMulAdd(1,x,T,2*L,P),G=0;G<2*L;G++)x[G]=null,T[G]=null;return V},w(y,E.BasePoint),m.prototype.point=function(_,A,P){return new y(this,_,A,P)},m.prototype.pointFromJSON=function(_,A){return y.fromJSON(this,_,A)},y.prototype._getBeta=function(){if(this.curve.endo){var _=this.precomputed;if(_&&_.beta)return _.beta;var A=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(_){var P=this.curve,x=function(T){return P.point(T.x.redMul(P.endo.beta),T.y)};_.beta=A,A.precomputed={beta:null,naf:_.naf&&{wnd:_.naf.wnd,points:_.naf.points.map(x)},doubles:_.doubles&&{step:_.doubles.step,points:_.doubles.points.map(x)}}}return A}},y.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]},y.fromJSON=function(_,A,P){"string"==typeof A&&(A=JSON.parse(A));var x=_.point(A[0],A[1],P);if(!A[2])return x;function T(N){return _.point(N[0],N[1],P)}var L=A[2];return x.precomputed={beta:null,doubles:L.doubles&&{step:L.doubles.step,points:[x].concat(L.doubles.points.map(T))},naf:L.naf&&{wnd:L.naf.wnd,points:[x].concat(L.naf.points.map(T))}},x},y.prototype.inspect=function(){return this.isInfinity()?"":""},y.prototype.isInfinity=function(){return this.inf},y.prototype.add=function(_){if(this.inf)return _;if(_.inf)return this;if(this.eq(_))return this.dbl();if(this.neg().eq(_))return this.curve.point(null,null);if(0===this.x.cmp(_.x))return this.curve.point(null,null);var A=this.y.redSub(_.y);0!==A.cmpn(0)&&(A=A.redMul(this.x.redSub(_.x).redInvm()));var P=A.redSqr().redISub(this.x).redISub(_.x),x=A.redMul(this.x.redSub(P)).redISub(this.y);return this.curve.point(P,x)},y.prototype.dbl=function(){if(this.inf)return this;var _=this.y.redAdd(this.y);if(0===_.cmpn(0))return this.curve.point(null,null);var A=this.curve.a,P=this.x.redSqr(),x=_.redInvm(),T=P.redAdd(P).redIAdd(P).redIAdd(A).redMul(x),L=T.redSqr().redISub(this.x.redAdd(this.x)),N=T.redMul(this.x.redSub(L)).redISub(this.y);return this.curve.point(L,N)},y.prototype.getX=function(){return this.x.fromRed()},y.prototype.getY=function(){return this.y.fromRed()},y.prototype.mul=function(_){return _=new M(_,16),this.isInfinity()?this:this._hasDoubles(_)?this.curve._fixedNafMul(this,_):this.curve.endo?this.curve._endoWnafMulAdd([this],[_]):this.curve._wnafMul(this,_)},y.prototype.mulAdd=function(_,A,P){var x=[this,A],T=[_,P];return this.curve.endo?this.curve._endoWnafMulAdd(x,T):this.curve._wnafMulAdd(1,x,T,2)},y.prototype.jmulAdd=function(_,A,P){var x=[this,A],T=[_,P];return this.curve.endo?this.curve._endoWnafMulAdd(x,T,!0):this.curve._wnafMulAdd(1,x,T,2,!0)},y.prototype.eq=function(_){return this===_||this.inf===_.inf&&(this.inf||0===this.x.cmp(_.x)&&0===this.y.cmp(_.y))},y.prototype.neg=function(_){if(this.inf)return this;var A=this.curve.point(this.x,this.y.redNeg());if(_&&this.precomputed){var P=this.precomputed,x=function(T){return T.neg()};A.precomputed={naf:P.naf&&{wnd:P.naf.wnd,points:P.naf.points.map(x)},doubles:P.doubles&&{step:P.doubles.step,points:P.doubles.points.map(x)}}}return A},y.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},w(b,E.BasePoint),m.prototype.jpoint=function(_,A,P){return new b(this,_,A,P)},b.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var _=this.z.redInvm(),A=_.redSqr(),P=this.x.redMul(A),x=this.y.redMul(A).redMul(_);return this.curve.point(P,x)},b.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},b.prototype.add=function(_){if(this.isInfinity())return _;if(_.isInfinity())return this;var A=_.z.redSqr(),P=this.z.redSqr(),x=this.x.redMul(A),T=_.x.redMul(P),L=this.y.redMul(A.redMul(_.z)),N=_.y.redMul(P.redMul(this.z)),j=x.redSub(T),B=L.redSub(N);if(0===j.cmpn(0))return 0!==B.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var V=j.redSqr(),G=V.redMul(j),W=x.redMul(V),Q=B.redSqr().redIAdd(G).redISub(W).redISub(W),q=B.redMul(W.redISub(Q)).redISub(L.redMul(G)),J=this.z.redMul(_.z).redMul(j);return this.curve.jpoint(Q,q,J)},b.prototype.mixedAdd=function(_){if(this.isInfinity())return _.toJ();if(_.isInfinity())return this;var A=this.z.redSqr(),P=this.x,x=_.x.redMul(A),T=this.y,L=_.y.redMul(A).redMul(this.z),N=P.redSub(x),j=T.redSub(L);if(0===N.cmpn(0))return 0!==j.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var B=N.redSqr(),V=B.redMul(N),G=P.redMul(B),W=j.redSqr().redIAdd(V).redISub(G).redISub(G),Q=j.redMul(G.redISub(W)).redISub(T.redMul(V)),q=this.z.redMul(N);return this.curve.jpoint(W,Q,q)},b.prototype.dblp=function(_){if(0===_)return this;if(this.isInfinity())return this;if(!_)return this.dbl();var A;if(this.curve.zeroA||this.curve.threeA){var P=this;for(A=0;A<_;A++)P=P.dbl();return P}var x=this.curve.a,T=this.curve.tinv,L=this.x,N=this.y,j=this.z,B=j.redSqr().redSqr(),V=N.redAdd(N);for(A=0;A<_;A++){var G=L.redSqr(),W=V.redSqr(),Q=W.redSqr(),q=G.redAdd(G).redIAdd(G).redIAdd(x.redMul(B)),J=L.redMul(W),Z=q.redSqr().redISub(J.redAdd(J)),ee=J.redISub(Z),I=q.redMul(ee);I=I.redIAdd(I).redISub(Q);var o=V.redMul(j);A+1<_&&(B=B.redMul(Q)),L=Z,j=o,V=I}return this.curve.jpoint(L,V.redMul(T),j)},b.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},b.prototype._zeroDbl=function(){var _,A,P;if(this.zOne){var x=this.x.redSqr(),T=this.y.redSqr(),L=T.redSqr(),N=this.x.redAdd(T).redSqr().redISub(x).redISub(L);N=N.redIAdd(N);var j=x.redAdd(x).redIAdd(x),B=j.redSqr().redISub(N).redISub(N),V=L.redIAdd(L);V=(V=V.redIAdd(V)).redIAdd(V),_=B,A=j.redMul(N.redISub(B)).redISub(V),P=this.y.redAdd(this.y)}else{var G=this.x.redSqr(),W=this.y.redSqr(),Q=W.redSqr(),q=this.x.redAdd(W).redSqr().redISub(G).redISub(Q);q=q.redIAdd(q);var J=G.redAdd(G).redIAdd(G),Z=J.redSqr(),ee=Q.redIAdd(Q);ee=(ee=ee.redIAdd(ee)).redIAdd(ee),_=Z.redISub(q).redISub(q),A=J.redMul(q.redISub(_)).redISub(ee),P=(P=this.y.redMul(this.z)).redIAdd(P)}return this.curve.jpoint(_,A,P)},b.prototype._threeDbl=function(){var _,A,P;if(this.zOne){var x=this.x.redSqr(),T=this.y.redSqr(),L=T.redSqr(),N=this.x.redAdd(T).redSqr().redISub(x).redISub(L);N=N.redIAdd(N);var j=x.redAdd(x).redIAdd(x).redIAdd(this.curve.a),B=j.redSqr().redISub(N).redISub(N);_=B;var V=L.redIAdd(L);V=(V=V.redIAdd(V)).redIAdd(V),A=j.redMul(N.redISub(B)).redISub(V),P=this.y.redAdd(this.y)}else{var G=this.z.redSqr(),W=this.y.redSqr(),Q=this.x.redMul(W),q=this.x.redSub(G).redMul(this.x.redAdd(G));q=q.redAdd(q).redIAdd(q);var J=Q.redIAdd(Q),Z=(J=J.redIAdd(J)).redAdd(J);_=q.redSqr().redISub(Z),P=this.y.redAdd(this.z).redSqr().redISub(W).redISub(G);var ee=W.redSqr();ee=(ee=(ee=ee.redIAdd(ee)).redIAdd(ee)).redIAdd(ee),A=q.redMul(J.redISub(_)).redISub(ee)}return this.curve.jpoint(_,A,P)},b.prototype._dbl=function(){var _=this.curve.a,A=this.x,P=this.y,x=this.z,T=x.redSqr().redSqr(),L=A.redSqr(),N=P.redSqr(),j=L.redAdd(L).redIAdd(L).redIAdd(_.redMul(T)),B=A.redAdd(A),V=(B=B.redIAdd(B)).redMul(N),G=j.redSqr().redISub(V.redAdd(V)),W=V.redISub(G),Q=N.redSqr();Q=(Q=(Q=Q.redIAdd(Q)).redIAdd(Q)).redIAdd(Q);var q=j.redMul(W).redISub(Q),J=P.redAdd(P).redMul(x);return this.curve.jpoint(G,q,J)},b.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var _=this.x.redSqr(),A=this.y.redSqr(),P=this.z.redSqr(),x=A.redSqr(),T=_.redAdd(_).redIAdd(_),L=T.redSqr(),N=this.x.redAdd(A).redSqr().redISub(_).redISub(x),j=(N=(N=(N=N.redIAdd(N)).redAdd(N).redIAdd(N)).redISub(L)).redSqr(),B=x.redIAdd(x);B=(B=(B=B.redIAdd(B)).redIAdd(B)).redIAdd(B);var V=T.redIAdd(N).redSqr().redISub(L).redISub(j).redISub(B),G=A.redMul(V);G=(G=G.redIAdd(G)).redIAdd(G);var W=this.x.redMul(j).redISub(G);W=(W=W.redIAdd(W)).redIAdd(W);var Q=this.y.redMul(V.redMul(B.redISub(V)).redISub(N.redMul(j)));Q=(Q=(Q=Q.redIAdd(Q)).redIAdd(Q)).redIAdd(Q);var q=this.z.redAdd(N).redSqr().redISub(P).redISub(j);return this.curve.jpoint(W,Q,q)},b.prototype.mul=function(_,A){return _=new M(_,A),this.curve._wnafMul(this,_)},b.prototype.eq=function(_){if("affine"===_.type)return this.eq(_.toJ());if(this===_)return!0;var A=this.z.redSqr(),P=_.z.redSqr();if(0!==this.x.redMul(P).redISub(_.x.redMul(A)).cmpn(0))return!1;var x=A.redMul(this.z),T=P.redMul(_.z);return 0===this.y.redMul(T).redISub(_.y.redMul(x)).cmpn(0)},b.prototype.eqXToP=function(_){var A=this.z.redSqr(),P=_.toRed(this.curve.red).redMul(A);if(0===this.x.cmp(P))return!0;for(var x=_.clone(),T=this.curve.redN.redMul(A);;){if(x.iadd(this.curve.n),x.cmp(this.curve.p)>=0)return!1;if(P.redIAdd(T),0===this.x.cmp(P))return!0}},b.prototype.inspect=function(){return this.isInfinity()?"":""},b.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},52916:(ne,s,p)=>{"use strict";var b,h=s,M=p(37084),w=p(46270),l=p(61970).assert;function m(S){"short"===S.type?this.curve=new w.short(S):"edwards"===S.type?this.curve=new w.edwards(S):this.curve=new w.mont(S),this.g=this.curve.g,this.n=this.curve.n,this.hash=S.hash,l(this.g.validate(),"Invalid curve"),l(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function y(S,_){Object.defineProperty(h,S,{configurable:!0,enumerable:!0,get:function(){var A=new m(_);return Object.defineProperty(h,S,{configurable:!0,enumerable:!0,value:A}),A}})}h.PresetCurve=m,y("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:M.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),y("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:M.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),y("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:M.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),y("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:M.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"]}),y("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:M.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"]}),y("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:M.sha256,gRed:!1,g:["9"]}),y("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:M.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{b=p(25150)}catch{b=void 0}y("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:M.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",b]})},67626:(ne,s,p)=>{"use strict";var h=p(17433),M=p(52438),w=p(61970),E=p(52916),l=p(37950),m=w.assert,y=p(91259),b=p(65957);function S(_){if(!(this instanceof S))return new S(_);"string"==typeof _&&(m(Object.prototype.hasOwnProperty.call(E,_),"Unknown curve "+_),_=E[_]),_ instanceof E.PresetCurve&&(_={curve:_}),this.curve=_.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=_.curve.g,this.g.precompute(_.curve.n.bitLength()+1),this.hash=_.hash||_.curve.hash}ne.exports=S,S.prototype.keyPair=function(A){return new y(this,A)},S.prototype.keyFromPrivate=function(A,P){return y.fromPrivate(this,A,P)},S.prototype.keyFromPublic=function(A,P){return y.fromPublic(this,A,P)},S.prototype.genKeyPair=function(A){A||(A={});for(var P=new M({hash:this.hash,pers:A.pers,persEnc:A.persEnc||"utf8",entropy:A.entropy||l(this.hash.hmacStrength),entropyEnc:A.entropy&&A.entropyEnc||"utf8",nonce:this.n.toArray()}),x=this.n.byteLength(),T=this.n.sub(new h(2));;){var L=new h(P.generate(x));if(!(L.cmp(T)>0))return L.iaddn(1),this.keyFromPrivate(L)}},S.prototype._truncateToN=function(A,P){var x=8*A.byteLength()-this.n.bitLength();return x>0&&(A=A.ushrn(x)),!P&&A.cmp(this.n)>=0?A.sub(this.n):A},S.prototype.sign=function(A,P,x,T){"object"==typeof x&&(T=x,x=null),T||(T={}),P=this.keyFromPrivate(P,x),A=this._truncateToN(new h(A,16));for(var L=this.n.byteLength(),N=P.getPrivate().toArray("be",L),j=A.toArray("be",L),B=new M({hash:this.hash,entropy:N,nonce:j,pers:T.pers,persEnc:T.persEnc||"utf8"}),V=this.n.sub(new h(1)),G=0;;G++){var W=T.k?T.k(G):new h(B.generate(this.n.byteLength()));if(!((W=this._truncateToN(W,!0)).cmpn(1)<=0||W.cmp(V)>=0)){var Q=this.g.mul(W);if(!Q.isInfinity()){var q=Q.getX(),J=q.umod(this.n);if(0!==J.cmpn(0)){var Z=W.invm(this.n).mul(J.mul(P.getPrivate()).iadd(A));if(0!==(Z=Z.umod(this.n)).cmpn(0)){var ee=(Q.getY().isOdd()?1:0)|(0!==q.cmp(J)?2:0);return T.canonical&&Z.cmp(this.nh)>0&&(Z=this.n.sub(Z),ee^=1),new b({r:J,s:Z,recoveryParam:ee})}}}}}},S.prototype.verify=function(A,P,x,T){A=this._truncateToN(new h(A,16)),x=this.keyFromPublic(x,T);var L=(P=new b(P,"hex")).r,N=P.s;if(L.cmpn(1)<0||L.cmp(this.n)>=0||N.cmpn(1)<0||N.cmp(this.n)>=0)return!1;var G,j=N.invm(this.n),B=j.mul(A).umod(this.n),V=j.mul(L).umod(this.n);return this.curve._maxwellTrick?!(G=this.g.jmulAdd(B,x.getPublic(),V)).isInfinity()&&G.eqXToP(L):!(G=this.g.mulAdd(B,x.getPublic(),V)).isInfinity()&&0===G.getX().umod(this.n).cmp(L)},S.prototype.recoverPubKey=function(_,A,P,x){m((3&P)===P,"The recovery param is more than two bits"),A=new b(A,x);var T=this.n,L=new h(_),N=A.r,j=A.s,B=1&P,V=P>>1;if(N.cmp(this.curve.p.umod(this.curve.n))>=0&&V)throw new Error("Unable to find sencond key candinate");N=V?this.curve.pointFromX(N.add(this.curve.n),B):this.curve.pointFromX(N,B);var G=A.r.invm(T),W=T.sub(L).mul(G).umod(T),Q=j.mul(G).umod(T);return this.g.mulAdd(W,N,Q)},S.prototype.getKeyRecoveryParam=function(_,A,P,x){if(null!==(A=new b(A,x)).recoveryParam)return A.recoveryParam;for(var T=0;T<4;T++){var L;try{L=this.recoverPubKey(_,A,T)}catch{continue}if(L.eq(P))return T}throw new Error("Unable to find valid recovery factor")}},91259:(ne,s,p)=>{"use strict";var h=p(17433),w=p(61970).assert;function E(l,m){this.ec=l,this.priv=null,this.pub=null,m.priv&&this._importPrivate(m.priv,m.privEnc),m.pub&&this._importPublic(m.pub,m.pubEnc)}ne.exports=E,E.fromPublic=function(m,y,b){return y instanceof E?y:new E(m,{pub:y,pubEnc:b})},E.fromPrivate=function(m,y,b){return y instanceof E?y:new E(m,{priv:y,privEnc:b})},E.prototype.validate=function(){var m=this.getPublic();return m.isInfinity()?{result:!1,reason:"Invalid public key"}:m.validate()?m.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"}},E.prototype.getPublic=function(m,y){return"string"==typeof m&&(y=m,m=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),y?this.pub.encode(y,m):this.pub},E.prototype.getPrivate=function(m){return"hex"===m?this.priv.toString(16,2):this.priv},E.prototype._importPrivate=function(m,y){this.priv=new h(m,y||16),this.priv=this.priv.umod(this.ec.curve.n)},E.prototype._importPublic=function(m,y){if(m.x||m.y)return"mont"===this.ec.curve.type?w(m.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&w(m.x&&m.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(m.x,m.y));this.pub=this.ec.curve.decodePoint(m,y)},E.prototype.derive=function(m){return m.validate()||w(m.validate(),"public point not validated"),m.mul(this.priv).getX()},E.prototype.sign=function(m,y,b){return this.ec.sign(m,this,y,b)},E.prototype.verify=function(m,y){return this.ec.verify(m,y,this)},E.prototype.inspect=function(){return""}},65957:(ne,s,p)=>{"use strict";var h=p(17433),M=p(61970),w=M.assert;function E(S,_){if(S instanceof E)return S;this._importDER(S,_)||(w(S.r&&S.s,"Signature without r or s"),this.r=new h(S.r,16),this.s=new h(S.s,16),void 0===S.recoveryParam?this.recoveryParam=null:this.recoveryParam=S.recoveryParam)}function l(){this.place=0}function m(S,_){var A=S[_.place++];if(!(128&A))return A;var P=15&A;if(0===P||P>4)return!1;for(var x=0,T=0,L=_.place;T>>=0;return!(x<=127)&&(_.place=L,x)}function y(S){for(var _=0,A=S.length-1;!S[_]&&!(128&S[_+1])&&_>>3);for(S.push(128|A);--A;)S.push(_>>>(A<<3)&255);S.push(_)}}ne.exports=E,E.prototype._importDER=function(_,A){_=M.toArray(_,A);var P=new l;if(48!==_[P.place++])return!1;var x=m(_,P);if(!1===x||x+P.place!==_.length||2!==_[P.place++])return!1;var T=m(_,P);if(!1===T)return!1;var L=_.slice(P.place,T+P.place);if(P.place+=T,2!==_[P.place++])return!1;var N=m(_,P);if(!1===N||_.length!==N+P.place)return!1;var j=_.slice(P.place,N+P.place);if(0===L[0]){if(!(128&L[1]))return!1;L=L.slice(1)}if(0===j[0]){if(!(128&j[1]))return!1;j=j.slice(1)}return this.r=new h(L),this.s=new h(j),this.recoveryParam=null,!0},E.prototype.toDER=function(_){var A=this.r.toArray(),P=this.s.toArray();for(128&A[0]&&(A=[0].concat(A)),128&P[0]&&(P=[0].concat(P)),A=y(A),P=y(P);!(P[0]||128&P[1]);)P=P.slice(1);var x=[2];b(x,A.length),(x=x.concat(A)).push(2),b(x,P.length);var T=x.concat(P),L=[48];return b(L,T.length),L=L.concat(T),M.encode(L,_)}},81885:(ne,s,p)=>{"use strict";var h=p(37084),M=p(52916),w=p(61970),E=w.assert,l=w.parseBytes,m=p(97535),y=p(88241);function b(S){if(E("ed25519"===S,"only tested with ed25519 so far"),!(this instanceof b))return new b(S);S=M[S].curve,this.curve=S,this.g=S.g,this.g.precompute(S.n.bitLength()+1),this.pointClass=S.point().constructor,this.encodingLength=Math.ceil(S.n.bitLength()/8),this.hash=h.sha512}ne.exports=b,b.prototype.sign=function(_,A){_=l(_);var P=this.keyFromSecret(A),x=this.hashInt(P.messagePrefix(),_),T=this.g.mul(x),L=this.encodePoint(T),N=this.hashInt(L,P.pubBytes(),_).mul(P.priv()),j=x.add(N).umod(this.curve.n);return this.makeSignature({R:T,S:j,Rencoded:L})},b.prototype.verify=function(_,A,P){_=l(_),A=this.makeSignature(A);var x=this.keyFromPublic(P),T=this.hashInt(A.Rencoded(),x.pubBytes(),_),L=this.g.mul(A.S());return A.R().add(x.pub().mul(T)).eq(L)},b.prototype.hashInt=function(){for(var _=this.hash(),A=0;A{"use strict";var h=p(61970),M=h.assert,w=h.parseBytes,E=h.cachedProperty;function l(m,y){this.eddsa=m,this._secret=w(y.secret),m.isPoint(y.pub)?this._pub=y.pub:this._pubBytes=w(y.pub)}l.fromPublic=function(y,b){return b instanceof l?b:new l(y,{pub:b})},l.fromSecret=function(y,b){return b instanceof l?b:new l(y,{secret:b})},l.prototype.secret=function(){return this._secret},E(l,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),E(l,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),E(l,"privBytes",function(){var y=this.eddsa,b=this.hash(),S=y.encodingLength-1,_=b.slice(0,y.encodingLength);return _[0]&=248,_[S]&=127,_[S]|=64,_}),E(l,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),E(l,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),E(l,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),l.prototype.sign=function(y){return M(this._secret,"KeyPair can only verify"),this.eddsa.sign(y,this)},l.prototype.verify=function(y,b){return this.eddsa.verify(y,b,this)},l.prototype.getSecret=function(y){return M(this._secret,"KeyPair is public only"),h.encode(this.secret(),y)},l.prototype.getPublic=function(y){return h.encode(this.pubBytes(),y)},ne.exports=l},88241:(ne,s,p)=>{"use strict";var h=p(17433),M=p(61970),w=M.assert,E=M.cachedProperty,l=M.parseBytes;function m(y,b){this.eddsa=y,"object"!=typeof b&&(b=l(b)),Array.isArray(b)&&(b={R:b.slice(0,y.encodingLength),S:b.slice(y.encodingLength)}),w(b.R&&b.S,"Signature without R or S"),y.isPoint(b.R)&&(this._R=b.R),b.S instanceof h&&(this._S=b.S),this._Rencoded=Array.isArray(b.R)?b.R:b.Rencoded,this._Sencoded=Array.isArray(b.S)?b.S:b.Sencoded}E(m,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),E(m,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),E(m,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),E(m,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),m.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},m.prototype.toHex=function(){return M.encode(this.toBytes(),"hex").toUpperCase()},ne.exports=m},25150:ne=>{ne.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"]]}}},61970:(ne,s,p)=>{"use strict";var h=s,M=p(17433),w=p(32391),E=p(58195);h.assert=w,h.toArray=E.toArray,h.zero2=E.zero2,h.toHex=E.toHex,h.encode=E.encode,h.getNAF=function l(_,A,P){var x=new Array(Math.max(_.bitLength(),P)+1);x.fill(0);for(var T=1<(T>>1)-1?(T>>1)-B:B,L.isubn(j)):j=0,x[N]=j,L.iushrn(1)}return x},h.getJSF=function m(_,A){var P=[[],[]];_=_.clone(),A=A.clone();for(var L,x=0,T=0;_.cmpn(-x)>0||A.cmpn(-T)>0;){var B,V,N=_.andln(3)+x&3,j=A.andln(3)+T&3;3===N&&(N=-1),3===j&&(j=-1),1&N?B=3!==(L=_.andln(7)+x&7)&&5!==L||2!==j?N:-N:B=0,P[0].push(B),1&j?V=3!==(L=A.andln(7)+T&7)&&5!==L||2!==N?j:-j:V=0,P[1].push(V),2*x===B+1&&(x=1-x),2*T===V+1&&(T=1-T),_.iushrn(1),A.iushrn(1)}return P},h.cachedProperty=function y(_,A,P){var x="_"+A;_.prototype[A]=function(){return void 0!==this[x]?this[x]:this[x]=P.call(this)}},h.parseBytes=function b(_){return"string"==typeof _?h.toArray(_,"hex"):_},h.intFromLE=function S(_){return new M(_,"hex","le")}},17433:function(ne,s,p){(function(h,M){"use strict";function w(I,o){if(!I)throw new Error(o||"Assertion failed")}function E(I,o){I.super_=o;var a=function(){};a.prototype=o.prototype,I.prototype=new a,I.prototype.constructor=I}function l(I,o,a){if(l.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,null!==I&&(("le"===o||"be"===o)&&(a=o,o=10),this._init(I||0,o||10,a||"be"))}var m;"object"==typeof h?h.exports=l:M.BN=l,l.BN=l,l.wordSize=26;try{m=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:p(85568).Buffer}catch{}function y(I,o){var a=I.charCodeAt(o);return a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function b(I,o,a){var d=y(I,a);return a-1>=o&&(d|=y(I,a-1)<<4),d}function S(I,o,a,d){for(var g=0,D=Math.min(I.length,a),F=o;F=49?z-49+10:z>=17?z-17+10:z}return g}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,a){return o.cmp(a)>0?o:a},l.min=function(o,a){return o.cmp(a)<0?o:a},l.prototype._init=function(o,a,d){if("number"==typeof o)return this._initNumber(o,a,d);if("object"==typeof o)return this._initArray(o,a,d);"hex"===a&&(a=16),w(a===(0|a)&&a>=2&&a<=36);var g=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(g++,this.negative=1),g=0;g-=3)F=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[D]|=F<>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);else if("le"===d)for(g=0,D=0;g>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);return this.strip()},l.prototype._parseHex=function(o,a,d){this.length=Math.ceil((o.length-a)/6),this.words=new Array(this.length);for(var g=0;g=a;g-=2)z=b(o,a,g)<=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;else for(g=(o.length-a)%2==0?a+1:a;g=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;this.strip()},l.prototype._parseBase=function(o,a,d){this.words=[0],this.length=1;for(var g=0,D=1;D<=67108863;D*=a)g++;g--,D=D/a|0;for(var F=o.length-d,z=F%g,C=Math.min(F,F-z)+d,f=0,k=d;k1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var _=["","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"],A=[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 T(I,o,a){a.negative=o.negative^I.negative;var d=I.length+o.length|0;a.length=d,d=d-1|0;var g=0|I.words[0],D=0|o.words[0],F=g*D,z=67108863&F,C=F/67108864|0;a.words[0]=z;for(var f=1;f>>26,se=67108863&C,te=Math.min(f,o.length-1),oe=Math.max(0,f-I.length+1);oe<=te;oe++){var de=f-oe|0;k+=(F=(g=0|I.words[de])*(D=0|o.words[oe])+se)/67108864|0,se=67108863&F}a.words[f]=0|se,C=0|k}return 0!==C?a.words[f]=0|C:a.length--,a.strip()}l.prototype.toString=function(o,a){var d;if(a=0|a||1,16===(o=o||10)||"hex"===o){d="";for(var g=0,D=0,F=0;F>>24-g&16777215)||F!==this.length-1?_[6-C.length]+C+d:C+d,(g+=2)>=26&&(g-=26,F--)}for(0!==D&&(d=D.toString(16)+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],k=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(k).toString(o);d=(se=se.idivn(k)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,a){return w(typeof m<"u"),this.toArrayLike(m,o,a)},l.prototype.toArray=function(o,a){return this.toArrayLike(Array,o,a)},l.prototype.toArrayLike=function(o,a,d){var g=this.byteLength(),D=d||Math.max(1,g);w(g<=D,"byte array longer than desired length"),w(D>0,"Requested array length <= 0"),this.strip();var C,f,F="le"===a,z=new o(D),k=this.clone();if(F){for(f=0;!k.isZero();f++)C=k.andln(255),k.iushrn(8),z[f]=C;for(;f=4096&&(d+=13,a>>>=13),a>=64&&(d+=7,a>>>=7),a>=8&&(d+=4,a>>>=4),a>=2&&(d+=2,a>>>=2),d+a},l.prototype._zeroBits=function(o){if(0===o)return 26;var a=o,d=0;return 8191&a||(d+=13,a>>>=13),127&a||(d+=7,a>>>=7),15&a||(d+=4,a>>>=4),3&a||(d+=2,a>>>=2),1&a||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],a=this._countBits(o);return 26*(this.length-1)+a},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,a=0;ao.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var a;a=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var a,d;this.length>o.length?(a=this,d=o):(a=o,d=this);for(var g=0;go.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var a=0|Math.ceil(o/26),d=o%26;this._expand(a),d>0&&a--;for(var g=0;g0&&(this.words[g]=~this.words[g]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,a){w("number"==typeof o&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),this.words[d]=a?this.words[d]|1<o.length?(d=this,g=o):(d=o,g=this);for(var D=0,F=0;F>>26;for(;0!==D&&F>>26;if(this.length=d.length,0!==D)this.words[this.length]=D,this.length++;else if(d!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var a=this.iadd(o);return o.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var g,D,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(g=this,D=o):(g=o,D=this);for(var F=0,z=0;z>26,this.words[z]=67108863&a;for(;0!==F&&z>26,this.words[z]=67108863&a;if(0===F&&z>>13,de=0|g[1],Ie=8191&de,ye=de>>>13,ve=0|g[2],ae=8191&ve,fe=ve>>>13,pe=0|g[3],Se=8191&pe,ce=pe>>>13,be=0|g[4],Ne=8191&be,Fe=be>>>13,lt=0|g[5],Ge=8191<,He=lt>>>13,Kt=0|g[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|g[7],ot=8191&Vt,at=Vt>>>13,Gt=0|g[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|g[9],Be=8191&Te,Ve=Te>>>13,mt=0|D[0],Ze=8191&mt,ct=mt>>>13,hn=0|D[1],ft=8191&hn,At=hn>>>13,wn=0|D[2],ze=8191&wn,Qe=wn>>>13,Ht=0|D[3],pt=8191&Ht,vt=Ht>>>13,$t=0|D[4],dt=8191&$t,gt=$t>>>13,mn=0|D[5],ut=8191&mn,wt=mn>>>13,Sn=0|D[6],yt=8191&Sn,Et=Sn>>>13,_e=0|D[7],Ee=8191&_e,Me=_e>>>13,me=0|D[8],Oe=8191&me,Ke=me>>>13,it=0|D[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^a.negative,d.length=19;var Bt=(z+(C=Math.imul(te,Ze))|0)+((8191&(f=(f=Math.imul(te,ct))+Math.imul(oe,Ze)|0))<<13)|0;z=((k=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,C=Math.imul(Ie,Ze),f=(f=Math.imul(Ie,ct))+Math.imul(ye,Ze)|0,k=Math.imul(ye,ct);var It=(z+(C=C+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(oe,ft)|0))<<13)|0;z=((k=k+Math.imul(oe,At)|0)+(f>>>13)|0)+(It>>>26)|0,It&=67108863,C=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,k=Math.imul(fe,ct),C=C+Math.imul(Ie,ft)|0,f=(f=f+Math.imul(Ie,At)|0)+Math.imul(ye,ft)|0,k=k+Math.imul(ye,At)|0;var kt=(z+(C=C+Math.imul(te,ze)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;z=((k=k+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,C=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,k=Math.imul(ce,ct),C=C+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,k=k+Math.imul(fe,At)|0,C=C+Math.imul(Ie,ze)|0,f=(f=f+Math.imul(Ie,Qe)|0)+Math.imul(ye,ze)|0,k=k+Math.imul(ye,Qe)|0;var Ot=(z+(C=C+Math.imul(te,pt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;z=((k=k+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,C=Math.imul(Ne,Ze),f=(f=Math.imul(Ne,ct))+Math.imul(Fe,Ze)|0,k=Math.imul(Fe,ct),C=C+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,k=k+Math.imul(ce,At)|0,C=C+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,k=k+Math.imul(fe,Qe)|0,C=C+Math.imul(Ie,pt)|0,f=(f=f+Math.imul(Ie,vt)|0)+Math.imul(ye,pt)|0,k=k+Math.imul(ye,vt)|0;var Nt=(z+(C=C+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;z=((k=k+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,C=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,k=Math.imul(He,ct),C=C+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,ft)|0,k=k+Math.imul(Fe,At)|0,C=C+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,k=k+Math.imul(ce,Qe)|0,C=C+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,k=k+Math.imul(fe,vt)|0,C=C+Math.imul(Ie,dt)|0,f=(f=f+Math.imul(Ie,gt)|0)+Math.imul(ye,dt)|0,k=k+Math.imul(ye,gt)|0;var Lt=(z+(C=C+Math.imul(te,ut)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;z=((k=k+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,C=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,k=Math.imul(nt,ct),C=C+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,k=k+Math.imul(He,At)|0,C=C+Math.imul(Ne,ze)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,ze)|0,k=k+Math.imul(Fe,Qe)|0,C=C+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,k=k+Math.imul(ce,vt)|0,C=C+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,k=k+Math.imul(fe,gt)|0,C=C+Math.imul(Ie,ut)|0,f=(f=f+Math.imul(Ie,wt)|0)+Math.imul(ye,ut)|0,k=k+Math.imul(ye,wt)|0;var nn=(z+(C=C+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;z=((k=k+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,k=Math.imul(at,ct),C=C+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,k=k+Math.imul(nt,At)|0,C=C+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,k=k+Math.imul(He,Qe)|0,C=C+Math.imul(Ne,pt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,pt)|0,k=k+Math.imul(Fe,vt)|0,C=C+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,k=k+Math.imul(ce,gt)|0,C=C+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,k=k+Math.imul(fe,wt)|0,C=C+Math.imul(Ie,yt)|0,f=(f=f+Math.imul(Ie,Et)|0)+Math.imul(ye,yt)|0,k=k+Math.imul(ye,Et)|0;var Yt=(z+(C=C+Math.imul(te,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(te,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;z=((k=k+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,C=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,k=Math.imul(Ae,ct),C=C+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,k=k+Math.imul(at,At)|0,C=C+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,k=k+Math.imul(nt,Qe)|0,C=C+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,k=k+Math.imul(He,vt)|0,C=C+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,dt)|0,k=k+Math.imul(Fe,gt)|0,C=C+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,k=k+Math.imul(ce,wt)|0,C=C+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,k=k+Math.imul(fe,Et)|0,C=C+Math.imul(Ie,Ee)|0,f=(f=f+Math.imul(Ie,Me)|0)+Math.imul(ye,Ee)|0,k=k+Math.imul(ye,Me)|0;var gn=(z+(C=C+Math.imul(te,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;z=((k=k+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,C=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,k=Math.imul(Ve,ct),C=C+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,k=k+Math.imul(Ae,At)|0,C=C+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,k=k+Math.imul(at,Qe)|0,C=C+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,k=k+Math.imul(nt,vt)|0,C=C+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,k=k+Math.imul(He,gt)|0,C=C+Math.imul(Ne,ut)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ut)|0,k=k+Math.imul(Fe,wt)|0,C=C+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,k=k+Math.imul(ce,Et)|0,C=C+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,k=k+Math.imul(fe,Me)|0,C=C+Math.imul(Ie,Oe)|0,f=(f=f+Math.imul(Ie,Ke)|0)+Math.imul(ye,Oe)|0,k=k+Math.imul(ye,Ke)|0;var an=(z+(C=C+Math.imul(te,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;z=((k=k+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,C=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,k=Math.imul(Ve,At),C=C+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,k=k+Math.imul(Ae,Qe)|0,C=C+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,k=k+Math.imul(at,vt)|0,C=C+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,k=k+Math.imul(nt,gt)|0,C=C+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,k=k+Math.imul(He,wt)|0,C=C+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,Et)|0)+Math.imul(Fe,yt)|0,k=k+Math.imul(Fe,Et)|0,C=C+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,k=k+Math.imul(ce,Me)|0,C=C+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,k=k+Math.imul(fe,Ke)|0;var tn=(z+(C=C+Math.imul(Ie,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ie,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;z=((k=k+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,k=Math.imul(Ve,Qe),C=C+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,k=k+Math.imul(Ae,vt)|0,C=C+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,k=k+Math.imul(at,gt)|0,C=C+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,k=k+Math.imul(nt,wt)|0,C=C+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,k=k+Math.imul(He,Et)|0,C=C+Math.imul(Ne,Ee)|0,f=(f=f+Math.imul(Ne,Me)|0)+Math.imul(Fe,Ee)|0,k=k+Math.imul(Fe,Me)|0,C=C+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,k=k+Math.imul(ce,Ke)|0;var Ut=(z+(C=C+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,C=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,k=Math.imul(Ve,vt),C=C+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,k=k+Math.imul(Ae,gt)|0,C=C+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,k=k+Math.imul(at,wt)|0,C=C+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,k=k+Math.imul(nt,Et)|0,C=C+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,k=k+Math.imul(He,Me)|0,C=C+Math.imul(Ne,Oe)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,Oe)|0,k=k+Math.imul(Fe,Ke)|0;var cn=(z+(C=C+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;z=((k=k+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,C=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,k=Math.imul(Ve,gt),C=C+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,k=k+Math.imul(Ae,wt)|0,C=C+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,k=k+Math.imul(at,Et)|0,C=C+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,k=k+Math.imul(nt,Me)|0,C=C+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,k=k+Math.imul(He,Ke)|0;var Jt=(z+(C=C+Math.imul(Ne,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,C=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,k=Math.imul(Ve,wt),C=C+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,k=k+Math.imul(Ae,Et)|0,C=C+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,k=k+Math.imul(at,Me)|0,C=C+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,k=k+Math.imul(nt,Ke)|0;var Zt=(z+(C=C+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;z=((k=k+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,C=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,k=Math.imul(Ve,Et),C=C+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,k=k+Math.imul(Ae,Me)|0,C=C+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,k=k+Math.imul(at,Ke)|0;var fn=(z+(C=C+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;z=((k=k+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,C=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,k=Math.imul(Ve,Me),C=C+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,k=k+Math.imul(Ae,Ke)|0;var Qt=(z+(C=C+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;z=((k=k+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,C=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,k=Math.imul(Ve,Ke);var Dt=(z+(C=C+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;z=((k=k+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(z+(C=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return z=((k=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,F[0]=Bt,F[1]=It,F[2]=kt,F[3]=Ot,F[4]=Nt,F[5]=Lt,F[6]=nn,F[7]=Yt,F[8]=gn,F[9]=an,F[10]=tn,F[11]=Ut,F[12]=cn,F[13]=Jt,F[14]=Zt,F[15]=fn,F[16]=Qt,F[17]=Dt,F[18]=Mt,0!==z&&(F[19]=z,d.length++),d};function j(I,o,a){return(new B).mulp(I,o,a)}function B(I,o){this.x=I,this.y=o}Math.imul||(L=T),l.prototype.mulTo=function(o,a){var d,g=this.length+o.length;return d=10===this.length&&10===o.length?L(this,o,a):g<63?T(this,o,a):g<1024?function N(I,o,a){a.negative=o.negative^I.negative,a.length=I.length+o.length;for(var d=0,g=0,D=0;D>>26)|0)>>>26,F&=67108863}a.words[D]=z,d=F,F=g}return 0!==d?a.words[D]=d:a.length--,a.strip()}(this,o,a):j(this,o,a),d},B.prototype.makeRBT=function(o){for(var a=new Array(o),d=l.prototype._countBits(o)-1,g=0;g>=1;return g},B.prototype.permute=function(o,a,d,g,D,F){for(var z=0;z>>=1)D++;return 1<>>=13,d[2*F+1]=8191&D,D>>>=13;for(F=2*a;F>=26,a+=g/67108864|0,a+=D>>>26,this.words[d]=67108863&D}return 0!==a&&(this.words[d]=a,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var a=function x(I){for(var o=new Array(I.bitLength()),a=0;a>>g}return o}(o);if(0===a.length)return new l(1);for(var d=this,g=0;g=0);var D,a=o%26,d=(o-a)/26,g=67108863>>>26-a<<26-a;if(0!==a){var F=0;for(D=0;D>>26-a}F&&(this.words[D]=F,this.length++)}if(0!==d){for(D=this.length-1;D>=0;D--)this.words[D+d]=this.words[D];for(D=0;D=0),g=a?(a-a%26)/26:0;var D=o%26,F=Math.min((o-D)/26,this.length),z=67108863^67108863>>>D<F)for(this.length-=F,f=0;f=0&&(0!==k||f>=g);f--){var se=0|this.words[f];this.words[f]=k<<26-D|se>>>D,k=se&z}return C&&0!==k&&(C.words[C.length++]=k),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,a,d){return w(0===this.negative),this.iushrn(o,a,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var a=o%26,d=(o-a)/26,g=1<=0);var a=o%26,d=(o-a)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==a&&d++,this.length=Math.min(d,this.length),0!==a){var g=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(C/67108864|0),this.words[D+d]=67108863&F}for(;D>26,this.words[D+d]=67108863&F;if(0===z)return this.strip();for(w(-1===z),z=0,D=0;D>26,this.words[D]=67108863&F;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,a){var d=(this.length,o.length),g=this.clone(),D=o,F=0|D.words[D.length-1];0!==(d=26-this._countBits(F))&&(D=D.ushln(d),g.iushln(d),F=0|D.words[D.length-1]);var f,C=g.length-D.length;if("mod"!==a){(f=new l(null)).length=C+1,f.words=new Array(f.length);for(var k=0;k=0;te--){var oe=67108864*(0|g.words[D.length+te])+(0|g.words[D.length+te-1]);for(oe=Math.min(oe/F|0,67108863),g._ishlnsubmul(D,oe,te);0!==g.negative;)oe--,g.negative=0,g._ishlnsubmul(D,1,te),g.isZero()||(g.negative^=1);f&&(f.words[te]=oe)}return f&&f.strip(),g.strip(),"div"!==a&&0!==d&&g.iushrn(d),{div:f||null,mod:g}},l.prototype.divmod=function(o,a,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,a),"mod"!==a&&(g=F.div.neg()),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.iadd(o)),{div:g,mod:D}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),a),"mod"!==a&&(g=F.div.neg()),{div:g,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),a),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.isub(o)),{div:F.div,mod:D}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===a?{div:this.divn(o.words[0]),mod:null}:"mod"===a?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,a);var g,D,F},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var a=this.divmod(o);if(a.mod.isZero())return a.div;var d=0!==a.div.negative?a.mod.isub(o):a.mod,g=o.ushrn(1),D=o.andln(1),F=d.cmp(g);return F<0||1===D&&0===F?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var a=(1<<26)%o,d=0,g=this.length-1;g>=0;g--)d=(a*d+(0|this.words[g]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var a=0,d=this.length-1;d>=0;d--){var g=(0|this.words[d])+67108864*a;this.words[d]=g/o|0,a=g%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=new l(0),z=new l(1),C=0;a.isEven()&&d.isEven();)a.iushrn(1),d.iushrn(1),++C;for(var f=d.clone(),k=a.clone();!a.isZero();){for(var se=0,te=1;!(a.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(a.iushrn(se);se-- >0;)(g.isOdd()||D.isOdd())&&(g.iadd(f),D.isub(k)),g.iushrn(1),D.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(F.isOdd()||z.isOdd())&&(F.iadd(f),z.isub(k)),F.iushrn(1),z.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(F),D.isub(z)):(d.isub(a),F.isub(g),z.isub(D))}return{a:F,b:z,gcd:d.iushln(C)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=d.clone();a.cmpn(1)>0&&d.cmpn(1)>0;){for(var z=0,C=1;!(a.words[0]&C)&&z<26;++z,C<<=1);if(z>0)for(a.iushrn(z);z-- >0;)g.isOdd()&&g.iadd(F),g.iushrn(1);for(var f=0,k=1;!(d.words[0]&k)&&f<26;++f,k<<=1);if(f>0)for(d.iushrn(f);f-- >0;)D.isOdd()&&D.iadd(F),D.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(D)):(d.isub(a),D.isub(g))}return(se=0===a.cmpn(1)?g:D).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var a=this.clone(),d=o.clone();a.negative=0,d.negative=0;for(var g=0;a.isEven()&&d.isEven();g++)a.iushrn(1),d.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;d.isEven();)d.iushrn(1);var D=a.cmp(d);if(D<0){var F=a;a=d,d=F}else if(0===D||0===d.cmpn(1))break;a.isub(d)}return d.iushln(g)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var a=o%26,d=(o-a)/26,g=1<>>26,z&=67108863,this.words[F]=z}return 0!==D&&(this.words[F]=D,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,a=o<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)d=1;else{a&&(o=-o),w(o<=67108863,"Number is too big");var g=0|this.words[0];d=g===o?0:go.length)return 1;if(this.length=0;d--){var g=0|this.words[d],D=0|o.words[d];if(g!==D){gD&&(a=1);break}}return a},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new Z(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var V={k256:null,p224:null,p192:null,p25519:null};function G(I,o){this.name=I,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function W(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Z(I){if("string"==typeof I){var o=l._prime(I);this.m=o.p,this.prime=o}else w(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}function ee(I){Z.call(this,I),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}G.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},G.prototype.ireduce=function(o){var d,a=o;do{this.split(a,this.tmp),d=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(d>this.n);var g=d0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},G.prototype.split=function(o,a){o.iushrn(this.n,0,a)},G.prototype.imulK=function(o){return o.imul(this.k)},E(W,G),W.prototype.split=function(o,a){for(var d=4194303,g=Math.min(o.length,9),D=0;D>>22,F=z}F>>>=22,o.words[D-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},W.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var a=0,d=0;d>>=26,o.words[d]=D,a=g}return 0!==a&&(o.words[o.length++]=a),o},l._prime=function(o){if(V[o])return V[o];var a;if("k256"===o)a=new W;else if("p224"===o)a=new Q;else if("p192"===o)a=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);a=new J}return V[o]=a,a},Z.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},Z.prototype._verify2=function(o,a){w(0==(o.negative|a.negative),"red works only with positives"),w(o.red&&o.red===a.red,"red works only with red numbers")},Z.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},Z.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},Z.prototype.add=function(o,a){this._verify2(o,a);var d=o.add(a);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},Z.prototype.iadd=function(o,a){this._verify2(o,a);var d=o.iadd(a);return d.cmp(this.m)>=0&&d.isub(this.m),d},Z.prototype.sub=function(o,a){this._verify2(o,a);var d=o.sub(a);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},Z.prototype.isub=function(o,a){this._verify2(o,a);var d=o.isub(a);return d.cmpn(0)<0&&d.iadd(this.m),d},Z.prototype.shl=function(o,a){return this._verify1(o),this.imod(o.ushln(a))},Z.prototype.imul=function(o,a){return this._verify2(o,a),this.imod(o.imul(a))},Z.prototype.mul=function(o,a){return this._verify2(o,a),this.imod(o.mul(a))},Z.prototype.isqr=function(o){return this.imul(o,o.clone())},Z.prototype.sqr=function(o){return this.mul(o,o)},Z.prototype.sqrt=function(o){if(o.isZero())return o.clone();var a=this.m.andln(3);if(w(a%2==1),3===a){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),D=0;!g.isZero()&&0===g.andln(1);)D++,g.iushrn(1);w(!g.isZero());var F=new l(1).toRed(this),z=F.redNeg(),C=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,C).cmp(z);)f.redIAdd(z);for(var k=this.pow(f,g),se=this.pow(o,g.addn(1).iushrn(1)),te=this.pow(o,g),oe=D;0!==te.cmp(F);){for(var de=te,Ie=0;0!==de.cmp(F);Ie++)de=de.redSqr();w(Ie=0;D--){for(var k=a.words[D],se=f-1;se>=0;se--){var te=k>>se&1;(F!==g[0]&&(F=this.sqr(F)),0!==te||0!==z)?(z<<=1,z|=te,(4===++C||0===D&&0===se)&&(F=this.mul(F,g[z]),C=0,z=0)):C=0}f=26}return F},Z.prototype.convertTo=function(o){var a=o.umod(this.m);return a===o?a.clone():a},Z.prototype.convertFrom=function(o){var a=o.clone();return a.red=null,a},l.mont=function(o){return new ee(o)},E(ee,Z),ee.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},ee.prototype.convertFrom=function(o){var a=this.imod(o.mul(this.rinv));return a.red=null,a},ee.prototype.imul=function(o,a){if(o.isZero()||a.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.mul=function(o,a){if(o.isZero()||a.isZero())return new l(0)._forceRed(this);var d=o.mul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=p.nmd(ne),this)},38419:ne=>{"use strict";ne.exports=function(p){for(var h=[],M=p.length,w=0;w=55296&&E<=56319&&M>w+1){var l=p.charCodeAt(w+1);l>=56320&&l<=57343&&(E=1024*(E-55296)+l-56320+65536,w+=1)}E<128?h.push(E):E<2048?(h.push(E>>6|192),h.push(63&E|128)):E<55296||E>=57344&&E<65536?(h.push(E>>12|224),h.push(E>>6&63|128),h.push(63&E|128)):E>=65536&&E<=1114111?(h.push(E>>18|240),h.push(E>>12&63|128),h.push(E>>6&63|128),h.push(63&E|128)):h.push(239,191,189)}return new Uint8Array(h).buffer}},69913:(ne,s,p)=>{var h=p(38739);function M(l,m,y){m&&"string"!=typeof m&&(m=m.message||m.name),h(this,{type:l,name:l,cause:"string"!=typeof m?m:y,message:m},"ewr")}function w(l,m){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),M.call(this,"CustomError",l,m)}w.prototype=new Error,ne.exports=function(l){var m=function(y,b){return function E(l,m,y){var b=function(S,_){M.call(this,m,S,_),"FilesystemError"==m&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(l.errno[this.cause.errno]?l.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,b)};return b.prototype=y?new y:new w,b}(l,y,b)};return{CustomError:w,FilesystemError:m("FilesystemError"),createError:m}}},3161:(ne,s,p)=>{var h=ne.exports.all=[{errno:-2,code:"ENOENT",description:"no such file or directory"},{errno:-1,code:"UNKNOWN",description:"unknown error"},{errno:0,code:"OK",description:"success"},{errno:1,code:"EOF",description:"end of file"},{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},{errno:3,code:"EACCES",description:"permission denied"},{errno:4,code:"EAGAIN",description:"resource temporarily unavailable"},{errno:5,code:"EADDRINUSE",description:"address already in use"},{errno:6,code:"EADDRNOTAVAIL",description:"address not available"},{errno:7,code:"EAFNOSUPPORT",description:"address family not supported"},{errno:8,code:"EALREADY",description:"connection already in progress"},{errno:9,code:"EBADF",description:"bad file descriptor"},{errno:10,code:"EBUSY",description:"resource busy or locked"},{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},{errno:12,code:"ECONNREFUSED",description:"connection refused"},{errno:13,code:"ECONNRESET",description:"connection reset by peer"},{errno:14,code:"EDESTADDRREQ",description:"destination address required"},{errno:15,code:"EFAULT",description:"bad address in system call argument"},{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},{errno:17,code:"EINTR",description:"interrupted system call"},{errno:18,code:"EINVAL",description:"invalid argument"},{errno:19,code:"EISCONN",description:"socket is already connected"},{errno:20,code:"EMFILE",description:"too many open files"},{errno:21,code:"EMSGSIZE",description:"message too long"},{errno:22,code:"ENETDOWN",description:"network is down"},{errno:23,code:"ENETUNREACH",description:"network is unreachable"},{errno:24,code:"ENFILE",description:"file table overflow"},{errno:25,code:"ENOBUFS",description:"no buffer space available"},{errno:26,code:"ENOMEM",description:"not enough memory"},{errno:27,code:"ENOTDIR",description:"not a directory"},{errno:28,code:"EISDIR",description:"illegal operation on a directory"},{errno:29,code:"ENONET",description:"machine is not on the network"},{errno:31,code:"ENOTCONN",description:"socket is not connected"},{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},{errno:34,code:"ENOENT",description:"no such file or directory"},{errno:35,code:"ENOSYS",description:"function not implemented"},{errno:36,code:"EPIPE",description:"broken pipe"},{errno:37,code:"EPROTO",description:"protocol error"},{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},{errno:40,code:"ETIMEDOUT",description:"connection timed out"},{errno:41,code:"ECHARSET",description:"invalid Unicode character"},{errno:42,code:"EAIFAMNOSUPPORT",description:"address family for hostname not supported"},{errno:44,code:"EAISERVICE",description:"servname not supported for ai_socktype"},{errno:45,code:"EAISOCKTYPE",description:"ai_socktype not supported"},{errno:46,code:"ESHUTDOWN",description:"cannot send after transport endpoint shutdown"},{errno:47,code:"EEXIST",description:"file already exists"},{errno:48,code:"ESRCH",description:"no such process"},{errno:49,code:"ENAMETOOLONG",description:"name too long"},{errno:50,code:"EPERM",description:"operation not permitted"},{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},{errno:52,code:"EXDEV",description:"cross-device link not permitted"},{errno:53,code:"ENOTEMPTY",description:"directory not empty"},{errno:54,code:"ENOSPC",description:"no space left on device"},{errno:55,code:"EIO",description:"i/o error"},{errno:56,code:"EROFS",description:"read-only file system"},{errno:57,code:"ENODEV",description:"no such device"},{errno:58,code:"ESPIPE",description:"invalid seek"},{errno:59,code:"ECANCELED",description:"operation canceled"}];ne.exports.errno={},ne.exports.code={},h.forEach(function(M){ne.exports.errno[M.errno]=M,ne.exports.code[M.code]=M}),ne.exports.custom=p(69913)(ne.exports),ne.exports.create=ne.exports.custom.createError},38739:function(ne){var p,h;p=this,h=function(){var s="function"==typeof Object.defineProperty?function(M,w,E){return Object.defineProperty(M,w,E),M}:function(M,w,E){return M[w]=E.value,M};return function(M,w,E,l){var m;if(l=function(M,w){var E="object"==typeof w,l=!E&&"string"==typeof w,m=function(y){return E?!!w[y]:!!l&&w.indexOf(y[0])>-1};return{enumerable:m("enumerable"),configurable:m("configurable"),writable:m("writable"),value:M}}(E,l),"object"==typeof w){for(m in w)Object.hasOwnProperty.call(w,m)&&(l.value=w[m],s(M,m,l));return M}return s(M,w,l)}},ne.exports?ne.exports=h():p.prr=h()},4073:(ne,s,p)=>{ne.exports=p(36766)},36766:(ne,s,p)=>{p(53495);var M,h=p(37131);M=h("Error.captureStackTrace")?p(56362):h("Error.prototype.stack")?p(56017):p(63998),ne.exports=M()},52047:(ne,s,p)=>{var h=p(90252).Class,M=p(90252).abstractMethod,w=h(Object,{prototype:{init:h.prototype.merge,frameString:void 0,toString:function(){return this.frameString},functionValue:void 0,getThis:M,getTypeName:M,getFunction:function(){return this.functionValue},getFunctionName:M,getMethodName:M,getFileName:M,getLineNumber:M,getColumnNumber:M,getEvalOrigin:M,isTopLevel:M,isEval:M,isNative:M,isConstructor:M}});ne.exports=w},80916:(ne,s,p)=>{var h=p(90252).Class,M=p(52047),w=p(88074).cache,E=h(Object,{prototype:{stackParser:null,frameParser:null,locationParsers:null,constructor:function(l){h.prototype.merge.call(this,l)},getFrames:function(l,m){for(var y=[],b=0,S=l.length;b{var h=p(90252).Class,M=p(90252).abstractMethod,w=p(88074).eachCombination,E=p(88074).cache,l=p(37131),m=h(Object,{prototype:{captureFrameStrings:function(b){var S=this.createError();b.unshift(this.captureFrameStrings),b.unshift(this.createError);var A=this.getFrameStrings(S).slice(b.length),P=[];if(l("arguments.callee.caller")){var x=[this.createError,this.captureFrameStrings];try{for(var T=arguments.callee;T=T.caller;)x.push(T)}catch{}P=x.slice(b.length)}return{frameStrings:A,functionValues:P}},getFrameStrings:function(b){var S=b.message||"",_=b.name||"",A=this.getStackString(b);if(void 0!==A){var P=A.split("\n"),x=0,T=P.length;return this.hasHeader&&(x+=_.split("\n").length+S.split("\n").length-1),this.hasFooter&&(T-=1),P.slice(x,T)}},createError:M,getStackString:M,hasHeader:void 0,hasFooter:void 0}}),y=h(Object,{prototype:{calibrateClass:function(b){return this.calibrateMethods(b)&&this.calibrateEnvelope(b)},calibrateMethods:function(b){try{w([[function(S){return new Error(S)},function(S){try{throw new Error(S)}catch(_){return _}}],[function(S){return S.stack},function(S){return S.stacktrace}]],function(S,_){if(_(S()))throw{getStackString:_,createError:S}})}catch(S){return h.merge.call(b,{prototype:S}),!0}return!1},calibrateEnvelope:function(b){var P=(0,b.prototype.getStackString)((0,b.prototype.createError)("marker")).split("\n");return h.merge.call(b,{prototype:{hasHeader:/marker/.test(P[0]),hasFooter:""===P[P.length-1]}}),!0}}});ne.exports={getClass:E(function(){var b;if(b)return b;if(b=h(m,{}),!(new y).calibrateClass(b))throw new Error("Cannot read Error.prototype.stack in this environment.");return b}),getInstance:E(function(){return new(this.getClass())})}},56017:(ne,s,p)=>{var h=p(31470),M=p(80916),w=p(88074).cache,E=p(52624);ne.exports=function(){return Error.captureStackTrace=function l(m,y){var S=[l];y&&S.push(y);var _=h.getInstance().captureFrameStrings(S);Object.defineProperties(m,{stack:{configurable:!0,get:w(function(){var A=M.getInstance().getFrames(_.frameStrings,_.functionValues);return(Error.prepareStackTrace||E)(m,A,undefined)})},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})},Error.getStackTrace=function(l){if(l.cachedStack)return l.stack;var b,m=h.getInstance().getFrameStrings(l),y=[];m?y=M.getInstance().getFrames(m,[]):b=["The stack is not readable by unthrown errors in this environment."];var S=(Error.prepareStackTrace||E)(l,y,b);if(m)try{Object.defineProperties(l,{stack:{configurable:!0,writable:!0,enumerable:!1,value:S},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})}catch{}return S},{prepareStackTrace:E}}},52624:ne=>{ne.exports=function(p,h,M){var w="";if(w+=p.name||"Error",w+=": "+(p.message||""),M instanceof Array)for(var E in M){w+="\n # "+M[E]}for(var m in h){w+="\n at "+h[m].toString()}return w}},63998:(ne,s,p)=>{var h=p(88074).cache,M=p(52624);ne.exports=function(){return Error.captureStackTrace=function(w,E){Object.defineProperties(w,{stack:{configurable:!0,get:h(function(){return(Error.prepareStackTrace||M)(w,[])})},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})},Error.getStackTrace=function(w){if(w.cachedStack)return w.stack;var E=(Error.prepareStackTrace||M)(w,[]);try{Object.defineProperties(w,{stack:{configurable:!0,writable:!0,enumerable:!1,value:E},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})}catch{}return E},{prepareStackTrace:M}}},56362:(ne,s,p)=>{var h=p(52624);ne.exports=function(){return Error.getStackTrace=function(M){return M.stack},{prepareStackTrace:h}}},59069:ne=>{"use strict";var h,s="object"==typeof Reflect?Reflect:null,p=s&&"function"==typeof s.apply?s.apply:function(G,W,Q){return Function.prototype.apply.call(G,W,Q)};h=s&&"function"==typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(G){return Object.getOwnPropertyNames(G).concat(Object.getOwnPropertySymbols(G))}:function(G){return Object.getOwnPropertyNames(G)};var w=Number.isNaN||function(G){return G!=G};function E(){E.init.call(this)}ne.exports=E,ne.exports.once=function N(V,G){return new Promise(function(W,Q){function q(Z){V.removeListener(G,J),Q(Z)}function J(){"function"==typeof V.removeListener&&V.removeListener("error",q),W([].slice.call(arguments))}B(V,G,J,{once:!0}),"error"!==G&&function j(V,G,W){"function"==typeof V.on&&B(V,"error",G,W)}(V,q,{once:!0})})},E.EventEmitter=E,E.prototype._events=void 0,E.prototype._eventsCount=0,E.prototype._maxListeners=void 0;var l=10;function m(V){if("function"!=typeof V)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof V)}function y(V){return void 0===V._maxListeners?E.defaultMaxListeners:V._maxListeners}function b(V,G,W,Q){var q,J,Z;if(m(W),void 0===(J=V._events)?(J=V._events=Object.create(null),V._eventsCount=0):(void 0!==J.newListener&&(V.emit("newListener",G,W.listener?W.listener:W),J=V._events),Z=J[G]),void 0===Z)Z=J[G]=W,++V._eventsCount;else if("function"==typeof Z?Z=J[G]=Q?[W,Z]:[Z,W]:Q?Z.unshift(W):Z.push(W),(q=y(V))>0&&Z.length>q&&!Z.warned){Z.warned=!0;var ee=new Error("Possible EventEmitter memory leak detected. "+Z.length+" "+String(G)+" listeners added. Use emitter.setMaxListeners() to increase limit");ee.name="MaxListenersExceededWarning",ee.emitter=V,ee.type=G,ee.count=Z.length,function M(V){console&&console.warn&&console.warn(V)}(ee)}return V}function S(){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 _(V,G,W){var Q={fired:!1,wrapFn:void 0,target:V,type:G,listener:W},q=S.bind(Q);return q.listener=W,Q.wrapFn=q,q}function A(V,G,W){var Q=V._events;if(void 0===Q)return[];var q=Q[G];return void 0===q?[]:"function"==typeof q?W?[q.listener||q]:[q]:W?function L(V){for(var G=new Array(V.length),W=0;W0&&(Z=W[0]),Z instanceof Error)throw Z;var ee=new Error("Unhandled error."+(Z?" ("+Z.message+")":""));throw ee.context=Z,ee}var I=J[G];if(void 0===I)return!1;if("function"==typeof I)p(I,this,W);else{var o=I.length,a=x(I,o);for(Q=0;Q=0;Z--)if(Q[Z]===W||Q[Z].listener===W){ee=Q[Z].listener,J=Z;break}if(J<0)return this;0===J?Q.shift():function T(V,G){for(;G+1=0;q--)this.removeListener(G,W[q]);return this},E.prototype.listeners=function(G){return A(this,G,!0)},E.prototype.rawListeners=function(G){return A(this,G,!1)},E.listenerCount=function(V,G){return"function"==typeof V.listenerCount?V.listenerCount(G):P.call(V,G)},E.prototype.listenerCount=P,E.prototype.eventNames=function(){return this._eventsCount>0?h(this._events):[]}},40347:(ne,s,p)=>{var h=p(73502).Buffer,M=p(8095);ne.exports=function w(E,l,m,y){if(h.isBuffer(E)||(E=h.from(E,"binary")),l&&(h.isBuffer(l)||(l=h.from(l,"binary")),8!==l.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var b=m/8,S=h.alloc(b),_=h.alloc(y||0),A=h.alloc(0);b>0||y>0;){var P=new M;P.update(A),P.update(E),l&&P.update(l),A=P.digest();var x=0;if(b>0){var T=S.length-b;x=Math.min(b,A.length),A.copy(S,T,0,x),b-=x}if(x0){var L=_.length-y,N=Math.min(y,A.length-x);A.copy(_,L,x,x+N),y-=N}}return A.fill(0),{key:S,iv:_}}},12559:ne=>{"use strict";ne.exports=function s(p,h){if(p===h)return!0;if(p&&h&&"object"==typeof p&&"object"==typeof h){if(p.constructor!==h.constructor)return!1;var M,w,E;if(Array.isArray(p)){if((M=p.length)!=h.length)return!1;for(w=M;0!=w--;)if(!s(p[w],h[w]))return!1;return!0}if(p.constructor===RegExp)return p.source===h.source&&p.flags===h.flags;if(p.valueOf!==Object.prototype.valueOf)return p.valueOf()===h.valueOf();if(p.toString!==Object.prototype.toString)return p.toString()===h.toString();if((M=(E=Object.keys(p)).length)!==Object.keys(h).length)return!1;for(w=M;0!=w--;)if(!Object.prototype.hasOwnProperty.call(h,E[w]))return!1;for(w=M;0!=w--;){var l=E[w];if(!s(p[l],h[l]))return!1}return!0}return p!=p&&h!=h}},44770:ne=>{"use strict";ne.exports=function(s,p){for(var h={},M=Object.keys(s),w=Array.isArray(p),E=0;E{"use strict";var h=p(64356),M=Object.prototype.toString,w=Object.prototype.hasOwnProperty,E=function(S,_,A){for(var P=0,x=S.length;P=3&&(P=A),"[object Array]"===M.call(S)?E(S,_,P):"string"==typeof S?l(S,_,P):m(S,_,P)}},64356:ne=>{"use strict";var h,M,s=Function.prototype.toString,p="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof p&&"function"==typeof Object.defineProperty)try{h=Object.defineProperty({},"length",{get:function(){throw M}}),M={},p(function(){throw 42},null,h)}catch(j){j!==M&&(p=null)}else p=null;var w=/^\s*class\b/,E=function(B){try{var V=s.call(B);return w.test(V)}catch{return!1}},l=function(B){try{return!E(B)&&(s.call(B),!0)}catch{return!1}},m=Object.prototype.toString,x="function"==typeof Symbol&&!!Symbol.toStringTag,T=!(0 in[,]),L=function(){return!1};if("object"==typeof document){var N=document.all;m.call(N)===m.call(document.all)&&(L=function(B){if((T||!B)&&(typeof B>"u"||"object"==typeof B))try{var V=m.call(B);return("[object HTMLAllCollection]"===V||"[object HTML document.all class]"===V||"[object HTMLCollection]"===V||"[object Object]"===V)&&null==B("")}catch{}return!1})}ne.exports=p?function(B){if(L(B))return!0;if(!B||"function"!=typeof B&&"object"!=typeof B)return!1;try{p(B,null,h)}catch(V){if(V!==M)return!1}return!E(B)&&l(B)}:function(B){if(L(B))return!0;if(!B||"function"!=typeof B&&"object"!=typeof B)return!1;if(x)return l(B);if(E(B))return!1;var V=m.call(B);return!("[object Function]"!==V&&"[object GeneratorFunction]"!==V&&!/^\[object HTML/.test(V))&&l(B)}},7480:ne=>{var s=Object.prototype.hasOwnProperty,p=Object.prototype.toString;ne.exports=function(M,w,E){if("[object Function]"!==p.call(w))throw new TypeError("iterator must be a function");var l=M.length;if(l===+l)for(var m=0;m{"use strict";var s="Function.prototype.bind called on incompatible ",p=Array.prototype.slice,h=Object.prototype.toString,M="[object Function]";ne.exports=function(E){var l=this;if("function"!=typeof l||h.call(l)!==M)throw new TypeError(s+l);for(var y,m=p.call(arguments,1),S=Math.max(0,l.length-m.length),_=[],A=0;A{"use strict";var h=p(83457);ne.exports=Function.prototype.bind||h},2997:(ne,s,p)=>{var h=p(23874),M=p(14692),w=p(2313),E=new Buffer(0),l=function(){},m=function(S){return"function"==typeof S?S:function(_){_(null,S)}},y=function(S,_){var A=!1,P=!1;return S._read=function(){A=!0},S.destroy=function(){P=!0},_(function(x,T){if(x)return S.emit("error",x);var L=function(){for(var N;null!==(N=T.read());)A=!1,S.push(N)};if(T.on("readable",function(){A&&L()}),T.on("end",function(){L(),S.push(null)}),T.on("error",function(N){S.emit("error",N)}),T.on("close",function(){L(),process.nextTick(function(){S.emit("close")})}),S._read=function(){A=!0,L()},S.destroy=function(){P||(P=!0,T.destroy&&T.destroy())},P)return P=!1,void S.destroy();A&&L()}),S},b=function(S,_){var A=l,P=!1;return S._write=function(x,T,L){A=L},S.destroy=function(){P=!0},S.write(E),_(function(x,T){if(x)return S.emit("error",x);T.on("close",function(){S.emit("close")}),T.on("error",function(N){S.emit("error",N)}),S._write=function(N,j,B){if(N===E)return B();T.write(N,j,B)};var L=S.emit;if(T.on("finish",function(){L.call(S,"finish")}),S.destroy=function(){P||(P=!0,T.destroy&&T.destroy())},S.emit=function(N){if("finish"!==N)return L.apply(S,arguments);T.end()},P)return P=!1,void S.destroy();A()}),S};s.readable=function(S,_){return 1===arguments.length?s.readable(null,S):(S||(S={}),y(new M(S),m(_)))},s.writable=function(S,_){return 1===arguments.length?s.writable(null,S):(S||(S={}),b(new h(S),m(_)))},s.duplex=function(S,_,A){if(2===arguments.length)return s.duplex(null,S,_);S||(S={});var P=new w(S);return b(P,m(_)),y(P,m(A)),P}},2313:(ne,s,p)=>{ne.exports=p(52652)},52652:(ne,s,p)=>{ne.exports=l;var h=Object.keys||function(b){var S=[];for(var _ in b)S.push(_);return S},M=p(26156);M.inherits=p(83894);var w=p(15890),E=p(19859);function l(b){if(!(this instanceof l))return new l(b);w.call(this,b),E.call(this,b),b&&!1===b.readable&&(this.readable=!1),b&&!1===b.writable&&(this.writable=!1),this.allowHalfOpen=!0,b&&!1===b.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",m)}function m(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}M.inherits(l,w),function y(b,S){for(var _=0,A=b.length;_{ne.exports=w;var h=p(59735),M=p(26156);function w(E){if(!(this instanceof w))return new w(E);h.call(this,E)}M.inherits=p(83894),M.inherits(w,h),w.prototype._transform=function(E,l,m){m(null,E)}},15890:(ne,s,p)=>{ne.exports=b;var h=p(66425),M=p(93172).Buffer;b.ReadableState=y;var w=p(59069).EventEmitter;w.listenerCount||(w.listenerCount=function(o,a){return o.listeners(a).length});var m,E=p(295),l=p(26156);function y(o,a){var d=(o=o||{}).highWaterMark;this.highWaterMark=d||0===d?d:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!o.objectMode,this.defaultEncoding=o.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o.encoding&&(m||(m=p(15453).s),this.decoder=new m(o.encoding),this.encoding=o.encoding)}function b(o){if(!(this instanceof b))return new b(o);this._readableState=new y(o,this),this.readable=!0,E.call(this)}function S(o,a,d,g,D){var F=function T(o,a){var d=null;return!M.isBuffer(a)&&"string"!=typeof a&&null!=a&&!o.objectMode&&(d=new TypeError("Invalid non-string/buffer chunk")),d}(a,d);if(F)o.emit("error",F);else if(null==d)a.reading=!1,a.ended||function L(o,a){if(a.decoder&&!a.ended){var d=a.decoder.end();d&&d.length&&(a.buffer.push(d),a.length+=a.objectMode?1:d.length)}a.ended=!0,a.length>0?N(o):Z(o)}(o,a);else if(a.objectMode||d&&d.length>0)if(a.ended&&!D){var z=new Error("stream.push() after EOF");o.emit("error",z)}else if(a.endEmitted&&D){z=new Error("stream.unshift() after end event");o.emit("error",z)}else a.decoder&&!D&&!g&&(d=a.decoder.write(d)),a.length+=a.objectMode?1:d.length,D?a.buffer.unshift(d):(a.reading=!1,a.buffer.push(d)),a.needReadable&&N(o),function B(o,a){a.readingMore||(a.readingMore=!0,process.nextTick(function(){!function V(o,a){for(var d=a.length;!a.reading&&!a.flowing&&!a.ended&&a.lengtha.highWaterMark&&(a.highWaterMark=function P(o){if(o>=A)o=A;else{o--;for(var a=1;a<32;a<<=1)o|=o>>a;o++}return o}(o)),o>a.length?a.ended?a.length:(a.needReadable=!0,0):o)}function N(o){var a=o._readableState;a.needReadable=!1,!a.emittedReadable&&(a.emittedReadable=!0,a.sync?process.nextTick(function(){j(o)}):j(o))}function j(o){o.emit("readable")}function W(o){var d,a=o._readableState;function g(D,F,z){!1===D.write(d)&&a.awaitDrain++}for(a.awaitDrain=0;a.pipesCount&&null!==(d=o.read());)if(1===a.pipesCount?g(a.pipes):ee(a.pipes,g),o.emit("data",d),a.awaitDrain>0)return;if(0===a.pipesCount)return a.flowing=!1,void(w.listenerCount(o,"data")>0&&q(o));a.ranOut=!0}function Q(){this._readableState.ranOut&&(this._readableState.ranOut=!1,W(this))}function q(o,a){if(o._readableState.flowing)throw new Error("Cannot switch to old mode now.");var g=a||!1,D=!1;o.readable=!0,o.pipe=E.prototype.pipe,o.on=o.addListener=E.prototype.on,o.on("readable",function(){D=!0;for(var F;!g&&null!==(F=o.read());)o.emit("data",F);null===F&&(D=!1,o._readableState.needReadable=!0)}),o.pause=function(){g=!0,this.emit("pause")},o.resume=function(){g=!1,D?process.nextTick(function(){o.emit("readable")}):this.read(0),this.emit("resume")},o.emit("readable")}function J(o,a){var z,d=a.buffer,g=a.length,D=!!a.decoder,F=!!a.objectMode;if(0===d.length)return null;if(0===g)z=null;else if(F)z=d.shift();else if(!o||o>=g)z=D?d.join(""):M.concat(d,g),d.length=0;else if(o0)throw new Error("endReadable called on non-empty stream");!a.endEmitted&&a.calledRead&&(a.ended=!0,process.nextTick(function(){!a.endEmitted&&0===a.length&&(a.endEmitted=!0,o.readable=!1,o.emit("end"))}))}function ee(o,a){for(var d=0,g=o.length;d0)&&(a.emittedReadable=!1),0===o&&a.needReadable&&(a.length>=a.highWaterMark||a.ended))return N(this),null;if(0===(o=x(o,a))&&a.ended)return g=null,a.length>0&&a.decoder&&(g=J(o,a),a.length-=g.length),0===a.length&&Z(this),g;var D=a.needReadable;return a.length-o<=a.highWaterMark&&(D=!0),(a.ended||a.reading)&&(D=!1),D&&(a.reading=!0,a.sync=!0,0===a.length&&(a.needReadable=!0),this._read(a.highWaterMark),a.sync=!1),D&&!a.reading&&(o=x(d,a)),null===(g=o>0?J(o,a):null)&&(a.needReadable=!0,o=0),a.length-=o,0===a.length&&!a.ended&&(a.needReadable=!0),a.ended&&!a.endEmitted&&0===a.length&&Z(this),g},b.prototype._read=function(o){this.emit("error",new Error("not implemented"))},b.prototype.pipe=function(o,a){var d=this,g=this._readableState;switch(g.pipesCount){case 0:g.pipes=o;break;case 1:g.pipes=[g.pipes,o];break;default:g.pipes.push(o)}g.pipesCount+=1;var F=(!a||!1!==a.end)&&o!==process.stdout&&o!==process.stderr?C:k;function z(Ie){Ie===d&&k()}function C(){o.end()}g.endEmitted?process.nextTick(F):d.once("end",F),o.on("unpipe",z);var f=function G(o){return function(){var d=o._readableState;d.awaitDrain--,0===d.awaitDrain&&W(o)}}(d);function k(){o.removeListener("close",te),o.removeListener("finish",oe),o.removeListener("drain",f),o.removeListener("error",se),o.removeListener("unpipe",z),d.removeListener("end",C),d.removeListener("end",k),(!o._writableState||o._writableState.needDrain)&&f()}function se(Ie){de(),o.removeListener("error",se),0===w.listenerCount(o,"error")&&o.emit("error",Ie)}function te(){o.removeListener("finish",oe),de()}function oe(){o.removeListener("close",te),de()}function de(){d.unpipe(o)}return o.on("drain",f),o._events&&o._events.error?h(o._events.error)?o._events.error.unshift(se):o._events.error=[se,o._events.error]:o.on("error",se),o.once("close",te),o.once("finish",oe),o.emit("pipe",d),g.flowing||(this.on("readable",Q),g.flowing=!0,process.nextTick(function(){W(d)})),o},b.prototype.unpipe=function(o){var a=this._readableState;if(0===a.pipesCount)return this;if(1===a.pipesCount)return o&&o!==a.pipes||(o||(o=a.pipes),a.pipes=null,a.pipesCount=0,this.removeListener("readable",Q),a.flowing=!1,o&&o.emit("unpipe",this)),this;if(!o){var d=a.pipes,g=a.pipesCount;a.pipes=null,a.pipesCount=0,this.removeListener("readable",Q),a.flowing=!1;for(var D=0;D"u"&&(this[D]=function(z){return function(){return o[z].apply(o,arguments)}}(D));return ee(["error","close","destroy","pause","resume"],function(z){o.on(z,g.emit.bind(g,z))}),g._read=function(z){d&&(d=!1,o.resume())},g},b._fromList=J},59735:(ne,s,p)=>{ne.exports=l;var h=p(52652),M=p(26156);function w(y,b){this.afterTransform=function(S,_){return function E(y,b,S){var _=y._transformState;_.transforming=!1;var A=_.writecb;if(!A)return y.emit("error",new Error("no writecb in Transform class"));_.writechunk=null,_.writecb=null,null!=S&&y.push(S),A&&A(b);var P=y._readableState;P.reading=!1,(P.needReadable||P.length{ne.exports=m;var h=p(93172).Buffer;m.WritableState=l;var M=p(26156);M.inherits=p(83894);var w=p(295);function E(W,Q,q){this.chunk=W,this.encoding=Q,this.callback=q}function l(W,Q){var q=(W=W||{}).highWaterMark;this.highWaterMark=q||0===q?q:16384,this.objectMode=!!W.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var J=!1===W.decodeStrings;this.decodeStrings=!J,this.defaultEncoding=W.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Z){!function T(W,Q){var q=W._writableState,J=q.sync,Z=q.writecb;if(function x(W){W.writing=!1,W.writecb=null,W.length-=W.writelen,W.writelen=0}(q),Q)!function P(W,Q,q,J,Z){q?process.nextTick(function(){Z(J)}):Z(J),W._writableState.errorEmitted=!0,W.emit("error",J)}(W,0,J,Q,Z);else{var ee=B(W,q);!ee&&!q.bufferProcessing&&q.buffer.length&&function j(W,Q){Q.bufferProcessing=!0;for(var q=0;q{var h=p(295);(s=ne.exports=p(15890)).Stream=h,s.Readable=s,s.Writable=p(19859),s.Duplex=p(52652),s.Transform=p(59735),s.PassThrough=p(72936),!process.browser&&"disable"===process.env.READABLE_STREAM&&(ne.exports=p(295))},23874:(ne,s,p)=>{ne.exports=p(19859)},95203:(ne,s,p)=>{"use strict";var h,M=SyntaxError,w=Function,E=TypeError,l=function(a){try{return w('"use strict"; return ('+a+").constructor;")()}catch{}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch{m=null}var y=function(){throw new E},b=m?function(){try{return arguments.callee,y}catch{try{return m(arguments,"callee").get}catch{return y}}}():y,S=p(92969)(),_=p(49757)(),A=Object.getPrototypeOf||(_?function(a){return a.__proto__}:null),P={},x=typeof Uint8Array>"u"||!A?h:A(Uint8Array),T={"%AggregateError%":typeof AggregateError>"u"?h:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?h:ArrayBuffer,"%ArrayIteratorPrototype%":S&&A?A([][Symbol.iterator]()):h,"%AsyncFromSyncIteratorPrototype%":h,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":typeof Atomics>"u"?h:Atomics,"%BigInt%":typeof BigInt>"u"?h:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?h:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?h:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?h:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?h:Float32Array,"%Float64Array%":typeof Float64Array>"u"?h:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?h:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":P,"%Int8Array%":typeof Int8Array>"u"?h:Int8Array,"%Int16Array%":typeof Int16Array>"u"?h:Int16Array,"%Int32Array%":typeof Int32Array>"u"?h:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&A?A(A([][Symbol.iterator]())):h,"%JSON%":"object"==typeof JSON?JSON:h,"%Map%":typeof Map>"u"?h:Map,"%MapIteratorPrototype%":typeof Map>"u"||!S||!A?h:A((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?h:Promise,"%Proxy%":typeof Proxy>"u"?h:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?h:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?h:Set,"%SetIteratorPrototype%":typeof Set>"u"||!S||!A?h:A((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?h:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&A?A(""[Symbol.iterator]()):h,"%Symbol%":S?Symbol:h,"%SyntaxError%":M,"%ThrowTypeError%":b,"%TypedArray%":x,"%TypeError%":E,"%Uint8Array%":typeof Uint8Array>"u"?h:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?h:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?h:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?h:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?h:WeakMap,"%WeakRef%":typeof WeakRef>"u"?h:WeakRef,"%WeakSet%":typeof WeakSet>"u"?h:WeakSet};if(A)try{null.error}catch(a){var L=A(A(a));T["%Error.prototype%"]=L}var N=function a(d){var g;if("%AsyncFunction%"===d)g=l("async function () {}");else if("%GeneratorFunction%"===d)g=l("function* () {}");else if("%AsyncGeneratorFunction%"===d)g=l("async function* () {}");else if("%AsyncGenerator%"===d){var D=a("%AsyncGeneratorFunction%");D&&(g=D.prototype)}else if("%AsyncIteratorPrototype%"===d){var F=a("%AsyncGenerator%");F&&A&&(g=A(F.prototype))}return T[d]=g,g},j={"%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"]},B=p(84444),V=p(93164),G=B.call(Function.call,Array.prototype.concat),W=B.call(Function.apply,Array.prototype.splice),Q=B.call(Function.call,String.prototype.replace),q=B.call(Function.call,String.prototype.slice),J=B.call(Function.call,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ee=/\\(\\)?/g,I=function(d){var g=q(d,0,1),D=q(d,-1);if("%"===g&&"%"!==D)throw new M("invalid intrinsic syntax, expected closing `%`");if("%"===D&&"%"!==g)throw new M("invalid intrinsic syntax, expected opening `%`");var F=[];return Q(d,Z,function(z,C,f,k){F[F.length]=f?Q(k,ee,"$1"):C||z}),F},o=function(d,g){var F,D=d;if(V(j,D)&&(D="%"+(F=j[D])[0]+"%"),V(T,D)){var z=T[D];if(z===P&&(z=N(D)),typeof z>"u"&&!g)throw new E("intrinsic "+d+" exists, but is not available. Please file an issue!");return{alias:F,name:D,value:z}}throw new M("intrinsic "+d+" does not exist!")};ne.exports=function(d,g){if("string"!=typeof d||0===d.length)throw new E("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof g)throw new E('"allowMissing" argument must be a boolean');if(null===J(/^%?[^%]*%?$/,d))throw new M("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var D=I(d),F=D.length>0?D[0]:"",z=o("%"+F+"%",g),C=z.name,f=z.value,k=!1,se=z.alias;se&&(F=se[0],W(D,G([0,1],se)));for(var te=1,oe=!0;te=D.length){var ve=m(f,de);f=(oe=!!ve)&&"get"in ve&&!("originalValue"in ve.get)?ve.get:f[de]}else oe=V(f,de),f=f[de];oe&&!k&&(T[C]=f)}}return f}},47378:(ne,s,p)=>{"use strict";var M=p(95203)("%Object.getOwnPropertyDescriptor%",!0);if(M)try{M([],"length")}catch{M=null}ne.exports=M},49757:ne=>{"use strict";var s={foo:{}},p=Object;ne.exports=function(){return{__proto__:s}.foo===s.foo&&!({__proto__:null}instanceof p)}},92969:(ne,s,p)=>{"use strict";var h=typeof Symbol<"u"&&Symbol,M=p(81983);ne.exports=function(){return"function"==typeof h&&"function"==typeof Symbol&&"symbol"==typeof h("foo")&&"symbol"==typeof Symbol("bar")&&M()}},81983:ne=>{"use strict";ne.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var p={},h=Symbol("test"),M=Object(h);if("string"==typeof h||"[object Symbol]"!==Object.prototype.toString.call(h)||"[object Symbol]"!==Object.prototype.toString.call(M))return!1;for(h in p[h]=42,p)return!1;if("function"==typeof Object.keys&&0!==Object.keys(p).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(p).length)return!1;var E=Object.getOwnPropertySymbols(p);if(1!==E.length||E[0]!==h||!Object.prototype.propertyIsEnumerable.call(p,h))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var l=Object.getOwnPropertyDescriptor(p,h);if(42!==l.value||!0!==l.enumerable)return!1}return!0}},46259:(ne,s,p)=>{"use strict";var h=p(81983);ne.exports=function(){return h()&&!!Symbol.toStringTag}},93164:(ne,s,p)=>{"use strict";var h=p(84444);ne.exports=h.call(Function.call,Object.prototype.hasOwnProperty)},39650:(ne,s,p)=>{"use strict";var h=p(73502).Buffer,M=p(65685).Transform;function l(m){M.call(this),this._block=h.allocUnsafe(m),this._blockSize=m,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}p(83894)(l,M),l.prototype._transform=function(m,y,b){var S=null;try{this.update(m,y)}catch(_){S=_}b(S)},l.prototype._flush=function(m){var y=null;try{this.push(this.digest())}catch(b){y=b}m(y)},l.prototype.update=function(m,y){if(function E(m,y){if(!h.isBuffer(m)&&"string"!=typeof m)throw new TypeError(y+" must be a string or a buffer")}(m,"Data"),this._finalized)throw new Error("Digest already called");h.isBuffer(m)||(m=h.from(m,y));for(var b=this._block,S=0;this._blockOffset+m.length-S>=this._blockSize;){for(var _=this._blockOffset;_0;++A)this._length[A]+=P,(P=this._length[A]/4294967296|0)>0&&(this._length[A]-=4294967296*P);return this},l.prototype._update=function(){throw new Error("_update is not implemented")},l.prototype.digest=function(m){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var y=this._digest();void 0!==m&&(y=y.toString(m)),this._block.fill(0),this._blockOffset=0;for(var b=0;b<4;++b)this._length[b]=0;return y},l.prototype._digest=function(){throw new Error("_digest is not implemented")},ne.exports=l},37084:(ne,s,p)=>{var h=s;h.utils=p(29299),h.common=p(33800),h.sha=p(54962),h.ripemd=p(99458),h.hmac=p(12194),h.sha1=h.sha.sha1,h.sha256=h.sha.sha256,h.sha224=h.sha.sha224,h.sha384=h.sha.sha384,h.sha512=h.sha.sha512,h.ripemd160=h.ripemd.ripemd160},33800:(ne,s,p)=>{"use strict";var h=p(29299),M=p(32391);function w(){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}s.BlockHash=w,w.prototype.update=function(l,m){if(l=h.toArray(l,m),this.pending?this.pending=this.pending.concat(l):this.pending=l,this.pendingTotal+=l.length,this.pending.length>=this._delta8){var y=(l=this.pending).length%this._delta8;this.pending=l.slice(l.length-y,l.length),0===this.pending.length&&(this.pending=null),l=h.join32(l,0,l.length-y,this.endian);for(var b=0;b>>24&255,b[S++]=l>>>16&255,b[S++]=l>>>8&255,b[S++]=255&l}else for(b[S++]=255&l,b[S++]=l>>>8&255,b[S++]=l>>>16&255,b[S++]=l>>>24&255,b[S++]=0,b[S++]=0,b[S++]=0,b[S++]=0,_=8;_{"use strict";var h=p(29299),M=p(32391);function w(E,l,m){if(!(this instanceof w))return new w(E,l,m);this.Hash=E,this.blockSize=E.blockSize/8,this.outSize=E.outSize/8,this.inner=null,this.outer=null,this._init(h.toArray(l,m))}ne.exports=w,w.prototype._init=function(l){l.length>this.blockSize&&(l=(new this.Hash).update(l).digest()),M(l.length<=this.blockSize);for(var m=l.length;m{"use strict";var h=p(29299),M=p(33800),w=h.rotl32,E=h.sum32,l=h.sum32_3,m=h.sum32_4,y=M.BlockHash;function b(){if(!(this instanceof b))return new b;y.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function S(N,j,B,V){return N<=15?j^B^V:N<=31?j&B|~j&V:N<=47?(j|~B)^V:N<=63?j&V|B&~V:j^(B|~V)}function A(N){return N<=15?1352829926:N<=31?1548603684:N<=47?1836072691:N<=63?2053994217:0}h.inherits(b,y),s.ripemd160=b,b.blockSize=512,b.outSize=160,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(j,B){for(var V=this.h[0],G=this.h[1],W=this.h[2],Q=this.h[3],q=this.h[4],J=V,Z=G,ee=W,I=Q,o=q,a=0;a<80;a++){var d=E(w(m(V,S(a,G,W,Q),j[P[a]+B],(N=a)<=15?0:N<=31?1518500249:N<=47?1859775393:N<=63?2400959708:2840853838),T[a]),q);V=q,q=Q,Q=w(W,10),W=G,G=d,d=E(w(m(J,S(79-a,Z,ee,I),j[x[a]+B],A(a)),L[a]),o),J=o,o=I,I=w(ee,10),ee=Z,Z=d}var N;d=l(this.h[1],W,I),this.h[1]=l(this.h[2],Q,o),this.h[2]=l(this.h[3],q,J),this.h[3]=l(this.h[4],V,Z),this.h[4]=l(this.h[0],G,ee),this.h[0]=d},b.prototype._digest=function(j){return"hex"===j?h.toHex32(this.h,"little"):h.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],x=[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],T=[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],L=[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]},54962:(ne,s,p)=>{"use strict";s.sha1=p(59007),s.sha224=p(10055),s.sha256=p(19342),s.sha384=p(88634),s.sha512=p(70039)},59007:(ne,s,p)=>{"use strict";var h=p(29299),M=p(33800),w=p(33113),E=h.rotl32,l=h.sum32,m=h.sum32_5,y=w.ft_1,b=M.BlockHash,S=[1518500249,1859775393,2400959708,3395469782];function _(){if(!(this instanceof _))return new _;b.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}h.inherits(_,b),ne.exports=_,_.blockSize=512,_.outSize=160,_.hmacStrength=80,_.padLength=64,_.prototype._update=function(P,x){for(var T=this.W,L=0;L<16;L++)T[L]=P[x+L];for(;L{"use strict";var h=p(29299),M=p(19342);function w(){if(!(this instanceof w))return new w;M.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}h.inherits(w,M),ne.exports=w,w.blockSize=512,w.outSize=224,w.hmacStrength=192,w.padLength=64,w.prototype._digest=function(l){return"hex"===l?h.toHex32(this.h.slice(0,7),"big"):h.split32(this.h.slice(0,7),"big")}},19342:(ne,s,p)=>{"use strict";var h=p(29299),M=p(33800),w=p(33113),E=p(32391),l=h.sum32,m=h.sum32_4,y=h.sum32_5,b=w.ch32,S=w.maj32,_=w.s0_256,A=w.s1_256,P=w.g0_256,x=w.g1_256,T=M.BlockHash,L=[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 N(){if(!(this instanceof N))return new N;T.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=L,this.W=new Array(64)}h.inherits(N,T),ne.exports=N,N.blockSize=512,N.outSize=256,N.hmacStrength=192,N.padLength=64,N.prototype._update=function(B,V){for(var G=this.W,W=0;W<16;W++)G[W]=B[V+W];for(;W{"use strict";var h=p(29299),M=p(70039);function w(){if(!(this instanceof w))return new w;M.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}h.inherits(w,M),ne.exports=w,w.blockSize=1024,w.outSize=384,w.hmacStrength=192,w.padLength=128,w.prototype._digest=function(l){return"hex"===l?h.toHex32(this.h.slice(0,12),"big"):h.split32(this.h.slice(0,12),"big")}},70039:(ne,s,p)=>{"use strict";var h=p(29299),M=p(33800),w=p(32391),E=h.rotr64_hi,l=h.rotr64_lo,m=h.shr64_hi,y=h.shr64_lo,b=h.sum64,S=h.sum64_hi,_=h.sum64_lo,A=h.sum64_4_hi,P=h.sum64_4_lo,x=h.sum64_5_hi,T=h.sum64_5_lo,L=M.BlockHash,N=[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 j(){if(!(this instanceof j))return new j;L.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=N,this.W=new Array(160)}function B(d,g,D,F,z){var C=d&D^~d&z;return C<0&&(C+=4294967296),C}function V(d,g,D,F,z,C){var f=g&F^~g&C;return f<0&&(f+=4294967296),f}function G(d,g,D,F,z){var C=d&D^d&z^D&z;return C<0&&(C+=4294967296),C}function W(d,g,D,F,z,C){var f=g&F^g&C^F&C;return f<0&&(f+=4294967296),f}function Q(d,g){var C=E(d,g,28)^E(g,d,2)^E(g,d,7);return C<0&&(C+=4294967296),C}function q(d,g){var C=l(d,g,28)^l(g,d,2)^l(g,d,7);return C<0&&(C+=4294967296),C}function J(d,g){var C=E(d,g,14)^E(d,g,18)^E(g,d,9);return C<0&&(C+=4294967296),C}function Z(d,g){var C=l(d,g,14)^l(d,g,18)^l(g,d,9);return C<0&&(C+=4294967296),C}function ee(d,g){var C=E(d,g,1)^E(d,g,8)^m(d,g,7);return C<0&&(C+=4294967296),C}function I(d,g){var C=l(d,g,1)^l(d,g,8)^y(d,g,7);return C<0&&(C+=4294967296),C}function o(d,g){var C=E(d,g,19)^E(g,d,29)^m(d,g,6);return C<0&&(C+=4294967296),C}function a(d,g){var C=l(d,g,19)^l(g,d,29)^y(d,g,6);return C<0&&(C+=4294967296),C}h.inherits(j,L),ne.exports=j,j.blockSize=1024,j.outSize=512,j.hmacStrength=192,j.padLength=128,j.prototype._prepareBlock=function(g,D){for(var F=this.W,z=0;z<32;z++)F[z]=g[D+z];for(;z{"use strict";var M=p(29299).rotr32;function E(A,P,x){return A&P^~A&x}function l(A,P,x){return A&P^A&x^P&x}function m(A,P,x){return A^P^x}s.ft_1=function w(A,P,x,T){return 0===A?E(P,x,T):1===A||3===A?m(P,x,T):2===A?l(P,x,T):void 0},s.ch32=E,s.maj32=l,s.p32=m,s.s0_256=function y(A){return M(A,2)^M(A,13)^M(A,22)},s.s1_256=function b(A){return M(A,6)^M(A,11)^M(A,25)},s.g0_256=function S(A){return M(A,7)^M(A,18)^A>>>3},s.g1_256=function _(A){return M(A,17)^M(A,19)^A>>>10}},29299:(ne,s,p)=>{"use strict";var h=p(32391),M=p(83894);function w(a,d){return!(55296!=(64512&a.charCodeAt(d))||d<0||d+1>=a.length)&&56320==(64512&a.charCodeAt(d+1))}function m(a){return(a>>>24|a>>>8&65280|a<<8&16711680|(255&a)<<24)>>>0}function b(a){return 1===a.length?"0"+a:a}function S(a){return 7===a.length?"0"+a:6===a.length?"00"+a:5===a.length?"000"+a:4===a.length?"0000"+a:3===a.length?"00000"+a:2===a.length?"000000"+a:1===a.length?"0000000"+a:a}s.inherits=M,s.toArray=function E(a,d){if(Array.isArray(a))return a.slice();if(!a)return[];var g=[];if("string"==typeof a)if(d){if("hex"===d)for((a=a.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(a="0"+a),F=0;F>6|192,g[D++]=63&z|128):w(a,F)?(z=65536+((1023&z)<<10)+(1023&a.charCodeAt(++F)),g[D++]=z>>18|240,g[D++]=z>>12&63|128,g[D++]=z>>6&63|128,g[D++]=63&z|128):(g[D++]=z>>12|224,g[D++]=z>>6&63|128,g[D++]=63&z|128)}else for(F=0;F>>0}return z},s.split32=function A(a,d){for(var g=new Array(4*a.length),D=0,F=0;D>>24,g[F+1]=z>>>16&255,g[F+2]=z>>>8&255,g[F+3]=255&z):(g[F+3]=z>>>24,g[F+2]=z>>>16&255,g[F+1]=z>>>8&255,g[F]=255&z)}return g},s.rotr32=function P(a,d){return a>>>d|a<<32-d},s.rotl32=function x(a,d){return a<>>32-d},s.sum32=function T(a,d){return a+d>>>0},s.sum32_3=function L(a,d,g){return a+d+g>>>0},s.sum32_4=function N(a,d,g,D){return a+d+g+D>>>0},s.sum32_5=function j(a,d,g,D,F){return a+d+g+D+F>>>0},s.sum64=function B(a,d,g,D){var F=a[d],C=D+a[d+1]>>>0,f=(C>>0,a[d+1]=C},s.sum64_hi=function V(a,d,g,D){return(d+D>>>0>>0},s.sum64_lo=function G(a,d,g,D){return d+D>>>0},s.sum64_4_hi=function W(a,d,g,D,F,z,C,f){var k=0,se=d;return k+=(se=se+D>>>0)>>0)>>0)>>0},s.sum64_4_lo=function Q(a,d,g,D,F,z,C,f){return d+D+z+f>>>0},s.sum64_5_hi=function q(a,d,g,D,F,z,C,f,k,se){var te=0,oe=d;return te+=(oe=oe+D>>>0)>>0)>>0)>>0)>>0},s.sum64_5_lo=function J(a,d,g,D,F,z,C,f,k,se){return d+D+z+f+se>>>0},s.rotr64_hi=function Z(a,d,g){return(d<<32-g|a>>>g)>>>0},s.rotr64_lo=function ee(a,d,g){return(a<<32-g|d>>>g)>>>0},s.shr64_hi=function I(a,d,g){return a>>>g},s.shr64_lo=function o(a,d,g){return(a<<32-g|d>>>g)>>>0}},52438:(ne,s,p)=>{"use strict";var h=p(37084),M=p(58195),w=p(32391);function E(l){if(!(this instanceof E))return new E(l);this.hash=l.hash,this.predResist=!!l.predResist,this.outLen=this.hash.outSize,this.minEntropy=l.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var m=M.toArray(l.entropy,l.entropyEnc||"hex"),y=M.toArray(l.nonce,l.nonceEnc||"hex"),b=M.toArray(l.pers,l.persEnc||"hex");w(m.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(m,y,b)}ne.exports=E,E.prototype._init=function(m,y,b){var S=m.concat(y).concat(b);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var _=0;_=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(m.concat(b||[])),this._reseed=1},E.prototype.generate=function(m,y,b,S){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof y&&(S=b,b=y,y=null),b&&(b=M.toArray(b,S||"hex"),this._update(b));for(var _=[];_.length{var h=p(74216),M=p(68762),w=ne.exports;for(var E in h)h.hasOwnProperty(E)&&(w[E]=h[E]);function l(m){if("string"==typeof m&&(m=M.parse(m)),m.protocol||(m.protocol="https:"),"https:"!==m.protocol)throw new Error('Protocol "'+m.protocol+'" not supported. Expected "https:"');return m}w.request=function(m,y){return m=l(m),h.request.call(this,m,y)},w.get=function(m,y){return m=l(m),h.get.call(this,m,y)}},17294:function(ne,s,p){var h,M;!function(w,E,l){"use strict";h=function(){var w=function(A){throw A},E=function(){},l={storeName:"Store",storePrefix:"IDBWrapper-",dbVersion:1,keyPath:"id",autoIncrement:!0,onStoreReady:function(){},onError:w,indexes:[],implementationPreference:["indexedDB","webkitIndexedDB","mozIndexedDB","shimIndexedDB"]},m=function(A,P){for(var x in typeof P>"u"&&"function"==typeof A&&(P=A),"[object Object]"!=Object.prototype.toString.call(A)&&(A={}),l)this[x]=typeof A[x]<"u"?A[x]:l[x];this.dbName=this.storePrefix+this.storeName,this.dbVersion=parseInt(this.dbVersion,10)||1,P&&(this.onStoreReady=P);var T="object"==typeof window?window:self,L=this.implementationPreference.filter(function(N){return N in T});this.implementation=L[0],this.idb=T[this.implementation],this.keyRange=T.IDBKeyRange||T.webkitIDBKeyRange||T.mozIDBKeyRange,this.consts={READ_ONLY:"readonly",READ_WRITE:"readwrite",VERSION_CHANGE:"versionchange",NEXT:"next",NEXT_NO_DUPLICATE:"nextunique",PREV:"prev",PREV_NO_DUPLICATE:"prevunique"},this.openDB()},y={constructor:m,version:"1.7.2",db:null,dbName:null,dbVersion:null,store:null,storeName:null,storePrefix:null,keyPath:null,autoIncrement:null,indexes:null,implementationPreference:null,implementation:"",onStoreReady:null,onError:null,_insertIdCount:0,openDB:function(){var A=this.idb.open(this.dbName,this.dbVersion),P=!1;A.onerror=function(x){if(_(x))this.onError(new Error("The version number provided is lower than the existing one."));else{var T;if(x.target.error)T=x.target.error;else{var L="IndexedDB unknown error occurred when opening DB "+this.dbName+" version "+this.dbVersion;"errorCode"in x.target&&(L+=" with error code "+x.target.errorCode),T=new Error(L)}this.onError(T)}}.bind(this),A.onsuccess=function(x){if(!P){if(this.db)return void this.onStoreReady();if(this.db=x.target.result,"string"==typeof this.db.version)return void this.onError(new Error("The IndexedDB implementation in this browser is outdated. Please upgrade your browser."));if(!this.db.objectStoreNames.contains(this.storeName))return void this.onError(new Error("Object store couldn't be created."));var T=this.db.transaction([this.storeName],this.consts.READ_ONLY);this.store=T.objectStore(this.storeName);var L=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(N){var j=N.name;if(!j)return P=!0,void this.onError(new Error("Cannot create index: No index name given."));if(this.normalizeIndexData(N),this.hasIndex(j)){var B=this.store.index(j);this.indexComplies(B,N)||(P=!0,this.onError(new Error('Cannot modify index "'+j+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),L.splice(L.indexOf(j),1)}else P=!0,this.onError(new Error('Cannot create new index "'+j+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))},this),L.length&&(P=!0,this.onError(new Error('Cannot delete index(es) "'+L.toString()+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),P||this.onStoreReady()}}.bind(this),A.onupgradeneeded=function(x){if(this.db=x.target.result,this.db.objectStoreNames.contains(this.storeName))this.store=x.target.transaction.objectStore(this.storeName);else{var T={autoIncrement:this.autoIncrement};null!==this.keyPath&&(T.keyPath=this.keyPath),this.store=this.db.createObjectStore(this.storeName,T)}var L=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(N){var j=N.name;if(j||(P=!0,this.onError(new Error("Cannot create index: No index name given."))),this.normalizeIndexData(N),this.hasIndex(j)){var B=this.store.index(j);this.indexComplies(B,N)||(this.store.deleteIndex(j),this.store.createIndex(j,N.keyPath,{unique:N.unique,multiEntry:N.multiEntry})),L.splice(L.indexOf(j),1)}else this.store.createIndex(j,N.keyPath,{unique:N.unique,multiEntry:N.multiEntry})},this),L.length&&L.forEach(function(N){this.store.deleteIndex(N)},this)}.bind(this)},deleteDatabase:function(A,P){if(this.idb.deleteDatabase){this.db.close();var x=this.idb.deleteDatabase(this.dbName);x.onsuccess=A,x.onerror=P}else P(new Error("Browser does not support IndexedDB deleteDatabase!"))},put:function(A,P,x,T){null!==this.keyPath&&(T=x,x=P,P=A),T||(T=w),x||(x=E);var j,L=!1,N=null,B=this.db.transaction([this.storeName],this.consts.READ_WRITE);return B.oncomplete=function(){(L?x:T)(N)},B.onabort=T,B.onerror=T,null!==this.keyPath?(this._addIdPropertyIfNeeded(P),j=B.objectStore(this.storeName).put(P)):j=B.objectStore(this.storeName).put(P,A),j.onsuccess=function(V){L=!0,N=V.target.result},j.onerror=T,B},get:function(A,P,x){x||(x=w),P||(P=E);var T=!1,L=null,N=this.db.transaction([this.storeName],this.consts.READ_ONLY);N.oncomplete=function(){(T?P:x)(L)},N.onabort=x,N.onerror=x;var j=N.objectStore(this.storeName).get(A);return j.onsuccess=function(B){T=!0,L=B.target.result},j.onerror=x,N},remove:function(A,P,x){x||(x=w),P||(P=E);var T=!1,L=null,N=this.db.transaction([this.storeName],this.consts.READ_WRITE);N.oncomplete=function(){(T?P:x)(L)},N.onabort=x,N.onerror=x;var j=N.objectStore(this.storeName).delete(A);return j.onsuccess=function(B){T=!0,L=B.target.result},j.onerror=x,N},batch:function(A,P,x){if(x||(x=w),P||(P=E),"[object Array]"!=Object.prototype.toString.call(A))x(new Error("dataArray argument must be of type Array."));else if(0===A.length)return P(!0);var T=A.length,L=!1,N=!1,j=this.db.transaction([this.storeName],this.consts.READ_WRITE);j.oncomplete=function(){(N?P:x)(N)},j.onabort=x,j.onerror=x;var B=function(){0===--T&&!L&&(L=!0,N=!0)};return A.forEach(function(V){var G=V.type,W=V.key,Q=V.value,q=function(ee){j.abort(),L||(L=!0,x(ee,G,W))};if("remove"==G){var J=j.objectStore(this.storeName).delete(W);J.onsuccess=B,J.onerror=q}else if("put"==G){var Z;null!==this.keyPath?(this._addIdPropertyIfNeeded(Q),Z=j.objectStore(this.storeName).put(Q)):Z=j.objectStore(this.storeName).put(Q,W),Z.onsuccess=B,Z.onerror=q}},this),j},putBatch:function(A,P,x){var T=A.map(function(L){return{type:"put",value:L}});return this.batch(T,P,x)},upsertBatch:function(A,P,x,T){"function"==typeof P&&(T=x=P,P={}),T||(T=w),x||(x=E),P||(P={}),"[object Array]"!=Object.prototype.toString.call(A)&&T(new Error("dataArray argument must be of type Array."));var L=P.keyField||this.keyPath,N=A.length,j=!1,B=!1,V=0,G=this.db.transaction([this.storeName],this.consts.READ_WRITE);G.oncomplete=function(){B?x(A):T(!1)},G.onabort=T,G.onerror=T;var W=function(Q){A[V++][L]=Q.target.result,0===--N&&!j&&(j=!0,B=!0)};return A.forEach(function(Q){var Z,q=Q.key,J=function(ee){G.abort(),j||(j=!0,T(ee))};null!==this.keyPath?(this._addIdPropertyIfNeeded(Q),Z=G.objectStore(this.storeName).put(Q)):Z=G.objectStore(this.storeName).put(Q,q),Z.onsuccess=W,Z.onerror=J},this),G},removeBatch:function(A,P,x){var T=A.map(function(L){return{type:"remove",key:L}});return this.batch(T,P,x)},getBatch:function(A,P,x,T){if(x||(x=w),P||(P=E),T||(T="sparse"),"[object Array]"!=Object.prototype.toString.call(A))x(new Error("keyArray argument must be of type Array."));else if(0===A.length)return P([]);var L=[],N=A.length,B=!1,V=null,G=this.db.transaction([this.storeName],this.consts.READ_ONLY);G.oncomplete=function(){(B?P:x)(V)},G.onabort=x,G.onerror=x;var W=function(Q){Q.target.result||"dense"==T?L.push(Q.target.result):"sparse"==T&&L.length++,0===--N&&(!0,B=!0,V=L)};return A.forEach(function(Q){var q=function(Z){!0,V=Z,x(Z),G.abort()},J=G.objectStore(this.storeName).get(Q);J.onsuccess=W,J.onerror=q},this),G},getAll:function(A,P){P||(P=w),A||(A=E);var x=this.db.transaction([this.storeName],this.consts.READ_ONLY),T=x.objectStore(this.storeName);return T.getAll?this._getAllNative(x,T,A,P):this._getAllCursor(x,T,A,P),x},_getAllNative:function(A,P,x,T){var L=!1,N=null;A.oncomplete=function(){(L?x:T)(N)},A.onabort=T,A.onerror=T;var j=P.getAll();j.onsuccess=function(B){L=!0,N=B.target.result},j.onerror=T},_getAllCursor:function(A,P,x,T){var L=[],N=!1,j=null;A.oncomplete=function(){(N?x:T)(j)},A.onabort=T,A.onerror=T;var B=P.openCursor();B.onsuccess=function(V){var G=V.target.result;G?(L.push(G.value),G.continue()):(N=!0,j=L)},B.onError=T},clear:function(A,P){P||(P=w),A||(A=E);var x=!1,T=null,L=this.db.transaction([this.storeName],this.consts.READ_WRITE);L.oncomplete=function(){(x?A:P)(T)},L.onabort=P,L.onerror=P;var N=L.objectStore(this.storeName).clear();return N.onsuccess=function(j){x=!0,T=j.target.result},N.onerror=P,L},_addIdPropertyIfNeeded:function(A){typeof A[this.keyPath]>"u"&&(A[this.keyPath]=this._insertIdCount+++Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(A){return this.store.indexNames.contains(A)},normalizeIndexData:function(A){A.keyPath=A.keyPath||A.name,A.unique=!!A.unique,A.multiEntry=!!A.multiEntry},indexComplies:function(A,P){return["keyPath","unique","multiEntry"].every(function(T){if("multiEntry"==T&&void 0===A[T]&&!1===P[T])return!0;if("keyPath"==T&&"[object Array]"==Object.prototype.toString.call(P[T])){var L=P.keyPath,N=A.keyPath;if("string"==typeof N)return L.toString()==N;if("function"!=typeof N.contains&&"function"!=typeof N.indexOf||N.length!==L.length)return!1;for(var j=0,B=L.length;j{s.read=function(p,h,M,w,E){var l,m,y=8*E-w-1,b=(1<>1,_=-7,A=M?E-1:0,P=M?-1:1,x=p[h+A];for(A+=P,l=x&(1<<-_)-1,x>>=-_,_+=y;_>0;l=256*l+p[h+A],A+=P,_-=8);for(m=l&(1<<-_)-1,l>>=-_,_+=w;_>0;m=256*m+p[h+A],A+=P,_-=8);if(0===l)l=1-S;else{if(l===b)return m?NaN:1/0*(x?-1:1);m+=Math.pow(2,w),l-=S}return(x?-1:1)*m*Math.pow(2,l-w)},s.write=function(p,h,M,w,E,l){var m,y,b,S=8*l-E-1,_=(1<>1,P=23===E?Math.pow(2,-24)-Math.pow(2,-77):0,x=w?0:l-1,T=w?1:-1,L=h<0||0===h&&1/h<0?1:0;for(h=Math.abs(h),isNaN(h)||h===1/0?(y=isNaN(h)?1:0,m=_):(m=Math.floor(Math.log(h)/Math.LN2),h*(b=Math.pow(2,-m))<1&&(m--,b*=2),(h+=m+A>=1?P/b:P*Math.pow(2,1-A))*b>=2&&(m++,b/=2),m+A>=_?(y=0,m=_):m+A>=1?(y=(h*b-1)*Math.pow(2,E),m+=A):(y=h*Math.pow(2,A-1)*Math.pow(2,E),m=0));E>=8;p[M+x]=255&y,x+=T,y/=256,E-=8);for(m=m<0;p[M+x]=255&m,x+=T,m/=256,S-=8);p[M+x-T]|=128*L}},83894:ne=>{"function"==typeof Object.create?ne.exports=function(p,h){h&&(p.super_=h,p.prototype=Object.create(h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}))}:ne.exports=function(p,h){if(h){p.super_=h;var M=function(){};M.prototype=h.prototype,p.prototype=new M,p.prototype.constructor=p}}},13407:(ne,s,p)=>{"use strict";var h=p(46259)(),w=p(75834)("Object.prototype.toString"),E=function(b){return!(h&&b&&"object"==typeof b&&Symbol.toStringTag in b)&&"[object Arguments]"===w(b)},l=function(b){return!!E(b)||null!==b&&"object"==typeof b&&"number"==typeof b.length&&b.length>=0&&"[object Array]"!==w(b)&&"[object Function]"===w(b.callee)},m=function(){return E(arguments)}();E.isLegacyArguments=l,ne.exports=m?E:l},20110:(ne,s,p)=>{"use strict";var y,h=Object.prototype.toString,M=Function.prototype.toString,w=/^\s*(?:function)?\*/,E=p(46259)(),l=Object.getPrototypeOf;ne.exports=function(S){if("function"!=typeof S)return!1;if(w.test(M.call(S)))return!0;if(!E)return"[object GeneratorFunction]"===h.call(S);if(!l)return!1;if(typeof y>"u"){var A=function(){if(!E)return!1;try{return Function("return function*() {}")()}catch{}}();y=!!A&&l(A)}return l(S)===y}},48214:ne=>{"use strict";ne.exports=M,ne.exports.isMobile=M,ne.exports.default=M;const s=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,p=/CrOS/,h=/android|ipad|playbook|silk/i;function M(w){w||(w={});let E=w.ua;if(!E&&typeof navigator<"u"&&(E=navigator.userAgent),E&&E.headers&&"string"==typeof E.headers["user-agent"]&&(E=E.headers["user-agent"]),"string"!=typeof E)return!1;let l=s.test(E)&&!p.test(E)||!!w.tablet&&h.test(E);return!l&&w.tablet&&w.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==E.indexOf("Macintosh")&&-1!==E.indexOf("Safari")&&(l=!0),l}},55782:ne=>{var s=Object.prototype,p=s.hasOwnProperty,h=s.toString,M=function(l){return l!=l},w={boolean:1,number:1,string:1,undefined:1},E=ne.exports={};E.a=E.type=function(l,m){return typeof l===m},E.defined=function(l){return void 0!==l},E.empty=function(l){var y,m=h.call(l);if("[object Array]"===m||"[object Arguments]"===m)return 0===l.length;if("[object Object]"===m){for(y in l)if(p.call(l,y))return!1;return!0}return"[object String]"===m&&""===l},E.equal=function(l,m){var b,y=h.call(l);if(y!==h.call(m))return!1;if("[object Object]"===y){for(b in l)if(!E.equal(l[b],m[b]))return!1;return!0}if("[object Array]"===y){if((b=l.length)!==m.length)return!1;for(;--b;)if(!E.equal(l[b],m[b]))return!1;return!0}return"[object Function]"===y?l.prototype===m.prototype:"[object Date]"===y?l.getTime()===m.getTime():l===m},E.hosted=function(l,m){var y=typeof m[l];return"object"===y?!!m[l]:!w[y]},E.instance=E.instanceof=function(l,m){return l instanceof m},E.null=function(l){return null===l},E.undefined=function(l){return void 0===l},E.arguments=function(l){var m="[object Arguments]"===h.call(l),y=!E.array(l)&&E.arraylike(l)&&E.object(l)&&E.fn(l.callee);return m||y},E.array=function(l){return"[object Array]"===h.call(l)},E.arguments.empty=function(l){return E.arguments(l)&&0===l.length},E.array.empty=function(l){return E.array(l)&&0===l.length},E.arraylike=function(l){return!!l&&!E.boolean(l)&&p.call(l,"length")&&isFinite(l.length)&&E.number(l.length)&&l.length>=0},E.boolean=function(l){return"[object Boolean]"===h.call(l)},E.false=function(l){return E.boolean(l)&&(!1===l||!1===l.valueOf())},E.true=function(l){return E.boolean(l)&&(!0===l||!0===l.valueOf())},E.date=function(l){return"[object Date]"===h.call(l)},E.element=function(l){return void 0!==l&&typeof HTMLElement<"u"&&l instanceof HTMLElement&&1===l.nodeType},E.error=function(l){return"[object Error]"===h.call(l)},E.fn=E.function=function(l){return typeof window<"u"&&l===window.alert||"[object Function]"===h.call(l)},E.number=function(l){return"[object Number]"===h.call(l)},E.infinite=function(l){return l===1/0||l===-1/0},E.decimal=function(l){return E.number(l)&&!M(l)&&!E.infinite(l)&&l%1!=0},E.divisibleBy=function(l,m){var y=E.infinite(l),b=E.infinite(m),S=E.number(l)&&!M(l)&&E.number(m)&&!M(m)&&0!==m;return y||b||S&&l%m==0},E.int=function(l){return E.number(l)&&!M(l)&&l%1==0},E.maximum=function(l,m){if(M(l))throw new TypeError("NaN is not a valid value");if(!E.arraylike(m))throw new TypeError("second argument must be array-like");for(var y=m.length;--y>=0;)if(l=0;)if(l>m[y])return!1;return!0},E.nan=function(l){return!E.number(l)||l!=l},E.even=function(l){return E.infinite(l)||E.number(l)&&l==l&&l%2==0},E.odd=function(l){return E.infinite(l)||E.number(l)&&l==l&&l%2!=0},E.ge=function(l,m){if(M(l)||M(m))throw new TypeError("NaN is not a valid value");return!E.infinite(l)&&!E.infinite(m)&&l>=m},E.gt=function(l,m){if(M(l)||M(m))throw new TypeError("NaN is not a valid value");return!E.infinite(l)&&!E.infinite(m)&&l>m},E.le=function(l,m){if(M(l)||M(m))throw new TypeError("NaN is not a valid value");return!E.infinite(l)&&!E.infinite(m)&&l<=m},E.lt=function(l,m){if(M(l)||M(m))throw new TypeError("NaN is not a valid value");return!E.infinite(l)&&!E.infinite(m)&&l=m&&l<=y},E.object=function(l){return l&&"[object Object]"===h.call(l)},E.hash=function(l){return E.object(l)&&l.constructor===Object&&!l.nodeType&&!l.setInterval},E.regexp=function(l){return"[object RegExp]"===h.call(l)},E.string=function(l){return"[object String]"===h.call(l)}},66425:ne=>{ne.exports=Array.isArray||function(s){return"[object Array]"==Object.prototype.toString.call(s)}},40452:(ne,s,p)=>{var h=p(93172).Buffer;ne.exports=function M(w){return h.isBuffer(w)||/\[object (.+Array|Array.+)\]/.test(Object.prototype.toString.call(w))}},33024:(ne,s,p)=>{ne.exports=self.fetch||(self.fetch=p(75557).default||p(75557))},1520:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[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],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ne){return"[object Array]"===Object.prototype.toString.call(ne)}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ne){return"object"==typeof ne&&ne.buffer&&ne.buffer.constructor===ArrayBuffer});var createOutputMethod=function(ne,s){return function(p){return new Sha256(s,!0).update(p)[ne]()}},createMethod=function(ne){var s=createOutputMethod("hex",ne);NODE_JS&&(s=nodeWrap(s,ne)),s.create=function(){return new Sha256(ne)},s.update=function(M){return s.create().update(M)};for(var p=0;p>6,w[l++]=128|63&m):m<55296||m>=57344?(w[l++]=224|m>>12,w[l++]=128|m>>6&63,w[l++]=128|63&m):(m=65536+((1023&m)<<10|1023&ne.charCodeAt(++h)),w[l++]=240|m>>18,w[l++]=128|m>>12&63,w[l++]=128|m>>6&63,w[l++]=128|63&m);ne=w}else{if("object"!==M)throw new Error(ERROR);if(null===ne)throw new Error(ERROR);if(ARRAY_BUFFER&&ne.constructor===ArrayBuffer)ne=new Uint8Array(ne);else if(!(Array.isArray(ne)||ARRAY_BUFFER&&ArrayBuffer.isView(ne)))throw new Error(ERROR)}ne.length>64&&(ne=new Sha256(s,!0).update(ne).array());var y=[],b=[];for(h=0;h<64;++h){var S=ne[h]||0;y[h]=92^S,b[h]=54^S}Sha256.call(this,s,p),this.update(b),this.oKeyPad=y,this.inner=!0,this.sharedMemory=p}Sha256.prototype.update=function(ne){if(!this.finalized){var s,p=typeof ne;if("string"!==p){if("object"!==p)throw new Error(ERROR);if(null===ne)throw new Error(ERROR);if(ARRAY_BUFFER&&ne.constructor===ArrayBuffer)ne=new Uint8Array(ne);else if(!(Array.isArray(ne)||ARRAY_BUFFER&&ArrayBuffer.isView(ne)))throw new Error(ERROR);s=!0}for(var h,w,M=0,E=ne.length,l=this.blocks;M>2]|=ne[M]<>2]|=h<>2]|=(192|h>>6)<>2]|=(128|63&h)<=57344?(l[w>>2]|=(224|h>>12)<>2]|=(128|h>>6&63)<>2]|=(128|63&h)<>2]|=(240|h>>18)<>2]|=(128|h>>12&63)<>2]|=(128|h>>6&63)<>2]|=(128|63&h)<=64?(this.block=l[16],this.start=w-64,this.hash(),this.hashed=!0):this.start=w}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var ne=this.blocks,s=this.lastByteIndex;ne[16]=this.block,ne[s>>2]|=EXTRA[3&s],this.block=ne[16],s>=56&&(this.hashed||this.hash(),ne[0]=this.block,ne[16]=ne[1]=ne[2]=ne[3]=ne[4]=ne[5]=ne[6]=ne[7]=ne[8]=ne[9]=ne[10]=ne[11]=ne[12]=ne[13]=ne[14]=ne[15]=0),ne[14]=this.hBytes<<3|this.bytes>>>29,ne[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var y,b,S,_,A,T,L,N,j,ne=this.h0,s=this.h1,p=this.h2,h=this.h3,M=this.h4,w=this.h5,E=this.h6,l=this.h7,m=this.blocks;for(y=16;y<64;++y)b=((A=m[y-15])>>>7|A<<25)^(A>>>18|A<<14)^A>>>3,S=((A=m[y-2])>>>17|A<<15)^(A>>>19|A<<13)^A>>>10,m[y]=m[y-16]+b+m[y-7]+S<<0;for(j=s&p,y=0;y<64;y+=4)this.first?(this.is224?(T=300032,l=(A=m[0]-1413257819)-150054599<<0,h=A+24177077<<0):(T=704751109,l=(A=m[0]-210244248)-1521486534<<0,h=A+143694565<<0),this.first=!1):(b=(ne>>>2|ne<<30)^(ne>>>13|ne<<19)^(ne>>>22|ne<<10),_=(T=ne&s)^ne&p^j,l=h+(A=l+(S=(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7))+(M&w^~M&E)+K[y]+m[y])<<0,h=A+(b+_)<<0),b=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),_=(L=h&ne)^h&s^T,E=p+(A=E+(S=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&M^~l&w)+K[y+1]+m[y+1])<<0,b=((p=A+(b+_)<<0)>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),_=(N=p&h)^p&ne^L,w=s+(A=w+(S=(E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&l^~E&M)+K[y+2]+m[y+2])<<0,b=((s=A+(b+_)<<0)>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),_=(j=s&p)^s&h^N,M=ne+(A=M+(S=(w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7))+(w&E^~w&l)+K[y+3]+m[y+3])<<0,ne=A+(b+_)<<0;this.h0=this.h0+ne<<0,this.h1=this.h1+s<<0,this.h2=this.h2+p<<0,this.h3=this.h3+h<<0,this.h4=this.h4+M<<0,this.h5=this.h5+w<<0,this.h6=this.h6+E<<0,this.h7=this.h7+l<<0},Sha256.prototype.hex=function(){this.finalize();var ne=this.h0,s=this.h1,p=this.h2,h=this.h3,M=this.h4,w=this.h5,E=this.h6,l=this.h7,m=HEX_CHARS[ne>>28&15]+HEX_CHARS[ne>>24&15]+HEX_CHARS[ne>>20&15]+HEX_CHARS[ne>>16&15]+HEX_CHARS[ne>>12&15]+HEX_CHARS[ne>>8&15]+HEX_CHARS[ne>>4&15]+HEX_CHARS[15&ne]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]+HEX_CHARS[p>>28&15]+HEX_CHARS[p>>24&15]+HEX_CHARS[p>>20&15]+HEX_CHARS[p>>16&15]+HEX_CHARS[p>>12&15]+HEX_CHARS[p>>8&15]+HEX_CHARS[p>>4&15]+HEX_CHARS[15&p]+HEX_CHARS[h>>28&15]+HEX_CHARS[h>>24&15]+HEX_CHARS[h>>20&15]+HEX_CHARS[h>>16&15]+HEX_CHARS[h>>12&15]+HEX_CHARS[h>>8&15]+HEX_CHARS[h>>4&15]+HEX_CHARS[15&h]+HEX_CHARS[M>>28&15]+HEX_CHARS[M>>24&15]+HEX_CHARS[M>>20&15]+HEX_CHARS[M>>16&15]+HEX_CHARS[M>>12&15]+HEX_CHARS[M>>8&15]+HEX_CHARS[M>>4&15]+HEX_CHARS[15&M]+HEX_CHARS[w>>28&15]+HEX_CHARS[w>>24&15]+HEX_CHARS[w>>20&15]+HEX_CHARS[w>>16&15]+HEX_CHARS[w>>12&15]+HEX_CHARS[w>>8&15]+HEX_CHARS[w>>4&15]+HEX_CHARS[15&w]+HEX_CHARS[E>>28&15]+HEX_CHARS[E>>24&15]+HEX_CHARS[E>>20&15]+HEX_CHARS[E>>16&15]+HEX_CHARS[E>>12&15]+HEX_CHARS[E>>8&15]+HEX_CHARS[E>>4&15]+HEX_CHARS[15&E];return this.is224||(m+=HEX_CHARS[l>>28&15]+HEX_CHARS[l>>24&15]+HEX_CHARS[l>>20&15]+HEX_CHARS[l>>16&15]+HEX_CHARS[l>>12&15]+HEX_CHARS[l>>8&15]+HEX_CHARS[l>>4&15]+HEX_CHARS[15&l]),m},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var ne=this.h0,s=this.h1,p=this.h2,h=this.h3,M=this.h4,w=this.h5,E=this.h6,l=this.h7,m=[ne>>24&255,ne>>16&255,ne>>8&255,255&ne,s>>24&255,s>>16&255,s>>8&255,255&s,p>>24&255,p>>16&255,p>>8&255,255&p,h>>24&255,h>>16&255,h>>8&255,255&h,M>>24&255,M>>16&255,M>>8&255,255&M,w>>24&255,w>>16&255,w>>8&255,255&w,E>>24&255,E>>16&255,E>>8&255,255&E];return this.is224||m.push(l>>24&255,l>>16&255,l>>8&255,255&l),m},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var ne=new ArrayBuffer(this.is224?28:32),s=new DataView(ne);return s.setUint32(0,this.h0),s.setUint32(4,this.h1),s.setUint32(8,this.h2),s.setUint32(12,this.h3),s.setUint32(16,this.h4),s.setUint32(20,this.h5),s.setUint32(24,this.h6),this.is224||s.setUint32(28,this.h7),ne},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var ne=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(ne),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},54237:(ne,s,p)=>{var h;!function(){"use strict";var M="input is invalid type",E="object"==typeof window,l=E?window:{};l.JS_SHA3_NO_WINDOW&&(E=!1);var m=!E&&"object"==typeof self;!l.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?l=global:m&&(l=self);var b=!l.JS_SHA3_NO_COMMON_JS&&ne.exports,S=p.amdO,_=!l.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",A="0123456789abcdef".split(""),x=[4,1024,262144,67108864],N=[0,8,16,24],j=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],B=[224,256,384,512],V=[128,256],G=["hex","buffer","arrayBuffer","array","digest"],W={128:168,256:136};(l.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ye){return"[object Array]"===Object.prototype.toString.call(ye)}),_&&(l.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ye){return"object"==typeof ye&&ye.buffer&&ye.buffer.constructor===ArrayBuffer});for(var Q=function(ye,ve,ae){return function(fe){return new oe(ye,ve,ye).update(fe)[ae]()}},q=function(ye,ve,ae){return function(fe,pe){return new oe(ye,ve,pe).update(fe)[ae]()}},J=function(ye,ve,ae){return function(fe,pe,Se,ce){return D["cshake"+ye].update(fe,pe,Se,ce)[ae]()}},Z=function(ye,ve,ae){return function(fe,pe,Se,ce){return D["kmac"+ye].update(fe,pe,Se,ce)[ae]()}},ee=function(ye,ve,ae,fe){for(var pe=0;pe>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ae>>5,this.extraBytes=(31&ae)>>3;for(var fe=0;fe<50;++fe)this.s[fe]=0}function de(ye,ve,ae){oe.call(this,ye,ve,ae)}oe.prototype.update=function(ye){if(this.finalized)throw new Error("finalize already called");var ve,ae=typeof ye;if("string"!==ae){if("object"!==ae)throw new Error(M);if(null===ye)throw new Error(M);if(_&&ye.constructor===ArrayBuffer)ye=new Uint8Array(ye);else if(!(Array.isArray(ye)||_&&ArrayBuffer.isView(ye)))throw new Error(M);ve=!0}for(var Fe,lt,fe=this.blocks,pe=this.byteCount,Se=ye.length,ce=this.blockCount,be=0,Ne=this.s;be>2]|=ye[be]<>2]|=lt<>2]|=(192|lt>>6)<>2]|=(128|63<)<=57344?(fe[Fe>>2]|=(224|lt>>12)<>2]|=(128|lt>>6&63)<>2]|=(128|63<)<>2]|=(240|lt>>18)<>2]|=(128|lt>>12&63)<>2]|=(128|lt>>6&63)<>2]|=(128|63<)<=pe){for(this.start=Fe-pe,this.block=fe[ce],Fe=0;Fe>=8);ae>0;)pe.unshift(ae),ae=255&(ye>>=8),++fe;return ve?pe.push(fe):pe.unshift(fe),this.update(pe),pe.length},oe.prototype.encodeString=function(ye){var ve,ae=typeof ye;if("string"!==ae){if("object"!==ae)throw new Error(M);if(null===ye)throw new Error(M);if(_&&ye.constructor===ArrayBuffer)ye=new Uint8Array(ye);else if(!(Array.isArray(ye)||_&&ArrayBuffer.isView(ye)))throw new Error(M);ve=!0}var fe=0,pe=ye.length;if(ve)fe=pe;else for(var Se=0;Se=57344?fe+=3:(ce=65536+((1023&ce)<<10|1023&ye.charCodeAt(++Se)),fe+=4)}return fe+=this.encode(8*fe),this.update(ye),fe},oe.prototype.bytepad=function(ye,ve){for(var ae=this.encode(ve),fe=0;fe>2]|=this.padding[3&ve],this.lastByteIndex===this.byteCount)for(ye[0]=ye[ae],ve=1;ve>4&15]+A[15&be]+A[be>>12&15]+A[be>>8&15]+A[be>>20&15]+A[be>>16&15]+A[be>>28&15]+A[be>>24&15];Se%ye==0&&(Ie(ve),pe=0)}return fe&&(be=ve[pe],ce+=A[be>>4&15]+A[15&be],fe>1&&(ce+=A[be>>12&15]+A[be>>8&15]),fe>2&&(ce+=A[be>>20&15]+A[be>>16&15])),ce},oe.prototype.arrayBuffer=function(){this.finalize();var be,ye=this.blockCount,ve=this.s,ae=this.outputBlocks,fe=this.extraBytes,pe=0,Se=0,ce=this.outputBits>>3;be=fe?new ArrayBuffer(ae+1<<2):new ArrayBuffer(ce);for(var Ne=new Uint32Array(be);Se>8&255,ce[be+2]=Ne>>16&255,ce[be+3]=Ne>>24&255;Se%ye==0&&Ie(ve)}return fe&&(be=Se<<2,Ne=ve[pe],ce[be]=255&Ne,fe>1&&(ce[be+1]=Ne>>8&255),fe>2&&(ce[be+2]=Ne>>16&255)),ce},de.prototype=new oe,de.prototype.finalize=function(){return this.encode(this.outputBits,!0),oe.prototype.finalize.call(this)};var Ie=function(ye){var ve,ae,fe,pe,Se,ce,be,Ne,Fe,lt,Ge,He,Kt,tt,nt,Vt,ot,at,Gt,Re,Ae,Te,Be,Ve,mt,Ze,ct,hn,ft,At,wn,ze,Qe,Ht,pt,vt,$t,dt,gt,mn,ut,wt,Sn,yt,Et,_e,Ee,Me,me,Oe,Ke,it,Ye,qe,Bt,It,kt,Ot,Nt,Lt,nn,Yt,gn;for(fe=0;fe<48;fe+=2)pe=ye[0]^ye[10]^ye[20]^ye[30]^ye[40],Se=ye[1]^ye[11]^ye[21]^ye[31]^ye[41],ce=ye[2]^ye[12]^ye[22]^ye[32]^ye[42],be=ye[3]^ye[13]^ye[23]^ye[33]^ye[43],Ne=ye[4]^ye[14]^ye[24]^ye[34]^ye[44],Fe=ye[5]^ye[15]^ye[25]^ye[35]^ye[45],lt=ye[6]^ye[16]^ye[26]^ye[36]^ye[46],Ge=ye[7]^ye[17]^ye[27]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ye[13]<<12|ye[12]>>>20,ot=ye[12]<<12|ye[13]>>>20,Me=ye[22]<<10|ye[23]>>>22,me=ye[23]<<10|ye[22]>>>22,At=ye[33]<<13|ye[32]>>>19,wn=ye[32]<<13|ye[33]>>>19,Yt=ye[42]<<2|ye[43]>>>30,gn=ye[43]<<2|ye[42]>>>30,qe=ye[5]<<30|ye[4]>>>2,Bt=ye[4]<<30|ye[5]>>>2,vt=ye[14]<<6|ye[15]>>>26,$t=ye[15]<<6|ye[14]>>>26,at=ye[25]<<11|ye[24]>>>21,Gt=ye[24]<<11|ye[25]>>>21,Oe=ye[34]<<15|ye[35]>>>17,Ke=ye[35]<<15|ye[34]>>>17,ze=ye[45]<<29|ye[44]>>>3,Qe=ye[44]<<29|ye[45]>>>3,Ve=ye[6]<<28|ye[7]>>>4,mt=ye[7]<<28|ye[6]>>>4,It=ye[17]<<23|ye[16]>>>9,kt=ye[16]<<23|ye[17]>>>9,dt=ye[26]<<25|ye[27]>>>7,gt=ye[27]<<25|ye[26]>>>7,Re=ye[36]<<21|ye[37]>>>11,Ae=ye[37]<<21|ye[36]>>>11,it=ye[47]<<24|ye[46]>>>8,Ye=ye[46]<<24|ye[47]>>>8,yt=ye[8]<<27|ye[9]>>>5,Et=ye[9]<<27|ye[8]>>>5,Ze=ye[18]<<20|ye[19]>>>12,ct=ye[19]<<20|ye[18]>>>12,Ot=ye[29]<<7|ye[28]>>>25,Nt=ye[28]<<7|ye[29]>>>25,mn=ye[38]<<8|ye[39]>>>24,ut=ye[39]<<8|ye[38]>>>24,Te=ye[48]<<14|ye[49]>>>18,Be=ye[49]<<14|ye[48]>>>18,ye[0]=tt^~Vt&at,ye[1]=nt^~ot&Gt,ye[10]=Ve^~Ze&hn,ye[11]=mt^~ct&ft,ye[20]=Ht^~vt&dt,ye[21]=pt^~$t>,ye[30]=yt^~_e&Me,ye[31]=Et^~Ee&me,ye[40]=qe^~It&Ot,ye[41]=Bt^~kt&Nt,ye[2]=Vt^~at&Re,ye[3]=ot^~Gt&Ae,ye[12]=Ze^~hn&At,ye[13]=ct^~ft&wn,ye[22]=vt^~dt&mn,ye[23]=$t^~gt&ut,ye[32]=_e^~Me&Oe,ye[33]=Ee^~me&Ke,ye[42]=It^~Ot&Lt,ye[43]=kt^~Nt&nn,ye[4]=at^~Re&Te,ye[5]=Gt^~Ae&Be,ye[14]=hn^~At&ze,ye[15]=ft^~wn&Qe,ye[24]=dt^~mn&wt,ye[25]=gt^~ut&Sn,ye[34]=Me^~Oe&it,ye[35]=me^~Ke&Ye,ye[44]=Ot^~Lt&Yt,ye[45]=Nt^~nn&gn,ye[6]=Re^~Te&tt,ye[7]=Ae^~Be&nt,ye[16]=At^~ze&Ve,ye[17]=wn^~Qe&mt,ye[26]=mn^~wt&Ht,ye[27]=ut^~Sn&pt,ye[36]=Oe^~it&yt,ye[37]=Ke^~Ye&Et,ye[46]=Lt^~Yt&qe,ye[47]=nn^~gn&Bt,ye[8]=Te^~tt&Vt,ye[9]=Be^~nt&ot,ye[18]=ze^~Ve&Ze,ye[19]=Qe^~mt&ct,ye[28]=wt^~Ht&vt,ye[29]=Sn^~pt&$t,ye[38]=it^~yt&_e,ye[39]=Ye^~Et&Ee,ye[48]=Yt^~qe&It,ye[49]=gn^~Bt&kt,ye[0]^=j[fe],ye[1]^=j[fe+1]};if(b)ne.exports=D;else{for(z=0;z{"use strict";var s=ne.exports=function(M,w,E){"function"==typeof w&&(E=w,w={}),p(w,"function"==typeof(E=w.cb||E)?E:E.pre||function(){},E.post||function(){},M,"",M)};function p(M,w,E,l,m,y,b,S,_,A){if(l&&"object"==typeof l&&!Array.isArray(l)){for(var P in w(l,m,y,b,S,_,A),l){var x=l[P];if(Array.isArray(x)){if(P in s.arrayKeywords)for(var T=0;T{var h=p(73669),M=p(91050),w=p(68429),E=p(26788),l=p(46389),m=new Buffer(0),y={encode:function(A){return"string"==typeof A?A=new Buffer(A):A},decode:function(A){return Buffer.isBuffer(A)?A:new Buffer(A)},buffer:!0,type:"raw"},b=function(){},S=function(A){return A=A.toString(16),"00000000".slice(0,-A.length)+A};ne.exports=function(A,P){P||(P={});var x={},T=P.blockSize||65536,L=P.batch||100,N=new Buffer(T);A.put("\0","ignore",b);var j={},B=function(W,Q,q,J,Z){var ee=function(){--j[W].locks||delete j[W]},I=function(o){if(o.locks++,!o.block&&!Q)return o.block=q,void Z(null,o.block,ee);o.block||(o.block=new Buffer(T)),o.block.lengthee&&(Z=W.slice(ee),W=W.slice(0,ee)),this.bytesWritten+=W.length,this.blockLength+=W.length,this.blocks.push(W),W.lengthq._missing&&(a=a.slice(0,q._missing)),q._missing-=a.length,q._pause(!q.push(a)),!!q._missing))};this._reader.on("data",function(a){for(;a.key>I;)if(!o(N))return;o(a.value)}),this._reader.on("error",function(a){q.emit("error",a)}),this._reader.on("end",function(){q.push(null)}),M.call(this)};return E.inherits(G,M),G.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._reader.destroy(),process.nextTick(this.emit.bind(this,"close")))},G.prototype._pause=function(W){this._paused!==W&&(this._paused=W,this._paused?this._reader.pause():this._reader.resume())},G.prototype._read=function(){this._pause(!1)},x.remove=function(W,Q){Q=l(Q||b);var q=[],J=A.createKeyStream({start:W+"\xff",end:W+"\xff\xff"});J.on("error",Q),J.on("data",function(Z){q.push({type:"del",key:Z})}),J.on("end",function(){A.batch(q,Q)})},x.size=function(W,Q){w.last(A,{start:W+"\xff",end:W+"\xff\xff",valueEncoding:y},function(q,J,Z){return q&&"range not found"===q.message?Q(null,0):q?Q(q):J.slice(0,W.length+1)!==W+"\xff"?Q(null,0):void Q(null,parseInt(J.toString().slice(W.length+1),16)*T+Z.length)})},x.write=function(W,Q,q,J){if("function"==typeof q)return x.write(W,Q,null,q);q||(q={}),J||(J=b);var Z=x.createWriteStream(W,q);Z.on("error",J),Z.on("finish",function(){J()}),Z.write(Q),Z.end()},x.read=function(W,Q,q){if("function"==typeof Q)return x.read(W,null,Q);Q||(Q={});var J=x.createReadStream(W,Q),Z=[];J.on("error",q),J.on("data",function(ee){Z.push(ee)}),J.on("end",function(){q(null,1===Z.length?Z[0]:Buffer.concat(Z))})},x.createReadStream=function(W,Q){return new G(W,Q)},x.createWriteStream=function(W,Q){return new V(W,Q)},x}},60833:(ne,s,p)=>{ne.exports=l;var h=Object.keys||function(b){var S=[];for(var _ in b)S.push(_);return S},M=p(26156);M.inherits=p(83894);var w=p(28460),E=p(37067);function l(b){if(!(this instanceof l))return new l(b);w.call(this,b),E.call(this,b),b&&!1===b.readable&&(this.readable=!1),b&&!1===b.writable&&(this.writable=!1),this.allowHalfOpen=!0,b&&!1===b.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",m)}function m(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}M.inherits(l,w),function y(b,S){for(var _=0,A=b.length;_{ne.exports=w;var h=p(68081),M=p(26156);function w(E){if(!(this instanceof w))return new w(E);h.call(this,E)}M.inherits=p(83894),M.inherits(w,h),w.prototype._transform=function(E,l,m){m(null,E)}},28460:(ne,s,p)=>{ne.exports=S;var h=p(66425),M=p(93172).Buffer;S.ReadableState=b;var w=p(59069).EventEmitter;w.listenerCount||(w.listenerCount=function(a,d){return a.listeners(d).length});var E=p(295),l=p(26156);l.inherits=p(83894);var m,y=p(6297);function b(a,d){var g=p(60833),D=(a=a||{}).highWaterMark,F=a.objectMode?16:16384;this.highWaterMark=D||0===D?D:F,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!a.objectMode,d instanceof g&&(this.objectMode=this.objectMode||!!a.readableObjectMode),this.defaultEncoding=a.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,a.encoding&&(m||(m=p(15453).s),this.decoder=new m(a.encoding),this.encoding=a.encoding)}function S(a){p(60833);if(!(this instanceof S))return new S(a);this._readableState=new b(a,this),this.readable=!0,E.call(this)}function _(a,d,g,D,F){var z=function L(a,d){var g=null;return!l.isBuffer(d)&&!l.isString(d)&&!l.isNullOrUndefined(d)&&!a.objectMode&&(g=new TypeError("Invalid non-string/buffer chunk")),g}(d,g);if(z)a.emit("error",z);else if(l.isNullOrUndefined(g))d.reading=!1,d.ended||function N(a,d){if(d.decoder&&!d.ended){var g=d.decoder.end();g&&g.length&&(d.buffer.push(g),d.length+=d.objectMode?1:g.length)}d.ended=!0,j(a)}(a,d);else if(d.objectMode||g&&g.length>0)if(d.ended&&!F){var C=new Error("stream.push() after EOF");a.emit("error",C)}else if(d.endEmitted&&F){C=new Error("stream.unshift() after end event");a.emit("error",C)}else d.decoder&&!F&&!D&&(g=d.decoder.write(g)),F||(d.reading=!1),d.flowing&&0===d.length&&!d.sync?(a.emit("data",g),a.read(0)):(d.length+=d.objectMode?1:g.length,F?d.buffer.unshift(g):d.buffer.push(g),d.needReadable&&j(a)),function V(a,d){d.readingMore||(d.readingMore=!0,process.nextTick(function(){!function G(a,d){for(var g=d.length;!d.reading&&!d.flowing&&!d.ended&&d.lengthd.highWaterMark&&(d.highWaterMark=function x(a){if(a>=P)a=P;else{a--;for(var d=1;d<32;d<<=1)a|=a>>d;a++}return a}(a)),a>d.length?d.ended?d.length:(d.needReadable=!0,0):a)}function j(a){var d=a._readableState;d.needReadable=!1,d.emittedReadable||(y("emitReadable",d.flowing),d.emittedReadable=!0,d.sync?process.nextTick(function(){B(a)}):B(a))}function B(a){y("emit readable"),a.emit("readable"),J(a)}function J(a){var d=a._readableState;if(y("flow",d.flowing),d.flowing)do{var g=a.read()}while(null!==g&&d.flowing)}function Z(a,d){var C,g=d.buffer,D=d.length,F=!!d.decoder,z=!!d.objectMode;if(0===g.length)return null;if(0===D)C=null;else if(z)C=g.shift();else if(!a||a>=D)C=F?g.join(""):M.concat(g,D),g.length=0;else if(a0)throw new Error("endReadable called on non-empty stream");d.endEmitted||(d.ended=!0,process.nextTick(function(){!d.endEmitted&&0===d.length&&(d.endEmitted=!0,a.readable=!1,a.emit("end"))}))}S.prototype.read=function(a){y("read",a);var d=this._readableState,g=a;if((!l.isNumber(a)||a>0)&&(d.emittedReadable=!1),0===a&&d.needReadable&&(d.length>=d.highWaterMark||d.ended))return y("read: emitReadable",d.length,d.ended),0===d.length&&d.ended?ee(this):j(this),null;if(0===(a=T(a,d))&&d.ended)return 0===d.length&&ee(this),null;var F,D=d.needReadable;return y("need readable",D),(0===d.length||d.length-a0?Z(a,d):null,l.isNull(F)&&(d.needReadable=!0,a=0),d.length-=a,0===d.length&&!d.ended&&(d.needReadable=!0),g!==a&&d.ended&&0===d.length&&ee(this),l.isNull(F)||this.emit("data",F),F},S.prototype._read=function(a){this.emit("error",new Error("not implemented"))},S.prototype.pipe=function(a,d){var g=this,D=this._readableState;switch(D.pipesCount){case 0:D.pipes=a;break;case 1:D.pipes=[D.pipes,a];break;default:D.pipes.push(a)}D.pipesCount+=1,y("pipe count=%d opts=%j",D.pipesCount,d);var z=(!d||!1!==d.end)&&a!==process.stdout&&a!==process.stderr?f:se;function C(ve){y("onunpipe"),ve===g&&se()}function f(){y("onend"),a.end()}D.endEmitted?process.nextTick(z):g.once("end",z),a.on("unpipe",C);var k=function W(a){return function(){var d=a._readableState;y("pipeOnDrain",d.awaitDrain),d.awaitDrain&&d.awaitDrain--,0===d.awaitDrain&&w.listenerCount(a,"data")&&(d.flowing=!0,J(a))}}(g);function se(){y("cleanup"),a.removeListener("close",de),a.removeListener("finish",Ie),a.removeListener("drain",k),a.removeListener("error",oe),a.removeListener("unpipe",C),g.removeListener("end",f),g.removeListener("end",se),g.removeListener("data",te),D.awaitDrain&&(!a._writableState||a._writableState.needDrain)&&k()}function te(ve){y("ondata"),!1===a.write(ve)&&(y("false write response, pause",g._readableState.awaitDrain),g._readableState.awaitDrain++,g.pause())}function oe(ve){y("onerror",ve),ye(),a.removeListener("error",oe),0===w.listenerCount(a,"error")&&a.emit("error",ve)}function de(){a.removeListener("finish",Ie),ye()}function Ie(){y("onfinish"),a.removeListener("close",de),ye()}function ye(){y("unpipe"),g.unpipe(a)}return a.on("drain",k),g.on("data",te),a._events&&a._events.error?h(a._events.error)?a._events.error.unshift(oe):a._events.error=[oe,a._events.error]:a.on("error",oe),a.once("close",de),a.once("finish",Ie),a.emit("pipe",g),D.flowing||(y("pipe resume"),g.resume()),a},S.prototype.unpipe=function(a){var d=this._readableState;if(0===d.pipesCount)return this;if(1===d.pipesCount)return a&&a!==d.pipes||(a||(a=d.pipes),d.pipes=null,d.pipesCount=0,d.flowing=!1,a&&a.emit("unpipe",this)),this;if(!a){var g=d.pipes,D=d.pipesCount;d.pipes=null,d.pipesCount=0,d.flowing=!1;for(var F=0;F{ne.exports=l;var h=p(60833),M=p(26156);function w(y,b){this.afterTransform=function(S,_){return function E(y,b,S){var _=y._transformState;_.transforming=!1;var A=_.writecb;if(!A)return y.emit("error",new Error("no writecb in Transform class"));_.writechunk=null,_.writecb=null,M.isNullOrUndefined(S)||y.push(S),A&&A(b);var P=y._readableState;P.reading=!1,(P.needReadable||P.length{ne.exports=m;var h=p(93172).Buffer;m.WritableState=l;var M=p(26156);M.inherits=p(83894);var w=p(295);function E(Q,q,J){this.chunk=Q,this.encoding=q,this.callback=J}function l(Q,q){var J=p(60833),Z=(Q=Q||{}).highWaterMark,ee=Q.objectMode?16:16384;this.highWaterMark=Z||0===Z?Z:ee,this.objectMode=!!Q.objectMode,q instanceof J&&(this.objectMode=this.objectMode||!!Q.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var I=!1===Q.decodeStrings;this.decodeStrings=!I,this.defaultEncoding=Q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){!function T(Q,q){var J=Q._writableState,Z=J.sync,ee=J.writecb;if(function x(Q){Q.writing=!1,Q.writecb=null,Q.length-=Q.writelen,Q.writelen=0}(J),q)!function P(Q,q,J,Z,ee){J?process.nextTick(function(){q.pendingcb--,ee(Z)}):(q.pendingcb--,ee(Z)),Q._writableState.errorEmitted=!0,Q.emit("error",Z)}(Q,J,Z,q,ee);else{var I=B(Q,J);!I&&!J.corked&&!J.bufferProcessing&&J.buffer.length&&j(Q,J),Z?process.nextTick(function(){L(Q,J,I,ee)}):L(Q,J,I,ee)}}(q,o)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function m(Q){var q=p(60833);if(!(this instanceof m||this instanceof q))return new m(Q);this._writableState=new l(Q,this),this.writable=!0,w.call(this)}function A(Q,q,J,Z,ee,I,o){q.writelen=Z,q.writecb=o,q.writing=!0,q.sync=!0,J?Q._writev(ee,q.onwrite):Q._write(ee,I,q.onwrite),q.sync=!1}function L(Q,q,J,Z){J||function N(Q,q){0===q.length&&q.needDrain&&(q.needDrain=!1,Q.emit("drain"))}(Q,q),q.pendingcb--,Z(),G(Q,q)}function j(Q,q){if(q.bufferProcessing=!0,Q._writev&&q.buffer.length>1){for(var J=[],Z=0;Z{(s=ne.exports=p(28460)).Stream=p(295),s.Readable=s,s.Writable=p(37067),s.Duplex=p(60833),s.Transform=p(68081),s.PassThrough=p(43813),!process.browser&&"disable"===process.env.READABLE_STREAM&&(ne.exports=p(295))},73669:(ne,s,p)=>{ne.exports=p(37067)},37057:(ne,s,p)=>{var h=p(3161);Object.keys(h.code).forEach(function(M){var w=h.code[M];s[M]=function(E){var l=new Error(M+", "+w.description+(E?" '"+E+"'":""));return l.errno=w.errno,l.code=M,l.path=E,l}})},94115:(ne,s,p)=>{var h=p(2997),M=p(74162),w=p(95882),E=p(68429),l=p(46389),m=p(39199),y=p(37057),b=p(74514),S=p(1077),_=function(P,x,T){process.nextTick(function(){P(x,T)})},A=function(){};ne.exports=function(P,x){var T={};P=M(P);var L=w(P.sublevel("blobs"),x),N=b(P.sublevel("stats")),j=P.sublevel("links"),B=S(),V=[],G=Date.now();T.mkdir=function(Z,ee,I){if("function"==typeof ee)return T.mkdir(Z,null,ee);ee||(ee=m(777)),I||(I=A),N.follow(Z,function(o,a,d){return o&&"ENOENT"!==o.code?I(o):a?I(y.EEXIST(d)):void N.put(d,{type:"directory",mode:ee,size:4096},B.cb(d,I))})},T.rmdir=function(Z,ee){ee||(ee=A),N.follow(Z,function(I,o,a){if(I)return ee(I);T.readdir(a,function(d,g){return d?ee(d):g.length?ee(y.ENOTEMPTY(a)):void N.del(a,B.cb(a,ee))})})},T.readdir=function(Z,ee){N.follow(Z,function(I,o,a){return I?ee(I):o?o.isDirectory()?void N.list(a,ee):ee(y.ENOTDIR(a)):ee(y.ENOENT(a))})};var Q=function(Z,ee,I){ee(Z,function(o,a,d){if(o)return I(o);if(!a.isFile())return I(null,a);var g=a&&a.blob||d;L.size(g,function(D,F){if(D)return I(D);a.size=F,I(null,a)})})};T.stat=function(Z,ee){Q(Z,N.follow,ee)},T.lstat=function(Z,ee){Q(Z,N.get,ee)},T.exists=function(Z,ee){N.follow(Z,function(I){ee(!I)})};var q=function(Z,ee,I,o){o||(o=A),ee(Z,function(a,d,g){if(a)return o(a);N.update(g,{mode:I},B.cb(g,o))})};T.chmod=function(Z,ee,I){q(Z,N.follow,ee,I)},T.lchmod=function(Z,ee,I){q(Z,N.get,ee,I)};var J=function(Z,ee,I,o,a){a||(a=A),ee(Z,function(d,g,D){if(d)return a(d);N.update(D,{uid:I,gid:o},B.cb(D,a))})};return T.chown=function(Z,ee,I,o){J(Z,N.follow,ee,I,o)},T.lchown=function(Z,ee,I,o){J(Z,N.get,ee,I,o)},T.utimes=function(Z,ee,I,o){o||(o=A),N.follow(Z,function(a,d,g){if(a)return o(a);var D={};ee&&(D.atime=ee),I&&(D.mtime=I),N.update(g,D,B.cb(g,o))})},T.rename=function(Z,ee,I){I||(I=A),N.follow(Z,function(o,a,d){if(o)return I(o);var g=function(){I=B.cb(ee,B.cb(d,I)),N.put(ee,a,function(D){if(D)return I(D);N.del(d,I)})};N.follow(ee,function(D,F,z){return D&&"ENOENT"!==D.code?I(D):F?a.isDirectory()!==F.isDirectory()?I(y.EISDIR(d)):void(F.isDirectory()?T.readdir(z,function(C,f){return C?I(C):f.length?I(y.ENOTEMPTY(d)):void g()}):g()):g()})})},T.realpath=function(Z,ee,I){if("function"==typeof ee)return T.realpath(Z,null,ee);N.follow(Z,function(o,a,d){if(o)return I(o);I(null,d)})},T.writeFile=function(Z,ee,I,o){if("function"==typeof I)return T.writeFile(Z,ee,null,I);"string"==typeof I&&(I={encoding:I}),I||(I={}),o||(o=A),Buffer.isBuffer(ee)||(ee=new Buffer(ee,I.encoding||"utf-8"));var a=I.flags||"w";I.append="w"!==a[0],N.follow(Z,function(d,g,D){if(d&&"ENOENT"!==d.code)return o(d);if(g&&g.isDirectory())return o(y.EISDIR(D));if(g&&"x"===a[1])return o(y.EEXIST(D));var F=g&&g.blob||D;N.writable(D,function(z){if(z)return o(z);L.write(F,ee,I,function(C){if(C)return o(C);N.put(D,{ctime:g&&g.ctime,mtime:new Date,mode:I.mode||m(666),type:"file"},B.cb(D,o))})})})},T.appendFile=function(Z,ee,I,o){if("function"==typeof I)return T.appendFile(Z,ee,null,I);"string"==typeof I&&(I={encoding:I}),I||(I={}),I.flags="a",T.writeFile(Z,ee,I,o)},T.unlink=function(Z,ee){ee||(ee=A),N.get(Z,function(I,o,a){if(I)return ee(I);if(o.isDirectory())return ee(y.EISDIR(a));var d=function(D){E(j,{start:D+"\xff",end:D+"\xff\xff"},function(F){if(F)return L.remove(D,ee);ee()})};N.del(a,B.cb(a,function(D){return D?ee(D):o.link?function(){var D=o.link.slice(0,o.link.indexOf("\xff"));j.del(o.link,function(F){if(F)return ee(F);d(D)})}():void j.del(a+"\xff",function(F){if(F)return ee(F);d(a)})}))})},T.readFile=function(Z,ee,I){if("function"==typeof ee)return T.readFile(Z,null,ee);"string"==typeof ee&&(ee={encoding:ee}),ee||(ee={});ee.encoding,ee.flag;N.follow(Z,function(d,g,D){if(d)return I(d);if(g.isDirectory())return I(y.EISDIR(D));var F=g&&g.blob||D;L.read(F,function(z,C){if(z)return I(z);I(null,ee.encoding?C.toString(ee.encoding):C)})})},T.createReadStream=function(Z,ee){ee||(ee={});var I=!1,o=h.readable(function(a){N.follow(Z,function(d,g,D){if(d)return a(d);if(g.isDirectory())return a(y.EISDIR(D));var F=g&&g.blob||D,z=L.createReadStream(F,ee);o.emit("open"),z.on("end",function(){process.nextTick(function(){I||o.emit("close")})}),a(null,z)})});return o.on("close",function(){I=!0}),o},T.createWriteStream=function(Z,ee){ee||(ee={});var I=ee.flags||"w",o=!1,a=ee.mode||m(666);ee.append="a"===I[0];var d=h.writable(function(g){N.follow(Z,function(D,F,z){if(D&&"ENOENT"!==D.code)return g(D);if(F&&F.isDirectory())return g(y.EISDIR(z));if(F&&"x"===I[1])return g(y.EEXIST(z));var C=F&&F.blob||z;N.writable(C,function(f){if(f)return g(f);var se={ctime:F?F.ctime:new Date,mtime:new Date,mode:a,type:"file"};N.put(z,se,function(te){if(te)return g(te);var oe=L.createWriteStream(C,ee);d.emit("open"),oe.on("finish",function(){se.mtime=new Date,N.put(z,se,function(){B.change(z),o||d.emit("close")})}),g(null,oe)})})})});return d.on("close",function(){o=!0}),d},T.truncate=function(Z,ee,I){N.follow(Z,function(o,a,d){if(o)return I(o);var g=a&&a.blob||d;L.size(g,function(D,F){if(D)return I(D);N.writable(d,function(z){if(z)return I(z);if(I=l(B.cb(d,I)),!ee)return L.remove(g,I);var C=L.createWriteStream(g,{start:F{ne.exports=function s(p){return null!==p&&("object"==typeof p||"function"==typeof p)}},48505:(ne,s,p)=>{var h=p(78170);ne.exports=function M(){for(var w={},E=0;E{var h=p(63928),M=p(46389),w=p(39448),E=p(39199),l=p(90163),m=p(48505),y=p(37057),b=l({type:"directory",mode:E(777),size:4096}),S=function(A){return A="/"===A[0]?A:"/"+A,"/"===(A=h.normalize(A))?A:"/"===A[A.length-1]?A.slice(0,-1):A},_=function(A){var P=A.split("/").length.toString(36);return"0000000000".slice(P.length)+P+A};ne.exports=function(A){var P={};P.normalize=S,P.get=function(T,L){if("/"===(T=S(T)))return process.nextTick(L.bind(null,null,b,"/"));A.get(_(T),{valueEncoding:"json"},function(N,j){return N&&N.notFound?L(y.ENOENT(T),null,T):N?L(N,null,T):void L(null,l(j),T)})},P.writable=function(T,L){if("/"===(T=S(T)))return process.nextTick(L.bind(null,y.EPERM(T)));P.follow(h.dirname(T),function(N,j){return N?L(N):j.isDirectory()?void L(null,T):L(y.ENOTDIR(T))})},P.list=function(T,L){T=S(T);var N=_("/"===T?T:T+"/"),j=A.createKeyStream({start:N,end:N+"\xff"});L=M(L),j.on("error",L),j.pipe(w({encoding:"object"},function(B){B=B.map(function(V){return V.split("/").pop()}),L(null,B)}))};return P.follow=function(T,L){!function(T,L){var N="/",j=T.split("/").slice(1),B=function(){P.get(h.join(N,j.shift()),function(V,G,W){return V?L(V,G,T):(N=G.target||W,j.length?void B():L(null,G,W))})};B()}(S(T),function N(j,B,V){return j?L(j,null,V):B.target?P.get(B.target,N):void L(null,l(B),V)})},P.update=function(T,L,N){P.get(T,function(j,B,V){return j?N(j):"/"===V?N(y.EPERM(V)):void P.put(V,m(B,L),N)})},P.put=function(T,L,N){P.writable(T,function(j,B){if(j)return N(j);A.put(_(B),l(L),{valueEncoding:"json"},N)})},P.del=function(T,L){if("/"===(T=S(T)))return process.nextTick(L.bind(null,y.EPERM(T)));A.del(_(T),L)},P}},90163:ne=>{var s=function(h){return h?"string"==typeof h?new Date(h):h:new Date},p=function(h){this.uid=h.uid||0,this.gid=h.gid||0,this.mode=h.mode||0,this.size=h.size||0,this.mtime=s(h.mtime),this.atime=s(h.atime),this.ctime=s(h.ctime),this.type=h.type,this.target=h.target,this.link=h.link,this.blob=h.blob};p.prototype.isDirectory=function(){return"directory"===this.type},p.prototype.isFile=function(){return"file"===this.type},p.prototype.isBlockDevice=function(){return!1},p.prototype.isCharacterDevice=function(){return!1},p.prototype.isSymbolicLink=function(){return"symlink"===this.type},p.prototype.isFIFO=function(){return!1},p.prototype.isSocket=function(){return!1},ne.exports=function(h){return new p(h)}},1077:(ne,s,p)=>{var h=p(59069);ne.exports=function(){var M={},w=new h.EventEmitter;return w.watch=function(E,l){return M[E]||(M[E]=new h.EventEmitter,M[E].setMaxListeners(0)),l&&M[E].on("change",l),M[E]},w.watcher=function(E,l){var m=new h.EventEmitter,y=function(){m.emit("change","change",E)};return w.watch(E,y),l&&m.on("change",l),m.close=function(){w.unwatch(E,y)},m},w.unwatch=function(E,l){M[E]&&(l?M[E].removeListener("change",l):M[E].removeAllListeners("change"),M[E].listeners("change").length||delete M[E])},w.change=function(E){M[E]&&M[E].emit("change"),w.emit("change",E)},w.cb=function(E,l){return function(m,y){E&&w.change(E),l&&l(m,y)}},w}},55860:(ne,s,p)=>{var h=p(87241);ne.exports=function(w){var E=(w=h(w)).reverse,l=w.max||w.end,m=w.min||w.start,y=[m,l];return null!=m&&null!=l&&y.sort(),E&&(y=y.reverse()),w.start=y[0],w.end=y[1],delete w.min,delete w.max,w}},87241:ne=>{"use strict";function s(M){return Object.prototype.toString.call(M)}var p={isArray:function(M){return Array.isArray(M)||"object"==typeof M&&"[object Array]"===s(M)},isDate:function(M){return"object"==typeof M&&"[object Date]"===s(M)},isRegExp:function(M){return"object"==typeof M&&"[object RegExp]"===s(M)},getRegExpFlags:function(M){var w="";return M.global&&(w+="g"),M.ignoreCase&&(w+="i"),M.multiline&&(w+="m"),w}};function h(M,w,E,l){var m=[],y=[],b=typeof Buffer<"u";return typeof w>"u"&&(w=!0),typeof E>"u"&&(E=1/0),function S(_,A){if(null===_)return null;if(0==A)return _;var P,x;if("object"!=typeof _)return _;if(p.isArray(_))P=[];else if(p.isRegExp(_))P=new RegExp(_.source,p.getRegExpFlags(_)),_.lastIndex&&(P.lastIndex=_.lastIndex);else if(p.isDate(_))P=new Date(_.getTime());else{if(b&&Buffer.isBuffer(_))return P=new Buffer(_.length),_.copy(P),P;typeof l>"u"?(x=Object.getPrototypeOf(_),P=Object.create(x)):(P=Object.create(l),x=l)}if(w){var T=m.indexOf(_);if(-1!=T)return y[T];m.push(_),y.push(P)}for(var L in _){var N;x&&(N=Object.getOwnPropertyDescriptor(x,L)),(!N||null!=N.set)&&(P[L]=S(_[L],A-1))}return P}(M,E)}ne.exports=h,h.clonePrototype=function(M){if(null===M)return null;var w=function(){};return w.prototype=M,new w}},71175:(ne,s,p)=>{var h=p(77826);ne.exports=function(M){if(!M.hooks){var w=[],E=[];M.hooks={post:function(T,L){L||(L=T,T="");var N={test:h.checker(T),hook:L};return w.push(N),b(w,N)},pre:function(T,L){L||(L=T,T="");var N={test:h.checker(T),hook:L,safe:!1!==T.safe};return E.push(N),b(E,N)},posthooks:w,prehooks:E},M.on("put",function(T,L){S({type:"put",key:T,value:L})}),M.on("del",function(T,L){S({type:"del",key:T,value:L})}),M.on("batch",function(L){L.forEach(S)});var _=M.put,A=M.del,P=M.batch;M.put=function(T,L,N,j){return x(!1,[{key:T,value:L,type:"put"}],N,j)},M.del=function(T,L,N){return x(!1,[{key:T,type:"del"}],L,N)},M.batch=function(T,L,N){return x(!0,T,L,N)}}function l(T){return T&&("string"==typeof T?T:"string"==typeof T.prefix?T.prefix:"function"==typeof T.prefix?T.prefix():"")}function b(T,L){return function(){var N=T.indexOf(L);return!!~N&&(T.splice(N,1),!0)}}function S(T){T&&T.type&&w.forEach(function(L){L.test(T.key)&&L.hook(T)})}function x(T,L,N,j){try{L.forEach(function V(G,W){E.forEach(function(Q){if(Q.test(String(G.key))){var q={add:function(J,Z){if(typeof J>"u")return this;if(!1===J)return delete L[W];var ee=l(J.prefix)||l(Z)||Q.prefix||"";if(ee&&(J.prefix=ee),J.key=ee+J.key,Q.safe&&Q.test(String(J.key)))throw new Error("prehook cannot insert into own range");var I=J.keyEncoding||function m(T){if(T&&T._getKeyEncoding)return T._getKeyEncoding(T)}(J.prefix),o=J.valueEncoding||function y(T){if(T&&T._getValueEncoding)return T._getValueEncoding(T)}(J.prefix);return I&&(J.keyEncoding=I),o&&(J.valueEncoding=o),L.push(J),V(J,L.length-1),this},put:function(J,Z){return"object"==typeof J&&(J.type="put"),this.add(J,Z)},del:function(J,Z){return"object"==typeof J&&(J.type="del"),this.add(J,Z)},veto:function(){return this.add(!1)}};Q.hook.call(q,G,q.add,L)}})})}catch(V){return(j||N)(V)}if(1==(L=L.filter(function(V){return V&&V.type})).length&&!T){var B=L[0];return"put"==B.type?_.call(M,B.key,B.value,N,j):A.call(M,B.key,N,j)}return P.call(M,L,N,j)}}},77105:(ne,s,p)=>{ne.exports=b;var h=p(17294),M=p(30826).NI,w=p(26788),E=p(74148),l=p(40452),m=p(4205),y=p(28517);function b(_){if(!(this instanceof b))return new b(_);if(!_)throw new Error("constructor requires at least a location argument");this.IDBOptions={},this.location=_}w.inherits(b,M),b.prototype._open=function(_,A){var P=this,x={storeName:this.location,autoIncrement:!1,keyPath:null,onStoreReady:function(){A&&A(null,P.idb)},onError:function(T){A&&A(T)}};m(x,_),this.IDBOptions=x,this.idb=new h(x)},b.prototype._get=function(_,A,P){this.idb.get(_,function(x){if(void 0===x)return P(new Error("NotFound"));var T=!0;return!1===A.asBuffer&&(T=!1),A.raw&&(T=!1),T&&(x=x instanceof Uint8Array?y(x):new Buffer(String(x))),P(null,x,_)},P)},b.prototype._del=function(_,A,P){this.idb.remove(_,P,P)},b.prototype._put=function(_,A,P,x){A instanceof ArrayBuffer&&(A=y(new Uint8Array(A)));var T=this.convertEncoding(_,A,P);Buffer.isBuffer(T.value)&&("function"==typeof A.toArrayBuffer?T.value=new Uint8Array(A.toArrayBuffer()):T.value=new Uint8Array(A)),this.idb.put(T.key,T.value,function(){x()},x)},b.prototype.convertEncoding=function(_,A,P){if(P.raw)return{key:_,value:A};if(A){var x=A.toString();"NaN"===x&&(A="NaN")}var T=P.valueEncoding,L={key:_,value:A};return A&&(!T||"binary"!==T)&&"object"!=typeof L.value&&(L.value=x),L},b.prototype.iterator=function(_){return"object"!=typeof _&&(_={}),new E(this.idb,_)},b.prototype._batch=function(_,A,P){var T,L,N,j,B=[];if(0===_.length)return setTimeout(P,0);for(T=0;T<_.length;T++){N={},j=_[T],B[T]=N;var V=this.convertEncoding(j.key,j.value,A);for(L in j.key=V.key,j.value=V.value,j)"type"===L&&"del"==j[L]?N[L]="remove":N[L]=j[L]}return this.idb.batch(B,function(){P()},P)},b.prototype._close=function(_){this.idb.db.close(),_()},b.prototype._approximateSize=function(_,A,P){var x=new Error("Not implemented");if(P)return P(x);throw x},b.prototype._isBuffer=function(_){return Buffer.isBuffer(_)},b.destroy=function(_,A){if("object"==typeof _)var P=_.IDBOptions.storePrefix||"IDBWrapper-",x=_.location;else P="IDBWrapper-",x=_;var T=indexedDB.deleteDatabase(P+x);T.onsuccess=function(){A()},T.onerror=function(L){A(L)}};b.prototype._checkKeyValue=function(_,A){return null==_||null==_?new Error(A+" cannot be `null` or `undefined`"):l(_)&&0===_.byteLength?new Error(A+" cannot be an empty ArrayBuffer"):""===String(_)?new Error(A+" cannot be an empty String"):0===_.length?new Error(A+" cannot be an empty Array"):void 0}},74148:(ne,s,p)=>{var h=p(26788),M=p(30826).YI,w=p(52820);function E(l,m){m||(m={}),this.options=m,M.call(this,l),this._order=m.reverse?"DESC":"ASC",this._limit=m.limit,this._count=0,this._done=!1;var y=w.lowerBound(m),b=w.upperBound(m);try{this._keyRange=y||b?this.db.makeKeyRange({lower:y,upper:b,excludeLower:w.lowerBoundExclusive(m),excludeUpper:w.upperBoundExclusive(m)}):null}catch{this._keyRangeError=!0}this.callback=null}ne.exports=E,h.inherits(E,M),E.prototype.createIterator=function(){var l=this;l.iterator=l.db.iterate(function(){l.onItem.apply(l,arguments)},{keyRange:l._keyRange,autoContinue:!1,order:l._order,onError:function(m){console.log("horrible error",m)}})},E.prototype.onItem=function(l,m,y){if(!m&&this.callback)return this.callback(),void(this.callback=!1);var b=!0;this._limit&&this._limit>0&&this._count++>=this._limit&&(b=!1),b&&this.callback(!1,m.key,m.value),m&&m.continue()},E.prototype._next=function(l){return l?this._keyRangeError?l():(this._started||(this.createIterator(),this._started=!0),void(this.callback=l)):new Error("next() requires a callback argument")}},94442:ne=>{var s=Object.prototype.hasOwnProperty,p=Object.prototype.toString,h=function(M){var w="function"==typeof M&&!(M instanceof RegExp)||"[object Function]"===p.call(M);return!w&&typeof window<"u"&&(w=M===window.setTimeout||M===window.alert||M===window.confirm||M===window.prompt),w};ne.exports=function(w,E){if(!h(E))throw new TypeError("iterator must be a function");var l,m,y="string"==typeof w,b=w.length,S=arguments.length>2?arguments[2]:null;if(b===+b)for(l=0;l{ne.exports=Object.keys||p(5741)},71133:ne=>{var s=Object.prototype.toString;ne.exports=function(h){var M=s.call(h),w="[object Arguments]"===M;return w||(w="[object Array]"!==M&&null!==h&&"object"==typeof h&&"number"==typeof h.length&&h.length>=0&&"[object Function]"===s.call(h.callee)),w}},5741:(ne,s,p)=>{!function(){"use strict";var b,h=Object.prototype.hasOwnProperty,M=Object.prototype.toString,w=p(94442),E=p(71133),l=!{toString:null}.propertyIsEnumerable("toString"),m=function(){}.propertyIsEnumerable("prototype"),y=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];b=function(_){var A=null!==_&&"object"==typeof _,P="[object Function]"===M.call(_),x=E(_),T=[];if(!A&&!P&&!x)throw new TypeError("Object.keys called on a non-object");if(x)w(_,function(V){T.push(V)});else{var L,N=m&&P;for(L in _)(!N||"prototype"!==L)&&h.call(_,L)&&T.push(L)}if(l){var j=_.constructor,B=j&&j.prototype===_;w(y,function(V){(!B||"constructor"!==V)&&h.call(_,V)&&T.push(V)})}return T},ne.exports=b}()},2968:ne=>{ne.exports=function s(p){return null!==p&&("object"==typeof p||"function"==typeof p)}},4205:(ne,s,p)=>{var h=p(41638),M=p(2968);ne.exports=function w(){for(var E={},l=0;l{var h=p(72426);function w(m,y,b){y.limit=y.reverse?2:1;(function M(m,y,b){var S=[];return y.forEach(function(_){function A(P){!1!==b(_,P)&&S.forEach(function(x){x()})}m.on(_,A),S.push(function(){m.removeListener(_,A)})}),m})(m.createReadStream(y),["data","error","end"],function(_,A){if(y.reverse&&A&&y.start&&A.key.toString()>y.start)return!1;"error"==_?b(A):"end"==_?b(new Error("range not found"),null,null):b(null,A.key,A.value)})}(s=ne.exports=w).first=function E(m,y,b){return b||(b=y,y={}),y.reverse=!1,w(m,h(y),b)},s.last=function l(m,y,b){b||(b=y,y={});y.start;return y.reverse=!0,w(m,h(y),function(_,A,P){if(_){var x=y.start;y.start=null,w(m,y,function(T,L,N){if(!L)return b(_,null,null);var j=L.toString();j<=x&&(!y.end||j>=y.end)?b(T,L,N):b(_,null,null)})}else b(_,A,P)})}},72426:ne=>{ne.exports=function(p){var h=p.reverse,M=p.end,w=p.start,E=[w,M];return null!=w&&null!=M&&E.sort(),h&&(E=E.reverse()),p.start=E[0],p.end=E[1],p}},25904:ne=>{function s(M,w,E,l){var m={type:M,key:w,value:E,options:l};return l&&l.prefix&&(m.prefix=l.prefix,delete l.prefix),this._operations.push(m),this}function p(M){this._operations=[],this._sdb=M,this.put=s.bind(this,"put"),this.del=s.bind(this,"del")}var h=p.prototype;h.clear=function(){this._operations=[]},h.write=function(M){this._sdb.batch(this._operations,M)},ne.exports=p},74162:(ne,s,p)=>{p(59069).EventEmitter,process.nextTick;var w=p(91399),E=p(25904),l=p(55860),m=p(71175);ne.exports=function(y,b){function S(){}S.prototype=y;var _=new S;if(_.sublevel)return _;var A=(b=b||{}).sep=b.sep||"\xff";function P(T){return function(L){return(L=l(L=L||{})).reverse?L.start=L.start||A:L.end=L.end||A,T.call(_,L)}}_._options=b,m(_),_.sublevels={},_.sublevel=function(T,L){return _.sublevels[T]?_.sublevels[T]:new w(_,T,L||this._options)},_.methods={},_.prefix=function(T){return""+(T||"")},_.pre=function(T,L){return L||(L=T,T={max:A}),_.hooks.pre(T,L)},_.post=function(T,L){return L||(L=T,T={max:A}),_.hooks.post(T,L)},_.readStream=_.createReadStream=P(_.createReadStream),_.keyStream=_.createKeyStream=P(_.createKeyStream),_.valuesStream=_.createValueStream=P(_.createValueStream);var x=_.batch;return _.batch=function(T,L,N){if(!Array.isArray(T))return new E(_);T.forEach(function(j){j.prefix&&("function"==typeof j.prefix.prefix?j.key=j.prefix.prefix(j.key):"string"==typeof j.prefix&&(j.key=j.prefix+j.key))}),x.call(_,T,L,N)},_}},35510:(ne,s,p)=>{ne.exports=Object.keys||p(21079)},21079:(ne,s,p)=>{!function(){"use strict";var m,h=Object.prototype.hasOwnProperty,M=p(55782),w=p(7480),E=!{toString:null}.propertyIsEnumerable("toString"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];m=function(b){if(!M.object(b)&&!M.array(b))throw new TypeError("Object.keys called on a non-object");var S,_=[];for(S in b)h.call(b,S)&&_.push(S);return E&&w(l,function(A){h.call(b,A)&&_.push(A)}),_},ne.exports=m}()},41698:ne=>{ne.exports=function s(p){return null!==p&&("object"==typeof p||"function"==typeof p)}},34432:(ne,s,p)=>{var h=p(35510),M=p(41698);ne.exports=function w(){for(var E={},l=0;l{var h=p(59069).EventEmitter,M=p(26788).inherits,w=p(77826),E=p(55860),l=p(34432),m=p(25904);function y(P,x,T){if("string"==typeof T&&(console.error("db.sublevel(name, seperator) is depreciated"),console.error("use db.sublevel(name, {sep: separator})) if you must"),T={sep:T}),!(this instanceof y))return new y(P,x,T);if(!P)throw new Error("must provide db");if(!x)throw new Error("must provide prefix");(T=T||{}).sep=T.sep||"\xff",this._parent=P,this._options=T,this.options=T,this._prefix=x,this._root=_(this),P.sublevels[x]=this,this.sublevels={},this.methods={};var L=this;this.hooks={pre:function(){return L.pre.apply(L,arguments)},post:function(){return L.post.apply(L,arguments)}}}M(y,h);var b=y.prototype;function _(P){return P._parent?_(P._parent):P}b._key=function(P){var x=this._options.sep;return x+this._prefix+x+P},b._getOptsAndCb=function(P,x){return"function"==typeof P&&(x=P,P={}),{opts:l(P,this._options),cb:x}},b.sublevel=function(P,x){return this.sublevels[P]?this.sublevels[P]:new y(this,P,x||this._options)},b.put=function(P,x,T,L){var N=this._getOptsAndCb(T,L);this._root.put(this.prefix(P),x,N.opts,N.cb)},b.get=function(P,x,T){var L=this._getOptsAndCb(x,T);this._root.get(this.prefix(P),L.opts,L.cb)},b.del=function(P,x,T){var L=this._getOptsAndCb(x,T);this._root.del(this.prefix(P),L.opts,L.cb)},b.batch=function(P,x,T){if(!Array.isArray(P))return new m(this);var L=this,N=this._getOptsAndCb(x,T);P.forEach(function(j){"string"==typeof j.prefix?j.key=j.prefix+j.key:j.key=(j.prefix||L).prefix(j.key),j.prefix&&(j.prefix=null)}),this._root.batch(P,N.opts,N.cb)},b._getKeyEncoding=function(){return this.options.keyEncoding?this.options.keyEncoding:this._parent&&this._parent._getKeyEncoding?this._parent._getKeyEncoding():void 0},b._getValueEncoding=function(){return this.options.valueEncoding?this.options.valueEncoding:this._parent&&this._parent._getValueEncoding?this._parent._getValueEncoding():void 0},b.prefix=function(P){var x=this._options.sep;return this._parent.prefix()+x+this._prefix+x+(P||"")},b.keyStream=b.createKeyStream=function(P){return(P=P||{}).keys=!0,P.values=!1,this.createReadStream(P)},b.valueStream=b.createValueStream=function(P){return(P=P||{}).keys=!1,P.values=!0,P.keys=!1,this.createReadStream(P)},b.readStream=b.createReadStream=function(P){P=P||{};var x=_(this),T=this.prefix(),L=w.prefix(P,T);!function S(P,x){["valueEncoding","encoding","keyEncoding","reverse","values","keys","limit","fillCache"].forEach(function(T){x.hasOwnProperty(T)&&(P[T]=x[T])})}(L,l(P,this._options));var N=x.createReadStream(L);if(!1===L.values){var j;if(j=N.read)N.read=function(V){var G=j.call(this,V);return G&&(G=G.substring(T.length)),G};else{var B=N.emit;N.emit=function(V,G){"data"===V?B.call(this,"data",G.substring(T.length)):B.call(this,V,G)}}return N}return!1===L.keys||((j=N.read)?N.read=function(G){var W=j.call(this,G);return W&&(W.key=W.key.substring(T.length)),W}:N.on("data",function(G){G.key=G.key.substring(T.length)})),N},b.writeStream=b.createWriteStream=function(){var P=_(this),x=this.prefix(),T=P.createWriteStream.apply(P,arguments),L=T.write,N=this._options.encoding,j=this._options.valueEncoding,B=this._options.keyEncoding,V=!N&&!j&&!B;return T.write=V?function(G){return G.key=x+G.key,L.call(T,G)}:function(G){return G.key=x+G.key,N&&typeof G.encoding>"u"&&(G.encoding=N),j&&typeof G.valueEncoding>"u"&&(G.valueEncoding=j),B&&typeof G.keyEncoding>"u"&&(G.keyEncoding=B),L.call(T,G)},T},b.approximateSize=function(){var P=_(db);return P.approximateSize.apply(P,arguments)},b.pre=function(P,x){x||(x=P,P=null),P=w.prefix(P,this.prefix(),this._options.sep);var T=_(this._parent),L=this.prefix();return T.hooks.pre(E(P),function(N,j,B){x({key:N.key.substring(L.length),value:N.value,type:N.type},function(V,G){j(V,V.prefix?G:G||L)},B)})},b.post=function(P,x){x||(x=P,P=null);var T=_(this._parent),L=this.prefix();return P=w.prefix(P,L,this._options.sep),T.hooks.post(E(P),function(N){x({key:N.key.substring(L.length),value:N.value,type:N.type})})};ne.exports=y},31238:(ne,s,p)=>{var h=p(31404),M=p(24062).WriteError,w=h.getOptions,E=h.dispatchError;function l(m){this._levelup=m,this.batch=m.db.batch(),this.ops=[]}l.prototype.put=function(m,y,b){b=w(this._levelup,b);var S=h.encodeKey(m,b),_=h.encodeValue(y,b);try{this.batch.put(S,_)}catch(A){throw new M(A)}return this.ops.push({type:"put",key:S,value:_}),this},l.prototype.del=function(m,y){y=w(this._levelup,y);var b=h.encodeKey(m,y);try{this.batch.del(b)}catch(S){throw new M(S)}return this.ops.push({type:"del",key:b}),this},l.prototype.clear=function(){try{this.batch.clear()}catch(m){throw new M(m)}return this.ops=[],this},l.prototype.write=function(m){var y=this._levelup,b=this.ops;try{this.batch.write(function(S){if(S)return E(y,new M(S),m);y.emit("batch",b),m&&m()})}catch(S){throw new M(S)}},ne.exports=l},24062:(ne,s,p)=>{var h=p(3161).create,M=h("LevelUPError"),w=h("NotFoundError",M);w.prototype.notFound=!0,w.prototype.status=404,ne.exports={LevelUPError:M,InitializationError:h("InitializationError",M),OpenError:h("OpenError",M),ReadError:h("ReadError",M),WriteError:h("WriteError",M),NotFoundError:w,EncodingError:h("EncodingError",M)}},4427:(ne,s,p)=>{var h=p(59069).EventEmitter,M=p(26788).inherits,w=p(78677),E=p(3218),l=p(67125),m=p(24062).WriteError,y=p(24062).ReadError,b=p(24062).NotFoundError,S=p(24062).OpenError,_=p(24062).EncodingError,A=p(24062).InitializationError,P=p(31022),x=p(95011),T=p(31404),L=p(31238),N=T.getOptions,j=T.defaultOptions,B=T.getLevelDOWN,V=T.dispatchError;function G(q,J){return"function"==typeof q?q:J}function W(q,J,Z){if(!(this instanceof W))return new W(q,J,Z);var ee;if(h.call(this),this.setMaxListeners(1/0),"function"==typeof q?((J="object"==typeof J?J:{}).db=q,q=null):"object"==typeof q&&"function"==typeof q.db&&(J=q,q=null),"function"==typeof J&&(Z=J,J={}),(!J||"function"!=typeof J.db)&&"string"!=typeof q){if(ee=new A("Must provide a location for the database"),Z)return process.nextTick(function(){Z(ee)});throw ee}J=N(this,J),this.options=w(j,J),this._status="new",E(this,"location",q,"e"),this.open(Z)}function Q(q){return function(J,Z){B()[q](J,Z||function(){})}}M(W,h),W.prototype.open=function(q){var Z,ee,J=this;return this.isOpen()?(q&&process.nextTick(function(){q(null,J)}),this):this._isOpening()?q&&this.once("open",function(){q(null,J)}):(this.emit("opening"),this._status="opening",this.db=new l(this.location),Z=this.options.db||B(),void(ee=Z(this.location)).open(this.options,function(I){if(I)return V(J,new S(I),q);J.db.setDb(ee),J.db=ee,J._status="open",q&&q(null,J),J.emit("open"),J.emit("ready")}))},W.prototype.close=function(q){var J=this;if(this.isOpen())this._status="closing",this.db.close(function(){J._status="closed",J.emit("closed"),q&&q.apply(null,arguments)}),this.emit("closing"),this.db=null;else{if("closed"==this._status&&q)return process.nextTick(q);"closing"==this._status&&q?this.once("closed",q):this._isOpening()&&this.once("open",function(){J.close(q)})}},W.prototype.isOpen=function(){return"open"==this._status},W.prototype._isOpening=function(){return"opening"==this._status},W.prototype.isClosed=function(){return/^clos/.test(this._status)},W.prototype.get=function(q,J,Z){var I,ee=this;return"function"!=typeof(Z=G(J,Z))?V(this,new y("get() requires key and callback arguments")):this._isOpening()||this.isOpen()?(J=T.getOptions(this,J),I=T.encodeKey(q,J),J.asBuffer=T.isValueAsBuffer(J),void this.db.get(I,J,function(o,a){if(o)return o=/notfound/i.test(o)?new b("Key not found in database ["+q+"]",o):new y(o),V(ee,o,Z);if(Z){try{a=T.decodeValue(a,J)}catch(d){return Z(new _(d))}Z(null,a)}})):V(this,new y("Database is not open"),Z)},W.prototype.put=function(q,J,Z,ee){var o,a,I=this;return ee=G(Z,ee),null==q||null==J?V(this,new m("put() requires key and value arguments"),ee):this._isOpening()||this.isOpen()?(Z=N(this,Z),o=T.encodeKey(q,Z),a=T.encodeValue(J,Z),void this.db.put(o,a,Z,function(d){if(d)return V(I,new m(d),ee);I.emit("put",q,J),ee&&ee()})):V(this,new m("Database is not open"),ee)},W.prototype.del=function(q,J,Z){var I,ee=this;return Z=G(J,Z),null==q?V(this,new m("del() requires a key argument"),Z):this._isOpening()||this.isOpen()?(J=N(this,J),I=T.encodeKey(q,J),void this.db.del(I,J,function(o){if(o)return V(ee,new m(o),Z);ee.emit("del",q),Z&&Z()})):V(this,new m("Database is not open"),Z)},W.prototype.batch=function(q,J,Z){var I,o,a,ee=this;return arguments.length?(Z=G(J,Z),Array.isArray(q)?this._isOpening()||this.isOpen()?(J=N(this,J),I=J.keyEncoding,o=J.valueEncoding,a=q.map(function(d){if(void 0===d.type||void 0===d.key)return{};var F,g=d.keyEncoding||I,D=d.valueEncoding||d.encoding||o;return"utf8"!=g&&"binary"!=g||"utf8"!=D&&"binary"!=D?(F={type:d.type,key:T.encodeKey(d.key,J,d)},void 0!==d.value&&(F.value=T.encodeValue(d.value,J,d)),F):d}),void this.db.batch(a,J,function(d){if(d)return V(ee,new m(d),Z);ee.emit("batch",q),Z&&Z()})):V(this,new m("Database is not open"),Z):V(this,new m("batch() requires an array argument"),Z)):new L(this)},W.prototype.approximateSize=function(q,J,Z){var I,o,ee=this;return null==q||null==J||"function"!=typeof Z?V(this,new y("approximateSize() requires start, end and callback arguments"),Z):(I=T.encodeKey(q,this.options),o=T.encodeKey(J,this.options),this._isOpening()||this.isOpen()?void this.db.approximateSize(I,o,function(a,d){if(a)return V(ee,new S(a),Z);Z&&Z(null,d)}):V(this,new m("Database is not open"),Z))},W.prototype.readStream=W.prototype.createReadStream=function(q){var J=this;return q=w(this.options,q),new P(q,this,function(Z){return J.db.iterator(Z)})},W.prototype.keyStream=W.prototype.createKeyStream=function(q){return this.createReadStream(w(q,{keys:!0,values:!1}))},W.prototype.valueStream=W.prototype.createValueStream=function(q){return this.createReadStream(w(q,{keys:!1,values:!0}))},W.prototype.writeStream=W.prototype.createWriteStream=function(q){return new x(w(q),this)},W.prototype.toString=function(){return"LevelUP"},ne.exports=W,ne.exports.copy=T.copy,ne.exports.destroy=Q("destroy"),ne.exports.repair=Q("repair")},31022:(ne,s,p)=>{var h=p(55717).Readable,M=p(26788).inherits,w=p(78677),E=p(24062).EncodingError,l=p(31404),m={keys:!0,values:!0},y=function(P,x){return{key:l.decodeKey(P,this._options),value:l.decodeValue(x,this._options)}},b=function(P){return l.decodeKey(P,this._options)},S=function(P,x){return l.decodeValue(x,this._options)},_=function(){return null};function A(P,x,T){if(!(this instanceof A))return new A(P,x,T);h.call(this,{objectMode:!0,highWaterMark:P.highWaterMark}),this._db=x,P=this._options=w(m,P),this._keyEncoding=P.keyEncoding||P.encoding,this._valueEncoding=P.valueEncoding||P.encoding,typeof this._options.start<"u"&&(this._options.start=l.encodeKey(this._options.start,this._options)),typeof this._options.end<"u"&&(this._options.end=l.encodeKey(this._options.end,this._options)),"number"!=typeof this._options.limit&&(this._options.limit=-1),this._options.keyAsBuffer=l.isKeyAsBuffer(this._options),this._options.valueAsBuffer=l.isValueAsBuffer(this._options),this._makeData=this._options.keys&&this._options.values?y:this._options.keys?b:this._options.values?S:_;var L=this;this._db.isOpen()?this._iterator=T(this._options):this._db.once("ready",function(){L._destroyed||(L._iterator=T(L._options))})}M(A,h),A.prototype._read=function P(){var x=this;if(!x._db.isOpen())return x._db.once("ready",function(){P.call(x)});x._destroyed||x._iterator.next(function(T,L,N){if(T||void 0===L&&void 0===N)return!T&&!x._destroyed&&x.push(null),x._cleanup(T);try{N=x._makeData(L,N)}catch(j){return x._cleanup(new E(j))}x._destroyed||x.push(N)})},A.prototype._cleanup=function(P){if(!this._destroyed){this._destroyed=!0;var x=this;P&&x.emit("error",P),x._iterator?x._iterator.end(function(){x._iterator=null,x.emit("close")}):x.emit("close")}},A.prototype.destroy=function(){this._cleanup()},A.prototype.toString=function(){return"LevelUP.ReadStream"},ne.exports=A},31404:(ne,s,p)=>{var l,G,h=p(78677),M=p(24062).LevelUPError,w=["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le"],E={createIfMissing:!0,errorIfExists:!1,keyEncoding:"utf8",valueEncoding:"utf8",compression:!0},m=function(){function G(Q){return null==Q||Buffer.isBuffer(Q)}var W={};return W.utf8=W["utf-8"]={encode:function(Q){return G(Q)?Q:String(Q)},decode:function(Q){return Q},buffer:!1,type:"utf8"},W.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},w.forEach(function(Q){W[Q]||(W[Q]={encode:function(q){return G(q)?q:new Buffer(q,Q)},decode:function(q){return process.browser?q.toString(Q):q},buffer:!0,type:Q})}),W}(),y=(G={},w.forEach(function(W){G[W]={valueEncoding:W}}),G);function P(G,W){var Q=W&&W.keyEncoding||G.keyEncoding||"utf8";return m[Q]||Q}function x(G,W){var Q=W&&(W.valueEncoding||W.encoding)||G.valueEncoding||G.encoding||"utf8";return m[Q]||Q}ne.exports={defaultOptions:E,copy:function b(G,W,Q){G.readStream().pipe(W.writeStream()).on("close",Q||function(){}).on("error",Q||function(q){throw q})},getOptions:function S(G,W){var Q="string"==typeof W;return!Q&&W&&W.encoding&&!W.valueEncoding&&(W.valueEncoding=W.encoding),h(G&&G.options||{},Q?y[W]||y[E.valueEncoding]:W)},getLevelDOWN:function _(){if(l)return l;var Q,G=p(73619).v6.ct,W="Could not locate LevelDOWN, try `npm install leveldown`";try{Q=p(94093).version}catch{throw new M(W)}if(!p(61695).satisfies(Q,G))throw new M("Installed version of LevelDOWN ("+Q+") does not match required version ("+G+")");try{return l=p(70131)}catch{throw new M(W)}},dispatchError:function A(G,W,Q){return"function"==typeof Q?Q(W):G.emit("error",W)},encodeKey:function T(G,W,Q){return P(W,Q).encode(G)},encodeValue:function L(G,W,Q){return x(W,Q).encode(G)},isValueAsBuffer:function B(G,W){return x(G,W).buffer},isKeyAsBuffer:function V(G,W){return P(G,W).buffer},decodeValue:function j(G,W){return x(W).decode(G)},decodeKey:function N(G,W){return P(W).decode(G)}}},95011:(ne,s,p)=>{var h=p(295).Stream,M=p(26788).inherits,w=p(78677),E=p(5259),l=global.setImmediate||process.nextTick,m=p(31404).getOptions,y={type:"put"};function b(S,_){if(!(this instanceof b))return new b(S,_);h.call(this),this._options=w(y,m(_,S)),this._db=_,this._buffer=[],this._status="init",this._end=!1,this.writable=!0,this.readable=!1;var A=this,P=function(){A.writable&&(A._status="ready",A.emit("ready"),A._process())};_.isOpen()?l(P):_.once("ready",P)}M(b,h),b.prototype.write=function(S){return!!this.writable&&(this._buffer.push(S),"init"!=this._status&&this._processDelayed(),!(this._options.maxBufferLength&&this._buffer.length>this._options.maxBufferLength)||(this._writeBlock=!0,!1))},b.prototype.end=function(S){var _=this;S&&this.write(S),l(function(){_._end=!0,_._process()})},b.prototype.destroy=function(){this.writable=!1,this.end()},b.prototype.destroySoon=function(){this.end()},b.prototype.add=function(S){if(S.props)return S.props.Directory?S.pipe(this._db.writeStream(this._options)):(S.props.File||S.File||"File"==S.type)&&this._write(S),!0},b.prototype._processDelayed=function(){var S=this;l(function(){S._process()})},b.prototype._process=function(){var S,_=this;if("ready"==_._status||!_.writable)return _._buffer.length&&_.writable?(_._status="writing",S=_._buffer,_._buffer=[],_._db.batch(S.map(function(P){return{type:P.type||_._options.type,key:P.key,value:P.value,keyEncoding:P.keyEncoding||_._options.keyEncoding,valueEncoding:P.valueEncoding||P.encoding||_._options.valueEncoding}}),function(P){if(_.writable){if("closed"!=_._status&&(_._status="ready"),P)return _.writable=!1,_.emit("error",P);_._process()}}),void(_._writeBlock&&(_._writeBlock=!1,_.emit("drain")))):void(_._end&&"closed"!=_._status&&(_._status="closed",_.writable=!1,_.emit("close")));_._buffer.length&&"closed"!=_._status&&_._processDelayed()},b.prototype._write=function(S){var _=S.path||S.props.path,A=this;_&&S.pipe(E(function(P,x){if(P)return A.writable=!1,A.emit("error",P);A._options.fstreamRoot&&_.indexOf(A._options.fstreamRoot)>-1&&(_=_.substr(A._options.fstreamRoot.length+1)),A.write({key:_,value:x.slice(0)})}))},b.prototype.toString=function(){return"LevelUP.WriteStream"},ne.exports=b},5259:(ne,s,p)=>{var h=p(55717).Duplex;function w(E){if(!(this instanceof w))return new w(E);if(this._bufs=[],this.length=0,"function"==typeof E){this._callback=E;var l=function(m){this._callback&&(this._callback(m),this._callback=null)}.bind(this);this.on("pipe",function(m){m.on("error",l)}),this.on("unpipe",function(m){m.removeListener("error",l)})}else Buffer.isBuffer(E)?this.append(E):Array.isArray(E)&&E.forEach(function(m){Buffer.isBuffer(m)&&this.append(m)}.bind(this));h.call(this)}p(26788).inherits(w,h),w.prototype._offset=function(E){for(var y,l=0,m=0;mthis.length)&&(y=this.length),m>=this.length)return E||new Buffer(0);if(y<=0)return E||new Buffer(0);var T,L,b=!!E,S=this._offset(m),_=y-m,A=_,P=b&&l||0,x=S[1];if(0===m&&y==this.length){if(!b)return Buffer.concat(this._bufs);for(L=0;L(T=this._bufs[L].length-x))){this._bufs[L].copy(E,P,x,x+A);break}this._bufs[L].copy(E,P,x),P+=T,A-=T,x&&(x=0)}return E},w.prototype.toString=function(E,l,m){return this.slice(l,m).toString(E)},w.prototype.consume=function(E){for(;this._bufs.length;){if(!(E>this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(E),this.length-=E;break}E-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},w.prototype.duplicate=function(){for(var E=0,l=new w;E{ne.exports=l;var h=Object.keys||function(b){var S=[];for(var _ in b)S.push(_);return S},M=p(26156);M.inherits=p(83894);var w=p(94515),E=p(23699);function l(b){if(!(this instanceof l))return new l(b);w.call(this,b),E.call(this,b),b&&!1===b.readable&&(this.readable=!1),b&&!1===b.writable&&(this.writable=!1),this.allowHalfOpen=!0,b&&!1===b.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",m)}function m(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}M.inherits(l,w),function y(b,S){for(var _=0,A=b.length;_{ne.exports=w;var h=p(50596),M=p(26156);function w(E){if(!(this instanceof w))return new w(E);h.call(this,E)}M.inherits=p(83894),M.inherits(w,h),w.prototype._transform=function(E,l,m){m(null,E)}},94515:(ne,s,p)=>{ne.exports=b;var h=p(66425),M=p(93172).Buffer;b.ReadableState=y;var w=p(59069).EventEmitter;w.listenerCount||(w.listenerCount=function(o,a){return o.listeners(a).length});var m,E=p(295),l=p(26156);function y(o,a){var d=(o=o||{}).highWaterMark;this.highWaterMark=d||0===d?d:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!o.objectMode,this.defaultEncoding=o.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o.encoding&&(m||(m=p(15453).s),this.decoder=new m(o.encoding),this.encoding=o.encoding)}function b(o){if(!(this instanceof b))return new b(o);this._readableState=new y(o,this),this.readable=!0,E.call(this)}function S(o,a,d,g,D){var F=function T(o,a){var d=null;return!M.isBuffer(a)&&"string"!=typeof a&&null!=a&&!o.objectMode&&(d=new TypeError("Invalid non-string/buffer chunk")),d}(a,d);if(F)o.emit("error",F);else if(null==d)a.reading=!1,a.ended||function L(o,a){if(a.decoder&&!a.ended){var d=a.decoder.end();d&&d.length&&(a.buffer.push(d),a.length+=a.objectMode?1:d.length)}a.ended=!0,a.length>0?N(o):Z(o)}(o,a);else if(a.objectMode||d&&d.length>0)if(a.ended&&!D){var z=new Error("stream.push() after EOF");o.emit("error",z)}else if(a.endEmitted&&D){z=new Error("stream.unshift() after end event");o.emit("error",z)}else a.decoder&&!D&&!g&&(d=a.decoder.write(d)),a.length+=a.objectMode?1:d.length,D?a.buffer.unshift(d):(a.reading=!1,a.buffer.push(d)),a.needReadable&&N(o),function B(o,a){a.readingMore||(a.readingMore=!0,process.nextTick(function(){!function V(o,a){for(var d=a.length;!a.reading&&!a.flowing&&!a.ended&&a.lengtha.highWaterMark&&(a.highWaterMark=function P(o){if(o>=A)o=A;else{o--;for(var a=1;a<32;a<<=1)o|=o>>a;o++}return o}(o)),o>a.length?a.ended?a.length:(a.needReadable=!0,0):o)}function N(o){var a=o._readableState;a.needReadable=!1,!a.emittedReadable&&(a.emittedReadable=!0,a.sync?process.nextTick(function(){j(o)}):j(o))}function j(o){o.emit("readable")}function W(o){var d,a=o._readableState;function g(D,F,z){!1===D.write(d)&&a.awaitDrain++}for(a.awaitDrain=0;a.pipesCount&&null!==(d=o.read());)if(1===a.pipesCount?g(a.pipes):ee(a.pipes,g),o.emit("data",d),a.awaitDrain>0)return;if(0===a.pipesCount)return a.flowing=!1,void(w.listenerCount(o,"data")>0&&q(o));a.ranOut=!0}function Q(){this._readableState.ranOut&&(this._readableState.ranOut=!1,W(this))}function q(o,a){if(o._readableState.flowing)throw new Error("Cannot switch to old mode now.");var g=a||!1,D=!1;o.readable=!0,o.pipe=E.prototype.pipe,o.on=o.addListener=E.prototype.on,o.on("readable",function(){D=!0;for(var F;!g&&null!==(F=o.read());)o.emit("data",F);null===F&&(D=!1,o._readableState.needReadable=!0)}),o.pause=function(){g=!0,this.emit("pause")},o.resume=function(){g=!1,D?process.nextTick(function(){o.emit("readable")}):this.read(0),this.emit("resume")},o.emit("readable")}function J(o,a){var z,d=a.buffer,g=a.length,D=!!a.decoder,F=!!a.objectMode;if(0===d.length)return null;if(0===g)z=null;else if(F)z=d.shift();else if(!o||o>=g)z=D?d.join(""):M.concat(d,g),d.length=0;else if(o0)throw new Error("endReadable called on non-empty stream");!a.endEmitted&&a.calledRead&&(a.ended=!0,process.nextTick(function(){!a.endEmitted&&0===a.length&&(a.endEmitted=!0,o.readable=!1,o.emit("end"))}))}function ee(o,a){for(var d=0,g=o.length;d0)&&(a.emittedReadable=!1),0===o&&a.needReadable&&(a.length>=a.highWaterMark||a.ended))return N(this),null;if(0===(o=x(o,a))&&a.ended)return g=null,a.length>0&&a.decoder&&(g=J(o,a),a.length-=g.length),0===a.length&&Z(this),g;var D=a.needReadable;return a.length-o<=a.highWaterMark&&(D=!0),(a.ended||a.reading)&&(D=!1),D&&(a.reading=!0,a.sync=!0,0===a.length&&(a.needReadable=!0),this._read(a.highWaterMark),a.sync=!1),D&&!a.reading&&(o=x(d,a)),null===(g=o>0?J(o,a):null)&&(a.needReadable=!0,o=0),a.length-=o,0===a.length&&!a.ended&&(a.needReadable=!0),a.ended&&!a.endEmitted&&0===a.length&&Z(this),g},b.prototype._read=function(o){this.emit("error",new Error("not implemented"))},b.prototype.pipe=function(o,a){var d=this,g=this._readableState;switch(g.pipesCount){case 0:g.pipes=o;break;case 1:g.pipes=[g.pipes,o];break;default:g.pipes.push(o)}g.pipesCount+=1;var F=(!a||!1!==a.end)&&o!==process.stdout&&o!==process.stderr?C:k;function z(Ie){Ie===d&&k()}function C(){o.end()}g.endEmitted?process.nextTick(F):d.once("end",F),o.on("unpipe",z);var f=function G(o){return function(){var d=o._readableState;d.awaitDrain--,0===d.awaitDrain&&W(o)}}(d);function k(){o.removeListener("close",te),o.removeListener("finish",oe),o.removeListener("drain",f),o.removeListener("error",se),o.removeListener("unpipe",z),d.removeListener("end",C),d.removeListener("end",k),(!o._writableState||o._writableState.needDrain)&&f()}function se(Ie){de(),o.removeListener("error",se),0===w.listenerCount(o,"error")&&o.emit("error",Ie)}function te(){o.removeListener("finish",oe),de()}function oe(){o.removeListener("close",te),de()}function de(){d.unpipe(o)}return o.on("drain",f),o._events&&o._events.error?h(o._events.error)?o._events.error.unshift(se):o._events.error=[se,o._events.error]:o.on("error",se),o.once("close",te),o.once("finish",oe),o.emit("pipe",d),g.flowing||(this.on("readable",Q),g.flowing=!0,process.nextTick(function(){W(d)})),o},b.prototype.unpipe=function(o){var a=this._readableState;if(0===a.pipesCount)return this;if(1===a.pipesCount)return o&&o!==a.pipes||(o||(o=a.pipes),a.pipes=null,a.pipesCount=0,this.removeListener("readable",Q),a.flowing=!1,o&&o.emit("unpipe",this)),this;if(!o){var d=a.pipes,g=a.pipesCount;a.pipes=null,a.pipesCount=0,this.removeListener("readable",Q),a.flowing=!1;for(var D=0;D"u"&&(this[D]=function(z){return function(){return o[z].apply(o,arguments)}}(D));return ee(["error","close","destroy","pause","resume"],function(z){o.on(z,g.emit.bind(g,z))}),g._read=function(z){d&&(d=!1,o.resume())},g},b._fromList=J},50596:(ne,s,p)=>{ne.exports=l;var h=p(66958),M=p(26156);function w(y,b){this.afterTransform=function(S,_){return function E(y,b,S){var _=y._transformState;_.transforming=!1;var A=_.writecb;if(!A)return y.emit("error",new Error("no writecb in Transform class"));_.writechunk=null,_.writecb=null,null!=S&&y.push(S),A&&A(b);var P=y._readableState;P.reading=!1,(P.needReadable||P.length{ne.exports=m;var h=p(93172).Buffer;m.WritableState=l;var M=p(26156);M.inherits=p(83894);var w=p(295);function E(W,Q,q){this.chunk=W,this.encoding=Q,this.callback=q}function l(W,Q){var q=(W=W||{}).highWaterMark;this.highWaterMark=q||0===q?q:16384,this.objectMode=!!W.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var J=!1===W.decodeStrings;this.decodeStrings=!J,this.defaultEncoding=W.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Z){!function T(W,Q){var q=W._writableState,J=q.sync,Z=q.writecb;if(function x(W){W.writing=!1,W.writecb=null,W.length-=W.writelen,W.writelen=0}(q),Q)!function P(W,Q,q,J,Z){q?process.nextTick(function(){Z(J)}):Z(J),W._writableState.errorEmitted=!0,W.emit("error",J)}(W,0,J,Q,Z);else{var ee=B(W,q);!ee&&!q.bufferProcessing&&q.buffer.length&&function j(W,Q){Q.bufferProcessing=!0;for(var q=0;q{var h=p(295);(s=ne.exports=p(94515)).Stream=h,s.Readable=s,s.Writable=p(23699),s.Duplex=p(66958),s.Transform=p(50596),s.PassThrough=p(44467),!process.browser&&"disable"===process.env.READABLE_STREAM&&(ne.exports=p(295))},88222:(ne,s,p)=>{ne=p.nmd(ne);var h=200,M="__lodash_hash_undefined__",w=1,E=2,l=9007199254740991,m="[object Arguments]",y="[object Array]",b="[object AsyncFunction]",S="[object Boolean]",_="[object Date]",A="[object Error]",P="[object Function]",x="[object GeneratorFunction]",T="[object Map]",L="[object Number]",N="[object Null]",j="[object Object]",B="[object Promise]",V="[object Proxy]",G="[object RegExp]",W="[object Set]",Q="[object String]",q="[object Symbol]",J="[object Undefined]",Z="[object WeakMap]",ee="[object ArrayBuffer]",I="[object DataView]",se=/^\[object .+?Constructor\]$/,te=/^(?:0|[1-9]\d*)$/,oe={};oe["[object Float32Array]"]=oe["[object Float64Array]"]=oe["[object Int8Array]"]=oe["[object Int16Array]"]=oe["[object Int32Array]"]=oe["[object Uint8Array]"]=oe["[object Uint8ClampedArray]"]=oe["[object Uint16Array]"]=oe["[object Uint32Array]"]=!0,oe[m]=oe[y]=oe[ee]=oe[S]=oe[I]=oe[_]=oe[A]=oe[P]=oe[T]=oe[L]=oe[j]=oe[G]=oe[W]=oe[Q]=oe[Z]=!1;var de="object"==typeof global&&global&&global.Object===Object&&global,Ie="object"==typeof self&&self&&self.Object===Object&&self,ye=de||Ie||Function("return this")(),ve=s&&!s.nodeType&&s,ae=ve&&ne&&!ne.nodeType&&ne,fe=ae&&ae.exports===ve,pe=fe&&de.process,Se=function(){try{return pe&&pe.binding&&pe.binding("util")}catch{}}(),ce=Se&&Se.isTypedArray;function Fe(et,_t){for(var en=-1,In=null==et?0:et.length;++enri))return!1;var Zr=lr.get(et);if(Zr&&lr.get(_t))return Zr==_t;var er=-1,so=!0,Ii=en&E?new Ut:void 0;for(lr.set(et,_t),lr.set(_t,et);++er-1},qe.prototype.set=function Nt(et,_t){var en=this.__data__,In=jt(en,et);return In<0?(++this.size,en.push([et,_t])):en[In][1]=_t,this},Lt.prototype.clear=function nn(){this.size=0,this.__data__={hash:new Me,map:new(vt||qe),string:new Me}},Lt.prototype.delete=function Yt(et){var _t=wr(this,et).delete(et);return this.size-=_t?1:0,_t},Lt.prototype.get=function gn(et){return wr(this,et).get(et)},Lt.prototype.has=function an(et){return wr(this,et).has(et)},Lt.prototype.set=function tn(et,_t){var en=wr(this,et),In=en.size;return en.set(et,_t),this.size+=en.size==In?0:1,this},Ut.prototype.add=Ut.prototype.push=function cn(et){return this.__data__.set(et,M),this},Ut.prototype.has=function Jt(et){return this.__data__.has(et)},Zt.prototype.clear=function fn(){this.__data__=new qe,this.size=0},Zt.prototype.delete=function Qt(et){var _t=this.__data__,en=_t.delete(et);return this.size=_t.size,en},Zt.prototype.get=function Dt(et){return this.__data__.get(et)},Zt.prototype.has=function Mt(et){return this.__data__.has(et)},Zt.prototype.set=function Xt(et,_t){var en=this.__data__;if(en instanceof qe){var In=en.__data__;if(!vt||In.length-1&&et%1==0&&et<_t}function go(et){if(null!=et){try{return Ae.call(et)}catch{}try{return et+""}catch{}}return""}function ss(et,_t){return et===_t||et!=et&&_t!=_t}(pt&&Sr(new pt(new ArrayBuffer(1)))!=I||vt&&Sr(new vt)!=T||$t&&Sr($t.resolve())!=B||dt&&Sr(new dt)!=W||gt&&Sr(new gt)!=Z)&&(Sr=function(et){var _t=On(et),en=_t==j?et.constructor:void 0,In=en?go(en):"";if(In)switch(In){case ut:return I;case wt:return T;case Sn:return B;case yt:return W;case Et:return Z}return _t});var as=Kn(function(){return arguments}())?Kn:function(et){return tu(et)&&Te.call(et,"callee")&&!ft.call(et,"callee")},zo=Array.isArray;var Sa=Qe||function Yp(){return!1};function Ff(et){if(!eu(et))return!1;var _t=On(et);return _t==P||_t==x||_t==b||_t==V}function Il(et){return"number"==typeof et&&et>-1&&et%1==0&&et<=l}function eu(et){var _t=typeof et;return null!=et&&("object"==_t||"function"==_t)}function tu(et){return null!=et&&"object"==typeof et}var Cl=ce?function Ge(et){return function(_t){return et(_t)}}(ce):function Qn(et){return tu(et)&&Il(et.length)&&!!oe[On(et)]};function xl(et){return function Uu(et){return null!=et&&Il(et.length)&&!Ff(et)}(et)?Ft(et):cr(et)}ne.exports=function us(et,_t){return jn(et,_t)}},52820:(ne,s)=>{function p(P){return void 0!==P&&""!==P}function h(P,x){return Object.hasOwnProperty.call(P,x)}function M(P,x){return Object.hasOwnProperty.call(P,x)&&x}s.compare=function(P,x){if(Buffer.isBuffer(P)){for(var T=Math.min(P.length,x.length),L=0;Lx?1:0};var w=s.lowerBoundKey=function(P){return M(P,"gt")||M(P,"gte")||M(P,"min")||(P.reverse?M(P,"end"):M(P,"start"))||void 0},E=s.lowerBound=function(P,x){var T=w(P);return T?P[T]:x},l=s.lowerBoundInclusive=function(P){return!h(P,"gt")},m=s.upperBoundInclusive=function(P){return!h(P,"lt")},y=s.lowerBoundExclusive=function(P){return!l(P)},b=s.upperBoundExclusive=function(P){return!m(P)},S=s.upperBoundKey=function(P){return M(P,"lt")||M(P,"lte")||M(P,"max")||(P.reverse?M(P,"start"):M(P,"end"))||void 0},_=s.upperBound=function(P,x){var T=S(P);return T?P[T]:x};function A(P){return P}s.start=function(P,x){return P.reverse?_(P,x):E(P,x)},s.end=function(P,x){return P.reverse?E(P,x):_(P,x)},s.startInclusive=function(P){return P.reverse?m(P):l(P)},s.endInclusive=function(P){return P.reverse?l(P):m(P)},s.toLtgt=function(P,x,T,L,N){x=x||{},T=T||A;var j=arguments.length>3,B=s.lowerBoundKey(P),V=s.upperBoundKey(P);return B?"gt"===B?x.gt=T(P.gt,!1):x.gte=T(P[B],!1):j&&(x.gte=T(L,!1)),V?"lt"===V?x.lt=T(P.lt,!0):x.lte=T(P[V],!0):j&&(x.lte=T(N,!0)),null!=P.reverse&&(x.reverse=!!P.reverse),h(x,"max")&&delete x.max,h(x,"min")&&delete x.min,h(x,"start")&&delete x.start,h(x,"end")&&delete x.end,x},s.contains=function(P,x,T){T=T||s.compare;var L=E(P);if(p(L)&&((N=T(x,L))<0||0===N&&y(P)))return!1;var N,j=_(P);if(p(j)&&((N=T(x,j))>0||0===N&&b(P)))return!1;return!0},s.filter=function(P,x){return function(T){return s.contains(P,T,x)}}},8095:(ne,s,p)=>{"use strict";var h=p(83894),M=p(39650),w=p(73502).Buffer,E=new Array(16);function l(){M.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function m(A,P){return A<>>32-P}function y(A,P,x,T,L,N,j){return m(A+(P&x|~P&T)+L+N|0,j)+P|0}function b(A,P,x,T,L,N,j){return m(A+(P&T|x&~T)+L+N|0,j)+P|0}function S(A,P,x,T,L,N,j){return m(A+(P^x^T)+L+N|0,j)+P|0}function _(A,P,x,T,L,N,j){return m(A+(x^(P|~T))+L+N|0,j)+P|0}h(l,M),l.prototype._update=function(){for(var A=E,P=0;P<16;++P)A[P]=this._block.readInt32LE(4*P);var x=this._a,T=this._b,L=this._c,N=this._d;x=y(x,T,L,N,A[0],3614090360,7),N=y(N,x,T,L,A[1],3905402710,12),L=y(L,N,x,T,A[2],606105819,17),T=y(T,L,N,x,A[3],3250441966,22),x=y(x,T,L,N,A[4],4118548399,7),N=y(N,x,T,L,A[5],1200080426,12),L=y(L,N,x,T,A[6],2821735955,17),T=y(T,L,N,x,A[7],4249261313,22),x=y(x,T,L,N,A[8],1770035416,7),N=y(N,x,T,L,A[9],2336552879,12),L=y(L,N,x,T,A[10],4294925233,17),T=y(T,L,N,x,A[11],2304563134,22),x=y(x,T,L,N,A[12],1804603682,7),N=y(N,x,T,L,A[13],4254626195,12),L=y(L,N,x,T,A[14],2792965006,17),x=b(x,T=y(T,L,N,x,A[15],1236535329,22),L,N,A[1],4129170786,5),N=b(N,x,T,L,A[6],3225465664,9),L=b(L,N,x,T,A[11],643717713,14),T=b(T,L,N,x,A[0],3921069994,20),x=b(x,T,L,N,A[5],3593408605,5),N=b(N,x,T,L,A[10],38016083,9),L=b(L,N,x,T,A[15],3634488961,14),T=b(T,L,N,x,A[4],3889429448,20),x=b(x,T,L,N,A[9],568446438,5),N=b(N,x,T,L,A[14],3275163606,9),L=b(L,N,x,T,A[3],4107603335,14),T=b(T,L,N,x,A[8],1163531501,20),x=b(x,T,L,N,A[13],2850285829,5),N=b(N,x,T,L,A[2],4243563512,9),L=b(L,N,x,T,A[7],1735328473,14),x=S(x,T=b(T,L,N,x,A[12],2368359562,20),L,N,A[5],4294588738,4),N=S(N,x,T,L,A[8],2272392833,11),L=S(L,N,x,T,A[11],1839030562,16),T=S(T,L,N,x,A[14],4259657740,23),x=S(x,T,L,N,A[1],2763975236,4),N=S(N,x,T,L,A[4],1272893353,11),L=S(L,N,x,T,A[7],4139469664,16),T=S(T,L,N,x,A[10],3200236656,23),x=S(x,T,L,N,A[13],681279174,4),N=S(N,x,T,L,A[0],3936430074,11),L=S(L,N,x,T,A[3],3572445317,16),T=S(T,L,N,x,A[6],76029189,23),x=S(x,T,L,N,A[9],3654602809,4),N=S(N,x,T,L,A[12],3873151461,11),L=S(L,N,x,T,A[15],530742520,16),x=_(x,T=S(T,L,N,x,A[2],3299628645,23),L,N,A[0],4096336452,6),N=_(N,x,T,L,A[7],1126891415,10),L=_(L,N,x,T,A[14],2878612391,15),T=_(T,L,N,x,A[5],4237533241,21),x=_(x,T,L,N,A[12],1700485571,6),N=_(N,x,T,L,A[3],2399980690,10),L=_(L,N,x,T,A[10],4293915773,15),T=_(T,L,N,x,A[1],2240044497,21),x=_(x,T,L,N,A[8],1873313359,6),N=_(N,x,T,L,A[15],4264355552,10),L=_(L,N,x,T,A[6],2734768916,15),T=_(T,L,N,x,A[13],1309151649,21),x=_(x,T,L,N,A[4],4149444226,6),N=_(N,x,T,L,A[11],3174756917,10),L=_(L,N,x,T,A[2],718787259,15),T=_(T,L,N,x,A[9],3951481745,21),this._a=this._a+x|0,this._b=this._b+T|0,this._c=this._c+L|0,this._d=this._d+N|0},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var A=w.allocUnsafe(16);return A.writeInt32LE(this._a,0),A.writeInt32LE(this._b,4),A.writeInt32LE(this._c,8),A.writeInt32LE(this._d,12),A},ne.exports=l},17079:(ne,s,p)=>{var h=p(1378),M=p(37950);function w(E){this.rand=E||new M.Rand}ne.exports=w,w.create=function(l){return new w(l)},w.prototype._randbelow=function(l){var m=l.bitLength(),y=Math.ceil(m/8);do{var b=new h(this.rand.generate(y))}while(b.cmp(l)>=0);return b},w.prototype._randrange=function(l,m){var y=m.sub(l);return l.add(this._randbelow(y))},w.prototype.test=function(l,m,y){var b=l.bitLength(),S=h.mont(l),_=new h(1).toRed(S);m||(m=Math.max(1,b/48|0));for(var A=l.subn(1),P=0;!A.testn(P);P++);for(var x=l.shrn(P),T=A.toRed(S);m>0;m--){var N=this._randrange(new h(2),A);y&&y(N);var j=N.toRed(S).redPow(x);if(0!==j.cmp(_)&&0!==j.cmp(T)){for(var B=1;B0;m--){var T=this._randrange(new h(2),_),L=l.gcd(T);if(0!==L.cmpn(1))return L;var N=T.toRed(b).redPow(P);if(0!==N.cmp(S)&&0!==N.cmp(x)){for(var j=1;j=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function b(I,o,a){var d=y(I,a);return a-1>=o&&(d|=y(I,a-1)<<4),d}function S(I,o,a,d){for(var g=0,D=Math.min(I.length,a),F=o;F=49?z-49+10:z>=17?z-17+10:z}return g}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,a){return o.cmp(a)>0?o:a},l.min=function(o,a){return o.cmp(a)<0?o:a},l.prototype._init=function(o,a,d){if("number"==typeof o)return this._initNumber(o,a,d);if("object"==typeof o)return this._initArray(o,a,d);"hex"===a&&(a=16),w(a===(0|a)&&a>=2&&a<=36);var g=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(g++,this.negative=1),g=0;g-=3)F=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[D]|=F<>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);else if("le"===d)for(g=0,D=0;g>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);return this.strip()},l.prototype._parseHex=function(o,a,d){this.length=Math.ceil((o.length-a)/6),this.words=new Array(this.length);for(var g=0;g=a;g-=2)z=b(o,a,g)<=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;else for(g=(o.length-a)%2==0?a+1:a;g=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;this.strip()},l.prototype._parseBase=function(o,a,d){this.words=[0],this.length=1;for(var g=0,D=1;D<=67108863;D*=a)g++;g--,D=D/a|0;for(var F=o.length-d,z=F%g,C=Math.min(F,F-z)+d,f=0,k=d;k1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var _=["","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"],A=[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 T(I,o,a){a.negative=o.negative^I.negative;var d=I.length+o.length|0;a.length=d,d=d-1|0;var g=0|I.words[0],D=0|o.words[0],F=g*D,z=67108863&F,C=F/67108864|0;a.words[0]=z;for(var f=1;f>>26,se=67108863&C,te=Math.min(f,o.length-1),oe=Math.max(0,f-I.length+1);oe<=te;oe++){var de=f-oe|0;k+=(F=(g=0|I.words[de])*(D=0|o.words[oe])+se)/67108864|0,se=67108863&F}a.words[f]=0|se,C=0|k}return 0!==C?a.words[f]=0|C:a.length--,a.strip()}l.prototype.toString=function(o,a){var d;if(a=0|a||1,16===(o=o||10)||"hex"===o){d="";for(var g=0,D=0,F=0;F>>24-g&16777215)||F!==this.length-1?_[6-C.length]+C+d:C+d,(g+=2)>=26&&(g-=26,F--)}for(0!==D&&(d=D.toString(16)+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],k=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(k).toString(o);d=(se=se.idivn(k)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,a){return w(typeof m<"u"),this.toArrayLike(m,o,a)},l.prototype.toArray=function(o,a){return this.toArrayLike(Array,o,a)},l.prototype.toArrayLike=function(o,a,d){var g=this.byteLength(),D=d||Math.max(1,g);w(g<=D,"byte array longer than desired length"),w(D>0,"Requested array length <= 0"),this.strip();var C,f,F="le"===a,z=new o(D),k=this.clone();if(F){for(f=0;!k.isZero();f++)C=k.andln(255),k.iushrn(8),z[f]=C;for(;f=4096&&(d+=13,a>>>=13),a>=64&&(d+=7,a>>>=7),a>=8&&(d+=4,a>>>=4),a>=2&&(d+=2,a>>>=2),d+a},l.prototype._zeroBits=function(o){if(0===o)return 26;var a=o,d=0;return 8191&a||(d+=13,a>>>=13),127&a||(d+=7,a>>>=7),15&a||(d+=4,a>>>=4),3&a||(d+=2,a>>>=2),1&a||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],a=this._countBits(o);return 26*(this.length-1)+a},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,a=0;ao.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var a;a=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var a,d;this.length>o.length?(a=this,d=o):(a=o,d=this);for(var g=0;go.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var a=0|Math.ceil(o/26),d=o%26;this._expand(a),d>0&&a--;for(var g=0;g0&&(this.words[g]=~this.words[g]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,a){w("number"==typeof o&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),this.words[d]=a?this.words[d]|1<o.length?(d=this,g=o):(d=o,g=this);for(var D=0,F=0;F>>26;for(;0!==D&&F>>26;if(this.length=d.length,0!==D)this.words[this.length]=D,this.length++;else if(d!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var a=this.iadd(o);return o.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var g,D,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(g=this,D=o):(g=o,D=this);for(var F=0,z=0;z>26,this.words[z]=67108863&a;for(;0!==F&&z>26,this.words[z]=67108863&a;if(0===F&&z>>13,de=0|g[1],Ie=8191&de,ye=de>>>13,ve=0|g[2],ae=8191&ve,fe=ve>>>13,pe=0|g[3],Se=8191&pe,ce=pe>>>13,be=0|g[4],Ne=8191&be,Fe=be>>>13,lt=0|g[5],Ge=8191<,He=lt>>>13,Kt=0|g[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|g[7],ot=8191&Vt,at=Vt>>>13,Gt=0|g[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|g[9],Be=8191&Te,Ve=Te>>>13,mt=0|D[0],Ze=8191&mt,ct=mt>>>13,hn=0|D[1],ft=8191&hn,At=hn>>>13,wn=0|D[2],ze=8191&wn,Qe=wn>>>13,Ht=0|D[3],pt=8191&Ht,vt=Ht>>>13,$t=0|D[4],dt=8191&$t,gt=$t>>>13,mn=0|D[5],ut=8191&mn,wt=mn>>>13,Sn=0|D[6],yt=8191&Sn,Et=Sn>>>13,_e=0|D[7],Ee=8191&_e,Me=_e>>>13,me=0|D[8],Oe=8191&me,Ke=me>>>13,it=0|D[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^a.negative,d.length=19;var Bt=(z+(C=Math.imul(te,Ze))|0)+((8191&(f=(f=Math.imul(te,ct))+Math.imul(oe,Ze)|0))<<13)|0;z=((k=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,C=Math.imul(Ie,Ze),f=(f=Math.imul(Ie,ct))+Math.imul(ye,Ze)|0,k=Math.imul(ye,ct);var It=(z+(C=C+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(oe,ft)|0))<<13)|0;z=((k=k+Math.imul(oe,At)|0)+(f>>>13)|0)+(It>>>26)|0,It&=67108863,C=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,k=Math.imul(fe,ct),C=C+Math.imul(Ie,ft)|0,f=(f=f+Math.imul(Ie,At)|0)+Math.imul(ye,ft)|0,k=k+Math.imul(ye,At)|0;var kt=(z+(C=C+Math.imul(te,ze)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;z=((k=k+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,C=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,k=Math.imul(ce,ct),C=C+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,k=k+Math.imul(fe,At)|0,C=C+Math.imul(Ie,ze)|0,f=(f=f+Math.imul(Ie,Qe)|0)+Math.imul(ye,ze)|0,k=k+Math.imul(ye,Qe)|0;var Ot=(z+(C=C+Math.imul(te,pt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;z=((k=k+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,C=Math.imul(Ne,Ze),f=(f=Math.imul(Ne,ct))+Math.imul(Fe,Ze)|0,k=Math.imul(Fe,ct),C=C+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,k=k+Math.imul(ce,At)|0,C=C+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,k=k+Math.imul(fe,Qe)|0,C=C+Math.imul(Ie,pt)|0,f=(f=f+Math.imul(Ie,vt)|0)+Math.imul(ye,pt)|0,k=k+Math.imul(ye,vt)|0;var Nt=(z+(C=C+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;z=((k=k+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,C=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,k=Math.imul(He,ct),C=C+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,ft)|0,k=k+Math.imul(Fe,At)|0,C=C+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,k=k+Math.imul(ce,Qe)|0,C=C+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,k=k+Math.imul(fe,vt)|0,C=C+Math.imul(Ie,dt)|0,f=(f=f+Math.imul(Ie,gt)|0)+Math.imul(ye,dt)|0,k=k+Math.imul(ye,gt)|0;var Lt=(z+(C=C+Math.imul(te,ut)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;z=((k=k+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,C=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,k=Math.imul(nt,ct),C=C+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,k=k+Math.imul(He,At)|0,C=C+Math.imul(Ne,ze)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,ze)|0,k=k+Math.imul(Fe,Qe)|0,C=C+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,k=k+Math.imul(ce,vt)|0,C=C+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,k=k+Math.imul(fe,gt)|0,C=C+Math.imul(Ie,ut)|0,f=(f=f+Math.imul(Ie,wt)|0)+Math.imul(ye,ut)|0,k=k+Math.imul(ye,wt)|0;var nn=(z+(C=C+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;z=((k=k+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,k=Math.imul(at,ct),C=C+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,k=k+Math.imul(nt,At)|0,C=C+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,k=k+Math.imul(He,Qe)|0,C=C+Math.imul(Ne,pt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,pt)|0,k=k+Math.imul(Fe,vt)|0,C=C+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,k=k+Math.imul(ce,gt)|0,C=C+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,k=k+Math.imul(fe,wt)|0,C=C+Math.imul(Ie,yt)|0,f=(f=f+Math.imul(Ie,Et)|0)+Math.imul(ye,yt)|0,k=k+Math.imul(ye,Et)|0;var Yt=(z+(C=C+Math.imul(te,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(te,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;z=((k=k+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,C=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,k=Math.imul(Ae,ct),C=C+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,k=k+Math.imul(at,At)|0,C=C+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,k=k+Math.imul(nt,Qe)|0,C=C+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,k=k+Math.imul(He,vt)|0,C=C+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,dt)|0,k=k+Math.imul(Fe,gt)|0,C=C+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,k=k+Math.imul(ce,wt)|0,C=C+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,k=k+Math.imul(fe,Et)|0,C=C+Math.imul(Ie,Ee)|0,f=(f=f+Math.imul(Ie,Me)|0)+Math.imul(ye,Ee)|0,k=k+Math.imul(ye,Me)|0;var gn=(z+(C=C+Math.imul(te,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;z=((k=k+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,C=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,k=Math.imul(Ve,ct),C=C+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,k=k+Math.imul(Ae,At)|0,C=C+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,k=k+Math.imul(at,Qe)|0,C=C+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,k=k+Math.imul(nt,vt)|0,C=C+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,k=k+Math.imul(He,gt)|0,C=C+Math.imul(Ne,ut)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ut)|0,k=k+Math.imul(Fe,wt)|0,C=C+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,k=k+Math.imul(ce,Et)|0,C=C+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,k=k+Math.imul(fe,Me)|0,C=C+Math.imul(Ie,Oe)|0,f=(f=f+Math.imul(Ie,Ke)|0)+Math.imul(ye,Oe)|0,k=k+Math.imul(ye,Ke)|0;var an=(z+(C=C+Math.imul(te,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;z=((k=k+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,C=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,k=Math.imul(Ve,At),C=C+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,k=k+Math.imul(Ae,Qe)|0,C=C+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,k=k+Math.imul(at,vt)|0,C=C+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,k=k+Math.imul(nt,gt)|0,C=C+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,k=k+Math.imul(He,wt)|0,C=C+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,Et)|0)+Math.imul(Fe,yt)|0,k=k+Math.imul(Fe,Et)|0,C=C+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,k=k+Math.imul(ce,Me)|0,C=C+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,k=k+Math.imul(fe,Ke)|0;var tn=(z+(C=C+Math.imul(Ie,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ie,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;z=((k=k+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,k=Math.imul(Ve,Qe),C=C+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,k=k+Math.imul(Ae,vt)|0,C=C+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,k=k+Math.imul(at,gt)|0,C=C+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,k=k+Math.imul(nt,wt)|0,C=C+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,k=k+Math.imul(He,Et)|0,C=C+Math.imul(Ne,Ee)|0,f=(f=f+Math.imul(Ne,Me)|0)+Math.imul(Fe,Ee)|0,k=k+Math.imul(Fe,Me)|0,C=C+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,k=k+Math.imul(ce,Ke)|0;var Ut=(z+(C=C+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,C=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,k=Math.imul(Ve,vt),C=C+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,k=k+Math.imul(Ae,gt)|0,C=C+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,k=k+Math.imul(at,wt)|0,C=C+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,k=k+Math.imul(nt,Et)|0,C=C+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,k=k+Math.imul(He,Me)|0,C=C+Math.imul(Ne,Oe)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,Oe)|0,k=k+Math.imul(Fe,Ke)|0;var cn=(z+(C=C+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;z=((k=k+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,C=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,k=Math.imul(Ve,gt),C=C+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,k=k+Math.imul(Ae,wt)|0,C=C+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,k=k+Math.imul(at,Et)|0,C=C+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,k=k+Math.imul(nt,Me)|0,C=C+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,k=k+Math.imul(He,Ke)|0;var Jt=(z+(C=C+Math.imul(Ne,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,C=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,k=Math.imul(Ve,wt),C=C+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,k=k+Math.imul(Ae,Et)|0,C=C+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,k=k+Math.imul(at,Me)|0,C=C+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,k=k+Math.imul(nt,Ke)|0;var Zt=(z+(C=C+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;z=((k=k+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,C=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,k=Math.imul(Ve,Et),C=C+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,k=k+Math.imul(Ae,Me)|0,C=C+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,k=k+Math.imul(at,Ke)|0;var fn=(z+(C=C+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;z=((k=k+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,C=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,k=Math.imul(Ve,Me),C=C+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,k=k+Math.imul(Ae,Ke)|0;var Qt=(z+(C=C+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;z=((k=k+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,C=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,k=Math.imul(Ve,Ke);var Dt=(z+(C=C+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;z=((k=k+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(z+(C=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return z=((k=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,F[0]=Bt,F[1]=It,F[2]=kt,F[3]=Ot,F[4]=Nt,F[5]=Lt,F[6]=nn,F[7]=Yt,F[8]=gn,F[9]=an,F[10]=tn,F[11]=Ut,F[12]=cn,F[13]=Jt,F[14]=Zt,F[15]=fn,F[16]=Qt,F[17]=Dt,F[18]=Mt,0!==z&&(F[19]=z,d.length++),d};function j(I,o,a){return(new B).mulp(I,o,a)}function B(I,o){this.x=I,this.y=o}Math.imul||(L=T),l.prototype.mulTo=function(o,a){var d,g=this.length+o.length;return d=10===this.length&&10===o.length?L(this,o,a):g<63?T(this,o,a):g<1024?function N(I,o,a){a.negative=o.negative^I.negative,a.length=I.length+o.length;for(var d=0,g=0,D=0;D>>26)|0)>>>26,F&=67108863}a.words[D]=z,d=F,F=g}return 0!==d?a.words[D]=d:a.length--,a.strip()}(this,o,a):j(this,o,a),d},B.prototype.makeRBT=function(o){for(var a=new Array(o),d=l.prototype._countBits(o)-1,g=0;g>=1;return g},B.prototype.permute=function(o,a,d,g,D,F){for(var z=0;z>>=1)D++;return 1<>>=13,d[2*F+1]=8191&D,D>>>=13;for(F=2*a;F>=26,a+=g/67108864|0,a+=D>>>26,this.words[d]=67108863&D}return 0!==a&&(this.words[d]=a,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var a=function x(I){for(var o=new Array(I.bitLength()),a=0;a>>g}return o}(o);if(0===a.length)return new l(1);for(var d=this,g=0;g=0);var D,a=o%26,d=(o-a)/26,g=67108863>>>26-a<<26-a;if(0!==a){var F=0;for(D=0;D>>26-a}F&&(this.words[D]=F,this.length++)}if(0!==d){for(D=this.length-1;D>=0;D--)this.words[D+d]=this.words[D];for(D=0;D=0),g=a?(a-a%26)/26:0;var D=o%26,F=Math.min((o-D)/26,this.length),z=67108863^67108863>>>D<F)for(this.length-=F,f=0;f=0&&(0!==k||f>=g);f--){var se=0|this.words[f];this.words[f]=k<<26-D|se>>>D,k=se&z}return C&&0!==k&&(C.words[C.length++]=k),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,a,d){return w(0===this.negative),this.iushrn(o,a,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var a=o%26,d=(o-a)/26,g=1<=0);var a=o%26,d=(o-a)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==a&&d++,this.length=Math.min(d,this.length),0!==a){var g=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(C/67108864|0),this.words[D+d]=67108863&F}for(;D>26,this.words[D+d]=67108863&F;if(0===z)return this.strip();for(w(-1===z),z=0,D=0;D>26,this.words[D]=67108863&F;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,a){var d=(this.length,o.length),g=this.clone(),D=o,F=0|D.words[D.length-1];0!==(d=26-this._countBits(F))&&(D=D.ushln(d),g.iushln(d),F=0|D.words[D.length-1]);var f,C=g.length-D.length;if("mod"!==a){(f=new l(null)).length=C+1,f.words=new Array(f.length);for(var k=0;k=0;te--){var oe=67108864*(0|g.words[D.length+te])+(0|g.words[D.length+te-1]);for(oe=Math.min(oe/F|0,67108863),g._ishlnsubmul(D,oe,te);0!==g.negative;)oe--,g.negative=0,g._ishlnsubmul(D,1,te),g.isZero()||(g.negative^=1);f&&(f.words[te]=oe)}return f&&f.strip(),g.strip(),"div"!==a&&0!==d&&g.iushrn(d),{div:f||null,mod:g}},l.prototype.divmod=function(o,a,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,a),"mod"!==a&&(g=F.div.neg()),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.iadd(o)),{div:g,mod:D}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),a),"mod"!==a&&(g=F.div.neg()),{div:g,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),a),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.isub(o)),{div:F.div,mod:D}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===a?{div:this.divn(o.words[0]),mod:null}:"mod"===a?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,a);var g,D,F},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var a=this.divmod(o);if(a.mod.isZero())return a.div;var d=0!==a.div.negative?a.mod.isub(o):a.mod,g=o.ushrn(1),D=o.andln(1),F=d.cmp(g);return F<0||1===D&&0===F?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var a=(1<<26)%o,d=0,g=this.length-1;g>=0;g--)d=(a*d+(0|this.words[g]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var a=0,d=this.length-1;d>=0;d--){var g=(0|this.words[d])+67108864*a;this.words[d]=g/o|0,a=g%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=new l(0),z=new l(1),C=0;a.isEven()&&d.isEven();)a.iushrn(1),d.iushrn(1),++C;for(var f=d.clone(),k=a.clone();!a.isZero();){for(var se=0,te=1;!(a.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(a.iushrn(se);se-- >0;)(g.isOdd()||D.isOdd())&&(g.iadd(f),D.isub(k)),g.iushrn(1),D.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(F.isOdd()||z.isOdd())&&(F.iadd(f),z.isub(k)),F.iushrn(1),z.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(F),D.isub(z)):(d.isub(a),F.isub(g),z.isub(D))}return{a:F,b:z,gcd:d.iushln(C)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=d.clone();a.cmpn(1)>0&&d.cmpn(1)>0;){for(var z=0,C=1;!(a.words[0]&C)&&z<26;++z,C<<=1);if(z>0)for(a.iushrn(z);z-- >0;)g.isOdd()&&g.iadd(F),g.iushrn(1);for(var f=0,k=1;!(d.words[0]&k)&&f<26;++f,k<<=1);if(f>0)for(d.iushrn(f);f-- >0;)D.isOdd()&&D.iadd(F),D.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(D)):(d.isub(a),D.isub(g))}return(se=0===a.cmpn(1)?g:D).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var a=this.clone(),d=o.clone();a.negative=0,d.negative=0;for(var g=0;a.isEven()&&d.isEven();g++)a.iushrn(1),d.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;d.isEven();)d.iushrn(1);var D=a.cmp(d);if(D<0){var F=a;a=d,d=F}else if(0===D||0===d.cmpn(1))break;a.isub(d)}return d.iushln(g)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var a=o%26,d=(o-a)/26,g=1<>>26,z&=67108863,this.words[F]=z}return 0!==D&&(this.words[F]=D,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,a=o<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)d=1;else{a&&(o=-o),w(o<=67108863,"Number is too big");var g=0|this.words[0];d=g===o?0:go.length)return 1;if(this.length=0;d--){var g=0|this.words[d],D=0|o.words[d];if(g!==D){gD&&(a=1);break}}return a},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new Z(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var V={k256:null,p224:null,p192:null,p25519:null};function G(I,o){this.name=I,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function W(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Z(I){if("string"==typeof I){var o=l._prime(I);this.m=o.p,this.prime=o}else w(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}function ee(I){Z.call(this,I),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}G.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},G.prototype.ireduce=function(o){var d,a=o;do{this.split(a,this.tmp),d=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(d>this.n);var g=d0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},G.prototype.split=function(o,a){o.iushrn(this.n,0,a)},G.prototype.imulK=function(o){return o.imul(this.k)},E(W,G),W.prototype.split=function(o,a){for(var d=4194303,g=Math.min(o.length,9),D=0;D>>22,F=z}F>>>=22,o.words[D-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},W.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var a=0,d=0;d>>=26,o.words[d]=D,a=g}return 0!==a&&(o.words[o.length++]=a),o},l._prime=function(o){if(V[o])return V[o];var a;if("k256"===o)a=new W;else if("p224"===o)a=new Q;else if("p192"===o)a=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);a=new J}return V[o]=a,a},Z.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},Z.prototype._verify2=function(o,a){w(0==(o.negative|a.negative),"red works only with positives"),w(o.red&&o.red===a.red,"red works only with red numbers")},Z.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},Z.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},Z.prototype.add=function(o,a){this._verify2(o,a);var d=o.add(a);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},Z.prototype.iadd=function(o,a){this._verify2(o,a);var d=o.iadd(a);return d.cmp(this.m)>=0&&d.isub(this.m),d},Z.prototype.sub=function(o,a){this._verify2(o,a);var d=o.sub(a);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},Z.prototype.isub=function(o,a){this._verify2(o,a);var d=o.isub(a);return d.cmpn(0)<0&&d.iadd(this.m),d},Z.prototype.shl=function(o,a){return this._verify1(o),this.imod(o.ushln(a))},Z.prototype.imul=function(o,a){return this._verify2(o,a),this.imod(o.imul(a))},Z.prototype.mul=function(o,a){return this._verify2(o,a),this.imod(o.mul(a))},Z.prototype.isqr=function(o){return this.imul(o,o.clone())},Z.prototype.sqr=function(o){return this.mul(o,o)},Z.prototype.sqrt=function(o){if(o.isZero())return o.clone();var a=this.m.andln(3);if(w(a%2==1),3===a){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),D=0;!g.isZero()&&0===g.andln(1);)D++,g.iushrn(1);w(!g.isZero());var F=new l(1).toRed(this),z=F.redNeg(),C=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,C).cmp(z);)f.redIAdd(z);for(var k=this.pow(f,g),se=this.pow(o,g.addn(1).iushrn(1)),te=this.pow(o,g),oe=D;0!==te.cmp(F);){for(var de=te,Ie=0;0!==de.cmp(F);Ie++)de=de.redSqr();w(Ie=0;D--){for(var k=a.words[D],se=f-1;se>=0;se--){var te=k>>se&1;(F!==g[0]&&(F=this.sqr(F)),0!==te||0!==z)?(z<<=1,z|=te,(4===++C||0===D&&0===se)&&(F=this.mul(F,g[z]),C=0,z=0)):C=0}f=26}return F},Z.prototype.convertTo=function(o){var a=o.umod(this.m);return a===o?a.clone():a},Z.prototype.convertFrom=function(o){var a=o.clone();return a.red=null,a},l.mont=function(o){return new ee(o)},E(ee,Z),ee.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},ee.prototype.convertFrom=function(o){var a=this.imod(o.mul(this.rinv));return a.red=null,a},ee.prototype.imul=function(o,a){if(o.isZero()||a.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.mul=function(o,a){if(o.isZero()||a.isZero())return new l(0)._forceRed(this);var d=o.mul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=p.nmd(ne),this)},32391:ne=>{function s(p,h){if(!p)throw new Error(h||"Assertion failed")}ne.exports=s,s.equal=function(h,M,w){if(h!=M)throw new Error(w||"Assertion failed: "+h+" != "+M)}},58195:(ne,s)=>{"use strict";var p=s;function M(E){return 1===E.length?"0"+E:E}function w(E){for(var l="",m=0;m>8,_=255&b;S?m.push(S,_):m.push(_)}return m},p.zero2=M,p.toHex=w,p.encode=function(l,m){return"hex"===m?w(l):l}},11346:function(ne){ne.exports=function(){"use strict";var s=Object.prototype.toString,p=Array.isArray||function(ee){return"[object Array]"===s.call(ee)};function h(Z){return"function"==typeof Z}function M(Z){return p(Z)?"array":typeof Z}function w(Z){return Z.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function E(Z,ee){return null!=Z&&"object"==typeof Z&&ee in Z}function l(Z,ee){return null!=Z&&"object"!=typeof Z&&Z.hasOwnProperty&&Z.hasOwnProperty(ee)}var m=RegExp.prototype.test;function y(Z,ee){return m.call(Z,ee)}var b=/\S/;function S(Z){return!y(b,Z)}var _={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function A(Z){return String(Z).replace(/[&<>"'`=\/]/g,function(I){return _[I]})}var P=/\s*/,x=/\s+/,T=/\s*=/,L=/\s*\}/,N=/#|\^|\/|>|\{|&|=|!/;function j(Z,ee){if(!Z)return[];var f,k,se,I=!1,o=[],a=[],d=[],g=!1,D=!1,F="",z=0;function C(){if(g&&!D)for(;d.length;)delete a[d.pop()];else d=[];g=!1,D=!1}function te(ce){if("string"==typeof ce&&(ce=ce.split(x,2)),!p(ce)||2!==ce.length)throw new Error("Invalid tags: "+ce);f=new RegExp(w(ce[0])+"\\s*"),k=new RegExp("\\s*"+w(ce[1])),se=new RegExp("\\s*"+w("}"+ce[1]))}te(ee||q.tags);for(var de,Ie,ye,ve,ae,fe,oe=new G(Z);!oe.eos();){if(de=oe.pos,ye=oe.scanUntil(f))for(var pe=0,Se=ye.length;pe0?o[o.length-1][4]:ee;break;default:I.push(a)}return ee}function G(Z){this.string=Z,this.tail=Z,this.pos=0}function W(Z,ee){this.view=Z,this.cache={".":this.view},this.parent=ee}function Q(){this.templateCache={_cache:{},set:function(ee,I){this._cache[ee]=I},get:function(ee){return this._cache[ee]},clear:function(){this._cache={}}}}G.prototype.eos=function(){return""===this.tail},G.prototype.scan=function(ee){var I=this.tail.match(ee);if(!I||0!==I.index)return"";var o=I[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},G.prototype.scanUntil=function(ee){var o,I=this.tail.search(ee);switch(I){case-1:o=this.tail,this.tail="";break;case 0:o="";break;default:o=this.tail.substring(0,I),this.tail=this.tail.substring(I)}return this.pos+=o.length,o},W.prototype.push=function(ee){return new W(ee,this)},W.prototype.lookup=function(ee){var o,I=this.cache;if(I.hasOwnProperty(ee))o=I[ee];else{for(var d,g,D,a=this,F=!1;a;){if(ee.indexOf(".")>0)for(d=a.view,g=ee.split("."),D=0;null!=d&&D"===F?z=this.renderPartial(D,I,o,d):"&"===F?z=this.unescapedValue(D,I):"name"===F?z=this.escapedValue(D,I,d):"text"===F&&(z=this.rawValue(D)),void 0!==z&&(g+=z);return g},Q.prototype.renderSection=function(ee,I,o,a,d){var g=this,D="",F=I.lookup(ee[1]);function z(k){return g.render(k,I,o,d)}if(F){if(p(F))for(var C=0,f=F.length;C0||!o)&&(d[g]=a+d[g]);return d.join("\n")},Q.prototype.renderPartial=function(ee,I,o,a){if(o){var d=this.getConfigTags(a),g=h(o)?o(ee[1]):o[ee[1]];if(null!=g){var D=ee[6],F=ee[5],z=ee[4],C=g;0==F&&z&&(C=this.indentPartial(g,z,D));var f=this.parse(C,d);return this.renderTokens(f,I,o,C,a)}}},Q.prototype.unescapedValue=function(ee,I){var o=I.lookup(ee[1]);if(null!=o)return o},Q.prototype.escapedValue=function(ee,I,o){var a=this.getConfigEscape(o)||q.escape,d=I.lookup(ee[1]);if(null!=d)return"number"==typeof d&&a===q.escape?String(d):a(d)},Q.prototype.rawValue=function(ee){return ee[1]},Q.prototype.getConfigTags=function(ee){return p(ee)?ee:ee&&"object"==typeof ee?ee.tags:void 0},Q.prototype.getConfigEscape=function(ee){if(ee&&"object"==typeof ee&&!p(ee))return ee.escape};var q={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(Z){J.templateCache=Z},get templateCache(){return J.templateCache}},J=new Q;return q.clearCache=function(){return J.clearCache()},q.parse=function(ee,I){return J.parse(ee,I)},q.render=function(ee,I,o,a){if("string"!=typeof ee)throw new TypeError('Invalid template! Template should be a "string" but "'+M(ee)+'" was given as the first argument for mustache#render(template, view, partials)');return J.render(ee,I,o,a)},q.escape=A,q.Scanner=G,q.Context=W,q.Writer=Q,q}()},84778:(ne,s)=>{"use strict";var w;Object.defineProperty(s,"__esModule",{value:!0}),s.AbiSerializationType=s.AbiFunctionModifier=s.AbiFunctionKind=s.SCHEMA_VERSION=void 0,s.SCHEMA_VERSION="0.3.0",(w=s.AbiFunctionKind||(s.AbiFunctionKind={})).View="view",w.Call="call",function(w){w.Init="init",w.Private="private",w.Payable="payable"}(s.AbiFunctionModifier||(s.AbiFunctionModifier={})),function(w){w.Json="json",w.Borsh="borsh"}(s.AbiSerializationType||(s.AbiSerializationType={}))},81818:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Account=void 0;var h=p(74931);Object.defineProperty(s,"Account",{enumerable:!0,get:function(){return h.Account}})},73648:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.UrlAccountCreator=s.LocalAccountCreator=s.AccountCreator=void 0;var h=p(74931);Object.defineProperty(s,"AccountCreator",{enumerable:!0,get:function(){return h.AccountCreator}}),Object.defineProperty(s,"LocalAccountCreator",{enumerable:!0,get:function(){return h.LocalAccountCreator}}),Object.defineProperty(s,"UrlAccountCreator",{enumerable:!0,get:function(){return h.UrlAccountCreator}})},73369:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MultisigStateStatus=s.MultisigDeleteRequestRejectionError=s.MULTISIG_CONFIRM_METHODS=s.MULTISIG_CHANGE_METHODS=s.MULTISIG_DEPOSIT=s.MULTISIG_GAS=s.MULTISIG_ALLOWANCE=s.MULTISIG_STORAGE_KEY=s.AccountMultisig=s.Account2FA=void 0;var h=p(74931);Object.defineProperty(s,"Account2FA",{enumerable:!0,get:function(){return h.Account2FA}}),Object.defineProperty(s,"AccountMultisig",{enumerable:!0,get:function(){return h.AccountMultisig}}),Object.defineProperty(s,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return h.MULTISIG_STORAGE_KEY}}),Object.defineProperty(s,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return h.MULTISIG_ALLOWANCE}}),Object.defineProperty(s,"MULTISIG_GAS",{enumerable:!0,get:function(){return h.MULTISIG_GAS}}),Object.defineProperty(s,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return h.MULTISIG_DEPOSIT}}),Object.defineProperty(s,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(s,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(s,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return h.MultisigDeleteRequestRejectionError}}),Object.defineProperty(s,"MultisigStateStatus",{enumerable:!0,get:function(){return h.MultisigStateStatus}})},33759:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(E,l,m,y){return new(m||(m=Promise))(function(S,_){function A(T){try{x(y.next(T))}catch(L){_(L)}}function P(T){try{x(y.throw(T))}catch(L){_(L)}}function x(T){T.done?S(T.value):function b(S){return S instanceof m?S:new m(function(_){_(S)})}(T.value).then(A,P)}x((y=y.apply(E,l||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.connect=void 0;const M=p(58010);s.connect=function w(E){return h(this,void 0,void 0,function*(){return new M.Near(E)})}},71836:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(l,m,y,b){void 0===b&&(b=y);var S=Object.getOwnPropertyDescriptor(m,y);(!S||("get"in S?!m.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return m[y]}}),Object.defineProperty(l,b,S)}:function(l,m,y,b){void 0===b&&(b=y),l[b]=m[y]}),M=this&&this.__setModuleDefault||(Object.create?function(l,m){Object.defineProperty(l,"default",{enumerable:!0,value:m})}:function(l,m){l.default=m}),w=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var m={};if(null!=l)for(var y in l)"default"!==y&&Object.prototype.hasOwnProperty.call(l,y)&&h(m,l,y);return M(m,l),m},E=this&&this.__exportStar||function(l,m){for(var y in l)"default"!==y&&!Object.prototype.hasOwnProperty.call(m,y)&&h(m,l,y)};Object.defineProperty(s,"__esModule",{value:!0}),s.keyStores=void 0,s.keyStores=w(p(57372)),E(p(45957),s),E(p(33759),s),p(4073)},45957:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(j,B,V,G){void 0===G&&(G=V);var W=Object.getOwnPropertyDescriptor(B,V);(!W||("get"in W?!B.__esModule:W.writable||W.configurable))&&(W={enumerable:!0,get:function(){return B[V]}}),Object.defineProperty(j,G,W)}:function(j,B,V,G){void 0===G&&(G=V),j[G]=B[V]}),M=this&&this.__setModuleDefault||(Object.create?function(j,B){Object.defineProperty(j,"default",{enumerable:!0,value:B})}:function(j,B){j.default=B}),w=this&&this.__importStar||function(j){if(j&&j.__esModule)return j;var B={};if(null!=j)for(var V in j)"default"!==V&&Object.prototype.hasOwnProperty.call(j,V)&&h(B,j,V);return M(B,j),B};Object.defineProperty(s,"__esModule",{value:!0}),s.WalletConnection=s.ConnectedWalletAccount=s.Near=s.KeyPair=s.Signer=s.InMemorySigner=s.Contract=s.Connection=s.Account=s.multisig=s.validators=s.transactions=s.utils=s.providers=s.accountCreator=void 0;const E=w(p(91311));s.providers=E;const l=w(p(8127));s.utils=l;const m=w(p(45733));s.transactions=m;const y=w(p(51631));s.validators=y;const b=p(81818);Object.defineProperty(s,"Account",{enumerable:!0,get:function(){return b.Account}});const S=w(p(73369));s.multisig=S;const _=w(p(73648));s.accountCreator=_;const A=p(12592);Object.defineProperty(s,"Connection",{enumerable:!0,get:function(){return A.Connection}});const P=p(60351);Object.defineProperty(s,"Signer",{enumerable:!0,get:function(){return P.Signer}}),Object.defineProperty(s,"InMemorySigner",{enumerable:!0,get:function(){return P.InMemorySigner}});const x=p(99676);Object.defineProperty(s,"Contract",{enumerable:!0,get:function(){return x.Contract}});const T=p(46358);Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return T.KeyPair}});const L=p(58010);Object.defineProperty(s,"Near",{enumerable:!0,get:function(){return L.Near}});const N=p(47601);Object.defineProperty(s,"ConnectedWalletAccount",{enumerable:!0,get:function(){return N.ConnectedWalletAccount}}),Object.defineProperty(s,"WalletConnection",{enumerable:!0,get:function(){return N.WalletConnection}})},12592:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Connection=void 0;var h=p(74931);Object.defineProperty(s,"Connection",{enumerable:!0,get:function(){return h.Connection}})},99676:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Contract=void 0;var h=p(74931);Object.defineProperty(s,"Contract",{enumerable:!0,get:function(){return h.Contract}})},57372:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=s.BrowserLocalStorageKeyStore=s.InMemoryKeyStore=s.KeyStore=void 0;const h=p(35598);Object.defineProperty(s,"KeyStore",{enumerable:!0,get:function(){return h.KeyStore}});const M=p(56724);Object.defineProperty(s,"InMemoryKeyStore",{enumerable:!0,get:function(){return M.InMemoryKeyStore}});const w=p(82869);Object.defineProperty(s,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return w.BrowserLocalStorageKeyStore}});const E=p(7221);Object.defineProperty(s,"MergeKeyStore",{enumerable:!0,get:function(){return E.MergeKeyStore}})},82869:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BrowserLocalStorageKeyStore=void 0;var h=p(93271);Object.defineProperty(s,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return h.BrowserLocalStorageKeyStore}})},56724:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.InMemoryKeyStore=void 0;var h=p(69170);Object.defineProperty(s,"InMemoryKeyStore",{enumerable:!0,get:function(){return h.InMemoryKeyStore}})},91001:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=s.UnencryptedFileSystemKeyStore=s.BrowserLocalStorageKeyStore=s.InMemoryKeyStore=s.KeyStore=void 0;const h=p(35598);Object.defineProperty(s,"KeyStore",{enumerable:!0,get:function(){return h.KeyStore}});const M=p(56724);Object.defineProperty(s,"InMemoryKeyStore",{enumerable:!0,get:function(){return M.InMemoryKeyStore}});const w=p(82869);Object.defineProperty(s,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return w.BrowserLocalStorageKeyStore}});const E=p(57324);Object.defineProperty(s,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return E.UnencryptedFileSystemKeyStore}});const l=p(7221);Object.defineProperty(s,"MergeKeyStore",{enumerable:!0,get:function(){return l.MergeKeyStore}})},35598:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.KeyStore=void 0;var h=p(69170);Object.defineProperty(s,"KeyStore",{enumerable:!0,get:function(){return h.KeyStore}})},7221:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.MergeKeyStore=void 0;var h=p(69170);Object.defineProperty(s,"MergeKeyStore",{enumerable:!0,get:function(){return h.MergeKeyStore}})},57324:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.UnencryptedFileSystemKeyStore=s.readKeyFile=void 0;var h=p(55738);Object.defineProperty(s,"readKeyFile",{enumerable:!0,get:function(){return h.readKeyFile}}),Object.defineProperty(s,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return h.UnencryptedFileSystemKeyStore}})},58010:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Near=void 0;var h=p(9855);Object.defineProperty(s,"Near",{enumerable:!0,get:function(){return h.Near}})},91311:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ErrorContext=s.TypedError=s.getTransactionLastResult=s.FinalExecutionStatusBasic=s.JsonRpcProvider=s.Provider=void 0;const h=p(5754);Object.defineProperty(s,"Provider",{enumerable:!0,get:function(){return h.Provider}}),Object.defineProperty(s,"getTransactionLastResult",{enumerable:!0,get:function(){return h.getTransactionLastResult}}),Object.defineProperty(s,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return h.FinalExecutionStatusBasic}});const M=p(72952);Object.defineProperty(s,"JsonRpcProvider",{enumerable:!0,get:function(){return M.JsonRpcProvider}}),Object.defineProperty(s,"TypedError",{enumerable:!0,get:function(){return M.TypedError}}),Object.defineProperty(s,"ErrorContext",{enumerable:!0,get:function(){return M.ErrorContext}})},72952:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.JsonRpcProvider=s.TypedError=s.ErrorContext=void 0;var h=p(17527);Object.defineProperty(s,"ErrorContext",{enumerable:!0,get:function(){return h.ErrorContext}}),Object.defineProperty(s,"TypedError",{enumerable:!0,get:function(){return h.TypedError}});var M=p(1656);Object.defineProperty(s,"JsonRpcProvider",{enumerable:!0,get:function(){return M.JsonRpcProvider}})},5754:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.FinalExecutionStatusBasic=s.ExecutionStatusBasic=s.IdType=s.Provider=s.getTransactionLastResult=void 0;var h=p(41166);Object.defineProperty(s,"getTransactionLastResult",{enumerable:!0,get:function(){return h.getTransactionLastResult}});var M=p(1656);Object.defineProperty(s,"Provider",{enumerable:!0,get:function(){return M.Provider}});var w=p(17527);Object.defineProperty(s,"IdType",{enumerable:!0,get:function(){return w.IdType}}),Object.defineProperty(s,"ExecutionStatusBasic",{enumerable:!0,get:function(){return w.ExecutionStatusBasic}}),Object.defineProperty(s,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return w.FinalExecutionStatusBasic}})},60351:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Signer=s.InMemorySigner=void 0;var h=p(82613);Object.defineProperty(s,"InMemorySigner",{enumerable:!0,get:function(){return h.InMemorySigner}}),Object.defineProperty(s,"Signer",{enumerable:!0,get:function(){return h.Signer}})},45733:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.transfer=s.stake=s.functionCallAccessKey=s.functionCall=s.fullAccessKey=s.deployContract=s.deleteKey=s.deleteAccount=s.createAccount=s.addKey=s.encodeDelegateAction=s.encodeSignedDelegate=s.Transaction=s.SignedTransaction=s.Signature=s.signTransaction=s.createTransaction=s.SCHEMA=s.Transfer=s.Stake=s.FunctionCallPermission=s.FunctionCall=s.FullAccessPermission=s.DeployContract=s.DeleteKey=s.DeleteAccount=s.CreateAccount=s.AddKey=s.AccessKeyPermission=s.AccessKey=s.Action=s.stringifyJsonOrBytes=void 0;var h=p(38445);Object.defineProperty(s,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return h.stringifyJsonOrBytes}}),Object.defineProperty(s,"Action",{enumerable:!0,get:function(){return h.Action}}),Object.defineProperty(s,"AccessKey",{enumerable:!0,get:function(){return h.AccessKey}}),Object.defineProperty(s,"AccessKeyPermission",{enumerable:!0,get:function(){return h.AccessKeyPermission}}),Object.defineProperty(s,"AddKey",{enumerable:!0,get:function(){return h.AddKey}}),Object.defineProperty(s,"CreateAccount",{enumerable:!0,get:function(){return h.CreateAccount}}),Object.defineProperty(s,"DeleteAccount",{enumerable:!0,get:function(){return h.DeleteAccount}}),Object.defineProperty(s,"DeleteKey",{enumerable:!0,get:function(){return h.DeleteKey}}),Object.defineProperty(s,"DeployContract",{enumerable:!0,get:function(){return h.DeployContract}}),Object.defineProperty(s,"FullAccessPermission",{enumerable:!0,get:function(){return h.FullAccessPermission}}),Object.defineProperty(s,"FunctionCall",{enumerable:!0,get:function(){return h.FunctionCall}}),Object.defineProperty(s,"FunctionCallPermission",{enumerable:!0,get:function(){return h.FunctionCallPermission}}),Object.defineProperty(s,"Stake",{enumerable:!0,get:function(){return h.Stake}}),Object.defineProperty(s,"Transfer",{enumerable:!0,get:function(){return h.Transfer}}),Object.defineProperty(s,"SCHEMA",{enumerable:!0,get:function(){return h.SCHEMA}}),Object.defineProperty(s,"createTransaction",{enumerable:!0,get:function(){return h.createTransaction}}),Object.defineProperty(s,"signTransaction",{enumerable:!0,get:function(){return h.signTransaction}}),Object.defineProperty(s,"Signature",{enumerable:!0,get:function(){return h.Signature}}),Object.defineProperty(s,"SignedTransaction",{enumerable:!0,get:function(){return h.SignedTransaction}}),Object.defineProperty(s,"Transaction",{enumerable:!0,get:function(){return h.Transaction}}),Object.defineProperty(s,"encodeSignedDelegate",{enumerable:!0,get:function(){return h.encodeSignedDelegate}}),Object.defineProperty(s,"encodeDelegateAction",{enumerable:!0,get:function(){return h.encodeDelegateAction}});const M=p(38445);s.addKey=(x,T)=>M.actionCreators.addKey(x,T);s.createAccount=()=>M.actionCreators.createAccount();s.deleteAccount=x=>M.actionCreators.deleteAccount(x);s.deleteKey=x=>M.actionCreators.deleteKey(x);s.deployContract=x=>M.actionCreators.deployContract(x);s.fullAccessKey=()=>M.actionCreators.fullAccessKey();s.functionCall=(x,T,L,N,j,B)=>M.actionCreators.functionCall(x,T,L,N,j,B);s.functionCallAccessKey=(x,T,L)=>M.actionCreators.functionCallAccessKey(x,T,L);s.stake=(x,T)=>M.actionCreators.stake(x,T);s.transfer=x=>M.actionCreators.transfer(x)},89867:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Enum=s.Assignable=void 0;var h=p(17527);Object.defineProperty(s,"Assignable",{enumerable:!0,get:function(){return h.Assignable}});s.Enum=class M{constructor(E){if(1!==Object.keys(E).length)throw new Error("Enum can only take single value");Object.keys(E).map(l=>{this[l]=E[l],this.enum=l})}}},84528:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.logWarning=s.TypedError=s.PositionalArgsError=s.ErrorContext=s.ArgumentTypeError=s.UnsupportedSerializationError=s.UnknownArgumentError=s.ConflictingOptions=s.ArgumentSchemaError=void 0;var h=p(74931);Object.defineProperty(s,"ArgumentSchemaError",{enumerable:!0,get:function(){return h.ArgumentSchemaError}}),Object.defineProperty(s,"ConflictingOptions",{enumerable:!0,get:function(){return h.ConflictingOptions}}),Object.defineProperty(s,"UnknownArgumentError",{enumerable:!0,get:function(){return h.UnknownArgumentError}}),Object.defineProperty(s,"UnsupportedSerializationError",{enumerable:!0,get:function(){return h.UnsupportedSerializationError}});var M=p(17527);Object.defineProperty(s,"ArgumentTypeError",{enumerable:!0,get:function(){return M.ArgumentTypeError}}),Object.defineProperty(s,"ErrorContext",{enumerable:!0,get:function(){return M.ErrorContext}}),Object.defineProperty(s,"PositionalArgsError",{enumerable:!0,get:function(){return M.PositionalArgsError}}),Object.defineProperty(s,"TypedError",{enumerable:!0,get:function(){return M.TypedError}});var w=p(41166);Object.defineProperty(s,"logWarning",{enumerable:!0,get:function(){return w.logWarning}})},29110:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.parseNearAmount=s.formatNearAmount=s.NEAR_NOMINATION_EXP=s.NEAR_NOMINATION=void 0;var h=p(41166);Object.defineProperty(s,"NEAR_NOMINATION",{enumerable:!0,get:function(){return h.NEAR_NOMINATION}}),Object.defineProperty(s,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return h.NEAR_NOMINATION_EXP}}),Object.defineProperty(s,"formatNearAmount",{enumerable:!0,get:function(){return h.formatNearAmount}}),Object.defineProperty(s,"parseNearAmount",{enumerable:!0,get:function(){return h.parseNearAmount}})},8127:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(P,x,T,L){void 0===L&&(L=T);var N=Object.getOwnPropertyDescriptor(x,T);(!N||("get"in N?!x.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return x[T]}}),Object.defineProperty(P,L,N)}:function(P,x,T,L){void 0===L&&(L=T),P[L]=x[T]}),M=this&&this.__setModuleDefault||(Object.create?function(P,x){Object.defineProperty(P,"default",{enumerable:!0,value:x})}:function(P,x){P.default=x}),w=this&&this.__importStar||function(P){if(P&&P.__esModule)return P;var x={};if(null!=P)for(var T in P)"default"!==T&&Object.prototype.hasOwnProperty.call(P,T)&&h(x,P,T);return M(x,P),x};Object.defineProperty(s,"__esModule",{value:!0}),s.logWarning=s.rpc_errors=s.KeyPairEd25519=s.KeyPair=s.PublicKey=s.format=s.enums=s.web=s.serialize=s.key_pair=void 0;const E=w(p(46358));s.key_pair=E;const l=w(p(7123));s.serialize=l;const m=w(p(36360));s.web=m;const y=w(p(89867));s.enums=y;const b=w(p(29110));s.format=b;const S=w(p(88414));s.rpc_errors=S;const _=p(46358);Object.defineProperty(s,"PublicKey",{enumerable:!0,get:function(){return _.PublicKey}}),Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return _.KeyPair}}),Object.defineProperty(s,"KeyPairEd25519",{enumerable:!0,get:function(){return _.KeyPairEd25519}});const A=p(84528);Object.defineProperty(s,"logWarning",{enumerable:!0,get:function(){return A.logWarning}})},46358:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.PublicKey=s.KeyType=s.KeyPairEd25519=s.KeyPair=void 0;var h=p(29761);Object.defineProperty(s,"KeyPair",{enumerable:!0,get:function(){return h.KeyPair}}),Object.defineProperty(s,"KeyPairEd25519",{enumerable:!0,get:function(){return h.KeyPairEd25519}}),Object.defineProperty(s,"KeyType",{enumerable:!0,get:function(){return h.KeyType}}),Object.defineProperty(s,"PublicKey",{enumerable:!0,get:function(){return h.PublicKey}})},88414:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ServerError=s.getErrorTypeFromErrorMessage=s.formatError=s.parseResultError=s.parseRpcError=void 0;var h=p(41166);Object.defineProperty(s,"parseRpcError",{enumerable:!0,get:function(){return h.parseRpcError}}),Object.defineProperty(s,"parseResultError",{enumerable:!0,get:function(){return h.parseResultError}}),Object.defineProperty(s,"formatError",{enumerable:!0,get:function(){return h.formatError}}),Object.defineProperty(s,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return h.getErrorTypeFromErrorMessage}}),Object.defineProperty(s,"ServerError",{enumerable:!0,get:function(){return h.ServerError}})},7123:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BinaryReader=s.BinaryWriter=s.BorshError=s.deserialize=s.serialize=s.base_decode=s.base_encode=void 0;var h=p(21531);Object.defineProperty(s,"base_encode",{enumerable:!0,get:function(){return h.baseEncode}}),Object.defineProperty(s,"base_decode",{enumerable:!0,get:function(){return h.baseDecode}}),Object.defineProperty(s,"serialize",{enumerable:!0,get:function(){return h.serialize}}),Object.defineProperty(s,"deserialize",{enumerable:!0,get:function(){return h.deserialize}}),Object.defineProperty(s,"BorshError",{enumerable:!0,get:function(){return h.BorshError}}),Object.defineProperty(s,"BinaryWriter",{enumerable:!0,get:function(){return h.BinaryWriter}}),Object.defineProperty(s,"BinaryReader",{enumerable:!0,get:function(){return h.BinaryReader}})},36360:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.fetchJson=void 0;var h=p(1656);Object.defineProperty(s,"fetchJson",{enumerable:!0,get:function(){return h.fetchJson}})},51631:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.findSeatPrice=s.diffEpochValidators=void 0;var h=p(41166);Object.defineProperty(s,"diffEpochValidators",{enumerable:!0,get:function(){return h.diffEpochValidators}}),Object.defineProperty(s,"findSeatPrice",{enumerable:!0,get:function(){return h.findSeatPrice}})},47601:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WalletConnection=s.ConnectedWalletAccount=void 0;var h=p(9855);Object.defineProperty(s,"ConnectedWalletAccount",{enumerable:!0,get:function(){return h.ConnectedWalletAccount}}),Object.defineProperty(s,"WalletConnection",{enumerable:!0,get:function(){return h.WalletConnection}})},46789:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.derivePath=s.isValidPath=s.getPublicKey=s.getMasterKeyFromSeed=void 0;const h=p(74529),M=p(40489),w=p(25076);s.getMasterKeyFromSeed=y=>{const S=h("sha512","ed25519 seed").update(Buffer.from(y,"hex")).digest();return{key:S.slice(0,32),chainCode:S.slice(32)}};s.getPublicKey=(y,b=!0)=>{const _=M.sign.keyPair.fromSeed(y).secretKey.subarray(32),A=Buffer.alloc(1,0);return b?Buffer.concat([A,Buffer.from(_)]):Buffer.from(_)},s.isValidPath=y=>!!w.pathRegex.test(y)&&!y.split("/").slice(1).map(w.replaceDerive).some(isNaN),s.derivePath=(y,b,S=2147483648)=>{if(!s.isValidPath(y))throw new Error("Invalid derivation path");const{key:_,chainCode:A}=s.getMasterKeyFromSeed(b);return y.split("/").slice(1).map(w.replaceDerive).map(x=>parseInt(x,10)).reduce((x,T)=>(({key:y,chainCode:b},S)=>{const _=Buffer.allocUnsafe(4);_.writeUInt32BE(S,0);const A=Buffer.concat([Buffer.alloc(1,0),y,_]),P=h("sha512",b).update(A).digest();return{key:P.slice(0,32),chainCode:P.slice(32)}})(x,T+S),{key:_,chainCode:A})}},25076:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.replaceDerive=s.pathRegex=void 0,s.pathRegex=new RegExp("^m(\\/[0-9]+')+$"),s.replaceDerive=p=>p.replace("'","")},21087:(ne,s,p)=>{const h=p(48670),{derivePath:M}=p(46789),w=p(78141),E=p(40489),l="m/44'/397'/0'",y=_=>_.trim().split(/\s+/).map(A=>A.toLowerCase()).join(" "),b=(_,A)=>{const P=h.mnemonicToSeed(y(_)),{key:x}=M(A||l,P.toString("hex")),T=E.sign.keyPair.fromSeed(x),L="ed25519:"+w.encode(Buffer.from(T.publicKey));return{seedPhrase:_,secretKey:"ed25519:"+w.encode(Buffer.from(T.secretKey)),publicKey:L}};ne.exports={KEY_DERIVATION_PATH:l,generateSeedPhrase:_=>b(void 0!==_?h.entropyToMnemonic(_):h.generateMnemonic()),normalizeSeedPhrase:y,parseSeedPhrase:b,findSeedPhraseKey:(_,A)=>{const P=b(_);return A.indexOf(P.publicKey)<0?{}:P}}},78141:(ne,s,p)=>{var h=p(21082);ne.exports=h("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},69637:(ne,s)=>{"use strict";var h=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}();ne.exports=s=h.fetch,h.fetch&&(s.default=h.fetch.bind(h)),s.Headers=h.Headers,s.Request=h.Request,s.Response=h.Response},90252:(ne,s,p)=>{p(53495),ne.exports=p(6258)},46974:ne=>{var s=function(){var p=Object.create({Source:Object,config:{},buildArgs:[]});function h(y){var b="config";if(y instanceof Function)b="Source";else if(y instanceof Array)b="buildArgs";else{if(!(y instanceof Object))throw new Error("Invalid configuration option.");b="config"}if(p.hasOwnProperty(b))throw new Error("Duplicated configuration option: "+b+".");p[b]=y}for(var M=0,w=arguments.length;M{ne.exports=function(){throw new Error("Not implemented.")}},6258:(ne,s,p)=>{ne.exports={Class:p(46974),abstractMethod:p(93765)}},39199:ne=>{ne.exports=function(s,p){return parseInt(s.toString(),p||8)}},46389:(ne,s,p)=>{var h=p(99136);function M(E){var l=function(){return l.called?l.value:(l.called=!0,l.value=E.apply(this,arguments))};return l.called=!1,l}function w(E){var l=function(){if(l.called)throw new Error(l.onceError);return l.called=!0,l.value=E.apply(this,arguments)},m=E.name||"Function wrapped with `once`";return l.onceError=m+" shouldn't be called more than once",l.called=!1,l}ne.exports=h(M),ne.exports.strict=h(w),M.proto=M(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return M(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return w(this)},configurable:!0})})},52999:(ne,s,p)=>{"use strict";var h=p(87977);s.certificate=p(12390);var M=h.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});s.RSAPrivateKey=M;var w=h.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});s.RSAPublicKey=w;var E=h.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(l),this.key("subjectPublicKey").bitstr())});s.PublicKey=E;var l=h.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),m=h.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(l),this.key("subjectPrivateKey").octstr())});s.PrivateKey=m;var y=h.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});s.EncryptedPrivateKey=y;var b=h.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});s.DSAPrivateKey=b,s.DSAparam=h.define("DSAparam",function(){this.int()});var S=h.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(_),this.key("publicKey").optional().explicit(1).bitstr())});s.ECPrivateKey=S;var _=h.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});s.signature=h.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},12390:(ne,s,p)=>{"use strict";var h=p(87977),M=h.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),w=h.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),E=h.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),l=h.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(E),this.key("subjectPublicKey").bitstr())}),m=h.define("RelativeDistinguishedName",function(){this.setof(w)}),y=h.define("RDNSequence",function(){this.seqof(m)}),b=h.define("Name",function(){this.choice({rdnSequence:this.use(y)})}),S=h.define("Validity",function(){this.seq().obj(this.key("notBefore").use(M),this.key("notAfter").use(M))}),_=h.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),A=h.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(E),this.key("issuer").use(b),this.key("validity").use(S),this.key("subject").use(b),this.key("subjectPublicKeyInfo").use(l),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(_).optional())}),P=h.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(A),this.key("signatureAlgorithm").use(E),this.key("signatureValue").bitstr())});ne.exports=P},65269:(ne,s,p)=>{var h=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,M=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,w=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,E=p(40347),l=p(84330),m=p(73502).Buffer;ne.exports=function(y,b){var A,S=y.toString(),_=S.match(h);if(_){var x="aes"+_[1],T=m.from(_[2],"hex"),L=m.from(_[3].replace(/[\r\n]/g,""),"base64"),N=E(b,T.slice(0,8),parseInt(_[1],10)).key,j=[],B=l.createDecipheriv(x,N,T);j.push(B.update(L)),j.push(B.final()),A=m.concat(j)}else{var P=S.match(w);A=m.from(P[2].replace(/[\r\n]/g,""),"base64")}return{tag:S.match(M)[1],data:A}}},22772:(ne,s,p)=>{var h=p(52999),M=p(22562),w=p(65269),E=p(84330),l=p(99357),m=p(73502).Buffer;function y(S){var _;"object"==typeof S&&!m.isBuffer(S)&&(_=S.passphrase,S=S.key),"string"==typeof S&&(S=m.from(S));var T,L,A=w(S,_),P=A.tag,x=A.data;switch(P){case"CERTIFICATE":L=h.certificate.decode(x,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(L||(L=h.PublicKey.decode(x,"der")),T=L.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return h.RSAPublicKey.decode(L.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return L.subjectPrivateKey=L.subjectPublicKey,{type:"ec",data:L};case"1.2.840.10040.4.1":return L.algorithm.params.pub_key=h.DSAparam.decode(L.subjectPublicKey.data,"der"),{type:"dsa",data:L.algorithm.params};default:throw new Error("unknown key id "+T)}case"ENCRYPTED PRIVATE KEY":x=function b(S,_){var A=S.algorithm.decrypt.kde.kdeparams.salt,P=parseInt(S.algorithm.decrypt.kde.kdeparams.iters.toString(),10),x=M[S.algorithm.decrypt.cipher.algo.join(".")],T=S.algorithm.decrypt.cipher.iv,L=S.subjectPrivateKey,N=parseInt(x.split("-")[1],10)/8,j=l.pbkdf2Sync(_,A,P,N,"sha1"),B=E.createDecipheriv(x,j,T),V=[];return V.push(B.update(L)),V.push(B.final()),m.concat(V)}(x=h.EncryptedPrivateKey.decode(x,"der"),_);case"PRIVATE KEY":switch(T=(L=h.PrivateKey.decode(x,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return h.RSAPrivateKey.decode(L.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:L.algorithm.curve,privateKey:h.ECPrivateKey.decode(L.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return L.algorithm.params.priv_key=h.DSAparam.decode(L.subjectPrivateKey,"der"),{type:"dsa",params:L.algorithm.params};default:throw new Error("unknown key id "+T)}case"RSA PUBLIC KEY":return h.RSAPublicKey.decode(x,"der");case"RSA PRIVATE KEY":return h.RSAPrivateKey.decode(x,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:h.DSAPrivateKey.decode(x,"der")};case"EC PRIVATE KEY":return{curve:(x=h.ECPrivateKey.decode(x,"der")).parameters.value,privateKey:x.privateKey};default:throw new Error("unknown key type "+P)}}ne.exports=y,y.signature=h.signature},63928:ne=>{"use strict";function s(w){if("string"!=typeof w)throw new TypeError("Path must be a string. Received "+JSON.stringify(w))}function p(w,E){for(var S,l="",m=0,y=-1,b=0,_=0;_<=w.length;++_){if(_2){var A=l.lastIndexOf("/");if(A!==l.length-1){-1===A?(l="",m=0):m=(l=l.slice(0,A)).length-1-l.lastIndexOf("/"),y=_,b=0;continue}}else if(2===l.length||1===l.length){l="",m=0,y=_,b=0;continue}E&&(l.length>0?l+="/..":l="..",m=2)}else l.length>0?l+="/"+w.slice(y+1,_):l=w.slice(y+1,_),m=_-y-1;y=_,b=0}else 46===S&&-1!==b?++b:b=-1}return l}var M={resolve:function(){for(var m,E="",l=!1,y=arguments.length-1;y>=-1&&!l;y--){var b;y>=0?b=arguments[y]:(void 0===m&&(m=process.cwd()),b=m),s(b),0!==b.length&&(E=b+"/"+E,l=47===b.charCodeAt(0))}return E=p(E,!l),l?E.length>0?"/"+E:"/":E.length>0?E:"."},normalize:function(E){if(s(E),0===E.length)return".";var l=47===E.charCodeAt(0),m=47===E.charCodeAt(E.length-1);return 0===(E=p(E,!l)).length&&!l&&(E="."),E.length>0&&m&&(E+="/"),l?"/"+E:E},isAbsolute:function(E){return s(E),E.length>0&&47===E.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var E,l=0;l0&&(void 0===E?E=m:E+="/"+m)}return void 0===E?".":M.normalize(E)},relative:function(E,l){if(s(E),s(l),E===l||(E=M.resolve(E))===(l=M.resolve(l)))return"";for(var m=1;mP){if(47===l.charCodeAt(S+T))return l.slice(S+T+1);if(0===T)return l.slice(S+T)}else b>P&&(47===E.charCodeAt(m+T)?x=T:0===T&&(x=0));break}var L=E.charCodeAt(m+T);if(L!==l.charCodeAt(S+T))break;47===L&&(x=T)}var j="";for(T=m+x+1;T<=y;++T)(T===y||47===E.charCodeAt(T))&&(0===j.length?j+="..":j+="/..");return j.length>0?j+l.slice(S+x):(S+=x,47===l.charCodeAt(S)&&++S,l.slice(S))},_makeLong:function(E){return E},dirname:function(E){if(s(E),0===E.length)return".";for(var l=E.charCodeAt(0),m=47===l,y=-1,b=!0,S=E.length-1;S>=1;--S)if(47===(l=E.charCodeAt(S))){if(!b){y=S;break}}else b=!1;return-1===y?m?"/":".":m&&1===y?"//":E.slice(0,y)},basename:function(E,l){if(void 0!==l&&"string"!=typeof l)throw new TypeError('"ext" argument must be a string');s(E);var S,m=0,y=-1,b=!0;if(void 0!==l&&l.length>0&&l.length<=E.length){if(l.length===E.length&&l===E)return"";var _=l.length-1,A=-1;for(S=E.length-1;S>=0;--S){var P=E.charCodeAt(S);if(47===P){if(!b){m=S+1;break}}else-1===A&&(b=!1,A=S+1),_>=0&&(P===l.charCodeAt(_)?-1==--_&&(y=S):(_=-1,y=A))}return m===y?y=A:-1===y&&(y=E.length),E.slice(m,y)}for(S=E.length-1;S>=0;--S)if(47===E.charCodeAt(S)){if(!b){m=S+1;break}}else-1===y&&(b=!1,y=S+1);return-1===y?"":E.slice(m,y)},extname:function(E){s(E);for(var l=-1,m=0,y=-1,b=!0,S=0,_=E.length-1;_>=0;--_){var A=E.charCodeAt(_);if(47!==A)-1===y&&(b=!1,y=_+1),46===A?-1===l?l=_:1!==S&&(S=1):-1!==l&&(S=-1);else if(!b){m=_+1;break}}return-1===l||-1===y||0===S||1===S&&l===y-1&&l===m+1?"":E.slice(l,y)},format:function(E){if(null===E||"object"!=typeof E)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof E);return function h(w,E){var l=E.dir||E.root,m=E.base||(E.name||"")+(E.ext||"");return l?l===E.root?l+m:l+w+m:m}("/",E)},parse:function(E){s(E);var l={root:"",dir:"",base:"",ext:"",name:""};if(0===E.length)return l;var b,m=E.charCodeAt(0),y=47===m;y?(l.root="/",b=1):b=0;for(var S=-1,_=0,A=-1,P=!0,x=E.length-1,T=0;x>=b;--x)if(47!==(m=E.charCodeAt(x)))-1===A&&(P=!1,A=x+1),46===m?-1===S?S=x:1!==T&&(T=1):-1!==S&&(T=-1);else if(!P){_=x+1;break}return-1===S||-1===A||0===T||1===T&&S===A-1&&S===_+1?-1!==A&&(l.base=l.name=0===_&&y?E.slice(1,A):E.slice(_,A)):(0===_&&y?(l.name=E.slice(1,S),l.base=E.slice(1,A)):(l.name=E.slice(_,S),l.base=E.slice(_,A)),l.ext=E.slice(S,A)),_>0?l.dir=E.slice(0,_-1):y&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};M.posix=M,ne.exports=M},99357:(ne,s,p)=>{s.pbkdf2=p(90415),s.pbkdf2Sync=p(77472)},90415:(ne,s,p)=>{var m,A,h=p(73502).Buffer,M=p(62697),w=p(78867),E=p(77472),l=p(94566),y=global.crypto&&global.crypto.subtle,b={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},S=[];function P(){return A||(A=global.process&&global.process.nextTick?global.process.nextTick:global.queueMicrotask?global.queueMicrotask:global.setImmediate?global.setImmediate:global.setTimeout)}function x(L,N,j,B,V){return y.importKey("raw",L,{name:"PBKDF2"},!1,["deriveBits"]).then(function(G){return y.deriveBits({name:"PBKDF2",salt:N,iterations:j,hash:{name:V}},G,B<<3)}).then(function(G){return h.from(G)})}ne.exports=function(L,N,j,B,V,G){"function"==typeof V&&(G=V,V=void 0);var W=b[(V=V||"sha1").toLowerCase()];if(W&&"function"==typeof global.Promise){if(M(j,B),L=l(L,w,"Password"),N=l(N,w,"Salt"),"function"!=typeof G)throw new Error("No callback provided to pbkdf2");!function T(L,N){L.then(function(j){P()(function(){N(null,j)})},function(j){P()(function(){N(j)})})}(function _(L){if(global.process&&!global.process.browser||!y||!y.importKey||!y.deriveBits)return Promise.resolve(!1);if(void 0!==S[L])return S[L];var N=x(m=m||h.alloc(8),m,10,128,L).then(function(){return!0}).catch(function(){return!1});return S[L]=N,N}(W).then(function(Q){return Q?x(L,N,j,B,W):E(L,N,j,B,V)}),G)}else P()(function(){var Q;try{Q=E(L,N,j,B,V)}catch(q){return G(q)}G(null,Q)})}},78867:ne=>{var s;if(global.process&&global.process.browser)s="utf-8";else if(global.process&&global.process.version){s=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else s="utf-8";ne.exports=s},62697:ne=>{var s=Math.pow(2,30)-1;ne.exports=function(p,h){if("number"!=typeof p)throw new TypeError("Iterations not a number");if(p<0)throw new TypeError("Bad iterations");if("number"!=typeof h)throw new TypeError("Key length not a number");if(h<0||h>s||h!=h)throw new TypeError("Bad key length")}},77472:(ne,s,p)=>{var h=p(55640),M=p(75634),w=p(95244),E=p(73502).Buffer,l=p(62697),m=p(78867),y=p(94566),b=E.alloc(128),S={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function _(x,T,L){var N=function A(x){function T(N){return w(x).update(N).digest()}function L(N){return(new M).update(N).digest()}return"rmd160"===x||"ripemd160"===x?L:"md5"===x?h:T}(x),j="sha512"===x||"sha384"===x?128:64;T.length>j?T=N(T):T.length{var h=p(73502).Buffer;ne.exports=function(M,w,E){if(h.isBuffer(M))return M;if("string"==typeof M)return h.from(M,w);if(ArrayBuffer.isView(M))return h.from(M.buffer);throw new TypeError(E+" must be a string, a Buffer, a typed array or a DataView")}},95857:ne=>{"use strict";typeof process>"u"||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?ne.exports={nextTick:function s(p,h,M,w){if("function"!=typeof p)throw new TypeError('"callback" argument must be a function');var l,m,E=arguments.length;switch(E){case 0:case 1:return process.nextTick(p);case 2:return process.nextTick(function(){p.call(null,h)});case 3:return process.nextTick(function(){p.call(null,h,M)});case 4:return process.nextTick(function(){p.call(null,h,M,w)});default:for(l=new Array(E-1),m=0;m-1};return{enumerable:m("enumerable"),configurable:m("configurable"),writable:m("writable"),value:M}}(E,l),"object"==typeof w){for(m in w)Object.hasOwnProperty.call(w,m)&&(l.value=w[m],s(M,m,l));return M}return s(M,w,l)}},ne.exports?ne.exports=h():p.prr=h()},63701:(ne,s,p)=>{s.publicEncrypt=p(16562),s.privateDecrypt=p(36705),s.privateEncrypt=function(M,w){return s.publicEncrypt(M,w,!0)},s.publicDecrypt=function(M,w){return s.privateDecrypt(M,w,!0)}},86945:(ne,s,p)=>{var h=p(96386),M=p(73502).Buffer;function w(E){var l=M.allocUnsafe(4);return l.writeUInt32BE(E,0),l}ne.exports=function(E,l){for(var b,m=M.alloc(0),y=0;m.length=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function b(I,o,a){var d=y(I,a);return a-1>=o&&(d|=y(I,a-1)<<4),d}function S(I,o,a,d){for(var g=0,D=Math.min(I.length,a),F=o;F=49?z-49+10:z>=17?z-17+10:z}return g}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,a){return o.cmp(a)>0?o:a},l.min=function(o,a){return o.cmp(a)<0?o:a},l.prototype._init=function(o,a,d){if("number"==typeof o)return this._initNumber(o,a,d);if("object"==typeof o)return this._initArray(o,a,d);"hex"===a&&(a=16),w(a===(0|a)&&a>=2&&a<=36);var g=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(g++,this.negative=1),g=0;g-=3)F=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[D]|=F<>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);else if("le"===d)for(g=0,D=0;g>>26-z&67108863,(z+=24)>=26&&(z-=26,D++);return this.strip()},l.prototype._parseHex=function(o,a,d){this.length=Math.ceil((o.length-a)/6),this.words=new Array(this.length);for(var g=0;g=a;g-=2)z=b(o,a,g)<=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;else for(g=(o.length-a)%2==0?a+1:a;g=18?(D-=18,F+=1,this.words[F]|=z>>>26):D+=8;this.strip()},l.prototype._parseBase=function(o,a,d){this.words=[0],this.length=1;for(var g=0,D=1;D<=67108863;D*=a)g++;g--,D=D/a|0;for(var F=o.length-d,z=F%g,C=Math.min(F,F-z)+d,f=0,k=d;k1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var _=["","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"],A=[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 T(I,o,a){a.negative=o.negative^I.negative;var d=I.length+o.length|0;a.length=d,d=d-1|0;var g=0|I.words[0],D=0|o.words[0],F=g*D,z=67108863&F,C=F/67108864|0;a.words[0]=z;for(var f=1;f>>26,se=67108863&C,te=Math.min(f,o.length-1),oe=Math.max(0,f-I.length+1);oe<=te;oe++){var de=f-oe|0;k+=(F=(g=0|I.words[de])*(D=0|o.words[oe])+se)/67108864|0,se=67108863&F}a.words[f]=0|se,C=0|k}return 0!==C?a.words[f]=0|C:a.length--,a.strip()}l.prototype.toString=function(o,a){var d;if(a=0|a||1,16===(o=o||10)||"hex"===o){d="";for(var g=0,D=0,F=0;F>>24-g&16777215)||F!==this.length-1?_[6-C.length]+C+d:C+d,(g+=2)>=26&&(g-=26,F--)}for(0!==D&&(d=D.toString(16)+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],k=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var te=se.modn(k).toString(o);d=(se=se.idivn(k)).isZero()?te+d:_[f-te.length]+te+d}for(this.isZero()&&(d="0"+d);d.length%a!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,a){return w(typeof m<"u"),this.toArrayLike(m,o,a)},l.prototype.toArray=function(o,a){return this.toArrayLike(Array,o,a)},l.prototype.toArrayLike=function(o,a,d){var g=this.byteLength(),D=d||Math.max(1,g);w(g<=D,"byte array longer than desired length"),w(D>0,"Requested array length <= 0"),this.strip();var C,f,F="le"===a,z=new o(D),k=this.clone();if(F){for(f=0;!k.isZero();f++)C=k.andln(255),k.iushrn(8),z[f]=C;for(;f=4096&&(d+=13,a>>>=13),a>=64&&(d+=7,a>>>=7),a>=8&&(d+=4,a>>>=4),a>=2&&(d+=2,a>>>=2),d+a},l.prototype._zeroBits=function(o){if(0===o)return 26;var a=o,d=0;return 8191&a||(d+=13,a>>>=13),127&a||(d+=7,a>>>=7),15&a||(d+=4,a>>>=4),3&a||(d+=2,a>>>=2),1&a||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],a=this._countBits(o);return 26*(this.length-1)+a},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,a=0;ao.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var a;a=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var a,d;this.length>o.length?(a=this,d=o):(a=o,d=this);for(var g=0;go.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var a=0|Math.ceil(o/26),d=o%26;this._expand(a),d>0&&a--;for(var g=0;g0&&(this.words[g]=~this.words[g]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,a){w("number"==typeof o&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),this.words[d]=a?this.words[d]|1<o.length?(d=this,g=o):(d=o,g=this);for(var D=0,F=0;F>>26;for(;0!==D&&F>>26;if(this.length=d.length,0!==D)this.words[this.length]=D,this.length++;else if(d!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var a=this.iadd(o);return o.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var g,D,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(g=this,D=o):(g=o,D=this);for(var F=0,z=0;z>26,this.words[z]=67108863&a;for(;0!==F&&z>26,this.words[z]=67108863&a;if(0===F&&z>>13,de=0|g[1],Ie=8191&de,ye=de>>>13,ve=0|g[2],ae=8191&ve,fe=ve>>>13,pe=0|g[3],Se=8191&pe,ce=pe>>>13,be=0|g[4],Ne=8191&be,Fe=be>>>13,lt=0|g[5],Ge=8191<,He=lt>>>13,Kt=0|g[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|g[7],ot=8191&Vt,at=Vt>>>13,Gt=0|g[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|g[9],Be=8191&Te,Ve=Te>>>13,mt=0|D[0],Ze=8191&mt,ct=mt>>>13,hn=0|D[1],ft=8191&hn,At=hn>>>13,wn=0|D[2],ze=8191&wn,Qe=wn>>>13,Ht=0|D[3],pt=8191&Ht,vt=Ht>>>13,$t=0|D[4],dt=8191&$t,gt=$t>>>13,mn=0|D[5],ut=8191&mn,wt=mn>>>13,Sn=0|D[6],yt=8191&Sn,Et=Sn>>>13,_e=0|D[7],Ee=8191&_e,Me=_e>>>13,me=0|D[8],Oe=8191&me,Ke=me>>>13,it=0|D[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^a.negative,d.length=19;var Bt=(z+(C=Math.imul(te,Ze))|0)+((8191&(f=(f=Math.imul(te,ct))+Math.imul(oe,Ze)|0))<<13)|0;z=((k=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,C=Math.imul(Ie,Ze),f=(f=Math.imul(Ie,ct))+Math.imul(ye,Ze)|0,k=Math.imul(ye,ct);var It=(z+(C=C+Math.imul(te,ft)|0)|0)+((8191&(f=(f=f+Math.imul(te,At)|0)+Math.imul(oe,ft)|0))<<13)|0;z=((k=k+Math.imul(oe,At)|0)+(f>>>13)|0)+(It>>>26)|0,It&=67108863,C=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,k=Math.imul(fe,ct),C=C+Math.imul(Ie,ft)|0,f=(f=f+Math.imul(Ie,At)|0)+Math.imul(ye,ft)|0,k=k+Math.imul(ye,At)|0;var kt=(z+(C=C+Math.imul(te,ze)|0)|0)+((8191&(f=(f=f+Math.imul(te,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;z=((k=k+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,C=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,k=Math.imul(ce,ct),C=C+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,k=k+Math.imul(fe,At)|0,C=C+Math.imul(Ie,ze)|0,f=(f=f+Math.imul(Ie,Qe)|0)+Math.imul(ye,ze)|0,k=k+Math.imul(ye,Qe)|0;var Ot=(z+(C=C+Math.imul(te,pt)|0)|0)+((8191&(f=(f=f+Math.imul(te,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;z=((k=k+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,C=Math.imul(Ne,Ze),f=(f=Math.imul(Ne,ct))+Math.imul(Fe,Ze)|0,k=Math.imul(Fe,ct),C=C+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,k=k+Math.imul(ce,At)|0,C=C+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,k=k+Math.imul(fe,Qe)|0,C=C+Math.imul(Ie,pt)|0,f=(f=f+Math.imul(Ie,vt)|0)+Math.imul(ye,pt)|0,k=k+Math.imul(ye,vt)|0;var Nt=(z+(C=C+Math.imul(te,dt)|0)|0)+((8191&(f=(f=f+Math.imul(te,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;z=((k=k+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,C=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,k=Math.imul(He,ct),C=C+Math.imul(Ne,ft)|0,f=(f=f+Math.imul(Ne,At)|0)+Math.imul(Fe,ft)|0,k=k+Math.imul(Fe,At)|0,C=C+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,k=k+Math.imul(ce,Qe)|0,C=C+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,k=k+Math.imul(fe,vt)|0,C=C+Math.imul(Ie,dt)|0,f=(f=f+Math.imul(Ie,gt)|0)+Math.imul(ye,dt)|0,k=k+Math.imul(ye,gt)|0;var Lt=(z+(C=C+Math.imul(te,ut)|0)|0)+((8191&(f=(f=f+Math.imul(te,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;z=((k=k+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,C=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,k=Math.imul(nt,ct),C=C+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,k=k+Math.imul(He,At)|0,C=C+Math.imul(Ne,ze)|0,f=(f=f+Math.imul(Ne,Qe)|0)+Math.imul(Fe,ze)|0,k=k+Math.imul(Fe,Qe)|0,C=C+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,k=k+Math.imul(ce,vt)|0,C=C+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,k=k+Math.imul(fe,gt)|0,C=C+Math.imul(Ie,ut)|0,f=(f=f+Math.imul(Ie,wt)|0)+Math.imul(ye,ut)|0,k=k+Math.imul(ye,wt)|0;var nn=(z+(C=C+Math.imul(te,yt)|0)|0)+((8191&(f=(f=f+Math.imul(te,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;z=((k=k+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,k=Math.imul(at,ct),C=C+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,k=k+Math.imul(nt,At)|0,C=C+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,k=k+Math.imul(He,Qe)|0,C=C+Math.imul(Ne,pt)|0,f=(f=f+Math.imul(Ne,vt)|0)+Math.imul(Fe,pt)|0,k=k+Math.imul(Fe,vt)|0,C=C+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,k=k+Math.imul(ce,gt)|0,C=C+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,k=k+Math.imul(fe,wt)|0,C=C+Math.imul(Ie,yt)|0,f=(f=f+Math.imul(Ie,Et)|0)+Math.imul(ye,yt)|0,k=k+Math.imul(ye,Et)|0;var Yt=(z+(C=C+Math.imul(te,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(te,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;z=((k=k+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,C=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,k=Math.imul(Ae,ct),C=C+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,k=k+Math.imul(at,At)|0,C=C+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,k=k+Math.imul(nt,Qe)|0,C=C+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,k=k+Math.imul(He,vt)|0,C=C+Math.imul(Ne,dt)|0,f=(f=f+Math.imul(Ne,gt)|0)+Math.imul(Fe,dt)|0,k=k+Math.imul(Fe,gt)|0,C=C+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,k=k+Math.imul(ce,wt)|0,C=C+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,k=k+Math.imul(fe,Et)|0,C=C+Math.imul(Ie,Ee)|0,f=(f=f+Math.imul(Ie,Me)|0)+Math.imul(ye,Ee)|0,k=k+Math.imul(ye,Me)|0;var gn=(z+(C=C+Math.imul(te,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(te,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;z=((k=k+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,C=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,k=Math.imul(Ve,ct),C=C+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,k=k+Math.imul(Ae,At)|0,C=C+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,k=k+Math.imul(at,Qe)|0,C=C+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,k=k+Math.imul(nt,vt)|0,C=C+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,k=k+Math.imul(He,gt)|0,C=C+Math.imul(Ne,ut)|0,f=(f=f+Math.imul(Ne,wt)|0)+Math.imul(Fe,ut)|0,k=k+Math.imul(Fe,wt)|0,C=C+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,k=k+Math.imul(ce,Et)|0,C=C+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,k=k+Math.imul(fe,Me)|0,C=C+Math.imul(Ie,Oe)|0,f=(f=f+Math.imul(Ie,Ke)|0)+Math.imul(ye,Oe)|0,k=k+Math.imul(ye,Ke)|0;var an=(z+(C=C+Math.imul(te,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(te,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;z=((k=k+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,C=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,k=Math.imul(Ve,At),C=C+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,k=k+Math.imul(Ae,Qe)|0,C=C+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,k=k+Math.imul(at,vt)|0,C=C+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,k=k+Math.imul(nt,gt)|0,C=C+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,k=k+Math.imul(He,wt)|0,C=C+Math.imul(Ne,yt)|0,f=(f=f+Math.imul(Ne,Et)|0)+Math.imul(Fe,yt)|0,k=k+Math.imul(Fe,Et)|0,C=C+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,k=k+Math.imul(ce,Me)|0,C=C+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,k=k+Math.imul(fe,Ke)|0;var tn=(z+(C=C+Math.imul(Ie,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ie,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;z=((k=k+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,k=Math.imul(Ve,Qe),C=C+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,k=k+Math.imul(Ae,vt)|0,C=C+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,k=k+Math.imul(at,gt)|0,C=C+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,k=k+Math.imul(nt,wt)|0,C=C+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,k=k+Math.imul(He,Et)|0,C=C+Math.imul(Ne,Ee)|0,f=(f=f+Math.imul(Ne,Me)|0)+Math.imul(Fe,Ee)|0,k=k+Math.imul(Fe,Me)|0,C=C+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,k=k+Math.imul(ce,Ke)|0;var Ut=(z+(C=C+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,C=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,k=Math.imul(Ve,vt),C=C+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,k=k+Math.imul(Ae,gt)|0,C=C+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,k=k+Math.imul(at,wt)|0,C=C+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,k=k+Math.imul(nt,Et)|0,C=C+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,k=k+Math.imul(He,Me)|0,C=C+Math.imul(Ne,Oe)|0,f=(f=f+Math.imul(Ne,Ke)|0)+Math.imul(Fe,Oe)|0,k=k+Math.imul(Fe,Ke)|0;var cn=(z+(C=C+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;z=((k=k+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,C=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,k=Math.imul(Ve,gt),C=C+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,k=k+Math.imul(Ae,wt)|0,C=C+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,k=k+Math.imul(at,Et)|0,C=C+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,k=k+Math.imul(nt,Me)|0,C=C+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,k=k+Math.imul(He,Ke)|0;var Jt=(z+(C=C+Math.imul(Ne,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ne,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;z=((k=k+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,C=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,k=Math.imul(Ve,wt),C=C+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,k=k+Math.imul(Ae,Et)|0,C=C+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,k=k+Math.imul(at,Me)|0,C=C+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,k=k+Math.imul(nt,Ke)|0;var Zt=(z+(C=C+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;z=((k=k+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,C=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,k=Math.imul(Ve,Et),C=C+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,k=k+Math.imul(Ae,Me)|0,C=C+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,k=k+Math.imul(at,Ke)|0;var fn=(z+(C=C+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;z=((k=k+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,C=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,k=Math.imul(Ve,Me),C=C+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,k=k+Math.imul(Ae,Ke)|0;var Qt=(z+(C=C+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;z=((k=k+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,C=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,k=Math.imul(Ve,Ke);var Dt=(z+(C=C+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;z=((k=k+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(z+(C=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return z=((k=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,F[0]=Bt,F[1]=It,F[2]=kt,F[3]=Ot,F[4]=Nt,F[5]=Lt,F[6]=nn,F[7]=Yt,F[8]=gn,F[9]=an,F[10]=tn,F[11]=Ut,F[12]=cn,F[13]=Jt,F[14]=Zt,F[15]=fn,F[16]=Qt,F[17]=Dt,F[18]=Mt,0!==z&&(F[19]=z,d.length++),d};function j(I,o,a){return(new B).mulp(I,o,a)}function B(I,o){this.x=I,this.y=o}Math.imul||(L=T),l.prototype.mulTo=function(o,a){var d,g=this.length+o.length;return d=10===this.length&&10===o.length?L(this,o,a):g<63?T(this,o,a):g<1024?function N(I,o,a){a.negative=o.negative^I.negative,a.length=I.length+o.length;for(var d=0,g=0,D=0;D>>26)|0)>>>26,F&=67108863}a.words[D]=z,d=F,F=g}return 0!==d?a.words[D]=d:a.length--,a.strip()}(this,o,a):j(this,o,a),d},B.prototype.makeRBT=function(o){for(var a=new Array(o),d=l.prototype._countBits(o)-1,g=0;g>=1;return g},B.prototype.permute=function(o,a,d,g,D,F){for(var z=0;z>>=1)D++;return 1<>>=13,d[2*F+1]=8191&D,D>>>=13;for(F=2*a;F>=26,a+=g/67108864|0,a+=D>>>26,this.words[d]=67108863&D}return 0!==a&&(this.words[d]=a,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var a=function x(I){for(var o=new Array(I.bitLength()),a=0;a>>g}return o}(o);if(0===a.length)return new l(1);for(var d=this,g=0;g=0);var D,a=o%26,d=(o-a)/26,g=67108863>>>26-a<<26-a;if(0!==a){var F=0;for(D=0;D>>26-a}F&&(this.words[D]=F,this.length++)}if(0!==d){for(D=this.length-1;D>=0;D--)this.words[D+d]=this.words[D];for(D=0;D=0),g=a?(a-a%26)/26:0;var D=o%26,F=Math.min((o-D)/26,this.length),z=67108863^67108863>>>D<F)for(this.length-=F,f=0;f=0&&(0!==k||f>=g);f--){var se=0|this.words[f];this.words[f]=k<<26-D|se>>>D,k=se&z}return C&&0!==k&&(C.words[C.length++]=k),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,a,d){return w(0===this.negative),this.iushrn(o,a,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var a=o%26,d=(o-a)/26,g=1<=0);var a=o%26,d=(o-a)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==a&&d++,this.length=Math.min(d,this.length),0!==a){var g=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(C/67108864|0),this.words[D+d]=67108863&F}for(;D>26,this.words[D+d]=67108863&F;if(0===z)return this.strip();for(w(-1===z),z=0,D=0;D>26,this.words[D]=67108863&F;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,a){var d=(this.length,o.length),g=this.clone(),D=o,F=0|D.words[D.length-1];0!==(d=26-this._countBits(F))&&(D=D.ushln(d),g.iushln(d),F=0|D.words[D.length-1]);var f,C=g.length-D.length;if("mod"!==a){(f=new l(null)).length=C+1,f.words=new Array(f.length);for(var k=0;k=0;te--){var oe=67108864*(0|g.words[D.length+te])+(0|g.words[D.length+te-1]);for(oe=Math.min(oe/F|0,67108863),g._ishlnsubmul(D,oe,te);0!==g.negative;)oe--,g.negative=0,g._ishlnsubmul(D,1,te),g.isZero()||(g.negative^=1);f&&(f.words[te]=oe)}return f&&f.strip(),g.strip(),"div"!==a&&0!==d&&g.iushrn(d),{div:f||null,mod:g}},l.prototype.divmod=function(o,a,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,a),"mod"!==a&&(g=F.div.neg()),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.iadd(o)),{div:g,mod:D}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),a),"mod"!==a&&(g=F.div.neg()),{div:g,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),a),"div"!==a&&(D=F.mod.neg(),d&&0!==D.negative&&D.isub(o)),{div:F.div,mod:D}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===a?{div:this.divn(o.words[0]),mod:null}:"mod"===a?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,a);var g,D,F},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var a=this.divmod(o);if(a.mod.isZero())return a.div;var d=0!==a.div.negative?a.mod.isub(o):a.mod,g=o.ushrn(1),D=o.andln(1),F=d.cmp(g);return F<0||1===D&&0===F?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var a=(1<<26)%o,d=0,g=this.length-1;g>=0;g--)d=(a*d+(0|this.words[g]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var a=0,d=this.length-1;d>=0;d--){var g=(0|this.words[d])+67108864*a;this.words[d]=g/o|0,a=g%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=new l(0),z=new l(1),C=0;a.isEven()&&d.isEven();)a.iushrn(1),d.iushrn(1),++C;for(var f=d.clone(),k=a.clone();!a.isZero();){for(var se=0,te=1;!(a.words[0]&te)&&se<26;++se,te<<=1);if(se>0)for(a.iushrn(se);se-- >0;)(g.isOdd()||D.isOdd())&&(g.iadd(f),D.isub(k)),g.iushrn(1),D.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(F.isOdd()||z.isOdd())&&(F.iadd(f),z.isub(k)),F.iushrn(1),z.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(F),D.isub(z)):(d.isub(a),F.isub(g),z.isub(D))}return{a:F,b:z,gcd:d.iushln(C)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,a=this,d=o.clone();a=0!==a.negative?a.umod(o):a.clone();for(var g=new l(1),D=new l(0),F=d.clone();a.cmpn(1)>0&&d.cmpn(1)>0;){for(var z=0,C=1;!(a.words[0]&C)&&z<26;++z,C<<=1);if(z>0)for(a.iushrn(z);z-- >0;)g.isOdd()&&g.iadd(F),g.iushrn(1);for(var f=0,k=1;!(d.words[0]&k)&&f<26;++f,k<<=1);if(f>0)for(d.iushrn(f);f-- >0;)D.isOdd()&&D.iadd(F),D.iushrn(1);a.cmp(d)>=0?(a.isub(d),g.isub(D)):(d.isub(a),D.isub(g))}return(se=0===a.cmpn(1)?g:D).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var a=this.clone(),d=o.clone();a.negative=0,d.negative=0;for(var g=0;a.isEven()&&d.isEven();g++)a.iushrn(1),d.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;d.isEven();)d.iushrn(1);var D=a.cmp(d);if(D<0){var F=a;a=d,d=F}else if(0===D||0===d.cmpn(1))break;a.isub(d)}return d.iushln(g)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var a=o%26,d=(o-a)/26,g=1<>>26,z&=67108863,this.words[F]=z}return 0!==D&&(this.words[F]=D,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,a=o<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)d=1;else{a&&(o=-o),w(o<=67108863,"Number is too big");var g=0|this.words[0];d=g===o?0:go.length)return 1;if(this.length=0;d--){var g=0|this.words[d],D=0|o.words[d];if(g!==D){gD&&(a=1);break}}return a},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new Z(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var V={k256:null,p224:null,p192:null,p25519:null};function G(I,o){this.name=I,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function W(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Z(I){if("string"==typeof I){var o=l._prime(I);this.m=o.p,this.prime=o}else w(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}function ee(I){Z.call(this,I),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}G.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},G.prototype.ireduce=function(o){var d,a=o;do{this.split(a,this.tmp),d=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(d>this.n);var g=d0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},G.prototype.split=function(o,a){o.iushrn(this.n,0,a)},G.prototype.imulK=function(o){return o.imul(this.k)},E(W,G),W.prototype.split=function(o,a){for(var d=4194303,g=Math.min(o.length,9),D=0;D>>22,F=z}F>>>=22,o.words[D-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},W.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var a=0,d=0;d>>=26,o.words[d]=D,a=g}return 0!==a&&(o.words[o.length++]=a),o},l._prime=function(o){if(V[o])return V[o];var a;if("k256"===o)a=new W;else if("p224"===o)a=new Q;else if("p192"===o)a=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);a=new J}return V[o]=a,a},Z.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},Z.prototype._verify2=function(o,a){w(0==(o.negative|a.negative),"red works only with positives"),w(o.red&&o.red===a.red,"red works only with red numbers")},Z.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},Z.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},Z.prototype.add=function(o,a){this._verify2(o,a);var d=o.add(a);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},Z.prototype.iadd=function(o,a){this._verify2(o,a);var d=o.iadd(a);return d.cmp(this.m)>=0&&d.isub(this.m),d},Z.prototype.sub=function(o,a){this._verify2(o,a);var d=o.sub(a);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},Z.prototype.isub=function(o,a){this._verify2(o,a);var d=o.isub(a);return d.cmpn(0)<0&&d.iadd(this.m),d},Z.prototype.shl=function(o,a){return this._verify1(o),this.imod(o.ushln(a))},Z.prototype.imul=function(o,a){return this._verify2(o,a),this.imod(o.imul(a))},Z.prototype.mul=function(o,a){return this._verify2(o,a),this.imod(o.mul(a))},Z.prototype.isqr=function(o){return this.imul(o,o.clone())},Z.prototype.sqr=function(o){return this.mul(o,o)},Z.prototype.sqrt=function(o){if(o.isZero())return o.clone();var a=this.m.andln(3);if(w(a%2==1),3===a){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),D=0;!g.isZero()&&0===g.andln(1);)D++,g.iushrn(1);w(!g.isZero());var F=new l(1).toRed(this),z=F.redNeg(),C=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,C).cmp(z);)f.redIAdd(z);for(var k=this.pow(f,g),se=this.pow(o,g.addn(1).iushrn(1)),te=this.pow(o,g),oe=D;0!==te.cmp(F);){for(var de=te,Ie=0;0!==de.cmp(F);Ie++)de=de.redSqr();w(Ie=0;D--){for(var k=a.words[D],se=f-1;se>=0;se--){var te=k>>se&1;(F!==g[0]&&(F=this.sqr(F)),0!==te||0!==z)?(z<<=1,z|=te,(4===++C||0===D&&0===se)&&(F=this.mul(F,g[z]),C=0,z=0)):C=0}f=26}return F},Z.prototype.convertTo=function(o){var a=o.umod(this.m);return a===o?a.clone():a},Z.prototype.convertFrom=function(o){var a=o.clone();return a.red=null,a},l.mont=function(o){return new ee(o)},E(ee,Z),ee.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},ee.prototype.convertFrom=function(o){var a=this.imod(o.mul(this.rinv));return a.red=null,a},ee.prototype.imul=function(o,a){if(o.isZero()||a.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.mul=function(o,a){if(o.isZero()||a.isZero())return new l(0)._forceRed(this);var d=o.mul(a),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=d.isub(g).iushrn(this.shift),F=D;return D.cmp(this.m)>=0?F=D.isub(this.m):D.cmpn(0)<0&&(F=D.iadd(this.m)),F._forceRed(this)},ee.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=p.nmd(ne),this)},36705:(ne,s,p)=>{var h=p(22772),M=p(86945),w=p(79401),E=p(82057),l=p(8466),m=p(96386),y=p(38651),b=p(73502).Buffer;ne.exports=function(x,T,L){var N;N=x.padding?x.padding:L?1:4;var V,j=h(x),B=j.modulus.byteLength();if(T.length>B||new E(T).cmp(j.modulus)>=0)throw new Error("decryption error");V=L?y(new E(T),j):l(T,j);var G=b.alloc(B-V.length);if(V=b.concat([G,V],B),4===N)return function S(P,x){var T=P.modulus.byteLength(),L=m("sha1").update(b.alloc(0)).digest(),N=L.length;if(0!==x[0])throw new Error("decryption error");var j=x.slice(1,N+1),B=x.slice(N+1),V=w(j,M(B,N)),G=w(B,M(V,T-N-1));if(function A(P,x){P=b.from(P),x=b.from(x);var T=0,L=P.length;P.length!==x.length&&(T++,L=Math.min(P.length,x.length));for(var N=-1;++N=x.length){j++;break}var B=x.slice(2,N-1);if(("0002"!==L.toString("hex")&&!T||"0001"!==L.toString("hex")&&T)&&j++,B.length<8&&j++,j)throw new Error("decryption error");return x.slice(N)}(0,V,L);if(3===N)return V;throw new Error("unknown padding")}},16562:(ne,s,p)=>{var h=p(22772),M=p(53753),w=p(96386),E=p(86945),l=p(79401),m=p(82057),y=p(38651),b=p(8466),S=p(73502).Buffer;ne.exports=function(T,L,N){var j;j=T.padding?T.padding:N?1:4;var V,B=h(T);if(4===j)V=function _(x,T){var L=x.modulus.byteLength(),N=T.length,j=w("sha1").update(S.alloc(0)).digest(),B=j.length,V=2*B;if(N>L-V-2)throw new Error("message too long");var G=S.alloc(L-N-V-2),W=L-B-1,Q=M(B),q=l(S.concat([j,G,S.alloc(1,1),T],W),E(Q,W)),J=l(Q,E(q,B));return new m(S.concat([S.alloc(1),J,q],L))}(B,L);else if(1===j)V=function A(x,T,L){var B,N=T.length,j=x.modulus.byteLength();if(N>j-11)throw new Error("message too long");return B=L?S.alloc(j-N-3,255):function P(x){for(var B,T=S.allocUnsafe(x),L=0,N=M(2*x),j=0;L=0)throw new Error("data too long for modulus")}return N?b(V,B):y(V,B)}},38651:(ne,s,p)=>{var h=p(82057),M=p(73502).Buffer;ne.exports=function w(E,l){return M.from(E.toRed(h.mont(l.modulus)).redPow(new h(l.publicExponent)).fromRed().toArray())}},79401:ne=>{ne.exports=function(p,h){for(var M=p.length,w=-1;++w{const h=p(88695),M=p(71465),w=p(23210),E=p(22334);function l(m,y,b,S,_){const A=[].slice.call(arguments,1),P=A.length,x="function"==typeof A[P-1];if(!x&&!h())throw new Error("Callback required as last argument");if(!x){if(P<1)throw new Error("Too few arguments provided");return 1===P?(b=y,y=S=void 0):2===P&&!y.getContext&&(S=b,b=y,y=void 0),new Promise(function(T,L){try{const N=M.create(b,S);T(m(N,y,S))}catch(N){L(N)}})}if(P<2)throw new Error("Too few arguments provided");2===P?(_=b,b=y,y=S=void 0):3===P&&(y.getContext&&typeof _>"u"?(_=S,S=void 0):(_=S,S=b,b=y,y=void 0));try{const T=M.create(b,S);_(null,m(T,y,S))}catch(T){_(T)}}s.create=M.create,s.toCanvas=l.bind(null,w.render),s.toDataURL=l.bind(null,w.renderToDataURL),s.toString=l.bind(null,function(m,y,b){return E.render(m,b)})},88695:ne=>{ne.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},46221:(ne,s,p)=>{const h=p(34792).getSymbolSize;s.getRowColCoords=function(w){if(1===w)return[];const E=Math.floor(w/7)+2,l=h(w),m=145===l?26:2*Math.ceil((l-13)/(2*E-2)),y=[l-7];for(let b=1;b{const h=p(64016),M=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function w(E){this.mode=h.ALPHANUMERIC,this.data=E}w.getBitsLength=function(l){return 11*Math.floor(l/2)+l%2*6},w.prototype.getLength=function(){return this.data.length},w.prototype.getBitsLength=function(){return w.getBitsLength(this.data.length)},w.prototype.write=function(l){let m;for(m=0;m+2<=this.data.length;m+=2){let y=45*M.indexOf(this.data[m]);y+=M.indexOf(this.data[m+1]),l.put(y,11)}this.data.length%2&&l.put(M.indexOf(this.data[m]),6)},ne.exports=w},52118:ne=>{function s(){this.buffer=[],this.length=0}s.prototype={get:function(p){const h=Math.floor(p/8);return 1==(this.buffer[h]>>>7-p%8&1)},put:function(p,h){for(let M=0;M>>h-M-1&1))},getLengthInBits:function(){return this.length},putBit:function(p){const h=Math.floor(this.length/8);this.buffer.length<=h&&this.buffer.push(0),p&&(this.buffer[h]|=128>>>this.length%8),this.length++}},ne.exports=s},34425:ne=>{function s(p){if(!p||p<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=p,this.data=new Uint8Array(p*p),this.reservedBit=new Uint8Array(p*p)}s.prototype.set=function(p,h,M,w){const E=p*this.size+h;this.data[E]=M,w&&(this.reservedBit[E]=!0)},s.prototype.get=function(p,h){return this.data[p*this.size+h]},s.prototype.xor=function(p,h,M){this.data[p*this.size+h]^=M},s.prototype.isReserved=function(p,h){return this.reservedBit[p*this.size+h]},ne.exports=s},85663:(ne,s,p)=>{const h=p(38419),M=p(64016);function w(E){this.mode=M.BYTE,"string"==typeof E&&(E=h(E)),this.data=new Uint8Array(E)}w.getBitsLength=function(l){return 8*l},w.prototype.getLength=function(){return this.data.length},w.prototype.getBitsLength=function(){return w.getBitsLength(this.data.length)},w.prototype.write=function(E){for(let l=0,m=this.data.length;l{const h=p(82259),M=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],w=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];s.getBlocksCount=function(l,m){switch(m){case h.L:return M[4*(l-1)+0];case h.M:return M[4*(l-1)+1];case h.Q:return M[4*(l-1)+2];case h.H:return M[4*(l-1)+3];default:return}},s.getTotalCodewordsCount=function(l,m){switch(m){case h.L:return w[4*(l-1)+0];case h.M:return w[4*(l-1)+1];case h.Q:return w[4*(l-1)+2];case h.H:return w[4*(l-1)+3];default:return}}},82259:(ne,s)=>{s.L={bit:1},s.M={bit:0},s.Q={bit:3},s.H={bit:2},s.isValid=function(M){return M&&typeof M.bit<"u"&&M.bit>=0&&M.bit<4},s.from=function(M,w){if(s.isValid(M))return M;try{return function p(h){if("string"!=typeof h)throw new Error("Param is not a string");switch(h.toLowerCase()){case"l":case"low":return s.L;case"m":case"medium":return s.M;case"q":case"quartile":return s.Q;case"h":case"high":return s.H;default:throw new Error("Unknown EC Level: "+h)}}(M)}catch{return w}}},43114:(ne,s,p)=>{const h=p(34792).getSymbolSize;s.getPositions=function(E){const l=h(E);return[[0,0],[l-7,0],[0,l-7]]}},17078:(ne,s,p)=>{const h=p(34792),E=h.getBCHDigit(1335);s.getEncodedBits=function(m,y){const b=m.bit<<3|y;let S=b<<10;for(;h.getBCHDigit(S)-E>=0;)S^=1335<{const p=new Uint8Array(512),h=new Uint8Array(256);(function(){let w=1;for(let E=0;E<255;E++)p[E]=w,h[w]=E,w<<=1,256&w&&(w^=285);for(let E=255;E<512;E++)p[E]=p[E-255]})(),s.log=function(w){if(w<1)throw new Error("log("+w+")");return h[w]},s.exp=function(w){return p[w]},s.mul=function(w,E){return 0===w||0===E?0:p[h[w]+h[E]]}},80449:(ne,s,p)=>{const h=p(64016),M=p(34792);function w(E){this.mode=h.KANJI,this.data=E}w.getBitsLength=function(l){return 13*l},w.prototype.getLength=function(){return this.data.length},w.prototype.getBitsLength=function(){return w.getBitsLength(this.data.length)},w.prototype.write=function(E){let l;for(l=0;l=33088&&m<=40956)m-=33088;else{if(!(m>=57408&&m<=60351))throw new Error("Invalid SJIS character: "+this.data[l]+"\nMake sure your charset is UTF-8");m-=49472}m=192*(m>>>8&255)+(255&m),E.put(m,13)}},ne.exports=w},33667:(ne,s)=>{s.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const p_N1=3,p_N2=3,p_N3=40,p_N4=10;function h(M,w,E){switch(M){case s.Patterns.PATTERN000:return(w+E)%2==0;case s.Patterns.PATTERN001:return w%2==0;case s.Patterns.PATTERN010:return E%3==0;case s.Patterns.PATTERN011:return(w+E)%3==0;case s.Patterns.PATTERN100:return(Math.floor(w/2)+Math.floor(E/3))%2==0;case s.Patterns.PATTERN101:return w*E%2+w*E%3==0;case s.Patterns.PATTERN110:return(w*E%2+w*E%3)%2==0;case s.Patterns.PATTERN111:return(w*E%3+(w+E)%2)%2==0;default:throw new Error("bad maskPattern:"+M)}}s.isValid=function(w){return null!=w&&""!==w&&!isNaN(w)&&w>=0&&w<=7},s.from=function(w){return s.isValid(w)?parseInt(w,10):void 0},s.getPenaltyN1=function(w){const E=w.size;let l=0,m=0,y=0,b=null,S=null;for(let _=0;_=5&&(l+=p_N1+(m-5)),b=P,m=1),P=w.get(A,_),P===S?y++:(y>=5&&(l+=p_N1+(y-5)),S=P,y=1)}m>=5&&(l+=p_N1+(m-5)),y>=5&&(l+=p_N1+(y-5))}return l},s.getPenaltyN2=function(w){const E=w.size;let l=0;for(let m=0;m=10&&(1488===m||93===m)&&l++,y=y<<1&2047|w.get(S,b),S>=10&&(1488===y||93===y)&&l++}return l*p_N3},s.getPenaltyN4=function(w){let E=0;const l=w.data.length;for(let y=0;y{const h=p(94406),M=p(2699);s.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},s.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},s.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},s.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},s.MIXED={bit:-1},s.getCharCountIndicator=function(l,m){if(!l.ccBits)throw new Error("Invalid mode: "+l);if(!h.isValid(m))throw new Error("Invalid version: "+m);return m>=1&&m<10?l.ccBits[0]:m<27?l.ccBits[1]:l.ccBits[2]},s.getBestModeForData=function(l){return M.testNumeric(l)?s.NUMERIC:M.testAlphanumeric(l)?s.ALPHANUMERIC:M.testKanji(l)?s.KANJI:s.BYTE},s.toString=function(l){if(l&&l.id)return l.id;throw new Error("Invalid mode")},s.isValid=function(l){return l&&l.bit&&l.ccBits},s.from=function(l,m){if(s.isValid(l))return l;try{return function w(E){if("string"!=typeof E)throw new Error("Param is not a string");switch(E.toLowerCase()){case"numeric":return s.NUMERIC;case"alphanumeric":return s.ALPHANUMERIC;case"kanji":return s.KANJI;case"byte":return s.BYTE;default:throw new Error("Unknown mode: "+E)}}(l)}catch{return m}}},97783:(ne,s,p)=>{const h=p(64016);function M(w){this.mode=h.NUMERIC,this.data=w.toString()}M.getBitsLength=function(E){return 10*Math.floor(E/3)+(E%3?E%3*3+1:0)},M.prototype.getLength=function(){return this.data.length},M.prototype.getBitsLength=function(){return M.getBitsLength(this.data.length)},M.prototype.write=function(E){let l,m,y;for(l=0;l+3<=this.data.length;l+=3)m=this.data.substr(l,3),y=parseInt(m,10),E.put(y,10);const b=this.data.length-l;b>0&&(m=this.data.substr(l),y=parseInt(m,10),E.put(y,3*b+1))},ne.exports=M},61106:(ne,s,p)=>{const h=p(45339);s.mul=function(w,E){const l=new Uint8Array(w.length+E.length-1);for(let m=0;m=0;){const m=l[0];for(let b=0;b{const h=p(34792),M=p(82259),w=p(52118),E=p(34425),l=p(46221),m=p(43114),y=p(33667),b=p(14655),S=p(12636),_=p(42088),A=p(17078),P=p(64016),x=p(62033);function B(q,J,Z){const ee=q.size,I=A.getEncodedBits(J,Z);let o,a;for(o=0;o<15;o++)a=1==(I>>o&1),o<6?q.set(o,8,a,!0):o<8?q.set(o+1,8,a,!0):q.set(ee-15+o,8,a,!0),o<8?q.set(8,ee-o-1,a,!0):o<9?q.set(8,15-o-1+1,a,!0):q.set(8,15-o-1,a,!0);q.set(ee-8,8,1,!0)}function G(q,J,Z){const ee=new w;Z.forEach(function(g){ee.put(g.mode.bit,4),ee.put(g.getLength(),P.getCharCountIndicator(g.mode,q)),g.write(ee)});const a=8*(h.getSymbolTotalCodewords(q)-b.getTotalCodewordsCount(q,J));for(ee.getLengthInBits()+4<=a&&ee.put(0,4);ee.getLengthInBits()%8!=0;)ee.putBit(0);const d=(a-ee.getLengthInBits())/8;for(let g=0;g=0&&d<=6&&(0===g||6===g)||g>=0&&g<=6&&(0===d||6===d)||d>=2&&d<=4&&g>=2&&g<=4?q.set(o+d,a+g,!0,!0):q.set(o+d,a+g,!1,!0))}}(g,J),function L(q){const J=q.size;for(let Z=8;Z=7&&function j(q,J){const Z=q.size,ee=_.getEncodedBits(J);let I,o,a;for(let d=0;d<18;d++)I=Math.floor(d/3),o=d%3+Z-8-3,a=1==(ee>>d&1),q.set(I,o,a,!0),q.set(o,I,a,!0)}(g,J),function V(q,J){const Z=q.size;let ee=-1,I=Z-1,o=7,a=0;for(let d=Z-1;d>0;d-=2)for(6===d&&d--;;){for(let g=0;g<2;g++)if(!q.isReserved(I,d-g)){let D=!1;a>>o&1)),q.set(I,d-g,D),o--,-1===o&&(a++,o=7)}if(I+=ee,I<0||Z<=I){I-=ee,ee=-ee;break}}}(g,a),isNaN(ee)&&(ee=y.getBestMask(g,B.bind(null,g,Z))),y.applyMask(ee,g),B(g,Z,ee),{modules:g,version:J,errorCorrectionLevel:Z,maskPattern:ee,segments:I}}s.create=function(J,Z){if(typeof J>"u"||""===J)throw new Error("No input text");let I,o,ee=M.M;return typeof Z<"u"&&(ee=M.from(Z.errorCorrectionLevel,M.M),I=_.from(Z.version),o=y.from(Z.maskPattern),Z.toSJISFunc&&h.setToSJISFunction(Z.toSJISFunc)),Q(J,I,ee,o)}},12636:(ne,s,p)=>{const h=p(61106);function M(w){this.genPoly=void 0,this.degree=w,this.degree&&this.initialize(this.degree)}M.prototype.initialize=function(E){this.degree=E,this.genPoly=h.generateECPolynomial(this.degree)},M.prototype.encode=function(E){if(!this.genPoly)throw new Error("Encoder not initialized");const l=new Uint8Array(E.length+this.degree);l.set(E);const m=h.mod(l,this.genPoly),y=this.degree-m.length;if(y>0){const b=new Uint8Array(this.degree);return b.set(m,y),b}return m},ne.exports=M},2699:(ne,s)=>{const p="[0-9]+";let M="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";M=M.replace(/u/g,"\\u");const w="(?:(?![A-Z0-9 $%*+\\-./:]|"+M+")(?:.|[\r\n]))+";s.KANJI=new RegExp(M,"g"),s.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),s.BYTE=new RegExp(w,"g"),s.NUMERIC=new RegExp(p,"g"),s.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const E=new RegExp("^"+M+"$"),l=new RegExp("^"+p+"$"),m=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");s.testKanji=function(b){return E.test(b)},s.testNumeric=function(b){return l.test(b)},s.testAlphanumeric=function(b){return m.test(b)}},62033:(ne,s,p)=>{const h=p(64016),M=p(97783),w=p(32424),E=p(85663),l=p(80449),m=p(2699),y=p(34792),b=p(74901);function S(j){return unescape(encodeURIComponent(j)).length}function _(j,B,V){const G=[];let W;for(;null!==(W=j.exec(V));)G.push({data:W[0],index:W.index,mode:B,length:W[0].length});return G}function A(j){const B=_(m.NUMERIC,h.NUMERIC,j),V=_(m.ALPHANUMERIC,h.ALPHANUMERIC,j);let G,W;return y.isKanjiModeEnabled()?(G=_(m.BYTE,h.BYTE,j),W=_(m.KANJI,h.KANJI,j)):(G=_(m.BYTE_KANJI,h.BYTE,j),W=[]),B.concat(V,G,W).sort(function(q,J){return q.index-J.index}).map(function(q){return{data:q.data,mode:q.mode,length:q.length}})}function P(j,B){switch(B){case h.NUMERIC:return M.getBitsLength(j);case h.ALPHANUMERIC:return w.getBitsLength(j);case h.KANJI:return l.getBitsLength(j);case h.BYTE:return E.getBitsLength(j)}}function N(j,B){let V;const G=h.getBestModeForData(j);if(V=h.from(B,G),V!==h.BYTE&&V.bit=0?B[B.length-1]:null;return G&&G.mode===V.mode?(B[B.length-1].data+=V.data,B):(B.push(V),B)},[])}(J))},s.rawSplit=function(B){return s.fromArray(A(B,y.isKanjiModeEnabled()))}},34792:(ne,s)=>{let p;const h=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];s.getSymbolSize=function(w){if(!w)throw new Error('"version" cannot be null or undefined');if(w<1||w>40)throw new Error('"version" should be in range from 1 to 40');return 4*w+17},s.getSymbolTotalCodewords=function(w){return h[w]},s.getBCHDigit=function(M){let w=0;for(;0!==M;)w++,M>>>=1;return w},s.setToSJISFunction=function(w){if("function"!=typeof w)throw new Error('"toSJISFunc" is not a valid function.');p=w},s.isKanjiModeEnabled=function(){return typeof p<"u"},s.toSJIS=function(w){return p(w)}},94406:(ne,s)=>{s.isValid=function(h){return!isNaN(h)&&h>=1&&h<=40}},42088:(ne,s,p)=>{const h=p(34792),M=p(14655),w=p(82259),E=p(64016),l=p(94406),y=h.getBCHDigit(7973);function S(P,x){return E.getCharCountIndicator(P,x)+4}function _(P,x){let T=0;return P.forEach(function(L){const N=S(L.mode,x);T+=N+L.getBitsLength()}),T}s.from=function(x,T){return l.isValid(x)?parseInt(x,10):T},s.getCapacity=function(x,T,L){if(!l.isValid(x))throw new Error("Invalid QR Code version");typeof L>"u"&&(L=E.BYTE);const B=8*(h.getSymbolTotalCodewords(x)-M.getTotalCodewordsCount(x,T));if(L===E.MIXED)return B;const V=B-S(L,x);switch(L){case E.NUMERIC:return Math.floor(V/10*3);case E.ALPHANUMERIC:return Math.floor(V/11*2);case E.KANJI:return Math.floor(V/13);case E.BYTE:default:return Math.floor(V/8)}},s.getBestVersionForData=function(x,T){let L;const N=w.from(T,w.M);if(Array.isArray(x)){if(x.length>1)return function A(P,x){for(let T=1;T<=40;T++)if(_(P,T)<=s.getCapacity(T,x,E.MIXED))return T}(x,N);if(0===x.length)return 1;L=x[0]}else L=x;return function b(P,x,T){for(let L=1;L<=40;L++)if(x<=s.getCapacity(L,T,P))return L}(L.mode,L.getLength(),N)},s.getEncodedBits=function(x){if(!l.isValid(x)||x<7)throw new Error("Invalid QR Code version");let T=x<<12;for(;h.getBCHDigit(T)-y>=0;)T^=7973<{const h=p(36355);s.render=function(l,m,y){let b=y,S=m;typeof b>"u"&&(!m||!m.getContext)&&(b=m,m=void 0),m||(S=function w(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),b=h.getOptions(b);const _=h.getImageWidth(l.modules.size,b),A=S.getContext("2d"),P=A.createImageData(_,_);return h.qrToImageData(P.data,l,b),function M(E,l,m){E.clearRect(0,0,l.width,l.height),l.style||(l.style={}),l.height=m,l.width=m,l.style.height=m+"px",l.style.width=m+"px"}(A,S,_),A.putImageData(P,0,0),S},s.renderToDataURL=function(l,m,y){let b=y;typeof b>"u"&&(!m||!m.getContext)&&(b=m,m=void 0),b||(b={});const S=s.render(l,m,b),_=b.type||"image/png",A=b.rendererOpts||{};return S.toDataURL(_,A.quality)}},22334:(ne,s,p)=>{const h=p(36355);function M(l,m){const y=l.a/255,b=m+'="'+l.hex+'"';return y<1?b+" "+m+'-opacity="'+y.toFixed(2).slice(1)+'"':b}function w(l,m,y){let b=l+m;return typeof y<"u"&&(b+=" "+y),b}s.render=function(m,y,b){const S=h.getOptions(y),_=m.modules.size,A=m.modules.data,P=_+2*S.margin,x=S.color.light.a?"':"",T="0&&x>0&&l[P-1]||(b+=_?w("M",x+y,.5+T+y):w("m",S,0),S=0,_=!1),x+1',L='viewBox="0 0 '+P+" "+P+'"',j=''+x+T+"\n";return"function"==typeof b&&b(null,j),j}},36355:(ne,s)=>{function p(h){if("number"==typeof h&&(h=h.toString()),"string"!=typeof h)throw new Error("Color should be defined as hex string");let M=h.slice().replace("#","").split("");if(M.length<3||5===M.length||M.length>8)throw new Error("Invalid hex color: "+h);(3===M.length||4===M.length)&&(M=Array.prototype.concat.apply([],M.map(function(E){return[E,E]}))),6===M.length&&M.push("F","F");const w=parseInt(M.join(""),16);return{r:w>>24&255,g:w>>16&255,b:w>>8&255,a:255&w,hex:"#"+M.slice(0,6).join("")}}s.getOptions=function(M){M||(M={}),M.color||(M.color={});const w=typeof M.margin>"u"||null===M.margin||M.margin<0?4:M.margin,E=M.width&&M.width>=21?M.width:void 0,l=M.scale||4;return{width:E,scale:E?4:l,margin:w,color:{dark:p(M.color.dark||"#000000ff"),light:p(M.color.light||"#ffffffff")},type:M.type,rendererOpts:M.rendererOpts||{}}},s.getScale=function(M,w){return w.width&&w.width>=M+2*w.margin?w.width/(M+2*w.margin):w.scale},s.getImageWidth=function(M,w){const E=s.getScale(M,w);return Math.floor((M+2*w.margin)*E)},s.qrToImageData=function(M,w,E){const l=w.modules.size,m=w.modules.data,y=s.getScale(l,E),b=Math.floor((l+2*E.margin)*y),S=E.margin*y,_=[E.color.light,E.color.dark];for(let A=0;A=S&&P>=S&&A{"use strict";const h=p(18372),M=p(12761),w=p(78951),E=p(44770),m=Symbol("encodeFragmentIdentifier");function S(B){if("string"!=typeof B||1!==B.length)throw new TypeError("arrayFormatSeparator must be single character string")}function _(B,V){return V.encode?V.strict?h(B):encodeURIComponent(B):B}function A(B,V){return V.decode?M(B):B}function P(B){return Array.isArray(B)?B.sort():"object"==typeof B?P(Object.keys(B)).sort((V,G)=>Number(V)-Number(G)).map(V=>B[V]):B}function x(B){const V=B.indexOf("#");return-1!==V&&(B=B.slice(0,V)),B}function L(B){const V=(B=x(B)).indexOf("?");return-1===V?"":B.slice(V+1)}function N(B,V){return V.parseNumbers&&!Number.isNaN(Number(B))&&"string"==typeof B&&""!==B.trim()?B=Number(B):V.parseBooleans&&null!==B&&("true"===B.toLowerCase()||"false"===B.toLowerCase())&&(B="true"===B.toLowerCase()),B}function j(B,V){S((V=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},V)).arrayFormatSeparator);const G=function b(B){let V;switch(B.arrayFormat){case"index":return(G,W,Q)=>{V=/\[(\d*)\]$/.exec(G),G=G.replace(/\[\d*\]$/,""),V?(void 0===Q[G]&&(Q[G]={}),Q[G][V[1]]=W):Q[G]=W};case"bracket":return(G,W,Q)=>{V=/(\[\])$/.exec(G),G=G.replace(/\[\]$/,""),V?void 0!==Q[G]?Q[G]=[].concat(Q[G],W):Q[G]=[W]:Q[G]=W};case"colon-list-separator":return(G,W,Q)=>{V=/(:list)$/.exec(G),G=G.replace(/:list$/,""),V?void 0!==Q[G]?Q[G]=[].concat(Q[G],W):Q[G]=[W]:Q[G]=W};case"comma":case"separator":return(G,W,Q)=>{const q="string"==typeof W&&W.includes(B.arrayFormatSeparator),J="string"==typeof W&&!q&&A(W,B).includes(B.arrayFormatSeparator);W=J?A(W,B):W;const Z=q||J?W.split(B.arrayFormatSeparator).map(ee=>A(ee,B)):null===W?W:A(W,B);Q[G]=Z};case"bracket-separator":return(G,W,Q)=>{const q=/(\[\])$/.test(G);if(G=G.replace(/\[\]$/,""),!q)return void(Q[G]=W&&A(W,B));const J=null===W?[]:W.split(B.arrayFormatSeparator).map(Z=>A(Z,B));void 0!==Q[G]?Q[G]=[].concat(Q[G],J):Q[G]=J};default:return(G,W,Q)=>{void 0!==Q[G]?Q[G]=[].concat(Q[G],W):Q[G]=W}}}(V),W=Object.create(null);if("string"!=typeof B||!(B=B.trim().replace(/^[?#&]/,"")))return W;for(const Q of B.split("&")){if(""===Q)continue;let[q,J]=w(V.decode?Q.replace(/\+/g," "):Q,"=");J=void 0===J?null:["comma","separator","bracket-separator"].includes(V.arrayFormat)?J:A(J,V),G(A(q,V),J,W)}for(const Q of Object.keys(W)){const q=W[Q];if("object"==typeof q&&null!==q)for(const J of Object.keys(q))q[J]=N(q[J],V);else W[Q]=N(q,V)}return!1===V.sort?W:(!0===V.sort?Object.keys(W).sort():Object.keys(W).sort(V.sort)).reduce((Q,q)=>{const J=W[q];return Boolean(J)&&"object"==typeof J&&!Array.isArray(J)?Q[q]=P(J):Q[q]=J,Q},Object.create(null))}s.extract=L,s.parse=j,s.stringify=(B,V)=>{if(!B)return"";S((V=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},V)).arrayFormatSeparator);const G=J=>V.skipNull&&(B=>null==B)(B[J])||V.skipEmptyString&&""===B[J],W=function y(B){switch(B.arrayFormat){case"index":return V=>(G,W)=>{const Q=G.length;return void 0===W||B.skipNull&&null===W||B.skipEmptyString&&""===W?G:null===W?[...G,[_(V,B),"[",Q,"]"].join("")]:[...G,[_(V,B),"[",_(Q,B),"]=",_(W,B)].join("")]};case"bracket":return V=>(G,W)=>void 0===W||B.skipNull&&null===W||B.skipEmptyString&&""===W?G:null===W?[...G,[_(V,B),"[]"].join("")]:[...G,[_(V,B),"[]=",_(W,B)].join("")];case"colon-list-separator":return V=>(G,W)=>void 0===W||B.skipNull&&null===W||B.skipEmptyString&&""===W?G:null===W?[...G,[_(V,B),":list="].join("")]:[...G,[_(V,B),":list=",_(W,B)].join("")];case"comma":case"separator":case"bracket-separator":{const V="bracket-separator"===B.arrayFormat?"[]=":"=";return G=>(W,Q)=>void 0===Q||B.skipNull&&null===Q||B.skipEmptyString&&""===Q?W:(Q=null===Q?"":Q,0===W.length?[[_(G,B),V,_(Q,B)].join("")]:[[W,_(Q,B)].join(B.arrayFormatSeparator)])}default:return V=>(G,W)=>void 0===W||B.skipNull&&null===W||B.skipEmptyString&&""===W?G:null===W?[...G,_(V,B)]:[...G,[_(V,B),"=",_(W,B)].join("")]}}(V),Q={};for(const J of Object.keys(B))G(J)||(Q[J]=B[J]);const q=Object.keys(Q);return!1!==V.sort&&q.sort(V.sort),q.map(J=>{const Z=B[J];return void 0===Z?"":null===Z?_(J,V):Array.isArray(Z)?0===Z.length&&"bracket-separator"===V.arrayFormat?_(J,V)+"[]":Z.reduce(W(J),[]).join("&"):_(J,V)+"="+_(Z,V)}).filter(J=>J.length>0).join("&")},s.parseUrl=(B,V)=>{V=Object.assign({decode:!0},V);const[G,W]=w(B,"#");return Object.assign({url:G.split("?")[0]||"",query:j(L(B),V)},V&&V.parseFragmentIdentifier&&W?{fragmentIdentifier:A(W,V)}:{})},s.stringifyUrl=(B,V)=>{V=Object.assign({encode:!0,strict:!0,[m]:!0},V);const G=x(B.url).split("?")[0]||"",W=s.extract(B.url),Q=s.parse(W,{sort:!1}),q=Object.assign(Q,B.query);let J=s.stringify(q,V);J&&(J=`?${J}`);let Z=function T(B){let V="";const G=B.indexOf("#");return-1!==G&&(V=B.slice(G)),V}(B.url);return B.fragmentIdentifier&&(Z=`#${V[m]?_(B.fragmentIdentifier,V):B.fragmentIdentifier}`),`${G}${J}${Z}`},s.pick=(B,V,G)=>{G=Object.assign({parseFragmentIdentifier:!0,[m]:!1},G);const{url:W,query:Q,fragmentIdentifier:q}=s.parseUrl(B,G);return s.stringifyUrl({url:W,query:E(Q,V),fragmentIdentifier:q},G)},s.exclude=(B,V,G)=>{const W=Array.isArray(V)?Q=>!V.includes(Q):(Q,q)=>!V(Q,q);return s.pick(B,W,G)}},90516:ne=>{"use strict";function s(p,h){return Object.prototype.hasOwnProperty.call(p,h)}ne.exports=function(p,h,M,w){h=h||"&",M=M||"=";var E={};if("string"!=typeof p||0===p.length)return E;var l=/\+/g;p=p.split(h);var m=1e3;w&&"number"==typeof w.maxKeys&&(m=w.maxKeys);var y=p.length;m>0&&y>m&&(y=m);for(var b=0;b=0?(A=S.substr(0,_),P=S.substr(_+1)):(A=S,P=""),x=decodeURIComponent(A),T=decodeURIComponent(P),s(E,x)?Array.isArray(E[x])?E[x].push(T):E[x]=[E[x],T]:E[x]=T}return E}},75776:ne=>{"use strict";var s=function(p){switch(typeof p){case"string":return p;case"boolean":return p?"true":"false";case"number":return isFinite(p)?p:"";default:return""}};ne.exports=function(p,h,M,w){return h=h||"&",M=M||"=",null===p&&(p=void 0),"object"==typeof p?Object.keys(p).map(function(E){var l=encodeURIComponent(s(E))+M;return Array.isArray(p[E])?p[E].map(function(m){return l+encodeURIComponent(s(m))}).join(h):l+encodeURIComponent(s(p[E]))}).join(h):w?encodeURIComponent(s(w))+M+encodeURIComponent(s(p)):""}},17137:(ne,s,p)=>{"use strict";s.decode=s.parse=p(90516),s.encode=s.stringify=p(75776)},18958:ne=>{"use strict";function s(h){try{return JSON.stringify(h)}catch{return'"[Circular]"'}}ne.exports=function p(h,M,w){var E=w&&w.stringify||s;if("object"==typeof h&&null!==h){var m=M.length+1;if(1===m)return h;var y=new Array(m);y[0]=E(h);for(var b=1;b-1?P:0,h.charCodeAt(T+1)){case 100:case 102:if(A>=S||null==M[A])break;P=S||null==M[A])break;P=S||void 0===M[A])break;P",P=T+2,T++;break}_+=E(M[A]),P=T+2,T++;break;case 115:if(A>=S)break;P{"use strict";var h=65536,M=4294967295;var E=p(73502).Buffer,l=global.crypto||global.msCrypto;l&&l.getRandomValues?ne.exports=function m(y,b){if(y>M)throw new RangeError("requested too many random bytes");var S=E.allocUnsafe(y);if(y>0)if(y>h)for(var _=0;_{"use strict";function h(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var M=p(73502),w=p(53753),E=M.Buffer,l=M.kMaxLength,m=global.crypto||global.msCrypto,y=Math.pow(2,32)-1;function b(x,T){if("number"!=typeof x||x!=x)throw new TypeError("offset must be a number");if(x>y||x<0)throw new TypeError("offset must be a uint32");if(x>l||x>T)throw new RangeError("offset out of range")}function S(x,T,L){if("number"!=typeof x||x!=x)throw new TypeError("size must be a number");if(x>y||x<0)throw new TypeError("size must be a uint32");if(x+T>L||x>l)throw new RangeError("buffer too small")}function A(x,T,L,N){if(process.browser){var j=x.buffer,B=new Uint8Array(j,T,L);return m.getRandomValues(B),N?void process.nextTick(function(){N(null,x)}):x}if(!N)return w(L).copy(x,T),x;w(L,function(G,W){if(G)return N(G);W.copy(x,T),N(null,x)})}m&&m.getRandomValues||!process.browser?(s.randomFill=function _(x,T,L,N){if(!(E.isBuffer(x)||x instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof T)N=T,T=0,L=x.length;else if("function"==typeof L)N=L,L=x.length-T;else if("function"!=typeof N)throw new TypeError('"cb" argument must be a function');return b(T,x.length),S(L,T,x.length),A(x,T,L,N)},s.randomFillSync=function P(x,T,L){if(typeof T>"u"&&(T=0),!(E.isBuffer(x)||x instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return b(T,x.length),void 0===L&&(L=x.length-T),S(L,T,x.length),A(x,T,L)}):(s.randomFill=h,s.randomFillSync=h)},66509:(ne,s,p)=>{"use strict";var h=p(54284),M=p(44854);function w(R){for(var H="https://reactjs.org/docs/error-decoder.html?invariant="+R,re=1;re"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),S=Object.prototype.hasOwnProperty,_=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,A={},P={};function N(R,H,re,le,De,Pe,We){this.acceptsBooleans=2===H||3===H||4===H,this.attributeName=le,this.attributeNamespace=De,this.mustUseProperty=re,this.propertyName=R,this.type=H,this.sanitizeURL=Pe,this.removeEmptyString=We}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(R){j[R]=new N(R,0,!1,R,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(R){var H=R[0];j[H]=new N(H,1,!1,R[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(R){j[R]=new N(R,2,!1,R.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(R){j[R]=new N(R,2,!1,R,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(R){j[R]=new N(R,3,!1,R.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(R){j[R]=new N(R,3,!0,R,null,!1,!1)}),["capture","download"].forEach(function(R){j[R]=new N(R,4,!1,R,null,!1,!1)}),["cols","rows","size","span"].forEach(function(R){j[R]=new N(R,6,!1,R,null,!1,!1)}),["rowSpan","start"].forEach(function(R){j[R]=new N(R,5,!1,R.toLowerCase(),null,!1,!1)});var B=/[\-:]([a-z])/g;function V(R){return R[1].toUpperCase()}function G(R,H,re,le){var De=j.hasOwnProperty(H)?j[H]:null;(null!==De?0!==De.type:le||!(2"u"||function T(R,H,re,le){if(null!==re&&0===re.type)return!1;switch(typeof H){case"function":case"symbol":return!0;case"boolean":return!le&&(null!==re?!re.acceptsBooleans:"data-"!==(R=R.toLowerCase().slice(0,5))&&"aria-"!==R);default:return!1}}(R,H,re,le))return!0;if(le)return!1;if(null!==re)switch(re.type){case 3:return!H;case 4:return!1===H;case 5:return isNaN(H);case 6:return isNaN(H)||1>H}return!1}(H,re,De,le)&&(re=null),le||null===De?function x(R){return!!S.call(P,R)||!S.call(A,R)&&(_.test(R)?P[R]=!0:(A[R]=!0,!1))}(H)&&(null===re?R.removeAttribute(H):R.setAttribute(H,""+re)):De.mustUseProperty?R[De.propertyName]=null===re?3!==De.type&&"":re:(H=De.attributeName,le=De.attributeNamespace,null===re?R.removeAttribute(H):(re=3===(De=De.type)||4===De&&!0===re?"":""+re,le?R.setAttributeNS(le,H,re):R.setAttribute(H,re))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(R){var H=R.replace(B,V);j[H]=new N(H,1,!1,R,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(R){var H=R.replace(B,V);j[H]=new N(H,1,!1,R,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(R){var H=R.replace(B,V);j[H]=new N(H,1,!1,R,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(R){j[R]=new N(R,1,!1,R.toLowerCase(),null,!1,!1)}),j.xlinkHref=new N("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(R){j[R]=new N(R,1,!1,R.toLowerCase(),null,!0,!0)});var W=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Q=Symbol.for("react.element"),q=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),F=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var z=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var C=Symbol.iterator;function f(R){return null===R||"object"!=typeof R?null:"function"==typeof(R=C&&R[C]||R["@@iterator"])?R:null}var se,k=Object.assign;function te(R){if(void 0===se)try{throw Error()}catch(re){var H=re.stack.trim().match(/\n( *(at )?)/);se=H&&H[1]||""}return"\n"+se+R}var oe=!1;function de(R,H){if(!R||oe)return"";oe=!0;var re=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(H)if(H=function(){throw Error()},Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(H,[])}catch(Rt){var le=Rt}Reflect.construct(R,[],H)}else{try{H.call()}catch(Rt){le=Rt}R.call(H.prototype)}else{try{throw Error()}catch(Rt){le=Rt}R()}}catch(Rt){if(Rt&&le&&"string"==typeof Rt.stack){for(var De=Rt.stack.split("\n"),Pe=le.stack.split("\n"),We=De.length-1,rt=Pe.length-1;1<=We&&0<=rt&&De[We]!==Pe[rt];)rt--;for(;1<=We&&0<=rt;We--,rt--)if(De[We]!==Pe[rt]){if(1!==We||1!==rt)do{if(We--,0>--rt||De[We]!==Pe[rt]){var bt="\n"+De[We].replace(" at new "," at ");return R.displayName&&bt.includes("")&&(bt=bt.replace("",R.displayName)),bt}}while(1<=We&&0<=rt);break}}}finally{oe=!1,Error.prepareStackTrace=re}return(R=R?R.displayName||R.name:"")?te(R):""}function Ie(R){switch(R.tag){case 5:return te(R.type);case 16:return te("Lazy");case 13:return te("Suspense");case 19:return te("SuspenseList");case 0:case 2:case 15:return R=de(R.type,!1);case 11:return R=de(R.type.render,!1);case 1:return R=de(R.type,!0);default:return""}}function ye(R){if(null==R)return null;if("function"==typeof R)return R.displayName||R.name||null;if("string"==typeof R)return R;switch(R){case J:return"Fragment";case q:return"Portal";case ee:return"Profiler";case Z:return"StrictMode";case d:return"Suspense";case g:return"SuspenseList"}if("object"==typeof R)switch(R.$$typeof){case o:return(R.displayName||"Context")+".Consumer";case I:return(R._context.displayName||"Context")+".Provider";case a:var H=R.render;return(R=R.displayName)||(R=""!==(R=H.displayName||H.name||"")?"ForwardRef("+R+")":"ForwardRef"),R;case D:return null!==(H=R.displayName||null)?H:ye(R.type)||"Memo";case F:H=R._payload,R=R._init;try{return ye(R(H))}catch{}}return null}function ve(R){var H=R.type;switch(R.tag){case 24:return"Cache";case 9:return(H.displayName||"Context")+".Consumer";case 10:return(H._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return R=(R=H.render).displayName||R.name||"",H.displayName||(""!==R?"ForwardRef("+R+")":"ForwardRef");case 7:return"Fragment";case 5:return H;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(H);case 8:return H===Z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof H)return H.displayName||H.name||null;if("string"==typeof H)return H}return null}function ae(R){switch(typeof R){case"boolean":case"number":case"string":case"undefined":case"object":return R;default:return""}}function fe(R){var H=R.type;return(R=R.nodeName)&&"input"===R.toLowerCase()&&("checkbox"===H||"radio"===H)}function Se(R){R._valueTracker||(R._valueTracker=function pe(R){var H=fe(R)?"checked":"value",re=Object.getOwnPropertyDescriptor(R.constructor.prototype,H),le=""+R[H];if(!R.hasOwnProperty(H)&&typeof re<"u"&&"function"==typeof re.get&&"function"==typeof re.set){var De=re.get,Pe=re.set;return Object.defineProperty(R,H,{configurable:!0,get:function(){return De.call(this)},set:function(We){le=""+We,Pe.call(this,We)}}),Object.defineProperty(R,H,{enumerable:re.enumerable}),{getValue:function(){return le},setValue:function(We){le=""+We},stopTracking:function(){R._valueTracker=null,delete R[H]}}}}(R))}function ce(R){if(!R)return!1;var H=R._valueTracker;if(!H)return!0;var re=H.getValue(),le="";return R&&(le=fe(R)?R.checked?"true":"false":R.value),(R=le)!==re&&(H.setValue(R),!0)}function be(R){if(typeof(R=R||(typeof document<"u"?document:void 0))>"u")return null;try{return R.activeElement||R.body}catch{return R.body}}function Ne(R,H){var re=H.checked;return k({},H,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:re??R._wrapperState.initialChecked})}function Fe(R,H){var re=null==H.defaultValue?"":H.defaultValue,le=null!=H.checked?H.checked:H.defaultChecked;re=ae(null!=H.value?H.value:re),R._wrapperState={initialChecked:le,initialValue:re,controlled:"checkbox"===H.type||"radio"===H.type?null!=H.checked:null!=H.value}}function lt(R,H){null!=(H=H.checked)&&G(R,"checked",H,!1)}function Ge(R,H){lt(R,H);var re=ae(H.value),le=H.type;if(null!=re)"number"===le?(0===re&&""===R.value||R.value!=re)&&(R.value=""+re):R.value!==""+re&&(R.value=""+re);else if("submit"===le||"reset"===le)return void R.removeAttribute("value");H.hasOwnProperty("value")?Kt(R,H.type,re):H.hasOwnProperty("defaultValue")&&Kt(R,H.type,ae(H.defaultValue)),null==H.checked&&null!=H.defaultChecked&&(R.defaultChecked=!!H.defaultChecked)}function He(R,H,re){if(H.hasOwnProperty("value")||H.hasOwnProperty("defaultValue")){var le=H.type;if(!("submit"!==le&&"reset"!==le||void 0!==H.value&&null!==H.value))return;H=""+R._wrapperState.initialValue,re||H===R.value||(R.value=H),R.defaultValue=H}""!==(re=R.name)&&(R.name=""),R.defaultChecked=!!R._wrapperState.initialChecked,""!==re&&(R.name=re)}function Kt(R,H,re){("number"!==H||be(R.ownerDocument)!==R)&&(null==re?R.defaultValue=""+R._wrapperState.initialValue:R.defaultValue!==""+re&&(R.defaultValue=""+re))}var tt=Array.isArray;function nt(R,H,re,le){if(R=R.options,H){H={};for(var De=0;De"+H.valueOf().toString()+"",H=Te.firstChild;R.firstChild;)R.removeChild(R.firstChild);for(;H.firstChild;)R.appendChild(H.firstChild)}},typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(H,re,le,De){MSApp.execUnsafeLocalFunction(function(){return R(H,re)})}:R);function Ve(R,H){if(H){var re=R.firstChild;if(re&&re===R.lastChild&&3===re.nodeType)return void(re.nodeValue=H)}R.textContent=H}var mt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ze=["Webkit","ms","Moz","O"];function ct(R,H,re){return null==H||"boolean"==typeof H||""===H?"":re||"number"!=typeof H||0===H||mt.hasOwnProperty(R)&&mt[R]?(""+H).trim():H+"px"}function hn(R,H){for(var re in R=R.style,H)if(H.hasOwnProperty(re)){var le=0===re.indexOf("--"),De=ct(re,H[re],le);"float"===re&&(re="cssFloat"),le?R.setProperty(re,De):R[re]=De}}Object.keys(mt).forEach(function(R){Ze.forEach(function(H){H=H+R.charAt(0).toUpperCase()+R.substring(1),mt[H]=mt[R]})});var ft=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function At(R,H){if(H){if(ft[R]&&(null!=H.children||null!=H.dangerouslySetInnerHTML))throw Error(w(137,R));if(null!=H.dangerouslySetInnerHTML){if(null!=H.children)throw Error(w(60));if("object"!=typeof H.dangerouslySetInnerHTML||!("__html"in H.dangerouslySetInnerHTML))throw Error(w(61))}if(null!=H.style&&"object"!=typeof H.style)throw Error(w(62))}}function wn(R,H){if(-1===R.indexOf("-"))return"string"==typeof H.is;switch(R){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ze=null;function Qe(R){return(R=R.target||R.srcElement||window).correspondingUseElement&&(R=R.correspondingUseElement),3===R.nodeType?R.parentNode:R}var Ht=null,pt=null,vt=null;function $t(R){if(R=xo(R)){if("function"!=typeof Ht)throw Error(w(280));var H=R.stateNode;H&&(H=rg(H),Ht(R.stateNode,R.type,H))}}function dt(R){pt?vt?vt.push(R):vt=[R]:pt=R}function gt(){if(pt){var R=pt,H=vt;if(vt=pt=null,$t(R),H)for(R=0;R>>=0,0===R?32:31-(jt(R)/on|0)|0},jt=Math.log,on=Math.LN2;var Kn=64,jn=4194304;function Hn(R){switch(R&-R){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&R;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&R;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return R}}function st(R,H){var re=R.pendingLanes;if(0===re)return 0;var le=0,De=R.suspendedLanes,Pe=R.pingedLanes,We=268435455&re;if(0!==We){var rt=We&~De;0!==rt?le=Hn(rt):0!==(Pe&=We)&&(le=Hn(Pe))}else 0!==(We=re&~De)?le=Hn(We):0!==Pe&&(le=Hn(Pe));if(0===le)return 0;if(0!==H&&H!==le&&!(H&De)&&((De=le&-le)>=(Pe=H&-H)||16===De&&0!=(4194240&Pe)))return H;if(4&le&&(le|=16&re),0!==(H=R.entangledLanes))for(R=R.entanglements,H&=le;0re;re++)H.push(R);return H}function nr(R,H,re){R.pendingLanes|=H,536870912!==H&&(R.suspendedLanes=0,R.pingedLanes=0),(R=R.eventTimes)[H=31-Ft(H)]=re}function dr(R,H){var re=R.entangledLanes|=H;for(R=R.entanglements;re;){var le=31-Ft(re),De=1<=Ac),Mr=String.fromCharCode(32),Eh=!1;function lv(R,H){switch(R){case"keyup":return-1!==av.indexOf(H.keyCode);case"keydown":return 229!==H.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ls(R){return"object"==typeof(R=R.detail)&&"data"in R?R.data:null}var Ec=!1;var BS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _w(R){var H=R&&R.nodeName&&R.nodeName.toLowerCase();return"input"===H?!!BS[R.type]:"textarea"===H}function Mw(R,H,re,le){dt(le),0<(H=Cc(H,"onChange")).length&&(re=new yn("onChange","change",null,re,le),R.push({event:re,listeners:H}))}var Ls=null,Sc=null;function Sh(R){Cn(R,0)}function _h(R){if(ce(Rl(R)))return R}function Dw(R,H){if("change"===R)return H}var fv=!1;if(b){var Mh;if(b){var _c="oninput"in document;if(!_c){var Mc=document.createElement("div");Mc.setAttribute("oninput","return;"),_c="function"==typeof Mc.oninput}Mh=_c}else Mh=!1;fv=Mh&&(!document.documentMode||9=H)return{node:re,offset:H-R};R=le}e:{for(;re;){if(re.nextSibling){re=re.nextSibling;break e}re=re.parentNode}re=void 0}re=pv(re)}}function Dc(R,H){return!(!R||!H)&&(R===H||(!R||3!==R.nodeType)&&(H&&3===H.nodeType?Dc(R,H.parentNode):"contains"in R?R.contains(H):!!R.compareDocumentPosition&&!!(16&R.compareDocumentPosition(H))))}function Ma(){for(var R=window,H=be();H instanceof R.HTMLIFrameElement;){try{var re="string"==typeof H.contentWindow.location.href}catch{re=!1}if(!re)break;H=be((R=H.contentWindow).document)}return H}function ta(R){var H=R&&R.nodeName&&R.nodeName.toLowerCase();return H&&("input"===H&&("text"===R.type||"search"===R.type||"tel"===R.type||"url"===R.type||"password"===R.type)||"textarea"===H||"true"===R.contentEditable)}function jr(R){var H=Ma(),re=R.focusedElem,le=R.selectionRange;if(H!==re&&re&&re.ownerDocument&&Dc(re.ownerDocument.documentElement,re)){if(null!==le&&ta(re))if(H=le.start,void 0===(R=le.end)&&(R=H),"selectionStart"in re)re.selectionStart=H,re.selectionEnd=Math.min(R,re.value.length);else if((R=(H=re.ownerDocument||document)&&H.defaultView||window).getSelection){R=R.getSelection();var De=re.textContent.length,Pe=Math.min(le.start,De);le=void 0===le.end?Pe:Math.min(le.end,De),!R.extend&&Pe>le&&(De=le,le=Pe,Pe=De),De=_a(re,Pe);var We=_a(re,le);De&&We&&(1!==R.rangeCount||R.anchorNode!==De.node||R.anchorOffset!==De.offset||R.focusNode!==We.node||R.focusOffset!==We.offset)&&((H=H.createRange()).setStart(De.node,De.offset),R.removeAllRanges(),Pe>le?(R.addRange(H),R.extend(We.node,We.offset)):(H.setEnd(We.node,We.offset),R.addRange(H)))}for(H=[],R=re;R=R.parentNode;)1===R.nodeType&&H.push({element:R,left:R.scrollLeft,top:R.scrollTop});for("function"==typeof re.focus&&re.focus(),re=0;re=document.documentMode,zu=null,Kf=null,Ol=null,na=!1;function Pl(R,H,re){var le=re.window===re?re.document:9===re.nodeType?re:re.ownerDocument;na||null==zu||zu!==be(le)||("selectionStart"in(le=zu)&&ta(le)?le={start:le.selectionStart,end:le.selectionEnd}:le={anchorNode:(le=(le.ownerDocument&&le.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:le.anchorOffset,focusNode:le.focusNode,focusOffset:le.focusOffset},Ol&&Uf(Ol,le)||(Ol=le,0<(le=Cc(Kf,"onSelect")).length&&(H=new yn("onSelect","select",null,H,re),R.push({event:H,listeners:le}),H.target=zu)))}function Ch(R,H){var re={};return re[R.toLowerCase()]=H.toLowerCase(),re["Webkit"+R]="webkit"+H,re["Moz"+R]="moz"+H,re}var Ho={animationend:Ch("Animation","AnimationEnd"),animationiteration:Ch("Animation","AnimationIteration"),animationstart:Ch("Animation","AnimationStart"),transitionend:Ch("Transition","TransitionEnd")},Xp={},gv={};function xh(R){if(Xp[R])return Xp[R];if(!Ho[R])return R;var re,H=Ho[R];for(re in H)if(H.hasOwnProperty(re)&&re in gv)return Xp[R]=H[re];return R}b&&(gv=document.createElement("div").style,"AnimationEvent"in window||(delete Ho.animationend.animation,delete Ho.animationiteration.animation,delete Ho.animationstart.animation),"TransitionEvent"in window||delete Ho.transitionend.transition);var Fs=xh("animationend"),yv=xh("animationiteration"),qp=xh("animationstart"),ir=xh("transitionend"),Co=new Map,Ur="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function yi(R,H){Co.set(R,H),m(H,[R])}for(var yo=0;yokl||(R.current=ig[kl],ig[kl]=null,kl--)}function si(R,H){kl++,ig[kl]=R.current,R.current=H}var Pc={},To=Oc(Pc),hs=Oc(!1),Ll=Pc;function Wf(R,H){var re=R.type.contextTypes;if(!re)return Pc;var le=R.stateNode;if(le&&le.__reactInternalMemoizedUnmaskedChildContext===H)return le.__reactInternalMemoizedMaskedChildContext;var Pe,De={};for(Pe in re)De[Pe]=H[Pe];return le&&((R=R.stateNode).__reactInternalMemoizedUnmaskedChildContext=H,R.__reactInternalMemoizedMaskedChildContext=De),De}function ps(R){return null!=(R=R.childContextTypes)}function og(){di(hs),di(To)}function Iw(R,H,re){if(To.current!==Pc)throw Error(w(168));si(To,H),si(hs,re)}function Cw(R,H,re){var le=R.stateNode;if(H=H.childContextTypes,"function"!=typeof le.getChildContext)return re;for(var De in le=le.getChildContext())if(!(De in H))throw Error(w(108,ve(R)||"Unknown",De));return k({},re,le)}function Gf(R){return R=(R=R.stateNode)&&R.__reactInternalMemoizedMergedChildContext||Pc,Ll=To.current,si(To,R),si(hs,hs.current),!0}function sg(R,H,re){var le=R.stateNode;if(!le)throw Error(w(169));re?(R=Cw(R,H,Ll),le.__reactInternalMemoizedMergedChildContext=R,di(hs),di(To),si(To,R)):di(hs),si(hs,re)}var Wu=null,ag=!1,bv=!1;function Gu(R){null===Wu?Wu=[R]:Wu.push(R)}function uo(){if(!bv&&null!==Wu){bv=!0;var R=0,H=Ln;try{var re=Wu;for(Ln=1;R>=We,De-=We,ou=1<<32-Ft(H)+De|re<Yn?(Ji=zn,zn=null):Ji=zn.sibling;var Or=ln(Ct,zn,Pt[Yn],vn);if(null===Or){null===zn&&(zn=Ji);break}R&&zn&&null===Or.alternate&&H(Ct,zn),St=Pe(Or,St,Yn),null===Gn?Bn=Or:Gn.sibling=Or,Gn=Or,zn=Ji}if(Yn===Pt.length)return re(Ct,zn),hi&&Zu(Ct,Yn),Bn;if(null===zn){for(;YnYn?(Ji=zn,zn=null):Ji=zn.sibling;var gu=ln(Ct,zn,Or.value,vn);if(null===gu){null===zn&&(zn=Ji);break}R&&zn&&null===gu.alternate&&H(Ct,zn),St=Pe(gu,St,Yn),null===Gn?Bn=gu:Gn.sibling=gu,Gn=gu,zn=Ji}if(Or.done)return re(Ct,zn),hi&&Zu(Ct,Yn),Bn;if(null===zn){for(;!Or.done;Yn++,Or=Pt.next())null!==(Or=pn(Ct,Or.value,vn))&&(St=Pe(Or,St,Yn),null===Gn?Bn=Or:Gn.sibling=Or,Gn=Or);return hi&&Zu(Ct,Yn),Bn}for(zn=le(Ct,zn);!Or.done;Yn++,Or=Pt.next())null!==(Or=Mn(zn,Ct,Yn,Or.value,vn))&&(R&&null!==Or.alternate&&zn.delete(null===Or.key?Yn:Or.key),St=Pe(Or,St,Yn),null===Gn?Bn=Or:Gn.sibling=Or,Gn=Or);return R&&zn.forEach(function($c){return H(Ct,$c)}),hi&&Zu(Ct,Yn),Bn}(Ct,St,Pt,vn);Xf(Ct,Pt)}return"string"==typeof Pt&&""!==Pt||"number"==typeof Pt?(Pt=""+Pt,null!==St&&6===St.tag?(re(Ct,St.sibling),(St=De(St,Pt)).return=Ct,Ct=St):(re(Ct,St),(St=qg(Pt,Ct.mode,vn)).return=Ct,Ct=St),We(Ct)):re(Ct,St)}}var Bc=_v(!0),Uh=_v(!1),Ul={},ua=Oc(Ul),Kl=Oc(Ul),zl=Oc(Ul);function au(R){if(R===Ul)throw Error(w(174));return R}function mg(R,H){switch(si(zl,H),si(Kl,R),si(ua,Ul),R=H.nodeType){case 9:case 11:H=(H=H.documentElement)?H.namespaceURI:Ae(null,"");break;default:H=Ae(H=(R=8===R?H.parentNode:H).namespaceURI||null,R=R.tagName)}di(ua),si(ua,H)}function Vl(){di(ua),di(Kl),di(zl)}function bo(R){au(zl.current);var H=au(ua.current),re=Ae(H,R.type);H!==re&&(si(Kl,R),si(ua,re))}function uu(R){Kl.current===R&&(di(ua),di(Kl))}var sr=Oc(0);function Kh(R){for(var H=R;null!==H;){if(13===H.tag){var re=H.memoizedState;if(null!==re&&(null===(re=re.dehydrated)||"$?"===re.data||"$!"===re.data))return H}else if(19===H.tag&&void 0!==H.memoizedProps.revealOrder){if(128&H.flags)return H}else if(null!==H.child){H.child.return=H,H=H.child;continue}if(H===R)break;for(;null===H.sibling;){if(null===H.return||H.return===R)return null;H=H.return}H.sibling.return=H.return,H=H.sibling}return null}var vg=[];function bg(){for(var R=0;Rre?re:4,R(!0);var le=wg.transition;wg.transition={};try{R(!1),H()}finally{Ln=re,wg.transition=le}}function xg(){return zs().memoizedState}function Ov(R,H,re){var le=Ra(R);if(re={lane:le,action:re,hasEagerState:!1,eagerState:null,next:null},Tg(R))Nv(H,re);else if(null!==(re=pg(R,H,re,le))){fa(re,R,le,Ao()),id(re,H,le)}}function Pv(R,H,re){var le=Ra(R),De={lane:le,action:re,hasEagerState:!1,eagerState:null,next:null};if(Tg(R))Nv(H,De);else{var Pe=R.alternate;if(0===R.lanes&&(null===Pe||0===Pe.lanes)&&null!==(Pe=H.lastRenderedReducer))try{var We=H.lastRenderedState,rt=Pe(We,re);if(De.hasEagerState=!0,De.eagerState=rt,ea(rt,We)){var bt=H.interleaved;return null===bt?(De.next=De,Hi(H)):(De.next=bt.next,bt.next=De),void(H.interleaved=De)}}catch{}null!==(re=pg(R,H,De,le))&&(fa(re,R,le,De=Ao()),id(re,H,le))}}function Tg(R){var H=R.alternate;return R===ti||null!==H&&H===ti}function Nv(R,H){Wl=Hl=!0;var re=R.pending;null===re?H.next=H:(H.next=re.next,re.next=H),R.pending=H}function id(R,H,re){if(4194240&re){var le=H.lanes;re|=le&=R.pendingLanes,H.lanes=re,dr(R,re)}}var xa={readContext:Li,useCallback:Fi,useContext:Fi,useEffect:Fi,useImperativeHandle:Fi,useInsertionEffect:Fi,useLayoutEffect:Fi,useMemo:Fi,useReducer:Fi,useRef:Fi,useState:Fi,useDebugValue:Fi,useDeferredValue:Fi,useTransition:Fi,useMutableSource:Fi,useSyncExternalStore:Fi,useId:Fi,unstable_isNewReconciler:!1},Ow={readContext:Li,useCallback:function(R,H){return cu().memoizedState=[R,void 0===H?null:H],R},useContext:Li,useEffect:Ig,useImperativeHandle:function(R,H,re){return re=null!=re?re.concat([R]):null,Uc(4194308,4,Tv.bind(null,H,R),re)},useLayoutEffect:function(R,H){return Uc(4194308,4,R,H)},useInsertionEffect:function(R,H){return Uc(4,2,R,H)},useMemo:function(R,H){var re=cu();return H=void 0===H?null:H,R=R(),re.memoizedState=[R,H],R},useReducer:function(R,H,re){var le=cu();return H=void 0!==re?re(H):H,le.memoizedState=le.baseState=H,R={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:R,lastRenderedState:H},le.queue=R,R=R.dispatch=Ov.bind(null,ti,R),[le.memoizedState,R]},useRef:function(R){return R={current:R},cu().memoizedState=R},useState:Cv,useDebugValue:rd,useDeferredValue:function(R){return cu().memoizedState=R},useTransition:function(){var R=Cv(!1),H=R[0];return R=Tw.bind(null,R[1]),cu().memoizedState=R,[H,R]},useMutableSource:function(){},useSyncExternalStore:function(R,H,re){var le=ti,De=cu();if(hi){if(void 0===re)throw Error(w(407));re=re()}else{if(re=H(),null===Gi)throw Error(w(349));30&jc||Sg(le,H,re)}De.memoizedState=re;var Pe={value:re,getSnapshot:H};return De.queue=Pe,Ig(_g.bind(null,le,Pe,R),[R]),le.flags|=2048,Ju(9,Zl.bind(null,le,Pe,re,H),void 0,null),re},useId:function(){var R=cu(),H=Gi.identifierPrefix;if(hi){var re=ki;H=":"+H+"R"+(re=(ou&~(1<<32-Ft(ou)-1)).toString(32)+re),0<(re=qf++)&&(H+="H"+re.toString(32)),H+=":"}else H=":"+H+"r"+(re=Gl++).toString(32)+":";return R.memoizedState=H},unstable_isNewReconciler:!1},Rv={readContext:Li,useCallback:Cg,useContext:Li,useEffect:Wh,useImperativeHandle:nd,useInsertionEffect:xv,useLayoutEffect:ca,useMemo:Gh,useReducer:Dv,useRef:Hh,useState:function(){return Dv(ed)},useDebugValue:rd,useDeferredValue:function(R){return Zh(zs(),Ai.memoizedState,R)},useTransition:function(){return[Dv(ed)[0],zs().memoizedState]},useMutableSource:Vh,useSyncExternalStore:Eg,useId:xg,unstable_isNewReconciler:!1},kv={readContext:Li,useCallback:Cg,useContext:Li,useEffect:Wh,useImperativeHandle:nd,useInsertionEffect:xv,useLayoutEffect:ca,useMemo:Gh,useReducer:Iv,useRef:Hh,useState:function(){return Iv(ed)},useDebugValue:rd,useDeferredValue:function(R){var H=zs();return null===Ai?H.memoizedState=R:Zh(H,Ai.memoizedState,R)},useTransition:function(){return[Iv(ed)[0],zs().memoizedState]},useMutableSource:Vh,useSyncExternalStore:Eg,useId:xg,unstable_isNewReconciler:!1};function la(R,H){try{var re="",le=H;do{re+=Ie(le),le=le.return}while(le);var De=re}catch(Pe){De="\nError generating stack: "+Pe.message+"\n"+Pe.stack}return{value:R,source:H,stack:De,digest:null}}function Og(R,H,re){return{value:R,source:null,stack:re??null,digest:H??null}}function Wi(R,H){try{console.error(H.value)}catch(re){setTimeout(function(){throw re})}}var Pg="function"==typeof WeakMap?WeakMap:Map;function Lv(R,H,re){(re=su(-1,re)).tag=3,re.payload={element:null};var le=H.value;return re.callback=function(){r0||(r0=!0,i0=le),Wi(0,H)},re}function Ng(R,H,re){(re=su(-1,re)).tag=3;var le=R.type.getDerivedStateFromError;if("function"==typeof le){var De=H.value;re.payload=function(){return le(De)},re.callback=function(){Wi(0,H)}}var Pe=R.stateNode;return null!==Pe&&"function"==typeof Pe.componentDidCatch&&(re.callback=function(){Wi(0,H),"function"!=typeof le&&(null===Na?Na=new Set([this]):Na.add(this));var We=H.stack;this.componentDidCatch(H.value,{componentStack:null!==We?We:""})}),re}function Yh(R,H,re){var le=R.pingCache;if(null===le){le=R.pingCache=new Pg;var De=new Set;le.set(H,De)}else void 0===(De=le.get(H))&&(De=new Set,le.set(H,De));De.has(re)||(De.add(re),R=dd.bind(null,R,H,re),H.then(R,R))}function Kc(R){do{var H;if((H=13===R.tag)&&(H=null===(H=R.memoizedState)||null!==H.dehydrated),H)return R;R=R.return}while(null!==R);return null}function zc(R,H,re,le,De){return 1&R.mode?(R.flags|=65536,R.lanes=De,R):(R===H?R.flags|=65536:(R.flags|=128,re.flags|=131072,re.flags&=-52805,1===re.tag&&(null===re.alternate?re.tag=17:((H=su(-1,1)).tag=2,kc(re,H,1))),re.lanes|=1),R)}var Yl=W.ReactCurrentOwner,$i=!1;function lo(R,H,re,le){H.child=null===R?Uh(H,null,re,le):Bc(H,R.child,re,le)}function Vc(R,H,re,le,De){re=re.render;var Pe=H.ref;return Ar(H,De),le=Mv(R,H,re,le,Pe,De),re=$f(),null===R||$i?(hi&&re&&Vi(H),H.flags|=1,lo(R,H,le,De),H.child):(H.updateQueue=R.updateQueue,H.flags&=-2053,R.lanes&=~De,Oa(R,H,De))}function lu(R,H,re,le,De){if(null===R){var Pe=re.type;return"function"!=typeof Pe||d0(Pe)||void 0!==Pe.defaultProps||null!==re.compare||void 0!==re.defaultProps?((R=h0(re.type,null,le,H,H.mode,De)).ref=H.ref,R.return=H,H.child=R):(H.tag=15,H.type=Pe,Fv(R,H,Pe,le,De))}if(Pe=R.child,!(R.lanes&De)){var We=Pe.memoizedProps;if((re=null!==(re=re.compare)?re:Uf)(We,le)&&R.ref===H.ref)return Oa(R,H,De)}return H.flags|=1,(R=ka(Pe,le)).ref=H.ref,R.return=H,H.child=R}function Fv(R,H,re,le,De){if(null!==R){var Pe=R.memoizedProps;if(Uf(Pe,le)&&R.ref===H.ref){if($i=!1,H.pendingProps=le=Pe,0==(R.lanes&De))return H.lanes=R.lanes,Oa(R,H,De);131072&R.flags&&($i=!0)}}return Jh(R,H,re,le,De)}function tr(R,H,re){var le=H.pendingProps,De=le.children,Pe=null!==R?R.memoizedState:null;if("hidden"===le.mode)if(1&H.mode){if(!(1073741824&re))return R=null!==Pe?Pe.baseLanes|re:re,H.lanes=H.childLanes=1073741824,H.memoizedState={baseLanes:R,cachePool:null,transitions:null},H.updateQueue=null,si(rf,Vs),Vs|=R,null;H.memoizedState={baseLanes:0,cachePool:null,transitions:null},le=null!==Pe?Pe.baseLanes:re,si(rf,Vs),Vs|=le}else H.memoizedState={baseLanes:0,cachePool:null,transitions:null},si(rf,Vs),Vs|=re;else null!==Pe?(le=Pe.baseLanes|re,H.memoizedState=null):le=re,si(rf,Vs),Vs|=le;return lo(R,H,De,re),H.child}function Pw(R,H){var re=H.ref;(null===R&&null!==re||null!==R&&R.ref!==re)&&(H.flags|=512,H.flags|=2097152)}function Jh(R,H,re,le,De){var Pe=ps(re)?Ll:To.current;return Pe=Wf(H,Pe),Ar(H,De),re=Mv(R,H,re,le,Pe,De),le=$f(),null===R||$i?(hi&&le&&Vi(H),H.flags|=1,lo(R,H,re,De),H.child):(H.updateQueue=R.updateQueue,H.flags&=-2053,R.lanes&=~De,Oa(R,H,De))}function od(R,H,re,le,De){if(ps(re)){var Pe=!0;Gf(H)}else Pe=!1;if(Ar(H,De),null===H.stateNode)Ta(R,H),Ev(H,re,le),Qf(H,re,le,De),le=!0;else if(null===R){var We=H.stateNode,rt=H.memoizedProps;We.props=rt;var bt=We.context,Rt=re.contextType;"object"==typeof Rt&&null!==Rt?Rt=Li(Rt):Rt=Wf(H,Rt=ps(re)?Ll:To.current);var dn=re.getDerivedStateFromProps,pn="function"==typeof dn||"function"==typeof We.getSnapshotBeforeUpdate;pn||"function"!=typeof We.UNSAFE_componentWillReceiveProps&&"function"!=typeof We.componentWillReceiveProps||(rt!==le||bt!==Rt)&&Sv(H,We,le,Rt),co=!1;var ln=H.memoizedState;We.state=ln,Ks(H,le,We,De),bt=H.memoizedState,rt!==le||ln!==bt||hs.current||co?("function"==typeof dn&&(aa(H,re,dn,le),bt=H.memoizedState),(rt=co||yg(H,re,rt,le,ln,bt,Rt))?(pn||"function"!=typeof We.UNSAFE_componentWillMount&&"function"!=typeof We.componentWillMount||("function"==typeof We.componentWillMount&&We.componentWillMount(),"function"==typeof We.UNSAFE_componentWillMount&&We.UNSAFE_componentWillMount()),"function"==typeof We.componentDidMount&&(H.flags|=4194308)):("function"==typeof We.componentDidMount&&(H.flags|=4194308),H.memoizedProps=le,H.memoizedState=bt),We.props=le,We.state=bt,We.context=Rt,le=rt):("function"==typeof We.componentDidMount&&(H.flags|=4194308),le=!1)}else{We=H.stateNode,Fh(R,H),rt=H.memoizedProps,Rt=H.type===H.elementType?rt:Ca(H.type,rt),We.props=Rt,pn=H.pendingProps,ln=We.context,"object"==typeof(bt=re.contextType)&&null!==bt?bt=Li(bt):bt=Wf(H,bt=ps(re)?Ll:To.current);var Mn=re.getDerivedStateFromProps;(dn="function"==typeof Mn||"function"==typeof We.getSnapshotBeforeUpdate)||"function"!=typeof We.UNSAFE_componentWillReceiveProps&&"function"!=typeof We.componentWillReceiveProps||(rt!==pn||ln!==bt)&&Sv(H,We,le,bt),co=!1,ln=H.memoizedState,We.state=ln,Ks(H,le,We,De);var Rn=H.memoizedState;rt!==pn||ln!==Rn||hs.current||co?("function"==typeof Mn&&(aa(H,re,Mn,le),Rn=H.memoizedState),(Rt=co||yg(H,re,Rt,le,ln,Rn,bt)||!1)?(dn||"function"!=typeof We.UNSAFE_componentWillUpdate&&"function"!=typeof We.componentWillUpdate||("function"==typeof We.componentWillUpdate&&We.componentWillUpdate(le,Rn,bt),"function"==typeof We.UNSAFE_componentWillUpdate&&We.UNSAFE_componentWillUpdate(le,Rn,bt)),"function"==typeof We.componentDidUpdate&&(H.flags|=4),"function"==typeof We.getSnapshotBeforeUpdate&&(H.flags|=1024)):("function"!=typeof We.componentDidUpdate||rt===R.memoizedProps&&ln===R.memoizedState||(H.flags|=4),"function"!=typeof We.getSnapshotBeforeUpdate||rt===R.memoizedProps&&ln===R.memoizedState||(H.flags|=1024),H.memoizedProps=le,H.memoizedState=Rn),We.props=le,We.state=Rn,We.context=bt,le=Rt):("function"!=typeof We.componentDidUpdate||rt===R.memoizedProps&&ln===R.memoizedState||(H.flags|=4),"function"!=typeof We.getSnapshotBeforeUpdate||rt===R.memoizedProps&&ln===R.memoizedState||(H.flags|=1024),le=!1)}return Bv(R,H,re,le,Pe,De)}function Bv(R,H,re,le,De,Pe){Pw(R,H);var We=0!=(128&H.flags);if(!le&&!We)return De&&sg(H,re,!1),Oa(R,H,Pe);le=H.stateNode,Yl.current=H;var rt=We&&"function"!=typeof re.getDerivedStateFromError?null:le.render();return H.flags|=1,null!==R&&We?(H.child=Bc(H,R.child,null,Pe),H.child=Bc(H,null,rt,Pe)):lo(R,H,rt,Pe),H.memoizedState=le.state,De&&sg(H,re,!0),H.child}function Nw(R){var H=R.stateNode;H.pendingContext?Iw(0,H.pendingContext,H.pendingContext!==H.context):H.context&&Iw(0,H.context,!1),mg(R,H.containerInfo)}function Rw(R,H,re,le,De){return Yu(),or(De),H.flags|=256,lo(R,H,re,le),H.child}var Ql,Fg,kw,Uv,jv={dehydrated:null,treeContext:null,retryLane:0};function fu(R){return{baseLanes:R,cachePool:null,transitions:null}}function Rg(R,H,re){var rt,le=H.pendingProps,De=sr.current,Pe=!1,We=0!=(128&H.flags);if((rt=We)||(rt=(null===R||null!==R.memoizedState)&&0!=(2&De)),rt?(Pe=!0,H.flags&=-129):(null===R||null!==R.memoizedState)&&(De|=1),si(sr,1&De),null===R)return Bl(H),null!==(R=H.memoizedState)&&null!==(R=R.dehydrated)?(1&H.mode?"$!"===R.data?H.lanes=8:H.lanes=1073741824:H.lanes=1,null):(We=le.children,R=le.fallback,Pe?(le=H.mode,Pe=H.child,We={mode:"hidden",children:We},1&le||null===Pe?Pe=p0(We,le,0,null):(Pe.childLanes=0,Pe.pendingProps=We),R=Yc(R,le,re,null),Pe.return=H,R.return=H,Pe.sibling=R,H.child=Pe,H.child.memoizedState=fu(re),H.memoizedState=jv,R):Qh(H,We));if(null!==(De=R.memoizedState)&&null!==(rt=De.dehydrated))return function kg(R,H,re,le,De,Pe,We){if(re)return 256&H.flags?(H.flags&=-257,le=Og(Error(w(422))),Ei(R,H,We,le)):null!==H.memoizedState?(H.child=R.child,H.flags|=128,null):(Pe=le.fallback,De=H.mode,le=p0({mode:"visible",children:le.children},De,0,null),Pe=Yc(Pe,De,We,null),Pe.flags|=2,le.return=H,Pe.return=H,le.sibling=Pe,H.child=le,1&H.mode&&Bc(H,R.child,null,We),H.child.memoizedState=fu(We),H.memoizedState=jv,Pe);if(!(1&H.mode))return Ei(R,H,We,null);if("$!"===De.data){if(le=De.nextSibling&&De.nextSibling.dataset)var rt=le.dgst;return le=rt,Ei(R,H,We,le=Og(Pe=Error(w(419)),le,void 0))}if(rt=0!=(We&R.childLanes),$i||rt){if(null!==(le=Gi)){switch(We&-We){case 4:De=2;break;case 16:De=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:De=32;break;case 536870912:De=268435456;break;default:De=0}0!==(De=De&(le.suspendedLanes|We)?0:De)&&De!==Pe.retryLane&&(Pe.retryLane=De,ys(R,De),fa(le,R,De,-1))}return Yg(),Ei(R,H,We,le=Og(Error(w(421))))}return"$?"===De.data?(H.flags|=128,H.child=R.child,H=Vw.bind(null,R),De._reactRetry=H,null):(R=Pe.treeContext,ai=ia(De.nextSibling),mo=H,hi=!0,Us=null,null!==R&&(gs[js++]=ou,gs[js++]=ki,gs[js++]=iu,ou=R.id,ki=R.overflow,iu=H),H=Qh(H,le.children),H.flags|=4096,H)}(R,H,We,le,rt,De,re);if(Pe){Pe=le.fallback,We=H.mode,rt=(De=R.child).sibling;var bt={mode:"hidden",children:le.children};return 1&We||H.child===De?(le=ka(De,bt)).subtreeFlags=14680064&De.subtreeFlags:((le=H.child).childLanes=0,le.pendingProps=bt,H.deletions=null),null!==rt?Pe=ka(rt,Pe):(Pe=Yc(Pe,We,re,null)).flags|=2,Pe.return=H,le.return=H,le.sibling=Pe,H.child=le,le=Pe,Pe=H.child,We=null===(We=R.child.memoizedState)?fu(re):{baseLanes:We.baseLanes|re,cachePool:null,transitions:We.transitions},Pe.memoizedState=We,Pe.childLanes=R.childLanes&~re,H.memoizedState=jv,le}return R=(Pe=R.child).sibling,le=ka(Pe,{mode:"visible",children:le.children}),!(1&H.mode)&&(le.lanes=re),le.return=H,le.sibling=null,null!==R&&(null===(re=H.deletions)?(H.deletions=[R],H.flags|=16):re.push(R)),H.child=le,H.memoizedState=null,le}function Qh(R,H){return(H=p0({mode:"visible",children:H},R.mode,0,null)).return=R,R.child=H}function Ei(R,H,re,le){return null!==le&&or(le),Bc(H,R.child,null,re),(R=Qh(H,H.pendingProps.children)).flags|=2,H.memoizedState=null,R}function Jl(R,H,re){R.lanes|=H;var le=R.alternate;null!==le&&(le.lanes|=H),sn(R.return,H,re)}function Lg(R,H,re,le,De){var Pe=R.memoizedState;null===Pe?R.memoizedState={isBackwards:H,rendering:null,renderingStartTime:0,last:le,tail:re,tailMode:De}:(Pe.isBackwards=H,Pe.rendering=null,Pe.renderingStartTime=0,Pe.last=le,Pe.tail=re,Pe.tailMode=De)}function ms(R,H,re){var le=H.pendingProps,De=le.revealOrder,Pe=le.tail;if(lo(R,H,le.children,re),2&(le=sr.current))le=1&le|2,H.flags|=128;else{if(null!==R&&128&R.flags)e:for(R=H.child;null!==R;){if(13===R.tag)null!==R.memoizedState&&Jl(R,re,H);else if(19===R.tag)Jl(R,re,H);else if(null!==R.child){R.child.return=R,R=R.child;continue}if(R===H)break e;for(;null===R.sibling;){if(null===R.return||R.return===H)break e;R=R.return}R.sibling.return=R.return,R=R.sibling}le&=1}if(si(sr,le),1&H.mode)switch(De){case"forwards":for(re=H.child,De=null;null!==re;)null!==(R=re.alternate)&&null===Kh(R)&&(De=re),re=re.sibling;null===(re=De)?(De=H.child,H.child=null):(De=re.sibling,re.sibling=null),Lg(H,!1,De,re,Pe);break;case"backwards":for(re=null,De=H.child,H.child=null;null!==De;){if(null!==(R=De.alternate)&&null===Kh(R)){H.child=De;break}R=De.sibling,De.sibling=re,re=De,De=R}Lg(H,!0,re,null,Pe);break;case"together":Lg(H,!1,null,null,void 0);break;default:H.memoizedState=null}else H.memoizedState=null;return H.child}function Ta(R,H){!(1&H.mode)&&null!==R&&(R.alternate=null,H.alternate=null,H.flags|=2)}function Oa(R,H,re){if(null!==R&&(H.dependencies=R.dependencies),of|=H.lanes,!(re&H.childLanes))return null;if(null!==R&&H.child!==R.child)throw Error(w(153));if(null!==H.child){for(re=ka(R=H.child,R.pendingProps),H.child=re,re.return=H;null!==R.sibling;)R=R.sibling,(re=re.sibling=ka(R,R.pendingProps)).return=H;re.sibling=null}return H.child}function qh(R,H){if(!hi)switch(R.tailMode){case"hidden":H=R.tail;for(var re=null;null!==H;)null!==H.alternate&&(re=H),H=H.sibling;null===re?R.tail=null:re.sibling=null;break;case"collapsed":re=R.tail;for(var le=null;null!==re;)null!==re.alternate&&(le=re),re=re.sibling;null===le?H||null===R.tail?R.tail=null:R.tail.sibling=null:le.sibling=null}}function Yr(R){var H=null!==R.alternate&&R.alternate.child===R.child,re=0,le=0;if(H)for(var De=R.child;null!==De;)re|=De.lanes|De.childLanes,le|=14680064&De.subtreeFlags,le|=14680064&De.flags,De.return=R,De=De.sibling;else for(De=R.child;null!==De;)re|=De.lanes|De.childLanes,le|=De.subtreeFlags,le|=De.flags,De.return=R,De=De.sibling;return R.subtreeFlags|=le,R.childLanes=re,H}function Bg(R,H,re){var le=H.pendingProps;switch(cg(H),H.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yr(H),null;case 1:case 17:return ps(H.type)&&og(),Yr(H),null;case 3:return le=H.stateNode,Vl(),di(hs),di(To),bg(),le.pendingContext&&(le.context=le.pendingContext,le.pendingContext=null),(null===R||null===R.child)&&(sa(H)?H.flags|=4:null===R||R.memoizedState.isDehydrated&&!(256&H.flags)||(H.flags|=1024,null!==Us&&(Wg(Us),Us=null))),Fg(R,H),Yr(H),null;case 5:uu(H);var De=au(zl.current);if(re=H.type,null!==R&&null!=H.stateNode)kw(R,H,re,le,De),R.ref!==H.ref&&(H.flags|=512,H.flags|=2097152);else{if(!le){if(null===H.stateNode)throw Error(w(166));return Yr(H),null}if(R=au(ua.current),sa(H)){le=H.stateNode,re=H.type;var Pe=H.memoizedProps;switch(le[fi]=H,le[Ph]=Pe,R=0!=(1&H.mode),re){case"dialog":kn("cancel",le),kn("close",le);break;case"iframe":case"object":case"embed":kn("load",le);break;case"video":case"audio":for(De=0;De<\/script>",R=R.removeChild(R.firstChild)):"string"==typeof le.is?R=We.createElement(re,{is:le.is}):(R=We.createElement(re),"select"===re&&(We=R,le.multiple?We.multiple=!0:le.size&&(We.size=le.size))):R=We.createElementNS(R,re),R[fi]=H,R[Ph]=le,Ql(R,H,!1,!1),H.stateNode=R;e:{switch(We=wn(re,le),re){case"dialog":kn("cancel",R),kn("close",R),De=le;break;case"iframe":case"object":case"embed":kn("load",R),De=le;break;case"video":case"audio":for(De=0;Deud&&(H.flags|=128,le=!0,qh(Pe,!1),H.lanes=4194304)}else{if(!le)if(null!==(R=Kh(We))){if(H.flags|=128,le=!0,null!==(re=R.updateQueue)&&(H.updateQueue=re,H.flags|=4),qh(Pe,!0),null===Pe.tail&&"hidden"===Pe.tailMode&&!We.alternate&&!hi)return Yr(H),null}else 2*tn()-Pe.renderingStartTime>ud&&1073741824!==re&&(H.flags|=128,le=!0,qh(Pe,!1),H.lanes=4194304);Pe.isBackwards?(We.sibling=H.child,H.child=We):(null!==(re=Pe.last)?re.sibling=We:H.child=We,Pe.last=We)}return null!==Pe.tail?(H=Pe.tail,Pe.rendering=H,Pe.tail=H.sibling,Pe.renderingStartTime=tn(),H.sibling=null,re=sr.current,si(sr,le?1&re|2:1&re),H):(Yr(H),null);case 22:case 23:return to(),le=null!==H.memoizedState,null!==R&&null!==R.memoizedState!==le&&(H.flags|=8192),le&&1&H.mode?1073741824&Vs&&(Yr(H),6&H.subtreeFlags&&(H.flags|=8192)):Yr(H),null;case 24:case 25:return null}throw Error(w(156,H.tag))}function Xl(R,H){switch(cg(H),H.tag){case 1:return ps(H.type)&&og(),65536&(R=H.flags)?(H.flags=-65537&R|128,H):null;case 3:return Vl(),di(hs),di(To),bg(),65536&(R=H.flags)&&!(128&R)?(H.flags=-65537&R|128,H):null;case 5:return uu(H),null;case 13:if(di(sr),null!==(R=H.memoizedState)&&null!==R.dehydrated){if(null===H.alternate)throw Error(w(340));Yu()}return 65536&(R=H.flags)?(H.flags=-65537&R|128,H):null;case 19:return di(sr),null;case 4:return Vl(),null;case 10:return hg(H.type._context),null;case 22:case 23:return to(),null;default:return null}}Ql=function(R,H){for(var re=H.child;null!==re;){if(5===re.tag||6===re.tag)R.appendChild(re.stateNode);else if(4!==re.tag&&null!==re.child){re.child.return=re,re=re.child;continue}if(re===H)break;for(;null===re.sibling;){if(null===re.return||re.return===H)return;re=re.return}re.sibling.return=re.return,re=re.sibling}},Fg=function(){},kw=function(R,H,re,le){var De=R.memoizedProps;if(De!==le){R=H.stateNode,au(ua.current);var We,Pe=null;switch(re){case"input":De=Ne(R,De),le=Ne(R,le),Pe=[];break;case"select":De=k({},De,{value:void 0}),le=k({},le,{value:void 0}),Pe=[];break;case"textarea":De=Vt(R,De),le=Vt(R,le),Pe=[];break;default:"function"!=typeof De.onClick&&"function"==typeof le.onClick&&(R.onclick=zi)}for(Rt in At(re,le),re=null,De)if(!le.hasOwnProperty(Rt)&&De.hasOwnProperty(Rt)&&null!=De[Rt])if("style"===Rt){var rt=De[Rt];for(We in rt)rt.hasOwnProperty(We)&&(re||(re={}),re[We]="")}else"dangerouslySetInnerHTML"!==Rt&&"children"!==Rt&&"suppressContentEditableWarning"!==Rt&&"suppressHydrationWarning"!==Rt&&"autoFocus"!==Rt&&(l.hasOwnProperty(Rt)?Pe||(Pe=[]):(Pe=Pe||[]).push(Rt,null));for(Rt in le){var bt=le[Rt];if(rt=De?.[Rt],le.hasOwnProperty(Rt)&&bt!==rt&&(null!=bt||null!=rt))if("style"===Rt)if(rt){for(We in rt)!rt.hasOwnProperty(We)||bt&&bt.hasOwnProperty(We)||(re||(re={}),re[We]="");for(We in bt)bt.hasOwnProperty(We)&&rt[We]!==bt[We]&&(re||(re={}),re[We]=bt[We])}else re||(Pe||(Pe=[]),Pe.push(Rt,re)),re=bt;else"dangerouslySetInnerHTML"===Rt?(bt=bt?bt.__html:void 0,rt=rt?rt.__html:void 0,null!=bt&&rt!==bt&&(Pe=Pe||[]).push(Rt,bt)):"children"===Rt?"string"!=typeof bt&&"number"!=typeof bt||(Pe=Pe||[]).push(Rt,""+bt):"suppressContentEditableWarning"!==Rt&&"suppressHydrationWarning"!==Rt&&(l.hasOwnProperty(Rt)?(null!=bt&&"onScroll"===Rt&&kn("scroll",R),Pe||rt===bt||(Pe=[])):(Pe=Pe||[]).push(Rt,bt))}re&&(Pe=Pe||[]).push("style",re);var Rt=Pe;(H.updateQueue=Rt)&&(H.flags|=4)}},Uv=function(R,H,re,le){re!==le&&(H.flags|=4)};var jg=!1,fo=!1,Lw="function"==typeof WeakSet?WeakSet:Set,Nn=null;function ql(R,H){var re=R.ref;if(null!==re)if("function"==typeof re)try{re(null)}catch(le){Si(R,H,le)}else re.current=null}function Ug(R,H,re){try{re()}catch(le){Si(R,H,le)}}var Kv=!1;function Hc(R,H,re){var le=H.updateQueue;if(null!==(le=null!==le?le.lastEffect:null)){var De=le=le.next;do{if((De.tag&R)===R){var Pe=De.destroy;De.destroy=void 0,void 0!==Pe&&Ug(H,re,Pe)}De=De.next}while(De!==le)}}function Wc(R,H){if(null!==(H=null!==(H=H.updateQueue)?H.lastEffect:null)){var re=H=H.next;do{if((re.tag&R)===R){var le=re.create;re.destroy=le()}re=re.next}while(re!==H)}}function sd(R){var H=R.ref;if(null!==H){var re=R.stateNode;R.tag,R=re,"function"==typeof H?H(R):H.current=R}}function $l(R){var H=R.alternate;null!==H&&(R.alternate=null,$l(H)),R.child=null,R.deletions=null,R.sibling=null,5===R.tag&&(null!==(H=R.stateNode)&&(delete H[fi],delete H[Ph],delete H[ds],delete H[ng],delete H[Hf])),R.stateNode=null,R.return=null,R.dependencies=null,R.memoizedProps=null,R.memoizedState=null,R.pendingProps=null,R.stateNode=null,R.updateQueue=null}function $h(R){return 5===R.tag||3===R.tag||4===R.tag}function ef(R){e:for(;;){for(;null===R.sibling;){if(null===R.return||$h(R.return))return null;R=R.return}for(R.sibling.return=R.return,R=R.sibling;5!==R.tag&&6!==R.tag&&18!==R.tag;){if(2&R.flags||null===R.child||4===R.tag)continue e;R.child.return=R,R=R.child}if(!(2&R.flags))return R.stateNode}}function Kg(R,H,re){var le=R.tag;if(5===le||6===le)R=R.stateNode,H?8===re.nodeType?re.parentNode.insertBefore(R,H):re.insertBefore(R,H):(8===re.nodeType?(H=re.parentNode).insertBefore(R,re):(H=re).appendChild(R),null!=(re=re._reactRootContainer)||null!==H.onclick||(H.onclick=zi));else if(4!==le&&null!==(R=R.child))for(Kg(R,H,re),R=R.sibling;null!==R;)Kg(R,H,re),R=R.sibling}function e0(R,H,re){var le=R.tag;if(5===le||6===le)R=R.stateNode,H?re.insertBefore(R,H):re.appendChild(R);else if(4!==le&&null!==(R=R.child))for(e0(R,H,re),R=R.sibling;null!==R;)e0(R,H,re),R=R.sibling}var Ti=null,Go=!1;function du(R,H,re){for(re=re.child;null!==re;)zv(R,H,re),re=re.sibling}function zv(R,H,re){if(Mt&&"function"==typeof Mt.onCommitFiberUnmount)try{Mt.onCommitFiberUnmount(Dt,re)}catch{}switch(re.tag){case 5:fo||ql(re,H);case 6:var le=Ti,De=Go;Ti=null,du(R,H,re),Go=De,null!==(Ti=le)&&(Go?(R=Ti,re=re.stateNode,8===R.nodeType?R.parentNode.removeChild(re):R.removeChild(re)):Ti.removeChild(re.stateNode));break;case 18:null!==Ti&&(Go?(R=Ti,re=re.stateNode,8===R.nodeType?Oh(R.parentNode,re):1===R.nodeType&&Oh(R,re),_t(R)):Oh(Ti,re.stateNode));break;case 4:le=Ti,De=Go,Ti=re.stateNode.containerInfo,Go=!0,du(R,H,re),Ti=le,Go=De;break;case 0:case 11:case 14:case 15:if(!fo&&(null!==(le=re.updateQueue)&&null!==(le=le.lastEffect))){De=le=le.next;do{var Pe=De,We=Pe.destroy;Pe=Pe.tag,void 0!==We&&(2&Pe||4&Pe)&&Ug(re,H,We),De=De.next}while(De!==le)}du(R,H,re);break;case 1:if(!fo&&(ql(re,H),"function"==typeof(le=re.stateNode).componentWillUnmount))try{le.props=re.memoizedProps,le.state=re.memoizedState,le.componentWillUnmount()}catch(rt){Si(re,H,rt)}du(R,H,re);break;case 21:du(R,H,re);break;case 22:1&re.mode?(fo=(le=fo)||null!==re.memoizedState,du(R,H,re),fo=le):du(R,H,re);break;default:du(R,H,re)}}function Vv(R){var H=R.updateQueue;if(null!==H){R.updateQueue=null;var re=R.stateNode;null===re&&(re=R.stateNode=new Lw),H.forEach(function(le){var De=Qg.bind(null,R,le);re.has(le)||(re.add(le),le.then(De,De))})}}function wo(R,H){var re=H.deletions;if(null!==re)for(var le=0;leDe&&(De=We),le&=~Pe}if(le=De,10<(le=(120>(le=tn()-le)?120:480>le?480:1080>le?1080:1920>le?1920:3e3>le?3e3:4320>le?4320:1960*jw(le/1960))-le)){R.timeoutHandle=Tc(Zc.bind(null,R,bs,Qu),le);break}Zc(R,bs,Qu);break;default:throw Error(w(329))}}}return Zo(R,tn()),R.callbackNode===re?Zv.bind(null,R):null}function a0(R,H){var re=n0;return R.current.memoizedState.isDehydrated&&(da(R,H).flags|=256),2!==(R=fd(R,H))&&(H=bs,bs=re,null!==H&&Wg(H)),R}function Wg(R){null===bs?bs=R:bs.push.apply(bs,R)}function Oi(R,H){for(H&=~ad,H&=~Vg,R.suspendedLanes|=H,R.pingedLanes&=~H,R=R.expirationTimes;0R?16:R,null===hu)var le=!1;else{if(R=hu,hu=null,ld=0,6&Tr)throw Error(w(331));var De=Tr;for(Tr|=4,Nn=R.current;null!==Nn;){var Pe=Nn,We=Pe.child;if(16&Nn.flags){var rt=Pe.deletions;if(null!==rt){for(var bt=0;bttn()-Gv?da(R,0):ad|=re),Zo(R,H)}function Qv(R,H){0===H&&(1&R.mode?(H=jn,!(130023424&(jn<<=1))&&(jn=4194304)):H=1);var re=Ao();null!==(R=ys(R,H))&&(nr(R,H,re),Zo(R,re))}function Vw(R){var H=R.memoizedState,re=0;null!==H&&(re=H.retryLane),Qv(R,re)}function Qg(R,H){var re=0;switch(R.tag){case 13:var le=R.stateNode,De=R.memoizedState;null!==De&&(re=De.retryLane);break;case 19:le=R.stateNode;break;default:throw Error(w(314))}null!==le&&le.delete(H),Qv(R,re)}function Xg(R,H){return nn(R,H)}function sf(R,H,re,le){this.tag=R,this.key=re,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=H,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=le,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yo(R,H,re,le){return new sf(R,H,re,le)}function d0(R){return!(!(R=R.prototype)||!R.isReactComponent)}function ka(R,H){var re=R.alternate;return null===re?((re=Yo(R.tag,H,R.key,R.mode)).elementType=R.elementType,re.type=R.type,re.stateNode=R.stateNode,re.alternate=R,R.alternate=re):(re.pendingProps=H,re.type=R.type,re.flags=0,re.subtreeFlags=0,re.deletions=null),re.flags=14680064&R.flags,re.childLanes=R.childLanes,re.lanes=R.lanes,re.child=R.child,re.memoizedProps=R.memoizedProps,re.memoizedState=R.memoizedState,re.updateQueue=R.updateQueue,H=R.dependencies,re.dependencies=null===H?null:{lanes:H.lanes,firstContext:H.firstContext},re.sibling=R.sibling,re.index=R.index,re.ref=R.ref,re}function h0(R,H,re,le,De,Pe){var We=2;if(le=R,"function"==typeof R)d0(R)&&(We=1);else if("string"==typeof R)We=5;else e:switch(R){case J:return Yc(re.children,De,Pe,H);case Z:We=8,De|=8;break;case ee:return(R=Yo(12,re,H,2|De)).elementType=ee,R.lanes=Pe,R;case d:return(R=Yo(13,re,H,De)).elementType=d,R.lanes=Pe,R;case g:return(R=Yo(19,re,H,De)).elementType=g,R.lanes=Pe,R;case z:return p0(re,De,Pe,H);default:if("object"==typeof R&&null!==R)switch(R.$$typeof){case I:We=10;break e;case o:We=9;break e;case a:We=11;break e;case D:We=14;break e;case F:We=16,le=null;break e}throw Error(w(130,null==R?R:typeof R,""))}return(H=Yo(We,re,H,De)).elementType=R,H.type=le,H.lanes=Pe,H}function Yc(R,H,re,le){return(R=Yo(7,R,le,H)).lanes=re,R}function p0(R,H,re,le){return(R=Yo(22,R,le,H)).elementType=z,R.lanes=re,R.stateNode={isHidden:!1},R}function qg(R,H,re){return(R=Yo(6,R,null,H)).lanes=re,R}function $g(R,H,re){return(H=Yo(4,null!==R.children?R.children:[],R.key,H)).lanes=re,H.stateNode={containerInfo:R.containerInfo,pendingChildren:null,implementation:R.implementation},H}function Ww(R,H,re,le,De){this.tag=H,this.containerInfo=R,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qn(0),this.expirationTimes=qn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qn(0),this.identifierPrefix=le,this.onRecoverableError=De,this.mutableSourceEagerHydrationData=null}function g0(R,H,re,le,De,Pe,We,rt,bt){return R=new Ww(R,H,re,rt,bt),1===H?(H=1,!0===Pe&&(H|=8)):H=0,Pe=Yo(3,null,null,H),R.current=Pe,Pe.stateNode=R,Pe.memoizedState={element:le,isDehydrated:re,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yf(Pe),R}function ty(R){if(!R)return Pc;e:{if(Bt(R=R._reactInternals)!==R||1!==R.tag)throw Error(w(170));var H=R;do{switch(H.tag){case 3:H=H.stateNode.context;break e;case 1:if(ps(H.type)){H=H.stateNode.__reactInternalMemoizedMergedChildContext;break e}}H=H.return}while(null!==H);throw Error(w(171))}if(1===R.tag){var re=R.type;if(ps(re))return Cw(R,re,H)}return H}function y0(R,H,re,le,De,Pe,We,rt,bt){return(R=g0(re,le,!0,R,0,Pe,0,rt,bt)).context=ty(null),re=R.current,(Pe=su(le=Ao(),De=Ra(re))).callback=H??null,kc(re,Pe,De),R.current.lanes=De,nr(R,De,le),Zo(R,le),R}function m0(R,H,re,le){var De=H.current,Pe=Ao(),We=Ra(De);return re=ty(re),null===H.context?H.context=re:H.pendingContext=re,(H=su(Pe,We)).payload={element:R},null!==(le=void 0===le?null:le)&&(H.callback=le),null!==(R=kc(De,H,We))&&(fa(R,De,We,Pe),Jf(R,De,We)),We}function v0(R){return(R=R.current).child?(R.child.tag,R.child.stateNode):null}function ny(R,H){if(null!==(R=R.memoizedState)&&null!==R.dehydrated){var re=R.retryLane;R.retryLane=0!==re&&re{"use strict";var M=p(51291);s.s=M.createRoot,M.hydrateRoot},51291:(ne,s,p)=>{"use strict";(function h(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||"function"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(h)}catch(M){console.error(M)}})(),ne.exports=p(66509)},50433:(ne,s,p)=>{"use strict";var h=p(54284),M=Symbol.for("react.element"),w=Symbol.for("react.fragment"),E=Object.prototype.hasOwnProperty,l=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function y(b,S,_){var A,P={},x=null,T=null;for(A in void 0!==_&&(x=""+_),void 0!==S.key&&(x=""+S.key),void 0!==S.ref&&(T=S.ref),S)E.call(S,A)&&!m.hasOwnProperty(A)&&(P[A]=S[A]);if(b&&b.defaultProps)for(A in S=b.defaultProps)void 0===P[A]&&(P[A]=S[A]);return{$$typeof:M,type:b,key:x,ref:T,props:P,_owner:l.current}}s.Fragment=w,s.jsx=y,s.jsxs=y},3851:(ne,s)=>{"use strict";var p=Symbol.for("react.element"),h=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),A=Symbol.iterator;var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,L={};function N(f,k,se){this.props=f,this.context=k,this.refs=L,this.updater=se||x}function j(){}function B(f,k,se){this.props=f,this.context=k,this.refs=L,this.updater=se||x}N.prototype.isReactComponent={},N.prototype.setState=function(f,k){if("object"!=typeof f&&"function"!=typeof f&&null!=f)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,f,k,"setState")},N.prototype.forceUpdate=function(f){this.updater.enqueueForceUpdate(this,f,"forceUpdate")},j.prototype=N.prototype;var V=B.prototype=new j;V.constructor=B,T(V,N.prototype),V.isPureReactComponent=!0;var G=Array.isArray,W=Object.prototype.hasOwnProperty,Q={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function J(f,k,se){var te,oe={},de=null,Ie=null;if(null!=k)for(te in void 0!==k.ref&&(Ie=k.ref),void 0!==k.key&&(de=""+k.key),k)W.call(k,te)&&!q.hasOwnProperty(te)&&(oe[te]=k[te]);var ye=arguments.length-2;if(1===ye)oe.children=se;else if(1{"use strict";ne.exports=p(3851)},18348:(ne,s,p)=>{"use strict";ne.exports=p(50433)},70891:ne=>{"use strict";var p={};function h(m,y,b){b||(b=Error);var _=function(A){function P(x,T,L){return A.call(this,function S(A,P,x){return"string"==typeof y?y:y(A,P,x)}(x,T,L))||this}return function s(m,y){m.prototype=Object.create(y.prototype),m.prototype.constructor=m,m.__proto__=y}(P,A),P}(b);_.prototype.name=b.name,_.prototype.code=m,p[m]=_}function M(m,y){if(Array.isArray(m)){var b=m.length;return m=m.map(function(S){return String(S)}),b>2?"one of ".concat(y," ").concat(m.slice(0,b-1).join(", "),", or ")+m[b-1]:2===b?"one of ".concat(y," ").concat(m[0]," or ").concat(m[1]):"of ".concat(y," ").concat(m[0])}return"of ".concat(y," ").concat(String(m))}h("ERR_INVALID_OPT_VALUE",function(m,y){return'The value "'+y+'" is invalid for option "'+m+'"'},TypeError),h("ERR_INVALID_ARG_TYPE",function(m,y,b){var S,_;if("string"==typeof y&&function w(m,y,b){return m.substr(!b||b<0?0:+b,y.length)===y}(y,"not ")?(S="must not be",y=y.replace(/^not /,"")):S="must be",function E(m,y,b){return(void 0===b||b>m.length)&&(b=m.length),m.substring(b-y.length,b)===y}(m," argument"))_="The ".concat(m," ").concat(S," ").concat(M(y,"type"));else{var A=function l(m,y,b){return"number"!=typeof b&&(b=0),!(b+y.length>m.length)&&-1!==m.indexOf(y,b)}(m,".")?"property":"argument";_='The "'.concat(m,'" ').concat(A," ").concat(S," ").concat(M(y,"type"))}return _+=". Received type ".concat(typeof b)},TypeError),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),h("ERR_METHOD_NOT_IMPLEMENTED",function(m){return"The "+m+" method is not implemented"}),h("ERR_STREAM_PREMATURE_CLOSE","Premature close"),h("ERR_STREAM_DESTROYED",function(m){return"Cannot call "+m+" after a stream was destroyed"}),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),h("ERR_STREAM_WRITE_AFTER_END","write after end"),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_UNKNOWN_ENCODING",function(m){return"Unknown encoding: "+m},TypeError),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ne.exports.q=p},41339:(ne,s,p)=>{"use strict";var h=Object.keys||function(_){var A=[];for(var P in _)A.push(P);return A};ne.exports=y;var M=p(3154),w=p(20520);p(83894)(y,M);for(var E=h(w.prototype),l=0;l{"use strict";ne.exports=M;var h=p(6025);function M(w){if(!(this instanceof M))return new M(w);h.call(this,w)}p(83894)(M,h),M.prototype._transform=function(w,E,l){l(null,w)}},3154:(ne,s,p)=>{"use strict";var h;ne.exports=I,I.ReadableState=ee;p(59069).EventEmitter;var w=function(be,Ne){return be.listeners(Ne).length},E=p(4970),l=p(93172).Buffer,m=global.Uint8Array||function(){};var _,S=p(94616);_=S&&S.debuglog?S.debuglog("stream"):function(){};var G,W,Q,A=p(25019),P=p(41920),T=p(47102).getHighWaterMark,L=p(70891).q,N=L.ERR_INVALID_ARG_TYPE,j=L.ERR_STREAM_PUSH_AFTER_EOF,B=L.ERR_METHOD_NOT_IMPLEMENTED,V=L.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;p(83894)(I,E);var q=P.errorOrDestroy,J=["error","close","destroy","pause","resume"];function ee(ce,be,Ne){h=h||p(41339),ce=ce||{},"boolean"!=typeof Ne&&(Ne=be instanceof h),this.objectMode=!!ce.objectMode,Ne&&(this.objectMode=this.objectMode||!!ce.readableObjectMode),this.highWaterMark=T(this,ce,"readableHighWaterMark",Ne),this.buffer=new A,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==ce.emitClose,this.autoDestroy=!!ce.autoDestroy,this.destroyed=!1,this.defaultEncoding=ce.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ce.encoding&&(G||(G=p(53720).s),this.decoder=new G(ce.encoding),this.encoding=ce.encoding)}function I(ce){if(h=h||p(41339),!(this instanceof I))return new I(ce);var be=this instanceof h;this._readableState=new ee(ce,this,be),this.readable=!0,ce&&("function"==typeof ce.read&&(this._read=ce.read),"function"==typeof ce.destroy&&(this._destroy=ce.destroy)),E.call(this)}function o(ce,be,Ne,Fe,lt){_("readableAddChunk",be);var He,Ge=ce._readableState;if(null===be)Ge.reading=!1,function z(ce,be){if(_("onEofChunk"),!be.ended){if(be.decoder){var Ne=be.decoder.end();Ne&&Ne.length&&(be.buffer.push(Ne),be.length+=be.objectMode?1:Ne.length)}be.ended=!0,be.sync?C(ce):(be.needReadable=!1,be.emittedReadable||(be.emittedReadable=!0,f(ce)))}}(ce,Ge);else if(lt||(He=function d(ce,be){var Ne;return!function b(ce){return l.isBuffer(ce)||ce instanceof m}(be)&&"string"!=typeof be&&void 0!==be&&!ce.objectMode&&(Ne=new N("chunk",["string","Buffer","Uint8Array"],be)),Ne}(Ge,be)),He)q(ce,He);else if(Ge.objectMode||be&&be.length>0)if("string"!=typeof be&&!Ge.objectMode&&Object.getPrototypeOf(be)!==l.prototype&&(be=function y(ce){return l.from(ce)}(be)),Fe)Ge.endEmitted?q(ce,new V):a(ce,Ge,be,!0);else if(Ge.ended)q(ce,new j);else{if(Ge.destroyed)return!1;Ge.reading=!1,Ge.decoder&&!Ne?(be=Ge.decoder.write(be),Ge.objectMode||0!==be.length?a(ce,Ge,be,!1):k(ce,Ge)):a(ce,Ge,be,!1)}else Fe||(Ge.reading=!1,k(ce,Ge));return!Ge.ended&&(Ge.lengthbe.highWaterMark&&(be.highWaterMark=function D(ce){return ce>=g?ce=g:(ce--,ce|=ce>>>1,ce|=ce>>>2,ce|=ce>>>4,ce|=ce>>>8,ce|=ce>>>16,ce++),ce}(ce)),ce<=be.length?ce:be.ended?be.length:(be.needReadable=!0,0))}function C(ce){var be=ce._readableState;_("emitReadable",be.needReadable,be.emittedReadable),be.needReadable=!1,be.emittedReadable||(_("emitReadable",be.flowing),be.emittedReadable=!0,process.nextTick(f,ce))}function f(ce){var be=ce._readableState;_("emitReadable_",be.destroyed,be.length,be.ended),!be.destroyed&&(be.length||be.ended)&&(ce.emit("readable"),be.emittedReadable=!1),be.needReadable=!be.flowing&&!be.ended&&be.length<=be.highWaterMark,ve(ce)}function k(ce,be){be.readingMore||(be.readingMore=!0,process.nextTick(se,ce,be))}function se(ce,be){for(;!be.reading&&!be.ended&&(be.length0,be.resumeScheduled&&!be.paused?be.flowing=!0:ce.listenerCount("data")>0&&ce.resume()}function de(ce){_("readable nexttick read 0"),ce.read(0)}function ye(ce,be){_("resume",be.reading),be.reading||ce.read(0),be.resumeScheduled=!1,ce.emit("resume"),ve(ce),be.flowing&&!be.reading&&ce.read(0)}function ve(ce){var be=ce._readableState;for(_("flow",be.flowing);be.flowing&&null!==ce.read(););}function ae(ce,be){return 0===be.length?null:(be.objectMode?Ne=be.buffer.shift():!ce||ce>=be.length?(Ne=be.decoder?be.buffer.join(""):1===be.buffer.length?be.buffer.first():be.buffer.concat(be.length),be.buffer.clear()):Ne=be.buffer.consume(ce,be.decoder),Ne);var Ne}function fe(ce){var be=ce._readableState;_("endReadable",be.endEmitted),be.endEmitted||(be.ended=!0,process.nextTick(pe,be,ce))}function pe(ce,be){if(_("endReadableNT",ce.endEmitted,ce.length),!ce.endEmitted&&0===ce.length&&(ce.endEmitted=!0,be.readable=!1,be.emit("end"),ce.autoDestroy)){var Ne=be._writableState;(!Ne||Ne.autoDestroy&&Ne.finished)&&be.destroy()}}function Se(ce,be){for(var Ne=0,Fe=ce.length;Ne=be.highWaterMark:be.length>0)||be.ended))return _("read: emitReadable",be.length,be.ended),0===be.length&&be.ended?fe(this):C(this),null;if(0===(ce=F(ce,be))&&be.ended)return 0===be.length&&fe(this),null;var lt,Fe=be.needReadable;return _("need readable",Fe),(0===be.length||be.length-ce0?ae(ce,be):null)?(be.needReadable=be.length<=be.highWaterMark,ce=0):(be.length-=ce,be.awaitDrain=0),0===be.length&&(be.ended||(be.needReadable=!0),Ne!==ce&&be.ended&&fe(this)),null!==lt&&this.emit("data",lt),lt},I.prototype._read=function(ce){q(this,new B("_read()"))},I.prototype.pipe=function(ce,be){var Ne=this,Fe=this._readableState;switch(Fe.pipesCount){case 0:Fe.pipes=ce;break;case 1:Fe.pipes=[Fe.pipes,ce];break;default:Fe.pipes.push(ce)}Fe.pipesCount+=1,_("pipe count=%d opts=%j",Fe.pipesCount,be);var Ge=(!be||!1!==be.end)&&ce!==process.stdout&&ce!==process.stderr?Kt:Ae;function He(Te,Be){_("onunpipe"),Te===Ne&&Be&&!1===Be.hasUnpiped&&(Be.hasUnpiped=!0,function Vt(){_("cleanup"),ce.removeListener("close",Gt),ce.removeListener("finish",Re),ce.removeListener("drain",tt),ce.removeListener("error",at),ce.removeListener("unpipe",He),Ne.removeListener("end",Kt),Ne.removeListener("end",Ae),Ne.removeListener("data",ot),nt=!0,Fe.awaitDrain&&(!ce._writableState||ce._writableState.needDrain)&&tt()}())}function Kt(){_("onend"),ce.end()}Fe.endEmitted?process.nextTick(Ge):Ne.once("end",Ge),ce.on("unpipe",He);var tt=function te(ce){return function(){var Ne=ce._readableState;_("pipeOnDrain",Ne.awaitDrain),Ne.awaitDrain&&Ne.awaitDrain--,0===Ne.awaitDrain&&w(ce,"data")&&(Ne.flowing=!0,ve(ce))}}(Ne);ce.on("drain",tt);var nt=!1;function ot(Te){_("ondata");var Be=ce.write(Te);_("dest.write",Be),!1===Be&&((1===Fe.pipesCount&&Fe.pipes===ce||Fe.pipesCount>1&&-1!==Se(Fe.pipes,ce))&&!nt&&(_("false write response, pause",Fe.awaitDrain),Fe.awaitDrain++),Ne.pause())}function at(Te){_("onerror",Te),Ae(),ce.removeListener("error",at),0===w(ce,"error")&&q(ce,Te)}function Gt(){ce.removeListener("finish",Re),Ae()}function Re(){_("onfinish"),ce.removeListener("close",Gt),Ae()}function Ae(){_("unpipe"),Ne.unpipe(ce)}return Ne.on("data",ot),function Z(ce,be,Ne){if("function"==typeof ce.prependListener)return ce.prependListener(be,Ne);ce._events&&ce._events[be]?Array.isArray(ce._events[be])?ce._events[be].unshift(Ne):ce._events[be]=[Ne,ce._events[be]]:ce.on(be,Ne)}(ce,"error",at),ce.once("close",Gt),ce.once("finish",Re),ce.emit("pipe",Ne),Fe.flowing||(_("pipe resume"),Ne.resume()),ce},I.prototype.unpipe=function(ce){var be=this._readableState,Ne={hasUnpiped:!1};if(0===be.pipesCount)return this;if(1===be.pipesCount)return ce&&ce!==be.pipes||(ce||(ce=be.pipes),be.pipes=null,be.pipesCount=0,be.flowing=!1,ce&&ce.emit("unpipe",this,Ne)),this;if(!ce){var Fe=be.pipes,lt=be.pipesCount;be.pipes=null,be.pipesCount=0,be.flowing=!1;for(var Ge=0;Ge0,!1!==Fe.flowing&&this.resume()):"readable"===ce&&!Fe.endEmitted&&!Fe.readableListening&&(Fe.readableListening=Fe.needReadable=!0,Fe.flowing=!1,Fe.emittedReadable=!1,_("on readable",Fe.length,Fe.reading),Fe.length?C(this):Fe.reading||process.nextTick(de,this)),Ne},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(ce,be){var Ne=E.prototype.removeListener.call(this,ce,be);return"readable"===ce&&process.nextTick(oe,this),Ne},I.prototype.removeAllListeners=function(ce){var be=E.prototype.removeAllListeners.apply(this,arguments);return("readable"===ce||void 0===ce)&&process.nextTick(oe,this),be},I.prototype.resume=function(){var ce=this._readableState;return ce.flowing||(_("resume"),ce.flowing=!ce.readableListening,function Ie(ce,be){be.resumeScheduled||(be.resumeScheduled=!0,process.nextTick(ye,ce,be))}(this,ce)),ce.paused=!1,this},I.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(ce){var be=this,Ne=this._readableState,Fe=!1;for(var lt in ce.on("end",function(){if(_("wrapped end"),Ne.decoder&&!Ne.ended){var He=Ne.decoder.end();He&&He.length&&be.push(He)}be.push(null)}),ce.on("data",function(He){(_("wrapped data"),Ne.decoder&&(He=Ne.decoder.write(He)),Ne.objectMode&&null==He||!(Ne.objectMode||He&&He.length))||(be.push(He)||(Fe=!0,ce.pause()))}),ce)void 0===this[lt]&&"function"==typeof ce[lt]&&(this[lt]=function(Kt){return function(){return ce[Kt].apply(ce,arguments)}}(lt));for(var Ge=0;Ge{"use strict";ne.exports=b;var h=p(70891).q,M=h.ERR_METHOD_NOT_IMPLEMENTED,w=h.ERR_MULTIPLE_CALLBACK,E=h.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=h.ERR_TRANSFORM_WITH_LENGTH_0,m=p(41339);function y(A,P){var x=this._transformState;x.transforming=!1;var T=x.writecb;if(null===T)return this.emit("error",new w);x.writechunk=null,x.writecb=null,null!=P&&this.push(P),T(A);var L=this._readableState;L.reading=!1,(L.needReadable||L.length{"use strict";function M(ve){var ae=this;this.next=null,this.entry=null,this.finish=function(){!function ye(ve,ae,fe){var pe=ve.entry;for(ve.entry=null;pe;){var Se=pe.callback;ae.pendingcb--,Se(fe),pe=pe.next}ae.corkedRequestsFree.next=ve}(ae,ve)}}var w;ne.exports=ee,ee.WritableState=J;var E={deprecate:p(23532)},l=p(4970),m=p(93172).Buffer,y=global.Uint8Array||function(){};var Z,_=p(41920),P=p(47102).getHighWaterMark,x=p(70891).q,T=x.ERR_INVALID_ARG_TYPE,L=x.ERR_METHOD_NOT_IMPLEMENTED,N=x.ERR_MULTIPLE_CALLBACK,j=x.ERR_STREAM_CANNOT_PIPE,B=x.ERR_STREAM_DESTROYED,V=x.ERR_STREAM_NULL_VALUES,G=x.ERR_STREAM_WRITE_AFTER_END,W=x.ERR_UNKNOWN_ENCODING,Q=_.errorOrDestroy;function q(){}function J(ve,ae,fe){w=w||p(41339),ve=ve||{},"boolean"!=typeof fe&&(fe=ae instanceof w),this.objectMode=!!ve.objectMode,fe&&(this.objectMode=this.objectMode||!!ve.writableObjectMode),this.highWaterMark=P(this,ve,"writableHighWaterMark",fe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var pe=!1===ve.decodeStrings;this.decodeStrings=!pe,this.defaultEncoding=ve.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Se){!function z(ve,ae){var fe=ve._writableState,pe=fe.sync,Se=fe.writecb;if("function"!=typeof Se)throw new N;if(function F(ve){ve.writing=!1,ve.writecb=null,ve.length-=ve.writelen,ve.writelen=0}(fe),ae)!function D(ve,ae,fe,pe,Se){--ae.pendingcb,fe?(process.nextTick(Se,pe),process.nextTick(de,ve,ae),ve._writableState.errorEmitted=!0,Q(ve,pe)):(Se(pe),ve._writableState.errorEmitted=!0,Q(ve,pe),de(ve,ae))}(ve,fe,pe,ae,Se);else{var ce=se(fe)||ve.destroyed;!ce&&!fe.corked&&!fe.bufferProcessing&&fe.bufferedRequest&&k(ve,fe),pe?process.nextTick(C,ve,fe,ce,Se):C(ve,fe,ce,Se)}}(ae,Se)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==ve.emitClose,this.autoDestroy=!!ve.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new M(this)}function ee(ve){var ae=this instanceof(w=w||p(41339));if(!ae&&!Z.call(ee,this))return new ee(ve);this._writableState=new J(ve,this,ae),this.writable=!0,ve&&("function"==typeof ve.write&&(this._write=ve.write),"function"==typeof ve.writev&&(this._writev=ve.writev),"function"==typeof ve.destroy&&(this._destroy=ve.destroy),"function"==typeof ve.final&&(this._final=ve.final)),l.call(this)}function g(ve,ae,fe,pe,Se,ce,be){ae.writelen=pe,ae.writecb=be,ae.writing=!0,ae.sync=!0,ae.destroyed?ae.onwrite(new B("write")):fe?ve._writev(Se,ae.onwrite):ve._write(Se,ce,ae.onwrite),ae.sync=!1}function C(ve,ae,fe,pe){fe||function f(ve,ae){0===ae.length&&ae.needDrain&&(ae.needDrain=!1,ve.emit("drain"))}(ve,ae),ae.pendingcb--,pe(),de(ve,ae)}function k(ve,ae){ae.bufferProcessing=!0;var fe=ae.bufferedRequest;if(ve._writev&&fe&&fe.next){var pe=ae.bufferedRequestCount,Se=new Array(pe),ce=ae.corkedRequestsFree;ce.entry=fe;for(var be=0,Ne=!0;fe;)Se[be]=fe,fe.isBuf||(Ne=!1),fe=fe.next,be+=1;Se.allBuffers=Ne,g(ve,ae,!0,ae.length,Se,"",ce.finish),ae.pendingcb++,ae.lastBufferedRequest=null,ce.next?(ae.corkedRequestsFree=ce.next,ce.next=null):ae.corkedRequestsFree=new M(ae),ae.bufferedRequestCount=0}else{for(;fe;){var Fe=fe.chunk,lt=fe.encoding,Ge=fe.callback;if(g(ve,ae,!1,ae.objectMode?1:Fe.length,Fe,lt,Ge),fe=fe.next,ae.bufferedRequestCount--,ae.writing)break}null===fe&&(ae.lastBufferedRequest=null)}ae.bufferedRequest=fe,ae.bufferProcessing=!1}function se(ve){return ve.ending&&0===ve.length&&null===ve.bufferedRequest&&!ve.finished&&!ve.writing}function te(ve,ae){ve._final(function(fe){ae.pendingcb--,fe&&Q(ve,fe),ae.prefinished=!0,ve.emit("prefinish"),de(ve,ae)})}function de(ve,ae){var fe=se(ae);if(fe&&(function oe(ve,ae){!ae.prefinished&&!ae.finalCalled&&("function"!=typeof ve._final||ae.destroyed?(ae.prefinished=!0,ve.emit("prefinish")):(ae.pendingcb++,ae.finalCalled=!0,process.nextTick(te,ve,ae)))}(ve,ae),0===ae.pendingcb&&(ae.finished=!0,ve.emit("finish"),ae.autoDestroy))){var pe=ve._readableState;(!pe||pe.autoDestroy&&pe.endEmitted)&&ve.destroy()}return fe}p(83894)(ee,l),J.prototype.getBuffer=function(){for(var ae=this.bufferedRequest,fe=[];ae;)fe.push(ae),ae=ae.next;return fe},function(){try{Object.defineProperty(J.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(Z=Function.prototype[Symbol.hasInstance],Object.defineProperty(ee,Symbol.hasInstance,{value:function(ae){return!!Z.call(this,ae)||this===ee&&(ae&&ae._writableState instanceof J)}})):Z=function(ae){return ae instanceof this},ee.prototype.pipe=function(){Q(this,new j)},ee.prototype.write=function(ve,ae,fe){var pe=this._writableState,Se=!1,ce=!pe.objectMode&&function S(ve){return m.isBuffer(ve)||ve instanceof y}(ve);return ce&&!m.isBuffer(ve)&&(ve=function b(ve){return m.from(ve)}(ve)),"function"==typeof ae&&(fe=ae,ae=null),ce?ae="buffer":ae||(ae=pe.defaultEncoding),"function"!=typeof fe&&(fe=q),pe.ending?function I(ve,ae){var fe=new G;Q(ve,fe),process.nextTick(ae,fe)}(this,fe):(ce||function o(ve,ae,fe,pe){var Se;return null===fe?Se=new V:"string"!=typeof fe&&!ae.objectMode&&(Se=new T("chunk",["string","Buffer"],fe)),!Se||(Q(ve,Se),process.nextTick(pe,Se),!1)}(this,pe,ve,fe))&&(pe.pendingcb++,Se=function d(ve,ae,fe,pe,Se,ce){if(!fe){var be=function a(ve,ae,fe){return!ve.objectMode&&!1!==ve.decodeStrings&&"string"==typeof ae&&(ae=m.from(ae,fe)),ae}(ae,pe,Se);pe!==be&&(fe=!0,Se="buffer",pe=be)}var Ne=ae.objectMode?1:pe.length;ae.length+=Ne;var Fe=ae.length-1))throw new W(ae);return this._writableState.defaultEncoding=ae,this},Object.defineProperty(ee.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(ee.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),ee.prototype._write=function(ve,ae,fe){fe(new L("_write()"))},ee.prototype._writev=null,ee.prototype.end=function(ve,ae,fe){var pe=this._writableState;return"function"==typeof ve?(fe=ve,ve=null,ae=null):"function"==typeof ae&&(fe=ae,ae=null),null!=ve&&this.write(ve,ae),pe.corked&&(pe.corked=1,this.uncork()),pe.ending||function Ie(ve,ae,fe){ae.ending=!0,de(ve,ae),fe&&(ae.finished?process.nextTick(fe):ve.once("finish",fe)),ae.ended=!0,ve.writable=!1}(this,pe,fe),this},Object.defineProperty(ee.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ae){this._writableState&&(this._writableState.destroyed=ae)}}),ee.prototype.destroy=_.destroy,ee.prototype._undestroy=_.undestroy,ee.prototype._destroy=function(ve,ae){ae(ve)}},13872:(ne,s,p)=>{"use strict";var h;function M(B,V,G){return V in B?Object.defineProperty(B,V,{value:G,enumerable:!0,configurable:!0,writable:!0}):B[V]=G,B}var w=p(67542),E=Symbol("lastResolve"),l=Symbol("lastReject"),m=Symbol("error"),y=Symbol("ended"),b=Symbol("lastPromise"),S=Symbol("handlePromise"),_=Symbol("stream");function A(B,V){return{value:B,done:V}}function P(B){var V=B[E];if(null!==V){var G=B[_].read();null!==G&&(B[b]=null,B[E]=null,B[l]=null,V(A(G,!1)))}}function x(B){process.nextTick(P,B)}var L=Object.getPrototypeOf(function(){}),N=Object.setPrototypeOf((M(h={get stream(){return this[_]},next:function(){var V=this,G=this[m];if(null!==G)return Promise.reject(G);if(this[y])return Promise.resolve(A(void 0,!0));if(this[_].destroyed)return new Promise(function(J,Z){process.nextTick(function(){V[m]?Z(V[m]):J(A(void 0,!0))})});var Q,W=this[b];if(W)Q=new Promise(function T(B,V){return function(G,W){B.then(function(){V[y]?G(A(void 0,!0)):V[S](G,W)},W)}}(W,this));else{var q=this[_].read();if(null!==q)return Promise.resolve(A(q,!1));Q=new Promise(this[S])}return this[b]=Q,Q}},Symbol.asyncIterator,function(){return this}),M(h,"return",function(){var V=this;return new Promise(function(G,W){V[_].destroy(null,function(Q){Q?W(Q):G(A(void 0,!0))})})}),h),L);ne.exports=function(V){var G,W=Object.create(N,(M(G={},_,{value:V,writable:!0}),M(G,E,{value:null,writable:!0}),M(G,l,{value:null,writable:!0}),M(G,m,{value:null,writable:!0}),M(G,y,{value:V._readableState.endEmitted,writable:!0}),M(G,S,{value:function(q,J){var Z=W[_].read();Z?(W[b]=null,W[E]=null,W[l]=null,q(A(Z,!1))):(W[E]=q,W[l]=J)},writable:!0}),G));return W[b]=null,w(V,function(Q){if(Q&&"ERR_STREAM_PREMATURE_CLOSE"!==Q.code){var q=W[l];return null!==q&&(W[b]=null,W[E]=null,W[l]=null,q(Q)),void(W[m]=Q)}var J=W[E];null!==J&&(W[b]=null,W[E]=null,W[l]=null,J(A(void 0,!0))),W[y]=!0}),V.on("readable",x.bind(null,W)),W}},25019:(ne,s,p)=>{"use strict";function h(x,T){var L=Object.keys(x);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(x);T&&(N=N.filter(function(j){return Object.getOwnPropertyDescriptor(x,j).enumerable})),L.push.apply(L,N)}return L}function w(x,T,L){return T in x?Object.defineProperty(x,T,{value:L,enumerable:!0,configurable:!0,writable:!0}):x[T]=L,x}function l(x,T){for(var L=0;L0?this.tail.next=N:this.head=N,this.tail=N,++this.length}},{key:"unshift",value:function(L){var N={data:L,next:this.head};0===this.length&&(this.tail=N),this.head=N,++this.length}},{key:"shift",value:function(){if(0!==this.length){var L=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,L}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(L){if(0===this.length)return"";for(var N=this.head,j=""+N.data;N=N.next;)j+=L+N.data;return j}},{key:"concat",value:function(L){if(0===this.length)return b.alloc(0);for(var N=b.allocUnsafe(L>>>0),j=this.head,B=0;j;)P(j.data,N,B),B+=j.data.length,j=j.next;return N}},{key:"consume",value:function(L,N){var j;return LV.length?V.length:L;if(G===V.length?B+=V:B+=V.slice(0,L),0===(L-=G)){G===V.length?(++j,N.next?this.head=N.next:this.head=this.tail=null):(this.head=N,N.data=V.slice(G));break}++j}return this.length-=j,B}},{key:"_getBuffer",value:function(L){var N=b.allocUnsafe(L),j=this.head,B=1;for(j.data.copy(N),L-=j.data.length;j=j.next;){var V=j.data,G=L>V.length?V.length:L;if(V.copy(N,N.length-L,0,G),0===(L-=G)){G===V.length?(++B,j.next?this.head=j.next:this.head=this.tail=null):(this.head=j,j.data=V.slice(G));break}++B}return this.length-=B,N}},{key:A,value:function(L,N){return _(this,function M(x){for(var T=1;T{"use strict";function p(l,m){w(l,m),h(l)}function h(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function w(l,m){l.emit("error",m)}ne.exports={destroy:function s(l,m){var y=this,b=this._readableState&&this._readableState.destroyed,S=this._writableState&&this._writableState.destroyed;return b||S?(m?m(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(w,this,l)):process.nextTick(w,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(_){!m&&_?y._writableState?y._writableState.errorEmitted?process.nextTick(h,y):(y._writableState.errorEmitted=!0,process.nextTick(p,y,_)):process.nextTick(p,y,_):m?(process.nextTick(h,y),m(_)):process.nextTick(h,y)}),this)},undestroy:function M(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function E(l,m){var y=l._readableState,b=l._writableState;y&&y.autoDestroy||b&&b.autoDestroy?l.destroy(m):l.emit("error",m)}}},67542:(ne,s,p)=>{"use strict";var h=p(70891).q.ERR_STREAM_PREMATURE_CLOSE;function w(){}ne.exports=function l(m,y,b){if("function"==typeof y)return l(m,null,y);y||(y={}),b=function M(m){var y=!1;return function(){if(!y){y=!0;for(var b=arguments.length,S=new Array(b),_=0;_{ne.exports=function(){throw new Error("Readable.from is not available in the browser")}},90954:(ne,s,p)=>{"use strict";var h;var w=p(70891).q,E=w.ERR_MISSING_ARGS,l=w.ERR_STREAM_DESTROYED;function m(x){if(x)throw x}function S(x){x()}function _(x,T){return x.pipe(T)}ne.exports=function P(){for(var x=arguments.length,T=new Array(x),L=0;L0,function(q){j||(j=q),q&&B.forEach(S),!W&&(B.forEach(S),N(j))})});return T.reduce(_)}},47102:(ne,s,p)=>{"use strict";var h=p(70891).q.ERR_INVALID_OPT_VALUE;ne.exports={getHighWaterMark:function w(E,l,m,y){var b=function M(E,l,m){return null!=E.highWaterMark?E.highWaterMark:l?E[m]:null}(l,y,m);if(null!=b){if(!isFinite(b)||Math.floor(b)!==b||b<0)throw new h(y?m:"highWaterMark",b);return Math.floor(b)}return E.objectMode?16:16384}}},4970:(ne,s,p)=>{ne.exports=p(59069).EventEmitter},53720:(ne,s,p)=>{"use strict";var h=p(73502).Buffer,M=h.isEncoding||function(B){switch((B=""+B)&&B.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 l(B){var V;switch(this.encoding=function E(B){var V=function w(B){if(!B)return"utf8";for(var V;;)switch(B){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 B;default:if(V)return;B=(""+B).toLowerCase(),V=!0}}(B);if("string"!=typeof V&&(h.isEncoding===M||!M(B)))throw new Error("Unknown encoding: "+B);return V||B}(B),this.encoding){case"utf16le":this.text=P,this.end=x,V=4;break;case"utf8":this.fillLast=S,V=4;break;case"base64":this.text=T,this.end=L,V=3;break;default:return this.write=N,void(this.end=j)}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(V)}function m(B){return B<=127?0:B>>5==6?2:B>>4==14?3:B>>3==30?4:B>>6==2?-1:-2}function S(B){var V=this.lastTotal-this.lastNeed,G=function b(B,V,G){if(128!=(192&V[0]))return B.lastNeed=0,"\ufffd";if(B.lastNeed>1&&V.length>1){if(128!=(192&V[1]))return B.lastNeed=1,"\ufffd";if(B.lastNeed>2&&V.length>2&&128!=(192&V[2]))return B.lastNeed=2,"\ufffd"}}(this,B);return void 0!==G?G:this.lastNeed<=B.length?(B.copy(this.lastChar,V,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(B.copy(this.lastChar,V,0,B.length),void(this.lastNeed-=B.length))}function P(B,V){if((B.length-V)%2==0){var G=B.toString("utf16le",V);if(G){var W=G.charCodeAt(G.length-1);if(W>=55296&&W<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=B[B.length-2],this.lastChar[1]=B[B.length-1],G.slice(0,-1)}return G}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=B[B.length-1],B.toString("utf16le",V,B.length-1)}function x(B){var V=B&&B.length?this.write(B):"";if(this.lastNeed){var G=this.lastTotal-this.lastNeed;return V+this.lastChar.toString("utf16le",0,G)}return V}function T(B,V){var G=(B.length-V)%3;return 0===G?B.toString("base64",V):(this.lastNeed=3-G,this.lastTotal=3,1===G?this.lastChar[0]=B[B.length-1]:(this.lastChar[0]=B[B.length-2],this.lastChar[1]=B[B.length-1]),B.toString("base64",V,B.length-G))}function L(B){var V=B&&B.length?this.write(B):"";return this.lastNeed?V+this.lastChar.toString("base64",0,3-this.lastNeed):V}function N(B){return B.toString(this.encoding)}function j(B){return B&&B.length?this.write(B):""}s.s=l,l.prototype.write=function(B){if(0===B.length)return"";var V,G;if(this.lastNeed){if(void 0===(V=this.fillLast(B)))return"";G=this.lastNeed,this.lastNeed=0}else G=0;return G=0?(Q>0&&(B.lastNeed=Q-1),Q):--W=0?(Q>0&&(B.lastNeed=Q-2),Q):--W=0?(Q>0&&(2===Q?Q=0:B.lastNeed=Q-3),Q):0))}(this,B,V);if(!this.lastNeed)return B.toString("utf8",V);this.lastTotal=G;var W=B.length-(G-this.lastNeed);return B.copy(this.lastChar,0,W),B.toString("utf8",V,W)},l.prototype.fillLast=function(B){if(this.lastNeed<=B.length)return B.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);B.copy(this.lastChar,this.lastTotal-this.lastNeed,0,B.length),this.lastNeed-=B.length}},65685:(ne,s,p)=>{(s=ne.exports=p(3154)).Stream=s,s.Readable=s,s.Writable=p(20520),s.Duplex=p(41339),s.Transform=p(6025),s.PassThrough=p(56071),s.finished=p(67542),s.pipeline=p(90954)},75634:(ne,s,p)=>{"use strict";var h=p(93172).Buffer,M=p(83894),w=p(39650),E=new Array(16),l=[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],m=[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],y=[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],b=[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],S=[0,1518500249,1859775393,2400959708,2840853838],_=[1352829926,1548603684,1836072691,2053994217,0];function A(){w.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function P(B,V){return B<>>32-V}function x(B,V,G,W,Q,q,J,Z){return P(B+(V^G^W)+q+J|0,Z)+Q|0}function T(B,V,G,W,Q,q,J,Z){return P(B+(V&G|~V&W)+q+J|0,Z)+Q|0}function L(B,V,G,W,Q,q,J,Z){return P(B+((V|~G)^W)+q+J|0,Z)+Q|0}function N(B,V,G,W,Q,q,J,Z){return P(B+(V&W|G&~W)+q+J|0,Z)+Q|0}function j(B,V,G,W,Q,q,J,Z){return P(B+(V^(G|~W))+q+J|0,Z)+Q|0}M(A,w),A.prototype._update=function(){for(var B=E,V=0;V<16;++V)B[V]=this._block.readInt32LE(4*V);for(var G=0|this._a,W=0|this._b,Q=0|this._c,q=0|this._d,J=0|this._e,Z=0|this._a,ee=0|this._b,I=0|this._c,o=0|this._d,a=0|this._e,d=0;d<80;d+=1){var g,D;d<16?(g=x(G,W,Q,q,J,B[l[d]],S[0],y[d]),D=j(Z,ee,I,o,a,B[m[d]],_[0],b[d])):d<32?(g=T(G,W,Q,q,J,B[l[d]],S[1],y[d]),D=N(Z,ee,I,o,a,B[m[d]],_[1],b[d])):d<48?(g=L(G,W,Q,q,J,B[l[d]],S[2],y[d]),D=L(Z,ee,I,o,a,B[m[d]],_[2],b[d])):d<64?(g=N(G,W,Q,q,J,B[l[d]],S[3],y[d]),D=T(Z,ee,I,o,a,B[m[d]],_[3],b[d])):(g=j(G,W,Q,q,J,B[l[d]],S[4],y[d]),D=x(Z,ee,I,o,a,B[m[d]],_[4],b[d])),G=J,J=q,q=P(Q,10),Q=W,W=g,Z=a,a=o,o=P(I,10),I=ee,ee=D}var F=this._b+Q+o|0;this._b=this._c+q+a|0,this._c=this._d+J+Z|0,this._d=this._e+G+ee|0,this._e=this._a+W+I|0,this._a=F},A.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var B=h.alloc?h.alloc(20):new h(20);return B.writeInt32LE(this._a,0),B.writeInt32LE(this._b,4),B.writeInt32LE(this._c,8),B.writeInt32LE(this._d,12),B.writeInt32LE(this._e,16),B},ne.exports=A},73502:(ne,s,p)=>{var h=p(93172),M=h.Buffer;function w(l,m){for(var y in l)m[y]=l[y]}function E(l,m,y){return M(l,m,y)}M.from&&M.alloc&&M.allocUnsafe&&M.allocUnsafeSlow?ne.exports=h:(w(h,s),s.Buffer=E),E.prototype=Object.create(M.prototype),w(M,E),E.from=function(l,m,y){if("number"==typeof l)throw new TypeError("Argument must not be a number");return M(l,m,y)},E.alloc=function(l,m,y){if("number"!=typeof l)throw new TypeError("Argument must be a number");var b=M(l);return void 0!==m?"string"==typeof y?b.fill(m,y):b.fill(m):b.fill(0),b},E.allocUnsafe=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return M(l)},E.allocUnsafeSlow=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return h.SlowBuffer(l)}},62038:(ne,s,p)=>{"use strict";var E,h=p(93172),M=h.Buffer,w={};for(E in h)h.hasOwnProperty(E)&&("SlowBuffer"===E||"Buffer"===E||(w[E]=h[E]));var l=w.Buffer={};for(E in M)M.hasOwnProperty(E)&&("allocUnsafe"===E||"allocUnsafeSlow"===E||(l[E]=M[E]));if(w.Buffer.prototype=M.prototype,(!l.from||l.from===Uint8Array.from)&&(l.from=function(m,y,b){if("number"==typeof m)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof m);if(m&&typeof m.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m);return M(m,y,b)}),l.alloc||(l.alloc=function(m,y,b){if("number"!=typeof m)throw new TypeError('The "size" argument must be of type number. Received type '+typeof m);if(m<0||m>=2*(1<<30))throw new RangeError('The value "'+m+'" is invalid for option "size"');var S=M(m);return y&&0!==y.length?"string"==typeof b?S.fill(y,b):S.fill(y):S.fill(0),S}),!w.kStringMaxLength)try{w.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}w.constants||(w.constants={MAX_LENGTH:w.kMaxLength},w.kStringMaxLength&&(w.constants.MAX_STRING_LENGTH=w.kStringMaxLength)),ne.exports=w},40191:(ne,s)=>{"use strict";function p(F,z){var C=F.length;F.push(z);e:for(;0>>1,k=F[f];if(!(0>>1;fw(oe,C))dew(Ie,oe)?(F[f]=Ie,F[de]=C,f=de):(F[f]=oe,F[te]=C,f=te);else{if(!(dew(Ie,C)))break e;F[f]=Ie,F[de]=C,f=de}}}return z}function w(F,z){var C=F.sortIndex-z.sortIndex;return 0!==C?C:F.id-z.id}if("object"==typeof performance&&"function"==typeof performance.now){var E=performance;s.unstable_now=function(){return E.now()}}else{var l=Date,m=l.now();s.unstable_now=function(){return l.now()-m}}var y=[],b=[],S=1,_=null,A=3,P=!1,x=!1,T=!1,L="function"==typeof setTimeout?setTimeout:null,N="function"==typeof clearTimeout?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function B(F){for(var z=h(b);null!==z;){if(null===z.callback)M(b);else{if(!(z.startTime<=F))break;M(b),z.sortIndex=z.expirationTime,p(y,z)}z=h(b)}}function V(F){if(T=!1,B(F),!x)if(null!==h(y))x=!0,g(G);else{var z=h(b);null!==z&&D(V,z.startTime-F)}}function G(F,z){x=!1,T&&(T=!1,N(q),q=-1),P=!0;var C=A;try{for(B(z),_=h(y);null!==_&&(!(_.expirationTime>z)||F&&!ee());){var f=_.callback;if("function"==typeof f){_.callback=null,A=_.priorityLevel;var k=f(_.expirationTime<=z);z=s.unstable_now(),"function"==typeof k?_.callback=k:_===h(y)&&M(y),B(z)}else M(y);_=h(y)}if(null!==_)var se=!0;else{var te=h(b);null!==te&&D(V,te.startTime-z),se=!1}return se}finally{_=null,A=C,P=!1}}typeof navigator<"u"&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var o,W=!1,Q=null,q=-1,J=5,Z=-1;function ee(){return!(s.unstable_now()-ZF||125f?(F.sortIndex=C,p(b,F),null===h(y)&&F===h(b)&&(T?(N(q),q=-1):T=!0,D(V,C-f))):(F.sortIndex=k,p(y,F),x||P||(x=!0,g(G))),F},s.unstable_shouldYield=ee,s.unstable_wrapCallback=function(F){var z=A;return function(){var C=A;A=z;try{return F.apply(this,arguments)}finally{A=C}}}},44854:(ne,s,p)=>{"use strict";ne.exports=p(40191)},50508:(ne,s,p)=>{const h=Symbol("SemVer ANY");class M{static get ANY(){return h}constructor(A,P){if(P=w(P),A instanceof M){if(A.loose===!!P.loose)return A;A=A.value}A=A.trim().split(/\s+/).join(" "),y("comparator",A,P),this.options=P,this.loose=!!P.loose,this.parse(A),this.semver===h?this.value="":this.value=this.operator+this.semver.version,y("comp",this)}parse(A){const P=this.options.loose?E[l.COMPARATORLOOSE]:E[l.COMPARATOR],x=A.match(P);if(!x)throw new TypeError(`Invalid comparator: ${A}`);this.operator=void 0!==x[1]?x[1]:"","="===this.operator&&(this.operator=""),x[2]?this.semver=new b(x[2],this.options.loose):this.semver=h}toString(){return this.value}test(A){if(y("Comparator.test",A,this.options.loose),this.semver===h||A===h)return!0;if("string"==typeof A)try{A=new b(A,this.options)}catch{return!1}return m(A,this.operator,this.semver,this.options)}intersects(A,P){if(!(A instanceof M))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new S(A.value,P).test(this.value):""===A.operator?""===A.value||new S(this.value,P).test(A.semver):!((P=w(P)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===A.value)||!P.includePrerelease&&(this.value.startsWith("<0.0.0")||A.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&A.operator.startsWith(">")||this.operator.startsWith("<")&&A.operator.startsWith("<")||this.semver.version===A.semver.version&&this.operator.includes("=")&&A.operator.includes("=")||m(this.semver,"<",A.semver,P)&&this.operator.startsWith(">")&&A.operator.startsWith("<")||m(this.semver,">",A.semver,P)&&this.operator.startsWith("<")&&A.operator.startsWith(">"))}}ne.exports=M;const w=p(20471),{safeRe:E,t:l}=p(1338),m=p(68127),y=p(66070),b=p(51839),S=p(48611)},48611:(ne,s,p)=>{class h{constructor(g,D){if(D=E(D),g instanceof h)return g.loose===!!D.loose&&g.includePrerelease===!!D.includePrerelease?g:new h(g.raw,D);if(g instanceof l)return this.raw=g.value,this.set=[[g]],this.format(),this;if(this.options=D,this.loose=!!D.loose,this.includePrerelease=!!D.includePrerelease,this.raw=g.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(F=>this.parseRange(F.trim())).filter(F=>F.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const F=this.set[0];if(this.set=this.set.filter(z=>!L(z[0])),0===this.set.length)this.set=[F];else if(this.set.length>1)for(const z of this.set)if(1===z.length&&N(z[0])){this.set=[z];break}}this.format()}format(){return this.range=this.set.map(g=>g.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(g){const F=((this.options.includePrerelease&&x)|(this.options.loose&&T))+":"+g,z=w.get(F);if(z)return z;const C=this.options.loose,f=C?b[S.HYPHENRANGELOOSE]:b[S.HYPHENRANGE];g=g.replace(f,o(this.options.includePrerelease)),m("hyphen replace",g),g=g.replace(b[S.COMPARATORTRIM],_),m("comparator trim",g),g=g.replace(b[S.TILDETRIM],A),m("tilde trim",g),g=g.replace(b[S.CARETTRIM],P),m("caret trim",g);let k=g.split(" ").map(de=>B(de,this.options)).join(" ").split(/\s+/).map(de=>I(de,this.options));C&&(k=k.filter(de=>(m("loose invalid filter",de,this.options),!!de.match(b[S.COMPARATORLOOSE])))),m("range list",k);const se=new Map,te=k.map(de=>new l(de,this.options));for(const de of te){if(L(de))return[de];se.set(de.value,de)}se.size>1&&se.has("")&&se.delete("");const oe=[...se.values()];return w.set(F,oe),oe}intersects(g,D){if(!(g instanceof h))throw new TypeError("a Range is required");return this.set.some(F=>j(F,D)&&g.set.some(z=>j(z,D)&&F.every(C=>z.every(f=>C.intersects(f,D)))))}test(g){if(!g)return!1;if("string"==typeof g)try{g=new y(g,this.options)}catch{return!1}for(let D=0;D"<0.0.0-0"===d.value,N=d=>""===d.value,j=(d,g)=>{let D=!0;const F=d.slice();let z=F.pop();for(;D&&F.length;)D=F.every(C=>z.intersects(C,g)),z=F.pop();return D},B=(d,g)=>(m("comp",d,g),d=Q(d,g),m("caret",d),d=G(d,g),m("tildes",d),d=J(d,g),m("xrange",d),d=ee(d,g),m("stars",d),d),V=d=>!d||"x"===d.toLowerCase()||"*"===d,G=(d,g)=>d.trim().split(/\s+/).map(D=>W(D,g)).join(" "),W=(d,g)=>{const D=g.loose?b[S.TILDELOOSE]:b[S.TILDE];return d.replace(D,(F,z,C,f,k)=>{let se;return m("tilde",d,F,z,C,f,k),V(z)?se="":V(C)?se=`>=${z}.0.0 <${+z+1}.0.0-0`:V(f)?se=`>=${z}.${C}.0 <${z}.${+C+1}.0-0`:k?(m("replaceTilde pr",k),se=`>=${z}.${C}.${f}-${k} <${z}.${+C+1}.0-0`):se=`>=${z}.${C}.${f} <${z}.${+C+1}.0-0`,m("tilde return",se),se})},Q=(d,g)=>d.trim().split(/\s+/).map(D=>q(D,g)).join(" "),q=(d,g)=>{m("caret",d,g);const D=g.loose?b[S.CARETLOOSE]:b[S.CARET],F=g.includePrerelease?"-0":"";return d.replace(D,(z,C,f,k,se)=>{let te;return m("caret",d,z,C,f,k,se),V(C)?te="":V(f)?te=`>=${C}.0.0${F} <${+C+1}.0.0-0`:V(k)?te="0"===C?`>=${C}.${f}.0${F} <${C}.${+f+1}.0-0`:`>=${C}.${f}.0${F} <${+C+1}.0.0-0`:se?(m("replaceCaret pr",se),te="0"===C?"0"===f?`>=${C}.${f}.${k}-${se} <${C}.${f}.${+k+1}-0`:`>=${C}.${f}.${k}-${se} <${C}.${+f+1}.0-0`:`>=${C}.${f}.${k}-${se} <${+C+1}.0.0-0`):(m("no pr"),te="0"===C?"0"===f?`>=${C}.${f}.${k}${F} <${C}.${f}.${+k+1}-0`:`>=${C}.${f}.${k}${F} <${C}.${+f+1}.0-0`:`>=${C}.${f}.${k} <${+C+1}.0.0-0`),m("caret return",te),te})},J=(d,g)=>(m("replaceXRanges",d,g),d.split(/\s+/).map(D=>Z(D,g)).join(" ")),Z=(d,g)=>{d=d.trim();const D=g.loose?b[S.XRANGELOOSE]:b[S.XRANGE];return d.replace(D,(F,z,C,f,k,se)=>{m("xRange",d,F,z,C,f,k,se);const te=V(C),oe=te||V(f),de=oe||V(k),Ie=de;return"="===z&&Ie&&(z=""),se=g.includePrerelease?"-0":"",te?F=">"===z||"<"===z?"<0.0.0-0":"*":z&&Ie?(oe&&(f=0),k=0,">"===z?(z=">=",oe?(C=+C+1,f=0,k=0):(f=+f+1,k=0)):"<="===z&&(z="<",oe?C=+C+1:f=+f+1),"<"===z&&(se="-0"),F=`${z+C}.${f}.${k}${se}`):oe?F=`>=${C}.0.0${se} <${+C+1}.0.0-0`:de&&(F=`>=${C}.${f}.0${se} <${C}.${+f+1}.0-0`),m("xRange return",F),F})},ee=(d,g)=>(m("replaceStars",d,g),d.trim().replace(b[S.STAR],"")),I=(d,g)=>(m("replaceGTE0",d,g),d.trim().replace(b[g.includePrerelease?S.GTE0PRE:S.GTE0],"")),o=d=>(g,D,F,z,C,f,k,se,te,oe,de,Ie,ye)=>`${D=V(F)?"":V(z)?`>=${F}.0.0${d?"-0":""}`:V(C)?`>=${F}.${z}.0${d?"-0":""}`:f?`>=${D}`:`>=${D}${d?"-0":""}`} ${se=V(te)?"":V(oe)?`<${+te+1}.0.0-0`:V(de)?`<${te}.${+oe+1}.0-0`:Ie?`<=${te}.${oe}.${de}-${Ie}`:d?`<${te}.${oe}.${+de+1}-0`:`<=${se}`}`.trim(),a=(d,g,D)=>{for(let F=0;F0){const z=d[F].semver;if(z.major===g.major&&z.minor===g.minor&&z.patch===g.patch)return!0}return!1}return!0}},51839:(ne,s,p)=>{const h=p(66070),{MAX_LENGTH:M,MAX_SAFE_INTEGER:w}=p(31696),{safeRe:E,t:l}=p(1338),m=p(20471),{compareIdentifiers:y}=p(67165);class b{constructor(_,A){if(A=m(A),_ instanceof b){if(_.loose===!!A.loose&&_.includePrerelease===!!A.includePrerelease)return _;_=_.version}else if("string"!=typeof _)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof _}".`);if(_.length>M)throw new TypeError(`version is longer than ${M} characters`);h("SemVer",_,A),this.options=A,this.loose=!!A.loose,this.includePrerelease=!!A.includePrerelease;const P=_.trim().match(A.loose?E[l.LOOSE]:E[l.FULL]);if(!P)throw new TypeError(`Invalid Version: ${_}`);if(this.raw=_,this.major=+P[1],this.minor=+P[2],this.patch=+P[3],this.major>w||this.major<0)throw new TypeError("Invalid major version");if(this.minor>w||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>w||this.patch<0)throw new TypeError("Invalid patch version");P[4]?this.prerelease=P[4].split(".").map(x=>{if(/^[0-9]+$/.test(x)){const T=+x;if(T>=0&&T=0;)"number"==typeof this.prerelease[T]&&(this.prerelease[T]++,T=-2);if(-1===T){if(A===this.prerelease.join(".")&&!1===P)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(x)}}if(A){let T=[A,x];!1===P&&(T=[A]),0===y(this.prerelease[0],A)?isNaN(this.prerelease[1])&&(this.prerelease=T):this.prerelease=T}break}default:throw new Error(`invalid increment argument: ${_}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}ne.exports=b},69862:(ne,s,p)=>{const h=p(62306);ne.exports=(w,E)=>{const l=h(w.trim().replace(/^[=v]+/,""),E);return l?l.version:null}},68127:(ne,s,p)=>{const h=p(95097),M=p(42046),w=p(97283),E=p(45844),l=p(30845),m=p(20477);ne.exports=(b,S,_,A)=>{switch(S){case"===":return"object"==typeof b&&(b=b.version),"object"==typeof _&&(_=_.version),b===_;case"!==":return"object"==typeof b&&(b=b.version),"object"==typeof _&&(_=_.version),b!==_;case"":case"=":case"==":return h(b,_,A);case"!=":return M(b,_,A);case">":return w(b,_,A);case">=":return E(b,_,A);case"<":return l(b,_,A);case"<=":return m(b,_,A);default:throw new TypeError(`Invalid operator: ${S}`)}}},8797:(ne,s,p)=>{const h=p(51839),M=p(62306),{safeRe:w,t:E}=p(1338);ne.exports=(m,y)=>{if(m instanceof h)return m;if("number"==typeof m&&(m=String(m)),"string"!=typeof m)return null;let b=null;if((y=y||{}).rtl){let S;for(;(S=w[E.COERCERTL].exec(m))&&(!b||b.index+b[0].length!==m.length);)(!b||S.index+S[0].length!==b.index+b[0].length)&&(b=S),w[E.COERCERTL].lastIndex=S.index+S[1].length+S[2].length;w[E.COERCERTL].lastIndex=-1}else b=m.match(w[E.COERCE]);return null===b?null:M(`${b[2]}.${b[3]||"0"}.${b[4]||"0"}`,y)}},13621:(ne,s,p)=>{const h=p(51839);ne.exports=(w,E,l)=>{const m=new h(w,l),y=new h(E,l);return m.compare(y)||m.compareBuild(y)}},28088:(ne,s,p)=>{const h=p(65522);ne.exports=(w,E)=>h(w,E,!0)},65522:(ne,s,p)=>{const h=p(51839);ne.exports=(w,E,l)=>new h(w,l).compare(new h(E,l))},70380:(ne,s,p)=>{const h=p(62306);ne.exports=(w,E)=>{const l=h(w,null,!0),m=h(E,null,!0),y=l.compare(m);if(0===y)return null;const b=y>0,S=b?l:m,_=b?m:l,A=!!S.prerelease.length;if(_.prerelease.length&&!A)return _.patch||_.minor?S.patch?"patch":S.minor?"minor":"major":"major";const x=A?"pre":"";return l.major!==m.major?x+"major":l.minor!==m.minor?x+"minor":l.patch!==m.patch?x+"patch":"prerelease"}},95097:(ne,s,p)=>{const h=p(65522);ne.exports=(w,E,l)=>0===h(w,E,l)},97283:(ne,s,p)=>{const h=p(65522);ne.exports=(w,E,l)=>h(w,E,l)>0},45844:(ne,s,p)=>{const h=p(65522);ne.exports=(w,E,l)=>h(w,E,l)>=0},74749:(ne,s,p)=>{const h=p(51839);ne.exports=(w,E,l,m,y)=>{"string"==typeof l&&(y=m,m=l,l=void 0);try{return new h(w instanceof h?w.version:w,l).inc(E,m,y).version}catch{return null}}},30845:(ne,s,p)=>{const h=p(65522);ne.exports=(w,E,l)=>h(w,E,l)<0},20477:(ne,s,p)=>{const h=p(65522);ne.exports=(w,E,l)=>h(w,E,l)<=0},24303:(ne,s,p)=>{const h=p(51839);ne.exports=(w,E)=>new h(w,E).major},87920:(ne,s,p)=>{const h=p(51839);ne.exports=(w,E)=>new h(w,E).minor},42046:(ne,s,p)=>{const h=p(65522);ne.exports=(w,E,l)=>0!==h(w,E,l)},62306:(ne,s,p)=>{const h=p(51839);ne.exports=(w,E,l=!1)=>{if(w instanceof h)return w;try{return new h(w,E)}catch(m){if(!l)return null;throw m}}},81387:(ne,s,p)=>{const h=p(51839);ne.exports=(w,E)=>new h(w,E).patch},71964:(ne,s,p)=>{const h=p(62306);ne.exports=(w,E)=>{const l=h(w,E);return l&&l.prerelease.length?l.prerelease:null}},48034:(ne,s,p)=>{const h=p(65522);ne.exports=(w,E,l)=>h(E,w,l)},89610:(ne,s,p)=>{const h=p(13621);ne.exports=(w,E)=>w.sort((l,m)=>h(m,l,E))},52866:(ne,s,p)=>{const h=p(48611);ne.exports=(w,E,l)=>{try{E=new h(E,l)}catch{return!1}return E.test(w)}},2379:(ne,s,p)=>{const h=p(13621);ne.exports=(w,E)=>w.sort((l,m)=>h(l,m,E))},26473:(ne,s,p)=>{const h=p(62306);ne.exports=(w,E)=>{const l=h(w,E);return l?l.version:null}},97858:(ne,s,p)=>{const h=p(1338),M=p(31696),w=p(51839),E=p(67165),l=p(62306),m=p(26473),y=p(69862),b=p(74749),S=p(70380),_=p(24303),A=p(87920),P=p(81387),x=p(71964),T=p(65522),L=p(48034),N=p(28088),j=p(13621),B=p(2379),V=p(89610),G=p(97283),W=p(30845),Q=p(95097),q=p(42046),J=p(45844),Z=p(20477),ee=p(68127),I=p(8797),o=p(50508),a=p(48611),d=p(52866),g=p(16892),D=p(27693),F=p(24499),z=p(57291),C=p(14282),f=p(97203),k=p(82764),se=p(51658),te=p(74741),oe=p(93807),de=p(24158);ne.exports={parse:l,valid:m,clean:y,inc:b,diff:S,major:_,minor:A,patch:P,prerelease:x,compare:T,rcompare:L,compareLoose:N,compareBuild:j,sort:B,rsort:V,gt:G,lt:W,eq:Q,neq:q,gte:J,lte:Z,cmp:ee,coerce:I,Comparator:o,Range:a,satisfies:d,toComparators:g,maxSatisfying:D,minSatisfying:F,minVersion:z,validRange:C,outside:f,gtr:k,ltr:se,intersects:te,simplifyRange:oe,subset:de,SemVer:w,re:h.re,src:h.src,tokens:h.t,SEMVER_SPEC_VERSION:M.SEMVER_SPEC_VERSION,RELEASE_TYPES:M.RELEASE_TYPES,compareIdentifiers:E.compareIdentifiers,rcompareIdentifiers:E.rcompareIdentifiers}},31696:ne=>{const h=Number.MAX_SAFE_INTEGER||9007199254740991;ne.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:h,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},66070:ne=>{const s="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...p)=>console.error("SEMVER",...p):()=>{};ne.exports=s},67165:ne=>{const s=/^[0-9]+$/,p=(M,w)=>{const E=s.test(M),l=s.test(w);return E&&l&&(M=+M,w=+w),M===w?0:E&&!l?-1:l&&!E?1:Mp(w,M)}},20471:ne=>{const s=Object.freeze({loose:!0}),p=Object.freeze({});ne.exports=M=>M?"object"!=typeof M?s:M:p},1338:(ne,s,p)=>{const{MAX_SAFE_COMPONENT_LENGTH:h,MAX_SAFE_BUILD_LENGTH:M,MAX_LENGTH:w}=p(31696),E=p(66070),l=(s=ne.exports={}).re=[],m=s.safeRe=[],y=s.src=[],b=s.t={};let S=0;const _="[a-zA-Z0-9-]",A=[["\\s",1],["\\d",w],[_,M]],x=(T,L,N)=>{const j=(T=>{for(const[L,N]of A)T=T.split(`${L}*`).join(`${L}{0,${N}}`).split(`${L}+`).join(`${L}{1,${N}}`);return T})(L),B=S++;E(T,B,L),b[T]=B,y[B]=L,l[B]=new RegExp(L,N?"g":void 0),m[B]=new RegExp(j,N?"g":void 0)};x("NUMERICIDENTIFIER","0|[1-9]\\d*"),x("NUMERICIDENTIFIERLOOSE","\\d+"),x("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${_}*`),x("MAINVERSION",`(${y[b.NUMERICIDENTIFIER]})\\.(${y[b.NUMERICIDENTIFIER]})\\.(${y[b.NUMERICIDENTIFIER]})`),x("MAINVERSIONLOOSE",`(${y[b.NUMERICIDENTIFIERLOOSE]})\\.(${y[b.NUMERICIDENTIFIERLOOSE]})\\.(${y[b.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASEIDENTIFIER",`(?:${y[b.NUMERICIDENTIFIER]}|${y[b.NONNUMERICIDENTIFIER]})`),x("PRERELEASEIDENTIFIERLOOSE",`(?:${y[b.NUMERICIDENTIFIERLOOSE]}|${y[b.NONNUMERICIDENTIFIER]})`),x("PRERELEASE",`(?:-(${y[b.PRERELEASEIDENTIFIER]}(?:\\.${y[b.PRERELEASEIDENTIFIER]})*))`),x("PRERELEASELOOSE",`(?:-?(${y[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${y[b.PRERELEASEIDENTIFIERLOOSE]})*))`),x("BUILDIDENTIFIER",`${_}+`),x("BUILD",`(?:\\+(${y[b.BUILDIDENTIFIER]}(?:\\.${y[b.BUILDIDENTIFIER]})*))`),x("FULLPLAIN",`v?${y[b.MAINVERSION]}${y[b.PRERELEASE]}?${y[b.BUILD]}?`),x("FULL",`^${y[b.FULLPLAIN]}$`),x("LOOSEPLAIN",`[v=\\s]*${y[b.MAINVERSIONLOOSE]}${y[b.PRERELEASELOOSE]}?${y[b.BUILD]}?`),x("LOOSE",`^${y[b.LOOSEPLAIN]}$`),x("GTLT","((?:<|>)?=?)"),x("XRANGEIDENTIFIERLOOSE",`${y[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),x("XRANGEIDENTIFIER",`${y[b.NUMERICIDENTIFIER]}|x|X|\\*`),x("XRANGEPLAIN",`[v=\\s]*(${y[b.XRANGEIDENTIFIER]})(?:\\.(${y[b.XRANGEIDENTIFIER]})(?:\\.(${y[b.XRANGEIDENTIFIER]})(?:${y[b.PRERELEASE]})?${y[b.BUILD]}?)?)?`),x("XRANGEPLAINLOOSE",`[v=\\s]*(${y[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[b.XRANGEIDENTIFIERLOOSE]})(?:${y[b.PRERELEASELOOSE]})?${y[b.BUILD]}?)?)?`),x("XRANGE",`^${y[b.GTLT]}\\s*${y[b.XRANGEPLAIN]}$`),x("XRANGELOOSE",`^${y[b.GTLT]}\\s*${y[b.XRANGEPLAINLOOSE]}$`),x("COERCE",`(^|[^\\d])(\\d{1,${h}})(?:\\.(\\d{1,${h}}))?(?:\\.(\\d{1,${h}}))?(?:$|[^\\d])`),x("COERCERTL",y[b.COERCE],!0),x("LONETILDE","(?:~>?)"),x("TILDETRIM",`(\\s*)${y[b.LONETILDE]}\\s+`,!0),s.tildeTrimReplace="$1~",x("TILDE",`^${y[b.LONETILDE]}${y[b.XRANGEPLAIN]}$`),x("TILDELOOSE",`^${y[b.LONETILDE]}${y[b.XRANGEPLAINLOOSE]}$`),x("LONECARET","(?:\\^)"),x("CARETTRIM",`(\\s*)${y[b.LONECARET]}\\s+`,!0),s.caretTrimReplace="$1^",x("CARET",`^${y[b.LONECARET]}${y[b.XRANGEPLAIN]}$`),x("CARETLOOSE",`^${y[b.LONECARET]}${y[b.XRANGEPLAINLOOSE]}$`),x("COMPARATORLOOSE",`^${y[b.GTLT]}\\s*(${y[b.LOOSEPLAIN]})$|^$`),x("COMPARATOR",`^${y[b.GTLT]}\\s*(${y[b.FULLPLAIN]})$|^$`),x("COMPARATORTRIM",`(\\s*)${y[b.GTLT]}\\s*(${y[b.LOOSEPLAIN]}|${y[b.XRANGEPLAIN]})`,!0),s.comparatorTrimReplace="$1$2$3",x("HYPHENRANGE",`^\\s*(${y[b.XRANGEPLAIN]})\\s+-\\s+(${y[b.XRANGEPLAIN]})\\s*$`),x("HYPHENRANGELOOSE",`^\\s*(${y[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${y[b.XRANGEPLAINLOOSE]})\\s*$`),x("STAR","(<|>)?=?\\s*\\*"),x("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),x("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},20578:(ne,s,p)=>{"use strict";const h=p(47245),M=Symbol("max"),w=Symbol("length"),E=Symbol("lengthCalculator"),l=Symbol("allowStale"),m=Symbol("maxAge"),y=Symbol("dispose"),b=Symbol("noDisposeOnSet"),S=Symbol("lruList"),_=Symbol("cache"),A=Symbol("updateAgeOnGet"),P=()=>1;const T=(G,W,Q)=>{const q=G[_].get(W);if(q){const J=q.value;if(L(G,J)){if(j(G,q),!G[l])return}else Q&&(G[A]&&(q.value.now=Date.now()),G[S].unshiftNode(q));return J.value}},L=(G,W)=>{if(!W||!W.maxAge&&!G[m])return!1;const Q=Date.now()-W.now;return W.maxAge?Q>W.maxAge:G[m]&&Q>G[m]},N=G=>{if(G[w]>G[M])for(let W=G[S].tail;G[w]>G[M]&&null!==W;){const Q=W.prev;j(G,W),W=Q}},j=(G,W)=>{if(W){const Q=W.value;G[y]&&G[y](Q.key,Q.value),G[w]-=Q.length,G[_].delete(Q.key),G[S].removeNode(W)}};class B{constructor(W,Q,q,J,Z){this.key=W,this.value=Q,this.length=q,this.now=J,this.maxAge=Z||0}}const V=(G,W,Q,q)=>{let J=Q.value;L(G,J)&&(j(G,Q),G[l]||(J=void 0)),J&&W.call(q,J.value,J.key,G)};ne.exports=class x{constructor(W){if("number"==typeof W&&(W={max:W}),W||(W={}),W.max&&("number"!=typeof W.max||W.max<0))throw new TypeError("max must be a non-negative number");this[M]=W.max||1/0;const q=W.length||P;if(this[E]="function"!=typeof q?P:q,this[l]=W.stale||!1,W.maxAge&&"number"!=typeof W.maxAge)throw new TypeError("maxAge must be a number");this[m]=W.maxAge||0,this[y]=W.dispose,this[b]=W.noDisposeOnSet||!1,this[A]=W.updateAgeOnGet||!1,this.reset()}set max(W){if("number"!=typeof W||W<0)throw new TypeError("max must be a non-negative number");this[M]=W||1/0,N(this)}get max(){return this[M]}set allowStale(W){this[l]=!!W}get allowStale(){return this[l]}set maxAge(W){if("number"!=typeof W)throw new TypeError("maxAge must be a non-negative number");this[m]=W,N(this)}get maxAge(){return this[m]}set lengthCalculator(W){"function"!=typeof W&&(W=P),W!==this[E]&&(this[E]=W,this[w]=0,this[S].forEach(Q=>{Q.length=this[E](Q.value,Q.key),this[w]+=Q.length})),N(this)}get lengthCalculator(){return this[E]}get length(){return this[w]}get itemCount(){return this[S].length}rforEach(W,Q){Q=Q||this;for(let q=this[S].tail;null!==q;){const J=q.prev;V(this,W,q,Q),q=J}}forEach(W,Q){Q=Q||this;for(let q=this[S].head;null!==q;){const J=q.next;V(this,W,q,Q),q=J}}keys(){return this[S].toArray().map(W=>W.key)}values(){return this[S].toArray().map(W=>W.value)}reset(){this[y]&&this[S]&&this[S].length&&this[S].forEach(W=>this[y](W.key,W.value)),this[_]=new Map,this[S]=new h,this[w]=0}dump(){return this[S].map(W=>!L(this,W)&&{k:W.key,v:W.value,e:W.now+(W.maxAge||0)}).toArray().filter(W=>W)}dumpLru(){return this[S]}set(W,Q,q){if((q=q||this[m])&&"number"!=typeof q)throw new TypeError("maxAge must be a number");const J=q?Date.now():0,Z=this[E](Q,W);if(this[_].has(W)){if(Z>this[M])return j(this,this[_].get(W)),!1;const o=this[_].get(W).value;return this[y]&&(this[b]||this[y](W,o.value)),o.now=J,o.maxAge=q,o.value=Q,this[w]+=Z-o.length,o.length=Z,this.get(W),N(this),!0}const ee=new B(W,Q,Z,J,q);return ee.length>this[M]?(this[y]&&this[y](W,Q),!1):(this[w]+=ee.length,this[S].unshift(ee),this[_].set(W,this[S].head),N(this),!0)}has(W){if(!this[_].has(W))return!1;const Q=this[_].get(W).value;return!L(this,Q)}get(W){return T(this,W,!0)}peek(W){return T(this,W,!1)}pop(){const W=this[S].tail;return W?(j(this,W),W.value):null}del(W){j(this,this[_].get(W))}load(W){this.reset();const Q=Date.now();for(let q=W.length-1;q>=0;q--){const J=W[q],Z=J.e||0;if(0===Z)this.set(J.k,J.v);else{const ee=Z-Q;ee>0&&this.set(J.k,J.v,ee)}}}prune(){this[_].forEach((W,Q)=>T(this,Q,!1))}}},82764:(ne,s,p)=>{const h=p(97203);ne.exports=(w,E,l)=>h(w,E,">",l)},74741:(ne,s,p)=>{const h=p(48611);ne.exports=(w,E,l)=>(w=new h(w,l),E=new h(E,l),w.intersects(E,l))},51658:(ne,s,p)=>{const h=p(97203);ne.exports=(w,E,l)=>h(w,E,"<",l)},27693:(ne,s,p)=>{const h=p(51839),M=p(48611);ne.exports=(E,l,m)=>{let y=null,b=null,S=null;try{S=new M(l,m)}catch{return null}return E.forEach(_=>{S.test(_)&&(!y||-1===b.compare(_))&&(y=_,b=new h(y,m))}),y}},24499:(ne,s,p)=>{const h=p(51839),M=p(48611);ne.exports=(E,l,m)=>{let y=null,b=null,S=null;try{S=new M(l,m)}catch{return null}return E.forEach(_=>{S.test(_)&&(!y||1===b.compare(_))&&(y=_,b=new h(y,m))}),y}},57291:(ne,s,p)=>{const h=p(51839),M=p(48611),w=p(97283);ne.exports=(l,m)=>{l=new M(l,m);let y=new h("0.0.0");if(l.test(y)||(y=new h("0.0.0-0"),l.test(y)))return y;y=null;for(let b=0;b{const P=new h(A.semver.version);switch(A.operator){case">":0===P.prerelease.length?P.patch++:P.prerelease.push(0),P.raw=P.format();case"":case">=":(!_||w(P,_))&&(_=P);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),_&&(!y||w(y,_))&&(y=_)}return y&&l.test(y)?y:null}},97203:(ne,s,p)=>{const h=p(51839),M=p(50508),{ANY:w}=M,E=p(48611),l=p(52866),m=p(97283),y=p(30845),b=p(20477),S=p(45844);ne.exports=(A,P,x,T)=>{let L,N,j,B,V;switch(A=new h(A,T),P=new E(P,T),x){case">":L=m,N=b,j=y,B=">",V=">=";break;case"<":L=y,N=S,j=m,B="<",V="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(l(A,P,T))return!1;for(let G=0;G{J.semver===w&&(J=new M(">=0.0.0")),Q=Q||J,q=q||J,L(J.semver,Q.semver,T)?Q=J:j(J.semver,q.semver,T)&&(q=J)}),Q.operator===B||Q.operator===V||(!q.operator||q.operator===B)&&N(A,q.semver))return!1;if(q.operator===V&&j(A,q.semver))return!1}return!0}},93807:(ne,s,p)=>{const h=p(52866),M=p(65522);ne.exports=(w,E,l)=>{const m=[];let y=null,b=null;const S=w.sort((x,T)=>M(x,T,l));for(const x of S)h(x,E,l)?(b=x,y||(y=x)):(b&&m.push([y,b]),b=null,y=null);y&&m.push([y,null]);const _=[];for(const[x,T]of m)x===T?_.push(x):T||x!==S[0]?T?x===S[0]?_.push(`<=${T}`):_.push(`${x} - ${T}`):_.push(`>=${x}`):_.push("*");const A=_.join(" || "),P="string"==typeof E.raw?E.raw:String(E);return A.length{const h=p(48611),M=p(50508),{ANY:w}=M,E=p(52866),l=p(65522),y=[new M(">=0.0.0-0")],b=[new M(">=0.0.0")],S=(P,x,T)=>{if(P===x)return!0;if(1===P.length&&P[0].semver===w){if(1===x.length&&x[0].semver===w)return!0;P=T.includePrerelease?y:b}if(1===x.length&&x[0].semver===w){if(T.includePrerelease)return!0;x=b}const L=new Set;let N,j,B;for(const Z of P)">"===Z.operator||">="===Z.operator?N=_(N,Z,T):"<"===Z.operator||"<="===Z.operator?j=A(j,Z,T):L.add(Z.semver);if(L.size>1)return null;if(N&&j){if(B=l(N.semver,j.semver,T),B>0)return null;if(0===B&&(">="!==N.operator||"<="!==j.operator))return null}for(const Z of L){if(N&&!E(Z,String(N),T)||j&&!E(Z,String(j),T))return null;for(const ee of x)if(!E(Z,String(ee),T))return!1;return!0}let V,G,W,Q,q=!(!j||T.includePrerelease||!j.semver.prerelease.length)&&j.semver,J=!(!N||T.includePrerelease||!N.semver.prerelease.length)&&N.semver;q&&1===q.prerelease.length&&"<"===j.operator&&0===q.prerelease[0]&&(q=!1);for(const Z of x){if(Q=Q||">"===Z.operator||">="===Z.operator,W=W||"<"===Z.operator||"<="===Z.operator,N)if(J&&Z.semver.prerelease&&Z.semver.prerelease.length&&Z.semver.major===J.major&&Z.semver.minor===J.minor&&Z.semver.patch===J.patch&&(J=!1),">"===Z.operator||">="===Z.operator){if(V=_(N,Z,T),V===Z&&V!==N)return!1}else if(">="===N.operator&&!E(N.semver,String(Z),T))return!1;if(j)if(q&&Z.semver.prerelease&&Z.semver.prerelease.length&&Z.semver.major===q.major&&Z.semver.minor===q.minor&&Z.semver.patch===q.patch&&(q=!1),"<"===Z.operator||"<="===Z.operator){if(G=A(j,Z,T),G===Z&&G!==j)return!1}else if("<="===j.operator&&!E(j.semver,String(Z),T))return!1;if(!Z.operator&&(j||N)&&0!==B)return!1}return!(N&&W&&!j&&0!==B||j&&Q&&!N&&0!==B||J||q)},_=(P,x,T)=>{if(!P)return x;const L=l(P.semver,x.semver,T);return L>0?P:L<0||">"===x.operator&&">="===P.operator?x:P},A=(P,x,T)=>{if(!P)return x;const L=l(P.semver,x.semver,T);return L<0?P:L>0||"<"===x.operator&&"<="===P.operator?x:P};ne.exports=(P,x,T={})=>{if(P===x)return!0;P=new h(P,T),x=new h(x,T);let L=!1;e:for(const N of P.set){for(const j of x.set){const B=S(N,j,T);if(L=L||null!==B,B)continue e}if(L)return!1}return!0}},16892:(ne,s,p)=>{const h=p(48611);ne.exports=(w,E)=>new h(w,E).set.map(l=>l.map(m=>m.value).join(" ").trim().split(" "))},14282:(ne,s,p)=>{const h=p(48611);ne.exports=(w,E)=>{try{return new h(w,E).range||"*"}catch{return null}}},1106:ne=>{"use strict";ne.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function s(h,M){return h.__proto__=M,h}:function p(h,M){for(var w in M)Object.prototype.hasOwnProperty.call(h,w)||(h[w]=M[w]);return h})},86692:(ne,s,p)=>{var h=p(73502).Buffer;function M(w,E){this._block=h.alloc(w),this._finalSize=E,this._blockSize=w,this._len=0}M.prototype.update=function(w,E){"string"==typeof w&&(E=E||"utf8",w=h.from(w,E));for(var l=this._block,m=this._blockSize,y=w.length,b=this._len,S=0;S=this._finalSize&&(this._update(this._block),this._block.fill(0));var l=8*this._len;if(l<=4294967295)this._block.writeUInt32BE(l,this._blockSize-4);else{var m=(4294967295&l)>>>0,y=(l-m)/4294967296;this._block.writeUInt32BE(y,this._blockSize-8),this._block.writeUInt32BE(m,this._blockSize-4)}this._update(this._block);var b=this._hash();return w?b.toString(w):b},M.prototype._update=function(){throw new Error("_update must be implemented by subclass")},ne.exports=M},95244:(ne,s,p)=>{var h=ne.exports=function(w){w=w.toLowerCase();var E=h[w];if(!E)throw new Error(w+" is not supported (we accept pull requests)");return new E};h.sha=p(88932),h.sha1=p(17736),h.sha224=p(25044),h.sha256=p(15014),h.sha384=p(76540),h.sha512=p(10117)},88932:(ne,s,p)=>{var h=p(83894),M=p(86692),w=p(73502).Buffer,E=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function m(){this.init(),this._w=l,M.call(this,64,56)}function y(_){return _<<5|_>>>27}function b(_){return _<<30|_>>>2}function S(_,A,P,x){return 0===_?A&P|~A&x:2===_?A&P|A&x|P&x:A^P^x}h(m,M),m.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},m.prototype._update=function(_){for(var A=this._w,P=0|this._a,x=0|this._b,T=0|this._c,L=0|this._d,N=0|this._e,j=0;j<16;++j)A[j]=_.readInt32BE(4*j);for(;j<80;++j)A[j]=A[j-3]^A[j-8]^A[j-14]^A[j-16];for(var B=0;B<80;++B){var V=~~(B/20),G=y(P)+S(V,x,T,L)+N+A[B]+E[V]|0;N=L,L=T,T=b(x),x=P,P=G}this._a=P+this._a|0,this._b=x+this._b|0,this._c=T+this._c|0,this._d=L+this._d|0,this._e=N+this._e|0},m.prototype._hash=function(){var _=w.allocUnsafe(20);return _.writeInt32BE(0|this._a,0),_.writeInt32BE(0|this._b,4),_.writeInt32BE(0|this._c,8),_.writeInt32BE(0|this._d,12),_.writeInt32BE(0|this._e,16),_},ne.exports=m},17736:(ne,s,p)=>{var h=p(83894),M=p(86692),w=p(73502).Buffer,E=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function m(){this.init(),this._w=l,M.call(this,64,56)}function y(A){return A<<1|A>>>31}function b(A){return A<<5|A>>>27}function S(A){return A<<30|A>>>2}function _(A,P,x,T){return 0===A?P&x|~P&T:2===A?P&x|P&T|x&T:P^x^T}h(m,M),m.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},m.prototype._update=function(A){for(var P=this._w,x=0|this._a,T=0|this._b,L=0|this._c,N=0|this._d,j=0|this._e,B=0;B<16;++B)P[B]=A.readInt32BE(4*B);for(;B<80;++B)P[B]=y(P[B-3]^P[B-8]^P[B-14]^P[B-16]);for(var V=0;V<80;++V){var G=~~(V/20),W=b(x)+_(G,T,L,N)+j+P[V]+E[G]|0;j=N,N=L,L=S(T),T=x,x=W}this._a=x+this._a|0,this._b=T+this._b|0,this._c=L+this._c|0,this._d=N+this._d|0,this._e=j+this._e|0},m.prototype._hash=function(){var A=w.allocUnsafe(20);return A.writeInt32BE(0|this._a,0),A.writeInt32BE(0|this._b,4),A.writeInt32BE(0|this._c,8),A.writeInt32BE(0|this._d,12),A.writeInt32BE(0|this._e,16),A},ne.exports=m},25044:(ne,s,p)=>{var h=p(83894),M=p(15014),w=p(86692),E=p(73502).Buffer,l=new Array(64);function m(){this.init(),this._w=l,w.call(this,64,56)}h(m,M),m.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},m.prototype._hash=function(){var y=E.allocUnsafe(28);return y.writeInt32BE(this._a,0),y.writeInt32BE(this._b,4),y.writeInt32BE(this._c,8),y.writeInt32BE(this._d,12),y.writeInt32BE(this._e,16),y.writeInt32BE(this._f,20),y.writeInt32BE(this._g,24),y},ne.exports=m},15014:(ne,s,p)=>{var h=p(83894),M=p(86692),w=p(73502).Buffer,E=[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],l=new Array(64);function m(){this.init(),this._w=l,M.call(this,64,56)}function y(x,T,L){return L^x&(T^L)}function b(x,T,L){return x&T|L&(x|T)}function S(x){return(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10)}function _(x){return(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7)}function A(x){return(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3}function P(x){return(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10}h(m,M),m.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},m.prototype._update=function(x){for(var T=this._w,L=0|this._a,N=0|this._b,j=0|this._c,B=0|this._d,V=0|this._e,G=0|this._f,W=0|this._g,Q=0|this._h,q=0;q<16;++q)T[q]=x.readInt32BE(4*q);for(;q<64;++q)T[q]=P(T[q-2])+T[q-7]+A(T[q-15])+T[q-16]|0;for(var J=0;J<64;++J){var Z=Q+_(V)+y(V,G,W)+E[J]+T[J]|0,ee=S(L)+b(L,N,j)|0;Q=W,W=G,G=V,V=B+Z|0,B=j,j=N,N=L,L=Z+ee|0}this._a=L+this._a|0,this._b=N+this._b|0,this._c=j+this._c|0,this._d=B+this._d|0,this._e=V+this._e|0,this._f=G+this._f|0,this._g=W+this._g|0,this._h=Q+this._h|0},m.prototype._hash=function(){var x=w.allocUnsafe(32);return x.writeInt32BE(this._a,0),x.writeInt32BE(this._b,4),x.writeInt32BE(this._c,8),x.writeInt32BE(this._d,12),x.writeInt32BE(this._e,16),x.writeInt32BE(this._f,20),x.writeInt32BE(this._g,24),x.writeInt32BE(this._h,28),x},ne.exports=m},76540:(ne,s,p)=>{var h=p(83894),M=p(10117),w=p(86692),E=p(73502).Buffer,l=new Array(160);function m(){this.init(),this._w=l,w.call(this,128,112)}h(m,M),m.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},m.prototype._hash=function(){var y=E.allocUnsafe(48);function b(S,_,A){y.writeInt32BE(S,A),y.writeInt32BE(_,A+4)}return b(this._ah,this._al,0),b(this._bh,this._bl,8),b(this._ch,this._cl,16),b(this._dh,this._dl,24),b(this._eh,this._el,32),b(this._fh,this._fl,40),y},ne.exports=m},10117:(ne,s,p)=>{var h=p(83894),M=p(86692),w=p(73502).Buffer,E=[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],l=new Array(160);function m(){this.init(),this._w=l,M.call(this,128,112)}function y(N,j,B){return B^N&(j^B)}function b(N,j,B){return N&j|B&(N|j)}function S(N,j){return(N>>>28|j<<4)^(j>>>2|N<<30)^(j>>>7|N<<25)}function _(N,j){return(N>>>14|j<<18)^(N>>>18|j<<14)^(j>>>9|N<<23)}function A(N,j){return(N>>>1|j<<31)^(N>>>8|j<<24)^N>>>7}function P(N,j){return(N>>>1|j<<31)^(N>>>8|j<<24)^(N>>>7|j<<25)}function x(N,j){return(N>>>19|j<<13)^(j>>>29|N<<3)^N>>>6}function T(N,j){return(N>>>19|j<<13)^(j>>>29|N<<3)^(N>>>6|j<<26)}function L(N,j){return N>>>0>>0?1:0}h(m,M),m.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},m.prototype._update=function(N){for(var j=this._w,B=0|this._ah,V=0|this._bh,G=0|this._ch,W=0|this._dh,Q=0|this._eh,q=0|this._fh,J=0|this._gh,Z=0|this._hh,ee=0|this._al,I=0|this._bl,o=0|this._cl,a=0|this._dl,d=0|this._el,g=0|this._fl,D=0|this._gl,F=0|this._hl,z=0;z<32;z+=2)j[z]=N.readInt32BE(4*z),j[z+1]=N.readInt32BE(4*z+4);for(;z<160;z+=2){var C=j[z-30],f=j[z-30+1],k=A(C,f),se=P(f,C),te=x(C=j[z-4],f=j[z-4+1]),oe=T(f,C),de=j[z-14],Ie=j[z-14+1],ye=j[z-32],ve=j[z-32+1],ae=se+Ie|0,fe=k+de+L(ae,se)|0;fe=(fe=fe+te+L(ae=ae+oe|0,oe)|0)+ye+L(ae=ae+ve|0,ve)|0,j[z]=fe,j[z+1]=ae}for(var pe=0;pe<160;pe+=2){fe=j[pe],ae=j[pe+1];var Se=b(B,V,G),ce=b(ee,I,o),be=S(B,ee),Ne=S(ee,B),Fe=_(Q,d),lt=_(d,Q),Ge=E[pe],He=E[pe+1],Kt=y(Q,q,J),tt=y(d,g,D),nt=F+lt|0,Vt=Z+Fe+L(nt,F)|0;Vt=(Vt=(Vt=Vt+Kt+L(nt=nt+tt|0,tt)|0)+Ge+L(nt=nt+He|0,He)|0)+fe+L(nt=nt+ae|0,ae)|0;var ot=Ne+ce|0,at=be+Se+L(ot,Ne)|0;Z=J,F=D,J=q,D=g,q=Q,g=d,Q=W+Vt+L(d=a+nt|0,a)|0,W=G,a=o,G=V,o=I,V=B,I=ee,B=Vt+at+L(ee=nt+ot|0,nt)|0}this._al=this._al+ee|0,this._bl=this._bl+I|0,this._cl=this._cl+o|0,this._dl=this._dl+a|0,this._el=this._el+d|0,this._fl=this._fl+g|0,this._gl=this._gl+D|0,this._hl=this._hl+F|0,this._ah=this._ah+B+L(this._al,ee)|0,this._bh=this._bh+V+L(this._bl,I)|0,this._ch=this._ch+G+L(this._cl,o)|0,this._dh=this._dh+W+L(this._dl,a)|0,this._eh=this._eh+Q+L(this._el,d)|0,this._fh=this._fh+q+L(this._fl,g)|0,this._gh=this._gh+J+L(this._gl,D)|0,this._hh=this._hh+Z+L(this._hl,F)|0},m.prototype._hash=function(){var N=w.allocUnsafe(64);function j(B,V,G){N.writeInt32BE(B,G),N.writeInt32BE(V,G+4)}return j(this._ah,this._al,0),j(this._bh,this._bl,8),j(this._ch,this._cl,16),j(this._dh,this._dl,24),j(this._eh,this._el,32),j(this._fh,this._fl,40),j(this._gh,this._gl,48),j(this._hh,this._hl,56),N},ne.exports=m},9562:(ne,s,p)=>{var h,M,w,l;h=p(25585),M=p(83018).utf8,w=p(83018).bin,(l=function(m,y){var b=h.wordsToBytes(function(m){m.constructor==String?m=M.stringToBytes(m):typeof Buffer<"u"&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(m)?m=Array.prototype.slice.call(m,0):Array.isArray(m)||(m=m.toString());var y=h.bytesToWords(m),b=8*m.length,S=[],_=1732584193,A=-271733879,P=-1732584194,x=271733878,T=-1009589776;y[b>>5]|=128<<24-b%32,y[15+(b+64>>>9<<4)]=b;for(var L=0;L>>31}var q=(_<<5|_>>>27)+T+(S[W]>>>0)+(W<20?1518500249+(A&P|~A&x):W<40?1859775393+(A^P^x):W<60?(A&P|A&x|P&x)-1894007588:(A^P^x)-899497514);T=x,x=P,P=A<<30|A>>>2,A=_,_=q}_+=N,A+=j,P+=B,x+=V,T+=G}return[_,A,P,x,T]}(m));return y&&y.asBytes?b:y&&y.asString?w.bytesToString(b):h.bytesToHex(b)})._blocksize=16,l._digestsize=20,ne.exports=l},78951:ne=>{"use strict";ne.exports=(s,p)=>{if("string"!=typeof s||"string"!=typeof p)throw new TypeError("Expected the arguments to be of type `string`");if(""===p)return[s];const h=s.indexOf(p);return-1===h?[s]:[s.slice(0,h),s.slice(h+p.length)]}},295:(ne,s,p)=>{ne.exports=w;var h=p(59069).EventEmitter;function w(){h.call(this)}p(83894)(w,h),w.Readable=p(3154),w.Writable=p(20520),w.Duplex=p(41339),w.Transform=p(6025),w.PassThrough=p(56071),w.finished=p(67542),w.pipeline=p(90954),w.Stream=w,w.prototype.pipe=function(E,l){var m=this;function y(T){E.writable&&!1===E.write(T)&&m.pause&&m.pause()}function b(){m.readable&&m.resume&&m.resume()}m.on("data",y),E.on("drain",b),!E._isStdio&&(!l||!1!==l.end)&&(m.on("end",_),m.on("close",A));var S=!1;function _(){S||(S=!0,E.end())}function A(){S||(S=!0,"function"==typeof E.destroy&&E.destroy())}function P(T){if(x(),0===h.listenerCount(this,"error"))throw T}function x(){m.removeListener("data",y),E.removeListener("drain",b),m.removeListener("end",_),m.removeListener("close",A),m.removeListener("error",P),E.removeListener("error",P),m.removeListener("end",x),m.removeListener("close",x),E.removeListener("close",x)}return m.on("error",P),E.on("error",P),m.on("end",x),m.on("close",x),E.on("close",x),E.emit("pipe",m),E}},74216:(ne,s,p)=>{var h=p(3724),M=p(62359),w=p(78629),E=p(94525),l=p(68762),m=s;m.request=function(y,b){y="string"==typeof y?l.parse(y):w(y);var S=-1===global.location.protocol.search(/^https?:$/)?"http:":"",_=y.protocol||S,A=y.hostname||y.host,P=y.port,x=y.path||"/";A&&-1!==A.indexOf(":")&&(A="["+A+"]"),y.url=(A?_+"//"+A:"")+(P?":"+P:"")+x,y.method=(y.method||"GET").toUpperCase(),y.headers=y.headers||{};var T=new h(y);return b&&T.on("response",b),T},m.get=function(b,S){var _=m.request(b,S);return _.end(),_},m.ClientRequest=h,m.IncomingMessage=M.IncomingMessage,m.Agent=function(){},m.Agent.defaultMaxSockets=4,m.globalAgent=new m.Agent,m.STATUS_CODES=E,m.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},57976:(ne,s)=>{var p;function h(){if(void 0!==p)return p;if(global.XMLHttpRequest){p=new global.XMLHttpRequest;try{p.open("GET",global.XDomainRequest?"/":"https://example.com")}catch{p=null}}else p=null;return p}function M(E){var l=h();if(!l)return!1;try{return l.responseType=E,l.responseType===E}catch{}return!1}function w(E){return"function"==typeof E}s.fetch=w(global.fetch)&&w(global.ReadableStream),s.writableStream=w(global.WritableStream),s.abortController=w(global.AbortController),s.arraybuffer=s.fetch||M("arraybuffer"),s.msstream=!s.fetch&&M("ms-stream"),s.mozchunkedarraybuffer=!s.fetch&&M("moz-chunked-arraybuffer"),s.overrideMimeType=s.fetch||!!h()&&w(h().overrideMimeType),p=null},3724:(ne,s,p)=>{var h=p(57976),M=p(83894),w=p(62359),E=p(65685),l=w.IncomingMessage,m=w.readyStates;var b=ne.exports=function(A){var P=this;E.Writable.call(P),P._opts=A,P._body=[],P._headers={},A.auth&&P.setHeader("Authorization","Basic "+Buffer.from(A.auth).toString("base64")),Object.keys(A.headers).forEach(function(L){P.setHeader(L,A.headers[L])});var x,T=!0;if("disable-fetch"===A.mode||"requestTimeout"in A&&!h.abortController)T=!1,x=!0;else if("prefer-streaming"===A.mode)x=!1;else if("allow-wrong-content-type"===A.mode)x=!h.overrideMimeType;else{if(A.mode&&"default"!==A.mode&&"prefer-fast"!==A.mode)throw new Error("Invalid value for opts.mode");x=!0}P._mode=function y(A,P){return h.fetch&&P?"fetch":h.mozchunkedarraybuffer?"moz-chunked-arraybuffer":h.msstream?"ms-stream":h.arraybuffer&&A?"arraybuffer":"text"}(x,T),P._fetchTimer=null,P._socketTimeout=null,P._socketTimer=null,P.on("finish",function(){P._onFinish()})};M(b,E.Writable),b.prototype.setHeader=function(A,P){var T=A.toLowerCase();-1===_.indexOf(T)&&(this._headers[T]={name:A,value:P})},b.prototype.getHeader=function(A){var P=this._headers[A.toLowerCase()];return P?P.value:null},b.prototype.removeHeader=function(A){delete this._headers[A.toLowerCase()]},b.prototype._onFinish=function(){var A=this;if(!A._destroyed){var P=A._opts;"timeout"in P&&0!==P.timeout&&A.setTimeout(P.timeout);var x=A._headers,T=null;"GET"!==P.method&&"HEAD"!==P.method&&(T=new Blob(A._body,{type:(x["content-type"]||{}).value||""}));var L=[];if(Object.keys(x).forEach(function(V){var G=x[V].name,W=x[V].value;Array.isArray(W)?W.forEach(function(Q){L.push([G,Q])}):L.push([G,W])}),"fetch"===A._mode){var N=null;if(h.abortController){var j=new AbortController;N=j.signal,A._fetchAbortController=j,"requestTimeout"in P&&0!==P.requestTimeout&&(A._fetchTimer=global.setTimeout(function(){A.emit("requestTimeout"),A._fetchAbortController&&A._fetchAbortController.abort()},P.requestTimeout))}global.fetch(A._opts.url,{method:A._opts.method,headers:L,body:T||void 0,mode:"cors",credentials:P.withCredentials?"include":"same-origin",signal:N}).then(function(V){A._fetchResponse=V,A._resetTimers(!1),A._connect()},function(V){A._resetTimers(!0),A._destroyed||A.emit("error",V)})}else{var B=A._xhr=new global.XMLHttpRequest;try{B.open(A._opts.method,A._opts.url,!0)}catch(V){return void process.nextTick(function(){A.emit("error",V)})}"responseType"in B&&(B.responseType=A._mode),"withCredentials"in B&&(B.withCredentials=!!P.withCredentials),"text"===A._mode&&"overrideMimeType"in B&&B.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in P&&(B.timeout=P.requestTimeout,B.ontimeout=function(){A.emit("requestTimeout")}),L.forEach(function(V){B.setRequestHeader(V[0],V[1])}),A._response=null,B.onreadystatechange=function(){switch(B.readyState){case m.LOADING:case m.DONE:A._onXHRProgress()}},"moz-chunked-arraybuffer"===A._mode&&(B.onprogress=function(){A._onXHRProgress()}),B.onerror=function(){A._destroyed||(A._resetTimers(!0),A.emit("error",new Error("XHR error")))};try{B.send(T)}catch(V){return void process.nextTick(function(){A.emit("error",V)})}}}},b.prototype._onXHRProgress=function(){var A=this;A._resetTimers(!1),function S(A){try{var P=A.status;return null!==P&&0!==P}catch{return!1}}(A._xhr)&&!A._destroyed&&(A._response||A._connect(),A._response._onXHRProgress(A._resetTimers.bind(A)))},b.prototype._connect=function(){var A=this;A._destroyed||(A._response=new l(A._xhr,A._fetchResponse,A._mode,A._resetTimers.bind(A)),A._response.on("error",function(P){A.emit("error",P)}),A.emit("response",A._response))},b.prototype._write=function(A,P,x){this._body.push(A),x()},b.prototype._resetTimers=function(A){var P=this;global.clearTimeout(P._socketTimer),P._socketTimer=null,A?(global.clearTimeout(P._fetchTimer),P._fetchTimer=null):P._socketTimeout&&(P._socketTimer=global.setTimeout(function(){P.emit("timeout")},P._socketTimeout))},b.prototype.abort=b.prototype.destroy=function(A){var P=this;P._destroyed=!0,P._resetTimers(!0),P._response&&(P._response._destroyed=!0),P._xhr?P._xhr.abort():P._fetchAbortController&&P._fetchAbortController.abort(),A&&P.emit("error",A)},b.prototype.end=function(A,P,x){"function"==typeof A&&(x=A,A=void 0),E.Writable.prototype.end.call(this,A,P,x)},b.prototype.setTimeout=function(A,P){var x=this;P&&x.once("timeout",P),x._socketTimeout=A,x._resetTimers(!1)},b.prototype.flushHeaders=function(){},b.prototype.setNoDelay=function(){},b.prototype.setSocketKeepAlive=function(){};var _=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},62359:(ne,s,p)=>{var h=p(57976),M=p(83894),w=p(65685),E=s.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=s.IncomingMessage=function(m,y,b,S){var _=this;if(w.Readable.call(_),_._mode=b,_.headers={},_.rawHeaders=[],_.trailers={},_.rawTrailers=[],_.on("end",function(){process.nextTick(function(){_.emit("close")})}),"fetch"===b){let j=function(){P.read().then(function(B){if(!_._destroyed){if(S(B.done),B.done)return void _.push(null);_.push(Buffer.from(B.value)),j()}}).catch(function(B){S(!0),_._destroyed||_.emit("error",B)})};if(_._fetchResponse=y,_.url=y.url,_.statusCode=y.status,_.statusMessage=y.statusText,y.headers.forEach(function(B,V){_.headers[V.toLowerCase()]=B,_.rawHeaders.push(V,B)}),h.writableStream){var A=new WritableStream({write:function(B){return S(!1),new Promise(function(V,G){_._destroyed?G():_.push(Buffer.from(B))?V():_._resumeFetch=V})},close:function(){S(!0),_._destroyed||_.push(null)},abort:function(B){S(!0),_._destroyed||_.emit("error",B)}});try{return void y.body.pipeTo(A).catch(function(B){S(!0),_._destroyed||_.emit("error",B)})}catch{}}var P=y.body.getReader();j()}else{if(_._xhr=m,_._pos=0,_.url=m.responseURL,_.statusCode=m.status,_.statusMessage=m.statusText,m.getAllResponseHeaders().split(/\r?\n/).forEach(function(j){var B=j.match(/^([^:]+):\s*(.*)/);if(B){var V=B[1].toLowerCase();"set-cookie"===V?(void 0===_.headers[V]&&(_.headers[V]=[]),_.headers[V].push(B[2])):void 0!==_.headers[V]?_.headers[V]+=", "+B[2]:_.headers[V]=B[2],_.rawHeaders.push(B[1],B[2])}}),_._charset="x-user-defined",!h.overrideMimeType){var T=_.rawHeaders["mime-type"];if(T){var L=T.match(/;\s*charset=([^;])(;|$)/);L&&(_._charset=L[1].toLowerCase())}_._charset||(_._charset="utf-8")}}};M(l,w.Readable),l.prototype._read=function(){var y=this._resumeFetch;y&&(this._resumeFetch=null,y())},l.prototype._onXHRProgress=function(m){var y=this,b=y._xhr,S=null;switch(y._mode){case"text":if((S=b.responseText).length>y._pos){var _=S.substr(y._pos);if("x-user-defined"===y._charset){for(var A=Buffer.alloc(_.length),P=0;P<_.length;P++)A[P]=255&_.charCodeAt(P);y.push(A)}else y.push(_,y._charset);y._pos=S.length}break;case"arraybuffer":if(b.readyState!==E.DONE||!b.response)break;S=b.response,y.push(Buffer.from(new Uint8Array(S)));break;case"moz-chunked-arraybuffer":if(S=b.response,b.readyState!==E.LOADING||!S)break;y.push(Buffer.from(new Uint8Array(S)));break;case"ms-stream":if(S=b.response,b.readyState!==E.LOADING)break;var x=new global.MSStreamReader;x.onprogress=function(){x.result.byteLength>y._pos&&(y.push(Buffer.from(new Uint8Array(x.result.slice(y._pos)))),y._pos=x.result.byteLength)},x.onload=function(){m(!0),y.push(null)},x.readAsArrayBuffer(S)}y._xhr.readyState===E.DONE&&"ms-stream"!==y._mode&&(m(!0),y.push(null))}},78629:ne=>{ne.exports=function p(){for(var h={},M=0;M{"use strict";ne.exports=s=>encodeURIComponent(s).replace(/[!'()*]/g,p=>`%${p.charCodeAt(0).toString(16).toUpperCase()}`)},77826:(ne,s)=>{var p=s.range=function(E){return null==E?{}:"string"==typeof p?{min:p,max:p+"\xff"}:E},M=(s.prefix=function(E,l,m){var y={};return m=m||"\xff",(E=s.range(E))instanceof RegExp||"function"==typeof E?(y.min=l,y.max=l+m,y.inner=function(b){var S=b.substring(l.length);return E.test?E.test(S):E(S)}):"object"==typeof E&&(y.min=l+(E.min||E.start||""),y.max=l+(E.max||E.end||m||"~"),y.reverse=!!E.reverse),y},s.checker=function(E){return E||(E={}),"string"==typeof E?function(l){return 0==l.indexOf(E)}:E instanceof RegExp?function(l){return E.test(l)}:"object"==typeof E?function(l){var m=E.min||E.start,y=E.max||E.end;return l=String(l),(!m||l>=m)&&(!y||l<=y)&&(!E.inner||(E.inner.test?E.inner.test(l):E.inner(l)))}:"function"==typeof E?E:void 0});s.satisfies=function(E,l){return M(l)(E)}},15453:(ne,s,p)=>{var h=p(93172).Buffer,M=h.isEncoding||function(b){switch(b&&b.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}};var E=s.s=function(b){switch(this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,""),function w(b){if(b&&!M(b))throw new Error("Unknown encoding: "+b)}(b),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=m;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=y;break;default:return void(this.write=l)}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};function l(b){return b.toString(this.encoding)}function m(b){this.charReceived=b.length%2,this.charLength=this.charReceived?2:0}function y(b){this.charReceived=b.length%3,this.charLength=this.charReceived?3:0}E.prototype.write=function(b){for(var S="";this.charLength;){var _=b.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;if(b.copy(this.charBuffer,this.charReceived,0,_),this.charReceived+=_,this.charReceived=55296&&P<=56319)){if(this.charReceived=this.charLength=0,0===b.length)return S;break}this.charLength+=this.surrogateSize,S=""}this.detectIncompleteChar(b);var A=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,A),A-=this.charReceived);var P;A=(S+=b.toString(this.encoding,0,A)).length-1;if((P=S.charCodeAt(A))>=55296&&P<=56319){var x=this.surrogateSize;return this.charLength+=x,this.charReceived+=x,this.charBuffer.copy(this.charBuffer,x,0,x),b.copy(this.charBuffer,0,0,x),S.substring(0,A)}return S},E.prototype.detectIncompleteChar=function(b){for(var S=b.length>=3?3:b.length;S>0;S--){var _=b[b.length-S];if(1==S&&_>>5==6){this.charLength=2;break}if(S<=2&&_>>4==14){this.charLength=3;break}if(S<=3&&_>>3==30){this.charLength=4;break}}this.charReceived=S},E.prototype.end=function(b){var S="";if(b&&b.length&&(S=this.write(b)),this.charReceived){var _=this.charReceived,A=this.charBuffer,P=this.encoding;S+=A.slice(0,_).toString(P)}return S}},43675:ne=>{ne.exports=function(){var s=document.getSelection();if(!s.rangeCount)return function(){};for(var p=document.activeElement,h=[],M=0;M{"use strict";ne.exports=function s(p){return p.split(" ").map(function(h){return h.slice(0,1).toUpperCase()+h.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}},47768:function(ne){!function(s,p){"use strict";ne.exports?ne.exports=p():(s.nacl||(s.nacl={}),s.nacl.util=p())}(this,function(){"use strict";var s={};function p(h){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(h))throw new TypeError("invalid encoding")}return s.decodeUTF8=function(h){if("string"!=typeof h)throw new TypeError("expected string");var M,w=unescape(encodeURIComponent(h)),E=new Uint8Array(w.length);for(M=0;M"u"?typeof Buffer.from<"u"?(s.encodeBase64=function(h){return Buffer.from(h).toString("base64")},s.decodeBase64=function(h){return p(h),new Uint8Array(Array.prototype.slice.call(Buffer.from(h,"base64"),0))}):(s.encodeBase64=function(h){return new Buffer(h).toString("base64")},s.decodeBase64=function(h){return p(h),new Uint8Array(Array.prototype.slice.call(new Buffer(h,"base64"),0))}):(s.encodeBase64=function(h){var M,w=[],E=h.length;for(M=0;M{!function(h){"use strict";var M=function(_e){var Ee,Me=new Float64Array(16);if(_e)for(Ee=0;Ee<_e.length;Ee++)Me[Ee]=_e[Ee];return Me},w=function(){throw new Error("no PRNG")},E=new Uint8Array(16),l=new Uint8Array(32);l[0]=9;var m=M(),y=M([1]),b=M([56129,1]),S=M([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),_=M([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),A=M([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),P=M([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),x=M([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function T(_e,Ee,Me,me){_e[Ee]=Me>>24&255,_e[Ee+1]=Me>>16&255,_e[Ee+2]=Me>>8&255,_e[Ee+3]=255&Me,_e[Ee+4]=me>>24&255,_e[Ee+5]=me>>16&255,_e[Ee+6]=me>>8&255,_e[Ee+7]=255&me}function L(_e,Ee,Me,me,Oe){var Ke,it=0;for(Ke=0;Ke>>8)-1}function N(_e,Ee,Me,me){return L(_e,Ee,Me,me,16)}function j(_e,Ee,Me,me){return L(_e,Ee,Me,me,32)}function G(_e,Ee,Me,me){!function B(_e,Ee,Me,me){for(var st,Oe=255&me[0]|(255&me[1])<<8|(255&me[2])<<16|(255&me[3])<<24,Ke=255&Me[0]|(255&Me[1])<<8|(255&Me[2])<<16|(255&Me[3])<<24,it=255&Me[4]|(255&Me[5])<<8|(255&Me[6])<<16|(255&Me[7])<<24,Ye=255&Me[8]|(255&Me[9])<<8|(255&Me[10])<<16|(255&Me[11])<<24,qe=255&Me[12]|(255&Me[13])<<8|(255&Me[14])<<16|(255&Me[15])<<24,Bt=255&me[4]|(255&me[5])<<8|(255&me[6])<<16|(255&me[7])<<24,It=255&Ee[0]|(255&Ee[1])<<8|(255&Ee[2])<<16|(255&Ee[3])<<24,kt=255&Ee[4]|(255&Ee[5])<<8|(255&Ee[6])<<16|(255&Ee[7])<<24,Ot=255&Ee[8]|(255&Ee[9])<<8|(255&Ee[10])<<16|(255&Ee[11])<<24,Nt=255&Ee[12]|(255&Ee[13])<<8|(255&Ee[14])<<16|(255&Ee[15])<<24,Lt=255&me[8]|(255&me[9])<<8|(255&me[10])<<16|(255&me[11])<<24,nn=255&Me[16]|(255&Me[17])<<8|(255&Me[18])<<16|(255&Me[19])<<24,Yt=255&Me[20]|(255&Me[21])<<8|(255&Me[22])<<16|(255&Me[23])<<24,gn=255&Me[24]|(255&Me[25])<<8|(255&Me[26])<<16|(255&Me[27])<<24,an=255&Me[28]|(255&Me[29])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|0,cn=cn+Ke|0,Jt=Jt+it|0,Zt=Zt+Ye|0,fn=fn+qe|0,Qt=Qt+Bt|0,Dt=Dt+It|0,Mt=Mt+kt|0,Xt=Xt+Ot|0,Ft=Ft+Nt|0,jt=jt+Lt|0,on=on+nn|0,On=On+Yt|0,Kn=Kn+gn|0,jn=jn+an|0,Hn=Hn+tn|0,_e[0]=Ut>>>0&255,_e[1]=Ut>>>8&255,_e[2]=Ut>>>16&255,_e[3]=Ut>>>24&255,_e[4]=cn>>>0&255,_e[5]=cn>>>8&255,_e[6]=cn>>>16&255,_e[7]=cn>>>24&255,_e[8]=Jt>>>0&255,_e[9]=Jt>>>8&255,_e[10]=Jt>>>16&255,_e[11]=Jt>>>24&255,_e[12]=Zt>>>0&255,_e[13]=Zt>>>8&255,_e[14]=Zt>>>16&255,_e[15]=Zt>>>24&255,_e[16]=fn>>>0&255,_e[17]=fn>>>8&255,_e[18]=fn>>>16&255,_e[19]=fn>>>24&255,_e[20]=Qt>>>0&255,_e[21]=Qt>>>8&255,_e[22]=Qt>>>16&255,_e[23]=Qt>>>24&255,_e[24]=Dt>>>0&255,_e[25]=Dt>>>8&255,_e[26]=Dt>>>16&255,_e[27]=Dt>>>24&255,_e[28]=Mt>>>0&255,_e[29]=Mt>>>8&255,_e[30]=Mt>>>16&255,_e[31]=Mt>>>24&255,_e[32]=Xt>>>0&255,_e[33]=Xt>>>8&255,_e[34]=Xt>>>16&255,_e[35]=Xt>>>24&255,_e[36]=Ft>>>0&255,_e[37]=Ft>>>8&255,_e[38]=Ft>>>16&255,_e[39]=Ft>>>24&255,_e[40]=jt>>>0&255,_e[41]=jt>>>8&255,_e[42]=jt>>>16&255,_e[43]=jt>>>24&255,_e[44]=on>>>0&255,_e[45]=on>>>8&255,_e[46]=on>>>16&255,_e[47]=on>>>24&255,_e[48]=On>>>0&255,_e[49]=On>>>8&255,_e[50]=On>>>16&255,_e[51]=On>>>24&255,_e[52]=Kn>>>0&255,_e[53]=Kn>>>8&255,_e[54]=Kn>>>16&255,_e[55]=Kn>>>24&255,_e[56]=jn>>>0&255,_e[57]=jn>>>8&255,_e[58]=jn>>>16&255,_e[59]=jn>>>24&255,_e[60]=Hn>>>0&255,_e[61]=Hn>>>8&255,_e[62]=Hn>>>16&255,_e[63]=Hn>>>24&255}(_e,Ee,Me,me)}function W(_e,Ee,Me,me){!function V(_e,Ee,Me,me){for(var st,Ut=255&me[0]|(255&me[1])<<8|(255&me[2])<<16|(255&me[3])<<24,cn=255&Me[0]|(255&Me[1])<<8|(255&Me[2])<<16|(255&Me[3])<<24,Jt=255&Me[4]|(255&Me[5])<<8|(255&Me[6])<<16|(255&Me[7])<<24,Zt=255&Me[8]|(255&Me[9])<<8|(255&Me[10])<<16|(255&Me[11])<<24,fn=255&Me[12]|(255&Me[13])<<8|(255&Me[14])<<16|(255&Me[15])<<24,Qt=255&me[4]|(255&me[5])<<8|(255&me[6])<<16|(255&me[7])<<24,Dt=255&Ee[0]|(255&Ee[1])<<8|(255&Ee[2])<<16|(255&Ee[3])<<24,Mt=255&Ee[4]|(255&Ee[5])<<8|(255&Ee[6])<<16|(255&Ee[7])<<24,Xt=255&Ee[8]|(255&Ee[9])<<8|(255&Ee[10])<<16|(255&Ee[11])<<24,Ft=255&Ee[12]|(255&Ee[13])<<8|(255&Ee[14])<<16|(255&Ee[15])<<24,jt=255&me[8]|(255&me[9])<<8|(255&me[10])<<16|(255&me[11])<<24,on=255&Me[16]|(255&Me[17])<<8|(255&Me[18])<<16|(255&Me[19])<<24,On=255&Me[20]|(255&Me[21])<<8|(255&Me[22])<<16|(255&Me[23])<<24,Kn=255&Me[24]|(255&Me[25])<<8|(255&Me[26])<<16|(255&Me[27])<<24,jn=255&Me[28]|(255&Me[29])<<8|(255&Me[30])<<16|(255&Me[31])<<24,Hn=255&me[12]|(255&me[13])<<8|(255&me[14])<<16|(255&me[15])<<24,Qn=0;Qn<20;Qn+=2)Ut^=(st=(On^=(st=(Xt^=(st=(fn^=(st=Ut+On|0)<<7|st>>>25)+Ut|0)<<9|st>>>23)+fn|0)<<13|st>>>19)+Xt|0)<<18|st>>>14,Qt^=(st=(cn^=(st=(Kn^=(st=(Ft^=(st=Qt+cn|0)<<7|st>>>25)+Qt|0)<<9|st>>>23)+Ft|0)<<13|st>>>19)+Kn|0)<<18|st>>>14,jt^=(st=(Dt^=(st=(Jt^=(st=(jn^=(st=jt+Dt|0)<<7|st>>>25)+jt|0)<<9|st>>>23)+jn|0)<<13|st>>>19)+Jt|0)<<18|st>>>14,Hn^=(st=(on^=(st=(Mt^=(st=(Zt^=(st=Hn+on|0)<<7|st>>>25)+Hn|0)<<9|st>>>23)+Zt|0)<<13|st>>>19)+Mt|0)<<18|st>>>14,Ut^=(st=(Zt^=(st=(Jt^=(st=(cn^=(st=Ut+Zt|0)<<7|st>>>25)+Ut|0)<<9|st>>>23)+cn|0)<<13|st>>>19)+Jt|0)<<18|st>>>14,Qt^=(st=(fn^=(st=(Mt^=(st=(Dt^=(st=Qt+fn|0)<<7|st>>>25)+Qt|0)<<9|st>>>23)+Dt|0)<<13|st>>>19)+Mt|0)<<18|st>>>14,jt^=(st=(Ft^=(st=(Xt^=(st=(on^=(st=jt+Ft|0)<<7|st>>>25)+jt|0)<<9|st>>>23)+on|0)<<13|st>>>19)+Xt|0)<<18|st>>>14,Hn^=(st=(jn^=(st=(Kn^=(st=(On^=(st=Hn+jn|0)<<7|st>>>25)+Hn|0)<<9|st>>>23)+On|0)<<13|st>>>19)+Kn|0)<<18|st>>>14;_e[0]=Ut>>>0&255,_e[1]=Ut>>>8&255,_e[2]=Ut>>>16&255,_e[3]=Ut>>>24&255,_e[4]=Qt>>>0&255,_e[5]=Qt>>>8&255,_e[6]=Qt>>>16&255,_e[7]=Qt>>>24&255,_e[8]=jt>>>0&255,_e[9]=jt>>>8&255,_e[10]=jt>>>16&255,_e[11]=jt>>>24&255,_e[12]=Hn>>>0&255,_e[13]=Hn>>>8&255,_e[14]=Hn>>>16&255,_e[15]=Hn>>>24&255,_e[16]=Dt>>>0&255,_e[17]=Dt>>>8&255,_e[18]=Dt>>>16&255,_e[19]=Dt>>>24&255,_e[20]=Mt>>>0&255,_e[21]=Mt>>>8&255,_e[22]=Mt>>>16&255,_e[23]=Mt>>>24&255,_e[24]=Xt>>>0&255,_e[25]=Xt>>>8&255,_e[26]=Xt>>>16&255,_e[27]=Xt>>>24&255,_e[28]=Ft>>>0&255,_e[29]=Ft>>>8&255,_e[30]=Ft>>>16&255,_e[31]=Ft>>>24&255}(_e,Ee,Me,me)}var Q=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function q(_e,Ee,Me,me,Oe,Ke,it){var Bt,It,Ye=new Uint8Array(16),qe=new Uint8Array(64);for(It=0;It<16;It++)Ye[It]=0;for(It=0;It<8;It++)Ye[It]=Ke[It];for(;Oe>=64;){for(G(qe,Ye,it,Q),It=0;It<64;It++)_e[Ee+It]=Me[me+It]^qe[It];for(Bt=1,It=8;It<16;It++)Bt=Bt+(255&Ye[It])|0,Ye[It]=255&Bt,Bt>>>=8;Oe-=64,Ee+=64,me+=64}if(Oe>0)for(G(qe,Ye,it,Q),It=0;It=64;){for(G(it,Ke,Oe,Q),qe=0;qe<64;qe++)_e[Ee+qe]=it[qe];for(Ye=1,qe=8;qe<16;qe++)Ye=Ye+(255&Ke[qe])|0,Ke[qe]=255&Ye,Ye>>>=8;Me-=64,Ee+=64}if(Me>0)for(G(it,Ke,Oe,Q),qe=0;qe>>13|Me<<3),me=255&_e[4]|(255&_e[5])<<8,this.r[2]=7939&(Me>>>10|me<<6),Oe=255&_e[6]|(255&_e[7])<<8,this.r[3]=8191&(me>>>7|Oe<<9),Ke=255&_e[8]|(255&_e[9])<<8,this.r[4]=255&(Oe>>>4|Ke<<12),this.r[5]=Ke>>>1&8190,it=255&_e[10]|(255&_e[11])<<8,this.r[6]=8191&(Ke>>>14|it<<2),Ye=255&_e[12]|(255&_e[13])<<8,this.r[7]=8065&(it>>>11|Ye<<5),qe=255&_e[14]|(255&_e[15])<<8,this.r[8]=8191&(Ye>>>8|qe<<8),this.r[9]=qe>>>5&127,this.pad[0]=255&_e[16]|(255&_e[17])<<8,this.pad[1]=255&_e[18]|(255&_e[19])<<8,this.pad[2]=255&_e[20]|(255&_e[21])<<8,this.pad[3]=255&_e[22]|(255&_e[23])<<8,this.pad[4]=255&_e[24]|(255&_e[25])<<8,this.pad[5]=255&_e[26]|(255&_e[27])<<8,this.pad[6]=255&_e[28]|(255&_e[29])<<8,this.pad[7]=255&_e[30]|(255&_e[31])<<8};function o(_e,Ee,Me,me,Oe,Ke){var it=new I(Ke);return it.update(Me,me,Oe),it.finish(_e,Ee),0}function a(_e,Ee,Me,me,Oe,Ke){var it=new Uint8Array(16);return o(it,0,Me,me,Oe,Ke),N(_e,Ee,it,0)}function d(_e,Ee,Me,me,Oe){var Ke;if(Me<32)return-1;for(ee(_e,0,Ee,0,Me,me,Oe),o(_e,16,_e,32,Me-32,_e),Ke=0;Ke<16;Ke++)_e[Ke]=0;return 0}function g(_e,Ee,Me,me,Oe){var Ke,it=new Uint8Array(32);if(Me<32||(Z(it,0,32,me,Oe),0!==a(Ee,16,Ee,32,Me-32,it)))return-1;for(ee(_e,0,Ee,0,Me,me,Oe),Ke=0;Ke<32;Ke++)_e[Ke]=0;return 0}function D(_e,Ee){var Me;for(Me=0;Me<16;Me++)_e[Me]=0|Ee[Me]}function F(_e){var Ee,Me,me=1;for(Ee=0;Ee<16;Ee++)Me=_e[Ee]+me+65535,me=Math.floor(Me/65536),_e[Ee]=Me-65536*me;_e[0]+=me-1+37*(me-1)}function z(_e,Ee,Me){for(var me,Oe=~(Me-1),Ke=0;Ke<16;Ke++)me=Oe&(_e[Ke]^Ee[Ke]),_e[Ke]^=me,Ee[Ke]^=me}function C(_e,Ee){var Me,me,Oe,Ke=M(),it=M();for(Me=0;Me<16;Me++)it[Me]=Ee[Me];for(F(it),F(it),F(it),me=0;me<2;me++){for(Ke[0]=it[0]-65517,Me=1;Me<15;Me++)Ke[Me]=it[Me]-65535-(Ke[Me-1]>>16&1),Ke[Me-1]&=65535;Ke[15]=it[15]-32767-(Ke[14]>>16&1),Oe=Ke[15]>>16&1,Ke[14]&=65535,z(it,Ke,1-Oe)}for(Me=0;Me<16;Me++)_e[2*Me]=255&it[Me],_e[2*Me+1]=it[Me]>>8}function f(_e,Ee){var Me=new Uint8Array(32),me=new Uint8Array(32);return C(Me,_e),C(me,Ee),j(Me,0,me,0)}function k(_e){var Ee=new Uint8Array(32);return C(Ee,_e),1&Ee[0]}function se(_e,Ee){var Me;for(Me=0;Me<16;Me++)_e[Me]=Ee[2*Me]+(Ee[2*Me+1]<<8);_e[15]&=32767}function te(_e,Ee,Me){for(var me=0;me<16;me++)_e[me]=Ee[me]+Me[me]}function oe(_e,Ee,Me){for(var me=0;me<16;me++)_e[me]=Ee[me]-Me[me]}function de(_e,Ee,Me){var me,Oe,Ke=0,it=0,Ye=0,qe=0,Bt=0,It=0,kt=0,Ot=0,Nt=0,Lt=0,nn=0,Yt=0,gn=0,an=0,tn=0,Ut=0,cn=0,Jt=0,Zt=0,fn=0,Qt=0,Dt=0,Mt=0,Xt=0,Ft=0,jt=0,on=0,On=0,Kn=0,jn=0,Hn=0,st=Me[0],Qn=Me[1],cr=Me[2],Xn=Me[3],Zn=Me[4],qn=Me[5],nr=Me[6],wr=Me[7],dr=Me[8],Ln=Me[9],Cr=Me[10],Sr=Me[11],Br=Me[12],Wr=Me[13],bi=Me[14],Ir=Me[15];Ke+=(me=Ee[0])*st,it+=me*Qn,Ye+=me*cr,qe+=me*Xn,Bt+=me*Zn,It+=me*qn,kt+=me*nr,Ot+=me*wr,Nt+=me*dr,Lt+=me*Ln,nn+=me*Cr,Yt+=me*Sr,gn+=me*Br,an+=me*Wr,tn+=me*bi,Ut+=me*Ir,it+=(me=Ee[1])*st,Ye+=me*Qn,qe+=me*cr,Bt+=me*Xn,It+=me*Zn,kt+=me*qn,Ot+=me*nr,Nt+=me*wr,Lt+=me*dr,nn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,Kn+=me*Ir,tn+=(me=Ee[14])*st,Ut+=me*Qn,cn+=me*cr,Jt+=me*Xn,Zt+=me*Zn,fn+=me*qn,Qt+=me*nr,Dt+=me*wr,Mt+=me*dr,Xt+=me*Ln,Ft+=me*Cr,jt+=me*Sr,on+=me*Br,On+=me*Wr,Kn+=me*bi,jn+=me*Ir,Ut+=(me=Ee[15])*st,it+=38*(Jt+=me*cr),Ye+=38*(Zt+=me*Xn),qe+=38*(fn+=me*Zn),Bt+=38*(Qt+=me*qn),It+=38*(Dt+=me*nr),kt+=38*(Mt+=me*wr),Ot+=38*(Xt+=me*dr),Nt+=38*(Ft+=me*Ln),Lt+=38*(jt+=me*Cr),nn+=38*(on+=me*Sr),Yt+=38*(On+=me*Br),gn+=38*(Kn+=me*Wr),an+=38*(jn+=me*bi),tn+=38*(Hn+=me*Ir),Ke=(me=(Ke+=38*(cn+=me*Qn))+(Oe=1)+65535)-65536*(Oe=Math.floor(me/65536)),it=(me=it+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ye=(me=Ye+Oe+65535)-65536*(Oe=Math.floor(me/65536)),qe=(me=qe+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Bt=(me=Bt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),It=(me=It+Oe+65535)-65536*(Oe=Math.floor(me/65536)),kt=(me=kt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ot=(me=Ot+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Nt=(me=Nt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Lt=(me=Lt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),nn=(me=nn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Yt=(me=Yt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),gn=(me=gn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),an=(me=an+Oe+65535)-65536*(Oe=Math.floor(me/65536)),tn=(me=tn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ut=(me=Ut+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ke=(me=(Ke+=Oe-1+37*(Oe-1))+(Oe=1)+65535)-65536*(Oe=Math.floor(me/65536)),it=(me=it+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ye=(me=Ye+Oe+65535)-65536*(Oe=Math.floor(me/65536)),qe=(me=qe+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Bt=(me=Bt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),It=(me=It+Oe+65535)-65536*(Oe=Math.floor(me/65536)),kt=(me=kt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ot=(me=Ot+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Nt=(me=Nt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Lt=(me=Lt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),nn=(me=nn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Yt=(me=Yt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),gn=(me=gn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),an=(me=an+Oe+65535)-65536*(Oe=Math.floor(me/65536)),tn=(me=tn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ut=(me=Ut+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ke+=Oe-1+37*(Oe-1),_e[0]=Ke,_e[1]=it,_e[2]=Ye,_e[3]=qe,_e[4]=Bt,_e[5]=It,_e[6]=kt,_e[7]=Ot,_e[8]=Nt,_e[9]=Lt,_e[10]=nn,_e[11]=Yt,_e[12]=gn,_e[13]=an,_e[14]=tn,_e[15]=Ut}function Ie(_e,Ee){de(_e,Ee,Ee)}function ye(_e,Ee){var me,Me=M();for(me=0;me<16;me++)Me[me]=Ee[me];for(me=253;me>=0;me--)Ie(Me,Me),2!==me&&4!==me&&de(Me,Me,Ee);for(me=0;me<16;me++)_e[me]=Me[me]}function ve(_e,Ee){var me,Me=M();for(me=0;me<16;me++)Me[me]=Ee[me];for(me=250;me>=0;me--)Ie(Me,Me),1!==me&&de(Me,Me,Ee);for(me=0;me<16;me++)_e[me]=Me[me]}function ae(_e,Ee,Me){var Ke,it,me=new Uint8Array(32),Oe=new Float64Array(80),Ye=M(),qe=M(),Bt=M(),It=M(),kt=M(),Ot=M();for(it=0;it<31;it++)me[it]=Ee[it];for(me[31]=127&Ee[31]|64,me[0]&=248,se(Oe,Me),it=0;it<16;it++)qe[it]=Oe[it],It[it]=Ye[it]=Bt[it]=0;for(Ye[0]=It[0]=1,it=254;it>=0;--it)z(Ye,qe,Ke=me[it>>>3]>>>(7&it)&1),z(Bt,It,Ke),te(kt,Ye,Bt),oe(Ye,Ye,Bt),te(Bt,qe,It),oe(qe,qe,It),Ie(It,kt),Ie(Ot,Ye),de(Ye,Bt,Ye),de(Bt,qe,kt),te(kt,Ye,Bt),oe(Ye,Ye,Bt),Ie(qe,Ye),oe(Bt,It,Ot),de(Ye,Bt,b),te(Ye,Ye,It),de(Bt,Bt,Ye),de(Ye,It,Ot),de(It,qe,Oe),Ie(qe,kt),z(Ye,qe,Ke),z(Bt,It,Ke);for(it=0;it<16;it++)Oe[it+16]=Ye[it],Oe[it+32]=Bt[it],Oe[it+48]=qe[it],Oe[it+64]=It[it];var Nt=Oe.subarray(32),Lt=Oe.subarray(16);return ye(Nt,Nt),de(Lt,Lt,Nt),C(_e,Lt),0}function fe(_e,Ee){return ae(_e,Ee,l)}function pe(_e,Ee){return w(Ee,32),fe(_e,Ee)}function Se(_e,Ee,Me){var me=new Uint8Array(32);return ae(me,Me,Ee),W(_e,E,me,Q)}I.prototype.blocks=function(_e,Ee,Me){for(var Oe,Ke,it,Ye,qe,Bt,It,kt,Ot,Nt,Lt,nn,Yt,gn,an,tn,Ut,cn,Jt,me=this.fin?0:2048,Zt=this.h[0],fn=this.h[1],Qt=this.h[2],Dt=this.h[3],Mt=this.h[4],Xt=this.h[5],Ft=this.h[6],jt=this.h[7],on=this.h[8],On=this.h[9],Kn=this.r[0],jn=this.r[1],Hn=this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*Hn,Jt+=on*jn,Zt=Nt=8191&(Ot=(Ot=((Ot+=(Jt+=On*Kn)>>>13)<<2)+Ot|0)+(Nt&=8191)|0),fn=Lt+=Ot>>>=13,Qt=nn&=8191,Dt=Yt&=8191,Mt=gn&=8191,Xt=an&=8191,Ft=tn&=8191,jt=Ut&=8191,on=cn&=8191,On=Jt&=8191,Ee+=16,Me-=16;this.h[0]=Zt,this.h[1]=fn,this.h[2]=Qt,this.h[3]=Dt,this.h[4]=Mt,this.h[5]=Xt,this.h[6]=Ft,this.h[7]=jt,this.h[8]=on,this.h[9]=On},I.prototype.finish=function(_e,Ee){var me,Oe,Ke,it,Me=new Uint16Array(10);if(this.leftover){for(it=this.leftover,this.buffer[it++]=1;it<16;it++)this.buffer[it]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(me=this.h[1]>>>13,this.h[1]&=8191,it=2;it<10;it++)this.h[it]+=me,me=this.h[it]>>>13,this.h[it]&=8191;for(this.h[0]+=5*me,me=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=me,me=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=me,Me[0]=this.h[0]+5,me=Me[0]>>>13,Me[0]&=8191,it=1;it<10;it++)Me[it]=this.h[it]+me,me=Me[it]>>>13,Me[it]&=8191;for(Me[9]-=8192,Oe=(1^me)-1,it=0;it<10;it++)Me[it]&=Oe;for(Oe=~Oe,it=0;it<10;it++)this.h[it]=this.h[it]&Oe|Me[it];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),Ke=this.h[0]+this.pad[0],this.h[0]=65535&Ke,it=1;it<8;it++)Ke=(this.h[it]+this.pad[it]|0)+(Ke>>>16)|0,this.h[it]=65535&Ke;_e[Ee+0]=this.h[0]>>>0&255,_e[Ee+1]=this.h[0]>>>8&255,_e[Ee+2]=this.h[1]>>>0&255,_e[Ee+3]=this.h[1]>>>8&255,_e[Ee+4]=this.h[2]>>>0&255,_e[Ee+5]=this.h[2]>>>8&255,_e[Ee+6]=this.h[3]>>>0&255,_e[Ee+7]=this.h[3]>>>8&255,_e[Ee+8]=this.h[4]>>>0&255,_e[Ee+9]=this.h[4]>>>8&255,_e[Ee+10]=this.h[5]>>>0&255,_e[Ee+11]=this.h[5]>>>8&255,_e[Ee+12]=this.h[6]>>>0&255,_e[Ee+13]=this.h[6]>>>8&255,_e[Ee+14]=this.h[7]>>>0&255,_e[Ee+15]=this.h[7]>>>8&255},I.prototype.update=function(_e,Ee,Me){var me,Oe;if(this.leftover){for((Oe=16-this.leftover)>Me&&(Oe=Me),me=0;me=16&&(Oe=Me-Me%16,this.blocks(_e,Ee,Oe),Ee+=Oe,Me-=Oe),Me){for(me=0;me=128;){for(fn=0;fn<16;fn++)Qt=8*fn+Br,Oe[fn]=Me[Qt+0]<<24|Me[Qt+1]<<16|Me[Qt+2]<<8|Me[Qt+3],Ke[fn]=Me[Qt+4]<<24|Me[Qt+5]<<16|Me[Qt+6]<<8|Me[Qt+7];for(fn=0;fn<80;fn++)if(it=On,Ye=Kn,qe=jn,Bt=Hn,It=st,kt=Qn,Ot=cr,Xn,Lt=Zn,nn=qn,Yt=nr,gn=wr,an=dr,tn=Ln,Ut=Cr,Sr,Xt=65535&(Mt=Sr),Ft=Mt>>>16,jt=65535&(Dt=Xn),on=Dt>>>16,Xt+=65535&(Mt=(dr>>>14|st<<18)^(dr>>>18|st<<14)^(st>>>9|dr<<23)),Ft+=Mt>>>16,jt+=65535&(Dt=(st>>>14|dr<<18)^(st>>>18|dr<<14)^(dr>>>9|st<<23)),on+=Dt>>>16,X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,Xt=65535&(Mt=wr),Ft=Mt>>>16,jt=65535&(Dt=Hn),on=Dt>>>16,Dt=_e[3],Ft+=(Mt=Ee[3])>>>16,jt+=65535&Dt,on+=Dt>>>16,on+=(jt+=(Ft+=(Xt+=65535&Mt)>>>16)>>>16)>>>16,_e[3]=Hn=65535&jt|on<<16,Ee[3]=wr=65535&Xt|Ft<<16,Xt=65535&(Mt=dr),Ft=Mt>>>16,jt=65535&(Dt=st),on=Dt>>>16,Dt=_e[4],Ft+=(Mt=Ee[4])>>>16,jt+=65535&Dt,on+=Dt>>>16,on+=(jt+=(Ft+=(Xt+=65535&Mt)>>>16)>>>16)>>>16,_e[4]=st=65535&jt|on<<16,Ee[4]=dr=65535&Xt|Ft<<16,Xt=65535&(Mt=Ln),Ft=Mt>>>16,jt=65535&(Dt=Qn),on=Dt>>>16,Dt=_e[5],Ft+=(Mt=Ee[5])>>>16,jt+=65535&Dt,on+=Dt>>>16,on+=(jt+=(Ft+=(Xt+=65535&Mt)>>>16)>>>16)>>>16,_e[5]=Qn=65535&jt|on<<16,Ee[5]=Ln=65535&Xt|Ft<<16,Xt=65535&(Mt=Cr),Ft=Mt>>>16,jt=65535&(Dt=cr),on=Dt>>>16,Dt=_e[6],Ft+=(Mt=Ee[6])>>>16,jt+=65535&Dt,on+=Dt>>>16,on+=(jt+=(Ft+=(Xt+=65535&Mt)>>>16)>>>16)>>>16,_e[6]=cr=65535&jt|on<<16,Ee[6]=Cr=65535&Xt|Ft<<16,Xt=65535&(Mt=Sr),Ft=Mt>>>16,jt=65535&(Dt=Xn),on=Dt>>>16,Dt=_e[7],Ft+=(Mt=Ee[7])>>>16,jt+=65535&Dt,on+=Dt>>>16,on+=(jt+=(Ft+=(Xt+=65535&Mt)>>>16)>>>16)>>>16,_e[7]=Xn=65535&jt|on<<16,Ee[7]=Sr=65535&Xt|Ft<<16,Br+=128,me-=128}return me}function He(_e,Ee,Me){var it,me=new Int32Array(8),Oe=new Int32Array(8),Ke=new Uint8Array(256),Ye=Me;for(me[0]=1779033703,me[1]=3144134277,me[2]=1013904242,me[3]=2773480762,me[4]=1359893119,me[5]=2600822924,me[6]=528734635,me[7]=1541459225,Oe[0]=4089235720,Oe[1]=2227873595,Oe[2]=4271175723,Oe[3]=1595750129,Oe[4]=2917565137,Oe[5]=725511199,Oe[6]=4215389547,Oe[7]=327033209,Ge(me,Oe,Ee,Me),Me%=128,it=0;it=0;--Oe)tt(_e,Ee,me=Me[Oe/8|0]>>(7&Oe)&1),Kt(Ee,_e),Kt(_e,_e),tt(_e,Ee,me)}function ot(_e,Ee){var Me=[M(),M(),M(),M()];D(Me[0],A),D(Me[1],P),D(Me[2],y),de(Me[3],A,P),Vt(_e,Me,Ee)}function at(_e,Ee,Me){var Ke,me=new Uint8Array(64),Oe=[M(),M(),M(),M()];for(Me||w(Ee,32),He(me,Ee,32),me[0]&=248,me[31]&=127,me[31]|=64,ot(Oe,me),nt(_e,Oe),Ke=0;Ke<32;Ke++)Ee[Ke+32]=_e[Ke];return 0}var Gt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Re(_e,Ee){var Me,me,Oe,Ke;for(me=63;me>=32;--me){for(Me=0,Oe=me-32,Ke=me-12;Oe>4)*Gt[Oe],Me=Ee[Oe]>>8,Ee[Oe]&=255;for(Oe=0;Oe<32;Oe++)Ee[Oe]-=Me*Gt[Oe];for(me=0;me<32;me++)Ee[me+1]+=Ee[me]>>8,_e[me]=255&Ee[me]}function Ae(_e){var Me,Ee=new Float64Array(64);for(Me=0;Me<64;Me++)Ee[Me]=_e[Me];for(Me=0;Me<64;Me++)_e[Me]=0;Re(_e,Ee)}function Te(_e,Ee,Me,me){var Ye,qe,Oe=new Uint8Array(64),Ke=new Uint8Array(64),it=new Uint8Array(64),Bt=new Float64Array(64),It=[M(),M(),M(),M()];He(Oe,me,32),Oe[0]&=248,Oe[31]&=127,Oe[31]|=64;var kt=Me+64;for(Ye=0;Ye>7&&oe(_e[0],m,_e[0]),de(_e[3],_e[0],_e[1]),0)}(qe,me))return-1;for(Oe=0;Oe=0},h.sign.keyPair=function(){var _e=new Uint8Array(32),Ee=new Uint8Array(64);return at(_e,Ee),{publicKey:_e,secretKey:Ee}},h.sign.keyPair.fromSecretKey=function(_e){if(yt(_e),64!==_e.length)throw new Error("bad secret key size");for(var Ee=new Uint8Array(32),Me=0;Me{ne.exports=function(s){return"function"==typeof Buffer._augment&&Buffer.TYPED_ARRAY_SUPPORT?Buffer._augment(s):new Buffer(s)}},69830:(ne,s)=>{var C,f,A,p=void 0,h=1e5,M=(C=Object.prototype.toString,f=Object.prototype.hasOwnProperty,{Class:function(k){return C.call(k).replace(/^\[object *|\]$/g,"")},HasProperty:function(k,se){return se in k},HasOwnProperty:function(k,se){return f.call(k,se)},IsCallable:function(k){return"function"==typeof k},ToInt32:function(k){return k>>0},ToUint32:function(k){return k>>>0}}),w=Math.LN2,E=Math.abs,l=Math.floor,m=Math.log,y=Math.min,b=Math.pow,S=Math.round;function _(C){if(P&&A){var k,f=P(C);for(k=0;k>k}function L(C,f){var k=32-f;return C<>>k}function N(C){return[255&C]}function j(C){return T(C[0],8)}function B(C){return[255&C]}function V(C){return L(C[0],8)}function G(C){return[(C=S(Number(C)))<0?0:C>255?255:255&C]}function W(C){return[C>>8&255,255&C]}function Q(C){return T(C[0]<<8|C[1],16)}function q(C){return[C>>8&255,255&C]}function J(C){return L(C[0]<<8|C[1],16)}function Z(C){return[C>>24&255,C>>16&255,C>>8&255,255&C]}function ee(C){return T(C[0]<<24|C[1]<<16|C[2]<<8|C[3],32)}function I(C){return[C>>24&255,C>>16&255,C>>8&255,255&C]}function o(C){return L(C[0]<<24|C[1]<<16|C[2]<<8|C[3],32)}function a(C,f,k){var te,oe,de,ye,ve,ae,fe,se=(1<.5||ce%2?ce+1:ce}for(C!=C?(oe=(1<=b(2,1-se)?(oe=y(l(m(C)/w),1023),(de=pe(C/b(2,oe)*b(2,k)))/b(2,k)>=2&&(oe+=1,de=1),oe>se?(oe=(1<>=1;return se.reverse(),Ie=se.join(""),ye=(1<0?ve*b(2,ae-ye)*(1+fe/b(2,k)):0!==fe?ve*b(2,-(ye-1))*(fe/b(2,k)):ve<0?-0:0}function g(C){return d(C,11,52)}function D(C){return a(C,11,52)}function F(C){return d(C,8,23)}function z(C){return a(C,8,23)}(function(){var C=function(Se){if((Se=M.ToInt32(Se))<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");var ce;for(this.byteLength=Se,this._bytes=[],this._bytes.length=Se,ce=0;cethis.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=M.ToUint32(lt),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(He=arguments[0],this.length=M.ToUint32(He.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new C(this.byteLength),this.byteOffset=0,Kt=0;Kth)throw new RangeError("Array too large for polyfill");var k;for(k=0;k=this.length)return p;var lt,Ge,Fe=[];for(lt=0,Ge=this.byteOffset+Ne*this.BYTES_PER_ELEMENT;lt=this.length)return p;var Ge,He,lt=this._pack(Fe);for(Ge=0,He=this.byteOffset+Ne*this.BYTES_PER_ELEMENT;Gethis.length)throw new RangeError("Offset plus length of array is out of range");if(ot=this.byteOffset+He*this.BYTES_PER_ELEMENT,at=lt.length*this.BYTES_PER_ELEMENT,lt.buffer===this.buffer){for(Gt=[],tt=0,nt=lt.byteOffset;ttthis.length)throw new RangeError("Offset plus length of array is out of range");for(tt=0;tttt?tt:He}Ne=M.ToInt32(Ne),Fe=M.ToInt32(Fe),arguments.length<1&&(Ne=0),arguments.length<2&&(Fe=this.length),Ne<0&&(Ne=this.length+Ne),Fe<0&&(Fe=this.length+Fe),Ne=lt(Ne,0,this.length);var Ge=(Fe=lt(Fe,0,this.length))-Ne;return Ge<0&&(Ge=0),new this.constructor(this.buffer,this.byteOffset+Ne*this.BYTES_PER_ELEMENT,Ge)},be}var se=k(1,N,j),te=k(1,B,V),oe=k(1,G,V),de=k(2,W,Q),Ie=k(2,q,J),ye=k(4,Z,ee),ve=k(4,I,o),ae=k(4,z,F),fe=k(8,D,g);s.iq=s.iq||se,s.U2=s.U2||te,s.we=s.we||oe,s.M2=s.M2||de,s.HA=s.HA||Ie,s.ZV=s.ZV||ye,s._R=s._R||ve,s.$L=s.$L||ae,s.I=s.I||fe})(),function(){function C(oe,de){return M.IsCallable(oe.get)?oe.get(de):oe[de]}var oe,f=(oe=new s.HA([4660]),18===C(new s.U2(oe.buffer),0)),k=function(de,Ie,ye){if(0===arguments.length)de=new s.eT(0);else if(!(de instanceof s.eT||"ArrayBuffer"===M.Class(de)))throw new TypeError("TypeError");if(this.buffer=de||new s.eT(0),this.byteOffset=M.ToUint32(Ie),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=M.ToUint32(ye),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");_(this)};function se(oe){return function(de,Ie){if((de=M.ToUint32(de))+oe.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");de+=this.byteOffset;var ae,ye=new s.U2(this.buffer,de,oe.BYTES_PER_ELEMENT),ve=[];for(ae=0;aethis.byteLength)throw new RangeError("Array index out of range");var pe,ve=new oe([Ie]),ae=new s.U2(ve.buffer),fe=[];for(pe=0;pe{ne.exports=p(62074)},46564:ne=>{ne.exports=function(p){var M,h=!1;return p instanceof Function||(h=!0,M=p,p=null),function(){return h||(h=!0,M=p.apply(this,arguments),p=null),M}}},25554:ne=>{ne.exports=function s(p,h,M){if(M||(M=[]),M.length{ne.exports={cache:p(46564),eachCombination:p(25554)}},75557:(ne,s,p)=>{"use strict";function h(M,w){return w=w||{},new Promise(function(E,l){var m=new XMLHttpRequest,y=[],b=[],S={},_=function(){return{ok:2==(m.status/100|0),statusText:m.statusText,status:m.status,url:m.responseURL,text:function(){return Promise.resolve(m.responseText)},json:function(){return Promise.resolve(m.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([m.response]))},clone:_,headers:{keys:function(){return y},entries:function(){return b},get:function(P){return S[P.toLowerCase()]},has:function(P){return P.toLowerCase()in S}}}};for(var A in m.open(w.method||"get",M,!0),m.onload=function(){m.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(P,x,T){y.push(x=x.toLowerCase()),b.push([x,T]),S[x]=S[x]?S[x]+","+T:T}),E(_())},m.onerror=l,m.withCredentials="include"==w.credentials,w.headers)m.setRequestHeader(A,w.headers[A]);m.send(w.body||null)})}p.r(s),p.d(s,{default:()=>h})},96482:function(ne,s){!function(p){"use strict";function h(){for(var _e=arguments.length,Ee=Array(_e),Me=0;Me<_e;Me++)Ee[Me]=arguments[Me];if(Ee.length>1){Ee[0]=Ee[0].slice(0,-1);for(var me=Ee.length-1,Oe=1;Oe= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Z=x-T,ee=Math.floor,I=String.fromCharCode;function o(_e){throw new RangeError(J[_e])}function a(_e,Ee){for(var Me=[],me=_e.length;me--;)Me[me]=Ee(_e[me]);return Me}function d(_e,Ee){var Me=_e.split("@"),me="";return Me.length>1&&(me=Me[0]+"@",_e=Me[1]),me+a((_e=_e.replace(q,".")).split("."),Ee).join(".")}function g(_e){for(var Ee=[],Me=0,me=_e.length;Me=55296&&Oe<=56319&&Me>1,Ee+=ee(Ee/Me);Ee>Z*L>>1;Oe+=x)Ee=ee(Ee/Z);return ee(Oe+(Z+1)*Ee/(Ee+N))},f=function(Ee){var Me=[],me=Ee.length,Oe=0,Ke=V,it=B,Ye=Ee.lastIndexOf(G);Ye<0&&(Ye=0);for(var qe=0;qe=128&&o("not-basic"),Me.push(Ee.charCodeAt(qe));for(var Bt=Ye>0?Ye+1:0;Bt=me&&o("invalid-input");var Nt=F(Ee.charCodeAt(Bt++));(Nt>=x||Nt>ee((P-Oe)/kt))&&o("overflow"),Oe+=Nt*kt;var Lt=Ot<=it?T:Ot>=it+L?L:Ot-it;if(Ntee(P/nn)&&o("overflow"),kt*=nn}var Yt=Me.length+1;it=C(Oe-It,Yt,0==It),ee(Oe/Yt)>P-Ke&&o("overflow"),Ke+=ee(Oe/Yt),Oe%=Yt,Me.splice(Oe++,0,Ke)}return String.fromCodePoint.apply(String,Me)},k=function(Ee){var Me=[],me=(Ee=g(Ee)).length,Oe=V,Ke=0,it=B,Ye=!0,qe=!1,Bt=void 0;try{for(var kt,It=Ee[Symbol.iterator]();!(Ye=(kt=It.next()).done);Ye=!0){var Ot=kt.value;Ot<128&&Me.push(I(Ot))}}catch(jn){qe=!0,Bt=jn}finally{try{!Ye&&It.return&&It.return()}finally{if(qe)throw Bt}}var Nt=Me.length,Lt=Nt;for(Nt&&Me.push(G);Lt=Oe&&cnee((P-Ke)/Jt)&&o("overflow"),Ke+=(nn-Oe)*Jt,Oe=nn;var Zt=!0,fn=!1,Qt=void 0;try{for(var Mt,Dt=Ee[Symbol.iterator]();!(Zt=(Mt=Dt.next()).done);Zt=!0){var Xt=Mt.value;if(XtP&&o("overflow"),Xt==Oe){for(var Ft=Ke,jt=x;;jt+=x){var on=jt<=it?T:jt>=it+L?L:jt-it;if(Ft>6|192).toString(16).toUpperCase()+"%"+(63&Ee|128).toString(16).toUpperCase():"%"+(Ee>>12|224).toString(16).toUpperCase()+"%"+(Ee>>6&63|128).toString(16).toUpperCase()+"%"+(63&Ee|128).toString(16).toUpperCase()}function ye(_e){for(var Ee="",Me=0,me=_e.length;Me=194&&Oe<224){if(me-Me>=6){var Ke=parseInt(_e.substr(Me+4,2),16);Ee+=String.fromCharCode((31&Oe)<<6|63&Ke)}else Ee+=_e.substr(Me,6);Me+=6}else if(Oe>=224){if(me-Me>=9){var it=parseInt(_e.substr(Me+4,2),16),Ye=parseInt(_e.substr(Me+7,2),16);Ee+=String.fromCharCode((15&Oe)<<12|(63&it)<<6|63&Ye)}else Ee+=_e.substr(Me,9);Me+=9}else Ee+=_e.substr(Me,3),Me+=3}return Ee}function ve(_e,Ee){function Me(me){var Oe=ye(me);return Oe.match(Ee.UNRESERVED)?Oe:me}return _e.scheme&&(_e.scheme=String(_e.scheme).replace(Ee.PCT_ENCODED,Me).toLowerCase().replace(Ee.NOT_SCHEME,"")),void 0!==_e.userinfo&&(_e.userinfo=String(_e.userinfo).replace(Ee.PCT_ENCODED,Me).replace(Ee.NOT_USERINFO,Ie).replace(Ee.PCT_ENCODED,E)),void 0!==_e.host&&(_e.host=String(_e.host).replace(Ee.PCT_ENCODED,Me).toLowerCase().replace(Ee.NOT_HOST,Ie).replace(Ee.PCT_ENCODED,E)),void 0!==_e.path&&(_e.path=String(_e.path).replace(Ee.PCT_ENCODED,Me).replace(_e.scheme?Ee.NOT_PATH:Ee.NOT_PATH_NOSCHEME,Ie).replace(Ee.PCT_ENCODED,E)),void 0!==_e.query&&(_e.query=String(_e.query).replace(Ee.PCT_ENCODED,Me).replace(Ee.NOT_QUERY,Ie).replace(Ee.PCT_ENCODED,E)),void 0!==_e.fragment&&(_e.fragment=String(_e.fragment).replace(Ee.PCT_ENCODED,Me).replace(Ee.NOT_FRAGMENT,Ie).replace(Ee.PCT_ENCODED,E)),_e}function ae(_e){return _e.replace(/^0*(.*)/,"$1")||"0"}function fe(_e,Ee){var Me=_e.match(Ee.IPV4ADDRESS)||[],Oe=_(Me,2)[1];return Oe?Oe.split(".").map(ae).join("."):_e}function pe(_e,Ee){var Me=_e.match(Ee.IPV6ADDRESS)||[],me=_(Me,3),Oe=me[1],Ke=me[2];if(Oe){for(var it=Oe.toLowerCase().split("::").reverse(),Ye=_(it,2),qe=Ye[0],Bt=Ye[1],It=Bt?Bt.split(":").map(ae):[],kt=qe.split(":").map(ae),Ot=Ee.IPV4ADDRESS.test(kt[kt.length-1]),Nt=Ot?7:8,Lt=kt.length-Nt,nn=Array(Nt),Yt=0;Yt1){var Ut=nn.slice(0,an.index),cn=nn.slice(an.index+an.length);tn=Ut.join(":")+"::"+cn.join(":")}else tn=nn.join(":");return Ke&&(tn+="%"+Ke),tn}return _e}var Se=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ce=void 0==="".match(/(){0}/)[1];function be(_e){var Ee=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Me={},me=!1!==Ee.iri?S:b;"suffix"===Ee.reference&&(_e=(Ee.scheme?Ee.scheme+":":"")+"//"+_e);var Oe=_e.match(Se);if(Oe){ce?(Me.scheme=Oe[1],Me.userinfo=Oe[3],Me.host=Oe[4],Me.port=parseInt(Oe[5],10),Me.path=Oe[6]||"",Me.query=Oe[7],Me.fragment=Oe[8],isNaN(Me.port)&&(Me.port=Oe[5])):(Me.scheme=Oe[1]||void 0,Me.userinfo=-1!==_e.indexOf("@")?Oe[3]:void 0,Me.host=-1!==_e.indexOf("//")?Oe[4]:void 0,Me.port=parseInt(Oe[5],10),Me.path=Oe[6]||"",Me.query=-1!==_e.indexOf("?")?Oe[7]:void 0,Me.fragment=-1!==_e.indexOf("#")?Oe[8]:void 0,isNaN(Me.port)&&(Me.port=_e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Oe[4]:void 0)),Me.host&&(Me.host=pe(fe(Me.host,me),me)),void 0!==Me.scheme||void 0!==Me.userinfo||void 0!==Me.host||void 0!==Me.port||Me.path||void 0!==Me.query?void 0===Me.scheme?Me.reference="relative":void 0===Me.fragment?Me.reference="absolute":Me.reference="uri":Me.reference="same-document",Ee.reference&&"suffix"!==Ee.reference&&Ee.reference!==Me.reference&&(Me.error=Me.error||"URI is not a "+Ee.reference+" reference.");var Ke=de[(Ee.scheme||Me.scheme||"").toLowerCase()];if(Ee.unicodeSupport||Ke&&Ke.unicodeSupport)ve(Me,me);else{if(Me.host&&(Ee.domainHost||Ke&&Ke.domainHost))try{Me.host=oe.toASCII(Me.host.replace(me.PCT_ENCODED,ye).toLowerCase())}catch(it){Me.error=Me.error||"Host's domain name can not be converted to ASCII via punycode: "+it}ve(Me,b)}Ke&&Ke.parse&&Ke.parse(Me,Ee)}else Me.error=Me.error||"URI can not be parsed.";return Me}function Ne(_e,Ee){var Me=!1!==Ee.iri?S:b,me=[];return void 0!==_e.userinfo&&(me.push(_e.userinfo),me.push("@")),void 0!==_e.host&&me.push(pe(fe(String(_e.host),Me),Me).replace(Me.IPV6ADDRESS,function(Oe,Ke,it){return"["+Ke+(it?"%25"+it:"")+"]"})),("number"==typeof _e.port||"string"==typeof _e.port)&&(me.push(":"),me.push(String(_e.port))),me.length?me.join(""):void 0}var Fe=/^\.\.?\//,lt=/^\/\.(\/|$)/,Ge=/^\/\.\.(\/|$)/,He=/^\/?(?:.|\n)*?(?=\/|$)/;function Kt(_e){for(var Ee=[];_e.length;)if(_e.match(Fe))_e=_e.replace(Fe,"");else if(_e.match(lt))_e=_e.replace(lt,"/");else if(_e.match(Ge))_e=_e.replace(Ge,"/"),Ee.pop();else if("."===_e||".."===_e)_e="";else{var Me=_e.match(He);if(!Me)throw new Error("Unexpected dot segment condition");var me=Me[0];_e=_e.slice(me.length),Ee.push(me)}return Ee.join("")}function tt(_e){var Ee=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Me=Ee.iri?S:b,me=[],Oe=de[(Ee.scheme||_e.scheme||"").toLowerCase()];if(Oe&&Oe.serialize&&Oe.serialize(_e,Ee),_e.host&&!Me.IPV6ADDRESS.test(_e.host)&&(Ee.domainHost||Oe&&Oe.domainHost))try{_e.host=Ee.iri?oe.toUnicode(_e.host):oe.toASCII(_e.host.replace(Me.PCT_ENCODED,ye).toLowerCase())}catch(Ye){_e.error=_e.error||"Host's domain name can not be converted to "+(Ee.iri?"Unicode":"ASCII")+" via punycode: "+Ye}ve(_e,Me),"suffix"!==Ee.reference&&_e.scheme&&(me.push(_e.scheme),me.push(":"));var Ke=Ne(_e,Ee);if(void 0!==Ke&&("suffix"!==Ee.reference&&me.push("//"),me.push(Ke),_e.path&&"/"!==_e.path.charAt(0)&&me.push("/")),void 0!==_e.path){var it=_e.path;!Ee.absolutePath&&(!Oe||!Oe.absolutePath)&&(it=Kt(it)),void 0===Ke&&(it=it.replace(/^\/\//,"/%2F")),me.push(it)}return void 0!==_e.query&&(me.push("?"),me.push(_e.query)),void 0!==_e.fragment&&(me.push("#"),me.push(_e.fragment)),me.join("")}function nt(_e,Ee){var Me=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},Oe={};return arguments[3]||(_e=be(tt(_e,Me),Me),Ee=be(tt(Ee,Me),Me)),!(Me=Me||{}).tolerant&&Ee.scheme?(Oe.scheme=Ee.scheme,Oe.userinfo=Ee.userinfo,Oe.host=Ee.host,Oe.port=Ee.port,Oe.path=Kt(Ee.path||""),Oe.query=Ee.query):(void 0!==Ee.userinfo||void 0!==Ee.host||void 0!==Ee.port?(Oe.userinfo=Ee.userinfo,Oe.host=Ee.host,Oe.port=Ee.port,Oe.path=Kt(Ee.path||""),Oe.query=Ee.query):(Ee.path?("/"===Ee.path.charAt(0)?Oe.path=Kt(Ee.path):(void 0===_e.userinfo&&void 0===_e.host&&void 0===_e.port||_e.path?_e.path?Oe.path=_e.path.slice(0,_e.path.lastIndexOf("/")+1)+Ee.path:Oe.path=Ee.path:Oe.path="/"+Ee.path,Oe.path=Kt(Oe.path)),Oe.query=Ee.query):(Oe.path=_e.path,void 0!==Ee.query?Oe.query=Ee.query:Oe.query=_e.query),Oe.userinfo=_e.userinfo,Oe.host=_e.host,Oe.port=_e.port),Oe.scheme=_e.scheme),Oe.fragment=Ee.fragment,Oe}function Vt(_e,Ee,Me){var me=m({scheme:"null"},Me);return tt(nt(be(_e,me),be(Ee,me),me,!0),me)}function ot(_e,Ee){return"string"==typeof _e?_e=tt(be(_e,Ee),Ee):"object"===w(_e)&&(_e=be(tt(_e,Ee),Ee)),_e}function at(_e,Ee,Me){return"string"==typeof _e?_e=tt(be(_e,Me),Me):"object"===w(_e)&&(_e=tt(_e,Me)),"string"==typeof Ee?Ee=tt(be(Ee,Me),Me):"object"===w(Ee)&&(Ee=tt(Ee,Me)),_e===Ee}function Gt(_e,Ee){return _e&&_e.toString().replace(Ee&&Ee.iri?S.ESCAPE:b.ESCAPE,Ie)}function Re(_e,Ee){return _e&&_e.toString().replace(Ee&&Ee.iri?S.PCT_ENCODED:b.PCT_ENCODED,ye)}var Ae={scheme:"http",domainHost:!0,parse:function(Ee,Me){return Ee.host||(Ee.error=Ee.error||"HTTP URIs must have a host."),Ee},serialize:function(Ee,Me){var me="https"===String(Ee.scheme).toLowerCase();return(Ee.port===(me?443:80)||""===Ee.port)&&(Ee.port=void 0),Ee.path||(Ee.path="/"),Ee}},Te={scheme:"https",domainHost:Ae.domainHost,parse:Ae.parse,serialize:Ae.serialize};function Be(_e){return"boolean"==typeof _e.secure?_e.secure:"wss"===String(_e.scheme).toLowerCase()}var Ve={scheme:"ws",domainHost:!0,parse:function(Ee,Me){var me=Ee;return me.secure=Be(me),me.resourceName=(me.path||"/")+(me.query?"?"+me.query:""),me.path=void 0,me.query=void 0,me},serialize:function(Ee,Me){if((Ee.port===(Be(Ee)?443:80)||""===Ee.port)&&(Ee.port=void 0),"boolean"==typeof Ee.secure&&(Ee.scheme=Ee.secure?"wss":"ws",Ee.secure=void 0),Ee.resourceName){var me=Ee.resourceName.split("?"),Oe=_(me,2),Ke=Oe[0],it=Oe[1];Ee.path=Ke&&"/"!==Ke?Ke:void 0,Ee.query=it,Ee.resourceName=void 0}return Ee.fragment=void 0,Ee}},mt={scheme:"wss",domainHost:Ve.domainHost,parse:Ve.parse,serialize:Ve.serialize},Ze={},hn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ft="[0-9A-Fa-f]",At=M(M("%[EFef]"+ft+"%"+ft+ft+"%"+ft+ft)+"|"+M("%[89A-Fa-f]"+ft+"%"+ft+ft)+"|"+M("%"+ft+ft)),wn="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Qe=h("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Ht="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",pt=new RegExp(hn,"g"),vt=new RegExp(At,"g"),$t=new RegExp(h("[^]",wn,"[\\.]",'[\\"]',Qe),"g"),dt=new RegExp(h("[^]",hn,Ht),"g"),gt=dt;function mn(_e){var Ee=ye(_e);return Ee.match(pt)?Ee:_e}var ut={scheme:"mailto",parse:function(Ee,Me){var me=Ee,Oe=me.to=me.path?me.path.split(","):[];if(me.path=void 0,me.query){for(var Ke=!1,it={},Ye=me.query.split("&"),qe=0,Bt=Ye.length;qe= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=b-S,W=Math.floor,Q=String.fromCharCode;function J(f){throw RangeError(V[f])}function Z(f,k){for(var se=f.length,te=[];se--;)te[se]=k(f[se]);return te}function ee(f,k){var se=f.split("@"),te="";return se.length>1&&(te=se[0]+"@",f=se[1]),te+Z((f=f.replace(B,".")).split("."),k).join(".")}function I(f){for(var oe,de,k=[],se=0,te=f.length;se=55296&&oe<=56319&&se65535&&(se+=Q((k-=65536)>>>10&1023|55296),k=56320|1023&k),se+=Q(k)}).join("")}function a(f){return f-48<10?f-22:f-65<26?f-65:f-97<26?f-97:b}function d(f,k){return f+22+75*(f<26)-((0!=k)<<5)}function g(f,k,se){var te=0;for(f=se?W(f/P):f>>1,f+=W(f/k);f>G*_>>1;te+=b)f=W(f/G);return W(te+(G+1)*f/(f+A))}function D(f){var te,ye,ve,ae,fe,pe,Se,ce,be,Ne,k=[],se=f.length,oe=0,de=T,Ie=x;for((ye=f.lastIndexOf(L))<0&&(ye=0),ve=0;ve=128&&J("not-basic"),k.push(f.charCodeAt(ve));for(ae=ye>0?ye+1:0;ae=se&&J("invalid-input"),((ce=a(f.charCodeAt(ae++)))>=b||ce>W((y-oe)/pe))&&J("overflow"),oe+=ce*pe,!(ce<(be=Se<=Ie?S:Se>=Ie+_?_:Se-Ie));Se+=b)pe>W(y/(Ne=b-be))&&J("overflow"),pe*=Ne;Ie=g(oe-fe,te=k.length+1,0==fe),W(oe/te)>y-de&&J("overflow"),de+=W(oe/te),oe%=te,k.splice(oe++,0,de)}return o(k)}function F(f){var k,se,te,oe,de,Ie,ye,ve,ae,fe,pe,ce,be,Ne,Fe,Se=[];for(ce=(f=I(f)).length,k=T,se=0,de=x,Ie=0;Ie=k&&peW((y-se)/(be=te+1))&&J("overflow"),se+=(ye-k)*be,k=ye,Ie=0;Iey&&J("overflow"),pe==k){for(ve=se,ae=b;!(ve<(fe=ae<=de?S:ae>=de+_?_:ae-de));ae+=b)Fe=ve-fe,Ne=b-fe,Se.push(Q(d(fe+Fe%Ne,0))),ve=W(Fe/Ne);Se.push(Q(d(ve,0))),de=g(se,be,te==oe),se=0,++te}++se,++k}return Se.join("")}m={version:"1.3.2",ucs2:{decode:I,encode:o},decode:D,encode:F,toASCII:function C(f){return ee(f,function(k){return j.test(k)?"xn--"+F(k):k})},toUnicode:function z(f){return ee(f,function(k){return N.test(k)?D(k.slice(4).toLowerCase()):k})}},void 0!==(h=function(){return m}.call(s,p,s,ne))&&(ne.exports=h)}()},68762:(ne,s,p)=>{"use strict";var h=p(11308),M=p(70796);function w(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}s.parse=V,s.resolve=function W(q,J){return V(q,!1,!0).resolve(J)},s.resolveObject=function Q(q,J){return q?V(q,!1,!0).resolveObject(J):J},s.format=function G(q){return M.isString(q)&&(q=V(q)),q instanceof w?q.format():w.prototype.format.call(q)},s.Url=w;var E=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,y=["<",">",'"',"`"," ","\r","\n","\t"],b=["{","}","|","\\","^","`"].concat(y),S=["'"].concat(b),_=["%","/","?",";","#"].concat(S),A=["/","?","#"],x=/^[+a-z0-9A-Z_-]{0,63}$/,T=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,L={javascript:!0,"javascript:":!0},N={javascript:!0,"javascript:":!0},j={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},B=p(17137);function V(q,J,Z){if(q&&M.isObject(q)&&q instanceof w)return q;var ee=new w;return ee.parse(q,J,Z),ee}w.prototype.parse=function(q,J,Z){if(!M.isString(q))throw new TypeError("Parameter 'url' must be a string, not "+typeof q);var ee=q.indexOf("?"),I=-1!==ee&&ee127?ve+="x":ve+=ye[ae];if(!ve.match(x)){var pe=de.slice(0,f),Se=de.slice(f+1),ce=ye.match(T);ce&&(pe.push(ce[1]),Se.unshift(ce[2])),Se.length&&(d="/"+Se.join(".")+d),this.hostname=pe.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),oe||(this.hostname=h.toASCII(this.hostname));var be=this.port?":"+this.port:"",Ne=this.hostname||"";this.host=Ne+be,this.href+=this.host,oe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==d[0]&&(d="/"+d))}if(!L[F])for(f=0,Ie=S.length;f0)&&Z.host.split("@"))&&(Z.auth=ve.shift(),Z.host=Z.hostname=ve.shift());return Z.search=q.search,Z.query=q.query,(!M.isNull(Z.pathname)||!M.isNull(Z.search))&&(Z.path=(Z.pathname?Z.pathname:"")+(Z.search?Z.search:"")),Z.href=Z.format(),Z}if(!de.length)return Z.pathname=null,Z.search?Z.path="/"+Z.search:Z.path=null,Z.href=Z.format(),Z;for(var ae=de.slice(-1)[0],fe=(Z.host||q.host||de.length>1)&&("."===ae||".."===ae)||""===ae,pe=0,Se=de.length;Se>=0;Se--)"."===(ae=de[Se])?de.splice(Se,1):".."===ae?(de.splice(Se,1),pe++):pe&&(de.splice(Se,1),pe--);if(!te&&!oe)for(;pe--;pe)de.unshift("..");te&&""!==de[0]&&(!de[0]||"/"!==de[0].charAt(0))&&de.unshift(""),fe&&"/"!==de.join("/").substr(-1)&&de.push("");var ve,ce=""===de[0]||de[0]&&"/"===de[0].charAt(0);ye&&(Z.hostname=Z.host=ce?"":de.length?de.shift():"",(ve=!!(Z.host&&Z.host.indexOf("@")>0)&&Z.host.split("@"))&&(Z.auth=ve.shift(),Z.host=Z.hostname=ve.shift()));return(te=te||Z.host&&de.length)&&!ce&&de.unshift(""),de.length?Z.pathname=de.join("/"):(Z.pathname=null,Z.path=null),(!M.isNull(Z.pathname)||!M.isNull(Z.search))&&(Z.path=(Z.pathname?Z.pathname:"")+(Z.search?Z.search:"")),Z.auth=q.auth||Z.auth,Z.slashes=Z.slashes||q.slashes,Z.href=Z.format(),Z},w.prototype.parseHost=function(){var q=this.host,J=l.exec(q);J&&(":"!==(J=J[0])&&(this.port=J.substr(1)),q=q.substr(0,q.length-J.length)),q&&(this.hostname=q)}},70796:ne=>{"use strict";ne.exports={isString:function(s){return"string"==typeof s},isObject:function(s){return"object"==typeof s&&null!==s},isNull:function(s){return null===s},isNullOrUndefined:function(s){return null==s}}},23532:ne=>{function p(h){try{if(!global.localStorage)return!1}catch{return!1}var M=global.localStorage[h];return null!=M&&"true"===String(M).toLowerCase()}ne.exports=function s(h,M){if(p("noDeprecation"))return h;var w=!1;return function E(){if(!w){if(p("throwDeprecation"))throw new Error(M);p("traceDeprecation")?console.trace(M):console.warn(M),w=!0}return h.apply(this,arguments)}}},94372:(ne,s,p)=>{"use strict";var h=p(42031);ne.exports=function(w){return!!h(w)}},11451:ne=>{ne.exports=function(p){return p&&"object"==typeof p&&"function"==typeof p.copy&&"function"==typeof p.fill&&"function"==typeof p.readUInt8}},78791:(ne,s,p)=>{"use strict";var h=p(13407),M=p(20110),w=p(42031),E=p(94372);function l(He){return He.call.bind(He)}var m=typeof BigInt<"u",y=typeof Symbol<"u",b=l(Object.prototype.toString),S=l(Number.prototype.valueOf),_=l(String.prototype.valueOf),A=l(Boolean.prototype.valueOf);if(m)var P=l(BigInt.prototype.valueOf);if(y)var x=l(Symbol.prototype.valueOf);function T(He,Kt){if("object"!=typeof He)return!1;try{return Kt(He),!0}catch{return!1}}function o(He){return"[object Map]"===b(He)}function d(He){return"[object Set]"===b(He)}function D(He){return"[object WeakMap]"===b(He)}function z(He){return"[object WeakSet]"===b(He)}function f(He){return"[object ArrayBuffer]"===b(He)}function k(He){return!(typeof ArrayBuffer>"u")&&(f.working?f(He):He instanceof ArrayBuffer)}function se(He){return"[object DataView]"===b(He)}function te(He){return!(typeof DataView>"u")&&(se.working?se(He):He instanceof DataView)}s.isArgumentsObject=h,s.isGeneratorFunction=M,s.isTypedArray=E,s.isPromise=function L(He){return typeof Promise<"u"&&He instanceof Promise||null!==He&&"object"==typeof He&&"function"==typeof He.then&&"function"==typeof He.catch},s.isArrayBufferView=function N(He){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(He):E(He)||te(He)},s.isUint8Array=function j(He){return"Uint8Array"===w(He)},s.isUint8ClampedArray=function B(He){return"Uint8ClampedArray"===w(He)},s.isUint16Array=function V(He){return"Uint16Array"===w(He)},s.isUint32Array=function G(He){return"Uint32Array"===w(He)},s.isInt8Array=function W(He){return"Int8Array"===w(He)},s.isInt16Array=function Q(He){return"Int16Array"===w(He)},s.isInt32Array=function q(He){return"Int32Array"===w(He)},s.isFloat32Array=function J(He){return"Float32Array"===w(He)},s.isFloat64Array=function Z(He){return"Float64Array"===w(He)},s.isBigInt64Array=function ee(He){return"BigInt64Array"===w(He)},s.isBigUint64Array=function I(He){return"BigUint64Array"===w(He)},o.working=typeof Map<"u"&&o(new Map),s.isMap=function a(He){return!(typeof Map>"u")&&(o.working?o(He):He instanceof Map)},d.working=typeof Set<"u"&&d(new Set),s.isSet=function g(He){return!(typeof Set>"u")&&(d.working?d(He):He instanceof Set)},D.working=typeof WeakMap<"u"&&D(new WeakMap),s.isWeakMap=function F(He){return!(typeof WeakMap>"u")&&(D.working?D(He):He instanceof WeakMap)},z.working=typeof WeakSet<"u"&&z(new WeakSet),s.isWeakSet=function C(He){return z(He)},f.working=typeof ArrayBuffer<"u"&&f(new ArrayBuffer),s.isArrayBuffer=k,se.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&se(new DataView(new ArrayBuffer(1),0,1)),s.isDataView=te;var oe=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function de(He){return"[object SharedArrayBuffer]"===b(He)}function Ie(He){return!(typeof oe>"u")&&(typeof de.working>"u"&&(de.working=de(new oe)),de.working?de(He):He instanceof oe)}function Se(He){return T(He,S)}function ce(He){return T(He,_)}function be(He){return T(He,A)}function Ne(He){return m&&T(He,P)}function Fe(He){return y&&T(He,x)}s.isSharedArrayBuffer=Ie,s.isAsyncFunction=function ye(He){return"[object AsyncFunction]"===b(He)},s.isMapIterator=function ve(He){return"[object Map Iterator]"===b(He)},s.isSetIterator=function ae(He){return"[object Set Iterator]"===b(He)},s.isGeneratorObject=function fe(He){return"[object Generator]"===b(He)},s.isWebAssemblyCompiledModule=function pe(He){return"[object WebAssembly.Module]"===b(He)},s.isNumberObject=Se,s.isStringObject=ce,s.isBooleanObject=be,s.isBigIntObject=Ne,s.isSymbolObject=Fe,s.isBoxedPrimitive=function lt(He){return Se(He)||ce(He)||be(He)||Ne(He)||Fe(He)},s.isAnyArrayBuffer=function Ge(He){return typeof Uint8Array<"u"&&(k(He)||Ie(He))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(He){Object.defineProperty(s,He,{enumerable:!1,value:function(){throw new Error(He+" is not supported in userland")}})})},26788:(ne,s,p)=>{var h=Object.getOwnPropertyDescriptors||function(te){for(var oe=Object.keys(te),de={},Ie=0;Ie=Ie)return ae;switch(ae){case"%s":return String(de[oe++]);case"%d":return Number(de[oe++]);case"%j":try{return JSON.stringify(de[oe++])}catch{return"[Circular]"}default:return ae}}),ve=de[oe];oe"u")return function(){return s.deprecate(se,te).apply(this,arguments)};var oe=!1;return function de(){if(!oe){if(process.throwDeprecation)throw new Error(te);process.traceDeprecation?console.trace(te):console.error(te),oe=!0}return se.apply(this,arguments)}};var w={},E=/^$/;if(process.env.NODE_DEBUG){var l=process.env.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+l+"$","i")}function m(se,te){var oe={seen:[],stylize:b};return arguments.length>=3&&(oe.depth=arguments[2]),arguments.length>=4&&(oe.colors=arguments[3]),j(te)?oe.showHidden=te:te&&s._extend(oe,te),q(oe.showHidden)&&(oe.showHidden=!1),q(oe.depth)&&(oe.depth=2),q(oe.colors)&&(oe.colors=!1),q(oe.customInspect)&&(oe.customInspect=!0),oe.colors&&(oe.stylize=y),_(oe,se,oe.depth)}function y(se,te){var oe=m.styles[te];return oe?"\x1b["+m.colors[oe][0]+"m"+se+"\x1b["+m.colors[oe][1]+"m":se}function b(se,te){return se}function _(se,te,oe){if(se.customInspect&&te&&o(te.inspect)&&te.inspect!==s.inspect&&(!te.constructor||te.constructor.prototype!==te)){var de=te.inspect(oe,se);return W(de)||(de=_(se,de,oe)),de}var Ie=function A(se,te){if(q(te))return se.stylize("undefined","undefined");if(W(te)){var oe="'"+JSON.stringify(te).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return se.stylize(oe,"string")}if(G(te))return se.stylize(""+te,"number");if(j(te))return se.stylize(""+te,"boolean");if(B(te))return se.stylize("null","null")}(se,te);if(Ie)return Ie;var ye=Object.keys(te),ve=function S(se){var te={};return se.forEach(function(oe,de){te[oe]=!0}),te}(ye);if(se.showHidden&&(ye=Object.getOwnPropertyNames(te)),I(te)&&(ye.indexOf("message")>=0||ye.indexOf("description")>=0))return P(te);if(0===ye.length){if(o(te)){var ae=te.name?": "+te.name:"";return se.stylize("[Function"+ae+"]","special")}if(J(te))return se.stylize(RegExp.prototype.toString.call(te),"regexp");if(ee(te))return se.stylize(Date.prototype.toString.call(te),"date");if(I(te))return P(te)}var be,fe="",pe=!1,Se=["{","}"];(N(te)&&(pe=!0,Se=["[","]"]),o(te))&&(fe=" [Function"+(te.name?": "+te.name:"")+"]");return J(te)&&(fe=" "+RegExp.prototype.toString.call(te)),ee(te)&&(fe=" "+Date.prototype.toUTCString.call(te)),I(te)&&(fe=" "+P(te)),0!==ye.length||pe&&0!=te.length?oe<0?J(te)?se.stylize(RegExp.prototype.toString.call(te),"regexp"):se.stylize("[Object]","special"):(se.seen.push(te),be=pe?function x(se,te,oe,de,Ie){for(var ye=[],ve=0,ae=te.length;ve=0&&0,ye+ve.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Ie>60?oe[0]+(""===te?"":te+"\n ")+" "+se.join(",\n ")+" "+oe[1]:oe[0]+te+" "+se.join(", ")+" "+oe[1]}(be,fe,Se)):Se[0]+fe+Se[1]}function P(se){return"["+Error.prototype.toString.call(se)+"]"}function T(se,te,oe,de,Ie,ye){var ve,ae,fe;if((fe=Object.getOwnPropertyDescriptor(te,Ie)||{value:te[Ie]}).get?ae=fe.set?se.stylize("[Getter/Setter]","special"):se.stylize("[Getter]","special"):fe.set&&(ae=se.stylize("[Setter]","special")),z(de,Ie)||(ve="["+Ie+"]"),ae||(se.seen.indexOf(fe.value)<0?(ae=B(oe)?_(se,fe.value,null):_(se,fe.value,oe-1)).indexOf("\n")>-1&&(ae=ye?ae.split("\n").map(function(pe){return" "+pe}).join("\n").slice(2):"\n"+ae.split("\n").map(function(pe){return" "+pe}).join("\n")):ae=se.stylize("[Circular]","special")),q(ve)){if(ye&&Ie.match(/^\d+$/))return ae;(ve=JSON.stringify(""+Ie)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ve=ve.slice(1,-1),ve=se.stylize(ve,"name")):(ve=ve.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ve=se.stylize(ve,"string"))}return ve+": "+ae}function N(se){return Array.isArray(se)}function j(se){return"boolean"==typeof se}function B(se){return null===se}function G(se){return"number"==typeof se}function W(se){return"string"==typeof se}function q(se){return void 0===se}function J(se){return Z(se)&&"[object RegExp]"===d(se)}function Z(se){return"object"==typeof se&&null!==se}function ee(se){return Z(se)&&"[object Date]"===d(se)}function I(se){return Z(se)&&("[object Error]"===d(se)||se instanceof Error)}function o(se){return"function"==typeof se}function d(se){return Object.prototype.toString.call(se)}function g(se){return se<10?"0"+se.toString(10):se.toString(10)}s.debuglog=function(se){if(se=se.toUpperCase(),!w[se])if(E.test(se)){var te=process.pid;w[se]=function(){var oe=s.format.apply(s,arguments);console.error("%s %d: %s",se,te,oe)}}else w[se]=function(){};return w[se]},s.inspect=m,m.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},s.types=p(78791),s.isArray=N,s.isBoolean=j,s.isNull=B,s.isNullOrUndefined=function V(se){return null==se},s.isNumber=G,s.isString=W,s.isSymbol=function Q(se){return"symbol"==typeof se},s.isUndefined=q,s.isRegExp=J,s.types.isRegExp=J,s.isObject=Z,s.isDate=ee,s.types.isDate=ee,s.isError=I,s.types.isNativeError=I,s.isFunction=o,s.isPrimitive=function a(se){return null===se||"boolean"==typeof se||"number"==typeof se||"string"==typeof se||"symbol"==typeof se||typeof se>"u"},s.isBuffer=p(11451);var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z(se,te){return Object.prototype.hasOwnProperty.call(se,te)}s.log=function(){console.log("%s - %s",function F(){var se=new Date,te=[g(se.getHours()),g(se.getMinutes()),g(se.getSeconds())].join(":");return[se.getDate(),D[se.getMonth()],te].join(" ")}(),s.format.apply(s,arguments))},s.inherits=p(83894),s._extend=function(se,te){if(!te||!Z(te))return se;for(var oe=Object.keys(te),de=oe.length;de--;)se[oe[de]]=te[oe[de]];return se};var C=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function f(se,te){if(!se){var oe=new Error("Promise was rejected with a falsy value");oe.reason=se,se=oe}return te(se)}s.promisify=function(te){if("function"!=typeof te)throw new TypeError('The "original" argument must be of type Function');if(C&&te[C]){var oe;if("function"!=typeof(oe=te[C]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(oe,C,{value:oe,enumerable:!1,writable:!1,configurable:!0}),oe}function oe(){for(var de,Ie,ye=new Promise(function(fe,pe){de=fe,Ie=pe}),ve=[],ae=0;ae{"use strict";var h=p(9435),M=p(87029),w=p(55685),E=p(75834),l=p(47378),m=E("Object.prototype.toString"),y=p(46259)(),b=typeof globalThis>"u"?global:globalThis,S=M(),_=E("String.prototype.slice"),A=Object.getPrototypeOf,P=E("Array.prototype.indexOf",!0)||function(j,B){for(var V=0;V-1?B:"Object"===B&&function(j){var B=!1;return h(x,function(V,G){if(!B)try{V(j),B=_(G,1)}catch{}}),B}(j)}return l?function(j){var B=!1;return h(x,function(V,G){if(!B)try{"$"+V(j)===G&&(B=_(G,1))}catch{}}),B}(j):null}},99136:ne=>{ne.exports=function s(p,h){if(p&&h)return s(p)(h);if("function"!=typeof p)throw new TypeError("need wrapper function");return Object.keys(p).forEach(function(w){M[w]=p[w]}),M;function M(){for(var w=new Array(arguments.length),E=0;E{ne.exports=function s(){for(var p={},h=0;h{"use strict";ne.exports=function(s){s.prototype[Symbol.iterator]=function*(){for(let p=this.head;p;p=p.next)yield p.value}}},47245:(ne,s,p)=>{"use strict";function h(m){var y=this;if(y instanceof h||(y=new h),y.tail=null,y.head=null,y.length=0,m&&"function"==typeof m.forEach)m.forEach(function(_){y.push(_)});else if(arguments.length>0)for(var b=0,S=arguments.length;b1)b=y;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");S=this.head.next,b=this.head.value}for(var _=0;null!==S;_++)b=m(b,S.value,_),S=S.next;return b},h.prototype.reduceReverse=function(m,y){var b,S=this.tail;if(arguments.length>1)b=y;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");S=this.tail.prev,b=this.tail.value}for(var _=this.length-1;null!==S;_--)b=m(b,S.value,_),S=S.prev;return b},h.prototype.toArray=function(){for(var m=new Array(this.length),y=0,b=this.head;null!==b;y++)m[y]=b.value,b=b.next;return m},h.prototype.toArrayReverse=function(){for(var m=new Array(this.length),y=0,b=this.tail;null!==b;y++)m[y]=b.value,b=b.prev;return m},h.prototype.slice=function(m,y){(y=y||this.length)<0&&(y+=this.length),(m=m||0)<0&&(m+=this.length);var b=new h;if(ythis.length&&(y=this.length);for(var S=0,_=this.head;null!==_&&Sthis.length&&(y=this.length);for(var S=this.length,_=this.tail;null!==_&&S>y;S--)_=_.prev;for(;null!==_&&S>m;S--,_=_.prev)b.push(_.value);return b},h.prototype.splice=function(m,y,...b){m>this.length&&(m=this.length-1),m<0&&(m=this.length+m);for(var S=0,_=this.head;null!==_&&S{"use strict";p.r(s),p.d(s,{__assign:()=>w,__asyncDelegator:()=>B,__asyncGenerator:()=>j,__asyncValues:()=>V,__await:()=>N,__awaiter:()=>b,__classPrivateFieldGet:()=>q,__classPrivateFieldSet:()=>J,__createBinding:()=>_,__decorate:()=>l,__exportStar:()=>A,__extends:()=>M,__generator:()=>S,__importDefault:()=>Q,__importStar:()=>W,__makeTemplateObject:()=>G,__metadata:()=>y,__param:()=>m,__read:()=>x,__rest:()=>E,__spread:()=>T,__spreadArrays:()=>L,__values:()=>P});var h=function(Z,ee){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,o){I.__proto__=o}||function(I,o){for(var a in o)o.hasOwnProperty(a)&&(I[a]=o[a])})(Z,ee)};function M(Z,ee){function I(){this.constructor=Z}h(Z,ee),Z.prototype=null===ee?Object.create(ee):(I.prototype=ee.prototype,new I)}var w=function(){return w=Object.assign||function(ee){for(var I,o=1,a=arguments.length;o=0;D--)(g=Z[D])&&(d=(a<3?g(d):a>3?g(ee,I,d):g(ee,I))||d);return a>3&&d&&Object.defineProperty(ee,I,d),d}function m(Z,ee){return function(I,o){ee(I,o,Z)}}function y(Z,ee){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(Z,ee)}function b(Z,ee,I,o){return new(I||(I=Promise))(function(d,g){function D(C){try{z(o.next(C))}catch(f){g(f)}}function F(C){try{z(o.throw(C))}catch(f){g(f)}}function z(C){C.done?d(C.value):function a(d){return d instanceof I?d:new I(function(g){g(d)})}(C.value).then(D,F)}z((o=o.apply(Z,ee||[])).next())})}function S(Z,ee){var o,a,d,g,I={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return g={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function D(z){return function(C){return function F(z){if(o)throw new TypeError("Generator is already executing.");for(;I;)try{if(o=1,a&&(d=2&z[0]?a.return:z[0]?a.throw||((d=a.return)&&d.call(a),0):a.next)&&!(d=d.call(a,z[1])).done)return d;switch(a=0,d&&(z=[2&z[0],d.value]),z[0]){case 0:case 1:d=z;break;case 4:return I.label++,{value:z[1],done:!1};case 5:I.label++,a=z[1],z=[0];continue;case 7:z=I.ops.pop(),I.trys.pop();continue;default:if(!(d=(d=I.trys).length>0&&d[d.length-1])&&(6===z[0]||2===z[0])){I=0;continue}if(3===z[0]&&(!d||z[1]>d[0]&&z[1]=Z.length&&(Z=void 0),{value:Z&&Z[o++],done:!Z}}};throw new TypeError(ee?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(Z,ee){var I="function"==typeof Symbol&&Z[Symbol.iterator];if(!I)return Z;var a,g,o=I.call(Z),d=[];try{for(;(void 0===ee||ee-- >0)&&!(a=o.next()).done;)d.push(a.value)}catch(D){g={error:D}}finally{try{a&&!a.done&&(I=o.return)&&I.call(o)}finally{if(g)throw g.error}}return d}function T(){for(var Z=[],ee=0;ee1||D(k,se)})})}function D(k,se){try{!function F(k){k.value instanceof N?Promise.resolve(k.value.v).then(z,C):f(d[0][2],k)}(o[k](se))}catch(te){f(d[0][3],te)}}function z(k){D("next",k)}function C(k){D("throw",k)}function f(k,se){k(se),d.shift(),d.length&&D(d[0][0],d[0][1])}}function B(Z){var ee,I;return ee={},o("next"),o("throw",function(a){throw a}),o("return"),ee[Symbol.iterator]=function(){return this},ee;function o(a,d){ee[a]=Z[a]?function(g){return(I=!I)?{value:N(Z[a](g)),done:"return"===a}:d?d(g):g}:d}}function V(Z){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var I,ee=Z[Symbol.asyncIterator];return ee?ee.call(Z):(Z=P(Z),I={},o("next"),o("throw"),o("return"),I[Symbol.asyncIterator]=function(){return this},I);function o(d){I[d]=Z[d]&&function(g){return new Promise(function(D,F){(function a(d,g,D,F){Promise.resolve(F).then(function(z){d({value:z,done:D})},g)})(D,F,(g=Z[d](g)).done,g.value)})}}}function G(Z,ee){return Object.defineProperty?Object.defineProperty(Z,"raw",{value:ee}):Z.raw=ee,Z}function W(Z){if(Z&&Z.__esModule)return Z;var ee={};if(null!=Z)for(var I in Z)Object.hasOwnProperty.call(Z,I)&&(ee[I]=Z[I]);return ee.default=Z,ee}function Q(Z){return Z&&Z.__esModule?Z:{default:Z}}function q(Z,ee){if(!ee.has(Z))throw new TypeError("attempted to get private field on non-instance");return ee.get(Z)}function J(Z,ee,I){if(!ee.has(Z))throw new TypeError("attempted to set private field on non-instance");return ee.set(Z,I),I}},39653:(ne,s,p)=>{"use strict";p.r(s),p.d(s,{__assign:()=>w,__asyncDelegator:()=>B,__asyncGenerator:()=>j,__asyncValues:()=>V,__await:()=>N,__awaiter:()=>b,__classPrivateFieldGet:()=>q,__classPrivateFieldSet:()=>J,__createBinding:()=>_,__decorate:()=>l,__exportStar:()=>A,__extends:()=>M,__generator:()=>S,__importDefault:()=>Q,__importStar:()=>W,__makeTemplateObject:()=>G,__metadata:()=>y,__param:()=>m,__read:()=>x,__rest:()=>E,__spread:()=>T,__spreadArrays:()=>L,__values:()=>P});var h=function(Z,ee){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,o){I.__proto__=o}||function(I,o){for(var a in o)o.hasOwnProperty(a)&&(I[a]=o[a])})(Z,ee)};function M(Z,ee){function I(){this.constructor=Z}h(Z,ee),Z.prototype=null===ee?Object.create(ee):(I.prototype=ee.prototype,new I)}var w=function(){return w=Object.assign||function(ee){for(var I,o=1,a=arguments.length;o=0;D--)(g=Z[D])&&(d=(a<3?g(d):a>3?g(ee,I,d):g(ee,I))||d);return a>3&&d&&Object.defineProperty(ee,I,d),d}function m(Z,ee){return function(I,o){ee(I,o,Z)}}function y(Z,ee){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(Z,ee)}function b(Z,ee,I,o){return new(I||(I=Promise))(function(d,g){function D(C){try{z(o.next(C))}catch(f){g(f)}}function F(C){try{z(o.throw(C))}catch(f){g(f)}}function z(C){C.done?d(C.value):function a(d){return d instanceof I?d:new I(function(g){g(d)})}(C.value).then(D,F)}z((o=o.apply(Z,ee||[])).next())})}function S(Z,ee){var o,a,d,g,I={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return g={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function D(z){return function(C){return function F(z){if(o)throw new TypeError("Generator is already executing.");for(;I;)try{if(o=1,a&&(d=2&z[0]?a.return:z[0]?a.throw||((d=a.return)&&d.call(a),0):a.next)&&!(d=d.call(a,z[1])).done)return d;switch(a=0,d&&(z=[2&z[0],d.value]),z[0]){case 0:case 1:d=z;break;case 4:return I.label++,{value:z[1],done:!1};case 5:I.label++,a=z[1],z=[0];continue;case 7:z=I.ops.pop(),I.trys.pop();continue;default:if(!(d=(d=I.trys).length>0&&d[d.length-1])&&(6===z[0]||2===z[0])){I=0;continue}if(3===z[0]&&(!d||z[1]>d[0]&&z[1]=Z.length&&(Z=void 0),{value:Z&&Z[o++],done:!Z}}};throw new TypeError(ee?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(Z,ee){var I="function"==typeof Symbol&&Z[Symbol.iterator];if(!I)return Z;var a,g,o=I.call(Z),d=[];try{for(;(void 0===ee||ee-- >0)&&!(a=o.next()).done;)d.push(a.value)}catch(D){g={error:D}}finally{try{a&&!a.done&&(I=o.return)&&I.call(o)}finally{if(g)throw g.error}}return d}function T(){for(var Z=[],ee=0;ee1||D(k,se)})})}function D(k,se){try{!function F(k){k.value instanceof N?Promise.resolve(k.value.v).then(z,C):f(d[0][2],k)}(o[k](se))}catch(te){f(d[0][3],te)}}function z(k){D("next",k)}function C(k){D("throw",k)}function f(k,se){k(se),d.shift(),d.length&&D(d[0][0],d[0][1])}}function B(Z){var ee,I;return ee={},o("next"),o("throw",function(a){throw a}),o("return"),ee[Symbol.iterator]=function(){return this},ee;function o(a,d){ee[a]=Z[a]?function(g){return(I=!I)?{value:N(Z[a](g)),done:"return"===a}:d?d(g):g}:d}}function V(Z){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var I,ee=Z[Symbol.asyncIterator];return ee?ee.call(Z):(Z=P(Z),I={},o("next"),o("throw"),o("return"),I[Symbol.asyncIterator]=function(){return this},I);function o(d){I[d]=Z[d]&&function(g){return new Promise(function(D,F){(function a(d,g,D,F){Promise.resolve(F).then(function(z){d({value:z,done:D})},g)})(D,F,(g=Z[d](g)).done,g.value)})}}}function G(Z,ee){return Object.defineProperty?Object.defineProperty(Z,"raw",{value:ee}):Z.raw=ee,Z}function W(Z){if(Z&&Z.__esModule)return Z;var ee={};if(null!=Z)for(var I in Z)Object.hasOwnProperty.call(Z,I)&&(ee[I]=Z[I]);return ee.default=Z,ee}function Q(Z){return Z&&Z.__esModule?Z:{default:Z}}function q(Z,ee){if(!ee.has(Z))throw new TypeError("attempted to get private field on non-instance");return ee.get(Z)}function J(Z,ee,I){if(!ee.has(Z))throw new TypeError("attempted to set private field on non-instance");return ee.set(Z,I),I}},57121:(ne,s,p)=>{"use strict";p.r(s),p.d(s,{__assign:()=>w,__asyncDelegator:()=>B,__asyncGenerator:()=>j,__asyncValues:()=>V,__await:()=>N,__awaiter:()=>b,__classPrivateFieldGet:()=>q,__classPrivateFieldSet:()=>J,__createBinding:()=>_,__decorate:()=>l,__exportStar:()=>A,__extends:()=>M,__generator:()=>S,__importDefault:()=>Q,__importStar:()=>W,__makeTemplateObject:()=>G,__metadata:()=>y,__param:()=>m,__read:()=>x,__rest:()=>E,__spread:()=>T,__spreadArrays:()=>L,__values:()=>P});var h=function(Z,ee){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,o){I.__proto__=o}||function(I,o){for(var a in o)o.hasOwnProperty(a)&&(I[a]=o[a])})(Z,ee)};function M(Z,ee){function I(){this.constructor=Z}h(Z,ee),Z.prototype=null===ee?Object.create(ee):(I.prototype=ee.prototype,new I)}var w=function(){return w=Object.assign||function(ee){for(var I,o=1,a=arguments.length;o=0;D--)(g=Z[D])&&(d=(a<3?g(d):a>3?g(ee,I,d):g(ee,I))||d);return a>3&&d&&Object.defineProperty(ee,I,d),d}function m(Z,ee){return function(I,o){ee(I,o,Z)}}function y(Z,ee){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(Z,ee)}function b(Z,ee,I,o){return new(I||(I=Promise))(function(d,g){function D(C){try{z(o.next(C))}catch(f){g(f)}}function F(C){try{z(o.throw(C))}catch(f){g(f)}}function z(C){C.done?d(C.value):function a(d){return d instanceof I?d:new I(function(g){g(d)})}(C.value).then(D,F)}z((o=o.apply(Z,ee||[])).next())})}function S(Z,ee){var o,a,d,g,I={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return g={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function D(z){return function(C){return function F(z){if(o)throw new TypeError("Generator is already executing.");for(;I;)try{if(o=1,a&&(d=2&z[0]?a.return:z[0]?a.throw||((d=a.return)&&d.call(a),0):a.next)&&!(d=d.call(a,z[1])).done)return d;switch(a=0,d&&(z=[2&z[0],d.value]),z[0]){case 0:case 1:d=z;break;case 4:return I.label++,{value:z[1],done:!1};case 5:I.label++,a=z[1],z=[0];continue;case 7:z=I.ops.pop(),I.trys.pop();continue;default:if(!(d=(d=I.trys).length>0&&d[d.length-1])&&(6===z[0]||2===z[0])){I=0;continue}if(3===z[0]&&(!d||z[1]>d[0]&&z[1]=Z.length&&(Z=void 0),{value:Z&&Z[o++],done:!Z}}};throw new TypeError(ee?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(Z,ee){var I="function"==typeof Symbol&&Z[Symbol.iterator];if(!I)return Z;var a,g,o=I.call(Z),d=[];try{for(;(void 0===ee||ee-- >0)&&!(a=o.next()).done;)d.push(a.value)}catch(D){g={error:D}}finally{try{a&&!a.done&&(I=o.return)&&I.call(o)}finally{if(g)throw g.error}}return d}function T(){for(var Z=[],ee=0;ee1||D(k,se)})})}function D(k,se){try{!function F(k){k.value instanceof N?Promise.resolve(k.value.v).then(z,C):f(d[0][2],k)}(o[k](se))}catch(te){f(d[0][3],te)}}function z(k){D("next",k)}function C(k){D("throw",k)}function f(k,se){k(se),d.shift(),d.length&&D(d[0][0],d[0][1])}}function B(Z){var ee,I;return ee={},o("next"),o("throw",function(a){throw a}),o("return"),ee[Symbol.iterator]=function(){return this},ee;function o(a,d){ee[a]=Z[a]?function(g){return(I=!I)?{value:N(Z[a](g)),done:"return"===a}:d?d(g):g}:d}}function V(Z){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var I,ee=Z[Symbol.asyncIterator];return ee?ee.call(Z):(Z=P(Z),I={},o("next"),o("throw"),o("return"),I[Symbol.asyncIterator]=function(){return this},I);function o(d){I[d]=Z[d]&&function(g){return new Promise(function(D,F){(function a(d,g,D,F){Promise.resolve(F).then(function(z){d({value:z,done:D})},g)})(D,F,(g=Z[d](g)).done,g.value)})}}}function G(Z,ee){return Object.defineProperty?Object.defineProperty(Z,"raw",{value:ee}):Z.raw=ee,Z}function W(Z){if(Z&&Z.__esModule)return Z;var ee={};if(null!=Z)for(var I in Z)Object.hasOwnProperty.call(Z,I)&&(ee[I]=Z[I]);return ee.default=Z,ee}function Q(Z){return Z&&Z.__esModule?Z:{default:Z}}function q(Z,ee){if(!ee.has(Z))throw new TypeError("attempted to get private field on non-instance");return ee.get(Z)}function J(Z,ee,I){if(!ee.has(Z))throw new TypeError("attempted to set private field on non-instance");return ee.set(Z,I),I}},30004:(ne,s,p)=>{"use strict";p.r(s),p.d(s,{__assign:()=>w,__asyncDelegator:()=>B,__asyncGenerator:()=>j,__asyncValues:()=>V,__await:()=>N,__awaiter:()=>b,__classPrivateFieldGet:()=>q,__classPrivateFieldSet:()=>J,__createBinding:()=>_,__decorate:()=>l,__exportStar:()=>A,__extends:()=>M,__generator:()=>S,__importDefault:()=>Q,__importStar:()=>W,__makeTemplateObject:()=>G,__metadata:()=>y,__param:()=>m,__read:()=>x,__rest:()=>E,__spread:()=>T,__spreadArrays:()=>L,__values:()=>P});var h=function(Z,ee){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,o){I.__proto__=o}||function(I,o){for(var a in o)o.hasOwnProperty(a)&&(I[a]=o[a])})(Z,ee)};function M(Z,ee){function I(){this.constructor=Z}h(Z,ee),Z.prototype=null===ee?Object.create(ee):(I.prototype=ee.prototype,new I)}var w=function(){return w=Object.assign||function(ee){for(var I,o=1,a=arguments.length;o=0;D--)(g=Z[D])&&(d=(a<3?g(d):a>3?g(ee,I,d):g(ee,I))||d);return a>3&&d&&Object.defineProperty(ee,I,d),d}function m(Z,ee){return function(I,o){ee(I,o,Z)}}function y(Z,ee){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(Z,ee)}function b(Z,ee,I,o){return new(I||(I=Promise))(function(d,g){function D(C){try{z(o.next(C))}catch(f){g(f)}}function F(C){try{z(o.throw(C))}catch(f){g(f)}}function z(C){C.done?d(C.value):function a(d){return d instanceof I?d:new I(function(g){g(d)})}(C.value).then(D,F)}z((o=o.apply(Z,ee||[])).next())})}function S(Z,ee){var o,a,d,g,I={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return g={next:D(0),throw:D(1),return:D(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function D(z){return function(C){return function F(z){if(o)throw new TypeError("Generator is already executing.");for(;I;)try{if(o=1,a&&(d=2&z[0]?a.return:z[0]?a.throw||((d=a.return)&&d.call(a),0):a.next)&&!(d=d.call(a,z[1])).done)return d;switch(a=0,d&&(z=[2&z[0],d.value]),z[0]){case 0:case 1:d=z;break;case 4:return I.label++,{value:z[1],done:!1};case 5:I.label++,a=z[1],z=[0];continue;case 7:z=I.ops.pop(),I.trys.pop();continue;default:if(!(d=(d=I.trys).length>0&&d[d.length-1])&&(6===z[0]||2===z[0])){I=0;continue}if(3===z[0]&&(!d||z[1]>d[0]&&z[1]=Z.length&&(Z=void 0),{value:Z&&Z[o++],done:!Z}}};throw new TypeError(ee?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(Z,ee){var I="function"==typeof Symbol&&Z[Symbol.iterator];if(!I)return Z;var a,g,o=I.call(Z),d=[];try{for(;(void 0===ee||ee-- >0)&&!(a=o.next()).done;)d.push(a.value)}catch(D){g={error:D}}finally{try{a&&!a.done&&(I=o.return)&&I.call(o)}finally{if(g)throw g.error}}return d}function T(){for(var Z=[],ee=0;ee1||D(k,se)})})}function D(k,se){try{!function F(k){k.value instanceof N?Promise.resolve(k.value.v).then(z,C):f(d[0][2],k)}(o[k](se))}catch(te){f(d[0][3],te)}}function z(k){D("next",k)}function C(k){D("throw",k)}function f(k,se){k(se),d.shift(),d.length&&D(d[0][0],d[0][1])}}function B(Z){var ee,I;return ee={},o("next"),o("throw",function(a){throw a}),o("return"),ee[Symbol.iterator]=function(){return this},ee;function o(a,d){ee[a]=Z[a]?function(g){return(I=!I)?{value:N(Z[a](g)),done:"return"===a}:d?d(g):g}:d}}function V(Z){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var I,ee=Z[Symbol.asyncIterator];return ee?ee.call(Z):(Z=P(Z),I={},o("next"),o("throw"),o("return"),I[Symbol.asyncIterator]=function(){return this},I);function o(d){I[d]=Z[d]&&function(g){return new Promise(function(D,F){(function a(d,g,D,F){Promise.resolve(F).then(function(z){d({value:z,done:D})},g)})(D,F,(g=Z[d](g)).done,g.value)})}}}function G(Z,ee){return Object.defineProperty?Object.defineProperty(Z,"raw",{value:ee}):Z.raw=ee,Z}function W(Z){if(Z&&Z.__esModule)return Z;var ee={};if(null!=Z)for(var I in Z)Object.hasOwnProperty.call(Z,I)&&(ee[I]=Z[I]);return ee.default=Z,ee}function Q(Z){return Z&&Z.__esModule?Z:{default:Z}}function q(Z,ee){if(!ee.has(Z))throw new TypeError("attempted to get private field on non-instance");return ee.get(Z)}function J(Z,ee,I){if(!ee.has(Z))throw new TypeError("attempted to set private field on non-instance");return ee.set(Z,I),I}},80950:()=>{},46601:()=>{},96419:()=>{},56353:()=>{},7716:()=>{},53383:()=>{},8623:()=>{},7748:()=>{},85568:()=>{},6297:()=>{},70131:()=>{},94093:()=>{},61695:()=>{},56619:()=>{},77108:()=>{},52361:()=>{},94616:()=>{},59344:ne=>{function s(h,M,w,E,l,m,y){try{var b=h[m](y),S=b.value}catch(_){return void w(_)}b.done?M(S):Promise.resolve(S).then(E,l)}ne.exports=function p(h){return function(){var M=this,w=arguments;return new Promise(function(E,l){var m=h.apply(M,w);function y(S){s(m,E,l,y,b,"next",S)}function b(S){s(m,E,l,y,b,"throw",S)}y(void 0)})}},ne.exports.__esModule=!0,ne.exports.default=ne.exports},82253:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(l,m,y,b){return new(y||(y=Promise))(function(_,A){function P(L){try{T(b.next(L))}catch(N){A(N)}}function x(L){try{T(b.throw(L))}catch(N){A(N)}}function T(L){L.done?_(L.value):function S(_){return _ instanceof y?_:new y(function(A){A(_)})}(L.value).then(P,x)}T((b=b.apply(l,m||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.HereKeyStore=void 0;const M=p(46358),w=p(37996);s.HereKeyStore=class E{constructor(m=new w.StateStorage){this.storage=m}setActiveAccount(m,y){return h(this,void 0,void 0,function*(){const b=yield this.storage.getState(m);b.activeAccount=y,this.storage.setState(m,b)})}setKey(m,y,b){return h(this,void 0,void 0,function*(){const S=yield this.storage.getState(m);S.accounts[y]=b.toString(),this.storage.setState(m,S)})}getAccounts(m){return h(this,void 0,void 0,function*(){const y=yield this.storage.getState(m);return Object.keys(y.accounts)})}getActiveAccount(m){return h(this,void 0,void 0,function*(){return(yield this.storage.getState(m)).activeAccount})}getKey(m,y){return h(this,void 0,void 0,function*(){const S=(yield this.storage.getState(m)).accounts[y];if(null==S)throw Error(`For ${y} in ${m} network key not found`);return M.KeyPair.fromString(S)})}removeKey(m,y){return h(this,void 0,void 0,function*(){let b=yield this.storage.getState(m);b.activeAccount===y&&(b.activeAccount=null),delete b.accounts[y],this.storage.setState(m,b)})}getNetworks(){return h(this,void 0,void 0,function*(){let m=yield this.storage.getFullState();return Object.keys(m.accounts)})}clear(){return h(this,void 0,void 0,function*(){yield this.storage.clear()})}}},37996:function(ne,s){"use strict";var p=this&&this.__awaiter||function(M,w,E,l){return new(E||(E=Promise))(function(y,b){function S(P){try{A(l.next(P))}catch(x){b(x)}}function _(P){try{A(l.throw(P))}catch(x){b(x)}}function A(P){P.done?y(P.value):function m(y){return y instanceof E?y:new E(function(b){b(y)})}(P.value).then(S,_)}A((l=l.apply(M,w||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0}),s.StateStorage=void 0;s.StateStorage=class h{constructor(){this.dataKey="herewallet:keystore"}setState(w,E){return p(this,void 0,void 0,function*(){const l=yield this.getFullState();l[w]=E,window.localStorage.setItem(this.dataKey,JSON.stringify(l))})}getFullState(){return p(this,void 0,void 0,function*(){try{return JSON.parse(window.localStorage.getItem(this.dataKey))||{}}catch{return{}}})}getState(w){return p(this,void 0,void 0,function*(){return(yield this.getFullState())[w]||{activeAccount:null,accounts:{}}})}clear(){return p(this,void 0,void 0,function*(){window.localStorage.removeItem(this.dataKey)})}}},45173:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WidgetStrategy=s.defaultUrl=void 0;s.defaultUrl="https://my.herewallet.app/connector/index.html";class h{constructor(w={widget:s.defaultUrl,lazy:!1}){this.options={lazy:"object"==typeof w&&w.lazy||!1,widget:"string"==typeof w?w:w.widget||s.defaultUrl},this.options.lazy||this.initIframe()}initIframe(){return null==h.connector&&(h.connector=(M=>{const w=document.createElement("iframe");return w.src=M,w.style.border="none",w.style.zIndex="10000",w.style.position="fixed",w.style.display="none",w.style.top="0",w.style.left="0",w.style.width="100%",w.style.height="100%",document.body.appendChild(w),w})(this.options.widget),h.connector.addEventListener("load",()=>{h.isLoaded=!0})),h.connector}onRequested(w,E,l){const m=this.initIframe();m.style.display="block";const y=()=>{var b,S,_;null===(b=h.connector)||void 0===b||b.removeEventListener("load",y),null===(_=null===(S=h.connector)||void 0===S?void 0:S.contentWindow)||void 0===_||_.postMessage(JSON.stringify({type:"request",payload:{id:w,request:E}}),new URL(this.options.widget).origin)};h.isLoaded?y():m.addEventListener("load",y),this.messageHandler=b=>{try{if(b.origin!==new URL(this.options.widget).origin)return;"reject"===JSON.parse(b.data).type&&l()}catch{}},window.addEventListener("message",this.messageHandler)}postMessage(w){var E;const l=this.initIframe(),m=JSON.stringify(w),y=new URL(this.options.widget).origin;null===(E=l.contentWindow)||void 0===E||E.postMessage(m,y)}onApproving(){this.postMessage({type:"approving"})}onSuccess(w){console.log(w),this.postMessage({type:"result",payload:{request:w}}),this.close()}onFailed(w){this.postMessage({type:"result",payload:{request:w}}),this.close()}close(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0),h.connector&&(h.connector.style.display="none")}}s.WidgetStrategy=h,h.isLoaded=!1},55217:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WindowStrategy=void 0;s.WindowStrategy=class p{constructor(M="https://my.herewallet.app"){this.endpoint=M,this.signWindow=null,this.onFailed=()=>this.close(),this.onSuccess=()=>this.close()}onInitialized(){if(this.signWindow)return;const M=window.innerWidth/2-210,w=window.innerHeight/2-350;this.signWindow=window.open(`${this.endpoint}/loading`,"_blank",`popup=1,width=420,height=700,top=${w},left=${M}`)}onRequested(M,w,E){null!=this.signWindow&&(this.unloadHandler=()=>{var l;return null===(l=this.signWindow)||void 0===l?void 0:l.close()},window.addEventListener("beforeunload",this.unloadHandler),this.signWindow.location=`${this.endpoint}/request/${M}`,this.timerHandler=setInterval(()=>{var l;null!==(l=this.signWindow)&&void 0!==l&&l.closed&&E("CLOSED")},1e3))}close(){var M;clearInterval(this.timerHandler),null===(M=this.signWindow)||void 0===M||M.close(),this.signWindow=null,this.unloadHandler&&window.removeEventListener("beforeunload",this.unloadHandler)}}},64099:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.createAction=s.parseArgs=void 0;const h=p(98538),M=p(71836);s.parseArgs=m=>"string"==typeof m?Buffer.from(m,"base64"):m;s.createAction=m=>{switch(m.type){case"CreateAccount":return M.transactions.createAccount();case"DeployContract":{const{code:y}=m.params;return M.transactions.deployContract(y)}case"FunctionCall":{const{methodName:y,args:b,gas:S,deposit:_}=m.params;return M.transactions.functionCall(y,(0,s.parseArgs)(b),new h.BN(S),new h.BN(_))}case"Transfer":{const{deposit:y}=m.params;return M.transactions.transfer(new h.BN(y))}case"Stake":{const{stake:y,publicKey:b}=m.params;return M.transactions.stake(new h.BN(y),M.utils.PublicKey.from(b))}case"AddKey":{const{publicKey:y,accessKey:b}=m.params;return M.transactions.addKey(M.utils.PublicKey.from(y),(m=>{if("FullAccess"===m)return M.transactions.fullAccessKey();const{receiverId:y,methodNames:b=[]}=m,S=m.allowance?new h.BN(m.allowance):void 0;return M.transactions.functionCallAccessKey(y,b,S)})(b.permission))}case"DeleteKey":{const{publicKey:y}=m.params;return M.transactions.deleteKey(M.utils.PublicKey.from(y))}case"DeleteAccount":{const{beneficiaryId:y}=m.params;return M.transactions.deleteAccount(y)}default:throw new Error("Invalid action type")}}},19169:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0})},73530:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(y,b,S,_){return new(S||(S=Promise))(function(P,x){function T(j){try{N(_.next(j))}catch(B){x(B)}}function L(j){try{N(_.throw(j))}catch(B){x(B)}}function N(j){j.done?P(j.value):function A(P){return P instanceof S?P:new S(function(x){x(P)})}(j.value).then(T,L)}N((_=_.apply(y,b||[])).next())})},M=this&&this.__rest||function(y,b){var S={};for(var _ in y)Object.prototype.hasOwnProperty.call(y,_)&&b.indexOf(_)<0&&(S[_]=y[_]);if(null!=y&&"function"==typeof Object.getOwnPropertySymbols){var A=0;for(_=Object.getOwnPropertySymbols(y);A<_.length;A++)b.indexOf(_[A])<0&&Object.prototype.propertyIsEnumerable.call(y,_[A])&&(S[_[A]]=y[_[A]])}return S};Object.defineProperty(s,"__esModule",{value:!0}),s.proxyProvider=s.getRequest=s.proxyApi=s.deleteRequest=s.getResponse=s.createRequest=void 0;const w=p(45530),E=p(67701),l=p(66212);Object.defineProperty(s,"createRequest",{enumerable:!0,get:function(){return l.createRequest}}),Object.defineProperty(s,"getResponse",{enumerable:!0,get:function(){return l.getResponse}}),Object.defineProperty(s,"deleteRequest",{enumerable:!0,get:function(){return l.deleteRequest}}),Object.defineProperty(s,"proxyApi",{enumerable:!0,get:function(){return l.proxyApi}}),Object.defineProperty(s,"getRequest",{enumerable:!0,get:function(){return l.getRequest}});s.proxyProvider=y=>h(void 0,void 0,void 0,function*(){let{strategy:b,request:S,disableCleanupRequest:_,id:A,signal:P}=y,x=M(y,["strategy","request","disableCleanupRequest","id","signal"]);return null!=A?S=yield(0,l.getRequest)(A,P):A=yield(0,l.createRequest)(S,P),new Promise((T,L)=>{var N,j;const B=l.proxyApi.replace("https","wss");let V=null,G=null;const W=()=>h(void 0,void 0,void 0,function*(){V=-1,clearInterval(V),G?.close(),!0!==_&&(yield(0,l.deleteRequest)(A))}),Q=Z=>{var ee,I,o,a,d,g;switch(Z.status){case E.HereProviderStatus.APPROVING:return null===(ee=x.onApproving)||void 0===ee||ee.call(x,Z),void(null===(I=b?.onApproving)||void 0===I||I.call(b,Z));case E.HereProviderStatus.FAILED:return W(),L(new E.HereProviderError(Z.payload)),null===(o=x.onFailed)||void 0===o||o.call(x,Z),void(null===(a=b?.onFailed)||void 0===a||a.call(b,Z));case E.HereProviderStatus.SUCCESS:return W(),T(Z),null===(d=x.onSuccess)||void 0===d||d.call(x,Z),void(null===(g=b?.onSuccess)||void 0===g||g.call(b,Z))}},q=Z=>{Q({status:E.HereProviderStatus.FAILED,payload:Z})};null===(N=x.onRequested)||void 0===N||N.call(x,A,S,q),null===(j=b?.onRequested)||void 0===j||j.call(b,A,S,q),P?.addEventListener("abort",()=>q());const J=()=>{-1!==V&&(V=setTimeout(()=>h(void 0,void 0,void 0,function*(){var Z,ee;try{const I=yield(0,l.getResponse)(A);if(-1===V)return;Q(I),J()}catch(I){const o=E.HereProviderStatus.FAILED,a=I instanceof Error?I:void 0,d=a?.message;W(),L(new E.HereProviderError(d,a)),null===(Z=x.onFailed)||void 0===Z||Z.call(x,{status:o,payload:d}),null===(ee=b?.onFailed)||void 0===ee||ee.call(b,{status:o,payload:d})}}),3e3))};if(J(),!1===(0,w.isMobile)()){G=new WebSocket(`${B}/ws/${A}`),G.onmessage=ee=>{if(null!=ee.data)try{const I=JSON.parse(ee.data);Q(I)}catch{}}}})})},66212:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(A,P,x,T){return new(x||(x=Promise))(function(N,j){function B(W){try{G(T.next(W))}catch(Q){j(Q)}}function V(W){try{G(T.throw(W))}catch(Q){j(Q)}}function G(W){W.done?N(W.value):function L(N){return N instanceof x?N:new x(function(j){j(N)})}(W.value).then(B,V)}G((T=T.apply(A,P||[])).next())})},M=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(s,"__esModule",{value:!0}),s.createRequest=s.deleteRequest=s.getResponse=s.getRequest=s.proxyApi=void 0;const w=M(p(9562)),E=M(p(78948)),l=p(7123),m=p(45530);s.proxyApi="https://h4n.app";s.getRequest=(A,P)=>h(void 0,void 0,void 0,function*(){const x=yield fetch(`${s.proxyApi}/${A}/request`,{signal:P,headers:{"content-type":"application/json"},method:"GET"});if(!1===x.ok)throw Error(yield x.text());const{data:T}=yield x.json();return JSON.parse((0,l.base_decode)(T).toString("utf8"))});s.getResponse=A=>h(void 0,void 0,void 0,function*(){var P,x,T,L;const N=yield fetch(`${s.proxyApi}/${A}/response`,{headers:{"content-type":"application/json"},method:"GET"});if(!1===N.ok)throw Error(yield N.text());const{data:j}=yield N.json(),B=null!==(P=JSON.parse(j))&&void 0!==P?P:{};return{account_id:null!==(x=B.account_id)&&void 0!==x?x:"",payload:null!==(T=B.payload)&&void 0!==T?T:"",status:null!==(L=B.status)&&void 0!==L?L:-1,topic:B.topic}});s.deleteRequest=A=>h(void 0,void 0,void 0,function*(){const P=yield fetch(`${s.proxyApi}/${A}`,{headers:{"content-type":"application/json"},method:"DELETE"});if(!1===P.ok)throw Error(yield P.text())});s.createRequest=(A,P)=>h(void 0,void 0,void 0,function*(){const x=(0,l.base_encode)(JSON.stringify(Object.assign(Object.assign({},A),{_id:(0,E.default)()}))),T=(0,w.default)(x),N=Buffer.from(T,"hex").toString("base64").replaceAll("/","_").replaceAll("-","+").slice(0,13),j=yield fetch(`${s.proxyApi}/${N}/request`,{method:"POST",signal:P,body:JSON.stringify({topic_id:(0,m.getDeviceId)(),data:x}),headers:{"content-type":"application/json"}});if(!1===j.ok)throw Error(yield j.text());return N})},84960:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(E,l,m,y){void 0===y&&(y=m),Object.defineProperty(E,y,{enumerable:!0,get:function(){return l[m]}})}:function(E,l,m,y){void 0===y&&(y=m),E[y]=l[m]}),M=this&&this.__exportStar||function(E,l){for(var m in E)"default"!==m&&!Object.prototype.hasOwnProperty.call(l,m)&&h(l,E,m)};Object.defineProperty(s,"__esModule",{value:!0}),s.HereWallet=void 0;var w=p(5238);Object.defineProperty(s,"HereWallet",{enumerable:!0,get:function(){return w.HereWallet}}),M(p(64099),s),M(p(82253),s),M(p(37996),s),M(p(19169),s),M(p(45173),s),M(p(55217),s),M(p(67701),s),M(p(37874),s),M(p(45530),s),M(p(73530),s)},11867:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(_,A,P,x){void 0===x&&(x=P),Object.defineProperty(_,x,{enumerable:!0,get:function(){return A[P]}})}:function(_,A,P,x){void 0===x&&(x=P),_[x]=A[P]}),M=this&&this.__setModuleDefault||(Object.create?function(_,A){Object.defineProperty(_,"default",{enumerable:!0,value:A})}:function(_,A){_.default=A}),w=this&&this.__importStar||function(_){if(_&&_.__esModule)return _;var A={};if(null!=_)for(var P in _)"default"!==P&&Object.prototype.hasOwnProperty.call(_,P)&&h(A,_,P);return M(A,_),A},E=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(s,"__esModule",{value:!0}),s.verifySignature=s.authPayloadSchema=s.AuthPayload=void 0;const l=w(p(21531)),m=E(p(1520)),y=p(8127);class b{constructor({message:A,nonce:P,recipient:x,callbackUrl:T}){this.tag=2147484061,this.message=A,this.nonce=P,this.recipient=x,T&&(this.callbackUrl=T)}}s.AuthPayload=b,s.authPayloadSchema=new Map([[b,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),s.verifySignature=function S(_,A){const P=new b(_),x=l.serialize(s.authPayloadSchema,P),T=Uint8Array.from(m.default.sha256.array(x));let L=new Uint8Array(Buffer.from(A.signature,"base64"));return y.PublicKey.from(A.publicKey).verify(T,L)}},67701:(ne,s)=>{"use strict";var M;Object.defineProperty(s,"__esModule",{value:!0}),s.HereProviderError=s.HereProviderStatus=void 0,(M=s.HereProviderStatus||(s.HereProviderStatus={}))[M.APPROVING=1]="APPROVING",M[M.FAILED=2]="FAILED",M[M.SUCCESS=3]="SUCCESS";class h extends Error{constructor(w,E){super(w??E?.message),this.payload=w,this.parentError=E}}s.HereProviderError=h},37874:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0})},45530:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(A,P,x,T){return new(x||(x=Promise))(function(N,j){function B(W){try{G(T.next(W))}catch(Q){j(Q)}}function V(W){try{G(T.throw(W))}catch(Q){j(Q)}}function G(W){W.done?N(W.value):function L(N){return N instanceof x?N:new x(function(j){j(N)})}(W.value).then(B,V)}G((T=T.apply(A,P||[])).next())})},M=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(s,"__esModule",{value:!0}),s.isValidAccessKey=s.internalThrow=s.getPublicKeys=s.serializeActions=s.isMobile=s.getDeviceId=void 0;const w=M(p(78948)),E=p(67701);s.getDeviceId=()=>{const A=window.localStorage.getItem("herewallet-topic")||(0,w.default)();return window.localStorage.setItem("herewallet-topic",A),A};s.isMobile=()=>window.matchMedia("(any-pointer:coarse)").matches;s.serializeActions=A=>A.map(P=>{if("FunctionCall"!==P.type)return P;let{args:x,deposit:T,gas:L,methodName:N}=P.params;return ArrayBuffer.isView(x)&&(x=Buffer.from(x.buffer,x.byteOffset,x.byteLength)),x instanceof Buffer&&(x=x.toString("base64")),{type:P.type,params:{args:x,deposit:T,gas:L,methodName:N}}});s.getPublicKeys=(A,P)=>h(void 0,void 0,void 0,function*(){const x=yield fetch(A,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:"dontcare",method:"query",params:{request_type:"view_access_key_list",finality:"final",account_id:P}}),headers:{"content-type":"application/json"}});return!1===x.ok?[]:(yield x.json()).result.keys});s.internalThrow=(A,P)=>{var x,T,L;if(A instanceof E.HereProviderError)throw A;const N={payload:A instanceof Error?A.message:"UNKNOWN",status:E.HereProviderStatus.FAILED,account_id:""};throw null===(x=P.onFailed)||void 0===x||x.call(P,N),null===(L=null===(T=P?.strategy)||void 0===T?void 0:T.onFailed)||void 0===L||L.call(T,N),A};s.isValidAccessKey=(A,P,x)=>{const{permission:T}=P.access_key;if("FullAccess"===T)return!0;if(T.FunctionCall){const{receiver_id:L,method_names:N}=T.FunctionCall;if(L===A&&N.includes("add_request_and_confirm"))return!0;if(L===x.receiverId)return 1===x.actions.length&&x.actions.every(j=>"FunctionCall"===j.type&&((!j.params.deposit||"0"===j.params.deposit.toString())&&(0===N.length||N.includes(j.params.methodName))))}return!1}},5238:function(ne,s,p){"use strict";var h=this&&this.__awaiter||function(V,G,W,Q){return new(W||(W=Promise))(function(J,Z){function ee(a){try{o(Q.next(a))}catch(d){Z(d)}}function I(a){try{o(Q.throw(a))}catch(d){Z(d)}}function o(a){a.done?J(a.value):function q(J){return J instanceof W?J:new W(function(Z){Z(J)})}(a.value).then(ee,I)}o((Q=Q.apply(V,G||[])).next())})},M=this&&this.__rest||function(V,G){var W={};for(var Q in V)Object.prototype.hasOwnProperty.call(V,Q)&&G.indexOf(Q)<0&&(W[Q]=V[Q]);if(null!=V&&"function"==typeof Object.getOwnPropertySymbols){var q=0;for(Q=Object.getOwnPropertySymbols(V);qnew L.WidgetStrategy),defaultProvider:J=x.proxyProvider}={}){this.authStorage=Q,this.defaultProvider=J,this.defaultStrategy=q;const Z=new E.InMemorySigner(this.authStorage),ee=new l.JsonRpcProvider({url:G??`https://rpc.${W}.near.org`});this.connection=E.Connection.fromConfig({jsvmAccountId:`jsvm.${W}`,provider:ee,networkId:W,signer:Z})}get rpc(){return this.connection.provider}get signer(){return this.connection.signer}get networkId(){return this.connection.networkId}account(G){return h(this,void 0,void 0,function*(){const W=G??(yield this.authStorage.getActiveAccount(this.networkId));if(null==W)throw new j("Wallet not signed in");return new E.Account(this.connection,W)})}isSignedIn(){return h(this,void 0,void 0,function*(){return null!=(yield this.authStorage.getActiveAccount(this.networkId))})}signOut(){return h(this,void 0,void 0,function*(){const G=yield this.authStorage.getActiveAccount(this.networkId);if(null==G)throw new j("Wallet not signed in");const W=yield this.authStorage.getKey(this.networkId,G);if(null!=W){const Q=W.getPublicKey().toString();yield this.silentSignAndSendTransaction({receiverId:G,actions:[{type:"DeleteKey",params:{publicKey:Q}}]}).catch(()=>{})}yield this.authStorage.removeKey(this.networkId,G)})}getHereBalance(G){return h(this,void 0,void 0,function*(){const W=yield this.account(G),Q="mainnet"===this.networkId?"here.storage.near":"here.storage.testnet",q=yield W.viewFunction({args:{account_id:W.accountId},methodName:"ft_balance_of",contractId:Q}).catch(()=>"0");return new S.default(q)})}getAvailableBalance(G){return h(this,void 0,void 0,function*(){const Q=yield(yield this.account(G)).getAccountBalance(),q=yield this.getHereBalance();return new S.default(Q.available).add(new S.default(q))})}getAccounts(){return h(this,void 0,void 0,function*(){return yield this.authStorage.getAccounts(this.networkId)})}getAccountId(){return h(this,void 0,void 0,function*(){const G=yield this.authStorage.getActiveAccount(this.networkId);if(null==G)throw new j("Wallet not signed in");return G})}switchAccount(G){return h(this,void 0,void 0,function*(){if(null==(yield this.authStorage.getKey(this.networkId,G)))throw new Error(`Account ${G} not signed in`);yield this.authStorage.setActiveAccount(this.networkId,G)})}signIn(G={}){var W,Q,q,J,Z,{contractId:ee,allowance:I,methodNames:o=[]}=G,a=M(G,["contractId","allowance","methodNames"]);return h(this,void 0,void 0,function*(){if(null==ee){const{accountId:d}=yield this.authenticate(a);return yield this.authStorage.setKey(this.networkId,d,m.KeyPairEd25519.fromRandom()),yield this.authStorage.setActiveAccount(this.networkId,d),d}a.strategy=null!==(W=a.strategy)&&void 0!==W?W:this.defaultStrategy(),a.provider=null!==(Q=a.provider)&&void 0!==Q?Q:this.defaultProvider,null===(q=a.onInitialized)||void 0===q||q.call(a),null===(Z=null===(J=a.strategy)||void 0===J?void 0:J.onInitialized)||void 0===Z||Z.call(J);try{const d=E.KeyPair.fromRandom("ed25519"),g={receiverId:ee,methodNames:o,allowance:I},D=yield a.provider(Object.assign(Object.assign({},a),{request:{type:"call",network:this.networkId,transactions:[{actions:[{type:"AddKey",params:{publicKey:d.getPublicKey().toString(),accessKey:{permission:g}}}]}]}}));if(null==D.account_id)throw Error("Transaction is failed");return yield this.authStorage.setKey(this.networkId,D.account_id,d),yield this.authStorage.setActiveAccount(this.networkId,D.account_id),D.account_id}catch(d){throw(0,P.internalThrow)(d,a),d}})}silentSignAndSendTransaction({actions:G,receiverId:W,signerId:Q}){return h(this,void 0,void 0,function*(){const q=yield this.account(Q),J=yield this.authStorage.getKey(this.networkId,q.accountId);if(null==J)throw new j;const Z=J.getPublicKey(),ee=yield q.getAccessKeys(),I={receiverId:W,actions:G};if(!1===ee.some(a=>a.public_key===Z.toString()&&(0,P.isValidAccessKey)(q.accountId,a,I)))throw new j;return yield q.signAndSendTransaction({actions:G.map(a=>(0,T.createAction)(a)),receiverId:W??q.accountId})})}signAndSendTransaction(G){var W,Q,q,J,Z,ee,I,o;return h(this,void 0,void 0,function*(){const{signerId:a,receiverId:d,actions:g}=G,F=M(G,["signerId","receiverId","actions"]);F.strategy=null!==(W=F.strategy)&&void 0!==W?W:this.defaultStrategy(),F.provider=null!==(Q=F.provider)&&void 0!==Q?Q:this.defaultProvider,null===(q=F.onInitialized)||void 0===q||q.call(F),null===(Z=null===(J=F.strategy)||void 0===J?void 0:J.onInitialized)||void 0===Z||Z.call(J);try{const z=yield this.silentSignAndSendTransaction({receiverId:d,actions:g,signerId:a}),C={status:A.HereProviderStatus.SUCCESS,payload:z?.transaction_outcome.id};return null===(ee=F.onSuccess)||void 0===ee||ee.call(F,C),null===(o=null===(I=F.strategy)||void 0===I?void 0:I.onSuccess)||void 0===o||o.call(I,C),z}catch(z){try{if(!(z instanceof j)&&"NotEnoughAllowance"!==z?.type)throw(0,P.internalThrow)(z,F),z;const C=yield F.provider(Object.assign(Object.assign({},F),{request:{type:"call",transactions:[{actions:(0,P.serializeActions)(g),receiverId:d,signerId:a}],network:this.networkId}}));if(null==C.payload||null==C.account_id)throw Error("Transaction not found, but maybe executed");return yield this.rpc.txStatus(C.payload,C.account_id)}catch(C){throw(0,P.internalThrow)(C,F),C}}})}verifyMessageNEP0413(G,W){return h(this,void 0,void 0,function*(){if(!(0,N.verifySignature)(G,W))throw Error("Incorrect signature");if(!(yield(yield this.account(W.accountId)).getAccessKeys()).some(ee=>!(ee.public_key!==W.publicKey||"FullAccess"!==ee.access_key.permission)))throw Error("Signer public key is not full access");return!0})}authenticate(G={}){var W,Q,q;return h(this,void 0,void 0,function*(){const J={nonce:null!==(W=G.nonce)&&void 0!==W?W:(0,b.randomBytes)(32),recipient:null!==(Q=G.recipient)&&void 0!==Q?Q:window.location.host,message:null!==(q=G.message)&&void 0!==q?q:"Authenticate"},Z=yield this.signMessage(Object.assign(Object.assign({},J),G));return yield this.verifyMessageNEP0413(J,Z),Z})}signMessage(G){var W,Q,q,J,Z;return h(this,void 0,void 0,function*(){if(G.strategy=null!==(W=G.strategy)&&void 0!==W?W:this.defaultStrategy(),G.provider=null!==(Q=G.provider)&&void 0!==Q?Q:this.defaultProvider,null===(q=G.onInitialized)||void 0===q||q.call(G),null===(Z=null===(J=G.strategy)||void 0===J?void 0:J.onInitialized)||void 0===Z||Z.call(J),"receiver"in G)return yield this.legacySignMessage(G);const ee=yield G.provider(Object.assign(Object.assign({},G),{request:{type:"sign",message:G.message,recipient:G.recipient,nonce:Array.from(G.nonce),network:this.networkId}}));if(null==ee?.payload)throw Error("Signature not found");const{publicKey:I,signature:o,accountId:a}=JSON.parse(ee.payload);return{publicKey:I,signature:o,accountId:a}})}legacySignMessage(G){var W,{message:Q,receiver:q,nonce:J}=G,Z=M(G,["message","receiver","nonce"]);return h(this,void 0,void 0,function*(){if(null==J){let I=new Uint8Array(32);J=[...crypto.getRandomValues(I)]}const ee=yield null===(W=Z.provider)||void 0===W?void 0:W.call(Z,Object.assign(Object.assign({},Z),{request:{type:"sign",message:Q,receiver:q,nonce:J,network:this.networkId}}));if(null==ee?.payload)throw Error("Signature not found");try{const{publicKey:I,signature:o,accountId:a}=JSON.parse(ee.payload),d=new Uint8Array(Buffer.from(o,"base64")),g=JSON.stringify({message:Q,receiver:q,nonce:J}),D=new Uint8Array(y.sha256.digest("NEP0413:"+g));if(!1===m.PublicKey.from(I).verify(D,d))throw Error();const C=yield(yield this.account(a)).getAccessKeys(),f=I.toString();if(!1===C.some(se=>!(se.public_key!==f||"FullAccess"!==se.access_key.permission)))throw Error();return{signature:new Uint8Array(Buffer.from(o,"base64")),publicKey:m.PublicKey.from(I),message:"NEP0413:"+g,receiver:q,accountId:a,nonce:J}}catch{throw Error("Signature not correct")}})}signAndSendTransactions(G){var W,Q,q,J,Z,ee,I,o,{transactions:a}=G,d=M(G,["transactions"]);return h(this,void 0,void 0,function*(){d.strategy=null!==(W=d.strategy)&&void 0!==W?W:this.defaultStrategy(),d.provider=null!==(Q=d.provider)&&void 0!==Q?Q:this.defaultProvider,null===(q=d.onInitialized)||void 0===q||q.call(d),null===(Z=null===(J=d.strategy)||void 0===J?void 0:J.onInitialized)||void 0===Z||Z.call(J);let g=[];try{for(const z of a){const C=yield this.silentSignAndSendTransaction(z);g.push(C)}const D=g.map(z=>z.transaction_outcome.id).join(","),F={status:A.HereProviderStatus.SUCCESS,payload:D};return null===(ee=d.onSuccess)||void 0===ee||ee.call(d,F),null===(o=null===(I=d.strategy)||void 0===I?void 0:I.onSuccess)||void 0===o||o.call(I,F),g}catch(D){try{if(!(D instanceof j)&&"NotEnoughAllowance"!==D?.type)throw(0,P.internalThrow)(D,d),D;const F=a.slice(g.length),z=yield d.provider(Object.assign(Object.assign({},d),{request:{type:"call",transactions:F.map(f=>Object.assign(Object.assign({},f),{actions:(0,P.serializeActions)(f.actions)})),network:this.networkId}}));if(null==z.payload||null==z.account_id)throw Error("Transaction not found, but maybe executed");const C=z.payload.split(",").map(f=>this.rpc.txStatus(f,z.account_id));return yield Promise.all(C)}catch(F){throw(0,P.internalThrow)(F,d),F}}})}}},82945:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.THEME_SMALL_WINDOW_WIDTH_MAX=s.THEME_CONSTANT_BADGE_GREY_COLOR=s.THEME_CONSTANT_GREEN_COLOR=s.THEME_CONSTANT_RED_COLOR=s.THEME_CONSTANT_COLOR_DARK=s.THEME_CONSTANT_COLOR_BRAND=s.SIGN_POPUP_HEIGHT=s.SIGN_POPUP_WIDTH=void 0,s.SIGN_POPUP_WIDTH=390,s.SIGN_POPUP_HEIGHT=650,s.THEME_CONSTANT_COLOR_BRAND="#471be8",s.THEME_CONSTANT_COLOR_DARK="#101046",s.THEME_CONSTANT_RED_COLOR="#e25252",s.THEME_CONSTANT_GREEN_COLOR="#8bdaa1",s.THEME_CONSTANT_BADGE_GREY_COLOR="rgba(116,117,126,0.67)",s.THEME_SMALL_WINDOW_WIDTH_MAX=600},20534:(ne,s)=>{"use strict";var M;Object.defineProperty(s,"__esModule",{value:!0}),s.ENearNetworkSuffix=s.ENearNetwork=void 0,(M=s.ENearNetwork||(s.ENearNetwork={})).localnet="localnet",M.testnet="testnet",M.betanet="betanet",M.mainnet="mainnet",function(M){M.testnet=".testnet",M.mainnet=".near"}(s.ENearNetworkSuffix||(s.ENearNetworkSuffix={}))},61483:(ne,s)=>{"use strict";var p,w;Object.defineProperty(s,"__esModule",{value:!0}),s.getExternalActionErrorMessageForEndTag=s.EDappActionErrorTag=void 0,(w=p=s.EDappActionErrorTag||(s.EDappActionErrorTag={})).NEW_ACTION_STARTED="NEW_ACTION_STARTED",w.INCOMPLETE_ACTION="INCOMPLETE_ACTION",w.NO_ACCOUNTS="NO_ACCOUNTS",w.WINDOW_CLOSED="WINDOW_CLOSED",w.USER_CANCELLED="USER_CANCELLED",w.POPUP_WINDOW_REFUSED="POPUP_WINDOW_REFUSED",w.POPUP_WINDOW_OPEN_FAILED="POPUP_WINDOW_OPEN_FAILED";const h={[p.WINDOW_CLOSED]:"User closed the window",[p.INCOMPLETE_ACTION]:"User didn't complete the action",[p.NEW_ACTION_STARTED]:"A new action was started by the user, old action failed",[p.POPUP_WINDOW_OPEN_FAILED]:"Popup window failed to open",[p.POPUP_WINDOW_REFUSED]:"User refused to allow the popup window to open",[p.USER_CANCELLED]:"User cancelled the action",[p.NO_ACCOUNTS]:"No Meteor account found- try again after creating one"};s.getExternalActionErrorMessageForEndTag=function M(w){return h[w]??"An unknown error occurred"}},18788:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.EDappActionConnectionStatus=s.EDappActionSource=s.EMeteorInjectedFeature=s.EMeteorExtensionDirectActionType=s.EWalletExternalActionStatus=s.EWalletExternalAction_SignIn_AccessType=s.EMeteorWalletSignInType=s.EExternalActionType=s.MeteorActionError=void 0;const h=p(61483);class M extends Error{constructor(P,x){super(),null==P.message&&(P.message=(0,h.getExternalActionErrorMessageForEndTag)(P.endTags?.[P.endTags.length-1]??"unknown")),this._reason=P,this.message=P.message,this.name="MeteorActionError",this.cause=x}}var A;s.MeteorActionError=M,(A=s.EExternalActionType||(s.EExternalActionType={})).login="login",A.sign="sign",A.logout="logout",A.verify_owner="verify_owner",A.keypom_claim="keypom_claim",A.sign_message="sign_message",function(A){A.ALL_METHODS="ALL_METHODS",A.SELECTED_METHODS="SELECTED_METHODS",A.FULL_ACCESS="FULL_ACCESS"}(s.EMeteorWalletSignInType||(s.EMeteorWalletSignInType={})),function(A){A.FULL_ACCESS="fullAccess",A.LIMITED_ACCESS="limitedAccess"}(s.EWalletExternalAction_SignIn_AccessType||(s.EWalletExternalAction_SignIn_AccessType={})),function(A){A.UNCONFIRMED="UNCONFIRMED",A.PENDING="PENDING",A.SUCCESS="SUCCESS",A.FAILURE="FAILURE"}(s.EWalletExternalActionStatus||(s.EWalletExternalActionStatus={})),function(A){A.check_sync_status="check_sync_status",A.sync_accounts="sync_accounts",A.open_page="open_page"}(s.EMeteorExtensionDirectActionType||(s.EMeteorExtensionDirectActionType={})),function(A){A.open_page="open_page",A.batch_import="batch_import",A.sync_check="sync_check",A.account_sync="account_sync"}(s.EMeteorInjectedFeature||(s.EMeteorInjectedFeature={})),function(A){A.website_callback="wcb",A.website_post_message="wpm",A.website_visit="wv",A.extension_injected="ext"}(s.EDappActionSource||(s.EDappActionSource={})),function(A){A.initializing="initializing",A.connected="connected",A.attempting_reconnect="attempting_reconnect",A.disconnected="disconnected",A.closed_success="closed_success",A.closed_fail="closed_fail",A.closed_window="closed_window"}(s.EDappActionConnectionStatus||(s.EDappActionConnectionStatus={}))},74577:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.StringUtils=s.stringToConstantStyledString=s.convertToSlug=s.pad=s.createPadder=s.BetterStringArray=s.safeAppend=s.firstNotNullEmpty=s.nullEmpty=s.notNullEmpty=s.StringRegex=void 0,s.StringRegex={digitsRegex:/\b\d+\b/gi};s.notNullEmpty=o=>null!=o&&o.length>0;s.nullEmpty=o=>!(0,s.notNullEmpty)(o);s.firstNotNullEmpty=(...o)=>{for(const a of o)if((0,s.notNullEmpty)(a))return a};s.safeAppend=(o,a,d=null)=>(0,s.notNullEmpty)(o)?o+a:d??a;function m(o,a,d=!1){return g=>y(g,o,a,d)}function y(o,a,d,g=!1){const D=d-`${o}`.length;if(D>0){const F=new Array(D).fill(a);return g?`${o}${F.join("")}`:`${F.join("")}${o}`}return`${o}`}s.BetterStringArray=class l extends Array{pushIfNotNullEmpty(a){(0,s.notNullEmpty)(a)&&this.push(a)}},s.createPadder=m,s.pad=y;const b=new RegExp("\\s+","g"),S=new RegExp("--+","g"),_=new RegExp("^-+","g"),A=new RegExp("-+$","g"),P=new RegExp("-","g"),x=new RegExp("[^\\w\\-]+","g"),T=new RegExp("_","g");s.convertToSlug=(o,{slugDivider:a="-",letterCase:d="LOWER",normalize:g=!0,excludeCharacters:D=[]}={})=>{if(!o||0===o.length)return"";let F=o.toString();return g&&(F=F.normalize("NFD")),"LOWER"===d?F=F.toLowerCase():"UPPER"===d&&(F=F.toUpperCase()),F.replace(b,"-").replace(D.length>0?new RegExp(`[^\\w\\-${D.map(z=>function L(o){return o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(z)).join("")}]+`,"g"):x,"").replace(D.includes("_")?b:T,"-").replace(S,"-").replace(_,"").replace(A,"").replace(P,a)};s.stringToConstantStyledString=o=>(0,s.convertToSlug)(o,{normalize:!0,slugDivider:"_",letterCase:"UPPER"});function V(o){return(o=o||"")!==decodeURIComponent(o)}const Z=(...o)=>o.filter(a=>a).map((a,d,g)=>{const D=0!==d,F=d!==g.length-1;return D&&(a=a.startsWith("/")?a.slice(1):a),F&&(a=a.endsWith("/")?a.slice(0,-1):a),a}).join("/");s.StringUtils={isUriEncoded:V,decodeUriFully:o=>{let a=0;for(;V(o);)if(a+=1,o=decodeURIComponent(o),a>20)throw new Error("String Utils: Decode URI Fully: Enacted while loop too many times with attempt to decode fully.");return o},StringRegex:s.StringRegex,reverse:o=>{let a="";for(const d of o)a=`${d}${a}`;return a},notNullEmpty:s.notNullEmpty,nullEmpty:s.nullEmpty,anyNullEmpty:o=>{for(const a of o)if((0,s.nullEmpty)(a))return!0;return!1},safeAppend:s.safeAppend,createPadder:m,pad:y,convertToSlug:s.convertToSlug,stringToConstantStyledString:s.stringToConstantStyledString,removeAndTrim:(o,a,{spaceAware:d=!0,insideWords:g=!1}={})=>{let D=`${o}`;for(const F of a)if(d)if(g){const z=[new RegExp(`\\s${F}\\s`,"g"),new RegExp(`\\s${F}`,"g"),new RegExp(`${F}\\s`,"g")];for(const C of z)C.test(D)&&(console.log(`Replacing "${C}" in "${D}"`),D=D.replace(C," "),console.log(`Text after: "${D}"`))}else D.indexOf(` ${F} `)>=0?D=D.replace(` ${F} `," "):(D.startsWith(`${F} `)&&(D=D.substring(F.length+1)),D.endsWith(` ${F}`)&&(D=D.substring(0,D.length-(F.length+1))));else D.indexOf(F)>=0&&(D=D.replace(F,""));return D.trim()},sortCompareStrings:function Q(o,a){const d=o.toLowerCase(),g=a.toLowerCase();return dg?1:0},comparePure:function q(o,a){return o>a?1:oa.startsWith("http://")||a.startsWith("https://")?a:Z(o,a),isHashId:o=>{const a=o.match(/^[a-zA-Z0-9]+$/);return Boolean(a)}}},18015:(ne,s,p)=>{"use strict";var h=p(59344).default;Object.defineProperty(s,"__esModule",{value:!0}),s.EnvironmentStateAdapter_Sync=s.EnvironmentStateAdapter=void 0;s.EnvironmentStateAdapter=class M{constructor(l){this.implementation=l}setJson(l,m){var y=this;return h(function*(){yield y.implementation.setString(l,JSON.stringify(m))})()}getJson(l){var m=this;return h(function*(){const y=yield m.implementation.getString(l);if(null!=y&&"undefined"!==y&&"null"!==y)return JSON.parse(y)})()}setString(l,m){var y=this;return h(function*(){yield y.implementation.setString(l,m)})()}getString(l){var m=this;return h(function*(){const y=yield m.implementation.getString(l);if(null!=y)return y})()}createJsonGetterSetter(l){return{get:()=>this.getJson(l),set:m=>this.setJson(l,m)}}createStringGetterSetter(l){return{get:()=>this.getString(l),set:m=>this.setString(l,m)}}};s.EnvironmentStateAdapter_Sync=class w{constructor(l){this.implementation=l}setJson(l,m){this.implementation.setString(l,JSON.stringify(m))}getJson(l){const m=this.implementation.getString(l);if(null!=m&&"undefined"!==m&&"null"!==m)return JSON.parse(m)}setString(l,m){this.implementation.setString(l,m)}getString(l){const m=this.implementation.getString(l);if(null!=m)return m}clear(l){this.implementation.clear(l)}createJsonGetterSetter(l){return{get:()=>this.getJson(l),set:m=>this.setJson(l,m)}}createStringGetterSetter(l){return{get:()=>this.getString(l),set:m=>this.setString(l,m)}}}},15973:(ne,s,p)=>{"use strict";var h=p(59344).default;Object.defineProperty(s,"__esModule",{value:!0}),s.ConnectedMeteorWalletAccount=s.MeteorWallet=void 0;const M=p(71836),w=p(38445),E=p(18788),l=p(21531),m=p(74577),y=p(18015),b=p(61445),S=p(34552),_=p(18223),A=p(29761),P=p(6213),x=p(98538),V=new y.EnvironmentStateAdapter_Sync({getString:q=>window.localStorage.getItem(q),setString:(q,J)=>window.localStorage.setItem(q,J),clear:q=>window.localStorage.removeItem(q)});new y.EnvironmentStateAdapter_Sync({getString:q=>window.sessionStorage.getItem(q),setString:(q,J)=>window.sessionStorage.setItem(q,J),clear:q=>window.sessionStorage.removeItem(q)});class W{static init({walletUrl:J,...Z}){return h(function*(){const ee=new M.keyStores.BrowserLocalStorageKeyStore,I=yield(0,M.connect)({keyStore:ee,headers:{},walletUrl:(0,b.resolveWalletUrl)(Z.networkId,J),...(0,b.getNetworkPreset)(Z.networkId),...Z}),o=new W({near:I,appKeyPrefix:"near_app"});return o.isSignedIn()||(yield ee.clear()),o})()}constructor({near:J,appKeyPrefix:Z=J.config.contractName??"default"}){this._initializationPromises=[],this._near=J;const ee=Z+"_meteor_wallet_auth_key";this._authDataKey=ee,this._authData=V.getJson(ee)??{allKeys:[]},this._networkId=J.config.networkId,this._walletBaseUrl=J.config.walletUrl,this._keyStore=J.connection.signer.keyStore}isExtensionInstalled(){return null!=window.meteorWallet}isSignedIn(){return!!this._authData.accountId}getAccountId(){return this._authData.accountId}verifyOwner(J){var Z=this;return h(function*(){const ee=J.accountId??Z.getAccountId(),I=yield(0,S.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:E.EExternalActionType.verify_owner,inputs:{accountId:ee,message:J.message},network:Z._networkId});if(I.success)return I;throw new E.MeteorActionError({endTags:I.endTags,message:I.message})})()}requestSignIn(J){var Z=this;return h(function*(){const{keyPair:ee,...I}=J,o=ee??M.KeyPair.fromRandom("ed25519");let a=o.getPublicKey().toString();const d=yield(0,S.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:E.EExternalActionType.login,inputs:{public_key:a,...I},network:Z._networkId});if(d.success){const{allKeys:g,accountId:D}=d.payload;return Z._authData={accountId:D,allKeys:g,signedInContract:{contract_id:I.contract_id,public_key:a}},V.setJson(Z._authDataKey,Z._authData),yield Z._keyStore.setKey(Z._networkId,D,o),{success:!0,endTags:[],payload:{accessKey:o,accountId:D}}}throw new E.MeteorActionError({endTags:d.endTags,message:d.message})})()}signOut(){var J=this;return h(function*(){const Z=J.getAccountId();if(null!=J._authData.signedInContract&&null!=Z){const ee={accountId:Z,contractInfo:J._authData.signedInContract};yield(0,S.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:E.EExternalActionType.logout,inputs:ee,network:J._networkId})}J._authData={allKeys:[]},V.clear(J._authDataKey)})()}signMessage({message:J,nonce:Z,recipient:ee,callbackUrl:I,state:o,accountId:a}){var d=this;return h(function*(){const g=yield(0,S.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:E.EExternalActionType.sign_message,inputs:{message:J,nonce:Z,recipient:ee,callbackUrl:I,state:o,accountId:a},network:d._networkId});if(g.success)return g.payload.state=o,g;throw new E.MeteorActionError({endTags:g.endTags,message:g.message})})()}requestSignTransactions(J){var Z=this;return h(function*(){const{transactions:ee}=J,I=yield Z.transformTransactions(ee);console.log("Transformed transactions",I);const o=yield(0,S.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:E.EExternalActionType.sign,inputs:{transactions:I.map(a=>(0,l.serialize)(_.SCHEMA_V2,a)).map(a=>Buffer.from(a).toString("base64")).join(",")},network:Z._networkId});if(o.success)return o.payload.executionOutcomes;throw new E.MeteorActionError({endTags:o.endTags,message:o.message})})()}account(){const J=this.getAccountId();return(0,m.notNullEmpty)(J)&&this._connectedAccount?.accountId!==J&&(this._connectedAccount=new Q(this,this._near.connection,J)),this._connectedAccount}transformTransactions(J){var Z=this;return h(function*(){const ee=Z.account(),{networkId:I,signer:o,provider:a}=ee.connection,d=yield o.getPublicKey(ee.accountId,I);return Promise.all(J.map(function(){var g=h(function*(D,F){const z=yield ee.accessKeyForTransaction(d);if(!z)throw new Error(`Failed to find matching key for transaction sent to ${D.receiverId}`);const C=D.actions.map(k=>(0,P.createAction)(k)),f=yield a.block({finality:"final"});return(0,w.createTransaction)(ee.accountId,A.PublicKey.from(z.public_key),D.receiverId,new x.BN(z.access_key.nonce).add(new x.BN(F)).add(new x.BN(1)),C,M.utils.serialize.base_decode(f.header.hash))});return function(D,F){return g.apply(this,arguments)}}()))})()}}s.MeteorWallet=W;class Q extends M.Account{constructor(J,Z,ee){super(Z,ee),this.meteorWallet=J}signAndSendTransaction(...J){var Z=this;return h(function*(){return"string"==typeof J[0]?Z.signAndSendTransaction_direct({receiverId:J[0],actions:J[1]}):Z.signAndSendTransaction_direct(J[0])})()}trySendOrCreateTransaction({receiverId:J,actions:Z}){var ee=()=>super.signAndSendTransaction,I=this;return h(function*(){const o=yield I.connection.signer.getPublicKey(I.accountId,I.connection.networkId);let a=yield I.accessKeyForTransaction(o);if(null!=a&&"FullAccess"!==a.access_key.permission&&!(yield I.accessKeyMatchesTransaction(a,J,Z)))return{sent:!1,transaction:{receiverId:J,signerId:I.accountId,actions:Z}};if(a&&o&&o.toString()===a.public_key)try{return{executionOutcome:yield ee().call(I,{receiverId:J,actions:Z.map(d=>(0,P.createAction)(d))}),sent:!0}}catch(d){if("NotEnoughAllowance"!==d.type)throw d}return{sent:!1,transaction:{receiverId:J,signerId:I.accountId,actions:Z}}})()}signAndSendTransaction_direct({receiverId:J,actions:Z}){var ee=this;return h(function*(){const{transaction:I,sent:o,executionOutcome:a}=yield ee.trySendOrCreateTransaction({receiverId:J,actions:Z});return o?a:(yield ee.meteorWallet.requestSignTransactions({transactions:[I]}))[0]})()}accessKeyMatchesTransaction(J,Z,ee){return h(function*(){const{access_key:{permission:I}}=J;if("FullAccess"===I)return!0;if(console.log("Comparing access key and actions",{accessKey:J,receiverId:Z,actions:ee}),I.FunctionCall){const{receiver_id:o,method_names:a}=I.FunctionCall;if(o===Z&&a.includes("add_request_and_confirm"))return!0;if(o===Z){if(1!==ee.length)return!1;const d=ee[0];if(console.log(d),"FunctionCall"===d.type){const g=d.params;return(!g.deposit||"0"===g.deposit.toString())&&(0===a.length||a.includes(g.methodName))}}}return!1})()}accessKeyForTransaction(J){var Z=this;return h(function*(){const ee=yield Z.getAccessKeys();if(console.log("accessKeys",ee),J){const o=ee.find(a=>a.public_key.toString()===J.toString());if(o)return o}const I=Z.meteorWallet._authData.allKeys;for(const o of ee)if(-1!==I.indexOf(o.public_key))return o;for(const o of ee)if("FullAccess"===o.access_key.permission)return o;return null})()}}s.ConnectedMeteorWalletAccount=Q},83635:(ne,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WALLET_URL_LOCALHOST_BASE=s.WALLET_URL_PRODUCTION_BASE=s.WALLET_URL_DEV_BASE=void 0,s.WALLET_URL_DEV_BASE="https://dev.wallet.meteorwallet.app",s.WALLET_URL_PRODUCTION_BASE="https://wallet.meteorwallet.app",s.WALLET_URL_LOCALHOST_BASE="https://localhost:3000"},85538:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.setEnvConfig=s.envConfig=void 0;const h=p(83635),M=typeof window<"u"?window.localStorage.getItem("DEV__METEOR_WALLET_BASE_URL"):void 0;s.envConfig={wallet_base_url:M??h.WALLET_URL_PRODUCTION_BASE},s.setEnvConfig=function w(E){Object.assign(s.envConfig,E)}},96831:function(ne,s,p){"use strict";var h=this&&this.__createBinding||(Object.create?function(l,m,y,b){void 0===b&&(b=y);var S=Object.getOwnPropertyDescriptor(m,y);(!S||("get"in S?!m.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return m[y]}}),Object.defineProperty(l,b,S)}:function(l,m,y,b){void 0===b&&(b=y),l[b]=m[y]}),M=this&&this.__exportStar||function(l,m){for(var y in l)"default"!==y&&!Object.prototype.hasOwnProperty.call(m,y)&&h(m,l,y)};Object.defineProperty(s,"__esModule",{value:!0}),s.setEnvConfig=s.ENearNetwork=void 0,M(p(15973),s),M(p(61445),s),M(p(83635),s),M(p(18788),s);var w=p(20534);Object.defineProperty(s,"ENearNetwork",{enumerable:!0,get:function(){return w.ENearNetwork}});var E=p(85538);Object.defineProperty(s,"setEnvConfig",{enumerable:!0,get:function(){return E.setEnvConfig}})},18223:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SCHEMA_V2=void 0;const h=p(29761),M=p(38445);s.SCHEMA_V2=new Map([[M.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[M.SignedTransaction,{kind:"struct",fields:[["transaction",M.Transaction],["signature",M.Signature]]}],[M.Transaction,{kind:"struct",fields:[["signerId","string"],["publicKey",h.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[M.Action]]]}],[h.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[M.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",M.AccessKeyPermission]]}],[M.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",M.FunctionCallPermission],["fullAccess",M.FullAccessPermission]]}],[M.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[M.FullAccessPermission,{kind:"struct",fields:[]}],[M.Action,{kind:"enum",field:"enum",values:[["createAccount",M.CreateAccount],["deployContract",M.DeployContract],["functionCall",M.FunctionCall],["transfer",M.Transfer],["stake",M.Stake],["addKey",M.AddKey],["deleteKey",M.DeleteKey],["deleteAccount",M.DeleteAccount],["signedDelegate",M.SignedDelegate]]}],[M.CreateAccount,{kind:"struct",fields:[]}],[M.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[M.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[M.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[M.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",h.PublicKey]]}],[M.AddKey,{kind:"struct",fields:[["publicKey",h.PublicKey],["accessKey",M.AccessKey]]}],[M.DeleteKey,{kind:"struct",fields:[["publicKey",h.PublicKey]]}],[M.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[M.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[M.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",h.PublicKey]]}],[M.SignedDelegate,{kind:"struct",fields:[["delegateAction",M.DelegateAction],["signature",M.Signature]]}]])},34552:(ne,s,p)=>{"use strict";var h=p(59344).default;Object.defineProperty(s,"__esModule",{value:!0}),s.getMeteorPostMessenger=void 0;const M=p(27184),w=p(85538),E=p(18788),l=p(63230),m=p(61483),y=p(82945);class b{constructor(T,L){const N=w.envConfig.wallet_base_url,j=new URL(N);if(this.walletOrigin=j.origin,null==window.meteorCom){this.comType=E.EDappActionSource.website_post_message,console.log("No extension found. Need to connect to web popup for Meteor communication");const B={source:E.EDappActionSource.website_post_message,connectionUid:T.uid},V=y.SIGN_POPUP_WIDTH,G=y.SIGN_POPUP_HEIGHT,W=window.top.outerHeight/2+window.top.screenY-G/2,Q=window.top.outerWidth/2+window.top.screenX-V/2,q=window.open(`${N}/connect/${T.network}/${T.actionType}?${(0,l.stringify)(B)}`,"_blank",`popup=1,width=${V},height=${G},top=${W},left=${Q}`);if(null==q)throw new E.MeteorActionError({message:"Couldn't open popup window to complete wallet action",endTags:[m.EDappActionErrorTag.POPUP_WINDOW_OPEN_FAILED]});this.websiteWindow=q,window.addEventListener("message",J=>L(J.data)),this.wasOpened=!1}else this.comType=E.EDappActionSource.extension_injected,this.wasOpened=!0,window.meteorCom.addMessageDataListener(L)}focus(){this.comType===E.EDappActionSource.website_post_message&&this.websiteWindow?.focus()}sendMessage(T){this.comType===E.EDappActionSource.website_post_message?this.websiteWindow?.postMessage(T,this.walletOrigin):window.meteorCom?.sendMessageData(T)}isWindowClosed(){return this.comType===E.EDappActionSource.website_post_message&&(this.websiteWindow?.closed??!0)}hasActiveWindow(){return this.comType!==E.EDappActionSource.website_post_message||null!=this.websiteWindow}close(){this.comType===E.EDappActionSource.website_post_message&&delete this.websiteWindow}}class _{constructor(){this.connections=[];const T=w.envConfig.wallet_base_url,L=new URL(T);this.baseWalletUrl=T,this.walletOrigin=L.origin,this.listener=N=>{if(null!=N){const j=this.connections.find(B=>B.uid===N.uid);null!=j&&(this.updateConnection(j.uid,{lastConnection:Date.now()}),N.status===E.EDappActionConnectionStatus.attempting_reconnect&&(this.updateConnection(j.uid,{status:E.EDappActionConnectionStatus.initializing}),this.sendComs()),N.status===E.EDappActionConnectionStatus.connected&&j.status===E.EDappActionConnectionStatus.initializing&&this.updateConnection(j.uid,{status:E.EDappActionConnectionStatus.connected}),N.status===E.EDappActionConnectionStatus.closed_success&&(j.resolve({success:!0,endTags:[],payload:N.payload}),this.updateConnection(j.uid,{status:E.EDappActionConnectionStatus.closed_success}),this.sendComs()),N.status===E.EDappActionConnectionStatus.closed_fail&&(this.updateConnection(j.uid,{status:E.EDappActionConnectionStatus.closed_fail}),this.sendComs(),j.reject(new E.MeteorActionError({endTags:N.endTags}))),N.status===E.EDappActionConnectionStatus.closed_window&&(this.updateConnection(j.uid,{status:E.EDappActionConnectionStatus.closed_window}),j.reject(new E.MeteorActionError({endTags:N.endTags,message:"User closed the window"}))),[E.EDappActionConnectionStatus.disconnected,E.EDappActionConnectionStatus.closed_fail,E.EDappActionConnectionStatus.closed_window,E.EDappActionConnectionStatus.closed_success].includes(N.status)&&this.removeConnection(j.uid))}}}removeConnection(T){this.connections=this.connections.filter(L=>L.uid!==T),0===this.connections.length&&(delete this.comWindow,clearInterval(this.comInterval),delete this.comInterval)}updateConnection(T,L){this.connections=this.connections.map(N=>N.uid===T?{...N,...L,uid:N.uid}:N)}sendComs(){if(this.comWindow?.hasActiveWindow()&&this.connections.length>0)if(null==this.comInterval&&(this.comInterval=setInterval(()=>this.sendComs(),450)),this.comWindow.isWindowClosed())if(this.comWindow.wasOpened){for(const T of this.connections)T.reject(new E.MeteorActionError({message:"User closed the window before completing the action",endTags:[m.EDappActionErrorTag.INCOMPLETE_ACTION,m.EDappActionErrorTag.WINDOW_CLOSED]}));this.connections=[],this.comWindow.close()}else console.log("Window is closed, need to allow popup");else{this.comWindow.wasOpened=!0;for(const{network:T,actionType:L,endTags:N,status:j,inputs:B,uid:V}of this.connections){const G={endTags:N,actionType:L,status:j,uid:V,network:T};j===E.EDappActionConnectionStatus.initializing&&(G.inputs=B),this.comWindow.sendMessage(G)}}else clearInterval(this.comInterval),delete this.comInterval}addAndStartConnection(T){if(this.connections.length>0)for(const L of this.connections)L.status=E.EDappActionConnectionStatus.disconnected,L.endTags=[m.EDappActionErrorTag.NEW_ACTION_STARTED];this.connections.push(T),null!=this.comWindow&&this.comWindow.hasActiveWindow()?this.comWindow.focus():this.comWindow=new b(T,this.listener),this.sendComs()}connectAndWaitForResponse({actionType:T,network:L,inputs:N}){var j=this;return h(function*(){let B={uid:(0,M.nanoid)(),actionType:T,lastAttemptedConnection:0,lastConnection:0,status:E.EDappActionConnectionStatus.initializing,promise:void 0,reject:void 0,resolve:void 0,currentPayload:{},inputs:N,network:L,endTags:[]};const V=new Promise((G,W)=>{B.resolve=G,B.reject=Q=>{j.connections=j.connections.filter(q=>q.uid!==B.uid),W(Q)}});return B.promise=V,j.addAndStartConnection(B),yield V})()}}let A;s.getMeteorPostMessenger=function P(){return null==A&&(A=new _),A}},61445:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.getNetworkPreset=s.resolveWalletUrl=void 0;const h=p(85538);s.resolveWalletUrl=(E,l)=>{if(l)return l;const m=h.envConfig.wallet_base_url;switch(E){case"mainnet":return`${m}/connect/mainnet`;case"testnet":return`${m}/connect/testnet`;case"betanet":return`${m}/connect/betanet`;default:throw new Error("Invalid wallet URL")}};s.getNetworkPreset=E=>{switch(E){case"mainnet":return{networkId:E,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://explorer.near.org"};case"testnet":return{networkId:E,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://explorer.testnet.near.org"};case"betanet":return{networkId:E,nodeUrl:"https://rpc.betanet.near.org",helperUrl:"https://helper.betanet.near.org",explorerUrl:"https://explorer.betanet.near.org"};default:throw Error(`Failed to find config for: '${E}'`)}}},6213:(ne,s,p)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.createAction=s.parseArgs=void 0;const h=p(98538),M=p(38445),w=p(29761);s.parseArgs=y=>"string"==typeof y?Buffer.from(y,"base64"):y;s.createAction=y=>{switch(y.type){case"CreateAccount":return M.actionCreators.createAccount();case"DeployContract":{const{code:b}=y.params;return M.actionCreators.deployContract(b)}case"FunctionCall":{const{methodName:b,args:S,gas:_,deposit:A}=y.params;return M.actionCreators.functionCall(b,(0,s.parseArgs)(S),new h.BN(_),new h.BN(A))}case"Transfer":{const{deposit:b}=y.params;return M.actionCreators.transfer(new h.BN(b))}case"Stake":{const{stake:b,publicKey:S}=y.params;return M.actionCreators.stake(new h.BN(b),w.PublicKey.from(S))}case"AddKey":{const{publicKey:b,accessKey:S}=y.params;return M.actionCreators.addKey(w.PublicKey.from(b),(y=>{if("FullAccess"===y)return M.actionCreators.fullAccessKey();const{receiverId:b,methodNames:S=[]}=y,_=y.allowance?new h.BN(y.allowance):void 0;return M.actionCreators.functionCallAccessKey(b,S,_)})(S.permission))}case"DeleteKey":{const{publicKey:b}=y.params;return M.actionCreators.deleteKey(w.PublicKey.from(b))}case"DeleteAccount":{const{beneficiaryId:b}=y.params;return M.actionCreators.deleteAccount(b)}default:throw new Error("Invalid action type")}}},87029:ne=>{"use strict";var s=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],p=typeof globalThis>"u"?global:globalThis;ne.exports=function(){for(var M=[],w=0;w{"use strict";const h=p(18958);ne.exports=l;const M=function Q(){function q(J){return typeof J<"u"&&J}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return q(self)||q(window)||q(this)||{}}}().console||{},w={mapHttpRequest:L,mapHttpResponse:L,wrapRequestSerializer:N,wrapResponseSerializer:N,wrapErrorSerializer:N,req:L,res:L,err:function x(q){const J={type:q.constructor.name,msg:q.message,stack:q.stack};for(const Z in q)void 0===J[Z]&&(J[Z]=q[Z]);return J}};function l(q){(q=q||{}).browser=q.browser||{};const J=q.browser.transmit;if(J&&"function"!=typeof J.send)throw Error("pino: transmit option must have a send function");const Z=q.browser.write||M;q.browser.write&&(q.browser.asObject=!0);const ee=q.serializers||{},I=function E(q,J){return Array.isArray(q)?q.filter(function(ee){return"!stdSerializers.err"!==ee}):!0===q&&Object.keys(J)}(q.browser.serialize,ee);let o=q.browser.serialize;Array.isArray(q.browser.serialize)&&q.browser.serialize.indexOf("!stdSerializers.err")>-1&&(o=!1);"function"==typeof Z&&(Z.error=Z.fatal=Z.warn=Z.info=Z.debug=Z.trace=Z),!1===q.enabled&&(q.level="silent");const d=q.level||"info",g=Object.create(Z);g.log||(g.log=j),Object.defineProperty(g,"levelVal",{get:function F(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(g,"level",{get:function z(){return this._level},set:function C(k){if("silent"!==k&&!this.levels.values[k])throw Error("unknown level "+k);this._level=k,m(D,g,"error","log"),m(D,g,"fatal","error"),m(D,g,"warn","error"),m(D,g,"info","log"),m(D,g,"debug","log"),m(D,g,"trace","log")}});const D={transmit:J,serialize:I,asObject:q.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:T(q)};return g.levels=l.levels,g.level=d,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=j,g.serializers=ee,g._serialize=I,g._stdErrSerialize=o,g.child=function f(k,se){if(!k)throw new Error("missing bindings for child Pino");se=se||{},I&&k.serializers&&(se.serializers=k.serializers);const te=se.serializers;if(I&&te){var oe=Object.assign({},ee,te),de=!0===q.browser.serialize?Object.keys(oe):I;delete k.serializers,S([k],de,oe,this._stdErrSerialize)}function Ie(ye){this._childLevel=1+(0|ye._childLevel),this.error=_(ye,k,"error"),this.fatal=_(ye,k,"fatal"),this.warn=_(ye,k,"warn"),this.info=_(ye,k,"info"),this.debug=_(ye,k,"debug"),this.trace=_(ye,k,"trace"),oe&&(this.serializers=oe,this._serialize=de),J&&(this._logEvent=P([].concat(ye._logEvent.bindings,k)))}return Ie.prototype=this,new Ie(this)},J&&(g._logEvent=P()),g}function m(q,J,Z,ee){const I=Object.getPrototypeOf(J);J[Z]=J.levelVal>J.levels.values[Z]?j:I[Z]?I[Z]:M[Z]||M[ee]||j,function y(q,J,Z){!q.transmit&&J[Z]===j||(J[Z]=function(ee){return function(){const o=q.timestamp(),a=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===M?M:this;for(var g=0;g-1&&o in Z&&(q[I][o]=Z[o](q[I][o]))}function _(q,J,Z){return function(){const ee=new Array(1+arguments.length);ee[0]=J;for(var I=1;I{"use strict";function h(w,E,l,m,y,b,S){try{var _=w[b](S),A=_.value}catch(P){return void l(P)}_.done?E(A):Promise.resolve(A).then(m,y)}function M(w){return function(){var E=this,l=arguments;return new Promise(function(m,y){var b=w.apply(E,l);function S(A){h(b,m,y,S,_,"next",A)}function _(A){h(b,m,y,S,_,"throw",A)}S(void 0)})}}p.d(s,{Z:()=>M})},27184:(ne,s,p)=>{"use strict";p.r(s),p.d(s,{customAlphabet:()=>E,customRandom:()=>w,nanoid:()=>l,random:()=>M,urlAlphabet:()=>h});let h="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",M=m=>crypto.getRandomValues(new Uint8Array(m)),w=(m,y,b)=>{let S=(2<{let P="";for(;;){let x=b(_),T=_;for(;T--;)if(P+=m[x[T]&S]||"",P.length===A)return P}}},E=(m,y=21)=>w(m,y,M),l=(m=21)=>crypto.getRandomValues(new Uint8Array(m)).reduce((y,b)=>y+=(b&=63)<36?b.toString(36):b<62?(b-26).toString(36).toUpperCase():b>62?"-":"_","")},36953:(ne,s,p)=>{"use strict";p.d(s,{t0:()=>oe,zv:()=>F,uA:()=>f,uc:()=>at,jb:()=>Re,zb:()=>se,AV:()=>D,Ic:()=>ft,Vs:()=>wn});var h=p(49671);Symbol();const w=Symbol();const y=Object.getPrototypeOf,b=new WeakMap,S=ze=>ze&&(b.has(ze)?b.get(ze):y(ze)===Object.prototype||y(ze)===Array.prototype),j=(ze,Qe=!0)=>{b.set(ze,Qe)},G=ze=>"object"==typeof ze&&null!==ze,W=new WeakMap,Q=new WeakSet,[J]=((ze=Object.is,Qe=((ut,wt)=>new Proxy(ut,wt)),Ht=(ut=>G(ut)&&!Q.has(ut)&&(Array.isArray(ut)||!(Symbol.iterator in ut))&&!(ut instanceof WeakMap)&&!(ut instanceof WeakSet)&&!(ut instanceof Error)&&!(ut instanceof Number)&&!(ut instanceof Date)&&!(ut instanceof String)&&!(ut instanceof RegExp)&&!(ut instanceof ArrayBuffer)),pt=(ut=>{switch(ut.status){case"fulfilled":return ut.value;case"rejected":throw ut.reason;default:throw ut}}),vt=new WeakMap,$t=((ut,wt,Sn=pt)=>{const yt=vt.get(ut);if(yt?.[0]===wt)return yt[1];const Et=Array.isArray(ut)?[]:Object.create(Object.getPrototypeOf(ut));return j(Et,!0),vt.set(ut,[wt,Et]),Reflect.ownKeys(ut).forEach(_e=>{if(Object.getOwnPropertyDescriptor(Et,_e))return;const Ee=Reflect.get(ut,_e),Me={value:Ee,enumerable:!0,configurable:!0};if(Q.has(Ee))j(Ee,!1);else if(Ee instanceof Promise)delete Me.value,Me.get=()=>Sn(Ee);else if(W.has(Ee)){const[me,Oe]=W.get(Ee);Me.value=$t(me,Oe(),Sn)}Object.defineProperty(Et,_e,Me)}),Object.preventExtensions(Et)}),dt=new WeakMap,gt=[1,1],mn=(ut=>{if(!G(ut))throw new Error("object required");const wt=dt.get(ut);if(wt)return wt;let Sn=gt[0];const yt=new Set,Et=(kt,Ot=++gt[0])=>{Sn!==Ot&&(Sn=Ot,yt.forEach(Nt=>Nt(kt,Ot)))};let _e=gt[1];const Me=kt=>(Ot,Nt)=>{const Lt=[...Ot];Lt[1]=[kt,...Lt[1]],Et(Lt,Nt)},me=new Map,Ke=kt=>{var Ot;const Nt=me.get(kt);Nt&&(me.delete(kt),null==(Ot=Nt[1])||Ot.call(Nt))},Ye=Array.isArray(ut)?[]:Object.create(Object.getPrototypeOf(ut)),Bt=Qe(Ye,{deleteProperty(kt,Ot){const Nt=Reflect.get(kt,Ot);Ke(Ot);const Lt=Reflect.deleteProperty(kt,Ot);return Lt&&Et(["delete",[Ot],Nt]),Lt},set(kt,Ot,Nt,Lt){const nn=Reflect.has(kt,Ot),Yt=Reflect.get(kt,Ot,Lt);if(nn&&(ze(Yt,Nt)||dt.has(Nt)&&ze(Yt,dt.get(Nt))))return!0;Ke(Ot),G(Nt)&&(Nt=(ze=>S(ze)&&ze[w]||null)(Nt)||Nt);let gn=Nt;if(Nt instanceof Promise)Nt.then(an=>{Nt.status="fulfilled",Nt.value=an,Et(["resolve",[Ot],an])}).catch(an=>{Nt.status="rejected",Nt.reason=an,Et(["reject",[Ot],an])});else{!W.has(Nt)&&Ht(Nt)&&(gn=mn(Nt));const an=!Q.has(gn)&&W.get(gn);an&&((kt,Ot)=>{if(me.has(kt))throw new Error("prop listener already exists");if(yt.size){const Nt=Ot[3](Me(kt));me.set(kt,[Ot,Nt])}else me.set(kt,[Ot])})(Ot,an)}return Reflect.set(kt,Ot,gn,Lt),Et(["set",[Ot],Nt,Yt]),!0}});dt.set(ut,Bt);const It=[Ye,(kt=++gt[1])=>(_e!==kt&&!yt.size&&(_e=kt,me.forEach(([Ot])=>{const Nt=Ot[1](kt);Nt>Sn&&(Sn=Nt)})),Sn),$t,kt=>(yt.add(kt),1===yt.size&&me.forEach(([Nt,Lt],nn)=>{if(Lt)throw new Error("remove already exists");const Yt=Nt[3](Me(nn));me.set(nn,[Nt,Yt])}),()=>{yt.delete(kt),0===yt.size&&me.forEach(([Nt,Lt],nn)=>{Lt&&(Lt(),me.set(nn,[Nt]))})})];return W.set(Bt,It),Reflect.ownKeys(ut).forEach(kt=>{const Ot=Object.getOwnPropertyDescriptor(ut,kt);"value"in Ot&&(Bt[kt]=ut[kt],delete Ot.value,delete Ot.writable),Object.defineProperty(Ye,kt,Ot)}),Bt}))=>[mn,W,Q,ze,Qe,Ht,pt,vt,$t,dt,gt])();function Z(ze={}){return J(ze)}function I(ze,Qe,Ht){const pt=W.get(ze);let vt;pt||console.warn("Please use proxy object");const $t=[],dt=pt[3];let gt=!1;const ut=dt(wt=>{$t.push(wt),Ht?Qe($t.splice(0)):vt||(vt=Promise.resolve().then(()=>{vt=void 0,gt&&Qe($t.splice(0))}))});return gt=!0,()=>{gt=!1,ut()}}const g=Z({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),D={state:g,subscribe:ze=>I(g,()=>ze(g)),push(ze,Qe){ze!==g.view&&(g.view=ze,Qe&&(g.data=Qe),g.history.push(ze))},reset(ze){g.view=ze,g.history=[ze]},replace(ze){g.history.length>1&&(g.history[g.history.length-1]=ze,g.view=ze)},goBack(){if(g.history.length>1){g.history.pop();const[ze]=g.history.slice(-1);g.view=ze}},setData(ze){g.data=ze}},F={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>F.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const ze=navigator.userAgent.toLowerCase();return F.isMobile()&&(ze.includes("iphone")||ze.includes("ipad"))},isHttpUrl:ze=>ze.startsWith("http://")||ze.startsWith("https://"),isArray:ze=>Array.isArray(ze)&&ze.length>0,formatNativeUrl(ze,Qe,Ht){if(F.isHttpUrl(ze))return this.formatUniversalUrl(ze,Qe,Ht);let pt=ze;pt.includes("://")||(pt=ze.replaceAll("/","").replaceAll(":",""),pt=`${pt}://`),pt.endsWith("/")||(pt=`${pt}/`),this.setWalletConnectDeepLink(pt,Ht);return`${pt}wc?uri=${encodeURIComponent(Qe)}`},formatUniversalUrl(ze,Qe,Ht){if(!F.isHttpUrl(ze))return this.formatNativeUrl(ze,Qe,Ht);let pt=ze;pt.endsWith("/")||(pt=`${pt}/`),this.setWalletConnectDeepLink(pt,Ht);return`${pt}wc?uri=${encodeURIComponent(Qe)}`},wait:ze=>(0,h.Z)(function*(){return new Promise(Qe=>{setTimeout(Qe,ze)})})(),openHref(ze,Qe){window.open(ze,Qe,"noreferrer noopener")},setWalletConnectDeepLink(ze,Qe){try{localStorage.setItem(F.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:ze,name:Qe}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(ze){try{const[Qe]=ze.split("?");localStorage.setItem(F.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:Qe,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(F.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(F.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var ze;const Qe=null==(ze=D.state.data)?void 0:ze.Wallet;if(!Qe)throw new Error('Missing "Wallet" view data');return Qe}},C=Z({enabled:typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),f={state:C,subscribe:ze=>I(C.events,()=>ze(function o(ze,Qe){const Ht=W.get(ze);Ht||console.warn("Please use proxy object");const[pt,vt,$t]=Ht;return $t(pt,vt(),Qe)}(C.events[C.events.length-1]))),initialize(){C.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(C.userSessionId=crypto.randomUUID())},setConnectedWalletId(ze){C.connectedWalletId=ze},click(ze){if(C.enabled){const Qe={type:"CLICK",name:ze.name,userSessionId:C.userSessionId,timestamp:Date.now(),data:ze};C.events.push(Qe)}},track(ze){if(C.enabled){const Qe={type:"TRACK",name:ze.name,userSessionId:C.userSessionId,timestamp:Date.now(),data:ze};C.events.push(Qe)}},view(ze){if(C.enabled){const Qe={type:"VIEW",name:ze.name,userSessionId:C.userSessionId,timestamp:Date.now(),data:ze};C.events.push(Qe)}}},k=Z({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),se={state:k,subscribe:ze=>I(k,()=>ze(k)),setChains(ze){k.chains=ze},setWalletConnectUri(ze){k.walletConnectUri=ze},setIsCustomDesktop(ze){k.isCustomDesktop=ze},setIsCustomMobile(ze){k.isCustomMobile=ze},setIsDataLoaded(ze){k.isDataLoaded=ze},setIsUiLoaded(ze){k.isUiLoaded=ze},setIsAuth(ze){k.isAuth=ze}},te=Z({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),oe={state:te,subscribe:ze=>I(te,()=>ze(te)),setConfig(ze){var Qe,Ht;f.initialize(),se.setChains(ze.chains),se.setIsAuth(Boolean(ze.enableAuthMode)),se.setIsCustomMobile(Boolean(null==(Qe=ze.mobileWallets)?void 0:Qe.length)),se.setIsCustomDesktop(Boolean(null==(Ht=ze.desktopWallets)?void 0:Ht.length)),F.setModalVersionInStorage(),Object.assign(te,ze)}};var de=Object.defineProperty,Ie=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ae=(ze,Qe,Ht)=>Qe in ze?de(ze,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):ze[Qe]=Ht,fe=(ze,Qe)=>{for(var Ht in Qe||(Qe={}))ye.call(Qe,Ht)&&ae(ze,Ht,Qe[Ht]);if(Ie)for(var Ht of Ie(Qe))ve.call(Qe,Ht)&&ae(ze,Ht,Qe[Ht]);return ze};const pe="https://explorer-api.walletconnect.com",Se="wcm",ce="js-2.6.2";function be(ze,Qe){return Ne.apply(this,arguments)}function Ne(){return(Ne=(0,h.Z)(function*(ze,Qe){const Ht=fe({sdkType:Se,sdkVersion:ce},Qe),pt=new URL(ze,pe);return pt.searchParams.append("projectId",oe.state.projectId),Object.entries(Ht).forEach(([vt,$t])=>{$t&&pt.searchParams.append(vt,String($t))}),(yield fetch(pt)).json()})).apply(this,arguments)}const Fe={getDesktopListings:ze=>(0,h.Z)(function*(){return be("/w3m/v1/getDesktopListings",ze)})(),getMobileListings:ze=>(0,h.Z)(function*(){return be("/w3m/v1/getMobileListings",ze)})(),getInjectedListings:ze=>(0,h.Z)(function*(){return be("/w3m/v1/getInjectedListings",ze)})(),getAllListings:ze=>(0,h.Z)(function*(){return be("/w3m/v1/getAllListings",ze)})(),getWalletImageUrl:ze=>`${pe}/w3m/v1/getWalletImage/${ze}?projectId=${oe.state.projectId}&sdkType=${Se}&sdkVersion=${ce}`,getAssetImageUrl:ze=>`${pe}/w3m/v1/getAssetImage/${ze}?projectId=${oe.state.projectId}&sdkType=${Se}&sdkVersion=${ce}`};var lt=Object.defineProperty,Ge=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,tt=(ze,Qe,Ht)=>Qe in ze?lt(ze,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):ze[Qe]=Ht;const Vt=F.isMobile(),ot=Z({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),at={state:ot,getRecomendedWallets:()=>(0,h.Z)(function*(){const{explorerRecommendedWalletIds:ze,explorerExcludedWalletIds:Qe}=oe.state;if("NONE"===ze||"ALL"===Qe&&!ze)return ot.recomendedWallets;if(F.isArray(ze)){const Ht={recommendedIds:ze.join(",")},{listings:pt}=yield Fe.getAllListings(Ht),vt=Object.values(pt);vt.sort(($t,dt)=>ze.indexOf($t.id)-ze.indexOf(dt.id)),ot.recomendedWallets=vt}else{const{chains:Ht,isAuth:pt}=se.state,vt=Ht?.join(","),$t=F.isArray(Qe),dt={page:1,sdks:pt?"auth_v1":void 0,entries:F.RECOMMENDED_WALLET_AMOUNT,chains:vt,version:2,excludedIds:$t?Qe.join(","):void 0},{listings:gt}=Vt?yield Fe.getMobileListings(dt):yield Fe.getDesktopListings(dt);ot.recomendedWallets=Object.values(gt)}return ot.recomendedWallets})(),getWallets:ze=>(0,h.Z)(function*(){const Qe=((ze,Qe)=>{for(var Ht in Qe||(Qe={}))He.call(Qe,Ht)&&tt(ze,Ht,Qe[Ht]);if(Ge)for(var Ht of Ge(Qe))Kt.call(Qe,Ht)&&tt(ze,Ht,Qe[Ht]);return ze})({},ze),{explorerRecommendedWalletIds:Ht,explorerExcludedWalletIds:pt}=oe.state,{recomendedWallets:vt}=ot;if("ALL"===pt)return ot.wallets;vt.length?Qe.excludedIds=vt.map(Sn=>Sn.id).join(","):F.isArray(Ht)&&(Qe.excludedIds=Ht.join(",")),F.isArray(pt)&&(Qe.excludedIds=[Qe.excludedIds,pt].filter(Boolean).join(",")),se.state.isAuth&&(Qe.sdks="auth_v1");const{page:$t,search:dt}=ze,{listings:gt,total:mn}=Vt?yield Fe.getMobileListings(Qe):yield Fe.getDesktopListings(Qe),ut=Object.values(gt),wt=dt?"search":"wallets";return ot[wt]={listings:[...ot[wt].listings,...ut],total:mn,page:$t??1},{listings:ut,total:mn}})(),getWalletImageUrl:ze=>Fe.getWalletImageUrl(ze),getAssetImageUrl:ze=>Fe.getAssetImageUrl(ze),resetSearch(){ot.search={listings:[],total:0,page:1}}},Gt=Z({open:!1}),Re={state:Gt,subscribe:ze=>I(Gt,()=>ze(Gt)),open:ze=>(0,h.Z)(function*(){return new Promise(Qe=>{const{isUiLoaded:Ht,isDataLoaded:pt}=se.state;if(F.removeWalletConnectDeepLink(),se.setWalletConnectUri(ze?.uri),se.setChains(ze?.chains),D.reset("ConnectWallet"),Ht&&pt)Gt.open=!0,Qe();else{const vt=setInterval(()=>{const $t=se.state;$t.isUiLoaded&&$t.isDataLoaded&&(clearInterval(vt),Gt.open=!0,Qe())},200)}})})(),close(){Gt.open=!1}};var Ae=Object.defineProperty,Te=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,mt=(ze,Qe,Ht)=>Qe in ze?Ae(ze,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):ze[Qe]=Ht;const hn=Z({themeMode:function ct(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}()?"dark":"light"}),ft={state:hn,subscribe:ze=>I(hn,()=>ze(hn)),setThemeConfig(ze){const{themeMode:Qe,themeVariables:Ht}=ze;Qe&&(hn.themeMode=Qe),Ht&&(hn.themeVariables=((ze,Qe)=>{for(var Ht in Qe||(Qe={}))Be.call(Qe,Ht)&&mt(ze,Ht,Qe[Ht]);if(Te)for(var Ht of Te(Qe))Ve.call(Qe,Ht)&&mt(ze,Ht,Qe[Ht]);return ze})({},Ht))}},At=Z({open:!1,message:"",variant:"success"}),wn={state:At,subscribe:ze=>I(At,()=>ze(At)),openToast(ze,Qe){At.open=!0,At.message=ze,At.variant=Qe},closeToast(){At.open=!1}}},62949:(ne,s,p)=>{"use strict";function h(N,j,B){return j<=N&&N<=B}function M(N){if(void 0===N)return{};if(N===Object(N))return N;throw TypeError("Could not convert argument to dictionary")}p.r(s),p.d(s,{TextDecoder:()=>P,TextEncoder:()=>x});var l=-1;function m(N){this.tokens=[].slice.call(N)}m.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():l},prepend:function(N){if(Array.isArray(N))for(var j=N;j.length;)this.tokens.unshift(j.pop());else this.tokens.unshift(N)},push:function(N){if(Array.isArray(N))for(var j=N;j.length;)this.tokens.push(j.shift());else this.tokens.push(N)}};var y=-1;function b(N,j){if(N)throw TypeError("Decoder error");return j||65533}(function S(){}).prototype={handler:function(N,j){}},function _(){}.prototype={handler:function(N,j){}};var A="utf-8";function P(N,j){if(!(this instanceof P))return new P(N,j);if((N=void 0!==N?String(N).toLowerCase():A)!==A)throw new Error("Encoding not supported. Only utf-8 is supported");j=M(j),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(j.fatal),this._ignoreBOM=Boolean(j.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function x(N,j){if(!(this instanceof x))return new x(N,j);if((N=void 0!==N?String(N).toLowerCase():A)!==A)throw new Error("Encoding not supported. Only utf-8 is supported");j=M(j),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(j.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function T(N){var j=N.fatal,B=0,V=0,G=0,W=128,Q=191;this.handler=function(q,J){if(J===l&&0!==G)return G=0,b(j);if(J===l)return y;if(0===G){if(h(J,0,127))return J;if(h(J,194,223))G=1,B=J-192;else if(h(J,224,239))224===J&&(W=160),237===J&&(Q=159),G=2,B=J-224;else{if(!h(J,240,244))return b(j);240===J&&(W=144),244===J&&(Q=143),G=3,B=J-240}return B<<=6*G,null}if(!h(J,W,Q))return B=G=V=0,W=128,Q=191,q.prepend(J),b(j);if(W=128,Q=191,B+=J-128<<6*(G-(V+=1)),V!==G)return null;var Z=B;return B=G=V=0,Z}}function L(N){N.fatal;this.handler=function(B,V){if(V===l)return y;if(h(V,0,127))return V;var G,W;h(V,128,2047)?(G=1,W=192):h(V,2048,65535)?(G=2,W=224):h(V,65536,1114111)&&(G=3,W=240);for(var Q=[(V>>6*G)+W];G>0;){var q=V>>6*(G-1);Q.push(128|63&q),G-=1}return Q}}P.prototype={decode:function(j,B){var V;V="object"==typeof j&&j instanceof ArrayBuffer?new Uint8Array(j):"object"==typeof j&&"buffer"in j&&j.buffer instanceof ArrayBuffer?new Uint8Array(j.buffer,j.byteOffset,j.byteLength):new Uint8Array(0),B=M(B),this._streaming||(this._decoder=new T({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(B.stream);for(var Q,G=new m(V),W=[];!G.endOfStream()&&(Q=this._decoder.handler(G,G.read()))!==y;)null!==Q&&(Array.isArray(Q)?W.push.apply(W,Q):W.push(Q));if(!this._streaming){do{if((Q=this._decoder.handler(G,G.read()))===y)break;null!==Q&&(Array.isArray(Q)?W.push.apply(W,Q):W.push(Q))}while(!G.endOfStream());this._decoder=null}return W.length&&-1!==["utf-8"].indexOf(this.encoding)&&!this._ignoreBOM&&!this._BOMseen&&(65279===W[0]?(this._BOMseen=!0,W.shift()):this._BOMseen=!0),function E(N){for(var j="",B=0;B>10),56320+(1023&V)))}return j}(W)}},x.prototype={encode:function(j,B){j=j?String(j):"",B=M(B),this._streaming||(this._encoder=new L(this._options)),this._streaming=Boolean(B.stream);for(var W,V=[],G=new m(function w(N){for(var j=String(N),B=j.length,V=0,G=[];V57343)G.push(W);else if(56320<=W&&W<=57343)G.push(65533);else if(55296<=W&&W<=56319)if(V===B-1)G.push(65533);else{var Q=N.charCodeAt(V+1);if(56320<=Q&&Q<=57343){var q=1023&W,J=1023&Q;G.push(65536+(q<<10)+J),V+=1}else G.push(65533)}V+=1}return G}(j));!G.endOfStream()&&(W=this._encoder.handler(G,G.read()))!==y;)Array.isArray(W)?V.push.apply(V,W):V.push(W);if(!this._streaming){for(;(W=this._encoder.handler(G,G.read()))!==y;)Array.isArray(W)?V.push.apply(V,W):V.push(W);this._encoder=null}return new Uint8Array(V)}}},78948:(ne,s,p)=>{"use strict";p.r(s),p.d(s,{default:()=>E,uuid4:()=>w,valid:()=>M});const h=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function M(l){return h.test(l)}function w(){var l=URL.createObjectURL(new Blob),m=l.toString();return URL.revokeObjectURL(l),m.split(/[:\/]/g).pop().toLowerCase()}w.valid=M;const E=w},88546:ne=>{"use strict";ne.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},20863:ne=>{"use strict";ne.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},56584:ne=>{"use strict";ne.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},96747:ne=>{"use strict";ne.exports=JSON.parse('{"schema":{"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BreakpointTrap":{"name":"BreakpointTrap","subtypes":[],"props":{}},"CacheError":{"name":"CacheError","subtypes":["ReadError","WriteError","DeserializationError","SerializationError"],"props":{}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"DeserializationError":{"name":"DeserializationError","subtypes":[],"props":{}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"FunctionCallError":{"name":"FunctionCallError","subtypes":["CompilationError","LinkError","MethodResolveError","WasmTrap","WasmUnknownError","HostError","EvmError"],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LinkError":{"name":"LinkError","subtypes":[],"props":{"msg":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodUTF8Error","MethodNotFound","MethodInvalidSignature"],"props":{}},"MethodUTF8Error":{"name":"MethodUTF8Error","subtypes":[],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReadError":{"name":"ReadError","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SerializationError":{"name":"SerializationError","subtypes":[],"props":{"hash":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","BreakpointTrap","StackOverflow","GenericTrap"],"props":{}},"WasmUnknownError":{"name":"WasmUnknownError","subtypes":[],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"WriteError":{"name":"WriteError","subtypes":[],"props":{}},"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation"],"props":{}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"InternalError":{"name":"InternalError","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed","InternalError"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},50539:ne=>{"use strict";ne.exports=JSON.parse('{"proxyUrl":"","widgetUrl":"","polling":{"maxIterations":1000},"nearMobileWalletUrl":"near-mobile-wallet://sign"}')},87908:ne=>{"use strict";ne.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend.peersyst.tech"}')},13917:ne=>{"use strict";ne.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend_production.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend_production.peersyst.tech"}')},15247:ne=>{"use strict";ne.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend.peersyst.tech"}')},98593:ne=>{"use strict";ne.exports=JSON.parse('{"proxyUrl":"","widgetUrl":"","polling":{"maxIterations":1000},"nearMobileWalletUrl":""}')},31008:ne=>{"use strict";ne.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},64775:ne=>{"use strict";ne.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:ne=>{"use strict";ne.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},24457:ne=>{"use strict";ne.exports=JSON.parse('["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]')},44946:ne=>{"use strict";ne.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},75207:ne=>{"use strict";ne.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:ne=>{"use strict";ne.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},29799:ne=>{"use strict";ne.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},18597:ne=>{"use strict";ne.exports={i8:"6.5.4"}},73619:ne=>{"use strict";ne.exports=JSON.parse('{"v6":{"ct":"~0.10.0"}}')},22562:ne=>{"use strict";ne.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},ne=>{var h;h=21699,ne(ne.s=h)}]); \ No newline at end of file diff --git a/main.978ad2d0ff1d6c80.js b/main.978ad2d0ff1d6c80.js new file mode 100644 index 000000000..d4dfa8ad3 --- /dev/null +++ b/main.978ad2d0ff1d6c80.js @@ -0,0 +1,7 @@ +(self.webpackChunkangular=self.webpackChunkangular||[]).push([[179],{56750:(re,u,g)=>{"use strict";var p={};g.r(p),g.d(p,{identity:()=>rW});var D={};g.r(D),g.d(D,{base2:()=>iW});var w={};g.r(w),g.d(w,{base8:()=>oW});var _={};g.r(_),g.d(_,{base10:()=>sW});var l={};g.r(l),g.d(l,{base16:()=>aW,base16upper:()=>uW});var v={};g.r(v),g.d(v,{base32:()=>cW,base32hex:()=>hW,base32hexpad:()=>gW,base32hexpadupper:()=>yW,base32hexupper:()=>pW,base32pad:()=>fW,base32padupper:()=>dW,base32upper:()=>lW,base32z:()=>mW});var m={};g.r(m),g.d(m,{base36:()=>vW,base36upper:()=>bW});var b={};g.r(b),g.d(b,{base58btc:()=>wW,base58flickr:()=>AW});var M={};g.r(M),g.d(M,{base64:()=>EW,base64pad:()=>SW,base64url:()=>_W,base64urlpad:()=>MW});var E={};g.r(E),g.d(E,{base256emoji:()=>TW});var A={};g.r(A),g.d(A,{sha256:()=>QW,sha512:()=>XW});var P={};g.r(P),g.d(P,{identity:()=>$W});var x={};g.r(x),g.d(x,{code:()=>tG,decode:()=>rG,encode:()=>nG,name:()=>eG});var N={};g.r(N),g.d(N,{code:()=>aG,decode:()=>cG,encode:()=>uG,name:()=>sG});var F={};g.r(F),g.d(F,{identity:()=>FG});var L={};g.r(L),g.d(L,{base2:()=>BG});var z={};g.r(z),g.d(z,{base8:()=>jG});var j={};g.r(j),g.d(j,{base10:()=>UG});var W={};g.r(W),g.d(W,{base16:()=>KG,base16upper:()=>zG});var Y={};g.r(Y),g.d(Y,{base32:()=>VG,base32hex:()=>ZG,base32hexpad:()=>JG,base32hexpadupper:()=>QG,base32hexupper:()=>YG,base32pad:()=>WG,base32padupper:()=>GG,base32upper:()=>HG,base32z:()=>XG});var G={};g.r(G),g.d(G,{base36:()=>qG,base36upper:()=>$G});var Q={};g.r(Q),g.d(Q,{base58btc:()=>eZ,base58flickr:()=>tZ});var q={};g.r(q),g.d(q,{base64:()=>nZ,base64pad:()=>rZ,base64url:()=>iZ,base64urlpad:()=>oZ});var J={};g.r(J),g.d(J,{base256emoji:()=>lZ});var H={};g.r(H),g.d(H,{sha256:()=>TZ,sha512:()=>OZ});var te={};g.r(te),g.d(te,{identity:()=>PZ});var C={};g.r(C),g.d(C,{code:()=>kZ,decode:()=>FZ,encode:()=>LZ,name:()=>RZ});var o={};g.r(o),g.d(o,{code:()=>KZ,decode:()=>VZ,encode:()=>zZ,name:()=>UZ});var s={};g.r(s),g.d(s,{identity:()=>oQ});var d={};g.r(d),g.d(d,{base2:()=>sQ});var h={};g.r(h),g.d(h,{base8:()=>aQ});var S={};g.r(S),g.d(S,{base10:()=>uQ});var k={};g.r(k),g.d(k,{base16:()=>cQ,base16upper:()=>lQ});var B={};g.r(B),g.d(B,{base32:()=>fQ,base32hex:()=>gQ,base32hexpad:()=>mQ,base32hexpadupper:()=>vQ,base32hexupper:()=>yQ,base32pad:()=>hQ,base32padupper:()=>pQ,base32upper:()=>dQ,base32z:()=>bQ});var I={};g.r(I),g.d(I,{base36:()=>wQ,base36upper:()=>AQ});var f={};g.r(f),g.d(f,{base58btc:()=>EQ,base58flickr:()=>SQ});var R={};g.r(R),g.d(R,{base64:()=>_Q,base64pad:()=>MQ,base64url:()=>DQ,base64urlpad:()=>CQ});var se={};g.r(se),g.d(se,{base256emoji:()=>NQ});var ee={};g.r(ee),g.d(ee,{sha256:()=>qQ,sha512:()=>$Q});var oe={};g.r(oe),g.d(oe,{identity:()=>tX});var de={};g.r(de),g.d(de,{code:()=>rX,decode:()=>oX,encode:()=>iX,name:()=>nX});var Ce={};function ye(t){return"function"==typeof t}function ve(t){const n=t(r=>{Error.call(r),r.stack=(new Error).stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}g.r(Ce),g.d(Ce,{code:()=>cX,decode:()=>fX,encode:()=>lX,name:()=>uX});const ae=ve(t=>function(n){t(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((r,a)=>`${a+1}) ${r.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n});function fe(t,e){if(t){const n=t.indexOf(e);0<=n&&t.splice(n,1)}}class pe{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(const y of n)y.remove(this);else n.remove(this);const{initialTeardown:r}=this;if(ye(r))try{r()}catch(y){e=y instanceof ae?y.errors:[y]}const{_finalizers:a}=this;if(a){this._finalizers=null;for(const y of a)try{be(y)}catch(T){e=e??[],T instanceof ae?e=[...e,...T.errors]:e.push(T)}}if(e)throw new ae(e)}}add(e){var n;if(e&&e!==this)if(this.closed)be(e);else{if(e instanceof pe){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}}_hasParent(e){const{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){const{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){const{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&fe(n,e)}remove(e){const{_finalizers:n}=this;n&&fe(n,e),e instanceof pe&&e._removeParent(this)}}pe.EMPTY=(()=>{const t=new pe;return t.closed=!0,t})();const Se=pe.EMPTY;function ce(t){return t instanceof pe||t&&"closed"in t&&ye(t.remove)&&ye(t.add)&&ye(t.unsubscribe)}function be(t){ye(t)?t():t.unsubscribe()}const Pe={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Fe={setTimeout(t,e,...n){const{delegate:r}=Fe;return r?.setTimeout?r.setTimeout(t,e,...n):setTimeout(t,e,...n)},clearTimeout(t){const{delegate:e}=Fe;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function lt(t){Fe.setTimeout(()=>{const{onUnhandledError:e}=Pe;if(!e)throw t;e(t)})}function Ge(){}const He=nt("C",void 0,void 0);function nt(t,e,n){return{kind:t,value:e,error:n}}let Vt=null;function ot(t){if(Pe.useDeprecatedSynchronousErrorHandling){const e=!Vt;if(e&&(Vt={errorThrown:!1,error:null}),t(),e){const{errorThrown:n,error:r}=Vt;if(Vt=null,n)throw r}}else t()}class Gt extends pe{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,ce(e)&&e.add(this)):this.destination=ct}static create(e,n,r){return new Be(e,n,r)}next(e){this.isStopped?Ze(function tt(t){return nt("N",t,void 0)}(e),this):this._next(e)}error(e){this.isStopped?Ze(function Kt(t){return nt("E",void 0,t)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Ze(He,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Re=Function.prototype.bind;function Ae(t,e){return Re.call(t,e)}class Te{constructor(e){this.partialObserver=e}next(e){const{partialObserver:n}=this;if(n.next)try{n.next(e)}catch(r){Ve(r)}}error(e){const{partialObserver:n}=this;if(n.error)try{n.error(e)}catch(r){Ve(r)}else Ve(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(n){Ve(n)}}}class Be extends Gt{constructor(e,n,r){let a;if(super(),ye(e)||!e)a={next:e??void 0,error:n??void 0,complete:r??void 0};else{let y;this&&Pe.useDeprecatedNextContext?(y=Object.create(e),y.unsubscribe=()=>this.unsubscribe(),a={next:e.next&&Ae(e.next,y),error:e.error&&Ae(e.error,y),complete:e.complete&&Ae(e.complete,y)}):a=e}this.destination=new Te(a)}}function Ve(t){Pe.useDeprecatedSynchronousErrorHandling?function at(t){Pe.useDeprecatedSynchronousErrorHandling&&Vt&&(Vt.errorThrown=!0,Vt.error=t)}(t):lt(t)}function Ze(t,e){const{onStoppedNotification:n}=Pe;n&&Fe.setTimeout(()=>n(t,e))}const ct={closed:!0,next:Ge,error:function mt(t){throw t},complete:Ge},hn="function"==typeof Symbol&&Symbol.observable||"@@observable";function ft(t){return t}function wn(t){return 0===t.length?ft:1===t.length?t[0]:function(n){return t.reduce((r,a)=>a(r),n)}}class ze{constructor(e){e&&(this._subscribe=e)}lift(e){const n=new ze;return n.source=this,n.operator=e,n}subscribe(e,n,r){const a=function pt(t){return t&&t instanceof Gt||function Ht(t){return t&&ye(t.next)&&ye(t.error)&&ye(t.complete)}(t)&&ce(t)}(e)?e:new Be(e,n,r);return ot(()=>{const{operator:y,source:T}=this;a.add(y?y.call(a,T):T?this._subscribe(a):this._trySubscribe(a))}),a}_trySubscribe(e){try{return this._subscribe(e)}catch(n){e.error(n)}}forEach(e,n){return new(n=Qe(n))((r,a)=>{const y=new Be({next:T=>{try{e(T)}catch(Z){a(Z),y.unsubscribe()}},error:a,complete:r});this.subscribe(y)})}_subscribe(e){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(e)}[hn](){return this}pipe(...e){return wn(e)(this)}toPromise(e){return new(e=Qe(e))((n,r)=>{let a;this.subscribe(y=>a=y,y=>r(y),()=>n(a))})}}function Qe(t){var e;return null!==(e=t??Pe.Promise)&&void 0!==e?e:Promise}ze.create=t=>new ze(t);const vt=ve(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});class $t extends ze{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new dt(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new vt}next(e){ot(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){ot(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:n}=this;for(;n.length;)n.shift().error(e)}})}complete(){ot(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){const{hasError:n,isStopped:r,observers:a}=this;return n||r?Se:(this.currentObservers=null,a.push(e),new pe(()=>{this.currentObservers=null,fe(a,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:r,isStopped:a}=this;n?e.error(r):a&&e.complete()}asObservable(){const e=new ze;return e.source=this,e}}$t.create=(t,e)=>new dt(t,e);class dt extends $t{constructor(e,n){super(),this.destination=e,this.source=n}next(e){var n,r;null===(r=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===r||r.call(n,e)}error(e){var n,r;null===(r=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===r||r.call(n,e)}complete(){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===n||n.call(e)}_subscribe(e){var n,r;return null!==(r=null===(n=this.source)||void 0===n?void 0:n.subscribe(e))&&void 0!==r?r:Se}}function mn(t){return e=>{if(function gt(t){return ye(t?.lift)}(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function ut(t,e,n,r,a){return new wt(t,e,n,r,a)}class wt extends Gt{constructor(e,n,r,a,y,T){super(e),this.onFinalize=y,this.shouldUnsubscribe=T,this._next=n?function(Z){try{n(Z)}catch($){e.error($)}}:super._next,this._error=a?function(Z){try{a(Z)}catch($){e.error($)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(Z){e.error(Z)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:n}=this;super.unsubscribe(),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function Sn(t,e){return mn((n,r)=>{let a=0;n.subscribe(ut(r,y=>{r.next(t.call(e,y,a++))}))})}function Bt(t,e,n,r){return new(n||(n=Promise))(function(y,T){function Z(ue){try{ie(r.next(ue))}catch(he){T(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){T(he)}}function ie(ue){ue.done?y(ue.value):function a(y){return y instanceof n?y:new n(function(T){T(y)})}(ue.value).then(Z,$)}ie((r=r.apply(t,e||[])).next())})}Object.create;function Pt(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function an(t){return this instanceof an?(this.v=t,this):new an(t)}function tn(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,r=n.apply(t,e||[]),y=[];return a={},T("next"),T("throw"),T("return"),a[Symbol.asyncIterator]=function(){return this},a;function T(we){r[we]&&(a[we]=function(xe){return new Promise(function(Ie,Le){y.push([we,xe,Ie,Le])>1||Z(we,xe)})})}function Z(we,xe){try{!function $(we){we.value instanceof an?Promise.resolve(we.value.v).then(ie,ue):he(y[0][2],we)}(r[we](xe))}catch(Ie){he(y[0][3],Ie)}}function ie(we){Z("next",we)}function ue(we){Z("throw",we)}function he(we,xe){we(xe),y.shift(),y.length&&Z(y[0][0],y[0][1])}}function cn(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=Pt(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(y){n[y]=t[y]&&function(T){return new Promise(function(Z,$){(function a(y,T,Z,$){Promise.resolve($).then(function(ie){y({value:ie,done:Z})},T)})(Z,$,(T=t[y](T)).done,T.value)})}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;const Kn=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function jn(t){return ye(t?.then)}function Hn(t){return ye(t[hn])}function st(t){return Symbol.asyncIterator&&ye(t?.[Symbol.asyncIterator])}function Jn(t){return new TypeError(`You provided ${null!==t&&"object"==typeof t?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Qn=function ur(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Zn(t){return ye(t?.[Qn])}function Xn(t){return tn(this,arguments,function*(){const n=t.getReader();try{for(;;){const{value:r,done:a}=yield an(n.read());if(a)return yield an(void 0);yield yield an(r)}}finally{n.releaseLock()}})}function tr(t){return ye(t?.getReader)}function wr(t){if(t instanceof ze)return t;if(null!=t){if(Hn(t))return function dr(t){return new ze(e=>{const n=t[hn]();if(ye(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if(Kn(t))return function Ln(t){return new ze(e=>{for(let n=0;n{t.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,lt)})}(t);if(st(t))return Br(t);if(Zn(t))return function Sr(t){return new ze(e=>{for(const n of t)if(e.next(n),e.closed)return;e.complete()})}(t);if(tr(t))return function Wr(t){return Br(Xn(t))}(t)}throw Jn(t)}function Br(t){return new ze(e=>{(function bi(t,e){var n,r,a,y;return Bt(this,void 0,void 0,function*(){try{for(n=cn(t);!(r=yield n.next()).done;){const T=r.value;if(e.next(T),e.closed)return}}catch(T){a={error:T}}finally{try{r&&!r.done&&(y=n.return)&&(yield y.call(n))}finally{if(a)throw a.error}}e.complete()})})(t,e).catch(n=>e.error(n))})}function Cr(t,e,n,r=0,a=!1){const y=e.schedule(function(){n(),a?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(y),!a)return y}function go(t,e,n=1/0){return ye(e)?go((r,a)=>Sn((y,T)=>e(r,y,a,T))(wr(t(r,a))),n):("number"==typeof e&&(n=e),mn((r,a)=>function ea(t,e,n,r,a,y,T,Z){const $=[];let ie=0,ue=0,he=!1;const we=()=>{he&&!$.length&&!ie&&e.complete()},xe=Le=>ie{y&&e.next(Le),ie++;let je=!1;wr(n(Le,ue++)).subscribe(ut(e,Ue=>{a?.(Ue),y?xe(Ue):e.next(Ue)},()=>{je=!0},void 0,()=>{if(je)try{for(ie--;$.length&&ieIe(Ue)):Ie(Ue)}we()}catch(Ue){e.error(Ue)}}))};return t.subscribe(ut(e,xe,()=>{he=!0,we()})),()=>{Z?.()}}(r,a,t,n)))}const us=new ze(t=>t.complete());function cs(t){return t[t.length-1]}function Dl(t){return function _a(t){return t&&ye(t.schedule)}(cs(t))?t.pop():void 0}function nu(t,e=0){return mn((n,r)=>{n.subscribe(ut(r,a=>Cr(r,t,()=>r.next(a),e),()=>Cr(r,t,()=>r.complete(),e),a=>Cr(r,t,()=>r.error(a),e)))})}function Cl(t,e=0){return mn((n,r)=>{r.add(t.schedule(()=>n.subscribe(r),e))})}function _t(t,e){if(!t)throw new Error("Iterable cannot be null");return new ze(n=>{Cr(n,e,()=>{const r=t[Symbol.asyncIterator]();Cr(n,e,()=>{r.next().then(a=>{a.done?n.complete():n.next(a.value)})},0,!0)})})}function Cn(t,e){if(null!=t){if(Hn(t))return function Il(t,e){return wr(t).pipe(Cl(e),nu(e))}(t,e);if(Kn(t))return function Wp(t,e){return new ze(n=>{let r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}(t,e);if(jn(t))return function yh(t,e){return wr(t).pipe(Cl(e),nu(e))}(t,e);if(st(t))return _t(t,e);if(Zn(t))return function et(t,e){return new ze(n=>{let r;return Cr(n,e,()=>{r=t[Qn](),Cr(n,e,()=>{let a,y;try{({value:a,done:y}=r.next())}catch(T){return void n.error(T)}y?n.complete():n.next(a)},0,!0)}),()=>ye(r?.return)&&r.return()})}(t,e);if(tr(t))return function en(t,e){return _t(Xn(t),e)}(t,e)}throw Jn(t)}function Gr(t,e){return e?Cn(t,e):wr(t)}function cr(...t){const e=Dl(t),n=function tu(t,e){return"number"==typeof cs(t)?t.pop():e}(t,1/0),r=t;return r.length?1===r.length?wr(r[0]):function as(t=1/0){return go(ft,t)}(n)(Gr(r,e)):us}function ri(t,e,...n){if(!0===e)return void t();if(!1===e)return;const r=new Be({next:()=>{r.unsubscribe(),t()}});return wr(e(...n)).subscribe(r)}function qn(t){for(let e in t)if(t[e]===qn)return e;throw Error("Could not find renamed property on target object.")}function Zr(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function $n(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map($n).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function so(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const Ci=qn({__forward_ref__:qn});function vr(t){return t.__forward_ref__=vr,t.toString=function(){return $n(this())},t}function Nn(t){return Co(t)?t():t}function Co(t){return"function"==typeof t&&t.hasOwnProperty(Ci)&&t.__forward_ref__===vr}function Vo(t){return t&&!!t.\u0275providers}const Rs="https://g.co/ng/security#xss";class yn extends Error{constructor(e,n){super(wi(e,n)),this.code=e}}function wi(t,e){return`NG0${Math.abs(t)}${e?": "+e.trim():""}`}function sr(t){return"string"==typeof t?t:null==t?"":String(t)}function kr(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():sr(t)}function Ff(t,e){throw new yn(-201,!1)}function zu(t,e,n){t!=e&&Lr(n,t,e,"==")}function ks(t,e){null==t&&Lr(e,t,null,"!=")}function Lr(t,e,n,r){throw new Error(`ASSERTION ERROR: ${t}`+(null==r?"":` [Expected=> ${n} ${r} ${e} <=Actual]`))}function nr(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ls(t){return{providers:t.providers||[],imports:t.imports||[]}}function bh(t){return rv(t,xl)||rv(t,ov)}function rv(t,e){return t.hasOwnProperty(e)?t[e]:null}function iv(t){return t&&(t.hasOwnProperty(wc)||t.hasOwnProperty(sv))?t[wc]:null}const xl=qn({\u0275prov:qn}),wc=qn({\u0275inj:qn}),ov=qn({ngInjectableDef:qn}),sv=qn({ngInjectorDef:qn});var Mr,t;let wh;function fs(t){const e=wh;return wh=t,e}function Ac(t,e,n){const r=bh(t);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:n&Mr.Optional?null:void 0!==e?e:void Ff($n(t))}(t=Mr||(Mr={}))[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional";const ii=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)();const Fs={},Ec="__NG_DI_FLAG__",Ah="ngTempTokenPath",Eh="ngTokenPath",Sw=/\n/gm,uv="\u0275",Sh="__source";let Sc;function _c(t){const e=Sc;return Sc=t,e}function cv(t,e=Mr.Default){if(void 0===Sc)throw new yn(-203,!1);return null===Sc?Ac(t,void 0,e):Sc.get(t,e&Mr.Optional?null:void 0,e)}function Wn(t,e=Mr.Default){return(function av(){return wh}()||cv)(Nn(t),e)}function lv(t){throw new yn(202,!1)}function Ki(t,e=Mr.Default){return Wn(t,_h(e))}function _h(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function Zp(t){const e=[];for(let n=0;n ");else if("object"==typeof e){let y=[];for(let T in e)if(e.hasOwnProperty(T)){let Z=e[T];y.push(T+":"+("string"==typeof Z?JSON.stringify(Z):$n(Z)))}a=`{${y.join(", ")}}`}return`${n}${r?"("+r+")":""}[${a}]: ${t.replace(Sw,"\n ")}`}("\n"+t.message,a,n,r),t[Eh]=a,t[Ah]=null,t}function Ma(t){return{toString:t}.toString()}var Mc,Da;!function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"}(Mc||(Mc={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(Da||(Da={}));const na={},jr=[],Mh=qn({\u0275cmp:qn}),Vu=qn({\u0275dir:qn}),Uf=qn({\u0275pipe:qn}),Tl=qn({\u0275mod:qn}),ra=qn({\u0275fac:qn}),Ol=qn({__NG_ELEMENT_ID__:qn});let Dh=0;function Ho(t){return Ma(()=>{const e=pv(t),n={...e,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Mc.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,data:t.data||{},encapsulation:t.encapsulation||Da.Emulated,id:"c"+Dh++,styles:t.styles||jr,_:null,schemas:t.schemas||null,tView:null};Nl(n);const r=t.dependencies;return n.directiveDefs=Ih(r,!1),n.pipeDefs=Ih(r,!0),n})}function Yp(t,e,n){const r=t.\u0275cmp;r.directiveDefs=Ih(e,!1),r.pipeDefs=Ih(n,!0)}function dv(t){return Ur(t)||yi(t)}function Ch(t){return null!==t}function Bs(t){return Ma(()=>({type:t.type,bootstrap:t.bootstrap||jr,declarations:t.declarations||jr,imports:t.imports||jr,exports:t.exports||jr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function hv(t,e){return Ma(()=>{const n=ds(t,!0);n.declarations=e.declarations||jr,n.imports=e.imports||jr,n.exports=e.exports||jr})}function Jp(t,e){if(null==t)return na;const n={};for(const r in t)if(t.hasOwnProperty(r)){let a=t[r],y=a;Array.isArray(a)&&(y=a[1],a=a[0]),n[a]=r,e&&(e[a]=y)}return n}function rr(t){return Ma(()=>{const e=pv(t);return Nl(e),e})}function Io(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function Ur(t){return t[Mh]||null}function yi(t){return t[Vu]||null}function yo(t){return t[Uf]||null}function Dc(t){const e=Ur(t)||yi(t)||yo(t);return null!==e&&e.standalone}function ds(t,e){const n=t[Tl]||null;if(!n&&!0===e)throw new Error(`Type ${$n(t)} does not have '\u0275mod' property.`);return n}function pv(t){const e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,exportAs:t.exportAs||null,standalone:!0===t.standalone,selectors:t.selectors||jr,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Jp(t.inputs,e),outputs:Jp(t.outputs)}}function Nl(t){t.features?.forEach(e=>e(t))}function Ih(t,e){if(!t)return null;const n=e?yo:dv;return()=>("function"==typeof t?t():t).map(r=>n(r)).filter(Ch)}const Ca=0,In=1,kn=2,li=3,Wo=4,ia=5,ao=6,Hu=7,oi=8,Cc=9,ru=10,yr=11,Qp=12,Kf=13,Xp=14,iu=15,zi=16,Ic=17,Wu=18,js=19,xc=20,gv=21,ei=22,qp=1,xh=2,oa=7,zf=8,sa=9,fi=10;function Ii(t){return Array.isArray(t)&&"object"==typeof t[qp]}function hs(t){return Array.isArray(t)&&!0===t[qp]}function $p(t){return 0!=(4&t.flags)}function Vf(t){return t.componentOffset>-1}function Ia(t){return 1==(1&t.flags)}function xo(t){return!!t.template}function Pl(t){return 0!=(256&t[kn])}function Zu(t,e){return t.hasOwnProperty(ra)?t[ra]:null}class Dw{constructor(e,n,r){this.previousValue=e,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}}function uo(){return Nc}function Nc(t){return t.type.prototype.ngOnChanges&&(t.setInput=Oh),Ll}function Ll(){const t=ys(this),e=t?.current;if(e){const n=t.previous;if(n===na)t.previous=e;else for(let r in e)n[r]=e[r];t.current=null,this.ngOnChanges(e)}}function Oh(t,e,n,r){const a=this.declaredInputs[n],y=ys(t)||function Us(t,e){return t[Gf]=e}(t,{previous:na,current:null}),T=y.current||(y.current={}),Z=y.previous,$=Z[a];T[a]=new Dw($&&$.currentValue,e,Z===na),t[r]=e}uo.ngInherit=!0;const Gf="__ngSimpleChanges__";function ys(t){return t[Gf]||null}let ou=null;const ki=function(t,e,n){ou?.(t,e,n)},Yu="svg",og="math";function Vi(t){for(;Array.isArray(t);)t=t[Ca];return t}function mo(t,e){return Vi(e[t])}function ai(t,e){return Vi(e[t.index])}function Ks(t,e){return t.data[e]}function Pc(t,e){return t[e]}function Oo(t,e){const n=e[t];return Ii(n)?n:n[Ca]}function Fl(t){return 64==(64&t[kn])}function aa(t,e){return null==e?null:t[e]}function ug(t){t[Wu]=0}function Ju(t,e){t[ia]+=e;let n=t,r=t[li];for(;null!==r&&(1===e&&1===n[ia]||-1===e&&0===n[ia]);)r[ia]+=e,n=r,r=r[li]}const ir={lFrame:ca(null),bindingsEnabled:!0};function Rh(){return ir.bindingsEnabled}function cg(){ir.bindingsEnabled=!0}function lg(){ir.bindingsEnabled=!1}function sn(){return ir.lFrame.lView}function Ar(){return ir.lFrame.tView}function Li(t){return ir.lFrame.contextLView=t,t[oi]}function No(t){return ir.lFrame.contextLView=null,t}function Hi(){let t=fg();for(;null!==t&&64===t.type;)t=t.parent;return t}function fg(){return ir.lFrame.currentTNode}function ms(){const t=ir.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function co(t,e){const n=ir.lFrame;n.currentTNode=t,n.isParent=e}function Zf(){return ir.lFrame.isParent}function kh(){ir.lFrame.isParent=!1}function vo(){const t=ir.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function zs(){return ir.lFrame.bindingIndex}function dg(t){return ir.lFrame.bindingIndex=t}function kc(){return ir.lFrame.bindingIndex++}function ua(t){const e=ir.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function hg(t){ir.lFrame.inI18n=t}function bv(t,e){const n=ir.lFrame;n.bindingIndex=n.bindingRootIndex=t,Jf(e)}function Jf(t){ir.lFrame.currentDirectiveIndex=t}function Lc(t){const e=ir.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function Qf(){return ir.lFrame.currentQueryIndex}function Fh(t){ir.lFrame.currentQueryIndex=t}function Av(t){const e=t[In];return 2===e.type?e.declTNode:1===e.type?t[ao]:null}function Fc(t,e,n){if(n&Mr.SkipSelf){let a=e,y=t;for(;(a=a.parent,null===a&&!(n&Mr.Host))&&(a=Av(y),!(null===a||(y=y[iu],10&a.type))););if(null===a)return!1;e=a,t=y}const r=ir.lFrame=jl();return r.currentTNode=e,r.lView=t,!0}function Bh(t){const e=jl(),n=t[In];ir.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function jl(){const t=ir.lFrame,e=null===t?null:t.child;return null===e?ca(t):e}function ca(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Ul(){const t=ir.lFrame;return ir.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Kl=Ul;function uu(){const t=Ul();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function pg(t){return(ir.lFrame.contextLView=function zl(t,e){for(;t>0;)e=e[iu],t--;return e}(t,ir.lFrame.contextLView))[oi]}function bo(){return ir.lFrame.selectedIndex}function cu(t){ir.lFrame.selectedIndex=t}function or(){const t=ir.lFrame;return Ks(t.tView,t.selectedIndex)}function jh(){ir.lFrame.currentNamespace=Yu}function gg(){ir.lFrame.currentNamespace=og}function yg(){!function Uh(){ir.lFrame.currentNamespace=null}()}function ti(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n=r)break}else e[$]<0&&(t[Wu]+=65536),(Z>11>16&&(3&t[kn])===e){t[kn]+=2048,ki(4,Z,y);try{y.call(Z)}finally{ki(5,Z,y)}}}else{ki(4,Z,y);try{y.call(Z)}finally{ki(5,Z,y)}}}const Wl=-1;class Fi{constructor(e,n,r){this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r}}function Kh(t,e,n){let r=0;for(;re){T=y-1;break}}}for(;y>16}(t),r=e;for(;n>0;)r=r[iu],n--;return r}let zh=!0;function jc(t){const e=zh;return zh=t,e}const _g=255,Vh=5;let Dv=0;const la={};function td(t,e){const n=Mg(t,e);if(-1!==n)return n;const r=e[In];r.firstCreatePass&&(t.injectorIndex=e.length,nd(r.data,t),nd(e,null),nd(r.blueprint,null));const a=Hh(t,e),y=t.injectorIndex;if(Eg(a)){const T=ed(a),Z=Qu(a,e),$=Z[In].data;for(let ie=0;ie<8;ie++)e[y+ie]=Z[T+ie]|$[T+ie]}return e[y+8]=a,y}function nd(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Mg(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function Hh(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,r=null,a=e;for(;null!==a;){if(r=Tg(a),null===r)return Wl;if(n++,a=a[iu],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return Wl}function Wh(t,e,n){!function Cv(t,e,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Ol)&&(r=n[Ol]),null==r&&(r=n[Ol]=Dv++);const a=r&_g,y=1<>Vh)]|=y}(t,e,n)}function Dg(t,e,n){if(n&Mr.Optional||void 0!==t)return t;Ff()}function Iv(t,e,n,r){if(n&Mr.Optional&&void 0===r&&(r=null),!(n&(Mr.Self|Mr.Host))){const a=t[Cc],y=fs(void 0);try{return a?a.get(e,r,n&Mr.Optional):Ac(e,r,n&Mr.Optional)}finally{fs(y)}}return Dg(r,0,n)}function xv(t,e,n,r=Mr.Default,a){if(null!==t){if(1024&e[kn]){const T=function Pv(t,e,n,r,a){let y=t,T=e;for(;null!==y&&null!==T&&1024&T[kn]&&!(256&T[kn]);){const Z=Cg(y,T,n,r|Mr.Self,la);if(Z!==la)return Z;let $=y.parent;if(!$){const ie=T[gv];if(ie){const ue=ie.get(n,la,r);if(ue!==la)return ue}$=Tg(T),T=T[iu]}y=$}return a}(t,e,n,r,la);if(T!==la)return T}const y=Cg(t,e,n,r,la);if(y!==la)return y}return Iv(e,n,r,a)}function Cg(t,e,n,r,a){const y=function Iw(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(Ol)?t[Ol]:void 0;return"number"==typeof e?e>=0?e&_g:Ig:e}(n);if("function"==typeof y){if(!Fc(e,t,r))return r&Mr.Host?Dg(a,0,r):Iv(e,n,r,a);try{const T=y(r);if(null!=T||r&Mr.Optional)return T;Ff()}finally{Kl()}}else if("number"==typeof y){let T=null,Z=Mg(t,e),$=Wl,ie=r&Mr.Host?e[zi][ao]:null;for((-1===Z||r&Mr.SkipSelf)&&($=-1===Z?Hh(t,e):e[Z+8],$!==Wl&&Nv(r,!1)?(T=e[In],Z=ed($),e=Qu($,e)):Z=-1);-1!==Z;){const ue=e[In];if(Ov(y,Z,ue.data)){const he=Tv(Z,e,n,T,r,ie);if(he!==la)return he}$=e[Z+8],$!==Wl&&Nv(r,e[In].data[Z+8]===ie)&&Ov(y,Z,e)?(T=ue,Z=ed($),e=Qu($,e)):Z=-1}}return a}function Tv(t,e,n,r,a,y){const T=e[In],Z=T.data[t+8],ue=rd(Z,T,n,null==r?Vf(Z)&&zh:r!=T&&0!=(3&Z.type),a&Mr.Host&&y===Z);return null!==ue?Ta(e,T,ue,Z):la}function rd(t,e,n,r,a){const y=t.providerIndexes,T=e.data,Z=1048575&y,$=t.directiveStart,ie=t.directiveEnd,ue=y>>20,we=a?Z+ue:ie;for(let xe=r?Z:Z+ue;xe=$&&Ie.type===n)return xe}if(a){const xe=T[$];if(xe&&xo(xe)&&xe.type===n)return $}return null}function Ta(t,e,n,r){let a=t[n];const y=e.data;if(function vg(t){return t instanceof Fi}(a)){const T=a;T.resolving&&function Gp(t,e){const n=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new yn(-200,`Circular dependency in DI detected for ${t}${n}`)}(kr(y[n]));const Z=jc(T.canSeeViewProviders);T.resolving=!0;const $=T.injectImpl?fs(T.injectImpl):null;Fc(t,r,Mr.Default);try{a=t[n]=T.factory(void 0,y,t,r),e.firstCreatePass&&n>=r.directiveStart&&function Bc(t,e,n){const{ngOnChanges:r,ngOnInit:a,ngDoCheck:y}=e.type.prototype;if(r){const T=Nc(e);(n.preOrderHooks??(n.preOrderHooks=[])).push(t,T),(n.preOrderCheckHooks??(n.preOrderCheckHooks=[])).push(t,T)}a&&(n.preOrderHooks??(n.preOrderHooks=[])).push(0-t,a),y&&((n.preOrderHooks??(n.preOrderHooks=[])).push(t,y),(n.preOrderCheckHooks??(n.preOrderCheckHooks=[])).push(t,y))}(n,y[n],e)}finally{null!==$&&fs($),jc(Z),T.resolving=!1,Kl()}}return a}function Ov(t,e,n){const r=1<>Vh)]&r)}function Nv(t,e){return!(t&Mr.Self||t&Mr.Host&&e)}class fa{constructor(e,n){this._tNode=e,this._lView=n}get(e,n,r){return xv(this._tNode,this._lView,e,_h(r),n)}}function Ig(){return new fa(Hi(),sn())}function Wi(t){return Ma(()=>{const e=t.prototype.constructor,n=e[ra]||xg(e),r=Object.prototype;let a=Object.getPrototypeOf(t.prototype).constructor;for(;a&&a!==r;){const y=a[ra]||xg(a);if(y&&y!==n)return y;a=Object.getPrototypeOf(a)}return y=>new y})}function xg(t){return Co(t)?()=>{const e=xg(Nn(t));return e&&e()}:Zu(t)}function Tg(t){const e=t[In],n=e.type;return 2===n?e.declTNode:1===n?t[ao]:null}function Gh(t){return function Cw(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const n=t.attrs;if(n){const r=n.length;let a=0;for(;a{const y=lo(e);function T(...Z){if(this instanceof T)return y.call(this,...Z),this;const $=new T(...Z);return function(ue){return a&&a(ue,...Z),(ue.hasOwnProperty(Uc)?ue[Uc]:Object.defineProperty(ue,Uc,{value:[]})[Uc]).push($),r&&r(ue),ue}}return n&&(T.prototype=Object.create(n.prototype)),T.prototype.ngMetadataName=t,T.annotationCls=T,T})}function lo(t){return function(...n){if(t){const r=t(...n);for(const a in r)this[a]=r[a]}}}function zc(t,e,n){return Ma(()=>{const r=lo(e);function a(...y){if(this instanceof a)return r.apply(this,y),this;const T=new a(...y);return Z.annotation=T,Z;function Z($,ie,ue){const he=$.hasOwnProperty(Kc)?$[Kc]:Object.defineProperty($,Kc,{value:[]})[Kc];for(;he.length<=ue;)he.push(null);return(he[ue]=he[ue]||[]).push(T),$}}return n&&(a.prototype=Object.create(n.prototype)),a.prototype.ngMetadataName=t,a.annotationCls=a,a})}function fu(t,e,n,r){return Ma(()=>{const a=lo(e);function y(...T){if(this instanceof y)return a.apply(this,T),this;const Z=new y(...T);return function $(ie,ue){const he=ie.constructor,we=he.hasOwnProperty(Zl)?he[Zl]:Object.defineProperty(he,Zl,{value:{}})[Zl];we[ue]=we.hasOwnProperty(ue)&&we[ue]||[],we[ue].unshift(Z),r&&r(ie,ue,...T)}}return n&&(y.prototype=Object.create(n.prototype)),y.prototype.ngMetadataName=t,y.annotationCls=y,y})}const Rv=zc("Attribute",t=>({attributeName:t,__NG_ELEMENT_ID__:()=>Gh(t)}));class er{constructor(e,n){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=nr({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}new er("AnalyzeForEntryComponents");class id{}fu("ContentChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!1,descendants:!1,emitDistinctChangesOnly:true,...e}),id),fu("ContentChild",(t,e={})=>({selector:t,first:!0,isViewQuery:!1,descendants:!0,...e}),id),fu("ViewChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!0,descendants:!0,emitDistinctChangesOnly:true,...e}),id),fu("ViewChild",(t,e)=>({selector:t,first:!0,isViewQuery:!0,descendants:!0,...e}),id);var du,Og,Yh;function Ei(t){const e=ii.ng;if(e&&e.\u0275compilerFacade)return e.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}!function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"}(du||(du={})),function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"}(Og||(Og={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(Yh||(Yh={}));const Ng=Function;function Yl(t){return"function"==typeof t}function vs(t){return t.flat(Number.POSITIVE_INFINITY)}function Oa(t,e){t.forEach(n=>Array.isArray(n)?Oa(n,e):e(n))}function Na(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Jh(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Jl(t,e){const n=[];for(let r=0;r=0?t[1|r]=n:(r=~r,function Fv(t,e,n,r){let a=t.length;if(a==e)t.push(n,r);else if(1===a)t.push(r,t[0]),t[0]=n;else{for(a--,t.push(t[a-1],t[a]);a>e;){const y=a-2;t[a]=t[y],a--}t[e]=n,t[e+1]=r}}(t,r,e,n)),r}function kg(t,e){const n=Ql(t,e);if(n>=0)return t[1|n]}function Ql(t,e){return fo(t,e,1)}function fo(t,e,n){let r=0,a=t.length>>n;for(;a!==r;){const y=r+(a-r>>1),T=t[y<e?a=y:r=y+1}return~(a<new e(...n)}_zipTypesAndAnnotations(e,n){let r;r=Jl(typeof e>"u"?n.length:e.length);for(let a=0;a"u"?r[a]=[]:e[a]&&e[a]!=Object?r[a]=[e[a]]:r[a]=[],n&&null!=n[a]&&(r[a]=r[a].concat(n[a]));return r}_ownParameters(e,n){if(function Bv(t){return Pw.test(t)||Fg.test(t)||Pn.test(t)&&!Xl.test(t)}(e.toString()))return null;if(e.parameters&&e.parameters!==n.parameters)return e.parameters;const a=e.ctorParameters;if(a&&a!==n.ctorParameters){const Z="function"==typeof a?a():a,$=Z.map(ue=>ue&&ue.type),ie=Z.map(ue=>ue&&Vc(ue.decorators));return this._zipTypesAndAnnotations($,ie)}const y=e.hasOwnProperty(Kc)&&e[Kc],T=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",e);return T||y?this._zipTypesAndAnnotations(T,y):Jl(e.length)}parameters(e){if(!Yl(e))return[];const n=Hc(e);let r=this._ownParameters(e,n);return!r&&n!==Object&&(r=this.parameters(n)),r||[]}_ownAnnotations(e,n){if(e.annotations&&e.annotations!==n.annotations){let r=e.annotations;return"function"==typeof r&&r.annotations&&(r=r.annotations),r}return e.decorators&&e.decorators!==n.decorators?Vc(e.decorators):e.hasOwnProperty(Uc)?e[Uc]:null}annotations(e){if(!Yl(e))return[];const n=Hc(e),r=this._ownAnnotations(e,n)||[];return(n!==Object?this.annotations(n):[]).concat(r)}_ownPropMetadata(e,n){if(e.propMetadata&&e.propMetadata!==n.propMetadata){let r=e.propMetadata;return"function"==typeof r&&r.propMetadata&&(r=r.propMetadata),r}if(e.propDecorators&&e.propDecorators!==n.propDecorators){const r=e.propDecorators,a={};return Object.keys(r).forEach(y=>{a[y]=Vc(r[y])}),a}return e.hasOwnProperty(Zl)?e[Zl]:null}propMetadata(e){if(!Yl(e))return{};const n=Hc(e),r={};if(n!==Object){const y=this.propMetadata(n);Object.keys(y).forEach(T=>{r[T]=y[T]})}const a=this._ownPropMetadata(e,n);return a&&Object.keys(a).forEach(y=>{const T=[];r.hasOwnProperty(y)&&T.push(...r[y]),T.push(...a[y]),r[y]=T}),r}ownPropMetadata(e){return Yl(e)&&this._ownPropMetadata(e,Hc(e))||{}}hasLifecycleHook(e,n){return e instanceof Ng&&n in e.prototype}}function Vc(t){return t?t.map(e=>new(0,e.type.annotationCls)(...e.args?e.args:[])):[]}function Hc(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}const od=Bf(zc("Inject",t=>({token:t})),-1),ql=Bf(zc("Optional"),8),Xh=Bf(zc("Self"),2),$l=Bf(zc("SkipSelf"),4),Bg=Bf(zc("Host"),1);let qh=null;function Ti(){return qh=qh||new Rw}function Go(t){return hu(Ti().parameters(t))}function hu(t){return t.map(e=>function jv(t){const e={token:null,attribute:null,host:!1,optional:!1,self:!1,skipSelf:!1};if(Array.isArray(t)&&t.length>0)for(let n=0;n|^->||--!>|)/,i0="\u200b$1\u200b";function Ao(t){return t.replace(Kg,e=>e.replace(r0,i0))}const ka=new Map;let da=0;const gu="__ngContext__";function to(t,e){Ii(e)?(t[gu]=e[xc],function Hv(t){ka.set(t[xc],t)}(e)):t[gu]=e}let qu;function u0(t,e){return qu(t,e)}function fd(t){const e=t[li];return hs(e)?e[li]:e}function Zg(t){return Yg(t[Kf])}function c0(t){return Yg(t[Wo])}function Yg(t){for(;null!==t&&!hs(t);)t=t[Wo];return t}function of(t,e,n,r,a){if(null!=r){let y,T=!1;hs(r)?y=r:Ii(r)&&(T=!0,r=r[Ca]);const Z=Vi(r);0===t&&null!==n?null==a?ey(e,n,Z):Yc(e,n,Z,a||null,!0):1===t&&null!==n?Yc(e,n,Z,a||null,!0):2===t?le(e,Z,T):3===t&&e.destroyNode(Z),null!=y&&function bt(t,e,n,r,a){const y=n[oa],T=Vi(n);y!==T&&of(e,t,r,y,a);for(let Z=fi;Z0&&(n[a-1][Wo]=e),r0&&(t[n-1][Wo]=r[Wo]);const y=Jh(t,fi+e);!function f0(t,e){Ne(t,e,e[yr],2,null,null),e[Ca]=null,e[ao]=null}(r[In],r);const T=y[js];null!==T&&T.detachView(y[In]),r[li]=null,r[Wo]=null,r[kn]&=-65}return r}function qg(t,e){if(!(128&e[kn])){const n=e[yr];n.destroyNode&&Ne(t,e,n,3,null,null),function Jg(t){let e=t[Kf];if(!e)return p0(t[In],t);for(;e;){let n=null;if(Ii(e))n=e[Kf];else{const r=e[fi];r&&(n=r)}if(!n){for(;e&&!e[Wo]&&e!==t;)Ii(e)&&p0(e[In],e),e=e[li];null===e&&(e=t),Ii(e)&&p0(e[In],e),n=e&&e[Wo]}e=n}}(e)}}function p0(t,e){if(!(128&e[kn])){e[kn]&=-65,e[kn]|=128,function y0(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let r=0;r=0?r[a=T]():r[a=-T].unsubscribe(),y+=2}else{const T=r[a=n[y+1]];n[y].call(T)}if(null!==r){for(let y=a+1;y-1){const{encapsulation:y}=t.data[r.directiveStart+a];if(y===Da.None||y===Da.Emulated)return null}return ai(r,n)}}function Yc(t,e,n,r,a){t.insertBefore(e,n,r,a)}function ey(t,e,n){t.appendChild(e,n)}function v0(t,e,n,r,a){null!==r?Yc(t,e,n,r,a):ey(t,e,n)}function Jc(t,e){return t.parentNode(e)}function Qv(t,e,n){return Xv(t,e,n)}function dd(t,e,n){return 40&t.type?ai(t,n):null}let Qc,Mn,vn,zn,Xv=dd;function qv(t,e){Xv=t,Qc=e}function Xc(t,e,n,r){const a=$g(t,r,e),y=e[yr],Z=Qv(r.parent||e[ao],r,e);if(null!=a)if(Array.isArray(n))for(let $=0;$t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Mn}function Tn(t){return Rn()?.createHTML(t)||t}function Nt(t,e,n){const r=sn(),a=or(),y=ai(a,r);if(2===a.type&&"iframe"===e.toLowerCase()){const T=y;T.src="",T.srcdoc=Tn(""),le(r[yr],T);throw new yn(-910,!1)}return t}function Gn(){return void 0!==vn?vn:typeof document<"u"?document:void 0}function Yn(){if(void 0===zn&&(zn=null,ii.trustedTypes))try{zn=ii.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return zn}function Ji(t){return Yn()?.createHTML(t)||t}function Or(t){return Yn()?.createScript(t)||t}function yu(t){return Yn()?.createScriptURL(t)||t}class qc{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Rs})`}}class v9 extends qc{getTypeName(){return"HTML"}}class b9 extends qc{getTypeName(){return"Style"}}class w9 extends qc{getTypeName(){return"Script"}}class A9 extends qc{getTypeName(){return"URL"}}class E9 extends qc{getTypeName(){return"ResourceURL"}}function pa(t){return t instanceof qc?t.changingThisBreaksApplicationSecurity:t}function $u(t,e){const n=function S9(t){return t instanceof qc&&t.getTypeName()||null}(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see ${Rs})`)}return n===e}function FS(t){const e=new T9(t);return function O9(){try{return!!(new window.DOMParser).parseFromString(Tn(""),"text/html")}catch{return!1}}()?new x9(e):e}class x9{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const n=(new window.DOMParser).parseFromString(Tn(e),"text/html").body;return null===n?this.inertDocumentHelper.getInertBodyElement(e):(n.removeChild(n.firstChild),n)}catch{return null}}}class T9{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){const n=this.inertDocument.createElement("template");return n.innerHTML=Tn(e),n}}const N9=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function $v(t){return(t=String(t)).match(N9)?t:"unsafe:"+t}function $c(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function ty(...t){const e={};for(const n of t)for(const r in n)n.hasOwnProperty(r)&&(e[r]=!0);return e}const BS=$c("area,br,col,hr,img,wbr"),jS=$c("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),US=$c("rp,rt"),P9=ty(US,jS),R9=ty(jS,$c("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),k9=ty(US,$c("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Vw=ty(BS,R9,k9,P9),Hw=$c("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),L9=$c("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),F9=$c("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),KS=ty(Hw,L9,F9),B9=$c("script,style,template");class j9{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let n=e.firstChild,r=!0;for(;n;)if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild)n=n.firstChild;else for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let a=this.checkClobberedElement(n,n.nextSibling);if(a){n=a;break}n=this.checkClobberedElement(n,n.parentNode)}return this.buf.join("")}startElement(e){const n=e.nodeName.toLowerCase();if(!Vw.hasOwnProperty(n))return this.sanitizedSomething=!0,!B9.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);const r=e.attributes;for(let a=0;a"),!0}endElement(e){const n=e.nodeName.toLowerCase();Vw.hasOwnProperty(n)&&!BS.hasOwnProperty(n)&&(this.buf.push(""))}chars(e){this.buf.push(zS(e))}checkClobberedElement(e,n){if(n&&(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return n}}const U9=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,K9=/([^\#-~ |!])/g;function zS(t){return t.replace(/&/g,"&").replace(U9,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(K9,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let e1;function VS(t,e){let n=null;try{e1=e1||FS(t);let r=e?String(e):"";n=e1.getInertBodyElement(r);let a=5,y=r;do{if(0===a)throw new Error("Failed to sanitize html because the input is unstable");a--,r=y,y=n.innerHTML,n=e1.getInertBodyElement(r)}while(r!==y);return Tn((new j9).sanitizeChildren(Ww(n)||n))}finally{if(n){const r=Ww(n)||n;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function Ww(t){return"content"in t&&function z9(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var ga;function V9(t){const e=ny();return e?Ji(e.sanitize(ga.HTML,t)||""):$u(t,"HTML")?Ji(pa(t)):VS(Gn(),sr(t))}function H9(t){const e=ny();return e?e.sanitize(ga.STYLE,t)||"":$u(t,"Style")?pa(t):sr(t)}function HS(t){const e=ny();return e?e.sanitize(ga.URL,t)||"":$u(t,"URL")?pa(t):$v(sr(t))}function WS(t){const e=ny();if(e)return yu(e.sanitize(ga.RESOURCE_URL,t)||"");if($u(t,"ResourceURL"))return yu(pa(t));throw new yn(904,!1)}function W9(t){const e=ny();if(e)return Or(e.sanitize(ga.SCRIPT,t)||"");if($u(t,"Script"))return Or(pa(t));throw new yn(905,!1)}function G9(t){return Tn(t[0])}function Z9(t){return function It(t){return Rn()?.createScriptURL(t)||t}(t[0])}function J9(t,e,n){return function Y9(t,e){return"src"===e&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===e&&("base"===t||"link"===t)?WS:HS}(e,n)(t)}function ny(){const t=sn();return t&&t[Qp]}!function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}(ga||(ga={}));const GS=new er("ENVIRONMENT_INITIALIZER"),ZS=new er("INJECTOR",-1),YS=new er("INJECTOR_DEF_TYPES");class JS{get(e,n=Fs){if(n===Fs){const r=new Error(`NullInjectorError: No provider for ${$n(e)}!`);throw r.name="NullInjectorError",r}return n}}function Q9(...t){return{\u0275providers:QS(!0,t),\u0275fromNgModule:!0}}function QS(t,...e){const n=[],r=new Set;let a;return Oa(e,y=>{const T=y;Gw(T,n,[],r)&&(a||(a=[]),a.push(T))}),void 0!==a&&XS(a,n),n}function XS(t,e){for(let n=0;n{e.push(y)})}}function Gw(t,e,n,r){if(!(t=Nn(t)))return!1;let a=null,y=iv(t);const T=!y&&Ur(t);if(y||T){if(T&&!T.standalone)return!1;a=t}else{const $=t.ngModule;if(y=iv($),!y)return!1;a=$}const Z=r.has(a);if(T){if(Z)return!1;if(r.add(a),T.dependencies){const $="function"==typeof T.dependencies?T.dependencies():T.dependencies;for(const ie of $)Gw(ie,e,n,r)}}else{if(!y)return!1;{if(null!=y.imports&&!Z){let ie;r.add(a);try{Oa(y.imports,ue=>{Gw(ue,e,n,r)&&(ie||(ie=[]),ie.push(ue))})}finally{}void 0!==ie&&XS(ie,e)}if(!Z){const ie=Zu(a)||(()=>new a);e.push({provide:a,useFactory:ie,deps:jr},{provide:YS,useValue:a,multi:!0},{provide:GS,useValue:()=>Wn(a),multi:!0})}const $=y.providers;if(null!=$&&!Z){Zw($,ue=>{e.push(ue)})}}}return a!==t&&void 0!==t.providers}function Zw(t,e){for(let n of t)Vo(n)&&(n=n.\u0275providers),Array.isArray(n)?Zw(n,e):e(n)}const X9=qn({provide:String,useValue:qn});function Yw(t){return null!==t&&"object"==typeof t&&X9 in t}function qS(t){return!(!t||!t.useExisting)}function $S(t){return!(!t||!t.useFactory)}function hd(t){return"function"==typeof t}const Jw=new er("Set Injector scope."),t1={},$9={};let Qw;function n1(){return void 0===Qw&&(Qw=new JS),Qw}class w0{}class e6 extends w0{get destroyed(){return this._destroyed}constructor(e,n,r,a){super(),this.parent=n,this.source=r,this.scopes=a,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,qw(e,T=>this.processProvider(T)),this.records.set(ZS,A0(void 0,this)),a.has("environment")&&this.records.set(w0,A0(void 0,this));const y=this.records.get(Jw);null!=y&&"string"==typeof y.value&&this.scopes.add(y.value),this.injectorDefTypes=new Set(this.get(YS.multi,jr,Mr.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const e of this._ngOnDestroyHooks)e.ngOnDestroy();for(const e of this._onDestroyHooks)e()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(e){this._onDestroyHooks.push(e)}runInContext(e){this.assertNotDestroyed();const n=_c(this),r=fs(void 0);try{return e()}finally{_c(n),fs(r)}}get(e,n=Fs,r=Mr.Default){this.assertNotDestroyed(),r=_h(r);const a=_c(this),y=fs(void 0);try{if(!(r&Mr.SkipSelf)){let Z=this.records.get(e);if(void 0===Z){const $=function iO(t){return"function"==typeof t||"object"==typeof t&&t instanceof er}(e)&&bh(e);Z=$&&this.injectableDefInScope($)?A0(Xw(e),t1):null,this.records.set(e,Z)}if(null!=Z)return this.hydrate(e,Z)}const T=r&Mr.Self?n1():this.parent;return n=r&Mr.Optional&&n===Fs?null:n,T.get(e,n)}catch(T){if("NullInjectorError"===T.name){if((T[Ah]=T[Ah]||[]).unshift($n(e)),a)throw T;return jf(T,e,"R3InjectorError",this.source)}throw T}finally{fs(y),_c(a)}}resolveInjectorInitializers(){const e=_c(this),n=fs(void 0);try{const r=this.get(GS.multi,jr,Mr.Self);for(const a of r)a()}finally{_c(e),fs(n)}}toString(){const e=[],n=this.records;for(const r of n.keys())e.push($n(r));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new yn(205,!1)}processProvider(e){let n=hd(e=Nn(e))?e:Nn(e&&e.provide);const r=function tO(t){if(Yw(t))return A0(void 0,t.useValue);return A0(t6(t),t1)}(e);if(hd(e)||!0!==e.multi){this.records.get(n)}else{let a=this.records.get(n);a||(a=A0(void 0,t1,!0),a.factory=()=>Zp(a.multi),this.records.set(n,a)),n=e,a.multi.push(e)}this.records.set(n,r)}hydrate(e,n){return n.value===t1&&(n.value=$9,n.value=n.factory()),"object"==typeof n.value&&n.value&&function rO(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}injectableDefInScope(e){if(!e.providedIn)return!1;const n=Nn(e.providedIn);return"string"==typeof n?"any"===n||this.scopes.has(n):this.injectorDefTypes.has(n)}}function Xw(t){const e=bh(t),n=null!==e?e.factory:Zu(t);if(null!==n)return n;if(t instanceof er)throw new yn(204,!1);if(t instanceof Function)return function eO(t){const e=t.length;if(e>0){Jl(e,"?");throw new yn(204,!1)}const n=function ww(t){return t&&(t[xl]||t[ov])||null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new yn(204,!1)}function t6(t,e,n){let r;if(hd(t)){const a=Nn(t);return Zu(a)||Xw(a)}if(Yw(t))r=()=>Nn(t.useValue);else if($S(t))r=()=>t.useFactory(...Zp(t.deps||[]));else if(qS(t))r=()=>Wn(Nn(t.useExisting));else{const a=Nn(t&&(t.useClass||t.provide));if(!function nO(t){return!!t.deps}(t))return Zu(a)||Xw(a);r=()=>new a(...Zp(t.deps))}return r}function A0(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function qw(t,e){for(const n of t)Array.isArray(n)?qw(n,e):n&&Vo(n)?qw(n.\u0275providers,e):e(n)}class oO{}class n6{}const r6="ngComponent";class aO{resolveComponentFactory(e){throw function sO(t){const e=Error(`No component factory found for ${$n(t)}. Did you add it to @NgModule.entryComponents?`);return e[r6]=t,e}(e)}}class ry{}function E0(t,e){return new ya(ai(t,e))}ry.NULL=new aO;class ya{constructor(e){this.nativeElement=e}}function cO(t){return t instanceof ya?t.nativeElement:t}ya.__NG_ELEMENT_ID__=function uO(){return E0(Hi(),sn())};class i6{}class el{}el.__NG_ELEMENT_ID__=()=>function lO(){const t=sn(),n=Oo(Hi().index,t);return(Ii(n)?n:t)[yr]}();class $w{}$w.\u0275prov=nr({token:$w,providedIn:"root",factory:()=>null});class r1{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const fO=new r1("15.2.9"),e2={},t2="ngOriginalError";function n2(t){return t[t2]}class S0{constructor(){this._console=console}handleError(e){const n=this._findOriginalError(e);this._console.error("ERROR",e),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(e){let n=e&&n2(e);for(;n&&n2(n);)n=n2(n);return n||null}}function mO(t){return t.ownerDocument.defaultView}function vO(t){return t.ownerDocument}function bO(t){return t.ownerDocument.body}function tl(t){return t instanceof Function?t():t}function s6(t,e,n){let r=t.length;for(;;){const a=t.indexOf(e,n);if(-1===a)return a;if(0===a||t.charCodeAt(a-1)<=32){const y=e.length;if(a+y===r||t.charCodeAt(a+y)<=32)return a}n=a+1}}const a6="ng-template";function EO(t,e,n){let r=0,a=!0;for(;ry?"":a[he+1].toLowerCase();const xe=8&r?we:null;if(xe&&-1!==s6(xe,ie,0)||2&r&&ie!==we){if(mu(r))return!1;T=!0}}}}else{if(!T&&!mu(r)&&!mu($))return!1;if(T&&mu($))continue;T=!1,r=$|1&r}}return mu(r)||T}function mu(t){return 0==(1&t)}function MO(t,e,n,r){if(null===e)return-1;let a=0;if(r||!n){let y=!1;for(;a-1)for(n++;n0?'="'+Z+'"':"")+"]"}else 8&r?a+="."+T:4&r&&(a+=" "+T);else""!==a&&!mu(T)&&(e+=l6(y,a),a=""),r=T,y=y||!mu(r);n++}return""!==a&&(e+=l6(y,a)),e}const hr={};function Jo(t){f6(Ar(),sn(),bo()+t,!1)}function f6(t,e,n,r){if(!r)if(3==(3&e[kn])){const y=t.preOrderCheckHooks;null!==y&&Ai(e,y,n)}else{const y=t.preOrderHooks;null!==y&&xi(e,y,0,n)}cu(n)}const d6={\u0275\u0275defineInjectable:nr,\u0275\u0275defineInjector:Ls,\u0275\u0275inject:Wn,\u0275\u0275invalidFactoryDep:lv,resolveForwardRef:Nn};function PO(t,e){let n=null,r=null;t.hasOwnProperty(xl)||Object.defineProperty(t,xl,{get:()=>(null===n&&(n=Ei().compileInjectable(d6,`ng:///${t.name}/\u0275prov.js`,function FO(t,e){const n=e||{providedIn:null},r={name:t.name,type:t,typeArgumentCount:0,providedIn:n.providedIn};return(h6(n)||p6(n))&&void 0!==n.deps&&(r.deps=hu(n.deps)),h6(n)?r.useClass=n.useClass:function kO(t){return RO in t}(n)?r.useValue=n.useValue:p6(n)?r.useFactory=n.useFactory:function LO(t){return void 0!==t.useExisting}(n)&&(r.useExisting=n.useExisting),r}(t,e))),n)}),t.hasOwnProperty(ra)||Object.defineProperty(t,ra,{get:()=>{if(null===r){const a=Ei();r=a.compileFactory(d6,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,typeArgumentCount:0,deps:Go(t),target:a.FactoryTarget.Injectable})}return r},configurable:!0})}const RO=qn({provide:String,useValue:qn});function h6(t){return void 0!==t.useClass}function p6(t){return void 0!==t.useFactory}$i("Injectable",void 0,void 0,void 0,(t,e)=>PO(t,e));function g6(t,e=null,n=null,r){const a=y6(t,e,n,r);return a.resolveInjectorInitializers(),a}function y6(t,e=null,n=null,r,a=new Set){const y=[n||jr,Q9(t)];return r=r||("object"==typeof t?void 0:$n(t)),new e6(y,e||n1(),r||null,a)}class Qo{static create(e,n){if(Array.isArray(e))return g6({name:""},n,e,"");{const r=e.name??"";return g6({name:r},e.parent,e.providers,r)}}}function r2(t){return t.length>1?" ("+function BO(t){const e=[];for(let n=0;n-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(r=>$n(r.token)).join(" -> ")+")":""}function i2(t,e,n,r){const a=[e],y=n(a),T=r?function dO(t,e){const n=`${t} caused by: ${e instanceof Error?e.message:e}`,r=Error(n);return r[t2]=e,r}(y,r):Error(y);return T.addKey=jO,T.keys=a,T.injectors=[t],T.constructResolvingMessage=n,T[t2]=r,T}function jO(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function m6(t,e){const n=[];for(let r=0,a=e.length;rWn(ZS)}),Qo.__NG_ELEMENT_ID__=-1;class sf{constructor(e,n){if(this.token=e,this.id=n,!e)throw new yn(208,!1);this.displayName=$n(this.token)}static get(e){return v6.get(Nn(e))}static get numberOfKeys(){return v6.numberOfKeys}}const v6=new class GO{constructor(){this._allKeys=new Map}get(e){if(e instanceof sf)return e;if(this._allKeys.has(e))return this._allKeys.get(e);const n=new sf(e,sf.numberOfKeys);return this._allKeys.set(e,n),n}get numberOfKeys(){return this._allKeys.size}};class i1{constructor(e,n,r){this.key=e,this.optional=n,this.visibility=r}static fromKey(e){return new i1(e,!1,null)}}const ZO=[];class b6{constructor(e,n,r){this.key=e,this.resolvedFactories=n,this.multiProvider=r,this.resolvedFactory=this.resolvedFactories[0]}}class YO{constructor(e,n){this.factory=e,this.dependencies=n}}function JO(t){let e,n;if(t.useClass){const r=Nn(t.useClass);e=Ti().factory(r),n=A6(r)}else t.useExisting?(e=r=>r,n=[i1.fromKey(sf.get(t.useExisting))]):t.useFactory?(e=t.useFactory,n=function $O(t,e){if(e){const n=e.map(r=>[r]);return e.map(r=>E6(t,r,n))}return A6(t)}(t.useFactory,t.deps)):(e=()=>t.useValue,n=ZO);return new YO(e,n)}function QO(t){return new b6(sf.get(t.provide),[JO(t)],t.multi||!1)}function XO(t){const r=function qO(t,e){for(let n=0;n{if(n instanceof Ng)e.push({provide:n,useClass:n});else if(n&&"object"==typeof n&&void 0!==n.provide)e.push(n);else{if(!Array.isArray(n))throw function VO(t){return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${t}`)}(n);w6(n,e)}}),e}function A6(t){const e=Ti().parameters(t);if(!e)return[];if(e.some(n=>null==n))throw m6(t,e);return e.map(n=>E6(t,n,e))}function E6(t,e,n){let r=null,a=!1;if(!Array.isArray(e))return o2(e instanceof od?e.token:e,a,null);let y=null;for(let T=0;T=this._providers.length)throw function HO(t){return Error(`Index ${t} is out-of-bounds.`)}(e);return this._providers[e]}_new(e){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function KO(t,e){return i2(t,e,function(n){return`Cannot instantiate cyclic dependency!${r2(n)}`})}(this,e.key);return this._instantiateProvider(e)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(e){if(e.multiProvider){const n=[];for(let r=0;rthis._getByReflectiveDependency(T))}catch(T){throw T.addKey&&T.addKey(this,e.key),T}try{y=r(...a)}catch(T){throw function zO(t,e,n,r){return i2(t,r,function(a){const y=$n(a[0].token);return`${e.message}: Error during instantiation of ${y}!${r2(a)}.`},e)}(this,T,T.stack,e.key)}return y}_getByReflectiveDependency(e){return this._getByKey(e.key,e.visibility,e.optional?null:Fs)}_getByKey(e,n,r){return e===M0.INJECTOR_KEY?this:n instanceof Xh?this._getByKeySelf(e,r):this._getByKeyDefault(e,r,n)}_getObjByKeyId(e){for(let n=0;n' "'+n.key.displayName+'" ').join(", ")}])`}toString(){return this.displayName}}function bn(t,e=Mr.Default){const n=sn();if(null===n)return Wn(t,e);return xv(Hi(),n,Nn(t),e)}function t7(){throw new Error("invalid")}function S6(t,e){const n=t.contentQueries;if(null!==n)for(let r=0;rei&&f6(t,e,ei,!1),ki(T?2:0,a),n(r,a)}finally{cu(y),ki(T?3:1,a)}}function u2(t,e,n){if($p(e)){const r=e.directiveStart,a=e.directiveEnd;for(let y=r;y0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(T)!=Z&&T.push(Z),T.push(n,r,y)}}(t,e,r,sy(t,n,a.hostVars,hr),a)}function ec(t,e,n,r,a,y){const T=ai(t,e);p2(e[yr],T,y,t.value,n,r,a)}function p2(t,e,n,r,a,y,T){if(null==y)t.removeAttribute(e,a,n);else{const Z=null==T?sr(y):T(y,r||"",a);t.setAttribute(e,a,Z,n)}}function E7(t,e,n,r,a,y){const T=y[e];if(null!==T){const Z=r.setInput;for(let $=0;$0&&g2(n)}}function g2(t){for(let r=Zg(t);null!==r;r=c0(r))for(let a=fi;a0&&g2(y)}const n=t[In].components;if(null!==n)for(let r=0;r0&&g2(a)}}function C7(t,e){const n=Oo(e,t),r=n[In];(function I7(t,e){for(let n=e.length;n-1&&(Xg(e,r),Jh(n,r))}this._attachedToViewContainer=!1}qg(this._lView[In],this._lView)}onDestroy(e){D6(this._lView[In],this._lView,null,e)}markForCheck(){u1(this._cdRefInjectingView||this._lView)}detach(){this._lView[kn]&=-65}reattach(){this._lView[kn]|=64}detectChanges(){c1(this._lView[In],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new yn(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function d0(t,e){Ne(t,e,e[yr],2,null,null)}(this._lView[In],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new yn(902,!1);this._appRef=e}}class x7 extends ay{constructor(e){super(e),this._view=e}detectChanges(){const e=this._view;c1(e[In],e,e[oi],!1)}checkNoChanges(){}get context(){return null}}class L6 extends ry{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const n=Ur(e);return new uy(n,this.ngModule)}}function F6(t){const e=[];for(let n in t)if(t.hasOwnProperty(n)){const r=t[n];e.push({propName:r,templateName:n})}return e}class O7{constructor(e,n){this.injector=e,this.parentInjector=n}get(e,n,r){r=_h(r);const a=this.injector.get(e,e2,r);return a!==e2||n===e2?a:this.parentInjector.get(e,n,r)}}class uy extends n6{get inputs(){return F6(this.componentDef.inputs)}get outputs(){return F6(this.componentDef.outputs)}constructor(e,n){super(),this.componentDef=e,this.ngModule=n,this.componentType=e.type,this.selector=function OO(t){return t.map(TO).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!n}create(e,n,r,a){let y=(a=a||this.ngModule)instanceof w0?a:a?.injector;y&&null!==this.componentDef.getStandaloneInjector&&(y=this.componentDef.getStandaloneInjector(y)||y);const T=y?new O7(e,y):e,Z=T.get(i6,null);if(null===Z)throw new yn(407,!1);const $=T.get($w,null),ie=Z.createRenderer(null,this.componentDef),ue=this.componentDef.selectors[0][0]||"div",he=r?function s7(t,e,n){const r=n===Da.ShadowDom;return t.selectRootElement(e,r)}(ie,r,this.componentDef.encapsulation):La(ie,ue,function T7(t){const e=t.toLowerCase();return"svg"===e?Yu:"math"===e?og:null}(ue)),we=this.componentDef.onPush?288:272,xe=f2(0,null,null,1,0,null,null,null,null,null),Ie=o1(null,xe,null,we,null,null,Z,ie,$,T,null);let Le,je;Bh(Ie);try{const Ue=this.componentDef;let $e,Je=null;Ue.findHostDirectiveDefs?($e=[],Je=new Map,Ue.findHostDirectiveDefs(Ue,$e,Je),$e.push(Ue)):$e=[Ue];const ht=function P7(t,e){const n=t[In],r=ei;return t[r]=e,D0(n,r,2,"#host",null)}(Ie,he),xt=function R7(t,e,n,r,a,y,T,Z){const $=a[In];!function k7(t,e,n,r){for(const a of t)e.mergedAttrs=Gl(e.mergedAttrs,a.hostAttrs);null!==e.mergedAttrs&&(l1(e,e.mergedAttrs,!0),null!==n&&ln(r,n,e))}(r,t,e,T);const ie=y.createRenderer(e,n),ue=o1(a,M6(n),null,n.onPush?32:16,a[t.index],t,y,ie,Z||null,null,null);return $.firstCreatePass&&h2($,t,r.length-1),a1(a,ue),a[t.index]=ue}(ht,he,Ue,$e,Ie,Z,ie);je=Ks(xe,ei),he&&function F7(t,e,n,r){if(r)Kh(t,n,["ng-version",fO.full]);else{const{attrs:a,classes:y}=function NO(t){const e=[],n=[];let r=1,a=2;for(;r0&&pn(t,n,y.join(" "))}}(ie,Ue,he,r),void 0!==n&&function B7(t,e,n){const r=t.projection=[];for(let a=0;a=0;r--){const a=t[r];a.hostVars=e+=a.hostVars,a.hostAttrs=Gl(a.hostAttrs,n=Gl(n,a.hostAttrs))}}(r)}function v2(t){return t===na?{}:t===jr?[]:t}function K7(t,e){const n=t.viewQuery;t.viewQuery=n?(r,a)=>{e(r,a),n(r,a)}:e}function z7(t,e){const n=t.contentQueries;t.contentQueries=n?(r,a,y)=>{e(r,a,y),n(r,a,y)}:e}function V7(t,e){const n=t.hostBindings;t.hostBindings=n?(r,a)=>{e(r,a),n(r,a)}:e}const H7=["providersResolver"],W7=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function G7(t){let n,e=B6(t.type);n=xo(t)?e.\u0275cmp:e.\u0275dir;const r=t;for(const a of H7)r[a]=n[a];if(xo(n))for(const a of W7)r[a]=n[a]}function Z7(t){return e=>{e.findHostDirectiveDefs=j6,e.hostDirectives=(Array.isArray(t)?t:t()).map(n=>"function"==typeof n?{directive:Nn(n),inputs:na,outputs:na}:{directive:Nn(n.directive),inputs:U6(n.inputs),outputs:U6(n.outputs)})}}function j6(t,e,n){if(null!==t.hostDirectives)for(const r of t.hostDirectives){const a=yi(r.directive);Y7(a.declaredInputs,r.inputs),j6(a,e,n),n.set(a,r),e.push(a)}}function U6(t){if(void 0===t||0===t.length)return na;const e={};for(let n=0;nT(Vi(ht[r.index])):r.index;let Je=null;if(!T&&Z&&(Je=function iN(t,e,n,r){const a=t.cleanup;if(null!=a)for(let y=0;y$?Z[$]:null}"string"==typeof T&&(y+=2)}return null}(t,e,a,r.index)),null!==Je){(Je.__ngLastListenerFn__||Je).__ngNextListenerFn__=y,Je.__ngLastListenerFn__=y,we=!1}else{y=r_(r,e,ue,y,!1);const ht=n.listen(je,a,y);he.push(y,ht),ie&&ie.push(a,$e,Ue,Ue+1)}}else y=r_(r,e,ue,y,!1);const xe=r.outputs;let Ie;if(we&&null!==xe&&(Ie=xe[a])){const Le=Ie.length;if(Le)for(let je=0;je-1?Oo(t.index,e):e);let $=n_(e,n,r,T),ie=y.__ngNextListenerFn__;for(;ie;)$=n_(e,n,ie,T)&&$,ie=ie.__ngNextListenerFn__;return a&&!1===$&&(T.preventDefault(),T.returnValue=!1),$}}function ja(t=1){return pg(t)}function oN(t,e){let n=null;const r=function DO(t){const e=t.attrs;if(null!=e){const n=e.indexOf(5);if(!(1&n))return e[n+1]}return null}(t);for(let a=0;a>17&32767}function S2(t){return 2|t}function gd(t){return(131068&t)>>2}function _2(t,e){return-131069&t|e<<2}function M2(t){return 1|t}function fN(t,e,n,r,a,y){let T=y?e.classBindings:e.styleBindings,Z=af(T),$=gd(T);t[r]=n;let ue,ie=!1;if(Array.isArray(n)){const he=n;ue=he[1],(null===ue||Ql(he,ue)>0)&&(ie=!0)}else ue=n;if(a)if(0!==$){const we=af(t[Z+1]);t[r+1]=g1(we,Z),0!==we&&(t[we+1]=_2(t[we+1],r)),t[Z+1]=function cN(t,e){return 131071&t|e<<17}(t[Z+1],r)}else t[r+1]=g1(Z,0),0!==Z&&(t[Z+1]=_2(t[Z+1],r)),Z=r;else t[r+1]=g1($,0),0===Z?Z=r:t[$+1]=_2(t[$+1],r),$=r;ie&&(t[r+1]=S2(t[r+1])),d_(t,ue,r,!0,y),d_(t,ue,r,!1,y),function dN(t,e,n,r,a){const y=a?t.residualClasses:t.residualStyles;null!=y&&"string"==typeof e&&Ql(y,e)>=0&&(n[r+1]=M2(n[r+1]))}(e,ue,t,r,y),T=g1(Z,$),y?e.classBindings=T:e.styleBindings=T}function d_(t,e,n,r,a){const y=t[n+1],T=null===e;let Z=r?af(y):gd(y),$=!1;for(;0!==Z&&(!1===$||T);){const ie=t[Z],ue=t[Z+1];hN(ie,e)&&($=!0,t[Z+1]=r?M2(ue):S2(ue)),Z=r?af(ue):gd(ue)}$&&(t[n+1]=r?S2(y):M2(y))}function hN(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Ql(t,e)>=0}const ho={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function h_(t){return t.substring(ho.key,ho.keyEnd)}function pN(t){return t.substring(ho.value,ho.valueEnd)}function p_(t,e){const n=ho.textEnd;return n===e?-1:(e=ho.keyEnd=function mN(t,e,n){for(;e32;)e++;return e}(t,ho.key=e,n),L0(t,e,n))}function g_(t,e){const n=ho.textEnd;let r=ho.key=L0(t,e,n);return n===r?-1:(r=ho.keyEnd=function vN(t,e,n){let r;for(;e=65&&(-33&r)<=90||r>=48&&r<=57);)e++;return e}(t,r,n),r=m_(t,r,n,58),r=ho.value=L0(t,r,n),r=ho.valueEnd=function bN(t,e,n){let r=-1,a=-1,y=-1,T=e,Z=T;for(;T32&&(Z=T),y=a,a=r,r=-33&$}return Z}(t,r,n),m_(t,r,n,59))}function y_(t){ho.key=0,ho.keyEnd=0,ho.value=0,ho.valueEnd=0,ho.textEnd=t.length}function L0(t,e,n){for(;e=0;n=g_(e,n))A_(t,h_(e),pN(e))}function AN(t){bu(CN,rc,t,!0)}function rc(t,e){for(let n=function gN(t){return y_(t),p_(t,L0(t,0,ho.textEnd))}(e);n>=0;n=p_(e,n))Yr(t,h_(e),!0)}function vu(t,e,n,r){const a=sn(),y=Ar(),T=ua(2);if(y.firstUpdatePass&&w_(y,t,T,r),e!==hr&&Xo(a,T,e)){E_(y,y.data[bo()],a,a[yr],t,a[T+1]=function xN(t,e){return null==t||""===t||("string"==typeof e?t+=e:"object"==typeof t&&(t=$n(pa(t)))),t}(e,n),r,T)}}function bu(t,e,n,r){const a=Ar(),y=ua(2);a.firstUpdatePass&&w_(a,null,y,r);const T=sn();if(n!==hr&&Xo(T,y,n)){const Z=a.data[bo()];if(__(Z,r)&&!b_(a,y)){let $=r?Z.classesWithoutHost:Z.stylesWithoutHost;null!==$&&(n=so($,n||"")),w2(a,Z,T,n,r)}else!function IN(t,e,n,r,a,y,T,Z){a===hr&&(a=jr);let $=0,ie=0,ue=0=t.expandoStartIndex}function w_(t,e,n,r){const a=t.data;if(null===a[n+1]){const y=a[bo()],T=b_(t,n);__(y,r)&&null===e&&!T&&(e=!1),e=function EN(t,e,n,r){const a=Lc(t);let y=r?e.residualClasses:e.residualStyles;if(null===a)0===(r?e.classBindings:e.styleBindings)&&(n=C2(null,t,e,n,r),n=hy(n,e.attrs,r),y=null);else{const T=e.directiveStylingLast;if(-1===T||t[T]!==a)if(n=C2(a,t,e,n,r),null===y){let $=function SN(t,e,n){const r=n?e.classBindings:e.styleBindings;if(0!==gd(r))return t[af(r)]}(t,e,r);void 0!==$&&Array.isArray($)&&($=C2(null,t,e,$[1],r),$=hy($,e.attrs,r),function _N(t,e,n,r){const a=n?e.classBindings:e.styleBindings;t[af(a)]=r}(t,e,r,$))}else y=function MN(t,e,n){let r;const a=e.directiveEnd;for(let y=1+e.directiveStylingLast;y0;){const $=t[a],ie=Array.isArray($),ue=ie?$[1]:$,he=null===ue;let we=n[a+1];we===hr&&(we=he?jr:void 0);let xe=he?kg(we,r):ue===r?we:void 0;if(ie&&!m1(xe)&&(xe=kg($,r)),m1(xe)&&(Z=xe,T))return Z;const Ie=t[a+1];a=T?af(Ie):gd(Ie)}if(null!==e){let $=y?e.residualClasses:e.residualStyles;null!=$&&(Z=kg($,r))}return Z}function m1(t){return void 0!==t}function __(t,e){return 0!=(t.flags&(e?8:16))}function _i(t,e=""){const n=sn(),r=Ar(),a=t+ei,y=r.firstCreatePass?D0(r,a,1,e,null):r.data[a],T=n[a]=Yo(n[yr],e);Xc(r,n,T,y),co(y,!1)}function v1(t){return F0("",t,""),v1}function F0(t,e,n){const r=sn(),a=I0(r,t,e,n);return a!==hr&&nl(r,bo(),a),F0}function M_(t,e,n,r,a){const y=sn(),T=x0(y,t,e,n,r,a);return T!==hr&&nl(y,bo(),T),M_}function D_(t,e,n,r,a,y,T){const Z=sn(),$=T0(Z,t,e,n,r,a,y,T);return $!==hr&&nl(Z,bo(),$),D_}function C_(t,e,n,r,a,y,T,Z,$){const ie=sn(),ue=O0(ie,t,e,n,r,a,y,T,Z,$);return ue!==hr&&nl(ie,bo(),ue),C_}function I_(t,e,n,r,a,y,T,Z,$,ie,ue){const he=sn(),we=N0(he,t,e,n,r,a,y,T,Z,$,ie,ue);return we!==hr&&nl(he,bo(),we),I_}function x_(t,e,n,r,a,y,T,Z,$,ie,ue,he,we){const xe=sn(),Ie=P0(xe,t,e,n,r,a,y,T,Z,$,ie,ue,he,we);return Ie!==hr&&nl(xe,bo(),Ie),x_}function T_(t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie){const Le=sn(),je=R0(Le,t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie);return je!==hr&&nl(Le,bo(),je),T_}function O_(t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie,Le,je){const Ue=sn(),$e=k0(Ue,t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie,Le,je);return $e!==hr&&nl(Ue,bo(),$e),O_}function N_(t){const e=sn(),n=C0(e,t);return n!==hr&&nl(e,bo(),n),N_}function TN(t,e,n){bu(Yr,rc,I0(sn(),t,e,n),!0)}function ON(t,e,n,r,a){bu(Yr,rc,x0(sn(),t,e,n,r,a),!0)}function NN(t,e,n,r,a,y,T){bu(Yr,rc,T0(sn(),t,e,n,r,a,y,T),!0)}function PN(t,e,n,r,a,y,T,Z,$){bu(Yr,rc,O0(sn(),t,e,n,r,a,y,T,Z,$),!0)}function RN(t,e,n,r,a,y,T,Z,$,ie,ue){bu(Yr,rc,N0(sn(),t,e,n,r,a,y,T,Z,$,ie,ue),!0)}function kN(t,e,n,r,a,y,T,Z,$,ie,ue,he,we){bu(Yr,rc,P0(sn(),t,e,n,r,a,y,T,Z,$,ie,ue,he,we),!0)}function LN(t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie){bu(Yr,rc,R0(sn(),t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie),!0)}function FN(t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie,Le,je){bu(Yr,rc,k0(sn(),t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie,Le,je),!0)}function jN(t){bu(Yr,rc,C0(sn(),t),!0)}function UN(t,e,n){nc(I0(sn(),t,e,n))}function KN(t,e,n,r,a){nc(x0(sn(),t,e,n,r,a))}function zN(t,e,n,r,a,y,T){nc(T0(sn(),t,e,n,r,a,y,T))}function VN(t,e,n,r,a,y,T,Z,$){nc(O0(sn(),t,e,n,r,a,y,T,Z,$))}function HN(t,e,n,r,a,y,T,Z,$,ie,ue){nc(N0(sn(),t,e,n,r,a,y,T,Z,$,ie,ue))}function WN(t,e,n,r,a,y,T,Z,$,ie,ue,he,we){nc(P0(sn(),t,e,n,r,a,y,T,Z,$,ie,ue,he,we))}function GN(t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie){nc(R0(sn(),t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie))}function ZN(t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie,Le,je){nc(k0(sn(),t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie,Le,je))}function YN(t){nc(C0(sn(),t))}function P_(t,e,n,r,a){return vu(t,I0(sn(),e,n,r),a,!1),P_}function R_(t,e,n,r,a,y,T){return vu(t,x0(sn(),e,n,r,a,y),T,!1),R_}function k_(t,e,n,r,a,y,T,Z,$){return vu(t,T0(sn(),e,n,r,a,y,T,Z),$,!1),k_}function L_(t,e,n,r,a,y,T,Z,$,ie,ue){return vu(t,O0(sn(),e,n,r,a,y,T,Z,$,ie),ue,!1),L_}function F_(t,e,n,r,a,y,T,Z,$,ie,ue,he,we){return vu(t,N0(sn(),e,n,r,a,y,T,Z,$,ie,ue,he),we,!1),F_}function B_(t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie){return vu(t,P0(sn(),e,n,r,a,y,T,Z,$,ie,ue,he,we,xe),Ie,!1),B_}function j_(t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie,Le,je){return vu(t,R0(sn(),e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie,Le),je,!1),j_}function U_(t,e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie,Le,je,Ue,$e){return vu(t,k0(sn(),e,n,r,a,y,T,Z,$,ie,ue,he,we,xe,Ie,Le,je,Ue),$e,!1),U_}function K_(t,e,n){return vu(t,C0(sn(),e),n,!1),K_}function z_(t,e,n){const r=sn();if(Xo(r,kc(),e)){ma(Ar(),or(),r,t,e,r[yr],n,!0)}return z_}function V_(t,e,n){const r=sn();if(Xo(r,kc(),e)){const y=Ar(),T=or();ma(y,T,r,t,e,R6(Lc(y.data),T,r),n,!0)}return V_}const yd=void 0;var QN=["en",[["a","p"],["AM","PM"],yd],[["AM","PM"],yd,yd],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],yd,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],yd,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",yd,"{1} 'at' {0}",yd],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function JN(t){const n=Math.floor(Math.abs(t)),r=t.toString().replace(/^[^.]*\.?/,"").length;return 1===n&&0===r?1:5}];let B0={};function Es(t){const e=function XN(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=W_(e);if(n)return n;const r=e.split("-")[0];if(n=W_(r),n)return n;if("en"===r)return QN;throw new yn(701,!1)}function H_(t){return Es(t)[ci.PluralCase]}function W_(t){return t in B0||(B0[t]=ii.ng&&ii.ng.common&&ii.ng.common.locales&&ii.ng.common.locales[t]),B0[t]}var ci;!function(t){t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData"}(ci||(ci={}));const qN=["zero","one","two","few","many"];const j0="en-US",b1={marker:"element"},w1={marker:"ICU"};var Ss;!function(t){t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT"}(Ss||(Ss={}));let G_=j0;function Z_(t){ks(t,"Expected localeId to be defined"),"string"==typeof t&&(G_=t.toLowerCase().replace(/_/g,"-"))}function Y_(t,e,n){const r=e.insertBeforeIndex,a=Array.isArray(r)?r[0]:r;return null===a?dd(t,0,n):Vi(n[a])}function J_(t,e,n,r,a){const y=e.insertBeforeIndex;if(Array.isArray(y)){let T=r,Z=null;if(3&e.type||(Z=T,T=a),null!==T&&-1===e.componentOffset)for(let $=1;$1)for(let n=t.length-2;n>=0;n--){const r=t[n];X_(r)||nP(r,e)&&null===rP(r)&&iP(r,e.index)}}function X_(t){return!(64&t.type)}function nP(t,e){return X_(e)||t.index>e.index}function rP(t){const e=t.insertBeforeIndex;return Array.isArray(e)?e[0]:e}function iP(t,e){const n=t.insertBeforeIndex;Array.isArray(n)?n[0]=e:(qv(Y_,J_),t.insertBeforeIndex=e)}function py(t,e){const n=t.data[e];return null===n||"string"==typeof n?null:n.hasOwnProperty("currentCaseLViewIndex")?n:n.value}function aP(t,e,n){const r=s2(t,n,64,null,null);return Q_(e,r),r}function A1(t,e){const n=e[t.currentCaseLViewIndex];return null===n?n:n<0?~n:n}function q_(t){return t>>>17}function $_(t){return(131070&t)>>>1}let gy=0,yy=0;function tM(t,e,n,r){const a=n[yr];let T,y=null;for(let Z=0;Z>>1,xe=e[++Z],Ie=e[++Z];p2(a,mo(we,n),null,null,xe,Ie,null)}else switch($){case w1:const ie=e[++Z],ue=e[++Z];if(null===n[ue]){to(n[ue]=Kw(a,ie),n)}break;case b1:const he=e[++Z],we=e[++Z];if(null===n[we]){to(n[we]=La(a,he,null),n)}}}}function nM(t,e,n,r,a){for(let y=0;y>>2;switch(3&ue){case 1:const we=n[++ie],xe=n[++ie],Ie=t.data[he];"string"==typeof Ie?p2(e[yr],e[he],null,Ie,we,$,xe):ma(t,Ie,e,we,$,e[yr],xe,!1);break;case 0:const Le=e[he];null!==Le&&l0(e[yr],Le,$);break;case 2:dP(t,py(t,he),e,$);break;case 3:rM(t,py(t,he),r,e)}}}}else{const $=n[y+1];if($>0&&3==(3&$)){const ue=py(t,$>>>2);e[ue.currentCaseLViewIndex]<0&&rM(t,ue,r,e)}}y+=Z}}function rM(t,e,n,r){let a=r[e.currentCaseLViewIndex];if(null!==a){let y=gy;a<0&&(a=r[e.currentCaseLViewIndex]=~a,y=-1),nM(t,r,e.update[a],n,y)}}function dP(t,e,n,r){const a=function hP(t,e){let n=t.cases.indexOf(e);if(-1===n)switch(t.type){case 1:{const r=function $N(t,e){const n=H_(e)(parseInt(t,10)),r=qN[n];return void 0!==r?r:"other"}(e,function tP(){return G_}());n=t.cases.indexOf(r),-1===n&&"other"!==r&&(n=t.cases.indexOf("other"));break}case 0:n=t.cases.indexOf("other")}return-1===n?null:n}(e,r);if(A1(e,n)!==a&&(iM(t,e,n),n[e.currentCaseLViewIndex]=null===a?null:~a,null!==a)){const T=n[e.anchorIdx];T&&tM(t,e.create[a],n,T)}}function iM(t,e,n){let r=A1(e,n);if(null!==r){const a=e.remove[r];for(let y=0;y0){const Z=mo(T,n);null!==Z&&le(n[yr],Z)}else iM(t,py(t,~T),n)}}}function pP(){const t=[];let n,r,e=-1;function y(Z,$){e=0;const ie=A1(Z,$);r=null!==ie?Z.remove[ie]:jr}function T(){if(e0)return n[Z];{t.push(e,r);const $=~Z;return y(n[In].data[$],n),T()}}return 0===t.length?null:(r=t.pop(),e=t.pop(),T())}return function a(Z,$){for(n=$;t.length;)t.pop();return y(Z.value,$),T}}const E1=/\ufffd(\d+):?\d*\ufffd/gi,gP=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,yP=/\ufffd(\d+)\ufffd/,sM=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,my="\ufffd",mP=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,vP=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,bP=/\uE500/g;function AP(t,e,n,r,a,y){const T=ms(),Z=[],$=[],ie=[[]];a=function DP(t,e){if(function MP(t){return-1===t}(e))return cM(t);{const n=t.indexOf(`:${e}${my}`)+2+e.toString().length,r=t.search(new RegExp(`${my}\\/\\*\\d+:${e}${my}`));return cM(t.substring(n,r))}}(a,y);const ue=function wP(t){return t.replace(bP," ")}(a).split(vP);for(let he=0;hen.length&&n.push($)}return{type:r,mainBinding:a,cases:e,values:n}}function I2(t){if(!t)return[];let e=0;const n=[],r=[],a=/[{}]/g;let y;for(a.lastIndex=0;y=a.exec(t);){const Z=y.index;if("}"==y[0]){if(n.pop(),0==n.length){const $=t.substring(e,Z);sM.test($)?r.push(CP($)):r.push($),e=Z+1}}else{if(0==n.length){const $=t.substring(e,Z);r.push($),e=Z+1}n.push("{")}}const T=t.substring(e);return r.push(T),r}function IP(t,e,n,r,a,y,T,Z){const $=[],ie=[],ue=[];e.cases.push(y),e.create.push($),e.remove.push(ie),e.update.push(ue);const we=FS(Gn()).getInertBodyElement(T),xe=Ww(we)||we;return xe?fM(t,e,n,r,$,ie,ue,xe,a,Z,0):0}function fM(t,e,n,r,a,y,T,Z,$,ie,ue){let he=0,we=Z.firstChild;for(;we;){const xe=sy(t,n,1,null);switch(we.nodeType){case Node.ELEMENT_NODE:const Ie=we,Le=Ie.tagName.toLowerCase();if(Vw.hasOwnProperty(Le)){x2(a,b1,Le,$,xe),t.data[xe]=Le;const Je=Ie.attributes;for(let ht=0;ht>>Ss.SHIFT;let he=t[ue];null===he&&(he=t[ue]=$?a.createComment(Z):Yo(a,Z)),ie&&null!==n&&Yc(a,n,he,r,!1)}})(a,$.create,ue,he),hg(!0)}function gM(){hg(!1)}function KP(t,e,n){pM(t,e,n),gM()}function zP(t,e){const n=Ar(),r=aa(n.consts,e);!function SP(t,e,n){const a=Hi().index,y=[];if(t.firstCreatePass&&null===t.data[e]){for(let T=0;T0){const r=t.data[n];nM(t,e,Array.isArray(r)?r:r.update,zs()-yy-1,gy)}gy=0,yy=0}(Ar(),sn(),t+ei)}function HP(t,e={}){return function UP(t,e={}){let n=t;if(PP.test(t)){const r={},a=[hM];n=n.replace(RP,(y,T,Z)=>{const $=T||Z,ie=r[$]||[];if(ie.length||($.split("|").forEach(Le=>{const je=Le.match(jP),Ue=je?parseInt(je[1],10):hM,$e=BP.test(Le);ie.push([Ue,$e,Le])}),r[$]=ie),!ie.length)throw new Error(`i18n postprocess: unmatched placeholder - ${$}`);const ue=a[a.length-1];let he=0;for(let Le=0;Lee.hasOwnProperty(y)?`${a}${e[y]}${$}`:r),n=n.replace(LP,(r,a)=>e.hasOwnProperty(a)?e[a]:r),n=n.replace(FP,(r,a)=>{if(e.hasOwnProperty(a)){const y=e[a];if(!y.length)throw new Error(`i18n postprocess: unmatched ICU - ${r} with key: ${a}`);return y.shift()}return r})),n}(t,e)}function T2(t,e,n,r,a){if(t=Nn(t),Array.isArray(t))for(let y=0;y>20;if(hd(t)||!t.multi){const xe=new Fi($,a,bn),Ie=N2(Z,e,a?ue:ue+we,he);-1===Ie?(Wh(td(ie,T),y,Z),O2(y,t,e.length),e.push(Z),ie.directiveStart++,ie.directiveEnd++,a&&(ie.providerIndexes+=1048576),n.push(xe),T.push(xe)):(n[Ie]=xe,T[Ie]=xe)}else{const xe=N2(Z,e,ue+we,he),Ie=N2(Z,e,ue,ue+we),Le=xe>=0&&n[xe],je=Ie>=0&&n[Ie];if(a&&!je||!a&&!Le){Wh(td(ie,T),y,Z);const Ue=function YP(t,e,n,r,a){const y=new Fi(t,n,bn);return y.multi=[],y.index=e,y.componentProviders=0,mM(y,a,r&&!n),y}(a?ZP:GP,n.length,a,r,$);!a&&je&&(n[Ie].providerFactory=Ue),O2(y,t,e.length,0),e.push(Z),ie.directiveStart++,ie.directiveEnd++,a&&(ie.providerIndexes+=1048576),n.push(Ue),T.push(Ue)}else{O2(y,t,xe>-1?xe:Ie,mM(n[a?Ie:xe],$,!a&&r))}!a&&r&&je&&n[Ie].componentProviders++}}}function O2(t,e,n,r){const a=hd(e),y=function q9(t){return!!t.useClass}(e);if(a||y){const $=(y?Nn(e.useClass):e).prototype.ngOnDestroy;if($){const ie=t.destroyHooks||(t.destroyHooks=[]);if(!a&&e.multi){const ue=ie.indexOf(n);-1===ue?ie.push(n,[r,$]):ie[ue+1].push(r,$)}else ie.push(n,$)}}}function mM(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function N2(t,e,n,r){for(let a=n;a{n.providersResolver=(r,a)=>function WP(t,e,n){const r=Ar();if(r.firstCreatePass){const a=xo(t);T2(n,r.data,r.blueprint,a,!0),T2(e,r.data,r.blueprint,a,!1)}}(r,a?a(t):t,e)}}class U0{}class JP{}class vM extends U0{constructor(e,n){super(),this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new L6(this);const r=ds(e);this._bootstrapComponents=tl(r.bootstrap),this._r3Injector=y6(e,n,[{provide:U0,useValue:this},{provide:ry,useValue:this.componentFactoryResolver}],$n(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class R2 extends JP{constructor(e){super(),this.moduleType=e}create(e){return new vM(this.moduleType,e)}}class XP extends U0{constructor(e,n,r){super(),this.componentFactoryResolver=new L6(this),this.instance=null;const a=new e6([...e,{provide:U0,useValue:this},{provide:ry,useValue:this.componentFactoryResolver}],n||n1(),r,new Set(["environment"]));this.injector=a,a.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function bM(t,e,n=null){return new XP(t,e,n).injector}class S1{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const n=QS(0,e.type),r=n.length>0?bM([n],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}function qP(t){t.getStandaloneInjector=e=>e.get(S1).getOrCreateStandaloneInjector(t)}function aR(t,e,n){const r=vo()+t,a=sn();return a[r]===hr?tc(a,r,n?e.call(n):e()):cy(a,r)}function DM(t,e,n,r){return CM(sn(),vo(),t,e,n,r)}function uR(t,e,n,r,a){return IM(sn(),vo(),t,e,n,r,a)}function cR(t,e,n,r,a,y){return xM(sn(),vo(),t,e,n,r,a,y)}function lR(t,e,n,r,a,y,T){return TM(sn(),vo(),t,e,n,r,a,y,T)}function fR(t,e,n,r,a,y,T,Z){const $=vo()+t,ie=sn(),ue=Fa(ie,$,n,r,a,y);return Xo(ie,$+4,T)||ue?tc(ie,$+5,Z?e.call(Z,n,r,a,y,T):e(n,r,a,y,T)):cy(ie,$+5)}function dR(t,e,n,r,a,y,T,Z,$){const ie=vo()+t,ue=sn(),he=Fa(ue,ie,n,r,a,y);return pd(ue,ie+4,T,Z)||he?tc(ue,ie+6,$?e.call($,n,r,a,y,T,Z):e(n,r,a,y,T,Z)):cy(ue,ie+6)}function hR(t,e,n,r,a,y,T,Z,$,ie){const ue=vo()+t,he=sn();let we=Fa(he,ue,n,r,a,y);return h1(he,ue+4,T,Z,$)||we?tc(he,ue+7,ie?e.call(ie,n,r,a,y,T,Z,$):e(n,r,a,y,T,Z,$)):cy(he,ue+7)}function pR(t,e,n,r,a,y,T,Z,$,ie,ue){const he=vo()+t,we=sn(),xe=Fa(we,he,n,r,a,y);return Fa(we,he+4,T,Z,$,ie)||xe?tc(we,he+8,ue?e.call(ue,n,r,a,y,T,Z,$,ie):e(n,r,a,y,T,Z,$,ie)):cy(we,he+8)}function gR(t,e,n,r){return OM(sn(),vo(),t,e,n,r)}function by(t,e){const n=t[e];return n===hr?void 0:n}function CM(t,e,n,r,a,y){const T=e+n;return Xo(t,T,a)?tc(t,T+1,y?r.call(y,a):r(a)):by(t,T+1)}function IM(t,e,n,r,a,y,T){const Z=e+n;return pd(t,Z,a,y)?tc(t,Z+2,T?r.call(T,a,y):r(a,y)):by(t,Z+2)}function xM(t,e,n,r,a,y,T,Z){const $=e+n;return h1(t,$,a,y,T)?tc(t,$+3,Z?r.call(Z,a,y,T):r(a,y,T)):by(t,$+3)}function TM(t,e,n,r,a,y,T,Z,$){const ie=e+n;return Fa(t,ie,a,y,T,Z)?tc(t,ie+4,$?r.call($,a,y,T,Z):r(a,y,T,Z)):by(t,ie+4)}function OM(t,e,n,r,a,y){let T=e+n,Z=!1;for(let $=0;$=0;n--){const r=e[n];if(t===r.name)return r}}(e,n.pipeRegistry),n.data[a]=r,r.onDestroy&&(n.destroyHooks??(n.destroyHooks=[])).push(a,r.onDestroy)):r=n.data[a];const y=r.factory||(r.factory=Zu(r.type)),T=fs(bn);try{const Z=jc(!1),$=y();return jc(Z),function eN(t,e,n,r){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=r}(n,sn(),a,$),$}finally{fs(T)}}function vR(t,e,n){const r=t+ei,a=sn(),y=Pc(a,r);return wy(a,r)?CM(a,vo(),e,y.transform,n,y):y.transform(n)}function bR(t,e,n,r){const a=t+ei,y=sn(),T=Pc(y,a);return wy(y,a)?IM(y,vo(),e,T.transform,n,r,T):T.transform(n,r)}function wR(t,e,n,r,a){const y=t+ei,T=sn(),Z=Pc(T,y);return wy(T,y)?xM(T,vo(),e,Z.transform,n,r,a,Z):Z.transform(n,r,a)}function AR(t,e,n,r,a,y){const T=t+ei,Z=sn(),$=Pc(Z,T);return wy(Z,T)?TM(Z,vo(),e,$.transform,n,r,a,y,$):$.transform(n,r,a,y)}function ER(t,e,n){const r=t+ei,a=sn(),y=Pc(a,r);return wy(a,r)?OM(a,vo(),e,y.transform,n,y):y.transform.apply(y,n)}function wy(t,e){return t[In].data[e].pure}S1.\u0275prov=nr({token:S1,providedIn:"environment",factory:()=>new S1(Wn(w0))});function L2(t){return e=>{setTimeout(t,void 0,e)}}const So=class SR extends $t{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,n,r){let a=e,y=n||(()=>null),T=r;if(e&&"object"==typeof e){const $=e;a=$.next?.bind($),y=$.error?.bind($),T=$.complete?.bind($)}this.__isAsync&&(y=L2(y),a&&(a=L2(a)),T&&(T=L2(T)));const Z=super.subscribe({next:a,error:y,complete:T});return e instanceof pe&&e.add(Z),Z}};function _R(){return this._results[Symbol.iterator]()}class F2{get changes(){return this._changes||(this._changes=new So)}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const n=F2.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=_R)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,n){return this._results.reduce(e,n)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,n){const r=this;r.dirty=!1;const a=vs(e);(this._changesDetected=!function Pg(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r0;)this.remove(this.length-1)}get(e){const n=PM(this._lContainer);return null!==n&&n[e]||null}get length(){return this._lContainer.length-fi}createEmbeddedView(e,n,r){let a,y;"number"==typeof r?a=r:null!=r&&(a=r.index,y=r.injector);const T=e.createEmbeddedView(n||{},y);return this.insert(T,a),T}createComponent(e,n,r,a,y){const T=e&&!Yl(e);let Z;if(T)Z=n;else{const he=n||{};Z=he.index,r=he.injector,a=he.projectableNodes,y=he.environmentInjector||he.ngModuleRef}const $=T?e:new uy(Ur(e)),ie=r||this.parentInjector;if(!y&&null==$.ngModule){const we=(T?ie:this.parentInjector).get(w0,null);we&&(y=we)}const ue=$.create(ie,a,void 0,y);return this.insert(ue.hostView,Z),ue}insert(e,n){const r=e._lView,a=r[In];if(function mv(t){return hs(t[li])}(r)){const ue=this.indexOf(e);if(-1!==ue)this.detach(ue);else{const he=r[li],we=new NM(he,he[ao],he[li]);we.detach(we.indexOf(e))}}const y=this._adjustIndex(n),T=this._lContainer;Qg(a,r,T,y);const Z=ne(y,T),$=r[yr],ie=Jc($,T[oa]);return null!==ie&&function Zc(t,e,n,r,a,y){r[Ca]=a,r[ao]=e,Ne(t,r,n,1,a,y)}(a,T[ao],$,r,ie,Z),e.attachToViewContainerRef(),Na(B2(T),y,e),e}move(e,n){return this.insert(e,n)}indexOf(e){const n=PM(this._lContainer);return null!==n?n.indexOf(e):-1}remove(e){const n=this._adjustIndex(e,-1),r=Xg(this._lContainer,n);r&&(Jh(B2(this._lContainer),n),qg(r[In],r))}detach(e){const n=this._adjustIndex(e,-1),r=Xg(this._lContainer,n);return r&&null!=Jh(B2(this._lContainer),n)?new ay(r):null}_adjustIndex(e,n=0){return e??this.length+n}};function PM(t){return t[zf]}function B2(t){return t[zf]||(t[zf]=[])}function RM(t,e){let n;const r=e[t.index];if(hs(r))n=r;else{let a;if(8&t.type)a=Vi(r);else{const y=e[yr];a=y.createComment("");const T=ai(t,e);Yc(y,Jc(y,T),a,function Jv(t,e){return t.nextSibling(e)}(y,T),!1)}e[t.index]=n=O6(r,e,a,t),a1(e,n)}return new NM(n,t,e)}class j2{constructor(e){this.queryList=e,this.matches=null}clone(){return new j2(this.queryList)}setDirty(){this.queryList.setDirty()}}class U2{constructor(e=[]){this.queries=e}createEmbeddedView(e){const n=e.queries;if(null!==n){const r=null!==e.contentQueries?e.contentQueries[0]:n.length,a=[];for(let y=0;y0)r.push(T[Z/2]);else{const ie=y[Z+1],ue=e[-$];for(let he=fi;he(null===a&&(a=Ei().compileNgModule(_s,`ng:///${t.name}/\u0275mod.js`,{type:t,bootstrap:vs(e.bootstrap||jr).map(Nn),declarations:r.map(Nn),imports:vs(e.imports||jr).map(Nn).map(ZM),exports:vs(e.exports||jr).map(Nn).map(ZM),schemas:e.schemas?vs(e.schemas):null,id:e.id||null}),a.schemas||(a.schemas=[])),a)});let y=null;Object.defineProperty(t,ra,{get:()=>{if(null===y){const Z=Ei();y=Z.compileFactory(_s,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,deps:Go(t),target:Z.FactoryTarget.NgModule,typeArgumentCount:0})}return y},configurable:!1});let T=null;Object.defineProperty(t,wc,{get:()=>{if(null===T){const Z={name:t.name,type:t,providers:e.providers||jr,imports:[(e.imports||jr).map(Nn),(e.exports||jr).map(Nn)]};T=Ei().compileInjector(_s,`ng:///${t.name}/\u0275inj.js`,Z)}return T},configurable:!1})})(t,e),void 0!==e.id&&Gi(t,e.id),function VR(t,e){Ay.push({moduleType:t,ngModule:e})}(t,e)}function YR(t,e){const n=vs(e.declarations||jr),r=z0(t);n.forEach(a=>{if((a=Nn(a)).hasOwnProperty(Mh)){GM(Ur(a),r)}else!a.hasOwnProperty(Vu)&&!a.hasOwnProperty(Uf)&&(a.ngSelectorScope=t)})}function GM(t,e){t.directiveDefs=()=>Array.from(e.compilation.directives).map(n=>n.hasOwnProperty(Mh)?Ur(n):yi(n)).filter(n=>!!n),t.pipeDefs=()=>Array.from(e.compilation.pipes).map(n=>yo(n)),t.schemas=e.schemas,t.tView=null}function z0(t){if(KM(t))return function JR(t){const e=ds(t,!0);if(null!==e.transitiveCompileScopes)return e.transitiveCompileScopes;const n={schemas:e.schemas||null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set}};return tl(e.imports).forEach(r=>{const a=z0(r);a.exported.directives.forEach(y=>n.compilation.directives.add(y)),a.exported.pipes.forEach(y=>n.compilation.pipes.add(y))}),tl(e.declarations).forEach(r=>{yo(r)?n.compilation.pipes.add(r):n.compilation.directives.add(r)}),tl(e.exports).forEach(r=>{const a=r;if(KM(a)){const y=z0(a);y.exported.directives.forEach(T=>{n.compilation.directives.add(T),n.exported.directives.add(T)}),y.exported.pipes.forEach(T=>{n.compilation.pipes.add(T),n.exported.pipes.add(T)})}else yo(a)?n.exported.pipes.add(a):n.exported.directives.add(a)}),e.transitiveCompileScopes=n,n}(t);if(Dc(t)){if(null!==(Ur(t)||yi(t)))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set([t]),pipes:new Set}};if(null!==yo(t))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set([t])}}}throw new Error(`${t.name} does not have a module def (\u0275mod property)`)}function ZM(t){return UM(t)?t.ngModule:t}let Z2=0;function QR(t,e){let n=null;(function Pa(t,e){jg(e)&&(wo.set(t,e),ef.add(t))})(t,e),QM(t,e),Object.defineProperty(t,Mh,{get:()=>{if(null===n){const r=Ei();if(jg(e)){const ie=[`Component '${t.name}' is not resolved:`];throw e.templateUrl&&ie.push(` - templateUrl: ${e.templateUrl}`),e.styleUrls&&e.styleUrls.length&&ie.push(` - styleUrls: ${JSON.stringify(e.styleUrls)}`),ie.push("Did you run and wait for 'resolveComponentResources()'?"),new Error(ie.join("\n"))}const a=function zR(){return K0}();let y=e.preserveWhitespaces;void 0===y&&(y=null!==a&&void 0!==a.preserveWhitespaces&&a.preserveWhitespaces);let T=e.encapsulation;void 0===T&&(T=null!==a&&void 0!==a.defaultEncapsulation?a.defaultEncapsulation:Da.Emulated);const Z=e.templateUrl||`ng:///${t.name}/template.html`,$={...XM(t,e),typeSourceSpan:r.createParseSourceSpan("Component",t.name,Z),template:e.template||"",preserveWhitespaces:y,styles:e.styles||jr,animations:e.animations,declarations:[],changeDetection:e.changeDetection,encapsulation:T,interpolation:e.interpolation,viewProviders:e.viewProviders||null};Z2++;try{if($.usesInheritance&&qM(t),n=r.compileComponent(_s,Z,$),e.standalone){const ie=vs(e.imports||jr),{directiveDefs:ue,pipeDefs:he}=function qR(t,e){let n=null,r=null;return{directiveDefs:()=>{if(null===n){n=[Ur(t)];const T=new Set;for(const Z of e){const $=Nn(Z);if(!T.has($))if(T.add($),ds($)){const ie=z0($);for(const ue of ie.exported.directives){const he=Ur(ue)||yi(ue);he&&!T.has(ue)&&(T.add(ue),n.push(he))}}else{const ie=Ur($)||yi($);ie&&n.push(ie)}}}return n},pipeDefs:()=>{if(null===r){r=[];const T=new Set;for(const Z of e){const $=Nn(Z);if(!T.has($))if(T.add($),ds($)){const ie=z0($);for(const ue of ie.exported.pipes){const he=yo(ue);he&&!T.has(ue)&&(T.add(ue),r.push(he))}}else{const ie=yo($);ie&&r.push(ie)}}}return r}}}(t,ie);n.directiveDefs=ue,n.pipeDefs=he,n.dependencies=()=>ie.map(Nn)}}finally{Z2--}if(0===Z2&&function HR(){if(!H2){H2=!0;try{for(let t=Ay.length-1;t>=0;t--){const{moduleType:e,ngModule:n}=Ay[t];n.declarations&&n.declarations.every(zM)&&(Ay.splice(t,1),YR(e,n))}}finally{H2=!1}}}(),function $R(t){return void 0!==t.ngSelectorScope}(t)){const ie=z0(t.ngSelectorScope);GM(n,ie)}if(e.schemas){if(!e.standalone)throw new Error(`The 'schemas' was specified for the ${kr(t)} but is only valid on a component that is standalone.`);n.schemas=e.schemas}else e.standalone&&(n.schemas=[])}return n},configurable:!1})}function YM(t,e){let n=null;QM(t,e||{}),Object.defineProperty(t,Vu,{get:()=>{if(null===n){const r=JM(t,e||{});n=Ei().compileDirective(_s,r.sourceMapUrl,r.metadata)}return n},configurable:!1})}function JM(t,e){const n=t&&t.name,r=`ng:///${n}/\u0275dir.js`,a=Ei(),y=XM(t,e);return y.typeSourceSpan=a.createParseSourceSpan("Directive",n,r),y.usesInheritance&&qM(t),{metadata:y,sourceMapUrl:r}}function QM(t,e){let n=null;Object.defineProperty(t,ra,{get:()=>{if(null===n){const r=JM(t,e),a=Ei();n=a.compileFactory(_s,`ng:///${t.name}/\u0275fac.js`,{name:r.metadata.name,type:r.metadata.type,typeArgumentCount:0,deps:Go(t),target:a.FactoryTarget.Directive})}return n},configurable:!1})}function ek(t){return Object.getPrototypeOf(t.prototype)===Object.prototype}function XM(t,e){const n=Ti(),r=n.ownPropMetadata(t);return{name:t.name,type:t,selector:void 0!==e.selector?e.selector:null,host:e.host||na,propMetadata:r,inputs:e.inputs||jr,outputs:e.outputs||jr,queries:$M(t,r,e8),lifecycle:{usesOnChanges:n.hasLifecycleHook(t,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!ek(t),exportAs:rk(e.exportAs),providers:e.providers||null,viewQueries:$M(t,r,t8),isStandalone:!!e.standalone,hostDirectives:e.hostDirectives?.map(a=>"function"==typeof a?{directive:a}:a)||null}}function qM(t){const e=Object.prototype;let n=Object.getPrototypeOf(t.prototype).constructor;for(;n&&n!==e;)!yi(n)&&!Ur(n)&&ok(n)&&YM(n,null),n=Object.getPrototypeOf(n)}function tk(t){return"string"==typeof t?r8(t):Nn(t)}function nk(t,e){return{propertyName:t,predicate:tk(e.selector),descendants:e.descendants,first:e.first,read:e.read?e.read:null,static:!!e.static,emitDistinctChangesOnly:!!e.emitDistinctChangesOnly}}function $M(t,e,n){const r=[];for(const a in e)if(e.hasOwnProperty(a)){const y=e[a];y.forEach(T=>{if(n(T)){if(!T.selector)throw new Error(`Can't construct a query for the property "${a}" of "${kr(t)}" since the query selector wasn't defined.`);if(y.some(n8))throw new Error("Cannot combine @Input decorators with query decorators");r.push(nk(a,T))}})}return r}function rk(t){return void 0===t?null:r8(t)}function e8(t){const e=t.ngMetadataName;return"ContentChild"===e||"ContentChildren"===e}function t8(t){const e=t.ngMetadataName;return"ViewChild"===e||"ViewChildren"===e}function n8(t){return"Input"===t.ngMetadataName}function r8(t){return t.split(",").map(e=>e.trim())}const ik=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function ok(t){const e=Ti();if(ik.some(r=>e.hasLifecycleHook(t,r)))return!0;const n=e.propMetadata(t);for(const r in n){const a=n[r];for(let y=0;yt,void 0,void 0,(t,e)=>YM(t,e));$i("Component",(t={})=>({changeDetection:Mc.Default,...t}),ak,void 0,(t,e)=>QR(t,e)),$i("Pipe",t=>({pure:!0,...t}),void 0,void 0,(t,e)=>function sk(t,e){let n=null,r=null;Object.defineProperty(t,ra,{get:()=>{if(null===r){const a=i8(t,e),y=Ei(a.type);r=y.compileFactory(_s,`ng:///${a.name}/\u0275fac.js`,{name:a.name,type:a.type,typeArgumentCount:0,deps:Go(t),target:y.FactoryTarget.Pipe})}return r},configurable:!1}),Object.defineProperty(t,Uf,{get:()=>{if(null===n){const a=i8(t,e);n=Ei(a.type).compilePipe(_s,`ng:///${a.name}/\u0275pipe.js`,a)}return n},configurable:!1})}(t,e)),fu("Input",t=>({bindingPropertyName:t})),fu("Output",t=>({bindingPropertyName:t})),fu("HostBinding",t=>({hostPropertyName:t})),fu("HostListener",(t,e)=>({eventName:t,args:e})),$i("NgModule",t=>t,void 0,void 0,(t,e)=>WR(t,e));function D1(...t){}const o8=new er("Application Initializer");class il{constructor(e){this.appInits=e,this.resolve=D1,this.reject=D1,this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],n=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{a.subscribe({complete:T,error:Z})});e.push(y)}}Promise.all(e).then(()=>{n()}).catch(r=>{this.reject(r)}),0===e.length&&n(),this.initialized=!0}}il.\u0275fac=function(e){return new(e||il)(Wn(o8,8))},il.\u0275prov=nr({token:il,factory:il.\u0275fac,providedIn:"root"});const V0=new er("AppId",{providedIn:"root",factory:s8});function s8(){return`${Y2()}${Y2()}${Y2()}`}function Y2(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const a8=new er("Platform Initializer"),J2=new er("Platform ID",{providedIn:"platform",factory:()=>"unknown"});new er("Application Packages Root URL"),new er("AnimationModuleType");class md{log(e){console.log(e)}warn(e){console.warn(e)}}md.\u0275fac=function(e){return new(e||md)},md.\u0275prov=nr({token:md,factory:md.\u0275fac,providedIn:"platform"});const ol=new er("LocaleId",{providedIn:"root",factory:()=>Ki(ol,Mr.Optional|Mr.SkipSelf)||function uk(){return typeof $localize<"u"&&$localize.locale||j0}()}),ck=new er("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});new er("Translations"),new er("TranslationsFormat");var u8;!function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"}(u8||(u8={}));class lk{constructor(e,n){this.ngModuleFactory=e,this.componentFactories=n}}class Ey{compileModuleSync(e){return new R2(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),a=tl(ds(e).declarations).reduce((y,T)=>{const Z=Ur(T);return Z&&y.push(new uy(Z)),y},[]);return new lk(n,a)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}Ey.\u0275fac=function(e){return new(e||Ey)},Ey.\u0275prov=nr({token:Ey,factory:Ey.\u0275fac,providedIn:"root"});new er("compilerOptions");const hk=Promise.resolve(0);function Q2(t){typeof Zone>"u"?hk.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class qo{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new So(!1),this.onMicrotaskEmpty=new So(!1),this.onStable=new So(!1),this.onError=new So(!1),typeof Zone>"u")throw new yn(908,!1);Zone.assertZonePatched();const a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.lastRequestAnimationFrameId=-1,a.nativeRequestAnimationFrame=function pk(){let t=ii.requestAnimationFrame,e=ii.cancelAnimationFrame;if(typeof Zone<"u"&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function mk(t){const e=()=>{!function yk(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(ii,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,q2(t),t.isCheckStableRunning=!0,X2(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),q2(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,a,y,T,Z)=>{try{return f8(t),n.invokeTask(a,y,T,Z)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===y.type||t.shouldCoalesceRunChangeDetection)&&e(),d8(t)}},onInvoke:(n,r,a,y,T,Z,$)=>{try{return f8(t),n.invoke(a,y,T,Z,$)}finally{t.shouldCoalesceRunChangeDetection&&e(),d8(t)}},onHasTask:(n,r,a,y)=>{n.hasTask(a,y),r===a&&("microTask"==y.change?(t._hasPendingMicrotasks=y.microTask,q2(t),X2(t)):"macroTask"==y.change&&(t.hasPendingMacrotasks=y.macroTask))},onHandleError:(n,r,a,y)=>(n.handleError(a,y),t.runOutsideAngular(()=>t.onError.emit(y)),!1)})}(a)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!qo.isInAngularZone())throw new yn(909,!1)}static assertNotInAngularZone(){if(qo.isInAngularZone())throw new yn(909,!1)}run(e,n,r){return this._inner.run(e,n,r)}runTask(e,n,r,a){const y=this._inner,T=y.scheduleEventTask("NgZoneEvent: "+a,e,gk,D1,D1);try{return y.runTask(T,n,r)}finally{y.cancelTask(T)}}runGuarded(e,n,r){return this._inner.runGuarded(e,n,r)}runOutsideAngular(e){return this._outer.run(e)}}const gk={};function X2(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function q2(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function f8(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function d8(t){t._nesting--,X2(t)}class vk{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new So,this.onMicrotaskEmpty=new So,this.onStable=new So,this.onError=new So}run(e,n,r){return e.apply(n,r)}runGuarded(e,n,r){return e.apply(n,r)}runOutsideAngular(e){return e()}runTask(e,n,r,a){return e.apply(n,r)}}const h8=new er(""),C1=new er("");class uf{constructor(e,n,r){this._ngZone=e,this.registry=n,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,$2||(function bk(t){$2=t}(r),r.addToWindow(n)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{qo.assertNotInAngularZone(),Q2(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Q2(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>!n.updateCb||!n.updateCb(e)||(clearTimeout(n.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,n,r){let a=-1;n&&n>0&&(a=setTimeout(()=>{this._callbacks=this._callbacks.filter(y=>y.timeoutId!==a),e(this._didWork,this.getPendingTasks())},n)),this._callbacks.push({doneCb:e,timeoutId:a,updateCb:r})}whenStable(e,n,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,n,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,n,r){return[]}}uf.\u0275fac=function(e){return new(e||uf)(Wn(qo),Wn(cf),Wn(C1))},uf.\u0275prov=nr({token:uf,factory:uf.\u0275fac});class cf{constructor(){this._applications=new Map}registerApplication(e,n){this._applications.set(e,n)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,n=!0){return $2?.findTestabilityInTree(this,e,n)??null}}let $2;cf.\u0275fac=function(e){return new(e||cf)},cf.\u0275prov=nr({token:cf,factory:cf.\u0275fac,providedIn:"platform"});const sl=!1;let lf=null;const p8=new er("AllowMultipleToken"),eA=new er("PlatformDestroyListeners"),wk=new er("appBootstrapListener");function g8(t){const e=t.get(a8,null);e&&e.forEach(n=>n())}function y8(t,e,n=[]){const r=`Platform: ${e}`,a=new er(r);return(y=[])=>{let T=tA();if(!T||T.injector.get(p8,!1)){const Z=[...n,...y,{provide:a,useValue:!0}];t?t(Z):function Sk(t){if(lf&&!lf.get(p8,!1))throw new yn(400,!1);lf=t;const e=t.get(vd);return g8(t),e}(m8(Z,r))}return function Mk(t){const e=tA();if(!e)throw new yn(401,!1);return e}()}}function m8(t=[],e){return Qo.create({name:e,providers:[{provide:Jw,useValue:"platform"},{provide:eA,useValue:new Set([()=>lf=null])},...t]})}function tA(){return lf?.get(vd)??null}class vd{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const r=b8(n?.ngZone,v8(n)),a=[{provide:qo,useValue:r}];return r.run(()=>{const y=Qo.create({providers:a,parent:this.injector,name:e.moduleType.name}),T=e.create(y),Z=T.injector.get(S0,null);if(!Z)throw new yn(402,!1);return r.runOutsideAngular(()=>{const $=r.onError.subscribe({next:ie=>{Z.handleError(ie)}});T.onDestroy(()=>{I1(this._modules,T),$.unsubscribe()})}),w8(Z,r,()=>{const $=T.injector.get(il);return $.runInitializers(),$.donePromise.then(()=>(Z_(T.injector.get(ol,j0)||j0),this._moduleDoBootstrap(T),T))})})}bootstrapModule(e,n=[]){const r=A8({},n);return function Ak(t,e,n){const r=new R2(n);return Promise.resolve(r)}(this.injector,0,e).then(a=>this.bootstrapModuleFactory(a,r))}_moduleDoBootstrap(e){const n=e.injector.get(ff);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new yn(-403,!1);e.instance.ngDoBootstrap(n)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new yn(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(eA,null);e&&(e.forEach(n=>n()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}function v8(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}function b8(t,e){let n;return n="noop"===t?new vk:("zone.js"===t?void 0:t)||new qo(e),n}function w8(t,e,n){try{const r=n();return p1(r)?r.catch(a=>{throw e.runOutsideAngular(()=>t.handleError(a)),a}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}function A8(t,e){return t=Array.isArray(e)?e.reduce(A8,t):{...t,...e}}vd.\u0275fac=function(e){return new(e||vd)(Wn(Qo))},vd.\u0275prov=nr({token:vd,factory:vd.\u0275fac,providedIn:"platform"});class ff{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,n,r){this._zone=e,this._injector=n,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new ze(T=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{T.next(this._stable),T.complete()})}),y=new ze(T=>{let Z;this._zone.runOutsideAngular(()=>{Z=this._zone.onStable.subscribe(()=>{qo.assertNotInAngularZone(),Q2(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,T.next(!0))})})});const $=this._zone.onUnstable.subscribe(()=>{qo.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{T.next(!1)}))});return()=>{Z.unsubscribe(),$.unsubscribe()}});this.isStable=cr(a,y.pipe(function $r(t={}){const{connector:e=(()=>new $t),resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:a=!0}=t;return y=>{let T,Z,$,ie=0,ue=!1,he=!1;const we=()=>{Z?.unsubscribe(),Z=void 0},xe=()=>{we(),T=$=void 0,ue=he=!1},Ie=()=>{const Le=T;xe(),Le?.unsubscribe()};return mn((Le,je)=>{ie++,!he&&!ue&&we();const Ue=$=$??e();je.add(()=>{ie--,0===ie&&!he&&!ue&&(Z=ri(Ie,a))}),Ue.subscribe(je),!T&&ie>0&&(T=new Be({next:$e=>Ue.next($e),error:$e=>{he=!0,we(),Z=ri(xe,n,$e),Ue.error($e)},complete:()=>{ue=!0,we(),Z=ri(xe,r),Ue.complete()}}),wr(Le).subscribe(T))})(y)}}()))}bootstrap(e,n){sl&&this.warnIfDestroyed();const r=e instanceof n6;if(!this._injector.get(il).done){const we="Cannot bootstrap as there are still asynchronous initializers running."+(!r&&Dc(e)?"":" Bootstrap components in the `ngDoBootstrap` method of the root module.");throw new yn(405,sl&&we)}let y;y=r?e:this._injector.get(ry).resolveComponentFactory(e),this.componentTypes.push(y.componentType);const T=function Ek(t){return t.isBoundToModule}(y)?void 0:this._injector.get(U0),Z=n||y.selector,$=y.create(Qo.NULL,[],Z,T),ie=$.location.nativeElement,ue=$.injector.get(h8,null);return ue?.registerApplication(ie),$.onDestroy(()=>{this.detachView($.hostView),I1(this.components,$),ue?.unregisterApplication(ie)}),this._loadComponent($),$}tick(){if(sl&&this.warnIfDestroyed(),this._runningTick)throw new yn(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){sl&&this.warnIfDestroyed();const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){sl&&this.warnIfDestroyed();const n=e;I1(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(wk,[]);n.push(...this._bootstrapListeners),n.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return sl&&this.warnIfDestroyed(),this._destroyListeners.push(e),()=>I1(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new yn(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){sl&&this._destroyed&&console.warn(wi(406,"This instance of the `ApplicationRef` has already been destroyed."))}}function I1(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}ff.\u0275fac=function(e){return new(e||ff)(Wn(qo),Wn(w0),Wn(S0))},ff.\u0275prov=nr({token:ff,factory:ff.\u0275fac,providedIn:"root"});class nA{}nA.__NG_ELEMENT_ID__=function Ck(t){return function Ik(t,e,n){if(Vf(t)&&!n){const r=Oo(t.index,e);return new ay(r,r)}if(47&t.type){const r=e[zi];return new ay(r,e)}return null}(Hi(),sn(),16==(16&t))};class D8{constructor(){}supports(e){return d1(e)}create(e){return new Rk(e)}}const Pk=(t,e)=>e;class Rk{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Pk}forEachItem(e){let n;for(n=this._itHead;null!==n;n=n._next)e(n)}forEachOperation(e){let n=this._itHead,r=this._removalsHead,a=0,y=null;for(;n||r;){const T=!r||n&&n.currentIndex{T=this._trackByFn(a,Z),null!==n&&Object.is(n.trackById,T)?(r&&(n=this._verifyReinsertion(n,Z,T,a)),Object.is(n.item,Z)||this._addIdentityChange(n,Z)):(n=this._mismatch(n,Z,T,a),r=!0),n=n._next,a++}),this.length=a;return this._truncate(n),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,n,r,a){let y;return null===e?y=this._itTail:(y=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(e.item,n)||this._addIdentityChange(e,n),this._reinsertAfter(e,y,a)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(r,a))?(Object.is(e.item,n)||this._addIdentityChange(e,n),this._moveAfter(e,y,a)):e=this._addAfter(new kk(n,r),y,a),e}_verifyReinsertion(e,n,r,a){let y=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==y?e=this._reinsertAfter(y,e._prev,a):e.currentIndex!=a&&(e.currentIndex=a,this._addToMoves(e,a)),e}_truncate(e){for(;null!==e;){const n=e._next;this._addToRemovals(this._unlink(e)),e=n}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,n,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const a=e._prevRemoved,y=e._nextRemoved;return null===a?this._removalsHead=y:a._nextRemoved=y,null===y?this._removalsTail=a:y._prevRemoved=a,this._insertAfter(e,n,r),this._addToMoves(e,r),e}_moveAfter(e,n,r){return this._unlink(e),this._insertAfter(e,n,r),this._addToMoves(e,r),e}_addAfter(e,n,r){return this._insertAfter(e,n,r),null===this._additionsTail?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,n,r){const a=null===n?this._itHead:n._next;return e._next=a,e._prev=n,null===a?this._itTail=e:a._prev=e,null===n?this._itHead=e:n._next=e,null===this._linkedRecords&&(this._linkedRecords=new C8),this._linkedRecords.put(e),e.currentIndex=r,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const n=e._prev,r=e._next;return null===n?this._itHead=r:n._next=r,null===r?this._itTail=n:r._prev=n,e}_addToMoves(e,n){return e.previousIndex===n||(null===this._movesTail?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new C8),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,n){return e.item=n,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}}class kk{constructor(e,n){this.item=e,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Lk{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,n){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===n||n<=r.currentIndex)&&Object.is(r.trackById,e))return r;return null}remove(e){const n=e._prevDup,r=e._nextDup;return null===n?this._head=r:n._nextDup=r,null===r?this._tail=n:r._prevDup=n,null===this._head}}class C8{constructor(){this.map=new Map}put(e){const n=e.trackById;let r=this.map.get(n);r||(r=new Lk,this.map.set(n,r)),r.add(e)}get(e,n){const r=e,a=this.map.get(r);return a?a.get(e,n):null}remove(e){const n=e.trackById;return this.map.get(n).remove(e)&&this.map.delete(n),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function I8(t,e,n){const r=t.previousIndex;if(null===r)return r;let a=0;return n&&r{if(n&&n.key===a)this._maybeAddToChanges(n,r),this._appendAfter=n,n=n._next;else{const y=this._getOrCreateRecordForKey(a,r);n=this._insertBeforeOrAppend(n,y)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,n){if(e){const r=e._prev;return n._next=e,n._prev=r,e._prev=n,r&&(r._next=n),e===this._mapHead&&(this._mapHead=n),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(e,n){if(this._records.has(e)){const a=this._records.get(e);this._maybeAddToChanges(a,n);const y=a._prev,T=a._next;return y&&(y._next=T),T&&(T._prev=y),a._next=null,a._prev=null,a}const r=new Bk(e);return this._records.set(e,r),r.currentValue=n,this._addToAdditions(r),r}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,n){Object.is(n,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=n,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,n){e instanceof Map?e.forEach(n):Object.keys(e).forEach(r=>n(e[r],r))}}class Bk{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function T8(){return new Eu([new D8])}class Eu{constructor(e){this.factories=e}static create(e,n){if(null!=n){const r=n.factories.slice();e=e.concat(r)}return new Eu(e)}static extend(e){return{provide:Eu,useFactory:n=>Eu.create(e,n||T8()),deps:[[Eu,new $l,new ql]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(null!=n)return n;throw new yn(901,!1)}}function O8(){return new Ua([new x8])}Eu.\u0275prov=nr({token:Eu,providedIn:"root",factory:T8});class Ua{constructor(e){this.factories=e}static create(e,n){if(n){const r=n.factories.slice();e=e.concat(r)}return new Ua(e)}static extend(e){return{provide:Ua,useFactory:n=>Ua.create(e,n||O8()),deps:[[Ua,new $l,new ql]]}}find(e){const n=this.factories.find(r=>r.supports(e));if(n)return n;throw new yn(901,!1)}}Ua.\u0275prov=nr({token:Ua,providedIn:"root",factory:O8});const jk=[new x8],Uk=[new D8],Kk=(new Eu(Uk),new Ua(jk),y8(null,"core",[]));class H0{constructor(e){}}function aA(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}H0.\u0275fac=function(e){return new(e||H0)(Wn(ff))},H0.\u0275mod=Bs({type:H0}),H0.\u0275inj=Ls({});let uA=null;function oc(){return uA}class Hk{}const Di=new er("DocumentToken");class wd{historyGo(e){throw new Error("Not implemented")}}wd.\u0275fac=function(e){return new(e||wd)},wd.\u0275prov=nr({token:wd,factory:function(){return function Wk(){return Wn(W0)}()},providedIn:"platform"});new er("Location Initialized");class W0 extends wd{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return oc().getBaseHref(this._doc)}onPopState(e){const n=oc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=oc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,n,r){N8()?this._history.pushState(e,n,r):this._location.hash=r}replaceState(e,n,r){N8()?this._history.replaceState(e,n,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}function N8(){return!!window.history.pushState}function cA(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function P8(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length,r=n-("/"===t[n-1]?1:0);return t.slice(0,r)+t.slice(n)}function al(t){return t&&"?"!==t[0]?"?"+t:t}W0.\u0275fac=function(e){return new(e||W0)(Wn(Di))},W0.\u0275prov=nr({token:W0,factory:function(){return function Gk(){return new W0(Wn(Di))}()},providedIn:"platform"});class df{historyGo(e){throw new Error("Not implemented")}}df.\u0275fac=function(e){return new(e||df)},df.\u0275prov=nr({token:df,factory:function(){return Ki(G0)},providedIn:"root"});const R8=new er("appBaseHref");class G0 extends df{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ki(Di).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return cA(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+al(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,a){const y=this.prepareExternalUrl(r+al(a));this._platformLocation.pushState(e,n,y)}replaceState(e,n,r,a){const y=this.prepareExternalUrl(r+al(a));this._platformLocation.replaceState(e,n,y)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}G0.\u0275fac=function(e){return new(e||G0)(Wn(wd),Wn(R8,8))},G0.\u0275prov=nr({token:G0,factory:G0.\u0275fac,providedIn:"root"});class Sy extends df{constructor(e,n){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=n&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let n=this._platformLocation.hash;return null==n&&(n="#"),n.length>0?n.substring(1):n}prepareExternalUrl(e){const n=cA(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,a){let y=this.prepareExternalUrl(r+al(a));0==y.length&&(y=this._platformLocation.pathname),this._platformLocation.pushState(e,n,y)}replaceState(e,n,r,a){let y=this.prepareExternalUrl(r+al(a));0==y.length&&(y=this._platformLocation.pathname),this._platformLocation.replaceState(e,n,y)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}Sy.\u0275fac=function(e){return new(e||Sy)(Wn(wd),Wn(R8,8))},Sy.\u0275prov=nr({token:Sy,factory:Sy.\u0275fac});class sc{constructor(e){this._subject=new So,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function Jk(t){if(new RegExp("^(https?:)?//").test(t)){const[,n]=t.split(/\/\/[^\/]+/);return n}return t}(P8(k8(n))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+al(n))}normalize(e){return sc.stripTrailingSlash(function Yk(t,e){if(!t||!e.startsWith(t))return e;const n=e.substring(t.length);return""===n||["/",";","?","#"].includes(n[0])?n:e}(this._basePath,k8(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",r=null){this._locationStrategy.pushState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+al(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+al(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)})),()=>{const n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(r=>r(e,n))}subscribe(e,n,r){return this._subject.subscribe({next:e,error:n,complete:r})}}function k8(t){return t.replace(/\/index.html$/,"")}sc.normalizeQueryParams=al,sc.joinWithSlash=cA,sc.stripTrailingSlash=P8,sc.\u0275fac=function(e){return new(e||sc)(Wn(df))},sc.\u0275prov=nr({token:sc,factory:function(){return function Zk(){return new sc(Wn(df))}()},providedIn:"root"});const L8={ADP:[void 0,void 0,0],AFN:[void 0,"\u060b",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058f",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20bc"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GHS:[void 0,"GH\u20b5"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202fCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var _y,Ad,$o,ni,Gs,Bi,F8;function O1(t,e){return za(Es(t)[ci.DateFormat],e)}function N1(t,e){return za(Es(t)[ci.TimeFormat],e)}function P1(t,e){return za(Es(t)[ci.DateTimeFormat],e)}function Ka(t,e){const n=Es(t),r=n[ci.NumberSymbols][e];if(typeof r>"u"){if(e===Bi.CurrencyDecimal)return n[ci.NumberSymbols][Bi.Decimal];if(e===Bi.CurrencyGroup)return n[ci.NumberSymbols][Bi.Group]}return r}function lA(t,e){return Es(t)[ci.NumberFormats][e]}!function(t){t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific"}(_y||(_y={})),function(t){t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other"}(Ad||(Ad={})),function(t){t[t.Format=0]="Format",t[t.Standalone=1]="Standalone"}($o||($o={})),function(t){t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short"}(ni||(ni={})),function(t){t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full"}(Gs||(Gs={})),function(t){t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t.Infinity=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup"}(Bi||(Bi={})),function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(F8||(F8={}));const nL=H_;function B8(t){if(!t[ci.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[ci.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function za(t,e){for(let n=e;n>-1;n--)if(typeof t[n]<"u")return t[n];throw new Error("Locale data API: locale data undefined")}function fA(t){const[e,n]=t.split(":");return{hours:+e,minutes:+n}}function oL(t,e,n="en"){const r=function tL(t){return Es(t)[ci.Currencies]}(n)[t]||L8[t]||[],a=r[1];return"narrow"===e&&"string"==typeof a?a:r[0]||t}const sL=2;const uL=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,My={},cL=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var ac,zr,Vr;function lL(t,e,n,r){let a=function bL(t){if(K8(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[a,y=1,T=1]=t.split("-").map(Z=>+Z);return R1(a,y-1,T)}const n=parseFloat(t);if(!isNaN(t-n))return new Date(n);let r;if(r=t.match(uL))return function wL(t){const e=new Date(0);let n=0,r=0;const a=t[8]?e.setUTCFullYear:e.setFullYear,y=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),r=Number(t[9]+t[11])),a.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const T=Number(t[4]||0)-n,Z=Number(t[5]||0)-r,$=Number(t[6]||0),ie=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return y.call(e,T,Z,$,ie),e}(r)}const e=new Date(t);if(!K8(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=ul(n,e)||e;let Z,T=[];for(;e;){if(Z=cL.exec(e),!Z){T.push(e);break}{T=T.concat(Z.slice(1));const ue=T.pop();if(!ue)break;e=ue}}let $=a.getTimezoneOffset();r&&($=U8(r,$),a=function vL(t,e,n){const r=n?-1:1,a=t.getTimezoneOffset(),y=U8(e,a);return function mL(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}(t,r*(y-a))}(a,r,!0));let ie="";return T.forEach(ue=>{const he=function yL(t){if(hA[t])return hA[t];let e;switch(t){case"G":case"GG":case"GGG":e=pi(Vr.Eras,ni.Abbreviated);break;case"GGGG":e=pi(Vr.Eras,ni.Wide);break;case"GGGGG":e=pi(Vr.Eras,ni.Narrow);break;case"y":e=no(zr.FullYear,1,0,!1,!0);break;case"yy":e=no(zr.FullYear,2,0,!0,!0);break;case"yyy":e=no(zr.FullYear,3,0,!1,!0);break;case"yyyy":e=no(zr.FullYear,4,0,!1,!0);break;case"Y":e=B1(1);break;case"YY":e=B1(2,!0);break;case"YYY":e=B1(3);break;case"YYYY":e=B1(4);break;case"M":case"L":e=no(zr.Month,1,1);break;case"MM":case"LL":e=no(zr.Month,2,1);break;case"MMM":e=pi(Vr.Months,ni.Abbreviated);break;case"MMMM":e=pi(Vr.Months,ni.Wide);break;case"MMMMM":e=pi(Vr.Months,ni.Narrow);break;case"LLL":e=pi(Vr.Months,ni.Abbreviated,$o.Standalone);break;case"LLLL":e=pi(Vr.Months,ni.Wide,$o.Standalone);break;case"LLLLL":e=pi(Vr.Months,ni.Narrow,$o.Standalone);break;case"w":e=dA(1);break;case"ww":e=dA(2);break;case"W":e=dA(1,!0);break;case"d":e=no(zr.Date,1);break;case"dd":e=no(zr.Date,2);break;case"c":case"cc":e=no(zr.Day,1);break;case"ccc":e=pi(Vr.Days,ni.Abbreviated,$o.Standalone);break;case"cccc":e=pi(Vr.Days,ni.Wide,$o.Standalone);break;case"ccccc":e=pi(Vr.Days,ni.Narrow,$o.Standalone);break;case"cccccc":e=pi(Vr.Days,ni.Short,$o.Standalone);break;case"E":case"EE":case"EEE":e=pi(Vr.Days,ni.Abbreviated);break;case"EEEE":e=pi(Vr.Days,ni.Wide);break;case"EEEEE":e=pi(Vr.Days,ni.Narrow);break;case"EEEEEE":e=pi(Vr.Days,ni.Short);break;case"a":case"aa":case"aaa":e=pi(Vr.DayPeriods,ni.Abbreviated);break;case"aaaa":e=pi(Vr.DayPeriods,ni.Wide);break;case"aaaaa":e=pi(Vr.DayPeriods,ni.Narrow);break;case"b":case"bb":case"bbb":e=pi(Vr.DayPeriods,ni.Abbreviated,$o.Standalone,!0);break;case"bbbb":e=pi(Vr.DayPeriods,ni.Wide,$o.Standalone,!0);break;case"bbbbb":e=pi(Vr.DayPeriods,ni.Narrow,$o.Standalone,!0);break;case"B":case"BB":case"BBB":e=pi(Vr.DayPeriods,ni.Abbreviated,$o.Format,!0);break;case"BBBB":e=pi(Vr.DayPeriods,ni.Wide,$o.Format,!0);break;case"BBBBB":e=pi(Vr.DayPeriods,ni.Narrow,$o.Format,!0);break;case"h":e=no(zr.Hours,1,-12);break;case"hh":e=no(zr.Hours,2,-12);break;case"H":e=no(zr.Hours,1);break;case"HH":e=no(zr.Hours,2);break;case"m":e=no(zr.Minutes,1);break;case"mm":e=no(zr.Minutes,2);break;case"s":e=no(zr.Seconds,1);break;case"ss":e=no(zr.Seconds,2);break;case"S":e=no(zr.FractionalSeconds,1);break;case"SS":e=no(zr.FractionalSeconds,2);break;case"SSS":e=no(zr.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=L1(ac.Short);break;case"ZZZZZ":e=L1(ac.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=L1(ac.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=L1(ac.Long);break;default:return null}return hA[t]=e,e}(ue);ie+=he?he(a,n,$):"''"===ue?"'":ue.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),ie}function R1(t,e,n){const r=new Date(0);return r.setFullYear(t,e,n),r.setHours(0,0,0),r}function ul(t,e){const n=function Qk(t){return Es(t)[ci.LocaleId]}(t);if(My[n]=My[n]||{},My[n][e])return My[n][e];let r="";switch(e){case"shortDate":r=O1(t,Gs.Short);break;case"mediumDate":r=O1(t,Gs.Medium);break;case"longDate":r=O1(t,Gs.Long);break;case"fullDate":r=O1(t,Gs.Full);break;case"shortTime":r=N1(t,Gs.Short);break;case"mediumTime":r=N1(t,Gs.Medium);break;case"longTime":r=N1(t,Gs.Long);break;case"fullTime":r=N1(t,Gs.Full);break;case"short":const a=ul(t,"shortTime"),y=ul(t,"shortDate");r=k1(P1(t,Gs.Short),[a,y]);break;case"medium":const T=ul(t,"mediumTime"),Z=ul(t,"mediumDate");r=k1(P1(t,Gs.Medium),[T,Z]);break;case"long":const $=ul(t,"longTime"),ie=ul(t,"longDate");r=k1(P1(t,Gs.Long),[$,ie]);break;case"full":const ue=ul(t,"fullTime"),he=ul(t,"fullDate");r=k1(P1(t,Gs.Full),[ue,he])}return r&&(My[n][e]=r),r}function k1(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(n,r){return null!=e&&r in e?e[r]:n})),t}function Su(t,e,n="-",r,a){let y="";(t<0||a&&t<=0)&&(a?t=1-t:(t=-t,y=n));let T=String(t);for(;T.length0||Z>-n)&&(Z+=n),t===zr.Hours)0===Z&&-12===n&&(Z=12);else if(t===zr.FractionalSeconds)return function fL(t,e){return Su(t,3).substring(0,e)}(Z,e);const $=Ka(T,Bi.MinusSign);return Su(Z,e,$,r,a)}}function pi(t,e,n=$o.Format,r=!1){return function(a,y){return function hL(t,e,n,r,a,y){switch(n){case Vr.Months:return function $k(t,e,n){const r=Es(t),y=za([r[ci.MonthsFormat],r[ci.MonthsStandalone]],e);return za(y,n)}(e,a,r)[t.getMonth()];case Vr.Days:return function qk(t,e,n){const r=Es(t),y=za([r[ci.DaysFormat],r[ci.DaysStandalone]],e);return za(y,n)}(e,a,r)[t.getDay()];case Vr.DayPeriods:const T=t.getHours(),Z=t.getMinutes();if(y){const ie=function rL(t){const e=Es(t);return B8(e),(e[ci.ExtraData][2]||[]).map(r=>"string"==typeof r?fA(r):[fA(r[0]),fA(r[1])])}(e),ue=function iL(t,e,n){const r=Es(t);B8(r);const y=za([r[ci.ExtraData][0],r[ci.ExtraData][1]],e)||[];return za(y,n)||[]}(e,a,r),he=ie.findIndex(we=>{if(Array.isArray(we)){const[xe,Ie]=we,Le=T>=xe.hours&&Z>=xe.minutes,je=T0?Math.floor(a/60):Math.ceil(a/60);switch(t){case ac.Short:return(a>=0?"+":"")+Su(T,2,y)+Su(Math.abs(a%60),2,y);case ac.ShortGMT:return"GMT"+(a>=0?"+":"")+Su(T,1,y);case ac.Long:return"GMT"+(a>=0?"+":"")+Su(T,2,y)+":"+Su(Math.abs(a%60),2,y);case ac.Extended:return 0===r?"Z":(a>=0?"+":"")+Su(T,2,y)+":"+Su(Math.abs(a%60),2,y);default:throw new Error(`Unknown zone width "${t}"`)}}}!function(t){t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended"}(ac||(ac={})),function(t){t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day"}(zr||(zr={})),function(t){t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras"}(Vr||(Vr={}));const pL=0,F1=4;function j8(t){return R1(t.getFullYear(),t.getMonth(),t.getDate()+(F1-t.getDay()))}function dA(t,e=!1){return function(n,r){let a;if(e){const y=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,T=n.getDate();a=1+Math.floor((T+y)/7)}else{const y=j8(n),T=function gL(t){const e=R1(t,pL,1).getDay();return R1(t,0,1+(e<=F1?F1:F1+7)-e)}(y.getFullYear()),Z=y.getTime()-T.getTime();a=1+Math.round(Z/6048e5)}return Su(a,t,Ka(r,Bi.MinusSign))}}function B1(t,e=!1){return function(n,r){return Su(j8(n).getFullYear(),t,Ka(r,Bi.MinusSign),e)}}const hA={};function U8(t,e){t=t.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function K8(t){return t instanceof Date&&!isNaN(t.valueOf())}const AL=/^(\d+)?\.((\d+)(-(\d+))?)?$/,z8=22,j1=".",Dy="0",EL=";",SL=",",pA="#",V8="\xa4",_L="%";function gA(t,e,n,r,a,y,T=!1){let Z="",$=!1;if(isFinite(t)){let ie=function xL(t){let r,a,y,T,Z,e=Math.abs(t)+"",n=0;for((a=e.indexOf(j1))>-1&&(e=e.replace(j1,"")),(y=e.search(/e/i))>0?(a<0&&(a=y),a+=+e.slice(y+1),e=e.substring(0,y)):a<0&&(a=e.length),y=0;e.charAt(y)===Dy;y++);if(y===(Z=e.length))r=[0],a=1;else{for(Z--;e.charAt(Z)===Dy;)Z--;for(a-=y,r=[],T=0;y<=Z;y++,T++)r[T]=Number(e.charAt(y))}return a>z8&&(r=r.splice(0,z8-1),n=a-1,a=1),{digits:r,exponent:n,integerLen:a}}(t);T&&(ie=function IL(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(ie));let ue=e.minInt,he=e.minFrac,we=e.maxFrac;if(y){const $e=y.match(AL);if(null===$e)throw new Error(`${y} is not a valid digit info`);const Je=$e[1],ht=$e[3],xt=$e[5];null!=Je&&(ue=mA(Je)),null!=ht&&(he=mA(ht)),null!=xt?we=mA(xt):null!=ht&&he>we&&(we=he)}!function TL(t,e,n){if(e>n)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${n}).`);let r=t.digits,a=r.length-t.integerLen;const y=Math.min(Math.max(e,a),n);let T=y+t.integerLen,Z=r[T];if(T>0){r.splice(Math.max(t.integerLen,T));for(let he=T;he=5)if(T-1<0){for(let he=0;he>T;he--)r.unshift(0),t.integerLen++;r.unshift(1),t.integerLen++}else r[T-1]++;for(;a=ie?Ie.pop():$=!1),we>=10?1:0},0);ue&&(r.unshift(ue),t.integerLen++)}(ie,he,we);let xe=ie.digits,Ie=ie.integerLen;const Le=ie.exponent;let je=[];for($=xe.every($e=>!$e);Ie0?je=xe.splice(Ie,xe.length):(je=xe,xe=[0]);const Ue=[];for(xe.length>=e.lgSize&&Ue.unshift(xe.splice(-e.lgSize,xe.length).join(""));xe.length>e.gSize;)Ue.unshift(xe.splice(-e.gSize,xe.length).join(""));xe.length&&Ue.unshift(xe.join("")),Z=Ue.join(Ka(n,r)),je.length&&(Z+=Ka(n,a)+je.join("")),Le&&(Z+=Ka(n,Bi.Exponential)+"+"+Le)}else Z=Ka(n,Bi.Infinity);return Z=t<0&&!$?e.negPre+Z+e.negSuf:e.posPre+Z+e.posSuf,Z}function ML(t,e,n,r,a){const T=yA(lA(e,_y.Currency),Ka(e,Bi.MinusSign));return T.minFrac=function aL(t){let e;const n=L8[t];return n&&(e=n[2]),"number"==typeof e?e:sL}(r),T.maxFrac=T.minFrac,gA(t,T,e,Bi.CurrencyGroup,Bi.CurrencyDecimal,a).replace(V8,n).replace(V8,"").trim()}function yA(t,e="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=t.split(EL),a=r[0],y=r[1],T=-1!==a.indexOf(j1)?a.split(j1):[a.substring(0,a.lastIndexOf(Dy)+1),a.substring(a.lastIndexOf(Dy)+1)],Z=T[0],$=T[1]||"";n.posPre=Z.substring(0,Z.indexOf(pA));for(let ue=0;ue<$.length;ue++){const he=$.charAt(ue);he===Dy?n.minFrac=n.maxFrac=ue+1:he===pA?n.maxFrac=ue+1:n.posSuf+=he}const ie=Z.split(SL);if(n.gSize=ie[1]?ie[1].length:0,n.lgSize=ie[2]||ie[1]?(ie[2]||ie[1]).length:0,y){const ue=a.length-n.posPre.length-n.posSuf.length,he=y.indexOf(pA);n.negPre=y.substring(0,he).replace(/'/g,""),n.negSuf=y.slice(he+ue).replace(/'/g,"")}else n.negPre=e+n.posPre,n.negSuf=n.posSuf;return n}function mA(t){const e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}class Ed{}function H8(t,e,n,r){let a=`=${t}`;if(e.indexOf(a)>-1||(a=n.getPluralCategory(t,r),e.indexOf(a)>-1))return a;if(e.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${t}"`)}Ed.\u0275fac=function(e){return new(e||Ed)},Ed.\u0275prov=nr({token:Ed,factory:function(e){let n=null;return e?n=new e:(r=Wn(ol),n=new Z0(r)),n;var r},providedIn:"root"});class Z0 extends Ed{constructor(e){super(),this.locale=e}getPluralCategory(e,n){switch(nL(n||this.locale)(e)){case Ad.Zero:return"zero";case Ad.One:return"one";case Ad.Two:return"two";case Ad.Few:return"few";case Ad.Many:return"many";default:return"other"}}}Z0.\u0275fac=function(e){return new(e||Z0)(Wn(ol))},Z0.\u0275prov=nr({token:Z0,factory:Z0.\u0275fac});const vA=/\s+/,W8=[];class Y0{constructor(e,n,r,a){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=r,this._renderer=a,this.initialClasses=W8,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(vA):W8}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(vA):e}ngDoCheck(){for(const n of this.initialClasses)this._updateState(n,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const n of e)this._updateState(n,!0);else if(null!=e)for(const n of Object.keys(e))this._updateState(n,Boolean(e[n]));this._applyStateDiff()}_updateState(e,n){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const n=e[0],r=e[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(e,n){(e=e.trim()).length>0&&e.split(vA).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}Y0.\u0275fac=function(e){return new(e||Y0)(bn(Eu),bn(Ua),bn(ya),bn(el))},Y0.\u0275dir=rr({type:Y0,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0});class Cy{constructor(e){this._viewContainerRef=e,this.ngComponentOutlet=null}ngOnChanges(e){const{_viewContainerRef:n,ngComponentOutletNgModule:r,ngComponentOutletNgModuleFactory:a}=this;if(n.clear(),this._componentRef=void 0,this.ngComponentOutlet){const y=this.ngComponentOutletInjector||n.parentInjector;(e.ngComponentOutletNgModule||e.ngComponentOutletNgModuleFactory)&&(this._moduleRef&&this._moduleRef.destroy(),this._moduleRef=r?function QP(t,e){return new vM(t,e??null)}(r,G8(y)):a?a.create(G8(y)):void 0),this._componentRef=n.createComponent(this.ngComponentOutlet,{index:n.length,injector:y,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngOnDestroy(){this._moduleRef&&this._moduleRef.destroy()}}function G8(t){return t.get(U0).injector}Cy.\u0275fac=function(e){return new(e||Cy)(bn(wu))},Cy.\u0275dir=rr({type:Cy,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[uo]});class NL{constructor(e,n,r,a){this.$implicit=e,this.ngForOf=n,this.index=r,this.count=a}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}class J0{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,n,r){this._viewContainer=e,this._template=n,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const n=this._viewContainer;e.forEachOperation((r,a,y)=>{if(null==r.previousIndex)n.createEmbeddedView(this._template,new NL(r.item,this._ngForOf,-1,-1),null===y?void 0:y);else if(null==y)n.remove(null===a?void 0:a);else if(null!==a){const T=n.get(a);n.move(T,y),Y8(T,r)}});for(let r=0,a=n.length;r{Y8(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,n){return!0}}function Y8(t,e){t.context.$implicit=e.item}J0.\u0275fac=function(e){return new(e||J0)(bn(wu),bn(ic),bn(Eu))},J0.\u0275dir=rr({type:J0,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});class cl{constructor(e,n){this._viewContainer=e,this._context=new RL,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){J8("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){J8("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,n){return!0}}cl.\u0275fac=function(e){return new(e||cl)(bn(wu),bn(ic))},cl.\u0275dir=rr({type:cl,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});class RL{constructor(){this.$implicit=null,this.ngIf=null}}function J8(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${$n(e)}'.`)}class bA{constructor(e,n){this._viewContainerRef=e,this._templateRef=n,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}class Sd{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const n=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const n of this._defaultViews)n.enforceState(e)}}}Sd.\u0275fac=function(e){return new(e||Sd)},Sd.\u0275dir=rr({type:Sd,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});class Iy{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new bA(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}Iy.\u0275fac=function(e){return new(e||Iy)(bn(wu),bn(ic),bn(Sd,9))},Iy.\u0275dir=rr({type:Iy,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});class xy{constructor(e,n,r){r._addDefault(new bA(e,n))}}xy.\u0275fac=function(e){return new(e||xy)(bn(wu),bn(ic),bn(Sd,9))},xy.\u0275dir=rr({type:xy,selectors:[["","ngSwitchDefault",""]],standalone:!0});class Q0{constructor(e){this._localization=e,this._caseViews={}}set ngPlural(e){this._updateView(e)}addCase(e,n){this._caseViews[e]=n}_updateView(e){this._clearViews();const r=H8(e,Object.keys(this._caseViews),this._localization);this._activateView(this._caseViews[r])}_clearViews(){this._activeView&&this._activeView.destroy()}_activateView(e){e&&(this._activeView=e,this._activeView.create())}}Q0.\u0275fac=function(e){return new(e||Q0)(bn(Ed))},Q0.\u0275dir=rr({type:Q0,selectors:[["","ngPlural",""]],inputs:{ngPlural:"ngPlural"},standalone:!0});class Ty{constructor(e,n,r,a){this.value=e;const y=!isNaN(Number(e));a.addCase(y?`=${e}`:e,new bA(r,n))}}Ty.\u0275fac=function(e){return new(e||Ty)(Gh("ngPluralCase"),bn(ic),bn(wu),bn(Q0,1))},Ty.\u0275dir=rr({type:Ty,selectors:[["","ngPluralCase",""]],standalone:!0});class Oy{constructor(e,n,r){this._ngEl=e,this._differs=n,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,n){const[r,a]=e.split("."),y=-1===r.indexOf("-")?void 0:As.DashCase;null!=n?this._renderer.setStyle(this._ngEl.nativeElement,r,a?`${n}${a}`:n,y):this._renderer.removeStyle(this._ngEl.nativeElement,r,y)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}}Oy.\u0275fac=function(e){return new(e||Oy)(bn(ya),bn(Ua),bn(el))},Oy.\u0275dir=rr({type:Oy,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});class Ny{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:a,ngTemplateOutletInjector:y}=this;this._viewRef=n.createEmbeddedView(r,a,y?{injector:y}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}Ny.\u0275fac=function(e){return new(e||Ny)(bn(wu))},Ny.\u0275dir=rr({type:Ny,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[uo]});function _u(t,e){return new yn(2100,!1)}const FL=new class LL{createSubscription(e,n){return e.then(n,r=>{throw r})}dispose(e){}},BL=new class kL{createSubscription(e,n){return e.subscribe({next:n,error:r=>{throw r}})}dispose(e){e.unsubscribe()}};class _d{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,n=>this._updateLatestValue(e,n))}_selectStrategy(e){if(p1(e))return FL;if(q6(e))return BL;throw _u()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,n){e===this._obj&&(this._latestValue=n,this._ref.markForCheck())}}_d.\u0275fac=function(e){return new(e||_d)(bn(nA,16))},_d.\u0275pipe=Io({name:"async",type:_d,pure:!1,standalone:!0});class Md{transform(e){if(null==e)return null;if("string"!=typeof e)throw _u();return e.toLowerCase()}}Md.\u0275fac=function(e){return new(e||Md)},Md.\u0275pipe=Io({name:"lowercase",type:Md,pure:!0,standalone:!0});const jL=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uD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E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;class Dd{transform(e){if(null==e)return null;if("string"!=typeof e)throw _u();return e.replace(jL,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}}Dd.\u0275fac=function(e){return new(e||Dd)},Dd.\u0275pipe=Io({name:"titlecase",type:Dd,pure:!0,standalone:!0});class Cd{transform(e){if(null==e)return null;if("string"!=typeof e)throw _u();return e.toUpperCase()}}Cd.\u0275fac=function(e){return new(e||Cd)},Cd.\u0275pipe=Io({name:"uppercase",type:Cd,pure:!0,standalone:!0});const KL=new er("DATE_PIPE_DEFAULT_TIMEZONE"),zL=new er("DATE_PIPE_DEFAULT_OPTIONS");class Id{constructor(e,n,r){this.locale=e,this.defaultTimezone=n,this.defaultOptions=r}transform(e,n,r,a){if(null==e||""===e||e!=e)return null;try{const y=n??this.defaultOptions?.dateFormat??"mediumDate",T=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return lL(e,y,a||this.locale,T)}catch(y){throw _u(0,y.message)}}}Id.\u0275fac=function(e){return new(e||Id)(bn(ol,16),bn(KL,24),bn(zL,24))},Id.\u0275pipe=Io({name:"date",type:Id,pure:!0,standalone:!0});const VL=/#/g;class xd{constructor(e){this._localization=e}transform(e,n,r){if(null==e)return"";if("object"!=typeof n||null===n)throw _u();return n[H8(e,Object.keys(n),this._localization,r)].replace(VL,e.toString())}}xd.\u0275fac=function(e){return new(e||xd)(bn(Ed,16))},xd.\u0275pipe=Io({name:"i18nPlural",type:xd,pure:!0,standalone:!0});class Td{transform(e,n){if(null==e)return"";if("object"!=typeof n||"string"!=typeof e)throw _u();return n.hasOwnProperty(e)?n[e]:n.hasOwnProperty("other")?n.other:""}}Td.\u0275fac=function(e){return new(e||Td)},Td.\u0275pipe=Io({name:"i18nSelect",type:Td,pure:!0,standalone:!0});class Py{transform(e){return JSON.stringify(e,null,2)}}Py.\u0275fac=function(e){return new(e||Py)},Py.\u0275pipe=Io({name:"json",type:Py,pure:!1,standalone:!0});class Ry{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=Q8}transform(e,n=Q8){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const r=this.differ.diff(e),a=n!==this.compareFn;return r&&(this.keyValues=[],r.forEachItem(y=>{this.keyValues.push(function HL(t,e){return{key:t,value:e}}(y.key,y.currentValue))})),(r||a)&&(this.keyValues.sort(n),this.compareFn=n),this.keyValues}}function Q8(t,e){const n=t.key,r=e.key;if(n===r)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(null===n)return 1;if(null===r)return-1;if("string"==typeof n&&"string"==typeof r)return nnew JL(Wn(Di),window)});class JL{constructor(e,n){this.document=e,this.window=n,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const n=function QL(t,e){const n=t.getElementById(e)||t.getElementsByName(e)[0];if(n)return n;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const r=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let a=r.currentNode;for(;a;){const y=a.shadowRoot;if(y){const T=y.getElementById(e)||y.querySelector(`[name="${e}"]`);if(T)return T}a=r.nextNode()}}return null}(this.document,e);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const n=this.window.history;n&&n.scrollRestoration&&(n.scrollRestoration=e)}}scrollToElement(e){const n=e.getBoundingClientRect(),r=n.left+this.window.pageXOffset,a=n.top+this.window.pageYOffset,y=this.offset();this.window.scrollTo(r-y[0],a-y[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=$8(this.window.history)||$8(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function $8(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}function U1(t,e){return EA(t)?new URL(t):new URL(t,e.location.href)}function EA(t){return/^https?:\/\//.test(t)}function e4(t){return EA(t)?new URL(t).hostname:t}function eF(t){return t.startsWith("/")?t.slice(1):t}const ky=t=>t.src,t4=new er("ImageLoader",{providedIn:"root",factory:()=>ky});function K1(t,e){return function(r){return function qL(t){if("string"!=typeof t||""===t.trim())return!1;try{return new URL(t),!0}catch{return!1}}(r)||function tF(t,e){throw new yn(2959,!1)}(),r=function $L(t){return t.endsWith("/")?t.slice(0,-1):t}(r),[{provide:t4,useValue:T=>(EA(T.src)&&function nF(t,e){throw new yn(2959,!1)}(0,T.src),t(r,{...T,src:eF(T.src)}))}]}}K1(function rF(t,e){let n="format=auto";return e.width&&(n+=`,width=${e.width}`),`${t}/cdn-cgi/image/${n}/${e.src}`});K1(function aF(t,e){let n="f_auto,q_auto";return e.width&&(n+=`,w_${e.width}`),`${t}/image/upload/${n}/${e.src}`});K1(function fF(t,e){const{src:n,width:r}=e;let a;if(r){a=[t,`tr:w-${r}`,n]}else a=[t,n];return a.join("/")});K1(function gF(t,e){const n=new URL(`${t}/${e.src}`);return n.searchParams.set("auto","format"),e.width&&n.searchParams.set("w",e.width.toString()),n.href});function ji(t,e=!0){return`The NgOptimizedImage directive ${e?`(activated on an element with the \`ngSrc="${t}"\`) `:""}has detected that`}function n4(t){throw new yn(2958,`Unexpected invocation of the ${t} in the prod mode. Please make sure that the prod mode is enabled for production builds.`)}class Ly{constructor(){this.images=new Map,this.alreadyWarned=new Set,this.window=null,this.observer=null,n4("LCP checker");const e=Ki(Di).defaultView;typeof e<"u"&&typeof PerformanceObserver<"u"&&(this.window=e,this.observer=this.initPerformanceObserver())}initPerformanceObserver(){const e=new PerformanceObserver(n=>{const r=n.getEntries();if(0===r.length)return;const y=r[r.length-1].element?.src??"";y.startsWith("data:")||y.startsWith("blob:")||this.images.get(y)&&!this.alreadyWarned.has(y)&&(this.alreadyWarned.add(y),function yF(t){const e=ji(t);console.warn(wi(2955,`${e} this image is the Largest Contentful Paint (LCP) element but was not marked "priority". This image should be marked "priority" in order to prioritize its loading. To fix this, add the "priority" attribute.`))}(y))});return e.observe({type:"largest-contentful-paint",buffered:!0}),e}registerImage(e,n){this.observer&&this.images.set(U1(e,this.window).href,n)}unregisterImage(e){this.observer&&this.images.delete(U1(e,this.window).href)}ngOnDestroy(){this.observer&&(this.observer.disconnect(),this.images.clear(),this.alreadyWarned.clear())}}Ly.\u0275fac=function(e){return new(e||Ly)},Ly.\u0275prov=nr({token:Ly,factory:Ly.\u0275fac,providedIn:"root"});const mF=new Set(["localhost","127.0.0.1","0.0.0.0"]),vF=new er("PRECONNECT_CHECK_BLOCKLIST");class Fy{constructor(){this.document=Ki(Di),this.preconnectLinks=null,this.alreadySeen=new Set,this.window=null,this.blocklist=new Set(mF),n4("preconnect link checker");const e=this.document.defaultView;typeof e<"u"&&(this.window=e);const n=Ki(vF,{optional:!0});n&&this.populateBlocklist(n)}populateBlocklist(e){Array.isArray(e)?r4(e,n=>{this.blocklist.add(e4(n))}):this.blocklist.add(e4(e))}assertPreconnect(e,n){if(!this.window)return;const r=U1(e,this.window);this.blocklist.has(r.hostname)||this.alreadySeen.has(r.origin)||(this.alreadySeen.add(r.origin),this.preconnectLinks||(this.preconnectLinks=this.queryPreconnectLinks()),this.preconnectLinks.has(r.origin)||console.warn(wi(2956,`${ji(n)} there is no preconnect tag present for this image. Preconnecting to the origin(s) that serve priority images ensures that these images are delivered as soon as possible. To fix this, please add the following element into the of the document:\n `)))}queryPreconnectLinks(){const e=new Set,r=Array.from(this.document.querySelectorAll("link[rel=preconnect]"));for(let a of r){const y=U1(a.href,this.window);e.add(y.origin)}return e}ngOnDestroy(){this.preconnectLinks?.clear(),this.alreadySeen.clear()}}function r4(t,e){for(let n of t)Array.isArray(n)?r4(n,e):e(n)}Fy.\u0275fac=function(e){return new(e||Fy)},Fy.\u0275prov=nr({token:Fy,factory:Fy.\u0275fac,providedIn:"root"});const bF=new er("NG_OPTIMIZED_PRELOADED_IMAGES",{providedIn:"root",factory:()=>new Set});class q0{constructor(){this.preloadedImages=Ki(bF),this.document=Ki(Di)}createPreloadLinkTag(e,n,r,a){if(this.preloadedImages.has(n))return;this.preloadedImages.add(n);const y=e.createElement("link");e.setAttribute(y,"as","image"),e.setAttribute(y,"href",n),e.setAttribute(y,"rel","preload"),e.setAttribute(y,"fetchpriority","high"),a&&e.setAttribute(y,"imageSizes",a),r&&e.setAttribute(y,"imageSrcset",r),e.appendChild(this.document.head,y)}}q0.\u0275fac=function(e){return new(e||q0)},q0.\u0275prov=nr({token:q0,factory:q0.\u0275fac,providedIn:"root"});const o4=/^((\s*\d+w\s*(,|$)){1,})$/,AF=[1,2],u4={breakpoints:[16,32,48,64,96,128,256,384,640,750,828,1080,1200,1920,2048,3840]},DF=new er("ImageConfig",{providedIn:"root",factory:()=>u4});class z1{constructor(){this.imageLoader=Ki(t4),this.config=function CF(t){let e={};return t.breakpoints&&(e.breakpoints=t.breakpoints.sort((n,r)=>n-r)),Object.assign({},u4,t,e)}(Ki(DF)),this.renderer=Ki(el),this.imgElement=Ki(ya).nativeElement,this.injector=Ki(Qo),this.isServer=function YL(t){return t===WL}(Ki(J2)),this.preloadLinkChecker=Ki(q0),this.lcpObserver=null,this._renderedSrc=null,this._priority=!1,this._disableOptimizedSrcset=!1,this._fill=!1}set width(e){this._width=c4(e)}get width(){return this._width}set height(e){this._height=c4(e)}get height(){return this._height}set priority(e){this._priority=_A(e)}get priority(){return this._priority}set disableOptimizedSrcset(e){this._disableOptimizedSrcset=_A(e)}get disableOptimizedSrcset(){return this._disableOptimizedSrcset}set fill(e){this._fill=_A(e)}get fill(){return this._fill}ngOnInit(){this.setHostAttributes()}setHostAttributes(){this.fill?this.sizes||(this.sizes="100vw"):(this.setHostAttribute("width",this.width.toString()),this.setHostAttribute("height",this.height.toString())),this.setHostAttribute("loading",this.getLoadingBehavior()),this.setHostAttribute("fetchpriority",this.getFetchPriority()),this.setHostAttribute("ng-img","true");const e=this.getRewrittenSrc();let n;this.setHostAttribute("src",e),this.sizes&&this.setHostAttribute("sizes",this.sizes),this.ngSrcset?n=this.getRewrittenSrcset():this.shouldGenerateAutomaticSrcset()&&(n=this.getAutomaticSrcset()),n&&this.setHostAttribute("srcset",n),this.isServer&&this.priority&&this.preloadLinkChecker.createPreloadLinkTag(this.renderer,e,n,this.sizes)}ngOnChanges(e){}callImageLoader(e){let n=e;return this.loaderParams&&(n.loaderParams=this.loaderParams),this.imageLoader(n)}getLoadingBehavior(){return this.priority||void 0===this.loading?this.priority?"eager":"lazy":this.loading}getFetchPriority(){return this.priority?"high":"auto"}getRewrittenSrc(){if(!this._renderedSrc){const e={src:this.ngSrc};this._renderedSrc=this.callImageLoader(e)}return this._renderedSrc}getRewrittenSrcset(){const e=o4.test(this.ngSrcset);return this.ngSrcset.split(",").filter(r=>""!==r).map(r=>{r=r.trim();const a=e?parseFloat(r):parseFloat(r)*this.width;return`${this.callImageLoader({src:this.ngSrc,width:a})} ${r}`}).join(", ")}getAutomaticSrcset(){return this.sizes?this.getResponsiveSrcset():this.getFixedSrcset()}getResponsiveSrcset(){const{breakpoints:e}=this.config;let n=e;return"100vw"===this.sizes?.trim()&&(n=e.filter(a=>a>=640)),n.map(a=>`${this.callImageLoader({src:this.ngSrc,width:a})} ${a}w`).join(", ")}getFixedSrcset(){return AF.map(n=>`${this.callImageLoader({src:this.ngSrc,width:this.width*n})} ${n}x`).join(", ")}shouldGenerateAutomaticSrcset(){return!this._disableOptimizedSrcset&&!this.srcset&&this.imageLoader!==ky&&!(this.width>1920||this.height>1080)}ngOnDestroy(){}setHostAttribute(e,n){this.renderer.setAttribute(this.imgElement,e,n)}}function c4(t){return"string"==typeof t?parseInt(t,10):t}function _A(t){return null!=t&&"false"!=`${t}`}z1.\u0275fac=function(e){return new(e||z1)},z1.\u0275dir=rr({type:z1,selectors:[["img","ngSrc",""]],hostVars:8,hostBindings:function(e,n){2&e&&D2("position",n.fill?"absolute":null)("width",n.fill?"100%":null)("height",n.fill?"100%":null)("inset",n.fill?"0px":null)},inputs:{ngSrc:"ngSrc",ngSrcset:"ngSrcset",sizes:"sizes",width:"width",height:"height",loading:"loading",priority:"priority",loaderParams:"loaderParams",disableOptimizedSrcset:"disableOptimizedSrcset",fill:"fill",src:"src",srcset:"srcset"},standalone:!0,features:[uo]});class OF extends Hk{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class MA extends OF{static makeCurrent(){!function Vk(t){uA||(uA=t)}(new MA)}onAndCancel(e,n,r){return e.addEventListener(n,r,!1),()=>{e.removeEventListener(n,r,!1)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,n){return(n=n||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return"window"===n?window:"document"===n?e:"body"===n?e.body:null}getBaseHref(e){const n=function NF(){return jy=jy||document.querySelector("base"),jy?jy.getAttribute("href"):null}();return null==n?null:function PF(t){V1=V1||document.createElement("a"),V1.setAttribute("href",t);const e=V1.pathname;return"/"===e.charAt(0)?e:`/${e}`}(n)}resetBaseElement(){jy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function OL(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const r=n.indexOf("="),[a,y]=-1==r?[n,""]:[n.slice(0,r),n.slice(r+1)];if(a.trim()===e)return decodeURIComponent(y)}return null}(document.cookie,e)}}let V1,jy=null;const l4=new er("TRANSITION_ID");const kF=[{provide:o8,useFactory:function RF(t,e,n){return()=>{n.get(il).donePromise.then(()=>{const r=oc(),a=e.querySelectorAll(`style[ng-transition="${t}"]`);for(let y=0;y{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,r){return this._findPluginFor(n).addEventListener(e,n,r)}addGlobalEventListener(e,n,r){return this._findPluginFor(n).addGlobalEventListener(e,n,r)}getZone(){return this._zone}_findPluginFor(e){const n=this._eventNameToPlugin.get(e);if(n)return n;const r=this._plugins;for(let a=0;a0?r.set(e,a):r.delete(e),a}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}kd.\u0275fac=function(e){return new(e||kd)},kd.\u0275prov=nr({token:kd,factory:kd.\u0275fac});class uc extends kd{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const n of this.hostNodes)this.addStyleToHost(n,e)}onStyleRemoved(e){const n=this.styleRef;n.get(e)?.forEach(a=>a.remove()),n.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const n of this.getAllStyles())this.addStyleToHost(e,n)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,n){const r=this.doc.createElement("style");r.textContent=n,e.appendChild(r);const a=this.styleRef.get(n);a?a.push(r):this.styleRef.set(n,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}uc.\u0275fac=function(e){return new(e||uc)(Wn(Di))},uc.\u0275prov=nr({token:uc,factory:uc.\u0275fac});const CA={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},IA=/%COMP%/g,FF="_nghost-%COMP%",BF="_ngcontent-%COMP%",h4=new er("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>false});function p4(t,e){return e.flat(100).map(n=>n.replace(IA,t))}function g4(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}class hf{constructor(e,n,r,a){this.eventManager=e,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestory=a,this.rendererByCompId=new Map,this.defaultRenderer=new xA(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,n);return r instanceof v4?r.applyToHost(e):r instanceof TA&&r.applyStyles(),r}getOrCreateRenderer(e,n){const r=this.rendererByCompId;let a=r.get(n.id);if(!a){const y=this.eventManager,T=this.sharedStylesHost,Z=this.removeStylesOnCompDestory;switch(n.encapsulation){case Da.Emulated:a=new v4(y,T,n,this.appId,Z);break;case Da.ShadowDom:return new VF(y,T,e,n);default:a=new TA(y,T,n,Z)}a.onDestroy=()=>r.delete(n.id),r.set(n.id,a)}return a}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}hf.\u0275fac=function(e){return new(e||hf)(Wn(ll),Wn(uc),Wn(V0),Wn(h4))},hf.\u0275prov=nr({token:hf,factory:hf.\u0275fac});class xA{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,n){return n?document.createElementNS(CA[n]||n,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,n){(m4(e)?e.content:e).appendChild(n)}insertBefore(e,n,r){e&&(m4(e)?e.content:e).insertBefore(n,r)}removeChild(e,n){e&&e.removeChild(n)}selectRootElement(e,n){let r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error(`The selector "${e}" did not match any elements`);return n||(r.textContent=""),r}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,n,r,a){if(a){n=a+":"+n;const y=CA[a];y?e.setAttributeNS(y,n,r):e.setAttribute(n,r)}else e.setAttribute(n,r)}removeAttribute(e,n,r){if(r){const a=CA[r];a?e.removeAttributeNS(a,n):e.removeAttribute(`${r}:${n}`)}else e.removeAttribute(n)}addClass(e,n){e.classList.add(n)}removeClass(e,n){e.classList.remove(n)}setStyle(e,n,r,a){a&(As.DashCase|As.Important)?e.style.setProperty(n,r,a&As.Important?"important":""):e.style[n]=r}removeStyle(e,n,r){r&As.DashCase?e.style.removeProperty(n):e.style[n]=""}setProperty(e,n,r){e[n]=r}setValue(e,n){e.nodeValue=n}listen(e,n,r){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,n,g4(r)):this.eventManager.addEventListener(e,n,g4(r))}}"@".charCodeAt(0);function m4(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class VF extends xA{constructor(e,n,r,a){super(e),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const y=p4(a.id,a.styles);for(const T of y){const Z=document.createElement("style");Z.textContent=T,this.shadowRoot.appendChild(Z)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,n){return super.appendChild(this.nodeOrShadowRoot(e),n)}insertBefore(e,n,r){return super.insertBefore(this.nodeOrShadowRoot(e),n,r)}removeChild(e,n){return super.removeChild(this.nodeOrShadowRoot(e),n)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class TA extends xA{constructor(e,n,r,a,y=r.id){super(e),this.sharedStylesHost=n,this.removeStylesOnCompDestory=a,this.rendererUsageCount=0,this.styles=p4(y,r.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class v4 extends TA{constructor(e,n,r,a,y){const T=a+"-"+r.id;super(e,n,r,y,T),this.contentAttr=function UF(t){return BF.replace(IA,t)}(T),this.hostAttr=function KF(t){return FF.replace(IA,t)}(T)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,n){const r=super.createElement(e,n);return super.setAttribute(r,this.contentAttr,""),r}}class ep extends DA{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,r){return e.addEventListener(n,r,!1),()=>this.removeEventListener(e,n,r)}removeEventListener(e,n,r){return e.removeEventListener(n,r)}}ep.\u0275fac=function(e){return new(e||ep)(Wn(Di))},ep.\u0275prov=nr({token:ep,factory:ep.\u0275fac});const b4=["alt","control","meta","shift"],HF={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},WF={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};class Va extends DA{constructor(e){super(e)}supports(e){return null!=Va.parseEventName(e)}addEventListener(e,n,r){const a=Va.parseEventName(n),y=Va.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>oc().onAndCancel(e,a.domEventName,y))}static parseEventName(e){const n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;const a=Va._normalizeKey(n.pop());let y="",T=n.indexOf("code");if(T>-1&&(n.splice(T,1),y="code."),b4.forEach($=>{const ie=n.indexOf($);ie>-1&&(n.splice(ie,1),y+=$+".")}),y+=a,0!=n.length||0===a.length)return null;const Z={};return Z.domEventName=r,Z.fullKey=y,Z}static matchEventFullKeyCode(e,n){let r=HF[e.key]||e.key,a="";return n.indexOf("code.")>-1&&(r=e.code,a="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),b4.forEach(y=>{if(y!==r){(0,WF[y])(e)&&(a+=y+".")}}),a+=r,a===n)}static eventCallback(e,n,r){return a=>{Va.matchEventFullKeyCode(a,e)&&r.runGuarded(()=>n(a))}}static _normalizeKey(e){return"esc"===e?"escape":e}}Va.\u0275fac=function(e){return new(e||Va)(Wn(Di))},Va.\u0275prov=nr({token:Va,factory:Va.\u0275fac});const A4=[{provide:J2,useValue:X8},{provide:a8,useValue:function GF(){MA.makeCurrent()},multi:!0},{provide:Di,useFactory:function YF(){return function Bn(t){vn=t}(document),document},deps:[]}],JF=y8(Kk,"browser",A4),E4=new er(""),S4=[{provide:C1,useClass:class LF{addToWindow(e){ii.getAngularTestability=(r,a=!0)=>{const y=e.findTestabilityInTree(r,a);if(null==y)throw new Error("Could not find testability for element.");return y},ii.getAllAngularTestabilities=()=>e.getAllTestabilities(),ii.getAllAngularRootElements=()=>e.getAllRootElements();ii.frameworkStabilizers||(ii.frameworkStabilizers=[]),ii.frameworkStabilizers.push(r=>{const a=ii.getAllAngularTestabilities();let y=a.length,T=!1;const Z=function($){T=T||$,y--,0==y&&r(T)};a.forEach(function($){$.whenStable(Z)})})}findTestabilityInTree(e,n,r){if(null==n)return null;return e.getTestability(n)??(r?oc().isShadowRoot(n)?this.findTestabilityInTree(e,n.host,!0):this.findTestabilityInTree(e,n.parentElement,!0):null)}},deps:[]},{provide:h8,useClass:uf,deps:[qo,cf,C1]},{provide:uf,useClass:uf,deps:[qo,cf,C1]}],_4=[{provide:Jw,useValue:"root"},{provide:S0,useFactory:function ZF(){return new S0},deps:[]},{provide:Uy,useClass:ep,multi:!0,deps:[Di,qo,J2]},{provide:Uy,useClass:Va,multi:!0,deps:[Di]},{provide:hf,useClass:hf,deps:[ll,uc,V0,h4]},{provide:i6,useExisting:hf},{provide:kd,useExisting:uc},{provide:uc,useClass:uc,deps:[Di]},{provide:ll,useClass:ll,deps:[Uy,qo]},{provide:class XL{},useClass:$0,deps:[]},[]];class pf{constructor(e){false}static withServerTransition(e){return{ngModule:pf,providers:[{provide:V0,useValue:e.appId},{provide:l4,useExisting:V0},kF]}}}pf.\u0275fac=function(e){return new(e||pf)(Wn(E4,12))},pf.\u0275mod=Bs({type:pf}),pf.\u0275inj=Ls({providers:[..._4,...S4],imports:[X0,H0]});class Ky{constructor(e){this._doc=e,this._dom=oc()}addTag(e,n=!1){return e?this._getOrCreateElement(e,n):null}addTags(e,n=!1){return e?e.reduce((r,a)=>(a&&r.push(this._getOrCreateElement(a,n)),r),[]):[]}getTag(e){return e&&this._doc.querySelector(`meta[${e}]`)||null}getTags(e){if(!e)return[];const n=this._doc.querySelectorAll(`meta[${e}]`);return n?[].slice.call(n):[]}updateTag(e,n){if(!e)return null;n=n||this._parseSelector(e);const r=this.getTag(n);return r?this._setMetaElementAttributes(e,r):this._getOrCreateElement(e,!0)}removeTag(e){this.removeTagElement(this.getTag(e))}removeTagElement(e){e&&this._dom.remove(e)}_getOrCreateElement(e,n=!1){if(!n){const y=this._parseSelector(e),T=this.getTags(y).filter(Z=>this._containsAttributes(e,Z))[0];if(void 0!==T)return T}const r=this._dom.createElement("meta");return this._setMetaElementAttributes(e,r),this._doc.getElementsByTagName("head")[0].appendChild(r),r}_setMetaElementAttributes(e,n){return Object.keys(e).forEach(r=>n.setAttribute(this._getMetaKeyMap(r),e[r])),n}_parseSelector(e){const n=e.name?"name":"property";return`${n}="${e[n]}"`}_containsAttributes(e,n){return Object.keys(e).every(r=>n.getAttribute(this._getMetaKeyMap(r))===e[r])}_getMetaKeyMap(e){return XF[e]||e}}Ky.\u0275fac=function(e){return new(e||Ky)(Wn(Di))},Ky.\u0275prov=nr({token:Ky,factory:function(e){let n=null;return n=e?new e:function QF(){return new Ky(Wn(Di))}(),n},providedIn:"root"});const XF={httpEquiv:"http-equiv"};class zy{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}zy.\u0275fac=function(e){return new(e||zy)(Wn(Di))},zy.\u0275prov=nr({token:zy,factory:function(e){let n=null;return n=e?new e:function qF(){return new zy(Wn(Di))}(),n},providedIn:"root"});typeof window<"u"&&window;class Vy{constructor(){this.store={},this.onSerializeCallbacks={},this.store=function nB(t,e){const n=t.getElementById(e+"-state");let r={};if(n&&n.textContent)try{r=JSON.parse(function tB(t){const e={"&a;":"&","&q;":'"',"&s;":"'","&l;":"<","&g;":">"};return t.replace(/&[^;]+;/g,n=>e[n])}(n.textContent))}catch(a){console.warn("Exception while restoring TransferState for app "+e,a)}return r}(Ki(Di),Ki(V0))}get(e,n){return void 0!==this.store[e]?this.store[e]:n}set(e,n){this.store[e]=n}remove(e){delete this.store[e]}hasKey(e){return this.store.hasOwnProperty(e)}get isEmpty(){return 0===Object.keys(this.store).length}onSerialize(e,n){this.onSerializeCallbacks[e]=n}toJson(){for(const e in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(e))try{this.store[e]=this.onSerializeCallbacks[e]()}catch(n){console.warn("Exception in onSerialize callback: ",n)}return JSON.stringify(this.store)}}Vy.\u0275fac=function(e){return new(e||Vy)},Vy.\u0275prov=nr({token:Vy,factory:Vy.\u0275fac,providedIn:"root"});class Hy{}Hy.\u0275fac=function(e){return new(e||Hy)},Hy.\u0275mod=Bs({type:Hy}),Hy.\u0275inj=Ls({});const iB={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0,doubletap:!0},PA=new er("HammerGestureConfig"),C4=new er("HammerLoader");class tp{constructor(){this.events=[],this.overrides={}}buildHammer(e){const n=new Hammer(e,this.options);n.get("pinch").set({enable:!0}),n.get("rotate").set({enable:!0});for(const r in this.overrides)n.get(r).set(this.overrides[r]);return n}}tp.\u0275fac=function(e){return new(e||tp)},tp.\u0275prov=nr({token:tp,factory:tp.\u0275fac});class np extends DA{constructor(e,n,r,a){super(e),this._config=n,this.console=r,this.loader=a,this._loaderPromise=null}supports(e){return!(!iB.hasOwnProperty(e.toLowerCase())&&!this.isCustomEvent(e)||!window.Hammer&&!this.loader)}addEventListener(e,n,r){const a=this.manager.getZone();if(n=n.toLowerCase(),!window.Hammer&&this.loader){this._loaderPromise=this._loaderPromise||a.runOutsideAngular(()=>this.loader());let y=!1,T=()=>{y=!0};return a.runOutsideAngular(()=>this._loaderPromise.then(()=>{window.Hammer?y||(T=this.addEventListener(e,n,r)):T=()=>{}}).catch(()=>{T=()=>{}})),()=>{T()}}return a.runOutsideAngular(()=>{const y=this._config.buildHammer(e),T=function(Z){a.runGuarded(function(){r(Z)})};return y.on(n,T),()=>{y.off(n,T),"function"==typeof y.destroy&&y.destroy()}})}isCustomEvent(e){return this._config.events.indexOf(e)>-1}}np.\u0275fac=function(e){return new(e||np)(Wn(Di),Wn(PA),Wn(md),Wn(C4,8))},np.\u0275prov=nr({token:np,factory:np.\u0275fac});class Wy{}Wy.\u0275fac=function(e){return new(e||Wy)},Wy.\u0275mod=Bs({type:Wy}),Wy.\u0275inj=Ls({providers:[{provide:Uy,useClass:np,multi:!0,deps:[Di,PA,md,[new ql,C4]]},{provide:PA,useClass:tp,deps:[]}]});class rp{}rp.\u0275fac=function(e){return new(e||rp)},rp.\u0275prov=nr({token:rp,factory:function(e){let n=null;return n=e?new(e||rp):Wn(ip),n},providedIn:"root"});class ip extends rp{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case ga.NONE:return n;case ga.HTML:return $u(n,"HTML")?pa(n):VS(this._doc,String(n)).toString();case ga.STYLE:return $u(n,"Style")?pa(n):n;case ga.SCRIPT:if($u(n,"Script"))return pa(n);throw new Error("unsafe value used in a script context");case ga.URL:return $u(n,"URL")?pa(n):$v(String(n));case ga.RESOURCE_URL:if($u(n,"ResourceURL"))return pa(n);throw new Error(`unsafe value used in a resource URL context (see ${Rs})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Rs})`)}}bypassSecurityTrustHtml(e){return function _9(t){return new v9(t)}(e)}bypassSecurityTrustStyle(e){return function M9(t){return new b9(t)}(e)}bypassSecurityTrustScript(e){return function D9(t){return new w9(t)}(e)}bypassSecurityTrustUrl(e){return function C9(t){return new A9(t)}(e)}bypassSecurityTrustResourceUrl(e){return function I9(t){return new E9(t)}(e)}}ip.\u0275fac=function(e){return new(e||ip)(Wn(Di))},ip.\u0275prov=nr({token:ip,factory:function(e){let n=null;return n=e?new e:function oB(t){return new ip(t.get(Di))}(Wn(Qo)),n},providedIn:"root"});new r1("15.2.9");const{isArray:sB}=Array,{getPrototypeOf:aB,prototype:uB,keys:cB}=Object;function lB(t){if(1===t.length){const e=t[0];if(sB(e))return{args:e,keys:null};if(function fB(t){return t&&"object"==typeof t&&aB(t)===uB}(e)){const n=cB(e);return{args:n.map(r=>e[r]),keys:n}}}return{args:t,keys:null}}const{isArray:dB}=Array;function pB(t){return Sn(e=>function hB(t,e){return dB(e)?t(...e):t(e)}(t,e))}function gB(t,e){return t.reduce((n,r,a)=>(n[r]=e[a],n),{})}function yB(...t){const e=function Lf(t){return ye(cs(t))?t.pop():void 0}(t),{args:n,keys:r}=lB(t),a=new ze(y=>{const{length:T}=n;if(!T)return void y.complete();const Z=new Array(T);let $=T,ie=T;for(let ue=0;ue{he||(he=!0,ie--),Z[ue]=we},()=>$--,void 0,()=>{(!$||!he)&&(ie||y.next(r?gB(r,Z):Z),y.complete())}))}});return e?a.pipe(pB(e)):a}class op{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}op.\u0275fac=function(e){return new(e||op)(bn(el),bn(ya))},op.\u0275dir=rr({type:op});class Ha extends op{}Ha.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Ha)))(n||Ha)}}(),Ha.\u0275dir=rr({type:Ha,features:[Qr]});const cc=new er("NgValueAccessor"),mB={provide:cc,useExisting:vr(()=>Ld),multi:!0};class Ld extends Ha{writeValue(e){this.setProperty("checked",e)}}Ld.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Ld)))(n||Ld)}}(),Ld.\u0275dir=rr({type:Ld,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,n){1&e&&Qi("change",function(a){return n.onChange(a.target.checked)})("blur",function(){return n.onTouched()})},features:[Mi([mB]),Qr]});const vB={provide:cc,useExisting:vr(()=>Fd),multi:!0};const wB=new er("CompositionEventMode");class Fd extends op{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function bB(){const t=oc()?oc().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){const n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}Fd.\u0275fac=function(e){return new(e||Fd)(bn(el),bn(ya),bn(wB,8))},Fd.\u0275dir=rr({type:Fd,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,n){1&e&&Qi("input",function(a){return n._handleInput(a.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(a){return n._compositionEnd(a.target.value)})},features:[Mi([vB]),Qr]});const AB=!1;function yf(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function I4(t){return null!=t&&"number"==typeof t.length}const es=new er("NgValidators"),mf=new er("NgAsyncValidators"),EB=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function x4(t){return e=>{if(yf(e.value)||yf(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n{if(yf(e.value)||yf(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}function O4(t){return yf(t.value)?{required:!0}:null}function N4(t){return!0===t.value?null:{required:!0}}function P4(t){return yf(t.value)||EB.test(t.value)?null:{email:!0}}function R4(t){return e=>yf(e.value)||!I4(e.value)?null:e.value.lengthI4(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function L4(t){if(!t)return H1;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),r=>{if(yf(r.value))return null;const a=r.value;return e.test(a)?null:{pattern:{requiredPattern:n,actualValue:a}}}}function H1(t){return null}function F4(t){return null!=t}function B4(t){const e=p1(t)?Gr(t):t;if(AB&&!$6(e)){let n="Expected async validator to return Promise or Observable.";throw"object"==typeof t&&(n+=" Are you using a synchronous validator where an async validator is expected?"),new yn(-1101,n)}return e}function j4(t){let e={};return t.forEach(n=>{e=null!=n?{...e,...n}:e}),0===Object.keys(e).length?null:e}function U4(t,e){return e.map(n=>n(t))}function K4(t){return t.map(e=>function SB(t){return!t.validate}(e)?e:n=>e.validate(n))}function z4(t){if(!t)return null;const e=t.filter(F4);return 0==e.length?null:function(n){return j4(U4(n,e))}}function RA(t){return null!=t?z4(K4(t)):null}function V4(t){if(!t)return null;const e=t.filter(F4);return 0==e.length?null:function(n){return yB(U4(n,e).map(B4)).pipe(Sn(j4))}}function kA(t){return null!=t?V4(K4(t)):null}function H4(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function W4(t){return t._rawValidators}function G4(t){return t._rawAsyncValidators}function LA(t){return t?Array.isArray(t)?t:[t]:[]}function W1(t,e){return Array.isArray(t)?t.includes(e):t===e}function Z4(t,e){const n=LA(e);return LA(t).forEach(a=>{W1(n,a)||n.push(a)}),n}function Y4(t,e){return LA(e).filter(n=>!W1(t,n))}class J4{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=RA(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=kA(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,n){return!!this.control&&this.control.hasError(e,n)}getError(e,n){return this.control?this.control.getError(e,n):null}}class Ms extends J4{get formDirective(){return null}get path(){return null}}class vf extends J4{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Q4{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}class Gy extends Q4{constructor(e){super(e)}}Gy.\u0275fac=function(e){return new(e||Gy)(bn(vf,2))},Gy.\u0275dir=rr({type:Gy,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&y1("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},features:[Qr]});class sp extends Q4{constructor(e){super(e)}}sp.\u0275fac=function(e){return new(e||sp)(bn(Ms,10))},sp.\u0275dir=rr({type:sp,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&y1("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},features:[Qr]});function X4(t,e){return t?`with name: '${e}'`:`at index: ${e}`}const jA=!1,Zy="VALID",Z1="INVALID",ap="PENDING",Yy="DISABLED";function UA(t){return(Y1(t)?t.validators:t)||null}function KA(t,e){return(Y1(e)?e.asyncValidators:t)||null}function Y1(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function q4(t,e,n){const r=t.controls;if(!(e?Object.keys(r):r).length)throw new yn(1e3,jA?function CB(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(e):"");if(!r[n])throw new yn(1001,jA?function IB(t,e){return`Cannot find form control ${X4(t,e)}`}(e,n):"")}function $4(t,e,n){t._forEachChild((r,a)=>{if(void 0===n[a])throw new yn(1002,jA?function xB(t,e){return`Must supply a value for form control ${X4(t,e)}`}(e,a):"")})}class J1{constructor(e,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===Zy}get invalid(){return this.status===Z1}get pending(){return this.status==ap}get disabled(){return this.status===Yy}get enabled(){return this.status!==Yy}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(Z4(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Z4(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(Y4(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(Y4(e,this._rawAsyncValidators))}hasValidator(e){return W1(this._rawValidators,e)}hasAsyncValidator(e){return W1(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(n=>{n.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=ap,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const n=this._parentMarkedDirty(e.onlySelf);this.status=Yy,this.errors=null,this._forEachChild(r=>{r.disable({...e,onlySelf:!0})}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:n}),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){const n=this._parentMarkedDirty(e.onlySelf);this.status=Zy,this._forEachChild(r=>{r.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:n}),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Zy||this.status===ap)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Yy:Zy}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=ap,this._hasOwnPendingAsyncValidator=!0;const n=B4(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,n={}){this.errors=e,this._updateControlsErrors(!1!==n.emitEvent)}get(e){let n=e;return null==n||(Array.isArray(n)||(n=n.split(".")),0===n.length)?null:n.reduce((r,a)=>r&&r._find(a),this)}getError(e,n){const r=n?this.get(n):this;return r&&r.errors?r.errors[e]:null}hasError(e,n){return!!this.getError(e,n)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new So,this.statusChanges=new So}_calculateStatus(){return this._allControlsDisabled()?Yy:this.errors?Z1:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ap)?ap:this._anyControlsHaveStatus(Z1)?Z1:Zy}_anyControlsHaveStatus(e){return this._anyControls(n=>n.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Y1(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){const n=this._parent&&this._parent.dirty;return!e&&!!n&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function TB(t){return Array.isArray(t)?RA(t):t||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function OB(t){return Array.isArray(t)?kA(t):t||null}(this._rawAsyncValidators)}}class Jy extends J1{constructor(e,n,r){super(UA(n),KA(r,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,n){return this.controls[e]?this.controls[e]:(this.controls[e]=n,n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange),n)}addControl(e,n,r={}){this.registerControl(e,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(e,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}setControl(e,n,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],n&&this.registerControl(e,n),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,n={}){$4(this,!0,e),Object.keys(e).forEach(r=>{q4(this,!0,r),this.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){null!=e&&(Object.keys(e).forEach(r=>{const a=this.controls[r];a&&a.patchValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e={},n={}){this._forEachChild((r,a)=>{r.reset(e[a],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n),this._updateTouched(n),this.updateValueAndValidity(n)}getRawValue(){return this._reduceChildren({},(e,n,r)=>(e[r]=n.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(n,r)=>!!r._syncPendingControls()||n);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(n=>{const r=this.controls[n];r&&e(r,n)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const[n,r]of Object.entries(this.controls))if(this.contains(n)&&e(r))return!0;return!1}_reduceValue(){return this._reduceChildren({},(n,r,a)=>((r.enabled||this.disabled)&&(n[a]=r.value),n))}_reduceChildren(e,n){let r=e;return this._forEachChild((a,y)=>{r=n(r,a,y)}),r}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}}class e5 extends Jy{}const Bd=new er("CallSetDisabledState",{providedIn:"root",factory:()=>Qy}),Qy="always";function Q1(t,e){return[...e.path,t]}function Xy(t,e,n=Qy){zA(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||"always"===n)&&e.valueAccessor.setDisabledState?.(t.disabled),function PB(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&t5(t,e)})}(t,e),function kB(t,e){const n=(r,a)=>{e.valueAccessor.writeValue(r),a&&e.viewToModelUpdate(r)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}(t,e),function RB(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&t5(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function NB(t,e){if(e.valueAccessor.setDisabledState){const n=r=>{e.valueAccessor.setDisabledState(r)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}(t,e)}function X1(t,e,n=!0){const r=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(r),e.valueAccessor.registerOnTouched(r)),$1(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function q1(t,e){t.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(e)})}function zA(t,e){const n=W4(t);null!==e.validator?t.setValidators(H4(n,e.validator)):"function"==typeof n&&t.setValidators([n]);const r=G4(t);null!==e.asyncValidator?t.setAsyncValidators(H4(r,e.asyncValidator)):"function"==typeof r&&t.setAsyncValidators([r]);const a=()=>t.updateValueAndValidity();q1(e._rawValidators,a),q1(e._rawAsyncValidators,a)}function $1(t,e){let n=!1;if(null!==t){if(null!==e.validator){const a=W4(t);if(Array.isArray(a)&&a.length>0){const y=a.filter(T=>T!==e.validator);y.length!==a.length&&(n=!0,t.setValidators(y))}}if(null!==e.asyncValidator){const a=G4(t);if(Array.isArray(a)&&a.length>0){const y=a.filter(T=>T!==e.asyncValidator);y.length!==a.length&&(n=!0,t.setAsyncValidators(y))}}}const r=()=>{};return q1(e._rawValidators,r),q1(e._rawAsyncValidators,r),n}function t5(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function n5(t,e){zA(t,e)}function HA(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}function r5(t,e){t._syncPendingControls(),e.forEach(n=>{const r=n.control;"submit"===r.updateOn&&r._pendingChange&&(n.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function WA(t,e){if(!e)return null;let n,r,a;return Array.isArray(e),e.forEach(y=>{y.constructor===Fd?n=y:function BB(t){return Object.getPrototypeOf(t.constructor)===Ha}(y)?r=y:a=y}),a||r||n||null}const UB={provide:Ms,useExisting:vr(()=>bf)},qy=Promise.resolve();class bf extends Ms{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new So,this.form=new Jy({},RA(e),kA(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){qy.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),Xy(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){qy.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){qy.then(()=>{const n=this._findContainer(e.path),r=new Jy({});n5(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){qy.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){qy.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,r5(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}function i5(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function o5(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}bf.\u0275fac=function(e){return new(e||bf)(bn(es,10),bn(mf,10),bn(Bd,8))},bf.\u0275dir=rr({type:bf,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&Qi("submit",function(a){return n.onSubmit(a)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Mi([UB]),Qr]});const $y=class extends J1{constructor(e=null,n,r){super(UA(n),KA(r,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Y1(n)&&(n.nonNullable||n.initialValueIsDefault)&&(o5(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,n={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==n.emitViewToModelChange)),this.updateValueAndValidity(n)}patchValue(e,n={}){this.setValue(e,n)}reset(e=this.defaultValue,n={}){this._applyFormState(e),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){i5(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){i5(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(e){o5(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};class jd extends Ms{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Q1(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}jd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(jd)))(n||jd)}}(),jd.\u0275dir=rr({type:jd,features:[Qr]});const zB={provide:Ms,useExisting:vr(()=>wf)};class wf extends jd{constructor(e,n,r){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}_checkParentType(){!(this._parent instanceof wf)&&this._parent}}wf.\u0275fac=function(e){return new(e||wf)(bn(Ms,5),bn(es,10),bn(mf,10))},wf.\u0275dir=rr({type:wf,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[Mi([zB]),Qr]});const VB={provide:vf,useExisting:vr(()=>up)},s5=Promise.resolve();class up extends vf{constructor(e,n,r,a,y,T){super(),this._changeDetectorRef=y,this.callSetDisabledState=T,this.control=new $y,this._registered=!1,this.update=new So,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=WA(0,a)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),HA(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Xy(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){s5.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,r=0!==n&&aA(n);s5.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Q1(e,this._parent):[e]}}up.\u0275fac=function(e){return new(e||up)(bn(Ms,9),bn(es,10),bn(mf,10),bn(cc,10),bn(nA,8),bn(Bd,8))},up.\u0275dir=rr({type:up,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Mi([VB]),Qr,uo]});class cp{}cp.\u0275fac=function(e){return new(e||cp)},cp.\u0275dir=rr({type:cp,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});const HB={provide:cc,useExisting:vr(()=>Ud),multi:!0};class Ud extends Ha{writeValue(e){const n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}Ud.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Ud)))(n||Ud)}}(),Ud.\u0275dir=rr({type:Ud,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&Qi("input",function(a){return n.onChange(a.target.value)})("blur",function(){return n.onTouched()})},features:[Mi([HB]),Qr]});const WB={provide:cc,useExisting:vr(()=>fp),multi:!0};class Kd{}Kd.\u0275fac=function(e){return new(e||Kd)},Kd.\u0275mod=Bs({type:Kd}),Kd.\u0275inj=Ls({});class lp{constructor(){this._accessors=[]}add(e,n){this._accessors.push([e,n])}remove(e){for(let n=this._accessors.length-1;n>=0;--n)if(this._accessors[n][1]===e)return void this._accessors.splice(n,1)}select(e){this._accessors.forEach(n=>{this._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}_isSameGroup(e,n){return!!e[0].control&&(e[0]._parent===n._control._parent&&e[1].name===n.name)}}lp.\u0275fac=function(e){return new(e||lp)},lp.\u0275prov=nr({token:lp,factory:lp.\u0275fac,providedIn:Kd});class fp extends Ha{constructor(e,n,r,a){super(e,n),this._registry=r,this._injector=a,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=Ki(Bd,{optional:!0})??Qy}ngOnInit(){this._control=this._injector.get(vf),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}}fp.\u0275fac=function(e){return new(e||fp)(bn(el),bn(ya),bn(lp),bn(Qo))},fp.\u0275dir=rr({type:fp,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,n){1&e&&Qi("change",function(){return n.onChange()})("blur",function(){return n.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Mi([WB]),Qr]});const GB={provide:cc,useExisting:vr(()=>zd),multi:!0};class zd extends Ha{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}zd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(zd)))(n||zd)}}(),zd.\u0275dir=rr({type:zd,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,n){1&e&&Qi("change",function(a){return n.onChange(a.target.value)})("input",function(a){return n.onChange(a.target.value)})("blur",function(){return n.onTouched()})},features:[Mi([GB]),Qr]});const GA=new er("NgModelWithFormControlWarning"),ZB={provide:vf,useExisting:vr(()=>Vd)};class Vd extends vf{set isDisabled(e){}constructor(e,n,r,a,y){super(),this._ngModelWarningConfig=a,this.callSetDisabledState=y,this.update=new So,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=WA(0,r)}ngOnChanges(e){if(this._isControlChanged(e)){const n=e.form.previousValue;n&&X1(n,this,!1),Xy(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}HA(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&X1(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}Vd._ngModelWarningSentOnce=!1,Vd.\u0275fac=function(e){return new(e||Vd)(bn(es,10),bn(mf,10),bn(cc,10),bn(GA,8),bn(Bd,8))},Vd.\u0275dir=rr({type:Vd,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Mi([ZB]),Qr,uo]});const YB={provide:Ms,useExisting:vr(()=>Hd)};class Hd extends Ms{constructor(e,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new So,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&($1(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const n=this.form.get(e.path);return Xy(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){X1(e.control||null,e,!1),function jB(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this.submitted=!0,r5(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const n=e.control,r=this.form.get(e.path);n!==r&&(X1(n||null,e),(t=>t instanceof $y)(r)&&(Xy(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);n5(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function LB(t,e){return $1(t,e)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){zA(this.form,this),this._oldForm&&$1(this._oldForm,this)}_checkFormPresent(){this.form}}Hd.\u0275fac=function(e){return new(e||Hd)(bn(es,10),bn(mf,10),bn(Bd,8))},Hd.\u0275dir=rr({type:Hd,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&Qi("submit",function(a){return n.onSubmit(a)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Mi([YB]),Qr,uo]});const JB={provide:Ms,useExisting:vr(()=>Wd)};class Wd extends jd{constructor(e,n,r){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}_checkParentType(){a5(this._parent)}}Wd.\u0275fac=function(e){return new(e||Wd)(bn(Ms,13),bn(es,10),bn(mf,10))},Wd.\u0275dir=rr({type:Wd,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[Mi([JB]),Qr]});const QB={provide:Ms,useExisting:vr(()=>Gd)};class Gd extends Ms{constructor(e,n,r){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Q1(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){a5(this._parent)}}function a5(t){return!(t instanceof Wd||t instanceof Hd||t instanceof Gd)}Gd.\u0275fac=function(e){return new(e||Gd)(bn(Ms,13),bn(es,10),bn(mf,10))},Gd.\u0275dir=rr({type:Gd,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[Mi([QB]),Qr]});const XB={provide:vf,useExisting:vr(()=>Zd)};class Zd extends vf{set isDisabled(e){}constructor(e,n,r,a,y){super(),this._ngModelWarningConfig=y,this._added=!1,this.update=new So,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=WA(0,a)}ngOnChanges(e){this._added||this._setUpControl(),HA(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Q1(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}Zd._ngModelWarningSentOnce=!1,Zd.\u0275fac=function(e){return new(e||Zd)(bn(Ms,13),bn(es,10),bn(mf,10),bn(cc,10),bn(GA,8))},Zd.\u0275dir=rr({type:Zd,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Mi([XB]),Qr,uo]});const qB={provide:cc,useExisting:vr(()=>Af),multi:!0};function u5(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class Af extends Ha{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const r=u5(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=n=>{this.value=this._getOptionValue(n),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const n of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(n),e))return n;return null}_getOptionValue(e){const n=function $B(t){return t.split(":")[0]}(e);return this._optionMap.has(n)?this._optionMap.get(n):e}}Af.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Af)))(n||Af)}}(),Af.\u0275dir=rr({type:Af,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,n){1&e&&Qi("change",function(a){return n.onChange(a.target.value)})("blur",function(){return n.onTouched()})},inputs:{compareWith:"compareWith"},features:[Mi([qB]),Qr]});class em{constructor(e,n,r){this._element=e,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(u5(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}em.\u0275fac=function(e){return new(e||em)(bn(ya),bn(el),bn(Af,9))},em.\u0275dir=rr({type:em,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});const ej={provide:cc,useExisting:vr(()=>Ef),multi:!0};function c5(t,e){return null==t?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class Ef extends Ha{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let n;if(this.value=e,Array.isArray(e)){const r=e.map(a=>this._getOptionId(a));n=(a,y)=>{a._setSelected(r.indexOf(y.toString())>-1)}}else n=(r,a)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(e){this.onChange=n=>{const r=[],a=n.selectedOptions;if(void 0!==a){const y=a;for(let T=0;TYd),multi:!0};class Yd extends Mu{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>f5(e),this.createValidator=e=>T4(e)}}Yd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Yd)))(n||Yd)}}(),Yd.\u0275dir=rr({type:Yd,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Mi([nj]),Qr]});const rj={provide:es,useExisting:vr(()=>Jd),multi:!0};class Jd extends Mu{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>f5(e),this.createValidator=e=>x4(e)}}Jd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Jd)))(n||Jd)}}(),Jd.\u0275dir=rr({type:Jd,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Mi([rj]),Qr]});const ij={provide:es,useExisting:vr(()=>Sf),multi:!0},oj={provide:es,useExisting:vr(()=>Qd),multi:!0};class Sf extends Mu{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=aA,this.createValidator=e=>O4}enabled(e){return e}}Sf.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Sf)))(n||Sf)}}(),Sf.\u0275dir=rr({type:Sf,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,n){2&e&&rl("required",n._enabled?"":null)},inputs:{required:"required"},features:[Mi([ij]),Qr]});class Qd extends Sf{constructor(){super(...arguments),this.createValidator=e=>N4}}Qd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Qd)))(n||Qd)}}(),Qd.\u0275dir=rr({type:Qd,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("required",n._enabled?"":null)},features:[Mi([oj]),Qr]});const sj={provide:es,useExisting:vr(()=>Xd),multi:!0};class Xd extends Mu{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=aA,this.createValidator=e=>P4}enabled(e){return e}}Xd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Xd)))(n||Xd)}}(),Xd.\u0275dir=rr({type:Xd,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[Mi([sj]),Qr]});const aj={provide:es,useExisting:vr(()=>qd),multi:!0};class qd extends Mu{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>l5(e),this.createValidator=e=>R4(e)}}qd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(qd)))(n||qd)}}(),qd.\u0275dir=rr({type:qd,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Mi([aj]),Qr]});const uj={provide:es,useExisting:vr(()=>$d),multi:!0};class $d extends Mu{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>l5(e),this.createValidator=e=>k4(e)}}$d.\u0275fac=function(){let t;return function(n){return(t||(t=Wi($d)))(n||$d)}}(),$d.\u0275dir=rr({type:$d,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Mi([uj]),Qr]});const cj={provide:es,useExisting:vr(()=>eh),multi:!0};class eh extends Mu{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>L4(e)}}eh.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(eh)))(n||eh)}}(),eh.\u0275dir=rr({type:eh,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("pattern",n._enabled?n.pattern:null)},inputs:{pattern:"pattern"},features:[Mi([cj]),Qr]});class th{}th.\u0275fac=function(e){return new(e||th)},th.\u0275mod=Bs({type:th}),th.\u0275inj=Ls({imports:[Kd]});class d5 extends J1{constructor(e,n,r){super(UA(n),KA(r,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,n={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}insert(e,n,r={}){this.controls.splice(e,0,n),this._registerControl(n),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(e,n={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:n.emitEvent})}setControl(e,n,r={}){let a=this._adjustIndex(e);a<0&&(a=0),this.controls[a]&&this.controls[a]._registerOnCollectionChange(()=>{}),this.controls.splice(a,1),n&&(this.controls.splice(a,0,n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,n={}){$4(this,!1,e),e.forEach((r,a)=>{q4(this,!1,a),this.at(a).setValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){null!=e&&(e.forEach((r,a)=>{this.at(a)&&this.at(a).patchValue(r,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e=[],n={}){this._forEachChild((r,a)=>{r.reset(e[a],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n),this._updateTouched(n),this.updateValueAndValidity(n)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(n=>n._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((n,r)=>!!r._syncPendingControls()||n,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((n,r)=>{e(n,r)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(n=>n.enabled&&e(n))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}}function h5(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}class fl{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new fl;return e.useNonNullable=!0,e}group(e,n=null){const r=this._reduceControls(e);let a={};return h5(n)?a=n:null!==n&&(a.validators=n.validator,a.asyncValidators=n.asyncValidator),new Jy(r,a)}record(e,n=null){const r=this._reduceControls(e);return new e5(r,n)}control(e,n,r){let a={};return this.useNonNullable?(h5(n)?a=n:(a.validators=n,a.asyncValidators=r),new $y(e,{...a,nonNullable:!0})):new $y(e,n,r)}array(e,n,r){const a=e.map(y=>this._createControl(y));return new d5(a,n,r)}_reduceControls(e){const n={};return Object.keys(e).forEach(r=>{n[r]=this._createControl(e[r])}),n}_createControl(e){if(e instanceof $y)return e;if(e instanceof J1)return e;if(Array.isArray(e)){const n=e[0],r=e.length>1?e[1]:null,a=e.length>2?e[2]:null;return this.control(n,r,a)}return this.control(e)}}fl.\u0275fac=function(e){return new(e||fl)},fl.\u0275prov=nr({token:fl,factory:fl.\u0275fac,providedIn:"root"});class eb{}eb.\u0275fac=function(e){return new(e||eb)},eb.\u0275prov=nr({token:eb,factory:function(){return Ki(fl).nonNullable},providedIn:"root"});class dp extends fl{group(e,n=null){return super.group(e,n)}control(e,n,r){return super.control(e,n,r)}array(e,n,r){return super.array(e,n,r)}}dp.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(dp)))(n||dp)}}(),dp.\u0275prov=nr({token:dp,factory:dp.\u0275fac,providedIn:"root"});new r1("15.2.9");class _f{static withConfig(e){return{ngModule:_f,providers:[{provide:Bd,useValue:e.callSetDisabledState??Qy}]}}}_f.\u0275fac=function(e){return new(e||_f)},_f.\u0275mod=Bs({type:_f}),_f.\u0275inj=Ls({imports:[th]});class nh{static withConfig(e){return{ngModule:nh,providers:[{provide:GA,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Bd,useValue:e.callSetDisabledState??Qy}]}}}nh.\u0275fac=function(e){return new(e||nh)},nh.\u0275mod=Bs({type:nh}),nh.\u0275inj=Ls({imports:[th]});var ke=g(49671),lr=g(71836);class lj{constructor(e){this.provider=new lr.providers.JsonRpcProvider({url:e})}query(e){return this.provider.query(e)}viewAccessKey({accountId:e,publicKey:n}){return this.query({request_type:"view_access_key",finality:"final",account_id:e,public_key:n})}block(e){return this.provider.block(e)}sendTransaction(e){return this.provider.sendTransaction(e)}}class nm{constructor(e,n){this.storage=e,this.namespace=Array.isArray(n)?n.join(":"):n}resolveKey(e){return[this.namespace,e].join(":")}getItem(e){return this.storage.getItem(this.resolveKey(e)).then(n=>"string"==typeof n?JSON.parse(n):null)}setItem(e,n){return this.storage.setItem(this.resolveKey(e),JSON.stringify(n))}removeItem(e){return this.storage.removeItem(this.resolveKey(e))}}class fj{getItem(e){return new Promise(n=>{n(localStorage.getItem(e))})}setItem(e,n){return new Promise(r=>{localStorage.setItem(e,n),r()})}removeItem(e){return new Promise(n=>{localStorage.removeItem(e),n()})}}class hp{constructor(e){this.namespace=e}emit(e,...n){if(hp.debug){if(this.namespace&&"error"!==e)return void console[e](this.namespace,...n);console[e](...n)}}log(...e){this.emit("log",...e)}info(...e){this.emit("info",...e)}warn(...e){this.emit("warn",...e)}error(...e){this.emit("error",...e)}}hp.debug=!1;const lc=new hp;var Du=g(59069),ZA=g.n(Du);class YA{constructor(){this.emitter=new Du.EventEmitter}on(e,n){return this.emitter.on(e,n),{remove:()=>this.emitter.off(e,n)}}off(e,n){this.emitter.off(e,n)}emit(e,n){this.emitter.emit(e,n)}}const rm="near-wallet-selector",im="recentlySignedInWallets",g5="contract",JA="contract:pending",y5="selectedWalletId",QA="selectedWalletId:pending";class dj{constructor({factories:e,storage:n,options:r,store:a,emitter:y,provider:T}){this.factories=e,this.storage=n,this.options=r,this.store=a,this.emitter=y,this.provider=T,this.modules=[],this.instances={}}validateWallet(e){var n=this;return(0,ke.Z)(function*(){let r=[];const a=yield n.getWallet(e);return a&&(r=yield a.getAccounts().catch(y=>(lc.log(`Failed to validate ${a.id} during setup`),lc.error(y),[]))),r})()}resolveStorageState(){var e=this;return(0,ke.Z)(function*(){const n=new nm(e.storage,rm),r=yield n.getItem(QA),a=yield n.getItem(JA);if(r&&a){const ie=yield e.validateWallet(r);if(yield n.removeItem(QA),yield n.removeItem(JA),ie.length){const{selectedWalletId:ue}=e.store.getState(),he=yield e.getWallet(ue);he&&r!==ue&&(yield he.signOut().catch(xe=>{lc.log("Failed to sign out existing wallet"),lc.error(xe)}));return{accounts:ie,contract:a,selectedWalletId:r,recentlySignedInWallets:yield e.setWalletAsRecentlySignedIn(r)}}}const{contract:y,selectedWalletId:T}=e.store.getState(),Z=yield e.validateWallet(T),$=yield n.getItem(im);return Z.length?{accounts:Z,contract:y,selectedWalletId:T,recentlySignedInWallets:$||[]}:{accounts:[],contract:null,selectedWalletId:null,recentlySignedInWallets:$||[]}})()}setWalletAsRecentlySignedIn(e){var n=this;return(0,ke.Z)(function*(){const r=new nm(n.storage,rm);let a=yield r.getItem(im);return a||(a=[]),a.includes(e)||(a.unshift(e),a=a.slice(0,5),yield r.setItem(im,a)),a})()}signOutWallet(e){var n=this;return(0,ke.Z)(function*(){const r=yield n.getWallet(e);yield r.signOut().catch(a=>{lc.log(`Failed to sign out ${r.id}`),lc.error(a),n.onWalletSignedOut(r.id)})})()}onWalletSignedIn(e,{accounts:n,contractId:r,methodNames:a}){var y=this;return(0,ke.Z)(function*(){const{selectedWalletId:T}=y.store.getState(),Z=new nm(y.storage,rm),$={contractId:r,methodNames:a};if(!n.length)return void("browser"===y.getModule(e).type&&(yield Z.setItem(QA,e),yield Z.setItem(JA,$)));T&&T!==e&&(yield y.signOutWallet(T));const ie=yield y.setWalletAsRecentlySignedIn(e);y.store.dispatch({type:"WALLET_CONNECTED",payload:{walletId:e,contract:$,accounts:n,recentlySignedInWallets:ie}}),y.emitter.emit("signedIn",{walletId:e,contractId:r,methodNames:a,accounts:n})})()}onWalletSignedOut(e){this.store.dispatch({type:"WALLET_DISCONNECTED",payload:{walletId:e}}),this.emitter.emit("signedOut",{walletId:e})}setupWalletEmitter(e){var n=this;const r=new YA;return r.on("signedOut",()=>{this.onWalletSignedOut(e.id)}),r.on("signedIn",a=>{this.onWalletSignedIn(e.id,a)}),r.on("accountsChanged",function(){var a=(0,ke.Z)(function*({accounts:y}){if(n.emitter.emit("accountsChanged",{walletId:e.id,accounts:y}),!y.length)return n.signOutWallet(e.id);n.store.dispatch({type:"ACCOUNTS_CHANGED",payload:{walletId:e.id,accounts:y}})});return function(y){return a.apply(this,arguments)}}()),r.on("networkChanged",({networkId:a})=>{this.emitter.emit("networkChanged",{walletId:e.id,networkId:a})}),r.on("uriChanged",({uri:a})=>{this.emitter.emit("uriChanged",{walletId:e.id,uri:a})}),r}validateSignMessageParams({message:e,nonce:n,recipient:r}){if(!e||""===e.trim())throw new Error("Invalid message. It must be a non-empty string.");if(!Buffer.isBuffer(n)||32!==n.length)throw new Error("Invalid nonce. It must be a Buffer with a length of 32 bytes.");if(!r||""===r.trim())throw new Error("Invalid recipient. It must be a non-empty string.")}decorateWallet(e){var n=this;const r=e.signIn,a=e.signOut,y=e.signMessage;return e.signIn=function(){var T=(0,ke.Z)(function*(Z){const $=yield r(Z),{contractId:ie,methodNames:ue=[]}=Z;return yield n.onWalletSignedIn(e.id,{accounts:$,contractId:ie,methodNames:ue}),$});return function(Z){return T.apply(this,arguments)}}(),e.signOut=(0,ke.Z)(function*(){yield a(),n.onWalletSignedOut(e.id)}),e.signMessage=function(){var T=(0,ke.Z)(function*(Z){if(void 0===y)throw Error(`The signMessage method is not supported by ${e.metadata.name}`);return n.validateSignMessageParams(Z),yield y(Z)});return function(Z){return T.apply(this,arguments)}}(),e}setupInstance(e){var n=this;return(0,ke.Z)(function*(){if(!e.metadata.available){const a="injected"===e.type?"not installed":"not available";throw Error(`${e.metadata.name} is ${a}`)}const r={id:e.id,type:e.type,metadata:e.metadata,...yield e.init({id:e.id,type:e.type,metadata:e.metadata,options:n.options,store:n.store.toReadOnly(),provider:n.provider,emitter:n.setupWalletEmitter(e),logger:new hp(e.id),storage:new nm(n.storage,[rm,e.id])})};return n.decorateWallet(r)})()}getModule(e){return this.modules.find(n=>n.id===e)}getWallet(e){var n=this;return(0,ke.Z)(function*(){const r=n.getModule(e);if(!r)return null;const{selectedWalletId:a}=n.store.getState();return!r.metadata.available&&a?(n.onWalletSignedOut(a),null):yield r.wallet()})()}setup(){var e=this;return(0,ke.Z)(function*(){const n=[];for(let Z=0;Z(lc.log("Failed to setup module"),lc.error(ie),null));$&&(n.some(ie=>ie.id===$.id)||n.push({id:$.id,type:$.type,metadata:$.metadata,wallet:function(){var ie=(0,ke.Z)(function*(){let ue=e.instances[$.id];return ue||(ue=yield e.setupInstance($),e.instances[$.id]=ue,ue)});return function(){return ie.apply(this,arguments)}}()}))}e.modules=n;const{accounts:r,contract:a,selectedWalletId:y,recentlySignedInWallets:T}=yield e.resolveStorageState();e.store.dispatch({type:"SETUP_WALLET_MODULES",payload:{modules:n,accounts:r,contract:a,selectedWalletId:y,recentlySignedInWallets:T}});for(let Z=0;Z"string"==typeof t?(t=>{switch(t){case"mainnet":return{networkId:t,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://nearblocks.io",indexerUrl:"https://api.kitwallet.app"};case"testnet":return{networkId:t,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://testnet.nearblocks.io",indexerUrl:"https://testnet-api.kitwallet.app"};default:throw Error(`Failed to find config for: '${t}'`)}})(t):t;class yj extends $t{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const n=super._subscribe(e);return!n.closed&&e.next(this._value),n}getValue(){const{hasError:e,thrownError:n,_value:r}=this;if(e)throw n;return this._throwIfClosed(),r}next(e){super.next(this._value=e)}}function vj(t,e){return mn(function mj(t,e,n,r,a){return(y,T)=>{let Z=n,$=e,ie=0;y.subscribe(ut(T,ue=>{const he=ie++;$=Z?t($,ue,he):(Z=!0,ue),r&&T.next($)},a&&(()=>{Z&&T.next($),T.complete()})))}}(t,e,arguments.length>=2,!0))}const bj=(t,e)=>{switch(lc.log("Store Action",e),e.type){case"SETUP_WALLET_MODULES":{const{modules:n,accounts:r,contract:a,selectedWalletId:y,recentlySignedInWallets:T}=e.payload,Z=r.map(($,ie)=>({...$,active:0===ie}));return{...t,modules:n,accounts:Z,contract:a,selectedWalletId:y,recentlySignedInWallets:T}}case"WALLET_CONNECTED":{const{walletId:n,contract:r,accounts:a,recentlySignedInWallets:y}=e.payload;if(!a.length)return t;const T=t.accounts.findIndex($=>$.active),Z=a.map(($,ie)=>({...$,active:ie===(T>-1?T:0)}));return{...t,contract:r,accounts:Z,selectedWalletId:n,recentlySignedInWallets:y}}case"WALLET_DISCONNECTED":{const{walletId:n}=e.payload;return n!==t.selectedWalletId?t:{...t,contract:null,accounts:[],selectedWalletId:null}}case"ACCOUNTS_CHANGED":{const{walletId:n,accounts:r}=e.payload;if(n!==t.selectedWalletId)return t;const a=t.accounts.find(Z=>Z.active),y=!r.some(Z=>Z.accountId===a?.accountId),T=r.map((Z,$)=>({...Z,active:y?0===$:Z.accountId===a?.accountId}));return{...t,accounts:T}}case"SET_ACTIVE_ACCOUNT":{const{accountId:n}=e.payload,r=t.accounts.map(a=>({...a,active:a.accountId===n}));return{...t,accounts:r}}default:return t}},wj=function(){var t=(0,ke.Z)(function*(e){const n=new nm(e,rm),r={modules:[],accounts:[],contract:yield n.getItem(g5),selectedWalletId:yield n.getItem(y5),recentlySignedInWallets:(yield n.getItem(im))||[]},a=new yj(r),y=new $t;y.pipe(vj(bj,r)).subscribe(a);const T=function(){var $=(0,ke.Z)(function*(ie,ue,he,we){if(ue[we]!==ie[we]){if(ue[we])return void(yield n.setItem(he,ue[we]));yield n.removeItem(he)}});return function(ue,he,we,xe){return $.apply(this,arguments)}}();let Z=a.getValue();return a.subscribe($=>{T(Z,$,y5,"selectedWalletId"),T(Z,$,g5,"contract"),T(Z,$,im,"recentlySignedInWallets"),Z=$}),{observable:a,getState:()=>a.getValue(),dispatch:$=>y.next($),toReadOnly:()=>({getState:()=>a.getValue(),observable:a.asObservable()})}});return function(n){return t.apply(this,arguments)}}();let XA=null;const m5=(t,e,n,r)=>{return{options:t,store:e.toReadOnly(),wallet:(a=(0,ke.Z)(function*(y){const{selectedWalletId:T}=e.getState(),Z=yield n.getWallet(y||T);if(!Z)throw y?new Error("Invalid wallet id"):new Error("No wallet selected");return Z}),function(T){return a.apply(this,arguments)}),setActiveAccount:a=>{const{accounts:y}=e.getState();if(!y.some(T=>T.accountId===a))throw new Error("Invalid account id");e.dispatch({type:"SET_ACTIVE_ACCOUNT",payload:{accountId:a}})},isSignedIn(){const{accounts:a}=e.getState();return Boolean(a.length)},on:(a,y)=>r.on(a,y),off:(a,y)=>{r.off(a,y)}};var a},v5=function(){var t=(0,ke.Z)(function*(e){const{options:n,storage:r}=(t=>({options:{languageCode:t.languageCode||void 0,network:pj(t.network),debug:t.debug||!1,optimizeWalletOrder:!1!==t.optimizeWalletOrder,randomizeWalletOrder:t.randomizeWalletOrder||!1,relayerUrl:t.relayerUrl||void 0},storage:t.storage||new fj}))(e);hp.debug=n.debug;const a=new YA,y=yield wj(r),T=new dj({factories:e.modules,storage:r,options:n,store:y,emitter:a,provider:new lj(n.network.nodeUrl)});return yield T.setup(),e.allowMultipleSelectors?m5(n,y,T,a):(XA||(XA=m5(n,y,T,a)),XA)});return function(n){return t.apply(this,arguments)}}(),b5=t=>new Promise(e=>setTimeout(e,t)),w5=function(){var t=(0,ke.Z)(function*(e,n,r){const a=e();if(a)return a;if(!r)throw new Error("Exceeded timeout");return b5(n).then(()=>w5(e,n,r-1))});return function(n,r,a){return t.apply(this,arguments)}}(),fc=function(){var t=(0,ke.Z)(function*(e,n={}){const{timeout:r=100,interval:a=50}=n;return Promise.race([b5(r).then(()=>{throw new Error("Exceeded timeout")}),w5(e,a,Math.floor(r/a))])});return function(n){return t.apply(this,arguments)}}(),Mf=t=>t.accounts.find(e=>e.active)||null,Aj=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],Sj=t=>{if(typeof navigator>"u")return!1;const e=(t=>""!==t&&Aj.reduce((e,[n,r])=>{if(e)return e;const a=r.exec(t);return!!a&&[n,a]},!1))(navigator.userAgent);if(!e)return!1;const[n]=e;return"searchbot"!==n&&!!t.find(r=>r===n)};var A5=g(21531),_j=g(1520);class qA{constructor(e){this.tag=2147484061,this.message=e.message,this.nonce=e.nonce,this.recipient=e.recipient,e.callbackUrl&&(this.callbackUrl=e.callbackUrl)}}const E5=new Map([[qA,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),Cj=function(){var t=(0,ke.Z)(function*({accountId:e,network:n,publicKey:r}){return yield new lr.providers.JsonRpcProvider({url:n.nodeUrl}).query({request_type:"view_access_key",account_id:e,finality:"final",public_key:r})});return function(n){return t.apply(this,arguments)}}(),Ij=function(){var t=(0,ke.Z)(function*({publicKey:e,accountId:n,network:r}){const{permission:a}=yield Cj({accountId:n,network:r,publicKey:e});return"FullAccess"===a});return function(n){return t.apply(this,arguments)}}(),S5=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Connect Your Wallet","whatIsAWallet":"What is a Wallet?","secureAndManage":"Secure & Manage Your Digital Assets","safelyStore":"Safely store and transfer your crypto and NFTs.","logInToAny":"Log In to Any NEAR App","noNeedToCreate":"No need to create new accounts or credentials. Connect your wallet and you are good to go!","getAWallet":"Get a Wallet","useAWallet":"Use a wallet to secure and manage your NEAR assets, and to log in to any NEAR app without the need for usernames and passwords.","connectionFailed":"Connection Failed","connectionSuccessful":"Connection Successful","connected":"Connected","connectingTo":"Connecting to","connectingMessage":{"injected":"Confirm the connection in the extension window","browser":"Confirm the connection in the wallet after redirect","hardware":"Confirm the connection in the ledger device","bridge":"Confirm the connection in the wallet"}},"ledger":{"connectWithLedger":"Connect with Ledger","makeSureYourLedger":"Make sure your Ledger is connected securely, and that the NEAR app is open on your device","continue":"Continue","specifyHDPath":"Specify HD Path","enterYourPreferredHDPath":"Enter your preferred HD path, then scan for any active accounts.","scan":"Scan","retry":"Retry","ledgerIsNotAvailable":"Ledger is not available","accessDeniedToUseLedgerDevice":"Access denied to use Ledger device","noAccountsFound":"No Accounts Found","selectYourAccounts":"Select Your Accounts","connecting1Account":"Connecting 1 Account","cantFindAnyAccount":"Can\'t find any account associated with this Ledger. Please create a new NEAR account on","orConnectAnAnotherLedger":"or connect an another Ledger.","connecting":"Connecting","ofAccounts":"of Accounts","failedToAutomatically":"Failed to automatically find account id. Provide it manually:","overviewTheListOfAuthorized":"Overview the list of authorized account(s), complete sign in by clicking the button below.","finish":"Finish"},"install":{"youllNeedToInstall":"You\'ll need to install","toContinueAfterInstalling":"to continue. After installing","refreshThePage":"refresh the page.","open":"Open"},"qr":{"copiedToClipboard":"Copied to clipboard","failedToCopy":"Failed to copy to clipboard","scanWithYourMobile":"Scan with Your Mobile Device","copyToClipboard":" Copy to clipboard","preferTheOfficial":"Prefer the official dialogue of","open":"Open"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"},"exportAccounts":{"chooseAWallet":"Choose a Wallet","transferYourAccounts":"Transfer Your Accounts","selectAWallet":"Select a wallet that fits your needs and supports your connected accounts.","selectYourAccounts":"Select Your Accounts","afterDecide":"After you decide on a wallet, you can select which accounts you want to transfer.","disclaimer":"You won\u2019t be able to transfer accounts that have never been funded or used on NEAR.","warning":"does not support account export at this time. Please select another wallet.","walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet"},"selectAccounts":{"title":"Select Accounts to Transfer","button":"Continue","deselectAll":"Deselect All","selectAll":"Select All","unavailable":"Transfer Unavailable","error":"Account does not exist","warningLedger":"Ledger support required","noBalance":"Account not funded"},"getPassphrase":{"title":"Copy Temporary Password","desc":"You\u2019ll need to enter this password when you begin exporting your accounts to a different wallet.","button":"Continue","transferButton":"Transfer Accounts","label":"Click to Copy","checkLabel":"I copied or wrote down the password"},"complete":{"title":"Complete the Transfer","descOne":"You will now be redirected to the wallet you selected to complete the transfer.","descTwo":"Once import part of process is completed from selected wallet, press button to complete the transfer process.","startOverButton":"Start Over","button":"Complete"}}},"component":{"clickToCopy":{"label":"Copied","tooltip":"Click to copy"}}}'),xj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Conecta Tu Billetera","whatIsAWallet":"\xbfQue es una Billetera?","secureAndManage":"Resguarda y Administrar Tus Activos Digitales","safelyStore":"Almacena de forma segura y transfiere tus cryptos y NFT\'s","logInToAny":"Inicie sesi\xf3n en Cualquier Aplicacion NEAR","noNeedToCreate":"No es necesario crear nuevas cuentas o credenciales, \xa1Conecta tu billetera y listo!","getAWallet":"Obten una Billetera","useAWallet":"Usa tu Billetera para resguardar y administrar tus activos en NEAR, e Iniciar sesi\xf3n en cualquier aplicacion NEAR sin la necesidad de nombres de usuarios y contrase\xf1as","connectionFailed":"Conexi\xf3n Fallida","connectionSuccessful":"Conexi\xf3n Existosa","connected":"Conectado","connectingTo":"Conectando a ","connectingMessage":{"injected":"Confirme la conexi\xf3n en la ventana de extensi\xf3n","browser":"Confirme la conexi\xf3n en la billetera despu\xe9s de la redirecci\xf3n","hardware":"Confirme la conexi\xf3n en el dispositivo de libro mayor","bridge":"Confirmar la conexi\xf3n en la billetera"}},"ledger":{"connectWithLedger":"Conectar con Ledger","makeSureYourLedger":"Aseg\xfarese de que su ledger est\xe1 conectada de forma segura y que la aplicacion NEAR est\xe9 abierta en su dispositivo","continue":"Continuar","specifyHDPath":"Especifique la ruta HD","enterYourPreferredHDPath":"Ingrese su ruta HD prerida,y luego busque cualquier cuenta activa.","scan":"Escanear","retry":"Reintentar","ledgerIsNotAvailable":"El Ledger no est\xe1 disponible","accessDeniedToUseLedgerDevice":"Acceso denegado para usar el dispositivo ledger","noAccountsFound":"No se encontraron cuentas","selectYourAccounts":"Selecciona tus cuentas","connecting1Account":"Conectando a 1 cuenta","cantFindAnyAccount":"No se pudo encontrar ninguna cuenta asociada con este ledger,Por favor crea una nueva cuenta en NEAR","orConnectAnAnotherLedger":"o conecta otro ledger","connecting":"Conectando","ofAccounts":"de Cuentas","failedToAutomatically":"No se pudo encontrar automaticamente el id de la cuenta,Ingresalo manualmente:","overviewTheListOfAuthorized":"Revise la lista de las cuentas autorizadas,Complete el inicio de sesi\xf3n haciedo click a countinuacion.","finish":"Finalizar"},"install":{"youllNeedToInstall":"Tendr\xe1s que instalar","toContinueAfterInstalling":"Para continuar, Despues de instalar","refreshThePage":"Recarga la pagina","open":"Abrir"},"qr":{"copiedToClipboard":"Copiado al Portapapeles","failedToCopy":"Fall\xf3 la copia al Portapapeles","scanWithYourMobile":"Busca con tu dispositivo movil","copyToClipboard":" Copiar al Portapapeles","preferTheOfficial":"\xbfPrefires el di\xe1logo oficial de","open":"Abrir"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),Tj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u8fde\u63a5\u4f60\u7684\u94b1\u5305","whatIsAWallet":"\u4ec0\u4e48\u662f\u94b1\u5305\uff1f","secureAndManage":"\u4fdd\u62a4\u548c\u7ba1\u7406\u4f60\u7684\u6570\u5b57\u8d44\u4ea7","safelyStore":"\u5b89\u5168\u5b58\u50a8\u548c\u8f6c\u79fb\u4f60\u7684\u52a0\u5bc6\u8d27\u5e01\u548cNFT","logInToAny":"\u767b\u5f55\u4efb\u4f55 NEAR \u5e94\u7528","noNeedToCreate":"\u4e0d\u9700\u8981\u521b\u5efa\u65b0\u8d26\u6237\u6216\u5bc6\u7801\u3002\u8fde\u63a5\u4f60\u7684\u94b1\u5305\uff0c\u5373\u53ef\u5f00\u59cb\u4f7f\u7528\uff01","getAWallet":"\u83b7\u53d6\u65b0\u8d26\u6237","useAWallet":"\u4f7f\u7528\u94b1\u5305\u6765\u4fdd\u62a4\u548c\u7ba1\u7406\u4f60\u7684 NEAR \u8d44\u4ea7\uff0c\u65e0\u9700\u7528\u6237\u540d\u548c\u5bc6\u7801\u5373\u53ef\u767b\u5f55\u4efb\u4f55 NEAR \u5e94\u7528","connectionFailed":"\u8fde\u63a5\u5931\u8d25","connectionSuccessful":"\u8fde\u63a5\u6210\u529f","connected":"\u5df2\u8fde\u63a5","connectingTo":"\u6b63\u5728\u8fde\u63a5"},"ledger":{"connectWithLedger":"\u8fde\u63a5 Ledger","makeSureYourLedger":"\u786e\u4fdd\u4f60\u7684 Ledger \u5df2\u7ecf\u5b89\u5168\u8fde\u63a5\uff0c\u5e76\u4e14 NEAR \u5e94\u7528\u5df2\u7ecf\u5728\u4f60\u8bbe\u5907\u4e0a\u6253\u5f00","continue":"\u7ee7\u7eed","specifyHDPath":"\u6307\u5b9a HD \u8def\u5f84","enterYourPreferredHDPath":"\u8f93\u5165\u4f60\u504f\u597d\u7684 HD \u8def\u5f84\uff0c\u7136\u540e\u4e3a\u4efb\u610f\u6d3b\u8dc3\u8d26\u6237\u626b\u7801","scan":"\u626b\u7801","retry":"\u91cd\u8bd5","ledgerIsNotAvailable":"Ledger \u4e0d\u53ef\u7528","accessDeniedToUseLedgerDevice":"\u8bbf\u95ee Ledger \u8bbe\u5907\u88ab\u62d2\u7edd","noAccountsFound":"\u6ca1\u6709\u627e\u5230\u8d26\u6237","selectYourAccounts":"\u9009\u62e9\u4f60\u7684\u8d26\u6237","connecting1Account":"\u6b63\u5728\u8fde\u63a51\u4e2a\u8d26\u6237","cantFindAnyAccount":"\u6ca1\u6709\u627e\u5230\u4efb\u4f55\u4e0e\u8fd9\u4e2a Ledger \u76f8\u5173\u8054\u7684\u8d26\u6237\u3002\u8bf7\u521b\u5efa\u65b0\u8d26\u6237\u4e8e","orConnectAnAnotherLedger.":"\u6216\u8fde\u63a5\u53e6\u4e00\u4e2a Ledger","connecting":"\u6b63\u5728\u8fde\u63a5","ofAccounts":"\u4e2a\u8d26\u6237","failedToAutomatically":"\u65e0\u6cd5\u81ea\u52a8\u627e\u5230\u8d26\u6237ID\uff0c\u8bf7\u4e3b\u52a8\u63d0\u4f9b\uff1a","overviewTheListOfAuthorized":"\u8bf7\u67e5\u770b\u5df2\u6388\u6743\u7684\u8d26\u6237\u5217\u8868\uff0c\u70b9\u51fb\u4ee5\u4e0b\u6309\u94ae\u5b8c\u6210\u767b\u5f55","finish":"\u5b8c\u6210"},"install":{"youllNeedToInstall":"\u4f60\u5c06\u9700\u8981\u5b89\u88c5","toContinueAfterInstalling":"\u4ee5\u7ee7\u7eed\u3002\u5b89\u88c5\u5b8c","refreshThePage":"\u8bf7\u5237\u65b0\u9875\u9762","open":"\u6253\u5f00"},"qr":{"copiedToClipboard":"\u590d\u5236\u5230\u4e86\u526a\u8d34\u677f","failedToCopy":"\u590d\u5236\u5230\u526a\u8d34\u677f\u5931\u8d25","scanWithYourMobile":"\u7528\u4f60\u7684\u79fb\u52a8\u8bbe\u5907\u626b\u7801","copyToClipboard":" \u590d\u5236\u5230\u526a\u8d34\u677f","preferTheOfficial":"\u5e0c\u671b\u4f7f\u7528\u5b98\u65b9\u5bf9\u8bdd\u6846\u4e8e","open":"\u6253\u5f00"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),Oj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u044f \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","whatIsAWallet":"\u041a\u0430\u043a\u0432\u043e \u0435 \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b?","secureAndManage":"\u0417\u0430\u0449\u0438\u0442\u0435\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0432\u0430\u0439\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u0438\u0442\u0435 \u0441\u0438 \u0430\u043a\u0442\u0438\u0432\u0438","safelyStore":"\u0421\u044a\u0445\u0440\u0430\u043d\u044f\u0432\u0430\u0439\u0442\u0435 \u0438 \u043f\u0440\u0435\u0445\u0432\u044a\u0440\u043b\u044f\u0439\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e \u0438 NFT.","logInToAny":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u044f\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 NEAR","noNeedToCreate":"\u041d\u044f\u043c\u0430 \u043d\u0443\u0436\u0434\u0430 \u0434\u0430 \u0441\u044a\u0437\u0434\u0430\u0432\u0430\u0442\u0435 \u043d\u043e\u0432\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438. \u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430 \u0441\u0438 \u0438 \u0441\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u0438!","getAWallet":"\u0421\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","useAWallet":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430, \u0437\u0430 \u0434\u0430 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0432\u0430\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0435 \u0441\u0438 \u043d\u0430 NEAR \u043a\u0430\u043a\u0442\u043e \u0438 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0432\u0441\u044f\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 NEAR \u0431\u0435\u0437 \u043d\u0443\u0436\u0434\u0430 \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0441\u043a\u0438 \u0438\u043c\u0435\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u0438.","connectionFailed":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e","connectionSuccessful":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e","connected":"\u0421\u0432\u044a\u0440\u0437\u0430\u043d","connectingTo":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u043a\u044a\u043c","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430 \u043d\u0430 \u0440\u0430\u0437\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u0442\u043e","browser":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430 \u0441\u043b\u0435\u0434 \u043f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0432\u0430\u043d\u0435\u0442\u043e","hardware":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u0445\u0430\u0440\u0434\u0443\u0435\u0440\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","bridge":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430 \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430"}},"ledger":{"connectWithLedger":"\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0441\u0435 \u0441 Ledger","makeSureYourLedger":"\u0423\u0432\u0435\u0440\u0435\u0442\u0435 \u0441\u0435, \u0447\u0435 \u0432\u0430\u0448\u0438\u044f\u0442 Ledger \u0435 \u0441\u0432\u044a\u0440\u0437\u0430\u043d \u0438 \u0447\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0442\u043e NEAR \u0435 \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u043e \u043da \u043d\u0435\u0433\u043e.","continue":"\u041f\u0440\u043e\u0434\u044a\u043b\u0436\u0435\u0442\u0435","specifyHDPath":"\u041f\u043e\u0441\u043e\u0447\u0435\u0442\u0435 HD \u043f\u044a\u0442","enterYourPreferredHDPath":"\u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u043d\u0438\u044f HD \u043f\u044a\u0442, \u0441\u043b\u0435\u0434 \u043a\u043e\u0435\u0442\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435 \u0437\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0438 \u0430\u043a\u0430\u0443\u043d\u0442\u0438.","scan":"\u0421\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435","retry":"\u041e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e","ledgerIsNotAvailable":"Ledger \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e","accessDeniedToUseLedgerDevice":"\u0414\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0437\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u043d\u0435 \u043d\u0430 Ledger \u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d","noAccountsFound":"\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","connecting1Account":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u043d\u0430 1 \u043f\u0440\u043e\u0444\u0438\u043b","cantFindAnyAccount":"\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0441\u044a\u0432\u0440\u0437\u0430\u043d\u0438 \u0441 \u0442\u043e\u0437\u0438 Ledger. \u041c\u043e\u043b\u044f, \u0441\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432 NEAR \u043f\u0440\u043e\u0444\u0438\u043b \u043d\u0430","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u0441\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 Ledger.","connecting":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435","ofAccounts":"\u043e\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","failedToAutomatically":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0442\u043e \u043d\u0430\u043c\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0430 \u043d\u0435 \u0431\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u0433\u043e \u0440\u044a\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0439\u0442\u0435 \u0441\u043f\u0438\u0441\u044a\u043a\u0430 \u0441 \u0443\u043f\u044a\u043b\u043d\u043e\u043c\u043e\u0449\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0437\u0430\u0432\u044a\u0440\u0448\u0435\u0442\u0435 \u0432\u043b\u0438\u0437\u0430\u043d\u0435\u0442\u043e, \u043a\u0430\u0442\u043e \u0449\u0440\u0430\u043a\u043d\u0435\u0442\u0435 \u0432\u044a\u0440\u0445\u0443 \u0431\u0443\u0442\u043e\u043d\u0430 \u043f\u043e-\u0434\u043e\u043b\u0443..","finish":"\u0417\u0430\u0432\u044a\u0440\u0448\u0435\u0442\u0435"},"install":{"youllNeedToInstall":"\u0429\u0435 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u0434\u0430 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438\u0442\u0435. \u0421\u043b\u0435\u0434 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u0435","refreshThePage":"\u043f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0442\u0430.","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","failedToCopy":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u0430\u043d\u0435 \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","scanWithYourMobile":" \u0421\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435 \u0441 \u043c\u043e\u0431\u0438\u043b\u043d\u043e\u0442\u043e \u0441\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e","copyToClipboard":" \u041a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435 \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","preferTheOfficial":"\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u043d \u0435\u0437\u0438\u043a \u0437\u0430 \u043a\u043e\u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0446\u0438\u044f","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),Nj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\uc9c0\uac11 \uc5f0\uacb0\ud558\uae30","whatIsAWallet":"\uc9c0\uac11\uc740 \ubb34\uc2a8 \uc5ed\ud560\uc744 \ud558\ub098\uc694?","secureAndManage":"\ub2f9\uc2e0\uc758 \ub514\uc9c0\ud138 \uc790\uc0b0\uc744 \ubcf4\ud638\ud558\uace0 \uad00\ub9ac\ud569\ub2c8\ub2e4.","safelyStore":"\uc554\ud638\ud654\ud3d0\uc640 NFT\ub97c \uc548\uc804\ud558\uac8c \uc800\uc7a5\ud558\uace0 \uc804\uc1a1\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","logInToAny":"NEAR App\uc5d0 \ub85c\uadf8\uc778\ud569\ub2c8\ub2e4.","noNeedToCreate":"\uc0c8\ub85c\uc6b4 \uacc4\uc815\uc774\ub098 \ube44\ubc00\ubc88\ud638\ub97c \ub9cc\ub4e4 \ud544\uc694 \uc5c6\uc774 \uc9c0\uac11\uc744 \uc5f0\uacb0\ud55c \ud6c4 \ubc14\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","getAWallet":"\uc9c0\uac11 \uac00\uc838\uc624\uae30","useAWallet":"\uc9c0\uac11\uc744 \uc0ac\uc6a9\ud558\uc5ec NEAR \uc790\uc0b0\uc744 \ubcf4\ud638\xb7\uad00\ub9ac\ud558\uace0, \uc544\uc774\ub514\uc640 \ube44\ubc00\ubc88\ud638 \uc5c6\uc774 NEAR \uc571\uc5d0 \ub85c\uadf8\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","connectionFailed":"\uc5f0\uacb0 \uc2e4\ud328","connectionSuccessful":"\uc5f0\uacb0 \uc131\uacf5","connected":"Connected","connectingTo":"\uc5f0\uacb0 \uc911: ","connectingMessage":{"injected":"\uc775\uc2a4\ud150\uc158 \ucc3d\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","browser":"\ub9ac\ub2e4\uc774\ub809\ud2b8 \ub41c \uc9c0\uac11\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","hardware":"Ledger \uae30\uae30\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","bridge":"\uc9c0\uac11\uc5d0\uc11c \uc5f0\uacb0 \ud655\uc778"}},"ledger":{"connectWithLedger":"Ledger \uc5f0\uacb0\ud558\uae30","makeSureYourLedger":"Ledger\uac00 \uc548\uc804\ud558\uac8c \uc5f0\uacb0\ub418\uc5b4 \uc788\uace0, NEAR \uc571\uc774 \uc5f4\ub824 \uc788\ub294 \uc9c0 \ud655\uc778\ud558\uc138\uc694","continue":"\uacc4\uc18d\ud558\uae30","specifyHDPath":"HD Path \uc9c0\uc815\ud558\uae30","enterYourPreferredHDPath":"\uc6d0\ud558\ub294 HD Path\ub97c \uc120\ud0dd\ud558\uace0, \ud65c\uc131\ud654\ub41c \uacc4\uc815\uc774 \uc788\ub294 \uc9c0 \uac80\uc0c9\ud558\uc138\uc694","scan":"\uac80\uc0c9","retry":"\ub2e4\uc2dc \uc2dc\ub3c4","ledgerIsNotAvailable":"Ledger\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4","accessDeniedToUseLedgerDevice":"Ledger \uae30\uae30 \uc811\uadfc \uad8c\ud55c\uc774 \uac70\ubd80\ub418\uc5c8\uc2b5\ub2c8\ub2e4","noAccountsFound":"\uacc4\uc815\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4","selectYourAccounts":"\uacc4\uc815 \uc120\ud0dd\ud558\uae30","connecting1Account":"\ud558\ub098\uc758 \uacc4\uc815\uc5d0 \uc5f0\uacb0","cantFindAnyAccount":"Ledger\uc640 \uc5f0\uacb0\ub41c \uacc4\uc815\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc0c8\ub85c\uc6b4 \uacc4\uc815\uc744 \uc0dd\uc131\ud558\uac70\ub098 ","orConnectAnAnotherLedger":"\ub2e4\ub978 Ledger\ub97c \uc5f0\uacb0\ud558\uc138\uc694","connecting":"\uacc4\uc815 \uc5f0\uacb0\ud558\uae30: ","ofAccounts":"\uac1c \uacc4\uc815\uc744 \ucc3e\uc558\uc2b5\ub2c8\ub2e4","failedToAutomatically":"\uacc4\uc815 ID\ub97c \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc218\ub3d9\uc73c\ub85c \uc785\ub825\ud574\uc8fc\uc138\uc694.","overviewTheListOfAuthorized":"\uc778\uc99d\ub41c \uacc4\uc815 \ubaa9\ub85d\uc744 \ud655\uc778\ud55c \ud6c4 \uc544\ub798 \ubc84\ud2bc\uc744 \ud074\ub9ad\ud558\uc5ec \ub85c\uadf8\uc778\uc744 \uc644\ub8cc\ud558\uc138\uc694","finish":"\uc644\ub8cc"},"walletTypes":{"hardware":"\ud558\ub4dc\uc6e8\uc5b4 \uc9c0\uac11","browser":"\ube0c\ub77c\uc6b0\uc800 \uc9c0\uac11","injected":"\uc9c0\uac11 \ud655\uc7a5","bridge":"\ube0c\ub9ac\uc9c0 \uc9c0\uac11","mobile":"\ubaa8\ubc14\uc77c \uc9c0\uac11","instant-link":"\uc778\uc2a4\ud134\ud2b8 \uc9c0\uac11"},"install":{"youllNeedToInstall":"\ub2e4\uc74c \ud655\uc7a5 \ud504\ub85c\uadf8\ub7a8\uc744 \uc124\uce58\ud574\uc8fc\uc138\uc694:","toContinueAfterInstalling":". \uc124\uce58 \uc644\ub8cc \ud6c4 \ud398\uc774\uc9c0 \uc0c8\ub85c \uace0\uce68\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. ","refreshThePage":"\uc0c8\ub85c \uace0\uce68","open":"Open"},"qr":{"copiedToClipboard":"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac \uc644\ub8cc","failedToCopy":"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac \uc2e4\ud328","scanWithYourMobile":"\ubaa8\ubc14\uc77c \uc7a5\uce58\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2a4\uce94\ud574\uc8fc\uc138\uc694","copyToClipboard":" \ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ud558\uae30","preferTheOfficial":"\ub2e4\uc74c \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \uacf5\uc2dd \ud504\ub85c\uc138\uc2a4\ub97c \uc120\ud638\ud558\uc2ed\ub2c8\uae4c: ","open":"Open"}}}'),Pj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"K\u1ebft n\u1ed1i v\xed c\u1ee7a b\u1ea1n","whatIsAWallet":"V\xed l\xe0 g\xec?","secureAndManage":"B\u1ea3o m\u1eadt & Qu\u1ea3n l\xfd t\xe0i s\u1ea3n s\u1ed1 c\u1ee7a b\u1ea1n","safelyStore":"L\u01b0u tr\u1eef v\xe0 chuy\u1ec3n ti\u1ec1n \u0111i\u1ec7n t\u1eed v\xe0 NFT c\u1ee7a b\u1ea1n m\u1ed9t c\xe1ch an to\xe0n.","logInToAny":"\u0110\u0103ng nh\u1eadp v\xe0o b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng tr\xean NEAR","noNeedToCreate":"Kh\xf4ng c\u1ea7n t\u1ea1o t\xe0i kho\u1ea3n ho\u1eb7c th\xf4ng tin \u0111\u0103ng nh\u1eadp m\u1edbi. K\u1ebft n\u1ed1i v\xed c\u1ee7a b\u1ea1n v\xe0 b\u1eaft \u0111\u1ea7u!","getAWallet":"T\u1ea1o V\xed","useAWallet":"S\u1eed d\u1ee5ng v\xed \u0111\u1ec3 b\u1ea3o m\u1eadt v\xe0 qu\u1ea3n l\xfd t\xe0i s\u1ea3n tr\xean NEAR c\u1ee7a b\u1ea1n v\xe0 \u0111\u0103ng nh\u1eadp v\xe0o b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng NEAR n\xe0o, kh\xf4ng c\u1ea7n t\xean ng\u01b0\u1eddi d\xf9ng v\xe0 m\u1eadt kh\u1ea9u.","connectionFailed":"K\u1ebft n\u1ed1i th\u1ea5t b\u1ea1i","connectionSuccessful":"K\u1ebft n\u1ed1i th\xe0nh c\xf4ng","connected":"\u0110\xe3 k\u1ebft n\u1ed1i","connectingTo":"\u0110ang k\u1ebft n\u1ed1i t\u1edbi","connectingMessage":{"injected":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong c\u1eeda s\u1ed5 ti\u1ec7n \xedch m\u1edf r\u1ed9ng","browser":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong v\xed sau khi \u0111\u01b0\u1ee3c chuy\u1ec3n h\u01b0\u1edbng","hardware":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i v\u1edbi v\xed l\u1ea1nh","bridge":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong v\xed"}},"ledger":{"connectWithLedger":"K\u1ebft n\u1ed1i v\xed Ledger","makeSureYourLedger":"\u0110\u1ea3m b\u1ea3o Ledger c\u1ee7a b\u1ea1n \u0111\u01b0\u1ee3c k\u1ebft n\u1ed1i an to\xe0n v\xe0 \u1ee9ng d\u1ee5ng NEAR \u0111ang m\u1edf s\u1eb5n tr\xean thi\u1ebft b\u1ecb","continue":"Ti\u1ebfp t\u1ee5c","specifyHDPath":"Ch\u1ec9 \u0111\u1ecbnh HD Path","enterYourPreferredHDPath":"Nh\u1eadp HD Path c\u1ee7a b\u1ea1n, sau \u0111\xf3 qu\xe9t t\xecm c\xe1c t\xe0i kho\u1ea3n ho\u1ea1t \u0111\u1ed9ng","scan":"Qu\xe9t","retry":"Th\u1eed l\u1ea1i","ledgerIsNotAvailable":"Ledger kh\xf4ng kh\u1ea3 d\u1ee5ng","accessDeniedToUseLedgerDevice":"Truy c\u1eadp Ledger b\u1ecb t\u1eeb ch\u1ed1i","noAccountsFound":"Kh\xf4ng t\xecm th\u1ea5y t\xe0i kho\u1ea3n","selectYourAccounts":"Ch\u1ecdn t\xe0i kho\u1ea3n c\u1ee7a b\u1ea1n","connecting1Account":"\u0110ang k\u1ebft n\u1ed1i 1 t\xe0i kho\u1ea3n","cantFindAnyAccount":"Kh\xf4ng th\u1ec3 t\xecm th\u1ea5y b\u1ea5t k\u1ef3 t\xe0i kho\u1ea3n n\xe0o \u0111\u01b0\u1ee3c li\xean k\u1ebft v\u1edbi Ledger n\xe0y. Vui l\xf2ng t\u1ea1o m\u1ed9t t\xe0i kho\u1ea3n NEAR m\u1edbi","orConnectAnAnotherLedger":"ho\u1eb7c k\u1ebft n\u1ed1i v\u1edbi v\xed Ledger kh\xe1c.","connecting":"\u0110ang k\u1ebft n\u1ed1i","ofAccounts":"c\u1ee7a t\xe0i kho\u1ea3n","failedToAutomatically":"Kh\xf4ng th\u1ec3 t\u1ef1 \u0111\u1ed9ng t\xecm id t\xe0i kho\u1ea3n. Nh\u1eadp th\u1ee7 c\xf4ng:","overviewTheListOfAuthorized":"T\u1ed5ng quan danh s\xe1ch c\xe1c t\xe0i kho\u1ea3n \u0111\u01b0\u1ee3c \u1ee7y quy\u1ec1n, ho\xe0n t\u1ea5t \u0111\u0103ng nh\u1eadp b\u1eb1ng c\xe1ch b\u1ea5m v\xe0o n\xfat b\xean d\u01b0\u1edbi.","finish":"Ho\xe0n th\xe0nh"},"install":{"youllNeedToInstall":"B\u1ea1n s\u1ebd c\u1ea7n c\xe0i \u0111\u1eb7t","toContinueAfterInstalling":"\u0111\u1ec3 b\u1eaft \u0111\u1ea7u. Sau khi c\xe0i \u0111\u1eb7t xong","refreshThePage":"T\u1ea3i l\u1ea1i trang.","open":"M\u1edf"},"qr":{"copiedToClipboard":"\u0110\xe3 sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m","failedToCopy":"Sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m th\u1ea5t b\u1ea1i","scanWithYourMobile":"Qu\xe9t v\u1edbi \u0111i\u1ec7n tho\u1ea1i c\u1ee7a b\u1ea1n","copyToClipboard":" Sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m","preferTheOfficial":"Dialogue ch\xednh th\u1ee9c c\u1ee7a","open":"M\u1edf"},"walletTypes":{"hardware":"V\xed l\u1ea1nh","browser":"V\xed tr\xecnh duy\u1ec7t","injected":"V\xed ti\u1ec7n \xedch m\u1edf r\u1ed9ng","bridge":"V\xed C\u1ea7u","mobile":"V\xed Mobile","instant-link":"V\xed t\u1ee9c th\xec"},"exportAccounts":{"chooseAWallet":"Ch\u1ecdn v\xed","transferYourAccounts":"Chuy\u1ec3n t\xe0i kho\u1ea3n","selectAWallet":"Ch\u1ecdn v\xed ph\xf9 h\u1ee3p v\u1edbi nhu c\u1ea7u c\u1ee7a b\u1ea1n, v\xed \u0111\u01b0\u1ee3c ch\u1ecdn c\u1ea7n h\u1ed7 tr\u1ee3 c\xe1c t\xe0i kho\u1ea3n \u0111ang s\u1eed d\u1ee5ng.","selectYourAccounts":"Ch\u1ecdn t\xe0i kho\u1ea3n","afterDecide":"Sau khi ch\u1ecdn \u0111\u01b0\u1ee3c t\xe0i kho\u1ea3n b\u1ea1n c\xf3 chuy\u1ec3n.","disclaimer":"B\u1ea1n kh\xf4ng th\u1ec3 chuy\u1ec3n t\xe0i kho\u1ea3n n\u1ebfu t\xe0i kho\u1ea3n \u0111\xf3 ch\u01b0a \u0111\u01b0\u1ee3c nh\u1eadn ti\u1ec1n ho\u1eb7c ch\u01b0a ph\xe1t sinh giao d\u1ecbch tr\xean NEAR.","warning":"kh\xf4ng h\u1ed7 tr\u1ee3 xu\u1ea5t t\xe0i kho\u1ea3n. Vui l\xf2ng ch\u1ecdn v\xed kh\xe1c.","walletTypes":{"hardware":"V\xed l\u1ea1nh","browser":"V\xed tr\xecnh duy\u1ec7t","injected":"V\xed ti\u1ec7n \xedch m\u1edf r\u1ed9ng","bridge":"V\xed C\u1ea7u","mobile":"V\xed Mobile"},"selectAccounts":{"title":"Ch\u1ecdn t\xe0i kho\u1ea3n \u0111\u1ec3 chuy\u1ec3n","button":"L\u1ea5y c\u1ee5m m\u1eadt kh\u1ea9u","deselectAll":"B\u1ecf ch\u1ecdn t\u1ea5t c\u1ea3","selectAll":"Ch\u1ecdn t\u1ea5t c\u1ea3","unavailable":"Chuy\u1ec3n kh\xf4ng kh\u1ea3 d\u1ee5ng","error":"T\xe0i kho\u1ea3n kh\xf4ng t\u1ed3n t\u1ea1i","warningLedger":"Y\xeau c\u1ea7u h\u1ed7 tr\u1ee3 Ledger","noBalance":"T\xe0i kho\u1ea3n tr\u1ed1ng"},"getPassphrase":{"title":"Sao ch\xe9p m\u1eadt kh\u1ea9u t\u1ea1m th\u1eddi","desc":"B\u1ea1n s\u1ebd c\u1ea7n nh\u1eadp m\u1eadt kh\u1ea9u khi b\u1eaft \u0111\u1ea7u xu\u1ea5t c\xe1c kho\u1ea3n t\u1edbi v\xed kh\xe1c.","button":"Ti\u1ebfp t\u1ee5c","label":"B\u1ea5m \u0111\u1ec3 sao ch\xe9p","checkLabel":"T\xf4i \u0111\xe3 ch\xe9p ho\u1eb7c ghi l\u1ea1i m\u1eadt kh\u1ea9u"},"complete":{"title":"Ho\xe0n th\xe0nh chuy\u1ec3n","descOne":"B\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c chuy\u1ec3n h\u01b0\u1edbng t\u1edbi t\xe0i kho\u1ea3n \u0111\xe3 ch\u1ecdn \u0111\u1ec3 ho\xe0n t\u1ea5t qu\xe1 tr\xecnh.","descTwo":"Sau khi nh\u1eadp, nh\u1ea5n n\xfat \u0111\u1ec3 ho\xe0n t\u1ea5t quy tr\xecnh chuy\u1ec3n.","button":"Ho\xe0n th\xe0nh"}}},"component":{"clickToCopy":{"label":"\u0110\xe3 sao ch\xe9p","tooltip":"B\u1ea5m \u0111\u1ec3 sao ch\xe9p"}}}'),Rj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0905\u092a\u0928\u093e \u0935\u0949\u0932\u0947\u091f (Wallet) \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902\u0964","whatIsAWallet":"\u0935\u0949\u0932\u0947\u091f \u0915\u094d\u092f\u093e \u0939\u0948?","secureAndManage":"\u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0914\u0930 \u092a\u094d\u0930\u092c\u0902\u0927\u093f\u0924 \u0915\u0930\u0947\u0902\u0964","safelyStore":"\u0905\u092a\u0928\u0940 \u0915\u094d\u0930\u093f\u092a\u094d\u091f\u094b\u0915\u0930\u0947\u0902\u0938\u0940 \u0914\u0930 \u090f\u0928\u090f\u092b\u091f\u0940 \u0915\u094b \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0938\u094d\u091f\u094b\u0930 \u0914\u0930 \u091f\u094d\u0930\u093e\u0902\u0938\u092b\u0930 \u0915\u0930\u0947\u0902\u0964","logInToAny":"NEAR \u092a\u0930 \u0915\u093f\u0938\u0940 \u092d\u0940 \u0910\u092a \u092e\u0947\u0902 \u0938\u093e\u0907\u0928 \u0907\u0928 \u0915\u0930\u0947\u0902\u0964","noNeedToCreate":"\u0928\u090f \u0916\u093e\u0924\u0947 \u092f\u093e \u0932\u0949\u0917\u093f\u0928 \u092c\u0928\u093e\u0928\u0947 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0905\u092a\u0928\u093e \u0935\u0949\u0932\u0947\u091f(NEAR Wallet)\u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902 \u0914\u0930 \u0906\u0930\u0902\u092d \u0915\u0930\u0947\u0902\u0964","getAWallet":"\u090f\u0915 \u0935\u0949\u0932\u0947\u091f \u092c\u0928\u093e\u090f\u0901\u0964","useAWallet":"\u0905\u092a\u0928\u0940 NEAR \u0938\u0902\u092a\u0924\u094d\u0924\u093f\u092f\u094b\u0902 \u0915\u094b \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0914\u0930 \u092a\u094d\u0930\u092c\u0902\u0927\u093f\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0935\u0949\u0932\u0947\u091f \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0947\u0902 \u0914\u0930 \u0915\u093f\u0938\u0940 \u092d\u0940 NEAR \u0910\u092a (app) \u092e\u0947\u0902 \u0932\u0949\u0917 \u0907\u0928 \u0915\u0930\u0947\u0902, \u0915\u093f\u0938\u0940 \u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e (user) \u0928\u093e\u092e \u0914\u0930 \u092a\u093e\u0938\u0935\u0930\u094d\u0921 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948\u0964","connectionFailed":"\u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0935\u093f\u092b\u0932|","connectionSuccessful":"\u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0938\u092b\u0932|","connected":"\u0935\u0949\u0932\u0947\u091f \u091c\u0941\u095c \u0917\u092f\u093e|","connectingTo":"\u0935\u0949\u0932\u0947\u091f \u091c\u0941\u095c \u0930\u0939\u093e \u0939\u0947|","connectingMessage":{"injected":"\u090f\u0915\u094d\u0938\u091f\u0947\u0902\u0936\u0928 \u0935\u093f\u0902\u0921\u094b \u092e\u0947\u0902 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|","browser":"\u0930\u0940\u0921\u093e\u092f\u0930\u0947\u0915\u094d\u091f \u0939\u094b\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u0935\u0949\u0932\u0947\u091f \u092e\u0947\u0902 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|","hardware":"\u0915\u094b\u0932\u094d\u0921 \u0935\u0949\u0932\u0947\u091f \u0915\u0947 \u0938\u093e\u0925 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|"}},"ledger":{"connectWithLedger":"\u0932\u0947\u091c\u0930(Ledger)\u0935\u0949\u0932\u0947\u091f \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902|","makeSureYourLedger":"\u0938\u0941\u0928\u093f\u0936\u094d\u091a\u093f\u0924 \u0915\u0930\u0947\u0902 \u0915\u093f \u0906\u092a\u0915\u093e \u0932\u0947\u091c\u0930 \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u091c\u0941\u0921\u093c\u093e \u0939\u0941\u0906 \u0939\u0948 \u0914\u0930 NEAR \u0910\u092a \u0906\u092a\u0915\u0947 \u0921\u093f\u0935\u093e\u0907\u0938 (Device)\u092a\u0930 \u092a\u0939\u0932\u0947 \u0938\u0947 \u0939\u0940 \u0916\u0941\u0932\u093e \u0939\u0948|","continue":"\u091c\u093e\u0930\u0940 \u0930\u0916\u0947|","specifyHDPath":"\u0939\u093e\u0930\u094d\u0921 \u0921\u093f\u0938\u094d\u0915(Hard Disk)\u092a\u0925(Path)\u0928\u093f\u0930\u094d\u0927\u093e\u0930\u093f\u0924 \u0915\u0930\u0947|","enterYourPreferredHDPath":"\u0905\u092a\u0928\u093e \u090f\u091a\u0921\u0940 \u092a\u0925 \u0926\u0930\u094d\u091c \u0915\u0930\u0947\u0902, \u092b\u093f\u0930 \u0938\u0915\u094d\u0930\u093f\u092f \u0916\u093e\u0924\u094b\u0902 \u0915\u0947 \u0932\u093f\u090f \u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|","scan":"\u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947|","retry":"\u0926\u094b\u092c\u093e\u0930\u093e \u092a\u094d\u0930\u092f\u093e\u0938 \u0915\u0930\u0947|","ledgerIsNotAvailable":"\u0932\u0947\u091c\u0930 \u0909\u092a\u0932\u092c\u094d\u0927 \u0928\u0939\u0940\u0902 \u0939\u0948|","accessDeniedToUseLedgerDevice":"\u0932\u0947\u091c\u0930 \u0921\u093f\u0935\u093e\u0907\u0938 \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u092a\u094d\u0930\u0935\u0947\u0936 \u0928\u093f\u0937\u0947\u0927|","noAccountsFound":"\u0916\u093e\u0924\u093e \u0928\u0939\u0940\u0902 \u092e\u093f\u0932\u093e|","selectYourAccounts":"\u0905\u092a\u0928\u0947 \u0916\u093e\u0924\u0947 \u091a\u0941\u0928\u0947\u0902|","connecting1Account":"\u090f\u0915 \u0916\u093e\u0924\u093e \u0915\u0928\u0947\u0915\u094d\u091f \u0939\u094b \u0930\u0939\u093e \u0939\u0948|","cantFindAnyAccount":"\u0907\u0938 \u0932\u0947\u091c\u0930 \u0938\u0947 \u091c\u0941\u0921\u093c\u093e \u0915\u094b\u0908 \u0916\u093e\u0924\u093e \u0928\u0939\u0940\u0902 \u092e\u093f\u0932\u093e\u0964 \u0915\u0943\u092a\u092f\u093e \u090f\u0915 \u0928\u092f\u093e NEAR \u0916\u093e\u0924\u093e \u092c\u0928\u093e\u090f\u0901|","orConnectAnAnotherLedger":"\u0905\u0925\u0935\u093e \u0926\u0942\u0938\u0930\u0947 \u0932\u0947\u091c\u0930 \u0935\u0949\u0932\u0947\u091f \u0938\u0947 \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902\u0964","connecting":"\u091c\u0941\u095c \u0930\u0939\u093e \u0939\u0947|","ofAccounts":"\u0916\u093e\u0924\u093e \u0905\u092c \u091c\u0941\u095c\u093e \u0928\u0939\u0940\u0902 \u0939\u0947|","failedToAutomatically":"\u0916\u093e\u0924\u093e \u0906\u0908\u0921\u0940 \u0938\u094d\u0935\u091a\u093e\u0932\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0916\u094b\u091c\u0928\u0947 \u092e\u0947\u0902 \u0905\u0938\u092e\u0930\u094d\u0925\u0964 \u092e\u0948\u0928\u094d\u092f\u0941\u0905\u0932 (Manuall) \u0930\u0942\u092a \u0938\u0947 \u0915\u094b\u0936\u093f\u0936 \u0915\u0930\u0947\u0902|","overviewTheListOfAuthorized":"\u0905\u0935\u0932\u094b\u0915\u0928 \u0905\u0927\u093f\u0915\u0943\u0924 \u0915\u0940 \u0938\u0942\u091a\u0940, \u0928\u0940\u091a\u0947 \u0926\u093f\u090f \u0917\u090f \u092c\u091f\u0928 \u092a\u0930 \u0915\u094d\u0932\u093f\u0915 \u0915\u0930\u0915\u0947 \u0932\u0949\u0917\u093f\u0928 \u092a\u0942\u0930\u093e \u0915\u0930\u0947\u0902\u0964","finish":"\u0938\u092e\u093e\u092a\u094d\u0924|"},"install":{"youllNeedToInstall":"\u0906\u092a\u0915\u094b \u0907\u0902\u0938\u094d\u091f\u0949\u0932 \u0915\u0930\u0928\u093e \u0939\u094b\u0917\u093e|","toContinueAfterInstalling":"\u0907\u0902\u0938\u094d\u091f\u0949\u0932 \u0915\u0930\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u091c\u093e\u0930\u0940 \u0930\u0916\u0947|","refreshThePage":"\u092a\u0941\u0928: \u0932\u094b\u0921 \u0915\u0930\u0947\u0902\u0964","open":"\u0916\u094b\u0932\u0947|"},"qr":{"copiedToClipboard":"\u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921(Clipboard)\u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u093f\u092f\u093e \u0917\u092f\u093e|","failedToCopy":"\u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921 \u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u0930\u0928\u093e \u0935\u093f\u092b\u0932 \u0930\u0939\u093e|","scanWithYourMobile":"\u0905\u092a\u0928\u0947 \u092b\u094b\u0928 (Mobile)\u0938\u0947 \u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|","copyToClipboard":" \u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921 \u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u0930\u0947\u0902|","preferTheOfficial":"\u0906\u0927\u093f\u0915\u093e\u0930\u093f\u0915 \u0938\u0902\u0935\u093e\u0926 \u0915\u094b \u092a\u094d\u0930\u093e\u0925\u092e\u093f\u0915\u0924\u093e \u0926\u0947\u0902|","open":"\u0916\u094b\u0932\u0947|"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),kj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0635\u0644 \u0645\u062d\u0641\u0638\u062a\u0643","whatIsAWallet":"\u0645\u0627 \u0647\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629\u061f","secureAndManage":"\u062a\u0623\u0645\u064a\u0646 \u0648\u0625\u062f\u0627\u0631\u0629 \u0627\u0644\u0645\u0645\u062a\u0644\u0643\u0627\u062a \u0627\u0644\u0631\u0642\u0645\u064a\u0629 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643","safelyStore":"\u0642\u0645 \u0628\u062a\u062e\u0632\u064a\u0646 \u0648 \u0627\u0631\u0633\u0627\u0644 \u0639\u0645\u0644\u0627\u062a\u0643 \u0648 \u0623\u0635\u0648\u0644\u0643 \u0627\u0644\u0631\u0642\u0645\u064a\u0629 \u0628\u0623\u0645\u0627\u0646","logInToAny":"\u0633\u062c\u0644 \u0627\u0644\u062f\u062e\u0648\u0644 \u0625\u0644\u0649 \u0623\u064a \u062a\u0637\u0628\u064a\u0642 \u064a\u0633\u062a\u062e\u062f\u0645 \u0646\u064a\u0631","noNeedToCreate":".\u0644\u0627 \u062f\u0627\u0639\u064a \u0644\u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u062c\u062f\u064a\u062f. \u0641\u0642\u0637 \u0642\u0645 \u0628\u062a\u0648\u0635\u064a\u0644 \u0645\u062d\u0641\u0638\u062a\u0643 \u0648\u0627\u0646\u0637\u0644\u0642","getAWallet":"\u0627\u062d\u0635\u0644 \u0639\u0644\u0649 \u0645\u062d\u0641\u0638\u0629","useAWallet":"\u0627\u0633\u062a\u062e\u062f\u0645 \u0645\u062d\u0641\u0638\u0629 \u0644\u062a\u0623\u0645\u064a\u0646 \u0648\u0625\u062f\u0627\u0631\u0629 \u0623\u0635\u0648\u0644 \u0646\u064a\u0631 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643\u060c \u0648\u0627\u062f\u062e\u0644 \u0644\u0623\u064a \u062a\u0637\u0628\u064a\u0642 \u064a\u0633\u062a\u062e\u062f\u0645 \u0646\u064a\u0631 \u062f\u0648\u0646 \u0627\u0644\u062d\u0627\u062c\u0629 \u0625\u0644\u0649 \u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u0648\u0643\u0644\u0645\u0629\u0627\u0644\u0645\u0631\u0648\u0631","connectionFailed":"\u0627\u062a\u0635\u0627\u0644 \u0641\u0627\u0634\u0644","connectionSuccessful":"\u0627\u062a\u0635\u0627\u0644 \u0646\u0627\u062c\u062d","connected":"\u0645\u062a\u0635\u0644","connectingTo":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628","connectingMessage":{"injected":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0625\u0636\u0627\u0641\u0629","browser":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629 \u0628\u0639\u062f \u0625\u0639\u0627\u062f\u0629 \u062a\u0648\u062c\u064a\u0647","hardware":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u062c\u0647\u0627\u0632 \u0644\u064a\u062f\u062c\u0631","bridge":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629"}},"ledger":{"connectWithLedger":"\u0627\u062a\u0635\u0644 \u0645\u0639 \u0644\u064a\u062f\u062c\u0631","makeSureYourLedger":"\u062a\u0623\u0643\u062f \u0623\u0646 \u0644\u064a\u062f\u062c\u0631 \u0645\u062a\u0635\u0644 \u0628\u0623\u0645\u0627\u0646, \u0648 \u0623\u0646 \u062a\u0637\u0628\u064a\u0642 \u0646\u064a\u0631 \u0645\u0641\u062a\u0648\u062d \u0641\u064a \u062c\u0647\u0627\u0632\u0643","continue":"\u062a\u0627\u0628\u0639","specifyHDPath":"\u062d\u062f\u062f \u0645\u0633\u0627\u0631 \u0627\u0644\u062d\u0633\u0627\u0628","enterYourPreferredHDPath":"\u0623\u062f\u062e\u0644 \u0645\u0633\u0627\u0631 \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0645\u0641\u0636\u0644\u060c \u062b\u0645 \u0627\u0628\u062d\u062b \u0639\u0646 \u0643\u0644 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0644\u0646\u0634\u0637\u0629","scan":"\u0645\u0633\u062d","retry":"\u0623\u0639\u062f \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629","ledgerIsNotAvailable":"\u0644\u064a\u062f\u062c\u0631 \u063a\u064a\u0631 \u0645\u062a\u0648\u0641\u0631","accessDeniedToUseLedgerDevice":"\u062a\u0645 \u0631\u0641\u0636 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0644\u064a\u062f\u062c\u0631","noAccountsFound":"\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u064a \u062d\u0633\u0627\u0628\u0627\u062a","selectYourAccounts":"\u062d\u062f\u062f \u062d\u0633\u0627\u0628\u0627\u062a\u0643","connecting1Account":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u062d\u0633\u0627\u0628 \u0648\u0627\u062d\u062f","cantFindAnyAccount":"\u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u064a \u062d\u0633\u0627\u0628 \u0645\u0631\u062a\u0628\u0637 \u0628\u0647\u0630\u0627 \u0644\u064a\u062f\u062c\u0631 \u0627\u0644\u0631\u062c\u0627\u0621 \u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u0646\u064a\u0631 \u062c\u062f\u064a\u062f \u0639\u0644\u0649","orConnectAnAnotherLedger":"\u0627\u0648 \u0627\u0631\u0628\u0637 \u062c\u0647\u0627\u0632 \u0644\u064a\u062f\u062c\u0631 \u0622\u062e\u0631","connecting":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644","ofAccounts":"\u0645\u0646 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a","failedToAutomatically":"\u0641\u0634\u0644 \u0641\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062d\u0633\u0627\u0628 \u062a\u0644\u0642\u0627\u0626\u064a\u0627. \u064a\u0631\u062c\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062d\u0633\u0627\u0628 \u064a\u062f\u0648\u064a\u0627","overviewTheListOfAuthorized":"\u0644\u0627\u0626\u062d\u0629 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0644\u0645\u0635\u0631\u062d \u0628\u0647\u0627, \u0623\u0643\u0645\u0644 \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u062f\u062e\u0648\u0644 \u0628\u0627\u0644\u0646\u0642\u0631 \u0639\u0644\u0649 \u0627\u0644\u0632\u0631 \u0623\u062f\u0646\u0627\u0647","finish":"\u0625\u0646\u0647\u0627\u0621"},"install":{"youllNeedToInstall":"\u0633\u062a\u062d\u062a\u0627\u062c \u0644\u062a\u062b\u0628\u064a\u062a","toContinueAfterInstalling":"\u0644\u0644\u0627\u0633\u062a\u0643\u0645\u0627\u0644. \u0628\u0639\u062f \u0627\u0644\u062a\u062b\u0628\u064a\u062a","refreshThePage":"\u0642\u0645 \u0628\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641\u062d\u0629","open":"\u0627\u0641\u062a\u062d"},"qr":{"copiedToClipboard":"\u062a\u0645 \u0627\u0644\u0646\u0633\u062e","failedToCopy":"\u0641\u0634\u0644 \u0627\u0644\u0646\u0633\u062e","scanWithYourMobile":"\u0627\u0645\u0633\u062d \u0628\u062c\u0647\u0627\u0632\u0643 \u0627\u0644\u0645\u062d\u0645\u0648\u0644","copyToClipboard":"\u0646\u0633\u062e","preferTheOfficial":"\u062a\u0641\u0636\u0644 \u0627\u0644\u062d\u0648\u0627\u0631 \u0627\u0644\u0631\u0633\u0645\u064a \u0644","open":"\u0641\u062a\u062d"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),Lj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Spojite crypto nov\u010danik!","whatIsAWallet":"\u0160to je to crypto nov\u010danik?","secureAndManage":"Osigurajte i upravljajte svojom digitalnom imovinom.","safelyStore":"Sigurno pohranite i prebacite svoj crypto i NFT-eve.","logInToAny":" Prijavite se u bilo koju NEAR aplikaciju","noNeedToCreate":"Nema potrebe za stvaranjem novih naloga ili korisni\u010dkih podataka. Spojite svoj crypto nov\u010danik i spremni ste!","getAWallet":"Otvorite crypto nov\u010danik","useAWallet":"Koristite crypto nov\u010danik da biste osigurali i upravljali svojom NEAR imovinom, te se prijavite u bilo koju NEAR aplikaciju bez korisni\u010dkog imena i lozinke.","connectionFailed":"Neuspje\u0161no povezivanje.","connectionSuccessful":"Uspje\u0161no povezivanje.","connected":"Povezano.","connectingTo":"Povezivanje u tijeku","connectingMessage":{"injected":"Potvrdite vezu u eksternom prozoru","browser":"Nakon redirekcije, potvrdite vezu u nov\u010daniku","hardware":"Potvrdite vezu sa nov\u010danikom","bridge":"Potvrdite vezu u nov\u010daniku"}},"ledger":{"connectWithLedger":"Pove\u017eite se hardverskim nov\u010danikom","makeSureYourLedger":"Osigurajte sigurnu vezu s hardverskim nov\u010danikom, te da je NEAR aplikacija otvorena na va\u0161em ure\u0111aju","continue":"Nastavite","specifyHDPath":"Specificirajte HD putanju","enterYourPreferredHDPath":"Upi\u0161ite preferiranu HD putanju, zatim skenirajte aktivne naloge","scan":"Skenirajte","retry":"Poku\u0161ajte ponovno","ledgerIsNotAvailable":"Hardverski nov\u010danik nije dostupan.","accessDeniedToUseLedgerDevice":"Odbijen pristup za kori\u0161tenjem hardverskog nov\u010danika","noAccountsFound":"Nalozi nisu prona\u0111eni","selectYourAccounts":"Odaberite svoje naloge","connecting1Account":"Povezivanje 1 naloga","cantFindAnyAccount":"Nije mogu\u0107e prona\u0107i niti jedan nalog povezan s ovim hardverskim nov\u010danikom. Molimo vas, kreirajte novi NEAR nalog","orConnectAnAnotherLedger":"Ili pove\u017eite drugi hardverski nov\u010danik.","connecting":"Povezivanje","ofAccounts":"naloga","failedToAutomatically":"Neuspje\u0161no automatsko pronala\u017eenje ID naloga. Unesite ru\u010dno:","overviewTheListOfAuthorized":"Pregledajte popis odobrenih naloga, zavr\u0161ite prijavu pritiskom na ni\u017ee prikazani gumb.","finish":"Zavr\u0161ite"},"install":{"youllNeedToInstall":" Potrebno je instalirati modal","toContinueAfterInstalling":"za nastavak. Nakon instalacije","refreshThePage":"osvje\u017eite stranicu.","open":"Otvorite QR modal"},"qr":{"copiedToClipboard":"Kopirano u me\u0111uspremnik","failedToCopy":"Neupsje\u0161no kopiranje u me\u0111uspremnik","scanWithYourMobile":"Skenirajte svojim mobilnim ure\u0111ajem","copyToClipboard":" Kopirajte u me\u0111uspremnik","preferTheOfficial":"Odaberite slu\u017ebeni dijalog","open":"Otvorite"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"},"exportAccounts":{"chooseAWallet":"Odaberi Wallet","transferYourAccounts":"Prenesi svoje naloge","selectAWallet":"Odaberite wallet koji odgovara va\u0161im potrebama i podr\u017eava va\u0161e povezane naloge.","selectYourAccounts":"Odaberi svoje naloge","afterDecide":"Nakon \u0161to odlu\u010dite koji wallet koristite, mo\u017eete odabrati koje ra\u010dune \u017eelite prebaciti.","disclaimer":"Ne\u0107ete mo\u0107i prebaciti naloge koji nisu nikada bili kori\u0161teni na NEAR-u.","warning":"ne podr\u017eava izvoz naloga u ovom trenutku. Molimo odaberite drugi wallet.","walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet"},"selectAccounts":{"title":"Odaberi naloge za prijenos","button":"Generiraj lozinku","deselectAll":"Makni odabir sa svih","selectAll":"Odaberi sve","unavailable":"Prijenos nije dostupan","error":"Nalog ne postoji","warningLedger":"Potrebna ledger podr\u0161ka","noBalance":"Nalog nema sredstava"},"getPassphrase":{"title":"Kopiraj privremenu lozinku","desc":"Bit \u0107e potrebno unijeti ovu lozinku na po\u010detku izvoza naloga na drugi wallet.","button":"Nastavi","label":"Klikni za kopiju","checkLabel":"Kopirao sam ili zapisao lozinku"},"complete":{"title":"Zavr\u0161i prijenos","descOne":"You will now be redirected to the wallet you selected to complete the transfer.","descTwo":"Kada je unos s odabranog walleta zavr\u0161en, pritisnite gumb da biste zavr\u0161ili prijenos.","button":"Zavr\u0161i"}}}}'),Fj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a!","whatIsAWallet":"\u0428\u0442\u043e \u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a?","secureAndManage":"\u0417\u0430\u0448\u0442\u0438\u0442\u0435\u0442\u0435 \u0433\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u0443\u0432\u0430\u0458\u0442\u0435 \u0441\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430.","safelyStore":"\u0411\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u0441\u043a\u043b\u0430\u0434\u0438\u0440\u0430\u0458\u0442\u0435 \u0438 \u0438\u0437\u0432\u0440\u0448\u0443\u0432\u0430\u0458\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0430\u043a\u0446\u0438\u0438 \u0441\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e \u0438 NFT.","logInToAny":"\u041d\u0430\u0458\u0430\u0432\u0435\u0442\u0435 \u0441\u0435 \u043d\u0430 \u043a\u043e\u0458\u0430 \u0431\u0438\u043b\u043e NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430","noNeedToCreate":"\u041d\u0435\u043c\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u043a\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043d\u043e\u0432\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0438\u043b\u0438 \u0438\u043d\u0433\u0435\u0440\u0435\u043d\u0446\u0438\u0438. \u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a \u0438 \u0441\u0442\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u0432\u0435\u043d\u0438!","getAWallet":"\u041d\u0430\u043f\u0440\u0430\u0432\u0435\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","useAWallet":"\u041a\u043e\u0440\u0438\u0441\u0442\u0435\u0442\u0435 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a \u0437\u0430 \u0434\u0430 \u0433\u0438 \u0437\u0430\u0448\u0442\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043d\u0430\u0458\u0430\u0432\u0438\u0442\u0435 \u043d\u0430 \u043a\u043e\u0458\u0430 \u0431\u0438\u043b\u043e NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430 \u0431\u0435\u0437 \u043f\u043e\u0442\u0440\u0435\u0431\u0430 \u043e\u0434 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0438\u043c\u0438\u045a\u0430 \u0438 \u043b\u043e\u0437\u0438\u043d\u043a\u0438.","connectionFailed":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u043d\u0435 \u0431\u0435\u0448\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.","connectionSuccessful":"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435.","connected":"\u041f\u043e\u0432\u0440\u0437\u0430\u043d\u043e.","connectingTo":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435 \u0441\u043e","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u0432\u043e \u0435\u043a\u0441\u0442\u0435\u0440\u043d\u0438\u043e\u0442 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","browser":"\u041f\u043e \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0443\u0432\u0430\u045a\u0435\u0442\u043e, \u043f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u043e\u0434 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043e\u043a\u0442","hardware":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u0441\u043e \u043b\u0430\u0434\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0458\u0430 \u0432\u0440\u0441\u043a\u0430\u0442\u0430 \u0432\u043e \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u0442"}},"ledger":{"connectWithLedger":"\u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0441\u0435 \u0441\u043e \u041b\u0435\u045f\u0435\u0440","makeSureYourLedger":"\u041e\u0441\u0438\u0433\u0443\u0440\u0430\u0458\u0442\u0435 \u0441\u0435 \u0434\u0435\u043a\u0430 \u0432\u0430\u0448\u0438\u043e\u0442 \u041b\u0435\u045f\u0435\u0440 \u0435 \u043f\u043e\u0432\u0440\u0437\u0430\u043d \u0431\u0435\u0437\u0431\u0435\u0434\u043d\u043e, \u0438 \u0434\u0435\u043a\u0430 NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430\u0442\u0430 \u0435 \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0438\u043e\u0442 \u0443\u0440\u0435\u0434","continue":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u0442\u0435","specifyHDPath":"\u041d\u0430\u0432\u0435\u0434\u0435\u0442\u0435 \u0425\u0414 \u043b\u043e\u043a\u0430\u0446\u0438\u0458\u0430","enterYourPreferredHDPath":"\u0412\u043d\u0435\u0441\u0435\u0442\u0435 \u0458\u0430 \u0432\u0430\u0448\u0430\u0442\u0430 \u043f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u043d\u0430 \u0425\u0414 \u043b\u043e\u043a\u0430\u0446\u0438\u0458\u0430, \u0430 \u043f\u043e\u0442\u043e\u0430 \u0441\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043d\u0430\u0458\u0434\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438.","scan":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435","retry":"\u041e\u0431\u0438\u0434\u0435\u0442\u0435 \u0441\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e","ledgerIsNotAvailable":"\u041b\u0435\u045f\u0435\u0440\u043e\u0442 \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u0430\u043f\u0435\u043d.","accessDeniedToUseLedgerDevice":"\u041f\u0440\u0438\u0441\u0442\u0430\u043f\u043e\u0442 \u0437\u0430 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u045a\u0435 \u043d\u0430 \u041b\u0435\u045f\u0435\u0440 \u0443\u0440\u0435\u0434 \u0435 \u043e\u0434\u0431\u0438\u0435\u043d","noAccountsFound":"\u041d\u0435\u043c\u0430 \u043d\u0430\u0458\u0434\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438","connecting1Account":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u0435\u0434\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430","cantFindAnyAccount":"\u041d\u0435 \u0441\u0435 \u043d\u0430\u0458\u0434\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u043f\u043e\u0432\u0440\u0437\u0430\u043d\u0438 \u0441\u043e \u043e\u0432\u043e\u0458 \u041b\u0435\u045f\u0435\u0440. \u0412\u0435 \u043c\u043e\u043b\u0438\u043c\u0435 \u043a\u0440\u0435\u0438\u0440\u0430\u0458\u0442\u0435 \u043d\u043e\u0432\u0430 NEAR \u0441\u043c\u0435\u0442\u043a\u0430 ","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u043f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u041b\u0435\u045f\u0435\u0440.","connecting":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435","ofAccounts":"\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0438","failedToAutomatically":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u043e \u0431\u0430\u0440\u0430\u045a\u0435 \u043d\u0430 \u0418\u0414 \u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430\u0442\u0430. \u0412\u043d\u0435\u0441\u0435\u0442\u0435 \u0433\u043e \u0440\u0430\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u043b\u0438\u0441\u0442\u0430\u0442\u0430 \u043d\u0430 \u043e\u0432\u043b\u0430\u0441\u0442\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438, \u0437\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0441\u0435 \u043d\u0430\u0458\u0430\u0432\u0430\u0442\u0430 \u0441\u043e \u043a\u043b\u0438\u043a\u043d\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043a\u043e\u043f\u0447\u0435\u0442\u043e \u043f\u043e\u0434\u043e\u043b\u0443.","finish":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"},"install":{"youllNeedToInstall":"\u0422\u0440\u0435\u0431\u0430 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u0434\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435. \u041f\u043e \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u045a\u0435\u0442\u043e","refreshThePage":"\u041e\u0441\u0432\u0435\u0436\u0435\u0442\u0435 \u0458\u0430 \u0441\u0442\u0440\u0430\u043d\u0430\u0442\u0430.","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u043e\u0442","failedToCopy":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u0430\u045a\u0435 \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434","scanWithYourMobile":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0441\u043a\u0438 \u0443\u0440\u0435\u0434","copyToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458\u0442\u0435 \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434","preferTheOfficial":"\u041f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0458\u0442\u0435 \u043e\u0444\u0438\u0446\u0438\u0458\u0430\u043b\u0435\u043d \u0434\u0438\u0430\u043b\u043e\u0433 \u043d\u0430","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0435\u043b\u0438\u0441\u0442\u0443\u0432\u0430\u0447","injected":"\u0415\u043a\u0441\u0442\u0435\u043d\u0437\u0438\u0458\u0430 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","instant-link":"\u0418\u043d\u0441\u0442\u0430\u043d\u0442 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a"},"exportAccounts":{"chooseAWallet":"\u041e\u0434\u0431\u0435\u0440\u0435\u0442\u0435 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a","transferYourAccounts":"\u041f\u0440\u0435\u0444\u0440\u043b\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","selectAWallet":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458 \u0433\u0438 \u0437\u0430\u0434\u043e\u0432\u043e\u043b\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u0431\u0430\u0440\u0430\u043d\u045a\u0430 \u0438 \u0433\u0438 \u043f\u043e\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u043f\u043e\u0432\u0440\u0437\u0430\u043d\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438.","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","afterDecide":"\u041e\u0434\u043a\u0430\u043a\u043e \u045c\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043a\u043e\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0441\u0430\u043a\u0430\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043f\u0440\u0435\u0444\u0440\u043b\u0438\u0442\u0435.","disclaimer":"\u041d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u043f\u0440\u0444\u0440\u043b\u0430\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u043a\u043e\u0438 \u043d\u0438\u043a\u043e\u0433\u0430\u0448 \u043d\u0435 \u0431\u0438\u043b\u0435 \u043d\u0430\u0434\u043e\u043f\u043e\u043b\u043d\u0430\u0442\u0438 \u0438\u043b\u0438 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u043d\u0438 \u043d\u0430 NEAR.","warning":"\u043d\u0435 \u043f\u043e\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0432\u043e \u043e\u0432\u043e\u0458 \u043c\u043e\u043c\u0435\u043d\u0442. \u0412\u0435 \u043c\u043e\u043b\u0438\u043c\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0435\u043b\u0438\u0441\u0442\u0443\u0432\u0430\u0447","injected":"\u0415\u043a\u0441\u0442\u0435\u043d\u0437\u0438\u0458\u0430 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"selectAccounts":{"title":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438 \u0437\u0430 \u0434\u0430 \u0433\u0438 \u043f\u0440\u0435\u0444\u0440\u043b\u0438\u0442\u0435.","button":"\u0414\u043e\u0431\u0438\u0458\u0442\u0435 \u043b\u043e\u0437\u0438\u043d\u043a\u0430","deselectAll":"\u041e\u0442\u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0435","selectAll":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0435","unavailable":"\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440\u043e\u0442 \u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u043f\u0435\u043d","error":"\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0430\u0442\u0430 \u0441\u043c\u0435\u0442\u043a\u0430 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u0438","warningLedger":"\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u0430 \u0435 \u043f\u043e\u0434\u0434\u0440\u0448\u043a\u0430 \u043e\u0434 \u041b\u0435\u045f\u0435\u0440","noBalance":"\u0421\u043c\u0435\u0442\u043a\u0430\u0442\u0430 \u043d\u0435 \u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d\u0430"},"getPassphrase":{"title":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458\u0442\u0435 \u0458\u0430 \u043f\u0440\u0438\u0432\u0440\u0435\u043c\u0435\u043d\u0430\u0442\u0430 \u043b\u043e\u0437\u0438\u043d\u043a\u0430","desc":"\u040c\u0435 \u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u0458\u0430 \u0432\u043d\u0435\u0441\u0435\u0442\u0435 \u043e\u0432\u0430\u0430 \u043b\u043e\u0437\u0438\u043d\u043a\u0430 \u043a\u043e\u0433\u0430 \u045c\u0435 \u0437\u0430\u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","button":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u0442\u0435","label":"\u041a\u043b\u0438\u043a\u043d\u0435\u0442\u0435 \u0437\u0430 \u0434\u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0442\u0435","checkLabel":"\u0408\u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0432 \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0448\u0430\u0432 \u043b\u043e\u0437\u0438\u043d\u043a\u0430\u0442\u0430"},"complete":{"title":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0433\u043e \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442","descOne":"\u0421\u0435\u0433\u0430 \u045c\u0435 \u0431\u0438\u0434\u0435\u0442\u0435 \u043f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0435\u043d\u0438 \u043d\u0430 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442.","descTwo":"\u041e\u0442\u043a\u0430\u043a\u043e \u045c\u0435 \u0437\u0430\u0432\u0440\u0448\u0438 \u0443\u0432\u043e\u0437\u043e\u0442 \u043e\u0434 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043f\u0440\u0438\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u0433\u043e \u043a\u043e\u043f\u0447\u0435\u0442\u043e \u0437\u0430 \u0434\u0430 \u0433\u043e \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442.","button":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"}}}}'),Bj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Pove\u017eite svojo denarnico!","whatIsAWallet":"Kaj je denarnica?","secureAndManage":"Zavarujte in upravljajte svoja digitalna sredstva.","safelyStore":"Varno shranjujte in prena\u0161ajte svoje kriptovalute in NFTje.","logInToAny":"Prijavite se v katero koli aplikacijo na NEAR","noNeedToCreate":"Ni vam treba ustvarjati novih ra\u010dunov. Pove\u017eite svojo denarnico in za\u010dnite!","getAWallet":"Ustvarite denarnico","useAWallet":"Uporabite denarnico, da bi zavarovali in upravljali s svoja NEAR digitalna sredstva, in se prijavite v katero koli aplikacijo ekosistema NEAR","connectionFailed":"Povezava ni bila uspe\u0161na.","connectionSuccessful":"Povezava je bila uspe\u0161na.","connected":"Va\u0161a denarnica je povezana.","connectingTo":"Povezovanje z","connectingMessage":{"injected":"Potrdite povezavo v oknu raz\u0161iritve","browser":"Po preusmeritvi potrdite povezavo v denarnici","hardware":"Potrdite povezavo s hladno denarnico","bridge":"Potrdite povezavo v denarnici"}},"ledger":{"connectWithLedger":"Pove\u017eite se z Ledger","makeSureYourLedger":"Prepri\u010dajte se, da je va\u0161 Ledger varno povezan in da je aplikacija NEAR odprta v va\u0161i napravi","continue":"Nadaljuj","specifyHDPath":"Dolo\u010dite HD pot","enterYourPreferredHDPath":"Vnesite \u017eeleno HD pot, nato poi\u0161\u010dite vse aktivne ra\u010dune.","scan":"Skenirajte","retry":"Poskusite znova","ledgerIsNotAvailable":"Ledger ni na voljo","accessDeniedToUseLedgerDevice":"Dostop za uporabo naprave Ledger zavrnjen","noAccountsFound":"Ni najdenih ra\u010dunov","selectYourAccounts":"Izberite Va\u0161i ra\u010duni","connecting1Account":"Povezovanje enega ra\u010duna","cantFindAnyAccount":"Ni mogo\u010de najti nobenega ra\u010duna, povezanega s tem Ledgerjem. Ustvarite nov NEAR ra\u010dun ","orConnectAnAnotherLedger":"ali pove\u017eite drug Ledger..","connecting":"Povezovanje","ofAccounts":"ra\u010dunov","failedToAutomatically":"ID-ja ra\u010duna ni bilo mogo\u010de samodejno najti. Zagotovite ga ro\u010dno:","overviewTheListOfAuthorized":"Oglejte si seznam poobla\u0161\u010denih ra\u010dunov, dokon\u010dajte prijavo s klikom na spodnji gumb.","finish":"Kon\u010dajte"},"install":{"youllNeedToInstall":"Morali ga boste namestiti","toContinueAfterInstalling":"nadaljevati. Po namestitvi","refreshThePage":"Osve\u017eite stran.","open":"Odprite"},"qr":{"copiedToClipboard":"Kopirano v podlo\u017eni mapi","failedToCopy":"Kopiranje v podlo\u017eni mapi ni uspelo","scanWithYourMobile":"Skenirajte s svojo mobilno napravo","copyToClipboard":" Kopirajte v podlo\u017eni mapi","preferTheOfficial":"Preferirajte uradno pogovorno okno","open":"Odprite"},"walletTypes":{"hardware":"Hladna denarnica","browser":"Denarnica brskalnika","injected":"Raz\u0161iritev za denarnico","bridge":"Bridge denarnica","mobile":"Mobilna denarnica","instant-link":"Takoj\u0161nja denarnica"},"exportAccounts":{"chooseAWallet":"Izberite denarnico","transferYourAccounts":"Prenesite svoje ra\u010dune","selectAWallet":"Izberite denarnico, ki ustreza va\u0161im potrebam in podpira va\u0161e povezane ra\u010dune.","selectYourAccounts":"Izberite va\u0161i ra\u010duni","afterDecide":"Ko se odlo\u010dite za denarnico, lahko izberete, katere ra\u010dune \u017eelite prenesti.","disclaimer":"Ne boste mogli prenesti Ra\u010dunov, ki nikoli niso bili financirani ali uporabljeni na NEAR.","warning":"trenutno ne podpira izvoza ra\u010duna. Izberite drugo denarnico","walletTypes":{"hardware":"Hladna denarnica","browser":"Denarnica brskalnika","injected":"Raz\u0161iritev za denarnico","bridge":"Bridge denarnica","mobile":"Mobilna denarnica"},"selectAccounts":{"title":"Izberite ra\u010duni za prenos.","button":"Pridobite geslo","deselectAll":"Prekli\u010di izbiro vseh","selectAll":"Izberi vse","unavailable":"Prenos ni na voljo","error":"Ra\u010dun ne obstaja","warningLedger":"Potrebna je podpora za Ledger","noBalance":"Ra\u010dun ni financiran"},"getPassphrase":{"title":"Kopiraj za\u010dasno geslo","desc":"To geslo boste morali vnesti, ko boste za\u010deli izva\u017eati svoje ra\u010dune v drugo denarnico.","button":"Nadaljujte","label":"Kliknite za kopiranje","checkLabel":"Geslo sem kopiral ali zapisal"},"complete":{"title":"Dokon\u010dajte prenos","descOne":"Zdaj boste preusmerjeni v denarnico, ki ste jo izbrali za dokon\u010danje prenosa.","descTwo":"Ko je uvozni del postopka kon\u010dan iz izbrane denarnice, pritisnite gumb za dokon\u010danje postopka prenosa.","button":"Kon\u010dajte"}}}}'),jj=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0432\u043e\u0458 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a!","whatIsAWallet":"\u0428\u0442\u0430 \u0458\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a?","secureAndManage":"\u041e\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0459\u0430\u0458\u0442\u0435 \u0441\u0432\u043e\u0458\u043e\u043c \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u043e\u043c \u0438\u043c\u043e\u0432\u0438\u043d\u043e\u043c.","safelyStore":"\u0411\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u0447\u0443\u0432\u0430\u0458\u0442\u0435 \u0438 \u043f\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u0443\u0442\u0435 \u0438 NFT.","logInToAny":"\u041f\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0441\u0435 \u043d\u0430 \u0431\u0438\u043b\u043e \u043a\u043e\u0458\u0443 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0443 NEAR","noNeedToCreate":"\u041d\u0435\u043c\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0435 \u0434\u0430 \u043a\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043d\u043e\u0432\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0438\u043b\u0438 \u0430\u043a\u0440\u0435\u0434\u0438\u0442\u0438\u0432\u0435. \u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0438 \u0441\u043f\u0440\u0435\u043c\u043d\u0438 \u0441\u0442e!","getAWallet":"\u041d\u0430\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","useAWallet":"\u041a\u043e\u0440\u0438\u0441\u0442\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0434\u0430 \u043e\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0459\u0430\u0442\u0435 \u0441\u0432\u043e\u0458\u0438\u043c NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0438\u043c\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043f\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0443 \u0431\u0438\u043b\u043e \u043a\u043e\u0458\u0443 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0443 NEAR \u0431\u0435\u0437 \u043f\u043e\u0442\u0440\u0435\u0431\u0435 \u0437\u0430 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u0438 \u043b\u043e\u0437\u0438\u043d\u043a\u0430\u043c\u0430.","connectionFailed":"\u0412\u0435\u0437\u0430 \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u043e\u0441\u0442\u0430\u0432\u0459\u0435\u043d\u0430.","connectionSuccessful":"\u0412\u0435\u0437\u0430 \u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u0430.","connected":"\u041f\u043e\u0432\u0435\u0437\u0430\u043d.","connectingTo":"\u041f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435 \u043d\u0430","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u0441\u043f\u043e\u0459\u043d\u043e\u043c \u043f\u0440\u043e\u0437\u043e\u0440\u0443","browser":"\u041d\u0430\u043a\u043e\u043d \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0430\u0432\u0430\u045a\u0430, \u043f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u0443","hardware":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u0445\u043b\u0430\u0434\u043d\u0438\u043c \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u043c","bridge":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u043c"}},"ledger":{"connectWithLedger":"\u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0435 \u0441\u0430 Ledger","makeSureYourLedger":"\u0423\u0432\u0435\u0440\u0438\u0442\u0435 \u0441\u0435 \u0434\u0430 \u0458\u0435 \u0432\u0430\u0448 Ledger \u0431\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u043f\u043e\u0432\u0435\u0437\u0430\u043d \u0438 \u0434\u0430 \u0458\u0435 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430 NEAR \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0443\u0440\u0435\u0452\u0430\u0458\u0443","continue":"\u041d\u0430\u0441\u0442\u0430\u0432\u0438","specifyHDPath":"\u041d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0425\u0414 \u043f\u0443\u0442\u0430\u045a\u0443","enterYourPreferredHDPath":"\u0423\u043d\u0435\u0441\u0438\u0442\u0435 \u0436\u0435\u0459\u0435\u043d\u0443 \u0436\u0435\u0459\u0435\u043d\u0443 \u0425\u0414 \u043f\u0443\u0442\u0430\u045a\u0443, \u0430 \u0437\u0430\u0442\u0438\u043c \u0441\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0432\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0435 \u043d\u0430\u043b\u043e\u0433\u0435.","scan":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435","retry":"\u041f\u043e\u043a\u0443\u0448\u0430\u0458 \u043f\u043e\u043d\u043e\u0432\u043e","ledgerIsNotAvailable":"Ledger \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043d.","accessDeniedToUseLedgerDevice":"\u041f\u0440\u0438\u0441\u0442\u0443\u043f \u0458\u0435 \u043e\u0434\u0431\u0438\u0458\u0435\u043d \u0437\u0430 \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u045a\u0435 Ledger \u0443\u0440\u0435\u0452\u0430\u0458\u0430","noAccountsFound":"\u041d\u0430l\u043e\u0437\u0438 \u043d\u0438\u0441\u0443 \u043f\u0440\u043e\u043d\u0430\u0452\u0435\u043d\u0438","selectYourAccounts":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0412\u0430\u0448 \u043d\u0430l\u043e\u0433","connecting1Account":"\u041f\u043e\u0432\u0435\u0437\u0430\u0442\u0438 1 \u043d\u0430l\u043e\u0433","cantFindAnyAccount":"\u041d\u0438\u0458\u0435 \u043c\u043e\u0433\u0443\u045b\u0435 \u043f\u0440\u043e\u043d\u0430\u045b\u0438 \u043d\u0438\u0458\u0435\u0434\u0430\u043d \u043d\u0430l\u043e\u0433 \u043f\u043e\u0432\u0435\u0437\u0430\u043d \u0441\u0430 \u043e\u0432\u0438\u043c Ledger-\u043e\u043c. \u041d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u0438 NEAR \u043d\u0430l\u043e\u0433","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 Ledger.","connecting":"\u041f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435","ofAccounts":"\u043d\u0430l\u043e\u0433\u0430","failedToAutomatically":"\u0410\u0443\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u043e \u043f\u0440\u043e\u043d\u0430\u043b\u0430\u0436\u0435\u045a\u0435 ID-a \u043d\u0430l\u043e\u0433\u0430 \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u043e. \u041d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0433\u0430 \u0440\u0443\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0458\u0442\u0435 \u043b\u0438\u0441\u0442\u0443 \u043e\u0432\u043b\u0430\u0448\u045b\u0435\u043d\u0438\u0445 \u0440\u0430\u0447\u0443\u043d\u0430, \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u0438\u0458\u0430\u0432\u0443 \u043a\u043b\u0438\u043a\u043e\u043c \u043d\u0430 \u0434\u0443\u0433\u043c\u0435 \u0438\u0441\u043f\u043e\u0434.","finish":"\u0417\u0430\u0432\u0440\u0448\u0438"},"install":{"youllNeedToInstall":"\u041c\u043e\u0440\u0430\u045b\u0435\u0442\u0435 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u043d\u0430\u0441\u0442\u0430\u0432\u0430\u043a. \u041d\u0430\u043a\u043e\u043d \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u045a\u0430","refreshThePage":"\u043f\u043e\u043d\u043e\u0432\u043e \u0443\u0447\u0438\u0442\u0430\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.","open":"\u041e\u0442\u0432\u043e\u0440\u0438"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a","failedToCopy":"\u041a\u043e\u043f\u0438\u0440\u0430\u045a\u0435 \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u043e","scanWithYourMobile":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u043f\u043e\u043c\u043e\u045b\u0443 \u043c\u043e\u0431\u0438\u043b\u043d\u043e\u0433 \u0443\u0440\u0435\u0452\u0430\u0458\u0430","copyToClipboard":" \u041a\u043e\u043f\u0438\u0440\u0430\u0458 \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a","preferTheOfficial":"\u041f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0442\u0435 \u0437\u0432\u0430\u043d\u0438\u0447\u043d\u0438 \u0434\u0438\u0458\u0430\u043b\u043e\u0433 \u043e\u0434","open":"\u041e\u0442\u0432\u043e\u0440\u0438"},"walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,","injected":"\u0414\u043e\u0434\u0430\u0442\u0430\u043a \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a,","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","instant-link":"\u0418\u043d\u0441\u0442\u0430\u043d\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"exportAccounts":{"chooseAWallet":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","transferYourAccounts":"\u041f\u0440\u0435\u043d\u0435\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435","selectAWallet":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458\u0438 \u043e\u0434\u0433\u043e\u0432\u0430\u0440\u0430 \u0432\u0430\u0448\u0438\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0430\u043c\u0430 \u0438 \u043a\u043e\u0458\u0438 \u043f\u043e\u0434\u0440\u0436\u0430\u0432\u0430 \u0432\u0430\u0448\u0435 \u043f\u043e\u0432\u0435\u0437\u0430\u043d\u0435 \u043d\u0430\u043b\u043e\u0433\u0435.","selectYourAccounts":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u043d\u0430\u043b\u043e\u0433\u0435","afterDecide":"\u041d\u0430\u043a\u043e\u043d \u0448\u0442\u043e \u0441\u0435 \u043e\u0434\u043b\u0443\u0447\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0436\u0435\u043b\u0438\u0442\u0435 \u0434\u0430 \u043f\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435.","disclaimer":"\u041d\u0435\u045b\u0435\u0442\u0435 \u043c\u043e\u045b\u0438 \u0434\u0430 \u043f\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u043a\u043e\u0458\u0438 \u043d\u0438\u043a\u0430\u0434\u0430 \u043d\u0438\u0441\u0443 \u0431\u0438\u043b\u0438 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d\u0438 \u0438\u043b\u0438 \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u043d\u0438 \u043d\u0430 NEAR.","warning":"\u0442\u0440\u0435\u043d\u0443\u0442\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0440\u0436\u0430\u0432\u0430 \u0438\u0437\u0432\u043e\u0437 \u043d\u0430\u043b\u043e\u0433\u0430. \u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,","injected":"\u0414\u043e\u0434\u0430\u0442\u0430\u043a \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a,","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"selectAccounts":{"title":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0437\u0430 \u043f\u0440\u0435\u043d\u043e\u0441.","button":"\u0414\u043e\u0431\u0438\u0458\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u043d\u0443 \u0444\u0440\u0430\u0437\u0443","deselectAll":"\u041f\u043e\u043d\u0438\u0448\u0442\u0438\u0442\u0435 \u0438\u0437\u0431\u043e\u0440","selectAll":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0432\u0435","unavailable":"\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440 \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043d","error":"\u041d\u0430\u043b\u043e\u0433 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u0458\u0438","warningLedger":"\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u0430 \u043f\u043e\u0434\u0440\u0448\u043a\u0430 \u0437\u0430 Ledger","noBalance":"\u041d\u0430\u043b\u043e\u0433 \u043d\u0438\u0458\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d"},"getPassphrase":{"title":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458 \u043f\u0440\u0438\u0432\u0440\u0435\u043c\u0435\u043d\u0443 \u043b\u043e\u0437\u0438\u043d\u043a\u0443","desc":"\u041c\u043e\u0440\u0430\u045b\u0435\u0442\u0435 \u0434\u0430 \u0443\u043d\u0435\u0441\u0435\u0442\u0435 \u043e\u0432\u0443 \u043b\u043e\u0437\u0438\u043d\u043a\u0443 \u043a\u0430\u0434\u0430 \u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0432\u043e\u0437\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0443 \u0434\u0440\u0443\u0433\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","button":"\u041d\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u0435","label":"\u041a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u0434\u0430 \u0431\u0438\u0441\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u0430\u043b\u0438","checkLabel":"\u041a\u043e\u043f\u0438\u0440\u0430\u043e \u0441\u0430\u043c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043e \u043b\u043e\u0437\u0438\u043d\u043a\u0443"},"complete":{"title":"\u0414\u043e\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440","descOne":"\u0421\u0430\u0434\u0430 \u045b\u0435\u0442\u0435 \u0431\u0438\u0442\u0438 \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0435\u043d\u0438 \u043d\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458\u0438 \u0441\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043b\u0438 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440.","descTwo":"\u041a\u0430\u0434\u0430 \u0441\u0435 \u0434\u0435\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0430 \u0443\u0432\u043e\u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0438 \u0438\u0437 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u043e\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u0430, \u043f\u0440\u0438\u0442\u0438\u0441\u043d\u0438\u0442\u0435 \u0434\u0443\u0433\u043c\u0435 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u0440\u0435\u043d\u043e\u0441\u0430.","button":"\u0417\u0430\u0432\u0440\u0448\u0438\u0442\u0435"}}}}');let _5;const M5=(t,e)=>{if(!t)return"";const n=e.indexOf(".");if(n>-1){const r=e.substring(0,n),a=e.substring(n+1);return M5(t[r],a)}return t[e]},Dn=t=>{let e=window.navigator.languages?window.navigator.languages[0]:null;e=e||window.navigator.language;const n=(t=>-1!==t.indexOf("-")?t.split("-")[0]:t.split("_")[0])(_5||e),r=(t=>{switch(t){case"en":default:return S5;case"es":return xj;case"zh":return Tj;case"bg":return Oj;case"ko":return Nj;case"vi":return Pj;case"hi":return Rj;case"ar":return kj;case"hr":return Lj;case"mk":return Fj;case"sl":return Bj;case"sr":return jj}})(n),a=M5(r,t);return a&&"string"==typeof a?a:t},pp='\n\n \n \n',Wa='\n\n \n \n \n';function $A(t,e){return eE.apply(this,arguments)}function eE(){return eE=(0,ke.Z)(function*(t,e){if(En){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

${Dn("modal.ledger.selectYourAccounts")}

\n \n
\n
\n
\n \n
\n `;for(let n=0;n
\n `);document.getElementById("change-derivation-path-button")?.addEventListener("click",()=>{I5(t)}),document.getElementById("connect-button")?.addEventListener("click",n=>{n.preventDefault();const r=Array.from(document.querySelectorAll("input[name='account']")).map(y=>y.checked),a=e.filter((y,T)=>r[T]);a.length<1||nE(t,e,a)})}}),eE.apply(this,arguments)}const Vj='\n\n \n \n \n';function tb(t,e){return tE.apply(this,arguments)}function tE(){return tE=(0,ke.Z)(function*(t,e){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
${t.metadata.name}
\n

${t.metadata.name}

\n
\n
\n
\n
\n ${Vj}\n ${Dn("modal.wallet.connectionFailed")}\n
\n

${e&&e.message?e.message:""}

\n ${!t?.metadata.deprecated&&t?.metadata.available?``:""}\n
\n
\n
\n
\n
\n
\n `,document.getElementById("retry-button")?.addEventListener("click",()=>{om(t,!1)})}),tE.apply(this,arguments)}function nE(t,e,n){return rE.apply(this,arguments)}function rE(){return rE=(0,ke.Z)(function*(t,e,n){document.querySelector(".modal-right").innerHTML=`\n
\n
\n \n
\n

\n ${Dn("modal.ledger.connecting")} ${n.length} ${Dn("modal.ledger.ofAccounts")}\n

\n \n
\n
\n
\n
\n

\n ${Dn("modal.ledger.overviewTheListOfAuthorized")}\n

\n
\n
\n \n
\n
\n
\n
\n `;for(let r=0;r\n \n \n `);document.getElementById("back-button")?.addEventListener("click",()=>{$A(t,e)}),document.getElementById("finish-button")?.addEventListener("click",(0,ke.Z)(function*(){try{if(!En)return;(yield t.wallet()).signIn({contractId:En.options.contractId,methodNames:En.options.methodNames,accounts:n}),En.container.children[0].classList.remove("open"),En.emitter.emit("onHide",{hideReason:"wallet-navigation"})}catch(r){yield tb(t,r)}}))}),rE.apply(this,arguments)}function D5(t){return iE.apply(this,arguments)}function iE(){return iE=(0,ke.Z)(function*(t){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${Dn("modal.ledger.noAccountsFound")}\n

\n \n
\n
\n
\n
\n

\n ${Dn("modal.ledger.cantFindAnyAccount")}\n MyNearWallet\n ${Dn("modal.ledger.orConnectAnAnotherLedger")}\n

\n
\n
\n
\n `,document.getElementById("back-button")?.addEventListener("click",()=>{sE(t)})}),iE.apply(this,arguments)}function C5(){return oE.apply(this,arguments)}function oE(){return oE=(0,ke.Z)(function*(t=null){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
\n ${t?.metadata.name}\n
\n

${t?.metadata.name}

\n
\n
\n \n ${Dn("modal.wallet.connectingTo")} ${t?.metadata.name}...\n \n
\n
\n \n ${Dn("modal.wallet.connectingMessage."+t?.type)}\n \n
\n
\n
\n
\n `}),oE.apply(this,arguments)}const Hj='\n\n \n',Wj='\n\n \n';function I5(t){if(!En)return;document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${Dn("modal.ledger.specifyHDPath")}\n

\n \n
\n
\n
\n
\n
\n
44'/397'/0'/0'/
\n
\n
\n
\n \n \n
\n
\n
\n

\n ${Dn("modal.ledger.enterYourPreferredHDPath")}\n

\n \n
\n \n
\n
\n
\n
\n `;const e=document.getElementById("derivation-path-index");e.innerText=En.derivationPath.slice(-2,-1),document.getElementById("increase-index-button")?.addEventListener("click",()=>{if(!En)return;const n=parseInt(e.innerText)+1;En.derivationPath=En.derivationPath.slice(0,-2)+n.toString()+"'",e.innerText=n.toString()}),document.getElementById("decrease-index-button")?.addEventListener("click",()=>{if(!En)return;const n=parseInt(e.innerText)-1;En.derivationPath=En.derivationPath.slice(0,-2)+n.toString()+"'",n>=0&&(e.innerText=n.toString())}),document.getElementById("back-button")?.addEventListener("click",()=>{sE(t)}),document.getElementById("scan-button")?.addEventListener("click",(0,ke.Z)(function*(){try{const n=yield t.wallet();C5(t);const r=yield P5(n);if(!r||r.length<1)return D5(t);1===r.length&&nE(t,r,r),$A(t,r)}catch(n){yield tb(t,n)}}))}const Gj='\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ';function sE(t){En&&(En.derivationPath=L5,document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${Dn("modal.ledger.connectWithLedger")}\n

\n \n
\n
\n
\n
\n
\n ${Gj}\n
\n
\n

${Dn("modal.ledger.makeSureYourLedger")}

\n

${Dn("modal.ledger.specifyHDPath")}

\n
\n
\n
\n
\n
\n `,document.getElementById("continue-button")?.addEventListener("click",()=>{om(t,!1)}),document.getElementById("specify-derivation-path-button")?.addEventListener("click",()=>{I5(t)}))}const Zj='\n\n \n \n \n \n \n \n \n',Yj='\n\n \n \n \n';function x5(t){if(!En)return;let e="";return"injected"===t.type&&(e=t.metadata.downloadUrl),"browser"===t.type&&(e=t.metadata.walletUrl),e}function T5(){return aE.apply(this,arguments)}function aE(){return(aE=(0,ke.Z)(function*(){if(!En)return;document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n \n
\n

${Dn("modal.wallet.getAWallet")}

\n \n
\n
\n
\n\n
\n
\n
\n `;const e=En.modules.filter(n=>"bridge"!==n.type&&"hardware"!==n.type&&"instant-link"!==n.type);for(let n=0;n\n
\n ${r&&y?`${Zj}`:!r&&y?`${Yj}`:""}\n\n
\n
\n
\n
\n
${e[n].metadata.name}
\n
${Dn(`modal.walletTypes.${a||e[n].type}`)}
\n
\n \n`)}Array.from(document.querySelectorAll(".single-wallet-get")).forEach(n=>{n.addEventListener("click",()=>{if(!En)return;const r=En.modules.find(y=>y.id===n.id);if(!r)return;const a=x5(r);a&&window.open(a,"_blank")})}),document.getElementById("back-button")?.addEventListener("click",()=>{uE()})})).apply(this,arguments)}const Jj='\n\n \n',Qj='\n\n \n \n \n';function uE(){return cE.apply(this,arguments)}function cE(){return(cE=(0,ke.Z)(function*(){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n
\n

${Dn("modal.wallet.whatIsAWallet")}

\n \n
\n
\n\n
\n
\n
\n ${Jj}\n
\n
\n

${Dn("modal.wallet.secureAndManage")}

\n

${Dn("modal.wallet.safelyStore")}

\n
\n
\n\n
\n
\n ${Qj}\n
\n
\n

${Dn("modal.wallet.logInToAny")}

\n

${Dn("modal.wallet.noNeedToCreate")}

\n
\n
\n\n
\n \n
\n\n
\n

\n ${Dn("modal.wallet.useAWallet")}\n

\n \n
\n\n
\n \n
\n\n
\n
\n `,document.getElementById("get-a-wallet-button")?.addEventListener("click",()=>{T5()}),document.getElementById("get-a-wallet-button-mobile")?.addEventListener("click",()=>{T5()})})).apply(this,arguments)}const qj='\n\n \n \n';function O5(){return lE.apply(this,arguments)}function lE(){return lE=(0,ke.Z)(function*(t=null){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
\n
\n ${t?.metadata.name}\n
\n

${t?.metadata.name}

\n
\n ${qj}\n \n ${Dn("modal.wallet.connectionSuccessful")}\n \n
\n
\n
\n
\n `}),lE.apply(this,arguments)}var $j=g(89093),eU=g.n($j),tU=g(3259);const nU='\n\n \n \n';function fE(){return fE=(0,ke.Z)(function*(t,e){function r(){return(r=(0,ke.Z)(function*(ie){return yield tU.toString(ie,{margin:0,type:"svg"})})).apply(this,arguments)}const a=yield function n(ie){return r.apply(this,arguments)}(e.uri);document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

${Dn("modal.qr.scanWithYourMobile")}

\n \n
\n
\n
\n ${a}\n
\n
\n
\n ${nU}\n ${Dn("modal.qr.copyToClipboard")}\n
\n
\n
\n

${Dn("modal.qr.preferTheOfficial")} ${t.metadata.name}?

\n \n
\n
\n
\n`,document.getElementById("continue-button")?.addEventListener("click",()=>{om(t,!1)});const y=document.getElementById("copy-uri-to-clipboard"),T=document.getElementById("uri-copy-notification"),Z=ie=>{T&&y&&(T.innerHTML=ie,T.style.display="block",y.style.display="none")},$=()=>{T&&y&&(y.style.display="flex",T.style.display="none")};document.getElementById("copy-uri-to-clipboard")?.addEventListener("click",()=>{e.uri&&(eU()(e.uri)?(Z(Dn("modal.qr.copiedToClipboard")),setTimeout(()=>$(),1200)):(Z(Dn("modal.qr.failedToCopy")),setTimeout(()=>$(),1200)))}),document.getElementById("default-modal-trigger")?.addEventListener("click",()=>{e.handleOpenDefaultModal()})}),fE.apply(this,arguments)}const iU='\n\n \n \n \n ';let N5=!0;const oU=function(){var t=(0,ke.Z)(function*(e){if(!En)return[];const n=yield fetch(`${En.selector.options.network.indexerUrl}/publicKey/ed25519:${e}/accounts`);if(!n.ok)throw new Error("Failed to get account id from public key");const r=yield n.json();return Array.isArray(r)&&r.length?r:[]});return function(n){return t.apply(this,arguments)}}(),P5=function(){var t=(0,ke.Z)(function*(e){if(!En)return[];const n=yield e.getPublicKey(En.derivationPath);try{return(yield oU(n)).map((a,y)=>({derivationPath:En.derivationPath,publicKey:n,accountId:a,selected:0===y}))}catch{return null}});return function(n){return t.apply(this,arguments)}}();function om(t){return dE.apply(this,arguments)}function dE(){return dE=(0,ke.Z)(function*(t,e=!1){if(!En)return;const{selectedWalletId:n}=En.selector.store.getState();if(n!==t.id)try{if("injected"===t.type&&!t.metadata.available)return function Xj(t){En&&(document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n
\n
\n
\n
\n
\n
\n

\n ${t.metadata.name}\n

\n
\n

\n ${Dn("modal.install.youllNeedToInstall")} ${t.metadata.name}\n ${Dn("modal.install.toContinueAfterInstalling")}\n  \n ${Dn("modal.install.refreshThePage")}\n \n

\n
\n \n
\n
\n
\n `,document.getElementById("back-button")?.addEventListener("click",()=>{uE()}),document.getElementById("refresh-page-lint")?.addEventListener("click",()=>{window.location.reload()}),document.getElementById("download-button")?.addEventListener("click",()=>{"injected"===t.type&&window.open(t.metadata.downloadUrl,"_blank")}))}(t);if(t.metadata.deprecated)return tb(t,new Error("Wallet is deprecated"));const r=yield t.wallet();if(yield C5(t),"hardware"===r.type){const a=yield P5(r);return!a||a.length<1?D5(t):1===a.length?nE(t,a,a):$A(t,a)}if("bridge"===r.type){const a=En.selector.on("uriChanged",({uri:y})=>{!function rU(t,e){return fE.apply(this,arguments)}(t,{uri:y,handleOpenDefaultModal:()=>{om(t,!0)}})});return yield r.signIn({contractId:En.options.contractId,methodNames:En.options.methodNames,qrCodeModal:e}),a.remove(),En.container.children[0].classList.remove("open"),void En.emitter.emit("onHide",{hideReason:"wallet-navigation"})}if("browser"===r.type)return yield r.signIn({contractId:En.options.contractId,methodNames:En.options.methodNames,successUrl:r.metadata.successUrl,failureUrl:r.metadata.failureUrl}),En.container.children[0].classList.remove("open"),void En.emitter.emit("onHide",{hideReason:"wallet-navigation"});yield r.signIn({contractId:En.options.contractId,methodNames:En.options.methodNames}),En.container.children[0].classList.remove("open"),En.emitter.emit("onHide",{hideReason:"wallet-navigation"})}catch(r){const{name:a}=t.metadata,y=r&&"object"==typeof r&&"message"in r?r.message:"Something went wrong";yield tb(t,new Error(`Failed to sign in with ${a}: ${y}`))}else O5(t)}),dE.apply(this,arguments)}function nb(t,e){if(En)for(let n=0;n\n
${a}
\n
\n
${a}
\n
${y}
\n
\n ${r.metadata.deprecated?`\n
\n ${iU}\n
\n `:""}\n \n `),document.getElementById("module-"+r.id)?.addEventListener("click",()=>{if(document.querySelectorAll(".selected-wallet").forEach(Z=>{Z.classList.remove("selected-wallet")}),document.getElementById("module-"+r.id)?.classList.add("selected-wallet"),"hardware"===r.type)return sE(r);om(r,!1)})}}function R5(){if(!En)return;En.container.innerHTML=`\n
\n
\n
\n \n \n
\n
\n `;const t=[],e=[];En.modules.forEach(n=>{En?.selector.store.getState().recentlySignedInWallets.includes(n.id)?e.push(n):t.push(n)}),En.selector.options.optimizeWalletOrder&&e.length>0?(document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'\n
\n
Recent
\n
\n
\n '),document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'\n
\n
More
\n
\n
\n '),nb(".recent-options-list-content",e),En.selector.options.randomizeWalletOrder?nb(".more-options-list-content",t.sort(()=>Math.random()-.5)):nb(".more-options-list-content",t)):(document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'
'),nb(".options-list",En.modules)),document.querySelector(".nws-modal-overlay")?.addEventListener("click",()=>{En&&(En.container.children[0].classList.remove("open"),En.emitter.emit("onHide",{hideReason:"user-triggered"}))}),N5&&(document.addEventListener("click",n=>{if(!En)return;const r=n.target;r&&"close-button"===r.className&&(En.container.children[0].classList.remove("open"),En.emitter.emit("onHide",{hideReason:"user-triggered"}))}),N5=!1)}const k5="near-wallet-selector-modal",L5="44'/397'/0'/0'/1'";let hE=null,En=null;if(typeof window<"u"){const t=document.createElement("div");t.id=k5,document.body.appendChild(t)}const sU=(t,e)=>{const n=new YA;En={container:document.getElementById(k5),selector:t,options:e,route:{name:"WalletOptions"},modules:[],derivationPath:L5,emitter:n},En.selector.store.observable.subscribe(a=>{En&&(t.options.optimizeWalletOrder&&(a.modules.sort((y,T)=>y.metadata.deprecated===T.metadata.deprecated?0:y.metadata.deprecated?1:-1),a.modules.sort((y,T)=>T.metadata.available===y.metadata.available?0:T.metadata.available?1:-1)),En.modules=a.modules)});return window.addEventListener("keydown",a=>{if("Escape"===a.key){if(!En)return;En.container.children[0].classList.remove("open"),En.emitter.emit("onHide",{hideReason:"user-triggered"})}}),R5(),hE||(hE={show:()=>{if(!En)return;(t=>{_5=t})(En.selector.options.languageCode),R5();const a=En.selector.store.getState().selectedWalletId;if(a){O5(En.modules.find(T=>T.id===a))}else uE();En.container.children[0].classList.add("open")},hide:()=>{En&&En.container.children[0].classList.remove("open")},on:(a,y)=>En.emitter.on(a,y),off:(a,y)=>{En.emitter.off(a,y)}}),hE};var Ga=g(48214),F5=g.n(Ga);const aU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQ4AAAEOCAYAAAB4sfmlAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5gYXDA8FsK/ZnQAAAAFvck5UAc+id5oAACF9SURBVHja7d19gJRlvTfw7++a2ZnlVQFRJGBneU1gZ0EyszpHy15OnvJRj5rlU5aVnTJEAnZ3dkFHZXeWtwBJe/FkVk9lUumpTm9Hj1SPmSXCzgKGLOwMi4gKaLwsO2/X7/lDMvThZXeZmd/98vv8FbUx3/tm5rvXfc91XxdBKXVSNQ3pYaDCnYboF20t1b+RzuMEQekASjnWNRyITk5/ni3fSaARbOlZ6UhOocWh1HFEG1LvBXWugqUaOvrfEVGVdC6n0OJQ6hjRhalqFLAc4KsAesP/xrBaHEdpc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9HLlPp4krP/NycRRvxzZGDmTuMWF7x8Z49avSB6aUNM8WBwPBIk3/+o21NHfT0qpnpY9JKafwbHEQkAMQPo2/YBsKPC+5ZPzPpY9FKadxytMcxUf9m+LNwAEQ1eVD3dO1NJQ6Ps+OOMDcpy0EGLAG+E4+j8YtyyJ7pOMr5WSeLQ4GDhBwZi9//EnLdk5764S/SOdWyg08WxwE7Acw7hQ/9jwbqm9vrvqBbtasVO95tjgA2neih9wY6CGiFchWJtqXjzosnVQpt/FwcfCJdj37KeVofnJ5pFM6oVJu5dniIJg049jJndxOZOa0tUQel86mlNt5tjiYOQ0CGNhHTLclt0e+gbVUkM6llBd4tjgIpsPCftX2HL5988pp+6XzKOUl/w9vbeT/L2dfMwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wNi0yM1QxMjoxMzo0MiswMDowMIbbr3kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDYtMjNUMTI6MTM6NDIrMDA6MDD3hhfFAAAAAElFTkSuQmCC",uU=()=>fc(()=>!!window.near?.isSender).catch(()=>!1),lU=function(){var t=(0,ke.Z)(function*({options:e,metadata:n,store:r,provider:a,emitter:y,logger:T,id:Z}){const $={wallet:window.near},ue=function(){var je=(0,ke.Z)(function*(){if(!$.wallet.isSignedIn())return;(()=>{for(const je in $.wallet.callbacks)$.wallet.remove(je)})();const Ue=yield $.wallet.signOut();if(!0===Ue)return;const $e=new Error("string"==typeof Ue.error?Ue.error:Ue.error.type);if("User reject"===$e.message)throw $e;T.log("Failed to sign out"),T.error($e)});return function(){return je.apply(this,arguments)}}(),he=()=>{$.wallet.on("accountChanged",function(){var je=(0,ke.Z)(function*(Ue){T.log("onAccountChange",Ue),y.emit("signedOut",null)});return function(Ue){return je.apply(this,arguments)}}()),$.wallet.on("rpcChanged",function(){var je=(0,ke.Z)(function*(Ue){T.log("onNetworkChange",Ue),e.network.networkId!==Ue.networkId&&(yield ue(),y.emit("signedOut",null),y.emit("networkChanged",{networkId:Ue.networkId}))});return function(Ue){return je.apply(this,arguments)}}())},we=function(){var je=(0,ke.Z)(function*(){const{selectedWalletId:Ue}=r.getState();Ue===Z&&(yield fc(()=>!!$.wallet?.isSignedIn(),{timeout:1e3}).catch());const $e=$.wallet.getAccountId();if(!$e)return[];yield fc(()=>!!$.wallet.account(),{timeout:100});const Je=$.wallet.account();if(!Je.connection.signer.getPublicKey)return[{accountId:$e,publicKey:void 0}];const ht=yield Je.connection.signer.getPublicKey(Je.accountId,e.network.networkId);return[{accountId:$e,publicKey:ht?ht.toString():void 0}]});return function(){return je.apply(this,arguments)}}(),Ie=je=>{if(!(je=>je.every(Ue=>"FunctionCall"===Ue.type))(je))throw new Error(`Only 'FunctionCall' actions types are supported by ${n.name}`);return je.map($e=>$e.params)},Le=je=>je.map(Ue=>({receiverId:Ue.receiverId,actions:Ie(Ue.actions)}));return $.wallet&&$.wallet.isSignedIn()&&he(),{signIn:({contractId:je,methodNames:Ue})=>(0,ke.Z)(function*(){const $e=yield we();if($e.length)return $e;const{accessKey:Je,error:ht}=yield $.wallet.requestSignIn({contractId:je,methodNames:Ue});if(!Je||ht)throw yield ue(),new Error(("string"==typeof ht?ht:ht.type)||"Failed to sign in");return he(),yield we()})(),signOut:ue,getAccounts:()=>(0,ke.Z)(function*(){return we()})(),verifyOwner:({message:je})=>(0,ke.Z)(function*(){T.log("Sender:verifyOwner",{message:je});const Ue=$.wallet.account();if(!Ue)throw new Error("Wallet not signed in");if(!Ue.connection.signer.signMessage)throw new Error("Wallet is locked");const $e=e.network.networkId,Je=Ue.accountId,ht=yield Ue.connection.signer.getPublicKey(Je,$e),xt=yield a.block({finality:"final"}),Wt={accountId:Je,message:je,blockId:xt.header.hash,publicKey:Buffer.from(ht.data).toString("base64"),keyType:ht.keyType},An=JSON.stringify(Wt),rn=yield Ue.connection.signer.signMessage(new Uint8Array(Buffer.from(An)),Je,$e);return{...Wt,signature:Buffer.from(rn.signature).toString("base64"),keyType:rn.publicKey.keyType}})(),signMessage:je=>(0,ke.Z)(function*(){return $.wallet.signMessage(je).then(Ue=>{if(Ue.error)throw new Error(Ue.error);if(!Ue?.response)throw new Error("Invalid response");return Ue.response})})(),signAndSendTransaction:({signerId:je,receiverId:Ue,actions:$e})=>(0,ke.Z)(function*(){T.log("signAndSendTransaction",{signerId:je,receiverId:Ue,actions:$e});const{contract:Je}=r.getState();if(!$.wallet.isSignedIn()||!Je)throw new Error("Wallet not signed in");return $.wallet.signAndSendTransaction({receiverId:Ue||Je.contractId,actions:Ie($e)}).then(ht=>{if(ht.error)throw new Error(ht.error);if(ht.response&&"error"in ht.response)throw new Error(ht.response.error.message);if(!ht.response?.length)throw new Error("Invalid response");return ht.response[0]})})(),signAndSendTransactions:({transactions:je})=>(0,ke.Z)(function*(){if(T.log("signAndSendTransactions",{transactions:je}),!$.wallet.isSignedIn())throw new Error("Wallet not signed in");return $.wallet.requestSignTransactions({transactions:Le(je)}).then(Ue=>{if(Ue.error)throw new Error(Ue.error);if(Ue.response&&"error"in Ue.response)throw new Error(Ue.response.error.message);if(!Ue.response?.length)throw new Error("Invalid response");return Ue.response})})(),importAccountsInSecureContext:({accounts:je})=>(0,ke.Z)(function*(){window.near&&window.near.isSender&&(yield window.near.batchImport({keystore:je,network:e.network.networkId}))})()}});return function(n){return t.apply(this,arguments)}}();function B5({iconUrl:t=aU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){if((0,Ga.isMobile)())return null;const r=yield uU();return{id:"sender",type:"injected",metadata:{name:"Sender",description:"Browser extension wallet built on NEAR.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/sender-wallet/epapihdplajcdnnkdeiahlgigofloibg",deprecated:e,available:r},init:lU}})}const fU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAC8VBMVEUAAACS3/uZ5/rF4v7h/f9K6Pdi0vtTyvqnt/5T1PlH9fakpf/p//88/fXs//5G8vXy//5F8/Zj1vqvuv514PrI7v2J3/o6/PTE7/1A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0jbr2b3vT/AoDmjKzBV3Njfam4KSG0m1X72rMS6cdNTnaLoGwHY3axJhRq3gx5oWzZnb12vRrr3bUhvZR20WyeOHG0GHWMcxBzb5ZfD/fmdrRPmlydDLqzYaOlyNbIPuslcwW8c3J8lzmHVZ5CrWjXV2LJrmy5+rtoIXdImwRN7OzSbOaOpswp+KmxyqlO678lKLXJucjHbWiN4NWNWy/xq7s5i0sRQNm+72hqtuefG3MRvXT/AGzA7Wjw5VfbSdk0kmjxqyBbrJpZ0wyvuxnMc+a+uZf1Y6mbYZebmZSNGy7bWRqG7Y6t7g29pgf51k4Io5WtV8DQQ26Z/WaHg61thV1YNfeows16drCWxJHYzard7Wjd4EmLkfCXiN3YfSGBvcVIRu6FbWa2R5ezMZ+gc2SHz7mWRt2Ldqv7NlF1J4eY9tNOj8gLa3b2/TOc5vdwQ2r+YWmZTDBsq3HK6XZr77qfPRGdbzK7ve7YKM2tA1bxHqTHy3bQrmMlcVpviuV6yKai2SKRm1oZ2NWdYeiW3e2arBrH6fAG+BWQ7l0t6o86eiqWwOZ2W+Yo8ZMasYb1J6RFy1iL5pfKd3NHoKdol3NswmgpQ6KaDJzxl4ki+Tt0XtKdznYoCneOurnjlc1Okxan7eBHc2o21k8gwVZXia++2RnO9pv43ZjpvjADWrY/hRZfFQPd0jI8+862dl1UQ16h6kdjVrNZOb9bkZdFWf536xc9+SNo+bpFTWjpvCYIfE0p6x2czv7sfv/RbKPG7Tf5+8WtLCzxwxhA0ettbOtMORy6T+p/FBdLVrMR33SvPTh2aiWp5O/lebP+2/EPu+nFd1t+ROdiDEfYEU1aHp07j3l0n9fBbijpYim6ifCAc/7P4BdPm/u06DNjDqSQWsL5s77X0w4rVJ5aN7cuU8/vWABo+Y59gULFsyfi3aWuf8ADHnSl6eWnZwAAAAASUVORK5CYII=",dU=()=>fc(()=>!!window.bitkeep.near).catch(()=>!1),pU=function(){var t=(0,ke.Z)(function*({options:e,store:n,provider:r,emitter:a,logger:y}){const T={wallet:window.bitkeep.near},$=function(){var we=(0,ke.Z)(function*(){if(!T.wallet.isSignedIn())return;(()=>{for(const we in T.wallet.callbacks)T.wallet.remove(we)})();const xe=yield T.wallet.signOut();if(!0===xe)return;const Ie=new Error("string"==typeof xe.error?xe.error:xe.error.type);if("User reject"===Ie.message)throw Ie;y.log("Failed to sign out"),y.error(Ie)});return function(){return we.apply(this,arguments)}}(),ie=()=>{T.wallet.on("accountChanged",function(){var we=(0,ke.Z)(function*(xe){y.log("onAccountChange",xe),a.emit("signedOut",null)});return function(xe){return we.apply(this,arguments)}}()),T.wallet.on("rpcChanged",function(){var we=(0,ke.Z)(function*(xe){y.log("onNetworkChange",xe),e.network.networkId!==xe.networkId&&(yield $(),a.emit("signedOut",null),a.emit("networkChanged",{networkId:xe.networkId}))});return function(xe){return we.apply(this,arguments)}}())},ue=function(){var we=(0,ke.Z)(function*(){const xe=T.wallet.getAccountId()||"";if(!xe)return[];const Ie=yield T.wallet.getPublicKey();return[{accountId:xe,publicKey:Ie?Ie.toString():void 0}]});return function(){return we.apply(this,arguments)}}(),he=we=>we.map(xe=>({receiverId:xe.receiverId,actions:xe.actions}));return T.wallet&&T.wallet.isSignedIn()&&ie(),{signIn:({contractId:we,methodNames:xe})=>(0,ke.Z)(function*(){const Ie=yield ue();if(Ie.length)return Ie;const{accessKey:Le,error:je}=yield T.wallet.requestSignIn({contractId:we,methodNames:xe});if(!Le||je)throw yield $(),new Error(("string"==typeof je?je:je.type)||"Failed to sign in");return ie(),yield ue()})(),signOut:$,getAccounts:()=>(0,ke.Z)(function*(){return ue()})(),verifyOwner:({message:we})=>(0,ke.Z)(function*(){y.log("Bitget-wallet:verifyOwner",{message:we});const xe=e.network.networkId,Ie=yield T.wallet.getAccountId(),Le=yield T.wallet.getPublicKey(),je=yield r.block({finality:"final"}),Ue={accountId:Ie,message:we,blockId:je.header.hash,publicKey:Le,keyType:"0"},$e=JSON.stringify(Ue),Je=yield T.wallet.verifyOwner($e,Ie,xe);return{...Ue,signature:Je.signature,keyType:Je.keyType}})(),signAndSendTransaction:({signerId:we,receiverId:xe,actions:Ie})=>(0,ke.Z)(function*(){y.log("signAndSendTransaction",{signerId:we,receiverId:xe,actions:Ie});const{contract:Le}=n.getState();if(!T.wallet.isSignedIn()||!Le)throw new Error("Wallet not signed in");return T.wallet.signAndSendTransaction({receiverId:xe||Le.contractId,actions:Ie}).then(je=>{if(je.error)throw new Error(je.error);if(je.response&&"error"in je.response)throw new Error(je.response.error.message);if(!je.response?.length)throw new Error("Invalid response");return je.response[0]})})(),signAndSendTransactions:({transactions:we})=>(0,ke.Z)(function*(){if(y.log("signAndSendTransactions",{transactions:we}),!T.wallet.isSignedIn())throw new Error("Wallet not signed in");return T.wallet.requestSignTransactions({transactions:he(we)}).then(xe=>{if(xe.error)throw new Error(xe.error);if(xe.response&&"error"in xe.response)throw new Error(xe.response.error.message);if(!xe.response?.length)throw new Error("Invalid response");return xe.response})})()}});return function(n){return t.apply(this,arguments)}}();function j5({iconUrl:t=fU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){if((0,Ga.isMobile)())return null;const r=yield dU();return r&&(yield fc(()=>!!window.bitkeep?.near?.isSignedIn()).catch(()=>!1)),{id:"bitget-wallet",type:"injected",metadata:{name:"Bitget Wallet",description:"Browser extension wallet built on NEAR.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/bitkeep-crypto-nft-wallet/jiidiaalihmmhddjgbnbgdfflelocpak",deprecated:e,available:r},init:pU}})}const gU="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iYXV0byIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMTQuMjYyNyAxMy40MDEzQzEyLjQyMjcgMTQuNTMwNyA5Ljk1OTg3IDE1LjExMjQgNy40NjU1OCAxNC45ODgxQzUuMzY4NDQgMTQuODg2NSAzLjY0ODQ0I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DQ4NSAxOC41MzQ0QzEyLjk1MTMgMjAuNzY0OSA4LjUwMjc1IDIxLjA1MjkgNS4zODg0NyAyMC44OTc2TDUuMzIyNzUgMjIuMTk5M0M1Ljg0NTYxIDIyLjIyNDcgNi4zNDg0NyAyMi4yMzYgNi44MzcwNCAyMi4yMzZDMTUuNjE5OSAyMi4yMzYgMTkuMTY4NSAxOC4yODMxIDIwLjE1OTkgMTYuODcxM0wxOS4wMTcgMTYuMjA3OCIgZmlsbD0iIzIwNDFFMCI+PC9wYXRoPjxwYXRoIGQ9Ik0xOC42ODU2IDExLjI5MjNDMTkuMjY3OSAxMS4yOTIzIDE5LjczOTkgMTAuODI1OCAxOS43Mzk5IDEwLjI1MDRDMTkuNzM5OSA5LjY3NDk2IDE5LjI2NzkgOS4yMDg1IDE4LjY4NTYgOS4yMDg1QzE4LjEwMzQgOS4yMDg1IDE3LjYzMTMgOS42NzQ5NiAxNy42MzEzIDEwLjI1MDRDMTcuNjMxMyAxMC44MjU4IDE4LjEwMzQgMTEuMjkyMyAxOC42ODU2IDExLjI5MjNaIiBmaWxsPSIjMjA0MUUwIj48L3BhdGg+Cjwvc3ZnPgo=",yU=function(){var t=(0,ke.Z)(function*(e,n){const{selectedWalletId:r}=e.getState(),a=window.xfi.near;return"xdefi"===r&&(yield a.connect(n.networkId).catch(()=>null)),{wallet:a,network:n}});return function(n,r){return t.apply(this,arguments)}}(),mU=()=>fc(()=>!!window.xfi?.near).catch(()=>!1),vU=function(){var t=(0,ke.Z)(function*({metadata:e,store:n,logger:r,options:a}){const y=yield yU(n,a.network),T=()=>y.wallet.accounts?y.wallet.accounts:[],Z=$=>{const ie=T(),{contract:ue}=n.getState();if(!ie.length||!ue)throw new Error("Wallet not signed in");return $.map(he=>({signerId:he.signerId||ie[0].accountId,receiverId:he.receiverId||ue.contractId,actions:he.actions}))};return{signIn:()=>(0,ke.Z)(function*(){const $=T().map(ie=>({accountId:ie.accountId,publicKey:ie.publicKey.toString()}));return $.length?$:(yield y.wallet.connect(y.network.networkId),T().map(ie=>({accountId:ie.accountId,publicKey:ie.publicKey.toString()})))})(),signOut:()=>(0,ke.Z)(function*(){yield y.wallet.disconnect()})(),getAccounts:()=>(0,ke.Z)(function*(){return T().map($=>({accountId:$.accountId,publicKey:$.publicKey.toString()}))})(),verifyOwner:({message:$})=>(0,ke.Z)(function*(){throw r.log("XDEFI:verifyOwner",{message:$}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:$=>(0,ke.Z)(function*(){r.log("signAndSendTransaction",$);const{contract:ie}=n.getState();if(!T().length||!ie)throw new Error("Wallet not signed in");return yield y.wallet.signAndSendTransaction(Z([$])[0])})(),signAndSendTransactions:({transactions:$})=>(0,ke.Z)(function*(){return r.log("signAndSendTransactions",{transactions:$}),yield y.wallet.signAndSendTransactions(Z($))})()}});return function(n){return t.apply(this,arguments)}}();function U5({iconUrl:t=gU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){if((0,Ga.isMobile)())return null;const r=yield mU();return{id:"xdefi",type:"injected",metadata:{name:"XDEFI Wallet",description:"One wallet for all your Crypto",iconUrl:t,downloadUrl:"https://www.xdefi.io",deprecated:e,available:r},init:vU}})}var ts=g(32184);const EU=function(){var t=(0,ke.Z)(function*({metadata:e,options:n,store:r,provider:a,logger:y}){const T={wallet:window.nearWalletApi},Z=function(){var ie=(0,ke.Z)(function*(){const ue=T.wallet.signer.account;return ue?[{accountId:ue.accountId,publicKey:ue.publicKey}]:[]});return function(){return ie.apply(this,arguments)}}(),$=ie=>{const{contract:ue}=r.getState();if(!ue)throw new Error("Wallet not signed in");const he=Mf(r.getState());if(!he)throw new Error("No active account");return ie.map(we=>({signerId:we.signerId||he.accountId,receiverId:we.receiverId||ue.contractId,actions:we.actions}))};return{signIn:({contractId:ie})=>(0,ke.Z)(function*(){const ue=yield Z();return ue.length?ue:(yield T.wallet.login({contractId:ie}),Z())})(),signOut:()=>(0,ke.Z)(function*(){yield T.wallet.logout()})(),getAccounts:()=>(0,ke.Z)(function*(){return Z()})(),verifyOwner:({message:ie})=>(0,ke.Z)(function*(){y.log("MathWallet:verifyOwner",{message:ie});const ue=Mf(r.getState());if(!ue)throw new Error("No active account");const he=ue.accountId,we=yield T.wallet.signer.getPublicKey(he),xe=yield a.block({finality:"final"}),Ie={accountId:he,message:ie,blockId:xe.header.hash,publicKey:Buffer.from(we.data).toString("base64"),keyType:we.keyType};JSON.stringify(Ie);throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:ie,receiverId:ue,actions:he})=>(0,ke.Z)(function*(){y.log("signAndSendTransaction",{signerId:ie,receiverId:ue,actions:he});const we=yield(0,ts.signTransactions)($([{signerId:ie,receiverId:ue,actions:he}]),T.wallet.signer,n.network);return a.sendTransaction(we[0])})(),signAndSendTransactions:({transactions:ie})=>(0,ke.Z)(function*(){y.log("signAndSendTransactions",{transactions:ie});const ue=yield(0,ts.signTransactions)($(ie),T.wallet.signer,n.network);y.log("signAndSendTransactions:signedTransactions",ue);const he=[];for(let we=0;we(0,ke.Z)(function*(){if((0,Ga.isMobile)())return null;const r=yield!!window.nearWalletApi;return{id:"math-wallet",type:"injected",metadata:{name:"Math Wallet",description:"World's First Insured Crypto Wallet.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/math-wallet/afbcbjpbpfadlkmhmclhkeeodmamcflc",deprecated:e,available:r},init:EU}}),SU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAACklpQ0NQc1JHQiBJRUM2MTk2Ni0yLjEAAEiJnVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMgu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vNUfSetDtsLjci/K5kIwoFjy718funzROLRULAZQskR2u6HDF63LmU2rizr0qx4DPdeYuVghUrTRYt8TJkiGBoTmxbw9pENXqX9w/tLDQSh5CYygVeJElTRCl1d3/okKJsjOCqz7uYf77E7dba/s8f91Ffr/PxC6EjctNS4ZYbXVzetVHFm29bPLfC5MOdFoUFgoz0pL78dWgr33G7C3ZKAPwsA25wsoJwCKF/6o4pmltgwjjJeedKLphncOiwxaYPFA2NXSlmMvUuZuPKJGvfMfn7WxY7dlp4PITNB5BAXgMWOFW40wIA2mCUtFXEE9lDGhSNTXqL1ymTtbexzwQUuNxw5IhiyzYdvJqRrnWJUPkAEszdxGjhi5RECADosesZ9E7lSUMIPZdva4eOdnUiaFApvbKYliZwG0lV8vwcB76CztngKInai/UdYDLwBHBjguoMwr9PX2aG9tYNeU6C2xSClcCtJMgDK5GO9u3A14DPAocTWO9goQX9cXyeBLrfJSPS4hXgNOAPSah7oLIS3UMuS3TFyQq1aQAWAtPREUgfVzYB89BffVIW1ZIda7UZbda8FtiV3KYklIPAN7HZqhcLyRYAP8uBicDVwIYkt8VJPkJPi8cBS5PcFmDgCICf59Ari9eS5C/DZjajHWonoT2pkhjNEEiipoHRsrzrZz5wCTrIoSCpLYqeRuBP6Lm84/P5WEmUIShe0tHrCtegzaIDVXABVqOF90WS7CMRCQP5Qfakle5eoRi4GPgEMAs4PYntAq28bkSnX38NHZE7aBgsPUBfTEGbms9BTysnAx6H6jLRitz76Be+ruv3Qctg6QH6YlvXz2+6/i5AzygmAROAUqAQyAKygRQgDeidBM6H9q/rQDteNKEtclVAOdoDZwd6CnfS8P9uV4QPHOBjVAAAAABJRU5ErkJggg==",_U=function(){var t=(0,ke.Z)(function*(e,n){const{selectedWalletId:r}=e.getState(),a=window.nightly.near;return"nightly"===r&&(yield a.connect(y=>{y?n.emit("accountsChanged",{accounts:[{accountId:y.accountId,publicKey:a.account.publicKey.toString()}]}):n.emit("signedOut",null)},!0).catch(()=>null)),{wallet:a}});return function(n,r){return t.apply(this,arguments)}}(),MU=()=>fc(()=>!!window.nightly?.near).catch(()=>!1),DU=function(){var t=(0,ke.Z)(function*({metadata:e,options:n,store:r,logger:a,provider:y,emitter:T}){const Z=yield _U(r,T),$=()=>{const{accountId:he,publicKey:we}=Z.wallet.account;return he?[{accountId:he,publicKey:we.toString()}]:[]},ie=he=>{const we=$(),{contract:xe}=r.getState();if(!we.length||!xe)throw new Error("Wallet not signed in");return he.map(Ie=>({signerId:Ie.signerId||we[0].accountId,receiverId:Ie.receiverId||xe.contractId,actions:Ie.actions}))},ue={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(he=(0,ke.Z)(function*(we){const Ie=$().find(Le=>Le.accountId===we);if(!Ie)throw new Error("Failed to find public key for account");return lr.utils.PublicKey.from(Ie.publicKey)}),function(xe){return he.apply(this,arguments)}),signMessage:function(){var he=(0,ke.Z)(function*(we,xe){if(!$().find(je=>je.accountId===xe))throw new Error("Failed to find account for signing");try{const je=lr.transactions.Transaction.decode(Buffer.from(we));return{signature:(yield Z.wallet.signTransaction(je)).signature.data,publicKey:je.publicKey}}catch(je){throw a.log("Failed to sign message"),a.error(je),Error("Invalid message. Only transactions can be signed")}});return function(xe,Ie){return he.apply(this,arguments)}}()};var he;return{signIn:()=>(0,ke.Z)(function*(){const he=$();return he.length?he:(yield Z.wallet.connect(we=>{we?T.emit("accountsChanged",{accounts:[{accountId:we.accountId,publicKey:Z.wallet.account.publicKey.toString()}]}):T.emit("signedOut",null)}),$())})(),signOut:()=>(0,ke.Z)(function*(){yield Z.wallet.disconnect()})(),getAccounts:()=>(0,ke.Z)(function*(){return $()})(),verifyOwner:({message:he})=>(0,ke.Z)(function*(){throw a.log("Nightly:verifyOwner",{message:he}),new Error(`Method not supported by ${e.name}`)})(),signMessage:({message:he,nonce:we,recipient:xe,state:Ie})=>(0,ke.Z)(function*(){return a.log("Nightly:signMessage",{message:he,nonce:we,recipient:xe,state:Ie}),Z.wallet.isConnected||(yield Z.wallet.connect()),yield Z.wallet.signMessage({message:he,nonce:we,recipient:xe,state:Ie})})(),signAndSendTransaction:({signerId:he,receiverId:we,actions:xe})=>(0,ke.Z)(function*(){a.log("signAndSendTransaction",{signerId:he,receiverId:we,actions:xe});const{contract:Ie}=r.getState();if(!$().length||!Ie)throw new Error("Wallet not signed in");const[je]=yield(0,ts.signTransactions)(ie([{signerId:he,receiverId:we,actions:xe}]),ue,n.network);return y.sendTransaction(je)})(),signAndSendTransactions:({transactions:he})=>(0,ke.Z)(function*(){a.log("signAndSendTransactions",{transactions:he});const we=yield(0,ts.signTransactions)(ie(he),ue,n.network),xe=[];for(let Ie=0;Ie(0,ke.Z)(function*(){Z.wallet.importWalletsNear(he.accounts)})()}});return function(n){return t.apply(this,arguments)}}();function z5({iconUrl:t=SU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){if((0,Ga.isMobile)())return null;const r=yield MU();return{id:"nightly",type:"injected",metadata:{name:"Nightly",description:"Multichain crypto wallet.",iconUrl:t,downloadUrl:"https://wallet.nightly.app/download",deprecated:e,available:r},init:DU}})}var pE=g(96831);const CU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZsAAAGbCAMAAAAlRs3KAAAC/VBMVEUAAAB1gdddWs6cq+JsadRdXalLTJhFRXtTU415iNhOTo5+pe41NXxjYM8qKmscHGuRn+MSGZl0ovJ3eL6EqPEXF19QUcFdnfNlctZZmvNvc9prbdaMsPA1NoYkJHFdXdFSg+08ReFMO9VVTdg3k/Vdk/BHSL1bXac+mPVDlvQcIqFKcupJlfQvL3lRculLS404ivJLRNw9P7dHkPIoKHQ/lPQpLapPm/RGRohmlvF0oPCBg7pFPt4UFFBOQ9AkKag0OK9Ie+04PLJYT9ZeYLtJRsc4OH9LXOE/TuIrL64kJG9dZ+EVHJxDZudFgu5AXuZHk/NHjfE9PMA2OLVQfOtLd+tQjfBrbLZ7fbFGdOs8d+1Dj/JCK9hPT49Jk/JqnvJaVc4jI3EXHptRTclVUcxOS8dUQdhNQ91SO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T8PE6GapnJDwDBGZbRyXKjnOWoXzRFYOn6mtRkvPveaSuzPJmHgwMZsQ7B3Q6VNwKTS4ZTnfMgtKzuejaKn5202eY6y32n+h4XjNIsNQWMhNu1sgFnK2/TynHfDchoLZxUfnI9Hr1fzn3xUTnQPEzUay7E049pJVx2601qjEbeDZhgD7XwiuSH41rh8DmJO344d0rTmf0PwLbsYgzXAZBLpap7WtJbNXs6wvUwbeO0UHIdKnvMKzVwUMwP0esHZJpHnZJfiPQEch2auOc7Mf2E3u1CO7dQ8Di1Z23acGf7CbnZp8cIcCMdjpQvXnN3JeU4Ybe390rI0swmtrfLg2m7ki8/s+0VpZlNgpGo4tkX1gge6Oeyuls/LZDb1UF26tu1E0da63e5S8ZIiF8+jwkpX7ne2tsL9hd3u4cqyKce/r+ZWubXb2QhpWusebi4Wk1IxvjEy6dLNrQ4WUIAbgo+b3c3u6u0LspcJoHzSdzc6G52dnQDynM3Nj4eHK8VyUrwExFzCrKztbnX20Y3PPAfNPD84eP56sVg3ZFoOGiOTeli6vbOxs7//4oS7tTcHb96+WV0tXsgYIISFZqXK6dLdmy/2nz7dwY8xZ87rt73eW/w4WFm5d6VcTso8FglzifNmvVKsoCMsnWc/h+j1egc99PPyzp3bxeJy3UqcFy3RoxtGBqlfR6544N/1DHLR0OXAnykaYljJZNI0zVQqhZ/4tzWnaeJFEARBEARBEARBEARBEARBEARBEASBMr8ADJvUZ0bGgJQAAAAASUVORK5CYII=",IU=function(){var t=(0,ke.Z)(function*(e,n){const r=new lr.keyStores.BrowserLocalStorageKeyStore(window.localStorage,"_meteor_wallet"),a=yield lr.connect({keyStore:r,...n,headers:{}});return{wallet:new pE.MeteorWallet({near:a,appKeyPrefix:"near_app"}),keyStore:r}});return function(n,r){return t.apply(this,arguments)}}(),xU=function(){var t=(0,ke.Z)(function*({options:e,logger:n,store:r,params:a}){const y=yield IU(a,e.network),T=function(){var Z=(0,ke.Z)(function*(){const $=y.wallet.getAccountId(),ie=y.wallet.account();if(!$||!ie)return[];const ue=yield ie.connection.signer.getPublicKey(ie.accountId,e.network.networkId);return[{accountId:$,publicKey:ue?ue.toString():""}]});return function(){return Z.apply(this,arguments)}}();return{signIn:({contractId:Z,methodNames:$=[]})=>(0,ke.Z)(function*(){n.log("MeteorWallet:signIn",{contractId:Z,methodNames:$}),$.length?yield y.wallet.requestSignIn({methods:$,type:pE.EMeteorWalletSignInType.SELECTED_METHODS,contract_id:Z}):yield y.wallet.requestSignIn({type:pE.EMeteorWalletSignInType.ALL_METHODS,contract_id:Z});const ie=yield T();return n.log("MeteorWallet:signIn",{contractId:Z,methodNames:$,account:ie[0]}),ie})(),signOut:()=>(0,ke.Z)(function*(){y.wallet.isSignedIn()&&(yield y.wallet.signOut())})(),isSignedIn:()=>(0,ke.Z)(function*(){return!!y.wallet&&y.wallet.isSignedIn()})(),getAccounts:()=>(0,ke.Z)(function*(){return T()})(),verifyOwner:({message:Z})=>(0,ke.Z)(function*(){n.log("MeteorWallet:verifyOwner",{message:Z});const $=yield y.wallet.verifyOwner({message:Z});if($.success)return $.payload;throw new Error(`Couldn't verify owner: ${$.message}`)})(),signMessage:({message:Z,nonce:$,recipient:ie,state:ue})=>(0,ke.Z)(function*(){n.log("MeteorWallet:signMessage",{message:Z,nonce:$,recipient:ie,state:ue});const he=y.wallet.getAccountId(),we=yield y.wallet.signMessage({message:Z,nonce:$,recipient:ie,accountId:he,state:ue});if(we.success)return we.payload;throw new Error(`Couldn't sign message owner: ${we.message}`)})(),signAndSendTransaction:({signerId:Z,receiverId:$,actions:ie})=>(0,ke.Z)(function*(){n.log("MeteorWallet:signAndSendTransaction",{signerId:Z,receiverId:$,actions:ie});const{contract:ue}=r.getState();if(!y.wallet.isSignedIn())throw new Error("Wallet not signed in");if(!$&&!ue)throw new Error("No receiver found to send the transaction to");return y.wallet.account().signAndSendTransaction_direct({receiverId:$??ue.contractId,actions:ie})})(),signAndSendTransactions:({transactions:Z})=>(0,ke.Z)(function*(){if(n.log("MeteorWallet:signAndSendTransactions",{transactions:Z}),!y.wallet.isSignedIn())throw new Error("Wallet not signed in");return y.wallet.requestSignTransactions({transactions:Z})})(),buildImportAccountsUrl:()=>`https://wallet.meteorwallet.app/batch-import?network=${y.wallet._networkId}`}});return function(n){return t.apply(this,arguments)}}();function V5({iconUrl:t=CU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){return{id:"meteor-wallet",type:"injected",metadata:{available:!0,name:"Meteor Wallet",description:"Securely store and stake your NEAR tokens and compatible assets with Meteor.",iconUrl:t,deprecated:e,downloadUrl:"https://wallet.meteorwallet.app",useUrlAccountImport:!0},init:n=>xU({...n,params:{iconUrl:t}})}})}const gp_SIGN_IN="sign-in",gp_IS_SIGNED_IN="is-signed-in",gp_GET_ACCOUNT_ID="get-account-id",gp_SIGN_AND_SEND_TRANSACTION="sign-and-send-transaction",gp_SIGN_AND_SEND_TRANSACTIONS="sign-and-send-transactions";let gE=0;const rb=[],yp=(t,e=!1,n)=>new Promise((a,y)=>{let T;gE++,e&&(T=setTimeout(()=>y(Error("timeout")),2e3)),rb.push({id_wallet_selector:gE,code:t,resolve:a,reject:y,timeout:T}),window.postMessage({id:gE,src:"ws",type:"nw",code:t,dest:"ext",params:n})}),OU=function(){var t=(0,ke.Z)(function*(){return fc(()=>!!window.narwallets).catch(()=>!1)});return function(){return t.apply(this,arguments)}}(),H5=()=>yp(gp_IS_SIGNED_IN,!0),FU=()=>{window.addEventListener("message",t=>{if(t.source!==window)return;const{data:e}=t;if(e&&"page"===e.dest&&e.id&&"nw"===e.type){const n=(t=>rb.filter(e=>e.id_wallet_selector===t)[0])(e.id);n&&((t=>{const e=rb.indexOf(t);e>-1&&rb.splice(e,1)})(n),n.timeout&&clearTimeout(n.timeout),e.result?e.result.err?n.reject(e.result.err):n.resolve(e.result.data):n.reject("result is empty"))}})},BU=function(){var t=(0,ke.Z)(function*({metadata:e,store:n,logger:r}){return{signIn:()=>(0,ke.Z)(function*(){let T;return T=(yield H5())?gp_GET_ACCOUNT_ID:gp_SIGN_IN,[{accountId:yield yp(T)}]})(),signOut:function(){var y=(0,ke.Z)(function*(){if(!(yield H5()))return;const T=yield yp("sign-out");if(!0===T)return;const Z=T,$=new Error("string"==typeof Z.error?Z.error:Z.error.type);if("User reject"===$.message)throw $;r.log("Failed to sign out"),r.error($)});return function(){return y.apply(this,arguments)}}(),getAccounts:()=>(0,ke.Z)(function*(){return[{accountId:yield yp(gp_GET_ACCOUNT_ID,!1)}]})(),verifyOwner:({message:y})=>(0,ke.Z)(function*(){throw r.log("Narwallets:verifyOwner",{message:y}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:y,receiverId:T,actions:Z})=>(0,ke.Z)(function*(){r.log("signAndSendTransaction",{signerId:y,receiverId:T,actions:Z});const{contract:$,accounts:ie}=n.getState();if(!ie||0===ie.length||!$)throw new Error("Wallet not signed in");return(t=>yp(gp_SIGN_AND_SEND_TRANSACTION,!1,t))({signerId:y,receiverId:T||$.contractId,actions:Z})})(),signAndSendTransactions:({transactions:y})=>(0,ke.Z)(function*(){r.log("signAndSendTransactions",{transactions:y});const{contract:T,accounts:Z}=n.getState();if(!Z||0===Z.length||!T)throw new Error("Wallet not signed in");return(t=>yp(gp_SIGN_AND_SEND_TRANSACTIONS,!1,t))(y)})()}});return function(n){return t.apply(this,arguments)}}(),W5=({iconUrl:t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAXFAAAFxQFJPlfkAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgY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Wf84O8gngMa32CMP40Qc5B8aQkPPVxRByluhJkctHatqYVd7QliCNAPqFFBh5oKcjFC+TFBtUVfD6v+pgTA5UGXrK5I2QshegGtr/OQ9iLECqS+Ilmruq6k4FQlAK4ijY5eV68KpjCQYTi2jdvi6ircK6N0HAGbrUAciPXlkZVTCYByNyI3NAF5B0I2BdHEaT/UBQKdf/xwFMiqWhiMATuQg2MPPwXkGRBJII6CfhSp7CuvLJyKRP8/AIZkfQXsT/DhAAAAAElFTkSuQmCC",deprecated:e=!1}={})=>(0,ke.Z)(function*(){if((0,Ga.isMobile)())return null;FU();const r=yield OU();return{id:"narwallets",type:"injected",metadata:{name:"Narwallets",description:null,iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/narwallets-v4/lkpeokpdkmcdaiadpmnnpimlgmdobkdj",deprecated:e,available:r},init:BU}}),jU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAETCAYAAAAVqeK4AAAAAXNSR0IArs4c6QAAAJZlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgExAAIAAAARAAAAWodpAAQAAAABAAAAbAAAAAAAAAEsAAAAAQAAASwAAAABd3d3Lmlua3NjYXBlLm9yZwAAAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAROgAwAEAAAAAQAAARMAAAAAwzPlUAAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAi9pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuY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iu9PTu7cs3li7dtt6b+39EoHajjR14QXjK+tbz64bOPZTjUOnT2sYPMmWwZh1EsD5Yq/ujCQ7PxGT/vv6TcmyTOwRsdhP6G2d7d7GN3/1Rvu7Gx7s2rLx5qfu//yT/bvoXo7nHvvbDRLV5bvMm7Lo0nm1TeNW1Q+asKR59NxRBv5b9Kz4eqHYT8UymRCT4rr9Ccm2SmxNcdmD5drW2bbl3Vd+8Vb7xlfXbe388Oqn77vEqFXHg0UTT+7nH/26Xh2qecP2P7q+ZcTCcxpapq1sGDRhfDwtFl2rLlp0jdi3xXSwlQSBogjoCaN3QHoas2aLQmd0Jh1s79mnxWzruMhXxZqMjgznjCVQKZ7pZWzPkw0xMba7inYsiJi0S606ZWBY0bWTEQI+BAbLfh0EzQsKYuIDyqLdxYiJDsbfLDbSorgSddXae2+JUurd2Lvy9USxtt67+eYogY0Slz7ZO05Mx82cmwYvMZFSJqArYukaKFyZpNwRETRf6Mpkg9S7WmxgBPVTBQT6JaADcIhJv5iMz5AXE/3joGNiOhWAO53Gd5tbDpZLOH/sVkiZjOYKiVpnq07LZPQEDQEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAgQQJ/D/LxtSxjmI1fwAAAABJRU5ErkJggg==",yE="account",UU=()=>fc(()=>!!window.dapp).catch(()=>!1);function mE(){return mE=(0,ke.Z)(function*(t){const e=yield t.getItem(yE);return window.dapp?{wallet:window.dapp,account:e||void 0}:{}}),mE.apply(this,arguments)}const zU=function(){var t=(0,ke.Z)(function*({options:e,store:n,emitter:r,logger:a,storage:y,provider:T}){const Z=yield function KU(t){return mE.apply(this,arguments)}(y),$=function(){var je=(0,ke.Z)(function*(){if(Z.wallet){const Ue=yield Z.wallet.request("near",{method:"dapp:accounts"});return Ue.near?[Ue.near.address,Ue.near.pubKey]:[]}return[]});return function(){return je.apply(this,arguments)}}(),ie=function(){var je=(0,ke.Z)(function*({accountId:Ue,publicKey:$e}){if(a.log("validateAccessKey",{accountId:Ue,publicKey:$e}),!Z.wallet)throw new Error("Wallet is not installed");const Je=yield Z.wallet.request("near",{method:"query",params:{request_type:"view_access_key",finality:"final",account_id:Ue,public_key:$e}});if(a.log("validateAccessKey:accessKey",{accessKey:Je}),"FullAccess"!==Je.permission)throw new Error("Public key requires 'FullAccess' permission");return Je});return function($e){return je.apply(this,arguments)}}(),he=()=>Z.account?[{accountId:Z.account.accountId,publicKey:Z.account.publicKey}]:[],we=function(){var je=(0,ke.Z)(function*(){Z.account&&(y.removeItem(yE),delete Z.account),r.emit("signedOut",null)});return function(){return je.apply(this,arguments)}}(),xe=()=>{Z.wallet&&(Z.wallet.on("dapp:accountsChanged",function(){var je=(0,ke.Z)(function*(Ue){a.log("onAccountChange",Ue),yield we()});return function(Ue){return je.apply(this,arguments)}}()),Z.wallet.on("dapp:chainChanged",function(){var je=(0,ke.Z)(function*(Ue){a.log("onNetworkChange",Ue);const $e="near"===Ue.split(":")[1]?"mainnet":"testnet";e.network.networkId!==$e&&(yield we(),r.emit("networkChanged",{networkId:$e}))});return function(Ue){return je.apply(this,arguments)}}()))},Ie={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(je=(0,ke.Z)(function*(Ue){const Je=he().find(ht=>ht.accountId===Ue);if(!Je)throw new Error("Failed to find public key for account");return lr.utils.PublicKey.from(Je.publicKey)}),function($e){return je.apply(this,arguments)}),signMessage:function(){var je=(0,ke.Z)(function*(Ue,$e){if(!Z.wallet)throw new Error("Wallet is not installed");if(!he().find(xt=>xt.accountId===$e))throw new Error("Failed to find account for signing");try{const xt=lr.transactions.Transaction.decode(Buffer.from(Ue)),Wt=Buffer.from(xt.encode()).toString("hex"),An=yield Z.wallet.request("near",{method:"dapp:signTransaction",params:["0x"+Wt]});return{signature:Buffer.from(An[0].signature.substr(2),"hex"),publicKey:lr.utils.PublicKey.from(An[0].publicKey)}}catch{const Wt=yield Z.wallet.request("near",{method:"dapp:signMessage",params:["0x"+Buffer.from(Ue).toString("hex")]});return{signature:Buffer.from(Wt[0].signature.substr(2),"hex"),publicKey:lr.utils.PublicKey.from(Wt[0].publicKey)}}});return function($e,Je){return je.apply(this,arguments)}}()},Le=je=>{const Ue=he(),{contract:$e}=n.getState();if(!Ue.length||!$e)throw new Error("Wallet not signed in");return je.map(Je=>({signerId:Je.signerId||Ue[0].accountId,receiverId:Je.receiverId||$e.contractId,actions:Je.actions}))};var je;return{signIn:()=>(0,ke.Z)(function*(){const je=he();if(je.length)return je;Z.account&&(yield we());const Ue=yield $();if(!(yield ie({accountId:Ue[0],publicKey:Ue[1]})))throw we(),new Error(`Public key (${Ue[1]}) is not registered with the account '${Ue[0]}'.`);return yield y.setItem(yE,{accountId:Ue[0],publicKey:Ue[1]}),Z.account={accountId:Ue[0],publicKey:Ue[1]},xe(),he()})(),getAccounts:()=>(0,ke.Z)(function*(){return he()})(),signOut:we,verifyOwner:({message:je})=>(0,ke.Z)(function*(){if(a.log("verifyOwner",{message:je}),!Z.wallet)throw new Error("Wallet is not installed");const Ue=Z.account;if(!Ue)throw new Error("Wallet not signed in");const $e=Ue.accountId,Je=lr.utils.PublicKey.fromString(Ue.publicKey),ht=yield T.block({finality:"final"}),xt={accountId:$e,message:je,blockId:ht.header.hash,publicKey:Buffer.from(Je.data).toString("base64"),keyType:Je.keyType},Wt=JSON.stringify(xt),An=yield Ie.signMessage(new Uint8Array(Buffer.from(Wt)),$e);return{...xt,signature:Buffer.from(An.signature).toString("base64")}})(),signMessage:je=>(0,ke.Z)(function*(){if(!Z.wallet)throw new Error("Wallet is not installed");const $e=(yield $())[0];if(!$e)throw new Error("Failed to find account for signing");const Je=(t=>{const e=new qA({...t});return Buffer.from((0,A5.serialize)(E5,e))})(je),ht=yield Z.wallet.request("near",{method:"dapp:signMessage",params:["0x"+Je.toString("hex")]}),xt={accountId:$e,publicKey:ht[0].publicKey,signature:Buffer.from(ht[0].signature.substr(2),"hex").toString("base64")};return je.state?{...xt,state:je.state}:xt})(),signAndSendTransaction:({signerId:je,receiverId:Ue,actions:$e})=>(0,ke.Z)(function*(){a.log("signAndSendTransaction",{signerId:je,receiverId:Ue,actions:$e});const{contract:Je}=n.getState();if(!he().length||!Je)throw new Error("Wallet not signed in");const[xt]=yield(0,ts.signTransactions)(Le([{signerId:je,receiverId:Ue,actions:$e}]),Ie,e.network);return T.sendTransaction(xt)})(),signAndSendTransactions:({transactions:je})=>(0,ke.Z)(function*(){a.log("signAndSendTransactions",{transactions:je});const Ue=yield(0,ts.signTransactions)(Le(je),Ie,e.network),$e=[];for(let Je=0;Je(0,ke.Z)(function*(){if(!Z.wallet)throw new Error("Wallet is not installed");const Ue=[];je.forEach(({privateKey:Je})=>{"ed25519:"===Je.slice(0,8)?Ue.push(Je.slice(8)):Ue.push(Je)});const $e={privateKey:Ue,network:e.network.networkId};yield Z.wallet.request("near",{method:"experimental:near:importPrivatekey",params:[$e]})})()}});return function(n){return t.apply(this,arguments)}}();function G5({iconUrl:t=jU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){const n=F5()(),r=Sj(["chrome","edge-chromium","opera"]);if(n||!r)return null;const a=yield UU();return{id:"welldone-wallet",type:"injected",metadata:{name:"WELLDONE Wallet",description:"WELLDONE Wallet for Multichains",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/welldone-wallet/bmkakpenjmcpfhhjadflneinmhboecjf",deprecated:e,available:a},init:zU}})}var VU=g(84960);const HU=function(){var t=(0,ke.Z)(function*(e){const{store:n,logger:r,emitter:a,options:y,defaultProvider:T,defaultStrategy:Z}=e,$=new VU.HereWallet({networkId:y.network.networkId,nodeUrl:y.network.nodeUrl,defaultProvider:T,defaultStrategy:Z});function ie(){return ue.apply(this,arguments)}function ue(){return(ue=(0,ke.Z)(function*(){r.log("HereWallet:getAccounts");const he=yield $.getAccounts(),we=[];for(let xe=0;xe`https://my.herewallet.app/import?network=${y.network.networkId}`,account:he=>(0,ke.Z)(function*(){return r.log("HereWallet:account"),yield $.account(he)})(),switchAccount:he=>(0,ke.Z)(function*(){r.log("HereWallet:switchAccount"),yield $.switchAccount(he)})(),getAccountId:()=>(0,ke.Z)(function*(){return r.log("HereWallet:getAccountId"),yield $.getAccountId()})(),isSignedIn:()=>(0,ke.Z)(function*(){return r.log("HereWallet:isSignedIn"),yield $.isSignedIn()})(),signIn:he=>(0,ke.Z)(function*(){r.log("HereWallet:signIn");const we=""!==he.contractId?he.contractId:void 0;return yield $.signIn({...he,contractId:we}),a.emit("signedIn",{contractId:he.contractId,methodNames:he.methodNames??[],accounts:yield ie()}),yield ie()})(),getHereBalance:()=>(0,ke.Z)(function*(){return r.log("HereWallet:getHereBalance"),yield $.getHereBalance()})(),getAvailableBalance:()=>(0,ke.Z)(function*(){return r.log("HereWallet:getAvailableBalance"),yield $.getAvailableBalance()})(),signOut:()=>(0,ke.Z)(function*(){r.log("HereWallet:signOut"),yield $.signOut()})(),getAccounts:()=>(0,ke.Z)(function*(){return ie()})(),signAndSendTransaction:he=>(0,ke.Z)(function*(){r.log("HereWallet:signAndSendTransaction",he);const{contract:we}=n.getState();if(!$.isSignedIn||!we)throw new Error("Wallet not signed in");return yield $.signAndSendTransaction({receiverId:we.contractId,...he})})(),verifyOwner:()=>(0,ke.Z)(function*(){throw Error("HereWallet:verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})(),signMessage:he=>(0,ke.Z)(function*(){return r.log("HereWallet:signMessage",he),yield $.signMessage(he)})(),signAndSendTransactions:he=>(0,ke.Z)(function*(){return r.log("HereWallet:signAndSendTransactions",he),yield $.signAndSendTransactions(he)})()}});return function(n){return t.apply(this,arguments)}}(),WU="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOS43MzM1IDExLjY4MzFMMjEuNzA4OSA4TDI0LjI5ODMgMTYuNjc2NkwyMC40MTYgMTQuOTIxNUwxOS43MzM1IDExLjY4MzFaTTUuNzYzODggMTUuNTQwOUwzLjc1NTYyIDE5LjE2MjFMOS44OTYwNSAyMi4xNjYxTDE4LjM0NzMgMjEuNTgyOEw1Ljc2Mzg4IDE1LjU0MDlaTTQuNjQ0NjQgMjIuMzY5NEwyLjY0ODY1IDI1Ljk3MTNMMTQuOTA4MyAzMi4wNTc1TDM1LjMzODggMzAuODE3NEwzNy4zMzQ4IDI3LjIxNTRMMTYuOTA0MyAyOC40NTU3TDQuNjQ0NjQgMjIuMzY5NFoiIGZpbGw9IiMyQzMwMzQiLz4KPHBhdGggZD0iTTM3LjMzNTkgMjcuMjE1N0wxNi45MTEyIDI4LjQ1NjFMNC41NDYzMyAyMi4zNTU0TDE3LjkzNTggMjEuNTQ1M0w1Ljc2Mzg3IDE1LjU0MDlMMTEuNzQxIDEwLjQ3ODZMMjQuMTQwMSAxNi41NzYzTDIxLjcwOSA4TDMzLjU1NyAxMy44MUwzNy4zMzU5IDI3LjIxNTdaIiBmaWxsPSIjRkRCRjFDIi8+Cjwvc3ZnPgo=";function Z5({deprecated:t=!1,iconUrl:e=WU,defaultStrategy:n,defaultProvider:r}={}){return(0,ke.Z)(function*(){return{id:"here-wallet",type:"injected",metadata:{name:"Here Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!0,downloadUrl:"https://herewallet.app",iconUrl:e,deprecated:t,available:!0},init:a=>HU({...a,defaultStrategy:n,defaultProvider:r})}})}const JU=function(){var t=(0,ke.Z)(function*({metadata:e,options:n,store:r,provider:a,logger:y}){const T={wallet:window.coin98},Z=function(){var ie=(0,ke.Z)(function*(){const ue=T.wallet.near.account;if(!ue)return[];const he=yield T.wallet.near.signer.getPublicKey(ue,n.network.networkId);return[{accountId:ue,publicKey:he?he.toString():void 0}]});return function(){return ie.apply(this,arguments)}}(),$=ie=>{const{contract:ue}=r.getState();if(!ue)throw new Error("Wallet not signed in");const he=Mf(r.getState());if(!he)throw new Error("No active account");return ie.map(we=>({signerId:we.signerId||he.accountId,receiverId:we.receiverId||ue.contractId,actions:we.actions}))};return{signIn:({contractId:ie})=>(0,ke.Z)(function*(){const ue=yield Z();return ue.length?ue:(yield T.wallet.near.connect({prefix:"near_selector",contractId:ie}),Z())})(),signOut:()=>(0,ke.Z)(function*(){yield T.wallet.near.disconnect()})(),getAccounts:()=>(0,ke.Z)(function*(){return Z()})(),verifyOwner:()=>(0,ke.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:ie,receiverId:ue,actions:he})=>(0,ke.Z)(function*(){y.log("signAndSendTransaction",{signerId:ie,receiverId:ue,actions:he});const we=yield(0,ts.signTransactions)($([{signerId:ie,receiverId:ue,actions:he}]),T.wallet.near.signer,n.network);return a.sendTransaction(we[0])})(),signAndSendTransactions:({transactions:ie})=>(0,ke.Z)(function*(){y.log("signAndSendTransactions",{transactions:ie});const ue=yield(0,ts.signTransactions)($(ie),T.wallet.near.signer,n.network);y.log("signAndSendTransactions:signedTransactions",ue);const he=[];for(let we=0;we(0,ke.Z)(function*(){if((0,Ga.isMobile)())return null;const r=!!window.coin98;return{id:"coin98-wallet",type:"injected",metadata:{name:"Coin98 Wallet",description:"Using a Decentralized Wallet With Experiences of a Centralized One",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",deprecated:e,available:r},init:JU}}),QU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAIddJREFUeNrs3et/HFd5B/DRLu/6otsCIQFCxoQ4vltyILGNE48olNBCLcWOkzgXrwq5mJul9g/Q+A9opbzo7VPIblpKgLbshpAWQpKdALmQOOxCAm0gyU5C7s5lIG1feXb6PHPxzq5W0mo1M+fMzO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H85E2LUleCbWzSiBU/5mDhKAKRJ7hMyml65fOOp2aqsMKOowhEXuF6yyg8+hb3tvxtbIAVwEIgZH8xPfrWoj9MXARWAAuBSANaFuUcuTBBOBjACmAhEPK/sB57q1V4zFp6WjWwAlgIhLxwWXXKYBmEBawAFgKRBrh0f/1WVQqsHAXbyyAQiBVebCcti7L3tGpRWKGHhUAghoPrtwalt43NkvVbSWKFhaMIBGJ4uGh4GN7GBlgBLARC5hfg47+1KHUChOGqAyuAhUCkAK7fmZTTZMmA06qBFcBCIGR8Qf70dwZldxsbYAWwEIgUwFVV3Nt8nMXYsMKyBgQCESFaVuGnb/ecVp1nrAAWApGGF2nzbZNycsxbv2XmFSuAhUCkKMaabxuUGwgc6nU5Vt6wAlgIRBrhar0dbGNTXR9WWDiKQCASQet/LErvtGqe38oBVgALgUg/XC3K0DY2a8LKTN3/F085ApGdcHb+nk5vjlOWVsNq7Of/twE9LAQCIa4H8rP/1f1hYnUFrHhfruk0/v/+X4ABAA6s0eytIzCSAAAAAElFTkSuQmCC",XU=()=>fc(()=>!!window.nearFiWallet?.isNearFi,{timeout:200}).catch(()=>!1),$U=function(){var t=(0,ke.Z)(function*({options:e,metadata:n,store:r,emitter:a,logger:y}){const T={wallet:window.nearFiWallet},Z=function(){var xe=(0,ke.Z)(function*(){if(!T.wallet.isSignedIn())return;const Ie=yield T.wallet.signOut();if(!0===Ie)return;const Le=new Error("string"==typeof Ie.error?Ie.error:Ie.error.type);if("User reject"===Le.message)throw Le;y.log("Failed to sign out"),y.error(Le)});return function(){return xe.apply(this,arguments)}}(),$=()=>{T.wallet.on("accountChanged",function(){var xe=(0,ke.Z)(function*(Ie){y.log("onAccountChange",Ie),a.emit("signedOut",null)});return function(Ie){return xe.apply(this,arguments)}}()),T.wallet.on("rpcChanged",function(){var xe=(0,ke.Z)(function*(Ie){y.log("onNetworkChange",Ie),e.network.networkId!==Ie.networkId&&(yield Z(),a.emit("signedOut",null),a.emit("networkChanged",{networkId:Ie.networkId}))});return function(Ie){return xe.apply(this,arguments)}}())},ie=function(){var xe=(0,ke.Z)(function*(){let Ie=T.wallet.getAccountId();return Ie||(yield T.wallet.resolveSignInState(),Ie=T.wallet.getAccountId(),Ie)?[{accountId:Ie}]:[]});return function(){return xe.apply(this,arguments)}}(),he=xe=>{if(!(xe=>xe.every(Ie=>"FunctionCall"===Ie.type))(xe))throw new Error(`Only 'FunctionCall' actions types are supported by ${n.name}`);return xe.map(Le=>Le.params)},we=xe=>xe.map(Ie=>({receiverId:Ie.receiverId,actions:he(Ie.actions)}));return T.wallet&&T.wallet.isSignedIn()&&$(),{signIn:({contractId:xe,methodNames:Ie})=>(0,ke.Z)(function*(){const Le=yield ie();if(Le.length)return Le;const{accessKey:je,error:Ue}=yield T.wallet.requestSignIn({contractId:xe,methodNames:Ie});if(!je||Ue)throw yield Z(),new Error(("string"==typeof Ue?Ue:Ue.type)||"Failed to sign in");return $(),yield ie()})(),signOut:Z,getAccounts:()=>(0,ke.Z)(function*(){return yield ie()})(),verifyOwner:({message:xe})=>(0,ke.Z)(function*(){throw y.log("NearFi:verifyOwner",{message:xe}),new Error(`Method not supported by ${n.name}`)})(),signAndSendTransaction:({signerId:xe,receiverId:Ie,actions:Le})=>(0,ke.Z)(function*(){y.log("signAndSendTransaction",{signerId:xe,receiverId:Ie,actions:Le});const{contract:je}=r.getState();if(!T.wallet.isSignedIn()||!je)throw new Error("Wallet not signed in");return T.wallet.signAndSendTransaction({receiverId:Ie||je.contractId,actions:he(Le)}).then(Ue=>{if(Ue.error)throw new Error(Ue.error);if(!Ue.response?.length)throw new Error("Invalid response");return Ue.response[0]})})(),signAndSendTransactions:({transactions:xe})=>(0,ke.Z)(function*(){if(y.log("signAndSendTransactions",{transactions:xe}),!T.wallet.isSignedIn())throw new Error("Wallet not signed in");return T.wallet.requestSignTransactions({transactions:we(xe)}).then(Ie=>{if(Ie.error)throw new Error(Ie.error);if(!Ie.response?.length)throw new Error("Invalid response");return Ie.response})})()}});return function(n){return t.apply(this,arguments)}}();function J5({iconUrl:t=QU,deprecated:e=!1}={}){return(0,ke.Z)(function*(){const n=(0,Ga.isMobile)(),r=yield XU();return n&&r?{id:"nearfi",type:"injected",metadata:{name:"NearFi",description:"Your NEAR DeFi experience On The Go",iconUrl:t,downloadUrl:"https://nearfi.finance",deprecated:e,available:r},init:$U}:null})}var vE=g(72487);const bE=new vE.NearSnap,eK=function(){var t=(0,ke.Z)(function*(e){const{store:n,logger:r,options:a}=e,y=a.network.networkId;let T=yield vE.NearSnapAccount.restore({network:y,snap:bE});return{isSignedIn:()=>(0,ke.Z)(function*(){return r.log("NearSnap:isSignedIn"),null!=T})(),signIn:({contractId:Z,methodNames:$})=>(0,ke.Z)(function*(){return r.log("NearSnap:signIn"),T=yield vE.NearSnapAccount.connect({contractId:""===Z?void 0:Z,methods:$,network:y,snap:bE}),[{accountId:T.accountId}]})(),signOut:()=>(0,ke.Z)(function*(){r.log("NearSnap:signOut"),yield T?.disconnect()})(),getAccounts:()=>(0,ke.Z)(function*(){return T?[{accountId:T.accountId}]:[]})(),signAndSendTransaction:Z=>(0,ke.Z)(function*(){if(r.log("NearSnap:signAndSendTransaction",Z),null==T)throw new Error("Wallet not signed in");const{contract:$}=n.getState(),ie=Z.receiverId??$?.contractId;if(null==ie)throw new Error("ReceiverId is not defined");return yield T.executeTransaction({receiverId:ie,...Z})})(),signMessage:({message:Z,nonce:$,recipient:ie})=>(0,ke.Z)(function*(){if(null==T)throw new Error("Wallet not signed in");return yield T.signMessage({message:Z,nonce:$,recipient:ie})})(),verifyOwner:()=>(0,ke.Z)(function*(){throw Error("NearSnap:verifyOwner is not released yet")})(),signAndSendTransactions:({transactions:Z})=>(0,ke.Z)(function*(){if(r.log("NearSnap:signAndSendTransactions",{transactions:Z}),null==T)throw new Error("Wallet not signed in");return yield T.executeTransactions(Z)})()}});return function(n){return t.apply(this,arguments)}}(),tK="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRm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AxOC4yLjEgNDQuOGgyNy43bC4yLTQ0Ljh6IiBjbGFzcz0ic3Q2Ii8+Cjwvc3ZnPg==";function nK({deprecated:t=!1,iconUrl:e=tK}={}){return(0,ke.Z)(function*(){return(0,Ga.isMobile)()?null:{id:"near-snap",type:"injected",init:eK,metadata:{name:"Near Snap",description:"Metamask Snap for NEAR Protocol",downloadUrl:"https://near-snap.surge.sh",available:yield bE.provider.isSnapsAvailable(),deprecated:t,iconUrl:e}}})}var rK=g(35469),wE=g.n(rK);const iK="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABiCAYAAACmu3ZJAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAEqVJREFUeJztnHtUVXWbx797n/uBIxcvwNG4CGqCikZKpIFKr5TayItm5qsD1Vuu0bIsXSOrSJmVjk6OC8fpNisTWWW6alLGZLQy31ReFRIjSxAvIAYCcr+c+9nP/MFIL3I4Z1/O4eb7WWv/wTl7P8+zn+/ev9/zuxwYIiLcQ1VVFT799FMcPXoU169fR21tLex2O2QyGQICAhAaGor58+dj2bJlCA8Pv/fyIU1paSlycnLw/fff4+rVq2hpacGoUaMwduxYLFiwAMuXL0dISIh4B/Q3mM1mSk9PJ41GQwBcHnK5nNatW0etra001Kmvr6fU1FRiWdZpTpRKJa1bt446OjpE+ekSpKGhgeLj43kJce8xbdo0qq+vd9vNDzRKSkooLCxMUE5iYmKoqqpKsC8QEVksFkpISBAlxt0jOjqaWlpa3J6M/qa6uprGjBkjKidTp06l9vZ2Qf5ARJSRkSFJjLvH/PnzyWazeSQx/QHHcZSUlCQpJ6tWrRLkE9XV1eTl5eUWQQDQunXrPJSevueDDz6QnA+5XE6XL1/m7RPvvvuu28S4e3z44YceTFPfUF5eTjqdzi352LBhA2+/mDNnjtsFUSgUdPLkSc9ly8PY7XaaPXu22/IxceJE3r6h1+vdLggA8vf3p7KyMg+mzXPs2rXLrb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OX0vhQE6OyoT5w34r+/6xA11SGEyLFK/DlFBx8e5fd9K8hd6pvtOPC/HbhY6v63xVfHYuk8b8T20l844r4X5C7lVTYcPWVAcZlZ0KKSI0b4yZD0qAaPPaTu8SMfV/xdkHtoaeNw/pIZxWVmXL9lg9XGLz2j/GWIDFcidrIK44IVon4QCvxdEKdYrITfam1dy7NmC8FsJbAMA7WK6dw6NEKG0aPk8Bvmnlnu/wNWcf8As19BPQAAAABJRU5ErkJggg==";let Q5=!1,X5=!1;const ib={debug:1,default:2,info:2,warning:3,error:4,off:5};let q5=ib.default,AE=null;const $5=function sK(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var EE,Cu;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(EE||(EE={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(Cu||(Cu={}));const eD="0123456789abcdef";class zt{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,n){const r=e.toLowerCase();null==ib[r]&&this.throwArgumentError("invalid log level name","logLevel",e),!(q5>ib[r])&&console.log.apply(console,n)}debug(...e){this._log(zt.levels.DEBUG,e)}info(...e){this._log(zt.levels.INFO,e)}warn(...e){this._log(zt.levels.WARNING,e)}makeError(e,n,r){if(X5)return this.makeError("censored error",n,{});n||(n=zt.errors.UNKNOWN_ERROR),r||(r={});const a=[];Object.keys(r).forEach($=>{const ie=r[$];try{if(ie instanceof Uint8Array){let ue="";for(let he=0;he>4],ue+=eD[15&ie[he]];a.push($+"=Uint8Array(0x"+ue+")")}else a.push($+"="+JSON.stringify(ie))}catch{a.push($+"="+JSON.stringify(r[$].toString()))}}),a.push(`code=${n}`),a.push(`version=${this.version}`);const y=e;let T="";switch(n){case Cu.NUMERIC_FAULT:{T="NUMERIC_FAULT";const $=e;switch($){case"overflow":case"underflow":case"division-by-zero":T+="-"+$;break;case"negative-power":case"negative-width":T+="-unsupported";break;case"unbound-bitwise-result":T+="-unbound-result"}break}case Cu.CALL_EXCEPTION:case Cu.INSUFFICIENT_FUNDS:case Cu.MISSING_NEW:case Cu.NONCE_EXPIRED:case Cu.REPLACEMENT_UNDERPRICED:case Cu.TRANSACTION_REPLACED:case Cu.UNPREDICTABLE_GAS_LIMIT:T=n}T&&(e+=" [ See: https://links.ethers.org/v5-errors-"+T+" ]"),a.length&&(e+=" ("+a.join(", ")+")");const Z=new Error(e);return Z.reason=y,Z.code=n,Object.keys(r).forEach(function($){Z[$]=r[$]}),Z}throwError(e,n,r){throw this.makeError(e,n,r)}throwArgumentError(e,n,r){return this.throwError(e,zt.errors.INVALID_ARGUMENT,{argument:n,value:r})}assert(e,n,r,a){e||this.throwError(n,r,a)}assertArgument(e,n,r,a){e||this.throwArgumentError(n,r,a)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),$5&&this.throwError("platform missing String.prototype.normalize",zt.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:$5})}checkSafeUint53(e,n){"number"==typeof e&&(null==n&&(n="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(n,zt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(n,zt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,n,r){r=r?": "+r:"",en&&this.throwError("too many arguments"+r,zt.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:n})}checkNew(e,n){(e===Object||null==e)&&this.throwError("missing new",zt.errors.MISSING_NEW,{name:n.name})}checkAbstract(e,n){e===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.name)+" directly; use a sub-class",zt.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",zt.errors.MISSING_NEW,{name:n.name})}static globalLogger(){return AE||(AE=new zt("logger/5.7.0")),AE}static setCensorship(e,n){if(!e&&n&&this.globalLogger().throwError("cannot permanently disable censorship",zt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Q5){if(!e)return;this.globalLogger().throwError("error censorship permanent",zt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}X5=!!e,Q5=!!n}static setLogLevel(e){const n=ib[e.toLowerCase()];null!=n?q5=n:zt.globalLogger().warn("invalid log level - "+e)}static from(e){return new zt(e)}}zt.errors=Cu,zt.levels=EE;const Ui=new zt("bytes/5.7.0");function tD(t){return!!t.toHexString}function mp(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return mp(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function SE(t){return gi(t)&&!(t.length%2)||ob(t)}function nD(t){return"number"==typeof t&&t==t&&t%1==0}function ob(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t||!nD(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function _r(t,e){if(e||(e={}),"number"==typeof t){Ui.checkSafeUint53(t,"invalid arrayify value");const n=[];for(;t;)n.unshift(255&t),t=parseInt(String(t/256));return 0===n.length&&n.push(0),mp(new Uint8Array(n))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),tD(t)&&(t=t.toHexString()),gi(t)){let n=t.substring(2);n.length%2&&("left"===e.hexPad?n="0"+n:"right"===e.hexPad?n+="0":Ui.throwArgumentError("hex data is odd-length","value",t));const r=[];for(let a=0;a_r(a)),n=e.reduce((a,y)=>a+y.length,0),r=new Uint8Array(n);return e.reduce((a,y)=>(r.set(y,a),a+y.length),0),mp(r)}function vp(t){let e=_r(t);if(0===e.length)return e;let n=0;for(;n>4]+_E[15&a]}return n}return Ui.throwArgumentError("invalid hexlify value","value",t)}function rh(t){if("string"!=typeof t)t=pr(t);else if(!gi(t)||t.length%2)return null;return(t.length-2)/2}function Ds(t,e,n){return"string"!=typeof t?t=pr(t):(!gi(t)||t.length%2)&&Ui.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=n?"0x"+t.substring(e,2+2*n):"0x"+t.substring(e)}function va(t){let e="0x";return t.forEach(n=>{e+=pr(n).substring(2)}),e}function ME(t){const e=function cK(t){"string"!=typeof t&&(t=pr(t)),gi(t)||Ui.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Ui.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function sm(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(SE(t)){let n=_r(t);64===n.length?(e.v=27+(n[32]>>7),n[32]&=127,e.r=pr(n.slice(0,32)),e.s=pr(n.slice(32,64))):65===n.length?(e.r=pr(n.slice(0,32)),e.s=pr(n.slice(32,64)),e.v=n[64]):Ui.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:Ui.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(n[32]|=128),e._vs=pr(n.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const a=function uK(t,e){(t=_r(t)).length>e&&Ui.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(e);return n.set(t,e-t.length),mp(n)}(_r(e._vs),32);e._vs=pr(a);const y=a[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=y:e.recoveryParam!==y&&Ui.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),a[0]&=127;const T=pr(a);null==e.s?e.s=T:e.s!==T&&Ui.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?Ui.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const a=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==a&&Ui.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&gi(e.r)?e.r=ro(e.r,32):Ui.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&gi(e.s)?e.s=ro(e.s,32):Ui.throwArgumentError("signature missing or invalid s","signature",t);const n=_r(e.s);n[0]>=128&&Ui.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(n[0]|=128);const r=pr(n);e._vs&&(gi(e._vs)||Ui.throwArgumentError("signature invalid _vs","signature",t),e._vs=ro(e._vs,32)),null==e._vs?e._vs=r:e._vs!==r&&Ui.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}var lK=g(54237),fK=g.n(lK);function Po(t){return"0x"+fK().keccak_256(_r(t))}const rD=new zt("strings/5.7.0");var am,ba;function iD(t,e,n,r,a){if(t===ba.BAD_PREFIX||t===ba.UNEXPECTED_CONTINUE){let y=0;for(let T=e+1;T>6==2;T++)y++;return y}return t===ba.OVERRUN?n.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(am||(am={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(ba||(ba={}));const gK=Object.freeze({error:function hK(t,e,n,r,a){return rD.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",n)},ignore:iD,replace:function pK(t,e,n,r,a){return t===ba.OVERLONG?(r.push(a),0):(r.push(65533),iD(t,e,n))}});function DE(t,e){null==e&&(e=gK.error),t=_r(t);const n=[];let r=0;for(;r>7)){n.push(a);continue}let y=null,T=null;if(192==(224&a))y=1,T=127;else if(224==(240&a))y=2,T=2047;else{if(240!=(248&a)){r+=e(128==(192&a)?ba.UNEXPECTED_CONTINUE:ba.BAD_PREFIX,r-1,t,n);continue}y=3,T=65535}if(r-1+y>=t.length){r+=e(ba.OVERRUN,r-1,t,n);continue}let Z=a&(1<<8-y-1)-1;for(let $=0;$1114111){r+=e(ba.OUT_OF_RANGE,r-1-y,t,n,Z);continue}if(Z>=55296&&Z<=57343){r+=e(ba.UTF16_SURROGATE,r-1-y,t,n,Z);continue}if(Z<=T){r+=e(ba.OVERLONG,r-1-y,t,n,Z);continue}n.push(Z)}}return n}function dl(t,e=am.current){e!=am.current&&(rD.checkNormalize(),t=t.normalize(e));let n=[];for(let r=0;r>6|192),n.push(63&a|128);else if(55296==(64512&a)){r++;const y=t.charCodeAt(r);if(r>=t.length||56320!=(64512&y))throw new Error("invalid utf-8 string");const T=65536+((1023&a)<<10)+(1023&y);n.push(T>>18|240),n.push(T>>12&63|128),n.push(T>>6&63|128),n.push(63&T|128)}else n.push(a>>12|224),n.push(a>>6&63|128),n.push(63&a|128)}return _r(n)}function sb(t,e){return function yK(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join("")}(DE(t,e))}function IE(t){return Po(dl(t))}var bK=function(t,e,n,r){return new(n||(n=Promise))(function(y,T){function Z(ue){try{ie(r.next(ue))}catch(he){T(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){T(he)}}function ie(ue){ue.done?y(ue.value):function a(y){return y instanceof n?y:new n(function(T){T(y)})}(ue.value).then(Z,$)}ie((r=r.apply(t,e||[])).next())})};const ab=new zt("properties/5.7.0");function Nr(t,e,n){Object.defineProperty(t,e,{enumerable:!0,value:n,writable:!1})}function um(t,e){for(let n=0;n<32;n++){if(t[e])return t[e];if(!t.prototype||"object"!=typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function Ro(t){return bK(this,void 0,void 0,function*(){const e=Object.keys(t).map(r=>{const a=t[r];return Promise.resolve(a).then(y=>({key:r,value:y}))});return(yield Promise.all(e)).reduce((r,a)=>(r[a.key]=a.value,r),{})})}function Zs(t){const e={};for(const n in t)e[n]=t[n];return e}const AK={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function oD(t){if(null==t||AK[typeof t])return!0;if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let n=0;nih(e)));if("object"==typeof t){const e={};for(const n in t){const r=t[n];void 0!==r&&Nr(e,n,ih(r))}return e}return ab.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function ih(t){return EK(t)}class SK{constructor(e){for(const n in e)this[n]=ih(e[n])}}const ub="providers/5.7.2";var Iu=function(t,e,n,r){return new(n||(n=Promise))(function(y,T){function Z(ue){try{ie(r.next(ue))}catch(he){T(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){T(he)}}function ie(ue){ue.done?y(ue.value):function a(y){return y instanceof n?y:new n(function(T){T(y)})}(ue.value).then(Z,$)}ie((r=r.apply(t,e||[])).next())})};const Za=new zt("abstract-signer/5.7.0"),MK=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],DK=[zt.errors.INSUFFICIENT_FUNDS,zt.errors.NONCE_EXPIRED,zt.errors.REPLACEMENT_UNDERPRICED];class xE{constructor(){Za.checkAbstract(new.target,xE),Nr(this,"_isSigner",!0)}getBalance(e){return Iu(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Iu(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Iu(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const n=yield Ro(this.checkTransaction(e));return yield this.provider.estimateGas(n)})}call(e,n){return Iu(this,void 0,void 0,function*(){this._checkProvider("call");const r=yield Ro(this.checkTransaction(e));return yield this.provider.call(r,n)})}sendTransaction(e){return Iu(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const n=yield this.populateTransaction(e),r=yield this.signTransaction(n);return yield this.provider.sendTransaction(r)})}getChainId(){return Iu(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Iu(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Iu(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Iu(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const r in e)-1===MK.indexOf(r)&&Za.throwArgumentError("invalid transaction key: "+r,"transaction",e);const n=Zs(e);return null==n.from?n.from=this.getAddress():n.from=Promise.all([Promise.resolve(n.from),this.getAddress()]).then(r=>(r[0].toLowerCase()!==r[1].toLowerCase()&&Za.throwArgumentError("from address mismatch","transaction",e),r[0])),n}populateTransaction(e){return Iu(this,void 0,void 0,function*(){const n=yield Ro(this.checkTransaction(e));null!=n.to&&(n.to=Promise.resolve(n.to).then(a=>Iu(this,void 0,void 0,function*(){if(null==a)return null;const y=yield this.resolveName(a);return null==y&&Za.throwArgumentError("provided ENS name resolves to null","tx.to",a),y})),n.to.catch(a=>{}));const r=null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas;if(null==n.gasPrice||2!==n.type&&!r?(0===n.type||1===n.type)&&r&&Za.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):Za.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==n.type&&null!=n.type||null==n.maxFeePerGas||null==n.maxPriorityFeePerGas)if(0===n.type||1===n.type)null==n.gasPrice&&(n.gasPrice=this.getGasPrice());else{const a=yield this.getFeeData();if(null==n.type)if(null!=a.maxFeePerGas&&null!=a.maxPriorityFeePerGas)if(n.type=2,null!=n.gasPrice){const y=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=y,n.maxPriorityFeePerGas=y}else null==n.maxFeePerGas&&(n.maxFeePerGas=a.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=a.maxPriorityFeePerGas);else null!=a.gasPrice?(r&&Za.throwError("network does not support EIP-1559",zt.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==n.gasPrice&&(n.gasPrice=a.gasPrice),n.type=0):Za.throwError("failed to get consistent fee data",zt.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===n.type&&(null==n.maxFeePerGas&&(n.maxFeePerGas=a.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=a.maxPriorityFeePerGas))}else n.type=2;return null==n.nonce&&(n.nonce=this.getTransactionCount("pending")),null==n.gasLimit&&(n.gasLimit=this.estimateGas(n).catch(a=>{if(DK.indexOf(a.code)>=0)throw a;return Za.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",zt.errors.UNPREDICTABLE_GAS_LIMIT,{error:a,tx:n})})),null==n.chainId?n.chainId=this.getChainId():n.chainId=Promise.all([Promise.resolve(n.chainId),this.getChainId()]).then(a=>(0!==a[1]&&a[0]!==a[1]&&Za.throwArgumentError("chainId address mismatch","transaction",e),a[0])),yield Ro(n)})}_checkProvider(e){this.provider||Za.throwError("missing provider",zt.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}var CK=g(98538),fr=g.n(CK);var cm=fr().BN;const hl=new zt("bignumber/5.7.0"),TE={},aD=9007199254740991;let uD=!1;class Un{constructor(e,n){e!==TE&&hl.throwError("cannot call constructor directly; use BigNumber.from",zt.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=n,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Ys(xr(this).fromTwos(e))}toTwos(e){return Ys(xr(this).toTwos(e))}abs(){return"-"===this._hex[0]?Un.from(this._hex.substring(1)):this}add(e){return Ys(xr(this).add(xr(e)))}sub(e){return Ys(xr(this).sub(xr(e)))}div(e){return Un.from(e).isZero()&&Ya("division-by-zero","div"),Ys(xr(this).div(xr(e)))}mul(e){return Ys(xr(this).mul(xr(e)))}mod(e){const n=xr(e);return n.isNeg()&&Ya("division-by-zero","mod"),Ys(xr(this).umod(n))}pow(e){const n=xr(e);return n.isNeg()&&Ya("negative-power","pow"),Ys(xr(this).pow(n))}and(e){const n=xr(e);return(this.isNegative()||n.isNeg())&&Ya("unbound-bitwise-result","and"),Ys(xr(this).and(n))}or(e){const n=xr(e);return(this.isNegative()||n.isNeg())&&Ya("unbound-bitwise-result","or"),Ys(xr(this).or(n))}xor(e){const n=xr(e);return(this.isNegative()||n.isNeg())&&Ya("unbound-bitwise-result","xor"),Ys(xr(this).xor(n))}mask(e){return(this.isNegative()||e<0)&&Ya("negative-width","mask"),Ys(xr(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Ya("negative-width","shl"),Ys(xr(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Ya("negative-width","shr"),Ys(xr(this).shrn(e))}eq(e){return xr(this).eq(xr(e))}lt(e){return xr(this).lt(xr(e))}lte(e){return xr(this).lte(xr(e))}gt(e){return xr(this).gt(xr(e))}gte(e){return xr(this).gte(xr(e))}isNegative(){return"-"===this._hex[0]}isZero(){return xr(this).isZero()}toNumber(){try{return xr(this).toNumber()}catch{Ya("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return hl.throwError("this platform does not support BigInt",zt.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?uD||(uD=!0,hl.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?hl.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",zt.errors.UNEXPECTED_ARGUMENT,{}):hl.throwError("BigNumber.toString does not accept parameters",zt.errors.UNEXPECTED_ARGUMENT,{})),xr(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Un)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new Un(TE,lm(e)):e.match(/^-?[0-9]+$/)?new Un(TE,lm(new cm(e))):hl.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&Ya("underflow","BigNumber.from",e),(e>=aD||e<=-aD)&&Ya("overflow","BigNumber.from",e),Un.from(String(e));const n=e;if("bigint"==typeof n)return Un.from(n.toString());if(ob(n))return Un.from(pr(n));if(n)if(n.toHexString){const r=n.toHexString();if("string"==typeof r)return Un.from(r)}else{let r=n._hex;if(null==r&&"BigNumber"===n.type&&(r=n.hex),"string"==typeof r&&(gi(r)||"-"===r[0]&&gi(r.substring(1))))return Un.from(r)}return hl.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function lm(t){if("string"!=typeof t)return lm(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&hl.throwArgumentError("invalid hex","value",t),"0x00"===(t=lm(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function Ys(t){return Un.from(lm(t))}function xr(t){const e=Un.from(t).toHexString();return"-"===e[0]?new cm("-"+e.substring(3),16):new cm(e.substring(2),16)}function Ya(t,e,n){const r={fault:t,operation:e};return null!=n&&(r.value=n),hl.throwError(t,zt.errors.NUMERIC_FAULT,r)}const dc=new zt("rlp/5.7.0");function cD(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function lD(t,e,n){let r=0;for(let a=0;ae+1+r&&dc.throwError("child data too short",zt.errors.BUFFER_OVERRUN,{})}return{consumed:1+r,result:a}}function hD(t,e){if(0===t.length&&dc.throwError("data too short",zt.errors.BUFFER_OVERRUN,{}),t[e]>=248){const n=t[e]-247;e+1+n>t.length&&dc.throwError("data short segment too short",zt.errors.BUFFER_OVERRUN,{});const r=lD(t,e+1,n);return e+1+n+r>t.length&&dc.throwError("data long segment too short",zt.errors.BUFFER_OVERRUN,{}),dD(t,e,e+1+n,n+r)}if(t[e]>=192){const n=t[e]-192;return e+1+n>t.length&&dc.throwError("data array too short",zt.errors.BUFFER_OVERRUN,{}),dD(t,e,e+1,n)}if(t[e]>=184){const n=t[e]-183;e+1+n>t.length&&dc.throwError("data array too short",zt.errors.BUFFER_OVERRUN,{});const r=lD(t,e+1,n);e+1+n+r>t.length&&dc.throwError("data array too short",zt.errors.BUFFER_OVERRUN,{});return{consumed:1+n+r,result:pr(t.slice(e+1+n,e+1+n+r))}}if(t[e]>=128){const n=t[e]-128;e+1+n>t.length&&dc.throwError("data too short",zt.errors.BUFFER_OVERRUN,{});return{consumed:1+n,result:pr(t.slice(e+1,e+1+n))}}return{consumed:1,result:pr(t[e])}}function OE(t){const e=_r(t),n=hD(e,0);return n.consumed!==e.length&&dc.throwArgumentError("invalid rlp data","data",t),n.result}const Cf=new zt("address/5.7.0");function pD(t){gi(t,20)||Cf.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let a=0;a<40;a++)n[a]=e[a].charCodeAt(0);const r=_r(Po(n));for(let a=0;a<40;a+=2)r[a>>1]>>4>=8&&(e[a]=e[a].toUpperCase()),(15&r[a>>1])>=8&&(e[a+1]=e[a+1].toUpperCase());return"0x"+e.join("")}const NE={};for(let t=0;t<10;t++)NE[String(t)]=String(t);for(let t=0;t<26;t++)NE[String.fromCharCode(65+t)]=String(10+t);const gD=Math.floor(function PK(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}(9007199254740991));function yD(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map(r=>NE[r]).join("");for(;e.length>=gD;){let r=e.substring(0,gD);e=parseInt(r,10)%97+e.substring(r.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}function Cs(t){let e=null;if("string"!=typeof t&&Cf.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=pD(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Cf.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==yD(t)&&Cf.throwArgumentError("bad icap checksum","address",t),e=function xK(t){return new cm(t,36).toString(16)}(t.substring(4));e.length<40;)e="0"+e;e=pD("0x"+e)}else Cf.throwArgumentError("invalid address","address",t);return e}const mD="hash/5.7.0";var kK=function(t,e,n,r){return new(n||(n=Promise))(function(y,T){function Z(ue){try{ie(r.next(ue))}catch(he){T(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){T(he)}}function ie(ue){ue.done?y(ue.value):function a(y){return y instanceof n?y:new n(function(T){T(y)})}(ue.value).then(Z,$)}ie((r=r.apply(t,e||[])).next())})};const Pi=new zt(mD),vD=new Uint8Array(32);vD.fill(0);const LK=Un.from(-1),bD=Un.from(0),wD=Un.from(1),FK=Un.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const jK=ro(wD.toHexString(),32),UK=ro(bD.toHexString(),32),AD={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},PE=["name","version","chainId","verifyingContract","salt"];function ED(t){return function(e){return"string"!=typeof e&&Pi.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const KK={name:ED("name"),version:ED("version"),chainId:function(t){try{return Un.from(t).toString()}catch{}return Pi.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Cs(t).toLowerCase()}catch{}return Pi.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=_r(t);if(32!==e.length)throw new Error("bad length");return pr(e)}catch{}return Pi.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function RE(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const n=""===e[1],r=parseInt(e[2]||"256");(r%8!=0||r>256||e[2]&&e[2]!==String(r))&&Pi.throwArgumentError("invalid numeric width","type",t);const a=FK.mask(n?r-1:r),y=n?a.add(wD).mul(LK):bD;return function(T){const Z=Un.from(T);return(Z.lt(y)||Z.gt(a))&&Pi.throwArgumentError(`value out-of-bounds for ${t}`,"value",T),ro(Z.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const n=parseInt(e[1]);return(0===n||n>32||e[1]!==String(n))&&Pi.throwArgumentError("invalid bytes width","type",t),function(r){return _r(r).length!==n&&Pi.throwArgumentError(`invalid length for ${t}`,"value",r),function BK(t){const e=_r(t),n=e.length%32;return n?va([e,vD.slice(n)]):pr(e)}(r)}}}switch(t){case"address":return function(e){return ro(Cs(e),32)};case"bool":return function(e){return e?jK:UK};case"bytes":return function(e){return Po(e)};case"string":return function(e){return IE(e)}}return null}function SD(t,e){return`${t}(${e.map(({name:n,type:r})=>r+" "+n).join(",")})`}class wa{constructor(e){Nr(this,"types",Object.freeze(ih(e))),Nr(this,"_encoderCache",{}),Nr(this,"_types",{});const n={},r={},a={};Object.keys(e).forEach(Z=>{n[Z]={},r[Z]=[],a[Z]={}});for(const Z in e){const $={};e[Z].forEach(ie=>{$[ie.name]&&Pi.throwArgumentError(`duplicate variable name ${JSON.stringify(ie.name)} in ${JSON.stringify(Z)}`,"types",e),$[ie.name]=!0;const ue=ie.type.match(/^([^\x5b]*)(\x5b|$)/)[1];ue===Z&&Pi.throwArgumentError(`circular type reference to ${JSON.stringify(ue)}`,"types",e),!RE(ue)&&(r[ue]||Pi.throwArgumentError(`unknown type ${JSON.stringify(ue)}`,"types",e),r[ue].push(Z),n[Z][ue]=!0)})}const y=Object.keys(r).filter(Z=>0===r[Z].length);0===y.length?Pi.throwArgumentError("missing primary type","types",e):y.length>1&&Pi.throwArgumentError(`ambiguous primary types or unused types: ${y.map(Z=>JSON.stringify(Z)).join(", ")}`,"types",e),Nr(this,"primaryType",y[0]),function T(Z,$){$[Z]&&Pi.throwArgumentError(`circular type reference to ${JSON.stringify(Z)}`,"types",e),$[Z]=!0,Object.keys(n[Z]).forEach(ie=>{r[ie]&&(T(ie,$),Object.keys($).forEach(ue=>{a[ue][ie]=!0}))}),delete $[Z]}(this.primaryType,{});for(const Z in a){const $=Object.keys(a[Z]);$.sort(),this._types[Z]=SD(Z,e[Z])+$.map(ie=>SD(ie,e[ie])).join("")}}getEncoder(e){let n=this._encoderCache[e];return n||(n=this._encoderCache[e]=this._getEncoder(e)),n}_getEncoder(e){{const a=RE(e);if(a)return a}const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const a=n[1],y=this.getEncoder(a),T=parseInt(n[3]);return Z=>{T>=0&&Z.length!==T&&Pi.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",Z);let $=Z.map(y);return this._types[a]&&($=$.map(Po)),Po(va($))}}const r=this.types[e];if(r){const a=IE(this._types[e]);return y=>{const T=r.map(({name:Z,type:$})=>{const ie=this.getEncoder($)(y[Z]);return this._types[$]?Po(ie):ie});return T.unshift(a),va(T)}}return Pi.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const n=this._types[e];return n||Pi.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),n}encodeData(e,n){return this.getEncoder(e)(n)}hashStruct(e,n){return Po(this.encodeData(e,n))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,n,r){if(RE(e))return r(e,n);const a=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(a){const T=a[1],Z=parseInt(a[3]);return Z>=0&&n.length!==Z&&Pi.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",n),n.map($=>this._visit(T,$,r))}const y=this.types[e];return y?y.reduce((T,{name:Z,type:$})=>(T[Z]=this._visit($,n[Z],r),T),{}):Pi.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,n){return this._visit(this.primaryType,e,n)}static from(e){return new wa(e)}static getPrimaryType(e){return wa.from(e).primaryType}static hashStruct(e,n,r){return wa.from(n).hashStruct(e,r)}static hashDomain(e){const n=[];for(const r in e){const a=AD[r];a||Pi.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),n.push({name:r,type:a})}return n.sort((r,a)=>PE.indexOf(r.name)-PE.indexOf(a.name)),wa.hashStruct("EIP712Domain",{EIP712Domain:n},e)}static encode(e,n,r){return va(["0x1901",wa.hashDomain(e),wa.from(n).hash(r)])}static hash(e,n,r){return Po(wa.encode(e,n,r))}static resolveNames(e,n,r,a){return kK(this,void 0,void 0,function*(){e=Zs(e);const y={};e.verifyingContract&&!gi(e.verifyingContract,20)&&(y[e.verifyingContract]="0x");const T=wa.from(n);T.visit(r,(Z,$)=>("address"===Z&&!gi($,20)&&(y[$]="0x"),$));for(const Z in y)y[Z]=yield a(Z);return e.verifyingContract&&y[e.verifyingContract]&&(e.verifyingContract=y[e.verifyingContract]),r=T.visit(r,(Z,$)=>"address"===Z&&y[$]?y[$]:$),{domain:e,value:r}})}static getPayload(e,n,r){wa.hashDomain(e);const a={},y=[];PE.forEach($=>{const ie=e[$];null!=ie&&(a[$]=KK[$](ie),y.push({name:$,type:AD[$]}))});const T=wa.from(n),Z=Zs(n);return Z.EIP712Domain?Pi.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",n):Z.EIP712Domain=y,T.encode(r),{types:Z,domain:a,primaryType:T.primaryType,message:T.visit(r,($,ie)=>{if($.match(/^bytes(\d*)/))return pr(_r(ie));if($.match(/^u?int/))return Un.from(ie).toString();switch($){case"address":return ie.toLowerCase();case"bool":return!!ie;case"string":return"string"!=typeof ie&&Pi.throwArgumentError("invalid string","value",ie),ie}return Pi.throwArgumentError("unsupported type","type",$)})}}}const zK=Un.from(0);var VK=g(37084),hc=g.n(VK);typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"&&self;function bp(t,e,n){return t(n={path:e,exports:{},require:function(r,a){return function HK(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(a??n.path)}},n.exports),n.exports}var kE=_D;function _D(t,e){if(!t)throw new Error(e||"Assertion failed")}_D.equal=function(e,n,r){if(e!=n)throw new Error(r||"Assertion failed: "+e+" != "+n)};var xu=bp(function(t,e){var n=e;function a(T){return 1===T.length?"0"+T:T}function y(T){for(var Z="",$=0;$>8,we=255&ue;he?$.push(he,we):$.push(we)}return $},n.zero2=a,n.toHex=y,n.encode=function(Z,$){return"hex"===$?y(Z):Z}}),Aa=bp(function(t,e){var n=e;n.assert=kE,n.toArray=xu.toArray,n.zero2=xu.zero2,n.toHex=xu.toHex,n.encode=xu.encode,n.getNAF=function r($,ie,ue){var he=new Array(Math.max($.bitLength(),ue)+1);he.fill(0);for(var we=1<(we>>1)-1?(we>>1)-je:je,xe.isubn(Le)):Le=0,he[Ie]=Le,xe.iushrn(1)}return he},n.getJSF=function a($,ie){var ue=[[],[]];$=$.clone(),ie=ie.clone();for(var xe,he=0,we=0;$.cmpn(-he)>0||ie.cmpn(-we)>0;){var je,Ue,Ie=$.andln(3)+he&3,Le=ie.andln(3)+we&3;3===Ie&&(Ie=-1),3===Le&&(Le=-1),1&Ie?je=3!==(xe=$.andln(7)+he&7)&&5!==xe||2!==Le?Ie:-Ie:je=0,ue[0].push(je),1&Le?Ue=3!==(xe=ie.andln(7)+we&7)&&5!==xe||2!==Ie?Le:-Le:Ue=0,ue[1].push(Ue),2*he===je+1&&(he=1-he),2*we===Ue+1&&(we=1-we),$.iushrn(1),ie.iushrn(1)}return ue},n.cachedProperty=function y($,ie,ue){var he="_"+ie;$.prototype[ie]=function(){return void 0!==this[he]?this[he]:this[he]=ue.call(this)}},n.parseBytes=function T($){return"string"==typeof $?n.toArray($,"hex"):$},n.intFromLE=function Z($){return new(fr())($,"hex","le")}}),lb=Aa.getNAF,WK=Aa.getJSF,fb=Aa.assert;function If(t,e){this.type=t,this.p=new(fr())(e.p,16),this.red=e.prime?fr().red(e.prime):fr().mont(this.p),this.zero=new(fr())(0).toRed(this.red),this.one=new(fr())(1).toRed(this.red),this.two=new(fr())(2).toRed(this.red),this.n=e.n&&new(fr())(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 n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var oh=If;function Ja(t,e){this.curve=t,this.type=e,this.precomputed=null}If.prototype.point=function(){throw new Error("Not implemented")},If.prototype.validate=function(){throw new Error("Not implemented")},If.prototype._fixedNafMul=function(e,n){fb(e.precomputed);var r=e._getDoubles(),a=lb(n,1,this._bitLength),y=(1<=Z;ie--)$=($<<1)+a[ie];T.push($)}for(var ue=this.jpoint(null,null,null),he=this.jpoint(null,null,null),we=y;we>0;we--){for(Z=0;Z=0;$--){for(var ie=0;$>=0&&0===T[$];$--)ie++;if($>=0&&ie++,Z=Z.dblp(ie),$<0)break;var ue=T[$];fb(0!==ue),Z="affine"===e.type?ue>0?Z.mixedAdd(y[ue-1>>1]):Z.mixedAdd(y[-ue-1>>1].neg()):ue>0?Z.add(y[ue-1>>1]):Z.add(y[-ue-1>>1].neg())}return"affine"===e.type?Z.toP():Z},If.prototype._wnafMulAdd=function(e,n,r,a,y){var ue,he,we,T=this._wnafT1,Z=this._wnafT2,$=this._wnafT3,ie=0;for(ue=0;ue=1;ue-=2){var Ie=ue-1,Le=ue;if(1===T[Ie]&&1===T[Le]){var je=[n[Ie],null,null,n[Le]];0===n[Ie].y.cmp(n[Le].y)?(je[1]=n[Ie].add(n[Le]),je[2]=n[Ie].toJ().mixedAdd(n[Le].neg())):0===n[Ie].y.cmp(n[Le].y.redNeg())?(je[1]=n[Ie].toJ().mixedAdd(n[Le]),je[2]=n[Ie].add(n[Le].neg())):(je[1]=n[Ie].toJ().mixedAdd(n[Le]),je[2]=n[Ie].toJ().mixedAdd(n[Le].neg()));var Ue=[-3,-1,-5,-7,0,7,5,1,3],$e=WK(r[Ie],r[Le]);for(ie=Math.max($e[0].length,ie),$[Ie]=new Array(ie),$[Le]=new Array(ie),he=0;he=0;ue--){for(var An=0;ue>=0;){var rn=!0;for(he=0;he=0&&An++,xt=xt.dblp(An),ue<0)break;for(he=0;he0?we=Z[he][un-1>>1]:un<0&&(we=Z[he][-un-1>>1].neg()),xt="affine"===we.type?xt.mixedAdd(we):xt.add(we))}}for(ue=0;ue=Math.ceil((e.bitLength()+1)/n.step)},Ja.prototype._getDoubles=function(e,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],a=this,y=0;y=0&&(xe=ie,Ie=ue),he.negative&&(he=he.neg(),we=we.neg()),xe.negative&&(xe=xe.neg(),Ie=Ie.neg()),[{a:he,b:we},{a:xe,b:Ie}]},Qa.prototype._endoSplit=function(e){var n=this.endo.basis,r=n[0],a=n[1],y=a.b.mul(e).divRound(this.n),T=r.b.neg().mul(e).divRound(this.n),Z=y.mul(r.a),$=T.mul(a.a),ie=y.mul(r.b),ue=T.mul(a.b);return{k1:e.sub(Z).sub($),k2:ie.add(ue).neg()}},Qa.prototype.pointFromX=function(e,n){(e=new(fr())(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=r.redSqrt();if(0!==a.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var y=a.fromRed().isOdd();return(n&&!y||!n&&y)&&(a=a.redNeg()),this.point(e,a)},Qa.prototype.validate=function(e){if(e.inf)return!0;var n=e.x,r=e.y,a=this.a.redMul(n),y=n.redSqr().redMul(n).redIAdd(a).redIAdd(this.b);return 0===r.redSqr().redISub(y).cmpn(0)},Qa.prototype._endoWnafMulAdd=function(e,n,r){for(var a=this._endoWnafT1,y=this._endoWnafT2,T=0;T":""},_o.prototype.isInfinity=function(){return this.inf},_o.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var n=this.y.redSub(e.y);0!==n.cmpn(0)&&(n=n.redMul(this.x.redSub(e.x).redInvm()));var r=n.redSqr().redISub(this.x).redISub(e.x),a=n.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,a)},_o.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var n=this.curve.a,r=this.x.redSqr(),a=e.redInvm(),y=r.redAdd(r).redIAdd(r).redIAdd(n).redMul(a),T=y.redSqr().redISub(this.x.redAdd(this.x)),Z=y.redMul(this.x.redSub(T)).redISub(this.y);return this.curve.point(T,Z)},_o.prototype.getX=function(){return this.x.fromRed()},_o.prototype.getY=function(){return this.y.fromRed()},_o.prototype.mul=function(e){return e=new(fr())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},_o.prototype.mulAdd=function(e,n,r){var a=[this,n],y=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,y):this.curve._wnafMulAdd(1,a,y,2)},_o.prototype.jmulAdd=function(e,n,r){var a=[this,n],y=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,y,!0):this.curve._wnafMulAdd(1,a,y,2,!0)},_o.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},_o.prototype.neg=function(e){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,a=function(y){return y.neg()};n.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(a)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(a)}}}return n},_o.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},LE(ko,oh.BasePoint),Qa.prototype.jpoint=function(e,n,r){return new ko(this,e,n,r)},ko.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),n=e.redSqr(),r=this.x.redMul(n),a=this.y.redMul(n).redMul(e);return this.curve.point(r,a)},ko.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ko.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var n=e.z.redSqr(),r=this.z.redSqr(),a=this.x.redMul(n),y=e.x.redMul(r),T=this.y.redMul(n.redMul(e.z)),Z=e.y.redMul(r.redMul(this.z)),$=a.redSub(y),ie=T.redSub(Z);if(0===$.cmpn(0))return 0!==ie.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var ue=$.redSqr(),he=ue.redMul($),we=a.redMul(ue),xe=ie.redSqr().redIAdd(he).redISub(we).redISub(we),Ie=ie.redMul(we.redISub(xe)).redISub(T.redMul(he)),Le=this.z.redMul(e.z).redMul($);return this.curve.jpoint(xe,Ie,Le)},ko.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var n=this.z.redSqr(),r=this.x,a=e.x.redMul(n),y=this.y,T=e.y.redMul(n).redMul(this.z),Z=r.redSub(a),$=y.redSub(T);if(0===Z.cmpn(0))return 0!==$.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var ie=Z.redSqr(),ue=ie.redMul(Z),he=r.redMul(ie),we=$.redSqr().redIAdd(ue).redISub(he).redISub(he),xe=$.redMul(he.redISub(we)).redISub(y.redMul(ue)),Ie=this.z.redMul(Z);return this.curve.jpoint(we,xe,Ie)},ko.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var n;if(this.curve.zeroA||this.curve.threeA){var r=this;for(n=0;n=0)return!1;if(r.redIAdd(y),0===this.x.cmp(r))return!0}},ko.prototype.inspect=function(){return this.isInfinity()?"":""},ko.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var hb=bp(function(t,e){var n=e;n.base=oh,n.short=ZK,n.mont=null,n.edwards=null}),pb=bp(function(t,e){var T,n=e,r=Aa.assert;function a(Z){"short"===Z.type?this.curve=new hb.short(Z):"edwards"===Z.type?this.curve=new hb.edwards(Z):this.curve=new hb.mont(Z),this.g=this.curve.g,this.n=this.curve.n,this.hash=Z.hash,r(this.g.validate(),"Invalid curve"),r(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function y(Z,$){Object.defineProperty(n,Z,{configurable:!0,enumerable:!0,get:function(){var ie=new a($);return Object.defineProperty(n,Z,{configurable:!0,enumerable:!0,value:ie}),ie}})}n.PresetCurve=a,y("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:hc().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),y("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:hc().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),y("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:hc().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),y("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:hc().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"]}),y("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:hc().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"]}),y("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hc().sha256,gRed:!1,g:["9"]}),y("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:hc().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{T=null.crash()}catch{T=void 0}y("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:hc().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",T]})});function xf(t){if(!(this instanceof xf))return new xf(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=xu.toArray(t.entropy,t.entropyEnc||"hex"),n=xu.toArray(t.nonce,t.nonceEnc||"hex"),r=xu.toArray(t.pers,t.persEnc||"hex");kE(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,r)}var MD=xf;xf.prototype._init=function(e,n,r){var a=e.concat(n).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var y=0;y=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},xf.prototype.generate=function(e,n,r,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(a=r,r=n,n=null),r&&(r=xu.toArray(r,a||"hex"),this._update(r));for(var y=[];y.length"};var YK=Aa.assert;function gb(t,e){if(t instanceof gb)return t;this._importDER(t,e)||(YK(t.r&&t.s,"Signature without r or s"),this.r=new(fr())(t.r,16),this.s=new(fr())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var yb=gb;function JK(){this.place=0}function jE(t,e){var n=t[e.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var a=0,y=0,T=e.place;y>>=0;return!(a<=127)&&(e.place=T,a)}function DD(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}gb.prototype._importDER=function(e,n){e=Aa.toArray(e,n);var r=new JK;if(48!==e[r.place++])return!1;var a=jE(e,r);if(!1===a||a+r.place!==e.length||2!==e[r.place++])return!1;var y=jE(e,r);if(!1===y)return!1;var T=e.slice(r.place,y+r.place);if(r.place+=y,2!==e[r.place++])return!1;var Z=jE(e,r);if(!1===Z||e.length!==Z+r.place)return!1;var $=e.slice(r.place,Z+r.place);if(0===T[0]){if(!(128&T[1]))return!1;T=T.slice(1)}if(0===$[0]){if(!(128&$[1]))return!1;$=$.slice(1)}return this.r=new(fr())(T),this.s=new(fr())($),this.recoveryParam=null,!0},gb.prototype.toDER=function(e){var n=this.r.toArray(),r=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&r[0]&&(r=[0].concat(r)),n=DD(n),r=DD(r);!(r[0]||128&r[1]);)r=r.slice(1);var a=[2];UE(a,n.length),(a=a.concat(n)).push(2),UE(a,r.length);var y=a.concat(r),T=[48];return UE(T,y.length),T=T.concat(y),Aa.encode(T,e)};var QK=function(){throw new Error("unsupported")},CD=Aa.assert;function Xa(t){if(!(this instanceof Xa))return new Xa(t);"string"==typeof t&&(CD(Object.prototype.hasOwnProperty.call(pb,t),"Unknown curve "+t),t=pb[t]),t instanceof pb.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}var XK=Xa;Xa.prototype.keyPair=function(e){return new BE(this,e)},Xa.prototype.keyFromPrivate=function(e,n){return BE.fromPrivate(this,e,n)},Xa.prototype.keyFromPublic=function(e,n){return BE.fromPublic(this,e,n)},Xa.prototype.genKeyPair=function(e){e||(e={});for(var n=new MD({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||QK(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new(fr())(2));;){var y=new(fr())(n.generate(r));if(!(y.cmp(a)>0))return y.iaddn(1),this.keyFromPrivate(y)}},Xa.prototype._truncateToN=function(e,n){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!n&&e.cmp(this.n)>=0?e.sub(this.n):e},Xa.prototype.sign=function(e,n,r,a){"object"==typeof r&&(a=r,r=null),a||(a={}),n=this.keyFromPrivate(n,r),e=this._truncateToN(new(fr())(e,16));for(var y=this.n.byteLength(),T=n.getPrivate().toArray("be",y),Z=e.toArray("be",y),$=new MD({hash:this.hash,entropy:T,nonce:Z,pers:a.pers,persEnc:a.persEnc||"utf8"}),ie=this.n.sub(new(fr())(1)),ue=0;;ue++){var he=a.k?a.k(ue):new(fr())($.generate(this.n.byteLength()));if(!((he=this._truncateToN(he,!0)).cmpn(1)<=0||he.cmp(ie)>=0)){var we=this.g.mul(he);if(!we.isInfinity()){var xe=we.getX(),Ie=xe.umod(this.n);if(0!==Ie.cmpn(0)){var Le=he.invm(this.n).mul(Ie.mul(n.getPrivate()).iadd(e));if(0!==(Le=Le.umod(this.n)).cmpn(0)){var je=(we.getY().isOdd()?1:0)|(0!==xe.cmp(Ie)?2:0);return a.canonical&&Le.cmp(this.nh)>0&&(Le=this.n.sub(Le),je^=1),new yb({r:Ie,s:Le,recoveryParam:je})}}}}}},Xa.prototype.verify=function(e,n,r,a){e=this._truncateToN(new(fr())(e,16)),r=this.keyFromPublic(r,a);var y=(n=new yb(n,"hex")).r,T=n.s;if(y.cmpn(1)<0||y.cmp(this.n)>=0||T.cmpn(1)<0||T.cmp(this.n)>=0)return!1;var ue,Z=T.invm(this.n),$=Z.mul(e).umod(this.n),ie=Z.mul(y).umod(this.n);return this.curve._maxwellTrick?!(ue=this.g.jmulAdd($,r.getPublic(),ie)).isInfinity()&&ue.eqXToP(y):!(ue=this.g.mulAdd($,r.getPublic(),ie)).isInfinity()&&0===ue.getX().umod(this.n).cmp(y)},Xa.prototype.recoverPubKey=function(t,e,n,r){CD((3&n)===n,"The recovery param is more than two bits"),e=new yb(e,r);var a=this.n,y=new(fr())(t),T=e.r,Z=e.s,$=1&n,ie=n>>1;if(T.cmp(this.curve.p.umod(this.curve.n))>=0&&ie)throw new Error("Unable to find sencond key candinate");T=ie?this.curve.pointFromX(T.add(this.curve.n),$):this.curve.pointFromX(T,$);var ue=e.r.invm(a),he=a.sub(y).mul(ue).umod(a),we=Z.mul(ue).umod(a);return this.g.mulAdd(he,T,we)},Xa.prototype.getKeyRecoveryParam=function(t,e,n,r){if(null!==(e=new yb(e,r)).recoveryParam)return e.recoveryParam;for(var a=0;a<4;a++){var y;try{y=this.recoverPubKey(t,e,a)}catch{continue}if(y.eq(n))return a}throw new Error("Unable to find valid recovery factor")};var $K=bp(function(t,e){var n=e;n.version="6.5.4",n.utils=Aa,n.rand=function(){throw new Error("unsupported")},n.curve=hb,n.curves=pb,n.ec=XK,n.eddsa=null}).ec;const KE=new zt("signing-key/5.7.0");let zE=null;function pc(){return zE||(zE=new $K("secp256k1")),zE}class tz{constructor(e){Nr(this,"curve","secp256k1"),Nr(this,"privateKey",pr(e)),32!==rh(this.privateKey)&&KE.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const n=pc().keyFromPrivate(_r(this.privateKey));Nr(this,"publicKey","0x"+n.getPublic(!1,"hex")),Nr(this,"compressedPublicKey","0x"+n.getPublic(!0,"hex")),Nr(this,"_isSigningKey",!0)}_addPoint(e){const n=pc().keyFromPublic(_r(this.publicKey)),r=pc().keyFromPublic(_r(e));return"0x"+n.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const n=pc().keyFromPrivate(_r(this.privateKey)),r=_r(e);32!==r.length&&KE.throwArgumentError("bad digest length","digest",e);const a=n.sign(r,{canonical:!0});return sm({recoveryParam:a.recoveryParam,r:ro("0x"+a.r.toString(16),32),s:ro("0x"+a.s.toString(16),32)})}computeSharedSecret(e){const n=pc().keyFromPrivate(_r(this.privateKey)),r=pc().keyFromPublic(_r(ID(e)));return ro("0x"+n.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function ID(t,e){const n=_r(t);if(32===n.length){const r=new tz(n);return e?"0x"+pc().keyFromPrivate(n).getPublic(!0,"hex"):r.publicKey}return 33===n.length?e?pr(n):"0x"+pc().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?e?"0x"+pc().keyFromPublic(n).getPublic(!0,"hex"):pr(n):KE.throwArgumentError("invalid public or private key","key","[REDACTED]")}const rs=new zt("transactions/5.7.0");var xD;function VE(t){return"0x"===t?null:Cs(t)}function is(t){return"0x"===t?zK:Un.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(xD||(xD={}));function TD(t,e){return function sz(t){return Cs(Ds(Po(Ds(ID(t),1)),12))}(function nz(t,e){const n=sm(e),r={r:_r(n.r),s:_r(n.s)};return"0x"+pc().recoverPubKey(_r(t),r,n.recoveryParam).encode("hex",!1)}(_r(t),e))}function Ea(t,e){const n=vp(Un.from(t).toHexString());return n.length>32&&rs.throwArgumentError("invalid length for "+e,"transaction:"+e,t),n}function HE(t,e){return{address:Cs(t),storageKeys:(e||[]).map((n,r)=>(32!==rh(n)&&rs.throwArgumentError("invalid access list storageKey",`accessList[${t}:${r}]`,n),n.toLowerCase()))}}function fm(t){if(Array.isArray(t))return t.map((n,r)=>Array.isArray(n)?(n.length>2&&rs.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${r}]`,n),HE(n[0],n[1])):HE(n.address,n.storageKeys));const e=Object.keys(t).map(n=>{const r=t[n].reduce((a,y)=>(a[y]=!0,a),{});return HE(n,Object.keys(r).sort())});return e.sort((n,r)=>n.address.localeCompare(r.address)),e}function OD(t){return fm(t).map(e=>[e.address,e.storageKeys])}function ND(t,e){if(null!=t.gasPrice){const r=Un.from(t.gasPrice),a=Un.from(t.maxFeePerGas||0);r.eq(a)||rs.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:a})}const n=[Ea(t.chainId||0,"chainId"),Ea(t.nonce||0,"nonce"),Ea(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Ea(t.maxFeePerGas||0,"maxFeePerGas"),Ea(t.gasLimit||0,"gasLimit"),null!=t.to?Cs(t.to):"0x",Ea(t.value||0,"value"),t.data||"0x",OD(t.accessList||[])];if(e){const r=sm(e);n.push(Ea(r.recoveryParam,"recoveryParam")),n.push(vp(r.r)),n.push(vp(r.s))}return va(["0x02",cb(n)])}function PD(t,e){const n=[Ea(t.chainId||0,"chainId"),Ea(t.nonce||0,"nonce"),Ea(t.gasPrice||0,"gasPrice"),Ea(t.gasLimit||0,"gasLimit"),null!=t.to?Cs(t.to):"0x",Ea(t.value||0,"value"),t.data||"0x",OD(t.accessList||[])];if(e){const r=sm(e);n.push(Ea(r.recoveryParam,"recoveryParam")),n.push(vp(r.r)),n.push(vp(r.s))}return va(["0x01",cb(n)])}function RD(t,e,n){try{const r=is(e[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");t.v=r}catch{rs.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=ro(e[1],32),t.s=ro(e[2],32);try{const r=Po(n(t));t.from=TD(r,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function fz(t){const e=_r(t);if(e[0]>127)return function lz(t){const e=OE(t);9!==e.length&&6!==e.length&&rs.throwArgumentError("invalid raw transaction","rawTransaction",t);const n={nonce:is(e[0]).toNumber(),gasPrice:is(e[1]),gasLimit:is(e[2]),to:VE(e[3]),value:is(e[4]),data:e[5],chainId:0};if(6===e.length)return n;try{n.v=Un.from(e[6]).toNumber()}catch{return n}if(n.r=ro(e[7],32),n.s=ro(e[8],32),Un.from(n.r).isZero()&&Un.from(n.s).isZero())n.chainId=n.v,n.v=0;else{n.chainId=Math.floor((n.v-35)/2),n.chainId<0&&(n.chainId=0);let r=n.v-27;const a=e.slice(0,6);0!==n.chainId&&(a.push(pr(n.chainId)),a.push("0x"),a.push("0x"),r-=2*n.chainId+8);const y=Po(cb(a));try{n.from=TD(y,{r:pr(n.r),s:pr(n.s),recoveryParam:r})}catch{}n.hash=Po(t)}return n.type=null,n}(e);switch(e[0]){case 1:return function cz(t){const e=OE(t.slice(1));8!==e.length&&11!==e.length&&rs.throwArgumentError("invalid component count for transaction type: 1","payload",pr(t));const n={type:1,chainId:is(e[0]).toNumber(),nonce:is(e[1]).toNumber(),gasPrice:is(e[2]),gasLimit:is(e[3]),to:VE(e[4]),value:is(e[5]),data:e[6],accessList:fm(e[7])};return 8===e.length||(n.hash=Po(t),RD(n,e.slice(8),PD)),n}(e);case 2:return function uz(t){const e=OE(t.slice(1));9!==e.length&&12!==e.length&&rs.throwArgumentError("invalid component count for transaction type: 2","payload",pr(t));const n=is(e[2]),r=is(e[3]),a={type:2,chainId:is(e[0]).toNumber(),nonce:is(e[1]).toNumber(),maxPriorityFeePerGas:n,maxFeePerGas:r,gasPrice:null,gasLimit:is(e[4]),to:VE(e[5]),value:is(e[6]),data:e[7],accessList:fm(e[8])};return 9===e.length||(a.hash=Po(t),RD(a,e.slice(9),ND)),a}(e)}return rs.throwError(`unsupported transaction type: ${e[0]}`,zt.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}function kD(t){t=atob(t);const e=[];for(let n=0;n{y[Z.toLowerCase()]=T}):r.headers.keys().forEach(T=>{y[T.toLowerCase()]=r.headers.get(T)}),{headers:y,statusCode:r.status,statusMessage:r.statusText,body:_r(new Uint8Array(a))}})}var gz=function(t,e,n,r){return new(n||(n=Promise))(function(y,T){function Z(ue){try{ie(r.next(ue))}catch(he){T(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){T(he)}}function ie(ue){ue.done?y(ue.value):function a(y){return y instanceof n?y:new n(function(T){T(y)})}(ue.value).then(Z,$)}ie((r=r.apply(t,e||[])).next())})};const Tu=new zt("web/5.7.1");function FD(t){return new Promise(e=>{setTimeout(e,t)})}function Tf(t,e){if(null==t)return null;if("string"==typeof t)return t;if(SE(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return sb(t)}catch{}return pr(t)}return t}function yz(t){return dl(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,n)=>String.fromCharCode(parseInt(n,16))))}function WE(t,e,n){let a=null;if(null!=e){a=dl(e);const y="string"==typeof t?{url:t}:Zs(t);y.headers?0!==Object.keys(y.headers).filter(Z=>"content-type"===Z.toLowerCase()).length||(y.headers=Zs(y.headers),y.headers["content-type"]="application/json"):y.headers={"content-type":"application/json"},t=y}return function mz(t,e,n){const r="object"==typeof t&&null!=t.throttleLimit?t.throttleLimit:12;Tu.assertArgument(r>0&&r%1==0,"invalid connection throttle limit","connection.throttleLimit",r);const a="object"==typeof t?t.throttleCallback:null,y="object"==typeof t&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;Tu.assertArgument(y>0&&y%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",y);const T="object"==typeof t&&!!t.errorPassThrough,Z={};let $=null;const ie={method:"GET"};let ue=!1,he=12e4;if("string"==typeof t)$=t;else if("object"==typeof t){if((null==t||null==t.url)&&Tu.throwArgumentError("missing URL","connection.url",t),$=t.url,"number"==typeof t.timeout&&t.timeout>0&&(he=t.timeout),t.headers)for(const Ue in t.headers)Z[Ue.toLowerCase()]={key:Ue,value:String(t.headers[Ue])},["if-none-match","if-modified-since"].indexOf(Ue.toLowerCase())>=0&&(ue=!0);if(ie.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==$.substring(0,6)&&!0!==t.allowInsecureAuthentication&&Tu.throwError("basic authentication requires a secure https url",zt.errors.INVALID_ARGUMENT,{argument:"url",url:$,user:t.user,password:"[REDACTED]"});const Ue=t.user+":"+t.password;Z.authorization={key:"Authorization",value:"Basic "+LD(dl(Ue))}}null!=t.skipFetchSetup&&(ie.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(ie.fetchOptions=Zs(t.fetchOptions))}const we=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),xe=$?$.match(we):null;if(xe)try{const Ue={statusCode:200,statusMessage:"OK",headers:{"content-type":xe[1]||"text/plain"},body:xe[2]?kD(xe[3]):yz(xe[3])};let $e=Ue.body;return n&&($e=n(Ue.body,Ue)),Promise.resolve($e)}catch(Ue){Tu.throwError("processing response error",zt.errors.SERVER_ERROR,{body:Tf(xe[1],xe[2]),error:Ue,requestBody:null,requestMethod:"GET",url:$})}e&&(ie.method="POST",ie.body=e,null==Z["content-type"]&&(Z["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==Z["content-length"]&&(Z["content-length"]={key:"Content-Length",value:String(e.length)}));const Ie={};Object.keys(Z).forEach(Ue=>{const $e=Z[Ue];Ie[$e.key]=$e.value}),ie.headers=Ie;const Le=function(){let Ue=null;return{promise:new Promise(function(ht,xt){he&&(Ue=setTimeout(()=>{null!=Ue&&(Ue=null,xt(Tu.makeError("timeout",zt.errors.TIMEOUT,{requestBody:Tf(ie.body,Ie["content-type"]),requestMethod:ie.method,timeout:he,url:$})))},he))}),cancel:function(){null!=Ue&&(clearTimeout(Ue),Ue=null)}}}(),je=function(){return gz(this,void 0,void 0,function*(){for(let Ue=0;Ue=300)&&(Le.cancel(),Tu.throwError("bad response",zt.errors.SERVER_ERROR,{status:$e.statusCode,headers:$e.headers,body:Tf(Je,$e.headers?$e.headers["content-type"]:null),requestBody:Tf(ie.body,Ie["content-type"]),requestMethod:ie.method,url:$})),n)try{const ht=yield n(Je,$e);return Le.cancel(),ht}catch(ht){if(ht.throttleRetry&&Ue{let Z=null;if(null!=y)try{Z=JSON.parse(sb(y))}catch($){Tu.throwError("invalid JSON",zt.errors.SERVER_ERROR,{body:y,error:$})}return n&&(Z=n(Z,T)),Z})}function dm(t,e){return e||(e={}),null==(e=Zs(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise(function(n,r){let a=null,y=!1;const T=()=>!y&&(y=!0,a&&clearTimeout(a),!0);e.timeout&&(a=setTimeout(()=>{T()&&r(new Error("timeout"))},e.timeout));const Z=e.retryLimit;let $=0;!function ie(){return t().then(function(ue){if(void 0!==ue)T()&&n(ue);else if(e.oncePoll)e.oncePoll.once("poll",ie);else if(e.onceBlock)e.onceBlock.once("block",ie);else if(!y){if($++,$>Z)return void(T()&&r(new Error("retry limit reached")));let he=e.interval*parseInt(String(Math.random()*Math.pow(2,$)));hee.ceiling&&(he=e.ceiling),setTimeout(ie,he)}return null},function(ue){T()&&r(ue)})}()})}var bz=function(t,e,n,r){return new(n||(n=Promise))(function(y,T){function Z(ue){try{ie(r.next(ue))}catch(he){T(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){T(he)}}function ie(ue){ue.done?y(ue.value):function a(y){return y instanceof n?y:new n(function(T){T(y)})}(ue.value).then(Z,$)}ie((r=r.apply(t,e||[])).next())})};const hm=new zt("abstract-provider/5.7.0");class wz extends SK{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class GE{constructor(){hm.checkAbstract(new.target,GE),Nr(this,"_isProvider",!0)}getFeeData(){return bz(this,void 0,void 0,function*(){const{block:e,gasPrice:n}=yield Ro({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(T=>null)});let r=null,a=null,y=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,y=Un.from("1500000000"),a=e.baseFeePerGas.mul(2).add(y)),{lastBaseFeePerGas:r,maxFeePerGas:a,maxPriorityFeePerGas:y,gasPrice:n}})}addListener(e,n){return this.on(e,n)}removeListener(e,n){return this.off(e,n)}static isProvider(e){return!(!e||!e._isProvider)}}class BD{constructor(e){Nr(this,"alphabet",e),Nr(this,"base",e.length),Nr(this,"_alphabetMap",{}),Nr(this,"_leader",e.charAt(0));for(let n=0;n0;)r.push(T%this.base),T=T/this.base|0}let a="";for(let y=0;0===n[y]&&y=0;--y)a+=this.alphabet[r[y]];return a}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let n=[];if(0===e.length)return new Uint8Array(n);n.push(0);for(let r=0;r>=8;for(;y>0;)n.push(255&y),y>>=8}for(let r=0;e[r]===this._leader&&r0&&Array.isArray(Z)?a(Z,T-1):n.push(Z)})};return a(t,e),n}function Mz(t){return function _z(t){let e=0;return()=>t[e++]}(function Sz(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),a=1,y=[0,1];for(let xt=1;xt>--$&1}const we=Math.pow(2,31),xe=we>>>1,Ie=xe>>1,Le=we-1;let je=0;for(let xt=0;xt<31;xt++)je=je<<1|ue();let Ue=[],$e=0,Je=we;for(;;){let xt=Math.floor(((je-$e+1)*a-1)/Je),Wt=0,An=r;for(;An-Wt>1;){let xn=Wt+An>>>1;xt>>1|ue(),rn=rn<<1^xe,un=(un^xe)<<1|xe|1;$e=rn,Je=1+un-rn}let ht=r-4;return Ue.map(xt=>{switch(xt-ht){case 3:return ht+65792+(t[Z++]<<16|t[Z++]<<8|t[Z++]);case 2:return ht+256+(t[Z++]<<8|t[Z++]);case 1:return ht+t[Z++];default:return xt-1}})}(t))}function Dz(t){return 1&t?~t>>1:t>>1}function UD(t,e){let n=Array(t);for(let r=0,a=-1;re[T]):n}function KD(t,e,n){let r=Array(t).fill(void 0).map(()=>[]);for(let a=0;ar[T].push(y));return r}function Oz(t,e){let n=1+e(),r=e(),a=function Tz(t){let e=[];for(;;){let n=t();if(0==n)break;e.push(n)}return e}(e);return jD(KD(a.length,1+t,e).map((T,Z)=>{const $=T[0],ie=T.slice(1);return Array(a[Z]).fill(void 0).map((ue,he)=>{let we=he*r;return[$+he*n,ie.map(xe=>xe+we)]})}))}function Nz(t,e){return KD(1+e(),1+t,e).map(a=>[a[0],a.slice(1)])}const vb=function Rz(){return Mz(kD("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/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DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}(),kz=new Set(mb(vb)),Lz=new Set(mb(vb)),Fz=function xz(t){let e=[];for(;;){let n=t();if(0==n)break;e.push(Oz(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(Nz(n,t))}return function Ez(t){const e={};for(let n=0;nr-a);return function n(){let r=[];for(;;){let ie=mb(t,e);if(0==ie.length)break;r.push({set:new Set(ie),node:n()})}r.sort((ie,ue)=>ue.set.size-ie.set.size);let a=t(),y=a%3;a=a/3|0;let T=!!(1&a);return a>>=1,{branches:r,valid:y,fe0f:T,save:1==a,check:2==a}}()}(vb),zD=45,VD=95;function HD(t){return function mK(t,e=am.current){return DE(dl(t,e))}(t)}function jz(t){return t.filter(e=>65039!=e)}function WD(t){for(let e of t.split(".")){let n=HD(e);try{for(let r=n.lastIndexOf(VD)-1;r>=0;r--)if(n[r]!==VD)throw new Error("underscore only allowed at start");if(n.length>=4&&n.every(r=>r<128)&&n[2]===zD&&n[3]===zD)throw new Error("invalid label extension")}catch(r){throw new Error(`Invalid label "${e}": ${r.message}`)}}return t}function Uz(t){return WD(function Kz(t,e){let n=HD(t).reverse(),r=[];for(;n.length;){let a=Vz(n);if(a){r.push(...e(a));continue}let y=n.pop();if(kz.has(y)){r.push(y);continue}if(Lz.has(y))continue;let T=Fz[y];if(!T)throw new Error(`Disallowed codepoint: 0x${y.toString(16).toUpperCase()}`);r.push(...T)}return WD(function zz(t){return t.normalize("NFC")}(String.fromCodePoint(...r)))}(t,jz))}function Vz(t,e){var n;let a,y,r=Bz,T=[],Z=t.length;for(e&&(e.length=0);Z;){let $=t[--Z];if(r=null===(n=r.branches.find(ie=>ie.set.has($)))||void 0===n?void 0:n.node,!r)break;if(r.save)y=$;else if(r.check&&$===y)break;T.push($),r.fe0f&&(T.push(65039),Z>0&&65039==t[Z-1]&&Z--),r.valid&&(a=T.slice(),2==r.valid&&a.splice(1,1),e&&e.push(...t.slice(Z).reverse()),t.length=Z)}return a}const Hz=new zt(mD),GD=new Uint8Array(32);function ZD(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function bb(t){const e=dl(Uz(t)),n=[];if(0===t.length)return n;let r=0;for(let a=0;a=e.length)throw new Error("invalid ENS name; empty component");return n.push(ZD(e.slice(r))),n}function wb(t){"string"!=typeof t&&Hz.throwArgumentError("invalid ENS name; not a string","name",t);let e=GD;const n=bb(t);for(;n.length;)e=Po(Df([e,Po(n.pop())]));return pr(e)}function Wz(t){return pr(Df(bb(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const n=new Uint8Array(e.length+1);return n.set(e,1),n[0]=n.length-1,n})))+"00"}GD.fill(0);const YD=new zt("networks/5.7.1");function pl(t){const e=function(n,r){null==r&&(r={});const a=[];if(n.InfuraProvider&&"-"!==r.infura)try{a.push(new n.InfuraProvider(t,r.infura))}catch{}if(n.EtherscanProvider&&"-"!==r.etherscan)try{a.push(new n.EtherscanProvider(t,r.etherscan))}catch{}if(n.AlchemyProvider&&"-"!==r.alchemy)try{a.push(new n.AlchemyProvider(t,r.alchemy))}catch{}if(n.PocketProvider&&"-"!==r.pocket){const y=["goerli","ropsten","rinkeby","sepolia"];try{const T=new n.PocketProvider(t,r.pocket);T.network&&-1===y.indexOf(T.network.name)&&a.push(T)}catch{}}if(n.CloudflareProvider&&"-"!==r.cloudflare)try{a.push(new n.CloudflareProvider(t))}catch{}if(n.AnkrProvider&&"-"!==r.ankr)try{const y=["ropsten"],T=new n.AnkrProvider(t,r.ankr);T.network&&-1===y.indexOf(T.network.name)&&a.push(T)}catch{}if(0===a.length)return null;if(n.FallbackProvider){let y=1;return null!=r.quorum?y=r.quorum:"homestead"===t&&(y=2),new n.FallbackProvider(a,y)}return a[0]};return e.renetwork=function(n){return pl(n)},e}function Ab(t,e){const n=function(r,a){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null};return n.renetwork=function(r){return Ab(t,r)},n}const JD={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:pl("homestead")},QD={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:pl("ropsten")},XD={chainId:63,name:"classicMordor",_defaultProvider:Ab("https://www.ethercluster.com/mordor","classicMordor")},Eb={unspecified:{chainId:0,name:"unspecified"},homestead:JD,mainnet:JD,morden:{chainId:2,name:"morden"},ropsten:QD,testnet:QD,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:pl("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:pl("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:pl("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:pl("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Ab("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:XD,classicTestnet:XD,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Ab("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:pl("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:pl("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};new zt("sha2/5.7.0");function qD(t){return"0x"+hc().sha256().update(_r(t)).digest("hex")}var Xz=g(70988),$D=g.n(Xz);const pm=new zt(ub);class Fn{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},n=this.address.bind(this),r=this.bigNumber.bind(this),a=this.blockTag.bind(this),y=this.data.bind(this),T=this.hash.bind(this),Z=this.hex.bind(this),$=this.number.bind(this),ie=this.type.bind(this);return e.transaction={hash:T,type:ie,accessList:Fn.allowNull(this.accessList.bind(this),null),blockHash:Fn.allowNull(T,null),blockNumber:Fn.allowNull($,null),transactionIndex:Fn.allowNull($,null),confirmations:Fn.allowNull($,null),from:n,gasPrice:Fn.allowNull(r),maxPriorityFeePerGas:Fn.allowNull(r),maxFeePerGas:Fn.allowNull(r),gasLimit:r,to:Fn.allowNull(n,null),value:r,nonce:$,data:y,r:Fn.allowNull(this.uint256),s:Fn.allowNull(this.uint256),v:Fn.allowNull($),creates:Fn.allowNull(n,null),raw:Fn.allowNull(y)},e.transactionRequest={from:Fn.allowNull(n),nonce:Fn.allowNull($),gasLimit:Fn.allowNull(r),gasPrice:Fn.allowNull(r),maxPriorityFeePerGas:Fn.allowNull(r),maxFeePerGas:Fn.allowNull(r),to:Fn.allowNull(n),value:Fn.allowNull(r),data:Fn.allowNull(he=>this.data(he,!0)),type:Fn.allowNull($),accessList:Fn.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:$,blockNumber:$,transactionHash:T,address:n,topics:Fn.arrayOf(T),data:y,logIndex:$,blockHash:T},e.receipt={to:Fn.allowNull(this.address,null),from:Fn.allowNull(this.address,null),contractAddress:Fn.allowNull(n,null),transactionIndex:$,root:Fn.allowNull(Z),gasUsed:r,logsBloom:Fn.allowNull(y),blockHash:T,transactionHash:T,logs:Fn.arrayOf(this.receiptLog.bind(this)),blockNumber:$,confirmations:Fn.allowNull($,null),cumulativeGasUsed:r,effectiveGasPrice:Fn.allowNull(r),status:Fn.allowNull($),type:ie},e.block={hash:Fn.allowNull(T),parentHash:T,number:$,timestamp:$,nonce:Fn.allowNull(Z),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:Fn.allowNull(n),extraData:y,transactions:Fn.allowNull(Fn.arrayOf(T)),baseFeePerGas:Fn.allowNull(r)},e.blockWithTransactions=Zs(e.block),e.blockWithTransactions.transactions=Fn.allowNull(Fn.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Fn.allowNull(a,void 0),toBlock:Fn.allowNull(a,void 0),blockHash:Fn.allowNull(T,void 0),address:Fn.allowNull(n,void 0),topics:Fn.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Fn.allowNull($),blockHash:Fn.allowNull(T),transactionIndex:$,removed:Fn.allowNull(this.boolean.bind(this)),address:n,data:Fn.allowFalsish(y,"0x"),topics:Fn.arrayOf(T),transactionHash:T,logIndex:$},e}accessList(e){return fm(e||[])}number(e){return"0x"===e?0:Un.from(e).toNumber()}type(e){return"0x"===e||null==e?0:Un.from(e).toNumber()}bigNumber(e){return Un.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,n){return"string"==typeof e&&(!n&&"0x"!==e.substring(0,2)&&(e="0x"+e),gi(e))?e.toLowerCase():pm.throwArgumentError("invalid hash","value",e)}data(e,n){const r=this.hex(e,n);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return Cs(e)}callAddress(e){if(!gi(e,32))return null;const n=Cs(Ds(e,12));return"0x0000000000000000000000000000000000000000"===n?null:n}contractAddress(e){return function RK(t){let e=null;try{e=Cs(t.from)}catch{Cf.throwArgumentError("missing from address","transaction",t)}return Cs(Ds(Po(cb([e,vp(_r(Un.from(t.nonce).toHexString()))])),12))}(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||gi(e))return ME(e);throw new Error("invalid blockTag")}hash(e,n){const r=this.hex(e,n);return 32!==rh(r)?pm.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const n=Un.from(e);try{return n.toNumber()}catch{}return null}uint256(e){if(!gi(e))throw new Error("invalid uint256");return ro(e,32)}_block(e,n){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,a=Fn.check(n,e);return a._difficulty=null==r?null:Un.from(r),a}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Fn.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&Un.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),(1===e.type||2===e.type)&&null==e.accessList&&(e.accessList=[]);const n=Fn.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;gi(r)&&(r=Un.from(r).toNumber()),n.chainId=r}else{let r=e.networkId;null==r&&null==n.v&&(r=e.chainId),gi(r)&&(r=Un.from(r).toNumber()),"number"!=typeof r&&null!=n.v&&(r=(n.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),n.chainId=r}return n.blockHash&&"x"===n.blockHash.replace(/0/g,"")&&(n.blockHash=null),n}transaction(e){return fz(e)}receiptLog(e){return Fn.check(this.formats.receiptLog,e)}receipt(e){const n=Fn.check(this.formats.receipt,e);if(null!=n.root)if(n.root.length<=4){const r=Un.from(n.root).toNumber();0===r||1===r?(null!=n.status&&n.status!==r&&pm.throwArgumentError("alt-root-status/status mismatch","value",{root:n.root,status:n.status}),n.status=r,delete n.root):pm.throwArgumentError("invalid alt-root-status","value.root",n.root)}else 66!==n.root.length&&pm.throwArgumentError("invalid root hash","value.root",n.root);return null!=n.status&&(n.byzantium=!0),n}topics(e){return Array.isArray(e)?e.map(n=>this.topics(n)):null!=e?this.hash(e,!0):null}filter(e){return Fn.check(this.formats.filter,e)}filterLog(e){return Fn.check(this.formats.filterLog,e)}static check(e,n){const r={};for(const a in e)try{const y=e[a](n[a]);void 0!==y&&(r[a]=y)}catch(y){throw y.checkKey=a,y.checkValue=n[a],y}return r}static allowNull(e,n){return function(r){return null==r?n:e(r)}}static allowFalsish(e,n){return function(r){return r?e(r):n}}static arrayOf(e){return function(n){if(!Array.isArray(n))throw new Error("not an array");const r=[];return n.forEach(function(a){r.push(e(a))}),r}}}var gr=function(t,e,n,r){return new(n||(n=Promise))(function(y,T){function Z(ue){try{ie(r.next(ue))}catch(he){T(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){T(he)}}function ie(ue){ue.done?y(ue.value):function a(y){return y instanceof n?y:new n(function(T){T(y)})}(ue.value).then(Z,$)}ie((r=r.apply(t,e||[])).next())})};const Dr=new zt(ub);function tC(t){return null==t?"null":(32!==rh(t)&&Dr.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function nC(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map(e=>{if(Array.isArray(e)){const n={};e.forEach(a=>{n[tC(a)]=!0});const r=Object.keys(n);return r.sort(),r.join("|")}return tC(e)}).join("&")}function wp(t){if("string"==typeof t){if(32===rh(t=t.toLowerCase()))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+nC(t);if(wz.isForkEvent(t))throw Dr.warn("not implemented"),new Error("not implemented");if(t&&"object"==typeof t)return"filter:"+(t.address||"*")+":"+nC(t.topics||[])}throw new Error("invalid event - "+t)}function gm(){return(new Date).getTime()}function rC(t){return new Promise(e=>{setTimeout(e,t)})}const nV=["block","network","pending","poll"];class rV{constructor(e,n,r){Nr(this,"tag",e),Nr(this,"listener",n),Nr(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const n=e[1],r=function tV(t){return""===t?[]:t.split(/&/g).map(e=>{if(""===e)return[];const n=e.split("|").map(r=>"null"===r?null:r);return 1===n.length?n[0]:n})}(e[2]),a={};return r.length>0&&(a.topics=r),n&&"*"!==n&&(a.address=n),a}pollable(){return this.tag.indexOf(":")>=0||nV.indexOf(this.tag)>=0}}const iV={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function YE(t){return ro(Un.from(t).toHexString(),32)}function iC(t){return ZE.encode(Df([t,Ds(qD(qD(t)),0,4)]))}const oC=new RegExp("^(ipfs)://(.*)$","i"),sC=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),oC,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Sb(t,e){try{return sb(ym(t,e))}catch{}return null}function ym(t,e){if("0x"===t)return null;const n=Un.from(Ds(t,e,e+32)).toNumber(),r=Un.from(Ds(t,n,n+32)).toNumber();return Ds(t,n+32,n+32+r)}function JE(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Dr.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function aC(t){const e=_r(t);if(e.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(e,32-e.length),n}function oV(t){if(t.length%32==0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function uC(t){const e=[];let n=0;for(let r=0;rUn.from(e).eq(1)).catch(e=>{if(e.code===zt.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,n){return gr(this,void 0,void 0,function*(){const r={to:this.address,ccipReadEnabled:!0,data:va([e,wb(this.name),n||"0x"])};let a=!1;(yield this.supportsWildcard())&&(a=!0,r.data=va(["0x9061b923",uC([Wz(this.name),r.data])]));try{let y=yield this.provider.call(r);return _r(y).length%32==4&&Dr.throwError("resolver threw error",zt.errors.CALL_EXCEPTION,{transaction:r,data:y}),a&&(y=ym(y,0)),y}catch(y){if(y.code===zt.errors.CALL_EXCEPTION)return null;throw y}})}_fetchBytes(e,n){return gr(this,void 0,void 0,function*(){const r=yield this._fetch(e,n);return null!=r?ym(r,0):null})}_getAddress(e,n){const r=iV[String(e)];if(null==r&&Dr.throwError(`unsupported coin type: ${e}`,zt.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(n);const a=_r(n);if(null!=r.p2pkh){const y=n.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(y){const T=parseInt(y[1],16);if(y[2].length===2*T&&T>=1&&T<=75)return iC(Df([[r.p2pkh],"0x"+y[2]]))}}if(null!=r.p2sh){const y=n.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(y){const T=parseInt(y[1],16);if(y[2].length===2*T&&T>=1&&T<=75)return iC(Df([[r.p2sh],"0x"+y[2]]))}}if(null!=r.prefix){const y=a[1];let T=a[0];if(0===T?20!==y&&32!==y&&(T=-1):T=-1,T>=0&&a.length===2+y&&y>=1&&y<=75){const Z=$D().toWords(a.slice(2));return Z.unshift(T),$D().encode(r.prefix,Z)}}return null}getAddress(e){return gr(this,void 0,void 0,function*(){if(null==e&&(e=60),60===e)try{const a=yield this._fetch("0x3b3b57de");return"0x"===a||"0x0000000000000000000000000000000000000000000000000000000000000000"===a?null:this.provider.formatter.callAddress(a)}catch(a){if(a.code===zt.errors.CALL_EXCEPTION)return null;throw a}const n=yield this._fetchBytes("0xf1cb7e06",YE(e));if(null==n||"0x"===n)return null;const r=this._getAddress(e,n);return null==r&&Dr.throwError("invalid or unsupported coin data",zt.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:n}),r})}getAvatar(){return gr(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const n=yield this.getText("avatar");if(null==n)return null;for(let r=0;rT[$])}return Dr.throwError("invalid or unsupported content hash data",zt.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return gr(this,void 0,void 0,function*(){let n=dl(e);n=Df([YE(64),YE(n.length),n]),n.length%32!=0&&(n=Df([n,ro("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",pr(n));return null==r||"0x"===r?null:sb(r)})}}let QE=null,sV=1;class aV extends GE{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),Nr(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(n=>{}),this._ready().catch(n=>{});else{const n=um(new.target,"getNetwork")(e);n?(Nr(this,"_network",n),this.emit("network",n,null)):Dr.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return gr(this,void 0,void 0,function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}null==e&&(e=yield this.detectNetwork()),e||Dr.throwError("no network detected",zt.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:Nr(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return dm(()=>this._ready().then(e=>e,e=>{if(e.code!==zt.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}static getFormatter(){return null==QE&&(QE=new Fn),QE}static getNetwork(e){return function Yz(t){if(null==t)return null;if("number"==typeof t){for(const r in Eb){const a=Eb[r];if(a.chainId===t)return{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress||null,_defaultProvider:a._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"==typeof t){const r=Eb[t];return null==r?null:{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress,_defaultProvider:r._defaultProvider||null}}const e=Eb[t.name];if(!e)return"number"!=typeof t.chainId&&YD.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&YD.throwArgumentError("network chainId mismatch","network",t);let n=t._defaultProvider||null;return null==n&&e._defaultProvider&&(n=function Zz(t){return t&&"function"==typeof t.renetwork}(e._defaultProvider)?e._defaultProvider.renetwork(t):e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:n}}(e??"homestead")}ccipReadFetch(e,n,r){return gr(this,void 0,void 0,function*(){if(this.disableCcipRead||0===r.length)return null;const a=e.to.toLowerCase(),y=n.toLowerCase(),T=[];for(let Z=0;Z=0?null:JSON.stringify({data:y,sender:a}),he=yield WE({url:ie,errorPassThrough:!0},ue,(xe,Ie)=>(xe.status=Ie.statusCode,xe));if(he.data)return he.data;const we=he.message||"unknown error";if(he.status>=400&&he.status<500)return Dr.throwError(`response not found during CCIP fetch: ${we}`,zt.errors.SERVER_ERROR,{url:$,errorMessage:we});T.push(we)}return Dr.throwError(`error encountered during CCIP fetch: ${T.map(Z=>JSON.stringify(Z)).join(", ")}`,zt.errors.SERVER_ERROR,{urls:r,errorMessages:T})})}_getInternalBlockNumber(e){return gr(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const a=this._internalBlockNumber;try{const y=yield a;if(gm()-y.respTime<=e)return y.blockNumber;break}catch{if(this._internalBlockNumber===a)break}}const n=gm(),r=Ro({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(a=>null,a=>a)}).then(({blockNumber:a,networkError:y})=>{if(y)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),y;const T=gm();return(a=Un.from(a).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)}),(yield r).blockNumber})}poll(){return gr(this,void 0,void 0,function*(){const e=sV++,n=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(a){return void this.emit("error",a)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)Dr.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",Dr.makeError("network block skew detected",zt.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let a=this._emitted.block+1;a<=r;a++)this.emit("block",a);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach(a=>{if("block"===a)return;const y=this._emitted[a];"pending"!==y&&r-y>12&&delete this._emitted[a]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach(a=>{switch(a.type){case"tx":{const y=a.hash;let T=this.getTransactionReceipt(y).then(Z=>(!Z||null==Z.blockNumber||(this._emitted["t:"+y]=Z.blockNumber,this.emit(y,Z)),null)).catch(Z=>{this.emit("error",Z)});n.push(T);break}case"filter":if(!a._inflight){a._inflight=!0,-2===a._lastBlockNumber&&(a._lastBlockNumber=r-1);const y=a.filter;y.fromBlock=a._lastBlockNumber+1,y.toBlock=r;const T=y.toBlock-this._maxFilterBlockRange;T>y.fromBlock&&(y.fromBlock=T),y.fromBlock<0&&(y.fromBlock=0);const Z=this.getLogs(y).then($=>{a._inflight=!1,0!==$.length&&$.forEach(ie=>{ie.blockNumber>a._lastBlockNumber&&(a._lastBlockNumber=ie.blockNumber),this._emitted["b:"+ie.blockHash]=ie.blockNumber,this._emitted["t:"+ie.transactionHash]=ie.blockNumber,this.emit(y,ie)})}).catch($=>{this.emit("error",$),a._inflight=!1});n.push(Z)}}}),this._lastBlockNumber=r,Promise.all(n).then(()=>{this.emit("didPoll",e)}).catch(a=>{this.emit("error",a)})}else this.emit("didPoll",e)})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return gr(this,void 0,void 0,function*(){return Dr.throwError("provider does not support network detection",zt.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return gr(this,void 0,void 0,function*(){const e=yield this._ready(),n=yield this.detectNetwork();if(e.chainId!==n.chainId){if(this.anyNetwork)return this._network=n,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",n,e),yield rC(0),this._network;const r=Dr.makeError("underlying network changed",zt.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:n});throw this.emit("error",r),r}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=gm();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(n=>((null==this._fastBlockNumber||n>this._fastBlockNumber)&&(this._fastBlockNumber=n),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,n,r){return gr(this,void 0,void 0,function*(){return this._waitForTransaction(e,n??1,r||0,null)})}_waitForTransaction(e,n,r,a){return gr(this,void 0,void 0,function*(){const y=yield this.getTransactionReceipt(e);return(y?y.confirmations:0)>=n?y:new Promise((T,Z)=>{const $=[];let ie=!1;const ue=function(){return!!ie||(ie=!0,$.forEach(we=>{we()}),!1)},he=we=>{we.confirmations{this.removeListener(e,he)}),a){let we=a.startBlock,xe=null;const Ie=Le=>gr(this,void 0,void 0,function*(){ie||(yield rC(1e3),this.getTransactionCount(a.from).then(je=>gr(this,void 0,void 0,function*(){if(!ie){if(je<=a.nonce)we=Le;else{{const Ue=yield this.getTransaction(e);if(Ue&&null!=Ue.blockNumber)return}for(null==xe&&(xe=we-3,xe{ie||this.once("block",Ie)}))});if(ie)return;this.once("block",Ie),$.push(()=>{this.removeListener("block",Ie)})}if("number"==typeof r&&r>0){const we=setTimeout(()=>{ue()||Z(Dr.makeError("timeout exceeded",zt.errors.TIMEOUT,{timeout:r}))},r);we.unref&&we.unref(),$.push(()=>{clearTimeout(we)})}})})}getBlockNumber(){return gr(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Un.from(e)}catch(n){return Dr.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:n})}})}getBalance(e,n){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),a=yield this.perform("getBalance",r);try{return Un.from(a)}catch(y){return Dr.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getBalance",params:r,result:a,error:y})}})}getTransactionCount(e,n){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),a=yield this.perform("getTransactionCount",r);try{return Un.from(a).toNumber()}catch(y){return Dr.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:a,error:y})}})}getCode(e,n){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),a=yield this.perform("getCode",r);try{return pr(a)}catch(y){return Dr.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getCode",params:r,result:a,error:y})}})}getStorageAt(e,n,r){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const a=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(n).then(T=>ME(T))}),y=yield this.perform("getStorageAt",a);try{return pr(y)}catch(T){return Dr.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getStorageAt",params:a,result:y,error:T})}})}_wrapTransaction(e,n,r){if(null!=n&&32!==rh(n))throw new Error("invalid response - sendTransaction");const a=e;return null!=n&&e.hash!==n&&Dr.throwError("Transaction hash mismatch from Provider.sendTransaction.",zt.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:n}),a.wait=(y,T)=>gr(this,void 0,void 0,function*(){let Z;null==y&&(y=1),null==T&&(T=0),0!==y&&null!=r&&(Z={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const $=yield this._waitForTransaction(e.hash,y,T,Z);return null==$&&0===y?null:(this._emitted["t:"+e.hash]=$.blockNumber,0===$.status&&Dr.throwError("transaction failed",zt.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:$}),$)}),a}sendTransaction(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Promise.resolve(e).then(y=>pr(y)),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const a=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const y=yield this.perform("sendTransaction",{signedTransaction:n});return this._wrapTransaction(r,y,a)}catch(y){throw y.transaction=r,y.transactionHash=r.hash,y}})}_getTransactionRequest(e){return gr(this,void 0,void 0,function*(){const n=yield e,r={};return["from","to"].forEach(a=>{null!=n[a]&&(r[a]=Promise.resolve(n[a]).then(y=>y?this._getAddress(y):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(a=>{null!=n[a]&&(r[a]=Promise.resolve(n[a]).then(y=>y?Un.from(y):null))}),["type"].forEach(a=>{null!=n[a]&&(r[a]=Promise.resolve(n[a]).then(y=>y??null))}),n.accessList&&(r.accessList=this.formatter.accessList(n.accessList)),["data"].forEach(a=>{null!=n[a]&&(r[a]=Promise.resolve(n[a]).then(y=>y?pr(y):null))}),this.formatter.transactionRequest(yield Ro(r))})}_getFilter(e){return gr(this,void 0,void 0,function*(){e=yield e;const n={};return null!=e.address&&(n.address=this._getAddress(e.address)),["blockHash","topics"].forEach(r=>{null!=e[r]&&(n[r]=e[r])}),["fromBlock","toBlock"].forEach(r=>{null!=e[r]&&(n[r]=this._getBlockTag(e[r]))}),this.formatter.filter(yield Ro(n))})}_call(e,n,r){return gr(this,void 0,void 0,function*(){r>=10&&Dr.throwError("CCIP read exceeded maximum redirections",zt.errors.SERVER_ERROR,{redirects:r,transaction:e});const a=e.to,y=yield this.perform("call",{transaction:e,blockTag:n});if(r>=0&&"latest"===n&&null!=a&&"0x556f1830"===y.substring(0,10)&&rh(y)%32==4)try{const T=Ds(y,4),Z=Ds(T,0,32);Un.from(Z).eq(a)||Dr.throwError("CCIP Read sender did not match",zt.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:y});const $=[],ie=Un.from(Ds(T,32,64)).toNumber(),ue=Un.from(Ds(T,ie,ie+32)).toNumber(),he=Ds(T,ie+32);for(let Ue=0;Uegr(this,void 0,void 0,function*(){const y=yield this.perform("getBlock",a);if(null==y)return null!=a.blockHash&&null==this._emitted["b:"+a.blockHash]||null!=a.blockTag&&r>this._emitted.block?null:void 0;if(n){let T=null;for(let $=0;$this._wrapTransaction($)),Z}return this.formatter.block(y)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const n={transactionHash:this.formatter.hash(e,!0)};return dm(()=>gr(this,void 0,void 0,function*(){const r=yield this.perform("getTransaction",n);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const a=this.formatter.transactionResponse(r);if(null==a.blockNumber)a.confirmations=0;else if(null==a.confirmations){let T=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-a.blockNumber+1;T<=0&&(T=1),a.confirmations=T}return this._wrapTransaction(a)}),{oncePoll:this})})}getTransactionReceipt(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const n={transactionHash:this.formatter.hash(e,!0)};return dm(()=>gr(this,void 0,void 0,function*(){const r=yield this.perform("getTransactionReceipt",n);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const a=this.formatter.receipt(r);if(null==a.blockNumber)a.confirmations=0;else if(null==a.confirmations){let T=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-a.blockNumber+1;T<=0&&(T=1),a.confirmations=T}return a}),{oncePoll:this})})}getLogs(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ro({filter:this._getFilter(e)}),r=yield this.perform("getLogs",n);return r.forEach(a=>{null==a.removed&&(a.removed=!1)}),Fn.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)})}getEtherPrice(){return gr(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return gr(this,void 0,void 0,function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&Dr.throwArgumentError("invalid BlockTag","blockTag",e);let n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return n+=e,n<0&&(n=0),this.formatter.blockTag(n)}return this.formatter.blockTag(e)})}getResolver(e){return gr(this,void 0,void 0,function*(){let n=e;for(;;){if(""===n||"."===n||"eth"!==e&&"eth"===n)return null;const r=yield this._getResolver(n,"getResolver");if(null!=r){const a=new cC(this,r,e);return n===e||(yield a.supportsWildcard())?a:null}n=n.split(".").slice(1).join(".")}})}_getResolver(e,n){return gr(this,void 0,void 0,function*(){null==n&&(n="ENS");const r=yield this.getNetwork();r.ensAddress||Dr.throwError("network does not support ENS",zt.errors.UNSUPPORTED_OPERATION,{operation:n,network:r.name});try{const a=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+wb(e).substring(2)});return this.formatter.callAddress(a)}catch{}return null})}resolveName(e){return gr(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(r){if(gi(e))throw r}"string"!=typeof e&&Dr.throwArgumentError("invalid ENS name","name",e);const n=yield this.getResolver(e);return n?yield n.getAddress():null})}lookupAddress(e){return gr(this,void 0,void 0,function*(){e=yield e;const n=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(n,"lookupAddress");if(null==r)return null;const a=Sb(yield this.call({to:r,data:"0x691f3431"+wb(n).substring(2)}),0);return(yield this.resolveName(a))!=e?null:a})}getAvatar(e){return gr(this,void 0,void 0,function*(){let n=null;if(gi(e)){const y=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",T=yield this._getResolver(y,"getAvatar");if(!T)return null;n=new cC(this,T,y);try{const Z=yield n.getAvatar();if(Z)return Z.url}catch(Z){if(Z.code!==zt.errors.CALL_EXCEPTION)throw Z}try{const Z=Sb(yield this.call({to:T,data:"0x691f3431"+wb(y).substring(2)}),0);n=yield this.getResolver(Z)}catch(Z){if(Z.code!==zt.errors.CALL_EXCEPTION)throw Z;return null}}else if(n=yield this.getResolver(e),!n)return null;const r=yield n.getAvatar();return null==r?null:r.url})}perform(e,n){return Dr.throwError(e+" not implemented",zt.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(n=>n.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(n=>n.pollable()).length>0}_addEventListener(e,n,r){const a=new rV(wp(e),n,r);return this._events.push(a),this._startEvent(a),this}on(e,n){return this._addEventListener(e,n,!1)}once(e,n){return this._addEventListener(e,n,!0)}emit(e,...n){let r=!1,a=[],y=wp(e);return this._events=this._events.filter(T=>T.tag!==y||(setTimeout(()=>{T.listener.apply(this,n)},0),r=!0,!T.once||(a.push(T),!1))),a.forEach(T=>{this._stopEvent(T)}),r}listenerCount(e){if(!e)return this._events.length;let n=wp(e);return this._events.filter(r=>r.tag===n).length}listeners(e){if(null==e)return this._events.map(r=>r.listener);let n=wp(e);return this._events.filter(r=>r.tag===n).map(r=>r.listener)}off(e,n){if(null==n)return this.removeAllListeners(e);const r=[];let a=!1,y=wp(e);return this._events=this._events.filter(T=>!(T.tag===y&&T.listener==n&&!a)||(a=!0,r.push(T),!1)),r.forEach(T=>{this._stopEvent(T)}),this}removeAllListeners(e){let n=[];if(null==e)n=this._events,this._events=[];else{const r=wp(e);this._events=this._events.filter(a=>a.tag!==r||(n.push(a),!1))}return n.forEach(r=>{this._stopEvent(r)}),this}}var gl=function(t,e,n,r){return new(n||(n=Promise))(function(y,T){function Z(ue){try{ie(r.next(ue))}catch(he){T(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){T(he)}}function ie(ue){ue.done?y(ue.value):function a(y){return y instanceof n?y:new n(function(T){T(y)})}(ue.value).then(Z,$)}ie((r=r.apply(t,e||[])).next())})};const io=new zt(ub),uV=["call","estimateGas"];function mm(t,e){if(null==t)return null;if("string"==typeof t.message&&t.message.match("reverted")){const n=gi(t.data)?t.data:null;if(!e||n)return{message:t.message,data:n}}if("object"==typeof t){for(const n in t){const r=mm(t[n],e);if(r)return r}return null}if("string"==typeof t)try{return mm(JSON.parse(t),e)}catch{}return null}function lC(t,e,n){const r=n.transaction||n.signedTransaction;if("call"===t){const y=mm(e,!0);if(y)return y.data;io.throwError("missing revert data in call exception; Transaction reverted without a reason string",zt.errors.CALL_EXCEPTION,{data:"0x",transaction:r,error:e})}if("estimateGas"===t){let y=mm(e.body,!1);null==y&&(y=mm(e,!1)),y&&io.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",zt.errors.UNPREDICTABLE_GAS_LIMIT,{reason:y.message,method:t,transaction:r,error:e})}let a=e.message;throw e.code===zt.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?a=e.error.message:"string"==typeof e.body?a=e.body:"string"==typeof e.responseText&&(a=e.responseText),a=(a||"").toLowerCase(),a.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&io.throwError("insufficient funds for intrinsic transaction cost",zt.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:r}),a.match(/nonce (is )?too low/i)&&io.throwError("nonce has already been used",zt.errors.NONCE_EXPIRED,{error:e,method:t,transaction:r}),a.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&io.throwError("replacement fee too low",zt.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:r}),a.match(/only replay-protected/i)&&io.throwError("legacy pre-eip-155 transactions not supported",zt.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:r}),uV.indexOf(t)>=0&&a.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&io.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",zt.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:r}),e}function fC(t){return new Promise(function(e){setTimeout(e,t)})}function cV(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function vm(t){return t&&t.toLowerCase()}const XE={};class dC extends xE{constructor(e,n,r){if(super(),e!==XE)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");Nr(this,"provider",n),null==r&&(r=0),"string"==typeof r?(Nr(this,"_address",this.provider.formatter.address(r)),Nr(this,"_index",null)):"number"==typeof r?(Nr(this,"_index",r),Nr(this,"_address",null)):io.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return io.throwError("cannot alter JSON-RPC Signer connection",zt.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new lV(XE,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&io.throwError("unknown account #"+this._index,zt.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Zs(e);const n=this.getAddress().then(r=>(r&&(r=r.toLowerCase()),r));if(null==e.gasLimit){const r=Zs(e);r.from=n,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then(r=>gl(this,void 0,void 0,function*(){if(null==r)return null;const a=yield this.provider.resolveName(r);return null==a&&io.throwArgumentError("provided ENS name resolves to null","tx.to",r),a}))),Ro({tx:Ro(e),sender:n}).then(({tx:r,sender:a})=>{null!=r.from?r.from.toLowerCase()!==a&&io.throwArgumentError("from address mismatch","transaction",e):r.from=a;const y=this.provider.constructor.hexlifyTransaction(r,{from:!0});return this.provider.send("eth_sendTransaction",[y]).then(T=>T,T=>("string"==typeof T.message&&T.message.match(/user denied/i)&&io.throwError("user rejected transaction",zt.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:r}),lC("sendTransaction",T,y)))})}signTransaction(e){return io.throwError("signing transactions is unsupported",zt.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return gl(this,void 0,void 0,function*(){const n=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield dm(()=>gl(this,void 0,void 0,function*(){const a=yield this.provider.getTransaction(r);if(null!==a)return this.provider._wrapTransaction(a,r,n)}),{oncePoll:this.provider})}catch(a){throw a.transactionHash=r,a}})}signMessage(e){return gl(this,void 0,void 0,function*(){const n="string"==typeof e?dl(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[pr(n),r.toLowerCase()])}catch(a){throw"string"==typeof a.message&&a.message.match(/user denied/i)&&io.throwError("user rejected signing",zt.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),a}})}_legacySignMessage(e){return gl(this,void 0,void 0,function*(){const n="string"==typeof e?dl(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),pr(n)])}catch(a){throw"string"==typeof a.message&&a.message.match(/user denied/i)&&io.throwError("user rejected signing",zt.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),a}})}_signTypedData(e,n,r){return gl(this,void 0,void 0,function*(){const a=yield wa.resolveNames(e,n,r,T=>this.provider.resolveName(T)),y=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[y.toLowerCase(),JSON.stringify(wa.getPayload(a.domain,n,a.value))])}catch(T){throw"string"==typeof T.message&&T.message.match(/user denied/i)&&io.throwError("user rejected signing",zt.errors.ACTION_REJECTED,{action:"_signTypedData",from:y,messageData:{domain:a.domain,types:n,value:a.value}}),T}})}unlock(e){return gl(this,void 0,void 0,function*(){const n=this.provider,r=yield this.getAddress();return n.send("personal_unlockAccount",[r.toLowerCase(),e,null])})}}class lV extends dC{sendTransaction(e){return this.sendUncheckedTransaction(e).then(n=>({hash:n,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:r=>this.provider.waitForTransaction(n,r)}))}}const fV={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class dV extends aV{constructor(e,n){let r=n;null==r&&(r=new Promise((a,y)=>{setTimeout(()=>{this.detectNetwork().then(T=>{a(T)},T=>{y(T)})},0)})),super(r),e||(e=um(this.constructor,"defaultUrl")()),Nr(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(Zs(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return gl(this,void 0,void 0,function*(){yield fC(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(null!=e){const n=um(this.constructor,"getNetwork");try{return n(Un.from(e).toNumber())}catch(r){return io.throwError("could not detect network",zt.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:r})}}return io.throwError("could not detect network",zt.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new dC(XE,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(n=>this.formatter.address(n)))}send(e,n){const r={method:e,params:n,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ih(r),provider:this});const a=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(a&&this._cache[e])return this._cache[e];const y=WE(this.connection,JSON.stringify(r),cV).then(T=>(this.emit("debug",{action:"response",request:r,response:T,provider:this}),T),T=>{throw this.emit("debug",{action:"response",error:T,request:r,provider:this}),T});return a&&(this._cache[e]=y,setTimeout(()=>{this._cache[e]=null},0)),y}prepareRequest(e,n){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[vm(n.address),n.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[vm(n.address),n.blockTag]];case"getCode":return["eth_getCode",[vm(n.address),n.blockTag]];case"getStorageAt":return["eth_getStorageAt",[vm(n.address),ro(n.position,32),n.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[n.signedTransaction]];case"getBlock":return n.blockTag?["eth_getBlockByNumber",[n.blockTag,!!n.includeTransactions]]:n.blockHash?["eth_getBlockByHash",[n.blockHash,!!n.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[n.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[n.transactionHash]];case"call":return["eth_call",[um(this.constructor,"hexlifyTransaction")(n.transaction,{from:!0}),n.blockTag]];case"estimateGas":return["eth_estimateGas",[um(this.constructor,"hexlifyTransaction")(n.transaction,{from:!0})]];case"getLogs":return n.filter&&null!=n.filter.address&&(n.filter.address=vm(n.filter.address)),["eth_getLogs",[n.filter]]}return null}perform(e,n){return gl(this,void 0,void 0,function*(){if("call"===e||"estimateGas"===e){const a=n.transaction;if(a&&null!=a.type&&Un.from(a.type).isZero()&&null==a.maxFeePerGas&&null==a.maxPriorityFeePerGas){const y=yield this.getFeeData();null==y.maxFeePerGas&&null==y.maxPriorityFeePerGas&&((n=Zs(n)).transaction=Zs(a),delete n.transaction.type)}}const r=this.prepareRequest(e,n);null==r&&io.throwError(e+" not implemented",zt.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(a){return lC(e,a,n)}})}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,n=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=n,n.then(function(r){return function a(){e.send("eth_getFilterChanges",[r]).then(function(y){if(e._pendingFilter!=n)return null;let T=Promise.resolve();return y.forEach(function(Z){e._emitted["t:"+Z.toLowerCase()]="pending",T=T.then(function(){return e.getTransaction(Z).then(function($){return e.emit("pending",$),null})})}),T.then(function(){return fC(1e3)})}).then(function(){if(e._pendingFilter==n)return setTimeout(function(){a()},0),null;e.send("eth_uninstallFilter",[r])}).catch(y=>{})}(),r}).catch(r=>{})}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,n){const r=Zs(fV);if(n)for(const y in n)n[y]&&(r[y]=!0);!function wK(t,e){(!t||"object"!=typeof t)&&ab.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(n=>{e[n]||ab.throwArgumentError("invalid object key - "+n,"transaction:"+n,t)})}(e,r);const a={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(y){if(null==e[y])return;const T=ME(Un.from(e[y]));"gasLimit"===y&&(y="gas"),a[y]=T}),["from","to","data"].forEach(function(y){null!=e[y]&&(a[y]=pr(e[y]))}),e.accessList&&(a.accessList=fm(e.accessList)),a}}const hC=new zt(ub);let hV=1;function pC(t,e){const n="Web3LegacyFetcher";return function(r,a){const y={method:r,params:a,id:hV++,jsonrpc:"2.0"};return new Promise((T,Z)=>{this.emit("debug",{action:"request",fetcher:n,request:ih(y),provider:this}),e(y,($,ie)=>{if($)return this.emit("debug",{action:"response",fetcher:n,error:$,request:y,provider:this}),Z($);if(this.emit("debug",{action:"response",fetcher:n,request:y,response:ie,provider:this}),ie.error){const ue=new Error(ie.error.message);return ue.code=ie.error.code,ue.data=ie.error.data,Z(ue)}T(ie.result)})})}}class gC extends dV{constructor(e,n){null==e&&hC.throwArgumentError("missing provider","provider",e);let r=null,a=null,y=null;"function"==typeof e?(r="unknown:",a=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),y=e,e.request?(""===r&&(r="eip-1193:"),a=function pV(t){return function(e,n){null==n&&(n=[]);const r={method:e,params:n};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ih(r),provider:this}),t.request(r).then(a=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:r,response:a,provider:this}),a),a=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:r,error:a,provider:this}),a})}}(e)):e.sendAsync?a=pC(0,e.sendAsync.bind(e)):e.send?a=pC(0,e.send.bind(e)):hC.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,n),Nr(this,"jsonRpcFetchFunc",a),Nr(this,"provider",y)}send(e,n){return this.jsonRpcFetchFunc(e,n)}}var gV=g(21087);const{Near:yV,Account:_b,KeyPair:qE,keyStores:{BrowserLocalStorageKeyStore:mV},transactions:{addKey:Pse,deleteKey:Rse,functionCallAccessKey:kse},utils:{PublicKey:vV,format:{parseNearAmount:sh}}}=lr,Mb="https://neth.app",wV={testnet:{FUNDING_ACCOUNT_ID:"neth.testnet",MAP_ACCOUNT_ID:"map.neth.testnet",ROOT_ACCOUNT_ID:"testnet"},mainnet:{MAP_ACCOUNT_ID:"nethmap.near",ROOT_ACCOUNT_ID:"near"}},Db="__TX_ARGS_ATTEMPT",bm="__APP_KEY_SECRET",Ap="__APP_KEY_ACCOUNT_ID",yC=(sh("0.4"),sh("0.49"),sh("0.5"),sh("0.05"),(t="")=>({getItem:e=>{const n=localStorage.getItem(t+e);if("{"!==n?.charAt(0))return n;try{return JSON.parse(n)}catch{}},setItem:(e,n)=>localStorage.setItem(t+e,"string"==typeof n?n:JSON.stringify(n)),removeItem:e=>localStorage.removeItem(t+e)})),DV=()=>({log:t=>console.log(...t)});let $E,e3,Ep,yl,os,Sp,Sa,Cb,mC;const t3=t=>pr(vV.fromString(t).data).substring(2),vC=t=>t.some(e=>{const n=e?.access_key?.permission?.FunctionCall;return null!==n.allowance&&"execute"===n.method_names[0]}),IV=function(){var t=(0,ke.Z)(function*(e,n){const{account:r,accountId:a}=yield bC(e,n),y=parseInt(yield r.viewFunction({contractId:a,methodName:"get_nonce"}),16).toString(),{publicKey:T,secretKey:Z}=yield xb(e,n3(a,y)),$=t3(T),ie=[{type:"AddKey",public_key:$,allowance:sh("1"),receiver_id:a,method_names:"execute"}],ue=yield r.getAccessKeys();if(vC(ue)){const xe=parseInt(yield r.viewFunction({contractId:a,methodName:"get_app_key_nonce"}),16).toString(),{publicKey:Ie}=yield xb(e,n3(a,xe)),Le=t3(Ie);ie.unshift({type:"DeleteKey",public_key:Le})}const he=yield Ib(e,{nonce:y,receivers:[a],transactions:[{actions:ie}]});return""!==(yield r.functionCall({contractId:a,methodName:"execute",args:he,gas:e3}))?.status?.SuccessValue?yl.log("App key rotation unsuccessful. Please refresh the page and try again."):(yield os.removeItem(bm),yield os.removeItem(Ap),{publicKey:$,secretKey:Z})});return function(n,r){return t.apply(this,arguments)}}(),bC=function(){var t=(0,ke.Z)(function*(e,n,r=!1){let a,y=yield os.getItem("__ATTEMPT_SECRET_KEY");if(y)a=yield os.getItem("__ATTEMPT_ACCOUNT_ID");else{a=yield _C(n);const{secretKey:ue}=yield xb(e,xV(a,r));y=ue}const T=new _b(Sp,a),Z=qE.fromString(y),$=Z.getPublicKey().toString();return(yield T.getAccessKeys()).some(({public_key:ue})=>$===ue)?(Ep.setKey(Sa,a,Z),{account:T,accountId:a,secretKey:y}):yield bC(e,n,!0)});return function(n,r){return t.apply(this,arguments)}}(),n3=(t,e)=>({WARNING:`Creating key for: ${t}`,nonce:e,description:"ONLY sign this on apps you trust! This key CAN use up to 1 N for transactions."}),xV=(t,e)=>({WARNING:`Creates a key with access to your (new) paired NEAR Account: ${t}`,description:`ONLY sign this message on this website: ${e?"neardefi.github.io/neth":Mb}`}),r3={name:"NETH",version:"1",chainId:1313161554},EC=t=>t.map(e=>{const n="string"==typeof e?e:Object.entries(e).map(([a,y])=>`|NETH_${a}:${"string"==typeof y?y:JSON.stringify(y)}_NETH|`).join("");return"NETH"+n.length.toString().padStart(8,"0")+"__"+n}).join(""),Ib=function(){var t=(0,ke.Z)(function*(e,n){const a={Transaction:[]};if(Object.entries(n).forEach(([Z])=>{a.Transaction.push({type:"string",name:Z})}),n.transactions&&(Object.values(n.transactions).forEach((Z,$)=>{Z.actions.forEach(ie=>{if(ie.args){if(Buffer.isBuffer(ie.args))return void(ie.args="0x"+ie.args.toString("hex"));Object.entries(ie.args).forEach(([ue,he])=>{/receiver_id|account_id/g.test(ue)&&(ie.args[ue]="|~-_NETH~-_-~RECEIVER_-~|",n.receivers.splice($+1,0,he))})}})}),n.transactions=EC(n.transactions.map(({actions:Z})=>EC(Z)))),n.receivers){const Z=n.receivers.length.toString();n.receivers="NETH"+n.receivers.join(",").length.toString().padStart(8,"0")+"__"+n.receivers.join(","),n.receivers=n.receivers.substring(0,4)+Z.padStart(3,"0")+n.receivers.substring(7)}return{sig:yield e._signTypedData(r3,a,n),msg:n}});return function(n,r){return t.apply(this,arguments)}}(),xb=function(){var t=(0,ke.Z)(function*(e,n){const{sig:r}=yield Ib(e,n),a=IE(r);return(0,gV.generateSeedPhrase)(a.substring(2,34))});return function(n,r){return t.apply(this,arguments)}}(),SC=function(){var t=(0,ke.Z)(function*(){if(!(yield wE()()))return alert("Please install/activate MetaMask and try again.");try{yield window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+r3.chainId.toString(16)}]})}catch(y){if(yl.log(y),4902!==(y?.code||y?.data?.originalError?.code))throw y;try{yield window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0x"+r3.chainId.toString(16),chainName:"Aurora Mainnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},blockExplorerUrls:["https://explorer.mainnet.aurora.dev/"],rpcUrls:["https://mainnet.aurora.dev"]}]})}catch(Z){throw alert('Error adding chain. Please click "Choose Ethereum Account" and add the Aurora Network to continue.'),Z}}const n=new gC(window.ethereum);0===(yield n.listAccounts()).length&&(yield n.send("eth_requestAccounts",[]));const a=n.getSigner();return{signer:a,ethAddress:yield a.getAddress()}});return function(){return t.apply(this,arguments)}}(),PV=function(){var t=(0,ke.Z)(function*(){yield(yield wE()()).send("wallet_requestPermissions",[{eth_accounts:{}}]);const r=new gC(window.ethereum).getSigner();return{signer:r,ethAddress:yield r.getAddress()}});return function(){return t.apply(this,arguments)}}(),_C=function(){var t=(0,ke.Z)(function*(e){return Cb.viewFunction({contractId:wV[Sa].MAP_ACCOUNT_ID,methodName:"get_near",args:{eth_address:e}})});return function(n){return t.apply(this,arguments)}}(),_p=function(){var t=(0,ke.Z)(function*(){const e=yield os.getItem(bm),n=yield os.getItem(Ap);if(!e||!n){const y=yield SC();return!!(yield MC(y))&&(yield _p())}const r=new _b(Sp,n),a=qE.fromString(e);return Ep.setKey(Sa,n,a),{account:r,accountId:n,keyPair:a,secretKey:e}});return function(){return t.apply(this,arguments)}}(),RV=_p,kV=function(){var t=(0,ke.Z)(function*(){const e=yield os.getItem(Ap);return e?(yield os.removeItem(bm),yield os.removeItem(Ap),{accountId:e}):yl.log("already signed out")});return function(){return t.apply(this,arguments)}}(),LV=function(){var t=(0,ke.Z)(function*({message:e,provider:n,account:r}){let a;if(r)({accountId:a}=r);else{const we=yield _p();we&&({account:r,accountId:a}=we)}if(!r)throw new Error("Wallet not signed in");const y=yield r.connection.signer.getPublicKey(a,Sa),T=Buffer.from(y.data).toString("base64"),ie={accountId:a,message:e,blockId:(yield n.block({finality:"final"})).header.hash,publicKey:T,keyType:y.keyType},ue=JSON.stringify(ie),he=yield r.connection.signer.signMessage(new Uint8Array(Buffer.from(ue)),a,Sa);return{...ie,signature:Buffer.from(he.signature).toString("base64")}});return function(n){return t.apply(this,arguments)}}(),FV=function(){var t=(0,ke.Z)(function*(){const e=yC("near-wallet-selector:neth:");return!!(yield e.getItem(bm))||!!(yield e.getItem(Ap))});return function(){return t.apply(this,arguments)}}(),MC=function(){var t=(0,ke.Z)(function*({signer:e,ethAddress:n}){const r=yield _C(n);if(!r){if(window.confirm(`Ethereum account ${n} is not connected to a NETH account. Would you like to try another Ethereum account?`)){try{const{signer:we,ethAddress:xe}=yield PV();return yield MC({signer:we,ethAddress:xe})}catch(we){yl.log(we)}return}const he=`${Mb}/${"testnet"===Sa?"?network=testnet":""}`;window.prompt("We couldn't find a NETH account. To set up a NETH account visit",he)}const a=parseInt(yield Cb.viewFunction({contractId:r,methodName:"get_app_key_nonce"}),16).toString(),{publicKey:y,secretKey:T}=yield xb(e,n3(r,a)),Z=new _b(Sp,r),$=yield Z.getAccessKeys();vC($)||(yield IV(e,n));const ie=qE.fromString(T);return Ep.setKey(Sa,r,ie),yield os.setItem(bm,T),yield os.setItem(Ap,Z.accountId),{publicKey:y,secretKey:T,account:Z}});return function(n){return t.apply(this,arguments)}}(),DC=function(){var t=(0,ke.Z)(function*(){const e=yield _p();if(!e)return void yl.log("NETH: ERROR broadcasting tx. No account found.");const{account:n,accountId:r}=e,a=yield os.getItem(Db);if(!a||0===a.length)return;const y=[];for(;a.length>0;){const T=a.shift();yl.log("NETH: broadcasting tx",T);try{const Z=yield n.functionCall({contractId:r,methodName:"execute",args:T,gas:e3});yield os.setItem(Db,a),y.push(Z)}catch(Z){yl.log("NETH: ERROR broadcasting tx",Z)}}return yield os.removeItem(Db),y});return function(){return t.apply(this,arguments)}}(),BV=function(){var t=(0,ke.Z)(function*({transactions:e,bundle:n}){const r=yield SC(),{signer:a}=r,y=yield _p();if(!y)return void yl.log("NETH: ERROR signing and sending transactions. No account found.");const{account:T,accountId:Z}=y,$=e.map(({receiverId:xe})=>xe),ie=e.map(({receiverId:xe,actions:Ie})=>({actions:jV(Ie,Z,xe)})),ue=parseInt(yield T.viewFunction({contractId:Z,methodName:"get_nonce"}),16),he=[];if(n)he.push(yield Ib(a,{nonce:ue.toString(),receivers:$,transactions:ie}));else for(let xe=0;xet.map(r=>{const{enum:a}=r,{gas:y,publicKey:T,methodName:Z,args:$,deposit:ie,accessKey:ue,code:he}=r[a]||r,we={type:a&&a[0].toUpperCase()+a.substr(1)||"FunctionCall",gas:y&&y.toString()||void 0,public_key:T&&t3(T)||void 0,method_name:Z,args:$||void 0,code:he||void 0,amount:ie&&ie.toString()||void 0,permission:void 0};if(Object.keys(we).forEach(xe=>{void 0===we[xe]&&delete we[xe]}),ue)if(n===e)we.allowance=sh("1"),we.method_names="execute",we.receiver_id=e;else if("functionCall"===ue.permission.enum){const{receiverId:xe,methodNames:Ie,allowance:Le}=ue.permission.functionCall;we.receiver_id=xe,we.allowance=Le&&Le.toString()||sh("0.25"),we.method_names=Ie.join(",")}return we}),UV=function(){var t=(0,ke.Z)(function*(){return yield wE()({timeout:100}),!!window.ethereum});return function(){return t.apply(this,arguments)}}();let IC,CC=!0,i3=!1;const KV=function(){var t=(0,ke.Z)(function*({metadata:e,logger:n,store:r,storage:a,options:y,provider:T}){const Z=(({network:t,gas:e="200000000000000",logger:n=DV(),storage:r=yC()})=>{e3=e,yl=n,os=r,Ep=new mV,$E=new yV({...t,keyStore:Ep}),Sp=$E.connection,Sa=t.networkId,Cb=new _b(Sp,"mainnet"===Sa?"near":Sa),mC="mainnet"===Sa?".near":"."+Sa;const a=document.createElement("div");return a.style.display="none",a.style.width="100%",a.style.height="100vh",a.style.zIndex="999999",a.style.position="fixed",a.style.top="0",a.style.background="rgba(0, 0, 0, 0.5)",document.body.appendChild(a),DC(),a})({network:y.network,gas:IC,logger:n,storage:a}),ie=he=>{if(!(he=>he.every(we=>"FunctionCall"===we.type))(he))throw new Error(`Only 'FunctionCall' actions types are supported by ${e.name}`);return he.map(xe=>xe.params)},ue=function(){var he=(0,ke.Z)(function*(we){n.log("NETH:signAndSendTransactions",{transactions:we});const{contract:xe}=r.getState();if(!(yield FV())||!xe)throw new Error("Wallet not signed in");i3&&(Z.style.display="block");const Ie=we.map(({receiverId:je,actions:Ue})=>({receiverId:je||xe.contractId,actions:ie(Ue)}));let Le;try{Le=yield BV({transactions:Ie,bundle:CC})}catch(je){throw n.log("NETH:signAndSendTransactions Error",je),je}return i3&&(Z.style.display="none"),Le});return function(xe){return he.apply(this,arguments)}}();return{signIn:()=>(0,ke.Z)(function*(){let he;try{if(he=yield RV(),!he)return[]}catch(we){if(!/not connected/.test(we.toString()))throw we}return[he]})(),signOut:()=>(0,ke.Z)(function*(){yield kV()})(),verifyOwner:({message:he})=>(0,ke.Z)(function*(){return n.log("NETH:verifyOwner",{message:he}),LV({message:he,provider:T,account:null})})(),getAccounts:()=>(0,ke.Z)(function*(){const he=yield _p();if(!he)return n.log("NETH:getAccounts"),[];const{account:we,accountId:xe}=he;return[{accountId:xe,publicKey:(yield we.connection.signer.getPublicKey(we.accountId,y.network.networkId)).toString()}]})(),signAndSendTransaction:(he=(0,ke.Z)(function*({receiverId:we,actions:xe}){return ue([{receiverId:we,actions:xe}])}),function(xe){return he.apply(this,arguments)}),signAndSendTransactions:function(){var he=(0,ke.Z)(function*({transactions:we}){return ue(we)});return function(xe){return he.apply(this,arguments)}}()};var he});return function(n){return t.apply(this,arguments)}}();function xC({iconUrl:t=iK,gas:e,useModalCover:n=!1,bundle:r=!0,deprecated:a=!1}={}){return(0,ke.Z)(function*(){if(i3=n,IC=e,CC=r,F5()())return null;const T=yield UV();return{id:"neth",type:"injected",metadata:{name:"NETH Account",description:null,iconUrl:t,downloadUrl:Mb,deprecated:!1,available:T},deprecated:a,init:KV}})}const zV=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,VV=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,HV=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function WV(t,e){if(!("__proto__"===t||"constructor"===t&&e&&"object"==typeof e&&"prototype"in e))return e;(function GV(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)})(t)}function wm(t,e={}){if("string"!=typeof t)return t;const n=t.trim();if('"'===t[0]&&'"'===t.at(-1)&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if("true"===r)return!0;if("false"===r)return!1;if("undefined"===r)return;if("null"===r)return null;if("nan"===r)return Number.NaN;if("infinity"===r)return Number.POSITIVE_INFINITY;if("-infinity"===r)return Number.NEGATIVE_INFINITY}if(!HV.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(zV.test(t)||VV.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,WV)}return JSON.parse(t)}catch(r){if(e.strict)throw r;return t}}function Mo(t,...e){try{return function ZV(t){return t&&"function"==typeof t.then?t:Promise.resolve(t)}(t(...e))}catch(n){return Promise.reject(n)}}function Tb(t){if(function YV(t){const e=typeof t;return null===t||"object"!==e&&"function"!==e}(t))return String(t);if(function JV(t){const e=Object.getPrototypeOf(t);return!e||e.isPrototypeOf(Object)}(t)||Array.isArray(t))return JSON.stringify(t);if("function"==typeof t.toJSON)return Tb(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function TC(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const o3="base64:";function Js(t){return t?t.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function $V(...t){return Js(t.join(":"))}function Am(t){return(t=Js(t))?t+":":""}const tH=()=>{const t=new Map;return{name:"memory",options:{},hasItem:e=>t.has(e),getItem:e=>t.get(e)??null,getItemRaw:e=>t.get(e)??null,setItem(e,n){t.set(e,n)},setItemRaw(e,n){t.set(e,n)},removeItem(e){t.delete(e)},getKeys:()=>Array.from(t.keys()),clear(){t.clear()},dispose(){t.clear()}}};function nH(t={}){const e={mounts:{"":t.driver||tH()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=ie=>{for(const ue of e.mountpoints)if(ie.startsWith(ue))return{base:ue,relativeKey:ie.slice(ue.length),driver:e.mounts[ue]};return{base:"",relativeKey:ie,driver:e.mounts[""]}},r=(ie,ue)=>e.mountpoints.filter(he=>he.startsWith(ie)||ue&&ie.startsWith(he)).map(he=>({relativeBase:ie.length>he.length?ie.slice(he.length):void 0,mountpoint:he,driver:e.mounts[he]})),a=(ie,ue)=>{if(e.watching){ue=Js(ue);for(const he of e.watchListeners)he(ie,ue)}},y=function(){var ie=(0,ke.Z)(function*(){if(!e.watching){e.watching=!0;for(const ue in e.mounts)e.unwatch[ue]=yield OC(e.mounts[ue],a,ue)}});return function(){return ie.apply(this,arguments)}}(),T=function(){var ie=(0,ke.Z)(function*(){if(e.watching){for(const ue in e.unwatch)yield e.unwatch[ue]();e.unwatch={},e.watching=!1}});return function(){return ie.apply(this,arguments)}}(),Z=(ie,ue,he)=>{const we=new Map,xe=Ie=>{let Le=we.get(Ie.base);return Le||(Le={driver:Ie.driver,base:Ie.base,items:[]},we.set(Ie.base,Le)),Le};for(const Ie of ie){const Le="string"==typeof Ie,je=Js(Le?Ie:Ie.key),Ue=Le?void 0:Ie.value,$e=Le||!Ie.options?ue:{...ue,...Ie.options},Je=n(je);xe(Je).items.push({key:je,value:Ue,relativeKey:Je.relativeKey,options:$e})}return Promise.all([...we.values()].map(Ie=>he(Ie))).then(Ie=>Ie.flat())},$={hasItem(ie,ue={}){ie=Js(ie);const{relativeKey:he,driver:we}=n(ie);return Mo(we.hasItem,he,ue)},getItem(ie,ue={}){ie=Js(ie);const{relativeKey:he,driver:we}=n(ie);return Mo(we.getItem,he,ue).then(xe=>wm(xe))},getItems:(ie,ue)=>Z(ie,ue,he=>he.driver.getItems?Mo(he.driver.getItems,he.items.map(we=>({key:we.relativeKey,options:we.options})),ue).then(we=>we.map(xe=>({key:$V(he.base,xe.key),value:wm(xe.value)}))):Promise.all(he.items.map(we=>Mo(he.driver.getItem,we.relativeKey,we.options).then(xe=>({key:we.key,value:wm(xe)}))))),getItemRaw(ie,ue={}){ie=Js(ie);const{relativeKey:he,driver:we}=n(ie);return we.getItemRaw?Mo(we.getItemRaw,he,ue):Mo(we.getItem,he,ue).then(xe=>function XV(t){return"string"==typeof t&&t.startsWith(o3)?(TC(),Buffer.from(t.slice(o3.length),"base64")):t}(xe))},setItem:(ie,ue,he={})=>(0,ke.Z)(function*(){if(void 0===ue)return $.removeItem(ie);ie=Js(ie);const{relativeKey:we,driver:xe}=n(ie);xe.setItem&&(yield Mo(xe.setItem,we,Tb(ue),he),xe.watch||a("update",ie))})(),setItems:(ie,ue)=>(0,ke.Z)(function*(){yield Z(ie,ue,function(){var he=(0,ke.Z)(function*(we){we.driver.setItems&&(yield Mo(we.driver.setItems,we.items.map(xe=>({key:xe.relativeKey,value:Tb(xe.value),options:xe.options})),ue)),we.driver.setItem&&(yield Promise.all(we.items.map(xe=>Mo(we.driver.setItem,xe.relativeKey,Tb(xe.value),xe.options))))});return function(we){return he.apply(this,arguments)}}())})(),setItemRaw:(ie,ue,he={})=>(0,ke.Z)(function*(){if(void 0===ue)return $.removeItem(ie,he);ie=Js(ie);const{relativeKey:we,driver:xe}=n(ie);if(xe.setItemRaw)yield Mo(xe.setItemRaw,we,ue,he);else{if(!xe.setItem)return;yield Mo(xe.setItem,we,function QV(t){if("string"==typeof t)return t;TC();const e=Buffer.from(t).toString("base64");return o3+e}(ue),he)}xe.watch||a("update",ie)})(),removeItem:(ie,ue={})=>(0,ke.Z)(function*(){"boolean"==typeof ue&&(ue={removeMeta:ue}),ie=Js(ie);const{relativeKey:he,driver:we}=n(ie);we.removeItem&&(yield Mo(we.removeItem,he,ue),(ue.removeMeta||ue.removeMata)&&(yield Mo(we.removeItem,he+"$",ue)),we.watch||a("remove",ie))})(),getMeta:(ie,ue={})=>(0,ke.Z)(function*(){"boolean"==typeof ue&&(ue={nativeOnly:ue}),ie=Js(ie);const{relativeKey:he,driver:we}=n(ie),xe=Object.create(null);if(we.getMeta&&Object.assign(xe,yield Mo(we.getMeta,he,ue)),!ue.nativeOnly){const Ie=yield Mo(we.getItem,he+"$",ue).then(Le=>wm(Le));Ie&&"object"==typeof Ie&&("string"==typeof Ie.atime&&(Ie.atime=new Date(Ie.atime)),"string"==typeof Ie.mtime&&(Ie.mtime=new Date(Ie.mtime)),Object.assign(xe,Ie))}return xe})(),setMeta(ie,ue,he={}){return this.setItem(ie+"$",ue,he)},removeMeta(ie,ue={}){return this.removeItem(ie+"$",ue)},getKeys:(ie,ue={})=>(0,ke.Z)(function*(){ie=Am(ie);const he=r(ie,!0);let we=[];const xe=[];for(const Ie of he){const je=(yield Mo(Ie.driver.getKeys,Ie.relativeBase,ue)).map(Ue=>Ie.mountpoint+Js(Ue)).filter(Ue=>!we.some($e=>Ue.startsWith($e)));xe.push(...je),we=[Ie.mountpoint,...we.filter(Ue=>!Ue.startsWith(Ie.mountpoint))]}return ie?xe.filter(Ie=>Ie.startsWith(ie)&&!Ie.endsWith("$")):xe.filter(Ie=>!Ie.endsWith("$"))})(),clear:(ie,ue={})=>(0,ke.Z)(function*(){ie=Am(ie),yield Promise.all(r(ie,!1).map(function(){var he=(0,ke.Z)(function*(we){if(we.driver.clear)return Mo(we.driver.clear,we.relativeBase,ue);if(we.driver.removeItem){const xe=yield we.driver.getKeys(we.relativeBase||"",ue);return Promise.all(xe.map(Ie=>we.driver.removeItem(Ie,ue)))}});return function(we){return he.apply(this,arguments)}}()))})(),dispose:()=>(0,ke.Z)(function*(){yield Promise.all(Object.values(e.mounts).map(ie=>NC(ie)))})(),watch:ie=>(0,ke.Z)(function*(){return yield y(),e.watchListeners.push(ie),(0,ke.Z)(function*(){e.watchListeners=e.watchListeners.filter(ue=>ue!==ie),0===e.watchListeners.length&&(yield T())})})(),unwatch:()=>(0,ke.Z)(function*(){e.watchListeners=[],yield T()})(),mount(ie,ue){if((ie=Am(ie))&&e.mounts[ie])throw new Error(`already mounted at ${ie}`);return ie&&(e.mountpoints.push(ie),e.mountpoints.sort((he,we)=>we.length-he.length)),e.mounts[ie]=ue,e.watching&&Promise.resolve(OC(ue,a,ie)).then(he=>{e.unwatch[ie]=he}).catch(console.error),$},unmount:(ie,ue=!0)=>(0,ke.Z)(function*(){(ie=Am(ie))&&e.mounts[ie]&&(e.watching&&ie in e.unwatch&&(e.unwatch[ie](),delete e.unwatch[ie]),ue&&(yield NC(e.mounts[ie])),e.mountpoints=e.mountpoints.filter(he=>he!==ie),delete e.mounts[ie])})(),getMount(ie=""){ie=Js(ie)+":";const ue=n(ie);return{driver:ue.driver,base:ue.base}},getMounts:(ie="",ue={})=>(ie=Js(ie),r(ie,ue.parents).map(we=>({driver:we.driver,base:we.mountpoint})))};return $}function OC(t,e,n){return t.watch?t.watch((r,a)=>e(r,n+a)):()=>{}}function NC(t){return u3.apply(this,arguments)}function u3(){return u3=(0,ke.Z)(function*(t){"function"==typeof t.dispose&&(yield Mo(t.dispose))}),u3.apply(this,arguments)}function Qs(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function PC(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const r=Qs(n);return(a,y)=>r.then(T=>y(T.transaction(e,a).objectStore(e)))}let c3;function Ou(){return c3||(c3=PC("keyval-store","keyval")),c3}function RC(t,e=Ou()){return e("readonly",n=>Qs(n.get(t)))}function l3(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Qs(t.transaction)}function kC(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return JSON.parse(t)}catch{return t}}function LC(t){return"string"==typeof t?t:JSON.stringify(t)}var uH=(t={})=>{const e=t.base&&t.base.length>0?`${t.base}:`:"",n=a=>e+a;let r;return t.dbName&&t.storeName&&(r=PC(t.dbName,t.storeName)),{name:"idb-keyval",options:t,hasItem:a=>(0,ke.Z)(function*(){return!(typeof(yield RC(n(a),r))>"u")})(),getItem:a=>(0,ke.Z)(function*(){return(yield RC(n(a),r))??null})(),setItem:(a,y)=>function rH(t,e,n=Ou()){return n("readwrite",r=>(r.put(e,t),Qs(r.transaction)))}(n(a),y,r),removeItem:a=>function iH(t,e=Ou()){return e("readwrite",n=>(n.delete(t),Qs(n.transaction)))}(n(a),r),getKeys:()=>function sH(t=Ou()){return t("readonly",e=>{if(e.getAllKeys)return Qs(e.getAllKeys());const n=[];return l3(e,r=>n.push(r.key)).then(()=>n)})}(r),clear:()=>function oH(t=Ou()){return t("readwrite",e=>(e.clear(),Qs(e.transaction)))}(r)}};class fH{constructor(){this.indexedDb=nH({driver:uH({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}getKeys(){var e=this;return(0,ke.Z)(function*(){return e.indexedDb.getKeys()})()}getEntries(){var e=this;return(0,ke.Z)(function*(){return(yield e.indexedDb.getItems(yield e.indexedDb.getKeys())).map(n=>[n.key,n.value])})()}getItem(e){var n=this;return(0,ke.Z)(function*(){const r=yield n.indexedDb.getItem(e);if(null!==r)return r})()}setItem(e,n){var r=this;return(0,ke.Z)(function*(){yield r.indexedDb.setItem(e,LC(n))})()}removeItem(e){var n=this;return(0,ke.Z)(function*(){yield n.indexedDb.removeItem(e)})()}}var f3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ob={exports:{}};function dH(t){var e;return[t[0],kC(null!=(e=t[1])?e:"")]}!function(){let t;function e(){}t=e,t.prototype.getItem=function(n){return this.hasOwnProperty(n)?String(this[n]):null},t.prototype.setItem=function(n,r){this[n]=String(r)},t.prototype.removeItem=function(n){delete this[n]},t.prototype.clear=function(){const n=this;Object.keys(n).forEach(function(r){n[r]=void 0,delete n[r]})},t.prototype.key=function(n){return n=n||0,Object.keys(this)[n]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof f3<"u"&&f3.localStorage?Ob.exports=f3.localStorage:typeof window<"u"&&window.localStorage?Ob.exports=window.localStorage:Ob.exports=new e}();class hH{constructor(){this.localStorage=Ob.exports}getKeys(){var e=this;return(0,ke.Z)(function*(){return Object.keys(e.localStorage)})()}getEntries(){var e=this;return(0,ke.Z)(function*(){return Object.entries(e.localStorage).map(dH)})()}getItem(e){var n=this;return(0,ke.Z)(function*(){const r=n.localStorage.getItem(e);if(null!==r)return kC(r)})()}setItem(e,n){var r=this;return(0,ke.Z)(function*(){r.localStorage.setItem(e,LC(n))})()}removeItem(e){var n=this;return(0,ke.Z)(function*(){n.localStorage.removeItem(e)})()}}const gH=function(){var t=(0,ke.Z)(function*(e,n,r){const a="wc_storage_version",y=yield n.getItem(a);if(y&&y>=1)return void r(n);const T=yield e.getKeys();if(!T.length)return void r(n);const Z=[];for(;T.length;){const $=T.shift();if(!$)continue;const ie=$.toLowerCase();if(ie.includes("wc@")||ie.includes("walletconnect")||ie.includes("wc_")||ie.includes("wallet_connect")){const ue=yield e.getItem($);yield n.setItem($,ue),Z.push($)}}yield n.setItem(a,1),r(n),yH(e,Z)});return function(n,r,a){return t.apply(this,arguments)}}(),yH=function(){var t=(0,ke.Z)(function*(e,n){n.length&&n.forEach(function(){var r=(0,ke.Z)(function*(a){yield e.removeItem(a)});return function(a){return r.apply(this,arguments)}}())});return function(n,r){return t.apply(this,arguments)}}();class mH{constructor(){this.initialized=!1,this.setInitialized=n=>{this.storage=n,this.initialized=!0};const e=new hH;this.storage=e;try{const n=new fH;gH(e,n,this.setInitialized)}catch{this.initialized=!0}}getKeys(){var e=this;return(0,ke.Z)(function*(){return yield e.initialize(),e.storage.getKeys()})()}getEntries(){var e=this;return(0,ke.Z)(function*(){return yield e.initialize(),e.storage.getEntries()})()}getItem(e){var n=this;return(0,ke.Z)(function*(){return yield n.initialize(),n.storage.getItem(e)})()}setItem(e,n){var r=this;return(0,ke.Z)(function*(){return yield r.initialize(),r.storage.setItem(e,n)})()}removeItem(e){var n=this;return(0,ke.Z)(function*(){return yield n.initialize(),n.storage.removeItem(e)})()}initialize(){var e=this;return(0,ke.Z)(function*(){e.initialized||(yield new Promise(n=>{const r=setInterval(()=>{e.initialized&&(clearInterval(r),n())},20)}))})()}}var Em=g(72062),Kr=g(83767),Mp=g(42092);class vH extends Mp.q{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class bH extends Mp.q{constructor(e,n){super(),this.core=e,this.logger=n,this.records=new Map}}class wH{constructor(e,n){this.logger=e,this.core=n}}class AH extends Mp.q{constructor(e,n){super(),this.relayer=e,this.logger=n}}class EH extends Mp.q{constructor(e){super()}}class SH{constructor(e,n,r,a){this.core=e,this.logger=n,this.name=r}}class _H extends Mp.q{constructor(e,n){super(),this.relayer=e,this.logger=n}}class MH extends Mp.q{constructor(e,n){super(),this.core=e,this.logger=n}}class DH{constructor(e,n){this.projectId=e,this.logger=n}}class CH{constructor(e,n){this.projectId=e,this.logger=n}}class IH{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class xH{constructor(e){this.client=e}}const TH=t=>JSON.stringify(t,(e,n)=>"bigint"==typeof n?n.toString()+"n":n),OH=t=>{const n=t.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(n,(r,a)=>"string"==typeof a&&a.match(/^\d+n$/)?BigInt(a.substring(0,a.length-1)):a)};function BC(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return OH(t)}catch{return t}}function jC(t){return"string"==typeof t?t:TH(t)||""}var UC=g(65553),NH=g(5784),Vn=g(43961);const PH="EdDSA",RH="JWT",KC=".",zC="base64url",kH="utf8",LH="utf8",FH=":",BH="did",jH="key",VC="base58btc",UH="z",KH="K36",zH=32;var WH=function HH(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,Je=new Uint8Array($e);Ie[Le];){var ht=n[Ie.charCodeAt(Le)];if(255===ht)return;for(var xt=0,Wt=$e-1;(0!==ht||xt>>0,Je[Wt]=ht%256>>>0,ht=ht/256>>>0;if(0!==ht)throw new Error("Non-zero carry");Ue=xt,Le++}if(" "!==Ie[Le]){for(var An=$e-Ue;An!==$e&&0===Je[An];)An++;for(var rn=new Uint8Array(je+($e-An)),un=je;An!==$e;)rn[un++]=Je[An++];return rn}}}return{encode:function he(Ie){if(Ie instanceof Uint8Array||(ArrayBuffer.isView(Ie)?Ie=new Uint8Array(Ie.buffer,Ie.byteOffset,Ie.byteLength):Array.isArray(Ie)&&(Ie=Uint8Array.from(Ie))),!(Ie instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ie.length)return"";for(var Le=0,je=0,Ue=0,$e=Ie.length;Ue!==$e&&0===Ie[Ue];)Ue++,Le++;for(var Je=($e-Ue)*ue+1>>>0,ht=new Uint8Array(Je);Ue!==$e;){for(var xt=Ie[Ue],Wt=0,An=Je-1;(0!==xt||Wt>>0,ht[An]=xt%Z>>>0,xt=xt/Z>>>0;if(0!==xt)throw new Error("Non-zero carry");je=Wt,Ue++}for(var rn=Je-je;rn!==Je&&0===ht[rn];)rn++;for(var un=$.repeat(Le);rn{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class XH{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class qH{constructor(e,n,r){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return HC(this,e)}}class $H{constructor(e){this.decoders=e}or(e){return HC(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const HC=(t,e)=>new $H({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class eW{constructor(e,n,r,a){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=a,this.encoder=new XH(e,n,r),this.decoder=new qH(e,n,a)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Pb=({name:t,prefix:e,encode:n,decode:r})=>new eW(t,e,n,r),Sm=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:a}=ZH(n,e);return Pb({prefix:t,name:e,encode:r,decode:y=>Nb(a(y))})},Lo=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>Pb({prefix:e,name:t,encode:a=>((t,e,n)=>{const r="="===e[e.length-1],a=(1<n;)T-=n,y+=e[a&Z>>T];if(T&&(y+=e[a&Z<((t,e,n,r)=>{const a={};for(let ue=0;ue=8&&(Z-=8,T[ie++]=255&$>>Z)}if(Z>=n||255&$<<8-Z)throw new SyntaxError("Unexpected end of data");return T})(a,r,n,t)}),rW=Pb({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),iW=Lo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),oW=Lo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),sW=Sm({prefix:"9",name:"base10",alphabet:"0123456789"}),aW=Lo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),uW=Lo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),cW=Lo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),lW=Lo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),fW=Lo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),dW=Lo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),hW=Lo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),pW=Lo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),gW=Lo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),yW=Lo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),mW=Lo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),vW=Sm({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),bW=Sm({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),wW=Sm({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),AW=Sm({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),EW=Lo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),SW=Lo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),_W=Lo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),MW=Lo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),WC=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),DW=WC.reduce((t,e,n)=>(t[n]=e,t),[]),CW=WC.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const TW=Pb({prefix:"\u{1f680}",name:"base256emoji",encode:function IW(t){return t.reduce((e,n)=>e+=DW[n],"")},decode:function xW(t){const e=[];for(const n of t){const r=CW[n.codePointAt(0)];if(void 0===r)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}});var OW=function ZC(t,e,n){e=e||[];for(var r=n=n||0;t>=RW;)e[n++]=255&t|GC,t/=128;for(;t&PW;)e[n++]=255&t|GC,t>>>=7;return e[n]=0|t,ZC.bytes=n-r+1,e},GC=128,PW=-128,RW=Math.pow(2,31);var kW=function d3(t,r){var T,n=0,a=0,y=r=r||0,Z=t.length;do{if(y>=Z)throw d3.bytes=0,new RangeError("Could not decode varint");T=t[y++],n+=a<28?(T&YC)<=LW);return d3.bytes=y-r,n},LW=128,YC=127;var FW=Math.pow(2,7),BW=Math.pow(2,14),jW=Math.pow(2,21),UW=Math.pow(2,28),KW=Math.pow(2,35),zW=Math.pow(2,42),VW=Math.pow(2,49),HW=Math.pow(2,56),WW=Math.pow(2,63),ZW={encode:OW,decode:kW,encodingLength:function(t){return t(JC.encode(t,e,n),e),XC=t=>JC.encodingLength(t),h3=(t,e)=>{const n=e.byteLength,r=XC(t),a=r+XC(n),y=new Uint8Array(a+n);return QC(t,y,0),QC(n,y,r),y.set(e,a),new qC(t,n,e,y)};class qC{constructor(e,n,r,a){this.code=e,this.size=n,this.digest=r,this.bytes=a}}const $C=({name:t,code:e,encode:n})=>new JW(t,e,n);class JW{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?h3(this.code,n):n.then(r=>h3(this.code,r))}throw Error("Unknown type, must be binary type")}}const eI=t=>function(){var e=(0,ke.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),QW=$C({name:"sha2-256",code:18,encode:eI("SHA-256")}),XW=$C({name:"sha2-512",code:19,encode:eI("SHA-512")}),nI=Nb,$W={code:0,name:"identity",encode:nI,digest:t=>h3(0,nI(t))},eG="raw",tG=85,nG=t=>Nb(t),rG=t=>Nb(t),iG=new TextEncoder,oG=new TextDecoder,sG="json",aG=512,uG=t=>iG.encode(JSON.stringify(t)),cG=t=>JSON.parse(oG.decode(t));class Is{constructor(e,n,r,a){this.code=n,this.version=e,this.multihash=r,this.bytes=a,this.byteOffset=a.byteOffset,this.byteLength=a.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:kb,byteLength:kb,code:Rb,version:Rb,multihash:Rb,bytes:Rb,_baseCache:kb,asCID:kb})}toV0(){if(0===this.version)return this;{const{code:e,multihash:n}=this;if(e!==_m)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==hG)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Is.createV0(n)}}toV1(){switch(this.version){case 0:{const{code:e,digest:n}=this.multihash,r=Digest.create(e,n);return Is.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:n,version:r,_baseCache:a}=this;return 0===r?fG(n,a,e||base58btc.encoder):dG(n,a,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return gG(/^0\.0/,yG),!(!e||!e[iI]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Is)return e;if(null!=e&&e.asCID===e){const{version:n,code:r,multihash:a,bytes:y}=e;return new Is(n,r,a,y||rI(n,r,a.bytes))}if(null!=e&&!0===e[iI]){const{version:n,multihash:r,code:a}=e,y=Digest.decode(r);return Is.create(n,a,y)}return null}static create(e,n,r){if("number"!=typeof n)throw new Error("String codecs are no longer supported");switch(e){case 0:if(n!==_m)throw new Error(`Version 0 CID must use dag-pb (code: ${_m}) block encoding`);return new Is(e,n,r,r.bytes);case 1:{const a=rI(e,n,r.bytes);return new Is(e,n,r,a)}default:throw new Error("Invalid version")}}static createV0(e){return Is.create(0,_m,e)}static createV1(e,n){return Is.create(1,e,n)}static decode(e){const[n,r]=Is.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return n}static decodeFirst(e){const n=Is.inspectBytes(e),r=n.size-n.multihashSize,a=coerce(e.subarray(r,r+n.multihashSize));if(a.byteLength!==n.multihashSize)throw new Error("Incorrect length");const y=a.subarray(n.multihashSize-n.digestSize),T=new Digest.Digest(n.multihashCode,n.digestSize,y,a);return[0===n.version?Is.createV0(T):Is.createV1(n.codec,T),e.subarray(n.size)]}static inspectBytes(e){let n=0;const r=()=>{const[he,we]=varint.decode(e.subarray(n));return we,he};let a=r(),y=_m;if(18===a?(0,0):1===a&&r(),0!==a&&1!==a)throw new RangeError(`Invalid CID version ${a}`);const T=n,Z=r(),$=r(),ie=n+$;return{version:a,codec:y,multihashCode:Z,digestSize:$,multihashSize:ie-T,size:ie}}static parse(e,n){const[r,a]=lG(e,n),y=Is.decode(a);return y._baseCache.set(r,e),y}}Symbol.for("@ipld/js-cid/CID");const oI={...p,...D,...w,..._,...l,...v,...m,...b,...M,...E};function sI(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const aI=sI("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),p3=sI("ascii","a",t=>{let e="a";for(let n=0;n{t=t.substring(1);const e=new Uint8Array(t.length);for(let n=0;na+y.length,0));const n=new Uint8Array(e);let r=0;for(const a of t)n.set(a,r),r+=a.length;return n}([e,t]),VC);return[BH,jH,n].join(FH)}function vG(t){return g3(t,zC)}function lI(t=(0,NH.randomBytes)(zH)){return UC._w(t)}function m3(){return m3=(0,ke.Z)(function*(t,e,n,r,a=(0,Vn.fromMiliseconds)(Date.now())){const y={alg:PH,typ:RH},$={iss:cI(r.publicKey),sub:t,aud:e,iat:a,exp:a+n},ie=function wG(t){return y3([Fb(t.header),Fb(t.payload)].join(KC),LH)}({header:y,payload:$});return function AG(t){return[Fb(t.header),Fb(t.payload),vG(t.signature)].join(KC)}({header:y,payload:$,signature:UC.Xx(r.secretKey,ie)})}),m3.apply(this,arguments)}g(6375);var fI=g(95876),SG=g(85705),dI=g(10976),b3=g(10893),hI=g(25006);function w3(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function pI(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?w3(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function gI(t,e){e||(e=t.reduce((a,y)=>a+y.length,0));const n=pI(e);let r=0;for(const a of t)n.set(a,r),r+=a.length;return w3(n)}var MG=function _G(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,Je=new Uint8Array($e);Ie[Le];){var ht=n[Ie.charCodeAt(Le)];if(255===ht)return;for(var xt=0,Wt=$e-1;(0!==ht||xt>>0,Je[Wt]=ht%256>>>0,ht=ht/256>>>0;if(0!==ht)throw new Error("Non-zero carry");Ue=xt,Le++}if(" "!==Ie[Le]){for(var An=$e-Ue;An!==$e&&0===Je[An];)An++;for(var rn=new Uint8Array(je+($e-An)),un=je;An!==$e;)rn[un++]=Je[An++];return rn}}}return{encode:function he(Ie){if(Ie instanceof Uint8Array||(ArrayBuffer.isView(Ie)?Ie=new Uint8Array(Ie.buffer,Ie.byteOffset,Ie.byteLength):Array.isArray(Ie)&&(Ie=Uint8Array.from(Ie))),!(Ie instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ie.length)return"";for(var Le=0,je=0,Ue=0,$e=Ie.length;Ue!==$e&&0===Ie[Ue];)Ue++,Le++;for(var Je=($e-Ue)*ue+1>>>0,ht=new Uint8Array(Je);Ue!==$e;){for(var xt=Ie[Ue],Wt=0,An=Je-1;(0!==xt||Wt>>0,ht[An]=xt%Z>>>0,xt=xt/Z>>>0;if(0!==xt)throw new Error("Non-zero carry");je=Wt,Ue++}for(var rn=Je-je;rn!==Je&&0===ht[rn];)rn++;for(var un=$.repeat(Le);rn{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class OG{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class NG{constructor(e,n,r){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return yI(this,e)}}class PG{constructor(e){this.decoders=e}or(e){return yI(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const yI=(t,e)=>new PG({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class RG{constructor(e,n,r,a){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=a,this.encoder=new OG(e,n,r),this.decoder=new NG(e,n,a)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const jb=({name:t,prefix:e,encode:n,decode:r})=>new RG(t,e,n,r),Mm=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:a}=CG(n,e);return jb({prefix:t,name:e,encode:r,decode:y=>Bb(a(y))})},Fo=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>jb({prefix:e,name:t,encode:a=>((t,e,n)=>{const r="="===e[e.length-1],a=(1<n;)T-=n,y+=e[a&Z>>T];if(T&&(y+=e[a&Z<((t,e,n,r)=>{const a={};for(let ue=0;ue=8&&(Z-=8,T[ie++]=255&$>>Z)}if(Z>=n||255&$<<8-Z)throw new SyntaxError("Unexpected end of data");return T})(a,r,n,t)}),FG=jb({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),BG=Fo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),jG=Fo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),UG=Mm({prefix:"9",name:"base10",alphabet:"0123456789"}),KG=Fo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),zG=Fo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),VG=Fo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),HG=Fo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),WG=Fo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),GG=Fo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ZG=Fo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),YG=Fo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),JG=Fo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),QG=Fo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),XG=Fo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),qG=Mm({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),$G=Mm({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),eZ=Mm({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),tZ=Mm({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),nZ=Fo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),rZ=Fo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),iZ=Fo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),oZ=Fo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),mI=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),sZ=mI.reduce((t,e,n)=>(t[n]=e,t),[]),aZ=mI.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const lZ=jb({prefix:"\u{1f680}",name:"base256emoji",encode:function uZ(t){return t.reduce((e,n)=>e+=sZ[n],"")},decode:function cZ(t){const e=[];for(const n of t){const r=aZ[n.codePointAt(0)];if(void 0===r)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}});var fZ=function bI(t,e,n){e=e||[];for(var r=n=n||0;t>=pZ;)e[n++]=255&t|vI,t/=128;for(;t&hZ;)e[n++]=255&t|vI,t>>>=7;return e[n]=0|t,bI.bytes=n-r+1,e},vI=128,hZ=-128,pZ=Math.pow(2,31);var gZ=function A3(t,r){var T,n=0,a=0,y=r=r||0,Z=t.length;do{if(y>=Z)throw A3.bytes=0,new RangeError("Could not decode varint");T=t[y++],n+=a<28?(T&wI)<=yZ);return A3.bytes=y-r,n},yZ=128,wI=127;var mZ=Math.pow(2,7),vZ=Math.pow(2,14),bZ=Math.pow(2,21),wZ=Math.pow(2,28),AZ=Math.pow(2,35),EZ=Math.pow(2,42),SZ=Math.pow(2,49),_Z=Math.pow(2,56),MZ=Math.pow(2,63),CZ={encode:fZ,decode:gZ,encodingLength:function(t){return t(AI.encode(t,e,n),e),SI=t=>AI.encodingLength(t),E3=(t,e)=>{const n=e.byteLength,r=SI(t),a=r+SI(n),y=new Uint8Array(a+n);return EI(t,y,0),EI(n,y,r),y.set(e,a),new _I(t,n,e,y)};class _I{constructor(e,n,r,a){this.code=e,this.size=n,this.digest=r,this.bytes=a}}const MI=({name:t,code:e,encode:n})=>new xZ(t,e,n);class xZ{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?E3(this.code,n):n.then(r=>E3(this.code,r))}throw Error("Unknown type, must be binary type")}}const DI=t=>function(){var e=(0,ke.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),TZ=MI({name:"sha2-256",code:18,encode:DI("SHA-256")}),OZ=MI({name:"sha2-512",code:19,encode:DI("SHA-512")}),II=Bb,PZ={code:0,name:"identity",encode:II,digest:t=>E3(0,II(t))},RZ="raw",kZ=85,LZ=t=>Bb(t),FZ=t=>Bb(t),BZ=new TextEncoder,jZ=new TextDecoder,UZ="json",KZ=512,zZ=t=>BZ.encode(JSON.stringify(t)),VZ=t=>JSON.parse(jZ.decode(t));class xs{constructor(e,n,r,a){this.code=n,this.version=e,this.multihash=r,this.bytes=a,this.byteOffset=a.byteOffset,this.byteLength=a.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Kb,byteLength:Kb,code:Ub,version:Ub,multihash:Ub,bytes:Ub,_baseCache:Kb,asCID:Kb})}toV0(){if(0===this.version)return this;{const{code:e,multihash:n}=this;if(e!==Dm)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==ZZ)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return xs.createV0(n)}}toV1(){switch(this.version){case 0:{const{code:e,digest:n}=this.multihash,r=Digest.create(e,n);return xs.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:n,version:r,_baseCache:a}=this;return 0===r?WZ(n,a,e||base58btc.encoder):GZ(n,a,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return JZ(/^0\.0/,QZ),!(!e||!e[TI]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof xs)return e;if(null!=e&&e.asCID===e){const{version:n,code:r,multihash:a,bytes:y}=e;return new xs(n,r,a,y||xI(n,r,a.bytes))}if(null!=e&&!0===e[TI]){const{version:n,multihash:r,code:a}=e,y=Digest.decode(r);return xs.create(n,a,y)}return null}static create(e,n,r){if("number"!=typeof n)throw new Error("String codecs are no longer supported");switch(e){case 0:if(n!==Dm)throw new Error(`Version 0 CID must use dag-pb (code: ${Dm}) block encoding`);return new xs(e,n,r,r.bytes);case 1:{const a=xI(e,n,r.bytes);return new xs(e,n,r,a)}default:throw new Error("Invalid version")}}static createV0(e){return xs.create(0,Dm,e)}static createV1(e,n){return xs.create(1,e,n)}static decode(e){const[n,r]=xs.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return n}static decodeFirst(e){const n=xs.inspectBytes(e),r=n.size-n.multihashSize,a=coerce(e.subarray(r,r+n.multihashSize));if(a.byteLength!==n.multihashSize)throw new Error("Incorrect length");const y=a.subarray(n.multihashSize-n.digestSize),T=new Digest.Digest(n.multihashCode,n.digestSize,y,a);return[0===n.version?xs.createV0(T):xs.createV1(n.codec,T),e.subarray(n.size)]}static inspectBytes(e){let n=0;const r=()=>{const[he,we]=varint.decode(e.subarray(n));return we,he};let a=r(),y=Dm;if(18===a?(0,0):1===a&&r(),0!==a&&1!==a)throw new RangeError(`Invalid CID version ${a}`);const T=n,Z=r(),$=r(),ie=n+$;return{version:a,codec:y,multihashCode:Z,digestSize:$,multihashSize:ie-T,size:ie}}static parse(e,n){const[r,a]=HZ(e,n),y=xs.decode(a);return y._baseCache.set(r,e),y}}Symbol.for("@ipld/js-cid/CID");const OI={...F,...L,...z,...j,...W,...Y,...G,...Q,...q,...J};function NI(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const PI=NI("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),S3=NI("ascii","a",t=>{let e="a";for(let n=0;n{const e=pI((t=t.substring(1)).length);for(let n=0;n"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new tY:typeof navigator<"u"?jI(navigator.userAgent):function aY(){var t=typeof process<"u"&&process.version;return t?new qZ(process.version.slice(1)):null}()}function BI(t){return""!==t&&iY.reduce(function(e,n){var r=n[0],a=n[1];if(e)return e;var y=a.exec(t);return!!y&&[r,y]},!1)}function jI(t){var e=BI(t);if(!e)return null;var n=e[0],r=e[1];if("searchbot"===n)return new eY;var a=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);a?a.length"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof t.senderPublicKey<"u"?Nu(t.senderPublicKey,Ts):void 0,r=typeof t.iv<"u"?Nu(t.iv,Ts):(0,dI.O6)(I3);return function DY(t){if(Im(t.type)===ah){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Pu(gI([t.type,t.senderPublicKey,t.iv,t.sealed]),D3)}return Pu(gI([t.type,t.iv,t.sealed]),D3)}({type:e,sealed:new fI.OK(Nu(t.symKey,Ts)).seal(r,Nu(t.message,C3)),iv:r,senderPublicKey:n})}function Hb(t){const e=Nu(t,D3),n=e.slice(bY,HI),r=HI;if(Im(n)===ah){const Z=r+x3,$=Z+I3,ie=e.slice(r,Z),ue=e.slice(Z,$);return{type:n,sealed:e.slice($),iv:ue,senderPublicKey:ie}}const a=r+I3,y=e.slice(r,a);return{type:n,sealed:e.slice(a),iv:y}}function WI(t){const e=t?.type||VI;if(e===ah){if(typeof t?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof t?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t?.senderPublicKey,receiverPublicKey:t?.receiverPublicKey}}function GI(t){return t.type===ah&&"string"==typeof t.senderPublicKey&&"string"==typeof t.receiverPublicKey}var IY=Object.defineProperty,ZI=Object.getOwnPropertySymbols,xY=Object.prototype.hasOwnProperty,TY=Object.prototype.propertyIsEnumerable,YI=(t,e,n)=>e in t?IY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JI=(t,e)=>{for(var n in e||(e={}))xY.call(e,n)&&YI(t,n,e[n]);if(ZI)for(var n of ZI(e))TY.call(e,n)&&YI(t,n,e[n]);return t};const OY="ReactNative",Xs={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},PY="js";function N3(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Cp(){return!(0,Cm.getDocument)()&&!!(0,Cm.getNavigator)()&&navigator.product===OY}function Ip(){return!N3()&&!!(0,Cm.getNavigator)()&&!!(0,Cm.getDocument)()}function xp(){return Cp()?Xs.reactNative:N3()?Xs.node:Ip()?Xs.browser:Xs.unknown}function jY(t,e,n){const r=function FY(){if(xp()===Xs.reactNative&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:n,Version:r}=global.Platform;return[n,r].join("-")}const t=oY();if(null===t)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return"browser"===t.type?[e,t.name,t.version].join("-"):[e,t.version].join("-")}(),a=function BY(){var t;const e=xp();return e===Xs.browser?[e,(null==(t=(0,Cm.getLocation)())?void 0:t.host)||"unknown"].join(":"):e}();return[[t,e].join("-"),[PY,n].join("-"),r,a].join("/")}function UY({protocol:t,version:e,relayUrl:n,sdkVersion:r,auth:a,projectId:y,useOnCloseEvent:T,bundleId:Z}){const $=n.split("?"),ue={auth:a,ua:jY(t,e,r),projectId:y,useOnCloseEvent:T||void 0,origin:Z||void 0},he=function kY(t,e){let n=zb.parse(t);return n=JI(JI({},n),e),zb.stringify(n)}($[1]||"",ue);return $[0]+"?"+he}function uh(t,e){return t.filter(n=>e.includes(n)).length===t.length}function XI(t){return Object.fromEntries(t.entries())}function qI(t){return new Map(Object.entries(t))}function Tp(t=Vn.FIVE_MINUTES,e){const n=(0,Vn.toMiliseconds)(t||Vn.FIVE_MINUTES);let r,a,y;return{resolve:T=>{y&&r&&(clearTimeout(y),r(T))},reject:T=>{y&&a&&(clearTimeout(y),a(T))},done:()=>new Promise((T,Z)=>{y=setTimeout(()=>{Z(new Error(e))},n),r=T,a=Z})}}function xm(t,e,n){return new Promise(function(){var r=(0,ke.Z)(function*(a,y){const T=setTimeout(()=>y(new Error(n)),e);try{a(yield t)}catch(Z){y(Z)}clearTimeout(T)});return function(a,y){return r.apply(this,arguments)}}())}function $I(t,e){if("string"==typeof e&&e.startsWith(`${t}:`))return e;if("topic"===t.toLowerCase()){if("string"!=typeof e)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}if("id"===t.toLowerCase()){if("number"!=typeof e)throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function ex(t){const[e,n]=t.split(":"),r={id:void 0,topic:void 0};if("topic"===e&&"string"==typeof n)r.topic=n;else{if("id"!==e||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${n}`);r.id=Number(n)}return r}function Ru(t,e){return(0,Vn.fromMiliseconds)((e||Date.now())+(0,Vn.toMiliseconds)(t))}function Of(t){return Date.now()>=(0,Vn.toMiliseconds)(t)}function oo(t,e){return`${t}${e?`:${e}`:""}`}function P3(){return P3=(0,ke.Z)(function*({id:t,topic:e,wcDeepLink:n}){try{if(!n)return;let a=("string"==typeof n?JSON.parse(n):n)?.href;if("string"!=typeof a)return;a.endsWith("/")&&(a=a.slice(0,-1));const y=`${a}/wc?requestId=${t}&sessionTopic=${e}`,T=xp();T===Xs.browser?y.startsWith("https://")?window.open(y,"_blank","noreferrer noopener"):window.open(y,"_self","noreferrer noopener"):T===Xs.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&(yield global.Linking.openURL(y))}catch(r){console.error(r)}}),P3.apply(this,arguments)}function R3(){return R3=(0,ke.Z)(function*(t,e){try{return(yield t.getItem(e))||(Ip()?localStorage.getItem(e):void 0)}catch(n){console.error(n)}}),R3.apply(this,arguments)}const YY="irn";function k3(t){return t?.relay||{protocol:YY}}function Wb(t){const e=lY[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var JY=Object.defineProperty,tx=Object.getOwnPropertySymbols,QY=Object.prototype.hasOwnProperty,XY=Object.prototype.propertyIsEnumerable,nx=(t,e,n)=>e in t?JY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qY=(t,e)=>{for(var n in e||(e={}))QY.call(e,n)&&nx(t,n,e[n]);if(tx)for(var n of tx(e))XY.call(e,n)&&nx(t,n,e[n]);return t};function $Y(t,e="-"){const n={},r="relay"+e;return Object.keys(t).forEach(a=>{if(a.startsWith(r)){const y=a.replace(r,""),T=t[a];n[y]=T}}),n}function rx(t){const e=(t=(t=t.includes("wc://")?t.replace("wc://",""):t).includes("wc:")?t.replace("wc:",""):t).indexOf(":"),n=-1!==t.indexOf("?")?t.indexOf("?"):void 0,r=t.substring(0,e),a=t.substring(e+1,n).split("@"),y=typeof n<"u"?t.substring(n):"",T=zb.parse(y);return{protocol:r,topic:eJ(a[0]),version:parseInt(a[1],10),symKey:T.symKey,relay:$Y(T)}}function eJ(t){return t.startsWith("//")?t.substring(2):t}function nJ(t){return`${t.protocol}:${t.topic}@${t.version}?`+zb.stringify(qY({symKey:t.symKey},function tJ(t,e="-"){const r={};return Object.keys(t).forEach(a=>{const y="relay"+e+a;t[a]&&(r[y]=t[a])}),r}(t.relay)))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function Op(t){const e=[];return t.forEach(n=>{const[r,a]=n.split(":");e.push(`${r}:${a}`)}),e}const gJ={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},yJ={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function _n(t,e){const{message:n,code:r}=yJ[t];return{message:e?`${n} ${e}`:n,code:r}}function po(t,e){const{message:n,code:r}=gJ[t];return{message:e?`${n} ${e}`:n,code:r}}function Tm(t,e){return!!Array.isArray(t)&&(!(typeof e<"u"&&t.length)||t.every(e))}function Np(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function Os(t){return typeof t>"u"}function Do(t,e){return!(!e||!Os(t))||"string"==typeof t&&!!t.trim().length}function L3(t,e){return!(!e||!Os(t))||"number"==typeof t&&!isNaN(t)}function Gb(t){return!(!Do(t,!1)||!t.includes(":"))&&2===t.split(":").length}function ux(t){let e=!0;return Tm(t)?t.length&&(e=t.every(n=>Do(n,!1))):e=!1,e}function _J(t,e,n){let r=null;return Object.entries(t).forEach(([a,y])=>{if(r)return;const T=function SJ(t,e,n){let r=null;return Tm(e)&&e.length?e.forEach(a=>{r||Gb(a)||(r=po("UNSUPPORTED_CHAINS",`${n}, chain ${a} should be a string and conform to "namespace:chainId" format`))}):Gb(t)||(r=po("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),r}(a,_3(a,y),`${e} ${n}`);T&&(r=T)}),r}function MJ(t,e){let n=null;return Tm(t)?t.forEach(r=>{n||function vJ(t){if(Do(t,!1)&&t.includes(":")){const e=t.split(":");if(3===e.length){const n=e[0]+":"+e[1];return!!e[2]&&Gb(n)}}return!1}(r)||(n=po("UNSUPPORTED_ACCOUNTS",`${e}, account ${r} should be a string and conform to "namespace:chainId:address" format`))}):n=po("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function cx(t,e){let n=null;return Object.values(t).forEach(r=>{if(n)return;const a=function CJ(t,e){let n=null;return ux(t?.methods)?ux(t?.events)||(n=po("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):n=po("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),n}(r,`${e}, namespace`);a&&(n=a)}),n}function Zb(t,e){let n=null;if(t&&Np(t)){const r=cx(t,e);r&&(n=r);const a=function DJ(t,e){let n=null;return Object.values(t).forEach(r=>{if(n)return;const a=MJ(r?.accounts,`${e} namespace`);a&&(n=a)}),n}(t,e);a&&(n=a)}else n=_n("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return n}function lx(t){return Do(t.protocol,!0)}function qs(t){return typeof t<"u"&&null!==typeof t}function fx(t,e){return!(!Gb(e)||!function lJ(t){const e=[];return Object.values(t).forEach(n=>{e.push(...Op(n.accounts))}),e}(t).includes(e))}function kJ(t,e,n){return!!Do(n,!1)&&function fJ(t,e){const n=[];return Object.values(t).forEach(r=>{Op(r.accounts).includes(e)&&n.push(...r.methods)}),n}(t,e).includes(n)}function LJ(t,e,n){return!!Do(n,!1)&&function dJ(t,e){const n=[];return Object.values(t).forEach(r=>{Op(r.accounts).includes(e)&&n.push(...r.events)}),n}(t,e).includes(n)}function F3(t,e,n){let r=null;const a=function FJ(t){const e={};return Object.keys(t).forEach(n=>{var r;n.includes(":")?e[n]=t[n]:null==(r=t[n].chains)||r.forEach(a=>{e[a]={methods:t[n].methods,events:t[n].events}})}),e}(t),y=function BJ(t){const e={};return Object.keys(t).forEach(n=>{n.includes(":")?e[n]=t[n]:Op(t[n].accounts)?.forEach(a=>{e[a]={accounts:t[n].accounts.filter(y=>y.includes(`${a}:`)),methods:t[n].methods,events:t[n].events}})}),e}(e),T=Object.keys(a),Z=Object.keys(y),$=dx(Object.keys(t)),ie=dx(Object.keys(e)),ue=$.filter(he=>!ie.includes(he));return ue.length&&(r=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${ue.toString()}\n Received: ${Object.keys(e).toString()}`)),uh(T,Z)||(r=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${T.toString()}\n Approved: ${Z.toString()}`)),Object.keys(e).forEach(he=>{if(!he.includes(":")||r)return;const we=Op(e[he].accounts);we.includes(he)||(r=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${he}\n Required: ${he}\n Approved: ${we.toString()}`))}),T.forEach(he=>{r||(uh(a[he].methods,y[he].methods)?uh(a[he].events,y[he].events)||(r=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${he}`)):r=_n("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${he}`))}),r}function dx(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function hx(){const t=xp();return new Promise(e=>{switch(t){case Xs.browser:e(function UJ(){return Ip()&&navigator?.onLine}());break;case Xs.reactNative:e(function KJ(){return B3.apply(this,arguments)}());break;case Xs.node:default:e(!0)}})}function B3(){return(B3=(0,ke.Z)(function*(){return!(Cp()&&typeof global<"u"&&null!=global&&global.NetInfo)||(yield null==global?void 0:global.NetInfo.fetch())?.isConnected})).apply(this,arguments)}function VJ(t){switch(xp()){case Xs.browser:!function HJ(t){!Cp()&&Ip()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}(t);break;case Xs.reactNative:!function WJ(t){Cp()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener(e=>t(e?.isConnected))}(t);case Xs.node:}}const j3={};class Yb{static get(e){return j3[e]}static set(e,n){j3[e]=n}static delete(e){delete j3[e]}}var ZJ=function GJ(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,Je=new Uint8Array($e);Ie[Le];){var ht=n[Ie.charCodeAt(Le)];if(255===ht)return;for(var xt=0,Wt=$e-1;(0!==ht||xt>>0,Je[Wt]=ht%256>>>0,ht=ht/256>>>0;if(0!==ht)throw new Error("Non-zero carry");Ue=xt,Le++}if(" "!==Ie[Le]){for(var An=$e-Ue;An!==$e&&0===Je[An];)An++;for(var rn=new Uint8Array(je+($e-An)),un=je;An!==$e;)rn[un++]=Je[An++];return rn}}}return{encode:function he(Ie){if(Ie instanceof Uint8Array||(ArrayBuffer.isView(Ie)?Ie=new Uint8Array(Ie.buffer,Ie.byteOffset,Ie.byteLength):Array.isArray(Ie)&&(Ie=Uint8Array.from(Ie))),!(Ie instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ie.length)return"";for(var Le=0,je=0,Ue=0,$e=Ie.length;Ue!==$e&&0===Ie[Ue];)Ue++,Le++;for(var Je=($e-Ue)*ue+1>>>0,ht=new Uint8Array(Je);Ue!==$e;){for(var xt=Ie[Ue],Wt=0,An=Je-1;(0!==xt||Wt>>0,ht[An]=xt%Z>>>0,xt=xt/Z>>>0;if(0!==xt)throw new Error("Non-zero carry");je=Wt,Ue++}for(var rn=Je-je;rn!==Je&&0===ht[rn];)rn++;for(var un=$.repeat(Le);rn{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class $J{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class eQ{constructor(e,n,r){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return px(this,e)}}class tQ{constructor(e){this.decoders=e}or(e){return px(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const px=(t,e)=>new tQ({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class nQ{constructor(e,n,r,a){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=a,this.encoder=new $J(e,n,r),this.decoder=new eQ(e,n,a)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Qb=({name:t,prefix:e,encode:n,decode:r})=>new nQ(t,e,n,r),Om=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:a}=JJ(n,e);return Qb({prefix:t,name:e,encode:r,decode:y=>Jb(a(y))})},Bo=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>Qb({prefix:e,name:t,encode:a=>((t,e,n)=>{const r="="===e[e.length-1],a=(1<n;)T-=n,y+=e[a&Z>>T];if(T&&(y+=e[a&Z<((t,e,n,r)=>{const a={};for(let ue=0;ue=8&&(Z-=8,T[ie++]=255&$>>Z)}if(Z>=n||255&$<<8-Z)throw new SyntaxError("Unexpected end of data");return T})(a,r,n,t)}),oQ=Qb({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),sQ=Bo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),aQ=Bo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),uQ=Om({prefix:"9",name:"base10",alphabet:"0123456789"}),cQ=Bo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),lQ=Bo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),fQ=Bo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),dQ=Bo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),hQ=Bo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),pQ=Bo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),gQ=Bo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),yQ=Bo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),mQ=Bo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),vQ=Bo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),bQ=Bo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),wQ=Om({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),AQ=Om({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),EQ=Om({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),SQ=Om({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),_Q=Bo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),MQ=Bo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),DQ=Bo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),CQ=Bo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),gx=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),IQ=gx.reduce((t,e,n)=>(t[n]=e,t),[]),xQ=gx.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const NQ=Qb({prefix:"\u{1f680}",name:"base256emoji",encode:function TQ(t){return t.reduce((e,n)=>e+=IQ[n],"")},decode:function OQ(t){const e=[];for(const n of t){const r=xQ[n.codePointAt(0)];if(void 0===r)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}});var PQ=function mx(t,e,n){e=e||[];for(var r=n=n||0;t>=LQ;)e[n++]=255&t|yx,t/=128;for(;t&kQ;)e[n++]=255&t|yx,t>>>=7;return e[n]=0|t,mx.bytes=n-r+1,e},yx=128,kQ=-128,LQ=Math.pow(2,31);var FQ=function U3(t,r){var T,n=0,a=0,y=r=r||0,Z=t.length;do{if(y>=Z)throw U3.bytes=0,new RangeError("Could not decode varint");T=t[y++],n+=a<28?(T&vx)<=BQ);return U3.bytes=y-r,n},BQ=128,vx=127;var jQ=Math.pow(2,7),UQ=Math.pow(2,14),KQ=Math.pow(2,21),zQ=Math.pow(2,28),VQ=Math.pow(2,35),HQ=Math.pow(2,42),WQ=Math.pow(2,49),GQ=Math.pow(2,56),ZQ=Math.pow(2,63),JQ={encode:PQ,decode:FQ,encodingLength:function(t){return t(bx.encode(t,e,n),e),Ax=t=>bx.encodingLength(t),K3=(t,e)=>{const n=e.byteLength,r=Ax(t),a=r+Ax(n),y=new Uint8Array(a+n);return wx(t,y,0),wx(n,y,r),y.set(e,a),new Ex(t,n,e,y)};class Ex{constructor(e,n,r,a){this.code=e,this.size=n,this.digest=r,this.bytes=a}}const Sx=({name:t,code:e,encode:n})=>new XQ(t,e,n);class XQ{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?K3(this.code,n):n.then(r=>K3(this.code,r))}throw Error("Unknown type, must be binary type")}}const _x=t=>function(){var e=(0,ke.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),qQ=Sx({name:"sha2-256",code:18,encode:_x("SHA-256")}),$Q=Sx({name:"sha2-512",code:19,encode:_x("SHA-512")}),Dx=Jb,tX={code:0,name:"identity",encode:Dx,digest:t=>K3(0,Dx(t))},nX="raw",rX=85,iX=t=>Jb(t),oX=t=>Jb(t),sX=new TextEncoder,aX=new TextDecoder,uX="json",cX=512,lX=t=>sX.encode(JSON.stringify(t)),fX=t=>JSON.parse(aX.decode(t));class Ns{constructor(e,n,r,a){this.code=n,this.version=e,this.multihash=r,this.bytes=a,this.byteOffset=a.byteOffset,this.byteLength=a.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:qb,byteLength:qb,code:Xb,version:Xb,multihash:Xb,bytes:Xb,_baseCache:qb,asCID:qb})}toV0(){if(0===this.version)return this;{const{code:e,multihash:n}=this;if(e!==Nm)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==gX)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Ns.createV0(n)}}toV1(){switch(this.version){case 0:{const{code:e,digest:n}=this.multihash,r=Digest.create(e,n);return Ns.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:n,version:r,_baseCache:a}=this;return 0===r?hX(n,a,e||base58btc.encoder):pX(n,a,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return mX(/^0\.0/,vX),!(!e||!e[Ix]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Ns)return e;if(null!=e&&e.asCID===e){const{version:n,code:r,multihash:a,bytes:y}=e;return new Ns(n,r,a,y||Cx(n,r,a.bytes))}if(null!=e&&!0===e[Ix]){const{version:n,multihash:r,code:a}=e,y=Digest.decode(r);return Ns.create(n,a,y)}return null}static create(e,n,r){if("number"!=typeof n)throw new Error("String codecs are no longer supported");switch(e){case 0:if(n!==Nm)throw new Error(`Version 0 CID must use dag-pb (code: ${Nm}) block encoding`);return new Ns(e,n,r,r.bytes);case 1:{const a=Cx(e,n,r.bytes);return new Ns(e,n,r,a)}default:throw new Error("Invalid version")}}static createV0(e){return Ns.create(0,Nm,e)}static createV1(e,n){return Ns.create(1,e,n)}static decode(e){const[n,r]=Ns.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return n}static decodeFirst(e){const n=Ns.inspectBytes(e),r=n.size-n.multihashSize,a=coerce(e.subarray(r,r+n.multihashSize));if(a.byteLength!==n.multihashSize)throw new Error("Incorrect length");const y=a.subarray(n.multihashSize-n.digestSize),T=new Digest.Digest(n.multihashCode,n.digestSize,y,a);return[0===n.version?Ns.createV0(T):Ns.createV1(n.codec,T),e.subarray(n.size)]}static inspectBytes(e){let n=0;const r=()=>{const[he,we]=varint.decode(e.subarray(n));return we,he};let a=r(),y=Nm;if(18===a?(0,0):1===a&&r(),0!==a&&1!==a)throw new RangeError(`Invalid CID version ${a}`);const T=n,Z=r(),$=r(),ie=n+$;return{version:a,codec:y,multihashCode:Z,digestSize:$,multihashSize:ie-T,size:ie}}static parse(e,n){const[r,a]=dX(e,n),y=Ns.decode(a);return y._baseCache.set(r,e),y}}Symbol.for("@ipld/js-cid/CID");const xx={...s,...d,...h,...S,...k,...B,...I,...f,...R,...se};function wX(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?function bX(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function Tx(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const Ox=Tx("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),z3=Tx("ascii","a",t=>{let e="a";for(let n=0;n{const e=wX((t=t.substring(1)).length);for(let n=0;nn.code===t)||Pm[Px]}var TX=g(71948);function H3(t=3){return Date.now()*Math.pow(10,t)+Math.floor(Math.random()*Math.pow(10,t))}function Fx(t=6){return BigInt(H3(t))}function Pp(t,e,n){return{id:n||H3(),jsonrpc:"2.0",method:t,params:e}}function W3(t,e){return{id:t,jsonrpc:"2.0",result:e}}function G3(t,e,n){return{id:t,jsonrpc:"2.0",error:OX(e,n)}}function OX(t,e){return typeof t>"u"?kx(Nx):("string"==typeof t&&(t=Object.assign(Object.assign({},kx(V3)),{message:t})),typeof e<"u"&&(t.data=e),Rx(t.code)&&(t=Lx(t.code)),t)}class NX{}class PX extends NX{constructor(){super()}}class RX extends PX{constructor(e){super()}}const LX="^wss?:";function Bx(t,e){const n=function FX(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(e&&e.length)return e[0]}(t);return!(typeof n>"u")&&new RegExp(e).test(n)}function jx(t){return Bx(t,LX)}function BX(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function Ux(t){return"object"==typeof t&&"id"in t&&"jsonrpc"in t&&"2.0"===t.jsonrpc}function Z3(t){return Ux(t)&&"method"in t}function $b(t){return Ux(t)&&(ml(t)||ku(t))}function ml(t){return"result"in t}function ku(t){return"error"in t}class jX extends RX{constructor(e){super(e),this.events=new Du.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}connect(e=this.connection){var n=this;return(0,ke.Z)(function*(){yield n.open(e)})()}disconnect(){var e=this;return(0,ke.Z)(function*(){yield e.close()})()}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}request(e,n){var r=this;return(0,ke.Z)(function*(){return r.requestStrict(Pp(e.method,e.params||[],e.id||Fx().toString()),n)})()}requestStrict(e,n){var r=this;return(0,ke.Z)(function*(){return new Promise(function(){var a=(0,ke.Z)(function*(y,T){if(!r.connection.connected)try{yield r.open()}catch(Z){T(Z)}r.events.on(`${e.id}`,Z=>{ku(Z)?T(Z.error):y(Z.result)});try{yield r.connection.send(e,n)}catch(Z){T(Z)}});return function(y,T){return a.apply(this,arguments)}}())})()}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),$b(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}open(e=this.connection){var n=this;return(0,ke.Z)(function*(){n.connection===e&&n.connection.connected||(n.connection.connected&&n.close(),"string"==typeof e&&(yield n.connection.open(e),e=n.connection),n.connection=n.setConnection(e),yield n.connection.open(),n.registerEventListeners(),n.events.emit("connect"))})()}close(){var e=this;return(0,ke.Z)(function*(){yield e.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const Kx=t=>t.split("?")[0],zX=typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:g(25504);class VX{constructor(e){if(this.url=e,this.events=new Du.EventEmitter,this.registering=!1,!jx(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}open(e=this.url){var n=this;return(0,ke.Z)(function*(){yield n.register(e)})()}close(){var e=this;return(0,ke.Z)(function*(){return new Promise((n,r)=>{typeof e.socket>"u"?r(new Error("Connection already closed")):(e.socket.onclose=a=>{e.onClose(a),n()},e.socket.close())})})()}send(e){var n=this;return(0,ke.Z)(function*(){typeof n.socket>"u"&&(n.socket=yield n.register());try{n.socket.send(jC(e))}catch(r){n.onError(e.id,r)}})()}register(e=this.url){if(!jx(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const n=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=n||this.events.listenerCount("open")>=n)&&this.events.setMaxListeners(n+1),new Promise((r,a)=>{this.events.once("register_error",y=>{this.resetMaxListeners(),a(y)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return a(new Error("WebSocket connection is missing or invalid"));r(this.socket)})})}return this.url=e,this.registering=!0,new Promise((n,r)=>{const a=new URLSearchParams(e).get("origin"),y=(0,TX.isReactNative)()?{headers:{origin:a}}:{rejectUnauthorized:!BX(e)},T=new zX(e,[],y);typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?T.onerror=Z=>{const $=Z;r(this.emitError($.error))}:T.on("error",Z=>{r(this.emitError(Z))}),T.onopen=()=>{this.onOpen(T),n(T)}})}onOpen(e){e.onmessage=n=>this.onPayload(n),e.onclose=n=>this.onClose(n),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const n="string"==typeof e.data?BC(e.data):e.data;this.events.emit("payload",n)}onError(e,n){const r=this.parseError(n),y=G3(e,r.message||r.toString());this.events.emit("payload",y)}parseError(e,n=this.url){return function xX(t,e,n){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${e}`):t}(e,Kx(n),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const n=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${Kx(this.url)}`));return this.events.emit("register_error",n),n}}var HX=g(88222),WX=g.n(HX),GX=g(33024),ZX=g.n(GX);var JX=function YX(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r>>0,Je=new Uint8Array($e);Ie[Le];){var ht=n[Ie.charCodeAt(Le)];if(255===ht)return;for(var xt=0,Wt=$e-1;(0!==ht||xt>>0,Je[Wt]=ht%256>>>0,ht=ht/256>>>0;if(0!==ht)throw new Error("Non-zero carry");Ue=xt,Le++}if(" "!==Ie[Le]){for(var An=$e-Ue;An!==$e&&0===Je[An];)An++;for(var rn=new Uint8Array(je+($e-An)),un=je;An!==$e;)rn[un++]=Je[An++];return rn}}}return{encode:function he(Ie){if(Ie instanceof Uint8Array||(ArrayBuffer.isView(Ie)?Ie=new Uint8Array(Ie.buffer,Ie.byteOffset,Ie.byteLength):Array.isArray(Ie)&&(Ie=Uint8Array.from(Ie))),!(Ie instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ie.length)return"";for(var Le=0,je=0,Ue=0,$e=Ie.length;Ue!==$e&&0===Ie[Ue];)Ue++,Le++;for(var Je=($e-Ue)*ue+1>>>0,ht=new Uint8Array(Je);Ue!==$e;){for(var xt=Ie[Ue],Wt=0,An=Je-1;(0!==xt||Wt>>0,ht[An]=xt%Z>>>0,xt=xt/Z>>>0;if(0!==xt)throw new Error("Non-zero carry");je=Wt,Ue++}for(var rn=Je-je;rn!==Je&&0===ht[rn];)rn++;for(var un=$.repeat(Le);rn{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")};class $X{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class eq{constructor(e,n,r){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Hx(this,e)}}class tq{constructor(e){this.decoders=e}or(e){return Hx(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Hx=(t,e)=>new tq({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class nq{constructor(e,n,r,a){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=a,this.encoder=new $X(e,n,r),this.decoder=new eq(e,n,a)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const ew=({name:t,prefix:e,encode:n,decode:r})=>new nq(t,e,n,r),Rm=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:a}=QX(n,e);return ew({prefix:t,name:e,encode:r,decode:y=>Vx(a(y))})},jo=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>ew({prefix:e,name:t,encode:a=>((t,e,n)=>{const r="="===e[e.length-1],a=(1<n;)T-=n,y+=e[a&Z>>T];if(T&&(y+=e[a&Z<((t,e,n,r)=>{const a={};for(let ue=0;ue=8&&(Z-=8,T[ie++]=255&$>>Z)}if(Z>=n||255&$<<8-Z)throw new SyntaxError("Unexpected end of data");return T})(a,r,n,t)}),oq=ew({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)});var sq=Object.freeze({__proto__:null,identity:oq});const aq=jo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var uq=Object.freeze({__proto__:null,base2:aq});const cq=jo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var lq=Object.freeze({__proto__:null,base8:cq});const fq=Rm({prefix:"9",name:"base10",alphabet:"0123456789"});var dq=Object.freeze({__proto__:null,base10:fq});const hq=jo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),pq=jo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var gq=Object.freeze({__proto__:null,base16:hq,base16upper:pq});const yq=jo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),mq=jo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),vq=jo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),bq=jo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),wq=jo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Aq=jo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Eq=jo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Sq=jo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),_q=jo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Mq=Object.freeze({__proto__:null,base32:yq,base32upper:mq,base32pad:vq,base32padupper:bq,base32hex:wq,base32hexupper:Aq,base32hexpad:Eq,base32hexpadupper:Sq,base32z:_q});const Dq=Rm({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Cq=Rm({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Iq=Object.freeze({__proto__:null,base36:Dq,base36upper:Cq});const xq=Rm({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Tq=Rm({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Oq=Object.freeze({__proto__:null,base58btc:xq,base58flickr:Tq});const Nq=jo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Pq=jo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Rq=jo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),kq=jo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Lq=Object.freeze({__proto__:null,base64:Nq,base64pad:Pq,base64url:Rq,base64urlpad:kq});const Wx=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),Fq=Wx.reduce((t,e,n)=>(t[n]=e,t),[]),Bq=Wx.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const Kq=ew({prefix:"\u{1f680}",name:"base256emoji",encode:function jq(t){return t.reduce((e,n)=>e+=Fq[n],"")},decode:function Uq(t){const e=[];for(const n of t){const r=Bq[n.codePointAt(0)];if(void 0===r)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}});var zq=Object.freeze({__proto__:null,base256emoji:Kq}),Vq=function Zx(t,e,n){e=e||[];for(var r=n=n||0;t>=Gq;)e[n++]=255&t|Gx,t/=128;for(;t&Wq;)e[n++]=255&t|Gx,t>>>=7;return e[n]=0|t,Zx.bytes=n-r+1,e},Gx=128,Wq=-128,Gq=Math.pow(2,31);var Zq=function Y3(t,r){var T,n=0,a=0,y=r=r||0,Z=t.length;do{if(y>=Z)throw Y3.bytes=0,new RangeError("Could not decode varint");T=t[y++],n+=a<28?(T&Yx)<=Yq);return Y3.bytes=y-r,n},Yq=128,Yx=127;var Jq=Math.pow(2,7),Qq=Math.pow(2,14),Xq=Math.pow(2,21),qq=Math.pow(2,28),$q=Math.pow(2,35),e$=Math.pow(2,42),t$=Math.pow(2,49),n$=Math.pow(2,56),r$=Math.pow(2,63),o$={encode:Vq,decode:Zq,encodingLength:function(t){return t(Jx.encode(t,e,n),e),Xx=t=>Jx.encodingLength(t),J3=(t,e)=>{const n=e.byteLength,r=Xx(t),a=r+Xx(n),y=new Uint8Array(a+n);return Qx(t,y,0),Qx(n,y,r),y.set(e,a),new s$(t,n,e,y)};class s${constructor(e,n,r,a){this.code=e,this.size=n,this.digest=r,this.bytes=a}}const qx=({name:t,code:e,encode:n})=>new a$(t,e,n);class a${constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?J3(this.code,n):n.then(r=>J3(this.code,r))}throw Error("Unknown type, must be binary type")}}const $x=t=>function(){var e=(0,ke.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),u$=qx({name:"sha2-256",code:18,encode:$x("SHA-256")}),c$=qx({name:"sha2-512",code:19,encode:$x("SHA-512")});Object.freeze({__proto__:null,sha256:u$,sha512:c$});const tT=Vx;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:tT,digest:t=>J3(0,tT(t))}});new TextEncoder,new TextDecoder;const nT={...sq,...uq,...lq,...dq,...gq,...Mq,...Iq,...Oq,...Lq,...zq};function rT(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function iT(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const oT=iT("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),Q3=iT("ascii","a",t=>{let e="a";for(let n=0;n{const e=function h$(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?rT(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}((t=t.substring(1)).length);for(let n=0;n(this.isInitialized(),this.keychain.has(a)),this.set=function(){var a=(0,ke.Z)(function*(y,T){r.isInitialized(),r.keychain.set(y,T),yield r.persist()});return function(y,T){return a.apply(this,arguments)}}(),this.get=a=>{this.isInitialized();const y=this.keychain.get(a);if(typeof y>"u"){const{message:T}=_n("NO_MATCHING_KEY",`${this.name}: ${a}`);throw new Error(T)}return y},this.del=function(){var a=(0,ke.Z)(function*(y){r.isInitialized(),r.keychain.delete(y),yield r.persist()});return function(y){return a.apply(this,arguments)}}(),this.core=e,this.logger=(0,Kr.generateChildLogger)(n,this.name)}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setKeyChain(e){var n=this;return(0,ke.Z)(function*(){yield n.core.storage.setItem(n.storageKey,XI(e))})()}getKeyChain(){var e=this;return(0,ke.Z)(function*(){const n=yield e.core.storage.getItem(e.storageKey);return typeof n<"u"?qI(n):void 0})()}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setKeyChain(e.keychain)})()}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Y${constructor(e,n,r){var a=this;this.core=e,this.logger=n,this.name="crypto",this.initialized=!1,this.init=(0,ke.Z)(function*(){a.initialized||(yield a.keychain.init(),a.initialized=!0)}),this.hasKeys=y=>(this.isInitialized(),this.keychain.has(y)),this.getClientId=(0,ke.Z)(function*(){a.isInitialized();return cI(lI(yield a.getClientSeed()).publicKey)}),this.generateKeyPair=()=>{this.isInitialized();const y=function wY(){const t=hI.Au();return{privateKey:Pu(t.secretKey,Ts),publicKey:Pu(t.publicKey,Ts)}}();return this.setPrivateKey(y.publicKey,y.privateKey)},this.signJWT=function(){var y=(0,ke.Z)(function*(T){a.isInitialized();const $=lI(yield a.getClientSeed()),ie=T3();return yield function EG(t,e,n,r){return m3.apply(this,arguments)}(ie,T,w$,$)});return function(T){return y.apply(this,arguments)}}(),this.generateSharedKey=(y,T,Z)=>{this.isInitialized();const ie=function AY(t,e){const n=hI.gi(Nu(t,Ts),Nu(e,Ts),!0);return Pu(new SG.t(b3.mE,n).expand(x3),Ts)}(this.getPrivateKey(y),T);return this.setSymKey(ie,Z)},this.setSymKey=function(){var y=(0,ke.Z)(function*(T,Z){a.isInitialized();const $=Z||function EY(t){return Pu((0,b3.vp)(Nu(t,Ts)),Ts)}(T);return yield a.keychain.set($,T),$});return function(T,Z){return y.apply(this,arguments)}}(),this.deleteKeyPair=function(){var y=(0,ke.Z)(function*(T){a.isInitialized(),yield a.keychain.del(T)});return function(T){return y.apply(this,arguments)}}(),this.deleteSymKey=function(){var y=(0,ke.Z)(function*(T){a.isInitialized(),yield a.keychain.del(T)});return function(T){return y.apply(this,arguments)}}(),this.encode=function(){var y=(0,ke.Z)(function*(T,Z,$){a.isInitialized();const ie=WI($),ue=jC(Z);if(GI(ie)){const Ie=ie.senderPublicKey,Le=ie.receiverPublicKey;T=yield a.generateSharedKey(Ie,Le)}const he=a.getSymKey(T),{type:we,senderPublicKey:xe}=ie;return _Y({type:we,symKey:he,message:ue,senderPublicKey:xe})});return function(T,Z,$){return y.apply(this,arguments)}}(),this.decode=function(){var y=(0,ke.Z)(function*(T,Z,$){a.isInitialized();const ie=function CY(t,e){const n=Hb(t);return WI({type:Im(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?Pu(n.senderPublicKey,Ts):void 0,receiverPublicKey:e?.receiverPublicKey})}(Z,$);if(GI(ie)){const ue=ie.receiverPublicKey,he=ie.senderPublicKey;T=yield a.generateSharedKey(ue,he)}try{const he=function MY(t){const e=new fI.OK(Nu(t.symKey,Ts)),{sealed:n,iv:r}=Hb(t.encoded),a=e.open(r,n);if(null===a)throw new Error("Failed to decrypt");return Pu(a,C3)}({symKey:a.getSymKey(T),encoded:Z});return BC(he)}catch(ue){a.logger.error(`Failed to decode message from topic: '${T}', clientId: '${yield a.getClientId()}'`),a.logger.error(ue)}});return function(T,Z,$){return y.apply(this,arguments)}}(),this.getPayloadType=y=>Im(Hb(y).type),this.getPayloadSenderPublicKey=y=>{const T=Hb(y);return T.senderPublicKey?function EX(t,e="utf8"){const n=AX[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(t).substring(1):globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8")}(T.senderPublicKey,Ts):void 0},this.core=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.keychain=r||new Z$(this.core,this.logger)}get context(){return(0,Kr.getLoggerContext)(this.logger)}setPrivateKey(e,n){var r=this;return(0,ke.Z)(function*(){return yield r.keychain.set(e,n),e})()}getPrivateKey(e){return this.keychain.get(e)}getClientSeed(){var e=this;return(0,ke.Z)(function*(){let n="";try{n=e.keychain.get(aT)}catch{n=T3(),yield e.keychain.set(aT,n)}return function g$(t,e="utf8"){const n=p$[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${t}`):rT(globalThis.Buffer.from(t,"utf-8"))}(n,"base16")})()}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class J$ extends wH{constructor(e,n){var r;super(e,n),r=this,this.logger=e,this.core=n,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Nf,this.init=(0,ke.Z)(function*(){if(!r.initialized){r.logger.trace("Initialized");try{const a=yield r.getRelayerMessages();typeof a<"u"&&(r.messages=a),r.logger.debug(`Successfully Restored records for ${r.name}`),r.logger.trace({type:"method",method:"restore",size:r.messages.size})}catch(a){r.logger.debug(`Failed to Restore records for ${r.name}`),r.logger.error(a)}finally{r.initialized=!0}}}),this.set=function(){var a=(0,ke.Z)(function*(y,T){r.isInitialized();const Z=Dp(T);let $=r.messages.get(y);return typeof $>"u"&&($={}),typeof $[Z]<"u"||($[Z]=T,r.messages.set(y,$),yield r.persist()),Z});return function(y,T){return a.apply(this,arguments)}}(),this.get=a=>{this.isInitialized();let y=this.messages.get(a);return typeof y>"u"&&(y={}),y},this.has=(a,y)=>{this.isInitialized();return typeof this.get(a)[Dp(y)]<"u"},this.del=function(){var a=(0,ke.Z)(function*(y){r.isInitialized(),r.messages.delete(y),yield r.persist()});return function(y){return a.apply(this,arguments)}}(),this.logger=(0,Kr.generateChildLogger)(e,this.name),this.core=n}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setRelayerMessages(e){var n=this;return(0,ke.Z)(function*(){yield n.core.storage.setItem(n.storageKey,XI(e))})()}getRelayerMessages(){var e=this;return(0,ke.Z)(function*(){const n=yield e.core.storage.getItem(e.storageKey);return typeof n<"u"?qI(n):void 0})()}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setRelayerMessages(e.messages)})()}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Q$ extends AH{constructor(e,n){var r;super(e,n),r=this,this.relayer=e,this.logger=n,this.events=new Du.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,Vn.toMiliseconds)(Vn.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=function(){var a=(0,ke.Z)(function*(y,T,Z){var $;r.logger.debug("Publishing Payload"),r.logger.trace({type:"method",method:"publish",params:{topic:y,message:T,opts:Z}});try{const ie=Z?.ttl||M$,ue=k3(Z),he=Z?.prompt||!1,we=Z?.tag||0,xe=Z?.id||Fx().toString(),Ie={topic:y,message:T,opts:{ttl:ie,relay:ue,prompt:he,tag:we,id:xe}},Le=setTimeout(()=>r.queue.set(xe,Ie),r.publishTimeout);try{yield yield xm(r.rpcPublish(y,T,ie,ue,he,we,xe),r.publishTimeout,"Failed to publish payload, please try again."),r.removeRequestFromQueue(xe),r.relayer.events.emit(ss_publish,Ie)}catch(je){if(r.logger.debug("Publishing Payload stalled"),r.needsTransportRestart=!0,null!=($=Z?.internal)&&$.throwOnFailedPublish)throw r.removeRequestFromQueue(xe),je;return}finally{clearTimeout(Le)}r.logger.debug("Successfully Published Payload"),r.logger.trace({type:"method",method:"publish",params:{topic:y,message:T,opts:Z}})}catch(ie){throw r.logger.debug("Failed to Publish Payload"),r.logger.error(ie),ie}});return function(y,T,Z){return a.apply(this,arguments)}}(),this.on=(a,y)=>{this.events.on(a,y)},this.once=(a,y)=>{this.events.once(a,y)},this.off=(a,y)=>{this.events.off(a,y)},this.removeListener=(a,y)=>{this.events.removeListener(a,y)},this.relayer=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.registerEventListeners()}get context(){return(0,Kr.getLoggerContext)(this.logger)}rpcPublish(e,n,r,a,y,T,Z){var $,ie,ue,he;const we={method:Wb(a.protocol).publish,params:{topic:e,message:n,ttl:r,prompt:y,tag:T},id:Z};return Os(null==($=we.params)?void 0:$.prompt)&&(null==(ie=we.params)||delete ie.prompt),Os(null==(ue=we.params)?void 0:ue.tag)&&(null==(he=we.params)||delete he.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:we}),this.relayer.request(we)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){var e=this;this.queue.forEach(function(){var n=(0,ke.Z)(function*(r){const{topic:a,message:y,opts:T}=r;yield e.publish(a,y,T)});return function(r){return n.apply(this,arguments)}}())}registerEventListeners(){this.relayer.core.heartbeat.on(Em.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(ss_connection_stalled);this.checkQueue()}),this.relayer.on(ss_message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class X${constructor(){this.map=new Map,this.set=(e,n)=>{const r=this.get(e);this.exists(e,n)||this.map.set(e,[...r,n])},this.get=e=>this.map.get(e)||[],this.exists=(e,n)=>this.get(e).includes(n),this.delete=(e,n)=>{if(typeof n>"u")return void this.map.delete(e);if(!this.map.has(e))return;const r=this.get(e);if(!this.exists(e,n))return;const a=r.filter(y=>y!==n);a.length?this.map.set(e,a):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var q$=Object.defineProperty,$$=Object.defineProperties,eee=Object.getOwnPropertyDescriptors,fT=Object.getOwnPropertySymbols,tee=Object.prototype.hasOwnProperty,nee=Object.prototype.propertyIsEnumerable,dT=(t,e,n)=>e in t?q$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fm=(t,e)=>{for(var n in e||(e={}))tee.call(e,n)&&dT(t,n,e[n]);if(fT)for(var n of fT(e))nee.call(e,n)&&dT(t,n,e[n]);return t},eS=(t,e)=>$$(t,eee(e));class ree extends _H{constructor(e,n){var r;super(e,n),r=this,this.relayer=e,this.logger=n,this.subscriptions=new Map,this.topicMap=new X$,this.events=new Du.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Nf,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=(0,ke.Z)(function*(){r.initialized||(r.logger.trace("Initialized"),r.registerEventListeners(),r.clientId=yield r.relayer.core.crypto.getClientId())}),this.subscribe=function(){var a=(0,ke.Z)(function*(y,T){yield r.restartToComplete(),r.isInitialized(),r.logger.debug("Subscribing Topic"),r.logger.trace({type:"method",method:"subscribe",params:{topic:y,opts:T}});try{const Z=k3(T),$={topic:y,relay:Z};r.pending.set(y,$);const ie=yield r.rpcSubscribe(y,Z);return r.onSubscribe(ie,$),r.logger.debug("Successfully Subscribed Topic"),r.logger.trace({type:"method",method:"subscribe",params:{topic:y,opts:T}}),ie}catch(Z){throw r.logger.debug("Failed to Subscribe Topic"),r.logger.error(Z),Z}});return function(y,T){return a.apply(this,arguments)}}(),this.unsubscribe=function(){var a=(0,ke.Z)(function*(y,T){yield r.restartToComplete(),r.isInitialized(),typeof T?.id<"u"?yield r.unsubscribeById(y,T.id,T):yield r.unsubscribeByTopic(y,T)});return function(y,T){return a.apply(this,arguments)}}(),this.isSubscribed=function(){var a=(0,ke.Z)(function*(y){return!!r.topics.includes(y)||(yield new Promise((T,Z)=>{const $=new Vn.Watch;$.start(r.pendingSubscriptionWatchLabel);const ie=setInterval(()=>{!r.pending.has(y)&&r.topics.includes(y)&&(clearInterval(ie),$.stop(r.pendingSubscriptionWatchLabel),T(!0)),$.elapsed(r.pendingSubscriptionWatchLabel)>=F$&&(clearInterval(ie),$.stop(r.pendingSubscriptionWatchLabel),Z(new Error("Subscription resolution timeout")))},r.pollingInterval)}).catch(()=>!1))});return function(y){return a.apply(this,arguments)}}(),this.on=(a,y)=>{this.events.on(a,y)},this.once=(a,y)=>{this.events.once(a,y)},this.off=(a,y)=>{this.events.off(a,y)},this.removeListener=(a,y)=>{this.events.removeListener(a,y)},this.restart=(0,ke.Z)(function*(){r.restartInProgress=!0,yield r.restore(),yield r.reset(),r.restartInProgress=!1}),this.relayer=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.clientId=""}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,n){let r=!1;try{r=this.getSubscription(e).topic===n}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}unsubscribeByTopic(e,n){var r=this;return(0,ke.Z)(function*(){const a=r.topicMap.get(e);yield Promise.all(a.map(function(){var y=(0,ke.Z)(function*(T){return yield r.unsubscribeById(e,T,n)});return function(T){return y.apply(this,arguments)}}()))})()}unsubscribeById(e,n,r){var a=this;return(0,ke.Z)(function*(){a.logger.debug("Unsubscribing Topic"),a.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:r}});try{const y=k3(r);yield a.rpcUnsubscribe(e,n,y);const T=po("USER_DISCONNECTED",`${a.name}, ${e}`);yield a.onUnsubscribe(e,n,T),a.logger.debug("Successfully Unsubscribed Topic"),a.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:r}})}catch(y){throw a.logger.debug("Failed to Unsubscribe Topic"),a.logger.error(y),y}})()}rpcSubscribe(e,n){var r=this;return(0,ke.Z)(function*(){const a={method:Wb(n.protocol).subscribe,params:{topic:e}};r.logger.debug("Outgoing Relay Payload"),r.logger.trace({type:"payload",direction:"outgoing",request:a});try{yield yield xm(r.relayer.request(a),r.subscribeTimeout)}catch{r.logger.debug("Outgoing Relay Subscribe Payload stalled"),r.relayer.events.emit(ss_connection_stalled)}return Dp(e+r.clientId)})()}rpcBatchSubscribe(e){var n=this;return(0,ke.Z)(function*(){if(!e.length)return;const a={method:Wb(e[0].relay.protocol).batchSubscribe,params:{topics:e.map(y=>y.topic)}};n.logger.debug("Outgoing Relay Payload"),n.logger.trace({type:"payload",direction:"outgoing",request:a});try{return yield yield xm(n.relayer.request(a),n.subscribeTimeout)}catch{n.logger.debug("Outgoing Relay Payload stalled"),n.relayer.events.emit(ss_connection_stalled)}})()}rpcUnsubscribe(e,n,r){const a={method:Wb(r.protocol).unsubscribe,params:{topic:e,id:n}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:a}),this.relayer.request(a)}onSubscribe(e,n){this.setSubscription(e,eS(Fm({},n),{id:e})),this.pending.delete(n.topic)}onBatchSubscribe(e){e.length&&e.forEach(n=>{this.setSubscription(n.id,Fm({},n)),this.pending.delete(n.topic)})}onUnsubscribe(e,n,r){var a=this;return(0,ke.Z)(function*(){a.events.removeAllListeners(n),a.hasSubscription(n,e)&&a.deleteSubscription(n,r),yield a.relayer.messages.del(e)})()}setRelayerSubscriptions(e){var n=this;return(0,ke.Z)(function*(){yield n.relayer.core.storage.setItem(n.storageKey,e)})()}getRelayerSubscriptions(){var e=this;return(0,ke.Z)(function*(){return yield e.relayer.core.storage.getItem(e.storageKey)})()}setSubscription(e,n){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:n}),this.addSubscription(e,n))}addSubscription(e,n){this.subscriptions.set(e,Fm({},n)),this.topicMap.set(n.topic,e),this.events.emit(Lu_created,n)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const n=this.subscriptions.get(e);if(!n){const{message:r}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(r)}return n}deleteSubscription(e,n){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:n});const r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(Lu_deleted,eS(Fm({},r),{reason:n}))}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setRelayerSubscriptions(e.values),e.events.emit(Lu_sync)})()}reset(){var e=this;return(0,ke.Z)(function*(){if(e.cached.length){const n=Math.ceil(e.cached.length/e.batchSubscribeTopicsLimit);for(let r=0;r"u"||!n.length)return;if(e.subscriptions.size){const{message:r}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(r),e.logger.error(`${e.name}: ${JSON.stringify(e.values)}`),new Error(r)}e.cached=n,e.logger.debug(`Successfully Restored subscriptions for ${e.name}`),e.logger.trace({type:"method",method:"restore",subscriptions:e.values})}catch(n){e.logger.debug(`Failed to Restore subscriptions for ${e.name}`),e.logger.error(n)}})()}batchSubscribe(e){var n=this;return(0,ke.Z)(function*(){if(!e.length)return;const r=yield n.rpcBatchSubscribe(e);Tm(r)&&n.onBatchSubscribe(r.map((a,y)=>eS(Fm({},e[y]),{id:a})))})()}onConnect(){var e=this;return(0,ke.Z)(function*(){e.restartInProgress||(yield e.restart(),e.onEnable())})()}onDisconnect(){this.onDisable()}checkPending(){var e=this;return(0,ke.Z)(function*(){if(!e.initialized||e.relayer.transportExplicitlyClosed)return;const n=[];e.pending.forEach(r=>{n.push(r)}),yield e.batchSubscribe(n)})()}registerEventListeners(){var e=this;this.relayer.core.heartbeat.on(Em.HEARTBEAT_EVENTS.pulse,(0,ke.Z)(function*(){yield e.checkPending()})),this.relayer.on(ss_connect,(0,ke.Z)(function*(){yield e.onConnect()})),this.relayer.on(ss_disconnect,()=>{this.onDisconnect()}),this.events.on(Lu_created,function(){var n=(0,ke.Z)(function*(r){const a=Lu_created;e.logger.info(`Emitting ${a}`),e.logger.debug({type:"event",event:a,data:r}),yield e.persist()});return function(r){return n.apply(this,arguments)}}()),this.events.on(Lu_deleted,function(){var n=(0,ke.Z)(function*(r){const a=Lu_deleted;e.logger.info(`Emitting ${a}`),e.logger.debug({type:"event",event:a,data:r}),yield e.persist()});return function(r){return n.apply(this,arguments)}}())}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}restartToComplete(){var e=this;return(0,ke.Z)(function*(){e.restartInProgress&&(yield new Promise(n=>{const r=setInterval(()=>{e.restartInProgress||(clearInterval(r),n())},e.pollingInterval)}))})()}}var iee=Object.defineProperty,hT=Object.getOwnPropertySymbols,oee=Object.prototype.hasOwnProperty,see=Object.prototype.propertyIsEnumerable,pT=(t,e,n)=>e in t?iee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class uee extends EH{constructor(e){var n;super(e),n=this,this.protocol="wc",this.version=2,this.events=new Du.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=function(){var r=(0,ke.Z)(function*(a){n.logger.debug("Publishing Request Payload");try{return yield n.toEstablishConnection(),yield n.provider.request(a)}catch(y){throw n.logger.debug("Failed to Publish Request"),n.logger.error(y),y}});return function(a){return r.apply(this,arguments)}}(),this.onPayloadHandler=r=>{this.onProviderPayload(r)},this.onConnectHandler=()=>{this.events.emit(ss_connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=r=>{this.logger.error(r),this.events.emit(ss_error,r),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(vl_payload,this.onPayloadHandler),this.provider.on(vl_connect,this.onConnectHandler),this.provider.on(vl_disconnect,this.onDisconnectHandler),this.provider.on(vl_error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?(0,Kr.generateChildLogger)(e.logger,this.name):(0,Kr.pino)((0,Kr.getDefaultLoggerOptions)({level:e.logger||"error"})),this.messages=new J$(this.logger,e.core),this.subscriber=new ree(this,this.logger),this.publisher=new Q$(this,this.logger),this.relayUrl=e?.relayUrl||cT,this.projectId=e.projectId,this.bundleId=function RY(){var t;try{return Cp()&&typeof global<"u"&&typeof(null==global?void 0:global.Application)<"u"?null==(t=global.Application)?void 0:t.applicationId:void 0}catch{return}}(),this.provider={}}init(){var e=this;return(0,ke.Z)(function*(){e.logger.trace("Initialized"),e.registerEventListeners(),yield e.createProvider(),yield Promise.all([e.messages.init(),e.subscriber.init()]);try{yield e.transportOpen()}catch{e.logger.warn(`Connection via ${e.relayUrl} failed, attempting to connect via failover domain ${lT}...`),yield e.restartTransport(lT)}e.initialized=!0,setTimeout((0,ke.Z)(function*(){0===e.subscriber.topics.length&&(e.logger.info("No topics subscribed to after init, closing transport"),yield e.transportClose(),e.transportExplicitlyClosed=!1)}),1e4)})()}get context(){return(0,Kr.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}publish(e,n,r){var a=this;return(0,ke.Z)(function*(){a.isInitialized(),yield a.publisher.publish(e,n,r),yield a.recordMessageEvent({topic:e,message:n,publishedAt:Date.now()})})()}subscribe(e,n){var r=this;return(0,ke.Z)(function*(){var a;r.isInitialized();let T,y=(null==(a=r.subscriber.topicMap.get(e))?void 0:a[0])||"";if(y)return y;const Z=$=>{$.topic===e&&(r.subscriber.off(Lu_created,Z),T())};return yield Promise.all([new Promise($=>{T=$,r.subscriber.on(Lu_created,Z)}),new Promise(function(){var $=(0,ke.Z)(function*(ie){y=yield r.subscriber.subscribe(e,n),ie()});return function(ie){return $.apply(this,arguments)}}())]),y})()}unsubscribe(e,n){var r=this;return(0,ke.Z)(function*(){r.isInitialized(),yield r.subscriber.unsubscribe(e,n)})()}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}transportClose(){var e=this;return(0,ke.Z)(function*(){e.transportExplicitlyClosed=!0,e.hasExperiencedNetworkDisruption&&e.connected?yield xm(e.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>e.onProviderDisconnect()):e.connected&&(yield e.provider.disconnect())})()}transportOpen(e){var n=this;return(0,ke.Z)(function*(){if(n.transportExplicitlyClosed=!1,yield n.confirmOnlineStateOrThrow(),!n.connectionAttemptInProgress){e&&e!==n.relayUrl&&(n.relayUrl=e,yield n.transportClose(),yield n.createProvider()),n.connectionAttemptInProgress=!0;try{yield Promise.all([new Promise(r=>{if(!n.initialized)return r();n.subscriber.once(Lu_resubscribed,()=>{r()})}),new Promise(function(){var r=(0,ke.Z)(function*(a,y){try{yield xm(n.provider.connect(),1e4,`Socket stalled when trying to connect to ${n.relayUrl}`)}catch(T){return void y(T)}a()});return function(a,y){return r.apply(this,arguments)}}())])}catch(r){n.logger.error(r);const a=r;if(!n.isConnectionStalled(a.message))throw r;n.provider.events.emit(vl_disconnect)}finally{n.connectionAttemptInProgress=!1,n.hasExperiencedNetworkDisruption=!1}}})()}restartTransport(e){var n=this;return(0,ke.Z)(function*(){yield n.confirmOnlineStateOrThrow(),!n.connectionAttemptInProgress&&(n.relayUrl=e||n.relayUrl,yield n.transportClose(),yield n.createProvider(),yield n.transportOpen())})()}confirmOnlineStateOrThrow(){return(0,ke.Z)(function*(){if(!(yield hx()))throw new Error("No internet connection detected. Please restart your network and try again.")})()}isConnectionStalled(e){return this.staleConnectionErrors.some(n=>e.includes(n))}createProvider(){var e=this;return(0,ke.Z)(function*(){e.provider.connection&&e.unregisterProviderListeners();const n=yield e.core.crypto.signJWT(e.relayUrl);e.provider=new jX(new VX(UY({sdkVersion:"2.11.0",protocol:e.protocol,version:e.version,relayUrl:e.relayUrl,projectId:e.projectId,auth:n,useOnCloseEvent:!0,bundleId:e.bundleId}))),e.registerProviderListeners()})()}recordMessageEvent(e){var n=this;return(0,ke.Z)(function*(){const{topic:r,message:a}=e;yield n.messages.set(r,a)})()}shouldIgnoreMessageEvent(e){var n=this;return(0,ke.Z)(function*(){const{topic:r,message:a}=e;if(!a||0===a.length)return n.logger.debug(`Ignoring invalid/empty message: ${a}`),!0;if(!(yield n.subscriber.isSubscribed(r)))return n.logger.debug(`Ignoring message for non-subscribed topic ${r}`),!0;const y=n.messages.has(r,a);return y&&n.logger.debug(`Ignoring duplicate message: ${a}`),y})()}onProviderPayload(e){var n=this;return(0,ke.Z)(function*(){if(n.logger.debug("Incoming Relay Payload"),n.logger.trace({type:"payload",direction:"incoming",payload:e}),Z3(e)){if(!e.method.endsWith("_subscription"))return;const r=e.params,{topic:a,message:y,publishedAt:T}=r.data,Z={topic:a,message:y,publishedAt:T};n.logger.debug("Emitting Relayer Payload"),n.logger.trace(((t,e)=>{for(var n in e||(e={}))oee.call(e,n)&&pT(t,n,e[n]);if(hT)for(var n of hT(e))see.call(e,n)&&pT(t,n,e[n]);return t})({type:"event",event:r.id},Z)),n.events.emit(r.id,Z),yield n.acknowledgePayload(e),yield n.onMessageEvent(Z)}else $b(e)&&n.events.emit(ss_message_ack,e)})()}onMessageEvent(e){var n=this;return(0,ke.Z)(function*(){(yield n.shouldIgnoreMessageEvent(e))||(n.events.emit(ss_message,e),yield n.recordMessageEvent(e))})()}acknowledgePayload(e){var n=this;return(0,ke.Z)(function*(){const r=W3(e.id,!0);yield n.provider.connection.send(r)})()}unregisterProviderListeners(){this.provider.off(vl_payload,this.onPayloadHandler),this.provider.off(vl_connect,this.onConnectHandler),this.provider.off(vl_disconnect,this.onDisconnectHandler),this.provider.off(vl_error,this.onProviderErrorHandler)}registerEventListeners(){var e=this;return(0,ke.Z)(function*(){e.events.on(ss_connection_stalled,()=>{e.restartTransport().catch(r=>e.logger.error(r))});let n=yield hx();VJ(function(){var r=(0,ke.Z)(function*(a){e.initialized&&n!==a&&(n=a,a?yield e.restartTransport().catch(y=>e.logger.error(y)):(e.hasExperiencedNetworkDisruption=!0,yield e.transportClose().catch(y=>e.logger.error(y))))});return function(a){return r.apply(this,arguments)}}())})()}onProviderDisconnect(){this.events.emit(ss_disconnect),this.attemptToReconnect()}attemptToReconnect(){var e=this;this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((0,ke.Z)(function*(){yield e.restartTransport().catch(n=>e.logger.error(n))}),(0,Vn.toMiliseconds)(T$)))}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}toEstablishConnection(){var e=this;return(0,ke.Z)(function*(){if(yield e.confirmOnlineStateOrThrow(),!e.connected){if(e.connectionAttemptInProgress)return yield new Promise(n=>{const r=setInterval(()=>{e.connected&&(clearInterval(r),n())},e.connectionStatusPollingInterval)});yield e.restartTransport()}})()}}var cee=Object.defineProperty,gT=Object.getOwnPropertySymbols,lee=Object.prototype.hasOwnProperty,fee=Object.prototype.propertyIsEnumerable,yT=(t,e,n)=>e in t?cee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mT=(t,e)=>{for(var n in e||(e={}))lee.call(e,n)&&yT(t,n,e[n]);if(gT)for(var n of gT(e))fee.call(e,n)&&yT(t,n,e[n]);return t};class tw extends SH{constructor(e,n,r,a=Nf,y){var T;super(e,n,r,a),T=this,this.core=e,this.logger=n,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Nf,this.init=(0,ke.Z)(function*(){T.initialized||(T.logger.trace("Initialized"),yield T.restore(),T.cached.forEach(Z=>{T.getKey&&null!==Z&&!Os(Z)?T.map.set(T.getKey(Z),Z):function wJ(t){var e;return null==(e=t?.proposer)?void 0:e.publicKey}(Z)?T.map.set(Z.id,Z):function AJ(t){return t?.topic}(Z)&&T.map.set(Z.topic,Z)}),T.cached=[],T.initialized=!0)}),this.set=function(){var Z=(0,ke.Z)(function*($,ie){T.isInitialized(),T.map.has($)?yield T.update($,ie):(T.logger.debug("Setting value"),T.logger.trace({type:"method",method:"set",key:$,value:ie}),T.map.set($,ie),yield T.persist())});return function($,ie){return Z.apply(this,arguments)}}(),this.get=Z=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:Z}),this.getData(Z)),this.getAll=Z=>(this.isInitialized(),Z?this.values.filter($=>Object.keys(Z).every(ie=>WX()($[ie],Z[ie]))):this.values),this.update=function(){var Z=(0,ke.Z)(function*($,ie){T.isInitialized(),T.logger.debug("Updating value"),T.logger.trace({type:"method",method:"update",key:$,update:ie});const ue=mT(mT({},T.getData($)),ie);T.map.set($,ue),yield T.persist()});return function($,ie){return Z.apply(this,arguments)}}(),this.delete=function(){var Z=(0,ke.Z)(function*($,ie){T.isInitialized(),T.map.has($)&&(T.logger.debug("Deleting value"),T.logger.trace({type:"method",method:"delete",key:$,reason:ie}),T.map.delete($),yield T.persist())});return function($,ie){return Z.apply(this,arguments)}}(),this.logger=(0,Kr.generateChildLogger)(n,this.name),this.storagePrefix=a,this.getKey=y}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}setDataStore(e){var n=this;return(0,ke.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getDataStore(){var e=this;return(0,ke.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getData(e){const n=this.map.get(e);if(!n){const{message:r}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(r),new Error(r)}return n}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setDataStore(e.values)})()}restore(){var e=this;return(0,ke.Z)(function*(){try{const n=yield e.getDataStore();if(typeof n>"u"||!n.length)return;if(e.map.size){const{message:r}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(r),new Error(r)}e.cached=n,e.logger.debug(`Successfully Restored value for ${e.name}`),e.logger.trace({type:"method",method:"restore",value:e.values})}catch(n){e.logger.debug(`Failed to Restore value for ${e.name}`),e.logger.error(n)}})()}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class dee{constructor(e,n){var r=this;this.core=e,this.logger=n,this.name="pairing",this.version="0.3",this.events=new(ZA()),this.initialized=!1,this.storagePrefix=Nf,this.ignoredPayloadTypes=[ah],this.registeredMethods=[],this.init=(0,ke.Z)(function*(){r.initialized||(yield r.pairings.init(),yield r.cleanup(),r.registerRelayerEvents(),r.registerExpirerEvents(),r.initialized=!0,r.logger.trace("Initialized"))}),this.register=({methods:a})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...a])]},this.create=(0,ke.Z)(function*(){r.isInitialized();const a=T3(),y=yield r.core.crypto.setSymKey(a),T=Ru(Vn.FIVE_MINUTES),Z={protocol:"irn"},$={topic:y,expiry:T,relay:Z,active:!1},ie=nJ({protocol:r.core.protocol,version:r.core.version,topic:y,symKey:a,relay:Z});return yield r.pairings.set(y,$),yield r.core.relayer.subscribe(y),r.core.expirer.set(y,T),{topic:y,uri:ie}}),this.pair=function(){var a=(0,ke.Z)(function*(y){r.isInitialized(),r.isValidPair(y);const{topic:T,symKey:Z,relay:$}=rx(y.uri);let ie;if(r.pairings.keys.includes(T)&&(ie=r.pairings.get(T),ie.active))throw new Error(`Pairing already exists: ${T}. Please try again with a new connection URI.`);const ue=Ru(Vn.FIVE_MINUTES),he={topic:T,relay:$,expiry:ue,active:!1};return yield r.pairings.set(T,he),r.core.expirer.set(T,ue),y.activatePairing&&(yield r.activate({topic:T})),r.events.emit(Lm_create,he),r.core.crypto.keychain.has(T)||(yield r.core.crypto.setSymKey(Z,T),yield r.core.relayer.subscribe(T,{relay:$})),he});return function(y){return a.apply(this,arguments)}}(),this.activate=function(){var a=(0,ke.Z)(function*({topic:y}){r.isInitialized();const T=Ru(Vn.THIRTY_DAYS);yield r.pairings.update(y,{active:!0,expiry:T}),r.core.expirer.set(y,T)});return function(y){return a.apply(this,arguments)}}(),this.ping=function(){var a=(0,ke.Z)(function*(y){r.isInitialized(),yield r.isValidPing(y);const{topic:T}=y;if(r.pairings.keys.includes(T)){const Z=yield r.sendRequest(T,"wc_pairingPing",{}),{done:$,resolve:ie,reject:ue}=Tp();r.events.once(oo("pairing_ping",Z),({error:he})=>{he?ue(he):ie()}),yield $()}});return function(y){return a.apply(this,arguments)}}(),this.updateExpiry=function(){var a=(0,ke.Z)(function*({topic:y,expiry:T}){r.isInitialized(),yield r.pairings.update(y,{expiry:T})});return function(y){return a.apply(this,arguments)}}(),this.updateMetadata=function(){var a=(0,ke.Z)(function*({topic:y,metadata:T}){r.isInitialized(),yield r.pairings.update(y,{peerMetadata:T})});return function(y){return a.apply(this,arguments)}}(),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=function(){var a=(0,ke.Z)(function*(y){r.isInitialized(),yield r.isValidDisconnect(y);const{topic:T}=y;r.pairings.keys.includes(T)&&(yield r.sendRequest(T,"wc_pairingDelete",po("USER_DISCONNECTED")),yield r.deletePairing(T))});return function(y){return a.apply(this,arguments)}}(),this.sendRequest=function(){var a=(0,ke.Z)(function*(y,T,Z){const $=Pp(T,Z),ie=yield r.core.crypto.encode(y,$),ue=km[T].req;return r.core.history.set(y,$),r.core.relayer.publish(y,ie,ue),$.id});return function(y,T,Z){return a.apply(this,arguments)}}(),this.sendResult=function(){var a=(0,ke.Z)(function*(y,T,Z){const $=W3(y,Z),ie=yield r.core.crypto.encode(T,$),ue=yield r.core.history.get(T,y),he=km[ue.request.method].res;yield r.core.relayer.publish(T,ie,he),yield r.core.history.resolve($)});return function(y,T,Z){return a.apply(this,arguments)}}(),this.sendError=function(){var a=(0,ke.Z)(function*(y,T,Z){const $=G3(y,Z),ie=yield r.core.crypto.encode(T,$),ue=yield r.core.history.get(T,y),he=km[ue.request.method]?km[ue.request.method].res:km.unregistered_method.res;yield r.core.relayer.publish(T,ie,he),yield r.core.history.resolve($)});return function(y,T,Z){return a.apply(this,arguments)}}(),this.deletePairing=function(){var a=(0,ke.Z)(function*(y,T){yield r.core.relayer.unsubscribe(y),yield Promise.all([r.pairings.delete(y,po("USER_DISCONNECTED")),r.core.crypto.deleteSymKey(y),T?Promise.resolve():r.core.expirer.del(y)])});return function(y,T){return a.apply(this,arguments)}}(),this.cleanup=(0,ke.Z)(function*(){const a=r.pairings.getAll().filter(y=>Of(y.expiry));yield Promise.all(a.map(y=>r.deletePairing(y.topic)))}),this.onRelayEventRequest=a=>{const{topic:y,payload:T}=a;switch(T.method){case"wc_pairingPing":return this.onPairingPingRequest(y,T);case"wc_pairingDelete":return this.onPairingDeleteRequest(y,T);default:return this.onUnknownRpcMethodRequest(y,T)}},this.onRelayEventResponse=function(){var a=(0,ke.Z)(function*(y){const{topic:T,payload:Z}=y,$=(yield r.core.history.get(T,Z.id)).request.method;return"wc_pairingPing"===$?r.onPairingPingResponse(T,Z):r.onUnknownRpcMethodResponse($)});return function(y){return a.apply(this,arguments)}}(),this.onPairingPingRequest=function(){var a=(0,ke.Z)(function*(y,T){const{id:Z}=T;try{r.isValidPing({topic:y}),yield r.sendResult(Z,y,!0),r.events.emit(Lm_ping,{id:Z,topic:y})}catch($){yield r.sendError(Z,y,$),r.logger.error($)}});return function(y,T){return a.apply(this,arguments)}}(),this.onPairingPingResponse=(a,y)=>{const{id:T}=y;setTimeout(()=>{ml(y)?this.events.emit(oo("pairing_ping",T),{}):ku(y)&&this.events.emit(oo("pairing_ping",T),{error:y.error})},500)},this.onPairingDeleteRequest=function(){var a=(0,ke.Z)(function*(y,T){const{id:Z}=T;try{r.isValidDisconnect({topic:y}),yield r.deletePairing(y),r.events.emit(Lm_delete,{id:Z,topic:y})}catch($){yield r.sendError(Z,y,$),r.logger.error($)}});return function(y,T){return a.apply(this,arguments)}}(),this.onUnknownRpcMethodRequest=function(){var a=(0,ke.Z)(function*(y,T){const{id:Z,method:$}=T;try{if(r.registeredMethods.includes($))return;const ie=po("WC_METHOD_UNSUPPORTED",$);yield r.sendError(Z,y,ie),r.logger.error(ie)}catch(ie){yield r.sendError(Z,y,ie),r.logger.error(ie)}});return function(y,T){return a.apply(this,arguments)}}(),this.onUnknownRpcMethodResponse=a=>{this.registeredMethods.includes(a)||this.logger.error(po("WC_METHOD_UNSUPPORTED",a))},this.isValidPair=a=>{var y;if(!qs(a)){const{message:Z}=_n("MISSING_OR_INVALID",`pair() params: ${a}`);throw new Error(Z)}if(!function bJ(t){if(Do(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}(a.uri)){const{message:Z}=_n("MISSING_OR_INVALID",`pair() uri: ${a.uri}`);throw new Error(Z)}const T=rx(a.uri);if(null==(y=T?.relay)||!y.protocol){const{message:Z}=_n("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(Z)}if(null==T||!T.symKey){const{message:Z}=_n("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(Z)}},this.isValidPing=function(){var a=(0,ke.Z)(function*(y){if(!qs(y)){const{message:Z}=_n("MISSING_OR_INVALID",`ping() params: ${y}`);throw new Error(Z)}const{topic:T}=y;yield r.isValidPairingTopic(T)});return function(y){return a.apply(this,arguments)}}(),this.isValidDisconnect=function(){var a=(0,ke.Z)(function*(y){if(!qs(y)){const{message:Z}=_n("MISSING_OR_INVALID",`disconnect() params: ${y}`);throw new Error(Z)}const{topic:T}=y;yield r.isValidPairingTopic(T)});return function(y){return a.apply(this,arguments)}}(),this.isValidPairingTopic=function(){var a=(0,ke.Z)(function*(y){if(!Do(y,!1)){const{message:T}=_n("MISSING_OR_INVALID",`pairing topic should be a string: ${y}`);throw new Error(T)}if(!r.pairings.keys.includes(y)){const{message:T}=_n("NO_MATCHING_KEY",`pairing topic doesn't exist: ${y}`);throw new Error(T)}if(Of(r.pairings.get(y).expiry)){yield r.deletePairing(y);const{message:T}=_n("EXPIRED",`pairing topic: ${y}`);throw new Error(T)}});return function(y){return a.apply(this,arguments)}}(),this.core=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.pairings=new tw(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,Kr.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){var e=this;this.core.relayer.on(ss_message,function(){var n=(0,ke.Z)(function*(r){const{topic:a,message:y}=r;if(!e.pairings.keys.includes(a)||e.ignoredPayloadTypes.includes(e.core.crypto.getPayloadType(y)))return;const T=yield e.core.crypto.decode(a,y);try{Z3(T)?(e.core.history.set(a,T),e.onRelayEventRequest({topic:a,payload:T})):$b(T)&&(yield e.core.history.resolve(T),yield e.onRelayEventResponse({topic:a,payload:T}),e.core.history.delete(a,T.id))}catch(Z){e.logger.error(Z)}});return function(r){return n.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.core.expirer.on(qa_expired,function(){var n=(0,ke.Z)(function*(r){const{topic:a}=ex(r.target);a&&e.pairings.keys.includes(a)&&(yield e.deletePairing(a,!0),e.events.emit(Lm_expire,{topic:a}))});return function(r){return n.apply(this,arguments)}}())}}class hee extends bH{constructor(e,n){var r;super(e,n),r=this,this.core=e,this.logger=n,this.records=new Map,this.events=new Du.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Nf,this.init=(0,ke.Z)(function*(){r.initialized||(r.logger.trace("Initialized"),yield r.restore(),r.cached.forEach(a=>r.records.set(a.id,a)),r.cached=[],r.registerEventListeners(),r.initialized=!0)}),this.set=(a,y,T)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:a,request:y,chainId:T}),this.records.has(y.id))return;const Z={id:y.id,topic:a,request:{method:y.method,params:y.params||null},chainId:T,expiry:Ru(Vn.THIRTY_DAYS)};this.records.set(Z.id,Z),this.events.emit(gc_created,Z)},this.resolve=function(){var a=(0,ke.Z)(function*(y){if(r.isInitialized(),r.logger.debug("Updating JSON-RPC response history record"),r.logger.trace({type:"method",method:"update",response:y}),!r.records.has(y.id))return;const T=yield r.getRecord(y.id);typeof T.response>"u"&&(T.response=ku(y)?{error:y.error}:{result:y.result},r.records.set(T.id,T),r.events.emit(gc_updated,T))});return function(y){return a.apply(this,arguments)}}(),this.get=function(){var a=(0,ke.Z)(function*(y,T){return r.isInitialized(),r.logger.debug("Getting record"),r.logger.trace({type:"method",method:"get",topic:y,id:T}),yield r.getRecord(T)});return function(y,T){return a.apply(this,arguments)}}(),this.delete=(a,y)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:y}),this.values.forEach(T=>{if(T.topic===a){if(typeof y<"u"&&T.id!==y)return;this.records.delete(T.id),this.events.emit(gc_deleted,T)}})},this.exists=function(){var a=(0,ke.Z)(function*(y,T){return r.isInitialized(),!!r.records.has(T)&&(yield r.getRecord(T)).topic===y});return function(y,T){return a.apply(this,arguments)}}(),this.on=(a,y)=>{this.events.on(a,y)},this.once=(a,y)=>{this.events.once(a,y)},this.off=(a,y)=>{this.events.off(a,y)},this.removeListener=(a,y)=>{this.events.removeListener(a,y)},this.logger=(0,Kr.generateChildLogger)(n,this.name)}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(n=>{if(typeof n.response<"u")return;const r={topic:n.topic,request:Pp(n.request.method,n.request.params,n.id),chainId:n.chainId};return e.push(r)}),e}setJsonRpcRecords(e){var n=this;return(0,ke.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getJsonRpcRecords(){var e=this;return(0,ke.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getRecord(e){this.isInitialized();const n=this.records.get(e);if(!n){const{message:r}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(r)}return n}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setJsonRpcRecords(e.values),e.events.emit(gc_sync)})()}restore(){var e=this;return(0,ke.Z)(function*(){try{const n=yield e.getJsonRpcRecords();if(typeof n>"u"||!n.length)return;if(e.records.size){const{message:r}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(r),new Error(r)}e.cached=n,e.logger.debug(`Successfully Restored records for ${e.name}`),e.logger.trace({type:"method",method:"restore",records:e.values})}catch(n){e.logger.debug(`Failed to Restore records for ${e.name}`),e.logger.error(n)}})()}registerEventListeners(){this.events.on(gc_created,e=>{const n=gc_created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(gc_updated,e=>{const n=gc_updated;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(gc_deleted,e=>{const n=gc_deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.core.heartbeat.on(Em.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{(0,Vn.toMiliseconds)(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class pee extends MH{constructor(e,n){var r;super(e,n),r=this,this.core=e,this.logger=n,this.expirations=new Map,this.events=new Du.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Nf,this.init=(0,ke.Z)(function*(){r.initialized||(r.logger.trace("Initialized"),yield r.restore(),r.cached.forEach(a=>r.expirations.set(a.target,a)),r.cached=[],r.registerEventListeners(),r.initialized=!0)}),this.has=a=>{try{const y=this.formatTarget(a);return typeof this.getExpiration(y)<"u"}catch{return!1}},this.set=(a,y)=>{this.isInitialized();const T=this.formatTarget(a),Z={target:T,expiry:y};this.expirations.set(T,Z),this.checkExpiry(T,Z),this.events.emit(qa_created,{target:T,expiration:Z})},this.get=a=>{this.isInitialized();const y=this.formatTarget(a);return this.getExpiration(y)},this.del=a=>{if(this.isInitialized(),this.has(a)){const y=this.formatTarget(a),T=this.getExpiration(y);this.expirations.delete(y),this.events.emit(qa_deleted,{target:y,expiration:T})}},this.on=(a,y)=>{this.events.on(a,y)},this.once=(a,y)=>{this.events.once(a,y)},this.off=(a,y)=>{this.events.off(a,y)},this.removeListener=(a,y)=>{this.events.removeListener(a,y)},this.logger=(0,Kr.generateChildLogger)(n,this.name)}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function HY(t){return $I("topic",t)}(e);if("number"==typeof e)return function WY(t){return $I("id",t)}(e);const{message:n}=_n("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(n)}setExpirations(e){var n=this;return(0,ke.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getExpirations(){var e=this;return(0,ke.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}persist(){var e=this;return(0,ke.Z)(function*(){yield e.setExpirations(e.values),e.events.emit(qa_sync)})()}restore(){var e=this;return(0,ke.Z)(function*(){try{const n=yield e.getExpirations();if(typeof n>"u"||!n.length)return;if(e.expirations.size){const{message:r}=_n("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(r),new Error(r)}e.cached=n,e.logger.debug(`Successfully Restored expirations for ${e.name}`),e.logger.trace({type:"method",method:"restore",expirations:e.values})}catch(n){e.logger.debug(`Failed to Restore expirations for ${e.name}`),e.logger.error(n)}})()}getExpiration(e){const n=this.expirations.get(e);if(!n){const{message:r}=_n("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(r),new Error(r)}return n}checkExpiry(e,n){const{expiry:r}=n;(0,Vn.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,n)}expire(e,n){this.expirations.delete(e),this.events.emit(qa_expired,{target:e,expiration:n})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,n)=>this.checkExpiry(n,e))}registerEventListeners(){this.core.heartbeat.on(Em.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(qa_created,e=>{const n=qa_created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(qa_expired,e=>{const n=qa_expired;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(qa_deleted,e=>{const n=qa_deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=_n("NOT_INITIALIZED",this.name);throw new Error(e)}}}class gee extends DH{constructor(e,n){var r;super(e,n),r=this,this.projectId=e,this.logger=n,this.name=q3,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=function(){var a=(0,ke.Z)(function*(y){if(r.verifyDisabled||Cp()||!Ip())return;const T=r.getVerifyUrl(y?.verifyUrl);r.verifyUrl!==T&&r.removeIframe(),r.verifyUrl=T;try{yield r.createIframe()}catch(Z){r.logger.info(`Verify iframe failed to load: ${r.verifyUrl}`),r.logger.info(Z)}if(!r.initialized){r.removeIframe(),r.verifyUrl=$3;try{yield r.createIframe()}catch(Z){r.logger.info(`Verify iframe failed to load: ${r.verifyUrl}`),r.logger.info(Z),r.verifyDisabled=!0}}});return function(y){return a.apply(this,arguments)}}(),this.register=function(){var a=(0,ke.Z)(function*(y){r.initialized?r.sendPost(y.attestationId):(r.addToQueue(y.attestationId),yield r.init())});return function(y){return a.apply(this,arguments)}}(),this.resolve=function(){var a=(0,ke.Z)(function*(y){if(r.isDevEnv)return"";const T=r.getVerifyUrl(y?.verifyUrl);let Z;try{Z=yield r.fetchAttestation(y.attestationId,T)}catch($){r.logger.info(`failed to resolve attestation: ${y.attestationId} from url: ${T}`),r.logger.info($),Z=yield r.fetchAttestation(y.attestationId,$3)}return Z});return function(y){return a.apply(this,arguments)}}(),this.fetchAttestation=function(){var a=(0,ke.Z)(function*(y,T){r.logger.info(`resolving attestation: ${y} from url: ${T}`);const Z=r.startAbortTimer(2*Vn.ONE_SECOND),$=yield fetch(`${T}/attestation/${y}`,{signal:r.abortController.signal});return clearTimeout(Z),200===$.status?yield $.json():void 0});return function(y,T){return a.apply(this,arguments)}}(),this.addToQueue=a=>{this.queue.push(a)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach(a=>this.sendPost(a)),this.queue=[])},this.sendPost=a=>{var y;try{if(!this.iframe)return;null==(y=this.iframe.contentWindow)||y.postMessage(a,"*"),this.logger.info(`postMessage sent: ${a} ${this.verifyUrl}`)}catch{}},this.createIframe=(0,ke.Z)(function*(){let a;const y=T=>{"verify_ready"===T.data&&(r.initialized=!0,r.processQueue(),window.removeEventListener("message",y),a())};yield Promise.race([new Promise(T=>{if(document.getElementById(q3))return T();window.addEventListener("message",y);const Z=document.createElement("iframe");Z.id=q3,Z.src=`${r.verifyUrl}/${r.projectId}`,Z.style.display="none",document.body.append(Z),r.iframe=Z,a=T}),new Promise((T,Z)=>setTimeout(()=>{window.removeEventListener("message",y),Z("verify iframe load timeout")},(0,Vn.toMiliseconds)(Vn.FIVE_SECONDS)))])}),this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=a=>{let y=a||Rp;return H$.includes(y)||(this.logger.info(`verify url: ${y}, not included in trusted list, assigning default: ${Rp}`),y=Rp),y},this.logger=(0,Kr.generateChildLogger)(n,this.name),this.verifyUrl=Rp,this.abortController=new AbortController,this.isDevEnv=N3()&&process.env.IS_VITEST}get context(){return(0,Kr.getLoggerContext)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,Vn.toMiliseconds)(e))}}class yee extends CH{constructor(e,n){var r;super(e,n),r=this,this.projectId=e,this.logger=n,this.context="echo",this.registerDeviceToken=function(){var a=(0,ke.Z)(function*(y){const{clientId:T,token:Z,notificationType:$,enableEncrypted:ie=!1}=y,ue=`https://echo.walletconnect.com/${r.projectId}/clients`;yield ZX()(ue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:T,type:$,token:Z,always_raw:ie})})});return function(y){return a.apply(this,arguments)}}(),this.logger=(0,Kr.generateChildLogger)(n,this.context)}}var mee=Object.defineProperty,vT=Object.getOwnPropertySymbols,vee=Object.prototype.hasOwnProperty,bee=Object.prototype.propertyIsEnumerable,bT=(t,e,n)=>e in t?mee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wT=(t,e)=>{for(var n in e||(e={}))vee.call(e,n)&&bT(t,n,e[n]);if(vT)for(var n of vT(e))bee.call(e,n)&&bT(t,n,e[n]);return t};class tS extends vH{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=X3,this.events=new Du.EventEmitter,this.initialized=!1,this.on=(r,a)=>this.events.on(r,a),this.once=(r,a)=>this.events.once(r,a),this.off=(r,a)=>this.events.off(r,a),this.removeListener=(r,a)=>this.events.removeListener(r,a),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||cT,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const n=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,Kr.pino)((0,Kr.getDefaultLoggerOptions)({level:e?.logger||m$_logger}));this.logger=(0,Kr.generateChildLogger)(n,this.name),this.heartbeat=new Em.HeartBeat,this.crypto=new Y$(this,this.logger,e?.keychain),this.history=new hee(this,this.logger),this.expirer=new pee(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new mH(wT(wT({},v$),e?.storageOptions)),this.relayer=new uee({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new dee(this,this.logger),this.verify=new gee(this.projectId||"",this.logger),this.echoClient=new yee(this.projectId||"",this.logger)}static init(e){return(0,ke.Z)(function*(){const n=new tS(e);yield n.initialize();const r=yield n.crypto.getClientId();return yield n.storage.setItem("WALLETCONNECT_CLIENT_ID",r),n})()}get context(){return(0,Kr.getLoggerContext)(this.logger)}start(){var e=this;return(0,ke.Z)(function*(){e.initialized||(yield e.initialize())})()}initialize(){var e=this;return(0,ke.Z)(function*(){e.logger.trace("Initialized");try{yield e.crypto.init(),yield e.history.init(),yield e.expirer.init(),yield e.relayer.init(),yield e.heartbeat.init(),yield e.pairing.init(),e.initialized=!0,e.logger.info("Core Initialization Success")}catch(n){throw e.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,n),e.logger.error(n.message),n}})()}}const wee=tS,nS="wc@2:client:",rS_name="client",rS_logger="error",_T="WALLETCONNECT_DEEPLINK_CHOICE",nw=Vn.SEVEN_DAYS,Bm={wc_sessionPropose:{req:{ttl:Vn.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Vn.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Vn.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Vn.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Vn.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Vn.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Vn.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Vn.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Vn.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Vn.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Vn.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Vn.THIRTY_SECONDS,prompt:!1,tag:1115}}},iS={min:Vn.FIVE_MINUTES,max:Vn.SEVEN_DAYS},bl_idle="IDLE",bl_active="ACTIVE",Dee=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Cee=Object.defineProperty,Iee=Object.defineProperties,xee=Object.getOwnPropertyDescriptors,MT=Object.getOwnPropertySymbols,Tee=Object.prototype.hasOwnProperty,Oee=Object.prototype.propertyIsEnumerable,DT=(t,e,n)=>e in t?Cee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$s=(t,e)=>{for(var n in e||(e={}))Tee.call(e,n)&&DT(t,n,e[n]);if(MT)for(var n of MT(e))Oee.call(e,n)&&DT(t,n,e[n]);return t},jm=(t,e)=>Iee(t,xee(e));class Nee extends xH{constructor(e){var n;super(e),n=this,this.name="engine",this.events=new(ZA()),this.initialized=!1,this.ignoredPayloadTypes=[ah],this.requestQueue={state:bl_idle,queue:[]},this.sessionRequestQueue={state:bl_idle,queue:[]},this.requestQueueDelay=Vn.ONE_SECOND,this.init=(0,ke.Z)(function*(){n.initialized||(yield n.cleanup(),n.registerRelayerEvents(),n.registerExpirerEvents(),n.registerPairingEvents(),n.client.core.pairing.register({methods:Object.keys(Bm)}),n.initialized=!0,setTimeout(()=>{n.sessionRequestQueue.queue=n.getPendingSessionRequests(),n.processSessionRequestQueue()},(0,Vn.toMiliseconds)(n.requestQueueDelay)))}),this.connect=function(){var r=(0,ke.Z)(function*(a){yield n.isInitialized();const y=jm($s({},a),{requiredNamespaces:a.requiredNamespaces||{},optionalNamespaces:a.optionalNamespaces||{}});yield n.isValidConnect(y);const{pairingTopic:T,requiredNamespaces:Z,optionalNamespaces:$,sessionProperties:ie,relays:ue}=y;let we,he=T,xe=!1;if(he&&(xe=n.client.core.pairing.pairings.get(he).active),!he||!xe){const{topic:xt,uri:Wt}=yield n.client.core.pairing.create();he=xt,we=Wt}const Ie=yield n.client.core.crypto.generateKeyPair(),Le=$s({requiredNamespaces:Z,optionalNamespaces:$,relays:ue??[{protocol:"irn"}],proposer:{publicKey:Ie,metadata:n.client.metadata}},ie&&{sessionProperties:ie}),{reject:je,resolve:Ue,done:$e}=Tp(Vn.FIVE_MINUTES,"Proposal expired");if(n.events.once(oo("session_connect"),function(){var xt=(0,ke.Z)(function*({error:Wt,session:An}){if(Wt)je(Wt);else if(An){An.self.publicKey=Ie;const rn=jm($s({},An),{requiredNamespaces:An.requiredNamespaces,optionalNamespaces:An.optionalNamespaces});yield n.client.session.set(An.topic,rn),yield n.setExpiry(An.topic,An.expiry),he&&(yield n.client.core.pairing.updateMetadata({topic:he,metadata:An.peer.metadata})),Ue(rn)}});return function(Wt){return xt.apply(this,arguments)}}()),!he){const{message:xt}=_n("NO_MATCHING_KEY",`connect() pairing topic: ${he}`);throw new Error(xt)}const Je=yield n.sendRequest({topic:he,method:"wc_sessionPropose",params:Le}),ht=Ru(Vn.FIVE_MINUTES);return yield n.setProposal(Je,$s({id:Je,expiry:ht},Le)),{uri:we,approval:$e}});return function(a){return r.apply(this,arguments)}}(),this.pair=function(){var r=(0,ke.Z)(function*(a){return yield n.isInitialized(),yield n.client.core.pairing.pair(a)});return function(a){return r.apply(this,arguments)}}(),this.approve=function(){var r=(0,ke.Z)(function*(a){yield n.isInitialized(),yield n.isValidApprove(a);const{id:y,relayProtocol:T,namespaces:Z,sessionProperties:$}=a,ie=n.client.proposal.get(y);let{pairingTopic:ue,proposer:he,requiredNamespaces:we,optionalNamespaces:xe}=ie;ue=ue||"",Np(we)||(we=function hJ(t,e){const n=Zb(t,e);if(n)throw new Error(n.message);const r={};for(const[a,y]of Object.entries(t))r[a]={methods:y.methods,events:y.events,chains:y.accounts.map(T=>`${T.split(":")[0]}:${T.split(":")[1]}`)};return r}(Z,"approve()"));const Ie=yield n.client.core.crypto.generateKeyPair(),Le=he.publicKey,je=yield n.client.core.crypto.generateSharedKey(Ie,Le);ue&&y&&(yield n.client.core.pairing.updateMetadata({topic:ue,metadata:he.metadata}),yield n.sendResult({id:y,topic:ue,result:{relay:{protocol:T??"irn"},responderPublicKey:Ie}}),yield n.client.proposal.delete(y,po("USER_DISCONNECTED")),yield n.client.core.pairing.activate({topic:ue}));const Ue=$s({relay:{protocol:T??"irn"},namespaces:Z,requiredNamespaces:we,optionalNamespaces:xe,pairingTopic:ue,controller:{publicKey:Ie,metadata:n.client.metadata},expiry:Ru(nw)},$&&{sessionProperties:$});yield n.client.core.relayer.subscribe(je),yield n.sendRequest({topic:je,method:"wc_sessionSettle",params:Ue,throwOnFailedPublish:!0});const $e=jm($s({},Ue),{topic:je,pairingTopic:ue,acknowledged:!1,self:Ue.controller,peer:{publicKey:he.publicKey,metadata:he.metadata},controller:Ie});return yield n.client.session.set(je,$e),yield n.setExpiry(je,Ru(nw)),{topic:je,acknowledged:()=>new Promise(Je=>setTimeout(()=>Je(n.client.session.get(je)),500))}});return function(a){return r.apply(this,arguments)}}(),this.reject=function(){var r=(0,ke.Z)(function*(a){yield n.isInitialized(),yield n.isValidReject(a);const{id:y,reason:T}=a,{pairingTopic:Z}=n.client.proposal.get(y);Z&&(yield n.sendError(y,Z,T),yield n.client.proposal.delete(y,po("USER_DISCONNECTED")))});return function(a){return r.apply(this,arguments)}}(),this.update=function(){var r=(0,ke.Z)(function*(a){yield n.isInitialized(),yield n.isValidUpdate(a);const{topic:y,namespaces:T}=a,Z=yield n.sendRequest({topic:y,method:"wc_sessionUpdate",params:{namespaces:T}}),{done:$,resolve:ie,reject:ue}=Tp();return n.events.once(oo("session_update",Z),({error:he})=>{he?ue(he):ie()}),yield n.client.session.update(y,{namespaces:T}),{acknowledged:$}});return function(a){return r.apply(this,arguments)}}(),this.extend=function(){var r=(0,ke.Z)(function*(a){yield n.isInitialized(),yield n.isValidExtend(a);const{topic:y}=a,T=yield n.sendRequest({topic:y,method:"wc_sessionExtend",params:{}}),{done:Z,resolve:$,reject:ie}=Tp();return n.events.once(oo("session_extend",T),({error:ue})=>{ue?ie(ue):$()}),yield n.setExpiry(y,Ru(nw)),{acknowledged:Z}});return function(a){return r.apply(this,arguments)}}(),this.request=function(){var r=(0,ke.Z)(function*(a){yield n.isInitialized(),yield n.isValidRequest(a);const{chainId:y,request:T,topic:Z,expiry:$}=a,ie=H3(),{done:ue,resolve:he,reject:we}=Tp($,"Request expired. Please try again.");return n.events.once(oo("session_request",ie),({error:xe,result:Ie})=>{xe?we(xe):he(Ie)}),yield Promise.all([new Promise(function(){var xe=(0,ke.Z)(function*(Ie){yield n.sendRequest({clientRpcId:ie,topic:Z,method:"wc_sessionRequest",params:{request:T,chainId:y},expiry:$,throwOnFailedPublish:!0}).catch(Le=>we(Le)),n.client.events.emit("session_request_sent",{topic:Z,request:T,chainId:y,id:ie}),Ie()});return function(Ie){return xe.apply(this,arguments)}}()),new Promise(function(){var xe=(0,ke.Z)(function*(Ie){const Le=yield function ZY(t,e){return R3.apply(this,arguments)}(n.client.core.storage,_T);(function GY(t){return P3.apply(this,arguments)})({id:ie,topic:Z,wcDeepLink:Le}),Ie()});return function(Ie){return xe.apply(this,arguments)}}()),ue()]).then(xe=>xe[2])});return function(a){return r.apply(this,arguments)}}(),this.respond=function(){var r=(0,ke.Z)(function*(a){yield n.isInitialized(),yield n.isValidRespond(a);const{topic:y,response:T}=a,{id:Z}=T;ml(T)?yield n.sendResult({id:Z,topic:y,result:T.result,throwOnFailedPublish:!0}):ku(T)&&(yield n.sendError(Z,y,T.error)),n.cleanupAfterResponse(a)});return function(a){return r.apply(this,arguments)}}(),this.ping=function(){var r=(0,ke.Z)(function*(a){yield n.isInitialized(),yield n.isValidPing(a);const{topic:y}=a;if(n.client.session.keys.includes(y)){const T=yield n.sendRequest({topic:y,method:"wc_sessionPing",params:{}}),{done:Z,resolve:$,reject:ie}=Tp();n.events.once(oo("session_ping",T),({error:ue})=>{ue?ie(ue):$()}),yield Z()}else n.client.core.pairing.pairings.keys.includes(y)&&(yield n.client.core.pairing.ping({topic:y}))});return function(a){return r.apply(this,arguments)}}(),this.emit=function(){var r=(0,ke.Z)(function*(a){yield n.isInitialized(),yield n.isValidEmit(a);const{topic:y,event:T,chainId:Z}=a;yield n.sendRequest({topic:y,method:"wc_sessionEvent",params:{event:T,chainId:Z}})});return function(a){return r.apply(this,arguments)}}(),this.disconnect=function(){var r=(0,ke.Z)(function*(a){yield n.isInitialized(),yield n.isValidDisconnect(a);const{topic:y}=a;n.client.session.keys.includes(y)?(yield n.sendRequest({topic:y,method:"wc_sessionDelete",params:po("USER_DISCONNECTED"),throwOnFailedPublish:!0}),yield n.deleteSession(y)):yield n.client.core.pairing.disconnect({topic:y})});return function(a){return r.apply(this,arguments)}}(),this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(a=>function mJ(t,e){const{requiredNamespaces:n}=e,r=Object.keys(t.namespaces),a=Object.keys(n);let y=!0;return!!uh(a,r)&&(r.forEach(T=>{const{accounts:Z,methods:$,events:ie}=t.namespaces[T],ue=Op(Z),he=n[T];uh(_3(T,he),ue)&&uh(he.methods,$)&&uh(he.events,ie)||(y=!1)}),y)}(a,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=function(){var r=(0,ke.Z)(function*(a){if(a.pairingTopic)try{const y=n.client.core.pairing.pairings.get(a.pairingTopic),T=n.client.core.pairing.pairings.getAll().filter(Z=>{var $,ie;return(null==($=Z.peerMetadata)?void 0:$.url)&&(null==(ie=Z.peerMetadata)?void 0:ie.url)===a.peer.metadata.url&&Z.topic&&Z.topic!==y.topic});if(0===T.length)return;n.client.logger.info(`Cleaning up ${T.length} duplicate pairing(s)`),yield Promise.all(T.map(Z=>n.client.core.pairing.disconnect({topic:Z.topic}))),n.client.logger.info("Duplicate pairings clean up finished")}catch(y){n.client.logger.error(y)}});return function(a){return r.apply(this,arguments)}}(),this.deleteSession=function(){var r=(0,ke.Z)(function*(a,y){const{self:T}=n.client.session.get(a);yield n.client.core.relayer.unsubscribe(a),n.client.session.delete(a,po("USER_DISCONNECTED")),n.client.core.crypto.keychain.has(T.publicKey)&&(yield n.client.core.crypto.deleteKeyPair(T.publicKey)),n.client.core.crypto.keychain.has(a)&&(yield n.client.core.crypto.deleteSymKey(a)),y||n.client.core.expirer.del(a),n.client.core.storage.removeItem(_T).catch(Z=>n.client.logger.warn(Z)),n.getPendingSessionRequests().forEach(Z=>{Z.topic===a&&n.deletePendingSessionRequest(Z.id,po("USER_DISCONNECTED"))})});return function(a,y){return r.apply(this,arguments)}}(),this.deleteProposal=function(){var r=(0,ke.Z)(function*(a,y){yield Promise.all([n.client.proposal.delete(a,po("USER_DISCONNECTED")),y?Promise.resolve():n.client.core.expirer.del(a)])});return function(a,y){return r.apply(this,arguments)}}(),this.deletePendingSessionRequest=function(){var r=(0,ke.Z)(function*(a,y,T=!1){yield Promise.all([n.client.pendingRequest.delete(a,y),T?Promise.resolve():n.client.core.expirer.del(a)]),n.sessionRequestQueue.queue=n.sessionRequestQueue.queue.filter(Z=>Z.id!==a),T&&(n.sessionRequestQueue.state=bl_idle)});return function(a,y){return r.apply(this,arguments)}}(),this.setExpiry=function(){var r=(0,ke.Z)(function*(a,y){n.client.session.keys.includes(a)&&(yield n.client.session.update(a,{expiry:y})),n.client.core.expirer.set(a,y)});return function(a,y){return r.apply(this,arguments)}}(),this.setProposal=function(){var r=(0,ke.Z)(function*(a,y){yield n.client.proposal.set(a,y),n.client.core.expirer.set(a,y.expiry)});return function(a,y){return r.apply(this,arguments)}}(),this.setPendingSessionRequest=function(){var r=(0,ke.Z)(function*(a){const y=Bm.wc_sessionRequest.req.ttl,{id:T,topic:Z,params:$,verifyContext:ie}=a;yield n.client.pendingRequest.set(T,{id:T,topic:Z,params:$,verifyContext:ie}),y&&n.client.core.expirer.set(T,Ru(y))});return function(a){return r.apply(this,arguments)}}(),this.sendRequest=function(){var r=(0,ke.Z)(function*(a){const{topic:y,method:T,params:Z,expiry:$,relayRpcId:ie,clientRpcId:ue,throwOnFailedPublish:he}=a,we=Pp(T,Z,ue);if(Ip()&&Dee.includes(T)){const Le=Dp(JSON.stringify(we));n.client.core.verify.register({attestationId:Le})}const xe=yield n.client.core.crypto.encode(y,we),Ie=Bm[T].req;return $&&(Ie.ttl=$),ie&&(Ie.id=ie),n.client.core.history.set(y,we),he?(Ie.internal=jm($s({},Ie.internal),{throwOnFailedPublish:!0}),yield n.client.core.relayer.publish(y,xe,Ie)):n.client.core.relayer.publish(y,xe,Ie).catch(Le=>n.client.logger.error(Le)),we.id});return function(a){return r.apply(this,arguments)}}(),this.sendResult=function(){var r=(0,ke.Z)(function*(a){const{id:y,topic:T,result:Z,throwOnFailedPublish:$}=a,ie=W3(y,Z),ue=yield n.client.core.crypto.encode(T,ie),he=yield n.client.core.history.get(T,y),we=Bm[he.request.method].res;$?(we.internal=jm($s({},we.internal),{throwOnFailedPublish:!0}),yield n.client.core.relayer.publish(T,ue,we)):n.client.core.relayer.publish(T,ue,we).catch(xe=>n.client.logger.error(xe)),yield n.client.core.history.resolve(ie)});return function(a){return r.apply(this,arguments)}}(),this.sendError=function(){var r=(0,ke.Z)(function*(a,y,T){const Z=G3(a,T),$=yield n.client.core.crypto.encode(y,Z),ie=yield n.client.core.history.get(y,a),ue=Bm[ie.request.method].res;n.client.core.relayer.publish(y,$,ue),yield n.client.core.history.resolve(Z)});return function(a,y,T){return r.apply(this,arguments)}}(),this.cleanup=(0,ke.Z)(function*(){const r=[],a=[];n.client.session.getAll().forEach(y=>{Of(y.expiry)&&r.push(y.topic)}),n.client.proposal.getAll().forEach(y=>{Of(y.expiry)&&a.push(y.id)}),yield Promise.all([...r.map(y=>n.deleteSession(y)),...a.map(y=>n.deleteProposal(y))])}),this.onRelayEventRequest=function(){var r=(0,ke.Z)(function*(a){n.requestQueue.queue.push(a),yield n.processRequestsQueue()});return function(a){return r.apply(this,arguments)}}(),this.processRequestsQueue=(0,ke.Z)(function*(){if(n.requestQueue.state!==bl_active){for(n.client.logger.info(`Request queue starting with ${n.requestQueue.queue.length} requests`);n.requestQueue.queue.length>0;){n.requestQueue.state=bl_active;const r=n.requestQueue.queue.shift();if(r)try{n.processRequest(r),yield new Promise(a=>setTimeout(a,300))}catch(a){n.client.logger.warn(a)}}n.requestQueue.state=bl_idle}else n.client.logger.info("Request queue already active, skipping...")}),this.processRequest=r=>{const{topic:a,payload:y}=r,T=y.method;switch(T){case"wc_sessionPropose":return this.onSessionProposeRequest(a,y);case"wc_sessionSettle":return this.onSessionSettleRequest(a,y);case"wc_sessionUpdate":return this.onSessionUpdateRequest(a,y);case"wc_sessionExtend":return this.onSessionExtendRequest(a,y);case"wc_sessionPing":return this.onSessionPingRequest(a,y);case"wc_sessionDelete":return this.onSessionDeleteRequest(a,y);case"wc_sessionRequest":return this.onSessionRequest(a,y);case"wc_sessionEvent":return this.onSessionEventRequest(a,y);default:return this.client.logger.info(`Unsupported request method ${T}`)}},this.onRelayEventResponse=function(){var r=(0,ke.Z)(function*(a){const{topic:y,payload:T}=a,Z=(yield n.client.core.history.get(y,T.id)).request.method;switch(Z){case"wc_sessionPropose":return n.onSessionProposeResponse(y,T);case"wc_sessionSettle":return n.onSessionSettleResponse(y,T);case"wc_sessionUpdate":return n.onSessionUpdateResponse(y,T);case"wc_sessionExtend":return n.onSessionExtendResponse(y,T);case"wc_sessionPing":return n.onSessionPingResponse(y,T);case"wc_sessionRequest":return n.onSessionRequestResponse(y,T);default:return n.client.logger.info(`Unsupported response method ${Z}`)}});return function(a){return r.apply(this,arguments)}}(),this.onRelayEventUnknownPayload=r=>{const{topic:a}=r,{message:y}=_n("MISSING_OR_INVALID",`Decoded payload on topic ${a} is not identifiable as a JSON-RPC request or a response.`);throw new Error(y)},this.onSessionProposeRequest=function(){var r=(0,ke.Z)(function*(a,y){const{params:T,id:Z}=y;try{n.isValidConnect($s({},y.params));const $=Ru(Vn.FIVE_MINUTES),ie=$s({id:Z,pairingTopic:a,expiry:$},T);yield n.setProposal(Z,ie);const ue=Dp(JSON.stringify(y)),he=yield n.getVerifyContext(ue,ie.proposer.metadata);n.client.events.emit("session_proposal",{id:Z,params:ie,verifyContext:he})}catch($){yield n.sendError(Z,a,$),n.client.logger.error($)}});return function(a,y){return r.apply(this,arguments)}}(),this.onSessionProposeResponse=function(){var r=(0,ke.Z)(function*(a,y){const{id:T}=y;if(ml(y)){const{result:Z}=y;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:Z});const $=n.client.proposal.get(T);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:$});const ie=$.proposer.publicKey;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:ie});const ue=Z.responderPublicKey;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:ue});const he=yield n.client.core.crypto.generateSharedKey(ie,ue);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:he});const we=yield n.client.core.relayer.subscribe(he);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:we}),yield n.client.core.pairing.activate({topic:a})}else ku(y)&&(yield n.client.proposal.delete(T,po("USER_DISCONNECTED")),n.events.emit(oo("session_connect"),{error:y.error}))});return function(a,y){return r.apply(this,arguments)}}(),this.onSessionSettleRequest=function(){var r=(0,ke.Z)(function*(a,y){const{id:T,params:Z}=y;try{n.isValidSessionSettleRequest(Z);const{relay:$,controller:ie,expiry:ue,namespaces:he,requiredNamespaces:we,optionalNamespaces:xe,sessionProperties:Ie,pairingTopic:Le}=y.params,je=$s({topic:a,relay:$,expiry:ue,namespaces:he,acknowledged:!0,pairingTopic:Le,requiredNamespaces:we,optionalNamespaces:xe,controller:ie.publicKey,self:{publicKey:"",metadata:n.client.metadata},peer:{publicKey:ie.publicKey,metadata:ie.metadata}},Ie&&{sessionProperties:Ie});yield n.sendResult({id:y.id,topic:a,result:!0}),n.events.emit(oo("session_connect"),{session:je}),n.cleanupDuplicatePairings(je)}catch($){yield n.sendError(T,a,$),n.client.logger.error($)}});return function(a,y){return r.apply(this,arguments)}}(),this.onSessionSettleResponse=function(){var r=(0,ke.Z)(function*(a,y){const{id:T}=y;ml(y)?(yield n.client.session.update(a,{acknowledged:!0}),n.events.emit(oo("session_approve",T),{})):ku(y)&&(yield n.client.session.delete(a,po("USER_DISCONNECTED")),n.events.emit(oo("session_approve",T),{error:y.error}))});return function(a,y){return r.apply(this,arguments)}}(),this.onSessionUpdateRequest=function(){var r=(0,ke.Z)(function*(a,y){const{params:T,id:Z}=y;try{const $=`${a}_session_update`,ie=Yb.get($);if(ie&&n.isRequestOutOfSync(ie,Z))return void n.client.logger.info(`Discarding out of sync request - ${Z}`);n.isValidUpdate($s({topic:a},T)),yield n.client.session.update(a,{namespaces:T.namespaces}),yield n.sendResult({id:Z,topic:a,result:!0}),n.client.events.emit("session_update",{id:Z,topic:a,params:T}),Yb.set($,Z)}catch($){yield n.sendError(Z,a,$),n.client.logger.error($)}});return function(a,y){return r.apply(this,arguments)}}(),this.isRequestOutOfSync=(r,a)=>parseInt(a.toString().slice(0,-3))<=parseInt(r.toString().slice(0,-3)),this.onSessionUpdateResponse=(r,a)=>{const{id:y}=a;ml(a)?this.events.emit(oo("session_update",y),{}):ku(a)&&this.events.emit(oo("session_update",y),{error:a.error})},this.onSessionExtendRequest=function(){var r=(0,ke.Z)(function*(a,y){const{id:T}=y;try{n.isValidExtend({topic:a}),yield n.setExpiry(a,Ru(nw)),yield n.sendResult({id:T,topic:a,result:!0}),n.client.events.emit("session_extend",{id:T,topic:a})}catch(Z){yield n.sendError(T,a,Z),n.client.logger.error(Z)}});return function(a,y){return r.apply(this,arguments)}}(),this.onSessionExtendResponse=(r,a)=>{const{id:y}=a;ml(a)?this.events.emit(oo("session_extend",y),{}):ku(a)&&this.events.emit(oo("session_extend",y),{error:a.error})},this.onSessionPingRequest=function(){var r=(0,ke.Z)(function*(a,y){const{id:T}=y;try{n.isValidPing({topic:a}),yield n.sendResult({id:T,topic:a,result:!0}),n.client.events.emit("session_ping",{id:T,topic:a})}catch(Z){yield n.sendError(T,a,Z),n.client.logger.error(Z)}});return function(a,y){return r.apply(this,arguments)}}(),this.onSessionPingResponse=(r,a)=>{const{id:y}=a;setTimeout(()=>{ml(a)?this.events.emit(oo("session_ping",y),{}):ku(a)&&this.events.emit(oo("session_ping",y),{error:a.error})},500)},this.onSessionDeleteRequest=function(){var r=(0,ke.Z)(function*(a,y){const{id:T}=y;try{n.isValidDisconnect({topic:a,reason:y.params}),yield Promise.all([new Promise(Z=>{n.client.core.relayer.once(ss_publish,(0,ke.Z)(function*(){Z(yield n.deleteSession(a))}))}),n.sendResult({id:T,topic:a,result:!0})]),n.client.events.emit("session_delete",{id:T,topic:a})}catch(Z){n.client.logger.error(Z)}});return function(a,y){return r.apply(this,arguments)}}(),this.onSessionRequest=function(){var r=(0,ke.Z)(function*(a,y){const{id:T,params:Z}=y;try{n.isValidRequest($s({topic:a},Z));const $=Dp(JSON.stringify(Pp("wc_sessionRequest",Z,T))),ie=n.client.session.get(a),he={id:T,topic:a,params:Z,verifyContext:yield n.getVerifyContext($,ie.peer.metadata)};yield n.setPendingSessionRequest(he),n.addSessionRequestToSessionRequestQueue(he),n.processSessionRequestQueue()}catch($){yield n.sendError(T,a,$),n.client.logger.error($)}});return function(a,y){return r.apply(this,arguments)}}(),this.onSessionRequestResponse=(r,a)=>{const{id:y}=a;ml(a)?this.events.emit(oo("session_request",y),{result:a.result}):ku(a)&&this.events.emit(oo("session_request",y),{error:a.error})},this.onSessionEventRequest=function(){var r=(0,ke.Z)(function*(a,y){const{id:T,params:Z}=y;try{const $=`${a}_session_event_${Z.event.name}`,ie=Yb.get($);if(ie&&n.isRequestOutOfSync(ie,T))return void n.client.logger.info(`Discarding out of sync request - ${T}`);n.isValidEmit($s({topic:a},Z)),n.client.events.emit("session_event",{id:T,topic:a,params:Z}),Yb.set($,T)}catch($){yield n.sendError(T,a,$),n.client.logger.error($)}});return function(a,y){return r.apply(this,arguments)}}(),this.addSessionRequestToSessionRequestQueue=r=>{this.sessionRequestQueue.queue.push(r)},this.cleanupAfterResponse=r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=bl_idle,this.processSessionRequestQueue()},(0,Vn.toMiliseconds)(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===bl_active)return void this.client.logger.info("session request queue is already active.");const r=this.sessionRequestQueue.queue[0];if(r)try{this.sessionRequestQueue.state=bl_active,this.client.events.emit("session_request",r)}catch(a){this.client.logger.error(a)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=r=>{if(r.active)return;const a=this.client.proposal.getAll().find(y=>y.pairingTopic===r.topic);a&&this.onSessionProposeRequest(r.topic,Pp("wc_sessionPropose",{requiredNamespaces:a.requiredNamespaces,optionalNamespaces:a.optionalNamespaces,relays:a.relays,proposer:a.proposer,sessionProperties:a.sessionProperties},a.id))},this.isValidConnect=function(){var r=(0,ke.Z)(function*(a){if(!qs(a)){const{message:ue}=_n("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(a)}`);throw new Error(ue)}const{pairingTopic:y,requiredNamespaces:T,optionalNamespaces:Z,sessionProperties:$,relays:ie}=a;if(Os(y)||(yield n.isValidPairingTopic(y)),!function xJ(t,e){let n=!1;return e&&!t?n=!0:t&&Tm(t)&&t.length&&t.forEach(r=>{n=lx(r)}),n}(ie,!0)){const{message:ue}=_n("MISSING_OR_INVALID",`connect() relays: ${ie}`);throw new Error(ue)}!Os(T)&&0!==Np(T)&&n.validateNamespaces(T,"requiredNamespaces"),!Os(Z)&&0!==Np(Z)&&n.validateNamespaces(Z,"optionalNamespaces"),Os($)||n.validateSessionProps($,"sessionProperties")});return function(a){return r.apply(this,arguments)}}(),this.validateNamespaces=(r,a)=>{const y=function IJ(t,e,n){let r=null;if(t&&Np(t)){const a=cx(t,e);a&&(r=a);const y=_J(t,e,n);y&&(r=y)}else r=_n("MISSING_OR_INVALID",`${e}, ${n} should be an object with data`);return r}(r,"connect()",a);if(y)throw new Error(y.message)},this.isValidApprove=function(){var r=(0,ke.Z)(function*(a){if(!qs(a))throw new Error(_n("MISSING_OR_INVALID",`approve() params: ${a}`).message);const{id:y,namespaces:T,relayProtocol:Z,sessionProperties:$}=a;yield n.isValidProposalId(y);const ie=n.client.proposal.get(y),ue=Zb(T,"approve()");if(ue)throw new Error(ue.message);const he=F3(ie.requiredNamespaces,T,"approve()");if(he)throw new Error(he.message);if(!Do(Z,!0)){const{message:we}=_n("MISSING_OR_INVALID",`approve() relayProtocol: ${Z}`);throw new Error(we)}Os($)||n.validateSessionProps($,"sessionProperties")});return function(a){return r.apply(this,arguments)}}(),this.isValidReject=function(){var r=(0,ke.Z)(function*(a){if(!qs(a)){const{message:Z}=_n("MISSING_OR_INVALID",`reject() params: ${a}`);throw new Error(Z)}const{id:y,reason:T}=a;if(yield n.isValidProposalId(y),!function OJ(t){return!!(t&&"object"==typeof t&&t.code&&L3(t.code,!1)&&t.message&&Do(t.message,!1))}(T)){const{message:Z}=_n("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(T)}`);throw new Error(Z)}});return function(a){return r.apply(this,arguments)}}(),this.isValidSessionSettleRequest=r=>{if(!qs(r)){const{message:ue}=_n("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(ue)}const{relay:a,controller:y,namespaces:T,expiry:Z}=r;if(!lx(a)){const{message:ue}=_n("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(ue)}const $=function EJ(t,e){let n=null;return Do(t?.publicKey,!1)||(n=_n("MISSING_OR_INVALID",`${e} controller public key should be a string`)),n}(y,"onSessionSettleRequest()");if($)throw new Error($.message);const ie=Zb(T,"onSessionSettleRequest()");if(ie)throw new Error(ie.message);if(Of(Z)){const{message:ue}=_n("EXPIRED","onSessionSettleRequest()");throw new Error(ue)}},this.isValidUpdate=function(){var r=(0,ke.Z)(function*(a){if(!qs(a)){const{message:ue}=_n("MISSING_OR_INVALID",`update() params: ${a}`);throw new Error(ue)}const{topic:y,namespaces:T}=a;yield n.isValidSessionTopic(y);const Z=n.client.session.get(y),$=Zb(T,"update()");if($)throw new Error($.message);const ie=F3(Z.requiredNamespaces,T,"update()");if(ie)throw new Error(ie.message)});return function(a){return r.apply(this,arguments)}}(),this.isValidExtend=function(){var r=(0,ke.Z)(function*(a){if(!qs(a)){const{message:T}=_n("MISSING_OR_INVALID",`extend() params: ${a}`);throw new Error(T)}const{topic:y}=a;yield n.isValidSessionTopic(y)});return function(a){return r.apply(this,arguments)}}(),this.isValidRequest=function(){var r=(0,ke.Z)(function*(a){if(!qs(a)){const{message:ue}=_n("MISSING_OR_INVALID",`request() params: ${a}`);throw new Error(ue)}const{topic:y,request:T,chainId:Z,expiry:$}=a;yield n.isValidSessionTopic(y);const{namespaces:ie}=n.client.session.get(y);if(!fx(ie,Z)){const{message:ue}=_n("MISSING_OR_INVALID",`request() chainId: ${Z}`);throw new Error(ue)}if(!function NJ(t){return!(Os(t)||!Do(t.method,!1))}(T)){const{message:ue}=_n("MISSING_OR_INVALID",`request() ${JSON.stringify(T)}`);throw new Error(ue)}if(!kJ(ie,Z,T.method)){const{message:ue}=_n("MISSING_OR_INVALID",`request() method: ${T.method}`);throw new Error(ue)}if($&&!function jJ(t,e){return L3(t,!1)&&t<=e.max&&t>=e.min}($,iS)){const{message:ue}=_n("MISSING_OR_INVALID",`request() expiry: ${$}. Expiry must be a number (in seconds) between ${iS.min} and ${iS.max}`);throw new Error(ue)}});return function(a){return r.apply(this,arguments)}}(),this.isValidRespond=function(){var r=(0,ke.Z)(function*(a){var y;if(!qs(a)){const{message:$}=_n("MISSING_OR_INVALID",`respond() params: ${a}`);throw new Error($)}const{topic:T,response:Z}=a;try{yield n.isValidSessionTopic(T)}catch($){throw null!=(y=a?.response)&&y.id&&n.cleanupAfterResponse(a),$}if(!function PJ(t){return!(Os(t)||Os(t.result)&&Os(t.error)||!L3(t.id,!1)||!Do(t.jsonrpc,!1))}(Z)){const{message:$}=_n("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(Z)}`);throw new Error($)}});return function(a){return r.apply(this,arguments)}}(),this.isValidPing=function(){var r=(0,ke.Z)(function*(a){if(!qs(a)){const{message:T}=_n("MISSING_OR_INVALID",`ping() params: ${a}`);throw new Error(T)}const{topic:y}=a;yield n.isValidSessionOrPairingTopic(y)});return function(a){return r.apply(this,arguments)}}(),this.isValidEmit=function(){var r=(0,ke.Z)(function*(a){if(!qs(a)){const{message:ie}=_n("MISSING_OR_INVALID",`emit() params: ${a}`);throw new Error(ie)}const{topic:y,event:T,chainId:Z}=a;yield n.isValidSessionTopic(y);const{namespaces:$}=n.client.session.get(y);if(!fx($,Z)){const{message:ie}=_n("MISSING_OR_INVALID",`emit() chainId: ${Z}`);throw new Error(ie)}if(!function RJ(t){return!(Os(t)||!Do(t.name,!1))}(T)){const{message:ie}=_n("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(T)}`);throw new Error(ie)}if(!LJ($,Z,T.name)){const{message:ie}=_n("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(T)}`);throw new Error(ie)}});return function(a){return r.apply(this,arguments)}}(),this.isValidDisconnect=function(){var r=(0,ke.Z)(function*(a){if(!qs(a)){const{message:T}=_n("MISSING_OR_INVALID",`disconnect() params: ${a}`);throw new Error(T)}const{topic:y}=a;yield n.isValidSessionOrPairingTopic(y)});return function(a){return r.apply(this,arguments)}}(),this.getVerifyContext=function(){var r=(0,ke.Z)(function*(a,y){const T={verified:{verifyUrl:y.verifyUrl||Rp,validation:"UNKNOWN",origin:y.url||""}};try{const Z=yield n.client.core.verify.resolve({attestationId:a,verifyUrl:y.verifyUrl});Z&&(T.verified.origin=Z.origin,T.verified.isScam=Z.isScam,T.verified.validation=Z.origin===new URL(y.url).origin?"VALID":"INVALID")}catch(Z){n.client.logger.info(Z)}return n.client.logger.info(`Verify context: ${JSON.stringify(T)}`),T});return function(a,y){return r.apply(this,arguments)}}(),this.validateSessionProps=(r,a)=>{Object.values(r).forEach(y=>{if(!Do(y,!1)){const{message:T}=_n("MISSING_OR_INVALID",`${a} must be in Record format. Received: ${JSON.stringify(y)}`);throw new Error(T)}})}}isInitialized(){var e=this;return(0,ke.Z)(function*(){if(!e.initialized){const{message:n}=_n("NOT_INITIALIZED",e.name);throw new Error(n)}yield e.client.core.relayer.confirmOnlineStateOrThrow()})()}registerRelayerEvents(){var e=this;this.client.core.relayer.on(ss_message,function(){var n=(0,ke.Z)(function*(r){const{topic:a,message:y}=r;if(e.ignoredPayloadTypes.includes(e.client.core.crypto.getPayloadType(y)))return;const T=yield e.client.core.crypto.decode(a,y);try{Z3(T)?(e.client.core.history.set(a,T),e.onRelayEventRequest({topic:a,payload:T})):$b(T)?(yield e.client.core.history.resolve(T),yield e.onRelayEventResponse({topic:a,payload:T}),e.client.core.history.delete(a,T.id)):e.onRelayEventUnknownPayload({topic:a,payload:T})}catch(Z){e.client.logger.error(Z)}});return function(r){return n.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.client.core.expirer.on(qa_expired,function(){var n=(0,ke.Z)(function*(r){const{topic:a,id:y}=ex(r.target);if(y&&e.client.pendingRequest.keys.includes(y))return yield e.deletePendingSessionRequest(y,_n("EXPIRED"),!0);a?e.client.session.keys.includes(a)&&(yield e.deleteSession(a,!0),e.client.events.emit("session_expire",{topic:a})):y&&(yield e.deleteProposal(y,!0),e.client.events.emit("proposal_expire",{id:y}))});return function(r){return n.apply(this,arguments)}}())}registerPairingEvents(){this.client.core.pairing.events.on(Lm_create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!Do(e,!1)){const{message:n}=_n("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(n)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:n}=_n("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(n)}if(Of(this.client.core.pairing.pairings.get(e).expiry)){const{message:n}=_n("EXPIRED",`pairing topic: ${e}`);throw new Error(n)}}isValidSessionTopic(e){var n=this;return(0,ke.Z)(function*(){if(!Do(e,!1)){const{message:r}=_n("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(r)}if(!n.client.session.keys.includes(e)){const{message:r}=_n("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(r)}if(Of(n.client.session.get(e).expiry)){yield n.deleteSession(e);const{message:r}=_n("EXPIRED",`session topic: ${e}`);throw new Error(r)}})()}isValidSessionOrPairingTopic(e){var n=this;return(0,ke.Z)(function*(){if(n.client.session.keys.includes(e))yield n.isValidSessionTopic(e);else{if(!n.client.core.pairing.pairings.keys.includes(e)){if(Do(e,!1)){const{message:r}=_n("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}{const{message:r}=_n("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}n.isValidPairingTopic(e)}})()}isValidProposalId(e){var n=this;return(0,ke.Z)(function*(){if(!function TJ(t){return"number"==typeof t}(e)){const{message:r}=_n("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(r)}if(!n.client.proposal.keys.includes(e)){const{message:r}=_n("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(Of(n.client.proposal.get(e).expiry)){yield n.deleteProposal(e);const{message:r}=_n("EXPIRED",`proposal id: ${e}`);throw new Error(r)}})()}}class Pee extends tw{constructor(e,n){super(e,n,"proposal",nS),this.core=e,this.logger=n}}class Ree extends tw{constructor(e,n){super(e,n,"session",nS),this.core=e,this.logger=n}}class kee extends tw{constructor(e,n){super(e,n,"request",nS,r=>r.id),this.core=e,this.logger=n}}class oS extends IH{constructor(e){var n;super(e),n=this,this.protocol="wc",this.version=2,this.name=rS_name,this.events=new Du.EventEmitter,this.on=(a,y)=>this.events.on(a,y),this.once=(a,y)=>this.events.once(a,y),this.off=(a,y)=>this.events.off(a,y),this.removeListener=(a,y)=>this.events.removeListener(a,y),this.removeAllListeners=a=>this.events.removeAllListeners(a),this.connect=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.connect(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.pair=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.pair(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.approve=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.approve(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.reject=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.reject(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.update=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.update(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.extend=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.extend(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.request=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.request(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.respond=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.respond(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.ping=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.ping(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.emit=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.emit(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.disconnect=function(){var a=(0,ke.Z)(function*(y){try{return yield n.engine.disconnect(y)}catch(T){throw n.logger.error(T.message),T}});return function(y){return a.apply(this,arguments)}}(),this.find=a=>{try{return this.engine.find(a)}catch(y){throw this.logger.error(y.message),y}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(a){throw this.logger.error(a.message),a}},this.name=e?.name||rS_name,this.metadata=e?.metadata||function LY(){return(0,cY.D)()||{name:"",description:"",url:"",icons:[""]}}();const r=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,Kr.pino)((0,Kr.getDefaultLoggerOptions)({level:e?.logger||rS_logger}));this.core=e?.core||new wee(e),this.logger=(0,Kr.generateChildLogger)(r,this.name),this.session=new Ree(this.core,this.logger),this.proposal=new Pee(this.core,this.logger),this.pendingRequest=new kee(this.core,this.logger),this.engine=new Nee(this)}static init(e){return(0,ke.Z)(function*(){const n=new oS(e);return yield n.initialize(),n})()}get context(){return(0,Kr.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){var e=this;return(0,ke.Z)(function*(){e.logger.trace("Initialized");try{yield e.core.start(),yield e.session.init(),yield e.proposal.init(),yield e.pendingRequest.init(),yield e.engine.init(),e.core.verify.init({verifyUrl:e.metadata.verifyUrl}),e.logger.info("SignClient Initialization Success")}catch(n){throw e.logger.info("SignClient Initialization Failure"),e.logger.error(n.message),n}})()}}var lh=g(36953);class Lee{constructor(e){this.openModal=lh.jb.open,this.closeModal=lh.jb.close,this.subscribeModal=lh.jb.subscribe,this.setTheme=lh.Ic.setThemeConfig,lh.Ic.setThemeConfig(e),lh.t0.setConfig(e),this.initUi()}initUi(){return(0,ke.Z)(function*(){if(typeof window<"u"){yield g.e(390).then(g.bind(g,52390));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),lh.zb.setIsUiLoaded(!0)}})()}}const Bee=class Fee{init(e){var n=this;return(0,ke.Z)(function*(){n.client=yield oS.init(e)})()}constructor(e){this.emitter=e}get session(){return this.client.session}on(e,n){return this.client.on(e,n),{remove:()=>this.client.removeListener(e,n)}}once(e,n){this.client.once(e,n)}connect(e,n,r,a){var y=this;return(0,ke.Z)(function*(){return y.modal||(y.modal=new Lee({projectId:r,chains:[a],explorerExcludedWalletIds:"ALL"})),new Promise((T,Z)=>{y.client.connect(e).then(({uri:$,approval:ie})=>{$&&(n?(y.modal.openModal({uri:$,standaloneChains:[a]}),y.modal.subscribeModal(({open:ue})=>{ue||Z(new Error("User cancelled pairing"))})):y.emitter.emit("uriChanged",{uri:$})),ie().then(T).catch(Z).finally(()=>y.modal.closeModal())}).catch(Z)})})()}request(e){var n=this;return(0,ke.Z)(function*(){return n.client.request(e)})()}disconnect(e){var n=this;return(0,ke.Z)(function*(){return n.client.disconnect(e)})()}},jee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAir0lEQVR42u3deZxcVZn/8c9zbnV3dhIim6CMCIyK4rigM6S6AUEZcRu3EQGRJV0NmA3CYiASCGtkT0Do6gRB1AEFdRBRfrKYdAUU1JERl0FUUBCCQEL2dNc9398f1RGMZOmku+pW1/N+vfrVL0hX3adu3ee555577jngnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc85tO6t1AG7gTCimAcgBORO5JrNR5cDOpHqVjFcB4xGjgGZBi0ELgGCdwTqgB2Ml8LyJ5yyx55oiz6yTVsooQ+VncSGJtf6sbmB4Aahj+WI6CjHGAqMlxkvaG9gd2BV4tcFYwXAqib7+JwcEIOn7DRCBtO93mUoxWEelMKwRLAP+YvCU4Akze9SM5yVWAMtLhWRlrfeF2zpeAOrA269JGddESMXIXmMPxN6gPYE3AHtQSfoxQBOVBE/6fgZS2vdTBnqB5cATwB+A34I9hvFos+wPiWnVC2Xiz08a6BDcQPMCkFEHdaW2LmXc6BbGL1ujtyYJBxjsA7wa2AUYQeUMbtTue1TfTwRWA08L/gL8Ko0sHD/cHl7ew/PNxtJ72xPVep+6f+QFIGPaiuXtIrwV8c4oDuiJvL0lYTsqCV8vp9QUWL2uzIvNOX4eYCHGTxOzhxe2Jy/WOjj3Ei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555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOeecc84555xzzjnnnHPOOecy5f8DP47LVlAysbUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDYtMjNUMTQ6MzU6MDkrMDA6MDD1AeMiAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA2LTIzVDE0OjM1OjA5KzAwOjAwhFxbngAAAABJRU5ErkJggg==",Uee=["near_signIn","near_signOut","near_getAccounts","near_signTransaction","near_signTransactions","near_verifyOwner","near_signMessage"],Kee=["chainChanged","accountsChanged"],zee=function(){var t=(0,ke.Z)(function*(e,n,r){const a=new Bee(r);let y=null;const T=new lr.keyStores.BrowserLocalStorageKeyStore(window.localStorage,`near-wallet-selector:${e}:keystore:`);if(yield a.init({projectId:n.projectId,metadata:n.metadata,relayUrl:n.relayUrl}),a.session.length){const Z=a.session.keys.length-1;y=a.session.get(a.session.keys[Z])}return{client:a,session:y,keystore:T,subscriptions:[]}});return function(n,r,a){return t.apply(this,arguments)}}(),CT=function(){var t=(0,ke.Z)(function*({state:e,chainId:n,qrCodeModal:r,projectId:a,methods:y,events:T}){return yield e.client.connect({requiredNamespaces:{near:{chains:[n],methods:y||Uee,events:T||Kee}}},r,a,n)});return function(n){return t.apply(this,arguments)}}(),sS=function(){var t=(0,ke.Z)(function*({state:e}){yield e.client.disconnect({topic:e.session.topic,reason:{code:5900,message:"User disconnected"}})});return function(n){return t.apply(this,arguments)}}(),Vee=function(){var t=(0,ke.Z)(function*({id:e,options:n,store:r,params:a,provider:y,emitter:T,logger:Z}){const $=yield zee(e,a,T),ie=()=>{if(a.chainId)return a.chainId;const{networkId:rn}=n.network;if(["mainnet","testnet"].includes(rn))return`near:${rn}`;throw new Error("Invalid chain id")},ue=function(){var rn=(0,ke.Z)(function*(){const un=$.session?.namespaces.near.accounts||[],xn=[];for(let br=0;brun.remove()),$.subscriptions=[],$.session=null});return function(){return rn.apply(this,arguments)}}(),we=(rn,un)=>{if("FullAccess"===un.permission)return un;const{receiver_id:xn,method_names:br}=un.permission.FunctionCall;return rn.receiverId!==xn?null:rn.actions.every(mr=>{if("FunctionCall"!==mr.type)return!1;const{methodName:ar,deposit:Er}=mr.params;return(!br.length||!br.includes(ar))&&parseFloat(Er)<=0})},xe=function(){var rn=(0,ke.Z)(function*(un){const xn=new lr.InMemorySigner($.keystore),br=[],mr=yield y.block({finality:"final"});for(let ar=0;ar(0,ts.createAction)(eu)),lr.utils.serialize.base_decode(mr.header.hash)),[,vc]=yield lr.transactions.signTransaction(mc,xn,un[ar].signerId,n.network.networkId);br.push(vc)}return br});return function(xn){return rn.apply(this,arguments)}}(),Ie=function(){var rn=(0,ke.Z)(function*(){return $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_getAccounts",params:{}}})});return function(){return rn.apply(this,arguments)}}(),Le=function(){var rn=(0,ke.Z)(function*(un,xn){return $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_verifyOwner",params:{accountId:un,message:xn}}})});return function(xn,br){return rn.apply(this,arguments)}}(),je=function(){var rn=(0,ke.Z)(function*(un){const{message:xn,nonce:br,recipient:mr,callbackUrl:ar,accountId:Er}=un;return $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_signMessage",params:{message:xn,nonce:br,recipient:mr,...ar&&{callbackUrl:ar},...Er&&{accountId:Er}}}})});return function(xn){return rn.apply(this,arguments)}}(),Ue=function(){var rn=(0,ke.Z)(function*(un){const br=(yield Ie()).find(Ko=>Ko.accountId===un.signerId);if(!br)throw new Error("Invalid signer id");const[mr,ar]=yield Promise.all([y.block({finality:"final"}),y.query({request_type:"view_access_key",finality:"final",account_id:un.signerId,public_key:br.publicKey})]),Er=lr.transactions.createTransaction(un.signerId,lr.utils.PublicKey.from(br.publicKey),un.receiverId,ar.nonce+1,un.actions.map(Ko=>(0,ts.createAction)(Ko)),lr.utils.serialize.base_decode(mr.header.hash)),Xi=yield $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_signTransaction",params:{transaction:Er.encode()}}});return lr.transactions.SignedTransaction.decode(Buffer.from(Xi))});return function(xn){return rn.apply(this,arguments)}}(),$e=function(){var rn=(0,ke.Z)(function*(un){if(!un.length)return[];const xn=[],[br,mr]=yield Promise.all([y.block({finality:"final"}),Ie()]);for(let Er=0;Ervc.accountId===Xi.signerId);if(!Ko)throw new Error("Invalid signer id");const mc=yield y.query({request_type:"view_access_key",finality:"final",account_id:Xi.signerId,public_key:Ko.publicKey});xn.push(lr.transactions.createTransaction(Xi.signerId,lr.utils.PublicKey.from(Ko.publicKey),Xi.receiverId,mc.nonce+Er+1,Xi.actions.map(vc=>(0,ts.createAction)(vc)),lr.utils.serialize.base_decode(br.header.hash)))}return(yield $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_signTransactions",params:{transactions:xn.map(Er=>Er.encode())}}})).map(Er=>lr.transactions.SignedTransaction.decode(Buffer.from(Er)))});return function(xn){return rn.apply(this,arguments)}}(),Je=function(){var rn=(0,ke.Z)(function*(){return(yield ue()).map(({accountId:xn})=>({accountId:xn,keyPair:lr.utils.KeyPair.fromRandom("ed25519")}))});return function(){return rn.apply(this,arguments)}}(),ht=function(){var rn=(0,ke.Z)(function*(un){const xn=yield Je(),br=xn.map(({accountId:mr,keyPair:ar})=>({accountId:mr,publicKey:ar.getPublicKey().toString()}));yield $.client.request({topic:$.session.topic,chainId:ie(),request:{method:"near_signIn",params:{permission:un,accounts:br}}});for(let mr=0;mr(0,ke.Z)(function*(){try{const{contract:br}=r.getState();$.session&&!br&&(yield sS({state:$}),yield he());const mr=ie();return $.session=yield CT({state:$,chainId:mr,qrCodeModal:xn,projectId:a.projectId,methods:a.methods,events:a.events}),yield ht({receiverId:rn,methodNames:un}),yield An(),yield ue()}catch(br){throw yield Wt(),br}})(),signOut:Wt,getAccounts:()=>(0,ke.Z)(function*(){return ue()})(),verifyOwner:({message:rn})=>(0,ke.Z)(function*(){Z.log("WalletConnect:verifyOwner",{message:rn});const{contract:un}=r.getState();if(!$.session||!un)throw new Error("Wallet not signed in");const xn=Mf(r.getState());if(!xn)throw new Error("No active account");return Le(xn.accountId,rn)})(),signMessage:({message:rn,nonce:un,recipient:xn,callbackUrl:br})=>(0,ke.Z)(function*(){Z.log("WalletConnect:signMessage",{message:rn,nonce:un,recipient:xn});try{const mr=ie();$.session||($.session=$.session=yield CT({state:$,chainId:mr,qrCodeModal:!0,projectId:a.projectId}));const ar=Mf(r.getState());return yield je({message:rn,nonce:un,recipient:xn,callbackUrl:br,accountId:ar?.accountId})}catch(mr){throw yield sS({state:$}),yield he(),mr}})(),signAndSendTransaction:({signerId:rn,receiverId:un,actions:xn})=>(0,ke.Z)(function*(){Z.log("signAndSendTransaction",{signerId:rn,receiverId:un,actions:xn});const{contract:br}=r.getState();if(!$.session||!br)throw new Error("Wallet not signed in");const mr=Mf(r.getState());if(!mr)throw new Error("No active account");const ar={signerId:rn||mr.accountId,receiverId:un||br.contractId,actions:xn};try{const[Er]=yield xe([ar]);return y.sendTransaction(Er)}catch(Er){Z.log("Falling back to WalletConnect to sign transaction",Er);const Xi=yield Ue(ar);return y.sendTransaction(Xi)}})(),signAndSendTransactions:({transactions:rn})=>(0,ke.Z)(function*(){Z.log("signAndSendTransactions",{transactions:rn});const{contract:un}=r.getState();if(!$.session||!un)throw new Error("Wallet not signed in");const xn=Mf(r.getState());if(!xn)throw new Error("No active account");const br=rn.map(mr=>({signerId:mr.signerId||xn.accountId,receiverId:mr.receiverId,actions:mr.actions}));try{const mr=yield xe(br),ar=[];for(let Er=0;ErVee({...$,params:{projectId:t,metadata:e,relayUrl:r,chainId:n,methods:T,events:Z}})}})}const Hee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAMAAABOo35HAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAD8UEx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xCy2+V+mtiUI3KqgOCLSA1yb4DUgSvrbYSNbpsWCYyeCCU8lOaW8Cpt+k3QsrhpW9AA2CWXLWguXJtL7IKW4MA1E5xavHdoPKGRhFspRADWkkMV+0WQ+D8g5vA6l97n35XoJCjmb7rS/Y5YMYaRGCTvpY/zb45UKQmgWQ7hRl5dj8wXaPZQr/PQeGTLfQLHn5A+Xl+np/n53nC8x/tAMljWkeBnAAAAABJRU5ErkJggg==",xT=(t,e)=>{if(e)return e;switch(t.networkId){case"mainnet":return"https://app.mynearwallet.com";case"testnet":return"https://testnet.mynearwallet.com";default:throw new Error("Invalid wallet url")}},Wee=function(){var t=(0,ke.Z)(function*(e,n){const r=new lr.keyStores.BrowserLocalStorageKeyStore,a=yield lr.connect({keyStore:r,walletUrl:e.walletUrl,...n,headers:{}});return{wallet:new lr.WalletConnection(a,"near_app"),keyStore:r}});return function(n,r){return t.apply(this,arguments)}}(),Gee=function(){var t=(0,ke.Z)(function*({metadata:e,options:n,store:r,params:a,logger:y,id:T}){const Z=yield Wee(a,n.network),$=function(){var ue=(0,ke.Z)(function*(){const he=Z.wallet.getAccountId(),we=Z.wallet.account();if(!he||!we)return[];const xe=yield we.connection.signer.getPublicKey(we.accountId,n.network.networkId);return[{accountId:he,publicKey:xe?xe.toString():""}]});return function(){return ue.apply(this,arguments)}}(),ie=function(){var ue=(0,ke.Z)(function*(he){const we=Z.wallet.account(),{networkId:xe,signer:Ie,provider:Le}=we.connection,je=yield Ie.getPublicKey(we.accountId,xe);return Promise.all(he.map(function(){var Ue=(0,ke.Z)(function*($e,Je){const ht=$e.actions.map(An=>(0,ts.createAction)(An)),xt=yield we.accessKeyForTransaction($e.receiverId,ht,je);if(!xt)throw new Error(`Failed to find matching key for transaction sent to ${$e.receiverId}`);const Wt=yield Le.block({finality:"final"});return lr.transactions.createTransaction(we.accountId,lr.utils.PublicKey.from(xt.public_key),$e.receiverId,xt.access_key.nonce+Je+1,ht,lr.utils.serialize.base_decode(Wt.header.hash))});return function($e,Je){return Ue.apply(this,arguments)}}()))});return function(we){return ue.apply(this,arguments)}}();return{signIn:({contractId:ue,methodNames:he,successUrl:we,failureUrl:xe})=>(0,ke.Z)(function*(){const Ie=yield $();return Ie.length?Ie:(yield Z.wallet.requestSignIn({contractId:ue,methodNames:he,successUrl:we,failureUrl:xe}),$())})(),signOut:()=>(0,ke.Z)(function*(){Z.wallet.isSignedIn()&&Z.wallet.signOut()})(),getAccounts:()=>(0,ke.Z)(function*(){return $()})(),verifyOwner:()=>(0,ke.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signMessage:({message:ue,nonce:he,recipient:we,callbackUrl:xe,state:Ie})=>(0,ke.Z)(function*(){if(y.log("sign message",{message:ue}),"my-near-wallet"!==T)throw Error(`The signMessage method is not supported by ${e.name}`);const Le=typeof window<"u"?window.location.href:"",je=xe||Le;if(!je)throw new Error(`The callbackUrl is missing for ${e.name}`);const Ue=new URL(a.walletUrl);Ue.pathname="sign-message",Ue.searchParams.append("message",ue),Ue.searchParams.append("nonce",he.toString("base64")),Ue.searchParams.append("recipient",we),Ue.searchParams.append("callbackUrl",je),Ie&&Ue.searchParams.append("state",Ie),window.location.replace(Ue.toString())})(),signAndSendTransaction:({signerId:ue,receiverId:he,actions:we,callbackUrl:xe})=>(0,ke.Z)(function*(){y.log("signAndSendTransaction",{signerId:ue,receiverId:he,actions:we,callbackUrl:xe});const{contract:Ie}=r.getState();if(!Z.wallet.isSignedIn()||!Ie)throw new Error("Wallet not signed in");return Z.wallet.account().signAndSendTransaction({receiverId:he||Ie.contractId,actions:we.map(je=>(0,ts.createAction)(je)),walletCallbackUrl:xe})})(),signAndSendTransactions:({transactions:ue,callbackUrl:he})=>(0,ke.Z)(function*(){if(y.log("signAndSendTransactions",{transactions:ue,callbackUrl:he}),!Z.wallet.isSignedIn())throw new Error("Wallet not signed in");return Z.wallet.requestSignTransactions({transactions:yield ie(ue),callbackUrl:he})})(),buildImportAccountsUrl:()=>`${a.walletUrl}/batch-import`}});return function(n){return t.apply(this,arguments)}}();function TT({walletUrl:t,iconUrl:e=Hee,deprecated:n=!1,successUrl:r="",failureUrl:a=""}={}){return function(){var y=(0,ke.Z)(function*(T){return{id:"my-near-wallet",type:"browser",metadata:{name:"MyNearWallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:e,deprecated:n,available:!0,successUrl:r,failureUrl:a,walletUrl:xT(T.options.network,t)},init:Z=>Gee({...Z,params:{walletUrl:xT(Z.options.network,t)}})}});return function(T){return y.apply(this,arguments)}}()}const Zee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAe+0lEQVR42u2dV3ccV7bff7tCRyQiMIAgSIJJ1ChwNGNRWRqF0QTPeHxf/C38KfzkZ38Gey2v67m+9rWX585ao5E0IzETjCLFBBAAAZJgQu7uOuf44dRBg6QCQ8dC/dYCwwHQXVW9/7t27bPPPmKMMaSkNAtj7JeI/QKimzcoH/+S3Nuf4HX3Vr9fB4Jmn3/KOsUYjDGI51nj1prS1cssH/6C8tHPyQwOUvjNf7A/Wyfjh1QAKY3GGOvQPUFE0KUyi+fPsvD3L6hcPo9fWcSPlsm8+rr9ea3B8+p2OKkAUhqC0cY6chFEoHJ/jgcnTjF39AjR5DUCiQhCHwkKSAUyP/mZ/cU6en9IBZBSTwxxmCOIZw15aeoWs0dGmR89jb43S+ArMoUCni4jVDDLy4Q7duJvGmzIIaYCSKk5Lq8iYsMcozT3Lk1w69AZFr69DEsLZDIQFPJ4pozRJTAaBFAR4cg+JAjrHv5AKoCUGrLW8AHKiyVunRln5ug3rExO46mV2PBzoMugI0DHvy0YrZFMluxLr7mhupMKIOX5iMMcYm8PsHB7gcnj49w6fY3S7F1CLyITBvhhFnQJo13q0/7+Kkrh9/YTDo/EA/VXQCqAlGfCGPvHajZHGW5ff8D1Y5PcvjCFWlggE2oy+QyeAXQZY/T3v6DnYUorZPe9ieTydc39ryUVQMpT4aZNXUanvKKYvHifsRMz3Lk2i69K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yGZ/lBK2bhU++jjkk1/6dPdImsNPaSp1E4Bb+fXggeHYEc2uXR5/+IeAd971KRRSw09pDcSY+nTjceHP+Jjm+HHNb34brNbpuO+lYU5Ks/n/VnKP4Bbx7PAAAAAASUVORK5CYII=";var OT,NT,PT;function Yee(t,e,n,r){return new(n||(n=Promise))(function(y,T){function Z(ue){try{ie(r.next(ue))}catch(he){T(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){T(he)}}function ie(ue){ue.done?y(ue.value):function a(y){return y instanceof n?y:new n(function(T){T(y)})}(ue.value).then(Z,$)}ie((r=r.apply(t,e||[])).next())})}const Um=null!=(OT={}.NEXT_PUBLIC_RAMPER_ENV)?OT:globalThis.RAMPER_ENV,mi_LOCAL="local",mi_PREVIEW="preview",mi_DEV="dev",mi_STAGING="staging",mi_PROD="prod",Km=(NT={}.NEXT_PUBLIC_VERCEL_URL,PT={}.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF,()=>void 0===globalThis.window),Fu=()=>!Km()&&window.location.hostname.includes("dev.ramper.xyz")?mi_DEV:!Km()&&window.location.hostname.includes("preview.ramper.xyz")?mi_PREVIEW:!Km()&&window.location.hostname.includes("staging.ramper.xyz")?mi_STAGING:Um===mi_PROD?mi_PROD:Um===mi_STAGING?mi_STAGING:Um===mi_DEV?mi_DEV:Um===mi_PREVIEW?mi_PREVIEW:Um===mi_LOCAL?mi_LOCAL:mi_PROD;var RT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ete(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}),e}var aS={exports:{}};(function(t,e){!function(n,r){var Z="function",$="undefined",ie="object",ue="string",we="model",xe="name",Ie="type",Le="vendor",je="version",Ue="architecture",$e="console",Je="mobile",ht="tablet",xt="smarttv",Wt="wearable",An="embedded",un="Amazon",xn="Apple",mr="BlackBerry",ar="Browser",Er="Chrome",Ko="Firefox",mc="Google",Bu="Microsoft",Ps="Motorola",_l="Opera",Xm="Samsung",Ml="Sony",zp="Zebra",gw="Facebook",Vp=function(Pr){for(var qr={},Rr=0;Rr0?2===vi.length?typeof vi[1]==Z?this[vi[0]]=vi[1].call(this,bc):this[vi[0]]=vi[1]:3===vi.length?typeof vi[1]!==Z||vi[1].exec&&vi[1].test?this[vi[0]]=bc?bc.replace(vi[1],vi[2]):r:this[vi[0]]=bc?vi[1].call(this,bc,vi[2]):r:4===vi.length&&(this[vi[0]]=bc?vi[3].call(this,bc.replace(vi[1],vi[2])):r):this[vi]=bc||r;Rr+=2}},wS=function(Pr,qr){for(var Rr in qr)if(typeof qr[Rr]===ie&&qr[Rr].length>0){for(var qi=0;qi255?bS(Fr,255):Fr,this},this.setUA(Rr),this};Uu.VERSION="1.0.2",Uu.BROWSER=Vp([xe,je,"major"]),Uu.CPU=Vp([Ue]),Uu.DEVICE=Vp([we,Le,Ie,$e,Je,xt,ht,Wt,An]),Uu.ENGINE=Uu.OS=Vp([xe,je]),t.exports&&(e=t.exports=Uu),e.UAParser=Uu;var Hp=typeof n!==$&&(n.jQuery||n.Zepto);if(Hp&&!Hp.ua){var yw=new Uu;Hp.ua=yw.getResult(),Hp.ua.get=function(){return yw.getUA()},Hp.ua.set=function(Pr){yw.setUA(Pr);var qr=yw.getResult();for(var Rr in qr)Hp.ua[Rr]=qr[Rr]}}}("object"==typeof window?window:RT)})(aS,aS.exports),(new aS.exports.UAParser).getBrowser;!function(t,e){var a;a=function(){var n=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014c":"O","\u014d":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u018f":"E","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u0259":"e","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E\'","\u0538":"Y\'","\u0539":"T\'","\u053a":"JH","\u053b":"I","\u053c":"L","\u053d":"X","\u053e":"C\'","\u053f":"K","\u0540":"H","\u0541":"D\'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054a":"P","\u054b":"J","\u054c":"R\'","\u054d":"S","\u054e":"V","\u054f":"T","\u0550":"R","\u0551":"C","\u0553":"P\'","\u0554":"Q\'","\u0555":"O\'\'","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062a":"t","\u062b":"th","\u062c":"j","\u062d":"h","\u062e":"kh","\u062f":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063a":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064a":"y","\u064b":"an","\u064c":"on","\u064d":"en","\u064e":"a","\u064f":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067e":"p","\u0686":"ch","\u0698":"zh","\u06a9":"k","\u06af":"g","\u06cc":"y","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e62":"S","\u1e63":"s","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2013":"-","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u201e":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20ba":"turkish lira","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial","\ufef5":"laa","\ufef7":"laa","\ufef9":"lai","\ufefb":"la"}'),r=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042a":"A","\u042c":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044a":"a","\u044c":"y"},"de":{"\xc4":"AE","\xe4":"ae","\xd6":"OE","\xf6":"oe","\xdc":"UE","\xfc":"ue","\xdf":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221e":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xa2":"centavos","\xa3":"libras","\xa4":"moneda","\u20a3":"francos","\u2211":"suma","\u221e":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xa2":"centime","\xa3":"livre","\xa4":"devise","\u20a3":"franc","\u2211":"somme","\u221e":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xa2":"centavo","\u2211":"soma","\xa3":"libra","\u221e":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xd8":"OE","\xf8":"oe","\xc5":"AA","\xe5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xf8rre end"},"nb":{"&":"og","\xc5":"AA","\xc6":"AE","\xd8":"OE","\xe5":"aa","\xe6":"ae","\xf8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xc5":"AA","\xc4":"AE","\xd6":"OE","\xe5":"aa","\xe4":"ae","\xf6":"oe"}}');function a(y,T){if("string"!=typeof y)throw new Error("slugify: string argument expected");var Z=r[(T="string"==typeof T?{replacement:T}:T||{}).locale]||{},$=void 0===T.replacement?"-":T.replacement,ie=void 0===T.trim||T.trim,ue=y.normalize().split("").reduce(function(he,we){var xe=Z[we]||n[we]||we;return xe===$&&(xe=" "),he+xe.replace(T.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return T.strict&&(ue=ue.replace(/[^A-Za-z0-9\s]/g,"")),ie&&(ue=ue.trim()),ue=ue.replace(/\s+/g,$),T.lower&&(ue=ue.toLowerCase()),ue}return a.extend=function(y){Object.assign(n,y)},a},t.exports=a(),t.exports.default=a()}({exports:{}});const kp=()=>Km()?"localhost":window.location.hostname;({local:`http://${kp()}:3000`,preview:"https://auth.v1.preview.ramper.xyz",dev:"https://auth.v1.dev.ramper.xyz",staging:"https://auth.v1.staging.ramper.xyz",prod:"https://auth.v1.ramper.xyz"})[Fu()];({local:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",preview:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",dev:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",staging:"https://us-central1-ramper-prod.cloudfunctions.net",prod:"https://us-central1-ramper-prod.cloudfunctions.net"})[Fu()],{local:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",preview:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",dev:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",staging:"wss://tauokxd7fh.execute-api.us-west-2.amazonaws.com/prod",prod:"wss://tauokxd7fh.execute-api.us-west-2.amazonaws.com/prod"}[Fu()],{local:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",preview:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",dev:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",staging:"https://cjbz1h17i7.execute-api.us-west-2.amazonaws.com/prod/v1_0",prod:"https://cjbz1h17i7.execute-api.us-west-2.amazonaws.com/prod/v1_0"}[Fu()],{local:"G-QDW3GW421L",preview:"G-QDW3GW421L",dev:"G-QDW3GW421L",staging:"G-7NRREF51EB",prod:"G-7NRREF51EB"}[Fu()],{local:`http://${kp()}:3001`,preview:"https://example.preview.ramper.xyz",dev:"https://example.dev.ramper.xyz",staging:"https://example.staging.ramper.xyz",prod:"https://example.ramper.xyz"}[Fu()];({local:`http://${kp()}:3002`,preview:"https://static.preview.ramper.xyz",dev:"https://static.dev.ramper.xyz",staging:"https://static.staging.ramper.xyz",prod:"https://static.ramper.xyz"})[Fu()];({local:`http://${kp()}:3004`,preview:"https://docs.preview.ramper.xyz",dev:"https://docs.dev.ramper.xyz",staging:"https://docs.staging.ramper.xyz",prod:"https://docs.ramper.xyz"})[Fu()];const kT={local:`http://${kp()}:3005`,preview:"https://js.preview.ramper.xyz",dev:"https://js.dev.ramper.xyz",staging:"https://js.staging.ramper.xyz",prod:"https://js.ramper.xyz"};kT[Fu()],{local:"suyklxmori",preview:"suyklxmori",dev:"suyklxmori",staging:"dtofgevaxu",prod:"dtofgevaxu"}[Fu()],{local:`http://${kp()}:3008`,preview:"https://developer.preview.ramper.xyz",dev:"https://developer.dev.ramper.xyz",staging:"https://developer.staging.ramper.xyz",prod:"https://developer.ramper.xyz"}[Fu()];const rw=t=>window[t];let iw;const Pf_GOOGLE="google",Pf_FACEBOOK="facebook",Pf_APPLE="apple",Pf_TWITTER="twitter",Pf_EMAIL="email",Lp={MAINNET:"mainnet",ROPSTEN:"ropsten",GOERLI:"goerli",MATIC:"matic",MATICMUM:"maticmum"},LT_DARK=(Lp.MAINNET,Lp.GOERLI,Lp.MATIC,Lp.MATICMUM,"dark"),Fp=(Lp.MAINNET,{ALL:"ALL",DEBUG:"DEBUG",INFO:"INFO",WARN:"WARN",ERROR:"ERROR"}),uS=Fp.DEBUG,ow=(t,...e)=>{};class lte{constructor(e=uS){this.debug=ow,this.info=ow,this.warn=ow,this.error=ow;const n=Object.values(Fp).includes(e)?e:uS;this.error=console.error.bind(console),n!==Fp.ERROR&&(this.warn=console.warn.bind(console),n!==Fp.WARN&&(this.info=console.info.bind(console),n!==Fp.INFO&&(this.debug=console.log.bind(console),Fp.DEBUG)))}}let fte;if(void 0!==globalThis.window){fte=new lte(window.localStorage.getItem("ramper_loggingLevel")||uS)}function cS(t){this.message=t}cS.prototype=new Error,cS.prototype.name="InvalidCharacterError";typeof window<"u"&&window.atob&&window.atob.bind(window);function sw(t){this.message=t}sw.prototype=new Error,sw.prototype.name="InvalidTokenError";!function(){try{window&&window.Promise}catch{return null}}();var bte=ete(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));!function(t){var e=bte,n={HS256:"sha256",HS384:"sha384",HS512:"sha512",RS256:"RSA-SHA256"},r={HS256:"hmac",HS384:"hmac",HS512:"hmac",RS256:"sign"},a=t.exports;function Z(we,xe,Ie,Le){var je;if("hmac"===Le)je=e.createHmac(Ie,xe).update(we).digest("base64");else{if("sign"!=Le)throw new Error("Algorithm type not recognized");je=e.createSign(Ie).update(we).sign(xe,"base64")}return he(je)}function $(we){return Buffer.from(ie(we),"base64").toString()}function ie(we){return(we+=new Array(5-we.length%4).join("=")).replace(/\-/g,"+").replace(/_/g,"/")}function ue(we){return he(Buffer.from(we).toString("base64"))}function he(we){return we.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}a.version="0.5.6",a.decode=function(xe,Ie,Le,je){if(!xe)throw new Error("No token supplied");var Ue=xe.split(".");if(3!==Ue.length)throw new Error("Not enough or too many segments");var $e=Ue[0],Je=Ue[1],ht=Ue[2],xt=JSON.parse($($e)),Wt=JSON.parse($(Je));if(!Le){!je&&/BEGIN( RSA)? PUBLIC KEY/.test(Ie.toString())&&(je="RS256");var An=n[je||xt.alg],rn=r[je||xt.alg];if(!An||!rn)throw new Error("Algorithm not supported");if(!function T(we,xe,Ie,Le,je){if("hmac"===Le)return je===Z(we,xe,Ie,Le);if("sign"==Le)return e.createVerify(Ie).update(we).verify(xe,ie(je),"base64");throw new Error("Algorithm type not recognized")}([$e,Je].join("."),Ie,An,rn,ht))throw new Error("Signature verification failed");if(Wt.nbf&&Date.now()<1e3*Wt.nbf)throw new Error("Token not yet active");if(Wt.exp&&Date.now()>1e3*Wt.exp)throw new Error("Token expired")}return Wt},a.encode=function(xe,Ie,Le,je){if(!Ie)throw new Error("Require key");Le||(Le="HS256");var Ue=n[Le],$e=r[Le];if(!Ue||!$e)throw new Error("Algorithm not supported");var Je={typ:"JWT",alg:Le};je&&je.header&&function y(we,xe){for(var Ie in xe)xe.hasOwnProperty(Ie)&&(we[Ie]=xe[Ie])}(Je,je.header);var ht=[];return ht.push(ue(JSON.stringify(Je))),ht.push(ue(JSON.stringify(xe))),ht.push(Z(ht.join("."),Ie,Ue,$e)),ht.join(".")}}({exports:{}});const Ate=()=>`${kT[(()=>{const t=globalThis.RAMPER_ENV;return t===mi_PROD?mi_PROD:t===mi_STAGING?mi_STAGING:t===mi_DEV?mi_DEV:t===mi_PREVIEW?mi_PREVIEW:t===mi_LOCAL?mi_LOCAL:mi_PROD})()]}/v1/near`,Ete=({src:t})=>Km()?Promise.resolve({}):((t,e)=>{const n=document.querySelector(`[src="${t}"]`);if(null!=n&&void 0!==iw)return iw;if(null!=n&&void 0!==rw(e))return Promise.resolve(rw(e));const r=document.createElement("script");return r.src=t,iw=new Promise((a,y)=>{document.head.appendChild(r),window.addEventListener(`initialize:${e}`,()=>{void 0!==rw(e)?a(rw(e)):y(new Error(`Failed to load script: [${t}]`))})}),iw})(t,"ramper"),wl=()=>globalThis.ramper,jT=(...t)=>{var e;return null===(e=wl())||void 0===e?void 0:e.sendTransaction(...t)},Dte=function(){var t=(0,ke.Z)(function*({metadata:e,store:n,options:r,logger:a}){yield((...t)=>Yee(void 0,void 0,void 0,function*(){const e=yield Ete({src:Ate()});return yield e?.init(...t),e}))({appName:"Ramper Wallet",authProviders:[Pf_GOOGLE,Pf_FACEBOOK,Pf_TWITTER,Pf_APPLE,Pf_EMAIL],walletProviders:[],network:r.network.networkId,theme:LT_DARK});const y={wallet:window.ramper},T=function(){var $=(0,ke.Z)(function*(){const{wallets:ie}=y.wallet.getUser(),{publicKey:ue}=ie.near;return ue?[{accountId:ue}]:[]});return function(){return $.apply(this,arguments)}}(),Z=function(){var $=(0,ke.Z)(function*(ie){const ue=yield T(),{contract:he}=n.getState();if(!ue.length||!he)throw new Error("Wallet not signed in");return ie.map(we=>{const xe=we.actions.map(Ie=>(0,ts.createAction)(Ie));return{receiverId:we.receiverId||he.contractId,actions:xe}})});return function(ue){return $.apply(this,arguments)}}();return{signIn:()=>(0,ke.Z)(function*(){const $=yield((...t)=>{var e;return null===(e=wl())||void 0===e?void 0:e.signIn(...t)})();if("cancel"===$.method||"none"===$.method)throw new Error("Something went wrong");const ie=yield T();return ie.length?ie:T()})(),signOut:()=>(0,ke.Z)(function*(){y.wallet.signOut()})(),getAccounts:()=>(0,ke.Z)(function*(){return T()})(),verifyOwner:({message:$})=>(0,ke.Z)(function*(){throw a.log("Ramper Wallet:verifyOwner",{message:$}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({receiverId:$,actions:ie})=>(0,ke.Z)(function*(){a.log("signAndSendTransaction",{receiverId:$,actions:ie});const{contract:ue}=n.getState();if(!(yield T()).length||!ue)throw new Error("Wallet not signed in");const we=yield Z([{receiverId:$,actions:ie}]);try{const{result:xe}=yield jT({transactionActions:we});if(0===Object.keys(xe[0]).length&&xe[0].constructor===Object)throw new Error;return xe[0]}catch{throw new Error("Failed to send transaction")}})(),signAndSendTransactions:({transactions:$})=>(0,ke.Z)(function*(){a.log("signAndSendTransactions",{transactions:$});const ie=yield Z($);try{const{result:ue}=yield jT({transactionActions:ie});if(0===Object.keys(ue[0]).length&&ue[0].constructor===Object)throw new Error;return ue}catch{throw new Error("Failed to send transactions")}})()}});return function(n){return t.apply(this,arguments)}}();function UT({iconUrl:t=Zee,deprecated:e=!1}={}){return(0,ke.Z)(function*(){return(0,Ga.isMobile)()?null:{id:"ramper-wallet",type:"injected",metadata:{name:"Ramper Wallet",description:null,iconUrl:t,downloadUrl:"https://docs.ramper.xyz/",deprecated:e,available:!0},init:Dte}})}const KT={},zT={},VT=(t,e)=>{zT[t]=e},qt=t=>{class e extends Error{constructor(r,a,y){if(super(r||t,y),Object.setPrototypeOf(this,e.prototype),this.name=t,a)for(const T in a)this[T]=a[T];if(y&&function Cte(t){return"object"==typeof t}(y)&&"cause"in y&&!("cause"in this)){const T=y.cause;this.cause=T,"stack"in T&&(this.stack=this.stack+"\nCAUSE: "+T.stack)}}}return KT[t]=e,e};qt("AccountNameRequired"),qt("AccountNotSupported"),qt("AmountRequired"),qt("BluetoothRequired"),qt("BtcUnmatchedApp"),qt("CantOpenDevice"),qt("CashAddrNotSupported"),qt("ClaimRewardsFeesWarning"),qt("CurrencyNotSupported"),qt("DeviceAppVerifyNotSupported"),qt("DeviceGenuineSocketEarlyClose"),qt("DeviceNotGenuine"),qt("DeviceOnDashboardExpected"),qt("DeviceOnDashboardUnexpected"),qt("DeviceInOSUExpected"),qt("DeviceHalted"),qt("DeviceNameInvalid"),qt("DeviceSocketFail"),qt("DeviceSocketNoBulkStatus"),qt("DeviceSocketNoBulkStatus"),qt("UnresponsiveDeviceError");const xte=qt("DisconnectedDevice"),Tte=qt("DisconnectedDeviceDuringOperation"),WT=(qt("DeviceExtractOnboardingStateError"),qt("DeviceOnboardingStatePollingError"),qt("EnpointConfig"),qt("EthAppPleaseEnableContractData"),qt("FeeEstimationFailed"),qt("FirmwareNotRecognized"),qt("HardResetFail"),qt("InvalidXRPTag"),qt("InvalidAddress"),qt("InvalidNonce"),qt("InvalidAddressBecauseDestinationIsAlsoSource"),qt("LatestMCUInstalledError"),qt("UnknownMCU"),qt("LedgerAPIError"),qt("LedgerAPIErrorWithMessage"),qt("LedgerAPINotAvailable"),qt("ManagerAppAlreadyInstalled"),qt("ManagerAppRelyOnBTC"),qt("ManagerAppDepInstallRequired"),qt("ManagerAppDepUninstallRequired"),qt("ManagerDeviceLocked"),qt("ManagerFirmwareNotEnoughSpace"),qt("ManagerNotEnoughSpace"),qt("ManagerUninstallBTCDep"),qt("NetworkDown"),qt("NetworkError"),qt("NoAddressesFound"),qt("NotEnoughBalance"),qt("NotEnoughBalanceToDelegate"),qt("NotEnoughBalanceInParentAccount"),qt("NotEnoughSpendableBalance"),qt("NotEnoughBalanceBecauseDestinationNotCreated"),qt("NoAccessToCamera"),qt("NotEnoughGas"),qt("NotEnoughGasSwap"),qt("NotSupportedLegacyAddress"),qt("GasLessThanEstimate"),qt("PriorityFeeTooLow"),qt("PriorityFeeTooHigh"),qt("PriorityFeeHigherThanMaxFee"),qt("MaxFeeTooLow"),qt("PasswordsDontMatch"),qt("PasswordIncorrect"),qt("RecommendSubAccountsToEmpty"),qt("RecommendUndelegation"),qt("TimeoutTagged"),qt("UnexpectedBootloader"),qt("MCUNotGenuineToDashboard"),qt("RecipientRequired"),qt("UnavailableTezosOriginatedAccountReceive"),qt("UnavailableTezosOriginatedAccountSend"),qt("UpdateFetchFileFail"),qt("UpdateIncorrectHash"),qt("UpdateIncorrectSig"),qt("UpdateYourApp"),qt("UserRefusedDeviceNameChange"),qt("UserRefusedAddress"),qt("UserRefusedFirmwareUpdate"),qt("UserRefusedAllowManager"),qt("UserRefusedOnDevice"),qt("ExpertModeRequired"),qt("TransportOpenUserCancelled")),Ote=(qt("TransportInterfaceNotAvailable"),qt("TransportRaceCondition"));qt("TransportWebUSBGestureRequired"),qt("TransactionHasBeenValidatedError"),qt("TransportExchangeTimeoutError"),qt("DeviceShouldStayInApp"),qt("WebsocketConnectionError"),qt("WebsocketConnectionFailed"),qt("WrongDeviceForAccount"),qt("WrongAppForCurrency"),qt("ETHAddressNonEIP"),qt("CantScanQRCode"),qt("FeeNotLoaded"),qt("FeeNotLoadedSwap"),qt("FeeRequired"),qt("FeeTooHigh"),qt("PendingOperation"),qt("SyncError"),qt("PairingFailed"),qt("PeerRemovedPairing"),qt("GenuineCheckFailed"),qt("LedgerAPI4xx"),qt("LedgerAPI5xx"),qt("FirmwareOrAppUpdateRequired"),qt("ReplacementTransactionUnderpriced"),qt("OpReturnSizeLimit"),qt("DustLimit"),qt("LanguageNotFound"),qt("NoDBPathGiven"),qt("DBWrongPassword"),qt("DBNotReset");var GT;!function(t){t.Unknown="Unknown",t.LocationServicesDisabled="LocationServicesDisabled",t.LocationServicesUnauthorized="LocationServicesUnauthorized",t.BluetoothScanStartFailed="BluetoothScanStartFailed"}(GT||(GT={}));class ZT extends Error{constructor(e,n){super(n),this.name="HwTransportError",this.type=e,Object.setPrototypeOf(this,ZT.prototype)}}class Al extends Error{constructor(e,n){const r="TransportError";super(e||r),this.name=r,this.message=e,this.stack=new Error(e).stack,this.id=n}}VT("TransportError",t=>new Al(t.message,t.id));const Bp={ACCESS_CONDITION_NOT_FULFILLED:38916,ALGORITHM_NOT_SUPPORTED:38020,CLA_NOT_SUPPORTED:28160,CODE_BLOCKED:38976,CODE_NOT_INITIALIZED:38914,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,CONDITIONS_OF_USE_NOT_SATISFIED:27013,CONTRADICTION_INVALIDATION:38928,CONTRADICTION_SECRET_CODE_STATUS:38920,CUSTOM_IMAGE_BOOTLOADER:26159,CUSTOM_IMAGE_EMPTY:26158,FILE_ALREADY_EXISTS:27273,FILE_NOT_FOUND:37892,GP_AUTH_FAILED:25344,HALTED:28586,INCONSISTENT_FILE:37896,INCORRECT_DATA:27264,INCORRECT_LENGTH:26368,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,DEVICE_NOT_ONBOARDED:27911,DEVICE_NOT_ONBOARDED_2:26129,INVALID_KCV:38021,INVALID_OFFSET:37890,LICENSING:28482,LOCKED_DEVICE:21781,MAX_VALUE_REACHED:38992,MEMORY_PROBLEM:37440,MISSING_CRITICAL_PARAMETER:26624,NO_EF_SELECTED:37888,NOT_ENOUGH_MEMORY_SPACE:27268,OK:36864,PIN_REMAINING_ATTEMPTS:25536,REFERENCED_DATA_NOT_FOUND:27272,SECURITY_STATUS_NOT_SATISFIED:27010,TECHNICAL_PROBLEM:28416,UNKNOWN_APDU:27906,USER_REFUSED_ON_DEVICE:21761,NOT_ENOUGH_SPACE:20738};class aw extends Error{constructor(e,{canBeMappedToChildError:n=!0}={}){const r=Object.keys(Bp).find(Z=>Bp[Z]===e)||"UNKNOWN_ERROR",a=function Nte(t){switch(t){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received";case 21781:return"Locked device"}if(28416<=t&&t<=28671)return"Internal error, please report"}(e)||r,T=`Ledger device: ${a} (0x${e.toString(16)})`;if(super(T),this.name="TransportStatusError",this.statusCode=e,this.statusText=r,n&&e===Bp.LOCKED_DEVICE)return new Pte(T)}}class Pte extends aw{constructor(e){super(Bp.LOCKED_DEVICE,{canBeMappedToChildError:!1}),e&&(this.message=e),this.name="LockedDeviceError"}}VT("TransportStatusError",t=>new aw(t.statusCode));let YT=0;const Rf=[],JT=(t,e,n)=>{const r={type:t,id:String(++YT),date:new Date};e&&(r.message=e),n&&(r.data=n),QT(r)};class zm{constructor(e,n){this.type=e,this.context=n}trace(e,n){(({type:t,message:e,data:n,context:r})=>{const a={type:t,id:String(++YT),date:new Date};e&&(a.message=e),n&&(a.data=n),r&&(a.context=r),QT(a)})({type:this.type,message:e,data:n,context:this.context})}getContext(){return this.context}setContext(e){this.context=e}updateContext(e){this.context=Object.assign(Object.assign({},this.context),e)}getType(){return this.type}setType(e){this.type=e}withType(e){return new zm(e,this.context)}withContext(e){return new zm(this.type,e)}withUpdatedContext(e){return new zm(this.type,Object.assign(Object.assign({},this.context),e))}}function QT(t){for(let e=0;e(Rf.push(t),()=>{const e=Rf.indexOf(t);-1!==e&&(Rf[e]=Rf[Rf.length-1],Rf.pop())}));var uw=function(t,e,n,r){return new(n||(n=Promise))(function(y,T){function Z(ue){try{ie(r.next(ue))}catch(he){T(he)}}function $(ue){try{ie(r.throw(ue))}catch(he){T(he)}}function ie(ue){ue.done?y(ue.value):function a(y){return y instanceof n?y:new n(function(T){T(y)})}(ue.value).then(Z,$)}ie((r=r.apply(t,e||[])).next())})};class lS{constructor({context:e,logType:n}={}){this.exchangeTimeout=3e4,this.unresponsiveTimeout=15e3,this.deviceModel=null,this._events=new(ZA()),this.send=(r,a,y,T,Z=Buffer.alloc(0),$=[Bp.OK],{abortTimeoutMs:ie}={})=>uw(this,void 0,void 0,function*(){const ue=this.tracer.withUpdatedContext({function:"send"});if(Z.length>=256)throw ue.trace("data.length exceeded 256 bytes limit",{dataLength:Z.length}),new Al("data.length exceed 256 bytes limit. Got: "+Z.length,"DataLengthTooBig");ue.trace("Starting an exchange",{abortTimeoutMs:ie});const he=yield this.exchange(Buffer.concat([Buffer.from([r,a,y,T]),Buffer.from([Z.length]),Z]),{abortTimeoutMs:ie});ue.trace("Received response from exchange");const we=he.readUInt16BE(he.length-2);if(!$.some(xe=>xe===we))throw new aw(we);return he}),this._appAPIlock=null,this.tracer=new zm(n??"transport",e)}exchange(e,{abortTimeoutMs:n}={}){throw new Error("exchange not implemented")}exchangeBulk(e,n){let r=!1;return(()=>uw(this,void 0,void 0,function*(){if(!r)for(const T of e){const Z=yield this.exchange(T);if(r)return;const $=Z.readUInt16BE(Z.length-2);if($!==Bp.OK)throw new aw($);n.next(Z)}}))().then(()=>!r&&n.complete(),T=>!r&&n.error(T)),{unsubscribe:()=>{r=!0}}}setScrambleKey(e){}close(){return Promise.resolve()}on(e,n){this._events.on(e,n)}off(e,n){this._events.removeListener(e,n)}emit(e,...n){this._events.emit(e,...n)}setDebugMode(){console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.")}setExchangeTimeout(e){this.exchangeTimeout=e}setExchangeUnresponsiveTimeout(e){this.unresponsiveTimeout=e}static create(e=3e3,n){return new Promise((r,a)=>{let y=!1;const T=this.listen({next:$=>{y=!0,T&&T.unsubscribe(),Z&&clearTimeout(Z),this.open($.descriptor,e).then(r,a)},error:$=>{Z&&clearTimeout(Z),a($)},complete:()=>{Z&&clearTimeout(Z),y||a(new Al(this.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),Z=n?setTimeout(()=>{T.unsubscribe(),a(new Al(this.ErrorMessage_ListenTimeout,"ListenTimeout"))},n):null})}exchangeAtomicImpl(e){return uw(this,void 0,void 0,function*(){const n=this.tracer.withUpdatedContext({function:"exchangeAtomicImpl",unresponsiveTimeout:this.unresponsiveTimeout});if(this.exchangeBusyPromise)throw n.trace("Atomic exchange is already busy"),new Ote("An action was already pending on the Ledger device. Please deny or reconnect.");let r;const a=new Promise(Z=>{r=Z});this.exchangeBusyPromise=a;let y=!1;const T=setTimeout(()=>{n.trace('Timeout reached, emitting Transport event "unresponsive"',{unresponsiveTimeout:this.unresponsiveTimeout}),y=!0,this.emit("unresponsive")},this.unresponsiveTimeout);try{const Z=yield e();return y&&(n.trace("Device was unresponsive, emitting responsive"),this.emit("responsive")),Z}finally{n.trace("Finalize, clearing busy guard"),clearTimeout(T),r&&r(),this.exchangeBusyPromise=null}})}decorateAppAPIMethods(e,n,r){for(const a of n)e[a]=this.decorateAppAPIMethod(a,e[a],e,r)}decorateAppAPIMethod(e,n,r,a){return(...y)=>uw(this,void 0,void 0,function*(){const{_appAPIlock:T}=this;if(T)return Promise.reject(new Al("Ledger Device is busy (lock "+T+")","TransportLocked"));try{return this._appAPIlock=e,this.setScrambleKey(a),yield n.apply(r,y)}finally{this._appAPIlock=null}})}setTraceContext(e){this.tracer=this.tracer.withContext(e)}updateTraceContext(e){this.tracer.updateContext(e)}getTraceContext(){return this.tracer.getContext()}}lS.ErrorMessage_ListenTimeout="No Ledger device found (timeout)",lS.ErrorMessage_NoDeviceFound="No Ledger device found";const Fte=lS;function Bte(t){const e=Buffer.alloc(2);return e.writeUInt16BE(t,0),e}const jte={data:Buffer.alloc(0),dataLength:0,sequence:0};var Kte=g(97858),qT=g.n(Kte);var Uo;!function(t){t.blue="blue",t.nanoS="nanoS",t.nanoSP="nanoSP",t.nanoX="nanoX",t.stax="stax"}(Uo||(Uo={}));const cw={[Uo.blue]:{id:Uo.blue,productName:"Ledger\xa0Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:491520,masks:[822083584,822149120],getBlockSize:t=>4096},[Uo.nanoS]:{id:Uo.nanoS,productName:"Ledger\xa0Nano\xa0S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:327680,masks:[823132160],getBlockSize:t=>{var e;return qT().lt(null!==(e=qT().coerce(t))&&void 0!==e?e:"","2.0.0")?4096:2048}},[Uo.nanoSP]:{id:Uo.nanoSP,productName:"Ledger Nano S Plus",productIdMM:80,legacyUsbProductId:5,usbOnly:!0,memorySize:1572864,masks:[856686592],getBlockSize:t=>32},[Uo.nanoX]:{id:Uo.nanoX,productName:"Ledger\xa0Nano\xa0X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2097152,masks:[855638016],getBlockSize:t=>4096,bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]},[Uo.stax]:{id:Uo.stax,productName:"Ledger\xa0Stax",productIdMM:96,legacyUsbProductId:6,usbOnly:!1,memorySize:1572864,masks:[857735168],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]}},lw=(Uo.blue,Uo.nanoS,Uo.nanoSP,Uo.nanoX,Uo.stax,Object.values(cw)),$T=11415,e9=t=>{const e=lw.find(a=>a.legacyUsbProductId===t);if(e)return e;const n=t>>8;return lw.find(a=>a.productIdMM===n)},t9=[],fS={};for(const t in cw){const e=cw[t],{bluetoothSpec:n}=e;if(n)for(let r=0;r{const{hid:t}=navigator;if(!t)throw new Al("navigator.hid is not supported","HIDNotSupported");return t};function n9(){return El(this,void 0,void 0,function*(){const t=yield fw().requestDevice({filters:Vte});return Array.isArray(t)?t:[t]})}function dS(){return El(this,void 0,void 0,function*(){return(yield fw().getDevices()).filter(e=>e.vendorId===$T)})}class kf extends Fte{constructor(e){super(),this.channel=Math.floor(65535*Math.random()),this.packetSize=64,this.inputs=[],this.read=()=>this.inputs.length?Promise.resolve(this.inputs.shift()):new Promise(n=>{this.inputCallback=n}),this.onInputReport=n=>{const r=Buffer.from(n.data.buffer);this.inputCallback?(this.inputCallback(r),this.inputCallback=null):this.inputs.push(r)},this._disconnectEmitted=!1,this._emitDisconnect=n=>{this._disconnectEmitted||(this._disconnectEmitted=!0,this.emit("disconnect",n))},this.exchange=n=>El(this,void 0,void 0,function*(){return yield this.exchangeAtomicImpl(()=>El(this,void 0,void 0,function*(){const{channel:a,packetSize:y}=this;JT("apdu","=> "+n.toString("hex"));const T=((t,e)=>({makeBlocks(n){let r=Buffer.concat([Bte(n.length),n]);const a=e-5,y=Math.ceil(r.length/a);r=Buffer.concat([r,Buffer.alloc(y*a-r.length+1).fill(0)]);const T=[];for(let Z=0;Zy&&(a=a.slice(0,y)),{data:a,dataLength:y,sequence:T}},getReducedResult(n){if(n&&n.dataLength===n.data.length)return n.data}}))(a,y),Z=T.makeBlocks(n);for(let ue=0;ue{throw a&&a.message&&a.message.includes("write")?(this._emitDisconnect(a),new Tte(a.message)):a})}),this.device=e,this.deviceModel="number"==typeof e.productId?e9(e.productId):void 0,e.addEventListener("inputreport",this.onInputReport)}static request(){return El(this,void 0,void 0,function*(){const[e]=yield n9();return kf.open(e)})}static openConnected(){return El(this,void 0,void 0,function*(){const e=yield dS();return 0===e.length?null:kf.open(e[0])})}static open(e){return El(this,void 0,void 0,function*(){yield e.open();const n=new kf(e),r=a=>{e===a.device&&(fw().removeEventListener("disconnect",r),n._emitDisconnect(new xte))};return fw().addEventListener("disconnect",r),n})}close(){return El(this,void 0,void 0,function*(){yield this.exchangeBusyPromise,this.device.removeEventListener("inputreport",this.onInputReport),yield this.device.close()})}setScrambleKey(){}}kf.isSupported=()=>Promise.resolve(!(!window.navigator||!window.navigator.hid)),kf.list=dS,kf.listen=t=>{let e=!1;return function Wte(){return El(this,void 0,void 0,function*(){const t=yield dS();return t.length>0?t[0]:(yield n9())[0]})}().then(r=>{if(r){if(!e){const a="number"==typeof r.productId?e9(r.productId):void 0;t.next({type:"add",descriptor:r,deviceModel:a}),t.complete()}}else t.error(new WT("Access denied to use Ledger device"))},r=>{t.error(new WT(r.message))}),{unsubscribe:function n(){e=!0}}};const Gte=kf;function r9(t){const e=t.split("/");return Buffer.concat(e.map(n=>n.endsWith("'")?2147483648|Math.abs(parseInt(n.slice(0,-1))):Math.abs(parseInt(n))).map(n=>Buffer.from([n>>24&255,n>>16&255,n>>8&255,255&n])))}const $te="W".charCodeAt(0),ene=()=>!!window.navigator?.hid;class tne{constructor(){var e=this;this.transport=null,this.isConnected=()=>Boolean(this.transport),this.connect=(0,ke.Z)(function*(){e.transport=yield Gte.create();const n=()=>{e.transport?.off("disconnect",n),e.transport=null};e.transport.on("disconnect",n)}),this.disconnect=(0,ke.Z)(function*(){if(!e.transport)throw new Error("Device not connected");yield e.transport.close(),e.transport=null}),this.setScrambleKey=n=>{if(!this.transport)throw new Error("Device not connected");this.transport.setScrambleKey(n)},this.on=(n,r)=>{if(!this.transport)throw new Error("Device not connected");return this.transport.on(n,r),{remove:()=>this.transport?.off(n,r)}},this.off=(n,r)=>{if(!this.transport)throw new Error("Device not connected");this.transport.off(n,r)},this.getVersion=(0,ke.Z)(function*(){if(!e.transport)throw new Error("Device not connected");const n=yield e.transport.send(128,6,0,0),[r,a,y]=Array.from(n);return`${r}.${a}.${y}`}),this.getPublicKey=function(){var n=(0,ke.Z)(function*({derivationPath:r}){if(!e.transport)throw new Error("Device not connected");const a=yield e.transport.send(128,4,0,$te,r9(r));return lr.utils.serialize.base_encode(a.subarray(0,-2))});return function(r){return n.apply(this,arguments)}}(),this.sign=function(){var n=(0,ke.Z)(function*({data:r,derivationPath:a}){if(!e.transport)throw new Error("Device not connected");yield e.getVersion();const T=Buffer.concat([r9(a),Buffer.from(r)]);for(let Z=0;Z=T.length,ie=yield e.transport.send(128,2,$?128:0,0,Buffer.from(T.subarray(Z,Z+123)));if($)return Buffer.from(ie.subarray(0,-2))}throw new Error("Invalid data or derivation path")});return function(r){return n.apply(this,arguments)}}()}}const nne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAQAAADTdEb+AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAFQkAABUJATOjLtcAAAAHdElNRQfmCBYRFRR5QOqTAAAE6UlEQVR42u3dPYtcZRzG4fvkRQxRNBhlQcEQED+HjY2wKa0stLCxsLS2FfHlC8TaVkhjnzRWqYw2IkGIkJBgQMgmu2NhfZbMMPc8szvXNeVwZv7POb+ZOXAGTgIAAAAAAAAAAAAAAAAAAAAAwOk3zT7zbj7M2dHjrW2VD/NDHo0eI8mr+TiXshg9xpoc5sf8tuxG13KYxal53M2V0UchSXIld4fvi/U9DnNtbqFnZnfBIoejj8Iabc9atmeSdaxl9rv3zDKvA89LWFQIiwphUSEsKoRFh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mFRISwqhEWFsKgQFhXCokJYVAiLCmFRISwqhEWFsKgQFhXCokJYVAiLCmFRISwqhEWFsKgQFhWrhzX6/spswspHedVb917NdyfoZuNncj/f58HoMZK8ls9z+QR9KM/n6mobrhrWXj4dveal/JXrWxHWy/kkb44eYhN25Rzr2egBtnCSql0Jiw0TFhXCokJYVAiLCmFRISwqhEWFsKgQFhXComI+rClnRw+3Rtuzlu2ZZB1rmeaemv93w518eWp2wpSHeTR6iCTJo3yTS1mMHmNNDnNn9AgAAAAAAAAAAAAAAAAAAAAAAIz0H5C/bp2MgRJCAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA4LTIyVDE3OjIwOjM2KzAwOjAwLb5rZQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wOC0yMlQxNzoyMDozNiswMDowMFzj09kAAAAASUVORK5CYII=",gS="accounts",rne=function(){var t=(0,ke.Z)(function*(e){const n=yield e.getItem(gS);return{client:new tne,subscriptions:[],accounts:n||[]}});return function(n){return t.apply(this,arguments)}}(),ine=function(){var t=(0,ke.Z)(function*({options:e,store:n,provider:r,logger:a,storage:y,metadata:T}){const Z=yield rne(y),$={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(Le=(0,ke.Z)(function*(je){const Ue=Z.accounts.find($e=>$e.accountId===je);if(!Ue)throw new Error("Failed to find public key for account");return lr.utils.PublicKey.from(Ue.publicKey)}),function(Ue){return Le.apply(this,arguments)}),signMessage:function(){var Le=(0,ke.Z)(function*(je,Ue){const $e=Z.accounts.find(ht=>ht.accountId===Ue);if(!$e)throw new Error("Failed to find account for signing");return{signature:yield Z.client.sign({data:je,derivationPath:$e.derivationPath}),publicKey:lr.utils.PublicKey.from($e.publicKey)}});return function(Ue,$e){return Le.apply(this,arguments)}}()},ie=()=>Z.accounts.map(Le=>({accountId:Le.accountId,publicKey:"ed25519:"+Le.publicKey})),he=function(){var Le=(0,ke.Z)(function*(){Z.client.isConnected()&&(yield Z.client.disconnect().catch(je=>{a.log("Failed to disconnect device"),a.error(je)})),Z.subscriptions.forEach(Le=>Le.remove()),Z.subscriptions=[],Z.accounts=[],y.removeItem(gS)});return function(){return Le.apply(this,arguments)}}(),we=function(){var Le=(0,ke.Z)(function*(){Z.client.isConnected()||(yield Z.client.connect())});return function(){return Le.apply(this,arguments)}}(),xe=({accountId:Le,publicKey:je})=>(a.log("validateAccessKey",{accountId:Le,publicKey:je}),r.viewAccessKey({accountId:Le,publicKey:je}).then(Ue=>{if(a.log("validateAccessKey:accessKey",{accessKey:Ue}),"FullAccess"!==Ue.permission)throw new Error("Public key requires 'FullAccess' permission");return Ue},Ue=>{if("AccessKeyDoesNotExist"===Ue.type)return null;throw Ue})),Ie=Le=>{const{contract:je}=n.getState();if(!je)throw new Error("Wallet not signed in");const Ue=Mf(n.getState());if(!Ue)throw new Error("No active account");return Le.map($e=>({signerId:$e.signerId||Ue.accountId,receiverId:$e.receiverId||je.contractId,actions:$e.actions}))};var Le;return{signIn:({accounts:Le})=>(0,ke.Z)(function*(){const je=ie();if(je.length)return je;const Ue=[];for(let $e=0;$e(0,ke.Z)(function*(){return ie()})(),verifyOwner:({message:Le})=>(0,ke.Z)(function*(){throw a.log("Ledger:verifyOwner",{message:Le}),new Error(`Method not supported by ${T.name}`)})(),signAndSendTransaction:({signerId:Le,receiverId:je,actions:Ue})=>(0,ke.Z)(function*(){if(a.log("signAndSendTransaction",{signerId:Le,receiverId:je,actions:Ue}),!Z.accounts.length)throw new Error("Wallet not signed in");yield we();const $e=yield(0,ts.signTransactions)(Ie([{signerId:Le,receiverId:je,actions:Ue}]),$,e.network);return r.sendTransaction($e[0])})(),signAndSendTransactions:({transactions:Le})=>(0,ke.Z)(function*(){if(a.log("signAndSendTransactions",{transactions:Le}),!Z.accounts.length)throw new Error("Wallet not signed in");yield we();const je=yield(0,ts.signTransactions)(Ie(Le),$,e.network),Ue=[];for(let $e=0;$e(0,ke.Z)(function*(){return yield we(),yield Z.client.getPublicKey({derivationPath:Le})})()}});return function(n){return t.apply(this,arguments)}}();function i9({iconUrl:t=nne,deprecated:e=!1}={}){return(0,ke.Z)(function*(){const n=(0,Ga.isMobile)(),r=ene();return n?null:{id:"ledger",type:"hardware",metadata:{name:"Ledger",description:"Protect crypto assets with the most popular hardware wallet.",iconUrl:t,deprecated:e,available:r},init:ine}})}var one=g(96105);const sne=function(){var t=(0,ke.Z)(function*(e){const{store:n,options:r,logger:a,dAppMetadata:y}=e,T=new one.NearMobileWallet({network:r.network.networkId,nodeUrl:r.network.nodeUrl,metadata:y});function Z(){return $.apply(this,arguments)}function $(){return($=(0,ke.Z)(function*(){a.log("[NearMobileWallet]:getAccounts");const ie=yield T.getAccounts(),ue=[];for(let he=0;he(0,ke.Z)(function*(){a.log("[NearMobileWallet]: signIn");const ue=""!==ie.contractId?ie.contractId:void 0;return yield T.signIn({...ie,contractId:ue}),yield Z()})(),signOut:()=>(0,ke.Z)(function*(){a.log("[NearMobileWallet]: signOut"),yield T.signOut()})(),getAccounts:()=>(0,ke.Z)(function*(){return Z()})(),signAndSendTransaction:ie=>(0,ke.Z)(function*(){a.log("[NearMobileWallet]: signAndSendTransaction",ie);const{contract:ue}=n.getState();if(!ue)throw new Error("Wallet not signed in");return yield T.signAndSendTransaction({receiverId:ue.contractId,...ie})})(),verifyOwner:()=>(0,ke.Z)(function*(){throw Error("[NearMobileWallet]: verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})(),signMessage:ie=>(0,ke.Z)(function*(){const{recipient:ue,nonce:he,...we}=ie;a.log("[NearMobileWallet]: signMessage",ie);const xe=yield T.signMessage({...we,receiver:ue,nonce:Array.from(he)});return{accountId:xe.accountId,signature:xe.signature.toString(),publicKey:xe.publicKey.toString()}})(),signAndSendTransactions:ie=>(0,ke.Z)(function*(){return a.log("[NearMobileWallet]: signAndSendTransactions",ie),yield T.signAndSendTransactions(ie)})()}});return function(n){return t.apply(this,arguments)}}(),ane="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAAB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4mU/CwMBcPMje+dOzeBmciH+hCRPMoofE02B7Jc0vtTKfpf/kCN/DdfftacC8iuL/EfGhN8U+beOPuTT2tz4H1/5ijFa7oBAHYCDd37pqczRJ51+ZjY3c5lpmBfkYBxnWFaXtEHlJL2vCExDMf0aX87ZMF15BnyOQZlomhPYMvmG9Fjx5TOyknIQYL9f4yvUs8HOMwP6s2sktsuJHNQo+2XHUWQltkEJzSMrFbD2OZhsaQGuv11yLl3kp6/0wjC3k8u2aiZrPbtoTtOrX/qSkQt6/H8DRMdL1OqM1CwAAAAASUVORK5CYII=";function o9({dAppMetadata:t}={}){return(0,ke.Z)(function*(){return{id:"near-mobile-wallet",type:"injected",metadata:{iconUrl:ane,name:"Near Mobile Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!1,downloadUrl:"https://nearmobile.app/",deprecated:!1,available:!0},init:e=>sne({...e,dAppMetadata:t})}})}var s9=g(73597);const a9="guest-book.testnet";function cne(t,e){return t===e}class Vm{}Vm.\u0275fac=function(e){return new(e||Vm)},Vm.\u0275cmp=Ho({type:Vm,selectors:[["near-wallet-selector-sign-in"]],decls:6,vars:0,template:function(e,n){1&e&&(ui(0,"p"),_i(1," This app demonstrates a key element of NEAR\u2019s UX: once an app has permission to make calls on behalf of a user (that is, once a user signs in), the app can make calls to the blockchain for them without prompting extra confirmation. So you\u2019ll see that if you don\u2019t include a donation, your message gets posted right to the guest book.\n"),Hr(),ui(2,"p"),_i(3," But if you do add a donation, then NEAR will double-check that you\u2019re ok with sending money to this app.\n"),Hr(),ui(4,"p"),_i(5,"Go ahead and sign in to try it out!"),Hr())}});const lne=function(t){return{"is-premium":t}};function fne(t,e){if(1&t&&(ui(0,"p",1)(1,"strong"),_i(2),Hr(),_i(3,":"),Ws(4,"br"),_i(5),Hr()),2&t){const n=e.$implicit;Eo("ngClass",DM(3,lne,n.premium)),Jo(2),v1(n.sender),Jo(3),F0(" ",n.text,"\n")}}class Hm{}Hm.\u0275fac=function(e){return new(e||Hm)},Hm.\u0275cmp=Ho({type:Hm,selectors:[["near-wallet-selector-messages"]],inputs:{messages:"messages"},decls:3,vars:1,consts:[[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(e,n){1&e&&(ui(0,"h2"),_i(1,"Messages"),Hr(),Ba(2,fne,6,5,"p",0)),2&e&&(Jo(2),Eo("ngForOf",n.messages))},dependencies:[Y0,J0]});var dne=20,hne=1,dh=1e6,pne=-7,gne=21,yne=!1,Wm="[big.js] ",hh=Wm+"Invalid ",dw=hh+"decimal places",mne=hh+"rounding mode",c9=Wm+"Division by zero",Xr={},yc=void 0,vne=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function ph(t,e,n,r){var a=t.c;if(n===yc&&(n=t.constructor.RM),0!==n&&1!==n&&2!==n&&3!==n)throw Error(mne);if(e<1)r=3===n&&(r||!!a[0])||0===e&&(1===n&&a[0]>=5||2===n&&(a[0]>5||5===a[0]&&(r||a[1]!==yc))),a.length=1,r?(t.e=t.e-e+1,a[0]=1):a[0]=t.e=0;else if(e=5||2===n&&(a[e]>5||5===a[e]&&(r||a[e+1]!==yc||1&a[e-1]))||3===n&&(r||!!a[0]),a.length=e,r)for(;++a[--e]>9;)if(a[e]=0,0===e){++t.e,a.unshift(1);break}for(e=a.length;!a[--e];)a.pop()}return t}function jp(t,e,n){var r=t.e,a=t.c.join(""),y=a.length;if(e)a=a.charAt(0)+(y>1?"."+a.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)a="0"+a;a="0."+a}else if(r>0)if(++r>y)for(r-=y;r--;)a+="0";else r1&&(a=a.charAt(0)+"."+a.slice(1));return t.s<0&&n?"-"+a:a}Xr.abs=function(){var t=new this.constructor(this);return t.s=1,t},Xr.cmp=function(t){var e,n=this,r=n.c,a=(t=new n.constructor(t)).c,y=n.s,T=t.s,Z=n.e,$=t.e;if(!r[0]||!a[0])return r[0]?y:a[0]?-T:0;if(y!=T)return y;if(e=y<0,Z!=$)return Z>$^e?1:-1;for(T=(Z=r.length)<($=a.length)?Z:$,y=-1;++ya[y]^e?1:-1;return Z==$?0:Z>$^e?1:-1},Xr.div=function(t){var e=this,n=e.constructor,r=e.c,a=(t=new n(t)).c,y=e.s==t.s?1:-1,T=n.DP;if(T!==~~T||T<0||T>dh)throw Error(dw);if(!a[0])throw Error(c9);if(!r[0])return t.s=y,t.c=[t.e=0],t;var Z,$,ie,ue,he,we=a.slice(),xe=Z=a.length,Ie=r.length,Le=r.slice(0,Z),je=Le.length,Ue=t,$e=Ue.c=[],Je=0,ht=T+(Ue.e=e.e-t.e)+1;for(Ue.s=y,y=ht<0?0:ht,we.unshift(0);je++je?1:-1;else for(he=-1,ue=0;++heLe[he]?1:-1;break}if(!(ue<0))break;for($=je==Z?a:we;je;){if(Le[--je]<$[je]){for(he=je;he&&!Le[--he];)Le[he]=9;--Le[he],Le[je]+=10}Le[je]-=$[je]}for(;!Le[0];)Le.shift()}$e[Je++]=ue?ie:++ie,Le[0]&&ue?Le[je]=r[xe]||0:Le=[r[xe]]}while((xe++ht&&ph(Ue,ht,n.RM,Le[0]!==yc),Ue},Xr.eq=function(t){return 0===this.cmp(t)},Xr.gt=function(t){return this.cmp(t)>0},Xr.gte=function(t){return this.cmp(t)>-1},Xr.lt=function(t){return this.cmp(t)<0},Xr.lte=function(t){return this.cmp(t)<1},Xr.minus=Xr.sub=function(t){var e,n,r,a,y=this,T=y.constructor,Z=y.s,$=(t=new T(t)).s;if(Z!=$)return t.s=-$,y.plus(t);var ie=y.c.slice(),ue=y.e,he=t.c,we=t.e;if(!ie[0]||!he[0])return he[0]?t.s=-$:ie[0]?t=new T(y):t.s=1,t;if(Z=ue-we){for((a=Z<0)?(Z=-Z,r=ie):(we=ue,r=he),r.reverse(),$=Z;$--;)r.push(0);r.reverse()}else for(n=((a=ie.length0)for(;$--;)ie[e++]=0;for($=e;n>Z;){if(ie[--n]0?($=T,r=ie):(e=-e,r=Z),r.reverse();e--;)r.push(0);r.reverse()}for(Z.length-ie.length<0&&(r=ie,ie=Z,Z=r),e=ie.length,n=0;e;Z[e]%=10)n=(Z[--e]=Z[e]+ie[e]+n)/10|0;for(n&&(Z.unshift(n),++$),e=Z.length;0===Z[--e];)Z.pop();return t.c=Z,t.e=$,t},Xr.pow=function(t){var e=this,n=new e.constructor("1"),r=n,a=t<0;if(t!==~~t||t<-1e6||t>1e6)throw Error(hh+"exponent");for(a&&(t=-t);1&t&&(r=r.times(e)),t>>=1;)e=e.times(e);return a?n.div(r):r},Xr.prec=function(t,e){if(t!==~~t||t<1||t>dh)throw Error(hh+"precision");return ph(new this.constructor(this),t,e)},Xr.round=function(t,e){if(t===yc)t=0;else if(t!==~~t||t<-dh||t>dh)throw Error(dw);return ph(new this.constructor(this),t+this.e+1,e)},Xr.sqrt=function(){var t,e,n,r=this,a=r.constructor,y=r.s,T=r.e,Z=new a("0.5");if(!r.c[0])return new a(r);if(y<0)throw Error(Wm+"No square root");0===(y=Math.sqrt(r+""))||y===1/0?((e=r.c.join("")).length+T&1||(e+="0"),T=((T+1)/2|0)-(T<0||1&T),t=new a(((y=Math.sqrt(e))==1/0?"5e":(y=y.toExponential()).slice(0,y.indexOf("e")+1))+T)):t=new a(y+""),T=t.e+(a.DP+=4);do{n=t,t=Z.times(n.plus(r.div(n)))}while(n.c.slice(0,T).join("")!==t.c.slice(0,T).join(""));return ph(t,(a.DP-=4)+t.e+1,a.RM)},Xr.times=Xr.mul=function(t){var e,n=this,r=n.constructor,a=n.c,y=(t=new r(t)).c,T=a.length,Z=y.length,$=n.e,ie=t.e;if(t.s=n.s==t.s?1:-1,!a[0]||!y[0])return t.c=[t.e=0],t;for(t.e=$+ie,T$;)Z=e[ie]+y[$]*a[ie-$-1]+Z,e[ie--]=Z%10,Z=Z/10|0;e[ie]=Z}for(Z?++t.e:e.shift(),$=e.length;!e[--$];)e.pop();return t.c=e,t},Xr.toExponential=function(t,e){var n=this,r=n.c[0];if(t!==yc){if(t!==~~t||t<0||t>dh)throw Error(dw);for(n=ph(new n.constructor(n),++t,e);n.c.lengthdh)throw Error(dw);for(t=t+(n=ph(new n.constructor(n),t+n.e+1,e)).e+1;n.c.length=e.PE,!!t.c[0])},Xr.toNumber=function(){var t=Number(jp(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(t.toString()))throw Error(Wm+"Imprecise conversion");return t},Xr.toPrecision=function(t,e){var n=this,r=n.constructor,a=n.c[0];if(t!==yc){if(t!==~~t||t<1||t>dh)throw Error(hh+"precision");for(n=ph(new r(n),t,e);n.c.length=r.PE,!!a)},Xr.valueOf=function(){var t=this,e=t.constructor;if(!0===e.strict)throw Error(Wm+"valueOf disallowed");return jp(t,t.e<=e.NE||t.e>=e.PE,!0)};var wne=function l9(){function t(e){var n=this;if(!(n instanceof t))return e===yc?l9():new t(e);if(e instanceof t)n.s=e.s,n.e=e.e,n.c=e.c.slice();else{if("string"!=typeof e){if(!0===t.strict&&"bigint"!=typeof e)throw TypeError(hh+"value");e=0===e&&1/e<0?"-0":String(e)}!function bne(t,e){var n,r,a;if(!vne.test(e))throw Error(hh+"number");for(t.s="-"==e.charAt(0)?(e=e.slice(1),-1):1,(n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),a=e.length,r=0;r0&&"0"==e.charAt(--a););for(t.e=n-r-1,t.c=[],n=0;r<=a;)t.c[n++]=+e.charAt(r++)}return t}(n,e)}n.constructor=t}return t.prototype=Xr,t.DP=dne,t.RM=hne,t.NE=pne,t.PE=gne,t.strict=yne,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}();const Ane=wne;class Gm{constructor(){this.addMessage=new So}ngOnInit(){this.maxValue=Ane(this.account.amount).div(10**24).toString()}onSubmit(e){this.addMessage.emit(e)}}function Ene(t,e){if(1&t){const n=dy();ui(0,"button",1),Qi("click",function(){Li(n);return No(ja(2).switchAccount())}),_i(1," Switch Account "),Hr()}}function Sne(t,e){if(1&t&&Ws(0,"near-wallet-selector-messages",5),2&t){Eo("messages",ja(2).messages)}}function _ne(t,e){if(1&t){const n=dy();ly(0),ui(1,"div")(2,"button",1),Qi("click",function(){Li(n);return No(ja().signOut())}),_i(3,"Log out"),Hr(),ui(4,"button",1),Qi("click",function(){Li(n);return No(ja().switchWallet())}),_i(5,"Switch Wallet"),Hr(),ui(6,"button",1),Qi("click",function(){Li(n);return No(ja().onVerifyOwner())}),_i(7,"Verify Owner"),Hr(),ui(8,"button",1),Qi("click",function(){Li(n);return No(ja().onSignMessage())}),_i(9,"Sign Message"),Hr(),Ba(10,Ene,2,0,"button",2),Hr(),ui(11,"near-wallet-selector-form",3),Qi("addMessage",function(a){Li(n);return No(ja().onSubmit(a))}),Hr(),Ba(12,Sne,1,1,"near-wallet-selector-messages",4),fy()}if(2&t){const n=ja();Jo(10),Eo("ngIf",n.accounts.length>1),Jo(1),Eo("account",n.account),Jo(1),Eo("ngIf",!!n.messages.length)}}function Mne(t,e){if(1&t){const n=dy();ly(0),ui(1,"button",1),Qi("click",function(){Li(n);return No(ja().signIn())}),_i(2,"Log In"),Hr(),Ws(3,"near-wallet-selector-sign-in"),fy()}}Gm.\u0275fac=function(e){return new(e||Gm)},Gm.\u0275cmp=Ho({type:Gm,selectors:[["near-wallet-selector-form"]],inputs:{account:"account"},outputs:{addMessage:"addMessage"},decls:20,vars:3,consts:[[3,"ngSubmit"],["id","fieldset"],[1,"highlight"],["for","message"],["autoComplete","off","autoFocus","","id","message","required",""],["for","donation"],["autocomplete","off","id","donation","min","0","step","0.01","type","number",3,"defaultValue","max"],["title","NEAR Tokens"],["htmlFor","multiple"],["id","multiple","type","checkbox"],["type","submit"]],template:function(e,n){1&e&&(ui(0,"form",0),Qi("ngSubmit",function(a){return n.onSubmit(a)}),ui(1,"fieldset",1)(2,"p"),_i(3),Hr(),ui(4,"p",2)(5,"label",3),_i(6,"Message:"),Hr(),Ws(7,"input",4),Hr(),ui(8,"p")(9,"label",5),_i(10,"Donation (optional):"),Hr(),Ws(11,"input",6),ui(12,"span",7),_i(13,"\u24c3"),Hr()(),ui(14,"p")(15,"label",8),_i(16,"Multiple Transactions:"),Hr(),Ws(17,"input",9),Hr(),ui(18,"button",10),_i(19,"Sign"),Hr()()()),2&e&&(Jo(3),F0("Sign the guest book, ",n.account.account_id,"!"),Jo(8),A2("max",n.maxValue),Eo("defaultValue","0"))},dependencies:[cp,sp,bf]});const f9=lr.utils.format.parseNearAmount("0.00000000003");class Zm{ngOnInit(){var e=this;return(0,ke.Z)(function*(){const[n,r]=yield Promise.all([e.getMessages(),e.getAccount()]);e.account=r,e.messages=n,e.subscribeToEvents(),yield e.verifyMessageBrowserWallet()})()}getAccountBalance({provider:e,accountId:n}){return(0,ke.Z)(function*(){try{const{amount:r}=yield e.query({request_type:"view_account",finality:"final",account_id:n});return{hasBalance:!new(fr())(r).isZero()}}catch{return{hasBalance:!1}}})()}getAccount(){var e=this;return(0,ke.Z)(function*(){if(!e.accountId)return null;const{network:n}=e.selector.options,r=new lr.providers.JsonRpcProvider({url:n.nodeUrl}),{hasBalance:a}=yield e.getAccountBalance({provider:r,accountId:e.accountId});return a?r.query({request_type:"view_account",finality:"final",account_id:e.accountId}).then(y=>({...y,account_id:e.accountId})):(window.alert(`Account ID: ${e.accountId} has not been founded. Please send some NEAR into this account.`),yield(yield e.selector.wallet()).signOut(),null)})()}signIn(){this.modal.show()}signOut(){var e=this;return(0,ke.Z)(function*(){(yield e.selector.wallet()).signOut().catch(r=>{console.log("Failed to sign out"),console.error(r)})})()}switchWallet(){this.modal.show()}getMessages(){const{network:e}=this.selector.options;return new lr.providers.JsonRpcProvider({url:e.nodeUrl}).query({request_type:"call_function",account_id:a9,method_name:"getMessages",args_base64:"",finality:"optimistic"}).then(r=>JSON.parse(Buffer.from(r.result).toString()))}switchAccount(){const e=this.accounts.findIndex(a=>a.accountId===this.accountId),n=e{const T=new qA({message:n,nonce:r,recipient:a,callbackUrl:y}),Z=(0,A5.serialize)(E5,T),$=Uint8Array.from(_j.sha256.array(Z)),ie=Buffer.from(e,"base64");return lr.utils.PublicKey.from(t).verify($,ie)})({message:e.message,nonce:e.nonce,recipient:e.recipient,publicKey:n.publicKey,signature:n.signature,callbackUrl:e.callbackUrl}),Z=(yield Ij({publicKey:n.publicKey,accountId:n.accountId,network:r.selector.options.network}))&&a?"Successfully verified":"Failed to verify";alert(`${Z} signed message: '${e.message}': \n ${JSON.stringify(n)}`)})()}verifyMessageBrowserWallet(){var e=this;return(0,ke.Z)(function*(){const n=new URLSearchParams(window.location.hash.substring(1)),r=n.get("accountId"),a=n.get("publicKey"),y=n.get("signature");if(!r&&!a&&!y)return;const T=JSON.parse(localStorage.getItem("message")),Z={accountId:r,publicKey:a,signature:y};yield e.verifyMessage(T,Z);const $=new URL(location.href);$.hash="",$.search="",window.history.replaceState({},document.title,$),localStorage.removeItem("message")})()}onSignMessage(){var e=this;return(0,ke.Z)(function*(){const n=yield e.selector.wallet(),r="test message to sign",a=Buffer.from(crypto.getRandomValues(new Uint8Array(32))),y="guest-book.testnet";"browser"===n.type&&localStorage.setItem("message",JSON.stringify({message:r,nonce:[...a],recipient:y,callbackUrl:location.href}));try{const T=yield n.signMessage({message:r,nonce:a,recipient:y});T&&(yield e.verifyMessage({message:r,nonce:a,recipient:y},T))}catch(T){const Z=T instanceof Error?T.message:"Something went wrong";alert(Z)}})()}subscribeToEvents(){this.subscription=this.selector.store.observable.pipe(Sn(e=>e.accounts),function une(t,e=ft){return t=t??cne,mn((n,r)=>{let a,y=!0;n.subscribe(ut(r,T=>{const Z=e(T);(y||!t(a,Z))&&(y=!1,a=Z,r.next(T))}))})}()).subscribe(e=>{console.log("Accounts Update",e),this.accounts=e,this.accountId=e.find(n=>n.active)?.accountId||null,this.getAccount().then(n=>{this.account=n})}),this.modal.on("onHide",({hideReason:e})=>{console.log(`The reason for hiding the modal ${e}`)})}addMessages(e,n,r){var a=this;return(0,ke.Z)(function*(){const{contract:y}=a.selector.store.getState(),T=yield a.selector.wallet();if(!r)return T.signAndSendTransaction({signerId:a.accountId,actions:[{type:"FunctionCall",params:{methodName:"addMessage",args:{text:e},gas:f9,deposit:lr.utils.format.parseNearAmount(n)}}]}).catch($=>{throw alert("Failed to add message"),console.log("Failed to add message"),$});const Z=[];for(let $=0;$<2;$+=1)Z.push({signerId:a.accountId,receiverId:y.contractId,actions:[{type:"FunctionCall",params:{methodName:"addMessage",args:{text:`${e} (${$+1}/2)`},gas:f9,deposit:lr.utils.format.parseNearAmount(n)}}]});return T.signAndSendTransactions({transactions:Z}).catch($=>{throw alert("Failed to add messages"),console.log("Failed to add messages"),$})})()}onSubmit(e){var n=this;return(0,ke.Z)(function*(){const{fieldset:r,message:a,donation:y,multiple:T}=e.target.elements;r.disabled=!0,n.addMessages(a.value,y.value||"0",T.checked).then(()=>n.getMessages().then(Z=>{n.messages=Z,a.value="",y.value="0",r.disabled=!1,T.checked=!1,a.focus()}).catch(Z=>{throw alert("Failed to refresh messages"),console.log("Failed to refresh messages"),Z})).catch(Z=>{console.error(Z),r.disabled=!1})})()}ngOnDestroy(){this.subscription?.unsubscribe()}}Zm.\u0275fac=function(e){return new(e||Zm)},Zm.\u0275cmp=Ho({type:Zm,selectors:[["near-wallet-selector-content"]],inputs:{selector:"selector",modal:"modal",accounts:"accounts",accountId:"accountId"},decls:2,vars:2,consts:[[4,"ngIf"],[3,"click"],[3,"click",4,"ngIf"],[3,"account","addMessage"],[3,"messages",4,"ngIf"],[3,"messages"]],template:function(e,n){1&e&&(Ba(0,_ne,13,3,"ng-container",0),Ba(1,Mne,4,0,"ng-container",0)),2&e&&(Eo("ngIf",n.account),Jo(1),Eo("ngIf",!n.accountId))},dependencies:[cl,Vm,Hm,Gm]});class Up{}function Cne(t,e){1&t&&Ws(0,"near-wallet-selector-loading")}function Ine(t,e){if(1&t&&Ws(0,"near-wallet-selector-content",2),2&t){const n=ja();Eo("selector",n.selector)("accounts",n.accounts)("accountId",n.accountId)("modal",n.modal)}}Up.\u0275fac=function(e){return new(e||Up)},Up.\u0275cmp=Ho({type:Up,selectors:[["near-wallet-selector-loading"]],decls:5,vars:0,consts:[[1,"lds-ellipsis"]],template:function(e,n){1&e&&(ui(0,"div",0),Ws(1,"div")(2,"div")(3,"div")(4,"div"),Hr())},styles:[".lds-ellipsis[_ngcontent-%COMP%]{position:relative;width:80px;height:80px;margin:auto}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--fg);animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){left:8px;animation:_ngcontent-%COMP%_lds-ellipsis1 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){left:8px;animation:_ngcontent-%COMP%_lds-ellipsis2 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){left:32px;animation:_ngcontent-%COMP%_lds-ellipsis2 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){left:56px;animation:_ngcontent-%COMP%_lds-ellipsis3 .6s infinite}@keyframes _ngcontent-%COMP%_lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes _ngcontent-%COMP%_lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes _ngcontent-%COMP%_lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}"]});class Ym{constructor(){this.accounts=[]}ngOnInit(){var e=this;return(0,ke.Z)(function*(){yield e.initialize().catch(n=>{console.error(n),alert("Failed to initialise wallet selector")})})()}initialize(){var e=this;return(0,ke.Z)(function*(){const n=yield v5({network:"testnet",debug:!0,modules:[TT(),i9(),B5(),j5(),U5(),K5(),z5(),V5(),W5(),G5(),Z5(),Y5(),J5(),nK(),xC({bundle:!1}),IT({projectId:"c8cb6204543639c31aef44ea4837a554",methods:["near_signIn","near_signOut","near_getAccounts","near_signTransaction","near_signTransactions"],metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"]}}),UT(),o9(),(0,s9.h)({contractId:"guest-book.testnet"})]}),r=sU(n,{contractId:a9}),a=n.store.getState();e.accounts=a.accounts,e.accountId=a.accounts.find(y=>y.active)?.accountId||null,window.selector=n,window.modal=r,e.selector=n,e.modal=r})()}}Ym.\u0275fac=function(e){return new(e||Ym)},Ym.\u0275cmp=Ho({type:Ym,selectors:[["near-wallet-selector-wallet-selector"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"selector","accounts","accountId","modal",4,"ngIf"],[3,"selector","accounts","accountId","modal"]],template:function(e,n){1&e&&(Ba(0,Cne,1,0,"near-wallet-selector-loading",0),Ba(1,Ine,1,4,"near-wallet-selector-content",1)),2&e&&(Eo("ngIf",!n.modal||!n.selector),Jo(1),Eo("ngIf",!!n.selector))},dependencies:[cl,Zm,Up]});var Tt=g(18348),xne=g(49965),Jr=g(54284);const Tne=({selector:t,handleWalletClick:e})=>{const[n,r]=(0,Jr.useState)([]),[a,y]=(0,Jr.useState)("");function T(Z){return Z.reduce(($,ie,ue)=>{const{selectedWalletId:he}=t.store.getState(),{name:we,iconUrl:xe,deprecated:Ie}=ie.metadata,Le=ie.id===he;return $.push((0,Tt.jsxs)("li",{tabIndex:0,className:`single-wallet ${a===ie.id?"selected-wallet":""} ${Le?"connected-wallet":""} ${Ie?"deprecated-wallet":""} sidebar ${ie.id}`,onClick:()=>(ie.id===Z[ue].id&&y(ie.id),e(ie)),children:[(0,Tt.jsx)("div",{className:"icon",children:(0,Tt.jsx)("img",{src:xe,alt:we})}),(0,Tt.jsxs)("div",{className:"import-content",children:[(0,Tt.jsx)("div",{className:"title",children:we}),(0,Tt.jsx)("div",{className:"import-type",children:Dn(`modal.exportAccounts.walletTypes.${ie.type}`)})]}),Ie&&(0,Tt.jsx)("div",{className:"warning-triangle",children:(0,Tt.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Tt.jsx)("path",{d:"M4.95215 16.3536L10.2152 5.85657C10.9531 4.38481 13.0538 4.38519 13.7912 5.85723L19.0494 16.3543C19.7156 17.6841 18.7486 19.25 17.2612 19.25H6.74001C5.25228 19.25 4.28535 17.6835 4.95215 16.3536Z",stroke:"#E6B73E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Tt.jsx)("path",{d:"M12 10V12",stroke:"#E6B73E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Tt.jsx)("path",{d:"M12.5 16C12.5 16.2761 12.2761 16.5 12 16.5C11.7239 16.5 11.5 16.2761 11.5 16C11.5 15.7239 11.7239 15.5 12 15.5C12.2761 15.5 12.5 15.7239 12.5 16Z",stroke:"#E6B73E"})]})})]},ie.id)),$},[])}return(0,Jr.useEffect)(()=>{const Z=t.store.observable.subscribe($=>{r($.modules)});return()=>Z.unsubscribe()},[]),(0,Tt.jsx)("div",{children:t.options.optimizeWalletOrder&&t.store.getState().recentlySignedInWallets.length>0?(0,Tt.jsx)("div",{className:"wallet-options-wrapper",children:(0,Tt.jsx)("div",{className:"options-list-section",children:(0,Tt.jsx)("div",{className:"options-list more-options-list-content",children:T(n)})})}):(0,Tt.jsx)("div",{className:"wallet-options-wrapper",children:(0,Tt.jsx)("div",{className:"options-list",children:T(n)})})})},d9=({onClick:t})=>(0,Tt.jsx)("button",{onClick:t,className:"back-button",children:(0,Tt.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Tt.jsx)("path",{d:"M7 13L1 7L7 1",stroke:"#6494EE",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),One=({onClick:t})=>(0,Tt.jsx)("button",{onClick:t,className:"close-button",children:(0,Tt.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"#C1C1C1",children:[(0,Tt.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Tt.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})]})}),gh=({title:t,onCloseModal:e,onBack:n})=>{const r="Get a Wallet"===t?" -open":"";return(0,Tt.jsxs)("div",{className:"nws-modal-header",children:[n&&(0,Tt.jsx)(d9,{onClick:n}),(0,Tt.jsx)("h3",{className:`middleTitle ${r}`,children:t}),(0,Tt.jsx)(One,{onClick:e})]})},Nne=({message:t,module:e,onBack:n,onCloseModal:r})=>(0,Tt.jsxs)(Jr.Fragment,{children:[(0,Tt.jsx)(gh,{title:"",onCloseModal:r,onBack:n}),(0,Tt.jsx)("div",{className:"alert-message connecting-wrapper connecting-wrapper-err",children:(0,Tt.jsxs)("div",{className:"content",children:[(0,Tt.jsx)("div",{className:"icon",children:(0,Tt.jsx)("img",{src:e?.metadata.iconUrl,alt:e?.metadata.name})}),(0,Tt.jsx)("h3",{className:"connecting-name",children:e?.metadata.name}),(0,Tt.jsx)("h4",{children:t})]})})]}),Pne=({module:t,onBack:e,onCloseModal:n})=>(0,Tt.jsxs)(Jr.Fragment,{children:[(0,Tt.jsxs)("div",{className:"nws-modal-header-wrapper",children:[(0,Tt.jsx)(d9,{onClick:e}),(0,Tt.jsx)(gh,{title:"",onCloseModal:n})]}),(0,Tt.jsxs)("div",{className:"wallet-not-installed-wrapper",children:[(0,Tt.jsxs)("div",{className:"wallet-data",children:[(0,Tt.jsx)("div",{className:`wallet-icon-box ${t.id}`,children:(0,Tt.jsx)("img",{src:t.metadata.iconUrl,alt:t.metadata.name})}),(0,Tt.jsx)("p",{children:t.metadata.name})]}),(0,Tt.jsxs)("p",{children:[Dn("modal.install.youllNeedToInstall")," ",t.metadata.name," ",Dn("modal.install.toContinueAfterInstalling"),(0,Tt.jsxs)("span",{className:"refresh-link",onClick:()=>window.location.reload(),children:[" ",Dn("modal.install.refreshThePage")]})]}),(0,Tt.jsx)("div",{className:"action-buttons",children:(0,Tt.jsxs)("button",{className:"middleButton",onClick:()=>{"injected"===t.type&&window.open(t.metadata.downloadUrl,"_blank")},children:[Dn("modal.install.open")," ",t.metadata.name]})})]})]}),Rne=({onCloseModal:t})=>(0,Tt.jsxs)("div",{className:"wallet-home-wrapper",children:[(0,Tt.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Tt.jsx)(gh,{title:Dn("modal.exportAccounts.transferYourAccounts"),onCloseModal:t})}),(0,Tt.jsxs)("div",{className:"wallet-info-wrapper what-wallet-hide",children:[(0,Tt.jsxs)("div",{className:"wallet-what",children:[(0,Tt.jsxs)("svg",{width:"56",height:"57",viewBox:"0 0 56 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Tt.jsx)("rect",{y:"0.5",width:"56",height:"56",rx:"12",fill:"url(#paint0_radial_2563_17897)"}),(0,Tt.jsx)("g",{opacity:"0.7",children:(0,Tt.jsx)("path",{d:"M23 43.5H16.3333C15.4493 43.5 14.6014 43.1488 13.9763 42.5237C13.3512 41.8986 13 41.0507 13 40.1667V16.8333C13 15.9493 13.3512 15.1014 13.9763 14.4763C14.6014 13.8512 15.4493 13.5 16.3333 13.5H23M34.6667 36.8333L43 28.5M43 28.5L34.6667 20.1667M43 28.5H23",stroke:"#568FFC",strokeWidth:"3.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,Tt.jsx)("defs",{children:(0,Tt.jsxs)("radialGradient",{id:"paint0_radial_2563_17897",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(-3.5 79.5) rotate(-47.8271) scale(114.691 121.528)",children:[(0,Tt.jsx)("stop",{stopColor:"#112140"}),(0,Tt.jsx)("stop",{offset:"1",stopColor:"#1D5D72"})]})})]}),(0,Tt.jsxs)("div",{className:"content-side",children:[(0,Tt.jsx)("h3",{children:Dn("modal.exportAccounts.chooseAWallet")}),(0,Tt.jsx)("p",{children:Dn("modal.exportAccounts.selectAWallet")})]})]}),(0,Tt.jsxs)("div",{className:"wallet-what",children:[(0,Tt.jsxs)("svg",{width:"56",height:"57",viewBox:"0 0 56 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Tt.jsx)("rect",{y:"0.5",width:"56",height:"56",rx:"12",fill:"url(#paint0_radial_2563_17904)"}),(0,Tt.jsxs)("g",{opacity:"0.7",children:[(0,Tt.jsx)("path",{d:"M13 28.5C13 20.2157 19.7157 13.5 28 13.5C36.2843 13.5 43 20.2157 43 28.5C43 29.4205 43.7462 30.1667 44.6667 30.1667C45.5871 30.1667 46.3333 29.4205 46.3333 28.5C46.3333 18.3748 38.1252 10.1667 28 10.1667C17.8748 10.1667 9.66667 18.3748 9.66667 28.5C9.66667 29.4205 10.4129 30.1667 11.3333 30.1667C12.2538 30.1667 13 29.4205 13 28.5Z",fill:"#568FFC"}),(0,Tt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38 28.5C38 31.0612 37.0372 33.3975 35.4537 35.1667H42.6434C43.8167 35.1667 44.6152 36.3476 44.0465 37.3738C40.9203 43.0147 34.9061 46.8333 28 46.8333C21.0939 46.8333 15.0796 43.0147 11.9535 37.3738C11.3848 36.3476 12.1833 35.1667 13.3566 35.1667H20.5463C18.9628 33.3975 18 31.0612 18 28.5C18 22.9771 22.4772 18.5 28 18.5C33.5228 18.5 38 22.9771 38 28.5ZM28 35.1667C31.6819 35.1667 34.6667 32.1819 34.6667 28.5C34.6667 24.8181 31.6819 21.8333 28 21.8333C24.3181 21.8333 21.3333 24.8181 21.3333 28.5C21.3333 32.1819 24.3181 35.1667 28 35.1667ZM16.8189 38.5H39.1811C36.4319 41.572 32.4397 43.5 28 43.5C23.5603 43.5 19.5681 41.572 16.8189 38.5Z",fill:"#568FFC"})]}),(0,Tt.jsx)("defs",{children:(0,Tt.jsxs)("radialGradient",{id:"paint0_radial_2563_17904",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(-3.5 79.5) rotate(-47.8271) scale(114.691 121.528)",children:[(0,Tt.jsx)("stop",{stopColor:"#112140"}),(0,Tt.jsx)("stop",{offset:"1",stopColor:"#1D5D72"})]})})]}),(0,Tt.jsxs)("div",{className:"content-side",children:[(0,Tt.jsx)("h3",{children:Dn("modal.exportAccounts.selectYourAccounts")}),(0,Tt.jsx)("p",{children:Dn("modal.exportAccounts.afterDecide")})]})]}),(0,Tt.jsx)("div",{className:"button-spacing"}),(0,Tt.jsx)("div",{className:"middleContainer",children:(0,Tt.jsx)("p",{children:Dn("modal.exportAccounts.disclaimer")})})]})]}),Lne=({hasBalance:t,type:e})=>e===Sl.UNKNOWN?(0,Tt.jsx)("span",{className:"error",children:Dn("modal.exportAccounts.selectAccounts.error")}):e===Sl.LEDGER?(0,Tt.jsx)("span",{className:"warning",children:Dn("modal.exportAccounts.selectAccounts.warningLedger")}):t?null:(0,Tt.jsx)("span",{className:"warning",children:Dn("modal.exportAccounts.selectAccounts.noBalance")}),Fne=({onCloseModal:t,onBack:e,selectedAccounts:n,setSelectedAccounts:r,accountsWithDetail:a,disabledAccounts:y,onNextStep:T,isLoading:Z,buttonLabel:$})=>{const ie=(we,xe)=>{r(xe?[...n,we]:n.filter(Ie=>Ie!==we))},he=n.length===a.length?Dn("modal.exportAccounts.selectAccounts.deselectAll"):Dn("modal.exportAccounts.selectAccounts.selectAll");return(0,Jr.useEffect)(()=>{n.length||r(a.map(({accountId:we})=>we))},[a.length]),(0,Tt.jsxs)(Jr.Fragment,{children:[(0,Tt.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Tt.jsx)(gh,{title:Dn("modal.exportAccounts.selectAccounts.title"),onCloseModal:t,onBack:e})}),(0,Tt.jsx)("div",{className:"account-export connecting-wrapper",children:(0,Tt.jsx)("div",{className:"content",children:Z?(0,Tt.jsx)("div",{className:"connecting-details",children:(0,Tt.jsx)("div",{className:"spinner account-selection-spinner",children:(0,Tt.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR3SURBVHgBpVZ9aJVVGH+e55z33bi7zY9hMz+yMAeNoEIq6A9ZRKQWEsQNFIIpsf5Y9E+GsD9iBEEDMUkDa6ShRKKZYIWiRkaKaUGUGCKOTGMF84PNO99773vOefq9720yK5ZzD/dwPt/nd37P17lEk5Qnuz9roUkKT7T5bNe+QjTNLCHv24h1Xgh+OmtwQYPH2jUXwlnW9NRooqePfLS6MmmQ59cdeEGJlkJZA5MGVecoAwghBYZTVY9ftuaDSy8x8w9fbFl95JZAXuw9dmelkvRAyXxS7wMFryG4bIyWZiqzPgMhaFfGfn3NY3AZG9sPf/Dy8HidZvxkZc/h1pqnPlKey6yspMqUd9jVAEYY6RCGDQTwjGDwGTgAlbwRijV1C9vanz577tT+6r+YrOz5rlXFrQ/qZ+FbDxCfXS5oOgxln4v473f3rbgwdn7FK5/MCaH2eAg6X8g3K2iBMTiBkNJVKbod+ze9mgPZsY/UaicYzCE1HgpZc558olCTjTvWLxv9p1n3bV45iO7T5zq3TU9j9xTOLwQ5D9t48aEYrtGj2P/2BpNS78nZJoRdlDsYd8vphz273lqyhW5Rnlnz3hOe6SEwghvxPUMTVfYe2rpuUOqOkZeIxdSbsSJ8eTIAmXy5tftrMPkzi0C4B2ZDNHp+INvLQURkhYiJ6gDGko376DbEJ8k3mcnYBSeSM2ptL/XGsurNnxfnDIQNwCKADO1845Ef6Tbk0M51g4joMgncDyBmkrtsNEMQovcDxGYsGL2yDNAUxPv0VySs4yxhfeYbabJg0Awg+ILylEB6nKMpSOp0WCR1+QSuD4ELljNDEfyRrdXPCU1BTEgD7pyOzVmC2iBm0KgYAMCEeXovoClIjdKiVdQ3FYbzmatxWRqMPcNsDHyfNWskWk5TkJhNEwVyxA6hLL5clLJsW7voFxa6LiR5CCOeWzo3XFxKtyEdy3tnp7VahAoDp6PEVGvJye09l3P7K9k9WQijXBv4B6WG+0pvD0ybFEBHZ6OPh+/OGaBsIvNRAGp/ZHv1jJeon+omszBkFsr3FhsLB7rev3JLQKVSyfjmaW2BJSavDlqR7c5VrR+4AbLttbkXMehH7gjA8gZiD/tq+Or/ABZ3dUW/J62LcPUGcrW8pKSVFAg6cHz3O0l25qZHa/XGwWPg9aAwwzdZAaDX+7tbNsMYf5+bpaUS0dDQEF8rtsUxCbI5e5KRzGhBMiqNxllKju7d8NOYXjseRBytQngcVDL3wD9H+7vf3YS7mnnzqrZpwSxrwkh04cpM5NTMyJdHbIgaESyxJ6tZ5cDbw3qd0tqVCp25Se/4yYdr5/zm/ehjwvpxZHgN0Wlub0/Yt7awdykqRYFHy6NUQVrBd4o6p6ngrVL2Bo8ksuJqoXzq9Ln9m6rj9U74b6Wjo8OeP082aY5NUxRsYzwDkeFsU+MdUU3U4PG0QtbahqhadDMuHTy4fvS/9EwIUpdeuW/ZiShOipFxURRbNdWETFMRZrCFlEZGkuPHdycTafgLExNiI6YfUpcAAAAASUVORK5CYII=",alt:"loading-icon"})})}):(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsxs)("div",{className:"account-selection-container",children:[(0,Tt.jsx)("span",{className:"account-select-all",onClick:()=>{n.length!==a.length?r(a.map(({accountId:we})=>we)):r([])},children:he}),(0,Tt.jsx)("div",{className:"account-selection",children:a.map(({accountId:we})=>(0,Tt.jsx)("div",{className:"account-selection-row",children:(0,Tt.jsxs)("div",{className:"checkbox",children:[(0,Tt.jsx)("input",{onChange:xe=>{ie(we,xe.target.checked)},checked:n.includes(we),type:"checkbox",id:we,name:we,value:we}),(0,Tt.jsx)("label",{htmlFor:we,title:we,children:(0,Tt.jsx)("span",{className:"label",children:we})})]})},we))}),y.length>0&&(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsx)("span",{className:"account-unavailable",children:Dn("modal.exportAccounts.selectAccounts.unavailable")}),(0,Tt.jsx)("div",{className:"account-selection",children:y.map(({accountId:we,type:xe,hasBalance:Ie})=>(0,Tt.jsx)("div",{className:"account-selection-row",children:(0,Tt.jsxs)("div",{className:"checkbox",children:[(0,Tt.jsx)("input",{onChange:Le=>{ie(we,Le.target.checked)},checked:n.includes(we),type:"checkbox",id:we,name:we,value:we,disabled:!0}),(0,Tt.jsxs)("label",{htmlFor:we,title:we,children:[(0,Tt.jsx)("span",{className:"account-id",children:we}),Lne({hasBalance:Ie,type:xe})]})]})},we))})]}),(0,Tt.jsx)("div",{className:"filler"})]}),(0,Tt.jsx)("button",{className:"middleButton account-export-button",onClick:T,disabled:0===n.length,children:Dn($)})]})})})]})};var Bne=g(40489),hw=g.n(Bne),pw=g(47768);const Kne=({children:t,copy:e,onClick:n,id:r})=>{const[a,y]=(0,Jr.useState)(!1);return(0,Tt.jsxs)("button",{title:Dn("component.clickToCopy.tooltip"),className:"click-to-copy",onClick:()=>{y(!0),setTimeout(()=>y(!1),2e3);const Z=document.createElement("textarea");Z.innerHTML=e,document.body.appendChild(Z),Z.select();const $=document.execCommand("copy");return document.body.removeChild(Z),n&&n(e),$},id:r,children:[t,(0,Tt.jsx)("div",{className:"copy-success"+(a?" show":""),children:Dn("component.clickToCopy.label")})]})},zne=({onNextStep:t,hasCopied:e,setHasCopied:n,onCloseModal:r,onBack:a,onPassphraseSave:y})=>{const[T,Z]=(0,Jr.useState)("");(0,Jr.useEffect)(()=>{const ue=(()=>{const t=hw().randomBytes(24);return(0,pw.encodeBase64)(t)})();Z(ue)},[]);return(0,Tt.jsxs)(Jr.Fragment,{children:[(0,Tt.jsx)(gh,{title:Dn("modal.exportAccounts.getPassphrase.title"),onCloseModal:r,onBack:a}),(0,Tt.jsx)("div",{className:"account-export",children:(0,Tt.jsxs)("div",{className:"content",children:[(0,Tt.jsx)("h4",{className:"passphrase-title",children:Dn("modal.exportAccounts.getPassphrase.desc")}),(0,Tt.jsx)(Kne,{copy:T,id:"passphraseButton",children:(0,Tt.jsx)("div",{className:"passphrase-text",children:T})}),(0,Tt.jsx)("label",{htmlFor:"passphraseButton",className:"passphrase-label",children:Dn("modal.exportAccounts.getPassphrase.label")}),(0,Tt.jsx)("div",{className:"filler"}),(0,Tt.jsx)("div",{className:"passphrase-check-container",children:(0,Tt.jsxs)("div",{className:"checkbox",children:[(0,Tt.jsx)("input",{onChange:ue=>{n(ue.target.checked),y(T)},checked:e,type:"checkbox",id:"passphrase-check",name:"passphrase-check",value:"passphrase-check"}),(0,Tt.jsx)("label",{htmlFor:"passphrase-check",children:(0,Tt.jsx)("span",{className:"label",children:Dn("modal.exportAccounts.getPassphrase.checkLabel")})})]})}),(0,Tt.jsx)("button",{className:"middleButton account-export-button",onClick:()=>{t()},disabled:!e,children:Dn("modal.exportAccounts.getPassphrase.transferButton")})]})})]})},Vne=({src:t,name:e,alertMessage:n,onCloseModal:r,onBack:a})=>(0,Tt.jsxs)("div",{className:"account-export connecting-wrapper",children:[(0,Tt.jsx)(gh,{title:"No interface found",onCloseModal:r,onBack:a}),(0,Tt.jsxs)("div",{className:"content",children:[(0,Tt.jsx)("div",{className:"icon",children:(0,Tt.jsx)("img",{src:t,alt:e})}),(0,Tt.jsx)("h3",{className:"connecting-name",children:e}),(0,Tt.jsx)("p",{children:n})]})]}),Hne=({onComplete:t,onBack:e,onCloseModal:n,onStartOver:r})=>(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Tt.jsx)(gh,{title:Dn("modal.exportAccounts.complete.title"),onCloseModal:n,onBack:e})}),(0,Tt.jsxs)("div",{className:"complete-desc",children:[(0,Tt.jsx)("h4",{className:"content",children:Dn("modal.exportAccounts.complete.descOne")}),(0,Tt.jsx)("h4",{className:"content",children:Dn("modal.exportAccounts.complete.descTwo")})]}),(0,Tt.jsx)("button",{className:"middleButton account-export-button secondary",onClick:r,children:Dn("modal.exportAccounts.complete.startOverButton")}),(0,Tt.jsx)("button",{className:"middleButton account-export-button",onClick:()=>{t(),n()},children:Dn("modal.exportAccounts.complete.button")})]}),$a_ACCOUNT_SELECTION="ACCOUNT_SELECTION",$a_GET_PASSPHRASE="GET_PASSPHRASE",$a_NO_INTERFACE="NO_INTERFACE",$a_COMPLETE="COMPLETE",Sl={LEDGER:"Ledger",FULL_ACCESS_KEY:"Full Access Key",MULTI_SIG:"Multi-Sig",UNKNOWN:"Unknown"},Wne=t=>{if("FullAccess"===t)return Sl.FULL_ACCESS_KEY;if(t?.FunctionCall?.method_names.includes("__wallet__metadata"))return Sl.LEDGER;const e=["add_request","add_request_and_confirm","delete_request","confirm"];return t?.FunctionCall?.method_names.every(n=>e.includes(n))?Sl.MULTI_SIG:Sl.UNKNOWN},Gne=function(){var t=(0,ke.Z)(function*({provider:e,accountId:n,publicKey:r}){try{const{permission:a}=yield e.query({request_type:"view_access_key",account_id:n,public_key:r,finality:"final"});return{type:Wne(a)}}catch{return{type:Sl.UNKNOWN}}});return function(n){return t.apply(this,arguments)}}(),Zne=function(){var t=(0,ke.Z)(function*({provider:e,accountId:n}){try{const{amount:r}=yield e.query({request_type:"view_account",finality:"final",account_id:n});return{hasBalance:!new(fr())(r).isZero()}}catch{return{hasBalance:!1}}});return function(n){return t.apply(this,arguments)}}(),Yne=({alertMessage:t,module:e,onCloseModal:n,onWarning:r,accounts:a,selector:y,wallet:T,onBack:Z,onComplete:$})=>{const[ie,ue]=(0,Jr.useState)([]),[he,we]=(0,Jr.useState)(!1),[xe,Ie]=(0,Jr.useState)([]),[Le,je]=(0,Jr.useState)([]),[Ue,$e]=(0,Jr.useState)(""),[Je,ht]=(0,Jr.useState)({});(0,Jr.useEffect)(()=>{!function(){var Bu=(0,ke.Z)(function*(){try{const{buildImportAccountsUrl:Ps,importAccountsInSecureContext:_l}=yield T.wallet();ht({buildImportAccountsUrl:Ps,importAccountsInSecureContext:_l}),!Ps&&!_l&&r()}catch{r()}});return function(){return Bu.apply(this,arguments)}}()()},[e?.metadata.name,t]);const{network:xt}=y.options,Wt=new lr.providers.JsonRpcProvider({url:xt.nodeUrl}),[An,rn]=(0,Jr.useState)(!1);(0,Jr.useEffect)(()=>{const eu=function(){var Bu=(0,ke.Z)(function*(){we(!0);const Ps=yield Promise.all(a.map(function(){var Ml=(0,ke.Z)(function*({accountId:ju,privateKey:zp}){const gw=lr.utils.KeyPair.fromString(zp),{type:vS}=yield Gne({provider:Wt,accountId:ju,publicKey:gw.getPublicKey().toString()}),{hasBalance:Vp}=yield Zne({provider:Wt,accountId:ju});return{accountId:ju,privateKey:zp,type:vS,hasBalance:Vp}});return function(ju){return Ml.apply(this,arguments)}}())),_l=Ps.filter(({hasBalance:Ml,type:ju})=>Ml&&ju===Sl.FULL_ACCESS_KEY);Ie(_l);const Xm=Ps.filter(({hasBalance:Ml,type:ju})=>!Ml||ju!==Sl.FULL_ACCESS_KEY);je(Xm),we(!1)});return function(){return Bu.apply(this,arguments)}}();0===xe.length&&eu()},[Je.buildImportAccountsUrl,Je.importAccountsInSecureContext]);const[un,xn]=(0,Jr.useState)($a_ACCOUNT_SELECTION);(0,Jr.useEffect)(()=>{xn(t?$a_NO_INTERFACE:$a_ACCOUNT_SELECTION)},[t]);const mr=()=>{xn($a_GET_PASSPHRASE)},{buildImportAccountsUrl:ar,importAccountsInSecureContext:Er}=Je,Ko=function(){var eu=(0,ke.Z)(function*(){Er?yield Er({accounts:a.filter(({accountId:Bu})=>ie.includes(Bu))}):xn($a_NO_INTERFACE)});return function(){return eu.apply(this,arguments)}}();return(0,Tt.jsxs)(Jr.Fragment,{children:[un===$a_NO_INTERFACE&&(0,Tt.jsx)(Vne,{src:e?.metadata.iconUrl,name:e?.metadata.name,alertMessage:t,onBack:Z,onCloseModal:n}),un===$a_ACCOUNT_SELECTION&&(0,Tt.jsx)(Fne,{onCloseModal:n,onBack:Z,selectedAccounts:ie,setSelectedAccounts:ue,accountsWithDetail:xe,disabledAccounts:Le,onNextStep:()=>{"injected"!==T.type||T.metadata.useUrlAccountImport?mr():(Ko(),xn($a_COMPLETE))},isLoading:he,buttonLabel:"injected"===T.type?"modal.exportAccounts.getPassphrase.button":"modal.exportAccounts.selectAccounts.button"}),un===$a_GET_PASSPHRASE&&(0,Tt.jsx)(zne,{onNextStep:()=>{const eu=(({accountData:t,secretKey:e})=>{if(!e)throw new Error("Secret key is required");try{const n=(0,pw.decodeBase64)(Buffer.from(e).toString("base64")),r=(0,pw.decodeUTF8)(JSON.stringify(t)),a=hw().randomBytes(hw().secretbox.nonceLength),y=hw().secretbox(r,a,n),T=new Uint8Array(a.length+y.length);return T.set(a),T.set(y,a.length),(0,pw.encodeBase64)(T)}catch{throw new Error("Unable to encrypt account data")}})({accountData:a.filter(({accountId:Ps})=>ie.includes(Ps)),secretKey:Ue});if(("browser"===T.type||T.metadata.useUrlAccountImport)&&ar){const Ps=`${ar()}#${eu}`;window.open(Ps,"_blank")}xn($a_COMPLETE)},hasCopied:An,setHasCopied:rn,onCloseModal:n,onBack:()=>xn($a_ACCOUNT_SELECTION),onPassphraseSave:$e}),un===$a_COMPLETE&&(0,Tt.jsx)(Hne,{onCloseModal:n,onBack:mr,onComplete:()=>{$&&$({accounts:ie,walletName:e?.metadata.name||"Unknown"})},onStartOver:Z})]})},Jne=t=>{switch(t){case"dark":return"dark-theme";case"light":return"light-theme";default:return""}},Qne=({selector:t,options:e,visible:n,hide:r})=>{const[a,y]=(0,Jr.useState)({name:"WalletHome"}),[T,Z]=(0,Jr.useState)(null),[$,ie]=(0,Jr.useState)(),ue=()=>{y({name:"WalletHome"})};(0,Jr.useEffect)(()=>{y({name:"WalletHome"});const{selectedWalletId:Ie,modules:Le}=t.store.getState();if(Ie){const je=Le.find(Ue=>Ue.id===Ie);ie(je)}},[n]);const he=(0,Jr.useCallback)(()=>{Z(null),ue(),r()},[r]);(0,Jr.useEffect)(()=>{const Ie=Le=>{"Escape"===Le.key&&he()};return window.addEventListener("keydown",Ie),()=>window.removeEventListener("keydown",Ie)},[he]);const we=function(){var Ie=(0,ke.Z)(function*(Le){Z(null),ie(Le);try{const{deprecated:je,available:Ue}=Le.metadata;return"injected"!==Le.type||Ue?je?(Z(`${Le.metadata.name} is deprecated. Please select another wallet.`),void y({name:"AlertMessage",params:{module:Le}})):void y({name:"ExportAccounts",params:{module:Le}}):void y({name:"WalletNotInstalled",params:{module:Le}})}catch(je){const{name:Ue}=Le.metadata,$e=je instanceof Error?je.message:"Something went wrong";Z(`Failed to sign in with ${Ue}: ${$e}`),y({name:"AlertMessage",params:{module:Le}})}});return function(je){return Ie.apply(this,arguments)}}(),xe=(0,Jr.useCallback)(()=>{$&&(Z(`${$?.metadata.name} ${Dn("modal.exportAccounts.warning")}`),y({name:"AlertMessage",params:{module:$}}))},[$]);return n?(0,Tt.jsxs)("div",{className:`nws-modal-wrapper ${Jne(e?.theme)} ${n?"open":""}`,children:[(0,Tt.jsx)("div",{className:"nws-modal-overlay",onClick:he}),(0,Tt.jsxs)("div",{className:"nws-modal",children:[(0,Tt.jsxs)("div",{className:"modal-left",children:[(0,Tt.jsx)("div",{className:"modal-left-title",children:(0,Tt.jsx)("h2",{children:Dn("modal.exportAccounts.chooseAWallet")})}),(0,Tt.jsx)(Tne,{handleWalletClick:Ie=>{we(Ie)},selector:t})]}),(0,Tt.jsx)("div",{className:"modal-right",children:(0,Tt.jsxs)("div",{className:"nws-modal-body account-export-body",children:["AlertMessage"===a.name&&T&&(0,Tt.jsx)(Nne,{message:T,module:a.params?.module,onBack:()=>{Z(null),ue()},onCloseModal:he}),"WalletNotInstalled"===a.name&&(0,Tt.jsx)(Pne,{module:a.params?.module,onBack:()=>{ue()},onCloseModal:he}),"WalletHome"===a.name&&(0,Tt.jsx)(Rne,{onCloseModal:he}),"ExportAccounts"===a.name&&(0,Tt.jsx)(Yne,{module:a.params?.module,alertMessage:T,onCloseModal:he,onWarning:xe,onBack:ue,selector:t,accounts:e.accounts,wallet:$,onComplete:e?.onComplete})]})})]})]}):null};let yS=null,mS=null;function $ne(t,e){1&t&&Ws(0,"near-wallet-selector-loading")}function ere(t,e){if(1&t){const n=dy();ui(0,"div")(1,"button",1),Qi("click",function(){Li(n);return No(ja().show())}),_i(2,"Open Modal"),Hr(),ui(3,"p"),_i(4," The Export Accounts modal assists users in migrating their accounts to any Wallet Selector wallet supporting account imports. Any sensitive data in transit during this process will be encrypted with a randomly-generated password which the user will be required to copy down and use in the account import process on the target wallet. "),Hr()()}}class Jm{constructor(){this.accounts=[]}ngOnInit(){var e=this;return(0,ke.Z)(function*(){yield e.initialize().catch(n=>{console.error(n),alert("Failed to initialise wallet selector")})})()}initialize(){var e=this;return(0,ke.Z)(function*(){const n=yield v5({network:"testnet",debug:!0,modules:[TT(),i9(),B5(),j5(),U5(),K5(),z5(),V5(),W5(),G5(),Z5(),Y5(),J5(),xC({bundle:!1}),IT({projectId:"c4f79cc...",metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"]}}),UT(),o9(),(0,s9.h)({contractId:"guest-book.testnet"})]}),r=((t,e)=>{if(!mS){const r=document.body,a=document.createElement("div");a.id="near-wallet-selector-modal",r.appendChild(a),mS=(0,xne.s)(a)}const n=r=>{mS.render((0,Tt.jsx)(Qne,{selector:t,options:e,visible:r,hide:()=>n(!1)}))};return yS||(yS={show:()=>{n(!0)},hide:()=>{n(!1)}}),yS})(n,{accounts:[],onComplete:y=>{console.log("Transfer Completed: ",y)}}),a=n.store.getState();e.accounts=a.accounts,e.accountId=a.accounts.find(y=>y.active)?.accountId||null,window.exportSelector=n,window.exportModal=r,e.exportSelector=n,e.exportModal=r})()}show(){this.exportModal.show()}}function tre(t,e){1&t&&Ws(0,"near-wallet-selector-wallet-selector")}function nre(t,e){1&t&&Ws(0,"near-wallet-selector-wallet-selector-export")}Jm.\u0275fac=function(e){return new(e||Jm)},Jm.\u0275cmp=Ho({type:Jm,selectors:[["near-wallet-selector-wallet-selector-export"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"click"]],template:function(e,n){1&e&&(Ba(0,$ne,1,0,"near-wallet-selector-loading",0),Ba(1,ere,5,0,"div",0)),2&e&&(Eo("ngIf",!n.exportModal||!n.exportSelector),Jo(1),Eo("ngIf",n.exportModal||n.exportSelector))},dependencies:[cl,Up]});class Qm{}Qm.\u0275fac=function(e){return new(e||Qm)},Qm.\u0275cmp=Ho({type:Qm,selectors:[["near-wallet-selector-root"]],decls:8,vars:4,consts:[[1,"title-container"],[3,"click"],[4,"ngIf"]],template:function(e,n){1&e&&(ui(0,"main")(1,"div",0)(2,"h1"),_i(3),Hr(),ui(4,"button",1),Qi("click",function(){return n.showImport=!n.showImport}),_i(5),Hr()(),Ba(6,tre,1,0,"near-wallet-selector-wallet-selector",2),Ba(7,nre,1,0,"near-wallet-selector-wallet-selector-export",2),Hr()),2&e&&(Jo(3),v1(n.showImport?"Export Account":"NEAR Guest Book"),Jo(2),F0(" ",n.showImport?"Back to Log in":"Try Export Account"," "),Jo(1),Eo("ngIf",!n.showImport),Jo(1),Eo("ngIf",n.showImport))},dependencies:[cl,Ym,Jm]});class Kp{}Kp.\u0275fac=function(e){return new(e||Kp)},Kp.\u0275mod=Bs({type:Kp,bootstrap:[Qm]}),Kp.\u0275inj=Ls({imports:[pf,_f]}),JF().bootstrapModule(Kp).catch(t=>console.error(t))},32184:(re,u,g)=>{"use strict";g.r(u),g.d(u,{createAction:()=>v,signTransactions:()=>b});var p=g(98538),D=g(71836);const{transactions:w,utils:_}=D,v=M=>{switch(M.type){case"CreateAccount":return w.createAccount();case"DeployContract":{const{code:E}=M.params;return w.deployContract(E)}case"FunctionCall":{const{methodName:E,args:A,gas:P,deposit:x}=M.params;return w.functionCall(E,A,new p.BN(P),new p.BN(x))}case"Transfer":{const{deposit:E}=M.params;return w.transfer(new p.BN(E))}case"Stake":{const{stake:E,publicKey:A}=M.params;return w.stake(new p.BN(E),_.PublicKey.from(A))}case"AddKey":{const{publicKey:E,accessKey:A}=M.params;return w.addKey(_.PublicKey.from(E),(M=>{if("FullAccess"===M)return w.fullAccessKey();const{receiverId:E,methodNames:A=[]}=M,P=M.allowance?new p.BN(M.allowance):void 0;return w.functionCallAccessKey(E,A,P)})(A.permission))}case"DeleteKey":{const{publicKey:E}=M.params;return w.deleteKey(_.PublicKey.from(E))}case"DeleteAccount":{const{beneficiaryId:E}=M.params;return w.deleteAccount(E)}default:throw new Error("Invalid action type")}};var m=g(49671);const b=function(){var M=(0,m.Z)(function*(E,A,P){const x=new D.providers.JsonRpcProvider({url:P.nodeUrl}),N=[];for(let F=0;Fv(Q)),Y=D.transactions.createTransaction(E[F].signerId,D.utils.PublicKey.from(L.toString()),E[F].receiverId,j.nonce+F+1,W,D.utils.serialize.base_decode(z.header.hash)),G=yield D.transactions.signTransaction(Y,A,E[F].signerId,P.networkId);N.push(G[1])}return N});return function(A,P,x){return M.apply(this,arguments)}}()},35469:re=>{"use strict";re.exports=function u({mustBeMetaMask:g=!1,silent:p=!1,timeout:D=3e3}={}){!function _(){if("boolean"!=typeof g)throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if("boolean"!=typeof p)throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if("number"!=typeof D)throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}();let w=!1;return new Promise(l=>{function v(){if(w)return;w=!0,window.removeEventListener("ethereum#initialized",v);const{ethereum:m}=window;!m||g&&!m.isMetaMask?(!p&&console.error("@metamask/detect-provider:",g&&m?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),l(null)):l(m)}window.ethereum?v():(window.addEventListener("ethereum#initialized",v,{once:!0}),setTimeout(()=>{v()},D))})}},73597:(re,u,g)=>{"use strict";u.h=void 0;var D=g(1310);Object.defineProperty(u,"h",{enumerable:!0,get:function(){return D.setupMintbaseWallet}})},25697:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(E,A,P,x){void 0===x&&(x=P);var N=Object.getOwnPropertyDescriptor(A,P);(!N||("get"in N?!A.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return A[P]}}),Object.defineProperty(E,x,N)}:function(E,A,P,x){void 0===x&&(x=P),E[x]=A[P]}),D=this&&this.__setModuleDefault||(Object.create?function(E,A){Object.defineProperty(E,"default",{enumerable:!0,value:A})}:function(E,A){E.default=A}),w=this&&this.__importStar||function(E){if(E&&E.__esModule)return E;var A={};if(null!=E)for(var P in E)"default"!==P&&Object.prototype.hasOwnProperty.call(E,P)&&p(A,E,P);return D(A,E),A},_=this&&this.__awaiter||function(E,A,P,x){return new(P||(P=Promise))(function(F,L){function z(Y){try{W(x.next(Y))}catch(G){L(G)}}function j(Y){try{W(x.throw(Y))}catch(G){L(G)}}function W(Y){Y.done?F(Y.value):function N(F){return F instanceof P?F:new P(function(L){L(F)})}(Y.value).then(z,j)}W((x=x.apply(E,A||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.MintbaseWallet=u.TransactionSuccessEnum=void 0;const l=w(g(71836)),v=g(52107),m=g(32184);var E;(E=u.TransactionSuccessEnum||(u.TransactionSuccessEnum={})).MINT="mint",E.TRANSFER="transfer",E.BURN="burn",E.DEPLOY_STORE="deploy-store",E.MAKE_OFFER="make-offer",E.REVOKE_MINTER="revoke-minter",E.ADD_MINTER="add-minter",E.TRANSFER_STORE_OWNERSHIP="transfer-store-ownership",E.AUCTION_LIST="list",E.SIMPLE_SALE_LIST="simple-sale-list",E.UNLIST="unlist",E.TAKE_OFFER="take-offer",E.WITHDRAW_OFFER="withdraw-offer";u.MintbaseWallet=({metadata:E,options:A,successUrl:P,failureUrl:x,contractId:N,callback:F,networkId:L})=>_(void 0,void 0,void 0,function*(){const j=yield _(void 0,void 0,void 0,function*(){if(void 0!==typeof window){const{connect:k,WalletConnection:B,keyStores:I}=l,f={networkId:L,keyStore:new I.BrowserLocalStorageKeyStore,nodeUrl:A.network.nodeUrl,walletUrl:E.walletUrl,headers:{}},se=new URL(window.location.href).searchParams.get("account_id");se&&!N&&localStorage.setItem("mintbase-wallet_wallet_auth_key",JSON.stringify({accountId:se,allKeys:[]}));const oe=new B(yield k(f),"mintbase-wallet");return localStorage.setItem("mintbase-wallet:callback_url",F),{wallet:oe}}return null});let W;const J=k=>{if(k&&k!==j.wallet.getAccountId())throw new Error(`Cannot sign transactions for ${k} while signed in as ${W}`)},d=()=>_(void 0,void 0,void 0,function*(){var k;const B=j.wallet.getAccountId(),I=j.wallet.account();if(!B||!I)return[];const f=window.localStorage.getItem("mintbase-wallet:account-creation-data");return[{accountId:B,publicKey:null===(k=JSON.parse(f))||void 0===k?void 0:k.devicePublicKey}]}),S=k=>(W=k,window.localStorage.setItem("mintbase-wallet:activeAccountId",k),null);return{getAccountId:()=>W,isSignedIn:()=>_(void 0,void 0,void 0,function*(){return!!W}),signIn:()=>_(void 0,void 0,void 0,function*(){var k;const B=yield d(),I=encodeURI(null===(k=window?.location)||void 0===k?void 0:k.href);return B.length?B:(yield j.wallet.requestSignIn({methodNames:[],successUrl:P||I,failureUrl:x||I,contractId:N}),d())}),signOut:()=>_(void 0,void 0,void 0,function*(){window.localStorage.removeItem("mintbase-wallet:account-data"),j.wallet.isSignedIn()&&j.wallet.signOut()}),signAndSendTransaction:({receiverId:k,actions:B,signerId:I,callbackUrl:f})=>_(void 0,void 0,void 0,function*(){if(J(I),!k&&!N)throw new Error("No receiver found to send the transaction to");const{cbUrl:R}=(0,v.getCallbackUrl)(f??""),se=R||P;if(!N){const oe=new URL(`${E.walletUrl}/sign-transaction`),de=JSON.stringify([{receiverId:k,signerId:I,actions:B}]),Ce=encodeURIComponent(de);oe.searchParams.set("transactions_data",Ce),oe.searchParams.set("callback_url",se),window.location.assign(oe.toString())}return j.wallet.account().signAndSendTransaction({receiverId:k||N,actions:B.map(oe=>(0,m.createAction)(oe)),walletCallbackUrl:se})}),verifyOwner:()=>_(void 0,void 0,void 0,function*(){throw new Error(`The verifyOwner method is not supported by ${E.name}`)}),signMessage:()=>_(void 0,void 0,void 0,function*(){throw new Error(`The signMessage method is not supported by ${E.name}`)}),getAvailableBalance:()=>_(void 0,void 0,void 0,function*(){throw`The getAvailableBalance method is not supported by ${E.name}`}),getAccounts:d,switchAccount:k=>_(void 0,void 0,void 0,function*(){return S(k),null}),signAndSendTransactions:({transactions:k,callbackUrl:B})=>_(void 0,void 0,void 0,function*(){if(!j.wallet.isSignedIn())throw new Error("Wallet not signed in");const{cbUrl:I}=(0,v.getCallbackUrl)(B??"");for(const{signerId:ee}of k)J(ee);const f=JSON.stringify(k),R=encodeURIComponent(f),se=new URL(`${E.walletUrl}/sign-transaction`);se.searchParams.set("transactions_data",R),se.searchParams.set("callback_url",I),window.location.assign(se.toString())})}})},1310:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(v,m,b,M){return new(b||(b=Promise))(function(A,P){function x(L){try{F(M.next(L))}catch(z){P(z)}}function N(L){try{F(M.throw(L))}catch(z){P(z)}}function F(L){L.done?A(L.value):function E(A){return A instanceof b?A:new b(function(P){P(A)})}(L.value).then(x,N)}F((M=M.apply(v,m||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.setupMintbaseWallet=void 0;const D=g(25697),w=g(52107),_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAnySURBVHgB7Z0HjBVFHMa/B/YK9u6BvUSwd8EeGyrWxMKJRk3sRBNb4NDYGyQaje3EXqJCrIkN7N2zS2gHhCJVaujnfDe37szcvvd273Zv/27mlyz3Zt6+t7z9dqd+/9kSImhqauqi/vRTW2+19VRbDTxp0KC2RrUNL5VKw6J2KLkZSozT1J96tXWBJ0smqG2wK0wnM6HEeEj9eRNejI6gm9rq1TkfZGb+d4e0vFEHTx48pO6UAXzRLIgSoxa6mPLkQ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ZDQLmICU59R51ZticCqUYQZRZTSnTO+7r/WKos3/rYTXCB0ophg0UdfXR4tBuECm6+mi10oA6QrCIsGE8Rs88ZVgvB6DKk2S1h9cjN+EVzptPJVgMI45G8giT8AjK9IV5Mcfw9f0zMaZ/qRgjLloD1xt1KRSfEcARefTdQJ4V1ZzS3YA6Qpinpgk9spyT7+Jy6xZdjrusekgMSnc4ypMJ3mShe3nzrXTNDUkYfXVK39f3OOusQbyJl1BTCsnrTtx4SOJTExHehzcuI647nkz8olFWNz4kAxJVxA38JFLsVaDwjHCNaAtTvIjj7TT9TEefM0murtoP1fBzpl0BWHHz+SBB4C//iq/P08K2//mag1J7w5y8MF2McfO36uvlt+fFTj7KOZAJ+9uM24wJ9IV5JBDbFchI6No92dfhCfB3Nhb5vIUZq+Znl7GfbeFK68MX/P7b7lFhw3w2VTmcdkAYDy8+QAwFlftMXunSPpDJ6zMGezvLlLM4ExegeuuC0ye3LrS50mh3T/pkIkJn2NoFn8BrBu4di+HatjfcI971llSnpaQ0eAiV5LmUEbcJ91wmINBMr16oV1wOIaicDwtDhSDS3kwCEcGGYUjcLCOznRGQVXqdfM9VqQc9mivGISdTAbxV5vn4Hu8U7lyhBwxmsk+YIdNWq5fwnWp2JOfN09PELFFxvrGbSGlBe9SLsrPJ0VzfI1FFdfD4jA7V4DgIGi1YZ2Op2APJ/7/U7CHExcACtIIjxQaKEgDPFKYSEFGwSMB1uVvslLnooE0RnWFJ08mlEql7p3UP/+oRH948oR3Rx1fNLeylCh0GgyBJw8oxmClwbNMWN1ZVXzVqT8D3XxPZlCMoUqM64KMVideiVILLUoNvDBZQSE4XdlfiTHCfKPsCW8Rpg+0MG1c1cXj0AjdzRiptmdb6m+LfwEGoUIy8K/6BwAAAABJRU5ErkJggg==";u.setupMintbaseWallet=function l({walletUrl:v="",deprecated:m=!1,successUrl:b="",failureUrl:M="",callbackUrl:E="",contractId:A=""}={}){return P=>p(this,void 0,void 0,function*(){return{id:"mintbase-wallet",type:"browser",metadata:{name:"Mintbase Wallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:_,deprecated:m,available:!0,successUrl:b,failureUrl:M,walletUrl:(0,w.resolveWalletUrl)(P.options.network.networkId,v)},init:N=>(0,D.MintbaseWallet)(Object.assign({callback:E,networkId:P.options.network.networkId,successUrl:b,failureUrl:M,contractId:A},N))}})}},52107:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.resolveWalletUrl=u.getCallbackUrl=u.checkCallbackUrl=void 0;const g=w=>{function _(l){return/^(https?|ftp|http?):\/\/[^\s/$.?#].[^\s]*$/.test(l)}if(!(null!==w&&w.length>0)){const l=localStorage.getItem("mintbase-wallet:callback_url");return _(l)?l:(console.warn("We recommend you to set the callbackUrl property on setupMintbaseWallet \n read more here: \n https://docs.mintbase.xyz/dev/mintbase-sdk-ref/wallet#setupmintbasewallet \n \n further help available on our telegram channel: \n https://t.me/mintdev"),new URL(window.location.href).toString())}return _(w)?w.startsWith("https://")||w.startsWith("http://")?w.endsWith("/")?w.slice(0,-1):w:new URL(window.location.href).toString():(console.error("callbackUrl set with wrong format. please use an URL with http:// or https:// instead.Further help available on our telegram channel: https://t.me/mintdev"),new URL(window.location.href).toString())};u.checkCallbackUrl=g;u.getCallbackUrl=w=>{var _,l,v,m,b,M;if(void 0!==typeof window){let E="";null!==(l=null===(_=window?.mbjs)||void 0===_?void 0:_.keys)&&void 0!==l&&l.callbackUrl&&(null===(m=null===(v=window?.mbjs)||void 0===v?void 0:v.keys)||void 0===m?void 0:m.callbackUrl.length)>0&&(E=null===(M=null===(b=window?.mbjs)||void 0===b?void 0:b.keys)||void 0===M?void 0:M.callbackUrl);const A=(null==localStorage?void 0:localStorage.getItem("mintbase-wallet:callback_url"))||E;return{cbUrl:g(w??A)}}return null};u.resolveWalletUrl=(w,_)=>{if(_)return _;switch(w){case"mainnet":return"https://wallet.mintbase.xyz";case"testnet":return"https://testnet.wallet.mintbase.xyz/";default:throw new Error("Invalid wallet url")}}},15139:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(te,C,o,s){return new(o||(o=Promise))(function(h,S){function k(f){try{I(s.next(f))}catch(R){S(R)}}function B(f){try{I(s.throw(f))}catch(R){S(R)}}function I(f){f.done?h(f.value):function d(h){return h instanceof o?h:new o(function(S){S(h)})}(f.value).then(k,B)}I((s=s.apply(te,C||[])).next())})},D=this&&this.__importDefault||function(te){return te&&te.__esModule?te:{default:te}};Object.defineProperty(u,"__esModule",{value:!0}),u.Account=void 0;const w=g(29761),_=g(1656),l=g(38445),v=g(17527),m=g(41166),b=D(g(98538)),M=g(21531),{addKey:E,createAccount:A,deleteAccount:P,deleteKey:x,deployContract:N,fullAccessKey:F,functionCall:L,functionCallAccessKey:z,stake:j,transfer:W}=l.actionCreators;function q(te){return JSON.parse(Buffer.from(te).toString())}function J(te){return Buffer.from(JSON.stringify(te))}class H{constructor(C,o){this.accessKeyByPublicKeyCache={},this.connection=C,this.accountId=o}state(){return p(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(C,o){return p(this,void 0,void 0,function*(){const s=yield this.findAccessKey(C,o);if(!s)throw new v.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:d}=s,S=(yield this.connection.provider.block({finality:"final"})).header.hash,k=d.nonce.add(new b.default(1));return yield(0,l.signTransaction)(C,k,o,(0,M.baseDecode)(S),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:C,actions:o,returnError:s}){return p(this,void 0,void 0,function*(){let d,h;const S=yield(0,_.exponentialBackoff)(500,12,1.5,()=>p(this,void 0,void 0,function*(){[d,h]=yield this.signTransaction(C,o);const k=h.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(h)}catch(B){if("InvalidNonce"===B.type)return(0,m.logWarning)(`Retrying transaction ${C}:${(0,M.baseEncode)(d)} with new nonce.`),delete this.accessKeyByPublicKeyCache[k.toString()],null;if("Expired"===B.type)return(0,m.logWarning)(`Retrying transaction ${C}:${(0,M.baseEncode)(d)} due to expired block hash`),null;throw B.context=new v.ErrorContext((0,M.baseEncode)(d)),B}}));if(!S)throw new v.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,m.printTxOutcomeLogsAndFailures)({contractId:h.transaction.receiverId,outcome:S}),!s&&"object"==typeof S.status&&"object"==typeof S.status.Failure&&null!==S.status.Failure)throw S.status.Failure.error_message&&S.status.Failure.error_type?new v.TypedError(`Transaction ${S.transaction_outcome.id} failed. ${S.status.Failure.error_message}`,S.status.Failure.error_type):(0,m.parseResultError)(S);return S})}findAccessKey(C,o){return p(this,void 0,void 0,function*(){const s=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!s)throw new v.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const d=this.accessKeyByPublicKeyCache[s.toString()];if(void 0!==d)return{publicKey:s,accessKey:d};try{const h=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:s.toString(),finality:"optimistic"}),S=Object.assign(Object.assign({},h),{nonce:new b.default(h.nonce)});return this.accessKeyByPublicKeyCache[s.toString()]?{publicKey:s,accessKey:this.accessKeyByPublicKeyCache[s.toString()]}:(this.accessKeyByPublicKeyCache[s.toString()]=S,{publicKey:s,accessKey:S})}catch(h){if("AccessKeyDoesNotExist"==h.type)return null;throw h}})}createAndDeployContract(C,o,s,d){return p(this,void 0,void 0,function*(){const h=F();return yield this.signAndSendTransaction({receiverId:C,actions:[A(),W(d),E(w.PublicKey.from(o),h),N(s)]}),new H(this.connection,C)})}sendMoney(C,o){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:C,actions:[W(o)]})})}createAccount(C,o,s){return p(this,void 0,void 0,function*(){const d=F();return this.signAndSendTransaction({receiverId:C,actions:[A(),W(s),E(w.PublicKey.from(o),d)]})})}deleteAccount(C){return p(this,void 0,void 0,function*(){return process.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[P(C)]})})}deployContract(C){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[N(C)]})})}encodeJSContractArgs(C,o,s){return Buffer.concat([Buffer.from(C),Buffer.from([0]),Buffer.from(o),Buffer.from([0]),Buffer.from(s)])}functionCall({contractId:C,methodName:o,args:s={},gas:d=m.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:h,walletMeta:S,walletCallbackUrl:k,stringify:B,jsContract:I}){return p(this,void 0,void 0,function*(){let f;if(this.validateArgs(s),I)f=["call_js_contract",this.encodeJSContractArgs(C,o,JSON.stringify(s)),d,h,null,!0];else{const R=void 0===B?l.stringifyJsonOrBytes:B;f=[o,s,d,h,R,!1]}return this.signAndSendTransaction({receiverId:I?this.connection.jsvmAccountId:C,actions:[L.apply(void 0,f)],walletMeta:S,walletCallbackUrl:k})})}addKey(C,o,s,d){return p(this,void 0,void 0,function*(){let h;return s||(s=[]),Array.isArray(s)||(s=[s]),h=o?z(o,s,d):F(),this.signAndSendTransaction({receiverId:this.accountId,actions:[E(w.PublicKey.from(C),h)]})})}deleteKey(C){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[x(w.PublicKey.from(C))]})})}stake(C,o){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[j(o,w.PublicKey.from(C))]})})}signedDelegate({actions:C,blockHeightTtl:o,receiverId:s}){return p(this,void 0,void 0,function*(){const{provider:d,signer:h}=this.connection,{header:S}=yield d.block({finality:"final"}),{accessKey:k,publicKey:B}=yield this.findAccessKey(null,null),I=(0,l.buildDelegateAction)({actions:C,maxBlockHeight:new b.default(S.height).add(new b.default(o)),nonce:new b.default(k.nonce).add(new b.default(1)),publicKey:B,receiverId:s,senderId:this.accountId}),{signedDelegateAction:f}=yield(0,l.signDelegateAction)({delegateAction:I,signer:{sign:R=>p(this,void 0,void 0,function*(){const{signature:se}=yield h.signMessage(R,I.senderId,this.connection.networkId);return se})}});return f})}validateArgs(C){if((void 0===C.byteLength||C.byteLength!==C.length)&&(Array.isArray(C)||"object"!=typeof C))throw new v.PositionalArgsError}viewFunction({contractId:C,methodName:o,args:s={},parse:d=q,stringify:h=J,jsContract:S=!1,blockQuery:k={finality:"optimistic"}}){return p(this,void 0,void 0,function*(){let B;this.validateArgs(s),B=S?this.encodeJSContractArgs(C,o,Object.keys(s).length>0?JSON.stringify(s):""):h(s);const I=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},k),{account_id:S?this.connection.jsvmAccountId:C,method_name:S?"view_js_contract":o,args_base64:B.toString("base64")}));return I.logs&&(0,m.printTxOutcomeLogs)({contractId:C,logs:I.logs}),I.result&&I.result.length>0&&d(Buffer.from(I.result))})}viewState(C,o={finality:"optimistic"}){return p(this,void 0,void 0,function*(){const{values:s}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},o),{account_id:this.accountId,prefix_base64:Buffer.from(C).toString("base64")}));return s.map(({key:d,value:h})=>({key:Buffer.from(d,"base64"),value:Buffer.from(h,"base64")}))})}getAccessKeys(){var C;return p(this,void 0,void 0,function*(){const o=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(C=o?.keys)||void 0===C?void 0:C.map(s=>Object.assign(Object.assign({},s),{access_key:Object.assign(Object.assign({},s.access_key),{nonce:new b.default(s.access_key.nonce)})}))})}getAccountDetails(){return p(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(s=>"FullAccess"!==s.access_key.permission).map(s=>{const d=s.access_key.permission;return{contractId:d.FunctionCall.receiver_id,amount:d.FunctionCall.allowance,publicKey:s.public_key}})}})}getAccountBalance(){return p(this,void 0,void 0,function*(){const C=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),o=yield this.state(),s=new b.default(C.runtime_config.storage_amount_per_byte),d=new b.default(o.storage_usage).mul(s),h=new b.default(o.locked),S=new b.default(o.amount).add(h),k=S.sub(b.default.max(h,d));return{total:S.toString(),stateStaked:d.toString(),staked:h.toString(),available:k.toString()}})}getActiveDelegatedStakeBalance(){return p(this,void 0,void 0,function*(){const C=yield this.connection.provider.block({finality:"final"}),o=C.header.hash,s=C.header.epoch_id,{current_validators:d,next_validators:h,current_proposals:S}=yield this.connection.provider.validators(s),k=new Set;[...d,...h,...S].forEach(ee=>k.add(ee.account_id));const B=[...k],I=B.map(ee=>this.viewFunction({contractId:ee,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:o}})),f=yield Promise.allSettled(I);if(f.some(ee=>"rejected"===ee.status&&"TimeoutError"===ee.reason.type))throw new Error("Failed to get delegated stake balance");const se=f.reduce((ee,oe,de)=>{const Ce=B[de];if("fulfilled"===oe.status){const ye=new b.default(oe.value);if(!ye.isZero())return Object.assign(Object.assign({},ee),{stakedValidators:[...ee.stakedValidators,{validatorId:Ce,amount:ye.toString()}],total:ee.total.add(ye)})}return"rejected"===oe.status?Object.assign(Object.assign({},ee),{failedValidators:[...ee.failedValidators,{validatorId:Ce,error:oe.reason}]}):ee},{stakedValidators:[],failedValidators:[],total:new b.default(0)});return Object.assign(Object.assign({},se),{total:se.total.toString()})})}}u.Account=H},46398:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(W,Y,G,Q){return new(G||(G=Promise))(function(J,H){function te(s){try{o(Q.next(s))}catch(d){H(d)}}function C(s){try{o(Q.throw(s))}catch(d){H(d)}}function o(s){s.done?J(s.value):function q(J){return J instanceof G?J:new G(function(H){H(J)})}(s.value).then(te,C)}o((Q=Q.apply(W,Y||[])).next())})},D=this&&this.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(u,"__esModule",{value:!0}),u.Account2FA=void 0;const w=g(29761),_=g(17527),l=g(1656),v=g(38445),m=D(g(98538)),b=g(64706),M=g(69865),E=g(3725),{addKey:A,deleteKey:P,deployContract:x,fullAccessKey:N,functionCall:F,functionCallAccessKey:L}=v.actionCreators;class z extends b.AccountMultisig{constructor(Y,G,Q){super(Y,G,Q),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=Q.helperUrl||this.helperUrl,this.storage=Q.storage,this.sendCode=Q.sendCode||this.sendCodeDefault,this.getCode=Q.getCode||this.getCodeDefault,this.verifyCode=Q.verifyCode||this.verifyCodeDefault,this.onConfirmResult=Q.onConfirmResult}signAndSendTransaction({receiverId:Y,actions:G}){const Q=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){yield Q.signAndSendTransaction.call(this,{receiverId:Y,actions:G}),yield this.sendCode();const q=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(q)),q})}deployMultisig(Y){const G=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return p(this,void 0,void 0,function*(){const{accountId:Q}=this,q=(yield this.getRecoveryMethods()).data.filter(({kind:d,publicKey:h})=>("phrase"===d||"ledger"===d)&&null!==h).map(d=>d.publicKey),J=(yield this.getAccessKeys()).filter(({public_key:d,access_key:{permission:h}})=>"FullAccess"===h&&!q.includes(d)).map(d=>d.public_key).map(j),H=j((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Q})).publicKey),te=Buffer.from(JSON.stringify({num_confirmations:2})),C=[...J.map(d=>P(d)),...J.map(d=>A(d,L(Q,M.MULTISIG_CHANGE_METHODS,null))),A(H,L(Q,M.MULTISIG_CONFIRM_METHODS,null)),x(Y)],o=C.concat(F("new",te,M.MULTISIG_GAS,M.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",Q);const{stateStatus:s}=yield this.checkMultisigCodeAndStateStatus(Y);switch(s){case E.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield G.signAndSendTransactionWithAccount.call(this,Q,o);case E.MultisigStateStatus.VALID_STATE:return yield G.signAndSendTransactionWithAccount.call(this,Q,C);case E.MultisigStateStatus.INVALID_STATE:throw new _.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new _.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:Y,cleanupContractBytes:G}){return p(this,void 0,void 0,function*(){let Q=[];G&&(yield this.deleteAllRequests().catch(te=>te),Q=yield this.get2faDisableCleanupActions(G));const q=yield this.get2faDisableKeyConversionActions(),J=[...Q,...q,x(Y)],H=yield this.findAccessKey(this.accountId,J);if(H&&H.accessKey&&"FullAccess"!==H.accessKey.permission)throw new _.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,J)})}get2faDisableCleanupActions(Y){return p(this,void 0,void 0,function*(){const G=yield this.viewState("").catch(q=>{const J=q.cause&&q.cause.name;if("NO_CONTRACT_CODE"==J)return[];throw"TOO_LARGE_CONTRACT_STATE"==J?new _.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):q}),Q=G.map(({key:q})=>q.toString("base64"));return G.length?[x(Y),F("clean",{keys:Q},M.MULTISIG_GAS,new m.default("0"))]:[]})}get2faDisableKeyConversionActions(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,Q=(yield this.getAccessKeys()).filter(({access_key:J})=>"FullAccess"!==J.permission).filter(({access_key:J})=>{const H=J.permission.FunctionCall;return H.receiver_id===Y&&4===H.method_names.length&&H.method_names.includes("add_request_and_confirm")}),q=w.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Y})).publicKey);return[P(q),...Q.map(({public_key:J})=>P(w.PublicKey.from(J))),...Q.map(({public_key:J})=>A(w.PublicKey.from(J),N()))]})}disable(Y,G){return p(this,void 0,void 0,function*(){const{stateStatus:Q}=yield this.checkMultisigCodeAndStateStatus();if(Q!==E.MultisigStateStatus.VALID_STATE&&Q!==E.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new _.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let q;yield this.deleteAllRequests().catch(te=>q=te);const H=[...yield this.get2faDisableCleanupActions(G).catch(te=>{throw"ContractHasExistingState"===te.type&&q||te}),...yield this.get2faDisableKeyConversionActions(),x(Y)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:H})})}sendCodeDefault(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,{requestId:G}=this.getRequest(),Q=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:Y,method:Q,requestId:G}),G})}getCodeDefault(){return p(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return p(this,void 0,void 0,function*(){const Y=yield this.get2faMethod(),G=yield this.getCode(Y);try{return yield this.verifyCode(G)}catch(Q){if(console.warn("Error validating security code:",Q),Q.toString().includes("invalid 2fa code provided")||Q.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw Q}})}verifyCodeDefault(Y){return p(this,void 0,void 0,function*(){const{accountId:G}=this,Q=this.getRequest();if(!Q)throw new Error("no request pending");const{requestId:q}=Q;return yield this.postSignedJson("/2fa/verify",{accountId:G,securityCode:Y,requestId:q})})}getRecoveryMethods(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this;return{accountId:Y,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:Y})}})}get2faMethod(){return p(this,void 0,void 0,function*(){let{data:Y}=yield this.getRecoveryMethods();if(Y&&Y.length&&(Y=Y.find(q=>0===q.kind.indexOf("2fa-"))),!Y)return null;const{kind:G,detail:Q}=Y;return{kind:G,detail:Q}})}signatureFor(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,Q=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),q=yield this.connection.signer.signMessage(Buffer.from(Q),Y,this.connection.networkId);return{blockNumber:Q,blockNumberSignature:Buffer.from(q.signature).toString("base64")}})}postSignedJson(Y,G){return p(this,void 0,void 0,function*(){return yield(0,l.fetchJson)(this.helperUrl+Y,JSON.stringify(Object.assign(Object.assign({},G),yield this.signatureFor())))})}}u.Account2FA=z;const j=W=>w.PublicKey.from(W)},53683:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(v,m,b,M){return new(b||(b=Promise))(function(A,P){function x(L){try{F(M.next(L))}catch(z){P(z)}}function N(L){try{F(M.throw(L))}catch(z){P(z)}}function F(L){L.done?A(L.value):function E(A){return A instanceof b?A:new b(function(P){P(A)})}(L.value).then(x,N)}F((M=M.apply(v,m||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.UrlAccountCreator=u.LocalAccountCreator=u.AccountCreator=void 0;const D=g(1656);class w{}u.AccountCreator=w;u.LocalAccountCreator=class _ extends w{constructor(m,b){super(),this.masterAccount=m,this.initialBalance=b}createAccount(m,b){return p(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(m,b,this.initialBalance)})}};u.UrlAccountCreator=class l extends w{constructor(m,b){super(),this.connection=m,this.helperUrl=b}createAccount(m,b){return p(this,void 0,void 0,function*(){yield(0,D.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:m,newAccountPublicKey:b.toString()}))})}}},64706:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(x,N,F,L){return new(F||(F=Promise))(function(j,W){function Y(q){try{Q(L.next(q))}catch(J){W(J)}}function G(q){try{Q(L.throw(q))}catch(J){W(J)}}function Q(q){q.done?j(q.value):function z(j){return j instanceof F?j:new F(function(W){W(j)})}(q.value).then(Y,G)}Q((L=L.apply(x,N||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.AccountMultisig=void 0;const D=g(38445),w=g(15139),_=g(69865),l=g(3725),{deployContract:v,functionCall:m}=D.actionCreators;var b,x;(x=b||(b={}))[x.INVALID_CODE=0]="INVALID_CODE",x[x.VALID_CODE=1]="VALID_CODE",x[x.UNKNOWN_CODE=2]="UNKNOWN_CODE";const M={[_.MULTISIG_STORAGE_KEY]:null};class E extends w.Account{constructor(N,F,L){super(N,F),this.storage=L.storage,this.onAddRequestResult=L.onAddRequestResult}signAndSendTransactionWithAccount(N,F){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){return L.signAndSendTransaction.call(this,{receiverId:N,actions:F})})}signAndSendTransaction({receiverId:N,actions:F}){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const{accountId:z}=this,j=Buffer.from(JSON.stringify({request:{receiver_id:N,actions:P(F,z,N)}}));let W;try{W=yield L.signAndSendTransaction.call(this,{receiverId:z,actions:[m("add_request_and_confirm",j,_.MULTISIG_GAS,_.MULTISIG_DEPOSIT)]})}catch(G){if(G.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:N,actions:F});throw G}if(!W.status)throw new Error("Request failed");const Y=Object.assign({},W.status);if(!Y.SuccessValue||"string"!=typeof Y.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:z,actions:F,requestId:parseInt(Buffer.from(Y.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(W)),this.deleteUnconfirmedRequests(),W})}checkMultisigCodeAndStateStatus(N){const F=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const z=N?b.UNKNOWN_CODE:b.VALID_CODE;try{return N?yield F.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[v(N),m("delete_request",{request_id:4294967295},_.MULTISIG_GAS,_.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:b.VALID_CODE,stateStatus:l.MultisigStateStatus.VALID_STATE}}catch(j){if(new RegExp(l.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:z,stateStatus:l.MultisigStateStatus.INVALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:z,stateStatus:l.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(l.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:z,stateStatus:l.MultisigStateStatus.VALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(j&&j.message))return{codeStatus:b.INVALID_CODE,stateStatus:l.MultisigStateStatus.UNKNOWN_STATE};throw j}})}deleteRequest(N){return super.signAndSendTransaction({receiverId:this.accountId,actions:[m("delete_request",{request_id:N},_.MULTISIG_GAS,_.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return p(this,void 0,void 0,function*(){const N=yield this.getRequestIds();N.length&&(yield Promise.all(N.map(F=>this.deleteRequest(F))))})}deleteUnconfirmedRequests(){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const F=yield this.getRequestIds(),{requestId:L}=this.getRequest();for(const z of F)if(z!=L)try{yield N.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[m("delete_request",{request_id:z},_.MULTISIG_GAS,_.MULTISIG_DEPOSIT)]})}catch{console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return p(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(_.MULTISIG_STORAGE_KEY)||"{}"):M[_.MULTISIG_STORAGE_KEY]}setRequest(N){if(this.storage)return this.storage.setItem(_.MULTISIG_STORAGE_KEY,JSON.stringify(N));M[_.MULTISIG_STORAGE_KEY]=N}}u.AccountMultisig=E;const A=x=>x.toString().replace("ed25519:",""),P=(x,N,F)=>x.map(L=>{const z=L.enum,{gas:j,publicKey:W,methodName:Y,args:G,deposit:Q,accessKey:q,code:J}=L[z],H={type:z[0].toUpperCase()+z.substr(1),gas:j&&j.toString()||void 0,public_key:W&&A(W)||void 0,method_name:Y,args:G&&Buffer.from(G).toString("base64")||void 0,code:J&&Buffer.from(J).toString("base64")||void 0,amount:Q&&Q.toString()||void 0,deposit:Q&&Q.toString()||"0",permission:void 0};if(q&&(F===N&&"fullAccess"!==q.permission.enum&&(H.permission={receiver_id:N,allowance:_.MULTISIG_ALLOWANCE.toString(),method_names:_.MULTISIG_CHANGE_METHODS}),"functionCall"===q.permission.enum)){const{receiverId:te,methodNames:C,allowance:o}=q.permission.functionCall;H.permission={receiver_id:te,allowance:o&&o.toString()||void 0,method_names:C}}return H})},52357:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Connection=void 0;const p=g(82613),D=g(1656);class l{constructor(m,b,M,E){this.networkId=m,this.provider=b,this.signer=M,this.jsvmAccountId=E}static fromConfig(m){const b=function w(v){switch(v.type){case void 0:return v;case"JsonRpcProvider":return new D.JsonRpcProvider(Object.assign({},v.args));default:throw new Error(`Unknown provider type ${v.type}`)}}(m.provider),M=function _(v){switch(v.type){case void 0:return v;case"InMemorySigner":return new p.InMemorySigner(v.keyStore);default:throw new Error(`Unknown signer type ${v.type}`)}}(m.signer);return new l(m.networkId,b,M,m.jsvmAccountId)}}u.Connection=l},69865:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(u,"__esModule",{value:!0}),u.MULTISIG_CONFIRM_METHODS=u.MULTISIG_CHANGE_METHODS=u.MULTISIG_DEPOSIT=u.MULTISIG_GAS=u.MULTISIG_ALLOWANCE=u.MULTISIG_STORAGE_KEY=void 0;const D=g(41166),w=p(g(98538));u.MULTISIG_STORAGE_KEY="__multisigRequest",u.MULTISIG_ALLOWANCE=new w.default((0,D.parseNearAmount)("1")),u.MULTISIG_GAS=new w.default("100000000000000"),u.MULTISIG_DEPOSIT=new w.default("0"),u.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],u.MULTISIG_CONFIRM_METHODS=["confirm"]},44575:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(j,W,Y,G){return new(Y||(Y=Promise))(function(q,J){function H(o){try{C(G.next(o))}catch(s){J(s)}}function te(o){try{C(G.throw(o))}catch(s){J(s)}}function C(o){o.done?q(o.value):function Q(q){return q instanceof Y?q:new Y(function(J){J(q)})}(o.value).then(H,te)}C((G=G.apply(j,W||[])).next())})},D=this&&this.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(u,"__esModule",{value:!0}),u.Contract=void 0;const w=g(41166),_=g(17527),l=D(g(74411)),v=D(g(26474)),m=D(g(98538)),b=D(g(89176)),M=g(84778),E=g(43506);function A(j,W){return{[j]:(...Y)=>W(...Y)}[j]}function P(j,W,Y,G){var Q;if(!F(j))return;if(W.params&&W.params.serialization_type!==M.AbiSerializationType.Json)throw new E.UnsupportedSerializationError(W.name,W.params.serialization_type);if(W.result&&W.result.serialization_type!==M.AbiSerializationType.Json)throw new E.UnsupportedSerializationError(W.name,W.result.serialization_type);const q=(null===(Q=W.params)||void 0===Q?void 0:Q.args)||[];for(const J of q){const H=j[J.name],te=J.type_schema;te.definitions=G.body.root_schema.definitions;const C=Y.compile(te);if(!C(H))throw new E.ArgumentSchemaError(J.name,C.errors)}for(const J of Object.keys(j))if(!q.find(te=>te.name===J))throw new E.UnknownArgumentError(J,q.map(te=>te.name))}const N=j=>j&&void 0!==j.byteLength&&j.byteLength===j.length,F=j=>"[object Object]"===Object.prototype.toString.call(j);u.Contract=class L{constructor(W,Y,G){this.account=W,this.contractId=Y;const{viewMethods:Q=[],changeMethods:q=[],abi:J}=G;let H=Q.map(o=>({name:o,abi:null})),te=q.map(o=>({name:o,abi:null}));if(J){if(H.length>0||te.length>0)throw new E.ConflictingOptions;H=J.body.functions.filter(o=>o.kind===M.AbiFunctionKind.View).map(o=>({name:o.name,abi:o})),te=J.body.functions.filter(o=>o.kind===M.AbiFunctionKind.Call).map(o=>({name:o.name,abi:o}))}const C=function x(){const j=new l.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,v.default)(j),j}();H.forEach(({name:o,abi:s})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(d={},h={},...S)=>p(this,void 0,void 0,function*(){if(S.length||!F(d)&&!N(d)||!F(h))throw new _.PositionalArgsError;return s&&P(d,s,C,J),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:d},h))}))})}),te.forEach(({name:o,abi:s})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(...d)=>p(this,void 0,void 0,function*(){if(d.length&&(d.length>3||!F(d[0])&&!N(d[0])))throw new _.PositionalArgsError;return(d.length>1||!(d[0]&&d[0].args))&&((0,b.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),d[0]={args:d[0],gas:d[1],amount:d[2]}),s&&P(d[0].args,s,C,J),this._changeMethod(Object.assign({methodName:o},d[0]))}))})})}_changeMethod({args:W,methodName:Y,gas:G,amount:Q,meta:q,callbackUrl:J}){return p(this,void 0,void 0,function*(){!function z(j){const W="number, decimal string or BN";for(const Y of Object.keys(j)){const G=j[Y];if(G&&!m.default.isBN(G)&&isNaN(G))throw new _.ArgumentTypeError(Y,W,G)}}({gas:G,amount:Q});const H=yield this.account.functionCall({contractId:this.contractId,methodName:Y,args:W,gas:G,attachedDeposit:Q,walletMeta:q,walletCallbackUrl:J});return(0,w.getTransactionLastResult)(H)})}}},43506:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ConflictingOptions=u.ArgumentSchemaError=u.UnknownArgumentError=u.UnsupportedSerializationError=void 0;class g extends Error{constructor(l,v){super(`Contract method '${l}' is using an unsupported serialization type ${v}`)}}u.UnsupportedSerializationError=g;class p extends Error{constructor(l,v){super(`Unrecognized argument '${l}', expected '${JSON.stringify(v)}'`)}}u.UnknownArgumentError=p;class D extends Error{constructor(l,v){super(`Argument '${l}' does not conform to the specified ABI schema: '${JSON.stringify(v)}'`)}}u.ArgumentSchemaError=D;class w extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}u.ConflictingOptions=w},74931:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MultisigStateStatus=u.MultisigDeleteRequestRejectionError=u.UnsupportedSerializationError=u.UnknownArgumentError=u.ConflictingOptions=u.ArgumentSchemaError=u.Contract=u.MULTISIG_CONFIRM_METHODS=u.MULTISIG_CHANGE_METHODS=u.MULTISIG_DEPOSIT=u.MULTISIG_GAS=u.MULTISIG_ALLOWANCE=u.MULTISIG_STORAGE_KEY=u.Connection=u.AccountMultisig=u.UrlAccountCreator=u.LocalAccountCreator=u.AccountCreator=u.Account2FA=u.Account=void 0;var p=g(15139);Object.defineProperty(u,"Account",{enumerable:!0,get:function(){return p.Account}});var D=g(46398);Object.defineProperty(u,"Account2FA",{enumerable:!0,get:function(){return D.Account2FA}});var w=g(53683);Object.defineProperty(u,"AccountCreator",{enumerable:!0,get:function(){return w.AccountCreator}}),Object.defineProperty(u,"LocalAccountCreator",{enumerable:!0,get:function(){return w.LocalAccountCreator}}),Object.defineProperty(u,"UrlAccountCreator",{enumerable:!0,get:function(){return w.UrlAccountCreator}});var _=g(64706);Object.defineProperty(u,"AccountMultisig",{enumerable:!0,get:function(){return _.AccountMultisig}});var l=g(52357);Object.defineProperty(u,"Connection",{enumerable:!0,get:function(){return l.Connection}});var v=g(69865);Object.defineProperty(u,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return v.MULTISIG_STORAGE_KEY}}),Object.defineProperty(u,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return v.MULTISIG_ALLOWANCE}}),Object.defineProperty(u,"MULTISIG_GAS",{enumerable:!0,get:function(){return v.MULTISIG_GAS}}),Object.defineProperty(u,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return v.MULTISIG_DEPOSIT}}),Object.defineProperty(u,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return v.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(u,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return v.MULTISIG_CONFIRM_METHODS}});var m=g(44575);Object.defineProperty(u,"Contract",{enumerable:!0,get:function(){return m.Contract}});var b=g(43506);Object.defineProperty(u,"ArgumentSchemaError",{enumerable:!0,get:function(){return b.ArgumentSchemaError}}),Object.defineProperty(u,"ConflictingOptions",{enumerable:!0,get:function(){return b.ConflictingOptions}}),Object.defineProperty(u,"UnknownArgumentError",{enumerable:!0,get:function(){return b.UnknownArgumentError}}),Object.defineProperty(u,"UnsupportedSerializationError",{enumerable:!0,get:function(){return b.UnsupportedSerializationError}});var M=g(3725);Object.defineProperty(u,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return M.MultisigDeleteRequestRejectionError}}),Object.defineProperty(u,"MultisigStateStatus",{enumerable:!0,get:function(){return M.MultisigStateStatus}})},3725:(re,u)=>{"use strict";var D;Object.defineProperty(u,"__esModule",{value:!0}),u.MultisigStateStatus=u.MultisigDeleteRequestRejectionError=void 0,(D=u.MultisigDeleteRequestRejectionError||(u.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",D.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",D.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",D.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",D.METHOD_NOT_FOUND="Contract method is not found",function(D){D[D.INVALID_STATE=0]="INVALID_STATE",D[D.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",D[D.VALID_STATE=2]="VALID_STATE",D[D.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(u.MultisigStateStatus||(u.MultisigStateStatus={}))},15932:(re,u)=>{"use strict";var p;Object.defineProperty(u,"__esModule",{value:!0}),u.KeyType=void 0,(p=u.KeyType||(u.KeyType={}))[p.ED25519=0]="ED25519"},29761:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.PublicKey=u.KeyPairEd25519=u.KeyPair=u.KeyType=void 0;var p=g(15932);Object.defineProperty(u,"KeyType",{enumerable:!0,get:function(){return p.KeyType}});var D=g(82568);Object.defineProperty(u,"KeyPair",{enumerable:!0,get:function(){return D.KeyPair}});var w=g(56510);Object.defineProperty(u,"KeyPairEd25519",{enumerable:!0,get:function(){return w.KeyPairEd25519}});var _=g(987);Object.defineProperty(u,"PublicKey",{enumerable:!0,get:function(){return _.PublicKey}})},82568:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.KeyPair=void 0;const p=g(98475),D=g(56510);class w extends p.KeyPairBase{static fromRandom(l){if("ED25519"===l.toUpperCase())return D.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${l}`)}static fromString(l){const v=l.split(":");if(1===v.length)return new D.KeyPairEd25519(v[0]);if(2===v.length){if("ED25519"===v[0].toUpperCase())return new D.KeyPairEd25519(v[1]);throw new Error(`Unknown curve: ${v[0]}`)}throw new Error("Invalid encoded key format, must be :")}}u.KeyPair=w},98475:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.KeyPairBase=void 0;u.KeyPairBase=class g{}},56510:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(u,"__esModule",{value:!0}),u.KeyPairEd25519=void 0;const D=g(21531),w=p(g(40489)),_=g(15932),l=g(98475),v=g(987);class m extends l.KeyPairBase{constructor(M){super();const E=w.default.sign.keyPair.fromSecretKey((0,D.baseDecode)(M));this.publicKey=new v.PublicKey({keyType:_.KeyType.ED25519,data:E.publicKey}),this.secretKey=M}static fromRandom(){const M=w.default.sign.keyPair();return new m((0,D.baseEncode)(M.secretKey))}sign(M){return{signature:w.default.sign.detached(M,(0,D.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(M,E){return this.publicKey.verify(M,E)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}u.KeyPairEd25519=m},987:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(u,"__esModule",{value:!0}),u.PublicKey=void 0;const D=g(17527),w=g(21531),_=p(g(40489)),l=g(15932);function m(M){if("ed25519"===M.toLowerCase())return l.KeyType.ED25519;throw new Error(`Unknown key type ${M}`)}class b extends D.Assignable{static from(E){return"string"==typeof E?b.fromString(E):E}static fromString(E){const A=E.split(":");if(1===A.length)return new b({keyType:l.KeyType.ED25519,data:(0,w.baseDecode)(A[0])});if(2===A.length)return new b({keyType:m(A[0]),data:(0,w.baseDecode)(A[1])});throw new Error("Invalid encoded key format, must be :")}toString(){return`${function v(M){if(M===l.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${M}`)}(this.keyType)}:${(0,w.baseEncode)(this.data)}`}verify(E,A){if(this.keyType===l.KeyType.ED25519)return _.default.sign.detached.verify(E,A,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}u.PublicKey=b},9454:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(v,m,b,M){return new(b||(b=Promise))(function(A,P){function x(L){try{F(M.next(L))}catch(z){P(z)}}function N(L){try{F(M.throw(L))}catch(z){P(z)}}function F(L){L.done?A(L.value):function E(A){return A instanceof b?A:new b(function(P){P(A)})}(L.value).then(x,N)}F((M=M.apply(v,m||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.BrowserLocalStorageKeyStore=void 0;const D=g(29761),w=g(69170);class l extends w.KeyStore{constructor(m=window.localStorage,b="near-api-js:keystore:"){super(),this.localStorage=m,this.prefix=b}setKey(m,b,M){return p(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(m,b),M.toString())})}getKey(m,b){return p(this,void 0,void 0,function*(){const M=this.localStorage.getItem(this.storageKeyForSecretKey(m,b));return M?D.KeyPair.fromString(M):null})}removeKey(m,b){return p(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(m,b))})}clear(){return p(this,void 0,void 0,function*(){for(const m of this.storageKeys())m.startsWith(this.prefix)&&this.localStorage.removeItem(m)})}getNetworks(){return p(this,void 0,void 0,function*(){const m=new Set;for(const b of this.storageKeys())if(b.startsWith(this.prefix)){const M=b.substring(this.prefix.length).split(":");m.add(M[1])}return Array.from(m.values())})}getAccounts(m){return p(this,void 0,void 0,function*(){const b=new Array;for(const M of this.storageKeys())if(M.startsWith(this.prefix)){const E=M.substring(this.prefix.length).split(":");E[1]===m&&b.push(E[0])}return b})}storageKeyForSecretKey(m,b){return`${this.prefix}${b}:${m}`}*storageKeys(){for(let m=0;m{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.BrowserLocalStorageKeyStore=void 0;var p=g(9454);Object.defineProperty(u,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return p.BrowserLocalStorageKeyStore}})},55738:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.UnencryptedFileSystemKeyStore=u.readKeyFile=void 0;var p=g(2252);Object.defineProperty(u,"readKeyFile",{enumerable:!0,get:function(){return p.readKeyFile}}),Object.defineProperty(u,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return p.UnencryptedFileSystemKeyStore}})},2252:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(W,Y,G,Q){return new(G||(G=Promise))(function(J,H){function te(s){try{o(Q.next(s))}catch(d){H(d)}}function C(s){try{o(Q.throw(s))}catch(d){H(d)}}function o(s){s.done?J(s.value):function q(J){return J instanceof G?J:new G(function(H){H(J)})}(s.value).then(te,C)}o((Q=Q.apply(W,Y||[])).next())})},D=this&&this.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(u,"__esModule",{value:!0}),u.UnencryptedFileSystemKeyStore=u.readKeyFile=void 0;const w=g(29761),_=g(69170),l=D(g(6581)),v=D(g(63928)),m=g(26788),b=W=>W?(0,m.promisify)(W):()=>{throw new Error("Trying to use unimplemented function. `fs` module not available in web build?")},M=b(l.default.exists),E=b(l.default.readFile),A=b(l.default.writeFile),P=b(l.default.unlink),x=b(l.default.readdir),N=b(l.default.mkdir);function z(W){return p(this,void 0,void 0,function*(){const Y=yield function F(W){return p(this,void 0,void 0,function*(){const Y=yield E(W);return JSON.parse(Y.toString())})}(W);let G=Y.private_key;return!G&&Y.secret_key&&(G=Y.secret_key),[Y.account_id,w.KeyPair.fromString(G)]})}u.readKeyFile=z;class j extends _.KeyStore{constructor(Y){super(),this.keyDir=v.default.resolve(Y)}setKey(Y,G,Q){return p(this,void 0,void 0,function*(){yield function L(W){return p(this,void 0,void 0,function*(){try{yield N(W,{recursive:!0})}catch(Y){if("EEXIST"!==Y.code)throw Y}})}(`${this.keyDir}/${Y}`);const q={account_id:G,public_key:Q.getPublicKey().toString(),private_key:Q.toString()};yield A(this.getKeyFilePath(Y,G),JSON.stringify(q),{mode:384})})}getKey(Y,G){return p(this,void 0,void 0,function*(){return(yield M(this.getKeyFilePath(Y,G)))?(yield z(this.getKeyFilePath(Y,G)))[1]:null})}removeKey(Y,G){return p(this,void 0,void 0,function*(){(yield M(this.getKeyFilePath(Y,G)))&&(yield P(this.getKeyFilePath(Y,G)))})}clear(){return p(this,void 0,void 0,function*(){for(const Y of yield this.getNetworks())for(const G of yield this.getAccounts(Y))yield this.removeKey(Y,G)})}getKeyFilePath(Y,G){return`${this.keyDir}/${Y}/${G}.json`}getNetworks(){return p(this,void 0,void 0,function*(){const Y=yield x(this.keyDir),G=new Array;return Y.forEach(Q=>{G.push(Q)}),G})}getAccounts(Y){return p(this,void 0,void 0,function*(){return(yield M(`${this.keyDir}/${Y}`))?(yield x(`${this.keyDir}/${Y}`)).filter(Q=>Q.endsWith(".json")).map(Q=>Q.replace(/.json$/,"")):[]})}toString(){return`UnencryptedFileSystemKeyStore(${this.keyDir})`}}u.UnencryptedFileSystemKeyStore=j},14484:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(l,v,m,b){return new(m||(m=Promise))(function(E,A){function P(F){try{N(b.next(F))}catch(L){A(L)}}function x(F){try{N(b.throw(F))}catch(L){A(L)}}function N(F){F.done?E(F.value):function M(E){return E instanceof m?E:new m(function(A){A(E)})}(F.value).then(P,x)}N((b=b.apply(l,v||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.InMemoryKeyStore=void 0;const D=g(29761),w=g(99749);class _ extends w.KeyStore{constructor(){super(),this.keys={}}setKey(v,m,b){return p(this,void 0,void 0,function*(){this.keys[`${m}:${v}`]=b.toString()})}getKey(v,m){return p(this,void 0,void 0,function*(){const b=this.keys[`${m}:${v}`];return b?D.KeyPair.fromString(b):null})}removeKey(v,m){return p(this,void 0,void 0,function*(){delete this.keys[`${m}:${v}`]})}clear(){return p(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return p(this,void 0,void 0,function*(){const v=new Set;return Object.keys(this.keys).forEach(m=>{const b=m.split(":");v.add(b[1])}),Array.from(v.values())})}getAccounts(v){return p(this,void 0,void 0,function*(){const m=new Array;return Object.keys(this.keys).forEach(b=>{const M=b.split(":");M[M.length-1]===v&&m.push(M.slice(0,M.length-1).join(":"))}),m})}toString(){return"InMemoryKeyStore"}}u.InMemoryKeyStore=_},69170:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MergeKeyStore=u.KeyStore=u.InMemoryKeyStore=void 0;var p=g(14484);Object.defineProperty(u,"InMemoryKeyStore",{enumerable:!0,get:function(){return p.InMemoryKeyStore}});var D=g(99749);Object.defineProperty(u,"KeyStore",{enumerable:!0,get:function(){return D.KeyStore}});var w=g(93669);Object.defineProperty(u,"MergeKeyStore",{enumerable:!0,get:function(){return w.MergeKeyStore}})},99749:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.KeyStore=void 0;u.KeyStore=class g{}},93669:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(_,l,v,m){return new(v||(v=Promise))(function(M,E){function A(N){try{x(m.next(N))}catch(F){E(F)}}function P(N){try{x(m.throw(N))}catch(F){E(F)}}function x(N){N.done?M(N.value):function b(M){return M instanceof v?M:new v(function(E){E(M)})}(N.value).then(A,P)}x((m=m.apply(_,l||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.MergeKeyStore=void 0;const D=g(99749);class w extends D.KeyStore{constructor(l,v={writeKeyStoreIndex:0}){super(),this.options=v,this.keyStores=l}setKey(l,v,m){return p(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(l,v,m)})}getKey(l,v){return p(this,void 0,void 0,function*(){for(const m of this.keyStores){const b=yield m.getKey(l,v);if(b)return b}return null})}removeKey(l,v){return p(this,void 0,void 0,function*(){for(const m of this.keyStores)yield m.removeKey(l,v)})}clear(){return p(this,void 0,void 0,function*(){for(const l of this.keyStores)yield l.clear()})}getNetworks(){return p(this,void 0,void 0,function*(){const l=new Set;for(const v of this.keyStores)for(const m of yield v.getNetworks())l.add(m);return Array.from(l)})}getAccounts(l){return p(this,void 0,void 0,function*(){const v=new Set;for(const m of this.keyStores)for(const b of yield m.getAccounts(l))v.add(b);return Array.from(v)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}u.MergeKeyStore=w},82420:function(re,u){"use strict";var g=this&&this.__awaiter||function(w,_,l,v){return new(l||(l=Promise))(function(b,M){function E(x){try{P(v.next(x))}catch(N){M(N)}}function A(x){try{P(v.throw(x))}catch(N){M(N)}}function P(x){x.done?b(x.value):function m(b){return b instanceof l?b:new l(function(M){M(b)})}(x.value).then(E,A)}P((v=v.apply(w,_||[])).next())})};function D(w){return new Promise(_=>setTimeout(_,w))}Object.defineProperty(u,"__esModule",{value:!0}),u.exponentialBackoff=void 0,u.exponentialBackoff=function p(w,_,l,v){return g(this,void 0,void 0,function*(){let m=w;for(let b=0;b<_;b++){const M=yield v();if(M)return M;yield D(m),m*=l}return null})}},60778:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(u,"__esModule",{value:!0});const D=p(g(69637)),w=p(g(74216)),_=p(g(8806)),l=new w.default.Agent({keepAlive:!0}),v=new _.default.Agent({keepAlive:!0});function m(M){return"http:"===M.protocol?l:v}u.default=function b(M,E){return(0,D.default)(M,Object.assign({agent:m(new URL(M.toString()))},E))}},22292:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(N,F,L,z){void 0===z&&(z=L);var j=Object.getOwnPropertyDescriptor(F,L);(!j||("get"in j?!F.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return F[L]}}),Object.defineProperty(N,z,j)}:function(N,F,L,z){void 0===z&&(z=L),N[z]=F[L]}),D=this&&this.__setModuleDefault||(Object.create?function(N,F){Object.defineProperty(N,"default",{enumerable:!0,value:F})}:function(N,F){N.default=F}),w=this&&this.__importStar||function(N){if(N&&N.__esModule)return N;var F={};if(null!=N)for(var L in N)"default"!==L&&Object.prototype.hasOwnProperty.call(N,L)&&p(F,N,L);return D(F,N),F},_=this&&this.__awaiter||function(N,F,L,z){return new(L||(L=Promise))(function(W,Y){function G(J){try{q(z.next(J))}catch(H){Y(H)}}function Q(J){try{q(z.throw(J))}catch(H){Y(H)}}function q(J){J.done?W(J.value):function j(W){return W instanceof L?W:new L(function(Y){Y(W)})}(J.value).then(G,Q)}q((z=z.apply(N,F||[])).next())})},l=this&&this.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(u,"__esModule",{value:!0}),u.fetchJson=void 0;const v=g(17527),m=l(g(31400)),b=g(82420),M=1e3,E=1.5,A=10,P=(...N)=>!process.env.NEAR_NO_LOGS&&console.warn(...N);u.fetchJson=function x(N,F){return _(this,void 0,void 0,function*(){let L={url:null};"string"==typeof N?L.url=N:L=N;const z=yield(0,b.exponentialBackoff)(M,A,E,()=>_(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>w(g(60778)))).default);const j=yield global.fetch(L.url,{method:F?"POST":"GET",body:F||void 0,headers:Object.assign(Object.assign({},L.headers),{"Content-Type":"application/json"})});if(!j.ok){if(503===j.status)return P(`Retrying HTTP request for ${L.url} as it's not available now`),null;throw(0,m.default)(j.status,yield j.text())}return j}catch(j){if(j.toString().includes("FetchError")||j.toString().includes("Failed to fetch"))return P(`Retrying HTTP request for ${L.url} because of error: ${j}`),null;throw j}}));if(!z)throw new v.TypedError(`Exceeded ${A} attempts for ${L.url}.`,"RetriesExceeded");return yield z.json()})}},1656:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.fetchJson=u.Provider=u.JsonRpcProvider=u.exponentialBackoff=void 0;var p=g(82420);Object.defineProperty(u,"exponentialBackoff",{enumerable:!0,get:function(){return p.exponentialBackoff}});var D=g(71935);Object.defineProperty(u,"JsonRpcProvider",{enumerable:!0,get:function(){return D.JsonRpcProvider}});var w=g(10488);Object.defineProperty(u,"Provider",{enumerable:!0,get:function(){return w.Provider}});var _=g(22292);Object.defineProperty(u,"fetchJson",{enumerable:!0,get:function(){return _.fetchJson}})},71935:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(F,L,z,j){return new(z||(z=Promise))(function(Y,G){function Q(H){try{J(j.next(H))}catch(te){G(te)}}function q(H){try{J(j.throw(H))}catch(te){G(te)}}function J(H){H.done?Y(H.value):function W(Y){return Y instanceof z?Y:new z(function(G){G(Y)})}(H.value).then(Q,q)}J((j=j.apply(F,L||[])).next())})},D=this&&this.__rest||function(F,L){var z={};for(var j in F)Object.prototype.hasOwnProperty.call(F,j)&&L.indexOf(j)<0&&(z[j]=F[j]);if(null!=F&&"function"==typeof Object.getOwnPropertySymbols){var W=0;for(j=Object.getOwnPropertySymbols(F);Wp(this,void 0,void 0,function*(){try{const Y={method:L,params:z,id:x++,jsonrpc:"2.0"},G=yield(0,M.fetchJson)(this.connection,JSON.stringify(Y));if(G.error){if("object"==typeof G.error.data)throw"string"==typeof G.error.data.error_message&&"string"==typeof G.error.data.error_type?new _.TypedError(G.error.data.error_message,G.error.data.error_type):(0,w.parseRpcError)(G.error.data);{const Q=`[${G.error.code}] ${G.error.message}: ${G.error.data}`;throw"Timeout"===G.error.data||Q.includes("Timeout error")||Q.includes("query has timed out")?new _.TypedError(Q,"TimeoutError"):new _.TypedError(Q,(0,w.getErrorTypeFromErrorMessage)(G.error.data,G.error.name))}}return G}catch(Y){if("TimeoutError"===Y.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${L} as it has timed out`,z),null;throw Y}})),{result:W}=j;if(typeof W>"u")throw new _.TypedError(`Exceeded 12 attempts for request to ${L}.`,"RetriesExceeded");return W})}}u.JsonRpcProvider=N},10488:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Provider=void 0;u.Provider=class g{}},89614:re=>{"use strict";function g(D,w){if("function"!=typeof D)throw new TypeError("argument fn must be a function");return D}function p(D,w,_){if(!D||"object"!=typeof D&&"function"!=typeof D)throw new TypeError("argument obj must be object");var l=Object.getOwnPropertyDescriptor(D,w);if(!l)throw new TypeError("must call property on owner object");if(!l.configurable)throw new TypeError("property must be configurable")}re.exports=function u(D){if(!D)throw new TypeError("argument namespace is required");function w(_){}return w._file=void 0,w._ignored=!0,w._namespace=D,w._traced=!1,w._warned=Object.create(null),w.function=g,w.property=p,w}},31400:(re,u,g)=>{"use strict";var p=g(89614)("http-errors"),D=g(1106),w=g(99881),_=g(83894),l=g(77721);function v(F){return Number(String(F).charAt(0)+"00")}function P(F,L){var z=Object.getOwnPropertyDescriptor(F,"name");z&&z.configurable&&(z.value=L,Object.defineProperty(F,"name",z))}function N(F){return"Error"!==F.substr(-5)?F+"Error":F}re.exports=function m(){for(var F,L,z=500,j={},W=0;W=600)&&p("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof z||!w[z]&&(z<400||z>=600))&&(z=500);var G=m[z]||m[v(z)];for(var Q in F||(F=G?new G(L):new Error(L||w[z]),Error.captureStackTrace(F,m)),(!G||!(F instanceof G)||F.status!==z)&&(F.expose=z<500,F.status=F.statusCode=z),j)"status"!==Q&&"statusCode"!==Q&&(F[Q]=j[Q]);return F},re.exports.HttpError=function b(){function F(){throw new TypeError("cannot construct abstract class")}return _(F,Error),F}(),re.exports.isHttpError=function E(F){return function(z){return!(!z||"object"!=typeof z)&&(z instanceof F||z instanceof Error&&"boolean"==typeof z.expose&&"number"==typeof z.statusCode&&z.status===z.statusCode)}}(re.exports.HttpError),function x(F,L,z){L.forEach(function(W){var Y,G=l(w[W]);switch(v(W)){case 400:Y=function M(F,L,z){var j=N(L);function W(Y){var G=Y??w[z],Q=new Error(G);return Error.captureStackTrace(Q,W),D(Q,W.prototype),Object.defineProperty(Q,"message",{enumerable:!0,configurable:!0,value:G,writable:!0}),Object.defineProperty(Q,"name",{enumerable:!1,configurable:!0,value:j,writable:!0}),Q}return _(W,F),P(W,j),W.prototype.status=z,W.prototype.statusCode=z,W.prototype.expose=!0,W}(z,G,W);break;case 500:Y=function A(F,L,z){var j=N(L);function W(Y){var G=Y??w[z],Q=new Error(G);return Error.captureStackTrace(Q,W),D(Q,W.prototype),Object.defineProperty(Q,"message",{enumerable:!0,configurable:!0,value:G,writable:!0}),Object.defineProperty(Q,"name",{enumerable:!1,configurable:!0,value:j,writable:!0}),Q}return _(W,F),P(W,j),W.prototype.status=z,W.prototype.statusCode=z,W.prototype.expose=!1,W}(z,G,W)}Y&&(F[W]=Y,F[G]=Y)}),F["I'mateapot"]=p.function(F.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(re.exports,w.codes,re.exports.HttpError)},99881:(re,u,g)=>{"use strict";var p=g(20863);function w(_){if("number"==typeof _){if(!w[_])throw new Error("invalid status code: "+_);return _}if("string"!=typeof _)throw new TypeError("code must be a number or string");var l=parseInt(_,10);if(!isNaN(l)){if(!w[l])throw new Error("invalid status code: "+l);return l}if(!(l=w[_.toLowerCase()]))throw new Error('invalid status message: "'+_+'"');return l}re.exports=w,w.STATUS_CODES=p,w.codes=function D(_,l){var v=[];return Object.keys(l).forEach(function(b){var M=l[b],E=Number(b);_[E]=M,_[M]=E,_[M.toLowerCase()]=E,v.push(E)}),v}(w,p),w.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},w.empty={204:!0,205:!0,304:!0},w.retry={502:!0,503:!0,504:!0}},68492:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(b,M,E,A){return new(E||(E=Promise))(function(x,N){function F(j){try{z(A.next(j))}catch(W){N(W)}}function L(j){try{z(A.throw(j))}catch(W){N(W)}}function z(j){j.done?x(j.value):function P(x){return x instanceof E?x:new E(function(N){N(x)})}(j.value).then(F,L)}z((A=A.apply(b,M||[])).next())})},D=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(u,"__esModule",{value:!0}),u.InMemorySigner=void 0;const w=g(29761),_=g(69170),l=D(g(1520)),v=g(2345);class m extends v.Signer{constructor(M){super(),this.keyStore=M}static fromKeyPair(M,E,A){return p(this,void 0,void 0,function*(){const P=new _.InMemoryKeyStore;return yield P.setKey(M,E,A),new m(P)})}createKey(M,E){return p(this,void 0,void 0,function*(){const A=w.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(E,M,A),A.getPublicKey()})}getPublicKey(M,E){return p(this,void 0,void 0,function*(){const A=yield this.keyStore.getKey(E,M);return null===A?null:A.getPublicKey()})}signMessage(M,E,A){return p(this,void 0,void 0,function*(){const P=new Uint8Array(l.default.sha256.array(M));if(!E)throw new Error("InMemorySigner requires provided account id");const x=yield this.keyStore.getKey(A,E);if(null===x)throw new Error(`Key for ${E} not found in ${A}`);return x.sign(P)})}toString(){return`InMemorySigner(${this.keyStore})`}}u.InMemorySigner=m},82613:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Signer=u.InMemorySigner=void 0;var p=g(68492);Object.defineProperty(u,"InMemorySigner",{enumerable:!0,get:function(){return p.InMemorySigner}});var D=g(2345);Object.defineProperty(u,"Signer",{enumerable:!0,get:function(){return D.Signer}})},2345:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Signer=void 0;u.Signer=class g{}},39779:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.actionCreators=u.stringifyJsonOrBytes=void 0;const p=g(83407);function v(N){return void 0!==N.byteLength&&N.byteLength===N.length?N:Buffer.from(JSON.stringify(N))}u.stringifyJsonOrBytes=v,u.actionCreators={addKey:function E(N,F){return new p.Action({addKey:new p.AddKey({publicKey:N,accessKey:F})})},createAccount:function _(){return new p.Action({createAccount:new p.CreateAccount({})})},deleteAccount:function P(N){return new p.Action({deleteAccount:new p.DeleteAccount({beneficiaryId:N})})},deleteKey:function A(N){return new p.Action({deleteKey:new p.DeleteKey({publicKey:N})})},deployContract:function l(N){return new p.Action({deployContract:new p.DeployContract({code:N})})},fullAccessKey:function D(){return new p.AccessKey({permission:new p.AccessKeyPermission({fullAccess:new p.FullAccessPermission({})})})},functionCall:function m(N,F,L,z,j=v,W=!1){return W?new p.Action({functionCall:new p.FunctionCall({methodName:N,args:F,gas:L,deposit:z})}):new p.Action({functionCall:new p.FunctionCall({methodName:N,args:j(F),gas:L,deposit:z})})},functionCallAccessKey:function w(N,F,L){return new p.AccessKey({permission:new p.AccessKeyPermission({functionCall:new p.FunctionCallPermission({receiverId:N,allowance:L,methodNames:F})})})},signedDelegate:function x({delegateAction:N,signature:F}){return new p.Action({signedDelegate:new p.SignedDelegate({delegateAction:N,signature:F})})},stake:function M(N,F){return new p.Action({stake:new p.Stake({stake:N,publicKey:F})})},transfer:function b(N){return new p.Action({transfer:new p.Transfer({deposit:N})})}}},83407:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Action=u.SignedDelegate=u.DeleteAccount=u.DeleteKey=u.AddKey=u.Stake=u.Transfer=u.FunctionCall=u.DeployContract=u.CreateAccount=u.IAction=u.AccessKey=u.AccessKeyPermission=u.FullAccessPermission=u.FunctionCallPermission=void 0;const p=g(17527);class D{constructor(W){if(1!==Object.keys(W).length)throw new Error("Enum can only take single value");Object.keys(W).map(Y=>{this[Y]=W[Y],this.enum=Y})}}class w extends p.Assignable{}u.FunctionCallPermission=w;class _ extends p.Assignable{}u.FullAccessPermission=_;u.AccessKeyPermission=class l extends D{};class v extends p.Assignable{}u.AccessKey=v;class m extends p.Assignable{}u.IAction=m;u.CreateAccount=class b extends m{};u.DeployContract=class M extends m{};u.FunctionCall=class E extends m{};u.Transfer=class A extends m{};u.Stake=class P extends m{};u.AddKey=class x extends m{};u.DeleteKey=class N extends m{};u.DeleteAccount=class F extends m{};u.SignedDelegate=class L extends m{};u.Action=class z extends D{}},71354:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.createTransaction=void 0;const p=g(73315);u.createTransaction=function D(w,_,l,v,m,b){return new p.Transaction({signerId:w,publicKey:_,nonce:v,receiverId:l,actions:m,blockHash:b})}},91396:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.buildDelegateAction=u.DelegateAction=void 0;const p=g(17527),D=g(39779),{addKey:w,createAccount:_,deleteAccount:l,deleteKey:v,deployContract:m,functionCall:b,stake:M,transfer:E}=D.actionCreators;class A extends p.Assignable{}u.DelegateAction=A,u.buildDelegateAction=function P({actions:x,maxBlockHeight:N,nonce:F,publicKey:L,receiverId:z,senderId:j}){return new A({senderId:j,receiverId:z,actions:x.map(W=>{if(!W.type&&!W.params)return W;switch(W.type){case"AddKey":{const{publicKey:Y,accessKey:G}=W.params;return w(Y,G)}case"CreateAccount":return _(W.params.createAccount);case"DeleteAccount":return l(W.params.deleteAccount);case"DeleteKey":return v(W.params.publicKey);case"DeployContract":return m(W.params.code);case"FunctionCall":{const{methodName:Y,args:G,gas:Q,deposit:q}=W.params;return b(Y,G,Q,q)}case"Stake":return M(W.params.stake,W.params.publicKey);case"Transfer":{const{deposit:Y}=W.params;return E(Y)}}throw new Error("Unrecognized action")}),nonce:F,maxBlockHeight:N,publicKey:L})}},38445:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,_,l,v){void 0===v&&(v=l);var m=Object.getOwnPropertyDescriptor(_,l);(!m||("get"in m?!_.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return _[l]}}),Object.defineProperty(w,v,m)}:function(w,_,l,v){void 0===v&&(v=l),w[v]=_[l]}),D=this&&this.__exportStar||function(w,_){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(_,l)&&p(_,w,l)};Object.defineProperty(u,"__esModule",{value:!0}),D(g(39779),u),D(g(83407),u),D(g(71354),u),D(g(91396),u),D(g(73315),u),D(g(20373),u),D(g(95758),u)},11739:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.DelegateActionPrefix=void 0;const p=g(17527),D=Math.pow(2,30),w_MetaTransactions=366;class _ extends p.Assignable{}class l extends _{constructor(b){super({prefix:D+b})}}u.DelegateActionPrefix=class v extends l{constructor(){super(w_MetaTransactions)}}},73315:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.SCHEMA=u.SignedTransaction=u.Transaction=u.decodeSignedTransaction=u.decodeTransaction=u.encodeTransaction=u.encodeSignedDelegate=u.encodeDelegateAction=void 0;const p=g(29761),D=g(17527),w=g(21531),_=g(83407),l=g(91396),v=g(11739),m=g(95758);function E(F){return(0,w.serialize)(u.SCHEMA,F)}function A(F){return(0,w.deserialize)(u.SCHEMA,x,F)}function P(F){return(0,w.deserialize)(u.SCHEMA,N,F)}u.encodeDelegateAction=function b(F){return new Uint8Array([...(0,w.serialize)(u.SCHEMA,new v.DelegateActionPrefix),...(0,w.serialize)(u.SCHEMA,F)])},u.encodeSignedDelegate=function M(F){return(0,w.serialize)(u.SCHEMA,F)},u.encodeTransaction=E,u.decodeTransaction=A,u.decodeSignedTransaction=P;class x extends D.Assignable{encode(){return E(this)}static decode(L){return A(L)}}u.Transaction=x;class N extends D.Assignable{encode(){return E(this)}static decode(L){return P(L)}}u.SignedTransaction=N,u.SCHEMA=new Map([[m.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[N,{kind:"struct",fields:[["transaction",x],["signature",m.Signature]]}],[x,{kind:"struct",fields:[["signerId","string"],["publicKey",p.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[_.Action]]]}],[p.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[_.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",_.AccessKeyPermission]]}],[_.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",_.FunctionCallPermission],["fullAccess",_.FullAccessPermission]]}],[_.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[_.FullAccessPermission,{kind:"struct",fields:[]}],[_.Action,{kind:"enum",field:"enum",values:[["createAccount",_.CreateAccount],["deployContract",_.DeployContract],["functionCall",_.FunctionCall],["transfer",_.Transfer],["stake",_.Stake],["addKey",_.AddKey],["deleteKey",_.DeleteKey],["deleteAccount",_.DeleteAccount],["signedDelegate",_.SignedDelegate]]}],[_.CreateAccount,{kind:"struct",fields:[]}],[_.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[_.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[_.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[_.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",p.PublicKey]]}],[_.AddKey,{kind:"struct",fields:[["publicKey",p.PublicKey],["accessKey",_.AccessKey]]}],[_.DeleteKey,{kind:"struct",fields:[["publicKey",p.PublicKey]]}],[_.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[l.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[_.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",p.PublicKey]]}],[v.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[_.SignedDelegate,{kind:"struct",fields:[["delegateAction",l.DelegateAction],["signature",m.Signature]]}]])},20373:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(A,P,x,N){return new(x||(x=Promise))(function(L,z){function j(G){try{Y(N.next(G))}catch(Q){z(Q)}}function W(G){try{Y(N.throw(G))}catch(Q){z(Q)}}function Y(G){G.done?L(G.value):function F(L){return L instanceof x?L:new x(function(z){z(L)})}(G.value).then(j,W)}Y((N=N.apply(A,P||[])).next())})},D=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(u,"__esModule",{value:!0}),u.signDelegateAction=u.signTransaction=void 0;const w=D(g(1520)),_=g(83407),l=g(71354),v=g(73315),m=g(95758);function b(A,P,x,N){return p(this,void 0,void 0,function*(){const F=(0,v.encodeTransaction)(A),L=new Uint8Array(w.default.sha256.array(F)),z=yield P.signMessage(F,x,N);return[L,new v.SignedTransaction({transaction:A,signature:new m.Signature({keyType:A.publicKey.keyType,data:z.signature})})]})}u.signTransaction=function M(...A){return p(this,void 0,void 0,function*(){if(A[0].constructor===v.Transaction){const[P,x,N,F]=A;return b(P,x,N,F)}{const[P,x,N,F,L,z,j]=A,W=yield L.getPublicKey(z,j);return b((0,l.createTransaction)(z,W,P,x,N,F),L,z,j)}})},u.signDelegateAction=function E({delegateAction:A,signer:P}){return p(this,void 0,void 0,function*(){const x=(0,v.encodeDelegateAction)(A),N=yield P.sign(x),F=new _.SignedDelegate({delegateAction:A,signature:new m.Signature({keyType:A.publicKey.keyType,data:N})});return{hash:new Uint8Array(w.default.sha256.array(x)),signedDelegateAction:F}})}},95758:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Signature=void 0;const p=g(17527);class D extends p.Assignable{}u.Signature=D},32272:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Assignable=void 0;u.Assignable=class g{constructor(D){Object.keys(D).map(w=>{this[w]=D[w]})}}},27876:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ErrorContext=u.TypedError=u.ArgumentTypeError=u.PositionalArgsError=void 0;class g extends Error{constructor(){super("Contract method calls expect named arguments wrapped in object, e.g. { argName1: argValue1, argName2: argValue2 }")}}u.PositionalArgsError=g;class p extends Error{constructor(l,v,m){super(`Expected ${v} for '${l}' argument, but got '${JSON.stringify(m)}'`)}}u.ArgumentTypeError=p;class D extends Error{constructor(l,v,m){super(l),this.type=v||"UntypedError",this.context=m}}u.TypedError=D;u.ErrorContext=class w{constructor(l){this.transactionHash=l}}},17527:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,_,l,v){void 0===v&&(v=l);var m=Object.getOwnPropertyDescriptor(_,l);(!m||("get"in m?!_.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return _[l]}}),Object.defineProperty(w,v,m)}:function(w,_,l,v){void 0===v&&(v=l),w[v]=_[l]}),D=this&&this.__exportStar||function(w,_){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(_,l)&&p(_,w,l)};Object.defineProperty(u,"__esModule",{value:!0}),D(g(32272),u),D(g(27876),u),D(g(39077),u)},39077:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.FinalExecutionStatusBasic=u.ExecutionStatusBasic=u.IdType=void 0;var p=g(16365);Object.defineProperty(u,"IdType",{enumerable:!0,get:function(){return p.IdType}});var D=g(83706);Object.defineProperty(u,"ExecutionStatusBasic",{enumerable:!0,get:function(){return D.ExecutionStatusBasic}}),Object.defineProperty(u,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return D.FinalExecutionStatusBasic}})},16365:(re,u)=>{"use strict";var p;Object.defineProperty(u,"__esModule",{value:!0}),u.IdType=void 0,(p=u.IdType||(u.IdType={})).Transaction="transaction",p.Receipt="receipt"},83706:(re,u)=>{"use strict";var D;Object.defineProperty(u,"__esModule",{value:!0}),u.FinalExecutionStatusBasic=u.ExecutionStatusBasic=void 0,(D=u.ExecutionStatusBasic||(u.ExecutionStatusBasic={})).Unknown="Unknown",D.Pending="Pending",D.Failure="Failure",function(D){D.NotStarted="NotStarted",D.Started="Started",D.Failure="Failure"}(u.FinalExecutionStatusBasic||(u.FinalExecutionStatusBasic={}))},73215:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(u,"__esModule",{value:!0}),u.DEFAULT_FUNCTION_CALL_GAS=void 0;const D=p(g(98538));u.DEFAULT_FUNCTION_CALL_GAS=new D.default("30000000000000")},38668:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.logWarning=void 0,u.logWarning=function g(...p){process.env.NEAR_NO_LOGS||console.warn(...p)}},359:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.parseRpcError=u.parseResultError=u.getErrorTypeFromErrorMessage=u.formatError=u.ServerError=u.logWarning=void 0;var p=g(38668);Object.defineProperty(u,"logWarning",{enumerable:!0,get:function(){return p.logWarning}});var D=g(97217);Object.defineProperty(u,"ServerError",{enumerable:!0,get:function(){return D.ServerError}}),Object.defineProperty(u,"formatError",{enumerable:!0,get:function(){return D.formatError}}),Object.defineProperty(u,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return D.getErrorTypeFromErrorMessage}}),Object.defineProperty(u,"parseResultError",{enumerable:!0,get:function(){return D.parseResultError}}),Object.defineProperty(u,"parseRpcError",{enumerable:!0,get:function(){return D.parseRpcError}})},97217:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(z){return z&&z.__esModule?z:{default:z}};Object.defineProperty(u,"__esModule",{value:!0}),u.getErrorTypeFromErrorMessage=u.formatError=u.parseResultError=u.parseRpcError=u.ServerError=void 0;const D=g(17527),w=p(g(11346)),_=g(67112),l=p(g(56584)),v=p(g(96747)),m={formatNear:()=>(z,j)=>(0,_.formatNearAmount)(j(z))};class b extends D.TypedError{}u.ServerError=b;class M extends b{}function E(z){const j={},W=x(z,v.default.schema,j,""),Y=new b(P(W,j),W);return Object.assign(Y,j),Y}function P(z,j){return"string"==typeof l.default[z]?w.default.render(l.default[z],Object.assign(Object.assign({},j),m)):JSON.stringify(j)}function x(z,j,W,Y){let G,Q,q;for(const J in j){if(L(z[J]))return z[J];if(F(z[J]))G=z[J],Q=j[J],q=J;else{if(!F(z.kind)||!F(z.kind[J]))continue;G=z.kind[J],Q=j[J],q=J}}if(G&&Q){for(const J of Object.keys(Q.props))W[J]=G[J];return x(G,j,W,q)}return W.kind=z,Y}function F(z){return"[object Object]"===Object.prototype.toString.call(z)}function L(z){return"[object String]"===Object.prototype.toString.call(z)}u.parseRpcError=E,u.parseResultError=function A(z){const j=E(z.status.Failure),W=new M;return Object.assign(W,j),W.type=j.type,W.message=j.message,W.transaction_outcome=z.transaction_outcome,W},u.formatError=P,u.getErrorTypeFromErrorMessage=function N(z,j){switch(!0){case/^account .*? does not exist while viewing$/.test(z):case/^Account .*? doesn't exist$/.test(z):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(z):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(z):return"CodeDoesNotExist";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(z):return"InvalidNonce";default:return j}}},67112:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(u,"__esModule",{value:!0}),u.parseNearAmount=u.formatNearAmount=u.NEAR_NOMINATION=u.NEAR_NOMINATION_EXP=void 0;const D=p(g(98538));u.NEAR_NOMINATION_EXP=24,u.NEAR_NOMINATION=new D.default("10",10).pow(new D.default(u.NEAR_NOMINATION_EXP,10));const w=[],_=new D.default(10);for(let A=0,P=new D.default(5);A0&&x.iadd(w[L])}const N=(A=x.toString()).substring(0,A.length-u.NEAR_NOMINATION_EXP)||"0",F=A.substring(A.length-u.NEAR_NOMINATION_EXP).padStart(u.NEAR_NOMINATION_EXP,"0").substring(0,P);return function b(A){return A.replace(/\.?0*$/,"")}(`${function E(A){const P=/(-?\d+)(\d{3})/;for(;P.test(A);)A=A.replace(P,"$1,$2");return A}(N)}.${F}`)},u.parseNearAmount=function v(A){if(!A)return null;const P=(A=function m(A){return A.replace(/,/g,"").trim()}(A)).split("."),x=P[0],N=P[1]||"";if(P.length>2||N.length>u.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${A}' as NEAR amount`);return function M(A){return A=A.replace(/^0+/,""),""===A?"0":A}(x+N.padEnd(u.NEAR_NOMINATION_EXP,"0"))}},41166:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,_,l,v){void 0===v&&(v=l);var m=Object.getOwnPropertyDescriptor(_,l);(!m||("get"in m?!_.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return _[l]}}),Object.defineProperty(w,v,m)}:function(w,_,l,v){void 0===v&&(v=l),w[v]=_[l]}),D=this&&this.__exportStar||function(w,_){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(_,l)&&p(_,w,l)};Object.defineProperty(u,"__esModule",{value:!0}),D(g(73215),u),D(g(359),u),D(g(67112),u),D(g(30279),u),D(g(11305),u),D(g(85406),u)},30279:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.printTxOutcomeLogs=u.printTxOutcomeLogsAndFailures=void 0;const p=g(359),D=!!process.env.NEAR_NO_LOGS;function _({contractId:l,logs:v,prefix:m=""}){if(!D)for(const b of v)console.log(`${m}Log [${l}]: ${b}`)}u.printTxOutcomeLogsAndFailures=function w({contractId:l,outcome:v}){if(D)return;const m=[v.transaction_outcome,...v.receipts_outcome].reduce((b,M)=>{const E="object"==typeof M.outcome.status&&"object"==typeof M.outcome.status.Failure;return M.outcome.logs.length||E?b.concat({receiptIds:M.outcome.receipt_ids,logs:M.outcome.logs,failure:"object"==typeof M.outcome.status&&void 0!==M.outcome.status.Failure?(0,p.parseRpcError)(M.outcome.status.Failure):null}):b},[]);for(const b of m)console.log(`Receipt${b.receiptIds.length>1?"s":""}: ${b.receiptIds.join(", ")}`),_({contractId:l,logs:b.logs,prefix:"\t"}),b.failure&&console.warn(`\tFailure [${l}]: ${b.failure}`)},u.printTxOutcomeLogs=_},11305:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.getTransactionLastResult=void 0,u.getTransactionLastResult=function g(p){if("object"==typeof p.status&&"string"==typeof p.status.SuccessValue){const D=Buffer.from(p.status.SuccessValue,"base64").toString();try{return JSON.parse(D)}catch{return D}}return null}},85406:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(u,"__esModule",{value:!0}),u.diffEpochValidators=u.findSeatPrice=void 0;const D=p(g(98538)),w=p(g(89176));u.findSeatPrice=function _(b,M,E,A){return A&&A<49?function l(b,M){const E=b.map(F=>new D.default(F.stake,10)).sort((F,L)=>F.cmp(L)),A=new D.default(M),P=E.reduce((F,L)=>F.add(L));if(P.lt(A))throw new Error("Stakes are below seats");let x=new D.default(1),N=P.add(new D.default(1));for(;!x.eq(N.sub(new D.default(1)));){const F=x.add(N).div(new D.default(2));let L=!1,z=new D.default(0);for(let j=0;jnew D.default(x.stake,10)).sort((x,N)=>x.cmp(N)),P=A.reduce((x,N)=>x.add(N));return b.lengthE.set(P.account_id,P));const A=new Set(M.map(P=>P.account_id));return{newValidators:M.filter(P=>!E.has(P.account_id)),removedValidators:b.filter(P=>!A.has(P.account_id)),changedValidators:M.filter(P=>E.has(P.account_id)&&E.get(P.account_id).stake!=P.stake).map(P=>({current:E.get(P.account_id),next:P}))}}},9855:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.WalletConnection=u.ConnectedWalletAccount=u.Near=void 0;var p=g(75754);Object.defineProperty(u,"Near",{enumerable:!0,get:function(){return p.Near}});var D=g(55859);Object.defineProperty(u,"ConnectedWalletAccount",{enumerable:!0,get:function(){return D.ConnectedWalletAccount}}),Object.defineProperty(u,"WalletConnection",{enumerable:!0,get:function(){return D.WalletConnection}})},75754:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(v,m,b,M){return new(b||(b=Promise))(function(A,P){function x(L){try{F(M.next(L))}catch(z){P(z)}}function N(L){try{F(M.throw(L))}catch(z){P(z)}}function F(L){L.done?A(L.value):function E(A){return A instanceof b?A:new b(function(P){P(A)})}(L.value).then(x,N)}F((M=M.apply(v,m||[])).next())})},D=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(u,"__esModule",{value:!0}),u.Near=void 0;const w=g(74931),_=D(g(98538));u.Near=class l{constructor(m){var b;if(this.config=m,this.connection=w.Connection.fromConfig({networkId:m.networkId,provider:{type:"JsonRpcProvider",args:{url:m.nodeUrl,headers:m.headers}},signer:m.signer||{type:"InMemorySigner",keyStore:m.keyStore||(null===(b=m.deps)||void 0===b?void 0:b.keyStore)},jsvmAccountId:m.jsvmAccountId||`jsvm.${m.networkId}`}),m.masterAccount){const M=m.initialBalance?new _.default(m.initialBalance):new _.default("500000000000000000000000000");this.accountCreator=new w.LocalAccountCreator(new w.Account(this.connection,m.masterAccount),M)}else m.helperUrl?this.accountCreator=new w.UrlAccountCreator(this.connection,m.helperUrl):this.accountCreator=null}account(m){return p(this,void 0,void 0,function*(){return new w.Account(this.connection,m)})}createAccount(m,b){return p(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(m,b),new w.Account(this.connection,m)})}}},55859:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(N,F,L,z){return new(L||(L=Promise))(function(W,Y){function G(J){try{q(z.next(J))}catch(H){Y(H)}}function Q(J){try{q(z.throw(J))}catch(H){Y(H)}}function q(J){J.done?W(J.value):function j(W){return W instanceof L?W:new L(function(Y){Y(W)})}(J.value).then(G,Q)}q((z=z.apply(N,F||[])).next())})},D=this&&this.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(u,"__esModule",{value:!0}),u.ConnectedWalletAccount=u.WalletConnection=void 0;const w=g(74931),_=g(29761),l=g(38445),v=D(g(98538)),m=g(21531),A="pending_key";u.WalletConnection=class P{constructor(F,L){if("string"!=typeof L)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(W,Y)=>"isSignedIn"===Y?()=>!1:"getAccountId"===Y?()=>"":W[Y]&&"function"==typeof W[Y]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:W[Y]});this._near=F;const z=L+"_wallet_auth_key",j=JSON.parse(window.localStorage.getItem(z));this._networkId=F.config.networkId,this._walletBaseUrl=F.config.walletUrl,L=L||F.config.contractName||"default",this._keyStore=F.connection.signer.keyStore,this._authData=j||{allKeys:[]},this._authDataKey=z,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return p(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:F,methodNames:L,successUrl:z,failureUrl:j}){return p(this,void 0,void 0,function*(){const W=new URL(window.location.href),Y=new URL(this._walletBaseUrl+"/login/");if(Y.searchParams.set("success_url",z||W.href),Y.searchParams.set("failure_url",j||W.href),F){yield(yield this._near.account(F)).state(),Y.searchParams.set("contract_id",F);const Q=_.KeyPair.fromRandom("ed25519");Y.searchParams.set("public_key",Q.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,A+Q.getPublicKey(),Q)}L&&L.forEach(G=>{Y.searchParams.append("methodNames",G)}),window.location.assign(Y.toString())})}requestSignTransactions({transactions:F,meta:L,callbackUrl:z}){return p(this,void 0,void 0,function*(){const j=new URL(window.location.href),W=new URL("sign",this._walletBaseUrl);W.searchParams.set("transactions",F.map(Y=>(0,m.serialize)(l.SCHEMA,Y)).map(Y=>Buffer.from(Y).toString("base64")).join(",")),W.searchParams.set("callbackUrl",z||j.href),L&&W.searchParams.set("meta",L),window.location.assign(W.toString())})}_completeSignInWithAccessKey(){return p(this,void 0,void 0,function*(){const F=new URL(window.location.href),L=F.searchParams.get("public_key")||"",z=(F.searchParams.get("all_keys")||"").split(","),j=F.searchParams.get("account_id")||"";if(j){const W={accountId:j,allKeys:z};window.localStorage.setItem(this._authDataKey,JSON.stringify(W)),L&&(yield this._moveKeyFromTempToPermanent(j,L)),this._authData=W}F.searchParams.delete("public_key"),F.searchParams.delete("all_keys"),F.searchParams.delete("account_id"),F.searchParams.delete("meta"),F.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,F.toString())})}_moveKeyFromTempToPermanent(F,L){return p(this,void 0,void 0,function*(){const z=yield this._keyStore.getKey(this._networkId,A+L);yield this._keyStore.setKey(this._networkId,F,z),yield this._keyStore.removeKey(this._networkId,A+L)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new x(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class x extends w.Account{constructor(F,L,z){super(L,z),this.walletConnection=F}signAndSendTransaction({receiverId:F,actions:L,walletMeta:z,walletCallbackUrl:j=window.location.href}){const W=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const Y=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let G=yield this.accessKeyForTransaction(F,L,Y);if(!G)throw new Error(`Cannot find matching key for transaction sent to ${F}`);if(Y&&Y.toString()===G.public_key)try{return yield W.signAndSendTransaction.call(this,{receiverId:F,actions:L})}catch(C){if("NotEnoughAllowance"!==C.type)throw C;G=yield this.accessKeyForTransaction(F,L)}const Q=yield this.connection.provider.block({finality:"final"}),q=(0,m.baseDecode)(Q.header.hash),J=_.PublicKey.from(G.public_key),H=G.access_key.nonce.add(new v.default(1)),te=(0,l.createTransaction)(this.accountId,J,F,H,L,q);return yield this.walletConnection.requestSignTransactions({transactions:[te],meta:z,callbackUrl:j}),new Promise((C,o)=>{setTimeout(()=>{o(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(F,L,z){return p(this,void 0,void 0,function*(){const{access_key:{permission:j}}=F;if("FullAccess"===j)return!0;if(j.FunctionCall){const{receiver_id:W,method_names:Y}=j.FunctionCall;if(W===this.accountId&&Y.includes("add_request_and_confirm"))return!0;if(W===L){if(1!==z.length)return!1;const[{functionCall:G}]=z;return G&&(!G.deposit||"0"===G.deposit.toString())&&(0===Y.length||Y.includes(G.methodName))}}return!1})}accessKeyForTransaction(F,L,z){return p(this,void 0,void 0,function*(){const j=yield this.getAccessKeys();if(z){const Y=j.find(G=>G.public_key.toString()===z.toString());if(Y&&(yield this.accessKeyMatchesTransaction(Y,F,L)))return Y}const W=this.walletConnection._authData.allKeys;for(const Y of j)if(-1!==W.indexOf(Y.public_key)&&(yield this.accessKeyMatchesTransaction(Y,F,L)))return Y;return null})}}u.ConnectedWalletAccount=x},67497:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(te,C,o,s){void 0===s&&(s=o);var d=Object.getOwnPropertyDescriptor(C,o);(!d||("get"in d?!C.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return C[o]}}),Object.defineProperty(te,s,d)}:function(te,C,o,s){void 0===s&&(s=o),te[s]=C[o]}),D=this&&this.__setModuleDefault||(Object.create?function(te,C){Object.defineProperty(te,"default",{enumerable:!0,value:C})}:function(te,C){te.default=C}),w=this&&this.__importStar||function(te){if(te&&te.__esModule)return te;var C={};if(null!=te)for(var o in te)"default"!==o&&Object.prototype.hasOwnProperty.call(te,o)&&p(C,te,o);return D(C,te),C},_=this&&this.__awaiter||function(te,C,o,s){return new(o||(o=Promise))(function(h,S){function k(f){try{I(s.next(f))}catch(R){S(R)}}function B(f){try{I(s.throw(f))}catch(R){S(R)}}function I(f){f.done?h(f.value):function d(h){return h instanceof o?h:new o(function(S){S(h)})}(f.value).then(k,B)}I((s=s.apply(te,C||[])).next())})},l=this&&this.__importDefault||function(te){return te&&te.__esModule?te:{default:te}};Object.defineProperty(u,"__esModule",{value:!0});const v=l(g(41348)),m=g(38445),b=g(71836),M=g(91001),E=g(91311),A=g(7123),P=g(45733),x=g(46358),N=g(8127),F=g(98538),L=g(46260),z=g(67388),j=g(89764),W=w(g(65645)),Y=g(35737),G=g(30684),Q=l(g(59881)),q=g(70560),J={mainnet:"https://rpc.mainnet.near.org",testnet:"https://rpc.testnet.near.org"};class H extends b.Account{constructor(C){var o,s;super({networkId:C.network,jsvmAccountId:`jsvm.${C.network}`,signer:new b.InMemorySigner(new M.InMemoryKeyStore),provider:new E.JsonRpcProvider({url:J[C.network]})},C.accountId),this.publicKey=C.publicKey,this.snap=null!==(o=C.snap)&&void 0!==o?o:new Q.default,this.delegateProvider=null!==(s=C.delegateProvider)&&void 0!==s?s:new q.HEREDelegateProvider}get network(){return this.connection.networkId}connect(C,o=[]){return _(this,void 0,void 0,function*(){return yield this.snap.connect({network:this.network,contractId:C,methods:o})})}disconnect(){return _(this,void 0,void 0,function*(){return yield this.snap.disconnect({network:this.network})})}authenticate(C,o){return _(this,void 0,void 0,function*(){yield this.activateIfNeeded();const s=v.default.randomBytes(32),d={message:o,recipient:C,nonce:s,network:this.network},h=yield this.signMessage(d);if(!W.verifySignature(d,h))throw Error("Signature is incorrect");if(!(yield this.getAccessKeys()).some(I=>I.public_key===h.publicKey&&"FullAccess"===I.access_key.permission))throw Error("Signer public key is not full access");return h})}signMessage(C){return _(this,void 0,void 0,function*(){const o=yield this.snap.signMessage({message:C.message,nonce:Array.from(C.nonce),recipient:C.recipient,network:this.network});if(!o)throw Error("Signed result is undefined");const{accountId:s,publicKey:d,signature:h}=o;if(!s||!d||!h)throw Error("Signed result is undefined");return{accountId:s,publicKey:d,signature:h}})}signTransaction(C,o){return _(this,void 0,void 0,function*(){const s=yield this.getLastNonce(),{total:d}=yield this.getAccountBalance(),h=yield this.snap.signTransactions({network:this.connection.networkId,hintBalance:d,transactions:[{recentBlockHash:s.block_hash,nonce:new F.BN(s.nonce).iaddn(1).toNumber(),actions:o.map(z.convertAction),receiverId:C}]});if(!h?.[0])throw Error("Access denided");return[(0,A.base_decode)(h[0][0]),P.SignedTransaction.decode((0,A.base_decode)(h[0][1]))]})}activateIfNeeded(C=2){return _(this,void 0,void 0,function*(){if(C<=0)return null;try{return yield this.getLastNonce()}catch{try{if(!this.delegateProvider)throw Error();return yield this.delegateProvider.activateAccount(this.accountId,this.publicKey.toString(),this.network),yield(0,L.wait)(1e3),yield this.activateIfNeeded(C-1)}catch{return yield this.snap.needActivate(this.network),yield(0,L.wait)(1e3),yield this.activateIfNeeded(C-1)}}})}getLastNonce(){return _(this,void 0,void 0,function*(){return yield this.connection.provider.query({request_type:"view_access_key",public_key:this.publicKey.toString(),account_id:this.accountId,finality:"final"})})}signedDelegate({actions:C,blockHeightTtl:o,receiverId:s,payer:d}){return _(this,void 0,void 0,function*(){const h=yield this.getLastNonce(),S=(0,m.buildDelegateAction)({maxBlockHeight:new F.BN(h.block_height).add(new F.BN(o)),nonce:new F.BN(h.nonce).add(new F.BN(1)),publicKey:this.publicKey,senderId:this.accountId,receiverId:s,actions:C}),{total:k}=yield this.getAccountBalance(),B=yield this.snap.signDelegatedTransactions({payer:d,hintBalance:k,network:this.connection.networkId,delegateAction:{maxBlockHeight:S.maxBlockHeight.toString(),actions:S.actions.map(z.convertAction),publicKey:S.publicKey.toString(),nonce:S.nonce.toString(),receiverId:S.receiverId,senderId:S.senderId}});if(!B?.signature||!B?.transaction)throw Error("Access denied");return{delegateAction:S,signature:{keyType:x.KeyType.ED25519,data:(0,A.base_decode)(B.signature)}}})}signAndSendTransaction({receiverId:C,actions:o}){return _(this,void 0,void 0,function*(){return(yield this.executeTransactions([{actions:o.map(z.convertAction),receiverId:C}]))[0]})}buildDelegateAction(C){return _(this,void 0,void 0,function*(){if(!this.delegateProvider)throw new q.DelegateNotAllowed;if(C instanceof m.DelegateAction){const S=this.connection.networkId,k=yield this.delegateProvider.isCanDelegate(C,S);return{action:C,allowed:k}}const o=yield this.getLastNonce(),s=(0,m.buildDelegateAction)({actions:C.actions.map(j.createAction),maxBlockHeight:new F.BN(o.block_height).add(new F.BN(100)),nonce:new F.BN(o.nonce).add(new F.BN(1)),publicKey:this.publicKey,senderId:this.accountId,receiverId:C.receiverId}),d=this.connection.networkId;return{action:s,allowed:yield this.delegateProvider.isCanDelegate(s,d)}})}executeDelegate(C){return _(this,void 0,void 0,function*(){if(!this.delegateProvider)throw new q.DelegateNotAllowed;yield this.activateIfNeeded();const{action:o,allowed:s}=yield this.buildDelegateAction(C);if(!s){const B=`Delegated transaction is now allowed by ${this.delegateProvider.payer}. Try other DelegateProvider`;throw new q.DelegateNotAllowed(B)}const d=yield this.signedDelegate({payer:this.delegateProvider.payer,actions:o.actions,receiverId:C.receiverId,blockHeightTtl:100}),{provider:h,networkId:S}=this.connection,k=yield this.delegateProvider.sendDelegate(d,S);return yield(0,L.waitTransactionResult)(k,this.accountId,h)})}executeTransaction(C){return _(this,void 0,void 0,function*(){try{if(C.disableDelegate)throw new q.DelegateNotAllowed;return yield this.executeDelegate(C)}catch(o){if(o instanceof q.DelegateNotAllowed||o instanceof q.DelegateRequestError)return(yield this.executeTransactions([C]))[0];throw o}})}executeTransactions(C){return _(this,void 0,void 0,function*(){yield this.activateIfNeeded();const o=yield this.getLastNonce(),{total:s}=yield this.getAccountBalance(),d=yield this.snap.signTransactions({hintBalance:s,network:this.connection.networkId,transactions:C.map((S,k)=>Object.assign({nonce:new F.BN(o.nonce).iaddn(k+1).toNumber(),recentBlockHash:o.block_hash},S))});if(null==d)throw new Y.TransactionSignRejected;const h=[];d?.forEach((S,k)=>{if(null==S)throw new Y.TransactionSignRejected(C[k])});try{for(const S of d){const k=S,B=P.SignedTransaction.decode(Buffer.from(k[1],"hex"));h.push(yield this.connection.provider.sendTransaction(B))}}catch(S){throw new Y.TransactionInListError(h,S)}return h})}static restore({network:C,delegateProvider:o,snap:s=new Q.default}){return _(this,void 0,void 0,function*(){const d=yield s.getAccount(C).catch(()=>null);if(!d?.accountId||!d?.publicKey)return null;const h=new H({publicKey:N.PublicKey.fromString(d.publicKey),accountId:d.accountId,delegateProvider:o,network:C,snap:s});return yield h.activateIfNeeded(),h})}static connect({snap:C=new Q.default,delegateProvider:o,contractId:s,methods:d,network:h}){return _(this,void 0,void 0,function*(){const S=yield C.getStatus();if(S===G.NearSnapStatus.NOT_SUPPORTED)throw Error("You need install Metamask no lower than version 11");S===G.NearSnapStatus.NOT_INSTALLED&&(yield C.install());const k=yield C.connect({contractId:s,methods:d,network:h});if(!k?.accountId)throw Error("Metamask Near Snap did not return account id");if(!k?.publicKey)throw Error("Metamask Near Snap did not return public key");const B=new H({delegateProvider:o,publicKey:N.PublicKey.fromString(k.publicKey),accountId:k.accountId,network:h,snap:C});return yield B.activateIfNeeded(),B})}}u.default=H},70560:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(m,b,M,E){return new(M||(M=Promise))(function(P,x){function N(z){try{L(E.next(z))}catch(j){x(j)}}function F(z){try{L(E.throw(z))}catch(j){x(j)}}function L(z){z.done?P(z.value):function A(P){return P instanceof M?P:new M(function(x){x(P)})}(z.value).then(N,F)}L((E=E.apply(m,b||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.HEREDelegateProvider=u.DelegateRequestError=u.DelegateNotAllowed=void 0;const D=g(7123),w=g(71836);class _ extends Error{}u.DelegateNotAllowed=_;class l extends Error{}u.DelegateRequestError=l;u.HEREDelegateProvider=class v{constructor(){this.endpoint="https://api.herewallet.app/api/v1",this.payer="here"}activateAccount(b,M,E){return p(this,void 0,void 0,function*(){const A=yield fetch(`${this.endpoint}/user/create_near_username`,{method:"POST",body:JSON.stringify({near_account_id:b,device_id:"metamask",public_key:M,sign:""}),headers:{Network:E}});if(!A.ok)throw new l(yield A.text())})}isCanDelegate(b,M="mainnet"){return p(this,void 0,void 0,function*(){if("mainnet"!==M)return!1;const E=Buffer.from(w.transactions.encodeDelegateAction(b)).toString("base64"),A=yield fetch(`${this.endpoint}/transactions/is_delegate`,{body:JSON.stringify({transaction:E}),method:"POST"});if(!A.ok)throw new l(yield A.text());const{allowed:P}=yield A.json();return P})}sendDelegate(b,M="mainnet"){return p(this,void 0,void 0,function*(){if("mainnet"!==M)throw new _;const E=Buffer.from(w.transactions.encodeDelegateAction(b.delegateAction)).toString("base64"),A=yield fetch(`${this.endpoint}/transactions/call_delegate`,{method:"POST",body:JSON.stringify({signature:(0,D.base_encode)(b.signature.data),transaction:E})});if(!A.ok)throw new l(yield A.text());const{hash:P}=yield A.json();return P})}}},35737:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.TransactionInListError=u.TransactionSignRejected=void 0;class g extends Error{constructor(w){super("Transaction was rejected by Metamask user"),this.name="TransactionSignRejected",this.trx=w}}u.TransactionSignRejected=g;class p extends Error{constructor(w,_){super(_ instanceof Error?_.message:String(_)),this.name="ListOfTransactionsError",this.completed=w,this.reason=_}}u.TransactionInListError=p},72487:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(b,M,E,A){void 0===A&&(A=E);var P=Object.getOwnPropertyDescriptor(M,E);(!P||("get"in P?!M.__esModule:P.writable||P.configurable))&&(P={enumerable:!0,get:function(){return M[E]}}),Object.defineProperty(b,A,P)}:function(b,M,E,A){void 0===A&&(A=E),b[A]=M[E]}),D=this&&this.__exportStar||function(b,M){for(var E in b)"default"!==E&&!Object.prototype.hasOwnProperty.call(M,E)&&p(M,b,E)},w=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(u,"__esModule",{value:!0}),u.NearSnapAccount=u.TransactionSignRejected=u.TransactionInListError=u.NearSnapProvider=u.NearSnap=void 0,D(g(30684),u);var _=g(59881);Object.defineProperty(u,"NearSnap",{enumerable:!0,get:function(){return w(_).default}});var l=g(10243);Object.defineProperty(u,"NearSnapProvider",{enumerable:!0,get:function(){return w(l).default}});var v=g(35737);Object.defineProperty(u,"TransactionInListError",{enumerable:!0,get:function(){return v.TransactionInListError}}),Object.defineProperty(u,"TransactionSignRejected",{enumerable:!0,get:function(){return v.TransactionSignRejected}});var m=g(67497);Object.defineProperty(u,"NearSnapAccount",{enumerable:!0,get:function(){return w(m).default}})},10243:function(re,u){"use strict";var g=this&&this.__awaiter||function(D,w,_,l){return new(_||(_=Promise))(function(m,b){function M(P){try{A(l.next(P))}catch(x){b(x)}}function E(P){try{A(l.throw(P))}catch(x){b(x)}}function A(P){P.done?m(P.value):function v(m){return m instanceof _?m:new _(function(b){b(m)})}(P.value).then(M,E)}A((l=l.apply(D,w||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0});u.default=class p{isSnapsAvailable(w=11){return g(this,void 0,void 0,function*(){const _=window.ethereum,l=yield _?.request({method:"web3_clientVersion"}).catch(()=>null);if("string"!=typeof l)return!1;const v=l.replace("MetaMask/v","").split(".")[0];return Number(v)>=w})}getSnaps(){return g(this,void 0,void 0,function*(){return yield window.ethereum.request({method:"wallet_getSnaps"})})}connectSnap(w,_={}){return g(this,void 0,void 0,function*(){yield window.ethereum.request({method:"wallet_requestSnaps",params:{[w]:_}})})}getSnap(w,_){return g(this,void 0,void 0,function*(){try{const l=yield this.getSnaps();return Object.values(l).find(v=>v.id===w&&(!_||v.version===_))}catch(l){return void console.log("Failed to obtain installed snap",l)}})}invokeSnap(w,_,l){return g(this,void 0,void 0,function*(){return yield window.ethereum.request({method:"wallet_invokeSnap",params:{snapId:w,request:{method:_,params:l}}})})}}},59881:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(v,m,b,M){return new(b||(b=Promise))(function(A,P){function x(L){try{F(M.next(L))}catch(z){P(z)}}function N(L){try{F(M.throw(L))}catch(z){P(z)}}function F(L){L.done?A(L.value):function E(A){return A instanceof b?A:new b(function(P){P(A)})}(L.value).then(x,N)}F((M=M.apply(v,m||[])).next())})},D=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(u,"__esModule",{value:!0});const w=D(g(10243)),_=g(30684);u.default=class l{constructor(m){var b,M;this.provider=null!==(b=m?.provider)&&void 0!==b?b:new w.default,this.id=null!==(M=m?.id)&&void 0!==M?M:"npm:@near-snap/plugin"}get isLocal(){return this.id.startsWith("local:")}getStatus(){return p(this,void 0,void 0,function*(){return(yield this.provider.isSnapsAvailable())?(yield this.provider.getSnap(this.id))?_.NearSnapStatus.INSTALLED:_.NearSnapStatus.NOT_INSTALLED:_.NearSnapStatus.NOT_SUPPORTED})}install(){return p(this,void 0,void 0,function*(){yield this.provider.connectSnap(this.id)})}getAccount(m){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_getAccount",{network:m})})}connect(m){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_connect",m)})}disconnect(m){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_disconnect",m)})}getPermissions(m){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_getPermissions",{network:m})})}needActivate(m){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_needActivate",{network:m})})}signMessage(m){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signMessage",m)})}signDelegatedTransactions(m){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signDelegate",m)})}signTransactions(m){return p(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signTransactions",m)})}}},30684:(re,u)=>{"use strict";var g,p;Object.defineProperty(u,"__esModule",{value:!0}),u.NearSnapStatus=void 0,(p=g||(u.NearSnapStatus=g={}))[p.NOT_SUPPORTED=0]="NOT_SUPPORTED",p[p.NOT_INSTALLED=1]="NOT_INSTALLED",p[p.INSTALLED=2]="INSTALLED"},67388:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.convertAction=u.TGAS=void 0,u.TGAS=Math.pow(10,12);const g=D=>{try{return JSON.parse(Buffer.from(D).toString("utf8"))}catch{return Array.from(D)}};u.convertAction=D=>{var w,_,l,v,m,b;if(D.addKey){const{accessKey:M,publicKey:E}=D.addKey;if(M.permission.fullAccess)return{type:"AddKey",params:{accessKey:{permission:"FullAccess"},publicKey:E.toString()}};if(M.permission.functionCall){const A=M.permission.functionCall;return{type:"AddKey",params:{publicKey:E.toString(),accessKey:{permission:{receiverId:A.receiverId,methodNames:A.methodNames,allowance:null===(w=A.allowance)||void 0===w?void 0:w.toString(10)}}}}}}if(D.createAccount)return{type:"CreateAccount"};if(D.deleteAccount)return{type:"DeleteAccount",params:{beneficiaryId:D.deleteAccount.beneficiaryId}};if(D.deleteKey)return{type:"DeleteKey",params:{publicKey:D.deleteKey.publicKey.toString()}};if(D.deployContract)return{type:"DeployContract",params:{code:D.deployContract.code}};if(D.functionCall)return{type:"FunctionCall",params:{args:g(D.functionCall.args),deposit:null!==(l=null===(_=D.functionCall.deposit)||void 0===_?void 0:_.toString())&&void 0!==l?l:"0",gas:null!==(m=null===(v=D.functionCall.gas)||void 0===v?void 0:v.toString())&&void 0!==m?m:String(300*u.TGAS),methodName:null!==(b=D.functionCall.methodName)&&void 0!==b?b:""}};if(D.transfer)return{type:"Transfer",params:{deposit:D.transfer.deposit.toString()}};if(D.stake)return{type:"Stake",params:{publicKey:D.stake.publicKey.toString(),stake:D.stake.stake.toString()}};throw Error(`Action ${D.enum} is not supported`)}},89764:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(M,E,A,P){void 0===P&&(P=A);var x=Object.getOwnPropertyDescriptor(E,A);(!x||("get"in x?!E.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return E[A]}}),Object.defineProperty(M,P,x)}:function(M,E,A,P){void 0===P&&(P=A),M[P]=E[A]}),D=this&&this.__setModuleDefault||(Object.create?function(M,E){Object.defineProperty(M,"default",{enumerable:!0,value:E})}:function(M,E){M.default=E}),w=this&&this.__importStar||function(M){if(M&&M.__esModule)return M;var E={};if(null!=M)for(var A in M)"default"!==A&&Object.prototype.hasOwnProperty.call(M,A)&&p(E,M,A);return D(E,M),E};Object.defineProperty(u,"__esModule",{value:!0}),u.createAction=void 0;const _=g(98538),l=w(g(45733)),v=g(8127);u.createAction=M=>{switch(M.type){case"CreateAccount":return l.createAccount();case"DeployContract":{const{code:E}=M.params;return l.deployContract(E)}case"FunctionCall":{const{methodName:E,args:A,gas:P,deposit:x}=M.params;return l.functionCall(E,A,new _.BN(P),new _.BN(x))}case"Transfer":{const{deposit:E}=M.params;return l.transfer(new _.BN(E))}case"Stake":{const{stake:E,publicKey:A}=M.params;return l.stake(new _.BN(E),v.PublicKey.from(A))}case"AddKey":{const{publicKey:E,accessKey:A}=M.params;return l.addKey(v.PublicKey.from(E),(M=>{if("FullAccess"===M)return l.fullAccessKey();const{receiverId:E,methodNames:A=[]}=M,P=M.allowance?new _.BN(M.allowance):void 0;return l.functionCallAccessKey(E,A,P)})(A.permission))}case"DeleteKey":{const{publicKey:E}=M.params;return l.deleteKey(v.PublicKey.from(E))}case"DeleteAccount":{const{beneficiaryId:E}=M.params;return l.deleteAccount(E)}default:throw new Error("Invalid action type")}}},65645:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(u,"__esModule",{value:!0}),u.verifySignature=u.authPayloadSchema=u.AuthPayload=void 0;const D=p(g(41348)),w=g(8127),_=g(7123);class l{constructor({message:b,nonce:M,recipient:E,callbackUrl:A}){this.tag=2147484061,this.message=b,this.nonce=M,this.recipient=E,A&&(this.callbackUrl=A)}}u.AuthPayload=l,u.authPayloadSchema=new Map([[l,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),u.verifySignature=function v(m,b){const M=new l(m),E=(0,_.serialize)(u.authPayloadSchema,M),A=D.default.createHash("sha256"),P=Uint8Array.from(A.update(E).digest()),x=new Uint8Array(Buffer.from(b.signature,"base64"));return w.PublicKey.from(b.publicKey).verify(P,x)}},46260:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(l,v,m,b){return new(m||(m=Promise))(function(E,A){function P(F){try{N(b.next(F))}catch(L){A(L)}}function x(F){try{N(b.throw(F))}catch(L){A(L)}}function N(F){F.done?E(F.value):function M(E){return E instanceof m?E:new m(function(A){A(E)})}(F.value).then(P,x)}N((b=b.apply(l,v||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.waitTransactionResult=u.wait=void 0;const D=g(5754);u.wait=l=>new Promise(v=>setTimeout(v,l));u.waitTransactionResult=(l,v,m)=>p(void 0,void 0,void 0,function*(){let b;yield(0,u.wait)(2e3);try{b=yield m.txStatus(l,v)}catch{return yield(0,u.waitTransactionResult)(l,v,m)}const M=[],E=b.transaction_outcome.outcome,A=b.receipts_outcome.reduce((N,F)=>(N[F.id]=F.outcome,N),{}),P=N=>N.some(F=>{if(!A[F])return!1;const{status:L}=A[F];return"string"==typeof L?(L===D.ExecutionStatusBasic.Failure&&M.push(L),!1):L.Failure?(M.push(L.Failure),!1):"string"==typeof L.SuccessValue&&0===A[F].receipt_ids.length||P(A[F].receipt_ids)}),x=P(E.receipt_ids);if(M.length>0)throw Error(JSON.stringify(M,null,2));return x?b:yield(0,u.waitTransactionResult)(l,v,m)})},76913:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(u,"__esModule",{value:!0});const D=p(g(87908)),w=p(g(98593)),_=p(g(50539)),l=p(g(13917)),v=p(g(15247)),m={development:Object.assign(Object.assign({},_.default),D.default),test:Object.assign({},w.default),staging:Object.assign(Object.assign({},_.default),v.default),production:Object.assign(Object.assign({},_.default),l.default)},b=process.env.CONFIG_ENV||"production";if(!(b in m))throw new Error(`${b} is not a valid env config`);const M=m[b];u.default=M},863:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(u,"__esModule",{value:!0}),u.createAction=u.parseArgs=void 0;const D=g(8597),w=p(g(98538));u.parseArgs=m=>"string"==typeof m?Buffer.from(m,"base64"):m;u.createAction=m=>{switch(m.type){case"CreateAccount":return D.transactions.createAccount();case"DeployContract":{const{code:b}=m.params;return D.transactions.deployContract(b)}case"FunctionCall":{const{methodName:b,args:M,gas:E,deposit:A}=m.params;return D.transactions.functionCall(b,(0,u.parseArgs)(M),new w.default(E),new w.default(A))}case"Transfer":{const{deposit:b}=m.params;return D.transactions.transfer(new w.default(b))}case"Stake":{const{stake:b,publicKey:M}=m.params;return D.transactions.stake(new w.default(b),D.utils.PublicKey.from(M))}case"AddKey":{const{publicKey:b,accessKey:M}=m.params;return D.transactions.addKey(D.utils.PublicKey.from(b),(m=>{if("FullAccess"===m)return D.transactions.fullAccessKey();const{receiverId:b,methodNames:M=[]}=m,E=m.allowance?new w.default(m.allowance):void 0;return D.transactions.functionCallAccessKey(b,M,E)})(M.permission))}case"DeleteKey":{const{publicKey:b}=m.params;return D.transactions.deleteKey(D.utils.PublicKey.from(b))}case"DeleteAccount":{const{beneficiaryId:b}=m.params;return D.transactions.deleteAccount(b)}default:throw new Error("Invalid action type")}}},23183:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.isValidAccessKey=void 0;u.isValidAccessKey=(p,D,w,_)=>{if(D.public_key===w)return!0;const{permission:l}=D.access_key;if("FullAccess"===l)return!0;if(_&&l.FunctionCall){const{receiver_id:v,method_names:m}=l.FunctionCall;if(v===p&&m.includes("add_request_and_confirm"))return!0;if(v===_.receiverId)return 1===_.actions.length&&_.actions.every(b=>"FunctionCall"===b.type&&((!b.params.deposit||"0"===b.params.deposit.toString())&&(0===m.length||m.includes(b.params.methodName))))}return!1}},33492:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(m,b,M,E){void 0===E&&(E=M);var A=Object.getOwnPropertyDescriptor(b,M);(!A||("get"in A?!b.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return b[M]}}),Object.defineProperty(m,E,A)}:function(m,b,M,E){void 0===E&&(E=M),m[E]=b[M]}),D=this&&this.__setModuleDefault||(Object.create?function(m,b){Object.defineProperty(m,"default",{enumerable:!0,value:b})}:function(m,b){m.default=b}),w=this&&this.__importStar||function(m){if(m&&m.__esModule)return m;var b={};if(null!=m)for(var M in m)"default"!==M&&Object.prototype.hasOwnProperty.call(m,M)&&p(b,m,M);return D(b,m),b},_=this&&this.__awaiter||function(m,b,M,E){return new(M||(M=Promise))(function(P,x){function N(z){try{L(E.next(z))}catch(j){x(j)}}function F(z){try{L(E.throw(z))}catch(j){x(j)}}function L(z){z.done?P(z.value):function A(P){return P instanceof M?P:new M(function(x){x(P)})}(z.value).then(N,F)}L((E=E.apply(m,b||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0});const l=w(g(27682));u.default=function v(m,b,M={}){let E,A=!1;const x=(()=>_(this,void 0,void 0,function*(){const{delay:N=1e3,maxIterations:F,timeout:L}=M;let W,z=0,j=!1;function Y(){return _(this,void 0,void 0,function*(){j=!1;try{return yield void 0!==L?(0,l.default)(m(),L):m()}catch(G){if(!(G instanceof l.TimeoutPromiseError))throw G;j=!0}})}for(W=yield Y();!A&&(j||b(W));){if(z===F)throw new Error("Polling executed the maximum number iterations");yield new Promise(G=>{E=setTimeout(()=>_(this,void 0,void 0,function*(){z++,W=yield Y(),G()}),N)})}return W}))();return x.abort=()=>{A=!0,clearTimeout(E)},x}},27682:function(re,u){"use strict";var g=this&&this.__awaiter||function(w,_,l,v){return new(l||(l=Promise))(function(b,M){function E(x){try{P(v.next(x))}catch(N){M(N)}}function A(x){try{P(v.throw(x))}catch(N){M(N)}}function P(x){x.done?b(x.value):function m(b){return b instanceof l?b:new l(function(M){M(b)})}(x.value).then(E,A)}P((v=v.apply(w,_||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.TimeoutPromiseError=void 0;class p extends Error{constructor(){super("Promise timeout")}}u.TimeoutPromiseError=p,u.default=function D(w,_){return g(this,void 0,void 0,function*(){let l;const v=new Promise((b,M)=>{l=setTimeout(()=>{M(new p)},_)}),m=yield Promise.race([w,v]);return clearTimeout(l),m})}},39825:(re,u)=>{"use strict";var g,p;Object.defineProperty(u,"__esModule",{value:!0}),u.SignerRequestStatus=void 0,(p=g||(u.SignerRequestStatus=g={})).PENDING="pending",p.APPROVED="approved",p.REJECTED="rejected"},96299:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ApiError=void 0;class g extends Error{constructor(D,w,_){super(_),this.name="ApiError",this.url=w.url,this.status=w.status,this.statusText=w.statusText,this.body=w.body,this.request=D}}u.ApiError=g},43868:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.CancelablePromise=u.CancelError=void 0;class g extends Error{constructor(w){super(w),this.name="CancelError"}get isCancelled(){return!0}}u.CancelError=g;u.CancelablePromise=class p{constructor(w){this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((_,l)=>{this._resolve=_,this._reject=l;const b=M=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(M)};return Object.defineProperty(b,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(b,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(b,"isCancelled",{get:()=>this._isCancelled}),w(M=>{var E;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,null===(E=this._resolve)||void 0===E||E.call(this,M))},M=>{var E;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,null===(E=this._reject)||void 0===E||E.call(this,M))},b)})}then(w,_){return this._promise.then(w,_)}catch(w){return this._promise.catch(w)}finally(w){return this._promise.finally(w)}cancel(){var w;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const _ of this._cancelHandlers)_()}catch(_){return void console.warn("Cancellation threw an error",_)}this._cancelHandlers.length=0,null===(w=this._reject)||void 0===w||w.call(this,new g("Request aborted"))}}get isCancelled(){return this._isCancelled}}},75023:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(u,"__esModule",{value:!0}),u.OpenAPI=void 0;const D=p(g(76913));u.OpenAPI={BASE:D.default.proxyUrl,VERSION:"0.0.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0}},51022:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(G,Q,q,J){return new(q||(q=Promise))(function(te,C){function o(h){try{d(J.next(h))}catch(S){C(S)}}function s(h){try{d(J.throw(h))}catch(S){C(S)}}function d(h){h.done?te(h.value):function H(te){return te instanceof q?te:new q(function(C){C(te)})}(h.value).then(o,s)}d((J=J.apply(G,Q||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.request=u.sendRequest=void 0;const D=g(96299),w=g(43868),_=G=>null!=G,l=G=>"string"==typeof G,v=G=>l(G)&&""!==G,m=G=>"object"==typeof G&&"string"==typeof G.type&&"function"==typeof G.stream&&"function"==typeof G.arrayBuffer&&"function"==typeof G.constructor&&"string"==typeof G.constructor.name&&/^(Blob|File)$/.test(G.constructor.name)&&/^(Blob|File)$/.test(G[Symbol.toStringTag]),b=G=>G instanceof FormData,E=G=>{const Q=[],J=(H,te)=>{_(te)&&(Array.isArray(te)?te.forEach(C=>{J(H,C)}):"object"==typeof te?Object.entries(te).forEach(([C,o])=>{J(`${H}[${C}]`,o)}):((H,te)=>{Q.push(`${encodeURIComponent(H)}=${encodeURIComponent(String(te))}`)})(H,te))};return Object.entries(G).forEach(([H,te])=>{J(H,te)}),Q.length>0?`?${Q.join("&")}`:""},x=(G,Q)=>p(void 0,void 0,void 0,function*(){return"function"==typeof Q?Q(G):Q}),N=(G,Q)=>p(void 0,void 0,void 0,function*(){const q=yield x(Q,G.TOKEN),J=yield x(Q,G.USERNAME),H=yield x(Q,G.PASSWORD),te=yield x(Q,G.HEADERS),C=Object.entries(Object.assign(Object.assign({Accept:"application/json"},te),Q.headers)).filter(([o,s])=>_(s)).reduce((o,[s,d])=>Object.assign(Object.assign({},o),{[s]:String(d)}),{});if(v(q)&&(C.Authorization=`Bearer ${q}`),v(J)&&v(H)){const o=(G=>{try{return btoa(G)}catch{return Buffer.from(G).toString("base64")}})(`${J}:${H}`);C.Authorization=`Basic ${o}`}return Q.body&&(Q.mediaType?C["Content-Type"]=Q.mediaType:m(Q.body)?C["Content-Type"]=Q.body.type||"application/octet-stream":l(Q.body)?C["Content-Type"]="text/plain":b(Q.body)||(C["Content-Type"]="application/json")),new Headers(C)});u.sendRequest=(G,Q,q,J,H,te,C)=>p(void 0,void 0,void 0,function*(){const o=new AbortController,s={headers:te,body:J??H,method:Q.method,signal:o.signal};return G.WITH_CREDENTIALS&&(s.credentials=G.CREDENTIALS),C(()=>o.abort()),yield fetch(q,s)});u.request=(G,Q)=>new w.CancelablePromise((q,J,H)=>p(void 0,void 0,void 0,function*(){try{const te=((G,Q)=>{const q=G.ENCODE_PATH||encodeURI,J=Q.url.replace("{api-version}",G.VERSION).replace(/{(.*?)}/g,(te,C)=>{var o;return null!==(o=Q.path)&&void 0!==o&&o.hasOwnProperty(C)?q(String(Q.path[C])):te}),H=`${G.BASE}${J}`;return Q.query?`${H}${E(Q.query)}`:H})(G,Q),C=(G=>{if(G.formData){const Q=new FormData,q=(J,H)=>{l(H)||m(H)?Q.append(J,H):Q.append(J,JSON.stringify(H))};return Object.entries(G.formData).filter(([J,H])=>_(H)).forEach(([J,H])=>{Array.isArray(H)?H.forEach(te=>q(J,te)):q(J,H)}),Q}})(Q),o=(G=>{var Q;if(G.body)return null!==(Q=G.mediaType)&&void 0!==Q&&Q.includes("/json")?JSON.stringify(G.body):l(G.body)||m(G.body)||b(G.body)?G.body:JSON.stringify(G.body)})(Q),s=yield N(G,Q);if(!H.isCancelled){const d=yield(0,u.sendRequest)(G,Q,te,o,C,s,H),h=yield(G=>p(void 0,void 0,void 0,function*(){if(204!==G.status)try{const Q=G.headers.get("Content-Type");if(Q)return Q.toLowerCase().startsWith("application/json")?yield G.json():yield G.text()}catch(Q){console.error(Q)}}))(d),S=((G,Q)=>{if(Q){const q=G.headers.get(Q);if(l(q))return q}})(d,Q.responseHeader),k={url:te,ok:d.ok,status:d.status,statusText:d.statusText,body:S??h};((G,Q)=>{const J=Object.assign({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},G.errors)[Q.status];if(J)throw new D.ApiError(G,Q,J);if(!Q.ok)throw new D.ApiError(G,Q,"Generic Error")})(Q,k),q(k.body)}}catch(te){J(te)}}))},9273:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.SignerRequestApi=u.$SignRequest=u.$SignMessageRequestPayload=u.$SignMessageRequestDto=u.$SignerTransactionDto=u.$SignerRequestStatusDto=u.$SignerRequestDto=u.$DAppMetadatRequest=u.$DAppMetadataDto=u.$CreateSignMessageRequest=u.$CreateSignerRequest=u.OpenAPI=u.CancelError=u.CancelablePromise=u.ApiError=void 0;var p=g(96299);Object.defineProperty(u,"ApiError",{enumerable:!0,get:function(){return p.ApiError}});var D=g(43868);Object.defineProperty(u,"CancelablePromise",{enumerable:!0,get:function(){return D.CancelablePromise}}),Object.defineProperty(u,"CancelError",{enumerable:!0,get:function(){return D.CancelError}});var w=g(75023);Object.defineProperty(u,"OpenAPI",{enumerable:!0,get:function(){return w.OpenAPI}});var _=g(16588);Object.defineProperty(u,"$CreateSignerRequest",{enumerable:!0,get:function(){return _.$CreateSignerRequest}});var l=g(82988);Object.defineProperty(u,"$CreateSignMessageRequest",{enumerable:!0,get:function(){return l.$CreateSignMessageRequest}});var v=g(57470);Object.defineProperty(u,"$DAppMetadataDto",{enumerable:!0,get:function(){return v.$DAppMetadataDto}});var m=g(71482);Object.defineProperty(u,"$DAppMetadatRequest",{enumerable:!0,get:function(){return m.$DAppMetadatRequest}});var b=g(48322);Object.defineProperty(u,"$SignerRequestDto",{enumerable:!0,get:function(){return b.$SignerRequestDto}});var M=g(47282);Object.defineProperty(u,"$SignerRequestStatusDto",{enumerable:!0,get:function(){return M.$SignerRequestStatusDto}});var E=g(34652);Object.defineProperty(u,"$SignerTransactionDto",{enumerable:!0,get:function(){return E.$SignerTransactionDto}});var A=g(25654);Object.defineProperty(u,"$SignMessageRequestDto",{enumerable:!0,get:function(){return A.$SignMessageRequestDto}});var P=g(93089);Object.defineProperty(u,"$SignMessageRequestPayload",{enumerable:!0,get:function(){return P.$SignMessageRequestPayload}});var x=g(53951);Object.defineProperty(u,"$SignRequest",{enumerable:!0,get:function(){return x.$SignRequest}});var N=g(61123);Object.defineProperty(u,"SignerRequestApi",{enumerable:!0,get:function(){return N.SignerRequestApi}})},82988:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.$CreateSignMessageRequest=void 0,u.$CreateSignMessageRequest={properties:{network:{type:"Enum",isRequired:!0},message:{type:"string",isRequired:!0},receiver:{type:"string",isRequired:!0},nonce:{type:"array",contains:{type:"number"},isRequired:!0},callbackUrl:{type:"string"},receiverMetadata:{type:"DAppMetadatRequest"}}}},16588:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.$CreateSignerRequest=void 0,u.$CreateSignerRequest={properties:{network:{type:"Enum",isRequired:!0},transactions:{type:"array",contains:{type:"one-of",contains:[{type:"SignerTransactionDto"}]},isRequired:!0},dAppMetadata:{type:"DAppMetadatRequest"}}}},71482:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.$DAppMetadatRequest=void 0,u.$DAppMetadatRequest={properties:{}}},57470:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.$DAppMetadataDto=void 0,u.$DAppMetadataDto={properties:{name:{type:"string",isRequired:!0},logoUrl:{type:"string",isRequired:!0},url:{type:"string"}}}},25654:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.$SignMessageRequestDto=void 0,u.$SignMessageRequestDto={properties:{id:{type:"string",isRequired:!0},message:{type:"string",isRequired:!0},receiver:{type:"string",isRequired:!0},nonce:{type:"array",contains:{type:"number"},isRequired:!0},callbackUrl:{type:"string"},network:{type:"Enum",isRequired:!0},response:{properties:{},isRequired:!0},receiverMetadata:{type:"DAppMetadataDto"},status:{type:"Enum",isRequired:!0}}}},93089:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.$SignMessageRequestPayload=void 0,u.$SignMessageRequestPayload={properties:{accountId:{type:"string",isRequired:!0},signature:{type:"string",isRequired:!0},publicKey:{type:"string",isRequired:!0}}}},53951:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.$SignRequest=void 0,u.$SignRequest={properties:{signerAccountId:{type:"string",isRequired:!0},txHash:{type:"array",contains:{type:"string"},isRequired:!0}}}},48322:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.$SignerRequestDto=void 0,u.$SignerRequestDto={properties:{id:{type:"string",isRequired:!0},status:{type:"Enum",isRequired:!0},network:{type:"Enum",isRequired:!0},signerAccountId:{type:"string",isRequired:!0},requests:{type:"array",contains:{properties:{}},isRequired:!0},dAppMetadata:{type:"DAppMetadataDto"},txHash:{type:"array",contains:{type:"string"}},createdAt:{type:"string",isRequired:!0,format:"date-time"},updatedAt:{type:"string",isRequired:!0,format:"date-time"}}}},47282:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.$SignerRequestStatusDto=void 0,u.$SignerRequestStatusDto={properties:{id:{type:"string",isRequired:!0},status:{type:"Enum",isRequired:!0}}}},34652:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.$SignerTransactionDto=void 0,u.$SignerTransactionDto={properties:{signerId:{type:"string"},receiverId:{type:"string"},actions:{type:"array",contains:{properties:{}},isRequired:!0}}}},61123:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.SignerRequestApi=void 0;const p=g(75023),D=g(51022);u.SignerRequestApi=class w{static createSignerRequest(l){return(0,D.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request",body:l,mediaType:"application/json"})}static getSignerRequestStatus(l){return(0,D.request)(p.OpenAPI,{method:"GET",url:"/api/signer-request/{id}/status",path:{id:l}})}static approveSignerRequest(l,v){return(0,D.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request/{id}/approve",path:{id:l},body:v,mediaType:"application/json"})}static rejectSignerRequest(l){return(0,D.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request/{id}/reject",path:{id:l}})}static getSignerRequest(l){return(0,D.request)(p.OpenAPI,{method:"GET",url:"/api/signer-request/{id}",path:{id:l}})}static createSignMessageRequest(l){return(0,D.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request/message",body:l,mediaType:"application/json"})}static getSignMessageRequest(l){return(0,D.request)(p.OpenAPI,{method:"GET",url:"/api/signer-request/message/{id}",path:{id:l}})}static signMessageRequest(l,v){return(0,D.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request/message/{id}/sign",path:{id:l},body:v,mediaType:"application/json"})}static rejectMessageRequest(l){return(0,D.request)(p.OpenAPI,{method:"POST",url:"/api/signer-request/message/{id}/reject",path:{id:l}})}}},2199:(re,u)=>{"use strict";var g,p;Object.defineProperty(u,"__esModule",{value:!0}),u.RepositoryErrorCodes=u.SessionRepositoryErrorCodes=void 0,(p=g||(u.SessionRepositoryErrorCodes=g={})).INVALID_ACCOUNT_ID="INVALID_ACCOUNT_ID",p.ACCOUNT_KEY_NOT_FOUND="ACCOUNT_KEY_NOT_FOUND",u.RepositoryErrorCodes=g},21251:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,_,l,v){void 0===v&&(v=l);var m=Object.getOwnPropertyDescriptor(_,l);(!m||("get"in m?!_.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return _[l]}}),Object.defineProperty(w,v,m)}:function(w,_,l,v){void 0===v&&(v=l),w[v]=_[l]}),D=this&&this.__exportStar||function(w,_){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(_,l)&&p(_,w,l)};Object.defineProperty(u,"__esModule",{value:!0}),D(g(69560),u)},45358:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(v,m,b,M){return new(b||(b=Promise))(function(A,P){function x(L){try{F(M.next(L))}catch(z){P(z)}}function N(L){try{F(M.throw(L))}catch(z){P(z)}}function F(L){L.done?A(L.value):function E(A){return A instanceof b?A:new b(function(P){P(A)})}(L.value).then(x,N)}F((M=M.apply(v,m||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.SessionRepository=void 0;const D=g(82687),w=g(2199),_=g(8597);class l extends D.WindowLocalStorageRepository{constructor(){super("session"),this.loadSessionState()}loadSessionState(){return p(this,void 0,void 0,function*(){(yield this.get())||(yield this.set({mainnet:{activeAccount:null,accounts:{}},testnet:{activeAccount:null,accounts:{}}}))})}getKey(m,b){var M;return p(this,void 0,void 0,function*(){const A=null===(M=(yield this.get())[m])||void 0===M?void 0:M.accounts[b];if(!A)throw new Error(w.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND);return _.KeyPair.fromString(A)})}setKey(m,b,M){return p(this,void 0,void 0,function*(){const E=yield this.get();E[m].accounts[b]=M.toString(),yield this.set(E)})}removeKey(m,b){return p(this,void 0,void 0,function*(){const M=yield this.get();M[m].activeAccount===b&&(M[m].activeAccount=null),delete M[m].accounts[b],yield this.set(M)})}getActiveAccount(m){return p(this,void 0,void 0,function*(){return(yield this.get())[m].activeAccount})}setActiveAccount(m,b){return p(this,void 0,void 0,function*(){const M=yield this.get();if(!Object.keys(M[m].accounts).includes(b))throw new Error(w.RepositoryErrorCodes.INVALID_ACCOUNT_ID);M[m].activeAccount=b,yield this.set(M)})}getAccounts(m){return p(this,void 0,void 0,function*(){const M=(yield this.get())[m].accounts;return Object.keys(M)})}getNetworks(){return p(this,void 0,void 0,function*(){const m=yield this.get();return Object.keys(m)})}clear(){return p(this,void 0,void 0,function*(){yield this.clear()})}}u.SessionRepository=l},98494:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,_,l,v){void 0===v&&(v=l);var m=Object.getOwnPropertyDescriptor(_,l);(!m||("get"in m?!_.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return _[l]}}),Object.defineProperty(w,v,m)}:function(w,_,l,v){void 0===v&&(v=l),w[v]=_[l]}),D=this&&this.__exportStar||function(w,_){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(_,l)&&p(_,w,l)};Object.defineProperty(u,"__esModule",{value:!0}),D(g(45358),u)},61439:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Repository=void 0;u.Repository=class g{constructor(D){this.projectName="near-mobile-signer",this.key=`${this.projectName}:${D}`}}},82687:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.WindowLocalStorageRepository=void 0;const p=g(61439);class D extends p.Repository{set(_){return Promise.resolve(window.localStorage.setItem(this.key,JSON.stringify(_)))}get(){const _=window.localStorage.getItem(this.key);return Promise.resolve(_?JSON.parse(_):void 0)}clear(){return Promise.resolve(window.localStorage.removeItem(this.key))}}u.WindowLocalStorageRepository=D},75729:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.WindowLocalStorageRepository=u.Repository=void 0;var p=g(61439);Object.defineProperty(u,"Repository",{enumerable:!0,get:function(){return p.Repository}});var D=g(82687);Object.defineProperty(u,"WindowLocalStorageRepository",{enumerable:!0,get:function(){return D.WindowLocalStorageRepository}})},69560:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,_,l,v){void 0===v&&(v=l);var m=Object.getOwnPropertyDescriptor(_,l);(!m||("get"in m?!_.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return _[l]}}),Object.defineProperty(w,v,m)}:function(w,_,l,v){void 0===v&&(v=l),w[v]=_[l]}),D=this&&this.__exportStar||function(w,_){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(_,l)&&p(_,w,l)};Object.defineProperty(u,"__esModule",{value:!0}),D(g(98494),u),D(g(75729),u)},96105:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(N,F,L,z){return new(L||(L=Promise))(function(W,Y){function G(J){try{q(z.next(J))}catch(H){Y(H)}}function Q(J){try{q(z.throw(J))}catch(H){Y(H)}}function q(J){J.done?W(J.value):function j(W){return W instanceof L?W:new L(function(Y){Y(W)})}(J.value).then(G,Q)}q((z=z.apply(N,F||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.NearMobileWallet=void 0;const D=g(8597),w=g(87974),_=g(97186),l=g(12139),v=g(39825),m=g(23183),b=g(863),M=g(93730),E=g(21251),A=g(94196),P=g(2199);u.NearMobileWallet=class x{handleRequestStatus(F){var L,z,j,W;F===v.SignerRequestStatus.APPROVED?null===(z=(L=this.defaultStrategy).onApproved)||void 0===z||z.call(L):F===v.SignerRequestStatus.REJECTED&&(null===(W=(j=this.defaultStrategy).onError)||void 0===W||W.call(j))}loadConnection(F,L){const z=new D.InMemorySigner(this.sessionRepository),j=new w.JsonRpcProvider({url:F??`https://rpc.${L}.near.org`});this.connection=D.Connection.fromConfig({jsvmAccountId:`jsvm.${L}`,provider:j,network:L,signer:z})}retryTransaction({requests:F}){var L,z,j,W;return p(this,void 0,void 0,function*(){try{const{id:Y,network:G,requests:Q}=yield this.defaultProvider.createRequest(this.network,F,this.dAppMetadata);null===(z=(L=this.defaultStrategy).onRequested)||void 0===z||z.call(L,Y,{network:G,request:Q});const{status:q}=yield this.defaultProvider.awaitActionSignatureResolution(Y);this.handleRequestStatus(q);const{signerAccountId:J,txHash:H}=yield this.defaultProvider.getRequest(Y);if(!J||!H)throw new Error(M.WalletErrors.REQUEST_NOT_SIGNED);if(1===H.length)return yield this.rpc.txStatus(H[0],J);throw new Error(M.WalletErrors.OPERATION_FAILED)}catch(Y){throw null===(W=(j=this.defaultStrategy).onError)||void 0===W||W.call(j),new Error(Y)}})}constructor({nodeUrl:F,network:L="testnet",sessionRepository:z=new E.SessionRepository,metadata:j}={}){this.network=L,this.sessionRepository=z,this.defaultStrategy=new _.WidgetStrategy,this.defaultProvider=new l.NearMobileSignerProxy,this.dAppMetadata=j,this.loadConnection(F,L)}get rpc(){return this.connection.provider}get signer(){return this.connection.signer}get networkId(){return this.connection.networkId}getAccounts(){return p(this,void 0,void 0,function*(){return this.sessionRepository.getAccounts(this.network)})}isSignedIn(F){return p(this,void 0,void 0,function*(){try{const L=yield this.sessionRepository.getActiveAccount(this.network);if(F&&L!==F||null===L)return!1;const z=yield this.sessionRepository.getKey(this.network,L);if(null===z)throw new Error(P.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND);return void 0!==(yield(yield this.account(L)).getAccessKeys()).find(G=>G.public_key===z.getPublicKey().toString())}catch(L){if(L.message===P.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND)return!1;throw new Error(L)}})}signOut(){return p(this,void 0,void 0,function*(){const F=yield this.isSignedIn(),L=yield this.sessionRepository.getActiveAccount(this.network);if(!F)return void(yield this.sessionRepository.removeKey(this.network,L));const z=yield this.sessionRepository.getKey(this.network,L);if(null===z)throw new Error(M.WalletErrors.NO_ACCOUNT_LOCAL_KEY);const j=z.getPublicKey().toString();try{yield this.silentSignAndSendTransaction({signerId:L,receiverId:L,actions:[{type:"DeleteKey",params:{publicKey:j}}]}),yield this.sessionRepository.removeKey(this.network,L)}catch{yield this.retryTransaction({requests:[{actions:[{type:"DeleteKey",params:{publicKey:j}}],signerId:L,receiverId:L}]}),yield this.sessionRepository.removeKey(this.network,L)}})}signIn({contractId:F,allowance:L,methodNames:z=[]}){var j,W;return p(this,void 0,void 0,function*(){try{const Y=D.KeyPair.fromRandom("ed25519"),G={receiverId:F,methodNames:z,allowance:L},Q=[{actions:[{type:"AddKey",params:{publicKey:Y.getPublicKey().toString(),accessKey:{permission:G}}}]}],{id:q,network:J,requests:H}=yield this.defaultProvider.createRequest(this.network,Q,this.dAppMetadata),te=()=>p(this,void 0,void 0,function*(){return yield this.defaultProvider.rejectSignerRequest(q)});null===(W=(j=this.defaultStrategy).onRequested)||void 0===W||W.call(j,q,{network:J,request:H},te);const{status:C}=yield this.defaultProvider.awaitActionSignatureResolution(q);this.handleRequestStatus(C);const{signerAccountId:o}=yield this.defaultProvider.getRequest(q);if(!o)throw new Error(M.WalletErrors.REQUEST_NOT_SIGNED);return yield this.sessionRepository.setKey(this.network,o,Y),yield this.sessionRepository.setActiveAccount(this.network,o),o}catch(Y){throw new Error(Y)}})}account(F){return p(this,void 0,void 0,function*(){const L=F??(yield this.sessionRepository.getActiveAccount(this.network));if(null===L)throw new Error(M.WalletErrors.NO_ACTIVE_ACCOUNT);return new D.Account(this.connection,L)})}silentSignAndSendTransaction({signerId:F,receiverId:L,actions:z}){return p(this,void 0,void 0,function*(){const j=yield this.account(F),W=yield this.sessionRepository.getKey(this.network,j.accountId);if(null===W)throw new Error(M.WalletErrors.NO_ACTIVE_ACCOUNT);if(!(yield this.isSignedIn(j.accountId)))throw new Error(M.WalletErrors.NO_ACTIVE_ACCOUNT);const G=W.getPublicKey().toString(),Q=yield j.getAccessKeys(),q={receiverId:L,actions:z};if(!Q.some(H=>(0,m.isValidAccessKey)(j.accountId,H,G,q)))throw new Error(M.WalletErrors.INVALID_ACCESS_KEY);return yield j.signAndSendTransaction({actions:z.map(H=>(0,b.createAction)(H)),receiverId:L??j.accountId})})}signAndSendTransaction({signerId:F,receiverId:L,actions:z}){var j,W;return p(this,void 0,void 0,function*(){try{if(!(yield this.isSignedIn(F)))throw yield this.sessionRepository.removeKey(this.network,F),new Error(M.WalletErrors.NO_ACTIVE_ACCOUNT);const G=yield this.silentSignAndSendTransaction({signerId:F,receiverId:L,actions:z});return null===(W=(j=this.defaultStrategy).onSuccess)||void 0===W||W.call(j),G}catch(Y){if(Y.message===M.WalletErrors.NO_ACTIVE_ACCOUNT)throw new Error(Y);return yield this.retryTransaction({requests:[{actions:z,receiverId:L,signerId:F}]})}})}signAndSendTransactions({transactions:F}){var L,z,j,W;return p(this,void 0,void 0,function*(){try{if(!(yield this.isSignedIn(F[0].signerId)))throw yield this.sessionRepository.removeKey(this.network,F[0].signerId),new Error(M.WalletErrors.NO_ACTIVE_ACCOUNT);const{id:G,network:Q,requests:q}=yield this.defaultProvider.createRequest(this.network,F,this.dAppMetadata);null===(z=(L=this.defaultStrategy).onRequested)||void 0===z||z.call(L,G,{network:Q,request:q});const{status:J}=yield this.defaultProvider.awaitActionSignatureResolution(G);this.handleRequestStatus(J);const{signerAccountId:H,txHash:te}=yield this.defaultProvider.getRequest(G);if(!H||!te)throw new Error(M.WalletErrors.REQUEST_NOT_SIGNED);const C=[];for(const o of te){const s=yield this.rpc.txStatus(o,H);C.push(s)}return C}catch(Y){throw null===(W=(j=this.defaultStrategy).onError)||void 0===W||W.call(j),new Error(Y)}})}signMessage({message:F,receiver:L,nonce:z,callbackUrl:j}){var W,Y,G,Q,q,J;return p(this,void 0,void 0,function*(){const{id:H}=yield this.defaultProvider.createSignMessage(this.network,F,L,z,j,this.dAppMetadata);null===(Y=(W=this.defaultStrategy).onRequested)||void 0===Y||Y.call(W,H,{network:this.network,message:F,receiver:L,nonce:z,callbackUrl:j});const{response:te,status:C}=yield this.defaultProvider.awaitMessageSignatureResolution(H);if(this.handleRequestStatus(C),!te&&C!==v.SignerRequestStatus.APPROVED)throw new Error(M.WalletErrors.NO_SIGNATURE);try{const{publicKey:o,signature:s,accountId:d}=te;if(!(0,A.verifySignature)({publicKey:o,signature:s,message:F,nonce:Buffer.from(z),recipient:L}))throw new Error(M.WalletErrors.INVALID_SIGNATURE);if(!(yield(yield this.account(d)).getAccessKeys()).some(I=>!(I.public_key!==o||"FullAccess"!==I.access_key.permission)))throw Error(M.WalletErrors.INVALID_ACCESS_KEY);return null===(Q=(G=this.defaultStrategy).onSuccess)||void 0===Q||Q.call(G),{signature:s,publicKey:o,message:F,accountId:d,receiver:L,nonce:z,callbackUrl:j}}catch(o){throw null===(J=(q=this.defaultStrategy).onError)||void 0===J||J.call(q),new Error(o)}})}}},93730:(re,u)=>{"use strict";var g,p;Object.defineProperty(u,"__esModule",{value:!0}),u.WalletErrors=void 0,(p=g||(u.WalletErrors=g={})).NO_ACTIVE_ACCOUNT="NO_ACTIVE_ACCOUNT",p.NO_ACCOUNT_LOCAL_KEY="NO_ACCOUNT_LOCAL_KEY",p.INVALID_ACCESS_KEY="INVALID_ACCESS_KEY",p.NO_SIGNER_ACCOUNT_ID="NO_SIGNER_ACCOUNT_ID",p.REQUEST_NOT_SIGNED="REQUEST_NOT_SIGNED",p.NO_SIGNATURE="NO_SIGNATURE",p.INVALID_SIGNATURE="INVALID_SIGNATURE",p.OPERATION_FAILED="OPERATION_FAILED"},12139:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(b,M,E,A){return new(E||(E=Promise))(function(x,N){function F(j){try{z(A.next(j))}catch(W){N(W)}}function L(j){try{z(A.throw(j))}catch(W){N(W)}}function z(j){j.done?x(j.value):function P(x){return x instanceof E?x:new E(function(N){N(x)})}(j.value).then(F,L)}z((A=A.apply(b,M||[])).next())})},D=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(u,"__esModule",{value:!0}),u.NearMobileSignerProxy=void 0;const w=D(g(76913)),_=D(g(33492)),l=g(39825),v=g(9273);u.NearMobileSignerProxy=class m{createRequest(M,E,A){return p(this,void 0,void 0,function*(){return yield v.SignerRequestApi.createSignerRequest({network:M,transactions:E,dAppMetadata:A})})}awaitActionSignatureResolution(M){return p(this,void 0,void 0,function*(){return yield(0,_.default)(()=>v.SignerRequestApi.getSignerRequestStatus(M),({status:E})=>E===l.SignerRequestStatus.PENDING,{maxIterations:w.default.polling.maxIterations})})}getRequest(M){return p(this,void 0,void 0,function*(){return yield v.SignerRequestApi.getSignerRequest(M)})}createSignMessage(M,E,A,P,x,N){return p(this,void 0,void 0,function*(){return yield v.SignerRequestApi.createSignMessageRequest({network:M,message:E,receiver:A,nonce:P,callbackUrl:x,receiverMetadata:N})})}awaitMessageSignatureResolution(M){return p(this,void 0,void 0,function*(){return yield(0,_.default)(()=>v.SignerRequestApi.getSignMessageRequest(M),({response:E,status:A})=>!E&&A===l.SignerRequestStatus.PENDING,{maxIterations:w.default.polling.maxIterations})})}rejectSignerRequest(M){return p(this,void 0,void 0,function*(){yield v.SignerRequestApi.rejectSignerRequest(M)})}}},97186:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(u,"__esModule",{value:!0}),u.WidgetStrategy=void 0;const D=p(g(76913));class _{constructor(){this.widgetUrl=D.default.widgetUrl,null==_.connector&&(_.connector=(l=>{const v=document.createElement("iframe");return v.src=l,v.style.border="none",v.style.zIndex="10000",v.style.position="fixed",v.style.display="none",v.style.top="0",v.style.left="0",v.style.width="100%",v.style.height="100%",document.body.appendChild(v),v})(this.widgetUrl),_.connector.addEventListener("load",()=>{_.isLoaded=!0}))}close(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0),null!=_.connector&&(_.connector.style.display="none")}onRequested(v,m,b){if(null==_.connector)return;_.connector.style.display="block";const M=()=>{var E,A;_.connector.removeEventListener("load",M);const P="message"in m?"message":"request",x=`${D.default.nearMobileWalletUrl}/${P}/${v}`;null===(A=null===(E=_.connector)||void 0===E?void 0:E.contentWindow)||void 0===A||A.postMessage({requestUrl:x},new URL(this.widgetUrl).origin)};_.isLoaded?M():_.connector.addEventListener("load",M),this.messageHandler=E=>{E.origin===new URL(this.widgetUrl).origin&&"close"===E.data&&(b?.(),this.onError())},window.addEventListener("message",this.messageHandler)}onApproved(){this.close()}onSuccess(){this.close()}onError(){this.close()}}u.WidgetStrategy=_,_.isLoaded=!1},99868:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.payloadSchema=u.Payload=void 0;class g{constructor(D){this.tag=2147484061,this.message=D.message,this.nonce=D.nonce,this.recipient=D.recipient,D.callbackUrl&&(this.callbackUrl=D.callbackUrl)}}u.Payload=g,u.payloadSchema=new Map([[g,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]])},94196:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.verifySignature=void 0;const p=g(8597),D=g(21531),w=g(1520),_=g(99868);u.verifySignature=({publicKey:v,signature:m,message:b,nonce:M,recipient:E,callbackUrl:A})=>{const P=new _.Payload({message:b,nonce:M,recipient:E,callbackUrl:A}),x=(0,D.serialize)(_.payloadSchema,P),N=Uint8Array.from(w.sha256.array(x)),F=Buffer.from(m,"base64");return p.utils.PublicKey.from(v).verify(N,F)}},77118:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(te,C,o,s){return new(o||(o=Promise))(function(h,S){function k(f){try{I(s.next(f))}catch(R){S(R)}}function B(f){try{I(s.throw(f))}catch(R){S(R)}}function I(f){f.done?h(f.value):function d(h){return h instanceof o?h:new o(function(S){S(h)})}(f.value).then(k,B)}I((s=s.apply(te,C||[])).next())})},D=this&&this.__importDefault||function(te){return te&&te.__esModule?te:{default:te}};Object.defineProperty(u,"__esModule",{value:!0}),u.Account=void 0;const w=g(55911),_=g(1739),l=g(30448),v=g(17527),m=g(41166),b=D(g(98538)),M=g(21531),{addKey:E,createAccount:A,deleteAccount:P,deleteKey:x,deployContract:N,fullAccessKey:F,functionCall:L,functionCallAccessKey:z,stake:j,transfer:W}=l.actionCreators;function q(te){return JSON.parse(Buffer.from(te).toString())}function J(te){return Buffer.from(JSON.stringify(te))}class H{constructor(C,o){this.accessKeyByPublicKeyCache={},this.connection=C,this.accountId=o}state(){return p(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(C,o){return p(this,void 0,void 0,function*(){const s=yield this.findAccessKey(C,o);if(!s)throw new v.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:d}=s,S=(yield this.connection.provider.block({finality:"final"})).header.hash,k=d.nonce.add(new b.default(1));return yield(0,l.signTransaction)(C,k,o,(0,M.baseDecode)(S),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:C,actions:o,returnError:s}){return p(this,void 0,void 0,function*(){let d,h;const S=yield(0,_.exponentialBackoff)(500,12,1.5,()=>p(this,void 0,void 0,function*(){[d,h]=yield this.signTransaction(C,o);const k=h.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(h)}catch(B){if("InvalidNonce"===B.type)return(0,m.logWarning)(`Retrying transaction ${C}:${(0,M.baseEncode)(d)} with new nonce.`),delete this.accessKeyByPublicKeyCache[k.toString()],null;if("Expired"===B.type)return(0,m.logWarning)(`Retrying transaction ${C}:${(0,M.baseEncode)(d)} due to expired block hash`),null;throw B.context=new v.ErrorContext((0,M.baseEncode)(d)),B}}));if(!S)throw new v.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,m.printTxOutcomeLogsAndFailures)({contractId:h.transaction.receiverId,outcome:S}),!s&&"object"==typeof S.status&&"object"==typeof S.status.Failure&&null!==S.status.Failure)throw S.status.Failure.error_message&&S.status.Failure.error_type?new v.TypedError(`Transaction ${S.transaction_outcome.id} failed. ${S.status.Failure.error_message}`,S.status.Failure.error_type):(0,m.parseResultError)(S);return S})}findAccessKey(C,o){return p(this,void 0,void 0,function*(){const s=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!s)throw new v.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const d=this.accessKeyByPublicKeyCache[s.toString()];if(void 0!==d)return{publicKey:s,accessKey:d};try{const h=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:s.toString(),finality:"optimistic"}),S=Object.assign(Object.assign({},h),{nonce:new b.default(h.nonce)});return this.accessKeyByPublicKeyCache[s.toString()]?{publicKey:s,accessKey:this.accessKeyByPublicKeyCache[s.toString()]}:(this.accessKeyByPublicKeyCache[s.toString()]=S,{publicKey:s,accessKey:S})}catch(h){if("AccessKeyDoesNotExist"==h.type)return null;throw h}})}createAndDeployContract(C,o,s,d){return p(this,void 0,void 0,function*(){const h=F();return yield this.signAndSendTransaction({receiverId:C,actions:[A(),W(d),E(w.PublicKey.from(o),h),N(s)]}),new H(this.connection,C)})}sendMoney(C,o){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:C,actions:[W(o)]})})}createAccount(C,o,s){return p(this,void 0,void 0,function*(){const d=F();return this.signAndSendTransaction({receiverId:C,actions:[A(),W(s),E(w.PublicKey.from(o),d)]})})}deleteAccount(C){return p(this,void 0,void 0,function*(){return process.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[P(C)]})})}deployContract(C){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[N(C)]})})}encodeJSContractArgs(C,o,s){return Buffer.concat([Buffer.from(C),Buffer.from([0]),Buffer.from(o),Buffer.from([0]),Buffer.from(s)])}functionCall({contractId:C,methodName:o,args:s={},gas:d=m.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:h,walletMeta:S,walletCallbackUrl:k,stringify:B,jsContract:I}){return p(this,void 0,void 0,function*(){let f;if(this.validateArgs(s),I)f=["call_js_contract",this.encodeJSContractArgs(C,o,JSON.stringify(s)),d,h,null,!0];else{const R=void 0===B?l.stringifyJsonOrBytes:B;f=[o,s,d,h,R,!1]}return this.signAndSendTransaction({receiverId:I?this.connection.jsvmAccountId:C,actions:[L.apply(void 0,f)],walletMeta:S,walletCallbackUrl:k})})}addKey(C,o,s,d){return p(this,void 0,void 0,function*(){let h;return s||(s=[]),Array.isArray(s)||(s=[s]),h=o?z(o,s,d):F(),this.signAndSendTransaction({receiverId:this.accountId,actions:[E(w.PublicKey.from(C),h)]})})}deleteKey(C){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[x(w.PublicKey.from(C))]})})}stake(C,o){return p(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[j(o,w.PublicKey.from(C))]})})}signedDelegate({actions:C,blockHeightTtl:o,receiverId:s}){return p(this,void 0,void 0,function*(){const{provider:d,signer:h}=this.connection,{header:S}=yield d.block({finality:"final"}),{accessKey:k,publicKey:B}=yield this.findAccessKey(null,null),I=(0,l.buildDelegateAction)({actions:C,maxBlockHeight:new b.default(S.height).add(new b.default(o)),nonce:new b.default(k.nonce).add(new b.default(1)),publicKey:B,receiverId:s,senderId:this.accountId}),{signedDelegateAction:f}=yield(0,l.signDelegateAction)({delegateAction:I,signer:{sign:R=>p(this,void 0,void 0,function*(){const{signature:se}=yield h.signMessage(R,I.senderId,this.connection.networkId);return se})}});return f})}validateArgs(C){if((void 0===C.byteLength||C.byteLength!==C.length)&&(Array.isArray(C)||"object"!=typeof C))throw new v.PositionalArgsError}viewFunction({contractId:C,methodName:o,args:s={},parse:d=q,stringify:h=J,jsContract:S=!1,blockQuery:k={finality:"optimistic"}}){return p(this,void 0,void 0,function*(){let B;this.validateArgs(s),B=S?this.encodeJSContractArgs(C,o,Object.keys(s).length>0?JSON.stringify(s):""):h(s);const I=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},k),{account_id:S?this.connection.jsvmAccountId:C,method_name:S?"view_js_contract":o,args_base64:B.toString("base64")}));return I.logs&&(0,m.printTxOutcomeLogs)({contractId:C,logs:I.logs}),I.result&&I.result.length>0&&d(Buffer.from(I.result))})}viewState(C,o={finality:"optimistic"}){return p(this,void 0,void 0,function*(){const{values:s}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},o),{account_id:this.accountId,prefix_base64:Buffer.from(C).toString("base64")}));return s.map(({key:d,value:h})=>({key:Buffer.from(d,"base64"),value:Buffer.from(h,"base64")}))})}getAccessKeys(){var C;return p(this,void 0,void 0,function*(){const o=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(C=o?.keys)||void 0===C?void 0:C.map(s=>Object.assign(Object.assign({},s),{access_key:Object.assign(Object.assign({},s.access_key),{nonce:new b.default(s.access_key.nonce)})}))})}getAccountDetails(){return p(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(s=>"FullAccess"!==s.access_key.permission).map(s=>{const d=s.access_key.permission;return{contractId:d.FunctionCall.receiver_id,amount:d.FunctionCall.allowance,publicKey:s.public_key}})}})}getAccountBalance(){return p(this,void 0,void 0,function*(){const C=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),o=yield this.state(),s=new b.default(C.runtime_config.storage_amount_per_byte),d=new b.default(o.storage_usage).mul(s),h=new b.default(o.locked),S=new b.default(o.amount).add(h),k=S.sub(b.default.max(h,d));return{total:S.toString(),stateStaked:d.toString(),staked:h.toString(),available:k.toString()}})}getActiveDelegatedStakeBalance(){return p(this,void 0,void 0,function*(){const C=yield this.connection.provider.block({finality:"final"}),o=C.header.hash,s=C.header.epoch_id,{current_validators:d,next_validators:h,current_proposals:S}=yield this.connection.provider.validators(s),k=new Set;[...d,...h,...S].forEach(ee=>k.add(ee.account_id));const B=[...k],I=B.map(ee=>this.viewFunction({contractId:ee,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:o}})),f=yield Promise.allSettled(I);if(f.some(ee=>"rejected"===ee.status&&"TimeoutError"===ee.reason.type))throw new Error("Failed to get delegated stake balance");const se=f.reduce((ee,oe,de)=>{const Ce=B[de];if("fulfilled"===oe.status){const ye=new b.default(oe.value);if(!ye.isZero())return Object.assign(Object.assign({},ee),{stakedValidators:[...ee.stakedValidators,{validatorId:Ce,amount:ye.toString()}],total:ee.total.add(ye)})}return"rejected"===oe.status?Object.assign(Object.assign({},ee),{failedValidators:[...ee.failedValidators,{validatorId:Ce,error:oe.reason}]}):ee},{stakedValidators:[],failedValidators:[],total:new b.default(0)});return Object.assign(Object.assign({},se),{total:se.total.toString()})})}}u.Account=H},71339:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(W,Y,G,Q){return new(G||(G=Promise))(function(J,H){function te(s){try{o(Q.next(s))}catch(d){H(d)}}function C(s){try{o(Q.throw(s))}catch(d){H(d)}}function o(s){s.done?J(s.value):function q(J){return J instanceof G?J:new G(function(H){H(J)})}(s.value).then(te,C)}o((Q=Q.apply(W,Y||[])).next())})},D=this&&this.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(u,"__esModule",{value:!0}),u.Account2FA=void 0;const w=g(55911),_=g(17527),l=g(1739),v=g(30448),m=D(g(98538)),b=g(30776),M=g(94914),E=g(87932),{addKey:A,deleteKey:P,deployContract:x,fullAccessKey:N,functionCall:F,functionCallAccessKey:L}=v.actionCreators;class z extends b.AccountMultisig{constructor(Y,G,Q){super(Y,G,Q),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=Q.helperUrl||this.helperUrl,this.storage=Q.storage,this.sendCode=Q.sendCode||this.sendCodeDefault,this.getCode=Q.getCode||this.getCodeDefault,this.verifyCode=Q.verifyCode||this.verifyCodeDefault,this.onConfirmResult=Q.onConfirmResult}signAndSendTransaction({receiverId:Y,actions:G}){const Q=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){yield Q.signAndSendTransaction.call(this,{receiverId:Y,actions:G}),yield this.sendCode();const q=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(q)),q})}deployMultisig(Y){const G=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return p(this,void 0,void 0,function*(){const{accountId:Q}=this,q=(yield this.getRecoveryMethods()).data.filter(({kind:d,publicKey:h})=>("phrase"===d||"ledger"===d)&&null!==h).map(d=>d.publicKey),J=(yield this.getAccessKeys()).filter(({public_key:d,access_key:{permission:h}})=>"FullAccess"===h&&!q.includes(d)).map(d=>d.public_key).map(j),H=j((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Q})).publicKey),te=Buffer.from(JSON.stringify({num_confirmations:2})),C=[...J.map(d=>P(d)),...J.map(d=>A(d,L(Q,M.MULTISIG_CHANGE_METHODS,null))),A(H,L(Q,M.MULTISIG_CONFIRM_METHODS,null)),x(Y)],o=C.concat(F("new",te,M.MULTISIG_GAS,M.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",Q);const{stateStatus:s}=yield this.checkMultisigCodeAndStateStatus(Y);switch(s){case E.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield G.signAndSendTransactionWithAccount.call(this,Q,o);case E.MultisigStateStatus.VALID_STATE:return yield G.signAndSendTransactionWithAccount.call(this,Q,C);case E.MultisigStateStatus.INVALID_STATE:throw new _.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new _.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:Y,cleanupContractBytes:G}){return p(this,void 0,void 0,function*(){let Q=[];G&&(yield this.deleteAllRequests().catch(te=>te),Q=yield this.get2faDisableCleanupActions(G));const q=yield this.get2faDisableKeyConversionActions(),J=[...Q,...q,x(Y)],H=yield this.findAccessKey(this.accountId,J);if(H&&H.accessKey&&"FullAccess"!==H.accessKey.permission)throw new _.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,J)})}get2faDisableCleanupActions(Y){return p(this,void 0,void 0,function*(){const G=yield this.viewState("").catch(q=>{const J=q.cause&&q.cause.name;if("NO_CONTRACT_CODE"==J)return[];throw"TOO_LARGE_CONTRACT_STATE"==J?new _.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):q}),Q=G.map(({key:q})=>q.toString("base64"));return G.length?[x(Y),F("clean",{keys:Q},M.MULTISIG_GAS,new m.default("0"))]:[]})}get2faDisableKeyConversionActions(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,Q=(yield this.getAccessKeys()).filter(({access_key:J})=>"FullAccess"!==J.permission).filter(({access_key:J})=>{const H=J.permission.FunctionCall;return H.receiver_id===Y&&4===H.method_names.length&&H.method_names.includes("add_request_and_confirm")}),q=w.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Y})).publicKey);return[P(q),...Q.map(({public_key:J})=>P(w.PublicKey.from(J))),...Q.map(({public_key:J})=>A(w.PublicKey.from(J),N()))]})}disable(Y,G){return p(this,void 0,void 0,function*(){const{stateStatus:Q}=yield this.checkMultisigCodeAndStateStatus();if(Q!==E.MultisigStateStatus.VALID_STATE&&Q!==E.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new _.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let q;yield this.deleteAllRequests().catch(te=>q=te);const H=[...yield this.get2faDisableCleanupActions(G).catch(te=>{throw"ContractHasExistingState"===te.type&&q||te}),...yield this.get2faDisableKeyConversionActions(),x(Y)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:H})})}sendCodeDefault(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,{requestId:G}=this.getRequest(),Q=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:Y,method:Q,requestId:G}),G})}getCodeDefault(){return p(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return p(this,void 0,void 0,function*(){const Y=yield this.get2faMethod(),G=yield this.getCode(Y);try{return yield this.verifyCode(G)}catch(Q){if(console.warn("Error validating security code:",Q),Q.toString().includes("invalid 2fa code provided")||Q.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw Q}})}verifyCodeDefault(Y){return p(this,void 0,void 0,function*(){const{accountId:G}=this,Q=this.getRequest();if(!Q)throw new Error("no request pending");const{requestId:q}=Q;return yield this.postSignedJson("/2fa/verify",{accountId:G,securityCode:Y,requestId:q})})}getRecoveryMethods(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this;return{accountId:Y,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:Y})}})}get2faMethod(){return p(this,void 0,void 0,function*(){let{data:Y}=yield this.getRecoveryMethods();if(Y&&Y.length&&(Y=Y.find(q=>0===q.kind.indexOf("2fa-"))),!Y)return null;const{kind:G,detail:Q}=Y;return{kind:G,detail:Q}})}signatureFor(){return p(this,void 0,void 0,function*(){const{accountId:Y}=this,Q=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),q=yield this.connection.signer.signMessage(Buffer.from(Q),Y,this.connection.networkId);return{blockNumber:Q,blockNumberSignature:Buffer.from(q.signature).toString("base64")}})}postSignedJson(Y,G){return p(this,void 0,void 0,function*(){return yield(0,l.fetchJson)(this.helperUrl+Y,JSON.stringify(Object.assign(Object.assign({},G),yield this.signatureFor())))})}}u.Account2FA=z;const j=W=>w.PublicKey.from(W)},57107:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(v,m,b,M){return new(b||(b=Promise))(function(A,P){function x(L){try{F(M.next(L))}catch(z){P(z)}}function N(L){try{F(M.throw(L))}catch(z){P(z)}}function F(L){L.done?A(L.value):function E(A){return A instanceof b?A:new b(function(P){P(A)})}(L.value).then(x,N)}F((M=M.apply(v,m||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.UrlAccountCreator=u.LocalAccountCreator=u.AccountCreator=void 0;const D=g(1739);class w{}u.AccountCreator=w;u.LocalAccountCreator=class _ extends w{constructor(m,b){super(),this.masterAccount=m,this.initialBalance=b}createAccount(m,b){return p(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(m,b,this.initialBalance)})}};u.UrlAccountCreator=class l extends w{constructor(m,b){super(),this.connection=m,this.helperUrl=b}createAccount(m,b){return p(this,void 0,void 0,function*(){yield(0,D.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:m,newAccountPublicKey:b.toString()}))})}}},30776:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(x,N,F,L){return new(F||(F=Promise))(function(j,W){function Y(q){try{Q(L.next(q))}catch(J){W(J)}}function G(q){try{Q(L.throw(q))}catch(J){W(J)}}function Q(q){q.done?j(q.value):function z(j){return j instanceof F?j:new F(function(W){W(j)})}(q.value).then(Y,G)}Q((L=L.apply(x,N||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.AccountMultisig=void 0;const D=g(30448),w=g(77118),_=g(94914),l=g(87932),{deployContract:v,functionCall:m}=D.actionCreators;var b,x;(x=b||(b={}))[x.INVALID_CODE=0]="INVALID_CODE",x[x.VALID_CODE=1]="VALID_CODE",x[x.UNKNOWN_CODE=2]="UNKNOWN_CODE";const M={[_.MULTISIG_STORAGE_KEY]:null};class E extends w.Account{constructor(N,F,L){super(N,F),this.storage=L.storage,this.onAddRequestResult=L.onAddRequestResult}signAndSendTransactionWithAccount(N,F){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){return L.signAndSendTransaction.call(this,{receiverId:N,actions:F})})}signAndSendTransaction({receiverId:N,actions:F}){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const{accountId:z}=this,j=Buffer.from(JSON.stringify({request:{receiver_id:N,actions:P(F,z,N)}}));let W;try{W=yield L.signAndSendTransaction.call(this,{receiverId:z,actions:[m("add_request_and_confirm",j,_.MULTISIG_GAS,_.MULTISIG_DEPOSIT)]})}catch(G){if(G.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:N,actions:F});throw G}if(!W.status)throw new Error("Request failed");const Y=Object.assign({},W.status);if(!Y.SuccessValue||"string"!=typeof Y.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:z,actions:F,requestId:parseInt(Buffer.from(Y.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(W)),this.deleteUnconfirmedRequests(),W})}checkMultisigCodeAndStateStatus(N){const F=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const z=N?b.UNKNOWN_CODE:b.VALID_CODE;try{return N?yield F.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[v(N),m("delete_request",{request_id:4294967295},_.MULTISIG_GAS,_.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:b.VALID_CODE,stateStatus:l.MultisigStateStatus.VALID_STATE}}catch(j){if(new RegExp(l.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:z,stateStatus:l.MultisigStateStatus.INVALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:z,stateStatus:l.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(l.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(j&&j.kind&&j.kind.ExecutionError))return{codeStatus:z,stateStatus:l.MultisigStateStatus.VALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(j&&j.message))return{codeStatus:b.INVALID_CODE,stateStatus:l.MultisigStateStatus.UNKNOWN_STATE};throw j}})}deleteRequest(N){return super.signAndSendTransaction({receiverId:this.accountId,actions:[m("delete_request",{request_id:N},_.MULTISIG_GAS,_.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return p(this,void 0,void 0,function*(){const N=yield this.getRequestIds();N.length&&(yield Promise.all(N.map(F=>this.deleteRequest(F))))})}deleteUnconfirmedRequests(){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const F=yield this.getRequestIds(),{requestId:L}=this.getRequest();for(const z of F)if(z!=L)try{yield N.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[m("delete_request",{request_id:z},_.MULTISIG_GAS,_.MULTISIG_DEPOSIT)]})}catch{console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return p(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(_.MULTISIG_STORAGE_KEY)||"{}"):M[_.MULTISIG_STORAGE_KEY]}setRequest(N){if(this.storage)return this.storage.setItem(_.MULTISIG_STORAGE_KEY,JSON.stringify(N));M[_.MULTISIG_STORAGE_KEY]=N}}u.AccountMultisig=E;const A=x=>x.toString().replace("ed25519:",""),P=(x,N,F)=>x.map(L=>{const z=L.enum,{gas:j,publicKey:W,methodName:Y,args:G,deposit:Q,accessKey:q,code:J}=L[z],H={type:z[0].toUpperCase()+z.substr(1),gas:j&&j.toString()||void 0,public_key:W&&A(W)||void 0,method_name:Y,args:G&&Buffer.from(G).toString("base64")||void 0,code:J&&Buffer.from(J).toString("base64")||void 0,amount:Q&&Q.toString()||void 0,deposit:Q&&Q.toString()||"0",permission:void 0};if(q&&(F===N&&"fullAccess"!==q.permission.enum&&(H.permission={receiver_id:N,allowance:_.MULTISIG_ALLOWANCE.toString(),method_names:_.MULTISIG_CHANGE_METHODS}),"functionCall"===q.permission.enum)){const{receiverId:te,methodNames:C,allowance:o}=q.permission.functionCall;H.permission={receiver_id:te,allowance:o&&o.toString()||void 0,method_names:C}}return H})},35999:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Connection=void 0;const p=g(25035),D=g(1739);class l{constructor(m,b,M,E){this.networkId=m,this.provider=b,this.signer=M,this.jsvmAccountId=E}static fromConfig(m){const b=function w(v){switch(v.type){case void 0:return v;case"JsonRpcProvider":return new D.JsonRpcProvider(Object.assign({},v.args));default:throw new Error(`Unknown provider type ${v.type}`)}}(m.provider),M=function _(v){switch(v.type){case void 0:return v;case"InMemorySigner":return new p.InMemorySigner(v.keyStore);default:throw new Error(`Unknown signer type ${v.type}`)}}(m.signer);return new l(m.networkId,b,M,m.jsvmAccountId)}}u.Connection=l},94914:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(u,"__esModule",{value:!0}),u.MULTISIG_CONFIRM_METHODS=u.MULTISIG_CHANGE_METHODS=u.MULTISIG_DEPOSIT=u.MULTISIG_GAS=u.MULTISIG_ALLOWANCE=u.MULTISIG_STORAGE_KEY=void 0;const D=g(41166),w=p(g(98538));u.MULTISIG_STORAGE_KEY="__multisigRequest",u.MULTISIG_ALLOWANCE=new w.default((0,D.parseNearAmount)("1")),u.MULTISIG_GAS=new w.default("100000000000000"),u.MULTISIG_DEPOSIT=new w.default("0"),u.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],u.MULTISIG_CONFIRM_METHODS=["confirm"]},43017:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(j,W,Y,G){return new(Y||(Y=Promise))(function(q,J){function H(o){try{C(G.next(o))}catch(s){J(s)}}function te(o){try{C(G.throw(o))}catch(s){J(s)}}function C(o){o.done?q(o.value):function Q(q){return q instanceof Y?q:new Y(function(J){J(q)})}(o.value).then(H,te)}C((G=G.apply(j,W||[])).next())})},D=this&&this.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(u,"__esModule",{value:!0}),u.Contract=void 0;const w=g(41166),_=g(17527),l=D(g(74411)),v=D(g(26474)),m=D(g(98538)),b=D(g(89176)),M=g(84778),E=g(49467);function A(j,W){return{[j]:(...Y)=>W(...Y)}[j]}function P(j,W,Y,G){var Q;if(!F(j))return;if(W.params&&W.params.serialization_type!==M.AbiSerializationType.Json)throw new E.UnsupportedSerializationError(W.name,W.params.serialization_type);if(W.result&&W.result.serialization_type!==M.AbiSerializationType.Json)throw new E.UnsupportedSerializationError(W.name,W.result.serialization_type);const q=(null===(Q=W.params)||void 0===Q?void 0:Q.args)||[];for(const J of q){const H=j[J.name],te=J.type_schema;te.definitions=G.body.root_schema.definitions;const C=Y.compile(te);if(!C(H))throw new E.ArgumentSchemaError(J.name,C.errors)}for(const J of Object.keys(j))if(!q.find(te=>te.name===J))throw new E.UnknownArgumentError(J,q.map(te=>te.name))}const N=j=>j&&void 0!==j.byteLength&&j.byteLength===j.length,F=j=>"[object Object]"===Object.prototype.toString.call(j);u.Contract=class L{constructor(W,Y,G){this.account=W,this.contractId=Y;const{viewMethods:Q=[],changeMethods:q=[],abi:J}=G;let H=Q.map(o=>({name:o,abi:null})),te=q.map(o=>({name:o,abi:null}));if(J){if(H.length>0||te.length>0)throw new E.ConflictingOptions;H=J.body.functions.filter(o=>o.kind===M.AbiFunctionKind.View).map(o=>({name:o.name,abi:o})),te=J.body.functions.filter(o=>o.kind===M.AbiFunctionKind.Call).map(o=>({name:o.name,abi:o}))}const C=function x(){const j=new l.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,v.default)(j),j}();H.forEach(({name:o,abi:s})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(d={},h={},...S)=>p(this,void 0,void 0,function*(){if(S.length||!F(d)&&!N(d)||!F(h))throw new _.PositionalArgsError;return s&&P(d,s,C,J),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:d},h))}))})}),te.forEach(({name:o,abi:s})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(...d)=>p(this,void 0,void 0,function*(){if(d.length&&(d.length>3||!F(d[0])&&!N(d[0])))throw new _.PositionalArgsError;return(d.length>1||!(d[0]&&d[0].args))&&((0,b.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),d[0]={args:d[0],gas:d[1],amount:d[2]}),s&&P(d[0].args,s,C,J),this._changeMethod(Object.assign({methodName:o},d[0]))}))})})}_changeMethod({args:W,methodName:Y,gas:G,amount:Q,meta:q,callbackUrl:J}){return p(this,void 0,void 0,function*(){!function z(j){const W="number, decimal string or BN";for(const Y of Object.keys(j)){const G=j[Y];if(G&&!m.default.isBN(G)&&isNaN(G))throw new _.ArgumentTypeError(Y,W,G)}}({gas:G,amount:Q});const H=yield this.account.functionCall({contractId:this.contractId,methodName:Y,args:W,gas:G,attachedDeposit:Q,walletMeta:q,walletCallbackUrl:J});return(0,w.getTransactionLastResult)(H)})}}},49467:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ConflictingOptions=u.ArgumentSchemaError=u.UnknownArgumentError=u.UnsupportedSerializationError=void 0;class g extends Error{constructor(l,v){super(`Contract method '${l}' is using an unsupported serialization type ${v}`)}}u.UnsupportedSerializationError=g;class p extends Error{constructor(l,v){super(`Unrecognized argument '${l}', expected '${JSON.stringify(v)}'`)}}u.UnknownArgumentError=p;class D extends Error{constructor(l,v){super(`Argument '${l}' does not conform to the specified ABI schema: '${JSON.stringify(v)}'`)}}u.ArgumentSchemaError=D;class w extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}u.ConflictingOptions=w},11538:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MultisigStateStatus=u.MultisigDeleteRequestRejectionError=u.UnsupportedSerializationError=u.UnknownArgumentError=u.ConflictingOptions=u.ArgumentSchemaError=u.Contract=u.MULTISIG_CONFIRM_METHODS=u.MULTISIG_CHANGE_METHODS=u.MULTISIG_DEPOSIT=u.MULTISIG_GAS=u.MULTISIG_ALLOWANCE=u.MULTISIG_STORAGE_KEY=u.Connection=u.AccountMultisig=u.UrlAccountCreator=u.LocalAccountCreator=u.AccountCreator=u.Account2FA=u.Account=void 0;var p=g(77118);Object.defineProperty(u,"Account",{enumerable:!0,get:function(){return p.Account}});var D=g(71339);Object.defineProperty(u,"Account2FA",{enumerable:!0,get:function(){return D.Account2FA}});var w=g(57107);Object.defineProperty(u,"AccountCreator",{enumerable:!0,get:function(){return w.AccountCreator}}),Object.defineProperty(u,"LocalAccountCreator",{enumerable:!0,get:function(){return w.LocalAccountCreator}}),Object.defineProperty(u,"UrlAccountCreator",{enumerable:!0,get:function(){return w.UrlAccountCreator}});var _=g(30776);Object.defineProperty(u,"AccountMultisig",{enumerable:!0,get:function(){return _.AccountMultisig}});var l=g(35999);Object.defineProperty(u,"Connection",{enumerable:!0,get:function(){return l.Connection}});var v=g(94914);Object.defineProperty(u,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return v.MULTISIG_STORAGE_KEY}}),Object.defineProperty(u,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return v.MULTISIG_ALLOWANCE}}),Object.defineProperty(u,"MULTISIG_GAS",{enumerable:!0,get:function(){return v.MULTISIG_GAS}}),Object.defineProperty(u,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return v.MULTISIG_DEPOSIT}}),Object.defineProperty(u,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return v.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(u,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return v.MULTISIG_CONFIRM_METHODS}});var m=g(43017);Object.defineProperty(u,"Contract",{enumerable:!0,get:function(){return m.Contract}});var b=g(49467);Object.defineProperty(u,"ArgumentSchemaError",{enumerable:!0,get:function(){return b.ArgumentSchemaError}}),Object.defineProperty(u,"ConflictingOptions",{enumerable:!0,get:function(){return b.ConflictingOptions}}),Object.defineProperty(u,"UnknownArgumentError",{enumerable:!0,get:function(){return b.UnknownArgumentError}}),Object.defineProperty(u,"UnsupportedSerializationError",{enumerable:!0,get:function(){return b.UnsupportedSerializationError}});var M=g(87932);Object.defineProperty(u,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return M.MultisigDeleteRequestRejectionError}}),Object.defineProperty(u,"MultisigStateStatus",{enumerable:!0,get:function(){return M.MultisigStateStatus}})},87932:(re,u)=>{"use strict";var D;Object.defineProperty(u,"__esModule",{value:!0}),u.MultisigStateStatus=u.MultisigDeleteRequestRejectionError=void 0,(D=u.MultisigDeleteRequestRejectionError||(u.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",D.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",D.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",D.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",D.METHOD_NOT_FOUND="Contract method is not found",function(D){D[D.INVALID_STATE=0]="INVALID_STATE",D[D.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",D[D.VALID_STATE=2]="VALID_STATE",D[D.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(u.MultisigStateStatus||(u.MultisigStateStatus={}))},36999:(re,u)=>{"use strict";var p;Object.defineProperty(u,"__esModule",{value:!0}),u.KeyType=void 0,(p=u.KeyType||(u.KeyType={}))[p.ED25519=0]="ED25519"},55911:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.PublicKey=u.KeyPairEd25519=u.KeyPair=u.KeyType=void 0;var p=g(36999);Object.defineProperty(u,"KeyType",{enumerable:!0,get:function(){return p.KeyType}});var D=g(53087);Object.defineProperty(u,"KeyPair",{enumerable:!0,get:function(){return D.KeyPair}});var w=g(46735);Object.defineProperty(u,"KeyPairEd25519",{enumerable:!0,get:function(){return w.KeyPairEd25519}});var _=g(73833);Object.defineProperty(u,"PublicKey",{enumerable:!0,get:function(){return _.PublicKey}})},53087:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.KeyPair=void 0;const p=g(25387),D=g(46735);class w extends p.KeyPairBase{static fromRandom(l){if("ED25519"===l.toUpperCase())return D.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${l}`)}static fromString(l){const v=l.split(":");if(1===v.length)return new D.KeyPairEd25519(v[0]);if(2===v.length){if("ED25519"===v[0].toUpperCase())return new D.KeyPairEd25519(v[1]);throw new Error(`Unknown curve: ${v[0]}`)}throw new Error("Invalid encoded key format, must be :")}}u.KeyPair=w},25387:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.KeyPairBase=void 0;u.KeyPairBase=class g{}},46735:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(u,"__esModule",{value:!0}),u.KeyPairEd25519=void 0;const D=g(21531),w=p(g(40489)),_=g(36999),l=g(25387),v=g(73833);class m extends l.KeyPairBase{constructor(M){super();const E=w.default.sign.keyPair.fromSecretKey((0,D.baseDecode)(M));this.publicKey=new v.PublicKey({keyType:_.KeyType.ED25519,data:E.publicKey}),this.secretKey=M}static fromRandom(){const M=w.default.sign.keyPair();return new m((0,D.baseEncode)(M.secretKey))}sign(M){return{signature:w.default.sign.detached(M,(0,D.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(M,E){return this.publicKey.verify(M,E)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}u.KeyPairEd25519=m},73833:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(u,"__esModule",{value:!0}),u.PublicKey=void 0;const D=g(17527),w=g(21531),_=p(g(40489)),l=g(36999);class b extends D.Assignable{static from(E){return"string"==typeof E?b.fromString(E):E}static fromString(E){const A=E.split(":");let P,x=l.KeyType.ED25519;if(1===A.length)P=A[0];else{if(2!==A.length)throw new Error("Invalid encoded key format, must be :");P=A[1],x=function m(M){if("ed25519"===M.toLowerCase())return l.KeyType.ED25519;throw new Error(`Unknown key type ${M}`)}(A[0])}const N=(0,w.baseDecode)(P);if(N.length!==_.default.box.publicKeyLength)throw new Error(`Invalid public key size (${N.length}), must be ${_.default.box.publicKeyLength}`);return new b({keyType:x,data:N})}toString(){return`${function v(M){if(M===l.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${M}`)}(this.keyType)}:${(0,w.baseEncode)(this.data)}`}verify(E,A){if(this.keyType===l.KeyType.ED25519)return _.default.sign.detached.verify(E,A,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}u.PublicKey=b},85051:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(v,m,b,M){return new(b||(b=Promise))(function(A,P){function x(L){try{F(M.next(L))}catch(z){P(z)}}function N(L){try{F(M.throw(L))}catch(z){P(z)}}function F(L){L.done?A(L.value):function E(A){return A instanceof b?A:new b(function(P){P(A)})}(L.value).then(x,N)}F((M=M.apply(v,m||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.BrowserLocalStorageKeyStore=void 0;const D=g(55911),w=g(90793);class l extends w.KeyStore{constructor(m=window.localStorage,b="near-api-js:keystore:"){super(),this.localStorage=m,this.prefix=b}setKey(m,b,M){return p(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(m,b),M.toString())})}getKey(m,b){return p(this,void 0,void 0,function*(){const M=this.localStorage.getItem(this.storageKeyForSecretKey(m,b));return M?D.KeyPair.fromString(M):null})}removeKey(m,b){return p(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(m,b))})}clear(){return p(this,void 0,void 0,function*(){for(const m of this.storageKeys())m.startsWith(this.prefix)&&this.localStorage.removeItem(m)})}getNetworks(){return p(this,void 0,void 0,function*(){const m=new Set;for(const b of this.storageKeys())if(b.startsWith(this.prefix)){const M=b.substring(this.prefix.length).split(":");m.add(M[1])}return Array.from(m.values())})}getAccounts(m){return p(this,void 0,void 0,function*(){const b=new Array;for(const M of this.storageKeys())if(M.startsWith(this.prefix)){const E=M.substring(this.prefix.length).split(":");E[1]===m&&b.push(E[0])}return b})}storageKeyForSecretKey(m,b){return`${this.prefix}${b}:${m}`}*storageKeys(){for(let m=0;m{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.BrowserLocalStorageKeyStore=void 0;var p=g(85051);Object.defineProperty(u,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return p.BrowserLocalStorageKeyStore}})},93414:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(l,v,m,b){return new(m||(m=Promise))(function(E,A){function P(F){try{N(b.next(F))}catch(L){A(L)}}function x(F){try{N(b.throw(F))}catch(L){A(L)}}function N(F){F.done?E(F.value):function M(E){return E instanceof m?E:new m(function(A){A(E)})}(F.value).then(P,x)}N((b=b.apply(l,v||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.InMemoryKeyStore=void 0;const D=g(55911),w=g(86614);class _ extends w.KeyStore{constructor(){super(),this.keys={}}setKey(v,m,b){return p(this,void 0,void 0,function*(){this.keys[`${m}:${v}`]=b.toString()})}getKey(v,m){return p(this,void 0,void 0,function*(){const b=this.keys[`${m}:${v}`];return b?D.KeyPair.fromString(b):null})}removeKey(v,m){return p(this,void 0,void 0,function*(){delete this.keys[`${m}:${v}`]})}clear(){return p(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return p(this,void 0,void 0,function*(){const v=new Set;return Object.keys(this.keys).forEach(m=>{const b=m.split(":");v.add(b[1])}),Array.from(v.values())})}getAccounts(v){return p(this,void 0,void 0,function*(){const m=new Array;return Object.keys(this.keys).forEach(b=>{const M=b.split(":");M[M.length-1]===v&&m.push(M.slice(0,M.length-1).join(":"))}),m})}toString(){return"InMemoryKeyStore"}}u.InMemoryKeyStore=_},90793:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MergeKeyStore=u.KeyStore=u.InMemoryKeyStore=void 0;var p=g(93414);Object.defineProperty(u,"InMemoryKeyStore",{enumerable:!0,get:function(){return p.InMemoryKeyStore}});var D=g(86614);Object.defineProperty(u,"KeyStore",{enumerable:!0,get:function(){return D.KeyStore}});var w=g(51731);Object.defineProperty(u,"MergeKeyStore",{enumerable:!0,get:function(){return w.MergeKeyStore}})},86614:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.KeyStore=void 0;u.KeyStore=class g{}},51731:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(_,l,v,m){return new(v||(v=Promise))(function(M,E){function A(N){try{x(m.next(N))}catch(F){E(F)}}function P(N){try{x(m.throw(N))}catch(F){E(F)}}function x(N){N.done?M(N.value):function b(M){return M instanceof v?M:new v(function(E){E(M)})}(N.value).then(A,P)}x((m=m.apply(_,l||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.MergeKeyStore=void 0;const D=g(86614);class w extends D.KeyStore{constructor(l,v={writeKeyStoreIndex:0}){super(),this.options=v,this.keyStores=l}setKey(l,v,m){return p(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(l,v,m)})}getKey(l,v){return p(this,void 0,void 0,function*(){for(const m of this.keyStores){const b=yield m.getKey(l,v);if(b)return b}return null})}removeKey(l,v){return p(this,void 0,void 0,function*(){for(const m of this.keyStores)yield m.removeKey(l,v)})}clear(){return p(this,void 0,void 0,function*(){for(const l of this.keyStores)yield l.clear()})}getNetworks(){return p(this,void 0,void 0,function*(){const l=new Set;for(const v of this.keyStores)for(const m of yield v.getNetworks())l.add(m);return Array.from(l)})}getAccounts(l){return p(this,void 0,void 0,function*(){const v=new Set;for(const m of this.keyStores)for(const b of yield m.getAccounts(l))v.add(b);return Array.from(v)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}u.MergeKeyStore=w},35103:function(re,u){"use strict";var g=this&&this.__awaiter||function(w,_,l,v){return new(l||(l=Promise))(function(b,M){function E(x){try{P(v.next(x))}catch(N){M(N)}}function A(x){try{P(v.throw(x))}catch(N){M(N)}}function P(x){x.done?b(x.value):function m(b){return b instanceof l?b:new l(function(M){M(b)})}(x.value).then(E,A)}P((v=v.apply(w,_||[])).next())})};function D(w){return new Promise(_=>setTimeout(_,w))}Object.defineProperty(u,"__esModule",{value:!0}),u.exponentialBackoff=void 0,u.exponentialBackoff=function p(w,_,l,v){return g(this,void 0,void 0,function*(){let m=w;for(let b=0;b<_;b++){const M=yield v();if(M)return M;yield D(m),m*=l}return null})}},75645:function(re,u,g){"use strict";var p=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(u,"__esModule",{value:!0});const D=p(g(69637)),w=p(g(74216)),_=p(g(8806)),l=new w.default.Agent({keepAlive:!0}),v=new _.default.Agent({keepAlive:!0});function m(M){return"http:"===M.protocol?l:v}u.default=function b(M,E){return(0,D.default)(M,Object.assign({agent:m(new URL(M.toString()))},E))}},243:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(N,F,L,z){void 0===z&&(z=L);var j=Object.getOwnPropertyDescriptor(F,L);(!j||("get"in j?!F.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return F[L]}}),Object.defineProperty(N,z,j)}:function(N,F,L,z){void 0===z&&(z=L),N[z]=F[L]}),D=this&&this.__setModuleDefault||(Object.create?function(N,F){Object.defineProperty(N,"default",{enumerable:!0,value:F})}:function(N,F){N.default=F}),w=this&&this.__importStar||function(N){if(N&&N.__esModule)return N;var F={};if(null!=N)for(var L in N)"default"!==L&&Object.prototype.hasOwnProperty.call(N,L)&&p(F,N,L);return D(F,N),F},_=this&&this.__awaiter||function(N,F,L,z){return new(L||(L=Promise))(function(W,Y){function G(J){try{q(z.next(J))}catch(H){Y(H)}}function Q(J){try{q(z.throw(J))}catch(H){Y(H)}}function q(J){J.done?W(J.value):function j(W){return W instanceof L?W:new L(function(Y){Y(W)})}(J.value).then(G,Q)}q((z=z.apply(N,F||[])).next())})},l=this&&this.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(u,"__esModule",{value:!0}),u.fetchJson=void 0;const v=g(17527),m=l(g(52602)),b=g(35103),M=1e3,E=1.5,A=10,P=(...N)=>!process.env.NEAR_NO_LOGS&&console.warn(...N);u.fetchJson=function x(N,F){return _(this,void 0,void 0,function*(){let L={url:null};"string"==typeof N?L.url=N:L=N;const z=yield(0,b.exponentialBackoff)(M,A,E,()=>_(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>w(g(75645)))).default);const j=yield global.fetch(L.url,{method:F?"POST":"GET",body:F||void 0,headers:Object.assign(Object.assign({},L.headers),{"Content-Type":"application/json"})});if(!j.ok){if(503===j.status)return P(`Retrying HTTP request for ${L.url} as it's not available now`),null;throw(0,m.default)(j.status,yield j.text())}return j}catch(j){if(j.toString().includes("FetchError")||j.toString().includes("Failed to fetch"))return P(`Retrying HTTP request for ${L.url} because of error: ${j}`),null;throw j}}));if(!z)throw new v.TypedError(`Exceeded ${A} attempts for ${L.url}.`,"RetriesExceeded");return yield z.json()})}},1739:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.fetchJson=u.Provider=u.JsonRpcProvider=u.exponentialBackoff=void 0;var p=g(35103);Object.defineProperty(u,"exponentialBackoff",{enumerable:!0,get:function(){return p.exponentialBackoff}});var D=g(44459);Object.defineProperty(u,"JsonRpcProvider",{enumerable:!0,get:function(){return D.JsonRpcProvider}});var w=g(95326);Object.defineProperty(u,"Provider",{enumerable:!0,get:function(){return w.Provider}});var _=g(243);Object.defineProperty(u,"fetchJson",{enumerable:!0,get:function(){return _.fetchJson}})},44459:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(F,L,z,j){return new(z||(z=Promise))(function(Y,G){function Q(H){try{J(j.next(H))}catch(te){G(te)}}function q(H){try{J(j.throw(H))}catch(te){G(te)}}function J(H){H.done?Y(H.value):function W(Y){return Y instanceof z?Y:new z(function(G){G(Y)})}(H.value).then(Q,q)}J((j=j.apply(F,L||[])).next())})},D=this&&this.__rest||function(F,L){var z={};for(var j in F)Object.prototype.hasOwnProperty.call(F,j)&&L.indexOf(j)<0&&(z[j]=F[j]);if(null!=F&&"function"==typeof Object.getOwnPropertySymbols){var W=0;for(j=Object.getOwnPropertySymbols(F);Wp(this,void 0,void 0,function*(){try{const Y={method:L,params:z,id:x++,jsonrpc:"2.0"},G=yield(0,M.fetchJson)(this.connection,JSON.stringify(Y));if(G.error){if("object"==typeof G.error.data)throw"string"==typeof G.error.data.error_message&&"string"==typeof G.error.data.error_type?new _.TypedError(G.error.data.error_message,G.error.data.error_type):(0,w.parseRpcError)(G.error.data);{const Q=`[${G.error.code}] ${G.error.message}: ${G.error.data}`;throw"Timeout"===G.error.data||Q.includes("Timeout error")||Q.includes("query has timed out")?new _.TypedError(Q,"TimeoutError"):new _.TypedError(Q,(0,w.getErrorTypeFromErrorMessage)(G.error.data,G.error.name))}}return G}catch(Y){if("TimeoutError"===Y.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${L} as it has timed out`,z),null;throw Y}})),{result:W}=j;if(typeof W>"u")throw new _.TypedError(`Exceeded 12 attempts for request to ${L}.`,"RetriesExceeded");return W})}}u.JsonRpcProvider=N},95326:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Provider=void 0;u.Provider=class g{}},22972:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(b,M,E,A){return new(E||(E=Promise))(function(x,N){function F(j){try{z(A.next(j))}catch(W){N(W)}}function L(j){try{z(A.throw(j))}catch(W){N(W)}}function z(j){j.done?x(j.value):function P(x){return x instanceof E?x:new E(function(N){N(x)})}(j.value).then(F,L)}z((A=A.apply(b,M||[])).next())})},D=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(u,"__esModule",{value:!0}),u.InMemorySigner=void 0;const w=g(55911),_=g(90793),l=D(g(1520)),v=g(83159);class m extends v.Signer{constructor(M){super(),this.keyStore=M}static fromKeyPair(M,E,A){return p(this,void 0,void 0,function*(){const P=new _.InMemoryKeyStore;return yield P.setKey(M,E,A),new m(P)})}createKey(M,E){return p(this,void 0,void 0,function*(){const A=w.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(E,M,A),A.getPublicKey()})}getPublicKey(M,E){return p(this,void 0,void 0,function*(){const A=yield this.keyStore.getKey(E,M);return null===A?null:A.getPublicKey()})}signMessage(M,E,A){return p(this,void 0,void 0,function*(){const P=new Uint8Array(l.default.sha256.array(M));if(!E)throw new Error("InMemorySigner requires provided account id");const x=yield this.keyStore.getKey(A,E);if(null===x)throw new Error(`Key for ${E} not found in ${A}`);return x.sign(P)})}toString(){return`InMemorySigner(${this.keyStore})`}}u.InMemorySigner=m},25035:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Signer=u.InMemorySigner=void 0;var p=g(22972);Object.defineProperty(u,"InMemorySigner",{enumerable:!0,get:function(){return p.InMemorySigner}});var D=g(83159);Object.defineProperty(u,"Signer",{enumerable:!0,get:function(){return D.Signer}})},83159:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Signer=void 0;u.Signer=class g{}},79344:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.actionCreators=u.stringifyJsonOrBytes=void 0;const p=g(86041);function v(N){return void 0!==N.byteLength&&N.byteLength===N.length?N:Buffer.from(JSON.stringify(N))}u.stringifyJsonOrBytes=v,u.actionCreators={addKey:function E(N,F){return new p.Action({addKey:new p.AddKey({publicKey:N,accessKey:F})})},createAccount:function _(){return new p.Action({createAccount:new p.CreateAccount({})})},deleteAccount:function P(N){return new p.Action({deleteAccount:new p.DeleteAccount({beneficiaryId:N})})},deleteKey:function A(N){return new p.Action({deleteKey:new p.DeleteKey({publicKey:N})})},deployContract:function l(N){return new p.Action({deployContract:new p.DeployContract({code:N})})},fullAccessKey:function D(){return new p.AccessKey({permission:new p.AccessKeyPermission({fullAccess:new p.FullAccessPermission({})})})},functionCall:function m(N,F,L,z,j=v,W=!1){return W?new p.Action({functionCall:new p.FunctionCall({methodName:N,args:F,gas:L,deposit:z})}):new p.Action({functionCall:new p.FunctionCall({methodName:N,args:j(F),gas:L,deposit:z})})},functionCallAccessKey:function w(N,F,L){return new p.AccessKey({permission:new p.AccessKeyPermission({functionCall:new p.FunctionCallPermission({receiverId:N,allowance:L,methodNames:F})})})},signedDelegate:function x({delegateAction:N,signature:F}){return new p.Action({signedDelegate:new p.SignedDelegate({delegateAction:N,signature:F})})},stake:function M(N,F){return new p.Action({stake:new p.Stake({stake:N,publicKey:F})})},transfer:function b(N){return new p.Action({transfer:new p.Transfer({deposit:N})})}}},86041:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Action=u.SignedDelegate=u.DeleteAccount=u.DeleteKey=u.AddKey=u.Stake=u.Transfer=u.FunctionCall=u.DeployContract=u.CreateAccount=u.IAction=u.AccessKey=u.AccessKeyPermission=u.FullAccessPermission=u.FunctionCallPermission=void 0;const p=g(17527);class D{constructor(W){if(1!==Object.keys(W).length)throw new Error("Enum can only take single value");Object.keys(W).map(Y=>{this[Y]=W[Y],this.enum=Y})}}class w extends p.Assignable{}u.FunctionCallPermission=w;class _ extends p.Assignable{}u.FullAccessPermission=_;u.AccessKeyPermission=class l extends D{};class v extends p.Assignable{}u.AccessKey=v;class m extends p.Assignable{}u.IAction=m;u.CreateAccount=class b extends m{};u.DeployContract=class M extends m{};u.FunctionCall=class E extends m{};u.Transfer=class A extends m{};u.Stake=class P extends m{};u.AddKey=class x extends m{};u.DeleteKey=class N extends m{};u.DeleteAccount=class F extends m{};u.SignedDelegate=class L extends m{};u.Action=class z extends D{}},11889:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.createTransaction=void 0;const p=g(53699);u.createTransaction=function D(w,_,l,v,m,b){return new p.Transaction({signerId:w,publicKey:_,nonce:v,receiverId:l,actions:m,blockHash:b})}},34169:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.buildDelegateAction=u.DelegateAction=void 0;const p=g(17527),D=g(79344),{addKey:w,createAccount:_,deleteAccount:l,deleteKey:v,deployContract:m,functionCall:b,stake:M,transfer:E}=D.actionCreators;class A extends p.Assignable{}u.DelegateAction=A,u.buildDelegateAction=function P({actions:x,maxBlockHeight:N,nonce:F,publicKey:L,receiverId:z,senderId:j}){return new A({senderId:j,receiverId:z,actions:x.map(W=>{if(!W.type&&!W.params)return W;switch(W.type){case"AddKey":{const{publicKey:Y,accessKey:G}=W.params;return w(Y,G)}case"CreateAccount":return _(W.params.createAccount);case"DeleteAccount":return l(W.params.deleteAccount);case"DeleteKey":return v(W.params.publicKey);case"DeployContract":return m(W.params.code);case"FunctionCall":{const{methodName:Y,args:G,gas:Q,deposit:q}=W.params;return b(Y,G,Q,q)}case"Stake":return M(W.params.stake,W.params.publicKey);case"Transfer":{const{deposit:Y}=W.params;return E(Y)}}throw new Error("Unrecognized action")}),nonce:F,maxBlockHeight:N,publicKey:L})}},30448:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(w,_,l,v){void 0===v&&(v=l);var m=Object.getOwnPropertyDescriptor(_,l);(!m||("get"in m?!_.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return _[l]}}),Object.defineProperty(w,v,m)}:function(w,_,l,v){void 0===v&&(v=l),w[v]=_[l]}),D=this&&this.__exportStar||function(w,_){for(var l in w)"default"!==l&&!Object.prototype.hasOwnProperty.call(_,l)&&p(_,w,l)};Object.defineProperty(u,"__esModule",{value:!0}),D(g(79344),u),D(g(86041),u),D(g(11889),u),D(g(34169),u),D(g(53699),u),D(g(33033),u),D(g(13904),u)},37665:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.DelegateActionPrefix=void 0;const p=g(17527),D=Math.pow(2,30),w_MetaTransactions=366;class _ extends p.Assignable{}class l extends _{constructor(b){super({prefix:D+b})}}u.DelegateActionPrefix=class v extends l{constructor(){super(w_MetaTransactions)}}},53699:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.SCHEMA=u.SignedTransaction=u.Transaction=u.decodeSignedTransaction=u.decodeTransaction=u.encodeTransaction=u.encodeSignedDelegate=u.encodeDelegateAction=void 0;const p=g(55911),D=g(17527),w=g(21531),_=g(86041),l=g(34169),v=g(37665),m=g(13904);function E(F){return(0,w.serialize)(u.SCHEMA,F)}function A(F){return(0,w.deserialize)(u.SCHEMA,x,F)}function P(F){return(0,w.deserialize)(u.SCHEMA,N,F)}u.encodeDelegateAction=function b(F){return new Uint8Array([...(0,w.serialize)(u.SCHEMA,new v.DelegateActionPrefix),...(0,w.serialize)(u.SCHEMA,F)])},u.encodeSignedDelegate=function M(F){return(0,w.serialize)(u.SCHEMA,F)},u.encodeTransaction=E,u.decodeTransaction=A,u.decodeSignedTransaction=P;class x extends D.Assignable{encode(){return E(this)}static decode(L){return A(L)}}u.Transaction=x;class N extends D.Assignable{encode(){return E(this)}static decode(L){return P(L)}}u.SignedTransaction=N,u.SCHEMA=new Map([[m.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[N,{kind:"struct",fields:[["transaction",x],["signature",m.Signature]]}],[x,{kind:"struct",fields:[["signerId","string"],["publicKey",p.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[_.Action]]]}],[p.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[_.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",_.AccessKeyPermission]]}],[_.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",_.FunctionCallPermission],["fullAccess",_.FullAccessPermission]]}],[_.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[_.FullAccessPermission,{kind:"struct",fields:[]}],[_.Action,{kind:"enum",field:"enum",values:[["createAccount",_.CreateAccount],["deployContract",_.DeployContract],["functionCall",_.FunctionCall],["transfer",_.Transfer],["stake",_.Stake],["addKey",_.AddKey],["deleteKey",_.DeleteKey],["deleteAccount",_.DeleteAccount],["signedDelegate",_.SignedDelegate]]}],[_.CreateAccount,{kind:"struct",fields:[]}],[_.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[_.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[_.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[_.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",p.PublicKey]]}],[_.AddKey,{kind:"struct",fields:[["publicKey",p.PublicKey],["accessKey",_.AccessKey]]}],[_.DeleteKey,{kind:"struct",fields:[["publicKey",p.PublicKey]]}],[_.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[l.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[_.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",p.PublicKey]]}],[v.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[_.SignedDelegate,{kind:"struct",fields:[["delegateAction",l.DelegateAction],["signature",m.Signature]]}]])},33033:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(A,P,x,N){return new(x||(x=Promise))(function(L,z){function j(G){try{Y(N.next(G))}catch(Q){z(Q)}}function W(G){try{Y(N.throw(G))}catch(Q){z(Q)}}function Y(G){G.done?L(G.value):function F(L){return L instanceof x?L:new x(function(z){z(L)})}(G.value).then(j,W)}Y((N=N.apply(A,P||[])).next())})},D=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(u,"__esModule",{value:!0}),u.signDelegateAction=u.signTransaction=void 0;const w=D(g(1520)),_=g(86041),l=g(11889),v=g(53699),m=g(13904);function b(A,P,x,N){return p(this,void 0,void 0,function*(){const F=(0,v.encodeTransaction)(A),L=new Uint8Array(w.default.sha256.array(F)),z=yield P.signMessage(F,x,N);return[L,new v.SignedTransaction({transaction:A,signature:new m.Signature({keyType:A.publicKey.keyType,data:z.signature})})]})}u.signTransaction=function M(...A){return p(this,void 0,void 0,function*(){if(A[0].constructor===v.Transaction){const[P,x,N,F]=A;return b(P,x,N,F)}{const[P,x,N,F,L,z,j]=A,W=yield L.getPublicKey(z,j);return b((0,l.createTransaction)(z,W,P,x,N,F),L,z,j)}})},u.signDelegateAction=function E({delegateAction:A,signer:P}){return p(this,void 0,void 0,function*(){const x=(0,v.encodeDelegateAction)(A),N=yield P.sign(x),F=new _.SignedDelegate({delegateAction:A,signature:new m.Signature({keyType:A.publicKey.keyType,data:N})});return{hash:new Uint8Array(w.default.sha256.array(x)),signedDelegateAction:F}})}},13904:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Signature=void 0;const p=g(17527);class D extends p.Assignable{}u.Signature=D},52596:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.WalletConnection=u.ConnectedWalletAccount=u.Near=void 0;var p=g(56557);Object.defineProperty(u,"Near",{enumerable:!0,get:function(){return p.Near}});var D=g(55193);Object.defineProperty(u,"ConnectedWalletAccount",{enumerable:!0,get:function(){return D.ConnectedWalletAccount}}),Object.defineProperty(u,"WalletConnection",{enumerable:!0,get:function(){return D.WalletConnection}})},56557:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(v,m,b,M){return new(b||(b=Promise))(function(A,P){function x(L){try{F(M.next(L))}catch(z){P(z)}}function N(L){try{F(M.throw(L))}catch(z){P(z)}}function F(L){L.done?A(L.value):function E(A){return A instanceof b?A:new b(function(P){P(A)})}(L.value).then(x,N)}F((M=M.apply(v,m||[])).next())})},D=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(u,"__esModule",{value:!0}),u.Near=void 0;const w=g(11538),_=D(g(98538));u.Near=class l{constructor(m){var b;if(this.config=m,this.connection=w.Connection.fromConfig({networkId:m.networkId,provider:{type:"JsonRpcProvider",args:{url:m.nodeUrl,headers:m.headers}},signer:m.signer||{type:"InMemorySigner",keyStore:m.keyStore||(null===(b=m.deps)||void 0===b?void 0:b.keyStore)},jsvmAccountId:m.jsvmAccountId||`jsvm.${m.networkId}`}),m.masterAccount){const M=m.initialBalance?new _.default(m.initialBalance):new _.default("500000000000000000000000000");this.accountCreator=new w.LocalAccountCreator(new w.Account(this.connection,m.masterAccount),M)}else m.helperUrl?this.accountCreator=new w.UrlAccountCreator(this.connection,m.helperUrl):this.accountCreator=null}account(m){return p(this,void 0,void 0,function*(){return new w.Account(this.connection,m)})}createAccount(m,b){return p(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(m,b),new w.Account(this.connection,m)})}}},55193:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(N,F,L,z){return new(L||(L=Promise))(function(W,Y){function G(J){try{q(z.next(J))}catch(H){Y(H)}}function Q(J){try{q(z.throw(J))}catch(H){Y(H)}}function q(J){J.done?W(J.value):function j(W){return W instanceof L?W:new L(function(Y){Y(W)})}(J.value).then(G,Q)}q((z=z.apply(N,F||[])).next())})},D=this&&this.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(u,"__esModule",{value:!0}),u.ConnectedWalletAccount=u.WalletConnection=void 0;const w=g(11538),_=g(55911),l=g(30448),v=D(g(98538)),m=g(21531),A="pending_key";u.WalletConnection=class P{constructor(F,L){if("string"!=typeof L)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(W,Y)=>"isSignedIn"===Y?()=>!1:"getAccountId"===Y?()=>"":W[Y]&&"function"==typeof W[Y]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:W[Y]});this._near=F;const z=L+"_wallet_auth_key",j=JSON.parse(window.localStorage.getItem(z));this._networkId=F.config.networkId,this._walletBaseUrl=F.config.walletUrl,L=L||F.config.contractName||"default",this._keyStore=F.connection.signer.keyStore,this._authData=j||{allKeys:[]},this._authDataKey=z,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return p(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:F,methodNames:L,successUrl:z,failureUrl:j}){return p(this,void 0,void 0,function*(){const W=new URL(window.location.href),Y=new URL(this._walletBaseUrl+"/login/");if(Y.searchParams.set("success_url",z||W.href),Y.searchParams.set("failure_url",j||W.href),F){yield(yield this._near.account(F)).state(),Y.searchParams.set("contract_id",F);const Q=_.KeyPair.fromRandom("ed25519");Y.searchParams.set("public_key",Q.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,A+Q.getPublicKey(),Q)}L&&L.forEach(G=>{Y.searchParams.append("methodNames",G)}),window.location.assign(Y.toString())})}requestSignTransactions({transactions:F,meta:L,callbackUrl:z}){return p(this,void 0,void 0,function*(){const j=new URL(window.location.href),W=new URL("sign",this._walletBaseUrl);W.searchParams.set("transactions",F.map(Y=>(0,m.serialize)(l.SCHEMA,Y)).map(Y=>Buffer.from(Y).toString("base64")).join(",")),W.searchParams.set("callbackUrl",z||j.href),L&&W.searchParams.set("meta",L),window.location.assign(W.toString())})}_completeSignInWithAccessKey(){return p(this,void 0,void 0,function*(){const F=new URL(window.location.href),L=F.searchParams.get("public_key")||"",z=(F.searchParams.get("all_keys")||"").split(","),j=F.searchParams.get("account_id")||"";if(j){const W={accountId:j,allKeys:z};window.localStorage.setItem(this._authDataKey,JSON.stringify(W)),L&&(yield this._moveKeyFromTempToPermanent(j,L)),this._authData=W}F.searchParams.delete("public_key"),F.searchParams.delete("all_keys"),F.searchParams.delete("account_id"),F.searchParams.delete("meta"),F.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,F.toString())})}_moveKeyFromTempToPermanent(F,L){return p(this,void 0,void 0,function*(){const z=yield this._keyStore.getKey(this._networkId,A+L);yield this._keyStore.setKey(this._networkId,F,z),yield this._keyStore.removeKey(this._networkId,A+L)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new x(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class x extends w.Account{constructor(F,L,z){super(L,z),this.walletConnection=F}signAndSendTransaction({receiverId:F,actions:L,walletMeta:z,walletCallbackUrl:j=window.location.href}){const W=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return p(this,void 0,void 0,function*(){const Y=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let G=yield this.accessKeyForTransaction(F,L,Y);if(!G)throw new Error(`Cannot find matching key for transaction sent to ${F}`);if(Y&&Y.toString()===G.public_key)try{return yield W.signAndSendTransaction.call(this,{receiverId:F,actions:L})}catch(C){if("NotEnoughAllowance"!==C.type)throw C;G=yield this.accessKeyForTransaction(F,L)}const Q=yield this.connection.provider.block({finality:"final"}),q=(0,m.baseDecode)(Q.header.hash),J=_.PublicKey.from(G.public_key),H=G.access_key.nonce.add(new v.default(1)),te=(0,l.createTransaction)(this.accountId,J,F,H,L,q);return yield this.walletConnection.requestSignTransactions({transactions:[te],meta:z,callbackUrl:j}),new Promise((C,o)=>{setTimeout(()=>{o(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(F,L,z){return p(this,void 0,void 0,function*(){const{access_key:{permission:j}}=F;if("FullAccess"===j)return!0;if(j.FunctionCall){const{receiver_id:W,method_names:Y}=j.FunctionCall;if(W===this.accountId&&Y.includes("add_request_and_confirm"))return!0;if(W===L){if(1!==z.length)return!1;const[{functionCall:G}]=z;return G&&(!G.deposit||"0"===G.deposit.toString())&&(0===Y.length||Y.includes(G.methodName))}}return!1})}accessKeyForTransaction(F,L,z){return p(this,void 0,void 0,function*(){const j=yield this.getAccessKeys();if(z){const Y=j.find(G=>G.public_key.toString()===z.toString());if(Y&&(yield this.accessKeyMatchesTransaction(Y,F,L)))return Y}const W=this.walletConnection._authData.allKeys;for(const Y of j)if(-1!==W.indexOf(Y.public_key)&&(yield this.accessKeyMatchesTransaction(Y,F,L)))return Y;return null})}}u.ConnectedWalletAccount=x},52602:(re,u,g)=>{"use strict";var p=g(9028)("http-errors"),D=g(1106),w=g(31831),_=g(83894),l=g(77721);function v(F){return Number(String(F).charAt(0)+"00")}function P(F,L){var z=Object.getOwnPropertyDescriptor(F,"name");z&&z.configurable&&(z.value=L,Object.defineProperty(F,"name",z))}function N(F){return"Error"!==F.substr(-5)?F+"Error":F}re.exports=function m(){for(var F,L,z=500,j={},W=0;W=600)&&p("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof z||!w[z]&&(z<400||z>=600))&&(z=500);var G=m[z]||m[v(z)];for(var Q in F||(F=G?new G(L):new Error(L||w[z]),Error.captureStackTrace(F,m)),(!G||!(F instanceof G)||F.status!==z)&&(F.expose=z<500,F.status=F.statusCode=z),j)"status"!==Q&&"statusCode"!==Q&&(F[Q]=j[Q]);return F},re.exports.HttpError=function b(){function F(){throw new TypeError("cannot construct abstract class")}return _(F,Error),F}(),re.exports.isHttpError=function E(F){return function(z){return!(!z||"object"!=typeof z)&&(z instanceof F||z instanceof Error&&"boolean"==typeof z.expose&&"number"==typeof z.statusCode&&z.status===z.statusCode)}}(re.exports.HttpError),function x(F,L,z){L.forEach(function(W){var Y,G=l(w[W]);switch(v(W)){case 400:Y=function M(F,L,z){var j=N(L);function W(Y){var G=Y??w[z],Q=new Error(G);return Error.captureStackTrace(Q,W),D(Q,W.prototype),Object.defineProperty(Q,"message",{enumerable:!0,configurable:!0,value:G,writable:!0}),Object.defineProperty(Q,"name",{enumerable:!1,configurable:!0,value:j,writable:!0}),Q}return _(W,F),P(W,j),W.prototype.status=z,W.prototype.statusCode=z,W.prototype.expose=!0,W}(z,G,W);break;case 500:Y=function A(F,L,z){var j=N(L);function W(Y){var G=Y??w[z],Q=new Error(G);return Error.captureStackTrace(Q,W),D(Q,W.prototype),Object.defineProperty(Q,"message",{enumerable:!0,configurable:!0,value:G,writable:!0}),Object.defineProperty(Q,"name",{enumerable:!1,configurable:!0,value:j,writable:!0}),Q}return _(W,F),P(W,j),W.prototype.status=z,W.prototype.statusCode=z,W.prototype.expose=!1,W}(z,G,W)}Y&&(F[W]=Y,F[G]=Y)}),F["I'mateapot"]=p.function(F.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(re.exports,w.codes,re.exports.HttpError)},9028:re=>{"use strict";function g(D,w){if("function"!=typeof D)throw new TypeError("argument fn must be a function");return D}function p(D,w,_){if(!D||"object"!=typeof D&&"function"!=typeof D)throw new TypeError("argument obj must be object");var l=Object.getOwnPropertyDescriptor(D,w);if(!l)throw new TypeError("must call property on owner object");if(!l.configurable)throw new TypeError("property must be configurable")}re.exports=function u(D){if(!D)throw new TypeError("argument namespace is required");function w(_){}return w._file=void 0,w._ignored=!0,w._namespace=D,w._traced=!1,w._warned=Object.create(null),w.function=g,w.property=p,w}},60144:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Account=void 0;var p=g(11538);Object.defineProperty(u,"Account",{enumerable:!0,get:function(){return p.Account}})},30115:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.UrlAccountCreator=u.LocalAccountCreator=u.AccountCreator=void 0;var p=g(11538);Object.defineProperty(u,"AccountCreator",{enumerable:!0,get:function(){return p.AccountCreator}}),Object.defineProperty(u,"LocalAccountCreator",{enumerable:!0,get:function(){return p.LocalAccountCreator}}),Object.defineProperty(u,"UrlAccountCreator",{enumerable:!0,get:function(){return p.UrlAccountCreator}})},32164:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MultisigStateStatus=u.MultisigDeleteRequestRejectionError=u.MULTISIG_CONFIRM_METHODS=u.MULTISIG_CHANGE_METHODS=u.MULTISIG_DEPOSIT=u.MULTISIG_GAS=u.MULTISIG_ALLOWANCE=u.MULTISIG_STORAGE_KEY=u.AccountMultisig=u.Account2FA=void 0;var p=g(11538);Object.defineProperty(u,"Account2FA",{enumerable:!0,get:function(){return p.Account2FA}}),Object.defineProperty(u,"AccountMultisig",{enumerable:!0,get:function(){return p.AccountMultisig}}),Object.defineProperty(u,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return p.MULTISIG_STORAGE_KEY}}),Object.defineProperty(u,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return p.MULTISIG_ALLOWANCE}}),Object.defineProperty(u,"MULTISIG_GAS",{enumerable:!0,get:function(){return p.MULTISIG_GAS}}),Object.defineProperty(u,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return p.MULTISIG_DEPOSIT}}),Object.defineProperty(u,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return p.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(u,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return p.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(u,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return p.MultisigDeleteRequestRejectionError}}),Object.defineProperty(u,"MultisigStateStatus",{enumerable:!0,get:function(){return p.MultisigStateStatus}})},76207:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(_,l,v,m){return new(v||(v=Promise))(function(M,E){function A(N){try{x(m.next(N))}catch(F){E(F)}}function P(N){try{x(m.throw(N))}catch(F){E(F)}}function x(N){N.done?M(N.value):function b(M){return M instanceof v?M:new v(function(E){E(M)})}(N.value).then(A,P)}x((m=m.apply(_,l||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.connect=void 0;const D=g(33906);u.connect=function w(_){return p(this,void 0,void 0,function*(){return new D.Near(_)})}},8597:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(l,v,m,b){void 0===b&&(b=m);var M=Object.getOwnPropertyDescriptor(v,m);(!M||("get"in M?!v.__esModule:M.writable||M.configurable))&&(M={enumerable:!0,get:function(){return v[m]}}),Object.defineProperty(l,b,M)}:function(l,v,m,b){void 0===b&&(b=m),l[b]=v[m]}),D=this&&this.__setModuleDefault||(Object.create?function(l,v){Object.defineProperty(l,"default",{enumerable:!0,value:v})}:function(l,v){l.default=v}),w=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var v={};if(null!=l)for(var m in l)"default"!==m&&Object.prototype.hasOwnProperty.call(l,m)&&p(v,l,m);return D(v,l),v},_=this&&this.__exportStar||function(l,v){for(var m in l)"default"!==m&&!Object.prototype.hasOwnProperty.call(v,m)&&p(v,l,m)};Object.defineProperty(u,"__esModule",{value:!0}),u.keyStores=void 0,u.keyStores=w(g(46015)),_(g(29424),u),_(g(76207),u),g(4073)},29424:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(z,j,W,Y){void 0===Y&&(Y=W);var G=Object.getOwnPropertyDescriptor(j,W);(!G||("get"in G?!j.__esModule:G.writable||G.configurable))&&(G={enumerable:!0,get:function(){return j[W]}}),Object.defineProperty(z,Y,G)}:function(z,j,W,Y){void 0===Y&&(Y=W),z[Y]=j[W]}),D=this&&this.__setModuleDefault||(Object.create?function(z,j){Object.defineProperty(z,"default",{enumerable:!0,value:j})}:function(z,j){z.default=j}),w=this&&this.__importStar||function(z){if(z&&z.__esModule)return z;var j={};if(null!=z)for(var W in z)"default"!==W&&Object.prototype.hasOwnProperty.call(z,W)&&p(j,z,W);return D(j,z),j};Object.defineProperty(u,"__esModule",{value:!0}),u.WalletConnection=u.ConnectedWalletAccount=u.Near=u.KeyPair=u.Signer=u.InMemorySigner=u.Contract=u.Connection=u.Account=u.multisig=u.validators=u.transactions=u.utils=u.providers=u.accountCreator=void 0;const _=w(g(87974));u.providers=_;const l=w(g(75141));u.utils=l;const v=w(g(41468));u.transactions=v;const m=w(g(90744));u.validators=m;const b=g(60144);Object.defineProperty(u,"Account",{enumerable:!0,get:function(){return b.Account}});const M=w(g(32164));u.multisig=M;const E=w(g(30115));u.accountCreator=E;const A=g(60177);Object.defineProperty(u,"Connection",{enumerable:!0,get:function(){return A.Connection}});const P=g(96519);Object.defineProperty(u,"Signer",{enumerable:!0,get:function(){return P.Signer}}),Object.defineProperty(u,"InMemorySigner",{enumerable:!0,get:function(){return P.InMemorySigner}});const x=g(20866);Object.defineProperty(u,"Contract",{enumerable:!0,get:function(){return x.Contract}});const N=g(93633);Object.defineProperty(u,"KeyPair",{enumerable:!0,get:function(){return N.KeyPair}});const F=g(33906);Object.defineProperty(u,"Near",{enumerable:!0,get:function(){return F.Near}});const L=g(85091);Object.defineProperty(u,"ConnectedWalletAccount",{enumerable:!0,get:function(){return L.ConnectedWalletAccount}}),Object.defineProperty(u,"WalletConnection",{enumerable:!0,get:function(){return L.WalletConnection}})},60177:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Connection=void 0;var p=g(11538);Object.defineProperty(u,"Connection",{enumerable:!0,get:function(){return p.Connection}})},20866:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Contract=void 0;var p=g(11538);Object.defineProperty(u,"Contract",{enumerable:!0,get:function(){return p.Contract}})},46015:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MergeKeyStore=u.BrowserLocalStorageKeyStore=u.InMemoryKeyStore=u.KeyStore=void 0;const p=g(60987);Object.defineProperty(u,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}});const D=g(21473);Object.defineProperty(u,"InMemoryKeyStore",{enumerable:!0,get:function(){return D.InMemoryKeyStore}});const w=g(94974);Object.defineProperty(u,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return w.BrowserLocalStorageKeyStore}});const _=g(26523);Object.defineProperty(u,"MergeKeyStore",{enumerable:!0,get:function(){return _.MergeKeyStore}})},94974:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.BrowserLocalStorageKeyStore=void 0;var p=g(82540);Object.defineProperty(u,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return p.BrowserLocalStorageKeyStore}})},21473:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.InMemoryKeyStore=void 0;var p=g(90793);Object.defineProperty(u,"InMemoryKeyStore",{enumerable:!0,get:function(){return p.InMemoryKeyStore}})},60987:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.KeyStore=void 0;var p=g(90793);Object.defineProperty(u,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}})},26523:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MergeKeyStore=void 0;var p=g(90793);Object.defineProperty(u,"MergeKeyStore",{enumerable:!0,get:function(){return p.MergeKeyStore}})},33906:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Near=void 0;var p=g(52596);Object.defineProperty(u,"Near",{enumerable:!0,get:function(){return p.Near}})},87974:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ErrorContext=u.TypedError=u.getTransactionLastResult=u.FinalExecutionStatusBasic=u.JsonRpcProvider=u.Provider=void 0;const p=g(71308);Object.defineProperty(u,"Provider",{enumerable:!0,get:function(){return p.Provider}}),Object.defineProperty(u,"getTransactionLastResult",{enumerable:!0,get:function(){return p.getTransactionLastResult}}),Object.defineProperty(u,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return p.FinalExecutionStatusBasic}});const D=g(21355);Object.defineProperty(u,"JsonRpcProvider",{enumerable:!0,get:function(){return D.JsonRpcProvider}}),Object.defineProperty(u,"TypedError",{enumerable:!0,get:function(){return D.TypedError}}),Object.defineProperty(u,"ErrorContext",{enumerable:!0,get:function(){return D.ErrorContext}})},21355:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.JsonRpcProvider=u.TypedError=u.ErrorContext=void 0;var p=g(17527);Object.defineProperty(u,"ErrorContext",{enumerable:!0,get:function(){return p.ErrorContext}}),Object.defineProperty(u,"TypedError",{enumerable:!0,get:function(){return p.TypedError}});var D=g(1739);Object.defineProperty(u,"JsonRpcProvider",{enumerable:!0,get:function(){return D.JsonRpcProvider}})},71308:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.FinalExecutionStatusBasic=u.ExecutionStatusBasic=u.IdType=u.Provider=u.getTransactionLastResult=void 0;var p=g(41166);Object.defineProperty(u,"getTransactionLastResult",{enumerable:!0,get:function(){return p.getTransactionLastResult}});var D=g(1739);Object.defineProperty(u,"Provider",{enumerable:!0,get:function(){return D.Provider}});var w=g(17527);Object.defineProperty(u,"IdType",{enumerable:!0,get:function(){return w.IdType}}),Object.defineProperty(u,"ExecutionStatusBasic",{enumerable:!0,get:function(){return w.ExecutionStatusBasic}}),Object.defineProperty(u,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return w.FinalExecutionStatusBasic}})},96519:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Signer=u.InMemorySigner=void 0;var p=g(25035);Object.defineProperty(u,"InMemorySigner",{enumerable:!0,get:function(){return p.InMemorySigner}}),Object.defineProperty(u,"Signer",{enumerable:!0,get:function(){return p.Signer}})},41468:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.transfer=u.stake=u.functionCallAccessKey=u.functionCall=u.fullAccessKey=u.deployContract=u.deleteKey=u.deleteAccount=u.createAccount=u.addKey=u.encodeDelegateAction=u.encodeSignedDelegate=u.Transaction=u.SignedTransaction=u.Signature=u.signTransaction=u.createTransaction=u.SCHEMA=u.Transfer=u.Stake=u.FunctionCallPermission=u.FunctionCall=u.FullAccessPermission=u.DeployContract=u.DeleteKey=u.DeleteAccount=u.CreateAccount=u.AddKey=u.AccessKeyPermission=u.AccessKey=u.Action=u.stringifyJsonOrBytes=void 0;var p=g(30448);Object.defineProperty(u,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return p.stringifyJsonOrBytes}}),Object.defineProperty(u,"Action",{enumerable:!0,get:function(){return p.Action}}),Object.defineProperty(u,"AccessKey",{enumerable:!0,get:function(){return p.AccessKey}}),Object.defineProperty(u,"AccessKeyPermission",{enumerable:!0,get:function(){return p.AccessKeyPermission}}),Object.defineProperty(u,"AddKey",{enumerable:!0,get:function(){return p.AddKey}}),Object.defineProperty(u,"CreateAccount",{enumerable:!0,get:function(){return p.CreateAccount}}),Object.defineProperty(u,"DeleteAccount",{enumerable:!0,get:function(){return p.DeleteAccount}}),Object.defineProperty(u,"DeleteKey",{enumerable:!0,get:function(){return p.DeleteKey}}),Object.defineProperty(u,"DeployContract",{enumerable:!0,get:function(){return p.DeployContract}}),Object.defineProperty(u,"FullAccessPermission",{enumerable:!0,get:function(){return p.FullAccessPermission}}),Object.defineProperty(u,"FunctionCall",{enumerable:!0,get:function(){return p.FunctionCall}}),Object.defineProperty(u,"FunctionCallPermission",{enumerable:!0,get:function(){return p.FunctionCallPermission}}),Object.defineProperty(u,"Stake",{enumerable:!0,get:function(){return p.Stake}}),Object.defineProperty(u,"Transfer",{enumerable:!0,get:function(){return p.Transfer}}),Object.defineProperty(u,"SCHEMA",{enumerable:!0,get:function(){return p.SCHEMA}}),Object.defineProperty(u,"createTransaction",{enumerable:!0,get:function(){return p.createTransaction}}),Object.defineProperty(u,"signTransaction",{enumerable:!0,get:function(){return p.signTransaction}}),Object.defineProperty(u,"Signature",{enumerable:!0,get:function(){return p.Signature}}),Object.defineProperty(u,"SignedTransaction",{enumerable:!0,get:function(){return p.SignedTransaction}}),Object.defineProperty(u,"Transaction",{enumerable:!0,get:function(){return p.Transaction}}),Object.defineProperty(u,"encodeSignedDelegate",{enumerable:!0,get:function(){return p.encodeSignedDelegate}}),Object.defineProperty(u,"encodeDelegateAction",{enumerable:!0,get:function(){return p.encodeDelegateAction}});const D=g(30448);u.addKey=(x,N)=>D.actionCreators.addKey(x,N);u.createAccount=()=>D.actionCreators.createAccount();u.deleteAccount=x=>D.actionCreators.deleteAccount(x);u.deleteKey=x=>D.actionCreators.deleteKey(x);u.deployContract=x=>D.actionCreators.deployContract(x);u.fullAccessKey=()=>D.actionCreators.fullAccessKey();u.functionCall=(x,N,F,L,z,j)=>D.actionCreators.functionCall(x,N,F,L,z,j);u.functionCallAccessKey=(x,N,F)=>D.actionCreators.functionCallAccessKey(x,N,F);u.stake=(x,N)=>D.actionCreators.stake(x,N);u.transfer=x=>D.actionCreators.transfer(x)},64179:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Enum=u.Assignable=void 0;var p=g(17527);Object.defineProperty(u,"Assignable",{enumerable:!0,get:function(){return p.Assignable}});u.Enum=class D{constructor(_){if(1!==Object.keys(_).length)throw new Error("Enum can only take single value");Object.keys(_).map(l=>{this[l]=_[l],this.enum=l})}}},342:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.logWarning=u.TypedError=u.PositionalArgsError=u.ErrorContext=u.ArgumentTypeError=u.UnsupportedSerializationError=u.UnknownArgumentError=u.ConflictingOptions=u.ArgumentSchemaError=void 0;var p=g(11538);Object.defineProperty(u,"ArgumentSchemaError",{enumerable:!0,get:function(){return p.ArgumentSchemaError}}),Object.defineProperty(u,"ConflictingOptions",{enumerable:!0,get:function(){return p.ConflictingOptions}}),Object.defineProperty(u,"UnknownArgumentError",{enumerable:!0,get:function(){return p.UnknownArgumentError}}),Object.defineProperty(u,"UnsupportedSerializationError",{enumerable:!0,get:function(){return p.UnsupportedSerializationError}});var D=g(17527);Object.defineProperty(u,"ArgumentTypeError",{enumerable:!0,get:function(){return D.ArgumentTypeError}}),Object.defineProperty(u,"ErrorContext",{enumerable:!0,get:function(){return D.ErrorContext}}),Object.defineProperty(u,"PositionalArgsError",{enumerable:!0,get:function(){return D.PositionalArgsError}}),Object.defineProperty(u,"TypedError",{enumerable:!0,get:function(){return D.TypedError}});var w=g(41166);Object.defineProperty(u,"logWarning",{enumerable:!0,get:function(){return w.logWarning}})},76185:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.parseNearAmount=u.formatNearAmount=u.NEAR_NOMINATION_EXP=u.NEAR_NOMINATION=void 0;var p=g(41166);Object.defineProperty(u,"NEAR_NOMINATION",{enumerable:!0,get:function(){return p.NEAR_NOMINATION}}),Object.defineProperty(u,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return p.NEAR_NOMINATION_EXP}}),Object.defineProperty(u,"formatNearAmount",{enumerable:!0,get:function(){return p.formatNearAmount}}),Object.defineProperty(u,"parseNearAmount",{enumerable:!0,get:function(){return p.parseNearAmount}})},75141:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(P,x,N,F){void 0===F&&(F=N);var L=Object.getOwnPropertyDescriptor(x,N);(!L||("get"in L?!x.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return x[N]}}),Object.defineProperty(P,F,L)}:function(P,x,N,F){void 0===F&&(F=N),P[F]=x[N]}),D=this&&this.__setModuleDefault||(Object.create?function(P,x){Object.defineProperty(P,"default",{enumerable:!0,value:x})}:function(P,x){P.default=x}),w=this&&this.__importStar||function(P){if(P&&P.__esModule)return P;var x={};if(null!=P)for(var N in P)"default"!==N&&Object.prototype.hasOwnProperty.call(P,N)&&p(x,P,N);return D(x,P),x};Object.defineProperty(u,"__esModule",{value:!0}),u.logWarning=u.rpc_errors=u.KeyPairEd25519=u.KeyPair=u.PublicKey=u.format=u.enums=u.web=u.serialize=u.key_pair=void 0;const _=w(g(93633));u.key_pair=_;const l=w(g(55822));u.serialize=l;const v=w(g(63770));u.web=v;const m=w(g(64179));u.enums=m;const b=w(g(76185));u.format=b;const M=w(g(1158));u.rpc_errors=M;const E=g(93633);Object.defineProperty(u,"PublicKey",{enumerable:!0,get:function(){return E.PublicKey}}),Object.defineProperty(u,"KeyPair",{enumerable:!0,get:function(){return E.KeyPair}}),Object.defineProperty(u,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});const A=g(342);Object.defineProperty(u,"logWarning",{enumerable:!0,get:function(){return A.logWarning}})},93633:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.PublicKey=u.KeyType=u.KeyPairEd25519=u.KeyPair=void 0;var p=g(55911);Object.defineProperty(u,"KeyPair",{enumerable:!0,get:function(){return p.KeyPair}}),Object.defineProperty(u,"KeyPairEd25519",{enumerable:!0,get:function(){return p.KeyPairEd25519}}),Object.defineProperty(u,"KeyType",{enumerable:!0,get:function(){return p.KeyType}}),Object.defineProperty(u,"PublicKey",{enumerable:!0,get:function(){return p.PublicKey}})},1158:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ServerError=u.getErrorTypeFromErrorMessage=u.formatError=u.parseResultError=u.parseRpcError=void 0;var p=g(41166);Object.defineProperty(u,"parseRpcError",{enumerable:!0,get:function(){return p.parseRpcError}}),Object.defineProperty(u,"parseResultError",{enumerable:!0,get:function(){return p.parseResultError}}),Object.defineProperty(u,"formatError",{enumerable:!0,get:function(){return p.formatError}}),Object.defineProperty(u,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return p.getErrorTypeFromErrorMessage}}),Object.defineProperty(u,"ServerError",{enumerable:!0,get:function(){return p.ServerError}})},55822:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.BinaryReader=u.BinaryWriter=u.BorshError=u.deserialize=u.serialize=u.base_decode=u.base_encode=void 0;var p=g(21531);Object.defineProperty(u,"base_encode",{enumerable:!0,get:function(){return p.baseEncode}}),Object.defineProperty(u,"base_decode",{enumerable:!0,get:function(){return p.baseDecode}}),Object.defineProperty(u,"serialize",{enumerable:!0,get:function(){return p.serialize}}),Object.defineProperty(u,"deserialize",{enumerable:!0,get:function(){return p.deserialize}}),Object.defineProperty(u,"BorshError",{enumerable:!0,get:function(){return p.BorshError}}),Object.defineProperty(u,"BinaryWriter",{enumerable:!0,get:function(){return p.BinaryWriter}}),Object.defineProperty(u,"BinaryReader",{enumerable:!0,get:function(){return p.BinaryReader}})},63770:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.fetchJson=void 0;var p=g(1739);Object.defineProperty(u,"fetchJson",{enumerable:!0,get:function(){return p.fetchJson}})},90744:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.findSeatPrice=u.diffEpochValidators=void 0;var p=g(41166);Object.defineProperty(u,"diffEpochValidators",{enumerable:!0,get:function(){return p.diffEpochValidators}}),Object.defineProperty(u,"findSeatPrice",{enumerable:!0,get:function(){return p.findSeatPrice}})},85091:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.WalletConnection=u.ConnectedWalletAccount=void 0;var p=g(52596);Object.defineProperty(u,"ConnectedWalletAccount",{enumerable:!0,get:function(){return p.ConnectedWalletAccount}}),Object.defineProperty(u,"WalletConnection",{enumerable:!0,get:function(){return p.WalletConnection}})},31831:(re,u,g)=>{"use strict";var p=g(31008);function w(_){if("number"==typeof _){if(!w[_])throw new Error("invalid status code: "+_);return _}if("string"!=typeof _)throw new TypeError("code must be a number or string");var l=parseInt(_,10);if(!isNaN(l)){if(!w[l])throw new Error("invalid status code: "+l);return l}if(!(l=w[_.toLowerCase()]))throw new Error('invalid status message: "'+_+'"');return l}re.exports=w,w.STATUS_CODES=p,w.codes=function D(_,l){var v=[];return Object.keys(l).forEach(function(b){var M=l[b],E=Number(b);_[E]=M,_[M]=E,_[M.toLowerCase()]=E,v.push(E)}),v}(w,p),w.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},w.empty={204:!0,205:!0,304:!0},w.retry={502:!0,503:!0,504:!0}},54502:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var p=g(8046);function v(S,k,B){return void 0===k&&(k=new Uint8Array(2)),void 0===B&&(B=0),k[B+0]=S>>>8,k[B+1]=S>>>0,k}function m(S,k,B){return void 0===k&&(k=new Uint8Array(2)),void 0===B&&(B=0),k[B+0]=S>>>0,k[B+1]=S>>>8,k}function b(S,k){return void 0===k&&(k=0),S[k]<<24|S[k+1]<<16|S[k+2]<<8|S[k+3]}function M(S,k){return void 0===k&&(k=0),(S[k]<<24|S[k+1]<<16|S[k+2]<<8|S[k+3])>>>0}function E(S,k){return void 0===k&&(k=0),S[k+3]<<24|S[k+2]<<16|S[k+1]<<8|S[k]}function A(S,k){return void 0===k&&(k=0),(S[k+3]<<24|S[k+2]<<16|S[k+1]<<8|S[k])>>>0}function P(S,k,B){return void 0===k&&(k=new Uint8Array(4)),void 0===B&&(B=0),k[B+0]=S>>>24,k[B+1]=S>>>16,k[B+2]=S>>>8,k[B+3]=S>>>0,k}function x(S,k,B){return void 0===k&&(k=new Uint8Array(4)),void 0===B&&(B=0),k[B+0]=S>>>0,k[B+1]=S>>>8,k[B+2]=S>>>16,k[B+3]=S>>>24,k}function j(S,k,B){return void 0===k&&(k=new Uint8Array(8)),void 0===B&&(B=0),P(S/4294967296>>>0,k,B),P(S>>>0,k,B+4),k}function W(S,k,B){return void 0===k&&(k=new Uint8Array(8)),void 0===B&&(B=0),x(S>>>0,k,B),x(S/4294967296>>>0,k,B+4),k}u.readInt16BE=function D(S,k){return void 0===k&&(k=0),(S[k+0]<<8|S[k+1])<<16>>16},u.readUint16BE=function w(S,k){return void 0===k&&(k=0),(S[k+0]<<8|S[k+1])>>>0},u.readInt16LE=function _(S,k){return void 0===k&&(k=0),(S[k+1]<<8|S[k])<<16>>16},u.readUint16LE=function l(S,k){return void 0===k&&(k=0),(S[k+1]<<8|S[k])>>>0},u.writeUint16BE=v,u.writeInt16BE=v,u.writeUint16LE=m,u.writeInt16LE=m,u.readInt32BE=b,u.readUint32BE=M,u.readInt32LE=E,u.readUint32LE=A,u.writeUint32BE=P,u.writeInt32BE=P,u.writeUint32LE=x,u.writeInt32LE=x,u.readInt64BE=function N(S,k){void 0===k&&(k=0);var B=b(S,k),I=b(S,k+4);return 4294967296*B+I-4294967296*(I>>31)},u.readUint64BE=function F(S,k){return void 0===k&&(k=0),4294967296*M(S,k)+M(S,k+4)},u.readInt64LE=function L(S,k){void 0===k&&(k=0);var B=E(S,k);return 4294967296*E(S,k+4)+B-4294967296*(B>>31)},u.readUint64LE=function z(S,k){void 0===k&&(k=0);var B=A(S,k);return 4294967296*A(S,k+4)+B},u.writeUint64BE=j,u.writeInt64BE=j,u.writeUint64LE=W,u.writeInt64LE=W,u.readUintBE=function Y(S,k,B){if(void 0===B&&(B=0),S%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(S/8>k.length-B)throw new Error("readUintBE: array is too short for the given bitLength");for(var I=0,f=1,R=S/8+B-1;R>=B;R--)I+=k[R]*f,f*=256;return I},u.readUintLE=function G(S,k,B){if(void 0===B&&(B=0),S%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(S/8>k.length-B)throw new Error("readUintLE: array is too short for the given bitLength");for(var I=0,f=1,R=B;R=I;R--)B[R]=k/f&255,f*=256;return B},u.writeUintLE=function q(S,k,B,I){if(void 0===B&&(B=new Uint8Array(S/8)),void 0===I&&(I=0),S%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!p.isSafeInteger(k))throw new Error("writeUintLE value must be an integer");for(var f=1,R=I;R{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var p=g(54502),D=g(69815),w=20;function _(b,M,E){for(var A=1634760805,P=857760878,x=2036477234,N=1797285236,F=E[3]<<24|E[2]<<16|E[1]<<8|E[0],L=E[7]<<24|E[6]<<16|E[5]<<8|E[4],z=E[11]<<24|E[10]<<16|E[9]<<8|E[8],j=E[15]<<24|E[14]<<16|E[13]<<8|E[12],W=E[19]<<24|E[18]<<16|E[17]<<8|E[16],Y=E[23]<<24|E[22]<<16|E[21]<<8|E[20],G=E[27]<<24|E[26]<<16|E[25]<<8|E[24],Q=E[31]<<24|E[30]<<16|E[29]<<8|E[28],q=M[3]<<24|M[2]<<16|M[1]<<8|M[0],J=M[7]<<24|M[6]<<16|M[5]<<8|M[4],H=M[11]<<24|M[10]<<16|M[9]<<8|M[8],te=M[15]<<24|M[14]<<16|M[13]<<8|M[12],C=A,o=P,s=x,d=N,h=F,S=L,k=z,B=j,I=W,f=Y,R=G,se=Q,ee=q,oe=J,de=H,Ce=te,ye=0;ye>>16|ee<<16)|0)>>>20|h<<12,S=(S^=f=f+(oe=(oe^=o=o+S|0)>>>16|oe<<16)|0)>>>20|S<<12,k=(k^=R=R+(de=(de^=s=s+k|0)>>>16|de<<16)|0)>>>20|k<<12,B=(B^=se=se+(Ce=(Ce^=d=d+B|0)>>>16|Ce<<16)|0)>>>20|B<<12,k=(k^=R=R+(de=(de^=s=s+k|0)>>>24|de<<8)|0)>>>25|k<<7,B=(B^=se=se+(Ce=(Ce^=d=d+B|0)>>>24|Ce<<8)|0)>>>25|B<<7,S=(S^=f=f+(oe=(oe^=o=o+S|0)>>>24|oe<<8)|0)>>>25|S<<7,h=(h^=I=I+(ee=(ee^=C=C+h|0)>>>24|ee<<8)|0)>>>25|h<<7,S=(S^=R=R+(Ce=(Ce^=C=C+S|0)>>>16|Ce<<16)|0)>>>20|S<<12,k=(k^=se=se+(ee=(ee^=o=o+k|0)>>>16|ee<<16)|0)>>>20|k<<12,B=(B^=I=I+(oe=(oe^=s=s+B|0)>>>16|oe<<16)|0)>>>20|B<<12,h=(h^=f=f+(de=(de^=d=d+h|0)>>>16|de<<16)|0)>>>20|h<<12,B=(B^=I=I+(oe=(oe^=s=s+B|0)>>>24|oe<<8)|0)>>>25|B<<7,h=(h^=f=f+(de=(de^=d=d+h|0)>>>24|de<<8)|0)>>>25|h<<7,k=(k^=se=se+(ee=(ee^=o=o+k|0)>>>24|ee<<8)|0)>>>25|k<<7,S=(S^=R=R+(Ce=(Ce^=C=C+S|0)>>>24|Ce<<8)|0)>>>25|S<<7;p.writeUint32LE(C+A|0,b,0),p.writeUint32LE(o+P|0,b,4),p.writeUint32LE(s+x|0,b,8),p.writeUint32LE(d+N|0,b,12),p.writeUint32LE(h+F|0,b,16),p.writeUint32LE(S+L|0,b,20),p.writeUint32LE(k+z|0,b,24),p.writeUint32LE(B+j|0,b,28),p.writeUint32LE(I+W|0,b,32),p.writeUint32LE(f+Y|0,b,36),p.writeUint32LE(R+G|0,b,40),p.writeUint32LE(se+Q|0,b,44),p.writeUint32LE(ee+q|0,b,48),p.writeUint32LE(oe+J|0,b,52),p.writeUint32LE(de+H|0,b,56),p.writeUint32LE(Ce+te|0,b,60)}function l(b,M,E,A,P){if(void 0===P&&(P=0),32!==b.length)throw new Error("ChaCha: key size must be 32 bytes");if(A.length>>=8,M++;if(A>0)throw new Error("ChaCha: counter overflow")}u.streamXOR=l,u.stream=function v(b,M,E,A){return void 0===A&&(A=0),D.wipe(E),l(b,M,E,E,A)}},95876:(re,u,g)=>{"use strict";var D=g(4484),w=g(60314),_=g(69815),l=g(54502),v=g(19976);u.Cv=32,u.WH=12,u.pg=16;var m=new Uint8Array(16),b=function(){function M(E){if(this.nonceLength=u.WH,this.tagLength=u.pg,E.length!==u.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(E)}return M.prototype.seal=function(E,A,P,x){if(E.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var N=new Uint8Array(16);N.set(E,N.length-E.length);var F=new Uint8Array(32);D.stream(this._key,N,F,4);var z,L=A.length+this.tagLength;if(x){if(x.length!==L)throw new Error("ChaCha20Poly1305: incorrect destination length");z=x}else z=new Uint8Array(L);return D.streamXOR(this._key,N,A,z,4),this._authenticate(z.subarray(z.length-this.tagLength,z.length),F,z.subarray(0,z.length-this.tagLength),P),_.wipe(N),z},M.prototype.open=function(E,A,P,x){if(E.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(A.length0&&N.update(m.subarray(x.length%16))),N.update(P),P.length%16>0&&N.update(m.subarray(P.length%16));var F=new Uint8Array(8);x&&l.writeUint64LE(x.length,F),N.update(F),l.writeUint64LE(P.length,F),N.update(F);for(var L=N.digest(),z=0;z{"use strict";function D(_,l){if(_.length!==l.length)return 0;for(var v=0,m=0;m<_.length;m++)v|=_[m]^l[m];return 1&v-1>>>8}Object.defineProperty(u,"__esModule",{value:!0}),u.select=function g(_,l,v){return~(_-1)&l|_-1&v},u.lessOrEqual=function p(_,l){return(0|_)-(0|l)-1>>>31&1},u.compare=D,u.equal=function w(_,l){return 0!==_.length&&0!==l.length&&0!==D(_,l)}},65553:(re,u,g)=>{"use strict";var D=g(5784),w=g(86375),_=g(69815);function l(ve){var ae=new Float64Array(16);if(ve)for(var fe=0;fe>16&1),fe[Se-1]&=65535;fe[15]=pe[15]-32767-(fe[14]>>16&1);var be=fe[15]>>16&1;fe[14]&=65535,L(pe,fe,1-be)}for(Se=0;Se<16;Se++)ve[2*Se]=255&pe[Se],ve[2*Se+1]=pe[Se]>>8}function j(ve,ae){for(var fe=0,pe=0;pe<32;pe++)fe|=ve[pe]^ae[pe];return(1&fe-1>>>8)-1}function W(ve,ae){var fe=new Uint8Array(32),pe=new Uint8Array(32);return z(fe,ve),z(pe,ae),j(fe,pe)}function Y(ve){var ae=new Uint8Array(32);return z(ae,ve),1&ae[0]}function Q(ve,ae,fe){for(var pe=0;pe<16;pe++)ve[pe]=ae[pe]+fe[pe]}function q(ve,ae,fe){for(var pe=0;pe<16;pe++)ve[pe]=ae[pe]-fe[pe]}function J(ve,ae,fe){var pe,Se,ce=0,be=0,Pe=0,Fe=0,lt=0,Ge=0,He=0,Kt=0,tt=0,nt=0,Vt=0,ot=0,at=0,Gt=0,Re=0,Ae=0,Te=0,Be=0,Ve=0,mt=0,Ze=0,ct=0,hn=0,ft=0,At=0,wn=0,ze=0,Qe=0,Ht=0,pt=0,vt=0,$t=fe[0],dt=fe[1],gt=fe[2],mn=fe[3],ut=fe[4],wt=fe[5],Sn=fe[6],yt=fe[7],Et=fe[8],_e=fe[9],Ee=fe[10],Me=fe[11],me=fe[12],Oe=fe[13],Ke=fe[14],it=fe[15];ce+=(pe=ae[0])*$t,be+=pe*dt,Pe+=pe*gt,Fe+=pe*mn,lt+=pe*ut,Ge+=pe*wt,He+=pe*Sn,Kt+=pe*yt,tt+=pe*Et,nt+=pe*_e,Vt+=pe*Ee,ot+=pe*Me,at+=pe*me,Gt+=pe*Oe,Re+=pe*Ke,Ae+=pe*it,be+=(pe=ae[1])*$t,Pe+=pe*d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it,Gt+=(pe=ae[13])*$t,Re+=pe*dt,Ae+=pe*gt,Te+=pe*mn,Be+=pe*ut,Ve+=pe*wt,mt+=pe*Sn,Ze+=pe*yt,ct+=pe*Et,hn+=pe*_e,ft+=pe*Ee,At+=pe*Me,wn+=pe*me,ze+=pe*Oe,Qe+=pe*Ke,Ht+=pe*it,Re+=(pe=ae[14])*$t,Ae+=pe*dt,Te+=pe*gt,Be+=pe*mn,Ve+=pe*ut,mt+=pe*wt,Ze+=pe*Sn,ct+=pe*yt,hn+=pe*Et,ft+=pe*_e,At+=pe*Ee,wn+=pe*Me,ze+=pe*me,Qe+=pe*Oe,Ht+=pe*Ke,pt+=pe*it,Ae+=(pe=ae[15])*$t,be+=38*(Be+=pe*gt),Pe+=38*(Ve+=pe*mn),Fe+=38*(mt+=pe*ut),lt+=38*(Ze+=pe*wt),Ge+=38*(ct+=pe*Sn),He+=38*(hn+=pe*yt),Kt+=38*(ft+=pe*Et),tt+=38*(At+=pe*_e),nt+=38*(wn+=pe*Ee),Vt+=38*(ze+=pe*Me),ot+=38*(Qe+=pe*me),at+=38*(Ht+=pe*Oe),Gt+=38*(pt+=pe*Ke),Re+=38*(vt+=pe*it),ce=(pe=(ce+=38*(Te+=pe*dt))+(Se=1)+65535)-65536*(Se=Math.floor(pe/65536)),be=(pe=be+Se+65535)-65536*(Se=Math.floor(pe/65536)),Pe=(pe=Pe+Se+65535)-65536*(Se=Math.floor(pe/65536)),Fe=(pe=Fe+Se+65535)-65536*(Se=Math.floor(pe/65536)),lt=(pe=lt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Ge=(pe=Ge+Se+65535)-65536*(Se=Math.floor(pe/65536)),He=(pe=He+Se+65535)-65536*(Se=Math.floor(pe/65536)),Kt=(pe=Kt+Se+65535)-65536*(Se=Math.floor(pe/65536)),tt=(pe=tt+Se+65535)-65536*(Se=Math.floor(pe/65536)),nt=(pe=nt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Vt=(pe=Vt+Se+65535)-65536*(Se=Math.floor(pe/65536)),ot=(pe=ot+Se+65535)-65536*(Se=Math.floor(pe/65536)),at=(pe=at+Se+65535)-65536*(Se=Math.floor(pe/65536)),Gt=(pe=Gt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Re=(pe=Re+Se+65535)-65536*(Se=Math.floor(pe/65536)),Ae=(pe=Ae+Se+65535)-65536*(Se=Math.floor(pe/65536)),ce=(pe=(ce+=Se-1+37*(Se-1))+(Se=1)+65535)-65536*(Se=Math.floor(pe/65536)),be=(pe=be+Se+65535)-65536*(Se=Math.floor(pe/65536)),Pe=(pe=Pe+Se+65535)-65536*(Se=Math.floor(pe/65536)),Fe=(pe=Fe+Se+65535)-65536*(Se=Math.floor(pe/65536)),lt=(pe=lt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Ge=(pe=Ge+Se+65535)-65536*(Se=Math.floor(pe/65536)),He=(pe=He+Se+65535)-65536*(Se=Math.floor(pe/65536)),Kt=(pe=Kt+Se+65535)-65536*(Se=Math.floor(pe/65536)),tt=(pe=tt+Se+65535)-65536*(Se=Math.floor(pe/65536)),nt=(pe=nt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Vt=(pe=Vt+Se+65535)-65536*(Se=Math.floor(pe/65536)),ot=(pe=ot+Se+65535)-65536*(Se=Math.floor(pe/65536)),at=(pe=at+Se+65535)-65536*(Se=Math.floor(pe/65536)),Gt=(pe=Gt+Se+65535)-65536*(Se=Math.floor(pe/65536)),Re=(pe=Re+Se+65535)-65536*(Se=Math.floor(pe/65536)),Ae=(pe=Ae+Se+65535)-65536*(Se=Math.floor(pe/65536)),ce+=Se-1+37*(Se-1),ve[0]=ce,ve[1]=be,ve[2]=Pe,ve[3]=Fe,ve[4]=lt,ve[5]=Ge,ve[6]=He,ve[7]=Kt,ve[8]=tt,ve[9]=nt,ve[10]=Vt,ve[11]=ot,ve[12]=at,ve[13]=Gt,ve[14]=Re,ve[15]=Ae}function H(ve,ae){J(ve,ae,ae)}function te(ve,ae){var pe,fe=l();for(pe=0;pe<16;pe++)fe[pe]=ae[pe];for(pe=253;pe>=0;pe--)H(fe,fe),2!==pe&&4!==pe&&J(fe,fe,ae);for(pe=0;pe<16;pe++)ve[pe]=fe[pe]}function o(ve,ae){var fe=l(),pe=l(),Se=l(),ce=l(),be=l(),Pe=l(),Fe=l(),lt=l(),Ge=l();q(fe,ve[1],ve[0]),q(Ge,ae[1],ae[0]),J(fe,fe,Ge),Q(pe,ve[0],ve[1]),Q(Ge,ae[0],ae[1]),J(pe,pe,Ge),J(Se,ve[3],ae[3]),J(Se,Se,E),J(ce,ve[2],ae[2]),Q(ce,ce,ce),q(be,pe,fe),q(Pe,ce,Se),Q(Fe,ce,Se),Q(lt,pe,fe),J(ve[0],be,Pe),J(ve[1],lt,Fe),J(ve[2],Fe,Pe),J(ve[3],be,lt)}function s(ve,ae,fe){for(var pe=0;pe<4;pe++)L(ve[pe],ae[pe],fe)}function d(ve,ae){var fe=l(),pe=l(),Se=l();te(Se,ae[2]),J(fe,ae[0],Se),J(pe,ae[1],Se),z(ve,pe),ve[31]^=Y(fe)<<7}function h(ve,ae,fe){N(ve[0],m),N(ve[1],b),N(ve[2],b),N(ve[3],m);for(var pe=255;pe>=0;--pe){var Se=fe[pe/8|0]>>(7&pe)&1;s(ve,ae,Se),o(ae,ve),o(ve,ve),s(ve,ae,Se)}}function S(ve,ae){var fe=[l(),l(),l(),l()];N(fe[0],A),N(fe[1],P),N(fe[2],b),J(fe[3],A,P),h(ve,fe,ae)}function k(ve){if(ve.length!==u.aP)throw new Error("ed25519: seed must be "+u.aP+" bytes");var ae=w.hash(ve);ae[0]&=248,ae[31]&=127,ae[31]|=64;var fe=new Uint8Array(32),pe=[l(),l(),l(),l()];S(pe,ae),d(fe,pe);var Se=new Uint8Array(64);return Se.set(ve),Se.set(fe,32),{publicKey:fe,secretKey:Se}}u._w=k;var f=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function R(ve,ae){var fe,pe,Se,ce;for(pe=63;pe>=32;--pe){for(fe=0,Se=pe-32,ce=pe-12;Se>4)*f[Se],fe=ae[Se]>>8,ae[Se]&=255;for(Se=0;Se<32;Se++)ae[Se]-=fe*f[Se];for(pe=0;pe<32;pe++)ae[pe+1]+=ae[pe]>>8,ve[pe]=255&ae[pe]}function se(ve){for(var ae=new Float64Array(64),fe=0;fe<64;fe++)ae[fe]=ve[fe];for(fe=0;fe<64;fe++)ve[fe]=0;R(ve,ae)}function oe(ve,ae){var fe=l(),pe=l(),Se=l(),ce=l(),be=l(),Pe=l(),Fe=l();return N(ve[2],b),function G(ve,ae){for(var fe=0;fe<16;fe++)ve[fe]=ae[2*fe]+(ae[2*fe+1]<<8);ve[15]&=32767}(ve[1],ae),H(Se,ve[1]),J(ce,Se,M),q(Se,Se,ve[2]),Q(ce,ve[2],ce),H(be,ce),H(Pe,be),J(Fe,Pe,be),J(fe,Fe,Se),J(fe,fe,ce),function C(ve,ae){var pe,fe=l();for(pe=0;pe<16;pe++)fe[pe]=ae[pe];for(pe=250;pe>=0;pe--)H(fe,fe),1!==pe&&J(fe,fe,ae);for(pe=0;pe<16;pe++)ve[pe]=fe[pe]}(fe,fe),J(fe,fe,Se),J(fe,fe,ce),J(fe,fe,ce),J(ve[0],fe,ce),H(pe,ve[0]),J(pe,pe,ce),W(pe,Se)&&J(ve[0],ve[0],x),H(pe,ve[0]),J(pe,pe,ce),W(pe,Se)?-1:(Y(ve[0])===ae[31]>>7&&q(ve[0],m,ve[0]),J(ve[3],ve[0],ve[1]),0)}u.Xx=function ee(ve,ae){var fe=new Float64Array(64),pe=[l(),l(),l(),l()],Se=w.hash(ve.subarray(0,32));Se[0]&=248,Se[31]&=127,Se[31]|=64;var ce=new Uint8Array(64);ce.set(Se.subarray(32),32);var be=new w.SHA512;be.update(ce.subarray(32)),be.update(ae);var Pe=be.digest();be.clean(),se(Pe),S(pe,Pe),d(ce,pe),be.reset(),be.update(ce.subarray(0,32)),be.update(ve.subarray(32)),be.update(ae);var Fe=be.digest();se(Fe);for(var lt=0;lt<32;lt++)fe[lt]=Pe[lt];for(lt=0;lt<32;lt++)for(var Ge=0;Ge<32;Ge++)fe[lt+Ge]+=Fe[lt]*Se[Ge];return R(ce.subarray(32),fe),ce}},35571:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.isSerializableHash=function g(p){return typeof p.saveState<"u"&&typeof p.restoreState<"u"&&typeof p.cleanSavedState<"u"}},85705:(re,u,g)=>{"use strict";var D=g(54193),w=g(69815),_=function(){function l(v,m,b,M){void 0===b&&(b=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=v,this._info=M;var E=D.hmac(this._hash,b,m);this._hmac=new D.HMAC(v,E),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return l.prototype._fillBuffer=function(){this._counter[0]++;var v=this._counter[0];if(0===v)throw new Error("hkdf: cannot expand more");this._hmac.reset(),v>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},l.prototype.expand=function(v){for(var m=new Uint8Array(v),b=0;b{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var p=g(35571),D=g(19976),w=g(69815),_=function(){function v(m,b){this._finished=!1,this._inner=new m,this._outer=new m,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var M=new Uint8Array(this.blockSize);b.length>this.blockSize?this._inner.update(b).finish(M).clean():M.set(b);for(var E=0;E{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.mul=Math.imul||function g(v,m){var M=65535&v,A=65535&m;return M*A+((v>>>16&65535)*A+M*(m>>>16&65535)<<16>>>0)|0},u.add=function p(v,m){return v+m|0},u.sub=function D(v,m){return v-m|0},u.rotl=function w(v,m){return v<>>32-m},u.rotr=function _(v,m){return v<<32-m|v>>>m},u.isInteger=Number.isInteger||function l(v){return"number"==typeof v&&isFinite(v)&&Math.floor(v)===v},u.MAX_SAFE_INTEGER=9007199254740991,u.isSafeInteger=function(v){return u.isInteger(v)&&v>=-u.MAX_SAFE_INTEGER&&v<=u.MAX_SAFE_INTEGER}},60314:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var p=g(19976),D=g(69815);u.DIGEST_LENGTH=16;var w=function(){function v(m){this.digestLength=u.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var b=m[0]|m[1]<<8;this._r[0]=8191&b;var M=m[2]|m[3]<<8;this._r[1]=8191&(b>>>13|M<<3);var E=m[4]|m[5]<<8;this._r[2]=7939&(M>>>10|E<<6);var A=m[6]|m[7]<<8;this._r[3]=8191&(E>>>7|A<<9);var P=m[8]|m[9]<<8;this._r[4]=255&(A>>>4|P<<12),this._r[5]=P>>>1&8190;var x=m[10]|m[11]<<8;this._r[6]=8191&(P>>>14|x<<2);var N=m[12]|m[13]<<8;this._r[7]=8065&(x>>>11|N<<5);var F=m[14]|m[15]<<8;this._r[8]=8191&(N>>>8|F<<8),this._r[9]=F>>>5&127,this._pad[0]=m[16]|m[17]<<8,this._pad[1]=m[18]|m[19]<<8,this._pad[2]=m[20]|m[21]<<8,this._pad[3]=m[22]|m[23]<<8,this._pad[4]=m[24]|m[25]<<8,this._pad[5]=m[26]|m[27]<<8,this._pad[6]=m[28]|m[29]<<8,this._pad[7]=m[30]|m[31]<<8}return v.prototype._blocks=function(m,b,M){for(var E=this._fin?0:2048,A=this._h[0],P=this._h[1],x=this._h[2],N=this._h[3],F=this._h[4],L=this._h[5],z=this._h[6],j=this._h[7],W=this._h[8],Y=this._h[9],G=this._r[0],Q=this._r[1],q=this._r[2],J=this._r[3],H=this._r[4],te=this._r[5],C=this._r[6],o=this._r[7],s=this._r[8],d=this._r[9];M>=16;){var h=m[b+0]|m[b+1]<<8;A+=8191&h;var S=m[b+2]|m[b+3]<<8;P+=8191&(h>>>13|S<<3);var k=m[b+4]|m[b+5]<<8;x+=8191&(S>>>10|k<<6);var B=m[b+6]|m[b+7]<<8;N+=8191&(k>>>7|B<<9);var I=m[b+8]|m[b+9]<<8;F+=8191&(B>>>4|I<<12),L+=I>>>1&8191;var f=m[b+10]|m[b+11]<<8;z+=8191&(I>>>14|f<<2);var R=m[b+12]|m[b+13]<<8;j+=8191&(f>>>11|R<<5);var se=m[b+14]|m[b+15]<<8,ee=0,oe=ee;oe+=A*G,oe+=P*(5*d),oe+=x*(5*s),oe+=N*(5*o),ee=(oe+=F*(5*C))>>>13,oe&=8191,oe+=L*(5*te),oe+=z*(5*H),oe+=j*(5*J),oe+=(W+=8191&(R>>>8|se<<8))*(5*q);var de=ee+=(oe+=(Y+=se>>>5|E)*(5*Q))>>>13;de+=A*Q,de+=P*G,de+=x*(5*d),de+=N*(5*s),ee=(de+=F*(5*o))>>>13,de&=8191,de+=L*(5*C),de+=z*(5*te),de+=j*(5*H),de+=W*(5*J),ee+=(de+=Y*(5*q))>>>13,de&=8191;var Ce=ee;Ce+=A*q,Ce+=P*Q,Ce+=x*G,Ce+=N*(5*d),ee=(Ce+=F*(5*s))>>>13,Ce&=8191,Ce+=L*(5*o),Ce+=z*(5*C),Ce+=j*(5*te),Ce+=W*(5*H);var ye=ee+=(Ce+=Y*(5*J))>>>13;ye+=A*J,ye+=P*q,ye+=x*Q,ye+=N*G,ee=(ye+=F*(5*d))>>>13,ye&=8191,ye+=L*(5*s),ye+=z*(5*o),ye+=j*(5*C),ye+=W*(5*te);var ve=ee+=(ye+=Y*(5*H))>>>13;ve+=A*H,ve+=P*J,ve+=x*q,ve+=N*Q,ee=(ve+=F*G)>>>13,ve&=8191,ve+=L*(5*d),ve+=z*(5*s),ve+=j*(5*o),ve+=W*(5*C);var ae=ee+=(ve+=Y*(5*te))>>>13;ae+=A*te,ae+=P*H,ae+=x*J,ae+=N*q,ee=(ae+=F*Q)>>>13,ae&=8191,ae+=L*G,ae+=z*(5*d),ae+=j*(5*s),ae+=W*(5*o);var fe=ee+=(ae+=Y*(5*C))>>>13;fe+=A*C,fe+=P*te,fe+=x*H,fe+=N*J,ee=(fe+=F*q)>>>13,fe&=8191,fe+=L*Q,fe+=z*G,fe+=j*(5*d),fe+=W*(5*s);var pe=ee+=(fe+=Y*(5*o))>>>13;pe+=A*o,pe+=P*C,pe+=x*te,pe+=N*H,ee=(pe+=F*J)>>>13,pe&=8191,pe+=L*q,pe+=z*Q,pe+=j*G,pe+=W*(5*d);var Se=ee+=(pe+=Y*(5*s))>>>13;Se+=A*s,Se+=P*o,Se+=x*C,Se+=N*te,ee=(Se+=F*H)>>>13,Se&=8191,Se+=L*J,Se+=z*q,Se+=j*Q,Se+=W*G;var ce=ee+=(Se+=Y*(5*d))>>>13;ce+=A*d,ce+=P*s,ce+=x*o,ce+=N*C,ee=(ce+=F*te)>>>13,ce&=8191,ce+=L*H,ce+=z*J,ce+=j*q,ce+=W*Q,A=oe=8191&(ee=(ee=((ee+=(ce+=Y*G)>>>13)<<2)+ee|0)+(oe&=8191)|0),P=de+=ee>>>=13,x=Ce&=8191,N=ye&=8191,F=ve&=8191,L=ae&=8191,z=fe&=8191,j=pe&=8191,W=Se&=8191,Y=ce&=8191,b+=16,M-=16}this._h[0]=A,this._h[1]=P,this._h[2]=x,this._h[3]=N,this._h[4]=F,this._h[5]=L,this._h[6]=z,this._h[7]=j,this._h[8]=W,this._h[9]=Y},v.prototype.finish=function(m,b){void 0===b&&(b=0);var E,A,P,x,M=new Uint16Array(10);if(this._leftover){for(x=this._leftover,this._buffer[x++]=1;x<16;x++)this._buffer[x]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(E=this._h[1]>>>13,this._h[1]&=8191,x=2;x<10;x++)this._h[x]+=E,E=this._h[x]>>>13,this._h[x]&=8191;for(this._h[0]+=5*E,E=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=E,E=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=E,M[0]=this._h[0]+5,E=M[0]>>>13,M[0]&=8191,x=1;x<10;x++)M[x]=this._h[x]+E,E=M[x]>>>13,M[x]&=8191;for(M[9]-=8192,A=(1^E)-1,x=0;x<10;x++)M[x]&=A;for(A=~A,x=0;x<10;x++)this._h[x]=this._h[x]&A|M[x];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),P=this._h[0]+this._pad[0],this._h[0]=65535&P,x=1;x<8;x++)P=(this._h[x]+this._pad[x]|0)+(P>>>16)|0,this._h[x]=65535&P;return m[b+0]=this._h[0]>>>0,m[b+1]=this._h[0]>>>8,m[b+2]=this._h[1]>>>0,m[b+3]=this._h[1]>>>8,m[b+4]=this._h[2]>>>0,m[b+5]=this._h[2]>>>8,m[b+6]=this._h[3]>>>0,m[b+7]=this._h[3]>>>8,m[b+8]=this._h[4]>>>0,m[b+9]=this._h[4]>>>8,m[b+10]=this._h[5]>>>0,m[b+11]=this._h[5]>>>8,m[b+12]=this._h[6]>>>0,m[b+13]=this._h[6]>>>8,m[b+14]=this._h[7]>>>0,m[b+15]=this._h[7]>>>8,this._finished=!0,this},v.prototype.update=function(m){var E,b=0,M=m.length;if(this._leftover){(E=16-this._leftover)>M&&(E=M);for(var A=0;A=16&&(E=M-M%16,this._blocks(m,b,E),b+=E,M-=E),M){for(A=0;A{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var p=g(59753),D=g(54502),w=g(69815);function _(M,E){return void 0===E&&(E=u.defaultRandomSource),E.randomBytes(M)}u.defaultRandomSource=new p.SystemRandomSource,u.randomBytes=_,u.randomUint32=function l(M){void 0===M&&(M=u.defaultRandomSource);var E=_(4,M),A=D.readUint32LE(E);return w.wipe(E),A};var v="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function m(M,E,A){if(void 0===E&&(E=v),void 0===A&&(A=u.defaultRandomSource),E.length<2)throw new Error("randomString charset is too short");if(E.length>256)throw new Error("randomString charset is too long");for(var P="",x=E.length,N=256-256%x;M>0;){for(var F=_(Math.ceil(256*M/N),A),L=0;L0;L++){var z=F[L];z{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var p=function(){function D(){this.isAvailable=!1,this.isInstantiated=!1;var w=typeof self<"u"?self.crypto||self.msCrypto:null;w&&w.getRandomValues&&(this._crypto=w,this.isAvailable=!0,this.isInstantiated=!0)}return D.prototype.randomBytes=function(w){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");for(var _=new Uint8Array(w),l=0;l<_.length;l+=65536)this._crypto.getRandomValues(_.subarray(l,l+Math.min(_.length-l,65536)));return _},D}();u.BrowserRandomSource=p},1382:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var p=g(69815),D=function(){function w(){this.isAvailable=!1,this.isInstantiated=!1;var _=g(41348);_&&_.randomBytes&&(this._crypto=_,this.isAvailable=!0,this.isInstantiated=!0)}return w.prototype.randomBytes=function(_){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");var l=this._crypto.randomBytes(_);if(l.length!==_)throw new Error("NodeRandomSource: got fewer bytes than requested");for(var v=new Uint8Array(_),m=0;m{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var p=g(77170),D=g(1382),w=function(){function _(){return this.isAvailable=!1,this.name="",this._source=new p.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new D.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}return _.prototype.randomBytes=function(l){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(l)},_}();u.SystemRandomSource=w},10893:(re,u,g)=>{"use strict";var D=g(54502),w=g(69815);u.k=32,u.cn=64;var _=function(){function b(){this.digestLength=u.k,this.blockSize=u.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return b.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},b.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},b.prototype.clean=function(){w.wipe(this._buffer),w.wipe(this._temp),this.reset()},b.prototype.update=function(M,E){if(void 0===E&&(E=M.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var A=0;if(this._bytesHashed+=E,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=M[A++],E--;this._bufferLength===this.blockSize&&(v(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(E>=this.blockSize&&(A=v(this._temp,this._state,M,A,E),E%=this.blockSize);E>0;)this._buffer[this._bufferLength++]=M[A++],E--;return this},b.prototype.finish=function(M){if(!this._finished){var E=this._bytesHashed,A=this._bufferLength,P=E/536870912|0,x=E<<3,N=E%64<56?64:128;this._buffer[A]=128;for(var F=A+1;F0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},b.prototype.restoreState=function(M){return this._state.set(M.state),this._bufferLength=M.bufferLength,M.buffer&&this._buffer.set(M.buffer),this._bytesHashed=M.bytesHashed,this._finished=!1,this},b.prototype.cleanSavedState=function(M){w.wipe(M.state),M.buffer&&w.wipe(M.buffer),M.bufferLength=0,M.bytesHashed=0},b}();u.mE=_;var l=new Int32Array([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 v(b,M,E,A,P){for(;P>=64;){for(var x=M[0],N=M[1],F=M[2],L=M[3],z=M[4],j=M[5],W=M[6],Y=M[7],G=0;G<16;G++){var Q=A+4*G;b[G]=D.readUint32BE(E,Q)}for(G=16;G<64;G++){var q=b[G-2],J=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,H=((q=b[G-15])>>>7|q<<25)^(q>>>18|q<<14)^q>>>3;b[G]=(J+b[G-7]|0)+(H+b[G-16]|0)}for(G=0;G<64;G++){J=(((z>>>6|z<<26)^(z>>>11|z<<21)^(z>>>25|z<<7))+(z&j^~z&W)|0)+(Y+(l[G]+b[G]|0)|0)|0,H=((x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10))+(x&N^x&F^N&F)|0;Y=W,W=j,j=z,z=L+J|0,L=F,F=N,N=x,x=J+H|0}M[0]+=x,M[1]+=N,M[2]+=F,M[3]+=L,M[4]+=z,M[5]+=j,M[6]+=W,M[7]+=Y,A+=64,P-=64}return A}u.vp=function m(b){var M=new _;M.update(b);var E=M.digest();return M.clean(),E}},86375:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var p=g(54502),D=g(69815);u.DIGEST_LENGTH=64,u.BLOCK_SIZE=128;var w=function(){function m(){this.digestLength=u.DIGEST_LENGTH,this.blockSize=u.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return m.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},m.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},m.prototype.clean=function(){D.wipe(this._buffer),D.wipe(this._tempHi),D.wipe(this._tempLo),this.reset()},m.prototype.update=function(b,M){if(void 0===M&&(M=b.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var E=0;if(this._bytesHashed+=M,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=b[E++],M--;this._bufferLength===this.blockSize&&(l(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(M>=this.blockSize&&(E=l(this._tempHi,this._tempLo,this._stateHi,this._stateLo,b,E,M),M%=this.blockSize);M>0;)this._buffer[this._bufferLength++]=b[E++],M--;return this},m.prototype.finish=function(b){if(!this._finished){var M=this._bytesHashed,E=this._bufferLength,A=M/536870912|0,P=M<<3,x=M%128<112?128:256;this._buffer[E]=128;for(var N=E+1;N0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},m.prototype.restoreState=function(b){return this._stateHi.set(b.stateHi),this._stateLo.set(b.stateLo),this._bufferLength=b.bufferLength,b.buffer&&this._buffer.set(b.buffer),this._bytesHashed=b.bytesHashed,this._finished=!1,this},m.prototype.cleanSavedState=function(b){D.wipe(b.stateHi),D.wipe(b.stateLo),b.buffer&&D.wipe(b.buffer),b.bufferLength=0,b.bytesHashed=0},m}();u.SHA512=w;var _=new Int32Array([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 l(m,b,M,E,A,P,x){for(var d,h,S,k,B,I,f,R,N=M[0],F=M[1],L=M[2],z=M[3],j=M[4],W=M[5],Y=M[6],G=M[7],Q=E[0],q=E[1],J=E[2],H=E[3],te=E[4],C=E[5],o=E[6],s=E[7];x>=128;){for(var se=0;se<16;se++){var ee=8*se+P;m[se]=p.readUint32BE(A,ee),b[se]=p.readUint32BE(A,ee+4)}for(se=0;se<80;se++){var pe,He,oe=N,de=F,Ce=L,ye=z,ve=j,ae=W,fe=Y,Se=Q,ce=q,be=J,Pe=H,Fe=te,lt=C,Ge=o;if(B=65535&(h=s),I=h>>>16,f=65535&(d=G),R=d>>>16,B+=65535&(h=(te>>>14|j<<18)^(te>>>18|j<<14)^(j>>>9|te<<23)),I+=h>>>16,f+=65535&(d=(j>>>14|te<<18)^(j>>>18|te<<14)^(te>>>9|j<<23)),R+=d>>>16,B+=65535&(h=te&C^~te&o),I+=h>>>16,f+=65535&(d=j&W^~j&Y),R+=d>>>16,d=_[2*se],B+=65535&(h=_[2*se+1]),I+=h>>>16,f+=65535&d,R+=d>>>16,d=m[se%16],I+=(h=b[se%16])>>>16,f+=65535&d,R+=d>>>16,f+=(I+=(B+=65535&h)>>>16)>>>16,B=65535&(h=k=65535&B|I<<16),I=h>>>16,f=65535&(d=S=65535&f|(R+=f>>>16)<<16),R=d>>>16,B+=65535&(h=(Q>>>28|N<<4)^(N>>>2|Q<<30)^(N>>>7|Q<<25)),I+=h>>>16,f+=65535&(d=(N>>>28|Q<<4)^(Q>>>2|N<<30)^(Q>>>7|N<<25)),R+=d>>>16,I+=(h=Q&q^Q&J^q&J)>>>16,f+=65535&(d=N&F^N&L^F&L),R+=d>>>16,pe=65535&(f+=(I+=(B+=65535&h)>>>16)>>>16)|(R+=f>>>16)<<16,He=65535&B|I<<16,B=65535&(h=Pe),I=h>>>16,f=65535&(d=ye),R=d>>>16,I+=(h=k)>>>16,f+=65535&(d=S),R+=d>>>16,F=oe,L=de,z=Ce,j=ye=65535&(f+=(I+=(B+=65535&h)>>>16)>>>16)|(R+=f>>>16)<<16,W=ve,Y=ae,G=fe,N=pe,q=Se,J=ce,H=be,te=Pe=65535&B|I<<16,C=Fe,o=lt,s=Ge,Q=He,se%16==15)for(ee=0;ee<16;ee++)d=m[ee],B=65535&(h=b[ee]),I=h>>>16,f=65535&d,R=d>>>16,d=m[(ee+9)%16],B+=65535&(h=b[(ee+9)%16]),I+=h>>>16,f+=65535&d,R+=d>>>16,S=m[(ee+1)%16],B+=65535&(h=((k=b[(ee+1)%16])>>>1|S<<31)^(k>>>8|S<<24)^(k>>>7|S<<25)),I+=h>>>16,f+=65535&(d=(S>>>1|k<<31)^(S>>>8|k<<24)^S>>>7),R+=d>>>16,S=m[(ee+14)%16],I+=(h=((k=b[(ee+14)%16])>>>19|S<<13)^(S>>>29|k<<3)^(k>>>6|S<<26))>>>16,f+=65535&(d=(S>>>19|k<<13)^(k>>>29|S<<3)^S>>>6),R+=d>>>16,R+=(f+=(I+=(B+=65535&h)>>>16)>>>16)>>>16,m[ee]=65535&f|R<<16,b[ee]=65535&B|I<<16}B=65535&(h=Q),I=h>>>16,f=65535&(d=N),R=d>>>16,d=M[0],I+=(h=E[0])>>>16,f+=65535&d,R+=d>>>16,R+=(f+=(I+=(B+=65535&h)>>>16)>>>16)>>>16,M[0]=N=65535&f|R<<16,E[0]=Q=65535&B|I<<16,B=65535&(h=q),I=h>>>16,f=65535&(d=F),R=d>>>16,d=M[1],I+=(h=E[1])>>>16,f+=65535&d,R+=d>>>16,R+=(f+=(I+=(B+=65535&h)>>>16)>>>16)>>>16,M[1]=F=65535&f|R<<16,E[1]=q=65535&B|I<<16,B=65535&(h=J),I=h>>>16,f=65535&(d=L),R=d>>>16,d=M[2],I+=(h=E[2])>>>16,f+=65535&d,R+=d>>>16,R+=(f+=(I+=(B+=65535&h)>>>16)>>>16)>>>16,M[2]=L=65535&f|R<<16,E[2]=J=65535&B|I<<16,B=65535&(h=H),I=h>>>16,f=65535&(d=z),R=d>>>16,d=M[3],I+=(h=E[3])>>>16,f+=65535&d,R+=d>>>16,R+=(f+=(I+=(B+=65535&h)>>>16)>>>16)>>>16,M[3]=z=65535&f|R<<16,E[3]=H=65535&B|I<<16,B=65535&(h=te),I=h>>>16,f=65535&(d=j),R=d>>>16,d=M[4],I+=(h=E[4])>>>16,f+=65535&d,R+=d>>>16,R+=(f+=(I+=(B+=65535&h)>>>16)>>>16)>>>16,M[4]=j=65535&f|R<<16,E[4]=te=65535&B|I<<16,B=65535&(h=C),I=h>>>16,f=65535&(d=W),R=d>>>16,d=M[5],I+=(h=E[5])>>>16,f+=65535&d,R+=d>>>16,R+=(f+=(I+=(B+=65535&h)>>>16)>>>16)>>>16,M[5]=W=65535&f|R<<16,E[5]=C=65535&B|I<<16,B=65535&(h=o),I=h>>>16,f=65535&(d=Y),R=d>>>16,d=M[6],I+=(h=E[6])>>>16,f+=65535&d,R+=d>>>16,R+=(f+=(I+=(B+=65535&h)>>>16)>>>16)>>>16,M[6]=Y=65535&f|R<<16,E[6]=o=65535&B|I<<16,B=65535&(h=s),I=h>>>16,f=65535&(d=G),R=d>>>16,d=M[7],I+=(h=E[7])>>>16,f+=65535&d,R+=d>>>16,R+=(f+=(I+=(B+=65535&h)>>>16)>>>16)>>>16,M[7]=G=65535&f|R<<16,E[7]=s=65535&B|I<<16,P+=128,x-=128}return P}u.hash=function v(m){var b=new w;b.update(m);var M=b.digest();return b.clean(),M}},69815:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.wipe=function g(p){for(var D=0;D{"use strict";u.gi=u.Au=u.KS=u.kz=void 0;const D=g(52579),w=g(69815);function _(G){const Q=new Float64Array(16);if(G)for(let q=0;q=0;--B){const I=q[B>>>3]>>>(7&B)&1;b(H,te,I),b(C,o,I),A(s,H,C),P(H,H,C),A(C,te,o),P(te,te,o),N(o,s),N(d,H),x(H,C,H),x(C,te,s),A(s,H,C),P(H,H,C),N(te,H),P(C,o,d),x(H,C,v),A(H,H,o),x(C,C,H),x(H,o,d),x(o,te,J),N(te,s),b(H,te,I),b(C,o,I)}for(let B=0;B<16;B++)J[B+16]=H[B],J[B+32]=C[B],J[B+48]=te[B],J[B+64]=o[B];const h=J.subarray(32),S=J.subarray(16);(function F(G,Q){const q=_();for(let J=0;J<16;J++)q[J]=Q[J];for(let J=253;J>=0;J--)N(q,q),2!==J&&4!==J&&x(q,q,Q);for(let J=0;J<16;J++)G[J]=q[J]})(h,h),x(S,S,h);const k=new Uint8Array(32);return function M(G,Q){const q=_(),J=_();for(let H=0;H<16;H++)J[H]=Q[H];m(J),m(J),m(J);for(let H=0;H<2;H++){q[0]=J[0]-65517;for(let C=1;C<15;C++)q[C]=J[C]-65535-(q[C-1]>>16&1),q[C-1]&=65535;q[15]=J[15]-32767-(q[14]>>16&1);const te=q[15]>>16&1;q[14]&=65535,b(J,q,1-te)}for(let H=0;H<16;H++)G[2*H]=255&J[H],G[2*H+1]=J[H]>>8}(k,S),k}function z(G){return L(G,l)}function j(G){if(G.length!==u.KS)throw new Error(`x25519: seed must be ${u.KS} bytes`);const Q=new Uint8Array(G);return{publicKey:z(Q),secretKey:Q}}u.Au=function W(G){const Q=(0,D.randomBytes)(32,G),q=j(Q);return(0,w.wipe)(Q),q},u.gi=function Y(G,Q,q=!1){if(G.length!==u.kz)throw new Error("X25519: incorrect secret key length");if(Q.length!==u.kz)throw new Error("X25519: incorrect public key length");const J=L(G,Q);if(q){let H=0;for(let te=0;te{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.randomStringForEntropy=u.randomString=u.randomUint32=u.randomBytes=u.defaultRandomSource=void 0;const p=g(65615),D=g(54502),w=g(69815);function _(M,E=u.defaultRandomSource){return E.randomBytes(M)}u.defaultRandomSource=new p.SystemRandomSource,u.randomBytes=_,u.randomUint32=function l(M=u.defaultRandomSource){const E=_(4,M),A=(0,D.readUint32LE)(E);return(0,w.wipe)(E),A};const v="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function m(M,E=v,A=u.defaultRandomSource){if(E.length<2)throw new Error("randomString charset is too short");if(E.length>256)throw new Error("randomString charset is too long");let P="";const x=E.length,N=256-256%x;for(;M>0;){const F=_(Math.ceil(256*M/N),A);for(let L=0;L0;L++){const z=F[L];z{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.BrowserRandomSource=void 0;u.BrowserRandomSource=class p{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const w=typeof self<"u"?self.crypto||self.msCrypto:null;w&&void 0!==w.getRandomValues&&(this._crypto=w,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(w){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const _=new Uint8Array(w);for(let l=0;l<_.length;l+=65536)this._crypto.getRandomValues(_.subarray(l,l+Math.min(_.length-l,65536)));return _}}},5447:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.NodeRandomSource=void 0;const p=g(69815);u.NodeRandomSource=class D{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const _=g(41348);_&&_.randomBytes&&(this._crypto=_,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(_){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let l=this._crypto.randomBytes(_);if(l.length!==_)throw new Error("NodeRandomSource: got fewer bytes than requested");const v=new Uint8Array(_);for(let m=0;m{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.SystemRandomSource=void 0;const p=g(72773),D=g(5447);u.SystemRandomSource=class w{constructor(){return this.isAvailable=!1,this.name="",this._source=new p.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new D.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(l){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(l)}}},31688:(re,u)=>{"use strict";function g(){return(null==global?void 0:global.crypto)||(null==global?void 0:global.msCrypto)||{}}function p(){const w=g();return w.subtle||w.webkitSubtle}Object.defineProperty(u,"__esModule",{value:!0}),u.isBrowserCryptoAvailable=u.getSubtleCrypto=u.getBrowerCrypto=void 0,u.getBrowerCrypto=g,u.getSubtleCrypto=p,u.isBrowserCryptoAvailable=function D(){return!!g()&&!!p()}},32220:(re,u)=>{"use strict";function g(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function p(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Object.defineProperty(u,"__esModule",{value:!0}),u.isBrowser=u.isNode=u.isReactNative=void 0,u.isReactNative=g,u.isNode=p,u.isBrowser=function D(){return!g()&&!p()}},71948:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(34308);p.__exportStar(g(31688),u),p.__exportStar(g(32220),u)},42092:(re,u,g)=>{"use strict";g.d(u,{q:()=>p});class p{}},1252:(re,u,g)=>{"use strict";g.r(u),g.d(u,{IEvents:()=>p.q});var p=g(42092)},63510:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.HEARTBEAT_EVENTS=u.HEARTBEAT_INTERVAL=void 0;const p=g(43961);u.HEARTBEAT_INTERVAL=p.FIVE_SECONDS,u.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},46844:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),g(39653).__exportStar(g(63510),u)},72271:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.HeartBeat=void 0;const p=g(39653),D=g(59069),w=g(43961),_=g(76925),l=g(46844);class v extends _.IHeartBeat{constructor(b){super(b),this.events=new D.EventEmitter,this.interval=l.HEARTBEAT_INTERVAL,this.interval=b?.interval||l.HEARTBEAT_INTERVAL}static init(b){return p.__awaiter(this,void 0,void 0,function*(){const M=new v(b);return yield M.init(),M})}init(){return p.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(b,M){this.events.on(b,M)}once(b,M){this.events.once(b,M)}off(b,M){this.events.off(b,M)}removeListener(b,M){this.events.removeListener(b,M)}initialize(){return p.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),w.toMiliseconds(this.interval))})}pulse(){this.events.emit(l.HEARTBEAT_EVENTS.pulse)}}u.HeartBeat=v},72062:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(39653);p.__exportStar(g(72271),u),p.__exportStar(g(76925),u),p.__exportStar(g(46844),u)},88891:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.IHeartBeat=void 0;const p=g(1252);class D extends p.IEvents{constructor(_){super()}}u.IHeartBeat=D},76925:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),g(39653).__exportStar(g(88891),u)},25504:re=>{"use strict";re.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},46499:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.PINO_CUSTOM_CONTEXT_KEY=u.PINO_LOGGER_DEFAULTS=void 0,u.PINO_LOGGER_DEFAULTS={level:"info"},u.PINO_CUSTOM_CONTEXT_KEY="custom_context"},83767:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.pino=void 0;const p=g(57121),D=p.__importDefault(g(28544));Object.defineProperty(u,"pino",{enumerable:!0,get:function(){return D.default}}),p.__exportStar(g(46499),u),p.__exportStar(g(96873),u)},96873:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.generateChildLogger=u.formatChildLoggerContext=u.getLoggerContext=u.setBrowserLoggerContext=u.getBrowserLoggerContext=u.getDefaultLoggerOptions=void 0;const p=g(46499);function w(b,M=p.PINO_CUSTOM_CONTEXT_KEY){return b[M]||""}function _(b,M,E=p.PINO_CUSTOM_CONTEXT_KEY){return b[E]=M,b}function l(b,M=p.PINO_CUSTOM_CONTEXT_KEY){let E="";return E=typeof b.bindings>"u"?w(b,M):b.bindings().context||"",E}function v(b,M,E=p.PINO_CUSTOM_CONTEXT_KEY){const A=l(b,E);return A.trim()?`${A}/${M}`:M}u.getDefaultLoggerOptions=function D(b){return Object.assign(Object.assign({},b),{level:b?.level||p.PINO_LOGGER_DEFAULTS.level})},u.getBrowserLoggerContext=w,u.setBrowserLoggerContext=_,u.getLoggerContext=l,u.formatChildLoggerContext=v,u.generateChildLogger=function m(b,M,E=p.PINO_CUSTOM_CONTEXT_KEY){const A=v(b,M,E);return _(b.child({context:A}),A,E)}},62079:()=>{},6375:()=>{},86205:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(30004);p.__exportStar(g(20725),u),p.__exportStar(g(48562),u)},20725:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ONE_THOUSAND=u.ONE_HUNDRED=void 0,u.ONE_HUNDRED=100,u.ONE_THOUSAND=1e3},48562:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ONE_YEAR=u.FOUR_WEEKS=u.THREE_WEEKS=u.TWO_WEEKS=u.ONE_WEEK=u.THIRTY_DAYS=u.SEVEN_DAYS=u.FIVE_DAYS=u.THREE_DAYS=u.ONE_DAY=u.TWENTY_FOUR_HOURS=u.TWELVE_HOURS=u.SIX_HOURS=u.THREE_HOURS=u.ONE_HOUR=u.SIXTY_MINUTES=u.THIRTY_MINUTES=u.TEN_MINUTES=u.FIVE_MINUTES=u.ONE_MINUTE=u.SIXTY_SECONDS=u.THIRTY_SECONDS=u.TEN_SECONDS=u.FIVE_SECONDS=u.ONE_SECOND=void 0,u.ONE_SECOND=1,u.FIVE_SECONDS=5,u.TEN_SECONDS=10,u.THIRTY_SECONDS=30,u.SIXTY_SECONDS=60,u.ONE_MINUTE=u.SIXTY_SECONDS,u.FIVE_MINUTES=5*u.ONE_MINUTE,u.TEN_MINUTES=10*u.ONE_MINUTE,u.THIRTY_MINUTES=30*u.ONE_MINUTE,u.SIXTY_MINUTES=60*u.ONE_MINUTE,u.ONE_HOUR=u.SIXTY_MINUTES,u.THREE_HOURS=3*u.ONE_HOUR,u.SIX_HOURS=6*u.ONE_HOUR,u.TWELVE_HOURS=12*u.ONE_HOUR,u.TWENTY_FOUR_HOURS=24*u.ONE_HOUR,u.ONE_DAY=u.TWENTY_FOUR_HOURS,u.THREE_DAYS=3*u.ONE_DAY,u.FIVE_DAYS=5*u.ONE_DAY,u.SEVEN_DAYS=7*u.ONE_DAY,u.THIRTY_DAYS=30*u.ONE_DAY,u.ONE_WEEK=u.SEVEN_DAYS,u.TWO_WEEKS=2*u.ONE_WEEK,u.THREE_WEEKS=3*u.ONE_WEEK,u.FOUR_WEEKS=4*u.ONE_WEEK,u.ONE_YEAR=365*u.ONE_DAY},43961:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(30004);p.__exportStar(g(64497),u),p.__exportStar(g(63509),u),p.__exportStar(g(43622),u),p.__exportStar(g(86205),u)},43622:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),g(30004).__exportStar(g(99761),u)},99761:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.IWatch=void 0;u.IWatch=class g{}},88784:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.fromMiliseconds=u.toMiliseconds=void 0;const p=g(86205);u.toMiliseconds=function D(_){return _*p.ONE_THOUSAND},u.fromMiliseconds=function w(_){return Math.floor(_/p.ONE_THOUSAND)}},77657:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.delay=void 0,u.delay=function g(p){return new Promise(D=>{setTimeout(()=>{D(!0)},p)})}},64497:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(30004);p.__exportStar(g(77657),u),p.__exportStar(g(88784),u)},63509:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Watch=void 0;class g{constructor(){this.timestamps=new Map}start(D){if(this.timestamps.has(D))throw new Error(`Watch already started for label: ${D}`);this.timestamps.set(D,{started:Date.now()})}stop(D){const w=this.get(D);if(typeof w.elapsed<"u")throw new Error(`Watch already stopped for label: ${D}`);const _=Date.now()-w.started;this.timestamps.set(D,{started:w.started,elapsed:_})}get(D){const w=this.timestamps.get(D);if(typeof w>"u")throw new Error(`No timestamp found for label: ${D}`);return w}elapsed(D){const w=this.get(D);return w.elapsed||Date.now()-w.started}}u.Watch=g,u.default=g},10976:(re,u,g)=>{"use strict";u.O6=u.hf=void 0;const D=g(85639),w=g(54502),_=g(69815);function l(E,A=u.hf){return A.randomBytes(E)}u.hf=new D.SystemRandomSource,u.O6=l;const m="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function b(E,A=m,P=u.hf){if(A.length<2)throw new Error("randomString charset is too short");if(A.length>256)throw new Error("randomString charset is too long");let x="";const N=A.length,F=256-256%N;for(;E>0;){const L=l(Math.ceil(256*E/F),P);for(let z=0;z0;z++){const j=L[z];j{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.BrowserRandomSource=void 0;u.BrowserRandomSource=class p{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const w=typeof self<"u"?self.crypto||self.msCrypto:null;w&&void 0!==w.getRandomValues&&(this._crypto=w,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(w){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const _=new Uint8Array(w);for(let l=0;l<_.length;l+=65536)this._crypto.getRandomValues(_.subarray(l,l+Math.min(_.length-l,65536)));return _}}},41981:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.NodeRandomSource=void 0;const p=g(69815);u.NodeRandomSource=class D{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const _=g(41348);_&&_.randomBytes&&(this._crypto=_,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(_){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let l=this._crypto.randomBytes(_);if(l.length!==_)throw new Error("NodeRandomSource: got fewer bytes than requested");const v=new Uint8Array(_);for(let m=0;m{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.SystemRandomSource=void 0;const p=g(38459),D=g(41981);u.SystemRandomSource=class w{constructor(){return this.isAvailable=!1,this.name="",this._source=new p.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new D.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(l){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(l)}}},6499:(re,u)=>{"use strict";function g(P){let x;return typeof window<"u"&&typeof window[P]<"u"&&(x=window[P]),x}function p(P){const x=g(P);if(!x)throw new Error(`${P} is not defined in Window`);return x}Object.defineProperty(u,"__esModule",{value:!0}),u.getLocalStorage=u.getLocalStorageOrThrow=u.getCrypto=u.getCryptoOrThrow=u.getLocation=u.getLocationOrThrow=u.getNavigator=u.getNavigatorOrThrow=u.getDocument=u.getDocumentOrThrow=u.getFromWindowOrThrow=u.getFromWindow=void 0,u.getFromWindow=g,u.getFromWindowOrThrow=p,u.getDocumentOrThrow=function D(){return p("document")},u.getDocument=function w(){return g("document")},u.getNavigatorOrThrow=function _(){return p("navigator")},u.getNavigator=function l(){return g("navigator")},u.getLocationOrThrow=function v(){return p("location")},u.getLocation=function m(){return g("location")},u.getCryptoOrThrow=function b(){return p("crypto")},u.getCrypto=function M(){return g("crypto")},u.getLocalStorageOrThrow=function E(){return p("localStorage")},u.getLocalStorage=function A(){return g("localStorage")}},30543:(re,u,g)=>{"use strict";u.D=void 0;const D=g(6499);u.D=function w(){let _,l;try{_=D.getDocumentOrThrow(),l=D.getLocationOrThrow()}catch{return null}function m(...F){const L=_.getElementsByTagName("meta");for(let z=0;zj.getAttribute(Y)).filter(Y=>!!Y&&F.includes(Y));if(W.length&&W){const Y=j.getAttribute("content");if(Y)return Y}}return""}const E=function b(){let F=m("name","og:site_name","og:title","twitter:title");return F||(F=_.title),F}();return{description:function M(){return m("description","og:description","twitter:description","keywords")}(),url:l.origin,icons:function v(){const F=_.getElementsByTagName("link"),L=[];for(let z=0;z-1){const Y=j.getAttribute("href");if(Y)if(-1===Y.toLowerCase().indexOf("https:")&&-1===Y.toLowerCase().indexOf("http:")&&0!==Y.indexOf("//")){let G=l.protocol+"//"+l.host;if(0===Y.indexOf("/"))G+=Y;else{const Q=l.pathname.split("/");Q.pop();G+=Q.join("/")+"/"+Y}L.push(G)}else if(0===Y.indexOf("//")){const G=l.protocol+Y;L.push(G)}else L.push(Y)}}return L}(),name:E}}},88599:re=>{function u(g){this._db=g,this._operations=[],this._written=!1}u.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},u.prototype.put=function(g,p){this._checkWritten();var D=this._db._checkKeyValue(g,"key",this._db._isBuffer);if(D||(D=this._db._checkKeyValue(p,"value",this._db._isBuffer)))throw D;return this._db._isBuffer(g)||(g=String(g)),this._db._isBuffer(p)||(p=String(p)),"function"==typeof this._put?this._put(g,p):this._operations.push({type:"put",key:g,value:p}),this},u.prototype.del=function(g){this._checkWritten();var p=this._db._checkKeyValue(g,"key",this._db._isBuffer);if(p)throw p;return this._db._isBuffer(g)||(g=String(g)),"function"==typeof this._del?this._del(g):this._operations.push({type:"del",key:g}),this},u.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},u.prototype.write=function(g,p){if(this._checkWritten(),"function"==typeof g&&(p=g),"function"!=typeof p)throw new Error("write() requires a callback argument");return"object"!=typeof g&&(g={}),this._written=!0,"function"==typeof this._write?this._write(p):"function"==typeof this._db._batch?this._db._batch(this._operations,g,p):void process.nextTick(p)},re.exports=u},14968:re=>{function u(g){this.db=g,this._ended=!1,this._nexting=!1}u.prototype.next=function(g){var p=this;if("function"!=typeof g)throw new Error("next() requires a callback argument");return p._ended?g(new Error("cannot call next() after end()")):p._nexting?g(new Error("cannot call next() before previous next() has completed")):(p._nexting=!0,"function"==typeof p._next?p._next(function(){p._nexting=!1,g.apply(null,arguments)}):void process.nextTick(function(){p._nexting=!1,g()}))},u.prototype.end=function(g){if("function"!=typeof g)throw new Error("end() requires a callback argument");return this._ended?g(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(g):void process.nextTick(g))},re.exports=u},30826:(re,u,g)=>{var D=g(78677),w=g(14968),_=g(88599);function l(v){if(!arguments.length||void 0===v)throw new Error("constructor requires at least a location argument");if("string"!=typeof v)throw new Error("constructor requires a location string argument");this.location=v}l.prototype.open=function(v,m){if("function"==typeof v&&(m=v),"function"!=typeof m)throw new Error("open() requires a callback argument");if("object"!=typeof v&&(v={}),"function"==typeof this._open)return this._open(v,m);process.nextTick(m)},l.prototype.close=function(v){if("function"!=typeof v)throw new Error("close() requires a callback argument");if("function"==typeof this._close)return this._close(v);process.nextTick(v)},l.prototype.get=function(v,m,b){var M;if("function"==typeof m&&(b=m),"function"!=typeof b)throw new Error("get() requires a callback argument");return(M=this._checkKeyValue(v,"key",this._isBuffer))?b(M):(this._isBuffer(v)||(v=String(v)),"object"!=typeof m&&(m={}),"function"==typeof this._get?this._get(v,m,b):void process.nextTick(function(){b(new Error("NotFound"))}))},l.prototype.put=function(v,m,b,M){var E;if("function"==typeof b&&(M=b),"function"!=typeof M)throw new Error("put() requires a callback argument");return(E=this._checkKeyValue(v,"key",this._isBuffer))||(E=this._checkKeyValue(m,"value",this._isBuffer))?M(E):(this._isBuffer(v)||(v=String(v)),!this._isBuffer(m)&&!process.browser&&(m=String(m)),"object"!=typeof b&&(b={}),"function"==typeof this._put?this._put(v,m,b,M):void process.nextTick(M))},l.prototype.del=function(v,m,b){var M;if("function"==typeof m&&(b=m),"function"!=typeof b)throw new Error("del() requires a callback argument");return(M=this._checkKeyValue(v,"key",this._isBuffer))?b(M):(this._isBuffer(v)||(v=String(v)),"object"!=typeof m&&(m={}),"function"==typeof this._del?this._del(v,m,b):void process.nextTick(b))},l.prototype.batch=function(v,m,b){if(!arguments.length)return this._chainedBatch();if("function"==typeof m&&(b=m),"function"!=typeof b)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(v))return b(new Error("batch(array) requires an array argument"));"object"!=typeof m&&(m={});for(var A,P,M=0,E=v.length;M{"use strict";function g(J,H){return{validate:J,compare:H}}Object.defineProperty(u,"__esModule",{value:!0}),u.formatNames=u.fastFormats=u.fullFormats=void 0,u.fullFormats={date:g(_,l),time:g(m,b),"date-time":g(function E(J){const H=J.split(M);return 2===H.length&&_(H[0])&&m(H[1],!0)},A),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function N(J){return P.test(J)&&x.test(J)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~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d|[1-9]?\d)){3}))|:)))$/i,regex:function q(J){if(Q.test(J))return!1;try{return new RegExp(J),!0}catch{return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function L(J){return F.lastIndex=0,F.test(J)},int32:{type:"number",validate:function W(J){return Number.isInteger(J)&&J<=j&&J>=z}},int64:{type:"number",validate:function Y(J){return Number.isInteger(J)}},float:{type:"number",validate:G},double:{type:"number",validate:G},password:!0,binary:!0},u.fastFormats={...u.fullFormats,date:g(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:g(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),"date-time":g(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,A),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},u.formatNames=Object.keys(u.fullFormats);const D=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,w=[0,31,28,31,30,31,30,31,31,30,31,30,31];function _(J){const H=D.exec(J);if(!H)return!1;const te=+H[1],C=+H[2],o=+H[3];return C>=1&&C<=12&&o>=1&&o<=(2===C&&function p(J){return J%4==0&&(J%100!=0||J%400==0)}(te)?29:w[C])}function l(J,H){if(J&&H)return J>H?1:J(H=C[1]+C[2]+C[3]+(C[4]||""))?1:J{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(35180),D=g(65413),w=g(56382),_=new w.Name("fullFormats"),l=new w.Name("fastFormats"),v=(b,M={keywords:!0})=>{if(Array.isArray(M))return m(b,M,p.fullFormats,_),b;const[E,A]="fast"===M.mode?[p.fastFormats,l]:[p.fullFormats,_];return m(b,M.formats||p.formatNames,E,A),M.keywords&&D.default(b),b};function m(b,M,E,A){var P,x;null!==(P=(x=b.opts.code).formats)&&void 0!==P||(x.formats=w._`require("ajv-formats/dist/formats").${A}`);for(const N of M)b.addFormat(N,E[N])}v.get=(b,M="full")=>{const A=("fast"===M?p.fastFormats:p.fullFormats)[b];if(!A)throw new Error(`Unknown format "${b}"`);return A},re.exports=u=v,Object.defineProperty(u,"__esModule",{value:!0}),u.default=v},65413:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.formatLimitDefinition=void 0;const p=g(74411),D=g(56382),w=D.operators,_={formatMaximum:{okStr:"<=",ok:w.LTE,fail:w.GT},formatMinimum:{okStr:">=",ok:w.GTE,fail:w.LT},formatExclusiveMaximum:{okStr:"<",ok:w.LT,fail:w.GTE},formatExclusiveMinimum:{okStr:">",ok:w.GT,fail:w.LTE}},l={message:({keyword:m,schemaCode:b})=>D.str`should be ${_[m].okStr} ${b}`,params:({keyword:m,schemaCode:b})=>D._`{comparison: ${_[m].okStr}, limit: ${b}}`};u.formatLimitDefinition={keyword:Object.keys(_),type:"string",schemaType:"string",$data:!0,error:l,code(m){const{gen:b,data:M,schemaCode:E,keyword:A,it:P}=m,{opts:x,self:N}=P;if(!x.validateFormats)return;const F=new p.KeywordCxt(P,N.RULES.all.format.definition,"format");function j(W){return D._`${W}.compare(${M}, ${E}) ${_[A].fail} 0`}F.$data?function L(){const W=b.scopeValue("formats",{ref:N.formats,code:x.code.formats}),Y=b.const("fmt",D._`${W}[${F.schemaCode}]`);m.fail$data(D.or(D._`typeof ${Y} != "object"`,D._`${Y} instanceof RegExp`,D._`typeof ${Y}.compare != "function"`,j(Y)))}():function z(){const W=F.schema,Y=N.formats[W];if(!Y||!0===Y)return;if("object"!=typeof Y||Y instanceof RegExp||"function"!=typeof Y.compare)throw new Error(`"${A}": format "${W}" does not define "compare" function`);const G=b.scopeValue("formats",{key:W,ref:Y,code:x.code.formats?D._`${x.code.formats}${D.getProperty(W)}`:void 0});m.fail$data(j(G))}()},dependencies:["format"]};u.default=m=>(m.addKeyword(u.formatLimitDefinition),m)},74411:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MissingRefError=u.ValidationError=u.CodeGen=u.Name=u.nil=u.stringify=u.str=u._=u.KeywordCxt=void 0;const p=g(25910),D=g(77032),w=g(81849),_=g(98),l=["/properties"],v="http://json-schema.org/draft-07/schema";class m extends p.default{_addVocabularies(){super._addVocabularies(),D.default.forEach(x=>this.addVocabulary(x)),this.opts.discriminator&&this.addKeyword(w.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const x=this.opts.$data?this.$dataMetaSchema(_,l):_;this.addMetaSchema(x,v,!1),this.refs["http://json-schema.org/schema"]=v}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(v)?v:void 0)}}re.exports=u=m,Object.defineProperty(u,"__esModule",{value:!0}),u.default=m;var b=g(66764);Object.defineProperty(u,"KeywordCxt",{enumerable:!0,get:function(){return b.KeywordCxt}});var M=g(56382);Object.defineProperty(u,"_",{enumerable:!0,get:function(){return M._}}),Object.defineProperty(u,"str",{enumerable:!0,get:function(){return M.str}}),Object.defineProperty(u,"stringify",{enumerable:!0,get:function(){return M.stringify}}),Object.defineProperty(u,"nil",{enumerable:!0,get:function(){return M.nil}}),Object.defineProperty(u,"Name",{enumerable:!0,get:function(){return M.Name}}),Object.defineProperty(u,"CodeGen",{enumerable:!0,get:function(){return M.CodeGen}});var E=g(20496);Object.defineProperty(u,"ValidationError",{enumerable:!0,get:function(){return E.default}});var A=g(80140);Object.defineProperty(u,"MissingRefError",{enumerable:!0,get:function(){return A.default}})},26295:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.regexpCode=u.getEsmExportName=u.getProperty=u.safeStringify=u.stringify=u.strConcat=u.addCodeArg=u.str=u._=u.nil=u._Code=u.Name=u.IDENTIFIER=u._CodeOrName=void 0;class g{}u._CodeOrName=g,u.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class p extends g{constructor(z){if(super(),!u.IDENTIFIER.test(z))throw new Error("CodeGen: name must be a valid identifier");this.str=z}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}u.Name=p;class D extends g{constructor(z){super(),this._items="string"==typeof z?[z]:z}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const z=this._items[0];return""===z||'""'===z}get str(){var z;return null!==(z=this._str)&&void 0!==z?z:this._str=this._items.reduce((j,W)=>`${j}${W}`,"")}get names(){var z;return null!==(z=this._names)&&void 0!==z?z:this._names=this._items.reduce((j,W)=>(W instanceof p&&(j[W.str]=(j[W.str]||0)+1),j),{})}}function w(L,...z){const j=[L[0]];let W=0;for(;W{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.or=u.and=u.not=u.CodeGen=u.operators=u.varKinds=u.ValueScopeName=u.ValueScope=u.Scope=u.Name=u.regexpCode=u.stringify=u.getProperty=u.nil=u.strConcat=u.str=u._=void 0;const p=g(26295),D=g(1917);var w=g(26295);Object.defineProperty(u,"_",{enumerable:!0,get:function(){return w._}}),Object.defineProperty(u,"str",{enumerable:!0,get:function(){return w.str}}),Object.defineProperty(u,"strConcat",{enumerable:!0,get:function(){return w.strConcat}}),Object.defineProperty(u,"nil",{enumerable:!0,get:function(){return w.nil}}),Object.defineProperty(u,"getProperty",{enumerable:!0,get:function(){return w.getProperty}}),Object.defineProperty(u,"stringify",{enumerable:!0,get:function(){return w.stringify}}),Object.defineProperty(u,"regexpCode",{enumerable:!0,get:function(){return w.regexpCode}}),Object.defineProperty(u,"Name",{enumerable:!0,get:function(){return w.Name}});var _=g(1917);Object.defineProperty(u,"Scope",{enumerable:!0,get:function(){return _.Scope}}),Object.defineProperty(u,"ValueScope",{enumerable:!0,get:function(){return _.ValueScope}}),Object.defineProperty(u,"ValueScopeName",{enumerable:!0,get:function(){return _.ValueScopeName}}),Object.defineProperty(u,"varKinds",{enumerable:!0,get:function(){return _.varKinds}}),u.operators={GT:new p._Code(">"),GTE:new p._Code(">="),LT:new p._Code("<"),LTE:new p._Code("<="),EQ:new p._Code("==="),NEQ:new p._Code("!=="),NOT:new p._Code("!"),OR:new p._Code("||"),AND:new p._Code("&&"),ADD:new p._Code("+")};class l{optimizeNodes(){return this}optimizeNames(oe,de){return this}}class v extends l{constructor(oe,de,Ce){super(),this.varKind=oe,this.name=de,this.rhs=Ce}render({es5:oe,_n:de}){const Ce=oe?D.varKinds.var:this.varKind,ye=void 0===this.rhs?"":` = ${this.rhs}`;return`${Ce} ${this.name}${ye};`+de}optimizeNames(oe,de){if(oe[this.name.str])return this.rhs&&(this.rhs=d(this.rhs,oe,de)),this}get names(){return this.rhs instanceof p._CodeOrName?this.rhs.names:{}}}class m extends l{constructor(oe,de,Ce){super(),this.lhs=oe,this.rhs=de,this.sideEffects=Ce}render({_n:oe}){return`${this.lhs} = ${this.rhs};`+oe}optimizeNames(oe,de){if(!(this.lhs instanceof p.Name)||oe[this.lhs.str]||this.sideEffects)return this.rhs=d(this.rhs,oe,de),this}get names(){return s(this.lhs instanceof p.Name?{}:{...this.lhs.names},this.rhs)}}class b extends m{constructor(oe,de,Ce,ye){super(oe,Ce,ye),this.op=de}render({_n:oe}){return`${this.lhs} ${this.op}= ${this.rhs};`+oe}}class M extends l{constructor(oe){super(),this.label=oe,this.names={}}render({_n:oe}){return`${this.label}:`+oe}}class E extends l{constructor(oe){super(),this.label=oe,this.names={}}render({_n:oe}){return`break${this.label?` ${this.label}`:""};`+oe}}class A extends l{constructor(oe){super(),this.error=oe}render({_n:oe}){return`throw ${this.error};`+oe}get names(){return this.error.names}}class P extends l{constructor(oe){super(),this.code=oe}render({_n:oe}){return`${this.code};`+oe}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(oe,de){return this.code=d(this.code,oe,de),this}get names(){return this.code instanceof p._CodeOrName?this.code.names:{}}}class x extends l{constructor(oe=[]){super(),this.nodes=oe}render(oe){return this.nodes.reduce((de,Ce)=>de+Ce.render(oe),"")}optimizeNodes(){const{nodes:oe}=this;let de=oe.length;for(;de--;){const Ce=oe[de].optimizeNodes();Array.isArray(Ce)?oe.splice(de,1,...Ce):Ce?oe[de]=Ce:oe.splice(de,1)}return oe.length>0?this:void 0}optimizeNames(oe,de){const{nodes:Ce}=this;let ye=Ce.length;for(;ye--;){const ve=Ce[ye];ve.optimizeNames(oe,de)||(h(oe,ve.names),Ce.splice(ye,1))}return Ce.length>0?this:void 0}get names(){return this.nodes.reduce((oe,de)=>o(oe,de.names),{})}}class N extends x{render(oe){return"{"+oe._n+super.render(oe)+"}"+oe._n}}class F extends x{}class L extends N{}L.kind="else";class z extends N{constructor(oe,de){super(de),this.condition=oe}render(oe){let de=`if(${this.condition})`+super.render(oe);return this.else&&(de+="else "+this.else.render(oe)),de}optimizeNodes(){super.optimizeNodes();const oe=this.condition;if(!0===oe)return this.nodes;let de=this.else;if(de){const Ce=de.optimizeNodes();de=this.else=Array.isArray(Ce)?new L(Ce):Ce}return de?!1===oe?de instanceof z?de:de.nodes:this.nodes.length?this:new z(S(oe),de instanceof z?[de]:de.nodes):!1!==oe&&this.nodes.length?this:void 0}optimizeNames(oe,de){var Ce;if(this.else=null===(Ce=this.else)||void 0===Ce?void 0:Ce.optimizeNames(oe,de),super.optimizeNames(oe,de)||this.else)return this.condition=d(this.condition,oe,de),this}get names(){const oe=super.names;return s(oe,this.condition),this.else&&o(oe,this.else.names),oe}}z.kind="if";class j extends N{}j.kind="for";class W extends j{constructor(oe){super(),this.iteration=oe}render(oe){return`for(${this.iteration})`+super.render(oe)}optimizeNames(oe,de){if(super.optimizeNames(oe,de))return this.iteration=d(this.iteration,oe,de),this}get names(){return o(super.names,this.iteration.names)}}class Y extends j{constructor(oe,de,Ce,ye){super(),this.varKind=oe,this.name=de,this.from=Ce,this.to=ye}render(oe){const de=oe.es5?D.varKinds.var:this.varKind,{name:Ce,from:ye,to:ve}=this;return`for(${de} ${Ce}=${ye}; ${Ce}<${ve}; ${Ce}++)`+super.render(oe)}get names(){const oe=s(super.names,this.from);return s(oe,this.to)}}class G extends j{constructor(oe,de,Ce,ye){super(),this.loop=oe,this.varKind=de,this.name=Ce,this.iterable=ye}render(oe){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(oe)}optimizeNames(oe,de){if(super.optimizeNames(oe,de))return this.iterable=d(this.iterable,oe,de),this}get names(){return o(super.names,this.iterable.names)}}class Q extends N{constructor(oe,de,Ce){super(),this.name=oe,this.args=de,this.async=Ce}render(oe){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(oe)}}Q.kind="func";class q extends x{render(oe){return"return "+super.render(oe)}}q.kind="return";class J extends N{render(oe){let de="try"+super.render(oe);return this.catch&&(de+=this.catch.render(oe)),this.finally&&(de+=this.finally.render(oe)),de}optimizeNodes(){var oe,de;return super.optimizeNodes(),null===(oe=this.catch)||void 0===oe||oe.optimizeNodes(),null===(de=this.finally)||void 0===de||de.optimizeNodes(),this}optimizeNames(oe,de){var Ce,ye;return super.optimizeNames(oe,de),null===(Ce=this.catch)||void 0===Ce||Ce.optimizeNames(oe,de),null===(ye=this.finally)||void 0===ye||ye.optimizeNames(oe,de),this}get names(){const oe=super.names;return this.catch&&o(oe,this.catch.names),this.finally&&o(oe,this.finally.names),oe}}class H extends N{constructor(oe){super(),this.error=oe}render(oe){return`catch(${this.error})`+super.render(oe)}}H.kind="catch";class te extends N{render(oe){return"finally"+super.render(oe)}}te.kind="finally";function o(ee,oe){for(const de in oe)ee[de]=(ee[de]||0)+(oe[de]||0);return ee}function s(ee,oe){return oe instanceof p._CodeOrName?o(ee,oe.names):ee}function d(ee,oe,de){return ee instanceof p.Name?Ce(ee):function ye(ve){return ve instanceof p._Code&&ve._items.some(ae=>ae instanceof p.Name&&1===oe[ae.str]&&void 0!==de[ae.str])}(ee)?new p._Code(ee._items.reduce((ve,ae)=>(ae instanceof p.Name&&(ae=Ce(ae)),ae instanceof p._Code?ve.push(...ae._items):ve.push(ae),ve),[])):ee;function Ce(ve){const ae=de[ve.str];return void 0===ae||1!==oe[ve.str]?ve:(delete oe[ve.str],ae)}}function h(ee,oe){for(const de in oe)ee[de]=(ee[de]||0)-(oe[de]||0)}function S(ee){return"boolean"==typeof ee||"number"==typeof ee||null===ee?!ee:p._`!${se(ee)}`}u.CodeGen=class C{constructor(oe,de={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...de,_n:de.lines?"\n":""},this._extScope=oe,this._scope=new D.Scope({parent:oe}),this._nodes=[new F]}toString(){return this._root.render(this.opts)}name(oe){return this._scope.name(oe)}scopeName(oe){return this._extScope.name(oe)}scopeValue(oe,de){const Ce=this._extScope.value(oe,de);return(this._values[Ce.prefix]||(this._values[Ce.prefix]=new Set)).add(Ce),Ce}getScopeValue(oe,de){return this._extScope.getValue(oe,de)}scopeRefs(oe){return this._extScope.scopeRefs(oe,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(oe,de,Ce,ye){const ve=this._scope.toName(de);return void 0!==Ce&&ye&&(this._constants[ve.str]=Ce),this._leafNode(new v(oe,ve,Ce)),ve}const(oe,de,Ce){return this._def(D.varKinds.const,oe,de,Ce)}let(oe,de,Ce){return this._def(D.varKinds.let,oe,de,Ce)}var(oe,de,Ce){return this._def(D.varKinds.var,oe,de,Ce)}assign(oe,de,Ce){return this._leafNode(new m(oe,de,Ce))}add(oe,de){return this._leafNode(new b(oe,u.operators.ADD,de))}code(oe){return"function"==typeof oe?oe():oe!==p.nil&&this._leafNode(new P(oe)),this}object(...oe){const de=["{"];for(const[Ce,ye]of oe)de.length>1&&de.push(","),de.push(Ce),(Ce!==ye||this.opts.es5)&&(de.push(":"),(0,p.addCodeArg)(de,ye));return de.push("}"),new p._Code(de)}if(oe,de,Ce){if(this._blockNode(new z(oe)),de&&Ce)this.code(de).else().code(Ce).endIf();else if(de)this.code(de).endIf();else if(Ce)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(oe){return this._elseNode(new z(oe))}else(){return this._elseNode(new L)}endIf(){return this._endBlockNode(z,L)}_for(oe,de){return this._blockNode(oe),de&&this.code(de).endFor(),this}for(oe,de){return this._for(new W(oe),de)}forRange(oe,de,Ce,ye,ve=(this.opts.es5?D.varKinds.var:D.varKinds.let)){const ae=this._scope.toName(oe);return this._for(new Y(ve,ae,de,Ce),()=>ye(ae))}forOf(oe,de,Ce,ye=D.varKinds.const){const ve=this._scope.toName(oe);if(this.opts.es5){const ae=de instanceof p.Name?de:this.var("_arr",de);return this.forRange("_i",0,p._`${ae}.length`,fe=>{this.var(ve,p._`${ae}[${fe}]`),Ce(ve)})}return this._for(new G("of",ye,ve,de),()=>Ce(ve))}forIn(oe,de,Ce,ye=(this.opts.es5?D.varKinds.var:D.varKinds.const)){if(this.opts.ownProperties)return this.forOf(oe,p._`Object.keys(${de})`,Ce);const ve=this._scope.toName(oe);return this._for(new G("in",ye,ve,de),()=>Ce(ve))}endFor(){return this._endBlockNode(j)}label(oe){return this._leafNode(new M(oe))}break(oe){return this._leafNode(new E(oe))}return(oe){const de=new q;if(this._blockNode(de),this.code(oe),1!==de.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(q)}try(oe,de,Ce){if(!de&&!Ce)throw new Error('CodeGen: "try" without "catch" and "finally"');const ye=new J;if(this._blockNode(ye),this.code(oe),de){const ve=this.name("e");this._currNode=ye.catch=new H(ve),de(ve)}return Ce&&(this._currNode=ye.finally=new te,this.code(Ce)),this._endBlockNode(H,te)}throw(oe){return this._leafNode(new A(oe))}block(oe,de){return this._blockStarts.push(this._nodes.length),oe&&this.code(oe).endBlock(de),this}endBlock(oe){const de=this._blockStarts.pop();if(void 0===de)throw new Error("CodeGen: not in self-balancing block");const Ce=this._nodes.length-de;if(Ce<0||void 0!==oe&&Ce!==oe)throw new Error(`CodeGen: wrong number of nodes: ${Ce} vs ${oe} expected`);return this._nodes.length=de,this}func(oe,de=p.nil,Ce,ye){return this._blockNode(new Q(oe,de,Ce)),ye&&this.code(ye).endFunc(),this}endFunc(){return this._endBlockNode(Q)}optimize(oe=1){for(;oe-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(oe){return this._currNode.nodes.push(oe),this}_blockNode(oe){this._currNode.nodes.push(oe),this._nodes.push(oe)}_endBlockNode(oe,de){const Ce=this._currNode;if(Ce instanceof oe||de&&Ce instanceof de)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${de?`${oe.kind}/${de.kind}`:oe.kind}"`)}_elseNode(oe){const de=this._currNode;if(!(de instanceof z))throw new Error('CodeGen: "else" without "if"');return this._currNode=de.else=oe,this}get _root(){return this._nodes[0]}get _currNode(){const oe=this._nodes;return oe[oe.length-1]}set _currNode(oe){const de=this._nodes;de[de.length-1]=oe}},u.not=S;const k=R(u.operators.AND);u.and=function B(...ee){return ee.reduce(k)};const I=R(u.operators.OR);function R(ee){return(oe,de)=>oe===p.nil?de:de===p.nil?oe:p._`${se(oe)} ${ee} ${se(de)}`}function se(ee){return ee instanceof p.Name?ee:p._`(${ee})`}u.or=function f(...ee){return ee.reduce(I)}},1917:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ValueScope=u.ValueScopeName=u.Scope=u.varKinds=u.UsedValueState=void 0;const p=g(26295);class D extends Error{constructor(M){super(`CodeGen: "code" for ${M} not defined`),this.value=M.value}}var w,b;(b=w=u.UsedValueState||(u.UsedValueState={}))[b.Started=0]="Started",b[b.Completed=1]="Completed",u.varKinds={const:new p.Name("const"),let:new p.Name("let"),var:new p.Name("var")};class _{constructor({prefixes:M,parent:E}={}){this._names={},this._prefixes=M,this._parent=E}toName(M){return M instanceof p.Name?M:this.name(M)}name(M){return new p.Name(this._newName(M))}_newName(M){return`${M}${(this._names[M]||this._nameGroup(M)).index++}`}_nameGroup(M){var E,A;if(null!==(A=null===(E=this._parent)||void 0===E?void 0:E._prefixes)&&void 0!==A&&A.has(M)||this._prefixes&&!this._prefixes.has(M))throw new Error(`CodeGen: prefix "${M}" is not allowed in this scope`);return this._names[M]={prefix:M,index:0}}}u.Scope=_;class l extends p.Name{constructor(M,E){super(E),this.prefix=M}setValue(M,{property:E,itemIndex:A}){this.value=M,this.scopePath=p._`.${new p.Name(E)}[${A}]`}}u.ValueScopeName=l;const v=p._`\n`;u.ValueScope=class m extends _{constructor(M){super(M),this._values={},this._scope=M.scope,this.opts={...M,_n:M.lines?v:p.nil}}get(){return this._scope}name(M){return new l(M,this._newName(M))}value(M,E){var A;if(void 0===E.ref)throw new Error("CodeGen: ref must be passed in value");const P=this.toName(M),{prefix:x}=P,N=null!==(A=E.key)&&void 0!==A?A:E.ref;let F=this._values[x];if(F){const j=F.get(N);if(j)return j}else F=this._values[x]=new Map;F.set(N,P);const L=this._scope[x]||(this._scope[x]=[]),z=L.length;return L[z]=E.ref,P.setValue(E,{property:x,itemIndex:z}),P}getValue(M,E){const A=this._values[M];if(A)return A.get(E)}scopeRefs(M,E=this._values){return this._reduceValues(E,A=>{if(void 0===A.scopePath)throw new Error(`CodeGen: name "${A}" has no value`);return p._`${M}${A.scopePath}`})}scopeCode(M=this._values,E,A){return this._reduceValues(M,P=>{if(void 0===P.value)throw new Error(`CodeGen: name "${P}" has no value`);return P.value.code},E,A)}_reduceValues(M,E,A={},P){let x=p.nil;for(const N in M){const F=M[N];if(!F)continue;const L=A[N]=A[N]||new Map;F.forEach(z=>{if(L.has(z))return;L.set(z,w.Started);let j=E(z);if(j){const W=this.opts.es5?u.varKinds.var:u.varKinds.const;x=p._`${x}${W} ${z} = ${j};${this.opts._n}`}else{if(!(j=P?.(z)))throw new D(z);x=p._`${x}${j}${this.opts._n}`}L.set(z,w.Completed)})}return x}}},75091:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.extendErrors=u.resetErrorsCount=u.reportExtraError=u.reportError=u.keyword$DataError=u.keywordError=void 0;const p=g(56382),D=g(97990),w=g(5976);function b(L,z){const j=L.const("err",z);L.if(p._`${w.default.vErrors} === null`,()=>L.assign(w.default.vErrors,p._`[${j}]`),p._`${w.default.vErrors}.push(${j})`),L.code(p._`${w.default.errors}++`)}function M(L,z){const{gen:j,validateName:W,schemaEnv:Y}=L;Y.$async?j.throw(p._`new ${L.ValidationError}(${z})`):(j.assign(p._`${W}.errors`,z),j.return(!1))}u.keywordError={message:({keyword:L})=>p.str`must pass "${L}" keyword validation`},u.keyword$DataError={message:({keyword:L,schemaType:z})=>z?p.str`"${L}" keyword must be ${z} ($data)`:p.str`"${L}" keyword is invalid ($data)`},u.reportError=function _(L,z=u.keywordError,j,W){const{it:Y}=L,{gen:G,compositeRule:Q,allErrors:q}=Y,J=A(L,z,j);W??(Q||q)?b(G,J):M(Y,p._`[${J}]`)},u.reportExtraError=function l(L,z=u.keywordError,j){const{it:W}=L,{gen:Y,compositeRule:G,allErrors:Q}=W;b(Y,A(L,z,j)),G||Q||M(W,w.default.vErrors)},u.resetErrorsCount=function v(L,z){L.assign(w.default.errors,z),L.if(p._`${w.default.vErrors} !== null`,()=>L.if(z,()=>L.assign(p._`${w.default.vErrors}.length`,z),()=>L.assign(w.default.vErrors,null)))},u.extendErrors=function m({gen:L,keyword:z,schemaValue:j,data:W,errsCount:Y,it:G}){if(void 0===Y)throw new Error("ajv implementation error");const Q=L.name("err");L.forRange("i",Y,w.default.errors,q=>{L.const(Q,p._`${w.default.vErrors}[${q}]`),L.if(p._`${Q}.instancePath === undefined`,()=>L.assign(p._`${Q}.instancePath`,(0,p.strConcat)(w.default.instancePath,G.errorPath))),L.assign(p._`${Q}.schemaPath`,p.str`${G.errSchemaPath}/${z}`),G.opts.verbose&&(L.assign(p._`${Q}.schema`,j),L.assign(p._`${Q}.data`,W))})};const E={keyword:new p.Name("keyword"),schemaPath:new p.Name("schemaPath"),params:new p.Name("params"),propertyName:new p.Name("propertyName"),message:new p.Name("message"),schema:new p.Name("schema"),parentSchema:new p.Name("parentSchema")};function A(L,z,j){const{createErrors:W}=L.it;return!1===W?p._`{}`:function P(L,z,j={}){const{gen:W,it:Y}=L,G=[x(Y,j),N(L,j)];return function F(L,{params:z,message:j},W){const{keyword:Y,data:G,schemaValue:Q,it:q}=L,{opts:J,propertyName:H,topSchemaRef:te,schemaPath:C}=q;W.push([E.keyword,Y],[E.params,"function"==typeof z?z(L):z||p._`{}`]),J.messages&&W.push([E.message,"function"==typeof j?j(L):j]),J.verbose&&W.push([E.schema,Q],[E.parentSchema,p._`${te}${C}`],[w.default.data,G]),H&&W.push([E.propertyName,H])}(L,z,G),W.object(...G)}(L,z,j)}function x({errorPath:L},{instancePath:z}){const j=z?p.str`${L}${(0,D.getErrorPath)(z,D.Type.Str)}`:L;return[w.default.instancePath,(0,p.strConcat)(w.default.instancePath,j)]}function N({keyword:L,it:{errSchemaPath:z}},{schemaPath:j,parentSchema:W}){let Y=W?z:p.str`${z}/${L}`;return j&&(Y=p.str`${Y}${(0,D.getErrorPath)(j,D.Type.Str)}`),[E.schemaPath,Y]}},17140:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.resolveSchema=u.getCompilingSchema=u.resolveRef=u.compileSchema=u.SchemaEnv=void 0;const p=g(56382),D=g(20496),w=g(5976),_=g(31880),l=g(97990),v=g(66764);class m{constructor(j){var W;let Y;this.refs={},this.dynamicAnchors={},"object"==typeof j.schema&&(Y=j.schema),this.schema=j.schema,this.schemaId=j.schemaId,this.root=j.root||this,this.baseId=null!==(W=j.baseId)&&void 0!==W?W:(0,_.normalizeId)(Y?.[j.schemaId||"$id"]),this.schemaPath=j.schemaPath,this.localRefs=j.localRefs,this.meta=j.meta,this.$async=Y?.$async,this.refs={}}}function b(z){const j=A.call(this,z);if(j)return j;const W=(0,_.getFullPath)(this.opts.uriResolver,z.root.baseId),{es5:Y,lines:G}=this.opts.code,{ownProperties:Q}=this.opts,q=new p.CodeGen(this.scope,{es5:Y,lines:G,ownProperties:Q});let J;z.$async&&(J=q.scopeValue("Error",{ref:D.default,code:p._`require("ajv/dist/runtime/validation_error").default`}));const H=q.scopeName("validate");z.validateName=H;const te={gen:q,allErrors:this.opts.allErrors,data:w.default.data,parentData:w.default.parentData,parentDataProperty:w.default.parentDataProperty,dataNames:[w.default.data],dataPathArr:[p.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:q.scopeValue("schema",!0===this.opts.code.source?{ref:z.schema,code:(0,p.stringify)(z.schema)}:{ref:z.schema}),validateName:H,ValidationError:J,schema:z.schema,schemaEnv:z,rootId:W,baseId:z.baseId||W,schemaPath:p.nil,errSchemaPath:z.schemaPath||(this.opts.jtd?"":"#"),errorPath:p._`""`,opts:this.opts,self:this};let C;try{this._compilations.add(z),(0,v.validateFunctionCode)(te),q.optimize(this.opts.code.optimize);const o=q.toString();C=`${q.scopeRefs(w.default.scope)}return ${o}`,this.opts.code.process&&(C=this.opts.code.process(C,z));const d=new Function(`${w.default.self}`,`${w.default.scope}`,C)(this,this.scope.get());if(this.scope.value(H,{ref:d}),d.errors=null,d.schema=z.schema,d.schemaEnv=z,z.$async&&(d.$async=!0),!0===this.opts.code.source&&(d.source={validateName:H,validateCode:o,scopeValues:q._values}),this.opts.unevaluated){const{props:h,items:S}=te;d.evaluated={props:h instanceof p.Name?void 0:h,items:S instanceof p.Name?void 0:S,dynamicProps:h instanceof p.Name,dynamicItems:S instanceof p.Name},d.source&&(d.source.evaluated=(0,p.stringify)(d.evaluated))}return z.validate=d,z}catch(o){throw delete z.validate,delete z.validateName,C&&this.logger.error("Error compiling schema, function code:",C),o}finally{this._compilations.delete(z)}}function E(z){return(0,_.inlineRef)(z.schema,this.opts.inlineRefs)?z.schema:z.validate?z:b.call(this,z)}function A(z){for(const j of this._compilations)if(P(j,z))return j}function P(z,j){return z.schema===j.schema&&z.root===j.root&&z.baseId===j.baseId}function x(z,j){let W;for(;"string"==typeof(W=this.refs[j]);)j=W;return W||this.schemas[j]||N.call(this,z,j)}function N(z,j){const W=this.opts.uriResolver.parse(j),Y=(0,_._getFullPath)(this.opts.uriResolver,W);let G=(0,_.getFullPath)(this.opts.uriResolver,z.baseId,void 0);if(Object.keys(z.schema).length>0&&Y===G)return L.call(this,W,z);const Q=(0,_.normalizeId)(Y),q=this.refs[Q]||this.schemas[Q];if("string"==typeof q){const J=N.call(this,z,q);return"object"!=typeof J?.schema?void 0:L.call(this,W,J)}if("object"==typeof q?.schema){if(q.validate||b.call(this,q),Q===(0,_.normalizeId)(j)){const{schema:J}=q,{schemaId:H}=this.opts,te=J[H];return te&&(G=(0,_.resolveUrl)(this.opts.uriResolver,G,te)),new m({schema:J,schemaId:H,root:z,baseId:G})}return L.call(this,W,q)}}u.SchemaEnv=m,u.compileSchema=b,u.resolveRef=function M(z,j,W){var Y;W=(0,_.resolveUrl)(this.opts.uriResolver,j,W);const G=z.refs[W];if(G)return G;let Q=x.call(this,z,W);if(void 0===Q){const q=null===(Y=z.localRefs)||void 0===Y?void 0:Y[W],{schemaId:J}=this.opts;q&&(Q=new m({schema:q,schemaId:J,root:z,baseId:j}))}return void 0!==Q?z.refs[W]=E.call(this,Q):void 0},u.getCompilingSchema=A,u.resolveSchema=N;const F=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function L(z,{baseId:j,schema:W,root:Y}){var G;if("/"!==(null===(G=z.fragment)||void 0===G?void 0:G[0]))return;for(const J of z.fragment.slice(1).split("/")){if("boolean"==typeof W)return;const H=W[(0,l.unescapeFragment)(J)];if(void 0===H)return;const te="object"==typeof(W=H)&&W[this.opts.schemaId];!F.has(J)&&te&&(j=(0,_.resolveUrl)(this.opts.uriResolver,j,te))}let Q;if("boolean"!=typeof W&&W.$ref&&!(0,l.schemaHasRulesButRef)(W,this.RULES)){const J=(0,_.resolveUrl)(this.opts.uriResolver,j,W.$ref);Q=N.call(this,Y,J)}const{schemaId:q}=this.opts;return Q=Q||new m({schema:W,schemaId:q,root:Y,baseId:j}),Q.schema!==Q.root.schema?Q:void 0}},5976:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D={data:new p.Name("data"),valCxt:new p.Name("valCxt"),instancePath:new p.Name("instancePath"),parentData:new p.Name("parentData"),parentDataProperty:new p.Name("parentDataProperty"),rootData:new p.Name("rootData"),dynamicAnchors:new p.Name("dynamicAnchors"),vErrors:new p.Name("vErrors"),errors:new p.Name("errors"),this:new p.Name("this"),self:new p.Name("self"),scope:new p.Name("scope"),json:new p.Name("json"),jsonPos:new p.Name("jsonPos"),jsonLen:new p.Name("jsonLen"),jsonPart:new p.Name("jsonPart")};u.default=D},80140:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(31880);class D extends Error{constructor(_,l,v,m){super(m||`can't resolve reference ${v} from id ${l}`),this.missingRef=(0,p.resolveUrl)(_,l,v),this.missingSchema=(0,p.normalizeId)((0,p.getFullPath)(_,this.missingRef))}}u.default=D},31880:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.getSchemaRefs=u.resolveUrl=u.normalizeId=u._getFullPath=u.getFullPath=u.inlineRef=void 0;const p=g(97990),D=g(12559),w=g(23366),_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);u.inlineRef=function l(L,z=!0){return"boolean"==typeof L||(!0===z?!m(L):!!z&&b(L)<=z)};const v=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function m(L){for(const z in L){if(v.has(z))return!0;const j=L[z];if(Array.isArray(j)&&j.some(m)||"object"==typeof j&&m(j))return!0}return!1}function b(L){let z=0;for(const j in L){if("$ref"===j)return 1/0;if(z++,!_.has(j)&&("object"==typeof L[j]&&(0,p.eachItem)(L[j],W=>z+=b(W)),z===1/0))return 1/0}return z}function M(L,z="",j){!1!==j&&(z=P(z));const W=L.parse(z);return E(L,W)}function E(L,z){return L.serialize(z).split("#")[0]+"#"}u.getFullPath=M,u._getFullPath=E;const A=/#\/?$/;function P(L){return L?L.replace(A,""):""}u.normalizeId=P,u.resolveUrl=function x(L,z,j){return j=P(j),L.resolve(z,j)};const N=/^[a-z_][-a-z0-9._]*$/i;u.getSchemaRefs=function F(L,z){if("boolean"==typeof L)return{};const{schemaId:j,uriResolver:W}=this.opts,Y=P(L[j]||z),G={"":Y},Q=M(W,Y,!1),q={},J=new Set;return w(L,{allKeys:!0},(C,o,s,d)=>{if(void 0===d)return;const h=Q+o;let S=G[d];function k(I){const f=this.opts.uriResolver.resolve;if(I=P(S?f(S,I):I),J.has(I))throw te(I);J.add(I);let R=this.refs[I];return"string"==typeof R&&(R=this.refs[R]),"object"==typeof R?H(C,R.schema,I):I!==P(h)&&("#"===I[0]?(H(C,q[I],I),q[I]=C):this.refs[I]=h),I}function B(I){if("string"==typeof I){if(!N.test(I))throw new Error(`invalid anchor "${I}"`);k.call(this,`#${I}`)}}"string"==typeof C[j]&&(S=k.call(this,C[j])),B.call(this,C.$anchor),B.call(this,C.$dynamicAnchor),G[o]=S}),q;function H(C,o,s){if(void 0!==o&&!D(C,o))throw te(s)}function te(C){return new Error(`reference "${C}" resolves to more than one schema`)}}},62848:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.getRules=u.isJSONType=void 0;const p=new Set(["string","number","integer","boolean","null","object","array"]);u.isJSONType=function D(_){return"string"==typeof _&&p.has(_)},u.getRules=function w(){const _={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{..._,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},_.number,_.string,_.array,_.object],post:{rules:[]},all:{},keywords:{}}}},97990:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.checkStrictMode=u.getErrorPath=u.Type=u.useFunc=u.setEvaluated=u.evaluatedPropsToName=u.mergeEvaluated=u.eachItem=u.unescapeJsonPointer=u.escapeJsonPointer=u.escapeFragment=u.unescapeFragment=u.schemaRefOrVal=u.schemaHasRulesButRef=u.schemaHasRules=u.checkUnknownRules=u.alwaysValidSchema=u.toHash=void 0;const p=g(56382),D=g(26295);function l(Q,q=Q.schema){const{opts:J,self:H}=Q;if(!J.strictSchema||"boolean"==typeof q)return;const te=H.RULES.keywords;for(const C in q)te[C]||G(Q,`unknown keyword: "${C}"`)}function v(Q,q){if("boolean"==typeof Q)return!Q;for(const J in Q)if(q[J])return!0;return!1}function A(Q){return"number"==typeof Q?`${Q}`:Q.replace(/~/g,"~0").replace(/\//g,"~1")}function P(Q){return Q.replace(/~1/g,"/").replace(/~0/g,"~")}function N({mergeNames:Q,mergeToName:q,mergeValues:J,resultToName:H}){return(te,C,o,s)=>{const d=void 0===o?C:o instanceof p.Name?(C instanceof p.Name?Q(te,C,o):q(te,C,o),o):C instanceof p.Name?(q(te,o,C),C):J(C,o);return s!==p.Name||d instanceof p.Name?d:H(te,d)}}function F(Q,q){if(!0===q)return Q.var("props",!0);const J=Q.var("props",p._`{}`);return void 0!==q&&L(Q,J,q),J}function L(Q,q,J){Object.keys(J).forEach(H=>Q.assign(p._`${q}${(0,p.getProperty)(H)}`,!0))}u.toHash=function w(Q){const q={};for(const J of Q)q[J]=!0;return q},u.alwaysValidSchema=function _(Q,q){return"boolean"==typeof q?q:0===Object.keys(q).length||(l(Q,q),!v(q,Q.self.RULES.all))},u.checkUnknownRules=l,u.schemaHasRules=v,u.schemaHasRulesButRef=function m(Q,q){if("boolean"==typeof Q)return!Q;for(const J in Q)if("$ref"!==J&&q.all[J])return!0;return!1},u.schemaRefOrVal=function b({topSchemaRef:Q,schemaPath:q},J,H,te){if(!te){if("number"==typeof J||"boolean"==typeof J)return J;if("string"==typeof J)return p._`${J}`}return p._`${Q}${q}${(0,p.getProperty)(H)}`},u.unescapeFragment=function M(Q){return P(decodeURIComponent(Q))},u.escapeFragment=function E(Q){return encodeURIComponent(A(Q))},u.escapeJsonPointer=A,u.unescapeJsonPointer=P,u.eachItem=function x(Q,q){if(Array.isArray(Q))for(const J of Q)q(J);else q(Q)},u.mergeEvaluated={props:N({mergeNames:(Q,q,J)=>Q.if(p._`${J} !== true && ${q} !== undefined`,()=>{Q.if(p._`${q} === true`,()=>Q.assign(J,!0),()=>Q.assign(J,p._`${J} || {}`).code(p._`Object.assign(${J}, ${q})`))}),mergeToName:(Q,q,J)=>Q.if(p._`${J} !== true`,()=>{!0===q?Q.assign(J,!0):(Q.assign(J,p._`${J} || {}`),L(Q,J,q))}),mergeValues:(Q,q)=>!0===Q||{...Q,...q},resultToName:F}),items:N({mergeNames:(Q,q,J)=>Q.if(p._`${J} !== true && ${q} !== undefined`,()=>Q.assign(J,p._`${q} === true ? true : ${J} > ${q} ? ${J} : ${q}`)),mergeToName:(Q,q,J)=>Q.if(p._`${J} !== true`,()=>Q.assign(J,!0===q||p._`${J} > ${q} ? ${J} : ${q}`)),mergeValues:(Q,q)=>!0===Q||Math.max(Q,q),resultToName:(Q,q)=>Q.var("items",q)})},u.evaluatedPropsToName=F,u.setEvaluated=L;const z={};var W,Q;function G(Q,q,J=Q.opts.strictSchema){if(J){if(q=`strict mode: ${q}`,!0===J)throw new Error(q);Q.self.logger.warn(q)}}u.useFunc=function j(Q,q){return Q.scopeValue("func",{ref:q,code:z[q.code]||(z[q.code]=new D._Code(q.code))})},(Q=W=u.Type||(u.Type={}))[Q.Num=0]="Num",Q[Q.Str=1]="Str",u.getErrorPath=function Y(Q,q,J){if(Q instanceof p.Name){const H=q===W.Num;return J?H?p._`"[" + ${Q} + "]"`:p._`"['" + ${Q} + "']"`:H?p._`"/" + ${Q}`:p._`"/" + ${Q}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return J?(0,p.getProperty)(Q).toString():"/"+A(Q)},u.checkStrictMode=G},20368:(re,u)=>{"use strict";function p(w,_){return _.rules.some(l=>D(w,l))}function D(w,_){var l;return void 0!==w[_.keyword]||(null===(l=_.definition.implements)||void 0===l?void 0:l.some(v=>void 0!==w[v]))}Object.defineProperty(u,"__esModule",{value:!0}),u.shouldUseRule=u.shouldUseGroup=u.schemaHasRulesForType=void 0,u.schemaHasRulesForType=function g({schema:w,self:_},l){const v=_.RULES.types[l];return v&&!0!==v&&p(w,v)},u.shouldUseGroup=p,u.shouldUseRule=D},8007:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.boolOrEmptySchema=u.topBoolOrEmptySchema=void 0;const p=g(75091),D=g(56382),w=g(5976),_={message:"boolean schema is false"};function m(b,M){const{gen:E,data:A}=b,P={gen:E,keyword:"false schema",data:A,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:b};(0,p.reportError)(P,_,void 0,M)}u.topBoolOrEmptySchema=function l(b){const{gen:M,schema:E,validateName:A}=b;!1===E?m(b,!1):"object"==typeof E&&!0===E.$async?M.return(w.default.data):(M.assign(D._`${A}.errors`,null),M.return(!0))},u.boolOrEmptySchema=function v(b,M){const{gen:E,schema:A}=b;!1===A?(E.var(M,!1),m(b)):E.var(M,!0)}},59078:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.reportTypeError=u.checkDataTypes=u.checkDataType=u.coerceAndCheckDataType=u.getJSONTypes=u.getSchemaTypes=u.DataType=void 0;const p=g(62848),D=g(20368),w=g(75091),_=g(56382),l=g(97990);var v,W;function b(W){const Y=Array.isArray(W)?W:W?[W]:[];if(Y.every(p.isJSONType))return Y;throw new Error("type must be JSONType or JSONType[]: "+Y.join(","))}(W=v=u.DataType||(u.DataType={}))[W.Correct=0]="Correct",W[W.Wrong=1]="Wrong",u.getSchemaTypes=function m(W){const Y=b(W.type);if(Y.includes("null")){if(!1===W.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!Y.length&&void 0!==W.nullable)throw new Error('"nullable" cannot be used without "type"');!0===W.nullable&&Y.push("null")}return Y},u.getJSONTypes=b,u.coerceAndCheckDataType=function M(W,Y){const{gen:G,data:Q,opts:q}=W,J=function A(W,Y){return Y?W.filter(G=>E.has(G)||"array"===Y&&"array"===G):[]}(Y,q.coerceTypes),H=Y.length>0&&!(0===J.length&&1===Y.length&&(0,D.schemaHasRulesForType)(W,Y[0]));if(H){const te=F(Y,Q,q.strictNumbers,v.Wrong);G.if(te,()=>{J.length?function P(W,Y,G){const{gen:Q,data:q,opts:J}=W,H=Q.let("dataType",_._`typeof ${q}`),te=Q.let("coerced",_._`undefined`);"array"===J.coerceTypes&&Q.if(_._`${H} == 'object' && Array.isArray(${q}) && ${q}.length == 1`,()=>Q.assign(q,_._`${q}[0]`).assign(H,_._`typeof ${q}`).if(F(Y,q,J.strictNumbers),()=>Q.assign(te,q))),Q.if(_._`${te} !== undefined`);for(const o of G)(E.has(o)||"array"===o&&"array"===J.coerceTypes)&&C(o);function C(o){switch(o){case"string":return void Q.elseIf(_._`${H} == "number" || ${H} == "boolean"`).assign(te,_._`"" + ${q}`).elseIf(_._`${q} === null`).assign(te,_._`""`);case"number":return void Q.elseIf(_._`${H} == "boolean" || ${q} === null + || (${H} == "string" && ${q} && ${q} == +${q})`).assign(te,_._`+${q}`);case"integer":return void Q.elseIf(_._`${H} === "boolean" || ${q} === null + || (${H} === "string" && ${q} && ${q} == +${q} && !(${q} % 1))`).assign(te,_._`+${q}`);case"boolean":return void Q.elseIf(_._`${q} === "false" || ${q} === 0 || ${q} === null`).assign(te,!1).elseIf(_._`${q} === "true" || ${q} === 1`).assign(te,!0);case"null":return Q.elseIf(_._`${q} === "" || ${q} === 0 || ${q} === false`),void Q.assign(te,null);case"array":Q.elseIf(_._`${H} === "string" || ${H} === "number" + || ${H} === "boolean" || ${q} === null`).assign(te,_._`[${q}]`)}}Q.else(),z(W),Q.endIf(),Q.if(_._`${te} !== undefined`,()=>{Q.assign(q,te),function x({gen:W,parentData:Y,parentDataProperty:G},Q){W.if(_._`${Y} !== undefined`,()=>W.assign(_._`${Y}[${G}]`,Q))}(W,te)})}(W,Y,J):z(W)})}return H};const E=new Set(["string","number","integer","boolean","null"]);function N(W,Y,G,Q=v.Correct){const q=Q===v.Correct?_.operators.EQ:_.operators.NEQ;let J;switch(W){case"null":return _._`${Y} ${q} null`;case"array":J=_._`Array.isArray(${Y})`;break;case"object":J=_._`${Y} && typeof ${Y} == "object" && !Array.isArray(${Y})`;break;case"integer":J=H(_._`!(${Y} % 1) && !isNaN(${Y})`);break;case"number":J=H();break;default:return _._`typeof ${Y} ${q} ${W}`}return Q===v.Correct?J:(0,_.not)(J);function H(te=_.nil){return(0,_.and)(_._`typeof ${Y} == "number"`,te,G?_._`isFinite(${Y})`:_.nil)}}function F(W,Y,G,Q){if(1===W.length)return N(W[0],Y,G,Q);let q;const J=(0,l.toHash)(W);if(J.array&&J.object){const H=_._`typeof ${Y} != "object"`;q=J.null?H:_._`!${Y} || ${H}`,delete J.null,delete J.array,delete J.object}else q=_.nil;J.number&&delete J.integer;for(const H in J)q=(0,_.and)(q,N(H,Y,G,Q));return q}u.checkDataType=N,u.checkDataTypes=F;const L={message:({schema:W})=>`must be ${W}`,params:({schema:W,schemaValue:Y})=>"string"==typeof W?_._`{type: ${W}}`:_._`{type: ${Y}}`};function z(W){const Y=function j(W){const{gen:Y,data:G,schema:Q}=W,q=(0,l.schemaRefOrVal)(W,Q,"type");return{gen:Y,keyword:"type",data:G,schema:Q.type,schemaCode:q,schemaValue:q,parentSchema:Q,params:{},it:W}}(W);(0,w.reportError)(Y,L)}u.reportTypeError=z},57866:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.assignDefaults=void 0;const p=g(56382),D=g(97990);function _(l,v,m){const{gen:b,compositeRule:M,data:E,opts:A}=l;if(void 0===m)return;const P=p._`${E}${(0,p.getProperty)(v)}`;if(M)return void(0,D.checkStrictMode)(l,`default is ignored for: ${P}`);let x=p._`${P} === undefined`;"empty"===A.useDefaults&&(x=p._`${x} || ${P} === null || ${P} === ""`),b.if(x,p._`${P} = ${(0,p.stringify)(m)}`)}u.assignDefaults=function w(l,v){const{properties:m,items:b}=l.schema;if("object"===v&&m)for(const M in m)_(l,M,m[M].default);else"array"===v&&Array.isArray(b)&&b.forEach((M,E)=>_(l,E,M.default))}},66764:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.getData=u.KeywordCxt=u.validateFunctionCode=void 0;const p=g(8007),D=g(59078),w=g(20368),_=g(59078),l=g(57866),v=g(22707),m=g(62639),b=g(56382),M=g(5976),E=g(31880),A=g(97990),P=g(75091);function N({gen:Se,validateName:ce,schema:be,schemaEnv:Pe,opts:Fe},lt){Fe.code.es5?Se.func(ce,b._`${M.default.data}, ${M.default.valCxt}`,Pe.$async,()=>{Se.code(b._`"use strict"; ${W(be,Fe)}`),function L(Se,ce){Se.if(M.default.valCxt,()=>{Se.var(M.default.instancePath,b._`${M.default.valCxt}.${M.default.instancePath}`),Se.var(M.default.parentData,b._`${M.default.valCxt}.${M.default.parentData}`),Se.var(M.default.parentDataProperty,b._`${M.default.valCxt}.${M.default.parentDataProperty}`),Se.var(M.default.rootData,b._`${M.default.valCxt}.${M.default.rootData}`),ce.dynamicRef&&Se.var(M.default.dynamicAnchors,b._`${M.default.valCxt}.${M.default.dynamicAnchors}`)},()=>{Se.var(M.default.instancePath,b._`""`),Se.var(M.default.parentData,b._`undefined`),Se.var(M.default.parentDataProperty,b._`undefined`),Se.var(M.default.rootData,M.default.data),ce.dynamicRef&&Se.var(M.default.dynamicAnchors,b._`{}`)})}(Se,Fe),Se.code(lt)}):Se.func(ce,b._`${M.default.data}, ${function F(Se){return b._`{${M.default.instancePath}="", ${M.default.parentData}, ${M.default.parentDataProperty}, ${M.default.rootData}=${M.default.data}${Se.dynamicRef?b._`, ${M.default.dynamicAnchors}={}`:b.nil}}={}`}(Fe)}`,Pe.$async,()=>Se.code(W(be,Fe)).code(lt))}function W(Se,ce){const be="object"==typeof Se&&Se[ce.schemaId];return be&&(ce.code.source||ce.code.process)?b._`/*# sourceURL=${be} */`:b.nil}function Y(Se,ce){Q(Se)&&(J(Se),G(Se))?function q(Se,ce){const{schema:be,gen:Pe,opts:Fe}=Se;Fe.$comment&&be.$comment&&d(Se),function o(Se){const ce=Se.schema[Se.opts.schemaId];ce&&(Se.baseId=(0,E.resolveUrl)(Se.opts.uriResolver,Se.baseId,ce))}(Se),function s(Se){if(Se.schema.$async&&!Se.schemaEnv.$async)throw new Error("async schema in sync schema")}(Se);const lt=Pe.const("_errs",M.default.errors);H(Se,lt),Pe.var(ce,b._`${lt} === ${M.default.errors}`)}(Se,ce):(0,p.boolOrEmptySchema)(Se,ce)}function G({schema:Se,self:ce}){if("boolean"==typeof Se)return!Se;for(const be in Se)if(ce.RULES.all[be])return!0;return!1}function Q(Se){return"boolean"!=typeof Se.schema}function J(Se){(0,A.checkUnknownRules)(Se),function te(Se){const{schema:ce,errSchemaPath:be,opts:Pe,self:Fe}=Se;ce.$ref&&Pe.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(ce,Fe.RULES)&&Fe.logger.warn(`$ref: keywords ignored in schema at path "${be}"`)}(Se)}function H(Se,ce){if(Se.opts.jtd)return k(Se,[],!1,ce);const be=(0,D.getSchemaTypes)(Se.schema);k(Se,be,!(0,D.coerceAndCheckDataType)(Se,be),ce)}function d({gen:Se,schemaEnv:ce,schema:be,errSchemaPath:Pe,opts:Fe}){const lt=be.$comment;if(!0===Fe.$comment)Se.code(b._`${M.default.self}.logger.log(${lt})`);else if("function"==typeof Fe.$comment){const Ge=b.str`${Pe}/$comment`,He=Se.scopeValue("root",{ref:ce.root});Se.code(b._`${M.default.self}.opts.$comment(${lt}, ${Ge}, ${He}.schema)`)}}function k(Se,ce,be,Pe){const{gen:Fe,schema:lt,data:Ge,allErrors:He,opts:Kt,self:tt}=Se,{RULES:nt}=tt;function Vt(ot){(0,w.shouldUseGroup)(lt,ot)&&(ot.type?(Fe.if((0,_.checkDataType)(ot.type,Ge,Kt.strictNumbers)),B(Se,ot),1===ce.length&&ce[0]===ot.type&&be&&(Fe.else(),(0,_.reportTypeError)(Se)),Fe.endIf()):B(Se,ot),He||Fe.if(b._`${M.default.errors} === ${Pe||0}`))}!lt.$ref||!Kt.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(lt,nt)?(Kt.jtd||function I(Se,ce){Se.schemaEnv.meta||!Se.opts.strictTypes||(function f(Se,ce){if(ce.length){if(!Se.dataTypes.length)return void(Se.dataTypes=ce);ce.forEach(be=>{oe(Se.dataTypes,be)||Ce(Se,`type "${be}" not allowed by context "${Se.dataTypes.join(",")}"`)}),function de(Se,ce){const be=[];for(const Pe of Se.dataTypes)oe(ce,Pe)?be.push(Pe):ce.includes("integer")&&"number"===Pe&&be.push("integer");Se.dataTypes=be}(Se,ce)}}(Se,ce),Se.opts.allowUnionTypes||function R(Se,ce){ce.length>1&&(2!==ce.length||!ce.includes("null"))&&Ce(Se,"use allowUnionTypes to allow union type keyword")}(Se,ce),function se(Se,ce){const be=Se.self.RULES.all;for(const Pe in be){const Fe=be[Pe];if("object"==typeof Fe&&(0,w.shouldUseRule)(Se.schema,Fe)){const{type:lt}=Fe.definition;lt.length&&!lt.some(Ge=>ee(ce,Ge))&&Ce(Se,`missing type "${lt.join(",")}" for keyword "${Pe}"`)}}}(Se,Se.dataTypes))}(Se,ce),Fe.block(()=>{for(const ot of nt.rules)Vt(ot);Vt(nt.post)})):Fe.block(()=>ve(Se,"$ref",nt.all.$ref.definition))}function B(Se,ce){const{gen:be,schema:Pe,opts:{useDefaults:Fe}}=Se;Fe&&(0,l.assignDefaults)(Se,ce.type),be.block(()=>{for(const lt of ce.rules)(0,w.shouldUseRule)(Pe,lt)&&ve(Se,lt.keyword,lt.definition,ce.type)})}function ee(Se,ce){return Se.includes(ce)||"number"===ce&&Se.includes("integer")}function oe(Se,ce){return Se.includes(ce)||"integer"===ce&&Se.includes("number")}function Ce(Se,ce){ce+=` at "${Se.schemaEnv.baseId+Se.errSchemaPath}" (strictTypes)`,(0,A.checkStrictMode)(Se,ce,Se.opts.strictTypes)}u.validateFunctionCode=function x(Se){Q(Se)&&(J(Se),G(Se))?function z(Se){const{schema:ce,opts:be,gen:Pe}=Se;N(Se,()=>{be.$comment&&ce.$comment&&d(Se),function C(Se){const{schema:ce,opts:be}=Se;void 0!==ce.default&&be.useDefaults&&be.strictSchema&&(0,A.checkStrictMode)(Se,"default is ignored in the schema root")}(Se),Pe.let(M.default.vErrors,null),Pe.let(M.default.errors,0),be.unevaluated&&function j(Se){const{gen:ce,validateName:be}=Se;Se.evaluated=ce.const("evaluated",b._`${be}.evaluated`),ce.if(b._`${Se.evaluated}.dynamicProps`,()=>ce.assign(b._`${Se.evaluated}.props`,b._`undefined`)),ce.if(b._`${Se.evaluated}.dynamicItems`,()=>ce.assign(b._`${Se.evaluated}.items`,b._`undefined`))}(Se),H(Se),function h(Se){const{gen:ce,schemaEnv:be,validateName:Pe,ValidationError:Fe,opts:lt}=Se;be.$async?ce.if(b._`${M.default.errors} === 0`,()=>ce.return(M.default.data),()=>ce.throw(b._`new ${Fe}(${M.default.vErrors})`)):(ce.assign(b._`${Pe}.errors`,M.default.vErrors),lt.unevaluated&&function S({gen:Se,evaluated:ce,props:be,items:Pe}){be instanceof b.Name&&Se.assign(b._`${ce}.props`,be),Pe instanceof b.Name&&Se.assign(b._`${ce}.items`,Pe)}(Se),ce.return(b._`${M.default.errors} === 0`))}(Se)})}(Se):N(Se,()=>(0,p.topBoolOrEmptySchema)(Se))};class ye{constructor(ce,be,Pe){if((0,v.validateKeywordUsage)(ce,be,Pe),this.gen=ce.gen,this.allErrors=ce.allErrors,this.keyword=Pe,this.data=ce.data,this.schema=ce.schema[Pe],this.$data=be.$data&&ce.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,A.schemaRefOrVal)(ce,this.schema,Pe,this.$data),this.schemaType=be.schemaType,this.parentSchema=ce.schema,this.params={},this.it=ce,this.def=be,this.$data)this.schemaCode=ce.gen.const("vSchema",pe(this.$data,ce));else if(this.schemaCode=this.schemaValue,!(0,v.validSchemaType)(this.schema,be.schemaType,be.allowUndefined))throw new Error(`${Pe} value must be ${JSON.stringify(be.schemaType)}`);("code"in be?be.trackErrors:!1!==be.errors)&&(this.errsCount=ce.gen.const("_errs",M.default.errors))}result(ce,be,Pe){this.failResult((0,b.not)(ce),be,Pe)}failResult(ce,be,Pe){this.gen.if(ce),Pe?Pe():this.error(),be?(this.gen.else(),be(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ce,be){this.failResult((0,b.not)(ce),void 0,be)}fail(ce){if(void 0===ce)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(ce),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ce){if(!this.$data)return this.fail(ce);const{schemaCode:be}=this;this.fail(b._`${be} !== undefined && (${(0,b.or)(this.invalid$data(),ce)})`)}error(ce,be,Pe){if(be)return this.setParams(be),this._error(ce,Pe),void this.setParams({});this._error(ce,Pe)}_error(ce,be){(ce?P.reportExtraError:P.reportError)(this,this.def.error,be)}$dataError(){(0,P.reportError)(this,this.def.$dataError||P.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,P.resetErrorsCount)(this.gen,this.errsCount)}ok(ce){this.allErrors||this.gen.if(ce)}setParams(ce,be){be?Object.assign(this.params,ce):this.params=ce}block$data(ce,be,Pe=b.nil){this.gen.block(()=>{this.check$data(ce,Pe),be()})}check$data(ce=b.nil,be=b.nil){if(!this.$data)return;const{gen:Pe,schemaCode:Fe,schemaType:lt,def:Ge}=this;Pe.if((0,b.or)(b._`${Fe} === undefined`,be)),ce!==b.nil&&Pe.assign(ce,!0),(lt.length||Ge.validateSchema)&&(Pe.elseIf(this.invalid$data()),this.$dataError(),ce!==b.nil&&Pe.assign(ce,!1)),Pe.else()}invalid$data(){const{gen:ce,schemaCode:be,schemaType:Pe,def:Fe,it:lt}=this;return(0,b.or)(function Ge(){if(Pe.length){if(!(be instanceof b.Name))throw new Error("ajv implementation error");const Kt=Array.isArray(Pe)?Pe:[Pe];return b._`${(0,_.checkDataTypes)(Kt,be,lt.opts.strictNumbers,_.DataType.Wrong)}`}return b.nil}(),function He(){if(Fe.validateSchema){const Kt=ce.scopeValue("validate$data",{ref:Fe.validateSchema});return b._`!${Kt}(${be})`}return b.nil}())}subschema(ce,be){const Pe=(0,m.getSubschema)(this.it,ce);(0,m.extendSubschemaData)(Pe,this.it,ce),(0,m.extendSubschemaMode)(Pe,ce);const Fe={...this.it,...Pe,items:void 0,props:void 0};return Y(Fe,be),Fe}mergeEvaluated(ce,be){const{it:Pe,gen:Fe}=this;Pe.opts.unevaluated&&(!0!==Pe.props&&void 0!==ce.props&&(Pe.props=A.mergeEvaluated.props(Fe,ce.props,Pe.props,be)),!0!==Pe.items&&void 0!==ce.items&&(Pe.items=A.mergeEvaluated.items(Fe,ce.items,Pe.items,be)))}mergeValidEvaluated(ce,be){const{it:Pe,gen:Fe}=this;if(Pe.opts.unevaluated&&(!0!==Pe.props||!0!==Pe.items))return Fe.if(be,()=>this.mergeEvaluated(ce,b.Name)),!0}}function ve(Se,ce,be,Pe){const Fe=new ye(Se,be,ce);"code"in be?be.code(Fe,Pe):Fe.$data&&be.validate?(0,v.funcKeywordCode)(Fe,be):"macro"in be?(0,v.macroKeywordCode)(Fe,be):(be.compile||be.validate)&&(0,v.funcKeywordCode)(Fe,be)}u.KeywordCxt=ye;const ae=/^\/(?:[^~]|~0|~1)*$/,fe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function pe(Se,{dataLevel:ce,dataNames:be,dataPathArr:Pe}){let Fe,lt;if(""===Se)return M.default.rootData;if("/"===Se[0]){if(!ae.test(Se))throw new Error(`Invalid JSON-pointer: ${Se}`);Fe=Se,lt=M.default.rootData}else{const tt=fe.exec(Se);if(!tt)throw new Error(`Invalid JSON-pointer: ${Se}`);const nt=+tt[1];if(Fe=tt[2],"#"===Fe){if(nt>=ce)throw new Error(Kt("property/index",nt));return Pe[ce-nt]}if(nt>ce)throw new Error(Kt("data",nt));if(lt=be[ce-nt],!Fe)return lt}let Ge=lt;const He=Fe.split("/");for(const tt of He)tt&&(lt=b._`${lt}${(0,b.getProperty)((0,A.unescapeJsonPointer)(tt))}`,Ge=b._`${Ge} && ${lt}`);return Ge;function Kt(tt,nt){return`Cannot access ${tt} ${nt} levels up, current level is ${ce}`}}u.getData=pe},22707:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.validateKeywordUsage=u.validSchemaType=u.funcKeywordCode=u.macroKeywordCode=void 0;const p=g(56382),D=g(5976),w=g(92812),_=g(75091);function m(x){const{gen:N,data:F,it:L}=x;N.if(L.parentData,()=>N.assign(F,p._`${L.parentData}[${L.parentDataProperty}]`))}function E(x,N,F){if(void 0===F)throw new Error(`keyword "${N}" failed to compile`);return x.scopeValue("keyword","function"==typeof F?{ref:F}:{ref:F,code:(0,p.stringify)(F)})}u.macroKeywordCode=function l(x,N){const{gen:F,keyword:L,schema:z,parentSchema:j,it:W}=x,Y=N.macro.call(W.self,z,j,W),G=E(F,L,Y);!1!==W.opts.validateSchema&&W.self.validateSchema(Y,!0);const Q=F.name("valid");x.subschema({schema:Y,schemaPath:p.nil,errSchemaPath:`${W.errSchemaPath}/${L}`,topSchemaRef:G,compositeRule:!0},Q),x.pass(Q,()=>x.error(!0))},u.funcKeywordCode=function v(x,N){var F;const{gen:L,keyword:z,schema:j,parentSchema:W,$data:Y,it:G}=x;!function M({schemaEnv:x},N){if(N.async&&!x.$async)throw new Error("async keyword in sync schema")}(G,N);const Q=!Y&&N.compile?N.compile.call(G.self,j,W,G):N.validate,q=E(L,z,Q),J=L.let("valid");function o(d=(N.async?p._`await `:p.nil)){const h=G.opts.passContext?D.default.this:D.default.self,S=!("compile"in N&&!Y||!1===N.schema);L.assign(J,p._`${d}${(0,w.callValidateCode)(x,q,h,S)}`,N.modifying)}function s(d){var h;L.if((0,p.not)(null!==(h=N.valid)&&void 0!==h?h:J),d)}x.block$data(J,function H(){if(!1===N.errors)o(),N.modifying&&m(x),s(()=>x.error());else{const d=N.async?function te(){const d=L.let("ruleErrs",null);return L.try(()=>o(p._`await `),h=>L.assign(J,!1).if(p._`${h} instanceof ${G.ValidationError}`,()=>L.assign(d,p._`${h}.errors`),()=>L.throw(h))),d}():function C(){const d=p._`${q}.errors`;return L.assign(d,null),o(p.nil),d}();N.modifying&&m(x),s(()=>function b(x,N){const{gen:F}=x;F.if(p._`Array.isArray(${N})`,()=>{F.assign(D.default.vErrors,p._`${D.default.vErrors} === null ? ${N} : ${D.default.vErrors}.concat(${N})`).assign(D.default.errors,p._`${D.default.vErrors}.length`),(0,_.extendErrors)(x)},()=>x.error())}(x,d))}}),x.ok(null!==(F=N.valid)&&void 0!==F?F:J)},u.validSchemaType=function A(x,N,F=!1){return!N.length||N.some(L=>"array"===L?Array.isArray(x):"object"===L?x&&"object"==typeof x&&!Array.isArray(x):typeof x==L||F&&typeof x>"u")},u.validateKeywordUsage=function P({schema:x,opts:N,self:F,errSchemaPath:L},z,j){if(Array.isArray(z.keyword)?!z.keyword.includes(j):z.keyword!==j)throw new Error("ajv implementation error");const W=z.dependencies;if(W?.some(Y=>!Object.prototype.hasOwnProperty.call(x,Y)))throw new Error(`parent schema must have dependencies of ${j}: ${W.join(",")}`);if(z.validateSchema&&!z.validateSchema(x[j])){const G=`keyword "${j}" value is invalid at path "${L}": `+F.errorsText(z.validateSchema.errors);if("log"!==N.validateSchema)throw new Error(G);F.logger.error(G)}}},62639:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.extendSubschemaMode=u.extendSubschemaData=u.getSubschema=void 0;const p=g(56382),D=g(97990);u.getSubschema=function w(v,{keyword:m,schemaProp:b,schema:M,schemaPath:E,errSchemaPath:A,topSchemaRef:P}){if(void 0!==m&&void 0!==M)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==m){const x=v.schema[m];return void 0===b?{schema:x,schemaPath:p._`${v.schemaPath}${(0,p.getProperty)(m)}`,errSchemaPath:`${v.errSchemaPath}/${m}`}:{schema:x[b],schemaPath:p._`${v.schemaPath}${(0,p.getProperty)(m)}${(0,p.getProperty)(b)}`,errSchemaPath:`${v.errSchemaPath}/${m}/${(0,D.escapeFragment)(b)}`}}if(void 0!==M){if(void 0===E||void 0===A||void 0===P)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:M,schemaPath:E,topSchemaRef:P,errSchemaPath:A}}throw new Error('either "keyword" or "schema" must be passed')},u.extendSubschemaData=function _(v,m,{dataProp:b,dataPropType:M,data:E,dataTypes:A,propertyName:P}){if(void 0!==E&&void 0!==b)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:x}=m;if(void 0!==b){const{errorPath:F,dataPathArr:L,opts:z}=m;N(x.let("data",p._`${m.data}${(0,p.getProperty)(b)}`,!0)),v.errorPath=p.str`${F}${(0,D.getErrorPath)(b,M,z.jsPropertySyntax)}`,v.parentDataProperty=p._`${b}`,v.dataPathArr=[...L,v.parentDataProperty]}if(void 0!==E){N(E instanceof p.Name?E:x.let("data",E,!0)),void 0!==P&&(v.propertyName=P)}function N(F){v.data=F,v.dataLevel=m.dataLevel+1,v.dataTypes=[],m.definedProperties=new Set,v.parentData=m.data,v.dataNames=[...m.dataNames,F]}A&&(v.dataTypes=A)},u.extendSubschemaMode=function l(v,{jtdDiscriminator:m,jtdMetadata:b,compositeRule:M,createErrors:E,allErrors:A}){void 0!==M&&(v.compositeRule=M),void 0!==E&&(v.createErrors=E),void 0!==A&&(v.allErrors=A),v.jtdDiscriminator=m,v.jtdMetadata=b}},25910:(re,u,g)=>{"use strict";var p=g(59344).default;Object.defineProperty(u,"__esModule",{value:!0}),u.CodeGen=u.Name=u.nil=u.stringify=u.str=u._=u.KeywordCxt=void 0;var D=g(66764);Object.defineProperty(u,"KeywordCxt",{enumerable:!0,get:function(){return D.KeywordCxt}});var w=g(56382);Object.defineProperty(u,"_",{enumerable:!0,get:function(){return w._}}),Object.defineProperty(u,"str",{enumerable:!0,get:function(){return w.str}}),Object.defineProperty(u,"stringify",{enumerable:!0,get:function(){return w.stringify}}),Object.defineProperty(u,"nil",{enumerable:!0,get:function(){return w.nil}}),Object.defineProperty(u,"Name",{enumerable:!0,get:function(){return w.Name}}),Object.defineProperty(u,"CodeGen",{enumerable:!0,get:function(){return w.CodeGen}});const _=g(20496),l=g(80140),v=g(62848),m=g(17140),b=g(56382),M=g(31880),E=g(59078),A=g(97990),P=g(64775),x=g(51364),N=(R,se)=>new RegExp(R,se);N.code="new RegExp";const F=["removeAdditional","useDefaults","coerceTypes"],L=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),z={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},j={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},W=200;function Y(R){var se,ee,oe,de,Ce,ye,ve,ae,fe,pe,Se,ce,be,Pe,Fe,lt,Ge,He,Kt,tt,nt,Vt,ot,at,Gt;const Re=R.strict,Ae=null===(se=R.code)||void 0===se?void 0:se.optimize,Te=!0===Ae||void 0===Ae?1:Ae||0,Be=null!==(oe=null===(ee=R.code)||void 0===ee?void 0:ee.regExp)&&void 0!==oe?oe:N,Ve=null!==(de=R.uriResolver)&&void 0!==de?de:x.default;return{strictSchema:null===(ye=null!==(Ce=R.strictSchema)&&void 0!==Ce?Ce:Re)||void 0===ye||ye,strictNumbers:null===(ae=null!==(ve=R.strictNumbers)&&void 0!==ve?ve:Re)||void 0===ae||ae,strictTypes:null!==(pe=null!==(fe=R.strictTypes)&&void 0!==fe?fe:Re)&&void 0!==pe?pe:"log",strictTuples:null!==(ce=null!==(Se=R.strictTuples)&&void 0!==Se?Se:Re)&&void 0!==ce?ce:"log",strictRequired:null!==(Pe=null!==(be=R.strictRequired)&&void 0!==be?be:Re)&&void 0!==Pe&&Pe,code:R.code?{...R.code,optimize:Te,regExp:Be}:{optimize:Te,regExp:Be},loopRequired:null!==(Fe=R.loopRequired)&&void 0!==Fe?Fe:W,loopEnum:null!==(lt=R.loopEnum)&&void 0!==lt?lt:W,meta:null===(Ge=R.meta)||void 0===Ge||Ge,messages:null===(He=R.messages)||void 0===He||He,inlineRefs:null===(Kt=R.inlineRefs)||void 0===Kt||Kt,schemaId:null!==(tt=R.schemaId)&&void 0!==tt?tt:"$id",addUsedSchema:null===(nt=R.addUsedSchema)||void 0===nt||nt,validateSchema:null===(Vt=R.validateSchema)||void 0===Vt||Vt,validateFormats:null===(ot=R.validateFormats)||void 0===ot||ot,unicodeRegExp:null===(at=R.unicodeRegExp)||void 0===at||at,int32range:null===(Gt=R.int32range)||void 0===Gt||Gt,uriResolver:Ve}}class G{constructor(se={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,se=this.opts={...se,...Y(se)};const{es5:ee,lines:oe}=this.opts.code;this.scope=new b.ValueScope({scope:{},prefixes:L,es5:ee,lines:oe}),this.logger=function s(R){if(!1===R)return o;if(void 0===R)return console;if(R.log&&R.warn&&R.error)return R;throw new Error("logger must implement log, warn and error methods")}(se.logger);const de=se.validateFormats;se.validateFormats=!1,this.RULES=(0,v.getRules)(),Q.call(this,z,se,"NOT SUPPORTED"),Q.call(this,j,se,"DEPRECATED","warn"),this._metaOpts=C.call(this),se.formats&&H.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),se.keywords&&te.call(this,se.keywords),"object"==typeof se.meta&&this.addMetaSchema(se.meta),J.call(this),se.validateFormats=de}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:se,meta:ee,schemaId:oe}=this.opts;let de=P;"id"===oe&&(de={...P},de.id=de.$id,delete de.$id),ee&&se&&this.addMetaSchema(de,de[oe],!1)}defaultMeta(){const{meta:se,schemaId:ee}=this.opts;return this.opts.defaultMeta="object"==typeof se?se[ee]||se:void 0}validate(se,ee){let oe;if("string"==typeof se){if(oe=this.getSchema(se),!oe)throw new Error(`no schema with key or ref "${se}"`)}else oe=this.compile(se);const de=oe(ee);return"$async"in oe||(this.errors=oe.errors),de}compile(se,ee){const oe=this._addSchema(se,ee);return oe.validate||this._compileSchemaEnv(oe)}compileAsync(se,ee){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:oe}=this.opts;return de.call(this,se,ee);function de(Fe,lt){return Ce.apply(this,arguments)}function Ce(){return(Ce=p(function*(Fe,lt){yield ye.call(this,Fe.$schema);const Ge=this._addSchema(Fe,lt);return Ge.validate||ae.call(this,Ge)})).apply(this,arguments)}function ye(Fe){return ve.apply(this,arguments)}function ve(){return(ve=p(function*(Fe){Fe&&!this.getSchema(Fe)&&(yield de.call(this,{$ref:Fe},!0))})).apply(this,arguments)}function ae(Fe){return fe.apply(this,arguments)}function fe(){return(fe=p(function*(Fe){try{return this._compileSchemaEnv(Fe)}catch(lt){if(!(lt instanceof l.default))throw lt;return pe.call(this,lt),yield Se.call(this,lt.missingSchema),ae.call(this,Fe)}})).apply(this,arguments)}function pe({missingSchema:Fe,missingRef:lt}){if(this.refs[Fe])throw new Error(`AnySchema ${Fe} is loaded but ${lt} cannot be resolved`)}function Se(Fe){return ce.apply(this,arguments)}function ce(){return(ce=p(function*(Fe){const lt=yield be.call(this,Fe);this.refs[Fe]||(yield ye.call(this,lt.$schema)),this.refs[Fe]||this.addSchema(lt,Fe,ee)})).apply(this,arguments)}function be(Fe){return Pe.apply(this,arguments)}function Pe(){return(Pe=p(function*(Fe){const lt=this._loading[Fe];if(lt)return lt;try{return yield this._loading[Fe]=oe(Fe)}finally{delete this._loading[Fe]}})).apply(this,arguments)}}addSchema(se,ee,oe,de=this.opts.validateSchema){if(Array.isArray(se)){for(const ye of se)this.addSchema(ye,void 0,oe,de);return this}let Ce;if("object"==typeof se){const{schemaId:ye}=this.opts;if(Ce=se[ye],void 0!==Ce&&"string"!=typeof Ce)throw new Error(`schema ${ye} must be string`)}return ee=(0,M.normalizeId)(ee||Ce),this._checkUnique(ee),this.schemas[ee]=this._addSchema(se,oe,ee,de,!0),this}addMetaSchema(se,ee,oe=this.opts.validateSchema){return this.addSchema(se,ee,!0,oe),this}validateSchema(se,ee){if("boolean"==typeof se)return!0;let oe;if(oe=se.$schema,void 0!==oe&&"string"!=typeof oe)throw new Error("$schema must be a string");if(oe=oe||this.opts.defaultMeta||this.defaultMeta(),!oe)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const de=this.validate(oe,se);if(!de&&ee){const Ce="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(Ce);this.logger.error(Ce)}return de}getSchema(se){let ee;for(;"string"==typeof(ee=q.call(this,se));)se=ee;if(void 0===ee){const{schemaId:oe}=this.opts,de=new m.SchemaEnv({schema:{},schemaId:oe});if(ee=m.resolveSchema.call(this,de,se),!ee)return;this.refs[se]=ee}return ee.validate||this._compileSchemaEnv(ee)}removeSchema(se){if(se instanceof RegExp)return this._removeAllSchemas(this.schemas,se),this._removeAllSchemas(this.refs,se),this;switch(typeof se){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ee=q.call(this,se);return"object"==typeof ee&&this._cache.delete(ee.schema),delete this.schemas[se],delete this.refs[se],this}case"object":{const ee=se;this._cache.delete(ee);let oe=se[this.opts.schemaId];return oe&&(oe=(0,M.normalizeId)(oe),delete this.schemas[oe],delete this.refs[oe]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(se){for(const ee of se)this.addKeyword(ee);return this}addKeyword(se,ee){let oe;if("string"==typeof se)oe=se,"object"==typeof ee&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ee.keyword=oe);else{if("object"!=typeof se||void 0!==ee)throw new Error("invalid addKeywords parameters");if(oe=(ee=se).keyword,Array.isArray(oe)&&!oe.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(h.call(this,oe,ee),!ee)return(0,A.eachItem)(oe,Ce=>S.call(this,Ce)),this;B.call(this,ee);const de={...ee,type:(0,E.getJSONTypes)(ee.type),schemaType:(0,E.getJSONTypes)(ee.schemaType)};return(0,A.eachItem)(oe,0===de.type.length?Ce=>S.call(this,Ce,de):Ce=>de.type.forEach(ye=>S.call(this,Ce,de,ye))),this}getKeyword(se){const ee=this.RULES.all[se];return"object"==typeof ee?ee.definition:!!ee}removeKeyword(se){const{RULES:ee}=this;delete ee.keywords[se],delete ee.all[se];for(const oe of ee.rules){const de=oe.rules.findIndex(Ce=>Ce.keyword===se);de>=0&&oe.rules.splice(de,1)}return this}addFormat(se,ee){return"string"==typeof ee&&(ee=new RegExp(ee)),this.formats[se]=ee,this}errorsText(se=this.errors,{separator:ee=", ",dataVar:oe="data"}={}){return se&&0!==se.length?se.map(de=>`${oe}${de.instancePath} ${de.message}`).reduce((de,Ce)=>de+ee+Ce):"No errors"}$dataMetaSchema(se,ee){const oe=this.RULES.all;se=JSON.parse(JSON.stringify(se));for(const de of ee){const Ce=de.split("/").slice(1);let ye=se;for(const ve of Ce)ye=ye[ve];for(const ve in oe){const ae=oe[ve];if("object"!=typeof ae)continue;const{$data:fe}=ae.definition,pe=ye[ve];fe&&pe&&(ye[ve]=f(pe))}}return se}_removeAllSchemas(se,ee){for(const oe in se){const de=se[oe];(!ee||ee.test(oe))&&("string"==typeof de?delete se[oe]:de&&!de.meta&&(this._cache.delete(de.schema),delete se[oe]))}}_addSchema(se,ee,oe,de=this.opts.validateSchema,Ce=this.opts.addUsedSchema){let ye;const{schemaId:ve}=this.opts;if("object"==typeof se)ye=se[ve];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof se)throw new Error("schema must be object or boolean")}let ae=this._cache.get(se);if(void 0!==ae)return ae;oe=(0,M.normalizeId)(ye||oe);const fe=M.getSchemaRefs.call(this,se,oe);return ae=new m.SchemaEnv({schema:se,schemaId:ve,meta:ee,baseId:oe,localRefs:fe}),this._cache.set(ae.schema,ae),Ce&&!oe.startsWith("#")&&(oe&&this._checkUnique(oe),this.refs[oe]=ae),de&&this.validateSchema(se,!0),ae}_checkUnique(se){if(this.schemas[se]||this.refs[se])throw new Error(`schema with key or id "${se}" already exists`)}_compileSchemaEnv(se){if(se.meta?this._compileMetaSchema(se):m.compileSchema.call(this,se),!se.validate)throw new Error("ajv implementation error");return se.validate}_compileMetaSchema(se){const ee=this.opts;this.opts=this._metaOpts;try{m.compileSchema.call(this,se)}finally{this.opts=ee}}}function Q(R,se,ee,oe="error"){for(const de in R){const Ce=de;Ce in se&&this.logger[oe](`${ee}: option ${de}. ${R[Ce]}`)}}function q(R){return R=(0,M.normalizeId)(R),this.schemas[R]||this.refs[R]}function J(){const R=this.opts.schemas;if(R)if(Array.isArray(R))this.addSchema(R);else for(const se in R)this.addSchema(R[se],se)}function H(){for(const R in this.opts.formats){const se=this.opts.formats[R];se&&this.addFormat(R,se)}}function te(R){if(Array.isArray(R))this.addVocabulary(R);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const se in R){const ee=R[se];ee.keyword||(ee.keyword=se),this.addKeyword(ee)}}}function C(){const R={...this.opts};for(const se of F)delete R[se];return R}u.default=G,G.ValidationError=_.default,G.MissingRefError=l.default;const o={log(){},warn(){},error(){}};const d=/^[a-z_$][a-z0-9_$:-]*$/i;function h(R,se){const{RULES:ee}=this;if((0,A.eachItem)(R,oe=>{if(ee.keywords[oe])throw new Error(`Keyword ${oe} is already defined`);if(!d.test(oe))throw new Error(`Keyword ${oe} has invalid name`)}),se&&se.$data&&!("code"in se)&&!("validate"in se))throw new Error('$data keyword must have "code" or "validate" function')}function S(R,se,ee){var oe;const de=se?.post;if(ee&&de)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:Ce}=this;let ye=de?Ce.post:Ce.rules.find(({type:ae})=>ae===ee);if(ye||(ye={type:ee,rules:[]},Ce.rules.push(ye)),Ce.keywords[R]=!0,!se)return;const ve={keyword:R,definition:{...se,type:(0,E.getJSONTypes)(se.type),schemaType:(0,E.getJSONTypes)(se.schemaType)}};se.before?k.call(this,ye,ve,se.before):ye.rules.push(ve),Ce.all[R]=ve,null===(oe=se.implements)||void 0===oe||oe.forEach(ae=>this.addKeyword(ae))}function k(R,se,ee){const oe=R.rules.findIndex(de=>de.keyword===ee);oe>=0?R.rules.splice(oe,0,se):(R.rules.push(se),this.logger.warn(`rule ${ee} is not defined`))}function B(R){let{metaSchema:se}=R;void 0!==se&&(R.$data&&this.opts.$data&&(se=f(se)),R.validateSchema=this.compile(se,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function f(R){return{anyOf:[R,I]}}},40834:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(12559);p.code='require("ajv/dist/runtime/equal").default',u.default=p},26344:(re,u)=>{"use strict";function g(p){const D=p.length;let l,w=0,_=0;for(;_=55296&&l<=56319&&_{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(96482);p.code='require("ajv/dist/runtime/uri").default',u.default=p},20496:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});class g extends Error{constructor(D){super("validation failed"),this.errors=D,this.ajv=this.validation=!0}}u.default=g},29282:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.validateAdditionalItems=void 0;const p=g(56382),D=g(97990),_={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:v}})=>p.str`must NOT have more than ${v} items`,params:({params:{len:v}})=>p._`{limit: ${v}}`},code(v){const{parentSchema:m,it:b}=v,{items:M}=m;Array.isArray(M)?l(v,M):(0,D.checkStrictMode)(b,'"additionalItems" is ignored when "items" is not an array of schemas')}};function l(v,m){const{gen:b,schema:M,data:E,keyword:A,it:P}=v;P.items=!0;const x=b.const("len",p._`${E}.length`);if(!1===M)v.setParams({len:m.length}),v.pass(p._`${x} <= ${m.length}`);else if("object"==typeof M&&!(0,D.alwaysValidSchema)(P,M)){const F=b.var("valid",p._`${x} <= ${m.length}`);b.if((0,p.not)(F),()=>function N(F){b.forRange("i",m.length,x,L=>{v.subschema({keyword:A,dataProp:L,dataPropType:D.Type.Num},F),P.allErrors||b.if((0,p.not)(F),()=>b.break())})}(F)),v.ok(F)}}u.validateAdditionalItems=l,u.default=_},75459:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(92812),D=g(56382),w=g(5976),_=g(97990),v={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:m})=>D._`{additionalProperty: ${m.additionalProperty}}`},code(m){const{gen:b,schema:M,parentSchema:E,data:A,errsCount:P,it:x}=m;if(!P)throw new Error("ajv implementation error");const{allErrors:N,opts:F}=x;if(x.props=!0,"all"!==F.removeAdditional&&(0,_.alwaysValidSchema)(x,M))return;const L=(0,p.allSchemaProperties)(E.properties),z=(0,p.allSchemaProperties)(E.patternProperties);function Y(q){b.code(D._`delete ${A}[${q}]`)}function G(q){if("all"===F.removeAdditional||F.removeAdditional&&!1===M)Y(q);else{if(!1===M)return m.setParams({additionalProperty:q}),m.error(),void(N||b.break());if("object"==typeof M&&!(0,_.alwaysValidSchema)(x,M)){const J=b.name("valid");"failing"===F.removeAdditional?(Q(q,J,!1),b.if((0,D.not)(J),()=>{m.reset(),Y(q)})):(Q(q,J),N||b.if((0,D.not)(J),()=>b.break()))}}}function Q(q,J,H){const te={keyword:"additionalProperties",dataProp:q,dataPropType:_.Type.Str};!1===H&&Object.assign(te,{compositeRule:!0,createErrors:!1,allErrors:!1}),m.subschema(te,J)}(function j(){b.forIn("key",A,q=>{L.length||z.length?b.if(function W(q){let J;if(L.length>8){const H=(0,_.schemaRefOrVal)(x,E.properties,"properties");J=(0,p.isOwnProperty)(b,H,q)}else J=L.length?(0,D.or)(...L.map(H=>D._`${q} === ${H}`)):D.nil;return z.length&&(J=(0,D.or)(J,...z.map(H=>D._`${(0,p.usePattern)(m,H)}.test(${q})`))),(0,D.not)(J)}(q),()=>G(q)):G(q)})})(),m.ok(D._`${P} === ${w.default.errors}`)}};u.default=v},46186:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(97990),D={keyword:"allOf",schemaType:"array",code(w){const{gen:_,schema:l,it:v}=w;if(!Array.isArray(l))throw new Error("ajv implementation error");const m=_.name("valid");l.forEach((b,M)=>{if((0,p.alwaysValidSchema)(v,b))return;const E=w.subschema({keyword:"allOf",schemaProp:M},m);w.ok(m),w.mergeEvaluated(E)})}};u.default=D},60290:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const D={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:g(92812).validateUnion,error:{message:"must match a schema in anyOf"}};u.default=D},25738:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D=g(97990),_={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:l,max:v}})=>void 0===v?p.str`must contain at least ${l} valid item(s)`:p.str`must contain at least ${l} and no more than ${v} valid item(s)`,params:({params:{min:l,max:v}})=>void 0===v?p._`{minContains: ${l}}`:p._`{minContains: ${l}, maxContains: ${v}}`},code(l){const{gen:v,schema:m,parentSchema:b,data:M,it:E}=l;let A,P;const{minContains:x,maxContains:N}=b;E.opts.next?(A=void 0===x?1:x,P=N):A=1;const F=v.const("len",p._`${M}.length`);if(l.setParams({min:A,max:P}),void 0===P&&0===A)return void(0,D.checkStrictMode)(E,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==P&&A>P)return(0,D.checkStrictMode)(E,'"minContains" > "maxContains" is always invalid'),void l.fail();if((0,D.alwaysValidSchema)(E,m)){let Y=p._`${F} >= ${A}`;return void 0!==P&&(Y=p._`${Y} && ${F} <= ${P}`),void l.pass(Y)}E.items=!0;const L=v.name("valid");function z(){const Y=v.name("_valid"),G=v.let("count",0);j(Y,()=>v.if(Y,()=>function W(Y){v.code(p._`${Y}++`),void 0===P?v.if(p._`${Y} >= ${A}`,()=>v.assign(L,!0).break()):(v.if(p._`${Y} > ${P}`,()=>v.assign(L,!1).break()),1===A?v.assign(L,!0):v.if(p._`${Y} >= ${A}`,()=>v.assign(L,!0)))}(G)))}function j(Y,G){v.forRange("i",0,F,Q=>{l.subschema({keyword:"contains",dataProp:Q,dataPropType:D.Type.Num,compositeRule:!0},Y),G()})}void 0===P&&1===A?j(L,()=>v.if(L,()=>v.break())):0===A?(v.let(L,!0),void 0!==P&&v.if(p._`${M}.length > 0`,z)):(v.let(L,!1),z()),l.result(L,()=>l.reset())}};u.default=_},1886:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.validateSchemaDeps=u.validatePropertyDeps=u.error=void 0;const p=g(56382),D=g(97990),w=g(92812);u.error={message:({params:{property:b,depsCount:M,deps:E}})=>{const A=1===M?"property":"properties";return p.str`must have ${A} ${E} when property ${b} is present`},params:({params:{property:b,depsCount:M,deps:E,missingProperty:A}})=>p._`{property: ${b}, + missingProperty: ${A}, + depsCount: ${M}, + deps: ${E}}`};const _={keyword:"dependencies",type:"object",schemaType:"object",error:u.error,code(b){const[M,E]=function l({schema:b}){const M={},E={};for(const A in b){if("__proto__"===A)continue;(Array.isArray(b[A])?M:E)[A]=b[A]}return[M,E]}(b);v(b,M),m(b,E)}};function v(b,M=b.schema){const{gen:E,data:A,it:P}=b;if(0===Object.keys(M).length)return;const x=E.let("missing");for(const N in M){const F=M[N];if(0===F.length)continue;const L=(0,w.propertyInData)(E,A,N,P.opts.ownProperties);b.setParams({property:N,depsCount:F.length,deps:F.join(", ")}),P.allErrors?E.if(L,()=>{for(const z of F)(0,w.checkReportMissingProp)(b,z)}):(E.if(p._`${L} && (${(0,w.checkMissingProp)(b,F,x)})`),(0,w.reportMissingProp)(b,x),E.else())}}function m(b,M=b.schema){const{gen:E,data:A,keyword:P,it:x}=b,N=E.name("valid");for(const F in M)(0,D.alwaysValidSchema)(x,M[F])||(E.if((0,w.propertyInData)(E,A,F,x.opts.ownProperties),()=>{const L=b.subschema({keyword:P,schemaProp:F},N);b.mergeValidEvaluated(L,N)},()=>E.var(N,!0)),b.ok(N))}u.validatePropertyDeps=v,u.validateSchemaDeps=m,u.default=_},43632:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D=g(97990),_={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:v})=>p.str`must match "${v.ifClause}" schema`,params:({params:v})=>p._`{failingKeyword: ${v.ifClause}}`},code(v){const{gen:m,parentSchema:b,it:M}=v;void 0===b.then&&void 0===b.else&&(0,D.checkStrictMode)(M,'"if" without "then" and "else" is ignored');const E=l(M,"then"),A=l(M,"else");if(!E&&!A)return;const P=m.let("valid",!0),x=m.name("_valid");if(function N(){const L=v.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},x);v.mergeEvaluated(L)}(),v.reset(),E&&A){const L=m.let("ifClause");v.setParams({ifClause:L}),m.if(x,F("then",L),F("else",L))}else E?m.if(x,F("then")):m.if((0,p.not)(x),F("else"));function F(L,z){return()=>{const j=v.subschema({keyword:L},x);m.assign(P,x),v.mergeValidEvaluated(j,P),z?m.assign(z,p._`${L}`):v.setParams({ifClause:L})}}v.pass(P,()=>v.error(!0))}};function l(v,m){const b=v.schema[m];return void 0!==b&&!(0,D.alwaysValidSchema)(v,b)}u.default=_},17737:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(29282),D=g(84947),w=g(69180),_=g(41785),l=g(25738),v=g(1886),m=g(37947),b=g(75459),M=g(68415),E=g(50896),A=g(36330),P=g(60290),x=g(92337),N=g(46186),F=g(43632),L=g(71344);u.default=function z(j=!1){const W=[A.default,P.default,x.default,N.default,F.default,L.default,m.default,b.default,v.default,M.default,E.default];return j?W.push(D.default,_.default):W.push(p.default,w.default),W.push(l.default),W}},69180:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.validateTuple=void 0;const p=g(56382),D=g(97990),w=g(92812),_={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(v){const{schema:m,it:b}=v;if(Array.isArray(m))return l(v,"additionalItems",m);b.items=!0,!(0,D.alwaysValidSchema)(b,m)&&v.ok((0,w.validateArray)(v))}};function l(v,m,b=v.schema){const{gen:M,parentSchema:E,data:A,keyword:P,it:x}=v;(function L(z){const{opts:j,errSchemaPath:W}=x,Y=b.length,G=Y===z.minItems&&(Y===z.maxItems||!1===z[m]);if(j.strictTuples&&!G){const Q=`"${P}" is ${Y}-tuple, but minItems or maxItems/${m} are not specified or different at path "${W}"`;(0,D.checkStrictMode)(x,Q,j.strictTuples)}})(E),x.opts.unevaluated&&b.length&&!0!==x.items&&(x.items=D.mergeEvaluated.items(M,b.length,x.items));const N=M.name("valid"),F=M.const("len",p._`${A}.length`);b.forEach((z,j)=>{(0,D.alwaysValidSchema)(x,z)||(M.if(p._`${F} > ${j}`,()=>v.subschema({keyword:P,schemaProp:j,dataProp:j},N)),v.ok(N))})}u.validateTuple=l,u.default=_},41785:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D=g(97990),w=g(92812),_=g(29282),v={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:m}})=>p.str`must NOT have more than ${m} items`,params:({params:{len:m}})=>p._`{limit: ${m}}`},code(m){const{schema:b,parentSchema:M,it:E}=m,{prefixItems:A}=M;E.items=!0,!(0,D.alwaysValidSchema)(E,b)&&(A?(0,_.validateAdditionalItems)(m,A):m.ok((0,w.validateArray)(m)))}};u.default=v},36330:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(97990),D={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(w){const{gen:_,schema:l,it:v}=w;if((0,p.alwaysValidSchema)(v,l))return void w.fail();const m=_.name("valid");w.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},m),w.failResult(m,()=>w.reset(),()=>w.error())},error:{message:"must NOT be valid"}};u.default=D},92337:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D=g(97990),_={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:l})=>p._`{passingSchemas: ${l.passing}}`},code(l){const{gen:v,schema:m,parentSchema:b,it:M}=l;if(!Array.isArray(m))throw new Error("ajv implementation error");if(M.opts.discriminator&&b.discriminator)return;const E=m,A=v.let("valid",!1),P=v.let("passing",null),x=v.name("_valid");l.setParams({passing:P}),v.block(function N(){E.forEach((F,L)=>{let z;(0,D.alwaysValidSchema)(M,F)?v.var(x,!0):z=l.subschema({keyword:"oneOf",schemaProp:L,compositeRule:!0},x),L>0&&v.if(p._`${x} && ${A}`).assign(A,!1).assign(P,p._`[${P}, ${L}]`).else(),v.if(x,()=>{v.assign(A,!0),v.assign(P,L),z&&l.mergeEvaluated(z,p.Name)})})}),l.result(A,()=>l.reset(),()=>l.error(!0))}};u.default=_},50896:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(92812),D=g(56382),w=g(97990),_=g(97990),l={keyword:"patternProperties",type:"object",schemaType:"object",code(v){const{gen:m,schema:b,data:M,parentSchema:E,it:A}=v,{opts:P}=A,x=(0,p.allSchemaProperties)(b),N=x.filter(G=>(0,w.alwaysValidSchema)(A,b[G]));if(0===x.length||N.length===x.length&&(!A.opts.unevaluated||!0===A.props))return;const F=P.strictSchema&&!P.allowMatchingProperties&&E.properties,L=m.name("valid");!0!==A.props&&!(A.props instanceof D.Name)&&(A.props=(0,_.evaluatedPropsToName)(m,A.props));const{props:z}=A;function W(G){for(const Q in F)new RegExp(G).test(Q)&&(0,w.checkStrictMode)(A,`property ${Q} matches pattern ${G} (use allowMatchingProperties)`)}function Y(G){m.forIn("key",M,Q=>{m.if(D._`${(0,p.usePattern)(v,G)}.test(${Q})`,()=>{const q=N.includes(G);q||v.subschema({keyword:"patternProperties",schemaProp:G,dataProp:Q,dataPropType:_.Type.Str},L),A.opts.unevaluated&&!0!==z?m.assign(D._`${z}[${Q}]`,!0):!q&&!A.allErrors&&m.if((0,D.not)(L),()=>m.break())})})}!function j(){for(const G of x)F&&W(G),A.allErrors?Y(G):(m.var(L,!0),Y(G),m.if(L))}()}};u.default=l},84947:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(69180),D={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:w=>(0,p.validateTuple)(w,"items")};u.default=D},68415:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(66764),D=g(92812),w=g(97990),_=g(75459),l={keyword:"properties",type:"object",schemaType:"object",code(v){const{gen:m,schema:b,parentSchema:M,data:E,it:A}=v;"all"===A.opts.removeAdditional&&void 0===M.additionalProperties&&_.default.code(new p.KeywordCxt(A,_.default,"additionalProperties"));const P=(0,D.allSchemaProperties)(b);for(const z of P)A.definedProperties.add(z);A.opts.unevaluated&&P.length&&!0!==A.props&&(A.props=w.mergeEvaluated.props(m,(0,w.toHash)(P),A.props));const x=P.filter(z=>!(0,w.alwaysValidSchema)(A,b[z]));if(0===x.length)return;const N=m.name("valid");for(const z of x)F(z)?L(z):(m.if((0,D.propertyInData)(m,E,z,A.opts.ownProperties)),L(z),A.allErrors||m.else().var(N,!0),m.endIf()),v.it.definedProperties.add(z),v.ok(N);function F(z){return A.opts.useDefaults&&!A.compositeRule&&void 0!==b[z].default}function L(z){v.subschema({keyword:"properties",schemaProp:z,dataProp:z},N)}}};u.default=l},37947:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D=g(97990),_={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:l})=>p._`{propertyName: ${l.propertyName}}`},code(l){const{gen:v,schema:m,data:b,it:M}=l;if((0,D.alwaysValidSchema)(M,m))return;const E=v.name("valid");v.forIn("key",b,A=>{l.setParams({propertyName:A}),l.subschema({keyword:"propertyNames",data:A,dataTypes:["string"],propertyName:A,compositeRule:!0},E),v.if((0,p.not)(E),()=>{l.error(!0),M.allErrors||v.break()})}),l.ok(E)}};u.default=_},71344:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(97990),D={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:w,parentSchema:_,it:l}){void 0===_.if&&(0,p.checkStrictMode)(l,`"${w}" without "if" is ignored`)}};u.default=D},92812:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.validateUnion=u.validateArray=u.usePattern=u.callValidateCode=u.schemaProperties=u.allSchemaProperties=u.noPropertyInData=u.propertyInData=u.isOwnProperty=u.hasPropFunc=u.reportMissingProp=u.checkMissingProp=u.checkReportMissingProp=void 0;const p=g(56382),D=g(97990),w=g(5976),_=g(97990);function b(W){return W.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:p._`Object.prototype.hasOwnProperty`})}function M(W,Y,G){return p._`${b(W)}.call(${Y}, ${G})`}function A(W,Y,G,Q){const q=p._`${Y}${(0,p.getProperty)(G)} === undefined`;return Q?(0,p.or)(q,(0,p.not)(M(W,Y,G))):q}function P(W){return W?Object.keys(W).filter(Y=>"__proto__"!==Y):[]}u.checkReportMissingProp=function l(W,Y){const{gen:G,data:Q,it:q}=W;G.if(A(G,Q,Y,q.opts.ownProperties),()=>{W.setParams({missingProperty:p._`${Y}`},!0),W.error()})},u.checkMissingProp=function v({gen:W,data:Y,it:{opts:G}},Q,q){return(0,p.or)(...Q.map(J=>(0,p.and)(A(W,Y,J,G.ownProperties),p._`${q} = ${J}`)))},u.reportMissingProp=function m(W,Y){W.setParams({missingProperty:Y},!0),W.error()},u.hasPropFunc=b,u.isOwnProperty=M,u.propertyInData=function E(W,Y,G,Q){const q=p._`${Y}${(0,p.getProperty)(G)} !== undefined`;return Q?p._`${q} && ${M(W,Y,G)}`:q},u.noPropertyInData=A,u.allSchemaProperties=P,u.schemaProperties=function x(W,Y){return P(Y).filter(G=>!(0,D.alwaysValidSchema)(W,Y[G]))},u.callValidateCode=function N({schemaCode:W,data:Y,it:{gen:G,topSchemaRef:Q,schemaPath:q,errorPath:J},it:H},te,C,o){const s=o?p._`${W}, ${Y}, ${Q}${q}`:Y,d=[[w.default.instancePath,(0,p.strConcat)(w.default.instancePath,J)],[w.default.parentData,H.parentData],[w.default.parentDataProperty,H.parentDataProperty],[w.default.rootData,w.default.rootData]];H.opts.dynamicRef&&d.push([w.default.dynamicAnchors,w.default.dynamicAnchors]);const h=p._`${s}, ${G.object(...d)}`;return C!==p.nil?p._`${te}.call(${C}, ${h})`:p._`${te}(${h})`};const F=p._`new RegExp`;u.usePattern=function L({gen:W,it:{opts:Y}},G){const Q=Y.unicodeRegExp?"u":"",{regExp:q}=Y.code,J=q(G,Q);return W.scopeValue("pattern",{key:J.toString(),ref:J,code:p._`${"new RegExp"===q.code?F:(0,_.useFunc)(W,q)}(${G}, ${Q})`})},u.validateArray=function z(W){const{gen:Y,data:G,keyword:Q,it:q}=W,J=Y.name("valid");if(q.allErrors){const te=Y.let("valid",!0);return H(()=>Y.assign(te,!1)),te}return Y.var(J,!0),H(()=>Y.break()),J;function H(te){const C=Y.const("len",p._`${G}.length`);Y.forRange("i",0,C,o=>{W.subschema({keyword:Q,dataProp:o,dataPropType:D.Type.Num},J),Y.if((0,p.not)(J),te)})}},u.validateUnion=function j(W){const{gen:Y,schema:G,keyword:Q,it:q}=W;if(!Array.isArray(G))throw new Error("ajv implementation error");if(G.some(C=>(0,D.alwaysValidSchema)(q,C))&&!q.opts.unevaluated)return;const H=Y.let("valid",!1),te=Y.name("_valid");Y.block(()=>G.forEach((C,o)=>{const s=W.subschema({keyword:Q,schemaProp:o,compositeRule:!0},te);Y.assign(H,p._`${H} || ${te}`),W.mergeValidEvaluated(s,te)||Y.if((0,p.not)(H))})),W.result(H,()=>W.reset(),()=>W.error(!0))}},11167:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const g={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};u.default=g},31093:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(11167),D=g(64703),w=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",p.default,D.default];u.default=w},64703:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.callRef=u.getValidate=void 0;const p=g(80140),D=g(92812),w=g(56382),_=g(5976),l=g(17140),v=g(97990),m={keyword:"$ref",schemaType:"string",code(E){const{gen:A,schema:P,it:x}=E,{baseId:N,schemaEnv:F,validateName:L,opts:z,self:j}=x,{root:W}=F;if(("#"===P||"#/"===P)&&N===W.baseId)return function G(){if(F===W)return M(E,L,F,F.$async);const J=A.scopeValue("root",{ref:W});return M(E,w._`${J}.validate`,W,W.$async)}();const Y=l.resolveRef.call(j,W,N,P);if(void 0===Y)throw new p.default(x.opts.uriResolver,N,P);return Y instanceof l.SchemaEnv?function Q(J){const H=b(E,J);M(E,H,J,J.$async)}(Y):function q(J){const H=A.scopeValue("schema",!0===z.code.source?{ref:J,code:(0,w.stringify)(J)}:{ref:J}),te=A.name("valid"),C=E.subschema({schema:J,dataTypes:[],schemaPath:w.nil,topSchemaRef:H,errSchemaPath:P},te);E.mergeEvaluated(C),E.ok(te)}(Y)}};function b(E,A){const{gen:P}=E;return A.validate?P.scopeValue("validate",{ref:A.validate}):w._`${P.scopeValue("wrapper",{ref:A})}.validate`}function M(E,A,P,x){const{gen:N,it:F}=E,{allErrors:L,schemaEnv:z,opts:j}=F,W=j.passContext?_.default.this:w.nil;function Q(J){const H=w._`${J}.errors`;N.assign(_.default.vErrors,w._`${_.default.vErrors} === null ? ${H} : ${_.default.vErrors}.concat(${H})`),N.assign(_.default.errors,w._`${_.default.vErrors}.length`)}function q(J){var H;if(!F.opts.unevaluated)return;const te=null===(H=P?.validate)||void 0===H?void 0:H.evaluated;if(!0!==F.props)if(te&&!te.dynamicProps)void 0!==te.props&&(F.props=v.mergeEvaluated.props(N,te.props,F.props));else{const C=N.var("props",w._`${J}.evaluated.props`);F.props=v.mergeEvaluated.props(N,C,F.props,w.Name)}if(!0!==F.items)if(te&&!te.dynamicItems)void 0!==te.items&&(F.items=v.mergeEvaluated.items(N,te.items,F.items));else{const C=N.var("items",w._`${J}.evaluated.items`);F.items=v.mergeEvaluated.items(N,C,F.items,w.Name)}}x?function Y(){if(!z.$async)throw new Error("async schema referenced by sync schema");const J=N.let("valid");N.try(()=>{N.code(w._`await ${(0,D.callValidateCode)(E,A,W)}`),q(A),L||N.assign(J,!0)},H=>{N.if(w._`!(${H} instanceof ${F.ValidationError})`,()=>N.throw(H)),Q(H),L||N.assign(J,!1)}),E.ok(J)}():function G(){E.result((0,D.callValidateCode)(E,A,W),()=>q(A),()=>Q(A))}()}u.getValidate=b,u.callRef=M,u.default=m},81849:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D=g(60797),w=g(17140),_=g(97990),v={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:m,tagName:b}})=>m===D.DiscrError.Tag?`tag "${b}" must be string`:`value of tag "${b}" must be in oneOf`,params:({params:{discrError:m,tag:b,tagName:M}})=>p._`{error: ${m}, tag: ${M}, tagValue: ${b}}`},code(m){const{gen:b,data:M,schema:E,parentSchema:A,it:P}=m,{oneOf:x}=A;if(!P.opts.discriminator)throw new Error("discriminator: requires discriminator option");const N=E.propertyName;if("string"!=typeof N)throw new Error("discriminator: requires propertyName");if(E.mapping)throw new Error("discriminator: mapping is not supported");if(!x)throw new Error("discriminator: requires oneOf keyword");const F=b.let("valid",!1),L=b.const("tag",p._`${M}${(0,p.getProperty)(N)}`);function j(Y){const G=b.name("valid"),Q=m.subschema({keyword:"oneOf",schemaProp:Y},G);return m.mergeEvaluated(Q,p.Name),G}b.if(p._`typeof ${L} == "string"`,()=>function z(){const Y=function W(){var Y;const G={},Q=J(A);let q=!0;for(let C=0;Cm.error(!1,{discrError:D.DiscrError.Tag,tag:L,tagName:N})),m.ok(F)}};u.default=v},60797:(re,u)=>{"use strict";var p;Object.defineProperty(u,"__esModule",{value:!0}),u.DiscrError=void 0,(p=u.DiscrError||(u.DiscrError={})).Tag="tag",p.Mapping="mapping"},77032:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(31093),D=g(77887),w=g(17737),_=g(57447),l=g(10760),v=[p.default,D.default,(0,w.default)(),_.default,l.metadataVocabulary,l.contentVocabulary];u.default=v},22364:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),w={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:_})=>p.str`must match format "${_}"`,params:({schemaCode:_})=>p._`{format: ${_}}`},code(_,l){const{gen:v,data:m,$data:b,schema:M,schemaCode:E,it:A}=_,{opts:P,errSchemaPath:x,schemaEnv:N,self:F}=A;P.validateFormats&&(b?function L(){const j=v.scopeValue("formats",{ref:F.formats,code:P.code.formats}),W=v.const("fDef",p._`${j}[${E}]`),Y=v.let("fType"),G=v.let("format");v.if(p._`typeof ${W} == "object" && !(${W} instanceof RegExp)`,()=>v.assign(Y,p._`${W}.type || "string"`).assign(G,p._`${W}.validate`),()=>v.assign(Y,p._`"string"`).assign(G,W)),_.fail$data((0,p.or)(function Q(){return!1===P.strictSchema?p.nil:p._`${E} && !${G}`}(),function q(){const J=N.$async?p._`(${W}.async ? await ${G}(${m}) : ${G}(${m}))`:p._`${G}(${m})`,H=p._`(typeof ${G} == "function" ? ${J} : ${G}.test(${m}))`;return p._`${G} && ${G} !== true && ${Y} === ${l} && !${H}`}()))}():function z(){const j=F.formats[M];if(!j)return void function Q(){if(!1===P.strictSchema)return void F.logger.warn(H());throw new Error(H());function H(){return`unknown format "${M}" ignored in schema at path "${x}"`}}();if(!0===j)return;const[W,Y,G]=function q(H){const te=H instanceof RegExp?(0,p.regexpCode)(H):P.code.formats?p._`${P.code.formats}${(0,p.getProperty)(M)}`:void 0,C=v.scopeValue("formats",{key:M,ref:H,code:te});return"object"!=typeof H||H instanceof RegExp?["string",H,C]:[H.type||"string",H.validate,p._`${C}.validate`]}(j);W===l&&_.pass(function J(){if("object"==typeof j&&!(j instanceof RegExp)&&j.async){if(!N.$async)throw new Error("async format in sync schema");return p._`await ${G}(${m})`}return"function"==typeof Y?p._`${G}(${m})`:p._`${G}.test(${m})`}())}())}};u.default=w},57447:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const D=[g(22364).default];u.default=D},10760:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.contentVocabulary=u.metadataVocabulary=void 0,u.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],u.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},37677:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D=g(97990),w=g(40834),l={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:v})=>p._`{allowedValue: ${v}}`},code(v){const{gen:m,data:b,$data:M,schemaCode:E,schema:A}=v;M||A&&"object"==typeof A?v.fail$data(p._`!${(0,D.useFunc)(m,w.default)}(${b}, ${E})`):v.fail(p._`${A} !== ${b}`)}};u.default=l},38373:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D=g(97990),w=g(40834),l={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:v})=>p._`{allowedValues: ${v}}`},code(v){const{gen:m,data:b,$data:M,schema:E,schemaCode:A,it:P}=v;if(!M&&0===E.length)throw new Error("enum must have non-empty array");const x=E.length>=P.opts.loopEnum;let N;const F=()=>N??(N=(0,D.useFunc)(m,w.default));let L;if(x||M)L=m.let("valid"),v.block$data(L,function z(){m.assign(L,!1),m.forOf("v",A,W=>m.if(p._`${F()}(${b}, ${W})`,()=>m.assign(L,!0).break()))});else{if(!Array.isArray(E))throw new Error("ajv implementation error");const W=m.const("vSchema",A);L=(0,p.or)(...E.map((Y,G)=>function j(W,Y){const G=E[Y];return"object"==typeof G&&null!==G?p._`${F()}(${b}, ${W}[${Y}])`:p._`${b} === ${G}`}(W,G)))}v.pass(L)}};u.default=l},77887:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(37126),D=g(52018),w=g(56230),_=g(58455),l=g(25608),v=g(70109),m=g(45132),b=g(74097),M=g(37677),E=g(38373),A=[p.default,D.default,w.default,_.default,l.default,v.default,m.default,b.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},M.default,E.default];u.default=A},45132:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),w={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:_,schemaCode:l}){const v="maxItems"===_?"more":"fewer";return p.str`must NOT have ${v} than ${l} items`},params:({schemaCode:_})=>p._`{limit: ${_}}`},code(_){const{keyword:l,data:v,schemaCode:m}=_,b="maxItems"===l?p.operators.GT:p.operators.LT;_.fail$data(p._`${v}.length ${b} ${m}`)}};u.default=w},56230:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D=g(97990),w=g(26344),l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:v,schemaCode:m}){const b="maxLength"===v?"more":"fewer";return p.str`must NOT have ${b} than ${m} characters`},params:({schemaCode:v})=>p._`{limit: ${v}}`},code(v){const{keyword:m,data:b,schemaCode:M,it:E}=v,A="maxLength"===m?p.operators.GT:p.operators.LT,P=!1===E.opts.unicode?p._`${b}.length`:p._`${(0,D.useFunc)(v.gen,w.default)}(${b})`;v.fail$data(p._`${P} ${A} ${M}`)}};u.default=l},37126:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),D=p.operators,w={maximum:{okStr:"<=",ok:D.LTE,fail:D.GT},minimum:{okStr:">=",ok:D.GTE,fail:D.LT},exclusiveMaximum:{okStr:"<",ok:D.LT,fail:D.GTE},exclusiveMinimum:{okStr:">",ok:D.GT,fail:D.LTE}},_={message:({keyword:v,schemaCode:m})=>p.str`must be ${w[v].okStr} ${m}`,params:({keyword:v,schemaCode:m})=>p._`{comparison: ${w[v].okStr}, limit: ${m}}`},l={keyword:Object.keys(w),type:"number",schemaType:"number",$data:!0,error:_,code(v){const{keyword:m,data:b,schemaCode:M}=v;v.fail$data(p._`${b} ${w[m].fail} ${M} || isNaN(${b})`)}};u.default=l},25608:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),w={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:_,schemaCode:l}){const v="maxProperties"===_?"more":"fewer";return p.str`must NOT have ${v} than ${l} properties`},params:({schemaCode:_})=>p._`{limit: ${_}}`},code(_){const{keyword:l,data:v,schemaCode:m}=_,b="maxProperties"===l?p.operators.GT:p.operators.LT;_.fail$data(p._`Object.keys(${v}).length ${b} ${m}`)}};u.default=w},52018:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(56382),w={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:_})=>p.str`must be multiple of ${_}`,params:({schemaCode:_})=>p._`{multipleOf: ${_}}`},code(_){const{gen:l,data:v,schemaCode:m,it:b}=_,M=b.opts.multipleOfPrecision,E=l.let("res"),A=M?p._`Math.abs(Math.round(${E}) - ${E}) > 1e-${M}`:p._`${E} !== parseInt(${E})`;_.fail$data(p._`(${m} === 0 || (${E} = ${v}/${m}, ${A}))`)}};u.default=w},58455:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(92812),D=g(56382),_={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:l})=>D.str`must match pattern "${l}"`,params:({schemaCode:l})=>D._`{pattern: ${l}}`},code(l){const{data:v,$data:m,schema:b,schemaCode:M,it:E}=l,A=E.opts.unicodeRegExp?"u":"",P=m?D._`(new RegExp(${M}, ${A}))`:(0,p.usePattern)(l,b);l.fail$data(D._`!${P}.test(${v})`)}};u.default=_},70109:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(92812),D=g(56382),w=g(97990),l={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:v}})=>D.str`must have required property '${v}'`,params:({params:{missingProperty:v}})=>D._`{missingProperty: ${v}}`},code(v){const{gen:m,schema:b,schemaCode:M,data:E,$data:A,it:P}=v,{opts:x}=P;if(!A&&0===b.length)return;const N=b.length>=x.loopRequired;if(P.allErrors?function F(){if(N||A)v.block$data(D.nil,z);else for(const W of b)(0,p.checkReportMissingProp)(v,W)}():function L(){const W=m.let("missing");if(N||A){const Y=m.let("valid",!0);v.block$data(Y,()=>function j(W,Y){v.setParams({missingProperty:W}),m.forOf(W,M,()=>{m.assign(Y,(0,p.propertyInData)(m,E,W,x.ownProperties)),m.if((0,D.not)(Y),()=>{v.error(),m.break()})},D.nil)}(W,Y)),v.ok(Y)}else m.if((0,p.checkMissingProp)(v,b,W)),(0,p.reportMissingProp)(v,W),m.else()}(),x.strictRequired){const W=v.parentSchema.properties,{definedProperties:Y}=v.it;for(const G of b)if(void 0===W?.[G]&&!Y.has(G)){const q=`required property "${G}" is not defined at "${P.schemaEnv.baseId+P.errSchemaPath}" (strictRequired)`;(0,w.checkStrictMode)(P,q,P.opts.strictRequired)}}function z(){m.forOf("prop",M,W=>{v.setParams({missingProperty:W}),m.if((0,p.noPropertyInData)(m,E,W,x.ownProperties),()=>v.error())})}}};u.default=l},74097:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});const p=g(59078),D=g(56382),w=g(97990),_=g(40834),v={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:m,j:b}})=>D.str`must NOT have duplicate items (items ## ${b} and ${m} are identical)`,params:({params:{i:m,j:b}})=>D._`{i: ${m}, j: ${b}}`},code(m){const{gen:b,data:M,$data:E,schema:A,parentSchema:P,schemaCode:x,it:N}=m;if(!E&&!A)return;const F=b.let("valid"),L=P.items?(0,p.getSchemaTypes)(P.items):[];function W(G,Q){const q=b.name("item"),J=(0,p.checkDataTypes)(L,q,N.opts.strictNumbers,p.DataType.Wrong),H=b.const("indices",D._`{}`);b.for(D._`;${G}--;`,()=>{b.let(q,D._`${M}[${G}]`),b.if(J,D._`continue`),L.length>1&&b.if(D._`typeof ${q} == "string"`,D._`${q} += "_"`),b.if(D._`typeof ${H}[${q}] == "number"`,()=>{b.assign(Q,D._`${H}[${q}]`),m.error(),b.assign(F,!1).break()}).code(D._`${H}[${q}] = ${G}`)})}function Y(G,Q){const q=(0,w.useFunc)(b,_.default),J=b.name("outer");b.label(J).for(D._`;${G}--;`,()=>b.for(D._`${Q} = ${G}; ${Q}--;`,()=>b.if(D._`${q}(${M}[${G}], ${M}[${Q}])`,()=>{m.error(),b.assign(F,!1).break(J)})))}m.block$data(F,function z(){const G=b.let("i",D._`${M}.length`),Q=b.let("j");m.setParams({i:G,j:Q}),b.assign(F,!0),b.if(D._`${G} > 1`,()=>(function j(){return L.length>0&&!L.some(G=>"object"===G||"array"===G)}()?W:Y)(G,Q))},D._`${x} === false`),m.ok(F)}};u.default=v},87977:(re,u,g)=>{"use strict";const p=u;p.bignum=g(13854),p.define=g(39516).define,p.base=g(87813),p.constants=g(5459),p.decoders=g(70196),p.encoders=g(21131)},39516:(re,u,g)=>{"use strict";const p=g(21131),D=g(70196),w=g(83894);function l(v,m){this.name=v,this.body=m,this.decoders={},this.encoders={}}u.define=function(m,b){return new l(m,b)},l.prototype._createNamed=function(m){const b=this.name;function M(E){this._initNamed(E,b)}return w(M,m),M.prototype._initNamed=function(A,P){m.call(this,A,P)},new M(this)},l.prototype._getDecoder=function(m){return m=m||"der",this.decoders.hasOwnProperty(m)||(this.decoders[m]=this._createNamed(D[m])),this.decoders[m]},l.prototype.decode=function(m,b,M){return this._getDecoder(b).decode(m,M)},l.prototype._getEncoder=function(m){return m=m||"der",this.encoders.hasOwnProperty(m)||(this.encoders[m]=this._createNamed(p[m])),this.encoders[m]},l.prototype.encode=function(m,b,M){return this._getEncoder(b).encode(m,M)}},12769:(re,u,g)=>{"use strict";const p=g(83894),D=g(4919).b,w=g(62038).Buffer;function _(v,m){D.call(this,m),w.isBuffer(v)?(this.base=v,this.offset=0,this.length=v.length):this.error("Input not Buffer")}function l(v,m){if(Array.isArray(v))this.length=0,this.value=v.map(function(b){return l.isEncoderBuffer(b)||(b=new l(b,m)),this.length+=b.length,b},this);else if("number"==typeof v){if(!(0<=v&&v<=255))return m.error("non-byte EncoderBuffer value");this.value=v,this.length=1}else if("string"==typeof v)this.value=v,this.length=w.byteLength(v);else{if(!w.isBuffer(v))return m.error("Unsupported type: "+typeof v);this.value=v,this.length=v.length}}p(_,D),u.C=_,_.isDecoderBuffer=function(m){return m instanceof _||"object"==typeof m&&w.isBuffer(m.base)&&"DecoderBuffer"===m.constructor.name&&"number"==typeof m.offset&&"number"==typeof m.length&&"function"==typeof m.save&&"function"==typeof m.restore&&"function"==typeof m.isEmpty&&"function"==typeof m.readUInt8&&"function"==typeof m.skip&&"function"==typeof m.raw},_.prototype.save=function(){return{offset:this.offset,reporter:D.prototype.save.call(this)}},_.prototype.restore=function(m){const b=new _(this.base);return b.offset=m.offset,b.length=this.offset,this.offset=m.offset,D.prototype.restore.call(this,m.reporter),b},_.prototype.isEmpty=function(){return this.offset===this.length},_.prototype.readUInt8=function(m){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(m||"DecoderBuffer overrun")},_.prototype.skip=function(m,b){if(!(this.offset+m<=this.length))return this.error(b||"DecoderBuffer overrun");const M=new _(this.base);return M._reporterState=this._reporterState,M.offset=this.offset,M.length=this.offset+m,this.offset+=m,M},_.prototype.raw=function(m){return this.base.slice(m?m.offset:this.offset,this.length)},u.R=l,l.isEncoderBuffer=function(m){return m instanceof l||"object"==typeof m&&"EncoderBuffer"===m.constructor.name&&"number"==typeof m.length&&"function"==typeof m.join},l.prototype.join=function(m,b){return m||(m=w.alloc(this.length)),b||(b=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(M){M.join(m,b),b+=M.length}):("number"==typeof this.value?m[b]=this.value:"string"==typeof this.value?m.write(this.value,b):w.isBuffer(this.value)&&this.value.copy(m,b),b+=this.length)),m}},87813:(re,u,g)=>{"use strict";const p=u;p.Reporter=g(4919).b,p.DecoderBuffer=g(12769).C,p.EncoderBuffer=g(12769).R,p.Node=g(31430)},31430:(re,u,g)=>{"use strict";const p=g(4919).b,D=g(12769).R,w=g(12769).C,_=g(32391),l=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],v=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(l);function b(E,A,P){const x={};this._baseState=x,x.name=P,x.enc=E,x.parent=A||null,x.children=null,x.tag=null,x.args=null,x.reverseArgs=null,x.choice=null,x.optional=!1,x.any=!1,x.obj=!1,x.use=null,x.useDecoder=null,x.key=null,x.default=null,x.explicit=null,x.implicit=null,x.contains=null,x.parent||(x.children=[],this._wrap())}re.exports=b;const M=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];b.prototype.clone=function(){const A=this._baseState,P={};M.forEach(function(N){P[N]=A[N]});const x=new this.constructor(P.parent);return x._baseState=P,x},b.prototype._wrap=function(){const A=this._baseState;v.forEach(function(P){this[P]=function(){const N=new this.constructor(this);return A.children.push(N),N[P].apply(N,arguments)}},this)},b.prototype._init=function(A){const P=this._baseState;_(null===P.parent),A.call(this),P.children=P.children.filter(function(x){return x._baseState.parent===this},this),_.equal(P.children.length,1,"Root node can have only one child")},b.prototype._useArgs=function(A){const P=this._baseState,x=A.filter(function(N){return N instanceof this.constructor},this);A=A.filter(function(N){return!(N instanceof this.constructor)},this),0!==x.length&&(_(null===P.children),P.children=x,x.forEach(function(N){N._baseState.parent=this},this)),0!==A.length&&(_(null===P.args),P.args=A,P.reverseArgs=A.map(function(N){if("object"!=typeof N||N.constructor!==Object)return N;const F={};return Object.keys(N).forEach(function(L){L==(0|L)&&(L|=0);const z=N[L];F[z]=L}),F}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(E){b.prototype[E]=function(){const P=this._baseState;throw new Error(E+" not implemented for encoding: "+P.enc)}}),l.forEach(function(E){b.prototype[E]=function(){const P=this._baseState,x=Array.prototype.slice.call(arguments);return _(null===P.tag),P.tag=E,this._useArgs(x),this}}),b.prototype.use=function(A){_(A);const P=this._baseState;return _(null===P.use),P.use=A,this},b.prototype.optional=function(){return this._baseState.optional=!0,this},b.prototype.def=function(A){const P=this._baseState;return _(null===P.default),P.default=A,P.optional=!0,this},b.prototype.explicit=function(A){const P=this._baseState;return _(null===P.explicit&&null===P.implicit),P.explicit=A,this},b.prototype.implicit=function(A){const P=this._baseState;return _(null===P.explicit&&null===P.implicit),P.implicit=A,this},b.prototype.obj=function(){const A=this._baseState,P=Array.prototype.slice.call(arguments);return A.obj=!0,0!==P.length&&this._useArgs(P),this},b.prototype.key=function(A){const P=this._baseState;return _(null===P.key),P.key=A,this},b.prototype.any=function(){return this._baseState.any=!0,this},b.prototype.choice=function(A){const P=this._baseState;return _(null===P.choice),P.choice=A,this._useArgs(Object.keys(A).map(function(x){return A[x]})),this},b.prototype.contains=function(A){const P=this._baseState;return _(null===P.use),P.contains=A,this},b.prototype._decode=function(A,P){const x=this._baseState;if(null===x.parent)return A.wrapResult(x.children[0]._decode(A,P));let z,N=x.default,F=!0,L=null;if(null!==x.key&&(L=A.enterKey(x.key)),x.optional){let j=null;if(null!==x.explicit?j=x.explicit:null!==x.implicit?j=x.implicit:null!==x.tag&&(j=x.tag),null!==j||x.any){if(F=this._peekTag(A,j,x.any),A.isError(F))return F}else{const W=A.save();try{null===x.choice?this._decodeGeneric(x.tag,A,P):this._decodeChoice(A,P),F=!0}catch{F=!1}A.restore(W)}}if(x.obj&&F&&(z=A.enterObject()),F){if(null!==x.explicit){const W=this._decodeTag(A,x.explicit);if(A.isError(W))return W;A=W}const j=A.offset;if(null===x.use&&null===x.choice){let W;x.any&&(W=A.save());const Y=this._decodeTag(A,null!==x.implicit?x.implicit:x.tag,x.any);if(A.isError(Y))return Y;x.any?N=A.raw(W):A=Y}if(P&&P.track&&null!==x.tag&&P.track(A.path(),j,A.length,"tagged"),P&&P.track&&null!==x.tag&&P.track(A.path(),A.offset,A.length,"content"),x.any||(N=null===x.choice?this._decodeGeneric(x.tag,A,P):this._decodeChoice(A,P)),A.isError(N))return N;if(!x.any&&null===x.choice&&null!==x.children&&x.children.forEach(function(Y){Y._decode(A,P)}),x.contains&&("octstr"===x.tag||"bitstr"===x.tag)){const W=new w(N);N=this._getUse(x.contains,A._reporterState.obj)._decode(W,P)}}return x.obj&&F&&(N=A.leaveObject(z)),null===x.key||null===N&&!0!==F?null!==L&&A.exitKey(L):A.leaveKey(L,x.key,N),N},b.prototype._decodeGeneric=function(A,P,x){const N=this._baseState;return"seq"===A||"set"===A?null:"seqof"===A||"setof"===A?this._decodeList(P,A,N.args[0],x):/str$/.test(A)?this._decodeStr(P,A,x):"objid"===A&&N.args?this._decodeObjid(P,N.args[0],N.args[1],x):"objid"===A?this._decodeObjid(P,null,null,x):"gentime"===A||"utctime"===A?this._decodeTime(P,A,x):"null_"===A?this._decodeNull(P,x):"bool"===A?this._decodeBool(P,x):"objDesc"===A?this._decodeStr(P,A,x):"int"===A||"enum"===A?this._decodeInt(P,N.args&&N.args[0],x):null!==N.use?this._getUse(N.use,P._reporterState.obj)._decode(P,x):P.error("unknown tag: "+A)},b.prototype._getUse=function(A,P){const x=this._baseState;return x.useDecoder=this._use(A,P),_(null===x.useDecoder._baseState.parent),x.useDecoder=x.useDecoder._baseState.children[0],x.implicit!==x.useDecoder._baseState.implicit&&(x.useDecoder=x.useDecoder.clone(),x.useDecoder._baseState.implicit=x.implicit),x.useDecoder},b.prototype._decodeChoice=function(A,P){const x=this._baseState;let N=null,F=!1;return Object.keys(x.choice).some(function(L){const z=A.save(),j=x.choice[L];try{const W=j._decode(A,P);if(A.isError(W))return!1;N={type:L,value:W},F=!0}catch{return A.restore(z),!1}return!0},this),F?N:A.error("Choice not matched")},b.prototype._createEncoderBuffer=function(A){return new D(A,this.reporter)},b.prototype._encode=function(A,P,x){const N=this._baseState;if(null!==N.default&&N.default===A)return;const F=this._encodeValue(A,P,x);return void 0===F||this._skipDefault(F,P,x)?void 0:F},b.prototype._encodeValue=function(A,P,x){const N=this._baseState;if(null===N.parent)return N.children[0]._encode(A,P||new p);let F=null;if(this.reporter=P,N.optional&&void 0===A){if(null===N.default)return;A=N.default}let L=null,z=!1;if(N.any)F=this._createEncoderBuffer(A);else if(N.choice)F=this._encodeChoice(A,P);else if(N.contains)L=this._getUse(N.contains,x)._encode(A,P),z=!0;else if(N.children)L=N.children.map(function(j){if("null_"===j._baseState.tag)return j._encode(null,P,A);if(null===j._baseState.key)return P.error("Child should have a key");const W=P.enterKey(j._baseState.key);if("object"!=typeof A)return P.error("Child expected, but input is not object");const Y=j._encode(A[j._baseState.key],P,A);return P.leaveKey(W),Y},this).filter(function(j){return j}),L=this._createEncoderBuffer(L);else if("seqof"===N.tag||"setof"===N.tag){if(!N.args||1!==N.args.length)return P.error("Too many args for : "+N.tag);if(!Array.isArray(A))return P.error("seqof/setof, but data is not Array");const j=this.clone();j._baseState.implicit=null,L=this._createEncoderBuffer(A.map(function(W){const Y=this._baseState;return this._getUse(Y.args[0],A)._encode(W,P)},j))}else null!==N.use?F=this._getUse(N.use,x)._encode(A,P):(L=this._encodePrimitive(N.tag,A),z=!0);if(!N.any&&null===N.choice){const j=null!==N.implicit?N.implicit:N.tag,W=null===N.implicit?"universal":"context";null===j?null===N.use&&P.error("Tag could be omitted only for .use()"):null===N.use&&(F=this._encodeComposite(j,z,W,L))}return null!==N.explicit&&(F=this._encodeComposite(N.explicit,!1,"context",F)),F},b.prototype._encodeChoice=function(A,P){const x=this._baseState,N=x.choice[A.type];return N||_(!1,A.type+" not found in "+JSON.stringify(Object.keys(x.choice))),N._encode(A.value,P)},b.prototype._encodePrimitive=function(A,P){const x=this._baseState;if(/str$/.test(A))return this._encodeStr(P,A);if("objid"===A&&x.args)return this._encodeObjid(P,x.reverseArgs[0],x.args[1]);if("objid"===A)return this._encodeObjid(P,null,null);if("gentime"===A||"utctime"===A)return this._encodeTime(P,A);if("null_"===A)return this._encodeNull();if("int"===A||"enum"===A)return this._encodeInt(P,x.args&&x.reverseArgs[0]);if("bool"===A)return this._encodeBool(P);if("objDesc"===A)return this._encodeStr(P,A);throw new Error("Unsupported tag: "+A)},b.prototype._isNumstr=function(A){return/^[0-9 ]*$/.test(A)},b.prototype._isPrintstr=function(A){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(A)}},4919:(re,u,g)=>{"use strict";const p=g(83894);function D(_){this._reporterState={obj:null,path:[],options:_||{},errors:[]}}function w(_,l){this.path=_,this.rethrow(l)}u.b=D,D.prototype.isError=function(l){return l instanceof w},D.prototype.save=function(){const l=this._reporterState;return{obj:l.obj,pathLen:l.path.length}},D.prototype.restore=function(l){const v=this._reporterState;v.obj=l.obj,v.path=v.path.slice(0,l.pathLen)},D.prototype.enterKey=function(l){return this._reporterState.path.push(l)},D.prototype.exitKey=function(l){const v=this._reporterState;v.path=v.path.slice(0,l-1)},D.prototype.leaveKey=function(l,v,m){const b=this._reporterState;this.exitKey(l),null!==b.obj&&(b.obj[v]=m)},D.prototype.path=function(){return this._reporterState.path.join("/")},D.prototype.enterObject=function(){const l=this._reporterState,v=l.obj;return l.obj={},v},D.prototype.leaveObject=function(l){const v=this._reporterState,m=v.obj;return v.obj=l,m},D.prototype.error=function(l){let v;const m=this._reporterState,b=l instanceof w;if(v=b?l:new w(m.path.map(function(M){return"["+JSON.stringify(M)+"]"}).join(""),l.message||l,l.stack),!m.options.partial)throw v;return b||m.errors.push(v),v},D.prototype.wrapResult=function(l){const v=this._reporterState;return v.options.partial?{result:this.isError(l)?null:l,errors:v.errors}:l},p(w,Error),w.prototype.rethrow=function(l){if(this.message=l+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,w),!this.stack)try{throw new Error(this.message)}catch(v){this.stack=v.stack}return this}},25496:(re,u)=>{"use strict";function g(p){const D={};return Object.keys(p).forEach(function(w){(0|w)==w&&(w|=0);const _=p[w];D[_]=w}),D}u.tagClass={0:"universal",1:"application",2:"context",3:"private"},u.tagClassByName=g(u.tagClass),u.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},u.tagByName=g(u.tag)},5459:(re,u,g)=>{"use strict";const p=u;p._reverse=function(w){const _={};return Object.keys(w).forEach(function(l){(0|l)==l&&(l|=0);const v=w[l];_[v]=l}),_},p.der=g(25496)},87127:(re,u,g)=>{"use strict";const p=g(83894),D=g(13854),w=g(12769).C,_=g(31430),l=g(25496);function v(E){this.enc="der",this.name=E.name,this.entity=E,this.tree=new m,this.tree._init(E.body)}function m(E){_.call(this,"der",E)}function b(E,A){let P=E.readUInt8(A);if(E.isError(P))return P;const x=l.tagClass[P>>6],N=0==(32&P);if(31==(31&P)){let L=P;for(P=0;128==(128&L);){if(L=E.readUInt8(A),E.isError(L))return L;P<<=7,P|=127&L}}else P&=31;return{cls:x,primitive:N,tag:P,tagStr:l.tag[P]}}function M(E,A,P){let x=E.readUInt8(P);if(E.isError(x))return x;if(!A&&128===x)return null;if(!(128&x))return x;const N=127&x;if(N>4)return E.error("length octect is too long");x=0;for(let F=0;F{"use strict";const p=u;p.der=g(87127),p.pem=g(99617)},99617:(re,u,g)=>{"use strict";const p=g(83894),D=g(62038).Buffer,w=g(87127);function _(l){w.call(this,l),this.enc="pem"}p(_,w),re.exports=_,_.prototype.decode=function(v,m){const b=v.toString().split(/[\r\n]+/g),M=m.label.toUpperCase(),E=/^-----(BEGIN|END) ([^-]+)-----$/;let A=-1,P=-1;for(let F=0;F{"use strict";const p=g(83894),D=g(62038).Buffer,w=g(31430),_=g(25496);function l(M){this.enc="der",this.name=M.name,this.entity=M,this.tree=new v,this.tree._init(M.body)}function v(M){w.call(this,"der",M)}function m(M){return M<10?"0"+M:M}re.exports=l,l.prototype.encode=function(E,A){return this.tree._encode(E,A).join()},p(v,w),v.prototype._encodeComposite=function(E,A,P,x){const N=function b(M,E,A,P){let x;if("seqof"===M?M="seq":"setof"===M&&(M="set"),_.tagByName.hasOwnProperty(M))x=_.tagByName[M];else{if("number"!=typeof M||(0|M)!==M)return P.error("Unknown tag: "+M);x=M}return x>=31?P.error("Multi-octet tag encoding unsupported"):(E||(x|=32),x|=_.tagClassByName[A||"universal"]<<6,x)}(E,A,P,this.reporter);if(x.length<128){const z=D.alloc(2);return z[0]=N,z[1]=x.length,this._createEncoderBuffer([z,x])}let F=1;for(let z=x.length;z>=256;z>>=8)F++;const L=D.alloc(2+F);L[0]=N,L[1]=128|F;for(let z=1+F,j=x.length;j>0;z--,j>>=8)L[z]=255&j;return this._createEncoderBuffer([L,x])},v.prototype._encodeStr=function(E,A){if("bitstr"===A)return this._createEncoderBuffer([0|E.unused,E.data]);if("bmpstr"===A){const P=D.alloc(2*E.length);for(let x=0;x=40)return this.reporter.error("Second objid identifier OOB");E.splice(0,2,40*E[0]+E[1])}let x=0;for(let L=0;L=128;z>>=7)x++}const N=D.alloc(x);let F=N.length-1;for(let L=E.length-1;L>=0;L--){let z=E[L];for(N[F--]=127&z;(z>>=7)>0;)N[F--]=128|127&z}return this._createEncoderBuffer(N)},v.prototype._encodeTime=function(E,A){let P;const x=new Date(E);return"gentime"===A?P=[m(x.getUTCFullYear()),m(x.getUTCMonth()+1),m(x.getUTCDate()),m(x.getUTCHours()),m(x.getUTCMinutes()),m(x.getUTCSeconds()),"Z"].join(""):"utctime"===A?P=[m(x.getUTCFullYear()%100),m(x.getUTCMonth()+1),m(x.getUTCDate()),m(x.getUTCHours()),m(x.getUTCMinutes()),m(x.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+A+" time is not supported yet"),this._encodeStr(P,"octstr")},v.prototype._encodeNull=function(){return this._createEncoderBuffer("")},v.prototype._encodeInt=function(E,A){if("string"==typeof E){if(!A)return this.reporter.error("String int or enum given, but no values map");if(!A.hasOwnProperty(E))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(E));E=A[E]}if("number"!=typeof E&&!D.isBuffer(E)){const N=E.toArray();!E.sign&&128&N[0]&&N.unshift(0),E=D.from(N)}if(D.isBuffer(E)){let N=E.length;0===E.length&&N++;const F=D.alloc(N);return E.copy(F),0===E.length&&(F[0]=0),this._createEncoderBuffer(F)}if(E<128)return this._createEncoderBuffer(E);if(E<256)return this._createEncoderBuffer([0,E]);let P=1;for(let N=E;N>=256;N>>=8)P++;const x=new Array(P);for(let N=x.length-1;N>=0;N--)x[N]=255&E,E>>=8;return 128&x[0]&&x.unshift(0),this._createEncoderBuffer(D.from(x))},v.prototype._encodeBool=function(E){return this._createEncoderBuffer(E?255:0)},v.prototype._use=function(E,A){return"function"==typeof E&&(E=E(A)),E._getEncoder("der").tree},v.prototype._skipDefault=function(E,A,P){const x=this._baseState;let N;if(null===x.default)return!1;const F=E.join();if(void 0===x.defaultBuffer&&(x.defaultBuffer=this._encodeValue(x.default,A,P).join()),F.length!==x.defaultBuffer.length)return!1;for(N=0;N{"use strict";const p=u;p.der=g(16374),p.pem=g(3530)},3530:(re,u,g)=>{"use strict";const p=g(83894),D=g(16374);function w(_){D.call(this,_),this.enc="pem"}p(w,D),re.exports=w,w.prototype.encode=function(l,v){const b=D.prototype.encode.call(this,l).toString("base64"),M=["-----BEGIN "+v.label+"-----"];for(let E=0;E=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(C,o,s){var d=m(C,s);return s-1>=o&&(d|=m(C,s-1)<<4),d}function M(C,o,s,d){for(var h=0,S=Math.min(C.length,s),k=o;k=49?B-49+10:B>=17?B-17+10:B}return h}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,s){return o.cmp(s)>0?o:s},l.min=function(o,s){return o.cmp(s)<0?o:s},l.prototype._init=function(o,s,d){if("number"==typeof o)return this._initNumber(o,s,d);if("object"==typeof o)return this._initArray(o,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=o[h]|o[h-1]<<8|o[h-2]<<16,this.words[S]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);else if("le"===d)for(h=0,S=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);return this.strip()},l.prototype._parseHex=function(o,s,d){this.length=Math.ceil((o.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(o,s,h)<=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;else for(h=(o.length-s)%2==0?s+1:s;h=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;this.strip()},l.prototype._parseBase=function(o,s,d){this.words=[0],this.length=1;for(var h=0,S=1;S<=67108863;S*=s)h++;h--,S=S/s|0;for(var k=o.length-d,B=k%h,I=Math.min(k,k-B)+d,f=0,R=d;R1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var E=["","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"],A=[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 N(C,o,s){s.negative=o.negative^C.negative;var d=C.length+o.length|0;s.length=d,d=d-1|0;var h=0|C.words[0],S=0|o.words[0],k=h*S,B=67108863&k,I=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&I,ee=Math.min(f,o.length-1),oe=Math.max(0,f-C.length+1);oe<=ee;oe++){var de=f-oe|0;R+=(k=(h=0|C.words[de])*(S=0|o.words[oe])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,I=0|R}return 0!==I?s.words[f]=0|I:s.length--,s.strip()}l.prototype.toString=function(o,s){var d;if(s=0|s||1,16===(o=o||10)||"hex"===o){d="";for(var h=0,S=0,k=0;k>>24-h&16777215)||k!==this.length-1?E[6-I.length]+I+d:I+d,(h+=2)>=26&&(h-=26,k--)}for(0!==S&&(d=S.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],R=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var ee=se.modn(R).toString(o);d=(se=se.idivn(R)).isZero()?ee+d:E[f-ee.length]+ee+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,s){return w(typeof v<"u"),this.toArrayLike(v,o,s)},l.prototype.toArray=function(o,s){return this.toArrayLike(Array,o,s)},l.prototype.toArrayLike=function(o,s,d){var h=this.byteLength(),S=d||Math.max(1,h);w(h<=S,"byte array longer than desired length"),w(S>0,"Requested array length <= 0"),this.strip();var I,f,k="le"===s,B=new o(S),R=this.clone();if(k){for(f=0;!R.isZero();f++)I=R.andln(255),R.iushrn(8),B[f]=I;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},l.prototype._zeroBits=function(o){if(0===o)return 26;var s=o,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],s=this._countBits(o);return 26*(this.length-1)+s},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,s=0;so.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var s;s=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var s,d;this.length>o.length?(s=this,d=o):(s=o,d=this);for(var h=0;ho.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var s=0|Math.ceil(o/26),d=o%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,s){w("number"==typeof o&&o>=0);var d=o/26|0,h=o%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<o.length?(d=this,h=o):(d=o,h=this);for(var S=0,k=0;k>>26;for(;0!==S&&k>>26;if(this.length=d.length,0!==S)this.words[this.length]=S,this.length++;else if(d!==this)for(;ko.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var s=this.iadd(o);return o.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var h,S,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,S=o):(h=o,S=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Se=8191&pe,ce=pe>>>13,be=0|h[4],Pe=8191&be,Fe=be>>>13,lt=0|h[5],Ge=8191<,He=lt>>>13,Kt=0|h[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|h[7],ot=8191&Vt,at=Vt>>>13,Gt=0|h[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|h[9],Be=8191&Te,Ve=Te>>>13,mt=0|S[0],Ze=8191&mt,ct=mt>>>13,hn=0|S[1],ft=8191&hn,At=hn>>>13,wn=0|S[2],ze=8191&wn,Qe=wn>>>13,Ht=0|S[3],pt=8191&Ht,vt=Ht>>>13,$t=0|S[4],dt=8191&$t,gt=$t>>>13,mn=0|S[5],ut=8191&mn,wt=mn>>>13,Sn=0|S[6],yt=8191&Sn,Et=Sn>>>13,_e=0|S[7],Ee=8191&_e,Me=_e>>>13,me=0|S[8],Oe=8191&me,Ke=me>>>13,it=0|S[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^s.negative,d.length=19;var Bt=(B+(I=Math.imul(ee,Ze))|0)+((8191&(f=(f=Math.imul(ee,ct))+Math.imul(oe,Ze)|0))<<13)|0;B=((R=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,I=Math.imul(Ce,Ze),f=(f=Math.imul(Ce,ct))+Math.imul(ye,Ze)|0,R=Math.imul(ye,ct);var Ct=(B+(I=I+Math.imul(ee,ft)|0)|0)+((8191&(f=(f=f+Math.imul(ee,At)|0)+Math.imul(oe,ft)|0))<<13)|0;B=((R=R+Math.imul(oe,At)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,I=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,R=Math.imul(fe,ct),I=I+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,ft)|0,R=R+Math.imul(ye,At)|0;var kt=(B+(I=I+Math.imul(ee,ze)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;B=((R=R+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,I=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,R=Math.imul(ce,ct),I=I+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,R=R+Math.imul(fe,At)|0,I=I+Math.imul(Ce,ze)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,ze)|0,R=R+Math.imul(ye,Qe)|0;var Ot=(B+(I=I+Math.imul(ee,pt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;B=((R=R+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,I=Math.imul(Pe,Ze),f=(f=Math.imul(Pe,ct))+Math.imul(Fe,Ze)|0,R=Math.imul(Fe,ct),I=I+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,R=R+Math.imul(ce,At)|0,I=I+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,R=R+Math.imul(fe,Qe)|0,I=I+Math.imul(Ce,pt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,pt)|0,R=R+Math.imul(ye,vt)|0;var Pt=(B+(I=I+Math.imul(ee,dt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;B=((R=R+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,I=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,R=Math.imul(He,ct),I=I+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Fe,ft)|0,R=R+Math.imul(Fe,At)|0,I=I+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,R=R+Math.imul(ce,Qe)|0,I=I+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,R=R+Math.imul(fe,vt)|0,I=I+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,dt)|0,R=R+Math.imul(ye,gt)|0;var Lt=(B+(I=I+Math.imul(ee,ut)|0)|0)+((8191&(f=(f=f+Math.imul(ee,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;B=((R=R+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,I=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,R=Math.imul(nt,ct),I=I+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,R=R+Math.imul(He,At)|0,I=I+Math.imul(Pe,ze)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Fe,ze)|0,R=R+Math.imul(Fe,Qe)|0,I=I+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,R=R+Math.imul(ce,vt)|0,I=I+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,R=R+Math.imul(fe,gt)|0,I=I+Math.imul(Ce,ut)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ut)|0,R=R+Math.imul(ye,wt)|0;var nn=(B+(I=I+Math.imul(ee,yt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;B=((R=R+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,I=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,R=Math.imul(at,ct),I=I+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,R=R+Math.imul(nt,At)|0,I=I+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,R=R+Math.imul(He,Qe)|0,I=I+Math.imul(Pe,pt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Fe,pt)|0,R=R+Math.imul(Fe,vt)|0,I=I+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,R=R+Math.imul(ce,gt)|0,I=I+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,R=R+Math.imul(fe,wt)|0,I=I+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,Et)|0)+Math.imul(ye,yt)|0,R=R+Math.imul(ye,Et)|0;var Yt=(B+(I=I+Math.imul(ee,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;B=((R=R+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,I=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,R=Math.imul(Ae,ct),I=I+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,R=R+Math.imul(at,At)|0,I=I+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,R=R+Math.imul(nt,Qe)|0,I=I+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,R=R+Math.imul(He,vt)|0,I=I+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Fe,dt)|0,R=R+Math.imul(Fe,gt)|0,I=I+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,R=R+Math.imul(ce,wt)|0,I=I+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,R=R+Math.imul(fe,Et)|0,I=I+Math.imul(Ce,Ee)|0,f=(f=f+Math.imul(Ce,Me)|0)+Math.imul(ye,Ee)|0,R=R+Math.imul(ye,Me)|0;var gn=(B+(I=I+Math.imul(ee,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;B=((R=R+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,I=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,R=Math.imul(Ve,ct),I=I+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,R=R+Math.imul(Ae,At)|0,I=I+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,R=R+Math.imul(at,Qe)|0,I=I+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,R=R+Math.imul(nt,vt)|0,I=I+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,R=R+Math.imul(He,gt)|0,I=I+Math.imul(Pe,ut)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Fe,ut)|0,R=R+Math.imul(Fe,wt)|0,I=I+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,R=R+Math.imul(ce,Et)|0,I=I+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,R=R+Math.imul(fe,Me)|0,I=I+Math.imul(Ce,Oe)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,Oe)|0,R=R+Math.imul(ye,Ke)|0;var an=(B+(I=I+Math.imul(ee,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ee,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;B=((R=R+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,I=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,R=Math.imul(Ve,At),I=I+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,R=R+Math.imul(Ae,Qe)|0,I=I+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,R=R+Math.imul(at,vt)|0,I=I+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,R=R+Math.imul(nt,gt)|0,I=I+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,R=R+Math.imul(He,wt)|0,I=I+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,Et)|0)+Math.imul(Fe,yt)|0,R=R+Math.imul(Fe,Et)|0,I=I+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,R=R+Math.imul(ce,Me)|0,I=I+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,R=R+Math.imul(fe,Ke)|0;var tn=(B+(I=I+Math.imul(Ce,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;B=((R=R+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,I=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,R=Math.imul(Ve,Qe),I=I+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,R=R+Math.imul(Ae,vt)|0,I=I+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,R=R+Math.imul(at,gt)|0,I=I+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,R=R+Math.imul(nt,wt)|0,I=I+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,R=R+Math.imul(He,Et)|0,I=I+Math.imul(Pe,Ee)|0,f=(f=f+Math.imul(Pe,Me)|0)+Math.imul(Fe,Ee)|0,R=R+Math.imul(Fe,Me)|0,I=I+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,R=R+Math.imul(ce,Ke)|0;var Ut=(B+(I=I+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,I=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,R=Math.imul(Ve,vt),I=I+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,R=R+Math.imul(Ae,gt)|0,I=I+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,R=R+Math.imul(at,wt)|0,I=I+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,R=R+Math.imul(nt,Et)|0,I=I+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,R=R+Math.imul(He,Me)|0,I=I+Math.imul(Pe,Oe)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Fe,Oe)|0,R=R+Math.imul(Fe,Ke)|0;var cn=(B+(I=I+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;B=((R=R+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,I=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,R=Math.imul(Ve,gt),I=I+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,R=R+Math.imul(Ae,wt)|0,I=I+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,R=R+Math.imul(at,Et)|0,I=I+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,R=R+Math.imul(nt,Me)|0,I=I+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,R=R+Math.imul(He,Ke)|0;var Jt=(B+(I=I+Math.imul(Pe,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,I=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,R=Math.imul(Ve,wt),I=I+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,R=R+Math.imul(Ae,Et)|0,I=I+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,R=R+Math.imul(at,Me)|0,I=I+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,R=R+Math.imul(nt,Ke)|0;var Zt=(B+(I=I+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;B=((R=R+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,I=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,R=Math.imul(Ve,Et),I=I+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,R=R+Math.imul(Ae,Me)|0,I=I+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,R=R+Math.imul(at,Ke)|0;var fn=(B+(I=I+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;B=((R=R+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,I=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,R=Math.imul(Ve,Me),I=I+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,R=R+Math.imul(Ae,Ke)|0;var Qt=(B+(I=I+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;B=((R=R+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,I=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,R=Math.imul(Ve,Ke);var Dt=(B+(I=I+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;B=((R=R+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(B+(I=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return B=((R=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,k[0]=Bt,k[1]=Ct,k[2]=kt,k[3]=Ot,k[4]=Pt,k[5]=Lt,k[6]=nn,k[7]=Yt,k[8]=gn,k[9]=an,k[10]=tn,k[11]=Ut,k[12]=cn,k[13]=Jt,k[14]=Zt,k[15]=fn,k[16]=Qt,k[17]=Dt,k[18]=Mt,0!==B&&(k[19]=B,d.length++),d};function z(C,o,s){return(new j).mulp(C,o,s)}function j(C,o){this.x=C,this.y=o}Math.imul||(F=N),l.prototype.mulTo=function(o,s){var d,h=this.length+o.length;return d=10===this.length&&10===o.length?F(this,o,s):h<63?N(this,o,s):h<1024?function L(C,o,s){s.negative=o.negative^C.negative,s.length=C.length+o.length;for(var d=0,h=0,S=0;S>>26)|0)>>>26,k&=67108863}s.words[S]=B,d=k,k=h}return 0!==d?s.words[S]=d:s.length--,s.strip()}(this,o,s):z(this,o,s),d},j.prototype.makeRBT=function(o){for(var s=new Array(o),d=l.prototype._countBits(o)-1,h=0;h>=1;return h},j.prototype.permute=function(o,s,d,h,S,k){for(var B=0;B>>=1)S++;return 1<>>=13,d[2*k+1]=8191&S,S>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=S>>>26,this.words[d]=67108863&S}return 0!==s&&(this.words[d]=s,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var s=function x(C){for(var o=new Array(C.bitLength()),s=0;s>>h}return o}(o);if(0===s.length)return new l(1);for(var d=this,h=0;h=0);var S,s=o%26,d=(o-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(S=0;S>>26-s}k&&(this.words[S]=k,this.length++)}if(0!==d){for(S=this.length-1;S>=0;S--)this.words[S+d]=this.words[S];for(S=0;S=0),h=s?(s-s%26)/26:0;var S=o%26,k=Math.min((o-S)/26,this.length),B=67108863^67108863>>>S<k)for(this.length-=k,f=0;f=0&&(0!==R||f>=h);f--){var se=0|this.words[f];this.words[f]=R<<26-S|se>>>S,R=se&B}return I&&0!==R&&(I.words[I.length++]=R),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,s,d){return w(0===this.negative),this.iushrn(o,s,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var s=o%26,d=(o-s)/26,h=1<=0);var s=o%26,d=(o-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(I/67108864|0),this.words[S+d]=67108863&k}for(;S>26,this.words[S+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,S=0;S>26,this.words[S]=67108863&k;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,s){var d=(this.length,o.length),h=this.clone(),S=o,k=0|S.words[S.length-1];0!==(d=26-this._countBits(k))&&(S=S.ushln(d),h.iushln(d),k=0|S.words[S.length-1]);var f,I=h.length-S.length;if("mod"!==s){(f=new l(null)).length=I+1,f.words=new Array(f.length);for(var R=0;R=0;ee--){var oe=67108864*(0|h.words[S.length+ee])+(0|h.words[S.length+ee-1]);for(oe=Math.min(oe/k|0,67108863),h._ishlnsubmul(S,oe,ee);0!==h.negative;)oe--,h.negative=0,h._ishlnsubmul(S,1,ee),h.isZero()||(h.negative^=1);f&&(f.words[ee]=oe)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},l.prototype.divmod=function(o,s,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(k=this.neg().divmod(o,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.iadd(o)),{div:h,mod:S}):0===this.negative&&0!==o.negative?(k=this.divmod(o.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&o.negative?(k=this.neg().divmod(o.neg(),s),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.isub(o)),{div:k.div,mod:S}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===s?{div:this.divn(o.words[0]),mod:null}:"mod"===s?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,s);var h,S,k},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var s=this.divmod(o);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(o):s.mod,h=o.ushrn(1),S=o.andln(1),k=d.cmp(h);return k<0||1===S&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var s=(1<<26)%o,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/o|0,s=h%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=new l(0),B=new l(1),I=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++I;for(var f=d.clone(),R=s.clone();!s.isZero();){for(var se=0,ee=1;!(s.words[0]&ee)&&se<26;++se,ee<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||S.isOdd())&&(h.iadd(f),S.isub(R)),h.iushrn(1),S.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(R)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),S.isub(B)):(d.isub(s),k.isub(h),B.isub(S))}return{a:k,b:B,gcd:d.iushln(I)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,I=1;!(s.words[0]&I)&&B<26;++B,I<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,R=1;!(d.words[0]&R)&&f<26;++f,R<<=1);if(f>0)for(d.iushrn(f);f-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(S)):(d.isub(s),S.isub(h))}return(se=0===s.cmpn(1)?h:S).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var s=this.clone(),d=o.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var S=s.cmp(d);if(S<0){var k=s;s=d,d=k}else if(0===S||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var s=o%26,d=(o-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==S&&(this.words[k]=S,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,s=o<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(o=-o),w(o<=67108863,"Number is too big");var h=0|this.words[0];d=h===o?0:ho.length)return 1;if(this.length=0;d--){var h=0|this.words[d],S=0|o.words[d];if(h!==S){hS&&(s=1);break}}return s},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new H(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var W={k256:null,p224:null,p192:null,p25519:null};function Y(C,o){this.name=C,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function H(C){if("string"==typeof C){var o=l._prime(C);this.m=o.p,this.prime=o}else w(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}function te(C){H.call(this,C),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}Y.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},Y.prototype.ireduce=function(o){var d,s=o;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(o,s){o.iushrn(this.n,0,s)},Y.prototype.imulK=function(o){return o.imul(this.k)},_(G,Y),G.prototype.split=function(o,s){for(var d=4194303,h=Math.min(o.length,9),S=0;S>>22,k=B}k>>>=22,o.words[S-10]=k,0===k&&o.length>10?o.length-=10:o.length-=9},G.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var s=0,d=0;d>>=26,o.words[d]=S,s=h}return 0!==s&&(o.words[o.length++]=s),o},l._prime=function(o){if(W[o])return W[o];var s;if("k256"===o)s=new G;else if("p224"===o)s=new Q;else if("p192"===o)s=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);s=new J}return W[o]=s,s},H.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},H.prototype._verify2=function(o,s){w(0==(o.negative|s.negative),"red works only with positives"),w(o.red&&o.red===s.red,"red works only with red numbers")},H.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},H.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},H.prototype.add=function(o,s){this._verify2(o,s);var d=o.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},H.prototype.iadd=function(o,s){this._verify2(o,s);var d=o.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},H.prototype.sub=function(o,s){this._verify2(o,s);var d=o.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},H.prototype.isub=function(o,s){this._verify2(o,s);var d=o.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},H.prototype.shl=function(o,s){return this._verify1(o),this.imod(o.ushln(s))},H.prototype.imul=function(o,s){return this._verify2(o,s),this.imod(o.imul(s))},H.prototype.mul=function(o,s){return this._verify2(o,s),this.imod(o.mul(s))},H.prototype.isqr=function(o){return this.imul(o,o.clone())},H.prototype.sqr=function(o){return this.mul(o,o)},H.prototype.sqrt=function(o){if(o.isZero())return o.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var h=this.m.subn(1),S=0;!h.isZero()&&0===h.andln(1);)S++,h.iushrn(1);w(!h.isZero());var k=new l(1).toRed(this),B=k.redNeg(),I=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,I).cmp(B);)f.redIAdd(B);for(var R=this.pow(f,h),se=this.pow(o,h.addn(1).iushrn(1)),ee=this.pow(o,h),oe=S;0!==ee.cmp(k);){for(var de=ee,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;S--){for(var R=s.words[S],se=f-1;se>=0;se--){var ee=R>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==ee||0!==B)?(B<<=1,B|=ee,(4===++I||0===S&&0===se)&&(k=this.mul(k,h[B]),I=0,B=0)):I=0}f=26}return k},H.prototype.convertTo=function(o){var s=o.umod(this.m);return s===o?s.clone():s},H.prototype.convertFrom=function(o){var s=o.clone();return s.red=null,s},l.mont=function(o){return new te(o)},_(te,H),te.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},te.prototype.convertFrom=function(o){var s=this.imod(o.mul(this.rinv));return s.red=null,s},te.prototype.imul=function(o,s){if(o.isZero()||s.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.mul=function(o,s){if(o.isZero()||s.isZero())return new l(0)._forceRed(this);var d=o.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(re=g.nmd(re),this)},21082:(re,u,g)=>{"use strict";var p=g(73502).Buffer;re.exports=function D(w){if(w.length>=255)throw new TypeError("Alphabet too long");for(var _=new Uint8Array(256),l=0;l<_.length;l++)_[l]=255;for(var v=0;v>>0,G=new Uint8Array(Y);L[z];){var Q=_[L.charCodeAt(z)];if(255===Q)return;for(var q=0,J=Y-1;(0!==Q||q>>0,G[J]=Q%256>>>0,Q=Q/256>>>0;if(0!==Q)throw new Error("Non-zero carry");W=q,z++}for(var H=Y-W;H!==Y&&0===G[H];)H++;var te=p.allocUnsafe(j+(Y-H));te.fill(0,0,j);for(var C=j;H!==Y;)te[C++]=G[H++];return te}return{encode:function x(L){if((Array.isArray(L)||L instanceof Uint8Array)&&(L=p.from(L)),!p.isBuffer(L))throw new TypeError("Expected Buffer");if(0===L.length)return"";for(var z=0,j=0,W=0,Y=L.length;W!==Y&&0===L[W];)W++,z++;for(var G=(Y-W)*P+1>>>0,Q=new Uint8Array(G);W!==Y;){for(var q=L[W],J=0,H=G-1;(0!==q||J>>0,Q[H]=q%M>>>0,q=q/M>>>0;if(0!==q)throw new Error("Non-zero carry");j=J,W++}for(var te=G-j;te!==G&&0===Q[te];)te++;for(var C=E.repeat(z);te{"use strict";u.byteLength=function m(x){var N=v(x),F=N[0],L=N[1];return 3*(F+L)/4-L},u.toByteArray=function M(x){var N,G,F=v(x),L=F[0],z=F[1],j=new D(function b(x,N,F){return 3*(N+F)/4-F}(0,L,z)),W=0,Y=z>0?L-4:L;for(G=0;G>16&255,j[W++]=N>>8&255,j[W++]=255&N;return 2===z&&(N=p[x.charCodeAt(G)]<<2|p[x.charCodeAt(G+1)]>>4,j[W++]=255&N),1===z&&(N=p[x.charCodeAt(G)]<<10|p[x.charCodeAt(G+1)]<<4|p[x.charCodeAt(G+2)]>>2,j[W++]=N>>8&255,j[W++]=255&N),j},u.fromByteArray=function P(x){for(var N,F=x.length,L=F%3,z=[],j=16383,W=0,Y=F-L;WY?Y:W+j));return 1===L?(N=x[F-1],z.push(g[N>>2]+g[N<<4&63]+"==")):2===L&&(N=(x[F-2]<<8)+x[F-1],z.push(g[N>>10]+g[N>>4&63]+g[N<<2&63]+"=")),z.join("")};for(var g=[],p=[],D=typeof Uint8Array<"u"?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,l=w.length;_0)throw new Error("Invalid string. Length must be a multiple of 4");var F=x.indexOf("=");return-1===F&&(F=N),[F,F===N?0:4-F%4]}function E(x){return g[x>>18&63]+g[x>>12&63]+g[x>>6&63]+g[63&x]}function A(x,N,F){for(var L,z=[],j=N;j{"use strict";for(var u="qpzry9x8gf2tvdw0s3jn54khce6mua7l",g={},p=0;p>25;return(33554431&N)<<5^996825010&-(F>>0&1)^642813549&-(F>>1&1)^513874426&-(F>>2&1)^1027748829&-(F>>3&1)^705979059&-(F>>4&1)}function _(N){for(var F=1,L=0;L126)return"Invalid prefix ("+N+")";F=w(F)^z>>5}for(F=w(F),L=0;LF)return"Exceeds length limit";var L=N.toLowerCase(),z=N.toUpperCase();if(N!==L&&N!==z)return"Mixed-case string "+N;var j=(N=L).lastIndexOf("1");if(-1===j)return"No separator character for "+N;if(0===j)return"Missing prefix for "+N;var W=N.slice(0,j),Y=N.slice(j+1);if(Y.length<6)return"Data too short";var G=_(W);if("string"==typeof G)return G;for(var Q=[],q=0;q=Y.length)&&Q.push(H)}return 1!==G?"Invalid checksum for "+N:{prefix:W,words:Q}}function M(N,F,L,z){for(var j=0,W=0,Y=(1<=L;)W-=L,G.push(j>>W&Y);if(z)W>0&&G.push(j<=F)return"Excess padding";if(j<L)throw new TypeError("Exceeds length limit");var z=_(N=N.toLowerCase());if("string"==typeof z)throw new Error(z);for(var j=N+"1",W=0;W>5)throw new Error("Non 5-bit word");z=w(z)^Y,j+=u.charAt(Y)}for(W=0;W<6;++W)z=w(z);for(z^=1,W=0;W<6;++W){var G=z>>5*(5-W)&31;j+=u.charAt(G)}return j},toWordsUnsafe:function E(N){var F=M(N,8,5,!0);if(Array.isArray(F))return F},toWords:function A(N){var F=M(N,8,5,!0);if(Array.isArray(F))return F;throw new Error(F)},fromWordsUnsafe:function P(N){var F=M(N,5,8,!1);if(Array.isArray(F))return F},fromWords:function x(N){var F=M(N,5,8,!1);if(Array.isArray(F))return F;throw new Error(F)}}},48670:(re,u,g)=>{var p;p=typeof window<"u"&&window.crypto?function(Y){var G=new Uint32Array(Y);return Buffer.from(window.crypto.getRandomValues(G))}:g(41348).randomBytes;var D=g(96386),w=g(99357).pbkdf2Sync,_=g(24457),l=_,v="Invalid mnemonic",m="Invalid entropy",b="Invalid mnemonic checksum";function M(Y,G,Q){for(;Y.length32)throw new Error(m);if(C.length%4!=0)throw new Error(m);var o=Buffer.from(C);if(P(o)!==te)throw new Error(b);return o.toString("hex")}function z(Y,G){if(Buffer.isBuffer(Y)||(Y=Buffer.from(Y,"hex")),G=G||l,Y.length<16)throw new TypeError(m);if(Y.length>32)throw new TypeError(m);if(Y.length%4!=0)throw new TypeError(m);return(A([].slice.call(Y))+P(Y)).match(/(.{1,11})/g).map(function(C){var o=E(C);return G[o]}).join(" ")}re.exports={mnemonicToSeed:N,mnemonicToSeedHex:function F(Y,G){return N(Y,G).toString("hex")},mnemonicToEntropy:L,entropyToMnemonic:z,generateMnemonic:function j(Y,G,Q){if((Y=Y||128)%32!=0)throw new TypeError(m);return z((G=G||p)(Y/8),Q)},validateMnemonic:function W(Y,G){try{L(Y,G)}catch{return!1}return!0},wordlists:{EN:_}}},98538:function(re,u,g){(function(p,D){"use strict";function w(d,h){if(!d)throw new Error(h||"Assertion failed")}function _(d,h){d.super_=h;var S=function(){};S.prototype=h.prototype,d.prototype=new S,d.prototype.constructor=d}function l(d,h,S){if(l.isBN(d))return d;this.negative=0,this.words=null,this.length=0,this.red=null,null!==d&&(("le"===h||"be"===h)&&(S=h,h=10),this._init(d||0,h||10,S||"be"))}var v;"object"==typeof p?p.exports=l:D.BN=l,l.BN=l,l.wordSize=26;try{v=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:g(46601).Buffer}catch{}function m(d,h){var S=d.charCodeAt(h);return S>=48&&S<=57?S-48:S>=65&&S<=70?S-55:S>=97&&S<=102?S-87:void w(!1,"Invalid character in "+d)}function b(d,h,S){var k=m(d,S);return S-1>=h&&(k|=m(d,S-1)<<4),k}function M(d,h,S,k){for(var B=0,I=0,f=Math.min(d.length,S),R=h;R=49?se-49+10:se>=17?se-17+10:se,w(se>=0&&I0?h:S},l.min=function(h,S){return h.cmp(S)<0?h:S},l.prototype._init=function(h,S,k){if("number"==typeof h)return this._initNumber(h,S,k);if("object"==typeof h)return this._initArray(h,S,k);"hex"===S&&(S=16),w(S===(0|S)&&S>=2&&S<=36);var B=0;"-"===(h=h.toString().replace(/\s+/g,""))[0]&&(B++,this.negative=1),B=0;B-=3)f=h[B]|h[B-1]<<8|h[B-2]<<16,this.words[I]|=f<>>26-R&67108863,(R+=24)>=26&&(R-=26,I++);else if("le"===k)for(B=0,I=0;B>>26-R&67108863,(R+=24)>=26&&(R-=26,I++);return this._strip()},l.prototype._parseHex=function(h,S,k){this.length=Math.ceil((h.length-S)/6),this.words=new Array(this.length);for(var B=0;B=S;B-=2)R=b(h,S,B)<=18?(I-=18,f+=1,this.words[f]|=R>>>26):I+=8;else for(B=(h.length-S)%2==0?S+1:S;B=18?(I-=18,f+=1,this.words[f]|=R>>>26):I+=8;this._strip()},l.prototype._parseBase=function(h,S,k){this.words=[0],this.length=1;for(var B=0,I=1;I<=67108863;I*=S)B++;B--,I=I/S|0;for(var f=h.length-k,R=f%B,se=Math.min(f,f-R)+k,ee=0,oe=k;oe1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},typeof Symbol<"u"&&"function"==typeof Symbol.for)try{l.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{l.prototype.inspect=A}else l.prototype.inspect=A;function A(){return(this.red?""}var P=["","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"],x=[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],N=[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];l.prototype.toString=function(h,S){var k;if(S=0|S||1,16===(h=h||10)||"hex"===h){k="";for(var B=0,I=0,f=0;f>>24-B&16777215,(B+=2)>=26&&(B-=26,f--),k=0!==I||f!==this.length-1?P[6-se.length]+se+k:se+k}for(0!==I&&(k=I.toString(16)+k);k.length%S!=0;)k="0"+k;return 0!==this.negative&&(k="-"+k),k}if(h===(0|h)&&h>=2&&h<=36){var ee=x[h],oe=N[h];k="";var de=this.clone();for(de.negative=0;!de.isZero();){var Ce=de.modrn(oe).toString(h);k=(de=de.idivn(oe)).isZero()?Ce+k:P[ee-Ce.length]+Ce+k}for(this.isZero()&&(k="0"+k);k.length%S!=0;)k="0"+k;return 0!==this.negative&&(k="-"+k),k}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var h=this.words[0];return 2===this.length?h+=67108864*this.words[1]:3===this.length&&1===this.words[2]?h+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-h:h},l.prototype.toJSON=function(){return this.toString(16,2)},v&&(l.prototype.toBuffer=function(h,S){return this.toArrayLike(v,h,S)}),l.prototype.toArray=function(h,S){return this.toArrayLike(Array,h,S)};function z(d,h,S){S.negative=h.negative^d.negative;var k=d.length+h.length|0;S.length=k,k=k-1|0;var B=0|d.words[0],I=0|h.words[0],f=B*I,R=67108863&f,se=f/67108864|0;S.words[0]=R;for(var ee=1;ee>>26,de=67108863&se,Ce=Math.min(ee,h.length-1),ye=Math.max(0,ee-d.length+1);ye<=Ce;ye++){var ve=ee-ye|0;oe+=(f=(B=0|d.words[ve])*(I=0|h.words[ye])+de)/67108864|0,de=67108863&f}S.words[ee]=0|de,se=0|oe}return 0!==se?S.words[ee]=0|se:S.length--,S._strip()}l.prototype.toArrayLike=function(h,S,k){this._strip();var B=this.byteLength(),I=k||Math.max(1,B);w(B<=I,"byte array longer than desired length"),w(I>0,"Requested array length <= 0");var f=function(h,S){return h.allocUnsafe?h.allocUnsafe(S):new h(S)}(h,I);return this["_toArrayLike"+("le"===S?"LE":"BE")](f,B),f},l.prototype._toArrayLikeLE=function(h,S){for(var k=0,B=0,I=0,f=0;I>8&255),k>16&255),6===f?(k>24&255),B=0,f=0):(B=R>>>24,f+=2)}if(k=0&&(h[k--]=R>>8&255),k>=0&&(h[k--]=R>>16&255),6===f?(k>=0&&(h[k--]=R>>24&255),B=0,f=0):(B=R>>>24,f+=2)}if(k>=0)for(h[k--]=B;k>=0;)h[k--]=0},Math.clz32?l.prototype._countBits=function(h){return 32-Math.clz32(h)}:l.prototype._countBits=function(h){var S=h,k=0;return S>=4096&&(k+=13,S>>>=13),S>=64&&(k+=7,S>>>=7),S>=8&&(k+=4,S>>>=4),S>=2&&(k+=2,S>>>=2),k+S},l.prototype._zeroBits=function(h){if(0===h)return 26;var S=h,k=0;return 8191&S||(k+=13,S>>>=13),127&S||(k+=7,S>>>=7),15&S||(k+=4,S>>>=4),3&S||(k+=2,S>>>=2),1&S||k++,k},l.prototype.bitLength=function(){var h=this.words[this.length-1],S=this._countBits(h);return 26*(this.length-1)+S},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,S=0;Sh.length?this.clone().ior(h):h.clone().ior(this)},l.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},l.prototype.iuand=function(h){var S;S=this.length>h.length?h:this;for(var k=0;kh.length?this.clone().iand(h):h.clone().iand(this)},l.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},l.prototype.iuxor=function(h){var S,k;this.length>h.length?(S=this,k=h):(S=h,k=this);for(var B=0;Bh.length?this.clone().ixor(h):h.clone().ixor(this)},l.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},l.prototype.inotn=function(h){w("number"==typeof h&&h>=0);var S=0|Math.ceil(h/26),k=h%26;this._expand(S),k>0&&S--;for(var B=0;B0&&(this.words[B]=~this.words[B]&67108863>>26-k),this._strip()},l.prototype.notn=function(h){return this.clone().inotn(h)},l.prototype.setn=function(h,S){w("number"==typeof h&&h>=0);var k=h/26|0,B=h%26;return this._expand(k+1),this.words[k]=S?this.words[k]|1<h.length?(k=this,B=h):(k=h,B=this);for(var I=0,f=0;f>>26;for(;0!==I&&f>>26;if(this.length=k.length,0!==I)this.words[this.length]=I,this.length++;else if(k!==this)for(;fh.length?this.clone().iadd(h):h.clone().iadd(this)},l.prototype.isub=function(h){if(0!==h.negative){h.negative=0;var S=this.iadd(h);return h.negative=1,S._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var B,I,k=this.cmp(h);if(0===k)return this.negative=0,this.length=1,this.words[0]=0,this;k>0?(B=this,I=h):(B=h,I=this);for(var f=0,R=0;R>26,this.words[R]=67108863&S;for(;0!==f&&R>26,this.words[R]=67108863&S;if(0===f&&R>>13,ve=0|B[1],ae=8191&ve,fe=ve>>>13,pe=0|B[2],Se=8191&pe,ce=pe>>>13,be=0|B[3],Pe=8191&be,Fe=be>>>13,lt=0|B[4],Ge=8191<,He=lt>>>13,Kt=0|B[5],tt=8191&Kt,nt=Kt>>>13,Vt=0|B[6],ot=8191&Vt,at=Vt>>>13,Gt=0|B[7],Re=8191&Gt,Ae=Gt>>>13,Te=0|B[8],Be=8191&Te,Ve=Te>>>13,mt=0|B[9],Ze=8191&mt,ct=mt>>>13,hn=0|I[0],ft=8191&hn,At=hn>>>13,wn=0|I[1],ze=8191&wn,Qe=wn>>>13,Ht=0|I[2],pt=8191&Ht,vt=Ht>>>13,$t=0|I[3],dt=8191&$t,gt=$t>>>13,mn=0|I[4],ut=8191&mn,wt=mn>>>13,Sn=0|I[5],yt=8191&Sn,Et=Sn>>>13,_e=0|I[6],Ee=8191&_e,Me=_e>>>13,me=0|I[7],Oe=8191&me,Ke=me>>>13,it=0|I[8],Ye=8191&it,qe=it>>>13,Bt=0|I[9],Ct=8191&Bt,kt=Bt>>>13;k.negative=h.negative^S.negative,k.length=19;var Ot=(R+(se=Math.imul(Ce,ft))|0)+((8191&(ee=(ee=Math.imul(Ce,At))+Math.imul(ye,ft)|0))<<13)|0;R=((oe=Math.imul(ye,At))+(ee>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,se=Math.imul(ae,ft),ee=(ee=Math.imul(ae,At))+Math.imul(fe,ft)|0,oe=Math.imul(fe,At);var Pt=(R+(se=se+Math.imul(Ce,ze)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,Qe)|0)+Math.imul(ye,ze)|0))<<13)|0;R=((oe=oe+Math.imul(ye,Qe)|0)+(ee>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,se=Math.imul(Se,ft),ee=(ee=Math.imul(Se,At))+Math.imul(ce,ft)|0,oe=Math.imul(ce,At),se=se+Math.imul(ae,ze)|0,ee=(ee=ee+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,oe=oe+Math.imul(fe,Qe)|0;var Lt=(R+(se=se+Math.imul(Ce,pt)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,vt)|0)+Math.imul(ye,pt)|0))<<13)|0;R=((oe=oe+Math.imul(ye,vt)|0)+(ee>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,se=Math.imul(Pe,ft),ee=(ee=Math.imul(Pe,At))+Math.imul(Fe,ft)|0,oe=Math.imul(Fe,At),se=se+Math.imul(Se,ze)|0,ee=(ee=ee+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,oe=oe+Math.imul(ce,Qe)|0,se=se+Math.imul(ae,pt)|0,ee=(ee=ee+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,oe=oe+Math.imul(fe,vt)|0;var nn=(R+(se=se+Math.imul(Ce,dt)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,gt)|0)+Math.imul(ye,dt)|0))<<13)|0;R=((oe=oe+Math.imul(ye,gt)|0)+(ee>>>13)|0)+(nn>>>26)|0,nn&=67108863,se=Math.imul(Ge,ft),ee=(ee=Math.imul(Ge,At))+Math.imul(He,ft)|0,oe=Math.imul(He,At),se=se+Math.imul(Pe,ze)|0,ee=(ee=ee+Math.imul(Pe,Qe)|0)+Math.imul(Fe,ze)|0,oe=oe+Math.imul(Fe,Qe)|0,se=se+Math.imul(Se,pt)|0,ee=(ee=ee+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,oe=oe+Math.imul(ce,vt)|0,se=se+Math.imul(ae,dt)|0,ee=(ee=ee+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,oe=oe+Math.imul(fe,gt)|0;var Yt=(R+(se=se+Math.imul(Ce,ut)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,wt)|0)+Math.imul(ye,ut)|0))<<13)|0;R=((oe=oe+Math.imul(ye,wt)|0)+(ee>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,se=Math.imul(tt,ft),ee=(ee=Math.imul(tt,At))+Math.imul(nt,ft)|0,oe=Math.imul(nt,At),se=se+Math.imul(Ge,ze)|0,ee=(ee=ee+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,oe=oe+Math.imul(He,Qe)|0,se=se+Math.imul(Pe,pt)|0,ee=(ee=ee+Math.imul(Pe,vt)|0)+Math.imul(Fe,pt)|0,oe=oe+Math.imul(Fe,vt)|0,se=se+Math.imul(Se,dt)|0,ee=(ee=ee+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,oe=oe+Math.imul(ce,gt)|0,se=se+Math.imul(ae,ut)|0,ee=(ee=ee+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,oe=oe+Math.imul(fe,wt)|0;var gn=(R+(se=se+Math.imul(Ce,yt)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,Et)|0)+Math.imul(ye,yt)|0))<<13)|0;R=((oe=oe+Math.imul(ye,Et)|0)+(ee>>>13)|0)+(gn>>>26)|0,gn&=67108863,se=Math.imul(ot,ft),ee=(ee=Math.imul(ot,At))+Math.imul(at,ft)|0,oe=Math.imul(at,At),se=se+Math.imul(tt,ze)|0,ee=(ee=ee+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,oe=oe+Math.imul(nt,Qe)|0,se=se+Math.imul(Ge,pt)|0,ee=(ee=ee+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,oe=oe+Math.imul(He,vt)|0,se=se+Math.imul(Pe,dt)|0,ee=(ee=ee+Math.imul(Pe,gt)|0)+Math.imul(Fe,dt)|0,oe=oe+Math.imul(Fe,gt)|0,se=se+Math.imul(Se,ut)|0,ee=(ee=ee+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,oe=oe+Math.imul(ce,wt)|0,se=se+Math.imul(ae,yt)|0,ee=(ee=ee+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,oe=oe+Math.imul(fe,Et)|0;var an=(R+(se=se+Math.imul(Ce,Ee)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,Me)|0)+Math.imul(ye,Ee)|0))<<13)|0;R=((oe=oe+Math.imul(ye,Me)|0)+(ee>>>13)|0)+(an>>>26)|0,an&=67108863,se=Math.imul(Re,ft),ee=(ee=Math.imul(Re,At))+Math.imul(Ae,ft)|0,oe=Math.imul(Ae,At),se=se+Math.imul(ot,ze)|0,ee=(ee=ee+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,oe=oe+Math.imul(at,Qe)|0,se=se+Math.imul(tt,pt)|0,ee=(ee=ee+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,oe=oe+Math.imul(nt,vt)|0,se=se+Math.imul(Ge,dt)|0,ee=(ee=ee+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,oe=oe+Math.imul(He,gt)|0,se=se+Math.imul(Pe,ut)|0,ee=(ee=ee+Math.imul(Pe,wt)|0)+Math.imul(Fe,ut)|0,oe=oe+Math.imul(Fe,wt)|0,se=se+Math.imul(Se,yt)|0,ee=(ee=ee+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,oe=oe+Math.imul(ce,Et)|0,se=se+Math.imul(ae,Ee)|0,ee=(ee=ee+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,oe=oe+Math.imul(fe,Me)|0;var tn=(R+(se=se+Math.imul(Ce,Oe)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,Ke)|0)+Math.imul(ye,Oe)|0))<<13)|0;R=((oe=oe+Math.imul(ye,Ke)|0)+(ee>>>13)|0)+(tn>>>26)|0,tn&=67108863,se=Math.imul(Be,ft),ee=(ee=Math.imul(Be,At))+Math.imul(Ve,ft)|0,oe=Math.imul(Ve,At),se=se+Math.imul(Re,ze)|0,ee=(ee=ee+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,oe=oe+Math.imul(Ae,Qe)|0,se=se+Math.imul(ot,pt)|0,ee=(ee=ee+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,oe=oe+Math.imul(at,vt)|0,se=se+Math.imul(tt,dt)|0,ee=(ee=ee+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,oe=oe+Math.imul(nt,gt)|0,se=se+Math.imul(Ge,ut)|0,ee=(ee=ee+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,oe=oe+Math.imul(He,wt)|0,se=se+Math.imul(Pe,yt)|0,ee=(ee=ee+Math.imul(Pe,Et)|0)+Math.imul(Fe,yt)|0,oe=oe+Math.imul(Fe,Et)|0,se=se+Math.imul(Se,Ee)|0,ee=(ee=ee+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,oe=oe+Math.imul(ce,Me)|0,se=se+Math.imul(ae,Oe)|0,ee=(ee=ee+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,oe=oe+Math.imul(fe,Ke)|0;var Ut=(R+(se=se+Math.imul(Ce,Ye)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;R=((oe=oe+Math.imul(ye,qe)|0)+(ee>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,se=Math.imul(Ze,ft),ee=(ee=Math.imul(Ze,At))+Math.imul(ct,ft)|0,oe=Math.imul(ct,At),se=se+Math.imul(Be,ze)|0,ee=(ee=ee+Math.imul(Be,Qe)|0)+Math.imul(Ve,ze)|0,oe=oe+Math.imul(Ve,Qe)|0,se=se+Math.imul(Re,pt)|0,ee=(ee=ee+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,oe=oe+Math.imul(Ae,vt)|0,se=se+Math.imul(ot,dt)|0,ee=(ee=ee+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,oe=oe+Math.imul(at,gt)|0,se=se+Math.imul(tt,ut)|0,ee=(ee=ee+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,oe=oe+Math.imul(nt,wt)|0,se=se+Math.imul(Ge,yt)|0,ee=(ee=ee+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,oe=oe+Math.imul(He,Et)|0,se=se+Math.imul(Pe,Ee)|0,ee=(ee=ee+Math.imul(Pe,Me)|0)+Math.imul(Fe,Ee)|0,oe=oe+Math.imul(Fe,Me)|0,se=se+Math.imul(Se,Oe)|0,ee=(ee=ee+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,oe=oe+Math.imul(ce,Ke)|0,se=se+Math.imul(ae,Ye)|0,ee=(ee=ee+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0,oe=oe+Math.imul(fe,qe)|0;var cn=(R+(se=se+Math.imul(Ce,Ct)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ce,kt)|0)+Math.imul(ye,Ct)|0))<<13)|0;R=((oe=oe+Math.imul(ye,kt)|0)+(ee>>>13)|0)+(cn>>>26)|0,cn&=67108863,se=Math.imul(Ze,ze),ee=(ee=Math.imul(Ze,Qe))+Math.imul(ct,ze)|0,oe=Math.imul(ct,Qe),se=se+Math.imul(Be,pt)|0,ee=(ee=ee+Math.imul(Be,vt)|0)+Math.imul(Ve,pt)|0,oe=oe+Math.imul(Ve,vt)|0,se=se+Math.imul(Re,dt)|0,ee=(ee=ee+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,oe=oe+Math.imul(Ae,gt)|0,se=se+Math.imul(ot,ut)|0,ee=(ee=ee+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,oe=oe+Math.imul(at,wt)|0,se=se+Math.imul(tt,yt)|0,ee=(ee=ee+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,oe=oe+Math.imul(nt,Et)|0,se=se+Math.imul(Ge,Ee)|0,ee=(ee=ee+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,oe=oe+Math.imul(He,Me)|0,se=se+Math.imul(Pe,Oe)|0,ee=(ee=ee+Math.imul(Pe,Ke)|0)+Math.imul(Fe,Oe)|0,oe=oe+Math.imul(Fe,Ke)|0,se=se+Math.imul(Se,Ye)|0,ee=(ee=ee+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0,oe=oe+Math.imul(ce,qe)|0;var Jt=(R+(se=se+Math.imul(ae,Ct)|0)|0)+((8191&(ee=(ee=ee+Math.imul(ae,kt)|0)+Math.imul(fe,Ct)|0))<<13)|0;R=((oe=oe+Math.imul(fe,kt)|0)+(ee>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,se=Math.imul(Ze,pt),ee=(ee=Math.imul(Ze,vt))+Math.imul(ct,pt)|0,oe=Math.imul(ct,vt),se=se+Math.imul(Be,dt)|0,ee=(ee=ee+Math.imul(Be,gt)|0)+Math.imul(Ve,dt)|0,oe=oe+Math.imul(Ve,gt)|0,se=se+Math.imul(Re,ut)|0,ee=(ee=ee+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,oe=oe+Math.imul(Ae,wt)|0,se=se+Math.imul(ot,yt)|0,ee=(ee=ee+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,oe=oe+Math.imul(at,Et)|0,se=se+Math.imul(tt,Ee)|0,ee=(ee=ee+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,oe=oe+Math.imul(nt,Me)|0,se=se+Math.imul(Ge,Oe)|0,ee=(ee=ee+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,oe=oe+Math.imul(He,Ke)|0,se=se+Math.imul(Pe,Ye)|0,ee=(ee=ee+Math.imul(Pe,qe)|0)+Math.imul(Fe,Ye)|0,oe=oe+Math.imul(Fe,qe)|0;var Zt=(R+(se=se+Math.imul(Se,Ct)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Se,kt)|0)+Math.imul(ce,Ct)|0))<<13)|0;R=((oe=oe+Math.imul(ce,kt)|0)+(ee>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,se=Math.imul(Ze,dt),ee=(ee=Math.imul(Ze,gt))+Math.imul(ct,dt)|0,oe=Math.imul(ct,gt),se=se+Math.imul(Be,ut)|0,ee=(ee=ee+Math.imul(Be,wt)|0)+Math.imul(Ve,ut)|0,oe=oe+Math.imul(Ve,wt)|0,se=se+Math.imul(Re,yt)|0,ee=(ee=ee+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,oe=oe+Math.imul(Ae,Et)|0,se=se+Math.imul(ot,Ee)|0,ee=(ee=ee+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,oe=oe+Math.imul(at,Me)|0,se=se+Math.imul(tt,Oe)|0,ee=(ee=ee+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,oe=oe+Math.imul(nt,Ke)|0,se=se+Math.imul(Ge,Ye)|0,ee=(ee=ee+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0,oe=oe+Math.imul(He,qe)|0;var fn=(R+(se=se+Math.imul(Pe,Ct)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Pe,kt)|0)+Math.imul(Fe,Ct)|0))<<13)|0;R=((oe=oe+Math.imul(Fe,kt)|0)+(ee>>>13)|0)+(fn>>>26)|0,fn&=67108863,se=Math.imul(Ze,ut),ee=(ee=Math.imul(Ze,wt))+Math.imul(ct,ut)|0,oe=Math.imul(ct,wt),se=se+Math.imul(Be,yt)|0,ee=(ee=ee+Math.imul(Be,Et)|0)+Math.imul(Ve,yt)|0,oe=oe+Math.imul(Ve,Et)|0,se=se+Math.imul(Re,Ee)|0,ee=(ee=ee+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,oe=oe+Math.imul(Ae,Me)|0,se=se+Math.imul(ot,Oe)|0,ee=(ee=ee+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,oe=oe+Math.imul(at,Ke)|0,se=se+Math.imul(tt,Ye)|0,ee=(ee=ee+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0,oe=oe+Math.imul(nt,qe)|0;var Qt=(R+(se=se+Math.imul(Ge,Ct)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Ge,kt)|0)+Math.imul(He,Ct)|0))<<13)|0;R=((oe=oe+Math.imul(He,kt)|0)+(ee>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,se=Math.imul(Ze,yt),ee=(ee=Math.imul(Ze,Et))+Math.imul(ct,yt)|0,oe=Math.imul(ct,Et),se=se+Math.imul(Be,Ee)|0,ee=(ee=ee+Math.imul(Be,Me)|0)+Math.imul(Ve,Ee)|0,oe=oe+Math.imul(Ve,Me)|0,se=se+Math.imul(Re,Oe)|0,ee=(ee=ee+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,oe=oe+Math.imul(Ae,Ke)|0,se=se+Math.imul(ot,Ye)|0,ee=(ee=ee+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0,oe=oe+Math.imul(at,qe)|0;var Dt=(R+(se=se+Math.imul(tt,Ct)|0)|0)+((8191&(ee=(ee=ee+Math.imul(tt,kt)|0)+Math.imul(nt,Ct)|0))<<13)|0;R=((oe=oe+Math.imul(nt,kt)|0)+(ee>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,se=Math.imul(Ze,Ee),ee=(ee=Math.imul(Ze,Me))+Math.imul(ct,Ee)|0,oe=Math.imul(ct,Me),se=se+Math.imul(Be,Oe)|0,ee=(ee=ee+Math.imul(Be,Ke)|0)+Math.imul(Ve,Oe)|0,oe=oe+Math.imul(Ve,Ke)|0,se=se+Math.imul(Re,Ye)|0,ee=(ee=ee+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0,oe=oe+Math.imul(Ae,qe)|0;var Mt=(R+(se=se+Math.imul(ot,Ct)|0)|0)+((8191&(ee=(ee=ee+Math.imul(ot,kt)|0)+Math.imul(at,Ct)|0))<<13)|0;R=((oe=oe+Math.imul(at,kt)|0)+(ee>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,se=Math.imul(Ze,Oe),ee=(ee=Math.imul(Ze,Ke))+Math.imul(ct,Oe)|0,oe=Math.imul(ct,Ke),se=se+Math.imul(Be,Ye)|0,ee=(ee=ee+Math.imul(Be,qe)|0)+Math.imul(Ve,Ye)|0,oe=oe+Math.imul(Ve,qe)|0;var Xt=(R+(se=se+Math.imul(Re,Ct)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Re,kt)|0)+Math.imul(Ae,Ct)|0))<<13)|0;R=((oe=oe+Math.imul(Ae,kt)|0)+(ee>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,se=Math.imul(Ze,Ye),ee=(ee=Math.imul(Ze,qe))+Math.imul(ct,Ye)|0,oe=Math.imul(ct,qe);var Ft=(R+(se=se+Math.imul(Be,Ct)|0)|0)+((8191&(ee=(ee=ee+Math.imul(Be,kt)|0)+Math.imul(Ve,Ct)|0))<<13)|0;R=((oe=oe+Math.imul(Ve,kt)|0)+(ee>>>13)|0)+(Ft>>>26)|0,Ft&=67108863;var jt=(R+(se=Math.imul(Ze,Ct))|0)+((8191&(ee=(ee=Math.imul(Ze,kt))+Math.imul(ct,Ct)|0))<<13)|0;return R=((oe=Math.imul(ct,kt))+(ee>>>13)|0)+(jt>>>26)|0,jt&=67108863,f[0]=Ot,f[1]=Pt,f[2]=Lt,f[3]=nn,f[4]=Yt,f[5]=gn,f[6]=an,f[7]=tn,f[8]=Ut,f[9]=cn,f[10]=Jt,f[11]=Zt,f[12]=fn,f[13]=Qt,f[14]=Dt,f[15]=Mt,f[16]=Xt,f[17]=Ft,f[18]=jt,0!==R&&(f[19]=R,k.length++),k};function W(d,h,S){S.negative=h.negative^d.negative,S.length=d.length+h.length;for(var k=0,B=0,I=0;I>>26)|0)>>>26,f&=67108863}S.words[I]=R,k=f,f=B}return 0!==k?S.words[I]=k:S.length--,S._strip()}function Y(d,h,S){return W(d,h,S)}function G(d,h){this.x=d,this.y=h}Math.imul||(j=z),l.prototype.mulTo=function(h,S){var B=this.length+h.length;return 10===this.length&&10===h.length?j(this,h,S):B<63?z(this,h,S):B<1024?W(this,h,S):Y(this,h,S)},G.prototype.makeRBT=function(h){for(var S=new Array(h),k=l.prototype._countBits(h)-1,B=0;B>=1;return B},G.prototype.permute=function(h,S,k,B,I,f){for(var R=0;R>>=1)I++;return 1<>>=13,k[2*f+1]=8191&I,I>>>=13;for(f=2*S;f>=26,k+=I/67108864|0,k+=f>>>26,this.words[B]=67108863&f}return 0!==k&&(this.words[B]=k,this.length++),S?this.ineg():this},l.prototype.muln=function(h){return this.clone().imuln(h)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(h){var S=function L(d){for(var h=new Array(d.bitLength()),S=0;S>>B&1}return h}(h);if(0===S.length)return new l(1);for(var k=this,B=0;B=0);var I,S=h%26,k=(h-S)/26,B=67108863>>>26-S<<26-S;if(0!==S){var f=0;for(I=0;I>>26-S}f&&(this.words[I]=f,this.length++)}if(0!==k){for(I=this.length-1;I>=0;I--)this.words[I+k]=this.words[I];for(I=0;I=0),B=S?(S-S%26)/26:0;var I=h%26,f=Math.min((h-I)/26,this.length),R=67108863^67108863>>>I<f)for(this.length-=f,ee=0;ee=0&&(0!==oe||ee>=B);ee--){var de=0|this.words[ee];this.words[ee]=oe<<26-I|de>>>I,oe=de&R}return se&&0!==oe&&(se.words[se.length++]=oe),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},l.prototype.ishrn=function(h,S,k){return w(0===this.negative),this.iushrn(h,S,k)},l.prototype.shln=function(h){return this.clone().ishln(h)},l.prototype.ushln=function(h){return this.clone().iushln(h)},l.prototype.shrn=function(h){return this.clone().ishrn(h)},l.prototype.ushrn=function(h){return this.clone().iushrn(h)},l.prototype.testn=function(h){w("number"==typeof h&&h>=0);var S=h%26,k=(h-S)/26,B=1<=0);var S=h%26,k=(h-S)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=k)return this;if(0!==S&&k++,this.length=Math.min(k,this.length),0!==S){var B=67108863^67108863>>>S<=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},l.prototype.isubn=function(h){if(w("number"==typeof h),w(h<67108864),h<0)return this.iaddn(-h);if(0!==this.negative)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S>26)-(se/67108864|0),this.words[I+k]=67108863&f}for(;I>26,this.words[I+k]=67108863&f;if(0===R)return this._strip();for(w(-1===R),R=0,I=0;I>26,this.words[I]=67108863&f;return this.negative=1,this._strip()},l.prototype._wordDiv=function(h,S){var k=(this.length,h.length),B=this.clone(),I=h,f=0|I.words[I.length-1];0!==(k=26-this._countBits(f))&&(I=I.ushln(k),B.iushln(k),f=0|I.words[I.length-1]);var ee,se=B.length-I.length;if("mod"!==S){(ee=new l(null)).length=se+1,ee.words=new Array(ee.length);for(var oe=0;oe=0;Ce--){var ye=67108864*(0|B.words[I.length+Ce])+(0|B.words[I.length+Ce-1]);for(ye=Math.min(ye/f|0,67108863),B._ishlnsubmul(I,ye,Ce);0!==B.negative;)ye--,B.negative=0,B._ishlnsubmul(I,1,Ce),B.isZero()||(B.negative^=1);ee&&(ee.words[Ce]=ye)}return ee&&ee._strip(),B._strip(),"div"!==S&&0!==k&&B.iushrn(k),{div:ee||null,mod:B}},l.prototype.divmod=function(h,S,k){return w(!h.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===h.negative?(f=this.neg().divmod(h,S),"mod"!==S&&(B=f.div.neg()),"div"!==S&&(I=f.mod.neg(),k&&0!==I.negative&&I.iadd(h)),{div:B,mod:I}):0===this.negative&&0!==h.negative?(f=this.divmod(h.neg(),S),"mod"!==S&&(B=f.div.neg()),{div:B,mod:f.mod}):this.negative&h.negative?(f=this.neg().divmod(h.neg(),S),"div"!==S&&(I=f.mod.neg(),k&&0!==I.negative&&I.isub(h)),{div:f.div,mod:I}):h.length>this.length||this.cmp(h)<0?{div:new l(0),mod:this}:1===h.length?"div"===S?{div:this.divn(h.words[0]),mod:null}:"mod"===S?{div:null,mod:new l(this.modrn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new l(this.modrn(h.words[0]))}:this._wordDiv(h,S);var B,I,f},l.prototype.div=function(h){return this.divmod(h,"div",!1).div},l.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},l.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},l.prototype.divRound=function(h){var S=this.divmod(h);if(S.mod.isZero())return S.div;var k=0!==S.div.negative?S.mod.isub(h):S.mod,B=h.ushrn(1),I=h.andln(1),f=k.cmp(B);return f<0||1===I&&0===f?S.div:0!==S.div.negative?S.div.isubn(1):S.div.iaddn(1)},l.prototype.modrn=function(h){var S=h<0;S&&(h=-h),w(h<=67108863);for(var k=(1<<26)%h,B=0,I=this.length-1;I>=0;I--)B=(k*B+(0|this.words[I]))%h;return S?-B:B},l.prototype.modn=function(h){return this.modrn(h)},l.prototype.idivn=function(h){var S=h<0;S&&(h=-h),w(h<=67108863);for(var k=0,B=this.length-1;B>=0;B--){var I=(0|this.words[B])+67108864*k;this.words[B]=I/h|0,k=I%h}return this._strip(),S?this.ineg():this},l.prototype.divn=function(h){return this.clone().idivn(h)},l.prototype.egcd=function(h){w(0===h.negative),w(!h.isZero());var S=this,k=h.clone();S=0!==S.negative?S.umod(h):S.clone();for(var B=new l(1),I=new l(0),f=new l(0),R=new l(1),se=0;S.isEven()&&k.isEven();)S.iushrn(1),k.iushrn(1),++se;for(var ee=k.clone(),oe=S.clone();!S.isZero();){for(var de=0,Ce=1;!(S.words[0]&Ce)&&de<26;++de,Ce<<=1);if(de>0)for(S.iushrn(de);de-- >0;)(B.isOdd()||I.isOdd())&&(B.iadd(ee),I.isub(oe)),B.iushrn(1),I.iushrn(1);for(var ye=0,ve=1;!(k.words[0]&ve)&&ye<26;++ye,ve<<=1);if(ye>0)for(k.iushrn(ye);ye-- >0;)(f.isOdd()||R.isOdd())&&(f.iadd(ee),R.isub(oe)),f.iushrn(1),R.iushrn(1);S.cmp(k)>=0?(S.isub(k),B.isub(f),I.isub(R)):(k.isub(S),f.isub(B),R.isub(I))}return{a:f,b:R,gcd:k.iushln(se)}},l.prototype._invmp=function(h){w(0===h.negative),w(!h.isZero());var de,S=this,k=h.clone();S=0!==S.negative?S.umod(h):S.clone();for(var B=new l(1),I=new l(0),f=k.clone();S.cmpn(1)>0&&k.cmpn(1)>0;){for(var R=0,se=1;!(S.words[0]&se)&&R<26;++R,se<<=1);if(R>0)for(S.iushrn(R);R-- >0;)B.isOdd()&&B.iadd(f),B.iushrn(1);for(var ee=0,oe=1;!(k.words[0]&oe)&&ee<26;++ee,oe<<=1);if(ee>0)for(k.iushrn(ee);ee-- >0;)I.isOdd()&&I.iadd(f),I.iushrn(1);S.cmp(k)>=0?(S.isub(k),B.isub(I)):(k.isub(S),I.isub(B))}return(de=0===S.cmpn(1)?B:I).cmpn(0)<0&&de.iadd(h),de},l.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var S=this.clone(),k=h.clone();S.negative=0,k.negative=0;for(var B=0;S.isEven()&&k.isEven();B++)S.iushrn(1),k.iushrn(1);for(;;){for(;S.isEven();)S.iushrn(1);for(;k.isEven();)k.iushrn(1);var I=S.cmp(k);if(I<0){var f=S;S=k,k=f}else if(0===I||0===k.cmpn(1))break;S.isub(k)}return k.iushln(B)},l.prototype.invm=function(h){return this.egcd(h).a.umod(h)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(h){return this.words[0]&h},l.prototype.bincn=function(h){w("number"==typeof h);var S=h%26,k=(h-S)/26,B=1<>>26,R&=67108863,this.words[f]=R}return 0!==I&&(this.words[f]=I,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(h){var k,S=h<0;if(0!==this.negative&&!S)return-1;if(0===this.negative&&S)return 1;if(this._strip(),this.length>1)k=1;else{S&&(h=-h),w(h<=67108863,"Number is too big");var B=0|this.words[0];k=B===h?0:Bh.length)return 1;if(this.length=0;k--){var B=0|this.words[k],I=0|h.words[k];if(B!==I){BI&&(S=1);break}}return S},l.prototype.gtn=function(h){return 1===this.cmpn(h)},l.prototype.gt=function(h){return 1===this.cmp(h)},l.prototype.gten=function(h){return this.cmpn(h)>=0},l.prototype.gte=function(h){return this.cmp(h)>=0},l.prototype.ltn=function(h){return-1===this.cmpn(h)},l.prototype.lt=function(h){return-1===this.cmp(h)},l.prototype.lten=function(h){return this.cmpn(h)<=0},l.prototype.lte=function(h){return this.cmp(h)<=0},l.prototype.eqn=function(h){return 0===this.cmpn(h)},l.prototype.eq=function(h){return 0===this.cmp(h)},l.red=function(h){return new o(h)},l.prototype.toRed=function(h){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),h.convertTo(this)._forceRed(h)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(h){return this.red=h,this},l.prototype.forceRed=function(h){return w(!this.red,"Already a number in reduction context"),this._forceRed(h)},l.prototype.redAdd=function(h){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},l.prototype.redIAdd=function(h){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},l.prototype.redSub=function(h){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},l.prototype.redISub=function(h){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},l.prototype.redShl=function(h){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},l.prototype.redMul=function(h){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},l.prototype.redIMul=function(h){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(h){return w(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var Q={k256:null,p224:null,p192:null,p25519:null};function q(d,h){this.name=d,this.p=new l(h,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function J(){q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function H(){q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function te(){q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function o(d){if("string"==typeof d){var h=l._prime(d);this.m=h.p,this.prime=h}else w(d.gtn(1),"modulus must be greater than 1"),this.m=d,this.prime=null}function s(d){o.call(this,d),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}q.prototype._tmp=function(){var h=new l(null);return h.words=new Array(Math.ceil(this.n/13)),h},q.prototype.ireduce=function(h){var k,S=h;do{this.split(S,this.tmp),k=(S=(S=this.imulK(S)).iadd(this.tmp)).bitLength()}while(k>this.n);var B=k0?S.isub(this.p):void 0!==S.strip?S.strip():S._strip(),S},q.prototype.split=function(h,S){h.iushrn(this.n,0,S)},q.prototype.imulK=function(h){return h.imul(this.k)},_(J,q),J.prototype.split=function(h,S){for(var k=4194303,B=Math.min(h.length,9),I=0;I>>22,f=R}f>>>=22,h.words[I-10]=f,0===f&&h.length>10?h.length-=10:h.length-=9},J.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var S=0,k=0;k>>=26,h.words[k]=I,S=B}return 0!==S&&(h.words[h.length++]=S),h},l._prime=function(h){if(Q[h])return Q[h];var S;if("k256"===h)S=new J;else if("p224"===h)S=new H;else if("p192"===h)S=new te;else{if("p25519"!==h)throw new Error("Unknown prime "+h);S=new C}return Q[h]=S,S},o.prototype._verify1=function(h){w(0===h.negative,"red works only with positives"),w(h.red,"red works only with red numbers")},o.prototype._verify2=function(h,S){w(0==(h.negative|S.negative),"red works only with positives"),w(h.red&&h.red===S.red,"red works only with red numbers")},o.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):(E(h,h.umod(this.m)._forceRed(this)),h)},o.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},o.prototype.add=function(h,S){this._verify2(h,S);var k=h.add(S);return k.cmp(this.m)>=0&&k.isub(this.m),k._forceRed(this)},o.prototype.iadd=function(h,S){this._verify2(h,S);var k=h.iadd(S);return k.cmp(this.m)>=0&&k.isub(this.m),k},o.prototype.sub=function(h,S){this._verify2(h,S);var k=h.sub(S);return k.cmpn(0)<0&&k.iadd(this.m),k._forceRed(this)},o.prototype.isub=function(h,S){this._verify2(h,S);var k=h.isub(S);return k.cmpn(0)<0&&k.iadd(this.m),k},o.prototype.shl=function(h,S){return this._verify1(h),this.imod(h.ushln(S))},o.prototype.imul=function(h,S){return this._verify2(h,S),this.imod(h.imul(S))},o.prototype.mul=function(h,S){return this._verify2(h,S),this.imod(h.mul(S))},o.prototype.isqr=function(h){return this.imul(h,h.clone())},o.prototype.sqr=function(h){return this.mul(h,h)},o.prototype.sqrt=function(h){if(h.isZero())return h.clone();var S=this.m.andln(3);if(w(S%2==1),3===S){var k=this.m.add(new l(1)).iushrn(2);return this.pow(h,k)}for(var B=this.m.subn(1),I=0;!B.isZero()&&0===B.andln(1);)I++,B.iushrn(1);w(!B.isZero());var f=new l(1).toRed(this),R=f.redNeg(),se=this.m.subn(1).iushrn(1),ee=this.m.bitLength();for(ee=new l(2*ee*ee).toRed(this);0!==this.pow(ee,se).cmp(R);)ee.redIAdd(R);for(var oe=this.pow(ee,B),de=this.pow(h,B.addn(1).iushrn(1)),Ce=this.pow(h,B),ye=I;0!==Ce.cmp(f);){for(var ve=Ce,ae=0;0!==ve.cmp(f);ae++)ve=ve.redSqr();w(ae=0;I--){for(var oe=S.words[I],de=ee-1;de>=0;de--){var Ce=oe>>de&1;(f!==B[0]&&(f=this.sqr(f)),0!==Ce||0!==R)?(R<<=1,R|=Ce,(4===++se||0===I&&0===de)&&(f=this.mul(f,B[R]),se=0,R=0)):se=0}ee=26}return f},o.prototype.convertTo=function(h){var S=h.umod(this.m);return S===h?S.clone():S},o.prototype.convertFrom=function(h){var S=h.clone();return S.red=null,S},l.mont=function(h){return new s(h)},_(s,o),s.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},s.prototype.convertFrom=function(h){var S=this.imod(h.mul(this.rinv));return S.red=null,S},s.prototype.imul=function(h,S){if(h.isZero()||S.isZero())return h.words[0]=0,h.length=1,h;var k=h.imul(S),B=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=k.isub(B).iushrn(this.shift),f=I;return I.cmp(this.m)>=0?f=I.isub(this.m):I.cmpn(0)<0&&(f=I.iadd(this.m)),f._forceRed(this)},s.prototype.mul=function(h,S){if(h.isZero()||S.isZero())return new l(0)._forceRed(this);var k=h.mul(S),B=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=k.isub(B).iushrn(this.shift),f=I;return I.cmp(this.m)>=0?f=I.isub(this.m):I.cmpn(0)<0&&(f=I.iadd(this.m)),f._forceRed(this)},s.prototype.invm=function(h){return this.imod(h._invmp(this.m).mul(this.r2))._forceRed(this)}})(re=g.nmd(re),this)},21531:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(te,C,o,s){void 0===s&&(s=o),Object.defineProperty(te,s,{enumerable:!0,get:function(){return C[o]}})}:function(te,C,o,s){void 0===s&&(s=o),te[s]=C[o]}),D=this&&this.__setModuleDefault||(Object.create?function(te,C){Object.defineProperty(te,"default",{enumerable:!0,value:C})}:function(te,C){te.default=C}),w=this&&this.__decorate||function(te,C,o,s){var S,d=arguments.length,h=d<3?C:null===s?s=Object.getOwnPropertyDescriptor(C,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(te,C,o,s);else for(var k=te.length-1;k>=0;k--)(S=te[k])&&(h=(d<3?S(h):d>3?S(C,o,h):S(C,o))||h);return d>3&&h&&Object.defineProperty(C,o,h),h},_=this&&this.__importStar||function(te){if(te&&te.__esModule)return te;var C={};if(null!=te)for(var o in te)"default"!==o&&Object.hasOwnProperty.call(te,o)&&p(C,te,o);return D(C,te),C},l=this&&this.__importDefault||function(te){return te&&te.__esModule?te:{default:te}};Object.defineProperty(u,"__esModule",{value:!0}),u.deserializeUnchecked=u.deserialize=u.serialize=u.BinaryReader=u.BinaryWriter=u.BorshError=u.baseDecode=u.baseEncode=void 0;const v=l(g(98538)),m=l(g(39076)),b=_(g(62949)),E=new("function"!=typeof TextDecoder?b.TextDecoder:TextDecoder)("utf-8",{fatal:!0});u.baseEncode=function A(te){return"string"==typeof te&&(te=Buffer.from(te,"utf8")),m.default.encode(Buffer.from(te))},u.baseDecode=function P(te){return Buffer.from(m.default.decode(te))};const x=1024;class N extends Error{constructor(C){super(C),this.fieldPath=[],this.originalMessage=C}addToFieldPath(C){this.fieldPath.splice(0,0,C),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}u.BorshError=N;class F{constructor(){this.buf=Buffer.alloc(x),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(x)]))}writeU8(C){this.maybeResize(),this.buf.writeUInt8(C,this.length),this.length+=1}writeU16(C){this.maybeResize(),this.buf.writeUInt16LE(C,this.length),this.length+=2}writeU32(C){this.maybeResize(),this.buf.writeUInt32LE(C,this.length),this.length+=4}writeU64(C){this.maybeResize(),this.writeBuffer(Buffer.from(new v.default(C).toArray("le",8)))}writeU128(C){this.maybeResize(),this.writeBuffer(Buffer.from(new v.default(C).toArray("le",16)))}writeU256(C){this.maybeResize(),this.writeBuffer(Buffer.from(new v.default(C).toArray("le",32)))}writeU512(C){this.maybeResize(),this.writeBuffer(Buffer.from(new v.default(C).toArray("le",64)))}writeBuffer(C){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),C,Buffer.alloc(x)]),this.length+=C.length}writeString(C){this.maybeResize();const o=Buffer.from(C,"utf8");this.writeU32(o.length),this.writeBuffer(o)}writeFixedArray(C){this.writeBuffer(Buffer.from(C))}writeArray(C,o){this.maybeResize(),this.writeU32(C.length);for(const s of C)this.maybeResize(),o(s)}toArray(){return this.buf.subarray(0,this.length)}}function L(te,C,o){const s=o.value;o.value=function(...d){try{return s.apply(this,d)}catch(h){if(h instanceof RangeError){const S=h.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(S)>=0)throw new N("Reached the end of buffer when deserializing")}throw h}}}u.BinaryWriter=F;class z{constructor(C){this.buf=C,this.offset=0}readU8(){const C=this.buf.readUInt8(this.offset);return this.offset+=1,C}readU16(){const C=this.buf.readUInt16LE(this.offset);return this.offset+=2,C}readU32(){const C=this.buf.readUInt32LE(this.offset);return this.offset+=4,C}readU64(){const C=this.readBuffer(8);return new v.default(C,"le")}readU128(){const C=this.readBuffer(16);return new v.default(C,"le")}readU256(){const C=this.readBuffer(32);return new v.default(C,"le")}readU512(){const C=this.readBuffer(64);return new v.default(C,"le")}readBuffer(C){if(this.offset+C>this.buf.length)throw new N(`Expected buffer length ${C} isn't within bounds`);const o=this.buf.slice(this.offset,this.offset+C);return this.offset+=C,o}readString(){const C=this.readU32(),o=this.readBuffer(C);try{return E.decode(o)}catch(s){throw new N(`Error decoding UTF-8 string: ${s}`)}}readFixedArray(C){return new Uint8Array(this.readBuffer(C))}readArray(C){const o=this.readU32(),s=Array();for(let d=0;d{W(te,C,h,s[0],d)});else if(void 0!==s.kind)switch(s.kind){case"option":null==o?d.writeU8(0):(d.writeU8(1),W(te,C,o,s.type,d));break;case"map":d.writeU32(o.size),o.forEach((h,S)=>{W(te,C,S,s.key,d),W(te,C,h,s.value,d)});break;default:throw new N(`FieldType ${s} unrecognized`)}else Y(te,o,d)}catch(h){throw h instanceof N&&h.addToFieldPath(C),h}}function Y(te,C,o){if("function"==typeof C.borshSerialize)return void C.borshSerialize(o);const s=te.get(C.constructor);if(!s)throw new N(`Class ${C.constructor.name} is missing in schema`);if("struct"===s.kind)s.fields.map(([d,h])=>{W(te,d,C[d],h,o)});else{if("enum"!==s.kind)throw new N(`Unexpected schema kind: ${s.kind} for ${C.constructor.name}`);{const d=C[s.field];for(let h=0;hQ(te,C,o[0],s))}if("option"===o.kind)return s.readU8()?Q(te,C,o.type,s):void 0;if("map"===o.kind){let d=new Map;const h=s.readU32();for(let S=0;S=s.values.length)throw new N(`Enum index: ${d} is out of range`);const[h,S]=s.values[d];return new C({[h]:Q(te,h,S,o)})}throw new N(`Unexpected schema kind: ${s.kind} for ${C.constructor.name}`)}w([L],z.prototype,"readU8",null),w([L],z.prototype,"readU16",null),w([L],z.prototype,"readU32",null),w([L],z.prototype,"readU64",null),w([L],z.prototype,"readU128",null),w([L],z.prototype,"readU256",null),w([L],z.prototype,"readU512",null),w([L],z.prototype,"readString",null),w([L],z.prototype,"readFixedArray",null),w([L],z.prototype,"readArray",null),u.BinaryReader=z,u.serialize=function G(te,C,o=F){const s=new o;return Y(te,C,s),s.toArray()},u.deserialize=function J(te,C,o,s=z){const d=new s(o),h=q(te,C,d);if(d.offset{var p=g(21082);re.exports=p("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},37950:(re,u,g)=>{var p;function D(_){this.rand=_}if(re.exports=function(l){return p||(p=new D(null)),p.generate(l)},re.exports.Rand=D,D.prototype.generate=function(l){return this._rand(l)},D.prototype._rand=function(l){if(this.rand.getBytes)return this.rand.getBytes(l);for(var v=new Uint8Array(l),m=0;m{var p=g(73502).Buffer;function D(b){p.isBuffer(b)||(b=p.from(b));for(var M=b.length/4|0,E=new Array(M),A=0;A>>24]^N[j>>>16&255]^F[W>>>8&255]^L[255&Y]^M[H++],Q=x[j>>>24]^N[W>>>16&255]^F[Y>>>8&255]^L[255&z]^M[H++],q=x[W>>>24]^N[Y>>>16&255]^F[z>>>8&255]^L[255&j]^M[H++],J=x[Y>>>24]^N[z>>>16&255]^F[j>>>8&255]^L[255&W]^M[H++],z=G,j=Q,W=q,Y=J;return G=(A[z>>>24]<<24|A[j>>>16&255]<<16|A[W>>>8&255]<<8|A[255&Y])^M[H++],Q=(A[j>>>24]<<24|A[W>>>16&255]<<16|A[Y>>>8&255]<<8|A[255&z])^M[H++],q=(A[W>>>24]<<24|A[Y>>>16&255]<<16|A[z>>>8&255]<<8|A[255&j])^M[H++],J=(A[Y>>>24]<<24|A[z>>>16&255]<<16|A[j>>>8&255]<<8|A[255&W])^M[H++],[G>>>=0,Q>>>=0,q>>>=0,J>>>=0]}var l=[0,1,2,4,8,16,32,64,128,27,54],v=function(){for(var b=new Array(256),M=0;M<256;M++)b[M]=M<128?M<<1:M<<1^283;for(var E=[],A=[],P=[[],[],[],[]],x=[[],[],[],[]],N=0,F=0,L=0;L<256;++L){var z=F^F<<1^F<<2^F<<3^F<<4;z=z>>>8^255&z^99,E[N]=z,A[z]=N;var j=b[N],W=b[j],Y=b[W],G=257*b[z]^16843008*z;P[0][N]=G<<24|G>>>8,P[1][N]=G<<16|G>>>16,P[2][N]=G<<8|G>>>24,P[3][N]=G,G=16843009*Y^65537*W^257*j^16843008*N,x[0][z]=G<<24|G>>>8,x[1][z]=G<<16|G>>>16,x[2][z]=G<<8|G>>>24,x[3][z]=G,0===N?N=F=1:(N=j^b[b[b[Y^j]]],F^=b[b[F]])}return{SBOX:E,INV_SBOX:A,SUB_MIX:P,INV_SUB_MIX:x}}();function m(b){this._key=D(b),this._reset()}m.blockSize=16,m.keySize=32,m.prototype.blockSize=m.blockSize,m.prototype.keySize=m.keySize,m.prototype._reset=function(){for(var b=this._key,M=b.length,E=M+6,A=4*(E+1),P=[],x=0;x>>24,N=v.SBOX[N>>>24]<<24|v.SBOX[N>>>16&255]<<16|v.SBOX[N>>>8&255]<<8|v.SBOX[255&N],N^=l[x/M|0]<<24):M>6&&x%M==4&&(N=v.SBOX[N>>>24]<<24|v.SBOX[N>>>16&255]<<16|v.SBOX[N>>>8&255]<<8|v.SBOX[255&N]),P[x]=P[x-M]^N}for(var F=[],L=0;L>>24]]^v.INV_SUB_MIX[1][v.SBOX[j>>>16&255]]^v.INV_SUB_MIX[2][v.SBOX[j>>>8&255]]^v.INV_SUB_MIX[3][v.SBOX[255&j]]}this._nRounds=E,this._keySchedule=P,this._invKeySchedule=F},m.prototype.encryptBlockRaw=function(b){return _(b=D(b),this._keySchedule,v.SUB_MIX,v.SBOX,this._nRounds)},m.prototype.encryptBlock=function(b){var M=this.encryptBlockRaw(b),E=p.allocUnsafe(16);return E.writeUInt32BE(M[0],0),E.writeUInt32BE(M[1],4),E.writeUInt32BE(M[2],8),E.writeUInt32BE(M[3],12),E},m.prototype.decryptBlock=function(b){var M=(b=D(b))[1];b[1]=b[3],b[3]=M;var E=_(b,this._invKeySchedule,v.INV_SUB_MIX,v.INV_SBOX,this._nRounds),A=p.allocUnsafe(16);return A.writeUInt32BE(E[0],0),A.writeUInt32BE(E[3],4),A.writeUInt32BE(E[2],8),A.writeUInt32BE(E[1],12),A},m.prototype.scrub=function(){w(this._keySchedule),w(this._invKeySchedule),w(this._key)},re.exports.AES=m},69382:(re,u,g)=>{var p=g(41899),D=g(73502).Buffer,w=g(61052),_=g(83894),l=g(68857),v=g(58789),m=g(7968);function E(A,P,x,N){w.call(this);var F=D.alloc(4,0);this._cipher=new p.AES(P);var L=this._cipher.encryptBlock(F);this._ghash=new l(L),x=function M(A,P,x){if(12===P.length)return A._finID=D.concat([P,D.from([0,0,0,1])]),D.concat([P,D.from([0,0,0,2])]);var N=new l(x),F=P.length,L=F%16;N.update(P),L&&(L=16-L,N.update(D.alloc(L,0))),N.update(D.alloc(8,0));var z=8*F,j=D.alloc(8);j.writeUIntBE(z,0,8),N.update(j),A._finID=N.state;var W=D.from(A._finID);return m(W),W}(this,x,L),this._prev=D.from(x),this._cache=D.allocUnsafe(0),this._secCache=D.allocUnsafe(0),this._decrypt=N,this._alen=0,this._len=0,this._mode=A,this._authTag=null,this._called=!1}_(E,w),E.prototype._update=function(A){if(!this._called&&this._alen){var P=16-this._alen%16;P<16&&(P=D.alloc(P,0),this._ghash.update(P))}this._called=!0;var x=this._mode.encrypt(this,A);return this._decrypt?this._ghash.update(A):this._ghash.update(x),this._len+=A.length,x},E.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var A=v(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function b(A,P){var x=0;A.length!==P.length&&x++;for(var N=Math.min(A.length,P.length),F=0;F{var p=g(96900),D=g(40856),w=g(44946);u.createCipher=u.Cipher=p.createCipher,u.createCipheriv=u.Cipheriv=p.createCipheriv,u.createDecipher=u.Decipher=D.createDecipher,u.createDecipheriv=u.Decipheriv=D.createDecipheriv,u.listCiphers=u.getCiphers=function _(){return Object.keys(w)}},40856:(re,u,g)=>{var p=g(69382),D=g(73502).Buffer,w=g(29171),_=g(38441),l=g(61052),v=g(41899),m=g(40347);function M(N,F,L){l.call(this),this._cache=new E,this._last=void 0,this._cipher=new v.AES(F),this._prev=D.from(L),this._mode=N,this._autopadding=!0}function E(){this.cache=D.allocUnsafe(0)}function P(N,F,L){var z=w[N.toLowerCase()];if(!z)throw new TypeError("invalid suite type");if("string"==typeof L&&(L=D.from(L)),"GCM"!==z.mode&&L.length!==z.iv)throw new TypeError("invalid iv length "+L.length);if("string"==typeof F&&(F=D.from(F)),F.length!==z.key/8)throw new TypeError("invalid key length "+F.length);return"stream"===z.type?new _(z.module,F,L,!0):"auth"===z.type?new p(z.module,F,L,!0):new M(z.module,F,L)}g(83894)(M,l),M.prototype._update=function(N){this._cache.add(N);for(var F,L,z=[];F=this._cache.get(this._autopadding);)L=this._mode.decrypt(this,F),z.push(L);return D.concat(z)},M.prototype._final=function(){var N=this._cache.flush();if(this._autopadding)return function A(N){var F=N[15];if(F<1||F>16)throw new Error("unable to decrypt data");for(var L=-1;++L16)return F=this.cache.slice(0,16),this.cache=this.cache.slice(16),F}else if(this.cache.length>=16)return F=this.cache.slice(0,16),this.cache=this.cache.slice(16),F;return null},E.prototype.flush=function(){if(this.cache.length)return this.cache},u.createDecipher=function x(N,F){var L=w[N.toLowerCase()];if(!L)throw new TypeError("invalid suite type");var z=m(F,!1,L.key,L.iv);return P(N,z.key,z.iv)},u.createDecipheriv=P},96900:(re,u,g)=>{var p=g(29171),D=g(69382),w=g(73502).Buffer,_=g(38441),l=g(61052),v=g(41899),m=g(40347);function M(N,F,L){l.call(this),this._cache=new A,this._cipher=new v.AES(F),this._prev=w.from(L),this._mode=N,this._autopadding=!0}g(83894)(M,l),M.prototype._update=function(N){this._cache.add(N);for(var F,L,z=[];F=this._cache.get();)L=this._mode.encrypt(this,F),z.push(L);return w.concat(z)};var E=w.alloc(16,16);function A(){this.cache=w.allocUnsafe(0)}function P(N,F,L){var z=p[N.toLowerCase()];if(!z)throw new TypeError("invalid suite type");if("string"==typeof F&&(F=w.from(F)),F.length!==z.key/8)throw new TypeError("invalid key length "+F.length);if("string"==typeof L&&(L=w.from(L)),"GCM"!==z.mode&&L.length!==z.iv)throw new TypeError("invalid iv length "+L.length);return"stream"===z.type?new _(z.module,F,L):"auth"===z.type?new D(z.module,F,L):new M(z.module,F,L)}M.prototype._final=function(){var N=this._cache.flush();if(this._autopadding)return N=this._mode.encrypt(this,N),this._cipher.scrub(),N;if(!N.equals(E))throw this._cipher.scrub(),new Error("data not multiple of block length")},M.prototype.setAutoPadding=function(N){return this._autopadding=!!N,this},A.prototype.add=function(N){this.cache=w.concat([this.cache,N])},A.prototype.get=function(){if(this.cache.length>15){var N=this.cache.slice(0,16);return this.cache=this.cache.slice(16),N}return null},A.prototype.flush=function(){for(var N=16-this.cache.length,F=w.allocUnsafe(N),L=-1;++L{var p=g(73502).Buffer,D=p.alloc(16,0);function _(v){var m=p.allocUnsafe(16);return m.writeUInt32BE(v[0]>>>0,0),m.writeUInt32BE(v[1]>>>0,4),m.writeUInt32BE(v[2]>>>0,8),m.writeUInt32BE(v[3]>>>0,12),m}function l(v){this.h=v,this.state=p.alloc(16,0),this.cache=p.allocUnsafe(0)}l.prototype.ghash=function(v){for(var m=-1;++m0;b--)v[b]=v[b]>>>1|(1&v[b-1])<<31;v[0]=v[0]>>>1,E&&(v[0]=v[0]^225<<24)}this.state=_(m)},l.prototype.update=function(v){this.cache=p.concat([this.cache,v]);for(var m;this.cache.length>=16;)m=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(m)},l.prototype.final=function(v,m){return this.cache.length&&this.ghash(p.concat([this.cache,D],16)),this.ghash(_([0,v,0,m])),this.state},re.exports=l},7968:re=>{re.exports=function u(g){for(var D,p=g.length;p--;){if(255!==(D=g.readUInt8(p))){D++,g.writeUInt8(D,p);break}g.writeUInt8(0,p)}}},64903:(re,u,g)=>{var p=g(58789);u.encrypt=function(D,w){var _=p(w,D._prev);return D._prev=D._cipher.encryptBlock(_),D._prev},u.decrypt=function(D,w){var _=D._prev;D._prev=w;var l=D._cipher.decryptBlock(w);return p(l,_)}},59885:(re,u,g)=>{var p=g(73502).Buffer,D=g(58789);function w(_,l,v){var m=l.length,b=D(l,_._cache);return _._cache=_._cache.slice(m),_._prev=p.concat([_._prev,v?l:b]),b}u.encrypt=function(_,l,v){for(var b,m=p.allocUnsafe(0);l.length;){if(0===_._cache.length&&(_._cache=_._cipher.encryptBlock(_._prev),_._prev=p.allocUnsafe(0)),!(_._cache.length<=l.length)){m=p.concat([m,w(_,l,v)]);break}b=_._cache.length,m=p.concat([m,w(_,l.slice(0,b),v)]),l=l.slice(b)}return m}},86531:(re,u,g)=>{var p=g(73502).Buffer;function D(_,l,v){for(var A,P,b=-1,E=0;++b<8;)A=l&1<<7-b?128:0,E+=(128&(P=_._cipher.encryptBlock(_._prev)[0]^A))>>b%8,_._prev=w(_._prev,v?A:P);return E}function w(_,l){var v=_.length,m=-1,b=p.allocUnsafe(_.length);for(_=p.concat([_,p.from([l])]);++m>7;return b}u.encrypt=function(_,l,v){for(var m=l.length,b=p.allocUnsafe(m),M=-1;++M{var p=g(73502).Buffer;function D(w,_,l){var m=w._cipher.encryptBlock(w._prev)[0]^_;return w._prev=p.concat([w._prev.slice(1),p.from([l?_:m])]),m}u.encrypt=function(w,_,l){for(var v=_.length,m=p.allocUnsafe(v),b=-1;++b{var p=g(58789),D=g(73502).Buffer,w=g(7968);function _(v){var m=v._cipher.encryptBlockRaw(v._prev);return w(v._prev),m}u.encrypt=function(v,m){var b=Math.ceil(m.length/16),M=v._cache.length;v._cache=D.concat([v._cache,D.allocUnsafe(16*b)]);for(var E=0;E{u.encrypt=function(g,p){return g._cipher.encryptBlock(p)},u.decrypt=function(g,p){return g._cipher.decryptBlock(p)}},29171:(re,u,g)=>{var p={ECB:g(21704),CBC:g(64903),CFB:g(59885),CFB8:g(21641),CFB1:g(86531),OFB:g(86816),CTR:g(11150),GCM:g(11150)},D=g(44946);for(var w in D)D[w].module=p[D[w].mode];re.exports=D},86816:(re,u,g)=>{var p=g(58789);function D(w){return w._prev=w._cipher.encryptBlock(w._prev),w._prev}u.encrypt=function(w,_){for(;w._cache.length<_.length;)w._cache=Buffer.concat([w._cache,D(w)]);var l=w._cache.slice(0,_.length);return w._cache=w._cache.slice(_.length),p(_,l)}},38441:(re,u,g)=>{var p=g(41899),D=g(73502).Buffer,w=g(61052);function l(v,m,b,M){w.call(this),this._cipher=new p.AES(m),this._prev=D.from(b),this._cache=D.allocUnsafe(0),this._secCache=D.allocUnsafe(0),this._decrypt=M,this._mode=v}g(83894)(l,w),l.prototype._update=function(v){return this._mode.encrypt(this,v,this._decrypt)},l.prototype._final=function(){this._cipher.scrub()},re.exports=l},55255:(re,u,g)=>{var p=g(9004),D=g(84330),w=g(29171),_=g(51115),l=g(40347);function b(A,P,x){if(A=A.toLowerCase(),w[A])return D.createCipheriv(A,P,x);if(_[A])return new p({key:P,iv:x,mode:A});throw new TypeError("invalid suite type")}function M(A,P,x){if(A=A.toLowerCase(),w[A])return D.createDecipheriv(A,P,x);if(_[A])return new p({key:P,iv:x,mode:A,decrypt:!0});throw new TypeError("invalid suite type")}u.createCipher=u.Cipher=function v(A,P){var x,N;if(A=A.toLowerCase(),w[A])x=w[A].key,N=w[A].iv;else{if(!_[A])throw new TypeError("invalid suite type");x=8*_[A].key,N=_[A].iv}var F=l(P,!1,x,N);return b(A,F.key,F.iv)},u.createCipheriv=u.Cipheriv=b,u.createDecipher=u.Decipher=function m(A,P){var x,N;if(A=A.toLowerCase(),w[A])x=w[A].key,N=w[A].iv;else{if(!_[A])throw new TypeError("invalid suite type");x=8*_[A].key,N=_[A].iv}var F=l(P,!1,x,N);return M(A,F.key,F.iv)},u.createDecipheriv=u.Decipheriv=M,u.listCiphers=u.getCiphers=function E(){return Object.keys(_).concat(D.getCiphers())}},9004:(re,u,g)=>{var p=g(61052),D=g(73684),w=g(83894),_=g(73502).Buffer,l={"des-ede3-cbc":D.CBC.instantiate(D.EDE),"des-ede3":D.EDE,"des-ede-cbc":D.CBC.instantiate(D.EDE),"des-ede":D.EDE,"des-cbc":D.CBC.instantiate(D.DES),"des-ecb":D.DES};function v(m){p.call(this);var E,b=m.mode.toLowerCase(),M=l[b];E=m.decrypt?"decrypt":"encrypt";var A=m.key;_.isBuffer(A)||(A=_.from(A)),("des-ede"===b||"des-ede-cbc"===b)&&(A=_.concat([A,A.slice(0,8)]));var P=m.iv;_.isBuffer(P)||(P=_.from(P)),this._des=M.create({key:A,iv:P,type:E})}l.des=l["des-cbc"],l.des3=l["des-ede3-cbc"],re.exports=v,w(v,p),v.prototype._update=function(m){return _.from(this._des.update(m))},v.prototype._final=function(){return _.from(this._des.final())}},51115:(re,u)=>{u["des-ecb"]={key:8,iv:0},u["des-cbc"]=u.des={key:8,iv:8},u["des-ede3-cbc"]=u.des3={key:24,iv:8},u["des-ede3"]={key:24,iv:0},u["des-ede-cbc"]={key:16,iv:8},u["des-ede"]={key:16,iv:0}},6581:(re,u,g)=>{var p=g(77105),D=g(4427),w=g(94115),_=D("level-filesystem",{db:p});re.exports=w(_)},8466:(re,u,g)=>{var p=g(98538),D=g(53753);function _(v){var b,m=v.modulus.byteLength();do{b=new p(D(m))}while(b.cmp(v.modulus)>=0||!b.umod(v.prime1)||!b.umod(v.prime2));return b}function l(v,m){var b=function w(v){var m=_(v);return{blinder:m.toRed(p.mont(v.modulus)).redPow(new p(v.publicExponent)).fromRed(),unblinder:m.invm(v.modulus)}}(m),M=m.modulus.byteLength(),E=new p(v).mul(b.blinder).umod(m.modulus),A=E.toRed(p.mont(m.prime1)),P=E.toRed(p.mont(m.prime2)),x=m.coefficient,N=m.prime1,F=m.prime2,L=A.redPow(m.exponent1).fromRed(),z=P.redPow(m.exponent2).fromRed(),j=L.isub(z).imul(x).umod(N).imul(F);return z.iadd(j).imul(b.unblinder).umod(m.modulus).toArrayLike(Buffer,"be",M)}l.getr=_,re.exports=l},87793:(re,u,g)=>{"use strict";re.exports=g(75207)},3923:(re,u,g)=>{"use strict";var p=g(73502).Buffer,D=g(96386),w=g(31496),_=g(83894),l=g(79947),v=g(3946),m=g(75207);function b(P){w.Writable.call(this);var x=m[P];if(!x)throw new Error("Unknown message digest");this._hashType=x.hash,this._hash=D(x.hash),this._tag=x.id,this._signType=x.sign}function M(P){w.Writable.call(this);var x=m[P];if(!x)throw new Error("Unknown message digest");this._hash=D(x.hash),this._tag=x.id,this._signType=x.sign}function E(P){return new b(P)}function A(P){return new M(P)}Object.keys(m).forEach(function(P){m[P].id=p.from(m[P].id,"hex"),m[P.toLowerCase()]=m[P]}),_(b,w.Writable),b.prototype._write=function(x,N,F){this._hash.update(x),F()},b.prototype.update=function(x,N){return this._hash.update("string"==typeof x?p.from(x,N):x),this},b.prototype.sign=function(x,N){this.end();var F=this._hash.digest(),L=l(F,x,this._hashType,this._signType,this._tag);return N?L.toString(N):L},_(M,w.Writable),M.prototype._write=function(x,N,F){this._hash.update(x),F()},M.prototype.update=function(x,N){return this._hash.update("string"==typeof x?p.from(x,N):x),this},M.prototype.verify=function(x,N,F){var L="string"==typeof N?p.from(N,F):N;this.end();var z=this._hash.digest();return v(L,z,x,this._signType,this._tag)},re.exports={Sign:E,Verify:A,createSign:E,createVerify:A}},79947:(re,u,g)=>{"use strict";var p=g(73502).Buffer,D=g(74529),w=g(8466),_=g(57715).ec,l=g(98538),v=g(22772),m=g(1308),b=1;function x(j,W,Y,G){if((j=p.from(j.toArray())).length0&&Y.ishrn(G),Y}function L(j,W,Y){var G,Q;do{for(G=p.alloc(0);8*G.length{"use strict";var p=g(73502).Buffer,D=g(98538),w=g(57715).ec,_=g(22772),l=g(1308);function M(E,A){if(E.cmpn(0)<=0)throw new Error("invalid sig");if(E.cmp(A)>=0)throw new Error("invalid sig")}re.exports=function v(E,A,P,x,N){var F=_(P);if("ec"===F.type){if("ecdsa"!==x&&"ecdsa/rsa"!==x)throw new Error("wrong public key type");return function m(E,A,P){var x=l[P.data.algorithm.curve.join(".")];if(!x)throw new Error("unknown curve "+P.data.algorithm.curve.join("."));var N=new w(x),F=P.data.subjectPrivateKey.data;return N.verify(A,E,F)}(E,A,F)}if("dsa"===F.type){if("dsa"!==x)throw new Error("wrong public key type");return function b(E,A,P){var x=P.data.p,N=P.data.q,F=P.data.g,L=P.data.pub_key,z=_.signature.decode(E,"der"),j=z.s,W=z.r;M(j,N),M(W,N);var Y=D.mont(x),G=j.invm(N),Q=F.toRed(Y).redPow(new D(A).mul(G).mod(N)).fromRed().mul(L.toRed(Y).redPow(W.mul(G).mod(N)).fromRed()).mod(x).mod(N);return 0===Q.cmp(W)}(E,A,F)}if("rsa"!==x&&"ecdsa/rsa"!==x)throw new Error("wrong public key type");A=p.concat([N,A]);for(var L=F.modulus.byteLength(),z=[1],j=0;A.length+z.length+2{"use strict";var g={};function p(v,m,b){b||(b=Error);var E=function(A){function P(x,N,F){return A.call(this,function M(A,P,x){return"string"==typeof m?m:m(A,P,x)}(x,N,F))||this}return function u(v,m){v.prototype=Object.create(m.prototype),v.prototype.constructor=v,v.__proto__=m}(P,A),P}(b);E.prototype.name=b.name,E.prototype.code=v,g[v]=E}function D(v,m){if(Array.isArray(v)){var b=v.length;return v=v.map(function(M){return String(M)}),b>2?"one of ".concat(m," ").concat(v.slice(0,b-1).join(", "),", or ")+v[b-1]:2===b?"one of ".concat(m," ").concat(v[0]," or ").concat(v[1]):"of ".concat(m," ").concat(v[0])}return"of ".concat(m," ").concat(String(v))}p("ERR_INVALID_OPT_VALUE",function(v,m){return'The value "'+m+'" is invalid for option "'+v+'"'},TypeError),p("ERR_INVALID_ARG_TYPE",function(v,m,b){var M,E;if("string"==typeof m&&function w(v,m,b){return v.substr(!b||b<0?0:+b,m.length)===m}(m,"not ")?(M="must not be",m=m.replace(/^not /,"")):M="must be",function _(v,m,b){return(void 0===b||b>v.length)&&(b=v.length),v.substring(b-m.length,b)===m}(v," argument"))E="The ".concat(v," ").concat(M," ").concat(D(m,"type"));else{var A=function l(v,m,b){return"number"!=typeof b&&(b=0),!(b+m.length>v.length)&&-1!==v.indexOf(m,b)}(v,".")?"property":"argument";E='The "'.concat(v,'" ').concat(A," ").concat(M," ").concat(D(m,"type"))}return E+=". Received type ".concat(typeof b)},TypeError),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),p("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),p("ERR_STREAM_PREMATURE_CLOSE","Premature close"),p("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),p("ERR_STREAM_WRITE_AFTER_END","write after end"),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),re.exports.q=g},55986:(re,u,g)=>{"use strict";var p=Object.keys||function(E){var A=[];for(var P in E)A.push(P);return A};re.exports=m;var D=g(14473),w=g(3766);g(83894)(m,D);for(var _=p(w.prototype),l=0;l<_.length;l++){var v=_[l];m.prototype[v]||(m.prototype[v]=w.prototype[v])}function m(E){if(!(this instanceof m))return new m(E);D.call(this,E),w.call(this,E),this.allowHalfOpen=!0,E&&(!1===E.readable&&(this.readable=!1),!1===E.writable&&(this.writable=!1),!1===E.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",b)))}function b(){this._writableState.ended||process.nextTick(M,this)}function M(E){E.end()}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(m.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(m.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(m.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(A){void 0===this._readableState||void 0===this._writableState||(this._readableState.destroyed=A,this._writableState.destroyed=A)}})},1576:(re,u,g)=>{"use strict";re.exports=D;var p=g(3556);function D(w){if(!(this instanceof D))return new D(w);p.call(this,w)}g(83894)(D,p),D.prototype._transform=function(w,_,l){l(null,w)}},14473:(re,u,g)=>{"use strict";var p;re.exports=C,C.ReadableState=te;g(59069).EventEmitter;var w=function(be,Pe){return be.listeners(Pe).length},_=g(2228),l=g(93172).Buffer,v=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var E,M=g(56353);E=M&&M.debuglog?M.debuglog("stream"):function(){};var Y,G,Q,A=g(76083),P=g(34936),N=g(47890).getHighWaterMark,F=g(84162).q,L=F.ERR_INVALID_ARG_TYPE,z=F.ERR_STREAM_PUSH_AFTER_EOF,j=F.ERR_METHOD_NOT_IMPLEMENTED,W=F.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;g(83894)(C,_);var q=P.errorOrDestroy,J=["error","close","destroy","pause","resume"];function te(ce,be,Pe){p=p||g(55986),ce=ce||{},"boolean"!=typeof Pe&&(Pe=be instanceof p),this.objectMode=!!ce.objectMode,Pe&&(this.objectMode=this.objectMode||!!ce.readableObjectMode),this.highWaterMark=N(this,ce,"readableHighWaterMark",Pe),this.buffer=new A,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==ce.emitClose,this.autoDestroy=!!ce.autoDestroy,this.destroyed=!1,this.defaultEncoding=ce.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ce.encoding&&(Y||(Y=g(13465).s),this.decoder=new Y(ce.encoding),this.encoding=ce.encoding)}function C(ce){if(p=p||g(55986),!(this instanceof C))return new C(ce);var be=this instanceof p;this._readableState=new te(ce,this,be),this.readable=!0,ce&&("function"==typeof ce.read&&(this._read=ce.read),"function"==typeof ce.destroy&&(this._destroy=ce.destroy)),_.call(this)}function o(ce,be,Pe,Fe,lt){E("readableAddChunk",be);var He,Ge=ce._readableState;if(null===be)Ge.reading=!1,function B(ce,be){if(E("onEofChunk"),!be.ended){if(be.decoder){var Pe=be.decoder.end();Pe&&Pe.length&&(be.buffer.push(Pe),be.length+=be.objectMode?1:Pe.length)}be.ended=!0,be.sync?I(ce):(be.needReadable=!1,be.emittedReadable||(be.emittedReadable=!0,f(ce)))}}(ce,Ge);else if(lt||(He=function d(ce,be){var Pe;return!function b(ce){return l.isBuffer(ce)||ce instanceof v}(be)&&"string"!=typeof be&&void 0!==be&&!ce.objectMode&&(Pe=new L("chunk",["string","Buffer","Uint8Array"],be)),Pe}(Ge,be)),He)q(ce,He);else if(Ge.objectMode||be&&be.length>0)if("string"!=typeof be&&!Ge.objectMode&&Object.getPrototypeOf(be)!==l.prototype&&(be=function m(ce){return l.from(ce)}(be)),Fe)Ge.endEmitted?q(ce,new W):s(ce,Ge,be,!0);else if(Ge.ended)q(ce,new z);else{if(Ge.destroyed)return!1;Ge.reading=!1,Ge.decoder&&!Pe?(be=Ge.decoder.write(be),Ge.objectMode||0!==be.length?s(ce,Ge,be,!1):R(ce,Ge)):s(ce,Ge,be,!1)}else Fe||(Ge.reading=!1,R(ce,Ge));return!Ge.ended&&(Ge.lengthbe.highWaterMark&&(be.highWaterMark=function S(ce){return ce>=h?ce=h:(ce--,ce|=ce>>>1,ce|=ce>>>2,ce|=ce>>>4,ce|=ce>>>8,ce|=ce>>>16,ce++),ce}(ce)),ce<=be.length?ce:be.ended?be.length:(be.needReadable=!0,0))}function I(ce){var be=ce._readableState;E("emitReadable",be.needReadable,be.emittedReadable),be.needReadable=!1,be.emittedReadable||(E("emitReadable",be.flowing),be.emittedReadable=!0,process.nextTick(f,ce))}function f(ce){var be=ce._readableState;E("emitReadable_",be.destroyed,be.length,be.ended),!be.destroyed&&(be.length||be.ended)&&(ce.emit("readable"),be.emittedReadable=!1),be.needReadable=!be.flowing&&!be.ended&&be.length<=be.highWaterMark,ve(ce)}function R(ce,be){be.readingMore||(be.readingMore=!0,process.nextTick(se,ce,be))}function se(ce,be){for(;!be.reading&&!be.ended&&(be.length0,be.resumeScheduled&&!be.paused?be.flowing=!0:ce.listenerCount("data")>0&&ce.resume()}function de(ce){E("readable nexttick read 0"),ce.read(0)}function ye(ce,be){E("resume",be.reading),be.reading||ce.read(0),be.resumeScheduled=!1,ce.emit("resume"),ve(ce),be.flowing&&!be.reading&&ce.read(0)}function ve(ce){var be=ce._readableState;for(E("flow",be.flowing);be.flowing&&null!==ce.read(););}function ae(ce,be){return 0===be.length?null:(be.objectMode?Pe=be.buffer.shift():!ce||ce>=be.length?(Pe=be.decoder?be.buffer.join(""):1===be.buffer.length?be.buffer.first():be.buffer.concat(be.length),be.buffer.clear()):Pe=be.buffer.consume(ce,be.decoder),Pe);var Pe}function fe(ce){var be=ce._readableState;E("endReadable",be.endEmitted),be.endEmitted||(be.ended=!0,process.nextTick(pe,be,ce))}function pe(ce,be){if(E("endReadableNT",ce.endEmitted,ce.length),!ce.endEmitted&&0===ce.length&&(ce.endEmitted=!0,be.readable=!1,be.emit("end"),ce.autoDestroy)){var Pe=be._writableState;(!Pe||Pe.autoDestroy&&Pe.finished)&&be.destroy()}}function Se(ce,be){for(var Pe=0,Fe=ce.length;Pe=be.highWaterMark:be.length>0)||be.ended))return E("read: emitReadable",be.length,be.ended),0===be.length&&be.ended?fe(this):I(this),null;if(0===(ce=k(ce,be))&&be.ended)return 0===be.length&&fe(this),null;var lt,Fe=be.needReadable;return E("need readable",Fe),(0===be.length||be.length-ce0?ae(ce,be):null)?(be.needReadable=be.length<=be.highWaterMark,ce=0):(be.length-=ce,be.awaitDrain=0),0===be.length&&(be.ended||(be.needReadable=!0),Pe!==ce&&be.ended&&fe(this)),null!==lt&&this.emit("data",lt),lt},C.prototype._read=function(ce){q(this,new j("_read()"))},C.prototype.pipe=function(ce,be){var Pe=this,Fe=this._readableState;switch(Fe.pipesCount){case 0:Fe.pipes=ce;break;case 1:Fe.pipes=[Fe.pipes,ce];break;default:Fe.pipes.push(ce)}Fe.pipesCount+=1,E("pipe count=%d opts=%j",Fe.pipesCount,be);var Ge=(!be||!1!==be.end)&&ce!==process.stdout&&ce!==process.stderr?Kt:Ae;function He(Te,Be){E("onunpipe"),Te===Pe&&Be&&!1===Be.hasUnpiped&&(Be.hasUnpiped=!0,function Vt(){E("cleanup"),ce.removeListener("close",Gt),ce.removeListener("finish",Re),ce.removeListener("drain",tt),ce.removeListener("error",at),ce.removeListener("unpipe",He),Pe.removeListener("end",Kt),Pe.removeListener("end",Ae),Pe.removeListener("data",ot),nt=!0,Fe.awaitDrain&&(!ce._writableState||ce._writableState.needDrain)&&tt()}())}function Kt(){E("onend"),ce.end()}Fe.endEmitted?process.nextTick(Ge):Pe.once("end",Ge),ce.on("unpipe",He);var tt=function ee(ce){return function(){var Pe=ce._readableState;E("pipeOnDrain",Pe.awaitDrain),Pe.awaitDrain&&Pe.awaitDrain--,0===Pe.awaitDrain&&w(ce,"data")&&(Pe.flowing=!0,ve(ce))}}(Pe);ce.on("drain",tt);var nt=!1;function ot(Te){E("ondata");var Be=ce.write(Te);E("dest.write",Be),!1===Be&&((1===Fe.pipesCount&&Fe.pipes===ce||Fe.pipesCount>1&&-1!==Se(Fe.pipes,ce))&&!nt&&(E("false write response, pause",Fe.awaitDrain),Fe.awaitDrain++),Pe.pause())}function at(Te){E("onerror",Te),Ae(),ce.removeListener("error",at),0===w(ce,"error")&&q(ce,Te)}function Gt(){ce.removeListener("finish",Re),Ae()}function Re(){E("onfinish"),ce.removeListener("close",Gt),Ae()}function Ae(){E("unpipe"),Pe.unpipe(ce)}return Pe.on("data",ot),function H(ce,be,Pe){if("function"==typeof ce.prependListener)return ce.prependListener(be,Pe);ce._events&&ce._events[be]?Array.isArray(ce._events[be])?ce._events[be].unshift(Pe):ce._events[be]=[Pe,ce._events[be]]:ce.on(be,Pe)}(ce,"error",at),ce.once("close",Gt),ce.once("finish",Re),ce.emit("pipe",Pe),Fe.flowing||(E("pipe resume"),Pe.resume()),ce},C.prototype.unpipe=function(ce){var be=this._readableState,Pe={hasUnpiped:!1};if(0===be.pipesCount)return this;if(1===be.pipesCount)return ce&&ce!==be.pipes||(ce||(ce=be.pipes),be.pipes=null,be.pipesCount=0,be.flowing=!1,ce&&ce.emit("unpipe",this,Pe)),this;if(!ce){var Fe=be.pipes,lt=be.pipesCount;be.pipes=null,be.pipesCount=0,be.flowing=!1;for(var Ge=0;Ge0,!1!==Fe.flowing&&this.resume()):"readable"===ce&&!Fe.endEmitted&&!Fe.readableListening&&(Fe.readableListening=Fe.needReadable=!0,Fe.flowing=!1,Fe.emittedReadable=!1,E("on readable",Fe.length,Fe.reading),Fe.length?I(this):Fe.reading||process.nextTick(de,this)),Pe},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(ce,be){var Pe=_.prototype.removeListener.call(this,ce,be);return"readable"===ce&&process.nextTick(oe,this),Pe},C.prototype.removeAllListeners=function(ce){var be=_.prototype.removeAllListeners.apply(this,arguments);return("readable"===ce||void 0===ce)&&process.nextTick(oe,this),be},C.prototype.resume=function(){var ce=this._readableState;return ce.flowing||(E("resume"),ce.flowing=!ce.readableListening,function Ce(ce,be){be.resumeScheduled||(be.resumeScheduled=!0,process.nextTick(ye,ce,be))}(this,ce)),ce.paused=!1,this},C.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(E("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(ce){var be=this,Pe=this._readableState,Fe=!1;for(var lt in ce.on("end",function(){if(E("wrapped end"),Pe.decoder&&!Pe.ended){var He=Pe.decoder.end();He&&He.length&&be.push(He)}be.push(null)}),ce.on("data",function(He){(E("wrapped data"),Pe.decoder&&(He=Pe.decoder.write(He)),Pe.objectMode&&null==He||!(Pe.objectMode||He&&He.length))||(be.push(He)||(Fe=!0,ce.pause()))}),ce)void 0===this[lt]&&"function"==typeof ce[lt]&&(this[lt]=function(Kt){return function(){return ce[Kt].apply(ce,arguments)}}(lt));for(var Ge=0;Ge{"use strict";re.exports=b;var p=g(84162).q,D=p.ERR_METHOD_NOT_IMPLEMENTED,w=p.ERR_MULTIPLE_CALLBACK,_=p.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=p.ERR_TRANSFORM_WITH_LENGTH_0,v=g(55986);function m(A,P){var x=this._transformState;x.transforming=!1;var N=x.writecb;if(null===N)return this.emit("error",new w);x.writechunk=null,x.writecb=null,null!=P&&this.push(P),N(A);var F=this._readableState;F.reading=!1,(F.needReadable||F.length{"use strict";function D(ve){var ae=this;this.next=null,this.entry=null,this.finish=function(){!function ye(ve,ae,fe){var pe=ve.entry;for(ve.entry=null;pe;){var Se=pe.callback;ae.pendingcb--,Se(fe),pe=pe.next}ae.corkedRequestsFree.next=ve}(ae,ve)}}var w;re.exports=te,te.WritableState=J;var _={deprecate:g(23532)},l=g(2228),v=g(93172).Buffer,m=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var H,E=g(34936),P=g(47890).getHighWaterMark,x=g(84162).q,N=x.ERR_INVALID_ARG_TYPE,F=x.ERR_METHOD_NOT_IMPLEMENTED,L=x.ERR_MULTIPLE_CALLBACK,z=x.ERR_STREAM_CANNOT_PIPE,j=x.ERR_STREAM_DESTROYED,W=x.ERR_STREAM_NULL_VALUES,Y=x.ERR_STREAM_WRITE_AFTER_END,G=x.ERR_UNKNOWN_ENCODING,Q=E.errorOrDestroy;function q(){}function J(ve,ae,fe){w=w||g(55986),ve=ve||{},"boolean"!=typeof fe&&(fe=ae instanceof w),this.objectMode=!!ve.objectMode,fe&&(this.objectMode=this.objectMode||!!ve.writableObjectMode),this.highWaterMark=P(this,ve,"writableHighWaterMark",fe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var pe=!1===ve.decodeStrings;this.decodeStrings=!pe,this.defaultEncoding=ve.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Se){!function B(ve,ae){var fe=ve._writableState,pe=fe.sync,Se=fe.writecb;if("function"!=typeof Se)throw new L;if(function k(ve){ve.writing=!1,ve.writecb=null,ve.length-=ve.writelen,ve.writelen=0}(fe),ae)!function S(ve,ae,fe,pe,Se){--ae.pendingcb,fe?(process.nextTick(Se,pe),process.nextTick(de,ve,ae),ve._writableState.errorEmitted=!0,Q(ve,pe)):(Se(pe),ve._writableState.errorEmitted=!0,Q(ve,pe),de(ve,ae))}(ve,fe,pe,ae,Se);else{var ce=se(fe)||ve.destroyed;!ce&&!fe.corked&&!fe.bufferProcessing&&fe.bufferedRequest&&R(ve,fe),pe?process.nextTick(I,ve,fe,ce,Se):I(ve,fe,ce,Se)}}(ae,Se)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==ve.emitClose,this.autoDestroy=!!ve.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new D(this)}function te(ve){var ae=this instanceof(w=w||g(55986));if(!ae&&!H.call(te,this))return new te(ve);this._writableState=new J(ve,this,ae),this.writable=!0,ve&&("function"==typeof ve.write&&(this._write=ve.write),"function"==typeof ve.writev&&(this._writev=ve.writev),"function"==typeof ve.destroy&&(this._destroy=ve.destroy),"function"==typeof ve.final&&(this._final=ve.final)),l.call(this)}function h(ve,ae,fe,pe,Se,ce,be){ae.writelen=pe,ae.writecb=be,ae.writing=!0,ae.sync=!0,ae.destroyed?ae.onwrite(new j("write")):fe?ve._writev(Se,ae.onwrite):ve._write(Se,ce,ae.onwrite),ae.sync=!1}function I(ve,ae,fe,pe){fe||function f(ve,ae){0===ae.length&&ae.needDrain&&(ae.needDrain=!1,ve.emit("drain"))}(ve,ae),ae.pendingcb--,pe(),de(ve,ae)}function R(ve,ae){ae.bufferProcessing=!0;var fe=ae.bufferedRequest;if(ve._writev&&fe&&fe.next){var pe=ae.bufferedRequestCount,Se=new Array(pe),ce=ae.corkedRequestsFree;ce.entry=fe;for(var be=0,Pe=!0;fe;)Se[be]=fe,fe.isBuf||(Pe=!1),fe=fe.next,be+=1;Se.allBuffers=Pe,h(ve,ae,!0,ae.length,Se,"",ce.finish),ae.pendingcb++,ae.lastBufferedRequest=null,ce.next?(ae.corkedRequestsFree=ce.next,ce.next=null):ae.corkedRequestsFree=new D(ae),ae.bufferedRequestCount=0}else{for(;fe;){var Fe=fe.chunk,lt=fe.encoding,Ge=fe.callback;if(h(ve,ae,!1,ae.objectMode?1:Fe.length,Fe,lt,Ge),fe=fe.next,ae.bufferedRequestCount--,ae.writing)break}null===fe&&(ae.lastBufferedRequest=null)}ae.bufferedRequest=fe,ae.bufferProcessing=!1}function se(ve){return ve.ending&&0===ve.length&&null===ve.bufferedRequest&&!ve.finished&&!ve.writing}function ee(ve,ae){ve._final(function(fe){ae.pendingcb--,fe&&Q(ve,fe),ae.prefinished=!0,ve.emit("prefinish"),de(ve,ae)})}function de(ve,ae){var fe=se(ae);if(fe&&(function oe(ve,ae){!ae.prefinished&&!ae.finalCalled&&("function"!=typeof ve._final||ae.destroyed?(ae.prefinished=!0,ve.emit("prefinish")):(ae.pendingcb++,ae.finalCalled=!0,process.nextTick(ee,ve,ae)))}(ve,ae),0===ae.pendingcb&&(ae.finished=!0,ve.emit("finish"),ae.autoDestroy))){var pe=ve._readableState;(!pe||pe.autoDestroy&&pe.endEmitted)&&ve.destroy()}return fe}g(83894)(te,l),J.prototype.getBuffer=function(){for(var ae=this.bufferedRequest,fe=[];ae;)fe.push(ae),ae=ae.next;return fe},function(){try{Object.defineProperty(J.prototype,"buffer",{get:_.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(H=Function.prototype[Symbol.hasInstance],Object.defineProperty(te,Symbol.hasInstance,{value:function(ae){return!!H.call(this,ae)||this===te&&(ae&&ae._writableState instanceof J)}})):H=function(ae){return ae instanceof this},te.prototype.pipe=function(){Q(this,new z)},te.prototype.write=function(ve,ae,fe){var pe=this._writableState,Se=!1,ce=!pe.objectMode&&function M(ve){return v.isBuffer(ve)||ve instanceof m}(ve);return ce&&!v.isBuffer(ve)&&(ve=function b(ve){return v.from(ve)}(ve)),"function"==typeof ae&&(fe=ae,ae=null),ce?ae="buffer":ae||(ae=pe.defaultEncoding),"function"!=typeof fe&&(fe=q),pe.ending?function C(ve,ae){var fe=new Y;Q(ve,fe),process.nextTick(ae,fe)}(this,fe):(ce||function o(ve,ae,fe,pe){var Se;return null===fe?Se=new W:"string"!=typeof fe&&!ae.objectMode&&(Se=new N("chunk",["string","Buffer"],fe)),!Se||(Q(ve,Se),process.nextTick(pe,Se),!1)}(this,pe,ve,fe))&&(pe.pendingcb++,Se=function d(ve,ae,fe,pe,Se,ce){if(!fe){var be=function s(ve,ae,fe){return!ve.objectMode&&!1!==ve.decodeStrings&&"string"==typeof ae&&(ae=v.from(ae,fe)),ae}(ae,pe,Se);pe!==be&&(fe=!0,Se="buffer",pe=be)}var Pe=ae.objectMode?1:pe.length;ae.length+=Pe;var Fe=ae.length-1))throw new G(ae);return this._writableState.defaultEncoding=ae,this},Object.defineProperty(te.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(te.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),te.prototype._write=function(ve,ae,fe){fe(new F("_write()"))},te.prototype._writev=null,te.prototype.end=function(ve,ae,fe){var pe=this._writableState;return"function"==typeof ve?(fe=ve,ve=null,ae=null):"function"==typeof ae&&(fe=ae,ae=null),null!=ve&&this.write(ve,ae),pe.corked&&(pe.corked=1,this.uncork()),pe.ending||function Ce(ve,ae,fe){ae.ending=!0,de(ve,ae),fe&&(ae.finished?process.nextTick(fe):ve.once("finish",fe)),ae.ended=!0,ve.writable=!1}(this,pe,fe),this},Object.defineProperty(te.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ae){this._writableState&&(this._writableState.destroyed=ae)}}),te.prototype.destroy=E.destroy,te.prototype._undestroy=E.undestroy,te.prototype._destroy=function(ve,ae){ae(ve)}},56121:(re,u,g)=>{"use strict";var p;function D(Y,G,Q){return G=function w(Y){var G=function _(Y,G){if("object"!=typeof Y||null===Y)return Y;var Q=Y[Symbol.toPrimitive];if(void 0!==Q){var q=Q.call(Y,G||"default");if("object"!=typeof q)return q;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===G?String:Number)(Y)}(Y,"string");return"symbol"==typeof G?G:String(G)}(G),G in Y?Object.defineProperty(Y,G,{value:Q,enumerable:!0,configurable:!0,writable:!0}):Y[G]=Q,Y}var l=g(81291),v=Symbol("lastResolve"),m=Symbol("lastReject"),b=Symbol("error"),M=Symbol("ended"),E=Symbol("lastPromise"),A=Symbol("handlePromise"),P=Symbol("stream");function x(Y,G){return{value:Y,done:G}}function N(Y){var G=Y[v];if(null!==G){var Q=Y[P].read();null!==Q&&(Y[E]=null,Y[v]=null,Y[m]=null,G(x(Q,!1)))}}function F(Y){process.nextTick(N,Y)}var z=Object.getPrototypeOf(function(){}),j=Object.setPrototypeOf((D(p={get stream(){return this[P]},next:function(){var G=this,Q=this[b];if(null!==Q)return Promise.reject(Q);if(this[M])return Promise.resolve(x(void 0,!0));if(this[P].destroyed)return new Promise(function(te,C){process.nextTick(function(){G[b]?C(G[b]):te(x(void 0,!0))})});var J,q=this[E];if(q)J=new Promise(function L(Y,G){return function(Q,q){Y.then(function(){G[M]?Q(x(void 0,!0)):G[A](Q,q)},q)}}(q,this));else{var H=this[P].read();if(null!==H)return Promise.resolve(x(H,!1));J=new Promise(this[A])}return this[E]=J,J}},Symbol.asyncIterator,function(){return this}),D(p,"return",function(){var G=this;return new Promise(function(Q,q){G[P].destroy(null,function(J){J?q(J):Q(x(void 0,!0))})})}),p),z);re.exports=function(G){var Q,q=Object.create(j,(D(Q={},P,{value:G,writable:!0}),D(Q,v,{value:null,writable:!0}),D(Q,m,{value:null,writable:!0}),D(Q,b,{value:null,writable:!0}),D(Q,M,{value:G._readableState.endEmitted,writable:!0}),D(Q,A,{value:function(H,te){var C=q[P].read();C?(q[E]=null,q[v]=null,q[m]=null,H(x(C,!1))):(q[v]=H,q[m]=te)},writable:!0}),Q));return q[E]=null,l(G,function(J){if(J&&"ERR_STREAM_PREMATURE_CLOSE"!==J.code){var H=q[m];return null!==H&&(q[E]=null,q[v]=null,q[m]=null,H(J)),void(q[b]=J)}var te=q[v];null!==te&&(q[E]=null,q[v]=null,q[m]=null,te(x(void 0,!0))),q[M]=!0}),G.on("readable",F.bind(null,q)),q}},76083:(re,u,g)=>{"use strict";function p(F,L){var z=Object.keys(F);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(F);L&&(j=j.filter(function(W){return Object.getOwnPropertyDescriptor(F,W).enumerable})),z.push.apply(z,j)}return z}function D(F){for(var L=1;L0?this.tail.next=j:this.head=j,this.tail=j,++this.length}},{key:"unshift",value:function(z){var j={data:z,next:this.head};0===this.length&&(this.tail=j),this.head=j,++this.length}},{key:"shift",value:function(){if(0!==this.length){var z=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,z}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(z){if(0===this.length)return"";for(var j=this.head,W=""+j.data;j=j.next;)W+=z+j.data;return W}},{key:"concat",value:function(z){if(0===this.length)return E.alloc(0);for(var j=E.allocUnsafe(z>>>0),W=this.head,Y=0;W;)N(W.data,j,Y),Y+=W.data.length,W=W.next;return j}},{key:"consume",value:function(z,j){var W;return zG.length?G.length:z;if(Q===G.length?Y+=G:Y+=G.slice(0,z),0===(z-=Q)){Q===G.length?(++W,j.next?this.head=j.next:this.head=this.tail=null):(this.head=j,j.data=G.slice(Q));break}++W}return this.length-=W,Y}},{key:"_getBuffer",value:function(z){var j=E.allocUnsafe(z),W=this.head,Y=1;for(W.data.copy(j),z-=W.data.length;W=W.next;){var G=W.data,Q=z>G.length?G.length:z;if(G.copy(j,j.length-z,0,Q),0===(z-=Q)){Q===G.length?(++Y,W.next?this.head=W.next:this.head=this.tail=null):(this.head=W,W.data=G.slice(Q));break}++Y}return this.length-=Y,j}},{key:x,value:function(z,j){return P(this,D(D({},j),{},{depth:0,customInspect:!1}))}}]),F}()},34936:re=>{"use strict";function g(l,v){w(l,v),p(l)}function p(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function w(l,v){l.emit("error",v)}re.exports={destroy:function u(l,v){var m=this,b=this._readableState&&this._readableState.destroyed,M=this._writableState&&this._writableState.destroyed;return b||M?(v?v(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(w,this,l)):process.nextTick(w,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(E){!v&&E?m._writableState?m._writableState.errorEmitted?process.nextTick(p,m):(m._writableState.errorEmitted=!0,process.nextTick(g,m,E)):process.nextTick(g,m,E):v?(process.nextTick(p,m),v(E)):process.nextTick(p,m)}),this)},undestroy:function D(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function _(l,v){var m=l._readableState,b=l._writableState;m&&m.autoDestroy||b&&b.autoDestroy?l.destroy(v):l.emit("error",v)}}},81291:(re,u,g)=>{"use strict";var p=g(84162).q.ERR_STREAM_PREMATURE_CLOSE;function w(){}re.exports=function l(v,m,b){if("function"==typeof m)return l(v,null,m);m||(m={}),b=function D(v){var m=!1;return function(){if(!m){m=!0;for(var b=arguments.length,M=new Array(b),E=0;E{re.exports=function(){throw new Error("Readable.from is not available in the browser")}},33795:(re,u,g)=>{"use strict";var p;var w=g(84162).q,_=w.ERR_MISSING_ARGS,l=w.ERR_STREAM_DESTROYED;function v(x){if(x)throw x}function M(x){x()}function E(x,N){return x.pipe(N)}re.exports=function P(){for(var x=arguments.length,N=new Array(x),F=0;F0,function(q){z||(z=q),q&&j.forEach(M),!G&&(j.forEach(M),L(z))})});return N.reduce(E)}},47890:(re,u,g)=>{"use strict";var p=g(84162).q.ERR_INVALID_OPT_VALUE;re.exports={getHighWaterMark:function w(_,l,v,m){var b=function D(_,l,v){return null!=_.highWaterMark?_.highWaterMark:l?_[v]:null}(l,m,v);if(null!=b){if(!isFinite(b)||Math.floor(b)!==b||b<0)throw new p(m?v:"highWaterMark",b);return Math.floor(b)}return _.objectMode?16:16384}}},2228:(re,u,g)=>{re.exports=g(59069).EventEmitter},31496:(re,u,g)=>{(u=re.exports=g(14473)).Stream=u,u.Readable=u,u.Writable=g(3766),u.Duplex=g(55986),u.Transform=g(3556),u.PassThrough=g(1576),u.finished=g(81291),u.pipeline=g(33795)},13465:(re,u,g)=>{"use strict";var p=g(73502).Buffer,D=p.isEncoding||function(j){switch((j=""+j)&&j.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 l(j){var W;switch(this.encoding=function _(j){var W=function w(j){if(!j)return"utf8";for(var W;;)switch(j){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 j;default:if(W)return;j=(""+j).toLowerCase(),W=!0}}(j);if("string"!=typeof W&&(p.isEncoding===D||!D(j)))throw new Error("Unknown encoding: "+j);return W||j}(j),this.encoding){case"utf16le":this.text=P,this.end=x,W=4;break;case"utf8":this.fillLast=M,W=4;break;case"base64":this.text=N,this.end=F,W=3;break;default:return this.write=L,void(this.end=z)}this.lastNeed=0,this.lastTotal=0,this.lastChar=p.allocUnsafe(W)}function v(j){return j<=127?0:j>>5==6?2:j>>4==14?3:j>>3==30?4:j>>6==2?-1:-2}function M(j){var W=this.lastTotal-this.lastNeed,Y=function b(j,W,Y){if(128!=(192&W[0]))return j.lastNeed=0,"\ufffd";if(j.lastNeed>1&&W.length>1){if(128!=(192&W[1]))return j.lastNeed=1,"\ufffd";if(j.lastNeed>2&&W.length>2&&128!=(192&W[2]))return j.lastNeed=2,"\ufffd"}}(this,j);return void 0!==Y?Y:this.lastNeed<=j.length?(j.copy(this.lastChar,W,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(j.copy(this.lastChar,W,0,j.length),void(this.lastNeed-=j.length))}function P(j,W){if((j.length-W)%2==0){var Y=j.toString("utf16le",W);if(Y){var G=Y.charCodeAt(Y.length-1);if(G>=55296&&G<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=j[j.length-2],this.lastChar[1]=j[j.length-1],Y.slice(0,-1)}return Y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=j[j.length-1],j.toString("utf16le",W,j.length-1)}function x(j){var W=j&&j.length?this.write(j):"";if(this.lastNeed){var Y=this.lastTotal-this.lastNeed;return W+this.lastChar.toString("utf16le",0,Y)}return W}function N(j,W){var Y=(j.length-W)%3;return 0===Y?j.toString("base64",W):(this.lastNeed=3-Y,this.lastTotal=3,1===Y?this.lastChar[0]=j[j.length-1]:(this.lastChar[0]=j[j.length-2],this.lastChar[1]=j[j.length-1]),j.toString("base64",W,j.length-Y))}function F(j){var W=j&&j.length?this.write(j):"";return this.lastNeed?W+this.lastChar.toString("base64",0,3-this.lastNeed):W}function L(j){return j.toString(this.encoding)}function z(j){return j&&j.length?this.write(j):""}u.s=l,l.prototype.write=function(j){if(0===j.length)return"";var W,Y;if(this.lastNeed){if(void 0===(W=this.fillLast(j)))return"";Y=this.lastNeed,this.lastNeed=0}else Y=0;return Y=0?(Q>0&&(j.lastNeed=Q-1),Q):--G=0?(Q>0&&(j.lastNeed=Q-2),Q):--G=0?(Q>0&&(2===Q?Q=0:j.lastNeed=Q-3),Q):0))}(this,j,W);if(!this.lastNeed)return j.toString("utf8",W);this.lastTotal=Y;var G=j.length-(Y-this.lastNeed);return j.copy(this.lastChar,0,G),j.toString("utf8",W,G)},l.prototype.fillLast=function(j){if(this.lastNeed<=j.length)return j.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);j.copy(this.lastChar,this.lastTotal-this.lastNeed,0,j.length),this.lastNeed-=j.length}},58905:re=>{var u=Object.prototype.toString,g=typeof Buffer<"u"&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;re.exports=function _(l,v,m){if("number"==typeof l)throw new TypeError('"value" argument must not be a number');return function p(l){return"ArrayBuffer"===u.call(l).slice(8,-1)}(l)?function D(l,v,m){v>>>=0;var b=l.byteLength-v;if(b<0)throw new RangeError("'offset' is out of bounds");if(void 0===m)m=b;else if((m>>>=0)>b)throw new RangeError("'length' is out of bounds");return g?Buffer.from(l.slice(v,v+m)):new Buffer(new Uint8Array(l.slice(v,v+m)))}(l,v,m):"string"==typeof l?function w(l,v){if(("string"!=typeof v||""===v)&&(v="utf8"),!Buffer.isEncoding(v))throw new TypeError('"encoding" must be a valid string encoding');return g?Buffer.from(l,v):new Buffer(l,v)}(l,v):g?Buffer.from(l):new Buffer(l)}},58789:re=>{re.exports=function(g,p){for(var D=Math.min(g.length,p.length),w=new Buffer(D),_=0;_{"use strict";const p=g(5343),D=g(48461),w="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;u.Buffer=m,u.SlowBuffer=function j(Re){return+Re!=Re&&(Re=0),m.alloc(+Re)},u.INSPECT_MAX_BYTES=50;const _=2147483647;function v(Re){if(Re>_)throw new RangeError('The value "'+Re+'" is invalid for option "size"');const Ae=new Uint8Array(Re);return Object.setPrototypeOf(Ae,m.prototype),Ae}function m(Re,Ae,Te){if("number"==typeof Re){if("string"==typeof Ae)throw new TypeError('The "string" argument must be of type string. Received type number');return A(Re)}return b(Re,Ae,Te)}function b(Re,Ae,Te){if("string"==typeof Re)return function P(Re,Ae){if(("string"!=typeof Ae||""===Ae)&&(Ae="utf8"),!m.isEncoding(Ae))throw new TypeError("Unknown encoding: "+Ae);const Te=0|W(Re,Ae);let Be=v(Te);const Ve=Be.write(Re,Ae);return Ve!==Te&&(Be=Be.slice(0,Ve)),Be}(Re,Ae);if(ArrayBuffer.isView(Re))return function N(Re){if(nt(Re,Uint8Array)){const Ae=new Uint8Array(Re);return F(Ae.buffer,Ae.byteOffset,Ae.byteLength)}return x(Re)}(Re);if(null==Re)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Re);if(nt(Re,ArrayBuffer)||Re&&nt(Re.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(nt(Re,SharedArrayBuffer)||Re&&nt(Re.buffer,SharedArrayBuffer)))return F(Re,Ae,Te);if("number"==typeof Re)throw new TypeError('The "value" argument must not be of type number. Received type number');const Be=Re.valueOf&&Re.valueOf();if(null!=Be&&Be!==Re)return m.from(Be,Ae,Te);const Ve=function L(Re){if(m.isBuffer(Re)){const Ae=0|z(Re.length),Te=v(Ae);return 0===Te.length||Re.copy(Te,0,0,Ae),Te}if(void 0!==Re.length)return"number"!=typeof Re.length||Vt(Re.length)?v(0):x(Re);if("Buffer"===Re.type&&Array.isArray(Re.data))return x(Re.data)}(Re);if(Ve)return Ve;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof Re[Symbol.toPrimitive])return m.from(Re[Symbol.toPrimitive]("string"),Ae,Te);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Re)}function M(Re){if("number"!=typeof Re)throw new TypeError('"size" argument must be of type number');if(Re<0)throw new RangeError('The value "'+Re+'" is invalid for option "size"')}function A(Re){return M(Re),v(Re<0?0:0|z(Re))}function x(Re){const Ae=Re.length<0?0:0|z(Re.length),Te=v(Ae);for(let Be=0;Be=_)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_.toString(16)+" bytes");return 0|Re}function W(Re,Ae){if(m.isBuffer(Re))return Re.length;if(ArrayBuffer.isView(Re)||nt(Re,ArrayBuffer))return Re.byteLength;if("string"!=typeof Re)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Re);const Te=Re.length,Be=arguments.length>2&&!0===arguments[2];if(!Be&&0===Te)return 0;let Ve=!1;for(;;)switch(Ae){case"ascii":case"latin1":case"binary":return Te;case"utf8":case"utf-8":return lt(Re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Te;case"hex":return Te>>>1;case"base64":return Kt(Re).length;default:if(Ve)return Be?-1:lt(Re).length;Ae=(""+Ae).toLowerCase(),Ve=!0}}function Y(Re,Ae,Te){let Be=!1;if((void 0===Ae||Ae<0)&&(Ae=0),Ae>this.length||((void 0===Te||Te>this.length)&&(Te=this.length),Te<=0)||(Te>>>=0)<=(Ae>>>=0))return"";for(Re||(Re="utf8");;)switch(Re){case"hex":return I(this,Ae,Te);case"utf8":case"utf-8":return d(this,Ae,Te);case"ascii":return k(this,Ae,Te);case"latin1":case"binary":return B(this,Ae,Te);case"base64":return s(this,Ae,Te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,Ae,Te);default:if(Be)throw new TypeError("Unknown encoding: "+Re);Re=(Re+"").toLowerCase(),Be=!0}}function G(Re,Ae,Te){const Be=Re[Ae];Re[Ae]=Re[Te],Re[Te]=Be}function Q(Re,Ae,Te,Be,Ve){if(0===Re.length)return-1;if("string"==typeof Te?(Be=Te,Te=0):Te>2147483647?Te=2147483647:Te<-2147483648&&(Te=-2147483648),Vt(Te=+Te)&&(Te=Ve?0:Re.length-1),Te<0&&(Te=Re.length+Te),Te>=Re.length){if(Ve)return-1;Te=Re.length-1}else if(Te<0){if(!Ve)return-1;Te=0}if("string"==typeof Ae&&(Ae=m.from(Ae,Be)),m.isBuffer(Ae))return 0===Ae.length?-1:q(Re,Ae,Te,Be,Ve);if("number"==typeof Ae)return Ae&=255,"function"==typeof Uint8Array.prototype.indexOf?Ve?Uint8Array.prototype.indexOf.call(Re,Ae,Te):Uint8Array.prototype.lastIndexOf.call(Re,Ae,Te):q(Re,[Ae],Te,Be,Ve);throw new TypeError("val must be string, number or Buffer")}function q(Re,Ae,Te,Be,Ve){let ft,mt=1,Ze=Re.length,ct=Ae.length;if(void 0!==Be&&("ucs2"===(Be=String(Be).toLowerCase())||"ucs-2"===Be||"utf16le"===Be||"utf-16le"===Be)){if(Re.length<2||Ae.length<2)return-1;mt=2,Ze/=2,ct/=2,Te/=2}function hn(At,wn){return 1===mt?At[wn]:At.readUInt16BE(wn*mt)}if(Ve){let At=-1;for(ft=Te;ftZe&&(Te=Ze-ct),ft=Te;ft>=0;ft--){let At=!0;for(let wn=0;wnVe&&(Be=Ve):Be=Ve;const mt=Ae.length;let Ze;for(Be>mt/2&&(Be=mt/2),Ze=0;Ze>8,Ve=Te%256,mt.push(Ve),mt.push(Be);return mt}(Ae,Re.length-Te),Re,Te,Be)}function s(Re,Ae,Te){return 0===Ae&&Te===Re.length?p.fromByteArray(Re):p.fromByteArray(Re.slice(Ae,Te))}function d(Re,Ae,Te){Te=Math.min(Re.length,Te);const Be=[];let Ve=Ae;for(;Ve239?4:mt>223?3:mt>191?2:1;if(Ve+ct<=Te){let hn,ft,At,wn;switch(ct){case 1:mt<128&&(Ze=mt);break;case 2:hn=Re[Ve+1],128==(192&hn)&&(wn=(31&mt)<<6|63&hn,wn>127&&(Ze=wn));break;case 3:hn=Re[Ve+1],ft=Re[Ve+2],128==(192&hn)&&128==(192&ft)&&(wn=(15&mt)<<12|(63&hn)<<6|63&ft,wn>2047&&(wn<55296||wn>57343)&&(Ze=wn));break;case 4:hn=Re[Ve+1],ft=Re[Ve+2],At=Re[Ve+3],128==(192&hn)&&128==(192&ft)&&128==(192&At)&&(wn=(15&mt)<<18|(63&hn)<<12|(63&ft)<<6|63&At,wn>65535&&wn<1114112&&(Ze=wn))}}null===Ze?(Ze=65533,ct=1):Ze>65535&&(Ze-=65536,Be.push(Ze>>>10&1023|55296),Ze=56320|1023&Ze),Be.push(Ze),Ve+=ct}return function S(Re){const Ae=Re.length;if(Ae<=h)return String.fromCharCode.apply(String,Re);let Te="",Be=0;for(;BeVe.length?(m.isBuffer(Ze)||(Ze=m.from(Ze)),Ze.copy(Ve,mt)):Uint8Array.prototype.set.call(Ve,Ze,mt);else{if(!m.isBuffer(Ze))throw new TypeError('"list" argument must be an Array of Buffers');Ze.copy(Ve,mt)}mt+=Ze.length}return Ve},m.byteLength=W,m.prototype._isBuffer=!0,m.prototype.swap16=function(){const Ae=this.length;if(Ae%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Te=0;TeTe&&(Ae+=" ... "),""},w&&(m.prototype[w]=m.prototype.inspect),m.prototype.compare=function(Ae,Te,Be,Ve,mt){if(nt(Ae,Uint8Array)&&(Ae=m.from(Ae,Ae.offset,Ae.byteLength)),!m.isBuffer(Ae))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ae);if(void 0===Te&&(Te=0),void 0===Be&&(Be=Ae?Ae.length:0),void 0===Ve&&(Ve=0),void 0===mt&&(mt=this.length),Te<0||Be>Ae.length||Ve<0||mt>this.length)throw new RangeError("out of range index");if(Ve>=mt&&Te>=Be)return 0;if(Ve>=mt)return-1;if(Te>=Be)return 1;if(this===Ae)return 0;let Ze=(mt>>>=0)-(Ve>>>=0),ct=(Be>>>=0)-(Te>>>=0);const hn=Math.min(Ze,ct),ft=this.slice(Ve,mt),At=Ae.slice(Te,Be);for(let wn=0;wn>>=0,isFinite(Be)?(Be>>>=0,void 0===Ve&&(Ve="utf8")):(Ve=Be,Be=void 0)}const mt=this.length-Te;if((void 0===Be||Be>mt)&&(Be=mt),Ae.length>0&&(Be<0||Te<0)||Te>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ve||(Ve="utf8");let Ze=!1;for(;;)switch(Ve){case"hex":return J(this,Ae,Te,Be);case"utf8":case"utf-8":return H(this,Ae,Te,Be);case"ascii":case"latin1":case"binary":return te(this,Ae,Te,Be);case"base64":return C(this,Ae,Te,Be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,Ae,Te,Be);default:if(Ze)throw new TypeError("Unknown encoding: "+Ve);Ve=(""+Ve).toLowerCase(),Ze=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const h=4096;function k(Re,Ae,Te){let Be="";Te=Math.min(Re.length,Te);for(let Ve=Ae;VeBe)&&(Te=Be);let Ve="";for(let mt=Ae;mtTe)throw new RangeError("Trying to access beyond buffer length")}function se(Re,Ae,Te,Be,Ve,mt){if(!m.isBuffer(Re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ae>Ve||AeRe.length)throw new RangeError("Index out of range")}function ee(Re,Ae,Te,Be,Ve){Se(Ae,Be,Ve,Re,Te,7);let mt=Number(Ae&BigInt(4294967295));Re[Te++]=mt,mt>>=8,Re[Te++]=mt,mt>>=8,Re[Te++]=mt,mt>>=8,Re[Te++]=mt;let Ze=Number(Ae>>BigInt(32)&BigInt(4294967295));return Re[Te++]=Ze,Ze>>=8,Re[Te++]=Ze,Ze>>=8,Re[Te++]=Ze,Ze>>=8,Re[Te++]=Ze,Te}function oe(Re,Ae,Te,Be,Ve){Se(Ae,Be,Ve,Re,Te,7);let mt=Number(Ae&BigInt(4294967295));Re[Te+7]=mt,mt>>=8,Re[Te+6]=mt,mt>>=8,Re[Te+5]=mt,mt>>=8,Re[Te+4]=mt;let Ze=Number(Ae>>BigInt(32)&BigInt(4294967295));return Re[Te+3]=Ze,Ze>>=8,Re[Te+2]=Ze,Ze>>=8,Re[Te+1]=Ze,Ze>>=8,Re[Te]=Ze,Te+8}function de(Re,Ae,Te,Be,Ve,mt){if(Te+Be>Re.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("Index out of range")}function Ce(Re,Ae,Te,Be,Ve){return Ae=+Ae,Te>>>=0,Ve||de(Re,0,Te,4),D.write(Re,Ae,Te,Be,23,4),Te+4}function ye(Re,Ae,Te,Be,Ve){return Ae=+Ae,Te>>>=0,Ve||de(Re,0,Te,8),D.write(Re,Ae,Te,Be,52,8),Te+8}m.prototype.slice=function(Ae,Te){const Be=this.length;(Ae=~~Ae)<0?(Ae+=Be)<0&&(Ae=0):Ae>Be&&(Ae=Be),(Te=void 0===Te?Be:~~Te)<0?(Te+=Be)<0&&(Te=0):Te>Be&&(Te=Be),Te>>=0,Te>>>=0,Be||R(Ae,Te,this.length);let Ve=this[Ae],mt=1,Ze=0;for(;++Ze>>=0,Te>>>=0,Be||R(Ae,Te,this.length);let Ve=this[Ae+--Te],mt=1;for(;Te>0&&(mt*=256);)Ve+=this[Ae+--Te]*mt;return Ve},m.prototype.readUint8=m.prototype.readUInt8=function(Ae,Te){return Ae>>>=0,Te||R(Ae,1,this.length),this[Ae]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(Ae,Te){return Ae>>>=0,Te||R(Ae,2,this.length),this[Ae]|this[Ae+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(Ae,Te){return Ae>>>=0,Te||R(Ae,2,this.length),this[Ae]<<8|this[Ae+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(Ae,Te){return Ae>>>=0,Te||R(Ae,4,this.length),(this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16)+16777216*this[Ae+3]},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(Ae,Te){return Ae>>>=0,Te||R(Ae,4,this.length),16777216*this[Ae]+(this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3])},m.prototype.readBigUInt64LE=at(function(Ae){ce(Ae>>>=0,"offset");const Te=this[Ae],Be=this[Ae+7];(void 0===Te||void 0===Be)&&be(Ae,this.length-8);const Ve=Te+256*this[++Ae]+65536*this[++Ae]+this[++Ae]*2**24,mt=this[++Ae]+256*this[++Ae]+65536*this[++Ae]+Be*2**24;return BigInt(Ve)+(BigInt(mt)<>>=0,"offset");const Te=this[Ae],Be=this[Ae+7];(void 0===Te||void 0===Be)&&be(Ae,this.length-8);const Ve=Te*2**24+65536*this[++Ae]+256*this[++Ae]+this[++Ae],mt=this[++Ae]*2**24+65536*this[++Ae]+256*this[++Ae]+Be;return(BigInt(Ve)<>>=0,Te>>>=0,Be||R(Ae,Te,this.length);let Ve=this[Ae],mt=1,Ze=0;for(;++Ze=mt&&(Ve-=Math.pow(2,8*Te)),Ve},m.prototype.readIntBE=function(Ae,Te,Be){Ae>>>=0,Te>>>=0,Be||R(Ae,Te,this.length);let Ve=Te,mt=1,Ze=this[Ae+--Ve];for(;Ve>0&&(mt*=256);)Ze+=this[Ae+--Ve]*mt;return mt*=128,Ze>=mt&&(Ze-=Math.pow(2,8*Te)),Ze},m.prototype.readInt8=function(Ae,Te){return Ae>>>=0,Te||R(Ae,1,this.length),128&this[Ae]?-1*(255-this[Ae]+1):this[Ae]},m.prototype.readInt16LE=function(Ae,Te){Ae>>>=0,Te||R(Ae,2,this.length);const Be=this[Ae]|this[Ae+1]<<8;return 32768&Be?4294901760|Be:Be},m.prototype.readInt16BE=function(Ae,Te){Ae>>>=0,Te||R(Ae,2,this.length);const Be=this[Ae+1]|this[Ae]<<8;return 32768&Be?4294901760|Be:Be},m.prototype.readInt32LE=function(Ae,Te){return Ae>>>=0,Te||R(Ae,4,this.length),this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16|this[Ae+3]<<24},m.prototype.readInt32BE=function(Ae,Te){return Ae>>>=0,Te||R(Ae,4,this.length),this[Ae]<<24|this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3]},m.prototype.readBigInt64LE=at(function(Ae){ce(Ae>>>=0,"offset");const Te=this[Ae],Be=this[Ae+7];(void 0===Te||void 0===Be)&&be(Ae,this.length-8);const Ve=this[Ae+4]+256*this[Ae+5]+65536*this[Ae+6]+(Be<<24);return(BigInt(Ve)<>>=0,"offset");const Te=this[Ae],Be=this[Ae+7];(void 0===Te||void 0===Be)&&be(Ae,this.length-8);const Ve=(Te<<24)+65536*this[++Ae]+256*this[++Ae]+this[++Ae];return(BigInt(Ve)<>>=0,Te||R(Ae,4,this.length),D.read(this,Ae,!0,23,4)},m.prototype.readFloatBE=function(Ae,Te){return Ae>>>=0,Te||R(Ae,4,this.length),D.read(this,Ae,!1,23,4)},m.prototype.readDoubleLE=function(Ae,Te){return Ae>>>=0,Te||R(Ae,8,this.length),D.read(this,Ae,!0,52,8)},m.prototype.readDoubleBE=function(Ae,Te){return Ae>>>=0,Te||R(Ae,8,this.length),D.read(this,Ae,!1,52,8)},m.prototype.writeUintLE=m.prototype.writeUIntLE=function(Ae,Te,Be,Ve){if(Ae=+Ae,Te>>>=0,Be>>>=0,!Ve){se(this,Ae,Te,Be,Math.pow(2,8*Be)-1,0)}let mt=1,Ze=0;for(this[Te]=255&Ae;++Ze>>=0,Be>>>=0,!Ve){se(this,Ae,Te,Be,Math.pow(2,8*Be)-1,0)}let mt=Be-1,Ze=1;for(this[Te+mt]=255&Ae;--mt>=0&&(Ze*=256);)this[Te+mt]=Ae/Ze&255;return Te+Be},m.prototype.writeUint8=m.prototype.writeUInt8=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,1,255,0),this[Te]=255&Ae,Te+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,2,65535,0),this[Te]=255&Ae,this[Te+1]=Ae>>>8,Te+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,2,65535,0),this[Te]=Ae>>>8,this[Te+1]=255&Ae,Te+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,4,4294967295,0),this[Te+3]=Ae>>>24,this[Te+2]=Ae>>>16,this[Te+1]=Ae>>>8,this[Te]=255&Ae,Te+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,4,4294967295,0),this[Te]=Ae>>>24,this[Te+1]=Ae>>>16,this[Te+2]=Ae>>>8,this[Te+3]=255&Ae,Te+4},m.prototype.writeBigUInt64LE=at(function(Ae,Te=0){return ee(this,Ae,Te,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeBigUInt64BE=at(function(Ae,Te=0){return oe(this,Ae,Te,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeIntLE=function(Ae,Te,Be,Ve){if(Ae=+Ae,Te>>>=0,!Ve){const hn=Math.pow(2,8*Be-1);se(this,Ae,Te,Be,hn-1,-hn)}let mt=0,Ze=1,ct=0;for(this[Te]=255&Ae;++mt>0)-ct&255;return Te+Be},m.prototype.writeIntBE=function(Ae,Te,Be,Ve){if(Ae=+Ae,Te>>>=0,!Ve){const hn=Math.pow(2,8*Be-1);se(this,Ae,Te,Be,hn-1,-hn)}let mt=Be-1,Ze=1,ct=0;for(this[Te+mt]=255&Ae;--mt>=0&&(Ze*=256);)Ae<0&&0===ct&&0!==this[Te+mt+1]&&(ct=1),this[Te+mt]=(Ae/Ze>>0)-ct&255;return Te+Be},m.prototype.writeInt8=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,1,127,-128),Ae<0&&(Ae=255+Ae+1),this[Te]=255&Ae,Te+1},m.prototype.writeInt16LE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,2,32767,-32768),this[Te]=255&Ae,this[Te+1]=Ae>>>8,Te+2},m.prototype.writeInt16BE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,2,32767,-32768),this[Te]=Ae>>>8,this[Te+1]=255&Ae,Te+2},m.prototype.writeInt32LE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,4,2147483647,-2147483648),this[Te]=255&Ae,this[Te+1]=Ae>>>8,this[Te+2]=Ae>>>16,this[Te+3]=Ae>>>24,Te+4},m.prototype.writeInt32BE=function(Ae,Te,Be){return Ae=+Ae,Te>>>=0,Be||se(this,Ae,Te,4,2147483647,-2147483648),Ae<0&&(Ae=4294967295+Ae+1),this[Te]=Ae>>>24,this[Te+1]=Ae>>>16,this[Te+2]=Ae>>>8,this[Te+3]=255&Ae,Te+4},m.prototype.writeBigInt64LE=at(function(Ae,Te=0){return ee(this,Ae,Te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeBigInt64BE=at(function(Ae,Te=0){return oe(this,Ae,Te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeFloatLE=function(Ae,Te,Be){return Ce(this,Ae,Te,!0,Be)},m.prototype.writeFloatBE=function(Ae,Te,Be){return Ce(this,Ae,Te,!1,Be)},m.prototype.writeDoubleLE=function(Ae,Te,Be){return ye(this,Ae,Te,!0,Be)},m.prototype.writeDoubleBE=function(Ae,Te,Be){return ye(this,Ae,Te,!1,Be)},m.prototype.copy=function(Ae,Te,Be,Ve){if(!m.isBuffer(Ae))throw new TypeError("argument should be a Buffer");if(Be||(Be=0),!Ve&&0!==Ve&&(Ve=this.length),Te>=Ae.length&&(Te=Ae.length),Te||(Te=0),Ve>0&&Ve=this.length)throw new RangeError("Index out of range");if(Ve<0)throw new RangeError("sourceEnd out of bounds");Ve>this.length&&(Ve=this.length),Ae.length-Te>>=0,Be=void 0===Be?this.length:Be>>>0,Ae||(Ae=0),"number"==typeof Ae)for(mt=Te;mt=Be+4;Te-=3)Ae=`_${Re.slice(Te-3,Te)}${Ae}`;return`${Re.slice(0,Te)}${Ae}`}function Se(Re,Ae,Te,Be,Ve,mt){if(Re>Te||Re3?0===Ae||Ae===BigInt(0)?`>= 0${Ze} and < 2${Ze} ** ${8*(mt+1)}${Ze}`:`>= -(2${Ze} ** ${8*(mt+1)-1}${Ze}) and < 2 ** ${8*(mt+1)-1}${Ze}`:`>= ${Ae}${Ze} and <= ${Te}${Ze}`,new ve.ERR_OUT_OF_RANGE("value",ct,Re)}!function pe(Re,Ae,Te){ce(Ae,"offset"),(void 0===Re[Ae]||void 0===Re[Ae+Te])&&be(Ae,Re.length-(Te+1))}(Be,Ve,mt)}function ce(Re,Ae){if("number"!=typeof Re)throw new ve.ERR_INVALID_ARG_TYPE(Ae,"number",Re)}function be(Re,Ae,Te){throw Math.floor(Re)!==Re?(ce(Re,Te),new ve.ERR_OUT_OF_RANGE(Te||"offset","an integer",Re)):Ae<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE(Te||"offset",`>= ${Te?1:0} and <= ${Ae}`,Re)}ae("ERR_BUFFER_OUT_OF_BOUNDS",function(Re){return Re?`${Re} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ae("ERR_INVALID_ARG_TYPE",function(Re,Ae){return`The "${Re}" argument must be of type number. Received type ${typeof Ae}`},TypeError),ae("ERR_OUT_OF_RANGE",function(Re,Ae,Te){let Be=`The value of "${Re}" is out of range.`,Ve=Te;return Number.isInteger(Te)&&Math.abs(Te)>2**32?Ve=fe(String(Te)):"bigint"==typeof Te&&(Ve=String(Te),(Te>BigInt(2)**BigInt(32)||Te<-(BigInt(2)**BigInt(32)))&&(Ve=fe(Ve)),Ve+="n"),Be+=` It must be ${Ae}. Received ${Ve}`,Be},RangeError);const Pe=/[^+/0-9A-Za-z-_]/g;function lt(Re,Ae){let Te;Ae=Ae||1/0;const Be=Re.length;let Ve=null;const mt=[];for(let Ze=0;Ze55295&&Te<57344){if(!Ve){if(Te>56319){(Ae-=3)>-1&&mt.push(239,191,189);continue}if(Ze+1===Be){(Ae-=3)>-1&&mt.push(239,191,189);continue}Ve=Te;continue}if(Te<56320){(Ae-=3)>-1&&mt.push(239,191,189),Ve=Te;continue}Te=65536+(Ve-55296<<10|Te-56320)}else Ve&&(Ae-=3)>-1&&mt.push(239,191,189);if(Ve=null,Te<128){if((Ae-=1)<0)break;mt.push(Te)}else if(Te<2048){if((Ae-=2)<0)break;mt.push(Te>>6|192,63&Te|128)}else if(Te<65536){if((Ae-=3)<0)break;mt.push(Te>>12|224,Te>>6&63|128,63&Te|128)}else{if(!(Te<1114112))throw new Error("Invalid code point");if((Ae-=4)<0)break;mt.push(Te>>18|240,Te>>12&63|128,Te>>6&63|128,63&Te|128)}}return mt}function Kt(Re){return p.toByteArray(function Fe(Re){if((Re=(Re=Re.split("=")[0]).trim().replace(Pe,"")).length<2)return"";for(;Re.length%4!=0;)Re+="=";return Re}(Re))}function tt(Re,Ae,Te,Be){let Ve;for(Ve=0;Ve=Ae.length||Ve>=Re.length);++Ve)Ae[Ve+Te]=Re[Ve];return Ve}function nt(Re,Ae){return Re instanceof Ae||null!=Re&&null!=Re.constructor&&null!=Re.constructor.name&&Re.constructor.name===Ae.name}function Vt(Re){return Re!=Re}const ot=function(){const Re="0123456789abcdef",Ae=new Array(256);for(let Te=0;Te<16;++Te){const Be=16*Te;for(let Ve=0;Ve<16;++Ve)Ae[Be+Ve]=Re[Te]+Re[Ve]}return Ae}();function at(Re){return typeof BigInt>"u"?Gt:Re}function Gt(){throw new Error("BigInt not supported")}},94525:re=>{re.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},75834:(re,u,g)=>{"use strict";var p=g(60399),D=g(55685),w=D(p("String.prototype.indexOf"));re.exports=function(l,v){var m=p(l,!!v);return"function"==typeof m&&w(l,".prototype.")>-1?D(m):m}},55685:(re,u,g)=>{"use strict";var p=g(84444),D=g(60399),w=D("%Function.prototype.apply%"),_=D("%Function.prototype.call%"),l=D("%Reflect.apply%",!0)||p.call(_,w),v=D("%Object.getOwnPropertyDescriptor%",!0),m=D("%Object.defineProperty%",!0),b=D("%Math.max%");if(m)try{m({},"a",{value:1})}catch{m=null}re.exports=function(A){var P=l(p,_,arguments);v&&m&&(v(P,"length").configurable&&m(P,"length",{value:1+b(0,A.length-(arguments.length-1))}));return P};var M=function(){return l(p,w,arguments)};m?m(re.exports,"apply",{value:M}):re.exports.apply=M},60399:(re,u,g)=>{"use strict";var p,D=SyntaxError,w=Function,_=TypeError,l=function(C){try{return w('"use strict"; return ('+C+").constructor;")()}catch{}},v=Object.getOwnPropertyDescriptor;if(v)try{v({},"")}catch{v=null}var m=function(){throw new _},b=v?function(){try{return arguments.callee,m}catch{try{return v(arguments,"callee").get}catch{return m}}}():m,M=g(92969)(),E=Object.getPrototypeOf||function(C){return C.__proto__},A={},P=typeof Uint8Array>"u"?p:E(Uint8Array),x={"%AggregateError%":typeof AggregateError>"u"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?p:ArrayBuffer,"%ArrayIteratorPrototype%":M?E([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>"u"?p:Atomics,"%BigInt%":typeof BigInt>"u"?p:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?p:Float32Array,"%Float64Array%":typeof Float64Array>"u"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?p:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>"u"?p:Int8Array,"%Int16Array%":typeof Int16Array>"u"?p:Int16Array,"%Int32Array%":typeof Int32Array>"u"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M?E(E([][Symbol.iterator]())):p,"%JSON%":"object"==typeof JSON?JSON:p,"%Map%":typeof Map>"u"?p:Map,"%MapIteratorPrototype%":typeof Map>"u"||!M?p:E((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?p:Promise,"%Proxy%":typeof Proxy>"u"?p:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?p:Set,"%SetIteratorPrototype%":typeof Set>"u"||!M?p:E((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M?E(""[Symbol.iterator]()):p,"%Symbol%":M?Symbol:p,"%SyntaxError%":D,"%ThrowTypeError%":b,"%TypedArray%":P,"%TypeError%":_,"%Uint8Array%":typeof Uint8Array>"u"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?p:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?p:WeakMap,"%WeakRef%":typeof WeakRef>"u"?p:WeakRef,"%WeakSet%":typeof WeakSet>"u"?p:WeakSet},N=function C(o){var s;if("%AsyncFunction%"===o)s=l("async function () {}");else if("%GeneratorFunction%"===o)s=l("function* () {}");else if("%AsyncGeneratorFunction%"===o)s=l("async function* () {}");else if("%AsyncGenerator%"===o){var d=C("%AsyncGeneratorFunction%");d&&(s=d.prototype)}else if("%AsyncIteratorPrototype%"===o){var h=C("%AsyncGenerator%");h&&(s=E(h.prototype))}return x[o]=s,s},F={"%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"]},L=g(84444),z=g(93164),j=L.call(Function.call,Array.prototype.concat),W=L.call(Function.apply,Array.prototype.splice),Y=L.call(Function.call,String.prototype.replace),G=L.call(Function.call,String.prototype.slice),Q=L.call(Function.call,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,J=/\\(\\)?/g,H=function(o){var s=G(o,0,1),d=G(o,-1);if("%"===s&&"%"!==d)throw new D("invalid intrinsic syntax, expected closing `%`");if("%"===d&&"%"!==s)throw new D("invalid intrinsic syntax, expected opening `%`");var h=[];return Y(o,q,function(S,k,B,I){h[h.length]=B?Y(I,J,"$1"):k||S}),h},te=function(o,s){var h,d=o;if(z(F,d)&&(d="%"+(h=F[d])[0]+"%"),z(x,d)){var S=x[d];if(S===A&&(S=N(d)),typeof S>"u"&&!s)throw new _("intrinsic "+o+" exists, but is not available. Please file an issue!");return{alias:h,name:d,value:S}}throw new D("intrinsic "+o+" does not exist!")};re.exports=function(o,s){if("string"!=typeof o||0===o.length)throw new _("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof s)throw new _('"allowMissing" argument must be a boolean');if(null===Q(/^%?[^%]*%?$/g,o))throw new D("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var d=H(o),h=d.length>0?d[0]:"",S=te("%"+h+"%",s),k=S.name,B=S.value,I=!1,f=S.alias;f&&(h=f[0],W(d,j([0,1],f)));for(var R=1,se=!0;R=d.length){var Ce=v(B,ee);B=(se=!!Ce)&&"get"in Ce&&!("originalValue"in Ce.get)?Ce.get:B[ee]}else se=z(B,ee),B=B[ee];se&&!I&&(x[k]=B)}}return B}},53495:(re,u,g)=>{g(37131).check("es5")},37131:(re,u,g)=>{g(58690),re.exports=g(21034)},27247:re=>{var u=function(){this.tests={},this.cache={}};u.prototype={constructor:u,define:function(g,p){if("string"!=typeof g||!(p instanceof Function))throw new Error("Invalid capability definition.");if(this.tests[g])throw new Error('Duplicated capability definition by "'+g+'".');this.tests[g]=p},check:function(g){if(!this.test(g))throw new Error('The current environment does not support "'+g+'", therefore we cannot continue.')},test:function(g){if(void 0!==this.cache[g])return this.cache[g];if(!this.tests[g])throw new Error('Unknown capability with name "'+g+'".');var p=this.tests[g];return this.cache[g]=!!p(),this.cache[g]}},re.exports=u},58690:(re,u,g)=>{var p=g(21034),D=p.define,w=p.test;D("strict mode",function(){return void 0===this}),D("arguments.callee.caller",function(){try{return function(){return arguments.callee.caller}()===arguments.callee}catch{return!1}}),D("es5",function(){return w("Array.prototype.forEach")&&w("Array.prototype.map")&&w("Function.prototype.bind")&&w("Object.create")&&w("Object.defineProperties")&&w("Object.defineProperty")&&w("Object.prototype.hasOwnProperty")}),D("Array.prototype.forEach",function(){return Array.prototype.forEach}),D("Array.prototype.map",function(){return Array.prototype.map}),D("Function.prototype.bind",function(){return Function.prototype.bind}),D("Object.create",function(){return Object.create}),D("Object.defineProperties",function(){return Object.defineProperties}),D("Object.defineProperty",function(){return Object.defineProperty}),D("Object.prototype.hasOwnProperty",function(){return Object.prototype.hasOwnProperty}),D("Error.captureStackTrace",function(){return Error.captureStackTrace}),D("Error.prototype.stack",function(){try{throw new Error}catch(_){return _.stack||_.stacktrace}})},21034:(re,u,g)=>{var D=new(g(27247)),w=function(_){return D.test(_)};w.define=function(_,l){D.define(_,l)},w.check=function(_){D.check(_)},w.test=w,re.exports=w},83018:re=>{var u={utf8:{stringToBytes:function(g){return u.bin.stringToBytes(unescape(encodeURIComponent(g)))},bytesToString:function(g){return decodeURIComponent(escape(u.bin.bytesToString(g)))}},bin:{stringToBytes:function(g){for(var p=[],D=0;D{var p=g(73502).Buffer,D=g(295).Transform,w=g(15453).s;function l(v){D.call(this),this.hashMode="string"==typeof v,this.hashMode?this[v]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}g(83894)(l,D),l.prototype.update=function(v,m,b){"string"==typeof v&&(v=p.from(v,m));var M=this._update(v);return this.hashMode?this:(b&&(M=this._toString(M,b)),M)},l.prototype.setAutoPadding=function(){},l.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},l.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},l.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},l.prototype._transform=function(v,m,b){var M;try{this.hashMode?this._update(v):this.push(this._update(v))}catch(E){M=E}finally{b(M)}},l.prototype._flush=function(v){var m;try{this.push(this.__final())}catch(b){m=b}v(m)},l.prototype._finalOrDigest=function(v){var m=this.__final()||p.alloc(0);return v&&(m=this._toString(m,v,!0)),m},l.prototype._toString=function(v,m,b){if(this._decoder||(this._decoder=new w(m),this._encoding=m),this._encoding!==m)throw new Error("can't switch encodings");var M=this._decoder.write(v);return b&&(M+=this._decoder.end()),M},re.exports=l},39448:(re,u,g)=>{var p=g(72969).Writable,D=g(83894),w=g(58905);if(typeof Uint8Array>"u")var _=g(69830).U2;else _=Uint8Array;function l(x,N){if(!(this instanceof l))return new l(x,N);"function"==typeof x&&(N=x,x={}),x||(x={});var F=x.encoding,L=!1;F?("u8"===(F=String(F).toLowerCase())||"uint8"===F)&&(F="uint8array"):L=!0,p.call(this,{objectMode:!0}),this.encoding=F,this.shouldInferEncoding=L,N&&this.on("finish",function(){N(this.getBody())}),this.body=[]}re.exports=l,D(l,p),l.prototype._write=function(x,N,F){this.body.push(x),F()},l.prototype.inferEncoding=function(x){var N=void 0===x?this.body[0]:x;return Buffer.isBuffer(N)?"buffer":typeof Uint8Array<"u"&&N instanceof Uint8Array?"uint8array":Array.isArray(N)?"array":"string"==typeof N?"string":"[object Object]"===Object.prototype.toString.call(N)?"object":"buffer"},l.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?function A(x){for(var N=[],F=0;F{var u={}.toString;re.exports=Array.isArray||function(g){return"[object Array]"==u.call(g)}},83308:(re,u,g)=>{"use strict";var p=g(95857),D=Object.keys||function(P){var x=[];for(var N in P)x.push(N);return x};re.exports=M;var w=Object.create(g(26156));w.inherits=g(83894);var _=g(58044),l=g(46615);w.inherits(M,_);for(var v=D(l.prototype),m=0;m{"use strict";re.exports=w;var p=g(55446),D=Object.create(g(26156));function w(_){if(!(this instanceof w))return new w(_);p.call(this,_)}D.inherits=g(83894),D.inherits(w,p),w.prototype._transform=function(_,l,v){v(null,_)}},58044:(re,u,g)=>{"use strict";var p=g(95857);re.exports=Y;var w,D=g(77322);Y.ReadableState=W;g(59069).EventEmitter;var l=function(ae,fe){return ae.listeners(fe).length},v=g(18228),m=g(11079).Buffer,b=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var A=Object.create(g(26156));A.inherits=g(83894);var P=g(53383),x=void 0;x=P&&P.debuglog?P.debuglog("stream"):function(){};var L,N=g(81054),F=g(8064);A.inherits(Y,v);var z=["error","close","destroy","pause","resume"];function W(ae,fe){ae=ae||{};var pe=fe instanceof(w=w||g(83308));this.objectMode=!!ae.objectMode,pe&&(this.objectMode=this.objectMode||!!ae.readableObjectMode);var Se=ae.highWaterMark,ce=ae.readableHighWaterMark,be=this.objectMode?16:16384;this.highWaterMark=Se||0===Se?Se:pe&&(ce||0===ce)?ce:be,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new N,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=ae.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ae.encoding&&(L||(L=g(95139).s),this.decoder=new L(ae.encoding),this.encoding=ae.encoding)}function Y(ae){if(w=w||g(83308),!(this instanceof Y))return new Y(ae);this._readableState=new W(ae,this),this.readable=!0,ae&&("function"==typeof ae.read&&(this._read=ae.read),"function"==typeof ae.destroy&&(this._destroy=ae.destroy)),v.call(this)}function G(ae,fe,pe,Se,ce){var Pe,be=ae._readableState;null===fe?(be.reading=!1,function o(ae,fe){if(!fe.ended){if(fe.decoder){var pe=fe.decoder.end();pe&&pe.length&&(fe.buffer.push(pe),fe.length+=fe.objectMode?1:pe.length)}fe.ended=!0,s(ae)}}(ae,be)):(ce||(Pe=function q(ae,fe){var pe;return!function E(ae){return m.isBuffer(ae)||ae instanceof b}(fe)&&"string"!=typeof fe&&void 0!==fe&&!ae.objectMode&&(pe=new TypeError("Invalid non-string/buffer chunk")),pe}(be,fe)),Pe?ae.emit("error",Pe):be.objectMode||fe&&fe.length>0?("string"!=typeof fe&&!be.objectMode&&Object.getPrototypeOf(fe)!==m.prototype&&(fe=function M(ae){return m.from(ae)}(fe)),Se?be.endEmitted?ae.emit("error",new Error("stream.unshift() after end event")):Q(ae,be,fe,!0):be.ended?ae.emit("error",new Error("stream.push() after EOF")):(be.reading=!1,be.decoder&&!pe?(fe=be.decoder.write(fe),be.objectMode||0!==fe.length?Q(ae,be,fe,!1):h(ae,be)):Q(ae,be,fe,!1))):Se||(be.reading=!1));return function J(ae){return!ae.ended&&(ae.needReadable||ae.lengthfe.highWaterMark&&(fe.highWaterMark=function te(ae){return ae>=H?ae=H:(ae--,ae|=ae>>>1,ae|=ae>>>2,ae|=ae>>>4,ae|=ae>>>8,ae|=ae>>>16,ae++),ae}(ae)),ae<=fe.length?ae:fe.ended?fe.length:(fe.needReadable=!0,0))}function s(ae){var fe=ae._readableState;fe.needReadable=!1,fe.emittedReadable||(x("emitReadable",fe.flowing),fe.emittedReadable=!0,fe.sync?p.nextTick(d,ae):d(ae))}function d(ae){x("emit readable"),ae.emit("readable"),R(ae)}function h(ae,fe){fe.readingMore||(fe.readingMore=!0,p.nextTick(S,ae,fe))}function S(ae,fe){for(var pe=fe.length;!fe.reading&&!fe.flowing&&!fe.ended&&fe.length=fe.length?(pe=fe.decoder?fe.buffer.join(""):1===fe.buffer.length?fe.buffer.head.data:fe.buffer.concat(fe.length),fe.buffer.clear()):pe=function ee(ae,fe,pe){var Se;return aebe.length?be.length:ae;if(Pe===be.length?ce+=be:ce+=be.slice(0,ae),0===(ae-=Pe)){Pe===be.length?(++Se,pe.next?fe.head=pe.next:fe.head=fe.tail=null):(fe.head=pe,pe.data=be.slice(Pe));break}++Se}return fe.length-=Se,ce}(ae,fe):function de(ae,fe){var pe=m.allocUnsafe(ae),Se=fe.head,ce=1;for(Se.data.copy(pe),ae-=Se.data.length;Se=Se.next;){var be=Se.data,Pe=ae>be.length?be.length:ae;if(be.copy(pe,pe.length-ae,0,Pe),0===(ae-=Pe)){Pe===be.length?(++ce,Se.next?fe.head=Se.next:fe.head=fe.tail=null):(fe.head=Se,Se.data=be.slice(Pe));break}++ce}return fe.length-=ce,pe}(ae,fe),Se}(ae,fe.buffer,fe.decoder),pe);var pe}function Ce(ae){var fe=ae._readableState;if(fe.length>0)throw new Error('"endReadable()" called on non-empty stream');fe.endEmitted||(fe.ended=!0,p.nextTick(ye,fe,ae))}function ye(ae,fe){!ae.endEmitted&&0===ae.length&&(ae.endEmitted=!0,fe.readable=!1,fe.emit("end"))}function ve(ae,fe){for(var pe=0,Se=ae.length;pe=fe.highWaterMark||fe.ended))return x("read: emitReadable",fe.length,fe.ended),0===fe.length&&fe.ended?Ce(this):s(this),null;if(0===(ae=C(ae,fe))&&fe.ended)return 0===fe.length&&Ce(this),null;var ce,Se=fe.needReadable;return x("need readable",Se),(0===fe.length||fe.length-ae0?se(ae,fe):null)?(fe.needReadable=!0,ae=0):fe.length-=ae,0===fe.length&&(fe.ended||(fe.needReadable=!0),pe!==ae&&fe.ended&&Ce(this)),null!==ce&&this.emit("data",ce),ce},Y.prototype._read=function(ae){this.emit("error",new Error("_read() is not implemented"))},Y.prototype.pipe=function(ae,fe){var pe=this,Se=this._readableState;switch(Se.pipesCount){case 0:Se.pipes=ae;break;case 1:Se.pipes=[Se.pipes,ae];break;default:Se.pipes.push(ae)}Se.pipesCount+=1,x("pipe count=%d opts=%j",Se.pipesCount,fe);var be=(!fe||!1!==fe.end)&&ae!==process.stdout&&ae!==process.stderr?Fe:at;function Pe(Gt,Re){x("onunpipe"),Gt===pe&&Re&&!1===Re.hasUnpiped&&(Re.hasUnpiped=!0,function He(){x("cleanup"),ae.removeListener("close",Vt),ae.removeListener("finish",ot),ae.removeListener("drain",lt),ae.removeListener("error",nt),ae.removeListener("unpipe",Pe),pe.removeListener("end",Fe),pe.removeListener("end",at),pe.removeListener("data",tt),Ge=!0,Se.awaitDrain&&(!ae._writableState||ae._writableState.needDrain)&<()}())}function Fe(){x("onend"),ae.end()}Se.endEmitted?p.nextTick(be):pe.once("end",be),ae.on("unpipe",Pe);var lt=function k(ae){return function(){var fe=ae._readableState;x("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,0===fe.awaitDrain&&l(ae,"data")&&(fe.flowing=!0,R(ae))}}(pe);ae.on("drain",lt);var Ge=!1;var Kt=!1;function tt(Gt){x("ondata"),Kt=!1,!1===ae.write(Gt)&&!Kt&&((1===Se.pipesCount&&Se.pipes===ae||Se.pipesCount>1&&-1!==ve(Se.pipes,ae))&&!Ge&&(x("false write response, pause",Se.awaitDrain),Se.awaitDrain++,Kt=!0),pe.pause())}function nt(Gt){x("onerror",Gt),at(),ae.removeListener("error",nt),0===l(ae,"error")&&ae.emit("error",Gt)}function Vt(){ae.removeListener("finish",ot),at()}function ot(){x("onfinish"),ae.removeListener("close",Vt),at()}function at(){x("unpipe"),pe.unpipe(ae)}return pe.on("data",tt),function j(ae,fe,pe){if("function"==typeof ae.prependListener)return ae.prependListener(fe,pe);ae._events&&ae._events[fe]?D(ae._events[fe])?ae._events[fe].unshift(pe):ae._events[fe]=[pe,ae._events[fe]]:ae.on(fe,pe)}(ae,"error",nt),ae.once("close",Vt),ae.once("finish",ot),ae.emit("pipe",pe),Se.flowing||(x("pipe resume"),pe.resume()),ae},Y.prototype.unpipe=function(ae){var fe=this._readableState,pe={hasUnpiped:!1};if(0===fe.pipesCount)return this;if(1===fe.pipesCount)return ae&&ae!==fe.pipes||(ae||(ae=fe.pipes),fe.pipes=null,fe.pipesCount=0,fe.flowing=!1,ae&&ae.emit("unpipe",this,pe)),this;if(!ae){var Se=fe.pipes,ce=fe.pipesCount;fe.pipes=null,fe.pipesCount=0,fe.flowing=!1;for(var be=0;be{"use strict";re.exports=_;var p=g(83308),D=Object.create(g(26156));function w(m,b){var M=this._transformState;M.transforming=!1;var E=M.writecb;if(!E)return this.emit("error",new Error("write callback called multiple times"));M.writechunk=null,M.writecb=null,null!=b&&this.push(b),E(m);var A=this._readableState;A.reading=!1,(A.needReadable||A.length{"use strict";var p=g(95857);function w(I){var f=this;this.next=null,this.entry=null,this.finish=function(){!function B(I,f,R){var se=I.entry;for(I.entry=null;se;){var ee=se.callback;f.pendingcb--,ee(R),se=se.next}f.corkedRequestsFree.next=I}(f,I)}}re.exports=z;var l,_=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:p.nextTick;z.WritableState=F;var v=Object.create(g(26156));v.inherits=g(83894);var m={deprecate:g(23532)},b=g(18228),M=g(11079).Buffer,E=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var L,x=g(8064);function N(){}function F(I,f){l=l||g(83308),I=I||{};var R=f instanceof l;this.objectMode=!!I.objectMode,R&&(this.objectMode=this.objectMode||!!I.writableObjectMode);var se=I.highWaterMark,ee=I.writableHighWaterMark,oe=this.objectMode?16:16384;this.highWaterMark=se||0===se?se:R&&(ee||0===ee)?ee:oe,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var de=!1===I.decodeStrings;this.decodeStrings=!de,this.defaultEncoding=I.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ce){!function H(I,f){var R=I._writableState,se=R.sync,ee=R.writecb;if(function J(I){I.writing=!1,I.writecb=null,I.length-=I.writelen,I.writelen=0}(R),f)!function q(I,f,R,se,ee){--f.pendingcb,R?(p.nextTick(ee,se),p.nextTick(S,I,f),I._writableState.errorEmitted=!0,I.emit("error",se)):(ee(se),I._writableState.errorEmitted=!0,I.emit("error",se),S(I,f))}(I,R,se,f,ee);else{var oe=s(R);!oe&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&o(I,R),se?_(te,I,R,oe,ee):te(I,R,oe,ee)}}(f,Ce)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}function z(I){if(l=l||g(83308),!(L.call(z,this)||this instanceof l))return new z(I);this._writableState=new F(I,this),this.writable=!0,I&&("function"==typeof I.write&&(this._write=I.write),"function"==typeof I.writev&&(this._writev=I.writev),"function"==typeof I.destroy&&(this._destroy=I.destroy),"function"==typeof I.final&&(this._final=I.final)),b.call(this)}function Q(I,f,R,se,ee,oe,de){f.writelen=se,f.writecb=de,f.writing=!0,f.sync=!0,R?I._writev(ee,f.onwrite):I._write(ee,oe,f.onwrite),f.sync=!1}function te(I,f,R,se){R||function C(I,f){0===f.length&&f.needDrain&&(f.needDrain=!1,I.emit("drain"))}(I,f),f.pendingcb--,se(),S(I,f)}function o(I,f){f.bufferProcessing=!0;var R=f.bufferedRequest;if(I._writev&&R&&R.next){var se=f.bufferedRequestCount,ee=new Array(se),oe=f.corkedRequestsFree;oe.entry=R;for(var de=0,Ce=!0;R;)ee[de]=R,R.isBuf||(Ce=!1),R=R.next,de+=1;ee.allBuffers=Ce,Q(I,f,!0,f.length,ee,"",oe.finish),f.pendingcb++,f.lastBufferedRequest=null,oe.next?(f.corkedRequestsFree=oe.next,oe.next=null):f.corkedRequestsFree=new w(f),f.bufferedRequestCount=0}else{for(;R;){var ye=R.chunk,ve=R.encoding,ae=R.callback;if(Q(I,f,!1,f.objectMode?1:ye.length,ye,ve,ae),R=R.next,f.bufferedRequestCount--,f.writing)break}null===R&&(f.lastBufferedRequest=null)}f.bufferedRequest=R,f.bufferProcessing=!1}function s(I){return I.ending&&0===I.length&&null===I.bufferedRequest&&!I.finished&&!I.writing}function d(I,f){I._final(function(R){f.pendingcb--,R&&I.emit("error",R),f.prefinished=!0,I.emit("prefinish"),S(I,f)})}function S(I,f){var R=s(f);return R&&(function h(I,f){!f.prefinished&&!f.finalCalled&&("function"==typeof I._final?(f.pendingcb++,f.finalCalled=!0,p.nextTick(d,I,f)):(f.prefinished=!0,I.emit("prefinish")))}(I,f),0===f.pendingcb&&(f.finished=!0,I.emit("finish"))),R}v.inherits(z,b),F.prototype.getBuffer=function(){for(var f=this.bufferedRequest,R=[];f;)R.push(f),f=f.next;return R},function(){try{Object.defineProperty(F.prototype,"buffer",{get:m.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(L=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(I){return!!L.call(this,I)||this===z&&(I&&I._writableState instanceof F)}})):L=function(I){return I instanceof this},z.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},z.prototype.write=function(I,f,R){var se=this._writableState,ee=!1,oe=!se.objectMode&&function P(I){return M.isBuffer(I)||I instanceof E}(I);return oe&&!M.isBuffer(I)&&(I=function A(I){return M.from(I)}(I)),"function"==typeof f&&(R=f,f=null),oe?f="buffer":f||(f=se.defaultEncoding),"function"!=typeof R&&(R=N),se.ended?function j(I,f){var R=new Error("write after end");I.emit("error",R),p.nextTick(f,R)}(this,R):(oe||function W(I,f,R,se){var ee=!0,oe=!1;return null===R?oe=new TypeError("May not write null values to stream"):"string"!=typeof R&&void 0!==R&&!f.objectMode&&(oe=new TypeError("Invalid non-string/buffer chunk")),oe&&(I.emit("error",oe),p.nextTick(se,oe),ee=!1),ee}(this,se,I,R))&&(se.pendingcb++,ee=function G(I,f,R,se,ee,oe){if(!R){var de=function Y(I,f,R){return!I.objectMode&&!1!==I.decodeStrings&&"string"==typeof f&&(f=M.from(f,R)),f}(f,se,ee);se!==de&&(R=!0,ee="buffer",se=de)}var Ce=f.objectMode?1:se.length;f.length+=Ce;var ye=f.length-1))throw new TypeError("Unknown encoding: "+f);return this._writableState.defaultEncoding=f,this},Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),z.prototype._write=function(I,f,R){R(new Error("_write() is not implemented"))},z.prototype._writev=null,z.prototype.end=function(I,f,R){var se=this._writableState;"function"==typeof I?(R=I,I=null,f=null):"function"==typeof f&&(R=f,f=null),null!=I&&this.write(I,f),se.corked&&(se.corked=1,this.uncork()),se.ending||function k(I,f,R){f.ending=!0,S(I,f),R&&(f.finished?p.nextTick(R):I.once("finish",R)),f.ended=!0,I.writable=!1}(this,se,R)},Object.defineProperty(z.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(I){this._writableState&&(this._writableState.destroyed=I)}}),z.prototype.destroy=x.destroy,z.prototype._undestroy=x.undestroy,z.prototype._destroy=function(I,f){this.end(),f(I)}},81054:(re,u,g)=>{"use strict";var D=g(11079).Buffer,w=g(7716);function _(l,v,m){l.copy(v,m)}re.exports=function(){function l(){(function p(l,v){if(!(l instanceof v))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(m){var b={data:m,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},l.prototype.unshift=function(m){var b={data:m,next:this.head};0===this.length&&(this.tail=b),this.head=b,++this.length},l.prototype.shift=function(){if(0!==this.length){var m=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,m}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(m){if(0===this.length)return"";for(var b=this.head,M=""+b.data;b=b.next;)M+=m+b.data;return M},l.prototype.concat=function(m){if(0===this.length)return D.alloc(0);for(var b=D.allocUnsafe(m>>>0),M=this.head,E=0;M;)_(M.data,b,E),E+=M.data.length,M=M.next;return b},l}(),w&&w.inspect&&w.inspect.custom&&(re.exports.prototype[w.inspect.custom]=function(){var l=w.inspect({length:this.length});return this.constructor.name+" "+l})},8064:(re,u,g)=>{"use strict";var p=g(95857);function _(l,v){l.emit("error",v)}re.exports={destroy:function D(l,v){var m=this,b=this._readableState&&this._readableState.destroyed,M=this._writableState&&this._writableState.destroyed;return b||M?(v?v(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,p.nextTick(_,this,l)):p.nextTick(_,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(E){!v&&E?m._writableState?m._writableState.errorEmitted||(m._writableState.errorEmitted=!0,p.nextTick(_,m,E)):p.nextTick(_,m,E):v&&v(E)}),this)},undestroy:function w(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},18228:(re,u,g)=>{re.exports=g(59069).EventEmitter},72969:(re,u,g)=>{(u=re.exports=g(58044)).Stream=u,u.Readable=u,u.Writable=g(46615),u.Duplex=g(83308),u.Transform=g(55446),u.PassThrough=g(60757)},11079:(re,u,g)=>{var p=g(93172),D=p.Buffer;function w(l,v){for(var m in l)v[m]=l[m]}function _(l,v,m){return D(l,v,m)}D.from&&D.alloc&&D.allocUnsafe&&D.allocUnsafeSlow?re.exports=p:(w(p,u),u.Buffer=_),w(D,_),_.from=function(l,v,m){if("number"==typeof l)throw new TypeError("Argument must not be a number");return D(l,v,m)},_.alloc=function(l,v,m){if("number"!=typeof l)throw new TypeError("Argument must be a number");var b=D(l);return void 0!==v?"string"==typeof m?b.fill(v,m):b.fill(v):b.fill(0),b},_.allocUnsafe=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return D(l)},_.allocUnsafeSlow=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return p.SlowBuffer(l)}},95139:(re,u,g)=>{"use strict";var p=g(11079).Buffer,D=p.isEncoding||function(j){switch((j=""+j)&&j.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 l(j){var W;switch(this.encoding=function _(j){var W=function w(j){if(!j)return"utf8";for(var W;;)switch(j){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 j;default:if(W)return;j=(""+j).toLowerCase(),W=!0}}(j);if("string"!=typeof W&&(p.isEncoding===D||!D(j)))throw new Error("Unknown encoding: "+j);return W||j}(j),this.encoding){case"utf16le":this.text=P,this.end=x,W=4;break;case"utf8":this.fillLast=M,W=4;break;case"base64":this.text=N,this.end=F,W=3;break;default:return this.write=L,void(this.end=z)}this.lastNeed=0,this.lastTotal=0,this.lastChar=p.allocUnsafe(W)}function v(j){return j<=127?0:j>>5==6?2:j>>4==14?3:j>>3==30?4:j>>6==2?-1:-2}function M(j){var W=this.lastTotal-this.lastNeed,Y=function b(j,W,Y){if(128!=(192&W[0]))return j.lastNeed=0,"\ufffd";if(j.lastNeed>1&&W.length>1){if(128!=(192&W[1]))return j.lastNeed=1,"\ufffd";if(j.lastNeed>2&&W.length>2&&128!=(192&W[2]))return j.lastNeed=2,"\ufffd"}}(this,j);return void 0!==Y?Y:this.lastNeed<=j.length?(j.copy(this.lastChar,W,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(j.copy(this.lastChar,W,0,j.length),void(this.lastNeed-=j.length))}function P(j,W){if((j.length-W)%2==0){var Y=j.toString("utf16le",W);if(Y){var G=Y.charCodeAt(Y.length-1);if(G>=55296&&G<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=j[j.length-2],this.lastChar[1]=j[j.length-1],Y.slice(0,-1)}return Y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=j[j.length-1],j.toString("utf16le",W,j.length-1)}function x(j){var W=j&&j.length?this.write(j):"";if(this.lastNeed){var Y=this.lastTotal-this.lastNeed;return W+this.lastChar.toString("utf16le",0,Y)}return W}function N(j,W){var Y=(j.length-W)%3;return 0===Y?j.toString("base64",W):(this.lastNeed=3-Y,this.lastTotal=3,1===Y?this.lastChar[0]=j[j.length-1]:(this.lastChar[0]=j[j.length-2],this.lastChar[1]=j[j.length-1]),j.toString("base64",W,j.length-Y))}function F(j){var W=j&&j.length?this.write(j):"";return this.lastNeed?W+this.lastChar.toString("base64",0,3-this.lastNeed):W}function L(j){return j.toString(this.encoding)}function z(j){return j&&j.length?this.write(j):""}u.s=l,l.prototype.write=function(j){if(0===j.length)return"";var W,Y;if(this.lastNeed){if(void 0===(W=this.fillLast(j)))return"";Y=this.lastNeed,this.lastNeed=0}else Y=0;return Y=0?(Q>0&&(j.lastNeed=Q-1),Q):--G=0?(Q>0&&(j.lastNeed=Q-2),Q):--G=0?(Q>0&&(2===Q?Q=0:j.lastNeed=Q-3),Q):0))}(this,j,W);if(!this.lastNeed)return j.toString("utf8",W);this.lastTotal=Y;var G=j.length-(Y-this.lastNeed);return j.copy(this.lastChar,0,G),j.toString("utf8",W,G)},l.prototype.fillLast=function(j){if(this.lastNeed<=j.length)return j.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);j.copy(this.lastChar,this.lastTotal-this.lastNeed,0,j.length),this.lastNeed-=j.length}},89093:(re,u,g)=>{"use strict";var p=g(43675),D={"text/plain":"Text","text/html":"Url",default:"Text"},w="Copy to clipboard: #{key}, Enter";re.exports=function l(v,m){var b,M,E,A,P,x,N=!1;m||(m={}),b=m.debug||!1;try{if(E=p(),A=document.createRange(),P=document.getSelection(),(x=document.createElement("span")).textContent=v,x.ariaHidden="true",x.style.all="unset",x.style.position="fixed",x.style.top=0,x.style.clip="rect(0, 0, 0, 0)",x.style.whiteSpace="pre",x.style.webkitUserSelect="text",x.style.MozUserSelect="text",x.style.msUserSelect="text",x.style.userSelect="text",x.addEventListener("copy",function(L){if(L.stopPropagation(),m.format)if(L.preventDefault(),typeof L.clipboardData>"u"){b&&console.warn("unable to use e.clipboardData"),b&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var z=D[m.format]||D.default;window.clipboardData.setData(z,v)}else L.clipboardData.clearData(),L.clipboardData.setData(m.format,v);m.onCopy&&(L.preventDefault(),m.onCopy(L.clipboardData))}),document.body.appendChild(x),A.selectNodeContents(x),P.addRange(A),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");N=!0}catch(L){b&&console.error("unable to copy using execCommand: ",L),b&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(m.format||"text",v),m.onCopy&&m.onCopy(window.clipboardData),N=!0}catch(z){b&&console.error("unable to copy using clipboardData: ",z),b&&console.error("falling back to prompt"),M=function _(v){var m=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return v.replace(/#{\s*key\s*}/g,m)}("message"in m?m.message:w),window.prompt(M,v)}}finally{P&&("function"==typeof P.removeRange?P.removeRange(A):P.removeAllRanges()),x&&document.body.removeChild(x),E()}return N}},26156:(re,u,g)=>{function F(L){return Object.prototype.toString.call(L)}u.isArray=function p(L){return Array.isArray?Array.isArray(L):"[object Array]"===F(L)},u.isBoolean=function D(L){return"boolean"==typeof L},u.isNull=function w(L){return null===L},u.isNullOrUndefined=function _(L){return null==L},u.isNumber=function l(L){return"number"==typeof L},u.isString=function v(L){return"string"==typeof L},u.isSymbol=function m(L){return"symbol"==typeof L},u.isUndefined=function b(L){return void 0===L},u.isRegExp=function M(L){return"[object RegExp]"===F(L)},u.isObject=function E(L){return"object"==typeof L&&null!==L},u.isDate=function A(L){return"[object Date]"===F(L)},u.isError=function P(L){return"[object Error]"===F(L)||L instanceof Error},u.isFunction=function x(L){return"function"==typeof L},u.isPrimitive=function N(L){return null===L||"boolean"==typeof L||"number"==typeof L||"string"==typeof L||"symbol"==typeof L||typeof L>"u"},u.isBuffer=g(93172).Buffer.isBuffer},74746:(re,u,g)=>{var p=g(57715),D=g(46422);re.exports=function(m){return new _(m)};var w={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function _(v){this.curveType=w[v],this.curveType||(this.curveType={name:v}),this.curve=new p.ec(this.curveType.name),this.keys=void 0}function l(v,m,b){Array.isArray(v)||(v=v.toArray());var M=new Buffer(v);if(b&&M.length=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(C,o,s){var d=m(C,s);return s-1>=o&&(d|=m(C,s-1)<<4),d}function M(C,o,s,d){for(var h=0,S=Math.min(C.length,s),k=o;k=49?B-49+10:B>=17?B-17+10:B}return h}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,s){return o.cmp(s)>0?o:s},l.min=function(o,s){return o.cmp(s)<0?o:s},l.prototype._init=function(o,s,d){if("number"==typeof o)return this._initNumber(o,s,d);if("object"==typeof o)return this._initArray(o,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=o[h]|o[h-1]<<8|o[h-2]<<16,this.words[S]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);else if("le"===d)for(h=0,S=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);return this.strip()},l.prototype._parseHex=function(o,s,d){this.length=Math.ceil((o.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(o,s,h)<=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;else for(h=(o.length-s)%2==0?s+1:s;h=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;this.strip()},l.prototype._parseBase=function(o,s,d){this.words=[0],this.length=1;for(var h=0,S=1;S<=67108863;S*=s)h++;h--,S=S/s|0;for(var k=o.length-d,B=k%h,I=Math.min(k,k-B)+d,f=0,R=d;R1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var E=["","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"],A=[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 N(C,o,s){s.negative=o.negative^C.negative;var d=C.length+o.length|0;s.length=d,d=d-1|0;var h=0|C.words[0],S=0|o.words[0],k=h*S,B=67108863&k,I=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&I,ee=Math.min(f,o.length-1),oe=Math.max(0,f-C.length+1);oe<=ee;oe++){var de=f-oe|0;R+=(k=(h=0|C.words[de])*(S=0|o.words[oe])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,I=0|R}return 0!==I?s.words[f]=0|I:s.length--,s.strip()}l.prototype.toString=function(o,s){var d;if(s=0|s||1,16===(o=o||10)||"hex"===o){d="";for(var h=0,S=0,k=0;k>>24-h&16777215)||k!==this.length-1?E[6-I.length]+I+d:I+d,(h+=2)>=26&&(h-=26,k--)}for(0!==S&&(d=S.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],R=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var ee=se.modn(R).toString(o);d=(se=se.idivn(R)).isZero()?ee+d:E[f-ee.length]+ee+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,s){return w(typeof v<"u"),this.toArrayLike(v,o,s)},l.prototype.toArray=function(o,s){return this.toArrayLike(Array,o,s)},l.prototype.toArrayLike=function(o,s,d){var h=this.byteLength(),S=d||Math.max(1,h);w(h<=S,"byte array longer than desired length"),w(S>0,"Requested array length <= 0"),this.strip();var I,f,k="le"===s,B=new o(S),R=this.clone();if(k){for(f=0;!R.isZero();f++)I=R.andln(255),R.iushrn(8),B[f]=I;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},l.prototype._zeroBits=function(o){if(0===o)return 26;var s=o,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],s=this._countBits(o);return 26*(this.length-1)+s},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,s=0;so.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var s;s=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var s,d;this.length>o.length?(s=this,d=o):(s=o,d=this);for(var h=0;ho.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var s=0|Math.ceil(o/26),d=o%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,s){w("number"==typeof o&&o>=0);var d=o/26|0,h=o%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<o.length?(d=this,h=o):(d=o,h=this);for(var S=0,k=0;k>>26;for(;0!==S&&k>>26;if(this.length=d.length,0!==S)this.words[this.length]=S,this.length++;else if(d!==this)for(;ko.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var s=this.iadd(o);return o.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var h,S,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,S=o):(h=o,S=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Se=8191&pe,ce=pe>>>13,be=0|h[4],Pe=8191&be,Fe=be>>>13,lt=0|h[5],Ge=8191<,He=lt>>>13,Kt=0|h[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|h[7],ot=8191&Vt,at=Vt>>>13,Gt=0|h[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|h[9],Be=8191&Te,Ve=Te>>>13,mt=0|S[0],Ze=8191&mt,ct=mt>>>13,hn=0|S[1],ft=8191&hn,At=hn>>>13,wn=0|S[2],ze=8191&wn,Qe=wn>>>13,Ht=0|S[3],pt=8191&Ht,vt=Ht>>>13,$t=0|S[4],dt=8191&$t,gt=$t>>>13,mn=0|S[5],ut=8191&mn,wt=mn>>>13,Sn=0|S[6],yt=8191&Sn,Et=Sn>>>13,_e=0|S[7],Ee=8191&_e,Me=_e>>>13,me=0|S[8],Oe=8191&me,Ke=me>>>13,it=0|S[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^s.negative,d.length=19;var Bt=(B+(I=Math.imul(ee,Ze))|0)+((8191&(f=(f=Math.imul(ee,ct))+Math.imul(oe,Ze)|0))<<13)|0;B=((R=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,I=Math.imul(Ce,Ze),f=(f=Math.imul(Ce,ct))+Math.imul(ye,Ze)|0,R=Math.imul(ye,ct);var Ct=(B+(I=I+Math.imul(ee,ft)|0)|0)+((8191&(f=(f=f+Math.imul(ee,At)|0)+Math.imul(oe,ft)|0))<<13)|0;B=((R=R+Math.imul(oe,At)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,I=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,R=Math.imul(fe,ct),I=I+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,ft)|0,R=R+Math.imul(ye,At)|0;var kt=(B+(I=I+Math.imul(ee,ze)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;B=((R=R+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,I=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,R=Math.imul(ce,ct),I=I+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,R=R+Math.imul(fe,At)|0,I=I+Math.imul(Ce,ze)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,ze)|0,R=R+Math.imul(ye,Qe)|0;var Ot=(B+(I=I+Math.imul(ee,pt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;B=((R=R+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,I=Math.imul(Pe,Ze),f=(f=Math.imul(Pe,ct))+Math.imul(Fe,Ze)|0,R=Math.imul(Fe,ct),I=I+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,R=R+Math.imul(ce,At)|0,I=I+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,R=R+Math.imul(fe,Qe)|0,I=I+Math.imul(Ce,pt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,pt)|0,R=R+Math.imul(ye,vt)|0;var Pt=(B+(I=I+Math.imul(ee,dt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;B=((R=R+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,I=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,R=Math.imul(He,ct),I=I+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Fe,ft)|0,R=R+Math.imul(Fe,At)|0,I=I+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,R=R+Math.imul(ce,Qe)|0,I=I+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,R=R+Math.imul(fe,vt)|0,I=I+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,dt)|0,R=R+Math.imul(ye,gt)|0;var Lt=(B+(I=I+Math.imul(ee,ut)|0)|0)+((8191&(f=(f=f+Math.imul(ee,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;B=((R=R+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,I=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,R=Math.imul(nt,ct),I=I+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,R=R+Math.imul(He,At)|0,I=I+Math.imul(Pe,ze)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Fe,ze)|0,R=R+Math.imul(Fe,Qe)|0,I=I+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,R=R+Math.imul(ce,vt)|0,I=I+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,R=R+Math.imul(fe,gt)|0,I=I+Math.imul(Ce,ut)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ut)|0,R=R+Math.imul(ye,wt)|0;var nn=(B+(I=I+Math.imul(ee,yt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;B=((R=R+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,I=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,R=Math.imul(at,ct),I=I+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,R=R+Math.imul(nt,At)|0,I=I+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,R=R+Math.imul(He,Qe)|0,I=I+Math.imul(Pe,pt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Fe,pt)|0,R=R+Math.imul(Fe,vt)|0,I=I+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,R=R+Math.imul(ce,gt)|0,I=I+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,R=R+Math.imul(fe,wt)|0,I=I+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,Et)|0)+Math.imul(ye,yt)|0,R=R+Math.imul(ye,Et)|0;var Yt=(B+(I=I+Math.imul(ee,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;B=((R=R+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,I=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,R=Math.imul(Ae,ct),I=I+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,R=R+Math.imul(at,At)|0,I=I+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,R=R+Math.imul(nt,Qe)|0,I=I+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,R=R+Math.imul(He,vt)|0,I=I+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Fe,dt)|0,R=R+Math.imul(Fe,gt)|0,I=I+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,R=R+Math.imul(ce,wt)|0,I=I+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,R=R+Math.imul(fe,Et)|0,I=I+Math.imul(Ce,Ee)|0,f=(f=f+Math.imul(Ce,Me)|0)+Math.imul(ye,Ee)|0,R=R+Math.imul(ye,Me)|0;var gn=(B+(I=I+Math.imul(ee,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;B=((R=R+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,I=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,R=Math.imul(Ve,ct),I=I+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,R=R+Math.imul(Ae,At)|0,I=I+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,R=R+Math.imul(at,Qe)|0,I=I+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,R=R+Math.imul(nt,vt)|0,I=I+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,R=R+Math.imul(He,gt)|0,I=I+Math.imul(Pe,ut)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Fe,ut)|0,R=R+Math.imul(Fe,wt)|0,I=I+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,R=R+Math.imul(ce,Et)|0,I=I+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,R=R+Math.imul(fe,Me)|0,I=I+Math.imul(Ce,Oe)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,Oe)|0,R=R+Math.imul(ye,Ke)|0;var an=(B+(I=I+Math.imul(ee,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ee,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;B=((R=R+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,I=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,R=Math.imul(Ve,At),I=I+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,R=R+Math.imul(Ae,Qe)|0,I=I+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,R=R+Math.imul(at,vt)|0,I=I+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,R=R+Math.imul(nt,gt)|0,I=I+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,R=R+Math.imul(He,wt)|0,I=I+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,Et)|0)+Math.imul(Fe,yt)|0,R=R+Math.imul(Fe,Et)|0,I=I+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,R=R+Math.imul(ce,Me)|0,I=I+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,R=R+Math.imul(fe,Ke)|0;var tn=(B+(I=I+Math.imul(Ce,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;B=((R=R+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,I=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,R=Math.imul(Ve,Qe),I=I+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,R=R+Math.imul(Ae,vt)|0,I=I+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,R=R+Math.imul(at,gt)|0,I=I+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,R=R+Math.imul(nt,wt)|0,I=I+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,R=R+Math.imul(He,Et)|0,I=I+Math.imul(Pe,Ee)|0,f=(f=f+Math.imul(Pe,Me)|0)+Math.imul(Fe,Ee)|0,R=R+Math.imul(Fe,Me)|0,I=I+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,R=R+Math.imul(ce,Ke)|0;var Ut=(B+(I=I+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,I=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,R=Math.imul(Ve,vt),I=I+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,R=R+Math.imul(Ae,gt)|0,I=I+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,R=R+Math.imul(at,wt)|0,I=I+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,R=R+Math.imul(nt,Et)|0,I=I+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,R=R+Math.imul(He,Me)|0,I=I+Math.imul(Pe,Oe)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Fe,Oe)|0,R=R+Math.imul(Fe,Ke)|0;var cn=(B+(I=I+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;B=((R=R+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,I=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,R=Math.imul(Ve,gt),I=I+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,R=R+Math.imul(Ae,wt)|0,I=I+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,R=R+Math.imul(at,Et)|0,I=I+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,R=R+Math.imul(nt,Me)|0,I=I+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,R=R+Math.imul(He,Ke)|0;var Jt=(B+(I=I+Math.imul(Pe,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,I=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,R=Math.imul(Ve,wt),I=I+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,R=R+Math.imul(Ae,Et)|0,I=I+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,R=R+Math.imul(at,Me)|0,I=I+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,R=R+Math.imul(nt,Ke)|0;var Zt=(B+(I=I+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;B=((R=R+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,I=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,R=Math.imul(Ve,Et),I=I+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,R=R+Math.imul(Ae,Me)|0,I=I+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,R=R+Math.imul(at,Ke)|0;var fn=(B+(I=I+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;B=((R=R+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,I=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,R=Math.imul(Ve,Me),I=I+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,R=R+Math.imul(Ae,Ke)|0;var Qt=(B+(I=I+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;B=((R=R+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,I=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,R=Math.imul(Ve,Ke);var Dt=(B+(I=I+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;B=((R=R+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(B+(I=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return B=((R=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,k[0]=Bt,k[1]=Ct,k[2]=kt,k[3]=Ot,k[4]=Pt,k[5]=Lt,k[6]=nn,k[7]=Yt,k[8]=gn,k[9]=an,k[10]=tn,k[11]=Ut,k[12]=cn,k[13]=Jt,k[14]=Zt,k[15]=fn,k[16]=Qt,k[17]=Dt,k[18]=Mt,0!==B&&(k[19]=B,d.length++),d};function z(C,o,s){return(new j).mulp(C,o,s)}function j(C,o){this.x=C,this.y=o}Math.imul||(F=N),l.prototype.mulTo=function(o,s){var d,h=this.length+o.length;return d=10===this.length&&10===o.length?F(this,o,s):h<63?N(this,o,s):h<1024?function L(C,o,s){s.negative=o.negative^C.negative,s.length=C.length+o.length;for(var d=0,h=0,S=0;S>>26)|0)>>>26,k&=67108863}s.words[S]=B,d=k,k=h}return 0!==d?s.words[S]=d:s.length--,s.strip()}(this,o,s):z(this,o,s),d},j.prototype.makeRBT=function(o){for(var s=new Array(o),d=l.prototype._countBits(o)-1,h=0;h>=1;return h},j.prototype.permute=function(o,s,d,h,S,k){for(var B=0;B>>=1)S++;return 1<>>=13,d[2*k+1]=8191&S,S>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=S>>>26,this.words[d]=67108863&S}return 0!==s&&(this.words[d]=s,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var s=function x(C){for(var o=new Array(C.bitLength()),s=0;s>>h}return o}(o);if(0===s.length)return new l(1);for(var d=this,h=0;h=0);var S,s=o%26,d=(o-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(S=0;S>>26-s}k&&(this.words[S]=k,this.length++)}if(0!==d){for(S=this.length-1;S>=0;S--)this.words[S+d]=this.words[S];for(S=0;S=0),h=s?(s-s%26)/26:0;var S=o%26,k=Math.min((o-S)/26,this.length),B=67108863^67108863>>>S<k)for(this.length-=k,f=0;f=0&&(0!==R||f>=h);f--){var se=0|this.words[f];this.words[f]=R<<26-S|se>>>S,R=se&B}return I&&0!==R&&(I.words[I.length++]=R),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,s,d){return w(0===this.negative),this.iushrn(o,s,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var s=o%26,d=(o-s)/26,h=1<=0);var s=o%26,d=(o-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(I/67108864|0),this.words[S+d]=67108863&k}for(;S>26,this.words[S+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,S=0;S>26,this.words[S]=67108863&k;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,s){var d=(this.length,o.length),h=this.clone(),S=o,k=0|S.words[S.length-1];0!==(d=26-this._countBits(k))&&(S=S.ushln(d),h.iushln(d),k=0|S.words[S.length-1]);var f,I=h.length-S.length;if("mod"!==s){(f=new l(null)).length=I+1,f.words=new Array(f.length);for(var R=0;R=0;ee--){var oe=67108864*(0|h.words[S.length+ee])+(0|h.words[S.length+ee-1]);for(oe=Math.min(oe/k|0,67108863),h._ishlnsubmul(S,oe,ee);0!==h.negative;)oe--,h.negative=0,h._ishlnsubmul(S,1,ee),h.isZero()||(h.negative^=1);f&&(f.words[ee]=oe)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},l.prototype.divmod=function(o,s,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(k=this.neg().divmod(o,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.iadd(o)),{div:h,mod:S}):0===this.negative&&0!==o.negative?(k=this.divmod(o.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&o.negative?(k=this.neg().divmod(o.neg(),s),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.isub(o)),{div:k.div,mod:S}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===s?{div:this.divn(o.words[0]),mod:null}:"mod"===s?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,s);var h,S,k},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var s=this.divmod(o);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(o):s.mod,h=o.ushrn(1),S=o.andln(1),k=d.cmp(h);return k<0||1===S&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var s=(1<<26)%o,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/o|0,s=h%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=new l(0),B=new l(1),I=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++I;for(var f=d.clone(),R=s.clone();!s.isZero();){for(var se=0,ee=1;!(s.words[0]&ee)&&se<26;++se,ee<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||S.isOdd())&&(h.iadd(f),S.isub(R)),h.iushrn(1),S.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(R)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),S.isub(B)):(d.isub(s),k.isub(h),B.isub(S))}return{a:k,b:B,gcd:d.iushln(I)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,I=1;!(s.words[0]&I)&&B<26;++B,I<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,R=1;!(d.words[0]&R)&&f<26;++f,R<<=1);if(f>0)for(d.iushrn(f);f-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(S)):(d.isub(s),S.isub(h))}return(se=0===s.cmpn(1)?h:S).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var s=this.clone(),d=o.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var S=s.cmp(d);if(S<0){var k=s;s=d,d=k}else if(0===S||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var s=o%26,d=(o-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==S&&(this.words[k]=S,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,s=o<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(o=-o),w(o<=67108863,"Number is too big");var h=0|this.words[0];d=h===o?0:ho.length)return 1;if(this.length=0;d--){var h=0|this.words[d],S=0|o.words[d];if(h!==S){hS&&(s=1);break}}return s},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new H(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var W={k256:null,p224:null,p192:null,p25519:null};function Y(C,o){this.name=C,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function H(C){if("string"==typeof C){var o=l._prime(C);this.m=o.p,this.prime=o}else w(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}function te(C){H.call(this,C),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}Y.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},Y.prototype.ireduce=function(o){var d,s=o;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(o,s){o.iushrn(this.n,0,s)},Y.prototype.imulK=function(o){return o.imul(this.k)},_(G,Y),G.prototype.split=function(o,s){for(var d=4194303,h=Math.min(o.length,9),S=0;S>>22,k=B}k>>>=22,o.words[S-10]=k,0===k&&o.length>10?o.length-=10:o.length-=9},G.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var s=0,d=0;d>>=26,o.words[d]=S,s=h}return 0!==s&&(o.words[o.length++]=s),o},l._prime=function(o){if(W[o])return W[o];var s;if("k256"===o)s=new G;else if("p224"===o)s=new Q;else if("p192"===o)s=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);s=new J}return W[o]=s,s},H.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},H.prototype._verify2=function(o,s){w(0==(o.negative|s.negative),"red works only with positives"),w(o.red&&o.red===s.red,"red works only with red numbers")},H.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},H.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},H.prototype.add=function(o,s){this._verify2(o,s);var d=o.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},H.prototype.iadd=function(o,s){this._verify2(o,s);var d=o.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},H.prototype.sub=function(o,s){this._verify2(o,s);var d=o.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},H.prototype.isub=function(o,s){this._verify2(o,s);var d=o.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},H.prototype.shl=function(o,s){return this._verify1(o),this.imod(o.ushln(s))},H.prototype.imul=function(o,s){return this._verify2(o,s),this.imod(o.imul(s))},H.prototype.mul=function(o,s){return this._verify2(o,s),this.imod(o.mul(s))},H.prototype.isqr=function(o){return this.imul(o,o.clone())},H.prototype.sqr=function(o){return this.mul(o,o)},H.prototype.sqrt=function(o){if(o.isZero())return o.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var h=this.m.subn(1),S=0;!h.isZero()&&0===h.andln(1);)S++,h.iushrn(1);w(!h.isZero());var k=new l(1).toRed(this),B=k.redNeg(),I=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,I).cmp(B);)f.redIAdd(B);for(var R=this.pow(f,h),se=this.pow(o,h.addn(1).iushrn(1)),ee=this.pow(o,h),oe=S;0!==ee.cmp(k);){for(var de=ee,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;S--){for(var R=s.words[S],se=f-1;se>=0;se--){var ee=R>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==ee||0!==B)?(B<<=1,B|=ee,(4===++I||0===S&&0===se)&&(k=this.mul(k,h[B]),I=0,B=0)):I=0}f=26}return k},H.prototype.convertTo=function(o){var s=o.umod(this.m);return s===o?s.clone():s},H.prototype.convertFrom=function(o){var s=o.clone();return s.red=null,s},l.mont=function(o){return new te(o)},_(te,H),te.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},te.prototype.convertFrom=function(o){var s=this.imod(o.mul(this.rinv));return s.red=null,s},te.prototype.imul=function(o,s){if(o.isZero()||s.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.mul=function(o,s){if(o.isZero()||s.isZero())return new l(0)._forceRed(this);var d=o.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(re=g.nmd(re),this)},96386:(re,u,g)=>{"use strict";var p=g(83894),D=g(8095),w=g(75634),_=g(95244),l=g(61052);function v(m){l.call(this,"digest"),this._hash=m}p(v,l),v.prototype._update=function(m){this._hash.update(m)},v.prototype._final=function(){return this._hash.digest()},re.exports=function(b){return"md5"===(b=b.toLowerCase())?new D:"rmd160"===b||"ripemd160"===b?new w:new v(_(b))}},55640:(re,u,g)=>{var p=g(8095);re.exports=function(D){return(new p).update(D).digest()}},74529:(re,u,g)=>{"use strict";var p=g(83894),D=g(7309),w=g(61052),_=g(73502).Buffer,l=g(55640),v=g(75634),m=g(95244),b=_.alloc(128);function M(E,A){w.call(this,"digest"),"string"==typeof A&&(A=_.from(A));var P="sha512"===E||"sha384"===E?128:64;(this._alg=E,this._key=A,A.length>P)?A=("rmd160"===E?new v:m(E)).update(A).digest():A.length{"use strict";var p=g(83894),D=g(73502).Buffer,w=g(61052),_=D.alloc(128),l=64;function v(m,b){w.call(this,"digest"),"string"==typeof b&&(b=D.from(b)),this._alg=m,this._key=b,b.length>l?b=m(b):b.length{var u,g;u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g={rotl:function(p,D){return p<>>32-D},rotr:function(p,D){return p<<32-D|p>>>D},endian:function(p){if(p.constructor==Number)return 16711935&g.rotl(p,8)|4278255360&g.rotl(p,24);for(var D=0;D0;p--)D.push(Math.floor(256*Math.random()));return D},bytesToWords:function(p){for(var D=[],w=0,_=0;w>>5]|=p[w]<<24-_%32;return D},wordsToBytes:function(p){for(var D=[],w=0;w<32*p.length;w+=8)D.push(p[w>>>5]>>>24-w%32&255);return D},bytesToHex:function(p){for(var D=[],w=0;w>>4).toString(16)),D.push((15&p[w]).toString(16));return D.join("")},hexToBytes:function(p){for(var D=[],w=0;w>>6*(3-l)&63)):D.push("=");return D.join("")},base64ToBytes:function(p){p=p.replace(/[^A-Z0-9+\/]/gi,"");for(var D=[],w=0,_=0;w>>6-2*_);return D}},re.exports=g},41348:(re,u,g)=>{"use strict";u.randomBytes=u.rng=u.pseudoRandomBytes=u.prng=g(53753),u.createHash=u.Hash=g(96386),u.createHmac=u.Hmac=g(74529);var p=g(87793),D=Object.keys(p),w=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(D);u.getHashes=function(){return w};var _=g(99357);u.pbkdf2=_.pbkdf2,u.pbkdf2Sync=_.pbkdf2Sync;var l=g(55255);u.Cipher=l.Cipher,u.createCipher=l.createCipher,u.Cipheriv=l.Cipheriv,u.createCipheriv=l.createCipheriv,u.Decipher=l.Decipher,u.createDecipher=l.createDecipher,u.Decipheriv=l.Decipheriv,u.createDecipheriv=l.createDecipheriv,u.getCiphers=l.getCiphers,u.listCiphers=l.listCiphers;var v=g(98829);u.DiffieHellmanGroup=v.DiffieHellmanGroup,u.createDiffieHellmanGroup=v.createDiffieHellmanGroup,u.getDiffieHellman=v.getDiffieHellman,u.createDiffieHellman=v.createDiffieHellman,u.DiffieHellman=v.DiffieHellman;var m=g(3923);u.createSign=m.createSign,u.Sign=m.Sign,u.createVerify=m.createVerify,u.Verify=m.Verify,u.createECDH=g(74746);var b=g(63701);u.publicEncrypt=b.publicEncrypt,u.privateEncrypt=b.privateEncrypt,u.publicDecrypt=b.publicDecrypt,u.privateDecrypt=b.privateDecrypt;var M=g(14275);u.randomFill=M.randomFill,u.randomFillSync=M.randomFillSync,u.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},u.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},12761:re=>{"use strict";var u="%[a-f0-9]{2}",g=new RegExp("("+u+")|([^%]+?)","gi"),p=new RegExp("("+u+")+","gi");function D(l,v){try{return[decodeURIComponent(l.join(""))]}catch{}if(1===l.length)return l;v=v||1;var m=l.slice(0,v),b=l.slice(v);return Array.prototype.concat.call([],D(m),D(b))}function w(l){try{return decodeURIComponent(l)}catch{for(var v=l.match(g)||[],m=1;m{var p=g(26788),D=g(30826).NI;function w(_){D.call(this,"string"==typeof _?_:""),this._db=void 0,this._operations=[]}p.inherits(w,D),w.prototype.setDb=function(_){this._db=_,this._operations.forEach(function(l){_[l.method].apply(_,l.args)})},w.prototype._open=function(_,l){return process.nextTick(l)},w.prototype._operation=function(_,l){if(this._db)return this._db[_].apply(this._db,l);this._operations.push({method:_,args:l})},"put get del batch approximateSize".split(" ").forEach(function(_){w.prototype["_"+_]=function(){this._operation(_,arguments)}}),w.prototype._isBuffer=function(_){return Buffer.isBuffer(_)},w.prototype._iterator=function(){throw new TypeError("not implemented")},re.exports=w},89176:re=>{"use strict";function g(D,w){if("function"!=typeof D)throw new TypeError("argument fn must be a function");return D}function p(D,w,_){if(!D||"object"!=typeof D&&"function"!=typeof D)throw new TypeError("argument obj must be object");var l=Object.getOwnPropertyDescriptor(D,w);if(!l)throw new TypeError("must call property on owner object");if(!l.configurable)throw new TypeError("property must be configurable")}re.exports=function u(D){if(!D)throw new TypeError("argument namespace is required");function w(_){}return w._file=void 0,w._ignored=!0,w._namespace=D,w._traced=!1,w._warned=Object.create(null),w.function=g,w.property=p,w}},73684:(re,u,g)=>{"use strict";u.utils=g(77451),u.Cipher=g(38170),u.DES=g(4631),u.CBC=g(79454),u.EDE=g(21862)},79454:(re,u,g)=>{"use strict";var p=g(32391),D=g(83894),w={};function _(v){p.equal(v.length,8,"Invalid IV length"),this.iv=new Array(8);for(var m=0;m{"use strict";var p=g(32391);function D(w){this.options=w,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}re.exports=D,D.prototype._init=function(){},D.prototype.update=function(_){return 0===_.length?[]:"decrypt"===this.type?this._updateDecrypt(_):this._updateEncrypt(_)},D.prototype._buffer=function(_,l){for(var v=Math.min(this.buffer.length-this.bufferOff,_.length-l),m=0;m0;m--)l+=this._buffer(_,l),v+=this._flushBuffer(b,v);return l+=this._buffer(_,l),b},D.prototype.final=function(_){var l,v;return _&&(l=this.update(_)),v="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),l?l.concat(v):v},D.prototype._pad=function(_,l){if(0===l)return!1;for(;l<_.length;)_[l++]=0;return!0},D.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var _=new Array(this.blockSize);return this._update(this.buffer,0,_,0),_},D.prototype._unpad=function(_){return _},D.prototype._finalDecrypt=function(){p.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var _=new Array(this.blockSize);return this._flushBuffer(_,0),this._unpad(_)}},4631:(re,u,g)=>{"use strict";var p=g(32391),D=g(83894),w=g(77451),_=g(38170);function l(){this.tmp=new Array(2),this.keys=null}function v(b){_.call(this,b);var M=new l;this._desState=M,this.deriveKeys(M,b.key)}D(v,_),re.exports=v,v.create=function(M){return new v(M)};var m=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];v.prototype.deriveKeys=function(M,E){M.keys=new Array(32),p.equal(E.length,this.blockSize,"Invalid key length");var A=w.readUInt32BE(E,0),P=w.readUInt32BE(E,4);w.pc1(A,P,M.tmp,0),A=M.tmp[0],P=M.tmp[1];for(var x=0;x>>1];A=w.r28shl(A,N),P=w.r28shl(P,N),w.pc2(A,P,M.keys,x)}},v.prototype._update=function(M,E,A,P){var x=this._desState,N=w.readUInt32BE(M,E),F=w.readUInt32BE(M,E+4);w.ip(N,F,x.tmp,0),N=x.tmp[0],F=x.tmp[1],"encrypt"===this.type?this._encrypt(x,N,F,x.tmp,0):this._decrypt(x,N,F,x.tmp,0),N=x.tmp[0],F=x.tmp[1],w.writeUInt32BE(A,N,P),w.writeUInt32BE(A,F,P+4)},v.prototype._pad=function(M,E){for(var A=M.length-E,P=E;P>>0,N=G}w.rip(F,N,P,x)},v.prototype._decrypt=function(M,E,A,P,x){for(var N=A,F=E,L=M.keys.length-2;L>=0;L-=2){var z=M.keys[L],j=M.keys[L+1];w.expand(N,M.tmp,0),z^=M.tmp[0],j^=M.tmp[1];var W=w.substitute(z,j),G=N;N=(F^w.permute(W))>>>0,F=G}w.rip(N,F,P,x)}},21862:(re,u,g)=>{"use strict";var p=g(32391),D=g(83894),w=g(38170),_=g(4631);function l(m,b){p.equal(b.length,24,"Invalid key length");var M=b.slice(0,8),E=b.slice(8,16),A=b.slice(16,24);this.ciphers="encrypt"===m?[_.create({type:"encrypt",key:M}),_.create({type:"decrypt",key:E}),_.create({type:"encrypt",key:A})]:[_.create({type:"decrypt",key:A}),_.create({type:"encrypt",key:E}),_.create({type:"decrypt",key:M})]}function v(m){w.call(this,m);var b=new l(this.type,this.options.key);this._edeState=b}D(v,w),re.exports=v,v.create=function(b){return new v(b)},v.prototype._update=function(b,M,E,A){var P=this._edeState;P.ciphers[0]._update(b,M,E,A),P.ciphers[1]._update(E,A,E,A),P.ciphers[2]._update(E,A,E,A)},v.prototype._pad=_.prototype._pad,v.prototype._unpad=_.prototype._unpad},77451:(re,u)=>{"use strict";u.readUInt32BE=function(_,l){return(_[0+l]<<24|_[1+l]<<16|_[2+l]<<8|_[3+l])>>>0},u.writeUInt32BE=function(_,l,v){_[0+v]=l>>>24,_[1+v]=l>>>16&255,_[2+v]=l>>>8&255,_[3+v]=255&l},u.ip=function(_,l,v,m){for(var b=0,M=0,E=6;E>=0;E-=2){for(var A=0;A<=24;A+=8)b<<=1,b|=l>>>A+E&1;for(A=0;A<=24;A+=8)b<<=1,b|=_>>>A+E&1}for(E=6;E>=0;E-=2){for(A=1;A<=25;A+=8)M<<=1,M|=l>>>A+E&1;for(A=1;A<=25;A+=8)M<<=1,M|=_>>>A+E&1}v[m+0]=b>>>0,v[m+1]=M>>>0},u.rip=function(_,l,v,m){for(var b=0,M=0,E=0;E<4;E++)for(var A=24;A>=0;A-=8)b<<=1,b|=l>>>A+E&1,b<<=1,b|=_>>>A+E&1;for(E=4;E<8;E++)for(A=24;A>=0;A-=8)M<<=1,M|=l>>>A+E&1,M<<=1,M|=_>>>A+E&1;v[m+0]=b>>>0,v[m+1]=M>>>0},u.pc1=function(_,l,v,m){for(var b=0,M=0,E=7;E>=5;E--){for(var A=0;A<=24;A+=8)b<<=1,b|=l>>A+E&1;for(A=0;A<=24;A+=8)b<<=1,b|=_>>A+E&1}for(A=0;A<=24;A+=8)b<<=1,b|=l>>A+E&1;for(E=1;E<=3;E++){for(A=0;A<=24;A+=8)M<<=1,M|=l>>A+E&1;for(A=0;A<=24;A+=8)M<<=1,M|=_>>A+E&1}for(A=0;A<=24;A+=8)M<<=1,M|=_>>A+E&1;v[m+0]=b>>>0,v[m+1]=M>>>0},u.r28shl=function(_,l){return _<>>28-l};var g=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];u.pc2=function(_,l,v,m){for(var b=0,M=0,E=g.length>>>1,A=0;A>>g[A]&1;for(A=E;A>>g[A]&1;v[m+0]=b>>>0,v[m+1]=M>>>0},u.expand=function(_,l,v){var m=0,b=0;m=(1&_)<<5|_>>>27;for(var M=23;M>=15;M-=4)m<<=6,m|=_>>>M&63;for(M=11;M>=3;M-=4)b|=_>>>M&63,b<<=6;b|=(31&_)<<1|_>>>31,l[v+0]=m>>>0,l[v+1]=b>>>0};var p=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];u.substitute=function(_,l){for(var v=0,m=0;m<4;m++){v<<=4,v|=p[64*m+(_>>>18-6*m&63)]}for(m=0;m<4;m++){v<<=4,v|=p[256+64*m+(l>>>18-6*m&63)]}return v>>>0};var D=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];u.permute=function(_){for(var l=0,v=0;v>>D[v]&1;return l>>>0},u.padSplit=function(_,l,v){for(var m=_.toString(2);m.length{var p=g(85563),D=g(29799),w=g(21419);var l={binary:!0,hex:!0,base64:!0};u.DiffieHellmanGroup=u.createDiffieHellmanGroup=u.getDiffieHellman=function _(m){var b=new Buffer(D[m].prime,"hex"),M=new Buffer(D[m].gen,"hex");return new w(b,M)},u.createDiffieHellman=u.DiffieHellman=function v(m,b,M,E){return Buffer.isBuffer(b)||void 0===l[b]?v(m,"binary",b,M):(b=b||"binary",E=E||"binary",M=M||new Buffer([2]),Buffer.isBuffer(M)||(M=new Buffer(M,E)),"number"==typeof m?new w(p(m,M),M,!0):(Buffer.isBuffer(m)||(m=new Buffer(m,b)),new w(m,M,!0)))}},21419:(re,u,g)=>{var p=g(88313),w=new(g(17079)),_=new p(24),l=new p(11),v=new p(10),m=new p(3),b=new p(7),M=g(85563),E=g(53753);function A(z,j){return j=j||"utf8",Buffer.isBuffer(z)||(z=new Buffer(z,j)),this._pub=new p(z),this}function P(z,j){return j=j||"utf8",Buffer.isBuffer(z)||(z=new Buffer(z,j)),this._priv=new p(z),this}re.exports=F;var x={};function F(z,j,W){this.setGenerator(j),this.__prime=new p(z),this._prime=p.mont(this.__prime),this._primeLen=z.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,W?(this.setPublicKey=A,this.setPrivateKey=P):this._primeCode=8}function L(z,j){var W=new Buffer(z.toArray());return j?W.toString(j):W}Object.defineProperty(F.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function N(z,j){var W=j.toString("hex"),Y=[W,z.toString(16)].join("_");if(Y in x)return x[Y];var Q,G=0;if(z.isEven()||!M.simpleSieve||!M.fermatTest(z)||!w.test(z))return G+=1,G+="02"===W||"05"===W?8:4,x[Y]=G,G;switch(w.test(z.shrn(1))||(G+=2),W){case"02":z.mod(_).cmp(l)&&(G+=8);break;case"05":(Q=z.mod(v)).cmp(m)&&Q.cmp(b)&&(G+=8);break;default:G+=4}return x[Y]=G,G}(this.__prime,this.__gen)),this._primeCode}}),F.prototype.generateKeys=function(){return this._priv||(this._priv=new p(E(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},F.prototype.computeSecret=function(z){var j=(z=(z=new p(z)).toRed(this._prime)).redPow(this._priv).fromRed(),W=new Buffer(j.toArray()),Y=this.getPrime();if(W.length{var p=g(53753);re.exports=G,G.simpleSieve=W,G.fermatTest=Y;var D=g(88313),w=new D(24),l=new(g(17079)),v=new D(1),m=new D(2),b=new D(5),A=(new D(16),new D(8),new D(10)),P=new D(3),N=(new D(7),new D(11)),F=new D(4),z=(new D(12),null);function W(Q){for(var q=function j(){if(null!==z)return z;var q=[];q[0]=2;for(var J=1,H=3;H<1048576;H+=2){for(var te=Math.ceil(Math.sqrt(H)),C=0;CQ;)J.ishrn(1);if(J.isEven()&&J.iadd(v),J.testn(1)||J.iadd(m),q.cmp(m)){if(!q.cmp(b))for(;J.mod(A).cmp(P);)J.iadd(F)}else for(;J.mod(w).cmp(N);)J.iadd(F);if(W(H=J.shrn(1))&&W(J)&&Y(H)&&Y(J)&&l.test(H)&&l.test(J))return J}}},88313:function(re,u,g){(function(p,D){"use strict";function w(C,o){if(!C)throw new Error(o||"Assertion failed")}function _(C,o){C.super_=o;var s=function(){};s.prototype=o.prototype,C.prototype=new s,C.prototype.constructor=C}function l(C,o,s){if(l.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,null!==C&&(("le"===o||"be"===o)&&(s=o,o=10),this._init(C||0,o||10,s||"be"))}var v;"object"==typeof p?p.exports=l:D.BN=l,l.BN=l,l.wordSize=26;try{v=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:g(7748).Buffer}catch{}function m(C,o){var s=C.charCodeAt(o);return s>=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(C,o,s){var d=m(C,s);return s-1>=o&&(d|=m(C,s-1)<<4),d}function M(C,o,s,d){for(var h=0,S=Math.min(C.length,s),k=o;k=49?B-49+10:B>=17?B-17+10:B}return h}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,s){return o.cmp(s)>0?o:s},l.min=function(o,s){return o.cmp(s)<0?o:s},l.prototype._init=function(o,s,d){if("number"==typeof o)return this._initNumber(o,s,d);if("object"==typeof o)return this._initArray(o,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=o[h]|o[h-1]<<8|o[h-2]<<16,this.words[S]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);else if("le"===d)for(h=0,S=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);return this.strip()},l.prototype._parseHex=function(o,s,d){this.length=Math.ceil((o.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(o,s,h)<=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;else for(h=(o.length-s)%2==0?s+1:s;h=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;this.strip()},l.prototype._parseBase=function(o,s,d){this.words=[0],this.length=1;for(var h=0,S=1;S<=67108863;S*=s)h++;h--,S=S/s|0;for(var k=o.length-d,B=k%h,I=Math.min(k,k-B)+d,f=0,R=d;R1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var E=["","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"],A=[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 N(C,o,s){s.negative=o.negative^C.negative;var d=C.length+o.length|0;s.length=d,d=d-1|0;var h=0|C.words[0],S=0|o.words[0],k=h*S,B=67108863&k,I=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&I,ee=Math.min(f,o.length-1),oe=Math.max(0,f-C.length+1);oe<=ee;oe++){var de=f-oe|0;R+=(k=(h=0|C.words[de])*(S=0|o.words[oe])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,I=0|R}return 0!==I?s.words[f]=0|I:s.length--,s.strip()}l.prototype.toString=function(o,s){var d;if(s=0|s||1,16===(o=o||10)||"hex"===o){d="";for(var h=0,S=0,k=0;k>>24-h&16777215)||k!==this.length-1?E[6-I.length]+I+d:I+d,(h+=2)>=26&&(h-=26,k--)}for(0!==S&&(d=S.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],R=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var ee=se.modn(R).toString(o);d=(se=se.idivn(R)).isZero()?ee+d:E[f-ee.length]+ee+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,s){return w(typeof v<"u"),this.toArrayLike(v,o,s)},l.prototype.toArray=function(o,s){return this.toArrayLike(Array,o,s)},l.prototype.toArrayLike=function(o,s,d){var h=this.byteLength(),S=d||Math.max(1,h);w(h<=S,"byte array longer than desired length"),w(S>0,"Requested array length <= 0"),this.strip();var I,f,k="le"===s,B=new o(S),R=this.clone();if(k){for(f=0;!R.isZero();f++)I=R.andln(255),R.iushrn(8),B[f]=I;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},l.prototype._zeroBits=function(o){if(0===o)return 26;var s=o,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],s=this._countBits(o);return 26*(this.length-1)+s},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,s=0;so.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var s;s=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var s,d;this.length>o.length?(s=this,d=o):(s=o,d=this);for(var h=0;ho.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var s=0|Math.ceil(o/26),d=o%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,s){w("number"==typeof o&&o>=0);var d=o/26|0,h=o%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<o.length?(d=this,h=o):(d=o,h=this);for(var S=0,k=0;k>>26;for(;0!==S&&k>>26;if(this.length=d.length,0!==S)this.words[this.length]=S,this.length++;else if(d!==this)for(;ko.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var s=this.iadd(o);return o.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var h,S,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,S=o):(h=o,S=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Se=8191&pe,ce=pe>>>13,be=0|h[4],Pe=8191&be,Fe=be>>>13,lt=0|h[5],Ge=8191<,He=lt>>>13,Kt=0|h[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|h[7],ot=8191&Vt,at=Vt>>>13,Gt=0|h[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|h[9],Be=8191&Te,Ve=Te>>>13,mt=0|S[0],Ze=8191&mt,ct=mt>>>13,hn=0|S[1],ft=8191&hn,At=hn>>>13,wn=0|S[2],ze=8191&wn,Qe=wn>>>13,Ht=0|S[3],pt=8191&Ht,vt=Ht>>>13,$t=0|S[4],dt=8191&$t,gt=$t>>>13,mn=0|S[5],ut=8191&mn,wt=mn>>>13,Sn=0|S[6],yt=8191&Sn,Et=Sn>>>13,_e=0|S[7],Ee=8191&_e,Me=_e>>>13,me=0|S[8],Oe=8191&me,Ke=me>>>13,it=0|S[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^s.negative,d.length=19;var Bt=(B+(I=Math.imul(ee,Ze))|0)+((8191&(f=(f=Math.imul(ee,ct))+Math.imul(oe,Ze)|0))<<13)|0;B=((R=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,I=Math.imul(Ce,Ze),f=(f=Math.imul(Ce,ct))+Math.imul(ye,Ze)|0,R=Math.imul(ye,ct);var Ct=(B+(I=I+Math.imul(ee,ft)|0)|0)+((8191&(f=(f=f+Math.imul(ee,At)|0)+Math.imul(oe,ft)|0))<<13)|0;B=((R=R+Math.imul(oe,At)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,I=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,R=Math.imul(fe,ct),I=I+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,ft)|0,R=R+Math.imul(ye,At)|0;var kt=(B+(I=I+Math.imul(ee,ze)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;B=((R=R+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,I=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,R=Math.imul(ce,ct),I=I+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,R=R+Math.imul(fe,At)|0,I=I+Math.imul(Ce,ze)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,ze)|0,R=R+Math.imul(ye,Qe)|0;var Ot=(B+(I=I+Math.imul(ee,pt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;B=((R=R+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,I=Math.imul(Pe,Ze),f=(f=Math.imul(Pe,ct))+Math.imul(Fe,Ze)|0,R=Math.imul(Fe,ct),I=I+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,R=R+Math.imul(ce,At)|0,I=I+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,R=R+Math.imul(fe,Qe)|0,I=I+Math.imul(Ce,pt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,pt)|0,R=R+Math.imul(ye,vt)|0;var Pt=(B+(I=I+Math.imul(ee,dt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;B=((R=R+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,I=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,R=Math.imul(He,ct),I=I+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Fe,ft)|0,R=R+Math.imul(Fe,At)|0,I=I+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,R=R+Math.imul(ce,Qe)|0,I=I+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,R=R+Math.imul(fe,vt)|0,I=I+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,dt)|0,R=R+Math.imul(ye,gt)|0;var Lt=(B+(I=I+Math.imul(ee,ut)|0)|0)+((8191&(f=(f=f+Math.imul(ee,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;B=((R=R+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,I=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,R=Math.imul(nt,ct),I=I+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,R=R+Math.imul(He,At)|0,I=I+Math.imul(Pe,ze)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Fe,ze)|0,R=R+Math.imul(Fe,Qe)|0,I=I+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,R=R+Math.imul(ce,vt)|0,I=I+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,R=R+Math.imul(fe,gt)|0,I=I+Math.imul(Ce,ut)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ut)|0,R=R+Math.imul(ye,wt)|0;var nn=(B+(I=I+Math.imul(ee,yt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;B=((R=R+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,I=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,R=Math.imul(at,ct),I=I+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,R=R+Math.imul(nt,At)|0,I=I+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,R=R+Math.imul(He,Qe)|0,I=I+Math.imul(Pe,pt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Fe,pt)|0,R=R+Math.imul(Fe,vt)|0,I=I+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,R=R+Math.imul(ce,gt)|0,I=I+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,R=R+Math.imul(fe,wt)|0,I=I+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,Et)|0)+Math.imul(ye,yt)|0,R=R+Math.imul(ye,Et)|0;var Yt=(B+(I=I+Math.imul(ee,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;B=((R=R+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,I=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,R=Math.imul(Ae,ct),I=I+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,R=R+Math.imul(at,At)|0,I=I+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,R=R+Math.imul(nt,Qe)|0,I=I+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,R=R+Math.imul(He,vt)|0,I=I+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Fe,dt)|0,R=R+Math.imul(Fe,gt)|0,I=I+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,R=R+Math.imul(ce,wt)|0,I=I+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,R=R+Math.imul(fe,Et)|0,I=I+Math.imul(Ce,Ee)|0,f=(f=f+Math.imul(Ce,Me)|0)+Math.imul(ye,Ee)|0,R=R+Math.imul(ye,Me)|0;var gn=(B+(I=I+Math.imul(ee,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;B=((R=R+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,I=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,R=Math.imul(Ve,ct),I=I+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,R=R+Math.imul(Ae,At)|0,I=I+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,R=R+Math.imul(at,Qe)|0,I=I+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,R=R+Math.imul(nt,vt)|0,I=I+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,R=R+Math.imul(He,gt)|0,I=I+Math.imul(Pe,ut)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Fe,ut)|0,R=R+Math.imul(Fe,wt)|0,I=I+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,R=R+Math.imul(ce,Et)|0,I=I+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,R=R+Math.imul(fe,Me)|0,I=I+Math.imul(Ce,Oe)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,Oe)|0,R=R+Math.imul(ye,Ke)|0;var an=(B+(I=I+Math.imul(ee,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ee,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;B=((R=R+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,I=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,R=Math.imul(Ve,At),I=I+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,R=R+Math.imul(Ae,Qe)|0,I=I+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,R=R+Math.imul(at,vt)|0,I=I+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,R=R+Math.imul(nt,gt)|0,I=I+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,R=R+Math.imul(He,wt)|0,I=I+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,Et)|0)+Math.imul(Fe,yt)|0,R=R+Math.imul(Fe,Et)|0,I=I+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,R=R+Math.imul(ce,Me)|0,I=I+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,R=R+Math.imul(fe,Ke)|0;var tn=(B+(I=I+Math.imul(Ce,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;B=((R=R+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,I=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,R=Math.imul(Ve,Qe),I=I+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,R=R+Math.imul(Ae,vt)|0,I=I+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,R=R+Math.imul(at,gt)|0,I=I+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,R=R+Math.imul(nt,wt)|0,I=I+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,R=R+Math.imul(He,Et)|0,I=I+Math.imul(Pe,Ee)|0,f=(f=f+Math.imul(Pe,Me)|0)+Math.imul(Fe,Ee)|0,R=R+Math.imul(Fe,Me)|0,I=I+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,R=R+Math.imul(ce,Ke)|0;var Ut=(B+(I=I+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,I=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,R=Math.imul(Ve,vt),I=I+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,R=R+Math.imul(Ae,gt)|0,I=I+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,R=R+Math.imul(at,wt)|0,I=I+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,R=R+Math.imul(nt,Et)|0,I=I+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,R=R+Math.imul(He,Me)|0,I=I+Math.imul(Pe,Oe)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Fe,Oe)|0,R=R+Math.imul(Fe,Ke)|0;var cn=(B+(I=I+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;B=((R=R+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,I=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,R=Math.imul(Ve,gt),I=I+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,R=R+Math.imul(Ae,wt)|0,I=I+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,R=R+Math.imul(at,Et)|0,I=I+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,R=R+Math.imul(nt,Me)|0,I=I+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,R=R+Math.imul(He,Ke)|0;var Jt=(B+(I=I+Math.imul(Pe,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,I=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,R=Math.imul(Ve,wt),I=I+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,R=R+Math.imul(Ae,Et)|0,I=I+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,R=R+Math.imul(at,Me)|0,I=I+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,R=R+Math.imul(nt,Ke)|0;var Zt=(B+(I=I+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;B=((R=R+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,I=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,R=Math.imul(Ve,Et),I=I+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,R=R+Math.imul(Ae,Me)|0,I=I+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,R=R+Math.imul(at,Ke)|0;var fn=(B+(I=I+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;B=((R=R+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,I=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,R=Math.imul(Ve,Me),I=I+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,R=R+Math.imul(Ae,Ke)|0;var Qt=(B+(I=I+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;B=((R=R+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,I=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,R=Math.imul(Ve,Ke);var Dt=(B+(I=I+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;B=((R=R+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(B+(I=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return B=((R=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,k[0]=Bt,k[1]=Ct,k[2]=kt,k[3]=Ot,k[4]=Pt,k[5]=Lt,k[6]=nn,k[7]=Yt,k[8]=gn,k[9]=an,k[10]=tn,k[11]=Ut,k[12]=cn,k[13]=Jt,k[14]=Zt,k[15]=fn,k[16]=Qt,k[17]=Dt,k[18]=Mt,0!==B&&(k[19]=B,d.length++),d};function z(C,o,s){return(new j).mulp(C,o,s)}function j(C,o){this.x=C,this.y=o}Math.imul||(F=N),l.prototype.mulTo=function(o,s){var d,h=this.length+o.length;return d=10===this.length&&10===o.length?F(this,o,s):h<63?N(this,o,s):h<1024?function L(C,o,s){s.negative=o.negative^C.negative,s.length=C.length+o.length;for(var d=0,h=0,S=0;S>>26)|0)>>>26,k&=67108863}s.words[S]=B,d=k,k=h}return 0!==d?s.words[S]=d:s.length--,s.strip()}(this,o,s):z(this,o,s),d},j.prototype.makeRBT=function(o){for(var s=new Array(o),d=l.prototype._countBits(o)-1,h=0;h>=1;return h},j.prototype.permute=function(o,s,d,h,S,k){for(var B=0;B>>=1)S++;return 1<>>=13,d[2*k+1]=8191&S,S>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=S>>>26,this.words[d]=67108863&S}return 0!==s&&(this.words[d]=s,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var s=function x(C){for(var o=new Array(C.bitLength()),s=0;s>>h}return o}(o);if(0===s.length)return new l(1);for(var d=this,h=0;h=0);var S,s=o%26,d=(o-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(S=0;S>>26-s}k&&(this.words[S]=k,this.length++)}if(0!==d){for(S=this.length-1;S>=0;S--)this.words[S+d]=this.words[S];for(S=0;S=0),h=s?(s-s%26)/26:0;var S=o%26,k=Math.min((o-S)/26,this.length),B=67108863^67108863>>>S<k)for(this.length-=k,f=0;f=0&&(0!==R||f>=h);f--){var se=0|this.words[f];this.words[f]=R<<26-S|se>>>S,R=se&B}return I&&0!==R&&(I.words[I.length++]=R),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,s,d){return w(0===this.negative),this.iushrn(o,s,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var s=o%26,d=(o-s)/26,h=1<=0);var s=o%26,d=(o-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(I/67108864|0),this.words[S+d]=67108863&k}for(;S>26,this.words[S+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,S=0;S>26,this.words[S]=67108863&k;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,s){var d=(this.length,o.length),h=this.clone(),S=o,k=0|S.words[S.length-1];0!==(d=26-this._countBits(k))&&(S=S.ushln(d),h.iushln(d),k=0|S.words[S.length-1]);var f,I=h.length-S.length;if("mod"!==s){(f=new l(null)).length=I+1,f.words=new Array(f.length);for(var R=0;R=0;ee--){var oe=67108864*(0|h.words[S.length+ee])+(0|h.words[S.length+ee-1]);for(oe=Math.min(oe/k|0,67108863),h._ishlnsubmul(S,oe,ee);0!==h.negative;)oe--,h.negative=0,h._ishlnsubmul(S,1,ee),h.isZero()||(h.negative^=1);f&&(f.words[ee]=oe)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},l.prototype.divmod=function(o,s,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(k=this.neg().divmod(o,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.iadd(o)),{div:h,mod:S}):0===this.negative&&0!==o.negative?(k=this.divmod(o.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&o.negative?(k=this.neg().divmod(o.neg(),s),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.isub(o)),{div:k.div,mod:S}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===s?{div:this.divn(o.words[0]),mod:null}:"mod"===s?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,s);var h,S,k},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var s=this.divmod(o);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(o):s.mod,h=o.ushrn(1),S=o.andln(1),k=d.cmp(h);return k<0||1===S&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var s=(1<<26)%o,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/o|0,s=h%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=new l(0),B=new l(1),I=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++I;for(var f=d.clone(),R=s.clone();!s.isZero();){for(var se=0,ee=1;!(s.words[0]&ee)&&se<26;++se,ee<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||S.isOdd())&&(h.iadd(f),S.isub(R)),h.iushrn(1),S.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(R)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),S.isub(B)):(d.isub(s),k.isub(h),B.isub(S))}return{a:k,b:B,gcd:d.iushln(I)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,I=1;!(s.words[0]&I)&&B<26;++B,I<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,R=1;!(d.words[0]&R)&&f<26;++f,R<<=1);if(f>0)for(d.iushrn(f);f-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(S)):(d.isub(s),S.isub(h))}return(se=0===s.cmpn(1)?h:S).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var s=this.clone(),d=o.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var S=s.cmp(d);if(S<0){var k=s;s=d,d=k}else if(0===S||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var s=o%26,d=(o-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==S&&(this.words[k]=S,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,s=o<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(o=-o),w(o<=67108863,"Number is too big");var h=0|this.words[0];d=h===o?0:ho.length)return 1;if(this.length=0;d--){var h=0|this.words[d],S=0|o.words[d];if(h!==S){hS&&(s=1);break}}return s},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new H(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var W={k256:null,p224:null,p192:null,p25519:null};function Y(C,o){this.name=C,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function H(C){if("string"==typeof C){var o=l._prime(C);this.m=o.p,this.prime=o}else w(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}function te(C){H.call(this,C),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}Y.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},Y.prototype.ireduce=function(o){var d,s=o;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(o,s){o.iushrn(this.n,0,s)},Y.prototype.imulK=function(o){return o.imul(this.k)},_(G,Y),G.prototype.split=function(o,s){for(var d=4194303,h=Math.min(o.length,9),S=0;S>>22,k=B}k>>>=22,o.words[S-10]=k,0===k&&o.length>10?o.length-=10:o.length-=9},G.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var s=0,d=0;d>>=26,o.words[d]=S,s=h}return 0!==s&&(o.words[o.length++]=s),o},l._prime=function(o){if(W[o])return W[o];var s;if("k256"===o)s=new G;else if("p224"===o)s=new Q;else if("p192"===o)s=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);s=new J}return W[o]=s,s},H.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},H.prototype._verify2=function(o,s){w(0==(o.negative|s.negative),"red works only with positives"),w(o.red&&o.red===s.red,"red works only with red numbers")},H.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},H.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},H.prototype.add=function(o,s){this._verify2(o,s);var d=o.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},H.prototype.iadd=function(o,s){this._verify2(o,s);var d=o.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},H.prototype.sub=function(o,s){this._verify2(o,s);var d=o.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},H.prototype.isub=function(o,s){this._verify2(o,s);var d=o.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},H.prototype.shl=function(o,s){return this._verify1(o),this.imod(o.ushln(s))},H.prototype.imul=function(o,s){return this._verify2(o,s),this.imod(o.imul(s))},H.prototype.mul=function(o,s){return this._verify2(o,s),this.imod(o.mul(s))},H.prototype.isqr=function(o){return this.imul(o,o.clone())},H.prototype.sqr=function(o){return this.mul(o,o)},H.prototype.sqrt=function(o){if(o.isZero())return o.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var h=this.m.subn(1),S=0;!h.isZero()&&0===h.andln(1);)S++,h.iushrn(1);w(!h.isZero());var k=new l(1).toRed(this),B=k.redNeg(),I=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,I).cmp(B);)f.redIAdd(B);for(var R=this.pow(f,h),se=this.pow(o,h.addn(1).iushrn(1)),ee=this.pow(o,h),oe=S;0!==ee.cmp(k);){for(var de=ee,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;S--){for(var R=s.words[S],se=f-1;se>=0;se--){var ee=R>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==ee||0!==B)?(B<<=1,B|=ee,(4===++I||0===S&&0===se)&&(k=this.mul(k,h[B]),I=0,B=0)):I=0}f=26}return k},H.prototype.convertTo=function(o){var s=o.umod(this.m);return s===o?s.clone():s},H.prototype.convertFrom=function(o){var s=o.clone();return s.red=null,s},l.mont=function(o){return new te(o)},_(te,H),te.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},te.prototype.convertFrom=function(o){var s=this.imod(o.mul(this.rinv));return s.red=null,s},te.prototype.imul=function(o,s){if(o.isZero()||s.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.mul=function(o,s){if(o.isZero()||s.isZero())return new l(0)._forceRed(this);var d=o.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(re=g.nmd(re),this)},74901:re=>{"use strict";var u={single_source_shortest_paths:function(g,p,D){var w={},_={};_[p]=0;var v,m,b,M,E,P,x,l=u.PriorityQueue.make();for(l.push(p,0);!l.empty();)for(b in m=(v=l.pop()).value,M=v.cost,E=g[m]||{})E.hasOwnProperty(b)&&(P=M+E[b],x=_[b],(typeof _[b]>"u"||x>P)&&(_[b]=P,l.push(b,P),w[b]=m));if(typeof D<"u"&&typeof _[D]>"u"){var F=["Could not find a path from ",p," to ",D,"."].join("");throw new Error(F)}return w},extract_shortest_path_from_predecessor_list:function(g,p){for(var D=[],w=p;w;)D.push(w),g[w],w=g[w];return D.reverse(),D},find_path:function(g,p,D){var w=u.single_source_shortest_paths(g,p,D);return u.extract_shortest_path_from_predecessor_list(w,D)},PriorityQueue:{make:function(g){var w,p=u.PriorityQueue,D={};for(w in g=g||{},p)p.hasOwnProperty(w)&&(D[w]=p[w]);return D.queue=[],D.sorter=g.sorter||p.default_sorter,D},default_sorter:function(g,p){return g.cost-p.cost},push:function(g,p){var D={value:g,cost:p};this.queue.push(D),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};re.exports=u},57715:(re,u,g)=>{"use strict";var p=u;p.version=g(18597).i8,p.utils=g(61970),p.rand=g(37950),p.curve=g(46270),p.curves=g(52916),p.ec=g(67626),p.eddsa=g(81885)},97902:(re,u,g)=>{"use strict";var p=g(17433),D=g(61970),w=D.getNAF,_=D.getJSF,l=D.assert;function v(b,M){this.type=b,this.p=new p(M.p,16),this.red=M.prime?p.red(M.prime):p.mont(this.p),this.zero=new p(0).toRed(this.red),this.one=new p(1).toRed(this.red),this.two=new p(2).toRed(this.red),this.n=M.n&&new p(M.n,16),this.g=M.g&&this.pointFromJSON(M.g,M.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 E=this.n&&this.p.div(this.n);!E||E.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function m(b,M){this.curve=b,this.type=M,this.precomputed=null}re.exports=v,v.prototype.point=function(){throw new Error("Not implemented")},v.prototype.validate=function(){throw new Error("Not implemented")},v.prototype._fixedNafMul=function(M,E){l(M.precomputed);var A=M._getDoubles(),P=w(E,1,this._bitLength),x=(1<=F;z--)L=(L<<1)+P[z];N.push(L)}for(var j=this.jpoint(null,null,null),W=this.jpoint(null,null,null),Y=x;Y>0;Y--){for(F=0;F=0;L--){for(var z=0;L>=0&&0===N[L];L--)z++;if(L>=0&&z++,F=F.dblp(z),L<0)break;var j=N[L];l(0!==j),F="affine"===M.type?j>0?F.mixedAdd(x[j-1>>1]):F.mixedAdd(x[-j-1>>1].neg()):j>0?F.add(x[j-1>>1]):F.add(x[-j-1>>1].neg())}return"affine"===M.type?F.toP():F},v.prototype._wnafMulAdd=function(M,E,A,P,x){var j,W,Y,N=this._wnafT1,F=this._wnafT2,L=this._wnafT3,z=0;for(j=0;j=1;j-=2){var Q=j-1,q=j;if(1===N[Q]&&1===N[q]){var J=[E[Q],null,null,E[q]];0===E[Q].y.cmp(E[q].y)?(J[1]=E[Q].add(E[q]),J[2]=E[Q].toJ().mixedAdd(E[q].neg())):0===E[Q].y.cmp(E[q].y.redNeg())?(J[1]=E[Q].toJ().mixedAdd(E[q]),J[2]=E[Q].add(E[q].neg())):(J[1]=E[Q].toJ().mixedAdd(E[q]),J[2]=E[Q].toJ().mixedAdd(E[q].neg()));var H=[-3,-1,-5,-7,0,7,5,1,3],te=_(A[Q],A[q]);for(z=Math.max(te[0].length,z),L[Q]=new Array(z),L[q]=new Array(z),W=0;W=0;j--){for(var h=0;j>=0;){var S=!0;for(W=0;W=0&&h++,s=s.dblp(h),j<0)break;for(W=0;W0?Y=F[W][k-1>>1]:k<0&&(Y=F[W][-k-1>>1].neg()),s="affine"===Y.type?s.mixedAdd(Y):s.add(Y))}}for(j=0;j=Math.ceil((M.bitLength()+1)/E.step)},m.prototype._getDoubles=function(M,E){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var A=[this],P=this,x=0;x{"use strict";var p=g(61970),D=g(17433),w=g(83894),_=g(97902),l=p.assert;function v(b){this.twisted=1!=(0|b.a),this.mOneA=this.twisted&&-1==(0|b.a),this.extended=this.mOneA,_.call(this,"edwards",b),this.a=new D(b.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new D(b.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new D(b.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),l(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|b.c)}function m(b,M,E,A,P){_.BasePoint.call(this,b,"projective"),null===M&&null===E&&null===A?(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 D(M,16),this.y=new D(E,16),this.z=A?new D(A,16):this.curve.one,this.t=P&&new D(P,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()))))}w(v,_),re.exports=v,v.prototype._mulA=function(M){return this.mOneA?M.redNeg():this.a.redMul(M)},v.prototype._mulC=function(M){return this.oneC?M:this.c.redMul(M)},v.prototype.jpoint=function(M,E,A,P){return this.point(M,E,A,P)},v.prototype.pointFromX=function(M,E){(M=new D(M,16)).red||(M=M.toRed(this.red));var A=M.redSqr(),P=this.c2.redSub(this.a.redMul(A)),x=this.one.redSub(this.c2.redMul(this.d).redMul(A)),N=P.redMul(x.redInvm()),F=N.redSqrt();if(0!==F.redSqr().redSub(N).cmp(this.zero))throw new Error("invalid point");var L=F.fromRed().isOdd();return(E&&!L||!E&&L)&&(F=F.redNeg()),this.point(M,F)},v.prototype.pointFromY=function(M,E){(M=new D(M,16)).red||(M=M.toRed(this.red));var A=M.redSqr(),P=A.redSub(this.c2),x=A.redMul(this.d).redMul(this.c2).redSub(this.a),N=P.redMul(x.redInvm());if(0===N.cmp(this.zero)){if(E)throw new Error("invalid point");return this.point(this.zero,M)}var F=N.redSqrt();if(0!==F.redSqr().redSub(N).cmp(this.zero))throw new Error("invalid point");return F.fromRed().isOdd()!==E&&(F=F.redNeg()),this.point(F,M)},v.prototype.validate=function(M){if(M.isInfinity())return!0;M.normalize();var E=M.x.redSqr(),A=M.y.redSqr(),P=E.redMul(this.a).redAdd(A),x=this.c2.redMul(this.one.redAdd(this.d.redMul(E).redMul(A)));return 0===P.cmp(x)},w(m,_.BasePoint),v.prototype.pointFromJSON=function(M){return m.fromJSON(this,M)},v.prototype.point=function(M,E,A,P){return new m(this,M,E,A,P)},m.fromJSON=function(M,E){return new m(M,E[0],E[1],E[2])},m.prototype.inspect=function(){return this.isInfinity()?"":""},m.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},m.prototype._extDbl=function(){var M=this.x.redSqr(),E=this.y.redSqr(),A=this.z.redSqr();A=A.redIAdd(A);var P=this.curve._mulA(M),x=this.x.redAdd(this.y).redSqr().redISub(M).redISub(E),N=P.redAdd(E),F=N.redSub(A),L=P.redSub(E),z=x.redMul(F),j=N.redMul(L),W=x.redMul(L),Y=F.redMul(N);return this.curve.point(z,j,Y,W)},m.prototype._projDbl=function(){var P,x,N,F,L,z,M=this.x.redAdd(this.y).redSqr(),E=this.x.redSqr(),A=this.y.redSqr();if(this.curve.twisted){var j=(F=this.curve._mulA(E)).redAdd(A);this.zOne?(P=M.redSub(E).redSub(A).redMul(j.redSub(this.curve.two)),x=j.redMul(F.redSub(A)),N=j.redSqr().redSub(j).redSub(j)):(L=this.z.redSqr(),z=j.redSub(L).redISub(L),P=M.redSub(E).redISub(A).redMul(z),x=j.redMul(F.redSub(A)),N=j.redMul(z))}else F=E.redAdd(A),L=this.curve._mulC(this.z).redSqr(),z=F.redSub(L).redSub(L),P=this.curve._mulC(M.redISub(F)).redMul(z),x=this.curve._mulC(F).redMul(E.redISub(A)),N=F.redMul(z);return this.curve.point(P,x,N)},m.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},m.prototype._extAdd=function(M){var E=this.y.redSub(this.x).redMul(M.y.redSub(M.x)),A=this.y.redAdd(this.x).redMul(M.y.redAdd(M.x)),P=this.t.redMul(this.curve.dd).redMul(M.t),x=this.z.redMul(M.z.redAdd(M.z)),N=A.redSub(E),F=x.redSub(P),L=x.redAdd(P),z=A.redAdd(E),j=N.redMul(F),W=L.redMul(z),Y=N.redMul(z),G=F.redMul(L);return this.curve.point(j,W,G,Y)},m.prototype._projAdd=function(M){var W,Y,E=this.z.redMul(M.z),A=E.redSqr(),P=this.x.redMul(M.x),x=this.y.redMul(M.y),N=this.curve.d.redMul(P).redMul(x),F=A.redSub(N),L=A.redAdd(N),z=this.x.redAdd(this.y).redMul(M.x.redAdd(M.y)).redISub(P).redISub(x),j=E.redMul(F).redMul(z);return this.curve.twisted?(W=E.redMul(L).redMul(x.redSub(this.curve._mulA(P))),Y=F.redMul(L)):(W=E.redMul(L).redMul(x.redSub(P)),Y=this.curve._mulC(F).redMul(L)),this.curve.point(j,W,Y)},m.prototype.add=function(M){return this.isInfinity()?M:M.isInfinity()?this:this.curve.extended?this._extAdd(M):this._projAdd(M)},m.prototype.mul=function(M){return this._hasDoubles(M)?this.curve._fixedNafMul(this,M):this.curve._wnafMul(this,M)},m.prototype.mulAdd=function(M,E,A){return this.curve._wnafMulAdd(1,[this,E],[M,A],2,!1)},m.prototype.jmulAdd=function(M,E,A){return this.curve._wnafMulAdd(1,[this,E],[M,A],2,!0)},m.prototype.normalize=function(){if(this.zOne)return this;var M=this.z.redInvm();return this.x=this.x.redMul(M),this.y=this.y.redMul(M),this.t&&(this.t=this.t.redMul(M)),this.z=this.curve.one,this.zOne=!0,this},m.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},m.prototype.getX=function(){return this.normalize(),this.x.fromRed()},m.prototype.getY=function(){return this.normalize(),this.y.fromRed()},m.prototype.eq=function(M){return this===M||0===this.getX().cmp(M.getX())&&0===this.getY().cmp(M.getY())},m.prototype.eqXToP=function(M){var E=M.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(E))return!0;for(var A=M.clone(),P=this.curve.redN.redMul(this.z);;){if(A.iadd(this.curve.n),A.cmp(this.curve.p)>=0)return!1;if(E.redIAdd(P),0===this.x.cmp(E))return!0}},m.prototype.toP=m.prototype.normalize,m.prototype.mixedAdd=m.prototype.add},46270:(re,u,g)=>{"use strict";var p=u;p.base=g(97902),p.short=g(41781),p.mont=g(97064),p.edwards=g(13835)},97064:(re,u,g)=>{"use strict";var p=g(17433),D=g(83894),w=g(97902),_=g(61970);function l(m){w.call(this,"mont",m),this.a=new p(m.a,16).toRed(this.red),this.b=new p(m.b,16).toRed(this.red),this.i4=new p(4).toRed(this.red).redInvm(),this.two=new p(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function v(m,b,M){w.BasePoint.call(this,m,"projective"),null===b&&null===M?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new p(b,16),this.z=new p(M,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}D(l,w),re.exports=l,l.prototype.validate=function(b){var M=b.normalize().x,E=M.redSqr(),A=E.redMul(M).redAdd(E.redMul(this.a)).redAdd(M);return 0===A.redSqrt().redSqr().cmp(A)},D(v,w.BasePoint),l.prototype.decodePoint=function(b,M){return this.point(_.toArray(b,M),1)},l.prototype.point=function(b,M){return new v(this,b,M)},l.prototype.pointFromJSON=function(b){return v.fromJSON(this,b)},v.prototype.precompute=function(){},v.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},v.fromJSON=function(b,M){return new v(b,M[0],M[1]||b.one)},v.prototype.inspect=function(){return this.isInfinity()?"":""},v.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},v.prototype.dbl=function(){var M=this.x.redAdd(this.z).redSqr(),A=this.x.redSub(this.z).redSqr(),P=M.redSub(A),x=M.redMul(A),N=P.redMul(A.redAdd(this.curve.a24.redMul(P)));return this.curve.point(x,N)},v.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},v.prototype.diffAdd=function(b,M){var E=this.x.redAdd(this.z),A=this.x.redSub(this.z),P=b.x.redAdd(b.z),N=b.x.redSub(b.z).redMul(E),F=P.redMul(A),L=M.z.redMul(N.redAdd(F).redSqr()),z=M.x.redMul(N.redISub(F).redSqr());return this.curve.point(L,z)},v.prototype.mul=function(b){for(var M=b.clone(),E=this,A=this.curve.point(null,null),x=[];0!==M.cmpn(0);M.iushrn(1))x.push(M.andln(1));for(var N=x.length-1;N>=0;N--)0===x[N]?(E=E.diffAdd(A,this),A=A.dbl()):(A=E.diffAdd(A,this),E=E.dbl());return A},v.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},v.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},v.prototype.eq=function(b){return 0===this.getX().cmp(b.getX())},v.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},v.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},41781:(re,u,g)=>{"use strict";var p=g(61970),D=g(17433),w=g(83894),_=g(97902),l=p.assert;function v(M){_.call(this,"short",M),this.a=new D(M.a,16).toRed(this.red),this.b=new D(M.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(M),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function m(M,E,A,P){_.BasePoint.call(this,M,"affine"),null===E&&null===A?(this.x=null,this.y=null,this.inf=!0):(this.x=new D(E,16),this.y=new D(A,16),P&&(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 b(M,E,A,P){_.BasePoint.call(this,M,"jacobian"),null===E&&null===A&&null===P?(this.x=this.curve.one,this.y=this.curve.one,this.z=new D(0)):(this.x=new D(E,16),this.y=new D(A,16),this.z=new D(P,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}w(v,_),re.exports=v,v.prototype._getEndomorphism=function(E){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var A,P;if(E.beta)A=new D(E.beta,16).toRed(this.red);else{var x=this._getEndoRoots(this.p);A=(A=x[0].cmp(x[1])<0?x[0]:x[1]).toRed(this.red)}if(E.lambda)P=new D(E.lambda,16);else{var N=this._getEndoRoots(this.n);0===this.g.mul(N[0]).x.cmp(this.g.x.redMul(A))?P=N[0]:(P=N[1],l(0===this.g.mul(P).x.cmp(this.g.x.redMul(A))))}return{beta:A,lambda:P,basis:E.basis?E.basis.map(function(L){return{a:new D(L.a,16),b:new D(L.b,16)}}):this._getEndoBasis(P)}}},v.prototype._getEndoRoots=function(E){var A=E===this.p?this.red:D.mont(E),P=new D(2).toRed(A).redInvm(),x=P.redNeg(),N=new D(3).toRed(A).redNeg().redSqrt().redMul(P);return[x.redAdd(N).fromRed(),x.redSub(N).fromRed()]},v.prototype._getEndoBasis=function(E){for(var j,W,Y,G,Q,q,J,te,C,A=this.n.ushrn(Math.floor(this.n.bitLength()/2)),P=E,x=this.n.clone(),N=new D(1),F=new D(0),L=new D(0),z=new D(1),H=0;0!==P.cmpn(0);){var o=x.div(P);te=x.sub(o.mul(P)),C=L.sub(o.mul(N));var s=z.sub(o.mul(F));if(!Y&&te.cmp(A)<0)j=J.neg(),W=N,Y=te.neg(),G=C;else if(Y&&2==++H)break;J=te,x=P,P=te,L=N,N=C,z=F,F=s}Q=te.neg(),q=C;var d=Y.sqr().add(G.sqr());return Q.sqr().add(q.sqr()).cmp(d)>=0&&(Q=j,q=W),Y.negative&&(Y=Y.neg(),G=G.neg()),Q.negative&&(Q=Q.neg(),q=q.neg()),[{a:Y,b:G},{a:Q,b:q}]},v.prototype._endoSplit=function(E){var A=this.endo.basis,P=A[0],x=A[1],N=x.b.mul(E).divRound(this.n),F=P.b.neg().mul(E).divRound(this.n),L=N.mul(P.a),z=F.mul(x.a),j=N.mul(P.b),W=F.mul(x.b);return{k1:E.sub(L).sub(z),k2:j.add(W).neg()}},v.prototype.pointFromX=function(E,A){(E=new D(E,16)).red||(E=E.toRed(this.red));var P=E.redSqr().redMul(E).redIAdd(E.redMul(this.a)).redIAdd(this.b),x=P.redSqrt();if(0!==x.redSqr().redSub(P).cmp(this.zero))throw new Error("invalid point");var N=x.fromRed().isOdd();return(A&&!N||!A&&N)&&(x=x.redNeg()),this.point(E,x)},v.prototype.validate=function(E){if(E.inf)return!0;var A=E.x,P=E.y,x=this.a.redMul(A),N=A.redSqr().redMul(A).redIAdd(x).redIAdd(this.b);return 0===P.redSqr().redISub(N).cmpn(0)},v.prototype._endoWnafMulAdd=function(E,A,P){for(var x=this._endoWnafT1,N=this._endoWnafT2,F=0;F":""},m.prototype.isInfinity=function(){return this.inf},m.prototype.add=function(E){if(this.inf)return E;if(E.inf)return this;if(this.eq(E))return this.dbl();if(this.neg().eq(E))return this.curve.point(null,null);if(0===this.x.cmp(E.x))return this.curve.point(null,null);var A=this.y.redSub(E.y);0!==A.cmpn(0)&&(A=A.redMul(this.x.redSub(E.x).redInvm()));var P=A.redSqr().redISub(this.x).redISub(E.x),x=A.redMul(this.x.redSub(P)).redISub(this.y);return this.curve.point(P,x)},m.prototype.dbl=function(){if(this.inf)return this;var E=this.y.redAdd(this.y);if(0===E.cmpn(0))return this.curve.point(null,null);var A=this.curve.a,P=this.x.redSqr(),x=E.redInvm(),N=P.redAdd(P).redIAdd(P).redIAdd(A).redMul(x),F=N.redSqr().redISub(this.x.redAdd(this.x)),L=N.redMul(this.x.redSub(F)).redISub(this.y);return this.curve.point(F,L)},m.prototype.getX=function(){return this.x.fromRed()},m.prototype.getY=function(){return this.y.fromRed()},m.prototype.mul=function(E){return E=new D(E,16),this.isInfinity()?this:this._hasDoubles(E)?this.curve._fixedNafMul(this,E):this.curve.endo?this.curve._endoWnafMulAdd([this],[E]):this.curve._wnafMul(this,E)},m.prototype.mulAdd=function(E,A,P){var x=[this,A],N=[E,P];return this.curve.endo?this.curve._endoWnafMulAdd(x,N):this.curve._wnafMulAdd(1,x,N,2)},m.prototype.jmulAdd=function(E,A,P){var x=[this,A],N=[E,P];return this.curve.endo?this.curve._endoWnafMulAdd(x,N,!0):this.curve._wnafMulAdd(1,x,N,2,!0)},m.prototype.eq=function(E){return this===E||this.inf===E.inf&&(this.inf||0===this.x.cmp(E.x)&&0===this.y.cmp(E.y))},m.prototype.neg=function(E){if(this.inf)return this;var A=this.curve.point(this.x,this.y.redNeg());if(E&&this.precomputed){var P=this.precomputed,x=function(N){return N.neg()};A.precomputed={naf:P.naf&&{wnd:P.naf.wnd,points:P.naf.points.map(x)},doubles:P.doubles&&{step:P.doubles.step,points:P.doubles.points.map(x)}}}return A},m.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},w(b,_.BasePoint),v.prototype.jpoint=function(E,A,P){return new b(this,E,A,P)},b.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var E=this.z.redInvm(),A=E.redSqr(),P=this.x.redMul(A),x=this.y.redMul(A).redMul(E);return this.curve.point(P,x)},b.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},b.prototype.add=function(E){if(this.isInfinity())return E;if(E.isInfinity())return this;var A=E.z.redSqr(),P=this.z.redSqr(),x=this.x.redMul(A),N=E.x.redMul(P),F=this.y.redMul(A.redMul(E.z)),L=E.y.redMul(P.redMul(this.z)),z=x.redSub(N),j=F.redSub(L);if(0===z.cmpn(0))return 0!==j.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var W=z.redSqr(),Y=W.redMul(z),G=x.redMul(W),Q=j.redSqr().redIAdd(Y).redISub(G).redISub(G),q=j.redMul(G.redISub(Q)).redISub(F.redMul(Y)),J=this.z.redMul(E.z).redMul(z);return this.curve.jpoint(Q,q,J)},b.prototype.mixedAdd=function(E){if(this.isInfinity())return E.toJ();if(E.isInfinity())return this;var A=this.z.redSqr(),P=this.x,x=E.x.redMul(A),N=this.y,F=E.y.redMul(A).redMul(this.z),L=P.redSub(x),z=N.redSub(F);if(0===L.cmpn(0))return 0!==z.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var j=L.redSqr(),W=j.redMul(L),Y=P.redMul(j),G=z.redSqr().redIAdd(W).redISub(Y).redISub(Y),Q=z.redMul(Y.redISub(G)).redISub(N.redMul(W)),q=this.z.redMul(L);return this.curve.jpoint(G,Q,q)},b.prototype.dblp=function(E){if(0===E)return this;if(this.isInfinity())return this;if(!E)return this.dbl();var A;if(this.curve.zeroA||this.curve.threeA){var P=this;for(A=0;A=0)return!1;if(P.redIAdd(N),0===this.x.cmp(P))return!0}},b.prototype.inspect=function(){return this.isInfinity()?"":""},b.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},52916:(re,u,g)=>{"use strict";var b,p=u,D=g(37084),w=g(46270),l=g(61970).assert;function v(M){"short"===M.type?this.curve=new w.short(M):"edwards"===M.type?this.curve=new w.edwards(M):this.curve=new w.mont(M),this.g=this.curve.g,this.n=this.curve.n,this.hash=M.hash,l(this.g.validate(),"Invalid curve"),l(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function m(M,E){Object.defineProperty(p,M,{configurable:!0,enumerable:!0,get:function(){var A=new v(E);return Object.defineProperty(p,M,{configurable:!0,enumerable:!0,value:A}),A}})}p.PresetCurve=v,m("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:D.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),m("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:D.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),m("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:D.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),m("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:D.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"]}),m("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:D.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"]}),m("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:D.sha256,gRed:!1,g:["9"]}),m("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:D.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{b=g(25150)}catch{b=void 0}m("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:D.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",b]})},67626:(re,u,g)=>{"use strict";var p=g(17433),D=g(52438),w=g(61970),_=g(52916),l=g(37950),v=w.assert,m=g(91259),b=g(65957);function M(E){if(!(this instanceof M))return new M(E);"string"==typeof E&&(v(Object.prototype.hasOwnProperty.call(_,E),"Unknown curve "+E),E=_[E]),E instanceof _.PresetCurve&&(E={curve:E}),this.curve=E.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=E.curve.g,this.g.precompute(E.curve.n.bitLength()+1),this.hash=E.hash||E.curve.hash}re.exports=M,M.prototype.keyPair=function(A){return new m(this,A)},M.prototype.keyFromPrivate=function(A,P){return m.fromPrivate(this,A,P)},M.prototype.keyFromPublic=function(A,P){return m.fromPublic(this,A,P)},M.prototype.genKeyPair=function(A){A||(A={});for(var P=new D({hash:this.hash,pers:A.pers,persEnc:A.persEnc||"utf8",entropy:A.entropy||l(this.hash.hmacStrength),entropyEnc:A.entropy&&A.entropyEnc||"utf8",nonce:this.n.toArray()}),x=this.n.byteLength(),N=this.n.sub(new p(2));;){var F=new p(P.generate(x));if(!(F.cmp(N)>0))return F.iaddn(1),this.keyFromPrivate(F)}},M.prototype._truncateToN=function(A,P){var x=8*A.byteLength()-this.n.bitLength();return x>0&&(A=A.ushrn(x)),!P&&A.cmp(this.n)>=0?A.sub(this.n):A},M.prototype.sign=function(A,P,x,N){"object"==typeof x&&(N=x,x=null),N||(N={}),P=this.keyFromPrivate(P,x),A=this._truncateToN(new p(A,16));for(var F=this.n.byteLength(),L=P.getPrivate().toArray("be",F),z=A.toArray("be",F),j=new D({hash:this.hash,entropy:L,nonce:z,pers:N.pers,persEnc:N.persEnc||"utf8"}),W=this.n.sub(new p(1)),Y=0;;Y++){var G=N.k?N.k(Y):new p(j.generate(this.n.byteLength()));if(!((G=this._truncateToN(G,!0)).cmpn(1)<=0||G.cmp(W)>=0)){var Q=this.g.mul(G);if(!Q.isInfinity()){var q=Q.getX(),J=q.umod(this.n);if(0!==J.cmpn(0)){var H=G.invm(this.n).mul(J.mul(P.getPrivate()).iadd(A));if(0!==(H=H.umod(this.n)).cmpn(0)){var te=(Q.getY().isOdd()?1:0)|(0!==q.cmp(J)?2:0);return N.canonical&&H.cmp(this.nh)>0&&(H=this.n.sub(H),te^=1),new b({r:J,s:H,recoveryParam:te})}}}}}},M.prototype.verify=function(A,P,x,N){A=this._truncateToN(new p(A,16)),x=this.keyFromPublic(x,N);var F=(P=new b(P,"hex")).r,L=P.s;if(F.cmpn(1)<0||F.cmp(this.n)>=0||L.cmpn(1)<0||L.cmp(this.n)>=0)return!1;var Y,z=L.invm(this.n),j=z.mul(A).umod(this.n),W=z.mul(F).umod(this.n);return this.curve._maxwellTrick?!(Y=this.g.jmulAdd(j,x.getPublic(),W)).isInfinity()&&Y.eqXToP(F):!(Y=this.g.mulAdd(j,x.getPublic(),W)).isInfinity()&&0===Y.getX().umod(this.n).cmp(F)},M.prototype.recoverPubKey=function(E,A,P,x){v((3&P)===P,"The recovery param is more than two bits"),A=new b(A,x);var N=this.n,F=new p(E),L=A.r,z=A.s,j=1&P,W=P>>1;if(L.cmp(this.curve.p.umod(this.curve.n))>=0&&W)throw new Error("Unable to find sencond key candinate");L=W?this.curve.pointFromX(L.add(this.curve.n),j):this.curve.pointFromX(L,j);var Y=A.r.invm(N),G=N.sub(F).mul(Y).umod(N),Q=z.mul(Y).umod(N);return this.g.mulAdd(G,L,Q)},M.prototype.getKeyRecoveryParam=function(E,A,P,x){if(null!==(A=new b(A,x)).recoveryParam)return A.recoveryParam;for(var N=0;N<4;N++){var F;try{F=this.recoverPubKey(E,A,N)}catch{continue}if(F.eq(P))return N}throw new Error("Unable to find valid recovery factor")}},91259:(re,u,g)=>{"use strict";var p=g(17433),w=g(61970).assert;function _(l,v){this.ec=l,this.priv=null,this.pub=null,v.priv&&this._importPrivate(v.priv,v.privEnc),v.pub&&this._importPublic(v.pub,v.pubEnc)}re.exports=_,_.fromPublic=function(v,m,b){return m instanceof _?m:new _(v,{pub:m,pubEnc:b})},_.fromPrivate=function(v,m,b){return m instanceof _?m:new _(v,{priv:m,privEnc:b})},_.prototype.validate=function(){var v=this.getPublic();return v.isInfinity()?{result:!1,reason:"Invalid public key"}:v.validate()?v.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"}},_.prototype.getPublic=function(v,m){return"string"==typeof v&&(m=v,v=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),m?this.pub.encode(m,v):this.pub},_.prototype.getPrivate=function(v){return"hex"===v?this.priv.toString(16,2):this.priv},_.prototype._importPrivate=function(v,m){this.priv=new p(v,m||16),this.priv=this.priv.umod(this.ec.curve.n)},_.prototype._importPublic=function(v,m){if(v.x||v.y)return"mont"===this.ec.curve.type?w(v.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&w(v.x&&v.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(v.x,v.y));this.pub=this.ec.curve.decodePoint(v,m)},_.prototype.derive=function(v){return v.validate()||w(v.validate(),"public point not validated"),v.mul(this.priv).getX()},_.prototype.sign=function(v,m,b){return this.ec.sign(v,this,m,b)},_.prototype.verify=function(v,m){return this.ec.verify(v,m,this)},_.prototype.inspect=function(){return""}},65957:(re,u,g)=>{"use strict";var p=g(17433),D=g(61970),w=D.assert;function _(M,E){if(M instanceof _)return M;this._importDER(M,E)||(w(M.r&&M.s,"Signature without r or s"),this.r=new p(M.r,16),this.s=new p(M.s,16),void 0===M.recoveryParam?this.recoveryParam=null:this.recoveryParam=M.recoveryParam)}function l(){this.place=0}function v(M,E){var A=M[E.place++];if(!(128&A))return A;var P=15&A;if(0===P||P>4)return!1;for(var x=0,N=0,F=E.place;N>>=0;return!(x<=127)&&(E.place=F,x)}function m(M){for(var E=0,A=M.length-1;!M[E]&&!(128&M[E+1])&&E>>3);for(M.push(128|A);--A;)M.push(E>>>(A<<3)&255);M.push(E)}}re.exports=_,_.prototype._importDER=function(E,A){E=D.toArray(E,A);var P=new l;if(48!==E[P.place++])return!1;var x=v(E,P);if(!1===x||x+P.place!==E.length||2!==E[P.place++])return!1;var N=v(E,P);if(!1===N)return!1;var F=E.slice(P.place,N+P.place);if(P.place+=N,2!==E[P.place++])return!1;var L=v(E,P);if(!1===L||E.length!==L+P.place)return!1;var z=E.slice(P.place,L+P.place);if(0===F[0]){if(!(128&F[1]))return!1;F=F.slice(1)}if(0===z[0]){if(!(128&z[1]))return!1;z=z.slice(1)}return this.r=new p(F),this.s=new p(z),this.recoveryParam=null,!0},_.prototype.toDER=function(E){var A=this.r.toArray(),P=this.s.toArray();for(128&A[0]&&(A=[0].concat(A)),128&P[0]&&(P=[0].concat(P)),A=m(A),P=m(P);!(P[0]||128&P[1]);)P=P.slice(1);var x=[2];b(x,A.length),(x=x.concat(A)).push(2),b(x,P.length);var N=x.concat(P),F=[48];return b(F,N.length),F=F.concat(N),D.encode(F,E)}},81885:(re,u,g)=>{"use strict";var p=g(37084),D=g(52916),w=g(61970),_=w.assert,l=w.parseBytes,v=g(97535),m=g(88241);function b(M){if(_("ed25519"===M,"only tested with ed25519 so far"),!(this instanceof b))return new b(M);M=D[M].curve,this.curve=M,this.g=M.g,this.g.precompute(M.n.bitLength()+1),this.pointClass=M.point().constructor,this.encodingLength=Math.ceil(M.n.bitLength()/8),this.hash=p.sha512}re.exports=b,b.prototype.sign=function(E,A){E=l(E);var P=this.keyFromSecret(A),x=this.hashInt(P.messagePrefix(),E),N=this.g.mul(x),F=this.encodePoint(N),L=this.hashInt(F,P.pubBytes(),E).mul(P.priv()),z=x.add(L).umod(this.curve.n);return this.makeSignature({R:N,S:z,Rencoded:F})},b.prototype.verify=function(E,A,P){E=l(E),A=this.makeSignature(A);var x=this.keyFromPublic(P),N=this.hashInt(A.Rencoded(),x.pubBytes(),E),F=this.g.mul(A.S());return A.R().add(x.pub().mul(N)).eq(F)},b.prototype.hashInt=function(){for(var E=this.hash(),A=0;A{"use strict";var p=g(61970),D=p.assert,w=p.parseBytes,_=p.cachedProperty;function l(v,m){this.eddsa=v,this._secret=w(m.secret),v.isPoint(m.pub)?this._pub=m.pub:this._pubBytes=w(m.pub)}l.fromPublic=function(m,b){return b instanceof l?b:new l(m,{pub:b})},l.fromSecret=function(m,b){return b instanceof l?b:new l(m,{secret:b})},l.prototype.secret=function(){return this._secret},_(l,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),_(l,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),_(l,"privBytes",function(){var m=this.eddsa,b=this.hash(),M=m.encodingLength-1,E=b.slice(0,m.encodingLength);return E[0]&=248,E[M]&=127,E[M]|=64,E}),_(l,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),_(l,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),_(l,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),l.prototype.sign=function(m){return D(this._secret,"KeyPair can only verify"),this.eddsa.sign(m,this)},l.prototype.verify=function(m,b){return this.eddsa.verify(m,b,this)},l.prototype.getSecret=function(m){return D(this._secret,"KeyPair is public only"),p.encode(this.secret(),m)},l.prototype.getPublic=function(m){return p.encode(this.pubBytes(),m)},re.exports=l},88241:(re,u,g)=>{"use strict";var p=g(17433),D=g(61970),w=D.assert,_=D.cachedProperty,l=D.parseBytes;function v(m,b){this.eddsa=m,"object"!=typeof b&&(b=l(b)),Array.isArray(b)&&(b={R:b.slice(0,m.encodingLength),S:b.slice(m.encodingLength)}),w(b.R&&b.S,"Signature without R or S"),m.isPoint(b.R)&&(this._R=b.R),b.S instanceof p&&(this._S=b.S),this._Rencoded=Array.isArray(b.R)?b.R:b.Rencoded,this._Sencoded=Array.isArray(b.S)?b.S:b.Sencoded}_(v,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),_(v,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),_(v,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),_(v,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),v.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},v.prototype.toHex=function(){return D.encode(this.toBytes(),"hex").toUpperCase()},re.exports=v},25150:re=>{re.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"]]}}},61970:(re,u,g)=>{"use strict";var p=u,D=g(17433),w=g(32391),_=g(58195);p.assert=w,p.toArray=_.toArray,p.zero2=_.zero2,p.toHex=_.toHex,p.encode=_.encode,p.getNAF=function l(E,A,P){var x=new Array(Math.max(E.bitLength(),P)+1);x.fill(0);for(var N=1<(N>>1)-1?(N>>1)-j:j,F.isubn(z)):z=0,x[L]=z,F.iushrn(1)}return x},p.getJSF=function v(E,A){var P=[[],[]];E=E.clone(),A=A.clone();for(var F,x=0,N=0;E.cmpn(-x)>0||A.cmpn(-N)>0;){var j,W,L=E.andln(3)+x&3,z=A.andln(3)+N&3;3===L&&(L=-1),3===z&&(z=-1),1&L?j=3!==(F=E.andln(7)+x&7)&&5!==F||2!==z?L:-L:j=0,P[0].push(j),1&z?W=3!==(F=A.andln(7)+N&7)&&5!==F||2!==L?z:-z:W=0,P[1].push(W),2*x===j+1&&(x=1-x),2*N===W+1&&(N=1-N),E.iushrn(1),A.iushrn(1)}return P},p.cachedProperty=function m(E,A,P){var x="_"+A;E.prototype[A]=function(){return void 0!==this[x]?this[x]:this[x]=P.call(this)}},p.parseBytes=function b(E){return"string"==typeof E?p.toArray(E,"hex"):E},p.intFromLE=function M(E){return new D(E,"hex","le")}},17433:function(re,u,g){(function(p,D){"use strict";function w(C,o){if(!C)throw new Error(o||"Assertion failed")}function _(C,o){C.super_=o;var s=function(){};s.prototype=o.prototype,C.prototype=new s,C.prototype.constructor=C}function l(C,o,s){if(l.isBN(C))return C;this.negative=0,this.words=null,this.length=0,this.red=null,null!==C&&(("le"===o||"be"===o)&&(s=o,o=10),this._init(C||0,o||10,s||"be"))}var v;"object"==typeof p?p.exports=l:D.BN=l,l.BN=l,l.wordSize=26;try{v=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:g(85568).Buffer}catch{}function m(C,o){var s=C.charCodeAt(o);return s>=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(C,o,s){var d=m(C,s);return s-1>=o&&(d|=m(C,s-1)<<4),d}function M(C,o,s,d){for(var h=0,S=Math.min(C.length,s),k=o;k=49?B-49+10:B>=17?B-17+10:B}return h}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,s){return o.cmp(s)>0?o:s},l.min=function(o,s){return o.cmp(s)<0?o:s},l.prototype._init=function(o,s,d){if("number"==typeof o)return this._initNumber(o,s,d);if("object"==typeof o)return this._initArray(o,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=o[h]|o[h-1]<<8|o[h-2]<<16,this.words[S]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);else if("le"===d)for(h=0,S=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);return this.strip()},l.prototype._parseHex=function(o,s,d){this.length=Math.ceil((o.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(o,s,h)<=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;else for(h=(o.length-s)%2==0?s+1:s;h=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;this.strip()},l.prototype._parseBase=function(o,s,d){this.words=[0],this.length=1;for(var h=0,S=1;S<=67108863;S*=s)h++;h--,S=S/s|0;for(var k=o.length-d,B=k%h,I=Math.min(k,k-B)+d,f=0,R=d;R1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var E=["","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"],A=[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 N(C,o,s){s.negative=o.negative^C.negative;var d=C.length+o.length|0;s.length=d,d=d-1|0;var h=0|C.words[0],S=0|o.words[0],k=h*S,B=67108863&k,I=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&I,ee=Math.min(f,o.length-1),oe=Math.max(0,f-C.length+1);oe<=ee;oe++){var de=f-oe|0;R+=(k=(h=0|C.words[de])*(S=0|o.words[oe])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,I=0|R}return 0!==I?s.words[f]=0|I:s.length--,s.strip()}l.prototype.toString=function(o,s){var d;if(s=0|s||1,16===(o=o||10)||"hex"===o){d="";for(var h=0,S=0,k=0;k>>24-h&16777215)||k!==this.length-1?E[6-I.length]+I+d:I+d,(h+=2)>=26&&(h-=26,k--)}for(0!==S&&(d=S.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],R=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var ee=se.modn(R).toString(o);d=(se=se.idivn(R)).isZero()?ee+d:E[f-ee.length]+ee+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,s){return w(typeof v<"u"),this.toArrayLike(v,o,s)},l.prototype.toArray=function(o,s){return this.toArrayLike(Array,o,s)},l.prototype.toArrayLike=function(o,s,d){var h=this.byteLength(),S=d||Math.max(1,h);w(h<=S,"byte array longer than desired length"),w(S>0,"Requested array length <= 0"),this.strip();var I,f,k="le"===s,B=new o(S),R=this.clone();if(k){for(f=0;!R.isZero();f++)I=R.andln(255),R.iushrn(8),B[f]=I;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},l.prototype._zeroBits=function(o){if(0===o)return 26;var s=o,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],s=this._countBits(o);return 26*(this.length-1)+s},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,s=0;so.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var s;s=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var s,d;this.length>o.length?(s=this,d=o):(s=o,d=this);for(var h=0;ho.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var s=0|Math.ceil(o/26),d=o%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,s){w("number"==typeof o&&o>=0);var d=o/26|0,h=o%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<o.length?(d=this,h=o):(d=o,h=this);for(var S=0,k=0;k>>26;for(;0!==S&&k>>26;if(this.length=d.length,0!==S)this.words[this.length]=S,this.length++;else if(d!==this)for(;ko.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var s=this.iadd(o);return o.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var h,S,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,S=o):(h=o,S=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Se=8191&pe,ce=pe>>>13,be=0|h[4],Pe=8191&be,Fe=be>>>13,lt=0|h[5],Ge=8191<,He=lt>>>13,Kt=0|h[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|h[7],ot=8191&Vt,at=Vt>>>13,Gt=0|h[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|h[9],Be=8191&Te,Ve=Te>>>13,mt=0|S[0],Ze=8191&mt,ct=mt>>>13,hn=0|S[1],ft=8191&hn,At=hn>>>13,wn=0|S[2],ze=8191&wn,Qe=wn>>>13,Ht=0|S[3],pt=8191&Ht,vt=Ht>>>13,$t=0|S[4],dt=8191&$t,gt=$t>>>13,mn=0|S[5],ut=8191&mn,wt=mn>>>13,Sn=0|S[6],yt=8191&Sn,Et=Sn>>>13,_e=0|S[7],Ee=8191&_e,Me=_e>>>13,me=0|S[8],Oe=8191&me,Ke=me>>>13,it=0|S[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^s.negative,d.length=19;var Bt=(B+(I=Math.imul(ee,Ze))|0)+((8191&(f=(f=Math.imul(ee,ct))+Math.imul(oe,Ze)|0))<<13)|0;B=((R=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,I=Math.imul(Ce,Ze),f=(f=Math.imul(Ce,ct))+Math.imul(ye,Ze)|0,R=Math.imul(ye,ct);var Ct=(B+(I=I+Math.imul(ee,ft)|0)|0)+((8191&(f=(f=f+Math.imul(ee,At)|0)+Math.imul(oe,ft)|0))<<13)|0;B=((R=R+Math.imul(oe,At)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,I=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,R=Math.imul(fe,ct),I=I+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,ft)|0,R=R+Math.imul(ye,At)|0;var kt=(B+(I=I+Math.imul(ee,ze)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;B=((R=R+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,I=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,R=Math.imul(ce,ct),I=I+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,R=R+Math.imul(fe,At)|0,I=I+Math.imul(Ce,ze)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,ze)|0,R=R+Math.imul(ye,Qe)|0;var Ot=(B+(I=I+Math.imul(ee,pt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;B=((R=R+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,I=Math.imul(Pe,Ze),f=(f=Math.imul(Pe,ct))+Math.imul(Fe,Ze)|0,R=Math.imul(Fe,ct),I=I+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,R=R+Math.imul(ce,At)|0,I=I+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,R=R+Math.imul(fe,Qe)|0,I=I+Math.imul(Ce,pt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,pt)|0,R=R+Math.imul(ye,vt)|0;var Pt=(B+(I=I+Math.imul(ee,dt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;B=((R=R+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,I=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,R=Math.imul(He,ct),I=I+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Fe,ft)|0,R=R+Math.imul(Fe,At)|0,I=I+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,R=R+Math.imul(ce,Qe)|0,I=I+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,R=R+Math.imul(fe,vt)|0,I=I+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,dt)|0,R=R+Math.imul(ye,gt)|0;var Lt=(B+(I=I+Math.imul(ee,ut)|0)|0)+((8191&(f=(f=f+Math.imul(ee,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;B=((R=R+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,I=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,R=Math.imul(nt,ct),I=I+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,R=R+Math.imul(He,At)|0,I=I+Math.imul(Pe,ze)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Fe,ze)|0,R=R+Math.imul(Fe,Qe)|0,I=I+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,R=R+Math.imul(ce,vt)|0,I=I+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,R=R+Math.imul(fe,gt)|0,I=I+Math.imul(Ce,ut)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ut)|0,R=R+Math.imul(ye,wt)|0;var nn=(B+(I=I+Math.imul(ee,yt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;B=((R=R+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,I=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,R=Math.imul(at,ct),I=I+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,R=R+Math.imul(nt,At)|0,I=I+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,R=R+Math.imul(He,Qe)|0,I=I+Math.imul(Pe,pt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Fe,pt)|0,R=R+Math.imul(Fe,vt)|0,I=I+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,R=R+Math.imul(ce,gt)|0,I=I+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,R=R+Math.imul(fe,wt)|0,I=I+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,Et)|0)+Math.imul(ye,yt)|0,R=R+Math.imul(ye,Et)|0;var Yt=(B+(I=I+Math.imul(ee,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;B=((R=R+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,I=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,R=Math.imul(Ae,ct),I=I+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,R=R+Math.imul(at,At)|0,I=I+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,R=R+Math.imul(nt,Qe)|0,I=I+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,R=R+Math.imul(He,vt)|0,I=I+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Fe,dt)|0,R=R+Math.imul(Fe,gt)|0,I=I+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,R=R+Math.imul(ce,wt)|0,I=I+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,R=R+Math.imul(fe,Et)|0,I=I+Math.imul(Ce,Ee)|0,f=(f=f+Math.imul(Ce,Me)|0)+Math.imul(ye,Ee)|0,R=R+Math.imul(ye,Me)|0;var gn=(B+(I=I+Math.imul(ee,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;B=((R=R+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,I=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,R=Math.imul(Ve,ct),I=I+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,R=R+Math.imul(Ae,At)|0,I=I+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,R=R+Math.imul(at,Qe)|0,I=I+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,R=R+Math.imul(nt,vt)|0,I=I+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,R=R+Math.imul(He,gt)|0,I=I+Math.imul(Pe,ut)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Fe,ut)|0,R=R+Math.imul(Fe,wt)|0,I=I+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,R=R+Math.imul(ce,Et)|0,I=I+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,R=R+Math.imul(fe,Me)|0,I=I+Math.imul(Ce,Oe)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,Oe)|0,R=R+Math.imul(ye,Ke)|0;var an=(B+(I=I+Math.imul(ee,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ee,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;B=((R=R+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,I=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,R=Math.imul(Ve,At),I=I+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,R=R+Math.imul(Ae,Qe)|0,I=I+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,R=R+Math.imul(at,vt)|0,I=I+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,R=R+Math.imul(nt,gt)|0,I=I+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,R=R+Math.imul(He,wt)|0,I=I+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,Et)|0)+Math.imul(Fe,yt)|0,R=R+Math.imul(Fe,Et)|0,I=I+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,R=R+Math.imul(ce,Me)|0,I=I+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,R=R+Math.imul(fe,Ke)|0;var tn=(B+(I=I+Math.imul(Ce,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;B=((R=R+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,I=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,R=Math.imul(Ve,Qe),I=I+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,R=R+Math.imul(Ae,vt)|0,I=I+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,R=R+Math.imul(at,gt)|0,I=I+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,R=R+Math.imul(nt,wt)|0,I=I+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,R=R+Math.imul(He,Et)|0,I=I+Math.imul(Pe,Ee)|0,f=(f=f+Math.imul(Pe,Me)|0)+Math.imul(Fe,Ee)|0,R=R+Math.imul(Fe,Me)|0,I=I+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,R=R+Math.imul(ce,Ke)|0;var Ut=(B+(I=I+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,I=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,R=Math.imul(Ve,vt),I=I+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,R=R+Math.imul(Ae,gt)|0,I=I+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,R=R+Math.imul(at,wt)|0,I=I+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,R=R+Math.imul(nt,Et)|0,I=I+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,R=R+Math.imul(He,Me)|0,I=I+Math.imul(Pe,Oe)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Fe,Oe)|0,R=R+Math.imul(Fe,Ke)|0;var cn=(B+(I=I+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;B=((R=R+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,I=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,R=Math.imul(Ve,gt),I=I+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,R=R+Math.imul(Ae,wt)|0,I=I+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,R=R+Math.imul(at,Et)|0,I=I+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,R=R+Math.imul(nt,Me)|0,I=I+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,R=R+Math.imul(He,Ke)|0;var Jt=(B+(I=I+Math.imul(Pe,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,I=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,R=Math.imul(Ve,wt),I=I+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,R=R+Math.imul(Ae,Et)|0,I=I+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,R=R+Math.imul(at,Me)|0,I=I+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,R=R+Math.imul(nt,Ke)|0;var Zt=(B+(I=I+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;B=((R=R+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,I=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,R=Math.imul(Ve,Et),I=I+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,R=R+Math.imul(Ae,Me)|0,I=I+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,R=R+Math.imul(at,Ke)|0;var fn=(B+(I=I+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;B=((R=R+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,I=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,R=Math.imul(Ve,Me),I=I+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,R=R+Math.imul(Ae,Ke)|0;var Qt=(B+(I=I+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;B=((R=R+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,I=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,R=Math.imul(Ve,Ke);var Dt=(B+(I=I+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;B=((R=R+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(B+(I=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return B=((R=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,k[0]=Bt,k[1]=Ct,k[2]=kt,k[3]=Ot,k[4]=Pt,k[5]=Lt,k[6]=nn,k[7]=Yt,k[8]=gn,k[9]=an,k[10]=tn,k[11]=Ut,k[12]=cn,k[13]=Jt,k[14]=Zt,k[15]=fn,k[16]=Qt,k[17]=Dt,k[18]=Mt,0!==B&&(k[19]=B,d.length++),d};function z(C,o,s){return(new j).mulp(C,o,s)}function j(C,o){this.x=C,this.y=o}Math.imul||(F=N),l.prototype.mulTo=function(o,s){var d,h=this.length+o.length;return d=10===this.length&&10===o.length?F(this,o,s):h<63?N(this,o,s):h<1024?function L(C,o,s){s.negative=o.negative^C.negative,s.length=C.length+o.length;for(var d=0,h=0,S=0;S>>26)|0)>>>26,k&=67108863}s.words[S]=B,d=k,k=h}return 0!==d?s.words[S]=d:s.length--,s.strip()}(this,o,s):z(this,o,s),d},j.prototype.makeRBT=function(o){for(var s=new Array(o),d=l.prototype._countBits(o)-1,h=0;h>=1;return h},j.prototype.permute=function(o,s,d,h,S,k){for(var B=0;B>>=1)S++;return 1<>>=13,d[2*k+1]=8191&S,S>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=S>>>26,this.words[d]=67108863&S}return 0!==s&&(this.words[d]=s,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var s=function x(C){for(var o=new Array(C.bitLength()),s=0;s>>h}return o}(o);if(0===s.length)return new l(1);for(var d=this,h=0;h=0);var S,s=o%26,d=(o-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(S=0;S>>26-s}k&&(this.words[S]=k,this.length++)}if(0!==d){for(S=this.length-1;S>=0;S--)this.words[S+d]=this.words[S];for(S=0;S=0),h=s?(s-s%26)/26:0;var S=o%26,k=Math.min((o-S)/26,this.length),B=67108863^67108863>>>S<k)for(this.length-=k,f=0;f=0&&(0!==R||f>=h);f--){var se=0|this.words[f];this.words[f]=R<<26-S|se>>>S,R=se&B}return I&&0!==R&&(I.words[I.length++]=R),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,s,d){return w(0===this.negative),this.iushrn(o,s,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var s=o%26,d=(o-s)/26,h=1<=0);var s=o%26,d=(o-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(I/67108864|0),this.words[S+d]=67108863&k}for(;S>26,this.words[S+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,S=0;S>26,this.words[S]=67108863&k;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,s){var d=(this.length,o.length),h=this.clone(),S=o,k=0|S.words[S.length-1];0!==(d=26-this._countBits(k))&&(S=S.ushln(d),h.iushln(d),k=0|S.words[S.length-1]);var f,I=h.length-S.length;if("mod"!==s){(f=new l(null)).length=I+1,f.words=new Array(f.length);for(var R=0;R=0;ee--){var oe=67108864*(0|h.words[S.length+ee])+(0|h.words[S.length+ee-1]);for(oe=Math.min(oe/k|0,67108863),h._ishlnsubmul(S,oe,ee);0!==h.negative;)oe--,h.negative=0,h._ishlnsubmul(S,1,ee),h.isZero()||(h.negative^=1);f&&(f.words[ee]=oe)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},l.prototype.divmod=function(o,s,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(k=this.neg().divmod(o,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.iadd(o)),{div:h,mod:S}):0===this.negative&&0!==o.negative?(k=this.divmod(o.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&o.negative?(k=this.neg().divmod(o.neg(),s),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.isub(o)),{div:k.div,mod:S}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===s?{div:this.divn(o.words[0]),mod:null}:"mod"===s?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,s);var h,S,k},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var s=this.divmod(o);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(o):s.mod,h=o.ushrn(1),S=o.andln(1),k=d.cmp(h);return k<0||1===S&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var s=(1<<26)%o,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/o|0,s=h%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=new l(0),B=new l(1),I=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++I;for(var f=d.clone(),R=s.clone();!s.isZero();){for(var se=0,ee=1;!(s.words[0]&ee)&&se<26;++se,ee<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||S.isOdd())&&(h.iadd(f),S.isub(R)),h.iushrn(1),S.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(R)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),S.isub(B)):(d.isub(s),k.isub(h),B.isub(S))}return{a:k,b:B,gcd:d.iushln(I)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,I=1;!(s.words[0]&I)&&B<26;++B,I<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,R=1;!(d.words[0]&R)&&f<26;++f,R<<=1);if(f>0)for(d.iushrn(f);f-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(S)):(d.isub(s),S.isub(h))}return(se=0===s.cmpn(1)?h:S).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var s=this.clone(),d=o.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var S=s.cmp(d);if(S<0){var k=s;s=d,d=k}else if(0===S||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var s=o%26,d=(o-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==S&&(this.words[k]=S,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,s=o<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(o=-o),w(o<=67108863,"Number is too big");var h=0|this.words[0];d=h===o?0:ho.length)return 1;if(this.length=0;d--){var h=0|this.words[d],S=0|o.words[d];if(h!==S){hS&&(s=1);break}}return s},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new H(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var W={k256:null,p224:null,p192:null,p25519:null};function Y(C,o){this.name=C,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function H(C){if("string"==typeof C){var o=l._prime(C);this.m=o.p,this.prime=o}else w(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}function te(C){H.call(this,C),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}Y.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},Y.prototype.ireduce=function(o){var d,s=o;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(o,s){o.iushrn(this.n,0,s)},Y.prototype.imulK=function(o){return o.imul(this.k)},_(G,Y),G.prototype.split=function(o,s){for(var d=4194303,h=Math.min(o.length,9),S=0;S>>22,k=B}k>>>=22,o.words[S-10]=k,0===k&&o.length>10?o.length-=10:o.length-=9},G.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var s=0,d=0;d>>=26,o.words[d]=S,s=h}return 0!==s&&(o.words[o.length++]=s),o},l._prime=function(o){if(W[o])return W[o];var s;if("k256"===o)s=new G;else if("p224"===o)s=new Q;else if("p192"===o)s=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);s=new J}return W[o]=s,s},H.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},H.prototype._verify2=function(o,s){w(0==(o.negative|s.negative),"red works only with positives"),w(o.red&&o.red===s.red,"red works only with red numbers")},H.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},H.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},H.prototype.add=function(o,s){this._verify2(o,s);var d=o.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},H.prototype.iadd=function(o,s){this._verify2(o,s);var d=o.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},H.prototype.sub=function(o,s){this._verify2(o,s);var d=o.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},H.prototype.isub=function(o,s){this._verify2(o,s);var d=o.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},H.prototype.shl=function(o,s){return this._verify1(o),this.imod(o.ushln(s))},H.prototype.imul=function(o,s){return this._verify2(o,s),this.imod(o.imul(s))},H.prototype.mul=function(o,s){return this._verify2(o,s),this.imod(o.mul(s))},H.prototype.isqr=function(o){return this.imul(o,o.clone())},H.prototype.sqr=function(o){return this.mul(o,o)},H.prototype.sqrt=function(o){if(o.isZero())return o.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var h=this.m.subn(1),S=0;!h.isZero()&&0===h.andln(1);)S++,h.iushrn(1);w(!h.isZero());var k=new l(1).toRed(this),B=k.redNeg(),I=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,I).cmp(B);)f.redIAdd(B);for(var R=this.pow(f,h),se=this.pow(o,h.addn(1).iushrn(1)),ee=this.pow(o,h),oe=S;0!==ee.cmp(k);){for(var de=ee,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;S--){for(var R=s.words[S],se=f-1;se>=0;se--){var ee=R>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==ee||0!==B)?(B<<=1,B|=ee,(4===++I||0===S&&0===se)&&(k=this.mul(k,h[B]),I=0,B=0)):I=0}f=26}return k},H.prototype.convertTo=function(o){var s=o.umod(this.m);return s===o?s.clone():s},H.prototype.convertFrom=function(o){var s=o.clone();return s.red=null,s},l.mont=function(o){return new te(o)},_(te,H),te.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},te.prototype.convertFrom=function(o){var s=this.imod(o.mul(this.rinv));return s.red=null,s},te.prototype.imul=function(o,s){if(o.isZero()||s.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.mul=function(o,s){if(o.isZero()||s.isZero())return new l(0)._forceRed(this);var d=o.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(re=g.nmd(re),this)},38419:re=>{"use strict";re.exports=function(g){for(var p=[],D=g.length,w=0;w=55296&&_<=56319&&D>w+1){var l=g.charCodeAt(w+1);l>=56320&&l<=57343&&(_=1024*(_-55296)+l-56320+65536,w+=1)}_<128?p.push(_):_<2048?(p.push(_>>6|192),p.push(63&_|128)):_<55296||_>=57344&&_<65536?(p.push(_>>12|224),p.push(_>>6&63|128),p.push(63&_|128)):_>=65536&&_<=1114111?(p.push(_>>18|240),p.push(_>>12&63|128),p.push(_>>6&63|128),p.push(63&_|128)):p.push(239,191,189)}return new Uint8Array(p).buffer}},69913:(re,u,g)=>{var p=g(38739);function D(l,v,m){v&&"string"!=typeof v&&(v=v.message||v.name),p(this,{type:l,name:l,cause:"string"!=typeof v?v:m,message:v},"ewr")}function w(l,v){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),D.call(this,"CustomError",l,v)}w.prototype=new Error,re.exports=function(l){var v=function(m,b){return function _(l,v,m){var b=function(M,E){D.call(this,v,M,E),"FilesystemError"==v&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(l.errno[this.cause.errno]?l.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,b)};return b.prototype=m?new m:new w,b}(l,m,b)};return{CustomError:w,FilesystemError:v("FilesystemError"),createError:v}}},3161:(re,u,g)=>{var p=re.exports.all=[{errno:-2,code:"ENOENT",description:"no such file or directory"},{errno:-1,code:"UNKNOWN",description:"unknown error"},{errno:0,code:"OK",description:"success"},{errno:1,code:"EOF",description:"end of file"},{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},{errno:3,code:"EACCES",description:"permission denied"},{errno:4,code:"EAGAIN",description:"resource temporarily unavailable"},{errno:5,code:"EADDRINUSE",description:"address already in use"},{errno:6,code:"EADDRNOTAVAIL",description:"address not available"},{errno:7,code:"EAFNOSUPPORT",description:"address family not supported"},{errno:8,code:"EALREADY",description:"connection already in progress"},{errno:9,code:"EBADF",description:"bad file descriptor"},{errno:10,code:"EBUSY",description:"resource busy or locked"},{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},{errno:12,code:"ECONNREFUSED",description:"connection refused"},{errno:13,code:"ECONNRESET",description:"connection reset by peer"},{errno:14,code:"EDESTADDRREQ",description:"destination address required"},{errno:15,code:"EFAULT",description:"bad address in system call argument"},{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},{errno:17,code:"EINTR",description:"interrupted system call"},{errno:18,code:"EINVAL",description:"invalid argument"},{errno:19,code:"EISCONN",description:"socket is already connected"},{errno:20,code:"EMFILE",description:"too many open files"},{errno:21,code:"EMSGSIZE",description:"message too long"},{errno:22,code:"ENETDOWN",description:"network is down"},{errno:23,code:"ENETUNREACH",description:"network is unreachable"},{errno:24,code:"ENFILE",description:"file table overflow"},{errno:25,code:"ENOBUFS",description:"no buffer space available"},{errno:26,code:"ENOMEM",description:"not enough memory"},{errno:27,code:"ENOTDIR",description:"not a directory"},{errno:28,code:"EISDIR",description:"illegal operation on a directory"},{errno:29,code:"ENONET",description:"machine is not on the network"},{errno:31,code:"ENOTCONN",description:"socket is not connected"},{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},{errno:34,code:"ENOENT",description:"no such file or directory"},{errno:35,code:"ENOSYS",description:"function not implemented"},{errno:36,code:"EPIPE",description:"broken pipe"},{errno:37,code:"EPROTO",description:"protocol error"},{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},{errno:40,code:"ETIMEDOUT",description:"connection timed out"},{errno:41,code:"ECHARSET",description:"invalid Unicode character"},{errno:42,code:"EAIFAMNOSUPPORT",description:"address family for hostname not supported"},{errno:44,code:"EAISERVICE",description:"servname not supported for ai_socktype"},{errno:45,code:"EAISOCKTYPE",description:"ai_socktype not supported"},{errno:46,code:"ESHUTDOWN",description:"cannot send after transport endpoint shutdown"},{errno:47,code:"EEXIST",description:"file already exists"},{errno:48,code:"ESRCH",description:"no such process"},{errno:49,code:"ENAMETOOLONG",description:"name too long"},{errno:50,code:"EPERM",description:"operation not permitted"},{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},{errno:52,code:"EXDEV",description:"cross-device link not permitted"},{errno:53,code:"ENOTEMPTY",description:"directory not empty"},{errno:54,code:"ENOSPC",description:"no space left on device"},{errno:55,code:"EIO",description:"i/o error"},{errno:56,code:"EROFS",description:"read-only file system"},{errno:57,code:"ENODEV",description:"no such device"},{errno:58,code:"ESPIPE",description:"invalid seek"},{errno:59,code:"ECANCELED",description:"operation canceled"}];re.exports.errno={},re.exports.code={},p.forEach(function(D){re.exports.errno[D.errno]=D,re.exports.code[D.code]=D}),re.exports.custom=g(69913)(re.exports),re.exports.create=re.exports.custom.createError},38739:function(re){var g,p;g=this,p=function(){var u="function"==typeof Object.defineProperty?function(D,w,_){return Object.defineProperty(D,w,_),D}:function(D,w,_){return D[w]=_.value,D};return function(D,w,_,l){var v;if(l=function(D,w){var _="object"==typeof w,l=!_&&"string"==typeof w,v=function(m){return _?!!w[m]:!!l&&w.indexOf(m[0])>-1};return{enumerable:v("enumerable"),configurable:v("configurable"),writable:v("writable"),value:D}}(_,l),"object"==typeof w){for(v in w)Object.hasOwnProperty.call(w,v)&&(l.value=w[v],u(D,v,l));return D}return u(D,w,l)}},re.exports?re.exports=p():g.prr=p()},4073:(re,u,g)=>{re.exports=g(36766)},36766:(re,u,g)=>{g(53495);var D,p=g(37131);D=p("Error.captureStackTrace")?g(56362):p("Error.prototype.stack")?g(56017):g(63998),re.exports=D()},52047:(re,u,g)=>{var p=g(90252).Class,D=g(90252).abstractMethod,w=p(Object,{prototype:{init:p.prototype.merge,frameString:void 0,toString:function(){return this.frameString},functionValue:void 0,getThis:D,getTypeName:D,getFunction:function(){return this.functionValue},getFunctionName:D,getMethodName:D,getFileName:D,getLineNumber:D,getColumnNumber:D,getEvalOrigin:D,isTopLevel:D,isEval:D,isNative:D,isConstructor:D}});re.exports=w},80916:(re,u,g)=>{var p=g(90252).Class,D=g(52047),w=g(88074).cache,_=p(Object,{prototype:{stackParser:null,frameParser:null,locationParsers:null,constructor:function(l){p.prototype.merge.call(this,l)},getFrames:function(l,v){for(var m=[],b=0,M=l.length;b{var p=g(90252).Class,D=g(90252).abstractMethod,w=g(88074).eachCombination,_=g(88074).cache,l=g(37131),v=p(Object,{prototype:{captureFrameStrings:function(b){var M=this.createError();b.unshift(this.captureFrameStrings),b.unshift(this.createError);var A=this.getFrameStrings(M).slice(b.length),P=[];if(l("arguments.callee.caller")){var x=[this.createError,this.captureFrameStrings];try{for(var N=arguments.callee;N=N.caller;)x.push(N)}catch{}P=x.slice(b.length)}return{frameStrings:A,functionValues:P}},getFrameStrings:function(b){var M=b.message||"",E=b.name||"",A=this.getStackString(b);if(void 0!==A){var P=A.split("\n"),x=0,N=P.length;return this.hasHeader&&(x+=E.split("\n").length+M.split("\n").length-1),this.hasFooter&&(N-=1),P.slice(x,N)}},createError:D,getStackString:D,hasHeader:void 0,hasFooter:void 0}}),m=p(Object,{prototype:{calibrateClass:function(b){return this.calibrateMethods(b)&&this.calibrateEnvelope(b)},calibrateMethods:function(b){try{w([[function(M){return new Error(M)},function(M){try{throw new Error(M)}catch(E){return E}}],[function(M){return M.stack},function(M){return M.stacktrace}]],function(M,E){if(E(M()))throw{getStackString:E,createError:M}})}catch(M){return p.merge.call(b,{prototype:M}),!0}return!1},calibrateEnvelope:function(b){var P=(0,b.prototype.getStackString)((0,b.prototype.createError)("marker")).split("\n");return p.merge.call(b,{prototype:{hasHeader:/marker/.test(P[0]),hasFooter:""===P[P.length-1]}}),!0}}});re.exports={getClass:_(function(){var b;if(b)return b;if(b=p(v,{}),!(new m).calibrateClass(b))throw new Error("Cannot read Error.prototype.stack in this environment.");return b}),getInstance:_(function(){return new(this.getClass())})}},56017:(re,u,g)=>{var p=g(31470),D=g(80916),w=g(88074).cache,_=g(52624);re.exports=function(){return Error.captureStackTrace=function l(v,m){var M=[l];m&&M.push(m);var E=p.getInstance().captureFrameStrings(M);Object.defineProperties(v,{stack:{configurable:!0,get:w(function(){var A=D.getInstance().getFrames(E.frameStrings,E.functionValues);return(Error.prepareStackTrace||_)(v,A,undefined)})},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})},Error.getStackTrace=function(l){if(l.cachedStack)return l.stack;var b,v=p.getInstance().getFrameStrings(l),m=[];v?m=D.getInstance().getFrames(v,[]):b=["The stack is not readable by unthrown errors in this environment."];var M=(Error.prepareStackTrace||_)(l,m,b);if(v)try{Object.defineProperties(l,{stack:{configurable:!0,writable:!0,enumerable:!1,value:M},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})}catch{}return M},{prepareStackTrace:_}}},52624:re=>{re.exports=function(g,p,D){var w="";if(w+=g.name||"Error",w+=": "+(g.message||""),D instanceof Array)for(var _ in D){w+="\n # "+D[_]}for(var v in p){w+="\n at "+p[v].toString()}return w}},63998:(re,u,g)=>{var p=g(88074).cache,D=g(52624);re.exports=function(){return Error.captureStackTrace=function(w,_){Object.defineProperties(w,{stack:{configurable:!0,get:p(function(){return(Error.prepareStackTrace||D)(w,[])})},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})},Error.getStackTrace=function(w){if(w.cachedStack)return w.stack;var _=(Error.prepareStackTrace||D)(w,[]);try{Object.defineProperties(w,{stack:{configurable:!0,writable:!0,enumerable:!1,value:_},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})}catch{}return _},{prepareStackTrace:D}}},56362:(re,u,g)=>{var p=g(52624);re.exports=function(){return Error.getStackTrace=function(D){return D.stack},{prepareStackTrace:p}}},59069:re=>{"use strict";var p,u="object"==typeof Reflect?Reflect:null,g=u&&"function"==typeof u.apply?u.apply:function(Y,G,Q){return Function.prototype.apply.call(Y,G,Q)};p=u&&"function"==typeof u.ownKeys?u.ownKeys:Object.getOwnPropertySymbols?function(Y){return Object.getOwnPropertyNames(Y).concat(Object.getOwnPropertySymbols(Y))}:function(Y){return Object.getOwnPropertyNames(Y)};var w=Number.isNaN||function(Y){return Y!=Y};function _(){_.init.call(this)}re.exports=_,re.exports.once=function L(W,Y){return new Promise(function(G,Q){function q(H){W.removeListener(Y,J),Q(H)}function J(){"function"==typeof W.removeListener&&W.removeListener("error",q),G([].slice.call(arguments))}j(W,Y,J,{once:!0}),"error"!==Y&&function z(W,Y,G){"function"==typeof W.on&&j(W,"error",Y,G)}(W,q,{once:!0})})},_.EventEmitter=_,_.prototype._events=void 0,_.prototype._eventsCount=0,_.prototype._maxListeners=void 0;var l=10;function v(W){if("function"!=typeof W)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof W)}function m(W){return void 0===W._maxListeners?_.defaultMaxListeners:W._maxListeners}function b(W,Y,G,Q){var q,J,H;if(v(G),void 0===(J=W._events)?(J=W._events=Object.create(null),W._eventsCount=0):(void 0!==J.newListener&&(W.emit("newListener",Y,G.listener?G.listener:G),J=W._events),H=J[Y]),void 0===H)H=J[Y]=G,++W._eventsCount;else if("function"==typeof H?H=J[Y]=Q?[G,H]:[H,G]:Q?H.unshift(G):H.push(G),(q=m(W))>0&&H.length>q&&!H.warned){H.warned=!0;var te=new Error("Possible EventEmitter memory leak detected. "+H.length+" "+String(Y)+" listeners added. Use emitter.setMaxListeners() to increase limit");te.name="MaxListenersExceededWarning",te.emitter=W,te.type=Y,te.count=H.length,function D(W){console&&console.warn&&console.warn(W)}(te)}return W}function M(){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 E(W,Y,G){var Q={fired:!1,wrapFn:void 0,target:W,type:Y,listener:G},q=M.bind(Q);return q.listener=G,Q.wrapFn=q,q}function A(W,Y,G){var Q=W._events;if(void 0===Q)return[];var q=Q[Y];return void 0===q?[]:"function"==typeof q?G?[q.listener||q]:[q]:G?function F(W){for(var Y=new Array(W.length),G=0;G0&&(H=G[0]),H instanceof Error)throw H;var te=new Error("Unhandled error."+(H?" ("+H.message+")":""));throw te.context=H,te}var C=J[Y];if(void 0===C)return!1;if("function"==typeof C)g(C,this,G);else{var o=C.length,s=x(C,o);for(Q=0;Q=0;H--)if(Q[H]===G||Q[H].listener===G){te=Q[H].listener,J=H;break}if(J<0)return this;0===J?Q.shift():function N(W,Y){for(;Y+1=0;q--)this.removeListener(Y,G[q]);return this},_.prototype.listeners=function(Y){return A(this,Y,!0)},_.prototype.rawListeners=function(Y){return A(this,Y,!1)},_.listenerCount=function(W,Y){return"function"==typeof W.listenerCount?W.listenerCount(Y):P.call(W,Y)},_.prototype.listenerCount=P,_.prototype.eventNames=function(){return this._eventsCount>0?p(this._events):[]}},40347:(re,u,g)=>{var p=g(73502).Buffer,D=g(8095);re.exports=function w(_,l,v,m){if(p.isBuffer(_)||(_=p.from(_,"binary")),l&&(p.isBuffer(l)||(l=p.from(l,"binary")),8!==l.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var b=v/8,M=p.alloc(b),E=p.alloc(m||0),A=p.alloc(0);b>0||m>0;){var P=new D;P.update(A),P.update(_),l&&P.update(l),A=P.digest();var x=0;if(b>0){var N=M.length-b;x=Math.min(b,A.length),A.copy(M,N,0,x),b-=x}if(x0){var F=E.length-m,L=Math.min(m,A.length-x);A.copy(E,F,x,x+L),m-=L}}return A.fill(0),{key:M,iv:E}}},12559:re=>{"use strict";re.exports=function u(g,p){if(g===p)return!0;if(g&&p&&"object"==typeof g&&"object"==typeof p){if(g.constructor!==p.constructor)return!1;var D,w,_;if(Array.isArray(g)){if((D=g.length)!=p.length)return!1;for(w=D;0!=w--;)if(!u(g[w],p[w]))return!1;return!0}if(g.constructor===RegExp)return g.source===p.source&&g.flags===p.flags;if(g.valueOf!==Object.prototype.valueOf)return g.valueOf()===p.valueOf();if(g.toString!==Object.prototype.toString)return g.toString()===p.toString();if((D=(_=Object.keys(g)).length)!==Object.keys(p).length)return!1;for(w=D;0!=w--;)if(!Object.prototype.hasOwnProperty.call(p,_[w]))return!1;for(w=D;0!=w--;){var l=_[w];if(!u(g[l],p[l]))return!1}return!0}return g!=g&&p!=p}},44770:re=>{"use strict";re.exports=function(u,g){for(var p={},D=Object.keys(u),w=Array.isArray(g),_=0;_{"use strict";var p=g(64356),D=Object.prototype.toString,w=Object.prototype.hasOwnProperty,_=function(M,E,A){for(var P=0,x=M.length;P=3&&(P=A),"[object Array]"===D.call(M)?_(M,E,P):"string"==typeof M?l(M,E,P):v(M,E,P)}},64356:re=>{"use strict";var p,D,u=Function.prototype.toString,g="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof g&&"function"==typeof Object.defineProperty)try{p=Object.defineProperty({},"length",{get:function(){throw D}}),D={},g(function(){throw 42},null,p)}catch(z){z!==D&&(g=null)}else g=null;var w=/^\s*class\b/,_=function(j){try{var W=u.call(j);return w.test(W)}catch{return!1}},l=function(j){try{return!_(j)&&(u.call(j),!0)}catch{return!1}},v=Object.prototype.toString,x="function"==typeof Symbol&&!!Symbol.toStringTag,N=!(0 in[,]),F=function(){return!1};if("object"==typeof document){var L=document.all;v.call(L)===v.call(document.all)&&(F=function(j){if((N||!j)&&(typeof j>"u"||"object"==typeof j))try{var W=v.call(j);return("[object HTMLAllCollection]"===W||"[object HTML document.all class]"===W||"[object HTMLCollection]"===W||"[object Object]"===W)&&null==j("")}catch{}return!1})}re.exports=g?function(j){if(F(j))return!0;if(!j||"function"!=typeof j&&"object"!=typeof j)return!1;try{g(j,null,p)}catch(W){if(W!==D)return!1}return!_(j)&&l(j)}:function(j){if(F(j))return!0;if(!j||"function"!=typeof j&&"object"!=typeof j)return!1;if(x)return l(j);if(_(j))return!1;var W=v.call(j);return!("[object Function]"!==W&&"[object GeneratorFunction]"!==W&&!/^\[object HTML/.test(W))&&l(j)}},7480:re=>{var u=Object.prototype.hasOwnProperty,g=Object.prototype.toString;re.exports=function(D,w,_){if("[object Function]"!==g.call(w))throw new TypeError("iterator must be a function");var l=D.length;if(l===+l)for(var v=0;v{"use strict";var u="Function.prototype.bind called on incompatible ",g=Array.prototype.slice,p=Object.prototype.toString,D="[object Function]";re.exports=function(_){var l=this;if("function"!=typeof l||p.call(l)!==D)throw new TypeError(u+l);for(var m,v=g.call(arguments,1),M=Math.max(0,l.length-v.length),E=[],A=0;A{"use strict";var p=g(83457);re.exports=Function.prototype.bind||p},2997:(re,u,g)=>{var p=g(23874),D=g(14692),w=g(2313),_=new Buffer(0),l=function(){},v=function(M){return"function"==typeof M?M:function(E){E(null,M)}},m=function(M,E){var A=!1,P=!1;return M._read=function(){A=!0},M.destroy=function(){P=!0},E(function(x,N){if(x)return M.emit("error",x);var F=function(){for(var L;null!==(L=N.read());)A=!1,M.push(L)};if(N.on("readable",function(){A&&F()}),N.on("end",function(){F(),M.push(null)}),N.on("error",function(L){M.emit("error",L)}),N.on("close",function(){F(),process.nextTick(function(){M.emit("close")})}),M._read=function(){A=!0,F()},M.destroy=function(){P||(P=!0,N.destroy&&N.destroy())},P)return P=!1,void M.destroy();A&&F()}),M},b=function(M,E){var A=l,P=!1;return M._write=function(x,N,F){A=F},M.destroy=function(){P=!0},M.write(_),E(function(x,N){if(x)return M.emit("error",x);N.on("close",function(){M.emit("close")}),N.on("error",function(L){M.emit("error",L)}),M._write=function(L,z,j){if(L===_)return j();N.write(L,z,j)};var F=M.emit;if(N.on("finish",function(){F.call(M,"finish")}),M.destroy=function(){P||(P=!0,N.destroy&&N.destroy())},M.emit=function(L){if("finish"!==L)return F.apply(M,arguments);N.end()},P)return P=!1,void M.destroy();A()}),M};u.readable=function(M,E){return 1===arguments.length?u.readable(null,M):(M||(M={}),m(new D(M),v(E)))},u.writable=function(M,E){return 1===arguments.length?u.writable(null,M):(M||(M={}),b(new p(M),v(E)))},u.duplex=function(M,E,A){if(2===arguments.length)return u.duplex(null,M,E);M||(M={});var P=new w(M);return b(P,v(E)),m(P,v(A)),P}},2313:(re,u,g)=>{re.exports=g(52652)},52652:(re,u,g)=>{re.exports=l;var p=Object.keys||function(b){var M=[];for(var E in b)M.push(E);return M},D=g(26156);D.inherits=g(83894);var w=g(15890),_=g(19859);function l(b){if(!(this instanceof l))return new l(b);w.call(this,b),_.call(this,b),b&&!1===b.readable&&(this.readable=!1),b&&!1===b.writable&&(this.writable=!1),this.allowHalfOpen=!0,b&&!1===b.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",v)}function v(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}D.inherits(l,w),function m(b,M){for(var E=0,A=b.length;E{re.exports=w;var p=g(59735),D=g(26156);function w(_){if(!(this instanceof w))return new w(_);p.call(this,_)}D.inherits=g(83894),D.inherits(w,p),w.prototype._transform=function(_,l,v){v(null,_)}},15890:(re,u,g)=>{re.exports=b;var p=g(66425),D=g(93172).Buffer;b.ReadableState=m;var w=g(59069).EventEmitter;w.listenerCount||(w.listenerCount=function(o,s){return o.listeners(s).length});var v,_=g(295),l=g(26156);function m(o,s){var d=(o=o||{}).highWaterMark;this.highWaterMark=d||0===d?d:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!o.objectMode,this.defaultEncoding=o.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o.encoding&&(v||(v=g(15453).s),this.decoder=new v(o.encoding),this.encoding=o.encoding)}function b(o){if(!(this instanceof b))return new b(o);this._readableState=new m(o,this),this.readable=!0,_.call(this)}function M(o,s,d,h,S){var k=function N(o,s){var d=null;return!D.isBuffer(s)&&"string"!=typeof s&&null!=s&&!o.objectMode&&(d=new TypeError("Invalid non-string/buffer chunk")),d}(s,d);if(k)o.emit("error",k);else if(null==d)s.reading=!1,s.ended||function F(o,s){if(s.decoder&&!s.ended){var d=s.decoder.end();d&&d.length&&(s.buffer.push(d),s.length+=s.objectMode?1:d.length)}s.ended=!0,s.length>0?L(o):H(o)}(o,s);else if(s.objectMode||d&&d.length>0)if(s.ended&&!S){var B=new Error("stream.push() after EOF");o.emit("error",B)}else if(s.endEmitted&&S){B=new Error("stream.unshift() after end event");o.emit("error",B)}else s.decoder&&!S&&!h&&(d=s.decoder.write(d)),s.length+=s.objectMode?1:d.length,S?s.buffer.unshift(d):(s.reading=!1,s.buffer.push(d)),s.needReadable&&L(o),function j(o,s){s.readingMore||(s.readingMore=!0,process.nextTick(function(){!function W(o,s){for(var d=s.length;!s.reading&&!s.flowing&&!s.ended&&s.lengths.highWaterMark&&(s.highWaterMark=function P(o){if(o>=A)o=A;else{o--;for(var s=1;s<32;s<<=1)o|=o>>s;o++}return o}(o)),o>s.length?s.ended?s.length:(s.needReadable=!0,0):o)}function L(o){var s=o._readableState;s.needReadable=!1,!s.emittedReadable&&(s.emittedReadable=!0,s.sync?process.nextTick(function(){z(o)}):z(o))}function z(o){o.emit("readable")}function G(o){var d,s=o._readableState;function h(S,k,B){!1===S.write(d)&&s.awaitDrain++}for(s.awaitDrain=0;s.pipesCount&&null!==(d=o.read());)if(1===s.pipesCount?h(s.pipes):te(s.pipes,h),o.emit("data",d),s.awaitDrain>0)return;if(0===s.pipesCount)return s.flowing=!1,void(w.listenerCount(o,"data")>0&&q(o));s.ranOut=!0}function Q(){this._readableState.ranOut&&(this._readableState.ranOut=!1,G(this))}function q(o,s){if(o._readableState.flowing)throw new Error("Cannot switch to old mode now.");var h=s||!1,S=!1;o.readable=!0,o.pipe=_.prototype.pipe,o.on=o.addListener=_.prototype.on,o.on("readable",function(){S=!0;for(var k;!h&&null!==(k=o.read());)o.emit("data",k);null===k&&(S=!1,o._readableState.needReadable=!0)}),o.pause=function(){h=!0,this.emit("pause")},o.resume=function(){h=!1,S?process.nextTick(function(){o.emit("readable")}):this.read(0),this.emit("resume")},o.emit("readable")}function J(o,s){var B,d=s.buffer,h=s.length,S=!!s.decoder,k=!!s.objectMode;if(0===d.length)return null;if(0===h)B=null;else if(k)B=d.shift();else if(!o||o>=h)B=S?d.join(""):D.concat(d,h),d.length=0;else if(o0)throw new Error("endReadable called on non-empty stream");!s.endEmitted&&s.calledRead&&(s.ended=!0,process.nextTick(function(){!s.endEmitted&&0===s.length&&(s.endEmitted=!0,o.readable=!1,o.emit("end"))}))}function te(o,s){for(var d=0,h=o.length;d0)&&(s.emittedReadable=!1),0===o&&s.needReadable&&(s.length>=s.highWaterMark||s.ended))return L(this),null;if(0===(o=x(o,s))&&s.ended)return h=null,s.length>0&&s.decoder&&(h=J(o,s),s.length-=h.length),0===s.length&&H(this),h;var S=s.needReadable;return s.length-o<=s.highWaterMark&&(S=!0),(s.ended||s.reading)&&(S=!1),S&&(s.reading=!0,s.sync=!0,0===s.length&&(s.needReadable=!0),this._read(s.highWaterMark),s.sync=!1),S&&!s.reading&&(o=x(d,s)),null===(h=o>0?J(o,s):null)&&(s.needReadable=!0,o=0),s.length-=o,0===s.length&&!s.ended&&(s.needReadable=!0),s.ended&&!s.endEmitted&&0===s.length&&H(this),h},b.prototype._read=function(o){this.emit("error",new Error("not implemented"))},b.prototype.pipe=function(o,s){var d=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=o;break;case 1:h.pipes=[h.pipes,o];break;default:h.pipes.push(o)}h.pipesCount+=1;var k=(!s||!1!==s.end)&&o!==process.stdout&&o!==process.stderr?I:R;function B(Ce){Ce===d&&R()}function I(){o.end()}h.endEmitted?process.nextTick(k):d.once("end",k),o.on("unpipe",B);var f=function Y(o){return function(){var d=o._readableState;d.awaitDrain--,0===d.awaitDrain&&G(o)}}(d);function R(){o.removeListener("close",ee),o.removeListener("finish",oe),o.removeListener("drain",f),o.removeListener("error",se),o.removeListener("unpipe",B),d.removeListener("end",I),d.removeListener("end",R),(!o._writableState||o._writableState.needDrain)&&f()}function se(Ce){de(),o.removeListener("error",se),0===w.listenerCount(o,"error")&&o.emit("error",Ce)}function ee(){o.removeListener("finish",oe),de()}function oe(){o.removeListener("close",ee),de()}function de(){d.unpipe(o)}return o.on("drain",f),o._events&&o._events.error?p(o._events.error)?o._events.error.unshift(se):o._events.error=[se,o._events.error]:o.on("error",se),o.once("close",ee),o.once("finish",oe),o.emit("pipe",d),h.flowing||(this.on("readable",Q),h.flowing=!0,process.nextTick(function(){G(d)})),o},b.prototype.unpipe=function(o){var s=this._readableState;if(0===s.pipesCount)return this;if(1===s.pipesCount)return o&&o!==s.pipes||(o||(o=s.pipes),s.pipes=null,s.pipesCount=0,this.removeListener("readable",Q),s.flowing=!1,o&&o.emit("unpipe",this)),this;if(!o){var d=s.pipes,h=s.pipesCount;s.pipes=null,s.pipesCount=0,this.removeListener("readable",Q),s.flowing=!1;for(var S=0;S"u"&&(this[S]=function(B){return function(){return o[B].apply(o,arguments)}}(S));return te(["error","close","destroy","pause","resume"],function(B){o.on(B,h.emit.bind(h,B))}),h._read=function(B){d&&(d=!1,o.resume())},h},b._fromList=J},59735:(re,u,g)=>{re.exports=l;var p=g(52652),D=g(26156);function w(m,b){this.afterTransform=function(M,E){return function _(m,b,M){var E=m._transformState;E.transforming=!1;var A=E.writecb;if(!A)return m.emit("error",new Error("no writecb in Transform class"));E.writechunk=null,E.writecb=null,null!=M&&m.push(M),A&&A(b);var P=m._readableState;P.reading=!1,(P.needReadable||P.length{re.exports=v;var p=g(93172).Buffer;v.WritableState=l;var D=g(26156);D.inherits=g(83894);var w=g(295);function _(G,Q,q){this.chunk=G,this.encoding=Q,this.callback=q}function l(G,Q){var q=(G=G||{}).highWaterMark;this.highWaterMark=q||0===q?q:16384,this.objectMode=!!G.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var J=!1===G.decodeStrings;this.decodeStrings=!J,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){!function N(G,Q){var q=G._writableState,J=q.sync,H=q.writecb;if(function x(G){G.writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0}(q),Q)!function P(G,Q,q,J,H){q?process.nextTick(function(){H(J)}):H(J),G._writableState.errorEmitted=!0,G.emit("error",J)}(G,0,J,Q,H);else{var te=j(G,q);!te&&!q.bufferProcessing&&q.buffer.length&&function z(G,Q){Q.bufferProcessing=!0;for(var q=0;q{var p=g(295);(u=re.exports=g(15890)).Stream=p,u.Readable=u,u.Writable=g(19859),u.Duplex=g(52652),u.Transform=g(59735),u.PassThrough=g(72936),!process.browser&&"disable"===process.env.READABLE_STREAM&&(re.exports=g(295))},23874:(re,u,g)=>{re.exports=g(19859)},95203:(re,u,g)=>{"use strict";var p,D=SyntaxError,w=Function,_=TypeError,l=function(s){try{return w('"use strict"; return ('+s+").constructor;")()}catch{}},v=Object.getOwnPropertyDescriptor;if(v)try{v({},"")}catch{v=null}var m=function(){throw new _},b=v?function(){try{return arguments.callee,m}catch{try{return v(arguments,"callee").get}catch{return m}}}():m,M=g(92969)(),E=g(49757)(),A=Object.getPrototypeOf||(E?function(s){return s.__proto__}:null),P={},x=typeof Uint8Array>"u"||!A?p:A(Uint8Array),N={"%AggregateError%":typeof AggregateError>"u"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?p:ArrayBuffer,"%ArrayIteratorPrototype%":M&&A?A([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":typeof Atomics>"u"?p:Atomics,"%BigInt%":typeof BigInt>"u"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?p:Float32Array,"%Float64Array%":typeof Float64Array>"u"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?p:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":P,"%Int8Array%":typeof Int8Array>"u"?p:Int8Array,"%Int16Array%":typeof Int16Array>"u"?p:Int16Array,"%Int32Array%":typeof Int32Array>"u"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&A?A(A([][Symbol.iterator]())):p,"%JSON%":"object"==typeof JSON?JSON:p,"%Map%":typeof Map>"u"?p:Map,"%MapIteratorPrototype%":typeof Map>"u"||!M||!A?p:A((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?p:Promise,"%Proxy%":typeof Proxy>"u"?p:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?p:Set,"%SetIteratorPrototype%":typeof Set>"u"||!M||!A?p:A((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&A?A(""[Symbol.iterator]()):p,"%Symbol%":M?Symbol:p,"%SyntaxError%":D,"%ThrowTypeError%":b,"%TypedArray%":x,"%TypeError%":_,"%Uint8Array%":typeof Uint8Array>"u"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?p:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?p:WeakMap,"%WeakRef%":typeof WeakRef>"u"?p:WeakRef,"%WeakSet%":typeof WeakSet>"u"?p:WeakSet};if(A)try{null.error}catch(s){var F=A(A(s));N["%Error.prototype%"]=F}var L=function s(d){var h;if("%AsyncFunction%"===d)h=l("async function () {}");else if("%GeneratorFunction%"===d)h=l("function* () {}");else if("%AsyncGeneratorFunction%"===d)h=l("async function* () {}");else if("%AsyncGenerator%"===d){var S=s("%AsyncGeneratorFunction%");S&&(h=S.prototype)}else if("%AsyncIteratorPrototype%"===d){var k=s("%AsyncGenerator%");k&&A&&(h=A(k.prototype))}return N[d]=h,h},z={"%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"]},j=g(84444),W=g(93164),Y=j.call(Function.call,Array.prototype.concat),G=j.call(Function.apply,Array.prototype.splice),Q=j.call(Function.call,String.prototype.replace),q=j.call(Function.call,String.prototype.slice),J=j.call(Function.call,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,te=/\\(\\)?/g,C=function(d){var h=q(d,0,1),S=q(d,-1);if("%"===h&&"%"!==S)throw new D("invalid intrinsic syntax, expected closing `%`");if("%"===S&&"%"!==h)throw new D("invalid intrinsic syntax, expected opening `%`");var k=[];return Q(d,H,function(B,I,f,R){k[k.length]=f?Q(R,te,"$1"):I||B}),k},o=function(d,h){var k,S=d;if(W(z,S)&&(S="%"+(k=z[S])[0]+"%"),W(N,S)){var B=N[S];if(B===P&&(B=L(S)),typeof B>"u"&&!h)throw new _("intrinsic "+d+" exists, but is not available. Please file an issue!");return{alias:k,name:S,value:B}}throw new D("intrinsic "+d+" does not exist!")};re.exports=function(d,h){if("string"!=typeof d||0===d.length)throw new _("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof h)throw new _('"allowMissing" argument must be a boolean');if(null===J(/^%?[^%]*%?$/,d))throw new D("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var S=C(d),k=S.length>0?S[0]:"",B=o("%"+k+"%",h),I=B.name,f=B.value,R=!1,se=B.alias;se&&(k=se[0],G(S,Y([0,1],se)));for(var ee=1,oe=!0;ee=S.length){var ve=v(f,de);f=(oe=!!ve)&&"get"in ve&&!("originalValue"in ve.get)?ve.get:f[de]}else oe=W(f,de),f=f[de];oe&&!R&&(N[I]=f)}}return f}},47378:(re,u,g)=>{"use strict";var D=g(95203)("%Object.getOwnPropertyDescriptor%",!0);if(D)try{D([],"length")}catch{D=null}re.exports=D},49757:re=>{"use strict";var u={foo:{}},g=Object;re.exports=function(){return{__proto__:u}.foo===u.foo&&!({__proto__:null}instanceof g)}},92969:(re,u,g)=>{"use strict";var p=typeof Symbol<"u"&&Symbol,D=g(81983);re.exports=function(){return"function"==typeof p&&"function"==typeof Symbol&&"symbol"==typeof p("foo")&&"symbol"==typeof Symbol("bar")&&D()}},81983:re=>{"use strict";re.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var g={},p=Symbol("test"),D=Object(p);if("string"==typeof p||"[object Symbol]"!==Object.prototype.toString.call(p)||"[object Symbol]"!==Object.prototype.toString.call(D))return!1;for(p in g[p]=42,g)return!1;if("function"==typeof Object.keys&&0!==Object.keys(g).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(g).length)return!1;var _=Object.getOwnPropertySymbols(g);if(1!==_.length||_[0]!==p||!Object.prototype.propertyIsEnumerable.call(g,p))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var l=Object.getOwnPropertyDescriptor(g,p);if(42!==l.value||!0!==l.enumerable)return!1}return!0}},46259:(re,u,g)=>{"use strict";var p=g(81983);re.exports=function(){return p()&&!!Symbol.toStringTag}},93164:(re,u,g)=>{"use strict";var p=g(84444);re.exports=p.call(Function.call,Object.prototype.hasOwnProperty)},39650:(re,u,g)=>{"use strict";var p=g(73502).Buffer,D=g(65685).Transform;function l(v){D.call(this),this._block=p.allocUnsafe(v),this._blockSize=v,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}g(83894)(l,D),l.prototype._transform=function(v,m,b){var M=null;try{this.update(v,m)}catch(E){M=E}b(M)},l.prototype._flush=function(v){var m=null;try{this.push(this.digest())}catch(b){m=b}v(m)},l.prototype.update=function(v,m){if(function _(v,m){if(!p.isBuffer(v)&&"string"!=typeof v)throw new TypeError(m+" must be a string or a buffer")}(v,"Data"),this._finalized)throw new Error("Digest already called");p.isBuffer(v)||(v=p.from(v,m));for(var b=this._block,M=0;this._blockOffset+v.length-M>=this._blockSize;){for(var E=this._blockOffset;E0;++A)this._length[A]+=P,(P=this._length[A]/4294967296|0)>0&&(this._length[A]-=4294967296*P);return this},l.prototype._update=function(){throw new Error("_update is not implemented")},l.prototype.digest=function(v){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var m=this._digest();void 0!==v&&(m=m.toString(v)),this._block.fill(0),this._blockOffset=0;for(var b=0;b<4;++b)this._length[b]=0;return m},l.prototype._digest=function(){throw new Error("_digest is not implemented")},re.exports=l},37084:(re,u,g)=>{var p=u;p.utils=g(29299),p.common=g(33800),p.sha=g(54962),p.ripemd=g(99458),p.hmac=g(12194),p.sha1=p.sha.sha1,p.sha256=p.sha.sha256,p.sha224=p.sha.sha224,p.sha384=p.sha.sha384,p.sha512=p.sha.sha512,p.ripemd160=p.ripemd.ripemd160},33800:(re,u,g)=>{"use strict";var p=g(29299),D=g(32391);function w(){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}u.BlockHash=w,w.prototype.update=function(l,v){if(l=p.toArray(l,v),this.pending?this.pending=this.pending.concat(l):this.pending=l,this.pendingTotal+=l.length,this.pending.length>=this._delta8){var m=(l=this.pending).length%this._delta8;this.pending=l.slice(l.length-m,l.length),0===this.pending.length&&(this.pending=null),l=p.join32(l,0,l.length-m,this.endian);for(var b=0;b>>24&255,b[M++]=l>>>16&255,b[M++]=l>>>8&255,b[M++]=255&l}else for(b[M++]=255&l,b[M++]=l>>>8&255,b[M++]=l>>>16&255,b[M++]=l>>>24&255,b[M++]=0,b[M++]=0,b[M++]=0,b[M++]=0,E=8;E{"use strict";var p=g(29299),D=g(32391);function w(_,l,v){if(!(this instanceof w))return new w(_,l,v);this.Hash=_,this.blockSize=_.blockSize/8,this.outSize=_.outSize/8,this.inner=null,this.outer=null,this._init(p.toArray(l,v))}re.exports=w,w.prototype._init=function(l){l.length>this.blockSize&&(l=(new this.Hash).update(l).digest()),D(l.length<=this.blockSize);for(var v=l.length;v{"use strict";var p=g(29299),D=g(33800),w=p.rotl32,_=p.sum32,l=p.sum32_3,v=p.sum32_4,m=D.BlockHash;function b(){if(!(this instanceof b))return new b;m.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function M(L,z,j,W){return L<=15?z^j^W:L<=31?z&j|~z&W:L<=47?(z|~j)^W:L<=63?z&W|j&~W:z^(j|~W)}function A(L){return L<=15?1352829926:L<=31?1548603684:L<=47?1836072691:L<=63?2053994217:0}p.inherits(b,m),u.ripemd160=b,b.blockSize=512,b.outSize=160,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(z,j){for(var W=this.h[0],Y=this.h[1],G=this.h[2],Q=this.h[3],q=this.h[4],J=W,H=Y,te=G,C=Q,o=q,s=0;s<80;s++){var d=_(w(v(W,M(s,Y,G,Q),z[P[s]+j],(L=s)<=15?0:L<=31?1518500249:L<=47?1859775393:L<=63?2400959708:2840853838),N[s]),q);W=q,q=Q,Q=w(G,10),G=Y,Y=d,d=_(w(v(J,M(79-s,H,te,C),z[x[s]+j],A(s)),F[s]),o),J=o,o=C,C=w(te,10),te=H,H=d}var L;d=l(this.h[1],G,C),this.h[1]=l(this.h[2],Q,o),this.h[2]=l(this.h[3],q,J),this.h[3]=l(this.h[4],W,H),this.h[4]=l(this.h[0],Y,te),this.h[0]=d},b.prototype._digest=function(z){return"hex"===z?p.toHex32(this.h,"little"):p.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],x=[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],N=[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],F=[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]},54962:(re,u,g)=>{"use strict";u.sha1=g(59007),u.sha224=g(10055),u.sha256=g(19342),u.sha384=g(88634),u.sha512=g(70039)},59007:(re,u,g)=>{"use strict";var p=g(29299),D=g(33800),w=g(33113),_=p.rotl32,l=p.sum32,v=p.sum32_5,m=w.ft_1,b=D.BlockHash,M=[1518500249,1859775393,2400959708,3395469782];function E(){if(!(this instanceof E))return new E;b.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}p.inherits(E,b),re.exports=E,E.blockSize=512,E.outSize=160,E.hmacStrength=80,E.padLength=64,E.prototype._update=function(P,x){for(var N=this.W,F=0;F<16;F++)N[F]=P[x+F];for(;F{"use strict";var p=g(29299),D=g(19342);function w(){if(!(this instanceof w))return new w;D.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}p.inherits(w,D),re.exports=w,w.blockSize=512,w.outSize=224,w.hmacStrength=192,w.padLength=64,w.prototype._digest=function(l){return"hex"===l?p.toHex32(this.h.slice(0,7),"big"):p.split32(this.h.slice(0,7),"big")}},19342:(re,u,g)=>{"use strict";var p=g(29299),D=g(33800),w=g(33113),_=g(32391),l=p.sum32,v=p.sum32_4,m=p.sum32_5,b=w.ch32,M=w.maj32,E=w.s0_256,A=w.s1_256,P=w.g0_256,x=w.g1_256,N=D.BlockHash,F=[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 L(){if(!(this instanceof L))return new L;N.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=F,this.W=new Array(64)}p.inherits(L,N),re.exports=L,L.blockSize=512,L.outSize=256,L.hmacStrength=192,L.padLength=64,L.prototype._update=function(j,W){for(var Y=this.W,G=0;G<16;G++)Y[G]=j[W+G];for(;G{"use strict";var p=g(29299),D=g(70039);function w(){if(!(this instanceof w))return new w;D.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}p.inherits(w,D),re.exports=w,w.blockSize=1024,w.outSize=384,w.hmacStrength=192,w.padLength=128,w.prototype._digest=function(l){return"hex"===l?p.toHex32(this.h.slice(0,12),"big"):p.split32(this.h.slice(0,12),"big")}},70039:(re,u,g)=>{"use strict";var p=g(29299),D=g(33800),w=g(32391),_=p.rotr64_hi,l=p.rotr64_lo,v=p.shr64_hi,m=p.shr64_lo,b=p.sum64,M=p.sum64_hi,E=p.sum64_lo,A=p.sum64_4_hi,P=p.sum64_4_lo,x=p.sum64_5_hi,N=p.sum64_5_lo,F=D.BlockHash,L=[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 z(){if(!(this instanceof z))return new z;F.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=L,this.W=new Array(160)}function j(d,h,S,k,B){var I=d&S^~d&B;return I<0&&(I+=4294967296),I}function W(d,h,S,k,B,I){var f=h&k^~h&I;return f<0&&(f+=4294967296),f}function Y(d,h,S,k,B){var I=d&S^d&B^S&B;return I<0&&(I+=4294967296),I}function G(d,h,S,k,B,I){var f=h&k^h&I^k&I;return f<0&&(f+=4294967296),f}function Q(d,h){var I=_(d,h,28)^_(h,d,2)^_(h,d,7);return I<0&&(I+=4294967296),I}function q(d,h){var I=l(d,h,28)^l(h,d,2)^l(h,d,7);return I<0&&(I+=4294967296),I}function J(d,h){var I=_(d,h,14)^_(d,h,18)^_(h,d,9);return I<0&&(I+=4294967296),I}function H(d,h){var I=l(d,h,14)^l(d,h,18)^l(h,d,9);return I<0&&(I+=4294967296),I}function te(d,h){var I=_(d,h,1)^_(d,h,8)^v(d,h,7);return I<0&&(I+=4294967296),I}function C(d,h){var I=l(d,h,1)^l(d,h,8)^m(d,h,7);return I<0&&(I+=4294967296),I}function o(d,h){var I=_(d,h,19)^_(h,d,29)^v(d,h,6);return I<0&&(I+=4294967296),I}function s(d,h){var I=l(d,h,19)^l(h,d,29)^m(d,h,6);return I<0&&(I+=4294967296),I}p.inherits(z,F),re.exports=z,z.blockSize=1024,z.outSize=512,z.hmacStrength=192,z.padLength=128,z.prototype._prepareBlock=function(h,S){for(var k=this.W,B=0;B<32;B++)k[B]=h[S+B];for(;B{"use strict";var D=g(29299).rotr32;function _(A,P,x){return A&P^~A&x}function l(A,P,x){return A&P^A&x^P&x}function v(A,P,x){return A^P^x}u.ft_1=function w(A,P,x,N){return 0===A?_(P,x,N):1===A||3===A?v(P,x,N):2===A?l(P,x,N):void 0},u.ch32=_,u.maj32=l,u.p32=v,u.s0_256=function m(A){return D(A,2)^D(A,13)^D(A,22)},u.s1_256=function b(A){return D(A,6)^D(A,11)^D(A,25)},u.g0_256=function M(A){return D(A,7)^D(A,18)^A>>>3},u.g1_256=function E(A){return D(A,17)^D(A,19)^A>>>10}},29299:(re,u,g)=>{"use strict";var p=g(32391),D=g(83894);function w(s,d){return!(55296!=(64512&s.charCodeAt(d))||d<0||d+1>=s.length)&&56320==(64512&s.charCodeAt(d+1))}function v(s){return(s>>>24|s>>>8&65280|s<<8&16711680|(255&s)<<24)>>>0}function b(s){return 1===s.length?"0"+s:s}function M(s){return 7===s.length?"0"+s:6===s.length?"00"+s:5===s.length?"000"+s:4===s.length?"0000"+s:3===s.length?"00000"+s:2===s.length?"000000"+s:1===s.length?"0000000"+s:s}u.inherits=D,u.toArray=function _(s,d){if(Array.isArray(s))return s.slice();if(!s)return[];var h=[];if("string"==typeof s)if(d){if("hex"===d)for((s=s.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(s="0"+s),k=0;k>6|192,h[S++]=63&B|128):w(s,k)?(B=65536+((1023&B)<<10)+(1023&s.charCodeAt(++k)),h[S++]=B>>18|240,h[S++]=B>>12&63|128,h[S++]=B>>6&63|128,h[S++]=63&B|128):(h[S++]=B>>12|224,h[S++]=B>>6&63|128,h[S++]=63&B|128)}else for(k=0;k>>0}return B},u.split32=function A(s,d){for(var h=new Array(4*s.length),S=0,k=0;S>>24,h[k+1]=B>>>16&255,h[k+2]=B>>>8&255,h[k+3]=255&B):(h[k+3]=B>>>24,h[k+2]=B>>>16&255,h[k+1]=B>>>8&255,h[k]=255&B)}return h},u.rotr32=function P(s,d){return s>>>d|s<<32-d},u.rotl32=function x(s,d){return s<>>32-d},u.sum32=function N(s,d){return s+d>>>0},u.sum32_3=function F(s,d,h){return s+d+h>>>0},u.sum32_4=function L(s,d,h,S){return s+d+h+S>>>0},u.sum32_5=function z(s,d,h,S,k){return s+d+h+S+k>>>0},u.sum64=function j(s,d,h,S){var k=s[d],I=S+s[d+1]>>>0,f=(I>>0,s[d+1]=I},u.sum64_hi=function W(s,d,h,S){return(d+S>>>0>>0},u.sum64_lo=function Y(s,d,h,S){return d+S>>>0},u.sum64_4_hi=function G(s,d,h,S,k,B,I,f){var R=0,se=d;return R+=(se=se+S>>>0)>>0)>>0)>>0},u.sum64_4_lo=function Q(s,d,h,S,k,B,I,f){return d+S+B+f>>>0},u.sum64_5_hi=function q(s,d,h,S,k,B,I,f,R,se){var ee=0,oe=d;return ee+=(oe=oe+S>>>0)>>0)>>0)>>0)>>0},u.sum64_5_lo=function J(s,d,h,S,k,B,I,f,R,se){return d+S+B+f+se>>>0},u.rotr64_hi=function H(s,d,h){return(d<<32-h|s>>>h)>>>0},u.rotr64_lo=function te(s,d,h){return(s<<32-h|d>>>h)>>>0},u.shr64_hi=function C(s,d,h){return s>>>h},u.shr64_lo=function o(s,d,h){return(s<<32-h|d>>>h)>>>0}},52438:(re,u,g)=>{"use strict";var p=g(37084),D=g(58195),w=g(32391);function _(l){if(!(this instanceof _))return new _(l);this.hash=l.hash,this.predResist=!!l.predResist,this.outLen=this.hash.outSize,this.minEntropy=l.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var v=D.toArray(l.entropy,l.entropyEnc||"hex"),m=D.toArray(l.nonce,l.nonceEnc||"hex"),b=D.toArray(l.pers,l.persEnc||"hex");w(v.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(v,m,b)}re.exports=_,_.prototype._init=function(v,m,b){var M=v.concat(m).concat(b);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var E=0;E=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(v.concat(b||[])),this._reseed=1},_.prototype.generate=function(v,m,b,M){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof m&&(M=b,b=m,m=null),b&&(b=D.toArray(b,M||"hex"),this._update(b));for(var E=[];E.length{var p=g(74216),D=g(68762),w=re.exports;for(var _ in p)p.hasOwnProperty(_)&&(w[_]=p[_]);function l(v){if("string"==typeof v&&(v=D.parse(v)),v.protocol||(v.protocol="https:"),"https:"!==v.protocol)throw new Error('Protocol "'+v.protocol+'" not supported. Expected "https:"');return v}w.request=function(v,m){return v=l(v),p.request.call(this,v,m)},w.get=function(v,m){return v=l(v),p.get.call(this,v,m)}},17294:function(re,u,g){var p,D;!function(w,_,l){"use strict";p=function(){var w=function(A){throw A},_=function(){},l={storeName:"Store",storePrefix:"IDBWrapper-",dbVersion:1,keyPath:"id",autoIncrement:!0,onStoreReady:function(){},onError:w,indexes:[],implementationPreference:["indexedDB","webkitIndexedDB","mozIndexedDB","shimIndexedDB"]},v=function(A,P){for(var x in typeof P>"u"&&"function"==typeof A&&(P=A),"[object Object]"!=Object.prototype.toString.call(A)&&(A={}),l)this[x]=typeof A[x]<"u"?A[x]:l[x];this.dbName=this.storePrefix+this.storeName,this.dbVersion=parseInt(this.dbVersion,10)||1,P&&(this.onStoreReady=P);var N="object"==typeof window?window:self,F=this.implementationPreference.filter(function(L){return L in N});this.implementation=F[0],this.idb=N[this.implementation],this.keyRange=N.IDBKeyRange||N.webkitIDBKeyRange||N.mozIDBKeyRange,this.consts={READ_ONLY:"readonly",READ_WRITE:"readwrite",VERSION_CHANGE:"versionchange",NEXT:"next",NEXT_NO_DUPLICATE:"nextunique",PREV:"prev",PREV_NO_DUPLICATE:"prevunique"},this.openDB()},m={constructor:v,version:"1.7.2",db:null,dbName:null,dbVersion:null,store:null,storeName:null,storePrefix:null,keyPath:null,autoIncrement:null,indexes:null,implementationPreference:null,implementation:"",onStoreReady:null,onError:null,_insertIdCount:0,openDB:function(){var A=this.idb.open(this.dbName,this.dbVersion),P=!1;A.onerror=function(x){if(E(x))this.onError(new Error("The version number provided is lower than the existing one."));else{var N;if(x.target.error)N=x.target.error;else{var F="IndexedDB unknown error occurred when opening DB "+this.dbName+" version "+this.dbVersion;"errorCode"in x.target&&(F+=" with error code "+x.target.errorCode),N=new Error(F)}this.onError(N)}}.bind(this),A.onsuccess=function(x){if(!P){if(this.db)return void this.onStoreReady();if(this.db=x.target.result,"string"==typeof this.db.version)return void this.onError(new Error("The IndexedDB implementation in this browser is outdated. Please upgrade your browser."));if(!this.db.objectStoreNames.contains(this.storeName))return void this.onError(new Error("Object store couldn't be created."));var N=this.db.transaction([this.storeName],this.consts.READ_ONLY);this.store=N.objectStore(this.storeName);var F=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(L){var z=L.name;if(!z)return P=!0,void this.onError(new Error("Cannot create index: No index name given."));if(this.normalizeIndexData(L),this.hasIndex(z)){var j=this.store.index(z);this.indexComplies(j,L)||(P=!0,this.onError(new Error('Cannot modify index "'+z+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),F.splice(F.indexOf(z),1)}else P=!0,this.onError(new Error('Cannot create new index "'+z+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))},this),F.length&&(P=!0,this.onError(new Error('Cannot delete index(es) "'+F.toString()+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),P||this.onStoreReady()}}.bind(this),A.onupgradeneeded=function(x){if(this.db=x.target.result,this.db.objectStoreNames.contains(this.storeName))this.store=x.target.transaction.objectStore(this.storeName);else{var N={autoIncrement:this.autoIncrement};null!==this.keyPath&&(N.keyPath=this.keyPath),this.store=this.db.createObjectStore(this.storeName,N)}var F=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(L){var z=L.name;if(z||(P=!0,this.onError(new Error("Cannot create index: No index name given."))),this.normalizeIndexData(L),this.hasIndex(z)){var j=this.store.index(z);this.indexComplies(j,L)||(this.store.deleteIndex(z),this.store.createIndex(z,L.keyPath,{unique:L.unique,multiEntry:L.multiEntry})),F.splice(F.indexOf(z),1)}else this.store.createIndex(z,L.keyPath,{unique:L.unique,multiEntry:L.multiEntry})},this),F.length&&F.forEach(function(L){this.store.deleteIndex(L)},this)}.bind(this)},deleteDatabase:function(A,P){if(this.idb.deleteDatabase){this.db.close();var x=this.idb.deleteDatabase(this.dbName);x.onsuccess=A,x.onerror=P}else P(new Error("Browser does not support IndexedDB deleteDatabase!"))},put:function(A,P,x,N){null!==this.keyPath&&(N=x,x=P,P=A),N||(N=w),x||(x=_);var z,F=!1,L=null,j=this.db.transaction([this.storeName],this.consts.READ_WRITE);return j.oncomplete=function(){(F?x:N)(L)},j.onabort=N,j.onerror=N,null!==this.keyPath?(this._addIdPropertyIfNeeded(P),z=j.objectStore(this.storeName).put(P)):z=j.objectStore(this.storeName).put(P,A),z.onsuccess=function(W){F=!0,L=W.target.result},z.onerror=N,j},get:function(A,P,x){x||(x=w),P||(P=_);var N=!1,F=null,L=this.db.transaction([this.storeName],this.consts.READ_ONLY);L.oncomplete=function(){(N?P:x)(F)},L.onabort=x,L.onerror=x;var z=L.objectStore(this.storeName).get(A);return z.onsuccess=function(j){N=!0,F=j.target.result},z.onerror=x,L},remove:function(A,P,x){x||(x=w),P||(P=_);var N=!1,F=null,L=this.db.transaction([this.storeName],this.consts.READ_WRITE);L.oncomplete=function(){(N?P:x)(F)},L.onabort=x,L.onerror=x;var z=L.objectStore(this.storeName).delete(A);return z.onsuccess=function(j){N=!0,F=j.target.result},z.onerror=x,L},batch:function(A,P,x){if(x||(x=w),P||(P=_),"[object Array]"!=Object.prototype.toString.call(A))x(new Error("dataArray argument must be of type Array."));else if(0===A.length)return P(!0);var N=A.length,F=!1,L=!1,z=this.db.transaction([this.storeName],this.consts.READ_WRITE);z.oncomplete=function(){(L?P:x)(L)},z.onabort=x,z.onerror=x;var j=function(){0===--N&&!F&&(F=!0,L=!0)};return A.forEach(function(W){var Y=W.type,G=W.key,Q=W.value,q=function(te){z.abort(),F||(F=!0,x(te,Y,G))};if("remove"==Y){var J=z.objectStore(this.storeName).delete(G);J.onsuccess=j,J.onerror=q}else if("put"==Y){var H;null!==this.keyPath?(this._addIdPropertyIfNeeded(Q),H=z.objectStore(this.storeName).put(Q)):H=z.objectStore(this.storeName).put(Q,G),H.onsuccess=j,H.onerror=q}},this),z},putBatch:function(A,P,x){var N=A.map(function(F){return{type:"put",value:F}});return this.batch(N,P,x)},upsertBatch:function(A,P,x,N){"function"==typeof P&&(N=x=P,P={}),N||(N=w),x||(x=_),P||(P={}),"[object Array]"!=Object.prototype.toString.call(A)&&N(new Error("dataArray argument must be of type Array."));var F=P.keyField||this.keyPath,L=A.length,z=!1,j=!1,W=0,Y=this.db.transaction([this.storeName],this.consts.READ_WRITE);Y.oncomplete=function(){j?x(A):N(!1)},Y.onabort=N,Y.onerror=N;var G=function(Q){A[W++][F]=Q.target.result,0===--L&&!z&&(z=!0,j=!0)};return A.forEach(function(Q){var H,q=Q.key,J=function(te){Y.abort(),z||(z=!0,N(te))};null!==this.keyPath?(this._addIdPropertyIfNeeded(Q),H=Y.objectStore(this.storeName).put(Q)):H=Y.objectStore(this.storeName).put(Q,q),H.onsuccess=G,H.onerror=J},this),Y},removeBatch:function(A,P,x){var N=A.map(function(F){return{type:"remove",key:F}});return this.batch(N,P,x)},getBatch:function(A,P,x,N){if(x||(x=w),P||(P=_),N||(N="sparse"),"[object Array]"!=Object.prototype.toString.call(A))x(new Error("keyArray argument must be of type Array."));else if(0===A.length)return P([]);var F=[],L=A.length,j=!1,W=null,Y=this.db.transaction([this.storeName],this.consts.READ_ONLY);Y.oncomplete=function(){(j?P:x)(W)},Y.onabort=x,Y.onerror=x;var G=function(Q){Q.target.result||"dense"==N?F.push(Q.target.result):"sparse"==N&&F.length++,0===--L&&(!0,j=!0,W=F)};return A.forEach(function(Q){var q=function(H){!0,W=H,x(H),Y.abort()},J=Y.objectStore(this.storeName).get(Q);J.onsuccess=G,J.onerror=q},this),Y},getAll:function(A,P){P||(P=w),A||(A=_);var x=this.db.transaction([this.storeName],this.consts.READ_ONLY),N=x.objectStore(this.storeName);return N.getAll?this._getAllNative(x,N,A,P):this._getAllCursor(x,N,A,P),x},_getAllNative:function(A,P,x,N){var F=!1,L=null;A.oncomplete=function(){(F?x:N)(L)},A.onabort=N,A.onerror=N;var z=P.getAll();z.onsuccess=function(j){F=!0,L=j.target.result},z.onerror=N},_getAllCursor:function(A,P,x,N){var F=[],L=!1,z=null;A.oncomplete=function(){(L?x:N)(z)},A.onabort=N,A.onerror=N;var j=P.openCursor();j.onsuccess=function(W){var Y=W.target.result;Y?(F.push(Y.value),Y.continue()):(L=!0,z=F)},j.onError=N},clear:function(A,P){P||(P=w),A||(A=_);var x=!1,N=null,F=this.db.transaction([this.storeName],this.consts.READ_WRITE);F.oncomplete=function(){(x?A:P)(N)},F.onabort=P,F.onerror=P;var L=F.objectStore(this.storeName).clear();return L.onsuccess=function(z){x=!0,N=z.target.result},L.onerror=P,F},_addIdPropertyIfNeeded:function(A){typeof A[this.keyPath]>"u"&&(A[this.keyPath]=this._insertIdCount+++Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(A){return this.store.indexNames.contains(A)},normalizeIndexData:function(A){A.keyPath=A.keyPath||A.name,A.unique=!!A.unique,A.multiEntry=!!A.multiEntry},indexComplies:function(A,P){return["keyPath","unique","multiEntry"].every(function(N){if("multiEntry"==N&&void 0===A[N]&&!1===P[N])return!0;if("keyPath"==N&&"[object Array]"==Object.prototype.toString.call(P[N])){var F=P.keyPath,L=A.keyPath;if("string"==typeof L)return F.toString()==L;if("function"!=typeof L.contains&&"function"!=typeof L.indexOf||L.length!==F.length)return!1;for(var z=0,j=F.length;z{u.read=function(g,p,D,w,_){var l,v,m=8*_-w-1,b=(1<>1,E=-7,A=D?_-1:0,P=D?-1:1,x=g[p+A];for(A+=P,l=x&(1<<-E)-1,x>>=-E,E+=m;E>0;l=256*l+g[p+A],A+=P,E-=8);for(v=l&(1<<-E)-1,l>>=-E,E+=w;E>0;v=256*v+g[p+A],A+=P,E-=8);if(0===l)l=1-M;else{if(l===b)return v?NaN:1/0*(x?-1:1);v+=Math.pow(2,w),l-=M}return(x?-1:1)*v*Math.pow(2,l-w)},u.write=function(g,p,D,w,_,l){var v,m,b,M=8*l-_-1,E=(1<>1,P=23===_?Math.pow(2,-24)-Math.pow(2,-77):0,x=w?0:l-1,N=w?1:-1,F=p<0||0===p&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(m=isNaN(p)?1:0,v=E):(v=Math.floor(Math.log(p)/Math.LN2),p*(b=Math.pow(2,-v))<1&&(v--,b*=2),(p+=v+A>=1?P/b:P*Math.pow(2,1-A))*b>=2&&(v++,b/=2),v+A>=E?(m=0,v=E):v+A>=1?(m=(p*b-1)*Math.pow(2,_),v+=A):(m=p*Math.pow(2,A-1)*Math.pow(2,_),v=0));_>=8;g[D+x]=255&m,x+=N,m/=256,_-=8);for(v=v<<_|m,M+=_;M>0;g[D+x]=255&v,x+=N,v/=256,M-=8);g[D+x-N]|=128*F}},83894:re=>{"function"==typeof Object.create?re.exports=function(g,p){p&&(g.super_=p,g.prototype=Object.create(p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:re.exports=function(g,p){if(p){g.super_=p;var D=function(){};D.prototype=p.prototype,g.prototype=new D,g.prototype.constructor=g}}},13407:(re,u,g)=>{"use strict";var p=g(46259)(),w=g(75834)("Object.prototype.toString"),_=function(b){return!(p&&b&&"object"==typeof b&&Symbol.toStringTag in b)&&"[object Arguments]"===w(b)},l=function(b){return!!_(b)||null!==b&&"object"==typeof b&&"number"==typeof b.length&&b.length>=0&&"[object Array]"!==w(b)&&"[object Function]"===w(b.callee)},v=function(){return _(arguments)}();_.isLegacyArguments=l,re.exports=v?_:l},20110:(re,u,g)=>{"use strict";var m,p=Object.prototype.toString,D=Function.prototype.toString,w=/^\s*(?:function)?\*/,_=g(46259)(),l=Object.getPrototypeOf;re.exports=function(M){if("function"!=typeof M)return!1;if(w.test(D.call(M)))return!0;if(!_)return"[object GeneratorFunction]"===p.call(M);if(!l)return!1;if(typeof m>"u"){var A=function(){if(!_)return!1;try{return Function("return function*() {}")()}catch{}}();m=!!A&&l(A)}return l(M)===m}},48214:re=>{"use strict";re.exports=D,re.exports.isMobile=D,re.exports.default=D;const u=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,g=/CrOS/,p=/android|ipad|playbook|silk/i;function D(w){w||(w={});let _=w.ua;if(!_&&typeof navigator<"u"&&(_=navigator.userAgent),_&&_.headers&&"string"==typeof _.headers["user-agent"]&&(_=_.headers["user-agent"]),"string"!=typeof _)return!1;let l=u.test(_)&&!g.test(_)||!!w.tablet&&p.test(_);return!l&&w.tablet&&w.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==_.indexOf("Macintosh")&&-1!==_.indexOf("Safari")&&(l=!0),l}},55782:re=>{var u=Object.prototype,g=u.hasOwnProperty,p=u.toString,D=function(l){return l!=l},w={boolean:1,number:1,string:1,undefined:1},_=re.exports={};_.a=_.type=function(l,v){return typeof l===v},_.defined=function(l){return void 0!==l},_.empty=function(l){var m,v=p.call(l);if("[object Array]"===v||"[object Arguments]"===v)return 0===l.length;if("[object Object]"===v){for(m in l)if(g.call(l,m))return!1;return!0}return"[object String]"===v&&""===l},_.equal=function(l,v){var b,m=p.call(l);if(m!==p.call(v))return!1;if("[object Object]"===m){for(b in l)if(!_.equal(l[b],v[b]))return!1;return!0}if("[object Array]"===m){if((b=l.length)!==v.length)return!1;for(;--b;)if(!_.equal(l[b],v[b]))return!1;return!0}return"[object Function]"===m?l.prototype===v.prototype:"[object Date]"===m?l.getTime()===v.getTime():l===v},_.hosted=function(l,v){var m=typeof v[l];return"object"===m?!!v[l]:!w[m]},_.instance=_.instanceof=function(l,v){return l instanceof v},_.null=function(l){return null===l},_.undefined=function(l){return void 0===l},_.arguments=function(l){var v="[object Arguments]"===p.call(l),m=!_.array(l)&&_.arraylike(l)&&_.object(l)&&_.fn(l.callee);return v||m},_.array=function(l){return"[object Array]"===p.call(l)},_.arguments.empty=function(l){return _.arguments(l)&&0===l.length},_.array.empty=function(l){return _.array(l)&&0===l.length},_.arraylike=function(l){return!!l&&!_.boolean(l)&&g.call(l,"length")&&isFinite(l.length)&&_.number(l.length)&&l.length>=0},_.boolean=function(l){return"[object Boolean]"===p.call(l)},_.false=function(l){return _.boolean(l)&&(!1===l||!1===l.valueOf())},_.true=function(l){return _.boolean(l)&&(!0===l||!0===l.valueOf())},_.date=function(l){return"[object Date]"===p.call(l)},_.element=function(l){return void 0!==l&&typeof HTMLElement<"u"&&l instanceof HTMLElement&&1===l.nodeType},_.error=function(l){return"[object Error]"===p.call(l)},_.fn=_.function=function(l){return typeof window<"u"&&l===window.alert||"[object Function]"===p.call(l)},_.number=function(l){return"[object Number]"===p.call(l)},_.infinite=function(l){return l===1/0||l===-1/0},_.decimal=function(l){return _.number(l)&&!D(l)&&!_.infinite(l)&&l%1!=0},_.divisibleBy=function(l,v){var m=_.infinite(l),b=_.infinite(v),M=_.number(l)&&!D(l)&&_.number(v)&&!D(v)&&0!==v;return m||b||M&&l%v==0},_.int=function(l){return _.number(l)&&!D(l)&&l%1==0},_.maximum=function(l,v){if(D(l))throw new TypeError("NaN is not a valid value");if(!_.arraylike(v))throw new TypeError("second argument must be array-like");for(var m=v.length;--m>=0;)if(l=0;)if(l>v[m])return!1;return!0},_.nan=function(l){return!_.number(l)||l!=l},_.even=function(l){return _.infinite(l)||_.number(l)&&l==l&&l%2==0},_.odd=function(l){return _.infinite(l)||_.number(l)&&l==l&&l%2!=0},_.ge=function(l,v){if(D(l)||D(v))throw new TypeError("NaN is not a valid value");return!_.infinite(l)&&!_.infinite(v)&&l>=v},_.gt=function(l,v){if(D(l)||D(v))throw new TypeError("NaN is not a valid value");return!_.infinite(l)&&!_.infinite(v)&&l>v},_.le=function(l,v){if(D(l)||D(v))throw new TypeError("NaN is not a valid value");return!_.infinite(l)&&!_.infinite(v)&&l<=v},_.lt=function(l,v){if(D(l)||D(v))throw new TypeError("NaN is not a valid value");return!_.infinite(l)&&!_.infinite(v)&&l=v&&l<=m},_.object=function(l){return l&&"[object Object]"===p.call(l)},_.hash=function(l){return _.object(l)&&l.constructor===Object&&!l.nodeType&&!l.setInterval},_.regexp=function(l){return"[object RegExp]"===p.call(l)},_.string=function(l){return"[object String]"===p.call(l)}},66425:re=>{re.exports=Array.isArray||function(u){return"[object Array]"==Object.prototype.toString.call(u)}},40452:(re,u,g)=>{var p=g(93172).Buffer;re.exports=function D(w){return p.isBuffer(w)||/\[object (.+Array|Array.+)\]/.test(Object.prototype.toString.call(w))}},33024:(re,u,g)=>{re.exports=self.fetch||(self.fetch=g(75557).default||g(75557))},1520:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[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],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(re){return"[object Array]"===Object.prototype.toString.call(re)}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(re){return"object"==typeof re&&re.buffer&&re.buffer.constructor===ArrayBuffer});var createOutputMethod=function(re,u){return function(g){return new Sha256(u,!0).update(g)[re]()}},createMethod=function(re){var u=createOutputMethod("hex",re);NODE_JS&&(u=nodeWrap(u,re)),u.create=function(){return new Sha256(re)},u.update=function(D){return u.create().update(D)};for(var g=0;g>6,w[l++]=128|63&v):v<55296||v>=57344?(w[l++]=224|v>>12,w[l++]=128|v>>6&63,w[l++]=128|63&v):(v=65536+((1023&v)<<10|1023&re.charCodeAt(++p)),w[l++]=240|v>>18,w[l++]=128|v>>12&63,w[l++]=128|v>>6&63,w[l++]=128|63&v);re=w}else{if("object"!==D)throw new Error(ERROR);if(null===re)throw new Error(ERROR);if(ARRAY_BUFFER&&re.constructor===ArrayBuffer)re=new Uint8Array(re);else if(!(Array.isArray(re)||ARRAY_BUFFER&&ArrayBuffer.isView(re)))throw new Error(ERROR)}re.length>64&&(re=new Sha256(u,!0).update(re).array());var m=[],b=[];for(p=0;p<64;++p){var M=re[p]||0;m[p]=92^M,b[p]=54^M}Sha256.call(this,u,g),this.update(b),this.oKeyPad=m,this.inner=!0,this.sharedMemory=g}Sha256.prototype.update=function(re){if(!this.finalized){var u,g=typeof re;if("string"!==g){if("object"!==g)throw new Error(ERROR);if(null===re)throw new Error(ERROR);if(ARRAY_BUFFER&&re.constructor===ArrayBuffer)re=new Uint8Array(re);else if(!(Array.isArray(re)||ARRAY_BUFFER&&ArrayBuffer.isView(re)))throw new Error(ERROR);u=!0}for(var p,w,D=0,_=re.length,l=this.blocks;D<_;){if(this.hashed&&(this.hashed=!1,l[0]=this.block,l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),u)for(w=this.start;D<_&&w<64;++D)l[w>>2]|=re[D]<>2]|=p<>2]|=(192|p>>6)<>2]|=(128|63&p)<=57344?(l[w>>2]|=(224|p>>12)<>2]|=(128|p>>6&63)<>2]|=(128|63&p)<>2]|=(240|p>>18)<>2]|=(128|p>>12&63)<>2]|=(128|p>>6&63)<>2]|=(128|63&p)<=64?(this.block=l[16],this.start=w-64,this.hash(),this.hashed=!0):this.start=w}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var re=this.blocks,u=this.lastByteIndex;re[16]=this.block,re[u>>2]|=EXTRA[3&u],this.block=re[16],u>=56&&(this.hashed||this.hash(),re[0]=this.block,re[16]=re[1]=re[2]=re[3]=re[4]=re[5]=re[6]=re[7]=re[8]=re[9]=re[10]=re[11]=re[12]=re[13]=re[14]=re[15]=0),re[14]=this.hBytes<<3|this.bytes>>>29,re[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var m,b,M,E,A,N,F,L,z,re=this.h0,u=this.h1,g=this.h2,p=this.h3,D=this.h4,w=this.h5,_=this.h6,l=this.h7,v=this.blocks;for(m=16;m<64;++m)b=((A=v[m-15])>>>7|A<<25)^(A>>>18|A<<14)^A>>>3,M=((A=v[m-2])>>>17|A<<15)^(A>>>19|A<<13)^A>>>10,v[m]=v[m-16]+b+v[m-7]+M<<0;for(z=u&g,m=0;m<64;m+=4)this.first?(this.is224?(N=300032,l=(A=v[0]-1413257819)-150054599<<0,p=A+24177077<<0):(N=704751109,l=(A=v[0]-210244248)-1521486534<<0,p=A+143694565<<0),this.first=!1):(b=(re>>>2|re<<30)^(re>>>13|re<<19)^(re>>>22|re<<10),E=(N=re&u)^re&g^z,l=p+(A=l+(M=(D>>>6|D<<26)^(D>>>11|D<<21)^(D>>>25|D<<7))+(D&w^~D&_)+K[m]+v[m])<<0,p=A+(b+E)<<0),b=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),E=(F=p&re)^p&u^N,_=g+(A=_+(M=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&D^~l&w)+K[m+1]+v[m+1])<<0,b=((g=A+(b+E)<<0)>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10),E=(L=g&p)^g&re^F,w=u+(A=w+(M=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&l^~_&D)+K[m+2]+v[m+2])<<0,b=((u=A+(b+E)<<0)>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),E=(z=u&g)^u&p^L,D=re+(A=D+(M=(w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7))+(w&_^~w&l)+K[m+3]+v[m+3])<<0,re=A+(b+E)<<0;this.h0=this.h0+re<<0,this.h1=this.h1+u<<0,this.h2=this.h2+g<<0,this.h3=this.h3+p<<0,this.h4=this.h4+D<<0,this.h5=this.h5+w<<0,this.h6=this.h6+_<<0,this.h7=this.h7+l<<0},Sha256.prototype.hex=function(){this.finalize();var re=this.h0,u=this.h1,g=this.h2,p=this.h3,D=this.h4,w=this.h5,_=this.h6,l=this.h7,v=HEX_CHARS[re>>28&15]+HEX_CHARS[re>>24&15]+HEX_CHARS[re>>20&15]+HEX_CHARS[re>>16&15]+HEX_CHARS[re>>12&15]+HEX_CHARS[re>>8&15]+HEX_CHARS[re>>4&15]+HEX_CHARS[15&re]+HEX_CHARS[u>>28&15]+HEX_CHARS[u>>24&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[15&u]+HEX_CHARS[g>>28&15]+HEX_CHARS[g>>24&15]+HEX_CHARS[g>>20&15]+HEX_CHARS[g>>16&15]+HEX_CHARS[g>>12&15]+HEX_CHARS[g>>8&15]+HEX_CHARS[g>>4&15]+HEX_CHARS[15&g]+HEX_CHARS[p>>28&15]+HEX_CHARS[p>>24&15]+HEX_CHARS[p>>20&15]+HEX_CHARS[p>>16&15]+HEX_CHARS[p>>12&15]+HEX_CHARS[p>>8&15]+HEX_CHARS[p>>4&15]+HEX_CHARS[15&p]+HEX_CHARS[D>>28&15]+HEX_CHARS[D>>24&15]+HEX_CHARS[D>>20&15]+HEX_CHARS[D>>16&15]+HEX_CHARS[D>>12&15]+HEX_CHARS[D>>8&15]+HEX_CHARS[D>>4&15]+HEX_CHARS[15&D]+HEX_CHARS[w>>28&15]+HEX_CHARS[w>>24&15]+HEX_CHARS[w>>20&15]+HEX_CHARS[w>>16&15]+HEX_CHARS[w>>12&15]+HEX_CHARS[w>>8&15]+HEX_CHARS[w>>4&15]+HEX_CHARS[15&w]+HEX_CHARS[_>>28&15]+HEX_CHARS[_>>24&15]+HEX_CHARS[_>>20&15]+HEX_CHARS[_>>16&15]+HEX_CHARS[_>>12&15]+HEX_CHARS[_>>8&15]+HEX_CHARS[_>>4&15]+HEX_CHARS[15&_];return this.is224||(v+=HEX_CHARS[l>>28&15]+HEX_CHARS[l>>24&15]+HEX_CHARS[l>>20&15]+HEX_CHARS[l>>16&15]+HEX_CHARS[l>>12&15]+HEX_CHARS[l>>8&15]+HEX_CHARS[l>>4&15]+HEX_CHARS[15&l]),v},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var re=this.h0,u=this.h1,g=this.h2,p=this.h3,D=this.h4,w=this.h5,_=this.h6,l=this.h7,v=[re>>24&255,re>>16&255,re>>8&255,255&re,u>>24&255,u>>16&255,u>>8&255,255&u,g>>24&255,g>>16&255,g>>8&255,255&g,p>>24&255,p>>16&255,p>>8&255,255&p,D>>24&255,D>>16&255,D>>8&255,255&D,w>>24&255,w>>16&255,w>>8&255,255&w,_>>24&255,_>>16&255,_>>8&255,255&_];return this.is224||v.push(l>>24&255,l>>16&255,l>>8&255,255&l),v},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var re=new ArrayBuffer(this.is224?28:32),u=new DataView(re);return u.setUint32(0,this.h0),u.setUint32(4,this.h1),u.setUint32(8,this.h2),u.setUint32(12,this.h3),u.setUint32(16,this.h4),u.setUint32(20,this.h5),u.setUint32(24,this.h6),this.is224||u.setUint32(28,this.h7),re},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var re=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(re),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},54237:(re,u,g)=>{var p;!function(){"use strict";var D="input is invalid type",_="object"==typeof window,l=_?window:{};l.JS_SHA3_NO_WINDOW&&(_=!1);var v=!_&&"object"==typeof self;!l.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?l=global:v&&(l=self);var b=!l.JS_SHA3_NO_COMMON_JS&&re.exports,M=g.amdO,E=!l.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",A="0123456789abcdef".split(""),x=[4,1024,262144,67108864],L=[0,8,16,24],z=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],j=[224,256,384,512],W=[128,256],Y=["hex","buffer","arrayBuffer","array","digest"],G={128:168,256:136};(l.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ye){return"[object Array]"===Object.prototype.toString.call(ye)}),E&&(l.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ye){return"object"==typeof ye&&ye.buffer&&ye.buffer.constructor===ArrayBuffer});for(var Q=function(ye,ve,ae){return function(fe){return new oe(ye,ve,ye).update(fe)[ae]()}},q=function(ye,ve,ae){return function(fe,pe){return new oe(ye,ve,pe).update(fe)[ae]()}},J=function(ye,ve,ae){return function(fe,pe,Se,ce){return S["cshake"+ye].update(fe,pe,Se,ce)[ae]()}},H=function(ye,ve,ae){return function(fe,pe,Se,ce){return S["kmac"+ye].update(fe,pe,Se,ce)[ae]()}},te=function(ye,ve,ae,fe){for(var pe=0;pe>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ae>>5,this.extraBytes=(31&ae)>>3;for(var fe=0;fe<50;++fe)this.s[fe]=0}function de(ye,ve,ae){oe.call(this,ye,ve,ae)}oe.prototype.update=function(ye){if(this.finalized)throw new Error("finalize already called");var ve,ae=typeof ye;if("string"!==ae){if("object"!==ae)throw new Error(D);if(null===ye)throw new Error(D);if(E&&ye.constructor===ArrayBuffer)ye=new Uint8Array(ye);else if(!(Array.isArray(ye)||E&&ArrayBuffer.isView(ye)))throw new Error(D);ve=!0}for(var Fe,lt,fe=this.blocks,pe=this.byteCount,Se=ye.length,ce=this.blockCount,be=0,Pe=this.s;be>2]|=ye[be]<>2]|=lt<>2]|=(192|lt>>6)<>2]|=(128|63<)<=57344?(fe[Fe>>2]|=(224|lt>>12)<>2]|=(128|lt>>6&63)<>2]|=(128|63<)<>2]|=(240|lt>>18)<>2]|=(128|lt>>12&63)<>2]|=(128|lt>>6&63)<>2]|=(128|63<)<=pe){for(this.start=Fe-pe,this.block=fe[ce],Fe=0;Fe>=8);ae>0;)pe.unshift(ae),ae=255&(ye>>=8),++fe;return ve?pe.push(fe):pe.unshift(fe),this.update(pe),pe.length},oe.prototype.encodeString=function(ye){var ve,ae=typeof ye;if("string"!==ae){if("object"!==ae)throw new Error(D);if(null===ye)throw new Error(D);if(E&&ye.constructor===ArrayBuffer)ye=new Uint8Array(ye);else if(!(Array.isArray(ye)||E&&ArrayBuffer.isView(ye)))throw new Error(D);ve=!0}var fe=0,pe=ye.length;if(ve)fe=pe;else for(var Se=0;Se=57344?fe+=3:(ce=65536+((1023&ce)<<10|1023&ye.charCodeAt(++Se)),fe+=4)}return fe+=this.encode(8*fe),this.update(ye),fe},oe.prototype.bytepad=function(ye,ve){for(var ae=this.encode(ve),fe=0;fe>2]|=this.padding[3&ve],this.lastByteIndex===this.byteCount)for(ye[0]=ye[ae],ve=1;ve>4&15]+A[15&be]+A[be>>12&15]+A[be>>8&15]+A[be>>20&15]+A[be>>16&15]+A[be>>28&15]+A[be>>24&15];Se%ye==0&&(Ce(ve),pe=0)}return fe&&(be=ve[pe],ce+=A[be>>4&15]+A[15&be],fe>1&&(ce+=A[be>>12&15]+A[be>>8&15]),fe>2&&(ce+=A[be>>20&15]+A[be>>16&15])),ce},oe.prototype.arrayBuffer=function(){this.finalize();var be,ye=this.blockCount,ve=this.s,ae=this.outputBlocks,fe=this.extraBytes,pe=0,Se=0,ce=this.outputBits>>3;be=fe?new ArrayBuffer(ae+1<<2):new ArrayBuffer(ce);for(var Pe=new Uint32Array(be);Se>8&255,ce[be+2]=Pe>>16&255,ce[be+3]=Pe>>24&255;Se%ye==0&&Ce(ve)}return fe&&(be=Se<<2,Pe=ve[pe],ce[be]=255&Pe,fe>1&&(ce[be+1]=Pe>>8&255),fe>2&&(ce[be+2]=Pe>>16&255)),ce},de.prototype=new oe,de.prototype.finalize=function(){return this.encode(this.outputBits,!0),oe.prototype.finalize.call(this)};var Ce=function(ye){var ve,ae,fe,pe,Se,ce,be,Pe,Fe,lt,Ge,He,Kt,tt,nt,Vt,ot,at,Gt,Re,Ae,Te,Be,Ve,mt,Ze,ct,hn,ft,At,wn,ze,Qe,Ht,pt,vt,$t,dt,gt,mn,ut,wt,Sn,yt,Et,_e,Ee,Me,me,Oe,Ke,it,Ye,qe,Bt,Ct,kt,Ot,Pt,Lt,nn,Yt,gn;for(fe=0;fe<48;fe+=2)pe=ye[0]^ye[10]^ye[20]^ye[30]^ye[40],Se=ye[1]^ye[11]^ye[21]^ye[31]^ye[41],ce=ye[2]^ye[12]^ye[22]^ye[32]^ye[42],be=ye[3]^ye[13]^ye[23]^ye[33]^ye[43],Pe=ye[4]^ye[14]^ye[24]^ye[34]^ye[44],Fe=ye[5]^ye[15]^ye[25]^ye[35]^ye[45],lt=ye[6]^ye[16]^ye[26]^ye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>>31,pt=ye[3]<<1|ye[2]>>>31,Vt=ye[13]<<12|ye[12]>>>20,ot=ye[12]<<12|ye[13]>>>20,Me=ye[22]<<10|ye[23]>>>22,me=ye[23]<<10|ye[22]>>>22,At=ye[33]<<13|ye[32]>>>19,wn=ye[32]<<13|ye[33]>>>19,Yt=ye[42]<<2|ye[43]>>>30,gn=ye[43]<<2|ye[42]>>>30,qe=ye[5]<<30|ye[4]>>>2,Bt=ye[4]<<30|ye[5]>>>2,vt=ye[14]<<6|ye[15]>>>26,$t=ye[15]<<6|ye[14]>>>26,at=ye[25]<<11|ye[24]>>>21,Gt=ye[24]<<11|ye[25]>>>21,Oe=ye[34]<<15|ye[35]>>>17,Ke=ye[35]<<15|ye[34]>>>17,ze=ye[45]<<29|ye[44]>>>3,Qe=ye[44]<<29|ye[45]>>>3,Ve=ye[6]<<28|ye[7]>>>4,mt=ye[7]<<28|ye[6]>>>4,Ct=ye[17]<<23|ye[16]>>>9,kt=ye[16]<<23|ye[17]>>>9,dt=ye[26]<<25|ye[27]>>>7,gt=ye[27]<<25|ye[26]>>>7,Re=ye[36]<<21|ye[37]>>>11,Ae=ye[37]<<21|ye[36]>>>11,it=ye[47]<<24|ye[46]>>>8,Ye=ye[46]<<24|ye[47]>>>8,yt=ye[8]<<27|ye[9]>>>5,Et=ye[9]<<27|ye[8]>>>5,Ze=ye[18]<<20|ye[19]>>>12,ct=ye[19]<<20|ye[18]>>>12,Ot=ye[29]<<7|ye[28]>>>25,Pt=ye[28]<<7|ye[29]>>>25,mn=ye[38]<<8|ye[39]>>>24,ut=ye[39]<<8|ye[38]>>>24,Te=ye[48]<<14|ye[49]>>>18,Be=ye[49]<<14|ye[48]>>>18,ye[0]=tt^~Vt&at,ye[1]=nt^~ot&Gt,ye[10]=Ve^~Ze&hn,ye[11]=mt^~ct&ft,ye[20]=Ht^~vt&dt,ye[21]=pt^~$t>,ye[30]=yt^~_e&Me,ye[31]=Et^~Ee&me,ye[40]=qe^~Ct&Ot,ye[41]=Bt^~kt&Pt,ye[2]=Vt^~at&Re,ye[3]=ot^~Gt&Ae,ye[12]=Ze^~hn&At,ye[13]=ct^~ft&wn,ye[22]=vt^~dt&mn,ye[23]=$t^~gt&ut,ye[32]=_e^~Me&Oe,ye[33]=Ee^~me&Ke,ye[42]=Ct^~Ot&Lt,ye[43]=kt^~Pt&nn,ye[4]=at^~Re&Te,ye[5]=Gt^~Ae&Be,ye[14]=hn^~At&ze,ye[15]=ft^~wn&Qe,ye[24]=dt^~mn&wt,ye[25]=gt^~ut&Sn,ye[34]=Me^~Oe&it,ye[35]=me^~Ke&Ye,ye[44]=Ot^~Lt&Yt,ye[45]=Pt^~nn&gn,ye[6]=Re^~Te&tt,ye[7]=Ae^~Be&nt,ye[16]=At^~ze&Ve,ye[17]=wn^~Qe&mt,ye[26]=mn^~wt&Ht,ye[27]=ut^~Sn&pt,ye[36]=Oe^~it&yt,ye[37]=Ke^~Ye&Et,ye[46]=Lt^~Yt&qe,ye[47]=nn^~gn&Bt,ye[8]=Te^~tt&Vt,ye[9]=Be^~nt&ot,ye[18]=ze^~Ve&Ze,ye[19]=Qe^~mt&ct,ye[28]=wt^~Ht&vt,ye[29]=Sn^~pt&$t,ye[38]=it^~yt&_e,ye[39]=Ye^~Et&Ee,ye[48]=Yt^~qe&Ct,ye[49]=gn^~Bt&kt,ye[0]^=z[fe],ye[1]^=z[fe+1]};if(b)re.exports=S;else{for(B=0;B{"use strict";var u=re.exports=function(D,w,_){"function"==typeof w&&(_=w,w={}),g(w,"function"==typeof(_=w.cb||_)?_:_.pre||function(){},_.post||function(){},D,"",D)};function g(D,w,_,l,v,m,b,M,E,A){if(l&&"object"==typeof l&&!Array.isArray(l)){for(var P in w(l,v,m,b,M,E,A),l){var x=l[P];if(Array.isArray(x)){if(P in u.arrayKeywords)for(var N=0;N{var p=g(73669),D=g(91050),w=g(68429),_=g(26788),l=g(46389),v=new Buffer(0),m={encode:function(A){return"string"==typeof A?A=new Buffer(A):A},decode:function(A){return Buffer.isBuffer(A)?A:new Buffer(A)},buffer:!0,type:"raw"},b=function(){},M=function(A){return A=A.toString(16),"00000000".slice(0,-A.length)+A};re.exports=function(A,P){P||(P={});var x={},N=P.blockSize||65536,F=P.batch||100,L=new Buffer(N);A.put("\0","ignore",b);var z={},j=function(G,Q,q,J,H){var te=function(){--z[G].locks||delete z[G]},C=function(o){if(o.locks++,!o.block&&!Q)return o.block=q,void H(null,o.block,te);o.block||(o.block=new Buffer(N)),o.block.lengthte&&(H=G.slice(te),G=G.slice(0,te)),this.bytesWritten+=G.length,this.blockLength+=G.length,this.blocks.push(G),G.lengthq._missing&&(s=s.slice(0,q._missing)),q._missing-=s.length,q._pause(!q.push(s)),!!q._missing))};this._reader.on("data",function(s){for(;s.key>C;)if(!o(L))return;o(s.value)}),this._reader.on("error",function(s){q.emit("error",s)}),this._reader.on("end",function(){q.push(null)}),D.call(this)};return _.inherits(Y,D),Y.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._reader.destroy(),process.nextTick(this.emit.bind(this,"close")))},Y.prototype._pause=function(G){this._paused!==G&&(this._paused=G,this._paused?this._reader.pause():this._reader.resume())},Y.prototype._read=function(){this._pause(!1)},x.remove=function(G,Q){Q=l(Q||b);var q=[],J=A.createKeyStream({start:G+"\xff",end:G+"\xff\xff"});J.on("error",Q),J.on("data",function(H){q.push({type:"del",key:H})}),J.on("end",function(){A.batch(q,Q)})},x.size=function(G,Q){w.last(A,{start:G+"\xff",end:G+"\xff\xff",valueEncoding:m},function(q,J,H){return q&&"range not found"===q.message?Q(null,0):q?Q(q):J.slice(0,G.length+1)!==G+"\xff"?Q(null,0):void Q(null,parseInt(J.toString().slice(G.length+1),16)*N+H.length)})},x.write=function(G,Q,q,J){if("function"==typeof q)return x.write(G,Q,null,q);q||(q={}),J||(J=b);var H=x.createWriteStream(G,q);H.on("error",J),H.on("finish",function(){J()}),H.write(Q),H.end()},x.read=function(G,Q,q){if("function"==typeof Q)return x.read(G,null,Q);Q||(Q={});var J=x.createReadStream(G,Q),H=[];J.on("error",q),J.on("data",function(te){H.push(te)}),J.on("end",function(){q(null,1===H.length?H[0]:Buffer.concat(H))})},x.createReadStream=function(G,Q){return new Y(G,Q)},x.createWriteStream=function(G,Q){return new W(G,Q)},x}},60833:(re,u,g)=>{re.exports=l;var p=Object.keys||function(b){var M=[];for(var E in b)M.push(E);return M},D=g(26156);D.inherits=g(83894);var w=g(28460),_=g(37067);function l(b){if(!(this instanceof l))return new l(b);w.call(this,b),_.call(this,b),b&&!1===b.readable&&(this.readable=!1),b&&!1===b.writable&&(this.writable=!1),this.allowHalfOpen=!0,b&&!1===b.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",v)}function v(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}D.inherits(l,w),function m(b,M){for(var E=0,A=b.length;E{re.exports=w;var p=g(68081),D=g(26156);function w(_){if(!(this instanceof w))return new w(_);p.call(this,_)}D.inherits=g(83894),D.inherits(w,p),w.prototype._transform=function(_,l,v){v(null,_)}},28460:(re,u,g)=>{re.exports=M;var p=g(66425),D=g(93172).Buffer;M.ReadableState=b;var w=g(59069).EventEmitter;w.listenerCount||(w.listenerCount=function(s,d){return s.listeners(d).length});var _=g(295),l=g(26156);l.inherits=g(83894);var v,m=g(6297);function b(s,d){var h=g(60833),S=(s=s||{}).highWaterMark,k=s.objectMode?16:16384;this.highWaterMark=S||0===S?S:k,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!s.objectMode,d instanceof h&&(this.objectMode=this.objectMode||!!s.readableObjectMode),this.defaultEncoding=s.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,s.encoding&&(v||(v=g(15453).s),this.decoder=new v(s.encoding),this.encoding=s.encoding)}function M(s){g(60833);if(!(this instanceof M))return new M(s);this._readableState=new b(s,this),this.readable=!0,_.call(this)}function E(s,d,h,S,k){var B=function F(s,d){var h=null;return!l.isBuffer(d)&&!l.isString(d)&&!l.isNullOrUndefined(d)&&!s.objectMode&&(h=new TypeError("Invalid non-string/buffer chunk")),h}(d,h);if(B)s.emit("error",B);else if(l.isNullOrUndefined(h))d.reading=!1,d.ended||function L(s,d){if(d.decoder&&!d.ended){var h=d.decoder.end();h&&h.length&&(d.buffer.push(h),d.length+=d.objectMode?1:h.length)}d.ended=!0,z(s)}(s,d);else if(d.objectMode||h&&h.length>0)if(d.ended&&!k){var I=new Error("stream.push() after EOF");s.emit("error",I)}else if(d.endEmitted&&k){I=new Error("stream.unshift() after end event");s.emit("error",I)}else d.decoder&&!k&&!S&&(h=d.decoder.write(h)),k||(d.reading=!1),d.flowing&&0===d.length&&!d.sync?(s.emit("data",h),s.read(0)):(d.length+=d.objectMode?1:h.length,k?d.buffer.unshift(h):d.buffer.push(h),d.needReadable&&z(s)),function W(s,d){d.readingMore||(d.readingMore=!0,process.nextTick(function(){!function Y(s,d){for(var h=d.length;!d.reading&&!d.flowing&&!d.ended&&d.lengthd.highWaterMark&&(d.highWaterMark=function x(s){if(s>=P)s=P;else{s--;for(var d=1;d<32;d<<=1)s|=s>>d;s++}return s}(s)),s>d.length?d.ended?d.length:(d.needReadable=!0,0):s)}function z(s){var d=s._readableState;d.needReadable=!1,d.emittedReadable||(m("emitReadable",d.flowing),d.emittedReadable=!0,d.sync?process.nextTick(function(){j(s)}):j(s))}function j(s){m("emit readable"),s.emit("readable"),J(s)}function J(s){var d=s._readableState;if(m("flow",d.flowing),d.flowing)do{var h=s.read()}while(null!==h&&d.flowing)}function H(s,d){var I,h=d.buffer,S=d.length,k=!!d.decoder,B=!!d.objectMode;if(0===h.length)return null;if(0===S)I=null;else if(B)I=h.shift();else if(!s||s>=S)I=k?h.join(""):D.concat(h,S),h.length=0;else if(s0)throw new Error("endReadable called on non-empty stream");d.endEmitted||(d.ended=!0,process.nextTick(function(){!d.endEmitted&&0===d.length&&(d.endEmitted=!0,s.readable=!1,s.emit("end"))}))}M.prototype.read=function(s){m("read",s);var d=this._readableState,h=s;if((!l.isNumber(s)||s>0)&&(d.emittedReadable=!1),0===s&&d.needReadable&&(d.length>=d.highWaterMark||d.ended))return m("read: emitReadable",d.length,d.ended),0===d.length&&d.ended?te(this):z(this),null;if(0===(s=N(s,d))&&d.ended)return 0===d.length&&te(this),null;var k,S=d.needReadable;return m("need readable",S),(0===d.length||d.length-s0?H(s,d):null,l.isNull(k)&&(d.needReadable=!0,s=0),d.length-=s,0===d.length&&!d.ended&&(d.needReadable=!0),h!==s&&d.ended&&0===d.length&&te(this),l.isNull(k)||this.emit("data",k),k},M.prototype._read=function(s){this.emit("error",new Error("not implemented"))},M.prototype.pipe=function(s,d){var h=this,S=this._readableState;switch(S.pipesCount){case 0:S.pipes=s;break;case 1:S.pipes=[S.pipes,s];break;default:S.pipes.push(s)}S.pipesCount+=1,m("pipe count=%d opts=%j",S.pipesCount,d);var B=(!d||!1!==d.end)&&s!==process.stdout&&s!==process.stderr?f:se;function I(ve){m("onunpipe"),ve===h&&se()}function f(){m("onend"),s.end()}S.endEmitted?process.nextTick(B):h.once("end",B),s.on("unpipe",I);var R=function G(s){return function(){var d=s._readableState;m("pipeOnDrain",d.awaitDrain),d.awaitDrain&&d.awaitDrain--,0===d.awaitDrain&&w.listenerCount(s,"data")&&(d.flowing=!0,J(s))}}(h);function se(){m("cleanup"),s.removeListener("close",de),s.removeListener("finish",Ce),s.removeListener("drain",R),s.removeListener("error",oe),s.removeListener("unpipe",I),h.removeListener("end",f),h.removeListener("end",se),h.removeListener("data",ee),S.awaitDrain&&(!s._writableState||s._writableState.needDrain)&&R()}function ee(ve){m("ondata"),!1===s.write(ve)&&(m("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function oe(ve){m("onerror",ve),ye(),s.removeListener("error",oe),0===w.listenerCount(s,"error")&&s.emit("error",ve)}function de(){s.removeListener("finish",Ce),ye()}function Ce(){m("onfinish"),s.removeListener("close",de),ye()}function ye(){m("unpipe"),h.unpipe(s)}return s.on("drain",R),h.on("data",ee),s._events&&s._events.error?p(s._events.error)?s._events.error.unshift(oe):s._events.error=[oe,s._events.error]:s.on("error",oe),s.once("close",de),s.once("finish",Ce),s.emit("pipe",h),S.flowing||(m("pipe resume"),h.resume()),s},M.prototype.unpipe=function(s){var d=this._readableState;if(0===d.pipesCount)return this;if(1===d.pipesCount)return s&&s!==d.pipes||(s||(s=d.pipes),d.pipes=null,d.pipesCount=0,d.flowing=!1,s&&s.emit("unpipe",this)),this;if(!s){var h=d.pipes,S=d.pipesCount;d.pipes=null,d.pipesCount=0,d.flowing=!1;for(var k=0;k{re.exports=l;var p=g(60833),D=g(26156);function w(m,b){this.afterTransform=function(M,E){return function _(m,b,M){var E=m._transformState;E.transforming=!1;var A=E.writecb;if(!A)return m.emit("error",new Error("no writecb in Transform class"));E.writechunk=null,E.writecb=null,D.isNullOrUndefined(M)||m.push(M),A&&A(b);var P=m._readableState;P.reading=!1,(P.needReadable||P.length{re.exports=v;var p=g(93172).Buffer;v.WritableState=l;var D=g(26156);D.inherits=g(83894);var w=g(295);function _(Q,q,J){this.chunk=Q,this.encoding=q,this.callback=J}function l(Q,q){var J=g(60833),H=(Q=Q||{}).highWaterMark,te=Q.objectMode?16:16384;this.highWaterMark=H||0===H?H:te,this.objectMode=!!Q.objectMode,q instanceof J&&(this.objectMode=this.objectMode||!!Q.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var C=!1===Q.decodeStrings;this.decodeStrings=!C,this.defaultEncoding=Q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){!function N(Q,q){var J=Q._writableState,H=J.sync,te=J.writecb;if(function x(Q){Q.writing=!1,Q.writecb=null,Q.length-=Q.writelen,Q.writelen=0}(J),q)!function P(Q,q,J,H,te){J?process.nextTick(function(){q.pendingcb--,te(H)}):(q.pendingcb--,te(H)),Q._writableState.errorEmitted=!0,Q.emit("error",H)}(Q,J,H,q,te);else{var C=j(Q,J);!C&&!J.corked&&!J.bufferProcessing&&J.buffer.length&&z(Q,J),H?process.nextTick(function(){F(Q,J,C,te)}):F(Q,J,C,te)}}(q,o)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function v(Q){var q=g(60833);if(!(this instanceof v||this instanceof q))return new v(Q);this._writableState=new l(Q,this),this.writable=!0,w.call(this)}function A(Q,q,J,H,te,C,o){q.writelen=H,q.writecb=o,q.writing=!0,q.sync=!0,J?Q._writev(te,q.onwrite):Q._write(te,C,q.onwrite),q.sync=!1}function F(Q,q,J,H){J||function L(Q,q){0===q.length&&q.needDrain&&(q.needDrain=!1,Q.emit("drain"))}(Q,q),q.pendingcb--,H(),Y(Q,q)}function z(Q,q){if(q.bufferProcessing=!0,Q._writev&&q.buffer.length>1){for(var J=[],H=0;H{(u=re.exports=g(28460)).Stream=g(295),u.Readable=u,u.Writable=g(37067),u.Duplex=g(60833),u.Transform=g(68081),u.PassThrough=g(43813),!process.browser&&"disable"===process.env.READABLE_STREAM&&(re.exports=g(295))},73669:(re,u,g)=>{re.exports=g(37067)},37057:(re,u,g)=>{var p=g(3161);Object.keys(p.code).forEach(function(D){var w=p.code[D];u[D]=function(_){var l=new Error(D+", "+w.description+(_?" '"+_+"'":""));return l.errno=w.errno,l.code=D,l.path=_,l}})},94115:(re,u,g)=>{var p=g(2997),D=g(74162),w=g(95882),_=g(68429),l=g(46389),v=g(39199),m=g(37057),b=g(74514),M=g(1077),E=function(P,x,N){process.nextTick(function(){P(x,N)})},A=function(){};re.exports=function(P,x){var N={};P=D(P);var F=w(P.sublevel("blobs"),x),L=b(P.sublevel("stats")),z=P.sublevel("links"),j=M(),W=[],Y=Date.now();N.mkdir=function(H,te,C){if("function"==typeof te)return N.mkdir(H,null,te);te||(te=v(777)),C||(C=A),L.follow(H,function(o,s,d){return o&&"ENOENT"!==o.code?C(o):s?C(m.EEXIST(d)):void L.put(d,{type:"directory",mode:te,size:4096},j.cb(d,C))})},N.rmdir=function(H,te){te||(te=A),L.follow(H,function(C,o,s){if(C)return te(C);N.readdir(s,function(d,h){return d?te(d):h.length?te(m.ENOTEMPTY(s)):void L.del(s,j.cb(s,te))})})},N.readdir=function(H,te){L.follow(H,function(C,o,s){return C?te(C):o?o.isDirectory()?void L.list(s,te):te(m.ENOTDIR(s)):te(m.ENOENT(s))})};var Q=function(H,te,C){te(H,function(o,s,d){if(o)return C(o);if(!s.isFile())return C(null,s);var h=s&&s.blob||d;F.size(h,function(S,k){if(S)return C(S);s.size=k,C(null,s)})})};N.stat=function(H,te){Q(H,L.follow,te)},N.lstat=function(H,te){Q(H,L.get,te)},N.exists=function(H,te){L.follow(H,function(C){te(!C)})};var q=function(H,te,C,o){o||(o=A),te(H,function(s,d,h){if(s)return o(s);L.update(h,{mode:C},j.cb(h,o))})};N.chmod=function(H,te,C){q(H,L.follow,te,C)},N.lchmod=function(H,te,C){q(H,L.get,te,C)};var J=function(H,te,C,o,s){s||(s=A),te(H,function(d,h,S){if(d)return s(d);L.update(S,{uid:C,gid:o},j.cb(S,s))})};return N.chown=function(H,te,C,o){J(H,L.follow,te,C,o)},N.lchown=function(H,te,C,o){J(H,L.get,te,C,o)},N.utimes=function(H,te,C,o){o||(o=A),L.follow(H,function(s,d,h){if(s)return o(s);var S={};te&&(S.atime=te),C&&(S.mtime=C),L.update(h,S,j.cb(h,o))})},N.rename=function(H,te,C){C||(C=A),L.follow(H,function(o,s,d){if(o)return C(o);var h=function(){C=j.cb(te,j.cb(d,C)),L.put(te,s,function(S){if(S)return C(S);L.del(d,C)})};L.follow(te,function(S,k,B){return S&&"ENOENT"!==S.code?C(S):k?s.isDirectory()!==k.isDirectory()?C(m.EISDIR(d)):void(k.isDirectory()?N.readdir(B,function(I,f){return I?C(I):f.length?C(m.ENOTEMPTY(d)):void h()}):h()):h()})})},N.realpath=function(H,te,C){if("function"==typeof te)return N.realpath(H,null,te);L.follow(H,function(o,s,d){if(o)return C(o);C(null,d)})},N.writeFile=function(H,te,C,o){if("function"==typeof C)return N.writeFile(H,te,null,C);"string"==typeof C&&(C={encoding:C}),C||(C={}),o||(o=A),Buffer.isBuffer(te)||(te=new Buffer(te,C.encoding||"utf-8"));var s=C.flags||"w";C.append="w"!==s[0],L.follow(H,function(d,h,S){if(d&&"ENOENT"!==d.code)return o(d);if(h&&h.isDirectory())return o(m.EISDIR(S));if(h&&"x"===s[1])return o(m.EEXIST(S));var k=h&&h.blob||S;L.writable(S,function(B){if(B)return o(B);F.write(k,te,C,function(I){if(I)return o(I);L.put(S,{ctime:h&&h.ctime,mtime:new Date,mode:C.mode||v(666),type:"file"},j.cb(S,o))})})})},N.appendFile=function(H,te,C,o){if("function"==typeof C)return N.appendFile(H,te,null,C);"string"==typeof C&&(C={encoding:C}),C||(C={}),C.flags="a",N.writeFile(H,te,C,o)},N.unlink=function(H,te){te||(te=A),L.get(H,function(C,o,s){if(C)return te(C);if(o.isDirectory())return te(m.EISDIR(s));var d=function(S){_(z,{start:S+"\xff",end:S+"\xff\xff"},function(k){if(k)return F.remove(S,te);te()})};L.del(s,j.cb(s,function(S){return S?te(S):o.link?function(){var S=o.link.slice(0,o.link.indexOf("\xff"));z.del(o.link,function(k){if(k)return te(k);d(S)})}():void z.del(s+"\xff",function(k){if(k)return te(k);d(s)})}))})},N.readFile=function(H,te,C){if("function"==typeof te)return N.readFile(H,null,te);"string"==typeof te&&(te={encoding:te}),te||(te={});te.encoding,te.flag;L.follow(H,function(d,h,S){if(d)return C(d);if(h.isDirectory())return C(m.EISDIR(S));var k=h&&h.blob||S;F.read(k,function(B,I){if(B)return C(B);C(null,te.encoding?I.toString(te.encoding):I)})})},N.createReadStream=function(H,te){te||(te={});var C=!1,o=p.readable(function(s){L.follow(H,function(d,h,S){if(d)return s(d);if(h.isDirectory())return s(m.EISDIR(S));var k=h&&h.blob||S,B=F.createReadStream(k,te);o.emit("open"),B.on("end",function(){process.nextTick(function(){C||o.emit("close")})}),s(null,B)})});return o.on("close",function(){C=!0}),o},N.createWriteStream=function(H,te){te||(te={});var C=te.flags||"w",o=!1,s=te.mode||v(666);te.append="a"===C[0];var d=p.writable(function(h){L.follow(H,function(S,k,B){if(S&&"ENOENT"!==S.code)return h(S);if(k&&k.isDirectory())return h(m.EISDIR(B));if(k&&"x"===C[1])return h(m.EEXIST(B));var I=k&&k.blob||B;L.writable(I,function(f){if(f)return h(f);var se={ctime:k?k.ctime:new Date,mtime:new Date,mode:s,type:"file"};L.put(B,se,function(ee){if(ee)return h(ee);var oe=F.createWriteStream(I,te);d.emit("open"),oe.on("finish",function(){se.mtime=new Date,L.put(B,se,function(){j.change(B),o||d.emit("close")})}),h(null,oe)})})})});return d.on("close",function(){o=!0}),d},N.truncate=function(H,te,C){L.follow(H,function(o,s,d){if(o)return C(o);var h=s&&s.blob||d;F.size(h,function(S,k){if(S)return C(S);L.writable(d,function(B){if(B)return C(B);if(C=l(j.cb(d,C)),!te)return F.remove(h,C);var I=F.createWriteStream(h,{start:k{re.exports=function u(g){return null!==g&&("object"==typeof g||"function"==typeof g)}},48505:(re,u,g)=>{var p=g(78170);re.exports=function D(){for(var w={},_=0;_{var p=g(63928),D=g(46389),w=g(39448),_=g(39199),l=g(90163),v=g(48505),m=g(37057),b=l({type:"directory",mode:_(777),size:4096}),M=function(A){return A="/"===A[0]?A:"/"+A,"/"===(A=p.normalize(A))?A:"/"===A[A.length-1]?A.slice(0,-1):A},E=function(A){var P=A.split("/").length.toString(36);return"0000000000".slice(P.length)+P+A};re.exports=function(A){var P={};P.normalize=M,P.get=function(N,F){if("/"===(N=M(N)))return process.nextTick(F.bind(null,null,b,"/"));A.get(E(N),{valueEncoding:"json"},function(L,z){return L&&L.notFound?F(m.ENOENT(N),null,N):L?F(L,null,N):void F(null,l(z),N)})},P.writable=function(N,F){if("/"===(N=M(N)))return process.nextTick(F.bind(null,m.EPERM(N)));P.follow(p.dirname(N),function(L,z){return L?F(L):z.isDirectory()?void F(null,N):F(m.ENOTDIR(N))})},P.list=function(N,F){N=M(N);var L=E("/"===N?N:N+"/"),z=A.createKeyStream({start:L,end:L+"\xff"});F=D(F),z.on("error",F),z.pipe(w({encoding:"object"},function(j){j=j.map(function(W){return W.split("/").pop()}),F(null,j)}))};return P.follow=function(N,F){!function(N,F){var L="/",z=N.split("/").slice(1),j=function(){P.get(p.join(L,z.shift()),function(W,Y,G){return W?F(W,Y,N):(L=Y.target||G,z.length?void j():F(null,Y,G))})};j()}(M(N),function L(z,j,W){return z?F(z,null,W):j.target?P.get(j.target,L):void F(null,l(j),W)})},P.update=function(N,F,L){P.get(N,function(z,j,W){return z?L(z):"/"===W?L(m.EPERM(W)):void P.put(W,v(j,F),L)})},P.put=function(N,F,L){P.writable(N,function(z,j){if(z)return L(z);A.put(E(j),l(F),{valueEncoding:"json"},L)})},P.del=function(N,F){if("/"===(N=M(N)))return process.nextTick(F.bind(null,m.EPERM(N)));A.del(E(N),F)},P}},90163:re=>{var u=function(p){return p?"string"==typeof p?new Date(p):p:new Date},g=function(p){this.uid=p.uid||0,this.gid=p.gid||0,this.mode=p.mode||0,this.size=p.size||0,this.mtime=u(p.mtime),this.atime=u(p.atime),this.ctime=u(p.ctime),this.type=p.type,this.target=p.target,this.link=p.link,this.blob=p.blob};g.prototype.isDirectory=function(){return"directory"===this.type},g.prototype.isFile=function(){return"file"===this.type},g.prototype.isBlockDevice=function(){return!1},g.prototype.isCharacterDevice=function(){return!1},g.prototype.isSymbolicLink=function(){return"symlink"===this.type},g.prototype.isFIFO=function(){return!1},g.prototype.isSocket=function(){return!1},re.exports=function(p){return new g(p)}},1077:(re,u,g)=>{var p=g(59069);re.exports=function(){var D={},w=new p.EventEmitter;return w.watch=function(_,l){return D[_]||(D[_]=new p.EventEmitter,D[_].setMaxListeners(0)),l&&D[_].on("change",l),D[_]},w.watcher=function(_,l){var v=new p.EventEmitter,m=function(){v.emit("change","change",_)};return w.watch(_,m),l&&v.on("change",l),v.close=function(){w.unwatch(_,m)},v},w.unwatch=function(_,l){D[_]&&(l?D[_].removeListener("change",l):D[_].removeAllListeners("change"),D[_].listeners("change").length||delete D[_])},w.change=function(_){D[_]&&D[_].emit("change"),w.emit("change",_)},w.cb=function(_,l){return function(v,m){_&&w.change(_),l&&l(v,m)}},w}},55860:(re,u,g)=>{var p=g(87241);re.exports=function(w){var _=(w=p(w)).reverse,l=w.max||w.end,v=w.min||w.start,m=[v,l];return null!=v&&null!=l&&m.sort(),_&&(m=m.reverse()),w.start=m[0],w.end=m[1],delete w.min,delete w.max,w}},87241:re=>{"use strict";function u(D){return Object.prototype.toString.call(D)}var g={isArray:function(D){return Array.isArray(D)||"object"==typeof D&&"[object Array]"===u(D)},isDate:function(D){return"object"==typeof D&&"[object Date]"===u(D)},isRegExp:function(D){return"object"==typeof D&&"[object RegExp]"===u(D)},getRegExpFlags:function(D){var w="";return D.global&&(w+="g"),D.ignoreCase&&(w+="i"),D.multiline&&(w+="m"),w}};function p(D,w,_,l){var v=[],m=[],b=typeof Buffer<"u";return typeof w>"u"&&(w=!0),typeof _>"u"&&(_=1/0),function M(E,A){if(null===E)return null;if(0==A)return E;var P,x;if("object"!=typeof E)return E;if(g.isArray(E))P=[];else if(g.isRegExp(E))P=new RegExp(E.source,g.getRegExpFlags(E)),E.lastIndex&&(P.lastIndex=E.lastIndex);else if(g.isDate(E))P=new Date(E.getTime());else{if(b&&Buffer.isBuffer(E))return P=new Buffer(E.length),E.copy(P),P;typeof l>"u"?(x=Object.getPrototypeOf(E),P=Object.create(x)):(P=Object.create(l),x=l)}if(w){var N=v.indexOf(E);if(-1!=N)return m[N];v.push(E),m.push(P)}for(var F in E){var L;x&&(L=Object.getOwnPropertyDescriptor(x,F)),(!L||null!=L.set)&&(P[F]=M(E[F],A-1))}return P}(D,_)}re.exports=p,p.clonePrototype=function(D){if(null===D)return null;var w=function(){};return w.prototype=D,new w}},71175:(re,u,g)=>{var p=g(77826);re.exports=function(D){if(!D.hooks){var w=[],_=[];D.hooks={post:function(N,F){F||(F=N,N="");var L={test:p.checker(N),hook:F};return w.push(L),b(w,L)},pre:function(N,F){F||(F=N,N="");var L={test:p.checker(N),hook:F,safe:!1!==N.safe};return _.push(L),b(_,L)},posthooks:w,prehooks:_},D.on("put",function(N,F){M({type:"put",key:N,value:F})}),D.on("del",function(N,F){M({type:"del",key:N,value:F})}),D.on("batch",function(F){F.forEach(M)});var E=D.put,A=D.del,P=D.batch;D.put=function(N,F,L,z){return x(!1,[{key:N,value:F,type:"put"}],L,z)},D.del=function(N,F,L){return x(!1,[{key:N,type:"del"}],F,L)},D.batch=function(N,F,L){return x(!0,N,F,L)}}function l(N){return N&&("string"==typeof N?N:"string"==typeof N.prefix?N.prefix:"function"==typeof N.prefix?N.prefix():"")}function b(N,F){return function(){var L=N.indexOf(F);return!!~L&&(N.splice(L,1),!0)}}function M(N){N&&N.type&&w.forEach(function(F){F.test(N.key)&&F.hook(N)})}function x(N,F,L,z){try{F.forEach(function W(Y,G){_.forEach(function(Q){if(Q.test(String(Y.key))){var q={add:function(J,H){if(typeof J>"u")return this;if(!1===J)return delete F[G];var te=l(J.prefix)||l(H)||Q.prefix||"";if(te&&(J.prefix=te),J.key=te+J.key,Q.safe&&Q.test(String(J.key)))throw new Error("prehook cannot insert into own range");var C=J.keyEncoding||function v(N){if(N&&N._getKeyEncoding)return N._getKeyEncoding(N)}(J.prefix),o=J.valueEncoding||function m(N){if(N&&N._getValueEncoding)return N._getValueEncoding(N)}(J.prefix);return C&&(J.keyEncoding=C),o&&(J.valueEncoding=o),F.push(J),W(J,F.length-1),this},put:function(J,H){return"object"==typeof J&&(J.type="put"),this.add(J,H)},del:function(J,H){return"object"==typeof J&&(J.type="del"),this.add(J,H)},veto:function(){return this.add(!1)}};Q.hook.call(q,Y,q.add,F)}})})}catch(W){return(z||L)(W)}if(1==(F=F.filter(function(W){return W&&W.type})).length&&!N){var j=F[0];return"put"==j.type?E.call(D,j.key,j.value,L,z):A.call(D,j.key,L,z)}return P.call(D,F,L,z)}}},77105:(re,u,g)=>{re.exports=b;var p=g(17294),D=g(30826).NI,w=g(26788),_=g(74148),l=g(40452),v=g(4205),m=g(28517);function b(E){if(!(this instanceof b))return new b(E);if(!E)throw new Error("constructor requires at least a location argument");this.IDBOptions={},this.location=E}w.inherits(b,D),b.prototype._open=function(E,A){var P=this,x={storeName:this.location,autoIncrement:!1,keyPath:null,onStoreReady:function(){A&&A(null,P.idb)},onError:function(N){A&&A(N)}};v(x,E),this.IDBOptions=x,this.idb=new p(x)},b.prototype._get=function(E,A,P){this.idb.get(E,function(x){if(void 0===x)return P(new Error("NotFound"));var N=!0;return!1===A.asBuffer&&(N=!1),A.raw&&(N=!1),N&&(x=x instanceof Uint8Array?m(x):new Buffer(String(x))),P(null,x,E)},P)},b.prototype._del=function(E,A,P){this.idb.remove(E,P,P)},b.prototype._put=function(E,A,P,x){A instanceof ArrayBuffer&&(A=m(new Uint8Array(A)));var N=this.convertEncoding(E,A,P);Buffer.isBuffer(N.value)&&("function"==typeof A.toArrayBuffer?N.value=new Uint8Array(A.toArrayBuffer()):N.value=new Uint8Array(A)),this.idb.put(N.key,N.value,function(){x()},x)},b.prototype.convertEncoding=function(E,A,P){if(P.raw)return{key:E,value:A};if(A){var x=A.toString();"NaN"===x&&(A="NaN")}var N=P.valueEncoding,F={key:E,value:A};return A&&(!N||"binary"!==N)&&"object"!=typeof F.value&&(F.value=x),F},b.prototype.iterator=function(E){return"object"!=typeof E&&(E={}),new _(this.idb,E)},b.prototype._batch=function(E,A,P){var N,F,L,z,j=[];if(0===E.length)return setTimeout(P,0);for(N=0;N{var p=g(26788),D=g(30826).YI,w=g(52820);function _(l,v){v||(v={}),this.options=v,D.call(this,l),this._order=v.reverse?"DESC":"ASC",this._limit=v.limit,this._count=0,this._done=!1;var m=w.lowerBound(v),b=w.upperBound(v);try{this._keyRange=m||b?this.db.makeKeyRange({lower:m,upper:b,excludeLower:w.lowerBoundExclusive(v),excludeUpper:w.upperBoundExclusive(v)}):null}catch{this._keyRangeError=!0}this.callback=null}re.exports=_,p.inherits(_,D),_.prototype.createIterator=function(){var l=this;l.iterator=l.db.iterate(function(){l.onItem.apply(l,arguments)},{keyRange:l._keyRange,autoContinue:!1,order:l._order,onError:function(v){console.log("horrible error",v)}})},_.prototype.onItem=function(l,v,m){if(!v&&this.callback)return this.callback(),void(this.callback=!1);var b=!0;this._limit&&this._limit>0&&this._count++>=this._limit&&(b=!1),b&&this.callback(!1,v.key,v.value),v&&v.continue()},_.prototype._next=function(l){return l?this._keyRangeError?l():(this._started||(this.createIterator(),this._started=!0),void(this.callback=l)):new Error("next() requires a callback argument")}},94442:re=>{var u=Object.prototype.hasOwnProperty,g=Object.prototype.toString,p=function(D){var w="function"==typeof D&&!(D instanceof RegExp)||"[object Function]"===g.call(D);return!w&&typeof window<"u"&&(w=D===window.setTimeout||D===window.alert||D===window.confirm||D===window.prompt),w};re.exports=function(w,_){if(!p(_))throw new TypeError("iterator must be a function");var l,v,m="string"==typeof w,b=w.length,M=arguments.length>2?arguments[2]:null;if(b===+b)for(l=0;l{re.exports=Object.keys||g(5741)},71133:re=>{var u=Object.prototype.toString;re.exports=function(p){var D=u.call(p),w="[object Arguments]"===D;return w||(w="[object Array]"!==D&&null!==p&&"object"==typeof p&&"number"==typeof p.length&&p.length>=0&&"[object Function]"===u.call(p.callee)),w}},5741:(re,u,g)=>{!function(){"use strict";var b,p=Object.prototype.hasOwnProperty,D=Object.prototype.toString,w=g(94442),_=g(71133),l=!{toString:null}.propertyIsEnumerable("toString"),v=function(){}.propertyIsEnumerable("prototype"),m=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];b=function(E){var A=null!==E&&"object"==typeof E,P="[object Function]"===D.call(E),x=_(E),N=[];if(!A&&!P&&!x)throw new TypeError("Object.keys called on a non-object");if(x)w(E,function(W){N.push(W)});else{var F,L=v&&P;for(F in E)(!L||"prototype"!==F)&&p.call(E,F)&&N.push(F)}if(l){var z=E.constructor,j=z&&z.prototype===E;w(m,function(W){(!j||"constructor"!==W)&&p.call(E,W)&&N.push(W)})}return N},re.exports=b}()},2968:re=>{re.exports=function u(g){return null!==g&&("object"==typeof g||"function"==typeof g)}},4205:(re,u,g)=>{var p=g(41638),D=g(2968);re.exports=function w(){for(var _={},l=0;l{var p=g(72426);function w(v,m,b){m.limit=m.reverse?2:1;(function D(v,m,b){var M=[];return m.forEach(function(E){function A(P){!1!==b(E,P)&&M.forEach(function(x){x()})}v.on(E,A),M.push(function(){v.removeListener(E,A)})}),v})(v.createReadStream(m),["data","error","end"],function(E,A){if(m.reverse&&A&&m.start&&A.key.toString()>m.start)return!1;"error"==E?b(A):"end"==E?b(new Error("range not found"),null,null):b(null,A.key,A.value)})}(u=re.exports=w).first=function _(v,m,b){return b||(b=m,m={}),m.reverse=!1,w(v,p(m),b)},u.last=function l(v,m,b){b||(b=m,m={});m.start;return m.reverse=!0,w(v,p(m),function(E,A,P){if(E){var x=m.start;m.start=null,w(v,m,function(N,F,L){if(!F)return b(E,null,null);var z=F.toString();z<=x&&(!m.end||z>=m.end)?b(N,F,L):b(E,null,null)})}else b(E,A,P)})}},72426:re=>{re.exports=function(g){var p=g.reverse,D=g.end,w=g.start,_=[w,D];return null!=w&&null!=D&&_.sort(),p&&(_=_.reverse()),g.start=_[0],g.end=_[1],g}},25904:re=>{function u(D,w,_,l){var v={type:D,key:w,value:_,options:l};return l&&l.prefix&&(v.prefix=l.prefix,delete l.prefix),this._operations.push(v),this}function g(D){this._operations=[],this._sdb=D,this.put=u.bind(this,"put"),this.del=u.bind(this,"del")}var p=g.prototype;p.clear=function(){this._operations=[]},p.write=function(D){this._sdb.batch(this._operations,D)},re.exports=g},74162:(re,u,g)=>{g(59069).EventEmitter,process.nextTick;var w=g(91399),_=g(25904),l=g(55860),v=g(71175);re.exports=function(m,b){function M(){}M.prototype=m;var E=new M;if(E.sublevel)return E;var A=(b=b||{}).sep=b.sep||"\xff";function P(N){return function(F){return(F=l(F=F||{})).reverse?F.start=F.start||A:F.end=F.end||A,N.call(E,F)}}E._options=b,v(E),E.sublevels={},E.sublevel=function(N,F){return E.sublevels[N]?E.sublevels[N]:new w(E,N,F||this._options)},E.methods={},E.prefix=function(N){return""+(N||"")},E.pre=function(N,F){return F||(F=N,N={max:A}),E.hooks.pre(N,F)},E.post=function(N,F){return F||(F=N,N={max:A}),E.hooks.post(N,F)},E.readStream=E.createReadStream=P(E.createReadStream),E.keyStream=E.createKeyStream=P(E.createKeyStream),E.valuesStream=E.createValueStream=P(E.createValueStream);var x=E.batch;return E.batch=function(N,F,L){if(!Array.isArray(N))return new _(E);N.forEach(function(z){z.prefix&&("function"==typeof z.prefix.prefix?z.key=z.prefix.prefix(z.key):"string"==typeof z.prefix&&(z.key=z.prefix+z.key))}),x.call(E,N,F,L)},E}},35510:(re,u,g)=>{re.exports=Object.keys||g(21079)},21079:(re,u,g)=>{!function(){"use strict";var v,p=Object.prototype.hasOwnProperty,D=g(55782),w=g(7480),_=!{toString:null}.propertyIsEnumerable("toString"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];v=function(b){if(!D.object(b)&&!D.array(b))throw new TypeError("Object.keys called on a non-object");var M,E=[];for(M in b)p.call(b,M)&&E.push(M);return _&&w(l,function(A){p.call(b,A)&&E.push(A)}),E},re.exports=v}()},41698:re=>{re.exports=function u(g){return null!==g&&("object"==typeof g||"function"==typeof g)}},34432:(re,u,g)=>{var p=g(35510),D=g(41698);re.exports=function w(){for(var _={},l=0;l{var p=g(59069).EventEmitter,D=g(26788).inherits,w=g(77826),_=g(55860),l=g(34432),v=g(25904);function m(P,x,N){if("string"==typeof N&&(console.error("db.sublevel(name, seperator) is depreciated"),console.error("use db.sublevel(name, {sep: separator})) if you must"),N={sep:N}),!(this instanceof m))return new m(P,x,N);if(!P)throw new Error("must provide db");if(!x)throw new Error("must provide prefix");(N=N||{}).sep=N.sep||"\xff",this._parent=P,this._options=N,this.options=N,this._prefix=x,this._root=E(this),P.sublevels[x]=this,this.sublevels={},this.methods={};var F=this;this.hooks={pre:function(){return F.pre.apply(F,arguments)},post:function(){return F.post.apply(F,arguments)}}}D(m,p);var b=m.prototype;function E(P){return P._parent?E(P._parent):P}b._key=function(P){var x=this._options.sep;return x+this._prefix+x+P},b._getOptsAndCb=function(P,x){return"function"==typeof P&&(x=P,P={}),{opts:l(P,this._options),cb:x}},b.sublevel=function(P,x){return this.sublevels[P]?this.sublevels[P]:new m(this,P,x||this._options)},b.put=function(P,x,N,F){var L=this._getOptsAndCb(N,F);this._root.put(this.prefix(P),x,L.opts,L.cb)},b.get=function(P,x,N){var F=this._getOptsAndCb(x,N);this._root.get(this.prefix(P),F.opts,F.cb)},b.del=function(P,x,N){var F=this._getOptsAndCb(x,N);this._root.del(this.prefix(P),F.opts,F.cb)},b.batch=function(P,x,N){if(!Array.isArray(P))return new v(this);var F=this,L=this._getOptsAndCb(x,N);P.forEach(function(z){"string"==typeof z.prefix?z.key=z.prefix+z.key:z.key=(z.prefix||F).prefix(z.key),z.prefix&&(z.prefix=null)}),this._root.batch(P,L.opts,L.cb)},b._getKeyEncoding=function(){return this.options.keyEncoding?this.options.keyEncoding:this._parent&&this._parent._getKeyEncoding?this._parent._getKeyEncoding():void 0},b._getValueEncoding=function(){return this.options.valueEncoding?this.options.valueEncoding:this._parent&&this._parent._getValueEncoding?this._parent._getValueEncoding():void 0},b.prefix=function(P){var x=this._options.sep;return this._parent.prefix()+x+this._prefix+x+(P||"")},b.keyStream=b.createKeyStream=function(P){return(P=P||{}).keys=!0,P.values=!1,this.createReadStream(P)},b.valueStream=b.createValueStream=function(P){return(P=P||{}).keys=!1,P.values=!0,P.keys=!1,this.createReadStream(P)},b.readStream=b.createReadStream=function(P){P=P||{};var x=E(this),N=this.prefix(),F=w.prefix(P,N);!function M(P,x){["valueEncoding","encoding","keyEncoding","reverse","values","keys","limit","fillCache"].forEach(function(N){x.hasOwnProperty(N)&&(P[N]=x[N])})}(F,l(P,this._options));var L=x.createReadStream(F);if(!1===F.values){var z;if(z=L.read)L.read=function(W){var Y=z.call(this,W);return Y&&(Y=Y.substring(N.length)),Y};else{var j=L.emit;L.emit=function(W,Y){"data"===W?j.call(this,"data",Y.substring(N.length)):j.call(this,W,Y)}}return L}return!1===F.keys||((z=L.read)?L.read=function(Y){var G=z.call(this,Y);return G&&(G.key=G.key.substring(N.length)),G}:L.on("data",function(Y){Y.key=Y.key.substring(N.length)})),L},b.writeStream=b.createWriteStream=function(){var P=E(this),x=this.prefix(),N=P.createWriteStream.apply(P,arguments),F=N.write,L=this._options.encoding,z=this._options.valueEncoding,j=this._options.keyEncoding,W=!L&&!z&&!j;return N.write=W?function(Y){return Y.key=x+Y.key,F.call(N,Y)}:function(Y){return Y.key=x+Y.key,L&&typeof Y.encoding>"u"&&(Y.encoding=L),z&&typeof Y.valueEncoding>"u"&&(Y.valueEncoding=z),j&&typeof Y.keyEncoding>"u"&&(Y.keyEncoding=j),F.call(N,Y)},N},b.approximateSize=function(){var P=E(db);return P.approximateSize.apply(P,arguments)},b.pre=function(P,x){x||(x=P,P=null),P=w.prefix(P,this.prefix(),this._options.sep);var N=E(this._parent),F=this.prefix();return N.hooks.pre(_(P),function(L,z,j){x({key:L.key.substring(F.length),value:L.value,type:L.type},function(W,Y){z(W,W.prefix?Y:Y||F)},j)})},b.post=function(P,x){x||(x=P,P=null);var N=E(this._parent),F=this.prefix();return P=w.prefix(P,F,this._options.sep),N.hooks.post(_(P),function(L){x({key:L.key.substring(F.length),value:L.value,type:L.type})})};re.exports=m},31238:(re,u,g)=>{var p=g(31404),D=g(24062).WriteError,w=p.getOptions,_=p.dispatchError;function l(v){this._levelup=v,this.batch=v.db.batch(),this.ops=[]}l.prototype.put=function(v,m,b){b=w(this._levelup,b);var M=p.encodeKey(v,b),E=p.encodeValue(m,b);try{this.batch.put(M,E)}catch(A){throw new D(A)}return this.ops.push({type:"put",key:M,value:E}),this},l.prototype.del=function(v,m){m=w(this._levelup,m);var b=p.encodeKey(v,m);try{this.batch.del(b)}catch(M){throw new D(M)}return this.ops.push({type:"del",key:b}),this},l.prototype.clear=function(){try{this.batch.clear()}catch(v){throw new D(v)}return this.ops=[],this},l.prototype.write=function(v){var m=this._levelup,b=this.ops;try{this.batch.write(function(M){if(M)return _(m,new D(M),v);m.emit("batch",b),v&&v()})}catch(M){throw new D(M)}},re.exports=l},24062:(re,u,g)=>{var p=g(3161).create,D=p("LevelUPError"),w=p("NotFoundError",D);w.prototype.notFound=!0,w.prototype.status=404,re.exports={LevelUPError:D,InitializationError:p("InitializationError",D),OpenError:p("OpenError",D),ReadError:p("ReadError",D),WriteError:p("WriteError",D),NotFoundError:w,EncodingError:p("EncodingError",D)}},4427:(re,u,g)=>{var p=g(59069).EventEmitter,D=g(26788).inherits,w=g(78677),_=g(3218),l=g(67125),v=g(24062).WriteError,m=g(24062).ReadError,b=g(24062).NotFoundError,M=g(24062).OpenError,E=g(24062).EncodingError,A=g(24062).InitializationError,P=g(31022),x=g(95011),N=g(31404),F=g(31238),L=N.getOptions,z=N.defaultOptions,j=N.getLevelDOWN,W=N.dispatchError;function Y(q,J){return"function"==typeof q?q:J}function G(q,J,H){if(!(this instanceof G))return new G(q,J,H);var te;if(p.call(this),this.setMaxListeners(1/0),"function"==typeof q?((J="object"==typeof J?J:{}).db=q,q=null):"object"==typeof q&&"function"==typeof q.db&&(J=q,q=null),"function"==typeof J&&(H=J,J={}),(!J||"function"!=typeof J.db)&&"string"!=typeof q){if(te=new A("Must provide a location for the database"),H)return process.nextTick(function(){H(te)});throw te}J=L(this,J),this.options=w(z,J),this._status="new",_(this,"location",q,"e"),this.open(H)}function Q(q){return function(J,H){j()[q](J,H||function(){})}}D(G,p),G.prototype.open=function(q){var H,te,J=this;return this.isOpen()?(q&&process.nextTick(function(){q(null,J)}),this):this._isOpening()?q&&this.once("open",function(){q(null,J)}):(this.emit("opening"),this._status="opening",this.db=new l(this.location),H=this.options.db||j(),void(te=H(this.location)).open(this.options,function(C){if(C)return W(J,new M(C),q);J.db.setDb(te),J.db=te,J._status="open",q&&q(null,J),J.emit("open"),J.emit("ready")}))},G.prototype.close=function(q){var J=this;if(this.isOpen())this._status="closing",this.db.close(function(){J._status="closed",J.emit("closed"),q&&q.apply(null,arguments)}),this.emit("closing"),this.db=null;else{if("closed"==this._status&&q)return process.nextTick(q);"closing"==this._status&&q?this.once("closed",q):this._isOpening()&&this.once("open",function(){J.close(q)})}},G.prototype.isOpen=function(){return"open"==this._status},G.prototype._isOpening=function(){return"opening"==this._status},G.prototype.isClosed=function(){return/^clos/.test(this._status)},G.prototype.get=function(q,J,H){var C,te=this;return"function"!=typeof(H=Y(J,H))?W(this,new m("get() requires key and callback arguments")):this._isOpening()||this.isOpen()?(J=N.getOptions(this,J),C=N.encodeKey(q,J),J.asBuffer=N.isValueAsBuffer(J),void this.db.get(C,J,function(o,s){if(o)return o=/notfound/i.test(o)?new b("Key not found in database ["+q+"]",o):new m(o),W(te,o,H);if(H){try{s=N.decodeValue(s,J)}catch(d){return H(new E(d))}H(null,s)}})):W(this,new m("Database is not open"),H)},G.prototype.put=function(q,J,H,te){var o,s,C=this;return te=Y(H,te),null==q||null==J?W(this,new v("put() requires key and value arguments"),te):this._isOpening()||this.isOpen()?(H=L(this,H),o=N.encodeKey(q,H),s=N.encodeValue(J,H),void this.db.put(o,s,H,function(d){if(d)return W(C,new v(d),te);C.emit("put",q,J),te&&te()})):W(this,new v("Database is not open"),te)},G.prototype.del=function(q,J,H){var C,te=this;return H=Y(J,H),null==q?W(this,new v("del() requires a key argument"),H):this._isOpening()||this.isOpen()?(J=L(this,J),C=N.encodeKey(q,J),void this.db.del(C,J,function(o){if(o)return W(te,new v(o),H);te.emit("del",q),H&&H()})):W(this,new v("Database is not open"),H)},G.prototype.batch=function(q,J,H){var C,o,s,te=this;return arguments.length?(H=Y(J,H),Array.isArray(q)?this._isOpening()||this.isOpen()?(J=L(this,J),C=J.keyEncoding,o=J.valueEncoding,s=q.map(function(d){if(void 0===d.type||void 0===d.key)return{};var k,h=d.keyEncoding||C,S=d.valueEncoding||d.encoding||o;return"utf8"!=h&&"binary"!=h||"utf8"!=S&&"binary"!=S?(k={type:d.type,key:N.encodeKey(d.key,J,d)},void 0!==d.value&&(k.value=N.encodeValue(d.value,J,d)),k):d}),void this.db.batch(s,J,function(d){if(d)return W(te,new v(d),H);te.emit("batch",q),H&&H()})):W(this,new v("Database is not open"),H):W(this,new v("batch() requires an array argument"),H)):new F(this)},G.prototype.approximateSize=function(q,J,H){var C,o,te=this;return null==q||null==J||"function"!=typeof H?W(this,new m("approximateSize() requires start, end and callback arguments"),H):(C=N.encodeKey(q,this.options),o=N.encodeKey(J,this.options),this._isOpening()||this.isOpen()?void this.db.approximateSize(C,o,function(s,d){if(s)return W(te,new M(s),H);H&&H(null,d)}):W(this,new v("Database is not open"),H))},G.prototype.readStream=G.prototype.createReadStream=function(q){var J=this;return q=w(this.options,q),new P(q,this,function(H){return J.db.iterator(H)})},G.prototype.keyStream=G.prototype.createKeyStream=function(q){return this.createReadStream(w(q,{keys:!0,values:!1}))},G.prototype.valueStream=G.prototype.createValueStream=function(q){return this.createReadStream(w(q,{keys:!1,values:!0}))},G.prototype.writeStream=G.prototype.createWriteStream=function(q){return new x(w(q),this)},G.prototype.toString=function(){return"LevelUP"},re.exports=G,re.exports.copy=N.copy,re.exports.destroy=Q("destroy"),re.exports.repair=Q("repair")},31022:(re,u,g)=>{var p=g(55717).Readable,D=g(26788).inherits,w=g(78677),_=g(24062).EncodingError,l=g(31404),v={keys:!0,values:!0},m=function(P,x){return{key:l.decodeKey(P,this._options),value:l.decodeValue(x,this._options)}},b=function(P){return l.decodeKey(P,this._options)},M=function(P,x){return l.decodeValue(x,this._options)},E=function(){return null};function A(P,x,N){if(!(this instanceof A))return new A(P,x,N);p.call(this,{objectMode:!0,highWaterMark:P.highWaterMark}),this._db=x,P=this._options=w(v,P),this._keyEncoding=P.keyEncoding||P.encoding,this._valueEncoding=P.valueEncoding||P.encoding,typeof this._options.start<"u"&&(this._options.start=l.encodeKey(this._options.start,this._options)),typeof this._options.end<"u"&&(this._options.end=l.encodeKey(this._options.end,this._options)),"number"!=typeof this._options.limit&&(this._options.limit=-1),this._options.keyAsBuffer=l.isKeyAsBuffer(this._options),this._options.valueAsBuffer=l.isValueAsBuffer(this._options),this._makeData=this._options.keys&&this._options.values?m:this._options.keys?b:this._options.values?M:E;var F=this;this._db.isOpen()?this._iterator=N(this._options):this._db.once("ready",function(){F._destroyed||(F._iterator=N(F._options))})}D(A,p),A.prototype._read=function P(){var x=this;if(!x._db.isOpen())return x._db.once("ready",function(){P.call(x)});x._destroyed||x._iterator.next(function(N,F,L){if(N||void 0===F&&void 0===L)return!N&&!x._destroyed&&x.push(null),x._cleanup(N);try{L=x._makeData(F,L)}catch(z){return x._cleanup(new _(z))}x._destroyed||x.push(L)})},A.prototype._cleanup=function(P){if(!this._destroyed){this._destroyed=!0;var x=this;P&&x.emit("error",P),x._iterator?x._iterator.end(function(){x._iterator=null,x.emit("close")}):x.emit("close")}},A.prototype.destroy=function(){this._cleanup()},A.prototype.toString=function(){return"LevelUP.ReadStream"},re.exports=A},31404:(re,u,g)=>{var l,Y,p=g(78677),D=g(24062).LevelUPError,w=["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le"],_={createIfMissing:!0,errorIfExists:!1,keyEncoding:"utf8",valueEncoding:"utf8",compression:!0},v=function(){function Y(Q){return null==Q||Buffer.isBuffer(Q)}var G={};return G.utf8=G["utf-8"]={encode:function(Q){return Y(Q)?Q:String(Q)},decode:function(Q){return Q},buffer:!1,type:"utf8"},G.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},w.forEach(function(Q){G[Q]||(G[Q]={encode:function(q){return Y(q)?q:new Buffer(q,Q)},decode:function(q){return process.browser?q.toString(Q):q},buffer:!0,type:Q})}),G}(),m=(Y={},w.forEach(function(G){Y[G]={valueEncoding:G}}),Y);function P(Y,G){var Q=G&&G.keyEncoding||Y.keyEncoding||"utf8";return v[Q]||Q}function x(Y,G){var Q=G&&(G.valueEncoding||G.encoding)||Y.valueEncoding||Y.encoding||"utf8";return v[Q]||Q}re.exports={defaultOptions:_,copy:function b(Y,G,Q){Y.readStream().pipe(G.writeStream()).on("close",Q||function(){}).on("error",Q||function(q){throw q})},getOptions:function M(Y,G){var Q="string"==typeof G;return!Q&&G&&G.encoding&&!G.valueEncoding&&(G.valueEncoding=G.encoding),p(Y&&Y.options||{},Q?m[G]||m[_.valueEncoding]:G)},getLevelDOWN:function E(){if(l)return l;var Q,Y=g(73619).v6.ct,G="Could not locate LevelDOWN, try `npm install leveldown`";try{Q=g(94093).version}catch{throw new D(G)}if(!g(61695).satisfies(Q,Y))throw new D("Installed version of LevelDOWN ("+Q+") does not match required version ("+Y+")");try{return l=g(70131)}catch{throw new D(G)}},dispatchError:function A(Y,G,Q){return"function"==typeof Q?Q(G):Y.emit("error",G)},encodeKey:function N(Y,G,Q){return P(G,Q).encode(Y)},encodeValue:function F(Y,G,Q){return x(G,Q).encode(Y)},isValueAsBuffer:function j(Y,G){return x(Y,G).buffer},isKeyAsBuffer:function W(Y,G){return P(Y,G).buffer},decodeValue:function z(Y,G){return x(G).decode(Y)},decodeKey:function L(Y,G){return P(G).decode(Y)}}},95011:(re,u,g)=>{var p=g(295).Stream,D=g(26788).inherits,w=g(78677),_=g(5259),l=global.setImmediate||process.nextTick,v=g(31404).getOptions,m={type:"put"};function b(M,E){if(!(this instanceof b))return new b(M,E);p.call(this),this._options=w(m,v(E,M)),this._db=E,this._buffer=[],this._status="init",this._end=!1,this.writable=!0,this.readable=!1;var A=this,P=function(){A.writable&&(A._status="ready",A.emit("ready"),A._process())};E.isOpen()?l(P):E.once("ready",P)}D(b,p),b.prototype.write=function(M){return!!this.writable&&(this._buffer.push(M),"init"!=this._status&&this._processDelayed(),!(this._options.maxBufferLength&&this._buffer.length>this._options.maxBufferLength)||(this._writeBlock=!0,!1))},b.prototype.end=function(M){var E=this;M&&this.write(M),l(function(){E._end=!0,E._process()})},b.prototype.destroy=function(){this.writable=!1,this.end()},b.prototype.destroySoon=function(){this.end()},b.prototype.add=function(M){if(M.props)return M.props.Directory?M.pipe(this._db.writeStream(this._options)):(M.props.File||M.File||"File"==M.type)&&this._write(M),!0},b.prototype._processDelayed=function(){var M=this;l(function(){M._process()})},b.prototype._process=function(){var M,E=this;if("ready"==E._status||!E.writable)return E._buffer.length&&E.writable?(E._status="writing",M=E._buffer,E._buffer=[],E._db.batch(M.map(function(P){return{type:P.type||E._options.type,key:P.key,value:P.value,keyEncoding:P.keyEncoding||E._options.keyEncoding,valueEncoding:P.valueEncoding||P.encoding||E._options.valueEncoding}}),function(P){if(E.writable){if("closed"!=E._status&&(E._status="ready"),P)return E.writable=!1,E.emit("error",P);E._process()}}),void(E._writeBlock&&(E._writeBlock=!1,E.emit("drain")))):void(E._end&&"closed"!=E._status&&(E._status="closed",E.writable=!1,E.emit("close")));E._buffer.length&&"closed"!=E._status&&E._processDelayed()},b.prototype._write=function(M){var E=M.path||M.props.path,A=this;E&&M.pipe(_(function(P,x){if(P)return A.writable=!1,A.emit("error",P);A._options.fstreamRoot&&E.indexOf(A._options.fstreamRoot)>-1&&(E=E.substr(A._options.fstreamRoot.length+1)),A.write({key:E,value:x.slice(0)})}))},b.prototype.toString=function(){return"LevelUP.WriteStream"},re.exports=b},5259:(re,u,g)=>{var p=g(55717).Duplex;function w(_){if(!(this instanceof w))return new w(_);if(this._bufs=[],this.length=0,"function"==typeof _){this._callback=_;var l=function(v){this._callback&&(this._callback(v),this._callback=null)}.bind(this);this.on("pipe",function(v){v.on("error",l)}),this.on("unpipe",function(v){v.removeListener("error",l)})}else Buffer.isBuffer(_)?this.append(_):Array.isArray(_)&&_.forEach(function(v){Buffer.isBuffer(v)&&this.append(v)}.bind(this));p.call(this)}g(26788).inherits(w,p),w.prototype._offset=function(_){for(var m,l=0,v=0;vthis.length)&&(m=this.length),v>=this.length)return _||new Buffer(0);if(m<=0)return _||new Buffer(0);var N,F,b=!!_,M=this._offset(v),E=m-v,A=E,P=b&&l||0,x=M[1];if(0===v&&m==this.length){if(!b)return Buffer.concat(this._bufs);for(F=0;F(N=this._bufs[F].length-x))){this._bufs[F].copy(_,P,x,x+A);break}this._bufs[F].copy(_,P,x),P+=N,A-=N,x&&(x=0)}return _},w.prototype.toString=function(_,l,v){return this.slice(l,v).toString(_)},w.prototype.consume=function(_){for(;this._bufs.length;){if(!(_>this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(_),this.length-=_;break}_-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},w.prototype.duplicate=function(){for(var _=0,l=new w;_{re.exports=l;var p=Object.keys||function(b){var M=[];for(var E in b)M.push(E);return M},D=g(26156);D.inherits=g(83894);var w=g(94515),_=g(23699);function l(b){if(!(this instanceof l))return new l(b);w.call(this,b),_.call(this,b),b&&!1===b.readable&&(this.readable=!1),b&&!1===b.writable&&(this.writable=!1),this.allowHalfOpen=!0,b&&!1===b.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",v)}function v(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}D.inherits(l,w),function m(b,M){for(var E=0,A=b.length;E{re.exports=w;var p=g(50596),D=g(26156);function w(_){if(!(this instanceof w))return new w(_);p.call(this,_)}D.inherits=g(83894),D.inherits(w,p),w.prototype._transform=function(_,l,v){v(null,_)}},94515:(re,u,g)=>{re.exports=b;var p=g(66425),D=g(93172).Buffer;b.ReadableState=m;var w=g(59069).EventEmitter;w.listenerCount||(w.listenerCount=function(o,s){return o.listeners(s).length});var v,_=g(295),l=g(26156);function m(o,s){var d=(o=o||{}).highWaterMark;this.highWaterMark=d||0===d?d:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!o.objectMode,this.defaultEncoding=o.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o.encoding&&(v||(v=g(15453).s),this.decoder=new v(o.encoding),this.encoding=o.encoding)}function b(o){if(!(this instanceof b))return new b(o);this._readableState=new m(o,this),this.readable=!0,_.call(this)}function M(o,s,d,h,S){var k=function N(o,s){var d=null;return!D.isBuffer(s)&&"string"!=typeof s&&null!=s&&!o.objectMode&&(d=new TypeError("Invalid non-string/buffer chunk")),d}(s,d);if(k)o.emit("error",k);else if(null==d)s.reading=!1,s.ended||function F(o,s){if(s.decoder&&!s.ended){var d=s.decoder.end();d&&d.length&&(s.buffer.push(d),s.length+=s.objectMode?1:d.length)}s.ended=!0,s.length>0?L(o):H(o)}(o,s);else if(s.objectMode||d&&d.length>0)if(s.ended&&!S){var B=new Error("stream.push() after EOF");o.emit("error",B)}else if(s.endEmitted&&S){B=new Error("stream.unshift() after end event");o.emit("error",B)}else s.decoder&&!S&&!h&&(d=s.decoder.write(d)),s.length+=s.objectMode?1:d.length,S?s.buffer.unshift(d):(s.reading=!1,s.buffer.push(d)),s.needReadable&&L(o),function j(o,s){s.readingMore||(s.readingMore=!0,process.nextTick(function(){!function W(o,s){for(var d=s.length;!s.reading&&!s.flowing&&!s.ended&&s.lengths.highWaterMark&&(s.highWaterMark=function P(o){if(o>=A)o=A;else{o--;for(var s=1;s<32;s<<=1)o|=o>>s;o++}return o}(o)),o>s.length?s.ended?s.length:(s.needReadable=!0,0):o)}function L(o){var s=o._readableState;s.needReadable=!1,!s.emittedReadable&&(s.emittedReadable=!0,s.sync?process.nextTick(function(){z(o)}):z(o))}function z(o){o.emit("readable")}function G(o){var d,s=o._readableState;function h(S,k,B){!1===S.write(d)&&s.awaitDrain++}for(s.awaitDrain=0;s.pipesCount&&null!==(d=o.read());)if(1===s.pipesCount?h(s.pipes):te(s.pipes,h),o.emit("data",d),s.awaitDrain>0)return;if(0===s.pipesCount)return s.flowing=!1,void(w.listenerCount(o,"data")>0&&q(o));s.ranOut=!0}function Q(){this._readableState.ranOut&&(this._readableState.ranOut=!1,G(this))}function q(o,s){if(o._readableState.flowing)throw new Error("Cannot switch to old mode now.");var h=s||!1,S=!1;o.readable=!0,o.pipe=_.prototype.pipe,o.on=o.addListener=_.prototype.on,o.on("readable",function(){S=!0;for(var k;!h&&null!==(k=o.read());)o.emit("data",k);null===k&&(S=!1,o._readableState.needReadable=!0)}),o.pause=function(){h=!0,this.emit("pause")},o.resume=function(){h=!1,S?process.nextTick(function(){o.emit("readable")}):this.read(0),this.emit("resume")},o.emit("readable")}function J(o,s){var B,d=s.buffer,h=s.length,S=!!s.decoder,k=!!s.objectMode;if(0===d.length)return null;if(0===h)B=null;else if(k)B=d.shift();else if(!o||o>=h)B=S?d.join(""):D.concat(d,h),d.length=0;else if(o0)throw new Error("endReadable called on non-empty stream");!s.endEmitted&&s.calledRead&&(s.ended=!0,process.nextTick(function(){!s.endEmitted&&0===s.length&&(s.endEmitted=!0,o.readable=!1,o.emit("end"))}))}function te(o,s){for(var d=0,h=o.length;d0)&&(s.emittedReadable=!1),0===o&&s.needReadable&&(s.length>=s.highWaterMark||s.ended))return L(this),null;if(0===(o=x(o,s))&&s.ended)return h=null,s.length>0&&s.decoder&&(h=J(o,s),s.length-=h.length),0===s.length&&H(this),h;var S=s.needReadable;return s.length-o<=s.highWaterMark&&(S=!0),(s.ended||s.reading)&&(S=!1),S&&(s.reading=!0,s.sync=!0,0===s.length&&(s.needReadable=!0),this._read(s.highWaterMark),s.sync=!1),S&&!s.reading&&(o=x(d,s)),null===(h=o>0?J(o,s):null)&&(s.needReadable=!0,o=0),s.length-=o,0===s.length&&!s.ended&&(s.needReadable=!0),s.ended&&!s.endEmitted&&0===s.length&&H(this),h},b.prototype._read=function(o){this.emit("error",new Error("not implemented"))},b.prototype.pipe=function(o,s){var d=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=o;break;case 1:h.pipes=[h.pipes,o];break;default:h.pipes.push(o)}h.pipesCount+=1;var k=(!s||!1!==s.end)&&o!==process.stdout&&o!==process.stderr?I:R;function B(Ce){Ce===d&&R()}function I(){o.end()}h.endEmitted?process.nextTick(k):d.once("end",k),o.on("unpipe",B);var f=function Y(o){return function(){var d=o._readableState;d.awaitDrain--,0===d.awaitDrain&&G(o)}}(d);function R(){o.removeListener("close",ee),o.removeListener("finish",oe),o.removeListener("drain",f),o.removeListener("error",se),o.removeListener("unpipe",B),d.removeListener("end",I),d.removeListener("end",R),(!o._writableState||o._writableState.needDrain)&&f()}function se(Ce){de(),o.removeListener("error",se),0===w.listenerCount(o,"error")&&o.emit("error",Ce)}function ee(){o.removeListener("finish",oe),de()}function oe(){o.removeListener("close",ee),de()}function de(){d.unpipe(o)}return o.on("drain",f),o._events&&o._events.error?p(o._events.error)?o._events.error.unshift(se):o._events.error=[se,o._events.error]:o.on("error",se),o.once("close",ee),o.once("finish",oe),o.emit("pipe",d),h.flowing||(this.on("readable",Q),h.flowing=!0,process.nextTick(function(){G(d)})),o},b.prototype.unpipe=function(o){var s=this._readableState;if(0===s.pipesCount)return this;if(1===s.pipesCount)return o&&o!==s.pipes||(o||(o=s.pipes),s.pipes=null,s.pipesCount=0,this.removeListener("readable",Q),s.flowing=!1,o&&o.emit("unpipe",this)),this;if(!o){var d=s.pipes,h=s.pipesCount;s.pipes=null,s.pipesCount=0,this.removeListener("readable",Q),s.flowing=!1;for(var S=0;S"u"&&(this[S]=function(B){return function(){return o[B].apply(o,arguments)}}(S));return te(["error","close","destroy","pause","resume"],function(B){o.on(B,h.emit.bind(h,B))}),h._read=function(B){d&&(d=!1,o.resume())},h},b._fromList=J},50596:(re,u,g)=>{re.exports=l;var p=g(66958),D=g(26156);function w(m,b){this.afterTransform=function(M,E){return function _(m,b,M){var E=m._transformState;E.transforming=!1;var A=E.writecb;if(!A)return m.emit("error",new Error("no writecb in Transform class"));E.writechunk=null,E.writecb=null,null!=M&&m.push(M),A&&A(b);var P=m._readableState;P.reading=!1,(P.needReadable||P.length{re.exports=v;var p=g(93172).Buffer;v.WritableState=l;var D=g(26156);D.inherits=g(83894);var w=g(295);function _(G,Q,q){this.chunk=G,this.encoding=Q,this.callback=q}function l(G,Q){var q=(G=G||{}).highWaterMark;this.highWaterMark=q||0===q?q:16384,this.objectMode=!!G.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var J=!1===G.decodeStrings;this.decodeStrings=!J,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){!function N(G,Q){var q=G._writableState,J=q.sync,H=q.writecb;if(function x(G){G.writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0}(q),Q)!function P(G,Q,q,J,H){q?process.nextTick(function(){H(J)}):H(J),G._writableState.errorEmitted=!0,G.emit("error",J)}(G,0,J,Q,H);else{var te=j(G,q);!te&&!q.bufferProcessing&&q.buffer.length&&function z(G,Q){Q.bufferProcessing=!0;for(var q=0;q{var p=g(295);(u=re.exports=g(94515)).Stream=p,u.Readable=u,u.Writable=g(23699),u.Duplex=g(66958),u.Transform=g(50596),u.PassThrough=g(44467),!process.browser&&"disable"===process.env.READABLE_STREAM&&(re.exports=g(295))},88222:(re,u,g)=>{re=g.nmd(re);var p=200,D="__lodash_hash_undefined__",w=1,_=2,l=9007199254740991,v="[object Arguments]",m="[object Array]",b="[object AsyncFunction]",M="[object Boolean]",E="[object Date]",A="[object Error]",P="[object Function]",x="[object GeneratorFunction]",N="[object Map]",F="[object Number]",L="[object Null]",z="[object Object]",j="[object Promise]",W="[object Proxy]",Y="[object RegExp]",G="[object Set]",Q="[object String]",q="[object Symbol]",J="[object Undefined]",H="[object WeakMap]",te="[object ArrayBuffer]",C="[object DataView]",se=/^\[object .+?Constructor\]$/,ee=/^(?:0|[1-9]\d*)$/,oe={};oe["[object Float32Array]"]=oe["[object Float64Array]"]=oe["[object Int8Array]"]=oe["[object Int16Array]"]=oe["[object Int32Array]"]=oe["[object Uint8Array]"]=oe["[object Uint8ClampedArray]"]=oe["[object Uint16Array]"]=oe["[object Uint32Array]"]=!0,oe[v]=oe[m]=oe[te]=oe[M]=oe[C]=oe[E]=oe[A]=oe[P]=oe[N]=oe[F]=oe[z]=oe[Y]=oe[G]=oe[Q]=oe[H]=!1;var de="object"==typeof global&&global&&global.Object===Object&&global,Ce="object"==typeof self&&self&&self.Object===Object&&self,ye=de||Ce||Function("return this")(),ve=u&&!u.nodeType&&u,ae=ve&&re&&!re.nodeType&&re,fe=ae&&ae.exports===ve,pe=fe&&de.process,Se=function(){try{return pe&&pe.binding&&pe.binding("util")}catch{}}(),ce=Se&&Se.isTypedArray;function Fe(et,_t){for(var en=-1,Cn=null==et?0:et.length;++enri))return!1;var Zr=cr.get(et);if(Zr&&cr.get(_t))return Zr==_t;var $n=-1,so=!0,Ci=en&_?new Ut:void 0;for(cr.set(et,_t),cr.set(_t,et);++$n-1},qe.prototype.set=function Pt(et,_t){var en=this.__data__,Cn=jt(en,et);return Cn<0?(++this.size,en.push([et,_t])):en[Cn][1]=_t,this},Lt.prototype.clear=function nn(){this.size=0,this.__data__={hash:new Me,map:new(vt||qe),string:new Me}},Lt.prototype.delete=function Yt(et){var _t=wr(this,et).delete(et);return this.size-=_t?1:0,_t},Lt.prototype.get=function gn(et){return wr(this,et).get(et)},Lt.prototype.has=function an(et){return wr(this,et).has(et)},Lt.prototype.set=function tn(et,_t){var en=wr(this,et),Cn=en.size;return en.set(et,_t),this.size+=en.size==Cn?0:1,this},Ut.prototype.add=Ut.prototype.push=function cn(et){return this.__data__.set(et,D),this},Ut.prototype.has=function Jt(et){return this.__data__.has(et)},Zt.prototype.clear=function fn(){this.__data__=new qe,this.size=0},Zt.prototype.delete=function Qt(et){var _t=this.__data__,en=_t.delete(et);return this.size=_t.size,en},Zt.prototype.get=function Dt(et){return this.__data__.get(et)},Zt.prototype.has=function Mt(et){return this.__data__.has(et)},Zt.prototype.set=function Xt(et,_t){var en=this.__data__;if(en instanceof qe){var Cn=en.__data__;if(!vt||Cn.length-1&&et%1==0&&et<_t}function go(et){if(null!=et){try{return Ae.call(et)}catch{}try{return et+""}catch{}}return""}function as(et,_t){return et===_t||et!=et&&_t!=_t}(pt&&Sr(new pt(new ArrayBuffer(1)))!=C||vt&&Sr(new vt)!=N||$t&&Sr($t.resolve())!=j||dt&&Sr(new dt)!=G||gt&&Sr(new gt)!=H)&&(Sr=function(et){var _t=On(et),en=_t==z?et.constructor:void 0,Cn=en?go(en):"";if(Cn)switch(Cn){case ut:return C;case wt:return N;case Sn:return j;case yt:return G;case Et:return H}return _t});var us=Kn(function(){return arguments}())?Kn:function(et){return nu(et)&&Te.call(et,"callee")&&!ft.call(et,"callee")},zo=Array.isArray;var _a=Qe||function Wp(){return!1};function Lf(et){if(!tu(et))return!1;var _t=On(et);return _t==P||_t==x||_t==b||_t==W}function Dl(et){return"number"==typeof et&&et>-1&&et%1==0&&et<=l}function tu(et){var _t=typeof et;return null!=et&&("object"==_t||"function"==_t)}function nu(et){return null!=et&&"object"==typeof et}var Cl=ce?function Ge(et){return function(_t){return et(_t)}}(ce):function Jn(et){return nu(et)&&Dl(et.length)&&!!oe[On(et)]};function Il(et){return function Ku(et){return null!=et&&Dl(et.length)&&!Lf(et)}(et)?Ft(et):ur(et)}re.exports=function cs(et,_t){return jn(et,_t)}},52820:(re,u)=>{function g(P){return void 0!==P&&""!==P}function p(P,x){return Object.hasOwnProperty.call(P,x)}function D(P,x){return Object.hasOwnProperty.call(P,x)&&x}u.compare=function(P,x){if(Buffer.isBuffer(P)){for(var N=Math.min(P.length,x.length),F=0;Fx?1:0};var w=u.lowerBoundKey=function(P){return D(P,"gt")||D(P,"gte")||D(P,"min")||(P.reverse?D(P,"end"):D(P,"start"))||void 0},_=u.lowerBound=function(P,x){var N=w(P);return N?P[N]:x},l=u.lowerBoundInclusive=function(P){return!p(P,"gt")},v=u.upperBoundInclusive=function(P){return!p(P,"lt")},m=u.lowerBoundExclusive=function(P){return!l(P)},b=u.upperBoundExclusive=function(P){return!v(P)},M=u.upperBoundKey=function(P){return D(P,"lt")||D(P,"lte")||D(P,"max")||(P.reverse?D(P,"start"):D(P,"end"))||void 0},E=u.upperBound=function(P,x){var N=M(P);return N?P[N]:x};function A(P){return P}u.start=function(P,x){return P.reverse?E(P,x):_(P,x)},u.end=function(P,x){return P.reverse?_(P,x):E(P,x)},u.startInclusive=function(P){return P.reverse?v(P):l(P)},u.endInclusive=function(P){return P.reverse?l(P):v(P)},u.toLtgt=function(P,x,N,F,L){x=x||{},N=N||A;var z=arguments.length>3,j=u.lowerBoundKey(P),W=u.upperBoundKey(P);return j?"gt"===j?x.gt=N(P.gt,!1):x.gte=N(P[j],!1):z&&(x.gte=N(F,!1)),W?"lt"===W?x.lt=N(P.lt,!0):x.lte=N(P[W],!0):z&&(x.lte=N(L,!0)),null!=P.reverse&&(x.reverse=!!P.reverse),p(x,"max")&&delete x.max,p(x,"min")&&delete x.min,p(x,"start")&&delete x.start,p(x,"end")&&delete x.end,x},u.contains=function(P,x,N){N=N||u.compare;var F=_(P);if(g(F)&&((L=N(x,F))<0||0===L&&m(P)))return!1;var L,z=E(P);if(g(z)&&((L=N(x,z))>0||0===L&&b(P)))return!1;return!0},u.filter=function(P,x){return function(N){return u.contains(P,N,x)}}},8095:(re,u,g)=>{"use strict";var p=g(83894),D=g(39650),w=g(73502).Buffer,_=new Array(16);function l(){D.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function v(A,P){return A<>>32-P}function m(A,P,x,N,F,L,z){return v(A+(P&x|~P&N)+F+L|0,z)+P|0}function b(A,P,x,N,F,L,z){return v(A+(P&N|x&~N)+F+L|0,z)+P|0}function M(A,P,x,N,F,L,z){return v(A+(P^x^N)+F+L|0,z)+P|0}function E(A,P,x,N,F,L,z){return v(A+(x^(P|~N))+F+L|0,z)+P|0}p(l,D),l.prototype._update=function(){for(var A=_,P=0;P<16;++P)A[P]=this._block.readInt32LE(4*P);var x=this._a,N=this._b,F=this._c,L=this._d;x=m(x,N,F,L,A[0],3614090360,7),L=m(L,x,N,F,A[1],3905402710,12),F=m(F,L,x,N,A[2],606105819,17),N=m(N,F,L,x,A[3],3250441966,22),x=m(x,N,F,L,A[4],4118548399,7),L=m(L,x,N,F,A[5],1200080426,12),F=m(F,L,x,N,A[6],2821735955,17),N=m(N,F,L,x,A[7],4249261313,22),x=m(x,N,F,L,A[8],1770035416,7),L=m(L,x,N,F,A[9],2336552879,12),F=m(F,L,x,N,A[10],4294925233,17),N=m(N,F,L,x,A[11],2304563134,22),x=m(x,N,F,L,A[12],1804603682,7),L=m(L,x,N,F,A[13],4254626195,12),F=m(F,L,x,N,A[14],2792965006,17),x=b(x,N=m(N,F,L,x,A[15],1236535329,22),F,L,A[1],4129170786,5),L=b(L,x,N,F,A[6],3225465664,9),F=b(F,L,x,N,A[11],643717713,14),N=b(N,F,L,x,A[0],3921069994,20),x=b(x,N,F,L,A[5],3593408605,5),L=b(L,x,N,F,A[10],38016083,9),F=b(F,L,x,N,A[15],3634488961,14),N=b(N,F,L,x,A[4],3889429448,20),x=b(x,N,F,L,A[9],568446438,5),L=b(L,x,N,F,A[14],3275163606,9),F=b(F,L,x,N,A[3],4107603335,14),N=b(N,F,L,x,A[8],1163531501,20),x=b(x,N,F,L,A[13],2850285829,5),L=b(L,x,N,F,A[2],4243563512,9),F=b(F,L,x,N,A[7],1735328473,14),x=M(x,N=b(N,F,L,x,A[12],2368359562,20),F,L,A[5],4294588738,4),L=M(L,x,N,F,A[8],2272392833,11),F=M(F,L,x,N,A[11],1839030562,16),N=M(N,F,L,x,A[14],4259657740,23),x=M(x,N,F,L,A[1],2763975236,4),L=M(L,x,N,F,A[4],1272893353,11),F=M(F,L,x,N,A[7],4139469664,16),N=M(N,F,L,x,A[10],3200236656,23),x=M(x,N,F,L,A[13],681279174,4),L=M(L,x,N,F,A[0],3936430074,11),F=M(F,L,x,N,A[3],3572445317,16),N=M(N,F,L,x,A[6],76029189,23),x=M(x,N,F,L,A[9],3654602809,4),L=M(L,x,N,F,A[12],3873151461,11),F=M(F,L,x,N,A[15],530742520,16),x=E(x,N=M(N,F,L,x,A[2],3299628645,23),F,L,A[0],4096336452,6),L=E(L,x,N,F,A[7],1126891415,10),F=E(F,L,x,N,A[14],2878612391,15),N=E(N,F,L,x,A[5],4237533241,21),x=E(x,N,F,L,A[12],1700485571,6),L=E(L,x,N,F,A[3],2399980690,10),F=E(F,L,x,N,A[10],4293915773,15),N=E(N,F,L,x,A[1],2240044497,21),x=E(x,N,F,L,A[8],1873313359,6),L=E(L,x,N,F,A[15],4264355552,10),F=E(F,L,x,N,A[6],2734768916,15),N=E(N,F,L,x,A[13],1309151649,21),x=E(x,N,F,L,A[4],4149444226,6),L=E(L,x,N,F,A[11],3174756917,10),F=E(F,L,x,N,A[2],718787259,15),N=E(N,F,L,x,A[9],3951481745,21),this._a=this._a+x|0,this._b=this._b+N|0,this._c=this._c+F|0,this._d=this._d+L|0},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var A=w.allocUnsafe(16);return A.writeInt32LE(this._a,0),A.writeInt32LE(this._b,4),A.writeInt32LE(this._c,8),A.writeInt32LE(this._d,12),A},re.exports=l},17079:(re,u,g)=>{var p=g(1378),D=g(37950);function w(_){this.rand=_||new D.Rand}re.exports=w,w.create=function(l){return new w(l)},w.prototype._randbelow=function(l){var v=l.bitLength(),m=Math.ceil(v/8);do{var b=new p(this.rand.generate(m))}while(b.cmp(l)>=0);return b},w.prototype._randrange=function(l,v){var m=v.sub(l);return l.add(this._randbelow(m))},w.prototype.test=function(l,v,m){var b=l.bitLength(),M=p.mont(l),E=new p(1).toRed(M);v||(v=Math.max(1,b/48|0));for(var A=l.subn(1),P=0;!A.testn(P);P++);for(var x=l.shrn(P),N=A.toRed(M);v>0;v--){var L=this._randrange(new p(2),A);m&&m(L);var z=L.toRed(M).redPow(x);if(0!==z.cmp(E)&&0!==z.cmp(N)){for(var j=1;j0;v--){var N=this._randrange(new p(2),E),F=l.gcd(N);if(0!==F.cmpn(1))return F;var L=N.toRed(b).redPow(P);if(0!==L.cmp(M)&&0!==L.cmp(x)){for(var z=1;z=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(C,o,s){var d=m(C,s);return s-1>=o&&(d|=m(C,s-1)<<4),d}function M(C,o,s,d){for(var h=0,S=Math.min(C.length,s),k=o;k=49?B-49+10:B>=17?B-17+10:B}return h}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,s){return o.cmp(s)>0?o:s},l.min=function(o,s){return o.cmp(s)<0?o:s},l.prototype._init=function(o,s,d){if("number"==typeof o)return this._initNumber(o,s,d);if("object"==typeof o)return this._initArray(o,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=o[h]|o[h-1]<<8|o[h-2]<<16,this.words[S]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);else if("le"===d)for(h=0,S=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);return this.strip()},l.prototype._parseHex=function(o,s,d){this.length=Math.ceil((o.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(o,s,h)<=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;else for(h=(o.length-s)%2==0?s+1:s;h=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;this.strip()},l.prototype._parseBase=function(o,s,d){this.words=[0],this.length=1;for(var h=0,S=1;S<=67108863;S*=s)h++;h--,S=S/s|0;for(var k=o.length-d,B=k%h,I=Math.min(k,k-B)+d,f=0,R=d;R1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var E=["","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"],A=[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 N(C,o,s){s.negative=o.negative^C.negative;var d=C.length+o.length|0;s.length=d,d=d-1|0;var h=0|C.words[0],S=0|o.words[0],k=h*S,B=67108863&k,I=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&I,ee=Math.min(f,o.length-1),oe=Math.max(0,f-C.length+1);oe<=ee;oe++){var de=f-oe|0;R+=(k=(h=0|C.words[de])*(S=0|o.words[oe])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,I=0|R}return 0!==I?s.words[f]=0|I:s.length--,s.strip()}l.prototype.toString=function(o,s){var d;if(s=0|s||1,16===(o=o||10)||"hex"===o){d="";for(var h=0,S=0,k=0;k>>24-h&16777215)||k!==this.length-1?E[6-I.length]+I+d:I+d,(h+=2)>=26&&(h-=26,k--)}for(0!==S&&(d=S.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],R=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var ee=se.modn(R).toString(o);d=(se=se.idivn(R)).isZero()?ee+d:E[f-ee.length]+ee+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,s){return w(typeof v<"u"),this.toArrayLike(v,o,s)},l.prototype.toArray=function(o,s){return this.toArrayLike(Array,o,s)},l.prototype.toArrayLike=function(o,s,d){var h=this.byteLength(),S=d||Math.max(1,h);w(h<=S,"byte array longer than desired length"),w(S>0,"Requested array length <= 0"),this.strip();var I,f,k="le"===s,B=new o(S),R=this.clone();if(k){for(f=0;!R.isZero();f++)I=R.andln(255),R.iushrn(8),B[f]=I;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},l.prototype._zeroBits=function(o){if(0===o)return 26;var s=o,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],s=this._countBits(o);return 26*(this.length-1)+s},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,s=0;so.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var s;s=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var s,d;this.length>o.length?(s=this,d=o):(s=o,d=this);for(var h=0;ho.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var s=0|Math.ceil(o/26),d=o%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,s){w("number"==typeof o&&o>=0);var d=o/26|0,h=o%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<o.length?(d=this,h=o):(d=o,h=this);for(var S=0,k=0;k>>26;for(;0!==S&&k>>26;if(this.length=d.length,0!==S)this.words[this.length]=S,this.length++;else if(d!==this)for(;ko.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var s=this.iadd(o);return o.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var h,S,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,S=o):(h=o,S=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Se=8191&pe,ce=pe>>>13,be=0|h[4],Pe=8191&be,Fe=be>>>13,lt=0|h[5],Ge=8191<,He=lt>>>13,Kt=0|h[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|h[7],ot=8191&Vt,at=Vt>>>13,Gt=0|h[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|h[9],Be=8191&Te,Ve=Te>>>13,mt=0|S[0],Ze=8191&mt,ct=mt>>>13,hn=0|S[1],ft=8191&hn,At=hn>>>13,wn=0|S[2],ze=8191&wn,Qe=wn>>>13,Ht=0|S[3],pt=8191&Ht,vt=Ht>>>13,$t=0|S[4],dt=8191&$t,gt=$t>>>13,mn=0|S[5],ut=8191&mn,wt=mn>>>13,Sn=0|S[6],yt=8191&Sn,Et=Sn>>>13,_e=0|S[7],Ee=8191&_e,Me=_e>>>13,me=0|S[8],Oe=8191&me,Ke=me>>>13,it=0|S[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^s.negative,d.length=19;var Bt=(B+(I=Math.imul(ee,Ze))|0)+((8191&(f=(f=Math.imul(ee,ct))+Math.imul(oe,Ze)|0))<<13)|0;B=((R=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,I=Math.imul(Ce,Ze),f=(f=Math.imul(Ce,ct))+Math.imul(ye,Ze)|0,R=Math.imul(ye,ct);var Ct=(B+(I=I+Math.imul(ee,ft)|0)|0)+((8191&(f=(f=f+Math.imul(ee,At)|0)+Math.imul(oe,ft)|0))<<13)|0;B=((R=R+Math.imul(oe,At)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,I=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,R=Math.imul(fe,ct),I=I+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,ft)|0,R=R+Math.imul(ye,At)|0;var kt=(B+(I=I+Math.imul(ee,ze)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;B=((R=R+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,I=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,R=Math.imul(ce,ct),I=I+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,R=R+Math.imul(fe,At)|0,I=I+Math.imul(Ce,ze)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,ze)|0,R=R+Math.imul(ye,Qe)|0;var Ot=(B+(I=I+Math.imul(ee,pt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;B=((R=R+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,I=Math.imul(Pe,Ze),f=(f=Math.imul(Pe,ct))+Math.imul(Fe,Ze)|0,R=Math.imul(Fe,ct),I=I+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,R=R+Math.imul(ce,At)|0,I=I+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,R=R+Math.imul(fe,Qe)|0,I=I+Math.imul(Ce,pt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,pt)|0,R=R+Math.imul(ye,vt)|0;var Pt=(B+(I=I+Math.imul(ee,dt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;B=((R=R+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,I=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,R=Math.imul(He,ct),I=I+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Fe,ft)|0,R=R+Math.imul(Fe,At)|0,I=I+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,R=R+Math.imul(ce,Qe)|0,I=I+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,R=R+Math.imul(fe,vt)|0,I=I+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,dt)|0,R=R+Math.imul(ye,gt)|0;var Lt=(B+(I=I+Math.imul(ee,ut)|0)|0)+((8191&(f=(f=f+Math.imul(ee,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;B=((R=R+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,I=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,R=Math.imul(nt,ct),I=I+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,R=R+Math.imul(He,At)|0,I=I+Math.imul(Pe,ze)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Fe,ze)|0,R=R+Math.imul(Fe,Qe)|0,I=I+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,R=R+Math.imul(ce,vt)|0,I=I+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,R=R+Math.imul(fe,gt)|0,I=I+Math.imul(Ce,ut)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ut)|0,R=R+Math.imul(ye,wt)|0;var nn=(B+(I=I+Math.imul(ee,yt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;B=((R=R+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,I=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,R=Math.imul(at,ct),I=I+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,R=R+Math.imul(nt,At)|0,I=I+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,R=R+Math.imul(He,Qe)|0,I=I+Math.imul(Pe,pt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Fe,pt)|0,R=R+Math.imul(Fe,vt)|0,I=I+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,R=R+Math.imul(ce,gt)|0,I=I+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,R=R+Math.imul(fe,wt)|0,I=I+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,Et)|0)+Math.imul(ye,yt)|0,R=R+Math.imul(ye,Et)|0;var Yt=(B+(I=I+Math.imul(ee,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;B=((R=R+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,I=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,R=Math.imul(Ae,ct),I=I+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,R=R+Math.imul(at,At)|0,I=I+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,R=R+Math.imul(nt,Qe)|0,I=I+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,R=R+Math.imul(He,vt)|0,I=I+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Fe,dt)|0,R=R+Math.imul(Fe,gt)|0,I=I+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,R=R+Math.imul(ce,wt)|0,I=I+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,R=R+Math.imul(fe,Et)|0,I=I+Math.imul(Ce,Ee)|0,f=(f=f+Math.imul(Ce,Me)|0)+Math.imul(ye,Ee)|0,R=R+Math.imul(ye,Me)|0;var gn=(B+(I=I+Math.imul(ee,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;B=((R=R+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,I=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,R=Math.imul(Ve,ct),I=I+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,R=R+Math.imul(Ae,At)|0,I=I+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,R=R+Math.imul(at,Qe)|0,I=I+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,R=R+Math.imul(nt,vt)|0,I=I+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,R=R+Math.imul(He,gt)|0,I=I+Math.imul(Pe,ut)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Fe,ut)|0,R=R+Math.imul(Fe,wt)|0,I=I+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,R=R+Math.imul(ce,Et)|0,I=I+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,R=R+Math.imul(fe,Me)|0,I=I+Math.imul(Ce,Oe)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,Oe)|0,R=R+Math.imul(ye,Ke)|0;var an=(B+(I=I+Math.imul(ee,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ee,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;B=((R=R+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,I=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,R=Math.imul(Ve,At),I=I+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,R=R+Math.imul(Ae,Qe)|0,I=I+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,R=R+Math.imul(at,vt)|0,I=I+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,R=R+Math.imul(nt,gt)|0,I=I+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,R=R+Math.imul(He,wt)|0,I=I+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,Et)|0)+Math.imul(Fe,yt)|0,R=R+Math.imul(Fe,Et)|0,I=I+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,R=R+Math.imul(ce,Me)|0,I=I+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,R=R+Math.imul(fe,Ke)|0;var tn=(B+(I=I+Math.imul(Ce,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;B=((R=R+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,I=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,R=Math.imul(Ve,Qe),I=I+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,R=R+Math.imul(Ae,vt)|0,I=I+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,R=R+Math.imul(at,gt)|0,I=I+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,R=R+Math.imul(nt,wt)|0,I=I+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,R=R+Math.imul(He,Et)|0,I=I+Math.imul(Pe,Ee)|0,f=(f=f+Math.imul(Pe,Me)|0)+Math.imul(Fe,Ee)|0,R=R+Math.imul(Fe,Me)|0,I=I+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,R=R+Math.imul(ce,Ke)|0;var Ut=(B+(I=I+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,I=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,R=Math.imul(Ve,vt),I=I+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,R=R+Math.imul(Ae,gt)|0,I=I+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,R=R+Math.imul(at,wt)|0,I=I+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,R=R+Math.imul(nt,Et)|0,I=I+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,R=R+Math.imul(He,Me)|0,I=I+Math.imul(Pe,Oe)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Fe,Oe)|0,R=R+Math.imul(Fe,Ke)|0;var cn=(B+(I=I+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;B=((R=R+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,I=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,R=Math.imul(Ve,gt),I=I+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,R=R+Math.imul(Ae,wt)|0,I=I+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,R=R+Math.imul(at,Et)|0,I=I+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,R=R+Math.imul(nt,Me)|0,I=I+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,R=R+Math.imul(He,Ke)|0;var Jt=(B+(I=I+Math.imul(Pe,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,I=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,R=Math.imul(Ve,wt),I=I+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,R=R+Math.imul(Ae,Et)|0,I=I+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,R=R+Math.imul(at,Me)|0,I=I+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,R=R+Math.imul(nt,Ke)|0;var Zt=(B+(I=I+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;B=((R=R+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,I=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,R=Math.imul(Ve,Et),I=I+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,R=R+Math.imul(Ae,Me)|0,I=I+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,R=R+Math.imul(at,Ke)|0;var fn=(B+(I=I+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;B=((R=R+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,I=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,R=Math.imul(Ve,Me),I=I+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,R=R+Math.imul(Ae,Ke)|0;var Qt=(B+(I=I+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;B=((R=R+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,I=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,R=Math.imul(Ve,Ke);var Dt=(B+(I=I+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;B=((R=R+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(B+(I=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return B=((R=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,k[0]=Bt,k[1]=Ct,k[2]=kt,k[3]=Ot,k[4]=Pt,k[5]=Lt,k[6]=nn,k[7]=Yt,k[8]=gn,k[9]=an,k[10]=tn,k[11]=Ut,k[12]=cn,k[13]=Jt,k[14]=Zt,k[15]=fn,k[16]=Qt,k[17]=Dt,k[18]=Mt,0!==B&&(k[19]=B,d.length++),d};function z(C,o,s){return(new j).mulp(C,o,s)}function j(C,o){this.x=C,this.y=o}Math.imul||(F=N),l.prototype.mulTo=function(o,s){var d,h=this.length+o.length;return d=10===this.length&&10===o.length?F(this,o,s):h<63?N(this,o,s):h<1024?function L(C,o,s){s.negative=o.negative^C.negative,s.length=C.length+o.length;for(var d=0,h=0,S=0;S>>26)|0)>>>26,k&=67108863}s.words[S]=B,d=k,k=h}return 0!==d?s.words[S]=d:s.length--,s.strip()}(this,o,s):z(this,o,s),d},j.prototype.makeRBT=function(o){for(var s=new Array(o),d=l.prototype._countBits(o)-1,h=0;h>=1;return h},j.prototype.permute=function(o,s,d,h,S,k){for(var B=0;B>>=1)S++;return 1<>>=13,d[2*k+1]=8191&S,S>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=S>>>26,this.words[d]=67108863&S}return 0!==s&&(this.words[d]=s,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var s=function x(C){for(var o=new Array(C.bitLength()),s=0;s>>h}return o}(o);if(0===s.length)return new l(1);for(var d=this,h=0;h=0);var S,s=o%26,d=(o-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(S=0;S>>26-s}k&&(this.words[S]=k,this.length++)}if(0!==d){for(S=this.length-1;S>=0;S--)this.words[S+d]=this.words[S];for(S=0;S=0),h=s?(s-s%26)/26:0;var S=o%26,k=Math.min((o-S)/26,this.length),B=67108863^67108863>>>S<k)for(this.length-=k,f=0;f=0&&(0!==R||f>=h);f--){var se=0|this.words[f];this.words[f]=R<<26-S|se>>>S,R=se&B}return I&&0!==R&&(I.words[I.length++]=R),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,s,d){return w(0===this.negative),this.iushrn(o,s,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var s=o%26,d=(o-s)/26,h=1<=0);var s=o%26,d=(o-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(I/67108864|0),this.words[S+d]=67108863&k}for(;S>26,this.words[S+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,S=0;S>26,this.words[S]=67108863&k;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,s){var d=(this.length,o.length),h=this.clone(),S=o,k=0|S.words[S.length-1];0!==(d=26-this._countBits(k))&&(S=S.ushln(d),h.iushln(d),k=0|S.words[S.length-1]);var f,I=h.length-S.length;if("mod"!==s){(f=new l(null)).length=I+1,f.words=new Array(f.length);for(var R=0;R=0;ee--){var oe=67108864*(0|h.words[S.length+ee])+(0|h.words[S.length+ee-1]);for(oe=Math.min(oe/k|0,67108863),h._ishlnsubmul(S,oe,ee);0!==h.negative;)oe--,h.negative=0,h._ishlnsubmul(S,1,ee),h.isZero()||(h.negative^=1);f&&(f.words[ee]=oe)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},l.prototype.divmod=function(o,s,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(k=this.neg().divmod(o,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.iadd(o)),{div:h,mod:S}):0===this.negative&&0!==o.negative?(k=this.divmod(o.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&o.negative?(k=this.neg().divmod(o.neg(),s),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.isub(o)),{div:k.div,mod:S}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===s?{div:this.divn(o.words[0]),mod:null}:"mod"===s?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,s);var h,S,k},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var s=this.divmod(o);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(o):s.mod,h=o.ushrn(1),S=o.andln(1),k=d.cmp(h);return k<0||1===S&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var s=(1<<26)%o,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/o|0,s=h%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=new l(0),B=new l(1),I=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++I;for(var f=d.clone(),R=s.clone();!s.isZero();){for(var se=0,ee=1;!(s.words[0]&ee)&&se<26;++se,ee<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||S.isOdd())&&(h.iadd(f),S.isub(R)),h.iushrn(1),S.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(R)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),S.isub(B)):(d.isub(s),k.isub(h),B.isub(S))}return{a:k,b:B,gcd:d.iushln(I)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,I=1;!(s.words[0]&I)&&B<26;++B,I<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,R=1;!(d.words[0]&R)&&f<26;++f,R<<=1);if(f>0)for(d.iushrn(f);f-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(S)):(d.isub(s),S.isub(h))}return(se=0===s.cmpn(1)?h:S).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var s=this.clone(),d=o.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var S=s.cmp(d);if(S<0){var k=s;s=d,d=k}else if(0===S||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var s=o%26,d=(o-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==S&&(this.words[k]=S,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,s=o<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(o=-o),w(o<=67108863,"Number is too big");var h=0|this.words[0];d=h===o?0:ho.length)return 1;if(this.length=0;d--){var h=0|this.words[d],S=0|o.words[d];if(h!==S){hS&&(s=1);break}}return s},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new H(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var W={k256:null,p224:null,p192:null,p25519:null};function Y(C,o){this.name=C,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function H(C){if("string"==typeof C){var o=l._prime(C);this.m=o.p,this.prime=o}else w(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}function te(C){H.call(this,C),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}Y.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},Y.prototype.ireduce=function(o){var d,s=o;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(o,s){o.iushrn(this.n,0,s)},Y.prototype.imulK=function(o){return o.imul(this.k)},_(G,Y),G.prototype.split=function(o,s){for(var d=4194303,h=Math.min(o.length,9),S=0;S>>22,k=B}k>>>=22,o.words[S-10]=k,0===k&&o.length>10?o.length-=10:o.length-=9},G.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var s=0,d=0;d>>=26,o.words[d]=S,s=h}return 0!==s&&(o.words[o.length++]=s),o},l._prime=function(o){if(W[o])return W[o];var s;if("k256"===o)s=new G;else if("p224"===o)s=new Q;else if("p192"===o)s=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);s=new J}return W[o]=s,s},H.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},H.prototype._verify2=function(o,s){w(0==(o.negative|s.negative),"red works only with positives"),w(o.red&&o.red===s.red,"red works only with red numbers")},H.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},H.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},H.prototype.add=function(o,s){this._verify2(o,s);var d=o.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},H.prototype.iadd=function(o,s){this._verify2(o,s);var d=o.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},H.prototype.sub=function(o,s){this._verify2(o,s);var d=o.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},H.prototype.isub=function(o,s){this._verify2(o,s);var d=o.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},H.prototype.shl=function(o,s){return this._verify1(o),this.imod(o.ushln(s))},H.prototype.imul=function(o,s){return this._verify2(o,s),this.imod(o.imul(s))},H.prototype.mul=function(o,s){return this._verify2(o,s),this.imod(o.mul(s))},H.prototype.isqr=function(o){return this.imul(o,o.clone())},H.prototype.sqr=function(o){return this.mul(o,o)},H.prototype.sqrt=function(o){if(o.isZero())return o.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var h=this.m.subn(1),S=0;!h.isZero()&&0===h.andln(1);)S++,h.iushrn(1);w(!h.isZero());var k=new l(1).toRed(this),B=k.redNeg(),I=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,I).cmp(B);)f.redIAdd(B);for(var R=this.pow(f,h),se=this.pow(o,h.addn(1).iushrn(1)),ee=this.pow(o,h),oe=S;0!==ee.cmp(k);){for(var de=ee,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;S--){for(var R=s.words[S],se=f-1;se>=0;se--){var ee=R>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==ee||0!==B)?(B<<=1,B|=ee,(4===++I||0===S&&0===se)&&(k=this.mul(k,h[B]),I=0,B=0)):I=0}f=26}return k},H.prototype.convertTo=function(o){var s=o.umod(this.m);return s===o?s.clone():s},H.prototype.convertFrom=function(o){var s=o.clone();return s.red=null,s},l.mont=function(o){return new te(o)},_(te,H),te.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},te.prototype.convertFrom=function(o){var s=this.imod(o.mul(this.rinv));return s.red=null,s},te.prototype.imul=function(o,s){if(o.isZero()||s.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.mul=function(o,s){if(o.isZero()||s.isZero())return new l(0)._forceRed(this);var d=o.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(re=g.nmd(re),this)},32391:re=>{function u(g,p){if(!g)throw new Error(p||"Assertion failed")}re.exports=u,u.equal=function(p,D,w){if(p!=D)throw new Error(w||"Assertion failed: "+p+" != "+D)}},58195:(re,u)=>{"use strict";var g=u;function D(_){return 1===_.length?"0"+_:_}function w(_){for(var l="",v=0;v<_.length;v++)l+=D(_[v].toString(16));return l}g.toArray=function p(_,l){if(Array.isArray(_))return _.slice();if(!_)return[];var v=[];if("string"!=typeof _){for(var m=0;m<_.length;m++)v[m]=0|_[m];return v}if("hex"===l){(_=_.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(_="0"+_);for(m=0;m<_.length;m+=2)v.push(parseInt(_[m]+_[m+1],16))}else for(m=0;m<_.length;m++){var b=_.charCodeAt(m),M=b>>8,E=255&b;M?v.push(M,E):v.push(E)}return v},g.zero2=D,g.toHex=w,g.encode=function(l,v){return"hex"===v?w(l):l}},11346:function(re){re.exports=function(){"use strict";var u=Object.prototype.toString,g=Array.isArray||function(te){return"[object Array]"===u.call(te)};function p(H){return"function"==typeof H}function D(H){return g(H)?"array":typeof H}function w(H){return H.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function _(H,te){return null!=H&&"object"==typeof H&&te in H}function l(H,te){return null!=H&&"object"!=typeof H&&H.hasOwnProperty&&H.hasOwnProperty(te)}var v=RegExp.prototype.test;function m(H,te){return v.call(H,te)}var b=/\S/;function M(H){return!m(b,H)}var E={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function A(H){return String(H).replace(/[&<>"'`=\/]/g,function(C){return E[C]})}var P=/\s*/,x=/\s+/,N=/\s*=/,F=/\s*\}/,L=/#|\^|\/|>|\{|&|=|!/;function z(H,te){if(!H)return[];var f,R,se,C=!1,o=[],s=[],d=[],h=!1,S=!1,k="",B=0;function I(){if(h&&!S)for(;d.length;)delete s[d.pop()];else d=[];h=!1,S=!1}function ee(ce){if("string"==typeof ce&&(ce=ce.split(x,2)),!g(ce)||2!==ce.length)throw new Error("Invalid tags: "+ce);f=new RegExp(w(ce[0])+"\\s*"),R=new RegExp("\\s*"+w(ce[1])),se=new RegExp("\\s*"+w("}"+ce[1]))}ee(te||q.tags);for(var de,Ce,ye,ve,ae,fe,oe=new Y(H);!oe.eos();){if(de=oe.pos,ye=oe.scanUntil(f))for(var pe=0,Se=ye.length;pe0?o[o.length-1][4]:te;break;default:C.push(s)}return te}function Y(H){this.string=H,this.tail=H,this.pos=0}function G(H,te){this.view=H,this.cache={".":this.view},this.parent=te}function Q(){this.templateCache={_cache:{},set:function(te,C){this._cache[te]=C},get:function(te){return this._cache[te]},clear:function(){this._cache={}}}}Y.prototype.eos=function(){return""===this.tail},Y.prototype.scan=function(te){var C=this.tail.match(te);if(!C||0!==C.index)return"";var o=C[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},Y.prototype.scanUntil=function(te){var o,C=this.tail.search(te);switch(C){case-1:o=this.tail,this.tail="";break;case 0:o="";break;default:o=this.tail.substring(0,C),this.tail=this.tail.substring(C)}return this.pos+=o.length,o},G.prototype.push=function(te){return new G(te,this)},G.prototype.lookup=function(te){var o,C=this.cache;if(C.hasOwnProperty(te))o=C[te];else{for(var d,h,S,s=this,k=!1;s;){if(te.indexOf(".")>0)for(d=s.view,h=te.split("."),S=0;null!=d&&S"===k?B=this.renderPartial(S,C,o,d):"&"===k?B=this.unescapedValue(S,C):"name"===k?B=this.escapedValue(S,C,d):"text"===k&&(B=this.rawValue(S)),void 0!==B&&(h+=B);return h},Q.prototype.renderSection=function(te,C,o,s,d){var h=this,S="",k=C.lookup(te[1]);function B(R){return h.render(R,C,o,d)}if(k){if(g(k))for(var I=0,f=k.length;I0||!o)&&(d[h]=s+d[h]);return d.join("\n")},Q.prototype.renderPartial=function(te,C,o,s){if(o){var d=this.getConfigTags(s),h=p(o)?o(te[1]):o[te[1]];if(null!=h){var S=te[6],k=te[5],B=te[4],I=h;0==k&&B&&(I=this.indentPartial(h,B,S));var f=this.parse(I,d);return this.renderTokens(f,C,o,I,s)}}},Q.prototype.unescapedValue=function(te,C){var o=C.lookup(te[1]);if(null!=o)return o},Q.prototype.escapedValue=function(te,C,o){var s=this.getConfigEscape(o)||q.escape,d=C.lookup(te[1]);if(null!=d)return"number"==typeof d&&s===q.escape?String(d):s(d)},Q.prototype.rawValue=function(te){return te[1]},Q.prototype.getConfigTags=function(te){return g(te)?te:te&&"object"==typeof te?te.tags:void 0},Q.prototype.getConfigEscape=function(te){if(te&&"object"==typeof te&&!g(te))return te.escape};var q={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(H){J.templateCache=H},get templateCache(){return J.templateCache}},J=new Q;return q.clearCache=function(){return J.clearCache()},q.parse=function(te,C){return J.parse(te,C)},q.render=function(te,C,o,s){if("string"!=typeof te)throw new TypeError('Invalid template! Template should be a "string" but "'+D(te)+'" was given as the first argument for mustache#render(template, view, partials)');return J.render(te,C,o,s)},q.escape=A,q.Scanner=Y,q.Context=G,q.Writer=Q,q}()},84778:(re,u)=>{"use strict";var w;Object.defineProperty(u,"__esModule",{value:!0}),u.AbiSerializationType=u.AbiFunctionModifier=u.AbiFunctionKind=u.SCHEMA_VERSION=void 0,u.SCHEMA_VERSION="0.3.0",(w=u.AbiFunctionKind||(u.AbiFunctionKind={})).View="view",w.Call="call",function(w){w.Init="init",w.Private="private",w.Payable="payable"}(u.AbiFunctionModifier||(u.AbiFunctionModifier={})),function(w){w.Json="json",w.Borsh="borsh"}(u.AbiSerializationType||(u.AbiSerializationType={}))},81818:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Account=void 0;var p=g(74931);Object.defineProperty(u,"Account",{enumerable:!0,get:function(){return p.Account}})},73648:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.UrlAccountCreator=u.LocalAccountCreator=u.AccountCreator=void 0;var p=g(74931);Object.defineProperty(u,"AccountCreator",{enumerable:!0,get:function(){return p.AccountCreator}}),Object.defineProperty(u,"LocalAccountCreator",{enumerable:!0,get:function(){return p.LocalAccountCreator}}),Object.defineProperty(u,"UrlAccountCreator",{enumerable:!0,get:function(){return p.UrlAccountCreator}})},73369:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MultisigStateStatus=u.MultisigDeleteRequestRejectionError=u.MULTISIG_CONFIRM_METHODS=u.MULTISIG_CHANGE_METHODS=u.MULTISIG_DEPOSIT=u.MULTISIG_GAS=u.MULTISIG_ALLOWANCE=u.MULTISIG_STORAGE_KEY=u.AccountMultisig=u.Account2FA=void 0;var p=g(74931);Object.defineProperty(u,"Account2FA",{enumerable:!0,get:function(){return p.Account2FA}}),Object.defineProperty(u,"AccountMultisig",{enumerable:!0,get:function(){return p.AccountMultisig}}),Object.defineProperty(u,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return p.MULTISIG_STORAGE_KEY}}),Object.defineProperty(u,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return p.MULTISIG_ALLOWANCE}}),Object.defineProperty(u,"MULTISIG_GAS",{enumerable:!0,get:function(){return p.MULTISIG_GAS}}),Object.defineProperty(u,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return p.MULTISIG_DEPOSIT}}),Object.defineProperty(u,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return p.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(u,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return p.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(u,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return p.MultisigDeleteRequestRejectionError}}),Object.defineProperty(u,"MultisigStateStatus",{enumerable:!0,get:function(){return p.MultisigStateStatus}})},33759:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(_,l,v,m){return new(v||(v=Promise))(function(M,E){function A(N){try{x(m.next(N))}catch(F){E(F)}}function P(N){try{x(m.throw(N))}catch(F){E(F)}}function x(N){N.done?M(N.value):function b(M){return M instanceof v?M:new v(function(E){E(M)})}(N.value).then(A,P)}x((m=m.apply(_,l||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.connect=void 0;const D=g(58010);u.connect=function w(_){return p(this,void 0,void 0,function*(){return new D.Near(_)})}},71836:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(l,v,m,b){void 0===b&&(b=m);var M=Object.getOwnPropertyDescriptor(v,m);(!M||("get"in M?!v.__esModule:M.writable||M.configurable))&&(M={enumerable:!0,get:function(){return v[m]}}),Object.defineProperty(l,b,M)}:function(l,v,m,b){void 0===b&&(b=m),l[b]=v[m]}),D=this&&this.__setModuleDefault||(Object.create?function(l,v){Object.defineProperty(l,"default",{enumerable:!0,value:v})}:function(l,v){l.default=v}),w=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var v={};if(null!=l)for(var m in l)"default"!==m&&Object.prototype.hasOwnProperty.call(l,m)&&p(v,l,m);return D(v,l),v},_=this&&this.__exportStar||function(l,v){for(var m in l)"default"!==m&&!Object.prototype.hasOwnProperty.call(v,m)&&p(v,l,m)};Object.defineProperty(u,"__esModule",{value:!0}),u.keyStores=void 0,u.keyStores=w(g(57372)),_(g(45957),u),_(g(33759),u),g(4073)},45957:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(z,j,W,Y){void 0===Y&&(Y=W);var G=Object.getOwnPropertyDescriptor(j,W);(!G||("get"in G?!j.__esModule:G.writable||G.configurable))&&(G={enumerable:!0,get:function(){return j[W]}}),Object.defineProperty(z,Y,G)}:function(z,j,W,Y){void 0===Y&&(Y=W),z[Y]=j[W]}),D=this&&this.__setModuleDefault||(Object.create?function(z,j){Object.defineProperty(z,"default",{enumerable:!0,value:j})}:function(z,j){z.default=j}),w=this&&this.__importStar||function(z){if(z&&z.__esModule)return z;var j={};if(null!=z)for(var W in z)"default"!==W&&Object.prototype.hasOwnProperty.call(z,W)&&p(j,z,W);return D(j,z),j};Object.defineProperty(u,"__esModule",{value:!0}),u.WalletConnection=u.ConnectedWalletAccount=u.Near=u.KeyPair=u.Signer=u.InMemorySigner=u.Contract=u.Connection=u.Account=u.multisig=u.validators=u.transactions=u.utils=u.providers=u.accountCreator=void 0;const _=w(g(91311));u.providers=_;const l=w(g(8127));u.utils=l;const v=w(g(45733));u.transactions=v;const m=w(g(51631));u.validators=m;const b=g(81818);Object.defineProperty(u,"Account",{enumerable:!0,get:function(){return b.Account}});const M=w(g(73369));u.multisig=M;const E=w(g(73648));u.accountCreator=E;const A=g(12592);Object.defineProperty(u,"Connection",{enumerable:!0,get:function(){return A.Connection}});const P=g(60351);Object.defineProperty(u,"Signer",{enumerable:!0,get:function(){return P.Signer}}),Object.defineProperty(u,"InMemorySigner",{enumerable:!0,get:function(){return P.InMemorySigner}});const x=g(99676);Object.defineProperty(u,"Contract",{enumerable:!0,get:function(){return x.Contract}});const N=g(46358);Object.defineProperty(u,"KeyPair",{enumerable:!0,get:function(){return N.KeyPair}});const F=g(58010);Object.defineProperty(u,"Near",{enumerable:!0,get:function(){return F.Near}});const L=g(47601);Object.defineProperty(u,"ConnectedWalletAccount",{enumerable:!0,get:function(){return L.ConnectedWalletAccount}}),Object.defineProperty(u,"WalletConnection",{enumerable:!0,get:function(){return L.WalletConnection}})},12592:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Connection=void 0;var p=g(74931);Object.defineProperty(u,"Connection",{enumerable:!0,get:function(){return p.Connection}})},99676:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Contract=void 0;var p=g(74931);Object.defineProperty(u,"Contract",{enumerable:!0,get:function(){return p.Contract}})},57372:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MergeKeyStore=u.BrowserLocalStorageKeyStore=u.InMemoryKeyStore=u.KeyStore=void 0;const p=g(35598);Object.defineProperty(u,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}});const D=g(56724);Object.defineProperty(u,"InMemoryKeyStore",{enumerable:!0,get:function(){return D.InMemoryKeyStore}});const w=g(82869);Object.defineProperty(u,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return w.BrowserLocalStorageKeyStore}});const _=g(7221);Object.defineProperty(u,"MergeKeyStore",{enumerable:!0,get:function(){return _.MergeKeyStore}})},82869:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.BrowserLocalStorageKeyStore=void 0;var p=g(93271);Object.defineProperty(u,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return p.BrowserLocalStorageKeyStore}})},56724:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.InMemoryKeyStore=void 0;var p=g(69170);Object.defineProperty(u,"InMemoryKeyStore",{enumerable:!0,get:function(){return p.InMemoryKeyStore}})},91001:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MergeKeyStore=u.UnencryptedFileSystemKeyStore=u.BrowserLocalStorageKeyStore=u.InMemoryKeyStore=u.KeyStore=void 0;const p=g(35598);Object.defineProperty(u,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}});const D=g(56724);Object.defineProperty(u,"InMemoryKeyStore",{enumerable:!0,get:function(){return D.InMemoryKeyStore}});const w=g(82869);Object.defineProperty(u,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return w.BrowserLocalStorageKeyStore}});const _=g(57324);Object.defineProperty(u,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return _.UnencryptedFileSystemKeyStore}});const l=g(7221);Object.defineProperty(u,"MergeKeyStore",{enumerable:!0,get:function(){return l.MergeKeyStore}})},35598:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.KeyStore=void 0;var p=g(69170);Object.defineProperty(u,"KeyStore",{enumerable:!0,get:function(){return p.KeyStore}})},7221:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.MergeKeyStore=void 0;var p=g(69170);Object.defineProperty(u,"MergeKeyStore",{enumerable:!0,get:function(){return p.MergeKeyStore}})},57324:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.UnencryptedFileSystemKeyStore=u.readKeyFile=void 0;var p=g(55738);Object.defineProperty(u,"readKeyFile",{enumerable:!0,get:function(){return p.readKeyFile}}),Object.defineProperty(u,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return p.UnencryptedFileSystemKeyStore}})},58010:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Near=void 0;var p=g(9855);Object.defineProperty(u,"Near",{enumerable:!0,get:function(){return p.Near}})},91311:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ErrorContext=u.TypedError=u.getTransactionLastResult=u.FinalExecutionStatusBasic=u.JsonRpcProvider=u.Provider=void 0;const p=g(5754);Object.defineProperty(u,"Provider",{enumerable:!0,get:function(){return p.Provider}}),Object.defineProperty(u,"getTransactionLastResult",{enumerable:!0,get:function(){return p.getTransactionLastResult}}),Object.defineProperty(u,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return p.FinalExecutionStatusBasic}});const D=g(72952);Object.defineProperty(u,"JsonRpcProvider",{enumerable:!0,get:function(){return D.JsonRpcProvider}}),Object.defineProperty(u,"TypedError",{enumerable:!0,get:function(){return D.TypedError}}),Object.defineProperty(u,"ErrorContext",{enumerable:!0,get:function(){return D.ErrorContext}})},72952:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.JsonRpcProvider=u.TypedError=u.ErrorContext=void 0;var p=g(17527);Object.defineProperty(u,"ErrorContext",{enumerable:!0,get:function(){return p.ErrorContext}}),Object.defineProperty(u,"TypedError",{enumerable:!0,get:function(){return p.TypedError}});var D=g(1656);Object.defineProperty(u,"JsonRpcProvider",{enumerable:!0,get:function(){return D.JsonRpcProvider}})},5754:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.FinalExecutionStatusBasic=u.ExecutionStatusBasic=u.IdType=u.Provider=u.getTransactionLastResult=void 0;var p=g(41166);Object.defineProperty(u,"getTransactionLastResult",{enumerable:!0,get:function(){return p.getTransactionLastResult}});var D=g(1656);Object.defineProperty(u,"Provider",{enumerable:!0,get:function(){return D.Provider}});var w=g(17527);Object.defineProperty(u,"IdType",{enumerable:!0,get:function(){return w.IdType}}),Object.defineProperty(u,"ExecutionStatusBasic",{enumerable:!0,get:function(){return w.ExecutionStatusBasic}}),Object.defineProperty(u,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return w.FinalExecutionStatusBasic}})},60351:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Signer=u.InMemorySigner=void 0;var p=g(82613);Object.defineProperty(u,"InMemorySigner",{enumerable:!0,get:function(){return p.InMemorySigner}}),Object.defineProperty(u,"Signer",{enumerable:!0,get:function(){return p.Signer}})},45733:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.transfer=u.stake=u.functionCallAccessKey=u.functionCall=u.fullAccessKey=u.deployContract=u.deleteKey=u.deleteAccount=u.createAccount=u.addKey=u.encodeDelegateAction=u.encodeSignedDelegate=u.Transaction=u.SignedTransaction=u.Signature=u.signTransaction=u.createTransaction=u.SCHEMA=u.Transfer=u.Stake=u.FunctionCallPermission=u.FunctionCall=u.FullAccessPermission=u.DeployContract=u.DeleteKey=u.DeleteAccount=u.CreateAccount=u.AddKey=u.AccessKeyPermission=u.AccessKey=u.Action=u.stringifyJsonOrBytes=void 0;var p=g(38445);Object.defineProperty(u,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return p.stringifyJsonOrBytes}}),Object.defineProperty(u,"Action",{enumerable:!0,get:function(){return p.Action}}),Object.defineProperty(u,"AccessKey",{enumerable:!0,get:function(){return p.AccessKey}}),Object.defineProperty(u,"AccessKeyPermission",{enumerable:!0,get:function(){return p.AccessKeyPermission}}),Object.defineProperty(u,"AddKey",{enumerable:!0,get:function(){return p.AddKey}}),Object.defineProperty(u,"CreateAccount",{enumerable:!0,get:function(){return p.CreateAccount}}),Object.defineProperty(u,"DeleteAccount",{enumerable:!0,get:function(){return p.DeleteAccount}}),Object.defineProperty(u,"DeleteKey",{enumerable:!0,get:function(){return p.DeleteKey}}),Object.defineProperty(u,"DeployContract",{enumerable:!0,get:function(){return p.DeployContract}}),Object.defineProperty(u,"FullAccessPermission",{enumerable:!0,get:function(){return p.FullAccessPermission}}),Object.defineProperty(u,"FunctionCall",{enumerable:!0,get:function(){return p.FunctionCall}}),Object.defineProperty(u,"FunctionCallPermission",{enumerable:!0,get:function(){return p.FunctionCallPermission}}),Object.defineProperty(u,"Stake",{enumerable:!0,get:function(){return p.Stake}}),Object.defineProperty(u,"Transfer",{enumerable:!0,get:function(){return p.Transfer}}),Object.defineProperty(u,"SCHEMA",{enumerable:!0,get:function(){return p.SCHEMA}}),Object.defineProperty(u,"createTransaction",{enumerable:!0,get:function(){return p.createTransaction}}),Object.defineProperty(u,"signTransaction",{enumerable:!0,get:function(){return p.signTransaction}}),Object.defineProperty(u,"Signature",{enumerable:!0,get:function(){return p.Signature}}),Object.defineProperty(u,"SignedTransaction",{enumerable:!0,get:function(){return p.SignedTransaction}}),Object.defineProperty(u,"Transaction",{enumerable:!0,get:function(){return p.Transaction}}),Object.defineProperty(u,"encodeSignedDelegate",{enumerable:!0,get:function(){return p.encodeSignedDelegate}}),Object.defineProperty(u,"encodeDelegateAction",{enumerable:!0,get:function(){return p.encodeDelegateAction}});const D=g(38445);u.addKey=(x,N)=>D.actionCreators.addKey(x,N);u.createAccount=()=>D.actionCreators.createAccount();u.deleteAccount=x=>D.actionCreators.deleteAccount(x);u.deleteKey=x=>D.actionCreators.deleteKey(x);u.deployContract=x=>D.actionCreators.deployContract(x);u.fullAccessKey=()=>D.actionCreators.fullAccessKey();u.functionCall=(x,N,F,L,z,j)=>D.actionCreators.functionCall(x,N,F,L,z,j);u.functionCallAccessKey=(x,N,F)=>D.actionCreators.functionCallAccessKey(x,N,F);u.stake=(x,N)=>D.actionCreators.stake(x,N);u.transfer=x=>D.actionCreators.transfer(x)},89867:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.Enum=u.Assignable=void 0;var p=g(17527);Object.defineProperty(u,"Assignable",{enumerable:!0,get:function(){return p.Assignable}});u.Enum=class D{constructor(_){if(1!==Object.keys(_).length)throw new Error("Enum can only take single value");Object.keys(_).map(l=>{this[l]=_[l],this.enum=l})}}},84528:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.logWarning=u.TypedError=u.PositionalArgsError=u.ErrorContext=u.ArgumentTypeError=u.UnsupportedSerializationError=u.UnknownArgumentError=u.ConflictingOptions=u.ArgumentSchemaError=void 0;var p=g(74931);Object.defineProperty(u,"ArgumentSchemaError",{enumerable:!0,get:function(){return p.ArgumentSchemaError}}),Object.defineProperty(u,"ConflictingOptions",{enumerable:!0,get:function(){return p.ConflictingOptions}}),Object.defineProperty(u,"UnknownArgumentError",{enumerable:!0,get:function(){return p.UnknownArgumentError}}),Object.defineProperty(u,"UnsupportedSerializationError",{enumerable:!0,get:function(){return p.UnsupportedSerializationError}});var D=g(17527);Object.defineProperty(u,"ArgumentTypeError",{enumerable:!0,get:function(){return D.ArgumentTypeError}}),Object.defineProperty(u,"ErrorContext",{enumerable:!0,get:function(){return D.ErrorContext}}),Object.defineProperty(u,"PositionalArgsError",{enumerable:!0,get:function(){return D.PositionalArgsError}}),Object.defineProperty(u,"TypedError",{enumerable:!0,get:function(){return D.TypedError}});var w=g(41166);Object.defineProperty(u,"logWarning",{enumerable:!0,get:function(){return w.logWarning}})},29110:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.parseNearAmount=u.formatNearAmount=u.NEAR_NOMINATION_EXP=u.NEAR_NOMINATION=void 0;var p=g(41166);Object.defineProperty(u,"NEAR_NOMINATION",{enumerable:!0,get:function(){return p.NEAR_NOMINATION}}),Object.defineProperty(u,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return p.NEAR_NOMINATION_EXP}}),Object.defineProperty(u,"formatNearAmount",{enumerable:!0,get:function(){return p.formatNearAmount}}),Object.defineProperty(u,"parseNearAmount",{enumerable:!0,get:function(){return p.parseNearAmount}})},8127:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(P,x,N,F){void 0===F&&(F=N);var L=Object.getOwnPropertyDescriptor(x,N);(!L||("get"in L?!x.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return x[N]}}),Object.defineProperty(P,F,L)}:function(P,x,N,F){void 0===F&&(F=N),P[F]=x[N]}),D=this&&this.__setModuleDefault||(Object.create?function(P,x){Object.defineProperty(P,"default",{enumerable:!0,value:x})}:function(P,x){P.default=x}),w=this&&this.__importStar||function(P){if(P&&P.__esModule)return P;var x={};if(null!=P)for(var N in P)"default"!==N&&Object.prototype.hasOwnProperty.call(P,N)&&p(x,P,N);return D(x,P),x};Object.defineProperty(u,"__esModule",{value:!0}),u.logWarning=u.rpc_errors=u.KeyPairEd25519=u.KeyPair=u.PublicKey=u.format=u.enums=u.web=u.serialize=u.key_pair=void 0;const _=w(g(46358));u.key_pair=_;const l=w(g(7123));u.serialize=l;const v=w(g(36360));u.web=v;const m=w(g(89867));u.enums=m;const b=w(g(29110));u.format=b;const M=w(g(88414));u.rpc_errors=M;const E=g(46358);Object.defineProperty(u,"PublicKey",{enumerable:!0,get:function(){return E.PublicKey}}),Object.defineProperty(u,"KeyPair",{enumerable:!0,get:function(){return E.KeyPair}}),Object.defineProperty(u,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});const A=g(84528);Object.defineProperty(u,"logWarning",{enumerable:!0,get:function(){return A.logWarning}})},46358:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.PublicKey=u.KeyType=u.KeyPairEd25519=u.KeyPair=void 0;var p=g(29761);Object.defineProperty(u,"KeyPair",{enumerable:!0,get:function(){return p.KeyPair}}),Object.defineProperty(u,"KeyPairEd25519",{enumerable:!0,get:function(){return p.KeyPairEd25519}}),Object.defineProperty(u,"KeyType",{enumerable:!0,get:function(){return p.KeyType}}),Object.defineProperty(u,"PublicKey",{enumerable:!0,get:function(){return p.PublicKey}})},88414:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.ServerError=u.getErrorTypeFromErrorMessage=u.formatError=u.parseResultError=u.parseRpcError=void 0;var p=g(41166);Object.defineProperty(u,"parseRpcError",{enumerable:!0,get:function(){return p.parseRpcError}}),Object.defineProperty(u,"parseResultError",{enumerable:!0,get:function(){return p.parseResultError}}),Object.defineProperty(u,"formatError",{enumerable:!0,get:function(){return p.formatError}}),Object.defineProperty(u,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return p.getErrorTypeFromErrorMessage}}),Object.defineProperty(u,"ServerError",{enumerable:!0,get:function(){return p.ServerError}})},7123:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.BinaryReader=u.BinaryWriter=u.BorshError=u.deserialize=u.serialize=u.base_decode=u.base_encode=void 0;var p=g(21531);Object.defineProperty(u,"base_encode",{enumerable:!0,get:function(){return p.baseEncode}}),Object.defineProperty(u,"base_decode",{enumerable:!0,get:function(){return p.baseDecode}}),Object.defineProperty(u,"serialize",{enumerable:!0,get:function(){return p.serialize}}),Object.defineProperty(u,"deserialize",{enumerable:!0,get:function(){return p.deserialize}}),Object.defineProperty(u,"BorshError",{enumerable:!0,get:function(){return p.BorshError}}),Object.defineProperty(u,"BinaryWriter",{enumerable:!0,get:function(){return p.BinaryWriter}}),Object.defineProperty(u,"BinaryReader",{enumerable:!0,get:function(){return p.BinaryReader}})},36360:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.fetchJson=void 0;var p=g(1656);Object.defineProperty(u,"fetchJson",{enumerable:!0,get:function(){return p.fetchJson}})},51631:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.findSeatPrice=u.diffEpochValidators=void 0;var p=g(41166);Object.defineProperty(u,"diffEpochValidators",{enumerable:!0,get:function(){return p.diffEpochValidators}}),Object.defineProperty(u,"findSeatPrice",{enumerable:!0,get:function(){return p.findSeatPrice}})},47601:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.WalletConnection=u.ConnectedWalletAccount=void 0;var p=g(9855);Object.defineProperty(u,"ConnectedWalletAccount",{enumerable:!0,get:function(){return p.ConnectedWalletAccount}}),Object.defineProperty(u,"WalletConnection",{enumerable:!0,get:function(){return p.WalletConnection}})},46789:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.derivePath=u.isValidPath=u.getPublicKey=u.getMasterKeyFromSeed=void 0;const p=g(74529),D=g(40489),w=g(25076);u.getMasterKeyFromSeed=m=>{const M=p("sha512","ed25519 seed").update(Buffer.from(m,"hex")).digest();return{key:M.slice(0,32),chainCode:M.slice(32)}};u.getPublicKey=(m,b=!0)=>{const E=D.sign.keyPair.fromSeed(m).secretKey.subarray(32),A=Buffer.alloc(1,0);return b?Buffer.concat([A,Buffer.from(E)]):Buffer.from(E)},u.isValidPath=m=>!!w.pathRegex.test(m)&&!m.split("/").slice(1).map(w.replaceDerive).some(isNaN),u.derivePath=(m,b,M=2147483648)=>{if(!u.isValidPath(m))throw new Error("Invalid derivation path");const{key:E,chainCode:A}=u.getMasterKeyFromSeed(b);return m.split("/").slice(1).map(w.replaceDerive).map(x=>parseInt(x,10)).reduce((x,N)=>(({key:m,chainCode:b},M)=>{const E=Buffer.allocUnsafe(4);E.writeUInt32BE(M,0);const A=Buffer.concat([Buffer.alloc(1,0),m,E]),P=p("sha512",b).update(A).digest();return{key:P.slice(0,32),chainCode:P.slice(32)}})(x,N+M),{key:E,chainCode:A})}},25076:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.replaceDerive=u.pathRegex=void 0,u.pathRegex=new RegExp("^m(\\/[0-9]+')+$"),u.replaceDerive=g=>g.replace("'","")},21087:(re,u,g)=>{const p=g(48670),{derivePath:D}=g(46789),w=g(78141),_=g(40489),l="m/44'/397'/0'",m=E=>E.trim().split(/\s+/).map(A=>A.toLowerCase()).join(" "),b=(E,A)=>{const P=p.mnemonicToSeed(m(E)),{key:x}=D(A||l,P.toString("hex")),N=_.sign.keyPair.fromSeed(x),F="ed25519:"+w.encode(Buffer.from(N.publicKey));return{seedPhrase:E,secretKey:"ed25519:"+w.encode(Buffer.from(N.secretKey)),publicKey:F}};re.exports={KEY_DERIVATION_PATH:l,generateSeedPhrase:E=>b(void 0!==E?p.entropyToMnemonic(E):p.generateMnemonic()),normalizeSeedPhrase:m,parseSeedPhrase:b,findSeedPhraseKey:(E,A)=>{const P=b(E);return A.indexOf(P.publicKey)<0?{}:P}}},78141:(re,u,g)=>{var p=g(21082);re.exports=p("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},69637:(re,u)=>{"use strict";var p=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}();re.exports=u=p.fetch,p.fetch&&(u.default=p.fetch.bind(p)),u.Headers=p.Headers,u.Request=p.Request,u.Response=p.Response},90252:(re,u,g)=>{g(53495),re.exports=g(6258)},46974:re=>{var u=function(){var g=Object.create({Source:Object,config:{},buildArgs:[]});function p(m){var b="config";if(m instanceof Function)b="Source";else if(m instanceof Array)b="buildArgs";else{if(!(m instanceof Object))throw new Error("Invalid configuration option.");b="config"}if(g.hasOwnProperty(b))throw new Error("Duplicated configuration option: "+b+".");g[b]=m}for(var D=0,w=arguments.length;D{re.exports=function(){throw new Error("Not implemented.")}},6258:(re,u,g)=>{re.exports={Class:g(46974),abstractMethod:g(93765)}},39199:re=>{re.exports=function(u,g){return parseInt(u.toString(),g||8)}},46389:(re,u,g)=>{var p=g(99136);function D(_){var l=function(){return l.called?l.value:(l.called=!0,l.value=_.apply(this,arguments))};return l.called=!1,l}function w(_){var l=function(){if(l.called)throw new Error(l.onceError);return l.called=!0,l.value=_.apply(this,arguments)},v=_.name||"Function wrapped with `once`";return l.onceError=v+" shouldn't be called more than once",l.called=!1,l}re.exports=p(D),re.exports.strict=p(w),D.proto=D(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return D(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return w(this)},configurable:!0})})},52999:(re,u,g)=>{"use strict";var p=g(87977);u.certificate=g(12390);var D=p.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});u.RSAPrivateKey=D;var w=p.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});u.RSAPublicKey=w;var _=p.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(l),this.key("subjectPublicKey").bitstr())});u.PublicKey=_;var l=p.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),v=p.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(l),this.key("subjectPrivateKey").octstr())});u.PrivateKey=v;var m=p.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});u.EncryptedPrivateKey=m;var b=p.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});u.DSAPrivateKey=b,u.DSAparam=p.define("DSAparam",function(){this.int()});var M=p.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(E),this.key("publicKey").optional().explicit(1).bitstr())});u.ECPrivateKey=M;var E=p.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});u.signature=p.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},12390:(re,u,g)=>{"use strict";var p=g(87977),D=p.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),w=p.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),_=p.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),l=p.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(_),this.key("subjectPublicKey").bitstr())}),v=p.define("RelativeDistinguishedName",function(){this.setof(w)}),m=p.define("RDNSequence",function(){this.seqof(v)}),b=p.define("Name",function(){this.choice({rdnSequence:this.use(m)})}),M=p.define("Validity",function(){this.seq().obj(this.key("notBefore").use(D),this.key("notAfter").use(D))}),E=p.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),A=p.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(_),this.key("issuer").use(b),this.key("validity").use(M),this.key("subject").use(b),this.key("subjectPublicKeyInfo").use(l),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(E).optional())}),P=p.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(A),this.key("signatureAlgorithm").use(_),this.key("signatureValue").bitstr())});re.exports=P},65269:(re,u,g)=>{var p=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,D=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,w=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,_=g(40347),l=g(84330),v=g(73502).Buffer;re.exports=function(m,b){var A,M=m.toString(),E=M.match(p);if(E){var x="aes"+E[1],N=v.from(E[2],"hex"),F=v.from(E[3].replace(/[\r\n]/g,""),"base64"),L=_(b,N.slice(0,8),parseInt(E[1],10)).key,z=[],j=l.createDecipheriv(x,L,N);z.push(j.update(F)),z.push(j.final()),A=v.concat(z)}else{var P=M.match(w);A=v.from(P[2].replace(/[\r\n]/g,""),"base64")}return{tag:M.match(D)[1],data:A}}},22772:(re,u,g)=>{var p=g(52999),D=g(22562),w=g(65269),_=g(84330),l=g(99357),v=g(73502).Buffer;function m(M){var E;"object"==typeof M&&!v.isBuffer(M)&&(E=M.passphrase,M=M.key),"string"==typeof M&&(M=v.from(M));var N,F,A=w(M,E),P=A.tag,x=A.data;switch(P){case"CERTIFICATE":F=p.certificate.decode(x,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(F||(F=p.PublicKey.decode(x,"der")),N=F.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return p.RSAPublicKey.decode(F.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return F.subjectPrivateKey=F.subjectPublicKey,{type:"ec",data:F};case"1.2.840.10040.4.1":return F.algorithm.params.pub_key=p.DSAparam.decode(F.subjectPublicKey.data,"der"),{type:"dsa",data:F.algorithm.params};default:throw new Error("unknown key id "+N)}case"ENCRYPTED PRIVATE KEY":x=function b(M,E){var A=M.algorithm.decrypt.kde.kdeparams.salt,P=parseInt(M.algorithm.decrypt.kde.kdeparams.iters.toString(),10),x=D[M.algorithm.decrypt.cipher.algo.join(".")],N=M.algorithm.decrypt.cipher.iv,F=M.subjectPrivateKey,L=parseInt(x.split("-")[1],10)/8,z=l.pbkdf2Sync(E,A,P,L,"sha1"),j=_.createDecipheriv(x,z,N),W=[];return W.push(j.update(F)),W.push(j.final()),v.concat(W)}(x=p.EncryptedPrivateKey.decode(x,"der"),E);case"PRIVATE KEY":switch(N=(F=p.PrivateKey.decode(x,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return p.RSAPrivateKey.decode(F.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:F.algorithm.curve,privateKey:p.ECPrivateKey.decode(F.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return F.algorithm.params.priv_key=p.DSAparam.decode(F.subjectPrivateKey,"der"),{type:"dsa",params:F.algorithm.params};default:throw new Error("unknown key id "+N)}case"RSA PUBLIC KEY":return p.RSAPublicKey.decode(x,"der");case"RSA PRIVATE KEY":return p.RSAPrivateKey.decode(x,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:p.DSAPrivateKey.decode(x,"der")};case"EC PRIVATE KEY":return{curve:(x=p.ECPrivateKey.decode(x,"der")).parameters.value,privateKey:x.privateKey};default:throw new Error("unknown key type "+P)}}re.exports=m,m.signature=p.signature},63928:re=>{"use strict";function u(w){if("string"!=typeof w)throw new TypeError("Path must be a string. Received "+JSON.stringify(w))}function g(w,_){for(var M,l="",v=0,m=-1,b=0,E=0;E<=w.length;++E){if(E2){var A=l.lastIndexOf("/");if(A!==l.length-1){-1===A?(l="",v=0):v=(l=l.slice(0,A)).length-1-l.lastIndexOf("/"),m=E,b=0;continue}}else if(2===l.length||1===l.length){l="",v=0,m=E,b=0;continue}_&&(l.length>0?l+="/..":l="..",v=2)}else l.length>0?l+="/"+w.slice(m+1,E):l=w.slice(m+1,E),v=E-m-1;m=E,b=0}else 46===M&&-1!==b?++b:b=-1}return l}var D={resolve:function(){for(var v,_="",l=!1,m=arguments.length-1;m>=-1&&!l;m--){var b;m>=0?b=arguments[m]:(void 0===v&&(v=process.cwd()),b=v),u(b),0!==b.length&&(_=b+"/"+_,l=47===b.charCodeAt(0))}return _=g(_,!l),l?_.length>0?"/"+_:"/":_.length>0?_:"."},normalize:function(_){if(u(_),0===_.length)return".";var l=47===_.charCodeAt(0),v=47===_.charCodeAt(_.length-1);return 0===(_=g(_,!l)).length&&!l&&(_="."),_.length>0&&v&&(_+="/"),l?"/"+_:_},isAbsolute:function(_){return u(_),_.length>0&&47===_.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var _,l=0;l0&&(void 0===_?_=v:_+="/"+v)}return void 0===_?".":D.normalize(_)},relative:function(_,l){if(u(_),u(l),_===l||(_=D.resolve(_))===(l=D.resolve(l)))return"";for(var v=1;v<_.length&&47===_.charCodeAt(v);++v);for(var m=_.length,b=m-v,M=1;MP){if(47===l.charCodeAt(M+N))return l.slice(M+N+1);if(0===N)return l.slice(M+N)}else b>P&&(47===_.charCodeAt(v+N)?x=N:0===N&&(x=0));break}var F=_.charCodeAt(v+N);if(F!==l.charCodeAt(M+N))break;47===F&&(x=N)}var z="";for(N=v+x+1;N<=m;++N)(N===m||47===_.charCodeAt(N))&&(0===z.length?z+="..":z+="/..");return z.length>0?z+l.slice(M+x):(M+=x,47===l.charCodeAt(M)&&++M,l.slice(M))},_makeLong:function(_){return _},dirname:function(_){if(u(_),0===_.length)return".";for(var l=_.charCodeAt(0),v=47===l,m=-1,b=!0,M=_.length-1;M>=1;--M)if(47===(l=_.charCodeAt(M))){if(!b){m=M;break}}else b=!1;return-1===m?v?"/":".":v&&1===m?"//":_.slice(0,m)},basename:function(_,l){if(void 0!==l&&"string"!=typeof l)throw new TypeError('"ext" argument must be a string');u(_);var M,v=0,m=-1,b=!0;if(void 0!==l&&l.length>0&&l.length<=_.length){if(l.length===_.length&&l===_)return"";var E=l.length-1,A=-1;for(M=_.length-1;M>=0;--M){var P=_.charCodeAt(M);if(47===P){if(!b){v=M+1;break}}else-1===A&&(b=!1,A=M+1),E>=0&&(P===l.charCodeAt(E)?-1==--E&&(m=M):(E=-1,m=A))}return v===m?m=A:-1===m&&(m=_.length),_.slice(v,m)}for(M=_.length-1;M>=0;--M)if(47===_.charCodeAt(M)){if(!b){v=M+1;break}}else-1===m&&(b=!1,m=M+1);return-1===m?"":_.slice(v,m)},extname:function(_){u(_);for(var l=-1,v=0,m=-1,b=!0,M=0,E=_.length-1;E>=0;--E){var A=_.charCodeAt(E);if(47!==A)-1===m&&(b=!1,m=E+1),46===A?-1===l?l=E:1!==M&&(M=1):-1!==l&&(M=-1);else if(!b){v=E+1;break}}return-1===l||-1===m||0===M||1===M&&l===m-1&&l===v+1?"":_.slice(l,m)},format:function(_){if(null===_||"object"!=typeof _)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof _);return function p(w,_){var l=_.dir||_.root,v=_.base||(_.name||"")+(_.ext||"");return l?l===_.root?l+v:l+w+v:v}("/",_)},parse:function(_){u(_);var l={root:"",dir:"",base:"",ext:"",name:""};if(0===_.length)return l;var b,v=_.charCodeAt(0),m=47===v;m?(l.root="/",b=1):b=0;for(var M=-1,E=0,A=-1,P=!0,x=_.length-1,N=0;x>=b;--x)if(47!==(v=_.charCodeAt(x)))-1===A&&(P=!1,A=x+1),46===v?-1===M?M=x:1!==N&&(N=1):-1!==M&&(N=-1);else if(!P){E=x+1;break}return-1===M||-1===A||0===N||1===N&&M===A-1&&M===E+1?-1!==A&&(l.base=l.name=0===E&&m?_.slice(1,A):_.slice(E,A)):(0===E&&m?(l.name=_.slice(1,M),l.base=_.slice(1,A)):(l.name=_.slice(E,M),l.base=_.slice(E,A)),l.ext=_.slice(M,A)),E>0?l.dir=_.slice(0,E-1):m&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};D.posix=D,re.exports=D},99357:(re,u,g)=>{u.pbkdf2=g(90415),u.pbkdf2Sync=g(77472)},90415:(re,u,g)=>{var v,A,p=g(73502).Buffer,D=g(62697),w=g(78867),_=g(77472),l=g(94566),m=global.crypto&&global.crypto.subtle,b={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},M=[];function P(){return A||(A=global.process&&global.process.nextTick?global.process.nextTick:global.queueMicrotask?global.queueMicrotask:global.setImmediate?global.setImmediate:global.setTimeout)}function x(F,L,z,j,W){return m.importKey("raw",F,{name:"PBKDF2"},!1,["deriveBits"]).then(function(Y){return m.deriveBits({name:"PBKDF2",salt:L,iterations:z,hash:{name:W}},Y,j<<3)}).then(function(Y){return p.from(Y)})}re.exports=function(F,L,z,j,W,Y){"function"==typeof W&&(Y=W,W=void 0);var G=b[(W=W||"sha1").toLowerCase()];if(G&&"function"==typeof global.Promise){if(D(z,j),F=l(F,w,"Password"),L=l(L,w,"Salt"),"function"!=typeof Y)throw new Error("No callback provided to pbkdf2");!function N(F,L){F.then(function(z){P()(function(){L(null,z)})},function(z){P()(function(){L(z)})})}(function E(F){if(global.process&&!global.process.browser||!m||!m.importKey||!m.deriveBits)return Promise.resolve(!1);if(void 0!==M[F])return M[F];var L=x(v=v||p.alloc(8),v,10,128,F).then(function(){return!0}).catch(function(){return!1});return M[F]=L,L}(G).then(function(Q){return Q?x(F,L,z,j,G):_(F,L,z,j,W)}),Y)}else P()(function(){var Q;try{Q=_(F,L,z,j,W)}catch(q){return Y(q)}Y(null,Q)})}},78867:re=>{var u;if(global.process&&global.process.browser)u="utf-8";else if(global.process&&global.process.version){u=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else u="utf-8";re.exports=u},62697:re=>{var u=Math.pow(2,30)-1;re.exports=function(g,p){if("number"!=typeof g)throw new TypeError("Iterations not a number");if(g<0)throw new TypeError("Bad iterations");if("number"!=typeof p)throw new TypeError("Key length not a number");if(p<0||p>u||p!=p)throw new TypeError("Bad key length")}},77472:(re,u,g)=>{var p=g(55640),D=g(75634),w=g(95244),_=g(73502).Buffer,l=g(62697),v=g(78867),m=g(94566),b=_.alloc(128),M={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function E(x,N,F){var L=function A(x){function N(L){return w(x).update(L).digest()}function F(L){return(new D).update(L).digest()}return"rmd160"===x||"ripemd160"===x?F:"md5"===x?p:N}(x),z="sha512"===x||"sha384"===x?128:64;N.length>z?N=L(N):N.length{var p=g(73502).Buffer;re.exports=function(D,w,_){if(p.isBuffer(D))return D;if("string"==typeof D)return p.from(D,w);if(ArrayBuffer.isView(D))return p.from(D.buffer);throw new TypeError(_+" must be a string, a Buffer, a typed array or a DataView")}},95857:re=>{"use strict";typeof process>"u"||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?re.exports={nextTick:function u(g,p,D,w){if("function"!=typeof g)throw new TypeError('"callback" argument must be a function');var l,v,_=arguments.length;switch(_){case 0:case 1:return process.nextTick(g);case 2:return process.nextTick(function(){g.call(null,p)});case 3:return process.nextTick(function(){g.call(null,p,D)});case 4:return process.nextTick(function(){g.call(null,p,D,w)});default:for(l=new Array(_-1),v=0;v-1};return{enumerable:v("enumerable"),configurable:v("configurable"),writable:v("writable"),value:D}}(_,l),"object"==typeof w){for(v in w)Object.hasOwnProperty.call(w,v)&&(l.value=w[v],u(D,v,l));return D}return u(D,w,l)}},re.exports?re.exports=p():g.prr=p()},63701:(re,u,g)=>{u.publicEncrypt=g(16562),u.privateDecrypt=g(36705),u.privateEncrypt=function(D,w){return u.publicEncrypt(D,w,!0)},u.publicDecrypt=function(D,w){return u.privateDecrypt(D,w,!0)}},86945:(re,u,g)=>{var p=g(96386),D=g(73502).Buffer;function w(_){var l=D.allocUnsafe(4);return l.writeUInt32BE(_,0),l}re.exports=function(_,l){for(var b,v=D.alloc(0),m=0;v.length=65&&s<=70?s-55:s>=97&&s<=102?s-87:s-48&15}function b(C,o,s){var d=m(C,s);return s-1>=o&&(d|=m(C,s-1)<<4),d}function M(C,o,s,d){for(var h=0,S=Math.min(C.length,s),k=o;k=49?B-49+10:B>=17?B-17+10:B}return h}l.isBN=function(o){return o instanceof l||null!==o&&"object"==typeof o&&o.constructor.wordSize===l.wordSize&&Array.isArray(o.words)},l.max=function(o,s){return o.cmp(s)>0?o:s},l.min=function(o,s){return o.cmp(s)<0?o:s},l.prototype._init=function(o,s,d){if("number"==typeof o)return this._initNumber(o,s,d);if("object"==typeof o)return this._initArray(o,s,d);"hex"===s&&(s=16),w(s===(0|s)&&s>=2&&s<=36);var h=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(h++,this.negative=1),h=0;h-=3)k=o[h]|o[h-1]<<8|o[h-2]<<16,this.words[S]|=k<>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);else if("le"===d)for(h=0,S=0;h>>26-B&67108863,(B+=24)>=26&&(B-=26,S++);return this.strip()},l.prototype._parseHex=function(o,s,d){this.length=Math.ceil((o.length-s)/6),this.words=new Array(this.length);for(var h=0;h=s;h-=2)B=b(o,s,h)<=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;else for(h=(o.length-s)%2==0?s+1:s;h=18?(S-=18,k+=1,this.words[k]|=B>>>26):S+=8;this.strip()},l.prototype._parseBase=function(o,s,d){this.words=[0],this.length=1;for(var h=0,S=1;S<=67108863;S*=s)h++;h--,S=S/s|0;for(var k=o.length-d,B=k%h,I=Math.min(k,k-B)+d,f=0,R=d;R1&&0===this.words[this.length-1];)this.length--;return this._normSign()},l.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var E=["","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"],A=[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 N(C,o,s){s.negative=o.negative^C.negative;var d=C.length+o.length|0;s.length=d,d=d-1|0;var h=0|C.words[0],S=0|o.words[0],k=h*S,B=67108863&k,I=k/67108864|0;s.words[0]=B;for(var f=1;f>>26,se=67108863&I,ee=Math.min(f,o.length-1),oe=Math.max(0,f-C.length+1);oe<=ee;oe++){var de=f-oe|0;R+=(k=(h=0|C.words[de])*(S=0|o.words[oe])+se)/67108864|0,se=67108863&k}s.words[f]=0|se,I=0|R}return 0!==I?s.words[f]=0|I:s.length--,s.strip()}l.prototype.toString=function(o,s){var d;if(s=0|s||1,16===(o=o||10)||"hex"===o){d="";for(var h=0,S=0,k=0;k>>24-h&16777215)||k!==this.length-1?E[6-I.length]+I+d:I+d,(h+=2)>=26&&(h-=26,k--)}for(0!==S&&(d=S.toString(16)+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}if(o===(0|o)&&o>=2&&o<=36){var f=A[o],R=P[o];d="";var se=this.clone();for(se.negative=0;!se.isZero();){var ee=se.modn(R).toString(o);d=(se=se.idivn(R)).isZero()?ee+d:E[f-ee.length]+ee+d}for(this.isZero()&&(d="0"+d);d.length%s!=0;)d="0"+d;return 0!==this.negative&&(d="-"+d),d}w(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&w(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(o,s){return w(typeof v<"u"),this.toArrayLike(v,o,s)},l.prototype.toArray=function(o,s){return this.toArrayLike(Array,o,s)},l.prototype.toArrayLike=function(o,s,d){var h=this.byteLength(),S=d||Math.max(1,h);w(h<=S,"byte array longer than desired length"),w(S>0,"Requested array length <= 0"),this.strip();var I,f,k="le"===s,B=new o(S),R=this.clone();if(k){for(f=0;!R.isZero();f++)I=R.andln(255),R.iushrn(8),B[f]=I;for(;f=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},l.prototype._zeroBits=function(o){if(0===o)return 26;var s=o,d=0;return 8191&s||(d+=13,s>>>=13),127&s||(d+=7,s>>>=7),15&s||(d+=4,s>>>=4),3&s||(d+=2,s>>>=2),1&s||d++,d},l.prototype.bitLength=function(){var o=this.words[this.length-1],s=this._countBits(o);return 26*(this.length-1)+s},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,s=0;so.length?this.clone().ior(o):o.clone().ior(this)},l.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},l.prototype.iuand=function(o){var s;s=this.length>o.length?o:this;for(var d=0;do.length?this.clone().iand(o):o.clone().iand(this)},l.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},l.prototype.iuxor=function(o){var s,d;this.length>o.length?(s=this,d=o):(s=o,d=this);for(var h=0;ho.length?this.clone().ixor(o):o.clone().ixor(this)},l.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},l.prototype.inotn=function(o){w("number"==typeof o&&o>=0);var s=0|Math.ceil(o/26),d=o%26;this._expand(s),d>0&&s--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-d),this.strip()},l.prototype.notn=function(o){return this.clone().inotn(o)},l.prototype.setn=function(o,s){w("number"==typeof o&&o>=0);var d=o/26|0,h=o%26;return this._expand(d+1),this.words[d]=s?this.words[d]|1<o.length?(d=this,h=o):(d=o,h=this);for(var S=0,k=0;k>>26;for(;0!==S&&k>>26;if(this.length=d.length,0!==S)this.words[this.length]=S,this.length++;else if(d!==this)for(;ko.length?this.clone().iadd(o):o.clone().iadd(this)},l.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var s=this.iadd(o);return o.negative=1,s._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var h,S,d=this.cmp(o);if(0===d)return this.negative=0,this.length=1,this.words[0]=0,this;d>0?(h=this,S=o):(h=o,S=this);for(var k=0,B=0;B>26,this.words[B]=67108863&s;for(;0!==k&&B>26,this.words[B]=67108863&s;if(0===k&&B>>13,de=0|h[1],Ce=8191&de,ye=de>>>13,ve=0|h[2],ae=8191&ve,fe=ve>>>13,pe=0|h[3],Se=8191&pe,ce=pe>>>13,be=0|h[4],Pe=8191&be,Fe=be>>>13,lt=0|h[5],Ge=8191<,He=lt>>>13,Kt=0|h[6],tt=8191&Kt,nt=Kt>>>13,Vt=0|h[7],ot=8191&Vt,at=Vt>>>13,Gt=0|h[8],Re=8191&Gt,Ae=Gt>>>13,Te=0|h[9],Be=8191&Te,Ve=Te>>>13,mt=0|S[0],Ze=8191&mt,ct=mt>>>13,hn=0|S[1],ft=8191&hn,At=hn>>>13,wn=0|S[2],ze=8191&wn,Qe=wn>>>13,Ht=0|S[3],pt=8191&Ht,vt=Ht>>>13,$t=0|S[4],dt=8191&$t,gt=$t>>>13,mn=0|S[5],ut=8191&mn,wt=mn>>>13,Sn=0|S[6],yt=8191&Sn,Et=Sn>>>13,_e=0|S[7],Ee=8191&_e,Me=_e>>>13,me=0|S[8],Oe=8191&me,Ke=me>>>13,it=0|S[9],Ye=8191&it,qe=it>>>13;d.negative=o.negative^s.negative,d.length=19;var Bt=(B+(I=Math.imul(ee,Ze))|0)+((8191&(f=(f=Math.imul(ee,ct))+Math.imul(oe,Ze)|0))<<13)|0;B=((R=Math.imul(oe,ct))+(f>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,I=Math.imul(Ce,Ze),f=(f=Math.imul(Ce,ct))+Math.imul(ye,Ze)|0,R=Math.imul(ye,ct);var Ct=(B+(I=I+Math.imul(ee,ft)|0)|0)+((8191&(f=(f=f+Math.imul(ee,At)|0)+Math.imul(oe,ft)|0))<<13)|0;B=((R=R+Math.imul(oe,At)|0)+(f>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,I=Math.imul(ae,Ze),f=(f=Math.imul(ae,ct))+Math.imul(fe,Ze)|0,R=Math.imul(fe,ct),I=I+Math.imul(Ce,ft)|0,f=(f=f+Math.imul(Ce,At)|0)+Math.imul(ye,ft)|0,R=R+Math.imul(ye,At)|0;var kt=(B+(I=I+Math.imul(ee,ze)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Qe)|0)+Math.imul(oe,ze)|0))<<13)|0;B=((R=R+Math.imul(oe,Qe)|0)+(f>>>13)|0)+(kt>>>26)|0,kt&=67108863,I=Math.imul(Se,Ze),f=(f=Math.imul(Se,ct))+Math.imul(ce,Ze)|0,R=Math.imul(ce,ct),I=I+Math.imul(ae,ft)|0,f=(f=f+Math.imul(ae,At)|0)+Math.imul(fe,ft)|0,R=R+Math.imul(fe,At)|0,I=I+Math.imul(Ce,ze)|0,f=(f=f+Math.imul(Ce,Qe)|0)+Math.imul(ye,ze)|0,R=R+Math.imul(ye,Qe)|0;var Ot=(B+(I=I+Math.imul(ee,pt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,vt)|0)+Math.imul(oe,pt)|0))<<13)|0;B=((R=R+Math.imul(oe,vt)|0)+(f>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,I=Math.imul(Pe,Ze),f=(f=Math.imul(Pe,ct))+Math.imul(Fe,Ze)|0,R=Math.imul(Fe,ct),I=I+Math.imul(Se,ft)|0,f=(f=f+Math.imul(Se,At)|0)+Math.imul(ce,ft)|0,R=R+Math.imul(ce,At)|0,I=I+Math.imul(ae,ze)|0,f=(f=f+Math.imul(ae,Qe)|0)+Math.imul(fe,ze)|0,R=R+Math.imul(fe,Qe)|0,I=I+Math.imul(Ce,pt)|0,f=(f=f+Math.imul(Ce,vt)|0)+Math.imul(ye,pt)|0,R=R+Math.imul(ye,vt)|0;var Pt=(B+(I=I+Math.imul(ee,dt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,gt)|0)+Math.imul(oe,dt)|0))<<13)|0;B=((R=R+Math.imul(oe,gt)|0)+(f>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,I=Math.imul(Ge,Ze),f=(f=Math.imul(Ge,ct))+Math.imul(He,Ze)|0,R=Math.imul(He,ct),I=I+Math.imul(Pe,ft)|0,f=(f=f+Math.imul(Pe,At)|0)+Math.imul(Fe,ft)|0,R=R+Math.imul(Fe,At)|0,I=I+Math.imul(Se,ze)|0,f=(f=f+Math.imul(Se,Qe)|0)+Math.imul(ce,ze)|0,R=R+Math.imul(ce,Qe)|0,I=I+Math.imul(ae,pt)|0,f=(f=f+Math.imul(ae,vt)|0)+Math.imul(fe,pt)|0,R=R+Math.imul(fe,vt)|0,I=I+Math.imul(Ce,dt)|0,f=(f=f+Math.imul(Ce,gt)|0)+Math.imul(ye,dt)|0,R=R+Math.imul(ye,gt)|0;var Lt=(B+(I=I+Math.imul(ee,ut)|0)|0)+((8191&(f=(f=f+Math.imul(ee,wt)|0)+Math.imul(oe,ut)|0))<<13)|0;B=((R=R+Math.imul(oe,wt)|0)+(f>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,I=Math.imul(tt,Ze),f=(f=Math.imul(tt,ct))+Math.imul(nt,Ze)|0,R=Math.imul(nt,ct),I=I+Math.imul(Ge,ft)|0,f=(f=f+Math.imul(Ge,At)|0)+Math.imul(He,ft)|0,R=R+Math.imul(He,At)|0,I=I+Math.imul(Pe,ze)|0,f=(f=f+Math.imul(Pe,Qe)|0)+Math.imul(Fe,ze)|0,R=R+Math.imul(Fe,Qe)|0,I=I+Math.imul(Se,pt)|0,f=(f=f+Math.imul(Se,vt)|0)+Math.imul(ce,pt)|0,R=R+Math.imul(ce,vt)|0,I=I+Math.imul(ae,dt)|0,f=(f=f+Math.imul(ae,gt)|0)+Math.imul(fe,dt)|0,R=R+Math.imul(fe,gt)|0,I=I+Math.imul(Ce,ut)|0,f=(f=f+Math.imul(Ce,wt)|0)+Math.imul(ye,ut)|0,R=R+Math.imul(ye,wt)|0;var nn=(B+(I=I+Math.imul(ee,yt)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Et)|0)+Math.imul(oe,yt)|0))<<13)|0;B=((R=R+Math.imul(oe,Et)|0)+(f>>>13)|0)+(nn>>>26)|0,nn&=67108863,I=Math.imul(ot,Ze),f=(f=Math.imul(ot,ct))+Math.imul(at,Ze)|0,R=Math.imul(at,ct),I=I+Math.imul(tt,ft)|0,f=(f=f+Math.imul(tt,At)|0)+Math.imul(nt,ft)|0,R=R+Math.imul(nt,At)|0,I=I+Math.imul(Ge,ze)|0,f=(f=f+Math.imul(Ge,Qe)|0)+Math.imul(He,ze)|0,R=R+Math.imul(He,Qe)|0,I=I+Math.imul(Pe,pt)|0,f=(f=f+Math.imul(Pe,vt)|0)+Math.imul(Fe,pt)|0,R=R+Math.imul(Fe,vt)|0,I=I+Math.imul(Se,dt)|0,f=(f=f+Math.imul(Se,gt)|0)+Math.imul(ce,dt)|0,R=R+Math.imul(ce,gt)|0,I=I+Math.imul(ae,ut)|0,f=(f=f+Math.imul(ae,wt)|0)+Math.imul(fe,ut)|0,R=R+Math.imul(fe,wt)|0,I=I+Math.imul(Ce,yt)|0,f=(f=f+Math.imul(Ce,Et)|0)+Math.imul(ye,yt)|0,R=R+Math.imul(ye,Et)|0;var Yt=(B+(I=I+Math.imul(ee,Ee)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Me)|0)+Math.imul(oe,Ee)|0))<<13)|0;B=((R=R+Math.imul(oe,Me)|0)+(f>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,I=Math.imul(Re,Ze),f=(f=Math.imul(Re,ct))+Math.imul(Ae,Ze)|0,R=Math.imul(Ae,ct),I=I+Math.imul(ot,ft)|0,f=(f=f+Math.imul(ot,At)|0)+Math.imul(at,ft)|0,R=R+Math.imul(at,At)|0,I=I+Math.imul(tt,ze)|0,f=(f=f+Math.imul(tt,Qe)|0)+Math.imul(nt,ze)|0,R=R+Math.imul(nt,Qe)|0,I=I+Math.imul(Ge,pt)|0,f=(f=f+Math.imul(Ge,vt)|0)+Math.imul(He,pt)|0,R=R+Math.imul(He,vt)|0,I=I+Math.imul(Pe,dt)|0,f=(f=f+Math.imul(Pe,gt)|0)+Math.imul(Fe,dt)|0,R=R+Math.imul(Fe,gt)|0,I=I+Math.imul(Se,ut)|0,f=(f=f+Math.imul(Se,wt)|0)+Math.imul(ce,ut)|0,R=R+Math.imul(ce,wt)|0,I=I+Math.imul(ae,yt)|0,f=(f=f+Math.imul(ae,Et)|0)+Math.imul(fe,yt)|0,R=R+Math.imul(fe,Et)|0,I=I+Math.imul(Ce,Ee)|0,f=(f=f+Math.imul(Ce,Me)|0)+Math.imul(ye,Ee)|0,R=R+Math.imul(ye,Me)|0;var gn=(B+(I=I+Math.imul(ee,Oe)|0)|0)+((8191&(f=(f=f+Math.imul(ee,Ke)|0)+Math.imul(oe,Oe)|0))<<13)|0;B=((R=R+Math.imul(oe,Ke)|0)+(f>>>13)|0)+(gn>>>26)|0,gn&=67108863,I=Math.imul(Be,Ze),f=(f=Math.imul(Be,ct))+Math.imul(Ve,Ze)|0,R=Math.imul(Ve,ct),I=I+Math.imul(Re,ft)|0,f=(f=f+Math.imul(Re,At)|0)+Math.imul(Ae,ft)|0,R=R+Math.imul(Ae,At)|0,I=I+Math.imul(ot,ze)|0,f=(f=f+Math.imul(ot,Qe)|0)+Math.imul(at,ze)|0,R=R+Math.imul(at,Qe)|0,I=I+Math.imul(tt,pt)|0,f=(f=f+Math.imul(tt,vt)|0)+Math.imul(nt,pt)|0,R=R+Math.imul(nt,vt)|0,I=I+Math.imul(Ge,dt)|0,f=(f=f+Math.imul(Ge,gt)|0)+Math.imul(He,dt)|0,R=R+Math.imul(He,gt)|0,I=I+Math.imul(Pe,ut)|0,f=(f=f+Math.imul(Pe,wt)|0)+Math.imul(Fe,ut)|0,R=R+Math.imul(Fe,wt)|0,I=I+Math.imul(Se,yt)|0,f=(f=f+Math.imul(Se,Et)|0)+Math.imul(ce,yt)|0,R=R+Math.imul(ce,Et)|0,I=I+Math.imul(ae,Ee)|0,f=(f=f+Math.imul(ae,Me)|0)+Math.imul(fe,Ee)|0,R=R+Math.imul(fe,Me)|0,I=I+Math.imul(Ce,Oe)|0,f=(f=f+Math.imul(Ce,Ke)|0)+Math.imul(ye,Oe)|0,R=R+Math.imul(ye,Ke)|0;var an=(B+(I=I+Math.imul(ee,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ee,qe)|0)+Math.imul(oe,Ye)|0))<<13)|0;B=((R=R+Math.imul(oe,qe)|0)+(f>>>13)|0)+(an>>>26)|0,an&=67108863,I=Math.imul(Be,ft),f=(f=Math.imul(Be,At))+Math.imul(Ve,ft)|0,R=Math.imul(Ve,At),I=I+Math.imul(Re,ze)|0,f=(f=f+Math.imul(Re,Qe)|0)+Math.imul(Ae,ze)|0,R=R+Math.imul(Ae,Qe)|0,I=I+Math.imul(ot,pt)|0,f=(f=f+Math.imul(ot,vt)|0)+Math.imul(at,pt)|0,R=R+Math.imul(at,vt)|0,I=I+Math.imul(tt,dt)|0,f=(f=f+Math.imul(tt,gt)|0)+Math.imul(nt,dt)|0,R=R+Math.imul(nt,gt)|0,I=I+Math.imul(Ge,ut)|0,f=(f=f+Math.imul(Ge,wt)|0)+Math.imul(He,ut)|0,R=R+Math.imul(He,wt)|0,I=I+Math.imul(Pe,yt)|0,f=(f=f+Math.imul(Pe,Et)|0)+Math.imul(Fe,yt)|0,R=R+Math.imul(Fe,Et)|0,I=I+Math.imul(Se,Ee)|0,f=(f=f+Math.imul(Se,Me)|0)+Math.imul(ce,Ee)|0,R=R+Math.imul(ce,Me)|0,I=I+Math.imul(ae,Oe)|0,f=(f=f+Math.imul(ae,Ke)|0)+Math.imul(fe,Oe)|0,R=R+Math.imul(fe,Ke)|0;var tn=(B+(I=I+Math.imul(Ce,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ce,qe)|0)+Math.imul(ye,Ye)|0))<<13)|0;B=((R=R+Math.imul(ye,qe)|0)+(f>>>13)|0)+(tn>>>26)|0,tn&=67108863,I=Math.imul(Be,ze),f=(f=Math.imul(Be,Qe))+Math.imul(Ve,ze)|0,R=Math.imul(Ve,Qe),I=I+Math.imul(Re,pt)|0,f=(f=f+Math.imul(Re,vt)|0)+Math.imul(Ae,pt)|0,R=R+Math.imul(Ae,vt)|0,I=I+Math.imul(ot,dt)|0,f=(f=f+Math.imul(ot,gt)|0)+Math.imul(at,dt)|0,R=R+Math.imul(at,gt)|0,I=I+Math.imul(tt,ut)|0,f=(f=f+Math.imul(tt,wt)|0)+Math.imul(nt,ut)|0,R=R+Math.imul(nt,wt)|0,I=I+Math.imul(Ge,yt)|0,f=(f=f+Math.imul(Ge,Et)|0)+Math.imul(He,yt)|0,R=R+Math.imul(He,Et)|0,I=I+Math.imul(Pe,Ee)|0,f=(f=f+Math.imul(Pe,Me)|0)+Math.imul(Fe,Ee)|0,R=R+Math.imul(Fe,Me)|0,I=I+Math.imul(Se,Oe)|0,f=(f=f+Math.imul(Se,Ke)|0)+Math.imul(ce,Oe)|0,R=R+Math.imul(ce,Ke)|0;var Ut=(B+(I=I+Math.imul(ae,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ae,qe)|0)+Math.imul(fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(fe,qe)|0)+(f>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,I=Math.imul(Be,pt),f=(f=Math.imul(Be,vt))+Math.imul(Ve,pt)|0,R=Math.imul(Ve,vt),I=I+Math.imul(Re,dt)|0,f=(f=f+Math.imul(Re,gt)|0)+Math.imul(Ae,dt)|0,R=R+Math.imul(Ae,gt)|0,I=I+Math.imul(ot,ut)|0,f=(f=f+Math.imul(ot,wt)|0)+Math.imul(at,ut)|0,R=R+Math.imul(at,wt)|0,I=I+Math.imul(tt,yt)|0,f=(f=f+Math.imul(tt,Et)|0)+Math.imul(nt,yt)|0,R=R+Math.imul(nt,Et)|0,I=I+Math.imul(Ge,Ee)|0,f=(f=f+Math.imul(Ge,Me)|0)+Math.imul(He,Ee)|0,R=R+Math.imul(He,Me)|0,I=I+Math.imul(Pe,Oe)|0,f=(f=f+Math.imul(Pe,Ke)|0)+Math.imul(Fe,Oe)|0,R=R+Math.imul(Fe,Ke)|0;var cn=(B+(I=I+Math.imul(Se,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Se,qe)|0)+Math.imul(ce,Ye)|0))<<13)|0;B=((R=R+Math.imul(ce,qe)|0)+(f>>>13)|0)+(cn>>>26)|0,cn&=67108863,I=Math.imul(Be,dt),f=(f=Math.imul(Be,gt))+Math.imul(Ve,dt)|0,R=Math.imul(Ve,gt),I=I+Math.imul(Re,ut)|0,f=(f=f+Math.imul(Re,wt)|0)+Math.imul(Ae,ut)|0,R=R+Math.imul(Ae,wt)|0,I=I+Math.imul(ot,yt)|0,f=(f=f+Math.imul(ot,Et)|0)+Math.imul(at,yt)|0,R=R+Math.imul(at,Et)|0,I=I+Math.imul(tt,Ee)|0,f=(f=f+Math.imul(tt,Me)|0)+Math.imul(nt,Ee)|0,R=R+Math.imul(nt,Me)|0,I=I+Math.imul(Ge,Oe)|0,f=(f=f+Math.imul(Ge,Ke)|0)+Math.imul(He,Oe)|0,R=R+Math.imul(He,Ke)|0;var Jt=(B+(I=I+Math.imul(Pe,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Pe,qe)|0)+Math.imul(Fe,Ye)|0))<<13)|0;B=((R=R+Math.imul(Fe,qe)|0)+(f>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,I=Math.imul(Be,ut),f=(f=Math.imul(Be,wt))+Math.imul(Ve,ut)|0,R=Math.imul(Ve,wt),I=I+Math.imul(Re,yt)|0,f=(f=f+Math.imul(Re,Et)|0)+Math.imul(Ae,yt)|0,R=R+Math.imul(Ae,Et)|0,I=I+Math.imul(ot,Ee)|0,f=(f=f+Math.imul(ot,Me)|0)+Math.imul(at,Ee)|0,R=R+Math.imul(at,Me)|0,I=I+Math.imul(tt,Oe)|0,f=(f=f+Math.imul(tt,Ke)|0)+Math.imul(nt,Oe)|0,R=R+Math.imul(nt,Ke)|0;var Zt=(B+(I=I+Math.imul(Ge,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Ge,qe)|0)+Math.imul(He,Ye)|0))<<13)|0;B=((R=R+Math.imul(He,qe)|0)+(f>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,I=Math.imul(Be,yt),f=(f=Math.imul(Be,Et))+Math.imul(Ve,yt)|0,R=Math.imul(Ve,Et),I=I+Math.imul(Re,Ee)|0,f=(f=f+Math.imul(Re,Me)|0)+Math.imul(Ae,Ee)|0,R=R+Math.imul(Ae,Me)|0,I=I+Math.imul(ot,Oe)|0,f=(f=f+Math.imul(ot,Ke)|0)+Math.imul(at,Oe)|0,R=R+Math.imul(at,Ke)|0;var fn=(B+(I=I+Math.imul(tt,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(tt,qe)|0)+Math.imul(nt,Ye)|0))<<13)|0;B=((R=R+Math.imul(nt,qe)|0)+(f>>>13)|0)+(fn>>>26)|0,fn&=67108863,I=Math.imul(Be,Ee),f=(f=Math.imul(Be,Me))+Math.imul(Ve,Ee)|0,R=Math.imul(Ve,Me),I=I+Math.imul(Re,Oe)|0,f=(f=f+Math.imul(Re,Ke)|0)+Math.imul(Ae,Oe)|0,R=R+Math.imul(Ae,Ke)|0;var Qt=(B+(I=I+Math.imul(ot,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(ot,qe)|0)+Math.imul(at,Ye)|0))<<13)|0;B=((R=R+Math.imul(at,qe)|0)+(f>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,I=Math.imul(Be,Oe),f=(f=Math.imul(Be,Ke))+Math.imul(Ve,Oe)|0,R=Math.imul(Ve,Ke);var Dt=(B+(I=I+Math.imul(Re,Ye)|0)|0)+((8191&(f=(f=f+Math.imul(Re,qe)|0)+Math.imul(Ae,Ye)|0))<<13)|0;B=((R=R+Math.imul(Ae,qe)|0)+(f>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Mt=(B+(I=Math.imul(Be,Ye))|0)+((8191&(f=(f=Math.imul(Be,qe))+Math.imul(Ve,Ye)|0))<<13)|0;return B=((R=Math.imul(Ve,qe))+(f>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,k[0]=Bt,k[1]=Ct,k[2]=kt,k[3]=Ot,k[4]=Pt,k[5]=Lt,k[6]=nn,k[7]=Yt,k[8]=gn,k[9]=an,k[10]=tn,k[11]=Ut,k[12]=cn,k[13]=Jt,k[14]=Zt,k[15]=fn,k[16]=Qt,k[17]=Dt,k[18]=Mt,0!==B&&(k[19]=B,d.length++),d};function z(C,o,s){return(new j).mulp(C,o,s)}function j(C,o){this.x=C,this.y=o}Math.imul||(F=N),l.prototype.mulTo=function(o,s){var d,h=this.length+o.length;return d=10===this.length&&10===o.length?F(this,o,s):h<63?N(this,o,s):h<1024?function L(C,o,s){s.negative=o.negative^C.negative,s.length=C.length+o.length;for(var d=0,h=0,S=0;S>>26)|0)>>>26,k&=67108863}s.words[S]=B,d=k,k=h}return 0!==d?s.words[S]=d:s.length--,s.strip()}(this,o,s):z(this,o,s),d},j.prototype.makeRBT=function(o){for(var s=new Array(o),d=l.prototype._countBits(o)-1,h=0;h>=1;return h},j.prototype.permute=function(o,s,d,h,S,k){for(var B=0;B>>=1)S++;return 1<>>=13,d[2*k+1]=8191&S,S>>>=13;for(k=2*s;k>=26,s+=h/67108864|0,s+=S>>>26,this.words[d]=67108863&S}return 0!==s&&(this.words[d]=s,this.length++),this},l.prototype.muln=function(o){return this.clone().imuln(o)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(o){var s=function x(C){for(var o=new Array(C.bitLength()),s=0;s>>h}return o}(o);if(0===s.length)return new l(1);for(var d=this,h=0;h=0);var S,s=o%26,d=(o-s)/26,h=67108863>>>26-s<<26-s;if(0!==s){var k=0;for(S=0;S>>26-s}k&&(this.words[S]=k,this.length++)}if(0!==d){for(S=this.length-1;S>=0;S--)this.words[S+d]=this.words[S];for(S=0;S=0),h=s?(s-s%26)/26:0;var S=o%26,k=Math.min((o-S)/26,this.length),B=67108863^67108863>>>S<k)for(this.length-=k,f=0;f=0&&(0!==R||f>=h);f--){var se=0|this.words[f];this.words[f]=R<<26-S|se>>>S,R=se&B}return I&&0!==R&&(I.words[I.length++]=R),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(o,s,d){return w(0===this.negative),this.iushrn(o,s,d)},l.prototype.shln=function(o){return this.clone().ishln(o)},l.prototype.ushln=function(o){return this.clone().iushln(o)},l.prototype.shrn=function(o){return this.clone().ishrn(o)},l.prototype.ushrn=function(o){return this.clone().iushrn(o)},l.prototype.testn=function(o){w("number"==typeof o&&o>=0);var s=o%26,d=(o-s)/26,h=1<=0);var s=o%26,d=(o-s)/26;if(w(0===this.negative,"imaskn works only with positive numbers"),this.length<=d)return this;if(0!==s&&d++,this.length=Math.min(d,this.length),0!==s){var h=67108863^67108863>>>s<=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},l.prototype.isubn=function(o){if(w("number"==typeof o),w(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s>26)-(I/67108864|0),this.words[S+d]=67108863&k}for(;S>26,this.words[S+d]=67108863&k;if(0===B)return this.strip();for(w(-1===B),B=0,S=0;S>26,this.words[S]=67108863&k;return this.negative=1,this.strip()},l.prototype._wordDiv=function(o,s){var d=(this.length,o.length),h=this.clone(),S=o,k=0|S.words[S.length-1];0!==(d=26-this._countBits(k))&&(S=S.ushln(d),h.iushln(d),k=0|S.words[S.length-1]);var f,I=h.length-S.length;if("mod"!==s){(f=new l(null)).length=I+1,f.words=new Array(f.length);for(var R=0;R=0;ee--){var oe=67108864*(0|h.words[S.length+ee])+(0|h.words[S.length+ee-1]);for(oe=Math.min(oe/k|0,67108863),h._ishlnsubmul(S,oe,ee);0!==h.negative;)oe--,h.negative=0,h._ishlnsubmul(S,1,ee),h.isZero()||(h.negative^=1);f&&(f.words[ee]=oe)}return f&&f.strip(),h.strip(),"div"!==s&&0!==d&&h.iushrn(d),{div:f||null,mod:h}},l.prototype.divmod=function(o,s,d){return w(!o.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:0!==this.negative&&0===o.negative?(k=this.neg().divmod(o,s),"mod"!==s&&(h=k.div.neg()),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.iadd(o)),{div:h,mod:S}):0===this.negative&&0!==o.negative?(k=this.divmod(o.neg(),s),"mod"!==s&&(h=k.div.neg()),{div:h,mod:k.mod}):this.negative&o.negative?(k=this.neg().divmod(o.neg(),s),"div"!==s&&(S=k.mod.neg(),d&&0!==S.negative&&S.isub(o)),{div:k.div,mod:S}):o.length>this.length||this.cmp(o)<0?{div:new l(0),mod:this}:1===o.length?"div"===s?{div:this.divn(o.words[0]),mod:null}:"mod"===s?{div:null,mod:new l(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new l(this.modn(o.words[0]))}:this._wordDiv(o,s);var h,S,k},l.prototype.div=function(o){return this.divmod(o,"div",!1).div},l.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},l.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},l.prototype.divRound=function(o){var s=this.divmod(o);if(s.mod.isZero())return s.div;var d=0!==s.div.negative?s.mod.isub(o):s.mod,h=o.ushrn(1),S=o.andln(1),k=d.cmp(h);return k<0||1===S&&0===k?s.div:0!==s.div.negative?s.div.isubn(1):s.div.iaddn(1)},l.prototype.modn=function(o){w(o<=67108863);for(var s=(1<<26)%o,d=0,h=this.length-1;h>=0;h--)d=(s*d+(0|this.words[h]))%o;return d},l.prototype.idivn=function(o){w(o<=67108863);for(var s=0,d=this.length-1;d>=0;d--){var h=(0|this.words[d])+67108864*s;this.words[d]=h/o|0,s=h%o}return this.strip()},l.prototype.divn=function(o){return this.clone().idivn(o)},l.prototype.egcd=function(o){w(0===o.negative),w(!o.isZero());var s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=new l(0),B=new l(1),I=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++I;for(var f=d.clone(),R=s.clone();!s.isZero();){for(var se=0,ee=1;!(s.words[0]&ee)&&se<26;++se,ee<<=1);if(se>0)for(s.iushrn(se);se-- >0;)(h.isOdd()||S.isOdd())&&(h.iadd(f),S.isub(R)),h.iushrn(1),S.iushrn(1);for(var oe=0,de=1;!(d.words[0]&de)&&oe<26;++oe,de<<=1);if(oe>0)for(d.iushrn(oe);oe-- >0;)(k.isOdd()||B.isOdd())&&(k.iadd(f),B.isub(R)),k.iushrn(1),B.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(k),S.isub(B)):(d.isub(s),k.isub(h),B.isub(S))}return{a:k,b:B,gcd:d.iushln(I)}},l.prototype._invmp=function(o){w(0===o.negative),w(!o.isZero());var se,s=this,d=o.clone();s=0!==s.negative?s.umod(o):s.clone();for(var h=new l(1),S=new l(0),k=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var B=0,I=1;!(s.words[0]&I)&&B<26;++B,I<<=1);if(B>0)for(s.iushrn(B);B-- >0;)h.isOdd()&&h.iadd(k),h.iushrn(1);for(var f=0,R=1;!(d.words[0]&R)&&f<26;++f,R<<=1);if(f>0)for(d.iushrn(f);f-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);s.cmp(d)>=0?(s.isub(d),h.isub(S)):(d.isub(s),S.isub(h))}return(se=0===s.cmpn(1)?h:S).cmpn(0)<0&&se.iadd(o),se},l.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var s=this.clone(),d=o.clone();s.negative=0,d.negative=0;for(var h=0;s.isEven()&&d.isEven();h++)s.iushrn(1),d.iushrn(1);for(;;){for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var S=s.cmp(d);if(S<0){var k=s;s=d,d=k}else if(0===S||0===d.cmpn(1))break;s.isub(d)}return d.iushln(h)},l.prototype.invm=function(o){return this.egcd(o).a.umod(o)},l.prototype.isEven=function(){return 0==(1&this.words[0])},l.prototype.isOdd=function(){return 1==(1&this.words[0])},l.prototype.andln=function(o){return this.words[0]&o},l.prototype.bincn=function(o){w("number"==typeof o);var s=o%26,d=(o-s)/26,h=1<>>26,B&=67108863,this.words[k]=B}return 0!==S&&(this.words[k]=S,this.length++),this},l.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},l.prototype.cmpn=function(o){var d,s=o<0;if(0!==this.negative&&!s)return-1;if(0===this.negative&&s)return 1;if(this.strip(),this.length>1)d=1;else{s&&(o=-o),w(o<=67108863,"Number is too big");var h=0|this.words[0];d=h===o?0:ho.length)return 1;if(this.length=0;d--){var h=0|this.words[d],S=0|o.words[d];if(h!==S){hS&&(s=1);break}}return s},l.prototype.gtn=function(o){return 1===this.cmpn(o)},l.prototype.gt=function(o){return 1===this.cmp(o)},l.prototype.gten=function(o){return this.cmpn(o)>=0},l.prototype.gte=function(o){return this.cmp(o)>=0},l.prototype.ltn=function(o){return-1===this.cmpn(o)},l.prototype.lt=function(o){return-1===this.cmp(o)},l.prototype.lten=function(o){return this.cmpn(o)<=0},l.prototype.lte=function(o){return this.cmp(o)<=0},l.prototype.eqn=function(o){return 0===this.cmpn(o)},l.prototype.eq=function(o){return 0===this.cmp(o)},l.red=function(o){return new H(o)},l.prototype.toRed=function(o){return w(!this.red,"Already a number in reduction context"),w(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},l.prototype.fromRed=function(){return w(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(o){return this.red=o,this},l.prototype.forceRed=function(o){return w(!this.red,"Already a number in reduction context"),this._forceRed(o)},l.prototype.redAdd=function(o){return w(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},l.prototype.redIAdd=function(o){return w(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},l.prototype.redSub=function(o){return w(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},l.prototype.redISub=function(o){return w(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},l.prototype.redShl=function(o){return w(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},l.prototype.redMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},l.prototype.redIMul=function(o){return w(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},l.prototype.redSqr=function(){return w(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return w(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return w(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return w(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return w(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(o){return w(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var W={k256:null,p224:null,p192:null,p25519:null};function Y(C,o){this.name=C,this.p=new l(o,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function G(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Q(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function H(C){if("string"==typeof C){var o=l._prime(C);this.m=o.p,this.prime=o}else w(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}function te(C){H.call(this,C),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}Y.prototype._tmp=function(){var o=new l(null);return o.words=new Array(Math.ceil(this.n/13)),o},Y.prototype.ireduce=function(o){var d,s=o;do{this.split(s,this.tmp),d=(s=(s=this.imulK(s)).iadd(this.tmp)).bitLength()}while(d>this.n);var h=d0?s.isub(this.p):void 0!==s.strip?s.strip():s._strip(),s},Y.prototype.split=function(o,s){o.iushrn(this.n,0,s)},Y.prototype.imulK=function(o){return o.imul(this.k)},_(G,Y),G.prototype.split=function(o,s){for(var d=4194303,h=Math.min(o.length,9),S=0;S>>22,k=B}k>>>=22,o.words[S-10]=k,0===k&&o.length>10?o.length-=10:o.length-=9},G.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var s=0,d=0;d>>=26,o.words[d]=S,s=h}return 0!==s&&(o.words[o.length++]=s),o},l._prime=function(o){if(W[o])return W[o];var s;if("k256"===o)s=new G;else if("p224"===o)s=new Q;else if("p192"===o)s=new q;else{if("p25519"!==o)throw new Error("Unknown prime "+o);s=new J}return W[o]=s,s},H.prototype._verify1=function(o){w(0===o.negative,"red works only with positives"),w(o.red,"red works only with red numbers")},H.prototype._verify2=function(o,s){w(0==(o.negative|s.negative),"red works only with positives"),w(o.red&&o.red===s.red,"red works only with red numbers")},H.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},H.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},H.prototype.add=function(o,s){this._verify2(o,s);var d=o.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},H.prototype.iadd=function(o,s){this._verify2(o,s);var d=o.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},H.prototype.sub=function(o,s){this._verify2(o,s);var d=o.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},H.prototype.isub=function(o,s){this._verify2(o,s);var d=o.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},H.prototype.shl=function(o,s){return this._verify1(o),this.imod(o.ushln(s))},H.prototype.imul=function(o,s){return this._verify2(o,s),this.imod(o.imul(s))},H.prototype.mul=function(o,s){return this._verify2(o,s),this.imod(o.mul(s))},H.prototype.isqr=function(o){return this.imul(o,o.clone())},H.prototype.sqr=function(o){return this.mul(o,o)},H.prototype.sqrt=function(o){if(o.isZero())return o.clone();var s=this.m.andln(3);if(w(s%2==1),3===s){var d=this.m.add(new l(1)).iushrn(2);return this.pow(o,d)}for(var h=this.m.subn(1),S=0;!h.isZero()&&0===h.andln(1);)S++,h.iushrn(1);w(!h.isZero());var k=new l(1).toRed(this),B=k.redNeg(),I=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new l(2*f*f).toRed(this);0!==this.pow(f,I).cmp(B);)f.redIAdd(B);for(var R=this.pow(f,h),se=this.pow(o,h.addn(1).iushrn(1)),ee=this.pow(o,h),oe=S;0!==ee.cmp(k);){for(var de=ee,Ce=0;0!==de.cmp(k);Ce++)de=de.redSqr();w(Ce=0;S--){for(var R=s.words[S],se=f-1;se>=0;se--){var ee=R>>se&1;(k!==h[0]&&(k=this.sqr(k)),0!==ee||0!==B)?(B<<=1,B|=ee,(4===++I||0===S&&0===se)&&(k=this.mul(k,h[B]),I=0,B=0)):I=0}f=26}return k},H.prototype.convertTo=function(o){var s=o.umod(this.m);return s===o?s.clone():s},H.prototype.convertFrom=function(o){var s=o.clone();return s.red=null,s},l.mont=function(o){return new te(o)},_(te,H),te.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},te.prototype.convertFrom=function(o){var s=this.imod(o.mul(this.rinv));return s.red=null,s},te.prototype.imul=function(o,s){if(o.isZero()||s.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.mul=function(o,s){if(o.isZero()||s.isZero())return new l(0)._forceRed(this);var d=o.mul(s),h=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=d.isub(h).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},te.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(re=g.nmd(re),this)},36705:(re,u,g)=>{var p=g(22772),D=g(86945),w=g(79401),_=g(82057),l=g(8466),v=g(96386),m=g(38651),b=g(73502).Buffer;re.exports=function(x,N,F){var L;L=x.padding?x.padding:F?1:4;var W,z=p(x),j=z.modulus.byteLength();if(N.length>j||new _(N).cmp(z.modulus)>=0)throw new Error("decryption error");W=F?m(new _(N),z):l(N,z);var Y=b.alloc(j-W.length);if(W=b.concat([Y,W],j),4===L)return function M(P,x){var N=P.modulus.byteLength(),F=v("sha1").update(b.alloc(0)).digest(),L=F.length;if(0!==x[0])throw new Error("decryption error");var z=x.slice(1,L+1),j=x.slice(L+1),W=w(z,D(j,L)),Y=w(j,D(W,N-L-1));if(function A(P,x){P=b.from(P),x=b.from(x);var N=0,F=P.length;P.length!==x.length&&(N++,F=Math.min(P.length,x.length));for(var L=-1;++L=x.length){z++;break}var j=x.slice(2,L-1);if(("0002"!==F.toString("hex")&&!N||"0001"!==F.toString("hex")&&N)&&z++,j.length<8&&z++,z)throw new Error("decryption error");return x.slice(L)}(0,W,F);if(3===L)return W;throw new Error("unknown padding")}},16562:(re,u,g)=>{var p=g(22772),D=g(53753),w=g(96386),_=g(86945),l=g(79401),v=g(82057),m=g(38651),b=g(8466),M=g(73502).Buffer;re.exports=function(N,F,L){var z;z=N.padding?N.padding:L?1:4;var W,j=p(N);if(4===z)W=function E(x,N){var F=x.modulus.byteLength(),L=N.length,z=w("sha1").update(M.alloc(0)).digest(),j=z.length,W=2*j;if(L>F-W-2)throw new Error("message too long");var Y=M.alloc(F-L-W-2),G=F-j-1,Q=D(j),q=l(M.concat([z,Y,M.alloc(1,1),N],G),_(Q,G)),J=l(Q,_(q,j));return new v(M.concat([M.alloc(1),J,q],F))}(j,F);else if(1===z)W=function A(x,N,F){var j,L=N.length,z=x.modulus.byteLength();if(L>z-11)throw new Error("message too long");return j=F?M.alloc(z-L-3,255):function P(x){for(var j,N=M.allocUnsafe(x),F=0,L=D(2*x),z=0;F=0)throw new Error("data too long for modulus")}return L?b(W,j):m(W,j)}},38651:(re,u,g)=>{var p=g(82057),D=g(73502).Buffer;re.exports=function w(_,l){return D.from(_.toRed(p.mont(l.modulus)).redPow(new p(l.publicExponent)).fromRed().toArray())}},79401:re=>{re.exports=function(g,p){for(var D=g.length,w=-1;++w{const p=g(88695),D=g(71465),w=g(23210),_=g(22334);function l(v,m,b,M,E){const A=[].slice.call(arguments,1),P=A.length,x="function"==typeof A[P-1];if(!x&&!p())throw new Error("Callback required as last argument");if(!x){if(P<1)throw new Error("Too few arguments provided");return 1===P?(b=m,m=M=void 0):2===P&&!m.getContext&&(M=b,b=m,m=void 0),new Promise(function(N,F){try{const L=D.create(b,M);N(v(L,m,M))}catch(L){F(L)}})}if(P<2)throw new Error("Too few arguments provided");2===P?(E=b,b=m,m=M=void 0):3===P&&(m.getContext&&typeof E>"u"?(E=M,M=void 0):(E=M,M=b,b=m,m=void 0));try{const N=D.create(b,M);E(null,v(N,m,M))}catch(N){E(N)}}u.create=D.create,u.toCanvas=l.bind(null,w.render),u.toDataURL=l.bind(null,w.renderToDataURL),u.toString=l.bind(null,function(v,m,b){return _.render(v,b)})},88695:re=>{re.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},46221:(re,u,g)=>{const p=g(34792).getSymbolSize;u.getRowColCoords=function(w){if(1===w)return[];const _=Math.floor(w/7)+2,l=p(w),v=145===l?26:2*Math.ceil((l-13)/(2*_-2)),m=[l-7];for(let b=1;b<_-1;b++)m[b]=m[b-1]-v;return m.push(6),m.reverse()},u.getPositions=function(w){const _=[],l=u.getRowColCoords(w),v=l.length;for(let m=0;m{const p=g(64016),D=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function w(_){this.mode=p.ALPHANUMERIC,this.data=_}w.getBitsLength=function(l){return 11*Math.floor(l/2)+l%2*6},w.prototype.getLength=function(){return this.data.length},w.prototype.getBitsLength=function(){return w.getBitsLength(this.data.length)},w.prototype.write=function(l){let v;for(v=0;v+2<=this.data.length;v+=2){let m=45*D.indexOf(this.data[v]);m+=D.indexOf(this.data[v+1]),l.put(m,11)}this.data.length%2&&l.put(D.indexOf(this.data[v]),6)},re.exports=w},52118:re=>{function u(){this.buffer=[],this.length=0}u.prototype={get:function(g){const p=Math.floor(g/8);return 1==(this.buffer[p]>>>7-g%8&1)},put:function(g,p){for(let D=0;D>>p-D-1&1))},getLengthInBits:function(){return this.length},putBit:function(g){const p=Math.floor(this.length/8);this.buffer.length<=p&&this.buffer.push(0),g&&(this.buffer[p]|=128>>>this.length%8),this.length++}},re.exports=u},34425:re=>{function u(g){if(!g||g<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=g,this.data=new Uint8Array(g*g),this.reservedBit=new Uint8Array(g*g)}u.prototype.set=function(g,p,D,w){const _=g*this.size+p;this.data[_]=D,w&&(this.reservedBit[_]=!0)},u.prototype.get=function(g,p){return this.data[g*this.size+p]},u.prototype.xor=function(g,p,D){this.data[g*this.size+p]^=D},u.prototype.isReserved=function(g,p){return this.reservedBit[g*this.size+p]},re.exports=u},85663:(re,u,g)=>{const p=g(38419),D=g(64016);function w(_){this.mode=D.BYTE,"string"==typeof _&&(_=p(_)),this.data=new Uint8Array(_)}w.getBitsLength=function(l){return 8*l},w.prototype.getLength=function(){return this.data.length},w.prototype.getBitsLength=function(){return w.getBitsLength(this.data.length)},w.prototype.write=function(_){for(let l=0,v=this.data.length;l{const p=g(82259),D=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],w=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];u.getBlocksCount=function(l,v){switch(v){case p.L:return D[4*(l-1)+0];case p.M:return D[4*(l-1)+1];case p.Q:return D[4*(l-1)+2];case p.H:return D[4*(l-1)+3];default:return}},u.getTotalCodewordsCount=function(l,v){switch(v){case p.L:return w[4*(l-1)+0];case p.M:return w[4*(l-1)+1];case p.Q:return w[4*(l-1)+2];case p.H:return w[4*(l-1)+3];default:return}}},82259:(re,u)=>{u.L={bit:1},u.M={bit:0},u.Q={bit:3},u.H={bit:2},u.isValid=function(D){return D&&typeof D.bit<"u"&&D.bit>=0&&D.bit<4},u.from=function(D,w){if(u.isValid(D))return D;try{return function g(p){if("string"!=typeof p)throw new Error("Param is not a string");switch(p.toLowerCase()){case"l":case"low":return u.L;case"m":case"medium":return u.M;case"q":case"quartile":return u.Q;case"h":case"high":return u.H;default:throw new Error("Unknown EC Level: "+p)}}(D)}catch{return w}}},43114:(re,u,g)=>{const p=g(34792).getSymbolSize;u.getPositions=function(_){const l=p(_);return[[0,0],[l-7,0],[0,l-7]]}},17078:(re,u,g)=>{const p=g(34792),_=p.getBCHDigit(1335);u.getEncodedBits=function(v,m){const b=v.bit<<3|m;let M=b<<10;for(;p.getBCHDigit(M)-_>=0;)M^=1335<{const g=new Uint8Array(512),p=new Uint8Array(256);(function(){let w=1;for(let _=0;_<255;_++)g[_]=w,p[w]=_,w<<=1,256&w&&(w^=285);for(let _=255;_<512;_++)g[_]=g[_-255]})(),u.log=function(w){if(w<1)throw new Error("log("+w+")");return p[w]},u.exp=function(w){return g[w]},u.mul=function(w,_){return 0===w||0===_?0:g[p[w]+p[_]]}},80449:(re,u,g)=>{const p=g(64016),D=g(34792);function w(_){this.mode=p.KANJI,this.data=_}w.getBitsLength=function(l){return 13*l},w.prototype.getLength=function(){return this.data.length},w.prototype.getBitsLength=function(){return w.getBitsLength(this.data.length)},w.prototype.write=function(_){let l;for(l=0;l=33088&&v<=40956)v-=33088;else{if(!(v>=57408&&v<=60351))throw new Error("Invalid SJIS character: "+this.data[l]+"\nMake sure your charset is UTF-8");v-=49472}v=192*(v>>>8&255)+(255&v),_.put(v,13)}},re.exports=w},33667:(re,u)=>{u.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const g_N1=3,g_N2=3,g_N3=40,g_N4=10;function p(D,w,_){switch(D){case u.Patterns.PATTERN000:return(w+_)%2==0;case u.Patterns.PATTERN001:return w%2==0;case u.Patterns.PATTERN010:return _%3==0;case u.Patterns.PATTERN011:return(w+_)%3==0;case u.Patterns.PATTERN100:return(Math.floor(w/2)+Math.floor(_/3))%2==0;case u.Patterns.PATTERN101:return w*_%2+w*_%3==0;case u.Patterns.PATTERN110:return(w*_%2+w*_%3)%2==0;case u.Patterns.PATTERN111:return(w*_%3+(w+_)%2)%2==0;default:throw new Error("bad maskPattern:"+D)}}u.isValid=function(w){return null!=w&&""!==w&&!isNaN(w)&&w>=0&&w<=7},u.from=function(w){return u.isValid(w)?parseInt(w,10):void 0},u.getPenaltyN1=function(w){const _=w.size;let l=0,v=0,m=0,b=null,M=null;for(let E=0;E<_;E++){v=m=0,b=M=null;for(let A=0;A<_;A++){let P=w.get(E,A);P===b?v++:(v>=5&&(l+=g_N1+(v-5)),b=P,v=1),P=w.get(A,E),P===M?m++:(m>=5&&(l+=g_N1+(m-5)),M=P,m=1)}v>=5&&(l+=g_N1+(v-5)),m>=5&&(l+=g_N1+(m-5))}return l},u.getPenaltyN2=function(w){const _=w.size;let l=0;for(let v=0;v<_-1;v++)for(let m=0;m<_-1;m++){const b=w.get(v,m)+w.get(v,m+1)+w.get(v+1,m)+w.get(v+1,m+1);(4===b||0===b)&&l++}return l*g_N2},u.getPenaltyN3=function(w){const _=w.size;let l=0,v=0,m=0;for(let b=0;b<_;b++){v=m=0;for(let M=0;M<_;M++)v=v<<1&2047|w.get(b,M),M>=10&&(1488===v||93===v)&&l++,m=m<<1&2047|w.get(M,b),M>=10&&(1488===m||93===m)&&l++}return l*g_N3},u.getPenaltyN4=function(w){let _=0;const l=w.data.length;for(let m=0;m{const p=g(94406),D=g(2699);u.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},u.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},u.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},u.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},u.MIXED={bit:-1},u.getCharCountIndicator=function(l,v){if(!l.ccBits)throw new Error("Invalid mode: "+l);if(!p.isValid(v))throw new Error("Invalid version: "+v);return v>=1&&v<10?l.ccBits[0]:v<27?l.ccBits[1]:l.ccBits[2]},u.getBestModeForData=function(l){return D.testNumeric(l)?u.NUMERIC:D.testAlphanumeric(l)?u.ALPHANUMERIC:D.testKanji(l)?u.KANJI:u.BYTE},u.toString=function(l){if(l&&l.id)return l.id;throw new Error("Invalid mode")},u.isValid=function(l){return l&&l.bit&&l.ccBits},u.from=function(l,v){if(u.isValid(l))return l;try{return function w(_){if("string"!=typeof _)throw new Error("Param is not a string");switch(_.toLowerCase()){case"numeric":return u.NUMERIC;case"alphanumeric":return u.ALPHANUMERIC;case"kanji":return u.KANJI;case"byte":return u.BYTE;default:throw new Error("Unknown mode: "+_)}}(l)}catch{return v}}},97783:(re,u,g)=>{const p=g(64016);function D(w){this.mode=p.NUMERIC,this.data=w.toString()}D.getBitsLength=function(_){return 10*Math.floor(_/3)+(_%3?_%3*3+1:0)},D.prototype.getLength=function(){return this.data.length},D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)},D.prototype.write=function(_){let l,v,m;for(l=0;l+3<=this.data.length;l+=3)v=this.data.substr(l,3),m=parseInt(v,10),_.put(m,10);const b=this.data.length-l;b>0&&(v=this.data.substr(l),m=parseInt(v,10),_.put(m,3*b+1))},re.exports=D},61106:(re,u,g)=>{const p=g(45339);u.mul=function(w,_){const l=new Uint8Array(w.length+_.length-1);for(let v=0;v=0;){const v=l[0];for(let b=0;b<_.length;b++)l[b]^=p.mul(_[b],v);let m=0;for(;m{const p=g(34792),D=g(82259),w=g(52118),_=g(34425),l=g(46221),v=g(43114),m=g(33667),b=g(14655),M=g(12636),E=g(42088),A=g(17078),P=g(64016),x=g(62033);function j(q,J,H){const te=q.size,C=A.getEncodedBits(J,H);let o,s;for(o=0;o<15;o++)s=1==(C>>o&1),o<6?q.set(o,8,s,!0):o<8?q.set(o+1,8,s,!0):q.set(te-15+o,8,s,!0),o<8?q.set(8,te-o-1,s,!0):o<9?q.set(8,15-o-1+1,s,!0):q.set(8,15-o-1,s,!0);q.set(te-8,8,1,!0)}function Y(q,J,H){const te=new w;H.forEach(function(h){te.put(h.mode.bit,4),te.put(h.getLength(),P.getCharCountIndicator(h.mode,q)),h.write(te)});const s=8*(p.getSymbolTotalCodewords(q)-b.getTotalCodewordsCount(q,J));for(te.getLengthInBits()+4<=s&&te.put(0,4);te.getLengthInBits()%8!=0;)te.putBit(0);const d=(s-te.getLengthInBits())/8;for(let h=0;h=0&&d<=6&&(0===h||6===h)||h>=0&&h<=6&&(0===d||6===d)||d>=2&&d<=4&&h>=2&&h<=4?q.set(o+d,s+h,!0,!0):q.set(o+d,s+h,!1,!0))}}(h,J),function F(q){const J=q.size;for(let H=8;H=7&&function z(q,J){const H=q.size,te=E.getEncodedBits(J);let C,o,s;for(let d=0;d<18;d++)C=Math.floor(d/3),o=d%3+H-8-3,s=1==(te>>d&1),q.set(C,o,s,!0),q.set(o,C,s,!0)}(h,J),function W(q,J){const H=q.size;let te=-1,C=H-1,o=7,s=0;for(let d=H-1;d>0;d-=2)for(6===d&&d--;;){for(let h=0;h<2;h++)if(!q.isReserved(C,d-h)){let S=!1;s>>o&1)),q.set(C,d-h,S),o--,-1===o&&(s++,o=7)}if(C+=te,C<0||H<=C){C-=te,te=-te;break}}}(h,s),isNaN(te)&&(te=m.getBestMask(h,j.bind(null,h,H))),m.applyMask(te,h),j(h,H,te),{modules:h,version:J,errorCorrectionLevel:H,maskPattern:te,segments:C}}u.create=function(J,H){if(typeof J>"u"||""===J)throw new Error("No input text");let C,o,te=D.M;return typeof H<"u"&&(te=D.from(H.errorCorrectionLevel,D.M),C=E.from(H.version),o=m.from(H.maskPattern),H.toSJISFunc&&p.setToSJISFunction(H.toSJISFunc)),Q(J,C,te,o)}},12636:(re,u,g)=>{const p=g(61106);function D(w){this.genPoly=void 0,this.degree=w,this.degree&&this.initialize(this.degree)}D.prototype.initialize=function(_){this.degree=_,this.genPoly=p.generateECPolynomial(this.degree)},D.prototype.encode=function(_){if(!this.genPoly)throw new Error("Encoder not initialized");const l=new Uint8Array(_.length+this.degree);l.set(_);const v=p.mod(l,this.genPoly),m=this.degree-v.length;if(m>0){const b=new Uint8Array(this.degree);return b.set(v,m),b}return v},re.exports=D},2699:(re,u)=>{const g="[0-9]+";let D="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";D=D.replace(/u/g,"\\u");const w="(?:(?![A-Z0-9 $%*+\\-./:]|"+D+")(?:.|[\r\n]))+";u.KANJI=new RegExp(D,"g"),u.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),u.BYTE=new RegExp(w,"g"),u.NUMERIC=new RegExp(g,"g"),u.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const _=new RegExp("^"+D+"$"),l=new RegExp("^"+g+"$"),v=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");u.testKanji=function(b){return _.test(b)},u.testNumeric=function(b){return l.test(b)},u.testAlphanumeric=function(b){return v.test(b)}},62033:(re,u,g)=>{const p=g(64016),D=g(97783),w=g(32424),_=g(85663),l=g(80449),v=g(2699),m=g(34792),b=g(74901);function M(z){return unescape(encodeURIComponent(z)).length}function E(z,j,W){const Y=[];let G;for(;null!==(G=z.exec(W));)Y.push({data:G[0],index:G.index,mode:j,length:G[0].length});return Y}function A(z){const j=E(v.NUMERIC,p.NUMERIC,z),W=E(v.ALPHANUMERIC,p.ALPHANUMERIC,z);let Y,G;return m.isKanjiModeEnabled()?(Y=E(v.BYTE,p.BYTE,z),G=E(v.KANJI,p.KANJI,z)):(Y=E(v.BYTE_KANJI,p.BYTE,z),G=[]),j.concat(W,Y,G).sort(function(q,J){return q.index-J.index}).map(function(q){return{data:q.data,mode:q.mode,length:q.length}})}function P(z,j){switch(j){case p.NUMERIC:return D.getBitsLength(z);case p.ALPHANUMERIC:return w.getBitsLength(z);case p.KANJI:return l.getBitsLength(z);case p.BYTE:return _.getBitsLength(z)}}function L(z,j){let W;const Y=p.getBestModeForData(z);if(W=p.from(j,Y),W!==p.BYTE&&W.bit=0?j[j.length-1]:null;return Y&&Y.mode===W.mode?(j[j.length-1].data+=W.data,j):(j.push(W),j)},[])}(J))},u.rawSplit=function(j){return u.fromArray(A(j,m.isKanjiModeEnabled()))}},34792:(re,u)=>{let g;const p=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];u.getSymbolSize=function(w){if(!w)throw new Error('"version" cannot be null or undefined');if(w<1||w>40)throw new Error('"version" should be in range from 1 to 40');return 4*w+17},u.getSymbolTotalCodewords=function(w){return p[w]},u.getBCHDigit=function(D){let w=0;for(;0!==D;)w++,D>>>=1;return w},u.setToSJISFunction=function(w){if("function"!=typeof w)throw new Error('"toSJISFunc" is not a valid function.');g=w},u.isKanjiModeEnabled=function(){return typeof g<"u"},u.toSJIS=function(w){return g(w)}},94406:(re,u)=>{u.isValid=function(p){return!isNaN(p)&&p>=1&&p<=40}},42088:(re,u,g)=>{const p=g(34792),D=g(14655),w=g(82259),_=g(64016),l=g(94406),m=p.getBCHDigit(7973);function M(P,x){return _.getCharCountIndicator(P,x)+4}function E(P,x){let N=0;return P.forEach(function(F){const L=M(F.mode,x);N+=L+F.getBitsLength()}),N}u.from=function(x,N){return l.isValid(x)?parseInt(x,10):N},u.getCapacity=function(x,N,F){if(!l.isValid(x))throw new Error("Invalid QR Code version");typeof F>"u"&&(F=_.BYTE);const j=8*(p.getSymbolTotalCodewords(x)-D.getTotalCodewordsCount(x,N));if(F===_.MIXED)return j;const W=j-M(F,x);switch(F){case _.NUMERIC:return Math.floor(W/10*3);case _.ALPHANUMERIC:return Math.floor(W/11*2);case _.KANJI:return Math.floor(W/13);case _.BYTE:default:return Math.floor(W/8)}},u.getBestVersionForData=function(x,N){let F;const L=w.from(N,w.M);if(Array.isArray(x)){if(x.length>1)return function A(P,x){for(let N=1;N<=40;N++)if(E(P,N)<=u.getCapacity(N,x,_.MIXED))return N}(x,L);if(0===x.length)return 1;F=x[0]}else F=x;return function b(P,x,N){for(let F=1;F<=40;F++)if(x<=u.getCapacity(F,N,P))return F}(F.mode,F.getLength(),L)},u.getEncodedBits=function(x){if(!l.isValid(x)||x<7)throw new Error("Invalid QR Code version");let N=x<<12;for(;p.getBCHDigit(N)-m>=0;)N^=7973<{const p=g(36355);u.render=function(l,v,m){let b=m,M=v;typeof b>"u"&&(!v||!v.getContext)&&(b=v,v=void 0),v||(M=function w(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),b=p.getOptions(b);const E=p.getImageWidth(l.modules.size,b),A=M.getContext("2d"),P=A.createImageData(E,E);return p.qrToImageData(P.data,l,b),function D(_,l,v){_.clearRect(0,0,l.width,l.height),l.style||(l.style={}),l.height=v,l.width=v,l.style.height=v+"px",l.style.width=v+"px"}(A,M,E),A.putImageData(P,0,0),M},u.renderToDataURL=function(l,v,m){let b=m;typeof b>"u"&&(!v||!v.getContext)&&(b=v,v=void 0),b||(b={});const M=u.render(l,v,b),E=b.type||"image/png",A=b.rendererOpts||{};return M.toDataURL(E,A.quality)}},22334:(re,u,g)=>{const p=g(36355);function D(l,v){const m=l.a/255,b=v+'="'+l.hex+'"';return m<1?b+" "+v+'-opacity="'+m.toFixed(2).slice(1)+'"':b}function w(l,v,m){let b=l+v;return typeof m<"u"&&(b+=" "+m),b}u.render=function(v,m,b){const M=p.getOptions(m),E=v.modules.size,A=v.modules.data,P=E+2*M.margin,x=M.color.light.a?"':"",N="0&&x>0&&l[P-1]||(b+=E?w("M",x+m,.5+N+m):w("m",M,0),M=0,E=!1),x+1',F='viewBox="0 0 '+P+" "+P+'"',z=''+x+N+"\n";return"function"==typeof b&&b(null,z),z}},36355:(re,u)=>{function g(p){if("number"==typeof p&&(p=p.toString()),"string"!=typeof p)throw new Error("Color should be defined as hex string");let D=p.slice().replace("#","").split("");if(D.length<3||5===D.length||D.length>8)throw new Error("Invalid hex color: "+p);(3===D.length||4===D.length)&&(D=Array.prototype.concat.apply([],D.map(function(_){return[_,_]}))),6===D.length&&D.push("F","F");const w=parseInt(D.join(""),16);return{r:w>>24&255,g:w>>16&255,b:w>>8&255,a:255&w,hex:"#"+D.slice(0,6).join("")}}u.getOptions=function(D){D||(D={}),D.color||(D.color={});const w=typeof D.margin>"u"||null===D.margin||D.margin<0?4:D.margin,_=D.width&&D.width>=21?D.width:void 0,l=D.scale||4;return{width:_,scale:_?4:l,margin:w,color:{dark:g(D.color.dark||"#000000ff"),light:g(D.color.light||"#ffffffff")},type:D.type,rendererOpts:D.rendererOpts||{}}},u.getScale=function(D,w){return w.width&&w.width>=D+2*w.margin?w.width/(D+2*w.margin):w.scale},u.getImageWidth=function(D,w){const _=u.getScale(D,w);return Math.floor((D+2*w.margin)*_)},u.qrToImageData=function(D,w,_){const l=w.modules.size,v=w.modules.data,m=u.getScale(l,_),b=Math.floor((l+2*_.margin)*m),M=_.margin*m,E=[_.color.light,_.color.dark];for(let A=0;A=M&&P>=M&&A{"use strict";const p=g(18372),D=g(12761),w=g(78951),_=g(44770),v=Symbol("encodeFragmentIdentifier");function M(j){if("string"!=typeof j||1!==j.length)throw new TypeError("arrayFormatSeparator must be single character string")}function E(j,W){return W.encode?W.strict?p(j):encodeURIComponent(j):j}function A(j,W){return W.decode?D(j):j}function P(j){return Array.isArray(j)?j.sort():"object"==typeof j?P(Object.keys(j)).sort((W,Y)=>Number(W)-Number(Y)).map(W=>j[W]):j}function x(j){const W=j.indexOf("#");return-1!==W&&(j=j.slice(0,W)),j}function F(j){const W=(j=x(j)).indexOf("?");return-1===W?"":j.slice(W+1)}function L(j,W){return W.parseNumbers&&!Number.isNaN(Number(j))&&"string"==typeof j&&""!==j.trim()?j=Number(j):W.parseBooleans&&null!==j&&("true"===j.toLowerCase()||"false"===j.toLowerCase())&&(j="true"===j.toLowerCase()),j}function z(j,W){M((W=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},W)).arrayFormatSeparator);const Y=function b(j){let W;switch(j.arrayFormat){case"index":return(Y,G,Q)=>{W=/\[(\d*)\]$/.exec(Y),Y=Y.replace(/\[\d*\]$/,""),W?(void 0===Q[Y]&&(Q[Y]={}),Q[Y][W[1]]=G):Q[Y]=G};case"bracket":return(Y,G,Q)=>{W=/(\[\])$/.exec(Y),Y=Y.replace(/\[\]$/,""),W?void 0!==Q[Y]?Q[Y]=[].concat(Q[Y],G):Q[Y]=[G]:Q[Y]=G};case"colon-list-separator":return(Y,G,Q)=>{W=/(:list)$/.exec(Y),Y=Y.replace(/:list$/,""),W?void 0!==Q[Y]?Q[Y]=[].concat(Q[Y],G):Q[Y]=[G]:Q[Y]=G};case"comma":case"separator":return(Y,G,Q)=>{const q="string"==typeof G&&G.includes(j.arrayFormatSeparator),J="string"==typeof G&&!q&&A(G,j).includes(j.arrayFormatSeparator);G=J?A(G,j):G;const H=q||J?G.split(j.arrayFormatSeparator).map(te=>A(te,j)):null===G?G:A(G,j);Q[Y]=H};case"bracket-separator":return(Y,G,Q)=>{const q=/(\[\])$/.test(Y);if(Y=Y.replace(/\[\]$/,""),!q)return void(Q[Y]=G&&A(G,j));const J=null===G?[]:G.split(j.arrayFormatSeparator).map(H=>A(H,j));void 0!==Q[Y]?Q[Y]=[].concat(Q[Y],J):Q[Y]=J};default:return(Y,G,Q)=>{void 0!==Q[Y]?Q[Y]=[].concat(Q[Y],G):Q[Y]=G}}}(W),G=Object.create(null);if("string"!=typeof j||!(j=j.trim().replace(/^[?#&]/,"")))return G;for(const Q of j.split("&")){if(""===Q)continue;let[q,J]=w(W.decode?Q.replace(/\+/g," "):Q,"=");J=void 0===J?null:["comma","separator","bracket-separator"].includes(W.arrayFormat)?J:A(J,W),Y(A(q,W),J,G)}for(const Q of Object.keys(G)){const q=G[Q];if("object"==typeof q&&null!==q)for(const J of Object.keys(q))q[J]=L(q[J],W);else G[Q]=L(q,W)}return!1===W.sort?G:(!0===W.sort?Object.keys(G).sort():Object.keys(G).sort(W.sort)).reduce((Q,q)=>{const J=G[q];return Boolean(J)&&"object"==typeof J&&!Array.isArray(J)?Q[q]=P(J):Q[q]=J,Q},Object.create(null))}u.extract=F,u.parse=z,u.stringify=(j,W)=>{if(!j)return"";M((W=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},W)).arrayFormatSeparator);const Y=J=>W.skipNull&&(j=>null==j)(j[J])||W.skipEmptyString&&""===j[J],G=function m(j){switch(j.arrayFormat){case"index":return W=>(Y,G)=>{const Q=Y.length;return void 0===G||j.skipNull&&null===G||j.skipEmptyString&&""===G?Y:null===G?[...Y,[E(W,j),"[",Q,"]"].join("")]:[...Y,[E(W,j),"[",E(Q,j),"]=",E(G,j)].join("")]};case"bracket":return W=>(Y,G)=>void 0===G||j.skipNull&&null===G||j.skipEmptyString&&""===G?Y:null===G?[...Y,[E(W,j),"[]"].join("")]:[...Y,[E(W,j),"[]=",E(G,j)].join("")];case"colon-list-separator":return W=>(Y,G)=>void 0===G||j.skipNull&&null===G||j.skipEmptyString&&""===G?Y:null===G?[...Y,[E(W,j),":list="].join("")]:[...Y,[E(W,j),":list=",E(G,j)].join("")];case"comma":case"separator":case"bracket-separator":{const W="bracket-separator"===j.arrayFormat?"[]=":"=";return Y=>(G,Q)=>void 0===Q||j.skipNull&&null===Q||j.skipEmptyString&&""===Q?G:(Q=null===Q?"":Q,0===G.length?[[E(Y,j),W,E(Q,j)].join("")]:[[G,E(Q,j)].join(j.arrayFormatSeparator)])}default:return W=>(Y,G)=>void 0===G||j.skipNull&&null===G||j.skipEmptyString&&""===G?Y:null===G?[...Y,E(W,j)]:[...Y,[E(W,j),"=",E(G,j)].join("")]}}(W),Q={};for(const J of Object.keys(j))Y(J)||(Q[J]=j[J]);const q=Object.keys(Q);return!1!==W.sort&&q.sort(W.sort),q.map(J=>{const H=j[J];return void 0===H?"":null===H?E(J,W):Array.isArray(H)?0===H.length&&"bracket-separator"===W.arrayFormat?E(J,W)+"[]":H.reduce(G(J),[]).join("&"):E(J,W)+"="+E(H,W)}).filter(J=>J.length>0).join("&")},u.parseUrl=(j,W)=>{W=Object.assign({decode:!0},W);const[Y,G]=w(j,"#");return Object.assign({url:Y.split("?")[0]||"",query:z(F(j),W)},W&&W.parseFragmentIdentifier&&G?{fragmentIdentifier:A(G,W)}:{})},u.stringifyUrl=(j,W)=>{W=Object.assign({encode:!0,strict:!0,[v]:!0},W);const Y=x(j.url).split("?")[0]||"",G=u.extract(j.url),Q=u.parse(G,{sort:!1}),q=Object.assign(Q,j.query);let J=u.stringify(q,W);J&&(J=`?${J}`);let H=function N(j){let W="";const Y=j.indexOf("#");return-1!==Y&&(W=j.slice(Y)),W}(j.url);return j.fragmentIdentifier&&(H=`#${W[v]?E(j.fragmentIdentifier,W):j.fragmentIdentifier}`),`${Y}${J}${H}`},u.pick=(j,W,Y)=>{Y=Object.assign({parseFragmentIdentifier:!0,[v]:!1},Y);const{url:G,query:Q,fragmentIdentifier:q}=u.parseUrl(j,Y);return u.stringifyUrl({url:G,query:_(Q,W),fragmentIdentifier:q},Y)},u.exclude=(j,W,Y)=>{const G=Array.isArray(W)?Q=>!W.includes(Q):(Q,q)=>!W(Q,q);return u.pick(j,G,Y)}},90516:re=>{"use strict";function u(g,p){return Object.prototype.hasOwnProperty.call(g,p)}re.exports=function(g,p,D,w){p=p||"&",D=D||"=";var _={};if("string"!=typeof g||0===g.length)return _;var l=/\+/g;g=g.split(p);var v=1e3;w&&"number"==typeof w.maxKeys&&(v=w.maxKeys);var m=g.length;v>0&&m>v&&(m=v);for(var b=0;b=0?(A=M.substr(0,E),P=M.substr(E+1)):(A=M,P=""),x=decodeURIComponent(A),N=decodeURIComponent(P),u(_,x)?Array.isArray(_[x])?_[x].push(N):_[x]=[_[x],N]:_[x]=N}return _}},75776:re=>{"use strict";var u=function(g){switch(typeof g){case"string":return g;case"boolean":return g?"true":"false";case"number":return isFinite(g)?g:"";default:return""}};re.exports=function(g,p,D,w){return p=p||"&",D=D||"=",null===g&&(g=void 0),"object"==typeof g?Object.keys(g).map(function(_){var l=encodeURIComponent(u(_))+D;return Array.isArray(g[_])?g[_].map(function(v){return l+encodeURIComponent(u(v))}).join(p):l+encodeURIComponent(u(g[_]))}).join(p):w?encodeURIComponent(u(w))+D+encodeURIComponent(u(g)):""}},17137:(re,u,g)=>{"use strict";u.decode=u.parse=g(90516),u.encode=u.stringify=g(75776)},18958:re=>{"use strict";function u(p){try{return JSON.stringify(p)}catch{return'"[Circular]"'}}re.exports=function g(p,D,w){var _=w&&w.stringify||u;if("object"==typeof p&&null!==p){var v=D.length+1;if(1===v)return p;var m=new Array(v);m[0]=_(p);for(var b=1;b-1?P:0,p.charCodeAt(N+1)){case 100:case 102:if(A>=M||null==D[A])break;P=M||null==D[A])break;P=M||void 0===D[A])break;P",P=N+2,N++;break}E+=_(D[A]),P=N+2,N++;break;case 115:if(A>=M)break;P{"use strict";var p=65536,D=4294967295;var _=g(73502).Buffer,l=global.crypto||global.msCrypto;l&&l.getRandomValues?re.exports=function v(m,b){if(m>D)throw new RangeError("requested too many random bytes");var M=_.allocUnsafe(m);if(m>0)if(m>p)for(var E=0;E{"use strict";function p(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var D=g(73502),w=g(53753),_=D.Buffer,l=D.kMaxLength,v=global.crypto||global.msCrypto,m=Math.pow(2,32)-1;function b(x,N){if("number"!=typeof x||x!=x)throw new TypeError("offset must be a number");if(x>m||x<0)throw new TypeError("offset must be a uint32");if(x>l||x>N)throw new RangeError("offset out of range")}function M(x,N,F){if("number"!=typeof x||x!=x)throw new TypeError("size must be a number");if(x>m||x<0)throw new TypeError("size must be a uint32");if(x+N>F||x>l)throw new RangeError("buffer too small")}function A(x,N,F,L){if(process.browser){var z=x.buffer,j=new Uint8Array(z,N,F);return v.getRandomValues(j),L?void process.nextTick(function(){L(null,x)}):x}if(!L)return w(F).copy(x,N),x;w(F,function(Y,G){if(Y)return L(Y);G.copy(x,N),L(null,x)})}v&&v.getRandomValues||!process.browser?(u.randomFill=function E(x,N,F,L){if(!(_.isBuffer(x)||x instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof N)L=N,N=0,F=x.length;else if("function"==typeof F)L=F,F=x.length-N;else if("function"!=typeof L)throw new TypeError('"cb" argument must be a function');return b(N,x.length),M(F,N,x.length),A(x,N,F,L)},u.randomFillSync=function P(x,N,F){if(typeof N>"u"&&(N=0),!(_.isBuffer(x)||x instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return b(N,x.length),void 0===F&&(F=x.length-N),M(F,N,x.length),A(x,N,F)}):(u.randomFill=p,u.randomFillSync=p)},66509:(re,u,g)=>{"use strict";var p=g(54284),D=g(44854);function w(O){for(var V="https://reactjs.org/docs/error-decoder.html?invariant="+O,ne=1;ne"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),M=Object.prototype.hasOwnProperty,E=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,A={},P={};function L(O,V,ne,le,De,Ne,We){this.acceptsBooleans=2===V||3===V||4===V,this.attributeName=le,this.attributeNamespace=De,this.mustUseProperty=ne,this.propertyName=O,this.type=V,this.sanitizeURL=Ne,this.removeEmptyString=We}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(O){z[O]=new L(O,0,!1,O,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(O){var V=O[0];z[V]=new L(V,1,!1,O[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(O){z[O]=new L(O,2,!1,O.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(O){z[O]=new L(O,2,!1,O,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(O){z[O]=new L(O,3,!1,O.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(O){z[O]=new L(O,3,!0,O,null,!1,!1)}),["capture","download"].forEach(function(O){z[O]=new L(O,4,!1,O,null,!1,!1)}),["cols","rows","size","span"].forEach(function(O){z[O]=new L(O,6,!1,O,null,!1,!1)}),["rowSpan","start"].forEach(function(O){z[O]=new L(O,5,!1,O.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function W(O){return O[1].toUpperCase()}function Y(O,V,ne,le){var De=z.hasOwnProperty(V)?z[V]:null;(null!==De?0!==De.type:le||!(2"u"||function N(O,V,ne,le){if(null!==ne&&0===ne.type)return!1;switch(typeof V){case"function":case"symbol":return!0;case"boolean":return!le&&(null!==ne?!ne.acceptsBooleans:"data-"!==(O=O.toLowerCase().slice(0,5))&&"aria-"!==O);default:return!1}}(O,V,ne,le))return!0;if(le)return!1;if(null!==ne)switch(ne.type){case 3:return!V;case 4:return!1===V;case 5:return isNaN(V);case 6:return isNaN(V)||1>V}return!1}(V,ne,De,le)&&(ne=null),le||null===De?function x(O){return!!M.call(P,O)||!M.call(A,O)&&(E.test(O)?P[O]=!0:(A[O]=!0,!1))}(V)&&(null===ne?O.removeAttribute(V):O.setAttribute(V,""+ne)):De.mustUseProperty?O[De.propertyName]=null===ne?3!==De.type&&"":ne:(V=De.attributeName,le=De.attributeNamespace,null===ne?O.removeAttribute(V):(ne=3===(De=De.type)||4===De&&!0===ne?"":""+ne,le?O.setAttributeNS(le,V,ne):O.setAttribute(V,ne))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(O){var V=O.replace(j,W);z[V]=new L(V,1,!1,O,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(O){var V=O.replace(j,W);z[V]=new L(V,1,!1,O,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(O){var V=O.replace(j,W);z[V]=new L(V,1,!1,O,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(O){z[O]=new L(O,1,!1,O.toLowerCase(),null,!1,!1)}),z.xlinkHref=new L("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(O){z[O]=new L(O,1,!1,O.toLowerCase(),null,!0,!0)});var G=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Q=Symbol.for("react.element"),q=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),k=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var B=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var I=Symbol.iterator;function f(O){return null===O||"object"!=typeof O?null:"function"==typeof(O=I&&O[I]||O["@@iterator"])?O:null}var se,R=Object.assign;function ee(O){if(void 0===se)try{throw Error()}catch(ne){var V=ne.stack.trim().match(/\n( *(at )?)/);se=V&&V[1]||""}return"\n"+se+O}var oe=!1;function de(O,V){if(!O||oe)return"";oe=!0;var ne=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(V)if(V=function(){throw Error()},Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(V,[])}catch(Rt){var le=Rt}Reflect.construct(O,[],V)}else{try{V.call()}catch(Rt){le=Rt}O.call(V.prototype)}else{try{throw Error()}catch(Rt){le=Rt}O()}}catch(Rt){if(Rt&&le&&"string"==typeof Rt.stack){for(var De=Rt.stack.split("\n"),Ne=le.stack.split("\n"),We=De.length-1,rt=Ne.length-1;1<=We&&0<=rt&&De[We]!==Ne[rt];)rt--;for(;1<=We&&0<=rt;We--,rt--)if(De[We]!==Ne[rt]){if(1!==We||1!==rt)do{if(We--,0>--rt||De[We]!==Ne[rt]){var bt="\n"+De[We].replace(" at new "," at ");return O.displayName&&bt.includes("")&&(bt=bt.replace("",O.displayName)),bt}}while(1<=We&&0<=rt);break}}}finally{oe=!1,Error.prepareStackTrace=ne}return(O=O?O.displayName||O.name:"")?ee(O):""}function Ce(O){switch(O.tag){case 5:return ee(O.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return O=de(O.type,!1);case 11:return O=de(O.type.render,!1);case 1:return O=de(O.type,!0);default:return""}}function ye(O){if(null==O)return null;if("function"==typeof O)return O.displayName||O.name||null;if("string"==typeof O)return O;switch(O){case J:return"Fragment";case q:return"Portal";case te:return"Profiler";case H:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if("object"==typeof O)switch(O.$$typeof){case o:return(O.displayName||"Context")+".Consumer";case C:return(O._context.displayName||"Context")+".Provider";case s:var V=O.render;return(O=O.displayName)||(O=""!==(O=V.displayName||V.name||"")?"ForwardRef("+O+")":"ForwardRef"),O;case S:return null!==(V=O.displayName||null)?V:ye(O.type)||"Memo";case k:V=O._payload,O=O._init;try{return ye(O(V))}catch{}}return null}function ve(O){var V=O.type;switch(O.tag){case 24:return"Cache";case 9:return(V.displayName||"Context")+".Consumer";case 10:return(V._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return O=(O=V.render).displayName||O.name||"",V.displayName||(""!==O?"ForwardRef("+O+")":"ForwardRef");case 7:return"Fragment";case 5:return V;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(V);case 8:return V===H?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof V)return V.displayName||V.name||null;if("string"==typeof V)return V}return null}function ae(O){switch(typeof O){case"boolean":case"number":case"string":case"undefined":case"object":return O;default:return""}}function fe(O){var V=O.type;return(O=O.nodeName)&&"input"===O.toLowerCase()&&("checkbox"===V||"radio"===V)}function Se(O){O._valueTracker||(O._valueTracker=function pe(O){var V=fe(O)?"checked":"value",ne=Object.getOwnPropertyDescriptor(O.constructor.prototype,V),le=""+O[V];if(!O.hasOwnProperty(V)&&typeof ne<"u"&&"function"==typeof ne.get&&"function"==typeof ne.set){var De=ne.get,Ne=ne.set;return Object.defineProperty(O,V,{configurable:!0,get:function(){return De.call(this)},set:function(We){le=""+We,Ne.call(this,We)}}),Object.defineProperty(O,V,{enumerable:ne.enumerable}),{getValue:function(){return le},setValue:function(We){le=""+We},stopTracking:function(){O._valueTracker=null,delete O[V]}}}}(O))}function ce(O){if(!O)return!1;var V=O._valueTracker;if(!V)return!0;var ne=V.getValue(),le="";return O&&(le=fe(O)?O.checked?"true":"false":O.value),(O=le)!==ne&&(V.setValue(O),!0)}function be(O){if(typeof(O=O||(typeof document<"u"?document:void 0))>"u")return null;try{return O.activeElement||O.body}catch{return O.body}}function Pe(O,V){var ne=V.checked;return R({},V,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:ne??O._wrapperState.initialChecked})}function Fe(O,V){var ne=null==V.defaultValue?"":V.defaultValue,le=null!=V.checked?V.checked:V.defaultChecked;ne=ae(null!=V.value?V.value:ne),O._wrapperState={initialChecked:le,initialValue:ne,controlled:"checkbox"===V.type||"radio"===V.type?null!=V.checked:null!=V.value}}function lt(O,V){null!=(V=V.checked)&&Y(O,"checked",V,!1)}function Ge(O,V){lt(O,V);var ne=ae(V.value),le=V.type;if(null!=ne)"number"===le?(0===ne&&""===O.value||O.value!=ne)&&(O.value=""+ne):O.value!==""+ne&&(O.value=""+ne);else if("submit"===le||"reset"===le)return void O.removeAttribute("value");V.hasOwnProperty("value")?Kt(O,V.type,ne):V.hasOwnProperty("defaultValue")&&Kt(O,V.type,ae(V.defaultValue)),null==V.checked&&null!=V.defaultChecked&&(O.defaultChecked=!!V.defaultChecked)}function He(O,V,ne){if(V.hasOwnProperty("value")||V.hasOwnProperty("defaultValue")){var le=V.type;if(!("submit"!==le&&"reset"!==le||void 0!==V.value&&null!==V.value))return;V=""+O._wrapperState.initialValue,ne||V===O.value||(O.value=V),O.defaultValue=V}""!==(ne=O.name)&&(O.name=""),O.defaultChecked=!!O._wrapperState.initialChecked,""!==ne&&(O.name=ne)}function Kt(O,V,ne){("number"!==V||be(O.ownerDocument)!==O)&&(null==ne?O.defaultValue=""+O._wrapperState.initialValue:O.defaultValue!==""+ne&&(O.defaultValue=""+ne))}var tt=Array.isArray;function nt(O,V,ne,le){if(O=O.options,V){V={};for(var De=0;De"+V.valueOf().toString()+"",V=Te.firstChild;O.firstChild;)O.removeChild(O.firstChild);for(;V.firstChild;)O.appendChild(V.firstChild)}},typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(V,ne,le,De){MSApp.execUnsafeLocalFunction(function(){return O(V,ne)})}:O);function Ve(O,V){if(V){var ne=O.firstChild;if(ne&&ne===O.lastChild&&3===ne.nodeType)return void(ne.nodeValue=V)}O.textContent=V}var mt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ze=["Webkit","ms","Moz","O"];function ct(O,V,ne){return null==V||"boolean"==typeof V||""===V?"":ne||"number"!=typeof V||0===V||mt.hasOwnProperty(O)&&mt[O]?(""+V).trim():V+"px"}function hn(O,V){for(var ne in O=O.style,V)if(V.hasOwnProperty(ne)){var le=0===ne.indexOf("--"),De=ct(ne,V[ne],le);"float"===ne&&(ne="cssFloat"),le?O.setProperty(ne,De):O[ne]=De}}Object.keys(mt).forEach(function(O){Ze.forEach(function(V){V=V+O.charAt(0).toUpperCase()+O.substring(1),mt[V]=mt[O]})});var ft=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function At(O,V){if(V){if(ft[O]&&(null!=V.children||null!=V.dangerouslySetInnerHTML))throw Error(w(137,O));if(null!=V.dangerouslySetInnerHTML){if(null!=V.children)throw Error(w(60));if("object"!=typeof V.dangerouslySetInnerHTML||!("__html"in V.dangerouslySetInnerHTML))throw Error(w(61))}if(null!=V.style&&"object"!=typeof V.style)throw Error(w(62))}}function wn(O,V){if(-1===O.indexOf("-"))return"string"==typeof V.is;switch(O){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ze=null;function Qe(O){return(O=O.target||O.srcElement||window).correspondingUseElement&&(O=O.correspondingUseElement),3===O.nodeType?O.parentNode:O}var Ht=null,pt=null,vt=null;function $t(O){if(O=xo(O)){if("function"!=typeof Ht)throw Error(w(280));var V=O.stateNode;V&&(V=eg(V),Ht(O.stateNode,O.type,V))}}function dt(O){pt?vt?vt.push(O):vt=[O]:pt=O}function gt(){if(pt){var O=pt,V=vt;if(vt=pt=null,$t(O),V)for(O=0;O>>=0,0===O?32:31-(jt(O)/on|0)|0},jt=Math.log,on=Math.LN2;var Kn=64,jn=4194304;function Hn(O){switch(O&-O){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&O;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&O;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return O}}function st(O,V){var ne=O.pendingLanes;if(0===ne)return 0;var le=0,De=O.suspendedLanes,Ne=O.pingedLanes,We=268435455≠if(0!==We){var rt=We&~De;0!==rt?le=Hn(rt):0!==(Ne&=We)&&(le=Hn(Ne))}else 0!==(We=ne&~De)?le=Hn(We):0!==Ne&&(le=Hn(Ne));if(0===le)return 0;if(0!==V&&V!==le&&!(V&De)&&((De=le&-le)>=(Ne=V&-V)||16===De&&0!=(4194240&Ne)))return V;if(4&le&&(le|=16&ne),0!==(V=O.entangledLanes))for(O=O.entanglements,V&=le;0ne;ne++)V.push(O);return V}function tr(O,V,ne){O.pendingLanes|=V,536870912!==V&&(O.suspendedLanes=0,O.pingedLanes=0),(O=O.eventTimes)[V=31-Ft(V)]=ne}function dr(O,V){var ne=O.entangledLanes|=V;for(O=O.entanglements;ne;){var le=31-Ft(ne),De=1<=wc),Mr=String.fromCharCode(32),wh=!1;function av(O,V){switch(O){case"keyup":return-1!==iv.indexOf(V.keyCode);case"keydown":return 229!==V.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fs(O){return"object"==typeof(O=O.detail)&&"data"in O?O.data:null}var Ac=!1;var RS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Aw(O){var V=O&&O.nodeName&&O.nodeName.toLowerCase();return"input"===V?!!RS[O.type]:"textarea"===V}function Ew(O,V,ne,le){dt(le),0<(V=Cc(V,"onChange")).length&&(ne=new yn("onChange","change",null,ne,le),O.push({event:ne,listeners:V}))}var Fs=null,Ec=null;function Ah(O){In(O,0)}function Eh(O){if(ce(Pl(O)))return O}function Sw(O,V){if("change"===O)return V}var uv=!1;if(b){var Sh;if(b){var Sc="oninput"in document;if(!Sc){var _c=document.createElement("div");_c.setAttribute("oninput","return;"),Sc="function"==typeof _c.oninput}Sh=Sc}else Sh=!1;uv=Sh&&(!document.documentMode||9=V)return{node:ne,offset:V-O};O=le}e:{for(;ne;){if(ne.nextSibling){ne=ne.nextSibling;break e}ne=ne.parentNode}ne=void 0}ne=fv(ne)}}function Mc(O,V){return!(!O||!V)&&(O===V||(!O||3!==O.nodeType)&&(V&&3===V.nodeType?Mc(O,V.parentNode):"contains"in O?O.contains(V):!!O.compareDocumentPosition&&!!(16&O.compareDocumentPosition(V))))}function Da(){for(var O=window,V=be();V instanceof O.HTMLIFrameElement;){try{var ne="string"==typeof V.contentWindow.location.href}catch{ne=!1}if(!ne)break;V=be((O=V.contentWindow).document)}return V}function na(O){var V=O&&O.nodeName&&O.nodeName.toLowerCase();return V&&("input"===V&&("text"===O.type||"search"===O.type||"tel"===O.type||"url"===O.type||"password"===O.type)||"textarea"===V||"true"===O.contentEditable)}function jr(O){var V=Da(),ne=O.focusedElem,le=O.selectionRange;if(V!==ne&&ne&&ne.ownerDocument&&Mc(ne.ownerDocument.documentElement,ne)){if(null!==le&&na(ne))if(V=le.start,void 0===(O=le.end)&&(O=V),"selectionStart"in ne)ne.selectionStart=V,ne.selectionEnd=Math.min(O,ne.value.length);else if((O=(V=ne.ownerDocument||document)&&V.defaultView||window).getSelection){O=O.getSelection();var De=ne.textContent.length,Ne=Math.min(le.start,De);le=void 0===le.end?Ne:Math.min(le.end,De),!O.extend&&Ne>le&&(De=le,le=Ne,Ne=De),De=Ma(ne,Ne);var We=Ma(ne,le);De&&We&&(1!==O.rangeCount||O.anchorNode!==De.node||O.anchorOffset!==De.offset||O.focusNode!==We.node||O.focusOffset!==We.offset)&&((V=V.createRange()).setStart(De.node,De.offset),O.removeAllRanges(),Ne>le?(O.addRange(V),O.extend(We.node,We.offset)):(V.setEnd(We.node,We.offset),O.addRange(V)))}for(V=[],O=ne;O=O.parentNode;)1===O.nodeType&&V.push({element:O,left:O.scrollLeft,top:O.scrollTop});for("function"==typeof ne.focus&&ne.focus(),ne=0;ne=document.documentMode,Vu=null,Uf=null,Tl=null,ra=!1;function Ol(O,V,ne){var le=ne.window===ne?ne.document:9===ne.nodeType?ne:ne.ownerDocument;ra||null==Vu||Vu!==be(le)||("selectionStart"in(le=Vu)&&na(le)?le={start:le.selectionStart,end:le.selectionEnd}:le={anchorNode:(le=(le.ownerDocument&&le.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:le.anchorOffset,focusNode:le.focusNode,focusOffset:le.focusOffset},Tl&&jf(Tl,le)||(Tl=le,0<(le=Cc(Uf,"onSelect")).length&&(V=new yn("onSelect","select",null,V,ne),O.push({event:V,listeners:le}),V.target=Vu)))}function Dh(O,V){var ne={};return ne[O.toLowerCase()]=V.toLowerCase(),ne["Webkit"+O]="webkit"+V,ne["Moz"+O]="moz"+V,ne}var Ho={animationend:Dh("Animation","AnimationEnd"),animationiteration:Dh("Animation","AnimationIteration"),animationstart:Dh("Animation","AnimationStart"),transitionend:Dh("Transition","TransitionEnd")},Yp={},dv={};function Ch(O){if(Yp[O])return Yp[O];if(!Ho[O])return O;var ne,V=Ho[O];for(ne in V)if(V.hasOwnProperty(ne)&&ne in dv)return Yp[O]=V[ne];return O}b&&(dv=document.createElement("div").style,"AnimationEvent"in window||(delete Ho.animationend.animation,delete Ho.animationiteration.animation,delete Ho.animationstart.animation),"TransitionEvent"in window||delete Ho.transitionend.transition);var Bs=Ch("animationend"),hv=Ch("animationiteration"),Jp=Ch("animationstart"),rr=Ch("transitionend"),Io=new Map,Ur="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function yi(O,V){Io.set(O,V),v(V,[O])}for(var yo=0;yoRl||(O.current=tg[Rl],tg[Rl]=null,Rl--)}function si(O,V){Rl++,tg[Rl]=O.current,O.current=V}var Oc={},To=Tc(Oc),ps=Tc(!1),kl=Oc;function Hf(O,V){var ne=O.type.contextTypes;if(!ne)return Oc;var le=O.stateNode;if(le&&le.__reactInternalMemoizedUnmaskedChildContext===V)return le.__reactInternalMemoizedMaskedChildContext;var Ne,De={};for(Ne in ne)De[Ne]=V[Ne];return le&&((O=O.stateNode).__reactInternalMemoizedUnmaskedChildContext=V,O.__reactInternalMemoizedMaskedChildContext=De),De}function gs(O){return null!=(O=O.childContextTypes)}function ng(){di(ps),di(To)}function _w(O,V,ne){if(To.current!==Oc)throw Error(w(168));si(To,V),si(ps,ne)}function Mw(O,V,ne){var le=O.stateNode;if(V=V.childContextTypes,"function"!=typeof le.getChildContext)return ne;for(var De in le=le.getChildContext())if(!(De in V))throw Error(w(108,ve(O)||"Unknown",De));return R({},ne,le)}function Wf(O){return O=(O=O.stateNode)&&O.__reactInternalMemoizedMergedChildContext||Oc,kl=To.current,si(To,O),si(ps,ps.current),!0}function rg(O,V,ne){var le=O.stateNode;if(!le)throw Error(w(169));ne?(O=Mw(O,V,kl),le.__reactInternalMemoizedMergedChildContext=O,di(ps),di(To),si(To,O)):di(ps),si(ps,ne)}var Gu=null,ig=!1,yv=!1;function Zu(O){null===Gu?Gu=[O]:Gu.push(O)}function uo(){if(!yv&&null!==Gu){yv=!0;var O=0,V=Ln;try{var ne=Gu;for(Ln=1;O>=We,De-=We,su=1<<32-Ft(V)+De|ne<Yn?(Ji=zn,zn=null):Ji=zn.sibling;var Or=ln(It,zn,Nt[Yn],vn);if(null===Or){null===zn&&(zn=Ji);break}O&&zn&&null===Or.alternate&&V(It,zn),St=Ne(Or,St,Yn),null===Gn?Bn=Or:Gn.sibling=Or,Gn=Or,zn=Ji}if(Yn===Nt.length)return ne(It,zn),hi&&Yu(It,Yn),Bn;if(null===zn){for(;YnYn?(Ji=zn,zn=null):Ji=zn.sibling;var yu=ln(It,zn,Or.value,vn);if(null===yu){null===zn&&(zn=Ji);break}O&&zn&&null===yu.alternate&&V(It,zn),St=Ne(yu,St,Yn),null===Gn?Bn=yu:Gn.sibling=yu,Gn=yu,zn=Ji}if(Or.done)return ne(It,zn),hi&&Yu(It,Yn),Bn;if(null===zn){for(;!Or.done;Yn++,Or=Nt.next())null!==(Or=pn(It,Or.value,vn))&&(St=Ne(Or,St,Yn),null===Gn?Bn=Or:Gn.sibling=Or,Gn=Or);return hi&&Yu(It,Yn),Bn}for(zn=le(It,zn);!Or.done;Yn++,Or=Nt.next())null!==(Or=Mn(zn,It,Yn,Or.value,vn))&&(O&&null!==Or.alternate&&zn.delete(null===Or.key?Yn:Or.key),St=Ne(Or,St,Yn),null===Gn?Bn=Or:Gn.sibling=Or,Gn=Or);return O&&zn.forEach(function(qc){return V(It,qc)}),hi&&Yu(It,Yn),Bn}(It,St,Nt,vn);Qf(It,Nt)}return"string"==typeof Nt&&""!==Nt||"number"==typeof Nt?(Nt=""+Nt,null!==St&&6===St.tag?(ne(It,St.sibling),(St=De(St,Nt)).return=It,It=St):(ne(It,St),(St=Jg(Nt,It.mode,vn)).return=It,It=St),We(It)):ne(It,St)}}var Fc=Av(!0),Bh=Av(!1),jl={},ca=Tc(jl),Ul=Tc(jl),Kl=Tc(jl);function uu(O){if(O===jl)throw Error(w(174));return O}function pg(O,V){switch(si(Kl,V),si(Ul,O),si(ca,jl),O=V.nodeType){case 9:case 11:V=(V=V.documentElement)?V.namespaceURI:Ae(null,"");break;default:V=Ae(V=(O=8===O?V.parentNode:V).namespaceURI||null,O=O.tagName)}di(ca),si(ca,V)}function zl(){di(ca),di(Ul),di(Kl)}function bo(O){uu(Kl.current);var V=uu(ca.current),ne=Ae(V,O.type);V!==ne&&(si(Ul,O),si(ca,ne))}function cu(O){Ul.current===O&&(di(ca),di(Ul))}var or=Tc(0);function jh(O){for(var V=O;null!==V;){if(13===V.tag){var ne=V.memoizedState;if(null!==ne&&(null===(ne=ne.dehydrated)||"$?"===ne.data||"$!"===ne.data))return V}else if(19===V.tag&&void 0!==V.memoizedProps.revealOrder){if(128&V.flags)return V}else if(null!==V.child){V.child.return=V,V=V.child;continue}if(V===O)break;for(;null===V.sibling;){if(null===V.return||V.return===O)return null;V=V.return}V.sibling.return=V.return,V=V.sibling}return null}var gg=[];function yg(){for(var O=0;One?ne:4,O(!0);var le=mg.transition;mg.transition={};try{O(!1),V()}finally{Ln=ne,mg.transition=le}}function Dg(){return Vs().memoizedState}function Iv(O,V,ne){var le=ka(O);if(ne={lane:le,action:ne,hasEagerState:!1,eagerState:null,next:null},Cg(O))Tv(V,ne);else if(null!==(ne=fg(O,V,ne,le))){da(ne,O,le,Ao()),rd(ne,V,le)}}function xv(O,V,ne){var le=ka(O),De={lane:le,action:ne,hasEagerState:!1,eagerState:null,next:null};if(Cg(O))Tv(V,De);else{var Ne=O.alternate;if(0===O.lanes&&(null===Ne||0===Ne.lanes)&&null!==(Ne=V.lastRenderedReducer))try{var We=V.lastRenderedState,rt=Ne(We,ne);if(De.hasEagerState=!0,De.eagerState=rt,ta(rt,We)){var bt=V.interleaved;return null===bt?(De.next=De,Hi(V)):(De.next=bt.next,bt.next=De),void(V.interleaved=De)}}catch{}null!==(ne=fg(O,V,De,le))&&(da(ne,O,le,De=Ao()),rd(ne,V,le))}}function Cg(O){var V=O.alternate;return O===ti||null!==V&&V===ti}function Tv(O,V){Hl=Vl=!0;var ne=O.pending;null===ne?V.next=V:(V.next=ne.next,ne.next=V),O.pending=V}function rd(O,V,ne){if(4194240&ne){var le=V.lanes;ne|=le&=O.pendingLanes,V.lanes=ne,dr(O,ne)}}var Ta={readContext:Li,useCallback:Fi,useContext:Fi,useEffect:Fi,useImperativeHandle:Fi,useInsertionEffect:Fi,useLayoutEffect:Fi,useMemo:Fi,useReducer:Fi,useRef:Fi,useState:Fi,useDebugValue:Fi,useDeferredValue:Fi,useTransition:Fi,useMutableSource:Fi,useSyncExternalStore:Fi,useId:Fi,unstable_isNewReconciler:!1},Iw={readContext:Li,useCallback:function(O,V){return lu().memoizedState=[O,void 0===V?null:V],O},useContext:Li,useEffect:_g,useImperativeHandle:function(O,V,ne){return ne=null!=ne?ne.concat([O]):null,jc(4194308,4,Cv.bind(null,V,O),ne)},useLayoutEffect:function(O,V){return jc(4194308,4,O,V)},useInsertionEffect:function(O,V){return jc(4,2,O,V)},useMemo:function(O,V){var ne=lu();return V=void 0===V?null:V,O=O(),ne.memoizedState=[O,V],O},useReducer:function(O,V,ne){var le=lu();return V=void 0!==ne?ne(V):V,le.memoizedState=le.baseState=V,O={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:O,lastRenderedState:V},le.queue=O,O=O.dispatch=Iv.bind(null,ti,O),[le.memoizedState,O]},useRef:function(O){return O={current:O},lu().memoizedState=O},useState:Mv,useDebugValue:nd,useDeferredValue:function(O){return lu().memoizedState=O},useTransition:function(){var O=Mv(!1),V=O[0];return O=Cw.bind(null,O[1]),lu().memoizedState=O,[V,O]},useMutableSource:function(){},useSyncExternalStore:function(O,V,ne){var le=ti,De=lu();if(hi){if(void 0===ne)throw Error(w(407));ne=ne()}else{if(ne=V(),null===Gi)throw Error(w(349));30&Bc||wg(le,V,ne)}De.memoizedState=ne;var Ne={value:ne,getSnapshot:V};return De.queue=Ne,_g(Ag.bind(null,le,Ne,O),[O]),le.flags|=2048,Qu(9,Gl.bind(null,le,Ne,ne,V),void 0,null),ne},useId:function(){var O=lu(),V=Gi.identifierPrefix;if(hi){var ne=ki;V=":"+V+"R"+(ne=(su&~(1<<32-Ft(su)-1)).toString(32)+ne),0<(ne=Xf++)&&(V+="H"+ne.toString(32)),V+=":"}else V=":"+V+"r"+(ne=Wl++).toString(32)+":";return O.memoizedState=V},unstable_isNewReconciler:!1},Ov={readContext:Li,useCallback:Mg,useContext:Li,useEffect:Vh,useImperativeHandle:td,useInsertionEffect:Dv,useLayoutEffect:la,useMemo:Hh,useReducer:Sv,useRef:zh,useState:function(){return Sv($f)},useDebugValue:nd,useDeferredValue:function(O){return Wh(Vs(),Ai.memoizedState,O)},useTransition:function(){return[Sv($f)[0],Vs().memoizedState]},useMutableSource:Kh,useSyncExternalStore:bg,useId:Dg,unstable_isNewReconciler:!1},Nv={readContext:Li,useCallback:Mg,useContext:Li,useEffect:Vh,useImperativeHandle:td,useInsertionEffect:Dv,useLayoutEffect:la,useMemo:Hh,useReducer:_v,useRef:zh,useState:function(){return _v($f)},useDebugValue:nd,useDeferredValue:function(O){var V=Vs();return null===Ai?V.memoizedState=O:Wh(V,Ai.memoizedState,O)},useTransition:function(){return[_v($f)[0],Vs().memoizedState]},useMutableSource:Kh,useSyncExternalStore:bg,useId:Dg,unstable_isNewReconciler:!1};function fa(O,V){try{var ne="",le=V;do{ne+=Ce(le),le=le.return}while(le);var De=ne}catch(Ne){De="\nError generating stack: "+Ne.message+"\n"+Ne.stack}return{value:O,source:V,stack:De,digest:null}}function Ig(O,V,ne){return{value:O,source:null,stack:ne??null,digest:V??null}}function Wi(O,V){try{console.error(V.value)}catch(ne){setTimeout(function(){throw ne})}}var xg="function"==typeof WeakMap?WeakMap:Map;function Pv(O,V,ne){(ne=au(-1,ne)).tag=3,ne.payload={element:null};var le=V.value;return ne.callback=function(){t0||(t0=!0,n0=le),Wi(0,V)},ne}function Tg(O,V,ne){(ne=au(-1,ne)).tag=3;var le=O.type.getDerivedStateFromError;if("function"==typeof le){var De=V.value;ne.payload=function(){return le(De)},ne.callback=function(){Wi(0,V)}}var Ne=O.stateNode;return null!==Ne&&"function"==typeof Ne.componentDidCatch&&(ne.callback=function(){Wi(0,V),"function"!=typeof le&&(null===Ra?Ra=new Set([this]):Ra.add(this));var We=V.stack;this.componentDidCatch(V.value,{componentStack:null!==We?We:""})}),ne}function Gh(O,V,ne){var le=O.pingCache;if(null===le){le=O.pingCache=new xg;var De=new Set;le.set(V,De)}else void 0===(De=le.get(V))&&(De=new Set,le.set(V,De));De.has(ne)||(De.add(ne),O=fd.bind(null,O,V,ne),V.then(O,O))}function Uc(O){do{var V;if((V=13===O.tag)&&(V=null===(V=O.memoizedState)||null!==V.dehydrated),V)return O;O=O.return}while(null!==O);return null}function Kc(O,V,ne,le,De){return 1&O.mode?(O.flags|=65536,O.lanes=De,O):(O===V?O.flags|=65536:(O.flags|=128,ne.flags|=131072,ne.flags&=-52805,1===ne.tag&&(null===ne.alternate?ne.tag=17:((V=au(-1,1)).tag=2,Rc(ne,V,1))),ne.lanes|=1),O)}var Zl=G.ReactCurrentOwner,$i=!1;function lo(O,V,ne,le){V.child=null===O?Bh(V,null,ne,le):Fc(V,O.child,ne,le)}function zc(O,V,ne,le,De){ne=ne.render;var Ne=V.ref;return Ar(V,De),le=Ev(O,V,ne,le,Ne,De),ne=qf(),null===O||$i?(hi&&ne&&Vi(V),V.flags|=1,lo(O,V,le,De),V.child):(V.updateQueue=O.updateQueue,V.flags&=-2053,O.lanes&=~De,Na(O,V,De))}function fu(O,V,ne,le,De){if(null===O){var Ne=ne.type;return"function"!=typeof Ne||l0(Ne)||void 0!==Ne.defaultProps||null!==ne.compare||void 0!==ne.defaultProps?((O=f0(ne.type,null,le,V,V.mode,De)).ref=V.ref,O.return=V,V.child=O):(V.tag=15,V.type=Ne,Rv(O,V,Ne,le,De))}if(Ne=O.child,!(O.lanes&De)){var We=Ne.memoizedProps;if((ne=null!==(ne=ne.compare)?ne:jf)(We,le)&&O.ref===V.ref)return Na(O,V,De)}return V.flags|=1,(O=La(Ne,le)).ref=V.ref,O.return=V,V.child=O}function Rv(O,V,ne,le,De){if(null!==O){var Ne=O.memoizedProps;if(jf(Ne,le)&&O.ref===V.ref){if($i=!1,V.pendingProps=le=Ne,0==(O.lanes&De))return V.lanes=O.lanes,Na(O,V,De);131072&O.flags&&($i=!0)}}return Zh(O,V,ne,le,De)}function er(O,V,ne){var le=V.pendingProps,De=le.children,Ne=null!==O?O.memoizedState:null;if("hidden"===le.mode)if(1&V.mode){if(!(1073741824&ne))return O=null!==Ne?Ne.baseLanes|ne:ne,V.lanes=V.childLanes=1073741824,V.memoizedState={baseLanes:O,cachePool:null,transitions:null},V.updateQueue=null,si(nf,Hs),Hs|=O,null;V.memoizedState={baseLanes:0,cachePool:null,transitions:null},le=null!==Ne?Ne.baseLanes:ne,si(nf,Hs),Hs|=le}else V.memoizedState={baseLanes:0,cachePool:null,transitions:null},si(nf,Hs),Hs|=ne;else null!==Ne?(le=Ne.baseLanes|ne,V.memoizedState=null):le=ne,si(nf,Hs),Hs|=le;return lo(O,V,De,ne),V.child}function xw(O,V){var ne=V.ref;(null===O&&null!==ne||null!==O&&O.ref!==ne)&&(V.flags|=512,V.flags|=2097152)}function Zh(O,V,ne,le,De){var Ne=gs(ne)?kl:To.current;return Ne=Hf(V,Ne),Ar(V,De),ne=Ev(O,V,ne,le,Ne,De),le=qf(),null===O||$i?(hi&&le&&Vi(V),V.flags|=1,lo(O,V,ne,De),V.child):(V.updateQueue=O.updateQueue,V.flags&=-2053,O.lanes&=~De,Na(O,V,De))}function id(O,V,ne,le,De){if(gs(ne)){var Ne=!0;Wf(V)}else Ne=!1;if(Ar(V,De),null===V.stateNode)Oa(O,V),bv(V,ne,le),Jf(V,ne,le,De),le=!0;else if(null===O){var We=V.stateNode,rt=V.memoizedProps;We.props=rt;var bt=We.context,Rt=ne.contextType;"object"==typeof Rt&&null!==Rt?Rt=Li(Rt):Rt=Hf(V,Rt=gs(ne)?kl:To.current);var dn=ne.getDerivedStateFromProps,pn="function"==typeof dn||"function"==typeof We.getSnapshotBeforeUpdate;pn||"function"!=typeof We.UNSAFE_componentWillReceiveProps&&"function"!=typeof We.componentWillReceiveProps||(rt!==le||bt!==Rt)&&wv(V,We,le,Rt),co=!1;var ln=V.memoizedState;We.state=ln,zs(V,le,We,De),bt=V.memoizedState,rt!==le||ln!==bt||ps.current||co?("function"==typeof dn&&(ua(V,ne,dn,le),bt=V.memoizedState),(rt=co||hg(V,ne,rt,le,ln,bt,Rt))?(pn||"function"!=typeof We.UNSAFE_componentWillMount&&"function"!=typeof We.componentWillMount||("function"==typeof We.componentWillMount&&We.componentWillMount(),"function"==typeof We.UNSAFE_componentWillMount&&We.UNSAFE_componentWillMount()),"function"==typeof We.componentDidMount&&(V.flags|=4194308)):("function"==typeof We.componentDidMount&&(V.flags|=4194308),V.memoizedProps=le,V.memoizedState=bt),We.props=le,We.state=bt,We.context=Rt,le=rt):("function"==typeof We.componentDidMount&&(V.flags|=4194308),le=!1)}else{We=V.stateNode,kh(O,V),rt=V.memoizedProps,Rt=V.type===V.elementType?rt:xa(V.type,rt),We.props=Rt,pn=V.pendingProps,ln=We.context,"object"==typeof(bt=ne.contextType)&&null!==bt?bt=Li(bt):bt=Hf(V,bt=gs(ne)?kl:To.current);var Mn=ne.getDerivedStateFromProps;(dn="function"==typeof Mn||"function"==typeof We.getSnapshotBeforeUpdate)||"function"!=typeof We.UNSAFE_componentWillReceiveProps&&"function"!=typeof We.componentWillReceiveProps||(rt!==pn||ln!==bt)&&wv(V,We,le,bt),co=!1,ln=V.memoizedState,We.state=ln,zs(V,le,We,De);var Rn=V.memoizedState;rt!==pn||ln!==Rn||ps.current||co?("function"==typeof Mn&&(ua(V,ne,Mn,le),Rn=V.memoizedState),(Rt=co||hg(V,ne,Rt,le,ln,Rn,bt)||!1)?(dn||"function"!=typeof We.UNSAFE_componentWillUpdate&&"function"!=typeof We.componentWillUpdate||("function"==typeof We.componentWillUpdate&&We.componentWillUpdate(le,Rn,bt),"function"==typeof We.UNSAFE_componentWillUpdate&&We.UNSAFE_componentWillUpdate(le,Rn,bt)),"function"==typeof We.componentDidUpdate&&(V.flags|=4),"function"==typeof We.getSnapshotBeforeUpdate&&(V.flags|=1024)):("function"!=typeof We.componentDidUpdate||rt===O.memoizedProps&&ln===O.memoizedState||(V.flags|=4),"function"!=typeof We.getSnapshotBeforeUpdate||rt===O.memoizedProps&&ln===O.memoizedState||(V.flags|=1024),V.memoizedProps=le,V.memoizedState=Rn),We.props=le,We.state=Rn,We.context=bt,le=Rt):("function"!=typeof We.componentDidUpdate||rt===O.memoizedProps&&ln===O.memoizedState||(V.flags|=4),"function"!=typeof We.getSnapshotBeforeUpdate||rt===O.memoizedProps&&ln===O.memoizedState||(V.flags|=1024),le=!1)}return kv(O,V,ne,le,Ne,De)}function kv(O,V,ne,le,De,Ne){xw(O,V);var We=0!=(128&V.flags);if(!le&&!We)return De&&rg(V,ne,!1),Na(O,V,Ne);le=V.stateNode,Zl.current=V;var rt=We&&"function"!=typeof ne.getDerivedStateFromError?null:le.render();return V.flags|=1,null!==O&&We?(V.child=Fc(V,O.child,null,Ne),V.child=Fc(V,null,rt,Ne)):lo(O,V,rt,Ne),V.memoizedState=le.state,De&&rg(V,ne,!0),V.child}function Tw(O){var V=O.stateNode;V.pendingContext?_w(0,V.pendingContext,V.pendingContext!==V.context):V.context&&_w(0,V.context,!1),pg(O,V.containerInfo)}function Ow(O,V,ne,le,De){return Ju(),ir(De),V.flags|=256,lo(O,V,ne,le),V.child}var Jl,Rg,Nw,Fv,Lv={dehydrated:null,treeContext:null,retryLane:0};function du(O){return{baseLanes:O,cachePool:null,transitions:null}}function Og(O,V,ne){var rt,le=V.pendingProps,De=or.current,Ne=!1,We=0!=(128&V.flags);if((rt=We)||(rt=(null===O||null!==O.memoizedState)&&0!=(2&De)),rt?(Ne=!0,V.flags&=-129):(null===O||null!==O.memoizedState)&&(De|=1),si(or,1&De),null===O)return Fl(V),null!==(O=V.memoizedState)&&null!==(O=O.dehydrated)?(1&V.mode?"$!"===O.data?V.lanes=8:V.lanes=1073741824:V.lanes=1,null):(We=le.children,O=le.fallback,Ne?(le=V.mode,Ne=V.child,We={mode:"hidden",children:We},1&le||null===Ne?Ne=d0(We,le,0,null):(Ne.childLanes=0,Ne.pendingProps=We),O=Zc(O,le,ne,null),Ne.return=V,O.return=V,Ne.sibling=O,V.child=Ne,V.child.memoizedState=du(ne),V.memoizedState=Lv,O):Yh(V,We));if(null!==(De=O.memoizedState)&&null!==(rt=De.dehydrated))return function Ng(O,V,ne,le,De,Ne,We){if(ne)return 256&V.flags?(V.flags&=-257,le=Ig(Error(w(422))),Ei(O,V,We,le)):null!==V.memoizedState?(V.child=O.child,V.flags|=128,null):(Ne=le.fallback,De=V.mode,le=d0({mode:"visible",children:le.children},De,0,null),Ne=Zc(Ne,De,We,null),Ne.flags|=2,le.return=V,Ne.return=V,le.sibling=Ne,V.child=le,1&V.mode&&Fc(V,O.child,null,We),V.child.memoizedState=du(We),V.memoizedState=Lv,Ne);if(!(1&V.mode))return Ei(O,V,We,null);if("$!"===De.data){if(le=De.nextSibling&&De.nextSibling.dataset)var rt=le.dgst;return le=rt,Ei(O,V,We,le=Ig(Ne=Error(w(419)),le,void 0))}if(rt=0!=(We&O.childLanes),$i||rt){if(null!==(le=Gi)){switch(We&-We){case 4:De=2;break;case 16:De=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:De=32;break;case 536870912:De=268435456;break;default:De=0}0!==(De=De&(le.suspendedLanes|We)?0:De)&&De!==Ne.retryLane&&(Ne.retryLane=De,ms(O,De),da(le,O,De,-1))}return Wg(),Ei(O,V,We,le=Ig(Error(w(421))))}return"$?"===De.data?(V.flags|=128,V.child=O.child,V=Uw.bind(null,O),De._reactRetry=V,null):(O=Ne.treeContext,ai=oa(De.nextSibling),mo=V,hi=!0,Ks=null,null!==O&&(ys[Us++]=su,ys[Us++]=ki,ys[Us++]=ou,su=O.id,ki=O.overflow,ou=V),V=Yh(V,le.children),V.flags|=4096,V)}(O,V,We,le,rt,De,ne);if(Ne){Ne=le.fallback,We=V.mode,rt=(De=O.child).sibling;var bt={mode:"hidden",children:le.children};return 1&We||V.child===De?(le=La(De,bt)).subtreeFlags=14680064&De.subtreeFlags:((le=V.child).childLanes=0,le.pendingProps=bt,V.deletions=null),null!==rt?Ne=La(rt,Ne):(Ne=Zc(Ne,We,ne,null)).flags|=2,Ne.return=V,le.return=V,le.sibling=Ne,V.child=le,le=Ne,Ne=V.child,We=null===(We=O.child.memoizedState)?du(ne):{baseLanes:We.baseLanes|ne,cachePool:null,transitions:We.transitions},Ne.memoizedState=We,Ne.childLanes=O.childLanes&~ne,V.memoizedState=Lv,le}return O=(Ne=O.child).sibling,le=La(Ne,{mode:"visible",children:le.children}),!(1&V.mode)&&(le.lanes=ne),le.return=V,le.sibling=null,null!==O&&(null===(ne=V.deletions)?(V.deletions=[O],V.flags|=16):ne.push(O)),V.child=le,V.memoizedState=null,le}function Yh(O,V){return(V=d0({mode:"visible",children:V},O.mode,0,null)).return=O,O.child=V}function Ei(O,V,ne,le){return null!==le&&ir(le),Fc(V,O.child,null,ne),(O=Yh(V,V.pendingProps.children)).flags|=2,V.memoizedState=null,O}function Yl(O,V,ne){O.lanes|=V;var le=O.alternate;null!==le&&(le.lanes|=V),sn(O.return,V,ne)}function Pg(O,V,ne,le,De){var Ne=O.memoizedState;null===Ne?O.memoizedState={isBackwards:V,rendering:null,renderingStartTime:0,last:le,tail:ne,tailMode:De}:(Ne.isBackwards=V,Ne.rendering=null,Ne.renderingStartTime=0,Ne.last=le,Ne.tail=ne,Ne.tailMode=De)}function vs(O,V,ne){var le=V.pendingProps,De=le.revealOrder,Ne=le.tail;if(lo(O,V,le.children,ne),2&(le=or.current))le=1&le|2,V.flags|=128;else{if(null!==O&&128&O.flags)e:for(O=V.child;null!==O;){if(13===O.tag)null!==O.memoizedState&&Yl(O,ne,V);else if(19===O.tag)Yl(O,ne,V);else if(null!==O.child){O.child.return=O,O=O.child;continue}if(O===V)break e;for(;null===O.sibling;){if(null===O.return||O.return===V)break e;O=O.return}O.sibling.return=O.return,O=O.sibling}le&=1}if(si(or,le),1&V.mode)switch(De){case"forwards":for(ne=V.child,De=null;null!==ne;)null!==(O=ne.alternate)&&null===jh(O)&&(De=ne),ne=ne.sibling;null===(ne=De)?(De=V.child,V.child=null):(De=ne.sibling,ne.sibling=null),Pg(V,!1,De,ne,Ne);break;case"backwards":for(ne=null,De=V.child,V.child=null;null!==De;){if(null!==(O=De.alternate)&&null===jh(O)){V.child=De;break}O=De.sibling,De.sibling=ne,ne=De,De=O}Pg(V,!0,ne,null,Ne);break;case"together":Pg(V,!1,null,null,void 0);break;default:V.memoizedState=null}else V.memoizedState=null;return V.child}function Oa(O,V){!(1&V.mode)&&null!==O&&(O.alternate=null,V.alternate=null,V.flags|=2)}function Na(O,V,ne){if(null!==O&&(V.dependencies=O.dependencies),rf|=V.lanes,!(ne&V.childLanes))return null;if(null!==O&&V.child!==O.child)throw Error(w(153));if(null!==V.child){for(ne=La(O=V.child,O.pendingProps),V.child=ne,ne.return=V;null!==O.sibling;)O=O.sibling,(ne=ne.sibling=La(O,O.pendingProps)).return=V;ne.sibling=null}return V.child}function Qh(O,V){if(!hi)switch(O.tailMode){case"hidden":V=O.tail;for(var ne=null;null!==V;)null!==V.alternate&&(ne=V),V=V.sibling;null===ne?O.tail=null:ne.sibling=null;break;case"collapsed":ne=O.tail;for(var le=null;null!==ne;)null!==ne.alternate&&(le=ne),ne=ne.sibling;null===le?V||null===O.tail?O.tail=null:O.tail.sibling=null:le.sibling=null}}function Yr(O){var V=null!==O.alternate&&O.alternate.child===O.child,ne=0,le=0;if(V)for(var De=O.child;null!==De;)ne|=De.lanes|De.childLanes,le|=14680064&De.subtreeFlags,le|=14680064&De.flags,De.return=O,De=De.sibling;else for(De=O.child;null!==De;)ne|=De.lanes|De.childLanes,le|=De.subtreeFlags,le|=De.flags,De.return=O,De=De.sibling;return O.subtreeFlags|=le,O.childLanes=ne,V}function kg(O,V,ne){var le=V.pendingProps;switch(sg(V),V.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yr(V),null;case 1:case 17:return gs(V.type)&&ng(),Yr(V),null;case 3:return le=V.stateNode,zl(),di(ps),di(To),yg(),le.pendingContext&&(le.context=le.pendingContext,le.pendingContext=null),(null===O||null===O.child)&&(aa(V)?V.flags|=4:null===O||O.memoizedState.isDehydrated&&!(256&V.flags)||(V.flags|=1024,null!==Ks&&(zg(Ks),Ks=null))),Rg(O,V),Yr(V),null;case 5:cu(V);var De=uu(Kl.current);if(ne=V.type,null!==O&&null!=V.stateNode)Nw(O,V,ne,le,De),O.ref!==V.ref&&(V.flags|=512,V.flags|=2097152);else{if(!le){if(null===V.stateNode)throw Error(w(166));return Yr(V),null}if(O=uu(ca.current),aa(V)){le=V.stateNode,ne=V.type;var Ne=V.memoizedProps;switch(le[fi]=V,le[Th]=Ne,O=0!=(1&V.mode),ne){case"dialog":kn("cancel",le),kn("close",le);break;case"iframe":case"object":case"embed":kn("load",le);break;case"video":case"audio":for(De=0;De<\/script>",O=O.removeChild(O.firstChild)):"string"==typeof le.is?O=We.createElement(ne,{is:le.is}):(O=We.createElement(ne),"select"===ne&&(We=O,le.multiple?We.multiple=!0:le.size&&(We.size=le.size))):O=We.createElementNS(O,ne),O[fi]=V,O[Th]=le,Jl(O,V,!1,!1),V.stateNode=O;e:{switch(We=wn(ne,le),ne){case"dialog":kn("cancel",O),kn("close",O),De=le;break;case"iframe":case"object":case"embed":kn("load",O),De=le;break;case"video":case"audio":for(De=0;Dead&&(V.flags|=128,le=!0,Qh(Ne,!1),V.lanes=4194304)}else{if(!le)if(null!==(O=jh(We))){if(V.flags|=128,le=!0,null!==(ne=O.updateQueue)&&(V.updateQueue=ne,V.flags|=4),Qh(Ne,!0),null===Ne.tail&&"hidden"===Ne.tailMode&&!We.alternate&&!hi)return Yr(V),null}else 2*tn()-Ne.renderingStartTime>ad&&1073741824!==ne&&(V.flags|=128,le=!0,Qh(Ne,!1),V.lanes=4194304);Ne.isBackwards?(We.sibling=V.child,V.child=We):(null!==(ne=Ne.last)?ne.sibling=We:V.child=We,Ne.last=We)}return null!==Ne.tail?(V=Ne.tail,Ne.rendering=V,Ne.tail=V.sibling,Ne.renderingStartTime=tn(),V.sibling=null,ne=or.current,si(or,le?1&ne|2:1&ne),V):(Yr(V),null);case 22:case 23:return to(),le=null!==V.memoizedState,null!==O&&null!==O.memoizedState!==le&&(V.flags|=8192),le&&1&V.mode?1073741824&Hs&&(Yr(V),6&V.subtreeFlags&&(V.flags|=8192)):Yr(V),null;case 24:case 25:return null}throw Error(w(156,V.tag))}function Ql(O,V){switch(sg(V),V.tag){case 1:return gs(V.type)&&ng(),65536&(O=V.flags)?(V.flags=-65537&O|128,V):null;case 3:return zl(),di(ps),di(To),yg(),65536&(O=V.flags)&&!(128&O)?(V.flags=-65537&O|128,V):null;case 5:return cu(V),null;case 13:if(di(or),null!==(O=V.memoizedState)&&null!==O.dehydrated){if(null===V.alternate)throw Error(w(340));Ju()}return 65536&(O=V.flags)?(V.flags=-65537&O|128,V):null;case 19:return di(or),null;case 4:return zl(),null;case 10:return lg(V.type._context),null;case 22:case 23:return to(),null;default:return null}}Jl=function(O,V){for(var ne=V.child;null!==ne;){if(5===ne.tag||6===ne.tag)O.appendChild(ne.stateNode);else if(4!==ne.tag&&null!==ne.child){ne.child.return=ne,ne=ne.child;continue}if(ne===V)break;for(;null===ne.sibling;){if(null===ne.return||ne.return===V)return;ne=ne.return}ne.sibling.return=ne.return,ne=ne.sibling}},Rg=function(){},Nw=function(O,V,ne,le){var De=O.memoizedProps;if(De!==le){O=V.stateNode,uu(ca.current);var We,Ne=null;switch(ne){case"input":De=Pe(O,De),le=Pe(O,le),Ne=[];break;case"select":De=R({},De,{value:void 0}),le=R({},le,{value:void 0}),Ne=[];break;case"textarea":De=Vt(O,De),le=Vt(O,le),Ne=[];break;default:"function"!=typeof De.onClick&&"function"==typeof le.onClick&&(O.onclick=zi)}for(Rt in At(ne,le),ne=null,De)if(!le.hasOwnProperty(Rt)&&De.hasOwnProperty(Rt)&&null!=De[Rt])if("style"===Rt){var rt=De[Rt];for(We in rt)rt.hasOwnProperty(We)&&(ne||(ne={}),ne[We]="")}else"dangerouslySetInnerHTML"!==Rt&&"children"!==Rt&&"suppressContentEditableWarning"!==Rt&&"suppressHydrationWarning"!==Rt&&"autoFocus"!==Rt&&(l.hasOwnProperty(Rt)?Ne||(Ne=[]):(Ne=Ne||[]).push(Rt,null));for(Rt in le){var bt=le[Rt];if(rt=De?.[Rt],le.hasOwnProperty(Rt)&&bt!==rt&&(null!=bt||null!=rt))if("style"===Rt)if(rt){for(We in rt)!rt.hasOwnProperty(We)||bt&&bt.hasOwnProperty(We)||(ne||(ne={}),ne[We]="");for(We in bt)bt.hasOwnProperty(We)&&rt[We]!==bt[We]&&(ne||(ne={}),ne[We]=bt[We])}else ne||(Ne||(Ne=[]),Ne.push(Rt,ne)),ne=bt;else"dangerouslySetInnerHTML"===Rt?(bt=bt?bt.__html:void 0,rt=rt?rt.__html:void 0,null!=bt&&rt!==bt&&(Ne=Ne||[]).push(Rt,bt)):"children"===Rt?"string"!=typeof bt&&"number"!=typeof bt||(Ne=Ne||[]).push(Rt,""+bt):"suppressContentEditableWarning"!==Rt&&"suppressHydrationWarning"!==Rt&&(l.hasOwnProperty(Rt)?(null!=bt&&"onScroll"===Rt&&kn("scroll",O),Ne||rt===bt||(Ne=[])):(Ne=Ne||[]).push(Rt,bt))}ne&&(Ne=Ne||[]).push("style",ne);var Rt=Ne;(V.updateQueue=Rt)&&(V.flags|=4)}},Fv=function(O,V,ne,le){ne!==le&&(V.flags|=4)};var Lg=!1,fo=!1,Pw="function"==typeof WeakSet?WeakSet:Set,Pn=null;function Xl(O,V){var ne=O.ref;if(null!==ne)if("function"==typeof ne)try{ne(null)}catch(le){Si(O,V,le)}else ne.current=null}function Fg(O,V,ne){try{ne()}catch(le){Si(O,V,le)}}var Bv=!1;function Vc(O,V,ne){var le=V.updateQueue;if(null!==(le=null!==le?le.lastEffect:null)){var De=le=le.next;do{if((De.tag&O)===O){var Ne=De.destroy;De.destroy=void 0,void 0!==Ne&&Fg(V,ne,Ne)}De=De.next}while(De!==le)}}function Hc(O,V){if(null!==(V=null!==(V=V.updateQueue)?V.lastEffect:null)){var ne=V=V.next;do{if((ne.tag&O)===O){var le=ne.create;ne.destroy=le()}ne=ne.next}while(ne!==V)}}function od(O){var V=O.ref;if(null!==V){var ne=O.stateNode;O.tag,O=ne,"function"==typeof V?V(O):V.current=O}}function ql(O){var V=O.alternate;null!==V&&(O.alternate=null,ql(V)),O.child=null,O.deletions=null,O.sibling=null,5===O.tag&&(null!==(V=O.stateNode)&&(delete V[fi],delete V[Th],delete V[hs],delete V[$p],delete V[Vf])),O.stateNode=null,O.return=null,O.dependencies=null,O.memoizedProps=null,O.memoizedState=null,O.pendingProps=null,O.stateNode=null,O.updateQueue=null}function Xh(O){return 5===O.tag||3===O.tag||4===O.tag}function $l(O){e:for(;;){for(;null===O.sibling;){if(null===O.return||Xh(O.return))return null;O=O.return}for(O.sibling.return=O.return,O=O.sibling;5!==O.tag&&6!==O.tag&&18!==O.tag;){if(2&O.flags||null===O.child||4===O.tag)continue e;O.child.return=O,O=O.child}if(!(2&O.flags))return O.stateNode}}function Bg(O,V,ne){var le=O.tag;if(5===le||6===le)O=O.stateNode,V?8===ne.nodeType?ne.parentNode.insertBefore(O,V):ne.insertBefore(O,V):(8===ne.nodeType?(V=ne.parentNode).insertBefore(O,ne):(V=ne).appendChild(O),null!=(ne=ne._reactRootContainer)||null!==V.onclick||(V.onclick=zi));else if(4!==le&&null!==(O=O.child))for(Bg(O,V,ne),O=O.sibling;null!==O;)Bg(O,V,ne),O=O.sibling}function qh(O,V,ne){var le=O.tag;if(5===le||6===le)O=O.stateNode,V?ne.insertBefore(O,V):ne.appendChild(O);else if(4!==le&&null!==(O=O.child))for(qh(O,V,ne),O=O.sibling;null!==O;)qh(O,V,ne),O=O.sibling}var Ti=null,Go=!1;function hu(O,V,ne){for(ne=ne.child;null!==ne;)jv(O,V,ne),ne=ne.sibling}function jv(O,V,ne){if(Mt&&"function"==typeof Mt.onCommitFiberUnmount)try{Mt.onCommitFiberUnmount(Dt,ne)}catch{}switch(ne.tag){case 5:fo||Xl(ne,V);case 6:var le=Ti,De=Go;Ti=null,hu(O,V,ne),Go=De,null!==(Ti=le)&&(Go?(O=Ti,ne=ne.stateNode,8===O.nodeType?O.parentNode.removeChild(ne):O.removeChild(ne)):Ti.removeChild(ne.stateNode));break;case 18:null!==Ti&&(Go?(O=Ti,ne=ne.stateNode,8===O.nodeType?xh(O.parentNode,ne):1===O.nodeType&&xh(O,ne),_t(O)):xh(Ti,ne.stateNode));break;case 4:le=Ti,De=Go,Ti=ne.stateNode.containerInfo,Go=!0,hu(O,V,ne),Ti=le,Go=De;break;case 0:case 11:case 14:case 15:if(!fo&&(null!==(le=ne.updateQueue)&&null!==(le=le.lastEffect))){De=le=le.next;do{var Ne=De,We=Ne.destroy;Ne=Ne.tag,void 0!==We&&(2&Ne||4&Ne)&&Fg(ne,V,We),De=De.next}while(De!==le)}hu(O,V,ne);break;case 1:if(!fo&&(Xl(ne,V),"function"==typeof(le=ne.stateNode).componentWillUnmount))try{le.props=ne.memoizedProps,le.state=ne.memoizedState,le.componentWillUnmount()}catch(rt){Si(ne,V,rt)}hu(O,V,ne);break;case 21:hu(O,V,ne);break;case 22:1&ne.mode?(fo=(le=fo)||null!==ne.memoizedState,hu(O,V,ne),fo=le):hu(O,V,ne);break;default:hu(O,V,ne)}}function Uv(O){var V=O.updateQueue;if(null!==V){O.updateQueue=null;var ne=O.stateNode;null===ne&&(ne=O.stateNode=new Pw),V.forEach(function(le){var De=Zg.bind(null,O,le);ne.has(le)||(ne.add(le),le.then(De,De))})}}function wo(O,V){var ne=V.deletions;if(null!==ne)for(var le=0;leDe&&(De=We),le&=~Ne}if(le=De,10<(le=(120>(le=tn()-le)?120:480>le?480:1080>le?1080:1920>le?1920:3e3>le?3e3:4320>le?4320:1960*Lw(le/1960))-le)){O.timeoutHandle=xc(Gc.bind(null,O,ws,Xu),le);break}Gc(O,ws,Xu);break;default:throw Error(w(329))}}}return Zo(O,tn()),O.callbackNode===ne?Hv.bind(null,O):null}function o0(O,V){var ne=e0;return O.current.memoizedState.isDehydrated&&(ha(O,V).flags|=256),2!==(O=ld(O,V))&&(V=ws,ws=ne,null!==V&&zg(V)),O}function zg(O){null===ws?ws=O:ws.push.apply(ws,O)}function Oi(O,V){for(V&=~sd,V&=~Ug,O.suspendedLanes|=V,O.pingedLanes&=~V,O=O.expirationTimes;0O?16:O,null===pu)var le=!1;else{if(O=pu,pu=null,cd=0,6&Tr)throw Error(w(331));var De=Tr;for(Tr|=4,Pn=O.current;null!==Pn;){var Ne=Pn,We=Ne.child;if(16&Pn.flags){var rt=Ne.deletions;if(null!==rt){for(var bt=0;bttn()-Vv?ha(O,0):sd|=ne),Zo(O,V)}function Zv(O,V){0===V&&(1&O.mode?(V=jn,!(130023424&(jn<<=1))&&(jn=4194304)):V=1);var ne=Ao();null!==(O=ms(O,V))&&(tr(O,V,ne),Zo(O,ne))}function Uw(O){var V=O.memoizedState,ne=0;null!==V&&(ne=V.retryLane),Zv(O,ne)}function Zg(O,V){var ne=0;switch(O.tag){case 13:var le=O.stateNode,De=O.memoizedState;null!==De&&(ne=De.retryLane);break;case 19:le=O.stateNode;break;default:throw Error(w(314))}null!==le&&le.delete(V),Zv(O,ne)}function Yg(O,V){return nn(O,V)}function of(O,V,ne,le){this.tag=O,this.key=ne,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=V,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=le,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yo(O,V,ne,le){return new of(O,V,ne,le)}function l0(O){return!(!(O=O.prototype)||!O.isReactComponent)}function La(O,V){var ne=O.alternate;return null===ne?((ne=Yo(O.tag,V,O.key,O.mode)).elementType=O.elementType,ne.type=O.type,ne.stateNode=O.stateNode,ne.alternate=O,O.alternate=ne):(ne.pendingProps=V,ne.type=O.type,ne.flags=0,ne.subtreeFlags=0,ne.deletions=null),ne.flags=14680064&O.flags,ne.childLanes=O.childLanes,ne.lanes=O.lanes,ne.child=O.child,ne.memoizedProps=O.memoizedProps,ne.memoizedState=O.memoizedState,ne.updateQueue=O.updateQueue,V=O.dependencies,ne.dependencies=null===V?null:{lanes:V.lanes,firstContext:V.firstContext},ne.sibling=O.sibling,ne.index=O.index,ne.ref=O.ref,ne}function f0(O,V,ne,le,De,Ne){var We=2;if(le=O,"function"==typeof O)l0(O)&&(We=1);else if("string"==typeof O)We=5;else e:switch(O){case J:return Zc(ne.children,De,Ne,V);case H:We=8,De|=8;break;case te:return(O=Yo(12,ne,V,2|De)).elementType=te,O.lanes=Ne,O;case d:return(O=Yo(13,ne,V,De)).elementType=d,O.lanes=Ne,O;case h:return(O=Yo(19,ne,V,De)).elementType=h,O.lanes=Ne,O;case B:return d0(ne,De,Ne,V);default:if("object"==typeof O&&null!==O)switch(O.$$typeof){case C:We=10;break e;case o:We=9;break e;case s:We=11;break e;case S:We=14;break e;case k:We=16,le=null;break e}throw Error(w(130,null==O?O:typeof O,""))}return(V=Yo(We,ne,V,De)).elementType=O,V.type=le,V.lanes=Ne,V}function Zc(O,V,ne,le){return(O=Yo(7,O,le,V)).lanes=ne,O}function d0(O,V,ne,le){return(O=Yo(22,O,le,V)).elementType=B,O.lanes=ne,O.stateNode={isHidden:!1},O}function Jg(O,V,ne){return(O=Yo(6,O,null,V)).lanes=ne,O}function Qg(O,V,ne){return(V=Yo(4,null!==O.children?O.children:[],O.key,V)).lanes=ne,V.stateNode={containerInfo:O.containerInfo,pendingChildren:null,implementation:O.implementation},V}function zw(O,V,ne,le,De){this.tag=V,this.containerInfo=O,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xn(0),this.expirationTimes=Xn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xn(0),this.identifierPrefix=le,this.onRecoverableError=De,this.mutableSourceEagerHydrationData=null}function h0(O,V,ne,le,De,Ne,We,rt,bt){return O=new zw(O,V,ne,rt,bt),1===V?(V=1,!0===Ne&&(V|=8)):V=0,Ne=Yo(3,null,null,V),O.current=Ne,Ne.stateNode=O,Ne.memoizedState={element:le,isDehydrated:ne,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zf(Ne),O}function qg(O){if(!O)return Oc;e:{if(Bt(O=O._reactInternals)!==O||1!==O.tag)throw Error(w(170));var V=O;do{switch(V.tag){case 3:V=V.stateNode.context;break e;case 1:if(gs(V.type)){V=V.stateNode.__reactInternalMemoizedMergedChildContext;break e}}V=V.return}while(null!==V);throw Error(w(171))}if(1===O.tag){var ne=O.type;if(gs(ne))return Mw(O,ne,V)}return V}function p0(O,V,ne,le,De,Ne,We,rt,bt){return(O=h0(ne,le,!0,O,0,Ne,0,rt,bt)).context=qg(null),ne=O.current,(Ne=au(le=Ao(),De=ka(ne))).callback=V??null,Rc(ne,Ne,De),O.current.lanes=De,tr(O,De,le),Zo(O,le),O}function g0(O,V,ne,le){var De=V.current,Ne=Ao(),We=ka(De);return ne=qg(ne),null===V.context?V.context=ne:V.pendingContext=ne,(V=au(Ne,We)).payload={element:O},null!==(le=void 0===le?null:le)&&(V.callback=le),null!==(O=Rc(De,V,We))&&(da(O,De,We,Ne),Yf(O,De,We)),We}function y0(O){return(O=O.current).child?(O.child.tag,O.child.stateNode):null}function $g(O,V){if(null!==(O=O.memoizedState)&&null!==O.dehydrated){var ne=O.retryLane;O.retryLane=0!==ne&&ne{"use strict";var D=g(51291);u.s=D.createRoot,D.hydrateRoot},51291:(re,u,g)=>{"use strict";(function p(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||"function"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p)}catch(D){console.error(D)}})(),re.exports=g(66509)},50433:(re,u,g)=>{"use strict";var p=g(54284),D=Symbol.for("react.element"),w=Symbol.for("react.fragment"),_=Object.prototype.hasOwnProperty,l=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function m(b,M,E){var A,P={},x=null,N=null;for(A in void 0!==E&&(x=""+E),void 0!==M.key&&(x=""+M.key),void 0!==M.ref&&(N=M.ref),M)_.call(M,A)&&!v.hasOwnProperty(A)&&(P[A]=M[A]);if(b&&b.defaultProps)for(A in M=b.defaultProps)void 0===P[A]&&(P[A]=M[A]);return{$$typeof:D,type:b,key:x,ref:N,props:P,_owner:l.current}}u.Fragment=w,u.jsx=m,u.jsxs=m},3851:(re,u)=>{"use strict";var g=Symbol.for("react.element"),p=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),v=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),M=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),A=Symbol.iterator;var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,F={};function L(f,R,se){this.props=f,this.context=R,this.refs=F,this.updater=se||x}function z(){}function j(f,R,se){this.props=f,this.context=R,this.refs=F,this.updater=se||x}L.prototype.isReactComponent={},L.prototype.setState=function(f,R){if("object"!=typeof f&&"function"!=typeof f&&null!=f)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,f,R,"setState")},L.prototype.forceUpdate=function(f){this.updater.enqueueForceUpdate(this,f,"forceUpdate")},z.prototype=L.prototype;var W=j.prototype=new z;W.constructor=j,N(W,L.prototype),W.isPureReactComponent=!0;var Y=Array.isArray,G=Object.prototype.hasOwnProperty,Q={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function J(f,R,se){var ee,oe={},de=null,Ce=null;if(null!=R)for(ee in void 0!==R.ref&&(Ce=R.ref),void 0!==R.key&&(de=""+R.key),R)G.call(R,ee)&&!q.hasOwnProperty(ee)&&(oe[ee]=R[ee]);var ye=arguments.length-2;if(1===ye)oe.children=se;else if(1{"use strict";re.exports=g(3851)},18348:(re,u,g)=>{"use strict";re.exports=g(50433)},70891:re=>{"use strict";var g={};function p(v,m,b){b||(b=Error);var E=function(A){function P(x,N,F){return A.call(this,function M(A,P,x){return"string"==typeof m?m:m(A,P,x)}(x,N,F))||this}return function u(v,m){v.prototype=Object.create(m.prototype),v.prototype.constructor=v,v.__proto__=m}(P,A),P}(b);E.prototype.name=b.name,E.prototype.code=v,g[v]=E}function D(v,m){if(Array.isArray(v)){var b=v.length;return v=v.map(function(M){return String(M)}),b>2?"one of ".concat(m," ").concat(v.slice(0,b-1).join(", "),", or ")+v[b-1]:2===b?"one of ".concat(m," ").concat(v[0]," or ").concat(v[1]):"of ".concat(m," ").concat(v[0])}return"of ".concat(m," ").concat(String(v))}p("ERR_INVALID_OPT_VALUE",function(v,m){return'The value "'+m+'" is invalid for option "'+v+'"'},TypeError),p("ERR_INVALID_ARG_TYPE",function(v,m,b){var M,E;if("string"==typeof m&&function w(v,m,b){return v.substr(!b||b<0?0:+b,m.length)===m}(m,"not ")?(M="must not be",m=m.replace(/^not /,"")):M="must be",function _(v,m,b){return(void 0===b||b>v.length)&&(b=v.length),v.substring(b-m.length,b)===m}(v," argument"))E="The ".concat(v," ").concat(M," ").concat(D(m,"type"));else{var A=function l(v,m,b){return"number"!=typeof b&&(b=0),!(b+m.length>v.length)&&-1!==v.indexOf(m,b)}(v,".")?"property":"argument";E='The "'.concat(v,'" ').concat(A," ").concat(M," ").concat(D(m,"type"))}return E+=". Received type ".concat(typeof b)},TypeError),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),p("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),p("ERR_STREAM_PREMATURE_CLOSE","Premature close"),p("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),p("ERR_STREAM_WRITE_AFTER_END","write after end"),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),re.exports.q=g},41339:(re,u,g)=>{"use strict";var p=Object.keys||function(E){var A=[];for(var P in E)A.push(P);return A};re.exports=m;var D=g(3154),w=g(20520);g(83894)(m,D);for(var _=p(w.prototype),l=0;l<_.length;l++){var v=_[l];m.prototype[v]||(m.prototype[v]=w.prototype[v])}function m(E){if(!(this instanceof m))return new m(E);D.call(this,E),w.call(this,E),this.allowHalfOpen=!0,E&&(!1===E.readable&&(this.readable=!1),!1===E.writable&&(this.writable=!1),!1===E.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",b)))}function b(){this._writableState.ended||process.nextTick(M,this)}function M(E){E.end()}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(m.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(m.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(m.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(A){void 0===this._readableState||void 0===this._writableState||(this._readableState.destroyed=A,this._writableState.destroyed=A)}})},56071:(re,u,g)=>{"use strict";re.exports=D;var p=g(6025);function D(w){if(!(this instanceof D))return new D(w);p.call(this,w)}g(83894)(D,p),D.prototype._transform=function(w,_,l){l(null,w)}},3154:(re,u,g)=>{"use strict";var p;re.exports=C,C.ReadableState=te;g(59069).EventEmitter;var w=function(be,Pe){return be.listeners(Pe).length},_=g(4970),l=g(93172).Buffer,v=global.Uint8Array||function(){};var E,M=g(94616);E=M&&M.debuglog?M.debuglog("stream"):function(){};var Y,G,Q,A=g(25019),P=g(41920),N=g(47102).getHighWaterMark,F=g(70891).q,L=F.ERR_INVALID_ARG_TYPE,z=F.ERR_STREAM_PUSH_AFTER_EOF,j=F.ERR_METHOD_NOT_IMPLEMENTED,W=F.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;g(83894)(C,_);var q=P.errorOrDestroy,J=["error","close","destroy","pause","resume"];function te(ce,be,Pe){p=p||g(41339),ce=ce||{},"boolean"!=typeof Pe&&(Pe=be instanceof p),this.objectMode=!!ce.objectMode,Pe&&(this.objectMode=this.objectMode||!!ce.readableObjectMode),this.highWaterMark=N(this,ce,"readableHighWaterMark",Pe),this.buffer=new A,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==ce.emitClose,this.autoDestroy=!!ce.autoDestroy,this.destroyed=!1,this.defaultEncoding=ce.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ce.encoding&&(Y||(Y=g(53720).s),this.decoder=new Y(ce.encoding),this.encoding=ce.encoding)}function C(ce){if(p=p||g(41339),!(this instanceof C))return new C(ce);var be=this instanceof p;this._readableState=new te(ce,this,be),this.readable=!0,ce&&("function"==typeof ce.read&&(this._read=ce.read),"function"==typeof ce.destroy&&(this._destroy=ce.destroy)),_.call(this)}function o(ce,be,Pe,Fe,lt){E("readableAddChunk",be);var He,Ge=ce._readableState;if(null===be)Ge.reading=!1,function B(ce,be){if(E("onEofChunk"),!be.ended){if(be.decoder){var Pe=be.decoder.end();Pe&&Pe.length&&(be.buffer.push(Pe),be.length+=be.objectMode?1:Pe.length)}be.ended=!0,be.sync?I(ce):(be.needReadable=!1,be.emittedReadable||(be.emittedReadable=!0,f(ce)))}}(ce,Ge);else if(lt||(He=function d(ce,be){var Pe;return!function b(ce){return l.isBuffer(ce)||ce instanceof v}(be)&&"string"!=typeof be&&void 0!==be&&!ce.objectMode&&(Pe=new L("chunk",["string","Buffer","Uint8Array"],be)),Pe}(Ge,be)),He)q(ce,He);else if(Ge.objectMode||be&&be.length>0)if("string"!=typeof be&&!Ge.objectMode&&Object.getPrototypeOf(be)!==l.prototype&&(be=function m(ce){return l.from(ce)}(be)),Fe)Ge.endEmitted?q(ce,new W):s(ce,Ge,be,!0);else if(Ge.ended)q(ce,new z);else{if(Ge.destroyed)return!1;Ge.reading=!1,Ge.decoder&&!Pe?(be=Ge.decoder.write(be),Ge.objectMode||0!==be.length?s(ce,Ge,be,!1):R(ce,Ge)):s(ce,Ge,be,!1)}else Fe||(Ge.reading=!1,R(ce,Ge));return!Ge.ended&&(Ge.lengthbe.highWaterMark&&(be.highWaterMark=function S(ce){return ce>=h?ce=h:(ce--,ce|=ce>>>1,ce|=ce>>>2,ce|=ce>>>4,ce|=ce>>>8,ce|=ce>>>16,ce++),ce}(ce)),ce<=be.length?ce:be.ended?be.length:(be.needReadable=!0,0))}function I(ce){var be=ce._readableState;E("emitReadable",be.needReadable,be.emittedReadable),be.needReadable=!1,be.emittedReadable||(E("emitReadable",be.flowing),be.emittedReadable=!0,process.nextTick(f,ce))}function f(ce){var be=ce._readableState;E("emitReadable_",be.destroyed,be.length,be.ended),!be.destroyed&&(be.length||be.ended)&&(ce.emit("readable"),be.emittedReadable=!1),be.needReadable=!be.flowing&&!be.ended&&be.length<=be.highWaterMark,ve(ce)}function R(ce,be){be.readingMore||(be.readingMore=!0,process.nextTick(se,ce,be))}function se(ce,be){for(;!be.reading&&!be.ended&&(be.length0,be.resumeScheduled&&!be.paused?be.flowing=!0:ce.listenerCount("data")>0&&ce.resume()}function de(ce){E("readable nexttick read 0"),ce.read(0)}function ye(ce,be){E("resume",be.reading),be.reading||ce.read(0),be.resumeScheduled=!1,ce.emit("resume"),ve(ce),be.flowing&&!be.reading&&ce.read(0)}function ve(ce){var be=ce._readableState;for(E("flow",be.flowing);be.flowing&&null!==ce.read(););}function ae(ce,be){return 0===be.length?null:(be.objectMode?Pe=be.buffer.shift():!ce||ce>=be.length?(Pe=be.decoder?be.buffer.join(""):1===be.buffer.length?be.buffer.first():be.buffer.concat(be.length),be.buffer.clear()):Pe=be.buffer.consume(ce,be.decoder),Pe);var Pe}function fe(ce){var be=ce._readableState;E("endReadable",be.endEmitted),be.endEmitted||(be.ended=!0,process.nextTick(pe,be,ce))}function pe(ce,be){if(E("endReadableNT",ce.endEmitted,ce.length),!ce.endEmitted&&0===ce.length&&(ce.endEmitted=!0,be.readable=!1,be.emit("end"),ce.autoDestroy)){var Pe=be._writableState;(!Pe||Pe.autoDestroy&&Pe.finished)&&be.destroy()}}function Se(ce,be){for(var Pe=0,Fe=ce.length;Pe=be.highWaterMark:be.length>0)||be.ended))return E("read: emitReadable",be.length,be.ended),0===be.length&&be.ended?fe(this):I(this),null;if(0===(ce=k(ce,be))&&be.ended)return 0===be.length&&fe(this),null;var lt,Fe=be.needReadable;return E("need readable",Fe),(0===be.length||be.length-ce0?ae(ce,be):null)?(be.needReadable=be.length<=be.highWaterMark,ce=0):(be.length-=ce,be.awaitDrain=0),0===be.length&&(be.ended||(be.needReadable=!0),Pe!==ce&&be.ended&&fe(this)),null!==lt&&this.emit("data",lt),lt},C.prototype._read=function(ce){q(this,new j("_read()"))},C.prototype.pipe=function(ce,be){var Pe=this,Fe=this._readableState;switch(Fe.pipesCount){case 0:Fe.pipes=ce;break;case 1:Fe.pipes=[Fe.pipes,ce];break;default:Fe.pipes.push(ce)}Fe.pipesCount+=1,E("pipe count=%d opts=%j",Fe.pipesCount,be);var Ge=(!be||!1!==be.end)&&ce!==process.stdout&&ce!==process.stderr?Kt:Ae;function He(Te,Be){E("onunpipe"),Te===Pe&&Be&&!1===Be.hasUnpiped&&(Be.hasUnpiped=!0,function Vt(){E("cleanup"),ce.removeListener("close",Gt),ce.removeListener("finish",Re),ce.removeListener("drain",tt),ce.removeListener("error",at),ce.removeListener("unpipe",He),Pe.removeListener("end",Kt),Pe.removeListener("end",Ae),Pe.removeListener("data",ot),nt=!0,Fe.awaitDrain&&(!ce._writableState||ce._writableState.needDrain)&&tt()}())}function Kt(){E("onend"),ce.end()}Fe.endEmitted?process.nextTick(Ge):Pe.once("end",Ge),ce.on("unpipe",He);var tt=function ee(ce){return function(){var Pe=ce._readableState;E("pipeOnDrain",Pe.awaitDrain),Pe.awaitDrain&&Pe.awaitDrain--,0===Pe.awaitDrain&&w(ce,"data")&&(Pe.flowing=!0,ve(ce))}}(Pe);ce.on("drain",tt);var nt=!1;function ot(Te){E("ondata");var Be=ce.write(Te);E("dest.write",Be),!1===Be&&((1===Fe.pipesCount&&Fe.pipes===ce||Fe.pipesCount>1&&-1!==Se(Fe.pipes,ce))&&!nt&&(E("false write response, pause",Fe.awaitDrain),Fe.awaitDrain++),Pe.pause())}function at(Te){E("onerror",Te),Ae(),ce.removeListener("error",at),0===w(ce,"error")&&q(ce,Te)}function Gt(){ce.removeListener("finish",Re),Ae()}function Re(){E("onfinish"),ce.removeListener("close",Gt),Ae()}function Ae(){E("unpipe"),Pe.unpipe(ce)}return Pe.on("data",ot),function H(ce,be,Pe){if("function"==typeof ce.prependListener)return ce.prependListener(be,Pe);ce._events&&ce._events[be]?Array.isArray(ce._events[be])?ce._events[be].unshift(Pe):ce._events[be]=[Pe,ce._events[be]]:ce.on(be,Pe)}(ce,"error",at),ce.once("close",Gt),ce.once("finish",Re),ce.emit("pipe",Pe),Fe.flowing||(E("pipe resume"),Pe.resume()),ce},C.prototype.unpipe=function(ce){var be=this._readableState,Pe={hasUnpiped:!1};if(0===be.pipesCount)return this;if(1===be.pipesCount)return ce&&ce!==be.pipes||(ce||(ce=be.pipes),be.pipes=null,be.pipesCount=0,be.flowing=!1,ce&&ce.emit("unpipe",this,Pe)),this;if(!ce){var Fe=be.pipes,lt=be.pipesCount;be.pipes=null,be.pipesCount=0,be.flowing=!1;for(var Ge=0;Ge0,!1!==Fe.flowing&&this.resume()):"readable"===ce&&!Fe.endEmitted&&!Fe.readableListening&&(Fe.readableListening=Fe.needReadable=!0,Fe.flowing=!1,Fe.emittedReadable=!1,E("on readable",Fe.length,Fe.reading),Fe.length?I(this):Fe.reading||process.nextTick(de,this)),Pe},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(ce,be){var Pe=_.prototype.removeListener.call(this,ce,be);return"readable"===ce&&process.nextTick(oe,this),Pe},C.prototype.removeAllListeners=function(ce){var be=_.prototype.removeAllListeners.apply(this,arguments);return("readable"===ce||void 0===ce)&&process.nextTick(oe,this),be},C.prototype.resume=function(){var ce=this._readableState;return ce.flowing||(E("resume"),ce.flowing=!ce.readableListening,function Ce(ce,be){be.resumeScheduled||(be.resumeScheduled=!0,process.nextTick(ye,ce,be))}(this,ce)),ce.paused=!1,this},C.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(E("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(ce){var be=this,Pe=this._readableState,Fe=!1;for(var lt in ce.on("end",function(){if(E("wrapped end"),Pe.decoder&&!Pe.ended){var He=Pe.decoder.end();He&&He.length&&be.push(He)}be.push(null)}),ce.on("data",function(He){(E("wrapped data"),Pe.decoder&&(He=Pe.decoder.write(He)),Pe.objectMode&&null==He||!(Pe.objectMode||He&&He.length))||(be.push(He)||(Fe=!0,ce.pause()))}),ce)void 0===this[lt]&&"function"==typeof ce[lt]&&(this[lt]=function(Kt){return function(){return ce[Kt].apply(ce,arguments)}}(lt));for(var Ge=0;Ge{"use strict";re.exports=b;var p=g(70891).q,D=p.ERR_METHOD_NOT_IMPLEMENTED,w=p.ERR_MULTIPLE_CALLBACK,_=p.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=p.ERR_TRANSFORM_WITH_LENGTH_0,v=g(41339);function m(A,P){var x=this._transformState;x.transforming=!1;var N=x.writecb;if(null===N)return this.emit("error",new w);x.writechunk=null,x.writecb=null,null!=P&&this.push(P),N(A);var F=this._readableState;F.reading=!1,(F.needReadable||F.length{"use strict";function D(ve){var ae=this;this.next=null,this.entry=null,this.finish=function(){!function ye(ve,ae,fe){var pe=ve.entry;for(ve.entry=null;pe;){var Se=pe.callback;ae.pendingcb--,Se(fe),pe=pe.next}ae.corkedRequestsFree.next=ve}(ae,ve)}}var w;re.exports=te,te.WritableState=J;var _={deprecate:g(23532)},l=g(4970),v=g(93172).Buffer,m=global.Uint8Array||function(){};var H,E=g(41920),P=g(47102).getHighWaterMark,x=g(70891).q,N=x.ERR_INVALID_ARG_TYPE,F=x.ERR_METHOD_NOT_IMPLEMENTED,L=x.ERR_MULTIPLE_CALLBACK,z=x.ERR_STREAM_CANNOT_PIPE,j=x.ERR_STREAM_DESTROYED,W=x.ERR_STREAM_NULL_VALUES,Y=x.ERR_STREAM_WRITE_AFTER_END,G=x.ERR_UNKNOWN_ENCODING,Q=E.errorOrDestroy;function q(){}function J(ve,ae,fe){w=w||g(41339),ve=ve||{},"boolean"!=typeof fe&&(fe=ae instanceof w),this.objectMode=!!ve.objectMode,fe&&(this.objectMode=this.objectMode||!!ve.writableObjectMode),this.highWaterMark=P(this,ve,"writableHighWaterMark",fe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var pe=!1===ve.decodeStrings;this.decodeStrings=!pe,this.defaultEncoding=ve.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Se){!function B(ve,ae){var fe=ve._writableState,pe=fe.sync,Se=fe.writecb;if("function"!=typeof Se)throw new L;if(function k(ve){ve.writing=!1,ve.writecb=null,ve.length-=ve.writelen,ve.writelen=0}(fe),ae)!function S(ve,ae,fe,pe,Se){--ae.pendingcb,fe?(process.nextTick(Se,pe),process.nextTick(de,ve,ae),ve._writableState.errorEmitted=!0,Q(ve,pe)):(Se(pe),ve._writableState.errorEmitted=!0,Q(ve,pe),de(ve,ae))}(ve,fe,pe,ae,Se);else{var ce=se(fe)||ve.destroyed;!ce&&!fe.corked&&!fe.bufferProcessing&&fe.bufferedRequest&&R(ve,fe),pe?process.nextTick(I,ve,fe,ce,Se):I(ve,fe,ce,Se)}}(ae,Se)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==ve.emitClose,this.autoDestroy=!!ve.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new D(this)}function te(ve){var ae=this instanceof(w=w||g(41339));if(!ae&&!H.call(te,this))return new te(ve);this._writableState=new J(ve,this,ae),this.writable=!0,ve&&("function"==typeof ve.write&&(this._write=ve.write),"function"==typeof ve.writev&&(this._writev=ve.writev),"function"==typeof ve.destroy&&(this._destroy=ve.destroy),"function"==typeof ve.final&&(this._final=ve.final)),l.call(this)}function h(ve,ae,fe,pe,Se,ce,be){ae.writelen=pe,ae.writecb=be,ae.writing=!0,ae.sync=!0,ae.destroyed?ae.onwrite(new j("write")):fe?ve._writev(Se,ae.onwrite):ve._write(Se,ce,ae.onwrite),ae.sync=!1}function I(ve,ae,fe,pe){fe||function f(ve,ae){0===ae.length&&ae.needDrain&&(ae.needDrain=!1,ve.emit("drain"))}(ve,ae),ae.pendingcb--,pe(),de(ve,ae)}function R(ve,ae){ae.bufferProcessing=!0;var fe=ae.bufferedRequest;if(ve._writev&&fe&&fe.next){var pe=ae.bufferedRequestCount,Se=new Array(pe),ce=ae.corkedRequestsFree;ce.entry=fe;for(var be=0,Pe=!0;fe;)Se[be]=fe,fe.isBuf||(Pe=!1),fe=fe.next,be+=1;Se.allBuffers=Pe,h(ve,ae,!0,ae.length,Se,"",ce.finish),ae.pendingcb++,ae.lastBufferedRequest=null,ce.next?(ae.corkedRequestsFree=ce.next,ce.next=null):ae.corkedRequestsFree=new D(ae),ae.bufferedRequestCount=0}else{for(;fe;){var Fe=fe.chunk,lt=fe.encoding,Ge=fe.callback;if(h(ve,ae,!1,ae.objectMode?1:Fe.length,Fe,lt,Ge),fe=fe.next,ae.bufferedRequestCount--,ae.writing)break}null===fe&&(ae.lastBufferedRequest=null)}ae.bufferedRequest=fe,ae.bufferProcessing=!1}function se(ve){return ve.ending&&0===ve.length&&null===ve.bufferedRequest&&!ve.finished&&!ve.writing}function ee(ve,ae){ve._final(function(fe){ae.pendingcb--,fe&&Q(ve,fe),ae.prefinished=!0,ve.emit("prefinish"),de(ve,ae)})}function de(ve,ae){var fe=se(ae);if(fe&&(function oe(ve,ae){!ae.prefinished&&!ae.finalCalled&&("function"!=typeof ve._final||ae.destroyed?(ae.prefinished=!0,ve.emit("prefinish")):(ae.pendingcb++,ae.finalCalled=!0,process.nextTick(ee,ve,ae)))}(ve,ae),0===ae.pendingcb&&(ae.finished=!0,ve.emit("finish"),ae.autoDestroy))){var pe=ve._readableState;(!pe||pe.autoDestroy&&pe.endEmitted)&&ve.destroy()}return fe}g(83894)(te,l),J.prototype.getBuffer=function(){for(var ae=this.bufferedRequest,fe=[];ae;)fe.push(ae),ae=ae.next;return fe},function(){try{Object.defineProperty(J.prototype,"buffer",{get:_.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(H=Function.prototype[Symbol.hasInstance],Object.defineProperty(te,Symbol.hasInstance,{value:function(ae){return!!H.call(this,ae)||this===te&&(ae&&ae._writableState instanceof J)}})):H=function(ae){return ae instanceof this},te.prototype.pipe=function(){Q(this,new z)},te.prototype.write=function(ve,ae,fe){var pe=this._writableState,Se=!1,ce=!pe.objectMode&&function M(ve){return v.isBuffer(ve)||ve instanceof m}(ve);return ce&&!v.isBuffer(ve)&&(ve=function b(ve){return v.from(ve)}(ve)),"function"==typeof ae&&(fe=ae,ae=null),ce?ae="buffer":ae||(ae=pe.defaultEncoding),"function"!=typeof fe&&(fe=q),pe.ending?function C(ve,ae){var fe=new Y;Q(ve,fe),process.nextTick(ae,fe)}(this,fe):(ce||function o(ve,ae,fe,pe){var Se;return null===fe?Se=new W:"string"!=typeof fe&&!ae.objectMode&&(Se=new N("chunk",["string","Buffer"],fe)),!Se||(Q(ve,Se),process.nextTick(pe,Se),!1)}(this,pe,ve,fe))&&(pe.pendingcb++,Se=function d(ve,ae,fe,pe,Se,ce){if(!fe){var be=function s(ve,ae,fe){return!ve.objectMode&&!1!==ve.decodeStrings&&"string"==typeof ae&&(ae=v.from(ae,fe)),ae}(ae,pe,Se);pe!==be&&(fe=!0,Se="buffer",pe=be)}var Pe=ae.objectMode?1:pe.length;ae.length+=Pe;var Fe=ae.length-1))throw new G(ae);return this._writableState.defaultEncoding=ae,this},Object.defineProperty(te.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(te.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),te.prototype._write=function(ve,ae,fe){fe(new F("_write()"))},te.prototype._writev=null,te.prototype.end=function(ve,ae,fe){var pe=this._writableState;return"function"==typeof ve?(fe=ve,ve=null,ae=null):"function"==typeof ae&&(fe=ae,ae=null),null!=ve&&this.write(ve,ae),pe.corked&&(pe.corked=1,this.uncork()),pe.ending||function Ce(ve,ae,fe){ae.ending=!0,de(ve,ae),fe&&(ae.finished?process.nextTick(fe):ve.once("finish",fe)),ae.ended=!0,ve.writable=!1}(this,pe,fe),this},Object.defineProperty(te.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ae){this._writableState&&(this._writableState.destroyed=ae)}}),te.prototype.destroy=E.destroy,te.prototype._undestroy=E.undestroy,te.prototype._destroy=function(ve,ae){ae(ve)}},13872:(re,u,g)=>{"use strict";var p;function D(j,W,Y){return W in j?Object.defineProperty(j,W,{value:Y,enumerable:!0,configurable:!0,writable:!0}):j[W]=Y,j}var w=g(67542),_=Symbol("lastResolve"),l=Symbol("lastReject"),v=Symbol("error"),m=Symbol("ended"),b=Symbol("lastPromise"),M=Symbol("handlePromise"),E=Symbol("stream");function A(j,W){return{value:j,done:W}}function P(j){var W=j[_];if(null!==W){var Y=j[E].read();null!==Y&&(j[b]=null,j[_]=null,j[l]=null,W(A(Y,!1)))}}function x(j){process.nextTick(P,j)}var F=Object.getPrototypeOf(function(){}),L=Object.setPrototypeOf((D(p={get stream(){return this[E]},next:function(){var W=this,Y=this[v];if(null!==Y)return Promise.reject(Y);if(this[m])return Promise.resolve(A(void 0,!0));if(this[E].destroyed)return new Promise(function(J,H){process.nextTick(function(){W[v]?H(W[v]):J(A(void 0,!0))})});var Q,G=this[b];if(G)Q=new Promise(function N(j,W){return function(Y,G){j.then(function(){W[m]?Y(A(void 0,!0)):W[M](Y,G)},G)}}(G,this));else{var q=this[E].read();if(null!==q)return Promise.resolve(A(q,!1));Q=new Promise(this[M])}return this[b]=Q,Q}},Symbol.asyncIterator,function(){return this}),D(p,"return",function(){var W=this;return new Promise(function(Y,G){W[E].destroy(null,function(Q){Q?G(Q):Y(A(void 0,!0))})})}),p),F);re.exports=function(W){var Y,G=Object.create(L,(D(Y={},E,{value:W,writable:!0}),D(Y,_,{value:null,writable:!0}),D(Y,l,{value:null,writable:!0}),D(Y,v,{value:null,writable:!0}),D(Y,m,{value:W._readableState.endEmitted,writable:!0}),D(Y,M,{value:function(q,J){var H=G[E].read();H?(G[b]=null,G[_]=null,G[l]=null,q(A(H,!1))):(G[_]=q,G[l]=J)},writable:!0}),Y));return G[b]=null,w(W,function(Q){if(Q&&"ERR_STREAM_PREMATURE_CLOSE"!==Q.code){var q=G[l];return null!==q&&(G[b]=null,G[_]=null,G[l]=null,q(Q)),void(G[v]=Q)}var J=G[_];null!==J&&(G[b]=null,G[_]=null,G[l]=null,J(A(void 0,!0))),G[m]=!0}),W.on("readable",x.bind(null,G)),G}},25019:(re,u,g)=>{"use strict";function p(x,N){var F=Object.keys(x);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(x);N&&(L=L.filter(function(z){return Object.getOwnPropertyDescriptor(x,z).enumerable})),F.push.apply(F,L)}return F}function w(x,N,F){return N in x?Object.defineProperty(x,N,{value:F,enumerable:!0,configurable:!0,writable:!0}):x[N]=F,x}function l(x,N){for(var F=0;F0?this.tail.next=L:this.head=L,this.tail=L,++this.length}},{key:"unshift",value:function(F){var L={data:F,next:this.head};0===this.length&&(this.tail=L),this.head=L,++this.length}},{key:"shift",value:function(){if(0!==this.length){var F=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,F}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(F){if(0===this.length)return"";for(var L=this.head,z=""+L.data;L=L.next;)z+=F+L.data;return z}},{key:"concat",value:function(F){if(0===this.length)return b.alloc(0);for(var L=b.allocUnsafe(F>>>0),z=this.head,j=0;z;)P(z.data,L,j),j+=z.data.length,z=z.next;return L}},{key:"consume",value:function(F,L){var z;return FW.length?W.length:F;if(Y===W.length?j+=W:j+=W.slice(0,F),0===(F-=Y)){Y===W.length?(++z,L.next?this.head=L.next:this.head=this.tail=null):(this.head=L,L.data=W.slice(Y));break}++z}return this.length-=z,j}},{key:"_getBuffer",value:function(F){var L=b.allocUnsafe(F),z=this.head,j=1;for(z.data.copy(L),F-=z.data.length;z=z.next;){var W=z.data,Y=F>W.length?W.length:F;if(W.copy(L,L.length-F,0,Y),0===(F-=Y)){Y===W.length?(++j,z.next?this.head=z.next:this.head=this.tail=null):(this.head=z,z.data=W.slice(Y));break}++j}return this.length-=j,L}},{key:A,value:function(F,L){return E(this,function D(x){for(var N=1;N{"use strict";function g(l,v){w(l,v),p(l)}function p(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function w(l,v){l.emit("error",v)}re.exports={destroy:function u(l,v){var m=this,b=this._readableState&&this._readableState.destroyed,M=this._writableState&&this._writableState.destroyed;return b||M?(v?v(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(w,this,l)):process.nextTick(w,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(E){!v&&E?m._writableState?m._writableState.errorEmitted?process.nextTick(p,m):(m._writableState.errorEmitted=!0,process.nextTick(g,m,E)):process.nextTick(g,m,E):v?(process.nextTick(p,m),v(E)):process.nextTick(p,m)}),this)},undestroy:function D(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function _(l,v){var m=l._readableState,b=l._writableState;m&&m.autoDestroy||b&&b.autoDestroy?l.destroy(v):l.emit("error",v)}}},67542:(re,u,g)=>{"use strict";var p=g(70891).q.ERR_STREAM_PREMATURE_CLOSE;function w(){}re.exports=function l(v,m,b){if("function"==typeof m)return l(v,null,m);m||(m={}),b=function D(v){var m=!1;return function(){if(!m){m=!0;for(var b=arguments.length,M=new Array(b),E=0;E{re.exports=function(){throw new Error("Readable.from is not available in the browser")}},90954:(re,u,g)=>{"use strict";var p;var w=g(70891).q,_=w.ERR_MISSING_ARGS,l=w.ERR_STREAM_DESTROYED;function v(x){if(x)throw x}function M(x){x()}function E(x,N){return x.pipe(N)}re.exports=function P(){for(var x=arguments.length,N=new Array(x),F=0;F0,function(q){z||(z=q),q&&j.forEach(M),!G&&(j.forEach(M),L(z))})});return N.reduce(E)}},47102:(re,u,g)=>{"use strict";var p=g(70891).q.ERR_INVALID_OPT_VALUE;re.exports={getHighWaterMark:function w(_,l,v,m){var b=function D(_,l,v){return null!=_.highWaterMark?_.highWaterMark:l?_[v]:null}(l,m,v);if(null!=b){if(!isFinite(b)||Math.floor(b)!==b||b<0)throw new p(m?v:"highWaterMark",b);return Math.floor(b)}return _.objectMode?16:16384}}},4970:(re,u,g)=>{re.exports=g(59069).EventEmitter},53720:(re,u,g)=>{"use strict";var p=g(73502).Buffer,D=p.isEncoding||function(j){switch((j=""+j)&&j.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 l(j){var W;switch(this.encoding=function _(j){var W=function w(j){if(!j)return"utf8";for(var W;;)switch(j){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 j;default:if(W)return;j=(""+j).toLowerCase(),W=!0}}(j);if("string"!=typeof W&&(p.isEncoding===D||!D(j)))throw new Error("Unknown encoding: "+j);return W||j}(j),this.encoding){case"utf16le":this.text=P,this.end=x,W=4;break;case"utf8":this.fillLast=M,W=4;break;case"base64":this.text=N,this.end=F,W=3;break;default:return this.write=L,void(this.end=z)}this.lastNeed=0,this.lastTotal=0,this.lastChar=p.allocUnsafe(W)}function v(j){return j<=127?0:j>>5==6?2:j>>4==14?3:j>>3==30?4:j>>6==2?-1:-2}function M(j){var W=this.lastTotal-this.lastNeed,Y=function b(j,W,Y){if(128!=(192&W[0]))return j.lastNeed=0,"\ufffd";if(j.lastNeed>1&&W.length>1){if(128!=(192&W[1]))return j.lastNeed=1,"\ufffd";if(j.lastNeed>2&&W.length>2&&128!=(192&W[2]))return j.lastNeed=2,"\ufffd"}}(this,j);return void 0!==Y?Y:this.lastNeed<=j.length?(j.copy(this.lastChar,W,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(j.copy(this.lastChar,W,0,j.length),void(this.lastNeed-=j.length))}function P(j,W){if((j.length-W)%2==0){var Y=j.toString("utf16le",W);if(Y){var G=Y.charCodeAt(Y.length-1);if(G>=55296&&G<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=j[j.length-2],this.lastChar[1]=j[j.length-1],Y.slice(0,-1)}return Y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=j[j.length-1],j.toString("utf16le",W,j.length-1)}function x(j){var W=j&&j.length?this.write(j):"";if(this.lastNeed){var Y=this.lastTotal-this.lastNeed;return W+this.lastChar.toString("utf16le",0,Y)}return W}function N(j,W){var Y=(j.length-W)%3;return 0===Y?j.toString("base64",W):(this.lastNeed=3-Y,this.lastTotal=3,1===Y?this.lastChar[0]=j[j.length-1]:(this.lastChar[0]=j[j.length-2],this.lastChar[1]=j[j.length-1]),j.toString("base64",W,j.length-Y))}function F(j){var W=j&&j.length?this.write(j):"";return this.lastNeed?W+this.lastChar.toString("base64",0,3-this.lastNeed):W}function L(j){return j.toString(this.encoding)}function z(j){return j&&j.length?this.write(j):""}u.s=l,l.prototype.write=function(j){if(0===j.length)return"";var W,Y;if(this.lastNeed){if(void 0===(W=this.fillLast(j)))return"";Y=this.lastNeed,this.lastNeed=0}else Y=0;return Y=0?(Q>0&&(j.lastNeed=Q-1),Q):--G=0?(Q>0&&(j.lastNeed=Q-2),Q):--G=0?(Q>0&&(2===Q?Q=0:j.lastNeed=Q-3),Q):0))}(this,j,W);if(!this.lastNeed)return j.toString("utf8",W);this.lastTotal=Y;var G=j.length-(Y-this.lastNeed);return j.copy(this.lastChar,0,G),j.toString("utf8",W,G)},l.prototype.fillLast=function(j){if(this.lastNeed<=j.length)return j.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);j.copy(this.lastChar,this.lastTotal-this.lastNeed,0,j.length),this.lastNeed-=j.length}},65685:(re,u,g)=>{(u=re.exports=g(3154)).Stream=u,u.Readable=u,u.Writable=g(20520),u.Duplex=g(41339),u.Transform=g(6025),u.PassThrough=g(56071),u.finished=g(67542),u.pipeline=g(90954)},75634:(re,u,g)=>{"use strict";var p=g(93172).Buffer,D=g(83894),w=g(39650),_=new Array(16),l=[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],v=[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],m=[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],b=[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],M=[0,1518500249,1859775393,2400959708,2840853838],E=[1352829926,1548603684,1836072691,2053994217,0];function A(){w.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function P(j,W){return j<>>32-W}function x(j,W,Y,G,Q,q,J,H){return P(j+(W^Y^G)+q+J|0,H)+Q|0}function N(j,W,Y,G,Q,q,J,H){return P(j+(W&Y|~W&G)+q+J|0,H)+Q|0}function F(j,W,Y,G,Q,q,J,H){return P(j+((W|~Y)^G)+q+J|0,H)+Q|0}function L(j,W,Y,G,Q,q,J,H){return P(j+(W&G|Y&~G)+q+J|0,H)+Q|0}function z(j,W,Y,G,Q,q,J,H){return P(j+(W^(Y|~G))+q+J|0,H)+Q|0}D(A,w),A.prototype._update=function(){for(var j=_,W=0;W<16;++W)j[W]=this._block.readInt32LE(4*W);for(var Y=0|this._a,G=0|this._b,Q=0|this._c,q=0|this._d,J=0|this._e,H=0|this._a,te=0|this._b,C=0|this._c,o=0|this._d,s=0|this._e,d=0;d<80;d+=1){var h,S;d<16?(h=x(Y,G,Q,q,J,j[l[d]],M[0],m[d]),S=z(H,te,C,o,s,j[v[d]],E[0],b[d])):d<32?(h=N(Y,G,Q,q,J,j[l[d]],M[1],m[d]),S=L(H,te,C,o,s,j[v[d]],E[1],b[d])):d<48?(h=F(Y,G,Q,q,J,j[l[d]],M[2],m[d]),S=F(H,te,C,o,s,j[v[d]],E[2],b[d])):d<64?(h=L(Y,G,Q,q,J,j[l[d]],M[3],m[d]),S=N(H,te,C,o,s,j[v[d]],E[3],b[d])):(h=z(Y,G,Q,q,J,j[l[d]],M[4],m[d]),S=x(H,te,C,o,s,j[v[d]],E[4],b[d])),Y=J,J=q,q=P(Q,10),Q=G,G=h,H=s,s=o,o=P(C,10),C=te,te=S}var k=this._b+Q+o|0;this._b=this._c+q+s|0,this._c=this._d+J+H|0,this._d=this._e+Y+te|0,this._e=this._a+G+C|0,this._a=k},A.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var j=p.alloc?p.alloc(20):new p(20);return j.writeInt32LE(this._a,0),j.writeInt32LE(this._b,4),j.writeInt32LE(this._c,8),j.writeInt32LE(this._d,12),j.writeInt32LE(this._e,16),j},re.exports=A},73502:(re,u,g)=>{var p=g(93172),D=p.Buffer;function w(l,v){for(var m in l)v[m]=l[m]}function _(l,v,m){return D(l,v,m)}D.from&&D.alloc&&D.allocUnsafe&&D.allocUnsafeSlow?re.exports=p:(w(p,u),u.Buffer=_),_.prototype=Object.create(D.prototype),w(D,_),_.from=function(l,v,m){if("number"==typeof l)throw new TypeError("Argument must not be a number");return D(l,v,m)},_.alloc=function(l,v,m){if("number"!=typeof l)throw new TypeError("Argument must be a number");var b=D(l);return void 0!==v?"string"==typeof m?b.fill(v,m):b.fill(v):b.fill(0),b},_.allocUnsafe=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return D(l)},_.allocUnsafeSlow=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return p.SlowBuffer(l)}},62038:(re,u,g)=>{"use strict";var _,p=g(93172),D=p.Buffer,w={};for(_ in p)p.hasOwnProperty(_)&&("SlowBuffer"===_||"Buffer"===_||(w[_]=p[_]));var l=w.Buffer={};for(_ in D)D.hasOwnProperty(_)&&("allocUnsafe"===_||"allocUnsafeSlow"===_||(l[_]=D[_]));if(w.Buffer.prototype=D.prototype,(!l.from||l.from===Uint8Array.from)&&(l.from=function(v,m,b){if("number"==typeof v)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof v);if(v&&typeof v.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v);return D(v,m,b)}),l.alloc||(l.alloc=function(v,m,b){if("number"!=typeof v)throw new TypeError('The "size" argument must be of type number. Received type '+typeof v);if(v<0||v>=2*(1<<30))throw new RangeError('The value "'+v+'" is invalid for option "size"');var M=D(v);return m&&0!==m.length?"string"==typeof b?M.fill(m,b):M.fill(m):M.fill(0),M}),!w.kStringMaxLength)try{w.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}w.constants||(w.constants={MAX_LENGTH:w.kMaxLength},w.kStringMaxLength&&(w.constants.MAX_STRING_LENGTH=w.kStringMaxLength)),re.exports=w},40191:(re,u)=>{"use strict";function g(k,B){var I=k.length;k.push(B);e:for(;0>>1,R=k[f];if(!(0>>1;fw(oe,I))dew(Ce,oe)?(k[f]=Ce,k[de]=I,f=de):(k[f]=oe,k[ee]=I,f=ee);else{if(!(dew(Ce,I)))break e;k[f]=Ce,k[de]=I,f=de}}}return B}function w(k,B){var I=k.sortIndex-B.sortIndex;return 0!==I?I:k.id-B.id}if("object"==typeof performance&&"function"==typeof performance.now){var _=performance;u.unstable_now=function(){return _.now()}}else{var l=Date,v=l.now();u.unstable_now=function(){return l.now()-v}}var m=[],b=[],M=1,E=null,A=3,P=!1,x=!1,N=!1,F="function"==typeof setTimeout?setTimeout:null,L="function"==typeof clearTimeout?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function j(k){for(var B=p(b);null!==B;){if(null===B.callback)D(b);else{if(!(B.startTime<=k))break;D(b),B.sortIndex=B.expirationTime,g(m,B)}B=p(b)}}function W(k){if(N=!1,j(k),!x)if(null!==p(m))x=!0,h(Y);else{var B=p(b);null!==B&&S(W,B.startTime-k)}}function Y(k,B){x=!1,N&&(N=!1,L(q),q=-1),P=!0;var I=A;try{for(j(B),E=p(m);null!==E&&(!(E.expirationTime>B)||k&&!te());){var f=E.callback;if("function"==typeof f){E.callback=null,A=E.priorityLevel;var R=f(E.expirationTime<=B);B=u.unstable_now(),"function"==typeof R?E.callback=R:E===p(m)&&D(m),j(B)}else D(m);E=p(m)}if(null!==E)var se=!0;else{var ee=p(b);null!==ee&&S(W,ee.startTime-B),se=!1}return se}finally{E=null,A=I,P=!1}}typeof navigator<"u"&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var o,G=!1,Q=null,q=-1,J=5,H=-1;function te(){return!(u.unstable_now()-Hk||125f?(k.sortIndex=I,g(b,k),null===p(m)&&k===p(b)&&(N?(L(q),q=-1):N=!0,S(W,I-f))):(k.sortIndex=R,g(m,k),x||P||(x=!0,h(Y))),k},u.unstable_shouldYield=te,u.unstable_wrapCallback=function(k){var B=A;return function(){var I=A;A=B;try{return k.apply(this,arguments)}finally{A=I}}}},44854:(re,u,g)=>{"use strict";re.exports=g(40191)},50508:(re,u,g)=>{const p=Symbol("SemVer ANY");class D{static get ANY(){return p}constructor(A,P){if(P=w(P),A instanceof D){if(A.loose===!!P.loose)return A;A=A.value}A=A.trim().split(/\s+/).join(" "),m("comparator",A,P),this.options=P,this.loose=!!P.loose,this.parse(A),this.semver===p?this.value="":this.value=this.operator+this.semver.version,m("comp",this)}parse(A){const P=this.options.loose?_[l.COMPARATORLOOSE]:_[l.COMPARATOR],x=A.match(P);if(!x)throw new TypeError(`Invalid comparator: ${A}`);this.operator=void 0!==x[1]?x[1]:"","="===this.operator&&(this.operator=""),x[2]?this.semver=new b(x[2],this.options.loose):this.semver=p}toString(){return this.value}test(A){if(m("Comparator.test",A,this.options.loose),this.semver===p||A===p)return!0;if("string"==typeof A)try{A=new b(A,this.options)}catch{return!1}return v(A,this.operator,this.semver,this.options)}intersects(A,P){if(!(A instanceof D))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new M(A.value,P).test(this.value):""===A.operator?""===A.value||new M(this.value,P).test(A.semver):!((P=w(P)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===A.value)||!P.includePrerelease&&(this.value.startsWith("<0.0.0")||A.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&A.operator.startsWith(">")||this.operator.startsWith("<")&&A.operator.startsWith("<")||this.semver.version===A.semver.version&&this.operator.includes("=")&&A.operator.includes("=")||v(this.semver,"<",A.semver,P)&&this.operator.startsWith(">")&&A.operator.startsWith("<")||v(this.semver,">",A.semver,P)&&this.operator.startsWith("<")&&A.operator.startsWith(">"))}}re.exports=D;const w=g(20471),{safeRe:_,t:l}=g(1338),v=g(68127),m=g(66070),b=g(51839),M=g(48611)},48611:(re,u,g)=>{class p{constructor(h,S){if(S=_(S),h instanceof p)return h.loose===!!S.loose&&h.includePrerelease===!!S.includePrerelease?h:new p(h.raw,S);if(h instanceof l)return this.raw=h.value,this.set=[[h]],this.format(),this;if(this.options=S,this.loose=!!S.loose,this.includePrerelease=!!S.includePrerelease,this.raw=h.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(k=>this.parseRange(k.trim())).filter(k=>k.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const k=this.set[0];if(this.set=this.set.filter(B=>!F(B[0])),0===this.set.length)this.set=[k];else if(this.set.length>1)for(const B of this.set)if(1===B.length&&L(B[0])){this.set=[B];break}}this.format()}format(){return this.range=this.set.map(h=>h.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(h){const k=((this.options.includePrerelease&&x)|(this.options.loose&&N))+":"+h,B=w.get(k);if(B)return B;const I=this.options.loose,f=I?b[M.HYPHENRANGELOOSE]:b[M.HYPHENRANGE];h=h.replace(f,o(this.options.includePrerelease)),v("hyphen replace",h),h=h.replace(b[M.COMPARATORTRIM],E),v("comparator trim",h),h=h.replace(b[M.TILDETRIM],A),v("tilde trim",h),h=h.replace(b[M.CARETTRIM],P),v("caret trim",h);let R=h.split(" ").map(de=>j(de,this.options)).join(" ").split(/\s+/).map(de=>C(de,this.options));I&&(R=R.filter(de=>(v("loose invalid filter",de,this.options),!!de.match(b[M.COMPARATORLOOSE])))),v("range list",R);const se=new Map,ee=R.map(de=>new l(de,this.options));for(const de of ee){if(F(de))return[de];se.set(de.value,de)}se.size>1&&se.has("")&&se.delete("");const oe=[...se.values()];return w.set(k,oe),oe}intersects(h,S){if(!(h instanceof p))throw new TypeError("a Range is required");return this.set.some(k=>z(k,S)&&h.set.some(B=>z(B,S)&&k.every(I=>B.every(f=>I.intersects(f,S)))))}test(h){if(!h)return!1;if("string"==typeof h)try{h=new m(h,this.options)}catch{return!1}for(let S=0;S"<0.0.0-0"===d.value,L=d=>""===d.value,z=(d,h)=>{let S=!0;const k=d.slice();let B=k.pop();for(;S&&k.length;)S=k.every(I=>B.intersects(I,h)),B=k.pop();return S},j=(d,h)=>(v("comp",d,h),d=Q(d,h),v("caret",d),d=Y(d,h),v("tildes",d),d=J(d,h),v("xrange",d),d=te(d,h),v("stars",d),d),W=d=>!d||"x"===d.toLowerCase()||"*"===d,Y=(d,h)=>d.trim().split(/\s+/).map(S=>G(S,h)).join(" "),G=(d,h)=>{const S=h.loose?b[M.TILDELOOSE]:b[M.TILDE];return d.replace(S,(k,B,I,f,R)=>{let se;return v("tilde",d,k,B,I,f,R),W(B)?se="":W(I)?se=`>=${B}.0.0 <${+B+1}.0.0-0`:W(f)?se=`>=${B}.${I}.0 <${B}.${+I+1}.0-0`:R?(v("replaceTilde pr",R),se=`>=${B}.${I}.${f}-${R} <${B}.${+I+1}.0-0`):se=`>=${B}.${I}.${f} <${B}.${+I+1}.0-0`,v("tilde return",se),se})},Q=(d,h)=>d.trim().split(/\s+/).map(S=>q(S,h)).join(" "),q=(d,h)=>{v("caret",d,h);const S=h.loose?b[M.CARETLOOSE]:b[M.CARET],k=h.includePrerelease?"-0":"";return d.replace(S,(B,I,f,R,se)=>{let ee;return v("caret",d,B,I,f,R,se),W(I)?ee="":W(f)?ee=`>=${I}.0.0${k} <${+I+1}.0.0-0`:W(R)?ee="0"===I?`>=${I}.${f}.0${k} <${I}.${+f+1}.0-0`:`>=${I}.${f}.0${k} <${+I+1}.0.0-0`:se?(v("replaceCaret pr",se),ee="0"===I?"0"===f?`>=${I}.${f}.${R}-${se} <${I}.${f}.${+R+1}-0`:`>=${I}.${f}.${R}-${se} <${I}.${+f+1}.0-0`:`>=${I}.${f}.${R}-${se} <${+I+1}.0.0-0`):(v("no pr"),ee="0"===I?"0"===f?`>=${I}.${f}.${R}${k} <${I}.${f}.${+R+1}-0`:`>=${I}.${f}.${R}${k} <${I}.${+f+1}.0-0`:`>=${I}.${f}.${R} <${+I+1}.0.0-0`),v("caret return",ee),ee})},J=(d,h)=>(v("replaceXRanges",d,h),d.split(/\s+/).map(S=>H(S,h)).join(" ")),H=(d,h)=>{d=d.trim();const S=h.loose?b[M.XRANGELOOSE]:b[M.XRANGE];return d.replace(S,(k,B,I,f,R,se)=>{v("xRange",d,k,B,I,f,R,se);const ee=W(I),oe=ee||W(f),de=oe||W(R),Ce=de;return"="===B&&Ce&&(B=""),se=h.includePrerelease?"-0":"",ee?k=">"===B||"<"===B?"<0.0.0-0":"*":B&&Ce?(oe&&(f=0),R=0,">"===B?(B=">=",oe?(I=+I+1,f=0,R=0):(f=+f+1,R=0)):"<="===B&&(B="<",oe?I=+I+1:f=+f+1),"<"===B&&(se="-0"),k=`${B+I}.${f}.${R}${se}`):oe?k=`>=${I}.0.0${se} <${+I+1}.0.0-0`:de&&(k=`>=${I}.${f}.0${se} <${I}.${+f+1}.0-0`),v("xRange return",k),k})},te=(d,h)=>(v("replaceStars",d,h),d.trim().replace(b[M.STAR],"")),C=(d,h)=>(v("replaceGTE0",d,h),d.trim().replace(b[h.includePrerelease?M.GTE0PRE:M.GTE0],"")),o=d=>(h,S,k,B,I,f,R,se,ee,oe,de,Ce,ye)=>`${S=W(k)?"":W(B)?`>=${k}.0.0${d?"-0":""}`:W(I)?`>=${k}.${B}.0${d?"-0":""}`:f?`>=${S}`:`>=${S}${d?"-0":""}`} ${se=W(ee)?"":W(oe)?`<${+ee+1}.0.0-0`:W(de)?`<${ee}.${+oe+1}.0-0`:Ce?`<=${ee}.${oe}.${de}-${Ce}`:d?`<${ee}.${oe}.${+de+1}-0`:`<=${se}`}`.trim(),s=(d,h,S)=>{for(let k=0;k0){const B=d[k].semver;if(B.major===h.major&&B.minor===h.minor&&B.patch===h.patch)return!0}return!1}return!0}},51839:(re,u,g)=>{const p=g(66070),{MAX_LENGTH:D,MAX_SAFE_INTEGER:w}=g(31696),{safeRe:_,t:l}=g(1338),v=g(20471),{compareIdentifiers:m}=g(67165);class b{constructor(E,A){if(A=v(A),E instanceof b){if(E.loose===!!A.loose&&E.includePrerelease===!!A.includePrerelease)return E;E=E.version}else if("string"!=typeof E)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof E}".`);if(E.length>D)throw new TypeError(`version is longer than ${D} characters`);p("SemVer",E,A),this.options=A,this.loose=!!A.loose,this.includePrerelease=!!A.includePrerelease;const P=E.trim().match(A.loose?_[l.LOOSE]:_[l.FULL]);if(!P)throw new TypeError(`Invalid Version: ${E}`);if(this.raw=E,this.major=+P[1],this.minor=+P[2],this.patch=+P[3],this.major>w||this.major<0)throw new TypeError("Invalid major version");if(this.minor>w||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>w||this.patch<0)throw new TypeError("Invalid patch version");P[4]?this.prerelease=P[4].split(".").map(x=>{if(/^[0-9]+$/.test(x)){const N=+x;if(N>=0&&N=0;)"number"==typeof this.prerelease[N]&&(this.prerelease[N]++,N=-2);if(-1===N){if(A===this.prerelease.join(".")&&!1===P)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(x)}}if(A){let N=[A,x];!1===P&&(N=[A]),0===m(this.prerelease[0],A)?isNaN(this.prerelease[1])&&(this.prerelease=N):this.prerelease=N}break}default:throw new Error(`invalid increment argument: ${E}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}re.exports=b},69862:(re,u,g)=>{const p=g(62306);re.exports=(w,_)=>{const l=p(w.trim().replace(/^[=v]+/,""),_);return l?l.version:null}},68127:(re,u,g)=>{const p=g(95097),D=g(42046),w=g(97283),_=g(45844),l=g(30845),v=g(20477);re.exports=(b,M,E,A)=>{switch(M){case"===":return"object"==typeof b&&(b=b.version),"object"==typeof E&&(E=E.version),b===E;case"!==":return"object"==typeof b&&(b=b.version),"object"==typeof E&&(E=E.version),b!==E;case"":case"=":case"==":return p(b,E,A);case"!=":return D(b,E,A);case">":return w(b,E,A);case">=":return _(b,E,A);case"<":return l(b,E,A);case"<=":return v(b,E,A);default:throw new TypeError(`Invalid operator: ${M}`)}}},8797:(re,u,g)=>{const p=g(51839),D=g(62306),{safeRe:w,t:_}=g(1338);re.exports=(v,m)=>{if(v instanceof p)return v;if("number"==typeof v&&(v=String(v)),"string"!=typeof v)return null;let b=null;if((m=m||{}).rtl){let M;for(;(M=w[_.COERCERTL].exec(v))&&(!b||b.index+b[0].length!==v.length);)(!b||M.index+M[0].length!==b.index+b[0].length)&&(b=M),w[_.COERCERTL].lastIndex=M.index+M[1].length+M[2].length;w[_.COERCERTL].lastIndex=-1}else b=v.match(w[_.COERCE]);return null===b?null:D(`${b[2]}.${b[3]||"0"}.${b[4]||"0"}`,m)}},13621:(re,u,g)=>{const p=g(51839);re.exports=(w,_,l)=>{const v=new p(w,l),m=new p(_,l);return v.compare(m)||v.compareBuild(m)}},28088:(re,u,g)=>{const p=g(65522);re.exports=(w,_)=>p(w,_,!0)},65522:(re,u,g)=>{const p=g(51839);re.exports=(w,_,l)=>new p(w,l).compare(new p(_,l))},70380:(re,u,g)=>{const p=g(62306);re.exports=(w,_)=>{const l=p(w,null,!0),v=p(_,null,!0),m=l.compare(v);if(0===m)return null;const b=m>0,M=b?l:v,E=b?v:l,A=!!M.prerelease.length;if(E.prerelease.length&&!A)return E.patch||E.minor?M.patch?"patch":M.minor?"minor":"major":"major";const x=A?"pre":"";return l.major!==v.major?x+"major":l.minor!==v.minor?x+"minor":l.patch!==v.patch?x+"patch":"prerelease"}},95097:(re,u,g)=>{const p=g(65522);re.exports=(w,_,l)=>0===p(w,_,l)},97283:(re,u,g)=>{const p=g(65522);re.exports=(w,_,l)=>p(w,_,l)>0},45844:(re,u,g)=>{const p=g(65522);re.exports=(w,_,l)=>p(w,_,l)>=0},74749:(re,u,g)=>{const p=g(51839);re.exports=(w,_,l,v,m)=>{"string"==typeof l&&(m=v,v=l,l=void 0);try{return new p(w instanceof p?w.version:w,l).inc(_,v,m).version}catch{return null}}},30845:(re,u,g)=>{const p=g(65522);re.exports=(w,_,l)=>p(w,_,l)<0},20477:(re,u,g)=>{const p=g(65522);re.exports=(w,_,l)=>p(w,_,l)<=0},24303:(re,u,g)=>{const p=g(51839);re.exports=(w,_)=>new p(w,_).major},87920:(re,u,g)=>{const p=g(51839);re.exports=(w,_)=>new p(w,_).minor},42046:(re,u,g)=>{const p=g(65522);re.exports=(w,_,l)=>0!==p(w,_,l)},62306:(re,u,g)=>{const p=g(51839);re.exports=(w,_,l=!1)=>{if(w instanceof p)return w;try{return new p(w,_)}catch(v){if(!l)return null;throw v}}},81387:(re,u,g)=>{const p=g(51839);re.exports=(w,_)=>new p(w,_).patch},71964:(re,u,g)=>{const p=g(62306);re.exports=(w,_)=>{const l=p(w,_);return l&&l.prerelease.length?l.prerelease:null}},48034:(re,u,g)=>{const p=g(65522);re.exports=(w,_,l)=>p(_,w,l)},89610:(re,u,g)=>{const p=g(13621);re.exports=(w,_)=>w.sort((l,v)=>p(v,l,_))},52866:(re,u,g)=>{const p=g(48611);re.exports=(w,_,l)=>{try{_=new p(_,l)}catch{return!1}return _.test(w)}},2379:(re,u,g)=>{const p=g(13621);re.exports=(w,_)=>w.sort((l,v)=>p(l,v,_))},26473:(re,u,g)=>{const p=g(62306);re.exports=(w,_)=>{const l=p(w,_);return l?l.version:null}},97858:(re,u,g)=>{const p=g(1338),D=g(31696),w=g(51839),_=g(67165),l=g(62306),v=g(26473),m=g(69862),b=g(74749),M=g(70380),E=g(24303),A=g(87920),P=g(81387),x=g(71964),N=g(65522),F=g(48034),L=g(28088),z=g(13621),j=g(2379),W=g(89610),Y=g(97283),G=g(30845),Q=g(95097),q=g(42046),J=g(45844),H=g(20477),te=g(68127),C=g(8797),o=g(50508),s=g(48611),d=g(52866),h=g(16892),S=g(27693),k=g(24499),B=g(57291),I=g(14282),f=g(97203),R=g(82764),se=g(51658),ee=g(74741),oe=g(93807),de=g(24158);re.exports={parse:l,valid:v,clean:m,inc:b,diff:M,major:E,minor:A,patch:P,prerelease:x,compare:N,rcompare:F,compareLoose:L,compareBuild:z,sort:j,rsort:W,gt:Y,lt:G,eq:Q,neq:q,gte:J,lte:H,cmp:te,coerce:C,Comparator:o,Range:s,satisfies:d,toComparators:h,maxSatisfying:S,minSatisfying:k,minVersion:B,validRange:I,outside:f,gtr:R,ltr:se,intersects:ee,simplifyRange:oe,subset:de,SemVer:w,re:p.re,src:p.src,tokens:p.t,SEMVER_SPEC_VERSION:D.SEMVER_SPEC_VERSION,RELEASE_TYPES:D.RELEASE_TYPES,compareIdentifiers:_.compareIdentifiers,rcompareIdentifiers:_.rcompareIdentifiers}},31696:re=>{const p=Number.MAX_SAFE_INTEGER||9007199254740991;re.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:p,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},66070:re=>{const u="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...g)=>console.error("SEMVER",...g):()=>{};re.exports=u},67165:re=>{const u=/^[0-9]+$/,g=(D,w)=>{const _=u.test(D),l=u.test(w);return _&&l&&(D=+D,w=+w),D===w?0:_&&!l?-1:l&&!_?1:Dg(w,D)}},20471:re=>{const u=Object.freeze({loose:!0}),g=Object.freeze({});re.exports=D=>D?"object"!=typeof D?u:D:g},1338:(re,u,g)=>{const{MAX_SAFE_COMPONENT_LENGTH:p,MAX_SAFE_BUILD_LENGTH:D,MAX_LENGTH:w}=g(31696),_=g(66070),l=(u=re.exports={}).re=[],v=u.safeRe=[],m=u.src=[],b=u.t={};let M=0;const E="[a-zA-Z0-9-]",A=[["\\s",1],["\\d",w],[E,D]],x=(N,F,L)=>{const z=(N=>{for(const[F,L]of A)N=N.split(`${F}*`).join(`${F}{0,${L}}`).split(`${F}+`).join(`${F}{1,${L}}`);return N})(F),j=M++;_(N,j,F),b[N]=j,m[j]=F,l[j]=new RegExp(F,L?"g":void 0),v[j]=new RegExp(z,L?"g":void 0)};x("NUMERICIDENTIFIER","0|[1-9]\\d*"),x("NUMERICIDENTIFIERLOOSE","\\d+"),x("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${E}*`),x("MAINVERSION",`(${m[b.NUMERICIDENTIFIER]})\\.(${m[b.NUMERICIDENTIFIER]})\\.(${m[b.NUMERICIDENTIFIER]})`),x("MAINVERSIONLOOSE",`(${m[b.NUMERICIDENTIFIERLOOSE]})\\.(${m[b.NUMERICIDENTIFIERLOOSE]})\\.(${m[b.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASEIDENTIFIER",`(?:${m[b.NUMERICIDENTIFIER]}|${m[b.NONNUMERICIDENTIFIER]})`),x("PRERELEASEIDENTIFIERLOOSE",`(?:${m[b.NUMERICIDENTIFIERLOOSE]}|${m[b.NONNUMERICIDENTIFIER]})`),x("PRERELEASE",`(?:-(${m[b.PRERELEASEIDENTIFIER]}(?:\\.${m[b.PRERELEASEIDENTIFIER]})*))`),x("PRERELEASELOOSE",`(?:-?(${m[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${m[b.PRERELEASEIDENTIFIERLOOSE]})*))`),x("BUILDIDENTIFIER",`${E}+`),x("BUILD",`(?:\\+(${m[b.BUILDIDENTIFIER]}(?:\\.${m[b.BUILDIDENTIFIER]})*))`),x("FULLPLAIN",`v?${m[b.MAINVERSION]}${m[b.PRERELEASE]}?${m[b.BUILD]}?`),x("FULL",`^${m[b.FULLPLAIN]}$`),x("LOOSEPLAIN",`[v=\\s]*${m[b.MAINVERSIONLOOSE]}${m[b.PRERELEASELOOSE]}?${m[b.BUILD]}?`),x("LOOSE",`^${m[b.LOOSEPLAIN]}$`),x("GTLT","((?:<|>)?=?)"),x("XRANGEIDENTIFIERLOOSE",`${m[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),x("XRANGEIDENTIFIER",`${m[b.NUMERICIDENTIFIER]}|x|X|\\*`),x("XRANGEPLAIN",`[v=\\s]*(${m[b.XRANGEIDENTIFIER]})(?:\\.(${m[b.XRANGEIDENTIFIER]})(?:\\.(${m[b.XRANGEIDENTIFIER]})(?:${m[b.PRERELEASE]})?${m[b.BUILD]}?)?)?`),x("XRANGEPLAINLOOSE",`[v=\\s]*(${m[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[b.XRANGEIDENTIFIERLOOSE]})(?:${m[b.PRERELEASELOOSE]})?${m[b.BUILD]}?)?)?`),x("XRANGE",`^${m[b.GTLT]}\\s*${m[b.XRANGEPLAIN]}$`),x("XRANGELOOSE",`^${m[b.GTLT]}\\s*${m[b.XRANGEPLAINLOOSE]}$`),x("COERCE",`(^|[^\\d])(\\d{1,${p}})(?:\\.(\\d{1,${p}}))?(?:\\.(\\d{1,${p}}))?(?:$|[^\\d])`),x("COERCERTL",m[b.COERCE],!0),x("LONETILDE","(?:~>?)"),x("TILDETRIM",`(\\s*)${m[b.LONETILDE]}\\s+`,!0),u.tildeTrimReplace="$1~",x("TILDE",`^${m[b.LONETILDE]}${m[b.XRANGEPLAIN]}$`),x("TILDELOOSE",`^${m[b.LONETILDE]}${m[b.XRANGEPLAINLOOSE]}$`),x("LONECARET","(?:\\^)"),x("CARETTRIM",`(\\s*)${m[b.LONECARET]}\\s+`,!0),u.caretTrimReplace="$1^",x("CARET",`^${m[b.LONECARET]}${m[b.XRANGEPLAIN]}$`),x("CARETLOOSE",`^${m[b.LONECARET]}${m[b.XRANGEPLAINLOOSE]}$`),x("COMPARATORLOOSE",`^${m[b.GTLT]}\\s*(${m[b.LOOSEPLAIN]})$|^$`),x("COMPARATOR",`^${m[b.GTLT]}\\s*(${m[b.FULLPLAIN]})$|^$`),x("COMPARATORTRIM",`(\\s*)${m[b.GTLT]}\\s*(${m[b.LOOSEPLAIN]}|${m[b.XRANGEPLAIN]})`,!0),u.comparatorTrimReplace="$1$2$3",x("HYPHENRANGE",`^\\s*(${m[b.XRANGEPLAIN]})\\s+-\\s+(${m[b.XRANGEPLAIN]})\\s*$`),x("HYPHENRANGELOOSE",`^\\s*(${m[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${m[b.XRANGEPLAINLOOSE]})\\s*$`),x("STAR","(<|>)?=?\\s*\\*"),x("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),x("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},20578:(re,u,g)=>{"use strict";const p=g(47245),D=Symbol("max"),w=Symbol("length"),_=Symbol("lengthCalculator"),l=Symbol("allowStale"),v=Symbol("maxAge"),m=Symbol("dispose"),b=Symbol("noDisposeOnSet"),M=Symbol("lruList"),E=Symbol("cache"),A=Symbol("updateAgeOnGet"),P=()=>1;const N=(Y,G,Q)=>{const q=Y[E].get(G);if(q){const J=q.value;if(F(Y,J)){if(z(Y,q),!Y[l])return}else Q&&(Y[A]&&(q.value.now=Date.now()),Y[M].unshiftNode(q));return J.value}},F=(Y,G)=>{if(!G||!G.maxAge&&!Y[v])return!1;const Q=Date.now()-G.now;return G.maxAge?Q>G.maxAge:Y[v]&&Q>Y[v]},L=Y=>{if(Y[w]>Y[D])for(let G=Y[M].tail;Y[w]>Y[D]&&null!==G;){const Q=G.prev;z(Y,G),G=Q}},z=(Y,G)=>{if(G){const Q=G.value;Y[m]&&Y[m](Q.key,Q.value),Y[w]-=Q.length,Y[E].delete(Q.key),Y[M].removeNode(G)}};class j{constructor(G,Q,q,J,H){this.key=G,this.value=Q,this.length=q,this.now=J,this.maxAge=H||0}}const W=(Y,G,Q,q)=>{let J=Q.value;F(Y,J)&&(z(Y,Q),Y[l]||(J=void 0)),J&&G.call(q,J.value,J.key,Y)};re.exports=class x{constructor(G){if("number"==typeof G&&(G={max:G}),G||(G={}),G.max&&("number"!=typeof G.max||G.max<0))throw new TypeError("max must be a non-negative number");this[D]=G.max||1/0;const q=G.length||P;if(this[_]="function"!=typeof q?P:q,this[l]=G.stale||!1,G.maxAge&&"number"!=typeof G.maxAge)throw new TypeError("maxAge must be a number");this[v]=G.maxAge||0,this[m]=G.dispose,this[b]=G.noDisposeOnSet||!1,this[A]=G.updateAgeOnGet||!1,this.reset()}set max(G){if("number"!=typeof G||G<0)throw new TypeError("max must be a non-negative number");this[D]=G||1/0,L(this)}get max(){return this[D]}set allowStale(G){this[l]=!!G}get allowStale(){return this[l]}set maxAge(G){if("number"!=typeof G)throw new TypeError("maxAge must be a non-negative number");this[v]=G,L(this)}get maxAge(){return this[v]}set lengthCalculator(G){"function"!=typeof G&&(G=P),G!==this[_]&&(this[_]=G,this[w]=0,this[M].forEach(Q=>{Q.length=this[_](Q.value,Q.key),this[w]+=Q.length})),L(this)}get lengthCalculator(){return this[_]}get length(){return this[w]}get itemCount(){return this[M].length}rforEach(G,Q){Q=Q||this;for(let q=this[M].tail;null!==q;){const J=q.prev;W(this,G,q,Q),q=J}}forEach(G,Q){Q=Q||this;for(let q=this[M].head;null!==q;){const J=q.next;W(this,G,q,Q),q=J}}keys(){return this[M].toArray().map(G=>G.key)}values(){return this[M].toArray().map(G=>G.value)}reset(){this[m]&&this[M]&&this[M].length&&this[M].forEach(G=>this[m](G.key,G.value)),this[E]=new Map,this[M]=new p,this[w]=0}dump(){return this[M].map(G=>!F(this,G)&&{k:G.key,v:G.value,e:G.now+(G.maxAge||0)}).toArray().filter(G=>G)}dumpLru(){return this[M]}set(G,Q,q){if((q=q||this[v])&&"number"!=typeof q)throw new TypeError("maxAge must be a number");const J=q?Date.now():0,H=this[_](Q,G);if(this[E].has(G)){if(H>this[D])return z(this,this[E].get(G)),!1;const o=this[E].get(G).value;return this[m]&&(this[b]||this[m](G,o.value)),o.now=J,o.maxAge=q,o.value=Q,this[w]+=H-o.length,o.length=H,this.get(G),L(this),!0}const te=new j(G,Q,H,J,q);return te.length>this[D]?(this[m]&&this[m](G,Q),!1):(this[w]+=te.length,this[M].unshift(te),this[E].set(G,this[M].head),L(this),!0)}has(G){if(!this[E].has(G))return!1;const Q=this[E].get(G).value;return!F(this,Q)}get(G){return N(this,G,!0)}peek(G){return N(this,G,!1)}pop(){const G=this[M].tail;return G?(z(this,G),G.value):null}del(G){z(this,this[E].get(G))}load(G){this.reset();const Q=Date.now();for(let q=G.length-1;q>=0;q--){const J=G[q],H=J.e||0;if(0===H)this.set(J.k,J.v);else{const te=H-Q;te>0&&this.set(J.k,J.v,te)}}}prune(){this[E].forEach((G,Q)=>N(this,Q,!1))}}},82764:(re,u,g)=>{const p=g(97203);re.exports=(w,_,l)=>p(w,_,">",l)},74741:(re,u,g)=>{const p=g(48611);re.exports=(w,_,l)=>(w=new p(w,l),_=new p(_,l),w.intersects(_,l))},51658:(re,u,g)=>{const p=g(97203);re.exports=(w,_,l)=>p(w,_,"<",l)},27693:(re,u,g)=>{const p=g(51839),D=g(48611);re.exports=(_,l,v)=>{let m=null,b=null,M=null;try{M=new D(l,v)}catch{return null}return _.forEach(E=>{M.test(E)&&(!m||-1===b.compare(E))&&(m=E,b=new p(m,v))}),m}},24499:(re,u,g)=>{const p=g(51839),D=g(48611);re.exports=(_,l,v)=>{let m=null,b=null,M=null;try{M=new D(l,v)}catch{return null}return _.forEach(E=>{M.test(E)&&(!m||1===b.compare(E))&&(m=E,b=new p(m,v))}),m}},57291:(re,u,g)=>{const p=g(51839),D=g(48611),w=g(97283);re.exports=(l,v)=>{l=new D(l,v);let m=new p("0.0.0");if(l.test(m)||(m=new p("0.0.0-0"),l.test(m)))return m;m=null;for(let b=0;b{const P=new p(A.semver.version);switch(A.operator){case">":0===P.prerelease.length?P.patch++:P.prerelease.push(0),P.raw=P.format();case"":case">=":(!E||w(P,E))&&(E=P);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),E&&(!m||w(m,E))&&(m=E)}return m&&l.test(m)?m:null}},97203:(re,u,g)=>{const p=g(51839),D=g(50508),{ANY:w}=D,_=g(48611),l=g(52866),v=g(97283),m=g(30845),b=g(20477),M=g(45844);re.exports=(A,P,x,N)=>{let F,L,z,j,W;switch(A=new p(A,N),P=new _(P,N),x){case">":F=v,L=b,z=m,j=">",W=">=";break;case"<":F=m,L=M,z=v,j="<",W="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(l(A,P,N))return!1;for(let Y=0;Y{J.semver===w&&(J=new D(">=0.0.0")),Q=Q||J,q=q||J,F(J.semver,Q.semver,N)?Q=J:z(J.semver,q.semver,N)&&(q=J)}),Q.operator===j||Q.operator===W||(!q.operator||q.operator===j)&&L(A,q.semver))return!1;if(q.operator===W&&z(A,q.semver))return!1}return!0}},93807:(re,u,g)=>{const p=g(52866),D=g(65522);re.exports=(w,_,l)=>{const v=[];let m=null,b=null;const M=w.sort((x,N)=>D(x,N,l));for(const x of M)p(x,_,l)?(b=x,m||(m=x)):(b&&v.push([m,b]),b=null,m=null);m&&v.push([m,null]);const E=[];for(const[x,N]of v)x===N?E.push(x):N||x!==M[0]?N?x===M[0]?E.push(`<=${N}`):E.push(`${x} - ${N}`):E.push(`>=${x}`):E.push("*");const A=E.join(" || "),P="string"==typeof _.raw?_.raw:String(_);return A.length{const p=g(48611),D=g(50508),{ANY:w}=D,_=g(52866),l=g(65522),m=[new D(">=0.0.0-0")],b=[new D(">=0.0.0")],M=(P,x,N)=>{if(P===x)return!0;if(1===P.length&&P[0].semver===w){if(1===x.length&&x[0].semver===w)return!0;P=N.includePrerelease?m:b}if(1===x.length&&x[0].semver===w){if(N.includePrerelease)return!0;x=b}const F=new Set;let L,z,j;for(const H of P)">"===H.operator||">="===H.operator?L=E(L,H,N):"<"===H.operator||"<="===H.operator?z=A(z,H,N):F.add(H.semver);if(F.size>1)return null;if(L&&z){if(j=l(L.semver,z.semver,N),j>0)return null;if(0===j&&(">="!==L.operator||"<="!==z.operator))return null}for(const H of F){if(L&&!_(H,String(L),N)||z&&!_(H,String(z),N))return null;for(const te of x)if(!_(H,String(te),N))return!1;return!0}let W,Y,G,Q,q=!(!z||N.includePrerelease||!z.semver.prerelease.length)&&z.semver,J=!(!L||N.includePrerelease||!L.semver.prerelease.length)&&L.semver;q&&1===q.prerelease.length&&"<"===z.operator&&0===q.prerelease[0]&&(q=!1);for(const H of x){if(Q=Q||">"===H.operator||">="===H.operator,G=G||"<"===H.operator||"<="===H.operator,L)if(J&&H.semver.prerelease&&H.semver.prerelease.length&&H.semver.major===J.major&&H.semver.minor===J.minor&&H.semver.patch===J.patch&&(J=!1),">"===H.operator||">="===H.operator){if(W=E(L,H,N),W===H&&W!==L)return!1}else if(">="===L.operator&&!_(L.semver,String(H),N))return!1;if(z)if(q&&H.semver.prerelease&&H.semver.prerelease.length&&H.semver.major===q.major&&H.semver.minor===q.minor&&H.semver.patch===q.patch&&(q=!1),"<"===H.operator||"<="===H.operator){if(Y=A(z,H,N),Y===H&&Y!==z)return!1}else if("<="===z.operator&&!_(z.semver,String(H),N))return!1;if(!H.operator&&(z||L)&&0!==j)return!1}return!(L&&G&&!z&&0!==j||z&&Q&&!L&&0!==j||J||q)},E=(P,x,N)=>{if(!P)return x;const F=l(P.semver,x.semver,N);return F>0?P:F<0||">"===x.operator&&">="===P.operator?x:P},A=(P,x,N)=>{if(!P)return x;const F=l(P.semver,x.semver,N);return F<0?P:F>0||"<"===x.operator&&"<="===P.operator?x:P};re.exports=(P,x,N={})=>{if(P===x)return!0;P=new p(P,N),x=new p(x,N);let F=!1;e:for(const L of P.set){for(const z of x.set){const j=M(L,z,N);if(F=F||null!==j,j)continue e}if(F)return!1}return!0}},16892:(re,u,g)=>{const p=g(48611);re.exports=(w,_)=>new p(w,_).set.map(l=>l.map(v=>v.value).join(" ").trim().split(" "))},14282:(re,u,g)=>{const p=g(48611);re.exports=(w,_)=>{try{return new p(w,_).range||"*"}catch{return null}}},1106:re=>{"use strict";re.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function u(p,D){return p.__proto__=D,p}:function g(p,D){for(var w in D)Object.prototype.hasOwnProperty.call(p,w)||(p[w]=D[w]);return p})},86692:(re,u,g)=>{var p=g(73502).Buffer;function D(w,_){this._block=p.alloc(w),this._finalSize=_,this._blockSize=w,this._len=0}D.prototype.update=function(w,_){"string"==typeof w&&(_=_||"utf8",w=p.from(w,_));for(var l=this._block,v=this._blockSize,m=w.length,b=this._len,M=0;M=this._finalSize&&(this._update(this._block),this._block.fill(0));var l=8*this._len;if(l<=4294967295)this._block.writeUInt32BE(l,this._blockSize-4);else{var v=(4294967295&l)>>>0,m=(l-v)/4294967296;this._block.writeUInt32BE(m,this._blockSize-8),this._block.writeUInt32BE(v,this._blockSize-4)}this._update(this._block);var b=this._hash();return w?b.toString(w):b},D.prototype._update=function(){throw new Error("_update must be implemented by subclass")},re.exports=D},95244:(re,u,g)=>{var p=re.exports=function(w){w=w.toLowerCase();var _=p[w];if(!_)throw new Error(w+" is not supported (we accept pull requests)");return new _};p.sha=g(88932),p.sha1=g(17736),p.sha224=g(25044),p.sha256=g(15014),p.sha384=g(76540),p.sha512=g(10117)},88932:(re,u,g)=>{var p=g(83894),D=g(86692),w=g(73502).Buffer,_=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function v(){this.init(),this._w=l,D.call(this,64,56)}function m(E){return E<<5|E>>>27}function b(E){return E<<30|E>>>2}function M(E,A,P,x){return 0===E?A&P|~A&x:2===E?A&P|A&x|P&x:A^P^x}p(v,D),v.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},v.prototype._update=function(E){for(var A=this._w,P=0|this._a,x=0|this._b,N=0|this._c,F=0|this._d,L=0|this._e,z=0;z<16;++z)A[z]=E.readInt32BE(4*z);for(;z<80;++z)A[z]=A[z-3]^A[z-8]^A[z-14]^A[z-16];for(var j=0;j<80;++j){var W=~~(j/20),Y=m(P)+M(W,x,N,F)+L+A[j]+_[W]|0;L=F,F=N,N=b(x),x=P,P=Y}this._a=P+this._a|0,this._b=x+this._b|0,this._c=N+this._c|0,this._d=F+this._d|0,this._e=L+this._e|0},v.prototype._hash=function(){var E=w.allocUnsafe(20);return E.writeInt32BE(0|this._a,0),E.writeInt32BE(0|this._b,4),E.writeInt32BE(0|this._c,8),E.writeInt32BE(0|this._d,12),E.writeInt32BE(0|this._e,16),E},re.exports=v},17736:(re,u,g)=>{var p=g(83894),D=g(86692),w=g(73502).Buffer,_=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function v(){this.init(),this._w=l,D.call(this,64,56)}function m(A){return A<<1|A>>>31}function b(A){return A<<5|A>>>27}function M(A){return A<<30|A>>>2}function E(A,P,x,N){return 0===A?P&x|~P&N:2===A?P&x|P&N|x&N:P^x^N}p(v,D),v.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},v.prototype._update=function(A){for(var P=this._w,x=0|this._a,N=0|this._b,F=0|this._c,L=0|this._d,z=0|this._e,j=0;j<16;++j)P[j]=A.readInt32BE(4*j);for(;j<80;++j)P[j]=m(P[j-3]^P[j-8]^P[j-14]^P[j-16]);for(var W=0;W<80;++W){var Y=~~(W/20),G=b(x)+E(Y,N,F,L)+z+P[W]+_[Y]|0;z=L,L=F,F=M(N),N=x,x=G}this._a=x+this._a|0,this._b=N+this._b|0,this._c=F+this._c|0,this._d=L+this._d|0,this._e=z+this._e|0},v.prototype._hash=function(){var A=w.allocUnsafe(20);return A.writeInt32BE(0|this._a,0),A.writeInt32BE(0|this._b,4),A.writeInt32BE(0|this._c,8),A.writeInt32BE(0|this._d,12),A.writeInt32BE(0|this._e,16),A},re.exports=v},25044:(re,u,g)=>{var p=g(83894),D=g(15014),w=g(86692),_=g(73502).Buffer,l=new Array(64);function v(){this.init(),this._w=l,w.call(this,64,56)}p(v,D),v.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},v.prototype._hash=function(){var m=_.allocUnsafe(28);return m.writeInt32BE(this._a,0),m.writeInt32BE(this._b,4),m.writeInt32BE(this._c,8),m.writeInt32BE(this._d,12),m.writeInt32BE(this._e,16),m.writeInt32BE(this._f,20),m.writeInt32BE(this._g,24),m},re.exports=v},15014:(re,u,g)=>{var p=g(83894),D=g(86692),w=g(73502).Buffer,_=[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],l=new Array(64);function v(){this.init(),this._w=l,D.call(this,64,56)}function m(x,N,F){return F^x&(N^F)}function b(x,N,F){return x&N|F&(x|N)}function M(x){return(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10)}function E(x){return(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7)}function A(x){return(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3}function P(x){return(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10}p(v,D),v.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},v.prototype._update=function(x){for(var N=this._w,F=0|this._a,L=0|this._b,z=0|this._c,j=0|this._d,W=0|this._e,Y=0|this._f,G=0|this._g,Q=0|this._h,q=0;q<16;++q)N[q]=x.readInt32BE(4*q);for(;q<64;++q)N[q]=P(N[q-2])+N[q-7]+A(N[q-15])+N[q-16]|0;for(var J=0;J<64;++J){var H=Q+E(W)+m(W,Y,G)+_[J]+N[J]|0,te=M(F)+b(F,L,z)|0;Q=G,G=Y,Y=W,W=j+H|0,j=z,z=L,L=F,F=H+te|0}this._a=F+this._a|0,this._b=L+this._b|0,this._c=z+this._c|0,this._d=j+this._d|0,this._e=W+this._e|0,this._f=Y+this._f|0,this._g=G+this._g|0,this._h=Q+this._h|0},v.prototype._hash=function(){var x=w.allocUnsafe(32);return x.writeInt32BE(this._a,0),x.writeInt32BE(this._b,4),x.writeInt32BE(this._c,8),x.writeInt32BE(this._d,12),x.writeInt32BE(this._e,16),x.writeInt32BE(this._f,20),x.writeInt32BE(this._g,24),x.writeInt32BE(this._h,28),x},re.exports=v},76540:(re,u,g)=>{var p=g(83894),D=g(10117),w=g(86692),_=g(73502).Buffer,l=new Array(160);function v(){this.init(),this._w=l,w.call(this,128,112)}p(v,D),v.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},v.prototype._hash=function(){var m=_.allocUnsafe(48);function b(M,E,A){m.writeInt32BE(M,A),m.writeInt32BE(E,A+4)}return b(this._ah,this._al,0),b(this._bh,this._bl,8),b(this._ch,this._cl,16),b(this._dh,this._dl,24),b(this._eh,this._el,32),b(this._fh,this._fl,40),m},re.exports=v},10117:(re,u,g)=>{var p=g(83894),D=g(86692),w=g(73502).Buffer,_=[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],l=new Array(160);function v(){this.init(),this._w=l,D.call(this,128,112)}function m(L,z,j){return j^L&(z^j)}function b(L,z,j){return L&z|j&(L|z)}function M(L,z){return(L>>>28|z<<4)^(z>>>2|L<<30)^(z>>>7|L<<25)}function E(L,z){return(L>>>14|z<<18)^(L>>>18|z<<14)^(z>>>9|L<<23)}function A(L,z){return(L>>>1|z<<31)^(L>>>8|z<<24)^L>>>7}function P(L,z){return(L>>>1|z<<31)^(L>>>8|z<<24)^(L>>>7|z<<25)}function x(L,z){return(L>>>19|z<<13)^(z>>>29|L<<3)^L>>>6}function N(L,z){return(L>>>19|z<<13)^(z>>>29|L<<3)^(L>>>6|z<<26)}function F(L,z){return L>>>0>>0?1:0}p(v,D),v.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},v.prototype._update=function(L){for(var z=this._w,j=0|this._ah,W=0|this._bh,Y=0|this._ch,G=0|this._dh,Q=0|this._eh,q=0|this._fh,J=0|this._gh,H=0|this._hh,te=0|this._al,C=0|this._bl,o=0|this._cl,s=0|this._dl,d=0|this._el,h=0|this._fl,S=0|this._gl,k=0|this._hl,B=0;B<32;B+=2)z[B]=L.readInt32BE(4*B),z[B+1]=L.readInt32BE(4*B+4);for(;B<160;B+=2){var I=z[B-30],f=z[B-30+1],R=A(I,f),se=P(f,I),ee=x(I=z[B-4],f=z[B-4+1]),oe=N(f,I),de=z[B-14],Ce=z[B-14+1],ye=z[B-32],ve=z[B-32+1],ae=se+Ce|0,fe=R+de+F(ae,se)|0;fe=(fe=fe+ee+F(ae=ae+oe|0,oe)|0)+ye+F(ae=ae+ve|0,ve)|0,z[B]=fe,z[B+1]=ae}for(var pe=0;pe<160;pe+=2){fe=z[pe],ae=z[pe+1];var Se=b(j,W,Y),ce=b(te,C,o),be=M(j,te),Pe=M(te,j),Fe=E(Q,d),lt=E(d,Q),Ge=_[pe],He=_[pe+1],Kt=m(Q,q,J),tt=m(d,h,S),nt=k+lt|0,Vt=H+Fe+F(nt,k)|0;Vt=(Vt=(Vt=Vt+Kt+F(nt=nt+tt|0,tt)|0)+Ge+F(nt=nt+He|0,He)|0)+fe+F(nt=nt+ae|0,ae)|0;var ot=Pe+ce|0,at=be+Se+F(ot,Pe)|0;H=J,k=S,J=q,S=h,q=Q,h=d,Q=G+Vt+F(d=s+nt|0,s)|0,G=Y,s=o,Y=W,o=C,W=j,C=te,j=Vt+at+F(te=nt+ot|0,nt)|0}this._al=this._al+te|0,this._bl=this._bl+C|0,this._cl=this._cl+o|0,this._dl=this._dl+s|0,this._el=this._el+d|0,this._fl=this._fl+h|0,this._gl=this._gl+S|0,this._hl=this._hl+k|0,this._ah=this._ah+j+F(this._al,te)|0,this._bh=this._bh+W+F(this._bl,C)|0,this._ch=this._ch+Y+F(this._cl,o)|0,this._dh=this._dh+G+F(this._dl,s)|0,this._eh=this._eh+Q+F(this._el,d)|0,this._fh=this._fh+q+F(this._fl,h)|0,this._gh=this._gh+J+F(this._gl,S)|0,this._hh=this._hh+H+F(this._hl,k)|0},v.prototype._hash=function(){var L=w.allocUnsafe(64);function z(j,W,Y){L.writeInt32BE(j,Y),L.writeInt32BE(W,Y+4)}return z(this._ah,this._al,0),z(this._bh,this._bl,8),z(this._ch,this._cl,16),z(this._dh,this._dl,24),z(this._eh,this._el,32),z(this._fh,this._fl,40),z(this._gh,this._gl,48),z(this._hh,this._hl,56),L},re.exports=v},9562:(re,u,g)=>{var p,D,w,l;p=g(25585),D=g(83018).utf8,w=g(83018).bin,(l=function(v,m){var b=p.wordsToBytes(function(v){v.constructor==String?v=D.stringToBytes(v):typeof Buffer<"u"&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(v)?v=Array.prototype.slice.call(v,0):Array.isArray(v)||(v=v.toString());var m=p.bytesToWords(v),b=8*v.length,M=[],E=1732584193,A=-271733879,P=-1732584194,x=271733878,N=-1009589776;m[b>>5]|=128<<24-b%32,m[15+(b+64>>>9<<4)]=b;for(var F=0;F>>31}var q=(E<<5|E>>>27)+N+(M[G]>>>0)+(G<20?1518500249+(A&P|~A&x):G<40?1859775393+(A^P^x):G<60?(A&P|A&x|P&x)-1894007588:(A^P^x)-899497514);N=x,x=P,P=A<<30|A>>>2,A=E,E=q}E+=L,A+=z,P+=j,x+=W,N+=Y}return[E,A,P,x,N]}(v));return m&&m.asBytes?b:m&&m.asString?w.bytesToString(b):p.bytesToHex(b)})._blocksize=16,l._digestsize=20,re.exports=l},78951:re=>{"use strict";re.exports=(u,g)=>{if("string"!=typeof u||"string"!=typeof g)throw new TypeError("Expected the arguments to be of type `string`");if(""===g)return[u];const p=u.indexOf(g);return-1===p?[u]:[u.slice(0,p),u.slice(p+g.length)]}},295:(re,u,g)=>{re.exports=w;var p=g(59069).EventEmitter;function w(){p.call(this)}g(83894)(w,p),w.Readable=g(3154),w.Writable=g(20520),w.Duplex=g(41339),w.Transform=g(6025),w.PassThrough=g(56071),w.finished=g(67542),w.pipeline=g(90954),w.Stream=w,w.prototype.pipe=function(_,l){var v=this;function m(N){_.writable&&!1===_.write(N)&&v.pause&&v.pause()}function b(){v.readable&&v.resume&&v.resume()}v.on("data",m),_.on("drain",b),!_._isStdio&&(!l||!1!==l.end)&&(v.on("end",E),v.on("close",A));var M=!1;function E(){M||(M=!0,_.end())}function A(){M||(M=!0,"function"==typeof _.destroy&&_.destroy())}function P(N){if(x(),0===p.listenerCount(this,"error"))throw N}function x(){v.removeListener("data",m),_.removeListener("drain",b),v.removeListener("end",E),v.removeListener("close",A),v.removeListener("error",P),_.removeListener("error",P),v.removeListener("end",x),v.removeListener("close",x),_.removeListener("close",x)}return v.on("error",P),_.on("error",P),v.on("end",x),v.on("close",x),_.on("close",x),_.emit("pipe",v),_}},74216:(re,u,g)=>{var p=g(3724),D=g(62359),w=g(78629),_=g(94525),l=g(68762),v=u;v.request=function(m,b){m="string"==typeof m?l.parse(m):w(m);var M=-1===global.location.protocol.search(/^https?:$/)?"http:":"",E=m.protocol||M,A=m.hostname||m.host,P=m.port,x=m.path||"/";A&&-1!==A.indexOf(":")&&(A="["+A+"]"),m.url=(A?E+"//"+A:"")+(P?":"+P:"")+x,m.method=(m.method||"GET").toUpperCase(),m.headers=m.headers||{};var N=new p(m);return b&&N.on("response",b),N},v.get=function(b,M){var E=v.request(b,M);return E.end(),E},v.ClientRequest=p,v.IncomingMessage=D.IncomingMessage,v.Agent=function(){},v.Agent.defaultMaxSockets=4,v.globalAgent=new v.Agent,v.STATUS_CODES=_,v.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},57976:(re,u)=>{var g;function p(){if(void 0!==g)return g;if(global.XMLHttpRequest){g=new global.XMLHttpRequest;try{g.open("GET",global.XDomainRequest?"/":"https://example.com")}catch{g=null}}else g=null;return g}function D(_){var l=p();if(!l)return!1;try{return l.responseType=_,l.responseType===_}catch{}return!1}function w(_){return"function"==typeof _}u.fetch=w(global.fetch)&&w(global.ReadableStream),u.writableStream=w(global.WritableStream),u.abortController=w(global.AbortController),u.arraybuffer=u.fetch||D("arraybuffer"),u.msstream=!u.fetch&&D("ms-stream"),u.mozchunkedarraybuffer=!u.fetch&&D("moz-chunked-arraybuffer"),u.overrideMimeType=u.fetch||!!p()&&w(p().overrideMimeType),g=null},3724:(re,u,g)=>{var p=g(57976),D=g(83894),w=g(62359),_=g(65685),l=w.IncomingMessage,v=w.readyStates;var b=re.exports=function(A){var P=this;_.Writable.call(P),P._opts=A,P._body=[],P._headers={},A.auth&&P.setHeader("Authorization","Basic "+Buffer.from(A.auth).toString("base64")),Object.keys(A.headers).forEach(function(F){P.setHeader(F,A.headers[F])});var x,N=!0;if("disable-fetch"===A.mode||"requestTimeout"in A&&!p.abortController)N=!1,x=!0;else if("prefer-streaming"===A.mode)x=!1;else if("allow-wrong-content-type"===A.mode)x=!p.overrideMimeType;else{if(A.mode&&"default"!==A.mode&&"prefer-fast"!==A.mode)throw new Error("Invalid value for opts.mode");x=!0}P._mode=function m(A,P){return p.fetch&&P?"fetch":p.mozchunkedarraybuffer?"moz-chunked-arraybuffer":p.msstream?"ms-stream":p.arraybuffer&&A?"arraybuffer":"text"}(x,N),P._fetchTimer=null,P._socketTimeout=null,P._socketTimer=null,P.on("finish",function(){P._onFinish()})};D(b,_.Writable),b.prototype.setHeader=function(A,P){var N=A.toLowerCase();-1===E.indexOf(N)&&(this._headers[N]={name:A,value:P})},b.prototype.getHeader=function(A){var P=this._headers[A.toLowerCase()];return P?P.value:null},b.prototype.removeHeader=function(A){delete this._headers[A.toLowerCase()]},b.prototype._onFinish=function(){var A=this;if(!A._destroyed){var P=A._opts;"timeout"in P&&0!==P.timeout&&A.setTimeout(P.timeout);var x=A._headers,N=null;"GET"!==P.method&&"HEAD"!==P.method&&(N=new Blob(A._body,{type:(x["content-type"]||{}).value||""}));var F=[];if(Object.keys(x).forEach(function(W){var Y=x[W].name,G=x[W].value;Array.isArray(G)?G.forEach(function(Q){F.push([Y,Q])}):F.push([Y,G])}),"fetch"===A._mode){var L=null;if(p.abortController){var z=new AbortController;L=z.signal,A._fetchAbortController=z,"requestTimeout"in P&&0!==P.requestTimeout&&(A._fetchTimer=global.setTimeout(function(){A.emit("requestTimeout"),A._fetchAbortController&&A._fetchAbortController.abort()},P.requestTimeout))}global.fetch(A._opts.url,{method:A._opts.method,headers:F,body:N||void 0,mode:"cors",credentials:P.withCredentials?"include":"same-origin",signal:L}).then(function(W){A._fetchResponse=W,A._resetTimers(!1),A._connect()},function(W){A._resetTimers(!0),A._destroyed||A.emit("error",W)})}else{var j=A._xhr=new global.XMLHttpRequest;try{j.open(A._opts.method,A._opts.url,!0)}catch(W){return void process.nextTick(function(){A.emit("error",W)})}"responseType"in j&&(j.responseType=A._mode),"withCredentials"in j&&(j.withCredentials=!!P.withCredentials),"text"===A._mode&&"overrideMimeType"in j&&j.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in P&&(j.timeout=P.requestTimeout,j.ontimeout=function(){A.emit("requestTimeout")}),F.forEach(function(W){j.setRequestHeader(W[0],W[1])}),A._response=null,j.onreadystatechange=function(){switch(j.readyState){case v.LOADING:case v.DONE:A._onXHRProgress()}},"moz-chunked-arraybuffer"===A._mode&&(j.onprogress=function(){A._onXHRProgress()}),j.onerror=function(){A._destroyed||(A._resetTimers(!0),A.emit("error",new Error("XHR error")))};try{j.send(N)}catch(W){return void process.nextTick(function(){A.emit("error",W)})}}}},b.prototype._onXHRProgress=function(){var A=this;A._resetTimers(!1),function M(A){try{var P=A.status;return null!==P&&0!==P}catch{return!1}}(A._xhr)&&!A._destroyed&&(A._response||A._connect(),A._response._onXHRProgress(A._resetTimers.bind(A)))},b.prototype._connect=function(){var A=this;A._destroyed||(A._response=new l(A._xhr,A._fetchResponse,A._mode,A._resetTimers.bind(A)),A._response.on("error",function(P){A.emit("error",P)}),A.emit("response",A._response))},b.prototype._write=function(A,P,x){this._body.push(A),x()},b.prototype._resetTimers=function(A){var P=this;global.clearTimeout(P._socketTimer),P._socketTimer=null,A?(global.clearTimeout(P._fetchTimer),P._fetchTimer=null):P._socketTimeout&&(P._socketTimer=global.setTimeout(function(){P.emit("timeout")},P._socketTimeout))},b.prototype.abort=b.prototype.destroy=function(A){var P=this;P._destroyed=!0,P._resetTimers(!0),P._response&&(P._response._destroyed=!0),P._xhr?P._xhr.abort():P._fetchAbortController&&P._fetchAbortController.abort(),A&&P.emit("error",A)},b.prototype.end=function(A,P,x){"function"==typeof A&&(x=A,A=void 0),_.Writable.prototype.end.call(this,A,P,x)},b.prototype.setTimeout=function(A,P){var x=this;P&&x.once("timeout",P),x._socketTimeout=A,x._resetTimers(!1)},b.prototype.flushHeaders=function(){},b.prototype.setNoDelay=function(){},b.prototype.setSocketKeepAlive=function(){};var E=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},62359:(re,u,g)=>{var p=g(57976),D=g(83894),w=g(65685),_=u.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=u.IncomingMessage=function(v,m,b,M){var E=this;if(w.Readable.call(E),E._mode=b,E.headers={},E.rawHeaders=[],E.trailers={},E.rawTrailers=[],E.on("end",function(){process.nextTick(function(){E.emit("close")})}),"fetch"===b){let z=function(){P.read().then(function(j){if(!E._destroyed){if(M(j.done),j.done)return void E.push(null);E.push(Buffer.from(j.value)),z()}}).catch(function(j){M(!0),E._destroyed||E.emit("error",j)})};if(E._fetchResponse=m,E.url=m.url,E.statusCode=m.status,E.statusMessage=m.statusText,m.headers.forEach(function(j,W){E.headers[W.toLowerCase()]=j,E.rawHeaders.push(W,j)}),p.writableStream){var A=new WritableStream({write:function(j){return M(!1),new Promise(function(W,Y){E._destroyed?Y():E.push(Buffer.from(j))?W():E._resumeFetch=W})},close:function(){M(!0),E._destroyed||E.push(null)},abort:function(j){M(!0),E._destroyed||E.emit("error",j)}});try{return void m.body.pipeTo(A).catch(function(j){M(!0),E._destroyed||E.emit("error",j)})}catch{}}var P=m.body.getReader();z()}else{if(E._xhr=v,E._pos=0,E.url=v.responseURL,E.statusCode=v.status,E.statusMessage=v.statusText,v.getAllResponseHeaders().split(/\r?\n/).forEach(function(z){var j=z.match(/^([^:]+):\s*(.*)/);if(j){var W=j[1].toLowerCase();"set-cookie"===W?(void 0===E.headers[W]&&(E.headers[W]=[]),E.headers[W].push(j[2])):void 0!==E.headers[W]?E.headers[W]+=", "+j[2]:E.headers[W]=j[2],E.rawHeaders.push(j[1],j[2])}}),E._charset="x-user-defined",!p.overrideMimeType){var N=E.rawHeaders["mime-type"];if(N){var F=N.match(/;\s*charset=([^;])(;|$)/);F&&(E._charset=F[1].toLowerCase())}E._charset||(E._charset="utf-8")}}};D(l,w.Readable),l.prototype._read=function(){var m=this._resumeFetch;m&&(this._resumeFetch=null,m())},l.prototype._onXHRProgress=function(v){var m=this,b=m._xhr,M=null;switch(m._mode){case"text":if((M=b.responseText).length>m._pos){var E=M.substr(m._pos);if("x-user-defined"===m._charset){for(var A=Buffer.alloc(E.length),P=0;Pm._pos&&(m.push(Buffer.from(new Uint8Array(x.result.slice(m._pos)))),m._pos=x.result.byteLength)},x.onload=function(){v(!0),m.push(null)},x.readAsArrayBuffer(M)}m._xhr.readyState===_.DONE&&"ms-stream"!==m._mode&&(v(!0),m.push(null))}},78629:re=>{re.exports=function g(){for(var p={},D=0;D{"use strict";re.exports=u=>encodeURIComponent(u).replace(/[!'()*]/g,g=>`%${g.charCodeAt(0).toString(16).toUpperCase()}`)},77826:(re,u)=>{var g=u.range=function(_){return null==_?{}:"string"==typeof g?{min:g,max:g+"\xff"}:_},D=(u.prefix=function(_,l,v){var m={};return v=v||"\xff",(_=u.range(_))instanceof RegExp||"function"==typeof _?(m.min=l,m.max=l+v,m.inner=function(b){var M=b.substring(l.length);return _.test?_.test(M):_(M)}):"object"==typeof _&&(m.min=l+(_.min||_.start||""),m.max=l+(_.max||_.end||v||"~"),m.reverse=!!_.reverse),m},u.checker=function(_){return _||(_={}),"string"==typeof _?function(l){return 0==l.indexOf(_)}:_ instanceof RegExp?function(l){return _.test(l)}:"object"==typeof _?function(l){var v=_.min||_.start,m=_.max||_.end;return l=String(l),(!v||l>=v)&&(!m||l<=m)&&(!_.inner||(_.inner.test?_.inner.test(l):_.inner(l)))}:"function"==typeof _?_:void 0});u.satisfies=function(_,l){return D(l)(_)}},15453:(re,u,g)=>{var p=g(93172).Buffer,D=p.isEncoding||function(b){switch(b&&b.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}};var _=u.s=function(b){switch(this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,""),function w(b){if(b&&!D(b))throw new Error("Unknown encoding: "+b)}(b),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=v;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=m;break;default:return void(this.write=l)}this.charBuffer=new p(6),this.charReceived=0,this.charLength=0};function l(b){return b.toString(this.encoding)}function v(b){this.charReceived=b.length%2,this.charLength=this.charReceived?2:0}function m(b){this.charReceived=b.length%3,this.charLength=this.charReceived?3:0}_.prototype.write=function(b){for(var M="";this.charLength;){var E=b.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;if(b.copy(this.charBuffer,this.charReceived,0,E),this.charReceived+=E,this.charReceived=55296&&P<=56319)){if(this.charReceived=this.charLength=0,0===b.length)return M;break}this.charLength+=this.surrogateSize,M=""}this.detectIncompleteChar(b);var A=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,A),A-=this.charReceived);var P;A=(M+=b.toString(this.encoding,0,A)).length-1;if((P=M.charCodeAt(A))>=55296&&P<=56319){var x=this.surrogateSize;return this.charLength+=x,this.charReceived+=x,this.charBuffer.copy(this.charBuffer,x,0,x),b.copy(this.charBuffer,0,0,x),M.substring(0,A)}return M},_.prototype.detectIncompleteChar=function(b){for(var M=b.length>=3?3:b.length;M>0;M--){var E=b[b.length-M];if(1==M&&E>>5==6){this.charLength=2;break}if(M<=2&&E>>4==14){this.charLength=3;break}if(M<=3&&E>>3==30){this.charLength=4;break}}this.charReceived=M},_.prototype.end=function(b){var M="";if(b&&b.length&&(M=this.write(b)),this.charReceived){var E=this.charReceived,A=this.charBuffer,P=this.encoding;M+=A.slice(0,E).toString(P)}return M}},43675:re=>{re.exports=function(){var u=document.getSelection();if(!u.rangeCount)return function(){};for(var g=document.activeElement,p=[],D=0;D{"use strict";re.exports=function u(g){return g.split(" ").map(function(p){return p.slice(0,1).toUpperCase()+p.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}},47768:function(re){!function(u,g){"use strict";re.exports?re.exports=g():(u.nacl||(u.nacl={}),u.nacl.util=g())}(this,function(){"use strict";var u={};function g(p){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(p))throw new TypeError("invalid encoding")}return u.decodeUTF8=function(p){if("string"!=typeof p)throw new TypeError("expected string");var D,w=unescape(encodeURIComponent(p)),_=new Uint8Array(w.length);for(D=0;D"u"?typeof Buffer.from<"u"?(u.encodeBase64=function(p){return Buffer.from(p).toString("base64")},u.decodeBase64=function(p){return g(p),new Uint8Array(Array.prototype.slice.call(Buffer.from(p,"base64"),0))}):(u.encodeBase64=function(p){return new Buffer(p).toString("base64")},u.decodeBase64=function(p){return g(p),new Uint8Array(Array.prototype.slice.call(new Buffer(p,"base64"),0))}):(u.encodeBase64=function(p){var D,w=[],_=p.length;for(D=0;D<_;D++)w.push(String.fromCharCode(p[D]));return btoa(w.join(""))},u.decodeBase64=function(p){g(p);var D,w=atob(p),_=new Uint8Array(w.length);for(D=0;D{!function(p){"use strict";var D=function(_e){var Ee,Me=new Float64Array(16);if(_e)for(Ee=0;Ee<_e.length;Ee++)Me[Ee]=_e[Ee];return Me},w=function(){throw new Error("no PRNG")},_=new Uint8Array(16),l=new Uint8Array(32);l[0]=9;var v=D(),m=D([1]),b=D([56129,1]),M=D([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),E=D([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),A=D([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),P=D([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),x=D([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function N(_e,Ee,Me,me){_e[Ee]=Me>>24&255,_e[Ee+1]=Me>>16&255,_e[Ee+2]=Me>>8&255,_e[Ee+3]=255&Me,_e[Ee+4]=me>>24&255,_e[Ee+5]=me>>16&255,_e[Ee+6]=me>>8&255,_e[Ee+7]=255&me}function F(_e,Ee,Me,me,Oe){var Ke,it=0;for(Ke=0;Ke>>8)-1}function L(_e,Ee,Me,me){return F(_e,Ee,Me,me,16)}function z(_e,Ee,Me,me){return F(_e,Ee,Me,me,32)}function Y(_e,Ee,Me,me){!function j(_e,Ee,Me,me){for(var st,Oe=255&me[0]|(255&me[1])<<8|(255&me[2])<<16|(255&me[3])<<24,Ke=255&Me[0]|(255&Me[1])<<8|(255&Me[2])<<16|(255&Me[3])<<24,it=255&Me[4]|(255&Me[5])<<8|(255&Me[6])<<16|(255&Me[7])<<24,Ye=255&Me[8]|(255&Me[9])<<8|(255&Me[10])<<16|(255&Me[11])<<24,qe=255&Me[12]|(255&Me[13])<<8|(255&Me[14])<<16|(255&Me[15])<<24,Bt=255&me[4]|(255&me[5])<<8|(255&me[6])<<16|(255&me[7])<<24,Ct=255&Ee[0]|(255&Ee[1])<<8|(255&Ee[2])<<16|(255&Ee[3])<<24,kt=255&Ee[4]|(255&Ee[5])<<8|(255&Ee[6])<<16|(255&Ee[7])<<24,Ot=255&Ee[8]|(255&Ee[9])<<8|(255&Ee[10])<<16|(255&Ee[11])<<24,Pt=255&Ee[12]|(255&Ee[13])<<8|(255&Ee[14])<<16|(255&Ee[15])<<24,Lt=255&me[8]|(255&me[9])<<8|(255&me[10])<<16|(255&me[11])<<24,nn=255&Me[16]|(255&Me[17])<<8|(255&Me[18])<<16|(255&Me[19])<<24,Yt=255&Me[20]|(255&Me[21])<<8|(255&Me[22])<<16|(255&Me[23])<<24,gn=255&Me[24]|(255&Me[25])<<8|(255&Me[26])<<16|(255&Me[27])<<24,an=255&Me[28]|(255&Me[29])<<8|(255&Me[30])<<16|(255&Me[31])<<24,tn=255&me[12]|(255&me[13])<<8|(255&me[14])<<16|(255&me[15])<<24,Ut=Oe,cn=Ke,Jt=it,Zt=Ye,fn=qe,Qt=Bt,Dt=Ct,Mt=kt,Xt=Ot,Ft=Pt,jt=Lt,on=nn,On=Yt,Kn=gn,jn=an,Hn=tn,Jn=0;Jn<20;Jn+=2)Ut^=(st=(On^=(st=(Xt^=(st=(fn^=(st=Ut+On|0)<<7|st>>>25)+Ut|0)<<9|st>>>23)+fn|0)<<13|st>>>19)+Xt|0)<<18|st>>>14,Qt^=(st=(cn^=(st=(Kn^=(st=(Ft^=(st=Qt+cn|0)<<7|st>>>25)+Qt|0)<<9|st>>>23)+Ft|0)<<13|st>>>19)+Kn|0)<<18|st>>>14,jt^=(st=(Dt^=(st=(Jt^=(st=(jn^=(st=jt+Dt|0)<<7|st>>>25)+jt|0)<<9|st>>>23)+jn|0)<<13|st>>>19)+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19]=fn>>>24&255,_e[20]=Qt>>>0&255,_e[21]=Qt>>>8&255,_e[22]=Qt>>>16&255,_e[23]=Qt>>>24&255,_e[24]=Dt>>>0&255,_e[25]=Dt>>>8&255,_e[26]=Dt>>>16&255,_e[27]=Dt>>>24&255,_e[28]=Mt>>>0&255,_e[29]=Mt>>>8&255,_e[30]=Mt>>>16&255,_e[31]=Mt>>>24&255,_e[32]=Xt>>>0&255,_e[33]=Xt>>>8&255,_e[34]=Xt>>>16&255,_e[35]=Xt>>>24&255,_e[36]=Ft>>>0&255,_e[37]=Ft>>>8&255,_e[38]=Ft>>>16&255,_e[39]=Ft>>>24&255,_e[40]=jt>>>0&255,_e[41]=jt>>>8&255,_e[42]=jt>>>16&255,_e[43]=jt>>>24&255,_e[44]=on>>>0&255,_e[45]=on>>>8&255,_e[46]=on>>>16&255,_e[47]=on>>>24&255,_e[48]=On>>>0&255,_e[49]=On>>>8&255,_e[50]=On>>>16&255,_e[51]=On>>>24&255,_e[52]=Kn>>>0&255,_e[53]=Kn>>>8&255,_e[54]=Kn>>>16&255,_e[55]=Kn>>>24&255,_e[56]=jn>>>0&255,_e[57]=jn>>>8&255,_e[58]=jn>>>16&255,_e[59]=jn>>>24&255,_e[60]=Hn>>>0&255,_e[61]=Hn>>>8&255,_e[62]=Hn>>>16&255,_e[63]=Hn>>>24&255}(_e,Ee,Me,me)}function G(_e,Ee,Me,me){!function W(_e,Ee,Me,me){for(var st,Ut=255&me[0]|(255&me[1])<<8|(255&me[2])<<16|(255&me[3])<<24,cn=255&Me[0]|(255&Me[1])<<8|(255&Me[2])<<16|(255&Me[3])<<24,Jt=255&Me[4]|(255&Me[5])<<8|(255&Me[6])<<16|(255&Me[7])<<24,Zt=255&Me[8]|(255&Me[9])<<8|(255&Me[10])<<16|(255&Me[11])<<24,fn=255&Me[12]|(255&Me[13])<<8|(255&Me[14])<<16|(255&Me[15])<<24,Qt=255&me[4]|(255&me[5])<<8|(255&me[6])<<16|(255&me[7])<<24,Dt=255&Ee[0]|(255&Ee[1])<<8|(255&Ee[2])<<16|(255&Ee[3])<<24,Mt=255&Ee[4]|(255&Ee[5])<<8|(255&Ee[6])<<16|(255&Ee[7])<<24,Xt=255&Ee[8]|(255&Ee[9])<<8|(255&Ee[10])<<16|(255&Ee[11])<<24,Ft=255&Ee[12]|(255&Ee[13])<<8|(255&Ee[14])<<16|(255&Ee[15])<<24,jt=255&me[8]|(255&me[9])<<8|(255&me[10])<<16|(255&me[11])<<24,on=255&Me[16]|(255&Me[17])<<8|(255&Me[18])<<16|(255&Me[19])<<24,On=255&Me[20]|(255&Me[21])<<8|(255&Me[22])<<16|(255&Me[23])<<24,Kn=255&Me[24]|(255&Me[25])<<8|(255&Me[26])<<16|(255&Me[27])<<24,jn=255&Me[28]|(255&Me[29])<<8|(255&Me[30])<<16|(255&Me[31])<<24,Hn=255&me[12]|(255&me[13])<<8|(255&me[14])<<16|(255&me[15])<<24,Jn=0;Jn<20;Jn+=2)Ut^=(st=(On^=(st=(Xt^=(st=(fn^=(st=Ut+On|0)<<7|st>>>25)+Ut|0)<<9|st>>>23)+fn|0)<<13|st>>>19)+Xt|0)<<18|st>>>14,Qt^=(st=(cn^=(st=(Kn^=(st=(Ft^=(st=Qt+cn|0)<<7|st>>>25)+Qt|0)<<9|st>>>23)+Ft|0)<<13|st>>>19)+Kn|0)<<18|st>>>14,jt^=(st=(Dt^=(st=(Jt^=(st=(jn^=(st=jt+Dt|0)<<7|st>>>25)+jt|0)<<9|st>>>23)+jn|0)<<13|st>>>19)+Jt|0)<<18|st>>>14,Hn^=(st=(on^=(st=(Mt^=(st=(Zt^=(st=Hn+on|0)<<7|st>>>25)+Hn|0)<<9|st>>>23)+Zt|0)<<13|st>>>19)+Mt|0)<<18|st>>>14,Ut^=(st=(Zt^=(st=(Jt^=(st=(cn^=(st=Ut+Zt|0)<<7|st>>>25)+Ut|0)<<9|st>>>23)+cn|0)<<13|st>>>19)+Jt|0)<<18|st>>>14,Qt^=(st=(fn^=(st=(Mt^=(st=(Dt^=(st=Qt+fn|0)<<7|st>>>25)+Qt|0)<<9|st>>>23)+Dt|0)<<13|st>>>19)+Mt|0)<<18|st>>>14,jt^=(st=(Ft^=(st=(Xt^=(st=(on^=(st=jt+Ft|0)<<7|st>>>25)+jt|0)<<9|st>>>23)+on|0)<<13|st>>>19)+Xt|0)<<18|st>>>14,Hn^=(st=(jn^=(st=(Kn^=(st=(On^=(st=Hn+jn|0)<<7|st>>>25)+Hn|0)<<9|st>>>23)+On|0)<<13|st>>>19)+Kn|0)<<18|st>>>14;_e[0]=Ut>>>0&255,_e[1]=Ut>>>8&255,_e[2]=Ut>>>16&255,_e[3]=Ut>>>24&255,_e[4]=Qt>>>0&255,_e[5]=Qt>>>8&255,_e[6]=Qt>>>16&255,_e[7]=Qt>>>24&255,_e[8]=jt>>>0&255,_e[9]=jt>>>8&255,_e[10]=jt>>>16&255,_e[11]=jt>>>24&255,_e[12]=Hn>>>0&255,_e[13]=Hn>>>8&255,_e[14]=Hn>>>16&255,_e[15]=Hn>>>24&255,_e[16]=Dt>>>0&255,_e[17]=Dt>>>8&255,_e[18]=Dt>>>16&255,_e[19]=Dt>>>24&255,_e[20]=Mt>>>0&255,_e[21]=Mt>>>8&255,_e[22]=Mt>>>16&255,_e[23]=Mt>>>24&255,_e[24]=Xt>>>0&255,_e[25]=Xt>>>8&255,_e[26]=Xt>>>16&255,_e[27]=Xt>>>24&255,_e[28]=Ft>>>0&255,_e[29]=Ft>>>8&255,_e[30]=Ft>>>16&255,_e[31]=Ft>>>24&255}(_e,Ee,Me,me)}var Q=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function q(_e,Ee,Me,me,Oe,Ke,it){var Bt,Ct,Ye=new Uint8Array(16),qe=new Uint8Array(64);for(Ct=0;Ct<16;Ct++)Ye[Ct]=0;for(Ct=0;Ct<8;Ct++)Ye[Ct]=Ke[Ct];for(;Oe>=64;){for(Y(qe,Ye,it,Q),Ct=0;Ct<64;Ct++)_e[Ee+Ct]=Me[me+Ct]^qe[Ct];for(Bt=1,Ct=8;Ct<16;Ct++)Bt=Bt+(255&Ye[Ct])|0,Ye[Ct]=255&Bt,Bt>>>=8;Oe-=64,Ee+=64,me+=64}if(Oe>0)for(Y(qe,Ye,it,Q),Ct=0;Ct=64;){for(Y(it,Ke,Oe,Q),qe=0;qe<64;qe++)_e[Ee+qe]=it[qe];for(Ye=1,qe=8;qe<16;qe++)Ye=Ye+(255&Ke[qe])|0,Ke[qe]=255&Ye,Ye>>>=8;Me-=64,Ee+=64}if(Me>0)for(Y(it,Ke,Oe,Q),qe=0;qe>>13|Me<<3),me=255&_e[4]|(255&_e[5])<<8,this.r[2]=7939&(Me>>>10|me<<6),Oe=255&_e[6]|(255&_e[7])<<8,this.r[3]=8191&(me>>>7|Oe<<9),Ke=255&_e[8]|(255&_e[9])<<8,this.r[4]=255&(Oe>>>4|Ke<<12),this.r[5]=Ke>>>1&8190,it=255&_e[10]|(255&_e[11])<<8,this.r[6]=8191&(Ke>>>14|it<<2),Ye=255&_e[12]|(255&_e[13])<<8,this.r[7]=8065&(it>>>11|Ye<<5),qe=255&_e[14]|(255&_e[15])<<8,this.r[8]=8191&(Ye>>>8|qe<<8),this.r[9]=qe>>>5&127,this.pad[0]=255&_e[16]|(255&_e[17])<<8,this.pad[1]=255&_e[18]|(255&_e[19])<<8,this.pad[2]=255&_e[20]|(255&_e[21])<<8,this.pad[3]=255&_e[22]|(255&_e[23])<<8,this.pad[4]=255&_e[24]|(255&_e[25])<<8,this.pad[5]=255&_e[26]|(255&_e[27])<<8,this.pad[6]=255&_e[28]|(255&_e[29])<<8,this.pad[7]=255&_e[30]|(255&_e[31])<<8};function o(_e,Ee,Me,me,Oe,Ke){var it=new C(Ke);return it.update(Me,me,Oe),it.finish(_e,Ee),0}function s(_e,Ee,Me,me,Oe,Ke){var it=new Uint8Array(16);return o(it,0,Me,me,Oe,Ke),L(_e,Ee,it,0)}function d(_e,Ee,Me,me,Oe){var Ke;if(Me<32)return-1;for(te(_e,0,Ee,0,Me,me,Oe),o(_e,16,_e,32,Me-32,_e),Ke=0;Ke<16;Ke++)_e[Ke]=0;return 0}function h(_e,Ee,Me,me,Oe){var Ke,it=new Uint8Array(32);if(Me<32||(H(it,0,32,me,Oe),0!==s(Ee,16,Ee,32,Me-32,it)))return-1;for(te(_e,0,Ee,0,Me,me,Oe),Ke=0;Ke<32;Ke++)_e[Ke]=0;return 0}function S(_e,Ee){var Me;for(Me=0;Me<16;Me++)_e[Me]=0|Ee[Me]}function k(_e){var Ee,Me,me=1;for(Ee=0;Ee<16;Ee++)Me=_e[Ee]+me+65535,me=Math.floor(Me/65536),_e[Ee]=Me-65536*me;_e[0]+=me-1+37*(me-1)}function B(_e,Ee,Me){for(var me,Oe=~(Me-1),Ke=0;Ke<16;Ke++)me=Oe&(_e[Ke]^Ee[Ke]),_e[Ke]^=me,Ee[Ke]^=me}function I(_e,Ee){var Me,me,Oe,Ke=D(),it=D();for(Me=0;Me<16;Me++)it[Me]=Ee[Me];for(k(it),k(it),k(it),me=0;me<2;me++){for(Ke[0]=it[0]-65517,Me=1;Me<15;Me++)Ke[Me]=it[Me]-65535-(Ke[Me-1]>>16&1),Ke[Me-1]&=65535;Ke[15]=it[15]-32767-(Ke[14]>>16&1),Oe=Ke[15]>>16&1,Ke[14]&=65535,B(it,Ke,1-Oe)}for(Me=0;Me<16;Me++)_e[2*Me]=255&it[Me],_e[2*Me+1]=it[Me]>>8}function f(_e,Ee){var Me=new Uint8Array(32),me=new Uint8Array(32);return I(Me,_e),I(me,Ee),z(Me,0,me,0)}function R(_e){var Ee=new Uint8Array(32);return I(Ee,_e),1&Ee[0]}function se(_e,Ee){var Me;for(Me=0;Me<16;Me++)_e[Me]=Ee[2*Me]+(Ee[2*Me+1]<<8);_e[15]&=32767}function ee(_e,Ee,Me){for(var me=0;me<16;me++)_e[me]=Ee[me]+Me[me]}function oe(_e,Ee,Me){for(var me=0;me<16;me++)_e[me]=Ee[me]-Me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=38*(jn+=me*bi),tn+=38*(Hn+=me*Cr),Ke=(me=(Ke+=38*(cn+=me*Jn))+(Oe=1)+65535)-65536*(Oe=Math.floor(me/65536)),it=(me=it+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ye=(me=Ye+Oe+65535)-65536*(Oe=Math.floor(me/65536)),qe=(me=qe+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Bt=(me=Bt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ct=(me=Ct+Oe+65535)-65536*(Oe=Math.floor(me/65536)),kt=(me=kt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ot=(me=Ot+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Pt=(me=Pt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Lt=(me=Lt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),nn=(me=nn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Yt=(me=Yt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),gn=(me=gn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),an=(me=an+Oe+65535)-65536*(Oe=Math.floor(me/65536)),tn=(me=tn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ut=(me=Ut+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ke=(me=(Ke+=Oe-1+37*(Oe-1))+(Oe=1)+65535)-65536*(Oe=Math.floor(me/65536)),it=(me=it+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ye=(me=Ye+Oe+65535)-65536*(Oe=Math.floor(me/65536)),qe=(me=qe+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Bt=(me=Bt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ct=(me=Ct+Oe+65535)-65536*(Oe=Math.floor(me/65536)),kt=(me=kt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ot=(me=Ot+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Pt=(me=Pt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Lt=(me=Lt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),nn=(me=nn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Yt=(me=Yt+Oe+65535)-65536*(Oe=Math.floor(me/65536)),gn=(me=gn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),an=(me=an+Oe+65535)-65536*(Oe=Math.floor(me/65536)),tn=(me=tn+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ut=(me=Ut+Oe+65535)-65536*(Oe=Math.floor(me/65536)),Ke+=Oe-1+37*(Oe-1),_e[0]=Ke,_e[1]=it,_e[2]=Ye,_e[3]=qe,_e[4]=Bt,_e[5]=Ct,_e[6]=kt,_e[7]=Ot,_e[8]=Pt,_e[9]=Lt,_e[10]=nn,_e[11]=Yt,_e[12]=gn,_e[13]=an,_e[14]=tn,_e[15]=Ut}function Ce(_e,Ee){de(_e,Ee,Ee)}function ye(_e,Ee){var me,Me=D();for(me=0;me<16;me++)Me[me]=Ee[me];for(me=253;me>=0;me--)Ce(Me,Me),2!==me&&4!==me&&de(Me,Me,Ee);for(me=0;me<16;me++)_e[me]=Me[me]}function ve(_e,Ee){var me,Me=D();for(me=0;me<16;me++)Me[me]=Ee[me];for(me=250;me>=0;me--)Ce(Me,Me),1!==me&&de(Me,Me,Ee);for(me=0;me<16;me++)_e[me]=Me[me]}function ae(_e,Ee,Me){var Ke,it,me=new Uint8Array(32),Oe=new Float64Array(80),Ye=D(),qe=D(),Bt=D(),Ct=D(),kt=D(),Ot=D();for(it=0;it<31;it++)me[it]=Ee[it];for(me[31]=127&Ee[31]|64,me[0]&=248,se(Oe,Me),it=0;it<16;it++)qe[it]=Oe[it],Ct[it]=Ye[it]=Bt[it]=0;for(Ye[0]=Ct[0]=1,it=254;it>=0;--it)B(Ye,qe,Ke=me[it>>>3]>>>(7&it)&1),B(Bt,Ct,Ke),ee(kt,Ye,Bt),oe(Ye,Ye,Bt),ee(Bt,qe,Ct),oe(qe,qe,Ct),Ce(Ct,kt),Ce(Ot,Ye),de(Ye,Bt,Ye),de(Bt,qe,kt),ee(kt,Ye,Bt),oe(Ye,Ye,Bt),Ce(qe,Ye),oe(Bt,Ct,Ot),de(Ye,Bt,b),ee(Ye,Ye,Ct),de(Bt,Bt,Ye),de(Ye,Ct,Ot),de(Ct,qe,Oe),Ce(qe,kt),B(Ye,qe,Ke),B(Bt,Ct,Ke);for(it=0;it<16;it++)Oe[it+16]=Ye[it],Oe[it+32]=Bt[it],Oe[it+48]=qe[it],Oe[it+64]=Ct[it];var Pt=Oe.subarray(32),Lt=Oe.subarray(16);return ye(Pt,Pt),de(Lt,Lt,Pt),I(_e,Lt),0}function fe(_e,Ee){return ae(_e,Ee,l)}function pe(_e,Ee){return w(Ee,32),fe(_e,Ee)}function Se(_e,Ee,Me){var me=new Uint8Array(32);return ae(me,Me,Ee),G(_e,_,me,Q)}C.prototype.blocks=function(_e,Ee,Me){for(var Oe,Ke,it,Ye,qe,Bt,Ct,kt,Ot,Pt,Lt,nn,Yt,gn,an,tn,Ut,cn,Jt,me=this.fin?0:2048,Zt=this.h[0],fn=this.h[1],Qt=this.h[2],Dt=this.h[3],Mt=this.h[4],Xt=this.h[5],Ft=this.h[6],jt=this.h[7],on=this.h[8],On=this.h[9],Kn=this.r[0],jn=this.r[1],Hn=this.r[2],st=this.r[3],Jn=this.r[4],ur=this.r[5],Qn=this.r[6],Zn=this.r[7],Xn=this.r[8],tr=this.r[9];Me>=16;)Pt=Ot=0,Pt+=(Zt+=8191&(Oe=255&_e[Ee+0]|(255&_e[Ee+1])<<8))*Kn,Pt+=(fn+=8191&(Oe>>>13|(Ke=255&_e[Ee+2]|(255&_e[Ee+3])<<8)<<3))*(5*tr),Pt+=(Qt+=8191&(Ke>>>10|(it=255&_e[Ee+4]|(255&_e[Ee+5])<<8)<<6))*(5*Xn),Pt+=(Dt+=8191&(it>>>7|(Ye=255&_e[Ee+6]|(255&_e[Ee+7])<<8)<<9))*(5*Zn),Ot=(Pt+=(Mt+=8191&(Ye>>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this.leftover){for(it=this.leftover,this.buffer[it++]=1;it<16;it++)this.buffer[it]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(me=this.h[1]>>>13,this.h[1]&=8191,it=2;it<10;it++)this.h[it]+=me,me=this.h[it]>>>13,this.h[it]&=8191;for(this.h[0]+=5*me,me=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=me,me=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=me,Me[0]=this.h[0]+5,me=Me[0]>>>13,Me[0]&=8191,it=1;it<10;it++)Me[it]=this.h[it]+me,me=Me[it]>>>13,Me[it]&=8191;for(Me[9]-=8192,Oe=(1^me)-1,it=0;it<10;it++)Me[it]&=Oe;for(Oe=~Oe,it=0;it<10;it++)this.h[it]=this.h[it]&Oe|Me[it];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),Ke=this.h[0]+this.pad[0],this.h[0]=65535&Ke,it=1;it<8;it++)Ke=(this.h[it]+this.pad[it]|0)+(Ke>>>16)|0,this.h[it]=65535&Ke;_e[Ee+0]=this.h[0]>>>0&255,_e[Ee+1]=this.h[0]>>>8&255,_e[Ee+2]=this.h[1]>>>0&255,_e[Ee+3]=this.h[1]>>>8&255,_e[Ee+4]=this.h[2]>>>0&255,_e[Ee+5]=this.h[2]>>>8&255,_e[Ee+6]=this.h[3]>>>0&255,_e[Ee+7]=this.h[3]>>>8&255,_e[Ee+8]=this.h[4]>>>0&255,_e[Ee+9]=this.h[4]>>>8&255,_e[Ee+10]=this.h[5]>>>0&255,_e[Ee+11]=this.h[5]>>>8&255,_e[Ee+12]=this.h[6]>>>0&255,_e[Ee+13]=this.h[6]>>>8&255,_e[Ee+14]=this.h[7]>>>0&255,_e[Ee+15]=this.h[7]>>>8&255},C.prototype.update=function(_e,Ee,Me){var me,Oe;if(this.leftover){for((Oe=16-this.leftover)>Me&&(Oe=Me),me=0;me=16&&(Oe=Me-Me%16,this.blocks(_e,Ee,Oe),Ee+=Oe,Me-=Oe),Me){for(me=0;me=128;){for(fn=0;fn<16;fn++)Qt=8*fn+Br,Oe[fn]=Me[Qt+0]<<24|Me[Qt+1]<<16|Me[Qt+2]<<8|Me[Qt+3],Ke[fn]=Me[Qt+4]<<24|Me[Qt+5]<<16|Me[Qt+6]<<8|Me[Qt+7];for(fn=0;fn<80;fn++)if(it=On,Ye=Kn,qe=jn,Bt=Hn,Ct=st,kt=Jn,Ot=ur,Qn,Lt=Zn,nn=Xn,Yt=tr,gn=wr,an=dr,tn=Ln,Ut=Ir,Sr,Xt=65535&(Mt=Sr),Ft=Mt>>>16,jt=65535&(Dt=Qn),on=Dt>>>16,Xt+=65535&(Mt=(dr>>>14|st<<18)^(dr>>>18|st<<14)^(st>>>9|dr<<23)),Ft+=Mt>>>16,jt+=65535&(Dt=(st>>>14|dr<<18)^(st>>>18|dr<<14)^(dr>>>9|st<<23)),on+=Dt>>>16,Xt+=65535&(Mt=dr&Ln^~dr&Ir),Ft+=Mt>>>16,jt+=65535&(Dt=st&Jn^~st&ur),on+=Dt>>>16,Dt=lt[2*fn],Xt+=65535&(Mt=lt[2*fn+1]),Ft+=Mt>>>16,jt+=65535&Dt,on+=Dt>>>16,Dt=Oe[fn%16],Ft+=(Mt=Ke[fn%16])>>>16,jt+=65535&Dt,on+=Dt>>>16,jt+=(Ft+=(Xt+=65535&Mt)>>>16)>>>16,Xt=65535&(Mt=Zt=65535&Xt|Ft<<16),Ft=Mt>>>16,jt=65535&(Dt=Jt=65535&jt|(on+=jt>>>16)<<16),on=Dt>>>16,Xt+=65535&(Mt=(Zn>>>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[4]=st=65535&jt|on<<16,Ee[4]=dr=65535&Xt|Ft<<16,Xt=65535&(Mt=Ln),Ft=Mt>>>16,jt=65535&(Dt=Jn),on=Dt>>>16,Dt=_e[5],Ft+=(Mt=Ee[5])>>>16,jt+=65535&Dt,on+=Dt>>>16,on+=(jt+=(Ft+=(Xt+=65535&Mt)>>>16)>>>16)>>>16,_e[5]=Jn=65535&jt|on<<16,Ee[5]=Ln=65535&Xt|Ft<<16,Xt=65535&(Mt=Ir),Ft=Mt>>>16,jt=65535&(Dt=ur),on=Dt>>>16,Dt=_e[6],Ft+=(Mt=Ee[6])>>>16,jt+=65535&Dt,on+=Dt>>>16,on+=(jt+=(Ft+=(Xt+=65535&Mt)>>>16)>>>16)>>>16,_e[6]=ur=65535&jt|on<<16,Ee[6]=Ir=65535&Xt|Ft<<16,Xt=65535&(Mt=Sr),Ft=Mt>>>16,jt=65535&(Dt=Qn),on=Dt>>>16,Dt=_e[7],Ft+=(Mt=Ee[7])>>>16,jt+=65535&Dt,on+=Dt>>>16,on+=(jt+=(Ft+=(Xt+=65535&Mt)>>>16)>>>16)>>>16,_e[7]=Qn=65535&jt|on<<16,Ee[7]=Sr=65535&Xt|Ft<<16,Br+=128,me-=128}return me}function He(_e,Ee,Me){var it,me=new Int32Array(8),Oe=new Int32Array(8),Ke=new Uint8Array(256),Ye=Me;for(me[0]=1779033703,me[1]=3144134277,me[2]=1013904242,me[3]=2773480762,me[4]=1359893119,me[5]=2600822924,me[6]=528734635,me[7]=1541459225,Oe[0]=4089235720,Oe[1]=2227873595,Oe[2]=4271175723,Oe[3]=1595750129,Oe[4]=2917565137,Oe[5]=725511199,Oe[6]=4215389547,Oe[7]=327033209,Ge(me,Oe,Ee,Me),Me%=128,it=0;it=0;--Oe)tt(_e,Ee,me=Me[Oe/8|0]>>(7&Oe)&1),Kt(Ee,_e),Kt(_e,_e),tt(_e,Ee,me)}function ot(_e,Ee){var Me=[D(),D(),D(),D()];S(Me[0],A),S(Me[1],P),S(Me[2],m),de(Me[3],A,P),Vt(_e,Me,Ee)}function at(_e,Ee,Me){var Ke,me=new Uint8Array(64),Oe=[D(),D(),D(),D()];for(Me||w(Ee,32),He(me,Ee,32),me[0]&=248,me[31]&=127,me[31]|=64,ot(Oe,me),nt(_e,Oe),Ke=0;Ke<32;Ke++)Ee[Ke+32]=_e[Ke];return 0}var Gt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Re(_e,Ee){var Me,me,Oe,Ke;for(me=63;me>=32;--me){for(Me=0,Oe=me-32,Ke=me-12;Oe>4)*Gt[Oe],Me=Ee[Oe]>>8,Ee[Oe]&=255;for(Oe=0;Oe<32;Oe++)Ee[Oe]-=Me*Gt[Oe];for(me=0;me<32;me++)Ee[me+1]+=Ee[me]>>8,_e[me]=255&Ee[me]}function Ae(_e){var Me,Ee=new Float64Array(64);for(Me=0;Me<64;Me++)Ee[Me]=_e[Me];for(Me=0;Me<64;Me++)_e[Me]=0;Re(_e,Ee)}function Te(_e,Ee,Me,me){var Ye,qe,Oe=new Uint8Array(64),Ke=new Uint8Array(64),it=new Uint8Array(64),Bt=new Float64Array(64),Ct=[D(),D(),D(),D()];He(Oe,me,32),Oe[0]&=248,Oe[31]&=127,Oe[31]|=64;var kt=Me+64;for(Ye=0;Ye>7&&oe(_e[0],v,_e[0]),de(_e[3],_e[0],_e[1]),0)}(qe,me))return-1;for(Oe=0;Oe=0},p.sign.keyPair=function(){var _e=new Uint8Array(32),Ee=new Uint8Array(64);return at(_e,Ee),{publicKey:_e,secretKey:Ee}},p.sign.keyPair.fromSecretKey=function(_e){if(yt(_e),64!==_e.length)throw new Error("bad secret key size");for(var Ee=new Uint8Array(32),Me=0;Me{re.exports=function(u){return"function"==typeof Buffer._augment&&Buffer.TYPED_ARRAY_SUPPORT?Buffer._augment(u):new Buffer(u)}},69830:(re,u)=>{var I,f,A,g=void 0,p=1e5,D=(I=Object.prototype.toString,f=Object.prototype.hasOwnProperty,{Class:function(R){return I.call(R).replace(/^\[object *|\]$/g,"")},HasProperty:function(R,se){return se in R},HasOwnProperty:function(R,se){return f.call(R,se)},IsCallable:function(R){return"function"==typeof R},ToInt32:function(R){return R>>0},ToUint32:function(R){return R>>>0}}),w=Math.LN2,_=Math.abs,l=Math.floor,v=Math.log,m=Math.min,b=Math.pow,M=Math.round;function E(I){if(P&&A){var R,f=P(I);for(R=0;R>R}function F(I,f){var R=32-f;return I<>>R}function L(I){return[255&I]}function z(I){return N(I[0],8)}function j(I){return[255&I]}function W(I){return F(I[0],8)}function Y(I){return[(I=M(Number(I)))<0?0:I>255?255:255&I]}function G(I){return[I>>8&255,255&I]}function Q(I){return N(I[0]<<8|I[1],16)}function q(I){return[I>>8&255,255&I]}function J(I){return F(I[0]<<8|I[1],16)}function H(I){return[I>>24&255,I>>16&255,I>>8&255,255&I]}function te(I){return N(I[0]<<24|I[1]<<16|I[2]<<8|I[3],32)}function C(I){return[I>>24&255,I>>16&255,I>>8&255,255&I]}function o(I){return F(I[0]<<24|I[1]<<16|I[2]<<8|I[3],32)}function s(I,f,R){var ee,oe,de,ye,ve,ae,fe,se=(1<.5||ce%2?ce+1:ce}for(I!=I?(oe=(1<=b(2,1-se)?(oe=m(l(v(I)/w),1023),(de=pe(I/b(2,oe)*b(2,R)))/b(2,R)>=2&&(oe+=1,de=1),oe>se?(oe=(1<>=1;return se.reverse(),Ce=se.join(""),ye=(1<0?ve*b(2,ae-ye)*(1+fe/b(2,R)):0!==fe?ve*b(2,-(ye-1))*(fe/b(2,R)):ve<0?-0:0}function h(I){return d(I,11,52)}function S(I){return s(I,11,52)}function k(I){return d(I,8,23)}function B(I){return s(I,8,23)}(function(){var I=function(Se){if((Se=D.ToInt32(Se))<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");var ce;for(this.byteLength=Se,this._bytes=[],this._bytes.length=Se,ce=0;cethis.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=D.ToUint32(lt),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(He=arguments[0],this.length=D.ToUint32(He.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new I(this.byteLength),this.byteOffset=0,Kt=0;Ktp)throw new RangeError("Array too large for polyfill");var R;for(R=0;R=this.length)return g;var lt,Ge,Fe=[];for(lt=0,Ge=this.byteOffset+Pe*this.BYTES_PER_ELEMENT;lt=this.length)return g;var Ge,He,lt=this._pack(Fe);for(Ge=0,He=this.byteOffset+Pe*this.BYTES_PER_ELEMENT;Gethis.length)throw new RangeError("Offset plus length of array is out of range");if(ot=this.byteOffset+He*this.BYTES_PER_ELEMENT,at=lt.length*this.BYTES_PER_ELEMENT,lt.buffer===this.buffer){for(Gt=[],tt=0,nt=lt.byteOffset;ttthis.length)throw new RangeError("Offset plus length of array is out of range");for(tt=0;tttt?tt:He}Pe=D.ToInt32(Pe),Fe=D.ToInt32(Fe),arguments.length<1&&(Pe=0),arguments.length<2&&(Fe=this.length),Pe<0&&(Pe=this.length+Pe),Fe<0&&(Fe=this.length+Fe),Pe=lt(Pe,0,this.length);var Ge=(Fe=lt(Fe,0,this.length))-Pe;return Ge<0&&(Ge=0),new this.constructor(this.buffer,this.byteOffset+Pe*this.BYTES_PER_ELEMENT,Ge)},be}var se=R(1,L,z),ee=R(1,j,W),oe=R(1,Y,W),de=R(2,G,Q),Ce=R(2,q,J),ye=R(4,H,te),ve=R(4,C,o),ae=R(4,B,k),fe=R(8,S,h);u.iq=u.iq||se,u.U2=u.U2||ee,u.we=u.we||oe,u.M2=u.M2||de,u.HA=u.HA||Ce,u.ZV=u.ZV||ye,u._R=u._R||ve,u.$L=u.$L||ae,u.I=u.I||fe})(),function(){function I(oe,de){return D.IsCallable(oe.get)?oe.get(de):oe[de]}var oe,f=(oe=new u.HA([4660]),18===I(new u.U2(oe.buffer),0)),R=function(de,Ce,ye){if(0===arguments.length)de=new u.eT(0);else if(!(de instanceof u.eT||"ArrayBuffer"===D.Class(de)))throw new TypeError("TypeError");if(this.buffer=de||new u.eT(0),this.byteOffset=D.ToUint32(Ce),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=D.ToUint32(ye),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");E(this)};function se(oe){return function(de,Ce){if((de=D.ToUint32(de))+oe.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");de+=this.byteOffset;var ae,ye=new u.U2(this.buffer,de,oe.BYTES_PER_ELEMENT),ve=[];for(ae=0;aethis.byteLength)throw new RangeError("Array index out of range");var pe,ve=new oe([Ce]),ae=new u.U2(ve.buffer),fe=[];for(pe=0;pe{re.exports=g(62074)},46564:re=>{re.exports=function(g){var D,p=!1;return g instanceof Function||(p=!0,D=g,g=null),function(){return p||(p=!0,D=g.apply(this,arguments),g=null),D}}},25554:re=>{re.exports=function u(g,p,D){if(D||(D=[]),D.length{re.exports={cache:g(46564),eachCombination:g(25554)}},75557:(re,u,g)=>{"use strict";function p(D,w){return w=w||{},new Promise(function(_,l){var v=new XMLHttpRequest,m=[],b=[],M={},E=function(){return{ok:2==(v.status/100|0),statusText:v.statusText,status:v.status,url:v.responseURL,text:function(){return Promise.resolve(v.responseText)},json:function(){return Promise.resolve(v.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([v.response]))},clone:E,headers:{keys:function(){return m},entries:function(){return b},get:function(P){return M[P.toLowerCase()]},has:function(P){return P.toLowerCase()in M}}}};for(var A in v.open(w.method||"get",D,!0),v.onload=function(){v.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(P,x,N){m.push(x=x.toLowerCase()),b.push([x,N]),M[x]=M[x]?M[x]+","+N:N}),_(E())},v.onerror=l,v.withCredentials="include"==w.credentials,w.headers)v.setRequestHeader(A,w.headers[A]);v.send(w.body||null)})}g.r(u),g.d(u,{default:()=>p})},96482:function(re,u){!function(g){"use strict";function p(){for(var _e=arguments.length,Ee=Array(_e),Me=0;Me<_e;Me++)Ee[Me]=arguments[Me];if(Ee.length>1){Ee[0]=Ee[0].slice(0,-1);for(var me=Ee.length-1,Oe=1;Oe= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=x-N,te=Math.floor,C=String.fromCharCode;function o(_e){throw new RangeError(J[_e])}function s(_e,Ee){for(var Me=[],me=_e.length;me--;)Me[me]=Ee(_e[me]);return Me}function d(_e,Ee){var Me=_e.split("@"),me="";return Me.length>1&&(me=Me[0]+"@",_e=Me[1]),me+s((_e=_e.replace(q,".")).split("."),Ee).join(".")}function h(_e){for(var Ee=[],Me=0,me=_e.length;Me=55296&&Oe<=56319&&Me>1,Ee+=te(Ee/Me);Ee>H*F>>1;Oe+=x)Ee=te(Ee/H);return te(Oe+(H+1)*Ee/(Ee+L))},f=function(Ee){var Me=[],me=Ee.length,Oe=0,Ke=W,it=j,Ye=Ee.lastIndexOf(Y);Ye<0&&(Ye=0);for(var qe=0;qe=128&&o("not-basic"),Me.push(Ee.charCodeAt(qe));for(var Bt=Ye>0?Ye+1:0;Bt=me&&o("invalid-input");var Pt=k(Ee.charCodeAt(Bt++));(Pt>=x||Pt>te((P-Oe)/kt))&&o("overflow"),Oe+=Pt*kt;var Lt=Ot<=it?N:Ot>=it+F?F:Ot-it;if(Ptte(P/nn)&&o("overflow"),kt*=nn}var Yt=Me.length+1;it=I(Oe-Ct,Yt,0==Ct),te(Oe/Yt)>P-Ke&&o("overflow"),Ke+=te(Oe/Yt),Oe%=Yt,Me.splice(Oe++,0,Ke)}return String.fromCodePoint.apply(String,Me)},R=function(Ee){var Me=[],me=(Ee=h(Ee)).length,Oe=W,Ke=0,it=j,Ye=!0,qe=!1,Bt=void 0;try{for(var kt,Ct=Ee[Symbol.iterator]();!(Ye=(kt=Ct.next()).done);Ye=!0){var Ot=kt.value;Ot<128&&Me.push(C(Ot))}}catch(jn){qe=!0,Bt=jn}finally{try{!Ye&&Ct.return&&Ct.return()}finally{if(qe)throw Bt}}var Pt=Me.length,Lt=Pt;for(Pt&&Me.push(Y);Lt=Oe&&cnte((P-Ke)/Jt)&&o("overflow"),Ke+=(nn-Oe)*Jt,Oe=nn;var Zt=!0,fn=!1,Qt=void 0;try{for(var Mt,Dt=Ee[Symbol.iterator]();!(Zt=(Mt=Dt.next()).done);Zt=!0){var Xt=Mt.value;if(XtP&&o("overflow"),Xt==Oe){for(var Ft=Ke,jt=x;;jt+=x){var on=jt<=it?N:jt>=it+F?F:jt-it;if(Ft>6|192).toString(16).toUpperCase()+"%"+(63&Ee|128).toString(16).toUpperCase():"%"+(Ee>>12|224).toString(16).toUpperCase()+"%"+(Ee>>6&63|128).toString(16).toUpperCase()+"%"+(63&Ee|128).toString(16).toUpperCase()}function ye(_e){for(var Ee="",Me=0,me=_e.length;Me=194&&Oe<224){if(me-Me>=6){var Ke=parseInt(_e.substr(Me+4,2),16);Ee+=String.fromCharCode((31&Oe)<<6|63&Ke)}else Ee+=_e.substr(Me,6);Me+=6}else if(Oe>=224){if(me-Me>=9){var it=parseInt(_e.substr(Me+4,2),16),Ye=parseInt(_e.substr(Me+7,2),16);Ee+=String.fromCharCode((15&Oe)<<12|(63&it)<<6|63&Ye)}else Ee+=_e.substr(Me,9);Me+=9}else Ee+=_e.substr(Me,3),Me+=3}return Ee}function ve(_e,Ee){function Me(me){var Oe=ye(me);return Oe.match(Ee.UNRESERVED)?Oe:me}return _e.scheme&&(_e.scheme=String(_e.scheme).replace(Ee.PCT_ENCODED,Me).toLowerCase().replace(Ee.NOT_SCHEME,"")),void 0!==_e.userinfo&&(_e.userinfo=String(_e.userinfo).replace(Ee.PCT_ENCODED,Me).replace(Ee.NOT_USERINFO,Ce).replace(Ee.PCT_ENCODED,_)),void 0!==_e.host&&(_e.host=String(_e.host).replace(Ee.PCT_ENCODED,Me).toLowerCase().replace(Ee.NOT_HOST,Ce).replace(Ee.PCT_ENCODED,_)),void 0!==_e.path&&(_e.path=String(_e.path).replace(Ee.PCT_ENCODED,Me).replace(_e.scheme?Ee.NOT_PATH:Ee.NOT_PATH_NOSCHEME,Ce).replace(Ee.PCT_ENCODED,_)),void 0!==_e.query&&(_e.query=String(_e.query).replace(Ee.PCT_ENCODED,Me).replace(Ee.NOT_QUERY,Ce).replace(Ee.PCT_ENCODED,_)),void 0!==_e.fragment&&(_e.fragment=String(_e.fragment).replace(Ee.PCT_ENCODED,Me).replace(Ee.NOT_FRAGMENT,Ce).replace(Ee.PCT_ENCODED,_)),_e}function ae(_e){return _e.replace(/^0*(.*)/,"$1")||"0"}function fe(_e,Ee){var Me=_e.match(Ee.IPV4ADDRESS)||[],Oe=E(Me,2)[1];return Oe?Oe.split(".").map(ae).join("."):_e}function pe(_e,Ee){var Me=_e.match(Ee.IPV6ADDRESS)||[],me=E(Me,3),Oe=me[1],Ke=me[2];if(Oe){for(var it=Oe.toLowerCase().split("::").reverse(),Ye=E(it,2),qe=Ye[0],Bt=Ye[1],Ct=Bt?Bt.split(":").map(ae):[],kt=qe.split(":").map(ae),Ot=Ee.IPV4ADDRESS.test(kt[kt.length-1]),Pt=Ot?7:8,Lt=kt.length-Pt,nn=Array(Pt),Yt=0;Yt1){var Ut=nn.slice(0,an.index),cn=nn.slice(an.index+an.length);tn=Ut.join(":")+"::"+cn.join(":")}else tn=nn.join(":");return Ke&&(tn+="%"+Ke),tn}return _e}var Se=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ce=void 0==="".match(/(){0}/)[1];function be(_e){var Ee=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Me={},me=!1!==Ee.iri?M:b;"suffix"===Ee.reference&&(_e=(Ee.scheme?Ee.scheme+":":"")+"//"+_e);var Oe=_e.match(Se);if(Oe){ce?(Me.scheme=Oe[1],Me.userinfo=Oe[3],Me.host=Oe[4],Me.port=parseInt(Oe[5],10),Me.path=Oe[6]||"",Me.query=Oe[7],Me.fragment=Oe[8],isNaN(Me.port)&&(Me.port=Oe[5])):(Me.scheme=Oe[1]||void 0,Me.userinfo=-1!==_e.indexOf("@")?Oe[3]:void 0,Me.host=-1!==_e.indexOf("//")?Oe[4]:void 0,Me.port=parseInt(Oe[5],10),Me.path=Oe[6]||"",Me.query=-1!==_e.indexOf("?")?Oe[7]:void 0,Me.fragment=-1!==_e.indexOf("#")?Oe[8]:void 0,isNaN(Me.port)&&(Me.port=_e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Oe[4]:void 0)),Me.host&&(Me.host=pe(fe(Me.host,me),me)),void 0!==Me.scheme||void 0!==Me.userinfo||void 0!==Me.host||void 0!==Me.port||Me.path||void 0!==Me.query?void 0===Me.scheme?Me.reference="relative":void 0===Me.fragment?Me.reference="absolute":Me.reference="uri":Me.reference="same-document",Ee.reference&&"suffix"!==Ee.reference&&Ee.reference!==Me.reference&&(Me.error=Me.error||"URI is not a "+Ee.reference+" reference.");var Ke=de[(Ee.scheme||Me.scheme||"").toLowerCase()];if(Ee.unicodeSupport||Ke&&Ke.unicodeSupport)ve(Me,me);else{if(Me.host&&(Ee.domainHost||Ke&&Ke.domainHost))try{Me.host=oe.toASCII(Me.host.replace(me.PCT_ENCODED,ye).toLowerCase())}catch(it){Me.error=Me.error||"Host's domain name can not be converted to ASCII via punycode: "+it}ve(Me,b)}Ke&&Ke.parse&&Ke.parse(Me,Ee)}else Me.error=Me.error||"URI can not be parsed.";return Me}function Pe(_e,Ee){var Me=!1!==Ee.iri?M:b,me=[];return void 0!==_e.userinfo&&(me.push(_e.userinfo),me.push("@")),void 0!==_e.host&&me.push(pe(fe(String(_e.host),Me),Me).replace(Me.IPV6ADDRESS,function(Oe,Ke,it){return"["+Ke+(it?"%25"+it:"")+"]"})),("number"==typeof _e.port||"string"==typeof _e.port)&&(me.push(":"),me.push(String(_e.port))),me.length?me.join(""):void 0}var Fe=/^\.\.?\//,lt=/^\/\.(\/|$)/,Ge=/^\/\.\.(\/|$)/,He=/^\/?(?:.|\n)*?(?=\/|$)/;function Kt(_e){for(var Ee=[];_e.length;)if(_e.match(Fe))_e=_e.replace(Fe,"");else if(_e.match(lt))_e=_e.replace(lt,"/");else if(_e.match(Ge))_e=_e.replace(Ge,"/"),Ee.pop();else if("."===_e||".."===_e)_e="";else{var Me=_e.match(He);if(!Me)throw new Error("Unexpected dot segment condition");var me=Me[0];_e=_e.slice(me.length),Ee.push(me)}return Ee.join("")}function tt(_e){var Ee=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Me=Ee.iri?M:b,me=[],Oe=de[(Ee.scheme||_e.scheme||"").toLowerCase()];if(Oe&&Oe.serialize&&Oe.serialize(_e,Ee),_e.host&&!Me.IPV6ADDRESS.test(_e.host)&&(Ee.domainHost||Oe&&Oe.domainHost))try{_e.host=Ee.iri?oe.toUnicode(_e.host):oe.toASCII(_e.host.replace(Me.PCT_ENCODED,ye).toLowerCase())}catch(Ye){_e.error=_e.error||"Host's domain name can not be converted to "+(Ee.iri?"Unicode":"ASCII")+" via punycode: "+Ye}ve(_e,Me),"suffix"!==Ee.reference&&_e.scheme&&(me.push(_e.scheme),me.push(":"));var Ke=Pe(_e,Ee);if(void 0!==Ke&&("suffix"!==Ee.reference&&me.push("//"),me.push(Ke),_e.path&&"/"!==_e.path.charAt(0)&&me.push("/")),void 0!==_e.path){var it=_e.path;!Ee.absolutePath&&(!Oe||!Oe.absolutePath)&&(it=Kt(it)),void 0===Ke&&(it=it.replace(/^\/\//,"/%2F")),me.push(it)}return void 0!==_e.query&&(me.push("?"),me.push(_e.query)),void 0!==_e.fragment&&(me.push("#"),me.push(_e.fragment)),me.join("")}function nt(_e,Ee){var Me=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},Oe={};return arguments[3]||(_e=be(tt(_e,Me),Me),Ee=be(tt(Ee,Me),Me)),!(Me=Me||{}).tolerant&&Ee.scheme?(Oe.scheme=Ee.scheme,Oe.userinfo=Ee.userinfo,Oe.host=Ee.host,Oe.port=Ee.port,Oe.path=Kt(Ee.path||""),Oe.query=Ee.query):(void 0!==Ee.userinfo||void 0!==Ee.host||void 0!==Ee.port?(Oe.userinfo=Ee.userinfo,Oe.host=Ee.host,Oe.port=Ee.port,Oe.path=Kt(Ee.path||""),Oe.query=Ee.query):(Ee.path?("/"===Ee.path.charAt(0)?Oe.path=Kt(Ee.path):(void 0===_e.userinfo&&void 0===_e.host&&void 0===_e.port||_e.path?_e.path?Oe.path=_e.path.slice(0,_e.path.lastIndexOf("/")+1)+Ee.path:Oe.path=Ee.path:Oe.path="/"+Ee.path,Oe.path=Kt(Oe.path)),Oe.query=Ee.query):(Oe.path=_e.path,void 0!==Ee.query?Oe.query=Ee.query:Oe.query=_e.query),Oe.userinfo=_e.userinfo,Oe.host=_e.host,Oe.port=_e.port),Oe.scheme=_e.scheme),Oe.fragment=Ee.fragment,Oe}function Vt(_e,Ee,Me){var me=v({scheme:"null"},Me);return tt(nt(be(_e,me),be(Ee,me),me,!0),me)}function ot(_e,Ee){return"string"==typeof _e?_e=tt(be(_e,Ee),Ee):"object"===w(_e)&&(_e=be(tt(_e,Ee),Ee)),_e}function at(_e,Ee,Me){return"string"==typeof _e?_e=tt(be(_e,Me),Me):"object"===w(_e)&&(_e=tt(_e,Me)),"string"==typeof Ee?Ee=tt(be(Ee,Me),Me):"object"===w(Ee)&&(Ee=tt(Ee,Me)),_e===Ee}function Gt(_e,Ee){return _e&&_e.toString().replace(Ee&&Ee.iri?M.ESCAPE:b.ESCAPE,Ce)}function Re(_e,Ee){return _e&&_e.toString().replace(Ee&&Ee.iri?M.PCT_ENCODED:b.PCT_ENCODED,ye)}var Ae={scheme:"http",domainHost:!0,parse:function(Ee,Me){return Ee.host||(Ee.error=Ee.error||"HTTP URIs must have a host."),Ee},serialize:function(Ee,Me){var me="https"===String(Ee.scheme).toLowerCase();return(Ee.port===(me?443:80)||""===Ee.port)&&(Ee.port=void 0),Ee.path||(Ee.path="/"),Ee}},Te={scheme:"https",domainHost:Ae.domainHost,parse:Ae.parse,serialize:Ae.serialize};function Be(_e){return"boolean"==typeof _e.secure?_e.secure:"wss"===String(_e.scheme).toLowerCase()}var Ve={scheme:"ws",domainHost:!0,parse:function(Ee,Me){var me=Ee;return me.secure=Be(me),me.resourceName=(me.path||"/")+(me.query?"?"+me.query:""),me.path=void 0,me.query=void 0,me},serialize:function(Ee,Me){if((Ee.port===(Be(Ee)?443:80)||""===Ee.port)&&(Ee.port=void 0),"boolean"==typeof Ee.secure&&(Ee.scheme=Ee.secure?"wss":"ws",Ee.secure=void 0),Ee.resourceName){var me=Ee.resourceName.split("?"),Oe=E(me,2),Ke=Oe[0],it=Oe[1];Ee.path=Ke&&"/"!==Ke?Ke:void 0,Ee.query=it,Ee.resourceName=void 0}return Ee.fragment=void 0,Ee}},mt={scheme:"wss",domainHost:Ve.domainHost,parse:Ve.parse,serialize:Ve.serialize},Ze={},hn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ft="[0-9A-Fa-f]",At=D(D("%[EFef]"+ft+"%"+ft+ft+"%"+ft+ft)+"|"+D("%[89A-Fa-f]"+ft+"%"+ft+ft)+"|"+D("%"+ft+ft)),wn="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Qe=p("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Ht="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",pt=new RegExp(hn,"g"),vt=new RegExp(At,"g"),$t=new RegExp(p("[^]",wn,"[\\.]",'[\\"]',Qe),"g"),dt=new RegExp(p("[^]",hn,Ht),"g"),gt=dt;function mn(_e){var Ee=ye(_e);return Ee.match(pt)?Ee:_e}var ut={scheme:"mailto",parse:function(Ee,Me){var me=Ee,Oe=me.to=me.path?me.path.split(","):[];if(me.path=void 0,me.query){for(var Ke=!1,it={},Ye=me.query.split("&"),qe=0,Bt=Ye.length;qe= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Y=b-M,G=Math.floor,Q=String.fromCharCode;function J(f){throw RangeError(W[f])}function H(f,R){for(var se=f.length,ee=[];se--;)ee[se]=R(f[se]);return ee}function te(f,R){var se=f.split("@"),ee="";return se.length>1&&(ee=se[0]+"@",f=se[1]),ee+H((f=f.replace(j,".")).split("."),R).join(".")}function C(f){for(var oe,de,R=[],se=0,ee=f.length;se=55296&&oe<=56319&&se65535&&(se+=Q((R-=65536)>>>10&1023|55296),R=56320|1023&R),se+=Q(R)}).join("")}function s(f){return f-48<10?f-22:f-65<26?f-65:f-97<26?f-97:b}function d(f,R){return f+22+75*(f<26)-((0!=R)<<5)}function h(f,R,se){var ee=0;for(f=se?G(f/P):f>>1,f+=G(f/R);f>Y*E>>1;ee+=b)f=G(f/Y);return G(ee+(Y+1)*f/(f+A))}function S(f){var ee,ye,ve,ae,fe,pe,Se,ce,be,Pe,R=[],se=f.length,oe=0,de=N,Ce=x;for((ye=f.lastIndexOf(F))<0&&(ye=0),ve=0;ve=128&&J("not-basic"),R.push(f.charCodeAt(ve));for(ae=ye>0?ye+1:0;ae=se&&J("invalid-input"),((ce=s(f.charCodeAt(ae++)))>=b||ce>G((m-oe)/pe))&&J("overflow"),oe+=ce*pe,!(ce<(be=Se<=Ce?M:Se>=Ce+E?E:Se-Ce));Se+=b)pe>G(m/(Pe=b-be))&&J("overflow"),pe*=Pe;Ce=h(oe-fe,ee=R.length+1,0==fe),G(oe/ee)>m-de&&J("overflow"),de+=G(oe/ee),oe%=ee,R.splice(oe++,0,de)}return o(R)}function k(f){var R,se,ee,oe,de,Ce,ye,ve,ae,fe,pe,ce,be,Pe,Fe,Se=[];for(ce=(f=C(f)).length,R=N,se=0,de=x,Ce=0;Ce=R&&peG((m-se)/(be=ee+1))&&J("overflow"),se+=(ye-R)*be,R=ye,Ce=0;Cem&&J("overflow"),pe==R){for(ve=se,ae=b;!(ve<(fe=ae<=de?M:ae>=de+E?E:ae-de));ae+=b)Fe=ve-fe,Pe=b-fe,Se.push(Q(d(fe+Fe%Pe,0))),ve=G(Fe/Pe);Se.push(Q(d(ve,0))),de=h(se,be,ee==oe),se=0,++ee}++se,++R}return Se.join("")}v={version:"1.3.2",ucs2:{decode:C,encode:o},decode:S,encode:k,toASCII:function I(f){return te(f,function(R){return z.test(R)?"xn--"+k(R):R})},toUnicode:function B(f){return te(f,function(R){return L.test(R)?S(R.slice(4).toLowerCase()):R})}},void 0!==(p=function(){return v}.call(u,g,u,re))&&(re.exports=p)}()},68762:(re,u,g)=>{"use strict";var p=g(11308),D=g(70796);function w(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}u.parse=W,u.resolve=function G(q,J){return W(q,!1,!0).resolve(J)},u.resolveObject=function Q(q,J){return q?W(q,!1,!0).resolveObject(J):J},u.format=function Y(q){return D.isString(q)&&(q=W(q)),q instanceof w?q.format():w.prototype.format.call(q)},u.Url=w;var _=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,v=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,m=["<",">",'"',"`"," ","\r","\n","\t"],b=["{","}","|","\\","^","`"].concat(m),M=["'"].concat(b),E=["%","/","?",";","#"].concat(M),A=["/","?","#"],x=/^[+a-z0-9A-Z_-]{0,63}$/,N=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,F={javascript:!0,"javascript:":!0},L={javascript:!0,"javascript:":!0},z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},j=g(17137);function W(q,J,H){if(q&&D.isObject(q)&&q instanceof w)return q;var te=new w;return te.parse(q,J,H),te}w.prototype.parse=function(q,J,H){if(!D.isString(q))throw new TypeError("Parameter 'url' must be a string, not "+typeof q);var te=q.indexOf("?"),C=-1!==te&&te127?ve+="x":ve+=ye[ae];if(!ve.match(x)){var pe=de.slice(0,f),Se=de.slice(f+1),ce=ye.match(N);ce&&(pe.push(ce[1]),Se.unshift(ce[2])),Se.length&&(d="/"+Se.join(".")+d),this.hostname=pe.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),oe||(this.hostname=p.toASCII(this.hostname));var be=this.port?":"+this.port:"",Pe=this.hostname||"";this.host=Pe+be,this.href+=this.host,oe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==d[0]&&(d="/"+d))}if(!F[k])for(f=0,Ce=M.length;f0)&&H.host.split("@"))&&(H.auth=ve.shift(),H.host=H.hostname=ve.shift());return H.search=q.search,H.query=q.query,(!D.isNull(H.pathname)||!D.isNull(H.search))&&(H.path=(H.pathname?H.pathname:"")+(H.search?H.search:"")),H.href=H.format(),H}if(!de.length)return H.pathname=null,H.search?H.path="/"+H.search:H.path=null,H.href=H.format(),H;for(var ae=de.slice(-1)[0],fe=(H.host||q.host||de.length>1)&&("."===ae||".."===ae)||""===ae,pe=0,Se=de.length;Se>=0;Se--)"."===(ae=de[Se])?de.splice(Se,1):".."===ae?(de.splice(Se,1),pe++):pe&&(de.splice(Se,1),pe--);if(!ee&&!oe)for(;pe--;pe)de.unshift("..");ee&&""!==de[0]&&(!de[0]||"/"!==de[0].charAt(0))&&de.unshift(""),fe&&"/"!==de.join("/").substr(-1)&&de.push("");var ve,ce=""===de[0]||de[0]&&"/"===de[0].charAt(0);ye&&(H.hostname=H.host=ce?"":de.length?de.shift():"",(ve=!!(H.host&&H.host.indexOf("@")>0)&&H.host.split("@"))&&(H.auth=ve.shift(),H.host=H.hostname=ve.shift()));return(ee=ee||H.host&&de.length)&&!ce&&de.unshift(""),de.length?H.pathname=de.join("/"):(H.pathname=null,H.path=null),(!D.isNull(H.pathname)||!D.isNull(H.search))&&(H.path=(H.pathname?H.pathname:"")+(H.search?H.search:"")),H.auth=q.auth||H.auth,H.slashes=H.slashes||q.slashes,H.href=H.format(),H},w.prototype.parseHost=function(){var q=this.host,J=l.exec(q);J&&(":"!==(J=J[0])&&(this.port=J.substr(1)),q=q.substr(0,q.length-J.length)),q&&(this.hostname=q)}},70796:re=>{"use strict";re.exports={isString:function(u){return"string"==typeof u},isObject:function(u){return"object"==typeof u&&null!==u},isNull:function(u){return null===u},isNullOrUndefined:function(u){return null==u}}},23532:re=>{function g(p){try{if(!global.localStorage)return!1}catch{return!1}var D=global.localStorage[p];return null!=D&&"true"===String(D).toLowerCase()}re.exports=function u(p,D){if(g("noDeprecation"))return p;var w=!1;return function _(){if(!w){if(g("throwDeprecation"))throw new Error(D);g("traceDeprecation")?console.trace(D):console.warn(D),w=!0}return p.apply(this,arguments)}}},94372:(re,u,g)=>{"use strict";var p=g(42031);re.exports=function(w){return!!p(w)}},11451:re=>{re.exports=function(g){return g&&"object"==typeof g&&"function"==typeof g.copy&&"function"==typeof g.fill&&"function"==typeof g.readUInt8}},78791:(re,u,g)=>{"use strict";var p=g(13407),D=g(20110),w=g(42031),_=g(94372);function l(He){return He.call.bind(He)}var v=typeof BigInt<"u",m=typeof Symbol<"u",b=l(Object.prototype.toString),M=l(Number.prototype.valueOf),E=l(String.prototype.valueOf),A=l(Boolean.prototype.valueOf);if(v)var P=l(BigInt.prototype.valueOf);if(m)var x=l(Symbol.prototype.valueOf);function N(He,Kt){if("object"!=typeof He)return!1;try{return Kt(He),!0}catch{return!1}}function o(He){return"[object Map]"===b(He)}function d(He){return"[object Set]"===b(He)}function S(He){return"[object WeakMap]"===b(He)}function B(He){return"[object WeakSet]"===b(He)}function f(He){return"[object ArrayBuffer]"===b(He)}function R(He){return!(typeof ArrayBuffer>"u")&&(f.working?f(He):He instanceof ArrayBuffer)}function se(He){return"[object DataView]"===b(He)}function ee(He){return!(typeof DataView>"u")&&(se.working?se(He):He instanceof DataView)}u.isArgumentsObject=p,u.isGeneratorFunction=D,u.isTypedArray=_,u.isPromise=function F(He){return typeof Promise<"u"&&He instanceof Promise||null!==He&&"object"==typeof He&&"function"==typeof He.then&&"function"==typeof He.catch},u.isArrayBufferView=function L(He){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(He):_(He)||ee(He)},u.isUint8Array=function z(He){return"Uint8Array"===w(He)},u.isUint8ClampedArray=function j(He){return"Uint8ClampedArray"===w(He)},u.isUint16Array=function W(He){return"Uint16Array"===w(He)},u.isUint32Array=function Y(He){return"Uint32Array"===w(He)},u.isInt8Array=function G(He){return"Int8Array"===w(He)},u.isInt16Array=function Q(He){return"Int16Array"===w(He)},u.isInt32Array=function q(He){return"Int32Array"===w(He)},u.isFloat32Array=function J(He){return"Float32Array"===w(He)},u.isFloat64Array=function H(He){return"Float64Array"===w(He)},u.isBigInt64Array=function te(He){return"BigInt64Array"===w(He)},u.isBigUint64Array=function C(He){return"BigUint64Array"===w(He)},o.working=typeof Map<"u"&&o(new Map),u.isMap=function s(He){return!(typeof Map>"u")&&(o.working?o(He):He instanceof Map)},d.working=typeof Set<"u"&&d(new Set),u.isSet=function h(He){return!(typeof Set>"u")&&(d.working?d(He):He instanceof Set)},S.working=typeof WeakMap<"u"&&S(new WeakMap),u.isWeakMap=function k(He){return!(typeof WeakMap>"u")&&(S.working?S(He):He instanceof WeakMap)},B.working=typeof WeakSet<"u"&&B(new WeakSet),u.isWeakSet=function I(He){return B(He)},f.working=typeof ArrayBuffer<"u"&&f(new ArrayBuffer),u.isArrayBuffer=R,se.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&se(new DataView(new ArrayBuffer(1),0,1)),u.isDataView=ee;var oe=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function de(He){return"[object SharedArrayBuffer]"===b(He)}function Ce(He){return!(typeof oe>"u")&&(typeof de.working>"u"&&(de.working=de(new oe)),de.working?de(He):He instanceof oe)}function Se(He){return N(He,M)}function ce(He){return N(He,E)}function be(He){return N(He,A)}function Pe(He){return v&&N(He,P)}function Fe(He){return m&&N(He,x)}u.isSharedArrayBuffer=Ce,u.isAsyncFunction=function ye(He){return"[object AsyncFunction]"===b(He)},u.isMapIterator=function ve(He){return"[object Map Iterator]"===b(He)},u.isSetIterator=function ae(He){return"[object Set Iterator]"===b(He)},u.isGeneratorObject=function fe(He){return"[object Generator]"===b(He)},u.isWebAssemblyCompiledModule=function pe(He){return"[object WebAssembly.Module]"===b(He)},u.isNumberObject=Se,u.isStringObject=ce,u.isBooleanObject=be,u.isBigIntObject=Pe,u.isSymbolObject=Fe,u.isBoxedPrimitive=function lt(He){return Se(He)||ce(He)||be(He)||Pe(He)||Fe(He)},u.isAnyArrayBuffer=function Ge(He){return typeof Uint8Array<"u"&&(R(He)||Ce(He))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(He){Object.defineProperty(u,He,{enumerable:!1,value:function(){throw new Error(He+" is not supported in userland")}})})},26788:(re,u,g)=>{var p=Object.getOwnPropertyDescriptors||function(ee){for(var oe=Object.keys(ee),de={},Ce=0;Ce=Ce)return ae;switch(ae){case"%s":return String(de[oe++]);case"%d":return Number(de[oe++]);case"%j":try{return JSON.stringify(de[oe++])}catch{return"[Circular]"}default:return ae}}),ve=de[oe];oe"u")return function(){return u.deprecate(se,ee).apply(this,arguments)};var oe=!1;return function de(){if(!oe){if(process.throwDeprecation)throw new Error(ee);process.traceDeprecation?console.trace(ee):console.error(ee),oe=!0}return se.apply(this,arguments)}};var w={},_=/^$/;if(process.env.NODE_DEBUG){var l=process.env.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),_=new RegExp("^"+l+"$","i")}function v(se,ee){var oe={seen:[],stylize:b};return arguments.length>=3&&(oe.depth=arguments[2]),arguments.length>=4&&(oe.colors=arguments[3]),z(ee)?oe.showHidden=ee:ee&&u._extend(oe,ee),q(oe.showHidden)&&(oe.showHidden=!1),q(oe.depth)&&(oe.depth=2),q(oe.colors)&&(oe.colors=!1),q(oe.customInspect)&&(oe.customInspect=!0),oe.colors&&(oe.stylize=m),E(oe,se,oe.depth)}function m(se,ee){var oe=v.styles[ee];return oe?"\x1b["+v.colors[oe][0]+"m"+se+"\x1b["+v.colors[oe][1]+"m":se}function b(se,ee){return se}function E(se,ee,oe){if(se.customInspect&&ee&&o(ee.inspect)&&ee.inspect!==u.inspect&&(!ee.constructor||ee.constructor.prototype!==ee)){var de=ee.inspect(oe,se);return G(de)||(de=E(se,de,oe)),de}var Ce=function A(se,ee){if(q(ee))return se.stylize("undefined","undefined");if(G(ee)){var oe="'"+JSON.stringify(ee).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return se.stylize(oe,"string")}if(Y(ee))return se.stylize(""+ee,"number");if(z(ee))return se.stylize(""+ee,"boolean");if(j(ee))return se.stylize("null","null")}(se,ee);if(Ce)return Ce;var ye=Object.keys(ee),ve=function M(se){var ee={};return se.forEach(function(oe,de){ee[oe]=!0}),ee}(ye);if(se.showHidden&&(ye=Object.getOwnPropertyNames(ee)),C(ee)&&(ye.indexOf("message")>=0||ye.indexOf("description")>=0))return P(ee);if(0===ye.length){if(o(ee)){var ae=ee.name?": "+ee.name:"";return se.stylize("[Function"+ae+"]","special")}if(J(ee))return se.stylize(RegExp.prototype.toString.call(ee),"regexp");if(te(ee))return se.stylize(Date.prototype.toString.call(ee),"date");if(C(ee))return P(ee)}var be,fe="",pe=!1,Se=["{","}"];(L(ee)&&(pe=!0,Se=["[","]"]),o(ee))&&(fe=" [Function"+(ee.name?": "+ee.name:"")+"]");return J(ee)&&(fe=" "+RegExp.prototype.toString.call(ee)),te(ee)&&(fe=" "+Date.prototype.toUTCString.call(ee)),C(ee)&&(fe=" "+P(ee)),0!==ye.length||pe&&0!=ee.length?oe<0?J(ee)?se.stylize(RegExp.prototype.toString.call(ee),"regexp"):se.stylize("[Object]","special"):(se.seen.push(ee),be=pe?function x(se,ee,oe,de,Ce){for(var ye=[],ve=0,ae=ee.length;ve=0&&0,ye+ve.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Ce>60?oe[0]+(""===ee?"":ee+"\n ")+" "+se.join(",\n ")+" "+oe[1]:oe[0]+ee+" "+se.join(", ")+" "+oe[1]}(be,fe,Se)):Se[0]+fe+Se[1]}function P(se){return"["+Error.prototype.toString.call(se)+"]"}function N(se,ee,oe,de,Ce,ye){var ve,ae,fe;if((fe=Object.getOwnPropertyDescriptor(ee,Ce)||{value:ee[Ce]}).get?ae=fe.set?se.stylize("[Getter/Setter]","special"):se.stylize("[Getter]","special"):fe.set&&(ae=se.stylize("[Setter]","special")),B(de,Ce)||(ve="["+Ce+"]"),ae||(se.seen.indexOf(fe.value)<0?(ae=j(oe)?E(se,fe.value,null):E(se,fe.value,oe-1)).indexOf("\n")>-1&&(ae=ye?ae.split("\n").map(function(pe){return" "+pe}).join("\n").slice(2):"\n"+ae.split("\n").map(function(pe){return" "+pe}).join("\n")):ae=se.stylize("[Circular]","special")),q(ve)){if(ye&&Ce.match(/^\d+$/))return ae;(ve=JSON.stringify(""+Ce)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ve=ve.slice(1,-1),ve=se.stylize(ve,"name")):(ve=ve.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ve=se.stylize(ve,"string"))}return ve+": "+ae}function L(se){return Array.isArray(se)}function z(se){return"boolean"==typeof se}function j(se){return null===se}function Y(se){return"number"==typeof se}function G(se){return"string"==typeof se}function q(se){return void 0===se}function J(se){return H(se)&&"[object RegExp]"===d(se)}function H(se){return"object"==typeof se&&null!==se}function te(se){return H(se)&&"[object Date]"===d(se)}function C(se){return H(se)&&("[object Error]"===d(se)||se instanceof Error)}function o(se){return"function"==typeof se}function d(se){return Object.prototype.toString.call(se)}function h(se){return se<10?"0"+se.toString(10):se.toString(10)}u.debuglog=function(se){if(se=se.toUpperCase(),!w[se])if(_.test(se)){var ee=process.pid;w[se]=function(){var oe=u.format.apply(u,arguments);console.error("%s %d: %s",se,ee,oe)}}else w[se]=function(){};return w[se]},u.inspect=v,v.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},v.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},u.types=g(78791),u.isArray=L,u.isBoolean=z,u.isNull=j,u.isNullOrUndefined=function W(se){return null==se},u.isNumber=Y,u.isString=G,u.isSymbol=function Q(se){return"symbol"==typeof se},u.isUndefined=q,u.isRegExp=J,u.types.isRegExp=J,u.isObject=H,u.isDate=te,u.types.isDate=te,u.isError=C,u.types.isNativeError=C,u.isFunction=o,u.isPrimitive=function s(se){return null===se||"boolean"==typeof se||"number"==typeof se||"string"==typeof se||"symbol"==typeof se||typeof se>"u"},u.isBuffer=g(11451);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(se,ee){return Object.prototype.hasOwnProperty.call(se,ee)}u.log=function(){console.log("%s - %s",function k(){var se=new Date,ee=[h(se.getHours()),h(se.getMinutes()),h(se.getSeconds())].join(":");return[se.getDate(),S[se.getMonth()],ee].join(" ")}(),u.format.apply(u,arguments))},u.inherits=g(83894),u._extend=function(se,ee){if(!ee||!H(ee))return se;for(var oe=Object.keys(ee),de=oe.length;de--;)se[oe[de]]=ee[oe[de]];return se};var I=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function f(se,ee){if(!se){var oe=new Error("Promise was rejected with a falsy value");oe.reason=se,se=oe}return ee(se)}u.promisify=function(ee){if("function"!=typeof ee)throw new TypeError('The "original" argument must be of type Function');if(I&&ee[I]){var oe;if("function"!=typeof(oe=ee[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(oe,I,{value:oe,enumerable:!1,writable:!1,configurable:!0}),oe}function oe(){for(var de,Ce,ye=new Promise(function(fe,pe){de=fe,Ce=pe}),ve=[],ae=0;ae{"use strict";var p=g(9435),D=g(87029),w=g(55685),_=g(75834),l=g(47378),v=_("Object.prototype.toString"),m=g(46259)(),b=typeof globalThis>"u"?global:globalThis,M=D(),E=_("String.prototype.slice"),A=Object.getPrototypeOf,P=_("Array.prototype.indexOf",!0)||function(z,j){for(var W=0;W-1?j:"Object"===j&&function(z){var j=!1;return p(x,function(W,Y){if(!j)try{W(z),j=E(Y,1)}catch{}}),j}(z)}return l?function(z){var j=!1;return p(x,function(W,Y){if(!j)try{"$"+W(z)===Y&&(j=E(Y,1))}catch{}}),j}(z):null}},99136:re=>{re.exports=function u(g,p){if(g&&p)return u(g)(p);if("function"!=typeof g)throw new TypeError("need wrapper function");return Object.keys(g).forEach(function(w){D[w]=g[w]}),D;function D(){for(var w=new Array(arguments.length),_=0;_{re.exports=function u(){for(var g={},p=0;p{"use strict";re.exports=function(u){u.prototype[Symbol.iterator]=function*(){for(let g=this.head;g;g=g.next)yield g.value}}},47245:(re,u,g)=>{"use strict";function p(v){var m=this;if(m instanceof p||(m=new p),m.tail=null,m.head=null,m.length=0,v&&"function"==typeof v.forEach)v.forEach(function(E){m.push(E)});else if(arguments.length>0)for(var b=0,M=arguments.length;b1)b=m;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");M=this.head.next,b=this.head.value}for(var E=0;null!==M;E++)b=v(b,M.value,E),M=M.next;return b},p.prototype.reduceReverse=function(v,m){var b,M=this.tail;if(arguments.length>1)b=m;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");M=this.tail.prev,b=this.tail.value}for(var E=this.length-1;null!==M;E--)b=v(b,M.value,E),M=M.prev;return b},p.prototype.toArray=function(){for(var v=new Array(this.length),m=0,b=this.head;null!==b;m++)v[m]=b.value,b=b.next;return v},p.prototype.toArrayReverse=function(){for(var v=new Array(this.length),m=0,b=this.tail;null!==b;m++)v[m]=b.value,b=b.prev;return v},p.prototype.slice=function(v,m){(m=m||this.length)<0&&(m+=this.length),(v=v||0)<0&&(v+=this.length);var b=new p;if(mthis.length&&(m=this.length);for(var M=0,E=this.head;null!==E&&Mthis.length&&(m=this.length);for(var M=this.length,E=this.tail;null!==E&&M>m;M--)E=E.prev;for(;null!==E&&M>v;M--,E=E.prev)b.push(E.value);return b},p.prototype.splice=function(v,m,...b){v>this.length&&(v=this.length-1),v<0&&(v=this.length+v);for(var M=0,E=this.head;null!==E&&M{"use strict";g.r(u),g.d(u,{__assign:()=>w,__asyncDelegator:()=>j,__asyncGenerator:()=>z,__asyncValues:()=>W,__await:()=>L,__awaiter:()=>b,__classPrivateFieldGet:()=>q,__classPrivateFieldSet:()=>J,__createBinding:()=>E,__decorate:()=>l,__exportStar:()=>A,__extends:()=>D,__generator:()=>M,__importDefault:()=>Q,__importStar:()=>G,__makeTemplateObject:()=>Y,__metadata:()=>m,__param:()=>v,__read:()=>x,__rest:()=>_,__spread:()=>N,__spreadArrays:()=>F,__values:()=>P});var p=function(H,te){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,o){C.__proto__=o}||function(C,o){for(var s in o)o.hasOwnProperty(s)&&(C[s]=o[s])})(H,te)};function D(H,te){function C(){this.constructor=H}p(H,te),H.prototype=null===te?Object.create(te):(C.prototype=te.prototype,new C)}var w=function(){return w=Object.assign||function(te){for(var C,o=1,s=arguments.length;o=0;S--)(h=H[S])&&(d=(s<3?h(d):s>3?h(te,C,d):h(te,C))||d);return s>3&&d&&Object.defineProperty(te,C,d),d}function v(H,te){return function(C,o){te(C,o,H)}}function m(H,te){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(H,te)}function b(H,te,C,o){return new(C||(C=Promise))(function(d,h){function S(I){try{B(o.next(I))}catch(f){h(f)}}function k(I){try{B(o.throw(I))}catch(f){h(f)}}function B(I){I.done?d(I.value):function s(d){return d instanceof C?d:new C(function(h){h(d)})}(I.value).then(S,k)}B((o=o.apply(H,te||[])).next())})}function M(H,te){var o,s,d,h,C={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return h={next:S(0),throw:S(1),return:S(2)},"function"==typeof Symbol&&(h[Symbol.iterator]=function(){return this}),h;function S(B){return function(I){return function k(B){if(o)throw new TypeError("Generator is already executing.");for(;C;)try{if(o=1,s&&(d=2&B[0]?s.return:B[0]?s.throw||((d=s.return)&&d.call(s),0):s.next)&&!(d=d.call(s,B[1])).done)return d;switch(s=0,d&&(B=[2&B[0],d.value]),B[0]){case 0:case 1:d=B;break;case 4:return C.label++,{value:B[1],done:!1};case 5:C.label++,s=B[1],B=[0];continue;case 7:B=C.ops.pop(),C.trys.pop();continue;default:if(!(d=(d=C.trys).length>0&&d[d.length-1])&&(6===B[0]||2===B[0])){C=0;continue}if(3===B[0]&&(!d||B[1]>d[0]&&B[1]=H.length&&(H=void 0),{value:H&&H[o++],done:!H}}};throw new TypeError(te?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(H,te){var C="function"==typeof Symbol&&H[Symbol.iterator];if(!C)return H;var s,h,o=C.call(H),d=[];try{for(;(void 0===te||te-- >0)&&!(s=o.next()).done;)d.push(s.value)}catch(S){h={error:S}}finally{try{s&&!s.done&&(C=o.return)&&C.call(o)}finally{if(h)throw h.error}}return d}function N(){for(var H=[],te=0;te1||S(R,se)})})}function S(R,se){try{!function k(R){R.value instanceof L?Promise.resolve(R.value.v).then(B,I):f(d[0][2],R)}(o[R](se))}catch(ee){f(d[0][3],ee)}}function B(R){S("next",R)}function I(R){S("throw",R)}function f(R,se){R(se),d.shift(),d.length&&S(d[0][0],d[0][1])}}function j(H){var te,C;return te={},o("next"),o("throw",function(s){throw s}),o("return"),te[Symbol.iterator]=function(){return this},te;function o(s,d){te[s]=H[s]?function(h){return(C=!C)?{value:L(H[s](h)),done:"return"===s}:d?d(h):h}:d}}function W(H){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var C,te=H[Symbol.asyncIterator];return te?te.call(H):(H=P(H),C={},o("next"),o("throw"),o("return"),C[Symbol.asyncIterator]=function(){return this},C);function o(d){C[d]=H[d]&&function(h){return new Promise(function(S,k){(function s(d,h,S,k){Promise.resolve(k).then(function(B){d({value:B,done:S})},h)})(S,k,(h=H[d](h)).done,h.value)})}}}function Y(H,te){return Object.defineProperty?Object.defineProperty(H,"raw",{value:te}):H.raw=te,H}function G(H){if(H&&H.__esModule)return H;var te={};if(null!=H)for(var C in H)Object.hasOwnProperty.call(H,C)&&(te[C]=H[C]);return te.default=H,te}function Q(H){return H&&H.__esModule?H:{default:H}}function q(H,te){if(!te.has(H))throw new TypeError("attempted to get private field on non-instance");return te.get(H)}function J(H,te,C){if(!te.has(H))throw new TypeError("attempted to set private field on non-instance");return te.set(H,C),C}},39653:(re,u,g)=>{"use strict";g.r(u),g.d(u,{__assign:()=>w,__asyncDelegator:()=>j,__asyncGenerator:()=>z,__asyncValues:()=>W,__await:()=>L,__awaiter:()=>b,__classPrivateFieldGet:()=>q,__classPrivateFieldSet:()=>J,__createBinding:()=>E,__decorate:()=>l,__exportStar:()=>A,__extends:()=>D,__generator:()=>M,__importDefault:()=>Q,__importStar:()=>G,__makeTemplateObject:()=>Y,__metadata:()=>m,__param:()=>v,__read:()=>x,__rest:()=>_,__spread:()=>N,__spreadArrays:()=>F,__values:()=>P});var p=function(H,te){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,o){C.__proto__=o}||function(C,o){for(var s in o)o.hasOwnProperty(s)&&(C[s]=o[s])})(H,te)};function D(H,te){function C(){this.constructor=H}p(H,te),H.prototype=null===te?Object.create(te):(C.prototype=te.prototype,new C)}var w=function(){return w=Object.assign||function(te){for(var C,o=1,s=arguments.length;o=0;S--)(h=H[S])&&(d=(s<3?h(d):s>3?h(te,C,d):h(te,C))||d);return s>3&&d&&Object.defineProperty(te,C,d),d}function v(H,te){return function(C,o){te(C,o,H)}}function m(H,te){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(H,te)}function b(H,te,C,o){return new(C||(C=Promise))(function(d,h){function S(I){try{B(o.next(I))}catch(f){h(f)}}function k(I){try{B(o.throw(I))}catch(f){h(f)}}function B(I){I.done?d(I.value):function s(d){return d instanceof C?d:new C(function(h){h(d)})}(I.value).then(S,k)}B((o=o.apply(H,te||[])).next())})}function M(H,te){var o,s,d,h,C={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return h={next:S(0),throw:S(1),return:S(2)},"function"==typeof Symbol&&(h[Symbol.iterator]=function(){return this}),h;function S(B){return function(I){return function k(B){if(o)throw new TypeError("Generator is already executing.");for(;C;)try{if(o=1,s&&(d=2&B[0]?s.return:B[0]?s.throw||((d=s.return)&&d.call(s),0):s.next)&&!(d=d.call(s,B[1])).done)return d;switch(s=0,d&&(B=[2&B[0],d.value]),B[0]){case 0:case 1:d=B;break;case 4:return C.label++,{value:B[1],done:!1};case 5:C.label++,s=B[1],B=[0];continue;case 7:B=C.ops.pop(),C.trys.pop();continue;default:if(!(d=(d=C.trys).length>0&&d[d.length-1])&&(6===B[0]||2===B[0])){C=0;continue}if(3===B[0]&&(!d||B[1]>d[0]&&B[1]=H.length&&(H=void 0),{value:H&&H[o++],done:!H}}};throw new TypeError(te?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(H,te){var C="function"==typeof Symbol&&H[Symbol.iterator];if(!C)return H;var s,h,o=C.call(H),d=[];try{for(;(void 0===te||te-- >0)&&!(s=o.next()).done;)d.push(s.value)}catch(S){h={error:S}}finally{try{s&&!s.done&&(C=o.return)&&C.call(o)}finally{if(h)throw h.error}}return d}function N(){for(var H=[],te=0;te1||S(R,se)})})}function S(R,se){try{!function k(R){R.value instanceof L?Promise.resolve(R.value.v).then(B,I):f(d[0][2],R)}(o[R](se))}catch(ee){f(d[0][3],ee)}}function B(R){S("next",R)}function I(R){S("throw",R)}function f(R,se){R(se),d.shift(),d.length&&S(d[0][0],d[0][1])}}function j(H){var te,C;return te={},o("next"),o("throw",function(s){throw s}),o("return"),te[Symbol.iterator]=function(){return this},te;function o(s,d){te[s]=H[s]?function(h){return(C=!C)?{value:L(H[s](h)),done:"return"===s}:d?d(h):h}:d}}function W(H){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var C,te=H[Symbol.asyncIterator];return te?te.call(H):(H=P(H),C={},o("next"),o("throw"),o("return"),C[Symbol.asyncIterator]=function(){return this},C);function o(d){C[d]=H[d]&&function(h){return new Promise(function(S,k){(function s(d,h,S,k){Promise.resolve(k).then(function(B){d({value:B,done:S})},h)})(S,k,(h=H[d](h)).done,h.value)})}}}function Y(H,te){return Object.defineProperty?Object.defineProperty(H,"raw",{value:te}):H.raw=te,H}function G(H){if(H&&H.__esModule)return H;var te={};if(null!=H)for(var C in H)Object.hasOwnProperty.call(H,C)&&(te[C]=H[C]);return te.default=H,te}function Q(H){return H&&H.__esModule?H:{default:H}}function q(H,te){if(!te.has(H))throw new TypeError("attempted to get private field on non-instance");return te.get(H)}function J(H,te,C){if(!te.has(H))throw new TypeError("attempted to set private field on non-instance");return te.set(H,C),C}},57121:(re,u,g)=>{"use strict";g.r(u),g.d(u,{__assign:()=>w,__asyncDelegator:()=>j,__asyncGenerator:()=>z,__asyncValues:()=>W,__await:()=>L,__awaiter:()=>b,__classPrivateFieldGet:()=>q,__classPrivateFieldSet:()=>J,__createBinding:()=>E,__decorate:()=>l,__exportStar:()=>A,__extends:()=>D,__generator:()=>M,__importDefault:()=>Q,__importStar:()=>G,__makeTemplateObject:()=>Y,__metadata:()=>m,__param:()=>v,__read:()=>x,__rest:()=>_,__spread:()=>N,__spreadArrays:()=>F,__values:()=>P});var p=function(H,te){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,o){C.__proto__=o}||function(C,o){for(var s in o)o.hasOwnProperty(s)&&(C[s]=o[s])})(H,te)};function D(H,te){function C(){this.constructor=H}p(H,te),H.prototype=null===te?Object.create(te):(C.prototype=te.prototype,new C)}var w=function(){return w=Object.assign||function(te){for(var C,o=1,s=arguments.length;o=0;S--)(h=H[S])&&(d=(s<3?h(d):s>3?h(te,C,d):h(te,C))||d);return s>3&&d&&Object.defineProperty(te,C,d),d}function v(H,te){return function(C,o){te(C,o,H)}}function m(H,te){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(H,te)}function b(H,te,C,o){return new(C||(C=Promise))(function(d,h){function S(I){try{B(o.next(I))}catch(f){h(f)}}function k(I){try{B(o.throw(I))}catch(f){h(f)}}function B(I){I.done?d(I.value):function s(d){return d instanceof C?d:new C(function(h){h(d)})}(I.value).then(S,k)}B((o=o.apply(H,te||[])).next())})}function M(H,te){var o,s,d,h,C={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return h={next:S(0),throw:S(1),return:S(2)},"function"==typeof Symbol&&(h[Symbol.iterator]=function(){return this}),h;function S(B){return function(I){return function k(B){if(o)throw new TypeError("Generator is already executing.");for(;C;)try{if(o=1,s&&(d=2&B[0]?s.return:B[0]?s.throw||((d=s.return)&&d.call(s),0):s.next)&&!(d=d.call(s,B[1])).done)return d;switch(s=0,d&&(B=[2&B[0],d.value]),B[0]){case 0:case 1:d=B;break;case 4:return C.label++,{value:B[1],done:!1};case 5:C.label++,s=B[1],B=[0];continue;case 7:B=C.ops.pop(),C.trys.pop();continue;default:if(!(d=(d=C.trys).length>0&&d[d.length-1])&&(6===B[0]||2===B[0])){C=0;continue}if(3===B[0]&&(!d||B[1]>d[0]&&B[1]=H.length&&(H=void 0),{value:H&&H[o++],done:!H}}};throw new TypeError(te?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(H,te){var C="function"==typeof Symbol&&H[Symbol.iterator];if(!C)return H;var s,h,o=C.call(H),d=[];try{for(;(void 0===te||te-- >0)&&!(s=o.next()).done;)d.push(s.value)}catch(S){h={error:S}}finally{try{s&&!s.done&&(C=o.return)&&C.call(o)}finally{if(h)throw h.error}}return d}function N(){for(var H=[],te=0;te1||S(R,se)})})}function S(R,se){try{!function k(R){R.value instanceof L?Promise.resolve(R.value.v).then(B,I):f(d[0][2],R)}(o[R](se))}catch(ee){f(d[0][3],ee)}}function B(R){S("next",R)}function I(R){S("throw",R)}function f(R,se){R(se),d.shift(),d.length&&S(d[0][0],d[0][1])}}function j(H){var te,C;return te={},o("next"),o("throw",function(s){throw s}),o("return"),te[Symbol.iterator]=function(){return this},te;function o(s,d){te[s]=H[s]?function(h){return(C=!C)?{value:L(H[s](h)),done:"return"===s}:d?d(h):h}:d}}function W(H){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var C,te=H[Symbol.asyncIterator];return te?te.call(H):(H=P(H),C={},o("next"),o("throw"),o("return"),C[Symbol.asyncIterator]=function(){return this},C);function o(d){C[d]=H[d]&&function(h){return new Promise(function(S,k){(function s(d,h,S,k){Promise.resolve(k).then(function(B){d({value:B,done:S})},h)})(S,k,(h=H[d](h)).done,h.value)})}}}function Y(H,te){return Object.defineProperty?Object.defineProperty(H,"raw",{value:te}):H.raw=te,H}function G(H){if(H&&H.__esModule)return H;var te={};if(null!=H)for(var C in H)Object.hasOwnProperty.call(H,C)&&(te[C]=H[C]);return te.default=H,te}function Q(H){return H&&H.__esModule?H:{default:H}}function q(H,te){if(!te.has(H))throw new TypeError("attempted to get private field on non-instance");return te.get(H)}function J(H,te,C){if(!te.has(H))throw new TypeError("attempted to set private field on non-instance");return te.set(H,C),C}},30004:(re,u,g)=>{"use strict";g.r(u),g.d(u,{__assign:()=>w,__asyncDelegator:()=>j,__asyncGenerator:()=>z,__asyncValues:()=>W,__await:()=>L,__awaiter:()=>b,__classPrivateFieldGet:()=>q,__classPrivateFieldSet:()=>J,__createBinding:()=>E,__decorate:()=>l,__exportStar:()=>A,__extends:()=>D,__generator:()=>M,__importDefault:()=>Q,__importStar:()=>G,__makeTemplateObject:()=>Y,__metadata:()=>m,__param:()=>v,__read:()=>x,__rest:()=>_,__spread:()=>N,__spreadArrays:()=>F,__values:()=>P});var p=function(H,te){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,o){C.__proto__=o}||function(C,o){for(var s in o)o.hasOwnProperty(s)&&(C[s]=o[s])})(H,te)};function D(H,te){function C(){this.constructor=H}p(H,te),H.prototype=null===te?Object.create(te):(C.prototype=te.prototype,new C)}var w=function(){return w=Object.assign||function(te){for(var C,o=1,s=arguments.length;o=0;S--)(h=H[S])&&(d=(s<3?h(d):s>3?h(te,C,d):h(te,C))||d);return s>3&&d&&Object.defineProperty(te,C,d),d}function v(H,te){return function(C,o){te(C,o,H)}}function m(H,te){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(H,te)}function b(H,te,C,o){return new(C||(C=Promise))(function(d,h){function S(I){try{B(o.next(I))}catch(f){h(f)}}function k(I){try{B(o.throw(I))}catch(f){h(f)}}function B(I){I.done?d(I.value):function s(d){return d instanceof C?d:new C(function(h){h(d)})}(I.value).then(S,k)}B((o=o.apply(H,te||[])).next())})}function M(H,te){var o,s,d,h,C={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return h={next:S(0),throw:S(1),return:S(2)},"function"==typeof Symbol&&(h[Symbol.iterator]=function(){return this}),h;function S(B){return function(I){return function k(B){if(o)throw new TypeError("Generator is already executing.");for(;C;)try{if(o=1,s&&(d=2&B[0]?s.return:B[0]?s.throw||((d=s.return)&&d.call(s),0):s.next)&&!(d=d.call(s,B[1])).done)return d;switch(s=0,d&&(B=[2&B[0],d.value]),B[0]){case 0:case 1:d=B;break;case 4:return C.label++,{value:B[1],done:!1};case 5:C.label++,s=B[1],B=[0];continue;case 7:B=C.ops.pop(),C.trys.pop();continue;default:if(!(d=(d=C.trys).length>0&&d[d.length-1])&&(6===B[0]||2===B[0])){C=0;continue}if(3===B[0]&&(!d||B[1]>d[0]&&B[1]=H.length&&(H=void 0),{value:H&&H[o++],done:!H}}};throw new TypeError(te?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(H,te){var C="function"==typeof Symbol&&H[Symbol.iterator];if(!C)return H;var s,h,o=C.call(H),d=[];try{for(;(void 0===te||te-- >0)&&!(s=o.next()).done;)d.push(s.value)}catch(S){h={error:S}}finally{try{s&&!s.done&&(C=o.return)&&C.call(o)}finally{if(h)throw h.error}}return d}function N(){for(var H=[],te=0;te1||S(R,se)})})}function S(R,se){try{!function k(R){R.value instanceof L?Promise.resolve(R.value.v).then(B,I):f(d[0][2],R)}(o[R](se))}catch(ee){f(d[0][3],ee)}}function B(R){S("next",R)}function I(R){S("throw",R)}function f(R,se){R(se),d.shift(),d.length&&S(d[0][0],d[0][1])}}function j(H){var te,C;return te={},o("next"),o("throw",function(s){throw s}),o("return"),te[Symbol.iterator]=function(){return this},te;function o(s,d){te[s]=H[s]?function(h){return(C=!C)?{value:L(H[s](h)),done:"return"===s}:d?d(h):h}:d}}function W(H){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var C,te=H[Symbol.asyncIterator];return te?te.call(H):(H=P(H),C={},o("next"),o("throw"),o("return"),C[Symbol.asyncIterator]=function(){return this},C);function o(d){C[d]=H[d]&&function(h){return new Promise(function(S,k){(function s(d,h,S,k){Promise.resolve(k).then(function(B){d({value:B,done:S})},h)})(S,k,(h=H[d](h)).done,h.value)})}}}function Y(H,te){return Object.defineProperty?Object.defineProperty(H,"raw",{value:te}):H.raw=te,H}function G(H){if(H&&H.__esModule)return H;var te={};if(null!=H)for(var C in H)Object.hasOwnProperty.call(H,C)&&(te[C]=H[C]);return te.default=H,te}function Q(H){return H&&H.__esModule?H:{default:H}}function q(H,te){if(!te.has(H))throw new TypeError("attempted to get private field on non-instance");return te.get(H)}function J(H,te,C){if(!te.has(H))throw new TypeError("attempted to set private field on non-instance");return te.set(H,C),C}},80950:()=>{},46601:()=>{},96419:()=>{},56353:()=>{},7716:()=>{},53383:()=>{},8623:()=>{},7748:()=>{},85568:()=>{},6297:()=>{},70131:()=>{},94093:()=>{},61695:()=>{},56619:()=>{},77108:()=>{},52361:()=>{},94616:()=>{},59344:re=>{function u(p,D,w,_,l,v,m){try{var b=p[v](m),M=b.value}catch(E){return void w(E)}b.done?D(M):Promise.resolve(M).then(_,l)}re.exports=function g(p){return function(){var D=this,w=arguments;return new Promise(function(_,l){var v=p.apply(D,w);function m(M){u(v,_,l,m,b,"next",M)}function b(M){u(v,_,l,m,b,"throw",M)}m(void 0)})}},re.exports.__esModule=!0,re.exports.default=re.exports},82253:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(l,v,m,b){return new(m||(m=Promise))(function(E,A){function P(F){try{N(b.next(F))}catch(L){A(L)}}function x(F){try{N(b.throw(F))}catch(L){A(L)}}function N(F){F.done?E(F.value):function M(E){return E instanceof m?E:new m(function(A){A(E)})}(F.value).then(P,x)}N((b=b.apply(l,v||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.HereKeyStore=void 0;const D=g(46358),w=g(37996);u.HereKeyStore=class _{constructor(v=new w.StateStorage){this.storage=v}setActiveAccount(v,m){return p(this,void 0,void 0,function*(){const b=yield this.storage.getState(v);b.activeAccount=m,this.storage.setState(v,b)})}setKey(v,m,b){return p(this,void 0,void 0,function*(){const M=yield this.storage.getState(v);M.accounts[m]=b.toString(),this.storage.setState(v,M)})}getAccounts(v){return p(this,void 0,void 0,function*(){const m=yield this.storage.getState(v);return Object.keys(m.accounts)})}getActiveAccount(v){return p(this,void 0,void 0,function*(){return(yield this.storage.getState(v)).activeAccount})}getKey(v,m){return p(this,void 0,void 0,function*(){const M=(yield this.storage.getState(v)).accounts[m];if(null==M)throw Error(`For ${m} in ${v} network key not found`);return D.KeyPair.fromString(M)})}removeKey(v,m){return p(this,void 0,void 0,function*(){let b=yield this.storage.getState(v);b.activeAccount===m&&(b.activeAccount=null),delete b.accounts[m],this.storage.setState(v,b)})}getNetworks(){return p(this,void 0,void 0,function*(){let v=yield this.storage.getFullState();return Object.keys(v.accounts)})}clear(){return p(this,void 0,void 0,function*(){yield this.storage.clear()})}}},37996:function(re,u){"use strict";var g=this&&this.__awaiter||function(D,w,_,l){return new(_||(_=Promise))(function(m,b){function M(P){try{A(l.next(P))}catch(x){b(x)}}function E(P){try{A(l.throw(P))}catch(x){b(x)}}function A(P){P.done?m(P.value):function v(m){return m instanceof _?m:new _(function(b){b(m)})}(P.value).then(M,E)}A((l=l.apply(D,w||[])).next())})};Object.defineProperty(u,"__esModule",{value:!0}),u.StateStorage=void 0;u.StateStorage=class p{constructor(){this.dataKey="herewallet:keystore"}setState(w,_){return g(this,void 0,void 0,function*(){const l=yield this.getFullState();l[w]=_,window.localStorage.setItem(this.dataKey,JSON.stringify(l))})}getFullState(){return g(this,void 0,void 0,function*(){try{return JSON.parse(window.localStorage.getItem(this.dataKey))||{}}catch{return{}}})}getState(w){return g(this,void 0,void 0,function*(){return(yield this.getFullState())[w]||{activeAccount:null,accounts:{}}})}clear(){return g(this,void 0,void 0,function*(){window.localStorage.removeItem(this.dataKey)})}}},45173:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.WidgetStrategy=u.defaultUrl=void 0;u.defaultUrl="https://my.herewallet.app/connector/index.html";class p{constructor(w={widget:u.defaultUrl,lazy:!1}){this.options={lazy:"object"==typeof w&&w.lazy||!1,widget:"string"==typeof w?w:w.widget||u.defaultUrl},this.options.lazy||this.initIframe()}initIframe(){return null==p.connector&&(p.connector=(D=>{const w=document.createElement("iframe");return w.src=D,w.style.border="none",w.style.zIndex="10000",w.style.position="fixed",w.style.display="none",w.style.top="0",w.style.left="0",w.style.width="100%",w.style.height="100%",document.body.appendChild(w),w})(this.options.widget),p.connector.addEventListener("load",()=>{p.isLoaded=!0})),p.connector}onRequested(w,_,l){const v=this.initIframe();v.style.display="block";const m=()=>{var b,M,E;null===(b=p.connector)||void 0===b||b.removeEventListener("load",m),null===(E=null===(M=p.connector)||void 0===M?void 0:M.contentWindow)||void 0===E||E.postMessage(JSON.stringify({type:"request",payload:{id:w,request:_}}),new URL(this.options.widget).origin)};p.isLoaded?m():v.addEventListener("load",m),this.messageHandler=b=>{try{if(b.origin!==new URL(this.options.widget).origin)return;"reject"===JSON.parse(b.data).type&&l()}catch{}},window.addEventListener("message",this.messageHandler)}postMessage(w){var _;const l=this.initIframe(),v=JSON.stringify(w),m=new URL(this.options.widget).origin;null===(_=l.contentWindow)||void 0===_||_.postMessage(v,m)}onApproving(){this.postMessage({type:"approving"})}onSuccess(w){console.log(w),this.postMessage({type:"result",payload:{request:w}}),this.close()}onFailed(w){this.postMessage({type:"result",payload:{request:w}}),this.close()}close(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0),p.connector&&(p.connector.style.display="none")}}u.WidgetStrategy=p,p.isLoaded=!1},55217:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.WindowStrategy=void 0;u.WindowStrategy=class g{constructor(D="https://my.herewallet.app"){this.endpoint=D,this.signWindow=null,this.onFailed=()=>this.close(),this.onSuccess=()=>this.close()}onInitialized(){if(this.signWindow)return;const D=window.innerWidth/2-210,w=window.innerHeight/2-350;this.signWindow=window.open(`${this.endpoint}/loading`,"_blank",`popup=1,width=420,height=700,top=${w},left=${D}`)}onRequested(D,w,_){null!=this.signWindow&&(this.unloadHandler=()=>{var l;return null===(l=this.signWindow)||void 0===l?void 0:l.close()},window.addEventListener("beforeunload",this.unloadHandler),this.signWindow.location=`${this.endpoint}/request/${D}`,this.timerHandler=setInterval(()=>{var l;null!==(l=this.signWindow)&&void 0!==l&&l.closed&&_("CLOSED")},1e3))}close(){var D;clearInterval(this.timerHandler),null===(D=this.signWindow)||void 0===D||D.close(),this.signWindow=null,this.unloadHandler&&window.removeEventListener("beforeunload",this.unloadHandler)}}},64099:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.createAction=u.parseArgs=void 0;const p=g(98538),D=g(71836);u.parseArgs=v=>"string"==typeof v?Buffer.from(v,"base64"):v;u.createAction=v=>{switch(v.type){case"CreateAccount":return D.transactions.createAccount();case"DeployContract":{const{code:m}=v.params;return D.transactions.deployContract(m)}case"FunctionCall":{const{methodName:m,args:b,gas:M,deposit:E}=v.params;return D.transactions.functionCall(m,(0,u.parseArgs)(b),new p.BN(M),new p.BN(E))}case"Transfer":{const{deposit:m}=v.params;return D.transactions.transfer(new p.BN(m))}case"Stake":{const{stake:m,publicKey:b}=v.params;return D.transactions.stake(new p.BN(m),D.utils.PublicKey.from(b))}case"AddKey":{const{publicKey:m,accessKey:b}=v.params;return D.transactions.addKey(D.utils.PublicKey.from(m),(v=>{if("FullAccess"===v)return D.transactions.fullAccessKey();const{receiverId:m,methodNames:b=[]}=v,M=v.allowance?new p.BN(v.allowance):void 0;return D.transactions.functionCallAccessKey(m,b,M)})(b.permission))}case"DeleteKey":{const{publicKey:m}=v.params;return D.transactions.deleteKey(D.utils.PublicKey.from(m))}case"DeleteAccount":{const{beneficiaryId:m}=v.params;return D.transactions.deleteAccount(m)}default:throw new Error("Invalid action type")}}},19169:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0})},73530:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(m,b,M,E){return new(M||(M=Promise))(function(P,x){function N(z){try{L(E.next(z))}catch(j){x(j)}}function F(z){try{L(E.throw(z))}catch(j){x(j)}}function L(z){z.done?P(z.value):function A(P){return P instanceof M?P:new M(function(x){x(P)})}(z.value).then(N,F)}L((E=E.apply(m,b||[])).next())})},D=this&&this.__rest||function(m,b){var M={};for(var E in m)Object.prototype.hasOwnProperty.call(m,E)&&b.indexOf(E)<0&&(M[E]=m[E]);if(null!=m&&"function"==typeof Object.getOwnPropertySymbols){var A=0;for(E=Object.getOwnPropertySymbols(m);Ap(void 0,void 0,void 0,function*(){let{strategy:b,request:M,disableCleanupRequest:E,id:A,signal:P}=m,x=D(m,["strategy","request","disableCleanupRequest","id","signal"]);return null!=A?M=yield(0,l.getRequest)(A,P):A=yield(0,l.createRequest)(M,P),new Promise((N,F)=>{var L,z;const j=l.proxyApi.replace("https","wss");let W=null,Y=null;const G=()=>p(void 0,void 0,void 0,function*(){W=-1,clearInterval(W),Y?.close(),!0!==E&&(yield(0,l.deleteRequest)(A))}),Q=H=>{var te,C,o,s,d,h;switch(H.status){case _.HereProviderStatus.APPROVING:return null===(te=x.onApproving)||void 0===te||te.call(x,H),void(null===(C=b?.onApproving)||void 0===C||C.call(b,H));case _.HereProviderStatus.FAILED:return G(),F(new _.HereProviderError(H.payload)),null===(o=x.onFailed)||void 0===o||o.call(x,H),void(null===(s=b?.onFailed)||void 0===s||s.call(b,H));case _.HereProviderStatus.SUCCESS:return G(),N(H),null===(d=x.onSuccess)||void 0===d||d.call(x,H),void(null===(h=b?.onSuccess)||void 0===h||h.call(b,H))}},q=H=>{Q({status:_.HereProviderStatus.FAILED,payload:H})};null===(L=x.onRequested)||void 0===L||L.call(x,A,M,q),null===(z=b?.onRequested)||void 0===z||z.call(b,A,M,q),P?.addEventListener("abort",()=>q());const J=()=>{-1!==W&&(W=setTimeout(()=>p(void 0,void 0,void 0,function*(){var H,te;try{const C=yield(0,l.getResponse)(A);if(-1===W)return;Q(C),J()}catch(C){const o=_.HereProviderStatus.FAILED,s=C instanceof Error?C:void 0,d=s?.message;G(),F(new _.HereProviderError(d,s)),null===(H=x.onFailed)||void 0===H||H.call(x,{status:o,payload:d}),null===(te=b?.onFailed)||void 0===te||te.call(b,{status:o,payload:d})}}),3e3))};if(J(),!1===(0,w.isMobile)()){Y=new WebSocket(`${j}/ws/${A}`),Y.onmessage=te=>{if(null!=te.data)try{const C=JSON.parse(te.data);Q(C)}catch{}}}})})},66212:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(A,P,x,N){return new(x||(x=Promise))(function(L,z){function j(G){try{Y(N.next(G))}catch(Q){z(Q)}}function W(G){try{Y(N.throw(G))}catch(Q){z(Q)}}function Y(G){G.done?L(G.value):function F(L){return L instanceof x?L:new x(function(z){z(L)})}(G.value).then(j,W)}Y((N=N.apply(A,P||[])).next())})},D=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(u,"__esModule",{value:!0}),u.createRequest=u.deleteRequest=u.getResponse=u.getRequest=u.proxyApi=void 0;const w=D(g(9562)),_=D(g(78948)),l=g(7123),v=g(45530);u.proxyApi="https://h4n.app";u.getRequest=(A,P)=>p(void 0,void 0,void 0,function*(){const x=yield fetch(`${u.proxyApi}/${A}/request`,{signal:P,headers:{"content-type":"application/json"},method:"GET"});if(!1===x.ok)throw Error(yield x.text());const{data:N}=yield x.json();return JSON.parse((0,l.base_decode)(N).toString("utf8"))});u.getResponse=A=>p(void 0,void 0,void 0,function*(){var P,x,N,F;const L=yield fetch(`${u.proxyApi}/${A}/response`,{headers:{"content-type":"application/json"},method:"GET"});if(!1===L.ok)throw Error(yield L.text());const{data:z}=yield L.json(),j=null!==(P=JSON.parse(z))&&void 0!==P?P:{};return{account_id:null!==(x=j.account_id)&&void 0!==x?x:"",payload:null!==(N=j.payload)&&void 0!==N?N:"",status:null!==(F=j.status)&&void 0!==F?F:-1,topic:j.topic}});u.deleteRequest=A=>p(void 0,void 0,void 0,function*(){const P=yield fetch(`${u.proxyApi}/${A}`,{headers:{"content-type":"application/json"},method:"DELETE"});if(!1===P.ok)throw Error(yield P.text())});u.createRequest=(A,P)=>p(void 0,void 0,void 0,function*(){const x=(0,l.base_encode)(JSON.stringify(Object.assign(Object.assign({},A),{_id:(0,_.default)()}))),N=(0,w.default)(x),L=Buffer.from(N,"hex").toString("base64").replaceAll("/","_").replaceAll("-","+").slice(0,13),z=yield fetch(`${u.proxyApi}/${L}/request`,{method:"POST",signal:P,body:JSON.stringify({topic_id:(0,v.getDeviceId)(),data:x}),headers:{"content-type":"application/json"}});if(!1===z.ok)throw Error(yield z.text());return L})},84960:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(_,l,v,m){void 0===m&&(m=v),Object.defineProperty(_,m,{enumerable:!0,get:function(){return l[v]}})}:function(_,l,v,m){void 0===m&&(m=v),_[m]=l[v]}),D=this&&this.__exportStar||function(_,l){for(var v in _)"default"!==v&&!Object.prototype.hasOwnProperty.call(l,v)&&p(l,_,v)};Object.defineProperty(u,"__esModule",{value:!0}),u.HereWallet=void 0;var w=g(5238);Object.defineProperty(u,"HereWallet",{enumerable:!0,get:function(){return w.HereWallet}}),D(g(64099),u),D(g(82253),u),D(g(37996),u),D(g(19169),u),D(g(45173),u),D(g(55217),u),D(g(67701),u),D(g(37874),u),D(g(45530),u),D(g(73530),u)},11867:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(E,A,P,x){void 0===x&&(x=P),Object.defineProperty(E,x,{enumerable:!0,get:function(){return A[P]}})}:function(E,A,P,x){void 0===x&&(x=P),E[x]=A[P]}),D=this&&this.__setModuleDefault||(Object.create?function(E,A){Object.defineProperty(E,"default",{enumerable:!0,value:A})}:function(E,A){E.default=A}),w=this&&this.__importStar||function(E){if(E&&E.__esModule)return E;var A={};if(null!=E)for(var P in E)"default"!==P&&Object.prototype.hasOwnProperty.call(E,P)&&p(A,E,P);return D(A,E),A},_=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(u,"__esModule",{value:!0}),u.verifySignature=u.authPayloadSchema=u.AuthPayload=void 0;const l=w(g(21531)),v=_(g(1520)),m=g(8127);class b{constructor({message:A,nonce:P,recipient:x,callbackUrl:N}){this.tag=2147484061,this.message=A,this.nonce=P,this.recipient=x,N&&(this.callbackUrl=N)}}u.AuthPayload=b,u.authPayloadSchema=new Map([[b,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),u.verifySignature=function M(E,A){const P=new b(E),x=l.serialize(u.authPayloadSchema,P),N=Uint8Array.from(v.default.sha256.array(x));let F=new Uint8Array(Buffer.from(A.signature,"base64"));return m.PublicKey.from(A.publicKey).verify(N,F)}},67701:(re,u)=>{"use strict";var D;Object.defineProperty(u,"__esModule",{value:!0}),u.HereProviderError=u.HereProviderStatus=void 0,(D=u.HereProviderStatus||(u.HereProviderStatus={}))[D.APPROVING=1]="APPROVING",D[D.FAILED=2]="FAILED",D[D.SUCCESS=3]="SUCCESS";class p extends Error{constructor(w,_){super(w??_?.message),this.payload=w,this.parentError=_}}u.HereProviderError=p},37874:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0})},45530:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(A,P,x,N){return new(x||(x=Promise))(function(L,z){function j(G){try{Y(N.next(G))}catch(Q){z(Q)}}function W(G){try{Y(N.throw(G))}catch(Q){z(Q)}}function Y(G){G.done?L(G.value):function F(L){return L instanceof x?L:new x(function(z){z(L)})}(G.value).then(j,W)}Y((N=N.apply(A,P||[])).next())})},D=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(u,"__esModule",{value:!0}),u.isValidAccessKey=u.internalThrow=u.getPublicKeys=u.serializeActions=u.isMobile=u.getDeviceId=void 0;const w=D(g(78948)),_=g(67701);u.getDeviceId=()=>{const A=window.localStorage.getItem("herewallet-topic")||(0,w.default)();return window.localStorage.setItem("herewallet-topic",A),A};u.isMobile=()=>window.matchMedia("(any-pointer:coarse)").matches;u.serializeActions=A=>A.map(P=>{if("FunctionCall"!==P.type)return P;let{args:x,deposit:N,gas:F,methodName:L}=P.params;return ArrayBuffer.isView(x)&&(x=Buffer.from(x.buffer,x.byteOffset,x.byteLength)),x instanceof Buffer&&(x=x.toString("base64")),{type:P.type,params:{args:x,deposit:N,gas:F,methodName:L}}});u.getPublicKeys=(A,P)=>p(void 0,void 0,void 0,function*(){const x=yield fetch(A,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:"dontcare",method:"query",params:{request_type:"view_access_key_list",finality:"final",account_id:P}}),headers:{"content-type":"application/json"}});return!1===x.ok?[]:(yield x.json()).result.keys});u.internalThrow=(A,P)=>{var x,N,F;if(A instanceof _.HereProviderError)throw A;const L={payload:A instanceof Error?A.message:"UNKNOWN",status:_.HereProviderStatus.FAILED,account_id:""};throw null===(x=P.onFailed)||void 0===x||x.call(P,L),null===(F=null===(N=P?.strategy)||void 0===N?void 0:N.onFailed)||void 0===F||F.call(N,L),A};u.isValidAccessKey=(A,P,x)=>{const{permission:N}=P.access_key;if("FullAccess"===N)return!0;if(N.FunctionCall){const{receiver_id:F,method_names:L}=N.FunctionCall;if(F===A&&L.includes("add_request_and_confirm"))return!0;if(F===x.receiverId)return 1===x.actions.length&&x.actions.every(z=>"FunctionCall"===z.type&&((!z.params.deposit||"0"===z.params.deposit.toString())&&(0===L.length||L.includes(z.params.methodName))))}return!1}},5238:function(re,u,g){"use strict";var p=this&&this.__awaiter||function(W,Y,G,Q){return new(G||(G=Promise))(function(J,H){function te(s){try{o(Q.next(s))}catch(d){H(d)}}function C(s){try{o(Q.throw(s))}catch(d){H(d)}}function o(s){s.done?J(s.value):function q(J){return J instanceof G?J:new G(function(H){H(J)})}(s.value).then(te,C)}o((Q=Q.apply(W,Y||[])).next())})},D=this&&this.__rest||function(W,Y){var G={};for(var Q in W)Object.prototype.hasOwnProperty.call(W,Q)&&Y.indexOf(Q)<0&&(G[Q]=W[Q]);if(null!=W&&"function"==typeof Object.getOwnPropertySymbols){var q=0;for(Q=Object.getOwnPropertySymbols(W);qnew F.WidgetStrategy),defaultProvider:J=x.proxyProvider}={}){this.authStorage=Q,this.defaultProvider=J,this.defaultStrategy=q;const H=new _.InMemorySigner(this.authStorage),te=new l.JsonRpcProvider({url:Y??`https://rpc.${G}.near.org`});this.connection=_.Connection.fromConfig({jsvmAccountId:`jsvm.${G}`,provider:te,networkId:G,signer:H})}get rpc(){return this.connection.provider}get signer(){return this.connection.signer}get networkId(){return this.connection.networkId}account(Y){return p(this,void 0,void 0,function*(){const G=Y??(yield this.authStorage.getActiveAccount(this.networkId));if(null==G)throw new z("Wallet not signed in");return new _.Account(this.connection,G)})}isSignedIn(){return p(this,void 0,void 0,function*(){return null!=(yield this.authStorage.getActiveAccount(this.networkId))})}signOut(){return p(this,void 0,void 0,function*(){const Y=yield this.authStorage.getActiveAccount(this.networkId);if(null==Y)throw new z("Wallet not signed in");const G=yield this.authStorage.getKey(this.networkId,Y);if(null!=G){const Q=G.getPublicKey().toString();yield this.silentSignAndSendTransaction({receiverId:Y,actions:[{type:"DeleteKey",params:{publicKey:Q}}]}).catch(()=>{})}yield this.authStorage.removeKey(this.networkId,Y)})}getHereBalance(Y){return p(this,void 0,void 0,function*(){const G=yield this.account(Y),Q="mainnet"===this.networkId?"here.storage.near":"here.storage.testnet",q=yield G.viewFunction({args:{account_id:G.accountId},methodName:"ft_balance_of",contractId:Q}).catch(()=>"0");return new M.default(q)})}getAvailableBalance(Y){return p(this,void 0,void 0,function*(){const Q=yield(yield this.account(Y)).getAccountBalance(),q=yield this.getHereBalance();return new M.default(Q.available).add(new M.default(q))})}getAccounts(){return p(this,void 0,void 0,function*(){return yield this.authStorage.getAccounts(this.networkId)})}getAccountId(){return p(this,void 0,void 0,function*(){const Y=yield this.authStorage.getActiveAccount(this.networkId);if(null==Y)throw new z("Wallet not signed in");return Y})}switchAccount(Y){return p(this,void 0,void 0,function*(){if(null==(yield this.authStorage.getKey(this.networkId,Y)))throw new Error(`Account ${Y} not signed in`);yield this.authStorage.setActiveAccount(this.networkId,Y)})}signIn(Y={}){var G,Q,q,J,H,{contractId:te,allowance:C,methodNames:o=[]}=Y,s=D(Y,["contractId","allowance","methodNames"]);return p(this,void 0,void 0,function*(){if(null==te){const{accountId:d}=yield this.authenticate(s);return yield this.authStorage.setKey(this.networkId,d,v.KeyPairEd25519.fromRandom()),yield this.authStorage.setActiveAccount(this.networkId,d),d}s.strategy=null!==(G=s.strategy)&&void 0!==G?G:this.defaultStrategy(),s.provider=null!==(Q=s.provider)&&void 0!==Q?Q:this.defaultProvider,null===(q=s.onInitialized)||void 0===q||q.call(s),null===(H=null===(J=s.strategy)||void 0===J?void 0:J.onInitialized)||void 0===H||H.call(J);try{const d=_.KeyPair.fromRandom("ed25519"),h={receiverId:te,methodNames:o,allowance:C},S=yield s.provider(Object.assign(Object.assign({},s),{request:{type:"call",network:this.networkId,transactions:[{actions:[{type:"AddKey",params:{publicKey:d.getPublicKey().toString(),accessKey:{permission:h}}}]}]}}));if(null==S.account_id)throw Error("Transaction is failed");return yield this.authStorage.setKey(this.networkId,S.account_id,d),yield this.authStorage.setActiveAccount(this.networkId,S.account_id),S.account_id}catch(d){throw(0,P.internalThrow)(d,s),d}})}silentSignAndSendTransaction({actions:Y,receiverId:G,signerId:Q}){return p(this,void 0,void 0,function*(){const q=yield this.account(Q),J=yield this.authStorage.getKey(this.networkId,q.accountId);if(null==J)throw new z;const H=J.getPublicKey(),te=yield q.getAccessKeys(),C={receiverId:G,actions:Y};if(!1===te.some(s=>s.public_key===H.toString()&&(0,P.isValidAccessKey)(q.accountId,s,C)))throw new z;return yield q.signAndSendTransaction({actions:Y.map(s=>(0,N.createAction)(s)),receiverId:G??q.accountId})})}signAndSendTransaction(Y){var G,Q,q,J,H,te,C,o;return p(this,void 0,void 0,function*(){const{signerId:s,receiverId:d,actions:h}=Y,k=D(Y,["signerId","receiverId","actions"]);k.strategy=null!==(G=k.strategy)&&void 0!==G?G:this.defaultStrategy(),k.provider=null!==(Q=k.provider)&&void 0!==Q?Q:this.defaultProvider,null===(q=k.onInitialized)||void 0===q||q.call(k),null===(H=null===(J=k.strategy)||void 0===J?void 0:J.onInitialized)||void 0===H||H.call(J);try{const B=yield this.silentSignAndSendTransaction({receiverId:d,actions:h,signerId:s}),I={status:A.HereProviderStatus.SUCCESS,payload:B?.transaction_outcome.id};return null===(te=k.onSuccess)||void 0===te||te.call(k,I),null===(o=null===(C=k.strategy)||void 0===C?void 0:C.onSuccess)||void 0===o||o.call(C,I),B}catch(B){try{if(!(B instanceof z)&&"NotEnoughAllowance"!==B?.type)throw(0,P.internalThrow)(B,k),B;const I=yield k.provider(Object.assign(Object.assign({},k),{request:{type:"call",transactions:[{actions:(0,P.serializeActions)(h),receiverId:d,signerId:s}],network:this.networkId}}));if(null==I.payload||null==I.account_id)throw Error("Transaction not found, but maybe executed");return yield this.rpc.txStatus(I.payload,I.account_id)}catch(I){throw(0,P.internalThrow)(I,k),I}}})}verifyMessageNEP0413(Y,G){return p(this,void 0,void 0,function*(){if(!(0,L.verifySignature)(Y,G))throw Error("Incorrect signature");if(!(yield(yield this.account(G.accountId)).getAccessKeys()).some(te=>!(te.public_key!==G.publicKey||"FullAccess"!==te.access_key.permission)))throw Error("Signer public key is not full access");return!0})}authenticate(Y={}){var G,Q,q;return p(this,void 0,void 0,function*(){const J={nonce:null!==(G=Y.nonce)&&void 0!==G?G:(0,b.randomBytes)(32),recipient:null!==(Q=Y.recipient)&&void 0!==Q?Q:window.location.host,message:null!==(q=Y.message)&&void 0!==q?q:"Authenticate"},H=yield this.signMessage(Object.assign(Object.assign({},J),Y));return yield this.verifyMessageNEP0413(J,H),H})}signMessage(Y){var G,Q,q,J,H;return p(this,void 0,void 0,function*(){if(Y.strategy=null!==(G=Y.strategy)&&void 0!==G?G:this.defaultStrategy(),Y.provider=null!==(Q=Y.provider)&&void 0!==Q?Q:this.defaultProvider,null===(q=Y.onInitialized)||void 0===q||q.call(Y),null===(H=null===(J=Y.strategy)||void 0===J?void 0:J.onInitialized)||void 0===H||H.call(J),"receiver"in Y)return yield this.legacySignMessage(Y);const te=yield Y.provider(Object.assign(Object.assign({},Y),{request:{type:"sign",message:Y.message,recipient:Y.recipient,nonce:Array.from(Y.nonce),network:this.networkId}}));if(null==te?.payload)throw Error("Signature not found");const{publicKey:C,signature:o,accountId:s}=JSON.parse(te.payload);return{publicKey:C,signature:o,accountId:s}})}legacySignMessage(Y){var G,{message:Q,receiver:q,nonce:J}=Y,H=D(Y,["message","receiver","nonce"]);return p(this,void 0,void 0,function*(){if(null==J){let C=new Uint8Array(32);J=[...crypto.getRandomValues(C)]}const te=yield null===(G=H.provider)||void 0===G?void 0:G.call(H,Object.assign(Object.assign({},H),{request:{type:"sign",message:Q,receiver:q,nonce:J,network:this.networkId}}));if(null==te?.payload)throw Error("Signature not found");try{const{publicKey:C,signature:o,accountId:s}=JSON.parse(te.payload),d=new Uint8Array(Buffer.from(o,"base64")),h=JSON.stringify({message:Q,receiver:q,nonce:J}),S=new Uint8Array(m.sha256.digest("NEP0413:"+h));if(!1===v.PublicKey.from(C).verify(S,d))throw Error();const I=yield(yield this.account(s)).getAccessKeys(),f=C.toString();if(!1===I.some(se=>!(se.public_key!==f||"FullAccess"!==se.access_key.permission)))throw Error();return{signature:new Uint8Array(Buffer.from(o,"base64")),publicKey:v.PublicKey.from(C),message:"NEP0413:"+h,receiver:q,accountId:s,nonce:J}}catch{throw Error("Signature not correct")}})}signAndSendTransactions(Y){var G,Q,q,J,H,te,C,o,{transactions:s}=Y,d=D(Y,["transactions"]);return p(this,void 0,void 0,function*(){d.strategy=null!==(G=d.strategy)&&void 0!==G?G:this.defaultStrategy(),d.provider=null!==(Q=d.provider)&&void 0!==Q?Q:this.defaultProvider,null===(q=d.onInitialized)||void 0===q||q.call(d),null===(H=null===(J=d.strategy)||void 0===J?void 0:J.onInitialized)||void 0===H||H.call(J);let h=[];try{for(const B of s){const I=yield this.silentSignAndSendTransaction(B);h.push(I)}const S=h.map(B=>B.transaction_outcome.id).join(","),k={status:A.HereProviderStatus.SUCCESS,payload:S};return null===(te=d.onSuccess)||void 0===te||te.call(d,k),null===(o=null===(C=d.strategy)||void 0===C?void 0:C.onSuccess)||void 0===o||o.call(C,k),h}catch(S){try{if(!(S instanceof z)&&"NotEnoughAllowance"!==S?.type)throw(0,P.internalThrow)(S,d),S;const k=s.slice(h.length),B=yield d.provider(Object.assign(Object.assign({},d),{request:{type:"call",transactions:k.map(f=>Object.assign(Object.assign({},f),{actions:(0,P.serializeActions)(f.actions)})),network:this.networkId}}));if(null==B.payload||null==B.account_id)throw Error("Transaction not found, but maybe executed");const I=B.payload.split(",").map(f=>this.rpc.txStatus(f,B.account_id));return yield Promise.all(I)}catch(k){throw(0,P.internalThrow)(k,d),k}}})}}},82945:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.THEME_SMALL_WINDOW_WIDTH_MAX=u.THEME_CONSTANT_BADGE_GREY_COLOR=u.THEME_CONSTANT_GREEN_COLOR=u.THEME_CONSTANT_RED_COLOR=u.THEME_CONSTANT_COLOR_DARK=u.THEME_CONSTANT_COLOR_BRAND=u.SIGN_POPUP_HEIGHT=u.SIGN_POPUP_WIDTH=void 0,u.SIGN_POPUP_WIDTH=390,u.SIGN_POPUP_HEIGHT=650,u.THEME_CONSTANT_COLOR_BRAND="#471be8",u.THEME_CONSTANT_COLOR_DARK="#101046",u.THEME_CONSTANT_RED_COLOR="#e25252",u.THEME_CONSTANT_GREEN_COLOR="#8bdaa1",u.THEME_CONSTANT_BADGE_GREY_COLOR="rgba(116,117,126,0.67)",u.THEME_SMALL_WINDOW_WIDTH_MAX=600},20534:(re,u)=>{"use strict";var D;Object.defineProperty(u,"__esModule",{value:!0}),u.ENearNetworkSuffix=u.ENearNetwork=void 0,(D=u.ENearNetwork||(u.ENearNetwork={})).localnet="localnet",D.testnet="testnet",D.betanet="betanet",D.mainnet="mainnet",function(D){D.testnet=".testnet",D.mainnet=".near"}(u.ENearNetworkSuffix||(u.ENearNetworkSuffix={}))},61483:(re,u)=>{"use strict";var g,w;Object.defineProperty(u,"__esModule",{value:!0}),u.getExternalActionErrorMessageForEndTag=u.EDappActionErrorTag=void 0,(w=g=u.EDappActionErrorTag||(u.EDappActionErrorTag={})).NEW_ACTION_STARTED="NEW_ACTION_STARTED",w.INCOMPLETE_ACTION="INCOMPLETE_ACTION",w.NO_ACCOUNTS="NO_ACCOUNTS",w.WINDOW_CLOSED="WINDOW_CLOSED",w.USER_CANCELLED="USER_CANCELLED",w.POPUP_WINDOW_REFUSED="POPUP_WINDOW_REFUSED",w.POPUP_WINDOW_OPEN_FAILED="POPUP_WINDOW_OPEN_FAILED";const p={[g.WINDOW_CLOSED]:"User closed the window",[g.INCOMPLETE_ACTION]:"User didn't complete the action",[g.NEW_ACTION_STARTED]:"A new action was started by the user, old action failed",[g.POPUP_WINDOW_OPEN_FAILED]:"Popup window failed to open",[g.POPUP_WINDOW_REFUSED]:"User refused to allow the popup window to open",[g.USER_CANCELLED]:"User cancelled the action",[g.NO_ACCOUNTS]:"No Meteor account found- try again after creating one"};u.getExternalActionErrorMessageForEndTag=function D(w){return p[w]??"An unknown error occurred"}},18788:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.EDappActionConnectionStatus=u.EDappActionSource=u.EMeteorInjectedFeature=u.EMeteorExtensionDirectActionType=u.EWalletExternalActionStatus=u.EWalletExternalAction_SignIn_AccessType=u.EMeteorWalletSignInType=u.EExternalActionType=u.MeteorActionError=void 0;const p=g(61483);class D extends Error{constructor(P,x){super(),null==P.message&&(P.message=(0,p.getExternalActionErrorMessageForEndTag)(P.endTags?.[P.endTags.length-1]??"unknown")),this._reason=P,this.message=P.message,this.name="MeteorActionError",this.cause=x}}var A;u.MeteorActionError=D,(A=u.EExternalActionType||(u.EExternalActionType={})).login="login",A.sign="sign",A.logout="logout",A.verify_owner="verify_owner",A.keypom_claim="keypom_claim",A.sign_message="sign_message",function(A){A.ALL_METHODS="ALL_METHODS",A.SELECTED_METHODS="SELECTED_METHODS",A.FULL_ACCESS="FULL_ACCESS"}(u.EMeteorWalletSignInType||(u.EMeteorWalletSignInType={})),function(A){A.FULL_ACCESS="fullAccess",A.LIMITED_ACCESS="limitedAccess"}(u.EWalletExternalAction_SignIn_AccessType||(u.EWalletExternalAction_SignIn_AccessType={})),function(A){A.UNCONFIRMED="UNCONFIRMED",A.PENDING="PENDING",A.SUCCESS="SUCCESS",A.FAILURE="FAILURE"}(u.EWalletExternalActionStatus||(u.EWalletExternalActionStatus={})),function(A){A.check_sync_status="check_sync_status",A.sync_accounts="sync_accounts",A.open_page="open_page"}(u.EMeteorExtensionDirectActionType||(u.EMeteorExtensionDirectActionType={})),function(A){A.open_page="open_page",A.batch_import="batch_import",A.sync_check="sync_check",A.account_sync="account_sync"}(u.EMeteorInjectedFeature||(u.EMeteorInjectedFeature={})),function(A){A.website_callback="wcb",A.website_post_message="wpm",A.website_visit="wv",A.extension_injected="ext"}(u.EDappActionSource||(u.EDappActionSource={})),function(A){A.initializing="initializing",A.connected="connected",A.attempting_reconnect="attempting_reconnect",A.disconnected="disconnected",A.closed_success="closed_success",A.closed_fail="closed_fail",A.closed_window="closed_window"}(u.EDappActionConnectionStatus||(u.EDappActionConnectionStatus={}))},74577:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.StringUtils=u.stringToConstantStyledString=u.convertToSlug=u.pad=u.createPadder=u.BetterStringArray=u.safeAppend=u.firstNotNullEmpty=u.nullEmpty=u.notNullEmpty=u.StringRegex=void 0,u.StringRegex={digitsRegex:/\b\d+\b/gi};u.notNullEmpty=o=>null!=o&&o.length>0;u.nullEmpty=o=>!(0,u.notNullEmpty)(o);u.firstNotNullEmpty=(...o)=>{for(const s of o)if((0,u.notNullEmpty)(s))return s};u.safeAppend=(o,s,d=null)=>(0,u.notNullEmpty)(o)?o+s:d??s;function v(o,s,d=!1){return h=>m(h,o,s,d)}function m(o,s,d,h=!1){const S=d-`${o}`.length;if(S>0){const k=new Array(S).fill(s);return h?`${o}${k.join("")}`:`${k.join("")}${o}`}return`${o}`}u.BetterStringArray=class l extends Array{pushIfNotNullEmpty(s){(0,u.notNullEmpty)(s)&&this.push(s)}},u.createPadder=v,u.pad=m;const b=new RegExp("\\s+","g"),M=new RegExp("--+","g"),E=new RegExp("^-+","g"),A=new RegExp("-+$","g"),P=new RegExp("-","g"),x=new RegExp("[^\\w\\-]+","g"),N=new RegExp("_","g");u.convertToSlug=(o,{slugDivider:s="-",letterCase:d="LOWER",normalize:h=!0,excludeCharacters:S=[]}={})=>{if(!o||0===o.length)return"";let k=o.toString();return h&&(k=k.normalize("NFD")),"LOWER"===d?k=k.toLowerCase():"UPPER"===d&&(k=k.toUpperCase()),k.replace(b,"-").replace(S.length>0?new RegExp(`[^\\w\\-${S.map(B=>function F(o){return o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(B)).join("")}]+`,"g"):x,"").replace(S.includes("_")?b:N,"-").replace(M,"-").replace(E,"").replace(A,"").replace(P,s)};u.stringToConstantStyledString=o=>(0,u.convertToSlug)(o,{normalize:!0,slugDivider:"_",letterCase:"UPPER"});function W(o){return(o=o||"")!==decodeURIComponent(o)}const H=(...o)=>o.filter(s=>s).map((s,d,h)=>{const S=0!==d,k=d!==h.length-1;return S&&(s=s.startsWith("/")?s.slice(1):s),k&&(s=s.endsWith("/")?s.slice(0,-1):s),s}).join("/");u.StringUtils={isUriEncoded:W,decodeUriFully:o=>{let s=0;for(;W(o);)if(s+=1,o=decodeURIComponent(o),s>20)throw new Error("String Utils: Decode URI Fully: Enacted while loop too many times with attempt to decode fully.");return o},StringRegex:u.StringRegex,reverse:o=>{let s="";for(const d of o)s=`${d}${s}`;return s},notNullEmpty:u.notNullEmpty,nullEmpty:u.nullEmpty,anyNullEmpty:o=>{for(const s of o)if((0,u.nullEmpty)(s))return!0;return!1},safeAppend:u.safeAppend,createPadder:v,pad:m,convertToSlug:u.convertToSlug,stringToConstantStyledString:u.stringToConstantStyledString,removeAndTrim:(o,s,{spaceAware:d=!0,insideWords:h=!1}={})=>{let S=`${o}`;for(const k of s)if(d)if(h){const B=[new RegExp(`\\s${k}\\s`,"g"),new RegExp(`\\s${k}`,"g"),new RegExp(`${k}\\s`,"g")];for(const I of B)I.test(S)&&(console.log(`Replacing "${I}" in "${S}"`),S=S.replace(I," "),console.log(`Text after: "${S}"`))}else S.indexOf(` ${k} `)>=0?S=S.replace(` ${k} `," "):(S.startsWith(`${k} `)&&(S=S.substring(k.length+1)),S.endsWith(` ${k}`)&&(S=S.substring(0,S.length-(k.length+1))));else S.indexOf(k)>=0&&(S=S.replace(k,""));return S.trim()},sortCompareStrings:function Q(o,s){const d=o.toLowerCase(),h=s.toLowerCase();return dh?1:0},comparePure:function q(o,s){return o>s?1:os.startsWith("http://")||s.startsWith("https://")?s:H(o,s),isHashId:o=>{const s=o.match(/^[a-zA-Z0-9]+$/);return Boolean(s)}}},18015:(re,u,g)=>{"use strict";var p=g(59344).default;Object.defineProperty(u,"__esModule",{value:!0}),u.EnvironmentStateAdapter_Sync=u.EnvironmentStateAdapter=void 0;u.EnvironmentStateAdapter=class D{constructor(l){this.implementation=l}setJson(l,v){var m=this;return p(function*(){yield m.implementation.setString(l,JSON.stringify(v))})()}getJson(l){var v=this;return p(function*(){const m=yield v.implementation.getString(l);if(null!=m&&"undefined"!==m&&"null"!==m)return JSON.parse(m)})()}setString(l,v){var m=this;return p(function*(){yield m.implementation.setString(l,v)})()}getString(l){var v=this;return p(function*(){const m=yield v.implementation.getString(l);if(null!=m)return m})()}createJsonGetterSetter(l){return{get:()=>this.getJson(l),set:v=>this.setJson(l,v)}}createStringGetterSetter(l){return{get:()=>this.getString(l),set:v=>this.setString(l,v)}}};u.EnvironmentStateAdapter_Sync=class w{constructor(l){this.implementation=l}setJson(l,v){this.implementation.setString(l,JSON.stringify(v))}getJson(l){const v=this.implementation.getString(l);if(null!=v&&"undefined"!==v&&"null"!==v)return JSON.parse(v)}setString(l,v){this.implementation.setString(l,v)}getString(l){const v=this.implementation.getString(l);if(null!=v)return v}clear(l){this.implementation.clear(l)}createJsonGetterSetter(l){return{get:()=>this.getJson(l),set:v=>this.setJson(l,v)}}createStringGetterSetter(l){return{get:()=>this.getString(l),set:v=>this.setString(l,v)}}}},15973:(re,u,g)=>{"use strict";var p=g(59344).default;Object.defineProperty(u,"__esModule",{value:!0}),u.ConnectedMeteorWalletAccount=u.MeteorWallet=void 0;const D=g(71836),w=g(38445),_=g(18788),l=g(21531),v=g(74577),m=g(18015),b=g(61445),M=g(34552),E=g(18223),A=g(29761),P=g(6213),x=g(98538),W=new m.EnvironmentStateAdapter_Sync({getString:q=>window.localStorage.getItem(q),setString:(q,J)=>window.localStorage.setItem(q,J),clear:q=>window.localStorage.removeItem(q)});new m.EnvironmentStateAdapter_Sync({getString:q=>window.sessionStorage.getItem(q),setString:(q,J)=>window.sessionStorage.setItem(q,J),clear:q=>window.sessionStorage.removeItem(q)});class G{static init({walletUrl:J,...H}){return p(function*(){const te=new D.keyStores.BrowserLocalStorageKeyStore,C=yield(0,D.connect)({keyStore:te,headers:{},walletUrl:(0,b.resolveWalletUrl)(H.networkId,J),...(0,b.getNetworkPreset)(H.networkId),...H}),o=new G({near:C,appKeyPrefix:"near_app"});return o.isSignedIn()||(yield te.clear()),o})()}constructor({near:J,appKeyPrefix:H=J.config.contractName??"default"}){this._initializationPromises=[],this._near=J;const te=H+"_meteor_wallet_auth_key";this._authDataKey=te,this._authData=W.getJson(te)??{allKeys:[]},this._networkId=J.config.networkId,this._walletBaseUrl=J.config.walletUrl,this._keyStore=J.connection.signer.keyStore}isExtensionInstalled(){return null!=window.meteorWallet}isSignedIn(){return!!this._authData.accountId}getAccountId(){return this._authData.accountId}verifyOwner(J){var H=this;return p(function*(){const te=J.accountId??H.getAccountId(),C=yield(0,M.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:_.EExternalActionType.verify_owner,inputs:{accountId:te,message:J.message},network:H._networkId});if(C.success)return C;throw new _.MeteorActionError({endTags:C.endTags,message:C.message})})()}requestSignIn(J){var H=this;return p(function*(){const{keyPair:te,...C}=J,o=te??D.KeyPair.fromRandom("ed25519");let s=o.getPublicKey().toString();const d=yield(0,M.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:_.EExternalActionType.login,inputs:{public_key:s,...C},network:H._networkId});if(d.success){const{allKeys:h,accountId:S}=d.payload;return H._authData={accountId:S,allKeys:h,signedInContract:{contract_id:C.contract_id,public_key:s}},W.setJson(H._authDataKey,H._authData),yield H._keyStore.setKey(H._networkId,S,o),{success:!0,endTags:[],payload:{accessKey:o,accountId:S}}}throw new _.MeteorActionError({endTags:d.endTags,message:d.message})})()}signOut(){var J=this;return p(function*(){const H=J.getAccountId();if(null!=J._authData.signedInContract&&null!=H){const te={accountId:H,contractInfo:J._authData.signedInContract};yield(0,M.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:_.EExternalActionType.logout,inputs:te,network:J._networkId})}J._authData={allKeys:[]},W.clear(J._authDataKey)})()}signMessage({message:J,nonce:H,recipient:te,callbackUrl:C,state:o,accountId:s}){var d=this;return p(function*(){const h=yield(0,M.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:_.EExternalActionType.sign_message,inputs:{message:J,nonce:H,recipient:te,callbackUrl:C,state:o,accountId:s},network:d._networkId});if(h.success)return h.payload.state=o,h;throw new _.MeteorActionError({endTags:h.endTags,message:h.message})})()}requestSignTransactions(J){var H=this;return p(function*(){const{transactions:te}=J,C=yield H.transformTransactions(te);console.log("Transformed transactions",C);const o=yield(0,M.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:_.EExternalActionType.sign,inputs:{transactions:C.map(s=>(0,l.serialize)(E.SCHEMA_V2,s)).map(s=>Buffer.from(s).toString("base64")).join(",")},network:H._networkId});if(o.success)return o.payload.executionOutcomes;throw new _.MeteorActionError({endTags:o.endTags,message:o.message})})()}account(){const J=this.getAccountId();return(0,v.notNullEmpty)(J)&&this._connectedAccount?.accountId!==J&&(this._connectedAccount=new Q(this,this._near.connection,J)),this._connectedAccount}transformTransactions(J){var H=this;return p(function*(){const te=H.account(),{networkId:C,signer:o,provider:s}=te.connection,d=yield o.getPublicKey(te.accountId,C);return Promise.all(J.map(function(){var h=p(function*(S,k){const B=yield te.accessKeyForTransaction(d);if(!B)throw new Error(`Failed to find matching key for transaction sent to ${S.receiverId}`);const I=S.actions.map(R=>(0,P.createAction)(R)),f=yield s.block({finality:"final"});return(0,w.createTransaction)(te.accountId,A.PublicKey.from(B.public_key),S.receiverId,new x.BN(B.access_key.nonce).add(new x.BN(k)).add(new x.BN(1)),I,D.utils.serialize.base_decode(f.header.hash))});return function(S,k){return h.apply(this,arguments)}}()))})()}}u.MeteorWallet=G;class Q extends D.Account{constructor(J,H,te){super(H,te),this.meteorWallet=J}signAndSendTransaction(...J){var H=this;return p(function*(){return"string"==typeof J[0]?H.signAndSendTransaction_direct({receiverId:J[0],actions:J[1]}):H.signAndSendTransaction_direct(J[0])})()}trySendOrCreateTransaction({receiverId:J,actions:H}){var te=()=>super.signAndSendTransaction,C=this;return p(function*(){const o=yield C.connection.signer.getPublicKey(C.accountId,C.connection.networkId);let s=yield C.accessKeyForTransaction(o);if(null!=s&&"FullAccess"!==s.access_key.permission&&!(yield C.accessKeyMatchesTransaction(s,J,H)))return{sent:!1,transaction:{receiverId:J,signerId:C.accountId,actions:H}};if(s&&o&&o.toString()===s.public_key)try{return{executionOutcome:yield te().call(C,{receiverId:J,actions:H.map(d=>(0,P.createAction)(d))}),sent:!0}}catch(d){if("NotEnoughAllowance"!==d.type)throw d}return{sent:!1,transaction:{receiverId:J,signerId:C.accountId,actions:H}}})()}signAndSendTransaction_direct({receiverId:J,actions:H}){var te=this;return p(function*(){const{transaction:C,sent:o,executionOutcome:s}=yield te.trySendOrCreateTransaction({receiverId:J,actions:H});return o?s:(yield te.meteorWallet.requestSignTransactions({transactions:[C]}))[0]})()}accessKeyMatchesTransaction(J,H,te){return p(function*(){const{access_key:{permission:C}}=J;if("FullAccess"===C)return!0;if(console.log("Comparing access key and actions",{accessKey:J,receiverId:H,actions:te}),C.FunctionCall){const{receiver_id:o,method_names:s}=C.FunctionCall;if(o===H&&s.includes("add_request_and_confirm"))return!0;if(o===H){if(1!==te.length)return!1;const d=te[0];if(console.log(d),"FunctionCall"===d.type){const h=d.params;return(!h.deposit||"0"===h.deposit.toString())&&(0===s.length||s.includes(h.methodName))}}}return!1})()}accessKeyForTransaction(J){var H=this;return p(function*(){const te=yield H.getAccessKeys();if(console.log("accessKeys",te),J){const o=te.find(s=>s.public_key.toString()===J.toString());if(o)return o}const C=H.meteorWallet._authData.allKeys;for(const o of te)if(-1!==C.indexOf(o.public_key))return o;for(const o of te)if("FullAccess"===o.access_key.permission)return o;return null})()}}u.ConnectedMeteorWalletAccount=Q},83635:(re,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.WALLET_URL_LOCALHOST_BASE=u.WALLET_URL_PRODUCTION_BASE=u.WALLET_URL_DEV_BASE=void 0,u.WALLET_URL_DEV_BASE="https://dev.wallet.meteorwallet.app",u.WALLET_URL_PRODUCTION_BASE="https://wallet.meteorwallet.app",u.WALLET_URL_LOCALHOST_BASE="https://localhost:3000"},85538:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.setEnvConfig=u.envConfig=void 0;const p=g(83635),D=typeof window<"u"?window.localStorage.getItem("DEV__METEOR_WALLET_BASE_URL"):void 0;u.envConfig={wallet_base_url:D??p.WALLET_URL_PRODUCTION_BASE},u.setEnvConfig=function w(_){Object.assign(u.envConfig,_)}},96831:function(re,u,g){"use strict";var p=this&&this.__createBinding||(Object.create?function(l,v,m,b){void 0===b&&(b=m);var M=Object.getOwnPropertyDescriptor(v,m);(!M||("get"in M?!v.__esModule:M.writable||M.configurable))&&(M={enumerable:!0,get:function(){return v[m]}}),Object.defineProperty(l,b,M)}:function(l,v,m,b){void 0===b&&(b=m),l[b]=v[m]}),D=this&&this.__exportStar||function(l,v){for(var m in l)"default"!==m&&!Object.prototype.hasOwnProperty.call(v,m)&&p(v,l,m)};Object.defineProperty(u,"__esModule",{value:!0}),u.setEnvConfig=u.ENearNetwork=void 0,D(g(15973),u),D(g(61445),u),D(g(83635),u),D(g(18788),u);var w=g(20534);Object.defineProperty(u,"ENearNetwork",{enumerable:!0,get:function(){return w.ENearNetwork}});var _=g(85538);Object.defineProperty(u,"setEnvConfig",{enumerable:!0,get:function(){return _.setEnvConfig}})},18223:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.SCHEMA_V2=void 0;const p=g(29761),D=g(38445);u.SCHEMA_V2=new Map([[D.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[D.SignedTransaction,{kind:"struct",fields:[["transaction",D.Transaction],["signature",D.Signature]]}],[D.Transaction,{kind:"struct",fields:[["signerId","string"],["publicKey",p.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[D.Action]]]}],[p.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[D.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",D.AccessKeyPermission]]}],[D.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",D.FunctionCallPermission],["fullAccess",D.FullAccessPermission]]}],[D.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[D.FullAccessPermission,{kind:"struct",fields:[]}],[D.Action,{kind:"enum",field:"enum",values:[["createAccount",D.CreateAccount],["deployContract",D.DeployContract],["functionCall",D.FunctionCall],["transfer",D.Transfer],["stake",D.Stake],["addKey",D.AddKey],["deleteKey",D.DeleteKey],["deleteAccount",D.DeleteAccount],["signedDelegate",D.SignedDelegate]]}],[D.CreateAccount,{kind:"struct",fields:[]}],[D.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[D.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[D.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[D.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",p.PublicKey]]}],[D.AddKey,{kind:"struct",fields:[["publicKey",p.PublicKey],["accessKey",D.AccessKey]]}],[D.DeleteKey,{kind:"struct",fields:[["publicKey",p.PublicKey]]}],[D.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[D.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[D.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",p.PublicKey]]}],[D.SignedDelegate,{kind:"struct",fields:[["delegateAction",D.DelegateAction],["signature",D.Signature]]}]])},34552:(re,u,g)=>{"use strict";var p=g(59344).default;Object.defineProperty(u,"__esModule",{value:!0}),u.getMeteorPostMessenger=void 0;const D=g(27184),w=g(85538),_=g(18788),l=g(63230),v=g(61483),m=g(82945);class b{constructor(N,F){const L=w.envConfig.wallet_base_url,z=new URL(L);if(this.walletOrigin=z.origin,null==window.meteorCom){this.comType=_.EDappActionSource.website_post_message,console.log("No extension found. Need to connect to web popup for Meteor communication");const j={source:_.EDappActionSource.website_post_message,connectionUid:N.uid},W=m.SIGN_POPUP_WIDTH,Y=m.SIGN_POPUP_HEIGHT,G=window.top.outerHeight/2+window.top.screenY-Y/2,Q=window.top.outerWidth/2+window.top.screenX-W/2,q=window.open(`${L}/connect/${N.network}/${N.actionType}?${(0,l.stringify)(j)}`,"_blank",`popup=1,width=${W},height=${Y},top=${G},left=${Q}`);if(null==q)throw new _.MeteorActionError({message:"Couldn't open popup window to complete wallet action",endTags:[v.EDappActionErrorTag.POPUP_WINDOW_OPEN_FAILED]});this.websiteWindow=q,window.addEventListener("message",J=>F(J.data)),this.wasOpened=!1}else this.comType=_.EDappActionSource.extension_injected,this.wasOpened=!0,window.meteorCom.addMessageDataListener(F)}focus(){this.comType===_.EDappActionSource.website_post_message&&this.websiteWindow?.focus()}sendMessage(N){this.comType===_.EDappActionSource.website_post_message?this.websiteWindow?.postMessage(N,this.walletOrigin):window.meteorCom?.sendMessageData(N)}isWindowClosed(){return this.comType===_.EDappActionSource.website_post_message&&(this.websiteWindow?.closed??!0)}hasActiveWindow(){return this.comType!==_.EDappActionSource.website_post_message||null!=this.websiteWindow}close(){this.comType===_.EDappActionSource.website_post_message&&delete this.websiteWindow}}class E{constructor(){this.connections=[];const N=w.envConfig.wallet_base_url,F=new URL(N);this.baseWalletUrl=N,this.walletOrigin=F.origin,this.listener=L=>{if(null!=L){const z=this.connections.find(j=>j.uid===L.uid);null!=z&&(this.updateConnection(z.uid,{lastConnection:Date.now()}),L.status===_.EDappActionConnectionStatus.attempting_reconnect&&(this.updateConnection(z.uid,{status:_.EDappActionConnectionStatus.initializing}),this.sendComs()),L.status===_.EDappActionConnectionStatus.connected&&z.status===_.EDappActionConnectionStatus.initializing&&this.updateConnection(z.uid,{status:_.EDappActionConnectionStatus.connected}),L.status===_.EDappActionConnectionStatus.closed_success&&(z.resolve({success:!0,endTags:[],payload:L.payload}),this.updateConnection(z.uid,{status:_.EDappActionConnectionStatus.closed_success}),this.sendComs()),L.status===_.EDappActionConnectionStatus.closed_fail&&(this.updateConnection(z.uid,{status:_.EDappActionConnectionStatus.closed_fail}),this.sendComs(),z.reject(new _.MeteorActionError({endTags:L.endTags}))),L.status===_.EDappActionConnectionStatus.closed_window&&(this.updateConnection(z.uid,{status:_.EDappActionConnectionStatus.closed_window}),z.reject(new _.MeteorActionError({endTags:L.endTags,message:"User closed the window"}))),[_.EDappActionConnectionStatus.disconnected,_.EDappActionConnectionStatus.closed_fail,_.EDappActionConnectionStatus.closed_window,_.EDappActionConnectionStatus.closed_success].includes(L.status)&&this.removeConnection(z.uid))}}}removeConnection(N){this.connections=this.connections.filter(F=>F.uid!==N),0===this.connections.length&&(delete this.comWindow,clearInterval(this.comInterval),delete this.comInterval)}updateConnection(N,F){this.connections=this.connections.map(L=>L.uid===N?{...L,...F,uid:L.uid}:L)}sendComs(){if(this.comWindow?.hasActiveWindow()&&this.connections.length>0)if(null==this.comInterval&&(this.comInterval=setInterval(()=>this.sendComs(),450)),this.comWindow.isWindowClosed())if(this.comWindow.wasOpened){for(const N of this.connections)N.reject(new _.MeteorActionError({message:"User closed the window before completing the action",endTags:[v.EDappActionErrorTag.INCOMPLETE_ACTION,v.EDappActionErrorTag.WINDOW_CLOSED]}));this.connections=[],this.comWindow.close()}else console.log("Window is closed, need to allow popup");else{this.comWindow.wasOpened=!0;for(const{network:N,actionType:F,endTags:L,status:z,inputs:j,uid:W}of this.connections){const Y={endTags:L,actionType:F,status:z,uid:W,network:N};z===_.EDappActionConnectionStatus.initializing&&(Y.inputs=j),this.comWindow.sendMessage(Y)}}else clearInterval(this.comInterval),delete this.comInterval}addAndStartConnection(N){if(this.connections.length>0)for(const F of this.connections)F.status=_.EDappActionConnectionStatus.disconnected,F.endTags=[v.EDappActionErrorTag.NEW_ACTION_STARTED];this.connections.push(N),null!=this.comWindow&&this.comWindow.hasActiveWindow()?this.comWindow.focus():this.comWindow=new b(N,this.listener),this.sendComs()}connectAndWaitForResponse({actionType:N,network:F,inputs:L}){var z=this;return p(function*(){let j={uid:(0,D.nanoid)(),actionType:N,lastAttemptedConnection:0,lastConnection:0,status:_.EDappActionConnectionStatus.initializing,promise:void 0,reject:void 0,resolve:void 0,currentPayload:{},inputs:L,network:F,endTags:[]};const W=new Promise((Y,G)=>{j.resolve=Y,j.reject=Q=>{z.connections=z.connections.filter(q=>q.uid!==j.uid),G(Q)}});return j.promise=W,z.addAndStartConnection(j),yield W})()}}let A;u.getMeteorPostMessenger=function P(){return null==A&&(A=new E),A}},61445:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.getNetworkPreset=u.resolveWalletUrl=void 0;const p=g(85538);u.resolveWalletUrl=(_,l)=>{if(l)return l;const v=p.envConfig.wallet_base_url;switch(_){case"mainnet":return`${v}/connect/mainnet`;case"testnet":return`${v}/connect/testnet`;case"betanet":return`${v}/connect/betanet`;default:throw new Error("Invalid wallet URL")}};u.getNetworkPreset=_=>{switch(_){case"mainnet":return{networkId:_,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://explorer.near.org"};case"testnet":return{networkId:_,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://explorer.testnet.near.org"};case"betanet":return{networkId:_,nodeUrl:"https://rpc.betanet.near.org",helperUrl:"https://helper.betanet.near.org",explorerUrl:"https://explorer.betanet.near.org"};default:throw Error(`Failed to find config for: '${_}'`)}}},6213:(re,u,g)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.createAction=u.parseArgs=void 0;const p=g(98538),D=g(38445),w=g(29761);u.parseArgs=m=>"string"==typeof m?Buffer.from(m,"base64"):m;u.createAction=m=>{switch(m.type){case"CreateAccount":return D.actionCreators.createAccount();case"DeployContract":{const{code:b}=m.params;return D.actionCreators.deployContract(b)}case"FunctionCall":{const{methodName:b,args:M,gas:E,deposit:A}=m.params;return D.actionCreators.functionCall(b,(0,u.parseArgs)(M),new p.BN(E),new p.BN(A))}case"Transfer":{const{deposit:b}=m.params;return D.actionCreators.transfer(new p.BN(b))}case"Stake":{const{stake:b,publicKey:M}=m.params;return D.actionCreators.stake(new p.BN(b),w.PublicKey.from(M))}case"AddKey":{const{publicKey:b,accessKey:M}=m.params;return D.actionCreators.addKey(w.PublicKey.from(b),(m=>{if("FullAccess"===m)return D.actionCreators.fullAccessKey();const{receiverId:b,methodNames:M=[]}=m,E=m.allowance?new p.BN(m.allowance):void 0;return D.actionCreators.functionCallAccessKey(b,M,E)})(M.permission))}case"DeleteKey":{const{publicKey:b}=m.params;return D.actionCreators.deleteKey(w.PublicKey.from(b))}case"DeleteAccount":{const{beneficiaryId:b}=m.params;return D.actionCreators.deleteAccount(b)}default:throw new Error("Invalid action type")}}},87029:re=>{"use strict";var u=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g=typeof globalThis>"u"?global:globalThis;re.exports=function(){for(var D=[],w=0;w{"use strict";const p=g(18958);re.exports=l;const D=function Q(){function q(J){return typeof J<"u"&&J}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return q(self)||q(window)||q(this)||{}}}().console||{},w={mapHttpRequest:F,mapHttpResponse:F,wrapRequestSerializer:L,wrapResponseSerializer:L,wrapErrorSerializer:L,req:F,res:F,err:function x(q){const J={type:q.constructor.name,msg:q.message,stack:q.stack};for(const H in q)void 0===J[H]&&(J[H]=q[H]);return J}};function l(q){(q=q||{}).browser=q.browser||{};const J=q.browser.transmit;if(J&&"function"!=typeof J.send)throw Error("pino: transmit option must have a send function");const H=q.browser.write||D;q.browser.write&&(q.browser.asObject=!0);const te=q.serializers||{},C=function _(q,J){return Array.isArray(q)?q.filter(function(te){return"!stdSerializers.err"!==te}):!0===q&&Object.keys(J)}(q.browser.serialize,te);let o=q.browser.serialize;Array.isArray(q.browser.serialize)&&q.browser.serialize.indexOf("!stdSerializers.err")>-1&&(o=!1);"function"==typeof H&&(H.error=H.fatal=H.warn=H.info=H.debug=H.trace=H),!1===q.enabled&&(q.level="silent");const d=q.level||"info",h=Object.create(H);h.log||(h.log=z),Object.defineProperty(h,"levelVal",{get:function k(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(h,"level",{get:function B(){return this._level},set:function I(R){if("silent"!==R&&!this.levels.values[R])throw Error("unknown level "+R);this._level=R,v(S,h,"error","log"),v(S,h,"fatal","error"),v(S,h,"warn","error"),v(S,h,"info","log"),v(S,h,"debug","log"),v(S,h,"trace","log")}});const S={transmit:J,serialize:C,asObject:q.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:N(q)};return h.levels=l.levels,h.level=d,h.setMaxListeners=h.getMaxListeners=h.emit=h.addListener=h.on=h.prependListener=h.once=h.prependOnceListener=h.removeListener=h.removeAllListeners=h.listeners=h.listenerCount=h.eventNames=h.write=h.flush=z,h.serializers=te,h._serialize=C,h._stdErrSerialize=o,h.child=function f(R,se){if(!R)throw new Error("missing bindings for child Pino");se=se||{},C&&R.serializers&&(se.serializers=R.serializers);const ee=se.serializers;if(C&&ee){var oe=Object.assign({},te,ee),de=!0===q.browser.serialize?Object.keys(oe):C;delete R.serializers,M([R],de,oe,this._stdErrSerialize)}function Ce(ye){this._childLevel=1+(0|ye._childLevel),this.error=E(ye,R,"error"),this.fatal=E(ye,R,"fatal"),this.warn=E(ye,R,"warn"),this.info=E(ye,R,"info"),this.debug=E(ye,R,"debug"),this.trace=E(ye,R,"trace"),oe&&(this.serializers=oe,this._serialize=de),J&&(this._logEvent=P([].concat(ye._logEvent.bindings,R)))}return Ce.prototype=this,new Ce(this)},J&&(h._logEvent=P()),h}function v(q,J,H,te){const C=Object.getPrototypeOf(J);J[H]=J.levelVal>J.levels.values[H]?z:C[H]?C[H]:D[H]||D[te]||z,function m(q,J,H){!q.transmit&&J[H]===z||(J[H]=function(te){return function(){const o=q.timestamp(),s=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===D?D:this;for(var h=0;h-1&&o in H&&(q[C][o]=H[o](q[C][o]))}function E(q,J,H){return function(){const te=new Array(1+arguments.length);te[0]=J;for(var C=1;C{"use strict";function p(w,_,l,v,m,b,M){try{var E=w[b](M),A=E.value}catch(P){return void l(P)}E.done?_(A):Promise.resolve(A).then(v,m)}function D(w){return function(){var _=this,l=arguments;return new Promise(function(v,m){var b=w.apply(_,l);function M(A){p(b,v,m,M,E,"next",A)}function E(A){p(b,v,m,M,E,"throw",A)}M(void 0)})}}g.d(u,{Z:()=>D})},27184:(re,u,g)=>{"use strict";g.r(u),g.d(u,{customAlphabet:()=>_,customRandom:()=>w,nanoid:()=>l,random:()=>D,urlAlphabet:()=>p});let p="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",D=v=>crypto.getRandomValues(new Uint8Array(v)),w=(v,m,b)=>{let M=(2<{let P="";for(;;){let x=b(E),N=E;for(;N--;)if(P+=v[x[N]&M]||"",P.length===A)return P}}},_=(v,m=21)=>w(v,m,D),l=(v=21)=>crypto.getRandomValues(new Uint8Array(v)).reduce((m,b)=>m+=(b&=63)<36?b.toString(36):b<62?(b-26).toString(36).toUpperCase():b>62?"-":"_","")},36953:(re,u,g)=>{"use strict";g.d(u,{t0:()=>oe,zv:()=>k,uA:()=>f,uc:()=>at,jb:()=>Re,zb:()=>se,AV:()=>S,Ic:()=>ft,Vs:()=>wn});var p=g(49671);Symbol();const w=Symbol();const m=Object.getPrototypeOf,b=new WeakMap,M=ze=>ze&&(b.has(ze)?b.get(ze):m(ze)===Object.prototype||m(ze)===Array.prototype),z=(ze,Qe=!0)=>{b.set(ze,Qe)},Y=ze=>"object"==typeof ze&&null!==ze,G=new WeakMap,Q=new WeakSet,[J]=((ze=Object.is,Qe=((ut,wt)=>new Proxy(ut,wt)),Ht=(ut=>Y(ut)&&!Q.has(ut)&&(Array.isArray(ut)||!(Symbol.iterator in ut))&&!(ut instanceof WeakMap)&&!(ut instanceof WeakSet)&&!(ut instanceof Error)&&!(ut instanceof Number)&&!(ut instanceof Date)&&!(ut instanceof String)&&!(ut instanceof RegExp)&&!(ut instanceof ArrayBuffer)),pt=(ut=>{switch(ut.status){case"fulfilled":return ut.value;case"rejected":throw ut.reason;default:throw ut}}),vt=new WeakMap,$t=((ut,wt,Sn=pt)=>{const yt=vt.get(ut);if(yt?.[0]===wt)return yt[1];const Et=Array.isArray(ut)?[]:Object.create(Object.getPrototypeOf(ut));return z(Et,!0),vt.set(ut,[wt,Et]),Reflect.ownKeys(ut).forEach(_e=>{if(Object.getOwnPropertyDescriptor(Et,_e))return;const Ee=Reflect.get(ut,_e),Me={value:Ee,enumerable:!0,configurable:!0};if(Q.has(Ee))z(Ee,!1);else if(Ee instanceof Promise)delete Me.value,Me.get=()=>Sn(Ee);else if(G.has(Ee)){const[me,Oe]=G.get(Ee);Me.value=$t(me,Oe(),Sn)}Object.defineProperty(Et,_e,Me)}),Object.preventExtensions(Et)}),dt=new WeakMap,gt=[1,1],mn=(ut=>{if(!Y(ut))throw new Error("object required");const wt=dt.get(ut);if(wt)return wt;let Sn=gt[0];const yt=new Set,Et=(kt,Ot=++gt[0])=>{Sn!==Ot&&(Sn=Ot,yt.forEach(Pt=>Pt(kt,Ot)))};let _e=gt[1];const Me=kt=>(Ot,Pt)=>{const Lt=[...Ot];Lt[1]=[kt,...Lt[1]],Et(Lt,Pt)},me=new Map,Ke=kt=>{var Ot;const Pt=me.get(kt);Pt&&(me.delete(kt),null==(Ot=Pt[1])||Ot.call(Pt))},Ye=Array.isArray(ut)?[]:Object.create(Object.getPrototypeOf(ut)),Bt=Qe(Ye,{deleteProperty(kt,Ot){const Pt=Reflect.get(kt,Ot);Ke(Ot);const Lt=Reflect.deleteProperty(kt,Ot);return Lt&&Et(["delete",[Ot],Pt]),Lt},set(kt,Ot,Pt,Lt){const nn=Reflect.has(kt,Ot),Yt=Reflect.get(kt,Ot,Lt);if(nn&&(ze(Yt,Pt)||dt.has(Pt)&&ze(Yt,dt.get(Pt))))return!0;Ke(Ot),Y(Pt)&&(Pt=(ze=>M(ze)&&ze[w]||null)(Pt)||Pt);let gn=Pt;if(Pt instanceof Promise)Pt.then(an=>{Pt.status="fulfilled",Pt.value=an,Et(["resolve",[Ot],an])}).catch(an=>{Pt.status="rejected",Pt.reason=an,Et(["reject",[Ot],an])});else{!G.has(Pt)&&Ht(Pt)&&(gn=mn(Pt));const an=!Q.has(gn)&&G.get(gn);an&&((kt,Ot)=>{if(me.has(kt))throw new Error("prop listener already exists");if(yt.size){const Pt=Ot[3](Me(kt));me.set(kt,[Ot,Pt])}else me.set(kt,[Ot])})(Ot,an)}return Reflect.set(kt,Ot,gn,Lt),Et(["set",[Ot],Pt,Yt]),!0}});dt.set(ut,Bt);const Ct=[Ye,(kt=++gt[1])=>(_e!==kt&&!yt.size&&(_e=kt,me.forEach(([Ot])=>{const Pt=Ot[1](kt);Pt>Sn&&(Sn=Pt)})),Sn),$t,kt=>(yt.add(kt),1===yt.size&&me.forEach(([Pt,Lt],nn)=>{if(Lt)throw new Error("remove already exists");const Yt=Pt[3](Me(nn));me.set(nn,[Pt,Yt])}),()=>{yt.delete(kt),0===yt.size&&me.forEach(([Pt,Lt],nn)=>{Lt&&(Lt(),me.set(nn,[Pt]))})})];return G.set(Bt,Ct),Reflect.ownKeys(ut).forEach(kt=>{const Ot=Object.getOwnPropertyDescriptor(ut,kt);"value"in Ot&&(Bt[kt]=ut[kt],delete Ot.value,delete Ot.writable),Object.defineProperty(Ye,kt,Ot)}),Bt}))=>[mn,G,Q,ze,Qe,Ht,pt,vt,$t,dt,gt])();function H(ze={}){return J(ze)}function C(ze,Qe,Ht){const pt=G.get(ze);let vt;pt||console.warn("Please use proxy object");const $t=[],dt=pt[3];let gt=!1;const ut=dt(wt=>{$t.push(wt),Ht?Qe($t.splice(0)):vt||(vt=Promise.resolve().then(()=>{vt=void 0,gt&&Qe($t.splice(0))}))});return gt=!0,()=>{gt=!1,ut()}}const h=H({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),S={state:h,subscribe:ze=>C(h,()=>ze(h)),push(ze,Qe){ze!==h.view&&(h.view=ze,Qe&&(h.data=Qe),h.history.push(ze))},reset(ze){h.view=ze,h.history=[ze]},replace(ze){h.history.length>1&&(h.history[h.history.length-1]=ze,h.view=ze)},goBack(){if(h.history.length>1){h.history.pop();const[ze]=h.history.slice(-1);h.view=ze}},setData(ze){h.data=ze}},k={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>k.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const ze=navigator.userAgent.toLowerCase();return k.isMobile()&&(ze.includes("iphone")||ze.includes("ipad"))},isHttpUrl:ze=>ze.startsWith("http://")||ze.startsWith("https://"),isArray:ze=>Array.isArray(ze)&&ze.length>0,formatNativeUrl(ze,Qe,Ht){if(k.isHttpUrl(ze))return this.formatUniversalUrl(ze,Qe,Ht);let pt=ze;pt.includes("://")||(pt=ze.replaceAll("/","").replaceAll(":",""),pt=`${pt}://`),pt.endsWith("/")||(pt=`${pt}/`),this.setWalletConnectDeepLink(pt,Ht);return`${pt}wc?uri=${encodeURIComponent(Qe)}`},formatUniversalUrl(ze,Qe,Ht){if(!k.isHttpUrl(ze))return this.formatNativeUrl(ze,Qe,Ht);let pt=ze;pt.endsWith("/")||(pt=`${pt}/`),this.setWalletConnectDeepLink(pt,Ht);return`${pt}wc?uri=${encodeURIComponent(Qe)}`},wait:ze=>(0,p.Z)(function*(){return new Promise(Qe=>{setTimeout(Qe,ze)})})(),openHref(ze,Qe){window.open(ze,Qe,"noreferrer noopener")},setWalletConnectDeepLink(ze,Qe){try{localStorage.setItem(k.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:ze,name:Qe}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(ze){try{const[Qe]=ze.split("?");localStorage.setItem(k.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:Qe,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(k.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(k.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var ze;const Qe=null==(ze=S.state.data)?void 0:ze.Wallet;if(!Qe)throw new Error('Missing "Wallet" view data');return Qe}},I=H({enabled:typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),f={state:I,subscribe:ze=>C(I.events,()=>ze(function o(ze,Qe){const Ht=G.get(ze);Ht||console.warn("Please use proxy object");const[pt,vt,$t]=Ht;return $t(pt,vt(),Qe)}(I.events[I.events.length-1]))),initialize(){I.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(I.userSessionId=crypto.randomUUID())},setConnectedWalletId(ze){I.connectedWalletId=ze},click(ze){if(I.enabled){const Qe={type:"CLICK",name:ze.name,userSessionId:I.userSessionId,timestamp:Date.now(),data:ze};I.events.push(Qe)}},track(ze){if(I.enabled){const Qe={type:"TRACK",name:ze.name,userSessionId:I.userSessionId,timestamp:Date.now(),data:ze};I.events.push(Qe)}},view(ze){if(I.enabled){const Qe={type:"VIEW",name:ze.name,userSessionId:I.userSessionId,timestamp:Date.now(),data:ze};I.events.push(Qe)}}},R=H({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),se={state:R,subscribe:ze=>C(R,()=>ze(R)),setChains(ze){R.chains=ze},setWalletConnectUri(ze){R.walletConnectUri=ze},setIsCustomDesktop(ze){R.isCustomDesktop=ze},setIsCustomMobile(ze){R.isCustomMobile=ze},setIsDataLoaded(ze){R.isDataLoaded=ze},setIsUiLoaded(ze){R.isUiLoaded=ze},setIsAuth(ze){R.isAuth=ze}},ee=H({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),oe={state:ee,subscribe:ze=>C(ee,()=>ze(ee)),setConfig(ze){var Qe,Ht;f.initialize(),se.setChains(ze.chains),se.setIsAuth(Boolean(ze.enableAuthMode)),se.setIsCustomMobile(Boolean(null==(Qe=ze.mobileWallets)?void 0:Qe.length)),se.setIsCustomDesktop(Boolean(null==(Ht=ze.desktopWallets)?void 0:Ht.length)),k.setModalVersionInStorage(),Object.assign(ee,ze)}};var de=Object.defineProperty,Ce=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ae=(ze,Qe,Ht)=>Qe in ze?de(ze,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):ze[Qe]=Ht,fe=(ze,Qe)=>{for(var Ht in Qe||(Qe={}))ye.call(Qe,Ht)&&ae(ze,Ht,Qe[Ht]);if(Ce)for(var Ht of Ce(Qe))ve.call(Qe,Ht)&&ae(ze,Ht,Qe[Ht]);return ze};const pe="https://explorer-api.walletconnect.com",Se="wcm",ce="js-2.6.2";function be(ze,Qe){return Pe.apply(this,arguments)}function Pe(){return(Pe=(0,p.Z)(function*(ze,Qe){const Ht=fe({sdkType:Se,sdkVersion:ce},Qe),pt=new URL(ze,pe);return pt.searchParams.append("projectId",oe.state.projectId),Object.entries(Ht).forEach(([vt,$t])=>{$t&&pt.searchParams.append(vt,String($t))}),(yield fetch(pt)).json()})).apply(this,arguments)}const Fe={getDesktopListings:ze=>(0,p.Z)(function*(){return be("/w3m/v1/getDesktopListings",ze)})(),getMobileListings:ze=>(0,p.Z)(function*(){return be("/w3m/v1/getMobileListings",ze)})(),getInjectedListings:ze=>(0,p.Z)(function*(){return be("/w3m/v1/getInjectedListings",ze)})(),getAllListings:ze=>(0,p.Z)(function*(){return be("/w3m/v1/getAllListings",ze)})(),getWalletImageUrl:ze=>`${pe}/w3m/v1/getWalletImage/${ze}?projectId=${oe.state.projectId}&sdkType=${Se}&sdkVersion=${ce}`,getAssetImageUrl:ze=>`${pe}/w3m/v1/getAssetImage/${ze}?projectId=${oe.state.projectId}&sdkType=${Se}&sdkVersion=${ce}`};var lt=Object.defineProperty,Ge=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,tt=(ze,Qe,Ht)=>Qe in ze?lt(ze,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):ze[Qe]=Ht;const Vt=k.isMobile(),ot=H({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),at={state:ot,getRecomendedWallets:()=>(0,p.Z)(function*(){const{explorerRecommendedWalletIds:ze,explorerExcludedWalletIds:Qe}=oe.state;if("NONE"===ze||"ALL"===Qe&&!ze)return ot.recomendedWallets;if(k.isArray(ze)){const Ht={recommendedIds:ze.join(",")},{listings:pt}=yield Fe.getAllListings(Ht),vt=Object.values(pt);vt.sort(($t,dt)=>ze.indexOf($t.id)-ze.indexOf(dt.id)),ot.recomendedWallets=vt}else{const{chains:Ht,isAuth:pt}=se.state,vt=Ht?.join(","),$t=k.isArray(Qe),dt={page:1,sdks:pt?"auth_v1":void 0,entries:k.RECOMMENDED_WALLET_AMOUNT,chains:vt,version:2,excludedIds:$t?Qe.join(","):void 0},{listings:gt}=Vt?yield Fe.getMobileListings(dt):yield Fe.getDesktopListings(dt);ot.recomendedWallets=Object.values(gt)}return ot.recomendedWallets})(),getWallets:ze=>(0,p.Z)(function*(){const Qe=((ze,Qe)=>{for(var Ht in Qe||(Qe={}))He.call(Qe,Ht)&&tt(ze,Ht,Qe[Ht]);if(Ge)for(var Ht of Ge(Qe))Kt.call(Qe,Ht)&&tt(ze,Ht,Qe[Ht]);return ze})({},ze),{explorerRecommendedWalletIds:Ht,explorerExcludedWalletIds:pt}=oe.state,{recomendedWallets:vt}=ot;if("ALL"===pt)return ot.wallets;vt.length?Qe.excludedIds=vt.map(Sn=>Sn.id).join(","):k.isArray(Ht)&&(Qe.excludedIds=Ht.join(",")),k.isArray(pt)&&(Qe.excludedIds=[Qe.excludedIds,pt].filter(Boolean).join(",")),se.state.isAuth&&(Qe.sdks="auth_v1");const{page:$t,search:dt}=ze,{listings:gt,total:mn}=Vt?yield Fe.getMobileListings(Qe):yield Fe.getDesktopListings(Qe),ut=Object.values(gt),wt=dt?"search":"wallets";return ot[wt]={listings:[...ot[wt].listings,...ut],total:mn,page:$t??1},{listings:ut,total:mn}})(),getWalletImageUrl:ze=>Fe.getWalletImageUrl(ze),getAssetImageUrl:ze=>Fe.getAssetImageUrl(ze),resetSearch(){ot.search={listings:[],total:0,page:1}}},Gt=H({open:!1}),Re={state:Gt,subscribe:ze=>C(Gt,()=>ze(Gt)),open:ze=>(0,p.Z)(function*(){return new Promise(Qe=>{const{isUiLoaded:Ht,isDataLoaded:pt}=se.state;if(k.removeWalletConnectDeepLink(),se.setWalletConnectUri(ze?.uri),se.setChains(ze?.chains),S.reset("ConnectWallet"),Ht&&pt)Gt.open=!0,Qe();else{const vt=setInterval(()=>{const $t=se.state;$t.isUiLoaded&&$t.isDataLoaded&&(clearInterval(vt),Gt.open=!0,Qe())},200)}})})(),close(){Gt.open=!1}};var Ae=Object.defineProperty,Te=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,mt=(ze,Qe,Ht)=>Qe in ze?Ae(ze,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):ze[Qe]=Ht;const hn=H({themeMode:function ct(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}()?"dark":"light"}),ft={state:hn,subscribe:ze=>C(hn,()=>ze(hn)),setThemeConfig(ze){const{themeMode:Qe,themeVariables:Ht}=ze;Qe&&(hn.themeMode=Qe),Ht&&(hn.themeVariables=((ze,Qe)=>{for(var Ht in Qe||(Qe={}))Be.call(Qe,Ht)&&mt(ze,Ht,Qe[Ht]);if(Te)for(var Ht of Te(Qe))Ve.call(Qe,Ht)&&mt(ze,Ht,Qe[Ht]);return ze})({},Ht))}},At=H({open:!1,message:"",variant:"success"}),wn={state:At,subscribe:ze=>C(At,()=>ze(At)),openToast(ze,Qe){At.open=!0,At.message=ze,At.variant=Qe},closeToast(){At.open=!1}}},62949:(re,u,g)=>{"use strict";function p(L,z,j){return z<=L&&L<=j}function D(L){if(void 0===L)return{};if(L===Object(L))return L;throw TypeError("Could not convert argument to dictionary")}g.r(u),g.d(u,{TextDecoder:()=>P,TextEncoder:()=>x});var l=-1;function v(L){this.tokens=[].slice.call(L)}v.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():l},prepend:function(L){if(Array.isArray(L))for(var z=L;z.length;)this.tokens.unshift(z.pop());else this.tokens.unshift(L)},push:function(L){if(Array.isArray(L))for(var z=L;z.length;)this.tokens.push(z.shift());else this.tokens.push(L)}};var m=-1;function b(L,z){if(L)throw TypeError("Decoder error");return z||65533}(function M(){}).prototype={handler:function(L,z){}},function E(){}.prototype={handler:function(L,z){}};var A="utf-8";function P(L,z){if(!(this instanceof P))return new P(L,z);if((L=void 0!==L?String(L).toLowerCase():A)!==A)throw new Error("Encoding not supported. Only utf-8 is supported");z=D(z),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(z.fatal),this._ignoreBOM=Boolean(z.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function x(L,z){if(!(this instanceof x))return new x(L,z);if((L=void 0!==L?String(L).toLowerCase():A)!==A)throw new Error("Encoding not supported. Only utf-8 is supported");z=D(z),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(z.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function N(L){var z=L.fatal,j=0,W=0,Y=0,G=128,Q=191;this.handler=function(q,J){if(J===l&&0!==Y)return Y=0,b(z);if(J===l)return m;if(0===Y){if(p(J,0,127))return J;if(p(J,194,223))Y=1,j=J-192;else if(p(J,224,239))224===J&&(G=160),237===J&&(Q=159),Y=2,j=J-224;else{if(!p(J,240,244))return b(z);240===J&&(G=144),244===J&&(Q=143),Y=3,j=J-240}return j<<=6*Y,null}if(!p(J,G,Q))return j=Y=W=0,G=128,Q=191,q.prepend(J),b(z);if(G=128,Q=191,j+=J-128<<6*(Y-(W+=1)),W!==Y)return null;var H=j;return j=Y=W=0,H}}function F(L){L.fatal;this.handler=function(j,W){if(W===l)return m;if(p(W,0,127))return W;var Y,G;p(W,128,2047)?(Y=1,G=192):p(W,2048,65535)?(Y=2,G=224):p(W,65536,1114111)&&(Y=3,G=240);for(var Q=[(W>>6*Y)+G];Y>0;){var q=W>>6*(Y-1);Q.push(128|63&q),Y-=1}return Q}}P.prototype={decode:function(z,j){var W;W="object"==typeof z&&z instanceof ArrayBuffer?new Uint8Array(z):"object"==typeof z&&"buffer"in z&&z.buffer instanceof ArrayBuffer?new Uint8Array(z.buffer,z.byteOffset,z.byteLength):new Uint8Array(0),j=D(j),this._streaming||(this._decoder=new N({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(j.stream);for(var Q,Y=new v(W),G=[];!Y.endOfStream()&&(Q=this._decoder.handler(Y,Y.read()))!==m;)null!==Q&&(Array.isArray(Q)?G.push.apply(G,Q):G.push(Q));if(!this._streaming){do{if((Q=this._decoder.handler(Y,Y.read()))===m)break;null!==Q&&(Array.isArray(Q)?G.push.apply(G,Q):G.push(Q))}while(!Y.endOfStream());this._decoder=null}return G.length&&-1!==["utf-8"].indexOf(this.encoding)&&!this._ignoreBOM&&!this._BOMseen&&(65279===G[0]?(this._BOMseen=!0,G.shift()):this._BOMseen=!0),function _(L){for(var z="",j=0;j>10),56320+(1023&W)))}return z}(G)}},x.prototype={encode:function(z,j){z=z?String(z):"",j=D(j),this._streaming||(this._encoder=new F(this._options)),this._streaming=Boolean(j.stream);for(var G,W=[],Y=new v(function w(L){for(var z=String(L),j=z.length,W=0,Y=[];W57343)Y.push(G);else if(56320<=G&&G<=57343)Y.push(65533);else if(55296<=G&&G<=56319)if(W===j-1)Y.push(65533);else{var Q=L.charCodeAt(W+1);if(56320<=Q&&Q<=57343){var q=1023&G,J=1023&Q;Y.push(65536+(q<<10)+J),W+=1}else Y.push(65533)}W+=1}return Y}(z));!Y.endOfStream()&&(G=this._encoder.handler(Y,Y.read()))!==m;)Array.isArray(G)?W.push.apply(W,G):W.push(G);if(!this._streaming){for(;(G=this._encoder.handler(Y,Y.read()))!==m;)Array.isArray(G)?W.push.apply(W,G):W.push(G);this._encoder=null}return new Uint8Array(W)}}},78948:(re,u,g)=>{"use strict";g.r(u),g.d(u,{default:()=>_,uuid4:()=>w,valid:()=>D});const p=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function D(l){return p.test(l)}function w(){var l=URL.createObjectURL(new Blob),v=l.toString();return URL.revokeObjectURL(l),v.split(/[:\/]/g).pop().toLowerCase()}w.valid=D;const _=w},20863:re=>{"use strict";re.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},56584:re=>{"use strict";re.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},96747:re=>{"use strict";re.exports=JSON.parse('{"schema":{"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BreakpointTrap":{"name":"BreakpointTrap","subtypes":[],"props":{}},"CacheError":{"name":"CacheError","subtypes":["ReadError","WriteError","DeserializationError","SerializationError"],"props":{}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"DeserializationError":{"name":"DeserializationError","subtypes":[],"props":{}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"FunctionCallError":{"name":"FunctionCallError","subtypes":["CompilationError","LinkError","MethodResolveError","WasmTrap","WasmUnknownError","HostError","EvmError"],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LinkError":{"name":"LinkError","subtypes":[],"props":{"msg":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodUTF8Error","MethodNotFound","MethodInvalidSignature"],"props":{}},"MethodUTF8Error":{"name":"MethodUTF8Error","subtypes":[],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReadError":{"name":"ReadError","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SerializationError":{"name":"SerializationError","subtypes":[],"props":{"hash":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","BreakpointTrap","StackOverflow","GenericTrap"],"props":{}},"WasmUnknownError":{"name":"WasmUnknownError","subtypes":[],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"WriteError":{"name":"WriteError","subtypes":[],"props":{}},"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation"],"props":{}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"InternalError":{"name":"InternalError","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed","InternalError"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},50539:re=>{"use strict";re.exports=JSON.parse('{"proxyUrl":"","widgetUrl":"","polling":{"maxIterations":1000},"nearMobileWalletUrl":"near-mobile-wallet://sign"}')},87908:re=>{"use strict";re.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend.peersyst.tech"}')},13917:re=>{"use strict";re.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend_production.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend_production.peersyst.tech"}')},15247:re=>{"use strict";re.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend.peersyst.tech"}')},98593:re=>{"use strict";re.exports=JSON.parse('{"proxyUrl":"","widgetUrl":"","polling":{"maxIterations":1000},"nearMobileWalletUrl":""}')},31008:re=>{"use strict";re.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},64775:re=>{"use strict";re.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:re=>{"use strict";re.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},24457:re=>{"use strict";re.exports=JSON.parse('["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]')},44946:re=>{"use strict";re.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},75207:re=>{"use strict";re.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:re=>{"use strict";re.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},29799:re=>{"use strict";re.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},18597:re=>{"use strict";re.exports={i8:"6.5.4"}},73619:re=>{"use strict";re.exports=JSON.parse('{"v6":{"ct":"~0.10.0"}}')},22562:re=>{"use strict";re.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},re=>{var p;p=56750,re(re.s=p)}]); \ No newline at end of file