@stellar/stellar-base 10.0.2 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/stellar-base.js +3354 -3234
- package/dist/stellar-base.min.js +1 -1
- package/lib/account.js +1 -1
- package/lib/index.js +0 -4
- package/lib/memo.js +1 -1
- package/lib/operation.js +1 -1
- package/lib/operations/bump_sequence.js +1 -1
- package/lib/operations/change_trust.js +1 -1
- package/lib/transaction_builder.js +1 -1
- package/lib/util/bignumber.js +11 -0
- package/lib/util/continued_fraction.js +1 -1
- package/package.json +15 -15
package/dist/stellar-base.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see stellar-base.min.js.LICENSE.txt */
|
|
2
|
-
var StellarBase;(()=>{var e={6263:function(e,t,r){var n,o=r(5108);n=()=>(()=>{var e={899:(e,t,r)=>{const n=r(10);e.exports=n},10:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Array:()=>M,Bool:()=>B,Double:()=>I,Enum:()=>q,Float:()=>x,Hyper:()=>A,Int:()=>w,LargeInt:()=>E,Opaque:()=>N,Option:()=>D,Quadruple:()=>_,Reference:()=>K,String:()=>C,Struct:()=>H,Union:()=>X,UnsignedHyper:()=>P,UnsignedInt:()=>O,VarArray:()=>F,VarOpaque:()=>j,Void:()=>V,config:()=>te});class n extends TypeError{constructor(e){super(`XDR Write Error: ${e}`)}}class o extends TypeError{constructor(e){super(`XDR Read Error: ${e}`)}}class i extends TypeError{constructor(e){super(`XDR Type Definition Error: ${e}`)}}class a extends i{constructor(){super("method not implemented, it should be overloaded in the descendant class.")}}var s=r(764).lW;class u{constructor(e){if(!s.isBuffer(e)){if(!(e instanceof Array))throw new o("source not specified");e=s.from(e)}this._buffer=e,this._length=e.length,this._index=0}_buffer;_length;_index;get eof(){return this._index===this._length}advance(e){const t=this._index;if(this._index+=e,this._length<this._index)throw new o("attempt to read outside the boundary of the buffer");const r=4-(e%4||4);if(r>0){for(let e=0;e<r;e++)if(0!==this._buffer[this._index+e])throw new o("invalid padding");this._index+=r}return t}rewind(){this._index=0}read(e){const t=this.advance(e);return this._buffer.subarray(t,t+e)}readInt32BE(){return this._buffer.readInt32BE(this.advance(4))}readUInt32BE(){return this._buffer.readUInt32BE(this.advance(4))}readBigInt64BE(){return this._buffer.readBigInt64BE(this.advance(8))}readBigUInt64BE(){return this._buffer.readBigUInt64BE(this.advance(8))}readFloatBE(){return this._buffer.readFloatBE(this.advance(4))}readDoubleBE(){return this._buffer.readDoubleBE(this.advance(8))}ensureInputConsumed(){if(this._index!==this._length)throw new o("invalid XDR contract typecast - source buffer not entirely consumed")}}var c=r(764).lW;const l=8192;class f{constructor(e){"number"==typeof e?e=c.allocUnsafe(e):e instanceof c||(e=c.allocUnsafe(l)),this._buffer=e,this._length=e.length}_buffer;_length;_index=0;alloc(e){const t=this._index;return this._index+=e,this._length<this._index&&this.resize(this._index),t}resize(e){const t=Math.ceil(e/l)*l,r=c.allocUnsafe(t);this._buffer.copy(r,0,0,this._length),this._buffer=r,this._length=t}finalize(){return this._buffer.subarray(0,this._index)}toArray(){return[...this.finalize()]}write(e,t){if("string"==typeof e){const r=this.alloc(t);this._buffer.write(e,r,"utf8")}else{e instanceof c||(e=c.from(e));const r=this.alloc(t);e.copy(this._buffer,r,0,t)}const r=4-(t%4||4);if(r>0){const e=this.alloc(r);this._buffer.fill(0,e,this._index)}}writeInt32BE(e){const t=this.alloc(4);this._buffer.writeInt32BE(e,t)}writeUInt32BE(e){const t=this.alloc(4);this._buffer.writeUInt32BE(e,t)}writeBigInt64BE(e){const t=this.alloc(8);this._buffer.writeBigInt64BE(e,t)}writeBigUInt64BE(e){const t=this.alloc(8);this._buffer.writeBigUInt64BE(e,t)}writeFloatBE(e){const t=this.alloc(4);this._buffer.writeFloatBE(e,t)}writeDoubleBE(e){const t=this.alloc(8);this._buffer.writeDoubleBE(e,t)}static bufferChunkSize=l}var p=r(764).lW;class h{toXDR(e="raw"){if(!this.write)return this.constructor.toXDR(this,e);const t=new f;return this.write(this,t),g(t.finalize(),e)}fromXDR(e,t="raw"){if(!this.read)return this.constructor.fromXDR(e,t);const r=new u(v(e,t)),n=this.read(r);return r.ensureInputConsumed(),n}validateXDR(e,t="raw"){try{return this.fromXDR(e,t),!0}catch(e){return!1}}static toXDR(e,t="raw"){const r=new f;return this.write(e,r),g(r.finalize(),t)}static fromXDR(e,t="raw"){const r=new u(v(e,t)),n=this.read(r);return r.ensureInputConsumed(),n}static validateXDR(e,t="raw"){try{return this.fromXDR(e,t),!0}catch(e){return!1}}}class y extends h{static read(e){throw new a}static write(e,t){throw new a}static isValid(e){return!1}}class d extends h{isValid(e){return!1}}class m extends TypeError{constructor(e){super(`Invalid format ${e}, must be one of "raw", "hex", "base64"`)}}function g(e,t){switch(t){case"raw":return e;case"hex":return e.toString("hex");case"base64":return e.toString("base64");default:throw new m(t)}}function v(e,t){switch(t){case"raw":return e;case"hex":return p.from(e,"hex");case"base64":return p.from(e,"base64");default:throw new m(t)}}const b=2147483647;class w extends y{static read(e){return e.readInt32BE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");if((0|e)!==e)throw new n("invalid i32 value");t.writeInt32BE(e)}static isValid(e){return"number"==typeof e&&(0|e)===e&&e>=-2147483648&&e<=b}}function S(e,t,r){if("bigint"!=typeof e)throw new TypeError("Expected bigint 'value', got "+typeof e);const n=t/r;if(1===n)return[e];if(r<32||r>128||2!==n&&4!==n&&8!==n)throw new TypeError(`invalid bigint (${e}) and slice size (${t} -> ${r}) combination`);const o=BigInt(r),i=new Array(n);for(let t=0;t<n;t++)i[t]=BigInt.asIntN(r,e),e>>=o;return i}function k(e,t){if(t)return[0n,(1n<<BigInt(e))-1n];const r=1n<<BigInt(e-1);return[0n-r,r-1n]}w.MAX_VALUE=b,w.MIN_VALUE=2147483648;class E extends y{constructor(e){super(),this._value=function(e,t,r){e instanceof Array?e.length&&e[0]instanceof Array&&(e=e[0]):e=[e];const n=t/e.length;switch(n){case 32:case 64:case 128:case 256:break;default:throw new RangeError(`expected slices to fit in 32/64/128/256 bits, got ${e}`)}try{for(let t=0;t<e.length;t++)"bigint"!=typeof e[t]&&(e[t]=BigInt(e[t].valueOf()))}catch(t){throw new TypeError(`expected bigint-like values, got: ${e} (${t})`)}if(r&&1===e.length&&e[0]<0n)throw new RangeError(`expected a positive value, got: ${e}`);let o=BigInt.asUintN(n,e[0]);for(let t=1;t<e.length;t++)o|=BigInt.asUintN(n,e[t])<<BigInt(t*n);r||(o=BigInt.asIntN(t,o));const[i,a]=k(t,r);if(o>=i&&o<=a)return o;throw new TypeError(`bigint values [${e}] for ${function(e,t){return`${t?"u":"i"}${e}`}(t,r)} out of range [${i}, ${a}]: ${o}`)}(e,this.size,this.unsigned)}get unsigned(){throw new a}get size(){throw new a}slice(e){return S(this._value,this.size,e)}toString(){return this._value.toString()}toJSON(){return{_value:this._value.toString()}}toBigInt(){return BigInt(this._value)}static read(e){const{size:t}=this.prototype;return 64===t?new this(e.readBigUInt64BE()):new this(...Array.from({length:t/64},(()=>e.readBigUInt64BE())).reverse())}static write(e,t){if(e instanceof this)e=e._value;else if("bigint"!=typeof e||e>this.MAX_VALUE||e<this.MIN_VALUE)throw new n(`${e} is not a ${this.name}`);const{unsigned:r,size:o}=this.prototype;if(64===o)r?t.writeBigUInt64BE(e):t.writeBigInt64BE(e);else for(const n of S(e,o,64).reverse())r?t.writeBigUInt64BE(n):t.writeBigInt64BE(n)}static isValid(e){return"bigint"==typeof e||e instanceof this}static fromString(e){return new this(e)}static MAX_VALUE=0n;static MIN_VALUE=0n;static defineIntBoundaries(){const[e,t]=k(this.prototype.size,this.prototype.unsigned);this.MIN_VALUE=e,this.MAX_VALUE=t}}class A extends E{constructor(...e){super(e)}get low(){return Number(0xffffffffn&this._value)<<0}get high(){return Number(this._value>>32n)>>0}get size(){return 64}get unsigned(){return!1}static fromBits(e,t){return new this(e,t)}}A.defineIntBoundaries();const T=4294967295;class O extends y{static read(e){return e.readUInt32BE()}static write(e,t){if("number"!=typeof e||!(e>=0&&e<=T)||e%1!=0)throw new n("invalid u32 value");t.writeUInt32BE(e)}static isValid(e){return"number"==typeof e&&e%1==0&&e>=0&&e<=T}}O.MAX_VALUE=T,O.MIN_VALUE=0;class P extends E{constructor(...e){super(e)}get low(){return Number(0xffffffffn&this._value)<<0}get high(){return Number(this._value>>32n)>>0}get size(){return 64}get unsigned(){return!0}static fromBits(e,t){return new this(e,t)}}P.defineIntBoundaries();class x extends y{static read(e){return e.readFloatBE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");t.writeFloatBE(e)}static isValid(e){return"number"==typeof e}}class I extends y{static read(e){return e.readDoubleBE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");t.writeDoubleBE(e)}static isValid(e){return"number"==typeof e}}class _ extends y{static read(){throw new i("quadruple not supported")}static write(){throw new i("quadruple not supported")}static isValid(){return!1}}class B extends y{static read(e){const t=w.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new o(`got ${t} when trying to read a bool`)}}static write(e,t){const r=e?1:0;w.write(r,t)}static isValid(e){return"boolean"==typeof e}}var R=r(764).lW;class C extends d{constructor(e=O.MAX_VALUE){super(),this._maxLength=e}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length String, max allowed is ${this._maxLength}`);return e.read(t)}readString(e){return this.read(e).toString("utf8")}write(e,t){const r="string"==typeof e?R.byteLength(e,"utf8"):e.length;if(r>this._maxLength)throw new n(`got ${e.length} bytes, max allowed is ${this._maxLength}`);O.write(r,t),t.write(e,r)}isValid(e){return"string"==typeof e?R.byteLength(e,"utf8")<=this._maxLength:!!(e instanceof Array||R.isBuffer(e))&&e.length<=this._maxLength}}var U=r(764).lW;class N extends d{constructor(e){super(),this._length=e}read(e){return e.read(this._length)}write(e,t){const{length:r}=e;if(r!==this._length)throw new n(`got ${e.length} bytes, expected ${this._length}`);t.write(e,r)}isValid(e){return U.isBuffer(e)&&e.length===this._length}}var L=r(764).lW;class j extends d{constructor(e=O.MAX_VALUE){super(),this._maxLength=e}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length VarOpaque, max allowed is ${this._maxLength}`);return e.read(t)}write(e,t){const{length:r}=e;if(e.length>this._maxLength)throw new n(`got ${e.length} bytes, max allowed is ${this._maxLength}`);O.write(r,t),t.write(e,r)}isValid(e){return L.isBuffer(e)&&e.length<=this._maxLength}}class M extends d{constructor(e,t){super(),this._childType=e,this._length=t}read(e){const t=new r.g.Array(this._length);for(let r=0;r<this._length;r++)t[r]=this._childType.read(e);return t}write(e,t){if(!(e instanceof r.g.Array))throw new n("value is not array");if(e.length!==this._length)throw new n(`got array of size ${e.length}, expected ${this._length}`);for(const r of e)this._childType.write(r,t)}isValid(e){if(!(e instanceof r.g.Array)||e.length!==this._length)return!1;for(const t of e)if(!this._childType.isValid(t))return!1;return!0}}class F extends d{constructor(e,t=O.MAX_VALUE){super(),this._childType=e,this._maxLength=t}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length VarArray, max allowed is ${this._maxLength}`);const r=new Array(t);for(let n=0;n<t;n++)r[n]=this._childType.read(e);return r}write(e,t){if(!(e instanceof Array))throw new n("value is not array");if(e.length>this._maxLength)throw new n(`got array of size ${e.length}, max allowed is ${this._maxLength}`);O.write(e.length,t);for(const r of e)this._childType.write(r,t)}isValid(e){if(!(e instanceof Array)||e.length>this._maxLength)return!1;for(const t of e)if(!this._childType.isValid(t))return!1;return!0}}class D extends y{constructor(e){super(),this._childType=e}read(e){if(B.read(e))return this._childType.read(e)}write(e,t){const r=null!=e;B.write(r,t),r&&this._childType.write(e,t)}isValid(e){return null==e||this._childType.isValid(e)}}class V extends y{static read(){}static write(e){if(void 0!==e)throw new n("trying to write value to a void slot")}static isValid(e){return void 0===e}}class q extends y{constructor(e,t){super(),this.name=e,this.value=t}static read(e){const t=w.read(e),r=this._byValue[t];if(void 0===r)throw new o(`unknown ${this.enumName} member for value ${t}`);return r}static write(e,t){if(!(e instanceof this))throw new n(`unknown ${e} is not a ${this.enumName}`);w.write(e.value,t)}static isValid(e){return e instanceof this}static members(){return this._members}static values(){return Object.values(this._members)}static fromName(e){const t=this._members[e];if(!t)throw new TypeError(`${e} is not a member of ${this.enumName}`);return t}static fromValue(e){const t=this._byValue[e];if(void 0===t)throw new TypeError(`${e} is not a value of any member of ${this.enumName}`);return t}static create(e,t,r){const n=class extends q{};n.enumName=t,e.results[t]=n,n._members={},n._byValue={};for(const[e,t]of Object.entries(r)){const r=new n(e,t);n._members[e]=r,n._byValue[t]=r,n[e]=()=>r}return n}}class K extends y{resolve(){throw new i('"resolve" method should be implemented in the descendant class')}}class H extends y{constructor(e){super(),this._attributes=e||{}}static read(e){const t={};for(const[r,n]of this._fields)t[r]=n.read(e);return new this(t)}static write(e,t){if(!(e instanceof this))throw new n(`${e} is not a ${this.structName}`);for(const[r,n]of this._fields){const o=e._attributes[r];n.write(o,t)}}static isValid(e){return e instanceof this}static create(e,t,r){const n=class extends H{};n.structName=t,e.results[t]=n;const o=new Array(r.length);for(let t=0;t<r.length;t++){const i=r[t],a=i[0];let s=i[1];s instanceof K&&(s=s.resolve(e)),o[t]=[a,s],n.prototype[a]=z(a)}return n._fields=o,n}}function z(e){return function(t){return void 0!==t&&(this._attributes[e]=t),this._attributes[e]}}class X extends d{constructor(e,t){super(),this.set(e,t)}set(e,t){"string"==typeof e&&(e=this.constructor._switchOn.fromName(e)),this._switch=e;const r=this.constructor.armForSwitch(this._switch);this._arm=r,this._armType=r===V?V:this.constructor._arms[r],this._value=t}get(e=this._arm){if(this._arm!==V&&this._arm!==e)throw new TypeError(`${e} not set`);return this._value}switch(){return this._switch}arm(){return this._arm}armType(){return this._armType}value(){return this._value}static armForSwitch(e){const t=this._switches.get(e);if(void 0!==t)return t;if(this._defaultArm)return this._defaultArm;throw new TypeError(`Bad union switch: ${e}`)}static armTypeForArm(e){return e===V?V:this._arms[e]}static read(e){const t=this._switchOn.read(e),r=this.armForSwitch(t),n=r===V?V:this._arms[r];let o;return o=void 0!==n?n.read(e):r.read(e),new this(t,o)}static write(e,t){if(!(e instanceof this))throw new n(`${e} is not a ${this.unionName}`);this._switchOn.write(e.switch(),t),e.armType().write(e.value(),t)}static isValid(e){return e instanceof this}static create(e,t,r){const n=class extends X{};n.unionName=t,e.results[t]=n,r.switchOn instanceof K?n._switchOn=r.switchOn.resolve(e):n._switchOn=r.switchOn,n._switches=new Map,n._arms={};let o=r.defaultArm;o instanceof K&&(o=o.resolve(e)),n._defaultArm=o;for(const[e,t]of r.switches){const r="string"==typeof e?n._switchOn.fromName(e):e;n._switches.set(r,t)}if(void 0!==n._switchOn.values)for(const e of n._switchOn.values())n[e.name]=function(t){return new n(e,t)},n.prototype[e.name]=function(t){return this.set(e,t)};if(r.arms)for(const[t,o]of Object.entries(r.arms))n._arms[t]=o instanceof K?o.resolve(e):o,o!==V&&(n.prototype[t]=function(){return this.get(t)});return n}}class $ extends K{constructor(e){super(),this.name=e}resolve(e){return e.definitions[this.name].resolve(e)}}class G extends K{constructor(e,t,r=!1){super(),this.childReference=e,this.length=t,this.variable=r}resolve(e){let t=this.childReference,r=this.length;return t instanceof K&&(t=t.resolve(e)),r instanceof K&&(r=r.resolve(e)),this.variable?new F(t,r):new M(t,r)}}class W extends K{constructor(e){super(),this.childReference=e,this.name=e.name}resolve(e){let t=this.childReference;return t instanceof K&&(t=t.resolve(e)),new D(t)}}class Y extends K{constructor(e,t){super(),this.sizedType=e,this.length=t}resolve(e){let t=this.length;return t instanceof K&&(t=t.resolve(e)),new this.sizedType(t)}}class J{constructor(e,t,r){this.constructor=e,this.name=t,this.config=r}resolve(e){return this.name in e.results?e.results[this.name]:this.constructor(e,this.name,this.config)}}function Z(e,t,r){return r instanceof K&&(r=r.resolve(e)),e.results[t]=r,r}function Q(e,t,r){return e.results[t]=r,r}class ee{constructor(e){this._destination=e,this._definitions={}}enum(e,t){const r=new J(q.create,e,t);this.define(e,r)}struct(e,t){const r=new J(H.create,e,t);this.define(e,r)}union(e,t){const r=new J(X.create,e,t);this.define(e,r)}typedef(e,t){const r=new J(Z,e,t);this.define(e,r)}const(e,t){const r=new J(Q,e,t);this.define(e,r)}void(){return V}bool(){return B}int(){return w}hyper(){return A}uint(){return O}uhyper(){return P}float(){return x}double(){return I}quadruple(){return _}string(e){return new Y(C,e)}opaque(e){return new Y(N,e)}varOpaque(e){return new Y(j,e)}array(e,t){return new G(e,t)}varArray(e,t){return new G(e,t,!0)}option(e){return new W(e)}define(e,t){if(void 0!==this._destination[e])throw new i(`${e} is already defined`);this._definitions[e]=t}lookup(e){return new $(e)}resolve(){for(const e of Object.values(this._definitions))e.resolve({definitions:this._definitions,results:this._destination})}}function te(e,t={}){if(e){const r=new ee(t);e(r),r.resolve()}return t}},742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},764:(e,t,r)=>{"use strict";const n=r(742),i=r(645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;const s=2147483647;function u(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=u(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return y(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return y(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return y(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|d(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?u(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return f(e),u(e<0?0:0|d(e))}function h(e){const t=e.length<0?0:0|d(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function y(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function d(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(o)return n?-1:$(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function S(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function k(e,t,r,n){return W($(t,e.length-r),e,r,n)}function E(e,t,r,n){return W(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return W(G(t),e,r,n)}function T(e,t,r,n){return W(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||void 0===o||"function"!=typeof o.error||o.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Z[e[n]];return o}function R(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||U(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||U(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Q((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const D={};function V(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function K(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},645:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,y=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=y,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+h]=255&a,h+=y,a/=256,c-=8);e[r+h-y]|=128*d}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(899)})(),e.exports=n()},9282:(e,t,r)=>{"use strict";var n=r(4155),o=r(5108);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,a=void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(a)?a:String(a)),n)}var o,a}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var u,c,l=r(2136).codes,f=l.ERR_AMBIGUOUS_ARGUMENT,p=l.ERR_INVALID_ARG_TYPE,h=l.ERR_INVALID_ARG_VALUE,y=l.ERR_INVALID_RETURN_VALUE,d=l.ERR_MISSING_ARGS,m=r(5961),g=r(9539).inspect,v=r(9539).types,b=v.isPromise,w=v.isRegExp,S=r(8162)(),k=r(5624)(),E=r(1924)("RegExp.prototype.test");new Map;function A(){var e=r(9158);u=e.isDeepEqual,c=e.isDeepStrictEqual}var T=!1,O=e.exports=_,P={};function x(e){if(e.message instanceof Error)throw e.message;throw new m(e)}function I(e,t,r,n){if(!r){var o=!1;if(0===t)o=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var i=new m({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw i.generatedMessage=o,i}}function _(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[_,t.length].concat(t))}O.fail=function e(t,r,i,a,s){var u,c=arguments.length;if(0===c)u="Failed";else if(1===c)i=t,t=void 0;else{if(!1===T)T=!0,(n.emitWarning?n.emitWarning:o.warn.bind(o))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");2===c&&(a="!=")}if(i instanceof Error)throw i;var l={actual:t,expected:r,operator:void 0===a?"fail":a,stackStartFn:s||e};void 0!==i&&(l.message=i);var f=new m(l);throw u&&(f.message=u,f.generatedMessage=!0),f},O.AssertionError=m,O.ok=_,O.equal=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t!=r&&x({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},O.notEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t==r&&x({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},O.deepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A(),u(t,r)||x({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},O.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A(),u(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},O.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A(),c(t,r)||x({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},O.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A();c(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},O.strictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");k(t,r)||x({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},O.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");k(t,r)&&x({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var B=s((function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&w(t[e])&&E(t[e],n[e])?o[e]=n[e]:o[e]=t[e])}))}));function R(e,t,r,n){if("function"!=typeof t){if(w(t))return E(t,e);if(2===arguments.length)throw new p("expected",["Function","RegExp"],t);if("object"!==i(e)||null===e){var o=new m({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw o.operator=n.name,o}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(0===a.length)throw new h("error",t,"may not be an empty object");return void 0===u&&A(),a.forEach((function(o){"string"==typeof e[o]&&w(t[o])&&E(t[o],e[o])||function(e,t,r,n,o,i){if(!(r in e)||!c(e[r],t[r])){if(!n){var a=new B(e,o),s=new B(t,o,e),u=new m({actual:a,expected:s,operator:"deepStrictEqual",stackStartFn:i});throw u.actual=e,u.expected=t,u.operator=i.name,u}x({actual:e,expected:t,message:n,operator:i.name,stackStartFn:i})}}(e,t,o,r,a,n)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function C(e){if("function"!=typeof e)throw new p("fn","Function",e);try{e()}catch(e){return e}return P}function U(e){return b(e)||null!==e&&"object"===i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function N(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!U(t=e()))throw new y("instance of Promise","promiseFn",t)}else{if(!U(e))throw new p("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return P})).catch((function(e){return e}))}))}function L(e,t,r,n){if("string"==typeof r){if(4===arguments.length)throw new p("error",["Object","Error","Function","RegExp"],r);if("object"===i(t)&&null!==t){if(t.message===r)throw new f("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new f("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new p("error",["Object","Error","Function","RegExp"],r);if(t===P){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var a="rejects"===e.name?"rejection":"exception";x({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:e})}if(r&&!R(t,r,n,e))throw t}function j(e,t,r,n){if(t!==P){if("string"==typeof r&&(n=r,r=void 0),!r||R(t,r)){var o=n?": ".concat(n):".",i="doesNotReject"===e.name?"rejection":"exception";x({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(i).concat(o,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function M(e,t,r,n,o){if(!w(t))throw new p("regexp","RegExp",t);var a="match"===o;if("string"!=typeof e||E(t,e)!==a){if(r instanceof Error)throw r;var s=!r;r=r||("string"!=typeof e?'The "string" argument must be of type string. Received type '+"".concat(i(e)," (").concat(g(e),")"):(a?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(g(t),". Input:\n\n").concat(g(e),"\n"));var u=new m({actual:e,expected:t,message:r,operator:o,stackStartFn:n});throw u.generatedMessage=s,u}}function F(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[F,t.length].concat(t))}O.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];L.apply(void 0,[e,C(t)].concat(n))},O.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return N(t).then((function(t){return L.apply(void 0,[e,t].concat(n))}))},O.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];j.apply(void 0,[e,C(t)].concat(n))},O.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return N(t).then((function(t){return j.apply(void 0,[e,t].concat(n))}))},O.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===i(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=g(t);var n=new m({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=n.stack.split("\n"),u=0;u<a.length;u++){var c=s.indexOf(a[u]);if(-1!==c){s=s.slice(0,c);break}}n.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw n}},O.match=function e(t,r,n){M(t,r,n,e,"match")},O.doesNotMatch=function e(t,r,n){M(t,r,n,e,"doesNotMatch")},O.strict=S(F,O,{equal:O.strictEqual,deepEqual:O.deepStrictEqual,notEqual:O.notStrictEqual,notDeepEqual:O.notDeepStrictEqual}),O.strict.strict=O.strict},5961:(e,t,r)=>{"use strict";var n=r(4155);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e,t){if("object"!==m(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===m(t)?t:String(t)}function c(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,e)},f(e)}function p(e,t,r){return p=h()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&y(o,r.prototype),o},p.apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}var g=r(9539).inspect,v=r(2136).codes.ERR_INVALID_ARG_TYPE;function b(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var w="",S="",k="",E="",A={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function T(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function O(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function P(e,t,r){var o="",i="",a=0,s="",u=!1,c=O(e),l=c.split("\n"),f=O(t).split("\n"),p=0,h="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===l.length&&1===f.length&&l[0]!==f[0]){var y=l[0].length+f[0].length;if(y<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(A[r],"\n\n")+"".concat(l[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r){if(y<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;l[0][p]===f[0][p];)p++;p>2&&(h="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",p),"^"),p=0)}}}for(var d=l[l.length-1],g=f[f.length-1];d===g&&(p++<2?s="\n ".concat(d).concat(s):o=d,l.pop(),f.pop(),0!==l.length&&0!==f.length);)d=l[l.length-1],g=f[f.length-1];var v=Math.max(l.length,f.length);if(0===v){var T=c.split("\n");if(T.length>30)for(T[26]="".concat(w,"...").concat(E);T.length>27;)T.pop();return"".concat(A.notIdentical,"\n\n").concat(T.join("\n"),"\n")}p>3&&(s="\n".concat(w,"...").concat(E).concat(s),u=!0),""!==o&&(s="\n ".concat(o).concat(s),o="");var P=0,x=A[r]+"\n".concat(S,"+ actual").concat(E," ").concat(k,"- expected").concat(E),I=" ".concat(w,"...").concat(E," Lines skipped");for(p=0;p<v;p++){var _=p-a;if(l.length<p+1)_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(f[p-2]),P++),i+="\n ".concat(f[p-1]),P++),a=p,o+="\n".concat(k,"-").concat(E," ").concat(f[p]),P++;else if(f.length<p+1)_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(l[p-2]),P++),i+="\n ".concat(l[p-1]),P++),a=p,i+="\n".concat(S,"+").concat(E," ").concat(l[p]),P++;else{var B=f[p],R=l[p],C=R!==B&&(!b(R,",")||R.slice(0,-1)!==B);C&&b(B,",")&&B.slice(0,-1)===R&&(C=!1,R+=","),C?(_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(l[p-2]),P++),i+="\n ".concat(l[p-1]),P++),a=p,i+="\n".concat(S,"+").concat(E," ").concat(R),o+="\n".concat(k,"-").concat(E," ").concat(B),P+=2):(i+=o,o="",1!==_&&0!==p||(i+="\n ".concat(R),P++))}if(P>20&&p<v-2)return"".concat(x).concat(I,"\n").concat(i,"\n").concat(w,"...").concat(E).concat(o,"\n")+"".concat(w,"...").concat(E)}return"".concat(x).concat(u?I:"","\n").concat(i).concat(o).concat(s).concat(h)}var x=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(b,e);var r,o,a,u,f,p=(r=b,o=h(),function(){var e,t=d(r);if(o){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function b(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),"object"!==m(e)||null===e)throw new v("options","Object",e);var r=e.message,o=e.operator,i=e.stackStartFn,a=e.actual,s=e.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=p.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(w="\x1b[34m",S="\x1b[32m",E="\x1b[39m",k="\x1b[31m"):(w="",S="",E="",k="")),"object"===m(a)&&null!==a&&"object"===m(s)&&null!==s&&"stack"in a&&a instanceof Error&&"stack"in s&&s instanceof Error&&(a=T(a),s=T(s)),"deepStrictEqual"===o||"strictEqual"===o)t=p.call(this,P(a,s,o));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var f=A[o],h=O(a).split("\n");if("notStrictEqual"===o&&"object"===m(a)&&null!==a&&(f=A.notStrictEqualObject),h.length>30)for(h[26]="".concat(w,"...").concat(E);h.length>27;)h.pop();t=1===h.length?p.call(this,"".concat(f," ").concat(h[0])):p.call(this,"".concat(f,"\n\n").concat(h.join("\n"),"\n"))}else{var y=O(a),d="",g=A[o];"notDeepEqual"===o||"notEqual"===o?(y="".concat(A[o],"\n\n").concat(y)).length>1024&&(y="".concat(y.slice(0,1021),"...")):(d="".concat(O(s)),y.length>512&&(y="".concat(y.slice(0,509),"...")),d.length>512&&(d="".concat(d.slice(0,509),"...")),"deepEqual"===o||"equal"===o?y="".concat(g,"\n\n").concat(y,"\n\nshould equal\n\n"):d=" ".concat(o," ").concat(d)),t=p.call(this,"".concat(y).concat(d))}return Error.stackTraceLimit=u,t.generatedMessage=!r,Object.defineProperty(l(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=a,t.expected=s,t.operator=o,Error.captureStackTrace&&Error.captureStackTrace(l(t),i),t.stack,t.name="AssertionError",c(t)}return a=b,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,i(i({},t),{},{customInspect:!1,depth:0}))}}])&&s(a.prototype,u),f&&s(a,f),Object.defineProperty(a,"prototype",{writable:!1}),b}(f(Error),g.custom);e.exports=x},2136:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(i=o.key,a=void 0,a=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===n(a)?a:String(a)),o)}var i,a}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=s(e);if(t){var i=s(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var u,c,l={};function f(e,t,r){r||(r=Error);var n=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(l,r);var n,s,u,c=a(l);function l(r,n,o){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i=c.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,o)),i.code=e,i}return n=l,s&&o(n.prototype,s),u&&o(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n}(r);l[e]=n}function p(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",(function(e,t,o){var i,a,s,c;if(void 0===u&&(u=r(9282)),u("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(!s||s<0?0:+s,a.length)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))c="The ".concat(e," ").concat(i," ").concat(p(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";c='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(p(t,"type"))}return c+=". Received type ".concat(n(o))}),TypeError),f("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=r(9539));var o=c.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(o)}),TypeError,RangeError),f("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var o;return o=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")}),TypeError),f("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===u&&(u=r(9282)),u(t.length>0,"At least one arg needs to be specified");var o="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,i-1).join(", "),o+=", and ".concat(t[i-1]," arguments")}return"".concat(o," must be specified")}),TypeError),e.exports.codes=l},9158:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},u=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},c=Object.is?Object.is:r(609),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(360);function p(e){return e.call.bind(e)}var h=p(Object.prototype.hasOwnProperty),y=p(Object.prototype.propertyIsEnumerable),d=p(Object.prototype.toString),m=r(9539).types,g=m.isAnyArrayBuffer,v=m.isArrayBufferView,b=m.isDate,w=m.isMap,S=m.isRegExp,k=m.isSet,E=m.isNativeError,A=m.isBoxedPrimitive,T=m.isNumberObject,O=m.isStringObject,P=m.isBooleanObject,x=m.isBigIntObject,I=m.isSymbolObject,_=m.isFloat32Array,B=m.isFloat64Array;function R(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function C(e){return Object.keys(e).filter(R).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function U(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}var N=0,L=1,j=2,M=3;function F(e,t,r,n){if(e===t)return 0!==e||(!r||c(e,t));if(r){if("object"!==i(e))return"number"==typeof e&&f(e)&&f(t);if("object"!==i(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var o,s,u,l,p=d(e);if(p!==d(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var h=C(e),y=C(t);return h.length===y.length&&V(e,t,r,n,L,h)}if("[object Object]"===p&&(!w(e)&&w(t)||!k(e)&&k(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(S(e)){if(!S(t)||(u=e,l=t,!(a?u.source===l.source&&u.flags===l.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(l))))return!1}else if(E(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(v(e)){if(r||!_(e)&&!B(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===U(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var m=C(e),R=C(t);return m.length===R.length&&V(e,t,r,n,N,m)}if(k(e))return!(!k(t)||e.size!==t.size)&&V(e,t,r,n,j);if(w(e))return!(!w(t)||e.size!==t.size)&&V(e,t,r,n,M);if(g(e)){if(s=t,(o=e).byteLength!==s.byteLength||0!==U(new Uint8Array(o),new Uint8Array(s)))return!1}else if(A(e)&&!function(e,t){return T(e)?T(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):O(e)?O(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):P(e)?P(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):x(e)?x(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):I(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return V(e,t,r,n,N)}function D(e,t){return t.filter((function(t){return y(e,t)}))}function V(e,t,r,o,a,c){if(5===arguments.length){c=Object.keys(e);var f=Object.keys(t);if(c.length!==f.length)return!1}for(var p=0;p<c.length;p++)if(!h(t,c[p]))return!1;if(r&&5===arguments.length){var d=l(e);if(0!==d.length){var m=0;for(p=0;p<d.length;p++){var g=d[p];if(y(e,g)){if(!y(t,g))return!1;c.push(g),m++}else if(y(t,g))return!1}var v=l(t);if(d.length!==v.length&&D(t,v).length!==m)return!1}else{var b=l(t);if(0!==b.length&&0!==D(t,b).length)return!1}}if(0===c.length&&(a===N||a===L&&0===e.length||0===e.size))return!0;if(void 0===o)o={val1:new Map,val2:new Map,position:0};else{var w=o.val1.get(e);if(void 0!==w){var S=o.val2.get(t);if(void 0!==S)return w===S}o.position++}o.val1.set(e,o.position),o.val2.set(t,o.position);var k=function(e,t,r,o,a,c){var l=0;if(c===j){if(!function(e,t,r,n){for(var o=null,a=s(e),u=0;u<a.length;u++){var c=a[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!t.has(c)){if(r)return!1;if(!H(e,t,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var l=s(t),f=0;f<l.length;f++){var p=l[f];if("object"===i(p)&&null!==p){if(!q(o,p,r,n))return!1}else if(!r&&!e.has(p)&&!q(o,p,r,n))return!1}return 0===o.size}return!0}(e,t,r,a))return!1}else if(c===M){if(!function(e,t,r,o){for(var a=null,s=u(e),c=0;c<s.length;c++){var l=n(s[c],2),f=l[0],p=l[1];if("object"===i(f)&&null!==f)null===a&&(a=new Set),a.add(f);else{var h=t.get(f);if(void 0===h&&!t.has(f)||!F(p,h,r,o)){if(r)return!1;if(!z(e,t,f,p,o))return!1;null===a&&(a=new Set),a.add(f)}}}if(null!==a){for(var y=u(t),d=0;d<y.length;d++){var m=n(y[d],2),g=m[0],v=m[1];if("object"===i(g)&&null!==g){if(!X(a,e,g,v,r,o))return!1}else if(!(r||e.has(g)&&F(e.get(g),v,!1,o)||X(a,e,g,v,!1,o)))return!1}return 0===a.size}return!0}(e,t,r,a))return!1}else if(c===L)for(;l<e.length;l++){if(!h(e,l)){if(h(t,l))return!1;for(var f=Object.keys(e);l<f.length;l++){var p=f[l];if(!h(t,p)||!F(e[p],t[p],r,a))return!1}return f.length===Object.keys(t).length}if(!h(t,l)||!F(e[l],t[l],r,a))return!1}for(l=0;l<o.length;l++){var y=o[l];if(!F(e[y],t[y],r,a))return!1}return!0}(e,t,r,c,o,a);return o.val1.delete(e),o.val2.delete(t),k}function q(e,t,r,n){for(var o=s(e),i=0;i<o.length;i++){var a=o[i];if(F(t,a,r,n))return e.delete(a),!0}return!1}function K(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(f(e))return!1}return!0}function H(e,t,r){var n=K(r);return null!=n?n:t.has(n)&&!e.has(n)}function z(e,t,r,n,o){var i=K(r);if(null!=i)return i;var a=t.get(i);return!(void 0===a&&!t.has(i)||!F(n,a,!1,o))&&(!e.has(i)&&F(n,a,!1,o))}function X(e,t,r,n,o,i){for(var a=s(e),u=0;u<a.length;u++){var c=a[u];if(F(r,c,o,i)&&F(n,t.get(c),o,i))return e.delete(c),!0}return!1}e.exports={isDeepEqual:function(e,t){return F(e,t,false)},isDeepStrictEqual:function(e,t){return F(e,t,true)}}},4195:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Account:()=>jt,Address:()=>Xe,Asset:()=>oe,AuthClawbackEnabledFlag:()=>nt,AuthImmutableFlag:()=>rt,AuthRequiredFlag:()=>et,AuthRevocableFlag:()=>tt,BASE_FEE:()=>or,Claimant:()=>Pe,Contract:()=>vr,FastSigning:()=>_,FeeBumpTransaction:()=>Ct,Hyper:()=>E.Hyper,Int128:()=>qr,Int256:()=>Yr,Keypair:()=>Q,LiquidityPoolAsset:()=>Ee,LiquidityPoolFeeV18:()=>se,LiquidityPoolId:()=>Be,Memo:()=>dt,MemoHash:()=>ht,MemoID:()=>ft,MemoNone:()=>lt,MemoReturn:()=>yt,MemoText:()=>pt,MuxedAccount:()=>Vt,Networks:()=>ur,Operation:()=>ot,ScInt:()=>ln,SignerKey:()=>Wt,Soroban:()=>yr,SorobanDataBuilder:()=>zt,StrKey:()=>H,TimeoutInfinite:()=>ir,Transaction:()=>At,TransactionBase:()=>he,TransactionBuilder:()=>ar,Uint128:()=>Or,Uint256:()=>Ur,UnsignedHyper:()=>E.UnsignedHyper,XdrLargeInt:()=>tn,authorizeEntry:()=>xn,authorizeInvocation:()=>_n,buildInvocationTree:()=>Bn,decodeAddressToMuxedAccount:()=>Ce,default:()=>Un,encodeMuxedAccount:()=>Ne,encodeMuxedAccountToAddress:()=>Ue,extractBaseAddress:()=>Le,getLiquidityPoolId:()=>ue,hash:()=>P,humanizeEvents:()=>kn,nativeToScVal:()=>mn,scValToBigInt:()=>fn,scValToNative:()=>gn,sign:()=>B,verify:()=>R,walkInvocationTree:()=>Rn,xdr:()=>T});var n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",u=1e14,c=14,l=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],p=1e7,h=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function d(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=c-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function m(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,u=e.e,c=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=o.length)<(c=i.length)?u:c,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function g(e,t,r,n){if(e<t||e>r||e!==i(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return y(e.e/c)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function w(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var S=function e(t){var r,S,k,E,A,T,O,P,x,I,_=H.prototype={constructor:H,toString:null,valueOf:null},B=new H(1),R=20,C=4,U=-7,N=21,L=-1e7,j=1e7,M=!1,F=1,D=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},q="0123456789abcdefghijklmnopqrstuvwxyz",K=!0;function H(e,t){var r,o,a,u,f,p,h,y,d=this;if(!(d instanceof H))return new H(e,t);if(null==t){if(e&&!0===e._isBigNumber)return d.s=e.s,void(!e.c||e.e>j?d.c=d.e=null:e.e<L?d.c=[d.e=0]:(d.e=e.e,d.c=e.c.slice()));if((p="number"==typeof e)&&0*e==0){if(d.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,f=e;f>=10;f/=10,u++);return void(u>j?d.c=d.e=null:(d.e=u,d.c=[e]))}y=String(e)}else{if(!n.test(y=String(e)))return k(d,y,p);d.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(u=y.indexOf("."))>-1&&(y=y.replace(".","")),(f=y.search(/e/i))>0?(u<0&&(u=f),u+=+y.slice(f+1),y=y.substring(0,f)):u<0&&(u=y.length)}else{if(g(t,2,q.length,"Base"),10==t&&K)return G(d=new H(e),R+d.e+1,C);if(y=String(e),p="number"==typeof e){if(0*e!=0)return k(d,y,p,t);if(d.s=1/e<0?(y=y.slice(1),-1):1,H.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else d.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(r=q.slice(0,t),u=f=0,h=y.length;f<h;f++)if(r.indexOf(o=y.charAt(f))<0){if("."==o){if(f>u){u=h;continue}}else if(!a&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){a=!0,f=-1,u=0;continue}return k(d,String(e),p,t)}p=!1,(u=(y=S(y,t,10,d.s)).indexOf("."))>-1?y=y.replace(".",""):u=y.length}for(f=0;48===y.charCodeAt(f);f++);for(h=y.length;48===y.charCodeAt(--h););if(y=y.slice(f,++h)){if(h-=f,p&&H.DEBUG&&h>15&&(e>l||e!==i(e)))throw Error(s+d.s*e);if((u=u-f-1)>j)d.c=d.e=null;else if(u<L)d.c=[d.e=0];else{if(d.e=u,d.c=[],f=(u+1)%c,u<0&&(f+=c),f<h){for(f&&d.c.push(+y.slice(0,f)),h-=c;f<h;)d.c.push(+y.slice(f,f+=c));f=c-(y=y.slice(f)).length}else f-=h;for(;f--;y+="0");d.c.push(+y)}}else d.c=[d.e=0]}function z(e,t,r,n){var o,i,a,s,u;if(null==r?r=C:g(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)u=d(e.c),u=1==n||2==n&&(a<=U||a>=N)?b(u,a):w(u,a,"0");else if(i=(e=G(new H(e),t,r)).e,s=(u=d(e.c)).length,1==n||2==n&&(t<=i||i<=U)){for(;s<t;u+="0",s++);u=b(u,i)}else if(t-=a,u=w(u,i,"0"),i+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-s)>0)for(i+1==s&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function X(e,t){for(var r,n,o=1,i=new H(e[0]);o<e.length;o++)(!(n=new H(e[o])).s||(r=m(i,n))===t||0===r&&i.s===t)&&(i=n);return i}function $(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*c-1)>j?e.c=e.e=null:r<L?e.c=[e.e=0]:(e.e=r,e.c=t),e}function G(e,t,r,n){var a,s,l,p,h,y,d,m=e.c,g=f;if(m){e:{for(a=1,p=m[0];p>=10;p/=10,a++);if((s=t-a)<0)s+=c,l=t,h=m[y=0],d=i(h/g[a-l-1]%10);else if((y=o((s+1)/c))>=m.length){if(!n)break e;for(;m.length<=y;m.push(0));h=d=0,a=1,l=(s%=c)-c+1}else{for(h=p=m[y],a=1;p>=10;p/=10,a++);d=(l=(s%=c)-c+a)<0?0:i(h/g[a-l-1]%10)}if(n=n||t<0||null!=m[y+1]||(l<0?h:h%g[a-l-1]),n=r<4?(d||n)&&(0==r||r==(e.s<0?3:2)):d>5||5==d&&(4==r||n||6==r&&(s>0?l>0?h/g[a-l]:0:m[y-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=g[(c-t%c)%c],e.e=-t||0):m[0]=e.e=0,e;if(0==s?(m.length=y,p=1,y--):(m.length=y+1,p=g[c-s],m[y]=l>0?i(h/g[a-l]%g[l])*p:0),n)for(;;){if(0==y){for(s=1,l=m[0];l>=10;l/=10,s++);for(l=m[0]+=p,p=1;l>=10;l/=10,p++);s!=p&&(e.e++,m[0]==u&&(m[0]=1));break}if(m[y]+=p,m[y]!=u)break;m[y--]=0,p=1}for(s=m.length;0===m[--s];m.pop());}e.e>j?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function W(e){var t,r=e.e;return null===r?e.toString():(t=d(e.c),t=r<=U||r>=N?b(t,r):w(t,r,"0"),e.s<0?"-"+t:t)}return H.clone=e,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(r=e[t],0,h,t),R=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(r=e[t],0,8,t),C=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(g(r[0],-h,0,t),g(r[1],0,h,t),U=r[0],N=r[1]):(g(r,-h,h,t),U=-(N=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)g(r[0],-h,-1,t),g(r[1],1,h,t),L=r[0],j=r[1];else{if(g(r,-h,h,t),!r)throw Error(a+t+" cannot be zero: "+r);L=-(j=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(a+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!r,Error(a+"crypto unavailable");M=r}else M=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(r=e[t],0,9,t),F=r),e.hasOwnProperty(t="POW_PRECISION")&&(g(r=e[t],0,h,t),D=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(a+t+" not an object: "+r);V=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(a+t+" invalid: "+r);K="0123456789"==r.slice(0,10),q=r}}return{DECIMAL_PLACES:R,ROUNDING_MODE:C,EXPONENTIAL_AT:[U,N],RANGE:[L,j],CRYPTO:M,MODULO_MODE:F,POW_PRECISION:D,FORMAT:V,ALPHABET:q}},H.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!H.DEBUG)return!0;var t,r,n=e.c,o=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&o>=-h&&o<=h&&o===i(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%c)<1&&(t+=c),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=u||r!==i(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},H.maximum=H.max=function(){return X(arguments,-1)},H.minimum=H.min=function(){return X(arguments,1)},H.random=(E=9007199254740992,A=Math.random()*E&2097151?function(){return i(Math.random()*E)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,s,u,l=0,p=[],y=new H(B);if(null==e?e=R:g(e,0,h),s=o(e/c),M)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)(u=131072*t[l]+(t[l+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[l]=r[0],t[l+1]=r[1]):(p.push(u%1e14),l+=2);l=s/2}else{if(!crypto.randomBytes)throw M=!1,Error(a+"crypto unavailable");for(t=crypto.randomBytes(s*=7);l<s;)(u=281474976710656*(31&t[l])+1099511627776*t[l+1]+4294967296*t[l+2]+16777216*t[l+3]+(t[l+4]<<16)+(t[l+5]<<8)+t[l+6])>=9e15?crypto.randomBytes(7).copy(t,l):(p.push(u%1e14),l+=7);l=s/7}if(!M)for(;l<s;)(u=A())<9e15&&(p[l++]=u%1e14);for(s=p[--l],e%=c,s&&e&&(u=f[c-e],p[l]=i(s/u)*u);0===p[l];p.pop(),l--);if(l<0)p=[n=0];else{for(n=-1;0===p[0];p.splice(0,1),n-=c);for(l=1,u=p[0];u>=10;u/=10,l++);l<c&&(n-=c-l)}return y.e=n,y.c=p,y}),H.sum=function(){for(var e=1,t=arguments,r=new H(t[0]);e<t.length;)r=r.plus(t[e++]);return r},S=function(){var e="0123456789";function t(e,t,r,n){for(var o,i,a=[0],s=0,u=e.length;s<u;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,i,a,s){var u,c,l,f,p,h,y,m,g=n.indexOf("."),v=R,b=C;for(g>=0&&(f=D,D=0,n=n.replace(".",""),h=(m=new H(o)).pow(n.length-g),D=f,m.c=t(w(d(h.c),h.e,"0"),10,i,e),m.e=m.c.length),l=f=(y=t(n,o,i,s?(u=q,e):(u=e,q))).length;0==y[--f];y.pop());if(!y[0])return u.charAt(0);if(g<0?--l:(h.c=y,h.e=l,h.s=a,y=(h=r(h,m,v,b,i)).c,p=h.r,l=h.e),g=y[c=l+v+1],f=i/2,p=p||c<0||null!=y[c+1],p=b<4?(null!=g||p)&&(0==b||b==(h.s<0?3:2)):g>f||g==f&&(4==b||p||6==b&&1&y[c-1]||b==(h.s<0?8:7)),c<1||!y[0])n=p?w(u.charAt(1),-v,u.charAt(0)):u.charAt(0);else{if(y.length=c,p)for(--i;++y[--c]>i;)y[c]=0,c||(++l,y=[1].concat(y));for(f=y.length;!y[--f];);for(g=0,n="";g<=f;n+=u.charAt(y[g++]));n=w(n,l,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,a,s=0,u=e.length,c=t%p,l=t/p|0;for(e=e.slice();u--;)s=((o=c*(i=e[u]%p)+(n=l*i+(a=e[u]/p|0)*c)%p*p+s)/r|0)+(n/p|0)+l*a,e[u]=o%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,a,s,l){var f,p,h,d,m,g,v,b,w,S,k,E,A,T,O,P,x,I=n.s==o.s?1:-1,_=n.c,B=o.c;if(!(_&&_[0]&&B&&B[0]))return new H(n.s&&o.s&&(_?!B||_[0]!=B[0]:B)?_&&0==_[0]||!B?0*I:I/0:NaN);for(w=(b=new H(I)).c=[],I=a+(p=n.e-o.e)+1,l||(l=u,p=y(n.e/c)-y(o.e/c),I=I/c|0),h=0;B[h]==(_[h]||0);h++);if(B[h]>(_[h]||0)&&p--,I<0)w.push(1),d=!0;else{for(T=_.length,P=B.length,h=0,I+=2,(m=i(l/(B[0]+1)))>1&&(B=e(B,m,l),_=e(_,m,l),P=B.length,T=_.length),A=P,k=(S=_.slice(0,P)).length;k<P;S[k++]=0);x=B.slice(),x=[0].concat(x),O=B[0],B[1]>=l/2&&O++;do{if(m=0,(f=t(B,S,P,k))<0){if(E=S[0],P!=k&&(E=E*l+(S[1]||0)),(m=i(E/O))>1)for(m>=l&&(m=l-1),v=(g=e(B,m,l)).length,k=S.length;1==t(g,S,v,k);)m--,r(g,P<v?x:B,v,l),v=g.length,f=1;else 0==m&&(f=m=1),v=(g=B.slice()).length;if(v<k&&(g=[0].concat(g)),r(S,g,k,l),k=S.length,-1==f)for(;t(B,S,P,k)<1;)m++,r(S,P<k?x:B,k,l),k=S.length}else 0===f&&(m++,S=[0]);w[h++]=m,S[0]?S[k++]=_[A]||0:(S=[_[A]],k=1)}while((A++<T||null!=S[0])&&I--);d=null!=S[0],w[0]||w.splice(0,1)}if(l==u){for(h=1,I=w[0];I>=10;I/=10,h++);G(b,a+(b.e=h+p*c-1)+1,s,d)}else b.e=p,b.r=+d;return b}}(),T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,O=/^([^.]+)\.$/,P=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,k=function(e,t,r,n){var o,i=r?t:t.replace(I,"");if(x.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(T,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(O,"$1").replace(P,"0.$1")),t!=i))return new H(i,o);if(H.DEBUG)throw Error(a+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},_.absoluteValue=_.abs=function(){var e=new H(this);return e.s<0&&(e.s=1),e},_.comparedTo=function(e,t){return m(this,new H(e,t))},_.decimalPlaces=_.dp=function(e,t){var r,n,o,i=this;if(null!=e)return g(e,0,h),null==t?t=C:g(t,0,8),G(new H(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-y(this.e/c))*c,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},_.dividedBy=_.div=function(e,t){return r(this,new H(e,t),R,C)},_.dividedToIntegerBy=_.idiv=function(e,t){return r(this,new H(e,t),0,1)},_.exponentiatedBy=_.pow=function(e,t){var r,n,s,u,l,f,p,h,y=this;if((e=new H(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+W(e));if(null!=t&&(t=new H(t)),l=e.e>14,!y.c||!y.c[0]||1==y.c[0]&&!y.e&&1==y.c.length||!e.c||!e.c[0])return h=new H(Math.pow(+W(y),l?e.s*(2-v(e)):+W(e))),t?h.mod(t):h;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new H(NaN);(n=!f&&y.isInteger()&&t.isInteger())&&(y=y.mod(t))}else{if(e.e>9&&(y.e>0||y.e<-1||(0==y.e?y.c[0]>1||l&&y.c[1]>=24e7:y.c[0]<8e13||l&&y.c[0]<=9999975e7)))return u=y.s<0&&v(e)?-0:0,y.e>-1&&(u=1/u),new H(f?1/u:u);D&&(u=o(D/c+2))}for(l?(r=new H(.5),f&&(e.s=1),p=v(e)):p=(s=Math.abs(+W(e)))%2,h=new H(B);;){if(p){if(!(h=h.times(y)).c)break;u?h.c.length>u&&(h.c.length=u):n&&(h=h.mod(t))}if(s){if(0===(s=i(s/2)))break;p=s%2}else if(G(e=e.times(r),e.e+1,1),e.e>14)p=v(e);else{if(0===(s=+W(e)))break;p=s%2}y=y.times(y),u?y.c&&y.c.length>u&&(y.c.length=u):n&&(y=y.mod(t))}return n?h:(f&&(h=B.div(h)),t?h.mod(t):u?G(h,D,C,undefined):h)},_.integerValue=function(e){var t=new H(this);return null==e?e=C:g(e,0,8),G(t,t.e+1,e)},_.isEqualTo=_.eq=function(e,t){return 0===m(this,new H(e,t))},_.isFinite=function(){return!!this.c},_.isGreaterThan=_.gt=function(e,t){return m(this,new H(e,t))>0},_.isGreaterThanOrEqualTo=_.gte=function(e,t){return 1===(t=m(this,new H(e,t)))||0===t},_.isInteger=function(){return!!this.c&&y(this.e/c)>this.c.length-2},_.isLessThan=_.lt=function(e,t){return m(this,new H(e,t))<0},_.isLessThanOrEqualTo=_.lte=function(e,t){return-1===(t=m(this,new H(e,t)))||0===t},_.isNaN=function(){return!this.s},_.isNegative=function(){return this.s<0},_.isPositive=function(){return this.s>0},_.isZero=function(){return!!this.c&&0==this.c[0]},_.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new H(e,t)).s,!s||!t)return new H(NaN);if(s!=t)return e.s=-t,a.plus(e);var l=a.e/c,f=e.e/c,p=a.c,h=e.c;if(!l||!f){if(!p||!h)return p?(e.s=-t,e):new H(h?a:NaN);if(!p[0]||!h[0])return h[0]?(e.s=-t,e):new H(p[0]?a:3==C?-0:0)}if(l=y(l),f=y(f),p=p.slice(),s=l-f){for((i=s<0)?(s=-s,o=p):(f=l,o=h),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=p.length)<(t=h.length))?s:t,s=t=0;t<n;t++)if(p[t]!=h[t]){i=p[t]<h[t];break}if(i&&(o=p,p=h,h=o,e.s=-e.s),(t=(n=h.length)-(r=p.length))>0)for(;t--;p[r++]=0);for(t=u-1;n>s;){if(p[--n]<h[n]){for(r=n;r&&!p[--r];p[r]=t);--p[r],p[n]+=u}p[n]-=h[n]}for(;0==p[0];p.splice(0,1),--f);return p[0]?$(e,p,f):(e.s=3==C?-1:1,e.c=[e.e=0],e)},_.modulo=_.mod=function(e,t){var n,o,i=this;return e=new H(e,t),!i.c||!e.s||e.c&&!e.c[0]?new H(NaN):!e.c||i.c&&!i.c[0]?new H(i):(9==F?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,F),(e=i.minus(n.times(e))).c[0]||1!=F||(e.s=i.s),e)},_.multipliedBy=_.times=function(e,t){var r,n,o,i,a,s,l,f,h,d,m,g,v,b,w,S=this,k=S.c,E=(e=new H(e,t)).c;if(!(k&&E&&k[0]&&E[0]))return!S.s||!e.s||k&&!k[0]&&!E||E&&!E[0]&&!k?e.c=e.e=e.s=null:(e.s*=S.s,k&&E?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=y(S.e/c)+y(e.e/c),e.s*=S.s,(l=k.length)<(d=E.length)&&(v=k,k=E,E=v,o=l,l=d,d=o),o=l+d,v=[];o--;v.push(0));for(b=u,w=p,o=d;--o>=0;){for(r=0,m=E[o]%w,g=E[o]/w|0,i=o+(a=l);i>o;)r=((f=m*(f=k[--a]%w)+(s=g*f+(h=k[a]/w|0)*m)%w*w+v[i]+r)/b|0)+(s/w|0)+g*h,v[i--]=f%b;v[i]=r}return r?++n:v.splice(0,1),$(e,v,n)},_.negated=function(){var e=new H(this);return e.s=-e.s||null,e},_.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new H(e,t)).s,!o||!t)return new H(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/c,a=e.e/c,s=n.c,l=e.c;if(!i||!a){if(!s||!l)return new H(o/0);if(!s[0]||!l[0])return l[0]?e:new H(s[0]?n:0*o)}if(i=y(i),a=y(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=l):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=l.length)<0&&(r=l,l=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+l[t]+o)/u|0,s[t]=u===s[t]?0:s[t]%u;return o&&(s=[o].concat(s),++a),$(e,s,a)},_.precision=_.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return g(e,1,h),null==t?t=C:g(t,0,8),G(new H(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*c+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},_.shiftedBy=function(e){return g(e,-9007199254740991,l),this.times("1e"+e)},_.squareRoot=_.sqrt=function(){var e,t,n,o,i,a=this,s=a.c,u=a.s,c=a.e,l=R+4,f=new H("0.5");if(1!==u||!s||!s[0])return new H(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+W(a)))||u==1/0?(((t=d(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=y((c+1)/2)-(c<0||c%2),n=new H(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new H(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(a,i,l,1))),d(i.c).slice(0,u)===(t=d(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(G(n,n.e+R+2,1),e=!n.times(n).eq(a));break}if(!o&&(G(i,i.e+R+2,0),i.times(i).eq(a))){n=i;break}l+=4,u+=4,o=1}return G(n,n.e+R+1,C,e)},_.toExponential=function(e,t){return null!=e&&(g(e,0,h),e++),z(this,e,t,1)},_.toFixed=function(e,t){return null!=e&&(g(e,0,h),e=e+this.e+1),z(this,e,t)},_.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=V;else if("object"!=typeof r)throw Error(a+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,s=n.split("."),u=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",f=s[0],p=s[1],h=o.s<0,y=h?f.slice(1):f,d=y.length;if(c&&(i=u,u=c,c=i,d-=i),u>0&&d>0){for(i=d%u||u,f=y.substr(0,i);i<d;i+=u)f+=l+y.substr(i,u);c>0&&(f+=l+y.slice(i)),h&&(f="-"+f)}n=p?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?p.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):f}return(r.prefix||"")+n+(r.suffix||"")},_.toFraction=function(e){var t,n,o,i,s,u,l,p,h,y,m,g,v=this,b=v.c;if(null!=e&&(!(l=new H(e)).isInteger()&&(l.c||1!==l.s)||l.lt(B)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+W(l));if(!b)return new H(v);for(t=new H(B),h=n=new H(B),o=p=new H(B),g=d(b),s=t.e=g.length-v.e-1,t.c[0]=f[(u=s%c)<0?c+u:u],e=!e||l.comparedTo(t)>0?s>0?t:h:l,u=j,j=1/0,l=new H(g),p.c[0]=0;y=r(l,t,0,1),1!=(i=n.plus(y.times(o))).comparedTo(e);)n=o,o=i,h=p.plus(y.times(i=h)),p=i,t=l.minus(y.times(i=t)),l=i;return i=r(e.minus(n),o,0,1),p=p.plus(i.times(h)),n=n.plus(i.times(o)),p.s=h.s=v.s,m=r(h,o,s*=2,C).minus(v).abs().comparedTo(r(p,n,s,C).minus(v).abs())<1?[h,o]:[p,n],j=u,m},_.toNumber=function(){return+W(this)},_.toPrecision=function(e,t){return null!=e&&g(e,1,h),z(this,e,t,2)},_.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=o<=U||o>=N?b(d(r.c),o):w(d(r.c),o,"0"):10===e&&K?t=w(d((r=G(new H(r),R+o+1,C)).c),r.e,"0"):(g(e,2,q.length,"Base"),t=S(w(d(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},_.valueOf=_.toJSON=function(){return W(this)},_._isBigNumber=!0,_[Symbol.toStringTag]="BigNumber",_[Symbol.for("nodejs.util.inspect.custom")]=_.valueOf,null!=t&&H.set(t),H}();const k=S;var E=r(6263),A=E.config((function(e){var t=1024;e.typedef("Value",e.varOpaque()),e.struct("ScpBallot",[["counter",e.lookup("Uint32")],["value",e.lookup("Value")]]),e.enum("ScpStatementType",{scpStPrepare:0,scpStConfirm:1,scpStExternalize:2,scpStNominate:3}),e.struct("ScpNomination",[["quorumSetHash",e.lookup("Hash")],["votes",e.varArray(e.lookup("Value"),2147483647)],["accepted",e.varArray(e.lookup("Value"),2147483647)]]),e.struct("ScpStatementPrepare",[["quorumSetHash",e.lookup("Hash")],["ballot",e.lookup("ScpBallot")],["prepared",e.option(e.lookup("ScpBallot"))],["preparedPrime",e.option(e.lookup("ScpBallot"))],["nC",e.lookup("Uint32")],["nH",e.lookup("Uint32")]]),e.struct("ScpStatementConfirm",[["ballot",e.lookup("ScpBallot")],["nPrepared",e.lookup("Uint32")],["nCommit",e.lookup("Uint32")],["nH",e.lookup("Uint32")],["quorumSetHash",e.lookup("Hash")]]),e.struct("ScpStatementExternalize",[["commit",e.lookup("ScpBallot")],["nH",e.lookup("Uint32")],["commitQuorumSetHash",e.lookup("Hash")]]),e.union("ScpStatementPledges",{switchOn:e.lookup("ScpStatementType"),switchName:"type",switches:[["scpStPrepare","prepare"],["scpStConfirm","confirm"],["scpStExternalize","externalize"],["scpStNominate","nominate"]],arms:{prepare:e.lookup("ScpStatementPrepare"),confirm:e.lookup("ScpStatementConfirm"),externalize:e.lookup("ScpStatementExternalize"),nominate:e.lookup("ScpNomination")}}),e.struct("ScpStatement",[["nodeId",e.lookup("NodeId")],["slotIndex",e.lookup("Uint64")],["pledges",e.lookup("ScpStatementPledges")]]),e.struct("ScpEnvelope",[["statement",e.lookup("ScpStatement")],["signature",e.lookup("Signature")]]),e.struct("ScpQuorumSet",[["threshold",e.lookup("Uint32")],["validators",e.varArray(e.lookup("NodeId"),2147483647)],["innerSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)]]),e.typedef("Thresholds",e.opaque(4)),e.typedef("String32",e.string(32)),e.typedef("String64",e.string(64)),e.typedef("SequenceNumber",e.lookup("Int64")),e.typedef("DataValue",e.varOpaque(64)),e.typedef("PoolId",e.lookup("Hash")),e.typedef("AssetCode4",e.opaque(4)),e.typedef("AssetCode12",e.opaque(12)),e.enum("AssetType",{assetTypeNative:0,assetTypeCreditAlphanum4:1,assetTypeCreditAlphanum12:2,assetTypePoolShare:3}),e.union("AssetCode",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:e.lookup("AssetCode4"),assetCode12:e.lookup("AssetCode12")}}),e.struct("AlphaNum4",[["assetCode",e.lookup("AssetCode4")],["issuer",e.lookup("AccountId")]]),e.struct("AlphaNum12",[["assetCode",e.lookup("AssetCode12")],["issuer",e.lookup("AccountId")]]),e.union("Asset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12")}}),e.struct("Price",[["n",e.lookup("Int32")],["d",e.lookup("Int32")]]),e.struct("Liabilities",[["buying",e.lookup("Int64")],["selling",e.lookup("Int64")]]),e.enum("ThresholdIndices",{thresholdMasterWeight:0,thresholdLow:1,thresholdMed:2,thresholdHigh:3}),e.enum("LedgerEntryType",{account:0,trustline:1,offer:2,data:3,claimableBalance:4,liquidityPool:5,contractData:6,contractCode:7,configSetting:8,ttl:9}),e.struct("Signer",[["key",e.lookup("SignerKey")],["weight",e.lookup("Uint32")]]),e.enum("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4,authClawbackEnabledFlag:8}),e.const("MASK_ACCOUNT_FLAGS",7),e.const("MASK_ACCOUNT_FLAGS_V17",15),e.const("MAX_SIGNERS",20),e.typedef("SponsorshipDescriptor",e.option(e.lookup("AccountId"))),e.struct("AccountEntryExtensionV3",[["ext",e.lookup("ExtensionPoint")],["seqLedger",e.lookup("Uint32")],["seqTime",e.lookup("TimePoint")]]),e.union("AccountEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[3,"v3"]],arms:{v3:e.lookup("AccountEntryExtensionV3")}}),e.struct("AccountEntryExtensionV2",[["numSponsored",e.lookup("Uint32")],["numSponsoring",e.lookup("Uint32")],["signerSponsoringIDs",e.varArray(e.lookup("SponsorshipDescriptor"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExtensionV2Ext")]]),e.union("AccountEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("AccountEntryExtensionV2")}}),e.struct("AccountEntryExtensionV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("AccountEntryExtensionV1Ext")]]),e.union("AccountEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("AccountEntryExtensionV1")}}),e.struct("AccountEntry",[["accountId",e.lookup("AccountId")],["balance",e.lookup("Int64")],["seqNum",e.lookup("SequenceNumber")],["numSubEntries",e.lookup("Uint32")],["inflationDest",e.option(e.lookup("AccountId"))],["flags",e.lookup("Uint32")],["homeDomain",e.lookup("String32")],["thresholds",e.lookup("Thresholds")],["signers",e.varArray(e.lookup("Signer"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExt")]]),e.enum("TrustLineFlags",{authorizedFlag:1,authorizedToMaintainLiabilitiesFlag:2,trustlineClawbackEnabledFlag:4}),e.const("MASK_TRUSTLINE_FLAGS",1),e.const("MASK_TRUSTLINE_FLAGS_V13",3),e.const("MASK_TRUSTLINE_FLAGS_V17",7),e.enum("LiquidityPoolType",{liquidityPoolConstantProduct:0}),e.union("TrustLineAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPoolId"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPoolId:e.lookup("PoolId")}}),e.union("TrustLineEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TrustLineEntryExtensionV2",[["liquidityPoolUseCount",e.lookup("Int32")],["ext",e.lookup("TrustLineEntryExtensionV2Ext")]]),e.union("TrustLineEntryV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("TrustLineEntryExtensionV2")}}),e.struct("TrustLineEntryV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("TrustLineEntryV1Ext")]]),e.union("TrustLineEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("TrustLineEntryV1")}}),e.struct("TrustLineEntry",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")],["balance",e.lookup("Int64")],["limit",e.lookup("Int64")],["flags",e.lookup("Uint32")],["ext",e.lookup("TrustLineEntryExt")]]),e.enum("OfferEntryFlags",{passiveFlag:1}),e.const("MASK_OFFERENTRY_FLAGS",1),e.union("OfferEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("OfferEntry",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["flags",e.lookup("Uint32")],["ext",e.lookup("OfferEntryExt")]]),e.union("DataEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("DataEntry",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")],["dataValue",e.lookup("DataValue")],["ext",e.lookup("DataEntryExt")]]),e.enum("ClaimPredicateType",{claimPredicateUnconditional:0,claimPredicateAnd:1,claimPredicateOr:2,claimPredicateNot:3,claimPredicateBeforeAbsoluteTime:4,claimPredicateBeforeRelativeTime:5}),e.union("ClaimPredicate",{switchOn:e.lookup("ClaimPredicateType"),switchName:"type",switches:[["claimPredicateUnconditional",e.void()],["claimPredicateAnd","andPredicates"],["claimPredicateOr","orPredicates"],["claimPredicateNot","notPredicate"],["claimPredicateBeforeAbsoluteTime","absBefore"],["claimPredicateBeforeRelativeTime","relBefore"]],arms:{andPredicates:e.varArray(e.lookup("ClaimPredicate"),2),orPredicates:e.varArray(e.lookup("ClaimPredicate"),2),notPredicate:e.option(e.lookup("ClaimPredicate")),absBefore:e.lookup("Int64"),relBefore:e.lookup("Int64")}}),e.enum("ClaimantType",{claimantTypeV0:0}),e.struct("ClaimantV0",[["destination",e.lookup("AccountId")],["predicate",e.lookup("ClaimPredicate")]]),e.union("Claimant",{switchOn:e.lookup("ClaimantType"),switchName:"type",switches:[["claimantTypeV0","v0"]],arms:{v0:e.lookup("ClaimantV0")}}),e.enum("ClaimableBalanceIdType",{claimableBalanceIdTypeV0:0}),e.union("ClaimableBalanceId",{switchOn:e.lookup("ClaimableBalanceIdType"),switchName:"type",switches:[["claimableBalanceIdTypeV0","v0"]],arms:{v0:e.lookup("Hash")}}),e.enum("ClaimableBalanceFlags",{claimableBalanceClawbackEnabledFlag:1}),e.const("MASK_CLAIMABLE_BALANCE_FLAGS",1),e.union("ClaimableBalanceEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("ClaimableBalanceEntryExtensionV1",[["ext",e.lookup("ClaimableBalanceEntryExtensionV1Ext")],["flags",e.lookup("Uint32")]]),e.union("ClaimableBalanceEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ClaimableBalanceEntryExtensionV1")}}),e.struct("ClaimableBalanceEntry",[["balanceId",e.lookup("ClaimableBalanceId")],["claimants",e.varArray(e.lookup("Claimant"),10)],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["ext",e.lookup("ClaimableBalanceEntryExt")]]),e.struct("LiquidityPoolConstantProductParameters",[["assetA",e.lookup("Asset")],["assetB",e.lookup("Asset")],["fee",e.lookup("Int32")]]),e.struct("LiquidityPoolEntryConstantProduct",[["params",e.lookup("LiquidityPoolConstantProductParameters")],["reserveA",e.lookup("Int64")],["reserveB",e.lookup("Int64")],["totalPoolShares",e.lookup("Int64")],["poolSharesTrustLineCount",e.lookup("Int64")]]),e.union("LiquidityPoolEntryBody",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolEntryConstantProduct")}}),e.struct("LiquidityPoolEntry",[["liquidityPoolId",e.lookup("PoolId")],["body",e.lookup("LiquidityPoolEntryBody")]]),e.enum("ContractDataDurability",{temporary:0,persistent:1}),e.struct("ContractDataEntry",[["ext",e.lookup("ExtensionPoint")],["contract",e.lookup("ScAddress")],["key",e.lookup("ScVal")],["durability",e.lookup("ContractDataDurability")],["val",e.lookup("ScVal")]]),e.struct("ContractCodeEntry",[["ext",e.lookup("ExtensionPoint")],["hash",e.lookup("Hash")],["code",e.varOpaque()]]),e.struct("TtlEntry",[["keyHash",e.lookup("Hash")],["liveUntilLedgerSeq",e.lookup("Uint32")]]),e.union("LedgerEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerEntryExtensionV1",[["sponsoringId",e.lookup("SponsorshipDescriptor")],["ext",e.lookup("LedgerEntryExtensionV1Ext")]]),e.union("LedgerEntryData",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:e.lookup("AccountEntry"),trustLine:e.lookup("TrustLineEntry"),offer:e.lookup("OfferEntry"),data:e.lookup("DataEntry"),claimableBalance:e.lookup("ClaimableBalanceEntry"),liquidityPool:e.lookup("LiquidityPoolEntry"),contractData:e.lookup("ContractDataEntry"),contractCode:e.lookup("ContractCodeEntry"),configSetting:e.lookup("ConfigSettingEntry"),ttl:e.lookup("TtlEntry")}}),e.union("LedgerEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerEntryExtensionV1")}}),e.struct("LedgerEntry",[["lastModifiedLedgerSeq",e.lookup("Uint32")],["data",e.lookup("LedgerEntryData")],["ext",e.lookup("LedgerEntryExt")]]),e.struct("LedgerKeyAccount",[["accountId",e.lookup("AccountId")]]),e.struct("LedgerKeyTrustLine",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")]]),e.struct("LedgerKeyOffer",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")]]),e.struct("LedgerKeyData",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")]]),e.struct("LedgerKeyClaimableBalance",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("LedgerKeyLiquidityPool",[["liquidityPoolId",e.lookup("PoolId")]]),e.struct("LedgerKeyContractData",[["contract",e.lookup("ScAddress")],["key",e.lookup("ScVal")],["durability",e.lookup("ContractDataDurability")]]),e.struct("LedgerKeyContractCode",[["hash",e.lookup("Hash")]]),e.struct("LedgerKeyConfigSetting",[["configSettingId",e.lookup("ConfigSettingId")]]),e.struct("LedgerKeyTtl",[["keyHash",e.lookup("Hash")]]),e.union("LedgerKey",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:e.lookup("LedgerKeyAccount"),trustLine:e.lookup("LedgerKeyTrustLine"),offer:e.lookup("LedgerKeyOffer"),data:e.lookup("LedgerKeyData"),claimableBalance:e.lookup("LedgerKeyClaimableBalance"),liquidityPool:e.lookup("LedgerKeyLiquidityPool"),contractData:e.lookup("LedgerKeyContractData"),contractCode:e.lookup("LedgerKeyContractCode"),configSetting:e.lookup("LedgerKeyConfigSetting"),ttl:e.lookup("LedgerKeyTtl")}}),e.enum("EnvelopeType",{envelopeTypeTxV0:0,envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4,envelopeTypeTxFeeBump:5,envelopeTypeOpId:6,envelopeTypePoolRevokeOpId:7,envelopeTypeContractId:8,envelopeTypeSorobanAuthorization:9}),e.typedef("UpgradeType",e.varOpaque(128)),e.enum("StellarValueType",{stellarValueBasic:0,stellarValueSigned:1}),e.struct("LedgerCloseValueSignature",[["nodeId",e.lookup("NodeId")],["signature",e.lookup("Signature")]]),e.union("StellarValueExt",{switchOn:e.lookup("StellarValueType"),switchName:"v",switches:[["stellarValueBasic",e.void()],["stellarValueSigned","lcValueSignature"]],arms:{lcValueSignature:e.lookup("LedgerCloseValueSignature")}}),e.struct("StellarValue",[["txSetHash",e.lookup("Hash")],["closeTime",e.lookup("TimePoint")],["upgrades",e.varArray(e.lookup("UpgradeType"),6)],["ext",e.lookup("StellarValueExt")]]),e.const("MASK_LEDGER_HEADER_FLAGS",7),e.enum("LedgerHeaderFlags",{disableLiquidityPoolTradingFlag:1,disableLiquidityPoolDepositFlag:2,disableLiquidityPoolWithdrawalFlag:4}),e.union("LedgerHeaderExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderExtensionV1",[["flags",e.lookup("Uint32")],["ext",e.lookup("LedgerHeaderExtensionV1Ext")]]),e.union("LedgerHeaderExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerHeaderExtensionV1")}}),e.struct("LedgerHeader",[["ledgerVersion",e.lookup("Uint32")],["previousLedgerHash",e.lookup("Hash")],["scpValue",e.lookup("StellarValue")],["txSetResultHash",e.lookup("Hash")],["bucketListHash",e.lookup("Hash")],["ledgerSeq",e.lookup("Uint32")],["totalCoins",e.lookup("Int64")],["feePool",e.lookup("Int64")],["inflationSeq",e.lookup("Uint32")],["idPool",e.lookup("Uint64")],["baseFee",e.lookup("Uint32")],["baseReserve",e.lookup("Uint32")],["maxTxSetSize",e.lookup("Uint32")],["skipList",e.array(e.lookup("Hash"),4)],["ext",e.lookup("LedgerHeaderExt")]]),e.enum("LedgerUpgradeType",{ledgerUpgradeVersion:1,ledgerUpgradeBaseFee:2,ledgerUpgradeMaxTxSetSize:3,ledgerUpgradeBaseReserve:4,ledgerUpgradeFlags:5,ledgerUpgradeConfig:6,ledgerUpgradeMaxSorobanTxSetSize:7}),e.struct("ConfigUpgradeSetKey",[["contractId",e.lookup("Hash")],["contentHash",e.lookup("Hash")]]),e.union("LedgerUpgrade",{switchOn:e.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"],["ledgerUpgradeBaseReserve","newBaseReserve"],["ledgerUpgradeFlags","newFlags"],["ledgerUpgradeConfig","newConfig"],["ledgerUpgradeMaxSorobanTxSetSize","newMaxSorobanTxSetSize"]],arms:{newLedgerVersion:e.lookup("Uint32"),newBaseFee:e.lookup("Uint32"),newMaxTxSetSize:e.lookup("Uint32"),newBaseReserve:e.lookup("Uint32"),newFlags:e.lookup("Uint32"),newConfig:e.lookup("ConfigUpgradeSetKey"),newMaxSorobanTxSetSize:e.lookup("Uint32")}}),e.struct("ConfigUpgradeSet",[["updatedEntry",e.varArray(e.lookup("ConfigSettingEntry"),2147483647)]]),e.enum("BucketEntryType",{metaentry:-1,liveentry:0,deadentry:1,initentry:2}),e.union("BucketMetadataExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("BucketMetadata",[["ledgerVersion",e.lookup("Uint32")],["ext",e.lookup("BucketMetadataExt")]]),e.union("BucketEntry",{switchOn:e.lookup("BucketEntryType"),switchName:"type",switches:[["liveentry","liveEntry"],["initentry","liveEntry"],["deadentry","deadEntry"],["metaentry","metaEntry"]],arms:{liveEntry:e.lookup("LedgerEntry"),deadEntry:e.lookup("LedgerKey"),metaEntry:e.lookup("BucketMetadata")}}),e.enum("TxSetComponentType",{txsetCompTxsMaybeDiscountedFee:0}),e.struct("TxSetComponentTxsMaybeDiscountedFee",[["baseFee",e.option(e.lookup("Int64"))],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.union("TxSetComponent",{switchOn:e.lookup("TxSetComponentType"),switchName:"type",switches:[["txsetCompTxsMaybeDiscountedFee","txsMaybeDiscountedFee"]],arms:{txsMaybeDiscountedFee:e.lookup("TxSetComponentTxsMaybeDiscountedFee")}}),e.union("TransactionPhase",{switchOn:e.int(),switchName:"v",switches:[[0,"v0Components"]],arms:{v0Components:e.varArray(e.lookup("TxSetComponent"),2147483647)}}),e.struct("TransactionSet",[["previousLedgerHash",e.lookup("Hash")],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.struct("TransactionSetV1",[["previousLedgerHash",e.lookup("Hash")],["phases",e.varArray(e.lookup("TransactionPhase"),2147483647)]]),e.union("GeneralizedTransactionSet",{switchOn:e.int(),switchName:"v",switches:[[1,"v1TxSet"]],arms:{v1TxSet:e.lookup("TransactionSetV1")}}),e.struct("TransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("TransactionResult")]]),e.struct("TransactionResultSet",[["results",e.varArray(e.lookup("TransactionResultPair"),2147483647)]]),e.union("TransactionHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"generalizedTxSet"]],arms:{generalizedTxSet:e.lookup("GeneralizedTransactionSet")}}),e.struct("TransactionHistoryEntry",[["ledgerSeq",e.lookup("Uint32")],["txSet",e.lookup("TransactionSet")],["ext",e.lookup("TransactionHistoryEntryExt")]]),e.union("TransactionHistoryResultEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionHistoryResultEntry",[["ledgerSeq",e.lookup("Uint32")],["txResultSet",e.lookup("TransactionResultSet")],["ext",e.lookup("TransactionHistoryResultEntryExt")]]),e.union("LedgerHeaderHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderHistoryEntry",[["hash",e.lookup("Hash")],["header",e.lookup("LedgerHeader")],["ext",e.lookup("LedgerHeaderHistoryEntryExt")]]),e.struct("LedgerScpMessages",[["ledgerSeq",e.lookup("Uint32")],["messages",e.varArray(e.lookup("ScpEnvelope"),2147483647)]]),e.struct("ScpHistoryEntryV0",[["quorumSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)],["ledgerMessages",e.lookup("LedgerScpMessages")]]),e.union("ScpHistoryEntry",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ScpHistoryEntryV0")}}),e.enum("LedgerEntryChangeType",{ledgerEntryCreated:0,ledgerEntryUpdated:1,ledgerEntryRemoved:2,ledgerEntryState:3}),e.union("LedgerEntryChange",{switchOn:e.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"]],arms:{created:e.lookup("LedgerEntry"),updated:e.lookup("LedgerEntry"),removed:e.lookup("LedgerKey"),state:e.lookup("LedgerEntry")}}),e.typedef("LedgerEntryChanges",e.varArray(e.lookup("LedgerEntryChange"),2147483647)),e.struct("OperationMeta",[["changes",e.lookup("LedgerEntryChanges")]]),e.struct("TransactionMetaV1",[["txChanges",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)]]),e.struct("TransactionMetaV2",[["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")]]),e.enum("ContractEventType",{system:0,contract:1,diagnostic:2}),e.struct("ContractEventV0",[["topics",e.varArray(e.lookup("ScVal"),2147483647)],["data",e.lookup("ScVal")]]),e.union("ContractEventBody",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ContractEventV0")}}),e.struct("ContractEvent",[["ext",e.lookup("ExtensionPoint")],["contractId",e.option(e.lookup("Hash"))],["type",e.lookup("ContractEventType")],["body",e.lookup("ContractEventBody")]]),e.struct("DiagnosticEvent",[["inSuccessfulContractCall",e.bool()],["event",e.lookup("ContractEvent")]]),e.struct("SorobanTransactionMeta",[["ext",e.lookup("ExtensionPoint")],["events",e.varArray(e.lookup("ContractEvent"),2147483647)],["returnValue",e.lookup("ScVal")],["diagnosticEvents",e.varArray(e.lookup("DiagnosticEvent"),2147483647)]]),e.struct("TransactionMetaV3",[["ext",e.lookup("ExtensionPoint")],["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")],["sorobanMeta",e.option(e.lookup("SorobanTransactionMeta"))]]),e.struct("InvokeHostFunctionSuccessPreImage",[["returnValue",e.lookup("ScVal")],["events",e.varArray(e.lookup("ContractEvent"),2147483647)]]),e.union("TransactionMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"],[3,"v3"]],arms:{operations:e.varArray(e.lookup("OperationMeta"),2147483647),v1:e.lookup("TransactionMetaV1"),v2:e.lookup("TransactionMetaV2"),v3:e.lookup("TransactionMetaV3")}}),e.struct("TransactionResultMeta",[["result",e.lookup("TransactionResultPair")],["feeProcessing",e.lookup("LedgerEntryChanges")],["txApplyProcessing",e.lookup("TransactionMeta")]]),e.struct("UpgradeEntryMeta",[["upgrade",e.lookup("LedgerUpgrade")],["changes",e.lookup("LedgerEntryChanges")]]),e.struct("LedgerCloseMetaV0",[["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("TransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)]]),e.struct("LedgerCloseMetaV1",[["ext",e.lookup("ExtensionPoint")],["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("GeneralizedTransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)],["totalByteSizeOfBucketList",e.lookup("Uint64")],["evictedTemporaryLedgerKeys",e.varArray(e.lookup("LedgerKey"),2147483647)],["evictedPersistentLedgerEntries",e.varArray(e.lookup("LedgerEntry"),2147483647)]]),e.union("LedgerCloseMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"],[1,"v1"]],arms:{v0:e.lookup("LedgerCloseMetaV0"),v1:e.lookup("LedgerCloseMetaV1")}}),e.enum("ErrorCode",{errMisc:0,errData:1,errConf:2,errAuth:3,errLoad:4}),e.struct("Error",[["code",e.lookup("ErrorCode")],["msg",e.string(100)]]),e.struct("SendMore",[["numMessages",e.lookup("Uint32")]]),e.struct("SendMoreExtended",[["numMessages",e.lookup("Uint32")],["numBytes",e.lookup("Uint32")]]),e.struct("AuthCert",[["pubkey",e.lookup("Curve25519Public")],["expiration",e.lookup("Uint64")],["sig",e.lookup("Signature")]]),e.struct("Hello",[["ledgerVersion",e.lookup("Uint32")],["overlayVersion",e.lookup("Uint32")],["overlayMinVersion",e.lookup("Uint32")],["networkId",e.lookup("Hash")],["versionStr",e.string(100)],["listeningPort",e.int()],["peerId",e.lookup("NodeId")],["cert",e.lookup("AuthCert")],["nonce",e.lookup("Uint256")]]),e.const("AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED",200),e.struct("Auth",[["flags",e.int()]]),e.enum("IpAddrType",{iPv4:0,iPv6:1}),e.union("PeerAddressIp",{switchOn:e.lookup("IpAddrType"),switchName:"type",switches:[["iPv4","ipv4"],["iPv6","ipv6"]],arms:{ipv4:e.opaque(4),ipv6:e.opaque(16)}}),e.struct("PeerAddress",[["ip",e.lookup("PeerAddressIp")],["port",e.lookup("Uint32")],["numFailures",e.lookup("Uint32")]]),e.enum("MessageType",{errorMsg:0,auth:2,dontHave:3,getPeers:4,peers:5,getTxSet:6,txSet:7,generalizedTxSet:17,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13,surveyRequest:14,surveyResponse:15,sendMore:16,sendMoreExtended:20,floodAdvert:18,floodDemand:19}),e.struct("DontHave",[["type",e.lookup("MessageType")],["reqHash",e.lookup("Uint256")]]),e.enum("SurveyMessageCommandType",{surveyTopology:0}),e.enum("SurveyMessageResponseType",{surveyTopologyResponseV0:0,surveyTopologyResponseV1:1}),e.struct("SurveyRequestMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["encryptionKey",e.lookup("Curve25519Public")],["commandType",e.lookup("SurveyMessageCommandType")]]),e.struct("SignedSurveyRequestMessage",[["requestSignature",e.lookup("Signature")],["request",e.lookup("SurveyRequestMessage")]]),e.typedef("EncryptedBody",e.varOpaque(64e3)),e.struct("SurveyResponseMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["commandType",e.lookup("SurveyMessageCommandType")],["encryptedBody",e.lookup("EncryptedBody")]]),e.struct("SignedSurveyResponseMessage",[["responseSignature",e.lookup("Signature")],["response",e.lookup("SurveyResponseMessage")]]),e.struct("PeerStats",[["id",e.lookup("NodeId")],["versionStr",e.string(100)],["messagesRead",e.lookup("Uint64")],["messagesWritten",e.lookup("Uint64")],["bytesRead",e.lookup("Uint64")],["bytesWritten",e.lookup("Uint64")],["secondsConnected",e.lookup("Uint64")],["uniqueFloodBytesRecv",e.lookup("Uint64")],["duplicateFloodBytesRecv",e.lookup("Uint64")],["uniqueFetchBytesRecv",e.lookup("Uint64")],["duplicateFetchBytesRecv",e.lookup("Uint64")],["uniqueFloodMessageRecv",e.lookup("Uint64")],["duplicateFloodMessageRecv",e.lookup("Uint64")],["uniqueFetchMessageRecv",e.lookup("Uint64")],["duplicateFetchMessageRecv",e.lookup("Uint64")]]),e.typedef("PeerStatList",e.varArray(e.lookup("PeerStats"),25)),e.struct("TopologyResponseBodyV0",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")]]),e.struct("TopologyResponseBodyV1",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")],["maxInboundPeerCount",e.lookup("Uint32")],["maxOutboundPeerCount",e.lookup("Uint32")]]),e.union("SurveyResponseBody",{switchOn:e.lookup("SurveyMessageResponseType"),switchName:"type",switches:[["surveyTopologyResponseV0","topologyResponseBodyV0"],["surveyTopologyResponseV1","topologyResponseBodyV1"]],arms:{topologyResponseBodyV0:e.lookup("TopologyResponseBodyV0"),topologyResponseBodyV1:e.lookup("TopologyResponseBodyV1")}}),e.const("TX_ADVERT_VECTOR_MAX_SIZE",1e3),e.typedef("TxAdvertVector",e.varArray(e.lookup("Hash"),e.lookup("TX_ADVERT_VECTOR_MAX_SIZE"))),e.struct("FloodAdvert",[["txHashes",e.lookup("TxAdvertVector")]]),e.const("TX_DEMAND_VECTOR_MAX_SIZE",1e3),e.typedef("TxDemandVector",e.varArray(e.lookup("Hash"),e.lookup("TX_DEMAND_VECTOR_MAX_SIZE"))),e.struct("FloodDemand",[["txHashes",e.lookup("TxDemandVector")]]),e.union("StellarMessage",{switchOn:e.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["getPeers",e.void()],["peers","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["generalizedTxSet","generalizedTxSet"],["transaction","transaction"],["surveyRequest","signedSurveyRequestMessage"],["surveyResponse","signedSurveyResponseMessage"],["getScpQuorumset","qSetHash"],["scpQuorumset","qSet"],["scpMessage","envelope"],["getScpState","getScpLedgerSeq"],["sendMore","sendMoreMessage"],["sendMoreExtended","sendMoreExtendedMessage"],["floodAdvert","floodAdvert"],["floodDemand","floodDemand"]],arms:{error:e.lookup("Error"),hello:e.lookup("Hello"),auth:e.lookup("Auth"),dontHave:e.lookup("DontHave"),peers:e.varArray(e.lookup("PeerAddress"),100),txSetHash:e.lookup("Uint256"),txSet:e.lookup("TransactionSet"),generalizedTxSet:e.lookup("GeneralizedTransactionSet"),transaction:e.lookup("TransactionEnvelope"),signedSurveyRequestMessage:e.lookup("SignedSurveyRequestMessage"),signedSurveyResponseMessage:e.lookup("SignedSurveyResponseMessage"),qSetHash:e.lookup("Uint256"),qSet:e.lookup("ScpQuorumSet"),envelope:e.lookup("ScpEnvelope"),getScpLedgerSeq:e.lookup("Uint32"),sendMoreMessage:e.lookup("SendMore"),sendMoreExtendedMessage:e.lookup("SendMoreExtended"),floodAdvert:e.lookup("FloodAdvert"),floodDemand:e.lookup("FloodDemand")}}),e.struct("AuthenticatedMessageV0",[["sequence",e.lookup("Uint64")],["message",e.lookup("StellarMessage")],["mac",e.lookup("HmacSha256Mac")]]),e.union("AuthenticatedMessage",{switchOn:e.lookup("Uint32"),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("AuthenticatedMessageV0")}}),e.const("MAX_OPS_PER_TX",100),e.union("LiquidityPoolParameters",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolConstantProductParameters")}}),e.struct("MuxedAccountMed25519",[["id",e.lookup("Uint64")],["ed25519",e.lookup("Uint256")]]),e.union("MuxedAccount",{switchOn:e.lookup("CryptoKeyType"),switchName:"type",switches:[["keyTypeEd25519","ed25519"],["keyTypeMuxedEd25519","med25519"]],arms:{ed25519:e.lookup("Uint256"),med25519:e.lookup("MuxedAccountMed25519")}}),e.struct("DecoratedSignature",[["hint",e.lookup("SignatureHint")],["signature",e.lookup("Signature")]]),e.enum("OperationType",{createAccount:0,payment:1,pathPaymentStrictReceive:2,manageSellOffer:3,createPassiveSellOffer:4,setOptions:5,changeTrust:6,allowTrust:7,accountMerge:8,inflation:9,manageData:10,bumpSequence:11,manageBuyOffer:12,pathPaymentStrictSend:13,createClaimableBalance:14,claimClaimableBalance:15,beginSponsoringFutureReserves:16,endSponsoringFutureReserves:17,revokeSponsorship:18,clawback:19,clawbackClaimableBalance:20,setTrustLineFlags:21,liquidityPoolDeposit:22,liquidityPoolWithdraw:23,invokeHostFunction:24,extendFootprintTtl:25,restoreFootprint:26}),e.struct("CreateAccountOp",[["destination",e.lookup("AccountId")],["startingBalance",e.lookup("Int64")]]),e.struct("PaymentOp",[["destination",e.lookup("MuxedAccount")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveOp",[["sendAsset",e.lookup("Asset")],["sendMax",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destAmount",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("PathPaymentStrictSendOp",[["sendAsset",e.lookup("Asset")],["sendAmount",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destMin",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("ManageSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("ManageBuyOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["buyAmount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("CreatePassiveSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")]]),e.struct("SetOptionsOp",[["inflationDest",e.option(e.lookup("AccountId"))],["clearFlags",e.option(e.lookup("Uint32"))],["setFlags",e.option(e.lookup("Uint32"))],["masterWeight",e.option(e.lookup("Uint32"))],["lowThreshold",e.option(e.lookup("Uint32"))],["medThreshold",e.option(e.lookup("Uint32"))],["highThreshold",e.option(e.lookup("Uint32"))],["homeDomain",e.option(e.lookup("String32"))],["signer",e.option(e.lookup("Signer"))]]),e.union("ChangeTrustAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPool"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPool:e.lookup("LiquidityPoolParameters")}}),e.struct("ChangeTrustOp",[["line",e.lookup("ChangeTrustAsset")],["limit",e.lookup("Int64")]]),e.struct("AllowTrustOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("AssetCode")],["authorize",e.lookup("Uint32")]]),e.struct("ManageDataOp",[["dataName",e.lookup("String64")],["dataValue",e.option(e.lookup("DataValue"))]]),e.struct("BumpSequenceOp",[["bumpTo",e.lookup("SequenceNumber")]]),e.struct("CreateClaimableBalanceOp",[["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["claimants",e.varArray(e.lookup("Claimant"),10)]]),e.struct("ClaimClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("BeginSponsoringFutureReservesOp",[["sponsoredId",e.lookup("AccountId")]]),e.enum("RevokeSponsorshipType",{revokeSponsorshipLedgerEntry:0,revokeSponsorshipSigner:1}),e.struct("RevokeSponsorshipOpSigner",[["accountId",e.lookup("AccountId")],["signerKey",e.lookup("SignerKey")]]),e.union("RevokeSponsorshipOp",{switchOn:e.lookup("RevokeSponsorshipType"),switchName:"type",switches:[["revokeSponsorshipLedgerEntry","ledgerKey"],["revokeSponsorshipSigner","signer"]],arms:{ledgerKey:e.lookup("LedgerKey"),signer:e.lookup("RevokeSponsorshipOpSigner")}}),e.struct("ClawbackOp",[["asset",e.lookup("Asset")],["from",e.lookup("MuxedAccount")],["amount",e.lookup("Int64")]]),e.struct("ClawbackClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("SetTrustLineFlagsOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("Asset")],["clearFlags",e.lookup("Uint32")],["setFlags",e.lookup("Uint32")]]),e.const("LIQUIDITY_POOL_FEE_V18",30),e.struct("LiquidityPoolDepositOp",[["liquidityPoolId",e.lookup("PoolId")],["maxAmountA",e.lookup("Int64")],["maxAmountB",e.lookup("Int64")],["minPrice",e.lookup("Price")],["maxPrice",e.lookup("Price")]]),e.struct("LiquidityPoolWithdrawOp",[["liquidityPoolId",e.lookup("PoolId")],["amount",e.lookup("Int64")],["minAmountA",e.lookup("Int64")],["minAmountB",e.lookup("Int64")]]),e.enum("HostFunctionType",{hostFunctionTypeInvokeContract:0,hostFunctionTypeCreateContract:1,hostFunctionTypeUploadContractWasm:2}),e.enum("ContractIdPreimageType",{contractIdPreimageFromAddress:0,contractIdPreimageFromAsset:1}),e.struct("ContractIdPreimageFromAddress",[["address",e.lookup("ScAddress")],["salt",e.lookup("Uint256")]]),e.union("ContractIdPreimage",{switchOn:e.lookup("ContractIdPreimageType"),switchName:"type",switches:[["contractIdPreimageFromAddress","fromAddress"],["contractIdPreimageFromAsset","fromAsset"]],arms:{fromAddress:e.lookup("ContractIdPreimageFromAddress"),fromAsset:e.lookup("Asset")}}),e.struct("CreateContractArgs",[["contractIdPreimage",e.lookup("ContractIdPreimage")],["executable",e.lookup("ContractExecutable")]]),e.struct("InvokeContractArgs",[["contractAddress",e.lookup("ScAddress")],["functionName",e.lookup("ScSymbol")],["args",e.varArray(e.lookup("ScVal"),2147483647)]]),e.union("HostFunction",{switchOn:e.lookup("HostFunctionType"),switchName:"type",switches:[["hostFunctionTypeInvokeContract","invokeContract"],["hostFunctionTypeCreateContract","createContract"],["hostFunctionTypeUploadContractWasm","wasm"]],arms:{invokeContract:e.lookup("InvokeContractArgs"),createContract:e.lookup("CreateContractArgs"),wasm:e.varOpaque()}}),e.enum("SorobanAuthorizedFunctionType",{sorobanAuthorizedFunctionTypeContractFn:0,sorobanAuthorizedFunctionTypeCreateContractHostFn:1}),e.union("SorobanAuthorizedFunction",{switchOn:e.lookup("SorobanAuthorizedFunctionType"),switchName:"type",switches:[["sorobanAuthorizedFunctionTypeContractFn","contractFn"],["sorobanAuthorizedFunctionTypeCreateContractHostFn","createContractHostFn"]],arms:{contractFn:e.lookup("InvokeContractArgs"),createContractHostFn:e.lookup("CreateContractArgs")}}),e.struct("SorobanAuthorizedInvocation",[["function",e.lookup("SorobanAuthorizedFunction")],["subInvocations",e.varArray(e.lookup("SorobanAuthorizedInvocation"),2147483647)]]),e.struct("SorobanAddressCredentials",[["address",e.lookup("ScAddress")],["nonce",e.lookup("Int64")],["signatureExpirationLedger",e.lookup("Uint32")],["signature",e.lookup("ScVal")]]),e.enum("SorobanCredentialsType",{sorobanCredentialsSourceAccount:0,sorobanCredentialsAddress:1}),e.union("SorobanCredentials",{switchOn:e.lookup("SorobanCredentialsType"),switchName:"type",switches:[["sorobanCredentialsSourceAccount",e.void()],["sorobanCredentialsAddress","address"]],arms:{address:e.lookup("SorobanAddressCredentials")}}),e.struct("SorobanAuthorizationEntry",[["credentials",e.lookup("SorobanCredentials")],["rootInvocation",e.lookup("SorobanAuthorizedInvocation")]]),e.struct("InvokeHostFunctionOp",[["hostFunction",e.lookup("HostFunction")],["auth",e.varArray(e.lookup("SorobanAuthorizationEntry"),2147483647)]]),e.struct("ExtendFootprintTtlOp",[["ext",e.lookup("ExtensionPoint")],["extendTo",e.lookup("Uint32")]]),e.struct("RestoreFootprintOp",[["ext",e.lookup("ExtensionPoint")]]),e.union("OperationBody",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPaymentStrictReceive","pathPaymentStrictReceiveOp"],["manageSellOffer","manageSellOfferOp"],["createPassiveSellOffer","createPassiveSellOfferOp"],["setOptions","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",e.void()],["manageData","manageDataOp"],["bumpSequence","bumpSequenceOp"],["manageBuyOffer","manageBuyOfferOp"],["pathPaymentStrictSend","pathPaymentStrictSendOp"],["createClaimableBalance","createClaimableBalanceOp"],["claimClaimableBalance","claimClaimableBalanceOp"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesOp"],["endSponsoringFutureReserves",e.void()],["revokeSponsorship","revokeSponsorshipOp"],["clawback","clawbackOp"],["clawbackClaimableBalance","clawbackClaimableBalanceOp"],["setTrustLineFlags","setTrustLineFlagsOp"],["liquidityPoolDeposit","liquidityPoolDepositOp"],["liquidityPoolWithdraw","liquidityPoolWithdrawOp"],["invokeHostFunction","invokeHostFunctionOp"],["extendFootprintTtl","extendFootprintTtlOp"],["restoreFootprint","restoreFootprintOp"]],arms:{createAccountOp:e.lookup("CreateAccountOp"),paymentOp:e.lookup("PaymentOp"),pathPaymentStrictReceiveOp:e.lookup("PathPaymentStrictReceiveOp"),manageSellOfferOp:e.lookup("ManageSellOfferOp"),createPassiveSellOfferOp:e.lookup("CreatePassiveSellOfferOp"),setOptionsOp:e.lookup("SetOptionsOp"),changeTrustOp:e.lookup("ChangeTrustOp"),allowTrustOp:e.lookup("AllowTrustOp"),destination:e.lookup("MuxedAccount"),manageDataOp:e.lookup("ManageDataOp"),bumpSequenceOp:e.lookup("BumpSequenceOp"),manageBuyOfferOp:e.lookup("ManageBuyOfferOp"),pathPaymentStrictSendOp:e.lookup("PathPaymentStrictSendOp"),createClaimableBalanceOp:e.lookup("CreateClaimableBalanceOp"),claimClaimableBalanceOp:e.lookup("ClaimClaimableBalanceOp"),beginSponsoringFutureReservesOp:e.lookup("BeginSponsoringFutureReservesOp"),revokeSponsorshipOp:e.lookup("RevokeSponsorshipOp"),clawbackOp:e.lookup("ClawbackOp"),clawbackClaimableBalanceOp:e.lookup("ClawbackClaimableBalanceOp"),setTrustLineFlagsOp:e.lookup("SetTrustLineFlagsOp"),liquidityPoolDepositOp:e.lookup("LiquidityPoolDepositOp"),liquidityPoolWithdrawOp:e.lookup("LiquidityPoolWithdrawOp"),invokeHostFunctionOp:e.lookup("InvokeHostFunctionOp"),extendFootprintTtlOp:e.lookup("ExtendFootprintTtlOp"),restoreFootprintOp:e.lookup("RestoreFootprintOp")}}),e.struct("Operation",[["sourceAccount",e.option(e.lookup("MuxedAccount"))],["body",e.lookup("OperationBody")]]),e.struct("HashIdPreimageOperationId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")]]),e.struct("HashIdPreimageRevokeId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")],["liquidityPoolId",e.lookup("PoolId")],["asset",e.lookup("Asset")]]),e.struct("HashIdPreimageContractId",[["networkId",e.lookup("Hash")],["contractIdPreimage",e.lookup("ContractIdPreimage")]]),e.struct("HashIdPreimageSorobanAuthorization",[["networkId",e.lookup("Hash")],["nonce",e.lookup("Int64")],["signatureExpirationLedger",e.lookup("Uint32")],["invocation",e.lookup("SorobanAuthorizedInvocation")]]),e.union("HashIdPreimage",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeOpId","operationId"],["envelopeTypePoolRevokeOpId","revokeId"],["envelopeTypeContractId","contractId"],["envelopeTypeSorobanAuthorization","sorobanAuthorization"]],arms:{operationId:e.lookup("HashIdPreimageOperationId"),revokeId:e.lookup("HashIdPreimageRevokeId"),contractId:e.lookup("HashIdPreimageContractId"),sorobanAuthorization:e.lookup("HashIdPreimageSorobanAuthorization")}}),e.enum("MemoType",{memoNone:0,memoText:1,memoId:2,memoHash:3,memoReturn:4}),e.union("Memo",{switchOn:e.lookup("MemoType"),switchName:"type",switches:[["memoNone",e.void()],["memoText","text"],["memoId","id"],["memoHash","hash"],["memoReturn","retHash"]],arms:{text:e.string(28),id:e.lookup("Uint64"),hash:e.lookup("Hash"),retHash:e.lookup("Hash")}}),e.struct("TimeBounds",[["minTime",e.lookup("TimePoint")],["maxTime",e.lookup("TimePoint")]]),e.struct("LedgerBounds",[["minLedger",e.lookup("Uint32")],["maxLedger",e.lookup("Uint32")]]),e.struct("PreconditionsV2",[["timeBounds",e.option(e.lookup("TimeBounds"))],["ledgerBounds",e.option(e.lookup("LedgerBounds"))],["minSeqNum",e.option(e.lookup("SequenceNumber"))],["minSeqAge",e.lookup("Duration")],["minSeqLedgerGap",e.lookup("Uint32")],["extraSigners",e.varArray(e.lookup("SignerKey"),2)]]),e.enum("PreconditionType",{precondNone:0,precondTime:1,precondV2:2}),e.union("Preconditions",{switchOn:e.lookup("PreconditionType"),switchName:"type",switches:[["precondNone",e.void()],["precondTime","timeBounds"],["precondV2","v2"]],arms:{timeBounds:e.lookup("TimeBounds"),v2:e.lookup("PreconditionsV2")}}),e.struct("LedgerFootprint",[["readOnly",e.varArray(e.lookup("LedgerKey"),2147483647)],["readWrite",e.varArray(e.lookup("LedgerKey"),2147483647)]]),e.struct("SorobanResources",[["footprint",e.lookup("LedgerFootprint")],["instructions",e.lookup("Uint32")],["readBytes",e.lookup("Uint32")],["writeBytes",e.lookup("Uint32")]]),e.struct("SorobanTransactionData",[["ext",e.lookup("ExtensionPoint")],["resources",e.lookup("SorobanResources")],["resourceFee",e.lookup("Int64")]]),e.union("TransactionV0Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionV0",[["sourceAccountEd25519",e.lookup("Uint256")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["timeBounds",e.option(e.lookup("TimeBounds"))],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionV0Ext")]]),e.struct("TransactionV0Envelope",[["tx",e.lookup("TransactionV0")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"sorobanData"]],arms:{sorobanData:e.lookup("SorobanTransactionData")}}),e.struct("Transaction",[["sourceAccount",e.lookup("MuxedAccount")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["cond",e.lookup("Preconditions")],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionExt")]]),e.struct("TransactionV1Envelope",[["tx",e.lookup("Transaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("FeeBumpTransactionInnerTx",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","v1"]],arms:{v1:e.lookup("TransactionV1Envelope")}}),e.union("FeeBumpTransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("FeeBumpTransaction",[["feeSource",e.lookup("MuxedAccount")],["fee",e.lookup("Int64")],["innerTx",e.lookup("FeeBumpTransactionInnerTx")],["ext",e.lookup("FeeBumpTransactionExt")]]),e.struct("FeeBumpTransactionEnvelope",[["tx",e.lookup("FeeBumpTransaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionEnvelope",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTxV0","v0"],["envelopeTypeTx","v1"],["envelopeTypeTxFeeBump","feeBump"]],arms:{v0:e.lookup("TransactionV0Envelope"),v1:e.lookup("TransactionV1Envelope"),feeBump:e.lookup("FeeBumpTransactionEnvelope")}}),e.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"],["envelopeTypeTxFeeBump","feeBump"]],arms:{tx:e.lookup("Transaction"),feeBump:e.lookup("FeeBumpTransaction")}}),e.struct("TransactionSignaturePayload",[["networkId",e.lookup("Hash")],["taggedTransaction",e.lookup("TransactionSignaturePayloadTaggedTransaction")]]),e.enum("ClaimAtomType",{claimAtomTypeV0:0,claimAtomTypeOrderBook:1,claimAtomTypeLiquidityPool:2}),e.struct("ClaimOfferAtomV0",[["sellerEd25519",e.lookup("Uint256")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimOfferAtom",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimLiquidityAtom",[["liquidityPoolId",e.lookup("PoolId")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.union("ClaimAtom",{switchOn:e.lookup("ClaimAtomType"),switchName:"type",switches:[["claimAtomTypeV0","v0"],["claimAtomTypeOrderBook","orderBook"],["claimAtomTypeLiquidityPool","liquidityPool"]],arms:{v0:e.lookup("ClaimOfferAtomV0"),orderBook:e.lookup("ClaimOfferAtom"),liquidityPool:e.lookup("ClaimLiquidityAtom")}}),e.enum("CreateAccountResultCode",{createAccountSuccess:0,createAccountMalformed:-1,createAccountUnderfunded:-2,createAccountLowReserve:-3,createAccountAlreadyExist:-4}),e.union("CreateAccountResult",{switchOn:e.lookup("CreateAccountResultCode"),switchName:"code",switches:[["createAccountSuccess",e.void()],["createAccountMalformed",e.void()],["createAccountUnderfunded",e.void()],["createAccountLowReserve",e.void()],["createAccountAlreadyExist",e.void()]],arms:{}}),e.enum("PaymentResultCode",{paymentSuccess:0,paymentMalformed:-1,paymentUnderfunded:-2,paymentSrcNoTrust:-3,paymentSrcNotAuthorized:-4,paymentNoDestination:-5,paymentNoTrust:-6,paymentNotAuthorized:-7,paymentLineFull:-8,paymentNoIssuer:-9}),e.union("PaymentResult",{switchOn:e.lookup("PaymentResultCode"),switchName:"code",switches:[["paymentSuccess",e.void()],["paymentMalformed",e.void()],["paymentUnderfunded",e.void()],["paymentSrcNoTrust",e.void()],["paymentSrcNotAuthorized",e.void()],["paymentNoDestination",e.void()],["paymentNoTrust",e.void()],["paymentNotAuthorized",e.void()],["paymentLineFull",e.void()],["paymentNoIssuer",e.void()]],arms:{}}),e.enum("PathPaymentStrictReceiveResultCode",{pathPaymentStrictReceiveSuccess:0,pathPaymentStrictReceiveMalformed:-1,pathPaymentStrictReceiveUnderfunded:-2,pathPaymentStrictReceiveSrcNoTrust:-3,pathPaymentStrictReceiveSrcNotAuthorized:-4,pathPaymentStrictReceiveNoDestination:-5,pathPaymentStrictReceiveNoTrust:-6,pathPaymentStrictReceiveNotAuthorized:-7,pathPaymentStrictReceiveLineFull:-8,pathPaymentStrictReceiveNoIssuer:-9,pathPaymentStrictReceiveTooFewOffers:-10,pathPaymentStrictReceiveOfferCrossSelf:-11,pathPaymentStrictReceiveOverSendmax:-12}),e.struct("SimplePaymentResult",[["destination",e.lookup("AccountId")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictReceiveResult",{switchOn:e.lookup("PathPaymentStrictReceiveResultCode"),switchName:"code",switches:[["pathPaymentStrictReceiveSuccess","success"],["pathPaymentStrictReceiveMalformed",e.void()],["pathPaymentStrictReceiveUnderfunded",e.void()],["pathPaymentStrictReceiveSrcNoTrust",e.void()],["pathPaymentStrictReceiveSrcNotAuthorized",e.void()],["pathPaymentStrictReceiveNoDestination",e.void()],["pathPaymentStrictReceiveNoTrust",e.void()],["pathPaymentStrictReceiveNotAuthorized",e.void()],["pathPaymentStrictReceiveLineFull",e.void()],["pathPaymentStrictReceiveNoIssuer","noIssuer"],["pathPaymentStrictReceiveTooFewOffers",e.void()],["pathPaymentStrictReceiveOfferCrossSelf",e.void()],["pathPaymentStrictReceiveOverSendmax",e.void()]],arms:{success:e.lookup("PathPaymentStrictReceiveResultSuccess"),noIssuer:e.lookup("Asset")}}),e.enum("PathPaymentStrictSendResultCode",{pathPaymentStrictSendSuccess:0,pathPaymentStrictSendMalformed:-1,pathPaymentStrictSendUnderfunded:-2,pathPaymentStrictSendSrcNoTrust:-3,pathPaymentStrictSendSrcNotAuthorized:-4,pathPaymentStrictSendNoDestination:-5,pathPaymentStrictSendNoTrust:-6,pathPaymentStrictSendNotAuthorized:-7,pathPaymentStrictSendLineFull:-8,pathPaymentStrictSendNoIssuer:-9,pathPaymentStrictSendTooFewOffers:-10,pathPaymentStrictSendOfferCrossSelf:-11,pathPaymentStrictSendUnderDestmin:-12}),e.struct("PathPaymentStrictSendResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictSendResult",{switchOn:e.lookup("PathPaymentStrictSendResultCode"),switchName:"code",switches:[["pathPaymentStrictSendSuccess","success"],["pathPaymentStrictSendMalformed",e.void()],["pathPaymentStrictSendUnderfunded",e.void()],["pathPaymentStrictSendSrcNoTrust",e.void()],["pathPaymentStrictSendSrcNotAuthorized",e.void()],["pathPaymentStrictSendNoDestination",e.void()],["pathPaymentStrictSendNoTrust",e.void()],["pathPaymentStrictSendNotAuthorized",e.void()],["pathPaymentStrictSendLineFull",e.void()],["pathPaymentStrictSendNoIssuer","noIssuer"],["pathPaymentStrictSendTooFewOffers",e.void()],["pathPaymentStrictSendOfferCrossSelf",e.void()],["pathPaymentStrictSendUnderDestmin",e.void()]],arms:{success:e.lookup("PathPaymentStrictSendResultSuccess"),noIssuer:e.lookup("Asset")}}),e.enum("ManageSellOfferResultCode",{manageSellOfferSuccess:0,manageSellOfferMalformed:-1,manageSellOfferSellNoTrust:-2,manageSellOfferBuyNoTrust:-3,manageSellOfferSellNotAuthorized:-4,manageSellOfferBuyNotAuthorized:-5,manageSellOfferLineFull:-6,manageSellOfferUnderfunded:-7,manageSellOfferCrossSelf:-8,manageSellOfferSellNoIssuer:-9,manageSellOfferBuyNoIssuer:-10,manageSellOfferNotFound:-11,manageSellOfferLowReserve:-12}),e.enum("ManageOfferEffect",{manageOfferCreated:0,manageOfferUpdated:1,manageOfferDeleted:2}),e.union("ManageOfferSuccessResultOffer",{switchOn:e.lookup("ManageOfferEffect"),switchName:"effect",switches:[["manageOfferCreated","offer"],["manageOfferUpdated","offer"],["manageOfferDeleted",e.void()]],arms:{offer:e.lookup("OfferEntry")}}),e.struct("ManageOfferSuccessResult",[["offersClaimed",e.varArray(e.lookup("ClaimAtom"),2147483647)],["offer",e.lookup("ManageOfferSuccessResultOffer")]]),e.union("ManageSellOfferResult",{switchOn:e.lookup("ManageSellOfferResultCode"),switchName:"code",switches:[["manageSellOfferSuccess","success"],["manageSellOfferMalformed",e.void()],["manageSellOfferSellNoTrust",e.void()],["manageSellOfferBuyNoTrust",e.void()],["manageSellOfferSellNotAuthorized",e.void()],["manageSellOfferBuyNotAuthorized",e.void()],["manageSellOfferLineFull",e.void()],["manageSellOfferUnderfunded",e.void()],["manageSellOfferCrossSelf",e.void()],["manageSellOfferSellNoIssuer",e.void()],["manageSellOfferBuyNoIssuer",e.void()],["manageSellOfferNotFound",e.void()],["manageSellOfferLowReserve",e.void()]],arms:{success:e.lookup("ManageOfferSuccessResult")}}),e.enum("ManageBuyOfferResultCode",{manageBuyOfferSuccess:0,manageBuyOfferMalformed:-1,manageBuyOfferSellNoTrust:-2,manageBuyOfferBuyNoTrust:-3,manageBuyOfferSellNotAuthorized:-4,manageBuyOfferBuyNotAuthorized:-5,manageBuyOfferLineFull:-6,manageBuyOfferUnderfunded:-7,manageBuyOfferCrossSelf:-8,manageBuyOfferSellNoIssuer:-9,manageBuyOfferBuyNoIssuer:-10,manageBuyOfferNotFound:-11,manageBuyOfferLowReserve:-12}),e.union("ManageBuyOfferResult",{switchOn:e.lookup("ManageBuyOfferResultCode"),switchName:"code",switches:[["manageBuyOfferSuccess","success"],["manageBuyOfferMalformed",e.void()],["manageBuyOfferSellNoTrust",e.void()],["manageBuyOfferBuyNoTrust",e.void()],["manageBuyOfferSellNotAuthorized",e.void()],["manageBuyOfferBuyNotAuthorized",e.void()],["manageBuyOfferLineFull",e.void()],["manageBuyOfferUnderfunded",e.void()],["manageBuyOfferCrossSelf",e.void()],["manageBuyOfferSellNoIssuer",e.void()],["manageBuyOfferBuyNoIssuer",e.void()],["manageBuyOfferNotFound",e.void()],["manageBuyOfferLowReserve",e.void()]],arms:{success:e.lookup("ManageOfferSuccessResult")}}),e.enum("SetOptionsResultCode",{setOptionsSuccess:0,setOptionsLowReserve:-1,setOptionsTooManySigners:-2,setOptionsBadFlags:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9,setOptionsAuthRevocableRequired:-10}),e.union("SetOptionsResult",{switchOn:e.lookup("SetOptionsResultCode"),switchName:"code",switches:[["setOptionsSuccess",e.void()],["setOptionsLowReserve",e.void()],["setOptionsTooManySigners",e.void()],["setOptionsBadFlags",e.void()],["setOptionsInvalidInflation",e.void()],["setOptionsCantChange",e.void()],["setOptionsUnknownFlag",e.void()],["setOptionsThresholdOutOfRange",e.void()],["setOptionsBadSigner",e.void()],["setOptionsInvalidHomeDomain",e.void()],["setOptionsAuthRevocableRequired",e.void()]],arms:{}}),e.enum("ChangeTrustResultCode",{changeTrustSuccess:0,changeTrustMalformed:-1,changeTrustNoIssuer:-2,changeTrustInvalidLimit:-3,changeTrustLowReserve:-4,changeTrustSelfNotAllowed:-5,changeTrustTrustLineMissing:-6,changeTrustCannotDelete:-7,changeTrustNotAuthMaintainLiabilities:-8}),e.union("ChangeTrustResult",{switchOn:e.lookup("ChangeTrustResultCode"),switchName:"code",switches:[["changeTrustSuccess",e.void()],["changeTrustMalformed",e.void()],["changeTrustNoIssuer",e.void()],["changeTrustInvalidLimit",e.void()],["changeTrustLowReserve",e.void()],["changeTrustSelfNotAllowed",e.void()],["changeTrustTrustLineMissing",e.void()],["changeTrustCannotDelete",e.void()],["changeTrustNotAuthMaintainLiabilities",e.void()]],arms:{}}),e.enum("AllowTrustResultCode",{allowTrustSuccess:0,allowTrustMalformed:-1,allowTrustNoTrustLine:-2,allowTrustTrustNotRequired:-3,allowTrustCantRevoke:-4,allowTrustSelfNotAllowed:-5,allowTrustLowReserve:-6}),e.union("AllowTrustResult",{switchOn:e.lookup("AllowTrustResultCode"),switchName:"code",switches:[["allowTrustSuccess",e.void()],["allowTrustMalformed",e.void()],["allowTrustNoTrustLine",e.void()],["allowTrustTrustNotRequired",e.void()],["allowTrustCantRevoke",e.void()],["allowTrustSelfNotAllowed",e.void()],["allowTrustLowReserve",e.void()]],arms:{}}),e.enum("AccountMergeResultCode",{accountMergeSuccess:0,accountMergeMalformed:-1,accountMergeNoAccount:-2,accountMergeImmutableSet:-3,accountMergeHasSubEntries:-4,accountMergeSeqnumTooFar:-5,accountMergeDestFull:-6,accountMergeIsSponsor:-7}),e.union("AccountMergeResult",{switchOn:e.lookup("AccountMergeResultCode"),switchName:"code",switches:[["accountMergeSuccess","sourceAccountBalance"],["accountMergeMalformed",e.void()],["accountMergeNoAccount",e.void()],["accountMergeImmutableSet",e.void()],["accountMergeHasSubEntries",e.void()],["accountMergeSeqnumTooFar",e.void()],["accountMergeDestFull",e.void()],["accountMergeIsSponsor",e.void()]],arms:{sourceAccountBalance:e.lookup("Int64")}}),e.enum("InflationResultCode",{inflationSuccess:0,inflationNotTime:-1}),e.struct("InflationPayout",[["destination",e.lookup("AccountId")],["amount",e.lookup("Int64")]]),e.union("InflationResult",{switchOn:e.lookup("InflationResultCode"),switchName:"code",switches:[["inflationSuccess","payouts"],["inflationNotTime",e.void()]],arms:{payouts:e.varArray(e.lookup("InflationPayout"),2147483647)}}),e.enum("ManageDataResultCode",{manageDataSuccess:0,manageDataNotSupportedYet:-1,manageDataNameNotFound:-2,manageDataLowReserve:-3,manageDataInvalidName:-4}),e.union("ManageDataResult",{switchOn:e.lookup("ManageDataResultCode"),switchName:"code",switches:[["manageDataSuccess",e.void()],["manageDataNotSupportedYet",e.void()],["manageDataNameNotFound",e.void()],["manageDataLowReserve",e.void()],["manageDataInvalidName",e.void()]],arms:{}}),e.enum("BumpSequenceResultCode",{bumpSequenceSuccess:0,bumpSequenceBadSeq:-1}),e.union("BumpSequenceResult",{switchOn:e.lookup("BumpSequenceResultCode"),switchName:"code",switches:[["bumpSequenceSuccess",e.void()],["bumpSequenceBadSeq",e.void()]],arms:{}}),e.enum("CreateClaimableBalanceResultCode",{createClaimableBalanceSuccess:0,createClaimableBalanceMalformed:-1,createClaimableBalanceLowReserve:-2,createClaimableBalanceNoTrust:-3,createClaimableBalanceNotAuthorized:-4,createClaimableBalanceUnderfunded:-5}),e.union("CreateClaimableBalanceResult",{switchOn:e.lookup("CreateClaimableBalanceResultCode"),switchName:"code",switches:[["createClaimableBalanceSuccess","balanceId"],["createClaimableBalanceMalformed",e.void()],["createClaimableBalanceLowReserve",e.void()],["createClaimableBalanceNoTrust",e.void()],["createClaimableBalanceNotAuthorized",e.void()],["createClaimableBalanceUnderfunded",e.void()]],arms:{balanceId:e.lookup("ClaimableBalanceId")}}),e.enum("ClaimClaimableBalanceResultCode",{claimClaimableBalanceSuccess:0,claimClaimableBalanceDoesNotExist:-1,claimClaimableBalanceCannotClaim:-2,claimClaimableBalanceLineFull:-3,claimClaimableBalanceNoTrust:-4,claimClaimableBalanceNotAuthorized:-5}),e.union("ClaimClaimableBalanceResult",{switchOn:e.lookup("ClaimClaimableBalanceResultCode"),switchName:"code",switches:[["claimClaimableBalanceSuccess",e.void()],["claimClaimableBalanceDoesNotExist",e.void()],["claimClaimableBalanceCannotClaim",e.void()],["claimClaimableBalanceLineFull",e.void()],["claimClaimableBalanceNoTrust",e.void()],["claimClaimableBalanceNotAuthorized",e.void()]],arms:{}}),e.enum("BeginSponsoringFutureReservesResultCode",{beginSponsoringFutureReservesSuccess:0,beginSponsoringFutureReservesMalformed:-1,beginSponsoringFutureReservesAlreadySponsored:-2,beginSponsoringFutureReservesRecursive:-3}),e.union("BeginSponsoringFutureReservesResult",{switchOn:e.lookup("BeginSponsoringFutureReservesResultCode"),switchName:"code",switches:[["beginSponsoringFutureReservesSuccess",e.void()],["beginSponsoringFutureReservesMalformed",e.void()],["beginSponsoringFutureReservesAlreadySponsored",e.void()],["beginSponsoringFutureReservesRecursive",e.void()]],arms:{}}),e.enum("EndSponsoringFutureReservesResultCode",{endSponsoringFutureReservesSuccess:0,endSponsoringFutureReservesNotSponsored:-1}),e.union("EndSponsoringFutureReservesResult",{switchOn:e.lookup("EndSponsoringFutureReservesResultCode"),switchName:"code",switches:[["endSponsoringFutureReservesSuccess",e.void()],["endSponsoringFutureReservesNotSponsored",e.void()]],arms:{}}),e.enum("RevokeSponsorshipResultCode",{revokeSponsorshipSuccess:0,revokeSponsorshipDoesNotExist:-1,revokeSponsorshipNotSponsor:-2,revokeSponsorshipLowReserve:-3,revokeSponsorshipOnlyTransferable:-4,revokeSponsorshipMalformed:-5}),e.union("RevokeSponsorshipResult",{switchOn:e.lookup("RevokeSponsorshipResultCode"),switchName:"code",switches:[["revokeSponsorshipSuccess",e.void()],["revokeSponsorshipDoesNotExist",e.void()],["revokeSponsorshipNotSponsor",e.void()],["revokeSponsorshipLowReserve",e.void()],["revokeSponsorshipOnlyTransferable",e.void()],["revokeSponsorshipMalformed",e.void()]],arms:{}}),e.enum("ClawbackResultCode",{clawbackSuccess:0,clawbackMalformed:-1,clawbackNotClawbackEnabled:-2,clawbackNoTrust:-3,clawbackUnderfunded:-4}),e.union("ClawbackResult",{switchOn:e.lookup("ClawbackResultCode"),switchName:"code",switches:[["clawbackSuccess",e.void()],["clawbackMalformed",e.void()],["clawbackNotClawbackEnabled",e.void()],["clawbackNoTrust",e.void()],["clawbackUnderfunded",e.void()]],arms:{}}),e.enum("ClawbackClaimableBalanceResultCode",{clawbackClaimableBalanceSuccess:0,clawbackClaimableBalanceDoesNotExist:-1,clawbackClaimableBalanceNotIssuer:-2,clawbackClaimableBalanceNotClawbackEnabled:-3}),e.union("ClawbackClaimableBalanceResult",{switchOn:e.lookup("ClawbackClaimableBalanceResultCode"),switchName:"code",switches:[["clawbackClaimableBalanceSuccess",e.void()],["clawbackClaimableBalanceDoesNotExist",e.void()],["clawbackClaimableBalanceNotIssuer",e.void()],["clawbackClaimableBalanceNotClawbackEnabled",e.void()]],arms:{}}),e.enum("SetTrustLineFlagsResultCode",{setTrustLineFlagsSuccess:0,setTrustLineFlagsMalformed:-1,setTrustLineFlagsNoTrustLine:-2,setTrustLineFlagsCantRevoke:-3,setTrustLineFlagsInvalidState:-4,setTrustLineFlagsLowReserve:-5}),e.union("SetTrustLineFlagsResult",{switchOn:e.lookup("SetTrustLineFlagsResultCode"),switchName:"code",switches:[["setTrustLineFlagsSuccess",e.void()],["setTrustLineFlagsMalformed",e.void()],["setTrustLineFlagsNoTrustLine",e.void()],["setTrustLineFlagsCantRevoke",e.void()],["setTrustLineFlagsInvalidState",e.void()],["setTrustLineFlagsLowReserve",e.void()]],arms:{}}),e.enum("LiquidityPoolDepositResultCode",{liquidityPoolDepositSuccess:0,liquidityPoolDepositMalformed:-1,liquidityPoolDepositNoTrust:-2,liquidityPoolDepositNotAuthorized:-3,liquidityPoolDepositUnderfunded:-4,liquidityPoolDepositLineFull:-5,liquidityPoolDepositBadPrice:-6,liquidityPoolDepositPoolFull:-7}),e.union("LiquidityPoolDepositResult",{switchOn:e.lookup("LiquidityPoolDepositResultCode"),switchName:"code",switches:[["liquidityPoolDepositSuccess",e.void()],["liquidityPoolDepositMalformed",e.void()],["liquidityPoolDepositNoTrust",e.void()],["liquidityPoolDepositNotAuthorized",e.void()],["liquidityPoolDepositUnderfunded",e.void()],["liquidityPoolDepositLineFull",e.void()],["liquidityPoolDepositBadPrice",e.void()],["liquidityPoolDepositPoolFull",e.void()]],arms:{}}),e.enum("LiquidityPoolWithdrawResultCode",{liquidityPoolWithdrawSuccess:0,liquidityPoolWithdrawMalformed:-1,liquidityPoolWithdrawNoTrust:-2,liquidityPoolWithdrawUnderfunded:-3,liquidityPoolWithdrawLineFull:-4,liquidityPoolWithdrawUnderMinimum:-5}),e.union("LiquidityPoolWithdrawResult",{switchOn:e.lookup("LiquidityPoolWithdrawResultCode"),switchName:"code",switches:[["liquidityPoolWithdrawSuccess",e.void()],["liquidityPoolWithdrawMalformed",e.void()],["liquidityPoolWithdrawNoTrust",e.void()],["liquidityPoolWithdrawUnderfunded",e.void()],["liquidityPoolWithdrawLineFull",e.void()],["liquidityPoolWithdrawUnderMinimum",e.void()]],arms:{}}),e.enum("InvokeHostFunctionResultCode",{invokeHostFunctionSuccess:0,invokeHostFunctionMalformed:-1,invokeHostFunctionTrapped:-2,invokeHostFunctionResourceLimitExceeded:-3,invokeHostFunctionEntryArchived:-4,invokeHostFunctionInsufficientRefundableFee:-5}),e.union("InvokeHostFunctionResult",{switchOn:e.lookup("InvokeHostFunctionResultCode"),switchName:"code",switches:[["invokeHostFunctionSuccess","success"],["invokeHostFunctionMalformed",e.void()],["invokeHostFunctionTrapped",e.void()],["invokeHostFunctionResourceLimitExceeded",e.void()],["invokeHostFunctionEntryArchived",e.void()],["invokeHostFunctionInsufficientRefundableFee",e.void()]],arms:{success:e.lookup("Hash")}}),e.enum("ExtendFootprintTtlResultCode",{extendFootprintTtlSuccess:0,extendFootprintTtlMalformed:-1,extendFootprintTtlResourceLimitExceeded:-2,extendFootprintTtlInsufficientRefundableFee:-3}),e.union("ExtendFootprintTtlResult",{switchOn:e.lookup("ExtendFootprintTtlResultCode"),switchName:"code",switches:[["extendFootprintTtlSuccess",e.void()],["extendFootprintTtlMalformed",e.void()],["extendFootprintTtlResourceLimitExceeded",e.void()],["extendFootprintTtlInsufficientRefundableFee",e.void()]],arms:{}}),e.enum("RestoreFootprintResultCode",{restoreFootprintSuccess:0,restoreFootprintMalformed:-1,restoreFootprintResourceLimitExceeded:-2,restoreFootprintInsufficientRefundableFee:-3}),e.union("RestoreFootprintResult",{switchOn:e.lookup("RestoreFootprintResultCode"),switchName:"code",switches:[["restoreFootprintSuccess",e.void()],["restoreFootprintMalformed",e.void()],["restoreFootprintResourceLimitExceeded",e.void()],["restoreFootprintInsufficientRefundableFee",e.void()]],arms:{}}),e.enum("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2,opNotSupported:-3,opTooManySubentries:-4,opExceededWorkLimit:-5,opTooManySponsoring:-6}),e.union("OperationResultTr",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountResult"],["payment","paymentResult"],["pathPaymentStrictReceive","pathPaymentStrictReceiveResult"],["manageSellOffer","manageSellOfferResult"],["createPassiveSellOffer","createPassiveSellOfferResult"],["setOptions","setOptionsResult"],["changeTrust","changeTrustResult"],["allowTrust","allowTrustResult"],["accountMerge","accountMergeResult"],["inflation","inflationResult"],["manageData","manageDataResult"],["bumpSequence","bumpSeqResult"],["manageBuyOffer","manageBuyOfferResult"],["pathPaymentStrictSend","pathPaymentStrictSendResult"],["createClaimableBalance","createClaimableBalanceResult"],["claimClaimableBalance","claimClaimableBalanceResult"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesResult"],["endSponsoringFutureReserves","endSponsoringFutureReservesResult"],["revokeSponsorship","revokeSponsorshipResult"],["clawback","clawbackResult"],["clawbackClaimableBalance","clawbackClaimableBalanceResult"],["setTrustLineFlags","setTrustLineFlagsResult"],["liquidityPoolDeposit","liquidityPoolDepositResult"],["liquidityPoolWithdraw","liquidityPoolWithdrawResult"],["invokeHostFunction","invokeHostFunctionResult"],["extendFootprintTtl","extendFootprintTtlResult"],["restoreFootprint","restoreFootprintResult"]],arms:{createAccountResult:e.lookup("CreateAccountResult"),paymentResult:e.lookup("PaymentResult"),pathPaymentStrictReceiveResult:e.lookup("PathPaymentStrictReceiveResult"),manageSellOfferResult:e.lookup("ManageSellOfferResult"),createPassiveSellOfferResult:e.lookup("ManageSellOfferResult"),setOptionsResult:e.lookup("SetOptionsResult"),changeTrustResult:e.lookup("ChangeTrustResult"),allowTrustResult:e.lookup("AllowTrustResult"),accountMergeResult:e.lookup("AccountMergeResult"),inflationResult:e.lookup("InflationResult"),manageDataResult:e.lookup("ManageDataResult"),bumpSeqResult:e.lookup("BumpSequenceResult"),manageBuyOfferResult:e.lookup("ManageBuyOfferResult"),pathPaymentStrictSendResult:e.lookup("PathPaymentStrictSendResult"),createClaimableBalanceResult:e.lookup("CreateClaimableBalanceResult"),claimClaimableBalanceResult:e.lookup("ClaimClaimableBalanceResult"),beginSponsoringFutureReservesResult:e.lookup("BeginSponsoringFutureReservesResult"),endSponsoringFutureReservesResult:e.lookup("EndSponsoringFutureReservesResult"),revokeSponsorshipResult:e.lookup("RevokeSponsorshipResult"),clawbackResult:e.lookup("ClawbackResult"),clawbackClaimableBalanceResult:e.lookup("ClawbackClaimableBalanceResult"),setTrustLineFlagsResult:e.lookup("SetTrustLineFlagsResult"),liquidityPoolDepositResult:e.lookup("LiquidityPoolDepositResult"),liquidityPoolWithdrawResult:e.lookup("LiquidityPoolWithdrawResult"),invokeHostFunctionResult:e.lookup("InvokeHostFunctionResult"),extendFootprintTtlResult:e.lookup("ExtendFootprintTtlResult"),restoreFootprintResult:e.lookup("RestoreFootprintResult")}}),e.union("OperationResult",{switchOn:e.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"],["opBadAuth",e.void()],["opNoAccount",e.void()],["opNotSupported",e.void()],["opTooManySubentries",e.void()],["opExceededWorkLimit",e.void()],["opTooManySponsoring",e.void()]],arms:{tr:e.lookup("OperationResultTr")}}),e.enum("TransactionResultCode",{txFeeBumpInnerSuccess:1,txSuccess:0,txFailed:-1,txTooEarly:-2,txTooLate:-3,txMissingOperation:-4,txBadSeq:-5,txBadAuth:-6,txInsufficientBalance:-7,txNoAccount:-8,txInsufficientFee:-9,txBadAuthExtra:-10,txInternalError:-11,txNotSupported:-12,txFeeBumpInnerFailed:-13,txBadSponsorship:-14,txBadMinSeqAgeOrGap:-15,txMalformed:-16,txSorobanInvalid:-17}),e.union("InnerTransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()],["txBadMinSeqAgeOrGap",e.void()],["txMalformed",e.void()],["txSorobanInvalid",e.void()]],arms:{results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("InnerTransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("InnerTransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("InnerTransactionResultResult")],["ext",e.lookup("InnerTransactionResultExt")]]),e.struct("InnerTransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("InnerTransactionResult")]]),e.union("TransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txFeeBumpInnerSuccess","innerResultPair"],["txFeeBumpInnerFailed","innerResultPair"],["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()],["txBadMinSeqAgeOrGap",e.void()],["txMalformed",e.void()],["txSorobanInvalid",e.void()]],arms:{innerResultPair:e.lookup("InnerTransactionResultPair"),results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("TransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("TransactionResultResult")],["ext",e.lookup("TransactionResultExt")]]),e.typedef("Hash",e.opaque(32)),e.typedef("Uint256",e.opaque(32)),e.typedef("Uint32",e.uint()),e.typedef("Int32",e.int()),e.typedef("Uint64",e.uhyper()),e.typedef("Int64",e.hyper()),e.typedef("TimePoint",e.lookup("Uint64")),e.typedef("Duration",e.lookup("Uint64")),e.union("ExtensionPoint",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.enum("CryptoKeyType",{keyTypeEd25519:0,keyTypePreAuthTx:1,keyTypeHashX:2,keyTypeEd25519SignedPayload:3,keyTypeMuxedEd25519:256}),e.enum("PublicKeyType",{publicKeyTypeEd25519:0}),e.enum("SignerKeyType",{signerKeyTypeEd25519:0,signerKeyTypePreAuthTx:1,signerKeyTypeHashX:2,signerKeyTypeEd25519SignedPayload:3}),e.union("PublicKey",{switchOn:e.lookup("PublicKeyType"),switchName:"type",switches:[["publicKeyTypeEd25519","ed25519"]],arms:{ed25519:e.lookup("Uint256")}}),e.struct("SignerKeyEd25519SignedPayload",[["ed25519",e.lookup("Uint256")],["payload",e.varOpaque(64)]]),e.union("SignerKey",{switchOn:e.lookup("SignerKeyType"),switchName:"type",switches:[["signerKeyTypeEd25519","ed25519"],["signerKeyTypePreAuthTx","preAuthTx"],["signerKeyTypeHashX","hashX"],["signerKeyTypeEd25519SignedPayload","ed25519SignedPayload"]],arms:{ed25519:e.lookup("Uint256"),preAuthTx:e.lookup("Uint256"),hashX:e.lookup("Uint256"),ed25519SignedPayload:e.lookup("SignerKeyEd25519SignedPayload")}}),e.typedef("Signature",e.varOpaque(64)),e.typedef("SignatureHint",e.opaque(4)),e.typedef("NodeId",e.lookup("PublicKey")),e.typedef("AccountId",e.lookup("PublicKey")),e.struct("Curve25519Secret",[["key",e.opaque(32)]]),e.struct("Curve25519Public",[["key",e.opaque(32)]]),e.struct("HmacSha256Key",[["key",e.opaque(32)]]),e.struct("HmacSha256Mac",[["mac",e.opaque(32)]]),e.enum("ScValType",{scvBool:0,scvVoid:1,scvError:2,scvU32:3,scvI32:4,scvU64:5,scvI64:6,scvTimepoint:7,scvDuration:8,scvU128:9,scvI128:10,scvU256:11,scvI256:12,scvBytes:13,scvString:14,scvSymbol:15,scvVec:16,scvMap:17,scvAddress:18,scvContractInstance:19,scvLedgerKeyContractInstance:20,scvLedgerKeyNonce:21}),e.enum("ScErrorType",{sceContract:0,sceWasmVm:1,sceContext:2,sceStorage:3,sceObject:4,sceCrypto:5,sceEvents:6,sceBudget:7,sceValue:8,sceAuth:9}),e.enum("ScErrorCode",{scecArithDomain:0,scecIndexBounds:1,scecInvalidInput:2,scecMissingValue:3,scecExistingValue:4,scecExceededLimit:5,scecInvalidAction:6,scecInternalError:7,scecUnexpectedType:8,scecUnexpectedSize:9}),e.union("ScError",{switchOn:e.lookup("ScErrorType"),switchName:"type",switches:[["sceContract","contractCode"],["sceWasmVm","code"],["sceContext","code"],["sceStorage","code"],["sceObject","code"],["sceCrypto","code"],["sceEvents","code"],["sceBudget","code"],["sceValue","code"],["sceAuth","code"]],arms:{contractCode:e.lookup("Uint32"),code:e.lookup("ScErrorCode")}}),e.struct("UInt128Parts",[["hi",e.lookup("Uint64")],["lo",e.lookup("Uint64")]]),e.struct("Int128Parts",[["hi",e.lookup("Int64")],["lo",e.lookup("Uint64")]]),e.struct("UInt256Parts",[["hiHi",e.lookup("Uint64")],["hiLo",e.lookup("Uint64")],["loHi",e.lookup("Uint64")],["loLo",e.lookup("Uint64")]]),e.struct("Int256Parts",[["hiHi",e.lookup("Int64")],["hiLo",e.lookup("Uint64")],["loHi",e.lookup("Uint64")],["loLo",e.lookup("Uint64")]]),e.enum("ContractExecutableType",{contractExecutableWasm:0,contractExecutableStellarAsset:1}),e.union("ContractExecutable",{switchOn:e.lookup("ContractExecutableType"),switchName:"type",switches:[["contractExecutableWasm","wasmHash"],["contractExecutableStellarAsset",e.void()]],arms:{wasmHash:e.lookup("Hash")}}),e.enum("ScAddressType",{scAddressTypeAccount:0,scAddressTypeContract:1}),e.union("ScAddress",{switchOn:e.lookup("ScAddressType"),switchName:"type",switches:[["scAddressTypeAccount","accountId"],["scAddressTypeContract","contractId"]],arms:{accountId:e.lookup("AccountId"),contractId:e.lookup("Hash")}}),e.const("SCSYMBOL_LIMIT",32),e.typedef("ScVec",e.varArray(e.lookup("ScVal"),2147483647)),e.typedef("ScMap",e.varArray(e.lookup("ScMapEntry"),2147483647)),e.typedef("ScBytes",e.varOpaque()),e.typedef("ScString",e.string()),e.typedef("ScSymbol",e.string(32)),e.struct("ScNonceKey",[["nonce",e.lookup("Int64")]]),e.struct("ScContractInstance",[["executable",e.lookup("ContractExecutable")],["storage",e.option(e.lookup("ScMap"))]]),e.union("ScVal",{switchOn:e.lookup("ScValType"),switchName:"type",switches:[["scvBool","b"],["scvVoid",e.void()],["scvError","error"],["scvU32","u32"],["scvI32","i32"],["scvU64","u64"],["scvI64","i64"],["scvTimepoint","timepoint"],["scvDuration","duration"],["scvU128","u128"],["scvI128","i128"],["scvU256","u256"],["scvI256","i256"],["scvBytes","bytes"],["scvString","str"],["scvSymbol","sym"],["scvVec","vec"],["scvMap","map"],["scvAddress","address"],["scvLedgerKeyContractInstance",e.void()],["scvLedgerKeyNonce","nonceKey"],["scvContractInstance","instance"]],arms:{b:e.bool(),error:e.lookup("ScError"),u32:e.lookup("Uint32"),i32:e.lookup("Int32"),u64:e.lookup("Uint64"),i64:e.lookup("Int64"),timepoint:e.lookup("TimePoint"),duration:e.lookup("Duration"),u128:e.lookup("UInt128Parts"),i128:e.lookup("Int128Parts"),u256:e.lookup("UInt256Parts"),i256:e.lookup("Int256Parts"),bytes:e.lookup("ScBytes"),str:e.lookup("ScString"),sym:e.lookup("ScSymbol"),vec:e.option(e.lookup("ScVec")),map:e.option(e.lookup("ScMap")),address:e.lookup("ScAddress"),nonceKey:e.lookup("ScNonceKey"),instance:e.lookup("ScContractInstance")}}),e.struct("ScMapEntry",[["key",e.lookup("ScVal")],["val",e.lookup("ScVal")]]),e.enum("ScEnvMetaKind",{scEnvMetaKindInterfaceVersion:0}),e.union("ScEnvMetaEntry",{switchOn:e.lookup("ScEnvMetaKind"),switchName:"kind",switches:[["scEnvMetaKindInterfaceVersion","interfaceVersion"]],arms:{interfaceVersion:e.lookup("Uint64")}}),e.struct("ScMetaV0",[["key",e.string()],["val",e.string()]]),e.enum("ScMetaKind",{scMetaV0:0}),e.union("ScMetaEntry",{switchOn:e.lookup("ScMetaKind"),switchName:"kind",switches:[["scMetaV0","v0"]],arms:{v0:e.lookup("ScMetaV0")}}),e.const("SC_SPEC_DOC_LIMIT",1024),e.enum("ScSpecType",{scSpecTypeVal:0,scSpecTypeBool:1,scSpecTypeVoid:2,scSpecTypeError:3,scSpecTypeU32:4,scSpecTypeI32:5,scSpecTypeU64:6,scSpecTypeI64:7,scSpecTypeTimepoint:8,scSpecTypeDuration:9,scSpecTypeU128:10,scSpecTypeI128:11,scSpecTypeU256:12,scSpecTypeI256:13,scSpecTypeBytes:14,scSpecTypeString:16,scSpecTypeSymbol:17,scSpecTypeAddress:19,scSpecTypeOption:1e3,scSpecTypeResult:1001,scSpecTypeVec:1002,scSpecTypeMap:1004,scSpecTypeTuple:1005,scSpecTypeBytesN:1006,scSpecTypeUdt:2e3}),e.struct("ScSpecTypeOption",[["valueType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeResult",[["okType",e.lookup("ScSpecTypeDef")],["errorType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeVec",[["elementType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeMap",[["keyType",e.lookup("ScSpecTypeDef")],["valueType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeTuple",[["valueTypes",e.varArray(e.lookup("ScSpecTypeDef"),12)]]),e.struct("ScSpecTypeBytesN",[["n",e.lookup("Uint32")]]),e.struct("ScSpecTypeUdt",[["name",e.string(60)]]),e.union("ScSpecTypeDef",{switchOn:e.lookup("ScSpecType"),switchName:"type",switches:[["scSpecTypeVal",e.void()],["scSpecTypeBool",e.void()],["scSpecTypeVoid",e.void()],["scSpecTypeError",e.void()],["scSpecTypeU32",e.void()],["scSpecTypeI32",e.void()],["scSpecTypeU64",e.void()],["scSpecTypeI64",e.void()],["scSpecTypeTimepoint",e.void()],["scSpecTypeDuration",e.void()],["scSpecTypeU128",e.void()],["scSpecTypeI128",e.void()],["scSpecTypeU256",e.void()],["scSpecTypeI256",e.void()],["scSpecTypeBytes",e.void()],["scSpecTypeString",e.void()],["scSpecTypeSymbol",e.void()],["scSpecTypeAddress",e.void()],["scSpecTypeOption","option"],["scSpecTypeResult","result"],["scSpecTypeVec","vec"],["scSpecTypeMap","map"],["scSpecTypeTuple","tuple"],["scSpecTypeBytesN","bytesN"],["scSpecTypeUdt","udt"]],arms:{option:e.lookup("ScSpecTypeOption"),result:e.lookup("ScSpecTypeResult"),vec:e.lookup("ScSpecTypeVec"),map:e.lookup("ScSpecTypeMap"),tuple:e.lookup("ScSpecTypeTuple"),bytesN:e.lookup("ScSpecTypeBytesN"),udt:e.lookup("ScSpecTypeUdt")}}),e.struct("ScSpecUdtStructFieldV0",[["doc",e.string(t)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecUdtStructV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["fields",e.varArray(e.lookup("ScSpecUdtStructFieldV0"),40)]]),e.struct("ScSpecUdtUnionCaseVoidV0",[["doc",e.string(t)],["name",e.string(60)]]),e.struct("ScSpecUdtUnionCaseTupleV0",[["doc",e.string(t)],["name",e.string(60)],["type",e.varArray(e.lookup("ScSpecTypeDef"),12)]]),e.enum("ScSpecUdtUnionCaseV0Kind",{scSpecUdtUnionCaseVoidV0:0,scSpecUdtUnionCaseTupleV0:1}),e.union("ScSpecUdtUnionCaseV0",{switchOn:e.lookup("ScSpecUdtUnionCaseV0Kind"),switchName:"kind",switches:[["scSpecUdtUnionCaseVoidV0","voidCase"],["scSpecUdtUnionCaseTupleV0","tupleCase"]],arms:{voidCase:e.lookup("ScSpecUdtUnionCaseVoidV0"),tupleCase:e.lookup("ScSpecUdtUnionCaseTupleV0")}}),e.struct("ScSpecUdtUnionV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtUnionCaseV0"),50)]]),e.struct("ScSpecUdtEnumCaseV0",[["doc",e.string(t)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtEnumV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtEnumCaseV0"),50)]]),e.struct("ScSpecUdtErrorEnumCaseV0",[["doc",e.string(t)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtErrorEnumV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtErrorEnumCaseV0"),50)]]),e.struct("ScSpecFunctionInputV0",[["doc",e.string(t)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecFunctionV0",[["doc",e.string(t)],["name",e.lookup("ScSymbol")],["inputs",e.varArray(e.lookup("ScSpecFunctionInputV0"),10)],["outputs",e.varArray(e.lookup("ScSpecTypeDef"),1)]]),e.enum("ScSpecEntryKind",{scSpecEntryFunctionV0:0,scSpecEntryUdtStructV0:1,scSpecEntryUdtUnionV0:2,scSpecEntryUdtEnumV0:3,scSpecEntryUdtErrorEnumV0:4}),e.union("ScSpecEntry",{switchOn:e.lookup("ScSpecEntryKind"),switchName:"kind",switches:[["scSpecEntryFunctionV0","functionV0"],["scSpecEntryUdtStructV0","udtStructV0"],["scSpecEntryUdtUnionV0","udtUnionV0"],["scSpecEntryUdtEnumV0","udtEnumV0"],["scSpecEntryUdtErrorEnumV0","udtErrorEnumV0"]],arms:{functionV0:e.lookup("ScSpecFunctionV0"),udtStructV0:e.lookup("ScSpecUdtStructV0"),udtUnionV0:e.lookup("ScSpecUdtUnionV0"),udtEnumV0:e.lookup("ScSpecUdtEnumV0"),udtErrorEnumV0:e.lookup("ScSpecUdtErrorEnumV0")}}),e.struct("ConfigSettingContractExecutionLanesV0",[["ledgerMaxTxCount",e.lookup("Uint32")]]),e.struct("ConfigSettingContractComputeV0",[["ledgerMaxInstructions",e.lookup("Int64")],["txMaxInstructions",e.lookup("Int64")],["feeRatePerInstructionsIncrement",e.lookup("Int64")],["txMemoryLimit",e.lookup("Uint32")]]),e.struct("ConfigSettingContractLedgerCostV0",[["ledgerMaxReadLedgerEntries",e.lookup("Uint32")],["ledgerMaxReadBytes",e.lookup("Uint32")],["ledgerMaxWriteLedgerEntries",e.lookup("Uint32")],["ledgerMaxWriteBytes",e.lookup("Uint32")],["txMaxReadLedgerEntries",e.lookup("Uint32")],["txMaxReadBytes",e.lookup("Uint32")],["txMaxWriteLedgerEntries",e.lookup("Uint32")],["txMaxWriteBytes",e.lookup("Uint32")],["feeReadLedgerEntry",e.lookup("Int64")],["feeWriteLedgerEntry",e.lookup("Int64")],["feeRead1Kb",e.lookup("Int64")],["bucketListTargetSizeBytes",e.lookup("Int64")],["writeFee1KbBucketListLow",e.lookup("Int64")],["writeFee1KbBucketListHigh",e.lookup("Int64")],["bucketListWriteFeeGrowthFactor",e.lookup("Uint32")]]),e.struct("ConfigSettingContractHistoricalDataV0",[["feeHistorical1Kb",e.lookup("Int64")]]),e.struct("ConfigSettingContractEventsV0",[["txMaxContractEventsSizeBytes",e.lookup("Uint32")],["feeContractEvents1Kb",e.lookup("Int64")]]),e.struct("ConfigSettingContractBandwidthV0",[["ledgerMaxTxsSizeBytes",e.lookup("Uint32")],["txMaxSizeBytes",e.lookup("Uint32")],["feeTxSize1Kb",e.lookup("Int64")]]),e.enum("ContractCostType",{wasmInsnExec:0,memAlloc:1,memCpy:2,memCmp:3,dispatchHostFunction:4,visitObject:5,valSer:6,valDeser:7,computeSha256Hash:8,computeEd25519PubKey:9,verifyEd25519Sig:10,vmInstantiation:11,vmCachedInstantiation:12,invokeVmFunction:13,computeKeccak256Hash:14,computeEcdsaSecp256k1Sig:15,recoverEcdsaSecp256k1Key:16,int256AddSub:17,int256Mul:18,int256Div:19,int256Pow:20,int256Shift:21,chaCha20DrawBytes:22}),e.struct("ContractCostParamEntry",[["ext",e.lookup("ExtensionPoint")],["constTerm",e.lookup("Int64")],["linearTerm",e.lookup("Int64")]]),e.struct("StateArchivalSettings",[["maxEntryTtl",e.lookup("Uint32")],["minTemporaryTtl",e.lookup("Uint32")],["minPersistentTtl",e.lookup("Uint32")],["persistentRentRateDenominator",e.lookup("Int64")],["tempRentRateDenominator",e.lookup("Int64")],["maxEntriesToArchive",e.lookup("Uint32")],["bucketListSizeWindowSampleSize",e.lookup("Uint32")],["evictionScanSize",e.lookup("Uint64")],["startingEvictionScanLevel",e.lookup("Uint32")]]),e.struct("EvictionIterator",[["bucketListLevel",e.lookup("Uint32")],["isCurrBucket",e.bool()],["bucketFileOffset",e.lookup("Uint64")]]),e.const("CONTRACT_COST_COUNT_LIMIT",1024),e.typedef("ContractCostParams",e.varArray(e.lookup("ContractCostParamEntry"),e.lookup("CONTRACT_COST_COUNT_LIMIT"))),e.enum("ConfigSettingId",{configSettingContractMaxSizeBytes:0,configSettingContractComputeV0:1,configSettingContractLedgerCostV0:2,configSettingContractHistoricalDataV0:3,configSettingContractEventsV0:4,configSettingContractBandwidthV0:5,configSettingContractCostParamsCpuInstructions:6,configSettingContractCostParamsMemoryBytes:7,configSettingContractDataKeySizeBytes:8,configSettingContractDataEntrySizeBytes:9,configSettingStateArchival:10,configSettingContractExecutionLanes:11,configSettingBucketlistSizeWindow:12,configSettingEvictionIterator:13}),e.union("ConfigSettingEntry",{switchOn:e.lookup("ConfigSettingId"),switchName:"configSettingId",switches:[["configSettingContractMaxSizeBytes","contractMaxSizeBytes"],["configSettingContractComputeV0","contractCompute"],["configSettingContractLedgerCostV0","contractLedgerCost"],["configSettingContractHistoricalDataV0","contractHistoricalData"],["configSettingContractEventsV0","contractEvents"],["configSettingContractBandwidthV0","contractBandwidth"],["configSettingContractCostParamsCpuInstructions","contractCostParamsCpuInsns"],["configSettingContractCostParamsMemoryBytes","contractCostParamsMemBytes"],["configSettingContractDataKeySizeBytes","contractDataKeySizeBytes"],["configSettingContractDataEntrySizeBytes","contractDataEntrySizeBytes"],["configSettingStateArchival","stateArchivalSettings"],["configSettingContractExecutionLanes","contractExecutionLanes"],["configSettingBucketlistSizeWindow","bucketListSizeWindow"],["configSettingEvictionIterator","evictionIterator"]],arms:{contractMaxSizeBytes:e.lookup("Uint32"),contractCompute:e.lookup("ConfigSettingContractComputeV0"),contractLedgerCost:e.lookup("ConfigSettingContractLedgerCostV0"),contractHistoricalData:e.lookup("ConfigSettingContractHistoricalDataV0"),contractEvents:e.lookup("ConfigSettingContractEventsV0"),contractBandwidth:e.lookup("ConfigSettingContractBandwidthV0"),contractCostParamsCpuInsns:e.lookup("ContractCostParams"),contractCostParamsMemBytes:e.lookup("ContractCostParams"),contractDataKeySizeBytes:e.lookup("Uint32"),contractDataEntrySizeBytes:e.lookup("Uint32"),stateArchivalSettings:e.lookup("StateArchivalSettings"),contractExecutionLanes:e.lookup("ConfigSettingContractExecutionLanesV0"),bucketListSizeWindow:e.varArray(e.lookup("Uint64"),2147483647),evictionIterator:e.lookup("EvictionIterator")}})}));const T=A;var O=r(9072);function P(e){var t=new O.sha256;return t.update(e,"utf8"),t.digest()}var x=r(8764).Buffer,I={},_="undefined"==typeof window?function(){var e;try{e=r(Object(function(){var e=new Error("Cannot find module 'sodium-native'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){return C()}return Object.keys(e).length?(I.generate=function(t){var r=x.alloc(e.crypto_sign_PUBLICKEYBYTES),n=x.alloc(e.crypto_sign_SECRETKEYBYTES);return e.crypto_sign_seed_keypair(r,n,t),r},I.sign=function(t,r){t=x.from(t);var n=x.alloc(e.crypto_sign_BYTES);return e.crypto_sign_detached(n,t,r),n},I.verify=function(t,r,n){t=x.from(t);try{return e.crypto_sign_verify_detached(r,t,n)}catch(e){return!1}},!0):C()}():C();function B(e,t){return I.sign(e,t)}function R(e,t,r){return I.verify(e,t,r)}function C(){var e=r(780);return I.generate=function(t){var r=new Uint8Array(t),n=e.sign.keyPair.fromSeed(r);return x.from(n.publicKey)},I.sign=function(t,r){t=x.from(t),t=new Uint8Array(t.toJSON().data),r=new Uint8Array(r.toJSON().data);var n=e.sign.detached(t,r);return x.from(n)},I.verify=function(t,r,n){return t=x.from(t),t=new Uint8Array(t.toJSON().data),r=new Uint8Array(r.toJSON().data),n=new Uint8Array(n.toJSON().data),e.sign.detached.verify(t,r,n)},!1}var U=function(e,t){for(var r="number"==typeof e,n=String(e);n.endsWith(t);)n=n.slice(0,-1);return r?Number(n):n},N=r(780),L=r.n(N),j=r(6906);var M=r(8764).Buffer;function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function D(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,V(n.key),n)}}function V(e){var t=function(e,t){if("object"!=F(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=F(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==F(t)?t:String(t)}var q={ed25519PublicKey:48,ed25519SecretSeed:144,med25519PublicKey:96,preAuthTx:152,sha256Hash:184,signedPayload:120,contract:16},K={G:"ed25519PublicKey",S:"ed25519SecretSeed",M:"med25519PublicKey",T:"preAuthTx",X:"sha256Hash",P:"signedPayload",C:"contract"},H=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"encodeEd25519PublicKey",value:function(e){return $("ed25519PublicKey",e)}},{key:"decodeEd25519PublicKey",value:function(e){return X("ed25519PublicKey",e)}},{key:"isValidEd25519PublicKey",value:function(e){return z("ed25519PublicKey",e)}},{key:"encodeEd25519SecretSeed",value:function(e){return $("ed25519SecretSeed",e)}},{key:"decodeEd25519SecretSeed",value:function(e){return X("ed25519SecretSeed",e)}},{key:"isValidEd25519SecretSeed",value:function(e){return z("ed25519SecretSeed",e)}},{key:"encodeMed25519PublicKey",value:function(e){return $("med25519PublicKey",e)}},{key:"decodeMed25519PublicKey",value:function(e){return X("med25519PublicKey",e)}},{key:"isValidMed25519PublicKey",value:function(e){return z("med25519PublicKey",e)}},{key:"encodePreAuthTx",value:function(e){return $("preAuthTx",e)}},{key:"decodePreAuthTx",value:function(e){return X("preAuthTx",e)}},{key:"encodeSha256Hash",value:function(e){return $("sha256Hash",e)}},{key:"decodeSha256Hash",value:function(e){return X("sha256Hash",e)}},{key:"encodeSignedPayload",value:function(e){return $("signedPayload",e)}},{key:"decodeSignedPayload",value:function(e){return X("signedPayload",e)}},{key:"isValidSignedPayload",value:function(e){return z("signedPayload",e)}},{key:"encodeContract",value:function(e){return $("contract",e)}},{key:"decodeContract",value:function(e){return X("contract",e)}},{key:"isValidContract",value:function(e){return z("contract",e)}},{key:"getVersionByteForPrefix",value:function(e){return K[e[0]]}}],(r=null)&&D(t.prototype,r),n&&D(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function z(e,t){if("string"!=typeof t)return!1;switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":if(56!==t.length)return!1;break;case"med25519PublicKey":if(69!==t.length)return!1;break;case"signedPayload":if(t.length<56||t.length>165)return!1;break;default:return!1}var r="";try{r=X(e,t)}catch(e){return!1}switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":return 32===r.length;case"med25519PublicKey":return 40===r.length;case"signedPayload":return r.length>=40&&r.length<=100;default:return!1}}function X(e,t){if("string"!=typeof t)throw new TypeError("encoded argument must be of type String");var r=j.decode(t),n=r[0],o=r.slice(0,-2),i=o.slice(1),a=r.slice(-2);if(t!==j.encode(r))throw new Error("invalid encoded string");var s=q[e];if(void 0===s)throw new Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(q).join(", ")));if(n!==s)throw new Error("invalid version byte. expected ".concat(s,", got ").concat(n));if(!function(e,t){if(e.length!==t.length)return!1;if(0===e.length)return!0;for(var r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0}(G(o),a))throw new Error("invalid checksum");return M.from(i)}function $(e,t){if(null==t)throw new Error("cannot encode null data");var r=q[e];if(void 0===r)throw new Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(q).join(", ")));t=M.from(t);var n=M.from([r]),o=M.concat([n,t]),i=G(o),a=M.concat([o,i]);return j.encode(a)}function G(e){for(var t=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],r=0,n=0;n<e.length;n+=1){r=r<<8^t[r>>8^e[n]],r&=65535}var o=new Uint8Array(2);return o[0]=255&r,o[1]=r>>8&255,o}var W=r(8764).Buffer;function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function J(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Z(n.key),n)}}function Z(e){var t=function(e,t){if("object"!=Y(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Y(t)?t:String(t)}var Q=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"ed25519"!==t.type)throw new Error("Invalid keys type");if(this.type=t.type,t.secretKey){if(t.secretKey=W.from(t.secretKey),32!==t.secretKey.length)throw new Error("secretKey length is invalid");if(this._secretSeed=t.secretKey,this._publicKey=(r=t.secretKey,I.generate(r)),this._secretKey=W.concat([t.secretKey,this._publicKey]),t.publicKey&&!this._publicKey.equals(W.from(t.publicKey)))throw new Error("secretKey does not match publicKey")}else if(this._publicKey=W.from(t.publicKey),32!==this._publicKey.length)throw new Error("publicKey length is invalid");var r}var t,r,n;return t=e,n=[{key:"fromSecret",value:function(e){var t=H.decodeEd25519SecretSeed(e);return this.fromRawEd25519Seed(t)}},{key:"fromRawEd25519Seed",value:function(e){return new this({type:"ed25519",secretKey:e})}},{key:"master",value:function(e){if(!e)throw new Error("No network selected. Please pass a network argument, e.g. `Keypair.master(Networks.PUBLIC)`.");return this.fromRawEd25519Seed(P(e))}},{key:"fromPublicKey",value:function(e){if(32!==(e=H.decodeEd25519PublicKey(e)).length)throw new Error("Invalid Stellar public key");return new this({type:"ed25519",publicKey:e})}},{key:"random",value:function(){var e=L().randomBytes(32);return this.fromRawEd25519Seed(e)}}],(r=[{key:"xdrAccountId",value:function(){return new T.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new T.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrMuxedAccount",value:function(e){if(void 0!==e){if("string"!=typeof e)throw new TypeError("expected string for ID, got ".concat(Y(e)));return T.MuxedAccount.keyTypeMuxedEd25519(new T.MuxedAccountMed25519({id:T.Uint64.fromString(e),ed25519:this._publicKey}))}return new T.MuxedAccount.keyTypeEd25519(this._publicKey)}},{key:"rawPublicKey",value:function(){return this._publicKey}},{key:"signatureHint",value:function(){var e=this.xdrAccountId().toXDR();return e.slice(e.length-4)}},{key:"publicKey",value:function(){return H.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw new Error("no secret key available");if("ed25519"===this.type)return H.encodeEd25519SecretSeed(this._secretSeed);throw new Error("Invalid Keypair type")}},{key:"rawSecretKey",value:function(){return this._secretSeed}},{key:"canSign",value:function(){return!!this._secretKey}},{key:"sign",value:function(e){if(!this.canSign())throw new Error("cannot sign: no secret key available");return B(e,this._secretKey)}},{key:"verify",value:function(e,t){return R(e,t,this._publicKey)}},{key:"signDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint();return new T.DecoratedSignature({hint:r,signature:t})}},{key:"signPayloadDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint(),n=W.from(e.slice(-4));return n.length<4&&(n=W.concat([n,W.alloc(4-e.length,0)])),new T.DecoratedSignature({hint:n.map((function(e,t){return e^r[t]})),signature:t})}}])&&J(t.prototype,r),n&&J(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),ee=r(8764).Buffer;function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function re(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ne(n.key),n)}}function ne(e){var t=function(e,t){if("object"!=te(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==te(t)?t:String(t)}var oe=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!/^[a-zA-Z0-9]{1,12}$/.test(t))throw new Error("Asset code is invalid (maximum alphanumeric, 12 characters at max)");if("xlm"!==String(t).toLowerCase()&&!r)throw new Error("Issuer cannot be null");if(r&&!H.isValidEd25519PublicKey(r))throw new Error("Issuer is invalid");"xlm"===String(t).toLowerCase()?this.code="XLM":this.code=t,this.issuer=r}var t,r,n;return t=e,r=[{key:"toXDRObject",value:function(){return this._toXDRObject(T.Asset)}},{key:"toChangeTrustXDRObject",value:function(){return this._toXDRObject(T.ChangeTrustAsset)}},{key:"toTrustLineXDRObject",value:function(){return this._toXDRObject(T.TrustLineAsset)}},{key:"contractId",value:function(e){var t=P(ee.from(e)),r=T.HashIdPreimage.envelopeTypeContractId(new T.HashIdPreimageContractId({networkId:t,contractIdPreimage:T.ContractIdPreimage.contractIdPreimageFromAsset(this.toXDRObject())}));return H.encodeContract(P(r.toXDR()))}},{key:"_toXDRObject",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T.Asset;if(this.isNative())return r.assetTypeNative();this.code.length<=4?(e=T.AlphaNum4,t="assetTypeCreditAlphanum4"):(e=T.AlphaNum12,t="assetTypeCreditAlphanum12");var n=this.code.length<=4?4:12;return new r(t,new e({assetCode:this.code.padEnd(n,"\0"),issuer:Q.fromPublicKey(this.issuer).xdrAccountId()}))}},{key:"getCode",value:function(){if(void 0!==this.code)return String(this.code)}},{key:"getIssuer",value:function(){if(void 0!==this.issuer)return String(this.issuer)}},{key:"getAssetType",value:function(){switch(this.getRawAssetType()){case T.AssetType.assetTypeNative():return"native";case T.AssetType.assetTypeCreditAlphanum4():return"credit_alphanum4";case T.AssetType.assetTypeCreditAlphanum12():return"credit_alphanum12";default:return"unknown"}}},{key:"getRawAssetType",value:function(){return this.isNative()?T.AssetType.assetTypeNative():this.code.length<=4?T.AssetType.assetTypeCreditAlphanum4():T.AssetType.assetTypeCreditAlphanum12()}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(e){return this.code===e.getCode()&&this.issuer===e.getIssuer()}},{key:"toString",value:function(){return this.isNative()?"native":"".concat(this.getCode(),":").concat(this.getIssuer())}}],n=[{key:"native",value:function(){return new e("XLM")}},{key:"fromOperation",value:function(e){var t,r;switch(e.switch()){case T.AssetType.assetTypeNative():return this.native();case T.AssetType.assetTypeCreditAlphanum4():t=e.alphaNum4();case T.AssetType.assetTypeCreditAlphanum12():return t=t||e.alphaNum12(),r=H.encodeEd25519PublicKey(t.issuer().ed25519()),new this(U(t.assetCode(),"\0"),r);default:throw new Error("Invalid asset type: ".concat(e.switch().name))}}},{key:"compare",value:function(t,r){if(!(t&&t instanceof e))throw new Error("assetA is invalid");if(!(r&&r instanceof e))throw new Error("assetB is invalid");if(t.equals(r))return 0;var n=t.getRawAssetType().value,o=r.getRawAssetType().value;if(n!==o)return n<o?-1:1;var i=ie(t.getCode(),r.getCode());return 0!==i?i:ie(t.getIssuer(),r.getIssuer())}}],r&&re(t.prototype,r),n&&re(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ie(e,t){return ee.compare(ee.from(e,"ascii"),ee.from(t,"ascii"))}var ae=r(8764).Buffer,se=30;function ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("constant_product"!==e)throw new Error("liquidityPoolType is invalid");var r=t.assetA,n=t.assetB,o=t.fee;if(!(r&&r instanceof oe))throw new Error("assetA is invalid");if(!(n&&n instanceof oe))throw new Error("assetB is invalid");if(!o||o!==se)throw new Error("fee is invalid");if(-1!==oe.compare(r,n))throw new Error("Assets are not in lexicographic order");var i=T.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),a=new T.LiquidityPoolConstantProductParameters({assetA:r.toXDRObject(),assetB:n.toXDRObject(),fee:o}).toXDR();return P(ae.concat([i,a]))}var ce=r(8764).Buffer;function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function fe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pe(n.key),n)}}function pe(e){var t=function(e,t){if("object"!=le(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=le(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==le(t)?t:String(t)}var he=function(){function e(t,r,n,o){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"!=typeof o)throw new Error("Invalid passphrase provided to Transaction: expected a string but got a ".concat(le(o)));this._networkPassphrase=o,this._tx=t,this._signatures=r,this._fee=n}var t,r,n;return t=e,r=[{key:"signatures",get:function(){return this._signatures},set:function(e){throw new Error("Transaction is immutable")}},{key:"tx",get:function(){return this._tx},set:function(e){throw new Error("Transaction is immutable")}},{key:"fee",get:function(){return this._fee},set:function(e){throw new Error("Transaction is immutable")}},{key:"networkPassphrase",get:function(){return this._networkPassphrase},set:function(e){this._networkPassphrase=e}},{key:"sign",value:function(){for(var e=this,t=this.hash(),r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];n.forEach((function(r){var n=r.signDecorated(t);e.signatures.push(n)}))}},{key:"getKeypairSignature",value:function(e){return e.sign(this.hash()).toString("base64")}},{key:"addSignature",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!n||"string"!=typeof n)throw new Error("Invalid signature");if(!r||"string"!=typeof r)throw new Error("Invalid publicKey");var o=ce.from(n,"base64");try{t=(e=Q.fromPublicKey(r)).signatureHint()}catch(e){throw new Error("Invalid publicKey")}if(!e.verify(this.hash(),o))throw new Error("Invalid signature");this.signatures.push(new T.DecoratedSignature({hint:t,signature:o}))}},{key:"addDecoratedSignature",value:function(e){this.signatures.push(e)}},{key:"signHashX",value:function(e){if("string"==typeof e&&(e=ce.from(e,"hex")),e.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var t=e,r=P(e),n=r.slice(r.length-4);this.signatures.push(new T.DecoratedSignature({hint:n,signature:t}))}},{key:"hash",value:function(){return P(this.signatureBase())}},{key:"signatureBase",value:function(){throw new Error("Implement in subclass")}},{key:"toEnvelope",value:function(){throw new Error("Implement in subclass")}},{key:"toXDR",value:function(){return this.toEnvelope().toXDR().toString("base64")}}],r&&fe(t.prototype,r),n&&fe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return de(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return de(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function de(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var me=2147483647;function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){we(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function we(e,t,r){return(t=ke(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ke(n.key),n)}}function ke(e){var t=function(e,t){if("object"!=ge(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ge(t)?t:String(t)}var Ee=function(){function e(t,r,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(t&&t instanceof oe))throw new Error("assetA is invalid");if(!(r&&r instanceof oe))throw new Error("assetB is invalid");if(-1!==oe.compare(t,r))throw new Error("Assets are not in lexicographic order");if(!n||n!==se)throw new Error("fee is invalid");this.assetA=t,this.assetB=r,this.fee=n}var t,r,n;return t=e,n=[{key:"fromOperation",value:function(e){var t=e.switch();if(t===T.AssetType.assetTypePoolShare()){var r=e.liquidityPool().constantProduct();return new this(oe.fromOperation(r.assetA()),oe.fromOperation(r.assetB()),r.fee())}throw new Error("Invalid asset type: ".concat(t.name))}}],(r=[{key:"toXDRObject",value:function(){var e=new T.LiquidityPoolConstantProductParameters({assetA:this.assetA.toXDRObject(),assetB:this.assetB.toXDRObject(),fee:this.fee}),t=new T.LiquidityPoolParameters("liquidityPoolConstantProduct",e);return new T.ChangeTrustAsset("assetTypePoolShare",t)}},{key:"getLiquidityPoolParameters",value:function(){return be(be({},this),{},{assetA:this.assetA,assetB:this.assetB,fee:this.fee})}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(e){return this.assetA.equals(e.assetA)&&this.assetB.equals(e.assetB)&&this.fee===e.fee}},{key:"toString",value:function(){var e=ue("constant_product",this.getLiquidityPoolParameters()).toString("hex");return"liquidity_pool:".concat(e)}}])&&Se(t.prototype,r),n&&Se(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function Te(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Oe(n.key),n)}}function Oe(e){var t=function(e,t){if("object"!=Ae(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ae(t)?t:String(t)}var Pe=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&!H.isValidEd25519PublicKey(t))throw new Error("Destination is invalid");if(this._destination=t,r){if(!(r instanceof T.ClaimPredicate))throw new Error("Predicate should be an xdr.ClaimPredicate");this._predicate=r}else this._predicate=T.ClaimPredicate.claimPredicateUnconditional()}var t,r,n;return t=e,n=[{key:"predicateUnconditional",value:function(){return T.ClaimPredicate.claimPredicateUnconditional()}},{key:"predicateAnd",value:function(e,t){if(!(e instanceof T.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof T.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return T.ClaimPredicate.claimPredicateAnd([e,t])}},{key:"predicateOr",value:function(e,t){if(!(e instanceof T.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof T.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return T.ClaimPredicate.claimPredicateOr([e,t])}},{key:"predicateNot",value:function(e){if(!(e instanceof T.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return T.ClaimPredicate.claimPredicateNot(e)}},{key:"predicateBeforeAbsoluteTime",value:function(e){return T.ClaimPredicate.claimPredicateBeforeAbsoluteTime(T.Int64.fromString(e))}},{key:"predicateBeforeRelativeTime",value:function(e){return T.ClaimPredicate.claimPredicateBeforeRelativeTime(T.Int64.fromString(e))}},{key:"fromXDR",value:function(e){var t;if(e.switch()===T.ClaimantType.claimantTypeV0())return t=e.v0(),new this(H.encodeEd25519PublicKey(t.destination().ed25519()),t.predicate());throw new Error("Invalid claimant type: ".concat(e.switch().name))}}],(r=[{key:"toXDRObject",value:function(){var e=new T.ClaimantV0({destination:Q.fromPublicKey(this._destination).xdrAccountId(),predicate:this._predicate});return T.Claimant.claimantTypeV0(e)}},{key:"destination",get:function(){return this._destination},set:function(e){throw new Error("Claimant is immutable")}},{key:"predicate",get:function(){return this._predicate},set:function(e){throw new Error("Claimant is immutable")}}])&&Te(t.prototype,r),n&&Te(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function xe(e){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xe(e)}function Ie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_e(n.key),n)}}function _e(e){var t=function(e,t){if("object"!=xe(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xe(t)?t:String(t)}var Be=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("liquidityPoolId cannot be empty");if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Liquidity pool ID is not a valid hash");this.liquidityPoolId=t}var t,r,n;return t=e,n=[{key:"fromOperation",value:function(e){var t=e.switch();if(t===T.AssetType.assetTypePoolShare())return new this(e.liquidityPoolId().toString("hex"));throw new Error("Invalid asset type: ".concat(t.name))}}],(r=[{key:"toXDRObject",value:function(){var e=T.PoolId.fromXDR(this.liquidityPoolId,"hex");return new T.TrustLineAsset("assetTypePoolShare",e)}},{key:"getLiquidityPoolId",value:function(){return String(this.liquidityPoolId)}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(e){return this.liquidityPoolId===e.getLiquidityPoolId()}},{key:"toString",value:function(){return"liquidity_pool:".concat(this.liquidityPoolId)}}])&&Ie(t.prototype,r),n&&Ie(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();var Re=r(8764).Buffer;function Ce(e){return H.isValidMed25519PublicKey(e)?function(e){var t=H.decodeMed25519PublicKey(e);return T.MuxedAccount.keyTypeMuxedEd25519(new T.MuxedAccountMed25519({id:T.Uint64.fromXDR(t.subarray(-8)),ed25519:t.subarray(0,-8)}))}(e):T.MuxedAccount.keyTypeEd25519(H.decodeEd25519PublicKey(e))}function Ue(e){return e.switch().value===T.CryptoKeyType.keyTypeMuxedEd25519().value?function(e){if(e.switch()===T.CryptoKeyType.keyTypeEd25519())return Ue(e);var t=e.med25519();return H.encodeMed25519PublicKey(Re.concat([t.ed25519(),t.id().toXDR("raw")]))}(e):H.encodeEd25519PublicKey(e.ed25519())}function Ne(e,t){if(!H.isValidEd25519PublicKey(e))throw new Error("address should be a Stellar account ID (G...)");if("string"!=typeof t)throw new Error("id should be a string representing a number (uint64)");return T.MuxedAccount.keyTypeMuxedEd25519(new T.MuxedAccountMed25519({id:T.Uint64.fromString(t),ed25519:H.decodeEd25519PublicKey(e)}))}function Le(e){if(H.isValidEd25519PublicKey(e))return e;if(!H.isValidMed25519PublicKey(e))throw new TypeError("expected muxed account (M...), got ".concat(e));var t=Ce(e);return H.encodeEd25519PublicKey(t.med25519().ed25519())}function je(e){if("string"!=typeof e||72!==e.length)throw new Error("must provide a valid claimable balance id")}var Me=r(8764).Buffer;var Fe=r(8764).Buffer;function De(e,t){if(e>=0&&e<=255)return!0;throw new Error("".concat(t," value must be between 0 and 255"))}var Ve=r(8764).Buffer;function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function Ke(e){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(e)}function He(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ze(n.key),n)}}function ze(e){var t=function(e,t){if("object"!=Ke(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ke(t)?t:String(t)}var Xe=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),H.isValidEd25519PublicKey(t))this._type="account",this._key=H.decodeEd25519PublicKey(t);else{if(!H.isValidContract(t))throw new Error("Unsupported address type");this._type="contract",this._key=H.decodeContract(t)}}var t,r,n;return t=e,n=[{key:"fromString",value:function(t){return new e(t)}},{key:"account",value:function(t){return new e(H.encodeEd25519PublicKey(t))}},{key:"contract",value:function(t){return new e(H.encodeContract(t))}},{key:"fromScVal",value:function(t){return e.fromScAddress(t.address())}},{key:"fromScAddress",value:function(t){switch(t.switch()){case T.ScAddressType.scAddressTypeAccount():return e.account(t.accountId().ed25519());case T.ScAddressType.scAddressTypeContract():return e.contract(t.contractId());default:throw new Error("Unsupported address type")}}}],(r=[{key:"toString",value:function(){switch(this._type){case"account":return H.encodeEd25519PublicKey(this._key);case"contract":return H.encodeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toScVal",value:function(){return T.ScVal.scvAddress(this.toScAddress())}},{key:"toScAddress",value:function(){switch(this._type){case"account":return T.ScAddress.scAddressTypeAccount(T.PublicKey.publicKeyTypeEd25519(this._key));case"contract":return T.ScAddress.scAddressTypeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toBuffer",value:function(){return this._key}}])&&He(t.prototype,r),n&&He(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),$e=r(8764).Buffer;function Ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return We(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return We(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}function Je(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ze(n.key),n)}}function Ze(e){var t=function(e,t){if("object"!=Ye(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ye(t)?t:String(t)}var Qe=1e7,et=1,tt=2,rt=4,nt=8,ot=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"setSourceAccount",value:function(e,t){if(t.source)try{e.sourceAccount=Ce(t.source)}catch(e){throw new Error("Source address is invalid")}}},{key:"fromXDRObject",value:function(e){var t={};e.sourceAccount()&&(t.source=Ue(e.sourceAccount()));var r=e.body().value(),n=e.body().switch().name;switch(n){case"createAccount":t.type="createAccount",t.destination=it(r.destination()),t.startingBalance=this._fromXDRAmount(r.startingBalance());break;case"payment":t.type="payment",t.destination=Ue(r.destination()),t.asset=oe.fromOperation(r.asset()),t.amount=this._fromXDRAmount(r.amount());break;case"pathPaymentStrictReceive":t.type="pathPaymentStrictReceive",t.sendAsset=oe.fromOperation(r.sendAsset()),t.sendMax=this._fromXDRAmount(r.sendMax()),t.destination=Ue(r.destination()),t.destAsset=oe.fromOperation(r.destAsset()),t.destAmount=this._fromXDRAmount(r.destAmount()),t.path=[];var o=r.path();Object.keys(o).forEach((function(e){t.path.push(oe.fromOperation(o[e]))}));break;case"pathPaymentStrictSend":t.type="pathPaymentStrictSend",t.sendAsset=oe.fromOperation(r.sendAsset()),t.sendAmount=this._fromXDRAmount(r.sendAmount()),t.destination=Ue(r.destination()),t.destAsset=oe.fromOperation(r.destAsset()),t.destMin=this._fromXDRAmount(r.destMin()),t.path=[];var i=r.path();Object.keys(i).forEach((function(e){t.path.push(oe.fromOperation(i[e]))}));break;case"changeTrust":t.type="changeTrust",r.line().switch()===T.AssetType.assetTypePoolShare()?t.line=Ee.fromOperation(r.line()):t.line=oe.fromOperation(r.line()),t.limit=this._fromXDRAmount(r.limit());break;case"allowTrust":t.type="allowTrust",t.trustor=it(r.trustor()),t.assetCode=r.asset().value().toString(),t.assetCode=U(t.assetCode,"\0"),t.authorize=r.authorize();break;case"setOptions":if(t.type="setOptions",r.inflationDest()&&(t.inflationDest=it(r.inflationDest())),t.clearFlags=r.clearFlags(),t.setFlags=r.setFlags(),t.masterWeight=r.masterWeight(),t.lowThreshold=r.lowThreshold(),t.medThreshold=r.medThreshold(),t.highThreshold=r.highThreshold(),t.homeDomain=void 0!==r.homeDomain()?r.homeDomain().toString("ascii"):void 0,r.signer()){var a={},s=r.signer().key().arm();if("ed25519"===s)a.ed25519PublicKey=it(r.signer().key());else if("preAuthTx"===s)a.preAuthTx=r.signer().key().preAuthTx();else if("hashX"===s)a.sha256Hash=r.signer().key().hashX();else if("ed25519SignedPayload"===s){var u=r.signer().key().ed25519SignedPayload();a.ed25519SignedPayload=H.encodeSignedPayload(u.toXDR())}a.weight=r.signer().weight(),t.signer=a}break;case"manageOffer":case"manageSellOffer":t.type="manageSellOffer",t.selling=oe.fromOperation(r.selling()),t.buying=oe.fromOperation(r.buying()),t.amount=this._fromXDRAmount(r.amount()),t.price=this._fromXDRPrice(r.price()),t.offerId=r.offerId().toString();break;case"manageBuyOffer":t.type="manageBuyOffer",t.selling=oe.fromOperation(r.selling()),t.buying=oe.fromOperation(r.buying()),t.buyAmount=this._fromXDRAmount(r.buyAmount()),t.price=this._fromXDRPrice(r.price()),t.offerId=r.offerId().toString();break;case"createPassiveOffer":case"createPassiveSellOffer":t.type="createPassiveSellOffer",t.selling=oe.fromOperation(r.selling()),t.buying=oe.fromOperation(r.buying()),t.amount=this._fromXDRAmount(r.amount()),t.price=this._fromXDRPrice(r.price());break;case"accountMerge":t.type="accountMerge",t.destination=Ue(r);break;case"manageData":t.type="manageData",t.name=r.dataName().toString("ascii"),t.value=r.dataValue();break;case"inflation":t.type="inflation";break;case"bumpSequence":t.type="bumpSequence",t.bumpTo=r.bumpTo().toString();break;case"createClaimableBalance":t.type="createClaimableBalance",t.asset=oe.fromOperation(r.asset()),t.amount=this._fromXDRAmount(r.amount()),t.claimants=[],r.claimants().forEach((function(e){t.claimants.push(Pe.fromXDR(e))}));break;case"claimClaimableBalance":t.type="claimClaimableBalance",t.balanceId=r.toXDR("hex");break;case"beginSponsoringFutureReserves":t.type="beginSponsoringFutureReserves",t.sponsoredId=it(r.sponsoredId());break;case"endSponsoringFutureReserves":t.type="endSponsoringFutureReserves";break;case"revokeSponsorship":!function(e,t){switch(e.switch().name){case"revokeSponsorshipLedgerEntry":var r=e.ledgerKey();switch(r.switch().name){case T.LedgerEntryType.account().name:t.type="revokeAccountSponsorship",t.account=it(r.account().accountId());break;case T.LedgerEntryType.trustline().name:t.type="revokeTrustlineSponsorship",t.account=it(r.trustLine().accountId());var n=r.trustLine().asset();n.switch()===T.AssetType.assetTypePoolShare()?t.asset=Be.fromOperation(n):t.asset=oe.fromOperation(n);break;case T.LedgerEntryType.offer().name:t.type="revokeOfferSponsorship",t.seller=it(r.offer().sellerId()),t.offerId=r.offer().offerId().toString();break;case T.LedgerEntryType.data().name:t.type="revokeDataSponsorship",t.account=it(r.data().accountId()),t.name=r.data().dataName().toString("ascii");break;case T.LedgerEntryType.claimableBalance().name:t.type="revokeClaimableBalanceSponsorship",t.balanceId=r.claimableBalance().balanceId().toXDR("hex");break;case T.LedgerEntryType.liquidityPool().name:t.type="revokeLiquidityPoolSponsorship",t.liquidityPoolId=r.liquidityPool().liquidityPoolId().toString("hex");break;default:throw new Error("Unknown ledgerKey: ".concat(e.switch().name))}break;case"revokeSponsorshipSigner":t.type="revokeSignerSponsorship",t.account=it(e.signer().accountId()),t.signer=function(e){var t={};switch(e.switch().name){case T.SignerKeyType.signerKeyTypeEd25519().name:t.ed25519PublicKey=H.encodeEd25519PublicKey(e.ed25519());break;case T.SignerKeyType.signerKeyTypePreAuthTx().name:t.preAuthTx=e.preAuthTx().toString("hex");break;case T.SignerKeyType.signerKeyTypeHashX().name:t.sha256Hash=e.hashX().toString("hex");break;default:throw new Error("Unknown signerKey: ".concat(e.switch().name))}return t}(e.signer().signerKey());break;default:throw new Error("Unknown revokeSponsorship: ".concat(e.switch().name))}}(r,t);break;case"clawback":t.type="clawback",t.amount=this._fromXDRAmount(r.amount()),t.from=Ue(r.from()),t.asset=oe.fromOperation(r.asset());break;case"clawbackClaimableBalance":t.type="clawbackClaimableBalance",t.balanceId=r.toXDR("hex");break;case"setTrustLineFlags":t.type="setTrustLineFlags",t.asset=oe.fromOperation(r.asset()),t.trustor=it(r.trustor());var c=r.clearFlags(),l=r.setFlags(),f={authorized:T.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:T.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:T.TrustLineFlags.trustlineClawbackEnabledFlag()};t.flags={},Object.keys(f).forEach((function(e){var r;t.flags[e]=(r=f[e].value,!!(l&r)||!(c&r)&&void 0)}));break;case"liquidityPoolDeposit":t.type="liquidityPoolDeposit",t.liquidityPoolId=r.liquidityPoolId().toString("hex"),t.maxAmountA=this._fromXDRAmount(r.maxAmountA()),t.maxAmountB=this._fromXDRAmount(r.maxAmountB()),t.minPrice=this._fromXDRPrice(r.minPrice()),t.maxPrice=this._fromXDRPrice(r.maxPrice());break;case"liquidityPoolWithdraw":t.type="liquidityPoolWithdraw",t.liquidityPoolId=r.liquidityPoolId().toString("hex"),t.amount=this._fromXDRAmount(r.amount()),t.minAmountA=this._fromXDRAmount(r.minAmountA()),t.minAmountB=this._fromXDRAmount(r.minAmountB());break;case"invokeHostFunction":var p;t.type="invokeHostFunction",t.func=r.hostFunction(),t.auth=null!==(p=r.auth())&&void 0!==p?p:[];break;case"extendFootprintTtl":t.type="extendFootprintTtl",t.extendTo=r.extendTo();break;case"restoreFootprint":t.type="restoreFootprint";break;default:throw new Error("Unknown operation: ".concat(n))}return t}},{key:"isValidAmount",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof e)return!1;try{t=new k(e)}catch(e){return!1}return!(!r&&t.isZero()||t.isNegative()||t.times(Qe).gt(new k("9223372036854775807").toString())||t.decimalPlaces()>7||t.isNaN()||!t.isFinite())}},{key:"constructAmountRequirementsError",value:function(e){return"".concat(e," argument must be of type String, represent a positive number and have at most 7 digits after the decimal")}},{key:"_checkUnsignedIntValue",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0!==t)switch("string"==typeof t&&(t=parseFloat(t)),!0){case"number"!=typeof t||!Number.isFinite(t)||t%1!=0:throw new Error("".concat(e," value is invalid"));case t<0:throw new Error("".concat(e," value must be unsigned"));case!r||r&&r(t,e):return t;default:throw new Error("".concat(e," value is invalid"))}}},{key:"_toXDRAmount",value:function(e){var t=new k(e).times(Qe);return E.Hyper.fromString(t.toString())}},{key:"_fromXDRAmount",value:function(e){return new k(e).div(Qe).toFixed(7)}},{key:"_fromXDRPrice",value:function(e){return new k(e.n()).div(new k(e.d())).toString()}},{key:"_toXDRPrice",value:function(e){var t;if(e.n&&e.d)t=new T.Price(e);else{var r=function(e){for(var t,r,n=new k(e),o=[[new k(0),new k(1)],[new k(1),new k(0)]],i=2;!n.gt(me);){t=n.integerValue(k.ROUND_FLOOR),r=n.minus(t);var a=t.times(o[i-1][0]).plus(o[i-2][0]),s=t.times(o[i-1][1]).plus(o[i-2][1]);if(a.gt(me)||s.gt(me))break;if(o.push([a,s]),r.eq(0))break;n=new k(1).div(r),i+=1}var u=ye(o[o.length-1],2),c=u[0],l=u[1];if(c.isZero()||l.isZero())throw new Error("Couldn't find approximation");return[c.toNumber(),l.toNumber()]}(e);t=new T.Price({n:parseInt(r[0],10),d:parseInt(r[1],10)})}if(t.n()<0||t.d()<0)throw new Error("price must be positive");return t}}],(r=null)&&Je(t.prototype,r),n&&Je(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function it(e){return H.encodeEd25519PublicKey(e.ed25519())}ot.accountMerge=function(e){var t={};try{t.body=T.OperationBody.accountMerge(Ce(e.destination))}catch(e){throw new Error("destination is invalid")}return this.setSourceAccount(t,e),new T.Operation(t)},ot.allowTrust=function(e){if(!H.isValidEd25519PublicKey(e.trustor))throw new Error("trustor is invalid");var t={};if(t.trustor=Q.fromPublicKey(e.trustor).xdrAccountId(),e.assetCode.length<=4){var r=e.assetCode.padEnd(4,"\0");t.asset=T.AssetCode.assetTypeCreditAlphanum4(r)}else{if(!(e.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var n=e.assetCode.padEnd(12,"\0");t.asset=T.AssetCode.assetTypeCreditAlphanum12(n)}"boolean"==typeof e.authorize?e.authorize?t.authorize=T.TrustLineFlags.authorizedFlag().value:t.authorize=0:t.authorize=e.authorize;var o=new T.AllowTrustOp(t),i={};return i.body=T.OperationBody.allowTrust(o),this.setSourceAccount(i,e),new T.Operation(i)},ot.bumpSequence=function(e){var t={};if("string"!=typeof e.bumpTo)throw new Error("bumpTo must be a string");try{new k(e.bumpTo)}catch(e){throw new Error("bumpTo must be a stringified number")}t.bumpTo=E.Hyper.fromString(e.bumpTo);var r=new T.BumpSequenceOp(t),n={};return n.body=T.OperationBody.bumpSequence(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.changeTrust=function(e){var t={};if(e.asset instanceof oe)t.line=e.asset.toChangeTrustXDRObject();else{if(!(e.asset instanceof Ee))throw new TypeError("asset must be Asset or LiquidityPoolAsset");t.line=e.asset.toXDRObject()}if(void 0!==e.limit&&!this.isValidAmount(e.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));e.limit?t.limit=this._toXDRAmount(e.limit):t.limit=E.Hyper.fromString(new k("9223372036854775807").toString()),e.source&&(t.source=e.source.masterKeypair);var r=new T.ChangeTrustOp(t),n={};return n.body=T.OperationBody.changeTrust(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.createAccount=function(e){if(!H.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");if(!this.isValidAmount(e.startingBalance,!0))throw new TypeError(this.constructAmountRequirementsError("startingBalance"));var t={};t.destination=Q.fromPublicKey(e.destination).xdrAccountId(),t.startingBalance=this._toXDRAmount(e.startingBalance);var r=new T.CreateAccountOp(t),n={};return n.body=T.OperationBody.createAccount(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.createClaimableBalance=function(e){if(!(e.asset instanceof oe))throw new Error("must provide an asset for create claimable balance operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(!Array.isArray(e.claimants)||0===e.claimants.length)throw new Error("must provide at least one claimant");var t={};t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount),t.claimants=Object.values(e.claimants).map((function(e){return e.toXDRObject()}));var r=new T.CreateClaimableBalanceOp(t),n={};return n.body=T.OperationBody.createClaimableBalance(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.claimClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};je(e.balanceId);var t={};t.balanceId=T.ClaimableBalanceId.fromXDR(e.balanceId,"hex");var r=new T.ClaimClaimableBalanceOp(t),n={};return n.body=T.OperationBody.claimClaimableBalance(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.clawbackClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};je(e.balanceId);var t={balanceId:T.ClaimableBalanceId.fromXDR(e.balanceId,"hex")},r={body:T.OperationBody.clawbackClaimableBalance(new T.ClawbackClaimableBalanceOp(t))};return this.setSourceAccount(r,e),new T.Operation(r)},ot.createPassiveSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price);var r=new T.CreatePassiveSellOfferOp(t),n={};return n.body=T.OperationBody.createPassiveSellOffer(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.inflation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=T.OperationBody.inflation(),this.setSourceAccount(t,e),new T.Operation(t)},ot.manageData=function(e){var t={};if(!("string"==typeof e.name&&e.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(t.dataName=e.name,"string"!=typeof e.value&&!Me.isBuffer(e.value)&&null!==e.value)throw new Error("value must be a string, Buffer or null");if("string"==typeof e.value?t.dataValue=Me.from(e.value):t.dataValue=e.value,null!==t.dataValue&&t.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var r=new T.ManageDataOp(t),n={};return n.body=T.OperationBody.manageData(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.manageSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount,!0))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),void 0!==e.offerId?e.offerId=e.offerId.toString():e.offerId="0",t.offerId=E.Hyper.fromString(e.offerId);var r=new T.ManageSellOfferOp(t),n={};return n.body=T.OperationBody.manageSellOffer(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.manageBuyOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.buyAmount,!0))throw new TypeError(this.constructAmountRequirementsError("buyAmount"));if(t.buyAmount=this._toXDRAmount(e.buyAmount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),void 0!==e.offerId?e.offerId=e.offerId.toString():e.offerId="0",t.offerId=E.Hyper.fromString(e.offerId);var r=new T.ManageBuyOfferOp(t),n={};return n.body=T.OperationBody.manageBuyOffer(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.pathPaymentStrictReceive=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendMax):throw new TypeError(this.constructAmountRequirementsError("sendMax"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destAmount):throw new TypeError(this.constructAmountRequirementsError("destAmount"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendMax=this._toXDRAmount(e.sendMax);try{t.destination=Ce(e.destination)}catch(e){throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destAmount=this._toXDRAmount(e.destAmount);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new T.PathPaymentStrictReceiveOp(t),o={};return o.body=T.OperationBody.pathPaymentStrictReceive(n),this.setSourceAccount(o,e),new T.Operation(o)},ot.pathPaymentStrictSend=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendAmount):throw new TypeError(this.constructAmountRequirementsError("sendAmount"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destMin):throw new TypeError(this.constructAmountRequirementsError("destMin"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendAmount=this._toXDRAmount(e.sendAmount);try{t.destination=Ce(e.destination)}catch(e){throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destMin=this._toXDRAmount(e.destMin);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new T.PathPaymentStrictSendOp(t),o={};return o.body=T.OperationBody.pathPaymentStrictSend(n),this.setSourceAccount(o,e),new T.Operation(o)},ot.payment=function(e){if(!e.asset)throw new Error("Must provide an asset for a payment operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));var t={};try{t.destination=Ce(e.destination)}catch(e){throw new Error("destination is invalid")}t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount);var r=new T.PaymentOp(t),n={};return n.body=T.OperationBody.payment(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.setOptions=function(e){var t={};if(e.inflationDest){if(!H.isValidEd25519PublicKey(e.inflationDest))throw new Error("inflationDest is invalid");t.inflationDest=Q.fromPublicKey(e.inflationDest).xdrAccountId()}if(t.clearFlags=this._checkUnsignedIntValue("clearFlags",e.clearFlags),t.setFlags=this._checkUnsignedIntValue("setFlags",e.setFlags),t.masterWeight=this._checkUnsignedIntValue("masterWeight",e.masterWeight,De),t.lowThreshold=this._checkUnsignedIntValue("lowThreshold",e.lowThreshold,De),t.medThreshold=this._checkUnsignedIntValue("medThreshold",e.medThreshold,De),t.highThreshold=this._checkUnsignedIntValue("highThreshold",e.highThreshold,De),void 0!==e.homeDomain&&"string"!=typeof e.homeDomain)throw new TypeError("homeDomain argument must be of type String");if(t.homeDomain=e.homeDomain,e.signer){var r,n=this._checkUnsignedIntValue("signer.weight",e.signer.weight,De),o=0;if(e.signer.ed25519PublicKey){if(!H.isValidEd25519PublicKey(e.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var i=H.decodeEd25519PublicKey(e.signer.ed25519PublicKey);r=new T.SignerKey.signerKeyTypeEd25519(i),o+=1}if(e.signer.preAuthTx){if("string"==typeof e.signer.preAuthTx&&(e.signer.preAuthTx=Fe.from(e.signer.preAuthTx,"hex")),!Fe.isBuffer(e.signer.preAuthTx)||32!==e.signer.preAuthTx.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");r=new T.SignerKey.signerKeyTypePreAuthTx(e.signer.preAuthTx),o+=1}if(e.signer.sha256Hash){if("string"==typeof e.signer.sha256Hash&&(e.signer.sha256Hash=Fe.from(e.signer.sha256Hash,"hex")),!Fe.isBuffer(e.signer.sha256Hash)||32!==e.signer.sha256Hash.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");r=new T.SignerKey.signerKeyTypeHashX(e.signer.sha256Hash),o+=1}if(e.signer.ed25519SignedPayload){if(!H.isValidSignedPayload(e.signer.ed25519SignedPayload))throw new Error("signer.ed25519SignedPayload is invalid.");var a=H.decodeSignedPayload(e.signer.ed25519SignedPayload),s=T.SignerKeyEd25519SignedPayload.fromXDR(a);r=T.SignerKey.signerKeyTypeEd25519SignedPayload(s),o+=1}if(1!==o)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");t.signer=new T.Signer({key:r,weight:n})}var u=new T.SetOptionsOp(t),c={};return c.body=T.OperationBody.setOptions(u),this.setSourceAccount(c,e),new T.Operation(c)},ot.beginSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!H.isValidEd25519PublicKey(e.sponsoredId))throw new Error("sponsoredId is invalid");var t=new T.BeginSponsoringFutureReservesOp({sponsoredId:Q.fromPublicKey(e.sponsoredId).xdrAccountId()}),r={};return r.body=T.OperationBody.beginSponsoringFutureReserves(t),this.setSourceAccount(r,e),new T.Operation(r)},ot.endSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=T.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(t,e),new T.Operation(t)},ot.revokeAccountSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!H.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=T.LedgerKey.account(new T.LedgerKeyAccount({accountId:Q.fromPublicKey(e.account).xdrAccountId()})),r=T.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=T.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.revokeTrustlineSponsorship=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!H.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");if(t.asset instanceof oe)e=t.asset.toTrustLineXDRObject();else{if(!(t.asset instanceof Be))throw new TypeError("asset must be an Asset or LiquidityPoolId");e=t.asset.toXDRObject()}var r=T.LedgerKey.trustline(new T.LedgerKeyTrustLine({accountId:Q.fromPublicKey(t.account).xdrAccountId(),asset:e})),n=T.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(r),o={};return o.body=T.OperationBody.revokeSponsorship(n),this.setSourceAccount(o,t),new T.Operation(o)},ot.revokeOfferSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!H.isValidEd25519PublicKey(e.seller))throw new Error("seller is invalid");if("string"!=typeof e.offerId)throw new Error("offerId is invalid");var t=T.LedgerKey.offer(new T.LedgerKeyOffer({sellerId:Q.fromPublicKey(e.seller).xdrAccountId(),offerId:T.Int64.fromString(e.offerId)})),r=T.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=T.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.revokeDataSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!H.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if("string"!=typeof e.name||e.name.length>64)throw new Error("name must be a string, up to 64 characters");var t=T.LedgerKey.data(new T.LedgerKeyData({accountId:Q.fromPublicKey(e.account).xdrAccountId(),dataName:e.name})),r=T.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=T.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.revokeClaimableBalanceSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"!=typeof e.balanceId)throw new Error("balanceId is invalid");var t=T.LedgerKey.claimableBalance(new T.LedgerKeyClaimableBalance({balanceId:T.ClaimableBalanceId.fromXDR(e.balanceId,"hex")})),r=T.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=T.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new T.Operation(n)},ot.revokeLiquidityPoolSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"!=typeof e.liquidityPoolId)throw new Error("liquidityPoolId is invalid");var t=T.LedgerKey.liquidityPool(new T.LedgerKeyLiquidityPool({liquidityPoolId:T.PoolId.fromXDR(e.liquidityPoolId,"hex")})),r=T.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={body:T.OperationBody.revokeSponsorship(r)};return this.setSourceAccount(n,e),new T.Operation(n)},ot.revokeSignerSponsorship=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!H.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");if(t.signer.ed25519PublicKey){if(!H.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var r=H.decodeEd25519PublicKey(t.signer.ed25519PublicKey);e=new T.SignerKey.signerKeyTypeEd25519(r)}else if(t.signer.preAuthTx){var n;if(n="string"==typeof t.signer.preAuthTx?Ve.from(t.signer.preAuthTx,"hex"):t.signer.preAuthTx,!Ve.isBuffer(n)||32!==n.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");e=new T.SignerKey.signerKeyTypePreAuthTx(n)}else{if(!t.signer.sha256Hash)throw new Error("signer is invalid");var o;if(o="string"==typeof t.signer.sha256Hash?Ve.from(t.signer.sha256Hash,"hex"):t.signer.sha256Hash,!Ve.isBuffer(o)||32!==o.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");e=new T.SignerKey.signerKeyTypeHashX(o)}var i=new T.RevokeSponsorshipOpSigner({accountId:Q.fromPublicKey(t.account).xdrAccountId(),signerKey:e}),a=T.RevokeSponsorshipOp.revokeSponsorshipSigner(i),s={};return s.body=T.OperationBody.revokeSponsorship(a),this.setSourceAccount(s,t),new T.Operation(s)},ot.clawback=function(e){var t={};if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));t.amount=this._toXDRAmount(e.amount),t.asset=e.asset.toXDRObject();try{t.from=Ce(e.from)}catch(e){throw new Error("from address is invalid")}var r={body:T.OperationBody.clawback(new T.ClawbackOp(t))};return this.setSourceAccount(r,e),new T.Operation(r)},ot.setTrustLineFlags=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if("object"!==qe(e.flags)||0===Object.keys(e.flags).length)throw new Error("opts.flags must be a map of boolean flags to modify");var r={authorized:T.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:T.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:T.TrustLineFlags.trustlineClawbackEnabledFlag()},n=0,o=0;Object.keys(e.flags).forEach((function(t){if(!Object.prototype.hasOwnProperty.call(r,t))throw new Error("unsupported flag name specified: ".concat(t));var i=e.flags[t],a=r[t].value;!0===i?o|=a:!1===i&&(n|=a)})),t.trustor=Q.fromPublicKey(e.trustor).xdrAccountId(),t.asset=e.asset.toXDRObject(),t.clearFlags=n,t.setFlags=o;var i={body:T.OperationBody.setTrustLineFlags(new T.SetTrustLineFlagsOp(t))};return this.setSourceAccount(i,e),new T.Operation(i)},ot.liquidityPoolDeposit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.liquidityPoolId,r=e.maxAmountA,n=e.maxAmountB,o=e.minPrice,i=e.maxPrice,a={};if(!t)throw new TypeError("liquidityPoolId argument is required");if(a.liquidityPoolId=T.PoolId.fromXDR(t,"hex"),!this.isValidAmount(r,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountA"));if(a.maxAmountA=this._toXDRAmount(r),!this.isValidAmount(n,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountB"));if(a.maxAmountB=this._toXDRAmount(n),void 0===o)throw new TypeError("minPrice argument is required");if(a.minPrice=this._toXDRPrice(o),void 0===i)throw new TypeError("maxPrice argument is required");a.maxPrice=this._toXDRPrice(i);var s=new T.LiquidityPoolDepositOp(a),u={body:T.OperationBody.liquidityPoolDeposit(s)};return this.setSourceAccount(u,e),new T.Operation(u)},ot.liquidityPoolWithdraw=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if(!e.liquidityPoolId)throw new TypeError("liquidityPoolId argument is required");if(t.liquidityPoolId=T.PoolId.fromXDR(e.liquidityPoolId,"hex"),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),!this.isValidAmount(e.minAmountA,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountA"));if(t.minAmountA=this._toXDRAmount(e.minAmountA),!this.isValidAmount(e.minAmountB,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountB"));t.minAmountB=this._toXDRAmount(e.minAmountB);var r=new T.LiquidityPoolWithdrawOp(t),n={body:T.OperationBody.liquidityPoolWithdraw(r)};return this.setSourceAccount(n,e),new T.Operation(n)},ot.invokeHostFunction=function(e){if(!e.func)throw new TypeError("host function invocation ('func') required (got ".concat(JSON.stringify(e),")"));var t=new T.InvokeHostFunctionOp({hostFunction:e.func,auth:e.auth||[]}),r={body:T.OperationBody.invokeHostFunction(t)};return this.setSourceAccount(r,e),new T.Operation(r)},ot.extendFootprintTtl=function(e){var t;if((null!==(t=e.extendTo)&&void 0!==t?t:-1)<=0)throw new RangeError("extendTo isn't a ledger quantity (uint32)");var r=new T.ExtendFootprintTtlOp({ext:new T.ExtensionPoint(0),extendTo:e.extendTo}),n={body:T.OperationBody.extendFootprintTtl(r)};return this.setSourceAccount(n,e),new T.Operation(n)},ot.restoreFootprint=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new T.RestoreFootprintOp({ext:new T.ExtensionPoint(0)}),r={body:T.OperationBody.restoreFootprint(t)};return this.setSourceAccount(r,null!=e?e:{}),new T.Operation(r)},ot.createStellarAssetContract=function(e){var t=e.asset;if("string"==typeof t){var r=Ge(t.split(":"),2),n=r[0],o=r[1];t=new oe(n,o)}if(!(t instanceof oe))throw new TypeError("expected Asset in 'opts.asset', got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:T.HostFunction.hostFunctionTypeCreateContract(new T.CreateContractArgs({executable:T.ContractExecutable.contractExecutableStellarAsset(),contractIdPreimage:T.ContractIdPreimage.contractIdPreimageFromAsset(t.toXDRObject())}))})},ot.invokeContractFunction=function(e){var t=new Xe(e.contract);if("contract"!==t._type)throw new TypeError("expected contract strkey instance, got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:T.HostFunction.hostFunctionTypeInvokeContract(new T.InvokeContractArgs({contractAddress:t.toScAddress(),functionName:e.function,args:e.args}))})},ot.createCustomContract=function(e){var t=$e.from(e.salt||Q.random().xdrPublicKey().value());if(!e.wasmHash||32!==e.wasmHash.length)throw new TypeError("expected hash(contract WASM) in 'opts.wasmHash', got ".concat(e.wasmHash));if(32!==t.length)throw new TypeError("expected 32-byte salt in 'opts.salt', got ".concat(e.wasmHash));return this.invokeHostFunction({source:e.source,auth:e.auth,func:T.HostFunction.hostFunctionTypeCreateContract(new T.CreateContractArgs({executable:T.ContractExecutable.contractExecutableWasm($e.from(e.wasmHash)),contractIdPreimage:T.ContractIdPreimage.contractIdPreimageFromAddress(new T.ContractIdPreimageFromAddress({address:e.address.toScAddress(),salt:t}))}))})},ot.uploadContractWasm=function(e){return this.invokeHostFunction({source:e.source,auth:e.auth,func:T.HostFunction.hostFunctionTypeUploadContractWasm($e.from(e.wasm))})};var at=r(8764).Buffer;function st(e){return st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(e)}function ut(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ct(n.key),n)}}function ct(e){var t=function(e,t){if("object"!=st(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=st(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==st(t)?t:String(t)}var lt="none",ft="id",pt="text",ht="hash",yt="return",dt=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._type=t,this._value=r,this._type){case lt:break;case ft:e._validateIdValue(r);break;case pt:e._validateTextValue(r);break;case ht:case yt:e._validateHashValue(r),"string"==typeof r&&(this._value=at.from(r,"hex"));break;default:throw new Error("Invalid memo type")}}var t,r,n;return t=e,n=[{key:"_validateIdValue",value:function(e){var t,r=new Error("Expects a int64 as a string. Got ".concat(e));if("string"!=typeof e)throw r;try{t=new k(e)}catch(e){throw r}if(!t.isFinite())throw r;if(t.isNaN())throw r}},{key:"_validateTextValue",value:function(e){if(!T.Memo.armTypeForArm("text").isValid(e))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(e){var t,r=new Error("Expects a 32 byte hash value or hex encoded string. Got ".concat(e));if(null==e)throw r;if("string"==typeof e){if(!/^[0-9A-Fa-f]{64}$/g.test(e))throw r;t=at.from(e,"hex")}else{if(!at.isBuffer(e))throw r;t=at.from(e)}if(!t.length||32!==t.length)throw r}},{key:"none",value:function(){return new e(lt)}},{key:"text",value:function(t){return new e(pt,t)}},{key:"id",value:function(t){return new e(ft,t)}},{key:"hash",value:function(t){return new e(ht,t)}},{key:"return",value:function(t){return new e(yt,t)}},{key:"fromXDRObject",value:function(t){switch(t.arm()){case"id":return e.id(t.value().toString());case"text":return e.text(t.value());case"hash":return e.hash(t.value());case"retHash":return e.return(t.value())}if(void 0===t.value())return e.none();throw new Error("Unknown type")}}],(r=[{key:"type",get:function(){return this._type},set:function(e){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case lt:return null;case ft:case pt:return this._value;case ht:case yt:return at.from(this._value);default:throw new Error("Invalid memo type")}},set:function(e){throw new Error("Memo is immutable")}},{key:"toXDRObject",value:function(){switch(this._type){case lt:return T.Memo.memoNone();case ft:return T.Memo.memoId(E.UnsignedHyper.fromString(this._value));case pt:return T.Memo.memoText(this._value);case ht:return T.Memo.memoHash(this._value);case yt:return T.Memo.memoReturn(this._value);default:return null}}}])&&ut(t.prototype,r),n&&ut(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),mt=r(8764).Buffer;function gt(e){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gt(e)}function vt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,bt(n.key),n)}}function bt(e){var t=function(e,t){if("object"!=gt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==gt(t)?t:String(t)}function wt(e,t,r){return t=kt(t),function(e,t){if(t&&("object"===gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,St()?Reflect.construct(t,r||[],kt(e).constructor):t.apply(e,r))}function St(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(St=function(){return!!e})()}function kt(e){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kt(e)}function Et(e,t){return Et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Et(e,t)}var At=function(e){function t(e,r){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e){var o=mt.from(e,"base64");e=T.TransactionEnvelope.fromXDR(o)}var i=e.switch();if(i!==T.EnvelopeType.envelopeTypeTxV0()&&i!==T.EnvelopeType.envelopeTypeTx())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(i.name,"."));var a=e.value(),s=a.tx(),u=s.fee().toString();if((n=wt(this,t,[s,(a.signatures()||[]).slice(),u,r]))._envelopeType=i,n._memo=s.memo(),n._sequence=s.seqNum().toString(),n._envelopeType===T.EnvelopeType.envelopeTypeTxV0())n._source=H.encodeEd25519PublicKey(n.tx.sourceAccountEd25519());else n._source=Ue(n.tx.sourceAccount());var c=null,l=null;switch(n._envelopeType){case T.EnvelopeType.envelopeTypeTxV0():l=s.timeBounds();break;case T.EnvelopeType.envelopeTypeTx():switch(s.cond().switch()){case T.PreconditionType.precondTime():l=s.cond().timeBounds();break;case T.PreconditionType.precondV2():l=(c=s.cond().v2()).timeBounds()}}if(l&&(n._timeBounds={minTime:l.minTime().toString(),maxTime:l.maxTime().toString()}),c){var f=c.ledgerBounds();f&&(n._ledgerBounds={minLedger:f.minLedger(),maxLedger:f.maxLedger()});var p=c.minSeqNum();p&&(n._minAccountSequence=p.toString()),n._minAccountSequenceAge=c.minSeqAge(),n._minAccountSequenceLedgerGap=c.minSeqLedgerGap(),n._extraSigners=c.extraSigners()}var h=s.operations()||[];return n._operations=h.map((function(e){return ot.fromXDRObject(e)})),n}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Et(e,t)}(t,e),r=t,(n=[{key:"timeBounds",get:function(){return this._timeBounds},set:function(e){throw new Error("Transaction is immutable")}},{key:"ledgerBounds",get:function(){return this._ledgerBounds},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequence",get:function(){return this._minAccountSequence},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceAge",get:function(){return this._minAccountSequenceAge},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceLedgerGap",get:function(){return this._minAccountSequenceLedgerGap},set:function(e){throw new Error("Transaction is immutable")}},{key:"extraSigners",get:function(){return this._extraSigners},set:function(e){throw new Error("Transaction is immutable")}},{key:"sequence",get:function(){return this._sequence},set:function(e){throw new Error("Transaction is immutable")}},{key:"source",get:function(){return this._source},set:function(e){throw new Error("Transaction is immutable")}},{key:"operations",get:function(){return this._operations},set:function(e){throw new Error("Transaction is immutable")}},{key:"memo",get:function(){return dt.fromXDRObject(this._memo)},set:function(e){throw new Error("Transaction is immutable")}},{key:"signatureBase",value:function(){var e=this.tx;this._envelopeType===T.EnvelopeType.envelopeTypeTxV0()&&(e=T.Transaction.fromXDR(mt.concat([T.PublicKeyType.publicKeyTypeEd25519().toXDR(),e.toXDR()])));var t=new T.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTx(e);return new T.TransactionSignaturePayload({networkId:T.Hash.fromXDR(P(this.networkPassphrase)),taggedTransaction:t}).toXDR()}},{key:"toEnvelope",value:function(){var e,t=this.tx.toXDR(),r=this.signatures.slice();switch(this._envelopeType){case T.EnvelopeType.envelopeTypeTxV0():e=new T.TransactionEnvelope.envelopeTypeTxV0(new T.TransactionV0Envelope({tx:T.TransactionV0.fromXDR(t),signatures:r}));break;case T.EnvelopeType.envelopeTypeTx():e=new T.TransactionEnvelope.envelopeTypeTx(new T.TransactionV1Envelope({tx:T.Transaction.fromXDR(t),signatures:r}));break;default:throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(this._envelopeType.name,"."))}return e}},{key:"getClaimableBalanceId",value:function(e){if(!Number.isInteger(e)||e<0||e>=this.operations.length)throw new RangeError("invalid operation index");var t=this.operations[e];try{t=ot.createClaimableBalance(t)}catch(e){throw new TypeError("expected createClaimableBalance, got ".concat(t.type,": ").concat(e))}var r=H.decodeEd25519PublicKey(Le(this.source)),n=P(T.HashIdPreimage.envelopeTypeOpId(new T.HashIdPreimageOperationId({sourceAccount:T.AccountId.publicKeyTypeEd25519(r),seqNum:T.SequenceNumber.fromString(this.sequence),opNum:e})).toXDR("raw"));return T.ClaimableBalanceId.claimableBalanceIdTypeV0(n).toXDR("hex")}}])&&vt(r.prototype,n),o&&vt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(he),Tt=r(8764).Buffer;function Ot(e){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ot(e)}function Pt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xt(n.key),n)}}function xt(e){var t=function(e,t){if("object"!=Ot(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ot(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ot(t)?t:String(t)}function It(e,t,r){return t=Bt(t),function(e,t){if(t&&("object"===Ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_t()?Reflect.construct(t,r||[],Bt(e).constructor):t.apply(e,r))}function _t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_t=function(){return!!e})()}function Bt(e){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bt(e)}function Rt(e,t){return Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rt(e,t)}var Ct=function(e){function t(e,r){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e){var o=Tt.from(e,"base64");e=T.TransactionEnvelope.fromXDR(o)}var i=e.switch();if(i!==T.EnvelopeType.envelopeTypeTxFeeBump())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxFeeBump but received an ".concat(i.name,"."));var a=e.value(),s=a.tx(),u=s.fee().toString();n=It(this,t,[s,(a.signatures()||[]).slice(),u,r]);var c=T.TransactionEnvelope.envelopeTypeTx(s.innerTx().v1());return n._feeSource=Ue(n.tx.feeSource()),n._innerTransaction=new At(c,r),n}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rt(e,t)}(t,e),r=t,(n=[{key:"innerTransaction",get:function(){return this._innerTransaction}},{key:"operations",get:function(){return this._innerTransaction.operations}},{key:"feeSource",get:function(){return this._feeSource}},{key:"signatureBase",value:function(){var e=new T.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTxFeeBump(this.tx);return new T.TransactionSignaturePayload({networkId:T.Hash.fromXDR(P(this.networkPassphrase)),taggedTransaction:e}).toXDR()}},{key:"toEnvelope",value:function(){var e=new T.FeeBumpTransactionEnvelope({tx:T.FeeBumpTransaction.fromXDR(this.tx.toXDR()),signatures:this.signatures.slice()});return new T.TransactionEnvelope.envelopeTypeTxFeeBump(e)}}])&&Pt(r.prototype,n),o&&Pt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(he);function Ut(e){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ut(e)}function Nt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Lt(n.key),n)}}function Lt(e){var t=function(e,t){if("object"!=Ut(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ut(t)?t:String(t)}var jt=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),H.isValidMed25519PublicKey(t))throw new Error("accountId is an M-address; use MuxedAccount instead");if(!H.isValidEd25519PublicKey(t))throw new Error("accountId is invalid");if("string"!=typeof r)throw new Error("sequence must be of type string");this._accountId=t,this.sequence=new k(r)}var t,r,n;return t=e,(r=[{key:"accountId",value:function(){return this._accountId}},{key:"sequenceNumber",value:function(){return this.sequence.toString()}},{key:"incrementSequenceNumber",value:function(){this.sequence=this.sequence.plus(1)}}])&&Nt(t.prototype,r),n&&Nt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Mt(e){return Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt(e)}function Ft(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Dt(n.key),n)}}function Dt(e){var t=function(e,t){if("object"!=Mt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Mt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mt(t)?t:String(t)}var Vt=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.accountId();if(!H.isValidEd25519PublicKey(n))throw new Error("accountId is invalid");this.account=t,this._muxedXdr=Ne(n,r),this._mAddress=Ue(this._muxedXdr),this._id=r}var t,r,n;return t=e,n=[{key:"fromAddress",value:function(t,r){var n=Ce(t),o=Le(t),i=n.med25519().id().toString();return new e(new jt(o,r),i)}}],(r=[{key:"baseAccount",value:function(){return this.account}},{key:"accountId",value:function(){return this._mAddress}},{key:"id",value:function(){return this._id}},{key:"setId",value:function(e){if("string"!=typeof e)throw new Error("id should be a string representing a number (uint64)");return this._muxedXdr.med25519().id(T.Uint64.fromString(e)),this._mAddress=Ue(this._muxedXdr),this._id=e,this}},{key:"sequenceNumber",value:function(){return this.account.sequenceNumber()}},{key:"incrementSequenceNumber",value:function(){return this.account.incrementSequenceNumber()}},{key:"toXDRObject",value:function(){return this._muxedXdr}},{key:"equals",value:function(e){return this.accountId()===e.accountId()}}])&&Ft(t.prototype,r),n&&Ft(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function qt(e){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qt(e)}function Kt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ht(n.key),n)}}function Ht(e){var t=function(e,t){if("object"!=qt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qt(t)?t:String(t)}var zt=function(){function e(t){var r,n,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,o=void 0,(n=Ht(n="_data"))in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,i=t?"string"==typeof t||ArrayBuffer.isView(t)?e.fromXDR(t):e.fromXDR(t.toXDR()):new T.SorobanTransactionData({resources:new T.SorobanResources({footprint:new T.LedgerFootprint({readOnly:[],readWrite:[]}),instructions:0,readBytes:0,writeBytes:0}),ext:new T.ExtensionPoint(0),resourceFee:new T.Int64(0)}),this._data=i}var t,r,n;return t=e,n=[{key:"fromXDR",value:function(e){return T.SorobanTransactionData.fromXDR(e,"string"==typeof e?"base64":"raw")}}],(r=[{key:"setResourceFee",value:function(e){return this._data.resourceFee(new T.Int64(e)),this}},{key:"setResources",value:function(e,t,r){return this._data.resources().instructions(e),this._data.resources().readBytes(t),this._data.resources().writeBytes(r),this}},{key:"appendFootprint",value:function(e,t){return this.setFootprint(this.getReadOnly().concat(e),this.getReadWrite().concat(t))}},{key:"setFootprint",value:function(e,t){return null!==e&&this.setReadOnly(e),null!==t&&this.setReadWrite(t),this}},{key:"setReadOnly",value:function(e){return this._data.resources().footprint().readOnly(null!=e?e:[]),this}},{key:"setReadWrite",value:function(e){return this._data.resources().footprint().readWrite(null!=e?e:[]),this}},{key:"build",value:function(){return T.SorobanTransactionData.fromXDR(this._data.toXDR())}},{key:"getReadOnly",value:function(){return this.getFootprint().readOnly()}},{key:"getReadWrite",value:function(){return this.getFootprint().readWrite()}},{key:"getFootprint",value:function(){return this._data.resources().footprint()}}])&&Kt(t.prototype,r),n&&Kt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Xt(e){return Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xt(e)}function $t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gt(n.key),n)}}function Gt(e){var t=function(e,t){if("object"!=Xt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xt(t)?t:String(t)}var Wt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"decodeAddress",value:function(e){var t={ed25519PublicKey:T.SignerKey.signerKeyTypeEd25519,preAuthTx:T.SignerKey.signerKeyTypePreAuthTx,sha256Hash:T.SignerKey.signerKeyTypeHashX,signedPayload:T.SignerKey.signerKeyTypeEd25519SignedPayload},r=H.getVersionByteForPrefix(e),n=t[r];if(!n)throw new Error("invalid signer key type (".concat(r,")"));var o=X(r,e);return n("signedPayload"===r?new T.SignerKeyEd25519SignedPayload({ed25519:o.slice(0,32),payload:o.slice(36)}):o)}},{key:"encodeSignerKey",value:function(e){var t,r;switch(e.switch()){case T.SignerKeyType.signerKeyTypeEd25519():t="ed25519PublicKey",r=e.value();break;case T.SignerKeyType.signerKeyTypePreAuthTx():t="preAuthTx",r=e.value();break;case T.SignerKeyType.signerKeyTypeHashX():t="sha256Hash",r=e.value();break;case T.SignerKeyType.signerKeyTypeEd25519SignedPayload():t="signedPayload",r=e.ed25519SignedPayload().toXDR("raw");break;default:throw new Error("invalid SignerKey (type: ".concat(e.switch(),")"))}return $(t,r)}}],(r=null)&&$t(t.prototype,r),n&&$t(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Yt(e){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yt(e)}function Jt(e){return function(e){if(Array.isArray(e))return Zt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Zt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(r),!0).forEach((function(t){tr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function tr(e,t,r){return(t=nr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,nr(n.key),n)}}function nr(e){var t=function(e,t){if("object"!=Yt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yt(t)?t:String(t)}var or="100",ir=0,ar=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("must specify source account for the transaction");if(void 0===r.fee)throw new Error("must specify fee for the transaction (in stroops)");this.source=t,this.operations=[],this.baseFee=r.fee,this.timebounds=r.timebounds?er({},r.timebounds):null,this.ledgerbounds=r.ledgerbounds?er({},r.ledgerbounds):null,this.minAccountSequence=r.minAccountSequence||null,this.minAccountSequenceAge=r.minAccountSequenceAge||null,this.minAccountSequenceLedgerGap=r.minAccountSequenceLedgerGap||null,this.extraSigners=r.extraSigners?Jt(r.extraSigners):null,this.memo=r.memo||dt.none(),this.networkPassphrase=r.networkPassphrase||null,this.sorobanData=r.sorobanData?new zt(r.sorobanData).build():null}var t,r,n;return t=e,n=[{key:"cloneFrom",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t instanceof At))throw new TypeError("expected a 'Transaction', got: ".concat(t));var n,o=(BigInt(t.sequence)-1n).toString();if(H.isValidMed25519PublicKey(t.source))n=Vt.fromAddress(t.source,o);else{if(!H.isValidEd25519PublicKey(t.source))throw new TypeError("unsupported tx source account: ".concat(t.source));n=new jt(t.source,o)}var i=new e(n,er({fee:(parseInt(t.fee,10)/t.operations.length||or).toString(),memo:t.memo,networkPassphrase:t.networkPassphrase,timebounds:t.timeBounds,ledgerbounds:t.ledgerBounds,minAccountSequence:t.minAccountSequence,minAccountSequenceAge:t.minAccountSequenceAge,minAccountSequenceLedgerGap:t.minAccountSequenceLedgerGap,extraSigners:t.extraSigners},r));return t._tx.operations().forEach((function(e){return i.addOperation(e)})),i}},{key:"buildFeeBumpTransaction",value:function(e,t,r,n){var o=r.operations.length,i=new k(r.fee).div(o),a=new k(t);if(a.lt(i))throw new Error("Invalid baseFee, it should be at least ".concat(i," stroops."));var s=new k(or);if(a.lt(s))throw new Error("Invalid baseFee, it should be at least ".concat(s," stroops."));var u,c=r.toEnvelope();if(c.switch()===T.EnvelopeType.envelopeTypeTxV0()){var l=c.v0().tx(),f=new T.Transaction({sourceAccount:new T.MuxedAccount.keyTypeEd25519(l.sourceAccountEd25519()),fee:l.fee(),seqNum:l.seqNum(),cond:T.Preconditions.precondTime(l.timeBounds()),memo:l.memo(),operations:l.operations(),ext:new T.TransactionExt(0)});c=new T.TransactionEnvelope.envelopeTypeTx(new T.TransactionV1Envelope({tx:f,signatures:c.v0().signatures()}))}u="string"==typeof e?Ce(e):e.xdrMuxedAccount();var p=new T.FeeBumpTransaction({feeSource:u,fee:T.Int64.fromString(a.times(o+1).toString()),innerTx:T.FeeBumpTransactionInnerTx.envelopeTypeTx(c.v1()),ext:new T.FeeBumpTransactionExt(0)}),h=new T.FeeBumpTransactionEnvelope({tx:p,signatures:[]}),y=new T.TransactionEnvelope.envelopeTypeTxFeeBump(h);return new Ct(y,n)}},{key:"fromXDR",value:function(e,t){return"string"==typeof e&&(e=T.TransactionEnvelope.fromXDR(e,"base64")),e.switch()===T.EnvelopeType.envelopeTypeTxFeeBump()?new Ct(e,t):new At(e,t)}}],(r=[{key:"addOperation",value:function(e){return this.operations.push(e),this}},{key:"clearOperations",value:function(){return this.operations=[],this}},{key:"addMemo",value:function(e){return this.memo=e,this}},{key:"setTimeout",value:function(e){if(null!==this.timebounds&&this.timebounds.maxTime>0)throw new Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(e<0)throw new Error("timeout cannot be negative");if(e>0){var t=Math.floor(Date.now()/1e3)+e;null===this.timebounds?this.timebounds={minTime:0,maxTime:t}:this.timebounds={minTime:this.timebounds.minTime,maxTime:t}}else this.timebounds={minTime:0,maxTime:0};return this}},{key:"setTimebounds",value:function(e,t){if("number"==typeof e&&(e=new Date(1e3*e)),"number"==typeof t&&(t=new Date(1e3*t)),null!==this.timebounds)throw new Error("TimeBounds has been already set - setting timebounds would overwrite it.");var r=Math.floor(e.valueOf()/1e3),n=Math.floor(t.valueOf()/1e3);if(r<0)throw new Error("min_time cannot be negative");if(n<0)throw new Error("max_time cannot be negative");if(n>0&&r>n)throw new Error("min_time cannot be greater than max_time");return this.timebounds={minTime:r,maxTime:n},this}},{key:"setLedgerbounds",value:function(e,t){if(null!==this.ledgerbounds)throw new Error("LedgerBounds has been already set - setting ledgerbounds would overwrite it.");if(e<0)throw new Error("min_ledger cannot be negative");if(t<0)throw new Error("max_ledger cannot be negative");if(t>0&&e>t)throw new Error("min_ledger cannot be greater than max_ledger");return this.ledgerbounds={minLedger:e,maxLedger:t},this}},{key:"setMinAccountSequence",value:function(e){if(null!==this.minAccountSequence)throw new Error("min_account_sequence has been already set - setting min_account_sequence would overwrite it.");return this.minAccountSequence=e,this}},{key:"setMinAccountSequenceAge",value:function(e){if("number"!=typeof e)throw new Error("min_account_sequence_age must be a number");if(null!==this.minAccountSequenceAge)throw new Error("min_account_sequence_age has been already set - setting min_account_sequence_age would overwrite it.");if(e<0)throw new Error("min_account_sequence_age cannot be negative");return this.minAccountSequenceAge=e,this}},{key:"setMinAccountSequenceLedgerGap",value:function(e){if(null!==this.minAccountSequenceLedgerGap)throw new Error("min_account_sequence_ledger_gap has been already set - setting min_account_sequence_ledger_gap would overwrite it.");if(e<0)throw new Error("min_account_sequence_ledger_gap cannot be negative");return this.minAccountSequenceLedgerGap=e,this}},{key:"setExtraSigners",value:function(e){if(!Array.isArray(e))throw new Error("extra_signers must be an array of strings.");if(null!==this.extraSigners)throw new Error("extra_signers has been already set - setting extra_signers would overwrite it.");if(e.length>2)throw new Error("extra_signers cannot be longer than 2 elements.");return this.extraSigners=Jt(e),this}},{key:"setNetworkPassphrase",value:function(e){return this.networkPassphrase=e,this}},{key:"setSorobanData",value:function(e){return this.sorobanData=new zt(e).build(),this}},{key:"build",value:function(){var e=new k(this.source.sequenceNumber()).plus(1),t={fee:new k(this.baseFee).times(this.operations.length).toNumber(),seqNum:T.SequenceNumber.fromString(e.toString()),memo:this.memo?this.memo.toXDRObject():null};if(null===this.timebounds||void 0===this.timebounds.minTime||void 0===this.timebounds.maxTime)throw new Error("TimeBounds has to be set or you must call setTimeout(TimeoutInfinite).");sr(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),sr(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=E.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=E.UnsignedHyper.fromString(this.timebounds.maxTime.toString());var r=new T.TimeBounds(this.timebounds);if(this.hasV2Preconditions()){var n=null;null!==this.ledgerbounds&&(n=new T.LedgerBounds(this.ledgerbounds));var o=this.minAccountSequence||"0";o=T.SequenceNumber.fromString(o);var i=E.UnsignedHyper.fromString(null!==this.minAccountSequenceAge?this.minAccountSequenceAge.toString():"0"),a=this.minAccountSequenceLedgerGap||0,s=null!==this.extraSigners?this.extraSigners.map(Wt.decodeAddress):[];t.cond=T.Preconditions.precondV2(new T.PreconditionsV2({timeBounds:r,ledgerBounds:n,minSeqNum:o,minSeqAge:i,minSeqLedgerGap:a,extraSigners:s}))}else t.cond=T.Preconditions.precondTime(r);t.sourceAccount=Ce(this.source.accountId()),this.sorobanData?t.ext=new T.TransactionExt(1,this.sorobanData):t.ext=new T.TransactionExt(0,T.Void);var u=new T.Transaction(t);u.operations(this.operations);var c=new T.TransactionEnvelope.envelopeTypeTx(new T.TransactionV1Envelope({tx:u})),l=new At(c,this.networkPassphrase);return this.source.incrementSequenceNumber(),l}},{key:"hasV2Preconditions",value:function(){return null!==this.ledgerbounds||null!==this.minAccountSequence||null!==this.minAccountSequenceAge||null!==this.minAccountSequenceLedgerGap||null!==this.extraSigners&&this.extraSigners.length>0}}])&&rr(t.prototype,r),n&&rr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function sr(e){return e instanceof Date&&!isNaN(e)}var ur={PUBLIC:"Public Global Stellar Network ; September 2015",TESTNET:"Test SDF Network ; September 2015",FUTURENET:"Test SDF Future Network ; October 2022",SANDBOX:"Local Sandbox Stellar Network ; September 2022",STANDALONE:"Standalone Network ; February 2017"};function cr(e){return cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cr(e)}function lr(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return fr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fr(e,t)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hr(n.key),n)}}function hr(e){var t=function(e,t){if("object"!=cr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=cr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==cr(t)?t:String(t)}var yr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"formatTokenAmount",value:function(e,t){if(e.includes("."))throw new TypeError("No decimals are allowed");var r=e;return t>0&&(r=t>r.length?["0",r.toString().padStart(t,"0")].join("."):[r.slice(0,-t),r.slice(-t)].join(".")),r.replace(/(\.\d*?)0+$/,"$1")}},{key:"parseTokenAmount",value:function(e,t){var r,n=lr(e.split(".").slice()),o=n[0],i=n[1];if(n.slice(2).length)throw new Error("Invalid decimal value: ".concat(e));return BigInt(o+(null!==(r=null==i?void 0:i.padEnd(t,"0"))&&void 0!==r?r:"0".repeat(t))).toString()}}],(r=null)&&pr(t.prototype,r),n&&pr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function dr(e){return dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dr(e)}function mr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gr(n.key),n)}}function gr(e){var t=function(e,t){if("object"!=dr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dr(t)?t:String(t)}var vr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);try{this._id=H.decodeContract(t)}catch(e){throw new Error("Invalid contract ID: ".concat(t))}}var t,r,n;return t=e,r=[{key:"contractId",value:function(){return H.encodeContract(this._id)}},{key:"toString",value:function(){return this.contractId()}},{key:"address",value:function(){return Xe.contract(this._id)}},{key:"call",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return ot.invokeContractFunction({contract:this.address().toString(),function:e,args:r})}},{key:"getFootprint",value:function(){return T.LedgerKey.contractData(new T.LedgerKeyContractData({contract:this.address().toScAddress(),key:T.ScVal.scvLedgerKeyContractInstance(),durability:T.ContractDataDurability.persistent()}))}}],r&&mr(t.prototype,r),n&&mr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function br(e){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},br(e)}function wr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sr(n.key),n)}}function Sr(e){var t=function(e,t){if("object"!=br(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==br(t)?t:String(t)}function kr(e,t,r){return t=Ar(t),function(e,t){if(t&&("object"===br(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Er()?Reflect.construct(t,r||[],Ar(e).constructor):t.apply(e,r))}function Er(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Er=function(){return!!e})()}function Ar(e){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ar(e)}function Tr(e,t){return Tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tr(e,t)}var Or=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return kr(this,t,[r])}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 128}}])&&wr(r.prototype,n),o&&wr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(E.LargeInt);function Pr(e){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pr(e)}function xr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ir(n.key),n)}}function Ir(e){var t=function(e,t){if("object"!=Pr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Pr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pr(t)?t:String(t)}function _r(e,t,r){return t=Rr(t),function(e,t){if(t&&("object"===Pr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Br()?Reflect.construct(t,r||[],Rr(e).constructor):t.apply(e,r))}function Br(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Br=function(){return!!e})()}function Rr(e){return Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rr(e)}function Cr(e,t){return Cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cr(e,t)}Or.defineIntBoundaries();var Ur=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return _r(this,t,[r])}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 256}}])&&xr(r.prototype,n),o&&xr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(E.LargeInt);function Nr(e){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nr(e)}function Lr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jr(n.key),n)}}function jr(e){var t=function(e,t){if("object"!=Nr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Nr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Nr(t)?t:String(t)}function Mr(e,t,r){return t=Dr(t),function(e,t){if(t&&("object"===Nr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fr()?Reflect.construct(t,r||[],Dr(e).constructor):t.apply(e,r))}function Fr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fr=function(){return!!e})()}function Dr(e){return Dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Dr(e)}function Vr(e,t){return Vr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vr(e,t)}Ur.defineIntBoundaries();var qr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Mr(this,t,[r])}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 128}}])&&Lr(r.prototype,n),o&&Lr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(E.LargeInt);function Kr(e){return Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kr(e)}function Hr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zr(n.key),n)}}function zr(e){var t=function(e,t){if("object"!=Kr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kr(t)?t:String(t)}function Xr(e,t,r){return t=Gr(t),function(e,t){if(t&&("object"===Kr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$r()?Reflect.construct(t,r||[],Gr(e).constructor):t.apply(e,r))}function $r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($r=function(){return!!e})()}function Gr(e){return Gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gr(e)}function Wr(e,t){return Wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wr(e,t)}qr.defineIntBoundaries();var Yr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Xr(this,t,[r])}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 256}}])&&Hr(r.prototype,n),o&&Hr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(E.LargeInt);function Jr(e){return Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jr(e)}function Zr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,en(n.key),n)}}function Qr(e,t,r){return(t=en(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function en(e){var t=function(e,t){if("object"!=Jr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Jr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jr(t)?t:String(t)}Yr.defineIntBoundaries();var tn=function(){function e(t,r){switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Qr(this,"int",void 0),Qr(this,"type",void 0),r instanceof Array||(r=[r]),r=r.map((function(t){return"bigint"==typeof t?t:t instanceof e?t.toBigInt():BigInt(t)})),t){case"i64":this.int=new E.Hyper(r);break;case"i128":this.int=new qr(r);break;case"i256":this.int=new Yr(r);break;case"u64":this.int=new E.UnsignedHyper(r);break;case"u128":this.int=new Or(r);break;case"u256":this.int=new Ur(r);break;default:throw TypeError("invalid type: ".concat(t))}this.type=t}var t,r,n;return t=e,n=[{key:"isType",value:function(e){switch(e){case"i64":case"i128":case"i256":case"u64":case"u128":case"u256":return!0;default:return!1}}},{key:"getType",value:function(e){return e.slice(3).toLowerCase()}}],(r=[{key:"toNumber",value:function(){var e=this.int.toBigInt();if(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)throw RangeError("value ".concat(e," not in range for Number ")+"[".concat(Number.MAX_SAFE_INTEGER,", ").concat(Number.MIN_SAFE_INTEGER,"]"));return Number(e)}},{key:"toBigInt",value:function(){return this.int.toBigInt()}},{key:"toI64",value:function(){this._sizeCheck(64);var e=this.toBigInt();if(BigInt.asIntN(64,e)!==e)throw RangeError("value too large for i64: ".concat(e));return T.ScVal.scvI64(new T.Int64(e))}},{key:"toU64",value:function(){return this._sizeCheck(64),T.ScVal.scvU64(new T.Uint64(BigInt.asUintN(64,this.toBigInt())))}},{key:"toI128",value:function(){this._sizeCheck(128);var e=this.int.toBigInt(),t=BigInt.asIntN(64,e>>64n),r=BigInt.asUintN(64,e);return T.ScVal.scvI128(new T.Int128Parts({hi:new T.Int64(t),lo:new T.Uint64(r)}))}},{key:"toU128",value:function(){this._sizeCheck(128);var e=this.int.toBigInt();return T.ScVal.scvU128(new T.UInt128Parts({hi:new T.Uint64(BigInt.asUintN(64,e>>64n)),lo:new T.Uint64(BigInt.asUintN(64,e))}))}},{key:"toI256",value:function(){var e=this.int.toBigInt(),t=BigInt.asIntN(64,e>>192n),r=BigInt.asUintN(64,e>>128n),n=BigInt.asUintN(64,e>>64n),o=BigInt.asUintN(64,e);return T.ScVal.scvI256(new T.Int256Parts({hiHi:new T.Int64(t),hiLo:new T.Uint64(r),loHi:new T.Uint64(n),loLo:new T.Uint64(o)}))}},{key:"toU256",value:function(){var e=this.int.toBigInt(),t=BigInt.asUintN(64,e>>192n),r=BigInt.asUintN(64,e>>128n),n=BigInt.asUintN(64,e>>64n),o=BigInt.asUintN(64,e);return T.ScVal.scvU256(new T.UInt256Parts({hiHi:new T.Uint64(t),hiLo:new T.Uint64(r),loHi:new T.Uint64(n),loLo:new T.Uint64(o)}))}},{key:"toScVal",value:function(){switch(this.type){case"i64":return this.toI64();case"i128":return this.toI128();case"i256":return this.toI256();case"u64":return this.toU64();case"u128":return this.toU128();case"u256":return this.toU256();default:throw TypeError("invalid type: ".concat(this.type))}}},{key:"valueOf",value:function(){return this.int.valueOf()}},{key:"toString",value:function(){return this.int.toString()}},{key:"toJSON",value:function(){return{value:this.toBigInt().toString(),type:this.type}}},{key:"_sizeCheck",value:function(e){if(this.int.size>e)throw RangeError("value too large for ".concat(e," bits (").concat(this.type,")"))}}])&&Zr(t.prototype,r),n&&Zr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}function nn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,on(n.key),n)}}function on(e){var t=function(e,t){if("object"!=rn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rn(t)?t:String(t)}function an(e,t,r){return t=un(t),function(e,t){if(t&&("object"===rn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sn()?Reflect.construct(t,r||[],un(e).constructor):t.apply(e,r))}function sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(sn=function(){return!!e})()}function un(e){return un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},un(e)}function cn(e,t){return cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cn(e,t)}var ln=function(e){function t(e,r){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=e<0,i=null!==(n=null==r?void 0:r.type)&&void 0!==n?n:"";if(i.startsWith("u")&&o)throw TypeError("specified type ".concat(r.type," yet negative (").concat(e,")"));if(""===i){i=o?"i":"u";var a=function(e){var t,r=e.toString(2).length;return null!==(t=[64,128,256].find((function(e){return r<=e})))&&void 0!==t?t:r}(e);switch(a){case 64:case 128:case 256:i+=a.toString();break;default:throw RangeError("expected 64/128/256 bits for input (".concat(e,"), got ").concat(a))}}return an(this,t,[i,e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cn(e,t)}(t,e),r=t,n&&nn(r.prototype,n),o&&nn(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(tn);function fn(e){var t=tn.getType(e.switch().name);switch(e.switch().name){case"scvU32":case"scvI32":return BigInt(e.value());case"scvU64":case"scvI64":return new tn(t,e.value()).toBigInt();case"scvU128":case"scvI128":return new tn(t,[e.value().lo(),e.value().hi()]).toBigInt();case"scvU256":case"scvI256":return new tn(t,[e.value().loLo(),e.value().loHi(),e.value().hiLo(),e.value().hiHi()]).toBigInt();default:throw TypeError("expected integer type, got ".concat(e.switch()))}}var pn=r(8764).Buffer;function hn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dn(e){return dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(e)}function mn(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(dn(e)){case"object":if(null===e)return T.ScVal.scvVoid();if(e instanceof T.ScVal)return e;if(e instanceof Xe)return e.toScVal();if(e instanceof vr)return e.address().toScVal();if(e instanceof Uint8Array||pn.isBuffer(e)){var o,i=Uint8Array.from(e);switch(null!==(o=null==n?void 0:n.type)&&void 0!==o?o:"bytes"){case"bytes":return T.ScVal.scvBytes(i);case"symbol":return T.ScVal.scvSymbol(i);case"string":return T.ScVal.scvString(i);default:throw new TypeError("invalid type (".concat(n.type,") specified for bytes-like value"))}}if(Array.isArray(e)){if(e.length>0&&e.some((function(t){return dn(t)!==dn(e[0])})))throw new TypeError("array values (".concat(e,") must have the same type (types: ").concat(e.map((function(e){return dn(e)})).join(","),")"));return T.ScVal.scvVec(e.map((function(e){return mn(e,n)})))}var a;if("Object"!==(null!==(t=null===(r=e.constructor)||void 0===r?void 0:r.name)&&void 0!==t?t:""))throw new TypeError("cannot interpret ".concat(null===(a=e.constructor)||void 0===a?void 0:a.name," value as ScVal (").concat(JSON.stringify(e),")"));return T.ScVal.scvMap(Object.entries(e).map((function(e){var t,r,o=hn(e,2),i=o[0],a=o[1],s=hn(null!==(t=(null!==(r=null==n?void 0:n.type)&&void 0!==r?r:{})[i])&&void 0!==t?t:[null,null],2),u=s[0],c=s[1],l=u?{type:u}:{},f=c?{type:c}:{};return new T.ScMapEntry({key:mn(i,l),val:mn(a,f)})})));case"number":case"bigint":switch(null==n?void 0:n.type){case"u32":return T.ScVal.scvU32(e);case"i32":return T.ScVal.scvI32(e)}return new ln(e,{type:null==n?void 0:n.type}).toScVal();case"string":var s,u=null!==(s=null==n?void 0:n.type)&&void 0!==s?s:"string";switch(u){case"string":return T.ScVal.scvString(e);case"symbol":return T.ScVal.scvSymbol(e);case"address":return new Xe(e).toScVal();default:if(tn.isType(u))return new tn(u,e).toScVal();throw new TypeError("invalid type (".concat(n.type,") specified for string value"))}case"boolean":return T.ScVal.scvBool(e);case"undefined":return T.ScVal.scvVoid();case"function":return mn(e());default:throw new TypeError("failed to convert typeof ".concat(dn(e)," (").concat(e,")"))}}function gn(e){var t,r;switch(e.switch().value){case T.ScValType.scvVoid().value:return null;case T.ScValType.scvU64().value:case T.ScValType.scvI64().value:return e.value().toBigInt();case T.ScValType.scvU128().value:case T.ScValType.scvI128().value:case T.ScValType.scvU256().value:case T.ScValType.scvI256().value:return fn(e);case T.ScValType.scvVec().value:return(null!==(t=e.vec())&&void 0!==t?t:[]).map(gn);case T.ScValType.scvAddress().value:return Xe.fromScVal(e).toString();case T.ScValType.scvMap().value:return Object.fromEntries((null!==(r=e.map())&&void 0!==r?r:[]).map((function(e){return[gn(e.key()),gn(e.val())]})));case T.ScValType.scvBool().value:case T.ScValType.scvU32().value:case T.ScValType.scvI32().value:case T.ScValType.scvBytes().value:return e.value();case T.ScValType.scvSymbol().value:case T.ScValType.scvString().value:var n=e.value();if(pn.isBuffer(n)||ArrayBuffer.isView(n))try{return(new TextDecoder).decode(n)}catch(e){return new Uint8Array(n.buffer)}return n;case T.ScValType.scvTimepoint().value:case T.ScValType.scvDuration().value:return new T.Uint64(e.value()).toBigInt();case T.ScValType.scvStatus().value:switch(e.value().switch()){case T.ScStatusType.sstOk().value:case T.ScStatusType.sstUnknownError().value:case T.ScStatusType.sstHostValueError().value:case T.ScStatusType.sstHostObjectError().value:case T.ScStatusType.sstHostFunctionError().value:case T.ScStatusType.sstHostStorageError().value:case T.ScStatusType.sstHostContextError().value:case T.ScStatusType.sstVmError().value:case T.ScStatusType.sstContractError().value:case T.ScStatusType.sstHostAuthError().value:}default:return e.value()}}function vn(e){return vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vn(e)}function bn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(r),!0).forEach((function(t){Sn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Sn(e,t,r){var n;return n=function(e,t){if("object"!=vn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==vn(n)?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kn(e){return e.map((function(e){return e instanceof T.DiagnosticEvent?En(e.event()):En(e)}))}function En(e){return wn(wn({},null!=e.contractId()&&{contractId:H.encodeContract(e.contractId())}),{},{type:e.type().name,topics:e.body().value().topics().map((function(e){return gn(e)})),data:gn(e.body().value().data())})}var An=r(8764).Buffer;function Tn(e){return Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tn(e)}function On(){On=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new _(n||[]);return o(a,"_invoke",{value:O(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",y="executing",d="completed",m={};function g(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(B([])));k&&k!==r&&n.call(k,a)&&(w=k);var E=b.prototype=g.prototype=Object.create(w);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(o,i,a,s){var u=f(e[o],e,i);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Tn(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function O(t,r,n){var o=p;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var c=f(t,r,n);if("normal"===c.type){if(o=n.done?d:h,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=d,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function B(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Tn(t)+" is not iterable")}return v.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},A(T.prototype),c(T.prototype,s,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new T(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(E),c(E,u,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=B,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:B(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function Pn(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function xn(e,t,r){return In.apply(this,arguments)}function In(){var e;return e=On().mark((function e(t,r,n){var o,i,a,s,u,c,l,f,p,h=arguments;return On().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=h.length>3&&void 0!==h[3]?h[3]:ur.FUTURENET,t.credentials().switch().value===T.SorobanCredentialsType.sorobanCredentialsAddress().value){e.next=3;break}return e.abrupt("return",t);case 3:if(i=T.SorobanAuthorizationEntry.fromXDR(t.toXDR()),(a=i.credentials().address()).signatureExpirationLedger(n),s=P(An.from(o)),u=T.HashIdPreimage.envelopeTypeSorobanAuthorization(new T.HashIdPreimageSorobanAuthorization({networkId:s,nonce:a.nonce(),invocation:i.rootInvocation(),signatureExpirationLedger:a.signatureExpirationLedger()})),c=P(u.toXDR()),"function"!=typeof r){e.next=17;break}return e.t0=An,e.next=13,r(u);case 13:e.t1=e.sent,l=e.t0.from.call(e.t0,e.t1),e.next=18;break;case 17:l=An.from(r.sign(c));case 18:if(f=Xe.fromScAddress(a.address()).toString(),Q.fromPublicKey(f).verify(c,l)){e.next=21;break}throw new Error("signature doesn't match payload");case 21:return p=mn({public_key:H.decodeEd25519PublicKey(f),signature:l},{type:{public_key:["symbol",null],signature:["symbol",null]}}),a.signature(T.ScVal.scvVec([p])),e.abrupt("return",i);case 24:case"end":return e.stop()}}),e)})),In=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Pn(i,n,o,a,s,"next",e)}function s(e){Pn(i,n,o,a,s,"throw",e)}a(void 0)}))},In.apply(this,arguments)}function _n(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ur.FUTURENET,i=Q.random().rawPublicKey(),a=new T.Int64(i.subarray(0,8).reduce((function(e,t){return e<<8|t}),0)),s=n||e.publicKey();if(!s)throw new Error("authorizeInvocation requires publicKey parameter");return xn(new T.SorobanAuthorizationEntry({rootInvocation:r,credentials:T.SorobanCredentials.sorobanCredentialsAddress(new T.SorobanAddressCredentials({address:new Xe(s).toScAddress(),nonce:a,signatureExpirationLedger:0,signature:T.ScVal.scvVec([])}))}),e,t,o)}function Bn(e){var t=e.function(),r={},n=t.value();switch(t.switch().value){case 0:r.type="execute",r.args={source:Xe.fromScAddress(n.contractAddress()).toString(),function:n.functionName(),args:n.args().map((function(e){return gn(e)}))};break;case 1:r.type="create",r.args={};var o=[n.executable(),n.contractIdPreimage()],i=o[0],a=o[1];if(!!i.switch().value!=!!a.switch().value)throw new Error("creation function appears invalid: ".concat(JSON.stringify(n)," (should be wasm+address or token+asset)"));switch(i.switch().value){case 0:var s=a.fromAddress();r.args.type="wasm",r.args.wasm={salt:s.salt().toString("hex"),hash:i.wasmHash().toString("hex"),address:Xe.fromScAddress(s.address()).toString()};break;case 1:r.args.type="sac",r.args.asset=oe.fromOperation(a.fromAsset()).toString();break;default:throw new Error("unknown creation type: ".concat(JSON.stringify(i)))}break;default:throw new Error("unknown invocation type (".concat(t.switch(),"): ").concat(JSON.stringify(t)))}return r.invocations=e.subInvocations().map((function(e){return Bn(e)})),r}function Rn(e,t){Cn(e,1,t)}function Cn(e,t,r,n){!1!==r(e,t,n)&&e.subInvocations().forEach((function(n){return Cn(n,t+1,r,e)}))}e=r.hmd(e),k.DEBUG=!0;const Un=e.exports},6906:(e,t)=>{"use strict";var r=function(e,t){return t||(t={}),e.split("").forEach((function(e,r){e in t||(t[e]=r)})),t},n={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};n.charmap=r(n.alphabet,n.charmap);var o={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};o.charmap=r(o.alphabet,o.charmap);var i={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function a(e){if(this.buf=[],this.shift=8,this.carry=0,e){switch(e.type){case"rfc4648":this.charmap=t.rfc4648.charmap;break;case"crockford":this.charmap=t.crockford.charmap;break;case"base32hex":this.charmap=t.base32hex.charmap;break;default:throw new Error("invalid type")}e.charmap&&(this.charmap=e.charmap)}}function s(e){if(this.buf="",this.shift=3,this.carry=0,e){switch(e.type){case"rfc4648":this.alphabet=t.rfc4648.alphabet;break;case"crockford":this.alphabet=t.crockford.alphabet;break;case"base32hex":this.alphabet=t.base32hex.alphabet;break;default:throw new Error("invalid type")}e.alphabet?this.alphabet=e.alphabet:e.lc&&(this.alphabet=this.alphabet.toLowerCase())}}i.charmap=r(i.alphabet,i.charmap),a.prototype.charmap=n.charmap,a.prototype.write=function(e){var t=this.charmap,r=this.buf,n=this.shift,o=this.carry;return e.toUpperCase().split("").forEach((function(e){if("="!=e){var i=255&t[e];(n-=5)>0?o|=i<<n:n<0?(r.push(o|i>>-n),o=i<<(n+=8)&255):(r.push(o|i),n=8,o=0)}})),this.shift=n,this.carry=o,this},a.prototype.finalize=function(e){return e&&this.write(e),8!==this.shift&&0!==this.carry&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},s.prototype.alphabet=n.alphabet,s.prototype.write=function(e){var t,r,n,o=this.shift,i=this.carry;for(n=0;n<e.length;n++)t=i|(r=e[n])>>o,this.buf+=this.alphabet[31&t],o>5&&(t=r>>(o-=5),this.buf+=this.alphabet[31&t]),i=r<<(o=5-o),o=8-o;return this.shift=o,this.carry=i,this},s.prototype.finalize=function(e){return e&&this.write(e),3!==this.shift&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},t.encode=function(e,t){return new s(t).finalize(e)},t.decode=function(e,t){return new a(t).finalize(e)},t.Decoder=a,t.Encoder=s,t.charmap=r,t.crockford=o,t.rfc4648=n,t.base32hex=i},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";var n=r(5108);const o=r(9742),i=r(645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function u(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=u(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return y(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return y(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return y(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|d(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?u(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return f(e),u(e<0?0:0|d(e))}function h(e){const t=e.length<0?0:0|d(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function y(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function d(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(o)return n?-1:$(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function S(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function k(e,t,r,n){return W($(t,e.length-r),e,r,n)}function E(e,t,r,n){return W(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return W(G(t),e,r,n)}function T(e,t,r,n){return W(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||void 0===n||"function"!=typeof n.error||n.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Z[e[n]];return o}function R(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){U(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){U(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Q((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const D={};function V(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function K(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function G(e){return o.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},1924:(e,t,r)=>{"use strict";var n=r(210),o=r(5559),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),o=r(210),i=r(7771),a=o("%TypeError%"),s=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(u,s),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return c(n,s,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},5108:(e,t,r)=>{var n=r(9539),o=r(9282);function i(){return(new Date).getTime()}var a,s=Array.prototype.slice,u={};a=void 0!==r.g&&r.g.console?r.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var c=[[function(){},"log"],[function(){a.log.apply(a,arguments)},"info"],[function(){a.log.apply(a,arguments)},"warn"],[function(){a.warn.apply(a,arguments)},"error"],[function(e){u[e]=i()},"time"],[function(e){var t=u[e];if(!t)throw new Error("No such label: "+e);delete u[e];var r=i()-t;a.log(e+": "+r+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=n.format.apply(null,arguments),a.error(e.stack)},"trace"],[function(e){a.log(n.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=s.call(arguments,1);o.ok(!1,n.format.apply(null,t))}},"assert"]],l=0;l<c.length;l++){var f=c[l],p=f[0],h=f[1];a[h]||(a[h]=p)}e.exports=a},2296:(e,t,r)=>{"use strict";var n=r(1044)(),o=r(210),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(e){i=!1}var a=o("%SyntaxError%"),s=o("%TypeError%"),u=r(7296);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(e,t);if(i)i(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},4289:(e,t,r)=>{"use strict";var n=r(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(2296),u=r(1044)(),c=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(e,t,r,!0):s(e,t,r)},l=function(e,t){var r=arguments.length>2?arguments[2]:{},i=n(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s<i.length;s+=1)c(e,i[s],t[i[s]],r[i[s]])};l.supportsDescriptors=!!u,e.exports=l},4029:(e,t,r)=>{"use strict";var n=r(5320),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===o.call(e)?function(e,t,r){for(var n=0,o=e.length;n<o;n++)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a):"string"==typeof e?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,a):function(e,t,r){for(var n in e)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a)}},7648:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),s=r(0,o.length-a.length),u=[],c=0;c<s;c++)u[c]="$"+c;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(u,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,n(a,arguments));return Object(t)===t?t:this}return o.apply(e,n(a,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i}},8612:(e,t,r)=>{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},210:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new a},l=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,f=r(1405)(),p=r(8185)(),h=Object.getPrototypeOf||(p?function(e){return e.__proto__}:null),y={},d="undefined"!=typeof Uint8Array&&h?h(Uint8Array):n,m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f&&h?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&h?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f&&h?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f&&h?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&h?h(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":l,"%TypedArray%":d,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(h)try{null.error}catch(e){var g=h(h(e));m["%Error.prototype%"]=g}var v=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&h&&(r=h(o.prototype))}return m[t]=r,r},b={"%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"]},w=r(8612),S=r(8824),k=w.call(Function.call,Array.prototype.concat),E=w.call(Function.apply,Array.prototype.splice),A=w.call(Function.call,String.prototype.replace),T=w.call(Function.call,String.prototype.slice),O=w.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,I=function(e,t){var r,n=e;if(S(b,n)&&(n="%"+(r=b[n])[0]+"%"),S(m,n)){var i=m[n];if(i===y&&(i=v(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=T(e,0,1),r=T(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(e,P,(function(e,t,r,o){n[n.length]=r?A(o,x,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=I("%"+n+"%",t),s=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],E(r,k([0,1],f)));for(var p=1,h=!0;p<r.length;p+=1){var y=r[p],d=T(y,0,1),g=T(y,-1);if(('"'===d||"'"===d||"`"===d||'"'===g||"'"===g||"`"===g)&&d!==g)throw new o("property names with quotes must have matching quotes");if("constructor"!==y&&h||(l=!0),S(m,s="%"+(n+="."+y)+"%"))c=m[s];else if(null!=c){if(!(y in c)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&p+1>=r.length){var v=u(c,y);c=(h=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[y]}else h=S(c,y),c=c[y];h&&!l&&(m[s]=c)}}return c}},7296:(e,t,r)=>{"use strict";var n=r(210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},1044:(e,t,r)=>{"use strict";var n=r(210)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},8185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},1405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(5419);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6410:(e,t,r)=>{"use strict";var n=r(5419);e.exports=function(){return n()&&!!Symbol.toStringTag}},8824:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(8612);e.exports=i.call(n,o)},645:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,y=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=y,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+h]=255&a,h+=y,a/=256,c-=8);e[r+h-y]|=128*d}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},2584:(e,t,r)=>{"use strict";var n=r(6410)(),o=r(1924)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=s?i:a},5320:e=>{"use strict";var t,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,t)}catch(e){e!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},s=function(e){try{return!a(e)&&(n.call(e),!0)}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==r)return!1}return!a(e)&&s(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return s(e);if(a(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},8662:(e,t,r)=>{"use strict";var n,o=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(6410)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(i.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===o.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},8611:e=>{"use strict";e.exports=function(e){return e!=e}},360:(e,t,r)=>{"use strict";var n=r(5559),o=r(4289),i=r(8611),a=r(9415),s=r(3194),u=n(a(),Number);o(u,{getPolyfill:a,implementation:i,shim:s}),e.exports=u},9415:(e,t,r)=>{"use strict";var n=r(8611);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},3194:(e,t,r)=>{"use strict";var n=r(4289),o=r(9415);e.exports=function(){var e=o();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},5692:(e,t,r)=>{"use strict";var n=r(6430);e.exports=function(e){return!!n(e)}},4244:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},609:(e,t,r)=>{"use strict";var n=r(4289),o=r(5559),i=r(4244),a=r(5624),s=r(2281),u=o(a(),Object);n(u,{getPolyfill:a,implementation:i,shim:s}),e.exports=u},5624:(e,t,r)=>{"use strict";var n=r(4244);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},2281:(e,t,r)=>{"use strict";var n=r(5624),o=r(4289);e.exports=function(){var e=n();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},8987:(e,t,r)=>{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(1414),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),n=a(e),s=t&&"[object String]"===i.call(e),p=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var y=c&&r;if(s&&e.length>0&&!o.call(e,0))for(var d=0;d<e.length;++d)p.push(String(d));if(n&&e.length>0)for(var m=0;m<e.length;++m)p.push(String(m));else for(var g in e)y&&"prototype"===g||!o.call(e,g)||p.push(String(g));if(u)for(var v=function(e){if("undefined"==typeof window||!h)return f(e);try{return f(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)v&&"constructor"===l[b]||!o.call(e,l[b])||p.push(l[b]);return p}}e.exports=n},2215:(e,t,r)=>{"use strict";var n=Array.prototype.slice,o=r(1414),i=Object.keys,a=i?function(e){return i(e)}:r(8987),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?s(n.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},1414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},2837:(e,t,r)=>{"use strict";var n=r(2215),o=r(5419)(),i=r(1924),a=Object,s=i("Array.prototype.push"),u=i("Object.prototype.propertyIsEnumerable"),c=o?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=a(e);if(1===arguments.length)return r;for(var i=1;i<arguments.length;++i){var l=a(arguments[i]),f=n(l),p=o&&(Object.getOwnPropertySymbols||c);if(p)for(var h=p(l),y=0;y<h.length;++y){var d=h[y];u(l,d)&&s(f,d)}for(var m=0;m<f.length;++m){var g=f[m];if(u(l,g)){var v=l[g];r[g]=v}}}return r}},8162:(e,t,r)=>{"use strict";var n=r(2837);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var o=Object.assign({},r),i="";for(var a in o)i+=a;return e!==i}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return"y"===e[1]}return!1}()?n:Object.assign:n}},4155:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&p())}function p(){if(!c){var e=a(f);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l<t;)s&&s[l].run();l=-1,t=u.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function y(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new h(e,t)),1!==u.length||c||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=y,n.addListener=y,n.once=y,n.off=y,n.removeListener=y,n.removeAllListeners=y,n.emit=y,n.prependListener=y,n.prependOnceListener=y,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},9509:(e,t,r)=>{var n=r(8764),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},7771:(e,t,r)=>{"use strict";var n=r(210),o=r(2296),i=r(1044)(),a=r(7296),s=n("%TypeError%"),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},4189:(e,t,r)=>{var n=r(9509).Buffer;function o(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}o.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,o=this._blockSize,i=e.length,a=this._len,s=0;s<i;){for(var u=a%o,c=Math.min(i-s,o-u),l=0;l<c;l++)r[u+l]=e[s+l];s+=c,(a+=c)%o==0&&this._update(r)}return this._len+=i,this},o.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},9072:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(4448),n.sha1=r(8336),n.sha224=r(8432),n.sha256=r(7499),n.sha384=r(1686),n.sha512=r(7816)},4448:(e,t,r)=>{var n=r(5717),o=r(4189),i=r(9509).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var p=0;p<80;++p){var h=~~(p/20),y=0|((t=n)<<5|t>>>27)+l(h,o,i,s)+u+r[p]+a[h];u=s,s=i,i=c(o),o=n,n=y}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.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},e.exports=u},8336:(e,t,r)=>{var n=r(5717),o=r(4189),i=r(9509).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,p=0;p<16;++p)r[p]=e.readInt32BE(4*p);for(;p<80;++p)r[p]=(t=r[p-3]^r[p-8]^r[p-14]^r[p-16])<<1|t>>>31;for(var h=0;h<80;++h){var y=~~(h/20),d=c(n)+f(y,o,i,s)+u+r[h]+a[y]|0;u=s,s=i,i=l(o),o=n,n=d}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.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},e.exports=u},8432:(e,t,r)=>{var n=r(5717),o=r(7499),i=r(4189),a=r(9509).Buffer,s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}n(u,o),u.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},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},7499:(e,t,r)=>{var n=r(5717),o=r(4189),i=r(9509).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,o),u.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},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,y=0|this._f,d=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+h(r[g-15])+r[g-16];for(var v=0;v<64;++v){var b=m+p(u)+c(u,y,d)+a[v]+r[v]|0,w=f(n)+l(n,o,i)|0;m=d,d=y,y=u,u=s+b|0,s=i,i=o,o=n,n=b+w|0}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=y+this._f|0,this._g=d+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},1686:(e,t,r)=>{var n=r(5717),o=r(7816),i=r(4189),a=r(9509).Buffer,s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}n(u,o),u.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},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},7816:(e,t,r)=>{var n=r(5717),o=r(4189),i=r(9509).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function p(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function y(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function d(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0<t>>>0?1:0}n(u,o),u.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},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,o=0|this._ch,i=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,S=0|this._bl,k=0|this._cl,E=0|this._dl,A=0|this._el,T=0|this._fl,O=0|this._gl,P=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var I=t[x-30],_=t[x-30+1],B=h(I,_),R=y(_,I),C=d(I=t[x-4],_=t[x-4+1]),U=m(_,I),N=t[x-14],L=t[x-14+1],j=t[x-32],M=t[x-32+1],F=R+L|0,D=B+N+g(F,R)|0;D=(D=D+C+g(F=F+U|0,U)|0)+j+g(F=F+M|0,M)|0,t[x]=D,t[x+1]=F}for(var V=0;V<160;V+=2){D=t[V],F=t[V+1];var q=l(r,n,o),K=l(w,S,k),H=f(r,w),z=f(w,r),X=p(s,A),$=p(A,s),G=a[V],W=a[V+1],Y=c(s,u,v),J=c(A,T,O),Z=P+$|0,Q=b+X+g(Z,P)|0;Q=(Q=(Q=Q+Y+g(Z=Z+J|0,J)|0)+G+g(Z=Z+W|0,W)|0)+D+g(Z=Z+F|0,F)|0;var ee=z+K|0,te=H+q+g(ee,z)|0;b=v,P=O,v=u,O=T,u=s,T=A,s=i+Q+g(A=E+Z|0,E)|0,i=o,E=k,o=n,k=S,n=r,S=w,r=Q+te+g(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+S|0,this._cl=this._cl+k|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+T|0,this._gl=this._gl+O|0,this._hl=this._hl+P|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,S)|0,this._ch=this._ch+o+g(this._cl,k)|0,this._dh=this._dh+i+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,A)|0,this._fh=this._fh+u+g(this._fl,T)|0,this._gh=this._gh+v+g(this._gl,O)|0,this._hh=this._hh+b+g(this._hl,P)|0},u.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},780:(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},o=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var a=t(),s=t([1]),u=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function y(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function d(e,t,r,n,o){var i,a=0;for(i=0;i<o;i++)a|=e[t+i]^r[n+i];return(1&a-1>>>8)-1}function m(e,t,r,n){return d(e,t,r,n,16)}function g(e,t,r,n){return d(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,y=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,S=i,k=a,E=s,A=u,T=c,O=l,P=f,x=p,I=h,_=y,B=d,R=m,C=g,U=v,N=b,L=w,j=0;j<20;j+=2)S^=(o=(C^=(o=(I^=(o=(T^=(o=S+C|0)<<7|o>>>25)+S|0)<<9|o>>>23)+T|0)<<13|o>>>19)+I|0)<<18|o>>>14,O^=(o=(k^=(o=(U^=(o=(_^=(o=O+k|0)<<7|o>>>25)+O|0)<<9|o>>>23)+_|0)<<13|o>>>19)+U|0)<<18|o>>>14,B^=(o=(P^=(o=(E^=(o=(N^=(o=B+P|0)<<7|o>>>25)+B|0)<<9|o>>>23)+N|0)<<13|o>>>19)+E|0)<<18|o>>>14,L^=(o=(R^=(o=(x^=(o=(A^=(o=L+R|0)<<7|o>>>25)+L|0)<<9|o>>>23)+A|0)<<13|o>>>19)+x|0)<<18|o>>>14,S^=(o=(A^=(o=(E^=(o=(k^=(o=S+A|0)<<7|o>>>25)+S|0)<<9|o>>>23)+k|0)<<13|o>>>19)+E|0)<<18|o>>>14,O^=(o=(T^=(o=(x^=(o=(P^=(o=O+T|0)<<7|o>>>25)+O|0)<<9|o>>>23)+P|0)<<13|o>>>19)+x|0)<<18|o>>>14,B^=(o=(_^=(o=(I^=(o=(R^=(o=B+_|0)<<7|o>>>25)+B|0)<<9|o>>>23)+R|0)<<13|o>>>19)+I|0)<<18|o>>>14,L^=(o=(N^=(o=(U^=(o=(C^=(o=L+N|0)<<7|o>>>25)+L|0)<<9|o>>>23)+C|0)<<13|o>>>19)+U|0)<<18|o>>>14;S=S+i|0,k=k+a|0,E=E+s|0,A=A+u|0,T=T+c|0,O=O+l|0,P=P+f|0,x=x+p|0,I=I+h|0,_=_+y|0,B=B+d|0,R=R+m|0,C=C+g|0,U=U+v|0,N=N+b|0,L=L+w|0,e[0]=S>>>0&255,e[1]=S>>>8&255,e[2]=S>>>16&255,e[3]=S>>>24&255,e[4]=k>>>0&255,e[5]=k>>>8&255,e[6]=k>>>16&255,e[7]=k>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=T>>>0&255,e[17]=T>>>8&255,e[18]=T>>>16&255,e[19]=T>>>24&255,e[20]=O>>>0&255,e[21]=O>>>8&255,e[22]=O>>>16&255,e[23]=O>>>24&255,e[24]=P>>>0&255,e[25]=P>>>8&255,e[26]=P>>>16&255,e[27]=P>>>24&255,e[28]=x>>>0&255,e[29]=x>>>8&255,e[30]=x>>>16&255,e[31]=x>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=B>>>0&255,e[41]=B>>>8&255,e[42]=B>>>16&255,e[43]=B>>>24&255,e[44]=R>>>0&255,e[45]=R>>>8&255,e[46]=R>>>16&255,e[47]=R>>>24&255,e[48]=C>>>0&255,e[49]=C>>>8&255,e[50]=C>>>16&255,e[51]=C>>>24&255,e[52]=U>>>0&255,e[53]=U>>>8&255,e[54]=U>>>16&255,e[55]=U>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=L>>>0&255,e[61]=L>>>8&255,e[62]=L>>>16&255,e[63]=L>>>24&255}(e,t,r,n)}function b(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,y=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,S=0;S<20;S+=2)i^=(o=(g^=(o=(h^=(o=(c^=(o=i+g|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+h|0)<<18|o>>>14,l^=(o=(a^=(o=(v^=(o=(y^=(o=l+a|0)<<7|o>>>25)+l|0)<<9|o>>>23)+y|0)<<13|o>>>19)+v|0)<<18|o>>>14,d^=(o=(f^=(o=(s^=(o=(b^=(o=d+f|0)<<7|o>>>25)+d|0)<<9|o>>>23)+b|0)<<13|o>>>19)+s|0)<<18|o>>>14,w^=(o=(m^=(o=(p^=(o=(u^=(o=w+m|0)<<7|o>>>25)+w|0)<<9|o>>>23)+u|0)<<13|o>>>19)+p|0)<<18|o>>>14,i^=(o=(u^=(o=(s^=(o=(a^=(o=i+u|0)<<7|o>>>25)+i|0)<<9|o>>>23)+a|0)<<13|o>>>19)+s|0)<<18|o>>>14,l^=(o=(c^=(o=(p^=(o=(f^=(o=l+c|0)<<7|o>>>25)+l|0)<<9|o>>>23)+f|0)<<13|o>>>19)+p|0)<<18|o>>>14,d^=(o=(y^=(o=(h^=(o=(m^=(o=d+y|0)<<7|o>>>25)+d|0)<<9|o>>>23)+m|0)<<13|o>>>19)+h|0)<<18|o>>>14,w^=(o=(b^=(o=(v^=(o=(g^=(o=w+b|0)<<7|o>>>25)+w|0)<<9|o>>>23)+g|0)<<13|o>>>19)+v|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=d>>>0&255,e[9]=d>>>8&255,e[10]=d>>>16&255,e[11]=d>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=p>>>0&255,e[21]=p>>>8&255,e[22]=p>>>16&255,e[23]=p>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=y>>>0&255,e[29]=y>>>8&255,e[30]=y>>>16&255,e[31]=y>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function S(e,t,r,n,o,i,a){var s,u,c=new Uint8Array(16),l=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(v(l,c,a,w),u=0;u<64;u++)e[t+u]=r[n+u]^l[u];for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8;o-=64,t+=64,n+=64}if(o>0)for(v(l,c,a,w),u=0;u<o;u++)e[t+u]=r[n+u]^l[u];return 0}function k(e,t,r,n,o){var i,a,s=new Uint8Array(16),u=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(v(u,s,o,w),a=0;a<64;a++)e[t+a]=u[a];for(i=1,a=8;a<16;a++)i=i+(255&s[a])|0,s[a]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(v(u,s,o,w),a=0;a<r;a++)e[t+a]=u[a];return 0}function E(e,t,r,n,o){var i=new Uint8Array(32);b(i,n,o,w);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return k(e,t,r,a,i)}function A(e,t,r,n,o,i,a){var s=new Uint8Array(32);b(s,i,a,w);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=i[c+16];return S(e,t,r,n,o,u,s)}var T=function(e){var t,r,n,o,i,a,s,u;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,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>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,t,r,n,o,i){var a=new T(i);return a.update(r,n,o),a.finish(e,t),0}function P(e,t,r,n,o,i){var a=new Uint8Array(16);return O(a,0,r,n,o,i),m(e,t,a,0)}function x(e,t,r,n,o){var i;if(r<32)return-1;for(A(e,0,t,0,r,n,o),O(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function I(e,t,r,n,o){var i,a=new Uint8Array(32);if(r<32)return-1;if(E(a,0,32,n,o),0!==P(t,16,t,32,r-32,a))return-1;for(A(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0}function _(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function B(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function R(e,t,r){for(var n,o=~(r-1),i=0;i<16;i++)n=o&(e[i]^t[i]),e[i]^=n,t[i]^=n}function C(e,r){var n,o,i,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(B(s),B(s),B(s),o=0;o<2;o++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,R(s,a,1-i)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function U(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return C(r,e),C(n,t),g(r,0,n,0)}function N(e){var t=new Uint8Array(32);return C(t,e),1&t[0]}function L(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function j(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function M(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function F(e,t,r){var n,o,i=0,a=0,s=0,u=0,c=0,l=0,f=0,p=0,h=0,y=0,d=0,m=0,g=0,v=0,b=0,w=0,S=0,k=0,E=0,A=0,T=0,O=0,P=0,x=0,I=0,_=0,B=0,R=0,C=0,U=0,N=0,L=r[0],j=r[1],M=r[2],F=r[3],D=r[4],V=r[5],q=r[6],K=r[7],H=r[8],z=r[9],X=r[10],$=r[11],G=r[12],W=r[13],Y=r[14],J=r[15];i+=(n=t[0])*L,a+=n*j,s+=n*M,u+=n*F,c+=n*D,l+=n*V,f+=n*q,p+=n*K,h+=n*H,y+=n*z,d+=n*X,m+=n*$,g+=n*G,v+=n*W,b+=n*Y,w+=n*J,a+=(n=t[1])*L,s+=n*j,u+=n*M,c+=n*F,l+=n*D,f+=n*V,p+=n*q,h+=n*K,y+=n*H,d+=n*z,m+=n*X,g+=n*$,v+=n*G,b+=n*W,w+=n*Y,S+=n*J,s+=(n=t[2])*L,u+=n*j,c+=n*M,l+=n*F,f+=n*D,p+=n*V,h+=n*q,y+=n*K,d+=n*H,m+=n*z,g+=n*X,v+=n*$,b+=n*G,w+=n*W,S+=n*Y,k+=n*J,u+=(n=t[3])*L,c+=n*j,l+=n*M,f+=n*F,p+=n*D,h+=n*V,y+=n*q,d+=n*K,m+=n*H,g+=n*z,v+=n*X,b+=n*$,w+=n*G,S+=n*W,k+=n*Y,E+=n*J,c+=(n=t[4])*L,l+=n*j,f+=n*M,p+=n*F,h+=n*D,y+=n*V,d+=n*q,m+=n*K,g+=n*H,v+=n*z,b+=n*X,w+=n*$,S+=n*G,k+=n*W,E+=n*Y,A+=n*J,l+=(n=t[5])*L,f+=n*j,p+=n*M,h+=n*F,y+=n*D,d+=n*V,m+=n*q,g+=n*K,v+=n*H,b+=n*z,w+=n*X,S+=n*$,k+=n*G,E+=n*W,A+=n*Y,T+=n*J,f+=(n=t[6])*L,p+=n*j,h+=n*M,y+=n*F,d+=n*D,m+=n*V,g+=n*q,v+=n*K,b+=n*H,w+=n*z,S+=n*X,k+=n*$,E+=n*G,A+=n*W,T+=n*Y,O+=n*J,p+=(n=t[7])*L,h+=n*j,y+=n*M,d+=n*F,m+=n*D,g+=n*V,v+=n*q,b+=n*K,w+=n*H,S+=n*z,k+=n*X,E+=n*$,A+=n*G,T+=n*W,O+=n*Y,P+=n*J,h+=(n=t[8])*L,y+=n*j,d+=n*M,m+=n*F,g+=n*D,v+=n*V,b+=n*q,w+=n*K,S+=n*H,k+=n*z,E+=n*X,A+=n*$,T+=n*G,O+=n*W,P+=n*Y,x+=n*J,y+=(n=t[9])*L,d+=n*j,m+=n*M,g+=n*F,v+=n*D,b+=n*V,w+=n*q,S+=n*K,k+=n*H,E+=n*z,A+=n*X,T+=n*$,O+=n*G,P+=n*W,x+=n*Y,I+=n*J,d+=(n=t[10])*L,m+=n*j,g+=n*M,v+=n*F,b+=n*D,w+=n*V,S+=n*q,k+=n*K,E+=n*H,A+=n*z,T+=n*X,O+=n*$,P+=n*G,x+=n*W,I+=n*Y,_+=n*J,m+=(n=t[11])*L,g+=n*j,v+=n*M,b+=n*F,w+=n*D,S+=n*V,k+=n*q,E+=n*K,A+=n*H,T+=n*z,O+=n*X,P+=n*$,x+=n*G,I+=n*W,_+=n*Y,B+=n*J,g+=(n=t[12])*L,v+=n*j,b+=n*M,w+=n*F,S+=n*D,k+=n*V,E+=n*q,A+=n*K,T+=n*H,O+=n*z,P+=n*X,x+=n*$,I+=n*G,_+=n*W,B+=n*Y,R+=n*J,v+=(n=t[13])*L,b+=n*j,w+=n*M,S+=n*F,k+=n*D,E+=n*V,A+=n*q,T+=n*K,O+=n*H,P+=n*z,x+=n*X,I+=n*$,_+=n*G,B+=n*W,R+=n*Y,C+=n*J,b+=(n=t[14])*L,w+=n*j,S+=n*M,k+=n*F,E+=n*D,A+=n*V,T+=n*q,O+=n*K,P+=n*H,x+=n*z,I+=n*X,_+=n*$,B+=n*G,R+=n*W,C+=n*Y,U+=n*J,w+=(n=t[15])*L,a+=38*(k+=n*M),s+=38*(E+=n*F),u+=38*(A+=n*D),c+=38*(T+=n*V),l+=38*(O+=n*q),f+=38*(P+=n*K),p+=38*(x+=n*H),h+=38*(I+=n*z),y+=38*(_+=n*X),d+=38*(B+=n*$),m+=38*(R+=n*G),g+=38*(C+=n*W),v+=38*(U+=n*Y),b+=38*(N+=n*J),i=(n=(i+=38*(S+=n*j))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=p,e[8]=h,e[9]=y,e[10]=d,e[11]=m,e[12]=g,e[13]=v,e[14]=b,e[15]=w}function D(e,t){F(e,t,t)}function V(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=253;n>=0;n--)D(o,o),2!==n&&4!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function q(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=250;n>=0;n--)D(o,o),1!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function K(e,r,n){var o,i,a=new Uint8Array(32),s=new Float64Array(80),c=t(),l=t(),f=t(),p=t(),h=t(),y=t();for(i=0;i<31;i++)a[i]=r[i];for(a[31]=127&r[31]|64,a[0]&=248,L(s,n),i=0;i<16;i++)l[i]=s[i],p[i]=c[i]=f[i]=0;for(c[0]=p[0]=1,i=254;i>=0;--i)R(c,l,o=a[i>>>3]>>>(7&i)&1),R(f,p,o),j(h,c,f),M(c,c,f),j(f,l,p),M(l,l,p),D(p,h),D(y,c),F(c,f,c),F(f,l,h),j(h,c,f),M(c,c,f),D(l,c),M(f,p,y),F(c,f,u),j(c,c,p),F(f,f,c),F(c,p,y),F(p,l,s),D(l,h),R(c,l,o),R(f,p,o);for(i=0;i<16;i++)s[i+16]=c[i],s[i+32]=f[i],s[i+48]=l[i],s[i+64]=p[i];var d=s.subarray(32),m=s.subarray(16);return V(d,d),F(m,m,d),C(e,m),0}function H(e,t){return K(e,t,i)}function z(e,t){return n(t,32),H(e,t)}function X(e,t,r){var n=new Uint8Array(32);return K(n,r,t),b(e,o,n,w)}T.prototype.blocks=function(e,t,r){for(var n,o,i,a,s,u,c,l,f,p,h,y,d,m,g,v,b,w,S,k=this.fin?0:2048,E=this.h[0],A=this.h[1],T=this.h[2],O=this.h[3],P=this.h[4],x=this.h[5],I=this.h[6],_=this.h[7],B=this.h[8],R=this.h[9],C=this.r[0],U=this.r[1],N=this.r[2],L=this.r[3],j=this.r[4],M=this.r[5],F=this.r[6],D=this.r[7],V=this.r[8],q=this.r[9];r>=16;)p=f=0,p+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*C,p+=(A+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*q),p+=(T+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*V),p+=(O+=8191&(i>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*D),f=(p+=(P+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*F))>>>13,p&=8191,p+=(x+=s>>>1&8191)*(5*M),p+=(I+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*j),p+=(_+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*L),p+=(B+=8191&(c>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),h=f+=(p+=(R+=l>>>5|k)*(5*U))>>>13,h+=E*U,h+=A*C,h+=T*(5*q),h+=O*(5*V),f=(h+=P*(5*D))>>>13,h&=8191,h+=x*(5*F),h+=I*(5*M),h+=_*(5*j),h+=B*(5*L),f+=(h+=R*(5*N))>>>13,h&=8191,y=f,y+=E*N,y+=A*U,y+=T*C,y+=O*(5*q),f=(y+=P*(5*V))>>>13,y&=8191,y+=x*(5*D),y+=I*(5*F),y+=_*(5*M),y+=B*(5*j),d=f+=(y+=R*(5*L))>>>13,d+=E*L,d+=A*N,d+=T*U,d+=O*C,f=(d+=P*(5*q))>>>13,d&=8191,d+=x*(5*V),d+=I*(5*D),d+=_*(5*F),d+=B*(5*M),m=f+=(d+=R*(5*j))>>>13,m+=E*j,m+=A*L,m+=T*N,m+=O*U,f=(m+=P*C)>>>13,m&=8191,m+=x*(5*q),m+=I*(5*V),m+=_*(5*D),m+=B*(5*F),g=f+=(m+=R*(5*M))>>>13,g+=E*M,g+=A*j,g+=T*L,g+=O*N,f=(g+=P*U)>>>13,g&=8191,g+=x*C,g+=I*(5*q),g+=_*(5*V),g+=B*(5*D),v=f+=(g+=R*(5*F))>>>13,v+=E*F,v+=A*M,v+=T*j,v+=O*L,f=(v+=P*N)>>>13,v&=8191,v+=x*U,v+=I*C,v+=_*(5*q),v+=B*(5*V),b=f+=(v+=R*(5*D))>>>13,b+=E*D,b+=A*F,b+=T*M,b+=O*j,f=(b+=P*L)>>>13,b&=8191,b+=x*N,b+=I*U,b+=_*C,b+=B*(5*q),w=f+=(b+=R*(5*V))>>>13,w+=E*V,w+=A*D,w+=T*F,w+=O*M,f=(w+=P*j)>>>13,w&=8191,w+=x*L,w+=I*N,w+=_*U,w+=B*C,S=f+=(w+=R*(5*q))>>>13,S+=E*q,S+=A*V,S+=T*D,S+=O*F,f=(S+=P*M)>>>13,S&=8191,S+=x*j,S+=I*L,S+=_*N,S+=B*U,E=p=8191&(f=(f=((f+=(S+=R*C)>>>13)<<2)+f|0)+(p&=8191)|0),A=h+=f>>>=13,T=y&=8191,O=d&=8191,P=m&=8191,x=g&=8191,I=v&=8191,_=b&=8191,B=w&=8191,R=S&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=A,this.h[2]=T,this.h[3]=O,this.h[4]=P,this.h[5]=x,this.h[6]=I,this.h[7]=_,this.h[8]=B,this.h[9]=R},T.prototype.finish=function(e,t){var r,n,o,i,a=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,i=1;i<10;i++)a[i]=this.h[i]+r,r=a[i]>>>13,a[i]&=8191;for(a[9]-=8192,n=(1^r)-1,i=0;i<10;i++)a[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|a[i];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),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},T.prototype.update=function(e,t,r){var n,o;if(this.leftover){for((o=16-this.leftover)>r&&(o=r),n=0;n<o;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(o=r-r%16,this.blocks(e,t,o),t+=o,r-=o),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var $=x,G=I;var W=[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 Y(e,t,r,n){for(var o,i,a,s,u,c,l,f,p,h,y,d,m,g,v,b,w,S,k,E,A,T,O,P,x,I,_=new Int32Array(16),B=new Int32Array(16),R=e[0],C=e[1],U=e[2],N=e[3],L=e[4],j=e[5],M=e[6],F=e[7],D=t[0],V=t[1],q=t[2],K=t[3],H=t[4],z=t[5],X=t[6],$=t[7],G=0;n>=128;){for(k=0;k<16;k++)E=8*k+G,_[k]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],B[k]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(k=0;k<80;k++)if(o=R,i=C,a=U,s=N,u=L,c=j,l=M,F,p=D,h=V,y=q,d=K,m=H,g=z,v=X,$,O=65535&(T=$),P=T>>>16,x=65535&(A=F),I=A>>>16,O+=65535&(T=(H>>>14|L<<18)^(H>>>18|L<<14)^(L>>>9|H<<23)),P+=T>>>16,x+=65535&(A=(L>>>14|H<<18)^(L>>>18|H<<14)^(H>>>9|L<<23)),I+=A>>>16,O+=65535&(T=H&z^~H&X),P+=T>>>16,x+=65535&(A=L&j^~L&M),I+=A>>>16,A=W[2*k],O+=65535&(T=W[2*k+1]),P+=T>>>16,x+=65535&A,I+=A>>>16,A=_[k%16],P+=(T=B[k%16])>>>16,x+=65535&A,I+=A>>>16,x+=(P+=(O+=65535&T)>>>16)>>>16,O=65535&(T=S=65535&O|P<<16),P=T>>>16,x=65535&(A=w=65535&x|(I+=x>>>16)<<16),I=A>>>16,O+=65535&(T=(D>>>28|R<<4)^(R>>>2|D<<30)^(R>>>7|D<<25)),P+=T>>>16,x+=65535&(A=(R>>>28|D<<4)^(D>>>2|R<<30)^(D>>>7|R<<25)),I+=A>>>16,P+=(T=D&V^D&q^V&q)>>>16,x+=65535&(A=R&C^R&U^C&U),I+=A>>>16,f=65535&(x+=(P+=(O+=65535&T)>>>16)>>>16)|(I+=x>>>16)<<16,b=65535&O|P<<16,O=65535&(T=d),P=T>>>16,x=65535&(A=s),I=A>>>16,P+=(T=S)>>>16,x+=65535&(A=w),I+=A>>>16,C=o,U=i,N=a,L=s=65535&(x+=(P+=(O+=65535&T)>>>16)>>>16)|(I+=x>>>16)<<16,j=u,M=c,F=l,R=f,V=p,q=h,K=y,H=d=65535&O|P<<16,z=m,X=g,$=v,D=b,k%16==15)for(E=0;E<16;E++)A=_[E],O=65535&(T=B[E]),P=T>>>16,x=65535&A,I=A>>>16,A=_[(E+9)%16],O+=65535&(T=B[(E+9)%16]),P+=T>>>16,x+=65535&A,I+=A>>>16,w=_[(E+1)%16],O+=65535&(T=((S=B[(E+1)%16])>>>1|w<<31)^(S>>>8|w<<24)^(S>>>7|w<<25)),P+=T>>>16,x+=65535&(A=(w>>>1|S<<31)^(w>>>8|S<<24)^w>>>7),I+=A>>>16,w=_[(E+14)%16],P+=(T=((S=B[(E+14)%16])>>>19|w<<13)^(w>>>29|S<<3)^(S>>>6|w<<26))>>>16,x+=65535&(A=(w>>>19|S<<13)^(S>>>29|w<<3)^w>>>6),I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,_[E]=65535&x|I<<16,B[E]=65535&O|P<<16;O=65535&(T=D),P=T>>>16,x=65535&(A=R),I=A>>>16,A=e[0],P+=(T=t[0])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[0]=R=65535&x|I<<16,t[0]=D=65535&O|P<<16,O=65535&(T=V),P=T>>>16,x=65535&(A=C),I=A>>>16,A=e[1],P+=(T=t[1])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[1]=C=65535&x|I<<16,t[1]=V=65535&O|P<<16,O=65535&(T=q),P=T>>>16,x=65535&(A=U),I=A>>>16,A=e[2],P+=(T=t[2])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[2]=U=65535&x|I<<16,t[2]=q=65535&O|P<<16,O=65535&(T=K),P=T>>>16,x=65535&(A=N),I=A>>>16,A=e[3],P+=(T=t[3])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[3]=N=65535&x|I<<16,t[3]=K=65535&O|P<<16,O=65535&(T=H),P=T>>>16,x=65535&(A=L),I=A>>>16,A=e[4],P+=(T=t[4])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[4]=L=65535&x|I<<16,t[4]=H=65535&O|P<<16,O=65535&(T=z),P=T>>>16,x=65535&(A=j),I=A>>>16,A=e[5],P+=(T=t[5])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[5]=j=65535&x|I<<16,t[5]=z=65535&O|P<<16,O=65535&(T=X),P=T>>>16,x=65535&(A=M),I=A>>>16,A=e[6],P+=(T=t[6])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[6]=M=65535&x|I<<16,t[6]=X=65535&O|P<<16,O=65535&(T=$),P=T>>>16,x=65535&(A=F),I=A>>>16,A=e[7],P+=(T=t[7])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[7]=F=65535&x|I<<16,t[7]=$=65535&O|P<<16,G+=128,n-=128}return n}function J(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),a=new Uint8Array(256),s=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Y(o,i,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,y(a,r-8,s/536870912|0,s<<3),Y(o,i,a,r),n=0;n<8;n++)y(e,8*n,o[n],i[n]);return 0}function Z(e,r){var n=t(),o=t(),i=t(),a=t(),s=t(),u=t(),c=t(),f=t(),p=t();M(n,e[1],e[0]),M(p,r[1],r[0]),F(n,n,p),j(o,e[0],e[1]),j(p,r[0],r[1]),F(o,o,p),F(i,e[3],r[3]),F(i,i,l),F(a,e[2],r[2]),j(a,a,a),M(s,o,n),M(u,a,i),j(c,a,i),j(f,o,n),F(e[0],s,u),F(e[1],f,c),F(e[2],c,u),F(e[3],s,f)}function Q(e,t,r){var n;for(n=0;n<4;n++)R(e[n],t[n],r)}function ee(e,r){var n=t(),o=t(),i=t();V(i,r[2]),F(n,r[0],i),F(o,r[1],i),C(e,o),e[31]^=N(n)<<7}function te(e,t,r){var n,o;for(_(e[0],a),_(e[1],s),_(e[2],s),_(e[3],a),o=255;o>=0;--o)Q(e,t,n=r[o/8|0]>>(7&o)&1),Z(t,e),Z(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];_(n[0],f),_(n[1],p),_(n[2],s),F(n[3],f,p),te(e,n,r)}function ne(e,r,o){var i,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(o||n(r,32),J(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),ee(e,s),i=0;i<32;i++)r[i+32]=e[i];return 0}var oe=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 ie(e,t){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o<i;++o)t[o]+=r-16*t[n]*oe[o-(n-32)],r=Math.floor((t[o]+128)/256),t[o]-=256*r;t[o]+=r,t[n]=0}for(r=0,o=0;o<32;o++)t[o]+=r-(t[31]>>4)*oe[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*oe[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ae(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function se(e,r,n,o){var i,a,s=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];J(s,o,32),s[0]&=248,s[31]&=127,s[31]|=64;var p=n+64;for(i=0;i<n;i++)e[64+i]=r[i];for(i=0;i<32;i++)e[32+i]=s[32+i];for(J(c,e.subarray(32),n+32),ae(c),re(f,c),ee(e,f),i=32;i<64;i++)e[i]=o[i];for(J(u,e,n+64),ae(u),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=c[i];for(i=0;i<32;i++)for(a=0;a<32;a++)l[i+a]+=u[i]*s[a];return ie(e.subarray(32),l),p}function ue(e,r,n,o){var i,u=new Uint8Array(32),l=new Uint8Array(64),f=[t(),t(),t(),t()],p=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),o=t(),i=t(),u=t(),l=t(),f=t(),p=t();return _(e[2],s),L(e[1],r),D(i,e[1]),F(u,i,c),M(i,i,e[2]),j(u,e[2],u),D(l,u),D(f,l),F(p,f,l),F(n,p,i),F(n,n,u),q(n,n),F(n,n,i),F(n,n,u),F(n,n,u),F(e[0],n,u),D(o,e[0]),F(o,o,u),U(o,i)&&F(e[0],e[0],h),D(o,e[0]),F(o,o,u),U(o,i)?-1:(N(e[0])===r[31]>>7&&M(e[0],a,e[0]),F(e[3],e[0],e[1]),0)}(p,o))return-1;for(i=0;i<n;i++)e[i]=r[i];for(i=0;i<32;i++)e[i+32]=o[i];if(J(l,e,n),ae(l),te(f,p,l),re(p,r.subarray(32)),Z(f,p),ee(u,f),n-=64,g(r,0,u,0)){for(i=0;i<n;i++)e[i]=0;return-1}for(i=0;i<n;i++)e[i]=r[i+64];return n}var ce=16,le=64,fe=32,pe=64;function he(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function ye(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function de(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:A,crypto_stream:E,crypto_stream_salsa20_xor:S,crypto_stream_salsa20:k,crypto_onetimeauth:O,crypto_onetimeauth_verify:P,crypto_verify_16:m,crypto_verify_32:g,crypto_secretbox:x,crypto_secretbox_open:I,crypto_scalarmult:K,crypto_scalarmult_base:H,crypto_box_beforenm:X,crypto_box_afternm:$,crypto_box:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),$(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),G(e,t,r,n,a)},crypto_box_keypair:z,crypto_hash:J,crypto_sign:se,crypto_sign_keypair:ne,crypto_sign_open:ue,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:ce,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:le,crypto_sign_PUBLICKEYBYTES:fe,crypto_sign_SECRETKEYBYTES:pe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:oe,pack25519:C,unpack25519:L,M:F,A:j,S:D,Z:M,pow2523:q,add:Z,set25519:_,modL:ie,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){ye(e,t,r),he(r,t);for(var n=new Uint8Array(32+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+32]=e[i];return x(o,n,n.length,t,r),o.subarray(ce)},e.secretbox.open=function(e,t,r){ye(e,t,r),he(r,t);for(var n=new Uint8Array(ce+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+ce]=e[i];return n.length<32||0!==I(o,n,n.length,t,r)?null:o.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=ce,e.scalarMult=function(e,t){if(ye(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return K(r,e,t),r},e.scalarMult.base=function(e){if(ye(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return H(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox(t,r,i)},e.box.before=function(e,t){ye(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return X(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox.open(t,r,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return z(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(ye(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return H(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(ye(e,t),t.length!==pe)throw new Error("bad secret key size");var r=new Uint8Array(le+e.length);return se(r,e,e.length,t),r},e.sign.open=function(e,t){if(ye(e,t),t.length!==fe)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ue(r,e,e.length,t);if(n<0)return null;for(var o=new Uint8Array(n),i=0;i<o.length;i++)o[i]=r[i];return o},e.sign.detached=function(t,r){for(var n=e.sign(t,r),o=new Uint8Array(le),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached.verify=function(e,t,r){if(ye(e,t,r),t.length!==le)throw new Error("bad signature size");if(r.length!==fe)throw new Error("bad public key size");var n,o=new Uint8Array(le+e.length),i=new Uint8Array(le+e.length);for(n=0;n<le;n++)o[n]=t[n];for(n=0;n<e.length;n++)o[n+le]=e[n];return ue(i,o,o.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(fe),t=new Uint8Array(pe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(ye(e),e.length!==pe)throw new Error("bad secret key size");for(var t=new Uint8Array(fe),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(ye(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(fe),r=new Uint8Array(pe),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=fe,e.sign.secretKeyLength=pe,e.sign.seedLength=32,e.sign.signatureLength=le,e.hash=function(e){ye(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return ye(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===d(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,r){var n,o=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(o.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=o[n];de(o)}))}else(t=r(5024))&&t.randomBytes&&e.setPRNG((function(e,r){var n,o=t.randomBytes(r);for(n=0;n<r;n++)e[n]=o[n];de(o)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},384:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},5955:(e,t,r)=>{"use strict";var n=r(2584),o=r(8662),i=r(6430),a=r(5692);function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=s(Object.prototype.toString),f=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(u)var y=s(BigInt.prototype.valueOf);if(c)var d=s(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"[object Map]"===l(e)}function v(e){return"[object Set]"===l(e)}function b(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function S(e){return"[object ArrayBuffer]"===l(e)}function k(e){return"undefined"!=typeof ArrayBuffer&&(S.working?S(e):e instanceof ArrayBuffer)}function E(e){return"[object DataView]"===l(e)}function A(e){return"undefined"!=typeof DataView&&(E.working?E(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},g.working="undefined"!=typeof Map&&g(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(g.working?g(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},S.working="undefined"!=typeof ArrayBuffer&&S(new ArrayBuffer),t.isArrayBuffer=k,E.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function O(e){return"[object SharedArrayBuffer]"===l(e)}function P(e){return void 0!==T&&(void 0===O.working&&(O.working=O(new T)),O.working?O(e):e instanceof T)}function x(e){return m(e,f)}function I(e){return m(e,p)}function _(e){return m(e,h)}function B(e){return u&&m(e,y)}function R(e){return c&&m(e,d)}t.isSharedArrayBuffer=P,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=x,t.isStringObject=I,t.isBooleanObject=_,t.isBigIntObject=B,t.isSymbolObject=R,t.isBoxedPrimitive=function(e){return x(e)||I(e)||_(e)||B(e)||R(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(k(e)||P(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},9539:(e,t,r)=>{var n=r(4155),o=r(5108),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},a=/%[sdj%]/g;t.format=function(e){if(!w(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(l(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,i=String(e).replace(a,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r<o;s=n[++r])v(s)||!E(s)?i+=" "+s:i+=" "+l(s);return i},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?o.trace(r):o.error(r),i=!0}return e.apply(this,arguments)}};var s={},u=/^$/;if(n.env.NODE_DEBUG){var c=n.env.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+c+"$","i")}function l(e,r){var n={seen:[],stylize:p};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),S(n.showHidden)&&(n.showHidden=!1),S(n.depth)&&(n.depth=2),S(n.colors)&&(n.colors=!1),S(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),h(n,e,n.depth)}function f(e,t){var r=l.styles[t];return r?"\x1b["+l.colors[r][0]+"m"+e+"\x1b["+l.colors[r][1]+"m":e}function p(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&O(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return w(o)||(o=h(e,o,n)),o}var i=function(e,t){if(S(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(g(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,r);if(i)return i;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),T(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return y(r);if(0===a.length){if(O(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(k(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(T(r))return y(r)}var c,l="",f=!1,p=["{","}"];(m(r)&&(f=!0,p=["[","]"]),O(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return k(r)&&(l=" "+RegExp.prototype.toString.call(r)),A(r)&&(l=" "+Date.prototype.toUTCString.call(r)),T(r)&&(l=" "+y(r)),0!==a.length||f&&0!=r.length?n<0?k(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)_(t,String(a))?i.push(d(e,t,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(d(e,t,r,n,o,!0))})),i}(e,r,n,s,a):a.map((function(t){return d(e,r,n,s,t,f)})),e.seen.pop(),function(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,p)):p[0]+l+p[1]}function y(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),_(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=v(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),S(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function b(e){return"number"==typeof e}function w(e){return"string"==typeof e}function S(e){return void 0===e}function k(e){return E(e)&&"[object RegExp]"===P(e)}function E(e){return"object"==typeof e&&null!==e}function A(e){return E(e)&&"[object Date]"===P(e)}function T(e){return E(e)&&("[object Error]"===P(e)||e instanceof Error)}function O(e){return"function"==typeof e}function P(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(u.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);o.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(5955),t.isArray=m,t.isBoolean=g,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=w,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=S,t.isRegExp=k,t.types.isRegExp=k,t.isObject=E,t.isDate=A,t.types.isDate=A,t.isError=T,t.types.isNativeError=T,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(384);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;o.log("%s - %s",(e=new Date,r=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(5717),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var B="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(B&&e[B]){var t;if("function"!=typeof(t=e[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),B&&Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=B,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then((function(e){n.nextTick(a.bind(null,null,e))}),(function(e){n.nextTick(R.bind(null,e,a))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},6430:(e,t,r)=>{"use strict";var n=r(4029),o=r(3083),i=r(5559),a=r(1924),s=r(7296),u=a("Object.prototype.toString"),c=r(6410)(),l="undefined"==typeof globalThis?r.g:globalThis,f=o(),p=a("String.prototype.slice"),h=Object.getPrototypeOf,y=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},d={__proto__:null};n(f,c&&s&&h?function(e){var t=new l[e];if(Symbol.toStringTag in t){var r=h(t),n=s(r,Symbol.toStringTag);if(!n){var o=h(r);n=s(o,Symbol.toStringTag)}d["$"+e]=i(n.get)}}:function(e){var t=new l[e],r=t.slice||t.set;r&&(d["$"+e]=i(r))});e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=p(u(e),8,-1);return y(f,t)>-1?t:"Object"===t&&function(e){var t=!1;return n(d,(function(r,n){if(!t)try{r(e),t=p(n,1)}catch(e){}})),t}(e)}return s?function(e){var t=!1;return n(d,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=p(n,1))}catch(e){}})),t}(e):null}},5024:()=>{},3083:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],o="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof o[n[t]]&&(e[e.length]=n[t]);return e}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(4195);StellarBase=n})();
|
|
2
|
+
var StellarBase;(()=>{var e={4232:function(e,t,r){var n,o=r(320);n=()=>(()=>{var e={899:(e,t,r)=>{const n=r(10);e.exports=n},10:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Array:()=>M,Bool:()=>B,Double:()=>I,Enum:()=>q,Float:()=>x,Hyper:()=>A,Int:()=>w,LargeInt:()=>E,Opaque:()=>N,Option:()=>D,Quadruple:()=>_,Reference:()=>K,String:()=>C,Struct:()=>H,Union:()=>X,UnsignedHyper:()=>P,UnsignedInt:()=>O,VarArray:()=>F,VarOpaque:()=>j,Void:()=>V,XdrReader:()=>u,XdrWriter:()=>f,config:()=>te});class n extends TypeError{constructor(e){super(`XDR Write Error: ${e}`)}}class o extends TypeError{constructor(e){super(`XDR Read Error: ${e}`)}}class i extends TypeError{constructor(e){super(`XDR Type Definition Error: ${e}`)}}class a extends i{constructor(){super("method not implemented, it should be overloaded in the descendant class.")}}var s=r(764).lW;class u{constructor(e){if(!s.isBuffer(e)){if(!(e instanceof Array||Array.isArray(e)||ArrayBuffer.isView(e)))throw new o(`source invalid: ${e}`);e=s.from(e)}this._buffer=e,this._length=e.length,this._index=0}_buffer;_length;_index;get eof(){return this._index===this._length}advance(e){const t=this._index;if(this._index+=e,this._length<this._index)throw new o("attempt to read outside the boundary of the buffer");const r=4-(e%4||4);if(r>0){for(let e=0;e<r;e++)if(0!==this._buffer[this._index+e])throw new o("invalid padding");this._index+=r}return t}rewind(){this._index=0}read(e){const t=this.advance(e);return this._buffer.subarray(t,t+e)}readInt32BE(){return this._buffer.readInt32BE(this.advance(4))}readUInt32BE(){return this._buffer.readUInt32BE(this.advance(4))}readBigInt64BE(){return this._buffer.readBigInt64BE(this.advance(8))}readBigUInt64BE(){return this._buffer.readBigUInt64BE(this.advance(8))}readFloatBE(){return this._buffer.readFloatBE(this.advance(4))}readDoubleBE(){return this._buffer.readDoubleBE(this.advance(8))}ensureInputConsumed(){if(this._index!==this._length)throw new o("invalid XDR contract typecast - source buffer not entirely consumed")}}var c=r(764).lW;const l=8192;class f{constructor(e){"number"==typeof e?e=c.allocUnsafe(e):e instanceof c||(e=c.allocUnsafe(l)),this._buffer=e,this._length=e.length}_buffer;_length;_index=0;alloc(e){const t=this._index;return this._index+=e,this._length<this._index&&this.resize(this._index),t}resize(e){const t=Math.ceil(e/l)*l,r=c.allocUnsafe(t);this._buffer.copy(r,0,0,this._length),this._buffer=r,this._length=t}finalize(){return this._buffer.subarray(0,this._index)}toArray(){return[...this.finalize()]}write(e,t){if("string"==typeof e){const r=this.alloc(t);this._buffer.write(e,r,"utf8")}else{e instanceof c||(e=c.from(e));const r=this.alloc(t);e.copy(this._buffer,r,0,t)}const r=4-(t%4||4);if(r>0){const e=this.alloc(r);this._buffer.fill(0,e,this._index)}}writeInt32BE(e){const t=this.alloc(4);this._buffer.writeInt32BE(e,t)}writeUInt32BE(e){const t=this.alloc(4);this._buffer.writeUInt32BE(e,t)}writeBigInt64BE(e){const t=this.alloc(8);this._buffer.writeBigInt64BE(e,t)}writeBigUInt64BE(e){const t=this.alloc(8);this._buffer.writeBigUInt64BE(e,t)}writeFloatBE(e){const t=this.alloc(4);this._buffer.writeFloatBE(e,t)}writeDoubleBE(e){const t=this.alloc(8);this._buffer.writeDoubleBE(e,t)}static bufferChunkSize=l}var p=r(764).lW;class h{toXDR(e="raw"){if(!this.write)return this.constructor.toXDR(this,e);const t=new f;return this.write(this,t),g(t.finalize(),e)}fromXDR(e,t="raw"){if(!this.read)return this.constructor.fromXDR(e,t);const r=new u(v(e,t)),n=this.read(r);return r.ensureInputConsumed(),n}validateXDR(e,t="raw"){try{return this.fromXDR(e,t),!0}catch(e){return!1}}static toXDR(e,t="raw"){const r=new f;return this.write(e,r),g(r.finalize(),t)}static fromXDR(e,t="raw"){const r=new u(v(e,t)),n=this.read(r);return r.ensureInputConsumed(),n}static validateXDR(e,t="raw"){try{return this.fromXDR(e,t),!0}catch(e){return!1}}}class y extends h{static read(e){throw new a}static write(e,t){throw new a}static isValid(e){return!1}}class d extends h{isValid(e){return!1}}class m extends TypeError{constructor(e){super(`Invalid format ${e}, must be one of "raw", "hex", "base64"`)}}function g(e,t){switch(t){case"raw":return e;case"hex":return e.toString("hex");case"base64":return e.toString("base64");default:throw new m(t)}}function v(e,t){switch(t){case"raw":return e;case"hex":return p.from(e,"hex");case"base64":return p.from(e,"base64");default:throw new m(t)}}const b=2147483647;class w extends y{static read(e){return e.readInt32BE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");if((0|e)!==e)throw new n("invalid i32 value");t.writeInt32BE(e)}static isValid(e){return"number"==typeof e&&(0|e)===e&&e>=-2147483648&&e<=b}}function S(e,t,r){if("bigint"!=typeof e)throw new TypeError("Expected bigint 'value', got "+typeof e);const n=t/r;if(1===n)return[e];if(r<32||r>128||2!==n&&4!==n&&8!==n)throw new TypeError(`invalid bigint (${e}) and slice size (${t} -> ${r}) combination`);const o=BigInt(r),i=new Array(n);for(let t=0;t<n;t++)i[t]=BigInt.asIntN(r,e),e>>=o;return i}function k(e,t){if(t)return[0n,(1n<<BigInt(e))-1n];const r=1n<<BigInt(e-1);return[0n-r,r-1n]}w.MAX_VALUE=b,w.MIN_VALUE=2147483648;class E extends y{constructor(e){super(),this._value=function(e,t,r){e instanceof Array?e.length&&e[0]instanceof Array&&(e=e[0]):e=[e];const n=t/e.length;switch(n){case 32:case 64:case 128:case 256:break;default:throw new RangeError(`expected slices to fit in 32/64/128/256 bits, got ${e}`)}try{for(let t=0;t<e.length;t++)"bigint"!=typeof e[t]&&(e[t]=BigInt(e[t].valueOf()))}catch(t){throw new TypeError(`expected bigint-like values, got: ${e} (${t})`)}if(r&&1===e.length&&e[0]<0n)throw new RangeError(`expected a positive value, got: ${e}`);let o=BigInt.asUintN(n,e[0]);for(let t=1;t<e.length;t++)o|=BigInt.asUintN(n,e[t])<<BigInt(t*n);r||(o=BigInt.asIntN(t,o));const[i,a]=k(t,r);if(o>=i&&o<=a)return o;throw new TypeError(`bigint values [${e}] for ${function(e,t){return`${t?"u":"i"}${e}`}(t,r)} out of range [${i}, ${a}]: ${o}`)}(e,this.size,this.unsigned)}get unsigned(){throw new a}get size(){throw new a}slice(e){return S(this._value,this.size,e)}toString(){return this._value.toString()}toJSON(){return{_value:this._value.toString()}}toBigInt(){return BigInt(this._value)}static read(e){const{size:t}=this.prototype;return 64===t?new this(e.readBigUInt64BE()):new this(...Array.from({length:t/64},(()=>e.readBigUInt64BE())).reverse())}static write(e,t){if(e instanceof this)e=e._value;else if("bigint"!=typeof e||e>this.MAX_VALUE||e<this.MIN_VALUE)throw new n(`${e} is not a ${this.name}`);const{unsigned:r,size:o}=this.prototype;if(64===o)r?t.writeBigUInt64BE(e):t.writeBigInt64BE(e);else for(const n of S(e,o,64).reverse())r?t.writeBigUInt64BE(n):t.writeBigInt64BE(n)}static isValid(e){return"bigint"==typeof e||e instanceof this}static fromString(e){return new this(e)}static MAX_VALUE=0n;static MIN_VALUE=0n;static defineIntBoundaries(){const[e,t]=k(this.prototype.size,this.prototype.unsigned);this.MIN_VALUE=e,this.MAX_VALUE=t}}class A extends E{constructor(...e){super(e)}get low(){return Number(0xffffffffn&this._value)<<0}get high(){return Number(this._value>>32n)>>0}get size(){return 64}get unsigned(){return!1}static fromBits(e,t){return new this(e,t)}}A.defineIntBoundaries();const T=4294967295;class O extends y{static read(e){return e.readUInt32BE()}static write(e,t){if("number"!=typeof e||!(e>=0&&e<=T)||e%1!=0)throw new n("invalid u32 value");t.writeUInt32BE(e)}static isValid(e){return"number"==typeof e&&e%1==0&&e>=0&&e<=T}}O.MAX_VALUE=T,O.MIN_VALUE=0;class P extends E{constructor(...e){super(e)}get low(){return Number(0xffffffffn&this._value)<<0}get high(){return Number(this._value>>32n)>>0}get size(){return 64}get unsigned(){return!0}static fromBits(e,t){return new this(e,t)}}P.defineIntBoundaries();class x extends y{static read(e){return e.readFloatBE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");t.writeFloatBE(e)}static isValid(e){return"number"==typeof e}}class I extends y{static read(e){return e.readDoubleBE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");t.writeDoubleBE(e)}static isValid(e){return"number"==typeof e}}class _ extends y{static read(){throw new i("quadruple not supported")}static write(){throw new i("quadruple not supported")}static isValid(){return!1}}class B extends y{static read(e){const t=w.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new o(`got ${t} when trying to read a bool`)}}static write(e,t){const r=e?1:0;w.write(r,t)}static isValid(e){return"boolean"==typeof e}}var R=r(764).lW;class C extends d{constructor(e=O.MAX_VALUE){super(),this._maxLength=e}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length String, max allowed is ${this._maxLength}`);return e.read(t)}readString(e){return this.read(e).toString("utf8")}write(e,t){const r="string"==typeof e?R.byteLength(e,"utf8"):e.length;if(r>this._maxLength)throw new n(`got ${e.length} bytes, max allowed is ${this._maxLength}`);O.write(r,t),t.write(e,r)}isValid(e){return"string"==typeof e?R.byteLength(e,"utf8")<=this._maxLength:!!(e instanceof Array||R.isBuffer(e))&&e.length<=this._maxLength}}var U=r(764).lW;class N extends d{constructor(e){super(),this._length=e}read(e){return e.read(this._length)}write(e,t){const{length:r}=e;if(r!==this._length)throw new n(`got ${e.length} bytes, expected ${this._length}`);t.write(e,r)}isValid(e){return U.isBuffer(e)&&e.length===this._length}}var L=r(764).lW;class j extends d{constructor(e=O.MAX_VALUE){super(),this._maxLength=e}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length VarOpaque, max allowed is ${this._maxLength}`);return e.read(t)}write(e,t){const{length:r}=e;if(e.length>this._maxLength)throw new n(`got ${e.length} bytes, max allowed is ${this._maxLength}`);O.write(r,t),t.write(e,r)}isValid(e){return L.isBuffer(e)&&e.length<=this._maxLength}}class M extends d{constructor(e,t){super(),this._childType=e,this._length=t}read(e){const t=new r.g.Array(this._length);for(let r=0;r<this._length;r++)t[r]=this._childType.read(e);return t}write(e,t){if(!(e instanceof r.g.Array))throw new n("value is not array");if(e.length!==this._length)throw new n(`got array of size ${e.length}, expected ${this._length}`);for(const r of e)this._childType.write(r,t)}isValid(e){if(!(e instanceof r.g.Array)||e.length!==this._length)return!1;for(const t of e)if(!this._childType.isValid(t))return!1;return!0}}class F extends d{constructor(e,t=O.MAX_VALUE){super(),this._childType=e,this._maxLength=t}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length VarArray, max allowed is ${this._maxLength}`);const r=new Array(t);for(let n=0;n<t;n++)r[n]=this._childType.read(e);return r}write(e,t){if(!(e instanceof Array))throw new n("value is not array");if(e.length>this._maxLength)throw new n(`got array of size ${e.length}, max allowed is ${this._maxLength}`);O.write(e.length,t);for(const r of e)this._childType.write(r,t)}isValid(e){if(!(e instanceof Array)||e.length>this._maxLength)return!1;for(const t of e)if(!this._childType.isValid(t))return!1;return!0}}class D extends y{constructor(e){super(),this._childType=e}read(e){if(B.read(e))return this._childType.read(e)}write(e,t){const r=null!=e;B.write(r,t),r&&this._childType.write(e,t)}isValid(e){return null==e||this._childType.isValid(e)}}class V extends y{static read(){}static write(e){if(void 0!==e)throw new n("trying to write value to a void slot")}static isValid(e){return void 0===e}}class q extends y{constructor(e,t){super(),this.name=e,this.value=t}static read(e){const t=w.read(e),r=this._byValue[t];if(void 0===r)throw new o(`unknown ${this.enumName} member for value ${t}`);return r}static write(e,t){if(!(e instanceof this))throw new n(`unknown ${e} is not a ${this.enumName}`);w.write(e.value,t)}static isValid(e){return e instanceof this}static members(){return this._members}static values(){return Object.values(this._members)}static fromName(e){const t=this._members[e];if(!t)throw new TypeError(`${e} is not a member of ${this.enumName}`);return t}static fromValue(e){const t=this._byValue[e];if(void 0===t)throw new TypeError(`${e} is not a value of any member of ${this.enumName}`);return t}static create(e,t,r){const n=class extends q{};n.enumName=t,e.results[t]=n,n._members={},n._byValue={};for(const[e,t]of Object.entries(r)){const r=new n(e,t);n._members[e]=r,n._byValue[t]=r,n[e]=()=>r}return n}}class K extends y{resolve(){throw new i('"resolve" method should be implemented in the descendant class')}}class H extends y{constructor(e){super(),this._attributes=e||{}}static read(e){const t={};for(const[r,n]of this._fields)t[r]=n.read(e);return new this(t)}static write(e,t){if(!(e instanceof this))throw new n(`${e} is not a ${this.structName}`);for(const[r,n]of this._fields){const o=e._attributes[r];n.write(o,t)}}static isValid(e){return e instanceof this}static create(e,t,r){const n=class extends H{};n.structName=t,e.results[t]=n;const o=new Array(r.length);for(let t=0;t<r.length;t++){const i=r[t],a=i[0];let s=i[1];s instanceof K&&(s=s.resolve(e)),o[t]=[a,s],n.prototype[a]=z(a)}return n._fields=o,n}}function z(e){return function(t){return void 0!==t&&(this._attributes[e]=t),this._attributes[e]}}class X extends d{constructor(e,t){super(),this.set(e,t)}set(e,t){"string"==typeof e&&(e=this.constructor._switchOn.fromName(e)),this._switch=e;const r=this.constructor.armForSwitch(this._switch);this._arm=r,this._armType=r===V?V:this.constructor._arms[r],this._value=t}get(e=this._arm){if(this._arm!==V&&this._arm!==e)throw new TypeError(`${e} not set`);return this._value}switch(){return this._switch}arm(){return this._arm}armType(){return this._armType}value(){return this._value}static armForSwitch(e){const t=this._switches.get(e);if(void 0!==t)return t;if(this._defaultArm)return this._defaultArm;throw new TypeError(`Bad union switch: ${e}`)}static armTypeForArm(e){return e===V?V:this._arms[e]}static read(e){const t=this._switchOn.read(e),r=this.armForSwitch(t),n=r===V?V:this._arms[r];let o;return o=void 0!==n?n.read(e):r.read(e),new this(t,o)}static write(e,t){if(!(e instanceof this))throw new n(`${e} is not a ${this.unionName}`);this._switchOn.write(e.switch(),t),e.armType().write(e.value(),t)}static isValid(e){return e instanceof this}static create(e,t,r){const n=class extends X{};n.unionName=t,e.results[t]=n,r.switchOn instanceof K?n._switchOn=r.switchOn.resolve(e):n._switchOn=r.switchOn,n._switches=new Map,n._arms={};let o=r.defaultArm;o instanceof K&&(o=o.resolve(e)),n._defaultArm=o;for(const[e,t]of r.switches){const r="string"==typeof e?n._switchOn.fromName(e):e;n._switches.set(r,t)}if(void 0!==n._switchOn.values)for(const e of n._switchOn.values())n[e.name]=function(t){return new n(e,t)},n.prototype[e.name]=function(t){return this.set(e,t)};if(r.arms)for(const[t,o]of Object.entries(r.arms))n._arms[t]=o instanceof K?o.resolve(e):o,o!==V&&(n.prototype[t]=function(){return this.get(t)});return n}}class $ extends K{constructor(e){super(),this.name=e}resolve(e){return e.definitions[this.name].resolve(e)}}class G extends K{constructor(e,t,r=!1){super(),this.childReference=e,this.length=t,this.variable=r}resolve(e){let t=this.childReference,r=this.length;return t instanceof K&&(t=t.resolve(e)),r instanceof K&&(r=r.resolve(e)),this.variable?new F(t,r):new M(t,r)}}class W extends K{constructor(e){super(),this.childReference=e,this.name=e.name}resolve(e){let t=this.childReference;return t instanceof K&&(t=t.resolve(e)),new D(t)}}class Y extends K{constructor(e,t){super(),this.sizedType=e,this.length=t}resolve(e){let t=this.length;return t instanceof K&&(t=t.resolve(e)),new this.sizedType(t)}}class J{constructor(e,t,r){this.constructor=e,this.name=t,this.config=r}resolve(e){return this.name in e.results?e.results[this.name]:this.constructor(e,this.name,this.config)}}function Z(e,t,r){return r instanceof K&&(r=r.resolve(e)),e.results[t]=r,r}function Q(e,t,r){return e.results[t]=r,r}class ee{constructor(e){this._destination=e,this._definitions={}}enum(e,t){const r=new J(q.create,e,t);this.define(e,r)}struct(e,t){const r=new J(H.create,e,t);this.define(e,r)}union(e,t){const r=new J(X.create,e,t);this.define(e,r)}typedef(e,t){const r=new J(Z,e,t);this.define(e,r)}const(e,t){const r=new J(Q,e,t);this.define(e,r)}void(){return V}bool(){return B}int(){return w}hyper(){return A}uint(){return O}uhyper(){return P}float(){return x}double(){return I}quadruple(){return _}string(e){return new Y(C,e)}opaque(e){return new Y(N,e)}varOpaque(e){return new Y(j,e)}array(e,t){return new G(e,t)}varArray(e,t){return new G(e,t,!0)}option(e){return new W(e)}define(e,t){if(void 0!==this._destination[e])throw new i(`${e} is already defined`);this._definitions[e]=t}lookup(e){return new $(e)}resolve(){for(const e of Object.values(this._definitions))e.resolve({definitions:this._definitions,results:this._destination})}}function te(e,t={}){if(e){const r=new ee(t);e(r),r.resolve()}return t}},742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},764:(e,t,r)=>{"use strict";const n=r(742),i=r(645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;const s=2147483647;function u(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=u(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return y(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return y(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return y(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|d(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?u(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return f(e),u(e<0?0:0|d(e))}function h(e){const t=e.length<0?0:0|d(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function y(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function d(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(o)return n?-1:$(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function S(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function k(e,t,r,n){return W($(t,e.length-r),e,r,n)}function E(e,t,r,n){return W(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return W(G(t),e,r,n)}function T(e,t,r,n){return W(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||void 0===o||"function"!=typeof o.error||o.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Z[e[n]];return o}function R(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||U(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||U(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Q((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const D={};function V(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function K(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},645:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,y=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=y,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+h]=255&a,h+=y,a/=256,c-=8);e[r+h-y]|=128*d}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(899)})(),e.exports=n()},6104:(e,t,r)=>{"use strict";var n=r(6512),o=r(320);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,a=void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(a)?a:String(a)),n)}var o,a}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var u,c,l=r(988).codes,f=l.ERR_AMBIGUOUS_ARGUMENT,p=l.ERR_INVALID_ARG_TYPE,h=l.ERR_INVALID_ARG_VALUE,y=l.ERR_INVALID_RETURN_VALUE,d=l.ERR_MISSING_ARGS,m=r(9524),g=r(3912).inspect,v=r(3912).types,b=v.isPromise,w=v.isRegExp,S=r(9244)(),k=r(9756)(),E=r(2768)("RegExp.prototype.test");new Map;function A(){var e=r(5856);u=e.isDeepEqual,c=e.isDeepStrictEqual}var T=!1,O=e.exports=_,P={};function x(e){if(e.message instanceof Error)throw e.message;throw new m(e)}function I(e,t,r,n){if(!r){var o=!1;if(0===t)o=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var i=new m({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw i.generatedMessage=o,i}}function _(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[_,t.length].concat(t))}O.fail=function e(t,r,i,a,s){var u,c=arguments.length;if(0===c)u="Failed";else if(1===c)i=t,t=void 0;else{if(!1===T)T=!0,(n.emitWarning?n.emitWarning:o.warn.bind(o))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");2===c&&(a="!=")}if(i instanceof Error)throw i;var l={actual:t,expected:r,operator:void 0===a?"fail":a,stackStartFn:s||e};void 0!==i&&(l.message=i);var f=new m(l);throw u&&(f.message=u,f.generatedMessage=!0),f},O.AssertionError=m,O.ok=_,O.equal=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t!=r&&x({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},O.notEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t==r&&x({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},O.deepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A(),u(t,r)||x({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},O.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A(),u(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},O.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A(),c(t,r)||x({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},O.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A();c(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},O.strictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");k(t,r)||x({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},O.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");k(t,r)&&x({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var B=s((function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&w(t[e])&&E(t[e],n[e])?o[e]=n[e]:o[e]=t[e])}))}));function R(e,t,r,n){if("function"!=typeof t){if(w(t))return E(t,e);if(2===arguments.length)throw new p("expected",["Function","RegExp"],t);if("object"!==i(e)||null===e){var o=new m({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw o.operator=n.name,o}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(0===a.length)throw new h("error",t,"may not be an empty object");return void 0===u&&A(),a.forEach((function(o){"string"==typeof e[o]&&w(t[o])&&E(t[o],e[o])||function(e,t,r,n,o,i){if(!(r in e)||!c(e[r],t[r])){if(!n){var a=new B(e,o),s=new B(t,o,e),u=new m({actual:a,expected:s,operator:"deepStrictEqual",stackStartFn:i});throw u.actual=e,u.expected=t,u.operator=i.name,u}x({actual:e,expected:t,message:n,operator:i.name,stackStartFn:i})}}(e,t,o,r,a,n)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function C(e){if("function"!=typeof e)throw new p("fn","Function",e);try{e()}catch(e){return e}return P}function U(e){return b(e)||null!==e&&"object"===i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function N(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!U(t=e()))throw new y("instance of Promise","promiseFn",t)}else{if(!U(e))throw new p("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return P})).catch((function(e){return e}))}))}function L(e,t,r,n){if("string"==typeof r){if(4===arguments.length)throw new p("error",["Object","Error","Function","RegExp"],r);if("object"===i(t)&&null!==t){if(t.message===r)throw new f("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new f("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new p("error",["Object","Error","Function","RegExp"],r);if(t===P){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var a="rejects"===e.name?"rejection":"exception";x({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:e})}if(r&&!R(t,r,n,e))throw t}function j(e,t,r,n){if(t!==P){if("string"==typeof r&&(n=r,r=void 0),!r||R(t,r)){var o=n?": ".concat(n):".",i="doesNotReject"===e.name?"rejection":"exception";x({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(i).concat(o,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function M(e,t,r,n,o){if(!w(t))throw new p("regexp","RegExp",t);var a="match"===o;if("string"!=typeof e||E(t,e)!==a){if(r instanceof Error)throw r;var s=!r;r=r||("string"!=typeof e?'The "string" argument must be of type string. Received type '+"".concat(i(e)," (").concat(g(e),")"):(a?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(g(t),". Input:\n\n").concat(g(e),"\n"));var u=new m({actual:e,expected:t,message:r,operator:o,stackStartFn:n});throw u.generatedMessage=s,u}}function F(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[F,t.length].concat(t))}O.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];L.apply(void 0,[e,C(t)].concat(n))},O.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return N(t).then((function(t){return L.apply(void 0,[e,t].concat(n))}))},O.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];j.apply(void 0,[e,C(t)].concat(n))},O.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return N(t).then((function(t){return j.apply(void 0,[e,t].concat(n))}))},O.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===i(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=g(t);var n=new m({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=n.stack.split("\n"),u=0;u<a.length;u++){var c=s.indexOf(a[u]);if(-1!==c){s=s.slice(0,c);break}}n.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw n}},O.match=function e(t,r,n){M(t,r,n,e,"match")},O.doesNotMatch=function e(t,r,n){M(t,r,n,e,"doesNotMatch")},O.strict=S(F,O,{equal:O.strictEqual,deepEqual:O.deepStrictEqual,notEqual:O.notStrictEqual,notDeepEqual:O.notDeepStrictEqual}),O.strict.strict=O.strict},9524:(e,t,r)=>{"use strict";var n=r(6512);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e,t){if("object"!==m(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===m(t)?t:String(t)}function c(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,e)},f(e)}function p(e,t,r){return p=h()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&y(o,r.prototype),o},p.apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}var g=r(3912).inspect,v=r(988).codes.ERR_INVALID_ARG_TYPE;function b(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var w="",S="",k="",E="",A={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function T(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function O(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function P(e,t,r){var o="",i="",a=0,s="",u=!1,c=O(e),l=c.split("\n"),f=O(t).split("\n"),p=0,h="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===l.length&&1===f.length&&l[0]!==f[0]){var y=l[0].length+f[0].length;if(y<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(A[r],"\n\n")+"".concat(l[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r){if(y<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;l[0][p]===f[0][p];)p++;p>2&&(h="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",p),"^"),p=0)}}}for(var d=l[l.length-1],g=f[f.length-1];d===g&&(p++<2?s="\n ".concat(d).concat(s):o=d,l.pop(),f.pop(),0!==l.length&&0!==f.length);)d=l[l.length-1],g=f[f.length-1];var v=Math.max(l.length,f.length);if(0===v){var T=c.split("\n");if(T.length>30)for(T[26]="".concat(w,"...").concat(E);T.length>27;)T.pop();return"".concat(A.notIdentical,"\n\n").concat(T.join("\n"),"\n")}p>3&&(s="\n".concat(w,"...").concat(E).concat(s),u=!0),""!==o&&(s="\n ".concat(o).concat(s),o="");var P=0,x=A[r]+"\n".concat(S,"+ actual").concat(E," ").concat(k,"- expected").concat(E),I=" ".concat(w,"...").concat(E," Lines skipped");for(p=0;p<v;p++){var _=p-a;if(l.length<p+1)_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(f[p-2]),P++),i+="\n ".concat(f[p-1]),P++),a=p,o+="\n".concat(k,"-").concat(E," ").concat(f[p]),P++;else if(f.length<p+1)_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(l[p-2]),P++),i+="\n ".concat(l[p-1]),P++),a=p,i+="\n".concat(S,"+").concat(E," ").concat(l[p]),P++;else{var B=f[p],R=l[p],C=R!==B&&(!b(R,",")||R.slice(0,-1)!==B);C&&b(B,",")&&B.slice(0,-1)===R&&(C=!1,R+=","),C?(_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(l[p-2]),P++),i+="\n ".concat(l[p-1]),P++),a=p,i+="\n".concat(S,"+").concat(E," ").concat(R),o+="\n".concat(k,"-").concat(E," ").concat(B),P+=2):(i+=o,o="",1!==_&&0!==p||(i+="\n ".concat(R),P++))}if(P>20&&p<v-2)return"".concat(x).concat(I,"\n").concat(i,"\n").concat(w,"...").concat(E).concat(o,"\n")+"".concat(w,"...").concat(E)}return"".concat(x).concat(u?I:"","\n").concat(i).concat(o).concat(s).concat(h)}var x=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(b,e);var r,o,a,u,f,p=(r=b,o=h(),function(){var e,t=d(r);if(o){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function b(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),"object"!==m(e)||null===e)throw new v("options","Object",e);var r=e.message,o=e.operator,i=e.stackStartFn,a=e.actual,s=e.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=p.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(w="\x1b[34m",S="\x1b[32m",E="\x1b[39m",k="\x1b[31m"):(w="",S="",E="",k="")),"object"===m(a)&&null!==a&&"object"===m(s)&&null!==s&&"stack"in a&&a instanceof Error&&"stack"in s&&s instanceof Error&&(a=T(a),s=T(s)),"deepStrictEqual"===o||"strictEqual"===o)t=p.call(this,P(a,s,o));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var f=A[o],h=O(a).split("\n");if("notStrictEqual"===o&&"object"===m(a)&&null!==a&&(f=A.notStrictEqualObject),h.length>30)for(h[26]="".concat(w,"...").concat(E);h.length>27;)h.pop();t=1===h.length?p.call(this,"".concat(f," ").concat(h[0])):p.call(this,"".concat(f,"\n\n").concat(h.join("\n"),"\n"))}else{var y=O(a),d="",g=A[o];"notDeepEqual"===o||"notEqual"===o?(y="".concat(A[o],"\n\n").concat(y)).length>1024&&(y="".concat(y.slice(0,1021),"...")):(d="".concat(O(s)),y.length>512&&(y="".concat(y.slice(0,509),"...")),d.length>512&&(d="".concat(d.slice(0,509),"...")),"deepEqual"===o||"equal"===o?y="".concat(g,"\n\n").concat(y,"\n\nshould equal\n\n"):d=" ".concat(o," ").concat(d)),t=p.call(this,"".concat(y).concat(d))}return Error.stackTraceLimit=u,t.generatedMessage=!r,Object.defineProperty(l(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=a,t.expected=s,t.operator=o,Error.captureStackTrace&&Error.captureStackTrace(l(t),i),t.stack,t.name="AssertionError",c(t)}return a=b,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,i(i({},t),{},{customInspect:!1,depth:0}))}}])&&s(a.prototype,u),f&&s(a,f),Object.defineProperty(a,"prototype",{writable:!1}),b}(f(Error),g.custom);e.exports=x},988:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(i=o.key,a=void 0,a=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===n(a)?a:String(a)),o)}var i,a}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=s(e);if(t){var i=s(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var u,c,l={};function f(e,t,r){r||(r=Error);var n=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(l,r);var n,s,u,c=a(l);function l(r,n,o){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i=c.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,o)),i.code=e,i}return n=l,s&&o(n.prototype,s),u&&o(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n}(r);l[e]=n}function p(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",(function(e,t,o){var i,a,s,c;if(void 0===u&&(u=r(6104)),u("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(!s||s<0?0:+s,a.length)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))c="The ".concat(e," ").concat(i," ").concat(p(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";c='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(p(t,"type"))}return c+=". Received type ".concat(n(o))}),TypeError),f("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=r(3912));var o=c.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(o)}),TypeError,RangeError),f("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var o;return o=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")}),TypeError),f("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===u&&(u=r(6104)),u(t.length>0,"At least one arg needs to be specified");var o="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,i-1).join(", "),o+=", and ".concat(t[i-1]," arguments")}return"".concat(o," must be specified")}),TypeError),e.exports.codes=l},5856:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},u=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},c=Object.is?Object.is:r(1620),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(2796);function p(e){return e.call.bind(e)}var h=p(Object.prototype.hasOwnProperty),y=p(Object.prototype.propertyIsEnumerable),d=p(Object.prototype.toString),m=r(3912).types,g=m.isAnyArrayBuffer,v=m.isArrayBufferView,b=m.isDate,w=m.isMap,S=m.isRegExp,k=m.isSet,E=m.isNativeError,A=m.isBoxedPrimitive,T=m.isNumberObject,O=m.isStringObject,P=m.isBooleanObject,x=m.isBigIntObject,I=m.isSymbolObject,_=m.isFloat32Array,B=m.isFloat64Array;function R(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function C(e){return Object.keys(e).filter(R).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function U(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}var N=0,L=1,j=2,M=3;function F(e,t,r,n){if(e===t)return 0!==e||(!r||c(e,t));if(r){if("object"!==i(e))return"number"==typeof e&&f(e)&&f(t);if("object"!==i(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var o,s,u,l,p=d(e);if(p!==d(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var h=C(e),y=C(t);return h.length===y.length&&V(e,t,r,n,L,h)}if("[object Object]"===p&&(!w(e)&&w(t)||!k(e)&&k(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(S(e)){if(!S(t)||(u=e,l=t,!(a?u.source===l.source&&u.flags===l.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(l))))return!1}else if(E(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(v(e)){if(r||!_(e)&&!B(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===U(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var m=C(e),R=C(t);return m.length===R.length&&V(e,t,r,n,N,m)}if(k(e))return!(!k(t)||e.size!==t.size)&&V(e,t,r,n,j);if(w(e))return!(!w(t)||e.size!==t.size)&&V(e,t,r,n,M);if(g(e)){if(s=t,(o=e).byteLength!==s.byteLength||0!==U(new Uint8Array(o),new Uint8Array(s)))return!1}else if(A(e)&&!function(e,t){return T(e)?T(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):O(e)?O(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):P(e)?P(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):x(e)?x(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):I(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return V(e,t,r,n,N)}function D(e,t){return t.filter((function(t){return y(e,t)}))}function V(e,t,r,o,a,c){if(5===arguments.length){c=Object.keys(e);var f=Object.keys(t);if(c.length!==f.length)return!1}for(var p=0;p<c.length;p++)if(!h(t,c[p]))return!1;if(r&&5===arguments.length){var d=l(e);if(0!==d.length){var m=0;for(p=0;p<d.length;p++){var g=d[p];if(y(e,g)){if(!y(t,g))return!1;c.push(g),m++}else if(y(t,g))return!1}var v=l(t);if(d.length!==v.length&&D(t,v).length!==m)return!1}else{var b=l(t);if(0!==b.length&&0!==D(t,b).length)return!1}}if(0===c.length&&(a===N||a===L&&0===e.length||0===e.size))return!0;if(void 0===o)o={val1:new Map,val2:new Map,position:0};else{var w=o.val1.get(e);if(void 0!==w){var S=o.val2.get(t);if(void 0!==S)return w===S}o.position++}o.val1.set(e,o.position),o.val2.set(t,o.position);var k=function(e,t,r,o,a,c){var l=0;if(c===j){if(!function(e,t,r,n){for(var o=null,a=s(e),u=0;u<a.length;u++){var c=a[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!t.has(c)){if(r)return!1;if(!H(e,t,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var l=s(t),f=0;f<l.length;f++){var p=l[f];if("object"===i(p)&&null!==p){if(!q(o,p,r,n))return!1}else if(!r&&!e.has(p)&&!q(o,p,r,n))return!1}return 0===o.size}return!0}(e,t,r,a))return!1}else if(c===M){if(!function(e,t,r,o){for(var a=null,s=u(e),c=0;c<s.length;c++){var l=n(s[c],2),f=l[0],p=l[1];if("object"===i(f)&&null!==f)null===a&&(a=new Set),a.add(f);else{var h=t.get(f);if(void 0===h&&!t.has(f)||!F(p,h,r,o)){if(r)return!1;if(!z(e,t,f,p,o))return!1;null===a&&(a=new Set),a.add(f)}}}if(null!==a){for(var y=u(t),d=0;d<y.length;d++){var m=n(y[d],2),g=m[0],v=m[1];if("object"===i(g)&&null!==g){if(!X(a,e,g,v,r,o))return!1}else if(!(r||e.has(g)&&F(e.get(g),v,!1,o)||X(a,e,g,v,!1,o)))return!1}return 0===a.size}return!0}(e,t,r,a))return!1}else if(c===L)for(;l<e.length;l++){if(!h(e,l)){if(h(t,l))return!1;for(var f=Object.keys(e);l<f.length;l++){var p=f[l];if(!h(t,p)||!F(e[p],t[p],r,a))return!1}return f.length===Object.keys(t).length}if(!h(t,l)||!F(e[l],t[l],r,a))return!1}for(l=0;l<o.length;l++){var y=o[l];if(!F(e[y],t[y],r,a))return!1}return!0}(e,t,r,c,o,a);return o.val1.delete(e),o.val2.delete(t),k}function q(e,t,r,n){for(var o=s(e),i=0;i<o.length;i++){var a=o[i];if(F(t,a,r,n))return e.delete(a),!0}return!1}function K(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(f(e))return!1}return!0}function H(e,t,r){var n=K(r);return null!=n?n:t.has(n)&&!e.has(n)}function z(e,t,r,n,o){var i=K(r);if(null!=i)return i;var a=t.get(i);return!(void 0===a&&!t.has(i)||!F(n,a,!1,o))&&(!e.has(i)&&F(n,a,!1,o))}function X(e,t,r,n,o,i){for(var a=s(e),u=0;u<a.length;u++){var c=a[u];if(F(r,c,o,i)&&F(n,t.get(c),o,i))return e.delete(c),!0}return!1}e.exports={isDeepEqual:function(e,t){return F(e,t,false)},isDeepStrictEqual:function(e,t){return F(e,t,true)}}},2456:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Account:()=>Mt,Address:()=>$e,Asset:()=>M,AuthClawbackEnabledFlag:()=>ot,AuthImmutableFlag:()=>nt,AuthRequiredFlag:()=>tt,AuthRevocableFlag:()=>rt,BASE_FEE:()=>ir,Claimant:()=>xe,Contract:()=>br,FastSigning:()=>l,FeeBumpTransaction:()=>Ut,Hyper:()=>n.Hyper,Int128:()=>Kr,Int256:()=>Jr,Keypair:()=>C,LiquidityPoolAsset:()=>Ae,LiquidityPoolFeeV18:()=>V,LiquidityPoolId:()=>Re,Memo:()=>mt,MemoHash:()=>yt,MemoID:()=>pt,MemoNone:()=>ft,MemoReturn:()=>dt,MemoText:()=>ht,MuxedAccount:()=>qt,Networks:()=>cr,Operation:()=>it,ScInt:()=>fn,SignerKey:()=>Yt,Soroban:()=>dr,SorobanDataBuilder:()=>Xt,StrKey:()=>A,TimeoutInfinite:()=>ar,Transaction:()=>Tt,TransactionBase:()=>$,TransactionBuilder:()=>sr,Uint128:()=>Pr,Uint256:()=>Nr,UnsignedHyper:()=>n.UnsignedHyper,XdrLargeInt:()=>rn,authorizeEntry:()=>In,authorizeInvocation:()=>Bn,buildInvocationTree:()=>Rn,decodeAddressToMuxedAccount:()=>Ue,default:()=>Nn,encodeMuxedAccount:()=>Le,encodeMuxedAccountToAddress:()=>Ne,extractBaseAddress:()=>je,getLiquidityPoolId:()=>q,hash:()=>s,humanizeEvents:()=>En,nativeToScVal:()=>gn,scValToBigInt:()=>pn,scValToNative:()=>vn,sign:()=>f,verify:()=>p,walkInvocationTree:()=>Cn,xdr:()=>i});var n=r(4232),o=n.config((function(e){var t=1024;e.typedef("Value",e.varOpaque()),e.struct("ScpBallot",[["counter",e.lookup("Uint32")],["value",e.lookup("Value")]]),e.enum("ScpStatementType",{scpStPrepare:0,scpStConfirm:1,scpStExternalize:2,scpStNominate:3}),e.struct("ScpNomination",[["quorumSetHash",e.lookup("Hash")],["votes",e.varArray(e.lookup("Value"),2147483647)],["accepted",e.varArray(e.lookup("Value"),2147483647)]]),e.struct("ScpStatementPrepare",[["quorumSetHash",e.lookup("Hash")],["ballot",e.lookup("ScpBallot")],["prepared",e.option(e.lookup("ScpBallot"))],["preparedPrime",e.option(e.lookup("ScpBallot"))],["nC",e.lookup("Uint32")],["nH",e.lookup("Uint32")]]),e.struct("ScpStatementConfirm",[["ballot",e.lookup("ScpBallot")],["nPrepared",e.lookup("Uint32")],["nCommit",e.lookup("Uint32")],["nH",e.lookup("Uint32")],["quorumSetHash",e.lookup("Hash")]]),e.struct("ScpStatementExternalize",[["commit",e.lookup("ScpBallot")],["nH",e.lookup("Uint32")],["commitQuorumSetHash",e.lookup("Hash")]]),e.union("ScpStatementPledges",{switchOn:e.lookup("ScpStatementType"),switchName:"type",switches:[["scpStPrepare","prepare"],["scpStConfirm","confirm"],["scpStExternalize","externalize"],["scpStNominate","nominate"]],arms:{prepare:e.lookup("ScpStatementPrepare"),confirm:e.lookup("ScpStatementConfirm"),externalize:e.lookup("ScpStatementExternalize"),nominate:e.lookup("ScpNomination")}}),e.struct("ScpStatement",[["nodeId",e.lookup("NodeId")],["slotIndex",e.lookup("Uint64")],["pledges",e.lookup("ScpStatementPledges")]]),e.struct("ScpEnvelope",[["statement",e.lookup("ScpStatement")],["signature",e.lookup("Signature")]]),e.struct("ScpQuorumSet",[["threshold",e.lookup("Uint32")],["validators",e.varArray(e.lookup("NodeId"),2147483647)],["innerSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)]]),e.typedef("Thresholds",e.opaque(4)),e.typedef("String32",e.string(32)),e.typedef("String64",e.string(64)),e.typedef("SequenceNumber",e.lookup("Int64")),e.typedef("DataValue",e.varOpaque(64)),e.typedef("PoolId",e.lookup("Hash")),e.typedef("AssetCode4",e.opaque(4)),e.typedef("AssetCode12",e.opaque(12)),e.enum("AssetType",{assetTypeNative:0,assetTypeCreditAlphanum4:1,assetTypeCreditAlphanum12:2,assetTypePoolShare:3}),e.union("AssetCode",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:e.lookup("AssetCode4"),assetCode12:e.lookup("AssetCode12")}}),e.struct("AlphaNum4",[["assetCode",e.lookup("AssetCode4")],["issuer",e.lookup("AccountId")]]),e.struct("AlphaNum12",[["assetCode",e.lookup("AssetCode12")],["issuer",e.lookup("AccountId")]]),e.union("Asset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12")}}),e.struct("Price",[["n",e.lookup("Int32")],["d",e.lookup("Int32")]]),e.struct("Liabilities",[["buying",e.lookup("Int64")],["selling",e.lookup("Int64")]]),e.enum("ThresholdIndices",{thresholdMasterWeight:0,thresholdLow:1,thresholdMed:2,thresholdHigh:3}),e.enum("LedgerEntryType",{account:0,trustline:1,offer:2,data:3,claimableBalance:4,liquidityPool:5,contractData:6,contractCode:7,configSetting:8,ttl:9}),e.struct("Signer",[["key",e.lookup("SignerKey")],["weight",e.lookup("Uint32")]]),e.enum("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4,authClawbackEnabledFlag:8}),e.const("MASK_ACCOUNT_FLAGS",7),e.const("MASK_ACCOUNT_FLAGS_V17",15),e.const("MAX_SIGNERS",20),e.typedef("SponsorshipDescriptor",e.option(e.lookup("AccountId"))),e.struct("AccountEntryExtensionV3",[["ext",e.lookup("ExtensionPoint")],["seqLedger",e.lookup("Uint32")],["seqTime",e.lookup("TimePoint")]]),e.union("AccountEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[3,"v3"]],arms:{v3:e.lookup("AccountEntryExtensionV3")}}),e.struct("AccountEntryExtensionV2",[["numSponsored",e.lookup("Uint32")],["numSponsoring",e.lookup("Uint32")],["signerSponsoringIDs",e.varArray(e.lookup("SponsorshipDescriptor"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExtensionV2Ext")]]),e.union("AccountEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("AccountEntryExtensionV2")}}),e.struct("AccountEntryExtensionV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("AccountEntryExtensionV1Ext")]]),e.union("AccountEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("AccountEntryExtensionV1")}}),e.struct("AccountEntry",[["accountId",e.lookup("AccountId")],["balance",e.lookup("Int64")],["seqNum",e.lookup("SequenceNumber")],["numSubEntries",e.lookup("Uint32")],["inflationDest",e.option(e.lookup("AccountId"))],["flags",e.lookup("Uint32")],["homeDomain",e.lookup("String32")],["thresholds",e.lookup("Thresholds")],["signers",e.varArray(e.lookup("Signer"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExt")]]),e.enum("TrustLineFlags",{authorizedFlag:1,authorizedToMaintainLiabilitiesFlag:2,trustlineClawbackEnabledFlag:4}),e.const("MASK_TRUSTLINE_FLAGS",1),e.const("MASK_TRUSTLINE_FLAGS_V13",3),e.const("MASK_TRUSTLINE_FLAGS_V17",7),e.enum("LiquidityPoolType",{liquidityPoolConstantProduct:0}),e.union("TrustLineAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPoolId"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPoolId:e.lookup("PoolId")}}),e.union("TrustLineEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TrustLineEntryExtensionV2",[["liquidityPoolUseCount",e.lookup("Int32")],["ext",e.lookup("TrustLineEntryExtensionV2Ext")]]),e.union("TrustLineEntryV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("TrustLineEntryExtensionV2")}}),e.struct("TrustLineEntryV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("TrustLineEntryV1Ext")]]),e.union("TrustLineEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("TrustLineEntryV1")}}),e.struct("TrustLineEntry",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")],["balance",e.lookup("Int64")],["limit",e.lookup("Int64")],["flags",e.lookup("Uint32")],["ext",e.lookup("TrustLineEntryExt")]]),e.enum("OfferEntryFlags",{passiveFlag:1}),e.const("MASK_OFFERENTRY_FLAGS",1),e.union("OfferEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("OfferEntry",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["flags",e.lookup("Uint32")],["ext",e.lookup("OfferEntryExt")]]),e.union("DataEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("DataEntry",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")],["dataValue",e.lookup("DataValue")],["ext",e.lookup("DataEntryExt")]]),e.enum("ClaimPredicateType",{claimPredicateUnconditional:0,claimPredicateAnd:1,claimPredicateOr:2,claimPredicateNot:3,claimPredicateBeforeAbsoluteTime:4,claimPredicateBeforeRelativeTime:5}),e.union("ClaimPredicate",{switchOn:e.lookup("ClaimPredicateType"),switchName:"type",switches:[["claimPredicateUnconditional",e.void()],["claimPredicateAnd","andPredicates"],["claimPredicateOr","orPredicates"],["claimPredicateNot","notPredicate"],["claimPredicateBeforeAbsoluteTime","absBefore"],["claimPredicateBeforeRelativeTime","relBefore"]],arms:{andPredicates:e.varArray(e.lookup("ClaimPredicate"),2),orPredicates:e.varArray(e.lookup("ClaimPredicate"),2),notPredicate:e.option(e.lookup("ClaimPredicate")),absBefore:e.lookup("Int64"),relBefore:e.lookup("Int64")}}),e.enum("ClaimantType",{claimantTypeV0:0}),e.struct("ClaimantV0",[["destination",e.lookup("AccountId")],["predicate",e.lookup("ClaimPredicate")]]),e.union("Claimant",{switchOn:e.lookup("ClaimantType"),switchName:"type",switches:[["claimantTypeV0","v0"]],arms:{v0:e.lookup("ClaimantV0")}}),e.enum("ClaimableBalanceIdType",{claimableBalanceIdTypeV0:0}),e.union("ClaimableBalanceId",{switchOn:e.lookup("ClaimableBalanceIdType"),switchName:"type",switches:[["claimableBalanceIdTypeV0","v0"]],arms:{v0:e.lookup("Hash")}}),e.enum("ClaimableBalanceFlags",{claimableBalanceClawbackEnabledFlag:1}),e.const("MASK_CLAIMABLE_BALANCE_FLAGS",1),e.union("ClaimableBalanceEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("ClaimableBalanceEntryExtensionV1",[["ext",e.lookup("ClaimableBalanceEntryExtensionV1Ext")],["flags",e.lookup("Uint32")]]),e.union("ClaimableBalanceEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ClaimableBalanceEntryExtensionV1")}}),e.struct("ClaimableBalanceEntry",[["balanceId",e.lookup("ClaimableBalanceId")],["claimants",e.varArray(e.lookup("Claimant"),10)],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["ext",e.lookup("ClaimableBalanceEntryExt")]]),e.struct("LiquidityPoolConstantProductParameters",[["assetA",e.lookup("Asset")],["assetB",e.lookup("Asset")],["fee",e.lookup("Int32")]]),e.struct("LiquidityPoolEntryConstantProduct",[["params",e.lookup("LiquidityPoolConstantProductParameters")],["reserveA",e.lookup("Int64")],["reserveB",e.lookup("Int64")],["totalPoolShares",e.lookup("Int64")],["poolSharesTrustLineCount",e.lookup("Int64")]]),e.union("LiquidityPoolEntryBody",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolEntryConstantProduct")}}),e.struct("LiquidityPoolEntry",[["liquidityPoolId",e.lookup("PoolId")],["body",e.lookup("LiquidityPoolEntryBody")]]),e.enum("ContractDataDurability",{temporary:0,persistent:1}),e.struct("ContractDataEntry",[["ext",e.lookup("ExtensionPoint")],["contract",e.lookup("ScAddress")],["key",e.lookup("ScVal")],["durability",e.lookup("ContractDataDurability")],["val",e.lookup("ScVal")]]),e.struct("ContractCodeEntry",[["ext",e.lookup("ExtensionPoint")],["hash",e.lookup("Hash")],["code",e.varOpaque()]]),e.struct("TtlEntry",[["keyHash",e.lookup("Hash")],["liveUntilLedgerSeq",e.lookup("Uint32")]]),e.union("LedgerEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerEntryExtensionV1",[["sponsoringId",e.lookup("SponsorshipDescriptor")],["ext",e.lookup("LedgerEntryExtensionV1Ext")]]),e.union("LedgerEntryData",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:e.lookup("AccountEntry"),trustLine:e.lookup("TrustLineEntry"),offer:e.lookup("OfferEntry"),data:e.lookup("DataEntry"),claimableBalance:e.lookup("ClaimableBalanceEntry"),liquidityPool:e.lookup("LiquidityPoolEntry"),contractData:e.lookup("ContractDataEntry"),contractCode:e.lookup("ContractCodeEntry"),configSetting:e.lookup("ConfigSettingEntry"),ttl:e.lookup("TtlEntry")}}),e.union("LedgerEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerEntryExtensionV1")}}),e.struct("LedgerEntry",[["lastModifiedLedgerSeq",e.lookup("Uint32")],["data",e.lookup("LedgerEntryData")],["ext",e.lookup("LedgerEntryExt")]]),e.struct("LedgerKeyAccount",[["accountId",e.lookup("AccountId")]]),e.struct("LedgerKeyTrustLine",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")]]),e.struct("LedgerKeyOffer",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")]]),e.struct("LedgerKeyData",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")]]),e.struct("LedgerKeyClaimableBalance",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("LedgerKeyLiquidityPool",[["liquidityPoolId",e.lookup("PoolId")]]),e.struct("LedgerKeyContractData",[["contract",e.lookup("ScAddress")],["key",e.lookup("ScVal")],["durability",e.lookup("ContractDataDurability")]]),e.struct("LedgerKeyContractCode",[["hash",e.lookup("Hash")]]),e.struct("LedgerKeyConfigSetting",[["configSettingId",e.lookup("ConfigSettingId")]]),e.struct("LedgerKeyTtl",[["keyHash",e.lookup("Hash")]]),e.union("LedgerKey",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:e.lookup("LedgerKeyAccount"),trustLine:e.lookup("LedgerKeyTrustLine"),offer:e.lookup("LedgerKeyOffer"),data:e.lookup("LedgerKeyData"),claimableBalance:e.lookup("LedgerKeyClaimableBalance"),liquidityPool:e.lookup("LedgerKeyLiquidityPool"),contractData:e.lookup("LedgerKeyContractData"),contractCode:e.lookup("LedgerKeyContractCode"),configSetting:e.lookup("LedgerKeyConfigSetting"),ttl:e.lookup("LedgerKeyTtl")}}),e.enum("EnvelopeType",{envelopeTypeTxV0:0,envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4,envelopeTypeTxFeeBump:5,envelopeTypeOpId:6,envelopeTypePoolRevokeOpId:7,envelopeTypeContractId:8,envelopeTypeSorobanAuthorization:9}),e.typedef("UpgradeType",e.varOpaque(128)),e.enum("StellarValueType",{stellarValueBasic:0,stellarValueSigned:1}),e.struct("LedgerCloseValueSignature",[["nodeId",e.lookup("NodeId")],["signature",e.lookup("Signature")]]),e.union("StellarValueExt",{switchOn:e.lookup("StellarValueType"),switchName:"v",switches:[["stellarValueBasic",e.void()],["stellarValueSigned","lcValueSignature"]],arms:{lcValueSignature:e.lookup("LedgerCloseValueSignature")}}),e.struct("StellarValue",[["txSetHash",e.lookup("Hash")],["closeTime",e.lookup("TimePoint")],["upgrades",e.varArray(e.lookup("UpgradeType"),6)],["ext",e.lookup("StellarValueExt")]]),e.const("MASK_LEDGER_HEADER_FLAGS",7),e.enum("LedgerHeaderFlags",{disableLiquidityPoolTradingFlag:1,disableLiquidityPoolDepositFlag:2,disableLiquidityPoolWithdrawalFlag:4}),e.union("LedgerHeaderExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderExtensionV1",[["flags",e.lookup("Uint32")],["ext",e.lookup("LedgerHeaderExtensionV1Ext")]]),e.union("LedgerHeaderExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerHeaderExtensionV1")}}),e.struct("LedgerHeader",[["ledgerVersion",e.lookup("Uint32")],["previousLedgerHash",e.lookup("Hash")],["scpValue",e.lookup("StellarValue")],["txSetResultHash",e.lookup("Hash")],["bucketListHash",e.lookup("Hash")],["ledgerSeq",e.lookup("Uint32")],["totalCoins",e.lookup("Int64")],["feePool",e.lookup("Int64")],["inflationSeq",e.lookup("Uint32")],["idPool",e.lookup("Uint64")],["baseFee",e.lookup("Uint32")],["baseReserve",e.lookup("Uint32")],["maxTxSetSize",e.lookup("Uint32")],["skipList",e.array(e.lookup("Hash"),4)],["ext",e.lookup("LedgerHeaderExt")]]),e.enum("LedgerUpgradeType",{ledgerUpgradeVersion:1,ledgerUpgradeBaseFee:2,ledgerUpgradeMaxTxSetSize:3,ledgerUpgradeBaseReserve:4,ledgerUpgradeFlags:5,ledgerUpgradeConfig:6,ledgerUpgradeMaxSorobanTxSetSize:7}),e.struct("ConfigUpgradeSetKey",[["contractId",e.lookup("Hash")],["contentHash",e.lookup("Hash")]]),e.union("LedgerUpgrade",{switchOn:e.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"],["ledgerUpgradeBaseReserve","newBaseReserve"],["ledgerUpgradeFlags","newFlags"],["ledgerUpgradeConfig","newConfig"],["ledgerUpgradeMaxSorobanTxSetSize","newMaxSorobanTxSetSize"]],arms:{newLedgerVersion:e.lookup("Uint32"),newBaseFee:e.lookup("Uint32"),newMaxTxSetSize:e.lookup("Uint32"),newBaseReserve:e.lookup("Uint32"),newFlags:e.lookup("Uint32"),newConfig:e.lookup("ConfigUpgradeSetKey"),newMaxSorobanTxSetSize:e.lookup("Uint32")}}),e.struct("ConfigUpgradeSet",[["updatedEntry",e.varArray(e.lookup("ConfigSettingEntry"),2147483647)]]),e.enum("BucketEntryType",{metaentry:-1,liveentry:0,deadentry:1,initentry:2}),e.union("BucketMetadataExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("BucketMetadata",[["ledgerVersion",e.lookup("Uint32")],["ext",e.lookup("BucketMetadataExt")]]),e.union("BucketEntry",{switchOn:e.lookup("BucketEntryType"),switchName:"type",switches:[["liveentry","liveEntry"],["initentry","liveEntry"],["deadentry","deadEntry"],["metaentry","metaEntry"]],arms:{liveEntry:e.lookup("LedgerEntry"),deadEntry:e.lookup("LedgerKey"),metaEntry:e.lookup("BucketMetadata")}}),e.enum("TxSetComponentType",{txsetCompTxsMaybeDiscountedFee:0}),e.struct("TxSetComponentTxsMaybeDiscountedFee",[["baseFee",e.option(e.lookup("Int64"))],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.union("TxSetComponent",{switchOn:e.lookup("TxSetComponentType"),switchName:"type",switches:[["txsetCompTxsMaybeDiscountedFee","txsMaybeDiscountedFee"]],arms:{txsMaybeDiscountedFee:e.lookup("TxSetComponentTxsMaybeDiscountedFee")}}),e.union("TransactionPhase",{switchOn:e.int(),switchName:"v",switches:[[0,"v0Components"]],arms:{v0Components:e.varArray(e.lookup("TxSetComponent"),2147483647)}}),e.struct("TransactionSet",[["previousLedgerHash",e.lookup("Hash")],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.struct("TransactionSetV1",[["previousLedgerHash",e.lookup("Hash")],["phases",e.varArray(e.lookup("TransactionPhase"),2147483647)]]),e.union("GeneralizedTransactionSet",{switchOn:e.int(),switchName:"v",switches:[[1,"v1TxSet"]],arms:{v1TxSet:e.lookup("TransactionSetV1")}}),e.struct("TransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("TransactionResult")]]),e.struct("TransactionResultSet",[["results",e.varArray(e.lookup("TransactionResultPair"),2147483647)]]),e.union("TransactionHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"generalizedTxSet"]],arms:{generalizedTxSet:e.lookup("GeneralizedTransactionSet")}}),e.struct("TransactionHistoryEntry",[["ledgerSeq",e.lookup("Uint32")],["txSet",e.lookup("TransactionSet")],["ext",e.lookup("TransactionHistoryEntryExt")]]),e.union("TransactionHistoryResultEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionHistoryResultEntry",[["ledgerSeq",e.lookup("Uint32")],["txResultSet",e.lookup("TransactionResultSet")],["ext",e.lookup("TransactionHistoryResultEntryExt")]]),e.union("LedgerHeaderHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderHistoryEntry",[["hash",e.lookup("Hash")],["header",e.lookup("LedgerHeader")],["ext",e.lookup("LedgerHeaderHistoryEntryExt")]]),e.struct("LedgerScpMessages",[["ledgerSeq",e.lookup("Uint32")],["messages",e.varArray(e.lookup("ScpEnvelope"),2147483647)]]),e.struct("ScpHistoryEntryV0",[["quorumSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)],["ledgerMessages",e.lookup("LedgerScpMessages")]]),e.union("ScpHistoryEntry",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ScpHistoryEntryV0")}}),e.enum("LedgerEntryChangeType",{ledgerEntryCreated:0,ledgerEntryUpdated:1,ledgerEntryRemoved:2,ledgerEntryState:3}),e.union("LedgerEntryChange",{switchOn:e.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"]],arms:{created:e.lookup("LedgerEntry"),updated:e.lookup("LedgerEntry"),removed:e.lookup("LedgerKey"),state:e.lookup("LedgerEntry")}}),e.typedef("LedgerEntryChanges",e.varArray(e.lookup("LedgerEntryChange"),2147483647)),e.struct("OperationMeta",[["changes",e.lookup("LedgerEntryChanges")]]),e.struct("TransactionMetaV1",[["txChanges",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)]]),e.struct("TransactionMetaV2",[["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")]]),e.enum("ContractEventType",{system:0,contract:1,diagnostic:2}),e.struct("ContractEventV0",[["topics",e.varArray(e.lookup("ScVal"),2147483647)],["data",e.lookup("ScVal")]]),e.union("ContractEventBody",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ContractEventV0")}}),e.struct("ContractEvent",[["ext",e.lookup("ExtensionPoint")],["contractId",e.option(e.lookup("Hash"))],["type",e.lookup("ContractEventType")],["body",e.lookup("ContractEventBody")]]),e.struct("DiagnosticEvent",[["inSuccessfulContractCall",e.bool()],["event",e.lookup("ContractEvent")]]),e.struct("SorobanTransactionMeta",[["ext",e.lookup("ExtensionPoint")],["events",e.varArray(e.lookup("ContractEvent"),2147483647)],["returnValue",e.lookup("ScVal")],["diagnosticEvents",e.varArray(e.lookup("DiagnosticEvent"),2147483647)]]),e.struct("TransactionMetaV3",[["ext",e.lookup("ExtensionPoint")],["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")],["sorobanMeta",e.option(e.lookup("SorobanTransactionMeta"))]]),e.struct("InvokeHostFunctionSuccessPreImage",[["returnValue",e.lookup("ScVal")],["events",e.varArray(e.lookup("ContractEvent"),2147483647)]]),e.union("TransactionMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"],[3,"v3"]],arms:{operations:e.varArray(e.lookup("OperationMeta"),2147483647),v1:e.lookup("TransactionMetaV1"),v2:e.lookup("TransactionMetaV2"),v3:e.lookup("TransactionMetaV3")}}),e.struct("TransactionResultMeta",[["result",e.lookup("TransactionResultPair")],["feeProcessing",e.lookup("LedgerEntryChanges")],["txApplyProcessing",e.lookup("TransactionMeta")]]),e.struct("UpgradeEntryMeta",[["upgrade",e.lookup("LedgerUpgrade")],["changes",e.lookup("LedgerEntryChanges")]]),e.struct("LedgerCloseMetaV0",[["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("TransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)]]),e.struct("LedgerCloseMetaV1",[["ext",e.lookup("ExtensionPoint")],["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("GeneralizedTransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)],["totalByteSizeOfBucketList",e.lookup("Uint64")],["evictedTemporaryLedgerKeys",e.varArray(e.lookup("LedgerKey"),2147483647)],["evictedPersistentLedgerEntries",e.varArray(e.lookup("LedgerEntry"),2147483647)]]),e.union("LedgerCloseMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"],[1,"v1"]],arms:{v0:e.lookup("LedgerCloseMetaV0"),v1:e.lookup("LedgerCloseMetaV1")}}),e.enum("ErrorCode",{errMisc:0,errData:1,errConf:2,errAuth:3,errLoad:4}),e.struct("Error",[["code",e.lookup("ErrorCode")],["msg",e.string(100)]]),e.struct("SendMore",[["numMessages",e.lookup("Uint32")]]),e.struct("SendMoreExtended",[["numMessages",e.lookup("Uint32")],["numBytes",e.lookup("Uint32")]]),e.struct("AuthCert",[["pubkey",e.lookup("Curve25519Public")],["expiration",e.lookup("Uint64")],["sig",e.lookup("Signature")]]),e.struct("Hello",[["ledgerVersion",e.lookup("Uint32")],["overlayVersion",e.lookup("Uint32")],["overlayMinVersion",e.lookup("Uint32")],["networkId",e.lookup("Hash")],["versionStr",e.string(100)],["listeningPort",e.int()],["peerId",e.lookup("NodeId")],["cert",e.lookup("AuthCert")],["nonce",e.lookup("Uint256")]]),e.const("AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED",200),e.struct("Auth",[["flags",e.int()]]),e.enum("IpAddrType",{iPv4:0,iPv6:1}),e.union("PeerAddressIp",{switchOn:e.lookup("IpAddrType"),switchName:"type",switches:[["iPv4","ipv4"],["iPv6","ipv6"]],arms:{ipv4:e.opaque(4),ipv6:e.opaque(16)}}),e.struct("PeerAddress",[["ip",e.lookup("PeerAddressIp")],["port",e.lookup("Uint32")],["numFailures",e.lookup("Uint32")]]),e.enum("MessageType",{errorMsg:0,auth:2,dontHave:3,getPeers:4,peers:5,getTxSet:6,txSet:7,generalizedTxSet:17,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13,surveyRequest:14,surveyResponse:15,sendMore:16,sendMoreExtended:20,floodAdvert:18,floodDemand:19}),e.struct("DontHave",[["type",e.lookup("MessageType")],["reqHash",e.lookup("Uint256")]]),e.enum("SurveyMessageCommandType",{surveyTopology:0}),e.enum("SurveyMessageResponseType",{surveyTopologyResponseV0:0,surveyTopologyResponseV1:1}),e.struct("SurveyRequestMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["encryptionKey",e.lookup("Curve25519Public")],["commandType",e.lookup("SurveyMessageCommandType")]]),e.struct("SignedSurveyRequestMessage",[["requestSignature",e.lookup("Signature")],["request",e.lookup("SurveyRequestMessage")]]),e.typedef("EncryptedBody",e.varOpaque(64e3)),e.struct("SurveyResponseMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["commandType",e.lookup("SurveyMessageCommandType")],["encryptedBody",e.lookup("EncryptedBody")]]),e.struct("SignedSurveyResponseMessage",[["responseSignature",e.lookup("Signature")],["response",e.lookup("SurveyResponseMessage")]]),e.struct("PeerStats",[["id",e.lookup("NodeId")],["versionStr",e.string(100)],["messagesRead",e.lookup("Uint64")],["messagesWritten",e.lookup("Uint64")],["bytesRead",e.lookup("Uint64")],["bytesWritten",e.lookup("Uint64")],["secondsConnected",e.lookup("Uint64")],["uniqueFloodBytesRecv",e.lookup("Uint64")],["duplicateFloodBytesRecv",e.lookup("Uint64")],["uniqueFetchBytesRecv",e.lookup("Uint64")],["duplicateFetchBytesRecv",e.lookup("Uint64")],["uniqueFloodMessageRecv",e.lookup("Uint64")],["duplicateFloodMessageRecv",e.lookup("Uint64")],["uniqueFetchMessageRecv",e.lookup("Uint64")],["duplicateFetchMessageRecv",e.lookup("Uint64")]]),e.typedef("PeerStatList",e.varArray(e.lookup("PeerStats"),25)),e.struct("TopologyResponseBodyV0",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")]]),e.struct("TopologyResponseBodyV1",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")],["maxInboundPeerCount",e.lookup("Uint32")],["maxOutboundPeerCount",e.lookup("Uint32")]]),e.union("SurveyResponseBody",{switchOn:e.lookup("SurveyMessageResponseType"),switchName:"type",switches:[["surveyTopologyResponseV0","topologyResponseBodyV0"],["surveyTopologyResponseV1","topologyResponseBodyV1"]],arms:{topologyResponseBodyV0:e.lookup("TopologyResponseBodyV0"),topologyResponseBodyV1:e.lookup("TopologyResponseBodyV1")}}),e.const("TX_ADVERT_VECTOR_MAX_SIZE",1e3),e.typedef("TxAdvertVector",e.varArray(e.lookup("Hash"),e.lookup("TX_ADVERT_VECTOR_MAX_SIZE"))),e.struct("FloodAdvert",[["txHashes",e.lookup("TxAdvertVector")]]),e.const("TX_DEMAND_VECTOR_MAX_SIZE",1e3),e.typedef("TxDemandVector",e.varArray(e.lookup("Hash"),e.lookup("TX_DEMAND_VECTOR_MAX_SIZE"))),e.struct("FloodDemand",[["txHashes",e.lookup("TxDemandVector")]]),e.union("StellarMessage",{switchOn:e.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["getPeers",e.void()],["peers","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["generalizedTxSet","generalizedTxSet"],["transaction","transaction"],["surveyRequest","signedSurveyRequestMessage"],["surveyResponse","signedSurveyResponseMessage"],["getScpQuorumset","qSetHash"],["scpQuorumset","qSet"],["scpMessage","envelope"],["getScpState","getScpLedgerSeq"],["sendMore","sendMoreMessage"],["sendMoreExtended","sendMoreExtendedMessage"],["floodAdvert","floodAdvert"],["floodDemand","floodDemand"]],arms:{error:e.lookup("Error"),hello:e.lookup("Hello"),auth:e.lookup("Auth"),dontHave:e.lookup("DontHave"),peers:e.varArray(e.lookup("PeerAddress"),100),txSetHash:e.lookup("Uint256"),txSet:e.lookup("TransactionSet"),generalizedTxSet:e.lookup("GeneralizedTransactionSet"),transaction:e.lookup("TransactionEnvelope"),signedSurveyRequestMessage:e.lookup("SignedSurveyRequestMessage"),signedSurveyResponseMessage:e.lookup("SignedSurveyResponseMessage"),qSetHash:e.lookup("Uint256"),qSet:e.lookup("ScpQuorumSet"),envelope:e.lookup("ScpEnvelope"),getScpLedgerSeq:e.lookup("Uint32"),sendMoreMessage:e.lookup("SendMore"),sendMoreExtendedMessage:e.lookup("SendMoreExtended"),floodAdvert:e.lookup("FloodAdvert"),floodDemand:e.lookup("FloodDemand")}}),e.struct("AuthenticatedMessageV0",[["sequence",e.lookup("Uint64")],["message",e.lookup("StellarMessage")],["mac",e.lookup("HmacSha256Mac")]]),e.union("AuthenticatedMessage",{switchOn:e.lookup("Uint32"),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("AuthenticatedMessageV0")}}),e.const("MAX_OPS_PER_TX",100),e.union("LiquidityPoolParameters",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolConstantProductParameters")}}),e.struct("MuxedAccountMed25519",[["id",e.lookup("Uint64")],["ed25519",e.lookup("Uint256")]]),e.union("MuxedAccount",{switchOn:e.lookup("CryptoKeyType"),switchName:"type",switches:[["keyTypeEd25519","ed25519"],["keyTypeMuxedEd25519","med25519"]],arms:{ed25519:e.lookup("Uint256"),med25519:e.lookup("MuxedAccountMed25519")}}),e.struct("DecoratedSignature",[["hint",e.lookup("SignatureHint")],["signature",e.lookup("Signature")]]),e.enum("OperationType",{createAccount:0,payment:1,pathPaymentStrictReceive:2,manageSellOffer:3,createPassiveSellOffer:4,setOptions:5,changeTrust:6,allowTrust:7,accountMerge:8,inflation:9,manageData:10,bumpSequence:11,manageBuyOffer:12,pathPaymentStrictSend:13,createClaimableBalance:14,claimClaimableBalance:15,beginSponsoringFutureReserves:16,endSponsoringFutureReserves:17,revokeSponsorship:18,clawback:19,clawbackClaimableBalance:20,setTrustLineFlags:21,liquidityPoolDeposit:22,liquidityPoolWithdraw:23,invokeHostFunction:24,extendFootprintTtl:25,restoreFootprint:26}),e.struct("CreateAccountOp",[["destination",e.lookup("AccountId")],["startingBalance",e.lookup("Int64")]]),e.struct("PaymentOp",[["destination",e.lookup("MuxedAccount")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveOp",[["sendAsset",e.lookup("Asset")],["sendMax",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destAmount",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("PathPaymentStrictSendOp",[["sendAsset",e.lookup("Asset")],["sendAmount",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destMin",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("ManageSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("ManageBuyOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["buyAmount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("CreatePassiveSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")]]),e.struct("SetOptionsOp",[["inflationDest",e.option(e.lookup("AccountId"))],["clearFlags",e.option(e.lookup("Uint32"))],["setFlags",e.option(e.lookup("Uint32"))],["masterWeight",e.option(e.lookup("Uint32"))],["lowThreshold",e.option(e.lookup("Uint32"))],["medThreshold",e.option(e.lookup("Uint32"))],["highThreshold",e.option(e.lookup("Uint32"))],["homeDomain",e.option(e.lookup("String32"))],["signer",e.option(e.lookup("Signer"))]]),e.union("ChangeTrustAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPool"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPool:e.lookup("LiquidityPoolParameters")}}),e.struct("ChangeTrustOp",[["line",e.lookup("ChangeTrustAsset")],["limit",e.lookup("Int64")]]),e.struct("AllowTrustOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("AssetCode")],["authorize",e.lookup("Uint32")]]),e.struct("ManageDataOp",[["dataName",e.lookup("String64")],["dataValue",e.option(e.lookup("DataValue"))]]),e.struct("BumpSequenceOp",[["bumpTo",e.lookup("SequenceNumber")]]),e.struct("CreateClaimableBalanceOp",[["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["claimants",e.varArray(e.lookup("Claimant"),10)]]),e.struct("ClaimClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("BeginSponsoringFutureReservesOp",[["sponsoredId",e.lookup("AccountId")]]),e.enum("RevokeSponsorshipType",{revokeSponsorshipLedgerEntry:0,revokeSponsorshipSigner:1}),e.struct("RevokeSponsorshipOpSigner",[["accountId",e.lookup("AccountId")],["signerKey",e.lookup("SignerKey")]]),e.union("RevokeSponsorshipOp",{switchOn:e.lookup("RevokeSponsorshipType"),switchName:"type",switches:[["revokeSponsorshipLedgerEntry","ledgerKey"],["revokeSponsorshipSigner","signer"]],arms:{ledgerKey:e.lookup("LedgerKey"),signer:e.lookup("RevokeSponsorshipOpSigner")}}),e.struct("ClawbackOp",[["asset",e.lookup("Asset")],["from",e.lookup("MuxedAccount")],["amount",e.lookup("Int64")]]),e.struct("ClawbackClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("SetTrustLineFlagsOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("Asset")],["clearFlags",e.lookup("Uint32")],["setFlags",e.lookup("Uint32")]]),e.const("LIQUIDITY_POOL_FEE_V18",30),e.struct("LiquidityPoolDepositOp",[["liquidityPoolId",e.lookup("PoolId")],["maxAmountA",e.lookup("Int64")],["maxAmountB",e.lookup("Int64")],["minPrice",e.lookup("Price")],["maxPrice",e.lookup("Price")]]),e.struct("LiquidityPoolWithdrawOp",[["liquidityPoolId",e.lookup("PoolId")],["amount",e.lookup("Int64")],["minAmountA",e.lookup("Int64")],["minAmountB",e.lookup("Int64")]]),e.enum("HostFunctionType",{hostFunctionTypeInvokeContract:0,hostFunctionTypeCreateContract:1,hostFunctionTypeUploadContractWasm:2}),e.enum("ContractIdPreimageType",{contractIdPreimageFromAddress:0,contractIdPreimageFromAsset:1}),e.struct("ContractIdPreimageFromAddress",[["address",e.lookup("ScAddress")],["salt",e.lookup("Uint256")]]),e.union("ContractIdPreimage",{switchOn:e.lookup("ContractIdPreimageType"),switchName:"type",switches:[["contractIdPreimageFromAddress","fromAddress"],["contractIdPreimageFromAsset","fromAsset"]],arms:{fromAddress:e.lookup("ContractIdPreimageFromAddress"),fromAsset:e.lookup("Asset")}}),e.struct("CreateContractArgs",[["contractIdPreimage",e.lookup("ContractIdPreimage")],["executable",e.lookup("ContractExecutable")]]),e.struct("InvokeContractArgs",[["contractAddress",e.lookup("ScAddress")],["functionName",e.lookup("ScSymbol")],["args",e.varArray(e.lookup("ScVal"),2147483647)]]),e.union("HostFunction",{switchOn:e.lookup("HostFunctionType"),switchName:"type",switches:[["hostFunctionTypeInvokeContract","invokeContract"],["hostFunctionTypeCreateContract","createContract"],["hostFunctionTypeUploadContractWasm","wasm"]],arms:{invokeContract:e.lookup("InvokeContractArgs"),createContract:e.lookup("CreateContractArgs"),wasm:e.varOpaque()}}),e.enum("SorobanAuthorizedFunctionType",{sorobanAuthorizedFunctionTypeContractFn:0,sorobanAuthorizedFunctionTypeCreateContractHostFn:1}),e.union("SorobanAuthorizedFunction",{switchOn:e.lookup("SorobanAuthorizedFunctionType"),switchName:"type",switches:[["sorobanAuthorizedFunctionTypeContractFn","contractFn"],["sorobanAuthorizedFunctionTypeCreateContractHostFn","createContractHostFn"]],arms:{contractFn:e.lookup("InvokeContractArgs"),createContractHostFn:e.lookup("CreateContractArgs")}}),e.struct("SorobanAuthorizedInvocation",[["function",e.lookup("SorobanAuthorizedFunction")],["subInvocations",e.varArray(e.lookup("SorobanAuthorizedInvocation"),2147483647)]]),e.struct("SorobanAddressCredentials",[["address",e.lookup("ScAddress")],["nonce",e.lookup("Int64")],["signatureExpirationLedger",e.lookup("Uint32")],["signature",e.lookup("ScVal")]]),e.enum("SorobanCredentialsType",{sorobanCredentialsSourceAccount:0,sorobanCredentialsAddress:1}),e.union("SorobanCredentials",{switchOn:e.lookup("SorobanCredentialsType"),switchName:"type",switches:[["sorobanCredentialsSourceAccount",e.void()],["sorobanCredentialsAddress","address"]],arms:{address:e.lookup("SorobanAddressCredentials")}}),e.struct("SorobanAuthorizationEntry",[["credentials",e.lookup("SorobanCredentials")],["rootInvocation",e.lookup("SorobanAuthorizedInvocation")]]),e.struct("InvokeHostFunctionOp",[["hostFunction",e.lookup("HostFunction")],["auth",e.varArray(e.lookup("SorobanAuthorizationEntry"),2147483647)]]),e.struct("ExtendFootprintTtlOp",[["ext",e.lookup("ExtensionPoint")],["extendTo",e.lookup("Uint32")]]),e.struct("RestoreFootprintOp",[["ext",e.lookup("ExtensionPoint")]]),e.union("OperationBody",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPaymentStrictReceive","pathPaymentStrictReceiveOp"],["manageSellOffer","manageSellOfferOp"],["createPassiveSellOffer","createPassiveSellOfferOp"],["setOptions","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",e.void()],["manageData","manageDataOp"],["bumpSequence","bumpSequenceOp"],["manageBuyOffer","manageBuyOfferOp"],["pathPaymentStrictSend","pathPaymentStrictSendOp"],["createClaimableBalance","createClaimableBalanceOp"],["claimClaimableBalance","claimClaimableBalanceOp"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesOp"],["endSponsoringFutureReserves",e.void()],["revokeSponsorship","revokeSponsorshipOp"],["clawback","clawbackOp"],["clawbackClaimableBalance","clawbackClaimableBalanceOp"],["setTrustLineFlags","setTrustLineFlagsOp"],["liquidityPoolDeposit","liquidityPoolDepositOp"],["liquidityPoolWithdraw","liquidityPoolWithdrawOp"],["invokeHostFunction","invokeHostFunctionOp"],["extendFootprintTtl","extendFootprintTtlOp"],["restoreFootprint","restoreFootprintOp"]],arms:{createAccountOp:e.lookup("CreateAccountOp"),paymentOp:e.lookup("PaymentOp"),pathPaymentStrictReceiveOp:e.lookup("PathPaymentStrictReceiveOp"),manageSellOfferOp:e.lookup("ManageSellOfferOp"),createPassiveSellOfferOp:e.lookup("CreatePassiveSellOfferOp"),setOptionsOp:e.lookup("SetOptionsOp"),changeTrustOp:e.lookup("ChangeTrustOp"),allowTrustOp:e.lookup("AllowTrustOp"),destination:e.lookup("MuxedAccount"),manageDataOp:e.lookup("ManageDataOp"),bumpSequenceOp:e.lookup("BumpSequenceOp"),manageBuyOfferOp:e.lookup("ManageBuyOfferOp"),pathPaymentStrictSendOp:e.lookup("PathPaymentStrictSendOp"),createClaimableBalanceOp:e.lookup("CreateClaimableBalanceOp"),claimClaimableBalanceOp:e.lookup("ClaimClaimableBalanceOp"),beginSponsoringFutureReservesOp:e.lookup("BeginSponsoringFutureReservesOp"),revokeSponsorshipOp:e.lookup("RevokeSponsorshipOp"),clawbackOp:e.lookup("ClawbackOp"),clawbackClaimableBalanceOp:e.lookup("ClawbackClaimableBalanceOp"),setTrustLineFlagsOp:e.lookup("SetTrustLineFlagsOp"),liquidityPoolDepositOp:e.lookup("LiquidityPoolDepositOp"),liquidityPoolWithdrawOp:e.lookup("LiquidityPoolWithdrawOp"),invokeHostFunctionOp:e.lookup("InvokeHostFunctionOp"),extendFootprintTtlOp:e.lookup("ExtendFootprintTtlOp"),restoreFootprintOp:e.lookup("RestoreFootprintOp")}}),e.struct("Operation",[["sourceAccount",e.option(e.lookup("MuxedAccount"))],["body",e.lookup("OperationBody")]]),e.struct("HashIdPreimageOperationId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")]]),e.struct("HashIdPreimageRevokeId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")],["liquidityPoolId",e.lookup("PoolId")],["asset",e.lookup("Asset")]]),e.struct("HashIdPreimageContractId",[["networkId",e.lookup("Hash")],["contractIdPreimage",e.lookup("ContractIdPreimage")]]),e.struct("HashIdPreimageSorobanAuthorization",[["networkId",e.lookup("Hash")],["nonce",e.lookup("Int64")],["signatureExpirationLedger",e.lookup("Uint32")],["invocation",e.lookup("SorobanAuthorizedInvocation")]]),e.union("HashIdPreimage",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeOpId","operationId"],["envelopeTypePoolRevokeOpId","revokeId"],["envelopeTypeContractId","contractId"],["envelopeTypeSorobanAuthorization","sorobanAuthorization"]],arms:{operationId:e.lookup("HashIdPreimageOperationId"),revokeId:e.lookup("HashIdPreimageRevokeId"),contractId:e.lookup("HashIdPreimageContractId"),sorobanAuthorization:e.lookup("HashIdPreimageSorobanAuthorization")}}),e.enum("MemoType",{memoNone:0,memoText:1,memoId:2,memoHash:3,memoReturn:4}),e.union("Memo",{switchOn:e.lookup("MemoType"),switchName:"type",switches:[["memoNone",e.void()],["memoText","text"],["memoId","id"],["memoHash","hash"],["memoReturn","retHash"]],arms:{text:e.string(28),id:e.lookup("Uint64"),hash:e.lookup("Hash"),retHash:e.lookup("Hash")}}),e.struct("TimeBounds",[["minTime",e.lookup("TimePoint")],["maxTime",e.lookup("TimePoint")]]),e.struct("LedgerBounds",[["minLedger",e.lookup("Uint32")],["maxLedger",e.lookup("Uint32")]]),e.struct("PreconditionsV2",[["timeBounds",e.option(e.lookup("TimeBounds"))],["ledgerBounds",e.option(e.lookup("LedgerBounds"))],["minSeqNum",e.option(e.lookup("SequenceNumber"))],["minSeqAge",e.lookup("Duration")],["minSeqLedgerGap",e.lookup("Uint32")],["extraSigners",e.varArray(e.lookup("SignerKey"),2)]]),e.enum("PreconditionType",{precondNone:0,precondTime:1,precondV2:2}),e.union("Preconditions",{switchOn:e.lookup("PreconditionType"),switchName:"type",switches:[["precondNone",e.void()],["precondTime","timeBounds"],["precondV2","v2"]],arms:{timeBounds:e.lookup("TimeBounds"),v2:e.lookup("PreconditionsV2")}}),e.struct("LedgerFootprint",[["readOnly",e.varArray(e.lookup("LedgerKey"),2147483647)],["readWrite",e.varArray(e.lookup("LedgerKey"),2147483647)]]),e.struct("SorobanResources",[["footprint",e.lookup("LedgerFootprint")],["instructions",e.lookup("Uint32")],["readBytes",e.lookup("Uint32")],["writeBytes",e.lookup("Uint32")]]),e.struct("SorobanTransactionData",[["ext",e.lookup("ExtensionPoint")],["resources",e.lookup("SorobanResources")],["resourceFee",e.lookup("Int64")]]),e.union("TransactionV0Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionV0",[["sourceAccountEd25519",e.lookup("Uint256")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["timeBounds",e.option(e.lookup("TimeBounds"))],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionV0Ext")]]),e.struct("TransactionV0Envelope",[["tx",e.lookup("TransactionV0")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"sorobanData"]],arms:{sorobanData:e.lookup("SorobanTransactionData")}}),e.struct("Transaction",[["sourceAccount",e.lookup("MuxedAccount")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["cond",e.lookup("Preconditions")],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionExt")]]),e.struct("TransactionV1Envelope",[["tx",e.lookup("Transaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("FeeBumpTransactionInnerTx",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","v1"]],arms:{v1:e.lookup("TransactionV1Envelope")}}),e.union("FeeBumpTransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("FeeBumpTransaction",[["feeSource",e.lookup("MuxedAccount")],["fee",e.lookup("Int64")],["innerTx",e.lookup("FeeBumpTransactionInnerTx")],["ext",e.lookup("FeeBumpTransactionExt")]]),e.struct("FeeBumpTransactionEnvelope",[["tx",e.lookup("FeeBumpTransaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionEnvelope",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTxV0","v0"],["envelopeTypeTx","v1"],["envelopeTypeTxFeeBump","feeBump"]],arms:{v0:e.lookup("TransactionV0Envelope"),v1:e.lookup("TransactionV1Envelope"),feeBump:e.lookup("FeeBumpTransactionEnvelope")}}),e.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"],["envelopeTypeTxFeeBump","feeBump"]],arms:{tx:e.lookup("Transaction"),feeBump:e.lookup("FeeBumpTransaction")}}),e.struct("TransactionSignaturePayload",[["networkId",e.lookup("Hash")],["taggedTransaction",e.lookup("TransactionSignaturePayloadTaggedTransaction")]]),e.enum("ClaimAtomType",{claimAtomTypeV0:0,claimAtomTypeOrderBook:1,claimAtomTypeLiquidityPool:2}),e.struct("ClaimOfferAtomV0",[["sellerEd25519",e.lookup("Uint256")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimOfferAtom",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimLiquidityAtom",[["liquidityPoolId",e.lookup("PoolId")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.union("ClaimAtom",{switchOn:e.lookup("ClaimAtomType"),switchName:"type",switches:[["claimAtomTypeV0","v0"],["claimAtomTypeOrderBook","orderBook"],["claimAtomTypeLiquidityPool","liquidityPool"]],arms:{v0:e.lookup("ClaimOfferAtomV0"),orderBook:e.lookup("ClaimOfferAtom"),liquidityPool:e.lookup("ClaimLiquidityAtom")}}),e.enum("CreateAccountResultCode",{createAccountSuccess:0,createAccountMalformed:-1,createAccountUnderfunded:-2,createAccountLowReserve:-3,createAccountAlreadyExist:-4}),e.union("CreateAccountResult",{switchOn:e.lookup("CreateAccountResultCode"),switchName:"code",switches:[["createAccountSuccess",e.void()],["createAccountMalformed",e.void()],["createAccountUnderfunded",e.void()],["createAccountLowReserve",e.void()],["createAccountAlreadyExist",e.void()]],arms:{}}),e.enum("PaymentResultCode",{paymentSuccess:0,paymentMalformed:-1,paymentUnderfunded:-2,paymentSrcNoTrust:-3,paymentSrcNotAuthorized:-4,paymentNoDestination:-5,paymentNoTrust:-6,paymentNotAuthorized:-7,paymentLineFull:-8,paymentNoIssuer:-9}),e.union("PaymentResult",{switchOn:e.lookup("PaymentResultCode"),switchName:"code",switches:[["paymentSuccess",e.void()],["paymentMalformed",e.void()],["paymentUnderfunded",e.void()],["paymentSrcNoTrust",e.void()],["paymentSrcNotAuthorized",e.void()],["paymentNoDestination",e.void()],["paymentNoTrust",e.void()],["paymentNotAuthorized",e.void()],["paymentLineFull",e.void()],["paymentNoIssuer",e.void()]],arms:{}}),e.enum("PathPaymentStrictReceiveResultCode",{pathPaymentStrictReceiveSuccess:0,pathPaymentStrictReceiveMalformed:-1,pathPaymentStrictReceiveUnderfunded:-2,pathPaymentStrictReceiveSrcNoTrust:-3,pathPaymentStrictReceiveSrcNotAuthorized:-4,pathPaymentStrictReceiveNoDestination:-5,pathPaymentStrictReceiveNoTrust:-6,pathPaymentStrictReceiveNotAuthorized:-7,pathPaymentStrictReceiveLineFull:-8,pathPaymentStrictReceiveNoIssuer:-9,pathPaymentStrictReceiveTooFewOffers:-10,pathPaymentStrictReceiveOfferCrossSelf:-11,pathPaymentStrictReceiveOverSendmax:-12}),e.struct("SimplePaymentResult",[["destination",e.lookup("AccountId")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictReceiveResult",{switchOn:e.lookup("PathPaymentStrictReceiveResultCode"),switchName:"code",switches:[["pathPaymentStrictReceiveSuccess","success"],["pathPaymentStrictReceiveMalformed",e.void()],["pathPaymentStrictReceiveUnderfunded",e.void()],["pathPaymentStrictReceiveSrcNoTrust",e.void()],["pathPaymentStrictReceiveSrcNotAuthorized",e.void()],["pathPaymentStrictReceiveNoDestination",e.void()],["pathPaymentStrictReceiveNoTrust",e.void()],["pathPaymentStrictReceiveNotAuthorized",e.void()],["pathPaymentStrictReceiveLineFull",e.void()],["pathPaymentStrictReceiveNoIssuer","noIssuer"],["pathPaymentStrictReceiveTooFewOffers",e.void()],["pathPaymentStrictReceiveOfferCrossSelf",e.void()],["pathPaymentStrictReceiveOverSendmax",e.void()]],arms:{success:e.lookup("PathPaymentStrictReceiveResultSuccess"),noIssuer:e.lookup("Asset")}}),e.enum("PathPaymentStrictSendResultCode",{pathPaymentStrictSendSuccess:0,pathPaymentStrictSendMalformed:-1,pathPaymentStrictSendUnderfunded:-2,pathPaymentStrictSendSrcNoTrust:-3,pathPaymentStrictSendSrcNotAuthorized:-4,pathPaymentStrictSendNoDestination:-5,pathPaymentStrictSendNoTrust:-6,pathPaymentStrictSendNotAuthorized:-7,pathPaymentStrictSendLineFull:-8,pathPaymentStrictSendNoIssuer:-9,pathPaymentStrictSendTooFewOffers:-10,pathPaymentStrictSendOfferCrossSelf:-11,pathPaymentStrictSendUnderDestmin:-12}),e.struct("PathPaymentStrictSendResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictSendResult",{switchOn:e.lookup("PathPaymentStrictSendResultCode"),switchName:"code",switches:[["pathPaymentStrictSendSuccess","success"],["pathPaymentStrictSendMalformed",e.void()],["pathPaymentStrictSendUnderfunded",e.void()],["pathPaymentStrictSendSrcNoTrust",e.void()],["pathPaymentStrictSendSrcNotAuthorized",e.void()],["pathPaymentStrictSendNoDestination",e.void()],["pathPaymentStrictSendNoTrust",e.void()],["pathPaymentStrictSendNotAuthorized",e.void()],["pathPaymentStrictSendLineFull",e.void()],["pathPaymentStrictSendNoIssuer","noIssuer"],["pathPaymentStrictSendTooFewOffers",e.void()],["pathPaymentStrictSendOfferCrossSelf",e.void()],["pathPaymentStrictSendUnderDestmin",e.void()]],arms:{success:e.lookup("PathPaymentStrictSendResultSuccess"),noIssuer:e.lookup("Asset")}}),e.enum("ManageSellOfferResultCode",{manageSellOfferSuccess:0,manageSellOfferMalformed:-1,manageSellOfferSellNoTrust:-2,manageSellOfferBuyNoTrust:-3,manageSellOfferSellNotAuthorized:-4,manageSellOfferBuyNotAuthorized:-5,manageSellOfferLineFull:-6,manageSellOfferUnderfunded:-7,manageSellOfferCrossSelf:-8,manageSellOfferSellNoIssuer:-9,manageSellOfferBuyNoIssuer:-10,manageSellOfferNotFound:-11,manageSellOfferLowReserve:-12}),e.enum("ManageOfferEffect",{manageOfferCreated:0,manageOfferUpdated:1,manageOfferDeleted:2}),e.union("ManageOfferSuccessResultOffer",{switchOn:e.lookup("ManageOfferEffect"),switchName:"effect",switches:[["manageOfferCreated","offer"],["manageOfferUpdated","offer"],["manageOfferDeleted",e.void()]],arms:{offer:e.lookup("OfferEntry")}}),e.struct("ManageOfferSuccessResult",[["offersClaimed",e.varArray(e.lookup("ClaimAtom"),2147483647)],["offer",e.lookup("ManageOfferSuccessResultOffer")]]),e.union("ManageSellOfferResult",{switchOn:e.lookup("ManageSellOfferResultCode"),switchName:"code",switches:[["manageSellOfferSuccess","success"],["manageSellOfferMalformed",e.void()],["manageSellOfferSellNoTrust",e.void()],["manageSellOfferBuyNoTrust",e.void()],["manageSellOfferSellNotAuthorized",e.void()],["manageSellOfferBuyNotAuthorized",e.void()],["manageSellOfferLineFull",e.void()],["manageSellOfferUnderfunded",e.void()],["manageSellOfferCrossSelf",e.void()],["manageSellOfferSellNoIssuer",e.void()],["manageSellOfferBuyNoIssuer",e.void()],["manageSellOfferNotFound",e.void()],["manageSellOfferLowReserve",e.void()]],arms:{success:e.lookup("ManageOfferSuccessResult")}}),e.enum("ManageBuyOfferResultCode",{manageBuyOfferSuccess:0,manageBuyOfferMalformed:-1,manageBuyOfferSellNoTrust:-2,manageBuyOfferBuyNoTrust:-3,manageBuyOfferSellNotAuthorized:-4,manageBuyOfferBuyNotAuthorized:-5,manageBuyOfferLineFull:-6,manageBuyOfferUnderfunded:-7,manageBuyOfferCrossSelf:-8,manageBuyOfferSellNoIssuer:-9,manageBuyOfferBuyNoIssuer:-10,manageBuyOfferNotFound:-11,manageBuyOfferLowReserve:-12}),e.union("ManageBuyOfferResult",{switchOn:e.lookup("ManageBuyOfferResultCode"),switchName:"code",switches:[["manageBuyOfferSuccess","success"],["manageBuyOfferMalformed",e.void()],["manageBuyOfferSellNoTrust",e.void()],["manageBuyOfferBuyNoTrust",e.void()],["manageBuyOfferSellNotAuthorized",e.void()],["manageBuyOfferBuyNotAuthorized",e.void()],["manageBuyOfferLineFull",e.void()],["manageBuyOfferUnderfunded",e.void()],["manageBuyOfferCrossSelf",e.void()],["manageBuyOfferSellNoIssuer",e.void()],["manageBuyOfferBuyNoIssuer",e.void()],["manageBuyOfferNotFound",e.void()],["manageBuyOfferLowReserve",e.void()]],arms:{success:e.lookup("ManageOfferSuccessResult")}}),e.enum("SetOptionsResultCode",{setOptionsSuccess:0,setOptionsLowReserve:-1,setOptionsTooManySigners:-2,setOptionsBadFlags:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9,setOptionsAuthRevocableRequired:-10}),e.union("SetOptionsResult",{switchOn:e.lookup("SetOptionsResultCode"),switchName:"code",switches:[["setOptionsSuccess",e.void()],["setOptionsLowReserve",e.void()],["setOptionsTooManySigners",e.void()],["setOptionsBadFlags",e.void()],["setOptionsInvalidInflation",e.void()],["setOptionsCantChange",e.void()],["setOptionsUnknownFlag",e.void()],["setOptionsThresholdOutOfRange",e.void()],["setOptionsBadSigner",e.void()],["setOptionsInvalidHomeDomain",e.void()],["setOptionsAuthRevocableRequired",e.void()]],arms:{}}),e.enum("ChangeTrustResultCode",{changeTrustSuccess:0,changeTrustMalformed:-1,changeTrustNoIssuer:-2,changeTrustInvalidLimit:-3,changeTrustLowReserve:-4,changeTrustSelfNotAllowed:-5,changeTrustTrustLineMissing:-6,changeTrustCannotDelete:-7,changeTrustNotAuthMaintainLiabilities:-8}),e.union("ChangeTrustResult",{switchOn:e.lookup("ChangeTrustResultCode"),switchName:"code",switches:[["changeTrustSuccess",e.void()],["changeTrustMalformed",e.void()],["changeTrustNoIssuer",e.void()],["changeTrustInvalidLimit",e.void()],["changeTrustLowReserve",e.void()],["changeTrustSelfNotAllowed",e.void()],["changeTrustTrustLineMissing",e.void()],["changeTrustCannotDelete",e.void()],["changeTrustNotAuthMaintainLiabilities",e.void()]],arms:{}}),e.enum("AllowTrustResultCode",{allowTrustSuccess:0,allowTrustMalformed:-1,allowTrustNoTrustLine:-2,allowTrustTrustNotRequired:-3,allowTrustCantRevoke:-4,allowTrustSelfNotAllowed:-5,allowTrustLowReserve:-6}),e.union("AllowTrustResult",{switchOn:e.lookup("AllowTrustResultCode"),switchName:"code",switches:[["allowTrustSuccess",e.void()],["allowTrustMalformed",e.void()],["allowTrustNoTrustLine",e.void()],["allowTrustTrustNotRequired",e.void()],["allowTrustCantRevoke",e.void()],["allowTrustSelfNotAllowed",e.void()],["allowTrustLowReserve",e.void()]],arms:{}}),e.enum("AccountMergeResultCode",{accountMergeSuccess:0,accountMergeMalformed:-1,accountMergeNoAccount:-2,accountMergeImmutableSet:-3,accountMergeHasSubEntries:-4,accountMergeSeqnumTooFar:-5,accountMergeDestFull:-6,accountMergeIsSponsor:-7}),e.union("AccountMergeResult",{switchOn:e.lookup("AccountMergeResultCode"),switchName:"code",switches:[["accountMergeSuccess","sourceAccountBalance"],["accountMergeMalformed",e.void()],["accountMergeNoAccount",e.void()],["accountMergeImmutableSet",e.void()],["accountMergeHasSubEntries",e.void()],["accountMergeSeqnumTooFar",e.void()],["accountMergeDestFull",e.void()],["accountMergeIsSponsor",e.void()]],arms:{sourceAccountBalance:e.lookup("Int64")}}),e.enum("InflationResultCode",{inflationSuccess:0,inflationNotTime:-1}),e.struct("InflationPayout",[["destination",e.lookup("AccountId")],["amount",e.lookup("Int64")]]),e.union("InflationResult",{switchOn:e.lookup("InflationResultCode"),switchName:"code",switches:[["inflationSuccess","payouts"],["inflationNotTime",e.void()]],arms:{payouts:e.varArray(e.lookup("InflationPayout"),2147483647)}}),e.enum("ManageDataResultCode",{manageDataSuccess:0,manageDataNotSupportedYet:-1,manageDataNameNotFound:-2,manageDataLowReserve:-3,manageDataInvalidName:-4}),e.union("ManageDataResult",{switchOn:e.lookup("ManageDataResultCode"),switchName:"code",switches:[["manageDataSuccess",e.void()],["manageDataNotSupportedYet",e.void()],["manageDataNameNotFound",e.void()],["manageDataLowReserve",e.void()],["manageDataInvalidName",e.void()]],arms:{}}),e.enum("BumpSequenceResultCode",{bumpSequenceSuccess:0,bumpSequenceBadSeq:-1}),e.union("BumpSequenceResult",{switchOn:e.lookup("BumpSequenceResultCode"),switchName:"code",switches:[["bumpSequenceSuccess",e.void()],["bumpSequenceBadSeq",e.void()]],arms:{}}),e.enum("CreateClaimableBalanceResultCode",{createClaimableBalanceSuccess:0,createClaimableBalanceMalformed:-1,createClaimableBalanceLowReserve:-2,createClaimableBalanceNoTrust:-3,createClaimableBalanceNotAuthorized:-4,createClaimableBalanceUnderfunded:-5}),e.union("CreateClaimableBalanceResult",{switchOn:e.lookup("CreateClaimableBalanceResultCode"),switchName:"code",switches:[["createClaimableBalanceSuccess","balanceId"],["createClaimableBalanceMalformed",e.void()],["createClaimableBalanceLowReserve",e.void()],["createClaimableBalanceNoTrust",e.void()],["createClaimableBalanceNotAuthorized",e.void()],["createClaimableBalanceUnderfunded",e.void()]],arms:{balanceId:e.lookup("ClaimableBalanceId")}}),e.enum("ClaimClaimableBalanceResultCode",{claimClaimableBalanceSuccess:0,claimClaimableBalanceDoesNotExist:-1,claimClaimableBalanceCannotClaim:-2,claimClaimableBalanceLineFull:-3,claimClaimableBalanceNoTrust:-4,claimClaimableBalanceNotAuthorized:-5}),e.union("ClaimClaimableBalanceResult",{switchOn:e.lookup("ClaimClaimableBalanceResultCode"),switchName:"code",switches:[["claimClaimableBalanceSuccess",e.void()],["claimClaimableBalanceDoesNotExist",e.void()],["claimClaimableBalanceCannotClaim",e.void()],["claimClaimableBalanceLineFull",e.void()],["claimClaimableBalanceNoTrust",e.void()],["claimClaimableBalanceNotAuthorized",e.void()]],arms:{}}),e.enum("BeginSponsoringFutureReservesResultCode",{beginSponsoringFutureReservesSuccess:0,beginSponsoringFutureReservesMalformed:-1,beginSponsoringFutureReservesAlreadySponsored:-2,beginSponsoringFutureReservesRecursive:-3}),e.union("BeginSponsoringFutureReservesResult",{switchOn:e.lookup("BeginSponsoringFutureReservesResultCode"),switchName:"code",switches:[["beginSponsoringFutureReservesSuccess",e.void()],["beginSponsoringFutureReservesMalformed",e.void()],["beginSponsoringFutureReservesAlreadySponsored",e.void()],["beginSponsoringFutureReservesRecursive",e.void()]],arms:{}}),e.enum("EndSponsoringFutureReservesResultCode",{endSponsoringFutureReservesSuccess:0,endSponsoringFutureReservesNotSponsored:-1}),e.union("EndSponsoringFutureReservesResult",{switchOn:e.lookup("EndSponsoringFutureReservesResultCode"),switchName:"code",switches:[["endSponsoringFutureReservesSuccess",e.void()],["endSponsoringFutureReservesNotSponsored",e.void()]],arms:{}}),e.enum("RevokeSponsorshipResultCode",{revokeSponsorshipSuccess:0,revokeSponsorshipDoesNotExist:-1,revokeSponsorshipNotSponsor:-2,revokeSponsorshipLowReserve:-3,revokeSponsorshipOnlyTransferable:-4,revokeSponsorshipMalformed:-5}),e.union("RevokeSponsorshipResult",{switchOn:e.lookup("RevokeSponsorshipResultCode"),switchName:"code",switches:[["revokeSponsorshipSuccess",e.void()],["revokeSponsorshipDoesNotExist",e.void()],["revokeSponsorshipNotSponsor",e.void()],["revokeSponsorshipLowReserve",e.void()],["revokeSponsorshipOnlyTransferable",e.void()],["revokeSponsorshipMalformed",e.void()]],arms:{}}),e.enum("ClawbackResultCode",{clawbackSuccess:0,clawbackMalformed:-1,clawbackNotClawbackEnabled:-2,clawbackNoTrust:-3,clawbackUnderfunded:-4}),e.union("ClawbackResult",{switchOn:e.lookup("ClawbackResultCode"),switchName:"code",switches:[["clawbackSuccess",e.void()],["clawbackMalformed",e.void()],["clawbackNotClawbackEnabled",e.void()],["clawbackNoTrust",e.void()],["clawbackUnderfunded",e.void()]],arms:{}}),e.enum("ClawbackClaimableBalanceResultCode",{clawbackClaimableBalanceSuccess:0,clawbackClaimableBalanceDoesNotExist:-1,clawbackClaimableBalanceNotIssuer:-2,clawbackClaimableBalanceNotClawbackEnabled:-3}),e.union("ClawbackClaimableBalanceResult",{switchOn:e.lookup("ClawbackClaimableBalanceResultCode"),switchName:"code",switches:[["clawbackClaimableBalanceSuccess",e.void()],["clawbackClaimableBalanceDoesNotExist",e.void()],["clawbackClaimableBalanceNotIssuer",e.void()],["clawbackClaimableBalanceNotClawbackEnabled",e.void()]],arms:{}}),e.enum("SetTrustLineFlagsResultCode",{setTrustLineFlagsSuccess:0,setTrustLineFlagsMalformed:-1,setTrustLineFlagsNoTrustLine:-2,setTrustLineFlagsCantRevoke:-3,setTrustLineFlagsInvalidState:-4,setTrustLineFlagsLowReserve:-5}),e.union("SetTrustLineFlagsResult",{switchOn:e.lookup("SetTrustLineFlagsResultCode"),switchName:"code",switches:[["setTrustLineFlagsSuccess",e.void()],["setTrustLineFlagsMalformed",e.void()],["setTrustLineFlagsNoTrustLine",e.void()],["setTrustLineFlagsCantRevoke",e.void()],["setTrustLineFlagsInvalidState",e.void()],["setTrustLineFlagsLowReserve",e.void()]],arms:{}}),e.enum("LiquidityPoolDepositResultCode",{liquidityPoolDepositSuccess:0,liquidityPoolDepositMalformed:-1,liquidityPoolDepositNoTrust:-2,liquidityPoolDepositNotAuthorized:-3,liquidityPoolDepositUnderfunded:-4,liquidityPoolDepositLineFull:-5,liquidityPoolDepositBadPrice:-6,liquidityPoolDepositPoolFull:-7}),e.union("LiquidityPoolDepositResult",{switchOn:e.lookup("LiquidityPoolDepositResultCode"),switchName:"code",switches:[["liquidityPoolDepositSuccess",e.void()],["liquidityPoolDepositMalformed",e.void()],["liquidityPoolDepositNoTrust",e.void()],["liquidityPoolDepositNotAuthorized",e.void()],["liquidityPoolDepositUnderfunded",e.void()],["liquidityPoolDepositLineFull",e.void()],["liquidityPoolDepositBadPrice",e.void()],["liquidityPoolDepositPoolFull",e.void()]],arms:{}}),e.enum("LiquidityPoolWithdrawResultCode",{liquidityPoolWithdrawSuccess:0,liquidityPoolWithdrawMalformed:-1,liquidityPoolWithdrawNoTrust:-2,liquidityPoolWithdrawUnderfunded:-3,liquidityPoolWithdrawLineFull:-4,liquidityPoolWithdrawUnderMinimum:-5}),e.union("LiquidityPoolWithdrawResult",{switchOn:e.lookup("LiquidityPoolWithdrawResultCode"),switchName:"code",switches:[["liquidityPoolWithdrawSuccess",e.void()],["liquidityPoolWithdrawMalformed",e.void()],["liquidityPoolWithdrawNoTrust",e.void()],["liquidityPoolWithdrawUnderfunded",e.void()],["liquidityPoolWithdrawLineFull",e.void()],["liquidityPoolWithdrawUnderMinimum",e.void()]],arms:{}}),e.enum("InvokeHostFunctionResultCode",{invokeHostFunctionSuccess:0,invokeHostFunctionMalformed:-1,invokeHostFunctionTrapped:-2,invokeHostFunctionResourceLimitExceeded:-3,invokeHostFunctionEntryArchived:-4,invokeHostFunctionInsufficientRefundableFee:-5}),e.union("InvokeHostFunctionResult",{switchOn:e.lookup("InvokeHostFunctionResultCode"),switchName:"code",switches:[["invokeHostFunctionSuccess","success"],["invokeHostFunctionMalformed",e.void()],["invokeHostFunctionTrapped",e.void()],["invokeHostFunctionResourceLimitExceeded",e.void()],["invokeHostFunctionEntryArchived",e.void()],["invokeHostFunctionInsufficientRefundableFee",e.void()]],arms:{success:e.lookup("Hash")}}),e.enum("ExtendFootprintTtlResultCode",{extendFootprintTtlSuccess:0,extendFootprintTtlMalformed:-1,extendFootprintTtlResourceLimitExceeded:-2,extendFootprintTtlInsufficientRefundableFee:-3}),e.union("ExtendFootprintTtlResult",{switchOn:e.lookup("ExtendFootprintTtlResultCode"),switchName:"code",switches:[["extendFootprintTtlSuccess",e.void()],["extendFootprintTtlMalformed",e.void()],["extendFootprintTtlResourceLimitExceeded",e.void()],["extendFootprintTtlInsufficientRefundableFee",e.void()]],arms:{}}),e.enum("RestoreFootprintResultCode",{restoreFootprintSuccess:0,restoreFootprintMalformed:-1,restoreFootprintResourceLimitExceeded:-2,restoreFootprintInsufficientRefundableFee:-3}),e.union("RestoreFootprintResult",{switchOn:e.lookup("RestoreFootprintResultCode"),switchName:"code",switches:[["restoreFootprintSuccess",e.void()],["restoreFootprintMalformed",e.void()],["restoreFootprintResourceLimitExceeded",e.void()],["restoreFootprintInsufficientRefundableFee",e.void()]],arms:{}}),e.enum("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2,opNotSupported:-3,opTooManySubentries:-4,opExceededWorkLimit:-5,opTooManySponsoring:-6}),e.union("OperationResultTr",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountResult"],["payment","paymentResult"],["pathPaymentStrictReceive","pathPaymentStrictReceiveResult"],["manageSellOffer","manageSellOfferResult"],["createPassiveSellOffer","createPassiveSellOfferResult"],["setOptions","setOptionsResult"],["changeTrust","changeTrustResult"],["allowTrust","allowTrustResult"],["accountMerge","accountMergeResult"],["inflation","inflationResult"],["manageData","manageDataResult"],["bumpSequence","bumpSeqResult"],["manageBuyOffer","manageBuyOfferResult"],["pathPaymentStrictSend","pathPaymentStrictSendResult"],["createClaimableBalance","createClaimableBalanceResult"],["claimClaimableBalance","claimClaimableBalanceResult"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesResult"],["endSponsoringFutureReserves","endSponsoringFutureReservesResult"],["revokeSponsorship","revokeSponsorshipResult"],["clawback","clawbackResult"],["clawbackClaimableBalance","clawbackClaimableBalanceResult"],["setTrustLineFlags","setTrustLineFlagsResult"],["liquidityPoolDeposit","liquidityPoolDepositResult"],["liquidityPoolWithdraw","liquidityPoolWithdrawResult"],["invokeHostFunction","invokeHostFunctionResult"],["extendFootprintTtl","extendFootprintTtlResult"],["restoreFootprint","restoreFootprintResult"]],arms:{createAccountResult:e.lookup("CreateAccountResult"),paymentResult:e.lookup("PaymentResult"),pathPaymentStrictReceiveResult:e.lookup("PathPaymentStrictReceiveResult"),manageSellOfferResult:e.lookup("ManageSellOfferResult"),createPassiveSellOfferResult:e.lookup("ManageSellOfferResult"),setOptionsResult:e.lookup("SetOptionsResult"),changeTrustResult:e.lookup("ChangeTrustResult"),allowTrustResult:e.lookup("AllowTrustResult"),accountMergeResult:e.lookup("AccountMergeResult"),inflationResult:e.lookup("InflationResult"),manageDataResult:e.lookup("ManageDataResult"),bumpSeqResult:e.lookup("BumpSequenceResult"),manageBuyOfferResult:e.lookup("ManageBuyOfferResult"),pathPaymentStrictSendResult:e.lookup("PathPaymentStrictSendResult"),createClaimableBalanceResult:e.lookup("CreateClaimableBalanceResult"),claimClaimableBalanceResult:e.lookup("ClaimClaimableBalanceResult"),beginSponsoringFutureReservesResult:e.lookup("BeginSponsoringFutureReservesResult"),endSponsoringFutureReservesResult:e.lookup("EndSponsoringFutureReservesResult"),revokeSponsorshipResult:e.lookup("RevokeSponsorshipResult"),clawbackResult:e.lookup("ClawbackResult"),clawbackClaimableBalanceResult:e.lookup("ClawbackClaimableBalanceResult"),setTrustLineFlagsResult:e.lookup("SetTrustLineFlagsResult"),liquidityPoolDepositResult:e.lookup("LiquidityPoolDepositResult"),liquidityPoolWithdrawResult:e.lookup("LiquidityPoolWithdrawResult"),invokeHostFunctionResult:e.lookup("InvokeHostFunctionResult"),extendFootprintTtlResult:e.lookup("ExtendFootprintTtlResult"),restoreFootprintResult:e.lookup("RestoreFootprintResult")}}),e.union("OperationResult",{switchOn:e.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"],["opBadAuth",e.void()],["opNoAccount",e.void()],["opNotSupported",e.void()],["opTooManySubentries",e.void()],["opExceededWorkLimit",e.void()],["opTooManySponsoring",e.void()]],arms:{tr:e.lookup("OperationResultTr")}}),e.enum("TransactionResultCode",{txFeeBumpInnerSuccess:1,txSuccess:0,txFailed:-1,txTooEarly:-2,txTooLate:-3,txMissingOperation:-4,txBadSeq:-5,txBadAuth:-6,txInsufficientBalance:-7,txNoAccount:-8,txInsufficientFee:-9,txBadAuthExtra:-10,txInternalError:-11,txNotSupported:-12,txFeeBumpInnerFailed:-13,txBadSponsorship:-14,txBadMinSeqAgeOrGap:-15,txMalformed:-16,txSorobanInvalid:-17}),e.union("InnerTransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()],["txBadMinSeqAgeOrGap",e.void()],["txMalformed",e.void()],["txSorobanInvalid",e.void()]],arms:{results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("InnerTransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("InnerTransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("InnerTransactionResultResult")],["ext",e.lookup("InnerTransactionResultExt")]]),e.struct("InnerTransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("InnerTransactionResult")]]),e.union("TransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txFeeBumpInnerSuccess","innerResultPair"],["txFeeBumpInnerFailed","innerResultPair"],["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()],["txBadMinSeqAgeOrGap",e.void()],["txMalformed",e.void()],["txSorobanInvalid",e.void()]],arms:{innerResultPair:e.lookup("InnerTransactionResultPair"),results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("TransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("TransactionResultResult")],["ext",e.lookup("TransactionResultExt")]]),e.typedef("Hash",e.opaque(32)),e.typedef("Uint256",e.opaque(32)),e.typedef("Uint32",e.uint()),e.typedef("Int32",e.int()),e.typedef("Uint64",e.uhyper()),e.typedef("Int64",e.hyper()),e.typedef("TimePoint",e.lookup("Uint64")),e.typedef("Duration",e.lookup("Uint64")),e.union("ExtensionPoint",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.enum("CryptoKeyType",{keyTypeEd25519:0,keyTypePreAuthTx:1,keyTypeHashX:2,keyTypeEd25519SignedPayload:3,keyTypeMuxedEd25519:256}),e.enum("PublicKeyType",{publicKeyTypeEd25519:0}),e.enum("SignerKeyType",{signerKeyTypeEd25519:0,signerKeyTypePreAuthTx:1,signerKeyTypeHashX:2,signerKeyTypeEd25519SignedPayload:3}),e.union("PublicKey",{switchOn:e.lookup("PublicKeyType"),switchName:"type",switches:[["publicKeyTypeEd25519","ed25519"]],arms:{ed25519:e.lookup("Uint256")}}),e.struct("SignerKeyEd25519SignedPayload",[["ed25519",e.lookup("Uint256")],["payload",e.varOpaque(64)]]),e.union("SignerKey",{switchOn:e.lookup("SignerKeyType"),switchName:"type",switches:[["signerKeyTypeEd25519","ed25519"],["signerKeyTypePreAuthTx","preAuthTx"],["signerKeyTypeHashX","hashX"],["signerKeyTypeEd25519SignedPayload","ed25519SignedPayload"]],arms:{ed25519:e.lookup("Uint256"),preAuthTx:e.lookup("Uint256"),hashX:e.lookup("Uint256"),ed25519SignedPayload:e.lookup("SignerKeyEd25519SignedPayload")}}),e.typedef("Signature",e.varOpaque(64)),e.typedef("SignatureHint",e.opaque(4)),e.typedef("NodeId",e.lookup("PublicKey")),e.typedef("AccountId",e.lookup("PublicKey")),e.struct("Curve25519Secret",[["key",e.opaque(32)]]),e.struct("Curve25519Public",[["key",e.opaque(32)]]),e.struct("HmacSha256Key",[["key",e.opaque(32)]]),e.struct("HmacSha256Mac",[["mac",e.opaque(32)]]),e.enum("ScValType",{scvBool:0,scvVoid:1,scvError:2,scvU32:3,scvI32:4,scvU64:5,scvI64:6,scvTimepoint:7,scvDuration:8,scvU128:9,scvI128:10,scvU256:11,scvI256:12,scvBytes:13,scvString:14,scvSymbol:15,scvVec:16,scvMap:17,scvAddress:18,scvContractInstance:19,scvLedgerKeyContractInstance:20,scvLedgerKeyNonce:21}),e.enum("ScErrorType",{sceContract:0,sceWasmVm:1,sceContext:2,sceStorage:3,sceObject:4,sceCrypto:5,sceEvents:6,sceBudget:7,sceValue:8,sceAuth:9}),e.enum("ScErrorCode",{scecArithDomain:0,scecIndexBounds:1,scecInvalidInput:2,scecMissingValue:3,scecExistingValue:4,scecExceededLimit:5,scecInvalidAction:6,scecInternalError:7,scecUnexpectedType:8,scecUnexpectedSize:9}),e.union("ScError",{switchOn:e.lookup("ScErrorType"),switchName:"type",switches:[["sceContract","contractCode"],["sceWasmVm","code"],["sceContext","code"],["sceStorage","code"],["sceObject","code"],["sceCrypto","code"],["sceEvents","code"],["sceBudget","code"],["sceValue","code"],["sceAuth","code"]],arms:{contractCode:e.lookup("Uint32"),code:e.lookup("ScErrorCode")}}),e.struct("UInt128Parts",[["hi",e.lookup("Uint64")],["lo",e.lookup("Uint64")]]),e.struct("Int128Parts",[["hi",e.lookup("Int64")],["lo",e.lookup("Uint64")]]),e.struct("UInt256Parts",[["hiHi",e.lookup("Uint64")],["hiLo",e.lookup("Uint64")],["loHi",e.lookup("Uint64")],["loLo",e.lookup("Uint64")]]),e.struct("Int256Parts",[["hiHi",e.lookup("Int64")],["hiLo",e.lookup("Uint64")],["loHi",e.lookup("Uint64")],["loLo",e.lookup("Uint64")]]),e.enum("ContractExecutableType",{contractExecutableWasm:0,contractExecutableStellarAsset:1}),e.union("ContractExecutable",{switchOn:e.lookup("ContractExecutableType"),switchName:"type",switches:[["contractExecutableWasm","wasmHash"],["contractExecutableStellarAsset",e.void()]],arms:{wasmHash:e.lookup("Hash")}}),e.enum("ScAddressType",{scAddressTypeAccount:0,scAddressTypeContract:1}),e.union("ScAddress",{switchOn:e.lookup("ScAddressType"),switchName:"type",switches:[["scAddressTypeAccount","accountId"],["scAddressTypeContract","contractId"]],arms:{accountId:e.lookup("AccountId"),contractId:e.lookup("Hash")}}),e.const("SCSYMBOL_LIMIT",32),e.typedef("ScVec",e.varArray(e.lookup("ScVal"),2147483647)),e.typedef("ScMap",e.varArray(e.lookup("ScMapEntry"),2147483647)),e.typedef("ScBytes",e.varOpaque()),e.typedef("ScString",e.string()),e.typedef("ScSymbol",e.string(32)),e.struct("ScNonceKey",[["nonce",e.lookup("Int64")]]),e.struct("ScContractInstance",[["executable",e.lookup("ContractExecutable")],["storage",e.option(e.lookup("ScMap"))]]),e.union("ScVal",{switchOn:e.lookup("ScValType"),switchName:"type",switches:[["scvBool","b"],["scvVoid",e.void()],["scvError","error"],["scvU32","u32"],["scvI32","i32"],["scvU64","u64"],["scvI64","i64"],["scvTimepoint","timepoint"],["scvDuration","duration"],["scvU128","u128"],["scvI128","i128"],["scvU256","u256"],["scvI256","i256"],["scvBytes","bytes"],["scvString","str"],["scvSymbol","sym"],["scvVec","vec"],["scvMap","map"],["scvAddress","address"],["scvLedgerKeyContractInstance",e.void()],["scvLedgerKeyNonce","nonceKey"],["scvContractInstance","instance"]],arms:{b:e.bool(),error:e.lookup("ScError"),u32:e.lookup("Uint32"),i32:e.lookup("Int32"),u64:e.lookup("Uint64"),i64:e.lookup("Int64"),timepoint:e.lookup("TimePoint"),duration:e.lookup("Duration"),u128:e.lookup("UInt128Parts"),i128:e.lookup("Int128Parts"),u256:e.lookup("UInt256Parts"),i256:e.lookup("Int256Parts"),bytes:e.lookup("ScBytes"),str:e.lookup("ScString"),sym:e.lookup("ScSymbol"),vec:e.option(e.lookup("ScVec")),map:e.option(e.lookup("ScMap")),address:e.lookup("ScAddress"),nonceKey:e.lookup("ScNonceKey"),instance:e.lookup("ScContractInstance")}}),e.struct("ScMapEntry",[["key",e.lookup("ScVal")],["val",e.lookup("ScVal")]]),e.enum("ScEnvMetaKind",{scEnvMetaKindInterfaceVersion:0}),e.union("ScEnvMetaEntry",{switchOn:e.lookup("ScEnvMetaKind"),switchName:"kind",switches:[["scEnvMetaKindInterfaceVersion","interfaceVersion"]],arms:{interfaceVersion:e.lookup("Uint64")}}),e.struct("ScMetaV0",[["key",e.string()],["val",e.string()]]),e.enum("ScMetaKind",{scMetaV0:0}),e.union("ScMetaEntry",{switchOn:e.lookup("ScMetaKind"),switchName:"kind",switches:[["scMetaV0","v0"]],arms:{v0:e.lookup("ScMetaV0")}}),e.const("SC_SPEC_DOC_LIMIT",1024),e.enum("ScSpecType",{scSpecTypeVal:0,scSpecTypeBool:1,scSpecTypeVoid:2,scSpecTypeError:3,scSpecTypeU32:4,scSpecTypeI32:5,scSpecTypeU64:6,scSpecTypeI64:7,scSpecTypeTimepoint:8,scSpecTypeDuration:9,scSpecTypeU128:10,scSpecTypeI128:11,scSpecTypeU256:12,scSpecTypeI256:13,scSpecTypeBytes:14,scSpecTypeString:16,scSpecTypeSymbol:17,scSpecTypeAddress:19,scSpecTypeOption:1e3,scSpecTypeResult:1001,scSpecTypeVec:1002,scSpecTypeMap:1004,scSpecTypeTuple:1005,scSpecTypeBytesN:1006,scSpecTypeUdt:2e3}),e.struct("ScSpecTypeOption",[["valueType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeResult",[["okType",e.lookup("ScSpecTypeDef")],["errorType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeVec",[["elementType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeMap",[["keyType",e.lookup("ScSpecTypeDef")],["valueType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeTuple",[["valueTypes",e.varArray(e.lookup("ScSpecTypeDef"),12)]]),e.struct("ScSpecTypeBytesN",[["n",e.lookup("Uint32")]]),e.struct("ScSpecTypeUdt",[["name",e.string(60)]]),e.union("ScSpecTypeDef",{switchOn:e.lookup("ScSpecType"),switchName:"type",switches:[["scSpecTypeVal",e.void()],["scSpecTypeBool",e.void()],["scSpecTypeVoid",e.void()],["scSpecTypeError",e.void()],["scSpecTypeU32",e.void()],["scSpecTypeI32",e.void()],["scSpecTypeU64",e.void()],["scSpecTypeI64",e.void()],["scSpecTypeTimepoint",e.void()],["scSpecTypeDuration",e.void()],["scSpecTypeU128",e.void()],["scSpecTypeI128",e.void()],["scSpecTypeU256",e.void()],["scSpecTypeI256",e.void()],["scSpecTypeBytes",e.void()],["scSpecTypeString",e.void()],["scSpecTypeSymbol",e.void()],["scSpecTypeAddress",e.void()],["scSpecTypeOption","option"],["scSpecTypeResult","result"],["scSpecTypeVec","vec"],["scSpecTypeMap","map"],["scSpecTypeTuple","tuple"],["scSpecTypeBytesN","bytesN"],["scSpecTypeUdt","udt"]],arms:{option:e.lookup("ScSpecTypeOption"),result:e.lookup("ScSpecTypeResult"),vec:e.lookup("ScSpecTypeVec"),map:e.lookup("ScSpecTypeMap"),tuple:e.lookup("ScSpecTypeTuple"),bytesN:e.lookup("ScSpecTypeBytesN"),udt:e.lookup("ScSpecTypeUdt")}}),e.struct("ScSpecUdtStructFieldV0",[["doc",e.string(t)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecUdtStructV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["fields",e.varArray(e.lookup("ScSpecUdtStructFieldV0"),40)]]),e.struct("ScSpecUdtUnionCaseVoidV0",[["doc",e.string(t)],["name",e.string(60)]]),e.struct("ScSpecUdtUnionCaseTupleV0",[["doc",e.string(t)],["name",e.string(60)],["type",e.varArray(e.lookup("ScSpecTypeDef"),12)]]),e.enum("ScSpecUdtUnionCaseV0Kind",{scSpecUdtUnionCaseVoidV0:0,scSpecUdtUnionCaseTupleV0:1}),e.union("ScSpecUdtUnionCaseV0",{switchOn:e.lookup("ScSpecUdtUnionCaseV0Kind"),switchName:"kind",switches:[["scSpecUdtUnionCaseVoidV0","voidCase"],["scSpecUdtUnionCaseTupleV0","tupleCase"]],arms:{voidCase:e.lookup("ScSpecUdtUnionCaseVoidV0"),tupleCase:e.lookup("ScSpecUdtUnionCaseTupleV0")}}),e.struct("ScSpecUdtUnionV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtUnionCaseV0"),50)]]),e.struct("ScSpecUdtEnumCaseV0",[["doc",e.string(t)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtEnumV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtEnumCaseV0"),50)]]),e.struct("ScSpecUdtErrorEnumCaseV0",[["doc",e.string(t)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtErrorEnumV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtErrorEnumCaseV0"),50)]]),e.struct("ScSpecFunctionInputV0",[["doc",e.string(t)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecFunctionV0",[["doc",e.string(t)],["name",e.lookup("ScSymbol")],["inputs",e.varArray(e.lookup("ScSpecFunctionInputV0"),10)],["outputs",e.varArray(e.lookup("ScSpecTypeDef"),1)]]),e.enum("ScSpecEntryKind",{scSpecEntryFunctionV0:0,scSpecEntryUdtStructV0:1,scSpecEntryUdtUnionV0:2,scSpecEntryUdtEnumV0:3,scSpecEntryUdtErrorEnumV0:4}),e.union("ScSpecEntry",{switchOn:e.lookup("ScSpecEntryKind"),switchName:"kind",switches:[["scSpecEntryFunctionV0","functionV0"],["scSpecEntryUdtStructV0","udtStructV0"],["scSpecEntryUdtUnionV0","udtUnionV0"],["scSpecEntryUdtEnumV0","udtEnumV0"],["scSpecEntryUdtErrorEnumV0","udtErrorEnumV0"]],arms:{functionV0:e.lookup("ScSpecFunctionV0"),udtStructV0:e.lookup("ScSpecUdtStructV0"),udtUnionV0:e.lookup("ScSpecUdtUnionV0"),udtEnumV0:e.lookup("ScSpecUdtEnumV0"),udtErrorEnumV0:e.lookup("ScSpecUdtErrorEnumV0")}}),e.struct("ConfigSettingContractExecutionLanesV0",[["ledgerMaxTxCount",e.lookup("Uint32")]]),e.struct("ConfigSettingContractComputeV0",[["ledgerMaxInstructions",e.lookup("Int64")],["txMaxInstructions",e.lookup("Int64")],["feeRatePerInstructionsIncrement",e.lookup("Int64")],["txMemoryLimit",e.lookup("Uint32")]]),e.struct("ConfigSettingContractLedgerCostV0",[["ledgerMaxReadLedgerEntries",e.lookup("Uint32")],["ledgerMaxReadBytes",e.lookup("Uint32")],["ledgerMaxWriteLedgerEntries",e.lookup("Uint32")],["ledgerMaxWriteBytes",e.lookup("Uint32")],["txMaxReadLedgerEntries",e.lookup("Uint32")],["txMaxReadBytes",e.lookup("Uint32")],["txMaxWriteLedgerEntries",e.lookup("Uint32")],["txMaxWriteBytes",e.lookup("Uint32")],["feeReadLedgerEntry",e.lookup("Int64")],["feeWriteLedgerEntry",e.lookup("Int64")],["feeRead1Kb",e.lookup("Int64")],["bucketListTargetSizeBytes",e.lookup("Int64")],["writeFee1KbBucketListLow",e.lookup("Int64")],["writeFee1KbBucketListHigh",e.lookup("Int64")],["bucketListWriteFeeGrowthFactor",e.lookup("Uint32")]]),e.struct("ConfigSettingContractHistoricalDataV0",[["feeHistorical1Kb",e.lookup("Int64")]]),e.struct("ConfigSettingContractEventsV0",[["txMaxContractEventsSizeBytes",e.lookup("Uint32")],["feeContractEvents1Kb",e.lookup("Int64")]]),e.struct("ConfigSettingContractBandwidthV0",[["ledgerMaxTxsSizeBytes",e.lookup("Uint32")],["txMaxSizeBytes",e.lookup("Uint32")],["feeTxSize1Kb",e.lookup("Int64")]]),e.enum("ContractCostType",{wasmInsnExec:0,memAlloc:1,memCpy:2,memCmp:3,dispatchHostFunction:4,visitObject:5,valSer:6,valDeser:7,computeSha256Hash:8,computeEd25519PubKey:9,verifyEd25519Sig:10,vmInstantiation:11,vmCachedInstantiation:12,invokeVmFunction:13,computeKeccak256Hash:14,computeEcdsaSecp256k1Sig:15,recoverEcdsaSecp256k1Key:16,int256AddSub:17,int256Mul:18,int256Div:19,int256Pow:20,int256Shift:21,chaCha20DrawBytes:22}),e.struct("ContractCostParamEntry",[["ext",e.lookup("ExtensionPoint")],["constTerm",e.lookup("Int64")],["linearTerm",e.lookup("Int64")]]),e.struct("StateArchivalSettings",[["maxEntryTtl",e.lookup("Uint32")],["minTemporaryTtl",e.lookup("Uint32")],["minPersistentTtl",e.lookup("Uint32")],["persistentRentRateDenominator",e.lookup("Int64")],["tempRentRateDenominator",e.lookup("Int64")],["maxEntriesToArchive",e.lookup("Uint32")],["bucketListSizeWindowSampleSize",e.lookup("Uint32")],["evictionScanSize",e.lookup("Uint64")],["startingEvictionScanLevel",e.lookup("Uint32")]]),e.struct("EvictionIterator",[["bucketListLevel",e.lookup("Uint32")],["isCurrBucket",e.bool()],["bucketFileOffset",e.lookup("Uint64")]]),e.const("CONTRACT_COST_COUNT_LIMIT",1024),e.typedef("ContractCostParams",e.varArray(e.lookup("ContractCostParamEntry"),e.lookup("CONTRACT_COST_COUNT_LIMIT"))),e.enum("ConfigSettingId",{configSettingContractMaxSizeBytes:0,configSettingContractComputeV0:1,configSettingContractLedgerCostV0:2,configSettingContractHistoricalDataV0:3,configSettingContractEventsV0:4,configSettingContractBandwidthV0:5,configSettingContractCostParamsCpuInstructions:6,configSettingContractCostParamsMemoryBytes:7,configSettingContractDataKeySizeBytes:8,configSettingContractDataEntrySizeBytes:9,configSettingStateArchival:10,configSettingContractExecutionLanes:11,configSettingBucketlistSizeWindow:12,configSettingEvictionIterator:13}),e.union("ConfigSettingEntry",{switchOn:e.lookup("ConfigSettingId"),switchName:"configSettingId",switches:[["configSettingContractMaxSizeBytes","contractMaxSizeBytes"],["configSettingContractComputeV0","contractCompute"],["configSettingContractLedgerCostV0","contractLedgerCost"],["configSettingContractHistoricalDataV0","contractHistoricalData"],["configSettingContractEventsV0","contractEvents"],["configSettingContractBandwidthV0","contractBandwidth"],["configSettingContractCostParamsCpuInstructions","contractCostParamsCpuInsns"],["configSettingContractCostParamsMemoryBytes","contractCostParamsMemBytes"],["configSettingContractDataKeySizeBytes","contractDataKeySizeBytes"],["configSettingContractDataEntrySizeBytes","contractDataEntrySizeBytes"],["configSettingStateArchival","stateArchivalSettings"],["configSettingContractExecutionLanes","contractExecutionLanes"],["configSettingBucketlistSizeWindow","bucketListSizeWindow"],["configSettingEvictionIterator","evictionIterator"]],arms:{contractMaxSizeBytes:e.lookup("Uint32"),contractCompute:e.lookup("ConfigSettingContractComputeV0"),contractLedgerCost:e.lookup("ConfigSettingContractLedgerCostV0"),contractHistoricalData:e.lookup("ConfigSettingContractHistoricalDataV0"),contractEvents:e.lookup("ConfigSettingContractEventsV0"),contractBandwidth:e.lookup("ConfigSettingContractBandwidthV0"),contractCostParamsCpuInsns:e.lookup("ContractCostParams"),contractCostParamsMemBytes:e.lookup("ContractCostParams"),contractDataKeySizeBytes:e.lookup("Uint32"),contractDataEntrySizeBytes:e.lookup("Uint32"),stateArchivalSettings:e.lookup("StateArchivalSettings"),contractExecutionLanes:e.lookup("ConfigSettingContractExecutionLanesV0"),bucketListSizeWindow:e.varArray(e.lookup("Uint64"),2147483647),evictionIterator:e.lookup("EvictionIterator")}})}));const i=o;var a=r(5236);function s(e){var t=new a.sha256;return t.update(e,"utf8"),t.digest()}var u=r(3296).Buffer,c={},l="undefined"==typeof window?function(){var e;try{e=r(Object(function(){var e=new Error("Cannot find module 'sodium-native'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){return h()}return Object.keys(e).length?(c.generate=function(t){var r=u.alloc(e.crypto_sign_PUBLICKEYBYTES),n=u.alloc(e.crypto_sign_SECRETKEYBYTES);return e.crypto_sign_seed_keypair(r,n,t),r},c.sign=function(t,r){t=u.from(t);var n=u.alloc(e.crypto_sign_BYTES);return e.crypto_sign_detached(n,t,r),n},c.verify=function(t,r,n){t=u.from(t);try{return e.crypto_sign_verify_detached(r,t,n)}catch(e){return!1}},!0):h()}():h();function f(e,t){return c.sign(e,t)}function p(e,t,r){return c.verify(e,t,r)}function h(){var e=r(9268);return c.generate=function(t){var r=new Uint8Array(t),n=e.sign.keyPair.fromSeed(r);return u.from(n.publicKey)},c.sign=function(t,r){t=u.from(t),t=new Uint8Array(t.toJSON().data),r=new Uint8Array(r.toJSON().data);var n=e.sign.detached(t,r);return u.from(n)},c.verify=function(t,r,n){return t=u.from(t),t=new Uint8Array(t.toJSON().data),r=new Uint8Array(r.toJSON().data),n=new Uint8Array(n.toJSON().data),e.sign.detached.verify(t,r,n)},!1}var y=function(e,t){for(var r="number"==typeof e,n=String(e);n.endsWith(t);)n=n.slice(0,-1);return r?Number(n):n},d=r(9268),m=r.n(d),g=r(6555);var v=r(3296).Buffer;function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function S(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==b(t)?t:String(t)}var k={ed25519PublicKey:48,ed25519SecretSeed:144,med25519PublicKey:96,preAuthTx:152,sha256Hash:184,signedPayload:120,contract:16},E={G:"ed25519PublicKey",S:"ed25519SecretSeed",M:"med25519PublicKey",T:"preAuthTx",X:"sha256Hash",P:"signedPayload",C:"contract"},A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"encodeEd25519PublicKey",value:function(e){return P("ed25519PublicKey",e)}},{key:"decodeEd25519PublicKey",value:function(e){return O("ed25519PublicKey",e)}},{key:"isValidEd25519PublicKey",value:function(e){return T("ed25519PublicKey",e)}},{key:"encodeEd25519SecretSeed",value:function(e){return P("ed25519SecretSeed",e)}},{key:"decodeEd25519SecretSeed",value:function(e){return O("ed25519SecretSeed",e)}},{key:"isValidEd25519SecretSeed",value:function(e){return T("ed25519SecretSeed",e)}},{key:"encodeMed25519PublicKey",value:function(e){return P("med25519PublicKey",e)}},{key:"decodeMed25519PublicKey",value:function(e){return O("med25519PublicKey",e)}},{key:"isValidMed25519PublicKey",value:function(e){return T("med25519PublicKey",e)}},{key:"encodePreAuthTx",value:function(e){return P("preAuthTx",e)}},{key:"decodePreAuthTx",value:function(e){return O("preAuthTx",e)}},{key:"encodeSha256Hash",value:function(e){return P("sha256Hash",e)}},{key:"decodeSha256Hash",value:function(e){return O("sha256Hash",e)}},{key:"encodeSignedPayload",value:function(e){return P("signedPayload",e)}},{key:"decodeSignedPayload",value:function(e){return O("signedPayload",e)}},{key:"isValidSignedPayload",value:function(e){return T("signedPayload",e)}},{key:"encodeContract",value:function(e){return P("contract",e)}},{key:"decodeContract",value:function(e){return O("contract",e)}},{key:"isValidContract",value:function(e){return T("contract",e)}},{key:"getVersionByteForPrefix",value:function(e){return E[e[0]]}}],(r=null)&&w(t.prototype,r),n&&w(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function T(e,t){if("string"!=typeof t)return!1;switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":if(56!==t.length)return!1;break;case"med25519PublicKey":if(69!==t.length)return!1;break;case"signedPayload":if(t.length<56||t.length>165)return!1;break;default:return!1}var r="";try{r=O(e,t)}catch(e){return!1}switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":return 32===r.length;case"med25519PublicKey":return 40===r.length;case"signedPayload":return r.length>=40&&r.length<=100;default:return!1}}function O(e,t){if("string"!=typeof t)throw new TypeError("encoded argument must be of type String");var r=g.decode(t),n=r[0],o=r.slice(0,-2),i=o.slice(1),a=r.slice(-2);if(t!==g.encode(r))throw new Error("invalid encoded string");var s=k[e];if(void 0===s)throw new Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(k).join(", ")));if(n!==s)throw new Error("invalid version byte. expected ".concat(s,", got ").concat(n));if(!function(e,t){if(e.length!==t.length)return!1;if(0===e.length)return!0;for(var r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0}(x(o),a))throw new Error("invalid checksum");return v.from(i)}function P(e,t){if(null==t)throw new Error("cannot encode null data");var r=k[e];if(void 0===r)throw new Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(k).join(", ")));t=v.from(t);var n=v.from([r]),o=v.concat([n,t]),i=x(o),a=v.concat([o,i]);return g.encode(a)}function x(e){for(var t=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],r=0,n=0;n<e.length;n+=1){r=r<<8^t[r>>8^e[n]],r&=65535}var o=new Uint8Array(2);return o[0]=255&r,o[1]=r>>8&255,o}var I=r(3296).Buffer;function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function B(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R(n.key),n)}}function R(e){var t=function(e,t){if("object"!=_(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_(t)?t:String(t)}var C=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"ed25519"!==t.type)throw new Error("Invalid keys type");if(this.type=t.type,t.secretKey){if(t.secretKey=I.from(t.secretKey),32!==t.secretKey.length)throw new Error("secretKey length is invalid");if(this._secretSeed=t.secretKey,this._publicKey=(r=t.secretKey,c.generate(r)),this._secretKey=I.concat([t.secretKey,this._publicKey]),t.publicKey&&!this._publicKey.equals(I.from(t.publicKey)))throw new Error("secretKey does not match publicKey")}else if(this._publicKey=I.from(t.publicKey),32!==this._publicKey.length)throw new Error("publicKey length is invalid");var r}var t,r,n;return t=e,n=[{key:"fromSecret",value:function(e){var t=A.decodeEd25519SecretSeed(e);return this.fromRawEd25519Seed(t)}},{key:"fromRawEd25519Seed",value:function(e){return new this({type:"ed25519",secretKey:e})}},{key:"master",value:function(e){if(!e)throw new Error("No network selected. Please pass a network argument, e.g. `Keypair.master(Networks.PUBLIC)`.");return this.fromRawEd25519Seed(s(e))}},{key:"fromPublicKey",value:function(e){if(32!==(e=A.decodeEd25519PublicKey(e)).length)throw new Error("Invalid Stellar public key");return new this({type:"ed25519",publicKey:e})}},{key:"random",value:function(){var e=m().randomBytes(32);return this.fromRawEd25519Seed(e)}}],(r=[{key:"xdrAccountId",value:function(){return new i.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new i.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrMuxedAccount",value:function(e){if(void 0!==e){if("string"!=typeof e)throw new TypeError("expected string for ID, got ".concat(_(e)));return i.MuxedAccount.keyTypeMuxedEd25519(new i.MuxedAccountMed25519({id:i.Uint64.fromString(e),ed25519:this._publicKey}))}return new i.MuxedAccount.keyTypeEd25519(this._publicKey)}},{key:"rawPublicKey",value:function(){return this._publicKey}},{key:"signatureHint",value:function(){var e=this.xdrAccountId().toXDR();return e.slice(e.length-4)}},{key:"publicKey",value:function(){return A.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw new Error("no secret key available");if("ed25519"===this.type)return A.encodeEd25519SecretSeed(this._secretSeed);throw new Error("Invalid Keypair type")}},{key:"rawSecretKey",value:function(){return this._secretSeed}},{key:"canSign",value:function(){return!!this._secretKey}},{key:"sign",value:function(e){if(!this.canSign())throw new Error("cannot sign: no secret key available");return f(e,this._secretKey)}},{key:"verify",value:function(e,t){return p(e,t,this._publicKey)}},{key:"signDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint();return new i.DecoratedSignature({hint:r,signature:t})}},{key:"signPayloadDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint(),n=I.from(e.slice(-4));return n.length<4&&(n=I.concat([n,I.alloc(4-e.length,0)])),new i.DecoratedSignature({hint:n.map((function(e,t){return e^r[t]})),signature:t})}}])&&B(t.prototype,r),n&&B(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),U=r(3296).Buffer;function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,j(n.key),n)}}function j(e){var t=function(e,t){if("object"!=N(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==N(t)?t:String(t)}var M=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!/^[a-zA-Z0-9]{1,12}$/.test(t))throw new Error("Asset code is invalid (maximum alphanumeric, 12 characters at max)");if("xlm"!==String(t).toLowerCase()&&!r)throw new Error("Issuer cannot be null");if(r&&!A.isValidEd25519PublicKey(r))throw new Error("Issuer is invalid");"xlm"===String(t).toLowerCase()?this.code="XLM":this.code=t,this.issuer=r}var t,r,n;return t=e,r=[{key:"toXDRObject",value:function(){return this._toXDRObject(i.Asset)}},{key:"toChangeTrustXDRObject",value:function(){return this._toXDRObject(i.ChangeTrustAsset)}},{key:"toTrustLineXDRObject",value:function(){return this._toXDRObject(i.TrustLineAsset)}},{key:"contractId",value:function(e){var t=s(U.from(e)),r=i.HashIdPreimage.envelopeTypeContractId(new i.HashIdPreimageContractId({networkId:t,contractIdPreimage:i.ContractIdPreimage.contractIdPreimageFromAsset(this.toXDRObject())}));return A.encodeContract(s(r.toXDR()))}},{key:"_toXDRObject",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.Asset;if(this.isNative())return r.assetTypeNative();this.code.length<=4?(e=i.AlphaNum4,t="assetTypeCreditAlphanum4"):(e=i.AlphaNum12,t="assetTypeCreditAlphanum12");var n=this.code.length<=4?4:12;return new r(t,new e({assetCode:this.code.padEnd(n,"\0"),issuer:C.fromPublicKey(this.issuer).xdrAccountId()}))}},{key:"getCode",value:function(){if(void 0!==this.code)return String(this.code)}},{key:"getIssuer",value:function(){if(void 0!==this.issuer)return String(this.issuer)}},{key:"getAssetType",value:function(){switch(this.getRawAssetType()){case i.AssetType.assetTypeNative():return"native";case i.AssetType.assetTypeCreditAlphanum4():return"credit_alphanum4";case i.AssetType.assetTypeCreditAlphanum12():return"credit_alphanum12";default:return"unknown"}}},{key:"getRawAssetType",value:function(){return this.isNative()?i.AssetType.assetTypeNative():this.code.length<=4?i.AssetType.assetTypeCreditAlphanum4():i.AssetType.assetTypeCreditAlphanum12()}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(e){return this.code===e.getCode()&&this.issuer===e.getIssuer()}},{key:"toString",value:function(){return this.isNative()?"native":"".concat(this.getCode(),":").concat(this.getIssuer())}}],n=[{key:"native",value:function(){return new e("XLM")}},{key:"fromOperation",value:function(e){var t,r;switch(e.switch()){case i.AssetType.assetTypeNative():return this.native();case i.AssetType.assetTypeCreditAlphanum4():t=e.alphaNum4();case i.AssetType.assetTypeCreditAlphanum12():return t=t||e.alphaNum12(),r=A.encodeEd25519PublicKey(t.issuer().ed25519()),new this(y(t.assetCode(),"\0"),r);default:throw new Error("Invalid asset type: ".concat(e.switch().name))}}},{key:"compare",value:function(t,r){if(!(t&&t instanceof e))throw new Error("assetA is invalid");if(!(r&&r instanceof e))throw new Error("assetB is invalid");if(t.equals(r))return 0;var n=t.getRawAssetType().value,o=r.getRawAssetType().value;if(n!==o)return n<o?-1:1;var i=F(t.getCode(),r.getCode());return 0!==i?i:F(t.getIssuer(),r.getIssuer())}}],r&&L(t.prototype,r),n&&L(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function F(e,t){return U.compare(U.from(e,"ascii"),U.from(t,"ascii"))}var D=r(3296).Buffer,V=30;function q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("constant_product"!==e)throw new Error("liquidityPoolType is invalid");var r=t.assetA,n=t.assetB,o=t.fee;if(!(r&&r instanceof M))throw new Error("assetA is invalid");if(!(n&&n instanceof M))throw new Error("assetB is invalid");if(!o||o!==V)throw new Error("fee is invalid");if(-1!==M.compare(r,n))throw new Error("Assets are not in lexicographic order");var a=i.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),u=new i.LiquidityPoolConstantProductParameters({assetA:r.toXDRObject(),assetB:n.toXDRObject(),fee:o}).toXDR();return s(D.concat([a,u]))}var K=r(3296).Buffer;function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function z(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,X(n.key),n)}}function X(e){var t=function(e,t){if("object"!=H(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=H(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==H(t)?t:String(t)}var $=function(){function e(t,r,n,o){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"!=typeof o)throw new Error("Invalid passphrase provided to Transaction: expected a string but got a ".concat(H(o)));this._networkPassphrase=o,this._tx=t,this._signatures=r,this._fee=n}var t,r,n;return t=e,r=[{key:"signatures",get:function(){return this._signatures},set:function(e){throw new Error("Transaction is immutable")}},{key:"tx",get:function(){return this._tx},set:function(e){throw new Error("Transaction is immutable")}},{key:"fee",get:function(){return this._fee},set:function(e){throw new Error("Transaction is immutable")}},{key:"networkPassphrase",get:function(){return this._networkPassphrase},set:function(e){this._networkPassphrase=e}},{key:"sign",value:function(){for(var e=this,t=this.hash(),r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];n.forEach((function(r){var n=r.signDecorated(t);e.signatures.push(n)}))}},{key:"getKeypairSignature",value:function(e){return e.sign(this.hash()).toString("base64")}},{key:"addSignature",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!n||"string"!=typeof n)throw new Error("Invalid signature");if(!r||"string"!=typeof r)throw new Error("Invalid publicKey");var o=K.from(n,"base64");try{t=(e=C.fromPublicKey(r)).signatureHint()}catch(e){throw new Error("Invalid publicKey")}if(!e.verify(this.hash(),o))throw new Error("Invalid signature");this.signatures.push(new i.DecoratedSignature({hint:t,signature:o}))}},{key:"addDecoratedSignature",value:function(e){this.signatures.push(e)}},{key:"signHashX",value:function(e){if("string"==typeof e&&(e=K.from(e,"hex")),e.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var t=e,r=s(e),n=r.slice(r.length-4);this.signatures.push(new i.DecoratedSignature({hint:n,signature:t}))}},{key:"hash",value:function(){return s(this.signatureBase())}},{key:"signatureBase",value:function(){throw new Error("Implement in subclass")}},{key:"toEnvelope",value:function(){throw new Error("Implement in subclass")}},{key:"toXDR",value:function(){return this.toEnvelope().toXDR().toString("base64")}}],r&&z(t.prototype,r),n&&z(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),G=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,W=Math.ceil,Y=Math.floor,J="[BigNumber Error] ",Z=J+"Number primitive has more than 15 significant digits: ",Q=1e14,ee=14,te=9007199254740991,re=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],ne=1e7,oe=1e9;function ie(e){var t=0|e;return e>0||e===t?t:t-1}function ae(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=ee-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function se(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,u=e.e,c=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=o.length)<(c=i.length)?u:c,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function ue(e,t,r,n){if(e<t||e>r||e!==Y(e))throw Error(J+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function ce(e){var t=e.c.length-1;return ie(e.e/ee)==t&&e.c[t]%2!=0}function le(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function fe(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var pe=function e(t){var r,n,o,i,a,s,u,c,l,f,p=O.prototype={constructor:O,toString:null,valueOf:null},h=new O(1),y=20,d=4,m=-7,g=21,v=-1e7,b=1e7,w=!1,S=1,k=0,E={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},A="0123456789abcdefghijklmnopqrstuvwxyz",T=!0;function O(e,t){var r,i,a,s,u,c,l,f,p=this;if(!(p instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>b?p.c=p.e=null:e.e<v?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((c="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,u=e;u>=10;u/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!G.test(f=String(e)))return o(p,f,c);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(u=f.search(/e/i))>0?(s<0&&(s=u),s+=+f.slice(u+1),f=f.substring(0,u)):s<0&&(s=f.length)}else{if(ue(t,2,A.length,"Base"),10==t&&T)return _(p=new O(e),y+p.e+1,d);if(f=String(e),c="number"==typeof e){if(0*e!=0)return o(p,f,c,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,O.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(Z+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=A.slice(0,t),s=u=0,l=f.length;u<l;u++)if(r.indexOf(i=f.charAt(u))<0){if("."==i){if(u>s){s=l;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,u=-1,s=0;continue}return o(p,String(e),c,t)}c=!1,(s=(f=n(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(u=0;48===f.charCodeAt(u);u++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(u,++l)){if(l-=u,c&&O.DEBUG&&l>15&&(e>te||e!==Y(e)))throw Error(Z+p.s*e);if((s=s-u-1)>b)p.c=p.e=null;else if(s<v)p.c=[p.e=0];else{if(p.e=s,p.c=[],u=(s+1)%ee,s<0&&(u+=ee),u<l){for(u&&p.c.push(+f.slice(0,u)),l-=ee;u<l;)p.c.push(+f.slice(u,u+=ee));u=ee-(f=f.slice(u)).length}else u-=l;for(;u--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function P(e,t,r,n){var o,i,a,s,u;if(null==r?r=d:ue(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)u=ae(e.c),u=1==n||2==n&&(a<=m||a>=g)?le(u,a):fe(u,a,"0");else if(i=(e=_(new O(e),t,r)).e,s=(u=ae(e.c)).length,1==n||2==n&&(t<=i||i<=m)){for(;s<t;u+="0",s++);u=le(u,i)}else if(t-=a,u=fe(u,i,"0"),i+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-s)>0)for(i+1==s&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function x(e,t){for(var r,n,o=1,i=new O(e[0]);o<e.length;o++)(!(n=new O(e[o])).s||(r=se(i,n))===t||0===r&&i.s===t)&&(i=n);return i}function I(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*ee-1)>b?e.c=e.e=null:r<v?e.c=[e.e=0]:(e.e=r,e.c=t),e}function _(e,t,r,n){var o,i,a,s,u,c,l,f=e.c,p=re;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=ee,a=t,u=f[c=0],l=Y(u/p[o-a-1]%10);else if((c=W((i+1)/ee))>=f.length){if(!n)break e;for(;f.length<=c;f.push(0));u=l=0,o=1,a=(i%=ee)-ee+1}else{for(u=s=f[c],o=1;s>=10;s/=10,o++);l=(a=(i%=ee)-ee+o)<0?0:Y(u/p[o-a-1]%10)}if(n=n||t<0||null!=f[c+1]||(a<0?u:u%p[o-a-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(i>0?a>0?u/p[o-a]:0:f[c-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(ee-t%ee)%ee],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=c,s=1,c--):(f.length=c+1,s=p[ee-i],f[c]=a>0?Y(u/p[o-a]%p[a])*s:0),n)for(;;){if(0==c){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==Q&&(f[0]=1));break}if(f[c]+=s,f[c]!=Q)break;f[c--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<v&&(e.c=[e.e=0])}return e}function B(e){var t,r=e.e;return null===r?e.toString():(t=ae(e.c),t=r<=m||r>=g?le(t,r):fe(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=e,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(J+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(ue(r=e[t],0,oe,t),y=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(ue(r=e[t],0,8,t),d=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(ue(r[0],-oe,0,t),ue(r[1],0,oe,t),m=r[0],g=r[1]):(ue(r,-oe,oe,t),m=-(g=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)ue(r[0],-oe,-1,t),ue(r[1],1,oe,t),v=r[0],b=r[1];else{if(ue(r,-oe,oe,t),!r)throw Error(J+t+" cannot be zero: "+r);v=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(J+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(J+"crypto unavailable");w=r}else w=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(ue(r=e[t],0,9,t),S=r),e.hasOwnProperty(t="POW_PRECISION")&&(ue(r=e[t],0,oe,t),k=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(J+t+" not an object: "+r);E=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(J+t+" invalid: "+r);T="0123456789"==r.slice(0,10),A=r}}return{DECIMAL_PLACES:y,ROUNDING_MODE:d,EXPONENTIAL_AT:[m,g],RANGE:[v,b],CRYPTO:w,MODULO_MODE:S,POW_PRECISION:k,FORMAT:E,ALPHABET:A}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-oe&&o<=oe&&o===Y(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%ee)<1&&(t+=ee),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=Q||r!==Y(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(J+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return x(arguments,-1)},O.minimum=O.min=function(){return x(arguments,1)},O.random=(i=9007199254740992,a=Math.random()*i&2097151?function(){return Y(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,i,s=0,u=[],c=new O(h);if(null==e?e=y:ue(e,0,oe),o=W(e/ee),w)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(i=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(u.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw w=!1,Error(J+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(i=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(u.push(i%1e14),s+=7);s=o/7}if(!w)for(;s<o;)(i=a())<9e15&&(u[s++]=i%1e14);for(o=u[--s],e%=ee,o&&e&&(i=re[ee-e],u[s]=Y(o/i)*i);0===u[s];u.pop(),s--);if(s<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=ee);for(s=1,i=u[0];i>=10;i/=10,s++);s<ee&&(n-=ee-s)}return c.e=n,c.c=u,c}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var o,i,a=[0],s=0,u=e.length;s<u;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,i,a,s){var u,c,l,f,p,h,m,g,v=n.indexOf("."),b=y,w=d;for(v>=0&&(f=k,k=0,n=n.replace(".",""),h=(g=new O(o)).pow(n.length-v),k=f,g.c=t(fe(ae(h.c),h.e,"0"),10,i,e),g.e=g.c.length),l=f=(m=t(n,o,i,s?(u=A,e):(u=e,A))).length;0==m[--f];m.pop());if(!m[0])return u.charAt(0);if(v<0?--l:(h.c=m,h.e=l,h.s=a,m=(h=r(h,g,b,w,i)).c,p=h.r,l=h.e),v=m[c=l+b+1],f=i/2,p=p||c<0||null!=m[c+1],p=w<4?(null!=v||p)&&(0==w||w==(h.s<0?3:2)):v>f||v==f&&(4==w||p||6==w&&1&m[c-1]||w==(h.s<0?8:7)),c<1||!m[0])n=p?fe(u.charAt(1),-b,u.charAt(0)):u.charAt(0);else{if(m.length=c,p)for(--i;++m[--c]>i;)m[c]=0,c||(++l,m=[1].concat(m));for(f=m.length;!m[--f];);for(v=0,n="";v<=f;n+=u.charAt(m[v++]));n=fe(n,l,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,a,s=0,u=e.length,c=t%ne,l=t/ne|0;for(e=e.slice();u--;)s=((o=c*(i=e[u]%ne)+(n=l*i+(a=e[u]/ne|0)*c)%ne*ne+s)/r|0)+(n/ne|0)+l*a,e[u]=o%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,a,s){var u,c,l,f,p,h,y,d,m,g,v,b,w,S,k,E,A,T=n.s==o.s?1:-1,P=n.c,x=o.c;if(!(P&&P[0]&&x&&x[0]))return new O(n.s&&o.s&&(P?!x||P[0]!=x[0]:x)?P&&0==P[0]||!x?0*T:T/0:NaN);for(m=(d=new O(T)).c=[],T=i+(c=n.e-o.e)+1,s||(s=Q,c=ie(n.e/ee)-ie(o.e/ee),T=T/ee|0),l=0;x[l]==(P[l]||0);l++);if(x[l]>(P[l]||0)&&c--,T<0)m.push(1),f=!0;else{for(S=P.length,E=x.length,l=0,T+=2,(p=Y(s/(x[0]+1)))>1&&(x=e(x,p,s),P=e(P,p,s),E=x.length,S=P.length),w=E,v=(g=P.slice(0,E)).length;v<E;g[v++]=0);A=x.slice(),A=[0].concat(A),k=x[0],x[1]>=s/2&&k++;do{if(p=0,(u=t(x,g,E,v))<0){if(b=g[0],E!=v&&(b=b*s+(g[1]||0)),(p=Y(b/k))>1)for(p>=s&&(p=s-1),y=(h=e(x,p,s)).length,v=g.length;1==t(h,g,y,v);)p--,r(h,E<y?A:x,y,s),y=h.length,u=1;else 0==p&&(u=p=1),y=(h=x.slice()).length;if(y<v&&(h=[0].concat(h)),r(g,h,v,s),v=g.length,-1==u)for(;t(x,g,E,v)<1;)p++,r(g,E<v?A:x,v,s),v=g.length}else 0===u&&(p++,g=[0]);m[l++]=p,g[0]?g[v++]=P[w]||0:(g=[P[w]],v=1)}while((w++<S||null!=g[0])&&T--);f=null!=g[0],m[0]||m.splice(0,1)}if(s==Q){for(l=1,T=m[0];T>=10;T/=10,l++);_(d,i+(d.e=l+c*ee-1)+1,a,f)}else d.e=c,d.r=+f;return d}}(),s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,f=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,i=r?t:t.replace(f,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(s,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(u,"$1").replace(c,"0.$1")),t!=i))return new O(i,o);if(O.DEBUG)throw Error(J+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},p.absoluteValue=p.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},p.comparedTo=function(e,t){return se(this,new O(e,t))},p.decimalPlaces=p.dp=function(e,t){var r,n,o,i=this;if(null!=e)return ue(e,0,oe),null==t?t=d:ue(t,0,8),_(new O(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-ie(this.e/ee))*ee,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},p.dividedBy=p.div=function(e,t){return r(this,new O(e,t),y,d)},p.dividedToIntegerBy=p.idiv=function(e,t){return r(this,new O(e,t),0,1)},p.exponentiatedBy=p.pow=function(e,t){var r,n,o,i,a,s,u,c,l=this;if((e=new O(e)).c&&!e.isInteger())throw Error(J+"Exponent not an integer: "+B(e));if(null!=t&&(t=new O(t)),a=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return c=new O(Math.pow(+B(l),a?e.s*(2-ce(e)):+B(e))),t?c.mod(t):c;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!s&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||a&&l.c[1]>=24e7:l.c[0]<8e13||a&&l.c[0]<=9999975e7)))return i=l.s<0&&ce(e)?-0:0,l.e>-1&&(i=1/i),new O(s?1/i:i);k&&(i=W(k/ee+2))}for(a?(r=new O(.5),s&&(e.s=1),u=ce(e)):u=(o=Math.abs(+B(e)))%2,c=new O(h);;){if(u){if(!(c=c.times(l)).c)break;i?c.c.length>i&&(c.c.length=i):n&&(c=c.mod(t))}if(o){if(0===(o=Y(o/2)))break;u=o%2}else if(_(e=e.times(r),e.e+1,1),e.e>14)u=ce(e);else{if(0===(o=+B(e)))break;u=o%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}return n?c:(s&&(c=h.div(c)),t?c.mod(t):i?_(c,k,d,undefined):c)},p.integerValue=function(e){var t=new O(this);return null==e?e=d:ue(e,0,8),_(t,t.e+1,e)},p.isEqualTo=p.eq=function(e,t){return 0===se(this,new O(e,t))},p.isFinite=function(){return!!this.c},p.isGreaterThan=p.gt=function(e,t){return se(this,new O(e,t))>0},p.isGreaterThanOrEqualTo=p.gte=function(e,t){return 1===(t=se(this,new O(e,t)))||0===t},p.isInteger=function(){return!!this.c&&ie(this.e/ee)>this.c.length-2},p.isLessThan=p.lt=function(e,t){return se(this,new O(e,t))<0},p.isLessThanOrEqualTo=p.lte=function(e,t){return-1===(t=se(this,new O(e,t)))||0===t},p.isNaN=function(){return!this.s},p.isNegative=function(){return this.s<0},p.isPositive=function(){return this.s>0},p.isZero=function(){return!!this.c&&0==this.c[0]},p.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new O(e,t)).s,!s||!t)return new O(NaN);if(s!=t)return e.s=-t,a.plus(e);var u=a.e/ee,c=e.e/ee,l=a.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new O(f?a:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new O(l[0]?a:3==d?-0:0)}if(u=ie(u),c=ie(c),l=l.slice(),s=u-c){for((i=s<0)?(s=-s,o=l):(c=u,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=l.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(l[t]!=f[t]){i=l[t]<f[t];break}if(i&&(o=l,l=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=Q-1;n>s;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=Q}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?I(e,l,c):(e.s=3==d?-1:1,e.c=[e.e=0],e)},p.modulo=p.mod=function(e,t){var n,o,i=this;return e=new O(e,t),!i.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||i.c&&!i.c[0]?new O(i):(9==S?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,S),(e=i.minus(n.times(e))).c[0]||1!=S||(e.s=i.s),e)},p.multipliedBy=p.times=function(e,t){var r,n,o,i,a,s,u,c,l,f,p,h,y,d,m,g=this,v=g.c,b=(e=new O(e,t)).c;if(!(v&&b&&v[0]&&b[0]))return!g.s||!e.s||v&&!v[0]&&!b||b&&!b[0]&&!v?e.c=e.e=e.s=null:(e.s*=g.s,v&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=ie(g.e/ee)+ie(e.e/ee),e.s*=g.s,(u=v.length)<(f=b.length)&&(y=v,v=b,b=y,o=u,u=f,f=o),o=u+f,y=[];o--;y.push(0));for(d=Q,m=ne,o=f;--o>=0;){for(r=0,p=b[o]%m,h=b[o]/m|0,i=o+(a=u);i>o;)r=((c=p*(c=v[--a]%m)+(s=h*c+(l=v[a]/m|0)*p)%m*m+y[i]+r)/d|0)+(s/m|0)+h*l,y[i--]=c%d;y[i]=r}return r?++n:y.splice(0,1),I(e,y,n)},p.negated=function(){var e=new O(this);return e.s=-e.s||null,e},p.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new O(e,t)).s,!o||!t)return new O(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/ee,a=e.e/ee,s=n.c,u=e.c;if(!i||!a){if(!s||!u)return new O(o/0);if(!s[0]||!u[0])return u[0]?e:new O(s[0]?n:0*o)}if(i=ie(i),a=ie(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=u):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+u[t]+o)/Q|0,s[t]=Q===s[t]?0:s[t]%Q;return o&&(s=[o].concat(s),++a),I(e,s,a)},p.precision=p.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return ue(e,1,oe),null==t?t=d:ue(t,0,8),_(new O(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*ee+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},p.shiftedBy=function(e){return ue(e,-9007199254740991,te),this.times("1e"+e)},p.squareRoot=p.sqrt=function(){var e,t,n,o,i,a=this,s=a.c,u=a.s,c=a.e,l=y+4,f=new O("0.5");if(1!==u||!s||!s[0])return new O(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+B(a)))||u==1/0?(((t=ae(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=ie((c+1)/2)-(c<0||c%2),n=new O(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new O(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(a,i,l,1))),ae(i.c).slice(0,u)===(t=ae(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(_(n,n.e+y+2,1),e=!n.times(n).eq(a));break}if(!o&&(_(i,i.e+y+2,0),i.times(i).eq(a))){n=i;break}l+=4,u+=4,o=1}return _(n,n.e+y+1,d,e)},p.toExponential=function(e,t){return null!=e&&(ue(e,0,oe),e++),P(this,e,t,1)},p.toFixed=function(e,t){return null!=e&&(ue(e,0,oe),e=e+this.e+1),P(this,e,t)},p.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=E;else if("object"!=typeof r)throw Error(J+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,a=n.split("."),s=+r.groupSize,u=+r.secondaryGroupSize,c=r.groupSeparator||"",l=a[0],f=a[1],p=o.s<0,h=p?l.slice(1):l,y=h.length;if(u&&(i=s,s=u,u=i,y-=i),s>0&&y>0){for(i=y%s||s,l=h.substr(0,i);i<y;i+=s)l+=c+h.substr(i,s);u>0&&(l+=c+h.slice(i)),p&&(l="-"+l)}n=f?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):l}return(r.prefix||"")+n+(r.suffix||"")},p.toFraction=function(e){var t,n,o,i,a,s,u,c,l,f,p,y,m=this,g=m.c;if(null!=e&&(!(u=new O(e)).isInteger()&&(u.c||1!==u.s)||u.lt(h)))throw Error(J+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+B(u));if(!g)return new O(m);for(t=new O(h),l=n=new O(h),o=c=new O(h),y=ae(g),a=t.e=y.length-m.e-1,t.c[0]=re[(s=a%ee)<0?ee+s:s],e=!e||u.comparedTo(t)>0?a>0?t:l:u,s=b,b=1/0,u=new O(y),c.c[0]=0;f=r(u,t,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,l=c.plus(f.times(i=l)),c=i,t=u.minus(f.times(i=t)),u=i;return i=r(e.minus(n),o,0,1),c=c.plus(i.times(l)),n=n.plus(i.times(o)),c.s=l.s=m.s,p=r(l,o,a*=2,d).minus(m).abs().comparedTo(r(c,n,a,d).minus(m).abs())<1?[l,o]:[c,n],b=s,p},p.toNumber=function(){return+B(this)},p.toPrecision=function(e,t){return null!=e&&ue(e,1,oe),P(this,e,t,2)},p.toString=function(e){var t,r=this,o=r.s,i=r.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=m||i>=g?le(ae(r.c),i):fe(ae(r.c),i,"0"):10===e&&T?t=fe(ae((r=_(new O(r),y+i+1,d)).c),r.e,"0"):(ue(e,2,A.length,"Base"),t=n(fe(ae(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},p.valueOf=p.toJSON=function(){return B(this)},p._isBigNumber=!0,p[Symbol.toStringTag]="BigNumber",p[Symbol.for("nodejs.util.inspect.custom")]=p.valueOf,null!=t&&O.set(t),O}();var he=pe.clone();he.DEBUG=!0;const ye=he;function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return me(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return me(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ge=2147483647;function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){Se(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Se(e,t,r){return(t=Ee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ke(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ee(n.key),n)}}function Ee(e){var t=function(e,t){if("object"!=ve(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ve(t)?t:String(t)}var Ae=function(){function e(t,r,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(t&&t instanceof M))throw new Error("assetA is invalid");if(!(r&&r instanceof M))throw new Error("assetB is invalid");if(-1!==M.compare(t,r))throw new Error("Assets are not in lexicographic order");if(!n||n!==V)throw new Error("fee is invalid");this.assetA=t,this.assetB=r,this.fee=n}var t,r,n;return t=e,n=[{key:"fromOperation",value:function(e){var t=e.switch();if(t===i.AssetType.assetTypePoolShare()){var r=e.liquidityPool().constantProduct();return new this(M.fromOperation(r.assetA()),M.fromOperation(r.assetB()),r.fee())}throw new Error("Invalid asset type: ".concat(t.name))}}],(r=[{key:"toXDRObject",value:function(){var e=new i.LiquidityPoolConstantProductParameters({assetA:this.assetA.toXDRObject(),assetB:this.assetB.toXDRObject(),fee:this.fee}),t=new i.LiquidityPoolParameters("liquidityPoolConstantProduct",e);return new i.ChangeTrustAsset("assetTypePoolShare",t)}},{key:"getLiquidityPoolParameters",value:function(){return we(we({},this),{},{assetA:this.assetA,assetB:this.assetB,fee:this.fee})}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(e){return this.assetA.equals(e.assetA)&&this.assetB.equals(e.assetB)&&this.fee===e.fee}},{key:"toString",value:function(){var e=q("constant_product",this.getLiquidityPoolParameters()).toString("hex");return"liquidity_pool:".concat(e)}}])&&ke(t.prototype,r),n&&ke(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Oe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Pe(n.key),n)}}function Pe(e){var t=function(e,t){if("object"!=Te(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Te(t)?t:String(t)}var xe=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&!A.isValidEd25519PublicKey(t))throw new Error("Destination is invalid");if(this._destination=t,r){if(!(r instanceof i.ClaimPredicate))throw new Error("Predicate should be an xdr.ClaimPredicate");this._predicate=r}else this._predicate=i.ClaimPredicate.claimPredicateUnconditional()}var t,r,n;return t=e,n=[{key:"predicateUnconditional",value:function(){return i.ClaimPredicate.claimPredicateUnconditional()}},{key:"predicateAnd",value:function(e,t){if(!(e instanceof i.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof i.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return i.ClaimPredicate.claimPredicateAnd([e,t])}},{key:"predicateOr",value:function(e,t){if(!(e instanceof i.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof i.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return i.ClaimPredicate.claimPredicateOr([e,t])}},{key:"predicateNot",value:function(e){if(!(e instanceof i.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return i.ClaimPredicate.claimPredicateNot(e)}},{key:"predicateBeforeAbsoluteTime",value:function(e){return i.ClaimPredicate.claimPredicateBeforeAbsoluteTime(i.Int64.fromString(e))}},{key:"predicateBeforeRelativeTime",value:function(e){return i.ClaimPredicate.claimPredicateBeforeRelativeTime(i.Int64.fromString(e))}},{key:"fromXDR",value:function(e){var t;if(e.switch()===i.ClaimantType.claimantTypeV0())return t=e.v0(),new this(A.encodeEd25519PublicKey(t.destination().ed25519()),t.predicate());throw new Error("Invalid claimant type: ".concat(e.switch().name))}}],(r=[{key:"toXDRObject",value:function(){var e=new i.ClaimantV0({destination:C.fromPublicKey(this._destination).xdrAccountId(),predicate:this._predicate});return i.Claimant.claimantTypeV0(e)}},{key:"destination",get:function(){return this._destination},set:function(e){throw new Error("Claimant is immutable")}},{key:"predicate",get:function(){return this._predicate},set:function(e){throw new Error("Claimant is immutable")}}])&&Oe(t.prototype,r),n&&Oe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function _e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Be(n.key),n)}}function Be(e){var t=function(e,t){if("object"!=Ie(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ie(t)?t:String(t)}var Re=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("liquidityPoolId cannot be empty");if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Liquidity pool ID is not a valid hash");this.liquidityPoolId=t}var t,r,n;return t=e,n=[{key:"fromOperation",value:function(e){var t=e.switch();if(t===i.AssetType.assetTypePoolShare())return new this(e.liquidityPoolId().toString("hex"));throw new Error("Invalid asset type: ".concat(t.name))}}],(r=[{key:"toXDRObject",value:function(){var e=i.PoolId.fromXDR(this.liquidityPoolId,"hex");return new i.TrustLineAsset("assetTypePoolShare",e)}},{key:"getLiquidityPoolId",value:function(){return String(this.liquidityPoolId)}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(e){return this.liquidityPoolId===e.getLiquidityPoolId()}},{key:"toString",value:function(){return"liquidity_pool:".concat(this.liquidityPoolId)}}])&&_e(t.prototype,r),n&&_e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();var Ce=r(3296).Buffer;function Ue(e){return A.isValidMed25519PublicKey(e)?function(e){var t=A.decodeMed25519PublicKey(e);return i.MuxedAccount.keyTypeMuxedEd25519(new i.MuxedAccountMed25519({id:i.Uint64.fromXDR(t.subarray(-8)),ed25519:t.subarray(0,-8)}))}(e):i.MuxedAccount.keyTypeEd25519(A.decodeEd25519PublicKey(e))}function Ne(e){return e.switch().value===i.CryptoKeyType.keyTypeMuxedEd25519().value?function(e){if(e.switch()===i.CryptoKeyType.keyTypeEd25519())return Ne(e);var t=e.med25519();return A.encodeMed25519PublicKey(Ce.concat([t.ed25519(),t.id().toXDR("raw")]))}(e):A.encodeEd25519PublicKey(e.ed25519())}function Le(e,t){if(!A.isValidEd25519PublicKey(e))throw new Error("address should be a Stellar account ID (G...)");if("string"!=typeof t)throw new Error("id should be a string representing a number (uint64)");return i.MuxedAccount.keyTypeMuxedEd25519(new i.MuxedAccountMed25519({id:i.Uint64.fromString(t),ed25519:A.decodeEd25519PublicKey(e)}))}function je(e){if(A.isValidEd25519PublicKey(e))return e;if(!A.isValidMed25519PublicKey(e))throw new TypeError("expected muxed account (M...), got ".concat(e));var t=Ue(e);return A.encodeEd25519PublicKey(t.med25519().ed25519())}function Me(e){if("string"!=typeof e||72!==e.length)throw new Error("must provide a valid claimable balance id")}var Fe=r(3296).Buffer;var De=r(3296).Buffer;function Ve(e,t){if(e>=0&&e<=255)return!0;throw new Error("".concat(t," value must be between 0 and 255"))}var qe=r(3296).Buffer;function Ke(e){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(e)}function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}function ze(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xe(n.key),n)}}function Xe(e){var t=function(e,t){if("object"!=He(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==He(t)?t:String(t)}var $e=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),A.isValidEd25519PublicKey(t))this._type="account",this._key=A.decodeEd25519PublicKey(t);else{if(!A.isValidContract(t))throw new Error("Unsupported address type");this._type="contract",this._key=A.decodeContract(t)}}var t,r,n;return t=e,n=[{key:"fromString",value:function(t){return new e(t)}},{key:"account",value:function(t){return new e(A.encodeEd25519PublicKey(t))}},{key:"contract",value:function(t){return new e(A.encodeContract(t))}},{key:"fromScVal",value:function(t){return e.fromScAddress(t.address())}},{key:"fromScAddress",value:function(t){switch(t.switch()){case i.ScAddressType.scAddressTypeAccount():return e.account(t.accountId().ed25519());case i.ScAddressType.scAddressTypeContract():return e.contract(t.contractId());default:throw new Error("Unsupported address type")}}}],(r=[{key:"toString",value:function(){switch(this._type){case"account":return A.encodeEd25519PublicKey(this._key);case"contract":return A.encodeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toScVal",value:function(){return i.ScVal.scvAddress(this.toScAddress())}},{key:"toScAddress",value:function(){switch(this._type){case"account":return i.ScAddress.scAddressTypeAccount(i.PublicKey.publicKeyTypeEd25519(this._key));case"contract":return i.ScAddress.scAddressTypeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toBuffer",value:function(){return this._key}}])&&ze(t.prototype,r),n&&ze(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Ge=r(3296).Buffer;function We(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ye(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ye(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Je(e){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(e)}function Ze(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qe(n.key),n)}}function Qe(e){var t=function(e,t){if("object"!=Je(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Je(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Je(t)?t:String(t)}var et=1e7,tt=1,rt=2,nt=4,ot=8,it=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,o;return t=e,o=[{key:"setSourceAccount",value:function(e,t){if(t.source)try{e.sourceAccount=Ue(t.source)}catch(e){throw new Error("Source address is invalid")}}},{key:"fromXDRObject",value:function(e){var t={};e.sourceAccount()&&(t.source=Ne(e.sourceAccount()));var r=e.body().value(),n=e.body().switch().name;switch(n){case"createAccount":t.type="createAccount",t.destination=at(r.destination()),t.startingBalance=this._fromXDRAmount(r.startingBalance());break;case"payment":t.type="payment",t.destination=Ne(r.destination()),t.asset=M.fromOperation(r.asset()),t.amount=this._fromXDRAmount(r.amount());break;case"pathPaymentStrictReceive":t.type="pathPaymentStrictReceive",t.sendAsset=M.fromOperation(r.sendAsset()),t.sendMax=this._fromXDRAmount(r.sendMax()),t.destination=Ne(r.destination()),t.destAsset=M.fromOperation(r.destAsset()),t.destAmount=this._fromXDRAmount(r.destAmount()),t.path=[];var o=r.path();Object.keys(o).forEach((function(e){t.path.push(M.fromOperation(o[e]))}));break;case"pathPaymentStrictSend":t.type="pathPaymentStrictSend",t.sendAsset=M.fromOperation(r.sendAsset()),t.sendAmount=this._fromXDRAmount(r.sendAmount()),t.destination=Ne(r.destination()),t.destAsset=M.fromOperation(r.destAsset()),t.destMin=this._fromXDRAmount(r.destMin()),t.path=[];var a=r.path();Object.keys(a).forEach((function(e){t.path.push(M.fromOperation(a[e]))}));break;case"changeTrust":t.type="changeTrust",r.line().switch()===i.AssetType.assetTypePoolShare()?t.line=Ae.fromOperation(r.line()):t.line=M.fromOperation(r.line()),t.limit=this._fromXDRAmount(r.limit());break;case"allowTrust":t.type="allowTrust",t.trustor=at(r.trustor()),t.assetCode=r.asset().value().toString(),t.assetCode=y(t.assetCode,"\0"),t.authorize=r.authorize();break;case"setOptions":if(t.type="setOptions",r.inflationDest()&&(t.inflationDest=at(r.inflationDest())),t.clearFlags=r.clearFlags(),t.setFlags=r.setFlags(),t.masterWeight=r.masterWeight(),t.lowThreshold=r.lowThreshold(),t.medThreshold=r.medThreshold(),t.highThreshold=r.highThreshold(),t.homeDomain=void 0!==r.homeDomain()?r.homeDomain().toString("ascii"):void 0,r.signer()){var s={},u=r.signer().key().arm();if("ed25519"===u)s.ed25519PublicKey=at(r.signer().key());else if("preAuthTx"===u)s.preAuthTx=r.signer().key().preAuthTx();else if("hashX"===u)s.sha256Hash=r.signer().key().hashX();else if("ed25519SignedPayload"===u){var c=r.signer().key().ed25519SignedPayload();s.ed25519SignedPayload=A.encodeSignedPayload(c.toXDR())}s.weight=r.signer().weight(),t.signer=s}break;case"manageOffer":case"manageSellOffer":t.type="manageSellOffer",t.selling=M.fromOperation(r.selling()),t.buying=M.fromOperation(r.buying()),t.amount=this._fromXDRAmount(r.amount()),t.price=this._fromXDRPrice(r.price()),t.offerId=r.offerId().toString();break;case"manageBuyOffer":t.type="manageBuyOffer",t.selling=M.fromOperation(r.selling()),t.buying=M.fromOperation(r.buying()),t.buyAmount=this._fromXDRAmount(r.buyAmount()),t.price=this._fromXDRPrice(r.price()),t.offerId=r.offerId().toString();break;case"createPassiveOffer":case"createPassiveSellOffer":t.type="createPassiveSellOffer",t.selling=M.fromOperation(r.selling()),t.buying=M.fromOperation(r.buying()),t.amount=this._fromXDRAmount(r.amount()),t.price=this._fromXDRPrice(r.price());break;case"accountMerge":t.type="accountMerge",t.destination=Ne(r);break;case"manageData":t.type="manageData",t.name=r.dataName().toString("ascii"),t.value=r.dataValue();break;case"inflation":t.type="inflation";break;case"bumpSequence":t.type="bumpSequence",t.bumpTo=r.bumpTo().toString();break;case"createClaimableBalance":t.type="createClaimableBalance",t.asset=M.fromOperation(r.asset()),t.amount=this._fromXDRAmount(r.amount()),t.claimants=[],r.claimants().forEach((function(e){t.claimants.push(xe.fromXDR(e))}));break;case"claimClaimableBalance":t.type="claimClaimableBalance",t.balanceId=r.toXDR("hex");break;case"beginSponsoringFutureReserves":t.type="beginSponsoringFutureReserves",t.sponsoredId=at(r.sponsoredId());break;case"endSponsoringFutureReserves":t.type="endSponsoringFutureReserves";break;case"revokeSponsorship":!function(e,t){switch(e.switch().name){case"revokeSponsorshipLedgerEntry":var r=e.ledgerKey();switch(r.switch().name){case i.LedgerEntryType.account().name:t.type="revokeAccountSponsorship",t.account=at(r.account().accountId());break;case i.LedgerEntryType.trustline().name:t.type="revokeTrustlineSponsorship",t.account=at(r.trustLine().accountId());var n=r.trustLine().asset();n.switch()===i.AssetType.assetTypePoolShare()?t.asset=Re.fromOperation(n):t.asset=M.fromOperation(n);break;case i.LedgerEntryType.offer().name:t.type="revokeOfferSponsorship",t.seller=at(r.offer().sellerId()),t.offerId=r.offer().offerId().toString();break;case i.LedgerEntryType.data().name:t.type="revokeDataSponsorship",t.account=at(r.data().accountId()),t.name=r.data().dataName().toString("ascii");break;case i.LedgerEntryType.claimableBalance().name:t.type="revokeClaimableBalanceSponsorship",t.balanceId=r.claimableBalance().balanceId().toXDR("hex");break;case i.LedgerEntryType.liquidityPool().name:t.type="revokeLiquidityPoolSponsorship",t.liquidityPoolId=r.liquidityPool().liquidityPoolId().toString("hex");break;default:throw new Error("Unknown ledgerKey: ".concat(e.switch().name))}break;case"revokeSponsorshipSigner":t.type="revokeSignerSponsorship",t.account=at(e.signer().accountId()),t.signer=function(e){var t={};switch(e.switch().name){case i.SignerKeyType.signerKeyTypeEd25519().name:t.ed25519PublicKey=A.encodeEd25519PublicKey(e.ed25519());break;case i.SignerKeyType.signerKeyTypePreAuthTx().name:t.preAuthTx=e.preAuthTx().toString("hex");break;case i.SignerKeyType.signerKeyTypeHashX().name:t.sha256Hash=e.hashX().toString("hex");break;default:throw new Error("Unknown signerKey: ".concat(e.switch().name))}return t}(e.signer().signerKey());break;default:throw new Error("Unknown revokeSponsorship: ".concat(e.switch().name))}}(r,t);break;case"clawback":t.type="clawback",t.amount=this._fromXDRAmount(r.amount()),t.from=Ne(r.from()),t.asset=M.fromOperation(r.asset());break;case"clawbackClaimableBalance":t.type="clawbackClaimableBalance",t.balanceId=r.toXDR("hex");break;case"setTrustLineFlags":t.type="setTrustLineFlags",t.asset=M.fromOperation(r.asset()),t.trustor=at(r.trustor());var l=r.clearFlags(),f=r.setFlags(),p={authorized:i.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:i.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:i.TrustLineFlags.trustlineClawbackEnabledFlag()};t.flags={},Object.keys(p).forEach((function(e){var r;t.flags[e]=(r=p[e].value,!!(f&r)||!(l&r)&&void 0)}));break;case"liquidityPoolDeposit":t.type="liquidityPoolDeposit",t.liquidityPoolId=r.liquidityPoolId().toString("hex"),t.maxAmountA=this._fromXDRAmount(r.maxAmountA()),t.maxAmountB=this._fromXDRAmount(r.maxAmountB()),t.minPrice=this._fromXDRPrice(r.minPrice()),t.maxPrice=this._fromXDRPrice(r.maxPrice());break;case"liquidityPoolWithdraw":t.type="liquidityPoolWithdraw",t.liquidityPoolId=r.liquidityPoolId().toString("hex"),t.amount=this._fromXDRAmount(r.amount()),t.minAmountA=this._fromXDRAmount(r.minAmountA()),t.minAmountB=this._fromXDRAmount(r.minAmountB());break;case"invokeHostFunction":var h;t.type="invokeHostFunction",t.func=r.hostFunction(),t.auth=null!==(h=r.auth())&&void 0!==h?h:[];break;case"extendFootprintTtl":t.type="extendFootprintTtl",t.extendTo=r.extendTo();break;case"restoreFootprint":t.type="restoreFootprint";break;default:throw new Error("Unknown operation: ".concat(n))}return t}},{key:"isValidAmount",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof e)return!1;try{t=new ye(e)}catch(e){return!1}return!(!r&&t.isZero()||t.isNegative()||t.times(et).gt(new ye("9223372036854775807").toString())||t.decimalPlaces()>7||t.isNaN()||!t.isFinite())}},{key:"constructAmountRequirementsError",value:function(e){return"".concat(e," argument must be of type String, represent a positive number and have at most 7 digits after the decimal")}},{key:"_checkUnsignedIntValue",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0!==t)switch("string"==typeof t&&(t=parseFloat(t)),!0){case"number"!=typeof t||!Number.isFinite(t)||t%1!=0:throw new Error("".concat(e," value is invalid"));case t<0:throw new Error("".concat(e," value must be unsigned"));case!r||r&&r(t,e):return t;default:throw new Error("".concat(e," value is invalid"))}}},{key:"_toXDRAmount",value:function(e){var t=new ye(e).times(et);return n.Hyper.fromString(t.toString())}},{key:"_fromXDRAmount",value:function(e){return new ye(e).div(et).toFixed(7)}},{key:"_fromXDRPrice",value:function(e){return new ye(e.n()).div(new ye(e.d())).toString()}},{key:"_toXDRPrice",value:function(e){var t;if(e.n&&e.d)t=new i.Price(e);else{var r=function(e){for(var t,r,n=new ye(e),o=[[new ye(0),new ye(1)],[new ye(1),new ye(0)]],i=2;!n.gt(ge);){t=n.integerValue(ye.ROUND_FLOOR),r=n.minus(t);var a=t.times(o[i-1][0]).plus(o[i-2][0]),s=t.times(o[i-1][1]).plus(o[i-2][1]);if(a.gt(ge)||s.gt(ge))break;if(o.push([a,s]),r.eq(0))break;n=new ye(1).div(r),i+=1}var u=de(o[o.length-1],2),c=u[0],l=u[1];if(c.isZero()||l.isZero())throw new Error("Couldn't find approximation");return[c.toNumber(),l.toNumber()]}(e);t=new i.Price({n:parseInt(r[0],10),d:parseInt(r[1],10)})}if(t.n()<0||t.d()<0)throw new Error("price must be positive");return t}}],(r=null)&&Ze(t.prototype,r),o&&Ze(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function at(e){return A.encodeEd25519PublicKey(e.ed25519())}it.accountMerge=function(e){var t={};try{t.body=i.OperationBody.accountMerge(Ue(e.destination))}catch(e){throw new Error("destination is invalid")}return this.setSourceAccount(t,e),new i.Operation(t)},it.allowTrust=function(e){if(!A.isValidEd25519PublicKey(e.trustor))throw new Error("trustor is invalid");var t={};if(t.trustor=C.fromPublicKey(e.trustor).xdrAccountId(),e.assetCode.length<=4){var r=e.assetCode.padEnd(4,"\0");t.asset=i.AssetCode.assetTypeCreditAlphanum4(r)}else{if(!(e.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var n=e.assetCode.padEnd(12,"\0");t.asset=i.AssetCode.assetTypeCreditAlphanum12(n)}"boolean"==typeof e.authorize?e.authorize?t.authorize=i.TrustLineFlags.authorizedFlag().value:t.authorize=0:t.authorize=e.authorize;var o=new i.AllowTrustOp(t),a={};return a.body=i.OperationBody.allowTrust(o),this.setSourceAccount(a,e),new i.Operation(a)},it.bumpSequence=function(e){var t={};if("string"!=typeof e.bumpTo)throw new Error("bumpTo must be a string");try{new ye(e.bumpTo)}catch(e){throw new Error("bumpTo must be a stringified number")}t.bumpTo=n.Hyper.fromString(e.bumpTo);var r=new i.BumpSequenceOp(t),o={};return o.body=i.OperationBody.bumpSequence(r),this.setSourceAccount(o,e),new i.Operation(o)},it.changeTrust=function(e){var t={};if(e.asset instanceof M)t.line=e.asset.toChangeTrustXDRObject();else{if(!(e.asset instanceof Ae))throw new TypeError("asset must be Asset or LiquidityPoolAsset");t.line=e.asset.toXDRObject()}if(void 0!==e.limit&&!this.isValidAmount(e.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));e.limit?t.limit=this._toXDRAmount(e.limit):t.limit=n.Hyper.fromString(new ye("9223372036854775807").toString()),e.source&&(t.source=e.source.masterKeypair);var r=new i.ChangeTrustOp(t),o={};return o.body=i.OperationBody.changeTrust(r),this.setSourceAccount(o,e),new i.Operation(o)},it.createAccount=function(e){if(!A.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");if(!this.isValidAmount(e.startingBalance,!0))throw new TypeError(this.constructAmountRequirementsError("startingBalance"));var t={};t.destination=C.fromPublicKey(e.destination).xdrAccountId(),t.startingBalance=this._toXDRAmount(e.startingBalance);var r=new i.CreateAccountOp(t),n={};return n.body=i.OperationBody.createAccount(r),this.setSourceAccount(n,e),new i.Operation(n)},it.createClaimableBalance=function(e){if(!(e.asset instanceof M))throw new Error("must provide an asset for create claimable balance operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(!Array.isArray(e.claimants)||0===e.claimants.length)throw new Error("must provide at least one claimant");var t={};t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount),t.claimants=Object.values(e.claimants).map((function(e){return e.toXDRObject()}));var r=new i.CreateClaimableBalanceOp(t),n={};return n.body=i.OperationBody.createClaimableBalance(r),this.setSourceAccount(n,e),new i.Operation(n)},it.claimClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Me(e.balanceId);var t={};t.balanceId=i.ClaimableBalanceId.fromXDR(e.balanceId,"hex");var r=new i.ClaimClaimableBalanceOp(t),n={};return n.body=i.OperationBody.claimClaimableBalance(r),this.setSourceAccount(n,e),new i.Operation(n)},it.clawbackClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Me(e.balanceId);var t={balanceId:i.ClaimableBalanceId.fromXDR(e.balanceId,"hex")},r={body:i.OperationBody.clawbackClaimableBalance(new i.ClawbackClaimableBalanceOp(t))};return this.setSourceAccount(r,e),new i.Operation(r)},it.createPassiveSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price);var r=new i.CreatePassiveSellOfferOp(t),n={};return n.body=i.OperationBody.createPassiveSellOffer(r),this.setSourceAccount(n,e),new i.Operation(n)},it.inflation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.OperationBody.inflation(),this.setSourceAccount(t,e),new i.Operation(t)},it.manageData=function(e){var t={};if(!("string"==typeof e.name&&e.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(t.dataName=e.name,"string"!=typeof e.value&&!Fe.isBuffer(e.value)&&null!==e.value)throw new Error("value must be a string, Buffer or null");if("string"==typeof e.value?t.dataValue=Fe.from(e.value):t.dataValue=e.value,null!==t.dataValue&&t.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var r=new i.ManageDataOp(t),n={};return n.body=i.OperationBody.manageData(r),this.setSourceAccount(n,e),new i.Operation(n)},it.manageSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount,!0))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),void 0!==e.offerId?e.offerId=e.offerId.toString():e.offerId="0",t.offerId=n.Hyper.fromString(e.offerId);var r=new i.ManageSellOfferOp(t),o={};return o.body=i.OperationBody.manageSellOffer(r),this.setSourceAccount(o,e),new i.Operation(o)},it.manageBuyOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.buyAmount,!0))throw new TypeError(this.constructAmountRequirementsError("buyAmount"));if(t.buyAmount=this._toXDRAmount(e.buyAmount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),void 0!==e.offerId?e.offerId=e.offerId.toString():e.offerId="0",t.offerId=n.Hyper.fromString(e.offerId);var r=new i.ManageBuyOfferOp(t),o={};return o.body=i.OperationBody.manageBuyOffer(r),this.setSourceAccount(o,e),new i.Operation(o)},it.pathPaymentStrictReceive=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendMax):throw new TypeError(this.constructAmountRequirementsError("sendMax"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destAmount):throw new TypeError(this.constructAmountRequirementsError("destAmount"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendMax=this._toXDRAmount(e.sendMax);try{t.destination=Ue(e.destination)}catch(e){throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destAmount=this._toXDRAmount(e.destAmount);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new i.PathPaymentStrictReceiveOp(t),o={};return o.body=i.OperationBody.pathPaymentStrictReceive(n),this.setSourceAccount(o,e),new i.Operation(o)},it.pathPaymentStrictSend=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendAmount):throw new TypeError(this.constructAmountRequirementsError("sendAmount"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destMin):throw new TypeError(this.constructAmountRequirementsError("destMin"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendAmount=this._toXDRAmount(e.sendAmount);try{t.destination=Ue(e.destination)}catch(e){throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destMin=this._toXDRAmount(e.destMin);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new i.PathPaymentStrictSendOp(t),o={};return o.body=i.OperationBody.pathPaymentStrictSend(n),this.setSourceAccount(o,e),new i.Operation(o)},it.payment=function(e){if(!e.asset)throw new Error("Must provide an asset for a payment operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));var t={};try{t.destination=Ue(e.destination)}catch(e){throw new Error("destination is invalid")}t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount);var r=new i.PaymentOp(t),n={};return n.body=i.OperationBody.payment(r),this.setSourceAccount(n,e),new i.Operation(n)},it.setOptions=function(e){var t={};if(e.inflationDest){if(!A.isValidEd25519PublicKey(e.inflationDest))throw new Error("inflationDest is invalid");t.inflationDest=C.fromPublicKey(e.inflationDest).xdrAccountId()}if(t.clearFlags=this._checkUnsignedIntValue("clearFlags",e.clearFlags),t.setFlags=this._checkUnsignedIntValue("setFlags",e.setFlags),t.masterWeight=this._checkUnsignedIntValue("masterWeight",e.masterWeight,Ve),t.lowThreshold=this._checkUnsignedIntValue("lowThreshold",e.lowThreshold,Ve),t.medThreshold=this._checkUnsignedIntValue("medThreshold",e.medThreshold,Ve),t.highThreshold=this._checkUnsignedIntValue("highThreshold",e.highThreshold,Ve),void 0!==e.homeDomain&&"string"!=typeof e.homeDomain)throw new TypeError("homeDomain argument must be of type String");if(t.homeDomain=e.homeDomain,e.signer){var r,n=this._checkUnsignedIntValue("signer.weight",e.signer.weight,Ve),o=0;if(e.signer.ed25519PublicKey){if(!A.isValidEd25519PublicKey(e.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var a=A.decodeEd25519PublicKey(e.signer.ed25519PublicKey);r=new i.SignerKey.signerKeyTypeEd25519(a),o+=1}if(e.signer.preAuthTx){if("string"==typeof e.signer.preAuthTx&&(e.signer.preAuthTx=De.from(e.signer.preAuthTx,"hex")),!De.isBuffer(e.signer.preAuthTx)||32!==e.signer.preAuthTx.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");r=new i.SignerKey.signerKeyTypePreAuthTx(e.signer.preAuthTx),o+=1}if(e.signer.sha256Hash){if("string"==typeof e.signer.sha256Hash&&(e.signer.sha256Hash=De.from(e.signer.sha256Hash,"hex")),!De.isBuffer(e.signer.sha256Hash)||32!==e.signer.sha256Hash.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");r=new i.SignerKey.signerKeyTypeHashX(e.signer.sha256Hash),o+=1}if(e.signer.ed25519SignedPayload){if(!A.isValidSignedPayload(e.signer.ed25519SignedPayload))throw new Error("signer.ed25519SignedPayload is invalid.");var s=A.decodeSignedPayload(e.signer.ed25519SignedPayload),u=i.SignerKeyEd25519SignedPayload.fromXDR(s);r=i.SignerKey.signerKeyTypeEd25519SignedPayload(u),o+=1}if(1!==o)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");t.signer=new i.Signer({key:r,weight:n})}var c=new i.SetOptionsOp(t),l={};return l.body=i.OperationBody.setOptions(c),this.setSourceAccount(l,e),new i.Operation(l)},it.beginSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(e.sponsoredId))throw new Error("sponsoredId is invalid");var t=new i.BeginSponsoringFutureReservesOp({sponsoredId:C.fromPublicKey(e.sponsoredId).xdrAccountId()}),r={};return r.body=i.OperationBody.beginSponsoringFutureReserves(t),this.setSourceAccount(r,e),new i.Operation(r)},it.endSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(t,e),new i.Operation(t)},it.revokeAccountSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=i.LedgerKey.account(new i.LedgerKeyAccount({accountId:C.fromPublicKey(e.account).xdrAccountId()})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},it.revokeTrustlineSponsorship=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");if(t.asset instanceof M)e=t.asset.toTrustLineXDRObject();else{if(!(t.asset instanceof Re))throw new TypeError("asset must be an Asset or LiquidityPoolId");e=t.asset.toXDRObject()}var r=i.LedgerKey.trustline(new i.LedgerKeyTrustLine({accountId:C.fromPublicKey(t.account).xdrAccountId(),asset:e})),n=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(r),o={};return o.body=i.OperationBody.revokeSponsorship(n),this.setSourceAccount(o,t),new i.Operation(o)},it.revokeOfferSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(e.seller))throw new Error("seller is invalid");if("string"!=typeof e.offerId)throw new Error("offerId is invalid");var t=i.LedgerKey.offer(new i.LedgerKeyOffer({sellerId:C.fromPublicKey(e.seller).xdrAccountId(),offerId:i.Int64.fromString(e.offerId)})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},it.revokeDataSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if("string"!=typeof e.name||e.name.length>64)throw new Error("name must be a string, up to 64 characters");var t=i.LedgerKey.data(new i.LedgerKeyData({accountId:C.fromPublicKey(e.account).xdrAccountId(),dataName:e.name})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},it.revokeClaimableBalanceSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"!=typeof e.balanceId)throw new Error("balanceId is invalid");var t=i.LedgerKey.claimableBalance(new i.LedgerKeyClaimableBalance({balanceId:i.ClaimableBalanceId.fromXDR(e.balanceId,"hex")})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},it.revokeLiquidityPoolSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"!=typeof e.liquidityPoolId)throw new Error("liquidityPoolId is invalid");var t=i.LedgerKey.liquidityPool(new i.LedgerKeyLiquidityPool({liquidityPoolId:i.PoolId.fromXDR(e.liquidityPoolId,"hex")})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={body:i.OperationBody.revokeSponsorship(r)};return this.setSourceAccount(n,e),new i.Operation(n)},it.revokeSignerSponsorship=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");if(t.signer.ed25519PublicKey){if(!A.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var r=A.decodeEd25519PublicKey(t.signer.ed25519PublicKey);e=new i.SignerKey.signerKeyTypeEd25519(r)}else if(t.signer.preAuthTx){var n;if(n="string"==typeof t.signer.preAuthTx?qe.from(t.signer.preAuthTx,"hex"):t.signer.preAuthTx,!qe.isBuffer(n)||32!==n.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");e=new i.SignerKey.signerKeyTypePreAuthTx(n)}else{if(!t.signer.sha256Hash)throw new Error("signer is invalid");var o;if(o="string"==typeof t.signer.sha256Hash?qe.from(t.signer.sha256Hash,"hex"):t.signer.sha256Hash,!qe.isBuffer(o)||32!==o.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");e=new i.SignerKey.signerKeyTypeHashX(o)}var a=new i.RevokeSponsorshipOpSigner({accountId:C.fromPublicKey(t.account).xdrAccountId(),signerKey:e}),s=i.RevokeSponsorshipOp.revokeSponsorshipSigner(a),u={};return u.body=i.OperationBody.revokeSponsorship(s),this.setSourceAccount(u,t),new i.Operation(u)},it.clawback=function(e){var t={};if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));t.amount=this._toXDRAmount(e.amount),t.asset=e.asset.toXDRObject();try{t.from=Ue(e.from)}catch(e){throw new Error("from address is invalid")}var r={body:i.OperationBody.clawback(new i.ClawbackOp(t))};return this.setSourceAccount(r,e),new i.Operation(r)},it.setTrustLineFlags=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if("object"!==Ke(e.flags)||0===Object.keys(e.flags).length)throw new Error("opts.flags must be a map of boolean flags to modify");var r={authorized:i.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:i.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:i.TrustLineFlags.trustlineClawbackEnabledFlag()},n=0,o=0;Object.keys(e.flags).forEach((function(t){if(!Object.prototype.hasOwnProperty.call(r,t))throw new Error("unsupported flag name specified: ".concat(t));var i=e.flags[t],a=r[t].value;!0===i?o|=a:!1===i&&(n|=a)})),t.trustor=C.fromPublicKey(e.trustor).xdrAccountId(),t.asset=e.asset.toXDRObject(),t.clearFlags=n,t.setFlags=o;var a={body:i.OperationBody.setTrustLineFlags(new i.SetTrustLineFlagsOp(t))};return this.setSourceAccount(a,e),new i.Operation(a)},it.liquidityPoolDeposit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.liquidityPoolId,r=e.maxAmountA,n=e.maxAmountB,o=e.minPrice,a=e.maxPrice,s={};if(!t)throw new TypeError("liquidityPoolId argument is required");if(s.liquidityPoolId=i.PoolId.fromXDR(t,"hex"),!this.isValidAmount(r,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountA"));if(s.maxAmountA=this._toXDRAmount(r),!this.isValidAmount(n,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountB"));if(s.maxAmountB=this._toXDRAmount(n),void 0===o)throw new TypeError("minPrice argument is required");if(s.minPrice=this._toXDRPrice(o),void 0===a)throw new TypeError("maxPrice argument is required");s.maxPrice=this._toXDRPrice(a);var u=new i.LiquidityPoolDepositOp(s),c={body:i.OperationBody.liquidityPoolDeposit(u)};return this.setSourceAccount(c,e),new i.Operation(c)},it.liquidityPoolWithdraw=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if(!e.liquidityPoolId)throw new TypeError("liquidityPoolId argument is required");if(t.liquidityPoolId=i.PoolId.fromXDR(e.liquidityPoolId,"hex"),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),!this.isValidAmount(e.minAmountA,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountA"));if(t.minAmountA=this._toXDRAmount(e.minAmountA),!this.isValidAmount(e.minAmountB,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountB"));t.minAmountB=this._toXDRAmount(e.minAmountB);var r=new i.LiquidityPoolWithdrawOp(t),n={body:i.OperationBody.liquidityPoolWithdraw(r)};return this.setSourceAccount(n,e),new i.Operation(n)},it.invokeHostFunction=function(e){if(!e.func)throw new TypeError("host function invocation ('func') required (got ".concat(JSON.stringify(e),")"));var t=new i.InvokeHostFunctionOp({hostFunction:e.func,auth:e.auth||[]}),r={body:i.OperationBody.invokeHostFunction(t)};return this.setSourceAccount(r,e),new i.Operation(r)},it.extendFootprintTtl=function(e){var t;if((null!==(t=e.extendTo)&&void 0!==t?t:-1)<=0)throw new RangeError("extendTo isn't a ledger quantity (uint32)");var r=new i.ExtendFootprintTtlOp({ext:new i.ExtensionPoint(0),extendTo:e.extendTo}),n={body:i.OperationBody.extendFootprintTtl(r)};return this.setSourceAccount(n,e),new i.Operation(n)},it.restoreFootprint=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new i.RestoreFootprintOp({ext:new i.ExtensionPoint(0)}),r={body:i.OperationBody.restoreFootprint(t)};return this.setSourceAccount(r,null!=e?e:{}),new i.Operation(r)},it.createStellarAssetContract=function(e){var t=e.asset;if("string"==typeof t){var r=We(t.split(":"),2),n=r[0],o=r[1];t=new M(n,o)}if(!(t instanceof M))throw new TypeError("expected Asset in 'opts.asset', got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeCreateContract(new i.CreateContractArgs({executable:i.ContractExecutable.contractExecutableStellarAsset(),contractIdPreimage:i.ContractIdPreimage.contractIdPreimageFromAsset(t.toXDRObject())}))})},it.invokeContractFunction=function(e){var t=new $e(e.contract);if("contract"!==t._type)throw new TypeError("expected contract strkey instance, got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeInvokeContract(new i.InvokeContractArgs({contractAddress:t.toScAddress(),functionName:e.function,args:e.args}))})},it.createCustomContract=function(e){var t=Ge.from(e.salt||C.random().xdrPublicKey().value());if(!e.wasmHash||32!==e.wasmHash.length)throw new TypeError("expected hash(contract WASM) in 'opts.wasmHash', got ".concat(e.wasmHash));if(32!==t.length)throw new TypeError("expected 32-byte salt in 'opts.salt', got ".concat(e.wasmHash));return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeCreateContract(new i.CreateContractArgs({executable:i.ContractExecutable.contractExecutableWasm(Ge.from(e.wasmHash)),contractIdPreimage:i.ContractIdPreimage.contractIdPreimageFromAddress(new i.ContractIdPreimageFromAddress({address:e.address.toScAddress(),salt:t}))}))})},it.uploadContractWasm=function(e){return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeUploadContractWasm(Ge.from(e.wasm))})};var st=r(3296).Buffer;function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}function ct(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lt(n.key),n)}}function lt(e){var t=function(e,t){if("object"!=ut(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ut(t)?t:String(t)}var ft="none",pt="id",ht="text",yt="hash",dt="return",mt=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._type=t,this._value=r,this._type){case ft:break;case pt:e._validateIdValue(r);break;case ht:e._validateTextValue(r);break;case yt:case dt:e._validateHashValue(r),"string"==typeof r&&(this._value=st.from(r,"hex"));break;default:throw new Error("Invalid memo type")}}var t,r,o;return t=e,o=[{key:"_validateIdValue",value:function(e){var t,r=new Error("Expects a int64 as a string. Got ".concat(e));if("string"!=typeof e)throw r;try{t=new ye(e)}catch(e){throw r}if(!t.isFinite())throw r;if(t.isNaN())throw r}},{key:"_validateTextValue",value:function(e){if(!i.Memo.armTypeForArm("text").isValid(e))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(e){var t,r=new Error("Expects a 32 byte hash value or hex encoded string. Got ".concat(e));if(null==e)throw r;if("string"==typeof e){if(!/^[0-9A-Fa-f]{64}$/g.test(e))throw r;t=st.from(e,"hex")}else{if(!st.isBuffer(e))throw r;t=st.from(e)}if(!t.length||32!==t.length)throw r}},{key:"none",value:function(){return new e(ft)}},{key:"text",value:function(t){return new e(ht,t)}},{key:"id",value:function(t){return new e(pt,t)}},{key:"hash",value:function(t){return new e(yt,t)}},{key:"return",value:function(t){return new e(dt,t)}},{key:"fromXDRObject",value:function(t){switch(t.arm()){case"id":return e.id(t.value().toString());case"text":return e.text(t.value());case"hash":return e.hash(t.value());case"retHash":return e.return(t.value())}if(void 0===t.value())return e.none();throw new Error("Unknown type")}}],(r=[{key:"type",get:function(){return this._type},set:function(e){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case ft:return null;case pt:case ht:return this._value;case yt:case dt:return st.from(this._value);default:throw new Error("Invalid memo type")}},set:function(e){throw new Error("Memo is immutable")}},{key:"toXDRObject",value:function(){switch(this._type){case ft:return i.Memo.memoNone();case pt:return i.Memo.memoId(n.UnsignedHyper.fromString(this._value));case ht:return i.Memo.memoText(this._value);case yt:return i.Memo.memoHash(this._value);case dt:return i.Memo.memoReturn(this._value);default:return null}}}])&&ct(t.prototype,r),o&&ct(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}(),gt=r(3296).Buffer;function vt(e){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vt(e)}function bt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wt(n.key),n)}}function wt(e){var t=function(e,t){if("object"!=vt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==vt(t)?t:String(t)}function St(e,t,r){return t=Et(t),function(e,t){if(t&&("object"===vt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kt()?Reflect.construct(t,r||[],Et(e).constructor):t.apply(e,r))}function kt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(kt=function(){return!!e})()}function Et(e){return Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Et(e)}function At(e,t){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},At(e,t)}var Tt=function(e){function t(e,r){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e){var o=gt.from(e,"base64");e=i.TransactionEnvelope.fromXDR(o)}var a=e.switch();if(a!==i.EnvelopeType.envelopeTypeTxV0()&&a!==i.EnvelopeType.envelopeTypeTx())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(a.name,"."));var s=e.value(),u=s.tx(),c=u.fee().toString();if((n=St(this,t,[u,(s.signatures()||[]).slice(),c,r]))._envelopeType=a,n._memo=u.memo(),n._sequence=u.seqNum().toString(),n._envelopeType===i.EnvelopeType.envelopeTypeTxV0())n._source=A.encodeEd25519PublicKey(n.tx.sourceAccountEd25519());else n._source=Ne(n.tx.sourceAccount());var l=null,f=null;switch(n._envelopeType){case i.EnvelopeType.envelopeTypeTxV0():f=u.timeBounds();break;case i.EnvelopeType.envelopeTypeTx():switch(u.cond().switch()){case i.PreconditionType.precondTime():f=u.cond().timeBounds();break;case i.PreconditionType.precondV2():f=(l=u.cond().v2()).timeBounds()}}if(f&&(n._timeBounds={minTime:f.minTime().toString(),maxTime:f.maxTime().toString()}),l){var p=l.ledgerBounds();p&&(n._ledgerBounds={minLedger:p.minLedger(),maxLedger:p.maxLedger()});var h=l.minSeqNum();h&&(n._minAccountSequence=h.toString()),n._minAccountSequenceAge=l.minSeqAge(),n._minAccountSequenceLedgerGap=l.minSeqLedgerGap(),n._extraSigners=l.extraSigners()}var y=u.operations()||[];return n._operations=y.map((function(e){return it.fromXDRObject(e)})),n}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&At(e,t)}(t,e),r=t,(n=[{key:"timeBounds",get:function(){return this._timeBounds},set:function(e){throw new Error("Transaction is immutable")}},{key:"ledgerBounds",get:function(){return this._ledgerBounds},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequence",get:function(){return this._minAccountSequence},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceAge",get:function(){return this._minAccountSequenceAge},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceLedgerGap",get:function(){return this._minAccountSequenceLedgerGap},set:function(e){throw new Error("Transaction is immutable")}},{key:"extraSigners",get:function(){return this._extraSigners},set:function(e){throw new Error("Transaction is immutable")}},{key:"sequence",get:function(){return this._sequence},set:function(e){throw new Error("Transaction is immutable")}},{key:"source",get:function(){return this._source},set:function(e){throw new Error("Transaction is immutable")}},{key:"operations",get:function(){return this._operations},set:function(e){throw new Error("Transaction is immutable")}},{key:"memo",get:function(){return mt.fromXDRObject(this._memo)},set:function(e){throw new Error("Transaction is immutable")}},{key:"signatureBase",value:function(){var e=this.tx;this._envelopeType===i.EnvelopeType.envelopeTypeTxV0()&&(e=i.Transaction.fromXDR(gt.concat([i.PublicKeyType.publicKeyTypeEd25519().toXDR(),e.toXDR()])));var t=new i.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTx(e);return new i.TransactionSignaturePayload({networkId:i.Hash.fromXDR(s(this.networkPassphrase)),taggedTransaction:t}).toXDR()}},{key:"toEnvelope",value:function(){var e,t=this.tx.toXDR(),r=this.signatures.slice();switch(this._envelopeType){case i.EnvelopeType.envelopeTypeTxV0():e=new i.TransactionEnvelope.envelopeTypeTxV0(new i.TransactionV0Envelope({tx:i.TransactionV0.fromXDR(t),signatures:r}));break;case i.EnvelopeType.envelopeTypeTx():e=new i.TransactionEnvelope.envelopeTypeTx(new i.TransactionV1Envelope({tx:i.Transaction.fromXDR(t),signatures:r}));break;default:throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(this._envelopeType.name,"."))}return e}},{key:"getClaimableBalanceId",value:function(e){if(!Number.isInteger(e)||e<0||e>=this.operations.length)throw new RangeError("invalid operation index");var t=this.operations[e];try{t=it.createClaimableBalance(t)}catch(e){throw new TypeError("expected createClaimableBalance, got ".concat(t.type,": ").concat(e))}var r=A.decodeEd25519PublicKey(je(this.source)),n=s(i.HashIdPreimage.envelopeTypeOpId(new i.HashIdPreimageOperationId({sourceAccount:i.AccountId.publicKeyTypeEd25519(r),seqNum:i.SequenceNumber.fromString(this.sequence),opNum:e})).toXDR("raw"));return i.ClaimableBalanceId.claimableBalanceIdTypeV0(n).toXDR("hex")}}])&&bt(r.prototype,n),o&&bt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}($),Ot=r(3296).Buffer;function Pt(e){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(e)}function xt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,It(n.key),n)}}function It(e){var t=function(e,t){if("object"!=Pt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pt(t)?t:String(t)}function _t(e,t,r){return t=Rt(t),function(e,t){if(t&&("object"===Pt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bt()?Reflect.construct(t,r||[],Rt(e).constructor):t.apply(e,r))}function Bt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Bt=function(){return!!e})()}function Rt(e){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rt(e)}function Ct(e,t){return Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ct(e,t)}var Ut=function(e){function t(e,r){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e){var o=Ot.from(e,"base64");e=i.TransactionEnvelope.fromXDR(o)}var a=e.switch();if(a!==i.EnvelopeType.envelopeTypeTxFeeBump())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxFeeBump but received an ".concat(a.name,"."));var s=e.value(),u=s.tx(),c=u.fee().toString();n=_t(this,t,[u,(s.signatures()||[]).slice(),c,r]);var l=i.TransactionEnvelope.envelopeTypeTx(u.innerTx().v1());return n._feeSource=Ne(n.tx.feeSource()),n._innerTransaction=new Tt(l,r),n}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ct(e,t)}(t,e),r=t,(n=[{key:"innerTransaction",get:function(){return this._innerTransaction}},{key:"operations",get:function(){return this._innerTransaction.operations}},{key:"feeSource",get:function(){return this._feeSource}},{key:"signatureBase",value:function(){var e=new i.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTxFeeBump(this.tx);return new i.TransactionSignaturePayload({networkId:i.Hash.fromXDR(s(this.networkPassphrase)),taggedTransaction:e}).toXDR()}},{key:"toEnvelope",value:function(){var e=new i.FeeBumpTransactionEnvelope({tx:i.FeeBumpTransaction.fromXDR(this.tx.toXDR()),signatures:this.signatures.slice()});return new i.TransactionEnvelope.envelopeTypeTxFeeBump(e)}}])&&xt(r.prototype,n),o&&xt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}($);function Nt(e){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nt(e)}function Lt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jt(n.key),n)}}function jt(e){var t=function(e,t){if("object"!=Nt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Nt(t)?t:String(t)}var Mt=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),A.isValidMed25519PublicKey(t))throw new Error("accountId is an M-address; use MuxedAccount instead");if(!A.isValidEd25519PublicKey(t))throw new Error("accountId is invalid");if("string"!=typeof r)throw new Error("sequence must be of type string");this._accountId=t,this.sequence=new ye(r)}var t,r,n;return t=e,(r=[{key:"accountId",value:function(){return this._accountId}},{key:"sequenceNumber",value:function(){return this.sequence.toString()}},{key:"incrementSequenceNumber",value:function(){this.sequence=this.sequence.plus(1)}}])&&Lt(t.prototype,r),n&&Lt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ft(e){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ft(e)}function Dt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vt(n.key),n)}}function Vt(e){var t=function(e,t){if("object"!=Ft(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ft(t)?t:String(t)}var qt=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.accountId();if(!A.isValidEd25519PublicKey(n))throw new Error("accountId is invalid");this.account=t,this._muxedXdr=Le(n,r),this._mAddress=Ne(this._muxedXdr),this._id=r}var t,r,n;return t=e,n=[{key:"fromAddress",value:function(t,r){var n=Ue(t),o=je(t),i=n.med25519().id().toString();return new e(new Mt(o,r),i)}}],(r=[{key:"baseAccount",value:function(){return this.account}},{key:"accountId",value:function(){return this._mAddress}},{key:"id",value:function(){return this._id}},{key:"setId",value:function(e){if("string"!=typeof e)throw new Error("id should be a string representing a number (uint64)");return this._muxedXdr.med25519().id(i.Uint64.fromString(e)),this._mAddress=Ne(this._muxedXdr),this._id=e,this}},{key:"sequenceNumber",value:function(){return this.account.sequenceNumber()}},{key:"incrementSequenceNumber",value:function(){return this.account.incrementSequenceNumber()}},{key:"toXDRObject",value:function(){return this._muxedXdr}},{key:"equals",value:function(e){return this.accountId()===e.accountId()}}])&&Dt(t.prototype,r),n&&Dt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Kt(e){return Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kt(e)}function Ht(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zt(n.key),n)}}function zt(e){var t=function(e,t){if("object"!=Kt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kt(t)?t:String(t)}var Xt=function(){function e(t){var r,n,o,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,o=void 0,(n=zt(n="_data"))in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,a=t?"string"==typeof t||ArrayBuffer.isView(t)?e.fromXDR(t):e.fromXDR(t.toXDR()):new i.SorobanTransactionData({resources:new i.SorobanResources({footprint:new i.LedgerFootprint({readOnly:[],readWrite:[]}),instructions:0,readBytes:0,writeBytes:0}),ext:new i.ExtensionPoint(0),resourceFee:new i.Int64(0)}),this._data=a}var t,r,n;return t=e,n=[{key:"fromXDR",value:function(e){return i.SorobanTransactionData.fromXDR(e,"string"==typeof e?"base64":"raw")}}],(r=[{key:"setResourceFee",value:function(e){return this._data.resourceFee(new i.Int64(e)),this}},{key:"setResources",value:function(e,t,r){return this._data.resources().instructions(e),this._data.resources().readBytes(t),this._data.resources().writeBytes(r),this}},{key:"appendFootprint",value:function(e,t){return this.setFootprint(this.getReadOnly().concat(e),this.getReadWrite().concat(t))}},{key:"setFootprint",value:function(e,t){return null!==e&&this.setReadOnly(e),null!==t&&this.setReadWrite(t),this}},{key:"setReadOnly",value:function(e){return this._data.resources().footprint().readOnly(null!=e?e:[]),this}},{key:"setReadWrite",value:function(e){return this._data.resources().footprint().readWrite(null!=e?e:[]),this}},{key:"build",value:function(){return i.SorobanTransactionData.fromXDR(this._data.toXDR())}},{key:"getReadOnly",value:function(){return this.getFootprint().readOnly()}},{key:"getReadWrite",value:function(){return this.getFootprint().readWrite()}},{key:"getFootprint",value:function(){return this._data.resources().footprint()}}])&&Ht(t.prototype,r),n&&Ht(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function $t(e){return $t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$t(e)}function Gt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Wt(n.key),n)}}function Wt(e){var t=function(e,t){if("object"!=$t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=$t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$t(t)?t:String(t)}var Yt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"decodeAddress",value:function(e){var t={ed25519PublicKey:i.SignerKey.signerKeyTypeEd25519,preAuthTx:i.SignerKey.signerKeyTypePreAuthTx,sha256Hash:i.SignerKey.signerKeyTypeHashX,signedPayload:i.SignerKey.signerKeyTypeEd25519SignedPayload},r=A.getVersionByteForPrefix(e),n=t[r];if(!n)throw new Error("invalid signer key type (".concat(r,")"));var o=O(r,e);return n("signedPayload"===r?new i.SignerKeyEd25519SignedPayload({ed25519:o.slice(0,32),payload:o.slice(36)}):o)}},{key:"encodeSignerKey",value:function(e){var t,r;switch(e.switch()){case i.SignerKeyType.signerKeyTypeEd25519():t="ed25519PublicKey",r=e.value();break;case i.SignerKeyType.signerKeyTypePreAuthTx():t="preAuthTx",r=e.value();break;case i.SignerKeyType.signerKeyTypeHashX():t="sha256Hash",r=e.value();break;case i.SignerKeyType.signerKeyTypeEd25519SignedPayload():t="signedPayload",r=e.ed25519SignedPayload().toXDR("raw");break;default:throw new Error("invalid SignerKey (type: ".concat(e.switch(),")"))}return P(t,r)}}],(r=null)&&Gt(t.prototype,r),n&&Gt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Jt(e){return Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jt(e)}function Zt(e){return function(e){if(Array.isArray(e))return Qt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Qt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function er(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?er(Object(r),!0).forEach((function(t){rr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):er(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rr(e,t,r){return(t=or(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,or(n.key),n)}}function or(e){var t=function(e,t){if("object"!=Jt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jt(t)?t:String(t)}var ir="100",ar=0,sr=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("must specify source account for the transaction");if(void 0===r.fee)throw new Error("must specify fee for the transaction (in stroops)");this.source=t,this.operations=[],this.baseFee=r.fee,this.timebounds=r.timebounds?tr({},r.timebounds):null,this.ledgerbounds=r.ledgerbounds?tr({},r.ledgerbounds):null,this.minAccountSequence=r.minAccountSequence||null,this.minAccountSequenceAge=r.minAccountSequenceAge||null,this.minAccountSequenceLedgerGap=r.minAccountSequenceLedgerGap||null,this.extraSigners=r.extraSigners?Zt(r.extraSigners):null,this.memo=r.memo||mt.none(),this.networkPassphrase=r.networkPassphrase||null,this.sorobanData=r.sorobanData?new Xt(r.sorobanData).build():null}var t,r,o;return t=e,o=[{key:"cloneFrom",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t instanceof Tt))throw new TypeError("expected a 'Transaction', got: ".concat(t));var n,o=(BigInt(t.sequence)-1n).toString();if(A.isValidMed25519PublicKey(t.source))n=qt.fromAddress(t.source,o);else{if(!A.isValidEd25519PublicKey(t.source))throw new TypeError("unsupported tx source account: ".concat(t.source));n=new Mt(t.source,o)}var i=new e(n,tr({fee:(parseInt(t.fee,10)/t.operations.length||ir).toString(),memo:t.memo,networkPassphrase:t.networkPassphrase,timebounds:t.timeBounds,ledgerbounds:t.ledgerBounds,minAccountSequence:t.minAccountSequence,minAccountSequenceAge:t.minAccountSequenceAge,minAccountSequenceLedgerGap:t.minAccountSequenceLedgerGap,extraSigners:t.extraSigners},r));return t._tx.operations().forEach((function(e){return i.addOperation(e)})),i}},{key:"buildFeeBumpTransaction",value:function(e,t,r,n){var o=r.operations.length,a=new ye(r.fee).div(o),s=new ye(t);if(s.lt(a))throw new Error("Invalid baseFee, it should be at least ".concat(a," stroops."));var u=new ye(ir);if(s.lt(u))throw new Error("Invalid baseFee, it should be at least ".concat(u," stroops."));var c,l=r.toEnvelope();if(l.switch()===i.EnvelopeType.envelopeTypeTxV0()){var f=l.v0().tx(),p=new i.Transaction({sourceAccount:new i.MuxedAccount.keyTypeEd25519(f.sourceAccountEd25519()),fee:f.fee(),seqNum:f.seqNum(),cond:i.Preconditions.precondTime(f.timeBounds()),memo:f.memo(),operations:f.operations(),ext:new i.TransactionExt(0)});l=new i.TransactionEnvelope.envelopeTypeTx(new i.TransactionV1Envelope({tx:p,signatures:l.v0().signatures()}))}c="string"==typeof e?Ue(e):e.xdrMuxedAccount();var h=new i.FeeBumpTransaction({feeSource:c,fee:i.Int64.fromString(s.times(o+1).toString()),innerTx:i.FeeBumpTransactionInnerTx.envelopeTypeTx(l.v1()),ext:new i.FeeBumpTransactionExt(0)}),y=new i.FeeBumpTransactionEnvelope({tx:h,signatures:[]}),d=new i.TransactionEnvelope.envelopeTypeTxFeeBump(y);return new Ut(d,n)}},{key:"fromXDR",value:function(e,t){return"string"==typeof e&&(e=i.TransactionEnvelope.fromXDR(e,"base64")),e.switch()===i.EnvelopeType.envelopeTypeTxFeeBump()?new Ut(e,t):new Tt(e,t)}}],(r=[{key:"addOperation",value:function(e){return this.operations.push(e),this}},{key:"clearOperations",value:function(){return this.operations=[],this}},{key:"addMemo",value:function(e){return this.memo=e,this}},{key:"setTimeout",value:function(e){if(null!==this.timebounds&&this.timebounds.maxTime>0)throw new Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(e<0)throw new Error("timeout cannot be negative");if(e>0){var t=Math.floor(Date.now()/1e3)+e;null===this.timebounds?this.timebounds={minTime:0,maxTime:t}:this.timebounds={minTime:this.timebounds.minTime,maxTime:t}}else this.timebounds={minTime:0,maxTime:0};return this}},{key:"setTimebounds",value:function(e,t){if("number"==typeof e&&(e=new Date(1e3*e)),"number"==typeof t&&(t=new Date(1e3*t)),null!==this.timebounds)throw new Error("TimeBounds has been already set - setting timebounds would overwrite it.");var r=Math.floor(e.valueOf()/1e3),n=Math.floor(t.valueOf()/1e3);if(r<0)throw new Error("min_time cannot be negative");if(n<0)throw new Error("max_time cannot be negative");if(n>0&&r>n)throw new Error("min_time cannot be greater than max_time");return this.timebounds={minTime:r,maxTime:n},this}},{key:"setLedgerbounds",value:function(e,t){if(null!==this.ledgerbounds)throw new Error("LedgerBounds has been already set - setting ledgerbounds would overwrite it.");if(e<0)throw new Error("min_ledger cannot be negative");if(t<0)throw new Error("max_ledger cannot be negative");if(t>0&&e>t)throw new Error("min_ledger cannot be greater than max_ledger");return this.ledgerbounds={minLedger:e,maxLedger:t},this}},{key:"setMinAccountSequence",value:function(e){if(null!==this.minAccountSequence)throw new Error("min_account_sequence has been already set - setting min_account_sequence would overwrite it.");return this.minAccountSequence=e,this}},{key:"setMinAccountSequenceAge",value:function(e){if("number"!=typeof e)throw new Error("min_account_sequence_age must be a number");if(null!==this.minAccountSequenceAge)throw new Error("min_account_sequence_age has been already set - setting min_account_sequence_age would overwrite it.");if(e<0)throw new Error("min_account_sequence_age cannot be negative");return this.minAccountSequenceAge=e,this}},{key:"setMinAccountSequenceLedgerGap",value:function(e){if(null!==this.minAccountSequenceLedgerGap)throw new Error("min_account_sequence_ledger_gap has been already set - setting min_account_sequence_ledger_gap would overwrite it.");if(e<0)throw new Error("min_account_sequence_ledger_gap cannot be negative");return this.minAccountSequenceLedgerGap=e,this}},{key:"setExtraSigners",value:function(e){if(!Array.isArray(e))throw new Error("extra_signers must be an array of strings.");if(null!==this.extraSigners)throw new Error("extra_signers has been already set - setting extra_signers would overwrite it.");if(e.length>2)throw new Error("extra_signers cannot be longer than 2 elements.");return this.extraSigners=Zt(e),this}},{key:"setNetworkPassphrase",value:function(e){return this.networkPassphrase=e,this}},{key:"setSorobanData",value:function(e){return this.sorobanData=new Xt(e).build(),this}},{key:"build",value:function(){var e=new ye(this.source.sequenceNumber()).plus(1),t={fee:new ye(this.baseFee).times(this.operations.length).toNumber(),seqNum:i.SequenceNumber.fromString(e.toString()),memo:this.memo?this.memo.toXDRObject():null};if(null===this.timebounds||void 0===this.timebounds.minTime||void 0===this.timebounds.maxTime)throw new Error("TimeBounds has to be set or you must call setTimeout(TimeoutInfinite).");ur(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),ur(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=n.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=n.UnsignedHyper.fromString(this.timebounds.maxTime.toString());var r=new i.TimeBounds(this.timebounds);if(this.hasV2Preconditions()){var o=null;null!==this.ledgerbounds&&(o=new i.LedgerBounds(this.ledgerbounds));var a=this.minAccountSequence||"0";a=i.SequenceNumber.fromString(a);var s=n.UnsignedHyper.fromString(null!==this.minAccountSequenceAge?this.minAccountSequenceAge.toString():"0"),u=this.minAccountSequenceLedgerGap||0,c=null!==this.extraSigners?this.extraSigners.map(Yt.decodeAddress):[];t.cond=i.Preconditions.precondV2(new i.PreconditionsV2({timeBounds:r,ledgerBounds:o,minSeqNum:a,minSeqAge:s,minSeqLedgerGap:u,extraSigners:c}))}else t.cond=i.Preconditions.precondTime(r);t.sourceAccount=Ue(this.source.accountId()),this.sorobanData?t.ext=new i.TransactionExt(1,this.sorobanData):t.ext=new i.TransactionExt(0,i.Void);var l=new i.Transaction(t);l.operations(this.operations);var f=new i.TransactionEnvelope.envelopeTypeTx(new i.TransactionV1Envelope({tx:l})),p=new Tt(f,this.networkPassphrase);return this.source.incrementSequenceNumber(),p}},{key:"hasV2Preconditions",value:function(){return null!==this.ledgerbounds||null!==this.minAccountSequence||null!==this.minAccountSequenceAge||null!==this.minAccountSequenceLedgerGap||null!==this.extraSigners&&this.extraSigners.length>0}}])&&nr(t.prototype,r),o&&nr(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ur(e){return e instanceof Date&&!isNaN(e)}var cr={PUBLIC:"Public Global Stellar Network ; September 2015",TESTNET:"Test SDF Network ; September 2015",FUTURENET:"Test SDF Future Network ; October 2022",SANDBOX:"Local Sandbox Stellar Network ; September 2022",STANDALONE:"Standalone Network ; February 2017"};function lr(e){return lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lr(e)}function fr(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return pr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pr(e,t)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yr(n.key),n)}}function yr(e){var t=function(e,t){if("object"!=lr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lr(t)?t:String(t)}var dr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"formatTokenAmount",value:function(e,t){if(e.includes("."))throw new TypeError("No decimals are allowed");var r=e;return t>0&&(r=t>r.length?["0",r.toString().padStart(t,"0")].join("."):[r.slice(0,-t),r.slice(-t)].join(".")),r.replace(/(\.\d*?)0+$/,"$1")}},{key:"parseTokenAmount",value:function(e,t){var r,n=fr(e.split(".").slice()),o=n[0],i=n[1];if(n.slice(2).length)throw new Error("Invalid decimal value: ".concat(e));return BigInt(o+(null!==(r=null==i?void 0:i.padEnd(t,"0"))&&void 0!==r?r:"0".repeat(t))).toString()}}],(r=null)&&hr(t.prototype,r),n&&hr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function mr(e){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(e)}function gr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vr(n.key),n)}}function vr(e){var t=function(e,t){if("object"!=mr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==mr(t)?t:String(t)}var br=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);try{this._id=A.decodeContract(t)}catch(e){throw new Error("Invalid contract ID: ".concat(t))}}var t,r,n;return t=e,r=[{key:"contractId",value:function(){return A.encodeContract(this._id)}},{key:"toString",value:function(){return this.contractId()}},{key:"address",value:function(){return $e.contract(this._id)}},{key:"call",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return it.invokeContractFunction({contract:this.address().toString(),function:e,args:r})}},{key:"getFootprint",value:function(){return i.LedgerKey.contractData(new i.LedgerKeyContractData({contract:this.address().toScAddress(),key:i.ScVal.scvLedgerKeyContractInstance(),durability:i.ContractDataDurability.persistent()}))}}],r&&gr(t.prototype,r),n&&gr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wr(e){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wr(e)}function Sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kr(n.key),n)}}function kr(e){var t=function(e,t){if("object"!=wr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=wr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wr(t)?t:String(t)}function Er(e,t,r){return t=Tr(t),function(e,t){if(t&&("object"===wr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ar()?Reflect.construct(t,r||[],Tr(e).constructor):t.apply(e,r))}function Ar(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ar=function(){return!!e})()}function Tr(e){return Tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tr(e)}function Or(e,t){return Or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Or(e,t)}var Pr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Er(this,t,[r])}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Or(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 128}}])&&Sr(r.prototype,n),o&&Sr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.LargeInt);function xr(e){return xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xr(e)}function Ir(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_r(n.key),n)}}function _r(e){var t=function(e,t){if("object"!=xr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=xr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xr(t)?t:String(t)}function Br(e,t,r){return t=Cr(t),function(e,t){if(t&&("object"===xr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Rr()?Reflect.construct(t,r||[],Cr(e).constructor):t.apply(e,r))}function Rr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Rr=function(){return!!e})()}function Cr(e){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cr(e)}function Ur(e,t){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ur(e,t)}Pr.defineIntBoundaries();var Nr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Br(this,t,[r])}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ur(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 256}}])&&Ir(r.prototype,n),o&&Ir(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.LargeInt);function Lr(e){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lr(e)}function jr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mr(n.key),n)}}function Mr(e){var t=function(e,t){if("object"!=Lr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Lr(t)?t:String(t)}function Fr(e,t,r){return t=Vr(t),function(e,t){if(t&&("object"===Lr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dr()?Reflect.construct(t,r||[],Vr(e).constructor):t.apply(e,r))}function Dr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Dr=function(){return!!e})()}function Vr(e){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vr(e)}function qr(e,t){return qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qr(e,t)}Nr.defineIntBoundaries();var Kr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Fr(this,t,[r])}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 128}}])&&jr(r.prototype,n),o&&jr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.LargeInt);function Hr(e){return Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hr(e)}function zr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xr(n.key),n)}}function Xr(e){var t=function(e,t){if("object"!=Hr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Hr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hr(t)?t:String(t)}function $r(e,t,r){return t=Wr(t),function(e,t){if(t&&("object"===Hr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gr()?Reflect.construct(t,r||[],Wr(e).constructor):t.apply(e,r))}function Gr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Gr=function(){return!!e})()}function Wr(e){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wr(e)}function Yr(e,t){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yr(e,t)}Kr.defineIntBoundaries();var Jr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return $r(this,t,[r])}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 256}}])&&zr(r.prototype,n),o&&zr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.LargeInt);function Zr(e){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(e)}function Qr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tn(n.key),n)}}function en(e,t,r){return(t=tn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tn(e){var t=function(e,t){if("object"!=Zr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zr(t)?t:String(t)}Jr.defineIntBoundaries();var rn=function(){function e(t,r){switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),en(this,"int",void 0),en(this,"type",void 0),r instanceof Array||(r=[r]),r=r.map((function(t){return"bigint"==typeof t?t:t instanceof e?t.toBigInt():BigInt(t)})),t){case"i64":this.int=new n.Hyper(r);break;case"i128":this.int=new Kr(r);break;case"i256":this.int=new Jr(r);break;case"u64":this.int=new n.UnsignedHyper(r);break;case"u128":this.int=new Pr(r);break;case"u256":this.int=new Nr(r);break;default:throw TypeError("invalid type: ".concat(t))}this.type=t}var t,r,o;return t=e,o=[{key:"isType",value:function(e){switch(e){case"i64":case"i128":case"i256":case"u64":case"u128":case"u256":return!0;default:return!1}}},{key:"getType",value:function(e){return e.slice(3).toLowerCase()}}],(r=[{key:"toNumber",value:function(){var e=this.int.toBigInt();if(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)throw RangeError("value ".concat(e," not in range for Number ")+"[".concat(Number.MAX_SAFE_INTEGER,", ").concat(Number.MIN_SAFE_INTEGER,"]"));return Number(e)}},{key:"toBigInt",value:function(){return this.int.toBigInt()}},{key:"toI64",value:function(){this._sizeCheck(64);var e=this.toBigInt();if(BigInt.asIntN(64,e)!==e)throw RangeError("value too large for i64: ".concat(e));return i.ScVal.scvI64(new i.Int64(e))}},{key:"toU64",value:function(){return this._sizeCheck(64),i.ScVal.scvU64(new i.Uint64(BigInt.asUintN(64,this.toBigInt())))}},{key:"toI128",value:function(){this._sizeCheck(128);var e=this.int.toBigInt(),t=BigInt.asIntN(64,e>>64n),r=BigInt.asUintN(64,e);return i.ScVal.scvI128(new i.Int128Parts({hi:new i.Int64(t),lo:new i.Uint64(r)}))}},{key:"toU128",value:function(){this._sizeCheck(128);var e=this.int.toBigInt();return i.ScVal.scvU128(new i.UInt128Parts({hi:new i.Uint64(BigInt.asUintN(64,e>>64n)),lo:new i.Uint64(BigInt.asUintN(64,e))}))}},{key:"toI256",value:function(){var e=this.int.toBigInt(),t=BigInt.asIntN(64,e>>192n),r=BigInt.asUintN(64,e>>128n),n=BigInt.asUintN(64,e>>64n),o=BigInt.asUintN(64,e);return i.ScVal.scvI256(new i.Int256Parts({hiHi:new i.Int64(t),hiLo:new i.Uint64(r),loHi:new i.Uint64(n),loLo:new i.Uint64(o)}))}},{key:"toU256",value:function(){var e=this.int.toBigInt(),t=BigInt.asUintN(64,e>>192n),r=BigInt.asUintN(64,e>>128n),n=BigInt.asUintN(64,e>>64n),o=BigInt.asUintN(64,e);return i.ScVal.scvU256(new i.UInt256Parts({hiHi:new i.Uint64(t),hiLo:new i.Uint64(r),loHi:new i.Uint64(n),loLo:new i.Uint64(o)}))}},{key:"toScVal",value:function(){switch(this.type){case"i64":return this.toI64();case"i128":return this.toI128();case"i256":return this.toI256();case"u64":return this.toU64();case"u128":return this.toU128();case"u256":return this.toU256();default:throw TypeError("invalid type: ".concat(this.type))}}},{key:"valueOf",value:function(){return this.int.valueOf()}},{key:"toString",value:function(){return this.int.toString()}},{key:"toJSON",value:function(){return{value:this.toBigInt().toString(),type:this.type}}},{key:"_sizeCheck",value:function(e){if(this.int.size>e)throw RangeError("value too large for ".concat(e," bits (").concat(this.type,")"))}}])&&Qr(t.prototype,r),o&&Qr(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function nn(e){return nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nn(e)}function on(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,an(n.key),n)}}function an(e){var t=function(e,t){if("object"!=nn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==nn(t)?t:String(t)}function sn(e,t,r){return t=cn(t),function(e,t){if(t&&("object"===nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,un()?Reflect.construct(t,r||[],cn(e).constructor):t.apply(e,r))}function un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(un=function(){return!!e})()}function cn(e){return cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cn(e)}function ln(e,t){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ln(e,t)}var fn=function(e){function t(e,r){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=e<0,i=null!==(n=null==r?void 0:r.type)&&void 0!==n?n:"";if(i.startsWith("u")&&o)throw TypeError("specified type ".concat(r.type," yet negative (").concat(e,")"));if(""===i){i=o?"i":"u";var a=function(e){var t,r=e.toString(2).length;return null!==(t=[64,128,256].find((function(e){return r<=e})))&&void 0!==t?t:r}(e);switch(a){case 64:case 128:case 256:i+=a.toString();break;default:throw RangeError("expected 64/128/256 bits for input (".concat(e,"), got ").concat(a))}}return sn(this,t,[i,e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ln(e,t)}(t,e),r=t,n&&on(r.prototype,n),o&&on(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(rn);function pn(e){var t=rn.getType(e.switch().name);switch(e.switch().name){case"scvU32":case"scvI32":return BigInt(e.value());case"scvU64":case"scvI64":return new rn(t,e.value()).toBigInt();case"scvU128":case"scvI128":return new rn(t,[e.value().lo(),e.value().hi()]).toBigInt();case"scvU256":case"scvI256":return new rn(t,[e.value().loLo(),e.value().loHi(),e.value().hiLo(),e.value().hiHi()]).toBigInt();default:throw TypeError("expected integer type, got ".concat(e.switch()))}}var hn=r(3296).Buffer;function yn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return dn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mn(e){return mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mn(e)}function gn(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(mn(e)){case"object":if(null===e)return i.ScVal.scvVoid();if(e instanceof i.ScVal)return e;if(e instanceof $e)return e.toScVal();if(e instanceof br)return e.address().toScVal();if(e instanceof Uint8Array||hn.isBuffer(e)){var o,a=Uint8Array.from(e);switch(null!==(o=null==n?void 0:n.type)&&void 0!==o?o:"bytes"){case"bytes":return i.ScVal.scvBytes(a);case"symbol":return i.ScVal.scvSymbol(a);case"string":return i.ScVal.scvString(a);default:throw new TypeError("invalid type (".concat(n.type,") specified for bytes-like value"))}}if(Array.isArray(e)){if(e.length>0&&e.some((function(t){return mn(t)!==mn(e[0])})))throw new TypeError("array values (".concat(e,") must have the same type (types: ").concat(e.map((function(e){return mn(e)})).join(","),")"));return i.ScVal.scvVec(e.map((function(e){return gn(e,n)})))}var s;if("Object"!==(null!==(t=null===(r=e.constructor)||void 0===r?void 0:r.name)&&void 0!==t?t:""))throw new TypeError("cannot interpret ".concat(null===(s=e.constructor)||void 0===s?void 0:s.name," value as ScVal (").concat(JSON.stringify(e),")"));return i.ScVal.scvMap(Object.entries(e).map((function(e){var t,r,o=yn(e,2),a=o[0],s=o[1],u=yn(null!==(t=(null!==(r=null==n?void 0:n.type)&&void 0!==r?r:{})[a])&&void 0!==t?t:[null,null],2),c=u[0],l=u[1],f=c?{type:c}:{},p=l?{type:l}:{};return new i.ScMapEntry({key:gn(a,f),val:gn(s,p)})})));case"number":case"bigint":switch(null==n?void 0:n.type){case"u32":return i.ScVal.scvU32(e);case"i32":return i.ScVal.scvI32(e)}return new fn(e,{type:null==n?void 0:n.type}).toScVal();case"string":var u,c=null!==(u=null==n?void 0:n.type)&&void 0!==u?u:"string";switch(c){case"string":return i.ScVal.scvString(e);case"symbol":return i.ScVal.scvSymbol(e);case"address":return new $e(e).toScVal();default:if(rn.isType(c))return new rn(c,e).toScVal();throw new TypeError("invalid type (".concat(n.type,") specified for string value"))}case"boolean":return i.ScVal.scvBool(e);case"undefined":return i.ScVal.scvVoid();case"function":return gn(e());default:throw new TypeError("failed to convert typeof ".concat(mn(e)," (").concat(e,")"))}}function vn(e){var t,r;switch(e.switch().value){case i.ScValType.scvVoid().value:return null;case i.ScValType.scvU64().value:case i.ScValType.scvI64().value:return e.value().toBigInt();case i.ScValType.scvU128().value:case i.ScValType.scvI128().value:case i.ScValType.scvU256().value:case i.ScValType.scvI256().value:return pn(e);case i.ScValType.scvVec().value:return(null!==(t=e.vec())&&void 0!==t?t:[]).map(vn);case i.ScValType.scvAddress().value:return $e.fromScVal(e).toString();case i.ScValType.scvMap().value:return Object.fromEntries((null!==(r=e.map())&&void 0!==r?r:[]).map((function(e){return[vn(e.key()),vn(e.val())]})));case i.ScValType.scvBool().value:case i.ScValType.scvU32().value:case i.ScValType.scvI32().value:case i.ScValType.scvBytes().value:return e.value();case i.ScValType.scvSymbol().value:case i.ScValType.scvString().value:var n=e.value();if(hn.isBuffer(n)||ArrayBuffer.isView(n))try{return(new TextDecoder).decode(n)}catch(e){return new Uint8Array(n.buffer)}return n;case i.ScValType.scvTimepoint().value:case i.ScValType.scvDuration().value:return new i.Uint64(e.value()).toBigInt();case i.ScValType.scvStatus().value:switch(e.value().switch()){case i.ScStatusType.sstOk().value:case i.ScStatusType.sstUnknownError().value:case i.ScStatusType.sstHostValueError().value:case i.ScStatusType.sstHostObjectError().value:case i.ScStatusType.sstHostFunctionError().value:case i.ScStatusType.sstHostStorageError().value:case i.ScStatusType.sstHostContextError().value:case i.ScStatusType.sstVmError().value:case i.ScStatusType.sstContractError().value:case i.ScStatusType.sstHostAuthError().value:}default:return e.value()}}function bn(e){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn(e)}function wn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(r),!0).forEach((function(t){kn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function kn(e,t,r){var n;return n=function(e,t){if("object"!=bn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==bn(n)?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function En(e){return e.map((function(e){return e instanceof i.DiagnosticEvent?An(e.event()):An(e)}))}function An(e){return Sn(Sn({},null!=e.contractId()&&{contractId:A.encodeContract(e.contractId())}),{},{type:e.type().name,topics:e.body().value().topics().map((function(e){return vn(e)})),data:vn(e.body().value().data())})}var Tn=r(3296).Buffer;function On(e){return On="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},On(e)}function Pn(){Pn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new _(n||[]);return o(a,"_invoke",{value:O(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",y="executing",d="completed",m={};function g(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(B([])));k&&k!==r&&n.call(k,a)&&(w=k);var E=b.prototype=g.prototype=Object.create(w);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(o,i,a,s){var u=f(e[o],e,i);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==On(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function O(t,r,n){var o=p;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var c=f(t,r,n);if("normal"===c.type){if(o=n.done?d:h,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=d,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function B(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(On(t)+" is not iterable")}return v.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},A(T.prototype),c(T.prototype,s,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new T(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(E),c(E,u,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=B,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:B(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function xn(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function In(e,t,r){return _n.apply(this,arguments)}function _n(){var e;return e=Pn().mark((function e(t,r,n){var o,a,u,c,l,f,p,h,y,d=arguments;return Pn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=d.length>3&&void 0!==d[3]?d[3]:cr.FUTURENET,t.credentials().switch().value===i.SorobanCredentialsType.sorobanCredentialsAddress().value){e.next=3;break}return e.abrupt("return",t);case 3:if(a=i.SorobanAuthorizationEntry.fromXDR(t.toXDR()),(u=a.credentials().address()).signatureExpirationLedger(n),c=s(Tn.from(o)),l=i.HashIdPreimage.envelopeTypeSorobanAuthorization(new i.HashIdPreimageSorobanAuthorization({networkId:c,nonce:u.nonce(),invocation:a.rootInvocation(),signatureExpirationLedger:u.signatureExpirationLedger()})),f=s(l.toXDR()),"function"!=typeof r){e.next=17;break}return e.t0=Tn,e.next=13,r(l);case 13:e.t1=e.sent,p=e.t0.from.call(e.t0,e.t1),e.next=18;break;case 17:p=Tn.from(r.sign(f));case 18:if(h=$e.fromScAddress(u.address()).toString(),C.fromPublicKey(h).verify(f,p)){e.next=21;break}throw new Error("signature doesn't match payload");case 21:return y=gn({public_key:A.decodeEd25519PublicKey(h),signature:p},{type:{public_key:["symbol",null],signature:["symbol",null]}}),u.signature(i.ScVal.scvVec([y])),e.abrupt("return",a);case 24:case"end":return e.stop()}}),e)})),_n=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){xn(i,n,o,a,s,"next",e)}function s(e){xn(i,n,o,a,s,"throw",e)}a(void 0)}))},_n.apply(this,arguments)}function Bn(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:cr.FUTURENET,a=C.random().rawPublicKey(),s=new i.Int64(a.subarray(0,8).reduce((function(e,t){return e<<8|t}),0)),u=n||e.publicKey();if(!u)throw new Error("authorizeInvocation requires publicKey parameter");return In(new i.SorobanAuthorizationEntry({rootInvocation:r,credentials:i.SorobanCredentials.sorobanCredentialsAddress(new i.SorobanAddressCredentials({address:new $e(u).toScAddress(),nonce:s,signatureExpirationLedger:0,signature:i.ScVal.scvVec([])}))}),e,t,o)}function Rn(e){var t=e.function(),r={},n=t.value();switch(t.switch().value){case 0:r.type="execute",r.args={source:$e.fromScAddress(n.contractAddress()).toString(),function:n.functionName(),args:n.args().map((function(e){return vn(e)}))};break;case 1:r.type="create",r.args={};var o=[n.executable(),n.contractIdPreimage()],i=o[0],a=o[1];if(!!i.switch().value!=!!a.switch().value)throw new Error("creation function appears invalid: ".concat(JSON.stringify(n)," (should be wasm+address or token+asset)"));switch(i.switch().value){case 0:var s=a.fromAddress();r.args.type="wasm",r.args.wasm={salt:s.salt().toString("hex"),hash:i.wasmHash().toString("hex"),address:$e.fromScAddress(s.address()).toString()};break;case 1:r.args.type="sac",r.args.asset=M.fromOperation(a.fromAsset()).toString();break;default:throw new Error("unknown creation type: ".concat(JSON.stringify(i)))}break;default:throw new Error("unknown invocation type (".concat(t.switch(),"): ").concat(JSON.stringify(t)))}return r.invocations=e.subInvocations().map((function(e){return Rn(e)})),r}function Cn(e,t){Un(e,1,t)}function Un(e,t,r,n){!1!==r(e,t,n)&&e.subInvocations().forEach((function(n){return Un(n,t+1,r,e)}))}const Nn=(e=r.hmd(e)).exports},6555:(e,t)=>{"use strict";var r=function(e,t){return t||(t={}),e.split("").forEach((function(e,r){e in t||(t[e]=r)})),t},n={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};n.charmap=r(n.alphabet,n.charmap);var o={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};o.charmap=r(o.alphabet,o.charmap);var i={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function a(e){if(this.buf=[],this.shift=8,this.carry=0,e){switch(e.type){case"rfc4648":this.charmap=t.rfc4648.charmap;break;case"crockford":this.charmap=t.crockford.charmap;break;case"base32hex":this.charmap=t.base32hex.charmap;break;default:throw new Error("invalid type")}e.charmap&&(this.charmap=e.charmap)}}function s(e){if(this.buf="",this.shift=3,this.carry=0,e){switch(e.type){case"rfc4648":this.alphabet=t.rfc4648.alphabet;break;case"crockford":this.alphabet=t.crockford.alphabet;break;case"base32hex":this.alphabet=t.base32hex.alphabet;break;default:throw new Error("invalid type")}e.alphabet?this.alphabet=e.alphabet:e.lc&&(this.alphabet=this.alphabet.toLowerCase())}}i.charmap=r(i.alphabet,i.charmap),a.prototype.charmap=n.charmap,a.prototype.write=function(e){var t=this.charmap,r=this.buf,n=this.shift,o=this.carry;return e.toUpperCase().split("").forEach((function(e){if("="!=e){var i=255&t[e];(n-=5)>0?o|=i<<n:n<0?(r.push(o|i>>-n),o=i<<(n+=8)&255):(r.push(o|i),n=8,o=0)}})),this.shift=n,this.carry=o,this},a.prototype.finalize=function(e){return e&&this.write(e),8!==this.shift&&0!==this.carry&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},s.prototype.alphabet=n.alphabet,s.prototype.write=function(e){var t,r,n,o=this.shift,i=this.carry;for(n=0;n<e.length;n++)t=i|(r=e[n])>>o,this.buf+=this.alphabet[31&t],o>5&&(t=r>>(o-=5),this.buf+=this.alphabet[31&t]),i=r<<(o=5-o),o=8-o;return this.shift=o,this.carry=i,this},s.prototype.finalize=function(e){return e&&this.write(e),3!==this.shift&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},t.encode=function(e,t){return new s(t).finalize(e)},t.decode=function(e,t){return new a(t).finalize(e)},t.Decoder=a,t.Encoder=s,t.charmap=r,t.crockford=o,t.rfc4648=n,t.base32hex=i},5704:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3296:(e,t,r)=>{"use strict";var n=r(320);const o=r(5704),i=r(4404),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function u(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=u(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return y(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return y(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return y(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|d(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?u(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return f(e),u(e<0?0:0|d(e))}function h(e){const t=e.length<0?0:0|d(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function y(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function d(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(o)return n?-1:$(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function S(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function k(e,t,r,n){return W($(t,e.length-r),e,r,n)}function E(e,t,r,n){return W(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return W(G(t),e,r,n)}function T(e,t,r,n){return W(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||void 0===n||"function"!=typeof n.error||n.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Z[e[n]];return o}function R(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){U(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){U(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Q((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const D={};function V(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function K(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function G(e){return o.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},2768:(e,t,r)=>{"use strict";var n=r(6604),o=r(4572),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},4572:(e,t,r)=>{"use strict";var n=r(268),o=r(6604),i=r(2392),a=r(6556),s=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(u,s),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return c(n,s,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},320:(e,t,r)=>{var n=r(3912),o=r(6104);function i(){return(new Date).getTime()}var a,s=Array.prototype.slice,u={};a=void 0!==r.g&&r.g.console?r.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var c=[[function(){},"log"],[function(){a.log.apply(a,arguments)},"info"],[function(){a.log.apply(a,arguments)},"warn"],[function(){a.warn.apply(a,arguments)},"error"],[function(e){u[e]=i()},"time"],[function(e){var t=u[e];if(!t)throw new Error("No such label: "+e);delete u[e];var r=i()-t;a.log(e+": "+r+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=n.format.apply(null,arguments),a.error(e.stack)},"trace"],[function(e){a.log(n.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=s.call(arguments,1);o.ok(!1,n.format.apply(null,t))}},"assert"]],l=0;l<c.length;l++){var f=c[l],p=f[0],h=f[1];a[h]||(a[h]=p)}e.exports=a},5456:(e,t,r)=>{"use strict";var n=r(1188)(),o=r(6604),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(e){i=!1}var a=r(7668),s=r(6556),u=r(872);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(e,t);if(i)i(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},5728:(e,t,r)=>{"use strict";var n=r(7056),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(5456),u=r(1188)(),c=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(e,t,r,!0):s(e,t,r)},l=function(e,t){var r=arguments.length>2?arguments[2]:{},i=n(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s<i.length;s+=1)c(e,i[s],t[i[s]],r[i[s]])};l.supportsDescriptors=!!u,e.exports=l},9576:e=>{"use strict";e.exports=EvalError},2772:e=>{"use strict";e.exports=Error},5360:e=>{"use strict";e.exports=RangeError},2380:e=>{"use strict";e.exports=ReferenceError},7668:e=>{"use strict";e.exports=SyntaxError},6556:e=>{"use strict";e.exports=TypeError},568:e=>{"use strict";e.exports=URIError},7040:(e,t,r)=>{"use strict";var n=r(8528),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===o.call(e)?function(e,t,r){for(var n=0,o=e.length;n<o;n++)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a):"string"==typeof e?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,a):function(e,t,r){for(var n in e)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a)}},7840:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),s=r(0,o.length-a.length),u=[],c=0;c<s;c++)u[c]="$"+c;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(u,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,n(a,arguments));return Object(t)===t?t:this}return o.apply(e,n(a,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i}},268:(e,t,r)=>{"use strict";var n=r(7840);e.exports=Function.prototype.bind||n},6604:(e,t,r)=>{"use strict";var n,o=r(2772),i=r(9576),a=r(5360),s=r(2380),u=r(7668),c=r(6556),l=r(568),f=Function,p=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var y=function(){throw new c},d=h?function(){try{return y}catch(e){try{return h(arguments,"callee").get}catch(e){return y}}}():y,m=r(4308)(),g=r(7636)(),v=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),b={},w="undefined"!=typeof Uint8Array&&v?v(Uint8Array):n,S={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":m&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&v?v(v([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&m&&v?v((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&m&&v?v((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&v?v(""[Symbol.iterator]()):n,"%Symbol%":m?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":d,"%TypedArray%":w,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(v)try{null.error}catch(e){var k=v(v(e));S["%Error.prototype%"]=k}var E=function e(t){var r;if("%AsyncFunction%"===t)r=p("async function () {}");else if("%GeneratorFunction%"===t)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=p("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(r=v(o.prototype))}return S[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=r(268),O=r(5176),P=T.call(Function.call,Array.prototype.concat),x=T.call(Function.apply,Array.prototype.splice),I=T.call(Function.call,String.prototype.replace),_=T.call(Function.call,String.prototype.slice),B=T.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,U=function(e,t){var r,n=e;if(O(A,n)&&(n="%"+(r=A[n])[0]+"%"),O(S,n)){var o=S[n];if(o===b&&(o=E(n)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_(e,0,1),r=_(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return I(e,R,(function(e,t,r,o){n[n.length]=r?I(o,C,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=U("%"+n+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(n=l[0],x(r,P([0,1],l)));for(var f=1,p=!0;f<r.length;f+=1){var y=r[f],d=_(y,0,1),m=_(y,-1);if(('"'===d||"'"===d||"`"===d||'"'===m||"'"===m||"`"===m)&&d!==m)throw new u("property names with quotes must have matching quotes");if("constructor"!==y&&p||(s=!0),O(S,i="%"+(n+="."+y)+"%"))a=S[i];else if(null!=a){if(!(y in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&f+1>=r.length){var g=h(a,y);a=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[y]}else p=O(a,y),a=a[y];p&&!s&&(S[i]=a)}}return a}},872:(e,t,r)=>{"use strict";var n=r(6604)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},1188:(e,t,r)=>{"use strict";var n=r(6604)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},7636:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},4308:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(1968);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1968:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3804:(e,t,r)=>{"use strict";var n=r(1968);e.exports=function(){return n()&&!!Symbol.toStringTag}},5176:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(268);e.exports=i.call(n,o)},4404:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,y=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=y,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+h]=255&a,h+=y,a/=256,c-=8);e[r+h-y]|=128*d}},8248:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},2816:(e,t,r)=>{"use strict";var n=r(3804)(),o=r(2768)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=s?i:a},8528:e=>{"use strict";var t,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,t)}catch(e){e!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},s=function(e){try{return!a(e)&&(n.call(e),!0)}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==r)return!1}return!a(e)&&s(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return s(e);if(a(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},7700:(e,t,r)=>{"use strict";var n,o=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(3804)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(i.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===o.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},5108:e=>{"use strict";e.exports=function(e){return e!=e}},2796:(e,t,r)=>{"use strict";var n=r(4572),o=r(5728),i=r(5108),a=r(4312),s=r(5528),u=n(a(),Number);o(u,{getPolyfill:a,implementation:i,shim:s}),e.exports=u},4312:(e,t,r)=>{"use strict";var n=r(5108);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},5528:(e,t,r)=>{"use strict";var n=r(5728),o=r(4312);e.exports=function(){var e=o();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},3340:(e,t,r)=>{"use strict";var n=r(8488);e.exports=function(e){return!!n(e)}},7344:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},1620:(e,t,r)=>{"use strict";var n=r(5728),o=r(4572),i=r(7344),a=r(9756),s=r(8116),u=o(a(),Object);n(u,{getPolyfill:a,implementation:i,shim:s}),e.exports=u},9756:(e,t,r)=>{"use strict";var n=r(7344);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},8116:(e,t,r)=>{"use strict";var n=r(9756),o=r(5728);e.exports=function(){var e=n();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},3816:(e,t,r)=>{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(3428),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),n=a(e),s=t&&"[object String]"===i.call(e),p=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var y=c&&r;if(s&&e.length>0&&!o.call(e,0))for(var d=0;d<e.length;++d)p.push(String(d));if(n&&e.length>0)for(var m=0;m<e.length;++m)p.push(String(m));else for(var g in e)y&&"prototype"===g||!o.call(e,g)||p.push(String(g));if(u)for(var v=function(e){if("undefined"==typeof window||!h)return f(e);try{return f(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)v&&"constructor"===l[b]||!o.call(e,l[b])||p.push(l[b]);return p}}e.exports=n},7056:(e,t,r)=>{"use strict";var n=Array.prototype.slice,o=r(3428),i=Object.keys,a=i?function(e){return i(e)}:r(3816),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?s(n.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},3428:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},7928:(e,t,r)=>{"use strict";var n=r(7056),o=r(1968)(),i=r(2768),a=Object,s=i("Array.prototype.push"),u=i("Object.prototype.propertyIsEnumerable"),c=o?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=a(e);if(1===arguments.length)return r;for(var i=1;i<arguments.length;++i){var l=a(arguments[i]),f=n(l),p=o&&(Object.getOwnPropertySymbols||c);if(p)for(var h=p(l),y=0;y<h.length;++y){var d=h[y];u(l,d)&&s(f,d)}for(var m=0;m<f.length;++m){var g=f[m];if(u(l,g)){var v=l[g];r[g]=v}}}return r}},9244:(e,t,r)=>{"use strict";var n=r(7928);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var o=Object.assign({},r),i="";for(var a in o)i+=a;return e!==i}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return"y"===e[1]}return!1}()?n:Object.assign:n}},6512:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&p())}function p(){if(!c){var e=a(f);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l<t;)s&&s[l].run();l=-1,t=u.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function y(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new h(e,t)),1!==u.length||c||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=y,n.addListener=y,n.once=y,n.off=y,n.removeListener=y,n.removeAllListeners=y,n.emit=y,n.prependListener=y,n.prependOnceListener=y,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},3476:(e,t,r)=>{var n=r(3296),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2392:(e,t,r)=>{"use strict";var n=r(6604),o=r(5456),i=r(1188)(),a=r(872),s=r(6556),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},8613:(e,t,r)=>{var n=r(3476).Buffer;function o(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}o.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,o=this._blockSize,i=e.length,a=this._len,s=0;s<i;){for(var u=a%o,c=Math.min(i-s,o-u),l=0;l<c;l++)r[u+l]=e[s+l];s+=c,(a+=c)%o==0&&this._update(r)}return this._len+=i,this},o.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},5236:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(5424),n.sha1=r(1360),n.sha224=r(5208),n.sha256=r(3244),n.sha384=r(8552),n.sha512=r(3352)},5424:(e,t,r)=>{var n=r(8248),o=r(8613),i=r(3476).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var p=0;p<80;++p){var h=~~(p/20),y=0|((t=n)<<5|t>>>27)+l(h,o,i,s)+u+r[p]+a[h];u=s,s=i,i=c(o),o=n,n=y}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.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},e.exports=u},1360:(e,t,r)=>{var n=r(8248),o=r(8613),i=r(3476).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,p=0;p<16;++p)r[p]=e.readInt32BE(4*p);for(;p<80;++p)r[p]=(t=r[p-3]^r[p-8]^r[p-14]^r[p-16])<<1|t>>>31;for(var h=0;h<80;++h){var y=~~(h/20),d=c(n)+f(y,o,i,s)+u+r[h]+a[y]|0;u=s,s=i,i=l(o),o=n,n=d}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.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},e.exports=u},5208:(e,t,r)=>{var n=r(8248),o=r(3244),i=r(8613),a=r(3476).Buffer,s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}n(u,o),u.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},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},3244:(e,t,r)=>{var n=r(8248),o=r(8613),i=r(3476).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,o),u.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},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,y=0|this._f,d=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+h(r[g-15])+r[g-16];for(var v=0;v<64;++v){var b=m+p(u)+c(u,y,d)+a[v]+r[v]|0,w=f(n)+l(n,o,i)|0;m=d,d=y,y=u,u=s+b|0,s=i,i=o,o=n,n=b+w|0}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=y+this._f|0,this._g=d+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},8552:(e,t,r)=>{var n=r(8248),o=r(3352),i=r(8613),a=r(3476).Buffer,s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}n(u,o),u.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},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},3352:(e,t,r)=>{var n=r(8248),o=r(8613),i=r(3476).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function p(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function y(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function d(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0<t>>>0?1:0}n(u,o),u.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},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,o=0|this._ch,i=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,S=0|this._bl,k=0|this._cl,E=0|this._dl,A=0|this._el,T=0|this._fl,O=0|this._gl,P=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var I=t[x-30],_=t[x-30+1],B=h(I,_),R=y(_,I),C=d(I=t[x-4],_=t[x-4+1]),U=m(_,I),N=t[x-14],L=t[x-14+1],j=t[x-32],M=t[x-32+1],F=R+L|0,D=B+N+g(F,R)|0;D=(D=D+C+g(F=F+U|0,U)|0)+j+g(F=F+M|0,M)|0,t[x]=D,t[x+1]=F}for(var V=0;V<160;V+=2){D=t[V],F=t[V+1];var q=l(r,n,o),K=l(w,S,k),H=f(r,w),z=f(w,r),X=p(s,A),$=p(A,s),G=a[V],W=a[V+1],Y=c(s,u,v),J=c(A,T,O),Z=P+$|0,Q=b+X+g(Z,P)|0;Q=(Q=(Q=Q+Y+g(Z=Z+J|0,J)|0)+G+g(Z=Z+W|0,W)|0)+D+g(Z=Z+F|0,F)|0;var ee=z+K|0,te=H+q+g(ee,z)|0;b=v,P=O,v=u,O=T,u=s,T=A,s=i+Q+g(A=E+Z|0,E)|0,i=o,E=k,o=n,k=S,n=r,S=w,r=Q+te+g(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+S|0,this._cl=this._cl+k|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+T|0,this._gl=this._gl+O|0,this._hl=this._hl+P|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,S)|0,this._ch=this._ch+o+g(this._cl,k)|0,this._dh=this._dh+i+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,A)|0,this._fh=this._fh+u+g(this._fl,T)|0,this._gh=this._gh+v+g(this._gl,O)|0,this._hh=this._hh+b+g(this._hl,P)|0},u.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},9268:(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},o=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var a=t(),s=t([1]),u=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function y(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function d(e,t,r,n,o){var i,a=0;for(i=0;i<o;i++)a|=e[t+i]^r[n+i];return(1&a-1>>>8)-1}function m(e,t,r,n){return d(e,t,r,n,16)}function g(e,t,r,n){return d(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,y=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,S=i,k=a,E=s,A=u,T=c,O=l,P=f,x=p,I=h,_=y,B=d,R=m,C=g,U=v,N=b,L=w,j=0;j<20;j+=2)S^=(o=(C^=(o=(I^=(o=(T^=(o=S+C|0)<<7|o>>>25)+S|0)<<9|o>>>23)+T|0)<<13|o>>>19)+I|0)<<18|o>>>14,O^=(o=(k^=(o=(U^=(o=(_^=(o=O+k|0)<<7|o>>>25)+O|0)<<9|o>>>23)+_|0)<<13|o>>>19)+U|0)<<18|o>>>14,B^=(o=(P^=(o=(E^=(o=(N^=(o=B+P|0)<<7|o>>>25)+B|0)<<9|o>>>23)+N|0)<<13|o>>>19)+E|0)<<18|o>>>14,L^=(o=(R^=(o=(x^=(o=(A^=(o=L+R|0)<<7|o>>>25)+L|0)<<9|o>>>23)+A|0)<<13|o>>>19)+x|0)<<18|o>>>14,S^=(o=(A^=(o=(E^=(o=(k^=(o=S+A|0)<<7|o>>>25)+S|0)<<9|o>>>23)+k|0)<<13|o>>>19)+E|0)<<18|o>>>14,O^=(o=(T^=(o=(x^=(o=(P^=(o=O+T|0)<<7|o>>>25)+O|0)<<9|o>>>23)+P|0)<<13|o>>>19)+x|0)<<18|o>>>14,B^=(o=(_^=(o=(I^=(o=(R^=(o=B+_|0)<<7|o>>>25)+B|0)<<9|o>>>23)+R|0)<<13|o>>>19)+I|0)<<18|o>>>14,L^=(o=(N^=(o=(U^=(o=(C^=(o=L+N|0)<<7|o>>>25)+L|0)<<9|o>>>23)+C|0)<<13|o>>>19)+U|0)<<18|o>>>14;S=S+i|0,k=k+a|0,E=E+s|0,A=A+u|0,T=T+c|0,O=O+l|0,P=P+f|0,x=x+p|0,I=I+h|0,_=_+y|0,B=B+d|0,R=R+m|0,C=C+g|0,U=U+v|0,N=N+b|0,L=L+w|0,e[0]=S>>>0&255,e[1]=S>>>8&255,e[2]=S>>>16&255,e[3]=S>>>24&255,e[4]=k>>>0&255,e[5]=k>>>8&255,e[6]=k>>>16&255,e[7]=k>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=T>>>0&255,e[17]=T>>>8&255,e[18]=T>>>16&255,e[19]=T>>>24&255,e[20]=O>>>0&255,e[21]=O>>>8&255,e[22]=O>>>16&255,e[23]=O>>>24&255,e[24]=P>>>0&255,e[25]=P>>>8&255,e[26]=P>>>16&255,e[27]=P>>>24&255,e[28]=x>>>0&255,e[29]=x>>>8&255,e[30]=x>>>16&255,e[31]=x>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=B>>>0&255,e[41]=B>>>8&255,e[42]=B>>>16&255,e[43]=B>>>24&255,e[44]=R>>>0&255,e[45]=R>>>8&255,e[46]=R>>>16&255,e[47]=R>>>24&255,e[48]=C>>>0&255,e[49]=C>>>8&255,e[50]=C>>>16&255,e[51]=C>>>24&255,e[52]=U>>>0&255,e[53]=U>>>8&255,e[54]=U>>>16&255,e[55]=U>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=L>>>0&255,e[61]=L>>>8&255,e[62]=L>>>16&255,e[63]=L>>>24&255}(e,t,r,n)}function b(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,y=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,S=0;S<20;S+=2)i^=(o=(g^=(o=(h^=(o=(c^=(o=i+g|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+h|0)<<18|o>>>14,l^=(o=(a^=(o=(v^=(o=(y^=(o=l+a|0)<<7|o>>>25)+l|0)<<9|o>>>23)+y|0)<<13|o>>>19)+v|0)<<18|o>>>14,d^=(o=(f^=(o=(s^=(o=(b^=(o=d+f|0)<<7|o>>>25)+d|0)<<9|o>>>23)+b|0)<<13|o>>>19)+s|0)<<18|o>>>14,w^=(o=(m^=(o=(p^=(o=(u^=(o=w+m|0)<<7|o>>>25)+w|0)<<9|o>>>23)+u|0)<<13|o>>>19)+p|0)<<18|o>>>14,i^=(o=(u^=(o=(s^=(o=(a^=(o=i+u|0)<<7|o>>>25)+i|0)<<9|o>>>23)+a|0)<<13|o>>>19)+s|0)<<18|o>>>14,l^=(o=(c^=(o=(p^=(o=(f^=(o=l+c|0)<<7|o>>>25)+l|0)<<9|o>>>23)+f|0)<<13|o>>>19)+p|0)<<18|o>>>14,d^=(o=(y^=(o=(h^=(o=(m^=(o=d+y|0)<<7|o>>>25)+d|0)<<9|o>>>23)+m|0)<<13|o>>>19)+h|0)<<18|o>>>14,w^=(o=(b^=(o=(v^=(o=(g^=(o=w+b|0)<<7|o>>>25)+w|0)<<9|o>>>23)+g|0)<<13|o>>>19)+v|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=d>>>0&255,e[9]=d>>>8&255,e[10]=d>>>16&255,e[11]=d>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=p>>>0&255,e[21]=p>>>8&255,e[22]=p>>>16&255,e[23]=p>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=y>>>0&255,e[29]=y>>>8&255,e[30]=y>>>16&255,e[31]=y>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function S(e,t,r,n,o,i,a){var s,u,c=new Uint8Array(16),l=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(v(l,c,a,w),u=0;u<64;u++)e[t+u]=r[n+u]^l[u];for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8;o-=64,t+=64,n+=64}if(o>0)for(v(l,c,a,w),u=0;u<o;u++)e[t+u]=r[n+u]^l[u];return 0}function k(e,t,r,n,o){var i,a,s=new Uint8Array(16),u=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(v(u,s,o,w),a=0;a<64;a++)e[t+a]=u[a];for(i=1,a=8;a<16;a++)i=i+(255&s[a])|0,s[a]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(v(u,s,o,w),a=0;a<r;a++)e[t+a]=u[a];return 0}function E(e,t,r,n,o){var i=new Uint8Array(32);b(i,n,o,w);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return k(e,t,r,a,i)}function A(e,t,r,n,o,i,a){var s=new Uint8Array(32);b(s,i,a,w);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=i[c+16];return S(e,t,r,n,o,u,s)}var T=function(e){var t,r,n,o,i,a,s,u;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,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>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,t,r,n,o,i){var a=new T(i);return a.update(r,n,o),a.finish(e,t),0}function P(e,t,r,n,o,i){var a=new Uint8Array(16);return O(a,0,r,n,o,i),m(e,t,a,0)}function x(e,t,r,n,o){var i;if(r<32)return-1;for(A(e,0,t,0,r,n,o),O(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function I(e,t,r,n,o){var i,a=new Uint8Array(32);if(r<32)return-1;if(E(a,0,32,n,o),0!==P(t,16,t,32,r-32,a))return-1;for(A(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0}function _(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function B(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function R(e,t,r){for(var n,o=~(r-1),i=0;i<16;i++)n=o&(e[i]^t[i]),e[i]^=n,t[i]^=n}function C(e,r){var n,o,i,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(B(s),B(s),B(s),o=0;o<2;o++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,R(s,a,1-i)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function U(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return C(r,e),C(n,t),g(r,0,n,0)}function N(e){var t=new Uint8Array(32);return C(t,e),1&t[0]}function L(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function j(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function M(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function F(e,t,r){var n,o,i=0,a=0,s=0,u=0,c=0,l=0,f=0,p=0,h=0,y=0,d=0,m=0,g=0,v=0,b=0,w=0,S=0,k=0,E=0,A=0,T=0,O=0,P=0,x=0,I=0,_=0,B=0,R=0,C=0,U=0,N=0,L=r[0],j=r[1],M=r[2],F=r[3],D=r[4],V=r[5],q=r[6],K=r[7],H=r[8],z=r[9],X=r[10],$=r[11],G=r[12],W=r[13],Y=r[14],J=r[15];i+=(n=t[0])*L,a+=n*j,s+=n*M,u+=n*F,c+=n*D,l+=n*V,f+=n*q,p+=n*K,h+=n*H,y+=n*z,d+=n*X,m+=n*$,g+=n*G,v+=n*W,b+=n*Y,w+=n*J,a+=(n=t[1])*L,s+=n*j,u+=n*M,c+=n*F,l+=n*D,f+=n*V,p+=n*q,h+=n*K,y+=n*H,d+=n*z,m+=n*X,g+=n*$,v+=n*G,b+=n*W,w+=n*Y,S+=n*J,s+=(n=t[2])*L,u+=n*j,c+=n*M,l+=n*F,f+=n*D,p+=n*V,h+=n*q,y+=n*K,d+=n*H,m+=n*z,g+=n*X,v+=n*$,b+=n*G,w+=n*W,S+=n*Y,k+=n*J,u+=(n=t[3])*L,c+=n*j,l+=n*M,f+=n*F,p+=n*D,h+=n*V,y+=n*q,d+=n*K,m+=n*H,g+=n*z,v+=n*X,b+=n*$,w+=n*G,S+=n*W,k+=n*Y,E+=n*J,c+=(n=t[4])*L,l+=n*j,f+=n*M,p+=n*F,h+=n*D,y+=n*V,d+=n*q,m+=n*K,g+=n*H,v+=n*z,b+=n*X,w+=n*$,S+=n*G,k+=n*W,E+=n*Y,A+=n*J,l+=(n=t[5])*L,f+=n*j,p+=n*M,h+=n*F,y+=n*D,d+=n*V,m+=n*q,g+=n*K,v+=n*H,b+=n*z,w+=n*X,S+=n*$,k+=n*G,E+=n*W,A+=n*Y,T+=n*J,f+=(n=t[6])*L,p+=n*j,h+=n*M,y+=n*F,d+=n*D,m+=n*V,g+=n*q,v+=n*K,b+=n*H,w+=n*z,S+=n*X,k+=n*$,E+=n*G,A+=n*W,T+=n*Y,O+=n*J,p+=(n=t[7])*L,h+=n*j,y+=n*M,d+=n*F,m+=n*D,g+=n*V,v+=n*q,b+=n*K,w+=n*H,S+=n*z,k+=n*X,E+=n*$,A+=n*G,T+=n*W,O+=n*Y,P+=n*J,h+=(n=t[8])*L,y+=n*j,d+=n*M,m+=n*F,g+=n*D,v+=n*V,b+=n*q,w+=n*K,S+=n*H,k+=n*z,E+=n*X,A+=n*$,T+=n*G,O+=n*W,P+=n*Y,x+=n*J,y+=(n=t[9])*L,d+=n*j,m+=n*M,g+=n*F,v+=n*D,b+=n*V,w+=n*q,S+=n*K,k+=n*H,E+=n*z,A+=n*X,T+=n*$,O+=n*G,P+=n*W,x+=n*Y,I+=n*J,d+=(n=t[10])*L,m+=n*j,g+=n*M,v+=n*F,b+=n*D,w+=n*V,S+=n*q,k+=n*K,E+=n*H,A+=n*z,T+=n*X,O+=n*$,P+=n*G,x+=n*W,I+=n*Y,_+=n*J,m+=(n=t[11])*L,g+=n*j,v+=n*M,b+=n*F,w+=n*D,S+=n*V,k+=n*q,E+=n*K,A+=n*H,T+=n*z,O+=n*X,P+=n*$,x+=n*G,I+=n*W,_+=n*Y,B+=n*J,g+=(n=t[12])*L,v+=n*j,b+=n*M,w+=n*F,S+=n*D,k+=n*V,E+=n*q,A+=n*K,T+=n*H,O+=n*z,P+=n*X,x+=n*$,I+=n*G,_+=n*W,B+=n*Y,R+=n*J,v+=(n=t[13])*L,b+=n*j,w+=n*M,S+=n*F,k+=n*D,E+=n*V,A+=n*q,T+=n*K,O+=n*H,P+=n*z,x+=n*X,I+=n*$,_+=n*G,B+=n*W,R+=n*Y,C+=n*J,b+=(n=t[14])*L,w+=n*j,S+=n*M,k+=n*F,E+=n*D,A+=n*V,T+=n*q,O+=n*K,P+=n*H,x+=n*z,I+=n*X,_+=n*$,B+=n*G,R+=n*W,C+=n*Y,U+=n*J,w+=(n=t[15])*L,a+=38*(k+=n*M),s+=38*(E+=n*F),u+=38*(A+=n*D),c+=38*(T+=n*V),l+=38*(O+=n*q),f+=38*(P+=n*K),p+=38*(x+=n*H),h+=38*(I+=n*z),y+=38*(_+=n*X),d+=38*(B+=n*$),m+=38*(R+=n*G),g+=38*(C+=n*W),v+=38*(U+=n*Y),b+=38*(N+=n*J),i=(n=(i+=38*(S+=n*j))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=p,e[8]=h,e[9]=y,e[10]=d,e[11]=m,e[12]=g,e[13]=v,e[14]=b,e[15]=w}function D(e,t){F(e,t,t)}function V(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=253;n>=0;n--)D(o,o),2!==n&&4!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function q(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=250;n>=0;n--)D(o,o),1!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function K(e,r,n){var o,i,a=new Uint8Array(32),s=new Float64Array(80),c=t(),l=t(),f=t(),p=t(),h=t(),y=t();for(i=0;i<31;i++)a[i]=r[i];for(a[31]=127&r[31]|64,a[0]&=248,L(s,n),i=0;i<16;i++)l[i]=s[i],p[i]=c[i]=f[i]=0;for(c[0]=p[0]=1,i=254;i>=0;--i)R(c,l,o=a[i>>>3]>>>(7&i)&1),R(f,p,o),j(h,c,f),M(c,c,f),j(f,l,p),M(l,l,p),D(p,h),D(y,c),F(c,f,c),F(f,l,h),j(h,c,f),M(c,c,f),D(l,c),M(f,p,y),F(c,f,u),j(c,c,p),F(f,f,c),F(c,p,y),F(p,l,s),D(l,h),R(c,l,o),R(f,p,o);for(i=0;i<16;i++)s[i+16]=c[i],s[i+32]=f[i],s[i+48]=l[i],s[i+64]=p[i];var d=s.subarray(32),m=s.subarray(16);return V(d,d),F(m,m,d),C(e,m),0}function H(e,t){return K(e,t,i)}function z(e,t){return n(t,32),H(e,t)}function X(e,t,r){var n=new Uint8Array(32);return K(n,r,t),b(e,o,n,w)}T.prototype.blocks=function(e,t,r){for(var n,o,i,a,s,u,c,l,f,p,h,y,d,m,g,v,b,w,S,k=this.fin?0:2048,E=this.h[0],A=this.h[1],T=this.h[2],O=this.h[3],P=this.h[4],x=this.h[5],I=this.h[6],_=this.h[7],B=this.h[8],R=this.h[9],C=this.r[0],U=this.r[1],N=this.r[2],L=this.r[3],j=this.r[4],M=this.r[5],F=this.r[6],D=this.r[7],V=this.r[8],q=this.r[9];r>=16;)p=f=0,p+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*C,p+=(A+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*q),p+=(T+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*V),p+=(O+=8191&(i>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*D),f=(p+=(P+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*F))>>>13,p&=8191,p+=(x+=s>>>1&8191)*(5*M),p+=(I+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*j),p+=(_+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*L),p+=(B+=8191&(c>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),h=f+=(p+=(R+=l>>>5|k)*(5*U))>>>13,h+=E*U,h+=A*C,h+=T*(5*q),h+=O*(5*V),f=(h+=P*(5*D))>>>13,h&=8191,h+=x*(5*F),h+=I*(5*M),h+=_*(5*j),h+=B*(5*L),f+=(h+=R*(5*N))>>>13,h&=8191,y=f,y+=E*N,y+=A*U,y+=T*C,y+=O*(5*q),f=(y+=P*(5*V))>>>13,y&=8191,y+=x*(5*D),y+=I*(5*F),y+=_*(5*M),y+=B*(5*j),d=f+=(y+=R*(5*L))>>>13,d+=E*L,d+=A*N,d+=T*U,d+=O*C,f=(d+=P*(5*q))>>>13,d&=8191,d+=x*(5*V),d+=I*(5*D),d+=_*(5*F),d+=B*(5*M),m=f+=(d+=R*(5*j))>>>13,m+=E*j,m+=A*L,m+=T*N,m+=O*U,f=(m+=P*C)>>>13,m&=8191,m+=x*(5*q),m+=I*(5*V),m+=_*(5*D),m+=B*(5*F),g=f+=(m+=R*(5*M))>>>13,g+=E*M,g+=A*j,g+=T*L,g+=O*N,f=(g+=P*U)>>>13,g&=8191,g+=x*C,g+=I*(5*q),g+=_*(5*V),g+=B*(5*D),v=f+=(g+=R*(5*F))>>>13,v+=E*F,v+=A*M,v+=T*j,v+=O*L,f=(v+=P*N)>>>13,v&=8191,v+=x*U,v+=I*C,v+=_*(5*q),v+=B*(5*V),b=f+=(v+=R*(5*D))>>>13,b+=E*D,b+=A*F,b+=T*M,b+=O*j,f=(b+=P*L)>>>13,b&=8191,b+=x*N,b+=I*U,b+=_*C,b+=B*(5*q),w=f+=(b+=R*(5*V))>>>13,w+=E*V,w+=A*D,w+=T*F,w+=O*M,f=(w+=P*j)>>>13,w&=8191,w+=x*L,w+=I*N,w+=_*U,w+=B*C,S=f+=(w+=R*(5*q))>>>13,S+=E*q,S+=A*V,S+=T*D,S+=O*F,f=(S+=P*M)>>>13,S&=8191,S+=x*j,S+=I*L,S+=_*N,S+=B*U,E=p=8191&(f=(f=((f+=(S+=R*C)>>>13)<<2)+f|0)+(p&=8191)|0),A=h+=f>>>=13,T=y&=8191,O=d&=8191,P=m&=8191,x=g&=8191,I=v&=8191,_=b&=8191,B=w&=8191,R=S&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=A,this.h[2]=T,this.h[3]=O,this.h[4]=P,this.h[5]=x,this.h[6]=I,this.h[7]=_,this.h[8]=B,this.h[9]=R},T.prototype.finish=function(e,t){var r,n,o,i,a=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,i=1;i<10;i++)a[i]=this.h[i]+r,r=a[i]>>>13,a[i]&=8191;for(a[9]-=8192,n=(1^r)-1,i=0;i<10;i++)a[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|a[i];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),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},T.prototype.update=function(e,t,r){var n,o;if(this.leftover){for((o=16-this.leftover)>r&&(o=r),n=0;n<o;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(o=r-r%16,this.blocks(e,t,o),t+=o,r-=o),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var $=x,G=I;var W=[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 Y(e,t,r,n){for(var o,i,a,s,u,c,l,f,p,h,y,d,m,g,v,b,w,S,k,E,A,T,O,P,x,I,_=new Int32Array(16),B=new Int32Array(16),R=e[0],C=e[1],U=e[2],N=e[3],L=e[4],j=e[5],M=e[6],F=e[7],D=t[0],V=t[1],q=t[2],K=t[3],H=t[4],z=t[5],X=t[6],$=t[7],G=0;n>=128;){for(k=0;k<16;k++)E=8*k+G,_[k]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],B[k]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(k=0;k<80;k++)if(o=R,i=C,a=U,s=N,u=L,c=j,l=M,F,p=D,h=V,y=q,d=K,m=H,g=z,v=X,$,O=65535&(T=$),P=T>>>16,x=65535&(A=F),I=A>>>16,O+=65535&(T=(H>>>14|L<<18)^(H>>>18|L<<14)^(L>>>9|H<<23)),P+=T>>>16,x+=65535&(A=(L>>>14|H<<18)^(L>>>18|H<<14)^(H>>>9|L<<23)),I+=A>>>16,O+=65535&(T=H&z^~H&X),P+=T>>>16,x+=65535&(A=L&j^~L&M),I+=A>>>16,A=W[2*k],O+=65535&(T=W[2*k+1]),P+=T>>>16,x+=65535&A,I+=A>>>16,A=_[k%16],P+=(T=B[k%16])>>>16,x+=65535&A,I+=A>>>16,x+=(P+=(O+=65535&T)>>>16)>>>16,O=65535&(T=S=65535&O|P<<16),P=T>>>16,x=65535&(A=w=65535&x|(I+=x>>>16)<<16),I=A>>>16,O+=65535&(T=(D>>>28|R<<4)^(R>>>2|D<<30)^(R>>>7|D<<25)),P+=T>>>16,x+=65535&(A=(R>>>28|D<<4)^(D>>>2|R<<30)^(D>>>7|R<<25)),I+=A>>>16,P+=(T=D&V^D&q^V&q)>>>16,x+=65535&(A=R&C^R&U^C&U),I+=A>>>16,f=65535&(x+=(P+=(O+=65535&T)>>>16)>>>16)|(I+=x>>>16)<<16,b=65535&O|P<<16,O=65535&(T=d),P=T>>>16,x=65535&(A=s),I=A>>>16,P+=(T=S)>>>16,x+=65535&(A=w),I+=A>>>16,C=o,U=i,N=a,L=s=65535&(x+=(P+=(O+=65535&T)>>>16)>>>16)|(I+=x>>>16)<<16,j=u,M=c,F=l,R=f,V=p,q=h,K=y,H=d=65535&O|P<<16,z=m,X=g,$=v,D=b,k%16==15)for(E=0;E<16;E++)A=_[E],O=65535&(T=B[E]),P=T>>>16,x=65535&A,I=A>>>16,A=_[(E+9)%16],O+=65535&(T=B[(E+9)%16]),P+=T>>>16,x+=65535&A,I+=A>>>16,w=_[(E+1)%16],O+=65535&(T=((S=B[(E+1)%16])>>>1|w<<31)^(S>>>8|w<<24)^(S>>>7|w<<25)),P+=T>>>16,x+=65535&(A=(w>>>1|S<<31)^(w>>>8|S<<24)^w>>>7),I+=A>>>16,w=_[(E+14)%16],P+=(T=((S=B[(E+14)%16])>>>19|w<<13)^(w>>>29|S<<3)^(S>>>6|w<<26))>>>16,x+=65535&(A=(w>>>19|S<<13)^(S>>>29|w<<3)^w>>>6),I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,_[E]=65535&x|I<<16,B[E]=65535&O|P<<16;O=65535&(T=D),P=T>>>16,x=65535&(A=R),I=A>>>16,A=e[0],P+=(T=t[0])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[0]=R=65535&x|I<<16,t[0]=D=65535&O|P<<16,O=65535&(T=V),P=T>>>16,x=65535&(A=C),I=A>>>16,A=e[1],P+=(T=t[1])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[1]=C=65535&x|I<<16,t[1]=V=65535&O|P<<16,O=65535&(T=q),P=T>>>16,x=65535&(A=U),I=A>>>16,A=e[2],P+=(T=t[2])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[2]=U=65535&x|I<<16,t[2]=q=65535&O|P<<16,O=65535&(T=K),P=T>>>16,x=65535&(A=N),I=A>>>16,A=e[3],P+=(T=t[3])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[3]=N=65535&x|I<<16,t[3]=K=65535&O|P<<16,O=65535&(T=H),P=T>>>16,x=65535&(A=L),I=A>>>16,A=e[4],P+=(T=t[4])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[4]=L=65535&x|I<<16,t[4]=H=65535&O|P<<16,O=65535&(T=z),P=T>>>16,x=65535&(A=j),I=A>>>16,A=e[5],P+=(T=t[5])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[5]=j=65535&x|I<<16,t[5]=z=65535&O|P<<16,O=65535&(T=X),P=T>>>16,x=65535&(A=M),I=A>>>16,A=e[6],P+=(T=t[6])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[6]=M=65535&x|I<<16,t[6]=X=65535&O|P<<16,O=65535&(T=$),P=T>>>16,x=65535&(A=F),I=A>>>16,A=e[7],P+=(T=t[7])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[7]=F=65535&x|I<<16,t[7]=$=65535&O|P<<16,G+=128,n-=128}return n}function J(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),a=new Uint8Array(256),s=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Y(o,i,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,y(a,r-8,s/536870912|0,s<<3),Y(o,i,a,r),n=0;n<8;n++)y(e,8*n,o[n],i[n]);return 0}function Z(e,r){var n=t(),o=t(),i=t(),a=t(),s=t(),u=t(),c=t(),f=t(),p=t();M(n,e[1],e[0]),M(p,r[1],r[0]),F(n,n,p),j(o,e[0],e[1]),j(p,r[0],r[1]),F(o,o,p),F(i,e[3],r[3]),F(i,i,l),F(a,e[2],r[2]),j(a,a,a),M(s,o,n),M(u,a,i),j(c,a,i),j(f,o,n),F(e[0],s,u),F(e[1],f,c),F(e[2],c,u),F(e[3],s,f)}function Q(e,t,r){var n;for(n=0;n<4;n++)R(e[n],t[n],r)}function ee(e,r){var n=t(),o=t(),i=t();V(i,r[2]),F(n,r[0],i),F(o,r[1],i),C(e,o),e[31]^=N(n)<<7}function te(e,t,r){var n,o;for(_(e[0],a),_(e[1],s),_(e[2],s),_(e[3],a),o=255;o>=0;--o)Q(e,t,n=r[o/8|0]>>(7&o)&1),Z(t,e),Z(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];_(n[0],f),_(n[1],p),_(n[2],s),F(n[3],f,p),te(e,n,r)}function ne(e,r,o){var i,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(o||n(r,32),J(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),ee(e,s),i=0;i<32;i++)r[i+32]=e[i];return 0}var oe=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 ie(e,t){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o<i;++o)t[o]+=r-16*t[n]*oe[o-(n-32)],r=Math.floor((t[o]+128)/256),t[o]-=256*r;t[o]+=r,t[n]=0}for(r=0,o=0;o<32;o++)t[o]+=r-(t[31]>>4)*oe[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*oe[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ae(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function se(e,r,n,o){var i,a,s=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];J(s,o,32),s[0]&=248,s[31]&=127,s[31]|=64;var p=n+64;for(i=0;i<n;i++)e[64+i]=r[i];for(i=0;i<32;i++)e[32+i]=s[32+i];for(J(c,e.subarray(32),n+32),ae(c),re(f,c),ee(e,f),i=32;i<64;i++)e[i]=o[i];for(J(u,e,n+64),ae(u),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=c[i];for(i=0;i<32;i++)for(a=0;a<32;a++)l[i+a]+=u[i]*s[a];return ie(e.subarray(32),l),p}function ue(e,r,n,o){var i,u=new Uint8Array(32),l=new Uint8Array(64),f=[t(),t(),t(),t()],p=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),o=t(),i=t(),u=t(),l=t(),f=t(),p=t();return _(e[2],s),L(e[1],r),D(i,e[1]),F(u,i,c),M(i,i,e[2]),j(u,e[2],u),D(l,u),D(f,l),F(p,f,l),F(n,p,i),F(n,n,u),q(n,n),F(n,n,i),F(n,n,u),F(n,n,u),F(e[0],n,u),D(o,e[0]),F(o,o,u),U(o,i)&&F(e[0],e[0],h),D(o,e[0]),F(o,o,u),U(o,i)?-1:(N(e[0])===r[31]>>7&&M(e[0],a,e[0]),F(e[3],e[0],e[1]),0)}(p,o))return-1;for(i=0;i<n;i++)e[i]=r[i];for(i=0;i<32;i++)e[i+32]=o[i];if(J(l,e,n),ae(l),te(f,p,l),re(p,r.subarray(32)),Z(f,p),ee(u,f),n-=64,g(r,0,u,0)){for(i=0;i<n;i++)e[i]=0;return-1}for(i=0;i<n;i++)e[i]=r[i+64];return n}var ce=16,le=64,fe=32,pe=64;function he(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function ye(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function de(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:A,crypto_stream:E,crypto_stream_salsa20_xor:S,crypto_stream_salsa20:k,crypto_onetimeauth:O,crypto_onetimeauth_verify:P,crypto_verify_16:m,crypto_verify_32:g,crypto_secretbox:x,crypto_secretbox_open:I,crypto_scalarmult:K,crypto_scalarmult_base:H,crypto_box_beforenm:X,crypto_box_afternm:$,crypto_box:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),$(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),G(e,t,r,n,a)},crypto_box_keypair:z,crypto_hash:J,crypto_sign:se,crypto_sign_keypair:ne,crypto_sign_open:ue,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:ce,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:le,crypto_sign_PUBLICKEYBYTES:fe,crypto_sign_SECRETKEYBYTES:pe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:oe,pack25519:C,unpack25519:L,M:F,A:j,S:D,Z:M,pow2523:q,add:Z,set25519:_,modL:ie,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){ye(e,t,r),he(r,t);for(var n=new Uint8Array(32+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+32]=e[i];return x(o,n,n.length,t,r),o.subarray(ce)},e.secretbox.open=function(e,t,r){ye(e,t,r),he(r,t);for(var n=new Uint8Array(ce+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+ce]=e[i];return n.length<32||0!==I(o,n,n.length,t,r)?null:o.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=ce,e.scalarMult=function(e,t){if(ye(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return K(r,e,t),r},e.scalarMult.base=function(e){if(ye(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return H(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox(t,r,i)},e.box.before=function(e,t){ye(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return X(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox.open(t,r,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return z(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(ye(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return H(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(ye(e,t),t.length!==pe)throw new Error("bad secret key size");var r=new Uint8Array(le+e.length);return se(r,e,e.length,t),r},e.sign.open=function(e,t){if(ye(e,t),t.length!==fe)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ue(r,e,e.length,t);if(n<0)return null;for(var o=new Uint8Array(n),i=0;i<o.length;i++)o[i]=r[i];return o},e.sign.detached=function(t,r){for(var n=e.sign(t,r),o=new Uint8Array(le),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached.verify=function(e,t,r){if(ye(e,t,r),t.length!==le)throw new Error("bad signature size");if(r.length!==fe)throw new Error("bad public key size");var n,o=new Uint8Array(le+e.length),i=new Uint8Array(le+e.length);for(n=0;n<le;n++)o[n]=t[n];for(n=0;n<e.length;n++)o[n+le]=e[n];return ue(i,o,o.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(fe),t=new Uint8Array(pe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(ye(e),e.length!==pe)throw new Error("bad secret key size");for(var t=new Uint8Array(fe),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(ye(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(fe),r=new Uint8Array(pe),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=fe,e.sign.secretKeyLength=pe,e.sign.seedLength=32,e.sign.signatureLength=le,e.hash=function(e){ye(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return ye(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===d(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,r){var n,o=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(o.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=o[n];de(o)}))}else(t=r(7880))&&t.randomBytes&&e.setPRNG((function(e,r){var n,o=t.randomBytes(r);for(n=0;n<r;n++)e[n]=o[n];de(o)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},2848:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},9032:(e,t,r)=>{"use strict";var n=r(2816),o=r(7700),i=r(8488),a=r(3340);function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=s(Object.prototype.toString),f=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(u)var y=s(BigInt.prototype.valueOf);if(c)var d=s(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"[object Map]"===l(e)}function v(e){return"[object Set]"===l(e)}function b(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function S(e){return"[object ArrayBuffer]"===l(e)}function k(e){return"undefined"!=typeof ArrayBuffer&&(S.working?S(e):e instanceof ArrayBuffer)}function E(e){return"[object DataView]"===l(e)}function A(e){return"undefined"!=typeof DataView&&(E.working?E(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},g.working="undefined"!=typeof Map&&g(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(g.working?g(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},S.working="undefined"!=typeof ArrayBuffer&&S(new ArrayBuffer),t.isArrayBuffer=k,E.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function O(e){return"[object SharedArrayBuffer]"===l(e)}function P(e){return void 0!==T&&(void 0===O.working&&(O.working=O(new T)),O.working?O(e):e instanceof T)}function x(e){return m(e,f)}function I(e){return m(e,p)}function _(e){return m(e,h)}function B(e){return u&&m(e,y)}function R(e){return c&&m(e,d)}t.isSharedArrayBuffer=P,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=x,t.isStringObject=I,t.isBooleanObject=_,t.isBigIntObject=B,t.isSymbolObject=R,t.isBoxedPrimitive=function(e){return x(e)||I(e)||_(e)||B(e)||R(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(k(e)||P(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},3912:(e,t,r)=>{var n=r(6512),o=r(320),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},a=/%[sdj%]/g;t.format=function(e){if(!w(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(l(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,i=String(e).replace(a,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r<o;s=n[++r])v(s)||!E(s)?i+=" "+s:i+=" "+l(s);return i},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?o.trace(r):o.error(r),i=!0}return e.apply(this,arguments)}};var s={},u=/^$/;if(n.env.NODE_DEBUG){var c=n.env.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+c+"$","i")}function l(e,r){var n={seen:[],stylize:p};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),S(n.showHidden)&&(n.showHidden=!1),S(n.depth)&&(n.depth=2),S(n.colors)&&(n.colors=!1),S(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),h(n,e,n.depth)}function f(e,t){var r=l.styles[t];return r?"\x1b["+l.colors[r][0]+"m"+e+"\x1b["+l.colors[r][1]+"m":e}function p(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&O(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return w(o)||(o=h(e,o,n)),o}var i=function(e,t){if(S(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(g(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,r);if(i)return i;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),T(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return y(r);if(0===a.length){if(O(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(k(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(T(r))return y(r)}var c,l="",f=!1,p=["{","}"];(m(r)&&(f=!0,p=["[","]"]),O(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return k(r)&&(l=" "+RegExp.prototype.toString.call(r)),A(r)&&(l=" "+Date.prototype.toUTCString.call(r)),T(r)&&(l=" "+y(r)),0!==a.length||f&&0!=r.length?n<0?k(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)_(t,String(a))?i.push(d(e,t,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(d(e,t,r,n,o,!0))})),i}(e,r,n,s,a):a.map((function(t){return d(e,r,n,s,t,f)})),e.seen.pop(),function(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,p)):p[0]+l+p[1]}function y(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),_(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=v(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),S(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function b(e){return"number"==typeof e}function w(e){return"string"==typeof e}function S(e){return void 0===e}function k(e){return E(e)&&"[object RegExp]"===P(e)}function E(e){return"object"==typeof e&&null!==e}function A(e){return E(e)&&"[object Date]"===P(e)}function T(e){return E(e)&&("[object Error]"===P(e)||e instanceof Error)}function O(e){return"function"==typeof e}function P(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(u.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);o.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(9032),t.isArray=m,t.isBoolean=g,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=w,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=S,t.isRegExp=k,t.types.isRegExp=k,t.isObject=E,t.isDate=A,t.types.isDate=A,t.isError=T,t.types.isNativeError=T,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(2848);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;o.log("%s - %s",(e=new Date,r=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(8248),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var B="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(B&&e[B]){var t;if("function"!=typeof(t=e[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),B&&Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=B,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then((function(e){n.nextTick(a.bind(null,null,e))}),(function(e){n.nextTick(R.bind(null,e,a))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},8488:(e,t,r)=>{"use strict";var n=r(7040),o=r(7236),i=r(4572),a=r(2768),s=r(872),u=a("Object.prototype.toString"),c=r(3804)(),l="undefined"==typeof globalThis?r.g:globalThis,f=o(),p=a("String.prototype.slice"),h=Object.getPrototypeOf,y=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},d={__proto__:null};n(f,c&&s&&h?function(e){var t=new l[e];if(Symbol.toStringTag in t){var r=h(t),n=s(r,Symbol.toStringTag);if(!n){var o=h(r);n=s(o,Symbol.toStringTag)}d["$"+e]=i(n.get)}}:function(e){var t=new l[e],r=t.slice||t.set;r&&(d["$"+e]=i(r))});e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=p(u(e),8,-1);return y(f,t)>-1?t:"Object"===t&&function(e){var t=!1;return n(d,(function(r,n){if(!t)try{r(e),t=p(n,1)}catch(e){}})),t}(e)}return s?function(e){var t=!1;return n(d,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=p(n,1))}catch(e){}})),t}(e):null}},7880:()=>{},7236:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],o="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof o[n[t]]&&(e[e.length]=n[t]);return e}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(2456);StellarBase=n})();
|