PageSourceSearch

https://near.com/_next/static/chunks/0dv-~9w8te5w1.js?dpl=dpl_5wHu7Ry2rMHZYKhSyS3Y6LPfrcXz

js near.com collected 2026-09-25 02:36:09 UTC 1,216,912 bytes, 5 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="06d6d2b1-0bba-a424-3366-376a1ed02590")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,861488,e=>{"use strict";var t,r;(r=t||(t={}))[r.Omni_v1=0]="Omni_v1",r[r.Hot=-4]="Hot",r[r.Zcash=-5]="Zcash",r[r.Btc=-6]="Btc",r[r.OmniTon=1117]="OmniTon",r[r.Ton=1111]="Ton",r[r.Juno=4444118]="Juno",r[r.Gonka=4444119]="Gonka",r[r.Eth=1]="Eth",r[r.Tron=333]="Tron",r[r.Solana=1001]="Solana",r[r.Stellar=1100]="Stellar",r[r.Near=1010]="Near",r[r.Polygon=137]="Polygon",r[r.Arbitrum=42161]="Arbitrum",r[r.Aurora=0x4e454152]="Aurora",r[r.Avalanche=43114]="Avalanche",r[r.Linea=59144]="Linea",r[r.Xlayer=196]="Xlayer",r[r.Base=8453]="Base",r[r.Bnb=56]="Bnb",r[r.OpBnb=204]="OpBnb",r[r.BnbTestnet=97]="BnbTestnet",r[r.Optimism=10]="Optimism",r[r.Scroll=534352]="Scroll",r[r.EbiChain=98881]="EbiChain",r[r.Sei=1329]="Sei",r[r.Blast=81457]="Blast",r[r.Taiko=167e3]="Taiko",r[r.Mantle=5e3]="Mantle",r[r.Manta=169]="Manta",r[r.Kava=2222]="Kava",r[r.ZkSync=324]="ZkSync",r[r.MonadTestnet=10143]="MonadTestnet",r[r.Monad=143]="Monad",r[r.Metis=1088]="Metis",r[r.Gnosis=100]="Gnosis",r[r.Fantom=250]="Fantom",r[r.Cronos=25]="Cronos",r[r.Chiliz=88888]="Chiliz",r[r.Moonbeam=1284]="Moonbeam",r[r.Ronin=2020]="Ronin",r[r.Lisk=1135]="Lisk",r[r.Sonic=146]="Sonic",r[r.ADI=36900]="ADI",e.s(["Network",0,t])},897436,e=>{"use strict";var t=e.i(861488);let r="intents.near",n="v2_1.omni.hot.tg",o="nep245:v2_1.omni.hot.tg:",i={get intentsContract(){return r},get omniHotContract(){return n},get hotIntentPrefix(){return o},setIntentsContract(e){console.warn(`YOU CHANGED INTENTS CONTRACT TO "${e}". YOU MAY LOST YOUR FUNDS IF YOU ARE NOT SURE WHAT YOU ARE DOING`),r=e},setOmniHotContract(e){console.warn(`YOU CHANGED OMNI HOT CONTRACT TO "${e}". YOU MAY LOST YOUR FUNDS IF YOU ARE NOT SURE WHAT YOU ARE DOING`),n=e},setHotIntentPrefix(e){console.warn(`YOU CHANGED HOT INTENT PREFIX TO "${e}". YOU MAY LOST YOUR FUNDS IF YOU ARE NOT SURE WHAT YOU ARE DOING`),o=e},cosmos:{[t.Network.Juno]:{contract:"juno1va9q7gma6l62aqq988gghv4r7u4hnlgm85ssmsdf9ypw77qfwa0qaz7ea4",rpc:"https://juno-rpc.publicnode.com",gasLimit:200000n,nativeToken:"ujuno",chainId:"juno-1",prefix:"juno"},[t.Network.Gonka]:{contract:"gonka15wng2302rhq5w8ddy3l3jslrhfcpufzfs6wc3zc6cxt8cpwrfp4qqgenkc",rpc:`https://api0.herewallet.app/api/v1/evm/rpc/${t.Network.Gonka}`,gasLimit:200000n,nativeToken:"ngonka",chainId:"gonka-mainnet",prefix:"gonka"}}};e.s(["GlobalSettings",0,i])},345257,(e,t,r)=>{var n=e.i(335292);self,t.exports=(()=>{var t={41:(e,t,r)=>{"use strict";var n=r(655),o=r(8068),i=r(9675),a=r(5795);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!a&&a(e,t);if(n)n(e,t,{configurable:null===u&&f?f.configurable:!u,enumerable:null===s&&f?f.enumerable:!s,value:r,writable:null===c&&f?f.writable:!c});else{if(!l&&(s||c||u))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},76:e=>{"use strict";e.exports=Function.prototype.call},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,c=(1<<s)-1,u=c>>1,l=-7,f=r?o-1:0,p=r?-1:1,d=e[t+f];for(f+=p,i=d&(1<<-l)-1,d>>=-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-u;else{if(i===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=u}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,p=5960464477539062e-23*(23===o),d=n?0:i-1,h=n?1:-1,y=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[r+d]=255&a,d+=h,a/=256,u-=8);e[r+d-h]|=128*y}},345:(e,t,r)=>{e.exports=r(7007).EventEmitter},414:e=>{"use strict";e.exports=Math.round},453:(e,t,r)=>{"use strict";var n,o=r(9612),i=r(9383),a=r(1237),s=r(9290),c=r(9538),u=r(8068),l=r(9675),f=r(5345),p=r(1514),d=r(8968),h=r(6188),y=r(8002),m=r(5880),g=r(414),b=r(3093),v=Function,w=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch(e){}},S=r(5795),_=r(655),E=function(){throw new l},x=S?function(){try{return E}catch(e){try{return S(arguments,"callee").get}catch(e){return E}}}():E,A=r(4039)(),T=r(3628),k=r(1064),O=r(8648),P=r(1002),B=r(76),j={},I="u">typeof Uint8Array&&T?T(Uint8Array):n,C={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":A&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":"u"<typeof Atomics?n:Atomics,"%BigInt%":"u"<typeof BigInt?n:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"u"<typeof Float16Array?n:Float16Array,"%Float32Array%":"u"<typeof Float32Array?n:Float32Array,"%Float64Array%":"u"<typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":j,"%Int8Array%":"u"<typeof Int8Array?n:Int8Array,"%Int16Array%":"u"<typeof Int16Array?n:Int16Array,"%Int32Array%":"u"<typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
2IteratorPrototype%":A&&T?T(T([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"u"<typeof Map?n:Map,"%MapIteratorPrototype%":"u">typeof Map&&A&&T?T((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?n:Promise,"%Proxy%":"u"<typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":c,"%Reflect%":"u"<typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?n:Set,"%SetIteratorPrototype%":"u">typeof Set&&A&&T?T((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&T?T(""[Symbol.iterator]()):n,"%Symbol%":A?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":x,"%TypedArray%":I,"%TypeError%":l,"%Uint8Array%":"u"<typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"u"<typeof WeakMap?n:WeakMap,"%WeakRef%":"u"<typeof WeakRef?n:WeakRef,"%WeakSet%":"u"<typeof WeakSet?n:WeakSet,"%Function.prototype.call%":B,"%Function.prototype.apply%":P,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":k,"%Math.abs%":p,"%Math.floor%":d,"%Math.max%":h,"%Math.min%":y,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":b,"%Reflect.getPrototypeOf%":O};if(T)try{null.error}catch(e){var R=T(T(e));C["%Error.prototype%"]=R}var U=function e(t){var r;if("%AsyncFunction%"===t)r=w("async function () {}");else if("%GeneratorFunction%"===t)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=w("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&T&&(r=T(o.prototype))}return C[t]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=r(6743),D=r(9957),L=M.call(B,Array.prototype.concat),F=M.call(P,Array.prototype.splice),q=M.call(B,String.prototype.replace),V=M.call(B,String.prototype.slice),$=M.call(B,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,G=function(e,t){var r,n=e;if(D(N,n)&&(n="%"+(r=N[n])[0]+"%"),D(C,n)){var o=C[n];if(o===j&&(o=U(n)),void 0===o&&!t)throw new l("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 l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===$(/^%?[^%]*%?$/,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=V(e,0,1),r=V(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 q(e,z,function(e,t,r,o){n[n.length]=r?q(o,H,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=G("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],F(r,L([0,1],c)));for(var f=1,p=!0;f<r.length;f+=1){var d=r[f],h=V(d,0,1),y=V(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===y||"'"===y||"`"===y)&&h!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(s=!0),D(C,i="%"+(n+="."+d)+"%"))a=C[i];
2else if(null!=a){if(!(d in a)){if(!t)throw new l("base intrinsic for "+e+" exists, but the property is not available.");return}if(S&&f+1>=r.length){var m=S(a,d);a=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[d]}else p=D(a,d),a=a[d];p&&!s&&(C[i]=a)}}return a}},487:(e,t,r)=>{"use strict";var n=r(6897),o=r(655),i=r(3126),a=r(2205);e.exports=function(e){var t=i(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},o?o(e.exports,"apply",{value:a}):e.exports.apply=a},507:(e,t,r)=>{"use strict";var n=r(453),o=r(6556),i=r(8859),a=r(9675),s=n("%Map%",!0),c=o("Map.prototype.get",!0),u=o("Map.prototype.set",!0),l=o("Map.prototype.has",!0),f=o("Map.prototype.delete",!0),p=o("Map.prototype.size",!0);e.exports=!!s&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a("Side channel does not contain "+i(e))},delete:function(t){if(e){var r=f(e,t);return 0===p(e)&&(e=void 0),r}return!1},get:function(t){if(e)return c(e,t)},has:function(t){return!!e&&l(e,t)},set:function(t,r){e||(e=new s),u(e,t,r)}};return t}},537:(e,t,r)=>{var o=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},i=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(e).replace(i,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])g(s)||!_(s)?a+=" "+s:a+=" "+u(s);return a},t.deprecate=function(e,r){if(void 0!==n.default&&!0===n.default.noDeprecation)return e;if(void 0===n.default)return function(){return t.deprecate(e,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(n.default.throwDeprecation)throw Error(r);n.default.traceDeprecation?console.trace(r):console.error(r),o=!0}return e.apply(this,arguments)}};var a={},s=/^$/;if(n.default.env.NODE_DEBUG){var c=n.default.env.NODE_DEBUG;s=RegExp("^"+(c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase())+"$","i")}function u(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),p(n,e,n.depth)}function l(e,t){var r=u.styles[t];return r?"\x1b["+u.colors[r][0]+"m"+e+"\x1b["+u.colors[r][1]+"m":e}function f(e,t){return e}function p(e,r,n){if(e.customInspect&&r&&A(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o,i,a=r.inspect(n,e);return v(a)||(a=p(e,a,n)),a}var s=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}(e,r);if(s)return s;var c=Object.keys(r),u=(f={},c.forEach(function(e,t){f[e]=!0}),f);if(e.showHidden&&(c=Object.getOwnPropertyNames(r)),x(r)&&(c.indexOf("message")>=0||c.indexOf("description")>=0))return d(r);if(0===c.length){if(A(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(S(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return d(r)}var f,_,T="",k=!1,O=["{","}"];return y(r)&&(k=!0,O=["[","]"]),A(r)&&(T=" [Function"+(r.name?": "+r.name:"")+"]"),S(r)&&(T=" "+RegExp.prototype.toString.call(r)),E(r)&&(T=" "+Date.prototype.toUTCString.call(r)),x(r)&&(T=" "+d(r)),0!==c.length||k&&0!=r.length?n<0?S(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),_=k?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)P(t,String(a))?i.push(h(e,t,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(h(e,t,r,n,o,!0))}),i}(e,r,n,u,c):c.map(function(t){return h(e,r,n,u,t,k)}),e.seen.pop(),o=T,i=O,_.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?i[0]+(""===o?"":o+"\n ")+" "+_.join(",\n  ")+" "+i[1]:i[0]+o+" "+_.join(", ")+" "+i[1]):O[0]+T+O[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[
2Setter]","special")),P(n,o)||(a="["+o+"]"),s||(0>e.seen.indexOf(c.value)?(s=g(r)?p(e,c.value,null):p(e,c.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")),w(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 y(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function w(e){return void 0===e}function S(e){return _(e)&&"[object RegExp]"===T(e)}function _(e){return"object"==typeof e&&null!==e}function E(e){return _(e)&&"[object Date]"===T(e)}function x(e){return _(e)&&("[object Error]"===T(e)||e instanceof Error)}function A(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!a[e=e.toUpperCase()])if(s.test(e)){var r=n.default.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){};return a[e]},t.inspect=u,u.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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(9032),t.isArray=y,t.isBoolean=m,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=S,t.types.isRegExp=S,t.isObject=_,t.isDate=E,t.types.isDate=E,t.isError=x,t.types.isNativeError=x,t.isFunction=A,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(1135);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[k((e=new Date).getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":"),[e.getDate(),O[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(6698),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var B="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function j(e,t){if(!e){var r=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 TypeError('The "original" argument must be of type Function');if(B&&e[B]){var t;if("function"!=typeof(t=e[B]))throw 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,o(e))},t.promisify.custom=B,t.callbackify=function(e){if("function"!=typeof e)throw 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 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.default.nextTick(a.bind(null,null,e))},function(e){n.default.nextTick(j.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o(e)),t}},592:(e,t,r)=>{"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},655:e=>{"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},784:(e,t,r)=>{"use strict";r.d(t,{$D:()=>p,Af:()=>c,WC:()=>u,fG:()=>f,jr:()=>d,tR:()=>l});var n=r(8950),o=r(4076);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})(e)}function a(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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
2t%2?a(Object(r),!0).forEach(function(t){!function(e,t,r){var n;(n=function(e,t){if("object"!=i(e)||!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 TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t,"string"),(t="symbol"==i(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(e){var t=e.errorResultXdr,r=e.diagnosticEventsXdr;return delete e.errorResultXdr,delete e.diagnosticEventsXdr,t?s(s(s({},e),void 0!==r&&r.length>0&&{diagnosticEvents:r.map(function(e){return n.xdr.DiagnosticEvent.fromXDR(e,"base64")})}),{},{errorResult:n.xdr.TransactionResult.fromXDR(t,"base64")}):s({},e)}function u(e){var t,r,o,i,a=n.xdr.TransactionMeta.fromXDR(e.resultMetaXdr,"base64"),s={ledger:e.ledger,createdAt:e.createdAt,applicationOrder:e.applicationOrder,feeBump:e.feeBump,envelopeXdr:n.xdr.TransactionEnvelope.fromXDR(e.envelopeXdr,"base64"),resultXdr:n.xdr.TransactionResult.fromXD
2R(e.resultXdr,"base64"),resultMetaXdr:a,events:{contractEventsXdr:(null!=(t=null==(r=e.events)?void 0:r.contractEventsXdr)?t:[]).map(function(e){return e.map(function(e){return n.xdr.ContractEvent.fromXDR(e,"base64")})}),transactionEventsXdr:(null!=(o=null==(i=e.events)?void 0:i.transactionEventsXdr)?o:[]).map(function(e){return n.xdr.TransactionEvent.fromXDR(e,"base64")})}};switch(a.switch()){case 3:case 4:var c,u,l=a.value();null!==l.sorobanMeta()&&(s.returnValue=null!=(c=null==(u=l.sorobanMeta())?void 0:u.returnValue())?c:void 0)}return e.diagnosticEventsXdr&&(s.diagnosticEventsXdr=e.diagnosticEventsXdr.map(function(e){return n.xdr.DiagnosticEvent.fromXDR(e,"base64")})),s}function l(e){return s({status:e.status,txHash:e.txHash},u(e))}function f(e){var t;return{latestLedger:e.latestLedger,oldestLedger:e.oldestLedger,latestLedgerCloseTime:e.latestLedgerCloseTime,oldestLedgerCloseTime:e.oldestLedgerCloseTime,cursor:e.cursor,events:(null!=(t=e.events)?t:[]).map(function(e){var t=s({},e);return delete t.contractId,s(s(s({},t),""!==e.contractId&&{contractId:new n.Contract(e.contractId)}),{},{topic:e.topic.map(function(e){return n.xdr.ScVal.fromXDR(e,"base64")}),value:n.xdr.ScVal.fromXDR(e.value,"base64")})})}}function p(e){var t;return{latestLedger:e.latestLedger,entries:(null!=(t=e.entries)?t:[]).map(function(e){if(!e.key||!e.xdr)throw TypeError("invalid ledger entry: ".concat(JSON.stringify(e)));return s({lastModifiedLedgerSeq:e.lastModifiedLedgerSeq,key:n.xdr.LedgerKey.fromXDR(e.key,"base64"),val:n.xdr.LedgerEntryData.fromXDR(e.xdr,"base64")},void 0!==e.liveUntilLedgerSeq&&{liveUntilLedgerSeq:e.liveUntilLedgerSeq})})}}function d(e){if(!o.j.isSimulationRaw(e))return e;var t,r,i,a,c,u,l,f,p={_parsed:!0,id:e.id,latestLedger:e.latestLedger,events:null!=(l=null==(f=e.events)?void 0:f.map(function(e){return n.xdr.DiagnosticEvent.fromXDR(e,"base64")}))?l:[]};return"string"==typeof e.error?s(s({},p),{},{error:e.error}):(u=s(s(s({},p),{},{transactionData:new n.SorobanDataBuilder(e.transactionData),minResourceFee:e.minResourceFee},null!=(t=null==(r=e.results)?void 0:r.length)&&t&&{result:e.results.map(function(e){var t;return{auth:(null!=(t=e.auth)?t:[]).map(function(e){return n.xdr.SorobanAuthorizationEntry.fromXDR(e,"base64")}),retval:e.xdr?n.xdr.ScVal.fromXDR(e.xdr,"base64"):n.xdr.ScVal.scvVoid()}})[0]}),null!=(i=null==(a=e.stateChanges)?void 0:a.length)&&i&&{stateChanges:null==(c=e.stateChanges)?void 0:c.map(function(e){return{type:e.type,key:n.xdr.LedgerKey.fromXDR(e.key,"base64"),before:e.before?n.xdr.LedgerEntry.fromXDR(e.before,"base64"):null,after:e.after?n.xdr.LedgerEntry.fromXDR(e.after,"base64"):null}})}),e.restorePreamble&&""!==e.restorePreamble.transactionData?s(s({},u),{},{restorePreamble:{minResourceFee:e.restorePreamble.minResourceFee,transactionData:new n.SorobanDataBuilder(e.restorePreamble.transactionData)}}):u)}},920:(e,t,r)=>{"use strict";var n=r(9675),o=r(8859),i=r(4803),a=r(507),s=r(2271)||a||i;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+o(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=s()),e.set(t,r)}};return t}},1002:e=>{"use strict";e.exports=Function.prototype.apply},1064:(e,t,r)=>{"use strict";e.exports=r(9612).getPrototypeOf||null},1083:(e,t,r)=>{var n=r(1568),o=r(8835),i=e.exports;for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a]);function s(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,t){return e=s(e),n.request.call(this,e,t)},i.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},1135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},1237:e=>{"use strict";e.exports=EvalError},1270:function(e,t,r){var n;e=r.nmd(e),function(){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var i,a=/^xn--/,s=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >
2= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,f=String.fromCharCode;function p(e){throw RangeError(u[e])}function d(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function h(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+d((e=e.replace(c,".")).split("."),t).join(".")}function y(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function m(e){return d(e,function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=f(e)}).join("")}function g(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function b(e,t,r){var n=0;for(e=r?l(e/700):e>>1,e+=l(e/t);e>455;n+=36)e=l(e/35);return l(n+36*e/(e+38))}function v(e){var t,r,n,o,i,a,s,c,u,f,d,h=[],y=e.length,g=0,v=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),o=0;o<n;++o)e.charCodeAt(o)>=128&&p("not-basic"),h.push(e.charCodeAt(o));for(i=n>0?n+1:0;i<y;){for(a=g,s=1,c=36;i>=y&&p("invalid-input"),((u=(t=e.charCodeAt(i++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36)>=36||u>l((0x7fffffff-g)/s))&&p("overflow"),g+=u*s,!(u<(f=c<=w?1:c>=w+26?26:c-w));c+=36)s>l(0x7fffffff/(d=36-f))&&p("overflow"),s*=d;w=b(g-a,r=h.length+1,0==a),l(g/r)>0x7fffffff-v&&p("overflow"),v+=l(g/r),g%=r,h.splice(g++,0,v)}return m(h)}function w(e){var t,r,n,o,i,a,s,c,u,d,h,m,v,w,S,_=[];for(m=(e=y(e)).length,t=128,r=0,i=72,a=0;a<m;++a)(h=e[a])<128&&_.push(f(h));for(n=o=_.length,o&&_.push("-");n<m;){for(s=0x7fffffff,a=0;a<m;++a)(h=e[a])>=t&&h<s&&(s=h);for(s-t>l((0x7fffffff-r)/(v=n+1))&&p("overflow"),r+=(s-t)*v,t=s,a=0;a<m;++a)if((h=e[a])<t&&++r>0x7fffffff&&p("overflow"),h==t){for(c=r,u=36;!(c<(d=u<=i?1:u>=i+26?26:u-i));u+=36)S=c-d,w=36-d,_.push(f(g(d+S%w,0))),c=l(S/w);_.push(f(g(c,0))),i=b(r,v,n==o),r=0,++n}++r,++t}return _.join("")}i={version:"1.4.1",ucs2:{decode:y,encode:m},decode:v,encode:w,toASCII:function(e){return h(e,function(e){return s.test(e)?"xn--"+w(e):e})},toUnicode:function(e){return h(e,function(e){return a.test(e)?v(e.slice(4).toLowerCase()):e})}},void 0===(n=(function(){return i}).call(t,r,t,e))||(e.exports=n)}()},1293:(e,t,r)=>{var n=r(5546),o=r(2708);e.exports={parse:function(e){var t=n.parse(e.toString());return o.compile(t)}}},1333: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||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},1430:function(e,t,r){var n,o;!function(i){"use strict";e.exports?e.exports=i():void 0===(o="function"==typeof(n=i)?n.call(t,r,t,e):n)||(e.exports=o)}(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,i=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(i=7),t=0;t<o&&""!==n[t];t++);if(t<i)for(n.splice(t,1,"0000");n.length<i;)n.splice(t,0,"0000");for(var a=0;a<i;a++){r=n[a].split("");for(var s=0;s<3&&"0"===r[0]&&r.length>1;s++)r.splice(0,1);n[a]=r.join("")}var c=-1,u=0,l=0,f=-1,p=!1;for(a=0;a<i;a++)p?"0"===n[a]?l+=1:(p=!1,l>u&&(c=f,u=l)):"0"===n[a]&&(p=!0,f=a,l=1);l>u&&(c=f,u=l),u>1&&n.splice(c,u,""),o=n.length;var d="";for(""===n[0]&&(d=":"),a=0;a<o&&(d+=n[a],a!==o-1);a++)d+=":";return""===n[o-1]&&(d+=":"),d},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}})},1514:e=>{"use strict";e.exports=Math.abs},1568:(e,t,r)=>{var n=r(5537),o=r(6917),i=r(7510),a=r(6866),s=r(8835);t.request=function(e,t){e="string"==typeof e?s.parse(e):i(e);var o=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||o,c=e.hostname||e.host,u=e.port,l=e.path||"/";c&&-1!==c.indexOf(":")&&(c="["+c+"]"),e.url=(c?a+"//"+c:"")+(u?":"+u:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return t&&f.on("response",t),f},t.get=function(e,r){var n=t.request(e,r);return n.end(),n},t.ClientRequest=n,t.IncomingMessage=o.IncomingMessage,t.Agent=function(){}
2,t.Agent.defaultMaxSockets=4,t.globalAgent=new t.Agent,t.STATUS_CODES=a,t.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},1731:(e,t,r)=>{var o=r(8287).Buffer,i=r(8835).parse,a=r(7007),s=r(1083),c=r(1568),u=r(537),l=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","servername","checkServerIdentity"],f=[239,187,191],p=/^(cookie|authorization)$/i;function d(e,t){var r=d.CONNECTING,a=t&&t.headers,u=!1;Object.defineProperty(this,"readyState",{get:function(){return r}}),Object.defineProperty(this,"url",{get:function(){return e}});var m,g=this;function b(t){r!==d.CLOSED&&(r=d.CONNECTING,A("error",new h("error",{message:t})),E&&(e=E,E=null,u=!1),setTimeout(function(){r!==d.CONNECTING||g.connectionInProgress||(g.connectionInProgress=!0,x())},g.reconnectInterval))}g.reconnectInterval=1e3,g.connectionInProgress=!1;var v="";a&&a["Last-Event-ID"]&&(v=a["Last-Event-ID"],delete a["Last-Event-ID"]);var w=!1,S="",_="",E=null;function x(){var T=i(e),k="https:"===T.protocol;if(T.headers={"Cache-Control":"no-cache",Accept:"text/event-stream"},v&&(T.headers["Last-Event-ID"]=v),a){var O=u?function(e){var t={};for(var r in e)p.test(r)||(t[r]=e[r]);return t}(a):a;for(var P in O){var B=O[P];B&&(T.headers[P]=B)}}if(T.rejectUnauthorized=!(t&&!t.rejectUnauthorized),t&&void 0!==t.createConnection&&(T.createConnection=t.createConnection),t&&t.proxy){var j=i(t.proxy);T.protocol=(k="https:"===j.protocol)?"https:":"http:",T.path=e,T.headers.Host=T.host,T.hostname=j.hostname,T.host=j.host,T.port=j.port}if(t&&t.https){for(var I in t.https)if(-1!==l.indexOf(I)){var C=t.https[I];void 0!==C&&(T[I]=C)}}t&&void 0!==t.withCredentials&&(T.withCredentials=t.withCredentials),(m=(k?s:c).request(T,function(t){if(g.connectionInProgress=!1,500===t.statusCode||502===t.statusCode||503===t.statusCode||504===t.statusCode)return A("error",new h("error",{status:t.statusCode,message:t.statusMessage})),void b();if(301===t.statusCode||302===t.statusCode||307===t.statusCode){var i,a,s=t.headers.location;return s?(u=new URL(e).origin!==new URL(s).origin,307===t.statusCode&&(E=e),e=s,void n.default.nextTick(x)):void A("error",new h("error",{status:t.statusCode,message:t.statusMessage}))}if(200!==t.statusCode)return A("error",new h("error",{status:t.statusCode,message:t.statusMessage})),g.close();r=d.OPEN,t.on("close",function(){t.removeAllListeners("close"),t.removeAllListeners("end"),b()}),t.on("end",function(){t.removeAllListeners("close"),t.removeAllListeners("end"),b()}),A("open",new h("open"));var c=0,l=-1,p=0,m=0;t.on("data",function(t){var r;i?(t.length>i.length-m&&((p=2*i.length+t.length)>262144&&(p=i.length+t.length+262144),a=o.alloc(p),i.copy(a,0,0,m),i=a),t.copy(i,m),m+=t.length):(r=i=t,f.every(function(e,t){return r[t]===e})&&(i=i.slice(f.length)),m=i.length);for(var n=0,s=m;n<s;){w&&(10===i[n]&&++n,w=!1);for(var u,d=-1,h=l,b=c;d<0&&b<s;++b)58===(u=i[b])?h<0&&(h=b-n):13===u?(w=!0,d=b-n):10===u&&(d=b-n);if(d<0){c=s-n,l=h;break}c=0,l=-1,function(t,r,n,o){if(0===o){if(S.length>0){var i=_||"message";A(i,new y(i,{data:S.slice(0,-1),lastEventId:v,origin:new URL(e).origin})),S=""}_=void 0}else if(n>0){var a=n<0,s=0,c=t.slice(r,r+(a?o:n)).toString();r+=s=a?o:32!==t[r+n+1]?n+1:n+2;var u=o-s,l=t.slice(r,r+u).toString();if("data"===c)S+=l+"\n";else if("event"===c)_=l;else if("id"===c)v=l;else if("retry"===c){var f=parseInt(l,10);Number.isNaN(f)||(g.reconnectInterval=f)}}}(i,n,h,d),n+=d+1}n===s?(i=void 0,m=0):n>0&&(m=(i=i.slice(n,m)).length)})})).on("error",function(e){g.connectionInProgress=!1,b(e.message)}),m.setNoDelay&&m.setNoDelay(!0),m.end()}function A(){g.listeners(arguments[0]).length>0&&g.emit.apply(g,arguments)}x(),this._close=function(){r!==d.CLOSED&&(r=d.CLOSED,m.abort&&m.abort(),m.xhr&&m.xhr.abort&&m.xhr.abort())}}function h(e,t){if(Object.defineProperty(this,"type",{writable:!1,value:e,enumerable:!0}),t)for(var r in t)t.hasOwnProperty(r)&&Object.defineProperty(this,r,{writable:!1,value:t[r],enumerable:!0})}function y(e,t){for(var r in Object.defineProperty(this,"type",{writable:!1,value:e,enumerable:!0}),t)t.hasOwnProperty(r)&&Object.defineProperty(this,r,{writable:!1,value:t[r],enumerable:!0})}
2e.exports=d,u.inherits(d,a.EventEmitter),d.prototype.constructor=d,["open","error","message"].forEach(function(e){Object.defineProperty(d.prototype,"on"+e,{get:function(){var t=this.listeners(e)[0];return t?t._listener?t._listener:t:void 0},set:function(t){this.removeAllListeners(e),this.addEventListener(e,t)}})}),Object.defineProperty(d,"CONNECTING",{enumerable:!0,value:0}),Object.defineProperty(d,"OPEN",{enumerable:!0,value:1}),Object.defineProperty(d,"CLOSED",{enumerable:!0,value:2}),d.prototype.CONNECTING=0,d.prototype.OPEN=1,d.prototype.CLOSED=2,d.prototype.close=function(){this._close()},d.prototype.addEventListener=function(e,t){"function"==typeof t&&(t._listener=t,this.on(e,t))},d.prototype.dispatchEvent=function(e){if(!e.type)throw Error("UNSPECIFIED_EVENT_TYPE_ERR");this.emit(e.type,e.detail)},d.prototype.removeEventListener=function(e,t){"function"==typeof t&&(t._listener=void 0,this.removeListener(e,t))}},1924:(e,t,r)=>{"use strict";r.r(t),r.d(t,{StellarBase:()=>a,default:()=>s,httpClient:()=>n.ok});var n=r(9983),o=r(4356),i={};for(let e in o)0>["default","StellarBase","httpClient"].indexOf(e)&&(i[e]=()=>o[e]);r.d(t,i);var a=r(8950);let s=(e=r.hmd(e)).exports},2205:(e,t,r)=>{"use strict";
vendor: 2,893 bytes, line 2
2var n=r(6743),o=r(1002),i=r(3144);e.exports=function(){return i(n,o,arguments)}},2271:(e,t,r)=>{"use strict";var n=r(453),o=r(6556),i=r(8859),a=r(507),s=r(9675),c=n("%WeakMap%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("WeakMap.prototype.delete",!0);e.exports=c?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new s("Side channel does not contain "+i(e))},delete:function(r){if(c&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(a&&t)return t.delete(r);return!1},get:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?u(e,r):t&&t.get(r)},has:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&e?f(e,r):!!t&&t.has(r)},set:function(r,n){c&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new c),l(e,r,n)):a&&(t||(t=a()),t.set(r,n))}};return r}:a},2634:()=>{},2642:(e,t,r)=>{"use strict";var n=r(7720),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},c=function(e,t,r,i){if(e){var a=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,c=/(\[[^[\]]*])/g,u=r.depth>0&&/(\[[^[\]]*])/.exec(a),l=u?a.slice(0,u.index):a,f=[];if(l){if(!r.plainObjects&&o.call(Object.prototype,l)&&!r.allowPrototypes)return;f.push(l)}for(var p=0;r.depth>0&&null!==(u=c.exec(a))&&p<r.depth;){if(p+=1,!r.plainObjects&&o.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;f.push(u[1])}if(u){if(!0===r.strictDepth)throw RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");f.push("["+a.slice(u.index)+"]")}return function(e,t,r,o){var i=0;if(e.length>0&&"[]"===e[e.length-1]){var a=e.slice(0,-1).join("");i=Array.isArray(t)&&t[a]?t[a].length:0}for(var c=o?t:s(t,r,i),u=e.length-1;u>=0;--u){var l,f=e[u];if("[]"===f&&r.parseArrays)l=r.allowEmptyArrays&&(""===c||r.strictNullHandling&&null===c)?[]:n.combine([],c);else{l=r.plainObjects?{__proto__:null}:{};var p="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,d=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,h=parseInt(d,10);r.parseArrays||""!==d?!isNaN(h)&&f!==d&&String(h)===d&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(l=[])[h]=c:"__proto__"!==d&&(l[d]=c):l={0:c}}c=l}return c}(f,t,r,i)}};e.exports=function(e,t){var r=function(e){if(!e)return a;
2if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?a.charset:e.charset,r=void 0===e.duplicates?a.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||a.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:a.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var u="string"==typeof e?function(e,t){var r={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u=t.parameterLimit===1/0?void 0:t.parameterLimit,l=c.split(t.delimiter,t.throwOnLimitExceeded?u+1:u);if(t.throwOnLimitExceeded&&l.length>u)throw RangeError("Parameter limit exceeded. Only "+u+" parameter"+(1===u?"":"s")+" allowed.");var f,p=-1,d=t.charset;if(t.charsetSentinel)for(f=0;f<l.length;++f)0===l[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[f]?d="utf-8":"utf8=%26%2310003%3B"===l[f]&&(d="iso-8859-1"),p=f,f=l.length);for(f=0;f<l.length;++f)if(f!==p){var h,y,m=l[f],g=m.indexOf("]="),b=-1===g?m.indexOf("="):g+1;-1===b?(h=t.decoder(m,a.decoder,d,"key"),y=t.strictNullHandling?null:""):(h=t.decoder(m.slice(0,b),a.decoder,d,"key"),y=n.maybeMap(s(m.slice(b+1),t,i(r[h])?r[h].length:0),function(e){return t.decoder(e,a.decoder,d,"value")})),y&&t.interpretNumericEntities&&"iso-8859-1"===d&&(y=String(y).replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),m.indexOf("[]=")>-1&&(y=i(y)?[y]:y);var v=o.call(r,h);v&&"combine"===t.duplicates?r[h]=n.combine(r[h],y):v&&"last"!==t.duplicates||(r[h]=y)}return r}(e,r):e,l=r.plainObjects?{__proto__:null}:{},f=Object.keys(u),p=0;p<f.length;++p){var d=f[p],h=c(d,u[d],r,"string"==typeof e);l=n.merge(l,h,r)}return!0===r.allowSparse?l:n.compact(l)}},2682:(e,t,r)=>{"use strict";var n=r(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a;if(!n(t))throw TypeError("iterator must be a function");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)}}
2,2708:e=>{"use strict";e.exports={compile:function(e){for(var t,r=[],n=[],o="",i=Object.create(null),a=i,s=0;s<e.length;s++)switch((t=e[s]).type){case"Assign":!function(e){var t,i=e.key,s=e.value,l=e.line,f=e.column;t=o?o+"."+i:i,void 0!==a[i]&&c("Cannot redefine existing key '"+t+"'.",l,f),a[i]=function e(t){return"Array"===t.type?function(t){for(var r=null,n=0;n<t.length;n++){var o=t[n];null===r?r=o.type:o.type!==r&&c("Cannot add value of type "+o.type+" to array of type "+r+".",o.line,o.column)}return t.map(e)}(t.value):"InlineTable"===t.type?function t(r){for(var n=Object.create(null),o=0;o<r.length;o++){var i=r[o];"InlineTable"===i.value.type?n[i.key]=t(i.value.value):"InlineTableValue"===i.type&&(n[i.key]=e(i.value))}return n}(t.value):t.value}(s),u(t)||(r.push(t),n.push(t))}(t);break;case"ObjectPath":!function(e){var t=e.value,n=t.map(f).join("."),s=e.line,p=e.column;u(n)&&c("Cannot redefine existing key '"+t+"'.",s,p),r.push(n),a=l(i,t,Object.create(null),s,p),o=t}(t);break;case"ArrayPath":!function(e){var t=e.value,n=t.map(f).join("."),s=e.line,p=e.column;if(u(n)||r.push(n),(r=r.filter(function(e){return 0!==e.indexOf(n)})).push(n),a=l(i,t,[],s,p),o=n,a instanceof Array){var d=Object.create(null);a.push(d),a=d}else c("Cannot redefine existing key '"+t+"'.",s,p)}(t)}return i;function c(e,t,r){var n=Error(e);throw n.line=t,n.column=r,n}function u(e){return -1!==r.indexOf(e)}function l(e,t,r,o,i){for(var a=[],s="",u=(t.join("."),e),l=0;l<t.length;l++){var f=t[l];a.push(f),s=a.join("."),void 0===u[f]?l===t.length-1?u[f]=r:u[f]=Object.create(null):l!==t.length-1&&n.indexOf(s)>-1&&c("Cannot redefine existing key '"+s+"'.",o,i),(u=u[f])instanceof Array&&u.length&&l<t.length-1&&(u=u[u.length-1])}return u}function f(e){return e.indexOf(".")>-1?'"'+e+'"':e}}}},2726:(e,t,r)=>{"use strict";function n(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 o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=a(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(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,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var s=r(8287).Buffer,c=r(5340).inspect,u=c&&c.custom||"inspect";e.exports=function(){var e,t;function r(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n=s.allocUnsafe(e>>>0),o=this.head,i=0;o;)t=o.data,r=i,s.prototype.copy.call(t,n,r),i+=o.data.length,o=o.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),0==(e-=i)){i===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0==(e-=i)){i===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(i));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return c(this,o(o({},t),{},{depth:0,customInspect:!1}))}}],i(r.prototype,e),t&&i(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}()},2861:(e,t,r)=>{var n=r(8287),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 TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw 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 TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},2955:(e,t,r)=>{"use strict";function o(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i,a=r(6238),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),p=Symbol("handlePromise"),d=Symbol("stream");function h(e,t){return{value:e,done:t}}function y(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[f]=null,e[s]=null,e[c]=null,t(h(r,!1)))}}function m(e){n.default.nextTick(y,e)}var g=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((o(i={get stream(){return this[d]},next:function(){var e,t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[l])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise(function(e,r){n.default.nextTick(function(){t[u]?r(t[u]):e(h(void 0,!0))})});var o,i=this[f];if(i)o=new Promise((e=this,function(t,r){i.then(function(){e[l]?t(h(void 0,!0)):e[p](t,r)},r)}));else{var a=this[d].read();if(null!==a)return Promise.resolve(h(a,!1));o=new Promise(this[p])}return this[f]=o,o}},Symbol.asyncIterator,function(){return this}),o(i,"return",function(){var e=this;return new Promise(function(t,r){e[d].destroy(null,function(e){e?r(e):t(h(void 0,!0))})})}),i),g);e.exports=function(e){var t,r=Object.create(b,(o(t={},d,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,l,{value:e._readableState.endEmitted,writable:!0}),o(t,p,{value:function(e,t){var n=r[d].read();n?(r[f]=null,r[s]=null,r[c]=null,e(h(n,!1))):(r[s]=e,r[c]=t)},writable:!0}),t));return r[f]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];return null!==t&&(r[f]=null,r[s]=null,r[c]=null,t(e)),void(r[u]=e)}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[c]=null,n(h(void 0,!0))),r[l]=!0}),e.on("readable",m.bind(null,r)),r}},3093:(e,t,r)=>{"use strict";var n=r(4459);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},3121:(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})(e)}r.d(t,{A:()=>i});var o,i=(function(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,function(e){var t=function(e,t){if("object"!=n(e)||!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 TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==n(t)?t:t+""}(o.key),o)}}(o=function e(){if(!(this instanceof e))throw TypeError("Cannot call a class as a function")},[{key:"validateTimebounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e.timeBounds)return!1;var r=Math.floor(Date.now()/1e3),n=e.timeBounds,o=n.minTime,i=n.maxTime;return r>=Number.parseInt(o,10)-t&&r<=Number.parseInt(i,10)+t}},{key:"sleep",value:function(e){return new Promise(function(t){return setTimeout(t,e)})}}]),Object.defineProperty(o,"prototype",{writable:!1}),o)},3126:(e,t,r)=>{"use strict";
vendor: 3,729 bytes, line 2
2var n=r(6743),o=r(9675),i=r(76),a=r(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(n,i,e)}},3141:(e,t,r)=>{"use strict";var n=r(2861).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=i,i.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=a(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||-2===o?0:(o=a(t[n]))>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||-2===o?0:(o=a(t[n]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},3144:(e,t,r)=>{"use strict";
2var n=r(6743),o=r(1002),i=r(76);e.exports=r(7119)||n.call(i,o)},3209:(e,t,r)=>{"use strict";var o=r(2861).Buffer,i=r.g.crypto||r.g.msCrypto;i&&i.getRandomValues?e.exports=function(e,t){if(e>0xffffffff)throw RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a<e;a+=65536)i.getRandomValues(r.slice(a,a+65536));else i.getRandomValues(r);return"function"==typeof t?n.default.nextTick(function(){t(null,r)}):r}:e.exports=function(){throw Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},3496:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Api:()=>n.j,AxiosClient:()=>s,BasicSleepStrategy:()=>er,Durability:()=>et,LinearSleepStrategy:()=>en,Server:()=>eo,assembleTransaction:()=>d.X,default:()=>ei,parseRawEvents:()=>h.fG,parseRawSimulation:()=>h.jr});var n=r(4076),o=r(4193),i=r.n(o),a=r(8950);let s=(0,r(9983).vt)({headers:{"X-Client-Name":"js-soroban-client","X-Client-Version":"14.1.1"}});function c(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return u(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function f(){}t=Object.getPrototypeOf;var p=f.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(u(t={},n,function(){return this}),t));function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,u(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return l.prototype=f,u(p,"constructor",f),u(f,"constructor",l),l.displayName="GeneratorFunction",u(f,o,"GeneratorFunction"),u(p),u(p,o,"Generator"),u(p,n,function(){return this}),u(p,"toString",function(){return"[object Generator]"}),(c=function(){return{w:i,m:d}})()}function u(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(u=function(e,t,r,n){function i(t,r){u(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function l(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function f(e,t){return p.apply(this,arguments)}function p(){var e;return e=c().m(function e(t,r){var n,o,i,a=arguments;return c().w(function(e){for(;;)switch(e.n){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:null,e.n=1,s.post(t,{jsonrpc:"2.0",id:1,method:r,params:n});case 1:var c;if(c=(o=e.v).data,!c.hasOwnProperty("error")){e.n=2;break}throw o.data.error;case 2:return e.a(2,null==(i=o.data)?void 0:i.result);case 3:return e.a(2)}},e)}),(p=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){l(i,n,o,a,s,"next",e)}function s(e){l(i,n,o,a,s,"throw",e)}a(void 0)})}).apply(this,arguments)}var d=r(8680),h=r(784),y=r(3121),m=r(8287).Buffer;function g(e){return(g="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){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 v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
2t%2?b(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=A(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function w(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return S(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(S(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,S(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,S(l,"constructor",u),S(u,"constructor",c),c.displayName="GeneratorFunction",S(u,o,"GeneratorFunction"),S(l),S(l,o,"Generator"),S(l,n,function(){return this}),S(l,"toString",function(){return"[object Generator]"}),(w=function(){return{w:i,m:f}})()}function S(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(S=function(e,t,r,n){function i(t,r){S(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function _(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function E(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){_(i,n,o,a,s,"next",e)}function s(e){_(i,n,o,a,s,"throw",e)}a(void 0)})}}function x(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,A(n.key),n)}}function A(e){var t=function(e,t){if("object"!=g(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=g(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==g(t)?t:t+""}var T,k,O,P,B,j,I,C,R,U,N,M,D,L,F,q,V,$,z,H,G,K,W,X,Q,J,Y,Z,ee,et=((T={}).Temporary="temporary",T.Persistent="persistent",T),er=function(e){return 1e3},en=function(e){return 1e3*e},eo=(k=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this.serverURL=i()(t),r.headers&&0!==Object.keys(r.headers).length&&s.interceptors.request.use(function(e){return e.headers=Object.assign(e.headers,r.headers),e}),"https"!==this.serverURL.protocol()&&!r.allowHttp)throw Error("Cannot connect to insecure Soroban RPC server if `allowHttp` isn't set")},O=[{key:"getAccount",value:(ee=E(w().m(function e(t){var r,n,o;return w().w(function(e){for(;;)switch(e.n){case 0:return r=a.xdr.LedgerKey.account(new a.xdr.LedgerKeyAccount({accountId:a.Keypair.fromPublicKey(t).xdrPublicKey()})),e.n=1,this.getLedgerEntries(r);case 1:if(0!==(n=e.v).entries.length){e.n=2;break}return e.a(2,Promise.reject({code:404,message:"Account not found: ".concat(t)}));case 2:return o=n.entries[0].val.account(),e.a(2,new a.Account(t,o.seqNum().toString()))}},e,this)})),function(e){return ee.apply(this,arguments)})},{key:"getHealth",value:(Z=E(w().m(function e(){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,f(this.serverURL.toString(),"getHealth"))},e,this)})),function(){return Z.apply(this,arguments)})},{key:"getContractData",value:(Y=E(w().m(function e(t,r){var n,o,i,s,c,u=arguments;return w().w(function(e){for(;;)switch(e.n){case 0:if(n=u.length>2&&void 0!==u[2]?u[2]:et.Persistent,"string"!=typeof t){e.n=1;break}o=new a.Contract(t).address().toScAddress(),e.n=4;break;case 1:if(!(t instanceof a.Address)){e.n=2;break}o=t.toScAddress(),e.n=4;break;case 2:if(!(t instanceof a.Contract)){e.n=3;break}o=t.address().toScAddress(),e.n=4;break;case 3:throw TypeError("unknown contract type: ".concat(t));case 4:e.n=(c=n)===et.Temporary?5:c===et.Persistent?6:7;break;case 5:return i=a.xdr.ContractDataDurability.temporary(),e.a(3,8);
2case 6:return i=a.xdr.ContractDataDurability.persistent(),e.a(3,8);case 7:throw TypeError("invalid durability: ".concat(n));case 8:return s=a.xdr.LedgerKey.contractData(new a.xdr.LedgerKeyContractData({key:r,contract:o,durability:i})),e.a(2,this.getLedgerEntries(s).then(function(e){return 0===e.entries.length?Promise.reject({code:404,message:"Contract data not found. Contract: ".concat(a.Address.fromScAddress(o).toString(),", Key: ").concat(r.toXDR("base64"),", Durability: ").concat(n)}):e.entries[0]}))}},e,this)})),function(e,t){return Y.apply(this,arguments)})},{key:"getContractWasmByContractId",value:(J=E(w().m(function e(t){var r,n,o,i;return w().w(function(e){for(;;)switch(e.n){case 0:return n=new a.Contract(t).getFootprint(),e.n=1,this.getLedgerEntries(n);case 1:if((o=e.v).entries.length&&null!=(r=o.entries[0])&&r.val){e.n=2;break}return e.a(2,Promise.reject({code:404,message:"Could not obtain contract hash from server"}));case 2:return i=o.entries[0].val.contractData().val().instance().executable().wasmHash(),e.a(2,this.getContractWasmByHash(i))}},e,this)})),function(e){return J.apply(this,arguments)})},{key:"getContractWasmByHash",value:(Q=E(w().m(function e(t){var r,n,o,i,s,c,u=arguments;return w().w(function(e){for(;;)switch(e.n){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:void 0,o="string"==typeof t?m.from(t,n):t,i=a.xdr.LedgerKey.contractCode(new a.xdr.LedgerKeyContractCode({hash:o})),e.n=1,this.getLedgerEntries(i);case 1:if((s=e.v).entries.length&&null!=(r=s.entries[0])&&r.val){e.n=2;break}return e.a(2,Promise.reject({code:404,message:"Could not obtain contract wasm from server"}));case 2:return c=s.entries[0].val.contractCode().code(),e.a(2,c)}},e,this)})),function(e){return Q.apply(this,arguments)})},{key:"getLedgerEntries",value:(X=E(w().m(function e(){var t=arguments;return w().w(function(e){for(;;)if(0===e.n)return e.a(2,this._getLedgerEntries.apply(this,t).then(h.$D))},e,this)})),function(){return X.apply(this,arguments)})},{key:"_getLedgerEntries",value:(W=E(w().m(function e(){var t,r,n,o=arguments;return w().w(function(e){for(;;)if(0===e.n){for(r=Array(t=o.length),n=0;n<t;n++)r[n]=o[n];return e.a(2,f(this.serverURL.toString(),"getLedgerEntries",{keys:r.map(function(e){return e.toXDR("base64")})}))}},e,this)})),function(){return W.apply(this,arguments)})},{key:"pollTransaction",value:(K=E(w().m(function e(t,r){var o,i,a,s,c,u;return w().w(function(e){for(;;)switch(e.n){case 0:a=(null!=(o=null==r?void 0:r.attempts)?o:0)<1?30:null!=(i=null==r?void 0:r.attempts)?i:30,c=1;case 1:if(!(c<a)){e.n=5;break}return e.n=2,this.getTransaction(t);case 2:if((s=e.v).status===n.j.GetTransactionStatus.NOT_FOUND){e.n=3;break}return e.a(2,s);case 3:return e.n=4,y.A.sleep((null!=(u=null==r?void 0:r.sleepStrategy)?u:er)(c));case 4:c++,e.n=1;break;case 5:return e.a(2,s)}},e,this)})),function(e,t){return K.apply(this,arguments)})},{key:"getTransaction",value:(G=E(w().m(function e(t){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,this._getTransaction(t).then(function(e){var r={};return e.status!==n.j.GetTransactionStatus.NOT_FOUND&&Object.assign(r,(0,h.WC)(e)),v({status:e.status,txHash:t,latestLedger:e.latestLedger,latestLedgerCloseTime:e.latestLedgerCloseTime,oldestLedger:e.oldestLedger,oldestLedgerCloseTime:e.oldestLedgerCloseTime},r)}))},e,this)})),function(e){return G.apply(this,arguments)})},{key:"_getTransaction",value:(H=E(w().m(function e(t){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,f(this.serverURL.toString(),"getTransaction",{hash:t}))},e,this)})),function(e){return H.apply(this,arguments)})},{key:"getTransactions",value:(z=E(w().m(function e(t){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,this._getTransactions(t).then(function(e){return{transactions:(e.transactions||[]).map(h.tR),latestLedger:e.latestLedger,latestLedgerCloseTimestamp:e.latestLedgerCloseTimestamp,oldestLedger:e.oldestLedger,oldestLedgerCloseTimestamp:e.oldestLedgerCloseTimestamp,cursor:e.cursor}}))},e,this)})),function(e){return z.apply(this,arguments)})},{key:"_getTransactions",value:($=E(w().m(function e(t){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,f(this.serverURL.toString(),"getTransactions",t))},e,this)})),function(e){return $.apply(this,arguments)})},{key:"getEvents",value:(V=E(w().m(function e(t){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,this._getEvents(t).then(h.fG))},e,this)})),function(e){return V.apply(this,arguments)})},{key:"_getEvents",value:(q=E(w().m(function e(t){var r;return w().w(function(e){for(;;)if(0===e.n)return e.a(2,f(this.serverURL.toString(),"getEvents",v(v({filters:null!=(r=t.filters)?r:[],pagination:v(v({},t.cursor&&{cursor:t.cursor}),t.limit&&{limit:t.limit})},t.startLedger&&{startLedger:t.startLedger}),t.endLedger&&{endLedger:t.endLedger})))},e,this)})),function(e){return q.apply(this,arguments)})},{key:"getNetwork",value:(F=E(w().m(function e(){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,f(this.serverURL.toString(),"getNetwork"))},e,this)})),function(){return F.apply(this,arguments)})},{key:"getLatestLedger",value:(L=E(w().m(function e(){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,f(this.serverURL.toString(),"getLatestLedger"))},e,this)})),function(){return L.apply(this,arguments)})},{key:"simulateTransaction",value:(D=E(w().m(function e(t,r,n){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,this._simulateTransaction(t,r,n).then(h.jr))},e,this)})),function(e,t,r){return D.apply(this,arguments)})},{key:"_simulateTransaction",value:(M=E(w().m(function e(t,r,n){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,f(this.serverURL.toString(),"simulateTransaction",v({transaction:t.toXDR(),authMode:n},void 0!==r&&{resourceConfig:{instructionLeeway:r.cpuInstructions}})))},e,this)})),function(e,t,r){return M.apply(this,arguments)})},{key:"prepareTransaction",value:(N=E(w().m(function e(t){var r;return w().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.simulateTransaction(t);case 1:if(r=e.v,!n.j.isSimulationError(r)){e.n=2;break}throw Error(r.error);case 2:return e.a(2,(0,d.X)(t,r).build())}},e,this)})),function(e){return N.apply(this,arguments)})},{key:"sendTransaction",value:(U=E(w().m(function e(t){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,this._sendTransaction(t).then(h.Af))},e,this)})),function(e){return U.apply(this,arguments)})},{key:"_sendTransaction",value:(R=E(w().m(function e(t){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,f(this.serverURL.toString(),"sendTransaction",{transaction:t.toXDR()}))},e,this)})),function(e){return R.apply(this,arguments)})},{key:"requestAirdrop",value:(C=E(w().m(function e(t,r){var o,i,c,u,l,f,p,d,h;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:if(o="string"==typeof t?t:t.accountId(),d=r){e.n=2;break}return e.n=1,this.getNetwork();case 1:d=e.v.friendbotUrl;case 2:if(r=d){e.n=3;break}throw Error("No friendbot URL configured for current network");case 3:return e.p=3,e.n=4,s.post("".concat(r,"?addr=").concat(encodeURIComponent(o)));case 4:if((i=e.v).data.result_meta_xdr){e.n=7;break}return e.n=5,this.getTransaction(i.data.hash);case 5:if((u=e.v).status===n.j.GetTransactionStatus.SUCCESS){e.n=6;break}throw Error("Funding account ".concat(t," failed"));case 6:c=u.resultMetaXdr,e.n=8;break;case 7:c=a.xdr.TransactionMeta.fromXDR(i.data.result_meta_xdr,"base64");case 8:return l=function(e){var t,r=[];switch(e.switch()){case 0:r=e.operations();break;case 1:case 2:case 3:case 4:r=e.value().operations();break;default:throw Error("Unexpected transaction meta switch value")}var n=null==(t=r.flatMap(function(e){return e.changes()}).find(function(e){return e.switch()===a.xdr.LedgerEntryChangeType.ledgerEntryCreated()&&e.created().data().switch()===a.xdr.LedgerEntryType.account()}
2))||null==(t=t.created())||null==(t=t.data())||null==(t=t.account())||null==(t=t.seqNum())?void 0:t.toString();if(n)return n;throw Error("No account created in transaction")}(c),e.a(2,new a.Account(o,l));case 9:if(e.p=9,400!==(null==(f=(h=e.v).response)?void 0:f.status)||null==(p=h.response.detail)||!p.includes("createAccountAlreadyExist")){e.n=10;break}return e.a(2,this.getAccount(o));case 10:throw h;case 11:return e.a(2)}},e,this,[[3,9]])})),function(e,t){return C.apply(this,arguments)})},{key:"getFeeStats",value:(I=E(w().m(function e(){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,f(this.serverURL.toString(),"getFeeStats"))},e,this)})),function(){return I.apply(this,arguments)})},{key:"getVersionInfo",value:(j=E(w().m(function e(){return w().w(function(e){for(;;)if(0===e.n)return e.a(2,f(this.serverURL.toString(),"getVersionInfo"))},e,this)})),function(){return j.apply(this,arguments)})},{key:"getSACBalance",value:(B=E(w().m(function e(t,r,n){var o,i,s,c,u,l,f,p,d,h,y;return w().w(function(e){for(;;)switch(e.n){case 0:if(a.StrKey.isValidContract(t)){e.n=1;break}throw TypeError("expected contract ID, got ".concat(t));case 1:if(null==n){e.n=2;break}y=n,e.n=4;break;case 2:return e.n=3,this.getNetwork().then(function(e){return e.passphrase});case 3:y=e.v;case 4:return o=y,i=r.contractId(o),s=(0,a.nativeToScVal)(["Balance",t],{type:["symbol","address"]}),c=a.xdr.LedgerKey.contractData(new a.xdr.LedgerKeyContractData({contract:new a.Address(i).toScAddress(),durability:a.xdr.ContractDataDurability.persistent(),key:s})),e.n=5,this.getLedgerEntries(c);case 5:if(0!==(u=e.v).entries.length){e.n=6;break}return e.a(2,{latestLedger:u.latestLedger});case 6:if(f=(l=u.entries[0]).lastModifiedLedgerSeq,p=l.liveUntilLedgerSeq,(d=l.val).switch().value===a.xdr.LedgerEntryType.contractData().value){e.n=7;break}return e.a(2,{latestLedger:u.latestLedger});case 7:return h=(0,a.scValToNative)(d.contractData().val()),e.a(2,{latestLedger:u.latestLedger,balanceEntry:{liveUntilLedgerSeq:p,lastModifiedLedgerSeq:f,amount:h.amount.toString(),authorized:h.authorized,clawback:h.clawback}})}},e,this)})),function(e,t,r){return B.apply(this,arguments)})}],x(k.prototype,O),P&&x(k,P),Object.defineProperty(k,"prototype",{writable:!1}),k);let ei=(e=r.hmd(e)).exports},3600:(e,t,r)=>{"use strict";e.exports=o;var n=r(4610);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}r(6698)(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},3628:(e,t,r)=>{"use strict";var n=r(8648),o=r(1064),i=r(7176);e.exports=n?function(e){return n(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},3898:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Api:()=>{},Resolver:()=>g,STELLAR_TOML_MAX_SIZE:()=>y});var n=r(1293),o=r.n(n),i=r(9983),a=r(8732);function s(e){return(s="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 c(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return u(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function l(){}function f(){}t=Object.getPrototypeOf;
2var p=f.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(u(t={},n,function(){return this}),t));function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,u(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return l.prototype=f,u(p,"constructor",f),u(f,"constructor",l),l.displayName="GeneratorFunction",u(f,o,"GeneratorFunction"),u(p),u(p,o,"Generator"),u(p,n,function(){return this}),u(p,"toString",function(){return"[object Generator]"}),(c=function(){return{w:i,m:d}})()}function u(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(u=function(e,t,r,n){function i(t,r){u(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function l(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}var f,p,d,h,y=102400,m=i.ok.CancelToken,g=(f=function e(){if(!(this instanceof e))throw TypeError("Cannot call a class as a function")},p=[{key:"resolve",value:(d=c().m(function e(t){var r,n,s,u,l,f=arguments;return c().w(function(e){for(;;)if(0===e.n)return s=void 0===(n=f.length>1&&void 0!==f[1]?f[1]:{}).allowHttp?a.T.isAllowHttp():n.allowHttp,u=void 0===n.timeout?a.T.getTimeout():n.timeout,l=s?"http":"https",e.a(2,i.ok.get("".concat(l,"://").concat(t,"/.well-known/stellar.toml"),{maxRedirects:null!=(r=n.allowedRedirects)?r:0,maxContentLength:y,cancelToken:u?new m(function(e){return setTimeout(function(){return e("timeout of ".concat(u,"ms exceeded"))},u)}):void 0,timeout:u}).then(function(e){try{var t=o().parse(e.data);return Promise.resolve(t)}catch(e){return Promise.reject(Error("stellar.toml is invalid - Parsing error on line ".concat(e.line,", column ").concat(e.column,": ").concat(e.message)))}}).catch(function(e){throw e.message.match(/^maxContentLength size/)?Error("stellar.toml file exceeds allowed size of ".concat(y)):e}))},e)}),h=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=d.apply(e,t);function i(e){l(o,r,n,i,a,"next",e)}function a(e){l(o,r,n,i,a,"throw",e)}i(void 0)})},function(e){return h.apply(this,arguments)})}],function(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,function(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==s(t)?t:t+""}(n.key),n)}}(f,p),Object.defineProperty(f,"prototype",{writable:!1}),f)},4035:(e,t,r)=>{"use strict";var n,o=r(6556),i=r(9092)(),a=r(9957),s=r(5795);if(i){var c=o("RegExp.prototype.exec"),u={},l=function(){throw u},f={toString:l,valueOf:l};"symbol"==typeof Symbol.toPrimitive&&(f[Symbol.toPrimitive]=l),n=function(e){if(!e||"object"!=typeof e)return!1;var t=s(e,"lastIndex");if(!(t&&a(t,"value")))return!1;try{c(e,f)}catch(e){return e===u}}}else{var p=o("Object.prototype.toString");n=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===p(e)}}e.exports=n},4039:(e,t,r)=>{"use strict";var n="u">typeof Symbol&&Symbol,o=r(1333);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},4076:(e,t,r)=>{"use strict";var n;r.d(t,{j:()=>n}),function(e){var t;function r(e){return"transactionData"in e}(t={}).SUCCESS="SUCCESS",t.NOT_FOUND="NOT_FOUND",t.FAILED="FAILED",e.GetTransactionStatus=t,e.isSimulationError=function(e){return"error"in e},e.isSimulationSuccess=r,e.isSimulationRestore=function(e){return r(e)&&"restorePreamble"in e&&!!e.restorePreamble.transactionData},e.isSimulationRaw=function(e){return!e._parsed}}(n||(n={}))},4193:function(e,t,r){var n,o,i;!function(a){"use strict";e.exports?e.exports=a(r(9340),r(1430),r(4704)):(o=[r(9340),r(1430),r(4704)],void 0===(i="function"==typeof(n=a)?n.apply(t,o):n)||(e.exports=i))}(function(e,t,r,n){"use strict";var o=n&&n.URI;function i(e,t){var r=arguments.length>=1;if(!(this instanceof i))return r?arguments.length>=2?new i(e,t):new i(e):new i;if(void 0===e){if(r)throw TypeError("undefined is not a valid argument for URI");e="u">typeof location?location.href+"":""}if(null===e&&r)throw TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}i.version="1.19.11";var a=i.prototype,s=Object.prototype.hasOwnProperty;function c(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===u(e)}function f(e,t){var r,n,o={};if("RegExp"===u(t))o=null;else if(l(t))for(r=0,n=t.length;r<n;r++)o[t[r]]=!0;else o[t]=!0;for(r=0,n=e.length;r<n;r++)(o&&void 0!==o[e[r]]||!o&&t.test(e[r]))&&(e.splice(r,1),n--,r--);return e}function p(e,t){if(l(t)){for(r=0,n=t.length;r<n;r++)if(!p(e,t[r]))return!1;return!0}var r,n,o=u(t);for(r=0,n=e.length;r<n;r++)if("RegExp"===o){if("string"==typeof e[r]&&e[r].match(t))return!0}else if(e[r]===t)return!0;return!1}function d(e,t){if(!l(e)||!l(t)||e.length!==t.length)return!1;e.sort(),t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function h(e){return e.replace(/^\/+|\/+$/g,"")}function y(e){return escape(e)}function m(e){return encodeURIComponent(e).replace(/[!'()*]/g,y).replace(/\*/g,"%2A")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:i.preventInvalidHostname,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.preventInvalidHostname=!1,i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=m,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=m,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var r=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var g,b={encode:"encode",decode:"decode"},v=function(e,t){return function(r){try{return i[t](r+"").replace(i.characters[e][t].expression,function(r){return i.characters[e][t].map[r]})}catch(e){return r}}};for(g in b)i[g+"PathSegment"]=v("pathname",b[g]),i[g+"UrnPathSegment"]=v("urnpath",b[g]);var w=function(e,t,r){return function(n){var o;o=r?function(e){return i[t](i[r](e))}:i[t];for(var a=(n+"").split(e),s=0,c=a.length;s<c;s++)a[s]=o(a[s]);return a.join(e)}};function S(e){return function(t,r){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!r),this)}}function _(e,t){return function(r,n){return void 0===r?this._parts[e]||"":(null!==r&&(r+="").charAt(0)===t&&(r=r.substring(1)),this._parts[e]=r,this.build(!n),this)}}i.decodePath=w("/","decodePathSegment"),i.decodeUrnPath=w(":","decode
2UrnPathSegment"),i.recodePath=w("/","encodePathSegment","decode"),i.recodeUrnPath=w(":","encodeUrnPathSegment","decode"),i.encodeReserved=v("reserved","encode"),i.parse=function(e,t){var r;return t||(t={preventInvalidHostname:i.preventInvalidHostname}),(r=(e=(e=e.replace(i.leading_whitespace_expression,"")).replace(i.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=i.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var a=e.indexOf(":"),s=e.indexOf("/"),c=e.indexOf(":",a+1);-1!==c&&(-1===s||c<s)?(t.hostname=e.substring(0,o)||null,t.port=null):(t.hostname=(n=e.substring(0,o).split(":"))[0]||null,t.port=n[1]||null)}return t.hostname&&"/"!==e.substring(o).charAt(0)&&(o++,e="/"+e),t.preventInvalidHostname&&i.ensureValidHostname(t.hostname,t.protocol),t.port&&i.ensureValidPort(t.port),e.substring(o)||"/"},i.parseAuthority=function(e,t){return e=i.parseUserinfo(e,t),i.parseHost(e,t)},i.parseUserinfo=function(e,t){var r=e;-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/"));var n,o=e.indexOf("/"),a=e.lastIndexOf("@",o>-1?o:e.length-1);return a>-1&&(-1===o||a<o)?(t.username=(n=e.substring(0,a).split(":"))[0]?i.decode(n[0]):null,n.shift(),t.password=n[0]?i.decode(n.join(":")):null,e=r.substring(a+1)):(t.username=null,t.password=null),e},i.parseQuery=function(e,t){if(!e||!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,a={},c=e.split("&"),u=c.length,l=0;l<u;l++)r=c[l].split("="),n=i.decodeQuery(r.shift(),t),o=r.length?i.decodeQuery(r.join("="),t):null,"__proto__"!==n&&(s.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(o)):a[n]=o);return a},i.build=function(e){var t="",r=!1;return e.protocol&&(t+=e.protocol+":"),!e.urn&&(t||e.hostname)&&(t+="//",r=!0),t+=i.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&r&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},i.buildHost=function(e){var t="";return e.hostname?(i.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},i.buildAuthority=function(e){return i.buildUserinfo(e)+i.buildHost(e)},i.buildUserinfo=function(e){var t="";return e.username&&(t+=i.encode(e.username)),e.password&&(t+=":"+i.encode(e.password)),t&&(t+="@"),t},i.buildQuery=function(e,t,r){var n,o,a,c,u="";for(o in e)if("__proto__"!==o&&s.call(e,o))if(l(e[o]))for(n={},a=0,c=e[o].length;a<c;a++)void 0!==e[o][a]&&void 0===n[e[o][a]+""]&&(u+="&"+i.buildQueryParameter(o,e[o][a],r),!0!==t&&(n[e[o][a]+""]=!0));else void 0!==e[o]&&(u+="&"+i.buildQueryParameter(o,e[o],r));return u.substring(1)},i.buildQueryParameter=function(e,t,r){return i.encodeQuery(e,r)+(null!==t?"="+i.encodeQuery(t,r):"")},i.addQuery=function(e,t,r){if("object"==typeof t)for(var n in t)s.call(t,n)&&i.addQuery(e,n,t[n]);else{if("string"!=typeof t)throw TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=r);"string"==typeof e[t]&&(e[t]=[e[t]]),l(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)}},i.setQuery=function(e,t,r){if("object"==typeof t)for(var n in t)s.call(t,n)&&i.setQuery(e,n,t[
2n]);else{if("string"!=typeof t)throw TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===r?null:r}},i.removeQuery=function(e,t,r){var n,o,a;if(l(t))for(n=0,o=t.length;n<o;n++)e[t[n]]=void 0;else if("RegExp"===u(t))for(a in e)t.test(a)&&(e[a]=void 0);else if("object"==typeof t)for(a in t)s.call(t,a)&&i.removeQuery(e,a,t[a]);else{if("string"!=typeof t)throw TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===u(r)?!l(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=f(e[t],r):e[t]!==String(r)||l(r)&&1!==r.length?l(e[t])&&(e[t]=f(e[t],r)):e[t]=void 0:e[t]=void 0}},i.hasQuery=function(e,t,r,n){switch(u(t)){case"String":break;case"RegExp":for(var o in e)if(s.call(e,o)&&t.test(o)&&(void 0===r||i.hasQuery(e,o,r)))return!0;return!1;case"Object":for(var a in t)if(s.call(t,a)&&!i.hasQuery(e,a,t[a]))return!1;return!0;default:throw TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(u(r)){case"Undefined":return t in e;case"Boolean":return!!(l(e[t])?e[t].length:e[t])===r;case"Function":return!!r(e[t],t,e);case"Array":return!!l(e[t])&&(n?p:d)(e[t],r);case"RegExp":return l(e[t])?!!n&&p(e[t],r):!!(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":return l(e[t])?!!n&&p(e[t],r):e[t]===r;default:throw TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var o=new i(arguments[n]);e.push(o);for(var a=o.segment(),s=0;s<a.length;s++)"string"==typeof a[s]&&t.push(a[s]),a[s]&&r++}if(!t.length||!r)return new i("");var c=new i("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||c.path("/"+c.path()),c.normalize()},i.commonPath=function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r)){r--;break}return r<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(r)&&"/"===t.charAt(r)||(r=e.substring(0,r).lastIndexOf("/")),e.substring(0,r+1))},i.withinString=function(e,t,r){r||(r={});var n=r.start||i.findUri.start,o=r.end||i.findUri.end,a=r.trim||i.findUri.trim,s=r.parens||i.findUri.parens,c=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var u=n.exec(e);if(!u)break;var l=u.index;if(r.ignoreHtml){var f=e.slice(Math.max(l-3,0),l);if(f&&c.test(f))continue}for(var p=l+e.slice(l).search(o),d=e.slice(l,p),h=-1;;){var y=s.exec(d);if(!y)break;h=Math.max(h,y.index+y[0].length)}if(!((d=h>-1?d.slice(0,h)+d.slice(h).replace(a,""):d.replace(a,"")).length<=u[0].length||r.ignore&&r.ignore.test(d))){var m=t(d,l,p=l+d.length,e);void 0!==m?(m=String(m),e=e.slice(0,l)+m+e.slice(p),n.lastIndex=l+m.length):n.lastIndex=p}}return n.lastIndex=0,e},i.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(r&&(o=p(i.hostProtocols,r)),o&&!n)throw TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},a.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new i(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=S("protocol"),a.username=S("username"),a.password=S("password"),a.hostname=S("hostname"),a.port=S("port"),a.query=_("query","?"),a.fragment=_("fragment","#"),a.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},a.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},a.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},a.path=a.pathname,a.href=function(e,t){if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var r,n=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[i.getDomAttribute(e)]||"",o=!1),!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!n&&!o)throw TypeError("invalid input");var a=n?e._parts:e;for(r in a)"query"!==r&&s.call(this._parts,r)&&(this._parts[r]=a[r]);a.query&&this.query(a.query,!1)}return this.build(!t),this},a.is=function(e){var t=!1,n=!1,o=!1,a=!1,s=!1,c=!1,u=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),s=(a=!(t=n||o))&&r&&r.has(this._parts.hostname),c=a&&i.idn_expression.test(this._parts.hostname),u=a&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return a;case"sld":return s;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return c;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return u}return null};var E=a.protocol,x=a.port,A=a.hostname;a.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,e,t)},a.scheme=a.protocol,a.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),x.call(this,e,t))},a.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,r))throw TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return A.call(this,e,t)},a.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},a.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},a.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=i.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},a.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=RegExp("^"+c(this._parts.hostname.substring(0,n)));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(o,e),this.build(!t),this},a.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},a.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n,o=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(o+1);return!0!==t&&r&&r.list[i.toLowerCase()]&&r.get(this._parts.hostname)||i}if(!e)throw TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');n=RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(n,e)}else{if(!this._parts.hostname||this.is("IP"))throw ReferenceError("cannot set TLD on non-domain host");n=RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(n,e)}return this.build(!t),this},a.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,a=RegExp("^"+c(this._parts.path.substring(0,o)));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},a.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?i.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var a=RegExp(c(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),o?this.normalizePath(t):this.build(!t),this},a.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),a=o.lastIndexOf(".");return -1===a?"":(r=o.substring(a+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var s,u=this.suffix();if(u)s=e?RegExp(c(u)+"$"):RegExp(c("."+u)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return s&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e)),this.build(!t),this},a.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),a=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw Error('Bad segment "'+e+'", must be 0-based integer');if(i&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(l(t)){a=[];for(var s=0,c=t.length;s<c;s++)(t[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(h(t[s])))}else(t||"string"==typeof t)&&(t=h(t),""===a[a.length-1]?a[a.length-1]=t:a.push(t));else t?a[e]=h(t):a.splice(e,1);return i&&a.unshift(""),this.path(a.join(n),r)},a.segmentCoded=function(e,t,r){var n,o,a;if("number"!=typeof e&&(r=t,t=e,e=void 0),void 0===t){if(l(n=this.segment(e,t,r)))for(o=0,a=n.length;o<a;o++)n[o]=i.decode(n[o]);else n=void 0!==n?i.decode(n):void 0;return n}if(l(t))for(o=0,a=t.length;o<a;o++)t[o]=i.encode(t[o]);else t="string"==typeof t||t instanceof String?i.encode(t):t;return this.segment(e,t,r)};var T=a.query;return a.query=function(e,t){if(!0===e)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);return this._parts.query=i.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=i.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):T.call(this,e,t)},a.setQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)s.call(e,o)&&(n[o]=e[o])}return this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.addQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(n,e,void 0===t?null:t),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.removeQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(n,e,t),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.hasQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(n,e,t,r)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},a.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},a.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},a.normalizePath=function(e){var t,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var n,o,a="";for("/"!==(r=i.recodePath(r)).charAt(0)&&(t=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(a=r.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(o=r.substring(0,n).lastIndexOf("/"))&&(o=n),r=r.substring(0,o)+r.substring(n+3)):r=r.substring(3);return t&&this.is("relative")&&(r=a+r.substring(1)),this._parts.path=r,this.build(!e),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQue
2ry(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},a.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var e=i.encode,t=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},a.unicode=function(){var e=i.encode,t=i.decode;i.encode=m,i.decode=unescape;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},a.readable=function(){var t=this.clone();t.username("").password("").normalize();var r="";if(t._parts.protocol&&(r+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(r+=e.toUnicode(t._parts.hostname),t._parts.port&&(r+=":"+t._parts.port)):r+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(r+="/"),r+=t.path(!0),t._parts.query){for(var n="",o=0,a=t._parts.query.split("&"),s=a.length;o<s;o++){var c=(a[o]||"").split("=");n+="&"+i.decodeQuery(c[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==c[1]&&(n+="="+i.decodeQuery(c[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+i.decodeQuery(t.hash(),!0)},a.absoluteTo=function(e){var t,r,n,o=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");if(e instanceof i||(e=new i(e)),o._parts.protocol||(o._parts.protocol=e._parts.protocol,this._parts.hostname))return o;for(r=0;n=a[r];r++)o._parts[n]=e._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),o.build(),o},a.relativeTo=function(e){var t,r,n,o,a,s=this.clone().normalize();if(s._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");if(e=new i(e).normalize(),t=s._parts,r=e._parts,o=s.path(),a=e.path(),"/"!==o.charAt(0))throw Error("URI is already relative");if("/"!==a.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");return t.protocol===r.protocol&&(t.protocol=null),t.username!==r.username||t.password!==r.password||null!==t.protocol||null!==t.username||null!==t.password||t.hostname!==r.hostname||t.port!==r.port||((t.hostname=null,t.port=null,o===a)?t.path="":(n=i.commonPath(o,a))&&(t.path=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../")+t.path.substring(n.length)||"./")),s.build()},a.equals=function(e){var t,r,n,o,a,c=this.clone(),u=new i(e),f={};if(c.normalize(),u.normalize(),c.toString()===u.toString())return!0;if(n=c.query(),o=u.query(),c.query(""),u.query(""),c.toString()!==u.toString()||n.length!==o.length)return!1;for(a in t=i.parseQuery(n,this._parts.escapeQuerySpace),r=i.parseQuery(o,this._parts.escapeQuerySpace),t)if(s.call(t,a)){if(l(t[a])){if(!d(t[a],r[a]))return!1}else if(t[a]!==r[a])return!1;f[a]=!0}for(a in r)if(s.call(r,a)&&!f[a])return!1;return!0},a.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},a.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},a.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},i})},4356:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AccountRequiresMemoError:()=>n.Cu,BadRequestError:()=>n.v7,BadResponseError:()=>n.nS,Config:()=>o.T,Federation:()=>s,Friendbot:()=>u,Horizon:()=>l,NetworkError:()=>n.Dr,NotFoundError:()=>n.m_,StellarToml:()=>a,Utils:()=>i.A,WebAuth:()=>c,contract:()=>p,default:()=>y,rpc:()=>f});var n=r(5976),o=r(8732),i=r(3121),a=r(3898),s=r(7600),c=r(5479),u=r(8242),l=r(8733),f=r(3496),p=r(6299),d=r(8950),h={};for(let e in d)0>["default","Config","Utils","StellarToml","Federation","WebAuth","Friendbot","Horizon","rpc","contract","AccountRequiresMemoError","BadRequestError","BadResponseError","NetworkError","NotFoundError"].indexOf(e)&&(h[e]=()=>d[e]);r.d(t,h);let y=(e=r.hmd(e)).exports;void 0===r.g.__USE_AXIOS__&&(r.g.__USE_AXIOS__=!0),void 0===r.g.__USE_EVENTSOURCE__&&(r.g.__USE_EVENTSOURCE__=!1)},4459:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},4610:(e,t,r)=>{"use strict";e.exports=l;
2var n=r(6048).F,o=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(5382);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);c.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush(function(t,r){p(e,t,r)})}function p(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(6698)(l,c),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new o("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,function(e){t(e)})}},4643:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},4704:function(e,t,r){var n,o;!function(i){"use strict";e.exports?e.exports=i():void 0===(o="function"==typeof(n=i)?n.call(t,r,t,e):n)||(e.exports=o)}(function(e){"use strict";var t=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" c
2o net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk d
2p edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1||e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return o?0>o.indexOf(" "+e.slice(n+1,t)+" ")?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r})},4765:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},4803:(e,t,r)=>{"use strict";var n=r(8859),o=r(9675),i=function(e,t,r){for(var n,o=e;null!=(n=o.next);o=n)if(n.key===t)return o.next=n.next,r||(n.next=e.next,e.next=n),n};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new o("Side channel does not contain "+n(e))},delete:function(t){var r=e&&e.next,n=function(e,t){if(e)return i(e,t,!0)}(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){var r=e;if(r){var n=i(r,t);return n&&n.value}},has:function(t){var r;return!!(r=e)&&!!i(r,t)},set:function(t,r){var n,o;e||(e={next:void 0}),(o=i(n=e,t))?o.value=r:n.next={key:t,next:n.next,value:r}}};return t}},5157:e=>{e.exports=function(){throw Error("Readable.from is not available in the browser")}},5291:(e,t,r)=>{"use strict";var n=r(6048).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var i=null!=t.highWaterMark?t.highWaterMark:o?t[r]:null;if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(o?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},5340:()=>{},5345:e=>{"use strict";e.exports=URIError},5373:(e,t,r)=>{"use strict";var n=r(8636),o=r(2642);e.exports={formats:r(4765),parse:o,stringify:n}},5382:(e,t,r)=>{"use strict";var o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var i=r(5412),a=r(6708);r(6698)(l,i);for(var s=o(a.prototype),c=0;c<s.length;c++){var u=s[c];l.prototype[u]||(l.prototype[u]=a.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||n.default.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},5412:(e,t,r)=>{"use strict";e.exports=A,A.ReadableState=x,r(7007).EventEmitter;var o,i,a=function(e,t){return e.listeners(t).length},s=r(345),c=r(8287).Buffer,u=(void 0!==r.g?r.g:"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},l=r(9838);i=l&&l.debuglog?l.debuglog("stream"):function(){};var f,p,d,h=r(2726),y=r(5896),m=r(5291).getHighWaterMark,g=r(6048).F,b=g.ERR_INVALID_ARG_TYPE,v=g.E
vendor: 5,263 bytes, line 2
2RR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,S=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(6698)(A,s);var _=y.errorOrDestroy,E=["error","close","destroy","pause","resume"];function x(e,t,n){o=o||r(5382),e=e||{},"boolean"!=typeof n&&(n=t instanceof o),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",n),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(3141).I),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function A(e){if(o=o||r(5382),!(this instanceof A))return new A(e);var t=this instanceof o;this._readableState=new x(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function T(e,t,r,n,o){i("readableAddChunk",t);var a,s,l,f,p,d=e._readableState;if(null===t)d.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?P(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,B(e)))}}(e,d);else{if(o||(a=d,s=t,c.isBuffer(s)||s instanceof u||"string"==typeof s||void 0===s||a.objectMode||(l=new b("chunk",["string","Buffer","Uint8Array"],s)),p=l),p)_(e,p);else if(d.objectMode||t&&t.length>0)if("string"==typeof t||d.objectMode||Object.getPrototypeOf(t)===c.prototype||(f=t,t=c.from(f)),n)d.endEmitted?_(e,new S):k(e,d,t,!0);else if(d.ended)_(e,new v);else{if(d.destroyed)return!1;d.reading=!1,d.decoder&&!r?(t=d.decoder.write(t),d.objectMode||0!==t.length?k(e,d,t,!1):j(e,d)):k(e,d,t,!1)}else n||(d.reading=!1,j(e,d))}return!d.ended&&(d.length<d.highWaterMark||0===d.length)}function k(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&P(e)),j(e,t)}function O(e,t){var r;return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function P(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,n.default.nextTick(B,e))}function B(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function j(e,t){t.readingMore||(t.readingMore=!0,n.default.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function C(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){i("readable nexttick read 0"),e.read(0)}function U(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function D(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.default.nextTick(L,t,e))}function L(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function F(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=y.destroy,A.prototype._undestroy=y.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},A.prototype.unshift=function(e){return T(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){f||(f=r(3141).I);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;
2for(var n=this._readableState.buffer.head,o="";null!==n;)o+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==o&&this._readableState.buffer.push(o),this._readableState.length=o.length,this},A.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):P(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=O(r,t))),null===(n=e>0?M(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){_(this,new w("_read()"))},A.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,i("pipe count=%d opts=%j",o.pipesCount,t);var s=t&&!1===t.end||e===n.default.stdout||e===n.default.stderr?y:c;function c(){i("onend"),e.end()}o.endEmitted?n.default.nextTick(s):r.once("end",s),e.on("unpipe",function t(n,a){i("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,i("cleanup"),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",t),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",f),l=!0,o.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u())});var u=function(){var e=r._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(r,"data")&&(e.flowing=!0,N(r))};e.on("drain",u);var l=!1;function f(t){i("ondata");var n=e.write(t);i("dest.write",n),!1===n&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==F(o.pipes,e))&&!l&&(i("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause())}function p(t){i("onerror",t),y(),e.removeListener("error",p),0===a(e,"error")&&_(e,t)}function d(){e.removeListener("finish",h),y()}function h(){i("onfinish"),e.removeListener("close",d),y()}function y(){i("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prepe
2ndListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",d),e.once("finish",h),e.emit("pipe",r),o.flowing||(i("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=F(t.pipes,e);return -1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},A.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,i("on readable",o.length,o.reading),o.length?P(this):o.reading||n.default.nextTick(R,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.default.nextTick(C,this),r},A.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.default.nextTick(C,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,e.resumeScheduled||(e.resumeScheduled=!0,n.default.nextTick(U,this,e))),e.paused=!1,this},A.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<E.length;a++)e.on(E[a],this.emit.bind(this,E[a]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=r(2955)),p(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=M,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===d&&(d=r(5157)),d(A,e,t)})},5479:(e,t,r)=>{"use strict";r.r(t),r.d(t,{InvalidChallengeError:()=>d,buildChallengeTx:()=>S,gatherTxSigners:()=>T,readChallengeTx:()=>_,verifyChallengeTxSigners:()=>x,verifyChallengeTxThreshold:()=>E,verifyTxSignedBy:()=>A});var n=r(3209),o=r.n(n),i=r(8950),a=r(3121);function s(e){return(s="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 c(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,function(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==s(t)?t:t+""}(n.key),n)}}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw 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,r)}function r(){return function(e,t,r){if(l())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&f(o,r.prototype),o}(e,arguments,p(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,e)})(e)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}
2function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){var t,r;function n(e){if(!(this instanceof n))throw TypeError("Cannot call a class as a function");var t,r,o,i=(this instanceof n?this.constructor:void 0).prototype;return(t=n,r=[e],t=p(t),o=function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,l()?Reflect.construct(t,r||[],p(this).constructor):t.apply(this,r))).__proto__=i,o.constructor=n,o.name="InvalidChallengeError",o}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&f(e,t)}(n,e),t&&c(n.prototype,t),r&&c(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(u(Error)),h=r(8287).Buffer;function y(e){return function(e){if(Array.isArray(e))return v(e)}(e)||w(e)||b(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){var r="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=b(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function g(e){return(g="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){if(e){if("string"==typeof e)return v(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function w(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function S(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:300,a=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null;if(t.startsWith("M")&&c)throw Error("memo cannot be used if clientAccountID is a muxed account");var f=new i.Account(e.publicKey(),"-1"),p=Math.floor(Date.now()/1e3),d=o()(48).toString("base64"),h=new i.TransactionBuilder(f,{fee:i.BASE_FEE,networkPassphrase:a,timebounds:{minTime:p,maxTime:p+n}}).addOperation(i.Operation.manageData({name:"".concat(r," auth"),value:d,source:t})).addOperation(i.Operation.manageData({name:"web_auth_domain",value:s,source:f.accountId()}));if(u){if(!l)throw Error("clientSigningKey is required if clientDomain is provided");h.addOperation(i.Operation.manageData({name:"client_domain",value:u,source:l}))}c&&h.addMemo(i.Memo.id(c));var y=h.build();return y.sign(e),y.toEnvelope().toXDR("base64").toString()}function _(e,t,r,n,o){if(t.startsWith("M"))throw Error("Invalid serverAccountID: multiplexed accounts are not supported.");try{p=new i.Transaction(e,r)}catch(t){try{p=new i.FeeBumpTransaction(e,r)}catch(e){throw new d("Invalid challenge: unable to deserialize challengeTx transaction string")}throw new d("Invalid challenge: expected a Transaction but received a FeeBumpTransaction")}if(0!==Number.parseInt(p.sequence,10))throw new d("The transaction sequence number should be zero");if(p.source!==t)throw new d("The transaction source account is not equal to the server's account");if(p.operations.length<1)throw new d("The transaction should contain at least one operation");var s=function(e){if(Array.isArray(e))return e}(l=p.operations)||w(l)||b(l)||function(){throw TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=s[0],u=s.slice(1);if(!c.source)throw new d("The transaction's operation should contain a source account");var l,f,p,y,v=c.source,S=null;if(p.memo.type!==i.MemoNone){if(v.startsWith("M"))throw new d("The transaction has a memo but the client account ID is a muxed account");if(p.memo.type!==i.MemoID)throw new d("The transaction's memo must be of type `id`");S=p.memo.value}if("manageData"!==c.type)throw new d("The transaction's operation type should be 'manageData'");if(p.timeBounds&&Number.parseInt(null==(f=p.timeBounds)?void 0:f.maxTime,10)===i.TimeoutInfinite)throw new d("The transaction requires non-infinite timebounds");if(!a.A.validateTimebounds(p,300))throw new d("The transaction has expired");if(void 0===c.value)throw new d("The transaction's operation values should not be null");if(!c.value)throw new d("The transaction's operation value should not be null");if(48!==h.from(c.value.toString(),"base64").length)throw new d("The transaction's operation value should be a 64 bytes base64 random string");if(!n)throw new d("Invalid homeDomains: a home domain must be provided for verification");if("string"==typeof n)"".concat(n," auth")===c.name&&(y=n);else{if(!Array.isArray(n))throw new d("Invalid homeDomains: homeDomains type is ".concat(g(n)," but should be a string or an array"));y=n.find(function(e){return"".concat(e," auth")===c.name})}if(!y)throw new d("Invalid homeDomains: the transaction's operation key name does not match the expected home domain");var _,E=m(u);try{for(E.s();!(_=E.n()).done;){var x=_.value;if("manageData"!==x.type)throw new d("The transaction has operations that are not of type 'manageData'");if(x.source!==t&&"client_domain"!==x.name)throw new d("The transaction has operations that are unrecognized");if("web_auth_domain"===x.name){if(void 0===x.value)throw new d("'web_auth_domain' operation value should not be null");if(x.value.compare(h.from(o)))throw new d("'web_auth_domain' operation value does not match ".concat(o))}}}catch(e){E.e(e)}finally{E.f()}if(!A(p,t))throw new d("Transaction not signed by server: '".concat(t,"'"));return{tx:p,clientAccountID:v,matchedHomeDomain:y,memo:S}}function E(e,t,r,n,o,i,a){for(var s=x(e,t,r,o.map(function(e){return e.key}),i,a),c=0,u=0;u<s.length;u++)!function(){var e,t=s[u],r=(null==(e=o.find(function(e){return e.key===t}))?void 0:e.weight)||0;c+=r}();if(c<n)throw new d("signers with weight ".concat(c," do not meet threshold ").concat(n,'"'));return s}function x(e,t,r,n,o,a){var s,c=_(e,t,r,o,a).tx;try{s=i.Keypair.fromPublicKey(t)}catch(e){throw Error("Couldn't infer keypair from the provided 'serverAccountID': ".concat(e.message))}var u,l,f=new Set,p=m(n);try{for(p.s();!(u=p.n()).done;){var h=u.value;h!==s.publicKey()&&"G"===h.charAt(0)&&f.add(h)}}catch(e){p.e(e)}finally{p.f()}if(0===f.size)throw new d("No verifiable client signers provided, at least one G... address must be provided");var g,b=m(c.operations);try{for(b.s();!(g=b.n()).done;){var v=g.value;if("manageData"===v.type&&"client_domain"===v.name){if(l)throw new d("Found more than one client_domain operation");l=v.source}}}catch(e){b.e(e)}finally{b.f()}var w=[s.publicKey()].concat(y(Array.from(f)));l&&w.push(l);for(var S=T(c,w),E=!1,x=!1,A=0;A<S.length;A++){var k=S[A];k===s.publicKey()&&(E=!0),k===l&&(x=!0)}if(!E)throw new d("Transaction not signed by server: '".concat(s.publicKey(),"'"));if(l&&!x)throw new d("Transaction not signed by the source account of the 'client_domain' ManageData operation");if(1===S.length)throw new d("None of the given signers match the transaction signatures");if(S.length!==c.signatures.length)throw new d("Transaction has unrecognized signatures");return S.splice(S.indexOf(s.publicKey()),1),l&&S.splice(S.indexOf(l),1),S}function A(e,t){return 0!==T(e,[t]).length}function T(e,t){var r,n=e.hash(),o=y(e.signatures),a=new Set,s=m(t);try{for(s.s();!(r=s.n()).done;){var c=r.value;if(0===o.length)break;var u=void 0;try{u=i.Keypair.fromPublicKey(c)}catch(e){throw new d("Signer is not a valid address: ".concat(e.message))}for(var l=0;l<o.length;l++){var f=o[l];if(f.hint().equals(u.signatureHint())&&u.verify(n,f.signature())){a.add(c),o.splice(l,1);break}}}}catch(e){s.e(e)}finally{s.f()}return Array.from(a)}},5537:(e,t,r)=>
2{var o=r(8287).Buffer,i=r(6688),a=r(6698),s=r(6917),c=r(8399),u=s.IncomingMessage,l=s.readyStates,f=e.exports=function(e){var t,r,n,a=this;c.Writable.call(a),a._opts=e,a._body=[],a._headers={},e.auth&&a.setHeader("Authorization","Basic "+o.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){a.setHeader(t,e.headers[t])});var s=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)s=!1,n=!0;else if("prefer-streaming"===e.mode)n=!1;else if("allow-wrong-content-type"===e.mode)n=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw Error("Invalid value for opts.mode");n=!0}t=n,r=s,a._mode=i.fetch&&r?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&t?"arraybuffer":"text",a._fetchTimer=null,a._socketTimeout=null,a._socketTimer=null,a.on("finish",function(){a._onFinish()})};a(f,c.Writable),f.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var o=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=new Blob(e._body,{type:(o["content-type"]||{}).value||""}));var s=[];if(Object.keys(o).forEach(function(e){var t=o[e].name,r=o[e].value;Array.isArray(r)?r.forEach(function(e){s.push([t,e])}):s.push([t,r])}),"fetch"===e._mode){var c=null;if(i.abortController){var u=new AbortController;c=u.signal,e._fetchAbortController=u,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then(function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()},function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)})}else{var f=e._xhr=new r.g.XMLHttpRequest;try{f.open(e._opts.method,e._opts.url,!0)}catch(t){return void n.default.nextTick(function(){e.emit("error",t)})}"responseType"in f&&(f.responseType=e._mode),"withCredentials"in f&&(f.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(f.timeout=t.requestTimeout,f.ontimeout=function(){e.emit("requestTimeout")}),s.forEach(function(e){f.setRequestHeader(e[0],e[1])}),e._response=null,f.onreadystatechange=function(){switch(f.readyState){case l.LOADING:case l.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(f.onprogress=function(){e._onXHRProgress()}),f.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",Error("XHR error")))};try{f.send(a)}catch(t){return void n.default.nextTick(function(){e.emit("error",t)})}}}},f.prototype._onXHRProgress=function(){this._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress(this._resetTimers.bind(this)))},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},f.prototype._write=function(e,t,r){this._body.push(e),r()},f.prototype._resetTimers=function(e){var t=this;r.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(r.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=r.g.setTimeout(function(){t.emit("timeout")},t._socketTimeout))},f.prototype.abort=f.prototype.destroy=function(e){this._destroyed=!0,this._resetTimers(!0),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort(),e&&this.emit
2("error",e)},f.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),c.Writable.prototype.end.call(this,e,t,r)},f.prototype.setTimeout=function(e,t){t&&this.once("timeout",t),this._socketTimeout=e,this._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},5546:e=>{e.exports=function(){function e(e,t,r,n,o,i){this.message=e,this.expected=t,this.found=r,this.offset=n,this.line=o,this.column=i,this.name="SyntaxError"}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),{SyntaxError:e,parse:function(t){var r,n,o,i,a,s=arguments.length>1?arguments[1]:{},c={},u={start:eO},l=eO,f={type:"literal",value:"#",description:'"#"'},p=void 0,d={type:"any",description:"any character"},h={type:"literal",value:"[",description:'"["'},y={type:"literal",value:"]",description:'"]"'},m=function(e){e8(e9("ObjectPath",e,ex,eA))},g=function(e){e8(e9("ArrayPath",e,ex,eA))},b=function(e){return e},v={type:"literal",value:".",description:'"."'},w={type:"literal",value:"=",description:'"="'},S=function(e,t){e8(e9("Assign",t,ex,eA,e))},_=function(e){return e.value},E={type:"literal",value:'"""',description:'"\\"\\"\\""'},x=function(e){return e9("String",e.join(""),ex,eA)},A={type:"literal",value:'"',description:'"\\""'},T={type:"literal",value:"'''",description:"\"'''\""},k={type:"literal",value:"'",description:'"\'"'},O=function(e){return e},P={type:"literal",value:"\\",description:'"\\\\"'},B={type:"literal",value:"e",description:'"e"'},j={type:"literal",value:"E",description:'"E"'},I={type:"literal",value:"+",description:'"+"'},C=function(e){return e.join("")},R={type:"literal",value:"-",description:'"-"'},U=function(e){return"-"+e.join("")},N="true",M={type:"literal",value:"true",description:'"true"'},D="false",L={type:"literal",value:"false",description:'"false"'},F=function(e){return e},q={type:"literal",value:",",description:'","'},V={type:"literal",value:"{",description:'"{"'},$={type:"literal",value:"}",description:'"}"'},z=function(e,t){return e9("InlineTableValue",t,ex,eA,e)},H={type:"literal",value:":",description:'":"'},G=function(e){return e.join("")},K={type:"literal",value:"T",description:'"T"'},W={type:"literal",value:"Z",description:'"Z"'},X=/^[ \t]/,Q={type:"class",value:"[ \\t]",description:"[ \\t]"},J={type:"literal",value:"\n",description:'"\\n"'},Y={type:"literal",value:"\r",description:'"\\r"'},Z=/^[0-9a-f]/i,ee={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},et=/^[0-9]/,er={type:"class",value:"[0-9]",description:"[0-9]"},en={type:"literal",value:"_",description:'"_"'},eo=/^[A-Za-z0-9_\-]/,ei={type:"class",value:"[A-Za-z0-9_\\-]",description:"[A-Za-z0-9_\\-]"},ea={type:"literal",value:'\\"',description:'"\\\\\\""'},es={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},ec={type:"literal",value:"\\b",description:'"\\\\b"'},eu={type:"literal",value:"\\t",description:'"\\\\t"'},el={type:"literal",value:"\\n",description:'"\\\\n"'},ef={type:"literal",value:"\\f",description:'"\\\\f"'},ep={type:"literal",value:"\\r",description:'"\\\\r"'},ed={type:"literal",value:"\\U",description:'"\\\\U"'},eh=function(e){return function(e,t,r){var n=parseInt("0x"+e);if(!(!isFinite(n)||Math.floor(n)!=n||n<0||n>1114111||n>55295&&n<57344))return function(){var e,t,r=[],n=-1,o=arguments.length;if(!o)return"";for(var i="";++n<o;){var a=Number(arguments[n]);a<=65535?r.push(a):(e=55296+((a-=65536)>>10),t=a%1024+56320,r.push(e,t)),(n+1==o||r.length>16384)&&(i+=String.fromCharCode.apply(null,r),r.length=0)}return i}(n);var o=Error("Invalid Unicode escape code: "+e);throw o.line=t,o.column=r,o}(e.join(""))},ey={type:"literal",value:"\\u",description:'"\\\\u"'},em=0,eg=0,eb=0,ev={line:1,column:1,seenCR:!1},ew=0,eS=[],e_=0,eE={};if("startRule"in s){if(!(s.startRule in u))throw Error("Can't start parsing from rule \""+s.startRule+'".');l=u[s.startRule]}function ex(){return eT(eg).line}function eA(){return eT(eg).column}function eT(e){return eb!==e&&(eb>e&&(eb=0,ev={line:1,column:1,seenCR:!1}),function(e,r,n){var o,i;for(o=r;o<n;o++)"\n"===(i=t.charAt(o))?(e.seenCR||e.line++,e.column=1,e.seenCR=!1):"\r"===i||"\u2028"===i||"\u2029"===i?(e.line++,e.column=1,e.seenCR=!0):(e.column++,e.seenCR=!1)}(ev,eb,e),eb=e),ev}function ek(e){em<ew||(em>ew&&(ew=em,eS=[]),eS.push(e))}function eO(){var e,t,r,n=49*em+0,o=eE[n];if(o)return em=o.nextPos,o.result;for(e=em,t=[],r=eP();r!==c;)t.push(r),r=eP();return t!==c&&(eg=e,t=e5),e=t,eE[n]={nextPos:em,result:e},e}function eP(){var e,r,n,o,i,a,s,u,l,f,p=49*em+1,d=eE[p];if(d)return em=d.nextPos,d.result;for(o=em,i=[],a=eJ();a!==c;)i.push(a),a=eJ();if(i!==c)if((a=(n=eE[r=49*em+2])?(em=n.nextPos,n.result):((e=eB())===c&&(e=function(){var e,r,n,o,i,a,s=49*em+4,u=eE[s];if(u)return em=u.nextPos,u.result;if(e=em,91===t.charCodeAt(em)?(r="[",em++):(r=c,0===e_&&ek(h)),r!==c){for(n=[],o=eJ();o!==c;)n.push(o),o=eJ();if(n!==c)if((o=ej())!==c){for(i=[],a=eJ();a!==c;)i.push(a),a=eJ();i!==c?(93===t.charCodeAt(em)?(a="]",em++):(a=c,0===e_&&ek(y)),a!==c?(eg=e,e=r=m(o)):(em=e,e=c)):(em=e,e=c)}else em=e,e=c;else em=e,e=c}else em=e,e=c;return eE[s]={nextPos:em,result:e},e}())===c&&(e=function(){var e,r,n,o,i,a,s,u,l=49*em+5,f=eE[l];if(f)return em=f.nextPos,f.result;if(e=em,91===t.charCodeAt(em)?(r="[",em++):(r=c,0===e_&&ek(h)),r!==c)if(91===t.charCodeAt(em)?(n="[",em++):(n=c,0===e_&&ek(h)),n!==c){for(o=[],i=eJ();i!==c;)o.push(i),i=eJ();if(o!==c)if((i=ej())!==c){for(a=[],s=eJ();s!==c;)a.push(s),s=eJ();a!==c?(93===t.charCodeAt(em)?(s="]",em++):(s=c,0===e_&&ek(y)),s!==c?(93===t.charCodeAt(em)?(u="]",em
2++):(u=c,0===e_&&ek(y)),u!==c?(eg=e,e=r=g(i)):(em=e,e=c)):(em=e,e=c)):(em=e,e=c)}else em=e,e=c;else em=e,e=c}else em=e,e=c;else em=e,e=c;return eE[l]={nextPos:em,result:e},e}())===c&&(e=function(){var e,r,n,o,i,a,s=49*em+9,u=eE[s];if(u)return em=u.nextPos,u.result;if(e=em,(r=eR())!==c){for(n=[],o=eJ();o!==c;)n.push(o),o=eJ();if(n!==c)if(61===t.charCodeAt(em)?(o="=",em++):(o=c,0===e_&&ek(w)),o!==c){for(i=[],a=eJ();a!==c;)i.push(a),a=eJ();i!==c&&(a=eN())!==c?(eg=e,e=r=S(r,a)):(em=e,e=c)}else em=e,e=c;else em=e,e=c}else em=e,e=c;if(e===c)if(e=em,(r=eU())!==c){for(n=[],o=eJ();o!==c;)n.push(o),o=eJ();if(n!==c)if(61===t.charCodeAt(em)?(o="=",em++):(o=c,0===e_&&ek(w)),o!==c){for(i=[],a=eJ();a!==c;)i.push(a),a=eJ();i!==c&&(a=eN())!==c?(eg=e,e=r=S(r,a)):(em=e,e=c)}else em=e,e=c;else em=e,e=c}else em=e,e=c;return eE[s]={nextPos:em,result:e},e}()),eE[r]={nextPos:em,result:e},e))!==c){for(s=[],u=eJ();u!==c;)s.push(u),u=eJ();if(s!==c){for(u=[],l=eB();l!==c;)u.push(l),l=eB();if(u!==c){if(l=[],(f=eY())!==c)for(;f!==c;)l.push(f),f=eY();else l=c;l===c&&(l=e0()),l!==c?o=i=[i,a,s,u,l]:(em=o,o=c)}else em=o,o=c}else em=o,o=c}else em=o,o=c;else em=o,o=c;if(o===c){if(o=em,i=[],(a=eJ())!==c)for(;a!==c;)i.push(a),a=eJ();else i=c;if(i!==c){if(a=[],(s=eY())!==c)for(;s!==c;)a.push(s),s=eY();else a=c;a===c&&(a=e0()),a!==c?o=i=[i,a]:(em=o,o=c)}else em=o,o=c;o===c&&(o=eY())}return eE[p]={nextPos:em,result:o},o}function eB(){var e,r,n,o,i,a,s=49*em+3,u=eE[s];if(u)return em=u.nextPos,u.result;if(e=em,35===t.charCodeAt(em)?(r="#",em++):(r=c,0===e_&&ek(f)),r!==c){for(n=[],o=em,i=em,e_++,(a=eY())===c&&(a=e0()),e_--,a===c?i=p:(em=i,i=c),i!==c?(t.length>em?(a=t.charAt(em),em++):(a=c,0===e_&&ek(d)),a!==c?o=i=[i,a]:(em=o,o=c)):(em=o,o=c);o!==c;)n.push(o),o=em,i=em,e_++,(a=eY())===c&&(a=e0()),e_--,a===c?i=p:(em=i,i=c),i!==c?(t.length>em?(a=t.charAt(em),em++):(a=c,0===e_&&ek(d)),a!==c?o=i=[i,a]:(em=o,o=c)):(em=o,o=c);n!==c?e=r=[r,n]:(em=e,e=c)}else em=e,e=c;return eE[s]={nextPos:em,result:e},e}function ej(){var e,t,r,n,o,i=49*em+6,a=eE[i];if(a)return em=a.nextPos,a.result;if(r=em,n=[],(o=eC())!==c)for(;o!==c;)n.push(o),o=eC();else n=c;return n!==c&&(o=eI())!==c?(eg=r,e=n,t=o,r=n=e.concat(t)):(em=r,r=c),r===c&&(r=em,(n=eI())!==c&&(eg=r,n=[n]),r=n),eE[i]={nextPos:em,result:r},r}function eI(){var e,t,r,n,o,i=49*em+7,a=eE[i];if(a)return em=a.nextPos,a.result;for(e=em,t=[],r=eJ();r!==c;)t.push(r),r=eJ();if(t!==c)if((r=eR())!==c){for(n=[],o=eJ();o!==c;)n.push(o),o=eJ();n!==c?(eg=e,e=t=b(r)):(em=e,e=c)}else em=e,e=c;else em=e,e=c;if(e===c){for(e=em,t=[],r=eJ();r!==c;)t.push(r),r=eJ();if(t!==c)if((r=eU())!==c){for(n=[],o=eJ();o!==c;)n.push(o),o=eJ();n!==c?(eg=e,e=t=b(r)):(em=e,e=c)}else em=e,e=c;else em=e,e=c}return eE[i]={nextPos:em,result:e},e}function eC(){var e,r,n,o,i,a,s,u=49*em+8,l=eE[u];if(l)return em=l.nextPos,l.result;for(e=em,r=[],n=eJ();n!==c;)r.push(n),n=eJ();if(r!==c)if((n=eR())!==c){for(o=[],i=eJ();i!==c;)o.push(i),i=eJ();if(o!==c)if(46===t.charCodeAt(em)?(i=".",em++):(i=c,0===e_&&ek(v)),i!==c){for(a=[],s=eJ();s!==c;)a.push(s),s=eJ();a!==c?(eg=e,e=r=b(n)):(em=e,e=c)}else em=e,e=c;else em=e,e=c}else em=e,e=c;else em=e,e=c;if(e===c){for(e=em,r=[],n=eJ();n!==c;)r.push(n),n=eJ();if(r!==c)if((n=eU())!==c){for(o=[],i=eJ();i!==c;)o.push(i),i=eJ();if(o!==c)if(46===t.charCodeAt(em)?(i=".",em++):(i=c,0===e_&&ek(v)),i!==c){for(a=[],s=eJ();s!==c;)a.push(s),s=eJ();a!==c?(eg=e,e=r=b(n)):(em=e,e=c)}else em=e,e=c;else em=e,e=c}else em=e,e=c;else em=e,e=c}return eE[u]={nextPos:em,result:e},e}function eR(){var e,t,r,n=49*em+10,o=eE[n];if(o)return em=o.nextPos,o.result;if(e=em,t=[],(r=e6())!==c)for(;r!==c;)t.push(r),r=e6();else t=c;return t!==c&&(eg=e,t=t.join("")),e=t,eE[n]={nextPos:em,result:e},e}function eU(){var e,t,r=49*em+11,n=eE[r];return n?(em=n.nextPos,n.result):(e=em,(t=eM())!==c&&(eg=e,t=_(t)),(e=t)===c&&(e=em,(t=eD())!==c&&(eg=e,t=_(t)),e=t),eE[r]={nextPos:em,result:e},e)}function eN(){var e,r,n,o,i,a,s,u,l,f,p,d,m,g,b,v,w,S,_,A,k,O,P,C,U,F,q,z,X,Q,J,Y,Z,ee,et,er,en,eo,ei,ea,es,ec,eu,el,ef,ep,ed,eh,ey,eb,ev,ew,eS,eT,eO,eP,eB,ej=49*em+12,eI=eE[ej];return eI?(em=eI.nextPos,eI.result):((eB=(ew=eE[ev=49*em+13])?(em=ew.nextPos,ew.result):((eb=function(){var e,r,n,o,i,a=49*em+14,s=eE[a];if(s)return em=s.nextPos,s.result;if(e=em,'"""'===t.substr(em,3)?(r='"""',em+=3):(r=c,0===e_&&ek(E)),r!==c)if((n=eY())===c&&(n=null),n!==c){for(o=[],i=eq();i!==c;)o.push(i),i=eq();o!==c?('"""'===t.substr(em,3)?(i='"""',em+=3):(i=c,0===e_&&ek(E)),i!==c?(eg=e,e=r=x(o)):(em=e,e=c)):(em=e,e=c)}else em=e,e=c;else em=e,e=c;return eE[a]={nextPos:em,result:e},e}())===c&&(eb=eM())===c&&(eb=function(){var e,r,n,o,i,a=49*em+16,s=eE[a];if(s)return em=s.nextPos,s.result;if(e=em,"'''"===t.substr(em,3)?(r="'''",em+=3):(r=c,0===e_&&ek(T)),r!==c)if((n=eY())===c&&(n=null),n!==c){for(o=[],i=eV();i!==c;)o.push(i),i=eV();o!==c?("'''"===t.substr(em,3)?(i="'''",em+=3):(i=c,0===e_&&ek(T)),i!==c?(eg=e,e=r=x(o)):(em=e,e=c)):(em=e,e=c)}else em=e,e=c;else em=e,e=c;return eE[a]={nextPos:em,result:e},e}())===c&&(eb=eD()),eE[ev]={nextPos:em,result:eb}
2,eb))===c&&(eB=(ei=eE[eo=49*em+38])?(em=ei.nextPos,ei.result):(Z=em,(ee=eQ())!==c?(84===t.charCodeAt(em)?(et="T",em++):(et=c,0===e_&&ek(K)),et!==c&&(er=(m=eE[d=49*em+36])?(em=m.nextPos,m.result):(e=em,r=em,(n=e2())!==c&&(o=e2())!==c?(58===t.charCodeAt(em)?(i=":",em++):(i=c,0===e_&&ek(H)),i!==c&&(a=e2())!==c&&(s=e2())!==c?(58===t.charCodeAt(em)?(u=":",em++):(u=c,0===e_&&ek(H)),u!==c&&(l=e2())!==c&&(f=e2())!==c?((p=eX())===c&&(p=null),p!==c?r=n=[n,o,i,a,s,u,l,f,p]:(em=r,r=c)):(em=r,r=c)):(em=r,r=c)):(em=r,r=c),r!==c&&(eg=e,r=G(r)),e=r,eE[d]={nextPos:em,result:e},e))!==c?(90===t.charCodeAt(em)?(en="Z",em++):(en=c,0===e_&&ek(W)),en!==c?(eg=Z,Z=ee=e9("Date",new Date(ee+"T"+er+"Z"),ex,eA)):(em=Z,Z=c)):(em=Z,Z=c)):(em=Z,Z=c),Z===c&&(Z=em,(ee=eQ())!==c?(84===t.charCodeAt(em)?(et="T",em++):(et=c,0===e_&&ek(K)),et!==c&&(er=(Y=eE[J=49*em+37])?(em=Y.nextPos,Y.result):(g=em,b=em,(v=e2())!==c&&(w=e2())!==c?(58===t.charCodeAt(em)?(S=":",em++):(S=c,0===e_&&ek(H)),S!==c&&(_=e2())!==c&&(A=e2())!==c?(58===t.charCodeAt(em)?(k=":",em++):(k=c,0===e_&&ek(H)),k!==c&&(O=e2())!==c&&(P=e2())!==c?((C=eX())===c&&(C=null),C!==c?(45===t.charCodeAt(em)?(U="-",em++):(U=c,0===e_&&ek(R)),U===c&&(43===t.charCodeAt(em)?(U="+",em++):(U=c,0===e_&&ek(I))),U!==c&&(F=e2())!==c&&(q=e2())!==c?(58===t.charCodeAt(em)?(z=":",em++):(z=c,0===e_&&ek(H)),z!==c&&(X=e2())!==c&&(Q=e2())!==c?b=v=[v,w,S,_,A,k,O,P,C,U,F,q,z,X,Q]:(em=b,b=c)):(em=b,b=c)):(em=b,b=c)):(em=b,b=c)):(em=b,b=c)):(em=b,b=c),b!==c&&(eg=g,b=G(b)),g=b,eE[J]={nextPos:em,result:g},g))!==c?(eg=Z,Z=ee=e9("Date",new Date(ee+"T"+er),ex,eA)):(em=Z,Z=c)):(em=Z,Z=c)),eE[eo]={nextPos:em,result:Z},Z))===c&&(eB=(ef=eE[el=49*em+23])?(em=ef.nextPos,ef.result):(ea=em,(es=e$())===c&&(es=ez()),es!==c?(101===t.charCodeAt(em)?(ec="e",em++):(ec=c,0===e_&&ek(B)),ec===c&&(69===t.charCodeAt(em)?(ec="E",em++):(ec=c,0===e_&&ek(j))),ec!==c&&(eu=ez())!==c?(eg=ea,ea=es=e9("Float",parseFloat(es+"e"+eu),ex,eA)):(em=ea,ea=c)):(em=ea,ea=c),ea===c&&(ea=em,(es=e$())!==c&&(eg=ea,es=e9("Float",parseFloat(es),ex,eA)),ea=es),eE[el]={nextPos:em,result:ea},ea))===c&&(eB=(ey=eE[eh=49*em+25])?(em=ey.nextPos,ey.result):(ep=em,(ed=ez())!==c&&(eg=ep,ed=e9("Integer",parseInt(ed,10),ex,eA)),ep=ed,eE[eh]={nextPos:em,result:ep},ep))===c&&(eB=(eP=eE[eO=49*em+27])?(em=eP.nextPos,eP.result):(eS=em,t.substr(em,4)===N?(eT=N,em+=4):(eT=c,0===e_&&ek(M)),eT!==c&&(eg=eS,eT=e9("Boolean",!0,ex,eA)),(eS=eT)===c&&(eS=em,t.substr(em,5)===D?(eT=D,em+=5):(eT=c,0===e_&&ek(L)),eT!==c&&(eg=eS,eT=e9("Boolean",!1,ex,eA)),eS=eT),eE[eO]={nextPos:em,result:eS}
2,eS))===c&&(eB=function(){var e,r,n,o,i,a,s,u,l=49*em+28,f=eE[l];if(f)return em=f.nextPos,f.result;if(o=em,91===t.charCodeAt(em)?(i="[",em++):(i=c,0===e_&&ek(h)),i!==c){for(a=[],s=eK();s!==c;)a.push(s),s=eK();a!==c?(93===t.charCodeAt(em)?(s="]",em++):(s=c,0===e_&&ek(y)),s!==c?(eg=o,o=i=e9("Array",[],ex,eA)):(em=o,o=c)):(em=o,o=c)}else em=o,o=c;if(o===c&&(o=em,91===t.charCodeAt(em)?(i="[",em++):(i=c,0===e_&&ek(h)),i!==c?((a=eH())===c&&(a=null),a!==c?(93===t.charCodeAt(em)?(s="]",em++):(s=c,0===e_&&ek(y)),s!==c?(eg=o,o=i=e9("Array",(e=a)?[e]:[],ex,eA)):(em=o,o=c)):(em=o,o=c)):(em=o,o=c),o===c)){if(o=em,91===t.charCodeAt(em)?(i="[",em++):(i=c,0===e_&&ek(h)),i!==c){if(a=[],(s=eG())!==c)for(;s!==c;)a.push(s),s=eG();else a=c;a!==c?(93===t.charCodeAt(em)?(s="]",em++):(s=c,0===e_&&ek(y)),s!==c?(eg=o,o=i=e9("Array",a,ex,eA)):(em=o,o=c)):(em=o,o=c)}else em=o,o=c;if(o===c)if(o=em,91===t.charCodeAt(em)?(i="[",em++):(i=c,0===e_&&ek(h)),i!==c){if(a=[],(s=eG())!==c)for(;s!==c;)a.push(s),s=eG();else a=c;a!==c&&(s=eH())!==c?(93===t.charCodeAt(em)?(u="]",em++):(u=c,0===e_&&ek(y)),u!==c?(eg=o,r=a,n=s,o=i=e9("Array",r.concat(n),ex,eA)):(em=o,o=c)):(em=o,o=c)}else em=o,o=c}return eE[l]={nextPos:em,result:o},o}())===c&&(eB=function(){var e,r,n,o,i,a,s=49*em+32,u=eE[s];if(u)return em=u.nextPos,u.result;if(e=em,123===t.charCodeAt(em)?(r="{",em++):(r=c,0===e_&&ek(V)),r!==c){for(n=[],o=eJ();o!==c;)n.push(o),o=eJ();if(n!==c){for(o=[],i=eW();i!==c;)o.push(i),i=eW();if(o!==c){for(i=[],a=eJ();a!==c;)i.push(a),a=eJ();i!==c?(125===t.charCodeAt(em)?(a="}",em++):(a=c,0===e_&&ek($)),a!==c?(eg=e,e=r=e9("InlineTable",o,ex,eA)):(em=e,e=c)):(em=e,e=c)}else em=e,e=c}else em=e,e=c}else em=e,e=c;return eE[s]={nextPos:em,result:e},e}()),eE[ej]={nextPos:em,result:eB},eB)}function eM(){var e,r,n,o,i=49*em+15,a=eE[i];if(a)return em=a.nextPos,a.result;if(e=em,34===t.charCodeAt(em)?(r='"',em++):(r=c,0===e_&&ek(A)),r!==c){for(n=[],o=eL();o!==c;)n.push(o),o=eL();n!==c?(34===t.charCodeAt(em)?(o='"',em++):(o=c,0===e_&&ek(A)),o!==c?(eg=e,e=r=x(n)):(em=e,e=c)):(em=e,e=c)}else em=e,e=c;return eE[i]={nextPos:em,result:e},e}function eD(){var e,r,n,o,i=49*em+17,a=eE[i];if(a)return em=a.nextPos,a.result;if(e=em,39===t.charCodeAt(em)?(r="'",em++):(r=c,0===e_&&ek(k)),r!==c){for(n=[],o=eF();o!==c;)n.push(o),o=eF();n!==c?(39===t.charCodeAt(em)?(o="'",em++):(o=c,0===e_&&ek(k)),o!==c?(eg=e,e=r=x(n)):(em=e,e=c)):(em=e,e=c)}else em=e,e=c;return eE[i]={nextPos:em,result:e},e}function eL(){var e,r,n,o=49*em+18,i=eE[o];return i?(em=i.nextPos,i.result):((e=e3())===c&&(e=em,r=em,e_++,34===t.charCodeAt(em)?(n='"',em++):(n=c,0===e_&&ek(A)),e_--,n===c?r=p:(em=r,r=c),r!==c?(t.length>em?(n=t.charAt(em),em++):(n=c,0===e_&&ek(d)),n!==c?(eg=e,e=r=O(n)):(em=e,e=c)):(em=e,e=c)),eE[o]={nextPos:em,result:e},e)}function eF(){var e,r,n,o=49*em+19,i=eE[o];return i?(em=i.nextPos,i.result):(e=em,r=em,e_++,39===t.charCodeAt(em)?(n="'",em++):(n=c,0===e_&&ek(k)),e_--,n===c?r=p:(em=r,r=c),r!==c?(t.length>em?(n=t.charAt(em),em++):(n=c,0===e_&&ek(d)),n!==c?(eg=e,e=r=O(n)):(em=e,e=c)):(em=e,e=c),eE[o]={nextPos:em,result:e},e)}function eq(){var e,r,n,o=49*em+20,i=eE[o];return i?(em=i.nextPos,i.result):((e=e3())===c&&(e=function(){var e,r,n,o,i=49*em+21,a=eE[i];if(a)return em=a.nextPos,a.result;if(e=em,92===t.charCodeAt(em)?(r="\\",em++):(r=c,0===e_&&ek(P)),r!==c)if(eY()!==c){for(n=[],o=eZ();o!==c;)n.push(o),o=eZ();n!==c?(eg=e,e=r=""):(em=e,e=c)}else em=e,e=c;else em=e,e=c;return eE[i]={nextPos:em,result:e},e}())===c&&(e=em,r=em,e_++,'"""'===t.substr(em,3)?(n='"""',em+=3):(n=c,0===e_&&ek(E)),e_--,n===c?r=p:(em=r,r=c),r!==c?(t.length>em?(n=t.charAt(em),em++):(n=c,0===e_&&ek(d)),n!==c?(eg=e,e=r=n):(em=e,e=c)):(em=e,e=c)),eE[o]={nextPos:em,result:e},e)}function eV(){var e,r,n,o=49*em+22,i=eE[o];return i?(em=i.nextPos,i.result):(e=em,r=em,e_++,"'''"===t.substr(em,3)?(n="'''",em+=3):(n=c,0===e_&&ek(T)),e_--,n===c?r=p:(em=r,r=c),r!==c?(t.length>em?(n=t.charAt(em),em++):(n=c,0===e_&&ek(d)),n!==c?(eg=e,e=r=O(n)):(em=e,e=c)):(em=e,e=c),eE[o]={nextPos:em,result:e},e)}function e$(){var e,r,n,o,i,a,s=49*em+24,u=eE[s];return u?(em=u.nextPos,u.result):(e=em,43===t.charCodeAt(em)?(r="+",em++):(r=c,0===e_&&ek(I)),r===c&&(r=null),r!==c?(n=em,(o=e4())!==c?(46===t.charCodeAt(em)?(i=".",em++):(i=c,0===e_&&ek(v)),i!==c&&(a=e4())!==c?n=o=[o,i,a]:(em=n,n=c)):(em=n,n=c),n!==c?(eg=e,e=r=C(n)):(em=e,e=c)):(em=e,e=c),e===c&&(e=em,45===t.charCodeAt(em)?(r="-",em++):(r=c,0===e_&&ek(R)
2),r!==c?(n=em,(o=e4())!==c?(46===t.charCodeAt(em)?(i=".",em++):(i=c,0===e_&&ek(v)),i!==c&&(a=e4())!==c?n=o=[o,i,a]:(em=n,n=c)):(em=n,n=c),n!==c?(eg=e,e=r=U(n)):(em=e,e=c)):(em=e,e=c)),eE[s]={nextPos:em,result:e},e)}function ez(){var e,r,n,o,i,a=49*em+26,s=eE[a];if(s)return em=s.nextPos,s.result;if(e=em,43===t.charCodeAt(em)?(r="+",em++):(r=c,0===e_&&ek(I)),r===c&&(r=null),r!==c){if(n=[],(o=e2())!==c)for(;o!==c;)n.push(o),o=e2();else n=c;n!==c?(o=em,e_++,46===t.charCodeAt(em)?(i=".",em++):(i=c,0===e_&&ek(v)),e_--,i===c?o=p:(em=o,o=c),o!==c?(eg=e,e=r=C(n)):(em=e,e=c)):(em=e,e=c)}else em=e,e=c;if(e===c)if(e=em,45===t.charCodeAt(em)?(r="-",em++):(r=c,0===e_&&ek(R)),r!==c){if(n=[],(o=e2())!==c)for(;o!==c;)n.push(o),o=e2();else n=c;n!==c?(o=em,e_++,46===t.charCodeAt(em)?(i=".",em++):(i=c,0===e_&&ek(v)),e_--,i===c?o=p:(em=o,o=c),o!==c?(eg=e,e=r=U(n)):(em=e,e=c)):(em=e,e=c)}else em=e,e=c;return eE[a]={nextPos:em,result:e},e}function eH(){var e,t,r,n,o,i=49*em+29,a=eE[i];if(a)return em=a.nextPos,a.result;for(e=em,t=[],r=eK();r!==c;)t.push(r),r=eK();if(t!==c)if((r=eN())!==c){for(n=[],o=eK();o!==c;)n.push(o),o=eK();n!==c?(eg=e,e=t=F(r)):(em=e,e=c)}else em=e,e=c;else em=e,e=c;return eE[i]={nextPos:em,result:e},e}function eG(){var e,r,n,o,i,a,s,u=49*em+30,l=eE[u];if(l)return em=l.nextPos,l.result;for(e=em,r=[],n=eK();n!==c;)r.push(n),n=eK();if(r!==c)if((n=eN())!==c){for(o=[],i=eK();i!==c;)o.push(i),i=eK();if(o!==c)if(44===t.charCodeAt(em)?(i=",",em++):(i=c,0===e_&&ek(q)),i!==c){for(a=[],s=eK();s!==c;)a.push(s),s=eK();a!==c?(eg=e,e=r=F(n)):(em=e,e=c)}else em=e,e=c;else em=e,e=c}else em=e,e=c;else em=e,e=c;return eE[u]={nextPos:em,result:e},e}function eK(){var e,t=49*em+31,r=eE[t];return r?(em=r.nextPos,r.result):((e=eJ())===c&&(e=eY())===c&&(e=eB()),eE[t]={nextPos:em,result:e},e)}function eW(){var e,r,n,o,i,a,s,u,l,f,p,d=49*em+33,h=eE[d];if(h)return em=h.nextPos,h.result;for(e=em,r=[],n=eJ();n!==c;)r.push(n),n=eJ();if(r!==c)if((n=eR())!==c){for(o=[],i=eJ();i!==c;)o.push(i),i=eJ();if(o!==c)if(61===t.charCodeAt(em)?(i="=",em++):(i=c,0===e_&&ek(w)),i!==c){for(a=[],s=eJ();s!==c;)a.push(s),s=eJ();if(a!==c)if((s=eN())!==c){for(u=[],l=eJ();l!==c;)u.push(l),l=eJ();if(u!==c)if(44===t.charCodeAt(em)?(l=",",em++):(l=c,0===e_&&ek(q)),l!==c){for(f=[],p=eJ();p!==c;)f.push(p),p=eJ();f!==c?(eg=e,e=r=z(n,s)):(em=e,e=c)}else em=e,e=c;else em=e,e=c}else em=e,e=c;else em=e,e=c}else em=e,e=c;else em=e,e=c}else em=e,e=c;else em=e,e=c;if(e===c){for(e=em,r=[],n=eJ();n!==c;)r.push(n),n=eJ();if(r!==c)if((n=eR())!==c){for(o=[],i=eJ();i!==c;)o.push(i),i=eJ();if(o!==c)if(61===t.charCodeAt(em)?(i="=",em++):(i=c,0===e_&&ek(w)),i!==c){for(a=[],s=eJ();s!==c;)a.push(s),s=eJ();a!==c&&(s=eN())!==c?(eg=e,e=r=z(n,s)):(em=e,e=c)}else em=e,e=c;else em=e,e=c}else em=e,e=c;else em=e,e=c}return eE[d]={nextPos:em,result:e},e}function eX(){var e,r,n,o=49*em+34,i=eE[o];return i?(em=i.nextPos,i.result):(e=em,46===t.charCodeAt(em)?(r=".",em++):(r=c,0===e_&&ek(v)),r!==c&&(n=e4())!==c?(eg=e,e=r="."+n):(em=e,e=c),eE[o]={nextPos:em,result:e},e)}function eQ(){var e,r,n,o,i,a,s,u,l,f,p,d,h=49*em+35,y=eE[h];return y?(em=y.nextPos,y.result):(e=em,r=em,(n=e2())!==c&&(o=e2())!==c&&(i=e2())!==c&&(a=e2())!==c?(45===t.charCodeAt(em)?(s="-",em++):(s=c,0===e_&&ek(R)),s!==c&&(u=e2())!==c&&(l=e2())!==c?(45===t.charCodeAt(em)?(f="-",em++):(f=c,0===e_&&ek(R)),f!==c&&(p=e2())!==c&&(d=e2())!==c?r=n=[n,o,i,a,s,u,l,f,p,d]:(em=r,r=c)):(em=r,r=c)):(em=r,r=c),r!==c&&(eg=e,r=r.join("")),e=r,eE[h]={nextPos:em,result:e},e)}function eJ(){var e,r=49*em+39,n=eE[r];return n?(em=n.nextPos,n.result):(X.test(t.charAt(em))?(e=t.charAt(em),em++):(e=c,0===e_&&ek(Q)),eE[r]={nextPos:em,result:e},e)}function eY(){var e,r,n,o=49*em+40,i=eE[o];return i?(em=i.nextPos,i.result):(10===t.charCodeAt(em)?(e="\n",em++):(e=c,0===e_&&ek(J)),e===c&&(e=em,13===t.charCodeAt(em)?(r="\r",em++):(r=c,0===e_&&ek(Y)),r!==c?(10===t.charCodeAt(em)?(n="\n",em++):(n=c,0===e_&&ek(J)),n!==c?e=r=[r,n]:(em=e,e=c)):(em=e,e=c)),eE[o]={nextPos:em,result:e},e)}function eZ(){var e,t=49*em+41,r=eE[t];return r?(em=r.nextPos,r.result):((e=eY())===c&&(e=eJ()),eE[t]={nextPos:em,result:e},e)}function e0(){var e,r,n=49*em+42,o=eE[n];return o?(em=o.nextPos,o.result):(e=em,e_++,t.length>em?(r=t.charAt(em),em++):(r=c,0===e_&&ek(d)),e_--,r===c?e=p:(em=e,e=c),eE[n]={nextPos:em,result:e},e)}function e1(){var e,r=49*em+43,n=eE[r];return n?(em=n.nextPos,n.result):(Z.test(t.charAt(em))?(e=t.charAt(em),em++):(e=c,0===e_&&ek(ee)),eE[r]={nextPos:em,result:e},e)}function e2(){var e,r,n=49*em+44,o=eE[n];return o?(em=o.nextPos,o.result):(et.test(t.charAt(em))?(e=t.charAt(em),em++):(e=c,0===e_&&ek(er)),e===c&&(e=em,95===t.charCodeAt(em)?(r="_",em++):(r=c,0===e_&&ek(en)),r!==c&&(eg=e,r=""),e=r),eE[n]={nextPos:em,result:e},e)}function e6(){var e,r=49*em+45,n=eE[r];return n?(em=n.nextPos,n.result):(eo.test(t.charAt(em))?(e=t.charAt(em),em++):(e=c,0===e_&&ek(ei)),eE[r]={nextPos:em,result:e},e)}function e4(){var e,t,r,n=49*em+46,o=eE[n];if(o)return em=o.nextPos,o.result;if(e=em,t=[],(r=e2())!==c)for(;r!==c;)t.push(r),r=e2();else t=c;return t!==c&&(eg=e,t=t.join("")),e=t,eE[n]={nextPos:em,result:e},e}function e3(){var e,r,n,o,i,a,s,u,l,f,p,d,h,y,m,g=49*em+47,b=eE[g];return b?(em=b.nextPos,b.result):(y=em,'\\"'===t.substr(em,2)?(m='\\"',em+=2):(m=c,0===e_&&ek(ea)),m!==c&&(eg=y,m='"'),(y=m)===c&&(y=em,"\\\\"===t.substr(em,2)?(m="\\\\",em+=2):(m=c,0===e_&&ek(es)),m!==c&&(eg=y,m="\\"),(y=m)===c&&(y=em,"\\b"===t.substr(em,2)?(m="\\b",em+=2):(m=c,0===e_&&ek(ec)),m!==c&&(eg=y,m="\b"),(y=m)===c&&(y=em,"\\t"===t.substr(em,2)?(m="\\t",em+=2):(m=c,0===e_&&ek(eu)),m!==c&&(eg=y,m="	"),(y=m)===c&&(y=em,"\\n"===t.substr(em,2)?(m="\\n",em+=2):(m=c,0===e_&&ek(el)),m!==c&&(eg=y,m="\n"),(y=m)===c&&(y=em,"\\f"===t.substr(em,2)?(m="\\f",em+=2):(m=c,0===e_&&ek(ef)),m!==c&&(eg=y,m="\f"),(y=m)===c&&(y=em,"\\r"===t.substr(em,2)?(m="\\r",em+=2):(m=c,0===e_&&ek(ep)),m!==c&&(eg=y,m="\r"),(y=m)===c&&(y=(h=eE[d=49*em+48])?(em=h.nextPos,h.result):(e=em,"\\U"===t.substr(em,2)?(r="\\U",em+=2):(r=c,0===e_&&ek(ed)),r!==c?(n=em,(o=e1())!==c&&(i=e1())!==c&&(a=e1())!==c&&(s=e1())!==c&&(u=e1())!==c&&(l=e1())!==c&&(f=e1())!==c&&(p=e1())!==c?n=o=[o,i,a,s,u,l,f,p]:(em=n,n=c),n!==c?(eg=e,e=r=eh(n)):(em=e,e=c)):(em=e,e=c),e===c&&(e=em,"\\u"===t.substr(em,2)?(r="\\u",em+=2):(r=c,0===e_&&ek(ey)),r!==c?(n=em,(o=e1())!==c&&(i=e1())!==c&&(a=e1())!==c&&(s=e1())!==c?n=o=[o,i,a,s]:(em=n,n=c),n!==c?(eg=e,e=r=eh(n)):(em=e,e=c)):(em=e,e=c)),eE[d]={nextPos:em,result:e},e)))))))),eE[g]={nextPos:em,result:y},y)}var e5=[];function e8(e){e5.push(e)}function e9(e,t,r,n,o){var i={type:e,value:t,line:r(),column:n()};return o&&(i.key=o),i}if((a=l())!==c&&em===t.length)return a;throw a!==c&&em<t.length&&ek({type:"end",description:"end of input"}),r=eS,o=eT(n=ew),i=n<t.length?t.charAt(n):null,null!==r&&function(e){var t=1;for(e.sort(function(e,t){return e.description<t.description?-1:+(e.description>
2t.description)});t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}(r),new e(function(e,t){var r,n=Array(e.length);for(r=0;r<e.length;r++)n[r]=e[r].description;return"Expected "+(e.length>1?n.slice(0,-1).join(", ")+" or "+n[e.length-1]:n[0])+" but "+(t?'"'+function(e){function t(e){return e.charCodeAt(0).toString(16).toUpperCase()}return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(e){return"\\x0"+t(e)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(e){return"\\x"+t(e)}).replace(/[\u0180-\u0FFF]/g,function(e){return"\\u0"+t(e)}).replace(/[\u1080-\uFFFF]/g,function(e){return"\\u"+t(e)})}(t)+'"':"end of input")+" found."}(r,i),r,i,n,o.line,o.column)}}}()},5680:(e,t,r)=>{"use strict";var n=r(5767);e.exports=function(e){return!!n(e)}},5767:(e,t,r)=>{"use strict";var n=r(2682),o=r(9209),i=r(487),a=r(6556),s=r(5795),c=r(3628),u=a("Object.prototype.toString"),l=r(9092)(),f="u"<typeof globalThis?r.g:globalThis,p=o(),d=a("String.prototype.slice"),h=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},y={__proto__:null};n(p,l&&s&&c?function(e){var t=new f[e];
2if(Symbol.toStringTag in t&&c){var r=c(t),n=s(r,Symbol.toStringTag);!n&&r&&(n=s(c(r),Symbol.toStringTag)),y["$"+e]=i(n.get)}}:function(e){var t=new f[e],r=t.slice||t.set;r&&(y["$"+e]=i(r))}),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l){var t,r,o=d(u(e),8,-1);return h(p,o)>-1?o:"Object"===o&&(r=!1,n(y,function(t,n){if(!r)try{t(e),r=d(n,1)}catch(e){}}),r)}return s?(t=!1,n(y,function(r,n){if(!t)try{"$"+r(e)===n&&(t=d(n,1))}catch(e){}}),t):null}},5795:(e,t,r)=>{"use strict";var n=r(6549);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},5880:e=>{"use strict";e.exports=Math.pow},5896:e=>{"use strict";function t(e,t){o(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var a=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.default.nextTick(o,this,e)):n.default.nextTick(o,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!i&&e?a._writableState?a._writableState.errorEmitted?n.default.nextTick(r,a):(a._writableState.errorEmitted=!0,n.default.nextTick(t,a,e)):n.default.nextTick(t,a,e):i?(n.default.nextTick(r,a),i(e)):n.default.nextTick(r,a)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},5976:(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})(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,function(e){var t=function(e,t){if("object"!=n(e)||!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 TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==n(t)?t:t+""}(o.key),o)}}function i(e){var t="function"==typeof Map?new Map:void 0;return(i=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw 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,r)}function r(){return function(e,t,r){if(a())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&s(o,r.prototype),o}(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)})(e)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,{Cu:()=>R,v7:()=>S,nS:()=>k,Dr:()=>u,m_:()=>y});var u=function(e){var t,r;function i(e,t){if(!(this instanceof i))throw TypeError("Cannot call a class as a function");var r,o,s,u=(this instanceof i?this.constructor:void 0).prototype;return(r=i,o=[e],r=c(r),s=function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,a()?Reflect.construct(r,o||[],c(this).constructor):r.apply(this,o))).__proto__=u,s.constructor=i,s.response=t,s}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&s(e,t)}(i,e),t=[{key:"getResponse",value:function(){return this.response}}],o(i.prototype,t),r&&o(i,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(i(Error));function l(e){return(l="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 f(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,function(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=l(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==l(t)?t:t+""}(n.key),n)}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}
2function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,r;function n(e,t){if(!(this instanceof n))throw TypeError("Cannot call a class as a function");var r,o,i,a=(this instanceof n?this.constructor:void 0).prototype;return(r=n,o=[e,t],r=d(r),i=function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,p()?Reflect.construct(r,o||[],d(this).constructor):r.apply(this,o))).__proto__=a,i.constructor=n,i.name="NotFoundError",i}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&h(e,t)}(n,e),t&&f(n.prototype,t),r&&f(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(u);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})(e)}function g(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,function(e){var t=function(e,t){if("object"!=m(e)||!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 TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==m(t)?t:t+""}(n.key),n)}}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var S=function(e){var t,r;function n(e,t){if(!(this instanceof n))throw TypeError("Cannot call a class as a function");var r,o,i,a=(this instanceof n?this.constructor:void 0).prototype;return(r=n,o=[e,t],r=v(r),i=function(e,t){if(t&&("object"==m(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,b()?Reflect.construct(r,o||[],v(this).constructor):r.apply(this,o))).__proto__=a,i.constructor=n,i.name="BadRequestError",i}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&w(e,t)}(n,e),t&&g(n.prototype,t),r&&g(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(u);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 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,function(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 TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==_(t)?t:t+""}(n.key),n)}}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function T(e,t){return(T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var k=function(e){var t,r;function n(e,t){if(!(this instanceof n))throw TypeError("Cannot call a class as a function");var r,o,i,a=(this instanceof n?this.constructor:void 0).prototype;return(r=n,o=[e,t],r=A(r),i=function(e,t){if(t&&("object"==_(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,x()?Reflect.construct(r,o||[],A(this).constructor):r.apply(this,o))).__proto__=a,i.constructor=n,i.name="BadResponseError",i}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&T(e,t)}(n,e),t&&E(n.prototype,t),r&&E(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(u);function O(e){return(O="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 P(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,function(e){var t=function(e,t){if("object"!=O(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=O(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==O(t)?t:t+""}(n.key),n)}}function B(e){var t="function"==typeof Map?new Map:void 0;return(B=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw 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,r)}function r(){return function(e,t,r){if(j())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&I(o,r.prototype),o}(e,arguments,C(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),I(r,e)})(e)}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}
2function I(e,t){return(I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e){var t,r;function n(e,t,r){if(!(this instanceof n))throw TypeError("Cannot call a class as a function");var o,i,a,s=(this instanceof n?this.constructor:void 0).prototype;return(o=n,i=[e],o=C(o),a=function(e,t){if(t&&("object"==O(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,j()?Reflect.construct(o,i||[],C(this).constructor):o.apply(this,i))).__proto__=s,a.constructor=n,a.name="AccountRequiresMemoError",a.accountId=t,a.operationIndex=r,a}return function(e,t){if("function"!=typeof t&&null!==t)throw 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)}(n,e),t&&P(n.prototype,t),r&&P(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(B(Error))},6048:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var o=function(e){function t(t,n,o){return e.call(this,"string"==typeof r?r:r(t,n,o))||this}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,t}(n);o.prototype.name=n.name,o.prototype.code=e,t[e]=o}function n(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))}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){if("string"==typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(o="must not be",t=t.replace(/^not /,"")):o="must be",c=" argument",(void 0===u||u>e.length)&&(u=e.length),e.substring(u-c.length,u)===c)s="The ".concat(e," ").concat(o," ").concat(n(t,"type"));else{var o,i,a,s,c,u,l,f=("number"!=typeof l&&(l=0),l+1>e.length||-1===e.indexOf(".",l))?"argument":"property";s='The "'.concat(e,'" ').concat(f," ").concat(o," ").concat(n(t,"type"))}return s+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},6121:(t,r,o)=>{"use strict";let i,a;o.r(r),o.d(r,{axiosClient:()=>tu,create:()=>tl});var s,c,u,l,f,p,d,h,y={};function m(e,t){return function(){return e.apply(t,arguments)}}o.r(y),o.d(y,{hasBrowserEnv:()=>eb,hasStandardBrowserEnv:()=>ew,hasStandardBrowserWebWorkerEnv:()=>eS,navigator:()=>ev,origin:()=>e_});let{toString:g}=Object.prototype,{getPrototypeOf:b}=Object,{iterator:v,toStringTag:w}=Symbol,S=(s=Object.create(null),e=>{let t=g.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())}),_=e=>(e=e.toLowerCase(),t=>S(t)===e),E=e=>t=>typeof t===e,{isArray:x}=Array,A=E("undefined");function T(e){return null!==e&&!A(e)&&null!==e.constructor&&!A(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let k=_("ArrayBuffer"),O=E("string"),P=E("function"),B=E("number"),j=e=>null!==e&&"object"==typeof e,I=e=>{if("object"!==S(e))return!1;let t=b(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||w in e||v in e)},C=_("Date"),R=_("File"),U=_("Blob"),N=_("FileList"),M=_("URLSearchParams"),[D,L,F,q]=["ReadableStream","Request","Response","Headers"].map(_);function V(e,t,{allOwnKeys:r=!1}={}){let n,o;
2if(null!=e)if("object"!=typeof e&&(e=[e]),x(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{let o;if(T(e))return;let i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;for(n=0;n<a;n++)o=i[n],t.call(null,e[o],o,e)}}function $(e,t){if(T(e))return null;t=t.toLowerCase();let r=Object.keys(e),n,o=r.length;for(;o-- >0;)if(t===(n=r[o]).toLowerCase())return n;return null}let z="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g,H=e=>!A(e)&&e!==z,G=(c="u">typeof Uint8Array&&b(Uint8Array),e=>c&&e instanceof c),K=_("HTMLFormElement"),W=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),X=_("RegExp"),Q=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};V(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)},J=_("AsyncFunction"),Y=(u="function"==typeof setImmediate,l=P(z.postMessage),u?setImmediate:l?(f=`axios@${Math.random()}`,p=[],z.addEventListener("message",({source:e,data:t})=>{e===z&&t===f&&p.length&&p.shift()()},!1),e=>{p.push(e),z.postMessage(f,"*")}):e=>setTimeout(e)),Z="u">typeof queueMicrotask?queueMicrotask.bind(z):void 0!==n.default&&n.default.nextTick||Y,ee={isArray:x,isArrayBuffer:k,isBuffer:T,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||P(e.append)&&("formdata"===(t=S(e))||"object"===t&&P(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&k(e.buffer)},isString:O,isNumber:B,isBoolean:e=>!0===e||!1===e,isObject:j,isPlainObject:I,isEmptyObject:e=>{if(!j(e)||T(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:D,isRequest:L,isResponse:F,isHeaders:q,isUndefined:A,isDate:C,isFile:R,isBlob:U,isRegExp:X,isFunction:P,isStream:e=>j(e)&&P(e.pipe),isURLSearchParams:M,isTypedArray:G,isFileList:N,forEach:V,merge:function e(){let{caseless:t}=H(this)&&this||{},r={},n=(n,o)=>{let i=t&&$(r,o)||o;I(r[i])&&I(n)?r[i]=e(r[i],n):I(n)?r[i]=e({},n):x(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&V(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(V(t,(t,n)=>{r&&P(t)?e[n]=m(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&b(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype)return t},kindOf:S,kindOfTest:_,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(x(e))return e;let t=e.length;if(!B(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r,n=(e&&e[v]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:K,hasOwnProperty:W,hasOwnProp:W,reduceDescriptors:Q,freezeMethods:e=>{Q(e,(t,r)=>{if(P(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;P(e[r])&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{let r={};return(x(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:$,global:z,isContextDefined:H,isSpecCompliantForm:function(e){return!!(e&&P(e.append)&&"FormData"===e[w]&&e[v])},toJSONObject:e=>{let t=Array(10),r=(e,n)=>{if(j(e)){if(t.indexOf(e)>=0)return;if(T(e))return e;if(!("toJSON"in e)){t[n]=e;let o=x(e)?[]:{};return V(e,(e,t)=>{let i=r(e,n+1);A(i)||(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:J,isThenable:e=>e&&(j(e)||P(e))&&P(e.then)&&P(e.catch),setImmediate:Y,asap:Z,isIterable:e=>null!=e&&P(e[v])};function et(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}ee.inherits(et,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ee.toJSONObject(this.config),code:this.code,status:this.status}}});let er=et.prototype,en={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","E
2RR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{en[e]={value:e}}),Object.defineProperties(et,en),Object.defineProperty(er,"isAxiosError",{value:!0}),et.from=(e,t,r,n,o,i)=>{let a=Object.create(er);return ee.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),et.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var eo=o(8287).Buffer;function ei(e){return ee.isPlainObject(e)||ee.isArray(e)}function ea(e){return ee.endsWith(e,"[]")?e.slice(0,-2):e}function es(e,t,r){return e?e.concat(t).map(function(e,t){return e=ea(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}let ec=ee.toFlatObject(ee,{},null,function(e){return/^is[A-Z]/.test(e)}),eu=function(e,t,r){if(!ee.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=ee.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ee.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"u">typeof Blob&&Blob)&&ee.isSpecCompliantForm(t);if(!ee.isFunction(o))throw TypeError("visitor must be a function");function c(e){if(null===e)return"";if(ee.isDate(e))return e.toISOString();if(ee.isBoolean(e))return e.toString();if(!s&&ee.isBlob(e))throw new et("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(e)||ee.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):eo.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(ee.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else{var u;if(ee.isArray(e)&&(u=e,ee.isArray(u)&&!u.some(ei))||(ee.isFileList(e)||ee.endsWith(r,"[]"))&&(s=ee.toArray(e)))return r=ea(r),s.forEach(function(e,n){ee.isUndefined(e)||null===e||t.append(!0===a?es([r],n,i):null===a?r:r+"[]",c(e))}),!1}return!!ei(e)||(t.append(es(o,r,i),c(e)),!1)}let l=[],f=Object.assign(ec,{defaultVisitor:u,convertValue:c,isVisitable:ei});if(!ee.isObject(e))throw TypeError("data must be an object");return function e(r,n){if(!ee.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ee.forEach(r,function(r,i){!0===(!(ee.isUndefined(r)||null===r)&&o.call(t,r,ee.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])}),l.pop()}}(e),t};function el(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ef(e,t){this._pairs=[],e&&eu(e,this,t)}let ep=ef.prototype;function ed(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eh(e,t,r){let n;if(!t)return e;let o=r&&r.encode||ed;ee.isFunction(r)&&(r={serialize:r});let i=r&&r.serialize;if(n=i?i(t,r):ee.isURLSearchParams(t)?t.toString():new ef(t,r).toString(o)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}ep.append=function(e,t){this._pairs.push([e,t])},ep.toString=function(e){let t=e?function(t){return e.call(this,t,el)}:el;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let ey=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ee.forEach(this.handlers,function(t){null!==t&&e(t)})}},em={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eg={isBrowser:!0,classes:{URLSearchParams:"u">typeof URLSearchParams?URLSearchParams:ef,FormData:"u">typeof FormData?FormData:null,Blob:"u">typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},eb="u">typeof window&&"u">typeof document,ev="object"==typeof navigator&&navigator||void 0,ew=eb&&(!ev||0>["ReactNative","NativeScript","NS"].indexOf(ev.product)),eS="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,e_=eb&&window.location.href||"http://localhost",eE={...y,...eg},ex=function(e){if(ee.isFormData(e)&&ee.isFunction(e.entries)){let t={};return ee.forEachEntry(e,(e,r)=>{!function e(t,r,n,o){let i=t[o++];if("__proto__"===i)return!0;let a=Number.isFinite(+i),s=o>=t.length;return(i=!i&&ee.isArray(n)?n.length:i,s)?ee.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r:(n[i]&&ee.isObject(n[i])||(n[i]=[]),e(t,r,n[i],o)&&ee.isArray(n[i])&&(n[i]=function(e){let t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)n[r=o[t]]=e[r];return n}(n[i]))),!a}(ee.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),r,t,0)}),t}return null},eA={transitional:em,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",o=n.indexOf("application/json")>-1,i=ee.isObject(e);
2if(i&&ee.isHTMLForm(e)&&(e=new FormData(e)),ee.isFormData(e))return o?JSON.stringify(ex(e)):e;if(ee.isArrayBuffer(e)||ee.isBuffer(e)||ee.isStream(e)||ee.isFile(e)||ee.isBlob(e)||ee.isReadableStream(e))return e;if(ee.isArrayBufferView(e))return e.buffer;if(ee.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1){var a,s;return(a=e,s=this.formSerializer,eu(a,new eE.classes.URLSearchParams,{visitor:function(e,t,r,n){return eE.isNode&&ee.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...s})).toString()}if((r=ee.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return eu(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e){if(ee.isString(e))try{return(0,JSON.parse)(e),ee.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){let t=this.transitional||eA.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ee.isResponse(e)||ee.isReadableStream(e))return e;if(e&&ee.isString(e)&&(r&&!this.responseType||n)){let r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw et.from(e,et.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eE.classes.FormData,Blob:eE.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],e=>{eA.headers[e]={}});let eT=ee.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ek=Symbol("internals");function eO(e){return e&&String(e).trim().toLowerCase()}function eP(e){return!1===e||null==e?e:ee.isArray(e)?e.map(eP):String(e)}function eB(e,t,r,n,o){return ee.isFunction(n)?n.call(this,t,r):(o&&(t=r),ee.isString(t)?ee.isString(n)?-1!==t.indexOf(n):ee.isRegExp(n)?n.test(t):void 0:void 0)}class ej{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function o(e,t,r){let o=eO(t);if(!o)throw Error("header name must be a non-empty string");let i=ee.findKey(n,o);i&&void 0!==n[i]&&!0!==r&&(void 0!==r||!1===n[i])||(n[i||t]=eP(e))}let i=(e,t)=>ee.forEach(e,(e,r)=>o(e,r,t));if(ee.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(ee.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())){var a;let r,n,o,s;i((s={},(a=e)&&a.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||s[r]&&eT[r]||("set-cookie"===r?s[r]?s[r].push(n):s[r]=[n]:s[r]=s[r]?s[r]+", "+n:n)}),s),t)}else if(ee.isObject(e)&&ee.isIterable(e)){let r,n,o={};for(let t of e){if(!ee.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?ee.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=eO(e)){let r=ee.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
2for(;t=n.exec(e);)r[t[1]]=t[2];return r}if(ee.isFunction(t))return t.call(this,e,r);if(ee.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=eO(e)){let r=ee.findKey(this,e);return!(!r||void 0===this[r]||t&&!eB(0,this[r],r,t))}return!1}delete(e,t){let r=this,n=!1;function o(e){if(e=eO(e)){let o=ee.findKey(r,e);o&&(!t||eB(0,r[o],o,t))&&(delete r[o],n=!0)}}return ee.isArray(e)?e.forEach(o):o(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let o=t[r];e&&!eB(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){let t=this,r={};return ee.forEach(this,(n,o)=>{let i=ee.findKey(r,o);if(i)return t[i]=eP(n),void delete t[o];let a=e?o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(o).trim();a!==o&&delete t[o],t[a]=eP(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return ee.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&ee.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[ek]=this[ek]={accessors:{}}).accessors,r=this.prototype;function n(e){let n,o=eO(e);t[o]||(n=ee.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(r,t+n,{value:function(r,n,o){return this[t].call(this,e,r,n,o)},configurable:!0})}),t[o]=!0)}return ee.isArray(e)?e.forEach(n):n(e),this}}function eI(e,t){let r=this||eA,n=t||r,o=ej.from(n.headers),i=n.data;return ee.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function eC(e){return!(!e||!e.__CANCEL__)}function eR(e,t,r){et.call(this,null==e?"canceled":e,et.ERR_CANCELED,t,r),this.name="CanceledError"}function eU(e,t,r){let n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new et("Request failed with status code "+r.status,[et.ERR_BAD_REQUEST,et.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}ej.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ee.reduceDescriptors(ej.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),ee.freezeMethods(ej),ee.inherits(eR,et,{__CANCEL__:!0});let eN=function(e,t){let r=Array(e=e||10),n=Array(e),o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){let c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),c-o<t)return;let p=u&&c-u;return p?Math.round(1e3*f/p):void 0}},eM=function(e,t){let r,n,o=0,i=1e3/t,a=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout(()=>{n=null,a(r)},i-s)))},()=>r&&a(r)]},eD=(e,t,r=3)=>{let n=0,o=eN(50,250);return eM(r=>{let i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i,e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})},r)},eL=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},eF=e=>(...t)=>ee.asap(()=>e(...t)),eq=eE.hasStandardBrowserEnv?(i=new URL(eE.origin),a=eE.navigator&&/(msie|trident)/i.test(eE.navigator.userAgent),e=>(e=new URL(e,eE.origin),i.protocol===e.protocol&&i.host===e.host&&(a||i.port===e.port))):()=>!0,eV=eE.hasStandardBrowserEnv?{write(e,t,r,n,o,i){let a=[e+"="+encodeURIComponent(t)];ee.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),ee.isString(n)&&a.push("path="+n),ee.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function e$(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let ez=e=>e instanceof ej?{...e}:e;function eH(e,t){t=t||{};let r={};function n(e,t,r,n){return ee.isPlainObject(e)&&ee.isPlainObject(t)?ee.merge.call({caseless:n},e,t):ee.isPlainObject(t)?ee.merge({},t):ee.isArray(t)?t.slice():t}function o(e,t,r,o){return ee.isUndefined(t)?ee.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!ee.isUndefined(t))return n(void 0,t)}function a(e,t){return ee.isUndefined(t)?ee.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}let c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBo
2dyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(ez(e),ez(t),0,!0)};return ee.forEach(Object.keys({...e,...t}),function(n){let i=c[n]||o,a=i(e[n],t[n],n);ee.isUndefined(a)&&i!==s||(r[n]=a)}),r}let eG=e=>{let t=eH({},e),r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:c}=t;if(t.headers=s=ej.from(s),t.url=eh(e$(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),ee.isFormData(n)){if(eE.hasStandardBrowserEnv||eE.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(r=s.getContentType())){let[e,...t]=r?r.split(";").map(e=>e.trim()).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}}if(eE.hasStandardBrowserEnv&&(o&&ee.isFunction(o)&&(o=o(t)),o||!1!==o&&eq(t.url))){let e=i&&a&&eV.read(a);e&&s.set(i,e)}return t},eK="u">typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var n;let o,i=eG(e),a=i.data,s=ej.from(i.headers).normalize(),c,u,l,f,p,{responseType:d,onUploadProgress:h,onDownloadProgress:y}=i;function m(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;function b(){if(!g)return;let n=ej.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());eU(function(e){t(e),m()},function(e){r(e),m()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout,"onloadend"in g?g.onloadend=b:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(b)},g.onabort=function(){g&&(r(new et("Request aborted",et.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new et("Network Error",et.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",n=i.transitional||em;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),r(new et(t,n.clarifyTimeoutError?et.ETIMEDOUT:et.ECONNABORTED,e,g)),g=null},void 0===a&&s.setContentType(null),"setRequestHeader"in g&&ee.forEach(s.toJSON(),function(e,t){g.setRequestHeader(t,e)}),ee.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),d&&"json"!==d&&(g.responseType=i.responseType),y&&([l,p]=eD(y,!0),g.addEventListener("progress",l)),h&&g.upload&&([u,f]=eD(h),g.upload.addEventListener("progress",u),g.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(c=t=>{g&&(r(!t||t.type?new eR(null,e,g):t),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));let v=(n=i.url,(o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n))&&o[1]||"");v&&-1===eE.protocols.indexOf(v)?r(new et("Unsupported protocol "+v+":",et.ERR_BAD_REQUEST,e)):g.send(a||null)})},eW=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},eX=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},eQ=(e,t,r,n)=>{let o=async function*(e,t){for await(let r of eX(e))yield*eW(r,t)}(e,t),i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},eJ="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,eY=eJ&&"function"==typeof ReadableStream,eZ=eJ&&("function"==typeof TextEncoder?(d=new TextEncoder,e=>d.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer())),e0=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},e1=eY&&e0(()=>{let e=!1,t=new Request(eE.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),e2=eY&&e0(()=>ee.isReadableStream(new Response("").body)),e6={stream:e2&&(e=>e.body)};eJ&&(h=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e
2=>{e6[e]||(e6[e]=ee.isFunction(h[e])?t=>t[e]():(t,r)=>{throw new et(`Response type '${e}' is not supported`,et.ERR_NOT_SUPPORT,r)})}));let e4=async(e,t)=>{let r=ee.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(ee.isBlob(e))return e.size;if(ee.isSpecCompliantForm(e)){let t=new Request(eE.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ee.isArrayBufferView(e)||ee.isArrayBuffer(e)?e.byteLength:(ee.isURLSearchParams(e)&&(e+=""),ee.isString(e)?(await eZ(e)).byteLength:void 0)})(t):r},e3={http:null,xhr:eK,fetch:eJ&&(async e=>{let t,{url:r,method:n,data:o,signal:i,cancelToken:a,timeout:s,onDownloadProgress:c,onUploadProgress:u,responseType:l,headers:f,withCredentials:p="same-origin",fetchOptions:d}=eG(e);l=l?(l+"").toLowerCase():"text";let h,y=((e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController,o=function(e){if(!r){r=!0,a();let t=e instanceof Error?e:this.reason;n.abort(t instanceof et?t:new eR(t instanceof Error?t.message:t))}},i=t&&setTimeout(()=>{i=null,o(new et(`timeout ${t} of ms exceeded`,et.ETIMEDOUT))},t),a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));let{signal:s}=n;return s.unsubscribe=()=>ee.asap(a),s}})([i,a&&a.toAbortSignal()],s),m=y&&y.unsubscribe&&(()=>{y.unsubscribe()});try{if(u&&e1&&"get"!==n&&"head"!==n&&0!==(t=await e4(f,o))){let e,n=new Request(r,{method:"POST",body:o,duplex:"half"});if(ee.isFormData(o)&&(e=n.headers.get("content-type"))&&f.setContentType(e),n.body){let[e,r]=eL(t,eD(eF(u)));o=eQ(n.body,65536,e,r)}}ee.isString(p)||(p=p?"include":"omit");let i="credentials"in Request.prototype;h=new Request(r,{...d,signal:y,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:o,duplex:"half",credentials:i?p:void 0});let a=await fetch(h,d),s=e2&&("stream"===l||"response"===l);if(e2&&(c||s&&m)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=a[t]});let t=ee.toFiniteNumber(a.headers.get("content-length")),[r,n]=c&&eL(t,eD(eF(c),!0))||[];a=new Response(eQ(a.body,65536,r,()=>{n&&n(),m&&m()}),e)}l=l||"text";let g=await e6[ee.findKey(e6,l)||"text"](a,e);return!s&&m&&m(),await new Promise((t,r)=>{eU(t,r,{data:g,headers:ej.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:h})})}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new et("Network Error",et.ERR_NETWORK,e,h),{cause:t.cause||t});throw et.from(t,t&&t.code,e,h)}})};ee.forEach(e3,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let e5=e=>`- ${e}`,e8=e=>ee.isFunction(e)||null===e||!1===e,e9=e=>{let t,r,{length:n}=e=ee.isArray(e)?e:[e],o={};for(let i=0;i<n;i++){let n;if(r=t=e[i],!e8(t)&&void 0===(r=e3[(n=String(t)).toLowerCase()]))throw new et(`Unknown adapter '${n}'`);if(r)break;o[n||"#"+i]=r}if(!r){let e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new et("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(e5).join("\n"):" "+e5(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function e7(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eR(null,e)}function te(e){return e7(e),e.headers=ej.from(e.headers),e.data=eI.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),e9(e.adapter||eA.adapter)(e).then(function(t){return e7(e),t.data=eI.call(e,e.transformResponse,t),t.headers=ej.from(t.headers),t},function(t){return eC(t)||(e7(e),t&&t.response&&(t.response.data=eI.call(e,e.transformResponse,t.response),t.response.headers=ej.from(t.response.headers))),Promise.reject(t)})}let tt="1.11.0",tr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let tn={};tr.transitional=function(e,t,r){function n(e,t){return"[Axios v"+tt+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new et(n(o," has been removed"+(t?" in "+t:"")),et.ERR_DEPRECATED);return t&&!tn[o]&&(tn[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},tr.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}
2`),!0)};let to=function(e,t,r){if("object"!=typeof e)throw new et("options must be an object",et.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),o=n.length;for(;o-- >0;){let i=n[o],a=t[i];if(a){let t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new et("option "+i+" must be "+r,et.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new et("Unknown option "+i,et.ERR_BAD_OPTION)}};class ti{constructor(e){this.defaults=e||{},this.interceptors={request:new ey,response:new ey}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:n,paramsSerializer:o,headers:i}=t=eH(this.defaults,t);void 0!==n&&to(n,{silentJSONParsing:tr.transitional(tr.boolean),forcedJSONParsing:tr.transitional(tr.boolean),clarifyTimeoutError:tr.transitional(tr.boolean)},!1),null!=o&&(ee.isFunction(o)?t.paramsSerializer={serialize:o}:to(o,{encode:tr.function,serialize:tr.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),to(t,{baseUrl:tr.spelling("baseURL"),withXsrfToken:tr.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&ee.merge(i.common,i[t.method]);i&&ee.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=ej.concat(a,i);let s=[],c=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});let u=[];this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let l,f=0;if(!c){let e=[te.bind(this),void 0];for(e.unshift(...s),e.push(...u),l=e.length,r=Promise.resolve(t);f<l;)r=r.then(e[f++],e[f++]);return r}l=s.length;let p=t;for(f=0;f<l;){let e=s[f++],t=s[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{r=te.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,l=u.length;f<l;)r=r.then(u[f++],u[f++]);return r}getUri(e){return eh(e$((e=eH(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}ee.forEach(["delete","get","head","options"],function(e){ti.prototype[e]=function(t,r){return this.request(eH(r||{},{method:e,url:t,data:(r||{}).data}))}}),ee.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(eH(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ti.prototype[e]=t(),ti.prototype[e+"Form"]=t(!0)});class ta{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new eR(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ta(function(t){e=t}),cancel:e}}}let ts={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
2alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ts).forEach(([e,t])=>{ts[t]=e});let tc=function e(t){let r=new ti(t),n=m(ti.prototype.request,r);return ee.extend(n,ti.prototype,r,{allOwnKeys:!0}),ee.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(eH(t,r))},n}(eA);tc.Axios=ti,tc.CanceledError=eR,tc.CancelToken=ta,tc.isCancel=eC,tc.VERSION=tt,tc.toFormData=eu,tc.AxiosError=et,tc.Cancel=tc.CanceledError,tc.all=function(e){return Promise.all(e)},tc.spread=function(e){return function(t){return e.apply(null,t)}},tc.isAxiosError=function(e){return ee.isObject(e)&&!0===e.isAxiosError},tc.mergeConfig=eH,tc.AxiosHeaders=ej,tc.formToJSON=e=>ex(ee.isHTMLForm(e)?new FormData(e):e),tc.getAdapter=e9,tc.HttpStatusCode=ts,tc.default=tc;var tu=tc,tl=tc.create},6188:e=>{"use strict";e.exports=Math.max},6238:(e,t,r)=>{"use strict";var n=r(6048).F.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),a=i||o,s=!1,i=function(){if(!s){s=!0;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t)}};var a,s,c=r.readable||!1!==r.readable&&t.readable,u=r.writable||!1!==r.writable&&t.writable,l=function(){t.writable||p()},f=t._writableState&&t._writableState.finished,p=function(){u=!1,f=!0,c||i.call(t)},d=t._readableState&&t._readableState.endEmitted,h=function(){c=!1,d=!0,u||i.call(t)},y=function(e){i.call(t,e)},m=function(){var e;return c&&!d?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):u&&!f?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},g=function(){t.req.on("finish",p)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",p),t.on("abort",m),t.req?g():t.on("request",g)):u&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",h),t.on("finish",p),!1!==r.error&&t.on("error",y),t.on("close",m),function(){t.removeListener("complete",p),t.removeListener("abort",m),t.removeListener("request",g),t.req&&t.req.removeListener("finish",p),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",p),t.removeListener("end",h),t.removeListener("error",y),t.removeListener("close",m)}}},6299:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AssembledTransaction:()=>em,Client:()=>e1,DEFAULT_TIMEOUT:()=>d,Err:()=>p,NULL_ACCOUNT:()=>h,Ok:()=>f,SentTransaction:()=>G,Spec:()=>eL,Watcher:()=>K,basicNodeSigner:()=>e_});var n=r(8950),o=r(3496),i=r(4076),a=r(8680);function s(e){return(s="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 c(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function u(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,function(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==s(t)?t:t+""}(n.key),n)}}function l(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var f=l(function e(t){c(this,e),this.value=t},[{key:"unwrapErr",value:function(){throw Error("No error")}},{key:"unwrap",value:function(){return this.value}},{key:"isOk",value:function(){return!0}},{key:"isErr",value:function(){return!1}}]),p=l(function e(t){c(this,e),this.error=t},[{key:"unwrapErr",value:function(){return this.error}},{key:"unwrap",value:function(){throw Error(this.error.message)}},{key:"isOk",value:function(){return!1}},{key:"isErr",value:function(){return!0}}]),d=300,h="GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF",y=r(8287).Buffer;function m(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return g(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&
2(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(g(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,g(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,g(l,"constructor",u),g(u,"constructor",c),c.displayName="GeneratorFunction",g(u,o,"GeneratorFunction"),g(l),g(l,o,"Generator"),g(l,n,function(){return this}),g(l,"toString",function(){return"[object Generator]"}),(m=function(){return{w:i,m:f}})()}function g(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(g=function(e,t,r,n){function i(t,r){g(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function b(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return v(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(e,void 0):void 0}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function w(e){return(w="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 S(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){S(i,n,o,a,s,"next",e)}function s(e){S(i,n,o,a,s,"throw",e)}a(void 0)})}}function E(){return(E=_(m().m(function e(t,r,n){var o,i,a,s,c,u,l,f,p,d=arguments;return m().w(function(e){for(;;)switch(e.n){case 0:return o=d.length>3&&void 0!==d[3]?d[3]:1.5,i=d.length>4&&void 0!==d[4]&&d[4],s=0,f=a=[],e.n=1,t();case 1:if(f.push.call(f,e.v),r(a[a.length-1])){e.n=2;break}return e.a(2,a);case 2:c=new Date(Date.now()+1e3*n).valueOf(),l=u=1e3;case 3:if(!(Date.now()<c&&r(a[a.length-1]))){e.n=6;break}return s+=1,i&&console.info("Waiting ".concat(u,"ms before trying again (bringing the total wait time to ").concat(l,"ms so far, of total ").concat(1e3*n,"ms)")),e.n=4,new Promise(function(e){return setTimeout(e,u)});case 4:return u*=o,new Date(Date.now()+u).valueOf()>c&&(u=c-Date.now(),i&&console.info("was gonna wait too long; new waitTime: ".concat(u,"ms"))),l=u+l,p=a,e.n=5,t(a[a.length-1]);case 5:p.push.call(p,e.v),i&&r(a[a.length-1])&&console.info("".concat(s,". C
2alled ").concat(t,"; ").concat(a.length," prev attempts. Most recent: ").concat(JSON.stringify(a[a.length-1],null,2))),e.n=3;break;case 6:return e.a(2,a)}},e)}))).apply(this,arguments)}var x=/Error\(Contract, #(\d+)\)/;function A(){return(A=_(m().m(function e(t){var r,n;return m().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,WebAssembly.compile(t);case 1:n=e.v,r=WebAssembly.Module.customSections(n,"contractspecv0"),e.n=3;break;case 2:e.p=2,e.v,r=(function(e){var t=new Map,r=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),n=0,o=function(t){if(n+t>e.byteLength)throw Error("Buffer overflow");var o=new Uint8Array(r,n,t);return n+=t,o};if("0,97,115,109"!==b(o(4)).join())throw Error("Invalid WASM magic");if("1,0,0,0"!==b(o(4)).join())throw Error("Invalid WASM version");for(;n<e.byteLength;){var i=o(1)[0],a=p(),s=n;if(0===i){var c=p();if(0===c||n+c>s+a)continue;var u=o(c),l=o(a-(n-s));try{var f=new TextDecoder("utf-8",{fatal:!0}).decode(u);l.length>0&&t.set(f,(t.get(f)||[]).concat(l))}catch(e){}}else n+=a}function p(){for(var e=0,t=0;;){var r=o(1)[0];if(e|=(127&r)<<t,!(128&r))break;if((t+=7)>=32)throw Error("Invalid WASM value")}return e>>>0}return t})(t).get("contractspecv0");case 3:if(r&&0!==r.length){e.n=4;break}throw Error("Could not obtain contract spec from wasm");case 4:return e.a(2,y.from(r[0]))}},e,null,[[0,2]])}))).apply(this,arguments)}function T(e){for(var t=new n.cereal.XdrReader(e),r=[];!t.eof;)r.push(n.xdr.ScSpecEntry.read(t));return r}function k(e,t){return O.apply(this,arguments)}function O(){return(O=_(m().m(function e(t,r){return m().w(function(e){for(;;)if(0===e.n)return e.a(2,t.publicKey?r.getAccount(t.publicKey):new n.Account(h,"0"))},e)}))).apply(this,arguments)}function P(e,t,r){return t=R(t),function(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,I()?Reflect.construct(t,r||[],R(e).constructor):t.apply(e,r))}function B(e,t){if("function"!=typeof t&&null!==t)throw 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&&C(e,t)}function j(e){var t="function"==typeof Map?new Map:void 0;return(j=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw 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,r)}function r(){return function(e,t,r){if(I())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&C(o,r.prototype),o}(e,arguments,R(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),C(r,e)})(e)}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}function C(e,t){return(C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function U(e){return(U="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 N(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return M(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&
2(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(M(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,M(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,M(l,"constructor",u),M(u,"constructor",c),c.displayName="GeneratorFunction",M(u,o,"GeneratorFunction"),M(l),M(l,o,"Generator"),M(l,n,function(){return this}),M(l,"toString",function(){return"[object Generator]"}),(N=function(){return{w:i,m:f}})()}function M(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(M=function(e,t,r,n){function i(t,r){M(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function D(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function L(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){D(i,n,o,a,s,"next",e)}function s(e){D(i,n,o,a,s,"throw",e)}a(void 0)})}}function F(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function q(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 V(e,t,r){return t&&q(e.prototype,t),r&&q(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $(e,t,r){return(t=z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z(e){var t=function(e,t){if("object"!=U(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=U(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==U(t)?t:t+""}var H,G=function(){function e(t){var r,n,a=this;F(this,e),$(this,"send",(n=L(N().m(function t(r){var n,o,s;return N().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,a.server.sendTransaction(a.assembled.signed);case 1:if(a.sendTransactionResponse=t.v,"PENDING"===a.sendTransactionResponse.status){t.n=2;break}throw new e.Errors.SendFailed("Sending the transaction to the network failed!\n".concat(JSON.stringify(a.sendTransactionResponse,null,2)));case 2:return null!=r&&r.onSubmitted&&r.onSubmitted(a.sendTransactionResponse),o=a.sendTransactionResponse.hash,s=null!=(n=a.assembled.options.timeoutInSeconds)?n:d,t.n=3,function(e,t,r){return E.apply(this,arguments)}(L(N().m(function e(){var t;return N().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a.server.getTransaction(o);case 1:return t=e.v,null!=r&&r.onProgress&&r.onProgress(t),e.a(2,t)}},e)})),function(e){return e.status===i.j.GetTransactionStatus.NOT_FOUND},s);case 3:if(a.getTransactionResponseAll=t.v,a.getTransactionResponse=a.getTransactionResponseAll[a.getTransactionResponseAll.length-1],a.getTransactionResponse.status!==i.j.GetTransactionStatus.NOT_FOUND){t.n=4;break}throw new e.Errors.TransactionStillPending("Waited ".concat(s," seconds for transaction to complete, but it did not. ")+"Returning anyway. Check the transaction status manually. "+"Sent transaction: ".concat(JSON.stringify(a.sendTransactionResponse,null,2),"\n")+"All attempts to get the result: ".concat(JSON.stringify(a.getTransactionResponseAll,null,2)));case 4:return t.a(2,a)}},t)})),function(e){return n.apply(this,arguments)})),this.assembled=t,this.server=new o.Server(this.assembled.options.rpcUrl,{allowHttp:null!=(r=this.assembled.options.allowHttp)&&r})}return V(e,[{key:"result",get:function(){if("getTransactionResponse"in this&&this.getTransactionResponse){if("returnValue"in this.getTransactionResponse)return this.assembled.options.parseResultXdr(this.getTransactionResponse.returnValue);throw Error("Transaction failed! Cannot parse result.")}if(this.sendTransactionResponse){var t,r=null==(t=this.sendTransactionResponse.errorResult)?void 0:t.result();if(r)throw new e.Errors.SendFailed("Transaction simulation looked correct, but attempting to send the transaction failed. Check `simulation` and `sendTransactionResponseAll` to troubleshoot. Decoded `sendTransactionResponse.errorResultXdr`: ".concat(r));throw new e.Errors.SendResultOnly("Transaction was sent to the network, but not yet awaited. No result to show. Await transaction completion with `getTransaction(sendTransactionResponse.hash)`")}throw Error("Sending transaction failed: ".concat(JSON.stringify(this.assembled.signed)))}}])}();$(G,"Errors",{SendFailed:function(e){function t(){return F(this,t),P(this,t,arguments)}return B(t,e),V(t)}
2(j(Error)),SendResultOnly:function(e){function t(){return F(this,t),P(this,t,arguments)}return B(t,e),V(t)}(j(Error)),TransactionStillPending:function(e){function t(){return F(this,t),P(this,t,arguments)}return B(t,e),V(t)}(j(Error))}),$(G,"init",(H=L(N().m(function e(t,r){var n,o;return N().w(function(e){for(;;)switch(e.n){case 0:return n=new G(t),e.n=1,n.send(r);case 1:return o=e.v,e.a(2,o)}},e)})),function(e,t){return H.apply(this,arguments)}));var K=V(function e(){F(this,e)}),W=r(8287).Buffer;function X(e,t,r){return t=ee(t),function(e,t){if(t&&("object"==et(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,Y()?Reflect.construct(t,r||[],ee(e).constructor):t.apply(e,r))}function Q(e,t){if("function"!=typeof t&&null!==t)throw 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&&Z(e,t)}function J(e){var t="function"==typeof Map?new Map:void 0;return(J=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw 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,r)}function r(){return function(e,t,r){if(Y())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&Z(o,r.prototype),o}(e,arguments,ee(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Z(r,e)})(e)}function Y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Y=function(){return!!e})()}function Z(e,t){return(Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function et(e){return(et="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 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 en(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){eh(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 eo(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return ei(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;
2var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(ei(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,ei(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,ei(l,"constructor",u),ei(u,"constructor",c),c.displayName="GeneratorFunction",ei(u,o,"GeneratorFunction"),ei(l),ei(l,o,"Generator"),ei(l,n,function(){return this}),ei(l,"toString",function(){return"[object Generator]"}),(eo=function(){return{w:i,m:f}})()}function ei(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(ei=function(e,t,r,n){function i(t,r){ei(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function ea(e){return function(e){if(Array.isArray(e))return ec(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||es(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function es(e,t){if(e){if("string"==typeof e)return ec(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ec(e,t):void 0}}function ec(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eu(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function el(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){eu(i,n,o,a,s,"next",e)}function s(e){eu(i,n,o,a,s,"throw",e)}a(void 0)})}}function ef(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function ep(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,ey(n.key),n)}}function ed(e,t,r){return t&&ep(e.prototype,t),r&&ep(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function eh(e,t,r){return(t=ey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ey(e){var t=function(e,t){if("object"!=et(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=et(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==et(t)?t:t+""}var em=function(){var e,t,r,s;function c(e){var t,r,s=this;ef(this,c),eh(this,"simulate",el(eo().m(function e(){var t,r,o,u,l,f,p,h=arguments;return eo().w(function(e){for(;;)switch(e.n){case 0:if(t=(h.length>0&&void 0!==h[0]?h[0]:{}).restore,s.built){e.n=2;break}if(s.raw){e.n=1;break}throw Error("Transaction has not yet been assembled; call `AssembledTransaction.build` first.");case 1:s.built=s.raw.build();case 2:return t=null!=t?t:s.options.restore,delete s.simulationResult,delete s.simulationTransactionData,e.n=3,s.server.simulateTransaction(s.built);case 3:if(s.simulation=e.v,!t||!i.j.isSimulationRestore(s.simulation)){e.n=8;break}return e.n=4,k(s.options,s.server);case 4:return r=e.v,e.n=5,s.restoreFootprint(s.simulation.restorePreamble,r);case 5:if((o=e.v).status!==i.j.GetTransactionStatus.SUCCESS){e.n=7;break}return p=new n.Contract(s.options.contractId),s.raw=new n.TransactionBuilder(r,{fee:null!=(u=s.options.fee)?u:n.BASE_FEE,networkPassphrase:s.options.networkPassphrase}).addOperation(p.call.apply(p,[s.options.method].concat(ea(null!=(l=s.options.args)?l:[]))
2)).setTimeout(null!=(f=s.options.timeoutInSeconds)?f:d),e.n=6,s.simulate();case 6:return e.a(2,s);case 7:throw new c.Errors.RestorationFailure("Automatic restore failed! You set 'restore: true' but the attempted restore did not work. Result:\n".concat(JSON.stringify(o)));case 8:return i.j.isSimulationSuccess(s.simulation)&&(s.built=(0,a.X)(s.built,s.simulation).build()),e.a(2,s)}},e)}))),eh(this,"sign",el(eo().m(function e(){var t,r,o,i,a,u,l,f,p,h,y,m,g=arguments;return eo().w(function(e){for(;;)switch(e.n){case 0:if(i=void 0!==(o=(r=g.length>0&&void 0!==g[0]?g[0]:{}).force)&&o,u=void 0===(a=r.signTransaction)?s.options.signTransaction:a,s.built){e.n=1;break}throw Error("Transaction has not yet been simulated");case 1:if(i||!s.isReadCall){e.n=2;break}throw new c.Errors.NoSignatureNeeded("This is a read call. It requires no signature or sending. Use `force: true` to sign and send anyway.");case 2:if(u){e.n=3;break}throw new c.Errors.NoSigner("You must provide a signTransaction function, either when calling `signAndSend` or when initializing your Client");case 3:if(!(l=s.needsNonInvokerSigningBy().filter(function(e){return!e.startsWith("C")})).length){e.n=4;break}throw new c.Errors.NeedsMoreSignatures("Transaction requires signatures from ".concat(l,". ")+"See `needsNonInvokerSigningBy` for details.");case 4:return f=null!=(t=s.options.timeoutInSeconds)?t:d,s.built=n.TransactionBuilder.cloneFrom(s.built,{fee:s.built.fee,timebounds:void 0,sorobanData:s.simulationData.transactionData}).setTimeout(f).build(),p={networkPassphrase:s.options.networkPassphrase},s.options.address&&(p.address=s.options.address),void 0!==s.options.submit&&(p.submit=s.options.submit),s.options.submitUrl&&(p.submitUrl=s.options.submitUrl),e.n=5,u(s.built.toXDR(),p);case 5:y=(h=e.v).signedTxXdr,m=h.error,s.handleWalletError(m),s.signed=n.TransactionBuilder.fromXDR(y,s.options.networkPassphrase);case 6:return e.a(2)}},e)}))),eh(this,"signAndSend",el(eo().m(function e(){var t,r,n,o,i,a,c,u=arguments;return eo().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=void 0!==(r=(t=u.length>0&&void 0!==u[0]?u[0]:{}).force)&&r,i=void 0===(o=t.signTransaction)?s.options.signTransaction:o,a=t.watcher,s.signed){e.n=3;break}return c=s.options.submit,s.options.submit&&(s.options.submit=!1),e.p=1,e.n=2,s.sign({force:n,signTransaction:i});case 2:return e.p=2,s.options.submit=c,e.f(2);case 3:return e.a(2,s.send(a))}},e,null,[[1,,2,3]])}))),eh(this,"needsNonInvokerSigningBy",function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeAlreadySigned,r=void 0!==t&&t;if(!s.built)throw Error("Transaction has not yet been simulated");if(!("operations"in s.built))throw Error("Unexpected Transaction type; no operations: ".concat(JSON.stringify(s.built)));return ea(new Set((null!=(e=s.built.operations[0].auth)?e:[]).filter(function(e){return e.credentials().switch()===n.xdr.SorobanCredentialsType.sorobanCredentialsAddress()&&(r||"scvVoid"===e.credentials().address().signature().switch().name)}).map(function(e){return n.Address.fromScAddress(e.credentials().address().address()).toString()})))}),eh(this,"signAuthEntries",el(eo().m(function e(){var t,r,o,i,a,u,l,f,p,d,h,y,m,g,b,v,w=arguments;return eo().w(function(e){for(;;)switch(e.p=e.n){case 0:if(i=void 0===(o=(r=w.length>0&&void 0!==w[0]?w[0]:{}).expiration)?el(eo().m(function e(){var t;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,s.server.getLatestLedger();case 1:return t=e.v.sequence,e.a(2,t+100)}},e)}))():o,u=void 0===(a=r.signAuthEntry)?s.options.signAuthEntry:a,f=void 0===(l=r.address)?s.options.publicKey:l,d=void 0===(p=r.authorizeEntry)?n.authorizeEntry:p,s.built){e.n=1;break}throw Error("Transaction has not yet been assembled or simulated");case 1:if(d!==n.authorizeEntry){e.n=4;break}if(0!==(h=s.needsNonInvokerSigningBy()).length){e.n=2;break}throw new c.Errors.NoUnsignedNonInvokerAuthEntries("No unsigned non-invoker auth entries; maybe you already signed?");case 2:if(-1!==h.indexOf(null!=f?f:"")){e.n=3;break}throw new c.Errors.NoSignatureNeeded('No auth entries for public key "'.concat(f,'"'));case 3:if(u){e.n=4;break}throw new c.Errors.NoSigner("You must provide `signAuthEntry` or a custom `authorizeEntry`");case 4:m=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=es(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}((y=null!=(t=s.built.operations[0].auth)?t:[]).entries()),e.p=5,b=eo().m(function e(){var t,r,o,a,c,l,p,h;return eo().w(function(e){for(;;)switch(e.n){case 0:var m;if(r=(t=function(e){if(Array.isArray(e))return e}(m=g.value)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o,i,a=[],s=!0,c=!1;try{o=(t=t.call(e)).next,!1;for(;!(s=(r=o.call(t)).done)&&(a.push(r.value),2!==a.length);s=!0);}catch(e){c=!0,n=e}
2finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw n}}return a}}(m)||es(m,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],o=t[1],(a=n.xdr.SorobanCredentials.fromXDR(o.credentials().toXDR())).switch()===n.xdr.SorobanCredentialsType.sorobanCredentialsAddress()){e.n=1;break}return e.a(2,0);case 1:if(n.Address.fromScAddress(a.address().address()).toString()===f){e.n=2;break}return e.a(2,0);case 2:return c=null!=u?u:Promise.resolve,l=d,p=o,h=function(){var e=el(eo().m(function e(t){var r,n,o;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,c(t.toXDR("base64"),{address:f});case 1:return n=(r=e.v).signedAuthEntry,o=r.error,s.handleWalletError(o),e.a(2,W.from(n,"base64"))}},e)}));return function(t){return e.apply(this,arguments)}}(),e.n=3,i;case 3:return e.n=4,l(p,h,e.v,s.options.networkPassphrase);case 4:y[r]=e.v;case 5:return e.a(2)}},e)}),m.s();case 6:if((g=m.n()).done){e.n=9;break}return e.d(function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(et(e)+" is not iterable")}(b()),7);case 7:if(0!==e.v){e.n=8;break}return e.a(3,8);case 8:e.n=6;break;case 9:e.n=11;break;case 10:e.p=10,v=e.v,m.e(v);case 11:return e.p=11,m.f(),e.f(11);case 12:return e.a(2)}},e,null,[[5,10,11,12]])}))),this.options=e,this.options.simulate=null==(t=this.options.simulate)||t,this.server=new o.Server(this.options.rpcUrl,{allowHttp:null!=(r=this.options.allowHttp)&&r})}return ed(c,[{key:"toJSON",value:function(){var e;return JSON.stringify({method:this.options.method,tx:null==(e=this.built)?void 0:e.toXDR(),simulationResult:{auth:this.simulationData.result.auth.map(function(e){return e.toXDR("base64")}),retval:this.simulationData.result.retval.toXDR("base64")},simulationTransactionData:this.simulationData.transactionData.toXDR("base64")})}},{key:"toXDR",value:function(){var e;if(!this.built)throw Error("Transaction has not yet been simulated; call `AssembledTransaction.simulate` first.");return null==(e=this.built)?void 0:e.toEnvelope().toXDR("base64")}},{key:"handleWalletError",value:function(e){if(e){var t=e.message,r=e.code,n="".concat(t).concat(e.ext?" (".concat(e.ext.join(", "),")"):"");switch(r){case -1:throw new c.Errors.InternalWalletError(n);
2case -2:throw new c.Errors.ExternalServiceError(n);case -3:throw new c.Errors.InvalidClientRequest(n);case -4:throw new c.Errors.UserRejected(n);default:throw Error("Unhandled error: ".concat(n))}}}},{key:"simulationData",get:function(){if(this.simulationResult&&this.simulationTransactionData)return{result:this.simulationResult,transactionData:this.simulationTransactionData};var e,t=this.simulation;if(!t)throw new c.Errors.NotYetSimulated("Transaction has not yet been simulated");if(i.j.isSimulationError(t))throw new c.Errors.SimulationFailed('Transaction simulation failed: "'.concat(t.error,'"'));if(i.j.isSimulationRestore(t))throw new c.Errors.ExpiredState("You need to restore some contract state before you can invoke this method.\nYou can set `restore` to true in the method options in order to automatically restore the contract state when needed.");return this.simulationResult=null!=(e=t.result)?e:{auth:[],retval:n.xdr.ScVal.scvVoid()},this.simulationTransactionData=t.transactionData.build(),{result:this.simulationResult,transactionData:this.simulationTransactionData}}},{key:"result",get:function(){try{if(!this.simulationData.result)throw Error("No simulation result!");return this.options.parseResultXdr(this.simulationData.result.retval)}catch(t){if("object"!==w(t)||null===t||!("toString"in t))throw t;var e=this.parseError(t.toString());if(e)return e;throw t}}},{key:"parseError",value:function(e){if(this.options.errorTypes){var t=e.match(x);if(t){var r=parseInt(t[1],10),n=this.options.errorTypes[r];if(n)return new p(n)}}}},{key:"send",value:(s=el(eo().m(function e(t){var r;return eo().w(function(e){for(;;)switch(e.n){case 0:if(this.signed){e.n=1;break}throw Error("The transaction has not yet been signed. Run `sign` first, or use `signAndSend` instead.");case 1:return e.n=2,G.init(this,t);case 2:return r=e.v,e.a(2,r)}},e,this)})),function(e){return s.apply(this,arguments)})},{key:"isReadCall",get:function(){var e=this.simulationData.result.auth.length,t=this.simulationData.transactionData.resources().footprint().readWrite().length;return 0===e&&0===t}},{key:"restoreFootprint",value:(r=el(eo().m(function e(t,r){var n,o,i;return eo().w(function(e){for(;;)switch(e.n){case 0:if(this.options.signTransaction){e.n=1;break}throw Error("For automatic restore to work you must provide a signTransaction function when initializing your Client");case 1:if(null==r){e.n=2;break}i=r,e.n=4;break;case 2:return e.n=3,k(this.options,this.server);case 3:i=e.v;case 4:return r=i,e.n=5,c.buildFootprintRestoreTransaction(en({},this.options),t.transactionData,r,t.minResourceFee);case 5:return n=e.v,e.n=6,n.signAndSend();case 6:if((o=e.v).getTransactionResponse){e.n=7;break}throw new c.Errors.RestorationFailure("The attempt at automatic restore failed. \n".concat(JSON.stringify(o)));case 7:return e.a(2,o.getTransactionResponse)}},e,this)})),function(e,t){return r.apply(this,arguments)})}],[{key:"fromJSON",value:function(e,t){var r=t.tx,o=t.simulationResult,i=t.simulationTransactionData,a=new c(e);return a.built=n.TransactionBuilder.fromXDR(r,e.networkPassphrase),a.simulationResult={auth:o.auth.map(function(e){return n.xdr.SorobanAuthorizationEntry.fromXDR(e,"base64")}),retval:n.xdr.ScVal.fromXDR(o.retval,"base64")},a.simulationTransactionData=n.xdr.SorobanTransactionData.fromXDR(i,"base64"),a}},{key:"fromXDR",value:function(e,t,r){var o,i=n.xdr.TransactionEnvelope.fromXDR(t,"base64"),a=n.TransactionBuilder.fromXDR(i,e.networkPassphrase),s=a.operations[0];if(null==s||null==(o=s.func)||!o.value||"function"!=typeof s.func.value)throw Error("Could not extract the method from the transaction envelope.");var u=s.func.value();if(null==u||!u.functionName)throw Error("Could not extract the method name from the transaction envelope.");var l=u.functionName().toString("utf-8"),f=new c(en(en({},e),{},{method:l,parseResultXdr:function(e){return r.funcResToNative(l,e)}}));return f.built=a,f}},{key:"build",value:function(e){var t,r=new n.Contract(e.contractId);return c.buildWithOp(r.call.apply(r,[e.method].concat(ea(null!=(t=e.args)?t:[]))),e)}},{key:"buildWithOp",value:(t=el(eo().m(function e(t,r){var o,i,a,s;return eo().w(function(e){for(;;)switch(e.n){case 0:return a=new c(r),e.n=1,k(r,a.server);case 1:if(s=e.v,a.raw=new n.TransactionBuilder(s,{fee:null!=(o=r.fee)?o:n.BASE_FEE,networkPassphrase:r.networkPassphrase}).setTimeout(null!=(i=r.timeoutInSeconds)?i:d).addOperation(t),!r.simulate){e.n=2;break}return e.n=2,a.simulate();case 2:return e.a(2,a)}},e)})),function(e,r){return t.apply(this,arguments)})},{key:"buildFootprintRestoreTransaction",value:(e=el(eo().m(function e(t,r,o,i){var a,s;return eo().w(function(e){for(;;)switch(e.n){case 0:return(s=new c(t)).raw=new n.TransactionBuilder(o,{fee:i,networkPassphrase:t.networkPassphrase}).setSorobanData(r instanceof n.SorobanDataBuilder?r.build():r).addOperation(n.Operation.restoreFootprint({})).setTimeout(null!=(a=t.timeoutInSeconds)?a:d),e.n=1,s.simulate({restore:!1});case 1:return e.a(2,s)}},e)})),function(t,r,n,o){return e.apply(this,arguments)})}])}();eh(em,"Errors",{ExpiredState:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),RestorationFailure:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),NeedsMoreSignatures:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),NoSignatureNeeded:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),NoUnsignedNonInvokerAuthEntries:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),NoSigner:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),NotYetSimulated:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),FakeAccount:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),SimulationFailed:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),InternalWalletError:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),ExternalServiceError:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),InvalidClientRequest:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error)),UserRejected:function(e){function t(){return ef(this,t),X(this,t,arguments)}return Q(t,e),ed(t)}(J(Error))});var eg=r(8287).Buffer;function eb(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return ev(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&
2(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(ev(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,ev(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,ev(l,"constructor",u),ev(u,"constructor",c),c.displayName="GeneratorFunction",ev(u,o,"GeneratorFunction"),ev(l),ev(l,o,"Generator"),ev(l,n,function(){return this}),ev(l,"toString",function(){return"[object Generator]"}),(eb=function(){return{w:i,m:f}})()}function ev(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(ev=function(e,t,r,n){function i(t,r){ev(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function ew(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function eS(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ew(i,n,o,a,s,"next",e)}function s(e){ew(i,n,o,a,s,"throw",e)}a(void 0)})}}var e_=function(e,t){var r,o;return{signTransaction:(o=eS(eb().m(function r(o,i){var a;return eb().w(function(r){for(;;)if(0===r.n)return(a=n.TransactionBuilder.fromXDR(o,(null==i?void 0:i.networkPassphrase)||t)).sign(e),r.a(2,{signedTxXdr:a.toXDR(),signerAddress:e.publicKey()})},r)})),function(e,t){return o.apply(this,arguments)}),signAuthEntry:(r=eS(eb().m(function t(r){var o;return eb().w(function(t){for(;;)if(0===t.n)return o=e.sign((0,n.hash)(eg.from(r,"base64"))).toString("base64"),t.a(2,{signedAuthEntry:o,signerAddress:e.publicKey()})},t)})),function(e){return r.apply(this,arguments)})}},eE=r(8287).Buffer;function ex(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return eA(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(eA(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,eA(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,eA(l,"constructor",u),eA(u,"constructor",c),c.displayName="GeneratorFunction",eA(u,o,"GeneratorFunction"),eA(l),eA(l,o,"Generator"),eA(l,n,function(){return this}),eA(l,"toString",function(){return"[object Generator]"}),(ex=function(){return{w:i,m:f}})()}function eA(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(eA=function(e,t,r,n){function i(t,r){eA(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function eT(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function ek(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 eO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
2t%2?ek(Object(r),!0).forEach(function(t){ej(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ek(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eP(e){return(eP="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 eB(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,eI(n.key),n)}}function ej(e,t,r){return(t=eI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eI(e){var t=function(e,t){if("object"!=eP(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eP(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==eP(t)?t:t+""}function eC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eR(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eR(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eU(e){return/^\d+$/.test(e.name().toString())}var eN={U32:{type:"integer",minimum:0,maximum:0xffffffff},I32:{type:"integer",minimum:-0x80000000,maximum:0x7fffffff},U64:{type:"string",pattern:"^([1-9][0-9]*|0)$",minLength:1,maxLength:20},I64:{type:"string",pattern:"^(-?[1-9][0-9]*|0)$",minLength:1,maxLength:21},U128:{type:"string",pattern:"^([1-9][0-9]*|0)$",minLength:1,maxLength:39},I128:{type:"string",pattern:"^(-?[1-9][0-9]*|0)$",minLength:1,maxLength:40},U256:{type:"string",pattern:"^([1-9][0-9]*|0)$",minLength:1,maxLength:78},I256:{type:"string",pattern:"^(-?[1-9][0-9]*|0)$",minLength:1,maxLength:79},Address:{type:"string",format:"address",description:"Address can be a public key or contract id"},ScString:{type:"string",description:"ScString is a string"},ScSymbol:{type:"string",description:"ScSymbol is a string"},DataUrl:{type:"string",pattern:"^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$"}};function eM(e){var t;switch(e.switch().value){case n.xdr.ScSpecType.scSpecTypeVal().value:t="Val";break;case n.xdr.ScSpecType.scSpecTypeBool().value:return{type:"boolean"};case n.xdr.ScSpecType.scSpecTypeVoid().value:return{type:"null"};case n.xdr.ScSpecType.scSpecTypeError().value:t="Error";break;case n.xdr.ScSpecType.scSpecTypeU32().value:t="U32";break;case n.xdr.ScSpecType.scSpecTypeI32().value:t="I32";break;case n.xdr.ScSpecType.scSpecTypeU64().value:t="U64";break;case n.xdr.ScSpecType.scSpecTypeI64().value:t="I64";break;case n.xdr.ScSpecType.scSpecTypeTimepoint().value:throw Error("Timepoint type not supported");case n.xdr.ScSpecType.scSpecTypeDuration().value:throw Error("Duration not supported");case n.xdr.ScSpecType.scSpecTypeU128().value:t="U128";break;case n.xdr.ScSpecType.scSpecTypeI128().value:t="I128";break;case n.xdr.ScSpecType.scSpecTypeU256().value:t="U256";break;case n.xdr.ScSpecType.scSpecTypeI256().value:t="I256";break;case n.xdr.ScSpecType.scSpecTypeBytes().value:t="DataUrl";break;case n.xdr.ScSpecType.scSpecTypeString().value:t="ScString";break;case n.xdr.ScSpecType.scSpecTypeSymbol().value:t="ScSymbol";break;case n.xdr.ScSpecType.scSpecTypeAddress().value:t="Address";break;case n.xdr.ScSpecType.scSpecTypeOption().value:return eM(e.option().valueType());case n.xdr.ScSpecType.scSpecTypeResult().value:break;case n.xdr.ScSpecType.scSpecTypeVec().value:return{type:"array",items:eM(e.vec().elementType())};case n.xdr.ScSpecType.scSpecTypeMap().value:var r=e.map();return{type:"array",items:{type:"array",items:[eM(r.keyType()),eM(r.valueType())],minItems:2,maxItems:2}};case n.xdr.ScSpecType.scSpecTypeTuple().value:var o=e.tuple(),i=o.valueTypes().length;return{type:"array",items:o.valueTypes().map(eM),minItems:i,maxItems:i};case n.xdr.ScSpecType.scSpecTypeBytesN().value:return{$ref:"#/definitions/DataUrl",maxLength:e.bytesN().n()};
2case n.xdr.ScSpecType.scSpecTypeUdt().value:t=e.udt().name().toString()}return{$ref:"#/definitions/".concat(t)}}function eD(e){var t={},r=[];e.forEach(function(e){var o=e.type(),i=e.name().toString();t[i]=eM(o),o.switch().value!==n.xdr.ScSpecType.scSpecTypeOption().value&&r.push(i)});var o={properties:t};return r.length>0&&(o.required=r),o}var eL=function(){var e,t,r,o;function i(e){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),ej(this,"entries",[]),eE.isBuffer(e))this.entries=T(e);else if("string"==typeof e)this.entries=T(eE.from(e,"base64"));else{if(0===e.length)throw Error("Contract spec must have at least one entry");var t=e[0];this.entries="string"==typeof t?e.map(function(e){return n.xdr.ScSpecEntry.fromXDR(e,"base64")}):e}}return e=[{key:"funcs",value:function(){return this.entries.filter(function(e){return e.switch().value===n.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value}).map(function(e){return e.functionV0()})}},{key:"getFunc",value:function(e){var t=this.findEntry(e);if(t.switch().value!==n.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value)throw Error("".concat(e," is not a function"));return t.functionV0()}},{key:"funcArgsToScVals",value:function(e,t){var r=this;return this.getFunc(e).inputs().map(function(e){return r.nativeToScVal(function(e,t){var r=t.name().toString(),n=Object.entries(e).find(function(e){return eC(e,1)[0]===r});if(!n)throw Error("Missing field ".concat(r));return n[1]}(t,e),e.type())})}},{key:"funcResToNative",value:function(e,t){var r="string"==typeof t?n.xdr.ScVal.fromXDR(t,"base64"):t,o=this.getFunc(e).outputs();if(0===o.length){var i=r.switch();if(i.value!==n.xdr.ScValType.scvVoid().value)throw Error("Expected void, got ".concat(i.name));return null}if(o.length>1)throw Error("Multiple outputs not supported");var a=o[0];return a.switch().value===n.xdr.ScSpecType.scSpecTypeResult().value?new f(this.scValToNative(r,a.result().okType())):this.scValToNative(r,a)}},{key:"findEntry",value:function(e){var t=this.entries.find(function(t){return t.value().name().toString()===e});if(!t)throw Error("no such entry: ".concat(e));return t}},{key:"nativeToScVal",value:function(e,t){var r,o,i,a=this,s=t.switch(),c=s.value;if(s.value===n.xdr.ScSpecType.scSpecTypeUdt().value){var u=t.udt();return this.nativeToUdt(e,u.name().toString())}if(c===n.xdr.ScSpecType.scSpecTypeOption().value){var l=t.option();return void 0===e?n.xdr.ScVal.scvVoid():this.nativeToScVal(e,l.valueType())}switch(eP(e)){case"object":if(null===e){if(c===n.xdr.ScSpecType.scSpecTypeVoid().value)return n.xdr.ScVal.scvVoid();throw TypeError("Type ".concat(t," was not void, but value was null"))}if(e instanceof n.xdr.ScVal)return e;if(e instanceof n.Address){if(t.switch().value!==n.xdr.ScSpecType.scSpecTypeAddress().value)throw TypeError("Type ".concat(t," was not address, but value was Address"));return e.toScVal()}if(e instanceof n.Contract){if(t.switch().value!==n.xdr.ScSpecType.scSpecTypeAddress().value)throw TypeError("Type ".concat(t," was not address, but value was Address"));return e.address().toScVal()}if(e instanceof Uint8Array||eE.isBuffer(e)){var f=Uint8Array.from(e);switch(c){case n.xdr.ScSpecType.scSpecTypeBytesN().value:var p=t.bytesN();if(f.length!==p.n())throw TypeError("expected ".concat(p.n()," bytes, but got ").concat(f.length));return n.xdr.ScVal.scvBytes(f);case n.xdr.ScSpecType.scSpecTypeBytes().value:return n.xdr.ScVal.scvBytes(f);default:throw TypeError("invalid type (".concat(t,") specified for Bytes and BytesN"))}}if(Array.isArray(e))switch(c){case n.xdr.ScSpecType.scSpecTypeVec().value:var d=t.vec().elementType();return n.xdr.ScVal.scvVec(e.map(function(e){return a.nativeToScVal(e,d)}));case n.xdr.ScSpecType.scSpecTypeTuple().value:var h=t.tuple().valueTypes();if(e.length!==h.length)throw TypeError("Tuple expects ".concat(h.length," values, but ").concat(e.length," were provided"));return n.xdr.ScVal.scvVec(e.map(function(e,t){return a.nativeToScVal(e,h[t])}));case n.xdr.ScSpecType.scSpecTypeMap().value:var y=t.map(),m=y.keyType(),g=y.valueType();return n.xdr.ScVal.scvMap(e.map(function(e){var t=a.nativeToScVal(e[0],m),r=a.nativeToScVal(e[1],g);return new n.xdr.ScMapEntry({key:t,val:r})}));default:throw TypeError("Type ".concat(t," was not vec, but value was Array"))}
2if(e.constructor===Map){if(c!==n.xdr.ScSpecType.scSpecTypeMap().value)throw TypeError("Type ".concat(t," was not map, but value was Map"));for(var b=t.map(),v=[],w=e.entries(),S=w.next();!S.done;){var _=eC(S.value,2),E=_[0],x=_[1],A=this.nativeToScVal(E,b.keyType()),T=this.nativeToScVal(x,b.valueType());v.push(new n.xdr.ScMapEntry({key:A,val:T})),S=w.next()}return n.xdr.ScVal.scvMap(v)}if("Object"!==(null!=(r=null==(o=e.constructor)?void 0:o.name)?r:""))throw TypeError("cannot interpret ".concat(null==(i=e.constructor)?void 0:i.name," value as ScVal (").concat(JSON.stringify(e),")"));throw TypeError("Received object ".concat(e,"  did not match the provided type ").concat(t));case"number":case"bigint":switch(c){case n.xdr.ScSpecType.scSpecTypeU32().value:return n.xdr.ScVal.scvU32(e);case n.xdr.ScSpecType.scSpecTypeI32().value:return n.xdr.ScVal.scvI32(e);case n.xdr.ScSpecType.scSpecTypeU64().value:case n.xdr.ScSpecType.scSpecTypeI64().value:case n.xdr.ScSpecType.scSpecTypeU128().value:case n.xdr.ScSpecType.scSpecTypeI128().value:case n.xdr.ScSpecType.scSpecTypeU256().value:case n.xdr.ScSpecType.scSpecTypeI256().value:var k=s.name.substring(10).toLowerCase();return new n.XdrLargeInt(k,e).toScVal();default:throw TypeError("invalid type (".concat(t,") specified for integer"))}case"string":switch(s.value){case n.xdr.ScSpecType.scSpecTypeString().value:return n.xdr.ScVal.scvString(e);case n.xdr.ScSpecType.scSpecTypeSymbol().value:return n.xdr.ScVal.scvSymbol(e);case n.xdr.ScSpecType.scSpecTypeAddress().value:return n.Address.fromString(e).toScVal();case n.xdr.ScSpecType.scSpecTypeU64().value:return new n.XdrLargeInt("u64",e).toScVal();case n.xdr.ScSpecType.scSpecTypeI64().value:return new n.XdrLargeInt("i64",e).toScVal();case n.xdr.ScSpecType.scSpecTypeU128().value:return new n.XdrLargeInt("u128",e).toScVal();case n.xdr.ScSpecType.scSpecTypeI128().value:return new n.XdrLargeInt("i128",e).toScVal();case n.xdr.ScSpecType.scSpecTypeU256().value:return new n.XdrLargeInt("u256",e).toScVal();case n.xdr.ScSpecType.scSpecTypeI256().value:return new n.XdrLargeInt("i256",e).toScVal();case n.xdr.ScSpecType.scSpecTypeBytes().value:case n.xdr.ScSpecType.scSpecTypeBytesN().value:return n.xdr.ScVal.scvBytes(eE.from(e,"base64"));default:throw TypeError("invalid type ".concat(s.name," specified for string value"))}case"boolean":if(c!==n.xdr.ScSpecType.scSpecTypeBool().value)throw TypeError("Type ".concat(t," was not bool, but value was bool"));return n.xdr.ScVal.scvBool(e);case"undefined":if(!t)return n.xdr.ScVal.scvVoid();switch(c){case n.xdr.ScSpecType.scSpecTypeVoid().value:case n.xdr.ScSpecType.scSpecTypeOption().value:return n.xdr.ScVal.scvVoid();default:throw TypeError("Type ".concat(t," was not void, but value was undefined"))}case"function":return this.nativeToScVal(e(),t);default:throw TypeError("failed to convert typeof ".concat(eP(e)," (").concat(e,")"))}}},{key:"nativeToUdt",value:function(e,t){var r=this.findEntry(t);switch(r.switch()){case n.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0():if("number"!=typeof e)throw TypeError("expected number for enum ".concat(t,", but got ").concat(eP(e)));return this.nativeToEnum(e,r.udtEnumV0());case n.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0():return this.nativeToStruct(e,r.udtStructV0());case n.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0():return this.nativeToUnion(e,r.udtUnionV0());default:throw Error("failed to parse udt ".concat(t))}}},{key:"nativeToUnion",value:function(e,t){var r=this,o=e.tag,i=t.cases().find(function(e){return e.value().name().toString()===o});if(!i)throw TypeError("no such enum entry: ".concat(o," in ").concat(t));var a=n.xdr.ScVal.scvSymbol(o);switch(i.switch()){case n.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0():return n.xdr.ScVal.scvVec([a]);case n.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0():var s=i.tupleCase().type();if(Array.isArray(e.values)){if(e.values.length!==s.length)throw TypeError("union ".concat(t," expects ").concat(s.length," values, but got ").concat(e.values.length));var c=e.values.map(function(e,t){return r.nativeToScVal(e,s[t])});return c.unshift(a),n.xdr.ScVal.scvVec(c)}throw Error("failed to parse union case ".concat(i," with ").concat(e));default:throw Error("failed to parse union ".concat(t," with ").concat(e))}}}
2,{key:"nativeToStruct",value:function(e,t){var r=this,o=t.fields();if(o.some(eU)){if(!o.every(eU))throw Error("mixed numeric and non-numeric field names are not allowed");return n.xdr.ScVal.scvVec(o.map(function(t,n){return r.nativeToScVal(e[n],o[n].type())}))}return n.xdr.ScVal.scvMap(o.map(function(t){var o=t.name().toString();return new n.xdr.ScMapEntry({key:r.nativeToScVal(o,n.xdr.ScSpecTypeDef.scSpecTypeSymbol()),val:r.nativeToScVal(e[o],t.type())})}))}},{key:"nativeToEnum",value:function(e,t){if(t.cases().some(function(t){return t.value()===e}))return n.xdr.ScVal.scvU32(e);throw TypeError("no such enum entry: ".concat(e," in ").concat(t))}},{key:"scValStrToNative",value:function(e,t){return this.scValToNative(n.xdr.ScVal.fromXDR(e,"base64"),t)}},{key:"scValToNative",value:function(e,t){var r,o=this,i=t.switch(),a=i.value;if(a===n.xdr.ScSpecType.scSpecTypeUdt().value)return this.scValUdtToNative(e,t.udt());switch(e.switch().value){case n.xdr.ScValType.scvVoid().value:return;case n.xdr.ScValType.scvU64().value:case n.xdr.ScValType.scvI64().value:case n.xdr.ScValType.scvU128().value:case n.xdr.ScValType.scvI128().value:case n.xdr.ScValType.scvU256().value:case n.xdr.ScValType.scvI256().value:return(0,n.scValToBigInt)(e);case n.xdr.ScValType.scvVec().value:if(a===n.xdr.ScSpecType.scSpecTypeVec().value){var s,c=t.vec();return(null!=(s=e.vec())?s:[]).map(function(e){return o.scValToNative(e,c.elementType())})}if(a===n.xdr.ScSpecType.scSpecTypeTuple().value){var u,l=t.tuple().valueTypes();return(null!=(u=e.vec())?u:[]).map(function(e,t){return o.scValToNative(e,l[t])})}throw TypeError("Type ".concat(t," was not vec, but ").concat(e," is"));case n.xdr.ScValType.scvAddress().value:return n.Address.fromScVal(e).toString();case n.xdr.ScValType.scvMap().value:var f,p=null!=(f=e.map())?f:[];if(a===n.xdr.ScSpecType.scSpecTypeMap().value){var d=t.map(),h=d.keyType(),y=d.valueType();return p.map(function(e){return[o.scValToNative(e.key(),h),o.scValToNative(e.val(),y)]})}throw TypeError("ScSpecType ".concat(i.name," was not map, but ").concat(JSON.stringify(e,null,2)," is"));case n.xdr.ScValType.scvBool().value:case n.xdr.ScValType.scvU32().value:case n.xdr.ScValType.scvI32().value:case n.xdr.ScValType.scvBytes().value:return e.value();case n.xdr.ScValType.scvString().value:case n.xdr.ScValType.scvSymbol().value:if(a!==n.xdr.ScSpecType.scSpecTypeString().value&&a!==n.xdr.ScSpecType.scSpecTypeSymbol().value)throw Error("ScSpecType ".concat(i.name," was not string or symbol, but ").concat(JSON.stringify(e,null,2)," is"));return null==(r=e.value())?void 0:r.toString();case n.xdr.ScValType.scvTimepoint().value:case n.xdr.ScValType.scvDuration().value:return(0,n.scValToBigInt)(n.xdr.ScVal.scvU64(e.u64()));default:throw TypeError("failed to convert ".concat(JSON.stringify(e,null,2)," to native type from type ").concat(i.name))}}},{key:"scValUdtToNative",value:function(e,t){var r=this.findEntry(t.name().toString());switch(r.switch()){case n.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0():return this.enumToNative(e);case n.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0():return this.structToNative(e,r.udtStructV0());case n.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0():return this.unionToNative(e,r.udtUnionV0());default:throw Error("failed to parse udt ".concat(t.name().toString(),": ").concat(r))}}},{key:"unionToNative",value:function(e,t){var r=this,o=e.vec();if(!o)throw Error("".concat(JSON.stringify(e,null,2)," is not a vec"));if(0===o.length&&0!==t.cases.length)throw Error("".concat(e," has length 0, but the there are at least one case in the union"));var i=o[0].sym().toString();if(o[0].switch().value!==n.xdr.ScValType.scvSymbol().value)throw Error("{vec[0]} is not a symbol");var a=t.cases().find(function(e){switch(e.switch().value){case n.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value:return e.tupleCase().name().toString()===i;case n.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0().value:return e.voidCase().name().toString()===i;default:return!1}});if(!a)throw Error("failed to find entry ".concat(i," in union {udt.name().toString()}"));var s={tag:i};return a.switch().value===n.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value&&(s.values=a.tupleCase().type().map(function(e,t){return r.scValToNative(o[t+1],e)})),s}},{key:"structToNative",value:function(e,t){var r,n,o=this,i={},a=t.fields();return a.some(eU)?null==(n=e.vec())?void 0:n.map(function(e,t){return o.scValToNative(e,a[t].type())}):(null==(r=e.map())||r.forEach(function(e,t){var r=a[t];i[r.name().toString()]=o.scValToNative(e.val(),r.type())}),i)}},{key:"enumToNative",value:function(e){if(e.switch().value!==n.xdr.ScValType.scvU32().value)throw Error("Enum must have a u32 value");return e.u32()}},{key:"errorCases",value:function(){return this.entries.filter(function(e){return e.switch().value===n.xdr.ScSpecEntryKind.scSpecEntryUdtErrorEnumV0().value}).flatMap(function(e){return e.value().cases()})}},{key:"jsonSchema",value:function(e){var t={};
2this.entries.forEach(function(e){switch(e.switch().value){case n.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0().value:var r,o,i,a,s=e.udtEnumV0();t[s.name().toString()]=(r=s.doc().toString(),o=s.cases(),i=[],o.forEach(function(e){var t=e.name().toString(),r=e.doc().toString();i.push({description:r,title:t,enum:[e.value()],type:"number"})}),a={oneOf:i},r.length>0&&(a.description=r),a);break;case n.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0().value:var c=e.udtStructV0();t[c.name().toString()]=function(e){var t=e.fields();if(t.some(eU)){if(!t.every(eU))throw Error("mixed numeric and non-numeric field names are not allowed");return{type:"array",items:t.map(function(e,r){return eM(t[r].type())}),minItems:t.length,maxItems:t.length}}var r=e.doc().toString(),n=eD(t),o=n.properties,i=n.required;return o.additionalProperties=!1,{description:r,properties:o,required:i,type:"object"}}(c);break;case n.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0().value:var u,l,f,p,d=e.udtUnionV0();t[d.name().toString()]=(u=d.doc().toString(),l=d.cases(),f=[],l.forEach(function(e){switch(e.switch().value){case n.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0().value:var t=e.voidCase().name().toString();f.push({type:"object",title:t,properties:{tag:t},additionalProperties:!1,required:["tag"]});break;case n.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value:var r=e.tupleCase(),o=r.name().toString();f.push({type:"object",title:o,properties:{tag:o,values:{type:"array",items:r.type().map(eM)}},required:["tag","values"],additionalProperties:!1})}}),p={oneOf:f},u.length>0&&(p.description=u),p);break;case n.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value:var h,y,m,g,b,v,w,S,_=e.functionV0(),E=_.name().toString(),x=(y=(h=eD(_.inputs())).properties,m=h.required,g={additionalProperties:!1,properties:y,type:"object"},(null==m?void 0:m.length)>0&&(g.required=m),b={properties:{args:g}},w=(v=_.outputs()).length>0?eM(v[0]):eM(n.xdr.ScSpecTypeDef.scSpecTypeVoid()),(S=_.doc().toString()).length>0&&(b.description=S),b.additionalProperties=!1,w.additionalProperties=!1,{input:b,output:w}).input;t[E]=x;case n.xdr.ScSpecEntryKind.scSpecEntryUdtErrorEnumV0().value:}});var r={$schema:"http://json-schema.org/draft-07/schema#",definitions:eO(eO({},eN),t)};return e&&(r.$ref="#/definitions/".concat(e)),r}}],t=[{key:"fromWasm",value:(r=ex().m(function e(t){var r;return ex().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,function(e){return A.apply(this,arguments)}(t);case 1:return r=e.v,e.a(2,new i(r))}},e)}),o=function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){eT(i,n,o,a,s,"next",e)}function s(e){eT(i,n,o,a,s,"throw",e)}a(void 0)})},function(e){return o.apply(this,arguments)})}],e&&eB(i.prototype,e),t&&eB(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}(),eF=r(8287).Buffer;function eq(e){return(eq="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)}var eV=["method"],e$=["wasmHash","salt","format","fee","timeoutInSeconds","simulate"];function ez(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return eH(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;
2var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(eH(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,eH(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,eH(l,"constructor",u),eH(u,"constructor",c),c.displayName="GeneratorFunction",eH(u,o,"GeneratorFunction"),eH(l),eH(l,o,"Generator"),eH(l,n,function(){return this}),eH(l,"toString",function(){return"[object Generator]"}),(ez=function(){return{w:i,m:f}})()}function eH(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(eH=function(e,t,r,n){function i(t,r){eH(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function eG(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 eK(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eG(Object(r),!0).forEach(function(t){eX(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eG(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eW(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function eX(e,t,r){return(t=eQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eQ(e){var t=function(e,t){if("object"!=eq(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eq(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==eq(t)?t:t+""}function eJ(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function eY(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){eJ(i,n,o,a,s,"next",e)}function s(e){eJ(i,n,o,a,s,"throw",e)}a(void 0)})}}var eZ="__constructor";function e0(){return(e0=eY(ez().m(function e(t,r){var n,i,a,s,c,u=arguments;return ez().w(function(e){for(;;)switch(e.n){case 0:if(n=u.length>2&&void 0!==u[2]?u[2]:"hex",r&&r.rpcUrl){e.n=1;break}throw TypeError("options must contain rpcUrl");case 1:return i=r.rpcUrl,a={allowHttp:r.allowHttp},s=new o.Server(i,a),e.n=2,s.getContractWasmByHash(t,n);case 2:return c=e.v,e.a(2,eL.fromWasm(c))}},e)}))).apply(this,arguments)}var e1=function(){var e,t,r,i,a;function s(e,t){var r=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,s),eX(this,"txFromJSON",function(e){var t=JSON.parse(e),n=t.method,o=eW(t,eV);return em.fromJSON(eK(eK({},r.options),{},{method:n,parseResultXdr:function(e){return r.spec.funcResToNative(n,e)}}),o)}),eX(this,"txFromXDR",function(e){return em.fromXDR(r.options,e,r.spec)}),this.spec=e,this.options=t,this.spec.funcs().forEach(function(n){var o=n.name().toString();if(o!==eZ){var i=function(r,n){return em.build(eK(eK(eK({method:o,args:r&&e.funcArgsToScVals(o,r)},t),n),{},{errorTypes:e.errorCases().reduce(function(e,t){return eK(eK({},e),{},eX({},t.value(),{message:t.doc().toString()}))},{}),parseResultXdr:function(t){return e.funcResToNative(o,t)}}))};r[o]=0===e.getFunc(o).inputs().length?function(e){return i(void 0,e)}:i}})}return e=[{key:"deploy",value:(a=eY(ez().m(function e(t,r){var o,i,a,c,u,l,f,p,d;return ez().w(function(e){for(;;)switch(e.n){case 0:return o=r.wasmHash,i=r.salt,a=r.format,c=r.fee,u=r.timeoutInSeconds,l=r.simulate,f=eW(r,e$),e.n=1,function(e,t){return e0.apply(this,arguments)}(o,f,a);case 1:return p=e.v,d=n.Operation.createCustomContract({address:new n.Address(r.address||r.publicKey),wasmHash:"string"==typeof o?eF.from(o,null!=a?a:"hex"):o,salt:i,constructorArgs:t?p.funcArgsToScVals(eZ,t):[]}),e.a(2,em.buildWithOp(d,eK(eK({fee:c,timeoutInSeconds:u,simulate:l},f),{},{contractId:"ignored",method:eZ,parseResultXdr:function(e){return new s(p,eK(eK({},f),{},{contractId:n.Address.fromScVal(e).toString()}))}})))}},e)})),function(e,t){return a.apply(this,arguments)})},{key:"fromWasmHash",value:(i=eY(ez().m(function e(t,r){var n,i,a,c,u,l=arguments;return ez().w(function(e){for(;;)switch(e.n){case 0:if(n=l.length>2&&void 0!==l[2]?l[2]:"hex",r&&r.rpcUrl){e.n=1;break}throw TypeError("options must contain rpcUrl");case 1:return i=r.rpcUrl,a={allowHttp:r.allowHttp},c=new o.Server(i,a),e.n=2,c.getContractWasmByHash(t,n);case 2:return u=e.v,e.a(2,s.fromWasm(u,r))}},e)})),function(e,t){return i.apply(this,arguments)})},{key:"fromWasm",value:(r=eY(ez().m(function e(t,r){var n;return ez().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,eL.fromWasm(t);case 1:return n=e.v,e.a(2,new s(n,r))}},e)})),function(e,t){return r.apply(this,arguments)})},{key:"from",value:(t=eY(ez().m(function e(t){var r,n,i,a,c;return ez().w(function(e){for(;;)switch(e.n){case 0:if(t&&t.rpcUrl&&t.contractId){e.n=1;break}throw TypeError("options must contain rpcUrl and contractId");case 1:return r=t.rpcUrl,n=t.contractId,i={allowHttp:t.allowHttp},a=new o.Server(r,i),e.n=2,a.getContractWasmByContractId(n);case 2:return c=e.v,e.a(2,s.fromWasm(c,t))}},e)})),function(e){return t.apply(this,arguments)})}],function(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,eQ(n.key),n)}}(s,e),Object.defineProperty(s,"prototype",{writable:!1}),s}()},6549:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},6556:(e,t,r)=>{"use strict";var n=r(453),o=r(3126),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}},6578:e=>{"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},6688:(e,t,r)=>{var n;function o(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function i(e){var t=o();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),t.writableStream=a(r.g.WritableStream),t.abortController=a(r.g.AbortController),t.arraybuffer=t.fetch||i("arraybuffer"),t.msstream=!t.fetch&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!o()&&a(o().overrideMimeType),n=null},6698: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}}},6708:(e,t,r)=>{"use strict";function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var r=t.entry;for(t.entry=null;r;){var n=r.callback;e.pendingcb--,n(void 0),r=r.next}e.corkedRequestsFree.next=t}}e.exports=A,A.WritableState=x;var i,a,s={deprecate:r(4643)},c=r(345),u=r(8287).Buffer,l=(void 0!==r.g?r.g:"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},f=r(5896),p=r(5291).getHighWaterMark,d=r(6048).F,h=d.ERR_INVALID_ARG_TYPE,y=d.ERR_METHOD_NOT_IMPLEMENT
2ED,m=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,S=d.ERR_UNKNOWN_ENCODING,_=f.errorOrDestroy;function E(){}function x(e,t,a){i=i||r(5382),e=e||{},"boolean"!=typeof a&&(a=t instanceof i),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=p(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){var r=t,o=e,i=r._writableState,a=i.sync,s=i.writecb;if("function"!=typeof s)throw new m;if(i.writing=!1,i.writecb=null,i.length-=i.writelen,i.writelen=0,o)--i.pendingcb,a?(n.default.nextTick(s,o),n.default.nextTick(j,r,i),r._writableState.errorEmitted=!0,_(r,o)):(s(o),r._writableState.errorEmitted=!0,_(r,o),j(r,i));else{var c=P(i)||r.destroyed;c||i.corked||i.bufferProcessing||!i.bufferedRequest||O(r,i),a?n.default.nextTick(k,r,i,c,s):k(r,i,c,s)}},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function A(e){var t=this instanceof(i=i||r(5382));if(!t&&!a.call(A,this))return new A(e);this._writableState=new x(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function T(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function k(e,t,r,n){r||0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain")),t.pendingcb--,n(),j(e,t)}function O(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),i=t.corkedRequestsFree;i.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,T(e,t,!0,t.length,n,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,l=r.callback;if(T(e,t,!1,t.objectMode?1:c.length,c,u,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),j(e,t)})}function j(e,t){var r=P(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.default.nextTick(B,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var o=e._readableState;(!o||o.autoDestroy&&o.endEmitted)&&e.destroy()}return r}r(6698)(A,c),x.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===A&&e&&e._writableState instanceof x}})):a=function(e){return e instanceof this},A.prototype.pipe=function(){_(this,new g)},A.prototype.write=function(e,t,r){var o,i,a,s,c,f,p,d=this._writableState,y=!1,m=!d.objectMode&&(p=e,u.isBuffer(p)||p instanceof l);return m&&!u.isBuffer(e)&&(o=e,e=u.from(o)),"function"==typeof t&&(r=t,t=null),m?t="buffer":t||(t=d.defaultEncoding),"function"!=typeof r&&(r=E),d.ending?(i=r,_(this,a=new w),n.default.nextTick(i,a)):(m||(s=e,c=r,null===s?f=new v:"string"==typeof s||d.objectMode||(f=new h("chunk",["string","Buffer"],s)),!f||(_(this,f),n.default.nextTick(c,f),0)))&&(d.pendingcb++,y=function(e,t,r,n,o,i){if(!r){var a,s,c=(a=n,s=o,t.objectMode||!1===t.decodeStrings||"string"!=typeof a||(a=u.from(a,s)),a);n!==c&&(r=!0,o="buffer",n=c)}var l=t.objectMode?1:n.length;t.length+=l;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var p=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:i,next:null},p?p.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,l,n,o,i);return f}(this,d,m,e,t,r)),y},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||O(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new y("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var o,i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||(o=r,i.ending=!0,j(this,i),o&&(i.finished?n.default.nextTick(o):this.once("finish",o)),i.ended=!0,this.writable=!1),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(e,t){t(e)}},6743:(e,t,r)=>{"use strict";var n=r(9353);e.exports=Function.prototype.bind||n},6866:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Parti
2al Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},6897:(e,t,r)=>{"use strict";var n=r(453),o=r(41),i=r(592)(),a=r(5795),s=r(9675),c=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>0xffffffff||c(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(u=!1)}return(n||u||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},6917:(e,t,r)=>{var o=r(8287).Buffer,i=r(6688),a=r(6698),s=r(8399),c=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=t.IncomingMessage=function(e,t,r,a){var c=this;if(s.Readable.call(c),c._mode=r,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){n.default.nextTick(function(){c.emit("close")})}),"fetch"===r){if(c._fetchResponse=t,c.url=t.url,c.statusCode=t.status,c.statusMessage=t.statusText,t.headers.forEach(function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)}),i.writableStream){var u=new WritableStream({write:function(e){return a(!1),new Promise(function(t,r){c._destroyed?r():c.push(o.from(e))?t():c._resumeFetch=t})},close:function(){a(!0),c._destroyed||c.push(null)},abort:function(e){a(!0),c._destroyed||c.emit("error",e)}});try{return void t.body.pipeTo(u).catch(function(e){a(!0),c._destroyed||c.emit("error",e)})}catch(e){}}var l=t.body.getReader();!function e(){l.read().then(function(t){c._destroyed||(a(t.done),t.done?c.push(null):(c.push(o.from(t.value)),e()))}).catch(function(e){a(!0),c._destroyed||c.emit("error",e)})}()}else if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}}),c._charset="x-user-defined",!i.overrideMimeType){var f=c.rawHeaders["mime-type"];if(f){var p=f.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}};a(u,s.Readable),u.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},u.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,i=null;switch(t._mode){case"text":if((i=n.responseText).length>t._pos){var a=i.substr(t._pos);if("x-user-defined"===t._charset){for(var s=o.alloc(a.length),u=0;u<a.length;u++)s[u]=255&a.charCodeAt(u);t.push(s)}else t.push(a,t._charset);t._pos=i.length}break;case"arraybuffer":if(n.readyState!==c.DONE||!n.response)break;i=n.response,t.push(o.from(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=n.response,n.readyState!==c.LOADING||!i)break;t.push(o.from(new Uint8Array(i)));break;case"ms-stream":if(i=n.response,n.readyState!==c.LOADING)break;var l=new r.g.MSStreamReader;l.onprogress=function(){l.result.byteLength>t._pos&&(t.push(o.from(new Uint8Array(l.result.slice(t._pos)))),t._pos=l.result.byteLength)},l.onload=function(){e(!0),t.push(null)},l.readAsArrayBuffer(i)}t._xhr.readyState===c.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},7007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise(function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}y(e,t,i,{once:!0}),"error"!==t&&"function"==typeof e.on&&y(e,"error",o,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var o,i,a;if(s(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=l.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):h(o,o.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)})}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
2,set:function(e){if("number"!=typeof e||e<0||o(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=h(c,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,f(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,f(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,a;if(s(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7119:e=>{"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},7176:(e,t,r)=>{"use strict";var n,o=r(3126),i=r(5795);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!n&&i&&i(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof c&&function(e){return c(null==e?e:s(e))}},7244:(e,t,r)=>{"use strict";var n=r(9092)(),o=r(6556)("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&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"callee"in e&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=s?i:a},7510:e=>{e.exports=function(){for(var e={},r=0;r<arguments.length;r++){var n=arguments[r];for(var o in n)t.call(n,o)&&(e[o]=n[o])}return e};var t=Object.prototype.hasOwnProperty},7526:(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],c=i[1],u=new o(3*(a+c)/4-c),l=0,f=c>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)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>
24,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(function(e,t,n){for(var o,i=[],a=t;a<n;a+=3)i.push(r[(o=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]))>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(e,a,a+16383>s?s:a+16383));return 1===o?i.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===o&&i.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],n=[],o="u">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 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]}n[45]=62,n[95]=63},7600:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Api:()=>{},FEDERATION_RESPONSE_MAX_SIZE:()=>g,Server:()=>b});var n=r(8950),o=r(4193),i=r.n(o),a=r(8732),s=r(5976),c=r(3898),u=r(9983);function l(e){return(l="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 f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return d(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(d(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,d(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,d(l,"constructor",u),d(u,"constructor",c),c.displayName="GeneratorFunction",d(u,o,"GeneratorFunction"),d(l),d(l,o,"Generator"),d(l,n,function(){return this}),d(l,"toString",function(){return"[object Generator]"}),(p=function(){return{w:i,m:f}})()}function d(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(d=function(e,t,r,n){function i(t,r){d(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function h(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,s,"next",e)}function s(e){h(i,n,o,a,s,"throw",e)}a(void 0)})}}function m(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,function(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=l(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==l(t)?t:t+""}(n.key),n)}}var g=102400,b=function(){var e,t,r,o,l,d,h,b;function v(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,v),this.serverURL=i()(e),this.domain=t;var n=void 0===r.allowHttp?a.T.isAllowHttp():r.allowHttp;if(this.timeout=void 0===r.timeout?a.T.getTimeout():r.timeout,"https"!==this.serverURL.protocol()&&!n)throw Error("Cannot connect to insecure federation server")}return e=[{key:"resolveAddress",value:(b=y(p().m(function e(t){var r,n;return p().w(function(e){for(;;)switch(e.n){case 0:if(r=t,!(0>t.indexOf("*"))){e.n=2;break}if(this.domain){e.n=1;break}return e.a(2,Promise.reject(Error("Unknown domain. Make sure `address` contains a domain (ex. `bob*stellar.org`) or pass `domain` parameter when instantiating the server object.")));case 1:r="".concat(t,"*").concat(this.domain);case 2:return n=this.serverURL.query({type:"name",q:r}),e.a(2,this._sendRequest(n))}},e,this)})),function(e){return b.apply(this,arguments)})},{key:"resolveAccountId",value:(h=y(p().m(function e(t){var r;return p().w(function(e){for(;;)if(0===e.n)return r=this.serverURL.query({type:"id",q:t}),e.a(2,this._sendRequest(r))},e,this)})),function(e){return h.apply(this,arguments)})},{key:"resolveTransactionId",value:(d=y(p().m(function e(t){var r;return p().w(function(e){for(;;)if(0===e.n)return r=this.serverURL.query({type:"txid",q:t}),e.a(2,this._sendRequest(r))},e,this)})),function(e){return d.apply(this,arguments)})},{key:"_sendRequest",value:(l=y(p().m(function e(t){var r;return p().w(function(e){for(;;)if(0===e.n)return r=this.timeout,e.a(2,u.ok.get(t.toString(),{maxContentLength:g,timeout:r}).then(function(e){if(void 0!==e.data.memo&&"string"!=typeof e.data.memo)throw Error("memo value should be of type string");return e.data}).catch(function(e){if(e instanceof Error){if(e.message.match(/^maxContentLength size/))throw Error("federation response exceeds allowed size of ".concat(g));return Promise.reject(e)}return Promise.reject(new s.nS("Server query failed. Server responded: ".concat(e.status," ").concat(e.statusText),e.data))}))},e,this)})),function(e){return l.apply(this,arguments)})}],t=[{key:"resolve",value:(o=y(p().m(function e(t){var r,o,i,a,s=arguments;return p().w(function(e){for(;;)switch(e.n){case 0:if(r=s.length>1&&void 0!==s[1]?s[1]:{},!(0>t.indexOf("*"))){e.n=2;break}if(n.StrKey.isValidEd25519PublicKey(t)){e.n=1;break}return e.a(2,Promise.reject(Error("Invalid Account ID")));case 1:return e.a(2,Promise.resolve({account_id:t}));case 2:var c;if(i=(function(e){if(Array.isArray(e))return e}(c=o=t.split("*"))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o,i,a=[],s=!0,c=!1;try{o=(t=t.call(e)).next,!1;for(;!(s=(r=o.call(t)).done)&&(a.push(r.value),2!==a.length);s=!0);}catch(e){c=!0,n=e}
2finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw n}}return a}}(c)||function(e){if(e){if("string"==typeof e)return f(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,2):void 0}}(c)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1],2===o.length&&i){e.n=3;break}return e.a(2,Promise.reject(Error("Invalid Stellar address")));case 3:return e.n=4,v.createForDomain(i,r);case 4:return a=e.v,e.a(2,a.resolveAddress(t))}},e)})),function(e){return o.apply(this,arguments)})},{key:"createForDomain",value:(r=y(p().m(function e(t){var r,n,o=arguments;return p().w(function(e){for(;;)switch(e.n){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},e.n=1,c.Resolver.resolve(t,r);case 1:if((n=e.v).FEDERATION_SERVER){e.n=2;break}return e.a(2,Promise.reject(Error("stellar.toml does not contain FEDERATION_SERVER field")));case 2:return e.a(2,new v(n.FEDERATION_SERVER,t,r))}},e)})),function(e){return r.apply(this,arguments)})}],e&&m(v.prototype,e),t&&m(v,t),Object.defineProperty(v,"prototype",{writable:!1}),v}()},7720:(e,t,r)=>{"use strict";var n=r(4765),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],a=o.obj[o.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:u}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var c="",u=0;u<s.length;u+=1024){for(var l=s.length>=1024?s.slice(u,u+1024):s,f=[],p=0;p<l.length;++p){var d=l.charCodeAt(p);45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===n.RFC1738&&(40===d||41===d)?f[f.length]=l.charAt(p):d<128?f[f.length]=a[d]:d<2048?f[f.length]=a[192|d>>6]+a[128|63&d]:d<55296||d>=57344?f[f.length]=a[224|d>>12]+a[128|d>>6&63]+a[128|63&d]:(p+=1,d=65536+((1023&d)<<10|1023&l.charCodeAt(p)),f[f.length]=a[240|d>>18]+a[128|d>>12&63]+a[128|d>>6&63]+a[128|63&d])}c+=f.join("")}return c},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return i(t)&&!i(r)&&(a=s(t,n)),i(t)&&i(r)?(r.forEach(function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r}),t):Object.keys(r).reduce(function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t},a)}}},7758:(e,t,r)=>{"use strict";var n,o=r(6048).F,i=o.ERR_MISSING_ARGS,a=o.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];var l,f,p=(l=t).length?"function"!=typeof l[l.length-1]?s:l.pop():s;
2if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new i("streams");var d=t.map(function(e,o){var i,s,u,l,h,y,m=o<t.length-1;return i=o>0,u=s=function(e){f||(f=e),e&&d.forEach(c),m||(d.forEach(c),p(f))},l=!1,s=function(){l||(l=!0,u.apply(void 0,arguments))},h=!1,e.on("close",function(){h=!0}),void 0===n&&(n=r(6238)),n(e,{readable:m,writable:i},function(e){if(e)return s(e);h=!0,s()}),y=!1,function(t){if(!h&&!y)return y=!0,e.setHeader&&"function"==typeof e.abort?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new a("pipe"))}});return t.reduce(u)}},8002:e=>{"use strict";e.exports=Math.min},8068:e=>{"use strict";e.exports=SyntaxError},8184:(e,t,r)=>{"use strict";var n,o=r(6556),i=r(9721)(/^\s*(?:function)?\*/),a=r(9092)(),s=r(3628),c=o("Object.prototype.toString"),u=o("Function.prototype.toString");e.exports=function(e){if("function"!=typeof e)return!1;if(i(u(e)))return!0;if(!a)return"[object GeneratorFunction]"===c(e);if(!s)return!1;if(void 0===n){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&s(t)}return s(e)===n}},8242:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Api:()=>{}})},8287:(e,t,r)=>{"use strict";let n=r(7526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e){var n=t;if("string"==typeof n&&""!==n||(n="utf8"),!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);let r=0|h(e,n),o=a(r),i=o.write(e,n);return i!==r&&(o=o.slice(0,i)),o}if(ArrayBuffer.isView(e)){if(D(e,Uint8Array)){let t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(D(e,ArrayBuffer)||e&&D(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(D(e,SharedArrayBuffer)||e&&D(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return s.from(o,t,r);let i=function(e){var t;if(s.isBuffer(e)){let t=0|d(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?a(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(i)return i;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return u(e),a(e<0?0:0|d(e))}function f(e){let t=e.length<0?0:0|d(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){let n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),s.prototype),n}function d(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||D(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let 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 U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(e).length;default:if(o)return n?-1:U(e).length;t=(""+t).toLowerCase(),o=!0}}function y(e,t,r){let o=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let 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+=L[e[n]];return o}(this,t,r);case"utf8":case"utf-8":return v(this,t,r);case"ascii":return function(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}(this,t,r);case"latin1":case"binary":return 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}(this,t,r);case"base64":var i,a,s;return i=this,a=t,s=r,0===a&&s===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(a,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let n=e.slice(t,r),o="";for(let e=0;e<n.length-1;
2e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}(this,t,r);default:if(o)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function m(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){var i;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(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=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:b(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):b(e,[t],r,n,o);throw TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){let i,a=1,s=e.length,c=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,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(u(e,i)===u(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===c)return n*a}else -1!==n&&(i-=i-n),n=-1}else for(r+c>s&&(r=s-c),i=r;i>=0;i--){let r=!0;for(let n=0;n<c;n++)if(u(e,i+n)!==u(t,n)){r=!1;break}if(r)return i}return -1}function v(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o<r;){let t=e[o],i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:128==(192&(r=e[o+1]))&&(c=(31&t)<<6|63&r)>127&&(i=c);break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n)>2047&&(c<55296||c>57343)&&(i=c);break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&c<1114112&&(i=c)}}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}let i=n.length;if(i<=w)return String.fromCharCode.apply(String,n);let a="",s=0;for(;s<i;)a+=String.fromCharCode.apply(String,n.slice(s,s+=w));return a}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,s.TYPED_ARRAY_SUPPORT=function(){try{let 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}}(),s.TYPED_ARRAY_SUPPORT||"u"<typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return u(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return l(e)},s.allocUnsafeSlow=function(e){return l(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(D(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),D(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw 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)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;let n=s.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){let t=e[r];if(D(t,Uint8Array))o+t.length>n.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!s.isBuffer(t))throw TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},s.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},s.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},s.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?v(this,0,e):y.apply(this,arguments)}
vendor: 11,872 bytes, line 2
2,s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){let e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,o){if(D(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw 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 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),c=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<c;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i<a?-1:+(a<i)},s.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){var o,i,a,s,c,u,l,f;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 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)}let p=this.length-t;if((void 0===r||r>p)&&(r=p),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let d=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let o;r=Number(r)||0;let i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;let a=t.length;for(n>a/2&&(n=a/2),o=0;o<n;++o){var s;let n=parseInt(t.substr(2*o,2),16);if((s=n)!=s)break;e[r+o]=n}return o}(this,e,t,r);case"utf8":case"utf-8":return o=t,i=r,M(U(e,this.length-o),this,o,i);case"ascii":case"latin1":case"binary":return a=t,s=r,M(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,a,s);case"base64":return c=t,u=r,M(N(e),this,c,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=t,f=r,M(function(e,t){let r,n,o=[];for(let i=0;i<e.length&&!((t-=2)<0);++i)n=(r=e.charCodeAt(i))>>8,o.push(r%256),o.push(n);return o}(e,this.length-l),this,l,f);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let w=4096;function S(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,o,i){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function E(e,t,r,n,o){j(t,n,o,e,r,7);let i=Number(t&BigInt(0xffffffff));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(0xffffffff));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function x(e,t,r,n,o){j(t,n,o,e,r,7);let i=Number(t&BigInt(0xffffffff));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(0xffffffff));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 A(e,t,r,n,o,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,r,n,i){return t*=1,r>>>=0,i||A(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function k(e,t,r,n,i){return t*=1,r>>>=0,i||A(e,0,r,8),o.write(e,t,r,n,52,8),r+8}s.prototype.slice=function(e,t){let 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);let n=this.subarray(e,t);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||S(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||S(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||S(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||S(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||S(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||S(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||S(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=F(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];void 0!==t&&void 0!==r||C(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],o=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(n)+(BigInt(o)<<BigInt(32))}),s.prototype.readBigUInt64BE=F(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];void 0!==t&&void 0!==r||C(e,this.length-8);let n=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],o=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)}),s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||S(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||S(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return e>>>=0,t||S(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||S(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||S(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||S(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||S(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=F(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];return void 0!==t&&void 0!==r||C(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+0x1000000*this[++e])}),s.prototype.readBigInt64BE=F(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];return void 0!==t&&void 0!==r||C(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||S(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||S(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||S(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||S(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){e*=1,t>>>=0,r>>>=0,n||_(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},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,r,n){e*=1,t>>>=0,r>>>=0,n||_(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},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=F(function(e,t=0){return E(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=F(function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);_(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},s.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);_(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},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=F(function(e,t=0){return E(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=F(function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return k(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return k(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw 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||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);let 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},s.prototype.fill=function(e,t,r,n){let o;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 TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){let 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 RangeError("Out of range index");if(r<=t)return this;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{let i=s.isBuffer(e)?e:s.from(e,n),a=i.length;
2if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};let O={};function P(e,t,r){O[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 B(e){let t="",r=e.length,n=+("-"===e[0]);for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function j(e,t,r,n,o,i){if(e>r||e<t){let n,o="bigint"==typeof t?"n":"";throw n=i>3?0===t||t===BigInt(0)?`>= 0${o} and < 2${o} ** ${8*(i+1)}${o}`:`>= -(2${o} ** ${8*(i+1)-1}${o}) and < 2 ** ${8*(i+1)-1}${o}`:`>= ${t}${o} and <= ${r}${o}`,new O.ERR_OUT_OF_RANGE("value",n,e)}I(o,"offset"),void 0!==n[o]&&void 0!==n[o+i]||C(o,n.length-(i+1))}function I(e,t){if("number"!=typeof e)throw new O.ERR_INVALID_ARG_TYPE(t,"number",e)}function C(e,t,r){if(Math.floor(e)!==e)throw I(e,r),new O.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new O.ERR_BUFFER_OUT_OF_BOUNDS;throw new O.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}P("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),P("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),P("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)>0x100000000?o=B(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=B(o)),o+="n"),n+=` It must be ${t}. Received ${o}`},RangeError);let R=/[^+/0-9A-Za-z-_]/g;function U(e,t){let r;t=t||1/0;let n=e.length,o=null,i=[];for(let a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319||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 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 N(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function M(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 D(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let L=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function F(e){return"u"<typeof BigInt?q:e}function q(){throw Error("BigInt not supported")}},8399:(e,t,r)=>{(t=e.exports=r(5412)).Stream=t,t.Readable=t,t.Writable=r(6708),t.Duplex=r(5382),t.Transform=r(4610),t.PassThrough=r(3600),t.finished=r(6238),t.pipeline=r(7758)},8636:(e,t,r)=>{"use strict";var n=r(920),o=r(7720),i=r(4765),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,u=Array.prototype.push,l=function(e,t){u.apply(e,c(t)?t:[t])},f=Date.prototype.toISOString,p=i.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,filter:void 0,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},h={},y=function e(t,r,i,a,s,u,f,p,y,m,g,b,v,w,S,_,E,x){for(var A,T=t,k=x,O=0,P=!1;void 0!==(k=k.get(h))&&!P;){var B=k.get(t);if(O+=1,void 0!==B){if(B===O)throw RangeError("Cyclic object value");P=!0}void 0===k.get(h)&&(O=0)}if("function"==typeof m?T=m(r,T):T instanceof Date?T=v(T):"comma"===i&&c(T)&&(T=o.maybeMap(T,function(e){return e instanceof Date?v(e):e})),null===T){if(u)return y&&!_?y(r,d.encoder,E,"key",w):r;T=""}if("string"==typeof(A=T)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||o.isBuffer(T))return y?[S(_?r:y(r,d.encoder,E,"key",w))+"="+S(y(T,d.encoder,E,"value",w))]:[S(r)+"="+S(String(T))];var j,I=[];if(void 0===T)return I;if("comma"===i&&c(T))_&&y&&(T=o.maybeMap(T,y)),j=[{value:T.length>0?T.join(",")||null:void 0}];else if(c(m))j=m;else{var C=Object.keys(T);j=g?C.sort(g):C}var R=p?String(r).replace(/\./g,"%2E"):String(r),U=a&&c(T)&&1===T.length?R+"[]":R;if(s&&c(T)&&0===T.length)return U+"[]";for(var N=0;N<j.length;++N){var M=j[N],D="object"==typeof M&&M&&void 0!==M.value?M.value:T[M];if(!f||null!==D){var L=b&&p?String(M).replace(/\./g,"%2E"):String(M),F=c(T)?"function"==typeof i?i(U,L):U:U+(b?"."+L:"["+L+"]");x.set(t,O);var q=n();q.set(h,x),l(I,e(D,F,i,a,s,u,f,p,"comma"===i&&_&&c(T)?null:y,m,g,b,v,w,S,_,E,q))}}return I};e.exports=function(e,t){var r,o=e,u=function(e){if(!e)return d;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
2if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw TypeError("Unknown format option provided.");r=e.format}var n,o=i.formatters[r],u=d.filter;if(("function"==typeof e.filter||c(e.filter))&&(u=e.filter),n=e.arrayFormat in s?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":d.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var l=void 0===e.allowDots?!0===e.encodeDotInKeys||d.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:l,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:n,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:d.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:u,format:r,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof u.filter?o=(0,u.filter)("",o):c(u.filter)&&(r=u.filter);var f=[];if("object"!=typeof o||null===o)return"";var p=s[u.arrayFormat],h="comma"===p&&u.commaRoundTrip;r||(r=Object.keys(o)),u.sort&&r.sort(u.sort);for(var m=n(),g=0;g<r.length;++g){var b=r[g],v=o[b];u.skipNulls&&null===v||l(f,y(v,b,p,h,u.allowEmptyArrays,u.strictNullHandling,u.skipNulls,u.encodeDotInKeys,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,m))}var w=f.join(u.delimiter),S=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),w.length>0?S+w:""}},8648:e=>{"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},8680:(e,t,r)=>{"use strict";r.d(t,{X:()=>function e(t,r){if("innerTransaction"in t)return e(t.innerTransaction,r);if(!function(e){if(1!==e.operations.length)return!1;switch(e.operations[0].type){case"invokeHostFunction":case"extendFootprintTtl":case"restoreFootprint":return!0;default:return!1}}(t))throw TypeError("unsupported transaction: must contain exactly one invokeHostFunction, extendFootprintTtl, or restoreFootprint operation");var a=(0,i.jr)(r);if(!o.j.isSimulationSuccess(a))throw Error("simulation incorrect: ".concat(JSON.stringify(a)));var s=parseInt(t.fee)||0,c=parseInt(a.minResourceFee)||0,u=n.TransactionBuilder.cloneFrom(t,{fee:(s+c).toString(),sorobanData:a.transactionData.build(),networkPassphrase:t.networkPassphrase});if("invokeHostFunction"===t.operations[0].type){u.clearOperations();var l,f=t.operations[0],p=null!=(l=f.auth)?l:[];u.addOperation(n.Operation.invokeHostFunction({source:f.source,func:f.func,auth:p.length>0?p:a.result.auth}))}return u}});var n=r(8950),o=r(4076),i=r(784)},8732:(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})(e)}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]:{};
2t%2?o(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=a(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):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){var t=function(e,t){if("object"!=n(e)||!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 TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==n(t)?t:t+""}r.d(t,{T:()=>l});var s,c={allowHttp:!1,timeout:0},u=i({},c),l=(function(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,a(n.key),n)}}(s=function e(){if(!(this instanceof e))throw TypeError("Cannot call a class as a function")},[{key:"setAllowHttp",value:function(e){u.allowHttp=e}},{key:"setTimeout",value:function(e){u.timeout=e}},{key:"isAllowHttp",value:function(){return u.allowHttp}},{key:"getTimeout",value:function(){return u.timeout}},{key:"setDefault",value:function(){u=i({},c)}}]),Object.defineProperty(s,"prototype",{writable:!1}),s)},8733:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AccountResponse:()=>S,AxiosClient:()=>K,HorizonApi:()=>c,SERVER_TIME_MAP:()=>z,Server:()=>tW,ServerApi:()=>l,default:()=>tX,getCurrentServerTime:()=>W}),(n=c||(c={})).LiquidityPoolType=((o={}).constantProduct="constant_product",o),(i={}).createAccount="create_account",i.payment="payment",i.pathPayment="path_payment_strict_receive",i.createPassiveOffer="create_passive_sell_offer",i.manageOffer="manage_sell_offer",i.setOptions="set_options",i.changeTrust="change_trust",i.allowTrust="allow_trust",i.accountMerge="account_merge",i.inflation="inflation",i.manageData="manage_data",i.bumpSequence="bump_sequence",i.manageBuyOffer="manage_buy_offer",i.pathPaymentStrictSend="path_payment_strict_send",i.createClaimableBalance="create_claimable_balance",i.claimClaimableBalance="claim_claimable_balance",i.beginSponsoringFutureReserves="begin_sponsoring_future_reserves",i.endSponsoringFutureReserves="end_sponsoring_future_reserves",i.revokeSponsorship="revoke_sponsorship",i.clawback="clawback",i.clawbackClaimableBalance="clawback_claimable_balance",i.setTrustLineFlags="set_trust_line_flags",i.liquidityPoolDeposit="liquidity_pool_deposit",i.liquidityPoolWithdraw="liquidity_pool_withdraw",i.invokeHostFunction="invoke_host_function",i.bumpFootprintExpiration="bump_footprint_expiration",i.restoreFootprint="restore_footprint",n.OperationResponseType=i,(a={})[a.createAccount=0]="createAccount",a[a.payment=1]="payment",a[a.pathPayment=2]="pathPayment",a[a.createPassiveOffer=3]="createPassiveOffer",a[a.manageOffer=4]="manageOffer",a[a.setOptions=5]="setOptions",a[a.changeTrust=6]="changeTrust",a[a.allowTrust=7]="allowTrust",a[a.accountMerge=8]="accountMerge",a[a.inflation=9]="inflation",a[a.manageData=10]="manageData",a[a.bumpSequence=11]="bumpSequence",a[a.manageBuyOffer=12]="manageBuyOffer",a[a.pathPaymentStrictSend=13]="pathPaymentStrictSend",a[a.createClaimableBalance=14]="createClaimableBalance",a[a.claimClaimableBalance=15]="claimClaimableBalance",a[a.beginSponsoringFutureReserves=16]="beginSponsoringFutureReserves",a[a.endSponsoringFutureReserves=17]="endSponsoringFutureReserves",a[a.revokeSponsorship=18]="revokeSponsorship",a[a.clawback=19]="clawback",a[a.clawbackClaimableBalance=20]="clawbackClaimableBalance",a[a.setTrustLineFlags=21]="setTrustLineFlags",a[a.liquidityPoolDeposit=22]="liquidityPoolDeposit",a[a.liquidityPoolWithdraw=23]="liquidityPoolWithdraw",a[a.invokeHostFunction=24]="invokeHostFunction",a[a.bumpFootprintExpiration=25]="bumpFootprintExpiration",a[a.restoreFootprint=26]="restoreFootprint",n.OperationResponseTypeI=a,(s={}).TX_FAILED="tx_failed",s.TX_BAD_SEQ="tx_bad_seq",s.TX_BAD_AUTH="tx_bad_auth",s.TX_BAD_AUTH_EXTRA="tx_bad_auth_extra",s.TX_FEE_BUMP_INNER_SUCCESS="tx_fee_bump_inner_success",s.TX_FEE_BUMP_INNER_FAILED="tx_fee_bump_inner_failed",s.TX_NOT_SUPPORTED="tx_not_supported",s.TX_SUCCESS="tx_success",s.TX_TOO_EARLY="tx_too_early",s.TX_TOO_LATE="tx_too_late",s.TX_MISSING_OPERATION="tx_missing_operation",s.TX_INSUFFICIENT_BALANCE="tx_insufficient_balance",s.TX_NO_SOURCE_ACCOUNT="tx_no_source_account",s.TX_INSUFFICIENT_FEE="tx_insufficient_fee",s.TX_INTERNAL_ERROR="tx_internal_error",n.TransactionFailedResultCodes=s;var n,o,i,a,s,c,u,l,f=((u={})[u.account_created=0]="account_created",u[u.account_removed=1]="account_removed",u[u.account_credited=2]="account_credited",u[u.account_debited=3]="account_debited",u[u.account_thresholds_updated=4]="account_thresholds_updated",u[u.account_home_domain_updated=5]="account_home_domain_updated",u[u.account_flags_updated=6]="account_flags_updated",u[u.account_inflation_destination_updated=7]="account_inflation_destination_updated",u[u.signer_created=10]="signer_created",u[u.signer_removed=11]="signer_removed",u[u.signer_updated=12]="signer_updated",u[u.trustline_created=20]="trustline_created",u[u.trustline_removed=21]="trustline_removed",u[u.trustline_updated=22]="trustline_updated",u[u.trustline_authorized=23]="trustline_authorized",u[u.trustline_deauthorized=24]="trustline_deauthorized",u[u.trustline_authorized_to_maintain_liabilities=25]="trustline_authorized_to_maintain_liabilities",u[u.trustline_flags_updated=26]="trustline_flags_updated",u[u.offer_created=30]="offer_created",u[u.offer_removed=31]="offer_removed",u[u.offer_updated=32]="offer_updated",u[u.trade=33]="trade",u[u.data_created=40]="data_created",u[u.data_removed=41]="data_removed",u[u.data_updated=42]="data_updated",u[u.sequence_bumped=43]="sequence_bumped",u[u.claimable_balance_created=50]="claimable_balance_created",u[u.claimable_balance_claimant_created=51]="claimable_balance_claimant_created",u[u.claimable_balance_claimed=52]="claimable_balance_claimed",u[u.account_sponsorship_created=60]="account_sponsorship_created",u[u.account_sponsorship_updated=61]="account_sponsorship_updated",u[u.account_sponsorship_removed=62]="account_sponsorship_removed",u[u.trustline_sponsorship_created=63]="trustline_sponsorship_created",u[u.trustline_sponsorship_updated=64]="trustline_sponsorship_updated",u[u.trustline_sponsorship_removed=65]="trustline_sponsorship_removed",u[u.data_sponsorship_created=66]="data_sponsorship_created",u[u.data_sponsorship_updated=67]="data_sponsorship_updated",u[u.data_sponsorship_removed=68]="data_sponsorship_removed",u[u.claimable_balance_sponsorship_created=69]="claimable_balance_sponsorship_created",u[u.claimable_balance_sponsorship_updated=70]="claimable_balance_sponsorship_updated",u[u.claimable_balance_sponsorship_removed=71]="claimable_balance_sponsorship_removed",u[u.signer_sponsorship_created=72]="signer_sponsorship_created",u[u.signer_sponsorship_updated=73]="signer_sponsorship_updated",u[u.signer_sponsorship_removed=74]="signer_sponsorship_removed",u[u.claimable_balance_clawed_back=80]="claimable_balance_clawed_back",u[u.liquidity_pool_deposited=90]="liquidity_pool_deposited",u[u.liquidity_pool_withdrew=91]="liquidity_pool_withdrew",u[u.liquidity_pool_trade=92]="liquidity_pool_trade",u[u.liquidity_pool_created=93]="liquidity_pool_created",u[u.liquidity_pool_removed=94]="liquidity_pool_removed",u[u.liquidity_pool_revoked=95]="liquidity_pool_revoked",u[u.contract_credited=96]="contract_credited",u[u.contract_debited=97]="contract_debited",u);(m=l||(l={})).EffectType=f,(g={}).all="all",g.liquidityPools="liquidity_pool",g.orderbook="orderbook",m.TradeType=g,c.OperationResponseType,c.OperationResponseTypeI;var p=r(8950);function d(e){return(d="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 h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(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,function(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==d(t)?t:t+""}(n.key),n)}}var m,g,b,v,w,S=(v=[{key:"accountId",value:function(){return this._baseAccount.accountId()}},{key:"sequenceNumber",value:function(){return this._baseAccount.sequenceNumber()}},{key:"incrementSequenceNumber",value:function(){this._baseAccount.incrementSequenceNumber(),this.sequence=this._baseAccount.sequenceNumber()}}],y((b=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this._baseAccount=new p.Account(t.account_id,t.sequence),Object.entries(t).forEach(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o,i,a=[],s=!0,c=!1;try{o=(t=t.call(e)).next,!1;for(;!(s=(r=o.call(t)).done)&&(a.push(r.value),2!==a.length);s=!0);}catch(e){c=!0,n=e}
2finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return h(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,2):void 0}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],o=t[1];r[n]=o})}).prototype,v),w&&y(b,w),Object.defineProperty(b,"prototype",{writable:!1}),b),_=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,E=Math.ceil,x=Math.floor,A="[BigNumber Error] ",T=A+"Number primitive has more than 15 significant digits: ",k=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function O(e){var t=0|e;return e>0||e===t?t:t-1}function P(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(r=14-(t=e[n++]+"").length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function B(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,u=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=c==u,!o||!i)return n?0:!o^r?1:-1;if(!n)return c>u^r?1:-1;for(s=(c=o.length)<(u=i.length)?c:u,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return c==u?0:c>u^r?1:-1}function j(e,t,r,n){if(e<t||e>r||e!==x(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 I(e){var t=e.c.length-1;return O(e.e/14)==t&&e.c[t]%2!=0}function C(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function R(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 U=function e(t){var r,n,o,i,a,s,c,u,l,f=D.prototype={constructor:D,toString:null,valueOf:null},p=new D(1),d=20,h=4,y=-7,m=21,g=-1e7,b=1e7,v=!1,w=1,S=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},N="0123456789abcdefghijklmnopqrstuvwxyz",M=!0;function D(e,t){var r,i,a,s,c,u,l,f,p=this;if(!(p instanceof D))return new D(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<g?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!_.test(f=String(e)))return o(p,f,u);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(c=f.search(/e/i))>0?(s<0&&(s=c),s+=+f.slice(c+1),f=f.substring(0,c)):s<0&&(s=f.length)}else{if(j(t,2,N.length,"Base"),10==t&&M)return V(p=new D(e),d+p.e+1,h);if(f=String(e),u="number"==typeof e){if(0*e!=0)return o(p,f,u,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,D.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(T+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=N.slice(0,t),s=c=0,l=f.length;c<l;c++)if(0>r.indexOf(i=f.charAt(c))){if("."==i){if(c>s){s=l;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,c=-1,s=0;continue}return o(p,String(e),u,t)}u=!1,(s=(f=n(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(c=0;48===f.charCodeAt(c);c++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(c,++l)){if(l-=c,u&&D.DEBUG&&l>15&&(e>0x1fffffffffffff||e!==x(e)))throw Error(T+p.s*e);if((s=s-c-1)>b)p.c=p.e=null;else if(s<g)p.c=[p.e=0];else{if(p.e=s,p.c=[],c=(s+1)%14,s<0&&(c+=14),c<l){for(c&&p.c.push(+f.slice(0,c)),l-=14;c<l;)p.c.push(+f.slice(c,c+=14));c=14-(f=f.slice(c)).length}else c-=l;for(;c--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function L(e,t,r,n){var o,i,a,s,c;if(null==r?r=h:j(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=P(e.c),c=1==n||2==n&&(a<=y||a>=m)?C(c,a):R(c,a,"0");else if(i=(e=V(new D(e),t,r)).e,s=(c=P(e.c)).length,1==n||2==n&&(t<=i||i<=y)){for(;s<t;c+="0",s++);c=C(c,i)}else if(t-=a+(2===n&&i>a),c=R(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function F(e,t){for(var r,n,o=1,i=new D(e[0]);o<e.length;o++)(n=new D(e[o])).s&&(r=B(i,n))!==t&&(0!==r||i.s!==t)||(i=n);return i}function q(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+14*r-1)>b?e.c=e.e=null:r<g?e.c=[e.e=0]:(e.e=r,e.c=t),e}function V(e,t,r,n){var o,i,a,s,c,u,l,f=e.c;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=14,a=t,l=x((c=f[u=0])/k[o-a-1]%10);else if((u=E((i+1)/14))>=f.length){if(!n)break e;for(;f.length<=u;f.push(0));c=l=0,o=1,a=(i%=14)-14+1}else{for(c=s=f[u],o=1;s>=10;s/=10,o++);l=(a=(i%=14)-14+o)<0?0:x(c/k[o-a-1]%10)}if(n=n||t<0||null!=f[u+1]||(a<0?c:c%k[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?c/k[o-a]:0:f[u-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=k[(14-t%14)%14],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=u,s=1,u--):(f.length=u+1,s=k[14-i],f[u]=a>
20?x(c/k[o-a]%k[a])*s:0),n)for(;;){if(0==u){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++,1e14==f[0]&&(f[0]=1));break}if(f[u]+=s,1e14!=f[u])break;f[u--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<g&&(e.c=[e.e=0])}return e}function $(e){var t,r=e.e;return null===r?e.toString():(t=P(e.c),t=r<=y||r>=m?C(t,r):R(t,r,"0"),e.s<0?"-"+t:t)}return D.clone=e,D.ROUND_UP=0,D.ROUND_DOWN=1,D.ROUND_CEIL=2,D.ROUND_FLOOR=3,D.ROUND_HALF_UP=4,D.ROUND_HALF_DOWN=5,D.ROUND_HALF_EVEN=6,D.ROUND_HALF_CEIL=7,D.ROUND_HALF_FLOOR=8,D.EUCLID=9,D.config=D.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")&&(j(r=e[t],0,1e9,t),d=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(j(r=e[t],0,8,t),h=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(j(r[0],-1e9,0,t),j(r[1],0,1e9,t),y=r[0],m=r[1]):(j(r,-1e9,1e9,t),y=-(m=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)j(r[0],-1e9,-1,t),j(r[1],1,1e9,t),g=r[0],b=r[1];else{if(j(r,-1e9,1e9,t),!r)throw Error(A+t+" cannot be zero: "+r);g=-(b=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("u"<typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(A+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(j(r=e[t],0,9,t),w=r),e.hasOwnProperty(t="POW_PRECISION")&&(j(r=e[t],0,1e9,t),S=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(A+t+" not an object: "+r);U=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(A+t+" invalid: "+r);M="0123456789"==r.slice(0,10),N=r}}return{DECIMAL_PLACES:d,ROUNDING_MODE:h,EXPONENTIAL_AT:[y,m],RANGE:[g,b],CRYPTO:v,MODULO_MODE:w,POW_PRECISION:S,FORMAT:U,ALPHABET:N}},D.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!D.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"==({}
2).toString.call(n)){if((1===i||-1===i)&&o>=-1e9&&o<=1e9&&o===x(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%14)<1&&(t+=14),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=1e14||r!==x(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(A+"Invalid BigNumber: "+e)},D.maximum=D.max=function(){return F(arguments,-1)},D.minimum=D.min=function(){return F(arguments,1)},i=0x20000000000000*Math.random()&2097151?function(){return x(0x20000000000000*Math.random())}:function(){return 8388608*(0x40000000*Math.random()|0)+(8388608*Math.random()|0)},D.random=function(e){var t,r,n,o,a,s=0,c=[],u=new D(p);if(null==e?e=d:j(e,0,1e9),o=E(e/14),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(c.push(a%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw v=!1,Error(A+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(a=0x1000000000000*(31&t[s])+0x10000000000*t[s+1]+0x100000000*t[s+2]+0x1000000*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=o/7}if(!v)for(;s<o;)(a=i())<9e15&&(c[s++]=a%1e14);for(o=c[--s],e%=14,o&&e&&(a=k[14-e],c[s]=x(o/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=14);for(s=1,a=c[0];a>=10;a/=10,s++);s<14&&(n-=14-s)}return u.e=n,u.c=c,u},D.sum=function(){for(var e=1,t=arguments,r=new D(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,c=e.length;s<c;){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 c,u,l,f,p,y,m,g,b=n.indexOf("."),v=d,w=h;for(b>=0&&(f=S,S=0,n=n.replace(".",""),y=(g=new D(o)).pow(n.length-b),S=f,g.c=t(R(P(y.c),y.e,"0"),10,i,e),g.e=g.c.length),l=f=(m=t(n,o,i,s?(c=N,e):(c=e,N))).length;0==m[--f];m.pop());if(!m[0])return c.charAt(0);if(b<0?--l:(y.c=m,y.e=l,y.s=a,m=(y=r(y,g,v,w,i)).c,p=y.r,l=y.e),b=m[u=l+v+1],f=i/2,p=p||u<0||null!=m[u+1],p=w<4?(null!=b||p)&&(0==w||w==(y.s<0?3:2)):b>f||b==f&&(4==w||p||6==w&&1&m[u-1]||w==(y.s<0?8:7)),u<1||!m[0])n=p?R(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(m.length=u,p)for(--i;++m[--u]>i;)m[u]=0,u||(++l,m=[1].concat(m));for(f=m.length;!m[--f];);for(b=0,n="";b<=f;n+=c.charAt(m[b++]));n=R(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,a,s=0,c=e.length,u=t%1e7,l=t/1e7|0;for(e=e.slice();c--;)s=((o=u*(i=e[c]%1e7)+(n=l*i+(a=e[c]/1e7|0)*u)%1e7*1e7+s)/r|0)+(n/1e7|0)+l*a,e[c]=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]),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 c,u,l,f,p,d,h,y,m,g,b,v,w,S,_,E,A,T=n.s==o.s?1:-1,k=n.c,P=o.c;if(!(k&&k[0]&&P&&P[0]))return new D(n.s&&o.s&&(k?!P||k[0]!=P[0]:P)?k&&0==k[0]||!P?0*T:T/0:NaN);for(m=(y=new D(T)).c=[],T=i+(u=n.e-o.e)+1,s||(s=1e14,u=O(n.e/14)-O(o.e/14),T=T/14|0),l=0;P[l]==(k[l]||0);l++);if(P[l]>(k[l]||0)&&u--,T<0)m.push(1),f=!0;else{for(S=k.length,E=P.length,l=0,T+=2,(p=x(s/(P[0]+1)))>1&&(P=e(P,p,s),k=e(k,p,s),E=P.length,S=k.length),w=E,b=(g=k.slice(0,E)).length;b<E;g[b++]=0);A=[0].concat(A=P.slice()),_=P[0],P[1]>=s/2&&_++;do{if(p=0,(c=t(P,g,E,b))<0){if(v=g[0],E!=b&&(v=v*s+(g[1]||0)),(p=x(v/_))>1)for(p>=s&&(p=s-1),h=(d=e(P,p,s)).length,b=g.length;1==t(d,g,h,b);)p--,r(d,E<h?A:P,h,s),h=d.length,c=1;else 0==p&&(c=p=1),h=(d=P.slice()).length;if(h<b&&(d=[0].concat(d)),r(g,d,b,s),b=g.length,-1==c)for(;1>t(P,g,E,b);)p++,r(g,E<b?A:P,b,s),b=g.length}else 0===c&&(p++,g=[0]);m[l++]=p,g[0]?g[b++]=k[w]||0:(g=[k[w]],b=1)}while((w++<S||null!=g[0])&&T--)f=null!=g[0],m[0]||m.splice(0,1)}if(1e14==s){for(l=1,T=m[0];T>=10;T/=10,l++);V(y,i+(y.e=l+14*u-1)+1,a,f)}else y.e=u,y.r=+f;return y}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,u=/^-?(Infinity|NaN)$/,l=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,i=r?t:t.replace(l,"");if(u.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,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(s,"$1").replace(c,"0.$1")),t!=i))return new D(i,o);if(D.DEBUG)throw Error(A+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new D(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return B(this,new D(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o;if(null!=e)return j(e,0,1e9),null==t?t=h:j(t,0,8),V(new D(this),e+this.e+1,t);if(!(r=this.c))return null;if(n=((o=r.length-1)-O(this.e/14))*14,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n}
2,f.dividedBy=f.div=function(e,t){return r(this,new D(e,t),d,h)},f.dividedToIntegerBy=f.idiv=function(e,t){return r(this,new D(e,t),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,i,a,s,c,u,l=this;if((e=new D(e)).c&&!e.isInteger())throw Error(A+"Exponent not an integer: "+$(e));if(null!=t&&(t=new D(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 u=new D(Math.pow(+$(l),a?e.s*(2-I(e)):+$(e))),t?u.mod(t):u;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new D(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&&I(e)?-0:0,l.e>-1&&(i=1/i),new D(s?1/i:i);S&&(i=E(S/14+2))}for(a?(r=new D(.5),s&&(e.s=1),c=I(e)):c=(o=Math.abs(+$(e)))%2,u=new D(p);;){if(c){if(!(u=u.times(l)).c)break;i?u.c.length>i&&(u.c.length=i):n&&(u=u.mod(t))}if(o){if(0===(o=x(o/2)))break;c=o%2}else if(V(e=e.times(r),e.e+1,1),e.e>14)c=I(e);else{if(0==(o=+$(e)))break;c=o%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}return n?u:(s&&(u=p.div(u)),t?u.mod(t):i?V(u,S,h,void 0):u)},f.integerValue=function(e){var t=new D(this);return null==e?e=h:j(e,0,8),V(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===B(this,new D(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return B(this,new D(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=B(this,new D(e,t)))||0===t},f.isInteger=function(){return!!this.c&&O(this.e/14)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return 0>B(this,new D(e,t))},f.isLessThanOrEqualTo=f.lte=function(e,t){return -1===(t=B(this,new D(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,i,a=this.s;if(t=(e=new D(e,t)).s,!a||!t)return new D(NaN);if(a!=t)return e.s=-t,this.plus(e);var s=this.e/14,c=e.e/14,u=this.c,l=e.c;if(!s||!c){if(!u||!l)return u?(e.s=-t,e):new D(l?this:NaN);if(!u[0]||!l[0])return l[0]?(e.s=-t,e):new D(u[0]?this:3==h?-0:0)}if(s=O(s),c=O(c),u=u.slice(),a=s-c){for((i=a<0)?(a=-a,o=u):(c=s,o=l),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=u.length)<(t=l.length))?a:t,a=t=0;t<n;t++)if(u[t]!=l[t]){i=u[t]<l[t];break}if(i&&(o=u,u=l,l=o,e.s=-e.s),(t=(n=l.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=1e14-1;n>a;){if(u[--n]<l[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=1e14}u[n]-=l[n]}for(;0==u[0];u.splice(0,1),--c);return u[0]?q(e,u,c):(e.s=3==h?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,t){var n,o;return e=new D(e,t),this.c&&e.s&&(!e.c||e.c[0])?e.c&&(!this.c||this.c[0])?(9==w?(o=e.s,e.s=1,n=r(this,e,0,3),e.s=o,n.s*=o):n=r(this,e,0,w),(e=this.minus(n.times(e))).c[0]||1!=w||(e.s=this.s),e):new D(this):new D(NaN)},f.multipliedBy=f.times=function(e,t){var r,n,o,i,a,s,c,u,l,f,p,d,h,y=this.c,m=(e=new D(e,t)).c;if(!(y&&m&&y[0]&&m[0]))return this.s&&e.s&&(!y||y[0]||m)&&(!m||m[0]||y)?(e.s*=this.s,y&&m?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(n=O(this.e/14)+O(e.e/14),e.s*=this.s,(c=y.length)<(f=m.length)&&(h=y,y=m,m=h,o=c,c=f,f=o),o=c+f,h=[];o--;h.push(0));for(o=f;--o>=0;){for(r=0,p=m[o]%1e7,d=m[o]/1e7|0,i=o+(a=c);i>o;)r=((u=p*(u=y[--a]%1e7)+(s=d*u+(l=y[a]/1e7|0)*p)%1e7*1e7+h[i]+r)/1e14|0)+(s/1e7|0)+d*l,h[i--]=u%1e14;h[i]=r}return r?++n:h.splice(0,1),q(e,h,n)},f.negated=function(){var e=new D(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this.s;if(t=(e=new D(e,t)).s,!n||!t)return new D(NaN);if(n!=t)return e.s=-t,this.minus(e);var o=this.e/14,i=e.e/14,a=this.c,s=e.c;if(!o||!i){if(!a||!s)return new D(n/0);if(!a[0]||!s[0])return s[0]?e:new D(a[0]?this:0*n)}if(o=O(o),i=O(i),a=a.slice(),n=o-i){for(n>0?(i=o,r=s):(n=-n,r=a),r.reverse();n--;r.push(0));r.reverse()}for((n=a.length)-(t=s.length)<0&&(r=s,s=a,a=r,t=n),n=0;t;)n=(a[--t]=a[t]+s[t]+n)/1e14|0,a[t]=1e14===a[t]?0:a[t]%1e14;return n&&(a=[n].concat(a),++i),q(e,a,i)},f.precision=f.sd=function(e,t){var r,n,o;if(null!=e&&!!e!==e)return j(e,1,1e9),null==t?t=h:j(t,0,8),V(new D(this),e,t);if(!(r=this.c))return null;if(n=14*(o=r.length-1)+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&this.e+1>n&&(n=this.e+1),n},f.shiftedBy=function(e){return j(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,t,n,o,i,a=this.c,s=this.s,c=this.e,u=d+4,l=ne
2w D("0.5");if(1!==s||!a||!a[0])return new D(!s||s<0&&(!a||a[0])?NaN:a?this:1/0);if(0==(s=Math.sqrt(+$(this)))||s==1/0?(((t=P(a)).length+c)%2==0&&(t+="0"),s=Math.sqrt(+t),c=O((c+1)/2)-(c<0||c%2),n=new D(t=s==1/0?"5e"+c:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new D(s+""),n.c[0]){for((s=(c=n.e)+u)<3&&(s=0);;)if(i=n,n=l.times(i.plus(r(this,i,u,1))),P(i.c).slice(0,s)===(t=P(n.c)).slice(0,s)){if(n.e<c&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(V(n,n.e+d+2,1),e=!n.times(n).eq(this));break}if(!o&&(V(i,i.e+d+2,0),i.times(i).eq(this))){n=i;break}u+=4,s+=4,o=1}}return V(n,n.e+d+1,h,e)},f.toExponential=function(e,t){return null!=e&&(j(e,0,1e9),e++),L(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(j(e,0,1e9),e=e+this.e+1),L(this,e,t)},f.toFormat=function(e,t,r){var n;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=U;else if("object"!=typeof r)throw Error(A+"Argument not an object: "+r);if(n=this.toFixed(e,t),this.c){var o,i=n.split("."),a=+r.groupSize,s=+r.secondaryGroupSize,c=r.groupSeparator||"",u=i[0],l=i[1],f=this.s<0,p=f?u.slice(1):u,d=p.length;if(s&&(o=a,a=s,s=o,d-=o),a>0&&d>0){for(o=d%a||a,u=p.substr(0,o);o<d;o+=a)u+=c+p.substr(o,a);s>0&&(u+=c+p.slice(o)),f&&(u="-"+u)}n=l?u+(r.decimalSeparator||"")+((s=+r.fractionGroupSize)?l.replace(RegExp("\\d{"+s+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):u}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var t,n,o,i,a,s,c,u,l,f,d,y,m=this.c;if(null!=e&&(!(c=new D(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(A+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+$(c));if(!m)return new D(this);for(t=new D(p),l=n=new D(p),o=u=new D(p),y=P(m),a=t.e=y.length-this.e-1,t.c[0]=k[(s=a%14)<0?14+s:s],e=!e||c.comparedTo(t)>0?a>0?t:l:c,s=b,b=1/0,c=new D(y),u.c[0]=0;f=r(c,t,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,l=u.plus(f.times(i=l)),u=i,t=c.minus(f.times(i=t)),c=i;return i=r(e.minus(n),o,0,1),u=u.plus(i.times(l)),n=n.plus(i.times(o)),u.s=l.s=this.s,d=1>r(l,o,a*=2,h).minus(this).abs().comparedTo(r(u,n,a,h).minus(this).abs())?[l,o]:[u,n],b=s,d},f.toNumber=function(){return+$(this)},f.toPrecision=function(e,t){return null!=e&&j(e,1,1e9),L(this,e,t,2)},f.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<=y||i>=m?C(P(r.c),i):R(P(r.c),i,"0"):10===e&&M?t=R(P((r=V(new D(r),d+i+1,h)).c),r.e,"0"):(j(e,2,N.length,"Base"),t=n(R(P(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return $(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=t&&D.set(t),D}(),N=r(4193),M=r.n(N),D=r(9127),L=r.n(D),F=r(5976),q=r(9983);function V(e){return(V="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)}var $="14.1.1",z={},H=(0,q.vt)({headers:{"X-Client-Name":"js-stellar-sdk","X-Client-Version":$}});function G(e){return Math.floor(e/1e3)}H.interceptors.response.use(function(e){var t=M()(e.config.url).hostname(),r=0;if(e.headers instanceof Headers){var n=e.headers.get("date");n&&(r=G(Date.parse(n)))}else if("object"===V(e.headers)&&"date"in e.headers){var o=e.headers;"string"==typeof o.date&&(r=G(Date.parse(o.date)))}var i=G((new Date).getTime());return Number.isNaN(r)||(z[t]={serverTime:r,localTimeRecorded:i}),e});let K=H;function W(e){var t=z[e];if(!t||!t.localTimeRecorded||!t.serverTime)return null;var r=t.serverTime,n=t.localTimeRecorded,o=G((new Date).getTime());return o-n>300?null:o-n+r}function X(e){return(X="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 Q(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return J(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&
2(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(J(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,J(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,J(l,"constructor",u),J(u,"constructor",c),c.displayName="GeneratorFunction",J(u,o,"GeneratorFunction"),J(l),J(l,o,"Generator"),J(l,n,function(){return this}),J(l,"toString",function(){return"[object Generator]"}),(Q=function(){return{w:i,m:f}})()}function J(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(J=function(e,t,r,n){function i(t,r){J(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function Y(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Z(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Y(i,n,o,a,s,"next",e)}function s(e){Y(i,n,o,a,s,"throw",e)}a(void 0)})}}var ee,et,er,en,eo=["transaction"],ei=r.g;ee=null!=(et=null!=(er=ei.EventSource)?er:null==(en=ei.window)?void 0:en.EventSource)?et:r(1731);var ea,es,ec,eu,el=(ea=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this.url=t.clone(),this.filter=[],this.originalSegments=this.url.segment()||[],this.neighborRoot=r},es=[{key:"call",value:function(){var e=this;return this.checkFilter(),this._sendNormalRequest(this.url).then(function(t){return e._parseResponse(t)})}},{key:"stream",value:function(){var e,t,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===ee)throw Error("Streaming requires eventsource to be enabled. If you need this functionality, compile with USE_EVENTSOURCE=true.");this.checkFilter(),this.url.setQuery("X-Client-Name","js-stellar-sdk"),this.url.setQuery("X-Client-Version",$);var o=function(){t=setTimeout(function(){var t;null==(t=e)||t.close(),e=i()},n.reconnectTimeout||15e3)},i=function(){try{e=new ee(r.url.toString())}catch(e){n.onerror&&n.onerror(e)}if(o(),!e)return e;var a=!1,s=function(){a||(clearTimeout(t),e.close(),i(),a=!0)},c=function(e){if("close"!==e.type){var i=e.data?r._parseRecord(JSON.parse(e.data)):e;i.paging_token&&r.url.setQuery("cursor",i.paging_token),clearTimeout(t),o(),void 0!==n.onmessage&&n.onmessage(i)}else s()},u=function(e){n.onerror&&n.onerror(e)};return e.addEventListener?(e.addEventListener("message",c.bind(r)),e.addEventListener("error",u.bind(r)),e.addEventListener("close",s.bind(r))):(e.onmessage=c.bind(r),e.onerror=u.bind(r)),e};return i(),function(){var r;clearTimeout(t),null==(r=e)||r.close()}}},{key:"cursor",value:function(e){return this.url.setQuery("cursor",e),this}},{key:"limit",value:function(e){return this.url.setQuery("limit",e.toString()),this}},{key:"order",value:function(e){return this.url.setQuery("order",e),this}},{key:"join",value:function(e){return this.url.setQuery("join",e),this}},{key:"forEndpoint",value:function(e,t){if(""===this.neighborRoot)throw Error("Invalid usage: neighborRoot not set in constructor");return this.filter.push([e,t,this.neighborRoot]),this}},{key:"checkFilter",value:function(){if(this.filter.length>=2)throw new F.v7("Too many filters specified",this.filter);if(1===this.filter.length){var e=this.originalSegments.concat(this.filter[0]);this.url.segment(e)}}},{key:"_requestFnForLink",value:function(e){var t=this;return Z(Q().m(function r(){var n,o,i,a,s=arguments;return Q().w(function(r){for(;;)switch(r.n){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:{},e.templated?(i=L()(e.href),o=M()(i.expand(n))):o=M()(e.href),r.n=1,t._sendNormalRequest
2(o);case 1:return a=r.v,r.a(2,t._parseResponse(a))}},r)}))}},{key:"_parseRecord",value:function(e){var t=this;return e._links&&Object.keys(e._links).forEach(function(r){var n=e._links[r],o=!1;if(void 0!==e[r]&&(e["".concat(r,"_attr")]=e[r],o=!0),o&&eo.indexOf(r)>=0){var i=t._parseRecord(e[r]);e[r]=Z(Q().m(function e(){return Q().w(function(e){for(;;)if(0===e.n)return e.a(2,i)},e)}))}else e[r]=t._requestFnForLink(n)}),e}},{key:"_sendNormalRequest",value:(eu=Z(Q().m(function e(t){var r;return Q().w(function(e){for(;;)if(0===e.n)return""===(r=t).authority()&&(r=r.authority(this.url.authority())),""===r.protocol()&&(r=r.protocol(this.url.protocol())),e.a(2,H.get(r.toString()).then(function(e){return e.data}).catch(this._handleNetworkError))},e,this)})),function(e){return eu.apply(this,arguments)})},{key:"_parseResponse",value:function(e){return e._embedded&&e._embedded.records?this._toCollectionPage(e):this._parseRecord(e)}},{key:"_toCollectionPage",value:function(e){for(var t,r,n=this,o=0;o<e._embedded.records.length;o+=1)e._embedded.records[o]=this._parseRecord(e._embedded.records[o]);return{records:e._embedded.records,next:(r=Z(Q().m(function t(){var r;return Q().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n._sendNormalRequest(M()(e._links.next.href));case 1:return r=t.v,t.a(2,n._toCollectionPage(r))}},t)})),function(){return r.apply(this,arguments)}),prev:(t=Z(Q().m(function t(){var r;return Q().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n._sendNormalRequest(M()(e._links.prev.href));case 1:return r=t.v,t.a(2,n._toCollectionPage(r))}},t)})),function(){return t.apply(this,arguments)})}}},{key:"_handleNetworkError",value:(ec=Z(Q().m(function e(t){var r,n;return Q().w(function(e){for(;;)switch(e.n){case 0:if(!t.response||!t.response.status){e.n=4;break}e.n=404===t.response.status?1:2;break;case 1:return e.a(2,Promise.reject(new F.m_(null!=(r=t.response.statusText)?r:"Not Found",t.response.data)));case 2:return e.a(2,Promise.reject(new F.Dr(null!=(n=t.response.statusText)?n:"Unknown",t.response.data)));case 3:e.n=5;break;case 4:return e.a(2,Promise.reject(Error(t.message)));case 5:return e.a(2)}},e)})),function(e){return ec.apply(this,arguments)})}],function(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,function(e){var t=function(e,t){if("object"!=X(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=X(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==X(t)?t:t+""}(n.key),n)}}(ea.prototype,es),Object.defineProperty(ea,"prototype",{writable:!1}),ea),ef=r(8732);function ep(e){return(ep="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 ed(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ed=function(){return!!e})()}function eh(e){return(eh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
2function ey(e,t){return(ey=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var em=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e],n=eh(n),t=function(e,t){if(t&&("object"==ep(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,ed()?Reflect.construct(n,o||[],eh(this).constructor):n.apply(this,o))).url.segment("accounts"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&ey(e,t)}(r,e),t=[{key:"accountId",value:function(e){var t=new el(this.url.clone());return t.filter.push([e]),t}},{key:"forSigner",value:function(e){return this.url.setQuery("signer",e),this}},{key:"forAsset",value:function(e){return this.url.setQuery("asset","".concat(e)),this}},{key:"sponsor",value:function(e){return this.url.setQuery("sponsor",e),this}},{key:"forLiquidityPool",value:function(e){return this.url.setQuery("liquidity_pool",e),this}}],function(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,function(e){var t=function(e,t){if("object"!=ep(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ep(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ep(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function eg(e){return(eg="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 eb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eb=function(){return!!e})()}function ev(e){return(ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ew(e,t){return(ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var eS=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e],n=ev(n),t=function(e,t){if(t&&("object"==eg(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eb()?Reflect.construct(n,o||[],ev(this).constructor):n.apply(this,o))).url.segment("assets"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&ew(e,t)}(r,e),t=[{key:"forCode",value:function(e){return this.url.setQuery("asset_code",e),this}},{key:"forIssuer",value:function(e){return this.url.setQuery("asset_issuer",e),this}}],function(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,function(e){var t=function(e,t){if("object"!=eg(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eg(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==eg(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function e_(e){return(e_="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 eE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eE=function(){return!!e})()}
2function ex(e){return(ex=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eA(e,t){return(eA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var eT=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e],n=ex(n),t=function(e,t){if(t&&("object"==e_(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eE()?Reflect.construct(n,o||[],ex(this).constructor):n.apply(this,o))).url.segment("claimable_balances"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&eA(e,t)}(r,e),t=[{key:"claimableBalance",value:function(e){var t=new el(this.url.clone());return t.filter.push([e]),t}},{key:"sponsor",value:function(e){return this.url.setQuery("sponsor",e),this}},{key:"claimant",value:function(e){return this.url.setQuery("claimant",e),this}},{key:"asset",value:function(e){return this.url.setQuery("asset",e.toString()),this}}],function(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,function(e){var t=function(e,t){if("object"!=e_(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=e_(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==e_(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function ek(e){return(ek="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 eO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eO=function(){return!!e})()}function eP(e){return(eP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eB(e,t){return(eB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var ej=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e,"effects"],n=eP(n),t=function(e,t){if(t&&("object"==ek(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eO()?Reflect.construct(n,o||[],eP(this).constructor):n.apply(this,o))).url.segment("effects"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&eB(e,t)}(r,e),t=[{key:"forAccount",value:function(e){return this.forEndpoint("accounts",e)}},{key:"forLedger",value:function(e){return this.forEndpoint("ledgers",e.toString())}},{key:"forTransaction",value:function(e){return this.forEndpoint("transactions",e)}},{key:"forOperation",value:function(e){return this.forEndpoint("operations",e)}},{key:"forLiquidityPool",value:function(e){return this.forEndpoint("liquidity_pools",e)}}],function(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,function(e){var t=function(e,t){if("object"!=ek(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ek(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==ek(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function eI(e){return(eI="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 eC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eC=function(){return!!e})()}
2function eR(e){return(eR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eU(e,t){return(eU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var eN=function(e){function t(e,r){var n,o,i;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),(o=t,i=[e],o=eR(o),n=function(e,t){if(t&&("object"==eI(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eC()?Reflect.construct(o,i||[],eR(this).constructor):o.apply(this,i))).url.segment("friendbot"),n.url.setQuery("addr",r),n}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&eU(e,t)}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(el);function eM(e){return(eM="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 eD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eD=function(){return!!e})()}function eL(e){return(eL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eF(e,t){return(eF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var eq=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e],n=eL(n),t=function(e,t){if(t&&("object"==eM(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eD()?Reflect.construct(n,o||[],eL(this).constructor):n.apply(this,o))).url.segment("ledgers"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&eF(e,t)}(r,e),t=[{key:"ledger",value:function(e){return this.filter.push(["ledgers",e.toString()]),this}}],function(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,function(e){var t=function(e,t){if("object"!=eM(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eM(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==eM(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function eV(e){return(eV="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 e$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e$=function(){return!!e})()}function ez(e){return(ez=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eH(e,t){return(eH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var eG=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e],n=ez(n),t=function(e,t){if(t&&("object"==eV(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,e$()?Reflect.construct(n,o||[],ez(this).constructor):n.apply(this,o))).url.segment("liquidity_pools"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&eH(e,t)}(r,e),t=[{key:"forAssets",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.map(function(e){return e.toString()}).join(",");return this.url.setQuery("reserves",n),this}},{key:"forAccount",value:function(e){return this.url.setQuery("account",e),this}},{key:"liquidityPoolId",value:function(e){if(!e.match(/[a-fA-F0-9]{64}/))throw TypeError("".concat(e," does not look like a liquidity pool ID"));var t=new el(this.url.clone());return t.filter.push([e.toLowerCase()]),t}}],function(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,function(e){var t=function(e,t){if("object"!=eV(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eV(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==eV(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function eK(e){return(eK="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 eW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eW=function(){return!!e})()}
2function eX(e){return(eX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eQ(e,t){return(eQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var eJ=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e,"offers"],n=eX(n),t=function(e,t){if(t&&("object"==eK(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eW()?Reflect.construct(n,o||[],eX(this).constructor):n.apply(this,o))).url.segment("offers"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&eQ(e,t)}(r,e),t=[{key:"offer",value:function(e){var t=new el(this.url.clone());return t.filter.push([e]),t}},{key:"forAccount",value:function(e){return this.forEndpoint("accounts",e)}},{key:"buying",value:function(e){return e.isNative()?this.url.setQuery("buying_asset_type","native"):(this.url.setQuery("buying_asset_type",e.getAssetType()),this.url.setQuery("buying_asset_code",e.getCode()),this.url.setQuery("buying_asset_issuer",e.getIssuer())),this}},{key:"selling",value:function(e){return e.isNative()?this.url.setQuery("selling_asset_type","native"):(this.url.setQuery("selling_asset_type",e.getAssetType()),this.url.setQuery("selling_asset_code",e.getCode()),this.url.setQuery("selling_asset_issuer",e.getIssuer())),this}},{key:"sponsor",value:function(e){return this.url.setQuery("sponsor",e),this}},{key:"seller",value:function(e){return this.url.setQuery("seller",e),this}}],function(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,function(e){var t=function(e,t){if("object"!=eK(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eK(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==eK(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function eY(e){return(eY="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 eZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eZ=function(){return!!e})()}function e0(e){return(e0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function e1(e,t){return(e1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var e2=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e,"operations"],n=e0(n),t=function(e,t){if(t&&("object"==eY(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,eZ()?Reflect.construct(n,o||[],e0(this).constructor):n.apply(this,o))).url.segment("operations"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&e1(e,t)}(r,e),t=[{key:"operation",value:function(e){var t=new el(this.url.clone());return t.filter.push([e]),t}},{key:"forAccount",value:function(e){return this.forEndpoint("accounts",e)}},{key:"forClaimableBalance",value:function(e){return this.forEndpoint("claimable_balances",e)}},{key:"forLedger",value:function(e){return this.forEndpoint("ledgers",e.toString())}},{key:"forTransaction",value:function(e){return this.forEndpoint("transactions",e)}},{key:"forLiquidityPool",value:function(e){return this.forEndpoint("liquidity_pools",e)}},{key:"includeFailed",value:function(e){return this.url.setQuery("include_failed",e.toString()),this}}],function(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,function(e){var t=function(e,t){if("object"!=eY(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eY(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==eY(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function e6(e){return(e6="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 e4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e4=function(){return!!e})()}function e3(e){return(e3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
2function e5(e,t){return(e5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var e8=function(e){function t(e,r,n){var o,i,a;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),(i=t,a=[e],i=e3(i),o=function(e,t){if(t&&("object"==e6(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,e4()?Reflect.construct(i,a||[],e3(this).constructor):i.apply(this,a))).url.segment("order_book"),r.isNative()?o.url.setQuery("selling_asset_type","native"):(o.url.setQuery("selling_asset_type",r.getAssetType()),o.url.setQuery("selling_asset_code",r.getCode()),o.url.setQuery("selling_asset_issuer",r.getIssuer())),n.isNative()?o.url.setQuery("buying_asset_type","native"):(o.url.setQuery("buying_asset_type",n.getAssetType()),o.url.setQuery("buying_asset_code",n.getCode()),o.url.setQuery("buying_asset_issuer",n.getIssuer())),o}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&e5(e,t)}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(el);function e9(e){return(e9="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 e7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e7=function(){return!!e})()}function te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var tr=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e,"payments"],n=te(n),t=function(e,t){if(t&&("object"==e9(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,e7()?Reflect.construct(n,o||[],te(this).constructor):n.apply(this,o))).url.segment("payments"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&tt(e,t)}(r,e),t=[{key:"forAccount",value:function(e){return this.forEndpoint("accounts",e)}},{key:"forLedger",value:function(e){return this.forEndpoint("ledgers",e.toString())}},{key:"forTransaction",value:function(e){return this.forEndpoint("transactions",e)}},{key:"includeFailed",value:function(e){return this.url.setQuery("include_failed",e.toString()),this}}],function(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,function(e){var t=function(e,t){if("object"!=e9(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=e9(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==e9(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);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})(e)}function to(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(to=function(){return!!e})()}
2function ti(e){return(ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ta(e,t){return(ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var ts=function(e){function t(e,r,n,o){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),(a=t,s=[e],a=ti(a),i=function(e,t){if(t&&("object"==tn(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,to()?Reflect.construct(a,s||[],ti(this).constructor):a.apply(this,s))).url.segment("paths/strict-receive"),"string"==typeof r)i.url.setQuery("source_account",r);else{var i,a,s,c=r.map(function(e){return e.isNative()?"native":"".concat(e.getCode(),":").concat(e.getIssuer())}).join(",");i.url.setQuery("source_assets",c)}return i.url.setQuery("destination_amount",o),n.isNative()?i.url.setQuery("destination_asset_type","native"):(i.url.setQuery("destination_asset_type",n.getAssetType()),i.url.setQuery("destination_asset_code",n.getCode()),i.url.setQuery("destination_asset_issuer",n.getIssuer())),i}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&ta(e,t)}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(el);function tc(e){return(tc="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 tu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tu=function(){return!!e})()}function tl(e){return(tl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tf(e,t){return(tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var tp=function(e){function t(e,r,n,o){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),(a=t,s=[e],a=tl(a),i=function(e,t){if(t&&("object"==tc(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tu()?Reflect.construct(a,s||[],tl(this).constructor):a.apply(this,s))).url.segment("paths/strict-send"),r.isNative()?i.url.setQuery("source_asset_type","native"):(i.url.setQuery("source_asset_type",r.getAssetType()),i.url.setQuery("source_asset_code",r.getCode()),i.url.setQuery("source_asset_issuer",r.getIssuer())),i.url.setQuery("source_amount",n),"string"==typeof o)i.url.setQuery("destination_account",o);else{var i,a,s,c=o.map(function(e){return e.isNative()?"native":"".concat(e.getCode(),":").concat(e.getIssuer())}).join(",");i.url.setQuery("destination_assets",c)}return i}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&tf(e,t)}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(el);function td(e){return(td="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 th(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(th=function(){return!!e})()}function ty(e){return(ty=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tm(e,t){return(tm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var tg=[6e4,3e5,9e5,36e5,864e5,6048e5],tb=function(e){var t;function r(e,t,n,o,i,a,s){var c,u,l;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(u=r,l=[e],u=ty(u),c=function(e,t){if(t&&("object"==td(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,th()?Reflect.construct(u,l||[],ty(this).constructor):u.apply(this,l))).url.segment("trade_aggregations"),t.isNative()?c.url.setQuery("base_asset_type","native"):(c.url.setQuery("base_asset_type",t.getAssetType()),c.url.setQuery("base_asset_code",t.getCode()),c.url.setQuery("base_asset_issuer",t.getIssuer())),n.isNative()?c.url.setQuery("counter_asset_type","native"):(c.url.setQuery("counter_asset_type",n.getAssetType()),c.url.setQuery("counter_asset_code",n.getCode()),c.url.setQuery("counter_asset_issuer",n.getIssuer())),"number"!=typeof o||"number"!=typeof i)throw new F.v7("Invalid time bounds",[o,i]);if(c.url.setQuery("start_time",o.toString()),c.url.setQuery("end_time",i.toString()),!c.isValidResolution(a))throw new F.v7("Invalid resolution",a);if(c.url.setQuery("resolution",a.toString()),!c.isValidOffset(s,a))throw new F.v7("Invalid offset",s);return c.url.setQuery("offset",s.toString()),c}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&tm(e,t)}(r,e),t=[{key:"isValidResolution",value:function(e){return tg.some(function(t){return t===e})}},{key:"isValidOffset",value:function(e,t){return!(e>t||e>=864e5||e%36e5!=0)}}],function(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,function(e){var t=function(e,t){if("object"!=td(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=td(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==td(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function tv(e){return(tv="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 tw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tw=function(){return!!e})()}
2function tS(e){return(tS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function t_(e,t){return(t_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var tE=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e,"trades"],n=tS(n),t=function(e,t){if(t&&("object"==tv(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tw()?Reflect.construct(n,o||[],tS(this).constructor):n.apply(this,o))).url.segment("trades"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&t_(e,t)}(r,e),t=[{key:"forAssetPair",value:function(e,t){return e.isNative()?this.url.setQuery("base_asset_type","native"):(this.url.setQuery("base_asset_type",e.getAssetType()),this.url.setQuery("base_asset_code",e.getCode()),this.url.setQuery("base_asset_issuer",e.getIssuer())),t.isNative()?this.url.setQuery("counter_asset_type","native"):(this.url.setQuery("counter_asset_type",t.getAssetType()),this.url.setQuery("counter_asset_code",t.getCode()),this.url.setQuery("counter_asset_issuer",t.getIssuer())),this}},{key:"forOffer",value:function(e){return this.url.setQuery("offer_id",e),this}},{key:"forType",value:function(e){return this.url.setQuery("trade_type",e),this}},{key:"forAccount",value:function(e){return this.forEndpoint("accounts",e)}},{key:"forLiquidityPool",value:function(e){return this.forEndpoint("liquidity_pools",e)}}],function(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,function(e){var t=function(e,t){if("object"!=tv(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=tv(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==tv(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function tx(e){return(tx="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 tA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tA=function(){return!!e})()}function tT(e){return(tT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tk(e,t){return(tk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var tO=function(e){var t;function r(e){var t,n,o;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),(n=r,o=[e,"transactions"],n=tT(n),t=function(e,t){if(t&&("object"==tx(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tA()?Reflect.construct(n,o||[],tT(this).constructor):n.apply(this,o))).url.segment("transactions"),t}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&tk(e,t)}(r,e),t=[{key:"transaction",value:function(e){var t=new el(this.url.clone());return t.filter.push([e]),t}},{key:"forAccount",value:function(e){return this.forEndpoint("accounts",e)}},{key:"forClaimableBalance",value:function(e){return this.forEndpoint("claimable_balances",e)}},{key:"forLedger",value:function(e){return this.forEndpoint("ledgers",e.toString())}},{key:"forLiquidityPool",value:function(e){return this.forEndpoint("liquidity_pools",e)}},{key:"includeFailed",value:function(e){return this.url.setQuery("include_failed",e.toString()),this}}],function(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,function(e){var t=function(e,t){if("object"!=tx(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=tx(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==tx(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(el);function tP(e){return(tP="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 tB(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 tj(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
2t%2?tB(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=tN(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tB(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tI(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return tC(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(tC(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,tC(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,tC(l,"constructor",u),tC(u,"constructor",c),c.displayName="GeneratorFunction",tC(u,o,"GeneratorFunction"),tC(l),tC(l,o,"Generator"),tC(l,n,function(){return this}),tC(l,"toString",function(){return"[object Generator]"}),(tI=function(){return{w:i,m:f}})()}function tC(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(tC=function(e,t,r,n){function i(t,r){tC(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function tR(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function tU(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){tR(i,n,o,a,s,"next",e)}function s(e){tR(i,n,o,a,s,"throw",e)}a(void 0)})}}function tN(e){var t=function(e,t){if("object"!=tP(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=tP(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==tP(t)?t:t+""}function tM(e){return new U(e).div(1e7).toString()}var tD,tL,tF,tq,tV,t$,tz,tH,tG,tK,tW=(tD=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this.serverURL=M()(t);var n=void 0===r.allowHttp?ef.T.isAllowHttp():r.allowHttp,o={};if(r.appName&&(o["X-App-Name"]=r.appName),r.appVersion&&(o["X-App-Version"]=r.appVersion),r.authToken&&(o["X-Auth-Token"]=r.authToken),r.headers&&Object.assign(o,r.headers),Object.keys(o).length>0&&K.interceptors.request.use(function(e){return e.headers=e.headers||{},e.headers=Object.assign(e.headers,o),e}),"https"!==this.serverURL.protocol()&&!n)throw Error("Cannot connect to insecure horizon server")},tL=[{key:"fetchTimebounds",value:(tK=tU(tI().m(function e(t){var r,n,o=arguments;return tI().w(function(e){for(;;)switch(e.n){case 0:if(r=o.length>1&&void 0!==o[1]&&o[1],!(n=W(this.serverURL.hostname()))){e.n=1;break}return e.a(2,{minTime:0,maxTime:n+t});case 1:if(!r){e.n=2;break}return e.a(2,{minTime:0,maxTime:Math.floor((new Date).getTime()/1e3)+t});case 2:return e.n=3,K.get(M()(this.serverURL).toString());case 3:return e.a(2,this.fetchTimebounds(t,!0))}},e,this)})),function(e){return tK.apply(this,arguments)})},{key:"fetchBaseFee",value:(tG=tU(tI().m(function e(){var t;return tI().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.feeStats();case 1:return t=e.v,e.a(2,parseInt(t.last_ledger_base_fee,10)||100)}},e,this)})),function(){return tG.apply(this,arguments)})},{key:"feeStats",value:(tH=tU(tI().m(function e(){var t;return tI().w(function(e){for(;;)if(0===e.n)return(t=new el(M()(this.serverURL))).filter.push(["fee_stats"]),e.a(2,t.call())},e,this)})),function(){return tH.apply(this,arguments)})},{key:"root",value:(tz=tU(tI().m(function e(){var t;return tI().w(function(e){for(;;)if(0===e.n)return t=new el(M()(this.serverURL)),e.a(2,t.call())},e,this)})),function(){return tz.apply(this,arguments)})},{key:"submitTransaction",value:(t$=tU(tI().m(function e(t){var r,n=arguments;return tI().w(function(e){for(;;)switch(e.n){case 0:if((n.length>1&&void 0!==n[1]?n[1]:{skipMemoRequiredCheck:!1}).skipMemoRequiredCheck){e.n=1;break}return e.n=1,this.checkMemoRequired(t);case 1:return r=encodeURIComponent(t.toEnvelope().toXDR().toString("base64")),e.a(2,K.post(M()(this.serverURL).segment("transactions").toString(),"tx=".concat(r),{timeout:6e4,headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(e){if(!e.data.result_xdr)return e.data;
2var t,r,n=p.xdr.TransactionResult.fromXDR(e.data.result_xdr,"base64").result().value();return n.length&&(t=n.map(function(e,t){if("manageBuyOffer"!==e.value().switch().name&&"manageSellOffer"!==e.value().switch().name)return null;r=!0;var n,o=new U(0),i=new U(0),a=e.value().value().success(),s=a.offersClaimed().map(function(e){var t=e.value(),r="";switch(e.switch()){case p.xdr.ClaimAtomType.claimAtomTypeV0():r=p.StrKey.encodeEd25519PublicKey(t.sellerEd25519());break;case p.xdr.ClaimAtomType.claimAtomTypeOrderBook():r=p.StrKey.encodeEd25519PublicKey(t.sellerId().ed25519());break;default:throw Error("Invalid offer result type: ".concat(e.switch()))}var n=new U(t.amountBought().toString()),a=new U(t.amountSold().toString());o=o.plus(a),i=i.plus(n);var s=p.Asset.fromOperation(t.assetSold()),c=p.Asset.fromOperation(t.assetBought()),u={type:s.getAssetType(),assetCode:s.getCode(),issuer:s.getIssuer()},l={type:c.getAssetType(),assetCode:c.getCode(),issuer:c.getIssuer()};return{sellerId:r,offerId:t.offerId().toString(),assetSold:u,amountSold:tM(a),assetBought:l,amountBought:tM(n)}}),c=a.offer().switch().name;if("function"==typeof a.offer().value&&a.offer().value()){var u=a.offer().value();n={offerId:u.offerId().toString(),selling:{},buying:{},amount:tM(u.amount().toString()),price:{n:u.price().n(),d:u.price().d()}};var l=p.Asset.fromOperation(u.selling());n.selling={type:l.getAssetType(),assetCode:l.getCode(),issuer:l.getIssuer()};var f=p.Asset.fromOperation(u.buying());n.buying={type:f.getAssetType(),assetCode:f.getCode(),issuer:f.getIssuer()}}return{offersClaimed:s,effect:c,operationIndex:t,currentOffer:n,amountBought:tM(o),amountSold:tM(i),isFullyOpen:!s.length&&"manageOfferDeleted"!==c,wasPartiallyFilled:!!s.length&&"manageOfferDeleted"!==c,wasImmediatelyFilled:!!s.length&&"manageOfferDeleted"===c,wasImmediatelyDeleted:!s.length&&"manageOfferDeleted"===c}}).filter(function(e){return!!e})),tj(tj({},e.data),{},{offerResults:r?t:void 0})}).catch(function(e){return e instanceof Error?Promise.reject(e):Promise.reject(new F.nS("Transaction submission failed. Server responded: ".concat(e.status," ").concat(e.statusText),e.data))}))}},e,this)})),function(e){return t$.apply(this,arguments)})},{key:"submitAsyncTransaction",value:(tV=tU(tI().m(function e(t){var r,n=arguments;return tI().w(function(e){for(;;)switch(e.n){case 0:if((n.length>1&&void 0!==n[1]?n[1]:{skipMemoRequiredCheck:!1}).skipMemoRequiredCheck){e.n=1;break}return e.n=1,this.checkMemoRequired(t);case 1:return r=encodeURIComponent(t.toEnvelope().toXDR().toString("base64")),e.a(2,K.post(M()(this.serverURL).segment("transactions_async").toString(),"tx=".concat(r),{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(e){return e.data}).catch(function(e){return e instanceof Error?Promise.reject(e):Promise.reject(new F.nS("Transaction submission failed. Server responded: ".concat(e.status," ").concat(e.statusText),e.data))}))}},e,this)})),function(e){return tV.apply(this,arguments)})},{key:"accounts",value:function(){return new em(M()(this.serverURL))}},{key:"claimableBalances",value:function(){return new eT(M()(this.serverURL))}},{key:"ledgers",value:function(){return new eq(M()(this.serverURL))}},{key:"transactions",value:function(){return new tO(M()(this.serverURL))}},{key:"offers",value:function(){return new eJ(M()(this.serverURL))}},{key:"orderbook",value:function(e,t){return new e8(M()(this.serverURL),e,t)}},{key:"trades",value:function(){return new tE(M()(this.serverURL))}},{key:"operations",value:function(){return new e2(M()(this.serverURL))}},{key:"liquidityPools",value:function(){return new eG(M()(this.serverURL))}},{key:"strictReceivePaths",value:function(e,t,r){return new ts(M()(this.serverURL),e,t,r)}},{key:"strictSendPaths",value:function(e,t,r){return new tp(M()(this.serverURL),e,t,r)}},{key:"payments",value:function(){return new tr(M()(this.serverURL))}},{key:"effects",value:function(){return new ej(M()(this.serverURL))}},{key:"friendbot",value:function(e){return new eN(M()(this.serverURL),e)}},{key:"assets",value:function(){return new eS(M()(this.serverURL))}},{key:"loadAccount",value:(tq=tU(tI().m(function e(t){var r;return tI().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.accounts().accountId(t).call();case 1:return r=e.v,e.a(2,new S(r))}},e,this)})),function(e){return tq.apply(this,arguments)})},{key:"tradeAggregation",value:function(e,t,r,n,o,i){return new tb(M()(this.serverURL),e,t,r,n,o,i)}},{key:"checkMemoRequired",value:(tF=tU(tI().m(function e(t){var r,n,o,i,a,s;return tI().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t instanceof p.FeeBumpTransaction&&(t=t.innerTransaction),"none"===t.memo.type){e.n=1;break}return e.a(2);case 1:r=new Set,n=0;case 2:if(!(n<t.operations.length)){e.n=14;break}e.n="payment"===(a=(o=t.operations[n]).type)||"pathPaymentStrictReceive"===a||"pathPaymentStrictSend"===a||"accountMerge"===a?3:4;break;case 3:return e.a(3,5);case 4:case 12:return e.a(3,13);case 5:if(i=o.destination,!r.has(i)){e.n=6;break}return e.a(3,13);case 6:if(r.add(i),!i.startsWith("M")){e.n=7;break}return e.a(3,13);case 7:return e.p=7,e.n=8,this.loadAccount(i);case 8:if("MQ=="!==e.v.data_attr["config.memo_required"]){e.n=9;break}throw new F.Cu("account requires memo",i,n);case 9:e.n=13;break;case 10:if(e.p=10,!((s=e.v)instanceof F.Cu)){e.n=11;break}throw s;case 11:if(s instanceof F.m_){e.n=12;break}throw s;case 13:n+=1,e.n=2;break;case 14:return e.a(2)}},e,this,[[7,10]])})),function(e){return tF.apply(this,arguments)})}],function(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)}}(tD.prototype,tL),Object.defineProperty(tD,"prototype",{writable:!1}),tD);let tX=(e=r.hmd(e)).exports},8835:(e,t,r)=>{"use strict";var n=r(1270);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}
vendor: 9,591 bytes, line 2
2var i=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,c=["'"].concat(["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","	"])),u=["%","/","?",";","#"].concat(c),l=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},h={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(5373);function g(e,t,r){if(e&&"object"==typeof e&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if("string"!=typeof e)throw TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",g=e.split(a);g[0]=g[0].replace(/\\/g,"/");var b=e=g.join(a);if(b=b.trim(),!r&&1===e.split("#").length){var v=s.exec(b);if(v)return this.path=b,this.href=b,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=i.exec(b);if(w){var S=(w=w[0]).toLowerCase();this.protocol=S,b=b.substr(w.length)}if(r||w||b.match(/^\/\/[^@/]+@[^@/]+/)){var _="//"===b.substr(0,2);!_||w&&h[w]||(b=b.substr(2),this.slashes=!0)}if(!h[w]&&(_||w&&!y[w])){for(var E,x,A,T=-1,k=0;k<l.length;k++)-1!==(E=b.indexOf(l[k]))&&(-1===T||E<T)&&(T=E);for(-1!==(A=-1===T?b.lastIndexOf("@"):b.lastIndexOf("@",T))&&(x=b.slice(0,A),b=b.slice(A+1),this.auth=decodeURIComponent(x)),T=-1,k=0;k<u.length;k++)-1!==(E=b.indexOf(u[k]))&&(-1===T||E<T)&&(T=E);-1===T&&(T=b.length),this.host=b.slice(0,T),b=b.slice(T),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var P=this.hostname.split(/\./),B=(k=0,P.length);k<B;k++){var j=P[k];if(j&&!j.match(f)){for(var I="",C=0,R=j.length;C<R;C++)j.charCodeAt(C)>127?I+="x":I+=j[C];if(!I.match(f)){var U=P.slice(0,k),N=P.slice(k+1),M=j.match(p);M&&(U.push(M[1]),N.unshift(M[2])),N.length&&(b="/"+N.join(".")+b),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",L=this.hostname||"";this.host=L+D,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!d[S])for(k=0,B=c.length;k<B;k++){var F=c[k];if(-1!==b.indexOf(F)){var q=encodeURIComponent(F);q===F&&(q=escape(F)),b=b.split(F).join(q)}}var V=b.indexOf("#");-1!==V&&(this.hash=b.substr(V),b=b.slice(0,V));var $=b.indexOf("?");if(-1!==$?(this.search=b.substr($),this.query=b.substr($+1),t&&(this.query=m.parse(this.query)),b=b.slice(0,$)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var z=this.search||"";this.path=D+z}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":")+"@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=m.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(g(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if("string"==typeof e){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),i=0;i<n.length;i++){var a=n[i];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),c=0;c<s.length;c++){var u=s[c];"protocol"!==u&&(r[u]=e[u])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var p=l[f];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||h[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",g=r.search||"";r.path=m+g}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=v||b||r.host&&e.pathname,S=w,_=r.pathname&&r.pathname.split("/")||[],E=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===_[0]?_[0]=r.host:_.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),w=w&&(""===d[0]||""===_[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,_=d;else if(d.length)_||(_=[]),_.pop(),_=_.concat(d),r.search=e.search,r.query=e.query;else if(null!=e.search)return E&&(r.host=_.shift(),r.hostname=r.host,(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname)),r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=_.slice(-1)[0],A=(r.host||e.host||_.length>1)&&("."===x||".."===x)||""===x,T=0,k=_.length;k>=0;k--)"."===(x=_[k])?_.splice(k,1):".."===x?(_.splice(k,1),T++):T&&(_.splice(k,1),T--);if(!w&&!S)for(;T--;)_.unshift("..");!w||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),A&&"/"!==_.join("/").substr(-1)&&_.push("");var O,P=""===_[0]||_[0]&&"/"===_[0].charAt(0);return E&&(r.hostname=P?"":_.length?_.shift():"",r.host=r.hostname,(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.hostname=O.shift(),r.host=r.hostname)),(w=w||r.host&&_.length)&&!P&&_.unshift(""),_.length>0?r.pathname=_.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=g,t.resolve=function(e,t){return g(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?g(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=g(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o},8859:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,g=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,_=RegExp.prototype.test,E=Array.prototype.concat,x=Array.prototype.join,A=Array.prototype.slice,T=Math.floor,k="function"==typeof BigInt?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,B="function"==typeof Symbol&&"object"==typeof Symbol.iterator,j="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===B||1)?Symbol.toStringTag:null,I=Object.prototype.propertyIsEnumerable,C=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-T(-e):T(e);if(n!==e){var o=String(n),i=b.call(t,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,r,"$&_")}var U=r(2634),N=U.custom,M=z(N)?N:null,D={__proto__:null,double:'"',single:"'"},L={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function F(e,t,r){var n=D[r.quoteStyle||t];return n+e+n}function q(e){return!j||!("object"==typeof e&&(j in e||void 0!==e[j]))}function V(e){return"[object Array]"===K(e)&&q(e)}function $(e){return"[object RegExp]"===K(e)&&q(e)}function z(e){if(B)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;
2if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,o,s){var c=n||{};if(G(c,"quoteStyle")&&!G(D,c.quoteStyle))throw TypeError('option "quoteStyle" must be "single" or "double"');if(G(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var y=!G(c,"customInspect")||c.customInspect;if("boolean"!=typeof y&&"symbol"!==y)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(c,"indent")&&null!==c.indent&&"	"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=c.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var n=t.length-r.maxStringLength;return e(b.call(t,0,r.maxStringLength),r)+"... "+n+" more character"+(n>1?"s":"")}var o=L[r.quoteStyle||"single"];return o.lastIndex=0,F(v.call(v.call(t,o,"\\$1"),/[\x00-\x1f]/g,X),"single",r)}(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var _=String(t);return w?R(t,_):_}if("bigint"==typeof t){var T=String(t)+"n";return w?R(t,T):T}var O=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=O&&O>0&&"object"==typeof t)return V(t)?"[Array]":"[Object]";var N=function(e,t){var r;if("	"===e.indent)r="	";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=x.call(Array(e.indent+1)," ")}return{base:r,prev:x.call(Array(t+1),r)}}(c,o);if(void 0===s)s=[];else if(W(s,t)>=0)return"[Circular]";function H(t,r,n){if(r&&(s=A.call(s)).push(r),n){var i={depth:c.depth};return G(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),e(t,i,o+1,s)}return e(t,c,o+1,s)}if("function"==typeof t&&!$(t)){var et=function(e){if(e.name)return e.name;var t=g.call(m.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),er=ee(t,H);return"[Function"+(et?": "+et:" (anonymous)")+"]"+(er.length>0?" { "+x.call(er,", ")+" }":"")}if(z(t)){var en=B?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(t);return"object"!=typeof t||B?en:Q(en)}if(t&&"object"==typeof t&&("u">typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)){for(var eo,ei="<"+S.call(String(t.nodeName)),ea=t.attributes||[],es=0;es<ea.length;es++)ei+=" "+ea[es].name+"="+F((eo=ea[es].value,v.call(String(eo),/"/g,"&quot;")),"double",c);return ei+=">",t.childNodes&&t.childNodes.length&&(ei+="..."),ei+="</"+S.call(String(t.nodeName))+">"}if(V(t)){if(0===t.length)return"[]";var ec=ee(t,H);return N&&!function(e){for(var t=0;t<e.length;t++)if(W(e[t],"\n")>=0)return!1;return!0}(ec)?"["+Z(ec,N)+"]":"[ "+x.call(ec,", ")+" ]"}if("[object Error]"===K(t)&&q(t)){var eu=ee(t,H);return"cause"in Error.prototype||!("cause"in t)||I.call(t,"cause")?0===eu.length?"["+String(t)+"]":"{ ["+String(t)+"] "+x.call(eu,", ")+" }":"{ ["+String(t)+"] "+x.call(E.call("[cause]: "+H(t.cause),eu),", ")+" }"}if("object"==typeof t&&y){if(M&&"function"==typeof t[M]&&U)return U(t,{depth:O-o});if("symbol"!==y&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{u.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var el=[];return a&&a.call(t,function(e,r){el.push(H(r,t,!0)+" => "+H(e,t))}),Y("Map",i.call(t),el,N)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ef=[];return l&&l.call(t,function(e){ef.push(H(e,t))}),Y("Set",u.call(t),ef,N)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if("[object Number]"===K(t)&&q(t))return Q(H(Number(t)));if(function(e){if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}(t))return Q(H(k.call(t)));if("[object Boolean]"===K(t)&&q(t))return Q(h.call(t));if("[object String]"===K(t)&&q(t))return Q(H(String(t)));if("u">typeof window&&t===window)return"{ [object Window] }";if("u">typeof globalThis&&t===globalThis||void 0!==r.g&&t===r.g)return"{ [object globalThis] }";if(!("[object Date]"===K(t)&&q(t))&&!$(t)){var ep=ee(t,H),ed=C?C(t)===Object.prototype:t instanceof Object||t.constructor===Object,eh=t instanceof Object?"":"null prototype",ey=!ed&&j&&Object(t)===t&&j in t?b.call(K(t),8,-1):eh?"Object":"",em=(ed||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ey||eh?"["+x.call(E.call([],ey||[],eh||[]),": ")+"] ":"");return 0===ep.length?em+"{}":N?em+"{"+Z(ep,N)+"}":em+"{ "+x.call(ep,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function G(e,t){return H.call(e,t)}
2function K(e){return y.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}function X(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Q(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Y(e,t,r,n){return e+" ("+t+") {"+(n?Z(r,n):x.call(r,", "))+"}"}function Z(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+x.call(e,","+r)+"\n"+t.prev}function ee(e,t){var r=V(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=G(e,o)?t(e[o],e):""}var i,a="function"==typeof O?O(e):[];if(B){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)G(e,c)&&(r&&String(Number(c))===c&&c<e.length||B&&i["$"+c]instanceof Symbol||(_.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof O)for(var u=0;u<a.length;u++)I.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}},8950:e=>{self,e.exports=(()=>{var e={41:(e,t,r)=>{"use strict";var n=r(655),o=r(8068),i=r(9675),a=r(5795);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!a&&a(e,t);if(n)n(e,t,{configurable:null===u&&f?f.configurable:!u,enumerable:null===s&&f?f.enumerable:!s,value:r,writable:null===c&&f?f.writable:!c});else{if(!l&&(s||c||u))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},76:e=>{"use strict";e.exports=Function.prototype.call},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,c=(1<<s)-1,u=c>>1,l=-7,f=r?o-1:0,p=r?-1:1,d=e[t+f];for(f+=p,i=d&(1<<-l)-1,d>>=-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-u;else{if(i===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=u}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,p=5960464477539062e-23*(23===o),d=n?0:i-1,h=n?1:-1,y=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[r+d]=255&a,d+=h,a/=256,u-=8);e[r+d-h]|=128*y}},392:(e,t,r)=>{"use strict";var n=r(2861).Buffer,o=r(5377);function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){e=o(e,t||"utf8");for(var r=this._block,n=this._blockSize,i=e.length,a=this._len,s=0;s<i;){for(var c=a%n,u=Math.min(i-s,n-c),l=0;l<u;l++)r[c+l]=e[s+l];s+=u,(a+=u)%n==0&&this._update(r)}return this._len+=i,this},i.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<=0xffffffff)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=r>>>0;this._block.writeUInt32BE((r-n)/0x100000000,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw Error("_update must be implemented by subclass")},e.exports=i},414:e=>{"use strict";e.exports=Math.round},448:(e,t,r)=>{"use strict";let n,o;r.r(t),r.d(t,{Account:()=>nd,Address:()=>rH,Asset:()=>t5,AuthClawbackEnabledFlag:()=>rY,AuthImmutableFlag:()=>rJ,AuthRequiredFlag:()=>rX,AuthRevocableFlag:()=>rQ,BASE_FEE:()=>nB,Claimant:()=>rk,Contract:()=>nL,FeeBumpTransaction:()=>nf,Hyper:()=>I.Hyper,Int128:()=>n0,Int256:()=>n3,Keypair:()=>t2,LiquidityPoolAsset:()=>rx,LiquidityPoolFeeV18:()=>t7,LiquidityPoolId:()=>rB,Memo:()=>r7,MemoHash:()=>r8,MemoID:()=>r3,MemoNone:()=>r4,MemoReturn:()=>r9,MemoText:()=>r5,MuxedAccount:()=>nm,Networks:()=>nR,Operation:()=>rZ,ScInt:()=>oi,SignerKey:()=>n_,Soroban:()=>nM,SorobanDataBuilder:()=>nw,StrKey:()=>tW,TimeoutInfinite:()=>nj,Transaction:()=>ni,TransactionBase:()=>rn,TransactionBuilder:()=>nI,Uint128:()=>nz,Uint256:()=>nX,UnsignedHyper:()=>I.UnsignedHyper,XdrLargeInt:()=>
2oe,authorizeEntry:()=>oE,authorizeInvocation:()=>oA,buildInvocationTree:()=>function e(t){var r=t.function(),n={},o=r.value();switch(r.switch().value){case 0:n.type="execute",n.args={source:rH.fromScAddress(o.contractAddress()).toString(),function:o.functionName(),args:o.args().map(function(e){return od(e)})};break;case 1:case 2:var i=2===r.switch().value;n.type="create",n.args={};var a=[o.executable(),o.contractIdPreimage()],s=a[0],c=a[1];if(!!s.switch().value!=!!c.switch().value)throw Error("creation function appears invalid: ".concat(JSON.stringify(o)," (should be wasm+address or token+asset)"));switch(s.switch().value){case 0:var u=c.fromAddress();n.args.type="wasm",n.args.wasm=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ok(Object(r),!0).forEach(function(t){!function(e,t,r){var n;(n=function(e){if("object"!=oT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=oT(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==oT(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ok(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({salt:u.salt().toString("hex"),hash:s.wasmHash().toString("hex"),address:rH.fromScAddress(u.address()).toString()},i&&{constructorArgs:o.constructorArgs().map(function(e){return od(e)})});break;case 1:n.args.type="sac",n.args.asset=t5.fromOperation(c.fromAsset()).toString();break;default:throw Error("unknown creation type: ".concat(JSON.stringify(s)))}break;default:throw Error("unknown invocation type (".concat(r.switch(),"): ").concat(JSON.stringify(r)))}return n.invocations=t.subInvocations().map(function(t){return e(t)}),n},cereal:()=>R,decodeAddressToMuxedAccount:()=>rI,default:()=>oP,encodeMuxedAccount:()=>rR,encodeMuxedAccountToAddress:()=>rC,extractBaseAddress:()=>rU,getLiquidityPoolId:()=>re,hash:()=>N,humanizeEvents:()=>og,nativeToScVal:()=>op,scValToBigInt:()=>oa,scValToNative:()=>od,sign:()=>tN,verify:()=>tM,walkInvocationTree:()=>
2oO,xdr:()=>C});var i,a,s,c,u,l,f,p,d,h,y,m,g,b,v,w,S,_,E,x,A,T,k,O,P,B,j,I=r(3740);let C=I.config(function(e){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"),0x7fffffff)],["accepted",e.varArray(e.lookup("Value"),0x7fffffff)]]),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"),0x7fffffff)],["innerSets",e.varArray(e.lookup("ScpQuorumSet"),0x7fffffff)]]),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("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")}
2}),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}
2),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("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("ContractCodeCostInputs",[["ext",e.lookup("ExtensionPoint")],["nInstructions",e.lookup("Uint32")],["nFunctions",e.lookup("Uint32")],["nGlobals",e.lookup("Uint32")],["nTableEntries",e.lookup("Uint32")],["nTypes",e.lookup("Uint32")],["nDataSegments",e.lookup("Uint32")],["nElemSegments",e.lookup("Uint32")],["nImports",e.lookup("Uint32")],["nExports",e.lookup("Uint32")],["nDataSegmentBytes",e.lookup("Uint32")]]),e.struct("ContractCodeEntryV1",[["ext",e.lookup("ExtensionPoint")],["costInputs",e.lookup("ContractCodeCostInputs")]]),e.union("ContractCodeEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ContractCodeEntryV1")}}),e.struct("ContractCodeEntry",[["ext",e.lookup("ContractCodeEntryExt")],["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.enum("BucketListType",{live:0,hotArchive:1}),e.enum("BucketEntryType",{metaentry:-1,liveentry:0,deadentry:1,initentry:2}),e.enum("HotArchiveBucketEntryType",{hotArchiveMetaentry:-1,hotArchiveArchived:0,hotArchiveLive:1}),e.union("BucketMetadataExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"bucketListType"]],arms:{bucketListType:e.lookup("BucketListType")}}),e.struct("BucketMetadata",[["ledgerVersion",e.lookup("Uint32")],["ext",e.lookup("BucketMetadataExt")]]),e.union("Bucket
2Entry",{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.union("HotArchiveBucketEntry",{switchOn:e.lookup("HotArchiveBucketEntryType"),switchName:"type",switches:[["hotArchiveArchived","archivedEntry"],["hotArchiveLive","key"],["hotArchiveMetaentry","metaEntry"]],arms:{archivedEntry:e.lookup("LedgerEntry"),key:e.lookup("LedgerKey"),metaEntry:e.lookup("BucketMetadata")}}),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("ContractId")],["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"),0x7fffffff)]]),e.enum("TxSetComponentType",{txsetCompTxsMaybeDiscountedFee:0}),e.typedef("DependentTxCluster",e.varArray(e.lookup("TransactionEnvelope"),0x7fffffff)),e.typedef("ParallelTxExecutionStage",e.varArray(e.lookup("DependentTxCluster"),0x7fffffff)),e.struct("ParallelTxsComponent",[["baseFee",e.option(e.lookup("Int64"))],["executionStages",e.varArray(e.lookup("ParallelTxExecutionStage"),0x7fffffff)]]),e.struct("TxSetComponentTxsMaybeDiscountedFee",[["baseFee",e.option(e.lookup("Int64"))],["txes",e.varArray(e.lookup("TransactionEnvelope"),0x7fffffff)]]),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"],[1,"parallelTxsComponent"]],arms:{v0Components:e.varArray(e.lookup("TxSetComponent"),0x7fffffff),parallelTxsComponent:e.lookup("ParallelTxsComponent")}}),e.struct("TransactionSet",[["previousLedgerHash",e.lookup("Hash")],["txes",e.varArray(e.lookup("TransactionEnvelope"),0x7fffffff)]]),e.struct("TransactionSetV1",[["previousLedgerHash",e.lookup("Hash")],["phases",e.varArray(e.lookup("TransactionPhase"),0x7fffffff)]]),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"),0x7fffffff)]]),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"),0x7fffffff)]]),e.struct("ScpHistoryEntryV0",[["quorumSets",e.varArray(e.lookup("ScpQuorumSet"),0x7fffffff)],["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,ledgerEntryRestored:4}),e.union("LedgerEntryChange",{switchOn:e.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"],["ledgerEntryRestored","restored"]],arms:{created:e.lookup("LedgerEntry"),updated:e.lookup("LedgerEntry"),removed:e.lookup("LedgerKey"),state:e.lookup("LedgerEntry"),restored:e.lookup("LedgerEntry")}}),e.typedef("LedgerEntryChanges",e.varArray(e.lookup("LedgerEntryChange"),0x7fffffff)),e.struct("OperationMeta",[["changes",e.lookup("LedgerEntryChanges")]]),e.struct("TransactionMetaV1",[["txChanges",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),0x7fffffff)]]),e.struct("TransactionMetaV2",[["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),0x7fffffff)],["txChangesAfter",e.lookup("LedgerEntryChanges")]]),e.enum("ContractEventType",{system:0,contract:1,diagnostic:2}),e.struct("ContractEventV0",[["topics",e.varArray(e.lookup("ScVal"),0x7fffffff)],["data",e.lookup("ScVal")]]),e.union("ContractEventBody",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ContractEventV0")}}
2),e.struct("ContractEvent",[["ext",e.lookup("ExtensionPoint")],["contractId",e.option(e.lookup("ContractId"))],["type",e.lookup("ContractEventType")],["body",e.lookup("ContractEventBody")]]),e.struct("DiagnosticEvent",[["inSuccessfulContractCall",e.bool()],["event",e.lookup("ContractEvent")]]),e.struct("SorobanTransactionMetaExtV1",[["ext",e.lookup("ExtensionPoint")],["totalNonRefundableResourceFeeCharged",e.lookup("Int64")],["totalRefundableResourceFeeCharged",e.lookup("Int64")],["rentFeeCharged",e.lookup("Int64")]]),e.union("SorobanTransactionMetaExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("SorobanTransactionMetaExtV1")}}),e.struct("SorobanTransactionMeta",[["ext",e.lookup("SorobanTransactionMetaExt")],["events",e.varArray(e.lookup("ContractEvent"),0x7fffffff)],["returnValue",e.lookup("ScVal")],["diagnosticEvents",e.varArray(e.lookup("DiagnosticEvent"),0x7fffffff)]]),e.struct("TransactionMetaV3",[["ext",e.lookup("ExtensionPoint")],["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),0x7fffffff)],["txChangesAfter",e.lookup("LedgerEntryChanges")],["sorobanMeta",e.option(e.lookup("SorobanTransactionMeta"))]]),e.struct("OperationMetaV2",[["ext",e.lookup("ExtensionPoint")],["changes",e.lookup("LedgerEntryChanges")],["events",e.varArray(e.lookup("ContractEvent"),0x7fffffff)]]),e.struct("SorobanTransactionMetaV2",[["ext",e.lookup("SorobanTransactionMetaExt")],["returnValue",e.option(e.lookup("ScVal"))]]),e.enum("TransactionEventStage",{transactionEventStageBeforeAllTxes:0,transactionEventStageAfterTx:1,transactionEventStageAfterAllTxes:2}),e.struct("TransactionEvent",[["stage",e.lookup("TransactionEventStage")],["event",e.lookup("ContractEvent")]]),e.struct("TransactionMetaV4",[["ext",e.lookup("ExtensionPoint")],["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMetaV2"),0x7fffffff)],["txChangesAfter",e.lookup("LedgerEntryChanges")],["sorobanMeta",e.option(e.lookup("SorobanTransactionMetaV2"))],["events",e.varArray(e.lookup("TransactionEvent"),0x7fffffff)],["diagnosticEvents",e.varArray(e.lookup("DiagnosticEvent"),0x7fffffff)]]),e.struct("InvokeHostFunctionSuccessPreImage",[["returnValue",e.lookup("ScVal")],["events",e.varArray(e.lookup("ContractEvent"),0x7fffffff)]]),e.union("TransactionMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"],[3,"v3"],[4,"v4"]],arms:{operations:e.varArray(e.lookup("OperationMeta"),0x7fffffff),v1:e.lookup("TransactionMetaV1"),v2:e.lookup("TransactionMetaV2"),v3:e.lookup("TransactionMetaV3"),v4:e.lookup("TransactionMetaV4")}}),e.struct("TransactionResultMeta",[["result",e.lookup("TransactionResultPair")],["feeProcessing",e.lookup("LedgerEntryChanges")],["txApplyProcessing",e.lookup("TransactionMeta")]]),e.struct("TransactionResultMetaV1",[["ext",e.lookup("ExtensionPoint")],["result",e.lookup("TransactionResultPair")],["feeProcessing",e.lookup("LedgerEntryChanges")],["txApplyProcessing",e.lookup("TransactionMeta")],["postTxApplyFeeProcessing",e.lookup("LedgerEntryChanges")]]),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"),0x7fffffff)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),0x7fffffff)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),0x7fffffff)]]),e.struct("LedgerCloseMetaExtV1",[["ext",e.lookup("ExtensionPoint")],["sorobanFeeWrite1Kb",e.lookup("Int64")]]),e.union("LedgerCloseMetaExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerCloseMetaExtV1")}}),e.struct("LedgerCloseMetaV1",[["ext",e.lookup("LedgerCloseMetaExt")],["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("GeneralizedTransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),0x7fffffff)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),0x7fffffff)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),0x7fffffff)],["totalByteSizeOfLiveSorobanState",e.lookup("Uint64")],["evictedKeys",e.varArray(e.lookup("LedgerKey"),0x7fffffff)],["unused",e.varArray(e.lookup("LedgerEntry"),0x7fffffff)]]),e.struct("LedgerCloseMetaV2",[["ext",e.lookup("LedgerCloseMetaExt")],["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("GeneralizedTransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMetaV1"),0x7fffffff)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),0x7fffffff)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),0x7fffffff)],["totalByteSizeOfLiveSorobanState",e.lookup("Uint64")],["evictedKeys",e.varArray(e.lookup("LedgerKey"),0x7fffffff)]]),e.union("LedgerCloseMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"],[1,"v1"],[2,"v2"]],arms:{v0:e.lookup("LedgerCloseMetaV0"),v1:e.lookup("LedgerCloseMetaV1"),v2:e.lookup("LedgerCloseMetaV2")}}),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")
2]]),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,peers:5,getTxSet:6,txSet:7,generalizedTxSet:17,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13,sendMore:16,sendMoreExtended:20,floodAdvert:18,floodDemand:19,timeSlicedSurveyRequest:21,timeSlicedSurveyResponse:22,timeSlicedSurveyStartCollecting:23,timeSlicedSurveyStopCollecting:24}),e.struct("DontHave",[["type",e.lookup("MessageType")],["reqHash",e.lookup("Uint256")]]),e.enum("SurveyMessageCommandType",{timeSlicedSurveyTopology:1}),e.enum("SurveyMessageResponseType",{surveyTopologyResponseV2:2}),e.struct("TimeSlicedSurveyStartCollectingMessage",[["surveyorId",e.lookup("NodeId")],["nonce",e.lookup("Uint32")],["ledgerNum",e.lookup("Uint32")]]),e.struct("SignedTimeSlicedSurveyStartCollectingMessage",[["signature",e.lookup("Signature")],["startCollecting",e.lookup("TimeSlicedSurveyStartCollectingMessage")]]),e.struct("TimeSlicedSurveyStopCollectingMessage",[["surveyorId",e.lookup("NodeId")],["nonce",e.lookup("Uint32")],["ledgerNum",e.lookup("Uint32")]]),e.struct("SignedTimeSlicedSurveyStopCollectingMessage",[["signature",e.lookup("Signature")],["stopCollecting",e.lookup("TimeSlicedSurveyStopCollectingMessage")]]),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("TimeSlicedSurveyRequestMessage",[["request",e.lookup("SurveyRequestMessage")],["nonce",e.lookup("Uint32")],["inboundPeersIndex",e.lookup("Uint32")],["outboundPeersIndex",e.lookup("Uint32")]]),e.struct("SignedTimeSlicedSurveyRequestMessage",[["requestSignature",e.lookup("Signature")],["request",e.lookup("TimeSlicedSurveyRequestMessage")]]),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("TimeSlicedSurveyResponseMessage",[["response",e.lookup("SurveyResponseMessage")],["nonce",e.lookup("Uint32")]]),e.struct("SignedTimeSlicedSurveyResponseMessage",[["responseSignature",e.lookup("Signature")],["response",e.lookup("TimeSlicedSurveyResponseMessage")]]),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.struct("TimeSlicedNodeData",[["addedAuthenticatedPeers",e.lookup("Uint32")],["droppedAuthenticatedPeers",e.lookup("Uint32")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")],["p75ScpFirstToSelfLatencyMs",e.lookup("Uint32")],["p75ScpSelfToOtherLatencyMs",e.lookup("Uint32")],["lostSyncCount",e.lookup("Uint32")],["isValidator",e.bool()],["maxInboundPeerCount",e.lookup("Uint32")],["maxOutboundPeerCount",e.lookup("Uint32")]]),e.struct("TimeSlicedPeerData",[["peerStats",e.lookup("PeerStats")],["averageLatencyMs",e.lookup("Uint32")]]),e.typedef("TimeSlicedPeerDataList",e.varArray(e.lookup("TimeSlicedPeerData"),25)),e.struct("TopologyResponseBodyV2",[["inbou
2ndPeers",e.lookup("TimeSlicedPeerDataList")],["outboundPeers",e.lookup("TimeSlicedPeerDataList")],["nodeData",e.lookup("TimeSlicedNodeData")]]),e.union("SurveyResponseBody",{switchOn:e.lookup("SurveyMessageResponseType"),switchName:"type",switches:[["surveyTopologyResponseV2","topologyResponseBodyV2"]],arms:{topologyResponseBodyV2:e.lookup("TopologyResponseBodyV2")}}),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"],["peers","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["generalizedTxSet","generalizedTxSet"],["transaction","transaction"],["timeSlicedSurveyRequest","signedTimeSlicedSurveyRequestMessage"],["timeSlicedSurveyResponse","signedTimeSlicedSurveyResponseMessage"],["timeSlicedSurveyStartCollecting","signedTimeSlicedSurveyStartCollectingMessage"],["timeSlicedSurveyStopCollecting","signedTimeSlicedSurveyStopCollectingMessage"],["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"),signedTimeSlicedSurveyRequestMessage:e.lookup("SignedTimeSlicedSurveyRequestMessage"),signedTimeSlicedSurveyResponseMessage:e.lookup("SignedTimeSlicedSurveyResponseMessage"),signedTimeSlicedSurveyStartCollectingMessage:e.lookup("SignedTimeSlicedSurveyStartCollectingMessage"),signedTimeSlicedSurveyStopCollectingMessage:e.lookup("SignedTimeSlicedSurveyStopCollectingMessage"),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}
2),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,hostFunctionTypeCreateContractV2:3}),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("CreateContractArgsV2",[["contractIdPreimage",e.lookup("ContractIdPreimage")],["executable",e.lookup("ContractExecutable")],["constructorArgs",e.varArray(e.lookup("ScVal"),0x7fffffff)]]),e.struct("InvokeContractArgs",[["contractAddress",e.lookup("ScAddress")],["functionName",e.lookup("ScSymbol")],["args",e.varArray(e.lookup("ScVal"),0x7fffffff)]]),e.union("HostFunction",{switchOn:e.lookup("HostFunctionType"),switchName:"type",switches:[["hostFunctionTypeInvokeContract","invokeContract"],["hostFunctionTypeCreateContract","createContract"],["hostFunctionTypeUploadContractWasm","wasm"],["hostFunctionTypeCreateContractV2","createContractV2"]],arms:{invokeContract:e.lookup("InvokeContractArgs"),createContract:e.lookup("CreateContractArgs"),wasm:e.varOpaque(),createContractV2:e.lookup("CreateContractArgsV2")}}),e.enum("SorobanAuthorizedFunctionType",{sorobanAuthorizedFunctionTypeContractFn:0,sorobanAuthorizedFunctionTypeCreateContractHostFn:1,sorobanAuthorizedFunctionTypeCreateContractV2HostFn:2}),e.union("SorobanAuthorizedFunction",{switchOn:e.lookup("SorobanAuthorizedFunctionType"),switchName:"type",switches:[["sorobanAuthorizedFunctionTypeContractFn","contractFn"],["sorobanAuthorizedFunctionTypeCreateContractHostFn","createContractHostFn"],["sorobanAuthorizedFunctionTypeCreateContractV2HostFn","createContractV2HostFn"]],arms:{contractFn:e.lookup("InvokeContractArgs"),createContractHostFn:e.lookup("CreateContractArgs"),createContractV2HostFn:e.lookup("CreateContractArgsV2")}}),e.struct("SorobanAuthorizedInvocation",[["function",e.lookup("SorobanAuthorizedFunction")],["subInvocations",e.varArray(e.lookup("SorobanAuthorizedInvocation"),0x7fffffff)]]),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.typedef("SorobanAuthorizationEntries",e.varArray(e.lookup("SorobanAuthorizationEntry"),0x7fffffff)),e.struct("InvokeHostFunctionOp",[["hostFunction",e.lookup("HostFunction")],["auth",e.varArray(e.lookup("SorobanAuthorizationEntry"),0x7fffffff)]]),e.struct("ExtendFootprintTtlOp",[["ext",e.lookup("E
2xtensionPoint")],["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"),0x7fffffff)],["readWrite",e.varArray(e.lookup("LedgerKey"),0x7fffffff)]]),e.struct("SorobanRes
2ources",[["footprint",e.lookup("LedgerFootprint")],["instructions",e.lookup("Uint32")],["diskReadBytes",e.lookup("Uint32")],["writeBytes",e.lookup("Uint32")]]),e.struct("SorobanResourcesExtV0",[["archivedSorobanEntries",e.varArray(e.lookup("Uint32"),0x7fffffff)]]),e.union("SorobanTransactionDataExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"resourceExt"]],arms:{resourceExt:e.lookup("SorobanResourcesExtV0")}}),e.struct("SorobanTransactionData",[["ext",e.lookup("SorobanTransactionDataExt")],["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"),0x7fffffff)],["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"),0x7fffffff)],["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"),0x7fffffff)],["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"),0x7fffffff)}}),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("BeginSponsoringFut
2ureReservesResultCode",{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,setTrustLineFlagsInvali
2dState:-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"],["liquidityPoolW
2ithdraw","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"),0x7fffffff)}}),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"),0x7fffffff)}}),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.typedef("ContractId",e.lookup("Hash")),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.struct("ShortHashSeed",[["seed",e.opaque(16)]]),e.enum("BinaryFuseFilterType",{binaryFuseFilter8Bit:0,binaryFuseFilter16Bit:1,binaryFuseFilter32Bit:2}),e.struct("SerializedBinaryFuseFilter",[["type",e.lookup("BinaryFuseFilterType")],["inputHashSeed",e.lookup("ShortHashSeed")],["filterSeed",e.lookup("ShortHashSeed")],["segmentLength",e.lookup("Uint32")],["segementLengthMask",e.lookup("Uint32")],["segmentCount",e.lookup("Uint32")],["segmentCountLength",e.lookup("Uint32")],["fingerprintLength",e.lookup("Uint32")],["fingerprints",e.varOpaque()]]),e.typedef("PoolId",e.lookup("Hash")),e.enum("ClaimableBalanceIdType",{claimableBalanceIdTypeV0:0}),e.union("ClaimableBalanceId",{switchOn:e.lookup("ClaimableBalanceIdType"),switchName:"type",switches:[["claimableBalanceIdTypeV0","v0"]],arms:{v0:e.lookup("Hash")}}),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
2: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,scAddressTypeMuxedAccount:2,scAddressTypeClaimableBalance:3,scAddressTypeLiquidityPool:4}),e.struct("MuxedEd25519Account",[["id",e.lookup("Uint64")],["ed25519",e.lookup("Uint256")]]),e.union("ScAddress",{switchOn:e.lookup("ScAddressType"),switchName:"type",switches:[["scAddressTypeAccount","accountId"],["scAddressTypeContract","contractId"],["scAddressTypeMuxedAccount","muxedAccount"],["scAddressTypeClaimableBalance","claimableBalanceId"],["scAddressTypeLiquidityPool","liquidityPoolId"]],arms:{accountId:e.lookup("AccountId"),contractId:e.lookup("ContractId"),muxedAccount:e.lookup("MuxedEd25519Account"),claimableBalanceId:e.lookup("ClaimableBalanceId"),liquidityPoolId:e.lookup("PoolId")}}),e.const("SCSYMBOL_LIMIT",32),e.typedef("ScVec",e.varArray(e.lookup("ScVal"),0x7fffffff)),e.typedef("ScMap",e.varArray(e.lookup("ScMapEntry"),0x7fffffff)),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"],["scvContractInstance","instance"],["scvLedgerKeyContractInstance",e.void()],["scvLedgerKeyNonce","nonceKey"]],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"),instance:e.lookup("ScContractInstance"),nonceKey:e.lookup("ScNonceKey")}}),e.struct("ScMapEntry",[["key",e.lookup("ScVal")],["val",e.lookup("ScVal")]]),e.enum("ScEnvMetaKind",{scEnvMetaKindInterfaceVersion:0}),e.struct("ScEnvMetaEntryInterfaceVersion",[["protocol",e.lookup("Uint32")],["preRelease",e.lookup("Uint32")]]),e.union("ScEnvMetaEntry",{switchOn:e.lookup("ScEnvMetaKind"),switchName:"kind",switches:[["scEnvMetaKindInterfaceVersion","interfaceVersion"]],arms:{interfaceVersion:e.lookup("ScEnvMetaEntryInterfaceVersion")}}),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,scSpecTypeMuxedAddress:20,scSpecTypeOption:1e3,scSpecTypeResult:1001,scSpecTypeVec:1002,scSpecTypeMap:1004,scSpecTypeTuple:1005,scSpecTypeBytesN:1006,scSpecTypeU
2dt: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()],["scSpecTypeMuxedAddress",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(1024)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecUdtStructV0",[["doc",e.string(1024)],["lib",e.string(80)],["name",e.string(60)],["fields",e.varArray(e.lookup("ScSpecUdtStructFieldV0"),40)]]),e.struct("ScSpecUdtUnionCaseVoidV0",[["doc",e.string(1024)],["name",e.string(60)]]),e.struct("ScSpecUdtUnionCaseTupleV0",[["doc",e.string(1024)],["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(1024)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtUnionCaseV0"),50)]]),e.struct("ScSpecUdtEnumCaseV0",[["doc",e.string(1024)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtEnumV0",[["doc",e.string(1024)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtEnumCaseV0"),50)]]),e.struct("ScSpecUdtErrorEnumCaseV0",[["doc",e.string(1024)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtErrorEnumV0",[["doc",e.string(1024)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtErrorEnumCaseV0"),50)]]),e.struct("ScSpecFunctionInputV0",[["doc",e.string(1024)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecFunctionV0",[["doc",e.string(1024)],["name",e.lookup("ScSymbol")],["inputs",e.varArray(e.lookup("ScSpecFunctionInputV0"),10)],["outputs",e.varArray(e.lookup("ScSpecTypeDef"),1)]]),e.enum("ScSpecEventParamLocationV0",{scSpecEventParamLocationData:0,scSpecEventParamLocationTopicList:1}),e.struct("ScSpecEventParamV0",[["doc",e.string(1024)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")],["location",e.lookup("ScSpecEventParamLocationV0")]]),e.enum("ScSpecEventDataFormat",{scSpecEventDataFormatSingleValue:0,scSpecEventDataFormatVec:1,scSpecEventDataFormatMap:2}),e.struct("ScSpecEventV0",[["doc",e.string(1024)],["lib",e.string(80)],["name",e.lookup("ScSymbol")],["prefixTopics",e.varArray(e.lookup("ScSymbol"),2)],["params",e.varArray(e.lookup("ScSpecEventParamV0"),50)],["dataFormat",e.lookup("ScSpecEventDataFormat")]]),e.enum("ScSpecEntryKind",{scSpecEntryFunctionV0:0,scSpecEntryUdtStructV0:1,scSpecEntryUdtUnionV0:2,scSpecEntryUdtEnumV0:3,scSpecEntryUdtErrorEnumV0:4,scSpecEntryEventV0:5}),e.union("ScSpecEntry",{switchOn:e.lookup("ScSpecEntryKind"),switchName:"kind",switches:[["scSpecEntryFunctionV0","functionV0"],["scSpecEntryUdtStructV0","udtStructV0"],["scSpecEntryUdtUnionV0","udtUnionV0"],["scSpecEntryUdtEnumV0","udtEnumV0"],["scSpecEntryUdtErrorEnumV0","udtErrorEnumV0"],["scSpecEntryEventV0","eventV0"]],arms:{functionV0:e.lookup("ScSpecFunctionV0"),udtStructV0:e.lookup("ScSpecUdtStructV0"),udtUnionV0:e.lookup("ScSpecUdtUnionV0"),udtEnumV0:e.lookup("ScSpecUdtEnumV0"),udtErrorEnumV0:e.lookup("ScSpecUdtErrorEnumV0"),eventV0:e.lookup("ScSpecEventV0")}}),e.struct("ConfigSettingContractExecutionLanesV0",[["ledgerMaxTxCount",e.lookup("Uint32")]]),e.struct("ConfigSettingContractComputeV0",[["ledgerMaxInstructions",e.lookup("Int64")],["txMaxInstructions",e.lookup("Int64")],["feeRatePerInstru
2ctionsIncrement",e.lookup("Int64")],["txMemoryLimit",e.lookup("Uint32")]]),e.struct("ConfigSettingContractParallelComputeV0",[["ledgerMaxDependentTxClusters",e.lookup("Uint32")]]),e.struct("ConfigSettingContractLedgerCostV0",[["ledgerMaxDiskReadEntries",e.lookup("Uint32")],["ledgerMaxDiskReadBytes",e.lookup("Uint32")],["ledgerMaxWriteLedgerEntries",e.lookup("Uint32")],["ledgerMaxWriteBytes",e.lookup("Uint32")],["txMaxDiskReadEntries",e.lookup("Uint32")],["txMaxDiskReadBytes",e.lookup("Uint32")],["txMaxWriteLedgerEntries",e.lookup("Uint32")],["txMaxWriteBytes",e.lookup("Uint32")],["feeDiskReadLedgerEntry",e.lookup("Int64")],["feeWriteLedgerEntry",e.lookup("Int64")],["feeDiskRead1Kb",e.lookup("Int64")],["sorobanStateTargetSizeBytes",e.lookup("Int64")],["rentFee1KbSorobanStateSizeLow",e.lookup("Int64")],["rentFee1KbSorobanStateSizeHigh",e.lookup("Int64")],["sorobanStateRentFeeGrowthFactor",e.lookup("Uint32")]]),e.struct("ConfigSettingContractLedgerCostExtV0",[["txMaxFootprintEntries",e.lookup("Uint32")],["feeWrite1Kb",e.lookup("Int64")]]),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,decodeEcdsaCurve256Sig:15,recoverEcdsaSecp256k1Key:16,int256AddSub:17,int256Mul:18,int256Div:19,int256Pow:20,int256Shift:21,chaCha20DrawBytes:22,parseWasmInstructions:23,parseWasmFunctions:24,parseWasmGlobals:25,parseWasmTableEntries:26,parseWasmTypes:27,parseWasmDataSegments:28,parseWasmElemSegments:29,parseWasmImports:30,parseWasmExports:31,parseWasmDataSegmentBytes:32,instantiateWasmInstructions:33,instantiateWasmFunctions:34,instantiateWasmGlobals:35,instantiateWasmTableEntries:36,instantiateWasmTypes:37,instantiateWasmDataSegments:38,instantiateWasmElemSegments:39,instantiateWasmImports:40,instantiateWasmExports:41,instantiateWasmDataSegmentBytes:42,sec1DecodePointUncompressed:43,verifyEcdsaSecp256r1Sig:44,bls12381EncodeFp:45,bls12381DecodeFp:46,bls12381G1CheckPointOnCurve:47,bls12381G1CheckPointInSubgroup:48,bls12381G2CheckPointOnCurve:49,bls12381G2CheckPointInSubgroup:50,bls12381G1ProjectiveToAffine:51,bls12381G2ProjectiveToAffine:52,bls12381G1Add:53,bls12381G1Mul:54,bls12381G1Msm:55,bls12381MapFpToG1:56,bls12381HashToG1:57,bls12381G2Add:58,bls12381G2Mul:59,bls12381G2Msm:60,bls12381MapFp2ToG2:61,bls12381HashToG2:62,bls12381Pairing:63,bls12381FrFromU256:64,bls12381FrToU256:65,bls12381FrAddSub:66,bls12381FrMul:67,bls12381FrPow:68,bls12381FrInv:69}),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")],["liveSorobanStateSizeWindowSampleSize",e.lookup("Uint32")],["liveSorobanStateSizeWindowSamplePeriod",e.lookup("Uint32")],["evictionScanSize",e.lookup("Uint32")],["startingEvictionScanLevel",e.lookup("Uint32")]]),e.struct("EvictionIterator",[["bucketListLevel",e.lookup("Uint32")],["isCurrBucket",e.bool()],["bucketFileOffset",e.lookup("Uint64")]]),e.struct("ConfigSettingScpTiming",[["ledgerTargetCloseTimeMilliseconds",e.lookup("Uint32")],["nominationTimeoutInitialMilliseconds",e.lookup("Uint32")],["nominationTimeoutIncrementMilliseconds",e.lookup("Uint32")],["ballotTimeoutInitialMilliseconds",e.lookup("Uint32")],["ballotTimeoutIncrementMilliseconds",e.lookup("Uint32")]]),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,configSettingLiveSorobanStateSizeWindow:12,configSettingEvictionIterator:13,configSettingContractParallelComputeV0:14,configSettingContractLedgerCostExtV0:15,configSettingScpTiming:16}),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"],["configSettingLiveSorobanStateSizeWindow","liveSorobanStateSizeWindow"],["configSettingEvictionIterator","evictionIterator"],["configSettingContractParallelComputeV0","contractParallelCompute"],["configSettingContractLedgerCostExtV0","contractLedgerCostExt"],["configSettingScpTiming","contractScpTiming"]],arms:{contractMaxSizeBytes:e.lookup("Uint32"),contractCompute:e.lookup("ConfigSettingContractComputeV0"),contractLedgerCost:e.lookup("ConfigSettingContractLedgerCostV0"),contractHistoricalData:e.lookup("ConfigSettingContractHistoricalDataV0"),contractEvents:e.lookup("ConfigSettingContractEventsV0"),
2contractBandwidth: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"),liveSorobanStateSizeWindow:e.varArray(e.lookup("Uint64"),0x7fffffff),evictionIterator:e.lookup("EvictionIterator"),contractParallelCompute:e.lookup("ConfigSettingContractParallelComputeV0"),contractLedgerCostExt:e.lookup("ConfigSettingContractLedgerCostExtV0"),contractScpTiming:e.lookup("ConfigSettingScpTiming")}}),e.struct("LedgerCloseMetaBatch",[["startSequence",e.lookup("Uint32")],["endSequence",e.lookup("Uint32")],["ledgerCloseMeta",e.varArray(e.lookup("LedgerCloseMeta"),0x7fffffff)]])}),R={XdrWriter:I.XdrWriter,XdrReader:I.XdrReader};var U=r(2802);function N(e){var t=new U.sha256;return t.update(e,"utf8"),t.digest()}let M="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function D(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function L(e,...t){if(!D(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function F(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function q(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function V(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}let $="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,z=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function H(e){if(L(e),$)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=z[e[r]];return t}function G(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function K(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if($)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,o=0;t<r;t++,o+=2){let r=G(e.charCodeAt(o)),i=G(e.charCodeAt(o+1));if(void 0===r||void 0===i)throw Error('hex string expected, got non-hex character "'+(e[o]+e[o+1])+'" at index '+o);n[t]=16*r+i}return n}function W(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function X(e){return"string"==typeof e&&(e=W(e)),L(e),e}function Q(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];L(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let o=e[t];r.set(o,n),n+=o.length}return r}class J{}function Y(e=32){if(M&&"function"==typeof M.getRandomValues)return M.getRandomValues(new Uint8Array(e));if(M&&"function"==typeof M.randomBytes)return Uint8Array.from(M.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}class Z extends J{constructor(e,t,r,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=V(this.buffer)}update(e){F(this),L(e=X(e));let{view:t,buffer:r,blockLen:n}=this,o=e.length;for(let i=0;i<o;){let a=Math.min(n-this.pos,o-i);if(a===n){let t=V(e);for(;n<=o-i;i+=n)this.process(t,i);continue}r.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){F(this),function(e,t){L(e);let r=t.outputLen;if(e.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:n,isLE:o}=this,{pos:i}=this;t[i++]=128,q(this.buffer.subarray(i)),this.padOffset>n-i&&(this.process(r,0),i=0);for(let e=i;e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let o=BigInt(32),i=BigInt(0xffffffff),a=Number(r>>o&i),s=Number(r&i),c=4*!!n,u=4*!n;e.setUint32(t+c,a,n),e.setUint32(t+u,s,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);let a=V(e),s=this.outputLen;if(s%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=s/4,u=this.get();if(c>u.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,u[e],o)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:o,destroyed:i,pos:a}=this;return e.destroyed=i,e.finished=o,e.length=n,e.pos=a,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}
2let ee=Uint32Array.from([0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179]),et=BigInt(0x100000000-1),er=BigInt(32),en=(e,t,r)=>e>>>r,eo=(e,t,r)=>e<<32-r|t>>>r,ei=(e,t,r)=>e>>>r|t<<32-r,ea=(e,t,r)=>e<<32-r|t>>>r,es=(e,t,r)=>e<<64-r|t>>>r-32,ec=(e,t,r)=>e>>>r-32|t<<64-r;function eu(e,t,r,n){let o=(t>>>0)+(n>>>0);return{h:e+r+(o/0x100000000|0)|0,l:0|o}}let el=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),ef=(e,t,r,n)=>t+r+n+(e/0x100000000|0)|0,ep=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),ed=(e,t,r,n,o)=>t+r+n+o+(e/0x100000000|0)|0,eh=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0),ey=(e,t,r,n,o,i)=>t+r+n+o+i+(e/0x100000000|0)|0,em=function(e,t=!1){let r=e.length,n=new Uint32Array(r),o=new Uint32Array(r);for(let i=0;i<r;i++){let{h:r,l:a}=function(e,t=!1){return t?{h:Number(e&et),l:Number(e>>er&et)}:{h:0|Number(e>>er&et),l:0|Number(e&et)}}(e[i],t);[n[i],o[i]]=[r,a]}return[n,o]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
25771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),eg=em[0],eb=em[1],ev=new Uint32Array(80),ew=new Uint32Array(80);class eS extends Z{constructor(e=64){super(128,e,16,!1),this.Ah=0|ee[0],this.Al=0|ee[1],this.Bh=0|ee[2],this.Bl=0|ee[3],this.Ch=0|ee[4],this.Cl=0|ee[5],this.Dh=0|ee[6],this.Dl=0|ee[7],this.Eh=0|ee[8],this.El=0|ee[9],this.Fh=0|ee[10],this.Fl=0|ee[11],this.Gh=0|ee[12],this.Gl=0|ee[13],this.Hh=0|ee[14],this.Hl=0|ee[15]}get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:o,Cl:i,Dh:a,Dl:s,Eh:c,El:u,Fh:l,Fl:f,Gh:p,Gl:d,Hh:h,Hl:y}=this;return[e,t,r,n,o,i,a,s,c,u,l,f,p,d,h,y]}set(e,t,r,n,o,i,a,s,c,u,l,f,p,d,h,y){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|o,this.Cl=0|i,this.Dh=0|a,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|f,this.Gh=0|p,this.Gl=0|d,this.Hh=0|h,this.Hl=0|y}process(e,t){for(let r=0;r<16;r++,t+=4)ev[r]=e.getUint32(t),ew[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|ev[e-15],r=0|ew[e-15],n=ei(t,r,1)^ei(t,r,8)^en(t,0,7),o=ea(t,r,1)^ea(t,r,8)^eo(t,r,7),i=0|ev[e-2],a=0|ew[e-2],s=ei(i,a,19)^es(i,a,61)^en(i,0,6),c=ep(o,ea(i,a,19)^ec(i,a,61)^eo(i,a,6),ew[e-7],ew[e-16]),u=ed(c,n,s,ev[e-7],ev[e-16]);ev[e]=0|u,ew[e]=0|c}let{Ah:r,Al:n,Bh:o,Bl:i,Ch:a,Cl:s,Dh:c,Dl:u,Eh:l,El:f,Fh:p,Fl:d,Gh:h,Gl:y,Hh:m,Hl:g}=this;for(let e=0;e<80;e++){let t=ei(l,f,14)^ei(l,f,18)^es(l,f,41),b=ea(l,f,14)^ea(l,f,18)^ec(l,f,41),v=l&p^~l&h,w=eh(g,b,f&d^~f&y,eb[e],ew[e]),S=ey(w,m,t,v,eg[e],ev[e]),_=0|w,E=ei(r,n,28)^es(r,n,34)^es(r,n,39),x=ea(r,n,28)^ec(r,n,34)^ec(r,n,39),A=r&o^r&a^o&a,T=n&i^n&s^i&s;m=0|h,g=0|y,h=0|p,y=0|d,p=0|l,d=0|f,({h:l,l:f}=eu(0|c,0|u,0|S,0|_)),c=0|a,u=0|s,a=0|o,s=0|i,o=0|r,i=0|n;let k=el(_,x,T);r=ef(k,S,E,A),n=0|k}({h:r,l:n}=eu(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:i}=eu(0|this.Bh,0|this.Bl,0|o,0|i)),({h:a,l:s}=eu(0|this.Ch,0|this.Cl,0|a,0|s)),({h:c,l:u}=eu(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:f}=eu(0|this.Eh,0|this.El,0|l,0|f)),({h:p,l:d}=eu(0|this.Fh,0|this.Fl,0|p,0|d)),({h,l:y}=eu(0|this.Gh,0|this.Gl,0|h,0|y)),({h:m,l:g}=eu(0|this.Hh,0|this.Hl,0|m,0|g)),this.set(r,n,o,i,a,s,c,u,l,f,p,d,h,y,m,g)}roundClean(){q(ev,ew)}destroy(){q(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let e_=(t$=()=>new eS,(n=e=>t$().update(X(e)).digest()).outputLen=(o=t$()).outputLen,n.blockLen=o.blockLen,n.create=()=>t$(),n),eE=BigInt(0),ex=BigInt(1);function eA(e,t=""){if("boolean"!=typeof e)throw Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e);return e}function eT(e,t,r=""){let n=D(e),o=e?.length,i=void 0!==t;if(!n||i&&o!==t)throw Error((r&&`"${r}" `)+"expected Uint8Array"+(i?` of length ${t}`:"")+", got "+(n?`length=${o}`:"type="+typeof e));return e}function ek(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?eE:BigInt("0x"+e)}function eO(e){return L(e),ek(H(Uint8Array.from(e).reverse()))}function eP(e,t){return K(e.toString(16).padStart(2*t,"0"))}function eB(e,t,r){let n;if("string"==typeof t)try{n=K(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!D(t))throw Error(e+" must be hex string or Uint8Array");n=Uint8Array.from(t)}let o=n.length;if("number"==typeof r&&o!==r)throw Error(e+" of length "+r+" expected, got "+o);return n}function ej(e){return Uint8Array.from(e)}let eI=e=>"bigint"==typeof e&&eE<=e;function eC(e,t,r,n){if(!(eI(t)&&eI(r)&&eI(n))||!(r<=t)||!(t<n))throw Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}let eR=e=>(ex<<BigInt(e))-ex;function eU(e,t,r={}){if(!e||"object"!=typeof e)throw Error("expected valid options object");function n(t,r,n){let o=e[t];if(n&&void 0===o)return;let i=typeof o;if(i!==r||null===o)throw Error(`param "${t}
2" is invalid: expected ${r}, got ${i}`)}Object.entries(t).forEach(([e,t])=>n(e,t,!1)),Object.entries(r).forEach(([e,t])=>n(e,t,!0))}let eN=()=>{throw Error("not implemented")};function eM(e){let t=new WeakMap;return(r,...n)=>{let o=t.get(r);if(void 0!==o)return o;let i=e(r,...n);return t.set(r,i),i}}let eD=BigInt(0),eL=BigInt(1),eF=BigInt(2),eq=BigInt(3),eV=BigInt(4),e$=BigInt(5),ez=BigInt(7),eH=BigInt(8),eG=BigInt(9),eK=BigInt(16);function eW(e,t){let r=e%t;return r>=eD?r:t+r}function eX(e,t,r){let n=e;for(;t-- >eD;)n*=n,n%=r;return n}function eQ(e,t){if(e===eD)throw Error("invert: expected non-zero number");if(t<=eD)throw Error("invert: expected positive modulus, got "+t);let r=eW(e,t),n=t,o=eD,i=eL,a=eL,s=eD;for(;r!==eD;){let e=n/r,t=n%r,c=o-a*e,u=i-s*e;n=r,r=t,o=a,i=s,a=c,s=u}if(n!==eL)throw Error("invert: does not exist");return eW(o,t)}function eJ(e,t,r){if(!e.eql(e.sqr(t),r))throw Error("Cannot find square root")}function eY(e,t){let r=(e.ORDER+eL)/eV,n=e.pow(t,r);return eJ(e,n,t),n}function eZ(e,t){let r=(e.ORDER-e$)/eH,n=e.mul(t,eF),o=e.pow(n,r),i=e.mul(t,o),a=e.mul(e.mul(i,eF),o),s=e.mul(i,e.sub(a,e.ONE));return eJ(e,s,t),s}function e0(e){if(e<eq)throw Error("sqrt is not defined for small field");let t=e-eL,r=0;for(;t%eF===eD;)t/=eF,r++;let n=eF,o=e3(e);for(;1===e4(o,n);)if(n++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return eY;let i=o.pow(n,t),a=(t+eL)/eF;return function(e,n){if(e.is0(n))return n;if(1!==e4(e,n))throw Error("Cannot find square root");let o=r,s=e.mul(e.ONE,i),c=e.pow(n,t),u=e.pow(n,a);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,r=e.sqr(c);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===o)throw Error("Cannot find square root");let n=eL<<BigInt(o-t-1),i=e.pow(s,n);o=t,s=e.sqr(i),c=e.mul(c,s),u=e.mul(u,i)}return u}}let e1=(e,t)=>(eW(e,t)&eL)===eL,e2=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function e6(e,t,r=!1){let n=Array(t.length).fill(r?e.ZERO:void 0),o=t.reduce((t,r,o)=>e.is0(r)?t:(n[o]=t,e.mul(t,r)),e.ONE),i=e.inv(o);return t.reduceRight((t,r,o)=>e.is0(r)?t:(n[o]=e.mul(t,n[o]),e.mul(t,r)),i),n}function e4(e,t){let r=(e.ORDER-eL)/eF,n=e.pow(t,r),o=e.eql(n,e.ONE),i=e.eql(n,e.ZERO),a=e.eql(n,e.neg(e.ONE));if(!o&&!i&&!a)throw Error("invalid Legendre symbol result");return o?1:i?0:-1}function e3(e,t,r=!1,n={}){var o;let i,a;if(e<=eD)throw Error("invalid field: expected ORDER > 0, got "+e);let s,c,u,l=!1;if("object"==typeof t&&null!=t){if(n.sqrt||r)throw Error("cannot specify opts in two arguments");t.BITS&&(s=t.BITS),t.sqrt&&(c=t.sqrt),"boolean"==typeof t.isLE&&(r=t.isLE),"boolean"==typeof t.modFromBytes&&(l=t.modFromBytes),u=t.allowedLengths}else"number"==typeof t&&(s=t),n.sqrt&&(c=n.sqrt);let{nBitLength:f,nByteLength:p}=(void 0!==(o=s)&&function(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}(o),{nBitLength:a=void 0!==o?o:e.toString(2).length,nByteLength:Math.ceil(a/8)});if(p>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let d=Object.freeze({ORDER:e,isLE:r,BITS:f,BYTES:p,MASK:eR(f),ZERO:eD,ONE:eL,allowedLengths:u,create:t=>eW(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return eD<=t&&t<e},is0:e=>e===eD,isValidNot0:e=>!d.is0(e)&&d.isValid(e),isOdd:e=>(e&eL)===eL,neg:t=>eW(-t,e),eql:(e,t)=>e===t,sqr:t=>eW(t*t,e),add:(t,r)=>eW(t+r,e),sub:(t,r)=>eW(t-r,e),mul:(t,r)=>eW(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<eD)throw Error("invalid exponent, negatives unsupported");if(r===eD)return e.ONE;if(r===eL)return t;let n=e.ONE,o=t;for(;r>eD;)r&eL&&(n=e.mul(n,o)),o=e.sqr(o),r>>=eL;return n})(d,e,t),div:(t,r)=>eW(t*eQ(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>eQ(t,e),sqrt:c||(t=>{let r,n,o,a,s,c;return i||(i=e%eV===eq?eY:e%eH===e$?eZ:e%eK===eG?(r=e3(e),o=(n=e0(e))(r,r.neg(r.ONE)),a=n(r,o),s=n(r,r.neg(o)),c=(e+ez)/eK,(e,t)=>{let r=e.pow(t,c),n=e.mul(r,o),i=e.mul(r,a),u=e.mul(r,s),l=e.eql(e.sqr(n),t),f=e.eql(e.sqr(i),t);r=e.cmov(r,n,l),n=e.cmov(u,i,f);let p=e.eql(e.sqr(n),t),d=e.cmov(r,n,p);return eJ(e,d,t),d}):e0(e)),i(d,t)}),toBytes:e=>r?eP(e,p).reverse():eP(e,p),fromBytes:(t,n=!0)=>
2{if(u){if(!u.includes(t.length)||t.length>p)throw Error("Field.fromBytes: expected "+u+" bytes, got "+t.length);let e=new Uint8Array(p);e.set(t,r?0:e.length-t.length),t=e}if(t.length!==p)throw Error("Field.fromBytes: expected "+p+" bytes, got "+t.length);let o=r?eO(t):ek(H(t));if(l&&(o=eW(o,e)),!n&&!d.isValid(o))throw Error("invalid field element: outside of range 0..ORDER");return o},invertBatch:e=>e6(d,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(d)}let e5=BigInt(0),e8=BigInt(1);function e9(e,t){let r=t.negate();return e?r:t}function e7(e,t){let r=e6(e.Fp,t.map(e=>e.Z));return t.map((t,n)=>e.fromAffine(t.toAffine(r[n])))}function te(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function tt(e,t){te(e,t);let r=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:eR(e),maxNumber:r,shiftBy:BigInt(e)}}function tr(e,t,r){let{windowSize:n,mask:o,maxNumber:i,shiftBy:a}=r,s=Number(e&o),c=e>>a;s>n&&(s-=i,c+=e8);let u=t*n;return{nextN:c,offset:u+Math.abs(s)-1,isZero:0===s,isNeg:s<0,isNegF:t%2!=0,offsetF:u}}let tn=new WeakMap,to=new WeakMap;function ti(e){return to.get(e)||1}function ta(e){if(e!==e5)throw Error("invalid wNAF")}class ts{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,r=this.ZERO){let n=e;for(;t>e5;)t&e8&&(r=r.add(n)),n=n.double(),t>>=e8;return r}precomputeWindow(e,t){let{windows:r,windowSize:n}=tt(t,this.bits),o=[],i=e,a=i;for(let e=0;e<r;e++){a=i,o.push(a);for(let e=1;e<n;e++)a=a.add(i),o.push(a);i=a.double()}return o}wNAF(e,t,r){if(!this.Fn.isValid(r))throw Error("invalid scalar");let n=this.ZERO,o=this.BASE,i=tt(e,this.bits);for(let e=0;e<i.windows;e++){let{nextN:a,offset:s,isZero:c,isNeg:u,isNegF:l,offsetF:f}=tr(r,e,i);r=a,c?o=o.add(e9(l,t[f])):n=n.add(e9(u,t[s]))}return ta(r),{p:n,f:o}}wNAFUnsafe(e,t,r,n=this.ZERO){let o=tt(e,this.bits);for(let e=0;e<o.windows&&r!==e5;e++){let{nextN:i,offset:a,isZero:s,isNeg:c}=tr(r,e,o);if(r=i,!s){let e=t[a];n=n.add(c?e.negate():e)}}return ta(r),n}getPrecomputes(e,t,r){let n=tn.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&("function"==typeof r&&(n=r(n)),tn.set(t,n))),n}cached(e,t,r){let n=ti(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)}unsafe(e,t,r,n){let o=ti(e);return 1===o?this._unsafeLadder(e,t,n):this.wNAFUnsafe(o,this.getPrecomputes(o,e,r),t,n)}createCache(e,t){te(t,this.bits),to.set(e,t),tn.delete(e)}hasCache(e){return 1!==ti(e)}}function tc(e,t,r,n){(function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw Error("invalid point at index "+r)})})(r,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)})}(n,t);let o=r.length,i=n.length;if(o!==i)throw Error("arrays of points and scalars must have equal length");let a=e.ZERO,s=function(e){let t;for(t=0;e>eE;e>>=ex,t+=1);return t}(BigInt(o)),c=1;s>12?c=s-3:s>4?c=s-2:s>0&&(c=2);let u=eR(c),l=Array(Number(u)+1).fill(a),f=a;for(let e=Math.floor((t.BITS-1)/c)*c;e>=0;e-=c){l.fill(a);for(let t=0;t<i;t++){let o=Number(n[t]>>BigInt(e)&u);l[o]=l[o].add(r[t])}let t=a;for(let e=l.length-1,r=a;e>0;e--)r=r.add(l[e]),t=t.add(r);if(f=f.add(t),0!==e)for(let e=0;e<c;e++)f=f.double()}return f}function tu(e,t,r){if(t){if(t.ORDER!==e)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return eU(t,e2.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"})),t}return e3(e,{isLE:r})}let tl=BigInt(0),tf=BigInt(1),tp=BigInt(2),td=BigInt(8);class th{constructor(e){this.ep=e}static fromBytes(e){eN()}static fromHex(e){eN()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(e){return this.ep.toAffine(e)}toHex(){return H(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(e){return this.assertSame(e),this.init(this.ep.add(e.ep))}subtract(e){return this.assertSame(e),this.init(this.ep.subtract(e.ep))}multiply(e){return this.init(this.ep.multiply(e))}multiplyUnsafe(e){return this.init(this.ep.multiplyUnsafe(e))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}
2precompute(e,t){return this.init(this.ep.precompute(e,t))}toRawBytes(){return this.toBytes()}}W("HashToScalar-");let ty=BigInt(0),tm=BigInt(1),tg=BigInt(2),tb=(BigInt(3),BigInt(5)),tv=BigInt(8),tw=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),tS={p:tw,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:tv,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")},t_=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function tE(e,t){var r;let n,o,i,a,s,c,u,l,f,p,d,h,y,m,g=eW(t*t*t,tw),b=eW(g*g*t,tw),v=eW(e*g*(r=e*b,n=BigInt(10),o=BigInt(20),i=BigInt(40),a=BigInt(80),c=eX(s=r*r%tw*r%tw,tg,tw)*s%tw,u=eX(c,tm,tw)*r%tw,l=eX(u,tb,tw)*u%tw,f=eX(l,n,tw)*l%tw,p=eX(f,o,tw)*f%tw,d=eX(p,i,tw)*p%tw,h=eX(d,a,tw)*d%tw,y=eX(h,a,tw)*d%tw,m=eX(y,n,tw)*l%tw,{pow_p_5_8:eX(m,tg,tw)*r%tw,b2:s}).pow_p_5_8,tw),w=eW(t*v*v,tw),S=v,_=eW(v*t_,tw),E=w===e,x=w===eW(-e,tw),A=w===eW(-e*t_,tw);return E&&(v=S),(x||A)&&(v=_),e1(v,tw)&&(v=eW(-v,tw)),{isValid:E||x,value:v}}let tx=e3(tS.p,{isLE:!0}),tA=e3(tS.n,{isLE:!0}),tT=function(e){var t;let r,n,o,i,{CURVE:a,curveOpts:s,hash:c,eddsaOpts:u}=(r={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n={Fp:e.Fp,Fn:e3(r.n,e.nBitLength,!0),uvRatio:e.uvRatio},o={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve},{CURVE:r,curveOpts:n,hash:e.hash,eddsaOpts:o});return i=(t=function(e,t,r={}){if("function"!=typeof t)throw Error('"hash" function param is required');eU(r,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});let{prehash:n}=r,{BASE:o,Fp:i,Fn:a}=e,s=r.randomBytes||Y,c=r.adjustScalarBytes||(e=>e),u=r.domain||((e,t,r)=>{if(eA(r,"phflag"),t.length||r)throw Error("Contexts/pre-hash are not supported");return e});function l(e){return a.create(eO(e))}function f(e){var r;let n,i,a,{head:s,prefix:u,scalar:f}=(r=eB("private key",r=e,n=m.secretKey),{head:a=c((i=eB("hashed private key",t(r),2*n)).slice(0,n)),prefix:i.slice(n,2*n),scalar:l(a)}),p=o.multiply(f),d=p.toBytes();return{head:s,prefix:u,scalar:f,point:p,pointBytes:d}}function p(e){return f(e).pointBytes}function d(e=Uint8Array.of(),...r){return l(t(u(Q(...r),eB("context",e),!!n)))}let h={zip215:!0},y=i.BYTES,m={secretKey:y,publicKey:y,signature:2*y,seed:y};function g(e=s(m.seed)){return eT(e,m.seed,"seed")}let b={getExtendedPublicKey:f,randomSecretKey:g,isValidSecretKey:function(e){return D(e)&&e.length===a.BYTES},isValidPublicKey:function(t,r){try{return!!e.fromBytes(t,r)}catch(e){return!1}},toMontgomery(t){let{y:r}=e.fromBytes(t),n=m.publicKey,o=32===n;if(!o&&57!==n)throw Error("only defined for 25519 and 448");let a=o?i.div(tf+r,tf-r):i.div(r-tf,r+tf);return i.toBytes(a)},toMontgomeryPriv(e){let r=m.secretKey;return eT(e,r),c(t(e.subarray(0,r))).subarray(0,r)},randomPrivateKey:g,precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)};return Object.freeze({keygen:function(e){let t=b.randomSecretKey(e);return{secretKey:t,publicKey:p(t)}},getPublicKey:p,sign:function(e,t,r={}){e=eB("message",e),n&&(e=n(e));let{prefix:i,scalar:s,pointBytes:c}=f(t),u=d(r.context,i,e),l=o.multiply(u).toBytes(),p=d(r.context,l,c,e),h=a.create(u+p*s);if(!a.isValid(h))throw Error("sign failed: invalid s");return eT(Q(l,a.toBytes(h)),m.signature,"result")},verify:function(t,r,i,a=h){let s,c,u,{context:l,zip215:f}=a,p=m.signature;t=eB("signature",t,p),r=eB("message",r),i=eB("publicKey",i,m.publicKey),void 0!==f&&eA(f,"zip215"),n&&(r=n(r));let y=p/2,g=t.subarray(0,y),b=eO(t.subarray(y,p));try{s=e.fromBytes(i,f),c=e.fromBytes(g,f),u=o.multiplyUnsafe(b)}catch(e){return!1}if(!f&&s.isSmallOrder())return!1;let v=d(l,c.toBytes(),s.toBytes(),r);return c.add(s.multiplyUnsafe(v)).subtract(u).clearCofactor().is0()},utils:b,Point:e,lengths:m})}(function(e,t={}){var r,n;let o,i,a,s,c,u=function(e,t,r={}
2,n){if(void 0===n&&(n="edwards"===e),!t||"object"!=typeof t)throw Error(`expected valid ${e} CURVE object`);for(let e of["p","n","h"]){let r=t[e];if(!("bigint"==typeof r&&r>e5))throw Error(`CURVE.${e} must be positive bigint`)}let o=tu(t.p,r.Fp,n),i=tu(t.n,r.Fn,n);for(let e of["Gx","Gy","a","d"])if(!o.isValid(t[e]))throw Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:o,Fn:i}}("edwards",e,t,t.FpFnLE),{Fp:l,Fn:f}=u,p=u.CURVE,{h:d}=p;eU(t,{},{uvRatio:"function"});let h=tp<<BigInt(8*f.BYTES)-tf,y=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:l.sqrt(l.div(e,t))}}catch(e){return{isValid:!1,value:tl}}});if(r=p.Gx,n=p.Gy,o=l.sqr(r),i=l.sqr(n),a=l.add(l.mul(p.a,o),i),s=l.add(l.ONE,l.mul(p.d,l.mul(o,i))),!l.eql(a,s))throw Error("bad curve params: generator point");function m(e,t,r=!1){return eC("coordinate "+e,t,r?tf:tl,h),t}function g(e){if(!(e instanceof w))throw Error("ExtendedPoint expected")}let b=eM((e,t)=>{let r,n,{X:o,Y:i,Z:a}=e,s=e.is0();null==t&&(t=s?td:l.inv(a));let c=(r=o*t,l.create(r)),u=(n=i*t,l.create(n)),f=l.mul(a,t);if(s)return{x:tl,y:tf};if(f!==tf)throw Error("invZ was invalid");return{x:c,y:u}}),v=eM(e=>{let t,r,n,o,i,a,s,c,u,f,d,h,{a:y,d:m}=p;if(e.is0())throw Error("bad point: ZERO");let{X:g,Y:b,Z:v,T:w}=e,S=(t=g*g,l.create(t)),_=(r=b*b,l.create(r)),E=(n=v*v,l.create(n)),x=(o=E*E,l.create(o));if(s=E*(i=S*y,a=l.create(i)+_,l.create(a)),l.create(s)!==(f=x+(u=m*(c=S*_,l.create(c)),l.create(u)),l.create(f)))throw Error("bad point: equation left != right (1)");if(d=g*b,l.create(d)!==(h=v*w,l.create(h)))throw Error("bad point: equation left != right (2)");return!0});class w{constructor(e,t,r,n){this.X=m("x",e),this.Y=m("y",t),this.Z=m("z",r,!0),this.T=m("t",n),Object.freeze(this)}static CURVE(){return p}static fromAffine(e){let t;if(e instanceof w)throw Error("extended point not allowed");let{x:r,y:n}=e||{};return m("x",r),m("y",n),new w(r,n,tf,(t=r*n,l.create(t)))}static fromBytes(e,t=!1){let r,n,o,i,a=l.BYTES,{a:s,d:c}=p;e=ej(eT(e,a,"point")),eA(t,"zip215");let u=ej(e),f=e[a-1];u[a-1]=-129&f;let d=eO(u);eC("point.y",d,tl,t?h:l.ORDER);let m=(r=d*d,l.create(r)),{isValid:g,value:b}=y((n=m-tf,l.create(n)),(o=c*m-s,l.create(o)));if(!g)throw Error("bad point: invalid y coordinate");let v=(b&tf)===tf,S=!!(128&f);if(!t&&b===tl&&S)throw Error("bad point: x=0 and x_0=1");return S!==v&&(i=-b,b=l.create(i)),w.fromAffine({x:b,y:d})}static fromHex(e,t=!1){return w.fromBytes(eB("point",e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return S.createCache(this,e),t||this.multiply(tp),this}assertValidity(){v(this)}equals(e){let t,r,n,o;g(e);let{X:i,Y:a,Z:s}=this,{X:c,Y:u,Z:f}=e,p=(t=i*f,l.create(t)),d=(r=c*s,l.create(r)),h=(n=a*f,l.create(n)),y=(o=u*s,l.create(o));return p===d&&h===y}is0(){return this.equals(w.ZERO)}negate(){let e,t;return new w((e=-this.X,l.create(e)),this.Y,this.Z,(t=-this.T,l.create(t)))}double(){let e,t,r,n,o,i,a,s,c,u,f,{a:d}=p,{X:h,Y:y,Z:m}=this,g=(e=h*h,l.create(e)),b=(t=y*y,l.create(t)),v=(n=tp*(r=m*m,l.create(r)),l.create(n)),S=(o=d*g,l.create(o)),_=h+y,E=(i=_*_,a=l.create(i)-g-b,l.create(a)),x=S+b,A=x-v,T=S-b,k=(s=E*A,l.create(s)),O=(c=x*T,l.create(c)),P=(u=E*T,l.create(u));return new w(k,O,(f=A*x,l.create(f)),P)}add(e){let t,r,n,o,i,a,s,c,u,f;g(e);let{a:d,d:h}=p,{X:y,Y:m,Z:b,T:v}=this,{X:S,Y:_,Z:E,T:x}=e,A=(t=y*S,l.create(t)),T=(r=m*_,l.create(r)),k=(n=v*h*x,l.create(n)),O=(o=b*E,l.create(o)),P=(i=(y+m)*(S+_)-A-T,l.create(i)),B=O-k,j=O+k,I=(a=T-d*A,l.create(a)),C=(s=P*B,l.create(s)),R=(c=j*I,l.create(c)),U=(u=P*I,l.create(u));return new w(C,R,(f=B*j,l.create(f)),U)}subtract(e){return this.add(e.negate())}multiply(e){if(!f.isValidNot0(e))throw Error("invalid scalar: expected 1 <= sc < curve.n");let{p:t,f:r}=S.cached(this,e,e=>e7(w,e));return e7(w,[t,r])[0]}multiplyUnsafe(e,t=w.ZERO){if(!f.isValid(e))throw Error("invalid scalar: expected 0 <= sc < curve.n");return e===tl?w.ZERO:this.is0()||e===tf?this:S.unsafe(this,e,e=>e7(w,e),t)}isSmallOrder(){return this.multiplyUnsafe(d).is0()}isTorsionFree(){return S.unsafe(this,p.n).is0()}toAffine(e){return b(this,e)}clearCofactor(){return d===tf?this:this.multiplyUnsafe(d)}toBytes(){let{x:e,y:t}=this.toAffine(),r=l.toBytes(t);return r[r.length-1]|=e&tf?128:0,r}toHex(){return H(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(e){return e7(w,e)}static msm(e,t){return tc(w,f,e,t)}
2_setWindowSize(e){this.precompute(e)}toRawBytes(){return this.toBytes()}}w.BASE=new w(p.Gx,p.Gy,tf,(c=p.Gx*p.Gy,l.create(c))),w.ZERO=new w(tl,tf,tf,tl),w.Fp=l,w.Fn=f;let S=new ts(w,f.BITS);return w.BASE.precompute(8),w}(a,s),c,u)).Point,Object.assign({},t,{ExtendedPoint:i,CURVE:e,nBitLength:i.Fn.BITS,nByteLength:i.Fn.BYTES})}({...tS,Fp:tx,hash:e_,adjustScalarBytes:function(e){return e[0]&=248,e[31]&=127,e[31]|=64,e},uvRatio:tE}),tk=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),tO=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),tP=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),tB=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),tj=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),tI=e=>tT.Point.Fp.create(eO(e)&tj);function tC(e){let t,r,n,o,i,a,s,c,u,l,f,p,d,h,y,{d:m}=tS,g=(t=t_*e*e,tx.create(t)),b=(r=(g+tm)*tP,tx.create(r)),v=BigInt(-1),w=(o=(v-m*g)*(n=g+m,tx.create(n)),tx.create(o)),{isValid:S,value:_}=tE(b,w),E=(i=_*e,tx.create(i));e1(E,tw)||(a=-E,E=tx.create(a)),S||(_=E),S||(v=g);let x=(s=v*(g-tm)*tB-w,tx.create(s)),A=_*_,T=(c=(_+_)*w,tx.create(c)),k=(u=x*tk,tx.create(u)),O=(l=tm-A,tx.create(l)),P=(f=tm+A,tx.create(f));return new tT.Point((p=T*P,tx.create(p)),(d=O*k,tx.create(d)),(h=k*P,tx.create(h)),(y=T*O,tx.create(y)))}class tR extends th{constructor(e){super(e)}static fromAffine(e){return new tR(tT.Point.fromAffine(e))}assertSame(e){if(!(e instanceof tR))throw Error("RistrettoPoint expected")}init(e){return new tR(e)}static hashToCurve(e){var t;let r,n;return L(t=eB("ristrettoHash",e,64),64),r=tC(tI(t.subarray(0,32))),n=tC(tI(t.subarray(32,64))),new tR(r.add(n))}static fromBytes(e){let t,r,n,o,i,a,s,c,u,l,f,p,d;L(e,32);let{a:h,d:y}=tS,m=tI(e);if(!function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}(tx.toBytes(m),e)||e1(m,tw))throw Error("invalid ristretto255 encoding 1");let g=(t=m*m,tx.create(t)),b=(r=tm+h*g,tx.create(r)),v=(n=tm-h*g,tx.create(n)),w=(o=b*b,tx.create(o)),S=(i=v*v,tx.create(i)),_=(a=h*y*w-S,tx.create(a)),{isValid:E,value:x}=(s=_*S,tE(tm,tx.create(s))),A=(c=x*v,tx.create(c)),T=(u=x*A*_,tx.create(u)),k=(l=(m+m)*A,tx.create(l));e1(k,tw)&&(f=-k,k=tx.create(f));let O=(p=b*T,tx.create(p)),P=(d=k*O,tx.create(d));if(!E||e1(P,tw)||O===ty)throw Error("invalid ristretto255 encoding 2");return new tR(new tT.Point(k,O,tm,P))}static fromHex(e){return tR.fromBytes(eB("ristrettoHex",e,32))}static msm(e,t){return tc(tR,tT.Point.Fn,e,t)}toBytes(){let e,t,r,n,o,i,a,s,c,u,l,f,p,{X:d,Y:h,Z:y,T:m}=this.ep,g=(e=y+h,r=tx.create(e)*(t=y-h,tx.create(t)),tx.create(r)),b=(n=d*h,tx.create(n)),{value:v}=(i=g*(o=b*b,tx.create(o)),tE(tm,tx.create(i))),w=(a=v*g,tx.create(a)),S=(s=v*b,tx.create(s)),_=(c=w*S*m,tx.create(c));if(e1(m*_,tw)){let e,t,r=(e=h*t_,tx.create(e)),n=(t=d*t_,tx.create(t));d=r,h=n,p=tx.create(w*tO)}else p=S;e1(d*_,tw)&&(u=-h,h=tx.create(u));let E=(l=(y-h)*p,tx.create(l));return e1(E,tw)&&(f=-E,E=tx.create(f)),tx.toBytes(E)}equals(e){let t,r,n,o;this.assertSame(e);let{X:i,Y:a}=this.ep,{X:s,Y:c}=e.ep,u=(t=i*c,tx.create(t)===(r=a*s,tx.create(r))),l=(n=a*c,tx.create(n)===(o=i*s,tx.create(o)));return u||l}is0(){return this.equals(tR.ZERO)}}tR.BASE=new tR(tT.Point.BASE),tR.ZERO=new tR(tT.Point.ZERO),tR.Fp=tx,tR.Fn=tA;var tU=r(8287).Buffer;function tN(e,t){return tU.from(tT.sign(tU.from(e),t))}function tM(e,t,r){return tT.verify(tU.from(t),tU.from(e),tU.from(r),{zip215:!1})}var tD=function(e,t){for(var r=String(e);r.endsWith(t);)r=r.slice(0,-1);return"number"==typeof e?Number(r):r},tL=r(5360),tF=r(8287).Buffer;function tq(e){return(tq="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 tV(e){var t=function(e){if("object"!=tq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=tq(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tq(t)?t:t+""}
2var t$,tz,tH,tG={ed25519PublicKey:48,ed25519SecretSeed:144,med25519PublicKey:96,preAuthTx:152,sha256Hash:184,signedPayload:120,contract:16,liquidityPool:88,claimableBalance:8},tK={G:"ed25519PublicKey",S:"ed25519SecretSeed",M:"med25519PublicKey",T:"preAuthTx",X:"sha256Hash",P:"signedPayload",C:"contract",L:"liquidityPool",B:"claimableBalance"},tW=(function(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,tV(n.key),n)}}(tz=function e(){if(!(this instanceof e))throw TypeError("Cannot call a class as a function")},[{key:"encodeEd25519PublicKey",value:function(e){return tJ("ed25519PublicKey",e)}},{key:"decodeEd25519PublicKey",value:function(e){return tQ("ed25519PublicKey",e)}},{key:"isValidEd25519PublicKey",value:function(e){return tX("ed25519PublicKey",e)}},{key:"encodeEd25519SecretSeed",value:function(e){return tJ("ed25519SecretSeed",e)}},{key:"decodeEd25519SecretSeed",value:function(e){return tQ("ed25519SecretSeed",e)}},{key:"isValidEd25519SecretSeed",value:function(e){return tX("ed25519SecretSeed",e)}},{key:"encodeMed25519PublicKey",value:function(e){return tJ("med25519PublicKey",e)}},{key:"decodeMed25519PublicKey",value:function(e){return tQ("med25519PublicKey",e)}},{key:"isValidMed25519PublicKey",value:function(e){return tX("med25519PublicKey",e)}},{key:"encodePreAuthTx",value:function(e){return tJ("preAuthTx",e)}},{key:"decodePreAuthTx",value:function(e){return tQ("preAuthTx",e)}},{key:"encodeSha256Hash",value:function(e){return tJ("sha256Hash",e)}},{key:"decodeSha256Hash",value:function(e){return tQ("sha256Hash",e)}},{key:"encodeSignedPayload",value:function(e){return tJ("signedPayload",e)}},{key:"decodeSignedPayload",value:function(e){return tQ("signedPayload",e)}},{key:"isValidSignedPayload",value:function(e){return tX("signedPayload",e)}},{key:"encodeContract",value:function(e){return tJ("contract",e)}},{key:"decodeContract",value:function(e){return tQ("contract",e)}},{key:"isValidContract",value:function(e){return tX("contract",e)}},{key:"encodeClaimableBalance",value:function(e){return tJ("claimableBalance",e)}},{key:"decodeClaimableBalance",value:function(e){return tQ("claimableBalance",e)}},{key:"isValidClaimableBalance",value:function(e){return tX("claimableBalance",e)}},{key:"encodeLiquidityPool",value:function(e){return tJ("liquidityPool",e)}},{key:"decodeLiquidityPool",value:function(e){return tQ("liquidityPool",e)}},{key:"isValidLiquidityPool",value:function(e){return tX("liquidityPool",e)}},{key:"getVersionByteForPrefix",value:function(e){return tK[e[0]]}}]),Object.defineProperty(tz,"prototype",{writable:!1}),tz);function tX(e,t){if("string"!=typeof t)return!1;switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":case"liquidityPool":if(56!==t.length)return!1;break;case"claimableBalance":if(58!==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=tQ(e,t)}catch(e){return!1}switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":case"liquidityPool":return 32===r.length;case"claimableBalance":return 33===r.length;case"med25519PublicKey":return 40===r.length;case"signedPayload":return r.length>=40&&r.length<=100;default:return!1}}function tQ(e,t){if("string"!=typeof t)throw TypeError("encoded argument must be of type String");var r=tL.decode(t),n=r[0],o=r.slice(0,-2),i=o.slice(1),a=r.slice(-2);if(t!==tL.encode(r))throw Error("invalid encoded string");var s=tG[e];if(void 0===s)throw Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(tG).join(", ")));if(n!==s)throw 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}(tY(o),a))throw Error("invalid checksum");return tF.from(i)}function tJ(e,t){if(null==t)throw Error("cannot encode null data");var r=tG[e];if(void 0===r)throw Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(tG).join(", ")));t=tF.from(t);var n=tF.from([r]),o=tF.concat([n,t]),i=tF.from(tY(o)),a=tF.concat([o,i]);return tL.encode(a)}function tY(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,
26864,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]])&65535;var o=new Uint8Array(2);return o[0]=255&r,o[1]=r>>8&255,o}(tH=tV(tH="types"))in tW?Object.defineProperty(tW,tH,{value:tK,enumerable:!0,configurable:!0,writable:!0}):tW[tH]=tK;var tZ=r(8287).Buffer;function t0(e){return(t0="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 t1(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,function(e){var t=function(e){if("object"!=t0(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=t0(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t0(t)?t:t+""}(n.key),n)}}var t2=(i=function e(t){var r;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),"ed25519"!==t.type)throw Error("Invalid keys type");if(this.type=t.type,t.secretKey){if(t.secretKey=tZ.from(t.secretKey),32!==t.secretKey.length)throw Error("secretKey length is invalid");if(this._secretSeed=t.secretKey,this._publicKey=(r=t.secretKey,tU.from(tT.getPublicKey(r))),this._secretKey=t.secretKey,t.publicKey&&!this._publicKey.equals(tZ.from(t.publicKey)))throw Error("secretKey does not match publicKey")}else if(this._publicKey=tZ.from(t.publicKey),32!==this._publicKey.length)throw Error("publicKey length is invalid")},a=[{key:"xdrAccountId",value:function(){return new C.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new C.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrMuxedAccount",value:function(e){if(void 0!==e){if("string"!=typeof e)throw TypeError("expected string for ID, got ".concat(t0(e)));return C.MuxedAccount.keyTypeMuxedEd25519(new C.MuxedAccountMed25519({id:C.Uint64.fromString(e),ed25519:this._publicKey}))}return new C.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 tW.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw Error("no secret key available");if("ed25519"===this.type)return tW.encodeEd25519SecretSeed(this._secretSeed);throw 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 Error("cannot sign: no secret key available");return tN(e,this._secretKey)}},{key:"verify",value:function(e,t){return tM(e,t,this._publicKey)}},{key:"signDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint();return new C.DecoratedSignature({hint:r,signature:t})}},{key:"signPayloadDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint(),n=tZ.from(e.slice(-4));return n.length<4&&(n=tZ.concat([n,tZ.alloc(4-e.length,0)])),new C.DecoratedSignature({hint:n.map(function(e,t){return e^r[t]}),signature:t})}}],s=[{key:"fromSecret",value:function(e){var t=tW.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 Error("No network selected. Please pass a network argument, e.g. `Keypair.master(Networks.PUBLIC)`.");return this.fromRawEd25519Seed(N(e))}},{key:"fromPublicKey",value:function(e){if(32!==(e=tW.decodeEd25519PublicKey(e)).length)throw Error("Invalid Stellar public key");return new this({type:"ed25519",publicKey:e})}},{key:"random",value:function(){var e=tT.utils.randomPrivateKey();return this.fromRawEd25519Seed(e)}}],a&&t1(i.prototype,a),s&&t1(i,s),Object.defineProperty(i,"prototype",{writable:!1}),i),t6=r(8287).Buffer;function t4(e){return(t4="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 t3(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,function(e){var t=function(e){if("object"!=t4(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=t4(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t4(t)?t:t+""}(n.key),n)}}var t5=function(){var e,t;function r(e,t){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),!/^[a-zA-Z0-9]{1,12}
2$/.test(e))throw Error("Asset code is invalid (maximum alphanumeric, 12 characters at max)");if("xlm"!==String(e).toLowerCase()&&!t)throw Error("Issuer cannot be null");if(t&&!tW.isValidEd25519PublicKey(t))throw Error("Issuer is invalid");"xlm"===String(e).toLowerCase()?this.code="XLM":this.code=e,this.issuer=t}return e=[{key:"toXDRObject",value:function(){return this._toXDRObject(C.Asset)}},{key:"toChangeTrustXDRObject",value:function(){return this._toXDRObject(C.ChangeTrustAsset)}},{key:"toTrustLineXDRObject",value:function(){return this._toXDRObject(C.TrustLineAsset)}},{key:"contractId",value:function(e){var t=N(t6.from(e)),r=C.HashIdPreimage.envelopeTypeContractId(new C.HashIdPreimageContractId({networkId:t,contractIdPreimage:C.ContractIdPreimage.contractIdPreimageFromAsset(this.toXDRObject())}));return tW.encodeContract(N(r.toXDR()))}},{key:"_toXDRObject",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C.Asset;if(this.isNative())return r.assetTypeNative();this.code.length<=4?(e=C.AlphaNum4,t="assetTypeCreditAlphanum4"):(e=C.AlphaNum12,t="assetTypeCreditAlphanum12");var n=this.code.length<=4?4:12;return new r(t,new e({assetCode:this.code.padEnd(n,"\0"),issuer:t2.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().value){case C.AssetType.assetTypeNative().value:return"native";case C.AssetType.assetTypeCreditAlphanum4().value:return"credit_alphanum4";case C.AssetType.assetTypeCreditAlphanum12().value:return"credit_alphanum12";default:return"unknown"}}},{key:"getRawAssetType",value:function(){return this.isNative()?C.AssetType.assetTypeNative():this.code.length<=4?C.AssetType.assetTypeCreditAlphanum4():C.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())}}],t=[{key:"native",value:function(){return new r("XLM")}},{key:"fromOperation",value:function(e){var t,r;switch(e.switch()){case C.AssetType.assetTypeNative():return this.native();case C.AssetType.assetTypeCreditAlphanum4():t=e.alphaNum4();case C.AssetType.assetTypeCreditAlphanum12():return t=t||e.alphaNum12(),r=tW.encodeEd25519PublicKey(t.issuer().ed25519()),new this(tD(t.assetCode(),"\0"),r);default:throw Error("Invalid asset type: ".concat(e.switch().name))}}},{key:"compare",value:function(e,t){if(!(e&&e instanceof r))throw Error("assetA is invalid");if(!(t&&t instanceof r))throw Error("assetB is invalid");if(e.equals(t))return 0;var n=e.getRawAssetType().value,o=t.getRawAssetType().value;if(n!==o)return n<o?-1:1;var i=t8(e.getCode(),t.getCode());return 0!==i?i:t8(e.getIssuer(),t.getIssuer())}}],e&&t3(r.prototype,e),t&&t3(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}();function t8(e,t){return t6.compare(t6.from(e,"ascii"),t6.from(t,"ascii"))}var t9=r(8287).Buffer,t7=30;function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("constant_product"!==e)throw Error("liquidityPoolType is invalid");var r=t.assetA,n=t.assetB,o=t.fee;if(!(r&&r instanceof t5))throw Error("assetA is invalid");if(!(n&&n instanceof t5))throw Error("assetB is invalid");if(!o||o!==t7)throw Error("fee is invalid");if(-1!==t5.compare(r,n))throw Error("Assets are not in lexicographic order");var i=C.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),a=new C.LiquidityPoolConstantProductParameters({assetA:r.toXDRObject(),assetB:n.toXDRObject(),fee:o}).toXDR();return N(t9.concat([i,a]))}var rt=r(8287).Buffer;function rr(e){return(rr="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)}var rn=(c=function e(t,r,n,o){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),"string"!=typeof o)throw Error("Invalid passphrase provided to Transaction: expected a string but got a ".concat(rr(o)));this._networkPassphrase=o,this._tx=t,this._signatures=r,this._fee=n},u=[{key:"signatures",get:function(){return this._signatures},set:function(e){throw Error("Transaction is immutable")}},{key:"tx",get:function(){return this._tx},set:function(e){throw Error("Transaction is immutable")}},{key:"fee",get:function(){return this._fee},set:function(e){throw 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=Array(r),o=0;o<r;o++)n[o]=arguments[o];
2n.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 Error("Invalid signature");if(!r||"string"!=typeof r)throw Error("Invalid publicKey");var o=rt.from(n,"base64");try{t=(e=t2.fromPublicKey(r)).signatureHint()}catch(e){throw Error("Invalid publicKey")}if(!e.verify(this.hash(),o))throw Error("Invalid signature");this.signatures.push(new C.DecoratedSignature({hint:t,signature:o}))}},{key:"addDecoratedSignature",value:function(e){this.signatures.push(e)}},{key:"signHashX",value:function(e){if("string"==typeof e&&(e=rt.from(e,"hex")),e.length>64)throw Error("preimage cannnot be longer than 64 bytes");var t=e,r=N(e),n=r.slice(r.length-4);this.signatures.push(new C.DecoratedSignature({hint:n,signature:t}))}},{key:"hash",value:function(){return N(this.signatureBase())}},{key:"signatureBase",value:function(){throw Error("Implement in subclass")}},{key:"toEnvelope",value:function(){throw Error("Implement in subclass")}},{key:"toXDR",value:function(){return this.toEnvelope().toXDR().toString("base64")}}],function(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,function(e){var t=function(e){if("object"!=rr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=rr(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rr(t)?t:t+""}(n.key),n)}}(c.prototype,u),Object.defineProperty(c,"prototype",{writable:!1}),c),ro=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ri=Math.ceil,ra=Math.floor,rs="[BigNumber Error] ",rc=rs+"Number primitive has more than 15 significant digits: ",ru=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function rl(e){var t=0|e;return e>0||e===t?t:t-1}function rf(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(r=14-(t=e[n++]+"").length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function rp(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,u=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=c==u,!o||!i)return n?0:!o^r?1:-1;if(!n)return c>u^r?1:-1;for(s=(c=o.length)<(u=i.length)?c:u,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return c==u?0:c>u^r?1:-1}function rd(e,t,r,n){if(e<t||e>r||e!==ra(e))throw Error(rs+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function rh(e){var t=e.c.length-1;return rl(e.e/14)==t&&e.c[t]%2!=0}function ry(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function rm(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 rg=(function e(t){var r,n,o,i,a,s,c,u,l,f=A.prototype={constructor:A,toString:null,valueOf:null},p=new A(1),d=20,h=4,y=-7,m=21,g=-1e7,b=1e7,v=!1,w=1,S=0,_={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",x=!0;function A(e,t){var r,i,a,s,c,u,l,f,p=this;if(!(p instanceof A))return new A(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<g?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!ro.test(f=String(e)))return o(p,f,u);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(c=f.search(/e/i))>0?(s<0&&(s=c),s+=+f.slice(c+1),f=f.substring(0,c)):s<0&&(s=f.length)}else{if(rd(t,2,E.length,"Base"),10==t&&x)return P(p=new A(e),d+p.e+1,h);if(f=String(e),u="number"==typeof e){if(0*e!=0)return o(p,f,u,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,A.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(rc+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=E.slice(0,t),s=c=0,l=f.length;c<l;c++)if(0>r.indexOf(i=f.charAt(c))){if("."==i){if(c>s){s=l;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,c=-1,s=0;continue}return o(p,String(e),u,t)}u=!1,(s=(f=n(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(c=0;48===f.charCodeAt(c);c++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(c,++l)){if(l-=c,u&&A.DEBUG&&l>15&&(e>0x1fffffffffffff||e!==ra(e)))throw Error(rc+p.s*e);
2if((s=s-c-1)>b)p.c=p.e=null;else if(s<g)p.c=[p.e=0];else{if(p.e=s,p.c=[],c=(s+1)%14,s<0&&(c+=14),c<l){for(c&&p.c.push(+f.slice(0,c)),l-=14;c<l;)p.c.push(+f.slice(c,c+=14));c=14-(f=f.slice(c)).length}else c-=l;for(;c--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function T(e,t,r,n){var o,i,a,s,c;if(null==r?r=h:rd(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=rf(e.c),c=1==n||2==n&&(a<=y||a>=m)?ry(c,a):rm(c,a,"0");else if(i=(e=P(new A(e),t,r)).e,s=(c=rf(e.c)).length,1==n||2==n&&(t<=i||i<=y)){for(;s<t;c+="0",s++);c=ry(c,i)}else if(t-=a+(2===n&&i>a),c=rm(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function k(e,t){for(var r,n,o=1,i=new A(e[0]);o<e.length;o++)(n=new A(e[o])).s&&(r=rp(i,n))!==t&&(0!==r||i.s!==t)||(i=n);return i}function O(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+14*r-1)>b?e.c=e.e=null:r<g?e.c=[e.e=0]:(e.e=r,e.c=t),e}function P(e,t,r,n){var o,i,a,s,c,u,l,f=e.c;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=14,a=t,l=ra((c=f[u=0])/ru[o-a-1]%10);else if((u=ri((i+1)/14))>=f.length){if(!n)break e;for(;f.length<=u;f.push(0));c=l=0,o=1,a=(i%=14)-14+1}else{for(c=s=f[u],o=1;s>=10;s/=10,o++);l=(a=(i%=14)-14+o)<0?0:ra(c/ru[o-a-1]%10)}if(n=n||t<0||null!=f[u+1]||(a<0?c:c%ru[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?c/ru[o-a]:0:f[u-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=ru[(14-t%14)%14],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=u,s=1,u--):(f.length=u+1,s=ru[14-i],f[u]=a>0?ra(c/ru[o-a]%ru[a])*s:0),n)for(;;){if(0==u){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++,1e14==f[0]&&(f[0]=1));break}if(f[u]+=s,1e14!=f[u])break;f[u--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<g&&(e.c=[e.e=0])}return e}function B(e){var t,r=e.e;return null===r?e.toString():(t=rf(e.c),t=r<=y||r>=m?ry(t,r):rm(t,r,"0"),e.s<0?"-"+t:t)}return A.clone=e,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(rs+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(rd(r=e[t],0,1e9,t),d=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(rd(r=e[t],0,8,t),h=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(rd(r[0],-1e9,0,t),rd(r[1],0,1e9,t),y=r[0],m=r[1]):(rd(r,-1e9,1e9,t),y=-(m=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)rd(r[0],-1e9,-1,t),rd(r[1],1,1e9,t),g=r[0],b=r[1];else{if(rd(r,-1e9,1e9,t),!r)throw Error(rs+t+" cannot be zero: "+r);g=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(rs+t+" not true or false: "+r);if(r){if("u"<typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(rs+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(rd(r=e[t],0,9,t),w=r),e.hasOwnProperty(t="POW_PRECISION")&&(rd(r=e[t],0,1e9,t),S=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(rs+t+" not an object: "+r);_=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(rs+t+" invalid: "+r);x="0123456789"==r.slice(0,10),E=r}}return{DECIMAL_PLACES:d,ROUNDING_MODE:h,EXPONENTIAL_AT:[y,m],RANGE:[g,b],CRYPTO:v,MODULO_MODE:w,POW_PRECISION:S,FORMAT:_,ALPHABET:E}},A.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!A.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"==({}
2).toString.call(n)){if((1===i||-1===i)&&o>=-1e9&&o<=1e9&&o===ra(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%14)<1&&(t+=14),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=1e14||r!==ra(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(rs+"Invalid BigNumber: "+e)},A.maximum=A.max=function(){return k(arguments,-1)},A.minimum=A.min=function(){return k(arguments,1)},i=0x20000000000000*Math.random()&2097151?function(){return ra(0x20000000000000*Math.random())}:function(){return 8388608*(0x40000000*Math.random()|0)+(8388608*Math.random()|0)},A.random=function(e){var t,r,n,o,a,s=0,c=[],u=new A(p);if(null==e?e=d:rd(e,0,1e9),o=ri(e/14),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(c.push(a%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw v=!1,Error(rs+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(a=0x1000000000000*(31&t[s])+0x10000000000*t[s+1]+0x100000000*t[s+2]+0x1000000*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=o/7}if(!v)for(;s<o;)(a=i())<9e15&&(c[s++]=a%1e14);for(o=c[--s],e%=14,o&&e&&(a=ru[14-e],c[s]=ra(o/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=14);for(s=1,a=c[0];a>=10;a/=10,s++);s<14&&(n-=14-s)}return u.e=n,u.c=c,u},A.sum=function(){for(var e=1,t=arguments,r=new A(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,c=e.length;s<c;){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 c,u,l,f,p,y,m,g,b=n.indexOf("."),v=d,w=h;for(b>=0&&(f=S,S=0,n=n.replace(".",""),y=(g=new A(o)).pow(n.length-b),S=f,g.c=t(rm(rf(y.c),y.e,"0"),10,i,e),g.e=g.c.length),l=f=(m=t(n,o,i,s?(c=E,e):(c=e,E))).length;0==m[--f];m.pop());if(!m[0])return c.charAt(0);if(b<0?--l:(y.c=m,y.e=l,y.s=a,m=(y=r(y,g,v,w,i)).c,p=y.r,l=y.e),b=m[u=l+v+1],f=i/2,p=p||u<0||null!=m[u+1],p=w<4?(null!=b||p)&&(0==w||w==(y.s<0?3:2)):b>f||b==f&&(4==w||p||6==w&&1&m[u-1]||w==(y.s<0?8:7)),u<1||!m[0])n=p?rm(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(m.length=u,p)for(--i;++m[--u]>i;)m[u]=0,u||(++l,m=[1].concat(m));for(f=m.length;!m[--f];);for(b=0,n="";b<=f;n+=c.charAt(m[b++]));n=rm(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,a,s=0,c=e.length,u=t%1e7,l=t/1e7|0;for(e=e.slice();c--;)s=((o=u*(i=e[c]%1e7)+(n=l*i+(a=e[c]/1e7|0)*u)%1e7*1e7+s)/r|0)+(n/1e7|0)+l*a,e[c]=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]),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 c,u,l,f,p,d,h,y,m,g,b,v,w,S,_,E,x,T=n.s==o.s?1:-1,k=n.c,O=o.c;if(!(k&&k[0]&&O&&O[0]))return new A(n.s&&o.s&&(k?!O||k[0]!=O[0]:O)?k&&0==k[0]||!O?0*T:T/0:NaN);for(m=(y=new A(T)).c=[],T=i+(u=n.e-o.e)+1,s||(s=1e14,u=rl(n.e/14)-rl(o.e/14),T=T/14|0),l=0;O[l]==(k[l]||0);l++);if(O[l]>(k[l]||0)&&u--,T<0)m.push(1),f=!0;else{for(S=k.length,E=O.length,l=0,T+=2,(p=ra(s/(O[0]+1)))>1&&(O=e(O,p,s),k=e(k,p,s),E=O.length,S=k.length),w=E,b=(g=k.slice(0,E)).length;b<E;g[b++]=0);x=[0].concat(x=O.slice()),_=O[0],O[1]>=s/2&&_++;do{if(p=0,(c=t(O,g,E,b))<0){if(v=g[0],E!=b&&(v=v*s+(g[1]||0)),(p=ra(v/_))>1)for(p>=s&&(p=s-1),h=(d=e(O,p,s)).length,b=g.length;1==t(d,g,h,b);)p--,r(d,E<h?x:O,h,s),h=d.length,c=1;else 0==p&&(c=p=1),h=(d=O.slice()).length;if(h<b&&(d=[0].concat(d)),r(g,d,b,s),b=g.length,-1==c)for(;1>t(O,g,E,b);)p++,r(g,E<b?x:O,b,s),b=g.length}else 0===c&&(p++,g=[0]);m[l++]=p,g[0]?g[b++]=k[w]||0:(g=[k[w]],b=1)}while((w++<S||null!=g[0])&&T--)f=null!=g[0],m[0]||m.splice(0,1)}if(1e14==s){for(l=1,T=m[0];T>=10;T/=10,l++);P(y,i+(y.e=l+14*u-1)+1,a,f)}else y.e=u,y.r=+f;return y}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,u=/^-?(Infinity|NaN)$/,l=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,i=r?t:t.replace(l,"");if(u.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,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(s,"$1").replace(c,"0.$1")),t!=i))return new A(i,o);if(A.DEBUG)throw Error(rs+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return rp(this,new A(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o;if(null!=e)return rd(e,0,1e9),null==t?t=h:rd(t,0,8),P(new A(this),e+this.e+1,t);if(!(r=this.c))return null;if(n=((o=r.length-1)-rl(this.e/14))*14,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n}
2,f.dividedBy=f.div=function(e,t){return r(this,new A(e,t),d,h)},f.dividedToIntegerBy=f.idiv=function(e,t){return r(this,new A(e,t),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,i,a,s,c,u,l=this;if((e=new A(e)).c&&!e.isInteger())throw Error(rs+"Exponent not an integer: "+B(e));if(null!=t&&(t=new A(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 u=new A(Math.pow(+B(l),a?e.s*(2-rh(e)):+B(e))),t?u.mod(t):u;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(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&&rh(e)?-0:0,l.e>-1&&(i=1/i),new A(s?1/i:i);S&&(i=ri(S/14+2))}for(a?(r=new A(.5),s&&(e.s=1),c=rh(e)):c=(o=Math.abs(+B(e)))%2,u=new A(p);;){if(c){if(!(u=u.times(l)).c)break;i?u.c.length>i&&(u.c.length=i):n&&(u=u.mod(t))}if(o){if(0===(o=ra(o/2)))break;c=o%2}else if(P(e=e.times(r),e.e+1,1),e.e>14)c=rh(e);else{if(0==(o=+B(e)))break;c=o%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}return n?u:(s&&(u=p.div(u)),t?u.mod(t):i?P(u,S,h,void 0):u)},f.integerValue=function(e){var t=new A(this);return null==e?e=h:rd(e,0,8),P(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===rp(this,new A(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return rp(this,new A(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=rp(this,new A(e,t)))||0===t},f.isInteger=function(){return!!this.c&&rl(this.e/14)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return 0>rp(this,new A(e,t))},f.isLessThanOrEqualTo=f.lte=function(e,t){return -1===(t=rp(this,new A(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,i,a=this.s;if(t=(e=new A(e,t)).s,!a||!t)return new A(NaN);if(a!=t)return e.s=-t,this.plus(e);var s=this.e/14,c=e.e/14,u=this.c,l=e.c;if(!s||!c){if(!u||!l)return u?(e.s=-t,e):new A(l?this:NaN);if(!u[0]||!l[0])return l[0]?(e.s=-t,e):new A(u[0]?this:3==h?-0:0)}if(s=rl(s),c=rl(c),u=u.slice(),a=s-c){for((i=a<0)?(a=-a,o=u):(c=s,o=l),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=u.length)<(t=l.length))?a:t,a=t=0;t<n;t++)if(u[t]!=l[t]){i=u[t]<l[t];break}if(i&&(o=u,u=l,l=o,e.s=-e.s),(t=(n=l.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=1e14-1;n>a;){if(u[--n]<l[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=1e14}u[n]-=l[n]}for(;0==u[0];u.splice(0,1),--c);return u[0]?O(e,u,c):(e.s=3==h?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,t){var n,o;return e=new A(e,t),this.c&&e.s&&(!e.c||e.c[0])?e.c&&(!this.c||this.c[0])?(9==w?(o=e.s,e.s=1,n=r(this,e,0,3),e.s=o,n.s*=o):n=r(this,e,0,w),(e=this.minus(n.times(e))).c[0]||1!=w||(e.s=this.s),e):new A(this):new A(NaN)},f.multipliedBy=f.times=function(e,t){var r,n,o,i,a,s,c,u,l,f,p,d,h,y=this.c,m=(e=new A(e,t)).c;if(!(y&&m&&y[0]&&m[0]))return this.s&&e.s&&(!y||y[0]||m)&&(!m||m[0]||y)?(e.s*=this.s,y&&m?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(n=rl(this.e/14)+rl(e.e/14),e.s*=this.s,(c=y.length)<(f=m.length)&&(h=y,y=m,m=h,o=c,c=f,f=o),o=c+f,h=[];o--;h.push(0));for(o=f;--o>=0;){for(r=0,p=m[o]%1e7,d=m[o]/1e7|0,i=o+(a=c);i>o;)r=((u=p*(u=y[--a]%1e7)+(s=d*u+(l=y[a]/1e7|0)*p)%1e7*1e7+h[i]+r)/1e14|0)+(s/1e7|0)+d*l,h[i--]=u%1e14;h[i]=r}return r?++n:h.splice(0,1),O(e,h,n)},f.negated=function(){var e=new A(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this.s;if(t=(e=new A(e,t)).s,!n||!t)return new A(NaN);if(n!=t)return e.s=-t,this.minus(e);var o=this.e/14,i=e.e/14,a=this.c,s=e.c;if(!o||!i){if(!a||!s)return new A(n/0);if(!a[0]||!s[0])return s[0]?e:new A(a[0]?this:0*n)}if(o=rl(o),i=rl(i),a=a.slice(),n=o-i){for(n>0?(i=o,r=s):(n=-n,r=a),r.reverse();n--;r.push(0));r.reverse()}for((n=a.length)-(t=s.length)<0&&(r=s,s=a,a=r,t=n),n=0;t;)n=(a[--t]=a[t]+s[t]+n)/1e14|0,a[t]=1e14===a[t]?0:a[t]%1e14;return n&&(a=[n].concat(a),++i),O(e,a,i)},f.precision=f.sd=function(e,t){var r,n,o;if(null!=e&&!!e!==e)return rd(e,1,1e9),null==t?t=h:rd(t,0,8),P(new A(this),e,t);if(!(r=this.c))return null;if(n=14*(o=r.length-1)+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&this.e+1>n&&(n=this.e+1),n},f.shiftedBy=function(e){return rd(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,t,n,o,i,a=this.c,s=this.s,c=this.e,u=d+4,l=ne
2w A("0.5");if(1!==s||!a||!a[0])return new A(!s||s<0&&(!a||a[0])?NaN:a?this:1/0);if(0==(s=Math.sqrt(+B(this)))||s==1/0?(((t=rf(a)).length+c)%2==0&&(t+="0"),s=Math.sqrt(+t),c=rl((c+1)/2)-(c<0||c%2),n=new A(t=s==1/0?"5e"+c:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new A(s+""),n.c[0]){for((s=(c=n.e)+u)<3&&(s=0);;)if(i=n,n=l.times(i.plus(r(this,i,u,1))),rf(i.c).slice(0,s)===(t=rf(n.c)).slice(0,s)){if(n.e<c&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(P(n,n.e+d+2,1),e=!n.times(n).eq(this));break}if(!o&&(P(i,i.e+d+2,0),i.times(i).eq(this))){n=i;break}u+=4,s+=4,o=1}}return P(n,n.e+d+1,h,e)},f.toExponential=function(e,t){return null!=e&&(rd(e,0,1e9),e++),T(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(rd(e,0,1e9),e=e+this.e+1),T(this,e,t)},f.toFormat=function(e,t,r){var n;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=_;else if("object"!=typeof r)throw Error(rs+"Argument not an object: "+r);if(n=this.toFixed(e,t),this.c){var o,i=n.split("."),a=+r.groupSize,s=+r.secondaryGroupSize,c=r.groupSeparator||"",u=i[0],l=i[1],f=this.s<0,p=f?u.slice(1):u,d=p.length;if(s&&(o=a,a=s,s=o,d-=o),a>0&&d>0){for(o=d%a||a,u=p.substr(0,o);o<d;o+=a)u+=c+p.substr(o,a);s>0&&(u+=c+p.slice(o)),f&&(u="-"+u)}n=l?u+(r.decimalSeparator||"")+((s=+r.fractionGroupSize)?l.replace(RegExp("\\d{"+s+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):u}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var t,n,o,i,a,s,c,u,l,f,d,y,m=this.c;if(null!=e&&(!(c=new A(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(rs+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+B(c));if(!m)return new A(this);for(t=new A(p),l=n=new A(p),o=u=new A(p),y=rf(m),a=t.e=y.length-this.e-1,t.c[0]=ru[(s=a%14)<0?14+s:s],e=!e||c.comparedTo(t)>0?a>0?t:l:c,s=b,b=1/0,c=new A(y),u.c[0]=0;f=r(c,t,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,l=u.plus(f.times(i=l)),u=i,t=c.minus(f.times(i=t)),c=i;return i=r(e.minus(n),o,0,1),u=u.plus(i.times(l)),n=n.plus(i.times(o)),u.s=l.s=this.s,d=1>r(l,o,a*=2,h).minus(this).abs().comparedTo(r(u,n,a,h).minus(this).abs())?[l,o]:[u,n],b=s,d},f.toNumber=function(){return+B(this)},f.toPrecision=function(e,t){return null!=e&&rd(e,1,1e9),T(this,e,t,2)},f.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<=y||i>=m?ry(rf(r.c),i):rm(rf(r.c),i,"0"):10===e&&x?t=rm(rf((r=P(new A(r),d+i+1,h)).c),r.e,"0"):(rd(e,2,E.length,"Base"),t=n(rm(rf(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return B(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=t&&A.set(t),A})().clone();function rb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function rv(e){return(rv="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 rw(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 rS(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rw(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=rE(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function r_(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,rE(n.key),n)}}function rE(e){var t=function(e){if("object"!=rv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=rv(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rv(t)?t:t+""}rg.DEBUG=!0;var rx=(l=function e(t,r,n){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}
2(this,e),!(t&&t instanceof t5))throw Error("assetA is invalid");if(!(r&&r instanceof t5))throw Error("assetB is invalid");if(-1!==t5.compare(t,r))throw Error("Assets are not in lexicographic order");if(!n||n!==t7)throw Error("fee is invalid");this.assetA=t,this.assetB=r,this.fee=n},f=[{key:"toXDRObject",value:function(){var e=new C.LiquidityPoolConstantProductParameters({assetA:this.assetA.toXDRObject(),assetB:this.assetB.toXDRObject(),fee:this.fee}),t=new C.LiquidityPoolParameters("liquidityPoolConstantProduct",e);return new C.ChangeTrustAsset("assetTypePoolShare",t)}},{key:"getLiquidityPoolParameters",value:function(){return rS(rS({},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=re("constant_product",this.getLiquidityPoolParameters()).toString("hex");return"liquidity_pool:".concat(e)}}],p=[{key:"fromOperation",value:function(e){var t=e.switch();if(t===C.AssetType.assetTypePoolShare()){var r=e.liquidityPool().constantProduct();return new this(t5.fromOperation(r.assetA()),t5.fromOperation(r.assetB()),r.fee())}throw Error("Invalid asset type: ".concat(t.name))}}],f&&r_(l.prototype,f),p&&r_(l,p),Object.defineProperty(l,"prototype",{writable:!1}),l);function rA(e){return(rA="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 rT(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,function(e){var t=function(e){if("object"!=rA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=rA(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rA(t)?t:t+""}(n.key),n)}}var rk=(d=function e(t,r){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),t&&!tW.isValidEd25519PublicKey(t))throw Error("Destination is invalid");if(this._destination=t,r){if(!(r instanceof C.ClaimPredicate))throw Error("Predicate should be an xdr.ClaimPredicate");this._predicate=r}else this._predicate=C.ClaimPredicate.claimPredicateUnconditional()},h=[{key:"toXDRObject",value:function(){var e=new C.ClaimantV0({destination:t2.fromPublicKey(this._destination).xdrAccountId(),predicate:this._predicate});return C.Claimant.claimantTypeV0(e)}},{key:"destination",get:function(){return this._destination},set:function(e){throw Error("Claimant is immutable")}},{key:"predicate",get:function(){return this._predicate},set:function(e){throw Error("Claimant is immutable")}}],y=[{key:"predicateUnconditional",value:function(){return C.ClaimPredicate.claimPredicateUnconditional()}},{key:"predicateAnd",value:function(e,t){if(!(e instanceof C.ClaimPredicate))throw Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof C.ClaimPredicate))throw Error("right Predicate should be an xdr.ClaimPredicate");return C.ClaimPredicate.claimPredicateAnd([e,t])}},{key:"predicateOr",value:function(e,t){if(!(e instanceof C.ClaimPredicate))throw Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof C.ClaimPredicate))throw Error("right Predicate should be an xdr.ClaimPredicate");return C.ClaimPredicate.claimPredicateOr([e,t])}},{key:"predicateNot",value:function(e){if(!(e instanceof C.ClaimPredicate))throw Error("right Predicate should be an xdr.ClaimPredicate");return C.ClaimPredicate.claimPredicateNot(e)}},{key:"predicateBeforeAbsoluteTime",value:function(e){return C.ClaimPredicate.claimPredicateBeforeAbsoluteTime(C.Int64.fromString(e))}},{key:"predicateBeforeRelativeTime",value:function(e){return C.ClaimPredicate.claimPredicateBeforeRelativeTime(C.Int64.fromString(e))}},{key:"fromXDR",value:function(e){var t;if(e.switch()===C.ClaimantType.claimantTypeV0())return t=e.v0(),new this(tW.encodeEd25519PublicKey(t.destination().ed25519()),t.predicate());throw Error("Invalid claimant type: ".concat(e.switch().name))}}],h&&rT(d.prototype,h),y&&rT(d,y),Object.defineProperty(d,"prototype",{writable:!1}),d);function rO(e){return(rO="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 rP(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,function(e){var t=function(e){if("object"!=rO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=rO(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rO(t)?t:t+""}(n.key),n)}}var rB=(m=function e(t){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),!t)throw Error("liquidityPoolId cannot be empty");if(!/^[a-f0-9]{64}$/.test(t))throw Error("Liquidity pool ID is not a valid hash");this.liquidityPoolId=t},g=[{key:"toXDRObject",value:function(){var e=C.PoolId.fromXDR(this.liquidityPoolId,"hex");return new C.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)}}],b=[{key:"fromOperation",value:function(e){var t=e.switch();if(t===C.AssetType.assetTypePoolShare())return new this(e.liquidityPoolId().toString("hex"));throw Error("Invalid asset type: ".concat(t.name))}}],g&&rP(m.prototype,g),b&&rP(m,b),Object.defineProperty(m,"prototype",{writable:!1}),m),rj=r(8287).Buffer;function rI(e){var t;return tW.isValidMed25519PublicKey(e)?(t=tW.decodeMed25519PublicKey(e),C.MuxedAccount.keyTypeMuxedEd25519(new C.MuxedAccountMed25519({id:C.Uint64.fromXDR(t.subarray(-8)),ed25519:t.subarray(0,-8)}))):C.MuxedAccount.keyTypeEd25519(tW.decodeEd25519PublicKey(e))}function rC(e){return e.switch().value===C.CryptoKeyType.keyTypeMuxedEd25519().value?function(e){if(e.switch()===C.CryptoKeyType.keyTypeEd25519())return rC(e);var t=e.med25519();return tW.encodeMed25519PublicKey(rj.concat([t.ed25519(),t.id().toXDR("raw")]))}(e):tW.encodeEd25519PublicKey(e.ed25519())}function rR(e,t){if(!tW.isValidEd25519PublicKey(e))throw Error("address should be a Stellar account ID (G...)");if("string"!=typeof t)throw Error("id should be a string representing a number (uint64)");return C.MuxedAccount.keyTypeMuxedEd25519(new C.MuxedAccountMed25519({id:C.Uint64.fromString(t),ed25519:tW.decodeEd25519PublicKey(e)}))}function rU(e){if(tW.isValidEd25519PublicKey(e))return e;if(!tW.isValidMed25519PublicKey(e))throw TypeError("expected muxed account (M...), got ".concat(e));var t=rI(e);return tW.encodeEd25519PublicKey(t.med25519().ed25519())}function rN(e){if("string"!=typeof e||72!==e.length)throw Error("must provide a valid claimable balance id")}var rM=r(8287).Buffer,rD=r(8287).Buffer;function rL(e,t){if(e>=0&&e<=255)return!0;throw Error("".concat(t," value must be between 0 and 255"))}var rF=r(8287).Buffer;function rq(e){return(rq="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)}var rV=r(8287).Buffer;function r$(e){return(r$="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 rz(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,function(e){var t=function(e){if("object"!=r$(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=r$(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r$(t)?t:t+""}(n.key),n)}}var rH=function(){var e,t;function r(e){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),tW.isValidEd25519PublicKey(e))this._type="account",this._key=tW.decodeEd25519PublicKey(e);else if(tW.isValidContract(e))this._type="contract",this._key=tW.decodeContract(e);else if(tW.isValidMed25519PublicKey(e))this._type="muxedAccount",this._key=tW.decodeMed25519PublicKey(e);else if(tW.isValidClaimableBalance(e))this._type="claimableBalance",this._key=tW.decodeClaimableBalance(e);else{if(!tW.isValidLiquidityPool(e))throw Error("Unsupported address type: ".concat(e));this._type="liquidityPool",this._key=tW.decodeLiquidityPool(e)}}return e=[{key:"toString",value:function(){switch(this._type){case"account":return tW.encodeEd25519PublicKey(this._key);case"contract":return tW.encodeContract(this._key);case"claimableBalance":return tW.encodeClaimableBalance(this._key);case"liquidityPool":return tW.encodeLiquidityPool(this._key);case"muxedAccount":return tW.encodeMed25519PublicKey(this._key);default:throw Error("Unsupported address type")}}},{key:"toScVal",value:function(){return C.ScVal.scvAddress(this.toScAddress())}},{key:"toScAddress",value:function(){switch(this._type){case"account":return C.ScAddress.scAddressTypeAccount(C.PublicKey.publicKeyTypeEd25519(this._key));case"contract":return C.ScAddress.scAddressTypeContract(this._key);case"liquidityPool":return C.ScAddress.scAddressTypeLiquidityPool(this._key);case"claimableBalance":return C.ScAddress.scAddressTypeClaimableBalance(new C.ClaimableBalanceId("claimableBalanceIdTypeV".concat(this._key.at(0)),this._key.subarray(1)));case"muxedAccount":return C.ScAddress.scAddressTypeMuxedAccount(new C.MuxedEd25519Account({ed25519:this._key.subarray(0,32),id:C.Uint64.fromXDR(this._key.subarray(32,40),"raw")}));default:throw Error("Unsupported address type: ".concat(this._type))}}},{key:"toBuffer",value:function(){return this._key}}],t=[{key:"fromString",value:function(e){return new r(e)}},{key:"account",value:function(e){return new r(tW.encodeEd25519PublicKey(e))}},{key:"contract",value:function(e){return new r(tW.encodeContract(e))}},{key:"claimableBalance",value:function(e){return new r(tW.encodeClaimableBalance(e))}},{key:"liquidityPool",value:function(e){return new r(tW.encodeLiquidityPool(e))}},{key:"muxedAccount",value:function(e){return new r(tW.encodeMed25519PublicKey(e))}},{key:"fromScVal",value:function(e){return r.fromScAddress(e.address())}},{key:"fromScAddress",value:function(e){switch(e.switch().value){case C.ScAddressType.scAddressTypeAccount().value:return r.account(e.accountId().ed25519());case C.ScAddressType.scAddressTypeContract().value:return r.contract(e.contractId());case C.ScAddressType.scAddressTypeMuxedAccount().value:var t=rV.concat([e.muxedAccount().ed25519(),e.muxedAccount().id().toXDR("raw")]);return r.muxedAccount(t);case C.ScAddressType.scAddressTypeClaimableBalance().value:return r.claimableBalance(e.claimableBalanceId());case C.ScAddressType.scAddressTypeLiquidityPool().value:return r.liquidityPool(e.liquidityPoolId());default:throw Error("Unsupported address type: ".concat(e.switch().name))}}}],e&&rz(r.prototype,e),t&&rz(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(),rG=r(8287).Buffer;function rK(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function rW(e){return(rW="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)}var rX=1,rQ=2,rJ=4,rY=8,rZ=(function(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,function(e){var t=function(e){if("object"!=rW(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=rW(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rW(t)?t:t+""}(n.key),n)}}(v=function e(){if(!(this instanceof e))throw TypeError("Cannot call a class as a function")},[{key:"setSourceAccount",value:function(e,t){if(t.source)try{e.sourceAccount=rI(t.source)}
2catch(e){throw Error("Source address is invalid")}}},{key:"fromXDRObject",value:function(e){var t,r={};e.sourceAccount()&&(r.source=rC(e.sourceAccount()));var n=e.body().value(),o=e.body().switch().name;switch(o){case"createAccount":r.type="createAccount",r.destination=r0(n.destination()),r.startingBalance=this._fromXDRAmount(n.startingBalance());break;case"payment":r.type="payment",r.destination=rC(n.destination()),r.asset=t5.fromOperation(n.asset()),r.amount=this._fromXDRAmount(n.amount());break;case"pathPaymentStrictReceive":r.type="pathPaymentStrictReceive",r.sendAsset=t5.fromOperation(n.sendAsset()),r.sendMax=this._fromXDRAmount(n.sendMax()),r.destination=rC(n.destination()),r.destAsset=t5.fromOperation(n.destAsset()),r.destAmount=this._fromXDRAmount(n.destAmount()),r.path=[];var i=n.path();Object.keys(i).forEach(function(e){r.path.push(t5.fromOperation(i[e]))});break;case"pathPaymentStrictSend":r.type="pathPaymentStrictSend",r.sendAsset=t5.fromOperation(n.sendAsset()),r.sendAmount=this._fromXDRAmount(n.sendAmount()),r.destination=rC(n.destination()),r.destAsset=t5.fromOperation(n.destAsset()),r.destMin=this._fromXDRAmount(n.destMin()),r.path=[];var a=n.path();Object.keys(a).forEach(function(e){r.path.push(t5.fromOperation(a[e]))});break;case"changeTrust":r.type="changeTrust",n.line().switch()===C.AssetType.assetTypePoolShare()?r.line=rx.fromOperation(n.line()):r.line=t5.fromOperation(n.line()),r.limit=this._fromXDRAmount(n.limit());break;case"allowTrust":r.type="allowTrust",r.trustor=r0(n.trustor()),r.assetCode=n.asset().value().toString(),r.assetCode=tD(r.assetCode,"\0"),r.authorize=n.authorize();break;case"setOptions":if(r.type="setOptions",n.inflationDest()&&(r.inflationDest=r0(n.inflationDest())),r.clearFlags=n.clearFlags(),r.setFlags=n.setFlags(),r.masterWeight=n.masterWeight(),r.lowThreshold=n.lowThreshold(),r.medThreshold=n.medThreshold(),r.highThreshold=n.highThreshold(),r.homeDomain=void 0!==n.homeDomain()?n.homeDomain().toString("ascii"):void 0,n.signer()){var s={},c=n.signer().key().arm();if("ed25519"===c)s.ed25519PublicKey=r0(n.signer().key());else if("preAuthTx"===c)s.preAuthTx=n.signer().key().preAuthTx();else if("hashX"===c)s.sha256Hash=n.signer().key().hashX();else if("ed25519SignedPayload"===c){var u=n.signer().key().ed25519SignedPayload();s.ed25519SignedPayload=tW.encodeSignedPayload(u.toXDR())}s.weight=n.signer().weight(),r.signer=s}break;case"manageOffer":case"manageSellOffer":r.type="manageSellOffer",r.selling=t5.fromOperation(n.selling()),r.buying=t5.fromOperation(n.buying()),r.amount=this._fromXDRAmount(n.amount()),r.price=this._fromXDRPrice(n.price()),r.offerId=n.offerId().toString();break;case"manageBuyOffer":r.type="manageBuyOffer",r.selling=t5.fromOperation(n.selling()),r.buying=t5.fromOperation(n.buying()),r.buyAmount=this._fromXDRAmount(n.buyAmount()),r.price=this._fromXDRPrice(n.price()),r.offerId=n.offerId().toString();break;case"createPassiveOffer":case"createPassiveSellOffer":r.type="createPassiveSellOffer",r.selling=t5.fromOperation(n.selling()),r.buying=t5.fromOperation(n.buying()),r.amount=this._fromXDRAmount(n.amount()),r.price=this._fromXDRPrice(n.price());break;case"accountMerge":r.type="accountMerge",r.destination=rC(n);break;case"manageData":r.type="manageData",r.name=n.dataName().toString("ascii"),r.value=n.dataValue();break;case"inflation":r.type="inflation";break;case"bumpSequence":r.type="bumpSequence",r.bumpTo=n.bumpTo().toString();break;case"createClaimableBalance":r.type="createClaimableBalance",r.asset=t5.fromOperation(n.asset()),r.amount=this._fromXDRAmount(n.amount()),r.claimants=[],n.claimants().forEac
2h(function(e){r.claimants.push(rk.fromXDR(e))});break;case"claimClaimableBalance":r.type="claimClaimableBalance",r.balanceId=n.toXDR("hex");break;case"beginSponsoringFutureReserves":r.type="beginSponsoringFutureReserves",r.sponsoredId=r0(n.sponsoredId());break;case"endSponsoringFutureReserves":r.type="endSponsoringFutureReserves";break;case"revokeSponsorship":switch(n.switch().name){case"revokeSponsorshipLedgerEntry":var l=n.ledgerKey();switch(l.switch().name){case C.LedgerEntryType.account().name:r.type="revokeAccountSponsorship",r.account=r0(l.account().accountId());break;case C.LedgerEntryType.trustline().name:r.type="revokeTrustlineSponsorship",r.account=r0(l.trustLine().accountId());var f=l.trustLine().asset();f.switch()===C.AssetType.assetTypePoolShare()?r.asset=rB.fromOperation(f):r.asset=t5.fromOperation(f);break;case C.LedgerEntryType.offer().name:r.type="revokeOfferSponsorship",r.seller=r0(l.offer().sellerId()),r.offerId=l.offer().offerId().toString();break;case C.LedgerEntryType.data().name:r.type="revokeDataSponsorship",r.account=r0(l.data().accountId()),r.name=l.data().dataName().toString("ascii");break;case C.LedgerEntryType.claimableBalance().name:r.type="revokeClaimableBalanceSponsorship",r.balanceId=l.claimableBalance().balanceId().toXDR("hex");break;case C.LedgerEntryType.liquidityPool().name:r.type="revokeLiquidityPoolSponsorship",r.liquidityPoolId=l.liquidityPool().liquidityPoolId().toString("hex");break;default:throw Error("Unknown ledgerKey: ".concat(n.switch().name))}break;case"revokeSponsorshipSigner":r.type="revokeSignerSponsorship",r.account=r0(n.signer().accountId()),r.signer=function(e){var t={};switch(e.switch().name){case C.SignerKeyType.signerKeyTypeEd25519().name:t.ed25519PublicKey=tW.encodeEd25519PublicKey(e.ed25519());break;case C.SignerKeyType.signerKeyTypePreAuthTx().name:t.preAuthTx=e.preAuthTx().toString("hex");break;case C.SignerKeyType.signerKeyTypeHashX().name:t.sha256Hash=e.hashX().toString("hex");break;default:throw Error("Unknown signerKey: ".concat(e.switch().name))}return t}(n.signer().signerKey());break;default:throw Error("Unknown revokeSponsorship: ".concat(n.switch().name))}break;case"clawback":r.type="clawback",r.amount=this._fromXDRAmount(n.amount()),r.from=rC(n.from()),r.asset=t5.fromOperation(n.asset());break;case"clawbackClaimableBalance":r.type="clawbackClaimableBalance",r.balanceId=n.toXDR("hex");break;case"setTrustLineFlags":r.type="setTrustLineFlags",r.asset=t5.fromOperation(n.asset()),r.trustor=r0(n.trustor());var p=n.clearFlags(),d=n.setFlags(),h={authorized:C.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:C.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:C.TrustLineFlags.trustlineClawbackEnabledFlag()};r.flags={},Object.keys(h).forEach(function(e){var t;r.flags[e]=!!(d&(t=h[e].value))||!(p&t)&&void 0});break;case"liquidityPoolDeposit":r.type="liquidityPoolDeposit",r.liquidityPoolId=n.liquidityPoolId().toString("hex"),r.maxAmountA=this._fromXDRAmount(n.maxAmountA()),r.maxAmountB=this._fromXDRAmount(n.maxAmountB()),r.minPrice=this._fromXDRPrice(n.minPrice()),r.maxPrice=this._fromXDRPrice(n.maxPrice());break;case"liquidityPoolWithdraw":r.type="liquidityPoolWithdraw",r.liquidityPoolId=n.liquidityPoolId().toString("hex"),r.amount=this._fromXDRAmount(n.amount()),r.minAmountA=this._fromXDRAmount(n.minAmountA()),r.minAmountB=this._fromXDRAmount(n.minAmountB());break;case"invokeHostFunction":r.type="invokeHostFunction",r.func=n.hostFunction(),r.auth=null!=(t=n.auth())?t:[];break;case"extendFootprintTtl":r.type="extendFootprintTtl",r.extendTo=n.extendTo();break;case"restoreFootprint":r.type="restoreFootprint";break;default:throw Error("Unknown operation: ".concat(o))}return r}},{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 rg(e)}catch(e){return!1}return!(!r&&t.isZero()||t.isNegative()||t.times(1e7).gt(new rg("9223372036854775807").toString())||t.decimalPlaces()>7||t.isNaN()||!t.isFinite())}},{key:"constructAmountRequirementsError",value:function(e){return"".concat(e," argument must be of type Str
2ing, 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 Error("".concat(e," value is invalid"));case t<0:throw Error("".concat(e," value must be unsigned"));case!r||r&&r(t,e):return t;default:throw Error("".concat(e," value is invalid"))}}},{key:"_toXDRAmount",value:function(e){var t=new rg(e).times(1e7);return I.Hyper.fromString(t.toString())}},{key:"_fromXDRAmount",value:function(e){return new rg(e).div(1e7).toFixed(7)}},{key:"_fromXDRPrice",value:function(e){return new rg(e.n()).div(new rg(e.d())).toString()}},{key:"_toXDRPrice",value:function(e){var t;if(e.n&&e.d)t=new C.Price(e);else{var r=function(e){for(var t,r,n,o=new rg(e),i=[[new rg(0),new rg(1)],[new rg(1),new rg(0)]],a=2;!o.gt(0x7fffffff);){r=o.integerValue(rg.ROUND_FLOOR),n=o.minus(r);var s=r.times(i[a-1][0]).plus(i[a-2][0]),c=r.times(i[a-1][1]).plus(i[a-2][1]);if(s.gt(0x7fffffff)||c.gt(0x7fffffff)||(i.push([s,c]),n.eq(0)))break;o=new rg(1).div(n),a+=1}var u=function(e){if(Array.isArray(e))return e}(t=i[i.length-1])||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o,i,a=[],s=!0,c=!1;try{o=(t=t.call(e)).next,!1;for(;!(s=(r=o.call(t)).done)&&(a.push(r.value),2!==a.length);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw n}}return a}}(t)||function(e){if(e){if("string"==typeof e)return rb(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?rb(e,2):void 0}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=u[0],f=u[1];if(l.isZero()||f.isZero())throw Error("Couldn't find approximation");return[l.toNumber(),f.toNumber()]}(e);t=new C.Price({n:parseInt(r[0],10),d:parseInt(r[1],10)})}if(0>t.n()||0>t.d())throw Error("price must be positive");return t}}]),Object.defineProperty(v,"prototype",{writable:!1}),v);function r0(e){return tW.encodeEd25519PublicKey(e.ed25519())}rZ.accountMerge=function(e){var t={};try{t.body=C.OperationBody.accountMerge(rI(e.destination))}catch(e){throw Error("destination is invalid")}return this.setSourceAccount(t,e),new C.Operation(t)},rZ.allowTrust=function(e){if(!tW.isValidEd25519PublicKey(e.trustor))throw Error("trustor is invalid");var t={};if(t.trustor=t2.fromPublicKey(e.trustor).xdrAccountId(),e.assetCode.length<=4){var r=e.assetCode.padEnd(4,"\0");t.asset=C.AssetCode.assetTypeCreditAlphanum4(r)}else{if(!(e.assetCode.length<=12))throw Error("Asset code must be 12 characters at max.");var n=e.assetCode.padEnd(12,"\0");t.asset=C.AssetCode.assetTypeCreditAlphanum12(n)}"boolean"==typeof e.authorize?e.authorize?t.authorize=C.TrustLineFlags.authorizedFlag().value:t.authorize=0:t.authorize=e.authorize;var o=new C.AllowTrustOp(t),i={};return i.body=C.OperationBody.allowTrust(o),this.setSourceAccount(i,e),new C.Operation(i)},rZ.bumpSequence=function(e){var t={};if("string"!=typeof e.bumpTo)throw Error("bumpTo must be a string");try{new rg(e.bumpTo)}catch(e){throw Error("bumpTo must be a stringified number")}t.bumpTo=I.Hyper.fromString(e.bumpTo);var r=new C.BumpSequenceOp(t),n={};return n.body=C.OperationBody.bumpSequence(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.changeTrust=function(e){var t={};if(e.asset instanceof t5)t.line=e.asset.toChangeTrustXDRObject();else{if(!(e.asset instanceof rx))throw TypeError("asset must be Asset or LiquidityPoolAsset");t.line=e.asset.toXDRObject()}if(void 0!==e.limit&&!this.isValidAmount(e.limit,!0))throw TypeError(this.constructAmountRequirementsError("limit"));e.limit?t.limit=this._toXDRAmount(e.limit):t.limit=I.Hyper.fromString(new rg("9223372036854775807").toString()),e.source&&(t.source=e.source.masterKeypair);var r=new C.ChangeTrustOp(t),n={};return n.body=C.OperationBody.changeTrust(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.createAccount=function(e){if(!tW.isValidEd25519PublicKey(e.destination))throw Error("destination is invali
2d");if(!this.isValidAmount(e.startingBalance,!0))throw TypeError(this.constructAmountRequirementsError("startingBalance"));var t={};t.destination=t2.fromPublicKey(e.destination).xdrAccountId(),t.startingBalance=this._toXDRAmount(e.startingBalance);var r=new C.CreateAccountOp(t),n={};return n.body=C.OperationBody.createAccount(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.createClaimableBalance=function(e){if(!(e.asset instanceof t5))throw Error("must provide an asset for create claimable balance operation");if(!this.isValidAmount(e.amount))throw TypeError(this.constructAmountRequirementsError("amount"));if(!Array.isArray(e.claimants)||0===e.claimants.length)throw 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 C.CreateClaimableBalanceOp(t),n={};return n.body=C.OperationBody.createClaimableBalance(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.claimClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};rN(e.balanceId);var t={};t.balanceId=C.ClaimableBalanceId.fromXDR(e.balanceId,"hex");var r=new C.ClaimClaimableBalanceOp(t),n={};return n.body=C.OperationBody.claimClaimableBalance(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.clawbackClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};rN(e.balanceId);var t={balanceId:C.ClaimableBalanceId.fromXDR(e.balanceId,"hex")},r={body:C.OperationBody.clawbackClaimableBalance(new C.ClawbackClaimableBalanceOp(t))};return this.setSourceAccount(r,e),new C.Operation(r)},rZ.createPassiveSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount))throw TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),void 0===e.price)throw TypeError("price argument is required");t.price=this._toXDRPrice(e.price);var r=new C.CreatePassiveSellOfferOp(t),n={};return n.body=C.OperationBody.createPassiveSellOffer(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.inflation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=C.OperationBody.inflation(),this.setSourceAccount(t,e),new C.Operation(t)},rZ.manageData=function(e){var t={};if(!("string"==typeof e.name&&e.name.length<=64))throw Error("name must be a string, up to 64 characters");if(t.dataName=e.name,"string"!=typeof e.value&&!rM.isBuffer(e.value)&&null!==e.value)throw Error("value must be a string, Buffer or null");if("string"==typeof e.value?t.dataValue=rM.from(e.value):t.dataValue=e.value,null!==t.dataValue&&t.dataValue.length>64)throw Error("value cannot be longer that 64 bytes");var r=new C.ManageDataOp(t),n={};return n.body=C.OperationBody.manageData(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.manageSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount,!0))throw TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),void 0===e.price)throw 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=I.Hyper.fromString(e.offerId);var r=new C.ManageSellOfferOp(t),n={};return n.body=C.OperationBody.manageSellOffer(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.manageBuyOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.buyAmount,!0))throw TypeError(this.constructAmountRequirementsError("buyAmount"));if(t.buyAmount=this._toXDRAmount(e.buyAmount),void 0===e.price)throw 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=I.Hyper.fromString(e.offerId);var r=new C.ManageBuyOfferOp(t),n={};return n.body=C.OperationBody.manageBuyOffer(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.pathPaymentStrictReceive=function(e){switch(!0){case!e.sendAsset:throw Error("Mu
2st specify a send asset");case!this.isValidAmount(e.sendMax):throw TypeError(this.constructAmountRequirementsError("sendMax"));case!e.destAsset:throw Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destAmount):throw TypeError(this.constructAmountRequirementsError("destAmount"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendMax=this._toXDRAmount(e.sendMax);try{t.destination=rI(e.destination)}catch(e){throw Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destAmount=this._toXDRAmount(e.destAmount),t.path=(e.path?e.path:[]).map(function(e){return e.toXDRObject()});var r=new C.PathPaymentStrictReceiveOp(t),n={};return n.body=C.OperationBody.pathPaymentStrictReceive(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.pathPaymentStrictSend=function(e){switch(!0){case!e.sendAsset:throw Error("Must specify a send asset");case!this.isValidAmount(e.sendAmount):throw TypeError(this.constructAmountRequirementsError("sendAmount"));case!e.destAsset:throw Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destMin):throw TypeError(this.constructAmountRequirementsError("destMin"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendAmount=this._toXDRAmount(e.sendAmount);try{t.destination=rI(e.destination)}catch(e){throw Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destMin=this._toXDRAmount(e.destMin),t.path=(e.path?e.path:[]).map(function(e){return e.toXDRObject()});var r=new C.PathPaymentStrictSendOp(t),n={};return n.body=C.OperationBody.pathPaymentStrictSend(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.payment=function(e){if(!e.asset)throw Error("Must provide an asset for a payment operation");if(!this.isValidAmount(e.amount))throw TypeError(this.constructAmountRequirementsError("amount"));var t={};try{t.destination=rI(e.destination)}catch(e){throw Error("destination is invalid")}t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount);var r=new C.PaymentOp(t),n={};return n.body=C.OperationBody.payment(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.setOptions=function(e){var t={};if(e.inflationDest){if(!tW.isValidEd25519PublicKey(e.inflationDest))throw Error("inflationDest is invalid");t.inflationDest=t2.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,rL),t.lowThreshold=this._checkUnsignedIntValue("lowThreshold",e.lowThreshold,rL),t.medThreshold=this._checkUnsignedIntValue("medThreshold",e.medThreshold,rL),t.highThreshold=this._checkUnsignedIntValue("highThreshold",e.highThreshold,rL),void 0!==e.homeDomain&&"string"!=typeof e.homeDomain)throw 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,rL),o=0;if(e.signer.ed25519PublicKey){if(!tW.isValidEd25519PublicKey(e.signer.ed25519PublicKey))throw Error("signer.ed25519PublicKey is invalid.");var i=tW.decodeEd25519PublicKey(e.signer.ed25519PublicKey);r=new C.SignerKey.signerKeyTypeEd25519(i),o+=1}if(e.signer.preAuthTx){if("string"==typeof e.signer.preAuthTx&&(e.signer.preAuthTx=rD.from(e.signer.preAuthTx,"hex")),!rD.isBuffer(e.signer.preAuthTx)||32!==e.signer.preAuthTx.length)throw Error("signer.preAuthTx must be 32 bytes Buffer.");r=new C.SignerKey.signerKeyTypePreAuthTx(e.signer.preAuthTx),o+=1}if(e.signer.sha256Hash){if("string"==typeof e.signer.sha256Hash&&(e.signer.sha256Hash=rD.from(e.signer.sha256Hash,"hex")),!rD.isBuffer(e.signer.sha256Hash)||32!==e.signer.sha256Hash.length)throw Error("signer.sha256Hash must be 32 bytes Buffer.");r=new C.SignerKey.signerKeyTypeHashX(e.signer.sha256Hash),o+=1}if(e.signer.ed25519SignedPayload){if(!tW.isValidSignedPayload(e.signer.ed25519SignedPayload))throw Error("signer.ed25519SignedPayload is invalid.");var a=tW.decodeSignedPayload(e.signer.ed25519SignedPayload),s=C.SignerKeyEd25519SignedPayload.fromXDR(a);r=C.SignerKey.signerKeyTypeEd25519SignedPayload(s),o+=1}if(1!==o)throw Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");t.signer=new C.Signer({key:r,weight:n})}var c=new C.SetOptionsOp(t),u={};return u.body=C.OperationBody.setOptions(c),this.setSourceAccount(u,e),new C.Operation(u)},rZ.beginSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tW.isValidEd25519PublicKey(e.sponsoredId))throw Error("sponsoredId is invali
2d");var t=new C.BeginSponsoringFutureReservesOp({sponsoredId:t2.fromPublicKey(e.sponsoredId).xdrAccountId()}),r={};return r.body=C.OperationBody.beginSponsoringFutureReserves(t),this.setSourceAccount(r,e),new C.Operation(r)},rZ.endSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=C.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(t,e),new C.Operation(t)},rZ.revokeAccountSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tW.isValidEd25519PublicKey(e.account))throw Error("account is invalid");var t=C.LedgerKey.account(new C.LedgerKeyAccount({accountId:t2.fromPublicKey(e.account).xdrAccountId()})),r=C.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=C.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.revokeTrustlineSponsorship=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tW.isValidEd25519PublicKey(t.account))throw Error("account is invalid");if(t.asset instanceof t5)e=t.asset.toTrustLineXDRObject();else{if(!(t.asset instanceof rB))throw TypeError("asset must be an Asset or LiquidityPoolId");e=t.asset.toXDRObject()}var r=C.LedgerKey.trustline(new C.LedgerKeyTrustLine({accountId:t2.fromPublicKey(t.account).xdrAccountId(),asset:e})),n=C.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(r),o={};return o.body=C.OperationBody.revokeSponsorship(n),this.setSourceAccount(o,t),new C.Operation(o)},rZ.revokeOfferSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tW.isValidEd25519PublicKey(e.seller))throw Error("seller is invalid");
2if("string"!=typeof e.offerId)throw Error("offerId is invalid");var t=C.LedgerKey.offer(new C.LedgerKeyOffer({sellerId:t2.fromPublicKey(e.seller).xdrAccountId(),offerId:C.Int64.fromString(e.offerId)})),r=C.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=C.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.revokeDataSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tW.isValidEd25519PublicKey(e.account))throw Error("account is invalid");if("string"!=typeof e.name||e.name.length>64)throw Error("name must be a string, up to 64 characters");var t=C.LedgerKey.data(new C.LedgerKeyData({accountId:t2.fromPublicKey(e.account).xdrAccountId(),dataName:e.name})),r=C.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=C.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.revokeClaimableBalanceSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"!=typeof e.balanceId)throw Error("balanceId is invali
2d");var t=C.LedgerKey.claimableBalance(new C.LedgerKeyClaimableBalance({balanceId:C.ClaimableBalanceId.fromXDR(e.balanceId,"hex")})),r=C.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=C.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new C.Operation(n)},rZ.revokeLiquidityPoolSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"!=typeof e.liquidityPoolId)throw Error("liquidityPoolId is invalid");var t=C.LedgerKey.liquidityPool(new C.LedgerKeyLiquidityPool({liquidityPoolId:C.PoolId.fromXDR(e.liquidityPoolId,"hex")})),r=C.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={body:C.OperationBody.revokeSponsorship(r)};return this.setSourceAccount(n,e),new C.Operation(n)},rZ.revokeSignerSponsorship=function(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tW.isValidEd25519PublicKey(n.account))throw Error("account is invalid");if(n.signer.ed25519PublicKey){if(!tW.isValidEd25519PublicKey(n.signer.ed25519PublicKey))throw Error("signer.ed25519PublicKey is invalid.");var o=tW.decodeEd25519PublicKey(n.signer.ed25519PublicKey);r=new C.SignerKey.signerKeyTypeEd25519(o)}else if(n.signer.preAuthTx){if(e="string"==typeof n.signer.preAuthTx?rF.from(n.signer.preAuthTx,"hex"):n.signer.preAuthTx,!rF.isBuffer(e)||32!==e.length)throw Error("signer.preAuthTx must be 32 bytes Buffer.");r=new C.SignerKey.signerKeyTypePreAuthTx(e)}else{if(!n.signer.sha256Hash)throw Error("signer is invalid");if(t="string"==typeof n.signer.sha256Hash?rF.from(n.signer.sha256Hash,"hex"):n.signer.sha256Hash,!rF.isBuffer(t)||32!==t.length)throw Error("signer.sha256Hash must be 32 bytes Buffer.");r=new C.SignerKey.signerKeyTypeHashX(t)}var i=new C.RevokeSponsorshipOpSigner({accountId:t2.fromPublicKey(n.account).xdrAccountId(),signerKey:r}),a=C.RevokeSponsorshipOp.revokeSponsorshipSigner(i),s={};return s.body=C.OperationBody.revokeSponsorship(a),this.setSourceAccount(s,n),new C.Operation(s)},rZ.clawback=function(e){var t={};if(!this.isValidAmount(e.amount))throw TypeError(this.constructAmountRequirementsError("amount"));t.amount=this._toXDRAmount(e.amount),t.asset=e.asset.toXDRObject();try{t.from=rI(e.from)}catch(e){throw Error("from address is invalid")}var r={body:C.OperationBody.clawback(new C.ClawbackOp(t))};return this.setSourceAccount(r,e),new C.Operation(r)},rZ.setTrustLineFlags=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if("object"!==rq(e.flags)||0===Object.keys(e.flags).length)throw Error("opts.flags must be a map of boolean flags to modify");var r={authorized:C.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:C.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:C.TrustLineFlags.trustlineClawbackEnabledFlag()},n=0,o=0;Object.keys(e.flags).forEach(function(t){if(!Object.prototype.hasOwnProperty.call(r,t))throw 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=t2.fromPublicKey(e.trustor).xdrAccountId(),t.asset=e.asset.toXDRObject(),t.clearFlags=n,t.setFlags=o;var i={body:C.OperationBody.setTrustLineFlags(new C.SetTrustLineFlagsOp(t))};return this.setSourceAccount(i,e),new C.Operation(i)},rZ.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 TypeError("liquidityPoolId argument is required");if(a.liquidityPoolId=C.PoolId.fromXDR(t,"hex"),!this.isValidAmount(r,!0))throw TypeError(this.constructAmountRequirementsError("maxAmountA"));if(a.maxAmountA=this._toXDRAmount(r),!this.isValidAmount(n,!0))throw TypeError(this.constructAmountRequirementsError("maxAmountB"));if(a.maxAmountB=this._toXDRAmount(n),void 0===o)throw TypeError("minPrice argument is required");if(a.minPrice=this._toXDRPrice(o),void 0===i)throw TypeError("maxPrice argument is required");a.maxPrice=this._toXDRPrice(i);var s=new C.LiquidityPoolDepositOp(a),c={body:C.OperationBody.liquidityPoolDeposit(s)};return this.setSourceAccount(c,e),new C.Operation(c)}
2,rZ.liquidityPoolWithdraw=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if(!e.liquidityPoolId)throw TypeError("liquidityPoolId argument is required");if(t.liquidityPoolId=C.PoolId.fromXDR(e.liquidityPoolId,"hex"),!this.isValidAmount(e.amount))throw TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),!this.isValidAmount(e.minAmountA,!0))throw TypeError(this.constructAmountRequirementsError("minAmountA"));if(t.minAmountA=this._toXDRAmount(e.minAmountA),!this.isValidAmount(e.minAmountB,!0))throw TypeError(this.constructAmountRequirementsError("minAmountB"));t.minAmountB=this._toXDRAmount(e.minAmountB);var r=new C.LiquidityPoolWithdrawOp(t),n={body:C.OperationBody.liquidityPoolWithdraw(r)};return this.setSourceAccount(n,e),new C.Operation(n)},rZ.invokeHostFunction=function(e){if(!e.func)throw TypeError("host function invocation ('func') required (got ".concat(JSON.stringify(e),")"));e.func.switch().value===C.HostFunctionType.hostFunctionTypeInvokeContract().value&&e.func.invokeContract().args().forEach(function(e){var t;try{t=rH.fromScVal(e)}catch(e){return}switch(t._type){case"claimableBalance":case"liquidityPool":throw TypeError("claimable balances and liquidity pools cannot be arguments to invokeHostFunction")}});var t=new C.InvokeHostFunctionOp({hostFunction:e.func,auth:e.auth||[]}),r={body:C.OperationBody.invokeHostFunction(t)};return this.setSourceAccount(r,e),new C.Operation(r)},rZ.extendFootprintTtl=function(e){if((null!=(t=e.extendTo)?t:-1)<=0)throw RangeError("extendTo has to be positive");var t,r=new C.ExtendFootprintTtlOp({ext:new C.ExtensionPoint(0),extendTo:e.extendTo}),n={body:C.OperationBody.extendFootprintTtl(r)};return this.setSourceAccount(n,e),new C.Operation(n)},rZ.restoreFootprint=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new C.RestoreFootprintOp({ext:new C.ExtensionPoint(0)}),r={body:C.OperationBody.restoreFootprint(t)};return this.setSourceAccount(r,null!=e?e:{}),new C.Operation(r)},rZ.createStellarAssetContract=function(e){var t=e.asset;if("string"==typeof t){var r,n=function(e){if(Array.isArray(e))return e}(r=t.split(":"))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o,i,a=[],s=!0,c=!1;try{o=(t=t.call(e)).next,!1;for(;!(s=(r=o.call(t)).done)&&(a.push(r.value),2!==a.length);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw n}}return a}}(r)||function(e){if(e){if("string"==typeof e)return rK(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?rK(e,2):void 0}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();t=new t5(n[0],n[1])}if(!(t instanceof t5))throw TypeError("expected Asset in 'opts.asset', got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:C.HostFunction.hostFunctionTypeCreateContract(new C.CreateContractArgs({executable:C.ContractExecutable.contractExecutableStellarAsset(),contractIdPreimage:C.ContractIdPreimage.contractIdPreimageFromAsset(t.toXDRObject())}
2))})},rZ.invokeContractFunction=function(e){var t=new rH(e.contract);if("contract"!==t._type)throw TypeError("expected contract strkey instance, got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:C.HostFunction.hostFunctionTypeInvokeContract(new C.InvokeContractArgs({contractAddress:t.toScAddress(),functionName:e.function,args:e.args}))})},rZ.createCustomContract=function(e){var t,r=rG.from(e.salt||t2.random().xdrPublicKey().value());if(!e.wasmHash||32!==e.wasmHash.length)throw TypeError("expected hash(contract WASM) in 'opts.wasmHash', got ".concat(e.wasmHash));if(32!==r.length)throw TypeError("expected 32-byte salt in 'opts.salt', got ".concat(e.wasmHash));return this.invokeHostFunction({source:e.source,auth:e.auth,func:C.HostFunction.hostFunctionTypeCreateContractV2(new C.CreateContractArgsV2({executable:C.ContractExecutable.contractExecutableWasm(rG.from(e.wasmHash)),contractIdPreimage:C.ContractIdPreimage.contractIdPreimageFromAddress(new C.ContractIdPreimageFromAddress({address:e.address.toScAddress(),salt:r})),constructorArgs:null!=(t=e.constructorArgs)?t:[]}))})},rZ.uploadContractWasm=function(e){return this.invokeHostFunction({source:e.source,auth:e.auth,func:C.HostFunction.hostFunctionTypeUploadContractWasm(rG.from(e.wasm))})};var r1=r(8287).Buffer;function r2(e){return(r2="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 r6(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,function(e){var t=function(e){if("object"!=r2(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=r2(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r2(t)?t:t+""}(n.key),n)}}var r4="none",r3="id",r5="text",r8="hash",r9="return",r7=function(){var e,t;function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),this._type=e,this._value=t,this._type){case r4:break;case r3:r._validateIdValue(t);break;case r5:r._validateTextValue(t);break;case r8:case r9:r._validateHashValue(t),"string"==typeof t&&(this._value=r1.from(t,"hex"));break;default:throw Error("Invalid memo type")}}return e=[{key:"type",get:function(){return this._type},set:function(e){throw Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case r4:return null;case r3:case r5:return this._value;case r8:case r9:return r1.from(this._value);default:throw Error("Invalid memo type")}},set:function(e){throw Error("Memo is immutable")}},{key:"toXDRObject",value:function(){switch(this._type){case r4:return C.Memo.memoNone();case r3:return C.Memo.memoId(I.UnsignedHyper.fromString(this._value));case r5:return C.Memo.memoText(this._value);case r8:return C.Memo.memoHash(this._value);case r9:return C.Memo.memoReturn(this._value);default:return null}}}],t=[{key:"_validateIdValue",value:function(e){var t,r=Error("Expects a int64 as a string. Got ".concat(e));if("string"!=typeof e)throw r;try{t=new rg(e)}catch(e){throw r}if(!t.isFinite()||t.isNaN())throw r}},{key:"_validateTextValue",value:function(e){if(!C.Memo.armTypeForArm("text").isValid(e))throw Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(e){var t,r=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=r1.from(e,"hex")}else{if(!r1.isBuffer(e))throw r;t=r1.from(e)}if(!t.length||32!==t.length)throw r}},{key:"none",value:function(){return new r(r4)}},{key:"text",value:function(e){return new r(r5,e)}},{key:"id",value:function(e){return new r(r3,e)}},{key:"hash",value:function(e){return new r(r8,e)}},{key:"return",value:function(e){return new r(r9,e)}},{key:"fromXDRObject",value:function(e){switch(e.arm()){case"id":return r.id(e.value().toString());case"text":return r.text(e.value());case"hash":return r.hash(e.value());case"retHash":return r.return(e.value())}if(void 0===e.value())return r.none();throw Error("Unknown type")}}],e&&r6(r.prototype,e),t&&r6(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(),ne=r(8287).Buffer;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})(e)}function nr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nr=function(){return!!e})()}
2function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function no(e,t){return(no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var ni=function(e){var t;function r(e,t){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),"string"==typeof e){var n,o,i,a=ne.from(e,"base64");e=C.TransactionEnvelope.fromXDR(a)}var s=e.switch();if(s!==C.EnvelopeType.envelopeTypeTxV0()&&s!==C.EnvelopeType.envelopeTypeTx())throw Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(s.name,"."));var c=e.value(),u=c.tx(),l=u.fee().toString();(n=r,o=[u,(c.signatures()||[]).slice(),l,t],n=nn(n),i=function(e,t){if(t&&("object"==nt(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nr()?Reflect.construct(n,o||[],nn(this).constructor):n.apply(this,o)))._envelopeType=s,i._memo=u.memo(),i._sequence=u.seqNum().toString(),i._envelopeType===C.EnvelopeType.envelopeTypeTxV0()?i._source=tW.encodeEd25519PublicKey(i.tx.sourceAccountEd25519()):i._source=rC(i.tx.sourceAccount());var f=null,p=null;switch(i._envelopeType){case C.EnvelopeType.envelopeTypeTxV0():p=u.timeBounds();break;case C.EnvelopeType.envelopeTypeTx():switch(u.cond().switch()){case C.PreconditionType.precondTime():p=u.cond().timeBounds();break;case C.PreconditionType.precondV2():p=(f=u.cond().v2()).timeBounds()}}if(p&&(i._timeBounds={minTime:p.minTime().toString(),maxTime:p.maxTime().toString()}),f){var d=f.ledgerBounds();d&&(i._ledgerBounds={minLedger:d.minLedger(),maxLedger:d.maxLedger()});var h=f.minSeqNum();h&&(i._minAccountSequence=h.toString()),i._minAccountSequenceAge=f.minSeqAge(),i._minAccountSequenceLedgerGap=f.minSeqLedgerGap(),i._extraSigners=f.extraSigners()}return i._operations=(u.operations()||[]).map(function(e){return rZ.fromXDRObject(e)}),i}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&no(e,t)}(r,e),t=[{key:"timeBounds",get:function(){return this._timeBounds},set:function(e){throw Error("Transaction is immutable")}},{key:"ledgerBounds",get:function(){return this._ledgerBounds},set:function(e){throw Error("Transaction is immutable")}},{key:"minAccountSequence",get:function(){return this._minAccountSequence},set:function(e){throw Error("Transaction is immutable")}},{key:"minAccountSequenceAge",get:function(){return this._minAccountSequenceAge},set:function(e){throw Error("Transaction is immutable")}},{key:"minAccountSequenceLedgerGap",get:function(){return this._minAccountSequenceLedgerGap},set:function(e){throw Error("Transaction is immutable")}},{key:"extraSigners",get:function(){return this._extraSigners},set:function(e){throw Error("Transaction is immutable")}},{key:"sequence",get:function(){return this._sequence},set:function(e){throw Error("Transaction is immutable")}},{key:"source",get:function(){return this._source},set:function(e){throw Error("Transaction is immutable")}},{key:"operations",get:function(){return this._operations},set:function(e){throw Error("Transaction is immutable")}},{key:"memo",get:function(){return r7.fromXDRObject(this._memo)},set:function(e){throw Error("Transaction is immutable")}},{key:"signatureBase",value:function(){var e=this.tx;this._envelopeType===C.EnvelopeType.envelopeTypeTxV0()&&(e=C.Transaction.fromXDR(ne.concat([C.PublicKeyType.publicKeyTypeEd25519().toXDR(),e.toXDR()])));var t=new C.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTx(e);return new C.TransactionSignaturePayload({networkId:C.Hash.fromXDR(N(this.networkPassphrase)),taggedTransaction:t}).toXDR()}},{key:"toEnvelope",value:function(){var e,t=this.tx.toXDR(),r=this.signatures.slice();switch(this._envelopeType){case C.EnvelopeType.envelopeTypeTxV0():e=new C.TransactionEnvelope.envelopeTypeTxV0(new C.TransactionV0Envelope({tx:C.TransactionV0.fromXDR(t),signatures:r}));break;case C.EnvelopeType.envelopeTypeTx():e=new C.TransactionEnvelope.envelopeTypeTx(new C.TransactionV1Envelope({tx:C.Transaction.fromXDR(t),signatures:r}));break;default:throw 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 RangeError("invalid operation index");var t=this.operations[e];try{t=rZ.createClaimableBalance(t)}catch(e){throw TypeError("expected createClaimableBalance, got ".concat(t.type,": ").concat(e))}
2var r=tW.decodeEd25519PublicKey(rU(this.source)),n=N(C.HashIdPreimage.envelopeTypeOpId(new C.HashIdPreimageOperationId({sourceAccount:C.AccountId.publicKeyTypeEd25519(r),seqNum:C.SequenceNumber.fromString(this.sequence),opNum:e})).toXDR("raw"));return C.ClaimableBalanceId.claimableBalanceIdTypeV0(n).toXDR("hex")}}],function(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,function(e){var t=function(e){if("object"!=nt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=nt(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nt(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(rn),na=r(8287).Buffer;function ns(e){return(ns="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 nc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nc=function(){return!!e})()}function nu(e){return(nu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nl(e,t){return(nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var nf=function(e){var t;function r(e,t){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),"string"==typeof e){var n,o,i,a=na.from(e,"base64");e=C.TransactionEnvelope.fromXDR(a)}var s=e.switch();if(s!==C.EnvelopeType.envelopeTypeTxFeeBump())throw Error("Invalid TransactionEnvelope: expected an envelopeTypeTxFeeBump but received an ".concat(s.name,"."));var c=e.value(),u=c.tx(),l=u.fee().toString();n=r,o=[u,(c.signatures()||[]).slice(),l,t],n=nu(n),i=function(e,t){if(t&&("object"==ns(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nc()?Reflect.construct(n,o||[],nu(this).constructor):n.apply(this,o));var f=C.TransactionEnvelope.envelopeTypeTx(u.innerTx().v1());return i._feeSource=rC(i.tx.feeSource()),i._innerTransaction=new ni(f,t),i}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&nl(e,t)}(r,e),t=[{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 C.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTxFeeBump(this.tx);return new C.TransactionSignaturePayload({networkId:C.Hash.fromXDR(N(this.networkPassphrase)),taggedTransaction:e}).toXDR()}},{key:"toEnvelope",value:function(){var e=new C.FeeBumpTransactionEnvelope({tx:C.FeeBumpTransaction.fromXDR(this.tx.toXDR()),signatures:this.signatures.slice()});return new C.TransactionEnvelope.envelopeTypeTxFeeBump(e)}}],function(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,function(e){var t=function(e){if("object"!=ns(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ns(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ns(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(rn);function np(e){return(np="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)}var nd=(S=[{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)}}],function(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,function(e){var t=function(e){if("object"!=np(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=np(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==np(t)?t:t+""}(n.key),n)}}((w=function e(t,r){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),tW.isValidMed25519PublicKey(t))throw Error("accountId is an M-address; use MuxedAccount instead");if(!tW.isValidEd25519PublicKey(t))throw Error("accountId is invali
2d");if("string"!=typeof r)throw Error("sequence must be of type string");this._accountId=t,this.sequence=new rg(r)}).prototype,S),Object.defineProperty(w,"prototype",{writable:!1}),w);function nh(e){return(nh="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 ny(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,function(e){var t=function(e){if("object"!=nh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=nh(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nh(t)?t:t+""}(n.key),n)}}var nm=function(){var e,t;function r(e,t){if(!(this instanceof r))throw TypeError("Cannot call a class as a function");var n=e.accountId();if(!tW.isValidEd25519PublicKey(n))throw Error("accountId is invali
2d");this.account=e,this._muxedXdr=rR(n,t),this._mAddress=rC(this._muxedXdr),this._id=t}return e=[{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 Error("id should be a string representing a number (uint64)");return this._muxedXdr.med25519().id(C.Uint64.fromString(e)),this._mAddress=rC(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()}}],t=[{key:"fromAddress",value:function(e,t){var n=rI(e),o=rU(e),i=n.med25519().id().toString();return new r(new nd(o,t),i)}}],e&&ny(r.prototype,e),t&&ny(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}();function ng(e){return(ng="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 nb(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,nv(n.key),n)}}function nv(e){var t=function(e){if("object"!=ng(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ng(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ng(t)?t:t+""}var nw=(_=function e(t){var r,n,o;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),o=void 0,(n=nv(n="_data"))in this?Object.defineProperty(this,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):this[n]=o,r=t?"string"==typeof t||ArrayBuffer.isView(t)?e.fromXDR(t):e.fromXDR(t.toXDR()):new C.SorobanTransactionData({resources:new C.SorobanResources({footprint:new C.LedgerFootprint({readOnly:[],readWrite:[]}),instructions:0,diskReadBytes:0,writeBytes:0}),ext:new C.SorobanTransactionDataExt(0),resourceFee:new C.Int64(0)}),this._data=r},E=[{key:"setResourceFee",value:function(e){return this._data.resourceFee(new C.Int64(e)),this}},{key:"setResources",value:function(e,t,r){return this._data.resources().instructions(e),this._data.resources().diskReadBytes(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 C.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()}}],x=[{key:"fromXDR",value:function(e){return C.SorobanTransactionData.fromXDR(e,"string"==typeof e?"base64":"raw")}}],E&&nb(_.prototype,E),x&&nb(_,x),Object.defineProperty(_,"prototype",{writable:!1}),_);function nS(e){return(nS="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)}var n_=(function(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,function(e){var t=function(e){if("object"!=nS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=nS(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nS(t)?t:t+""}(n.key),n)}}(A=function e(){if(!(this instanceof e))throw TypeError("Cannot call a class as a function")},[{key:"decodeAddress",value:function(e){var t={ed25519PublicKey:C.SignerKey.signerKeyTypeEd25519,preAuthTx:C.SignerKey.signerKeyTypePreAuthTx,sha256Hash:C.SignerKey.signerKeyTypeHashX,signedPayload:C.SignerKey.signerKeyTypeEd25519SignedPayload},r=tW.getVersionByteForPrefix(e),n=t[r];
2if(!n)throw Error("invalid signer key type (".concat(r,")"));var o=tQ(r,e);return n("signedPayload"===r?new C.SignerKeyEd25519SignedPayload({ed25519:o.slice(0,32),payload:o.slice(36)}):o)}},{key:"encodeSignerKey",value:function(e){var t,r;switch(e.switch()){case C.SignerKeyType.signerKeyTypeEd25519():t="ed25519PublicKey",r=e.value();break;case C.SignerKeyType.signerKeyTypePreAuthTx():t="preAuthTx",r=e.value();break;case C.SignerKeyType.signerKeyTypeHashX():t="sha256Hash",r=e.value();break;case C.SignerKeyType.signerKeyTypeEd25519SignedPayload():t="signedPayload",r=e.ed25519SignedPayload().toXDR("raw");break;default:throw Error("invalid SignerKey (type: ".concat(e.switch(),")"))}return tJ(t,r)}}]),Object.defineProperty(A,"prototype",{writable:!1}),A);function nE(e){return(nE="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 nx(e){return function(e){if(Array.isArray(e))return nA(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return nA(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?nA(e,void 0):void 0}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nT(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 nk(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nT(Object(r),!0).forEach(function(t){var n,o,i;n=e,o=t,i=r[t],(o=nP(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nT(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function nO(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,nP(n.key),n)}}function nP(e){var t=function(e){if("object"!=nE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=nE(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nE(t)?t:t+""}var nB="100",nj=0,nI=function(){var e,t;function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),!e)throw Error("must specify source account for the transaction");if(void 0===t.fee)throw Error("must specify fee for the transaction (in stroops)");this.source=e,this.operations=[],this.baseFee=t.fee,this.timebounds=t.timebounds?nk({},t.timebounds):null,this.ledgerbounds=t.ledgerbounds?nk({},t.ledgerbounds):null,this.minAccountSequence=t.minAccountSequence||null,this.minAccountSequenceAge=t.minAccountSequenceAge||null,this.minAccountSequenceLedgerGap=t.minAccountSequenceLedgerGap||null,this.extraSigners=t.extraSigners?nx(t.extraSigners):null,this.memo=t.memo||r7.none(),this.networkPassphrase=t.networkPassphrase||null,this.sorobanData=t.sorobanData?new nw(t.sorobanData).build():null}return e=[{key:"addOperation",value:function(e){return this.operations.push(e),this}},{key:"addOperationAt",value:function(e,t){return this.operations.splice(t,0,e),this}},{key:"clearOperations",value:function(){return this.operations=[],this}},{key:"clearOperationAt",value:function(e){return this.operations.splice(e,1),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 Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(e<0)throw 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 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 Error("min_time cannot be negative");if(n<0)throw Error("max_time cannot be negative");if(n>0&&r>n)throw Error("min_time cannot be greater than max_time");return this.timebounds={minTime:r,maxTime:n},this}}
2,{key:"setLedgerbounds",value:function(e,t){if(null!==this.ledgerbounds)throw Error("LedgerBounds has been already set - setting ledgerbounds would overwrite it.");if(e<0)throw Error("min_ledger cannot be negative");if(t<0)throw Error("max_ledger cannot be negative");if(t>0&&e>t)throw 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 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 Error("min_account_sequence_age must be a number");if(null!==this.minAccountSequenceAge)throw Error("min_account_sequence_age has been already set - setting min_account_sequence_age would overwrite it.");if(e<0)throw Error("min_account_sequence_age cannot be negative");return this.minAccountSequenceAge=e,this}},{key:"setMinAccountSequenceLedgerGap",value:function(e){if(null!==this.minAccountSequenceLedgerGap)throw Error("min_account_sequence_ledger_gap has been already set - setting min_account_sequence_ledger_gap would overwrite it.");if(e<0)throw Error("min_account_sequence_ledger_gap cannot be negative");return this.minAccountSequenceLedgerGap=e,this}},{key:"setExtraSigners",value:function(e){if(!Array.isArray(e))throw Error("extra_signers must be an array of strings.");if(null!==this.extraSigners)throw Error("extra_signers has been already set - setting extra_signers would overwrite it.");if(e.length>2)throw Error("extra_signers cannot be longer than 2 elements.");return this.extraSigners=nx(e),this}},{key:"setNetworkPassphrase",value:function(e){return this.networkPassphrase=e,this}},{key:"setSorobanData",value:function(e){return this.sorobanData=new nw(e).build(),this}},{key:"build",value:function(){var e=new rg(this.source.sequenceNumber()).plus(1),t={fee:new rg(this.baseFee).times(this.operations.length).toNumber(),seqNum:C.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 Error("TimeBounds has to be set or you must call setTimeout(TimeoutInfinite).");nC(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),nC(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=I.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=I.UnsignedHyper.fromString(this.timebounds.maxTime.toString());var r=new C.TimeBounds(this.timebounds);if(this.hasV2Preconditions()){var n=null;null!==this.ledgerbounds&&(n=new C.LedgerBounds(this.ledgerbounds));var o=this.minAccountSequence||"0";o=C.SequenceNumber.fromString(o);var i=I.UnsignedHyper.fromString(null!==this.minAccountSequenceAge?this.minAccountSequenceAge.toString():"0"),a=this.minAccountSequenceLedgerGap||0,s=null!==this.extraSigners?this.extraSigners.map(n_.decodeAddress):[];t.cond=C.Preconditions.precondV2(new C.PreconditionsV2({timeBounds:r,ledgerBounds:n,minSeqNum:o,minSeqAge:i,minSeqLedgerGap:a,extraSigners:s}))}else t.cond=C.Preconditions.precondTime(r);t.sourceAccount=rI(this.source.accountId()),this.sorobanData?t.ext=new C.TransactionExt(1,this.sorobanData):t.ext=new C.TransactionExt(0,C.Void);var c=new C.Transaction(t);c.operations(this.operations);var u=new ni(new C.TransactionEnvelope.envelopeTypeTx(new C.TransactionV1Envelope({tx:c})),this.networkPassphrase);return this.source.incrementSequenceNumber(),u}},{key:"hasV2Preconditions",value:function(){return null!==this.ledgerbounds||null!==this.minAccountSequence||null!==this.minAccountSequenceAge||null!==this.minAccountSequenceLedgerGap||null!==this.extraSigners&&this.extraSigners.length>0}}],t=[{key:"cloneFrom",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e instanceof ni))throw TypeError("expected a 'Transaction', got: ".concat(e));var n,o=(BigInt(e.sequence)-1n).toString();if(tW.isValidMed25519PublicKey(e.source))n=nm.fromAddress(e.source,o);else{if(!tW.isValidEd25519PublicKey(e.source))throw TypeError("unsupported tx source account: ".concat(e.source));n=new nd(e.source,o)}var i=new r(n,nk({fee:(parseInt(e.fee,10)/e.operations.length||nB).toString(),memo:e.memo,networkPassphrase:e.networkPassphrase,timebounds:e.timeBounds,ledgerboun
2ds:e.ledgerBounds,minAccountSequence:e.minAccountSequence,minAccountSequenceAge:e.minAccountSequenceAge,minAccountSequenceLedgerGap:e.minAccountSequenceLedgerGap,extraSigners:e.extraSigners},t));return e._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 rg(r.fee).div(o),a=new rg(t);if(a.lt(i))throw Error("Invalid baseFee, it should be at least ".concat(i," stroops."));var s=new rg(nB);if(a.lt(s))throw Error("Invalid baseFee, it should be at least ".concat(s," stroops."));var c,u=r.toEnvelope();if(u.switch()===C.EnvelopeType.envelopeTypeTxV0()){var l=u.v0().tx(),f=new C.Transaction({sourceAccount:new C.MuxedAccount.keyTypeEd25519(l.sourceAccountEd25519()),fee:l.fee(),seqNum:l.seqNum(),cond:C.Preconditions.precondTime(l.timeBounds()),memo:l.memo(),operations:l.operations(),ext:new C.TransactionExt(0)});u=new C.TransactionEnvelope.envelopeTypeTx(new C.TransactionV1Envelope({tx:f,signatures:u.v0().signatures()}))}c="string"==typeof e?rI(e):e.xdrMuxedAccount();var p=new C.FeeBumpTransaction({feeSource:c,fee:C.Int64.fromString(a.times(o+1).toString()),innerTx:C.FeeBumpTransactionInnerTx.envelopeTypeTx(u.v1()),ext:new C.FeeBumpTransactionExt(0)}),d=new C.FeeBumpTransactionEnvelope({tx:p,signatures:[]});return new nf(new C.TransactionEnvelope.envelopeTypeTxFeeBump(d),n)}},{key:"fromXDR",value:function(e,t){return"string"==typeof e&&(e=C.TransactionEnvelope.fromXDR(e,"base64")),e.switch()===C.EnvelopeType.envelopeTypeTxFeeBump()?new nf(e,t):new ni(e,t)}}],e&&nO(r.prototype,e),t&&nO(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}();function nC(e){return e instanceof Date&&!isNaN(e)}var nR={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 nU(e){return(nU="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 nN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var nM=(function(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,function(e){var t=function(e){if("object"!=nU(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=nU(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nU(t)?t:t+""}(n.key),n)}}(T=function e(){if(!(this instanceof e))throw TypeError("Cannot call a class as a function")},[{key:"formatTokenAmount",value:function(e,t){if(e.includes("."))throw 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,o=function(e){if(Array.isArray(e))return e}(r=e.split(".").slice())||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e){if(e){if("string"==typeof e)return nN(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?nN(e,void 0):void 0}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=o[0],a=o[1];if(o.slice(2).length)throw Error("Invalid decimal value: ".concat(e));return BigInt(i+(null!=(n=null==a?void 0:a.padEnd(t,"0"))?n:"0".repeat(t))).toString()}}]),Object.defineProperty(T,"prototype",{writable:!1}),T);function nD(e){return(nD="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)}var nL=(k=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");try{this._id=tW.decodeContract(t)}catch(e){throw Error("Invalid contract ID: ".concat(t))}},O=[{key:"contractId",value:function(){return tW.encodeContract(this._id)}},{key:"toString",value:function(){return this.contractId()}},{key:"address",value:function(){return rH.contract(this._id)}},{key:"call",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return rZ.invokeContractFunction({contract:this.address().toString(),function:e,args:r})}},{key:"getFootprint",value:function(){return C.LedgerKey.contractData(new C.LedgerKeyContractData({contract:this.address().toScAddress(),key:C.ScVal.scvLedgerKeyContractInstance(),durability:C.C
2ontractDataDurability.persistent()}))}}],function(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,function(e){var t=function(e){if("object"!=nD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=nD(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nD(t)?t:t+""}(n.key),n)}}(k.prototype,O),Object.defineProperty(k,"prototype",{writable:!1}),k);function nF(e){return(nF="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 nq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nq=function(){return!!e})()}function nV(e){return(nV=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function n$(e,t){return(n$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var nz=function(e){var t;function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return e=r,t=[o],e=nV(e),function(e,t){if(t&&("object"==nF(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nq()?Reflect.construct(e,t||[],nV(this).constructor):e.apply(this,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&n$(e,t)}(r,e),t=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 128}}],function(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,function(e){var t=function(e){if("object"!=nF(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=nF(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nF(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(I.LargeInt);function nH(e){return(nH="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 nG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nG=function(){return!!e})()}function nK(e){return(nK=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nW(e,t){return(nW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}nz.defineIntBoundaries();var nX=function(e){var t;function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return e=r,t=[o],e=nK(e),function(e,t){if(t&&("object"==nH(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nG()?Reflect.construct(e,t||[],nK(this).constructor):e.apply(this,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&nW(e,t)}(r,e),t=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 256}}],function(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,function(e){var t=function(e){if("object"!=nH(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=nH(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nH(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(I.LargeInt);function nQ(e){return(nQ="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 nJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nJ=function(){return!!e})()}function nY(e){return(nY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
2function nZ(e,t){return(nZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}nX.defineIntBoundaries();var n0=function(e){var t;function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return e=r,t=[o],e=nY(e),function(e,t){if(t&&("object"==nQ(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,nJ()?Reflect.construct(e,t||[],nY(this).constructor):e.apply(this,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&nZ(e,t)}(r,e),t=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 128}}],function(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,function(e){var t=function(e){if("object"!=nQ(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=nQ(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nQ(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(I.LargeInt);function n1(e){return(n1="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 n2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n2=function(){return!!e})()}function n6(e){return(n6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function n4(e,t){return(n4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}n0.defineIntBoundaries();var n3=function(e){var t;function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return e=r,t=[o],e=n6(e),function(e,t){if(t&&("object"==n1(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,n2()?Reflect.construct(e,t||[],n6(this).constructor):e.apply(this,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&n4(e,t)}(r,e),t=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 256}}],function(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,function(e){var t=function(e){if("object"!=n1(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n1(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n1(t)?t:t+""}(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(I.LargeInt);function n5(e){return(n5="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 n8(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,n7(n.key),n)}}function n9(e,t,r){return(t=n7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n7(e){var t=function(e){if("object"!=n5(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n5(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n5(t)?t:t+""}n3.defineIntBoundaries();var oe=(P=function e(t,r){switch(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),n9(this,"int",void 0),n9(this,"type",void 0),r instanceof Array||(r=[r]),r=r.map(function(e){return"bigint"==typeof e?e:"function"==typeof e.toBigInt?e.toBigInt():BigInt(e)}),t){case"i64":this.int=new I.Hyper(r);break;case"i128":this.int=new n0(r);break;case"i256":this.int=new n3(r);break;case"u64":this.int=new I.UnsignedHyper(r);break;case"u128":this.int=new nz(r);break;case"u256":this.int=new nX(r);break;default:throw TypeError("invalid type: ".concat(t))}this.type=t},B=[{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 C.ScVal.scvI64(new C.Int64(e))}},{key:"toU64",value:function(){return this._sizeCheck(64),C.ScVal.scvU64(new C.Uint64(BigInt.asUintN(64,this.toBigInt())))}},{key:"toI128",value:function(){this._sizeCheck(128);var e=this.int.toBigInt(),t=BigInt.asIntN(64,e>>
264n),r=BigInt.asUintN(64,e);return C.ScVal.scvI128(new C.Int128Parts({hi:new C.Int64(t),lo:new C.Uint64(r)}))}},{key:"toU128",value:function(){this._sizeCheck(128);var e=this.int.toBigInt();return C.ScVal.scvU128(new C.UInt128Parts({hi:new C.Uint64(BigInt.asUintN(64,e>>64n)),lo:new C.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 C.ScVal.scvI256(new C.Int256Parts({hiHi:new C.Int64(t),hiLo:new C.Uint64(r),loHi:new C.Uint64(n),loLo:new C.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 C.ScVal.scvU256(new C.UInt256Parts({hiHi:new C.Uint64(t),hiLo:new C.Uint64(r),loHi:new C.Uint64(n),loLo:new C.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.t
2ype}}},{key:"_sizeCheck",value:function(e){if(this.int.size>e)throw RangeError("value too large for ".concat(e," bits (").concat(this.type,")"))}}],j=[{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()}}],B&&n8(P.prototype,B),j&&n8(P,j),Object.defineProperty(P,"prototype",{writable:!1}),P);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})(e)}function or(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(or=function(){return!!e})()}function on(e){return(on=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oo(e,t){return(oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var oi=function(e){function t(e,r){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var n,o,i,a=e<0,s=null!=(i=null==r?void 0:r.type)?i:"";if(s.startsWith("u")&&a)throw TypeError("specified type ".concat(r.type," yet negative (").concat(e,")"));if(""===s){s=a?"i":"u";var c,u,l=(u=e.toString(2).length,null!=(c=[64,128,256].find(function(e){return u<=e}))?c:u);switch(l){case 64:case 128:case 256:s+=l.toString();break;default:throw RangeError("expected 64/128/256 bits for input (".concat(e,"), got ").concat(l))}}return n=t,o=[s,e],n=on(n),function(e,t){if(t&&("object"==ot(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,or()?Reflect.construct(n,o||[],on(this).constructor):n.apply(this,o))}return function(e,t){if("function"!=typeof t&&null!==t)throw 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&&oo(e,t)}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(oe);function oa(e){var t=oe.getType(e.switch().name);switch(e.switch().name){case"scvU32":case"scvI32":return BigInt(e.value());case"scvU64":case"scvI64":return new oe(t,e.value()).toBigInt();case"scvU128":case"scvI128":return new oe(t,[e.value().lo(),e.value().hi()]).toBigInt();case"scvU256":case"scvI256":return new oe(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 os=r(8287).Buffer;function oc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ou(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ou(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ou(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ol(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 of(e){return(of="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 op(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(of(e)){case"object":if(null===e)return C.ScVal.scvVoid();if(e instanceof C.ScVal)return e;if(e instanceof rH)return e.toScVal();if(e instanceof t2)return op(e.publicKey(),{type:"address"});if(e instanceof nL)return e.address().toScVal();if(e instanceof Uint8Array||os.isBuffer(e)){var r,n,o,i,a=Uint8Array.from(e);switch(null!=(i=null==t?void 0:t.type)?i:"bytes"){case"bytes":return C.ScVal.scvBytes(a);case"symbol":return C.ScVal.scvSymbol(a);case"string":return C.ScVal.scvString(a);default:throw TypeError("invalid type (".concat(t.type,") specified for bytes-like value"))}}if(Array.isArray(e))return C.ScVal.scvVec(e.map(function(e,r){return Array.isArray(t.type)?op(e,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
2t%2?ol(Object(r),!0).forEach(function(t){!function(e,t,r){var n;(n=function(e){if("object"!=of(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=of(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==of(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ol(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t.type.length>r&&{type:t.type[r]})):op(e,t)}));if("Object"!==(null!=(r=null==(n=e.constructor)?void 0:n.name)?r:""))throw TypeError("cannot interpret ".concat(null==(o=e.constructor)?void 0:o.name," value as ScVal (").concat(JSON.stringify(e),")"));return C.ScVal.scvMap(Object.entries(e).sort(function(e,t){var r=oc(e,1)[0],n=oc(t,1)[0];return r.localeCompare(n)}).map(function(e){var r,n,o=oc(e,2),i=o[0],a=o[1],s=oc(null!=(r=(null!=(n=null==t?void 0:t.type)?n:{})[i])?r:[null,null],2),c=s[0],u=s[1];return new C.ScMapEntry({key:op(i,c?{type:c}:{}),val:op(a,u?{type:u}:{})})}));case"number":case"bigint":switch(null==t?void 0:t.type){case"u32":return C.ScVal.scvU32(e);case"i32":return C.ScVal.scvI32(e)}return new oi(e,{type:null==t?void 0:t.type}).toScVal();case"string":var s,c=null!=(s=null==t?void 0:t.type)?s:"string";switch(c){case"string":return C.ScVal.scvString(e);case"symbol":return C.ScVal.scvSymbol(e);case"address":return new rH(e).toScVal();case"u32":return C.ScVal.scvU32(parseInt(e,10));case"i32":return C.ScVal.scvI32(parseInt(e,10));default:if(oe.isType(c))return new oe(c,e).toScVal();throw TypeError("invalid type (".concat(t.type,") specified for string value"))}case"boolean":return C.ScVal.scvBool(e);case"undefined":return C.ScVal.scvVoid();case"function":return op(e());default:throw TypeError("failed to convert typeof ".concat(of(e)," (").concat(e,")"))}}function od(e){var t,r;switch(e.switch().value){case C.ScValType.scvVoid().value:return null;case C.ScValType.scvU64().value:case C.ScValType.scvI64().value:return e.value().toBigInt();case C.ScValType.scvU128().value:case C.ScValType.scvI128().value:case C.ScValType.scvU256().value:case C.ScValType.scvI256().value:return oa(e);case C.ScValType.scvVec().value:return(null!=(t=e.vec())?t:[]).map(od);case C.ScValType.scvAddress().value:return rH.fromScVal(e).toString();case C.ScValType.scvMap().value:return Object.fromEntries((null!=(r=e.map())?r:[]).map(function(e){return[od(e.key()),od(e.val())]}));case C.ScValType.scvBool().value:case C.ScValType.scvU32().value:case C.ScValType.scvI32().value:case C.ScValType.scvBytes().value:return e.value();case C.ScValType.scvSymbol().value:case C.ScValType.scvString().value:var n=e.value();if(os.isBuffer(n)||ArrayBuffer.isView(n))try{return(new TextDecoder).decode(n)}catch(e){return new Uint8Array(n.buffer)}return n;case C.ScValType.scvTimepoint().value:case C.ScValType.scvDuration().value:return new C.Uint64(e.value()).toBigInt();case C.ScValType.scvError().value:if(e.error().switch().value===C.ScErrorType.sceContract().value)return{type:"contract",code:e.error().contractCode()};var o=e.error();return{type:"system",code:o.code().value,value:o.code().name};default:return e.value()}}function oh(e){return(oh="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 oy(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 om(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oy(Object(r),!0).forEach(function(t){!function(e,t,r){var n;(n=function(e){if("object"!=oh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=oh(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==oh(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oy(Object(r)).forEac
2h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function og(e){return e.map(function(e){return e.inSuccessfulContractCall?ob(e.event()):ob(e)})}function ob(e){return om(om({},"function"==typeof e.contractId&&null!=e.contractId()&&{contractId:tW.encodeContract(e.contractId())}),{},{type:e.type().name,topics:e.body().value().topics().map(function(e){return od(e)}),data:od(e.body().value().data())})}C.scvSortedMap=function(e){var t=Array.from(e).sort(function(e,t){var r=od(e.key()),n=od(t.key());switch(of(r)){case"number":case"bigint":return r<n?-1:1;default:return r.toString().localeCompare(n.toString())}});return C.ScVal.scvMap(t)};var ov=r(8287).Buffer;function ow(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=Object.create((n&&n.prototype instanceof s?n:s).prototype);return oS(c,"_invoke",function(r,n,o){var i,s,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,s=0,c=e,p.n=r,a}};function d(r,n){for(s=r,c=n,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];r>3?(o=h===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,c=h;(t=s<2?e:c)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,c)):p.n=c:p.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?c:r.call(n,p))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][n]?t(t([][n]())):(oS(t={},n,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,oS(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,oS(l,"constructor",u),oS(u,"constructor",c),c.displayName="GeneratorFunction",oS(u,o,"GeneratorFunction"),oS(l),oS(l,o,"Generator"),oS(l,n,function(){return this}),oS(l,"toString",function(){return"[object Generator]"}),(ow=function(){return{w:i,m:f}})()}function oS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(oS=function(e,t,r,n){function i(t,r){oS(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function o_(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function oE(e,t,r){return ox.apply(this,arguments)}function ox(){var e;return e=ow().m(function e(t,r,n){var o,i,a,s,c,u,l,f,p,d,h=arguments;return ow().w(function(e){for(;;)switch(e.n){case 0:if(o=h.length>3&&void 0!==h[3]?h[3]:nR.FUTURENET,t.credentials().switch().value===C.SorobanCredentialsType.sorobanCredentialsAddress().value){e.n=1;break}return e.a(2,t);case 1:if((a=(i=C.SorobanAuthorizationEntry.fromXDR(t.toXDR())).credentials().address()).signatureExpirationLedger(n),s=N(ov.from(o)),u=N((c=C.HashIdPreimage.envelopeTypeSorobanAuthorization(new C.HashIdPreimageSorobanAuthorization({networkId:s,nonce:a.nonce(),invocation:i.rootInvocation(),signatureExpirationLedger:a.signatureExpirationLedger()}))).toXDR()),"function"!=typeof r){e.n=3;break}return e.n=2,r(c);case 2:null!=(p=e.v)&&p.signature?(l=ov.from(p.signature),f=p.publicKey):(l=ov.from(p),f=rH.fromScAddress(a.address()).toString()),e.n=4;break;case 3:l=ov.from(r.sign(u)),f=r.publicKey();case 4:if(t2.fromPublicKey(f).verify(u,l)){e.n=5;break}throw Error("signature doesn't match payload");case 5:return d=op({public_key:tW.decodeEd25519PublicKey(f),signature:l},{type:{public_key:["symbol",null],signature:["symbol",null]}}),a.signature(C.ScVal.scvVec([d])),e.a(2,i)}},e)}),(ox=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){o_(i,n,o,a,s,"next",e)}function s(e){o_(i,n,o,a,s,"throw",e)}a(void 0)})}).apply(this,arguments)}function oA(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:nR.FUTURENET,i=t2.random().rawPublicKey(),a=new C.Int64(i.subarray(0,8).reduce(function(e,t){return e<<8|t}
2,0)),s=n||e.publicKey();if(!s)throw Error("authorizeInvocation requires publicKey parameter");return oE(new C.SorobanAuthorizationEntry({rootInvocation:r,credentials:C.SorobanCredentials.sorobanCredentialsAddress(new C.SorobanAddressCredentials({address:new rH(s).toScAddress(),nonce:a,signatureExpirationLedger:0,signature:C.ScVal.scvVec([])}))}),e,t,o)}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})(e)}function ok(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 oO(e,t){!function e(t,r,n,o){!1!==n(t,r,o)&&t.subInvocations().forEach(function(o){return e(o,r+1,n,t)})}(e,1,t)}let oP=(e=r.hmd(e)).exports},453:(e,t,r)=>{"use strict";var n,o=r(9612),i=r(9383),a=r(1237),s=r(9290),c=r(9538),u=r(8068),l=r(9675),f=r(5345),p=r(1514),d=r(8968),h=r(6188),y=r(8002),m=r(5880),g=r(414),b=r(3093),v=Function,w=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch(e){}},S=r(5795),_=r(655),E=function(){throw new l},x=S?function(){try{return E}catch(e){try{return S(arguments,"callee").get}catch(e){return E}}}():E,A=r(4039)(),T=r(3628),k=r(1064),O=r(8648),P=r(1002),B=r(76),j={},I="u">typeof Uint8Array&&T?T(Uint8Array):n,C={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":A&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":"u"<typeof Atomics?n:Atomics,"%BigInt%":"u"<typeof BigInt?n:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"u"<typeof Float16Array?n:Float16Array,"%Float32Array%":"u"<typeof Float32Array?n:Float32Array,"%Float64Array%":"u"<typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":j,"%Int8Array%":"u"<typeof Int8Array?n:Int8Array,"%Int16Array%":"u"<typeof Int16Array?n:Int16Array,"%Int32Array%":"u"<typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
2IteratorPrototype%":A&&T?T(T([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"u"<typeof Map?n:Map,"%MapIteratorPrototype%":"u">typeof Map&&A&&T?T((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?n:Promise,"%Proxy%":"u"<typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":c,"%Reflect%":"u"<typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?n:Set,"%SetIteratorPrototype%":"u">typeof Set&&A&&T?T((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&T?T(""[Symbol.iterator]()):n,"%Symbol%":A?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":x,"%TypedArray%":I,"%TypeError%":l,"%Uint8Array%":"u"<typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"u"<typeof WeakMap?n:WeakMap,"%WeakRef%":"u"<typeof WeakRef?n:WeakRef,"%WeakSet%":"u"<typeof WeakSet?n:WeakSet,"%Function.prototype.call%":B,"%Function.prototype.apply%":P,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":k,"%Math.abs%":p,"%Math.floor%":d,"%Math.max%":h,"%Math.min%":y,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":b,"%Reflect.getPrototypeOf%":O};if(T)try{null.error}catch(e){var R=T(T(e));C["%Error.prototype%"]=R}var U=function e(t){var r;if("%AsyncFunction%"===t)r=w("async function () {}");else if("%GeneratorFunction%"===t)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=w("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&T&&(r=T(o.prototype))}return C[t]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=r(6743),D=r(9957),L=M.call(B,Array.prototype.concat),F=M.call(P,Array.prototype.splice),q=M.call(B,String.prototype.replace),V=M.call(B,String.prototype.slice),$=M.call(B,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,G=function(e,t){var r,n=e;if(D(N,n)&&(n="%"+(r=N[n])[0]+"%"),D(C,n)){var o=C[n];if(o===j&&(o=U(n)),void 0===o&&!t)throw new l("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 l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===$(/^%?[^%]*%?$/,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=V(e,0,1),r=V(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 q(e,z,function(e,t,r,o){n[n.length]=r?q(o,H,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=G("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],F(r,L([0,1],c)));for(var f=1,p=!0;f<r.length;f+=1){var d=r[f],h=V(d,0,1),y=V(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===y||"'"===y||"`"===y)&&h!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(s=!0),D(C,i="%"+(n+="."+d)+"%"))a=C[i];
2else if(null!=a){if(!(d in a)){if(!t)throw new l("base intrinsic for "+e+" exists, but the property is not available.");return}if(S&&f+1>=r.length){var m=S(a,d);a=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[d]}else p=D(a,d),a=a[d];p&&!s&&(C[i]=a)}}return a}},487:(e,t,r)=>{"use strict";var n=r(6897),o=r(655),i=r(3126),a=r(2205);e.exports=function(e){var t=i(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},o?o(e.exports,"apply",{value:a}):e.exports.apply=a},537:(e,t,r)=>{var n=r(5606),o=r(6763),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])b(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 Error(r);n.traceDeprecation?o.trace(r):o.error(r),i=!0}return e.apply(this,arguments)}};var s={},c=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;c=RegExp("^"+(u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase())+"$","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),d(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 d(e,r,n){if(e.customInspect&&r&&T(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o,i,a=r.inspect(n,e);return w(a)||(a=d(e,a,n)),a}var s=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")}return v(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):b(t)?e.stylize("null","null"):void 0}(e,r);if(s)return s;var c=Object.keys(r),u=(f={},c.forEach(function(e,t){f[e]=!0}),f);if(e.showHidden&&(c=Object.getOwnPropertyNames(r)),A(r)&&(c.indexOf("message")>=0||c.indexOf("description")>=0))return h(r);if(0===c.length){if(T(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return e.stylize(Date.prototype.toString.call(r),"date");if(A(r))return h(r)}var f,p,E="",k=!1,O=["{","}"];return m(r)&&(k=!0,O=["[","]"]),T(r)&&(E=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(E=" "+RegExp.prototype.toString.call(r)),x(r)&&(E=" "+Date.prototype.toUTCString.call(r)),A(r)&&(E=" "+h(r)),0!==c.length||k&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),p=k?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)B(t,String(a))?i.push(y(e,t,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(y(e,t,r,n,o,!0))}),i}(e,r,n,u,c):c.map(function(t){return y(e,r,n,u,t,k)}),e.seen.pop(),o=E,i=O,p.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?i[0]+(""===o?"":o+"\n ")+" "+p.join(",\n  ")+" "+i[1]:i[0]+o+" "+p.join(", ")+" "+i[1]):O[0]+E+O[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function y(e,t,r,n,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[
2Setter]","special")),B(n,o)||(a="["+o+"]"),s||(0>e.seen.indexOf(c.value)?(s=b(r)?d(e,c.value,null):d(e,c.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 b(e){return null===e}function v(e){return"number"==typeof e}function w(e){return"string"==typeof e}function S(e){return void 0===e}function _(e){return E(e)&&"[object RegExp]"===k(e)}function E(e){return"object"==typeof e&&null!==e}function x(e){return E(e)&&"[object Date]"===k(e)}function A(e){return E(e)&&("[object Error]"===k(e)||e instanceof Error)}function T(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!s[e=e.toUpperCase()])if(c.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=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=w,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=S,t.isRegExp=_,t.types.isRegExp=_,t.isObject=E,t.isDate=x,t.types.isDate=x,t.isError=A,t.types.isNativeError=A,t.isFunction=T,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(1135);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;o.log("%s - %s",(r=[O((e=new Date).getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":"),[e.getDate(),P[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(6698),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 j="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(e,t){if(!e){var r=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 TypeError('The "original" argument must be of type Function');if(j&&e[j]){var t;if("function"!=typeof(t=e[j]))throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,j,{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)),j&&Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=j,t.callbackify=function(e){if("function"!=typeof e)throw 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 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(I.bind(null,e,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},592:(e,t,r)=>{"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},655:e=>{"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},1002:e=>{"use strict";e.exports=Function.prototype.apply},1064:(e,t,r)=>{"use strict";e.exports=r(9612).getPrototypeOf||null},1093: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}},1135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},1189:(e,t,r)=>{"use strict";var n=Array.prototype.slice,o=r(1093),i=Object.keys,a=i?function(e){return i(e)}:r(8875),s=Object.keys;a.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}
2(1,2)||(Object.keys=function(e){return o(e)?s(n.call(e)):s(e)}):Object.keys=a,Object.keys||a},e.exports=a},1237:e=>{"use strict";e.exports=EvalError},1333: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||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},1514:e=>{"use strict";e.exports=Math.abs},2205:(e,t,r)=>{"use strict";
2var n=r(6743),o=r(1002),i=r(3144);e.exports=function(){return i(n,o,arguments)}},2299:(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:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw 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=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})(e)}var a=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t},c=function(e){var t=[];return e.forEach(function(e,r){return t.push([r,e])}),t},u=Object.is?Object.is:r(7653),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(4133);function p(e){return e.call.bind(e)}var d=p(Object.prototype.hasOwnProperty),h=p(Object.prototype.propertyIsEnumerable),y=p(Object.prototype.toString),m=r(537).types,g=m.isAnyArrayBuffer,b=m.isArrayBufferView,v=m.isDate,w=m.isMap,S=m.isRegExp,_=m.isSet,E=m.isNativeError,x=m.isBoxedPrimitive,A=m.isNumberObject,T=m.isStringObject,k=m.isBooleanObject,O=m.isBigIntObject,P=m.isSymbolObject,B=m.isFloat32Array,j=m.isFloat64Array;function I(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>=0x100000000}function C(e){return Object.keys(e).filter(I).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function R(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)}function U(e,t,r,n){if(e===t)return 0!==e||!r||u(e,t);if(r){if("object"!==i(e))return"number"==typeof e&&f(e)&&f(t);if("object"!==i(t)||null===e||null===t||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=y(e);if(o!==y(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var s=C(e),c=C(t);return s.length===c.length&&M(e,t,r,n,1,s)}if("[object Object]"===o&&(!w(e)&&w(t)||!_(e)&&_(t)))return!1;if(v(e)){if(!v(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(S(e)){if(!S(t)||!(a?e.source===t.source&&e.flags===t.flags:RegExp.prototype.toString.call(e)===RegExp.prototype.toString.call(t)))return!1}else if(E(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(b(e)){if(!r&&(B(e)||j(e))){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}else if(e.byteLength!==t.byteLength||0!==R(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))return!1;var l=C(e),p=C(t);return l.length===p.length&&M(e,t,r,n,0,l)}if(_(e))return!(!_(t)||e.size!==t.size)&&M(e,t,r,n,2);if(w(e))return!(!w(t)||e.size!==t.size)&&M(e,t,r,n,3);if(g(e)){if(e.byteLength!==t.byteLength||0!==R(new Uint8Array(e),new Uint8Array(t)))return!1}else if(x(e)&&(A(e)?!(A(t)&&u(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t))):T(e)?!T(t)||String.prototype.valueOf.call(e)!==String.prototype.valueOf.call(t):k(e)?!k(t)||Boolean.prototype.valueOf.call(e)!==Boolean.prototype.valueOf.call(t):O(e)?!O(t)||BigInt.prototype.valueOf.call(e)!==BigInt.prototype.valueOf.call(t):!P(t)||Symbol.prototype.valueOf.call(e)!==Symbol.prototype.valueOf.call(t)))return!1}return M(e,t,r,n,0)}function N(e,t){return t.filter(function(t){return h(e,t)})}function M(e,t,r,o,a,u){if(5==arguments.length){u=Object.keys(e);var f=Object.keys(t);if(u.length!==f.length)return!1}for(var p=0;p<u.length;p++)if(!d(t,u[p]))return!1;if(r&&5==arguments.length){var y=l(e);if(0!==y.length){var m=0;for(p=0;p<y.length;p++){var g=y[p];
2if(h(e,g)){if(!h(t,g))return!1;u.push(g),m++}else if(h(t,g))return!1}var b=l(t);if(y.length!==b.length&&N(t,b).length!==m)return!1}else{var v=l(t);if(0!==v.length&&0!==N(t,v).length)return!1}}if(0===u.length&&(0===a||1===a&&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 _=function(e,t,r,o,a,u){var l=0;if(2===u){if(!function(e,t,r,n){for(var o=null,a=s(e),c=0;c<a.length;c++){var u=a[c];if("object"===i(u)&&null!==u)null===o&&(o=new Set),o.add(u);else if(!t.has(u)){if(r||!function(e,t,r){var n=L(r);return null!=n?n:t.has(n)&&!e.has(n)}(e,t,u))return!1;null===o&&(o=new Set),o.add(u)}}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(!D(o,p,r,n))return!1}else if(!r&&!e.has(p)&&!D(o,p,r,n))return!1}return 0===o.size}return!0}(e,t,r,a))return!1}else if(3===u){if(!function(e,t,r,o){for(var a=null,s=c(e),u=0;u<s.length;u++){var l=n(s[u],2),f=l[0],p=l[1];if("object"===i(f)&&null!==f)null===a&&(a=new Set),a.add(f);else{var d=t.get(f);if(void 0===d&&!t.has(f)||!U(p,d,r,o)){if(r||!function(e,t,r,n,o){var i=L(r);if(null!=i)return i;var a=t.get(i);return!(void 0===a&&!t.has(i)||!U(n,a,!1,o))&&!e.has(i)&&U(n,a,!1,o)}(e,t,f,p,o))return!1;null===a&&(a=new Set),a.add(f)}}}if(null!==a){for(var h=c(t),y=0;y<h.length;y++){var m=n(h[y],2),g=m[0],b=m[1];if("object"===i(g)&&null!==g){if(!F(a,e,g,b,r,o))return!1}else if(!(r||e.has(g)&&U(e.get(g),b,!1,o)||F(a,e,g,b,!1,o)))return!1}return 0===a.size}return!0}(e,t,r,a))return!1}else if(1===u)for(;l<e.length;l++){if(!d(e,l)){if(d(t,l))return!1;for(var f=Object.keys(e);l<f.length;l++){var p=f[l];if(!d(t,p)||!U(e[p],t[p],r,a))return!1}return f.length===Object.keys(t).length}if(!d(t,l)||!U(e[l],t[l],r,a))return!1}for(l=0;l<o.length;l++){var h=o[l];if(!U(e[h],t[h],r,a))return!1}return!0}(e,t,r,u,o,a);return o.val1.delete(e),o.val2.delete(t),_}function D(e,t,r,n){for(var o=s(e),i=0;i<o.length;i++){var a=o[i];if(U(t,a,r,n))return e.delete(a),!0}return!1}function L(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e*=1;case"number":if(f(e))return!1}return!0}function F(e,t,r,n,o,i){for(var a=s(e),c=0;c<a.length;c++){var u=a[c];if(U(r,u,o,i)&&U(n,t.get(u),o,i))return e.delete(u),!0}return!1}e.exports={isDeepEqual:function(e,t){return U(e,t,!1)},isDeepStrictEqual:function(e,t){return U(e,t,!0)}}},2464:(e,t,r)=>{"use strict";var n=r(8452),o=r(6642);e.exports=function(){var e=o();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},2682:(e,t,r)=>{"use strict";var n=r(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a;if(!n(t))throw TypeError("iterator must be a function");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)}},2802:(e,t,r)=>{"use strict";e.exports=function(t){var r=t.toLowerCase(),n=e.exports[r];if(!n)throw Error(r+" is not supported (we accept pull requests)");return new n},e.exports.sha=r(7816),e.exports.sha1=r(3737),e.exports.sha224=r(6710),e.exports.sha256=r(4107),e.exports.sha384=r(2827),e.exports.sha512=r(2890)},2827:(e,t,r)=>{"use strict";var n=r(6698),o=r(2890),i=r(392),a=r(2861).Buffer,s=Array(160);function c(){this.init(),this._w=s,i.call(this,128,112)}n(c,o),c.prototype.init=function(){return this._ah=0xcbbb9d5d,this._bh=0x629a292a,this._ch=0x9159015a,this._dh=0x152fecd8,this._eh=0x67332667,this._fh=0x8eb44a87,this._gh=0xdb0c2e0d,this._hh=0x47b5481d,this._al=0xc1059ed8,this._bl=0x367cd507,this._cl=0x3070dd17,this._dl=0xf70e5939,this._el=0xffc00b31,this._fl=0x68581511,this._gl=0x64f98fa7,this._hl=0xbefa4fa4,this},c.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=c},2861:(e,t,r)=>{var n=r(8287),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 TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw 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 TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},2890:(e,t,r)=>{"use strict";var n=r(6698),o=r(392),i=r(2861).Buffer,a=[0x428a2f98,0xd728ae22,0x71374491,0x23ef65cd,0xb5c0fbcf,0xec4d3b2f,0xe9b5dba5,0x8189dbbc,0x3956c25b,0xf348b538,0x59f111f1,0xb605d019,0x923f82a4,0xaf194f9b,0xab1c5ed5,0xda6d8118,0xd807aa98,0xa3030242,0x12835b01,0x45706fbe,0x243185be,0x4ee4b28c,0x550c7dc3,0xd5ffb4e2,0x72be5d74,0xf27b896f,0x80deb1fe,0x3b1696b1,0x9bdc06a7,0x25c71235,0xc19bf174,0xcf692694,0xe49b69c1,0x9ef14ad2,0xefbe4786,0x384f25e3,0xfc19dc6,0x8b8cd5b5,0x240ca1cc,0x77ac9c65,0x2de92c6f,0x592b0275,0x4a7484aa,0x6ea6e483,0x5cb0a9dc,0xbd41fbd4,0x76f988da,0x831153b5,0x983e5152,0xee66dfab,0xa831c66d,0x2db43210,0xb00327c8,0x98fb213f,0xbf597fc7,0xbeef0ee4,0xc6e00bf3,0x3da88fc2,0xd5a79147,0x930aa725,0x6ca6351,0xe003826f,0x14292967,0xa0e6e70,0x27b70a85,0x46d22ffc,0x2e1b2138,0x5c26c926,0x4d2c6dfc,0x5ac42aed,0x53380d13,0x9d95b3df,0x650a7354,0x8baf63de,0x766a0abb,0x3c77b2a8,0x81c2c92e,0x47edaee6,0x92722c85,0x1482353b,0xa2bfe8a1,0x4cf10364,0xa81a664b,0xbc423001,0xc24b8b70,0xd0f89791,0xc76c51a3,0x654be30,0xd192e819,0xd6ef5218,0xd6990624,0x5565a910,0xf40e3585,0x5771202a,0x106aa070,0x32bbd1b8,0x19a4c116,0xb8d2d0c8,0x1e376c08,0x5141ab53,0x2748774c,0xdf8eeb99,0x34b0bcb5,0xe19b48a8,0x391c0cb3,0xc5c95a63,0x4ed8aa4a,0xe3418acb,0x5b9cca4f,0x7763e373,0x682e6ff3,0xd6b2b8a3,0x748f82ee,0x5defb2fc,0x78a5636f,0x43172f60,0x84c87814,0xa1f0ab72,0x8cc70208,0x1a6439ec,0x90befffa,0x23631e28,0xa4506ceb,0xde82bde9,0xbef9a3f7,0xb2c67915,0xc67178f2,0xe372532b,0xca273ece,0xea26619c,0xd186b8c7,0x21c0c207,0xeada7dd6,0xcde0eb1e,0xf57d4f7f,0xee6ed178,0x6f067aa,0x72176fba,0xa637dc5,0xa2c898a6,0x113f9804,0xbef90dae,0x1b710b35,0x131c471b,0x28db77f5,0x23047d84,0x32caab7b,0x40c72493,0x3c9ebe0a,0x15c9bebc,0x431d67c4,0x9c100d4c,0x4cc5d4be,0xcb3e42b6,0x597f299c,0xfc657e2a,0x5fcb6fab,0x3ad6faec,0x6c44198c,0x4a475817],s=Array(160);function c(){this.init(),this._w=s,o.call(this,128,112)}function u(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function f(e,t){return+(e>>>0<t>>>0)}
2n(c,o),c.prototype.init=function(){return this._ah=0x6a09e667,this._bh=0xbb67ae85,this._ch=0x3c6ef372,this._dh=0xa54ff53a,this._eh=0x510e527f,this._fh=0x9b05688c,this._gh=0x1f83d9ab,this._hh=0x5be0cd19,this._al=0xf3bcc908,this._bl=0x84caa73b,this._cl=0xfe94f82b,this._dl=0x5f1d36f1,this._el=0xade682d1,this._fl=0x2b3e6c1f,this._gl=0xfb41bd6b,this._hl=0x137e2179,this},c.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,c=0|this._fh,p=0|this._gh,d=0|this._hh,h=0|this._al,y=0|this._bl,m=0|this._cl,g=0|this._dl,b=0|this._el,v=0|this._fl,w=0|this._gl,S=0|this._hl,_=0;_<32;_+=2)t[_]=e.readInt32BE(4*_),t[_+1]=e.readInt32BE(4*_+4);for(;_<160;_+=2){var E,x,A,T,k,O,P,B,j=t[_-30],I=t[_-30+1],C=((E=j)>>>1|(x=I)<<31)^(E>>>8|x<<24)^E>>>7,R=((A=I)>>>1|(T=j)<<31)^(A>>>8|T<<24)^(A>>>7|T<<25),U=((k=j=t[_-4])>>>19|(O=I=t[_-4+1])<<13)^(O>>>29|k<<3)^k>>>6,N=((P=I)>>>19|(B=j)<<13)^(B>>>29|P<<3)^(P>>>6|B<<26),M=t[_-14],D=t[_-14+1],L=t[_-32],F=t[_-32+1],q=R+D|0,V=C+M+f(q,R)|0;V=(V=V+U+f(q=q+N|0,N)|0)+L+f(q=q+F|0,F)|0,t[_]=V,t[_+1]=q}for(var $=0;$<160;$+=2){V=t[$],q=t[$+1];var z,H,G,K,W,X,Q,J,Y,Z,ee=(z=r)&(H=n)|o&(z|H),et=(G=h)&(K=y)|m&(G|K),er=u(r,h),en=u(h,r),eo=l(s,b),ei=l(b,s),ea=a[$],es=a[$+1],ec=(W=s,X=c,(Q=p)^W&(X^Q)),eu=(J=b,Y=v,(Z=w)^J&(Y^Z)),el=S+ei|0,ef=d+eo+f(el,S)|0;ef=(ef=(ef=ef+ec+f(el=el+eu|0,eu)|0)+ea+f(el=el+es|0,es)|0)+V+f(el=el+q|0,q)|0;var ep=en+et|0,ed=er+ee+f(ep,en)|0;d=p,S=w,p=c,w=v,c=s,v=b,s=i+ef+f(b=g+el|0,g)|0,i=o,g=m,o=n,m=y,n=r,y=h,r=ef+ed+f(h=el+ep|0,el)|0}this._al=this._al+h|0,this._bl=this._bl+y|0,this._cl=this._cl+m|0,this._dl=this._dl+g|0,this._el=this._el+b|0,this._fl=this._fl+v|0,this._gl=this._gl+w|0,this._hl=this._hl+S|0,this._ah=this._ah+r+f(this._al,h)|0,this._bh=this._bh+n+f(this._bl,y)|0,this._ch=this._ch+o+f(this._cl,m)|0,this._dh=this._dh+i+f(this._dl,g)|0,this._eh=this._eh+s+f(this._el,b)|0,this._fh=this._fh+c+f(this._fl,v)|0,this._gh=this._gh+p+f(this._gl,w)|0,this._hh=this._hh+d+f(this._hl,S)|0},c.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=c},3003:e=>{"use strict";e.exports=function(e){return e!=e}},3093:(e,t,r)=>{"use strict";var n=r(4459);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},3126:(e,t,r)=>{"use strict";
2var n=r(6743),o=r(9675),i=r(76),a=r(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(n,i,e)}},3144:(e,t,r)=>{"use strict";var n=r(6743),o=r(1002),i=r(76);e.exports=r(7119)||n.call(i,o)},3628:(e,t,r)=>{"use strict";var n=r(8648),o=r(1064),i=r(7176);e.exports=n?function(e){return n(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},3737:(e,t,r)=>{"use strict";var n=r(6698),o=r(392),i=r(2861).Buffer,a=[0x5a827999,0x6ed9eba1,-0x70e44324,-0x359d3e2a],s=Array(80);function c(){this.init(),this._w=s,o.call(this,64,56)}n(c,o),c.prototype.init=function(){return this._a=0x67452301,this._b=0xefcdab89,this._c=0x98badcfe,this._d=0x10325476,this._e=0xc3d2e1f0,this},c.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,o=0|this._c,i=0|this._d,s=0|this._e,c=0;c<16;++c)t[c]=e.readInt32BE(4*c);for(;c<80;++c)t[c]=(l=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|l>>>31;for(var u=0;u<80;++u){var l,f,p,d,h,y,m=~~(u/20),g=((f=r)<<5|f>>>27)+(p=n,d=o,h=i,0===m?p&d|~p&h:2===m?p&d|p&h|d&h:p^d^h)+s+t[u]+a[m]|0;s=i,i=o,o=(y=n)<<30|y>>>2,n=r,r=g}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=i+this._d|0,this._e=s+this._e|0},c.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=c},3740:function(e,t,r){var n=r(6763);e.exports=(()=>{var e={616:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(287);n.hp.alloc(1).subarray(0,1)instanceof n.hp||(n.hp.prototype.subarray=function(e,t){let r=Uint8Array.prototype.subarray.call(this,e,t);return Object.setPrototypeOf(r,n.hp.prototype),r});let o=n.hp},281:(e,t,r)=>{e.exports=r(164)},164:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Array:()=>M,Bool:()=>B,Double:()=>O,Enum:()=>q,Float:()=>k,Hyper:()=>x,Int:()=>w,LargeInt:()=>E,Opaque:()=>R,Option:()=>L,Quadruple:()=>P,Reference:()=>V,String:()=>I,Struct:()=>$,Union:()=>z,UnsignedHyper:()=>T,UnsignedInt:()=>A,VarArray:()=>D,VarOpaque:()=>N,Void:()=>F,XdrReader:()=>c,XdrWriter:()=>l,config:()=>Z});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(616).A;class c{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){let t=this._index;if(this._index+=e,this._length<this._index)throw new o("attempt to read outside the boundary of the buffer");let 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){let 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 u=r(616).A;class l{constructor(e){"number"==typeof e?e=u.allocUnsafe(e):e instanceof u||(e=u.allocUnsafe(8192)),this._buffer=e,this._length=e.length}_buffer;_length;_index=0;alloc(e){let t=this._index;return this._index+=e,this._length<this._index&&this.resize(this._index),t}resize(e){let t=8192*Math.ceil(e/8192),r=u.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){let r=this.alloc(t);this._buffer.write(e,r,"utf8")}else{e instanceof u||(e=u.from(e));let r=this.alloc(t);e.copy(this._buffer,r,0,t)}let r=4-(t%4||4);if(r>0){let e=this.alloc(r);this._buffer.fill(0,e,this._index)}}writeInt32BE(e){let t=this.alloc(4);this._buffer.writeInt32BE(e,t)}writeUInt32BE(e){let t=this.alloc(4);this._buffer.writeUInt32BE(e,t)}writeBigInt64BE(e){let t=this.alloc(8);this._buffer.writeBigInt64BE(e,t)}writeBigUInt64BE(e){let t=this.alloc(8);this._buffer.writeBigUInt64BE(e,t)}writeFloatBE(e){let t=this.alloc(4);this._buffer.writeFloatBE(e,t)}writeDoubleBE(e){let t=this.alloc(8);this._buffer.writeDoubleBE(e,t)}static bufferChunkSize=8192}var f=r(616).A;class p{toXDR(e="raw"){if(!this.write)return this.constructor.toXDR(this,e);let t=new l;return this.write(this,t),m(t.finalize(),e)}fromXDR(e,t="raw"){if(!this.read)return this.constructor.fromXDR(e,t);let r=new c(g(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"){let r=new l;return this.write(e,r),m(r.finalize(),t)}static fromXDR(e,t="raw"){let r=new c(g(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 d extends p{static read(e){throw new a}static write(e,t){throw new a}static isValid(e){return!1}}class h extends p{isValid(e){return!1}}class y extends TypeError{constructor(e){super(`Invalid format ${e}, must be one of "raw", "hex", "base64"`)}}function m(e,t){switch(t){case"raw":return e;case"hex":return e.toString("hex");case"base64":return e.toString("base64");default:throw new y(t)}}function g(e,t){switch(t){case"raw":return e;case"hex":return f.from(e,"hex");case"base64":return f.from(e,"base64");default:throw new y(t)}}function b(e,t){return null!=e&&(e instanceof t||v(e,t)&&"function"==typeof e.constructor.read&&"function"==typeof e.constructor.write&&v(e,"XdrType"))}function v(e,t){do if(e.constructor.name===t)return!0;while(e=Object.getPrototypeOf(e))return!1}class w extends d{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>=-0x80000000&&e<=0x7fffffff}}function S(e,t,r){if("bigint"!=typeof e)throw TypeError("Expected bigint 'value', got "+typeof e);let n=t/r;if(1===n)return[e];if(r<32||r>128||2!==n&&4!==n&&8!==n)throw TypeError(`invalid bigint (${e}) and slice size (${t} -> ${r}
2) combination`);let o=BigInt(r),i=Array(n);for(let t=0;t<n;t++)i[t]=BigInt.asIntN(r,e),e>>=o;return i}function _(e,t){if(t)return[0n,(1n<<BigInt(e))-1n];let r=1n<<BigInt(e-1);return[0n-r,r-1n]}w.MAX_VALUE=0x7fffffff,w.MIN_VALUE=0x80000000;class E extends d{constructor(e){super(),this._value=function(e,t,r){e instanceof Array?e.length&&e[0]instanceof Array&&(e=e[0]):e=[e];let n=t/e.length;switch(n){case 32:case 64:case 128:case 256:break;default:throw 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 TypeError(`expected bigint-like values, got: ${e} (${t})`)}if(r&&1===e.length&&e[0]<0n)throw 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));let[i,a]=_(t,r);if(o>=i&&o<=a)return o;throw TypeError(`bigint values [${e}] for ${r?"u":"i"}${t} 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){let{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}`);let{unsigned:r,size:o}=this.prototype;if(64===o)r?t.writeBigUInt64BE(e):t.writeBigInt64BE(e);else for(let 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(){let[e,t]=_(this.prototype.size,this.prototype.unsigned);this.MIN_VALUE=e,this.MAX_VALUE=t}}class x extends E{constructor(...e){super(e)}get low(){return 0|Number(4294967295n&this._value)}get high(){return 0|Number(this._value>>32n)}get size(){return 64}get unsigned(){return!1}static fromBits(e,t){return new this(e,t)}}x.defineIntBoundaries();class A extends d{static read(e){return e.readUInt32BE()}static write(e,t){if("number"!=typeof e||!(e>=0&&e<=0xffffffff)||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<=0xffffffff}}A.MAX_VALUE=0xffffffff,A.MIN_VALUE=0;class T extends E{constructor(...e){super(e)}get low(){return 0|Number(4294967295n&this._value)}get high(){return 0|Number(this._value>>32n)}get size(){return 64}get unsigned(){return!0}static fromBits(e,t){return new this(e,t)}}T.defineIntBoundaries();class k extends d{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 O extends d{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 P extends d{static read(){throw new i("quadruple not supported")}static write(){throw new i("quadruple not supported")}static isValid(){return!1}}class B extends d{static read(e){let 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){w.write(+!!e,t)}static isValid(e){return"boolean"==typeof e}}var j=r(616).A;class I extends h{constructor(e=A.MAX_VALUE){super(),this._maxLength=e}read(e){let t=A.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){let r="string"==typeof e?j.byteLength(e,"utf8"):e.length;if(r>this._maxLength)throw new n(`got ${e.length} bytes, max allowed is ${this._maxLength}`);A.write(r,t),t.write(e,r)}isValid(e){return"string"==typeof e?j.byteLength(e,"utf8")<=this._maxLength:!!(e instanceof Array||j.isBuffer(e))&&e.length<=this._maxLength}}var C=r(616).A;class R extends h{constructor(e){super(),this._length=e}read(e){return e.read(this._length)}write(e,t){let{length:r}=e;if(r!==this._length)throw new n(`got ${e.length} bytes, expected ${this._length}`);t.write(e,r)}isValid(e){return C.isBuffer(e)&&e.length===this._length}}var U=r(616).A;class N extends h{constructor(e=A.MAX_VALUE){super(),this._maxLength=e}read(e){let t=A.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){let{length:r}=e;if(e.length>this._maxLength)throw new n(`got ${e.length} bytes, max allowed is ${this._maxLength}`);A.write(r,t),t.write(e,r)}isValid(e){return U.isBuffer(e)&&e.length<=this._maxLength}}class M extends h{constructor(e,t){super(),this._childType=e,this._length=t}read(e){let 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(!r.g.Array.isArray(e))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(let r of e)this._childType.write(r,t)}isValid(e){if(!(e instanceof r.g.Array)||e.length!==this._length)return!1;for(let t of e)if(!this._childType.isValid(t))return!1;return!0}}class D extends h{constructor(e,t=A.MAX_VALUE){super(),this._childType=e,this._maxLength=t}read(e){let t=A.read(e);if(t>this._maxLength)throw new o(`saw ${t} length VarArray, max allowed is ${this._maxLength}`);let r=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}`);for(let r of(A.write(e.length,t),e))this._childType.write(r,t)}isValid(e){if(!(e instanceof Array)||e.length>this._maxLength)return!1;for(let t of e)if(!this._childType.isValid(t))return!1;return!0}}class L extends d{constructor(e){super(),this._childType=e}read(e){if(B.read(e))return this._childType.read(e)}write(e,t){let r=null!=e;B.write(r,t),r&&this._childType.write(e,t)}isValid(e){return null==e||this._childType.isValid(e)}}class F extends d{static read(){}
2static 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 d{constructor(e,t){super(),this.name=e,this.value=t}static read(e){let 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(!this.isValid(e))throw new n(`${e} has enum name ${e?.enumName}, not ${this.enumName}: ${JSON.stringify(e)}`);w.write(e.value,t)}static isValid(e){return e?.constructor?.enumName===this.enumName||b(e,this)}static members(){return this._members}static values(){return Object.values(this._members)}static fromName(e){let t=this._members[e];if(!t)throw TypeError(`${e} is not a member of ${this.enumName}`);return t}static fromValue(e){let t=this._byValue[e];if(void 0===t)throw TypeError(`${e} is not a value of any member of ${this.enumName}`);return t}static create(e,t,r){let n=class extends q{};for(let[o,i]of(n.enumName=t,e.results[t]=n,n._members={},n._byValue={},Object.entries(r))){let e=new n(o,i);n._members[o]=e,n._byValue[i]=e,n[o]=()=>e}return n}}class V extends d{resolve(){throw new i('"resolve" method should be implemented in the descendant class')}}class $ extends h{constructor(e){super(),this._attributes=e||{}}static read(e){let t={};for(let[r,n]of this._fields)t[r]=n.read(e);return new this(t)}static write(e,t){if(!this.isValid(e))throw new n(`${e} has struct name ${e?.constructor?.structName}, not ${this.structName}: ${JSON.stringify(e)}`);for(let[r,n]of this._fields){let o=e._attributes[r];n.write(o,t)}}static isValid(e){return e?.constructor?.structName===this.structName||b(e,this)}static create(e,t,r){let n=class extends ${};n.structName=t,e.results[t]=n;let o=Array(r.length);for(let t=0;t<r.length;t++){let i=r[t],a=i[0],s=i[1];s instanceof V&&(s=s.resolve(e)),o[t]=[a,s],n.prototype[a]=function(e){return function(t){return void 0!==t&&(this._attributes[e]=t),this._attributes[e]}}(a)}return n._fields=o,n}}class z extends h{constructor(e,t){super(),this.set(e,t)}set(e,t){"string"==typeof e&&(e=this.constructor._switchOn.fromName(e)),this._switch=e;let r=this.constructor.armForSwitch(this._switch);this._arm=r,this._armType=r===F?F:this.constructor._arms[r],this._value=t}get(e=this._arm){if(this._arm!==F&&this._arm!==e)throw 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){let t=this._switches.get(e);if(void 0!==t)return t;if(this._defaultArm)return this._defaultArm;throw TypeError(`Bad union switch: ${e}`)}static armTypeForArm(e){return e===F?F:this._arms[e]}static read(e){let t=this._switchOn.read(e),r=this.armForSwitch(t),n=r===F?F:this._arms[r];return new this(t,void 0!==n?n.read(e):r.read(e))}static write(e,t){if(!this.isValid(e))throw new n(`${e} has union name ${e?.unionName}, not ${this.unionName}: ${JSON.stringify(e)}`);this._switchOn.write(e.switch(),t),e.armType().write(e.value(),t)}static isValid(e){return e?.constructor?.unionName===this.unionName||b(e,this)}static create(e,t,r){let n=class extends z{};n.unionName=t,e.results[t]=n,r.switchOn instanceof V?n._switchOn=r.switchOn.resolve(e):n._switchOn=r.switchOn,n._switches=new Map,n._arms={};let o=r.defaultArm;for(let[t,i]of(o instanceof V&&(o=o.resolve(e)),n._defaultArm=o,r.switches)){let e="string"==typeof t?n._switchOn.fromName(t):t;n._switches.set(e,i)}if(void 0!==n._switchOn.values)for(let 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(let[t,o]of Object.entries(r.arms))n._arms[t]=o instanceof V?o.resolve(e):o,o!==F&&(n.prototype[t]=function(){return this.get(t)});return n}}class H extends V{constructor(e){super(),this.name=e}resolve(e){return e.definitions[this.name].resolve(e)}}class G extends V{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 V&&(t=t.resolve(e)),r instanceof V&&(r=r.resolve(e)),this.variable?new D(t,r):new M(t,r)}}class K extends V{constructor(e){super(),this.childReference=e,this.name=e.name}resolve(e){let t=this.childReference;return t instanceof V&&(t=t.resolve(e)),new L(t)}}class W extends V{constructor(e,t){super(),this.sizedType=e,this.length=t}resolve(e){let t=this.length;return t instanceof V&&(t=t.resolve(e)),new this.sizedType(t)}}class X{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 Q(e,t,r){return r instanceof V&&(r=r.resolve(e)),e.results[t]=r,r}function J(e,t,r){return e.results[t]=r,r}class Y{constructor(e){this._destination=e,this._definitions={}}enum(e,t){let r=new X(q.create,e,t);this.define(e,r)}struct(e,t){let r=new X($.create,e,t);this.define(e,r)}union(e,t){let r=new X(z.create,e,t);this.define(e,r)}typedef(e,t){let r=new X(Q,e,t);this.define(e,r)}const(e,t){let r=new X(J,e,t);this.define(e,r)}void(){return F}bool(){return B}int(){return w}hyper(){return x}uint(){return A}uhyper(){return T}float(){return k}double(){return O}quadruple(){return P}string(e){return new W(I,e)}opaque(e){return new W(R,e)}varOpaque(e){return new W(N,e)}array(e,t){return new G(e,t)}varArray(e,t){return new G(e,t,!0)}option(e){return new K(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 H(e)}resolve(){for(let e of Object.values(this._definitions))e.resolve({definitions:this._definitions,results:this._destination})}}function Z(e,t={}){if(e){let r=new Y(t);e(r),r.resolve()}return t}},526:(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],c=i[1],u=new o(3*(a+c)/4-c),l=0,f=c>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)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>
24,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(function(e,t,n){for(var o,i=[],a=t;a<n;a+=3)i.push(r[(o=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]))>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(e,a,a+16383>s?s:a+16383));return 1===o?i.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===o&&i.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],n=[],o="u">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 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]}n[45]=62,n[95]=63},287:(e,t,r)=>{"use strict";let o=r(526),i=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let 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 TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e){var n=t;if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw TypeError("Unknown encoding: "+n);let r=0|y(e,n),o=s(r),i=o.write(e,n);return i!==r&&(o=o.slice(0,i)),o}if(ArrayBuffer.isView(e)){if(L(e,Uint8Array)){let t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return p(e)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(L(e,SharedArrayBuffer)||e&&L(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return c.from(o,t,r);let i=function(e){var t;if(c.isBuffer(e)){let t=0|h(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?s(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),s(e<0?0:0|h(e))}function p(e){let t=e.length<0?0:0|h(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){let n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),c.prototype),n}function h(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let 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 N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return M(e).length;default:if(o)return n?-1:N(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let 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+=F[e[n]];return o}(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return function(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}(this,t,r);case"latin1":case"binary":return 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}(this,t,r);case"base64":var i,a,s;return i=this,a=t,s=r,0===a&&s===i.length?o.fromByteArray(i):o.fromByteArray(i.slice(a,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let n=e.slice(t,r),o="";for(let e=0;e<n.length-1;
2e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){var i;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(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:v(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):v(e,[t],r,n,o);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,o){let i,a=1,s=e.length,c=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,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(u(e,i)===u(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===c)return n*a}else -1!==n&&(i-=i-n),n=-1}else for(r+c>s&&(r=s-c),i=r;i>=0;i--){let r=!0;for(let n=0;n<c;n++)if(u(e,i+n)!==u(t,n)){r=!1;break}if(r)return i}return -1}function w(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o<r;){let t=e[o],i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:128==(192&(r=e[o+1]))&&(c=(31&t)<<6|63&r)>127&&(i=c);break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n)>2047&&(c<55296||c>57343)&&(i=c);break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&c<1114112&&(i=c)}}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}let i=n.length;if(i<=S)return String.fromCharCode.apply(String,n);let a="",s=0;for(;s<i;)a+=String.fromCharCode.apply(String,n.slice(s,s+=S));return a}t.hp=c,t.IS=50,c.TYPED_ARRAY_SUPPORT=function(){try{let 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 u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},c.allocUnsafe=function(e){return f(e)},c.allocUnsafeSlow=function(e){return f(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(L(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),L(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw 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)},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){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;let n=c.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){let t=e[r];if(L(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 TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?w(this,0,e):m.apply(this,arguments)}
vendor: 11,857 bytes, line 2
2,c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="",r=t.IS;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(L(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw 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 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),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)},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){var o,i,a,s,c,u,l,f;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 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)}let p=this.length-t;if((void 0===r||r>p)&&(r=p),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let d=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let o;r=Number(r)||0;let i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;let a=t.length;for(n>a/2&&(n=a/2),o=0;o<n;++o){var s;let n=parseInt(t.substr(2*o,2),16);if((s=n)!=s)break;e[r+o]=n}return o}(this,e,t,r);case"utf8":case"utf-8":return o=t,i=r,D(N(e,this.length-o),this,o,i);case"ascii":case"latin1":case"binary":return a=t,s=r,D(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,a,s);case"base64":return c=t,u=r,D(M(e),this,c,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=t,f=r,D(function(e,t){let r,n,o=[];for(let i=0;i<e.length&&!((t-=2)<0);++i)n=(r=e.charCodeAt(i))>>8,o.push(r%256),o.push(n);return o}(e,this.length-l),this,l,f);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let S=4096;function _(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function E(e,t,r,n,o,i){if(!c.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function x(e,t,r,n,o){I(t,n,o,e,r,7);let i=Number(t&BigInt(0xffffffff));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(0xffffffff));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function A(e,t,r,n,o){I(t,n,o,e,r,7);let i=Number(t&BigInt(0xffffffff));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(0xffffffff));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 T(e,t,r,n,o,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function k(e,t,r,n,o){return t*=1,r>>>=0,o||T(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function O(e,t,r,n,o){return t*=1,r>>>=0,o||T(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){let 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);let 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||_(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||_(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||_(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||_(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=q(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];void 0!==t&&void 0!==r||R(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],o=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(n)+(BigInt(o)<<BigInt(32))}),c.prototype.readBigUInt64BE=q(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];void 0!==t&&void 0!==r||R(e,this.length-8);let n=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],o=0x1000000*this[++e]+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||_(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||_(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||_(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||_(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||_(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||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=q(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];return void 0!==t&&void 0!==r||R(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+0x1000000*this[++e])}),c.prototype.readBigInt64BE=q(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];return void 0!==t&&void 0!==r||R(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||_(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||_(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||_(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||_(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e*=1,t>>>=0,r>>>=0,n||E(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*=1,t>>>=0,r>>>=0,n||E(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*=1,t>>>=0,r||E(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||E(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*=1,t>>>=0,r||E(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*=1,t>>>=0,r||E(this,e,t,4,0xffffffff,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*=1,t>>>=0,r||E(this,e,t,4,0xffffffff,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 x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=q(function(e,t=0){return A(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);E(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*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);E(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*=1,t>>>=0,r||E(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*=1,t>>>=0,r||E(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*=1,t>>>=0,r||E(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*=1,t>>>=0,r||E(this,e,t,4,0x7fffffff,-0x80000000),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*=1,t>>>=0,r||E(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+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 x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=q(function(e,t=0){return A(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return O(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw 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||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);let 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){let o;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 TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){let 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 RangeError("Out of range index");if(r<=t)return this;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{let i=c.isBuffer(e)?e:c.from(e,n),a=i.length;
2if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};let P={};function B(e,t,r){P[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 j(e){let t="",r=e.length,n=+("-"===e[0]);for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function I(e,t,r,n,o,i){if(e>r||e<t){let n,o="bigint"==typeof t?"n":"";throw n=i>3?0===t||t===BigInt(0)?`>= 0${o} and < 2${o} ** ${8*(i+1)}${o}`:`>= -(2${o} ** ${8*(i+1)-1}${o}) and < 2 ** ${8*(i+1)-1}${o}`:`>= ${t}${o} and <= ${r}${o}`,new P.ERR_OUT_OF_RANGE("value",n,e)}C(o,"offset"),void 0!==n[o]&&void 0!==n[o+i]||R(o,n.length-(i+1))}function C(e,t){if("number"!=typeof e)throw new P.ERR_INVALID_ARG_TYPE(t,"number",e)}function R(e,t,r){if(Math.floor(e)!==e)throw C(e,r),new P.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new P.ERR_BUFFER_OUT_OF_BOUNDS;throw new P.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),B("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),B("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)>0x100000000?o=j(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=j(o)),o+="n"),n+=` It must be ${t}. Received ${o}`},RangeError);let U=/[^+/0-9A-Za-z-_]/g;function N(e,t){let r;t=t||1/0;let n=e.length,o=null,i=[];for(let a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319||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 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 M(e){return o.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(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 L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let F=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function q(e){return"u"<typeof BigInt?V:e}function V(){throw Error("BigInt not supported")}},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,c=(1<<s)-1,u=c>>1,l=-7,f=r?o-1:0,p=r?-1:1,d=e[t+f];for(f+=p,i=d&(1<<-l)-1,d>>=-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-u;else{if(i===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=u}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,p=5960464477539062e-23*(23===o),d=n?0:i-1,h=n?1:-1,y=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[r+d]=255&a,d+=h,a/=256,u-=8);e[r+d-h]|=128*y}}},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||Function("return this")()}catch(e){if("object"==typeof window)return window}
2}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(281)})()},3918:(e,t,r)=>{"use strict";var n=r(5606);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){var n,o,i;n=e,o=t,i=r[t],(o=a(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):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){var t=function(e){if("object"!==h(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==h(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===h(t)?t:String(t)}function s(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return c(e)}function c(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw 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,r)}function r(){return l(e,arguments,d(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),p(r,e)})(e)}function l(e,t,r){return(l=f()?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&&p(o,r.prototype),o}).apply(null,arguments)}function f(){if("u"<typeof Reflect||!Reflect.construct||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 p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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})(e)}var y=r(537).inspect,m=r(9597).codes.ERR_INVALID_ARG_TYPE;function g(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var b="",v="",w="",S="",_={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 E(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 x(e){return y(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}
2e.exports=function(e,t){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");l.prototype=Object.create(e&&e.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),e&&p(l,e);var r,o,u=(r=f(),function(){var e,t=d(l);return e=r?Reflect.construct(t,arguments,d(this).constructor):t.apply(this,arguments),s(this,e)});function l(e){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,l),"object"!==h(e)||null===e)throw new m("options","Object",e);var t,r=e.message,o=e.operator,i=e.stackStartFn,a=e.actual,f=e.expected,p=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=u.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(b="\x1b[34m",v="\x1b[32m",S="\x1b[39m",w="\x1b[31m"):(b="",v="",S="",w="")),"object"===h(a)&&null!==a&&"object"===h(f)&&null!==f&&"stack"in a&&a instanceof Error&&"stack"in f&&f instanceof Error&&(a=E(a),f=E(f)),"deepStrictEqual"===o||"strictEqual"===o)t=u.call(this,function(e,t,r){var o="",i="",a=0,s="",c=!1,u=x(e),l=u.split("\n"),f=x(t).split("\n"),p=0,d="";if("strictEqual"===r&&"object"===h(e)&&"object"===h(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"!==h(e)||null===e)&&("object"!==h(t)||null===t)&&(0!==e||0!==t))return"".concat(_[r],"\n\n")+"".concat(l[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r&&y<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;l[0][p]===f[0][p];)p++;p>2&&(d="\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 m=l[l.length-1],E=f[f.length-1];m===E&&(p++<2?s="\n  ".concat(m).concat(s):o=m,l.pop(),f.pop(),0!==l.length&&0!==f.length);)m=l[l.length-1],E=f[f.length-1];var A=Math.max(l.length,f.length);if(0===A){var T=u.split("\n");if(T.length>30)for(T[26]="".concat(b,"...").concat(S);T.length>27;)T.pop();return"".concat(_.notIdentical,"\n\n").concat(T.join("\n"),"\n")}p>3&&(s="\n".concat(b,"...").concat(S).concat(s),c=!0),""!==o&&(s="\n  ".concat(o).concat(s),o="");var k=0,O=_[r]+"\n".concat(v,"+ actual").concat(S," ").concat(w,"- expected").concat(S),P=" ".concat(b,"...").concat(S," Lines skipped");for(p=0;p<A;p++){var B=p-a;if(l.length<p+1)B>1&&p>2&&(B>4?(i+="\n".concat(b,"...").concat(S),c=!0):B>3&&(i+="\n  ".concat(f[p-2]),k++),i+="\n  ".concat(f[p-1]),k++),a=p,o+="\n".concat(w,"-").concat(S," ").concat(f[p]),k++;else if(f.length<p+1)B>1&&p>2&&(B>4?(i+="\n".concat(b,"...").concat(S),c=!0):B>3&&(i+="\n  ".concat(l[p-2]),k++),i+="\n  ".concat(l[p-1]),k++),a=p,i+="\n".concat(v,"+").concat(S," ").concat(l[p]),k++;else{var j=f[p],I=l[p],C=I!==j&&(!g(I,",")||I.slice(0,-1)!==j);C&&g(j,",")&&j.slice(0,-1)===I&&(C=!1,I+=","),C?(B>1&&p>2&&(B>4?(i+="\n".concat(b,"...").concat(S),c=!0):B>3&&(i+="\n  ".concat(l[p-2]),k++),i+="\n  ".concat(l[p-1]),k++),a=p,i+="\n".concat(v,"+").concat(S," ").concat(I),o+="\n".concat(w,"-").concat(S," ").concat(j),k+=2):(i+=o,o="",1!==B&&0!==p||(i+="\n  ".concat(I),k++))}if(k>20&&p<A-2)return"".concat(O).concat(P,"\n").concat(i,"\n").concat(b,"...").concat(S).concat(o,"\n")+"".concat(b,"...").concat(S)}return"".concat(O).concat(c?P:"","\n").concat(i).concat(o).concat(s).concat(d)}(a,f,o));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var d=_[o],y=x(a).split("\n");if("notStrictEqual"===o&&"object"===h(a)&&null!==a&&(d=_.notStrictEqualObject),y.length>30)for(y[26]="".concat(b,"...").concat(S);y.length>27;)y.pop();t=1===y.length?u.call(this,"".concat(d," ").concat(y[0])):u.call(this,"".concat(d,"\n\n").concat(y.join("\n"),"\n"))}else{var A=x(a),T="",k=_[o];"notDeepEqual"===o||"notEqual"===o?(A="".concat(_[o],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(T="".concat(x(f)),A.length>512&&(A="".concat(A.slice(0,509),"...")),T.length>512&&(T="".concat(T.slice(0,509),"...")),"deepEqual"===o||"equal"===o?A="".concat(k,"\n\n").concat(A,"\n\nshould equal\n\n"):T=" ".concat(o," ").concat(T)),t=u.call(this,"".concat(A).
2concat(T))}return Error.stackTraceLimit=p,t.generatedMessage=!r,Object.defineProperty(c(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=a,t.expected=f,t.operator=o,Error.captureStackTrace&&Error.captureStackTrace(c(t),i),t.stack,t.name="AssertionError",s(t)}return o=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return y(this,i(i({},t),{},{customInspect:!1,depth:0}))}}],function(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,a(n.key),n)}}(l.prototype,o),Object.defineProperty(l,"prototype",{writable:!1}),l}(u(Error),y.custom)},4035:(e,t,r)=>{"use strict";var n,o=r(6556),i=r(9092)(),a=r(9957),s=r(5795);if(i){var c=o("RegExp.prototype.exec"),u={},l=function(){throw u},f={toString:l,valueOf:l};"symbol"==typeof Symbol.toPrimitive&&(f[Symbol.toPrimitive]=l),n=function(e){if(!e||"object"!=typeof e)return!1;var t=s(e,"lastIndex");if(!t||!a(t,"value"))return!1;try{c(e,f)}catch(e){return e===u}}}else{var p=o("Object.prototype.toString");n=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===p(e)}}e.exports=n},4039:(e,t,r)=>{"use strict";var n="u">typeof Symbol&&Symbol,o=r(1333);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},4107:(e,t,r)=>{"use strict";var n=r(6698),o=r(392),i=r(2861).Buffer,a=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],s=Array(64);function c(){this.init(),this._w=s,o.call(this,64,56)}n(c,o),c.prototype.init=function(){return this._a=0x6a09e667,this._b=0xbb67ae85,this._c=0x3c6ef372,this._d=0xa54ff53a,this._e=0x510e527f,this._f=0x9b05688c,this._g=0x1f83d9ab,this._h=0x5be0cd19,this},c.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,o=0|this._c,i=0|this._d,s=0|this._e,c=0|this._f,u=0|this._g,l=0|this._h,f=0;f<16;++f)t[f]=e.readInt32BE(4*f);for(;f<64;++f)t[f]=(((d=t[f-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10)+t[f-7]+(((h=t[f-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3)+t[f-16]|0;for(var p=0;p<64;++p){var d,h,y,m,g,b,v,w,S,_=l+(((y=s)>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(m=s,g=c,(b=u)^m&(g^b))+a[p]+t[p]|0,E=(((v=r)>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+((w=r)&(S=n)|o&(w|S))|0;l=u,u=c,c=s,s=i+_|0,i=o,o=n,n=r,r=_+E|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=i+this._d|0,this._e=s+this._e|0,this._f=c+this._f|0,this._g=u+this._g|0,this._h=l+this._h|0},c.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=c},4133:(e,t,r)=>{"use strict";var n=r(487),o=r(8452),i=r(3003),a=r(6642),s=r(2464),c=n(a(),Number);o(c,{getPolyfill:a,implementation:i,shim:s}),e.exports=c},4148:(e,t,r)=>{"use strict";var n,o=r(5606),i=r(6763);function a(e){return(a="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)}var s,c,u=r(9597).codes,l=u.ERR_AMBIGUOUS_ARGUMENT,f=u.ERR_INVALID_ARG_TYPE,p=u.ERR_INVALID_ARG_VALUE,d=u.ERR_INVALID_RETURN_VALUE,h=u.ERR_MISSING_ARGS,y=r(3918),m=r(537).inspect,g=r(537).types,b=g.isPromise,v=g.isRegExp,w=r(9133)(),S=r(9394)(),_=r(8075)("RegExp.prototype.test");function E(){var e=r(2299);s=e.isDeepEqual,c=e.isDeepStrictEqual}
2var x=!1,A=e.exports=P,T={};function k(e){if(e.message instanceof Error)throw e.message;throw new y(e)}function O(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 y({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw i.generatedMessage=o,i}}function P(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];O.apply(void 0,[P,t.length].concat(t))}A.fail=function e(t,r,n,a,s){var c,u=arguments.length;if(0===u?c="Failed":1===u?(n=t,t=void 0):(!1===x&&(x=!0,(o.emitWarning?o.emitWarning:i.warn.bind(i))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===u&&(a="!=")),n instanceof Error)throw n;var l={actual:t,expected:r,operator:void 0===a?"fail":a,stackStartFn:s||e};void 0!==n&&(l.message=n);var f=new y(l);throw c&&(f.message=c,f.generatedMessage=!0),f},A.AssertionError=y,A.ok=P,A.equal=function e(t,r,n){if(arguments.length<2)throw new h("actual","expected");t!=r&&k({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},A.notEqual=function e(t,r,n){if(arguments.length<2)throw new h("actual","expected");t==r&&k({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},A.deepEqual=function e(t,r,n){if(arguments.length<2)throw new h("actual","expected");void 0===s&&E(),s(t,r)||k({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},A.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new h("actual","expected");void 0===s&&E(),s(t,r)&&k({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},A.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new h("actual","expected");void 0===s&&E(),c(t,r)||k({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},A.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new h("actual","expected");void 0===s&&E(),c(t,r)&&k({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},A.strictEqual=function e(t,r,n){if(arguments.length<2)throw new h("actual","expected");S(t,r)||k({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},A.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new h("actual","expected");S(t,r)&&k({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var B=(Object.defineProperty(n=function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),r.forEach(function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&v(t[e])&&_(t[e],n[e])?o[e]=n[e]:o[e]=t[e])})},"prototype",{writable:!1}),n);function j(e,t,r,n){if("function"!=typeof t){if(v(t))return _(t,e);if(2==arguments.length)throw new f("expected",["Function","RegExp"],t);if("object"!==a(e)||null===e){var o=new y({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw o.operator=n.name,o}var i=Object.keys(t);if(t instanceof Error)i.push("name","message");else if(0===i.length)throw new p("error",t,"may not be an empty object");return void 0===s&&E(),i.forEach(function(o){"string"==typeof e[o]&&v(t[o])&&_(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 y({actual:new B(e,o),expected:new B(t,o,e),operator:"deepStrictEqual",stackStartFn:i});throw a.actual=e,a.expected=t,a.operator=i.name,a}k({actual:e,expected:t,message:n,operator:i.name,stackStartFn:i})}}(e,t,o,r,i,n)}),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function I(e){if("function"!=typeof e)throw new f("fn","Function",e);try{e()}catch(e){return e}return T}function C(e){return b(e)||null!==e&&"object"===a(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function R(e){return Promise.resolve().then(function(){var t;if("function"==typeof e){if(!C(t=e()))throw new d("instance of Promise","promiseFn",t)}else{if(!C(e))throw new f("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then(function(){return t}).then(function(){return T}).catch(function(e){return e})})}function U(e,t,r,n){if("string"==typeof r){if(4==arguments.length)throw new f("error",["Object","Error","Function","RegExp"],r);if("object"===a(t)&&null!==t){if(t.message===r)throw new l("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new l("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==a(r)&&"function"!=typeof r)throw new f("error",["Object","Error","Function","RegExp"],r);if(t===T){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var i="rejects"===e.name?"rejection":"exception";
2k({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(i).concat(o),stackStartFn:e})}if(r&&!j(t,r,n,e))throw t}function N(e,t,r,n){if(t!==T){if("string"==typeof r&&(n=r,r=void 0),!r||j(t,r)){var o=n?": ".concat(n):".",i="doesNotReject"===e.name?"rejection":"exception";k({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(!v(t))throw new f("regexp","RegExp",t);var i="match"===o;if("string"!=typeof e||_(t,e)!==i){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(a(e)," (").concat(m(e),")"):(i?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(m(t),". Input:\n\n").concat(m(e),"\n"));var c=new y({actual:e,expected:t,message:r,operator:o,stackStartFn:n});throw c.generatedMessage=s,c}}function D(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];O.apply(void 0,[D,t.length].concat(t))}A.throws=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];U.apply(void 0,[e,I(t)].concat(n))},A.rejects=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return R(t).then(function(t){return U.apply(void 0,[e,t].concat(n))})},A.doesNotThrow=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];N.apply(void 0,[e,I(t)].concat(n))},A.doesNotReject=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return R(t).then(function(t){return N.apply(void 0,[e,t].concat(n))})},A.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===a(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=m(t);var n=new y({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var i=o.split("\n");i.shift();for(var s=n.stack.split("\n"),c=0;c<i.length;c++){var u=s.indexOf(i[c]);if(-1!==u){s=s.slice(0,u);break}}n.stack="".concat(s.join("\n"),"\n").concat(i.join("\n"))}throw n}},A.match=function e(t,r,n){M(t,r,n,e,"match")},A.doesNotMatch=function e(t,r,n){M(t,r,n,e,"doesNotMatch")},A.strict=w(D,A,{equal:A.strictEqual,deepEqual:A.deepStrictEqual,notEqual:A.notStrictEqual,notDeepEqual:A.notDeepStrictEqual}),A.strict.strict=A.strict},4372:(e,t,r)=>{"use strict";var n=r(9675),o=r(6556)("TypedArray.prototype.buffer",!0),i=r(5680);e.exports=o||function(e){if(!i(e))throw new n("Not a Typed Array");return e.buffer}},4459:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},4634:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},5345:e=>{"use strict";e.exports=URIError},5360:(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 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 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},5377:(e,t,r)=>{"use strict";var n=r(2861).Buffer,o=r(4634),i=r(4372),a=ArrayBuffer.isView||function(e){try{return i(e),!0}catch(e){return!1}},s="u">typeof Uint8Array,c="u">typeof ArrayBuffer&&"u">typeof Uint8Array,u=c&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);e.exports=function(e,t){if(e instanceof n)return e;if("string"==typeof e)return n.from(e,t);if(c&&a(e)){if(0===e.byteLength)return n.alloc(0);if(u){var r=n.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}var i=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),l=n.from(i);if(l.length===e.byteLength)return l}if(s&&e instanceof Uint8Array)return n.from(e);var f=o(e);if(f)for(var p=0;p<e.length;p+=1){var d=e[p];if("number"!=typeof d||d<0||d>255||~~d!==d)throw RangeError("Array items must be numbers in the range 0-255.")}if(f||n.isBuffer(e)&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))return n.from(e);throw TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},5606:e=>{var t,r,n=e.exports={};function o(){throw Error("setTimeout has not been defined")}function i(){throw 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)}}}try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}var s,c=[],u=!1,l=-1;function f(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&p())}function p(){if(!u){var e=a(f);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function h(){}n.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new d(e,t)),1!==c.length||u||a(p)},d.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=h,n.addListener=h,n.once=h,n.off=h,n.removeListener=h,n.removeAllListeners=h,n.emit=h,n.prependListener=h,n.prependOnceListener=h,n.listeners=function(e){return[]},n.binding=function(e){throw Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw Error("process.chdir is not supported")},n.umask=function(){return 0}},5680:(e,t,r)=>{"use strict";var n=r(5767);e.exports=function(e){return!!n(e)}},5767:(e,t,r)=>{"use strict";var n=r(2682),o=r(9209),i=r(487),a=r(6556),s=r(5795),c=r(3628),u=a("Object.prototype.toString"),l=r(9092)(),f="u"<typeof globalThis?r.g:globalThis,p=o(),d=a("String.prototype.slice"),h=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},y={__proto__:null};
2n(p,l&&s&&c?function(e){var t=new f[e];if(Symbol.toStringTag in t&&c){var r=c(t),n=s(r,Symbol.toStringTag);!n&&r&&(n=s(c(r),Symbol.toStringTag)),y["$"+e]=i(n.get)}}:function(e){var t=new f[e],r=t.slice||t.set;r&&(y["$"+e]=i(r))}),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l){var t,r,o=d(u(e),8,-1);return h(p,o)>-1?o:"Object"===o&&(r=!1,n(y,function(t,n){if(!r)try{t(e),r=d(n,1)}catch(e){}}),r)}return s?(t=!1,n(y,function(r,n){if(!t)try{"$"+r(e)===n&&(t=d(n,1))}catch(e){}}),t):null}},5795:(e,t,r)=>{"use strict";var n=r(6549);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},5880:e=>{"use strict";e.exports=Math.pow},6188:e=>{"use strict";e.exports=Math.max},6549:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},6556:(e,t,r)=>{"use strict";var n=r(453),o=r(3126),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}},6576:(e,t,r)=>{"use strict";var n=r(9394),o=r(8452);e.exports=function(){var e=n();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},6578:e=>{"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},6642:(e,t,r)=>{"use strict";var n=r(3003);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},6698: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}}},6710:(e,t,r)=>{"use strict";var n=r(6698),o=r(4107),i=r(392),a=r(2861).Buffer,s=Array(64);function c(){this.init(),this._w=s,i.call(this,64,56)}n(c,o),c.prototype.init=function(){return this._a=0xc1059ed8,this._b=0x367cd507,this._c=0x3070dd17,this._d=0xf70e5939,this._e=0xffc00b31,this._f=0x68581511,this._g=0x64f98fa7,this._h=0xbefa4fa4,this},c.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=c},6743:(e,t,r)=>{"use strict";var n=r(9353);e.exports=Function.prototype.bind||n},6763:(e,t,r)=>{var n=r(537),o=r(4148);function i(){return(new Date).getTime()}var a,s=Array.prototype.slice,c={};a=void 0!==r.g&&r.g.console?r.g.console:"u">typeof window&&window.console?window.console:{};for(var u=[[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){c[e]=i()},"time"],[function(e){var t=c[e];if(!t)throw Error("No such label: "+e);delete c[e];var r=i()-t;a.log(e+": "+r+"ms")},"timeEnd"],[function(){var e=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<u.length;l++){var f=u[l],p=f[0],d=f[1];a[d]||(a[d]=p)}e.exports=a},6897:(e,t,r)=>{"use strict";var n=r(453),o=r(41),i=r(592)(),a=r(5795),s=r(9675),c=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>0xffffffff||c(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(u=!1)}return(n||u||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},7119:e=>{"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},7176:(e,t,r)=>{"use strict";var n,o=r(3126),i=r(5795);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!n&&i&&i(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof c&&function(e){return c(null==e?e:s(e))}},7244:(e,t,r)=>{"use strict";var n=r(9092)(),o=r(6556)("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&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"callee"in e&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=s?i:a},7526:(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],c=i[1],u=new o(3*(a+c)/4-c),l=0,f=c>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)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>
24,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(function(e,t,n){for(var o,i=[],a=t;a<n;a+=3)i.push(r[(o=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]))>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(e,a,a+16383>s?s:a+16383));return 1===o?i.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===o&&i.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],n=[],o="u">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 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]}n[45]=62,n[95]=63},7653:(e,t,r)=>{"use strict";var n=r(8452),o=r(487),i=r(9211),a=r(9394),s=r(6576),c=o(a(),Object);n(c,{getPolyfill:a,implementation:i,shim:s}),e.exports=c},7816:(e,t,r)=>{"use strict";var n=r(6698),o=r(392),i=r(2861).Buffer,a=[0x5a827999,0x6ed9eba1,-0x70e44324,-0x359d3e2a],s=Array(80);function c(){this.init(),this._w=s,o.call(this,64,56)}n(c,o),c.prototype.init=function(){return this._a=0x67452301,this._b=0xefcdab89,this._c=0x98badcfe,this._d=0x10325476,this._e=0xc3d2e1f0,this},c.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,o=0|this._c,i=0|this._d,s=0|this._e,c=0;c<16;++c)t[c]=e.readInt32BE(4*c);for(;c<80;++c)t[c]=t[c-3]^t[c-8]^t[c-14]^t[c-16];for(var u=0;u<80;++u){var l,f,p,d,h,y=~~(u/20),m=((l=r)<<5|l>>>27)+(f=n,p=o,d=i,0===y?f&p|~f&d:2===y?f&p|f&d|p&d:f^p^d)+s+t[u]+a[y]|0;s=i,i=o,o=(h=n)<<30|h>>>2,n=r,r=m}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=i+this._d|0,this._e=s+this._e|0},c.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=c},8002:e=>{"use strict";e.exports=Math.min},8068:e=>{"use strict";e.exports=SyntaxError},8075:(e,t,r)=>{"use strict";var n=r(453),o=r(487),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}},8184:(e,t,r)=>{"use strict";var n,o=r(6556),i=r(9721)(/^\s*(?:function)?\*/),a=r(9092)(),s=r(3628),c=o("Object.prototype.toString"),u=o("Function.prototype.toString");e.exports=function(e){if("function"!=typeof e)return!1;if(i(u(e)))return!0;if(!a)return"[object GeneratorFunction]"===c(e);if(!s)return!1;if(void 0===n){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&s(t)}return s(e)===n}},8287:(e,t,r)=>{"use strict";var n=r(6763);let o=r(7526),i=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let 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 TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e){var n=t;if("string"==typeof n&&""!==n||(n="utf8"),!c.isEncoding(n))throw TypeError("Unknown encoding: "+n);let r=0|y(e,n),o=s(r),i=o.write(e,n);return i!==r&&(o=o.slice(0,i)),o}if(ArrayBuffer.isView(e)){if(L(e,Uint8Array)){let t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return p(e)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(L(e,SharedArrayBuffer)||e&&L(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return c.from(o,t,r);let i=function(e){var t;if(c.isBuffer(e)){let t=0|h(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?s(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');
2if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),s(e<0?0:0|h(e))}function p(e){let t=e.length<0?0:0|h(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){let n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),c.prototype),n}function h(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let 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 N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return M(e).length;default:if(o)return n?-1:N(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let 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+=F[e[n]];return o}(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return function(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}(this,t,r);case"latin1":case"binary":return 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}(this,t,r);case"base64":var i,a,s;return i=this,a=t,s=r,0===a&&s===i.length?o.fromByteArray(i):o.fromByteArray(i.slice(a,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let n=e.slice(t,r),o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){var i;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(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:v(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):v(e,[t],r,n,o);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,o){let i,a=1,s=e.length,c=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,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(u(e,i)===u(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===c)return n*a}else -1!==n&&(i-=i-n),n=-1}else for(r+c>s&&(r=s-c),i=r;i>=0;i--){let r=!0;for(let n=0;n<c;n++)if(u(e,i+n)!==u(t,n)){r=!1;break}if(r)return i}return -1}function w(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o<r;){let t=e[o],i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:128==(192&(r=e[o+1]))&&(c=(31&t)<<6|63&r)>127&&(i=c);break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n)>2047&&(c<55296||c>57343)&&(i=c);break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&c<1114112&&(i=c)}}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}let i=n.length;if(i<=S)return String.fromCharCode.apply(String,n);let a="",s=0;for(;s<i;)a+=String.fromCharCode.apply(String,n.slice(s,s+=S));return a}t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)}
vendor: 14,836 bytes, line 2
2,t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,c.TYPED_ARRAY_SUPPORT=function(){try{let 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 u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},c.allocUnsafe=function(e){return f(e)},c.allocUnsafeSlow=function(e){return f(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(L(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),L(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw 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)},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){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;let n=c.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){let t=e[r];if(L(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 TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?w(this,0,e):m.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="",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(L(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw 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 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),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)},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){var o,i,a,s,c,u,l,f;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 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)}let p=this.length-t;if((void 0===r||r>p)&&(r=p),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let d=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let o;r=Number(r)||0;let i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;let a=t.length;for(n>a/2&&(n=a/2),o=0;o<n;++o){var s;let n=parseInt(t.substr(2*o,2),16);if((s=n)!=s)break;e[r+o]=n}return o}(this,e,t,r);case"utf8":case"utf-8":return o=t,i=r,D(N(e,this.length-o),this,o,i);case"ascii":case"latin1":case"binary":return a=t,s=r,D(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,a,s);case"base64":return c=t,u=r,D(M(e),this,c,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=t,f=r,D(function(e,t){let r,n,o=[];for(let i=0;i<e.length&&!((t-=2)<0);++i)n=(r=e.charCodeAt(i))>>8,o.push(r%256),o.push(n);return o}(e,this.length-l),this,l,f);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let S=4096;function _(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function E(e,t,r,n,o,i){if(!c.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function x(e,t,r,n,o){I(t,n,o,e,r,7);let i=Number(t&BigInt(0xffffffff));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(0xffffffff));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function A(e,t,r,n,o){I(t,n,o,e,r,7);let i=Number(t&BigInt(0xffffffff));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(0xffffffff));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 T(e,t,r,n,o,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function k(e,t,r,n,o){return t*=1,r>>>=0,o||T(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function O(e,t,r,n,o){return t*=1,r>>>=0,o||T(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){let 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);let 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||_(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||_(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||_(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||_(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=q(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];void 0!==t&&void 0!==r||R(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],o=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(n)+(BigInt(o)<<BigInt(32))}),c.prototype.readBigUInt64BE=q(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];void 0!==t&&void 0!==r||R(e,this.length-8);let n=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],o=0x1000000*this[++e]+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||_(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||_(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||_(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||_(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||_(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||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=q(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];return void 0!==t&&void 0!==r||R(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+0x1000000*this[++e])}),c.prototype.readBigInt64BE=q(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];return void 0!==t&&void 0!==r||R(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||_(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||_(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||_(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||_(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e*=1,t>>>=0,r>>>=0,n||E(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*=1,t>>>=0,r>>>=0,n||E(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*=1,t>>>=0,r||E(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||E(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*=1,t>>>=0,r||E(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*=1,t>>>=0,r||E(this,e,t,4,0xffffffff,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*=1,t>>>=0,r||E(this,e,t,4,0xffffffff,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 x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=q(function(e,t=0){return A(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);E(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*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);E(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*=1,t>>>=0,r||E(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*=1,t>>>=0,r||E(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*=1,t>>>=0,r||E(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*=1,t>>>=0,r||E(this,e,t,4,0x7fffffff,-0x80000000),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*=1,t>>>=0,r||E(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+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 x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=q(function(e,t=0){return A(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return O(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw 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||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);let 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){let o;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 TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){let 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 RangeError("Out of range index");if(r<=t)return this;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{let i=c.isBuffer(e)?e:c.from(e,n),a=i.length;
2if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};let P={};function B(e,t,r){P[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 j(e){let t="",r=e.length,n=+("-"===e[0]);for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function I(e,t,r,n,o,i){if(e>r||e<t){let n,o="bigint"==typeof t?"n":"";throw n=i>3?0===t||t===BigInt(0)?`>= 0${o} and < 2${o} ** ${8*(i+1)}${o}`:`>= -(2${o} ** ${8*(i+1)-1}${o}) and < 2 ** ${8*(i+1)-1}${o}`:`>= ${t}${o} and <= ${r}${o}`,new P.ERR_OUT_OF_RANGE("value",n,e)}C(o,"offset"),void 0!==n[o]&&void 0!==n[o+i]||R(o,n.length-(i+1))}function C(e,t){if("number"!=typeof e)throw new P.ERR_INVALID_ARG_TYPE(t,"number",e)}function R(e,t,r){if(Math.floor(e)!==e)throw C(e,r),new P.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new P.ERR_BUFFER_OUT_OF_BOUNDS;throw new P.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),B("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),B("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)>0x100000000?o=j(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=j(o)),o+="n"),n+=` It must be ${t}. Received ${o}`},RangeError);let U=/[^+/0-9A-Za-z-_]/g;function N(e,t){let r;t=t||1/0;let n=e.length,o=null,i=[];for(let a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319||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 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 M(e){return o.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(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 L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let F=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function q(e){return"u"<typeof BigInt?V:e}function V(){throw Error("BigInt not supported")}},8403:(e,t,r)=>{"use strict";var n=r(1189),o=r(1333)(),i=r(6556),a=r(9612),s=i("Array.prototype.push"),c=i("Object.prototype.propertyIsEnumerable"),u=o?a.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw 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&&(a.getOwnPropertySymbols||u);if(p)for(var d=p(l),h=0;h<d.length;++h){var y=d[h];c(l,y)&&s(f,y)}for(var m=0;m<f.length;++m){var g=f[m];if(c(l,g)){var b=l[g];r[g]=b}}}return r}},8452:(e,t,r)=>{"use strict";var n=r(1189),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(41),c=r(592)(),u=function(e,t,r,n){if(t in e){if(!0===n){if(e[t]===r)return}else if("function"!=typeof n||"[object Function]"!==i.call(n)||!n())return}c?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)u(e,i[s],t[i[s]],r[i[s]])};
2l.supportsDescriptors=!!c,e.exports=l},8648:e=>{"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},8875:(e,t,r)=>{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(1093),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),u=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},d=function(){if("u"<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 TypeError("Object.keys called on a non-object");var h=u&&r;if(s&&e.length>0&&!o.call(e,0))for(var y=0;y<e.length;++y)p.push(String(y));if(n&&e.length>0)for(var m=0;m<e.length;++m)p.push(String(m));else for(var g in e)h&&"prototype"===g||!o.call(e,g)||p.push(String(g));if(c)for(var b=function(e){if("u"<typeof window||!d)return f(e);try{return f(e)}catch(e){return!1}}(e),v=0;v<l.length;++v)b&&"constructor"===l[v]||!o.call(e,l[v])||p.push(l[v]);return p}}e.exports=n},8968:e=>{"use strict";e.exports=Math.floor},9032:(e,t,r)=>{"use strict";var n=r(7244),o=r(8184),i=r(5767),a=r(5680);function s(e){return e.call.bind(e)}var c="u">typeof BigInt,u="u">typeof Symbol,l=s(Object.prototype.toString),f=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);if(c)var h=s(BigInt.prototype.valueOf);if(u)var y=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 b(e){return"[object Set]"===l(e)}function v(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function S(e){return"[object ArrayBuffer]"===l(e)}function _(e){return"u">typeof ArrayBuffer&&(S.working?S(e):e instanceof ArrayBuffer)}function E(e){return"[object DataView]"===l(e)}function x(e){return"u">typeof DataView&&(E.working?E(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"u">typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||x(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="u">typeof Map&&g(new Map),t.isMap=function(e){return"u">typeof Map&&(g.working?g(e):e instanceof Map)},b.working="u">typeof Set&&b(new Set),t.isSet=function(e){return"u">typeof Set&&(b.working?b(e):e instanceof Set)},v.working="u">typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return"u">typeof WeakMap&&(v.working?v(e):e instanceof WeakMap)},w.working="u">typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},S.working="u">typeof ArrayBuffer&&S(new ArrayBuffer),t.isArrayBuffer=_,E.working="u">typeof ArrayBuffer&&"u">typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=x;var A="u">typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function T(e){return"[object SharedArrayBuffer]"===l(e)}function k(e){return void 0!==A&&(void 0===T.working&&(T.working=T(new A)),T.working?T(e):e instanceof A)}function O(e){return m(e,f)}function P(e){return m(e,p)}function B(e){return m(e,d)}function j(e){return c&&m(e,h)}function I(e){return u&&m(e,y)}t.isSharedArrayBuffer=k,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=O,t.isStringObject=P,t.isBooleanObject=B,t.isBigIntObject=j,t.isSymbolObject=I,t.isBoxedPrimitive=function(e){return O(e)||P(e)||B(e)||j(e)||I(e)},t.isAnyArrayBuffer=function(e){return"u">typeof Uint8Array&&(_(e)||k(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},9092:(e,t,r)=>{"use strict";var n=r(1333);e.exports=function(){return n()&&!!Symbol.toStringTag}},9133:(e,t,r)=>{"use strict";var n=r(8403);e.exports=function(){return function(){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}},9209:(e,t,r)=>{"use strict";var n=r(6578),o="u"<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}},9211: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))}},9290:e=>{"use strict";e.exports=RangeError},9353: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;
2o+=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 TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e){for(var t=[],r=1,n=0;r<e.length;r+=1,n+=1)t[n]=e[r];return t}(arguments),s=r(0,o.length-a.length),c=[],u=0;u<s;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e){for(var t="",r=0;r<e.length;r+=1)t+=e[r],r+1<e.length&&(t+=",");return t}(c)+"){ 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}},9383:e=>{"use strict";e.exports=Error},9394:(e,t,r)=>{"use strict";var n=r(9211);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},9538:e=>{"use strict";e.exports=ReferenceError},9597:(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})(e)}function o(e,t){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a,s,c={};function u(e,t,r){r||(r=Error);var a=function(r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");c.prototype=Object.create(r&&r.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),r&&o(c,r);var a,s=(a=function(){if("u"<typeof Reflect||!Reflect.construct||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(){var e,t=i(c);if(e=a?Reflect.construct(t,arguments,i(this).constructor):t.apply(this,arguments),e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");if(void 0===this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return this});function c(r,n,o){var i;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,c),(i=s.call(this,"string"==typeof t?t:t(r,n,o))).code=e,i}return Object.defineProperty(c,"prototype",{writable:!1}),c}(r);c[e]=a}function l(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))}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",function(e,t,o){if(void 0===a&&(a=r(4148)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&"not "===t.substr(0,4)?(i="must not be",t=t.replace(/^not /,"")):i="must be",(void 0===c||c>e.length)&&(c=e.length)," argument"===e.substring(c-9,c))s="The ".concat(e," ").concat(i," ").concat(l(t,"type"));else{var i,s,c,u,f=("number"!=typeof u&&(u=0),u+1>e.length||-1===e.indexOf(".",u))?"argument":"property";s='The "'.concat(e,'" ').concat(f," ").concat(i," ").concat(l(t,"type"))}return s+". Received type ".concat(n(o))},TypeError),u("ERR_INVALID_ARG_VALUE",function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(537));var o=s.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(o)},TypeError,RangeError),u("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),u("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===a&&(a=r(4148)),a(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=c},9600: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}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;
2c.call(p)===c.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=c.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||"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||"function"!=typeof e&&"object"!=typeof e)return!1;if(u)return s(e);if(a(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},9612:e=>{"use strict";e.exports=Object},9675:e=>{"use strict";e.exports=TypeError},9721:(e,t,r)=>{"use strict";var n=r(6556),o=r(4035),i=n("RegExp.prototype.exec"),a=r(9675);e.exports=function(e){if(!o(e))throw new a("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},9957:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty;e.exports=r(6743).call(n,o)}},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}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||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 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=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(448)})()},8968:e=>{"use strict";e.exports=Math.floor},9032:(e,t,r)=>{"use strict";var n=r(7244),o=r(8184),i=r(5767),a=r(5680);function s(e){return e.call.bind(e)}var c="u">typeof BigInt,u="u">typeof Symbol,l=s(Object.prototype.toString),f=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);if(c)var h=s(BigInt.prototype.valueOf);if(u)var y=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 b(e){return"[object Set]"===l(e)}function v(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function S(e){return"[object ArrayBuffer]"===l(e)}function _(e){return"u">typeof ArrayBuffer&&(S.working?S(e):e instanceof ArrayBuffer)}function E(e){return"[object DataView]"===l(e)}function x(e){return"u">typeof DataView&&(E.working?E(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"u">typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||x(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="u">typeof Map&&g(new Map),t.isMap=function(e){return"u">typeof Map&&(g.working?g(e):e instanceof Map)},b.working="u">typeof Set&&b(new Set),t.isSet=function(e){return"u">typeof Set&&(b.working?b(e):e instanceof Set)},v.working="u">typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return"u">typeof WeakMap&&(v.working?v(e):e instanceof WeakMap)},w.working="u">typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},S.working="u">typeof ArrayBuffer&&S(new ArrayBuffer),t.isArrayBuffer=_,E.working="u">typeof ArrayBuffer&&"u">typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=x;var A="u">typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function T(e){return"[object SharedArrayBuffer]"===l(e)}function k(e){return void 0!==A&&(void 0===T.working&&(T.working=T(new A)),T.working?T(e):e instanceof A)}function O(e){return m(e,f)}function P(e){return m(e,p)}function B(e){return m(e,d)}function j(e){return c&&m(e,h)}function I(e){return u&&m(e,y)}t.isSharedArrayBuffer=k,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=O,t.isStringObject=P,t.isBooleanObject=B,t.isBigIntObject=j,t.isSymbolObject=I,t.isBoxedPrimitive=function(e){return O(e)||P(e)||B(e)||j(e)||I(e)},t.isAnyArrayBuffer=function(e){return"u">typeof Uint8Array&&(_(e)||k(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},9092:(e,t,r)=>{"use strict";var n=r(1333);e.exports=function(){return n()&&!!Symbol.toStringTag}},9127:function(e,t,r){var n,o,i;!function(a){"use strict";e.exports?e.exports=a(r(4193)):(o=[r(4193)],void 0===(i="function"==typeof(n=a)?n.apply(t,o):n)||(e.exports=i))}(function(e,t){"use strict";var r=t&&t.URITemplate,n=Object.prototype.hasOwnProperty;function o(e){return o._cache[e]?o._cache[e]:this instanceof o?(this.expression=e,o._cache[e]=this,this):new o(e)}function i(e){this.data=e,this.cache={}}var a=o.prototype,s={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};return o._cache={},o.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g,o.VARIABLE_PATTERN=/^([^*:.](?:\.?[^*:.])*)((\*)|:(\d+))?$/,o.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_.]/,o.LITERAL_PATTERN=/[<>{}
2"`^| \\]/,o.expand=function(e,t,r){var n,i,a,c=s[e.operator],u=c.named?"Named":"Unnamed",l=e.variables,f=[];for(a=0;i=l[a];a++){if(0===(n=t.get(i.name)).type&&r&&r.strict)throw Error('Missing expansion value for variable "'+i.name+'"');if(n.val.length){if(n.type>1&&i.maxlength)throw Error('Invalid expression: Prefix modifier not applicable to variable "'+i.name+'"');f.push(o["expand"+u](n,c,i.explode,i.explode&&c.separator||",",i.maxlength,i.name))}else n.type&&f.push("")}return f.length?c.prefix+f.join(c.separator):""},o.expandNamed=function(t,r,n,o,i,a){var s,c,u,l="",f=r.encode,p=r.empty_name_separator,d=!t[f].length,h=2===t.type?"":e[f](a);for(c=0,u=t.val.length;c<u;c++)i?(s=e[f](t.val[c][1].substring(0,i)),2===t.type&&(h=e[f](t.val[c][0].substring(0,i)))):d?(s=e[f](t.val[c][1]),2===t.type?(h=e[f](t.val[c][0]),t[f].push([h,s])):t[f].push([void 0,s])):(s=t[f][c][1],2===t.type&&(h=t[f][c][0])),l&&(l+=o),n?l+=h+(p||s?"=":"")+s:(c||(l+=e[f](a)+(p||s?"=":"")),2===t.type&&(l+=h+","),l+=s);return l},o.expandUnnamed=function(t,r,n,o,i){var a,s,c,u="",l=r.encode,f=r.empty_name_separator,p=!t[l].length;for(s=0,c=t.val.length;s<c;s++)i?a=e[l](t.val[s][1].substring(0,i)):p?(a=e[l](t.val[s][1]),t[l].push([2===t.type?e[l](t.val[s][0]):void 0,a])):a=t[l][s][1],u&&(u+=o),2===t.type&&(u+=i?e[l](t.val[s][0].substring(0,i)):t[l][s][0],u+=n?f||a?"=":"":","),u+=a;return u},o.noConflict=function(){return t.URITemplate===o&&(t.URITemplate=r),o},a.expand=function(e,t){var r="";this.parts&&this.parts.length||this.parse(),e instanceof i||(e=new i(e));for(var n=0,a=this.parts.length;n<a;n++)r+="string"==typeof this.parts[n]?this.parts[n]:o.expand(this.parts[n],e,t);return r},a.parse=function(){var e,t,r,n=this.expression,i=o.EXPRESSION_PATTERN,a=o.VARIABLE_PATTERN,c=o.VARIABLE_NAME_PATTERN,u=o.LITERAL_PATTERN,l=[],f=0,p=function(e){if(e.match(u))throw Error('Invalid Literal "'+e+'"');return e};for(i.lastIndex=0;;){if(null===(t=i.exec(n))){l.push(p(n.substring(f)));break}if(l.push(p(n.substring(f,t.index))),f=t.index+t[0].length,!s[t[1]])throw Error('Unknown Operator "'+t[1]+'" in "'+t[0]+'"');if(!t[3])throw Error('Unclosed Expression "'+t[0]+'"');for(var d=0,h=(e=t[2].split(",")).length;d<h;d++){if(null===(r=e[d].match(a)))throw Error('Invalid Variable "'+e[d]+'" in "'+t[0]+'"');if(r[1].match(c))throw Error('Invalid Variable Name "'+r[1]+'" in "'+t[0]+'"');e[d]={name:r[1],explode:!!r[3],maxlength:r[4]&&parseInt(r[4],10)}}if(!e.length)throw Error('Expression Missing Variable(s) "'+t[0]+'"');l.push({expression:t[0],operator:t[1],variables:e})}return l.length||l.push(p(n)),this.parts=l,this},i.prototype.get=function(e){var t,r,o,i=this.data,a={type:0,val:[],encode:[],encodeReserved:[]};if(void 0!==this.cache[e])return this.cache[e];if(this.cache[e]=a,null==(o="[object Function]"===String(Object.prototype.toString.call(i))?i(e):"[object Function]"===String(Object.prototype.toString.call(i[e]))?i[e](e):i[e]))return a;if("[object Array]"===String(Object.prototype.toString.call(o))){for(t=0,r=o.length;t<r;t++)void 0!==o[t]&&null!==o[t]&&a.val.push([void 0,String(o[t])]);a.val.length&&(a.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(o))){for(t in o)n.call(o,t)&&void 0!==o[t]&&null!==o[t]&&a.val.push([t,String(o[t])]);a.val.length&&(a.type=2)}else a.type=1,a.val.push([void 0,String(o)]);return a},e.expand=function(t,r){return new e(new o(t).expand(r))},o})},9209:(e,t,r)=>{"use strict";var n=r(6578),o="u"<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}},9290:e=>{"use strict";e.exports=RangeError},9340:function(e,t,r){var n;e=r.nmd(e),function(){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var i,a=/^xn--/,s=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,f=String.fromCharCode;function p(e){throw RangeError(u[e])}function d(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function h(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+d((e=e.replace(c,".")).split("."),t).join(".")}function y(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function m(e){return d(e,function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=f(e)}).join("")}function g(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function b(e,t,r){var n=0;for(e=r?l(e/700):e>>1,e+=l(e/t);e>455;n+=36)e=l(e/35);return l(n+36*e/(e+38))}function v(e){var t,r,n,o,i,a,s,c,u,f,d,h=[],y=e.length,g=0,v=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),o=0;o<n;++o)e.charCodeAt(o)>=128&&p("not-basic"),h.push(e.charCodeAt(o));for(i=n>0?n+1:0;i<y;){for(a=g,s=1,c=36;i>=y&&p("invalid-input"),((u=(t=e.charCodeAt(i++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36)>=36||u>l((0x7fffffff-g)/s))&&p("overflow"),g+=u*s,!(u<(f=c<=w?1:c>=w+26?26:c-w));c+=36)s>l(0x7fffffff/(d=36-f))&&p("overflow"),s*=d;w=b(g-a,r=h.length+1,0==a),l(g/r)>0x7fffffff-v&&p("overflow"),v+=l(g/r),g%=r,h.splice(g++,0,v)}return m(h)}function w(e){var t,r,n,o,i,a,s,c,u,d,h,m,v,w,S,_=[];for(m=(e=y(e)).length,t=128,r=0,i=72,a=0;a<m;++a)(h=e[a])<128&&_.push(f(h));for(n=o=_.length,o&&_.push("-");n<m;){for(s=0x7fffffff,a=0;a<m;++a)(h=e[a])>=t&&h<s&&(s=h);for(s-t>l((0x7fffffff-r)/(v=n+1))&&p("overflow"),r+=(s-t)*v,t=s,a=0;a<m;++a)if((h=e[a])<t&&++r>0x7fffffff&&p("overflow"),h==t){for(c=r,u=36;!(c<(d=u<=i?1:u>=i+26?26:u-i));u+=36)S=c-d,w=36-d,_.push(f(g(d+S%w,0))),c=l(S/w);_.push(f(g(c,0))),i=b(r,v,n==o),r=0,++n}++r,++t}return _.join("")}i={version:"1.3.2",ucs2:{decode:y,encode:m},decode:v,encode:w,toASCII:function(e){return h(e,function(e){return s.test(e)?"xn--"+w(e):e})},toUnicode:function(e){return h(e,function(e){return a.test(e)?v(e.slice(4).toLowerCase()):e})}},void 0===(n=(function(){return i}).call(t,r,t,e))||(e.exports=n)}()},9353: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;
2o+=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 TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e){for(var t=[],r=1,n=0;r<e.length;r+=1,n+=1)t[n]=e[r];return t}(arguments),s=r(0,o.length-a.length),c=[],u=0;u<s;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e){for(var t="",r=0;r<e.length;r+=1)t+=e[r],r+1<e.length&&(t+=",");return t}(c)+"){ 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}},9383:e=>{"use strict";e.exports=Error},9538:e=>{"use strict";e.exports=ReferenceError},9600: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}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=c.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||"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||"function"!=typeof e&&"object"!=typeof e)return!1;if(u)return s(e);if(a(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},9612:e=>{"use strict";e.exports=Object},9675:e=>{"use strict";e.exports=TypeError},9721:(e,t,r)=>{"use strict";var n=r(6556),o=r(4035),i=n("RegExp.prototype.exec"),a=r(9675);e.exports=function(e){if(!o(e))throw new a("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},9838:()=>{},9957:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty;e.exports=r(6743).call(n,o)},9983:(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})(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,function(e){var t=function(e,t){if("object"!=n(e)||!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 TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==n(t)?t:t+""}(o.key),o)}}r.d(t,{vt:()=>u,ok:()=>c}),i=function e(t){var r,n=this;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this.promise=new Promise(function(e){r=e}),t(function(e){n.reason=e,r()})},a=[{key:"throwIfRequested",value:function(){if(this.reason)throw Error(this.reason)}}],o(i.prototype,a),s&&o(i,s),Object.defineProperty(i,"prototype",{writable:!1});var i,a,s,c,u,l=r(6121);c=l.axiosClient,u=l.create}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}return o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}
2}(),o.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o(1924)})()},26978,(e,t,r)=>{"use strict";var n=e.i(329470);Object.defineProperty(r,"__esModule",{value:!0}),r.crc16=void 0,r.crc16=function(e){let t=0,r=n.Buffer.alloc(e.length+2);for(let n of(r.set(e),r)){let e=128;for(;e>0;)t<<=1,n&e&&(t+=1),e>>=1,t>65535&&(t&=65535,t^=4129)}return n.Buffer.from([Math.floor(t/256),t%256])}},723184,(e,t,r)=>{"use strict";var n,o=e.i(329470),i=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.address=r.Address=void 0;let a=i(e.r(770653)),s=e.r(26978);function c(e){if("string"==typeof e&&!u.isFriendly(e))throw Error("Unknown address type");let t=o.Buffer.isBuffer(e)?e:o.Buffer.from(e,"base64");if(36!==t.length)throw Error("Unknown address type: byte length is not equal to 36");let r=t.subarray(0,34),n=t.subarray(34,36),i=(0,s.crc16)(r);if(i[0]!==n[0]||i[1]!==n[1])throw Error("Invalid checksum: "+e);let a=r[0],c=!1;if(128&a&&(c=!0,a^=128),17!==a&&81!==a)throw"Unknown address tag";let l=null;return{isTestOnly:c,isBounceable:17===a,workchain:l=255===r[1]?-1:r[1],hashPart:r.subarray(2,34)}}class u{static isAddress(e){return e instanceof u}static isFriendly(e){return 48===e.length&&!!/^[A-Za-z0-9+/_-]+$/.test(e)}static isRaw(e){if(-1===e.indexOf(":"))return!1;let[t,r]=e.split(":");return!!Number.isInteger(parseFloat(t))&&!!/[a-f0-9]+/.test(r.toLowerCase())&&64===r.length}static normalize(e){return"string"==typeof e?u.parse(e).toString():e.toString()}static parse(e){if(u.isFriendly(e))return this.parseFriendly(e).address;if(u.isRaw(e))return this.parseRaw(e);throw Error("Unknown address type: "+e)}static parseRaw(e){return new u(parseInt(e.split(":")[0]),o.Buffer.from(e.split(":")[1],"hex"))}static parseFriendly(e){if(o.Buffer.isBuffer(e)){let t=c(e);return{isBounceable:t.isBounceable,isTestOnly:t.isTestOnly,address:new u(t.workchain,t.hashPart)}}{let t=c(e.replace(/\-/g,"+").replace(/_/g,"/"));return{isBounceable:t.isBounceable,isTestOnly:t.isTestOnly,address:new u(t.workchain,t.hashPart)}}}constructor(e,t){if(this.toRawString=()=>this.workChain+":"+this.hash.toString("hex"),this.toRaw=()=>{let e=o.Buffer.alloc(36);return e.set(this.hash),e.set([this.workChain,this.workChain,this.workChain,this.workChain],32),e},this.toStringBuffer=e=>{let t=!!e&&void 0!==e.testOnly&&e.testOnly,r=!e||void 0===e.bounceable||e.bounceable?17:81;t&&(r|=128);let n=o.Buffer.alloc(34);n[0]=r,n[1]=this.workChain,n.set(this.hash,2);let i=o.Buffer.alloc(36);return i.set(n),i.set((0,s.crc16)(n),34),i},this.toString=e=>{let t=!e||void 0===e.urlSafe||e.urlSafe,r=this.toStringBuffer(e);return t?r.toString("base64").replace(/\+/g,"-").replace(/\//g,"_"):r.toString("base64")},this[n]=()=>this.toString(),32!==t.length)throw Error("Invalid address hash length: "+t.length);this.workChain=e,this.hash=t,Object.freeze(this)}equals(e){return e.workChain===this.workChain&&e.hash.equals(this.hash)}}r.Address=u,n=a.default,r.address=function(e){return u.parse(e)}},365096,(e,t,r)=>{"use strict";var n,o=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ExternalAddress=void 0;let i=o(e.r(770653));class a{static isAddress(e){return e instanceof a}constructor(e,t){this[n]=()=>this.toString(),this.value=e,this.bits=t}toString(){return`External<${this.bits}:${this.value}>`}}r.ExternalAddress=a,n=i.default},415075,(e,t,r)=>{"use strict";var n=e.i(329470);Object.defineProperty(r,"__esModule",{value:!0}),r.base32Decode=r.base32Encode=void 0;let o="abcdefghijklmnopqrstuvwxyz234567";r.base32Encode=function(e){let t=e.byteLength,r=0,n=0,i="";for(let a=0;a<t;a++)for(n=n<<8|e[a],r+=8;r>=5;)i+=o[n>>>r-5&31],r-=5;return r>0&&(i+=o[n<<5-r&31]),i},r.base32Decode=function(e){let t,{length:r}=t=e.toLowerCase(),i=0,a=0,s=0,c=n.Buffer.alloc(5*r/8|0);for(let e=0;e<r;e++)a=a<<5|function(e,t){let r=e.indexOf(t);if(-1===r)throw Error("Invalid character found: "+t);return r}(o,t[e]),(i+=5)>=8&&(c[s++]=a>>>i-8&255,i-=8);return c}},745212,(e,t,r)=>{"use strict";var n,o=e.i(329470),i=e.e&&e.e.__importDefault||function(e){return e&&e.__esMo
2dule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ADNLAddress=void 0;let a=i(e.r(770653)),s=e.r(415075),c=e.r(26978);class u{static parseFriendly(e){if(55!==e.length)throw Error("Invalid address");e="f"+e;let t=(0,s.base32Decode)(e);if(45!==t[0])throw Error("Invalid address");let r=t.slice(33);if(!(0,c.crc16)(t.slice(0,33)).equals(r))throw Error("Invalid address");return new u(t.slice(1,33))}static parseRaw(e){return new u(o.Buffer.from(e,"base64"))}constructor(e){if(this.toRaw=()=>this.address.toString("hex").toUpperCase(),this.toString=()=>{let e=o.Buffer.concat([o.Buffer.from([45]),this.address]),t=(0,c.crc16)(e);return e=o.Buffer.concat([e,t]),(0,s.base32Encode)(e).slice(1)},this[n]=()=>this.toString(),32!==e.length)throw Error("Invalid address");this.address=e}equals(e){return this.address.equals(e.address)}}r.ADNLAddress=u,n=a.default},419408,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.paddedBufferToBits=r.bitsToPaddedBuffer=void 0;let n=e.r(779546),o=e.r(221870);r.bitsToPaddedBuffer=function(e){let t=new n.BitBuilder(8*Math.ceil(e.length/8));t.writeBits(e);let r=8*Math.ceil(e.length/8)-e.length;for(let e=0;e<r;e++)0===e?t.writeBit(1):t.writeBit(0);return t.buffer()},r.paddedBufferToBits=function(e){let t=0;for(let r=e.length-1;r>=0;r--)if(0!==e[r]){let n=e[r],o=n&-n;(1&o)==0&&(o=Math.log2(o)+1),r>0&&(t=r<<3),t+=8-o;break}return new o.BitString(e,0,t)}},221870,(e,t,r)=>{"use strict";var n,o=e.i(329470),i=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.BitString=void 0;let a=e.r(419408),s=i(e.r(770653));class c{static isBitString(e){return e instanceof c}constructor(e,t,r){if(this[n]=()=>this.toString(),r<0)throw Error(`Length ${r} is out of bounds`);this._length=r,this._data=e,this._offset=t}get length(){return this._length}at(e){if(e>=this._length)throw Error(`Index ${e} > ${this._length} is out of bounds`);if(e<0)throw Error(`Index ${e} < 0 is out of bounds`);let t=this._offset+e>>3,r=7-(this._offset+e)%8;return(this._data[t]&1<<r)!=0}substring(e,t){if(e>this._length)throw Error(`Offset(${e}) > ${this._length} is out of bounds`);if(e<0)throw Error(`Offset(${e}) < 0 is out of bounds`);if(0===t)return c.EMPTY;if(e+t>this._length)throw Error(`Offset ${e} + Length ${t} > ${this._length} is out of bounds`);return new c(this._data,this._offset+e,t)}subbuffer(e,t){if(e>this._length||e<0)throw Error(`Offset ${e} is out of bounds`);if(e+t>this._length)throw Error(`Offset + Lenght = ${e+t} is out of bounds`);if(t%8!=0||(this._offset+e)%8!=0)return null;let r=this._offset+e>>3;return this._data.subarray(r,r+(t>>3))}equals(e){if(this._length!==e._length)return!1;for(let t=0;t<this._length;t++)if(this.at(t)!==e.at(t))return!1;return!0}toString(){let e=(0,a.bitsToPaddedBuffer)(this);if(this._length%4==0){let t=e.subarray(0,Math.ceil(this._length/8)).toString("hex").toUpperCase();return this._length%8==0?t:t.substring(0,t.length-1)}{let t=e.toString("hex").toUpperCase();return this._length%8<=4?t.substring(0,t.length-1)+"_":t+"_"}}}r.BitString=c,n=s.default,c.EMPTY=new c(o.Buffer.alloc(0),0,0)},779546,(e,t,r)=>{"use strict";var n=e.i(329470);Object.defineProperty(r,"__esModule",{value:!0}),r.BitBuilder=void 0;let o=e.r(723184),i=e.r(365096),a=e.r(221870);r.BitBuilder=class{constructor(e=1023){this._buffer=n.Buffer.alloc(Math.ceil(e/8)),this._length=0}get length(){return this._length}writeBit(e){let t=this._length;if(t>8*this._buffer.length)throw Error("BitBuilder overflow");("boolean"==typeof e&&!0===e||"number"==typeof e&&e>0)&&(this._buffer[t/8|0]|=1<<7-t%8),this._length++}writeBits(e){for(let t=0;t<e.length;t++)this.writeBit(e.at(t))}writeBuffer(e){if(this._length%8==0){if(this._length+8*e.length>8*this._buffer.length)throw Error("BitBuilder overflow");e.copy(this._buffer,this._length/8),this._length+=8*e.length}else for(let t=0;t<e.length;t++)this.writeUint(e[t],8)}writeUint(e,t){if(t<0||!Number.isSafeInteger(t))throw Error(`invalid bit length. Got ${t}`);let r=BigInt(e);if(0===t)if(0n===r)return;else throw Error(`value is not zero for ${t} bits. Got ${e}`);let n=1n<<BigInt(t);if(r<0||r>=n)throw Error(`bitLength is too small for a value ${e}. Got ${t}`);if(this._length+t>8*this._buffer.length)throw Error("BitBuilder overflow");let o=8-this._length%8;if(o>0){let e=Math.floor(this._length/8);
2if(t<o){let n=Number(r);this._buffer[e]|=n<<o-t,this._length+=t}else{let n=Number(r>>BigInt(t-o));this._buffer[e]|=n,this._length+=o}}for(t-=o;t>0;)t>=8?(this._buffer[this._length/8]=Number(r>>BigInt(t-8)&255n),this._length+=8,t-=8):(this._buffer[this._length/8]=Number(r<<BigInt(8-t)&255n),this._length+=t,t=0)}writeInt(e,t){let r=BigInt(e);if(t<0||!Number.isSafeInteger(t))throw Error(`invalid bit length. Got ${t}`);if(0===t)if(0n===r)return;else throw Error(`value is not zero for ${t} bits. Got ${e}`);if(1===t)if(r===-1n||0n===r)return void this.writeBit(r===-1n);else throw Error(`value is not zero or -1 for ${t} bits. Got ${e}`);let n=1n<<BigInt(t)-1n;if(r<-n||r>=n)throw Error(`value is out of range for ${t} bits. Got ${e}`);r<0?(this.writeBit(!0),r=n+r):this.writeBit(!1),this.writeUint(r,t-1)}writeVarUint(e,t){let r=BigInt(e);if(t<0||!Number.isSafeInteger(t))throw Error(`invalid bit length. Got ${t}`);if(r<0)throw Error(`value is negative. Got ${e}`);if(0n===r)return void this.writeUint(0,t);let n=Math.ceil(r.toString(2).length/8);this.writeUint(n,t),this.writeUint(r,8*n)}writeVarInt(e,t){let r=BigInt(e);if(t<0||!Number.isSafeInteger(t))throw Error(`invalid bit length. Got ${t}`);if(0n===r)return void this.writeUint(0,t);let n=Math.ceil(((r>0?r:-r).toString(2).length+1)/8);this.writeUint(n,t),this.writeInt(r,8*n)}writeCoins(e){this.writeVarUint(e,4)}writeAddress(e){if(null==e)return void this.writeUint(0,2);if(o.Address.isAddress(e)){this.writeUint(2,2),this.writeUint(0,1),this.writeInt(e.workChain,8),this.writeBuffer(e.hash);return}if(i.ExternalAddress.isAddress(e)){this.writeUint(1,2),this.writeUint(e.bits,9),this.writeUint(e.value,e.bits);return}throw Error(`Invalid address. Got ${e}`)}build(){return new a.BitString(this._buffer,0,this._length)}buffer(){if(this._length%8!=0)throw Error("BitBuilder buffer is not byte aligned");return this._buffer.subarray(0,this._length/8)}}},685791,(e,t,r)=>{"use strict";var n,o;Object.defineProperty(r,"__esModule",{value:!0}),r.CellType=void 0,(o=n||(r.CellType=n={}))[o.Ordinary=-1]="Ordinary",o[o.PrunedBranch=1]="PrunedBranch",o[o.Library=2]="Library",o[o.MerkleProof=3]="MerkleProof",o[o.MerkleUpdate=4]="MerkleUpdate"},849056,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.readUnaryLength=void 0,r.readUnaryLength=function(e){let t=0;for(;e.loadBit();)t++;return t}},773094,(e,t,r)=>{"use strict";var n=e.i(329470);Object.defineProperty(r,"__esModule",{value:!0}),r.BitReader=void 0;let o=e.r(723184),i=e.r(365096);class a{constructor(e,t=0){this._checkpoints=[],this._bits=e,this._offset=t}get offset(){return this._offset}get remaining(){return this._bits.length-this._offset}skip(e){if(e<0||this._offset+e>this._bits.length)throw Error(`Index ${this._offset+e} is out of bounds`);this._offset+=e}reset(){this._checkpoints.length>0?this._offset=this._checkpoints.pop():this._offset=0}save(){this._checkpoints.push(this._offset)}loadBit(){let e=this._bits.at(this._offset);return this._offset++,e}preloadBit(){return this._bits.at(this._offset)}loadBits(e){let t=this._bits.substring(this._offset,e);return this._offset+=e,t}preloadBits(e){return this._bits.substring(this._offset,e)}loadBuffer(e){let t=this._preloadBuffer(e,this._offset);return this._offset+=8*e,t}preloadBuffer(e){return this._preloadBuffer(e,this._offset)}loadUint(e){return this._toSafeInteger(this.loadUintBig(e),"loadUintBig")}loadUintBig(e){let t=this.preloadUintBig(e);return this._offset+=e,t}preloadUint(e){return this._toSafeInteger(this._preloadUint(e,this._offset),"preloadUintBig")}preloadUintBig(e){return this._preloadUint(e,this._offset)}loadInt(e){let t=this._preloadInt(e,this._offset);return this._offset+=e,this._toSafeInteger(t,"loadUintBig")}loadIntBig(e){let t=this._preloadInt(e,this._offset);return this._offset+=e,t}preloadInt(e){return this._toSafeInteger(this._preloadInt(e,this._offset),"preloadIntBig")}preloadIntBig(e){return this._preloadInt(e,this._offset)}loadVarUint(e){let t=Number(this.loadUint(e));return this._toSafeInteger(this.loadUintBig(8*t),"loadVarUintBig")}loadVarUintBig(e){let t=Number(this.loadUint(e));return this.loadUintBig(8*t)}preloadVarUint(e){let t=Number(this._preloadUint(e,this._offset));return this._toSafeInteger(this._preloadUint(8*t,this._offset+e),"preloadVarUintBig")}preloadVarUintBig(e){let t=Number(this._preloadUint(e,this._offset));return this._preloadUint(8*t,this._offset+e)}loadVarInt(e){let t=Number(this.loadUint(e));return this._toSafeInteger(this.loadIntBig(8*t),"loadVarIntBig")}loadVarIntBig(e){let t=Number(this.loadUint(e));return this.loadIntBig(8*t)}preloadVarInt(e){let t=Number(this._preloadUint(e,this._offset));return this._toSafeInteger(this._preloadInt(8*t,this._offset+e),"preloadVarIntBig")}preloadVarIntBig(e){let t=Number(this._preloadUint(e,this._offset));return this._preloadInt(8*t,this._offset+e)}loadCoins(){return this.loadVarUintBig(4)}preloadCoins(){return this.preloadVarUintBig(4)}loadAddress(){let e=Number(this._preloadUint(2,this._offset));if(2===e)return this._loadInternalAddress();throw Error("Invalid address: "+e)}loadMaybeAddress(){let e=Number(this._preloadUint(2,this._offset));if(0===e)return this._offset+=2,null;if(2===e)return this._loadInternalAddress();throw Error("Invalid address")}loadExternalAddress(){if(1===Number(this._preloadUint(2,this._offset)))return this._loadExternalAddress();throw Error("Invalid address")}loadMaybeExternalAddress(){let e=Number(this._preloadUint(2,this._offset));if(0===e)return this._offset+=2,null;if(1===e)return this._loadExternalAddress();throw Error("Invalid address")}loadAddressAny(){let e=Number(this._preloadUint(2,this._offset));if(0===e)return this._offset+=2,null;if(2===e)return this._loadInternalAddress();if(1===e)return this._loadExternalAddress();if(3===e)throw Error("Unsupported");throw Error("Unreachable")}loadPaddedBits(e){if(e%8!=0)throw Error("Invalid number of bits");let t=e;for(;;)if(this._bits.at(this._offset+t-1)){t--;break}else t--;let r=this._bits.substring(this._offset,t);return this._offset+=e,r}clone(){return new a(this._bits,this._offset)}_preloadInt(e,t){if(0==e)return 0n;let r=this._bits.at(t),n=0n;for(let r=0;r<e-1;r++)this._bits.at(t+1+r)&&(n+=1n<<BigInt(e-r-1-1));return r&&(n-=1n<<BigInt(e-1)),n}_preloadUint(e,t){if(0==e)return 0n;let r=0n;for(let n=0;n<e;n++)this._bits.at(t+n)&&(r+=1n<<BigInt(e-n-1));return r}_preloadBuffer(e,t){let r=this._bits.subbuffer(t,8*e);if(r)return r;let o=n.Buffer.alloc(e);for(let r=0;r<e;r++)o[r]=Number(this._preloadUint(8,t+8*r));return o}_loadInternalAddress(){let e,t;if(2!==Number(this._preloadUint(2,this._offset)))throw Error("Invalid address");0n!==this._preloadUint(1,this._offset+2)&&(t=Number(this._preloadUint(5,this._offset+3)),e=this._preloadUint(t,this._offset+8),this._offset+=5+t);let r=Number(this._preloadInt(8,this._offset+3)),n=this._preloadBuffer(32,this._offset+11);if(void 0!==t&&void 0!==e){let r=Number(e),o=0,i=0,a=t;for(;a>0;){let e=Math.min(8-i,a),t=(1<<e)-1<<8-i-e,s=(r>>a-e&(1<<e)-1)<<8-i-e;n[o]=n[o]&~t|s,a-=e,8===(i+=e)&&(o++,i=0)}}return this._offset+=267,new o.Address(r,n)}_loadExternalAddress(){if(1!==Number(this._preloadUint(2,this._offset)))throw Error("Invalid address");let e=Number(this._preloadUint(9,this._offset+2)),t=this._preloadUint(e,this._offset+11);return this._offset+=11+e,new i.ExternalAddress(t,e)}_toSafeInteger(e,t){if(BigInt(Number.MAX_SAFE_INTEGER)<e||e<BigInt(Number.MIN_SAFE_INTEGER))throw TypeError(`${e} is out of safe integer range. Use ${t} instead`);return Number(e)}}r.BitReader=a},587185,(e,t,r)=>{"use strict";
2Object.defineProperty(r,"__esModule",{value:!0}),r.convertToMerkleProof=r.exoticMerkleProof=void 0;let n=e.r(773094),o=e.r(782459);r.exoticMerkleProof=function(e,t){let r=new n.BitReader(e);if(280!==e.length)throw Error(`Merkle Proof cell must have exactly (8 + 256 + 16) bits, got "${e.length}"`);if(1!==t.length)throw Error(`Merkle Proof cell must have exactly 1 ref, got "${t.length}"`);let o=r.loadUint(8);if(3!==o)throw Error(`Merkle Proof cell must have type 3, got "${o}"`);let i=r.loadBuffer(32),a=r.loadUint(16),s=t[0].hash(0),c=t[0].depth(0);if(a!==c)throw Error(`Merkle Proof cell ref depth must be exactly "${a}", got "${c}"`);if(!i.equals(s))throw Error(`Merkle Proof cell ref hash must be exactly "${i.toString("hex")}", got "${s.toString("hex")}"`);return{proofDepth:a,proofHash:i}},r.convertToMerkleProof=function(e){return(0,o.beginCell)().storeUint(3,8).storeBuffer(e.hash(0)).storeUint(e.depth(0),16).storeRef(e).endCell({exotic:!0})}},191333,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.generateMerkleProof=r.generateMerkleProofDirect=void 0;let n=e.r(782459),o=e.r(849056),i=e.r(587185);function a(e,t,r){return t.forEach(t=>{if(!e.has(t))throw Error(`Trying to generate merkle proof for a missing key "${t}"`)}),function e(t,r,i,a){let s=r.asCell();if(0==a.length)return(0,n.beginCell)().storeUint(1,8).storeUint(1,8).storeBuffer(s.hash(0)).storeUint(s.depth(0),16).endCell({exotic:!0});let c=+!!r.loadBit(),u=0,l=t;if(0===c){u=(0,o.readUnaryLength)(r);for(let e=0;e<u;e++)l+=r.loadBit()?"1":"0"}else if(0==+!!r.loadBit()){u=r.loadUint(Math.ceil(Math.log2(i+1)));for(let e=0;e<u;e++)l+=r.loadBit()?"1":"0"}else{let e=r.loadBit()?"1":"0";u=r.loadUint(Math.ceil(Math.log2(i+1)));for(let t=0;t<u;t++)l+=e}if(i-u==0)return s;{let t=s.beginParse(),r=t.loadRef(),o=t.loadRef();if(!r.isExotic){let t=a.filter(e=>l+"0"===e.slice(0,l.length+1));r=e(l+"0",r.beginParse(),i-u-1,t)}if(!o.isExotic){let t=a.filter(e=>l+"1"===e.slice(0,l.length+1));o=e(l+"1",o.beginParse(),i-u-1,t)}return(0,n.beginCell)().storeSlice(t).storeRef(r).storeRef(o).endCell()}}("",(0,n.beginCell)().storeDictDirect(e).asSlice(),r.bits,t.map(e=>r.serialize(e).toString(2).padStart(r.bits,"0")))}r.generateMerkleProofDirect=a,r.generateMerkleProof=function(e,t,r){return(0,i.convertToMerkleProof)(a(e,t,r))}},787369,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.generateMerkleUpdate=void 0;let n=e.r(782459),o=e.r(191333);r.generateMerkleUpdate=function(e,t,r,i){let a=(0,o.generateMerkleProof)(e,[t],r).refs[0];e.set(t,i);let s=(0,o.generateMerkleProof)(e,[t],r).refs[0];return(0,n.beginCell)().storeUint(4,8).storeBuffer(a.hash(0)).storeBuffer(s.hash(0)).storeUint(a.depth(0),16).storeUint(s.depth(0),16).storeRef(a).storeRef(s).endCell({exotic:!0})}},285300,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parseDict=void 0,r.parseDict=function(e,t,r){let n=new Map;return e&&function e(t,r,n,o,i){let a=+!!r.loadBit(),s=0,c=t;if(0===a){s=function(e){let t=0;for(;e.loadBit();)t++;return t}(r);for(let e=0;e<s;e++)c+=r.loadBit()?"1":"0"}else if(0==+!!r.loadBit()){s=r.loadUint(Math.ceil(Math.log2(n+1)));for(let e=0;e<s;e++)c+=r.loadBit()?"1":"0"}else{let e=r.loadBit()?"1":"0";s=r.loadUint(Math.ceil(Math.log2(n+1)));for(let t=0;t<s;t++)c+=e}if(n-s==0)o.set(BigInt("0b"+c),i(r));else{let t=r.loadRef(),a=r.loadRef();t.isExotic||e(c+"0",t.beginParse(),n-s-1,o,i),a.isExotic||e(c+"1",a.beginParse(),n-s-1,o,i)}}("",e,t,n,r),n}},64341,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.findCommonPrefix=void 0,r.findCommonPrefix=function(e,t=0){if(0===e.length)return"";let r=e[0].slice(t);for(let n=1;n<e.length;n++){let o=e[n];for(;o.indexOf(r,t)!==t;)if(""===(r=r.substring(0,r.length-1)))return r}return r}},5528,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.serializeDict=r.detectLabelType=r.writeLabelSame=r.writeLabelLong=r.writeLabelShort=r.buildTree=void 0;let n=e.r(782459),o=e.r(64341);function i(e,t){let r=new Map;for(let n of Array.from(e.keys())){let o=function(e,t){for(;e.length<t;)e="0"+e;return e}(n.toString(2),t);r.set(o,e.get(n))}return function e(t,r=0){if(0===t.size)throw Error("Internal inconsistency");let n=(0,o.findCommonPrefix)(Array.from(t.keys()),r);return{label:n,node:function(t,r){if(0===t.size)throw Error("Internal inconsistency");if(1===t.size)return{type:"leaf",value:Array.from(t.values())[0]};let{left:n,right:o}=function(e,t){if(0===e.size)throw Error("Internal inconsistency");let r=new Map,n=new Map;for(let[o,i]of e.entries())"0"===o[t]?r.set(o,i):n.set(o,i);
2if(0===r.size)throw Error("Internal inconsistency. Left emtpy.");if(0===n.size)throw Error("Internal inconsistency. Right emtpy.");return{left:r,right:n}}(t,r);return{type:"fork",left:e(n,r+1),right:e(o,r+1)}}(t,n.length+r)}}(r)}function a(e,t){t.storeBit(0);for(let r=0;r<e.length;r++)t.storeBit(1);return t.storeBit(0),e.length>0&&t.storeUint(BigInt("0b"+e),e.length),t}function s(e,t,r){r.storeBit(1),r.storeBit(0);let n=Math.ceil(Math.log2(t+1));return r.storeUint(e.length,n),e.length>0&&r.storeUint(BigInt("0b"+e),e.length),r}function c(e,t,r,n){n.storeBit(1),n.storeBit(1),n.storeBit(e);let o=Math.ceil(Math.log2(r+1));n.storeUint(t,o)}function u(e,t){let r="short",n=1+e.length+1+e.length,o=2+Math.ceil(Math.log2(t+1))+e.length;if(o<n&&(n=o,r="long"),function(e){if(0===e.length||1===e.length)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}(e)){let e=3+Math.ceil(Math.log2(t+1));e<n&&(n=e,r="same")}return r}r.buildTree=i,r.writeLabelShort=a,r.writeLabelLong=s,r.writeLabelSame=c,r.detectLabelType=u;r.serializeDict=function(e,t,r,o){!function e(t,r,o,i){var l;let f;l=t.label,"short"===(f=u(l,r))?a(l,i):"long"===f?s(l,r,i):"same"===f&&c("1"===l[0],l.length,r,i),function(t,r,o,i){if("leaf"===t.type&&o(t.value,i),"fork"===t.type){let a=(0,n.beginCell)(),s=(0,n.beginCell)();e(t.left,r-1,o,a),e(t.right,r-1,o,s),i.storeRef(a),i.storeRef(s)}}(t.node,r-t.label.length,o,i)}(i(e,t),t,r,o)}},895889,(e,t,r)=>{"use strict";var n=e.i(329470);Object.defineProperty(r,"__esModule",{value:!0}),r.deserializeInternalKey=r.serializeInternalKey=void 0;let o=e.r(723184),i=e.r(221870),a=e.r(419408);r.serializeInternalKey=function(e){if("number"==typeof e){if(!Number.isSafeInteger(e))throw Error("Invalid key type: not a safe integer: "+e);return"n:"+e.toString(10)}if("bigint"==typeof e)return"b:"+e.toString(10);if(o.Address.isAddress(e))return"a:"+e.toString();if(n.Buffer.isBuffer(e))return"f:"+e.toString("hex");if(i.BitString.isBitString(e))return"B:"+e.toString();else throw Error("Invalid key type")},r.deserializeInternalKey=function(e){let t=e.slice(0,2),r=e.slice(2);if("n:"===t)return parseInt(r,10);if("b:"===t)return BigInt(r);if("a:"===t)return o.Address.parse(r);if("f:"===t)return n.Buffer.from(r,"hex");if("B:"===t){let e="_"==r.slice(-1);if(!(e||r.length%2!=0))return new i.BitString(n.Buffer.from(r,"hex"),0,r.length<<2);{let t=e?r.length-1:r.length,o=r.substr(0,t)+"0";return e||(1&t)==0?(0,a.paddedBufferToBits)(n.Buffer.from(o,"hex")):new i.BitString(n.Buffer.from(o,"hex"),0,t<<2)}}throw Error("Invalid key type: "+t)}},605221,(e,t,r)=>{"use strict";var n=e.i(329470);Object.defineProperty(r,"__esModule",{value:!0}),r.Dictionary=void 0;let o=e.r(723184),i=e.r(782459),a=e.r(58234),s=e.r(221870),c=e.r(191333),u=e.r(787369),l=e.r(285300),f=e.r(5528),p=e.r(895889);class d{static empty(e,t){return e&&t?new d(new Map,e,t):new d(new Map,null,null)}static load(e,t,r){let n;if(r instanceof a.Cell){if(r.isExotic)return d.empty(e,t);n=r.beginParse()}else n=r;let o=n.loadMaybeRef();return o&&!o.isExotic?d.loadDirect(e,t,o.beginParse()):d.empty(e,t)}static loadDirect(e,t,r){let n;if(!r)return d.empty(e,t);n=r instanceof a.Cell?r.beginParse():r;let o=(0,l.parseDict)(n,e.bits,t.parse),i=new Map;for(let[t,r]of o)i.set((0,p.serializeInternalKey)(e.parse(t)),r);return new d(i,e,t)}constructor(e,t,r){this._key=t,this._value=r,this._map=e}get size(){return this._map.size}get(e){return this._map.get((0,p.serializeInternalKey)(e))}has(e){return this._map.has((0,p.serializeInternalKey)(e))}set(e,t){return this._map.set((0,p.serializeInternalKey)(e),t),this}delete(e){let t=(0,p.serializeInternalKey)(e);return this._map.delete(t)}clear(){this._map.clear()}*[Symbol.iterator](){for(let[e,t]of this._map){let r=(0,p.deserializeInternalKey)(e);yield[r,t]}}keys(){return Array.from(this._map.keys()).map(e=>(0,p.deserializeInternalKey)(e))}values(){return Array.from(this._map.values())}store(e,t,r){if(0===this._map.size)e.storeBit(0);else{let n=this._key;null!=t&&(n=t);let o=this._value;if(null!=r&&(o=r),!n)throw Error("Key serializer is not defined");if(!o)throw Error("Value serializer is not defined");let a=new Map;for(let[e,t]of this._map)a.set(n.serialize((0,p.deserializeInternalKey)(e)),t);e.storeBit(1);let s=(0,i.beginCell)();(0,f.serializeDict)(a,n.bits,o.serialize,s),e.storeRef(s.endCell())}}storeDirect(e,t,r){if(0===this._map.size)throw Error("Cannot store empty dictionary directly");let n=this._key;null!=t&&(n=t);let o=this._value;
2if(null!=r&&(o=r),!n)throw Error("Key serializer is not defined");if(!o)throw Error("Value serializer is not defined");let i=new Map;for(let[e,t]of this._map)i.set(n.serialize((0,p.deserializeInternalKey)(e)),t);(0,f.serializeDict)(i,n.bits,o.serialize,e)}generateMerkleProof(e){return(0,c.generateMerkleProof)(this,e,this._key)}generateMerkleProofDirect(e){return(0,c.generateMerkleProofDirect)(this,e,this._key)}generateMerkleUpdate(e,t){return(0,u.generateMerkleUpdate)(this,e,this._key,t)}}r.Dictionary=d,d.Keys={Address:()=>({bits:267,serialize:e=>{if(!o.Address.isAddress(e))throw Error("Key is not an address");return(0,i.beginCell)().storeAddress(e).endCell().beginParse().preloadUintBig(267)},parse:e=>(0,i.beginCell)().storeUint(e,267).endCell().beginParse().loadAddress()}),BigInt:e=>{var t;return{bits:t=e,serialize:e=>{if("bigint"!=typeof e)throw Error("Key is not a bigint");return(0,i.beginCell)().storeInt(e,t).endCell().beginParse().loadUintBig(t)},parse:e=>(0,i.beginCell)().storeUint(e,t).endCell().beginParse().loadIntBig(t)}},Int:e=>{var t;return{bits:t=e,serialize:e=>{if("number"!=typeof e)throw Error("Key is not a number");if(!Number.isSafeInteger(e))throw Error("Key is not a safe integer: "+e);return(0,i.beginCell)().storeInt(e,t).endCell().beginParse().loadUintBig(t)},parse:e=>(0,i.beginCell)().storeUint(e,t).endCell().beginParse().loadInt(t)}},BigUint:e=>{var t;return{bits:t=e,serialize:e=>{if("bigint"!=typeof e)throw Error("Key is not a bigint");if(e<0)throw Error("Key is negative: "+e);return(0,i.beginCell)().storeUint(e,t).endCell().beginParse().loadUintBig(t)},parse:e=>(0,i.beginCell)().storeUint(e,t).endCell().beginParse().loadUintBig(t)}},Uint:e=>{var t;return{bits:t=e,serialize:e=>{if("number"!=typeof e)throw Error("Key is not a number");if(!Number.isSafeInteger(e))throw Error("Key is not a safe integer: "+e);if(e<0)throw Error("Key is negative: "+e);return(0,i.beginCell)().storeUint(e,t).endCell().beginParse().loadUintBig(t)},parse:e=>Number((0,i.beginCell)().storeUint(e,t).endCell().beginParse().loadUint(t))}},Buffer:e=>{var t;return{bits:8*(t=e),serialize:e=>{if(!n.Buffer.isBuffer(e))throw Error("Key is not a buffer");return(0,i.beginCell)().storeBuffer(e).endCell().beginParse().loadUintBig(8*t)},parse:e=>(0,i.beginCell)().storeUint(e,8*t).endCell().beginParse().loadBuffer(t)}},BitString:e=>{var t;return{bits:t=e,serialize:e=>{if(!s.BitString.isBitString(e))throw Error("Key is not a BitString");return(0,i.beginCell)().storeBits(e).endCell().beginParse().loadUintBig(t)},parse:e=>(0,i.beginCell)().storeUint(e,t).endCell().beginParse().loadBits(t)}}},d.Values={BigInt:e=>{var t;return t=e,{serialize:(e,r)=>{r.storeInt(e,t)},parse:e=>{let r=e.loadIntBig(t);return e.endParse(),r}}},Int:e=>{var t;return t=e,{serialize:(e,r)=>{r.storeInt(e,t)},parse:e=>{let r=e.loadInt(t);return e.endParse(),r}}},BigVarInt:e=>{var t;return t=e,{serialize:(e,r)=>{r.storeVarInt(e,t)},parse:e=>{let r=e.loadVarIntBig(t);return e.endParse(),r}}},BigUint:e=>{var t;return t=e,{serialize:(e,r)=>{r.storeUint(e,t)},parse:e=>{let r=e.loadUintBig(t);return e.endParse(),r}}},Uint:e=>{var t;return t=e,{serialize:(e,r)=>{r.storeUint(e,t)},parse:e=>{let r=e.loadUint(t);return e.endParse(),r}}},BigVarUint:e=>{var t;return t=e,{serialize:(e,r)=>{r.storeVarUint(e,t)},parse:e=>{let r=e.loadVarUintBig(t);return e.endParse(),r}}},Bool:()=>({serialize:(e,t)=>{t.storeBit(e)},parse:e=>{let t=e.loadBit();return e.endParse(),t}}),Address:()=>({serialize:(e,t)=>{t.storeAddress(e)},parse:e=>{let t=e.loadAddress();return e.endParse(),t}}),Cell:()=>({serialize:(e,t)=>{t.storeRef(e)},parse:e=>{let t=e.loadRef();return e.endParse(),t}}),Buffer:e=>{var t;return t=e,{serialize:(e,r)=>{if(e.length!==t)throw Error("Invalid buffer size");r.storeBuffer(e)},parse:e=>{let r=e.loadBuffer(t);return e.endParse(),r}}},BitString:e=>{var t;return t=e,{serialize:(e,r)=>{if(e.length!==t)throw Error("Invalid BitString size");r.storeBits(e)},parse:e=>{let r=e.loadBits(t);return e.endParse(),r}}},Dictionary:(e,t)=>{var r,n;return r=e,n=t,{serialize:(e,t)=>{e.store(t)},parse:e=>{let t=d.load(r,n,e);return e.endParse(),t}}}}},139237,(e,t,r)=>{"use strict";var n=e.i(329470);
2Object.defineProperty(r,"__esModule",{value:!0}),r.writeString=r.stringToCell=r.readString=void 0;let o=e.r(782459);function i(e,t){if(e.length>0){let r=Math.floor(t.availableBits/8);if(e.length>r){let n=e.subarray(0,r),a=e.subarray(r);t=t.storeBuffer(n);let s=(0,o.beginCell)();i(a,s),t=t.storeRef(s.endCell())}else t=t.storeBuffer(e)}}r.readString=function(e){return(function e(t){let r;if(t.remainingBits%8!=0)throw Error(`Invalid string length: ${t.remainingBits}`);if(0!==t.remainingRefs&&1!==t.remainingRefs)throw Error(`invalid number of refs: ${t.remainingRefs}`);return r=0===t.remainingBits?n.Buffer.alloc(0):t.loadBuffer(t.remainingBits/8),1===t.remainingRefs&&(r=n.Buffer.concat([r,e(t.loadRef().beginParse())])),r})(e).toString()},r.stringToCell=function(e){let t=(0,o.beginCell)();return i(n.Buffer.from(e),t),t.endCell()},r.writeString=function(e,t){i(n.Buffer.from(e),t)}},977009,(e,t,r)=>{"use strict";var n,o=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.Slice=void 0;let i=o(e.r(770653)),a=e.r(605221),s=e.r(782459),c=e.r(139237);class u{constructor(e,t){this[n]=()=>this.toString(),this._reader=e.clone(),this._refs=[...t],this._refsOffset=0}get remainingBits(){return this._reader.remaining}get offsetBits(){return this._reader.offset}get remainingRefs(){return this._refs.length-this._refsOffset}get offsetRefs(){return this._refsOffset}skip(e){return this._reader.skip(e),this}loadBit(){return this._reader.loadBit()}preloadBit(){return this._reader.preloadBit()}loadBoolean(){return this.loadBit()}loadMaybeBoolean(){return this.loadBit()?this.loadBoolean():null}loadBits(e){return this._reader.loadBits(e)}preloadBits(e){return this._reader.preloadBits(e)}loadUint(e){return this._reader.loadUint(e)}loadUintBig(e){return this._reader.loadUintBig(e)}preloadUint(e){return this._reader.preloadUint(e)}preloadUintBig(e){return this._reader.preloadUintBig(e)}loadMaybeUint(e){return this.loadBit()?this.loadUint(e):null}loadMaybeUintBig(e){return this.loadBit()?this.loadUintBig(e):null}loadInt(e){return this._reader.loadInt(e)}loadIntBig(e){return this._reader.loadIntBig(e)}preloadInt(e){return this._reader.preloadInt(e)}preloadIntBig(e){return this._reader.preloadIntBig(e)}loadMaybeInt(e){return this.loadBit()?this.loadInt(e):null}loadMaybeIntBig(e){return this.loadBit()?this.loadIntBig(e):null}loadVarUint(e){return this._reader.loadVarUint(e)}loadVarUintBig(e){return this._reader.loadVarUintBig(e)}preloadVarUint(e){return this._reader.preloadVarUint(e)}preloadVarUintBig(e){return this._reader.preloadVarUintBig(e)}loadVarInt(e){return this._reader.loadVarInt(e)}loadVarIntBig(e){return this._reader.loadVarIntBig(e)}preloadVarInt(e){return this._reader.preloadVarInt(e)}preloadVarIntBig(e){return this._reader.preloadVarIntBig(e)}loadCoins(){return this._reader.loadCoins()}preloadCoins(){return this._reader.preloadCoins()}loadMaybeCoins(){return this._reader.loadBit()?this._reader.loadCoins():null}loadAddress(){return this._reader.loadAddress()}loadMaybeAddress(){return this._reader.loadMaybeAddress()}loadExternalAddress(){return this._reader.loadExternalAddress()}loadMaybeExternalAddress(){return this._reader.loadMaybeExternalAddress()}loadAddressAny(){return this._reader.loadAddressAny()}loadRef(){if(this._refsOffset>=this._refs.length)throw Error("No more references");return this._refs[this._refsOffset++]}preloadRef(){if(this._refsOffset>=this._refs.length)throw Error("No more references");return this._refs[this._refsOffset]}loadMaybeRef(){return this.loadBit()?this.loadRef():null}preloadMaybeRef(){return this.preloadBit()?this.preloadRef():null}loadBuffer(e){return this._reader.loadBuffer(e)}preloadBuffer(e){return this._reader.preloadBuffer(e)}loadStringTail(){return(0,c.readString)(this)}loadMaybeStringTail(){return this.loadBit()?(0,c.readString)(this):null}loadStringRefTail(){return(0,c.readString)(this.loadRef().beginParse())}loadMaybeStringRefTail(){let e=this.loadMaybeRef();return e?(0,c.readString)(e.beginParse()):null}loadDict(e,t){return a.Dictionary.load(e,t,this)}loadDictDirect(e,t){return a.Dictionary.loadDirect(e,t,this)}
2endParse(){if(this.remainingBits>0||this.remainingRefs>0)throw Error("Slice is not empty")}asCell(){return(0,s.beginCell)().storeSlice(this).endCell()}asBuilder(){return(0,s.beginCell)().storeSlice(this)}clone(e=!1){if(e){let e=this._reader.clone();return e.reset(),new u(e,this._refs)}{let e=new u(this._reader,this._refs);return e._refsOffset=this._refsOffset,e}}toString(){return this.asCell().toString()}}r.Slice=u,n=i.default},853925,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.exoticLibrary=void 0;let n=e.r(773094);r.exoticLibrary=function(e,t){let r=new n.BitReader(e);if(264!==e.length)throw Error(`Library cell must have exactly (8 + 256) bits, got "${e.length}"`);let o=r.loadUint(8);if(2!==o)throw Error(`Library cell must have type 2, got "${o}"`);return{}}},382210,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.exoticMerkleUpdate=void 0;let n=e.r(773094);r.exoticMerkleUpdate=function(e,t){let r=new n.BitReader(e);if(552!==e.length)throw Error(`Merkle Update cell must have exactly (8 + (2 * (256 + 16))) bits, got "${e.length}"`);if(2!==t.length)throw Error(`Merkle Update cell must have exactly 2 refs, got "${t.length}"`);let o=r.loadUint(8);if(4!==o)throw Error(`Merkle Update cell type must be exactly 4, got "${o}"`);let i=r.loadBuffer(32),a=r.loadBuffer(32),s=r.loadUint(16),c=r.loadUint(16);if(s!==t[0].depth(0))throw Error(`Merkle Update cell ref depth must be exactly "${s}", got "${t[0].depth(0)}"`);if(!i.equals(t[0].hash(0)))throw Error(`Merkle Update cell ref hash must be exactly "${i.toString("hex")}", got "${t[0].hash(0).toString("hex")}"`);if(c!==t[1].depth(0))throw Error(`Merkle Update cell ref depth must be exactly "${c}", got "${t[1].depth(0)}"`);if(!a.equals(t[1].hash(0)))throw Error(`Merkle Update cell ref hash must be exactly "${a.toString("hex")}", got "${t[1].hash(0).toString("hex")}"`);return{proofDepth1:s,proofDepth2:c,proofHash1:i,proofHash2:a}}},968976,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.LevelMask=void 0;class n{constructor(e=0){this._mask=0,this._mask=e,this._hashIndex=function(e){return e-=e>>1&0x55555555,((e=(0x33333333&e)+(e>>2&0x33333333))+(e>>4)&0xf0f0f0f)*0x1010101>>24}(this._mask),this._hashCount=this._hashIndex+1}get value(){return this._mask}get level(){return 32-Math.clz32(this._mask)}get hashIndex(){return this._hashIndex}get hashCount(){return this._hashCount}apply(e){return new n(this._mask&(1<<e)-1)}isSignificant(e){return 0===e||(this._mask>>e-1)%2!=0}}r.LevelMask=n},264960,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.exoticPruned=void 0;let n=e.r(773094),o=e.r(968976);r.exoticPruned=function(e,t){let r,i=new n.BitReader(e),a=i.loadUint(8);if(1!==a)throw Error(`Pruned branch cell must have type 1, got "${a}"`);if(0!==t.length)throw Error(`Pruned Branch cell can't has refs, got "${t.length}"`);if(280===e.length)r=new o.LevelMask(1);else{if((r=new o.LevelMask(i.loadUint(8))).level<1||r.level>3)throw Error(`Pruned Branch cell level must be >= 1 and <= 3, got "${r.level}/${r.value}"`);let t=16+272*r.apply(r.level-1).hashCount;if(e.length!==t)throw Error(`Pruned branch cell must have exactly ${t} bits, got "${e.length}"`)}let s=[],c=[],u=[];for(let e=0;e<r.level;e++)c.push(i.loadBuffer(32));for(let e=0;e<r.level;e++)u.push(i.loadUint(16));for(let e=0;e<r.level;e++)s.push({depth:u[e],hash:c[e]});return{mask:r.value,pruned:s}}},811799,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.resolveExotic=void 0;let n=e.r(773094),o=e.r(685791),i=e.r(853925),a=e.r(587185),s=e.r(382210),c=e.r(264960),u=e.r(968976);r.resolveExotic=function(e,t){let r=new n.BitReader(e).preloadUint(8);if(1===r)return function(e,t){let r=(0,c.exoticPruned)(e,t),n=[],i=[],a=new u.LevelMask(r.mask);for(let e=0;e<r.pruned.length;e++)n.push(r.pruned[e].depth),i.push(r.pruned[e].hash);return{type:o.CellType.PrunedBranch,depths:n,hashes:i,mask:a}}(e,t);if(2===r){let r;return(0,i.exoticLibrary)(e,t),r=new u.LevelMask,{type:o.CellType.Library,depths:[],hashes:[],mask:r}}if(3===r){let r;
2return(0,a.exoticMerkleProof)(e,t),r=new u.LevelMask(t[0].level()>>1),{type:o.CellType.MerkleProof,depths:[],hashes:[],mask:r}}if(4===r){let r;return(0,s.exoticMerkleUpdate)(e,t),r=new u.LevelMask((t[0].level()|t[1].level())>>1),{type:o.CellType.MerkleUpdate,depths:[],hashes:[],mask:r}}throw Error("Invalid exotic cell type: "+r)}},312176,(e,t,r)=>{"use strict";var n=e.i(329470);Object.defineProperty(r,"__esModule",{value:!0}),r.getRepr=r.getBitsDescriptor=r.getRefsDescriptor=void 0;let o=e.r(685791),i=e.r(419408);function a(e,t,r){return e.length+(r!==o.CellType.Ordinary)*8+32*t}function s(e){let t=e.length;return Math.ceil(t/8)+Math.floor(t/8)}r.getRefsDescriptor=a,r.getBitsDescriptor=s,r.getRepr=function(e,t,r,c,u,l){let f=Math.ceil(t.length/8),p=n.Buffer.alloc(2+f+34*r.length),d=0;for(let n of(p[d++]=a(r,u,l),p[d++]=s(e),(0,i.bitsToPaddedBuffer)(t).copy(p,d),d+=f,r)){let e;e=l==o.CellType.MerkleProof||l==o.CellType.MerkleUpdate?n.depth(c+1):n.depth(c),p[d++]=Math.floor(e/256),p[d++]=e%256}for(let e of r)(l==o.CellType.MerkleProof||l==o.CellType.MerkleUpdate?e.hash(c+1):e.hash(c)).copy(p,d),d+=32;return p}},507241,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.wonderCalculator=void 0;let n=e.r(221870),o=e.r(685791),i=e.r(968976),a=e.r(264960),s=e.r(587185),c=e.r(312176),u=e.r(168002),l=e.r(382210),f=e.r(853925);r.wonderCalculator=function(e,t,r){let p,d=null;if(e===o.CellType.Ordinary){let e=0;for(let t of r)e|=t.mask.value;p=new i.LevelMask(e)}else if(e===o.CellType.PrunedBranch)d=(0,a.exoticPruned)(t,r),p=new i.LevelMask(d.mask);else if(e===o.CellType.MerkleProof)(0,s.exoticMerkleProof)(t,r),p=new i.LevelMask(r[0].mask.value>>1);else if(e===o.CellType.MerkleUpdate)(0,l.exoticMerkleUpdate)(t,r),p=new i.LevelMask((r[0].mask.value|r[1].mask.value)>>1);else if(e===o.CellType.Library)(0,f.exoticLibrary)(t,r),p=new i.LevelMask;else throw Error("Unsupported exotic type");let h=[],y=[],m=e===o.CellType.PrunedBranch?1:p.hashCount,g=p.hashCount-m;for(let i=0,a=0;i<=p.level;i++){let s;if(!p.isSignificant(i))continue;if(a<g){a++;continue}if(a===g){if(0!==i&&e!==o.CellType.PrunedBranch)throw Error("Invalid");s=t}else{if(0===i||e===o.CellType.PrunedBranch)throw Error("Invalid: "+i+", "+e);s=new n.BitString(y[a-g-1],0,256)}let l=0;for(let t of r){let r;l=Math.max(l,r=e==o.CellType.MerkleProof||e==o.CellType.MerkleUpdate?t.depth(i+1):t.depth(i))}r.length>0&&l++;let f=(0,c.getRepr)(t,s,r,i,p.apply(i).value,e),d=(0,u.sha256_sync)(f),m=a-g;h[m]=l,y[m]=d,a++}let b=[],v=[];if(d)for(let e=0;e<4;e++){let{hashIndex:t}=p.apply(e),{hashIndex:r}=p;t!==r?(b.push(d.pruned[t].hash),v.push(d.pruned[t].depth)):(b.push(y[0]),v.push(h[0]))}else for(let e=0;e<4;e++)b.push(y[p.apply(e).hashIndex]),v.push(h[p.apply(e).hashIndex]);return{mask:p,hashes:b,depths:v}}},657121,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.topologicalSort=void 0,r.topologicalSort=function(e){let t=[e],r=new Map,n=new Set,o=[];for(;t.length>0;){let e=[...t];for(let o of(t=[],e)){let e=o.hash().toString("hex");if(!r.has(e))for(let i of(n.add(e),r.set(e,{cell:o,refs:o.refs.map(e=>e.hash().toString("hex"))}),o.refs))t.push(i)}}let i=new Set;for(;n.size>0;)!function e(t){if(!n.has(t))return;if(i.has(t))throw Error("Not a DAG");i.add(t);let a=r.get(t).refs;for(let t=a.length-1;t>=0;t--)e(a[t]);o.push(t),i.delete(t),n.delete(t)}(Array.from(n)[0]);let a=new Map;for(let e=0;e<o.length;e++)a.set(o[o.length-e-1],e);let s=[];for(let e=o.length-1;e>=0;e--){let t=o[e],n=r.get(t);s.push({cell:n.cell,refs:n.refs.map(e=>a.get(e))})}return s}},831946,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.bitsForNumber=void 0,r.bitsForNumber=function(e,t){let r=BigInt(e);if("int"===t)return 0n===r||r===-1n?1:(r>0?r:-r).toString(2).length+1;if("uint"===t){if(r<0)throw Error(`value is negative. Got ${e}`);return r.toString(2).length}throw Error(`invalid mode. Got ${t}`)}},557352,(e,t,r)=>{"use strict";var n=e.i(329470);Object.defineProperty(r,"__esModule",{value:!0}),r.crc32c=void 0,r.crc32c=function(e){let t=-1;for(let r=0;r<e.length;r++)t^=e[r],t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&t?t>>>1^0x82f63b78:t>>>1)?t>>>1^0x82f63b78:t>>>1)?t>>>1^0x82f63b78:t>>>1)?t>>>1^0x82f63b78:t>>>1)?t>>>1^0x82f63b78:t>>>1)?t>>>1^0x82f63b78:t>>>1)?t>>>1^0x82f63b78:t>>>1)?t>>>1^0x82f63b78:t>>>1;t^=0xffffffff;let r=n.Buffer.alloc(4);return r.writeInt32LE(t),r}},692788,(e,t,r)=>{"use strict";
2Object.defineProperty(r,"__esModule",{value:!0}),r.serializeBoc=r.deserializeBoc=r.parseBoc=void 0;let n=e.r(773094),o=e.r(221870),i=e.r(58234),a=e.r(657121),s=e.r(831946),c=e.r(779546),u=e.r(312176),l=e.r(419408),f=e.r(557352);function p(e){let t=0;for(let r=0;r<3;r++)t+=1&e,e>>=1;return t+1}function d(e){let t=new n.BitReader(new o.BitString(e,0,8*e.length)),r=t.loadUint(32);if(0x68ff65f3===r){let e=t.loadUint(8),r=t.loadUint(8),n=t.loadUint(8*e),o=t.loadUint(8*e),i=t.loadUint(8*e),a=t.loadUint(8*r),s=t.loadBuffer(n*r),c=t.loadBuffer(a);return{size:e,offBytes:r,cells:n,roots:o,absent:i,totalCellSize:a,index:s,cellData:c,root:[0]}}if(0xacc3a728===r){let r=t.loadUint(8),n=t.loadUint(8),o=t.loadUint(8*r),i=t.loadUint(8*r),a=t.loadUint(8*r),s=t.loadUint(8*n),c=t.loadBuffer(o*n),u=t.loadBuffer(s),l=t.loadBuffer(4);if(!(0,f.crc32c)(e.subarray(0,e.length-4)).equals(l))throw Error("Invalid CRC32C");return{size:r,offBytes:n,cells:o,roots:i,absent:a,totalCellSize:s,index:c,cellData:u,root:[0]}}if(0xb5ee9c72===r){let r=t.loadUint(1),n=t.loadUint(1);t.loadUint(1),t.loadUint(2);let o=t.loadUint(3),i=t.loadUint(8),a=t.loadUint(8*o),s=t.loadUint(8*o),c=t.loadUint(8*o),u=t.loadUint(8*i),l=[];for(let e=0;e<s;e++)l.push(t.loadUint(8*o));let p=null;r&&(p=t.loadBuffer(a*i));let d=t.loadBuffer(u);if(n){let r=t.loadBuffer(4);if(!(0,f.crc32c)(e.subarray(0,e.length-4)).equals(r))throw Error("Invalid CRC32C")}return{size:o,offBytes:i,cells:a,roots:s,absent:c,totalCellSize:u,index:p,cellData:d,root:l}}throw Error("Invalid magic")}r.parseBoc=d,r.deserializeBoc=function(e){let t=d(e),r=new n.BitReader(new o.BitString(t.cellData,0,8*t.cellData.length)),a=[];for(let e=0;e<t.cells;e++){let e=function(e,t){let r=e.loadUint(8),n=r%8,i=e.loadUint(8),a=Math.ceil(i/2),s=r>>5,c=(16&r)!=0,u=c?32*p(7&s):0,l=c?2*p(7&s):0;e.skip(8*u),e.skip(8*l);let f=o.BitString.EMPTY;a>0&&(f=i%2?e.loadPaddedBits(8*a):e.loadBits(8*a));let d=[];for(let r=0;r<n;r++)d.push(e.loadUint(8*t));return{bits:f,refs:d,exotic:!!(8&r)}}(r,t.size);a.push({...e,result:null})}for(let e=a.length-1;e>=0;e--){if(a[e].result)throw Error("Impossible");let t=[];for(let r of a[e].refs){if(!a[r].result)throw Error("Invalid BOC file");t.push(a[r].result)}a[e].result=new i.Cell({bits:a[e].bits,refs:t,exotic:a[e].exotic})}let s=[];for(let e=0;e<t.root.length;e++)s.push(a[t.root[e]].result);return s},r.serializeBoc=function(e,t){let r=(0,a.topologicalSort)(e),n=r.length,o=t.idx,i=t.crc32,p=Math.max(Math.ceil((0,s.bitsForNumber)(n,"uint")/8),1),d=0,h=[];for(let e of r){var y;d+=(y=e.cell,2+Math.ceil(y.bits.length/8)+y.refs.length*p),h.push(d)}let m=Math.max(Math.ceil((0,s.bitsForNumber)(d,"uint")/8),1),g=(6+3*p+m+ +p+(o?n*m:0)+d+4*!!i)*8,b=new c.BitBuilder(g);if(b.writeUint(0xb5ee9c72,32),b.writeBit(o),b.writeBit(i),b.writeBit(!1),b.writeUint(0,2),b.writeUint(p,3),b.writeUint(m,8),b.writeUint(n,8*p),b.writeUint(1,8*p),b.writeUint(0,8*p),b.writeUint(d,8*m),b.writeUint(0,8*p),o)for(let e=0;e<n;e++)b.writeUint(h[e],8*m);for(let e=0;e<n;e++)!function(e,t,r,n){let o=(0,u.getRefsDescriptor)(e.refs,e.mask.value,e.type),i=(0,u.getBitsDescriptor)(e.bits);for(let a of(n.writeUint(o,8),n.writeUint(i,8),n.writeBuffer((0,l.bitsToPaddedBuffer)(e.bits)),t))n.writeUint(a,8*r)}(r[e].cell,r[e].refs,p,b);if(i){let e=(0,f.crc32c)(b.buffer());b.writeBuffer(e)}let v=b.buffer();if(v.length!==g/8)throw Error("Internal error");return v}},58234,(e,t,r)=>{"use strict";var n,o=e.i(329470),i=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.Cell=void 0;let a=i(e.r(770653)),s=e.r(221870),c=e.r(685791),u=e.r(977009),l=e.r(811799),f=e.r(507241),p=e.r(692788),d=e.r(773094),h=e.r(782459);class y{static fromBoc(e){return(0,p.deserializeBoc)(e)}static fromBase64(e){let t=y.fromBoc(o.Buffer.from(e,"base64"));if(1!==t.length)throw Error("Deserialized more than one cell");return t[0]}static fromHex(e){let t=y.fromBoc(o.Buffer.from(e,"hex"));if(1!==t.length)throw Error("Deserialized more than one cell");return t[0]}constructor(e){let t,r,o;this._hashes=[],this._depths=[],this.beginParse=(e=!1)=>
2{if(this.isExotic&&!e)throw Error("Exotic cells cannot be parsed");return new u.Slice(new d.BitReader(this.bits),this.refs)},this.hash=(e=3)=>this._hashes[Math.min(this._hashes.length-1,e)],this.depth=(e=3)=>this._depths[Math.min(this._depths.length-1,e)],this.level=()=>this.mask.level,this.equals=e=>this.hash().equals(e.hash()),this[n]=()=>this.toString();let i=s.BitString.EMPTY;e&&e.bits&&(i=e.bits);let a=[];e&&e.refs&&(a=[...e.refs]);let p=c.CellType.Ordinary;if(e&&e.exotic){let e=(0,l.resolveExotic)(i,a),n=(0,f.wonderCalculator)(e.type,i,a);o=n.mask,r=n.depths,t=n.hashes,p=e.type}else{if(a.length>4)throw Error("Invalid number of references");if(i.length>1023)throw Error(`Bits overflow: ${i.length} > 1023`);let e=(0,f.wonderCalculator)(c.CellType.Ordinary,i,a);o=e.mask,r=e.depths,t=e.hashes,p=c.CellType.Ordinary}this.type=p,this.bits=i,this.refs=a,this.mask=o,this._depths=r,this._hashes=t,Object.freeze(this),Object.freeze(this.refs),Object.freeze(this.bits),Object.freeze(this.mask),Object.freeze(this._depths),Object.freeze(this._hashes)}get isExotic(){return this.type!==c.CellType.Ordinary}toBoc(e){let t=!!e&&null!==e.idx&&void 0!==e.idx&&e.idx,r=!e||null===e.crc32||void 0===e.crc32||e.crc32;return(0,p.serializeBoc)(this,{idx:t,crc32:r})}toString(e){let t=e||"",r="x";this.isExotic&&(this.type===c.CellType.MerkleProof?r="p":this.type===c.CellType.MerkleUpdate?r="u":this.type===c.CellType.PrunedBranch&&(r="p"));let n=t+(this.isExotic?r:"x")+"{"+this.bits.toString()+"}";for(let e in this.refs)n+="\n"+this.refs[e].toString(t+" ");return n}asSlice(){return this.beginParse()}asBuilder(){return(0,h.beginCell)().storeSlice(this.asSlice())}}r.Cell=y,n=a.default,y.EMPTY=new y},782459,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Builder=r.beginCell=void 0;let n=e.r(779546),o=e.r(58234),i=e.r(139237);function a(){return new s}r.beginCell=a;class s{constructor(){this._bits=new n.BitBuilder,this._refs=[]}get bits(){return this._bits.length}get refs(){return this._refs.length}get availableBits(){return 1023-this.bits}get availableRefs(){return 4-this.refs}storeBit(e){return this._bits.writeBit(e),this}storeBits(e){return this._bits.writeBits(e),this}storeBuffer(e,t){if(null!=t&&e.length!==t)throw Error(`Buffer length ${e.length} is not equal to ${t}`);return this._bits.writeBuffer(e),this}storeMaybeBuffer(e,t){return null!==e?(this.storeBit(1),this.storeBuffer(e,t)):this.storeBit(0),this}storeUint(e,t){return this._bits.writeUint(e,t),this}storeMaybeUint(e,t){return null!=e?(this.storeBit(1),this.storeUint(e,t)):this.storeBit(0),this}storeInt(e,t){return this._bits.writeInt(e,t),this}storeMaybeInt(e,t){return null!=e?(this.storeBit(1),this.storeInt(e,t)):this.storeBit(0),this}storeVarUint(e,t){return this._bits.writeVarUint(e,t),this}storeMaybeVarUint(e,t){return null!=e?(this.storeBit(1),this.storeVarUint(e,t)):this.storeBit(0),this}storeVarInt(e,t){return this._bits.writeVarInt(e,t),this}storeMaybeVarInt(e,t){return null!=e?(this.storeBit(1),this.storeVarInt(e,t)):this.storeBit(0),this}storeCoins(e){return this._bits.writeCoins(e),this}storeMaybeCoins(e){return null!=e?(this.storeBit(1),this.storeCoins(e)):this.storeBit(0),this}storeAddress(e){return this._bits.writeAddress(e),this}storeRef(e){if(this._refs.length>=4)throw Error("Too many references");if(e instanceof o.Cell)this._refs.push(e);else if(e instanceof s)this._refs.push(e.endCell());else throw Error("Invalid argument");return this}storeMaybeRef(e){return e?(this.storeBit(1),this.storeRef(e)):this.storeBit(0),this}storeSlice(e){let t=e.clone();for(t.remainingBits>0&&this.storeBits(t.loadBits(t.remainingBits));t.remainingRefs>0;)this.storeRef(t.loadRef());return this}storeMaybeSlice(e){return e?(this.storeBit(1),this.storeSlice(e)):this.storeBit(0),this}storeBuilder(e){return this.storeSlice(e.endCell().beginParse())}storeMaybeBuilder(e){return e?(this.storeBit(1),this.storeBuilder(e)):this.storeBit(0),this}storeWritable(e){return"object"==typeof e?e.writeTo(this):e(this),this}storeMaybeWritable(e){return e?(this.storeBit(1),this.storeWritable(e)):this.storeBit(0),this}store(e){return this.storeWritable(e),this}storeStringTail(e){return(0,i.writeString)(e,this),this}storeMaybeStringTail(e){return null!=e?(this.storeBit(1),(0,i.writeString)(e,this)):this.storeBit(0),this}storeStringRefTail(e){return this.storeRef(a().storeStringTail(e)),this}storeMaybeStringRefTail(e){return null!=e?(this.storeBit(1),this.storeStringRefTail(e)):this.storeBit(0),this}storeDict(e,t,r){return e?e.store(this,t,r):this.storeBit(0),this}storeDictDirect(e,t,r){return e.storeDirect(this,t,r),this}endCell(e){return new o.Cell({bits:this._bits.build(),refs:this._refs,exotic:e?.exotic})}asCell(){return this.endCell()}asSlice(){return this.endCell().beginParse()}}r.Builder=s},687187,(e,t,r)=>{"use strict";function n(e){return{public:e.loadBit(),root:e.loadRef()}}function o(e){return t=>{t.storeBit(e.public),t.storeRef(e.root)}}
2Object.defineProperty(r,"__esModule",{value:!0}),r.SimpleLibraryValue=r.storeSimpleLibrary=r.loadSimpleLibrary=void 0,r.loadSimpleLibrary=n,r.storeSimpleLibrary=o,r.SimpleLibraryValue={serialize(e,t){o(e)(t)},parse:e=>n(e)}},662039,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeTickTock=r.loadTickTock=void 0,r.loadTickTock=function(e){return{tick:e.loadBit(),tock:e.loadBit()}},r.storeTickTock=function(e){return t=>{t.storeBit(e.tick),t.storeBit(e.tock)}}},761350,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeStateInit=r.loadStateInit=void 0;let n=e.r(605221),o=e.r(687187),i=e.r(662039);r.loadStateInit=function(e){let t,r;e.loadBit()&&(t=e.loadUint(5)),e.loadBit()&&(r=(0,i.loadTickTock)(e));let a=e.loadMaybeRef(),s=e.loadMaybeRef(),c=e.loadDict(n.Dictionary.Keys.BigUint(256),o.SimpleLibraryValue);return 0===c.size&&(c=void 0),{splitDepth:t,special:r,code:a,data:s,libraries:c}},r.storeStateInit=function(e){return t=>{null!==e.splitDepth&&void 0!==e.splitDepth?(t.storeBit(!0),t.storeUint(e.splitDepth,5)):t.storeBit(!1),null!==e.special&&void 0!==e.special?(t.storeBit(!0),t.store((0,i.storeTickTock)(e.special))):t.storeBit(!1),t.storeMaybeRef(e.code),t.storeMaybeRef(e.data),t.storeDict(e.libraries)}}},901978,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.contractAddress=void 0;let n=e.r(782459),o=e.r(761350),i=e.r(723184);r.contractAddress=function(e,t){let r=(0,n.beginCell)().store((0,o.storeStateInit)(t)).endCell().hash();return new i.Address(e,r)}},166085,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parseTuple=r.serializeTuple=r.parseTupleItem=r.serializeTupleItem=void 0;let n=e.r(782459),o=BigInt("-9223372036854775808"),i=BigInt("9223372036854775807");function a(e,t){if("null"===e.type)t.storeUint(0,8);else if("int"===e.type)e.value<=i&&e.value>=o?(t.storeUint(1,8),t.storeInt(e.value,64)):(t.storeUint(256,15),t.storeInt(e.value,257));else if("nan"===e.type)t.storeInt(767,16);else if("cell"===e.type)t.storeUint(3,8),t.storeRef(e.cell);else if("slice"===e.type)t.storeUint(4,8),t.storeUint(0,10),t.storeUint(e.cell.bits.length,10),t.storeUint(0,3),t.storeUint(e.cell.refs.length,3),t.storeRef(e.cell);else if("builder"===e.type)t.storeUint(5,8),t.storeRef(e.cell);else if("tuple"===e.type){let r=null,o=null;for(let t=0;t<e.items.length;t++){let i=r;r=o,o=i,t>1&&(r=(0,n.beginCell)().storeRef(o).storeRef(r).endCell());let s=(0,n.beginCell)();a(e.items[t],s),o=s.endCell()}t.storeUint(7,8),t.storeUint(e.items.length,16),r&&t.storeRef(r),o&&t.storeRef(o)}else throw Error("Invalid value")}function s(e){let t=e.loadUint(8);if(0===t)return{type:"null"};if(1===t)return{type:"int",value:e.loadIntBig(64)};if(2===t)if(0===e.loadUint(7))return{type:"int",value:e.loadIntBig(257)};else return e.loadBit(),{type:"nan"};if(3===t)return{type:"cell",cell:e.loadRef()};if(4===t){let t=e.loadUint(10),r=e.loadUint(10),o=e.loadUint(3),i=e.loadUint(3),a=e.loadRef().beginParse();a.skip(t);let s=a.loadBits(r-t),c=(0,n.beginCell)().storeBits(s);if(o<i){for(let e=0;e<o;e++)a.loadRef();for(let e=0;e<i-o;e++)c.storeRef(a.loadRef())}return{type:"slice",cell:c.endCell()}}else if(5===t)return{type:"builder",cell:e.loadRef()};else if(7===t){let t=e.loadUint(16),r=[];if(t>1){let n=e.loadRef().beginParse(),o=e.loadRef().beginParse();r.unshift(s(o));for(let e=0;e<t-2;e++){let e=n;n=e.loadRef().beginParse(),o=e.loadRef().beginParse(),r.unshift(s(o))}r.unshift(s(n))}else 1===t&&r.push(s(e.loadRef().beginParse()));return{type:"tuple",items:r}}else throw Error("Unsupported stack item")}r.serializeTupleItem=a,r.parseTupleItem=s,r.serializeTuple=function(e){let t=(0,n.beginCell)();return t.storeUint(e.length,24),!function e(t,r){if(t.length>0){let o=(0,n.beginCell)();e(t.slice(0,t.length-1),o),r.storeRef(o.endCell()),a(t[t.length-1],r)}}([...e],t),t.endCell()},r.parseTuple=function(e){let t=[],r=e.beginParse(),n=r.loadUint(24);for(let e=0;e<n;e++){let e=r.loadRef();t.unshift(s(r)),r=e.beginParse()}return t}},53402,(e,t,r)=>{"use strict";
2Object.defineProperty(r,"__esModule",{value:!0}),r.TupleReader=void 0;class n{constructor(e){this.items=[...e]}get remaining(){return this.items.length}peek(){if(0===this.items.length)throw Error("EOF");return this.items[0]}pop(){if(0===this.items.length)throw Error("EOF");let e=this.items[0];return this.items.splice(0,1),e}skip(e=1){for(let t=0;t<e;t++)this.pop();return this}readBigNumber(){let e=this.pop();if("int"!==e.type)throw Error("Not a number");return e.value}readBigNumberOpt(){let e=this.pop();if("null"===e.type)return null;if("int"!==e.type)throw Error("Not a number");return e.value}readNumber(){return Number(this.readBigNumber())}readNumberOpt(){let e=this.readBigNumberOpt();return null!==e?Number(e):null}readBoolean(){return 0!==this.readNumber()}readBooleanOpt(){let e=this.readNumberOpt();return null!==e?0!==e:null}readAddress(){let e=this.readCell().beginParse().loadAddress();if(null!==e)return e;throw Error("Not an address")}readAddressOpt(){let e=this.readCellOpt();return null!==e?e.beginParse().loadMaybeAddress():null}readCell(){let e=this.pop();if("cell"!==e.type&&"slice"!==e.type&&"builder"!==e.type)throw Error("Not a cell: "+e.type);return e.cell}readCellOpt(){let e=this.pop();if("null"===e.type)return null;if("cell"!==e.type&&"slice"!==e.type&&"builder"!==e.type)throw Error("Not a cell");return e.cell}readTuple(){let e=this.pop();if("tuple"!==e.type)throw Error("Not a tuple");return new n(e.items)}readTupleOpt(){let e=this.pop();if("null"===e.type)return null;if("tuple"!==e.type)throw Error("Not a tuple");return new n(e.items)}static readLispList(e){let t=[],r=e;for(;null!==r;){var n=r.pop();if(0===r.items.length||"tuple"!==r.items[0].type&&"null"!==r.items[0].type)throw Error("Lisp list consists only from (any, tuple) elements and ends with null");r=r.readTupleOpt(),t.push(n)}return t}readLispListDirect(){return 1===this.items.length&&"null"===this.items[0].type?[]:n.readLispList(this)}readLispList(){return n.readLispList(this.readTupleOpt())}readBuffer(){let e=this.readCell().beginParse();if(0!==e.remainingRefs||e.remainingBits%8!=0)throw Error("Not a buffer");return e.loadBuffer(e.remainingBits/8)}readBufferOpt(){let e=this.readCellOpt();if(null===e)return null;{let t=e.beginParse();if(0!==t.remainingRefs||t.remainingBits%8!=0)throw Error("Not a buffer");return t.loadBuffer(t.remainingBits/8)}}readString(){return this.readCell().beginParse().loadStringTail()}readStringOpt(){let e=this.readCellOpt();return null!==e?e.beginParse().loadStringTail():null}}r.TupleReader=n},810862,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TupleBuilder=void 0;let n=e.r(782459),o=e.r(58234),i=e.r(977009);r.TupleBuilder=class{constructor(){this._tuple=[]}writeNumber(e){null==e?this._tuple.push({type:"null"}):this._tuple.push({type:"int",value:BigInt(e)})}writeBoolean(e){null==e?this._tuple.push({type:"null"}):this._tuple.push({type:"int",value:e?-1n:0n})}writeBuffer(e){null==e?this._tuple.push({type:"null"}):this._tuple.push({type:"slice",cell:(0,n.beginCell)().storeBuffer(e).endCell()})}writeString(e){null==e?this._tuple.push({type:"null"}):this._tuple.push({type:"slice",cell:(0,n.beginCell)().storeStringTail(e).endCell()})}writeCell(e){null==e?this._tuple.push({type:"null"}):e instanceof o.Cell?this._tuple.push({type:"cell",cell:e}):e instanceof i.Slice&&this._tuple.push({type:"cell",cell:e.asCell()})}writeSlice(e){null==e?this._tuple.push({type:"null"}):e instanceof o.Cell?this._tuple.push({type:"slice",cell:e}):e instanceof i.Slice&&this._tuple.push({type:"slice",cell:e.asCell()})}writeBuilder(e){null==e?this._tuple.push({type:"null"}):e instanceof o.Cell?this._tuple.push({type:"builder",cell:e}):e instanceof i.Slice&&this._tuple.push({type:"builder",cell:e.asCell()})}writeTuple(e){null==e?this._tuple.push({type:"null"}):this._tuple.push({type:"tuple",items:e})}writeAddress(e){null==e?this._tuple.push({type:"null"}):this._tuple.push({type:"slice",cell:(0,n.beginCell)().storeAddress(e).endCell()})}build(){return[...this._tuple]}}},940778,(e,t,r)=>{"use strict";
2Object.defineProperty(r,"__esModule",{value:!0}),r.fromNano=r.toNano=void 0,r.toNano=function(e){if("bigint"==typeof e)return 1000000000n*e;{if("number"==typeof e){if(!Number.isFinite(e))throw Error("Invalid number");if(6>=Math.log10(e))e=e.toLocaleString("en",{minimumFractionDigits:9,useGrouping:!1});else if(e-Math.trunc(e)==0)e=e.toLocaleString("en",{maximumFractionDigits:0,useGrouping:!1});else throw Error("Not enough precision for a number value. Use string value instead")}let t=!1;for(;e.startsWith("-");)t=!t,e=e.slice(1);if("."===e)throw Error("Invalid number");let r=e.split(".");if(r.length>2)throw Error("Invalid number");let n=r[0],o=r[1];if(n||(n="0"),o||(o="0"),o.length>9)throw Error("Invalid number");for(;o.length<9;)o+="0";let i=1000000000n*BigInt(n)+BigInt(o);return t&&(i=-i),i}},r.fromNano=function(e){let t=BigInt(e),r=!1;t<0&&(r=!0,t=-t);let n=(t%1000000000n).toString();for(;n.length<9;)n="0"+n;n=n.match(/^([0-9]*[1-9]|0)(0*)/)[1];let o=(t/1000000000n).toString(),i=`${o}${"0"===n?"":`.${n}`}`;return r&&(i="-"+i),i}},529959,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.packExtraCurrencyCell=r.packExtraCurrencyDict=r.storeExtraCurrency=r.loadMaybeExtraCurrency=r.loadExtraCurrency=void 0;let n=e.r(782459),o=e.r(605221);function i(e){let t=e instanceof o.Dictionary?e:o.Dictionary.loadDirect(o.Dictionary.Keys.Uint(32),o.Dictionary.Values.BigVarUint(5),e),r={};for(let[e,n]of t)r[e]=n;return r}function a(e){let t=o.Dictionary.empty(o.Dictionary.Keys.Uint(32),o.Dictionary.Values.BigVarUint(5));return Object.entries(e).map(([e,r])=>t.set(Number(e),r)),t}r.loadExtraCurrency=i,r.loadMaybeExtraCurrency=function(e){let t=e.loadMaybeRef();return null===t?t:i(t)},r.storeExtraCurrency=function(e){return t=>{t.storeDict(a(e))}},r.packExtraCurrencyDict=a,r.packExtraCurrencyCell=function(e){return(0,n.beginCell)().storeDictDirect(a(e)).endCell()}},589767,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.comment=r.external=r.internal=void 0;let n=e.r(723184),o=e.r(58234),i=e.r(782459),a=e.r(940778),s=e.r(529959);r.internal=function(e){let t,r,c,u=!0;if(null!==e.bounce&&void 0!==e.bounce&&(u=e.bounce),"string"==typeof e.to)t=n.Address.parse(e.to);else if(n.Address.isAddress(e.to))t=e.to;else throw Error(`Invalid address ${e.to}`);r="string"==typeof e.value?(0,a.toNano)(e.value):e.value,e.extracurrency&&(c=(0,s.packExtraCurrencyDict)(e.extracurrency));let l=o.Cell.EMPTY;return"string"==typeof e.body?l=(0,i.beginCell)().storeUint(0,32).storeStringTail(e.body).endCell():e.body&&(l=e.body),{info:{type:"internal",dest:t,value:{coins:r,other:c},bounce:u,ihrDisabled:!0,bounced:!1,ihrFee:0n,forwardFee:0n,createdAt:0,createdLt:0n},init:e.init??void 0,body:l}},r.external=function(e){let t;if("string"==typeof e.to)t=n.Address.parse(e.to);else if(n.Address.isAddress(e.to))t=e.to;else throw Error(`Invalid address ${e.to}`);return{info:{type:"external-in",dest:t,importFee:0n},init:e.init??void 0,body:e.body||o.Cell.EMPTY}},r.comment=function(e){return(0,i.beginCell)().storeUint(0,32).storeStringTail(e).endCell()}},121898,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeAccountState=r.loadAccountState=void 0;let n=e.r(761350);r.loadAccountState=function(e){return e.loadBit()?{type:"active",state:(0,n.loadStateInit)(e)}:e.loadBit()?{type:"frozen",stateHash:e.loadUintBig(256)}:{type:"uninit"}},r.storeAccountState=function(e){return t=>{"active"===e.type?(t.storeBit(!0),t.store((0,n.storeStateInit)(e.state))):"frozen"===e.type?(t.storeBit(!1),t.storeBit(!0),t.storeUint(e.stateHash,256)):"uninit"===e.type&&(t.storeBit(!1),t.storeBit(!1))}}},400954,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeCurrencyCollection=r.loadCurrencyCollection=void 0;let n=e.r(605221);r.loadCurrencyCollection=function(e){let t=e.loadCoins(),r=e.loadDict(n.Dictionary.Keys.Uint(32),n.Dictionary.Values.BigVarUint(5));return 0===r.size?{coins:t}:{other:r,coins:t}},r.storeCurrencyCollection=function(e){return t=>{t.storeCoins(e.coins),e.other?t.storeDict(e.other):t.storeBit(0)}}},728123,(e,t,r)=>{"use strict";
2Object.defineProperty(r,"__esModule",{value:!0}),r.storeAccountStorage=r.loadAccountStorage=void 0;let n=e.r(121898),o=e.r(400954);r.loadAccountStorage=function(e){return{lastTransLt:e.loadUintBig(64),balance:(0,o.loadCurrencyCollection)(e),state:(0,n.loadAccountState)(e)}},r.storeAccountStorage=function(e){return t=>{t.storeUint(e.lastTransLt,64),t.store((0,o.storeCurrencyCollection)(e.balance)),t.store((0,n.storeAccountState)(e.state))}}},121838,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeStorageExtraInfo=r.loadStorageExtraInfo=void 0,r.loadStorageExtraInfo=function(e){let t=e.loadUint(3);if(0===t)return null;if(1===t)return{dictHash:e.loadUintBig(256)};throw Error(`Invalid storage extra info header: ${t}`)},r.storeStorageExtraInfo=function(e){return t=>{null==e?t.storeUint(0,3):(t.storeUint(1,3),t.storeUint(e.dictHash,256))}}},770157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeStorageUsed=r.loadStorageUsed=void 0,r.loadStorageUsed=function(e){return{cells:e.loadVarUintBig(3),bits:e.loadVarUintBig(3)}},r.storeStorageUsed=function(e){return t=>{t.storeVarUint(e.cells,3),t.storeVarUint(e.bits,3)}}},491480,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeStorageInfo=r.loadStorageInfo=void 0;let n=e.r(121838),o=e.r(770157);r.loadStorageInfo=function(e){return{used:(0,o.loadStorageUsed)(e),storageExtra:(0,n.loadStorageExtraInfo)(e),lastPaid:e.loadUint(32),duePayment:e.loadMaybeCoins()}},r.storeStorageInfo=function(e){return t=>{t.store((0,o.storeStorageUsed)(e.used)),t.store((0,n.storeStorageExtraInfo)(e.storageExtra)),t.storeUint(e.lastPaid,32),t.storeMaybeCoins(e.duePayment)}}},361005,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeAccount=r.loadAccount=void 0;let n=e.r(728123),o=e.r(491480);r.loadAccount=function(e){return{addr:e.loadAddress(),storageStats:(0,o.loadStorageInfo)(e),storage:(0,n.loadAccountStorage)(e)}},r.storeAccount=function(e){return t=>{t.storeAddress(e.addr),t.store((0,o.storeStorageInfo)(e.storageStats)),t.store((0,n.storeAccountStorage)(e.storage))}}},473357,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeAccountStatus=r.loadAccountStatus=void 0,r.loadAccountStatus=function(e){let t=e.loadUint(2);if(0===t)return"uninitialized";if(1===t)return"frozen";if(2===t)return"active";if(3===t)return"non-existing";throw Error("Invalid data")},r.storeAccountStatus=function(e){return t=>{if("uninitialized"===e)t.storeUint(0,2);else if("frozen"===e)t.storeUint(1,2);else if("active"===e)t.storeUint(2,2);else if("non-existing"===e)t.storeUint(3,2);else throw Error("Invalid data");return t}}},592400,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeAccountStatusChange=r.loadAccountStatusChange=void 0,r.loadAccountStatusChange=function(e){return e.loadBit()?e.loadBit()?"deleted":"frozen":"unchanged"},r.storeAccountStatusChange=function(e){return t=>{if("unchanged"==e)t.storeBit(0);else if("frozen"===e)t.storeBit(1),t.storeBit(0);else if("deleted"===e)t.storeBit(1),t.storeBit(1);else throw Error("Invalid account status change")}}},157380,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeCommonMessageInfoRelaxed=r.loadCommonMessageInfoRelaxed=void 0;let n=e.r(400954);r.loadCommonMessageInfoRelaxed=function(e){if(!e.loadBit()){let t=e.loadBit(),r=e.loadBit(),o=e.loadBit(),i=e.loadMaybeAddress(),a=e.loadAddress(),s=(0,n.loadCurrencyCollection)(e),c=e.loadCoins(),u=e.loadCoins();return{type:"internal",ihrDisabled:t,bounce:r,bounced:o,src:i,dest:a,value:s,ihrFee:c,forwardFee:u,createdLt:e.loadUintBig(64),createdAt:e.loadUint(32)}}if(!e.loadBit())throw Error("External In message is not possible for CommonMessageInfoRelaxed");let t=e.loadMaybeAddress(),r=e.loadMaybeExternalAddress();return{type:"external-out",src:t,dest:r,createdLt:e.loadUintBig(64),createdAt:e.loadUint(32)}},r.storeCommonMessageInfoRelaxed=function(e){return t=>{if("internal"===e.type)t.storeBit(0),t.storeBit(e.ihrDisabled),t.storeBit(e.bounce),t.storeBit(e.bounced),t.storeAddress(e.src),t.storeAddress(e.dest),t.store((0,n.storeCurrencyCollection)(e.value)),t.storeCoins(e.ihrFee),t.storeCoins(e.forwardFee),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else if("external-out"===e.type)t.storeBit(1),t.storeBit(1),t.storeAddress(e.src),t.storeAddress(e.dest),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else throw Error("Unknown CommonMessageInfo type")}}},849214,(e,t,r)=>{"use strict";
2Object.defineProperty(r,"__esModule",{value:!0}),r.storeMessageRelaxed=r.loadMessageRelaxed=void 0;let n=e.r(782459),o=e.r(157380),i=e.r(761350);r.loadMessageRelaxed=function(e){let t=(0,o.loadCommonMessageInfoRelaxed)(e),r=null;return e.loadBit()&&(r=e.loadBit()?(0,i.loadStateInit)(e.loadRef().beginParse()):(0,i.loadStateInit)(e)),{info:t,init:r,body:e.loadBit()?e.loadRef():e.asCell()}},r.storeMessageRelaxed=function(e,t){return r=>{if(r.store((0,o.storeCommonMessageInfoRelaxed)(e.info)),e.init){r.storeBit(!0);let o=(0,n.beginCell)().store((0,i.storeStateInit)(e.init));t&&t.forceRef||!(r.availableBits-2>=o.bits)?(r.storeBit(!0),r.storeRef(o)):(r.storeBit(!1),r.storeBuilder(o))}else r.storeBit(!1);t&&t.forceRef||!(r.availableBits-1>=e.body.bits.length)||!(r.refs+e.body.refs.length<=4)||e.body.isExotic?(r.storeBit(!0),r.storeRef(e.body)):(r.storeBit(!1),r.storeBuilder(e.body.asBuilder()))}}},471724,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeLibRef=r.loadLibRef=void 0,r.loadLibRef=function(e){return 0===e.loadUint(1)?{type:"hash",libHash:e.loadBuffer(32)}:{type:"ref",library:e.loadRef()}},r.storeLibRef=function(e){return t=>{"hash"===e.type?(t.storeUint(0,1),t.storeBuffer(e.libHash)):(t.storeUint(1,1),t.storeRef(e.library))}}},511305,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.loadOutList=r.storeOutList=r.loadOutAction=r.storeOutAction=void 0;let n=e.r(849214),o=e.r(782459),i=e.r(400954),a=e.r(471724);function s(e){var t,r,s,c;switch(e.type){case"sendMsg":return t=e,e=>{e.storeUint(0xec3c86d,32).storeUint(t.mode,8).storeRef((0,o.beginCell)().store((0,n.storeMessageRelaxed)(t.outMsg)).endCell())};case"setCode":return r=e,e=>{e.storeUint(0xad4de08e,32).storeRef(r.newCode)};case"reserve":return s=e,e=>{e.storeUint(0x36e6b809,32).storeUint(s.mode,8).store((0,i.storeCurrencyCollection)(s.currency))};case"changeLibrary":return c=e,e=>{e.storeUint(0x26fa1dd4,32).storeUint(c.mode,7).store((0,a.storeLibRef)(c.libRef))};default:throw Error(`Unknown action type ${e.type}`)}}function c(e){let t=e.loadUint(32);if(0xec3c86d===t)return{type:"sendMsg",mode:e.loadUint(8),outMsg:(0,n.loadMessageRelaxed)(e.loadRef().beginParse())};if(0xad4de08e===t)return{type:"setCode",newCode:e.loadRef()};if(0x36e6b809===t)return{type:"reserve",mode:e.loadUint(8),currency:(0,i.loadCurrencyCollection)(e)};if(0x26fa1dd4===t)return{type:"changeLibrary",mode:e.loadUint(7),libRef:(0,a.loadLibRef)(e)};throw Error(`Unknown out action tag 0x${t.toString(16)}`)}r.storeOutAction=s,r.loadOutAction=c,r.storeOutList=function(e){let t=e.reduce((e,t)=>(0,o.beginCell)().storeRef(e).store(s(t)).endCell(),(0,o.beginCell)().endCell());return e=>{e.storeSlice(t.beginParse())}},r.loadOutList=function(e){let t=[];for(;e.remainingRefs;){let r=e.loadRef();t.push(c(e)),e=r.beginParse()}return t.reverse()}},345876,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeCommonMessageInfo=r.loadCommonMessageInfo=void 0;let n=e.r(400954);r.loadCommonMessageInfo=function(e){if(!e.loadBit()){let t=e.loadBit(),r=e.loadBit(),o=e.loadBit(),i=e.loadAddress(),a=e.loadAddress(),s=(0,n.loadCurrencyCollection)(e),c=e.loadCoins(),u=e.loadCoins();return{type:"internal",ihrDisabled:t,bounce:r,bounced:o,src:i,dest:a,value:s,ihrFee:c,forwardFee:u,createdLt:e.loadUintBig(64),createdAt:e.loadUint(32)}}if(!e.loadBit()){let t=e.loadMaybeExternalAddress();return{type:"external-in",src:t,dest:e.loadAddress(),importFee:e.loadCoins()}}let t=e.loadAddress(),r=e.loadMaybeExternalAddress();return{type:"external-out",src:t,dest:r,createdLt:e.loadUintBig(64),createdAt:e.loadUint(32)}},r.storeCommonMessageInfo=function(e){return t=>{if("internal"===e.type)t.storeBit(0),t.storeBit(e.ihrDisabled),t.storeBit(e.bounce),t.storeBit(e.bounced),t.storeAddress(e.src),t.storeAddress(e.dest),t.store((0,n.storeCurrencyCollection)(e.value)),t.storeCoins(e.ihrFee),t.storeCoins(e.forwardFee),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else if("external-in"===e.type)t.storeBit(1),t.storeBit(0),t.storeAddress(e.src),t.storeAddress(e.dest),t.storeCoins(e.importFee);else if("external-out"===e.type)t.storeBit(1),t.storeBit(1),t.storeAddress(e.src),t.storeAddress(e.dest),t.storeUint(e.createdLt,64),t.storeUint(e.createdAt,32);else throw Error("Unknown CommonMessageInfo type")}}},350368,(e,t,r)=>{"use strict";
2Object.defineProperty(r,"__esModule",{value:!0}),r.storeComputeSkipReason=r.loadComputeSkipReason=void 0,r.loadComputeSkipReason=function(e){let t=e.loadUint(2);if(0===t)return"no-state";if(1===t)return"bad-state";if(2===t)return"no-gas";throw Error(`Unknown ComputeSkipReason: ${t}`)},r.storeComputeSkipReason=function(e){return t=>{if("no-state"===e)t.storeUint(0,2);else if("bad-state"===e)t.storeUint(1,2);else if("no-gas"===e)t.storeUint(2,2);else throw Error(`Unknown ComputeSkipReason: ${e}`)}}},543974,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeDepthBalanceInfo=r.loadDepthBalanceInfo=void 0;let n=e.r(400954);r.loadDepthBalanceInfo=function(e){return{splitDepth:e.loadUint(5),balance:(0,n.loadCurrencyCollection)(e)}},r.storeDepthBalanceInfo=function(e){return t=>{t.storeUint(e.splitDepth,5),t.store((0,n.storeCurrencyCollection)(e.balance))}}},47312,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeHashUpdate=r.loadHashUpdate=void 0,r.loadHashUpdate=function(e){if(114!==e.loadUint(8))throw Error("Invalid data");return{oldHash:e.loadBuffer(32),newHash:e.loadBuffer(32)}},r.storeHashUpdate=function(e){return t=>{t.storeUint(114,8),t.storeBuffer(e.oldHash),t.storeBuffer(e.newHash)}}},162929,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.loadMasterchainStateExtra=void 0;let n=e.r(605221),o=e.r(400954);r.loadMasterchainStateExtra=function(e){if(52262!==e.loadUint(16))throw Error("Invalid data");e.loadBit()&&e.loadRef();let t=e.loadUintBig(256);return{config:n.Dictionary.load(n.Dictionary.Keys.Int(32),n.Dictionary.Values.Cell(),e),configAddress:t,globalBalance:(0,o.loadCurrencyCollection)(e)}}},738269,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MessageValue=r.storeMessage=r.loadMessage=void 0;let n=e.r(782459),o=e.r(345876),i=e.r(761350);function a(e){let t=(0,o.loadCommonMessageInfo)(e),r=null;return e.loadBit()&&(r=e.loadBit()?(0,i.loadStateInit)(e.loadRef().beginParse()):(0,i.loadStateInit)(e)),{info:t,init:r,body:e.loadBit()?e.loadRef():e.asCell()}}function s(e,t){return r=>{if(r.store((0,o.storeCommonMessageInfo)(e.info)),e.init){r.storeBit(!0);let o=(0,n.beginCell)().store((0,i.storeStateInit)(e.init));t&&t.forceRef||r.availableBits-2<o.bits+e.body.bits.length?(r.storeBit(!0),r.storeRef(o)):(r.storeBit(!1),r.storeBuilder(o))}else r.storeBit(!1);t&&t.forceRef||r.availableBits-1<e.body.bits.length||r.refs+e.body.refs.length>4?(r.storeBit(!0),r.storeRef(e.body)):(r.storeBit(!1),r.storeBuilder(e.body.asBuilder()))}}r.loadMessage=a,r.storeMessage=s,r.MessageValue={serialize(e,t){t.storeRef((0,n.beginCell)().store(s(e)))},parse:e=>a(e.loadRef().beginParse())}},632313,(e,t,r)=>{"use strict";var n,o;Object.defineProperty(r,"__esModule",{value:!0}),r.SendMode=void 0,(o=n||(r.SendMode=n={}))[o.CARRY_ALL_REMAINING_BALANCE=128]="CARRY_ALL_REMAINING_BALANCE",o[o.CARRY_ALL_REMAINING_INCOMING_VALUE=64]="CARRY_ALL_REMAINING_INCOMING_VALUE",o[o.DESTROY_ACCOUNT_IF_ZERO=32]="DESTROY_ACCOUNT_IF_ZERO",o[o.PAY_GAS_SEPARATELY=1]="PAY_GAS_SEPARATELY",o[o.IGNORE_ERRORS=2]="IGNORE_ERRORS",o[o.NONE=0]="NONE"},652920,(e,t,r)=>{"use strict";var n,o;Object.defineProperty(r,"__esModule",{value:!0}),r.ReserveMode=void 0,(o=n||(r.ReserveMode=n={}))[o.THIS_AMOUNT=0]="THIS_AMOUNT",o[o.LEAVE_THIS_AMOUNT=1]="LEAVE_THIS_AMOUNT",o[o.AT_MOST_THIS_AMOUNT=2]="AT_MOST_THIS_AMOUNT",o[o.LEAVE_MAX_THIS_AMOUNT=3]="LEAVE_MAX_THIS_AMOUNT",o[o.BEFORE_BALANCE_PLUS_THIS_AMOUNT=4]="BEFORE_BALANCE_PLUS_THIS_AMOUNT",o[o.LEAVE_BBALANCE_PLUS_THIS_AMOUNT=5]="LEAVE_BBALANCE_PLUS_THIS_AMOUNT",o[o.BEFORE_BALANCE_MINUS_THIS_AMOUNT=12]="BEFORE_BALANCE_MINUS_THIS_AMOUNT",o[o.LEAVE_BEFORE_BALANCE_MINUS_THIS_AMOUNT=13]="LEAVE_BEFORE_BALANCE_MINUS_THIS_AMOUNT"},207412,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeShardAccount=r.loadShardAccount=void 0;let n=e.r(782459),o=e.r(361005);r.loadShardAccount=function(e){let t,r=e.loadRef();if(!r.isExotic){let e=r.beginParse();e.loadBit()&&(t=(0,o.loadAccount)(e))}return{account:t,lastTransactionHash:e.loadUintBig(256),lastTransactionLt:e.loadUintBig(64)}},r.storeShardAccount=function(e){return t=>{e.account?t.storeRef((0,n.beginCell)().storeBit(!0).store((0,o.storeAccount)(e.account))):t.storeRef((0,n.beginCell)().storeBit(!1)),t.storeUint(e.lastTransactionHash,256),t.storeUint(e.lastTransactionLt,64)}}},188968,(e,t,r)=>{"use strict";
2Object.defineProperty(r,"__esModule",{value:!0}),r.storeShardAccounts=r.loadShardAccounts=r.ShardAccountRefValue=void 0;let n=e.r(605221),o=e.r(543974),i=e.r(207412);r.ShardAccountRefValue={parse:e=>({depthBalanceInfo:(0,o.loadDepthBalanceInfo)(e),shardAccount:(0,i.loadShardAccount)(e)}),serialize(e,t){t.store((0,o.storeDepthBalanceInfo)(e.depthBalanceInfo)),t.store((0,i.storeShardAccount)(e.shardAccount))}},r.loadShardAccounts=function(e){return n.Dictionary.load(n.Dictionary.Keys.BigUint(256),r.ShardAccountRefValue,e)},r.storeShardAccounts=function(e){return t=>{t.storeDict(e)}}},13021,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeShardIdent=r.loadShardIdent=void 0,r.loadShardIdent=function(e){if(0!==e.loadUint(2))throw Error("Invalid data");return{shardPrefixBits:e.loadUint(6),workchainId:e.loadInt(32),shardPrefix:e.loadUintBig(64)}},r.storeShardIdent=function(e){return t=>{t.storeUint(0,2),t.storeUint(e.shardPrefixBits,6),t.storeInt(e.workchainId,32),t.storeUint(e.shardPrefix,64)}}},868653,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.loadShardStateUnsplit=void 0;let n=e.r(162929),o=e.r(188968),i=e.r(13021);r.loadShardStateUnsplit=function(e){let t;if(0x9023afe2!==e.loadUint(32))throw Error("Invalid data");let r=e.loadInt(32),a=(0,i.loadShardIdent)(e),s=e.loadUint(32),c=e.loadUint(32),u=e.loadUint(32),l=e.loadUintBig(64),f=e.loadUint(32);e.loadRef();let p=e.loadBit(),d=e.loadRef();d.isExotic||(t=(0,o.loadShardAccounts)(d.beginParse())),e.loadRef();let h=e.loadBit(),y=null;if(h){let t=e.loadRef();t.isExotic||(y=(0,n.loadMasterchainStateExtra)(t.beginParse()))}return{globalId:r,shardId:a,seqno:s,vertSeqNo:c,genUtime:u,genLt:l,minRefMcSeqno:f,beforeSplit:p,accounts:t,extras:y}}},312595,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeSplitMergeInfo=r.loadSplitMergeInfo=void 0,r.loadSplitMergeInfo=function(e){let t=e.loadUint(6),r=e.loadUint(6);return{currentShardPrefixLength:t,accountSplitDepth:r,thisAddress:e.loadUintBig(256),siblingAddress:e.loadUintBig(256)}},r.storeSplitMergeInfo=function(e){return t=>{t.storeUint(e.currentShardPrefixLength,6),t.storeUint(e.accountSplitDepth,6),t.storeUint(e.thisAddress,256),t.storeUint(e.siblingAddress,256)}}},927647,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeTransactionActionPhase=r.loadTransactionActionPhase=void 0;let n=e.r(592400),o=e.r(770157);r.loadTransactionActionPhase=function(e){let t=e.loadBit(),r=e.loadBit(),i=e.loadBit(),a=(0,n.loadAccountStatusChange)(e),s=e.loadBit()?e.loadCoins():void 0,c=e.loadBit()?e.loadCoins():void 0,u=e.loadInt(32),l=e.loadBit()?e.loadInt(32):void 0,f=e.loadUint(16),p=e.loadUint(16),d=e.loadUint(16),h=e.loadUint(16);return{success:t,valid:r,noFunds:i,statusChange:a,totalFwdFees:s,totalActionFees:c,resultCode:u,resultArg:l,totalActions:f,specActions:p,skippedActions:d,messagesCreated:h,actionListHash:e.loadUintBig(256),totalMessageSize:(0,o.loadStorageUsed)(e)}},r.storeTransactionActionPhase=function(e){return t=>{t.storeBit(e.success),t.storeBit(e.valid),t.storeBit(e.noFunds),t.store((0,n.storeAccountStatusChange)(e.statusChange)),t.storeMaybeCoins(e.totalFwdFees),t.storeMaybeCoins(e.totalActionFees),t.storeInt(e.resultCode,32),t.storeMaybeInt(e.resultArg,32),t.storeUint(e.totalActions,16),t.storeUint(e.specActions,16),t.storeUint(e.skippedActions,16),t.storeUint(e.messagesCreated,16),t.storeUint(e.actionListHash,256),t.store((0,o.storeStorageUsed)(e.totalMessageSize))}}},977582,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeTransactionBouncePhase=r.loadTransactionBouncePhase=void 0;let n=e.r(770157);r.loadTransactionBouncePhase=function(e){if(e.loadBit()){let t=(0,n.loadStorageUsed)(e);return{type:"ok",messageSize:t,messageFees:e.loadCoins(),forwardFees:e.loadCoins()}}return e.loadBit()?{type:"no-funds",messageSize:(0,n.loadStorageUsed)(e),requiredForwardFees:e.loadCoins()}:{type:"negative-funds"}},r.storeTransactionBouncePhase=function(e){return t=>{if("ok"===e.type)t.storeBit(!0),t.store((0,n.storeStorageUsed)(e.messageSize)),t.storeCoins(e.messageFees),t.storeCoins(e.forwardFees);else if("negative-funds"===e.type)t.storeBit(!1),t.storeBit(!1);else if("no-funds"===e.type)t.storeBit(!1),t.storeBit(!0),t.store((0,n.storeStorageUsed)(e.messageSize)),t.storeCoins(e.requiredForwardFees);else throw Error("Invalid TransactionBouncePhase type")}}},367878,(e,t,r)=>{"use strict";
2Object.defineProperty(r,"__esModule",{value:!0}),r.storeTransactionComputePhase=r.loadTransactionComputePhase=void 0;let n=e.r(782459),o=e.r(350368);r.loadTransactionComputePhase=function(e){if(!e.loadBit())return{type:"skipped",reason:(0,o.loadComputeSkipReason)(e)};let t=e.loadBit(),r=e.loadBit(),n=e.loadBit(),i=e.loadCoins(),a=e.loadRef().beginParse(),s=a.loadVarUintBig(3),c=a.loadVarUintBig(3),u=a.loadBit()?a.loadVarUintBig(2):void 0,l=a.loadUint(8),f=a.loadInt(32),p=a.loadBit()?a.loadInt(32):void 0,d=a.loadUint(32);return{type:"vm",success:t,messageStateUsed:r,accountActivated:n,gasFees:i,gasUsed:s,gasLimit:c,gasCredit:u,mode:l,exitCode:f,exitArg:p,vmSteps:d,vmInitStateHash:a.loadUintBig(256),vmFinalStateHash:a.loadUintBig(256)}},r.storeTransactionComputePhase=function(e){return t=>{if("skipped"===e.type){t.storeBit(0),t.store((0,o.storeComputeSkipReason)(e.reason));return}t.storeBit(1),t.storeBit(e.success),t.storeBit(e.messageStateUsed),t.storeBit(e.accountActivated),t.storeCoins(e.gasFees),t.storeRef((0,n.beginCell)().storeVarUint(e.gasUsed,3).storeVarUint(e.gasLimit,3).store(t=>void 0!==e.gasCredit&&null!==e.gasCredit?t.storeBit(1).storeVarUint(e.gasCredit,2):t.storeBit(0)).storeUint(e.mode,8).storeInt(e.exitCode,32).store(t=>void 0!==e.exitArg&&null!==e.exitArg?t.storeBit(1).storeInt(e.exitArg,32):t.storeBit(0)).storeUint(e.vmSteps,32).storeUint(e.vmInitStateHash,256).storeUint(e.vmFinalStateHash,256).endCell())}}},138113,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeTransactionCreditPhase=r.loadTransactionCreditPhase=void 0;let n=e.r(400954);r.loadTransactionCreditPhase=function(e){return{dueFeesColelcted:e.loadBit()?e.loadCoins():void 0,credit:(0,n.loadCurrencyCollection)(e)}},r.storeTransactionCreditPhase=function(e){return t=>{null===e.dueFeesColelcted||void 0===e.dueFeesColelcted?t.storeBit(!1):(t.storeBit(!0),t.storeCoins(e.dueFeesColelcted)),t.store((0,n.storeCurrencyCollection)(e.credit))}}},478530,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeTransactionsStoragePhase=r.loadTransactionStoragePhase=void 0;let n=e.r(592400);r.loadTransactionStoragePhase=function(e){let t,r=e.loadCoins();return e.loadBit()&&(t=e.loadCoins()),{storageFeesCollected:r,storageFeesDue:t,statusChange:(0,n.loadAccountStatusChange)(e)}},r.storeTransactionsStoragePhase=function(e){return t=>{t.storeCoins(e.storageFeesCollected),null===e.storageFeesDue||void 0===e.storageFeesDue?t.storeBit(!1):(t.storeBit(!0),t.storeCoins(e.storageFeesDue)),t.store((0,n.storeAccountStatusChange)(e.statusChange))}}},977214,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.storeTransactionDescription=r.loadTransactionDescription=void 0;let n=e.r(782459),o=e.r(312595),i=e.r(51299),a=e.r(927647),s=e.r(977582),c=e.r(367878),u=e.r(138113),l=e.r(478530);r.loadTransactionDescription=function(e){let t=e.loadUint(4);if(0===t){let t,r,n,o,i=e.loadBit();e.loadBit()&&(t=(0,l.loadTransactionStoragePhase)(e)),e.loadBit()&&(r=(0,u.loadTransactionCreditPhase)(e));let f=(0,c.loadTransactionComputePhase)(e);e.loadBit()&&(n=(0,a.loadTransactionActionPhase)(e.loadRef().beginParse()));let p=e.loadBit();return e.loadBit()&&(o=(0,s.loadTransactionBouncePhase)(e)),{type:"generic",creditFirst:i,storagePhase:t,creditPhase:r,computePhase:f,actionPhase:n,bouncePhase:o,aborted:p,destroyed:e.loadBit()}}if(1===t)return{type:"storage",storagePhase:(0,l.loadTransactionStoragePhase)(e)};if(2===t||3===t){let r,n=(0,l.loadTransactionStoragePhase)(e),o=(0,c.loadTransactionComputePhase)(e);return e.loadBit()&&(r=(0,a.loadTransactionActionPhase)(e.loadRef().beginParse())),{type:"tick-tock",isTock:3===t,storagePhase:n,computePhase:o,actionPhase:r,aborted:e.loadBit(),destroyed:e.loadBit()}}if(4===t){let t,r,n=(0,o.loadSplitMergeInfo)(e);e.loadBit()&&(t=(0,l.loadTransactionStoragePhase)(e));let i=(0,c.loadTransactionComputePhase)(e);return e.loadBit()&&(r=(0,a.loadTransactionActionPhase)(e.loadRef().beginParse())),{type:"split-prepare",splitInfo:n,storagePhase:t,computePhase:i,actionPhase:r,aborted:e.loadBit(),destroyed:e.loadBit()}}if(5===t){let t=(0,o.loadSplitMergeInfo)(e);return{type:"split-install",splitInfo:t,prepareTransaction:(0,i.loadTransaction)(e.loadRef().beginParse()),installed:e.loadBit()}}throw Error(`Unsupported transaction description type ${t}`)},r.storeTransactionDescription=function(e){return t=>{if("generic"===e.type)t.storeUint(0,4),t.storeBit(e.creditFirst),e.storagePhase?(t.storeBit(!0),t.store((0,l.storeTransactionsStoragePhase)(e.storagePhase))):t.storeBit(!1),e.creditPhase?(t.storeBit(!0),t.store((0,u.storeTransactionCreditPhase)(e.creditPhase))):t.storeBit(!1),t.store((0,c.storeTransactionComputePhase)(e.computePhase)),e.actionPhase?(t.storeBit(!0),t.storeRef((0,n.beginCell)().store((0,a.storeTransactionActionPhase)(e.actionPhase)))):t.storeBit(!1),t.storeBit(e.aborted),e.bouncePhase?(t.storeBit(!0),t.store((0,s.storeTransactionBouncePhase)(e.bouncePhase))):t.storeBit(!1),t.storeBit(e.destroyed);else if("storage"===e.type)t.storeUint(1,4),t.store((0,l.storeTransactionsStoragePhase)(e.storagePhase));else if("tick-tock"===e.type)t.storeUint(e.isTock?3:2,4),t.store((0,l.storeTransactionsStoragePhase)(e.storagePhase)),t.store((0,c.storeTransactionComputePhase)(e.computePhase)),e.actionPhase?(t.storeBit(!0),t.storeRef((0,n.beginCell)().store((0,a.storeTransactionActionPhase)(e.actionPhase)))):t.storeBit(!1),t.storeBit(e.aborted),t.storeBit(e.destroyed);else if("split-prepare"===e.type)t.storeUint(4,4),t.store((0,o.storeSplitMergeInfo)(e.splitInfo)),e.storagePhase?(t.storeBit(!0),t.store((0,l.storeTransactionsStoragePhase)(e.storagePhase))):t.storeBit(!1),t.store((0,c.storeTransactionComputePhase)(e.computePhase)),e.actionPhase?(t.storeBit(!0),t.store((0,a.storeTransactionActionPhase)(e.actionPhase))):t.storeBit(!1),t.storeBit(e.aborted),t.storeBit(e.destroyed);else if("split-install"===e.type)t.storeUint(5,4),t.store((0,o.storeSplitMergeInfo)(e.splitInfo)),t.storeRef((0,n.beginCell)().store((0,i.storeTransaction)(e.prepareTransaction))),t.storeBit(e.installed);else throw Error(`Unsupported transaction description type ${e.type}`)}}},51299,(e,t,r)=>{"use strict";
2Object.defineProperty(r,"__esModule",{value:!0}),r.storeTransaction=r.loadTransaction=void 0;let n=e.r(782459),o=e.r(605221),i=e.r(473357),a=e.r(400954),s=e.r(47312),c=e.r(738269),u=e.r(977214);r.loadTransaction=function(e){let t=e.asCell();if(7!==e.loadUint(4))throw Error("Invalid data");let r=e.loadUintBig(256),n=e.loadUintBig(64),l=e.loadUintBig(256),f=e.loadUintBig(64),p=e.loadUint(32),d=e.loadUint(15),h=(0,i.loadAccountStatus)(e),y=(0,i.loadAccountStatus)(e),m=e.loadRef().beginParse(),g=m.loadBit()?(0,c.loadMessage)(m.loadRef().beginParse()):void 0,b=m.loadDict(o.Dictionary.Keys.Uint(15),c.MessageValue);return m.endParse(),{address:r,lt:n,prevTransactionHash:l,prevTransactionLt:f,now:p,outMessagesCount:d,oldStatus:h,endStatus:y,inMessage:g,outMessages:b,totalFees:(0,a.loadCurrencyCollection)(e),stateUpdate:(0,s.loadHashUpdate)(e.loadRef().beginParse()),description:(0,u.loadTransactionDescription)(e.loadRef().beginParse()),raw:t,hash:()=>t.hash()}},r.storeTransaction=function(e){return t=>{t.storeUint(7,4),t.storeUint(e.address,256),t.storeUint(e.lt,64),t.storeUint(e.prevTransactionHash,256),t.storeUint(e.prevTransactionLt,64),t.storeUint(e.now,32),t.storeUint(e.outMessagesCount,15),t.store((0,i.storeAccountStatus)(e.oldStatus)),t.store((0,i.storeAccountStatus)(e.endStatus));let r=(0,n.beginCell)();e.inMessage?(r.storeBit(!0),r.storeRef((0,n.beginCell)().store((0,c.storeMessage)(e.inMessage)))):r.storeBit(!1),r.storeDict(e.outMessages),t.storeRef(r),t.store((0,a.storeCurrencyCollection)(e.totalFees)),t.storeRef((0,n.beginCell)().store((0,s.storeHashUpdate)(e.stateUpdate))),t.storeRef((0,n.beginCell)().store((0,u.storeTransactionDescription)(e.description)))}}},787521,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.loadSimpleLibrary=r.loadShardStateUnsplit=r.storeShardIdent=r.loadShardIdent=r.storeShardAccounts=r.loadShardAccounts=r.ShardAccountRefValue=r.storeShardAccount=r.loadShardAccount=r.ReserveMode=r.SendMode=r.storeMessageRelaxed=r.loadMessageRelaxed=r.storeMessage=r.loadMessage=r.loadMasterchainStateExtra=r.storeHashUpdate=r.loadHashUpdate=r.storeExtraCurrency=r.loadMaybeExtraCurrency=r.loadExtraCurrency=r.packExtraCurrencyDict=r.packExtraCurrencyCell=r.storeDepthBalanceInfo=r.loadDepthBalanceInfo=r.storeCurrencyCollection=r.loadCurrencyCollection=r.storeComputeSkipReason=r.loadComputeSkipReason=r.storeCommonMessageInfoRelaxed=r.loadCommonMessageInfoRelaxed=r.storeCommonMessageInfo=r.loadCommonMessageInfo=r.storeOutList=r.loadOutList=r.storeOutAction=r.loadOutAction=r.storeAccountStorage=r.loadAccountStorage=r.storeAccountStatusChange=r.loadAccountStatusChange=r.storeAccountStatus=r.loadAccountStatus=r.storeAccountState=r.loadAccountState=r.storeAccount=r.loadAccount=r.comment=r.external=r.internal=void 0,r.storeTransactionsStoragePhase=r.loadTransactionStoragePhase=r.storeTransactionDescription=r.loadTransactionDescription=r.storeTransactionCreditPhase=r.loadTransactionCreditPhase=r.storeTransactionComputePhase=r.loadTransactionComputePhase=r.storeTransactionBouncePhase=r.loadTransactionBouncePhase=r.storeTransactionActionPhase=r.loadTransactionActionPhase=r.storeTransaction=r.loadTransaction=r.storeTickTock=r.loadTickTock=r.storeStorageUsed=r.loadStorageUsed=r.storeStorageInfo=r.loadStorageInfo=r.storeStateInit=r.loadStateInit=r.storeSplitMergeInfo=r.loadSplitMergeInfo=r.storeLibRef=r.loadLibRef=r.storeSimpleLibrary=void 0;var n=e.r(589767);Object.defineProperty(r,"internal",{enumerable:!0,get:function(){return n.internal}}),Object.defineProperty(r,"external",{enumerable:!0,get:function(){return n.external}}),Object.defineProperty(r,"comment",{enumerable:!0,get:function(){return n.comment}});var o=e.r(361005);Object.defineProperty(r,"loadAccount",{enumerable:!0,get:function(){return o.loadAccount}}),Object.defineProperty(r,"storeAccount",{enumerable:!0,get:function(){return o.storeAccount}});var i=e.r(121898);Object.defineProperty(r,"loadAccountState",{enumerable:!0,get:function(){return i.loadAccountState}}),Object.defineProperty(r,"storeAccountState",{enumerable:!0,get:function(){return i.storeAccountState}});var a=e.r(473357);Object.defineProperty(r,"loadAccountStatus",{enumerable:!0,get:function(){return a.loadAccountStatus}}),Object.defineProperty(r,"storeAccountStatus",{enumerable:!0,get:function(){return a.storeAccountStatus}});var s=e.r(592400);Object.defineProperty(r,"loadAccountStatusChange",{enumerable:!0,get:function(){return s.loadAccountStatusChange}}),Object.defineProperty(r,"storeAccountStatusChange",{enumerable:!0,get:function(){return s.storeAccountStatusChange}});var c=e.r(728123);Object.defineProperty(r,"loadAccountStorage",{enumerable:!0,get:function(){return c.loadAccountStorage}}),Object.defineProperty(r,"storeAccountStorage",{enumerable:!0,get:function(){return c.storeAccountStorage}});var u=e.r(511305);Object.defineProperty(r,"loadOutAction",{enumerable:!0,get:function(){return u.loadOutAction}}),Object.defineProperty(r,"storeOutAction",{enumerable:!0,get:function(){return u.storeOutAction}}),Object.defineProperty(r,"loadOutList",{enumerable:!0,get:function(){return u.loadOutList}}),Object.defineProperty(r,"storeOutList",{enumerable:!0,get:function(){return u.storeOutList}});var l=e.r(345876);Object.defineProperty(r,"loadCommonMessageInfo",{enumerable:!0,get:function(){return l.loadCommonMessageInfo}}),Object.defineProperty(r,"storeCommonMessageInfo",{enumerable:!0,get:function(){return l.storeCommonMessageInfo}});var f=e.r(157380);Object.defineProperty(r,"loadCommonMessageInfoRelaxed",{enumerable:!0,get:function(){return f.loadCommonMessageInfoRelaxed}}),Object.defineProperty(r,"storeCommonMessageInfoRelaxed",{enumerable:!0,get:function(){return f.storeCommonMessageInfoRelaxed}});var p=e.r(350368);Object.defineProperty(r,"loadComputeSkipReason",{enumerable:!0,get:function(){return p.loadComputeSkipReason}}),Object.defineProperty(r,"storeComputeSkipReason",{enumerable:!0,get:function(){return p.storeComputeSkipReason}});var d=e.r(400954);Object.defineProperty(r,"loadCurrencyCollection",{enumerable:!0,get:function(){return d.loadCurrencyCollection}}),Object.defineProperty(r,"storeCurrencyCollection",{enumerable:!0,get:function(){return d.storeCurrencyCollection}});var h=e.r(543974);Object.defineProperty(r,"loadDepthBalanceInfo",{enumerable:!0,get:function(){return h.loadDepthBalanceInfo}}),Object.defineProperty(r,"storeDepthBalanceInfo",{enumerable:!0,get:function(){return h.storeDepthBalanceInfo}});var y=e.r(529959);Object.defineProperty(r,"packExtraCurrencyCell",{enumerable:!0,get:function(){return y.packExtraCurrencyCell}}),Object.defineProperty(r,"packExtraCurrencyDict",{enumerable:!0,get:function(){return y.packExtraCurrencyDict}}),Object.defineProperty(r,"loadExtraCurrency",{enumerable:!0,get:function(){return y.loadExtraCurrency}}),Object.defineProperty(r,"loadMaybeExtraCurrency",{enumerable:!0,get:function(){return y.loadMaybeExtraCurrency}}),Object.defineProperty(r,"storeExtraCurrency",{enumerable:!0,get:function(){return y.storeExtraCurrency}});var m=e.r(47312);Object.defineProperty(r,"loadHashUpdate",{enumerable:!0,get:function(){return m.loadHashUpdate}}),Object.defineProperty(r,"storeHashUpdate",{enumerable:!0,get:function(){return m.storeHashUpdate}});var g=e.r(162929);Object.defineProperty(r,"loadMasterchainStateExtra",{enumerable:!0,get:function(){return g.loadMasterchainStateExtra}});var b=e.r(738269);Object.defineProperty(r,"loadMessage",{enumerable:!0,get:function(){return b.loadMessage}}),Object.defineProperty(r,"storeMessage",{enumerable:!0,get:function(){return b.storeMessage}});var v=e.r(849214);Object.defineProperty(r,"loadMessageRelaxed",{enumerable:!0,get:function(){return v.loadMessageRelaxed}}),Object.defineProperty(r,"storeMessageRelaxed",{enumerable:!0,get:function(){return v.storeMessageRelaxed}});var w=e.r(632313);Object.defineProperty(r,"SendMode",{enumerable:!0,get:function(){return w.SendMode}});var S=e.r(652920);Object.defineProperty(r,"ReserveMode",{enumerable:!0,get:function(){return S.ReserveMode}});var _=e.r(207412);Object.defineProperty(r,"loadShardAccount",{enumerable:!0,get:function(){return _.loadShardAccount}}),Object.defineProperty(r,"storeShardAccount",{enumerable:!0,get:function(){return _.storeShardAccount}});var E=e.r(188968);Object.defineProperty(r,"ShardAccountRefValue",{enumerable:!0,get:function(){return E.ShardAccountRefValue}}),Object.defineProperty(r,"loadShardAccounts",{enumerable:!0,get:function(){return E.loadShardAccounts}}),Object.defineProperty(r,"storeShardAccounts",{enumerable:!0,get:function(){return E.storeShardAccounts}});var x=e.r(13021);Object.defineProperty(r,"loadShardIdent",{enumerable:!0,get:function(){return x.loadShardIdent}}),Object.defineProperty(r,"storeShardIdent",{enumerable:!0,get:function(){return x.storeShardIdent}});var A=e.r(868653);Object.defineProperty(r,"loadShardStateUnsplit",{enumerable:!0,get:function(){return A.loadShardStateUnsplit}});var T=e.r(687187);Object.defineProperty(r,"loadSimpleLibrary",{enumerable:!0,get:function(){return T.loadSimpleLibrary}}),Object.defineProperty(r,"storeSimpleLibrary",{enumerable:!0,get:function(){return T.
2storeSimpleLibrary}});var k=e.r(471724);Object.defineProperty(r,"loadLibRef",{enumerable:!0,get:function(){return k.loadLibRef}}),Object.defineProperty(r,"storeLibRef",{enumerable:!0,get:function(){return k.storeLibRef}});var O=e.r(312595);Object.defineProperty(r,"loadSplitMergeInfo",{enumerable:!0,get:function(){return O.loadSplitMergeInfo}}),Object.defineProperty(r,"storeSplitMergeInfo",{enumerable:!0,get:function(){return O.storeSplitMergeInfo}});var P=e.r(761350);Object.defineProperty(r,"loadStateInit",{enumerable:!0,get:function(){return P.loadStateInit}}),Object.defineProperty(r,"storeStateInit",{enumerable:!0,get:function(){return P.storeStateInit}});var B=e.r(491480);Object.defineProperty(r,"loadStorageInfo",{enumerable:!0,get:function(){return B.loadStorageInfo}}),Object.defineProperty(r,"storeStorageInfo",{enumerable:!0,get:function(){return B.storeStorageInfo}});var j=e.r(770157);Object.defineProperty(r,"loadStorageUsed",{enumerable:!0,get:function(){return j.loadStorageUsed}}),Object.defineProperty(r,"storeStorageUsed",{enumerable:!0,get:function(){return j.storeStorageUsed}});var I=e.r(662039);Object.defineProperty(r,"loadTickTock",{enumerable:!0,get:function(){return I.loadTickTock}}),Object.defineProperty(r,"storeTickTock",{enumerable:!0,get:function(){return I.storeTickTock}});var C=e.r(51299);Object.defineProperty(r,"loadTransaction",{enumerable:!0,get:function(){return C.loadTransaction}}),Object.defineProperty(r,"storeTransaction",{enumerable:!0,get:function(){return C.storeTransaction}});var R=e.r(927647);Object.defineProperty(r,"loadTransactionActionPhase",{enumerable:!0,get:function(){return R.loadTransactionActionPhase}}),Object.defineProperty(r,"storeTransactionActionPhase",{enumerable:!0,get:function(){return R.storeTransactionActionPhase}});var U=e.r(977582);Object.defineProperty(r,"loadTransactionBouncePhase",{enumerable:!0,get:function(){return U.loadTransactionBouncePhase}}),Object.defineProperty(r,"storeTransactionBouncePhase",{enumerable:!0,get:function(){return U.storeTransactionBouncePhase}});var N=e.r(367878);Object.defineProperty(r,"loadTransactionComputePhase",{enumerable:!0,get:function(){return N.loadTransactionComputePhase}}),Object.defineProperty(r,"storeTransactionComputePhase",{enumerable:!0,get:function(){return N.storeTransactionComputePhase}});var M=e.r(138113);Object.defineProperty(r,"loadTransactionCreditPhase",{enumerable:!0,get:function(){return M.loadTransactionCreditPhase}}),Object.defineProperty(r,"storeTransactionCreditPhase",{enumerable:!0,get:function(){return M.storeTransactionCreditPhase}});var D=e.r(977214);Object.defineProperty(r,"loadTransactionDescription",{enumerable:!0,get:function(){return D.loadTransactionDescription}}),Object.defineProperty(r,"storeTransactionDescription",{enumerable:!0,get:function(){return D.storeTransactionDescription}});var L=e.r(478530);Object.defineProperty(r,"loadTransactionStoragePhase",{enumerable:!0,get:function(){return L.loadTransactionStoragePhase}}),Object.defineProperty(r,"storeTransactionsStoragePhase",{enumerable:!0,get:function(){return L.storeTransactionsStoragePhase}})},940674,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.openContract=void 0;let n=e.r(723184),o=e.r(58234);r.openContract=function(e,t){let r,i=null;if(!n.Address.isAddress(e.address))throw Error("Invalid address");if(r=e.address,e.init){if(!(e.init.code instanceof o.Cell))throw Error("Invalid init.code");if(!(e.init.data instanceof o.Cell))throw Error("Invalid init.data");i=e.init}let a=t({address:r,init:i});return new Proxy(e,{get(e,t){let r=e[t];return"string"==typeof t&&(t.startsWith("get")||t.startsWith("send")||t.startsWith("is"))&&"function"==typeof r?(...t)=>r.apply(e,[a,...t]):r}})}},470049,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ComputeError=void 0;class n extends Error{constructor(e,t,r){super(e),this.exitCode=t,this.debugLogs=r&&r.debugLogs?r.debugLogs:null,this.logs=r&&r.logs?r.logs:null,Object.setPrototypeOf(this,n.prototype)}}r.ComputeError=n},926242,(e,t,r)=>{"use strict";var n=e.i(329470);
2Object.defineProperty(r,"__esModule",{value:!0}),r.getMethodId=void 0;let o=new Int16Array([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.getMethodId=function(e){return 65535&function(e){e instanceof n.Buffer||(e=n.Buffer.from(e));let t=0;for(let r=0;r<e.length;r++)t=(o[(t>>8^e[r])&255]^t<<8)&65535;return t}(e)|65536}},824599,(e,t,r)=>{"use strict";var n=e.i(329470);Object.defineProperty(r,"__esModule",{value:!0}),r.safeSignVerify=r.safeSign=void 0;let o=e.r(168002);function i(e,t){let r=n.Buffer.from(t);if(r.length>64)throw Error("Seed can	 be longer than 64 bytes");if(r.length<8)throw Error("Seed must be at least 8 bytes");return(0,o.sha256_sync)(n.Buffer.concat([n.Buffer.from([255,255]),r,e.hash()]))}r.safeSign=function(e,t,r="ton-safe-sign-magic"){return(0,o.sign)(i(e,r),t)},r.safeSignVerify=function(e,t,r,n="ton-safe-sign-magic"){return(0,o.signVerify)(i(e,n),t,r)}},531738,(e,t,r)=>{"use strict";var n=e.e&&e.e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=e.e&&e.e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.safeSignVerify=r.safeSign=r.getMethodId=r.base32Encode=r.base32Decode=r.crc32c=r.crc16=r.fromNano=r.toNano=r.ComputeError=r.openContract=r.TupleBuilder=r.TupleReader=r.serializeTupleItem=r.parseTupleItem=r.serializeTuple=r.parseTuple=r.generateMerkleUpdate=r.generateMerkleProofDirect=r.generateMerkleProof=r.exoticPruned=r.exoticMerkleUpdate=r.convertToMerkleProof=r.exoticMerkleProof=r.Dictionary=r.Cell=r.CellType=r.Slice=r.beginCell=r.Builder=r.BitBuilder=r.BitReader=r.BitString=r.contractAddress=r.ADNLAddress=r.ExternalAddress=r.address=r.Address=void 0;var i=e.r(723184);Object.defineProperty(r,"Address",{enumerable:!0,get:function(){return i.Address}}),Object.defineProperty(r,"address",{enumerable:!0,get:function(){return i.address}});var a=e.r(365096);Object.defineProperty(r,"ExternalAddress",{enumerable:!0,get:function(){return a.ExternalAddress}});var s=e.r(745212);Object.defineProperty(r,"ADNLAddress",{enumerable:!0,get:function(){return s.ADNLAddress}});var c=e.r(901978);Object.defineProperty(r,"contractAddress",{enumerable:!0,get:function(){return c.contractAddress}});var u=e.r(221870);Object.defineProperty(r,"BitString",{enumerable:!0,get:function(){return u.BitString}});var l=e.r(773094);Object.defineProperty(r,"BitReader",{enumerable:!0,get:function(){return l.BitReader}});var f=e.r(779546);Object.defineProperty(r,"BitBuilder",{enumerable:!0,get:function(){return f.BitBuilder}});var p=e.r(782459);Object.defineProperty(r,"Builder",{enumerable:!0,get:function(){return p.Builder}}),Object.defineProperty(r,"beginCell",{enumerable:!0,get:function(){return p.beginCell}});var d=e.r(977009);Object.defineProperty(r,"Slice",{enumerable:!0,get:function(){return d.Slice}});var h=e.r(685791);Object.defineProperty(r,"CellType",{enumerable:!0,get:function(){return h.CellType}});var y=e.r(58234);Object.defineProperty(r,"Cell",{enumerable:!0,get:function(){return y.Cell}});var m=e.r(605221);Object.defineProperty(r,"Dictionary",{enumerable:!0,get:function(){return m.Dictionary}});var g=e.r(587185);Object.defineProperty(r,"exoticMerkleProof",{enumerable:!0,get:function(){return g.exoticMerkleProof}}),Object.defineProperty(r,"convertToMerkleProof",{enumerable:!0,get:function(){return g.convertToMerkleProof}});var b=e.r(382210);Object.defineProperty(r,"exoticMerkleUpdate",{enumerable:!0,get:function(){return b.exoticMerkleUpdate}});var v=e.r(264960);Object.defineProperty(r,"exoticPruned",{enumerable:!0,get:function(){return v.exoticPruned}});var w=e.r(191333);Object.defineProperty(r,"generateMerkleProof",{enumerable:!0,get:function(){return w.generateMerkleProof}}),Object.defineProperty(r,"generateMerkleProofDirect",{enumerable:!0,get:function(){return w.generateMerkleProofDirect}});var S=e.r(787369);Object.defineProperty(r,"generateMerkleUpdate",{enumerable:!0,get:function(){return S.generateMerkleUpdate}});var _=e.r(166085);Object.defineProperty(r,"parseTuple",{enumerable:!0,get:function(){return _.parseTuple}}),Object.defineProperty(r,"serializeTuple",{enumerable:!0,get:function(){return _.serializeTuple}}),Object.defineProperty(r,"parseTupleItem",{enumerable:!0,get:function(){return _.parseTupleItem}}),Object.defineProperty(r,"serializeTupleItem",{enumerable:!0,get:function(){return _.serializeTupleItem}});var E=e.r(53402);Object.defineProperty(r,"TupleReader",{enumerable:!0,get:function(){return E.TupleReader}});var x=e.r(810862);Object.defineProperty(r,"TupleBuilder",{enumerable:!0,get:function(){return x.TupleBuilder}}),o(e.r(787521),r);var A=e.r(940674);Object.defineProperty(r,"openContract",{enumerable:!0,get:function(){return A.openContract}});var T=e.r(470049);Object.defineProperty(r,"ComputeError",{enumerable:!0,get:function(){return T.ComputeError}});var k=e.r(940778);Object.defineProperty(r,"toNano",{enumerable:!0,get:function(){return k.toNano}}),Object.defineProperty(r,"fromNano",{enumerable:!0,get:function(){return k.fromNano}});var O=e.r(26978);Object.defineProperty(r,"crc16",{enumerable:!0,get:function(){return O.crc16}});var P=e.r(557352);Object.defineProperty(r,"crc32c",{enumerable:!0,get:function(){return P.crc32c}});var B=e.r(415075);Object.defineProperty(r,"base32Decode",{enumerable:!0,get:function(){return B.base32Decode}}),Object.defineProperty(r,"base32Encode",{enumerable:!0,get:function(){return B.base32Encode}});var j=e.r(926242);Object.defineProperty(r,"getMethodId",{enumerable:!0,get:function(){return j.getMethodId}});var I=e.r(824599);Object.defineProperty(r,"safeSign",{enumerable:!0,get:function(){return I.safeSign}}),Object.defineProperty(r,"safeSignVerify",{enumerable:!0,get:function(){return I.safeSignVerify}})},514779,(e,t,r)=>{"use strict";var n=function(e){return e&&e.Math===Math&&e};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n(e.g)||n("object"==typeof e.e&&e.e)||function(){return this}()||Function("return this")()},182223,(e,t,r)=>{"use strict";
2t.exports=function(e){try{return!!e()}catch(e){return!0}}},421906,(e,t,r)=>{"use strict";t.exports=!e.r(182223)(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},754397,(e,t,r)=>{"use strict";var n=e.r(421906),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},384972,(e,t,r)=>{"use strict";var n=e.r(421906),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}},854127,(e,t,r)=>{"use strict";var n=e.r(384972),o=n({}.toString),i=n("".slice);t.exports=function(e){return i(o(e),8,-1)}},789486,(e,t,r)=>{"use strict";var n=e.r(854127),o=e.r(384972);t.exports=function(e){if("Function"===n(e))return o(e)}},192906,(e,t,r)=>{"use strict";var n="object"==typeof document&&document.all;t.exports=void 0===n&&void 0!==n?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},951468,(e,t,r)=>{"use strict";t.exports=!e.r(182223)(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},438105,(e,t,r)=>{"use strict";var n=e.r(421906),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},557369,(e,t,r)=>{"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor;r.f=o&&!n.call({1:2},1)?function(e){var t=o(this,e);return!!t&&t.enumerable}:n},929659,(e,t,r)=>{"use strict";t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},64448,(e,t,r)=>{"use strict";var n=e.r(384972),o=e.r(182223),i=e.r(854127),a=Object,s=n("".split);t.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===i(e)?s(e,""):a(e)}:a},587938,(e,t,r)=>{"use strict";t.exports=function(e){return null==e}},958431,(e,t,r)=>{"use strict";var n=e.r(587938),o=TypeError;t.exports=function(e){if(n(e))throw new o("Can't call method on "+e);return e}},446845,(e,t,r)=>{"use strict";var n=e.r(64448),o=e.r(958431);t.exports=function(e){return n(o(e))}},231006,(e,t,r)=>{"use strict";var n=e.r(192906);t.exports=function(e){return"object"==typeof e?null!==e:n(e)}},931521,(e,t,r)=>{"use strict";t.exports={}},738624,(e,t,r)=>{"use strict";var n=e.r(931521),o=e.r(514779),i=e.r(192906),a=function(e){return i(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?a(n[e])||a(o[e]):n[e]&&n[e][t]||o[e]&&o[e][t]}},71223,(e,t,r)=>{"use strict";t.exports=e.r(384972)({}.isPrototypeOf)},831244,(e,t,r)=>{"use strict";var n=e.r(514779).navigator,o=n&&n.userAgent;t.exports=o?String(o):""},542241,(e,t,r)=>{"use strict";var n,o,i=e.r(514779),a=e.r(831244),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},64004,(e,t,r)=>{"use strict";var n=e.r(542241),o=e.r(182223),i=e.r(514779).String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},100836,(e,t,r)=>{"use strict";t.exports=e.r(64004)&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},91921,(e,t,r)=>{"use strict";var n=e.r(738624),o=e.r(192906),i=e.r(71223),a=e.r(100836),s=Object;t.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&i(t.prototype,s(e))}},909073,(e,t,r)=>{"use strict";var n=String;t.exports=function(e){try{return n(e)}catch(e){return"Object"}}},673102,(e,t,r)=>{"use strict";var n=e.r(192906),o=e.r(909073),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(o(e)+" is not a function")}},498332,(e,t,r)=>{"use strict";var n=e.r(673102),o=e.r(587938);t.exports=function(e,t){var r=e[t];return o(r)?void 0:n(r)}},253733,(e,t,r)=>{"use strict";var n=e.r(438105),o=e.r(192906),i=e.r(231006),a=TypeError;t.exports=function(e,t){var r,s;if("string"===t&&o(r=e.toString)&&!i(s=n(r,e))||o(r=e.valueOf)&&!i(s=n(r,e))||"string"!==t&&o(r=e.toString)&&!i(s=n(r,e)))return s;throw new a("Can't convert object to primitive value")}},767376,(e,t,r)=>{"use strict";
2t.exports=!0},871039,(e,t,r)=>{"use strict";var n=e.r(514779),o=Object.defineProperty;t.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},270680,(e,t,r)=>{"use strict";var n=e.r(767376),o=e.r(514779),i=e.r(871039),a="__core-js_shared__",s=t.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.49.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})},538796,(e,t,r)=>{"use strict";var n=e.r(270680);t.exports=function(e,t){return n[e]||(n[e]=t||{})}},390174,(e,t,r)=>{"use strict";var n=e.r(958431),o=Object;t.exports=function(e){return o(n(e))}},507102,(e,t,r)=>{"use strict";var n=e.r(384972),o=e.r(390174),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},597944,(e,t,r)=>{"use strict";var n=e.r(384972),o=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},858106,(e,t,r)=>{"use strict";var n=e.r(514779),o=e.r(538796),i=e.r(507102),a=e.r(597944),s=e.r(64004),c=e.r(100836),u=n.Symbol,l=o("wks"),f=c?u.for||u:u&&u.withoutSetter||a;t.exports=function(e){return i(l,e)||(l[e]=s&&i(u,e)?u[e]:f("Symbol."+e)),l[e]}},714372,(e,t,r)=>{"use strict";var n=e.r(438105),o=e.r(231006),i=e.r(91921),a=e.r(498332),s=e.r(253733),c=e.r(858106),u=TypeError,l=c("toPrimitive");t.exports=function(e,t){if(!o(e)||i(e))return e;var r,c=a(e,l);if(c){if(void 0===t&&(t="default"),!o(r=n(c,e,t))||i(r))return r;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},667990,(e,t,r)=>{"use strict";var n=e.r(714372),o=e.r(91921);t.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},241753,(e,t,r)=>{"use strict";var n=e.r(514779),o=e.r(231006),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}},676672,(e,t,r)=>{"use strict";var n=e.r(951468),o=e.r(182223),i=e.r(241753);t.exports=!n&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},543592,(e,t,r)=>{"use strict";var n=e.r(951468),o=e.r(438105),i=e.r(557369),a=e.r(929659),s=e.r(446845),c=e.r(667990),u=e.r(507102),l=e.r(676672),f=Object.getOwnPropertyDescriptor;r.f=n?f:function(e,t){if(e=s(e),t=c(t),l)try{return f(e,t)}catch(e){}if(u(e,t))return a(!o(i.f,e,t),e[t])}},24220,(e,t,r)=>{"use strict";var n=e.r(182223),o=e.r(192906),i=/#|\.prototype\./,a=function(e,t){var r=c[s(e)];return r===l||r!==u&&(o(t)?n(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},307197,(e,t,r)=>{"use strict";var n=e.r(789486),o=e.r(673102),i=e.r(421906),a=n(n.bind);t.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},197201,(e,t,r)=>{"use strict";var n=e.r(951468),o=e.r(182223);t.exports=n&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},387741,(e,t,r)=>{"use strict";var n=e.r(231006),o=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(o(e)+" is not an object")}},2955,(e,t,r)=>{"use strict";var n=e.r(951468),o=e.r(676672),i=e.r(197201),a=e.r(387741),s=e.r(667990),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",p="configurable",d="writable";r.f=n?i?function(e,t,r){if(a(e),t=s(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&d in r&&!r[d]){var n=l(e,t);n&&n[d]&&(e[t]=r.value,r={configurable:p in r?r[p]:n[p],enumerable:f in r?r[f]:n[f],writable:!1})}return u(e,t,r)}:u:function(e,t,r){if(a(e),t=s(t),a(r),o)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},136409,(e,t,r)=>{"use strict";var n=e.r(951468),o=e.r(2955),i=e.r(929659);t.exports=n?function(e,t,r){return o.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},211159,(e,t,r)=>{"use strict";var n=e.r(514779),o=e.r(754397),i=e.r(789486),a=e.r(192906),s=e.r(543592).f,c=e.r(24220),u=e.r(931521),l=e.r(307197),f=e.r(136409),p=e.r(507102);e.r(270680);var d=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return o(e,this,arguments)};return t.prototype=e.prototype,t};t.exports=function(e,t){var r,o,h,y,m,g,b,v,w,S=e.target,_=e.global,E=e.stat,x=e.proto,A=_?n:E?n[S]:n[S]&&n[S].prototype,T=_?u:u[S]||f(u,S,{})[S],k=T.prototype;for(y in t)o=!(r=c(_?y:S+(E?".":"#")+y,e.forced))&&A&&p(A,y),g=T[y],o&&(b=e.dontCallGetSet?(w=s(A,y))&&w.value:A[y]),m=o&&b?b:t[y],(r||x||typeof g!=typeof m)&&(v=e.bind&&o?l(m,n):e.wrap&&o?d(m):x&&a(m)?i(m):m,(e.sham||m&&m.sham||g&&g.sham)&&f(v,"sham",!0),f(T,y,v),x&&(p(u,h=S+"Prototype")||f(u,h,{}),f(u[h],y,m),e.real&&k&&(r||!k[y])&&f(k,y,m)))}},890740,(e,t,r)=>{"use strict";var n=Math.ceil,o=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?o:n)(t)}},763237,(e,t,r)=>{"use strict";var n=e.r(890740);t.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},398646,(e,t,r)=>{"use strict";var n=e.r(763237),o=Math.max,i=Math.min;t.exports=function(e,t){var r=n(e);return r<0?o(r+t,0):i(r,t)}},918689,(e,t,r)=>{"use strict";var n=e.r(763237),o=Math.min;t.exports=function(e){var t=n(e);return t>0?o(t,0x1fffffffffffff):0}},185389,(e,t,r)=>{"use strict";var n=e.r(918689);t.exports=function(e){return n(e.length)}},897613,(e,t,r)=>{"use strict";var n=e.r(446845),o=e.r(398646),i=e.r(185389),a=function(e){return function(t,r,a){var s,c=n(t),u=i(c);if(0===u)return!e&&-1;var l=o(a,u);if(e&&r!=r){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},496202,(e,t,r)=>{"use strict";
2t.exports={}},885350,(e,t,r)=>{"use strict";var n=e.r(384972),o=e.r(507102),i=e.r(446845),a=e.r(897613).indexOf,s=e.r(496202),c=n([].push);t.exports=function(e,t){var r,n=i(e),u=0,l=[];for(r in n)!o(s,r)&&o(n,r)&&c(l,r);for(;t.length>u;)o(n,r=t[u++])&&(~a(l,r)||c(l,r));return l}},711371,(e,t,r)=>{"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},825605,(e,t,r)=>{"use strict";var n=e.r(885350),o=e.r(711371);t.exports=Object.keys||function(e){return n(e,o)}},64929,(e,t,r)=>{"use strict";var n=e.r(211159),o=e.r(390174),i=e.r(825605);n({target:"Object",stat:!0,forced:e.r(182223)(function(){i(1)})},{keys:function(e){return i(o(e))}})},395148,(e,t,r)=>{"use strict";var n=e.r(854127);t.exports=Array.isArray||function(e){return"Array"===n(e)}},145266,(e,t,r)=>{"use strict";var n=e.r(858106)("toStringTag"),o={};o[n]="z",t.exports="[object z]"===String(o)},314161,(e,t,r)=>{"use strict";var n=e.r(145266),o=e.r(192906),i=e.r(854127),a=e.r(858106)("toStringTag"),s=Object,c="Arguments"===i(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(e){}};t.exports=n?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=u(t=s(e),a))?r:c?i(t):"Object"===(n=i(t))&&o(t.callee)?"Arguments":n}},606027,(e,t,r)=>{"use strict";var n=e.r(314161),o=String;t.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},598809,(e,t,r)=>{"use strict";var n=e.r(951468),o=e.r(2955),i=e.r(929659);t.exports=function(e,t,r){n?o.f(e,t,i(0,r)):e[t]=r}},97829,(e,t,r)=>{"use strict";var n=e.r(384972),o=e.r(507102),i=SyntaxError,a=parseInt,s=String.fromCharCode,c=n("".charAt),u=n("".slice),l=n(/./.exec),f={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"	"},p=/^[\da-f]{4}$/i,d=/^[\u0000-\u001F]$/;t.exports=function(e,t){for(var r=!0,n="";t<e.length;){var h=c(e,t);if("\\"===h){var y=u(e,t,t+2);if(o(f,y))n+=f[y],t+=2;else if("\\u"===y){var m=u(e,t+=2,t+4);if(!l(p,m))throw new i("Bad Unicode escape at: "+t);n+=s(a(m,16)),t+=4}else throw new i('Unknown escape sequence: "'+y+'"')}else if('"'===h){r=!1,t++;break}else{if(l(d,h))throw new i("Bad control character in string literal at: "+t);n+=h,t++}}if(r)throw new i("Unterminated string at: "+t);return{value:n,end:t}}},698366,(e,t,r)=>{"use strict";var n=e.r(211159),o=e.r(951468),i=e.r(514779),a=e.r(738624),s=e.r(384972),c=e.r(438105),u=e.r(192906),l=e.r(231006),f=e.r(395148),p=e.r(507102),d=e.r(606027),h=e.r(185389),y=e.r(598809),m=e.r(182223),g=e.r(97829),b=e.r(64004),v=i.JSON,w=i.Number,S=i.SyntaxError,_=v&&v.parse,E=a("Object","keys"),x=Object.getOwnPropertyDescriptor,A=s("".charAt),T=s("".slice),k=s(/./.exec),O=s([].push),P=/^\d$/,B=/^[1-9]$/,j=/^[\d-]$/,I=/^[\t\n\r ]$/,C=function(e,t){var r=new M(e=d(e),0,""),n=r.parse(),o=n.value,i=r.skip(I,n.end);if(i<e.length)throw new S('Unexpected extra character: "'+A(e,i)+'" after the parsed data at: '+i);return u(t)?R({"":o},"",t,n):o},R=function(e,t,r,n){var o,i,a,s,u,d=e[t],y=n&&d===n.value,m=y&&"string"==typeof n.source?{source:n.source}:{};if(l(d)){var g=f(d),b=y?n.nodes:g?[]:{};if(g)for(s=0,o=b.length,a=h(d);s<a;s++)U(d,s,R(d,""+s,r,s<o?b[s]:void 0));else for(s=0,a=h(i=E(d));s<a;s++)U(d,u=i[s],R(d,u,r,p(b,u)?b[u]:void 0))}return c(r,e,t,d,m)},U=function(e,t,r){if(o){var n=x(e,t);if(n&&!n.configurable)return}void 0===r?delete e[t]:y(e,t,r)},N=function(e,t,r,n){this.value=e,this.end=t,this.source=r,this.nodes=n},M=function(e,t){this.source=e,this.index=t};M.prototype={fork:function(e){return new M(this.source,e)},parse:function(){var e=this.source,t=this.skip(I,this.index),r=this.fork(t),n=A(e,t);if(k(j,n))return r.number();switch(n){case"{":return r.object();case"[":return r.array();case'"':return r.string();case"t":return r.keyword(!0);case"f":return r.keyword(!1);case"n":return r.keyword(null)}throw new S('Unexpected character: "'+n+'" at: '+t)},node:function(e,t,r,n,o){return new N(t,n,e?null:T(this.source,r,n),o)},object:function(){for(var e=this.source,t=this.index+1,r=!1,n={},o={},i=!1;t<e.length;){if("}"===A(e,t=this.until(['"',"}"],t))&&!r){t++,i=!0;break}var a=this.fork(t).string(),s=a.value;t=a.end,t=this.until([":"],t)+1,t=this.skip(I,t),y(o,s,a=this.fork(t).parse()),y(n,s,a.value);var c=A(e,t=this.until([",","}"],a.end));if(","===c)r=!0,t++;else if("}"===c){t++,i=!0;break}}if(!i)throw new S("Unterminated object at: "+t);return this.node(1,n,this.index,t,o)},array:function(){for(var e=this.source,t=this.index+1,r=!1,n=[],o=[],i=!1;t<e.length;){if("]"===A(e,t=this.skip(I,t))&&!r){t++,i=!0;break}var a=this.fork(t).parse();if(O(o,a),O(n,a.value),","===A(e,t=this.until([",","]"],a.end)))r=!0,t++;else if("]"===A(e,t)){t++,i=!0;break}}if(!i)throw new S("Unterminated array at: "+t);return this.node(1,n,this.index,t,o)}
2,string:function(){var e=this.index,t=g(this.source,this.index+1);return this.node(0,t.value,e,t.end)},number:function(){var e=this.source,t=this.index,r=t;if("-"===A(e,r)&&r++,"0"===A(e,r))r++;else if(k(B,A(e,r)))r=this.skip(P,r+1);else throw new S("Failed to parse number at: "+r);if("."===A(e,r)){var n=r+1;if(r=this.skip(P,n),n===r)throw new S("Failed to parse number's fraction at: "+r)}if(("e"===A(e,r)||"E"===A(e,r))&&(("+"===A(e,++r)||"-"===A(e,r))&&r++,r===(r=this.skip(P,r))))throw new S("Failed to parse number's exponent value at: "+r);return this.node(0,w(T(e,t,r)),t,r)},keyword:function(e){var t=""+e,r=this.index,n=r+t.length;if(T(this.source,r,n)!==t)throw new S("Failed to parse value at: "+r);return this.node(0,e,r,n)},skip:function(e,t){for(var r=this.source;t<r.length&&k(e,A(r,t));t++);return t},until:function(e,t){t=this.skip(I,t);for(var r=A(this.source,t),n=0;n<e.length;n++)if(e[n]===r)return t;throw new S('Unexpected character: "'+r+'" at: '+t)}};var D=m(function(){var e,t="9007199254740993";return _(t,function(t,r,n){e=n.source}),e!==t}),L=b&&!m(function(){return 1/_("-0 	")!=-1/0});n({target:"JSON",stat:!0,forced:D},{parse:function(e,t){return L&&!u(t)?_(e):C(e,t)}})},865676,(e,t,r)=>{"use strict";e.r(64929),e.r(698366),t.exports=e.r(931521).JSON.parse},591514,(e,t,r)=>{"use strict";t.exports=e.r(865676)},419442,(e,t,r)=>{"use strict";e.r(698366)},382401,(e,t,r)=>{"use strict";var n=e.r(591514);e.r(419442),t.exports=n},341578,(e,t,r)=>{"use strict";var n=e.r(951468),o=e.r(197201),i=e.r(2955),a=e.r(387741),s=e.r(446845),c=e.r(825605);r.f=n&&!o?Object.defineProperties:function(e,t){a(e);for(var r,n=s(t),o=c(t),u=o.length,l=0;u>l;)i.f(e,r=o[l++],n[r]);return e}},924627,(e,t,r)=>{"use strict";t.exports=e.r(738624)("document","documentElement")},267262,(e,t,r)=>{"use strict";var n=e.r(538796),o=e.r(597944),i=n("keys");t.exports=function(e){return i[e]||(i[e]=o(e))}},390585,(e,t,r)=>{"use strict";var n,o=e.r(387741),i=e.r(341578),a=e.r(711371),s=e.r(496202),c=e.r(924627),u=e.r(241753),l=e.r(267262),f="prototype",p="script",d=l("IE_PROTO"),h=function(){},y=function(e){return"<"+p+">"+e+"</"+p+">"},m=function(e){e.write(y("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){var e,t=u("iframe");return t.style.display="none",c.appendChild(t),t.src=String("java"+p+":"),(e=t.contentWindow.document).open(),e.write(y("document.F=Object")),e.close(),e.F},b=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}b="u">typeof document?document.domain&&n?m(n):g():m(n);for(var e=a.length;e--;)delete b[f][a[e]];return b()};
2s[d]=!0,t.exports=Object.create||function(e,t){var r;return null!==e?(h[f]=o(e),r=new h,h[f]=null,r[d]=e):r=b(),void 0===t?r:i.f(r,t)}},228211,(e,t,r)=>{"use strict";e.r(211159)({target:"Object",stat:!0,sham:!e.r(951468)},{create:e.r(390585)})},763238,(e,t,r)=>{"use strict";t.exports=!e.r(182223)(function(){return Object.isExtensible(Object.preventExtensions({}))})},106943,(e,t,r)=>{"use strict";var n=e.r(885350),o=e.r(711371).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},223130,(e,t,r)=>{"use strict";t.exports=e.r(384972)([].slice)},617044,(e,t,r)=>{"use strict";var n=e.r(854127),o=e.r(446845),i=e.r(106943).f,a=e.r(223130),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(e){try{return i(e)}catch(e){return a(s)}};t.exports.f=function(e){return s&&"Window"===n(e)?c(e):i(o(e))}},847159,(e,t,r)=>{"use strict";t.exports=e.r(182223)(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})},521263,(e,t,r)=>{"use strict";var n=e.r(182223),o=e.r(231006),i=e.r(854127),a=e.r(847159),s=Object.isExtensible;t.exports=n(function(){s(1)})||a?function(e){return!!o(e)&&(!a||"ArrayBuffer"!==i(e))&&(!s||s(e))}:s},668902,(e,t,r)=>{"use strict";var n=e.r(211159),o=e.r(384972),i=e.r(496202),a=e.r(231006),s=e.r(507102),c=e.r(2955).f,u=e.r(106943),l=e.r(617044),f=e.r(521263),p=e.r(597944),d=e.r(763238),h=!1,y=p("meta"),m=0,g=function(e){c(e,y,{value:{objectID:"O"+m++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},h=!0;var e=u.f,t=o([].splice),r={};r[y]=1,e(r).length&&(u.f=function(r){for(var n=e(r),o=0,i=n.length;o<i;o++)if(n[o]===y){t(n,o,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,y)){if(!f(e))return"F";if(!t)return"E";g(e)}return e[y].objectID},getWeakData:function(e,t){if(!s(e,y)){if(!f(e))return!0;if(!t)return!1;g(e)}return e[y].weakData},onFreeze:function(e){return d&&h&&f(e)&&!s(e,y)&&g(e),e}};i[y]=!0},446922,(e,t,r)=>{"use strict";var n=e.r(211159),o=e.r(763238),i=e.r(182223),a=e.r(231006),s=e.r(668902).onFreeze,c=Object.freeze;n({target:"Object",stat:!0,forced:i(function(){c(1)}),sham:!o},{freeze:function(e){return c&&a(e)?c(s(e)):e}})},887620,(e,t,r)=>{"use strict";t.exports=!e.r(182223)(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e})},868920,(e,t,r)=>{"use strict";var n=e.r(514779),o=e.r(192906),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},543914,(e,t,r)=>{"use strict";var n,o,i,a=e.r(868920),s=e.r(514779),c=e.r(231006),u=e.r(136409),l=e.r(507102),f=e.r(270680),p=e.r(267262),d=e.r(496202),h="Object already initialized",y=s.TypeError,m=s.WeakMap;if(a||f.state){var g=f.state||(f.state=new m);g.get=g.get,g.has=g.has,g.set=g.set,n=function(e,t){if(g.has(e))throw new y(
2h);return t.facade=e,g.set(e,t),t},o=function(e){return g.get(e)||{}},i=function(e){return g.has(e)}}else{var b=p("state");d[b]=!0,n=function(e,t){if(l(e,b))throw new y(h);return t.facade=e,u(e,b,t),t},o=function(e){return l(e,b)?e[b]:{}},i=function(e){return l(e,b)}}t.exports={set:n,get:o,has:i,enforce:function(e){return i(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=o(t)).type!==e)throw new y("Incompatible receiver, "+e+" required");return r}}}},994869,(e,t,r)=>{"use strict";var n=e.r(211159),o=e.r(763238),i=e.r(887620),a=e.r(738624),s=e.r(384972),c=e.r(606027),u=e.r(598809),l=e.r(543914).set,f=SyntaxError,p=a("JSON","parse"),d=a("Object","create"),h=a("Object","freeze"),y=s("".charAt),m="Unacceptable as raw JSON",g=function(e){return" "===e||"	"===e||"\n"===e||"\r"===e};n({target:"JSON",stat:!0,forced:!i},{rawJSON:function(e){var t=c(e);if(""===t||g(y(t,0))||g(y(t,t.length-1)))throw new f(m);var r=p(t);if("object"==typeof r&&null!==r)throw new f(m);var n=d(null);return l(n,{type:"RawJSON"}),u(n,"rawJSON",t),o?h(n):n}})},755736,(e,t,r)=>{"use strict";e.r(228211),e.r(446922),e.r(994869),t.exports=e.r(931521).JSON.rawJSON},839774,(e,t,r)=>{"use strict";t.exports=e.r(755736)},311553,(e,t,r)=>{"use strict";var n=e.r(231006),o=e.r(543914).get;t.exports=function(e){if(!n(e))return!1;var t=o(e);return!!t&&"RawJSON"===t.type}},593643,(e,t,r)=>{"use strict";var n=e.r(211159),o=e.r(738624),i=e.r(754397),a=e.r(438105),s=e.r(384972),c=e.r(182223),u=e.r(395148),l=e.r(192906),f=e.r(311553),p=e.r(91921),d=e.r(854127),h=e.r(606027),y=e.r(223130),m=e.r(97829),g=e.r(597944),b=e.r(64004),v=e.r(887620),w=String,S=o("JSON","stringify"),_=s(/./.exec),E=s("".charAt),x=s("".charCodeAt),A=s("".replace),T=s("".slice),k=s([].push),O=s(1.1.toString),P=/[\uD800-\uDFFF]/g,B=/^[\uD800-\uDBFF]$/,j=/^[\uDC00-\uDFFF]$/,I=g(),C=I.length,R=!b||c(function(){var e=o("Symbol")("stringify detection");return"[null]"!==S([e])||"{}"!==S({a:e})||"{}"!==S(Object(e))}),U=c(function(){return'"\\udf06\\ud834"'!==S("\uDF06\uD834")||'"\\udead"'!==S("\uDEAD")}),N=R?function(e,t){var r=y(arguments),n=D(t);if(!(!l(n)&&(void 0===e||p(e))))return r[1]=function(e,t){if(l(n)&&(t=a(n,this,w(e),t)),!p(t))return t},i(S,null,r)}:S,M=function(e,t,r){var n=E(r,t-1),o=E(r,t+1);return _(B,e)&&!_(j,o)||_(j,e)&&!_(B,n)?"\\u"+O(x(e,0),16):e},D=function(e){if(l(e))return e;if(u(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];"string"==typeof o?k(r,o):("number"==typeof o||"Number"===d(o)||"String"===d(o))&&k(r,h(o))}var i=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(u(this))return t;for(var n=0;n<i;n++)if(r[n]===e)return t}}};
2S&&n({target:"JSON",stat:!0,arity:3,forced:R||U||!v},{stringify:function(e,t,r){var n=D(t),o=[],i=N(e,function(e,t){var r=l(n)?a(n,this,w(e),t):t;return!v&&f(r)?I+(k(o,r.rawJSON)-1):r},r);if("string"!=typeof i||(U&&(i=A(i,P,M)),v))return i;for(var s="",c=i.length,u=0;u<c;u++){var p=E(i,u);if('"'===p){var d=m(i,++u).end-1,h=T(i,u,d);s+=T(h,0,C)===I?o[T(h,C)]:'"'+h+'"',u=d}else s+=p}return s}})},938245,(e,t,r)=>{"use strict";e.r(994869)},154877,(e,t,r)=>{"use strict";var n=e.r(839774);e.r(593643),e.r(938245),t.exports=n},392001,(e,t,r)=>{"use strict";var n=e.r(763237),o=e.r(606027),i=e.r(958431),a=RangeError,s=Math.floor;t.exports=function(e){var t=o(i(this)),r="",c=n(e);if(c<0||c===1/0)throw new a("Wrong number of repetitions");for(;c>0;(c=s(c/2))&&(t+=t))c%2&&(r+=t);return r}},950207,(e,t,r)=>{"use strict";var n=e.r(384972),o=e.r(918689),i=e.r(606027),a=e.r(392001),s=e.r(958431),c=n(a),u=n("".slice),l=Math.ceil,f=function(e){return function(t,r,n){var a,f,p=i(s(t)),d=o(r),h=p.length;if(d<=h)return p;var y=void 0===n?" ":i(n);return""===y?p:((f=c(y,l((a=d-h)/y.length))).length>a&&(f=u(f,0,a)),e?p+f:f+p)}};t.exports={start:f(!1),end:f(!0)}},254562,(e,t,r)=>{"use strict";var n=e.r(384972),o=e.r(182223),i=e.r(950207).start,a=RangeError,s=isFinite,c=Math.abs,u=Date.prototype,l=u.toISOString,f=n(u.getTime),p=n(u.getUTCDate),d=n(u.getUTCFullYear),h=n(u.getUTCHours),y=n(u.getUTCMilliseconds),m=n(u.getUTCMinutes),g=n(u.getUTCMonth),b=n(u.getUTCSeconds);t.exports=o(function(){return"0385-07-25T07:06:39.999Z"!==l.call(new Date(-5e13-1))})||!o(function(){l.call(new Date(NaN))})?function(){if(!s(f(this)))throw new a("Invalid time value");var e=d(this),t=y(this),r=e<0?"-":e>9999?"+":"";return r+i(c(e),r?6:4,0)+"-"+i(g(this)+1,2,0)+"-"+i(p(this),2,0)+"T"+i(h(this),2,0)+":"+i(m(this),2,0)+":"+i(b(this),2,0)+"."+i(t,3,0)+"Z"}:l},167795,(e,t,r)=>{"use strict";var n=e.r(211159),o=e.r(438105),i=e.r(390174),a=e.r(714372),s=e.r(254562),c=e.r(854127);n({target:"Date",proto:!0,forced:e.r(182223)(function(){return null!==new Date(NaN).toJSON()||1!==o(Date.prototype.toJSON,{toISOString:function(){return 1}})})},{toJSON:function(e){var t=i(this),r=a(t,"number");return"number"!=typeof r||isFinite(r)?"toISOString"in t||"Date"!==c(t)?t.toISOString():o(s,t):null}})},259997,(e,t,r)=>{"use strict";e.r(167795),e.r(593643);var n=e.r(931521),o=e.r(754397);n.JSON||(n.JSON={stringify:JSON.stringify}),t.exports=function(e,t,r){return o(n.JSON.stringify,null,arguments)}},966915,(e,t,r)=>{"use strict";t.exports=e.r(259997)},832413,(e,t,r)=>{"use strict";t.exports=e.r(966915)},623104,(e,t,r)=>{"use strict";var n,o,i,a,s,c,u,l,f,p,d,h,y,m,g,b,v,w,S=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.TonApiClient=r.ContentType=r.PoolImplementationType=r.TrustType=r.JettonVerificationType=r.BouncePhaseType=r.ComputeSkipReason=r.AccStatusChange=r.TransactionType=r.AccountStatus=void 0,(n=p||(r.AccountStatus=p={})).Nonexist="nonexist",n.Uninit="uninit",n.Active="active",n.Frozen="frozen",(o=d||(r.TransactionType=d={})).TransOrd="TransOrd",o.TransTickTock="TransTickTock",o.TransSplitPrepare="TransSplitPrepare",o.TransSplitInstall="TransSplitInstall",o.TransMergePrepare="TransMergePrepare",o.TransMergeInstall="TransMergeInstall",o.TransStorage="TransStorage",(i=h||(r.AccStatusChange=h={})).AcstUnchanged="acst_unchanged",i.AcstFrozen="acst_frozen",i.AcstDeleted="acst_deleted",(a=y||(r.ComputeSkipReason=y={})).CskipNoState="cskip_no_state",a.CskipBadState="cskip_bad_state",a.CskipNoGas="cskip_no_gas",(s=m||(r.BouncePhaseType=m={})).TrPhaseBounceNegfunds="TrPhaseBounceNegfunds",s.TrPhaseBounceNofunds="TrPhaseBounceNofunds",s.TrPhaseBounceOk="TrPhaseBounceOk",(c=g||(r.JettonVerificationType=g={}
2)).Whitelist="whitelist",c.Blacklist="blacklist",c.None="none",(u=b||(r.TrustType=b={})).Whitelist="whitelist",u.Graylist="graylist",u.Blacklist="blacklist",u.None="none",(l=v||(r.PoolImplementationType=v={})).Whales="whales",l.Tf="tf",l.LiquidTF="liquidTF",(f=w||(r.ContentType=w={})).Json="application/json",f.FormData="multipart/form-data",f.UrlEncoded="application/x-www-form-urlencoded",f.Text="text/plain";let _=e.r(531738),E=S(e.r(382401)),x=S(e.r(154877)),A=S(e.r(832413)),T=e=>(0,E.default)(e,(e,t,r)=>{if("number"==typeof t){let e=r.source;return Number.isSafeInteger(t)||/[\.eE]/.test(e)?t:BigInt(e)}return t}),k=e=>(0,A.default)(e,(e,t)=>"bigint"==typeof t?(0,x.default)(t.toString()):t);class O{baseUrl="https://tonapi.io";abortControllers=new Map;providedFetch=null;customFetch=(...e)=>this.providedFetch?this.providedFetch(...e):fetch(...e);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(e={}){const t="u">typeof window&&window&&window.tonapi,r=e.fetch??(t&&t.fetch)??null,n=e.baseApiParams||{},{apiKey:o,...i}=e,a={...n.headers??{},...o?{Authorization:`Bearer ${o}`}:{},"x-tonapi-client":"[email protected]"};Object.assign(this,{...i,providedFetch:r,baseApiParams:{...n,headers:a}})}encodeQueryParam(e,t){let r=encodeURIComponent(e);return`${r}=${encodeURIComponent("number"==typeof t?t:`${t}`)}`}addQueryParam(e,t){return this.encodeQueryParam(t,e[t])}addImplodeArrayQueryParam(e,t){let r=e[t].map(e=>encodeURIComponent("number"==typeof e?e:`${e}`)).join(",");return this.encodeQueryParam(t,r)}addArrayQueryParam(e,t,r){let n=e[t];return r?.includes(t)?this.addImplodeArrayQueryParam(e,t):n.map(e=>this.encodeQueryParam(t,e)).join("&")}toQueryString(e,t){let r=e||{};return Object.keys(r).filter(e=>void 0!==r[e]).map(e=>Array.isArray(r[e])?this.addArrayQueryParam(r,e,t):this.addQueryParam(r,e)).join("&")}addQueryParams(e){let t=this.toQueryString(e);return t?`?${t}`:""}contentFormatters={[w.Json]:e=>null!==e&&("object"==typeof e||"string"==typeof e)?k(e):e,[w.Text]:e=>null!==e&&"string"!=typeof e?k(e):e,[w.FormData]:e=>Object.keys(e||{}).reduce((t,r)=>{let n=e[r];return t.append(r,n instanceof Blob?n:"object"==typeof n&&null!==n?k(n):`${n}`),t},new FormData),[w.UrlEncoded]:e=>this.toQueryString(e)};
2mergeRequestParams(e,t){return{...this.baseApiParams,...e,...t||{},headers:{...this.baseApiParams.headers||{},...e.headers||{},...t&&t.headers||{}}}}createAbortSignal=e=>{if(this.abortControllers.has(e)){let t=this.abortControllers.get(e);return t?t.signal:void 0}let t=new AbortController;return this.abortControllers.set(e,t),t.signal};abortRequest=e=>{let t=this.abortControllers.get(e);t&&(t.abort(),this.abortControllers.delete(e))};request=async({body:e,secure:t,path:r,type:n,query:o,queryImplode:i,format:a,baseUrl:s,cancelToken:c,...u})=>{let l=this.mergeRequestParams(u),f=o&&this.toQueryString(o,i),p=n??w.Json,d=this.contentFormatters[p],h=a||l.format;return this.customFetch(`${s||this.baseUrl||""}${r}${f?`?${f}`:""}`,{...l,headers:{...l.headers||{},...p&&p!==w.FormData?{"Content-Type":p}:{}},signal:(c?this.createAbortSignal(c):l.signal)||null,body:null==e?null:d(e)}).then(async e=>{e.data=null,e.error=null;let t="json"===h?"text":h,r=t?await e[t]().then(t=>(e.ok?e.data="json"===h?T(t):t:e.error=t,e)).catch(t=>(e.error=t,e)):e;if(c&&this.abortControllers.delete(c),!e.ok)throw r;return r.data})}}let P={"#/components/schemas/Error":{type:"object",required:["error"],properties:{error:{type:"string"}}},"#/components/schemas/AccountAddress":{type:"object",required:["address","is_scam","is_wallet"],properties:{address:{type:"string",format:"address"},name:{type:"string"},is_scam:{type:"boolean"},icon:{type:"string"},is_wallet:{type:"boolean"}}},"#/components/schemas/BlockCurrencyCollection":{type:"object",required:["grams","other"],properties:{grams:{type:"integer",format:"int64","x-js-format":"bigint"},other:{type:"array",items:{type:"object",required:["id","value"],properties:{id:{type:"integer",format:"int64"},value:{type:"string","x-js-format":"bigint"}}}}}},"#/components/schemas/BlockValueFlow":{type:"object",required:["from_prev_blk","to_next_blk","imported","exported","fees_collected","fees_imported","recovered","created","minted"],properties:{from_prev_blk:{$ref:"#/components/schemas/BlockCurrencyCollection"},to_next_blk:{$ref:"#/components/schemas/BlockCurrencyCollection"},imported:{$ref:"#/components/schemas/BlockCurrencyCollection"},exported:{$ref:"#/components/schemas/BlockCurrencyCollection"},fees_collected:{$ref:"#/components/schemas/BlockCurrencyCollection"},burned:{$ref:"#/components/schemas/BlockCurrencyCollection"},fees_imported:{$ref:"#/components/schemas/BlockCurrencyCollection"},recovered:{$ref:"#/components/schemas/BlockCurrencyCollection"},created:{$ref:"#/components/schemas/BlockCurrencyCollection"},minted:{$ref:"#/components/schemas/BlockCurrencyCollection"}}},"#/components/schemas/ServiceStatus":{type:"object",required:["indexing_latency","rest_online","last_known_masterchain_seqno"],properties:{rest_online:{type:"boolean",default:!0},indexing_latency:{type:"integer"},last_known_masterchain_seqno:{type:"integer",format:"int32"}}},"#/components/schemas/ReducedBlock":{type:"object",required:["workchain_id","shard","seqno","tx_quantity","utime","shards_blocks","parent"],properties:{workchain_id:{type:"integer",format:"int32"},shard:{type:"string"},seqno:{type:"integer",format:"int32"},master_ref:{type:"string"},tx_quantity:{type:"integer"},utime:{type:"integer",format:"int64"},shards_blocks:{type:"array",items:{type:"string"}},parent:{type:"array",items:{type:"string"}}}},"#/components/schemas/BlockchainBlock":{type:"object",required:["workchain_id","shard","seqno","root_hash","file_hash","global_id","value_flow","version","after_merge","before_split","after_split","want_split","want_merge","key_block","gen_utime","start_lt","end_lt","vert_seqno","gen_catchain_seqno","min_ref_mc_seqno","prev_key_block_seqno","prev_refs","in_msg_descr_length","out_msg_descr_length","rand_seed","created_by","tx_quantity"],properties:{tx_quantity:{type:"integer"},value_flow:{$ref:"#/components/schemas/BlockValueFlow"},workchain_id:{type:"integer",format:"int32"},shard:{type:"string"},seqno:{type:"integer",format:"int32"},root_hash:{type:"string"},file_hash:{type:"string"},global_id:{type:"integer",format:"int32"},version:{type:"integer",format:"int32"},after_merge:{type:"boolean"},before_split:{type:"boolean"},after_split:{type:"boolean"},want_split:{type:"boolean"},want_merge:{type:"boolean"},key_block:{type:"boolean"},gen_utime:{type:"integer",format:"int64"},start_lt:{type:"integer",format:"int64","x-js-format":"bigint"},end_lt:{type:"integer",format:"int64","x-js-format":"bigint"},vert_seqno:{type:"integer",format:"int32"},gen_catchain_seqno:{type:"integer",format:"int32"},min_ref_mc_seqno:{type:"integer",format:"int32"},prev_key_block_seqno:{type:"integer",format:"int32"},gen_software_version:{type:"integer",format:"int32"},gen_software_capabilities:{type:"integer",format:"int64"},master_ref:{type:"string"},prev_refs:{type:"array",items:{type:"string"}},in_msg_descr_length:{type:"integer",format:"int64"},out_msg_descr_length:{type:"integer",format:"int64"},rand_seed:{type:"string"},created_by:{type:"string"}}},"#/components/schemas/BlockchainBlocks":{type:"object",required:["blocks"],properties:{blocks:{type:"array",items:{$ref:"#/components/schemas/BlockchainBlock"}}}},"#/components/schemas/ReducedBlocks":{type:"object",required:["blocks"],properties:{blocks:{type:"array",items:{$ref:"#/components/schemas/ReducedBlock"}}}},"#/components/schemas/BlockchainBlockShards":{type:"object",required:["shards"],properties:{shards:{type:"array",items:{type:"object",required:["last_known_block_id","last_known_block"],properties:{last_known_block_id:{type:"string"},last_known_block:{$ref:"#/components/schemas/BlockchainBlock"}}}}}},"#/components/schemas/AccountStatus":{type:"string",enum:["nonexist","uninit","active","frozen"]},"#/components/schemas/StateInit":{type:"object",required:["boc","interfaces"],properties:{boc:{type:"string",format:"cell"},interfaces:{type:"array",items:{type:"string"}}}}
2,"#/components/schemas/Message":{type:"object",required:["msg_type","created_lt","ihr_disabled","bounce","bounced","value","fwd_fee","ihr_fee","import_fee","created_at","hash"],properties:{msg_type:{type:"string",enum:["int_msg","ext_in_msg","ext_out_msg"]},created_lt:{type:"integer",format:"int64","x-js-format":"bigint"},ihr_disabled:{type:"boolean"},bounce:{type:"boolean"},bounced:{type:"boolean"},value:{type:"integer",format:"int64","x-js-format":"bigint"},value_extra:{type:"array",items:{$ref:"#/components/schemas/ExtraCurrency"}},fwd_fee:{type:"integer",format:"int64","x-js-format":"bigint"},ihr_fee:{type:"integer",format:"int64","x-js-format":"bigint"},destination:{$ref:"#/components/schemas/AccountAddress"},source:{$ref:"#/components/schemas/AccountAddress"},import_fee:{type:"integer",format:"int64","x-js-format":"bigint"},created_at:{type:"integer",format:"int64"},op_code:{type:"string","x-js-format":"bigint"},init:{$ref:"#/components/schemas/StateInit"},hash:{type:"string"},raw_body:{type:"string",format:"cell"},decoded_op_name:{type:"string"},decoded_body:{}}},"#/components/schemas/TransactionType":{type:"string",enum:["TransOrd","TransTickTock","TransSplitPrepare","TransSplitInstall","TransMergePrepare","TransMergeInstall","TransStorage"]},"#/components/schemas/AccStatusChange":{type:"string",enum:["acst_unchanged","acst_frozen","acst_deleted"]},"#/components/schemas/ComputeSkipReason":{type:"string",enum:["cskip_no_state","cskip_bad_state","cskip_no_gas"]},"#/components/schemas/BouncePhaseType":{type:"string",enum:["TrPhaseBounceNegfunds","TrPhaseBounceNofunds","TrPhaseBounceOk"]},"#/components/schemas/ComputePhase":{type:"object",required:["skipped"],properties:{skipped:{type:"boolean"},skip_reason:{$ref:"#/components/schemas/ComputeSkipReason"},success:{type:"boolean"},gas_fees:{type:"integer",format:"int64","x-js-format":"bigint"},gas_used:{type:"integer",format:"int64","x-js-format":"bigint"},vm_steps:{type:"integer",format:"int32"},exit_code:{type:"integer",format:"int32"},exit_code_description:{type:"string"}}},"#/components/schemas/StoragePhase":{type:"object",required:["fees_collected","status_change"],properties:{fees_collected:{type:"integer",format:"int64","x-js-format":"bigint"},fees_due:{type:"integer",format:"int64","x-js-format":"bigint"},status_change:{$ref:"#/components/schemas/AccStatusChange"}}},"#/components/schemas/CreditPhase":{type:"object",required:["fees_collected","credit"],properties:{fees_collected:{type:"integer",format:"int64","x-js-format":"bigint"},credit:{type:"integer",format:"int64","x-js-format":"bigint"}}},"#/components/schemas/ActionPhase":{type:"object",required:["success","result_code","total_actions","skipped_actions","fwd_fees","total_fees"],properties:{success:{type:"boolean"},result_code:{type:"integer",format:"int32"},total_actions:{type:"integer",format:"int32"},skipped_actions:{type:"integer",format:"int32"},fwd_fees:{type:"integer",format:"int64","x-js-format":"bigint"},total_fees:{type:"integer",format:"int64","x-js-format":"bigint"},result_code_description:{type:"string"}}},"#/components/schemas/Transaction":{type:"object",required:["hash","lt","account","end_balance","success","utime","orig_status","end_status","total_fees","transaction_type","state_update_old","state_update_new","out_msgs","block","aborted","destroyed","raw"],properties:{hash:{type:"string"},lt:{type:"integer",format:"int64","x-js-format":"bigint"},account:{$ref:"#/components/schemas/AccountAddress"},success:{type:"boolean"},utime:{type:"integer",format:"int64"},orig_status:{$ref:"#/components/schemas/AccountStatus"},end_status:{$ref:"#/components/schemas/AccountStatus"},total_fees:{type:"integer",format:"int64","x-js-format":"bigint"},end_balance:{type:"integer",format:"int64","x-js-format":"bigint"},transaction_type:{$ref:"#/components/schemas/TransactionType"},state_update_old:{type:"string"},state_update_new:{type:"string"},in_msg:{$ref:"#/components/schemas/Message"},out_msgs:{type:"array",items:{$ref:"#/components/schemas/Message"}},block:{type:"string"},prev_trans_hash:{type:"string"},prev_trans_lt:{type:"integer",format:"int64","x-js-format":"bigint"},compute_phase:{$ref:"#/components/schemas/ComputePhase"},storage_phase:{$ref:"#/components/schemas/StoragePhase"},credit_phase:{$ref:"#/components/schemas/CreditPhase"},action_phase:{$ref:"#/components/schemas/ActionPhase"},bounce_phase:{$ref:"#/components/schemas/BouncePhaseType"},aborted:{type:"boolean"},destroyed:{type:"boolean"},raw:{type:"string",format:"cell"}}},"#/components/schemas/Transactions":{type:"object",required:["transactions"],properties:{transactions:{type:"array",items:{$ref:"#/components/schemas/Transaction"}}}},"#/components/schemas/ConfigProposalSetup":{type:"object",required:["min_tot_rounds","max_tot_rounds","min_wins","max_losses","min_store_sec","max_store_sec","bit_price","cell_price"],properties:{min_tot_rounds:{type:"integer"},max_tot_rounds:{type:"integer"},min_wins:{type:"integer"},max_losses:{type:"integer"},min_store_sec:{type:"integer",format:"int64"},max_store_sec:{type:"integer",format:"int64"},bit_price:{type:"integer",format:"int64"},cell_price:{type:"integer",format:"int64"}}}
2,"#/components/schemas/GasLimitPrices":{type:"object",required:["gas_price","gas_limit","gas_credit","block_gas_limit","freeze_due_limit","delete_due_limit"],properties:{special_gas_limit:{type:"integer",format:"int64"},flat_gas_limit:{type:"integer",format:"int64"},flat_gas_price:{type:"integer",format:"int64"},gas_price:{type:"integer",format:"int64"},gas_limit:{type:"integer",format:"int64"},gas_credit:{type:"integer",format:"int64"},block_gas_limit:{type:"integer",format:"int64"},freeze_due_limit:{type:"integer",format:"int64"},delete_due_limit:{type:"integer",format:"int64"}}},"#/components/schemas/BlockParamLimits":{type:"object",required:["underload","soft_limit","hard_limit"],properties:{underload:{type:"integer",format:"int64"},soft_limit:{type:"integer",format:"int64"},hard_limit:{type:"integer",format:"int64"}}},"#/components/schemas/BlockLimits":{type:"object",required:["bytes","gas","lt_delta"],properties:{bytes:{$ref:"#/components/schemas/BlockParamLimits"},gas:{$ref:"#/components/schemas/BlockParamLimits"},lt_delta:{$ref:"#/components/schemas/BlockParamLimits"}}},"#/components/schemas/MsgForwardPrices":{type:"object",required:["lump_price","bit_price","cell_price","ihr_price_factor","first_frac","next_frac"],properties:{lump_price:{type:"integer",format:"int64"},bit_price:{type:"integer",format:"int64"},cell_price:{type:"integer",format:"int64"},ihr_price_factor:{type:"integer",format:"int64"},first_frac:{type:"integer",format:"int64"},next_frac:{type:"integer",format:"int64"}}},"#/components/schemas/WorkchainDescr":{type:"object",required:["workchain","enabled_since","actual_min_split","min_split","max_split","basic","active","accept_msgs","flags","zerostate_root_hash","zerostate_file_hash","version"],properties:{workchain:{type:"integer",format:"int"},enabled_since:{type:"integer",format:"int64"},actual_min_split:{type:"integer",format:"int"},min_split:{type:"integer",format:"int"},max_split:{type:"integer",format:"int"},basic:{type:"integer"},active:{type:"boolean"},accept_msgs:{type:"boolean"},flags:{type:"integer",format:"int"},zerostate_root_hash:{type:"string"},zerostate_file_hash:{type:"string"},version:{type:"integer",format:"int64"}}},"#/components/schemas/MisbehaviourPunishmentConfig":{type:"object",required:["default_flat_fine","default_proportional_fine","severity_flat_mult","severity_proportional_mult","unpunishable_interval","long_interval","long_flat_mult","long_proportional_mult","medium_interval","medium_flat_mult","medium_proportional_mult"],properties:{default_flat_fine:{type:"integer",format:"int64"},default_proportional_fine:{type:"integer",format:"int64"},severity_flat_mult:{type:"integer"},severity_proportional_mult:{type:"integer"},unpunishable_interval:{type:"integer"},long_interval:{type:"integer"},long_flat_mult:{type:"integer"},long_proportional_mult:{type:"integer"},medium_interval:{type:"integer"},medium_flat_mult:{type:"integer"},medium_proportional_mult:{type:"integer"}}},"#/components/schemas/SizeLimitsConfig":{type:"object",required:["max_msg_bits","max_msg_cells","max_library_cells","max_vm_data_depth","max_ext_msg_size","max_ext_msg_depth"],properties:{max_msg_bits:{type:"integer",format:"int64"},max_msg_cells:{type:"integer",format:"int64"},max_library_cells:{type:"integer",format:"int64"},max_vm_data_depth:{type:"integer",format:"int"},max_ext_msg_size:{type:"integer",format:"int64"},max_ext_msg_depth:{type:"integer",format:"int"},max_acc_state_cells:{type:"integer",format:"int64"},max_acc_state_bits:{type:"integer",format:"int64"}}},"#/components/schemas/ValidatorsSet":{type:"object",required:["utime_since","utime_until","total","main","list"],properties:{utime_since:{type:"integer"},utime_until:{type:"integer"},total:{type:"integer"},main:{type:"integer"},total_weight:{type:"string","x-js-format":"bigint"},list:{type:"array",items:{type:"object",required:["public_key","weight"],properties:{public_key:{type:"string"},weight:{type:"integer",format:"int64","x-js-format":"bigint"},adnl_addr:{type:"string"}}}}}},"#/components/schemas/Oracle":{type:"object",required:["address","secp_pubkey"],properties:{address:{type:"string",format:"address"},secp_pubkey:{type:"string"}}},"#/components/schemas/OracleBridgeParams":{type:"object",required:["bridge_addr","oracle_multisig_address","external_chain_address","oracles"],properties:{bridge_addr:{type:"string",format:"address"},oracle_multisig_address:{type:"string",format:"address"},external_chain_address:{type:"string"},oracles:{type:"array",items:{$ref:"#/components/schemas/Oracle"}}}},"#/components/schemas/JettonBridgePrices":{type:"object",required:["bridge_burn_fee","bridge_mint_fee","wallet_min_tons_for_storage","wallet_gas_consumption","minter_min_tons_for_storage","discover_gas_consumption"],properties:{bridge_burn_fee:{type:"integer",format:"int64"},bridge_mint_fee:{type:"integer",format:"int64"},wallet_min_tons_for_storage:{type:"integer",format:"int64"},wallet_gas_consumption:{type:"integer",format:"int64"},minter_min_tons_for_storage:{type:"integer",format:"int64"},discover_gas_consumption:{type:"integer",format:"int64"}}},"#/components/schemas/JettonBridgeParams":{type:"object",required:["bridge_address","oracles_address","state_flags","oracles"],properties:{bridge_address:{type:"string",format:"address"},oracles_address:{type:"string",format:"address"},state_flags:{type:"integer"},burn_bridge_fee:{type:"integer",format:"int64"},oracles:{type:"array",items:{$ref:"#/components/schemas/Oracle"}},external_chain_address:{type:"string"},prices:{$ref:"#/components/schemas/JettonBridgePrices"}}},"#/components/schemas/Validator":{type:"object",required:["address","adnl_address","stake","max_factor"],properties:{address:{type:"string",format:"address"},adnl_address:{type:"string"},stake:{type:"integer",format:"int64","x-js-format":"bigint"},max_factor:{type:"integer",format:"int64"}}},"#/components/schemas/Validators":{type:"object",required:["validators","elect_at","elect_close","min_stake","total_stake"],properties:{elect_at:{type:"integer",format:"int64"},elect_close:{type:"integer",format:"int64"},min_stake:{type:"integer",format:"int64","x-js-format":"bigint"},total_stake:{type:"integer",format:"int64","x-js-format":"bigint"},validators:{type:"array",items:{$ref:"#/components/schemas/Validator"}}
2}},"#/components/schemas/AccountStorageInfo":{type:"object",required:["used_cells","used_bits","used_public_cells","last_paid","due_payment"],properties:{used_cells:{type:"integer",format:"int64"},used_bits:{type:"integer",format:"int64"},used_public_cells:{type:"integer",format:"int64"},last_paid:{type:"integer",format:"int64"},due_payment:{type:"integer",format:"int64","x-js-format":"bigint"}}},"#/components/schemas/BlockchainRawAccount":{type:"object",required:["address","balance","status","last_transaction_lt","storage"],properties:{address:{type:"string",format:"address"},balance:{type:"integer",format:"int64","x-js-format":"bigint"},extra_balance:{type:"object",additionalProperties:{type:"string"}},code:{type:"string",format:"cell"},data:{type:"string",format:"cell"},last_transaction_lt:{type:"integer",format:"int64","x-js-format":"bigint"},last_transaction_hash:{type:"string"},frozen_hash:{type:"string"},status:{$ref:"#/components/schemas/AccountStatus"},storage:{$ref:"#/components/schemas/AccountStorageInfo"},libraries:{type:"array",items:{type:"object",required:["public","root"],properties:{public:{type:"boolean"},root:{type:"string",format:"cell"}}}}}},"#/components/schemas/Account":{type:"object",required:["address","balance","status","last_activity","get_methods","is_wallet"],properties:{address:{type:"string",format:"address"},balance:{type:"integer",format:"int64","x-js-format":"bigint"},extra_balance:{type:"array",items:{$ref:"#/components/schemas/ExtraCurrency"}},currencies_balance:{type:"object",additionalProperties:!0},last_activity:{type:"integer",format:"int64"},status:{$ref:"#/components/schemas/AccountStatus"},interfaces:{type:"array",items:{type:"string"}},name:{type:"string"},is_scam:{type:"boolean"},icon:{type:"string"},memo_required:{type:"boolean"},get_methods:{type:"array",items:{type:"string"}},is_suspended:{type:"boolean"},is_wallet:{type:"boolean"}}},"#/components/schemas/Accounts":{type:"object",required:["accounts"],properties:{accounts:{type:"array",items:{$ref:"#/components/schemas/Account"}}}},"#/components/schemas/GaslessConfig":{type:"object",required:["gas_jettons","relay_address"],properties:{relay_address:{type:"string",format:"address"},gas_jettons:{type:"array",items:{type:"object",required:["master_id"],properties:{master_id:{type:"string",format:"address"}}}}}},"#/components/schemas/SignRawMessage":{type:"object",required:["address","amount"],properties:{address:{type:"string",format:"address"},amount:{type:"string"},payload:{type:"string",format:"cell"},stateInit:{type:"string",format:"cell"}}},"#/components/schemas/SignRawParams":{type:"object",required:["messages","relay_address","commission","from","valid_until"],properties:{relay_address:{type:"string",format:"address"},commission:{type:"string","x-js-format":"bigint"},from:{type:"string",format:"address"},valid_until:{type:"integer",format:"int64"},messages:{type:"array",items:{$ref:"#/components/schemas/SignRawMessage"}}}},"#/components/schemas/MethodExecutionResult":{type:"object",required:["success","exit_code","stack"],properties:{success:{type:"boolean"},exit_code:{type:"integer"},stack:{type:"array",items:{$ref:"#/components/schemas/TvmStackRecord"}},decoded:{}}},"#/components/schemas/TvmStackRecord":{type:"object",format:"tuple-item",required:["type"],properties:{type:{type:"string",enum:["cell","num","nan","null","tuple"]},cell:{type:"string",format:"cell"},slice:{type:"string",format:"cell"},num:{type:"string"},tuple:{type:"array",items:{$ref:"#/components/schemas/TvmStackRecord"}}}},"#/components/schemas/RawBlockchainConfig":{type:"object",required:["config"],properties:{config:{type:"object",additionalProperties:!0}}},"#/components/schemas/BlockchainConfig":{type:"object",required:["raw","0","1","2","4","44"],properties:{0:{type:"string",format:"address"},1:{type:"string",format:"address"},2:{type:"string",format:"address"},3:{type:"string",format:"address"},4:{type:"string",format:"address"},5:{type:"object",required:["fee_burn_nom","fee_burn_denom"],properties:{blackhole_addr:{type:"string",format:"address"},fee_burn_nom:{type:"integer",format:"int64"},fee_burn_denom:{type:"integer",format:"int64"}}},6:{type:"object",required:["mint_new_price","mint_add_price"],properties:{mint_new_price:{type:"integer",format:"int64"},mint_add_price:{type:"integer",format:"int64"}}},7:{type:"object",required:["currencies"],properties:{currencies:{type:"array",items:{type:"object",required:["currency_id","amount"],properties:{currency_id:{type:"integer",format:"int64"},amount:{type:"string"}}}}}},8:{type:"object",required:["version","capabilities"],properties:{version:{type:"integer",format:"int64"},capabilities:{type:"integer",format:"int64"}}},9:{type:"object",required:["mandatory_params"],properties:{mandatory_params:{type:"array",items:{type:"integer",format:"int32"}}}},10:{type:"object",required:["critical_params"],properties:{critical_params:{type:"array",items:{type:"integer",format:"int32"}}}},11:{type:"object",required:["normal_params","critical_params"],properties:{normal_params:{$ref:"#/components/schemas/ConfigProposalSetup"},critical_params:{$ref:"#/components/schemas/ConfigProposalSetup"}}},12:{type:"object",required:["workchains"],properties:{workchains:{type:"array",items:{$ref:"#/components/schemas/WorkchainDescr"}}}},13:{type:"object",required:["deposit","bit_price","cell_price"],properties:{deposit:{type:"integer",format:"int64"},bit_price:{type:"integer",format:"int64"},cell_price:{type:"integer",format:"int64"}}},14:{type:"object",required:["masterchain_block_fee","basechain_block_fee"],properties:{masterchain_block_fee:{type:"integer",format:"int64"},basechain_block_fee:{type:"integer",format:"int64"}}},15:{type:"object",required:["validators_elected_for","elections_start_before","elections_end_before","stake_held_for"],properties:{validators_elected_for:{type:"integer",format:"int64"},elections_start_before:{type:"integer",format:"int64"},elections_end_before:{type:"integer",format:"int64"},stake_held_for:{type:"integer",format:"int64"}}},16:{type:"object",required:["max_validators","max_main_validators","min_validators"],properties:{max_validators:{type:"integer"},max_main_validators:{type:"integer"},min_validators:{type:"integer"}}},17:{type:"object",required:["min_stake","max_stake","min_total_stake","max_stake_factor"],properties:{min_stake:{type:"string"},max_stake:{type:"string"},min_total_stake:{type:"string"},max_stake_factor:{type:"integer",format:"int64"}}},18:{type:"object",required:["storage_prices"],properties:{storage_prices:{type:"array",items:{type:"object",required:["utime_since","bit_price_ps","cell_price_ps","mc_bit_price_ps","mc_cell_price_ps"],properties:{utime_since:{type:"integer",format:"int64"},bit_price_ps:{type:"integer",format:"int64"},cell_price_ps:{type:"integer",format:"int64"},mc_bit_price_ps:{type:"integer",format:"int64"},mc_cell_price_ps:{type:"integer",format:"int64"}}}}}},20:{type:"object",required:["gas_limits_prices"],properties:{gas_limits_prices:{$ref:"#/components/schemas/GasLimitPrice
2s"}}},21:{type:"object",required:["gas_limits_prices"],properties:{gas_limits_prices:{$ref:"#/components/schemas/GasLimitPrices"}}},22:{type:"object",required:["block_limits"],properties:{block_limits:{$ref:"#/components/schemas/BlockLimits"}}},23:{type:"object",required:["block_limits"],properties:{block_limits:{$ref:"#/components/schemas/BlockLimits"}}},24:{type:"object",required:["msg_forward_prices"],properties:{msg_forward_prices:{$ref:"#/components/schemas/MsgForwardPrices"}}},25:{type:"object",required:["msg_forward_prices"],properties:{msg_forward_prices:{$ref:"#/components/schemas/MsgForwardPrices"}}},28:{type:"object",required:["mc_catchain_lifetime","shard_catchain_lifetime","shard_validators_lifetime","shard_validators_num"],properties:{mc_catchain_lifetime:{type:"integer",format:"int64"},shard_catchain_lifetime:{type:"integer",format:"int64"},shard_validators_lifetime:{type:"integer",format:"int64"},shard_validators_num:{type:"integer",format:"int64"},flags:{type:"integer",format:"int"},shuffle_mc_validators:{type:"boolean"}}},29:{type:"object",required:["round_candidates","next_candidate_delay_ms","consensus_timeout_ms","fast_attempts","attempt_duration","catchain_max_deps","max_block_bytes","max_collated_bytes"],properties:{flags:{type:"integer",format:"int"},new_catchain_ids:{type:"boolean"},round_candidates:{type:"integer",format:"int64"},next_candidate_delay_ms:{type:"integer",format:"int64"},consensus_timeout_ms:{type:"integer",format:"int64"},fast_attempts:{type:"integer",format:"int64"},attempt_duration:{type:"integer",format:"int64"},catchain_max_deps:{type:"integer",format:"int64"},max_block_bytes:{type:"integer",format:"int64"},max_collated_bytes:{type:"integer",format:"int64"},proto_version:{type:"integer",format:"int64"},catchain_max_blocks_coeff:{type:"integer",format:"int64"}}},31:{type:"object",required:["fundamental_smc_addr"],properties:{fundamental_smc_addr:{type:"array",items:{type:"string",format:"address"}}}},32:{$ref:"#/components/schemas/ValidatorsSet"},33:{$ref:"#/components/schemas/ValidatorsSet"},34:{$ref:"#/components/schemas/ValidatorsSet"},35:{$ref:"#/components/schemas/ValidatorsSet"},36:{$ref:"#/components/schemas/ValidatorsSet"},37:{$ref:"#/components/schemas/ValidatorsSet"},40:{type:"object",required:["misbehaviour_punishment_config"],properties:{misbehaviour_punishment_config:{$ref:"#/components/schemas/MisbehaviourPunishmentConfig"}}},43:{type:"object",required:["size_limits_config"],properties:{size_limits_config:{$ref:"#/components/schemas/SizeLimitsConfig"}}},44:{type:"object",required:["accounts","suspended_until"],properties:{accounts:{type:"array",items:{type:"string",format:"address"}},suspended_until:{type:"integer"}}},45:{type:"object",required:["contracts"],properties:{contracts:{type:"array",items:{type:"object",required:["code_hash","gas_usage"],properties:{code_hash:{type:"string",format:"address"},gas_usage:{type:"integer",format:"int64"}}}}}},71:{type:"object",required:["oracle_bridge_params"],properties:{oracle_bridge_params:{$ref:"#/components/schemas/OracleBridgeParams"}}},72:{type:"object",required:["oracle_bridge_params"],properties:{oracle_bridge_params:{$ref:"#/components/schemas/OracleBridgeParams"}}},73:{type:"object",required:["oracle_bridge_params"],properties:{oracle_bridge_params:{$ref:"#/components/schemas/OracleBridgeParams"}}},79:{type:"object",required:["jetton_bridge_params"],properties:{jetton_bridge_params:{$ref:"#/components/schemas/JettonBridgeParams"}}},81:{type:"object",required:["jetton_bridge_params"],properties:{jetton_bridge_params:{$ref:"#/components/schemas/JettonBridgeParams"}}},82:{type:"object",required:["jetton_bridge_params"],properties:{jetton_bridge_params:{$ref:"#/components/schemas/JettonBridgeParams"}}},raw:{type:"string",format:"cell"}}},"#/components/schemas/DomainNames":{type:"object",required:["domains"],properties:{domains:{type:"array",items:{type:"string"}}}},"#/components/schemas/DomainBid":{type:"object",required:["success","value","txTime","bidder","txHash"],properties:{success:{type:"boolean",default:!1},value:{type:"integer",format:"int64"},txTime:{type:"integer",format:"int64"},txHash:{type:"string"}
2,bidder:{$ref:"#/components/schemas/AccountAddress"}}},"#/components/schemas/DomainBids":{type:"object",required:["data"],properties:{data:{type:"array",items:{$ref:"#/components/schemas/DomainBid"}}}},"#/components/schemas/JettonVerificationType":{type:"string",enum:["whitelist","blacklist","none"]},"#/components/schemas/JettonPreview":{type:"object",required:["address","name","symbol","decimals","verification","image","score"],properties:{address:{type:"string",format:"address"},name:{type:"string"},symbol:{type:"string"},decimals:{type:"integer"},image:{type:"string"},verification:{$ref:"#/components/schemas/JettonVerificationType"},custom_payload_api_uri:{type:"string"},score:{type:"integer",format:"int32"}}},"#/components/schemas/JettonBalance":{type:"object",required:["balance","wallet_address","jetton"],properties:{balance:{type:"string","x-js-format":"bigint"},price:{$ref:"#/components/schemas/TokenRates"},wallet_address:{$ref:"#/components/schemas/AccountAddress"},jetton:{$ref:"#/components/schemas/JettonPreview"},extensions:{type:"array",items:{type:"string"}},lock:{type:"object",required:["amount","till"],properties:{amount:{type:"string","x-js-format":"bigint"},till:{type:"integer",format:"int64"}}}}},"#/components/schemas/JettonsBalances":{type:"object",required:["balances"],properties:{balances:{type:"array",items:{$ref:"#/components/schemas/JettonBalance"}}}},"#/components/schemas/Price":{type:"object",required:["value","token_name"],properties:{value:{type:"string","x-js-format":"bigint"},token_name:{type:"string"}}},"#/components/schemas/ImagePreview":{type:"object",required:["resolution","url"],properties:{resolution:{type:"string"},url:{type:"string"}}},"#/components/schemas/NftApprovedBy":{type:"array",items:{type:"string",enum:["getgems","tonkeeper"]}},"#/components/schemas/TrustType":{type:"string",enum:["whitelist","graylist","blacklist","none"]},"#/components/schemas/Sale":{type:"object",required:["address","market","price"],properties:{address:{type:"string",format:"address"},market:{$ref:"#/components/schemas/AccountAddress"},owner:{$ref:"#/components/schemas/AccountAddress"},price:{$ref:"#/components/schemas/Price"}}},"#/components/schemas/NftItem":{type:"object",required:["address","index","verified","metadata","approved_by","trust"],properties:{address:{type:"string",format:"address"},index:{type:"integer",format:"int64"},owner:{$ref:"#/components/schemas/AccountAddress"},collection:{type:"object",required:["address","name","description"],properties:{address:{type:"string",format:"address"},name:{type:"string"},description:{type:"string"}}},verified:{type:"boolean"},metadata:{type:"object",additionalProperties:!0},sale:{$ref:"#/components/schemas/Sale"},previews:{type:"array",items:{$ref:"#/components/schemas/ImagePreview"}},dns:{type:"string"},approved_by:{deprecated:!0,description:"please use trust field",$ref:"#/components/schemas/NftApprovedBy"},include_cnft:{type:"boolean"},trust:{$ref:"#/components/schemas/TrustType"}}},"#/components/schemas/NftItems":{type:"object",required:["nft_items"],properties:{nft_items:{type:"array",items:{$ref:"#/components/schemas/NftItem"}}}},"#/components/schemas/Multisigs":{type:"object",required:["multisigs"],properties:{multisigs:{type:"array",items:{$ref:"#/components/schemas/Multisig"}}}},"#/components/schemas/Multisig":{type:"object",required:["address","seqno","threshold","signers","proposers","orders"],properties:{address:{type:"string",format:"address"},seqno:{type:"integer",format:"int64"},threshold:{type:"integer",format:"int32"},signers:{type:"array",items:{type:"string",format:"address"}},proposers:{type:"array",items:{type:"string",format:"address"}},orders:{type:"array",items:{$ref:"#/components/schemas/MultisigOrder"}}}},"#/components/schemas/MultisigOrder":{type:"object",required:["address","order_seqno","threshold","sent_for_execution","signers","approvals_num","expiration_date","risk","creation_date","signed_by"],properties:{address:{type:"string",format:"address"},order_seqno:{type:"integer",format:"int64"},threshold:{type:"integer",format:"int32"},sent_for_execution:{type:"boolean"},signers:{type:"array",items:{type:"string",format:"address"}},approvals_num:{type:"integer",format:"int32"},expiration_date:{type:"integer",format:"int64"},risk:{$ref:"#/components/schemas/Risk"},creation_date:{type:"integer",format:"int64"},signed_by:{type:"array",items:{type:"string",format:"address"}}}},"#/components/schemas/Refund":{type:"object",required:["type","origin"],properties:{type:{type:"string",enum:["DNS.ton","DNS.tg","GetGems"]},origin:{type:"string"}}},"#/components/schemas/ValueFlow":{type:"object",required:["account","ton","fees"],properties:{account:{$ref:"#/components/schemas/AccountAddress"},ton:{type:"integer",format:"int64","x-js-format":"bigint"},fees:{type:"integer",format:"int64","x-js-format":"bigint"},jettons:{type:"array",items:{type:"object",required:["account","qty","quantity","jetton"],properties:{account:{$ref:"#/components/schemas/AccountAddress"},jetton:{$ref:"#/components/schemas/JettonPreview"},qty:{type:"string","x-js-format":"bigint"},quantity:{type:"integer",deprecated:!0,format:"int64","x-js-format":"bigint"}}}}}},"#/components/schemas/Action":{type:"object",required:["type","status","simple_preview","base_transactions"],properties:{type:{type:"string",enum:["TonTransfer","ExtraCurrencyTransfer","JettonTransfer","JettonBurn","JettonMint","NftItemTransfer","ContractDeploy","Subscribe","UnSubscribe","AuctionBid","NftPurchase","DepositStake","WithdrawStake","WithdrawStakeRequest","JettonSwap","SmartContractExec","ElectionsRecoverStake","ElectionsDepositStake","DomainRenew","InscriptionTransfer","InscriptionMint","Unknown"]},status:{type:"string",enum:["ok","failed"]},TonTransfer:{$ref:"#/components/schemas/TonTransferAction"},ExtraCurrencyTransfer:{$ref:"#/components/schemas/ExtraCurrencyTransferAction"},ContractDeploy:{$ref:"#/components/schemas/ContractDeployAction"},JettonTransfer:{$ref:"#/components/schemas/JettonTransferAction"},JettonBurn:{$ref:"#/components/schemas/JettonBurnAction"},JettonMint:{$ref:"#/components/schemas/JettonMintAction"},NftItemTransfer:{$ref:"#/components/schemas/NftItemTransferAction"}
2,Subscribe:{$ref:"#/components/schemas/SubscriptionAction"},UnSubscribe:{$ref:"#/components/schemas/UnSubscriptionAction"},AuctionBid:{$ref:"#/components/schemas/AuctionBidAction"},NftPurchase:{$ref:"#/components/schemas/NftPurchaseAction"},DepositStake:{$ref:"#/components/schemas/DepositStakeAction"},WithdrawStake:{$ref:"#/components/schemas/WithdrawStakeAction"},WithdrawStakeRequest:{$ref:"#/components/schemas/WithdrawStakeRequestAction"},ElectionsDepositStake:{$ref:"#/components/schemas/ElectionsDepositStakeAction"},ElectionsRecoverStake:{$ref:"#/components/schemas/ElectionsRecoverStakeAction"},JettonSwap:{$ref:"#/components/schemas/JettonSwapAction"},SmartContractExec:{$ref:"#/components/schemas/SmartContractAction"},DomainRenew:{$ref:"#/components/schemas/DomainRenewAction"},InscriptionTransfer:{$ref:"#/components/schemas/InscriptionTransferAction"},InscriptionMint:{$ref:"#/components/schemas/InscriptionMintAction"},simple_preview:{$ref:"#/components/schemas/ActionSimplePreview"},base_transactions:{type:"array",items:{type:"string"}}}},"#/components/schemas/TonTransferAction":{type:"object",required:["sender","recipient","amount"],properties:{sender:{$ref:"#/components/schemas/AccountAddress"},recipient:{$ref:"#/components/schemas/AccountAddress"},amount:{type:"integer",format:"int64","x-js-format":"bigint"},comment:{type:"string"},encrypted_comment:{$ref:"#/components/schemas/EncryptedComment"},refund:{$ref:"#/components/schemas/Refund"}}},"#/components/schemas/ExtraCurrencies":{type:"object",required:["extra_currencies"],properties:{extra_currencies:{type:"array",items:{$ref:"#/components/schemas/EcPreview"}}}},"#/components/schemas/EcPreview":{type:"object",required:["id","symbol","decimals","image"],properties:{id:{type:"integer",format:"int32"},symbol:{type:"string"},decimals:{type:"integer"},image:{type:"string"}}},"#/components/schemas/ExtraCurrencyTransferAction":{type:"object",required:["sender","recipient","amount","currency"],properties:{sender:{$ref:"#/components/schemas/AccountAddress"},recipient:{$ref:"#/components/schemas/AccountAddress"},amount:{type:"string","x-js-format":"bigint"},comment:{type:"string"},encrypted_comment:{$ref:"#/components/schemas/EncryptedComment"},currency:{$ref:"#/components/schemas/EcPreview"}}},"#/components/schemas/SmartContractAction":{type:"object",required:["executor","contract","ton_attached","operation"],properties:{executor:{$ref:"#/components/schemas/AccountAddress"},contract:{$ref:"#/components/schemas/AccountAddress"},ton_attached:{type:"integer",format:"int64","x-js-format":"bigint"},operation:{type:"string"},payload:{type:"string"},refund:{$ref:"#/components/schemas/Refund"}}},"#/components/schemas/DomainRenewAction":{type:"object",required:["domain","contract_address","renewer"],properties:{domain:{type:"string"},contract_address:{type:"string",format:"address"},renewer:{$ref:"#/components/schemas/AccountAddress"}}},"#/components/schemas/InscriptionMintAction":{type:"object",required:["type","ticker","recipient","amount","decimals"],properties:{recipient:{$ref:"#/components/schemas/AccountAddress"},amount:{type:"string","x-js-format":"bigint"},type:{type:"string",enum:["ton20","gram20"]},ticker:{type:"string"},decimals:{type:"integer"}}},"#/components/schemas/InscriptionTransferAction":{type:"object",required:["sender","recipient","amount","type","ticker","decimals"],properties:{sender:{$ref:"#/components/schemas/AccountAddress"},recipient:{$ref:"#/components/schemas/AccountAddress"},amount:{type:"string","x-js-format":"bigint"},comment:{type:"string"},type:{type:"string",enum:["ton20","gram20"]},ticker:{type:"string"},decimals:{type:"integer"}}},"#/components/schemas/NftItemTransferAction":{type:"object",required:["nft"],properties:{sender:{$ref:"#/components/schemas/AccountAddress"},recipient:{$ref:"#/components/schemas/AccountAddress"},nft:{type:"string"},comment:{type:"string"},encrypted_comment:{$ref:"#/components/schemas/EncryptedComment"},payload:{type:"string"},refund:{$ref:"#/components/schemas/Refund"}}},"#/components/schemas/JettonTransferAction":{type:"object",required:["amount","jetton","senders_wallet","recipients_wallet"],properties:{sender:{$ref:"#/components/schemas/AccountAddress"},recipient:{$ref:"#/components/schemas/AccountAddress"},senders_wallet:{type:"string",format:"address"},recipients_wallet:{type:"string",format:"address"},amount:{type:"string","x-js-format":"bigint"},comment:{type:"string"},encrypted_comment:{$ref:"#/components/schemas/EncryptedComment"},refund:{$ref:"#/components/schemas/Refund"},jetton:{$ref:"#/components/schemas/JettonPreview"}}},"#/components/schemas/JettonBurnAction":{type:"object",required:["amount","jetton","sender","senders_wallet"],properties:{sender:{$ref:"#/components/schemas/AccountAddress"},senders_wallet:{type:"string",format:"address"},amount:{type:"string","x-js-format":"bigint"},jetton:{$ref:"#/components/schemas/JettonPreview"}}},"#/components/schemas/JettonMintAction":{type:"object",required:["amount","jetton","recipient","recipients_wallet"],properties:{recipient:{$ref:"#/components/schemas/AccountAddress"},recipients_wallet:{type:"string",format:"address"},amount:{type:"string","x-js-format":"bigint"},jetton:{$ref:"#/components/schemas/JettonPreview"}}},"#/components/schemas/ContractDeployAction":{type:"object",required:["address","interfaces"],properties:{address:{type:"string",format:"address"},interfaces:{type:"array",items:{type:"string"}}}}
2,"#/components/schemas/SubscriptionAction":{type:"object",required:["subscriber","subscription","beneficiary","amount","initial"],properties:{subscriber:{$ref:"#/components/schemas/AccountAddress"},subscription:{type:"string",format:"address"},beneficiary:{$ref:"#/components/schemas/AccountAddress"},amount:{type:"integer",format:"int64","x-js-format":"bigint"},initial:{type:"boolean"}}},"#/components/schemas/UnSubscriptionAction":{type:"object",required:["subscriber","subscription","beneficiary"],properties:{subscriber:{$ref:"#/components/schemas/AccountAddress"},subscription:{type:"string",format:"address"},beneficiary:{$ref:"#/components/schemas/AccountAddress"}}},"#/components/schemas/AuctionBidAction":{type:"object",required:["amount","bidder","auction","auction_type"],properties:{auction_type:{type:"string",enum:["DNS.ton","DNS.tg","NUMBER.tg","getgems"]},amount:{$ref:"#/components/schemas/Price"},nft:{$ref:"#/components/schemas/NftItem"},bidder:{$ref:"#/components/schemas/AccountAddress"},auction:{$ref:"#/components/schemas/AccountAddress"}}},"#/components/schemas/DepositStakeAction":{type:"object",required:["amount","staker","pool","implementation"],properties:{amount:{type:"integer",format:"int64","x-js-format":"bigint"},staker:{$ref:"#/components/schemas/AccountAddress"},pool:{$ref:"#/components/schemas/AccountAddress"},implementation:{$ref:"#/components/schemas/PoolImplementationType"}}},"#/components/schemas/WithdrawStakeAction":{type:"object",required:["amount","staker","pool","implementation"],properties:{amount:{type:"integer",format:"int64","x-js-format":"bigint"},staker:{$ref:"#/components/schemas/AccountAddress"},pool:{$ref:"#/components/schemas/AccountAddress"},implementation:{$ref:"#/components/schemas/PoolImplementationType"}}},"#/components/schemas/WithdrawStakeRequestAction":{type:"object",required:["staker","pool","implementation"],properties:{amount:{type:"integer",format:"int64","x-js-format":"bigint"},staker:{$ref:"#/components/schemas/AccountAddress"},pool:{$ref:"#/components/schemas/AccountAddress"},implementation:{$ref:"#/components/schemas/PoolImplementationType"}}},"#/components/schemas/ElectionsRecoverStakeAction":{type:"object",required:["amount","staker"],properties:{amount:{type:"integer",format:"int64","x-js-format":"bigint"},staker:{$ref:"#/components/schemas/AccountAddress"}}},"#/components/schemas/ElectionsDepositStakeAction":{type:"object",required:["amount","staker"],properties:{amount:{type:"integer",format:"int64","x-js-format":"bigint"},staker:{$ref:"#/components/schemas/AccountAddress"}}},"#/components/schemas/JettonSwapAction":{type:"object",required:["dex","amount_in","amount_out","user_wallet","router"],properties:{dex:{type:"string",enum:["stonfi","dedust","megatonfi"]},amount_in:{type:"string","x-js-format":"bigint"},amount_out:{type:"string","x-js-format":"bigint"},ton_in:{type:"integer",format:"int64","x-js-format":"bigint"},ton_out:{type:"integer",format:"int64","x-js-format":"bigint"},user_wallet:{$ref:"#/components/schemas/AccountAddress"},router:{$ref:"#/components/schemas/AccountAddress"},jetton_master_in:{$ref:"#/components/schemas/JettonPreview"},jetton_master_out:{$ref:"#/components/schemas/JettonPreview"}}},"#/components/schemas/NftPurchaseAction":{type:"object",required:["amount","seller","buyer","auction_type","nft"],properties:{auction_type:{type:"string",enum:["DNS.ton","DNS.tg","NUMBER.tg","getgems"]},amount:{$ref:"#/components/schemas/Price"},nft:{$ref:"#/components/schemas/NftItem"},seller:{$ref:"#/components/schemas/AccountAddress"},buyer:{$ref:"#/components/schemas/AccountAddress"}}},"#/components/schemas/ActionSimplePreview":{type:"object",required:["name","description","accounts"],properties:{name:{type:"string"},description:{type:"string"},action_image:{type:"string"},value:{type:"string"},value_image:{type:"string"},accounts:{type:"array",items:{$ref:"#/components/schemas/AccountAddress"}}}},"#/components/schemas/AccountEvent":{type:"object",required:["event_id","timestamp","actions","account","is_scam","lt","in_progress","extra"],properties:{event_id:{type:"string"},account:{$ref:"#/components/schemas/AccountAddress"},timestamp:{type:"integer",format:"int64"},actions:{type:"array",items:{$ref:"#/components/schemas/Action"}},is_scam:{type:"boolean"},lt:{type:"integer",format:"int64","x-js-format":"bigint"},in_progress:{type:"boolean"},extra:{type:"integer",format:"int64"}}},"#/components/schemas/AccountEvents":{type:"object",required:["events","next_from"],properties:{events:{type:"array",items:{$ref:"#/components/schemas/AccountEvent"}},next_from:{type:"integer",format:"int64"}}},"#/components/schemas/TraceID":{type:"object",required:["id","utime"],properties:{id:{type:"string"},utime:{type:"integer",format:"int64"}}},"#/components/schemas/TraceIDs":{type:"object",required:["traces"],properties:{traces:{type:"array",items:{$ref:"#/components/schemas/TraceID"}}}},"#/components/schemas/ApyHistory":{type:"object",required:["apy","time"],properties:{apy:{type:"number"},time:{type:"integer"}}}
2,"#/components/schemas/Subscription":{type:"object",required:["address","wallet_address","beneficiary_address","amount","period","start_time","timeout","last_payment_time","last_request_time","subscription_id","failed_attempts"],properties:{address:{type:"string",format:"address"},wallet_address:{type:"string",format:"address"},beneficiary_address:{type:"string",format:"address"},amount:{type:"integer",format:"int64"},period:{type:"integer",format:"int64"},start_time:{type:"integer",format:"int64"},timeout:{type:"integer",format:"int64"},last_payment_time:{type:"integer",format:"int64"},last_request_time:{type:"integer",format:"int64"},subscription_id:{type:"integer",format:"int64"},failed_attempts:{type:"integer",format:"int32"}}},"#/components/schemas/Subscriptions":{type:"object",required:["subscriptions"],properties:{subscriptions:{type:"array",items:{$ref:"#/components/schemas/Subscription"}}}},"#/components/schemas/Auction":{type:"object",required:["domain","owner","price","bids","date"],properties:{domain:{type:"string"},owner:{type:"string",format:"address"},price:{type:"integer",format:"int64","x-js-format":"bigint"},bids:{type:"integer",format:"int64","x-js-format":"bigint"},date:{type:"integer",format:"int64"}}},"#/components/schemas/Auctions":{type:"object",required:["data","total"],properties:{data:{type:"array",items:{$ref:"#/components/schemas/Auction"}},total:{type:"integer",format:"int64"}}},"#/components/schemas/WalletDNS":{type:"object",required:["address","is_wallet","has_method_pubkey","has_method_seqno","names","account"],properties:{address:{type:"string",format:"address"},account:{$ref:"#/components/schemas/AccountAddress"},is_wallet:{type:"boolean"},has_method_pubkey:{type:"boolean"},has_method_seqno:{type:"boolean"},names:{type:"array",items:{type:"string"}}}},"#/components/schemas/DomainInfo":{type:"object",required:["name"],properties:{name:{type:"string"},expiring_at:{type:"integer",format:"int64"},item:{$ref:"#/components/schemas/NftItem"}}},"#/components/schemas/DnsRecord":{type:"object",required:["sites"],properties:{wallet:{$ref:"#/components/schemas/WalletDNS"},next_resolver:{type:"string",format:"address"},sites:{type:"array",items:{type:"string"}},storage:{type:"string"}}},"#/components/schemas/NftCollection":{type:"object",required:["address","next_item_index","raw_collection_content","approved_by"],properties:{address:{type:"string",format:"address"},next_item_index:{type:"integer",format:"int64"},owner:{$ref:"#/components/schemas/AccountAddress"},raw_collection_content:{type:"string",format:"cell"},metadata:{type:"object",additionalProperties:!0},previews:{type:"array",items:{$ref:"#/components/schemas/ImagePreview"}},approved_by:{$ref:"#/components/schemas/NftApprovedBy"}}},"#/components/schemas/NftCollections":{type:"object",required:["nft_collections"],properties:{nft_collections:{type:"array",items:{$ref:"#/components/schemas/NftCollection"}}}},"#/components/schemas/Trace":{type:"object",required:["transaction","interfaces"],properties:{transaction:{$ref:"#/components/schemas/Transaction"},interfaces:{type:"array",items:{type:"string"}},children:{type:"array",items:{$ref:"#/components/schemas/Trace"}},emulated:{type:"boolean"}}},"#/components/schemas/MessageConsequences":{type:"object",required:["trace","risk","event"],properties:{trace:{$ref:"#/components/schemas/Trace"},risk:{$ref:"#/components/schemas/Risk"},event:{$ref:"#/components/schemas/AccountEvent"}}},"#/components/schemas/Risk":{type:"object",required:["transfer_all_remaining_balance","ton","jettons","nfts"],properties:{transfer_all_remaining_balance:{type:"boolean"},ton:{type:"integer",format:"int64","x-js-format":"bigint"},jettons:{type:"array",items:{$ref:"#/components/schemas/JettonQuantity"}},nfts:{type:"array",items:{$ref:"#/components/schemas/NftItem"}}}},"#/components/schemas/JettonQuantity":{type:"object",required:["quantity","wallet_address","jetton"],properties:{quantity:{type:"string","x-js-format":"bigint"},wallet_address:{$ref:"#/components/schemas/AccountAddress"},jetton:{$ref:"#/components/schemas/JettonPreview"}}},"#/components/schemas/DecodedMessage":{type:"object",required:["destination","destination_wallet_version"],properties:{destination:{$ref:"#/components/schemas/AccountAddress"},destination_wallet_version:{type:"string"},ext_in_msg_decoded:{type:"object",properties:{wallet_v3:{type:"object",required:["subwallet_id","valid_until","seqno","op","raw_messages"],properties:{subwallet_id:{type:"integer",format:"int64"},valid_until:{type:"integer",format:"int64"},seqno:{type:"integer",format:"int64"},raw_messages:{type:"array",items:{$ref:"#/components/schemas/DecodedRawMessage"}}}},wallet_v4:{type:"object",required:["subwallet_id","valid_until","seqno","op","raw_messages"],properties:{subwallet_id:{type:"integer",format:"int64"},valid_until:{type:"integer",format:"int64"},seqno:{type:"integer",format:"int64"},op:{type:"integer",format:"int32"},raw_messages:{type:"array",items:{$ref:"#/components/schemas/DecodedRawMessage"}}}},wallet_v5:{type:"object",required:["raw_messages","valid_until"],properties:{valid_until:{type:"integer",format:"int64"},raw_messages:{type:"array",items:{$ref:"#/components/schemas/DecodedRawMessage"}}}},wallet_highload_v2:{type:"object",required:["subwallet_id","boun
2ded_query_id","raw_messages"],properties:{subwallet_id:{type:"integer",format:"int64"},bounded_query_id:{type:"string"},raw_messages:{type:"array",items:{$ref:"#/components/schemas/DecodedRawMessage"}}}}}}}},"#/components/schemas/DecodedRawMessage":{type:"object",required:["message","mode"],properties:{message:{type:"object",required:["boc"],properties:{boc:{type:"string",format:"cell"},decoded_op_name:{type:"string"},op_code:{type:"string","x-js-format":"bigint"},decoded_body:{}}},mode:{type:"integer"}}},"#/components/schemas/Event":{type:"object",required:["event_id","timestamp","actions","value_flow","is_scam","lt","in_progress"],properties:{event_id:{type:"string"},timestamp:{type:"integer",format:"int64"},actions:{type:"array",items:{$ref:"#/components/schemas/Action"}},value_flow:{type:"array",items:{$ref:"#/components/schemas/ValueFlow"}},is_scam:{type:"boolean"},lt:{type:"integer",format:"int64","x-js-format":"bigint"},in_progress:{type:"boolean"}}},"#/components/schemas/JettonMetadata":{type:"object",required:["address","name","symbol","decimals"],properties:{address:{type:"string",format:"address"},name:{type:"string"},symbol:{type:"string"},decimals:{type:"string"},image:{type:"string"},description:{type:"string"},social:{type:"array",items:{type:"string"}},websites:{type:"array",items:{type:"string"}},catalogs:{type:"array",items:{type:"string"}},custom_payload_api_uri:{type:"string"}}},"#/components/schemas/InscriptionBalances":{type:"object",required:["inscriptions"],properties:{inscriptions:{type:"array",items:{$ref:"#/components/schemas/InscriptionBalance"}}}},"#/components/schemas/InscriptionBalance":{type:"object",required:["type","ticker","balance","decimals"],properties:{type:{type:"string",enum:["ton20","gram20"]},ticker:{type:"string"},balance:{type:"string","x-js-format":"bigint"},decimals:{type:"integer"}}},"#/components/schemas/Jettons":{type:"object",required:["jettons"],properties:{jettons:{type:"array",items:{$ref:"#/components/schemas/JettonInfo"}}}},"#/components/schemas/JettonInfo":{type:"object",required:["mintable","total_supply","metadata","verification","holders_count","preview"],properties:{mintable:{type:"boolean"},total_supply:{type:"string","x-js-format":"bigint"},admin:{$ref:"#/components/schemas/AccountAddress"},metadata:{$ref:"#/components/schemas/JettonMetadata"},preview:{type:"string"},verification:{$ref:"#/components/schemas/JettonVerificationType"},holders_count:{type:"integer",format:"int32"}}},"#/components/schemas/JettonHolders":{type:"object",required:["addresses","total"],properties:{addresses:{type:"array",items:{type:"object",required:["address","owner","balance"],properties:{address:{type:"string",format:"address"},owner:{$ref:"#/components/schemas/AccountAddress"},balance:{type:"string","x-js-format":"bigint"}}}},total:{type:"integer",format:"int64"}}},"#/components/schemas/JettonTransferPayload":{type:"object",required:["payload"],properties:{custom_payload:{type:"string"},state_init:{type:"string"}}},"#/components/schemas/AccountStaking":{type:"object",required:["pools"],properties:{pools:{type:"array",items:{$ref:"#/components/schemas/AccountStakingInfo"}}}},"#/components/schemas/AccountStakingInfo":{type:"object",required:["pool","amount","pending_deposit","pending_withdraw","ready_withdraw"],properties:{pool:{type:"string"},amount:{type:"integer",format:"int64","x-js-format":"bigint"},pending_deposit:{type:"integer",format:"int64","x-js-format":"bigint"},pending_withdraw:{type:"integer",format:"int64","x-js-format":"bigint"},ready_withdraw:{type:"integer",format:"int64","x-js-format":"bigint"}}},"#/components/schemas/PoolInfo":{type:"object",required:["address","total_amount","implementation","apy","name","min_stake","cycle_start","cycle_end","verified","current_nominators","max_nominators","nominators_stake","validator_stake"],properties:{address:{type:"string",format:"address"},name:{type:"string"},total_amount:{type:"integer",format:"int64","x-js-format":"bigint"},implementation:{$ref:"#/components/schemas/PoolImplementationType"},apy:{type:"number"},min_stake:{type:"integer",format:"int64","x-js-format":"bigint"},cycle_start:{type:"integer",format:"int64"},cycle_end:{type:"integer",format:"int64"},verified:{type:"boolean"},current_nominators:{type:"integer"},max_nominators:{type:"integer"},liquid_jetton_master:{type:"string",format:"address"},nominators_stake:{type:"integer",format:"int64","x-js-format":"bigint"},validator_stake:{type:"integer",format:"int64","x-js-format":"bigint"},cycle_length:{type:"integer",format:"int64"}}},"#/components/schemas/PoolImplementation":{type:"object",required:["name","description","url","socials"],properties:{name:{type:"string"},description:{type:"string"},url:{type:"string"},socials:{type:"array",items:{type:"string"}}}},"#/components/schemas/StorageProvider":{type:"object",required:["address","accept_new_contracts","rate_per_mb_day","max_span","minimal_file_size","maximal_file_size"],properties:{address:{type:"string",format:"address"},accept_new_contracts:{type:"boolean"},rate_per_mb_day:{type:"integer",format:"int64","x-js-format":"bigint"},max_span:{type:"integer",format:"int64"},minimal_file_size:{type:"integer",format:"int64"},maximal_file_size:{type:"integer",format:"int64"}}},"#/components/schemas/FoundAccounts":{type:"object",required:["addresses"],properties:{addresses:{type:"array",items:{type:"object",required:["address","name","preview","trust"],properties:{address:{type:"string",format:"address"},name:{type:"string"},preview:{type:"string"},trust:{$ref:"#/components/schemas/TrustType"}}}}}},"#/components/schemas/DnsExpiring":{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"object",required:["expiring_at","name"],properties:{expiring_at:{type:"integer",format:"int64"},name:{type:"string"},dns_item:{$ref:"#/components/schemas/NftItem"}}}}}},"#/components/schemas/ChartPoints":{type:"array",prefixItems:[{type:"integer",format:"int64",description:"Unix timestamp of the data point"},{type:"number",description:"Decimal price of the token in the requested currency"}],additionalItems:!1,items:!1},"#/components/schemas/AccountInfoByStateInit":{type:"object",required:["public_key","address"],properties:{public_key:{type:"string"},address:{type:"string",format:"address"}}},"#/components/schemas/Seqno":{type:"object",required:["seqno"],properties:{seqno:{type:"integer",format:"int32"}}},"#/components/schemas/BlockRaw":{type:"object",required:["workchain","shard","seqno","root_hash","file_hash"],properties:{workchain:{type:"integer",format:"int32"},shard:{type:"string"},seqno:{type:"integer",format:"int32"},root_hash:{type:"string"},file_hash:{type:"string"}}},"#/components/schemas/InitStateRaw":{type:"object",required:["workchain","root_hash","file_hash"],properties:{workchain:{type:"integer",format:"int32"},root_hash:{type:"string"},file_hash:{type:"string"}}},"#/components/schemas/EncryptedComment":{type:"object",required:["encryption_type","cipher_text"],properties:{encryption_type:{type:"string"},cipher_text:{type:"string"}}},"#/components/schemas/BlockchainAccountInspect":{type:"object",required:["code","code_hash","methods","compiler"],properties:{code:{type:"string",format:"cell"},code_hash:{type:"string"}
2,methods:{type:"array",items:{$ref:"#/components/schemas/Method"}},compiler:{type:"string",enum:["func","fift","tact"]},source:{$ref:"#/components/schemas/Source"}}},"#/components/schemas/PoolImplementationType":{type:"string",enum:["whales","tf","liquidTF"]},"#/components/schemas/TokenRates":{type:"object",properties:{prices:{type:"object",additionalProperties:{type:"number"}},diff_24h:{type:"object",additionalProperties:{type:"string"}},diff_7d:{type:"object",additionalProperties:{type:"string"}},diff_30d:{type:"object",additionalProperties:{type:"string"}}}},"#/components/schemas/MarketTonRates":{type:"object",required:["market","usd_price","last_date_update"],properties:{market:{type:"string"},usd_price:{type:"number"},last_date_update:{type:"integer",format:"int64"}}},"#/components/schemas/ExtraCurrency":{type:"object",required:["amount","preview"],properties:{amount:{type:"string","x-js-format":"bigint"},preview:{$ref:"#/components/schemas/EcPreview"}}},"#/components/schemas/SourceFile":{type:"object",required:["name","content","is_entrypoint","is_std_lib","include_in_command"],properties:{name:{type:"string"},content:{type:"string"},is_entrypoint:{type:"boolean"},is_std_lib:{type:"boolean"},include_in_command:{type:"boolean"}}},"#/components/schemas/Source":{type:"object",required:["files"],properties:{files:{type:"array",items:{$ref:"#/components/schemas/SourceFile"}}}},"#/components/schemas/Method":{type:"object",required:["id","method"],properties:{id:{type:"integer",format:"int64"},method:{type:"string"}}}};function B(e){return _.Cell.fromHex(e)}async function j(e,t){return await e.then(e=>(function e(t,r){let n=r&&r.$ref,o=n?P[n]:r;if(Array.isArray(t)){let r=o&&o.items;return t.map(t=>e(t,r))}if(o){if("string"===o.type){if("address"===o.format)return _.Address.parse(t);if("cell"===o.format)return t&&B(t);if("bigint"===o["x-js-format"])return BigInt(t);if("cell-base64"===o.format)return t&&_.Cell.fromBase64(t)}if("integer"===o.type)return"bigint"===o["x-js-format"]?BigInt(t):Number(t);if("object"===o.type&&"tuple-item"===o.format)switch(t.type){case"tuple":let r=o.properties.tuple.items;return{type:"tuple",items:t.tuple.map(t=>e(t,r))};case"num":var i;return{type:"int",value:(i=t.num).startsWith("-")?-(1n*BigInt(i.slice(1))):BigInt(i)};case"cell":return{type:"cell",cell:B(t.cell)};case"slice":return{type:"slice",slice:B(t.slice)};case"null":return{type:"null"};case"nan":return{type:"nan"};default:throw Error(`Unknown tuple item type: ${t.type}`)}}return null!==t&&"object"==typeof t?Object.keys(t).reduce((r,n)=>{if(!o)return r[n]=e(t[n],void 0),r;let i=o.properties&&o.properties[n],a=!!i,s=a?n.replace(/(_\w)/g,e=>e[1]?.toUpperCase()??""):n,c=a?i:o.additionalProperties;return r[s]=e(t[n],c),r},{}):t})(e,t)).catch(async e=>{let t="Unknown error occurred";if(e instanceof Error)t=e.message||"Unknown fetch error";else if(e&&"object"==typeof e&&"string"==typeof e.error)try{let r=T(e.error);t="string"==typeof r?r:r?.error||`Wrong error response: ${e.error}`}catch(e){t=e instanceof Error?`Failed to parse error response: ${e.message}`:"Failed to parse error response: Unknown parsing error"}throw Error(t,{cause:e})})}function I(e,t){let r=t&&t.$ref,n=r?P[r]:t;if(Array.isArray(e)){let t=n&&n.items;return e.map(e=>I(e,t))}if(n&&"string"===n.type){if("address"===n.format)return e.toRawString();if("cell"===n.format)return e.toBoc().toString("hex");if("cell-base64"===n.format)return e.toBoc().toString("base64");if("bigint"===n["x-js-format"])return e.toString()}return null!==e&&"object"==typeof e?Object.keys(e).reduce((t,r)=>{let o=n?.properties&&n.properties[r];return t[r.replace(/([A-Z])/g,e=>`_${e.toLowerCase()}`)]=I(e[r],o),t},{}):e}r.TonApiClient=class{http;constructor(e={}){this.http=new O(e)}utilities={getOpenapiJson:(e={})=>j(this.http.request({path:"/v2/openapi.json",method:"GET",format:"json",...e}),{}),getOpenapiYml:(e={})=>j(this.http.request({path:"/v2/openapi.yml",method:"GET",...e})),status:(e={})=>j(this.http.request({path:"/v2/status",method:"GET",format:"json",...e}),{$ref:"#/components/schemas/ServiceStatus"}),addressParse:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/address/${r}/parse`,method:"GET",format:"json",...t}),{type:"object",required:["raw_form","bounceable","non_bounceable","given_type","test_only"],properties:{raw_form:{type:"string",format:"address"},bounceable:{required:["b64","b64url"],type:"object",properties:{b64:{type:"string"},b64url:{type:"string"}}},non_bounceable:{required:["b64","b64url"],type:"object",properties:{b64:{type:"string"},b64url:{type:"string"}}},given_type:{type:"string"},test_only:{type:"boolean"}}})}};blockchain={getReducedBlockchainBlocks:(e,t={})=>j(this.http.request({path:"/v2/blockchain/reduced/blocks",method:"GET",query:e,format:"json",...t}),{$ref:"#/components/schemas/ReducedBlocks"}),getBlockchainBlock:(e,t={})=>j(this.http.request({path:`/v2/blockchain/blocks/${e}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/BlockchainBlock"}),getBlockchainMasterchainShards:(e,t={})=>j(this.http.request({path:`/v2/blockchain/masterchain/${e}/shards`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/BlockchainBlockShards"}),getBlockchainMasterchainBlocks:(e,t={})=>j(this.http.request({path:`/v2/blockchain/masterchain/${e}/blocks`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/BlockchainBlocks"}),getBlockchainMasterchainTransactions:(e,t={})=>j(this.http.request({path:`/v2/blockchain/masterchain/${e}/transactions`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Transactions"}),getBlockchainConfigFromBlock:(e,t={})=>j(this.http.request({path:`/v2/blockchain/masterchain/${e}/config`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/BlockchainConfig"}),getRawBlockchainConfigFromBlock:(e,t={})=>j(this.http.request({path:`/v2/blockchain/masterchain/${e}/config/raw`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/RawBlockchainConfig"}),getBlockchainBlockTransactions:(e,t={})=>j(this.http.request({path:`/v2/blockchain/blocks/${e}/transactions`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Transactions"}),getBlockchainTransaction:(e,t={})=>j(this.http.request({path:`/v2/blockchain/transactions/${e}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Transaction"}),getBlockchainTransactionByMessageHash:(e,t={})=>j(this.http.request({path:`/v2/blockchain/messages/${e}/transaction`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Transaction"}),getBlockchainValidators:(e={})=>j(this.http.request({path:"/v2/blockchain/validators",method:"GET",format:"json",...e}),{$ref:"#/components/schemas/Validators"}),getBlockchainMasterchainHead:(e={})=>j(this.http.request({path:"/v2/blockchain/masterchain-head",method:"GET",format:"json",...e}),{$ref:"#/components/schemas/BlockchainBlock"}),getBlockchainRawAccount:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/blockchain/accounts/${r}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/BlockchainRawAccount"})},getBlockchainAccountTransactions:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/blockchain/accounts/${n}/transactions`,method:"GET",query:t,format:"json",...r}),{$ref:"#/components/schemas/Transactions"})},execGetMethodForBlockchainAccount:(e,t,r,n={})=>{let o=e.toRawString();return j(this.http.request({path:`/v2/blockchain/accounts/${o}/methods/${t}`,method:"GET",query:r,format:"json",...n}
2),{$ref:"#/components/schemas/MethodExecutionResult"})},sendBlockchainMessage:(e,t={})=>j(this.http.request({path:"/v2/blockchain/message",method:"POST",body:I(e,{type:"object",properties:{boc:{type:"string",format:"cell"},batch:{type:"array",maxItems:5,items:{type:"string",format:"cell"}},meta:{type:"object",additionalProperties:{type:"string"}}}}),...t})),getBlockchainConfig:(e={})=>j(this.http.request({path:"/v2/blockchain/config",method:"GET",format:"json",...e}),{$ref:"#/components/schemas/BlockchainConfig"}),getRawBlockchainConfig:(e={})=>j(this.http.request({path:"/v2/blockchain/config/raw",method:"GET",format:"json",...e}),{$ref:"#/components/schemas/RawBlockchainConfig"}),blockchainAccountInspect:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/blockchain/accounts/${r}/inspect`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/BlockchainAccountInspect"})},status:(e={})=>j(this.http.request({path:"/v2/status",method:"GET",format:"json",...e}),{$ref:"#/components/schemas/ServiceStatus"})};accounts={getAccounts:(e,t,r={})=>j(this.http.request({path:"/v2/accounts/_bulk",method:"POST",query:t,body:I(e,{type:"object",required:["accountIds"],properties:{accountIds:{type:"array",items:{type:"string",format:"address"}}}}),format:"json",...r}),{$ref:"#/components/schemas/Accounts"}),getAccount:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/accounts/${r}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Account"})},accountDnsBackResolve:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/accounts/${r}/dns/backresolve`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/DomainNames"})},getAccountJettonsBalances:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/accounts/${n}/jettons`,method:"GET",query:t,queryImplode:["currencies","supported_extensions"],format:"json",...r}),{$ref:"#/components/schemas/JettonsBalances"})},getAccountJettonBalance:(e,t,r,n={})=>{let o=e.toRawString(),i=t.toRawString();return j(this.http.request({path:`/v2/accounts/${o}/jettons/${i}`,method:"GET",query:r,queryImplode:["currencies","supported_extensions"],format:"json",...n}),{$ref:"#/components/schemas/JettonBalance"})},getAccountJettonsHistory:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/accounts/${n}/jettons/history`,method:"GET",query:t,format:"json",...r}),{$ref:"#/components/schemas/AccountEvents"})},getAccountJettonHistoryById:(e,t,r,n={})=>{let o=e.toRawString(),i=t.toRawString();return j(this.http.request({path:`/v2/accounts/${o}/jettons/${i}/history`,method:"GET",query:r,format:"json",...n}),{$ref:"#/components/schemas/AccountEvents"})},getAccountNftItems:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/accounts/${n}/nfts`,method:"GET",query:t&&{...t,collection:t.collection?.toRawString()},format:"json",...r}),{$ref:"#/components/schemas/NftItems"})},getAccountEvents:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/accounts/${n}/events`,method:"GET",query:t,queryImplode:["initiator"],format:"json",...r}),{$ref:"#/components/schemas/AccountEvents"})},getAccountEvent:(e,t,r,n={})=>{let o=e.toRawString();return j(this.http.request({path:`/v2/accounts/${o}/events/${t}`,method:"GET",query:r,format:"json",...n}),{$ref:"#/components/schemas/AccountEvent"})},getAccountTraces:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/accounts/${n}/traces`,method:"GET",query:t,format:"json",...r}),{$ref:"#/components/schemas/TraceIDs"})},getAccountSubscriptions:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/accounts/${r}/subscriptions`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Subscriptions"})},reindexAccount:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/accounts/${r}/reindex`,method:"POST",...t}))},searchAccounts:(e,t={})=>j(this.http.request({path:"/v2/accounts/search",method:"GET",query:e,format:"json",...t}),{$ref:"#/components/schemas/FoundAccounts"}),getAccountDnsExpiring:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/accounts/${n}/dns/expiring`,method:"GET",query:t,format:"json",...r}),{$ref:"#/components/schemas/DnsExpiring"})},getAccountPublicKey:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/accounts/${r}/publickey`,method:"GET",format:"json",...t}),{type:"object",required:["public_key"],properties:{public_key:{type:"string"}}})},getAccountMultisigs:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/accounts/${r}/multisigs`,method:"GET",format:"json",...t}
2),{$ref:"#/components/schemas/Multisigs"})},getAccountDiff:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/accounts/${n}/diff`,method:"GET",query:t,format:"json",...r}),{type:"object",required:["balance_change"],properties:{balance_change:{type:"integer",format:"int64"}}})},getAccountExtraCurrencyHistoryById:(e,t,r,n={})=>{let o=e.toRawString();return j(this.http.request({path:`/v2/accounts/${o}/extra-currency/${t}/history`,method:"GET",query:r,format:"json",...n}),{$ref:"#/components/schemas/AccountEvents"})},addressParse:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/address/${r}/parse`,method:"GET",format:"json",...t}),{type:"object",required:["raw_form","bounceable","non_bounceable","given_type","test_only"],properties:{raw_form:{type:"string",format:"address"},bounceable:{required:["b64","b64url"],type:"object",properties:{b64:{type:"string"},b64url:{type:"string"}}},non_bounceable:{required:["b64","b64url"],type:"object",properties:{b64:{type:"string"},b64url:{type:"string"}}},given_type:{type:"string"},test_only:{type:"boolean"}}})}};nft={getAccountNftHistory:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/accounts/${n}/nfts/history`,method:"GET",query:t,format:"json",...r}),{$ref:"#/components/schemas/AccountEvents"})},getNftCollections:(e,t={})=>j(this.http.request({path:"/v2/nfts/collections",method:"GET",query:e,format:"json",...t}),{$ref:"#/components/schemas/NftCollections"}),getNftCollection:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/nfts/collections/${r}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/NftCollection"})},getNftCollectionItemsByAddresses:(e,t={})=>j(this.http.request({path:"/v2/nfts/collections/_bulk",method:"POST",body:I(e,{type:"object",required:["accountIds"],properties:{accountIds:{type:"array",items:{type:"string",format:"address"}}}}),format:"json",...t}),{$ref:"#/components/schemas/NftCollections"}),getItemsFromCollection:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/nfts/collections/${n}/items`,method:"GET",query:t,format:"json",...r}),{$ref:"#/components/schemas/NftItems"})},getNftItemsByAddresses:(e,t={})=>j(this.http.request({path:"/v2/nfts/_bulk",method:"POST",body:I(e,{type:"object",required:["accountIds"],properties:{accountIds:{type:"array",items:{type:"string",format:"address"}}}}),format:"json",...t}),{$ref:"#/components/schemas/NftItems"}),getNftItemByAddress:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/nfts/${r}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/NftItem"})},getNftHistoryById:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/nfts/${n}/history`,method:"GET",query:t,format:"json",...r}),{$ref:"#/components/schemas/AccountEvents"})}};dns={getDnsInfo:(e,t={})=>j(this.http.request({path:`/v2/dns/${e}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/DomainInfo"}),dnsResolve:(e,t={})=>j(this.http.request({path:`/v2/dns/${e}/resolve`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/DnsRecord"}),getDomainBids:(e,t={})=>j(this.http.request({path:`/v2/dns/${e}/bids`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/DomainBids"}),getAllAuctions:(e,t={})=>j(this.http.request({path:"/v2/dns/auctions",method:"GET",query:e,format:"json",...t}),{$ref:"#/components/schemas/Auctions"})};traces={getTrace:(e,t={})=>j(this.http.request({path:`/v2/traces/${e}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Trace"})};events={getEvent:(e,t={})=>j(this.http.request({path:`/v2/events/${e}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Event"})};inscriptions={getAccountInscriptions:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/experimental/accounts/${n}/inscriptions`,method:"GET",query:t,format:"json",...r}),{$ref:"#/components/schemas/InscriptionBalances"})},getAccountInscriptionsHistory:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/experimental/accounts/${n}/inscriptions/history`,method:"GET",query:t,format:"json",...r}),{$ref:"#/components/schemas/AccountEvents"})}
2,getAccountInscriptionsHistoryByTicker:(e,t,r,n={})=>{let o=e.toRawString();return j(this.http.request({path:`/v2/experimental/accounts/${o}/inscriptions/${t}/history`,method:"GET",query:r,format:"json",...n}),{$ref:"#/components/schemas/AccountEvents"})},getInscriptionOpTemplate:(e,t={})=>j(this.http.request({path:"/v2/experimental/inscriptions/op-template",method:"GET",query:e,format:"json",...t}),{type:"object",required:["comment","destination"],properties:{comment:{type:"string"},destination:{type:"string"}}})};jettons={getJettons:(e,t={})=>j(this.http.request({path:"/v2/jettons",method:"GET",query:e,format:"json",...t}),{$ref:"#/components/schemas/Jettons"}),getJettonInfo:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/jettons/${r}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/JettonInfo"})},getJettonInfosByAddresses:(e,t={})=>j(this.http.request({path:"/v2/jettons/_bulk",method:"POST",body:I(e,{type:"object",required:["accountIds"],properties:{accountIds:{type:"array",items:{type:"string",format:"address"}}}}),format:"json",...t}),{$ref:"#/components/schemas/Jettons"}),getJettonHolders:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/jettons/${n}/holders`,method:"GET",query:t,format:"json",...r}),{$ref:"#/components/schemas/JettonHolders"})},getJettonTransferPayload:(e,t,r={})=>{let n=e.toRawString(),o=t.toRawString();return j(this.http.request({path:`/v2/jettons/${o}/transfer/${n}/payload`,method:"GET",format:"json",...r}),{$ref:"#/components/schemas/JettonTransferPayload"})},getJettonsEvents:(e,t={})=>j(this.http.request({path:`/v2/events/${e}/jettons`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Event"})};extraCurrency={getExtraCurrencyInfo:(e,t={})=>j(this.http.request({path:`/v2/extra-currency/${e}`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/EcPreview"})};staking={getAccountNominatorsPools:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/staking/nominator/${r}/pools`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/AccountStaking"})},getStakingPoolInfo:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/staking/pool/${r}`,method:"GET",format:"json",...t}),{type:"object",required:["implementation","pool"],properties:{implementation:{$ref:"#/components/schemas/PoolImplementation"},pool:{$ref:"#/components/schemas/PoolInfo"}}})},getStakingPoolHistory:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/staking/pool/${r}/history`,method:"GET",format:"json",...t}),{type:"object",required:["apy"],properties:{apy:{type:"array",items:{$ref:"#/components/schemas/ApyHistory"}}}})},getStakingPools:(e,t={})=>j(this.http.request({path:"/v2/staking/pools",method:"GET",query:e&&{...e,available_for:e.available_for?.toRawString()},format:"json",...t}),{type:"object",required:["pools","implementations"],properties:{pools:{type:"array",items:{$ref:"#/components/schemas/PoolInfo"}},implementations:{type:"object",additionalProperties:{$ref:"#/components/schemas/PoolImplementation"}}}})};storage={getStorageProviders:(e={})=>j(this.http.request({path:"/v2/storage/providers",method:"GET",format:"json",...e}),{type:"object",required:["providers"],properties:{providers:{type:"array",items:{$ref:"#/components/schemas/StorageProvider"}}}})};rates={getRates:(e,t={})=>j(this.http.request({path:"/v2/rates",method:"GET",query:e,queryImplode:["tokens","currencies"],format:"json",...t}),{type:"object",required:["rates"],properties:{rates:{type:"object",additionalProperties:{$ref:"#/components/schemas/TokenRates"}}}}),getChartRates:(e,t={})=>j(this.http.request({path:"/v2/rates/chart",method:"GET",query:e&&{...e,token:e.token?.toRawString()},format:"json",...t}),{type:"object",required:["points"],properties:{points:{type:"array",items:{$ref:"#/components/schemas/ChartPoints"}}}}),getMarketsRates:(e={})=>j(this.http.request({path:"/v2/rates/markets",method:"GET",format:"json",...e}),{type:"object",required:["markets"],properties:{markets:{type:"array",items:{$ref:"#/components/schemas/
2MarketTonRates"}}}})};connect={getTonConnectPayload:(e={})=>j(this.http.request({path:"/v2/tonconnect/payload",method:"GET",format:"json",...e}),{type:"object",required:["payload"],properties:{payload:{type:"string"}}}),getAccountInfoByStateInit:(e,t={})=>j(this.http.request({path:"/v2/tonconnect/stateinit",method:"POST",body:I(e,{type:"object",required:["stateInit"],properties:{stateInit:{type:"string",format:"cell-base64"}}}),format:"json",...t}),{$ref:"#/components/schemas/AccountInfoByStateInit"})};wallet={tonConnectProof:(e,t={})=>j(this.http.request({path:"/v2/wallet/auth/proof",method:"POST",body:I(e,{type:"object",required:["address","proof"],properties:{address:{type:"string",format:"address"},proof:{type:"object",required:["timestamp","domain","signature","payload"],properties:{timestamp:{type:"integer",format:"int64"},domain:{type:"object",required:["value"],properties:{lengthBytes:{type:"integer",format:"int32"},value:{type:"string"}}},signature:{type:"string"},payload:{type:"string"},stateInit:{type:"string",format:"cell-base64"}}}}}),format:"json",...t}),{type:"object",required:["token"],properties:{token:{type:"string"}}}),getAccountSeqno:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/wallet/${r}/seqno`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Seqno"})},getWalletsByPublicKey:(e,t={})=>j(this.http.request({path:`/v2/pubkeys/${e}/wallets`,method:"GET",format:"json",...t}),{$ref:"#/components/schemas/Accounts"})};gasless={gaslessConfig:(e={})=>j(this.http.request({path:"/v2/gasless/config",method:"GET",format:"json",...e}),{$ref:"#/components/schemas/GaslessConfig"}),gaslessEstimate:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/gasless/estimate/${n}`,method:"POST",body:I(t,{type:"object",required:["messages","walletAddress","walletPublicKey"],properties:{walletAddress:{type:"string",format:"address"},walletPublicKey:{type:"string"},messages:{type:"array",items:{type:"object",required:["boc"],properties:{boc:{type:"string",format:"cell"}}}}}}),format:"json",...r}),{$ref:"#/components/schemas/SignRawParams"})},gaslessSend:(e,t={})=>j(this.http.request({path:"/v2/gasless/send",method:"POST",body:I(e,{type:"object",required:["boc","walletPublicKey"],properties:{walletPublicKey:{type:"string"},boc:{type:"string",format:"cell"}}}),...t}))};liteServer={getRawMasterchainInfo:(e={})=>j(this.http.request({path:"/v2/liteserver/get_masterchain_info",method:"GET",format:"json",...e}),{type:"object",required:["last","state_root_hash","init"],properties:{last:{$ref:"#/components/schemas/BlockRaw"},state_root_hash:{type:"string"},init:{$ref:"#/components/schemas/InitStateRaw"}}}),getRawMasterchainInfoExt:(e,t={})=>j(this.http.request({path:"/v2/liteserver/get_masterchain_info_ext",method:"GET",query:e,format:"json",...t}),{type:"object",required:["mode","version","capabilities","last","last_utime","now","state_root_hash","init"],properties:{mode:{type:"integer",format:"int32"},version:{type:"integer",format:"int32"},capabilities:{type:"integer",format:"int64"},last:{$ref:"#/components/schemas/BlockRaw"},last_utime:{type:"integer",format:"int32"},now:{type:"integer",format:"int32"},state_root_hash:{type:"string"},init:{$ref:"#/components/schemas/InitStateRaw"}}}),getRawTime:(e={})=>j(this.http.request({path:"/v2/liteserver/get_time",method:"GET",format:"json",...e}),{type:"object",required:["time"],properties:{time:{type:"integer",format:"int32"}}}),getRawBlockchainBlock:(e,t={})=>j(this.http.request({path:`/v2/liteserver/get_block/${e}`,method:"GET",format:"json",...t}),{type:"object",required:["id","data"],properties:{id:{$ref:"#/components/schemas/BlockRaw"},data:{type:"string"}}}),getRawBlockchainBlockState:(e,t={})=>j(this.http.request({path:`/v2/liteserver/get_state/${e}`,method:"GET",format:"json",...t}),{type:"object",required:["id","root_hash","file_hash","data"],properties:{id:{$ref:"#/components/schemas/BlockRaw"},root_hash:{type:"string"},file_hash:{type:"string"},data:{type:"string"}}}),getRawBlockchainBlockHeader:(e,t,r={})=>j(this.http.request({path:`/v2/liteserver/get_block_header/${e}`,method:"GET",query:t,format:"json",...r}
2),{type:"object",required:["id","mode","header_proof"],properties:{id:{$ref:"#/components/schemas/BlockRaw"},mode:{type:"integer",format:"int32"},header_proof:{type:"string"}}}),sendRawMessage:(e,t={})=>j(this.http.request({path:"/v2/liteserver/send_message",method:"POST",body:I(e,{type:"object",required:["body"],properties:{body:{type:"string",format:"cell-base64"}}}),format:"json",...t}),{type:"object",required:["code"],properties:{code:{type:"integer",format:"int32"}}}),getRawAccountState:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/liteserver/get_account_state/${n}`,method:"GET",query:t,format:"json",...r}),{type:"object",required:["id","shardblk","shard_proof","proof","state"],properties:{id:{$ref:"#/components/schemas/BlockRaw"},shardblk:{$ref:"#/components/schemas/BlockRaw"},shard_proof:{type:"string"},proof:{type:"string"},state:{type:"string"}}})},getRawShardInfo:(e,t,r={})=>j(this.http.request({path:`/v2/liteserver/get_shard_info/${e}`,method:"GET",query:t,format:"json",...r}),{type:"object",required:["id","shardblk","shard_proof","shard_descr"],properties:{id:{$ref:"#/components/schemas/BlockRaw"},shardblk:{$ref:"#/components/schemas/BlockRaw"},shard_proof:{type:"string"},shard_descr:{type:"string"}}}),getAllRawShardsInfo:(e,t={})=>j(this.http.request({path:`/v2/liteserver/get_all_shards_info/${e}`,method:"GET",format:"json",...t}),{type:"object",required:["id","proof","data"],properties:{id:{$ref:"#/components/schemas/BlockRaw"},proof:{type:"string"},data:{type:"string"}}}),getRawTransactions:(e,t,r={})=>{let n=e.toRawString();return j(this.http.request({path:`/v2/liteserver/get_transactions/${n}`,method:"GET",query:t,format:"json",...r}),{type:"object",required:["ids","transactions"],properties:{ids:{type:"array",items:{$ref:"#/components/schemas/BlockRaw"}},transactions:{type:"string"}}})},getRawListBlockTransactions:(e,t,r={})=>j(this.http.request({path:`/v2/liteserver/list_block_transactions/${e}`,method:"GET",query:t&&{...t,account_id:t.account_id?.toRawString()},queryImplode:["account_id"],format:"json",...r}),{type:"object",required:["id","req_count","incomplete","ids","proof"],properties:{id:{$ref:"#/components/schemas/BlockRaw"},req_count:{type:"integer",format:"int32"},incomplete:{type:"boolean"},ids:{type:"array",items:{type:"object",required:["mode"],properties:{mode:{type:"integer",format:"int32"},account:{type:"string"},lt:{type:"integer",format:"bigint","x-js-format":"bigint"},hash:{type:"string"}}}},proof:{type:"string"}}}),getRawBlockProof:(e,t={})=>j(this.http.request({path:"/v2/liteserver/get_block_proof",method:"GET",query:e,format:"json",...t}),{type:"object",required:["complete","from","to","steps"],properties:{complete:{type:"boolean"},from:{$ref:"#/components/schemas/BlockRaw"},to:{$ref:"#/components/schemas/BlockRaw"},steps:{type:"array",items:{type:"object",required:["lite_server_block_link_back","lite_server_block_link_forward"],properties:{lite_server_block_link_back:{type:"object",required:["to_key_block","from","to","dest_proof","proof","state_proof"],properties:{to_key_block:{type:"boolean"},from:{$ref:"#/components/schemas/BlockRaw"},to:{$ref:"#/components/schemas/BlockRaw"},dest_proof:{type:"string"},proof:{type:"string"},state_proof:{type:"string"}}},lite_server_block_link_forward:{type:"object",required:["to_key_block","from","to","dest_proof","config_proof","signatures"],properties:{to_key_block:{type:"boolean"},from:{$ref:"#/components/schemas/BlockRaw"},to:{$ref:"#/components/schemas/BlockRaw"},dest_proof:{type:"string"},config_proof:{type:"string"},signatures:{type:"object",required:["validator_set_hash","catchain_seqno","signatures"],properties:{validator_set_hash:{type:"integer",format:"int64"},catchain_seqno:{type:"integer",format:"int32"},signatures:{type:"array",items:{type:"object",required:["node_id_short","signature"],properties:{node_id_short:{type:"string"},signature:{type:"string"}}}}}}}}}}}}}),getRawConfig:(e,t,r={})=>j(this.http.request({path:`/v2/liteserver/get_config_all/${e}`,method:"GET",query:t,format:"json",...r}),{type:"object",required:["mode","id","state_proof","config_proof"],properties:{mode:{type:"integer",format:"int32"},id:{$ref:"#/components/schemas/BlockRaw"},state_proof:{type:"string"},config_proof:{type:"string"}}}),getRawShardBlockProof:(e,t={})=>j(this.http.request({path:`/v2/liteserver/get_shard_block_proof/${e}`,method:"GET",format:"json",...t}),{type:"object",required:["masterchain_id","links"],properties:{masterchain_id:{$ref:"#/components/schemas/BlockRaw"},links:{type:"array",items:{type:"object",required:["id","proof"],properties:{id:{$ref:"#/components/schemas/BlockRaw"},proof:{type:"string"}}}}}}),getOutMsgQueueSizes:(e={})=>j(this.http.request({path:"/v2/liteserver/get_out_msg_queue_sizes",method:"GET",format:"json",...e}),{type:"object",required:["ext_msg_queue_size_limit","shards"],properties:{ext_msg_queue_size_limit:{type:"integer",format:"uint32"},shards:{type:"array",items:{type:"object",required:["id","size"],properties:{id:{$ref:"#/components/schemas/BlockRaw"},size:{type:"integer",format:"uint32"}}}}}})};multisig={getMultisigAccount:(e,t={})=>{let r=e.toRawString();return j(this.http.request({path:`/v2/multisig/${r}`,method:"GET",format:"json",...t}
2),{$ref:"#/components/schemas/Multisig"})}};emulation={decodeMessage:(e,t={})=>j(this.http.request({path:"/v2/message/decode",method:"POST",body:I(e,{type:"object",required:["boc"],properties:{boc:{type:"string",format:"cell"}}}),format:"json",...t}),{$ref:"#/components/schemas/DecodedMessage"}),emulateMessageToEvent:(e,t,r={})=>j(this.http.request({path:"/v2/events/emulate",method:"POST",query:t,body:I(e,{type:"object",required:["boc"],properties:{boc:{type:"string",format:"cell"}}}),format:"json",...r}),{$ref:"#/components/schemas/Event"}),emulateMessageToTrace:(e,t,r={})=>j(this.http.request({path:"/v2/traces/emulate",method:"POST",query:t,body:I(e,{type:"object",required:["boc"],properties:{boc:{type:"string",format:"cell"}}}),format:"json",...r}),{$ref:"#/components/schemas/Trace"}),emulateMessageToWallet:(e,t={})=>j(this.http.request({path:"/v2/wallet/emulate",method:"POST",body:I(e,{type:"object",required:["boc"],properties:{boc:{type:"string",format:"cell"},params:{type:"array",items:{type:"object",required:["address"],properties:{address:{type:"string",format:"address"},balance:{type:"integer",format:"bigint","x-js-format":"bigint"}}}}}}),format:"json",...t}),{$ref:"#/components/schemas/MessageConsequences"}),emulateMessageToAccountEvent:(e,t,r,n={})=>{let o=e.toRawString();return j(this.http.request({path:`/v2/accounts/${o}/events/emulate`,method:"POST",query:r,body:I(t,{type:"object",required:["boc"],properties:{boc:{type:"string",format:"cell"}}}),format:"json",...n}),{$ref:"#/components/schemas/AccountEvent"})}}}},608649,149830,491042,37755,757552,e=>{"use strict";var t,r=e.i(329470);class n extends Error{type;context;constructor(e,t,r){super(e),this.type=t||"UntypedError",this.context=r}}e.s(["TypedError",0,n],149830);var o=e.i(889739),i=e.i(987750),a=e.i(469855),s={GasLimitExceeded:"Exceeded the maximum amount of gas allowed to burn per contract",MethodEmptyName:"Method name is empty",WasmerCompileError:"Wasmer compilation error: {{msg}}",GuestPanic:"Smart contract panicked: {{panic_msg}}",Memory:"Error creating Wasm memory",GasExceeded:"Exceeded the prepaid gas",MethodUTF8Error:"Method name is not valid UTF8 string",BadUTF16:"String encoding is bad UTF-16 sequence",WasmTrap:"WebAssembly trap: {{msg}}",GasInstrumentation:"Gas instrumentation failed or contract has denied instructions.",InvalidPromiseIndex:"{{promise_idx}} does not correspond to existing promises",InvalidPromiseResultIndex:"Accessed invalid promise result index: {{result_idx}}",Deserialization:"Error happened while deserializing the module",MethodNotFound:"Contract method is not found",InvalidRegisterId:"Accessed invalid register id: {{register_id}}",InvalidReceiptIndex:"VM Logic returned an invalid receipt index: {{receipt_index}}",EmptyMethodName:"Method name is empty in contract call",CannotReturnJointPromise:"Returning joint promise is currently prohibited",StackHeightInstrumentation:"Stack instrumentation failed",CodeDoesNotExist:"Cannot find contract code for account {{account_id}}",MethodInvalidSignature:"Invalid method signature",IntegerOverflow:"Integer overflow happened during contract execution",MemoryAccessViolation:"MemoryAccessViolation",InvalidIteratorIndex:"Iterator index {{iterator_index}} does not exist",IteratorWasInvalidated:"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie",InvalidAccountId:"VM Logic returned an invalid account id",Serialization:"Error happened while serializing the module",CannotAppendActionToJointPromise:"Actions can only be appended to non-joint promise.",InternalMemoryDeclared:"Internal memory declaration has been found in the module",Instantiate:"Error happened during instantiation",ProhibitedInView:"{{method_name}} is not allowed in view calls",InvalidMethodName:"VM Logic returned an invalid method name",BadUTF8:"String encoding is bad UTF-8 sequence",BalanceExceeded:"Exceeded the account balance",LinkError:"Wasm contract link error: {{msg}}",InvalidPublicKey:"VM Logic provided an invalid public key",ActorNoPermission:"Actor {{actor_id}} doesn't have permission to account {{account_id}} to complete the action",LackBalanceForState:"The account {{account_id}} wouldn't have enough balance to cover storage, required to have {{amount}} yoctoNEAR more",ReceiverMismatch:"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.",CostOverflow:"Transaction gas or balance cost is too high",InvalidSignature:"Transaction is not signed with the given public key",AccessKeyNotFound:'Signer "{{account_id}}" doesn\'t have access key with the given public_key {{public_key}}',NotEnoughBalance:"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}",NotEnoughAllowance:"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}",Expired:"Transaction has expired",DeleteAccountStaking:"Account {{account_id}} is staking and can not be deleted",SignerDoesNotExist:"Signer {{signer_id}} does not exist",TriesToStake:"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}",AddKeyAlreadyExists:"The public key {{public_key}} is already used for an existing access key",InvalidSigner:"Invalid signer account ID {{signer_id}} according to requirements",CreateAccountNotAllowed:"The new account_id {{account_id}} can't be created by {{predecessor_id}}",RequiresFullAccess:"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key",TriesToUnstake:"Account {{account_id}} is not yet staked, but tried to unstake",InvalidNonce:"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}",AccountAlreadyExists:"Can't create a new account {{account_id}}, because it already exists",InvalidChain:"Transaction parent block hash doesn't belong to the current chain",AccountDoesNotExist:"Can't complete the action because account {{account_id}} doesn't exist",AccessKeyDoesNotExist:"Can't complete the action because access key {{public_key}}
2 doesn't exist",MethodNameMismatch:"Transaction method name {{method_name}} isn't allowed by the access key",DeleteAccountHasRent:"Account {{account_id}} can't be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent",DeleteAccountHasEnoughBalance:"Account {{account_id}} can't be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it's storage",InvalidReceiver:"Invalid receiver account ID {{receiver_id}} according to requirements",DeleteKeyDoesNotExist:"Account {{account_id}} tries to remove an access key that doesn't exist",Timeout:"Timeout exceeded",Closed:"Connection closed",ShardCongested:"Shard {{shard_id}} rejected the transaction due to congestion level {{congestion_level}}, try again later",ShardStuck:"Shard {{shard_id}} rejected the transaction because it missed {{missed_chunks}} chunks and needs to recover before accepting new transactions, try again later"};BigInt(24);var c=[];for(let e=0,t=5n;e<24;e++,t*=10n)c[e]=t;var u={AccessKeyNotFound:{name:"AccessKeyNotFound",subtypes:[],props:{account_id:"",public_key:""}},AccountAlreadyExists:{name:"AccountAlreadyExists",subtypes:[],props:{account_id:""}},AccountDoesNotExist:{name:"AccountDoesNotExist",subtypes:[],props:{account_id:""}},ActionError:{name:"ActionError",subtypes:["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],props:{index:""}},ActionsValidationError:{name:"ActionsValidationError",subtypes:["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],props:{}},ActorNoPermission:{name:"ActorNoPermission",subtypes:[],props:{account_id:"",actor_id:""}},AddKeyAlreadyExists:{name:"AddKeyAlreadyExists",subtypes:[],props:{account_id:"",public_key:""}},AddKeyMethodNameLengthExceeded:{name:"AddKeyMethodNameLengthExceeded",subtypes:[],props:{length:"",limit:""}},AddKeyMethodNamesNumberOfBytesExceeded:{name:"AddKeyMethodNamesNumberOfBytesExceeded",subtypes:[],props:{limit:"",total_number_of_bytes:""}},AltBn128InvalidInput:{name:"AltBn128InvalidInput",subtypes:[],props:{msg:""}},BadUTF16:{name:"BadUTF16",subtypes:[],props:{}},BadUTF8:{name:"BadUTF8",subtypes:[],props:{}},BalanceExceeded:{name:"BalanceExceeded",subtypes:[],props:{}},BalanceMismatchError:{name:"BalanceMismatchError",subtypes:[],props:{final_accounts_balance:"",final_postponed_receipts_balance:"",forwarded_buffered_receipts_balance:"",incoming_receipts_balance:"",incoming_validator_rewards:"",initial_accounts_balance:"",initial_postponed_receipts_balance:"",new_buffered_receipts_balance:"",new_delayed_receipts_balance:"",other_burnt_amount:"",outgoing_receipts_balance:"",processed_delayed_receipts_balance:"",slashed_burnt_amount:"",tx_burnt_amount:""}},CallIndirectOOB:{name:"CallIndirectOOB",subtypes:[],props:{}},CannotAppendActionToJointPromise:{name:"CannotAppendActionToJointPromise",subtypes:[],props:{}},CannotReturnJointPromise:{name:"CannotReturnJointPromise",subtypes:[],props:{}},CodeDoesNotExist:{name:"CodeDoesNotExist",subtypes:[],props:{account_id:""}},CompilationError:{name:"CompilationError",subtypes:["CodeDoesNotExist","PrepareError","WasmerCompileError"],props:{}},ContractSizeExceeded:{name:"ContractSizeExceeded",subtypes:[],props:{limit:"",size:""}},CostOverflow:{name:"CostOverflow",subtypes:[],props:{}},CreateAccountNotAllowed:{name:"CreateAccountNotAllowed",subtypes:[],props:{account_id:"",predecessor_id:""}},CreateAccountOnlyByRegistrar:{name:"CreateAccountOnlyByRegistrar",subtypes:[],props:{account_id:"",predecessor_id:"",registrar_account_id:""}},DelegateActionExpired:{name:"DelegateActionExpired",subtypes:[],props:{}},DelegateActionInvalidNonce:{name:"DelegateActionInvalidNonce",subtypes:[],props:{ak_nonce:"",delegate_nonce:""}},DelegateActionInvalidSignature:{name:"DelegateActionInvalidSignature",subtypes:[],props:{}},DelegateActionMustBeOnlyOne:{name:"DelegateActionMustBeOnlyOne",subtypes:[],props:{}},DelegateActionNonceTooLarge:{name:"DelegateActionNonceTooLarge",subtypes:[],props:{delegate_nonce:"",upper_bound:""}},DelegateActionSenderDoesNotMatchTxReceiver:{name:"DelegateActionSenderDoesNotMatchTxReceiver",subtypes:[],props:{receiver_id:"",sender_id:""}},DeleteAccountStaking:{name:"DeleteAccountStaking",subtypes:[],props:{account_id:""}},DeleteAccountWithLargeState:{name:"DeleteAccountWithLargeState",subtypes:[],props:{account_id:""}},DeleteActionMustBeFinal:{name:"DeleteActionMustBeFinal",subtypes:[],props:{}},DeleteKeyDoesNotExist:{name:"DeleteKeyDoesNotExist",subtypes:[],props:{account_id:"",public_key:""}},DepositWithFunctionCall:{name:"DepositWithFunctionCall",subtypes:[],props:{}},Deprecated:{name:"Deprecated",subtypes:[],props:{method_name:""}},Deserialization:{name:"Deserialization",subtypes:[],props:{}}
2,ECRecoverError:{name:"ECRecoverError",subtypes:[],props:{msg:""}},Ed25519VerifyInvalidInput:{name:"Ed25519VerifyInvalidInput",subtypes:[],props:{msg:""}},EmptyMethodName:{name:"EmptyMethodName",subtypes:[],props:{}},Expired:{name:"Expired",subtypes:[],props:{}},FunctionCallArgumentsLengthExceeded:{name:"FunctionCallArgumentsLengthExceeded",subtypes:[],props:{length:"",limit:""}},FunctionCallMethodNameLengthExceeded:{name:"FunctionCallMethodNameLengthExceeded",subtypes:[],props:{length:"",limit:""}},FunctionCallZeroAttachedGas:{name:"FunctionCallZeroAttachedGas",subtypes:[],props:{}},GasExceeded:{name:"GasExceeded",subtypes:[],props:{}},GasInstrumentation:{name:"GasInstrumentation",subtypes:[],props:{}},GasLimitExceeded:{name:"GasLimitExceeded",subtypes:[],props:{}},GenericTrap:{name:"GenericTrap",subtypes:[],props:{}},GuestPanic:{name:"GuestPanic",subtypes:[],props:{panic_msg:""}},HostError:{name:"HostError",subtypes:["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],props:{}},IllegalArithmetic:{name:"IllegalArithmetic",subtypes:[],props:{}},IncorrectCallIndirectSignature:{name:"IncorrectCallIndirectSignature",subtypes:[],props:{}},IndirectCallToNull:{name:"IndirectCallToNull",subtypes:[],props:{}},Instantiate:{name:"Instantiate",subtypes:[],props:{}},InsufficientStake:{name:"InsufficientStake",subtypes:[],props:{account_id:"",minimum_stake:"",stake:""}},IntegerOverflow:{name:"IntegerOverflow",subtypes:[],props:{}},InternalMemoryDeclared:{name:"InternalMemoryDeclared",subtypes:[],props:{}},InvalidAccessKeyError:{name:"InvalidAccessKeyError",subtypes:["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],props:{}},InvalidAccountId:{name:"InvalidAccountId",subtypes:[],props:{}},InvalidChain:{name:"InvalidChain",subtypes:[],props:{}},InvalidDataReceiverId:{name:"InvalidDataReceiverId",subtypes:[],props:{account_id:""}},InvalidIteratorIndex:{name:"InvalidIteratorIndex",subtypes:[],props:{iterator_index:""}},InvalidMethodName:{name:"InvalidMethodName",subtypes:[],props:{}},InvalidNonce:{name:"InvalidNonce",subtypes:[],props:{ak_nonce:"",tx_nonce:""}},InvalidPredecessorId:{name:"InvalidPredecessorId",subtypes:[],props:{account_id:""}},InvalidPromiseIndex:{name:"InvalidPromiseIndex",subtypes:[],props:{promise_idx:""}},InvalidPromiseResultIndex:{name:"InvalidPromiseResultIndex",subtypes:[],props:{result_idx:""}},InvalidPublicKey:{name:"InvalidPublicKey",subtypes:[],props:{}},InvalidReceiptIndex:{name:"InvalidReceiptIndex",subtypes:[],props:{receipt_index:""}},InvalidReceiverId:{name:"InvalidReceiverId",subtypes:[],props:{account_id:""}},InvalidRegisterId:{name:"InvalidRegisterId",subtypes:[],props:{register_id:""}},InvalidSignature:{name:"InvalidSignature",subtypes:[],props:{}},InvalidSignerId:{name:"InvalidSignerId",subtypes:[],props:{account_id:""}},InvalidTxError:{name:"InvalidTxError",subtypes:["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded","StorageError","ShardCongested","ShardStuck"],props:{}},IteratorWasInvalidated:{name:"IteratorWasInvalidated",subtypes:[],props:{iterator_index:""}},KeyLengthExceeded:{name:"KeyLengthExceeded",subtypes:[],props:{length:"",limit:""}},LackBalanceForState:{name:"LackBalanceForState",subtypes:[],props:{account_id:"",amount:""}},Memory:{name:"Memory",subtypes:[],props:{}},MemoryAccessViolation:{name:"MemoryAccessViolation",subtypes:[],props:{}},MemoryOutOfBounds:{name:"MemoryOutOfBounds",subtypes:[],props:{}},MethodEmptyName:{name:"MethodEmptyName",subtypes:[],props:{}},MethodInvalidSignature:{name:"MethodInvalidSignature",subtypes:[],props:{}},MethodNameMismatch:{name:"MethodNameMismatch",subtypes:[],props:{method_name:""}},MethodNotFound:{name:"MethodNotFound",subtypes:[],props:{}},MethodResolveError:{name:"MethodResolveError",subtypes:["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],props:{}},MisalignedAtomicAccess:{name:"MisalignedAtomicAccess",subtypes:[],props:{}},NonceTooLarge:{name:"NonceTooLarge",subtypes:[],props:{tx_nonce:"",upper_bound:""}},NotEnoughAllowance:{name:"NotEnoughAllowance",subtypes:[],props:{account_id:"",allowance:"",cost:"",public_key:""}},NotEnoughBalance:{name:"NotEnoughBalance",subtypes:[],props:{balance:"",cost:"",signer_id:""}},NumberInputDataDependenciesExceeded:{name:"NumberInputDataDependenciesExceeded",subtypes:[],props:{limit:"",number_of_input_data_dependencies:""}},NumberOfLogsExceeded:{name:"NumberOfLogsExceeded",subtypes:[],props:{limit:""}},NumberPromisesExceeded:{name:"NumberPromisesExceeded",subtypes:[],props:{limit:"",number_of_promises:""}},OnlyImplicitAccountCreationAllowed:{name:"OnlyImplicitAccountCreationAllowed",subtypes:[],props:{account_id:""}},PrepareError:{name:"PrepareError",subtypes:["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],props:{}},ProhibitedInView:{name:"ProhibitedInView",subtypes:[],props:{method_name:""}},ReceiptSizeExceeded:{name:"ReceiptSizeExceeded",subtypes:[],props:{limit:"",size:""}},ReceiptValidationError:{name:"ReceiptValidationError",subtypes:["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation","ReceiptSizeExceeded"],props:{}},ReceiverMismatch:{name:"ReceiverMismatch",subtypes:[],props:{ak_receiver:"",tx_re
2ceiver:""}},RequiresFullAccess:{name:"RequiresFullAccess",subtypes:[],props:{}},ReturnedValueLengthExceeded:{name:"ReturnedValueLengthExceeded",subtypes:[],props:{length:"",limit:""}},Serialization:{name:"Serialization",subtypes:[],props:{}},ShardCongested:{name:"ShardCongested",subtypes:[],props:{congestion_level:"",shard_id:""}},ShardStuck:{name:"ShardStuck",subtypes:[],props:{missed_chunks:"",shard_id:""}},SignerDoesNotExist:{name:"SignerDoesNotExist",subtypes:[],props:{signer_id:""}},StackHeightInstrumentation:{name:"StackHeightInstrumentation",subtypes:[],props:{}},StackOverflow:{name:"StackOverflow",subtypes:[],props:{}},TooManyFunctions:{name:"TooManyFunctions",subtypes:[],props:{}},TooManyLocals:{name:"TooManyLocals",subtypes:[],props:{}},TotalLogLengthExceeded:{name:"TotalLogLengthExceeded",subtypes:[],props:{length:"",limit:""}},TotalNumberOfActionsExceeded:{name:"TotalNumberOfActionsExceeded",subtypes:[],props:{limit:"",total_number_of_actions:""}},TotalPrepaidGasExceeded:{name:"TotalPrepaidGasExceeded",subtypes:[],props:{limit:"",total_prepaid_gas:""}},TransactionSizeExceeded:{name:"TransactionSizeExceeded",subtypes:[],props:{limit:"",size:""}},TriesToStake:{name:"TriesToStake",subtypes:[],props:{account_id:"",balance:"",locked:"",stake:""}},TriesToUnstake:{name:"TriesToUnstake",subtypes:[],props:{account_id:""}},TxExecutionError:{name:"TxExecutionError",subtypes:["ActionError","InvalidTxError"],props:{}},Unreachable:{name:"Unreachable",subtypes:[],props:{}},UnsuitableStakingKey:{name:"UnsuitableStakingKey",subtypes:[],props:{public_key:""}},UnsupportedProtocolFeature:{name:"UnsupportedProtocolFeature",subtypes:[],props:{protocol_feature:"",version:""}},ValueLengthExceeded:{name:"ValueLengthExceeded",subtypes:[],props:{length:"",limit:""}},WasmTrap:{name:"WasmTrap",subtypes:["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],props:{}},WasmerCompileError:{name:"WasmerCompileError",subtypes:[],props:{msg:""}},Closed:{name:"Closed",subtypes:[],props:{}},ServerError:{name:"ServerError",subtypes:["TxExecutionError","Timeout","Closed"],props:{}},Timeout:{name:"Timeout",subtypes:[],props:{}}},l={formatNear:()=>(e,t)=>(function(e,t=24){let r=BigInt(e);if(24!==t){let e=24-t-1;e>0&&(r+=c[e])}let n=(e=r.toString()).substring(0,e.length-24)||"0",o=e.substring(e.length-24).padStart(24,"0").substring(0,t);return`${(function(e){let t=/(-?\d+)(\d{3})/;for(;t.test(e);)e=e.replace(t,"$1,$2");return e})(n)}.${o}`.replace(/\.?0*$/,"")})(t(e))},f=class extends n{};function p(e,t){return"string"==typeof s[e]?o.default.render(s[e],{...t,...l}):JSON.stringify(t)}function d(e){return"[object Object]"===Object.prototype.toString.call(e)}function h(e,t){return e<t?-1:+(e>t)}new class{constructor(e){this.logLevels=e}isLevelEnabled=e=>this.logLevels.includes(e);print(e,t,...r){switch(e){case"error":case"fatal":return console.error(t,...r);case"warn":return console.warn(t,...r);case"log":return console.log(t,...r);case"debug":case"verbose":return console.debug(t,...r)}}verbose(e,...t){this.isLevelEnabled("verbose")&&this.print("verbose",e,...t)}debug(e,...t){this.isLevelEnabled("debug")&&this.print("debug",e,...t)}log(e,...t){this.isLevelEnabled("log")&&this.print("log",e,...t)}warn(e,...t){this.isLevelEnabled("warn")&&this.print("warn",e,...t)}error(e,...t){this.isLevelEnabled("error")&&this.print("error",e,...t)}fatal(e,...t){this.isLevelEnabled("fatal")&&this.print("fatal",e,...t)}}(["verbose","debug","log","warn","error","fatal"]),e.s(["ServerError",0,f,"baseDecode",0,function(e){return i.base58.decode(e)},"baseEncode",0,function(e){if("string"==typeof e){let t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));e=new Uint8Array(t)}return i.base58.encode(e)},"findSeatPrice",0,function(e,t,r,n){return n&&n<49?function(e,t){let r=e.map(e=>BigInt(e.stake)).sort(h),n=BigInt(t),o=r.reduce((e,t)=>e+t);if(o<n)throw Error("Stakes are below seats");let i=1n,a=o+1n;for(;i!==a-1n;){let e=(i+a)/2n,t=!1,o=0n;for(let a=0;a<r.length;++a)if((o+=r[a]/e)>=n){i=e,t=!0;break}t||(a=e)}return i}(e,t):(r||((0,a.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),r=[1,6250]),function(e,t,r){if(2!=r.length)throw Error("minimumStakeRatio should have 2 elements");let n=e.map(e=>BigInt(e.stake)).sort(h),o=n.reduce((e,t)=>
2e+t);return e.length<t?o*BigInt(r[0])/BigInt(r[1]):n[0]+1n}(e,t,r))},"formatError",0,p,"getErrorTypeFromErrorMessage",0,function(e,t){switch(!0){case/^account .*? does not exist while viewing$/.test(e):case/^Account .*? doesn't exist$/.test(e):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(e):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(e):case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(e):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(e):case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(e):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(e):return"InvalidNonce";default:return t}},"parseRpcError",0,function(e){let t={},r=function e(t,r,n,o){let i,a,s;for(let e in r){var c;if(c=t[e],"[object String]"===Object.prototype.toString.call(c))return t[e];if(d(t[e]))i=t[e],a=r[e],s=e;else{if(!(d(t.kind)&&d(t.kind[e])))continue;i=t.kind[e],a=r[e],s=e}}if(!i||!a)return n.kind=t,o;for(let e of Object.keys(a.props))n[e]=i[e];return e(i,r,n,s)}(e,u,t,""),n=new f(p(r,t),r);return Object.assign(n,t),n}],608649);class y{constructor(e){if(1!==Object.keys(e).length)throw Error("Enum can only take single value");Object.keys(e).map(t=>{this[t]=e[t]})}}class m{allowance;receiverId;methodNames;constructor({allowance:e,receiverId:t,methodNames:r}){this.allowance=e,this.receiverId=t,this.methodNames=r}}class g{}class b extends y{enum;functionCall;fullAccess;constructor(e){for(const[t,r]of(super(e),Object.entries(e||{})))this[t]=r,this.enum=t}}class v{nonce;permission;constructor({nonce:e,permission:t}){this.nonce=e,this.permission=t}}class w{}class S{code;constructor({code:e}){this.code=e}}class _{methodName;args;gas;deposit;constructor({methodName:e,args:t,gas:r,deposit:n}){this.methodName=e,this.args=t,this.gas=r,this.deposit=n}}class E{code;deployMode;constructor({code:e,deployMode:t}){this.code=e,this.deployMode=t}}class x{contractIdentifier;constructor({contractIdentifier:e}){this.contractIdentifier=e}}class A{deposit;constructor({deposit:e}){this.deposit=e}}class T{stake;publicKey;constructor({stake:e,publicKey:t}){this.stake=e,this.publicKey=t}}class k{publicKey;accessKey;constructor({publicKey:e,accessKey:t}){this.publicKey=e,this.accessKey=t}}class O{publicKey;constructor({publicKey:e}){this.publicKey=e}}class P{beneficiaryId;constructor({beneficiaryId:e}){this.beneficiaryId=e}}class B{delegateAction;signature;constructor({delegateAction:e,signature:t}){this.delegateAction=e,this.signature=t}}class j extends y{enum;createAccount;deployContract;functionCall;transfer;stake;addKey;deleteKey;deleteAccount;signedDelegate;deployGlobalContract;useGlobalContract;constructor(e){for(const[t,r]of(super(e),Object.entries(e||{})))this[t]=r,this.enum=t}}function I(e){return void 0!==e.byteLength&&e.byteLength===e.length?e:r.Buffer.from(JSON.stringify(e))}function C(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function R(e){if(!C(e))throw Error("Uint8Array expected")}function U(e,t){return!!Array.isArray(t)&&(0===t.length||(e?t.every(e=>"string"==typeof e):t.every(e=>Number.isSafeInteger(e))))}function N(e){if("function"!=typeof e)throw Error("function expected");return!0}function M(e,t){if("string"!=typeof t)throw Error(`${e}: string expected`);return!0}function D(e){if(!Number.isSafeInteger(e))throw Error(`invalid integer: ${e}`)}function L(e){if(!Array.isArray(e))throw Error("array expected")}function F(e,t){if(!U(!0,t))throw Error(`${e}: array of strings expected`)}function q(e,t){if(!U(!1,t))throw Error(`${e}: array of numbers expected`)}function V(...e){let t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map(e=>e.encode).reduceRight(r,t),decode:e.map(e=>e.decode).reduce(r,t)}}function $(e){let t="string"==typeof e?e.split(""):e,r=t.length;F("alphabet",t);let n=new Map(t.map((e,t)=>[e,t]));return{encode:n=>(L(n),n.map(n=>{if(!Number.isSafeInteger(n)||n<0||n>=r)throw Error(`alphabet.encode: digit index outside alphabet "${n}". Allowed: ${e}`);return t[n]})),decode:t=>(L(t),t.map(t=>{M("alphabet.decode",t);let r=n.get(t);if(void 0===r)throw Error(`Unknown letter: "${t}". Allowed: ${e}`);return r}))}}function z(e=""){return M("join",e),{encode:t=>(F("join.decode",t),t.join(e)),decode:t=>(M("join.decode",t),t.split(e))}}
2function H(e,t,r){if(t<2)throw Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(r<2)throw Error(`convertRadix: invalid to=${r}, base cannot be less than 2`);if(L(e),!e.length)return[];let n=0,o=[],i=Array.from(e,e=>{if(D(e),e<0||e>=t)throw Error(`invalid integer: ${e}`);return e}),a=i.length;for(;;){let e=0,s=!0;for(let o=n;o<a;o++){let a=i[o],c=t*e,u=c+a;if(!Number.isSafeInteger(u)||c/t!==e||u-a!==c)throw Error("convertRadix: carry overflow");let l=u/r;e=u%r;let f=Math.floor(l);if(i[o]=f,!Number.isSafeInteger(f)||f*r+e!==u)throw Error("convertRadix: carry overflow");s&&(f?s=!1:n=o)}if(o.push(e),s)break}for(let t=0;t<e.length-1&&0===e[t];t++)o.push(0);return o.reverse()}e.s(["actionCreators",0,{addKey:function(e,t){return new j({addKey:new k({publicKey:e,accessKey:t})})},createAccount:function(){return new j({createAccount:new w})},deleteAccount:function(e){return new j({deleteAccount:new P({beneficiaryId:e})})},deleteKey:function(e){return new j({deleteKey:new O({publicKey:e})})},deployContract:function(e){return new j({deployContract:new S({code:e})})},fullAccessKey:function(){return new v({nonce:0n,permission:new b({fullAccess:new g})})},functionCall:function(e,t,r=0n,n=0n,o=I){return new j({functionCall:new _({methodName:e,args:o(t),gas:r,deposit:n})})},functionCallAccessKey:function(e,t,r){return new v({nonce:0n,permission:new b({functionCall:new m({receiverId:e,allowance:r,methodNames:t})})})},signedDelegate:function({delegateAction:e,signature:t}){return new j({signedDelegate:new B({delegateAction:e,signature:t})})},stake:function(e=0n,t){return new j({stake:new T({stake:e,publicKey:t})})},transfer:function(e=0n){return new j({transfer:new A({deposit:e})})},deployGlobalContract:function(e,t){return new j({deployGlobalContract:new E({code:e,deployMode:t})})},useGlobalContract:function(e){return new j({useGlobalContract:new x({contractIdentifier:e})})}}],491042);let G=(e,t)=>0===t?e:G(t,e%t),K=(e,t)=>e+(t-G(e,t)),W=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function X(e,t,r,n){if(L(e),t<=0||t>32)throw Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw Error(`convertRadix2: wrong to=${r}`);if(K(t,r)>32)throw Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${K(t,r)}`);let o=0,i=0,a=W[t],s=W[r]-1,c=[];for(let n of e){if(D(n),n>=a)throw Error(`convertRadix2: invalid data word=${n} from=${t}`);if(o=o<<t|n,i+t>32)throw Error(`convertRadix2: carry overflow pos=${i} from=${t}`);for(i+=t;i>=r;i-=r)c.push((o>>i-r&s)>>>0);let e=W[i];if(void 0===e)throw Error("invalid carry");o&=e-1}if(o=o<<r-i&s,!n&&i>=t)throw Error("Excess padding");if(!n&&o>0)throw Error(`Non-zero padding: ${o}`);return n&&i>0&&c.push(o>>>0),c}function Q(e,t=!1){if(D(e),e<=0||e>32)throw Error("radix2: bits should be in (0..32]");if(K(8,e)>32||K(e,8)>32)throw Error("radix2: carry overflow");return{encode:r=>{if(!C(r))throw Error("radix2.encode input should be Uint8Array");return X(Array.from(r),8,e,!t)},decode:r=>(q("radix2.decode",r),Uint8Array.from(X(r,e,8,t)))}}function J(e){return N(e),function(...t){try{return e.apply(null,t)}catch(e){}}}let Y="function"==typeof Uint8Array.from([]).toBase64&&"function"==typeof Uint8Array.fromBase64?{encode:e=>(R(e),e.toBase64()),decode:e=>((e,t)=>{if(M("base64",e),e.length>0&&!(t?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/).test(e))throw Error("invalid base64");return Uint8Array.fromBase64(e,{alphabet:t?"base64url":"base64",lastChunkHandling:"strict"})})(e,!1)}:V(Q(6),$("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),function(e="="){return D(6),M("padding",e),{encode(t){for(F("padding.encode",t);6*t.length%8;)t.push(e);return t},decode(t){F("padding.decode",t);let r=t.length;if(6*r%8)throw Error("padding: invalid, string should have whole number of bytes");for(;r>0&&t[r-1]===e;r--)if((r-1)*6%8==0)throw Error("padding: invalid, string has too much padding");return t.slice(0,r)}}}(),z("")),Z=V((D(58),{encode:e=>{if(!C(e))throw Error("radix.encode input should be Uint8Array");return H(Array.from(e),256,58)},decode:e=>(q("radix.decode",e),Uint8Array.from(H(e,58,256)))}),$("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),z("")),ee=V($("qpzry9x8gf2tvdw0s3jn54
2khce6mua7l"),z("")),et=[0x3b6a57b2,0x26508e6d,0x1ea119fa,0x3d4233dd,0x2a1462b3];function er(e){let t=e>>25,r=(0x1ffffff&e)<<5;for(let e=0;e<et.length;e++)(t>>e&1)==1&&(r^=et[e]);return r}function en(e,t,r=1){let n=e.length,o=1;for(let t=0;t<n;t++){let r=e.charCodeAt(t);if(r<33||r>126)throw Error(`Invalid prefix (${e})`);o=er(o)^r>>5}o=er(o);for(let t=0;t<n;t++)o=er(o)^31&e.charCodeAt(t);for(let e of t)o=er(o)^e;for(let e=0;e<6;e++)o=er(o);return o^=r,ee.encode(X([o%W[30]],30,5,!1))}let eo=function(e){let t="bech32"===e?1:0x2bc830a3,r=Q(5),n=r.decode,o=r.encode,i=J(n);function a(e,r,n=90){M("bech32.encode prefix",e),C(r)&&(r=Array.from(r)),q("bech32.encode",r);let o=e.length;if(0===o)throw TypeError(`Invalid prefix length ${o}`);let i=o+7+r.length;if(!1!==n&&i>n)throw TypeError(`Length ${i} exceeds limit ${n}`);let s=e.toLowerCase(),c=en(s,r,t);return`${s}1${ee.encode(r)}${c}`}function s(e,r=90){M("bech32.decode input",e);let n=e.length;if(n<8||!1!==r&&n>r)throw TypeError(`invalid string length: ${n} (${e}). Expected (8..${r})`);let o=e.toLowerCase();if(e!==o&&e!==e.toUpperCase())throw Error("String must be lowercase or uppercase");let i=o.lastIndexOf("1");if(0===i||-1===i)throw Error('Letter "1" must be present between prefix and data only');let a=o.slice(0,i),c=o.slice(i+1);if(c.length<6)throw Error("Data must be at least 6 characters long");let u=ee.decode(c).slice(0,-6),l=en(a,u,t);if(!c.endsWith(l))throw Error(`Invalid checksum in ${e}: expected "${l}"`);return{prefix:a,words:u}}let c=J(s);return{encode:a,decode:s,encodeFromBytes:function(e,t){return a(e,o(t))},decodeToBytes:function(e){let{prefix:t,words:r}=s(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:c,fromWords:n,fromWordsUnsafe:i,toWords:o}}("bech32"),ei="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex?{encode:e=>(R(e),e.toHex()),decode:e=>(M("hex",e),Uint8Array.fromHex(e))}:V(Q(4),$("0123456789abcdef"),z(""),(N(t=e=>{if("string"!=typeof e||e.length%2!=0)throw TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}),{encode:e=>e,decode:e=>t(e)}));e.s(["base58",0,Z,"base64",0,Y,"bech32",0,eo,"hex",0,ei],37755);var ea=e.i(531738),es=e.i(623104),ec=e.i(956376),eu=class{constructor(e){this.tonapi=e}open(e){return(0,ea.openContract)(e,e=>el(this.tonapi,e.address,e.init))}provider(e,t){return el(this.tonapi,e,t||null)}};function el(e,t,r){return{async getState(){let r=await e.blockchain.getBlockchainRawAccount(t).catch(e=>{if("entity not found"!==e.message)throw Error(`Account request failed: ${e.message}`,e);return{address:t,balance:0n,lastTransactionLt:void 0,status:es.AccountStatus.Uninit,storage:{usedCells:1,usedBits:95,usedPublicCells:0,lastPaid:Math.floor(new Date().getTime()/1e3),duePayment:0n}}}),n=void 0!==r.lastTransactionHash&&void 0!==r.lastTransactionLt?{lt:r.lastTransactionLt,hash:ec.Buffer.from(r.lastTransactionHash,"base64")}:null,o=r.extraBalance?Object.fromEntries(Object.entries(r.extraBalance).map(([e,t])=>[Number(e),BigInt(t)])):null;return{balance:r.balance,extracurrency:o,last:n,state:({active:e=>({type:"active",code:e.code?.toBoc()??null,data:e.data?.toBoc()??null}),uninit:()=>({type:"uninit"}),nonexist:()=>({type:"uninit"}),frozen:()=>{throw Error("Frozen accounts are not supported by TonApi")}})[r.status](r)}},async get(r,n){if("string"!=typeof r)throw Error("Method name must be a string for TonClient provider");if(n.some(e=>"tuple"===e.type))throw Error("Tuples as get parameters are not supported by tonapi");let o=await e.blockchain.execGetMethodForBlockchainAccount(t,r,{args:n.map(ef)});return{stack:new ea.TupleReader(o.stack)}},async external(n){let o=null;r&&"active"!==(await e.accounts.getAccount(t)).status&&(o=r);let i=(0,ea.external)({to:t,init:o?{code:o.code,data:o.data}:null,body:n}),a=(0,ea.beginCell)().store((0,ea.storeMessage)(i)).endCell();await e.blockchain.sendBlockchainMessage({boc:a})},async internal(n,o){let i,a=null;r&&"active"!==(await e.accounts.getAccount(t)).status&&(a=r);let s=!0;null!==o.bounce&&void 0!==o.bounce&&(s=o.bounce),i="string"==typeof o.value?(0,ea.toNano)(o.value):o.value;
2let c=null;"string"==typeof o.body?c=(0,ea.comment)(o.body):o.body&&(c=o.body),await n.send({to:t,value:i,bounce:s,sendMode:o.sendMode,init:a,body:c})},open:t=>(0,ea.openContract)(t,t=>el(e,t.address,t.init)),getTransactions:(t,r,n,o)=>(console.info("hash param in getTransactions action ignored, beacause not supported",n.toString("hex")),e.blockchain.getBlockchainAccountTransactions(t,{before_lt:r+1n,limit:o}).then(({transactions:e})=>e.map(e=>(0,ea.loadTransaction)(e.raw.asSlice()))))}}function ef(e){switch(e.type){case"int":return"0x"+e.value.toString(16);case"nan":return"NaN";case"null":return"Null";case"cell":case"builder":return e.cell.toBoc().toString("base64");case"slice":return e.cell.toBoc().toString("hex");case"tuple":throw Error("Tuple is not supported in TonApi get method parameters");default:throw Error(`Unknown type ${e.type}`)}}e.s(["ContractAdapter",0,eu],757552)},3054,(e,t,r)=>{"use strict";function n(e){if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++)t.push(n(e[r]));let r=p(...t);return p(a(r.length,192),r)}let t=m(e);return 1===t.length&&t[0]<128?t:p(a(t.length,128),t)}function o(e,t,r){if(r>e.length)throw Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function i(e){if(0===e[0])throw Error("invalid RLP: extra zeros");return l(u(e))}function a(e,t){if(e<56)return Uint8Array.from([e+t]);let r=h(e),n=h(t+55+r.length/2);return Uint8Array.from(f(n+r))}function s(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);let r=function e(t){let r,n,a,s,c,u=[],l=t[0];if(l<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(l<=183){if(r=l-127,a=128===l?Uint8Array.from([]):o(t,1,r),2===r&&a[0]<128)throw Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:a,remainder:t.slice(r)}}if(l<=191){if(n=l-182,t.length-1<n)throw Error("invalid RLP: not enough bytes for string length");if((r=i(o(t,1,n)))<=55)throw Error("invalid RLP: expected string length to be greater than 55");return{data:a=o(t,n,r+n),remainder:t.slice(r+n)}}if(l<=247){for(s=o(t,1,r=l-191);s.length;)c=e(s),u.push(c.data),s=c.remainder;return{data:u,remainder:t.slice(r)}}{if((r=i(o(t,1,n=l-246)))<56)throw Error("invalid RLP: encoded list too short");let a=n+r;if(a>t.length)throw Error("invalid RLP: total length is larger than the data");for(s=o(t,n,a);s.length;)c=e(s),u.push(c.data),s=c.remainder;return{data:u,remainder:t.slice(a)}}}(m(e));if(t)return r;if(0!==r.remainder.length)throw Error("invalid RLP: remainder must be zero");return r.data}Object.defineProperty(r,"__esModule",{value:!0}),r.utils=r.decode=r.encode=void 0,r.encode=n,r.decode=s;let c=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function u(e){let t="";for(let r=0;r<e.length;r++)t+=c[e[r]];return t}function l(e){let t=Number.parseInt(e,16);if(Number.isNaN(t))throw Error("Invalid byte sequence");return t}function f(e){if("string"!=typeof e)throw TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw Error("hexToBytes: received invalid unpadded hex");let t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){let n=2*r;t[r]=l(e.slice(n,n+2))}return t}function p(...e){if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));for(let r=0,n=0;r<e.length;r++){let o=e[r];t.set(o,n),n+=o.length}return t}function d(e){return new TextEncoder().encode(e)}function h(e){if(e<0)throw Error("Invalid integer as argument, must be unsigned!");let t=e.toString(16);return t.length%2?`0${t}`:t}function y(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function m(e){if(e instanceof Uint8Array)return e;if("string"==typeof e){if(y(e)){var t;return f((t="string"!=typeof e?e:y(e)?e.slice(2):e).length%2?`0${t}`:t)}return d(e)}if("number"==typeof e||"bigint"==typeof e)return e?f(h(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw Error("toBytes: received unsupported type "+typeof e)}r.utils={bytesToHex:u,concatBytes:p,hexToBytes:f,utf8ToBytes:d},r.default={encode:n,decode:s}},218123,751379,861912,777811,e=>{"use strict";let t;e.s(["default",()=>_],218123);var r=e.i(329470),n=e.i(531738),o=e.i(608649),i=e.i(757552),a=e.i(623104),s=e.i(674758),c=e.i(861488);function u(e,n=0xffffffff){let o=r.Buffer.from(e);void 0===t&&function(){t=new Int32Array(256);for(let e=0;e<256;e++){let r=e;for(let e=8;e>0;--e)r=1&r?r>>>1^-0x12477ce0:r>>>1;t[e]=r}}();for(let e=0;e<o.length;++e)n=t[(n^o[e])&255]^n>>>8;return(-1^n)>>>0}e.i(741470),e.i(3054),BigInt(-1),BigInt(0),(0,n.toNano)("0.06");let l=(0,n.toNano)("0.05");(0,n.toNano)("1"),(0,n.toNano)("0.5"),BigInt(1e12),BigInt(600),u("storage_deposit"),u("create_user"),u("user_native_withdraw"),u("user_token_withdraw"),u("native_deposit"),u("admin_native_withdraw"),u("admin_token_withdraw"),u("change_contract_owner"),u("change_withdraw_delegate"),u("change_verifying_pubkey"),u("add_token"),u("remove_token"),u("change_chain_id"),u("reset_max_n
2once"),u("update_contract_code"),u("update_deposit_code"),u("update_user_code"),u("self_destruct"),e.s(["MIN_COMMISSION",0,l,"crc32",0,u,"createAddressRlp",0,e=>{let t=(0,n.beginCell)();e&&t.storeAddress(e).storeBits(new n.BitString(r.Buffer.alloc(5),0,5));var o=t.endCell();let i="";async function a(e){i+=e.bits.toString();for(let t=0;t<e.refs.length;t++)a(e.refs[t])}return a(o),r.Buffer.from(i,"hex")},"parseAddressRlp",0,e=>{let t=r.Buffer.from((0,o.baseDecode)(e));return new n.Cell({bits:new n.BitString(t,0,8*t.length)}).asSlice().loadAddress().toString({bounceable:!0})}],751379);class f extends Error{constructor(e,t,r){super(`Deposit not found for hash ${t} on chain ${e}: ${r}`),this.chain=e,this.hash=t,this.reason=r}}e.s(["ApiError",0,class extends Error{constructor(e,t,r,n){super(`${t} ${r} failed with status ${e}: ${n}`),this.status=e,this.method=t,this.request=r,this.message=n}},"CompletePreviousWithdrawalsError",0,class extends Error{constructor(e,t,r){super(`Complete previous withdrawal with nonce "${r}" before make new in chain "${e}" to receiver "${t}"`),this.chain=e,this.receiver=t,this.nonce=r}},"DepositAlreadyClaimedError",0,class extends Error{constructor(e,t){super(`Deposit already claimed for hash ${t} on chain ${e}`),this.chain=e,this.hash=t}},"DepositNotFoundError",0,f,"FailedToExecuteDepositError",0,class extends Error{constructor(e){super(`Failed to execute deposit: ${e||"Unknown error"}`)}},"GaslessNotAvailableError",0,class extends Error{constructor(e){super(`Gasless withdraw not available for chain "${e}"`)}},"GaslessWithdrawCanceledError",0,class extends Error{constructor(e,t,r,n){super(`Gasless withdraw canceled for nonce ${t} on chain ${r} for receiver ${n}`),this.reason=e,this.nonce=t,this.chain=r,this.receiver=n}},"GaslessWithdrawTxNotFoundError",0,class extends Error{constructor(e,t,r){super(`Gasless withdraw tx not found for nonce ${e} on chain ${t} for receiver ${r}`),this.nonce=e,this.chain=t,this.receiver=r}},"IntentBalanceIsLessThanAmountError",0,class extends Error{constructor(e,t,r){super(`Intent balance is less than amount for token ${e} on intent account ${t} (amount: ${r})`),this.token=e,this.intentAccount=t,this.amount=r}},"MismatchReceiverAndIntentAccountError",0,class extends Error{constructor(e,t){super(`Mismatch receiver and intent account: ${e} and ${t}`),this.receiver=e,this.intentAccount=t}},"NearTokenNotRegisteredError",0,class extends Error{constructor(e,t){super(`Near token ${e} not registered on intent account ${t}`),this.token=e,this.intentAccount=t}},"ProcessAbortedError",0,class extends Error{constructor(e){super(`Process ${e} aborted`),this.process=e}},"SlippageError",0,class extends Error{constructor(e,t){super(`Slippage error: minAmountOut: ${e}, amountOut: ${t}`),this.minAmountOut=e,this.amountOut=t}},"UnsupportedTokenFormatError",0,class extends Error{constructor(e){super(`Unsupported token format: ${e}`),this.token=e}},"WithdrawalNotFoundError",0,class extends Error{constructor(e){super(`Withdrawal not found for nonce "${e}"`),this.nonce=e}}],861912);let p=Object.fromEntries([["EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs","EQBDaGKAyQ7A9zQ_zj78883KdSVTDAD73ieM-jINqVGC1J8L"],["EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT","EQDi87Y_5SzUGoiUJzte2MTDm-spFfLUt7UjMUiOVdLuO2Gi"],["EQAIb6KmdfdDR7CN1GBqVJuP25iCnLKCvBlJ07Evuu2dzP5f","EQAGHwnc1kWjgp6GsOgVuX3W2vKuiEuoEBOrJ5fqZYc55q8k"],["EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO","EQCNlEjxS_xvpQZ1gDZ7F6UaRyBMQ8D1k8KyXAlNNgdLFJ8M"],["EQCAj5oiRRrXokYsg_B-e0KG9xMwh5upr5I8HQzErm0_BLUM","EQCzdTIkqAfQEO73O1X_gWEYFyLoh5DvuJlOCIvXpCkM76Ob"],["EQCuPm01HldiduQ55xaBF_1kaW_WAUy5DHey8suqzU_MAJOR","EQDIJLoS08PuNGuEW58_03YuQmL9u6kwbfbY3EdjnA715dMB"],["EQCWDj49HFInSwSk49eAo476E1YBywLoFuSZ6OO3x7jmP2jn","EQB9Xiwr2LiVwuZkagQXACxk0bgT5tNND3MZUiV1xEEuuo3b"],["EQCvxJy4eG8hyHBFsZ7eePxrRsUQSFE_jpptRAYBmcG_DOGS","EQD2rydWo45vHzYEZ7q8Jb0iRW3_wGHyfYDD5RLOA4fBhuwi"],["EQD-cvR0Nz6XAyRBvbhz-abTrRC6sI5tvHvvpeQraV9UAAD7","EQBL_bynBA5JTbPJwAdT7NaSob-QjXxvBJ7h3j5rBhzfDUZp"],["EQBYnUrIlwBrWqp_rl-VxeSBvTR2VmTfC4ManQ657n_BUILD","EQCc1UVwsNMJtP5t6Vx2qc24tL52w6szyrEVnH3XRpflPpuT"],["EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA","EQD80AyqqbAHpo1PhtYLToxF3QT9PtmY0KFvCqb5wr05bPnE"],["EQDQ5UUyPHrLcQJlPAczd_fjxn8SLrlNQwolBznxCdSlfQwr","EQCt1WSEPizgNvNm-t4Nor2qgf9huy7iIOaHZ34c4n
2BVGKJ8"],["EQAQXlWJvGbbFfE8F3oS8s87lIgdovS455IsWFaRdmJetTon","EQAYQOCFn9f8f8tmHV2BAznGBMGFioij0GEmAZVKaWNh4cuo"],["EQDrJeE6raclsJK62rPKAx3eP7TE8RMBOnQLtnl9T7Iz_Lx9","EQCkEVbCb7M_n4E9Yz9ZY_9FacukI9JO9EDIqPz6hPEWSYWj"],["EQDv-yr41_CZ2urg2gfegVfa44PDPjIK9F-MilEDKDUIhlwZ","EQACXITjv-UiHcAdxFXKwWclFqB_Ka_him56uIiLS0Fo7Gjc"],["EQCwe0g3cEFhsz4VK5nrtOZBkFeSISxhCVUqvON7Im__SOON","EQACtGfina6xJb-MpE-Y-w4lbI2vgXJsTSLK5DY7nPFnfyga"],["EQCajaUU1XXSAjTD-xOV7pE49fGtg4q8kF3ELCOJtGvQFQ2C","EQAj_uSQYmr0EOPTMxR8URX7YlS5tLl-NvXiHOmnxAScXXO3"],["EQAJ8uWd7EBqsmpSWaRdf_I-8R8-XHwh3gsNKhy-UrdrPcUo","EQADY7rAAzQDFkT0AKcq6k2FInz8U4Cnx6epz65OcOu-1J-K"],["EQCV5dXNrWVU1z7VidEKvXL5iB_PXs2zm9LLe9bPgSklde0z","EQB3FwKw5vjWUzu7Ga_e2AzcA5E2g0b86vZCOGkdpSXZvxlk"],["EQBsosmcZrD6FHijA7qWGLw5wo_aH8UN435hi935jJ_STORM","EQDeua9d5J1QHNNbqu-VSqreCWSFaGPATVDBi1tE6S9p60E3"],["EQD0KpcRMh-sKO2z5-vOjgvFjTT58tO-2Nmvxqg5ocFQFtWz","EQADGInZ-v53kTY3oyeh_A13dImj70_avWEYOhN9JmeRO8mo"],["EQBZ_cafPyDr5KUTs0aNxh0ZTDhkpEZONmLJA2SNGlLm4Cko","EQCj3pOHWy8W4fznZJnnPFTlW0kevWqvScAsu6APyDKz8HL3"],["EQA3AshPEVly8wQ6mZincrKC_CkJSKXqqjyg0VMsVjF_CATS","EQDf2FtbXweTqNG-QQYdRjmlAyb23vKZwb-WQR_-QANPpDYl"],["EQBKWcsGcb-uEG8Hm-FZbt4SzsZnKS682hsrzljG-v7-mysM","EQCIIez_kpVe_bTXeIPYqaGbrJ-hycJqJy2zjUfb3s7LPsvD"],["EQB4zZusHsbU2vVTPqjhlokIOoiZhEdCMT703CWEzhTOo__X","EQC6gRV3MElAoUGaGswZqknDCPBxKfzm-d1LcnMafbUWvDJ_"],["EQBMYbJS_hA4TdiQLh5j41WGGCxV1jW-jB3WaUQkcHxNLPwq","EQDPdvCHX2WYN6Ca7U8HdXnYt6_AKGAAovAEYF2XADEMlds1"],["EQB-vc00g9PeUWLptSAH4g1J5kYS7WTgtVEfhI6oKdQtRudE","EQA8kYAV5keLJA4-_CM3vgSiClezX_joWPSi2HOZSMry2GuS"],["EQDo8QC6mVi7Gq6uGWDF4XVp3cZ4wKZ-bqKBkmhVMPm-1ojm","EQCLQKIsDA8VrfblMt_sTb_1uw088zaZLmpXEVgZIlUt8nac"],["EQDWSm618mrf84PUjlu8rAMnlTa3RGhMzWb-UadvB5vLyqCv","EQCE2vZmmZI2ijnF0XhJ1oIlbkr8jKWIfOGMfWHNKLrNzms9"],["EQBKMfjX_a_dsOLm-juxyVZytFP7_KKnzGv6J01kGc72gVBp","EQAMoDW_66hWWNeKPvJ8WowAdBM_P3ATBDSmVeV6ydr7UXHr"]]),d=Object.fromEntries(Object.entries(p).map(([e,t])=>[t,e]));BigInt(-1),BigInt(0),(0,n.toNano)("0.06"),(0,n.toNano)("0.05"),(0,n.toNano)("1"),(0,n.toNano)("0.01"),BigInt(1e12);let h={storageDeposit:u("storage_deposit"),userNativeWithdraw:u("user_native_withdraw"),userTokenWithdraw:u("user_token_withdraw"),nativeDeposit:u("native_deposit"),tokenDeposit:0x7362d09c,adminNativeWithdraw:u("admin_native_withdraw"),adminTokenWithdraw:u("admin_token_withdraw"),changeContractOwner:u("change_contract_owner"),changeVerifyingPubkey:u("change_verifying_pubkey"),changeChainId:u("change_chain_id"),resetMaxNonce:u("reset_max_nonce"),updateContractCode:u("update_contract_code"),updateDepositCode:u("update_deposit_code"),updateUserCode:u("update_user_code"),selfDestruct:u("self_destruct")};class y{constructor(e,t){this.address=e,this.init=t}static createFromAddress(e){return new y(e)}static createFromConfig(e,t,r=0){let o,i={code:t,data:(o=(0,n.beginCell)().storeBuffer(e.verifyingAddress).endCell(),(0,n.beginCell)().storeAddress(e.ownerAddress).storeUint(e.chainId,64).storeRef(o).storeRef(e.depositJettonCode).storeRef(e.userJettonCode).storeCoins(0).storeCoins(0).endCell())};return new y((0,n.contractAddress)(r,i),i)}async sendDeploy(e,t,r){await e.internal(t,{value:r,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().endCell()})}async sendStorageDeposit(e,t,r){await e.internal(t,{value:r,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.storageDeposit,32).endCell()})}async sendNativeDeposit(e,t,r){await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.nativeDeposit,32).storeUint(r.queryId,64).storeBuffer(r.receiver).storeCoins(r.amount).storeAddress(r.excessAcc).endCell()})}async sendUserNativeWithdraw(e,t,r){let o=(0,n.beginCell)().storeBuffer(r.signature).endCell(),i=(0,n.beginCell)().storeAddress(r.userWallet).storeAddress(r.excessAcc).endCell();await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.userNativeWithdraw,32).storeUint(0,64).storeUint(r.nonce,128).storeCoins(r.amount).storeRef(o).storeRef(i).endCell()})}async sendUserTokenWithdraw(e,t,r){let o=(0,n.beginCell)().storeBuffer(r.signature).endCell(),i=(0,n.beginCell)().storeAddress(r.userWallet).storeAddress(r.excessAcc).endCell();await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.userTokenWithdraw,32).storeUint(0,64).storeUint(r.nonce,128).storeCoins(r.amount).storeRef(o).storeRef(i).storeAddress(r.token).endCell()})}async sendAdminNativeWithdraw(e,t,r){await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.adminNativeWithdraw,32).storeCoins(r.amount).storeAddress(r.re
2ceiver).endCell()})}async sendAdminTokenWithdraw(e,t,r){await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.adminTokenWithdraw,32).storeUint(r.queryId,64).storeCoins(r.amount).storeAddress(r.receiver).storeAddress(r.token).endCell()})}async sendChangeContractOwner(e,t,r){await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.changeContractOwner,32).storeAddress(r.newOwner).endCell()})}async sendChangeChainId(e,t,r){await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.changeChainId,32).storeInt(r.chainId,64).endCell()})}async sendResetMaxNonce(e,t,r){await e.internal(t,{value:r,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.resetMaxNonce,32).endCell()})}async sendChangeVerifyingPubkey(e,t,r){let o=(0,n.beginCell)().storeBuffer(r.verifyingAddress).endCell();await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.changeVerifyingPubkey,32).storeRef(o).endCell()})}async sendSelfDestruct(e,t,r){await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.selfDestruct,32).endCell()})}async getDepositJettonAddress(e,t){return(await e.get("get_deposit_jetton_address",[{type:"int",value:t}])).stack.readAddress()}async getUserJettonAddress(e,t){return(await e.get("get_user_jetton_address",[{type:"slice",cell:(0,n.beginCell)().storeAddress(t).endCell()}])).stack.readAddress()}async getBalance(e){return(await e.get("get_smc_balance",[])).stack.readBigNumber()}async getContractOwner(e){return(await e.get("get_contract_owner",[])).stack.readAddress()}async getVerifyingAddress(e){return(await e.get("get_verifying_pubkey",[])).stack.readBuffer()}async getTokens(e){let t=await e.get("get_tokens",[]);return t.stack.readCellOpt()?.beginParse().loadDictDirect(n.Dictionary.Keys.Address(),n.Dictionary.Values.Address())}async getChainId(e){return(await e.get("get_chain_id",[])).stack.readBigNumber()}async getMaxNonce(e){return(await e.get("get_max_nonce",[])).stack.readBigNumber()}async getLastGeneratedNonce(e){return(await e.get("get_last_generated_nonce",[])).stack.readBigNumber()}async getMetaWalletData(e){let t=await e.get("get_meta_wallet_data",[]),r=t.stack.readAddress(),n=t.stack.readBigNumber(),o=t.stack.readBuffer(),i=t.stack.readCell(),a=t.stack.readCell();return{contractOwner:r,chainId:n,verifyingAddress:o,depositJettonCode:i,userJettonCode:a,maxNonce:t.stack.readBigNumber(),lastGeneratedNonce:t.stack.readBigNumber()}}}class m{constructor(e,t){this.address=e,this.init=t}static createFromAddress(e){return new m(e)}async sendSelfDestruct(e,t,r){await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.selfDestruct,32).endCell()})}async getBalance(e){return(await e.get("get_smc_balance",[])).stack.readBigNumber()}async getMetaWalletAddress(e){return(await e.get("get_meta_wallet_address",[])).stack.readAddress()}async getSenderAddress(e){return(await e.get("get_sender_address",[])).stack.readAddress()}async getDepositJettonNonce(e){return(await e.get("get_deposit_nonce",[])).stack.readBigNumber()}async getDepositJettonHash(e){return(await e.get("get_deposit_hash",[])).stack.readBigNumber()}async getWithdrawVerification(e,t){let r=(0,n.beginCell)().storeBuffer(t).endCell();return(await e.get("verify_withdraw",[{type:"slice",cell:r}])).stack.readBigNumber()}}class g{constructor(e,t){this.address=e,this.init=t}static createFromAddress(e){return new g(e)}static createFromConfig(e,t,r=0){let o={code:t,data:(0,n.beginCell)().storeCoins(0).storeAddress(e.admin).storeRef(e.content).storeRef(e.walletCode).endCell()};return new g((0,n.contractAddress)(r,o),o)}async sendDeploy(e,t,r){await e.internal(t,{value:r,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().endCell()})}async sendMint(e,t,r,o,i,a){await e.internal(t,{sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(21,32).storeUint(0,64).storeAddress(i).storeCoins(o).storeRef((0,n.beginCell)().storeUint(0x178d4519,32).storeUint(0,64).storeCoins(a).storeAddress(this.address).storeAddress(this.address).storeCoins(0).storeUint(0,1).endCell()).endCell(),value:r+o})}async getWalletAddressOf(e,t){return(await e.get("get_wallet_address",[{type:"slice",cell:(0,n.beginCell)().storeAddress(t).endCell()}])).stack.readAddress()}async getWalletCode(e){let t=(await e.get("get_jetton_data",[])).stack;return t.skip(4),t.readCell()}}class b{constructor(e,t){this.address=e,this.init=t}static createFromAddress(e){return new b(e)}static createFromConfig(e,t,r=0){let o={code:t,data:(0,n.beginCell)().storeCoins(0).storeAddress(e.owner).storeAddress(e.minter).storeRef(e.walletCode).endCell()};return new b((0,n.contractAddress)(r,o),o)}async sendDeploy(e,t,r){await e.internal(t,{value:r,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().endCell()})}
2async sendTransfer(e,t,r,o,i,a,s,c){await e.internal(t,{sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(0xf8a7ea5,32).storeUint(0,64).storeCoins(a).storeAddress(i).storeAddress(c).storeUint(0,1).storeCoins(o).storeUint(1,1).storeRef(s).endCell(),value:r+o})}async getJettonBalance(e){return"active"!==(await e.getState()).state.type?0n:(await e.get("get_wallet_data",[])).stack.readBigNumber()}async getBalance(e){return(await e.get("get_smc_balance",[])).stack.readBigNumber()}}class v{constructor(e,t){this.address=e,this.init=t}static createFromAddress(e){return new v(e)}async sendDeploy(e,t,r){await e.internal(t,{value:r,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().endCell()})}async sendSelfDestruct(e,t,r){await e.internal(t,{value:r.value,sendMode:n.SendMode.PAY_GAS_SEPARATELY,body:(0,n.beginCell)().storeUint(h.selfDestruct,32).endCell()})}async getBalance(e){return(await e.get("get_smc_balance",[])).stack.readBigNumber()}async getMetaWalletAddress(e){return(await e.get("get_meta_wallet_address",[])).stack.readAddress()}async getLastWithdrawnNonce(e){return(await e.get("get_last_withdrawn_nonce",[])).stack.readBigNumber()}async getUserJettonData(e){let t=await e.get("get_user_data",[]),r=t.stack.readAddress(),n=t.stack.readAddress();return{metaWalletAddress:r,userWallet:n,lastWithdrawnNonce:t.stack.readBigNumber(),userJettonCode:t.stack.readCell()}}}class w{constructor(e){this.chain=e.chain,this.baseFee=e.baseFee??0n,this.gasLimit=e.gasLimit||1n,this.reserve=e.reserve??0n,this.priorityFee=e.priorityFee??0n,this.gasless=e.gasless??!1,this.additional=e.additional,this.options=e.options,this.token=e.token,this.evm=e.evm}changePriorityFee(e){return this.priorityFee=e,new w(this)}changeGasLimit(e){return this.gasLimit=e,new w(this)}changeReserve(e){return this.reserve=e,new w(this)}get gasPrice(){if(this.chain===c.Network.Solana){let e=BigInt(Math.ceil(Number(this.priorityFee)/1e6));return this.gasLimit*e+this.baseFee}return this.gasLimit*(this.priorityFee+this.baseFee)}getOptionGasPrice(e){if(this.options?.[e]==null)throw"No option";let{priorityFee:t,baseFee:r}=this.options[e];if(this.chain===c.Network.Solana){let e=BigInt(Math.ceil(Number(t)/1e6));return this.gasLimit*e+r}return this.gasLimit*(t||0n)+r}get needNative(){return this.gasless?0n:"modern"===this.evm?this.gasLimit*(this.evmGas.maxFeePerGas||0n)+this.reserve+(this.additional??0n):this.gasPrice+this.reserve+(this.additional??0n)}get evmGas(){if(null==this.evm)throw"This chain is not EVM";return"legacy"===this.evm?{gasPrice:this.baseFee+this.priorityFee}:{maxFeePerGas:14n*this.baseFee/10n+this.priorityFee,maxPriorityFeePerGas:this.priorityFee}}clone(){return new w(this)}static fromReview(e){return new w(e)}static fromFeeData(e,t){let r=("feeDatas"in e?e.feeDatas:[e]).map(e=>null==e.maxFeePerGas||null==e.maxPriorityFeePerGas?{baseFee:0n,priorityFee:e.gasPrice||0n}:{baseFee:e.maxFeePerGas-e.maxPriorityFeePerGas,priorityFee:e.maxPriorityFeePerGas||0n});return new w({...r[0],evm:null==r[0].priorityFee?"legacy":"modern",options:r,chain:t})}}e.s(["NEAR_PER_GAS",0,10n**6n,"ReviewFee",0,w,"TGAS",0,1000000000000n],777811);class S{constructor(e,t){this.omni=e,this.contract=t.contract||"EQANEViM3AKQzi6Aj3sEeyqFu8pXqhy9Q9xGoId_0qp3CNVJ",this.tonApi=t.rpc instanceof a.TonApiClient?t.rpc:new a.TonApiClient({apiKey:t.rpc}),this.client=new i.ContractAdapter(this.tonApi)}async registerMinterJetton(e){let{metaWallet:t,JettonMinter:r}=this.getMetaWallet(),o=this.client.open(r.createFromAddress(n.Address.parse(e))),i=await o.getWalletAddressOf(t.address),a=n.Address.parse(e).toString({bounceable:!0});S.TON_MINTER_TO_JETTON_MAPPER[a]=i.toString({bounceable:!0}),S.TON_JETTON_TO_MINTER_MAPPER[i.toString({bounceable:!0})]=a}getMetaWallet(){return this.metaWallet||(this.metaWallet=this.client.open(y.createFromAddress(n.Address.parse(this.contract)))),{metaWallet:this.metaWallet,DepositJetton:m,UserJetton:v,JettonMinter:g,JettonWallet:b}}async getWithdrawFee(){return new w({baseFee:(0,n.toNano)(.05),reserve:(0,n.toNano)(.1),gasLimit:1n,chain:c.Network.Ton})}async getDepositFee(e){return new w({reserve:"native"===e?(0,n.toNano)(.07):(0,n.toNano)(.13),baseFee:(0,n.toNano)(.025),chain:c.Network.Ton,gasLimit:1n})}executor(e){let t={hash:"",send:async r=>{t.hash=await e(r)}};return t}async getTokenBalance(e,t){let{metaWallet:r,JettonMinter:o,JettonWallet:i}=this.getMetaWallet(),a=this.client.open(o.createFromAddress(n.Address.parse(e))),s=await a.getWalletAddressOf(t?n.Address.parse(t):r.address),c=this.client.open(i.createFromAddress(s));return await c.getJettonBalance()}async isWithdrawUsed(e,t){let{metaWallet:r,UserJetton:o}=this.getMetaWallet(),i=await r.getUserJettonAddress(n.Address.parse(t)),a=this.client.open(o.createFromAddress(i)),s=await a.getLastWithdrawnNonce();return BigInt(e)<=BigInt(s.toString())}async withdraw(e){let{metaWallet:t,JettonMinter:i}=this.getMetaWallet(),a=this.executor(e.sendTransaction),s=await this.omni.api.withdrawSign(e.n
2once);if("native"===e.token)return await t.sendUserNativeWithdraw(a,{userWallet:n.Address.parse(e.receiver),signature:r.Buffer.from((0,o.baseDecode)(s)),excessAcc:n.Address.parse(e.refundAddress),nonce:BigInt(e.nonce),value:(0,n.toNano)("0.15"),amount:e.amount}),a.hash;let c=this.client.open(i.createFromAddress(n.Address.parse(e.token))),u=await c.getWalletAddressOf(t.address);return await t.sendUserTokenWithdraw(a,{userWallet:n.Address.parse(e.receiver),signature:r.Buffer.from((0,o.baseDecode)(s)),excessAcc:n.Address.parse(e.refundAddress),token:u,nonce:BigInt(e.nonce),amount:e.amount,value:(0,n.toNano)("0.15")}),a.hash}async deposit(e){let{metaWallet:t,JettonMinter:r,JettonWallet:o}=this.getMetaWallet(),i=(0,s.omniEphemeralReceiver)(e.intentAccount),a=this.executor(e.sendTransaction);if(this.omni.api.registerDeposit(e.intentAccount),"native"===e.token)this.omni.logger?.log(`Depositing ${e.amount} TON to ${e.intentAccount}`),await t.sendNativeDeposit(a,{value:e.amount+(0,n.toNano)(.07),excessAcc:n.Address.parse(e.refundAddress??e.sender),receiver:i,amount:e.amount,queryId:0});else{this.omni.logger?.log(`Depositing ${e.amount} ${e.token} to ${e.intentAccount}`);let s=this.client.open(r.createFromAddress(n.Address.parse(e.token)));this.omni.logger?.log(`Getting wallet address of ${n.address}`);let c=await s.getWalletAddressOf(n.Address.parse(e.sender));this.omni.logger?.log("Sending transfer");let u=this.client.open(o.createFromAddress(c)),l=n.Address.parse(e.refundAddress??e.sender);await u.sendTransfer(a,(0,n.toNano)(.06),(0,n.toNano)(.07),t.address,e.amount,(0,n.beginCell)().storeBuffer(i).storeAddress(l).endCell(),l)}return a.hash}async clearDepositNonceIfNeeded(e){let{metaWallet:t,DepositJetton:r}=this.getMetaWallet();if(!await this.omni.isDepositUsed(c.Network.Ton,e.nonce))return;let n=await t.getDepositJettonAddress(BigInt(e.nonce)),o=this.client.open(r.createFromAddress(n));await o.sendSelfDestruct(this.executor(e.sendTransaction),{value:l})}async parseDeposit(e){let t=await this.tonApi.events.getEvent(e),r=t.actions.filter(e=>null!=e.ContractDeploy).map(e=>e.baseTransactions[0]);if(!r.length)throw new f(c.Network.Ton,e,"Deposit tx not found");let n="0x205f209a";if(!t.actions.some(e=>[n,"0xb7e30a3e"].includes(e.SmartContractExec?.operation??"")))throw new f(c.Network.Ton,e,"Deposit tx not found");let i={timestamp:Date.now(),chain:c.Network.OmniTon,receiver:"",nonce:"",amount:"",token:"",sender:"",tx:e},a=t.actions.find(e=>null!=e.JettonTransfer),s=t.actions.find(e=>e.SmartContractExec?.operation===n);if(a?.JettonTransfer)for(let e of a.baseTransactions)try{let t=await this.tonApi.blockchain.getBlockchainTransaction(e),r=t.inMsg?.rawBody;if(null==r)continue;let n=r.beginParse();n.loadUint(32),n.loadUintBig(64),i.amount=n.loadCoins().toString(),i.receiver=(0,o.baseEncode)(n.loadRef().beginParse().loadBuffer(32)),i.sender=t.account.address.toString({bounceable:!1}),i.token=a.JettonTransfer.jetton.address.toString({bounceable:!0});break}catch(e){}else if(s){let t=await this.tonApi.blockchain.getBlockchainTransaction(s.baseTransactions[0]),r=t.inMsg?.rawBody;if(null==r)throw new f(c.Network.Ton,e,"Deposit tx not found");let n=r.beginParse();n.loadUint(32),n.loadUintBig(64),i.sender=t.account.address.toString({bounceable:!1}),i.receiver=(0,o.baseEncode)(n.loadBuffer(32)),i.amount=n.loadCoins().toString(),i.token="native"}else throw new f(c.Network.Ton,e,"Deposit tx not found");let u=async e=>{let t=await this.tonApi.blockchain.getBlockchainTransaction(e);if(t.inMsg?.init?.boc==null)throw new f(c.Network.Ton,e,"Deploy tx not found");let r=t.inMsg.init.boc.beginParse();r.loadRef();let n=r.loadRef().beginParse();return n.loadAddressAny(),n.loadAddressAny(),n.loadUintBig(128).toString()};for(let e of r){let t=await u(e).catch(()=>null);if(!(t&&BigInt(t)>10n**30n)&&t)return{...i,nonce:t}}throw new f(c.Network.Ton,e,"Deposit not found")}}S.TON_MINTER_TO_JETTON_MAPPER=p,S.TON_JETTON_TO_MINTER_MAPPER=d;let _=S},674758,e=>{"use strict";e.s(["Logger",()=>T,"bigIntMax",()=>P,"bigIntMin",()=>B,"decodeReceiver",()=>A,"decodeTokenAddress",()=>S,"encodeReceiver",()=>x,"encodeTokenAddress",()=>
2w,"formatAmount",()=>I,"fromOmni",()=>g,"functionCall",()=>h,"isCosmos",()=>m,"isTon",()=>y,"legacyUnsafeOmniEphemeralReceiver",()=>E,"omniEphemeralReceiver",()=>_,"parseAmount",()=>C,"round",()=>j,"toNonDivisibleNumber",()=>O,"toOmni",()=>b,"toOmniIntent",()=>v,"toReadableNumber",()=>k,"wait",()=>R]);var t=e.i(329470),r=e.i(222956),n=e.i(608649),o=e.i(345257),i=e.i(491042),a=e.i(37755),s=e.i(531738),c=e.i(741470),u=e.i(218123),l=e.i(751379),f=e.i(897436),p=e.i(861488);let d=e=>{for(let t in e)"bigint"==typeof e[t]&&(e[t]=e[t].toString()),"object"==typeof e[t]&&d(e[t])},h=e=>("object"==typeof e.args&&d(e.args),i.actionCreators.functionCall(e.methodName,e.args,BigInt(e.gas),BigInt(e.deposit))),y=e=>e===p.Network.OmniTon||e===p.Network.Ton,m=e=>void 0!==f.GlobalSettings.cosmos[e],g=e=>{if("nep141:wrap.near"===(e=e.split(":").pop()||e))return"1010:native";if(e.startsWith("nep141:"))return`1010:${e.replace("nep141:","")}`;if(!e.includes("_"))return`1010:${e}`;let t=e.split("_"),r=+t[0],n=S(r,t[1]);return 1117==+r&&(r=1111),`${r}:${n}`},b=(e,t)=>{if(e.toString().startsWith("nep141:"))return e.toString();if(e.toString().startsWith(f.GlobalSettings.hotIntentPrefix))return e.toString().replace(f.GlobalSettings.hotIntentPrefix,"");let[r,n]=t?[e,t]:String(e).split(/:(.*)/s);return(1111==+r&&(r=1117),+r===p.Network.Hot)?n.replace(f.GlobalSettings.hotIntentPrefix,""):+r===p.Network.Near?n:`${r}_${w(+r,n)}`},v=(e,t)=>{let[r,n]=t?[e,t]:String(e).split(/:(.*)/s);return+r===p.Network.Hot?n:(1010==+r&&"native"===n&&(n="wrap.near"),1010==+r)?`nep141:${n}`:(1111==+r&&(r=1117),`${f.GlobalSettings.hotIntentPrefix}${r}_${w(+r,n)}`)},w=(e,i)=>{if(m(e))return(0,n.baseEncode)(t.Buffer.from(i,"utf8"));if(e===p.Network.Solana)return"native"===i?"11111111111111111111111111111111":i;if(y(e)){if("native"===i)return(0,n.baseEncode)((0,l.createAddressRlp)());let e=u.default.TON_MINTER_TO_JETTON_MAPPER[s.Address.parse(i).toString({bounceable:!0})];if(!e)throw"Unknown token address";return(0,n.baseEncode)((0,l.createAddressRlp)(s.Address.parse(e)))}return e===p.Network.Stellar?"native"===i?"111bzQBB5v7AhLyPMDwS8uJgQV24KaAPXtwyVWu2KXbbfQU6NXRCz":(0,n.baseEncode)(o.Address.fromString(i).toScVal().toXDR()):e===p.Network.Near?(0,n.baseEncode)(t.Buffer.from(i,"utf8")):"native"===i?"11111111111111111111":(0,n.baseEncode)((0,r.getBytes)(i))},S=(e,i)=>{if(""===i||"1"===i||"11111111111111111111"===i||"11111111111111111111111111111111"===i||"111bzQBB5v7AhLyPMDwS8uJgQV24KaAPXtwyVWu2KXbbfQU6NXRCz"===i)return"native";if(m(e))return t.Buffer.from((0,n.baseDecode)(i)).toString("utf8");if(y(e)){try{let e=u.default.TON_JETTON_TO_MINTER_MAPPER[s.Address.parse(i).toString({bounceable:!0})];if(e)return e}catch{}let e=(0,l.parseAddressRlp)(i),t=u.default.TON_JETTON_TO_MINTER_MAPPER[s.Address.parse(e).toString({bounceable:!0})];return t||(console.error("Unknown token address, use TonOmniService.registerMinterJetton",i),"")}return e===p.Network.Near?t.Buffer.from((0,n.baseDecode)(i)).toString("utf8"):e===p.Network.Stellar?o.Address.fromScVal(o.xdr.ScVal.fromXDR(t.Buffer.from((0,n.baseDecode)(i)))).toString():e===p.Network.Solana?i:(0,r.hexlify)((0,n.baseDecode)(i))},_=e=>c.default.createHash("sha256").update(JSON.stringify({account_id:f.GlobalSettings.intentsContract,msg:JSON.stringify({receiver_id:e})})).digest(),E=e=>c.default.createHash("sha256").update(t.Buffer.from(f.GlobalSettings.intentsContract,"utf8")).update(t.Buffer.from(JSON.stringify({receiver_id:e}),"utf8")).digest(),x=(e,t)=>{if(e===p.Network.Near||e===p.Network.Solana)return t;if(m(e)){let{data:e}=((e,t=1/0)=>{let r=a.bech32.decode(e,t);return{prefix:r.prefix,data:new Uint8Array(a.bech32.fromWords(r.words))}})(t),r=new Uint8Array(e);return a.base58.encode(r)}return e===p.Network.Stellar?(0,n.baseEncode)(o.Address.fromString(t).toScVal().toXDR()):y(e)?(0,n.baseEncode)((0,l.createAddressRlp)(s.Address.parse(t))):(0,n.baseEncode)((0,r.getBytes)(t))},A=(e,i)=>{if(e===p.Network.Near||e===p.Network.Solana)return i;if(m(e)){let t=f.GlobalSettings.cosmos[e];return a.bech32.encode(t.prefix,a.bech32.toWords(a.base58.decode(i)))}return e===p.Network.Stellar?o.Address.fromScVal(o.xdr.ScVal.fromXD
2R(t.Buffer.from((0,n.baseDecode)(i)))).toString():y(e)?(0,l.parseAddressRlp)(i):(0,r.hexlify)((0,n.baseDecode)(i))};class T{warn(...e){console.warn(...e)}log(...e){console.log(...e)}}let k=(e,t="0")=>{if(t=t.toString(),!e)return t;e=Number(e);let r=t.substring(0,t.length-e)||"0",n=t.substring(t.length-e).padStart(e,"0").substring(0,e);return`${r}.${n}`.replace(/\.?0+$/,"")},O=(e,t)=>{if(null==e)return t;e=Number(e);let[r,n=""]=t.includes("e")?Number(t).toFixed(24).split("."):t.split(".");return`${r}${n.padEnd(e,"0").slice(0,e)}`.replace(/^0+/,"").padStart(1,"0")},P=(...e)=>e.reduce((e,t)=>t>e?t:e),B=(...e)=>e.reduce((e,t)=>t<e?t:e),j=(e,t=2)=>{let r=Math.pow(10,t);return Math.floor(e*r)/r},I=(e,t,r)=>{let n=k(t,e?.toString()||"0");return r?j(n,r):+n},C=(e,t)=>O(t,(e||0).toString()),R=e=>new Promise(t=>setTimeout(t,e))}]);
3
4//# debugId=06d6d2b1-0bba-a424-3366-376a1ed02590
5//# sourceMappingURL=0rn~rl_6-3bq4.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.