"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[482],{"../node_modules/@solana/spl-token/lib/index.browser.esm.js":function(t,e,r){r.r(e),r.d(e,{ASSOCIATED_TOKEN_PROGRAM_ID:function(){return Yt},AccountLayout:function(){return ne},MintLayout:function(){return re},NATIVE_MINT:function(){return ee},TOKEN_PROGRAM_ID:function(){return Gt},Token:function(){return oe},u64:function(){return Xt}});for(var n=r("../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("../node_modules/bn.js/lib/bn.js"),o=r.n(i),s=r("../node_modules/@solana/web3.js/lib/index.browser.esm.js"),a={},u={byteLength:function(t){var e=d(t),r=e[0],n=e[1];return 3*(r+n)/4-n},toByteArray:function(t){var e,r,n=d(t),i=n[0],o=n[1],s=new l(function(t,e,r){return 3*(e+r)/4-r}(0,i,o)),a=0,u=o>0?i-4:i;for(r=0;r>16&255,s[a++]=e>>8&255,s[a++]=255&e;2===o&&(e=f[t.charCodeAt(r)]<<2|f[t.charCodeAt(r+1)]>>4,s[a++]=255&e);1===o&&(e=f[t.charCodeAt(r)]<<10|f[t.charCodeAt(r+1)]<<4|f[t.charCodeAt(r+2)]>>2,s[a++]=e>>8&255,s[a++]=255&e);return s},fromByteArray:function(t){for(var e,r=t.length,n=r%3,i=[],o=16383,s=0,a=r-n;sa?a:s+o));1===n?(e=t[r-1],i.push(c[e>>2]+c[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],i.push(c[e>>10]+c[e>>4&63]+c[e<<2&63]+"="));return i.join("")}},c=[],f=[],l="undefined"!==typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,y=p.length;h0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function g(t,e,r){for(var n,i,o=[],s=e;s>18&63]+c[i>>12&63]+c[i>>6&63]+c[63&i]);return o.join("")}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63;var b={read:function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,f=-7,l=r?i-1:0,p=r?-1:1,h=t[e+l];for(l+=p,o=h&(1<<-f)-1,h>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=p,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=p,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=c}return(h?-1:1)*s*Math.pow(2,o-n)},write:function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,y=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?p/u:p*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+h]=255&a,h+=y,a/=256,i-=8);for(s=s<0;t[r+h]=255&s,h+=y,s/=256,c-=8);t[r+h-y]|=128*d}};!function(t){const e=u,r=b,n="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},t.INSPECT_MAX_BYTES=50;const i=2147483647;function o(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,r){if("number"===typeof t){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return a(t,e,r)}function a(t,e,r){if("string"===typeof t)return function(t,e){"string"===typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|y(t,e);let n=o(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Z(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Z(t,ArrayBuffer)||t&&Z(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!==typeof SharedArrayBuffer&&(Z(t,SharedArrayBuffer)||t&&Z(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);const i=function(t){if(s.isBuffer(t)){const e=0|h(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!==typeof t.length||J(t.length)?o(0):l(t);if("Buffer"===t.type&&Array.isArray(t.data))return l(t.data)}(t);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!==typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return c(t),o(t<0?0:0|h(t))}function l(t){const e=t.length<0?0:0|h(t.length),r=o(e);for(let n=0;n=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function y(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Z(t,ArrayBuffer))return t.byteLength;if("string"!==typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(i)return n?-1:q(t).length;e=(""+e).toLowerCase(),i=!0}}function d(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){let o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function A(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function k(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128===(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128===(192&r)&&128===(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128===(192&r)&&128===(192&n)&&128===(192&a)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!s.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(e+=" ... "),""},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(t,e,r,n,i){if(Z(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const u=Math.min(o,a),c=this.slice(n,i),f=t.slice(e,r);for(let s=0;s>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return I(this,t,e,r);case"ascii":case"latin1":case"binary":return v(this,t,e,r);case"base64":return B(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function x(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let o=e;or)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function K(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function W(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function C(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function _(t,e,n,i,o){return e=+e,n>>>=0,o||C(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function M(t,e,n,i,o){return e=+e,n>>>=0,o||C(t,0,n,8),r.write(t,e,n,i,52,8),n+8}s.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=X((function(t){D(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=X((function(t){D(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||R(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){L(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!n){L(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=X((function(t,e=0){return K(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=X((function(t,e=0){return W(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=X((function(t,e=0){return K(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=X((function(t,e=0){return W(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,r){return _(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return _(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function z(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new N.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){D(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||$(e,t.length-(r+1))}(n,i,o)}function D(t,e){if("number"!==typeof t)throw new N.ERR_INVALID_ARG_TYPE(e,"number",t)}function $(t,e,r){if(Math.floor(t)!==t)throw D(t,r),new N.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=F(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function q(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function Y(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Z(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!==t}const H=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function X(t){return"undefined"===typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}}(a);var w="undefined"!==typeof r.g?r.g:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},m="function"===typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t};function E(t,e){var r={seen:[],stylize:v};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),k(e)?r.showHidden=e:e&&_(r,e),O(r.showHidden)&&(r.showHidden=!1),O(r.depth)&&(r.depth=2),O(r.colors)&&(r.colors=!1),O(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=I),B(r,t,r.depth)}function I(t,e){var r=E.styles[e];return r?"\x1b["+E.colors[r][0]+"m"+t+"\x1b["+E.colors[r][1]+"m":t}function v(t,e){return t}function B(t,e,r){if(t.customInspect&&e&&K(e.inspect)&&e.inspect!==E&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(r,t);return x(n)||(n=B(t,n,r)),n}var i=function(t,e){if(O(e))return t.stylize("undefined","undefined");if(x(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(n=e,"number"===typeof n)return t.stylize(""+e,"number");var n;if(k(e))return t.stylize(""+e,"boolean");if(T(e))return t.stylize("null","null")}(t,e);if(i)return i;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),L(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return S(e);if(0===o.length){if(K(e)){var a=e.name?": "+e.name:"";return t.stylize("[Function"+a+"]","special")}if(U(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(R(e))return t.stylize(Date.prototype.toString.call(e),"date");if(L(e))return S(e)}var u,c,f="",l=!1,p=["{","}"];(u=e,Array.isArray(u)&&(l=!0,p=["[","]"]),K(e))&&(f=" [Function"+(e.name?": "+e.name:"")+"]");return U(e)&&(f=" "+RegExp.prototype.toString.call(e)),R(e)&&(f=" "+Date.prototype.toUTCString.call(e)),L(e)&&(f=" "+S(e)),0!==o.length||l&&0!=e.length?r<0?U(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=l?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,f,p)):p[0]+f+p[1]}function S(t){return"["+Error.prototype.toString.call(t)+"]"}function A(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),M(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=T(r)?B(t,u.value,null):B(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),O(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function k(t){return"boolean"===typeof t}function T(t){return null===t}function x(t){return"string"===typeof t}function O(t){return void 0===t}function U(t){return P(t)&&"[object RegExp]"===C(t)}function P(t){return"object"===typeof t&&null!==t}function R(t){return P(t)&&"[object Date]"===C(t)}function L(t){return P(t)&&("[object Error]"===C(t)||t instanceof Error)}function K(t){return"function"===typeof t}function W(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t}function C(t){return Object.prototype.toString.call(t)}function _(t,e){if(!e||!P(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function N(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}}function H(t,e){return"string"===typeof t?t.length=0;a--)if(u[a]!==c[a])return!1;for(a=u.length-1;a>=0;a--)if(!et(t[s=u[a]],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function rt(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function nt(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(r){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function it(t,e,r,n){var i;if("function"!==typeof e)throw new TypeError('"block" argument must be a function');"string"===typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(r){e=r}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&Q(i,r,"Missing expected exception"+n);var o="string"===typeof n,s=!t&&i&&!r;if((!t&&L(i)&&o&&nt(i,r)||s)&&Q(i,r,"Got unwanted exception"+n),t&&i&&r&&!nt(i,r)||!t&&i)throw i}G.AssertionError=J,m(J,Error),G.fail=Q,G.ok=tt,G.equal=function t(e,r,n){e!=r&&Q(e,r,n,"==",t)},G.notEqual=function t(e,r,n){e==r&&Q(e,r,n,"!=",t)},G.deepEqual=function t(e,r,n){et(e,r,!1)||Q(e,r,n,"deepEqual",t)},G.deepStrictEqual=function t(e,r,n){et(e,r,!0)||Q(e,r,n,"deepStrictEqual",t)},G.notDeepEqual=function t(e,r,n){et(e,r,!1)&&Q(e,r,n,"notDeepEqual",t)},G.notDeepStrictEqual=function t(e,r,n){et(e,r,!0)&&Q(e,r,n,"notDeepStrictEqual",t)},G.strictEqual=function t(e,r,n){e!==r&&Q(e,r,n,"===",t)},G.notStrictEqual=function t(e,r,n){e===r&&Q(e,r,n,"!==",t)},G.throws=function(t,e,r){it(!0,t,e,r)},G.doesNotThrow=function(t,e,r){it(!1,t,e,r)},G.ifError=function(t){if(t)throw t};var ot={};class st{constructor(t,e){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=e}makeDestinationObject(){return{}}decode(t,e){throw new Error("Layout is abstract")}encode(t,e,r){throw new Error("Layout is abstract")}getSpan(t,e){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){const e=Object.create(this.constructor.prototype);return Object.assign(e,this),e.property=t,e}fromArray(t){}}function at(t,e){return e.property?t+"["+e.property+"]":t}ot.Layout=st,ot.nameWithProperty=at,ot.bindConstructorLayout=function(t,e){if("function"!==typeof t)throw new TypeError("Class must be constructor");if(t.hasOwnProperty("layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof st))throw new TypeError("layout must be a Layout");if(e.hasOwnProperty("boundConstructor_"))throw new Error("layout is already bound to a constructor");t.layout_=e,e.boundConstructor_=t,e.makeDestinationObject=()=>new t,Object.defineProperty(t.prototype,"encode",{value:function(t,r){return e.encode(this,t,r)},writable:!0}),Object.defineProperty(t,"decode",{value:function(t,r){return e.decode(t,r)},writable:!0})};class ut extends st{isCount(){throw new Error("ExternalLayout is abstract")}}class ct extends ut{constructor(t,e){if(void 0===t&&(t=1),!Number.isInteger(t)||0>=t)throw new TypeError("elementSpan must be a (positive) integer");super(-1,e),this.elementSpan=t}isCount(){return!0}decode(t,e){void 0===e&&(e=0);const r=t.length-e;return Math.floor(r/this.elementSpan)}encode(t,e,r){return 0}}class ft extends ut{constructor(t,e,r){if(!(t instanceof st))throw new TypeError("layout must be a Layout");if(void 0===e)e=0;else if(!Number.isInteger(e))throw new TypeError("offset must be integer or undefined");super(t.span,r||t.property),this.layout=t,this.offset=e}isCount(){return this.layout instanceof lt||this.layout instanceof pt}decode(t,e){return void 0===e&&(e=0),this.layout.decode(t,e+this.offset)}encode(t,e,r){return void 0===r&&(r=0),this.layout.encode(t,e,r+this.offset)}}class lt extends st{constructor(t,e){if(super(t,e),6t+n.encode(i,e,r+t)),0);return this.count instanceof ut&&this.count.encode(t.length,e,r),i}}class Tt extends st{constructor(t,e,r){if(!Array.isArray(t)||!t.reduce(((t,e)=>t&&e instanceof st),!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof e&&void 0===r&&(r=e,e=void 0);for(const o of t)if(0>o.span&&void 0===o.property)throw new Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce(((t,e)=>t+e.getSpan()),0)}catch(i){}super(n,e),this.fields=t,this.decodePrefixes=!!r}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let r=0;try{r=this.fields.reduce(((r,n)=>{const i=n.getSpan(t,e);return e+=i,r+i}),0)}catch(n){throw new RangeError("indeterminate span")}return r}decode(t,e){void 0===e&&(e=0);const r=this.makeDestinationObject();for(const n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(t,e)),e+=n.getSpan(t,e),this.decodePrefixes&&t.length===e)break;return r}encode(t,e,r){void 0===r&&(r=0);const n=r;let i=0,o=0;for(const s of this.fields){let n=s.span;if(o=0n&&(n=s.getSpan(e,r)))}i=r,r+=n}return i+o-n}fromArray(t){const e=this.makeDestinationObject();for(const r of this.fields)void 0!==r.property&&0r.span?e=-1:0<=e&&(e+=r.span)}}}class xt{constructor(t){this.property=t}decode(){throw new Error("UnionDiscriminator is abstract")}encode(){throw new Error("UnionDiscriminator is abstract")}}class Ot extends xt{constructor(t,e){if(!(t instanceof ut&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(e||t.property||"variant"),this.layout=t}decode(t,e){return this.layout.decode(t,e)}encode(t,e,r){return this.layout.encode(t,e,r)}}class Ut extends st{constructor(t,e,r){const n=t instanceof lt||t instanceof pt;if(n)t=new Ot(new ft(t));else if(t instanceof ut&&t.isCount())t=new Ot(t);else if(!(t instanceof xt))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===e&&(e=null),!(null===e||e instanceof st))throw new TypeError("defaultLayout must be null or a Layout");if(null!==e){if(0>e.span)throw new Error("defaultLayout must have constant span");void 0===e.property&&(e=e.replicate("content"))}let i=-1;e&&(i=e.span,0<=i&&n&&(i+=t.layout.span)),super(i,r),this.discriminator=t,this.usesPrefixDiscriminator=n,this.defaultLayout=e,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(t){return o(t)},this.configGetSourceVariant=function(t){o=t.bind(this)}}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);const r=this.getVariant(t,e);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(t,e)}defaultGetSourceVariant(t){if(t.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&t.hasOwnProperty(this.defaultLayout.property))return;const e=this.registry[t[this.discriminator.property]];if(e&&(!e.layout||t.hasOwnProperty(e.property)))return e}else for(const e in this.registry){const r=this.registry[e];if(t.hasOwnProperty(r.property))return r}throw new Error("unable to infer src variant")}decode(t,e){let r;void 0===e&&(e=0);const n=this.discriminator,i=n.decode(t,e);let o=this.registry[i];if(void 0===o){let s=0;o=this.defaultLayout,this.usesPrefixDiscriminator&&(s=n.layout.span),r=this.makeDestinationObject(),r[n.property]=i,r[o.property]=this.defaultLayout.decode(t,e+s)}else r=o.decode(t,e);return r}encode(t,e,r){void 0===r&&(r=0);const n=this.getSourceVariant(t);if(void 0===n){const n=this.discriminator,i=this.defaultLayout;let o=0;return this.usesPrefixDiscriminator&&(o=n.layout.span),n.encode(t[n.property],e,r),o+i.encode(t[i.property],e,r+o)}return n.encode(t,e,r)}addVariant(t,e,r){const n=new Pt(this,t,e,r);return this.registry[t]=n,n}getVariant(t,e){let r=t;return a.Buffer.isBuffer(t)&&(void 0===e&&(e=0),r=this.discriminator.decode(t,e)),this.registry[r]}}class Pt extends st{constructor(t,e,r,n){if(!(t instanceof Ut))throw new TypeError("union must be a Union");if(!Number.isInteger(e)||0>e)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof r&&void 0===n&&(n=r,r=null),r){if(!(r instanceof st))throw new TypeError("layout must be a Layout");if(null!==t.defaultLayout&&0<=r.span&&r.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof n)throw new TypeError("variant must have a String property")}let i=t.span;0>t.span&&(i=r?r.span:0,0<=i&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span)),super(i,n),this.union=t,this.variant=e,this.layout=r||null}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),r+this.layout.getSpan(t,e+r)}decode(t,e){const r=this.makeDestinationObject();if(void 0===e&&(e=0),this!==this.union.getVariant(t,e))throw new Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(t,e+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(t,e,r){void 0===r&&(r=0);let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!t.hasOwnProperty(this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,e,r);let i=n;if(this.layout&&(this.layout.encode(t[this.property],e,r+n),i+=this.layout.getSpan(e,r+n),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}}function Rt(t){return 0>t&&(t+=4294967296),t}class Lt extends st{constructor(t,e,r){if(!(t instanceof lt||t instanceof pt))throw new TypeError("word must be a UInt or UIntBE layout");if("string"===typeof e&&void 0===r&&(r=e,e=void 0),4=e)throw new TypeError("bits must be positive integer");const n=8*t.span,i=t.fields.reduce(((t,e)=>t+e.bits),0);if(e+i>n)throw new Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=e,this.valueMask=(1<>>this.start}encode(t){if(!Number.isInteger(t)||t!==Rt(t&this.valueMask))throw new TypeError(at("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const e=this.container._packedGetValue(),r=Rt(t<r&&(r=this.length.decode(t,e)),r}decode(t,e){void 0===e&&(e=0);let r=this.span;return 0>r&&(r=this.length.decode(t,e)),t.slice(e,e+r)}encode(t,e,r){let n=this.length;if(this.length instanceof ut&&(n=t.length),!a.Buffer.isBuffer(t)||n!==t.length)throw new TypeError(at("Blob.encode",this)+" requires (length "+n+") Buffer as src");if(r+n>e.length)throw new RangeError("encoding overruns Buffer");return e.write(t.toString("hex"),r,n,"hex"),this.length instanceof ut&&this.length.encode(n,e,r),n}}class _t extends st{constructor(t){super(-1,t)}getSpan(t,e){if(!a.Buffer.isBuffer(t))throw new TypeError("b must be a Buffer");void 0===e&&(e=0);let r=e;for(;re.length)throw new RangeError("encoding overruns Buffer");return n.copy(e,r),e[r+i]=0,i+1}}class Mt extends st{constructor(t,e){if("string"===typeof t&&void 0===e&&(e=t,t=void 0),void 0===t)t=-1;else if(!Number.isInteger(t))throw new TypeError("maxSpan must be an integer");super(-1,e),this.maxSpan=t}getSpan(t,e){if(!a.Buffer.isBuffer(t))throw new TypeError("b must be a Buffer");return void 0===e&&(e=0),t.length-e}decode(t,e,r){void 0===e&&(e=0);let n=this.getSpan(t,e);if(0<=this.maxSpan&&this.maxSpane.length)throw new RangeError("encoding overruns Buffer");return n.copy(e,r),i}}class Nt extends st{constructor(t,e){super(0,e),this.value=t}decode(t,e,r){return this.value}encode(t,e,r){return 0}}ot.ExternalLayout=ut,ot.GreedyCount=ct,ot.OffsetLayout=ft,ot.UInt=lt,ot.UIntBE=pt,ot.Int=ht,ot.IntBE=yt,ot.Float=vt,ot.FloatBE=Bt,ot.Double=St,ot.DoubleBE=At,ot.Sequence=kt,ot.Structure=Tt,ot.UnionDiscriminator=xt,ot.UnionLayoutDiscriminator=Ot,ot.Union=Ut,ot.VariantLayout=Pt,ot.BitStructure=Lt,ot.BitField=Kt,ot.Boolean=Wt,ot.Blob=Ct,ot.CString=_t,ot.UTF8=Mt,ot.Constant=Nt,ot.greedy=(t,e)=>new ct(t,e),ot.offset=(t,e,r)=>new ft(t,e,r);var jt=ot.u8=t=>new lt(1,t);ot.u16=t=>new lt(2,t),ot.u24=t=>new lt(3,t);var Ft=ot.u32=t=>new lt(4,t);ot.u40=t=>new lt(5,t),ot.u48=t=>new lt(6,t),ot.nu64=t=>new wt(t),ot.u16be=t=>new pt(2,t),ot.u24be=t=>new pt(3,t),ot.u32be=t=>new pt(4,t),ot.u40be=t=>new pt(5,t),ot.u48be=t=>new pt(6,t),ot.nu64be=t=>new mt(t),ot.s8=t=>new ht(1,t),ot.s16=t=>new ht(2,t),ot.s24=t=>new ht(3,t),ot.s32=t=>new ht(4,t),ot.s40=t=>new ht(5,t),ot.s48=t=>new ht(6,t),ot.ns64=t=>new Et(t),ot.s16be=t=>new yt(2,t),ot.s24be=t=>new yt(3,t),ot.s32be=t=>new yt(4,t),ot.s40be=t=>new yt(5,t),ot.s48be=t=>new yt(6,t),ot.ns64be=t=>new It(t),ot.f32=t=>new vt(t),ot.f32be=t=>new Bt(t),ot.f64=t=>new St(t),ot.f64be=t=>new At(t);var zt=ot.struct=(t,e,r)=>new Tt(t,e,r);ot.bits=(t,e,r)=>new Lt(t,e,r),ot.seq=(t,e,r)=>new kt(t,e,r),ot.union=(t,e,r)=>new Ut(t,e,r),ot.unionLayoutDiscriminator=(t,e)=>new Ot(t,e);var Dt=ot.blob=(t,e)=>new Ct(t,e);ot.cstr=t=>new _t(t),ot.utf8=(t,e)=>new Mt(t,e),ot.const=(t,e)=>new Nt(t,e);const $t=(t="publicKey")=>Dt(32,t),Vt=(t="uint64")=>Dt(8,t);function qt(t,e,r,...n){return(0,s.sendAndConfirmTransaction)(e,r,n,{skipPreflight:!1})}const Gt=new s.PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"),Yt=new s.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),Zt="Failed to find account",Jt="Invalid account owner";function Ht(t){return a.Buffer.from(t.toBuffer())}class Xt extends(o()){toBuffer(){const t=super.toArray().reverse(),e=a.Buffer.from(t);if(8===e.length)return e;G(e.length<8,"u64 too large");const r=a.Buffer.alloc(8);return e.copy(r),r}static fromBuffer(t){return G(8===t.length,`Invalid buffer length: ${t.length}`),new Xt([...t].reverse().map((t=>`00${t.toString(16)}`.slice(-2))).join(""),16)}}function Qt(t){return"publicKey"in t}const te={MintTokens:0,FreezeAccount:1,AccountOwner:2,CloseAccount:3},ee=new s.PublicKey("So11111111111111111111111111111111111111112"),re=zt([Ft("mintAuthorityOption"),$t("mintAuthority"),Vt("supply"),jt("decimals"),jt("isInitialized"),Ft("freezeAuthorityOption"),$t("freezeAuthority")]),ne=zt([$t("mint"),$t("owner"),Vt("amount"),Ft("delegateOption"),$t("delegate"),jt("state"),Ft("isNativeOption"),Vt("isNative"),Vt("delegatedAmount"),Ft("closeAuthorityOption"),$t("closeAuthority")]),ie=zt([jt("m"),jt("n"),jt("is_initialized"),$t("signer1"),$t("signer2"),$t("signer3"),$t("signer4"),$t("signer5"),$t("signer6"),$t("signer7"),$t("signer8"),$t("signer9"),$t("signer10"),$t("signer11")]);class oe{constructor(t,e,r,i){(0,n.Z)(this,"connection",void 0),(0,n.Z)(this,"publicKey",void 0),(0,n.Z)(this,"programId",void 0),(0,n.Z)(this,"associatedProgramId",void 0),(0,n.Z)(this,"payer",void 0),Object.assign(this,{connection:t,publicKey:e,programId:r,payer:i,associatedProgramId:Yt})}static async getMinBalanceRentForExemptMint(t){return await t.getMinimumBalanceForRentExemption(re.span)}static async getMinBalanceRentForExemptAccount(t){return await t.getMinimumBalanceForRentExemption(ne.span)}static async getMinBalanceRentForExemptMultisig(t){return await t.getMinimumBalanceForRentExemption(ie.span)}static async createMint(t,e,r,n,i,o){const a=s.Keypair.generate(),u=new oe(t,a.publicKey,o,e),c=await oe.getMinBalanceRentForExemptMint(t),f=new s.Transaction;return f.add(s.SystemProgram.createAccount({fromPubkey:e.publicKey,newAccountPubkey:a.publicKey,lamports:c,space:re.span,programId:o})),f.add(oe.createInitMintInstruction(o,a.publicKey,i,r,n)),await qt(0,t,f,e,a),u}async createAccount(t){const e=await oe.getMinBalanceRentForExemptAccount(this.connection),r=s.Keypair.generate(),n=new s.Transaction;n.add(s.SystemProgram.createAccount({fromPubkey:this.payer.publicKey,newAccountPubkey:r.publicKey,lamports:e,space:ne.span,programId:this.programId}));const i=this.publicKey;return n.add(oe.createInitAccountInstruction(this.programId,i,r.publicKey,t)),await qt(0,this.connection,n,this.payer,r),r.publicKey}async createAssociatedTokenAccount(t){const e=await oe.getAssociatedTokenAddress(this.associatedProgramId,this.programId,this.publicKey,t);return this.createAssociatedTokenAccountInternal(t,e)}async createAssociatedTokenAccountInternal(t,e){return await qt(0,this.connection,(new s.Transaction).add(oe.createAssociatedTokenAccountInstruction(this.associatedProgramId,this.programId,this.publicKey,e,t,this.payer.publicKey)),this.payer),e}async getOrCreateAssociatedAccountInfo(t){const e=await oe.getAssociatedTokenAddress(this.associatedProgramId,this.programId,this.publicKey,t);try{return await this.getAccountInfo(e)}catch(r){if(r.message===Zt||r.message===Jt){try{await this.createAssociatedTokenAccountInternal(t,e)}catch(r){}return await this.getAccountInfo(e)}throw r}}static async createWrappedNativeAccount(t,e,r,n,i){const o=await oe.getMinBalanceRentForExemptAccount(t),a=s.Keypair.generate(),u=new s.Transaction;return u.add(s.SystemProgram.createAccount({fromPubkey:n.publicKey,newAccountPubkey:a.publicKey,lamports:o,space:ne.span,programId:e})),u.add(s.SystemProgram.transfer({fromPubkey:n.publicKey,toPubkey:a.publicKey,lamports:i})),u.add(oe.createInitAccountInstruction(e,ee,a.publicKey,r)),await qt(0,t,u,n,a),a.publicKey}async createMultisig(t,e){const r=s.Keypair.generate(),n=await oe.getMinBalanceRentForExemptMultisig(this.connection),i=new s.Transaction;i.add(s.SystemProgram.createAccount({fromPubkey:this.payer.publicKey,newAccountPubkey:r.publicKey,lamports:n,space:ie.span,programId:this.programId}));let o=[{pubkey:r.publicKey,isSigner:!1,isWritable:!0},{pubkey:s.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];e.forEach((t=>o.push({pubkey:t,isSigner:!1,isWritable:!1})));const u=zt([jt("instruction"),jt("m")]),c=a.Buffer.alloc(u.span);return u.encode({instruction:2,m:t},c),i.add({keys:o,programId:this.programId,data:c}),await qt(0,this.connection,i,this.payer,r),r.publicKey}async getMintInfo(){const t=await this.connection.getAccountInfo(this.publicKey);if(null===t)throw new Error("Failed to find mint account");if(!t.owner.equals(this.programId))throw new Error(`Invalid mint owner: ${JSON.stringify(t.owner)}`);if(t.data.length!=re.span)throw new Error("Invalid mint size");const e=a.Buffer.from(t.data),r=re.decode(e);return 0===r.mintAuthorityOption?r.mintAuthority=null:r.mintAuthority=new s.PublicKey(r.mintAuthority),r.supply=Xt.fromBuffer(r.supply),r.isInitialized=0!=r.isInitialized,0===r.freezeAuthorityOption?r.freezeAuthority=null:r.freezeAuthority=new s.PublicKey(r.freezeAuthority),r}async getAccountInfo(t,e){const r=await this.connection.getAccountInfo(t,e);if(null===r)throw new Error(Zt);if(!r.owner.equals(this.programId))throw new Error(Jt);if(r.data.length!=ne.span)throw new Error("Invalid account size");const n=a.Buffer.from(r.data),i=ne.decode(n);if(i.address=t,i.mint=new s.PublicKey(i.mint),i.owner=new s.PublicKey(i.owner),i.amount=Xt.fromBuffer(i.amount),0===i.delegateOption?(i.delegate=null,i.delegatedAmount=new Xt):(i.delegate=new s.PublicKey(i.delegate),i.delegatedAmount=Xt.fromBuffer(i.delegatedAmount)),i.isInitialized=0!==i.state,i.isFrozen=2===i.state,1===i.isNativeOption?(i.rentExemptReserve=Xt.fromBuffer(i.isNative),i.isNative=!0):(i.rentExemptReserve=null,i.isNative=!1),0===i.closeAuthorityOption?i.closeAuthority=null:i.closeAuthority=new s.PublicKey(i.closeAuthority),!i.mint.equals(this.publicKey))throw new Error(`Invalid account mint: ${JSON.stringify(i.mint)} !== ${JSON.stringify(this.publicKey)}`);return i}async getMultisigInfo(t){const e=await this.connection.getAccountInfo(t);if(null===e)throw new Error("Failed to find multisig");if(!e.owner.equals(this.programId))throw new Error("Invalid multisig owner");if(e.data.length!=ie.span)throw new Error("Invalid multisig size");const r=a.Buffer.from(e.data),n=ie.decode(r);return n.signer1=new s.PublicKey(n.signer1),n.signer2=new s.PublicKey(n.signer2),n.signer3=new s.PublicKey(n.signer3),n.signer4=new s.PublicKey(n.signer4),n.signer5=new s.PublicKey(n.signer5),n.signer6=new s.PublicKey(n.signer6),n.signer7=new s.PublicKey(n.signer7),n.signer8=new s.PublicKey(n.signer8),n.signer9=new s.PublicKey(n.signer9),n.signer10=new s.PublicKey(n.signer10),n.signer11=new s.PublicKey(n.signer11),n}async transfer(t,e,r,n,i){let o,a;return Qt(r)?(o=r.publicKey,a=[r]):(o=r,a=n),await qt("Transfer",this.connection,(new s.Transaction).add(oe.createTransferInstruction(this.programId,t,e,o,n,i)),this.payer,...a)}async approve(t,e,r,n,i){let o,a;Qt(r)?(o=r.publicKey,a=[r]):(o=r,a=n),await qt("Approve",this.connection,(new s.Transaction).add(oe.createApproveInstruction(this.programId,t,e,o,n,i)),this.payer,...a)}async revoke(t,e,r){let n,i;Qt(e)?(n=e.publicKey,i=[e]):(n=e,i=r),await qt("Revoke",this.connection,(new s.Transaction).add(oe.createRevokeInstruction(this.programId,t,n,r)),this.payer,...i)}async setAuthority(t,e,r,n,i){let o,a;Qt(n)?(o=n.publicKey,a=[n]):(o=n,a=i),await qt("SetAuthority",this.connection,(new s.Transaction).add(oe.createSetAuthorityInstruction(this.programId,t,e,r,o,i)),this.payer,...a)}async mintTo(t,e,r,n){let i,o;Qt(e)?(i=e.publicKey,o=[e]):(i=e,o=r),await qt("MintTo",this.connection,(new s.Transaction).add(oe.createMintToInstruction(this.programId,this.publicKey,t,i,r,n)),this.payer,...o)}async burn(t,e,r,n){let i,o;Qt(e)?(i=e.publicKey,o=[e]):(i=e,o=r),await qt("Burn",this.connection,(new s.Transaction).add(oe.createBurnInstruction(this.programId,this.publicKey,t,i,r,n)),this.payer,...o)}async closeAccount(t,e,r,n){let i,o;Qt(r)?(i=r.publicKey,o=[r]):(i=r,o=n),await qt("CloseAccount",this.connection,(new s.Transaction).add(oe.createCloseAccountInstruction(this.programId,t,e,i,n)),this.payer,...o)}async freezeAccount(t,e,r){let n,i;Qt(e)?(n=e.publicKey,i=[e]):(n=e,i=r),await qt("FreezeAccount",this.connection,(new s.Transaction).add(oe.createFreezeAccountInstruction(this.programId,t,this.publicKey,n,r)),this.payer,...i)}async thawAccount(t,e,r){let n,i;Qt(e)?(n=e.publicKey,i=[e]):(n=e,i=r),await qt("ThawAccount",this.connection,(new s.Transaction).add(oe.createThawAccountInstruction(this.programId,t,this.publicKey,n,r)),this.payer,...i)}async transferChecked(t,e,r,n,i,o){let a,u;return Qt(r)?(a=r.publicKey,u=[r]):(a=r,u=n),await qt("TransferChecked",this.connection,(new s.Transaction).add(oe.createTransferCheckedInstruction(this.programId,t,this.publicKey,e,a,n,i,o)),this.payer,...u)}async approveChecked(t,e,r,n,i,o){let a,u;Qt(r)?(a=r.publicKey,u=[r]):(a=r,u=n),await qt("ApproveChecked",this.connection,(new s.Transaction).add(oe.createApproveCheckedInstruction(this.programId,t,this.publicKey,e,a,n,i,o)),this.payer,...u)}async mintToChecked(t,e,r,n,i){let o,a;Qt(e)?(o=e.publicKey,a=[e]):(o=e,a=r),await qt("MintToChecked",this.connection,(new s.Transaction).add(oe.createMintToCheckedInstruction(this.programId,this.publicKey,t,o,r,n,i)),this.payer,...a)}async burnChecked(t,e,r,n,i){let o,a;Qt(e)?(o=e.publicKey,a=[e]):(o=e,a=r),await qt("BurnChecked",this.connection,(new s.Transaction).add(oe.createBurnCheckedInstruction(this.programId,this.publicKey,t,o,r,n,i)),this.payer,...a)}async syncNative(t){await qt(0,this.connection,(new s.Transaction).add(oe.createSyncNativeInstruction(this.programId,t)),this.payer)}static createInitMintInstruction(t,e,r,n,i){let o=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:s.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];const u=zt([jt("instruction"),jt("decimals"),$t("mintAuthority"),jt("option"),$t("freezeAuthority")]);let c=a.Buffer.alloc(1024);{const t=u.encode({instruction:0,decimals:r,mintAuthority:Ht(n),option:null===i?0:1,freezeAuthority:Ht(i||new s.PublicKey(0))},c);c=c.slice(0,t)}return new s.TransactionInstruction({keys:o,programId:t,data:c})}static createInitAccountInstruction(t,e,r,n){const i=[{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:e,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:s.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}],o=zt([jt("instruction")]),u=a.Buffer.alloc(o.span);return o.encode({instruction:1},u),new s.TransactionInstruction({keys:i,programId:t,data:u})}static createTransferInstruction(t,e,r,n,i,o){const u=zt([jt("instruction"),Vt("amount")]),c=a.Buffer.alloc(u.span);u.encode({instruction:3,amount:new Xt(o).toBuffer()},c);let f=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0}];return 0===i.length?f.push({pubkey:n,isSigner:!0,isWritable:!1}):(f.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>f.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:f,programId:t,data:c})}static createApproveInstruction(t,e,r,n,i,o){const u=zt([jt("instruction"),Vt("amount")]),c=a.Buffer.alloc(u.span);u.encode({instruction:4,amount:new Xt(o).toBuffer()},c);let f=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1}];return 0===i.length?f.push({pubkey:n,isSigner:!0,isWritable:!1}):(f.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>f.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:f,programId:t,data:c})}static createRevokeInstruction(t,e,r,n){const i=zt([jt("instruction")]),o=a.Buffer.alloc(i.span);i.encode({instruction:5},o);let u=[{pubkey:e,isSigner:!1,isWritable:!0}];return 0===n.length?u.push({pubkey:r,isSigner:!0,isWritable:!1}):(u.push({pubkey:r,isSigner:!1,isWritable:!1}),n.forEach((t=>u.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:u,programId:t,data:o})}static createSetAuthorityInstruction(t,e,r,n,i,o){const u=zt([jt("instruction"),jt("authorityType"),jt("option"),$t("newAuthority")]);let c=a.Buffer.alloc(1024);{const t=u.encode({instruction:6,authorityType:te[n],option:null===r?0:1,newAuthority:Ht(r||new s.PublicKey(0))},c);c=c.slice(0,t)}let f=[{pubkey:e,isSigner:!1,isWritable:!0}];return 0===o.length?f.push({pubkey:i,isSigner:!0,isWritable:!1}):(f.push({pubkey:i,isSigner:!1,isWritable:!1}),o.forEach((t=>f.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:f,programId:t,data:c})}static createMintToInstruction(t,e,r,n,i,o){const u=zt([jt("instruction"),Vt("amount")]),c=a.Buffer.alloc(u.span);u.encode({instruction:7,amount:new Xt(o).toBuffer()},c);let f=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0}];return 0===i.length?f.push({pubkey:n,isSigner:!0,isWritable:!1}):(f.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>f.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:f,programId:t,data:c})}static createBurnInstruction(t,e,r,n,i,o){const u=zt([jt("instruction"),Vt("amount")]),c=a.Buffer.alloc(u.span);u.encode({instruction:8,amount:new Xt(o).toBuffer()},c);let f=[{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:e,isSigner:!1,isWritable:!0}];return 0===i.length?f.push({pubkey:n,isSigner:!0,isWritable:!1}):(f.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>f.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:f,programId:t,data:c})}static createCloseAccountInstruction(t,e,r,n,i){const o=zt([jt("instruction")]),u=a.Buffer.alloc(o.span);o.encode({instruction:9},u);let c=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0}];return 0===i.length?c.push({pubkey:n,isSigner:!0,isWritable:!1}):(c.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>c.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:c,programId:t,data:u})}static createFreezeAccountInstruction(t,e,r,n,i){const o=zt([jt("instruction")]),u=a.Buffer.alloc(o.span);o.encode({instruction:10},u);let c=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1}];return 0===i.length?c.push({pubkey:n,isSigner:!0,isWritable:!1}):(c.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>c.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:c,programId:t,data:u})}static createThawAccountInstruction(t,e,r,n,i){const o=zt([jt("instruction")]),u=a.Buffer.alloc(o.span);o.encode({instruction:11},u);let c=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1}];return 0===i.length?c.push({pubkey:n,isSigner:!0,isWritable:!1}):(c.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>c.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:c,programId:t,data:u})}static createTransferCheckedInstruction(t,e,r,n,i,o,u,c){const f=zt([jt("instruction"),Vt("amount"),jt("decimals")]),l=a.Buffer.alloc(f.span);f.encode({instruction:12,amount:new Xt(u).toBuffer(),decimals:c},l);let p=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!0}];return 0===o.length?p.push({pubkey:i,isSigner:!0,isWritable:!1}):(p.push({pubkey:i,isSigner:!1,isWritable:!1}),o.forEach((t=>p.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:p,programId:t,data:l})}static createApproveCheckedInstruction(t,e,r,n,i,o,u,c){const f=zt([jt("instruction"),Vt("amount"),jt("decimals")]),l=a.Buffer.alloc(f.span);f.encode({instruction:13,amount:new Xt(u).toBuffer(),decimals:c},l);let p=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!1,isWritable:!1}];return 0===o.length?p.push({pubkey:i,isSigner:!0,isWritable:!1}):(p.push({pubkey:i,isSigner:!1,isWritable:!1}),o.forEach((t=>p.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:p,programId:t,data:l})}static createMintToCheckedInstruction(t,e,r,n,i,o,u){const c=zt([jt("instruction"),Vt("amount"),jt("decimals")]),f=a.Buffer.alloc(c.span);c.encode({instruction:14,amount:new Xt(o).toBuffer(),decimals:u},f);let l=[{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0}];return 0===i.length?l.push({pubkey:n,isSigner:!0,isWritable:!1}):(l.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>l.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:l,programId:t,data:f})}static createBurnCheckedInstruction(t,e,r,n,i,o,u){const c=zt([jt("instruction"),Vt("amount"),jt("decimals")]),f=a.Buffer.alloc(c.span);c.encode({instruction:15,amount:new Xt(o).toBuffer(),decimals:u},f);let l=[{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:e,isSigner:!1,isWritable:!0}];return 0===i.length?l.push({pubkey:n,isSigner:!0,isWritable:!1}):(l.push({pubkey:n,isSigner:!1,isWritable:!1}),i.forEach((t=>l.push({pubkey:t.publicKey,isSigner:!0,isWritable:!1})))),new s.TransactionInstruction({keys:l,programId:t,data:f})}static createSyncNativeInstruction(t,e){const r=zt([jt("instruction")]),n=a.Buffer.alloc(r.span);r.encode({instruction:17},n);let i=[{pubkey:e,isSigner:!1,isWritable:!0}];return new s.TransactionInstruction({keys:i,programId:t,data:n})}static async getAssociatedTokenAddress(t,e,r,n,i=!1){if(!i&&!s.PublicKey.isOnCurve(n.toBuffer()))throw new Error(`Owner cannot sign: ${n.toString()}`);return(await s.PublicKey.findProgramAddress([n.toBuffer(),e.toBuffer(),r.toBuffer()],t))[0]}static createAssociatedTokenAccountInstruction(t,e,r,n,i,o){const u=a.Buffer.alloc(0);let c=[{pubkey:o,isSigner:!0,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:s.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:e,isSigner:!1,isWritable:!1},{pubkey:s.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return new s.TransactionInstruction({keys:c,programId:t,data:u})}}}}]);