1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[498],{60785:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0;let r=n(48764);function encode(e){return e.toString("base64")}function decode(e){return r.Buffer.from(e,"base64")}t.encode=encode,t.decode=decode},97348:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0;let o=r(n(77191));function encode(e){return o.default.encode(e)}function decode(e){return o.default.decode(e)}t.encode=encode,t.decode=decode},50299:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0;let r=n(48764);function encode(e){return e.reduce((e,t)=>e+t.toString(16).padStart(2,"0"),"0x")}function decode(e){0===e.indexOf("0x")&&(e=e.substr(2)),e.length%2==1&&(e="0"+e);let t=e.match(/.{2}/g);return null===t?r.Buffer.from([]):r.Buffer.from(t.map(e=>parseInt(e,16)))}t.encode=encode,t.decode=decode},26374:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.base64=t.bs58=t.utf8=t.hex=void 0,t.hex=i(n(50299)),t.utf8=i(n(28650)),t.bs58=i(n(97348)),t.base64=i(n(60785))},28650:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.encode=t.decode=void 0;let r=n(87070);function decode(e){let t=r.isBrowser?new TextDecoder("utf-8"):new(n(89539)).TextDecoder("utf-8");return t.decode(e)}function encode(e){let t=r.isBrowser?new TextEncoder:new(n(89539)).TextEncoder("utf-8");return t.encode(e)}t.decode=decode,t.encode=encode},87070:function(e,t,n){var r,o=n(34155);function chunks(e,t){return Array.apply(0,Array(Math.ceil(e.length/t))).map((n,r)=>e.slice(r*t,(r+1)*t))}Object.defineProperty(t,"__esModule",{value:!0}),t.isVersionedTransaction=t.chunks=t.isBrowser=void 0,t.isBrowser=o.env.ANCHOR_BROWSER||"undefined"!=typeof window&&!(null===(r=window.process)||void 0===r?void 0:r.hasOwnProperty("type")),t.chunks=chunks,t.isVersionedTransaction=e=>"version"in e},84037:function(e){let t=/[\p{Lu}]/u,n=/[\p{Ll}]/u,r=/^[\p{Lu}](?![\p{Lu}])/gu,o=/([\p{Alpha}\p{N}_]|$)/u,i=/[_.\- ]+/,s=RegExp("^"+i.source),u=RegExp(i.source+o.source,"gu"),a=RegExp("\\d+"+o.source,"gu"),preserveCamelCase=(e,r,o)=>{let i=!1,s=!1,u=!1;for(let a=0;a<e.length;a++){let c=e[a];i&&t.test(c)?(e=e.slice(0,a)+"-"+e.slice(a),i=!1,u=s,s=!0,a++):s&&u&&n.test(c)?(e=e.slice(0,a-1)+"-"+e.slice(a-1),u=s,s=!1,i=!0):(i=r(c)===c&&o(c)!==c,u=s,s=o(c)===c&&r(c)!==c)}return e},preserveConsecutiveUppercase=(e,t)=>(r.lastIndex=0,e.replace(r,e=>t(e))),postProcess=(e,t)=>(u.lastIndex=0,a.lastIndex=0,e.replace(u,(e,n)=>t(n)).replace(a,e=>
1t(e))),camelCase=(e,t)=>{if(!("string"==typeof e||Array.isArray(e)))throw TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";let n=!1===t.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),r=!1===t.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);if(1===e.length)return t.pascalCase?r(e):n(e);let o=e!==n(e);return o&&(e=preserveCamelCase(e,n,r)),e=e.replace(s,""),e=t.preserveConsecutiveUppercase?preserveConsecutiveUppercase(e,n):n(e),t.pascalCase&&(e=r(e.charAt(0))+e.slice(1)),postProcess(e,r)};e.exports=camelCase,e.exports.default=camelCase},15970:function(e,t,n){var r=n(48764).Buffer,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.map=t.array=t.rustEnum=t.str=t.vecU8=t.tagged=t.vec=t.bool=t.option=t.publicKey=t.i256=t.u256=t.i128=t.u128=t.i64=t.u64=t.struct=t.f64=t.f32=t.i32=t.u32=t.i16=t.u16=t.i8=t.u8=void 0;let i=n(20698),s=n(99161),u=o(n(13550));var a=n(20698);Object.defineProperty(t,"u8",{enumerable:!0,get:function(){return a.u8}}),Object.defineProperty(t,"i8",{enumerable:!0,get:function(){return a.s8}}),Object.defineProperty(t,"u16",{enumerable:!0,get:function(){return a.u16}}),Object.defineProperty(t,"i16",{enumerable:!0,get:function(){return a.s16}}),Object.defineProperty(t,"u32",{enumerable:!0,get:function(){return a.u32}}),Object.defineProperty(t,"i32",{enumerable:!0,get:function(){return a.s32}}),Object.defineProperty(t,"f32",{enumerable:!0,get:function(){return a.f32}}),Object.defineProperty(t,"f64",{enumerable:!0,get:function(){return a.f64}}),Object.defineProperty(t,"struct",{enumerable:!0,get:function(){return a.struct}});let BNLayout=class BNLayout extends i.Layout{constructor(e,t,n){super(e,n),this.blob=(0,i.blob)(e),this.signed=t}decode(e,t=0){let n=new u.default(this.blob.decode(e,t),10,"le");return this.signed?n.fromTwos(8*this.span).clone():n}encode(e,t,n=0){return this.signed&&(e=e.toTwos(8*this.span)),this.blob.encode(e.toArrayLike(r,"le",this.span),t,n)}};function u64(e){return new BNLayout(8,!1,e)}function i64(e){return new BNLayout(8,!0,e)}function u128(e){return new BNLayout(16,!1,e)}function i128(e){return new BNLayout(16,!0,e)}function u256(e){return new BNLayout(32,!1,e)}function i256(e){return new BNLayout(32,!0,e)}t.u64=u64,t.i64=i64,t.u128=u128,t.i128=i128,t.u256=u256,t.i256=i256;let WrappedLayout=class WrappedLayout extends i.Layout{constructor(e,t,n,r){super(e.span,r),this.layout=e,this.decoder=t,this.encoder=n}decode(e,t){return this.decoder(this.layout.decode(e,t))}encode(e,t,n){return this.layout.encode(this.encoder(e),t,n)}getSpan(e,t){return this.layout.getSpan(e,t)}};function publicKey(e){return new WrappedLayout((0,i.blob)(32),e=>new s.PublicKey(e),e=>e.toBuffer(),e)}t.publicKey=publicKey;let OptionLayout=class OptionLayout extends i.Layout{constructor(e,t){super(-1,t),this.layout=e,this.discriminator=(0,i.u8)()}encode(e,t,n=0){return null==e?this.discriminator.encode(0,t,n):(this.discriminator.encode(1,t,n),this.layout.encode(e,t,n+1)+1)}decode(e,t=0){let n=this.discriminator.decode(e,t);if(0===n)return null;if(1===n)return this.layout.decode(e,t+1);throw Error("Invalid option "+this.property)}getSpan(e,t=0){let n=this.discriminator.decode(e,t);if(0===n)return 1;if(1===n)return this.layout.getSpan(e,t+1)+1;throw Error("Invalid option "+this.property)}};function option(e,t){return new OptionLayout(e,t)}function bool(e){return new WrappedLayout((0,i.u8)(),decodeBool,encodeBool,e)}function decodeBool(e){if(0===e)return!1;if(1===e)return!0;throw Error("Invalid bool: "+e)}function encodeBool(e){return e?1:0}function vec(e,t){let n=(0,i.u32)("length"),r=(0,i.struct)([n,(0,i.seq)(e,(0,i.offset)(n,-n.span),"values")]);return new WrappedLayout(r,({values:e})=>e,e=>({values:e}),t)}function tagged(e,t,n){let r=(0,i.struct)([u64("tag"),t.replicate("data")]);return new WrappedLayout(r,function({tag:t,data:n}){if(!t.eq(e))throw Error("Invalid tag, expected: "+e.toString("hex")+", got: "+t.toString("hex"));return n},t=>({tag:e,data:t}),n)}function vecU8(e){let t=(0,i.u32)("length"),n=(0,i.struct)([t,(0,i.blob)((0,i.offset)(t,-t.span),"data")]);return new WrappedLayout(n,({data:e})=>e,e=>({data:e}),e)}function str(e){return new WrappedLayout(vecU8(),e=>e.toString("utf-8"),e=>r.from(e,"utf-8"),e)}function rustEnum(e,t,n){let r=(0,i.union)(null!=n?n:(0,i.u8)(),t);return e.forEach((e,t)=>r.addVariant(t,e,e.property)),r}function array(e,t,n){let r=(0,i.struct)([(0,i.seq)(e,t,"values")]);return new WrappedLayout(r,({values:e})=>e,e=>({values:e}),n)}t.option=option,t.bool=bool,t.vec=vec,t.tagged=tagged,t.vecU8=vecU8,t.str=str,t.rustEnum=rustEnum,t.array=array;let MapEntryLayout=class MapEntryLayout extends i.Layout{constructor(e,t,n){super(e.span+t.span,n),this.keyLayout=e,this.valueLayout=t}decode(e,t){t=t||0;let n=this.keyLayout.decode(e,t),r=this.valueLayout.decode(e,t+this.keyLayout.getSpan(e,t));return[n,r]}encode(e,t,n){n=n||0;let r=this.keyLayout.encode(e[0],t,n),o=this.valueLayout.encode(e[1],t,n+r);return r+o}getSpan(e,t){return this.keyLayout.getSpan(e,t)+this.valueLayout.getSpan(e,t)}};function map(e,t,n){let r=(0,i.u32)("length"),o=(0,i.struct)([r,(0,i.seq)(new MapEntryLayout(e,t),(0,i.offset)(r,-r.span),"values")]);return new WrappedLayout(o,({values:e})=>new Map(e),e=>({values:Array.from(e.entries())}),n)}t.map=map},20698:function(e,t,n){var r=n(48764).Buffer;/** 2 * Support for translating between Buffer instances and JavaScript
3 * native types. 4 * 5 * {@link module:Layout~Layout|Layout} is the basis of a class 6 * hierarchy that associates property names with sequences of encoded 7 * bytes. 8 * 9 * Layouts are supported for these scalar (numeric) types: 10 * * {@link module:Layout~UInt|Unsigned integers in little-endian 11 * format} with {@link module:Layout.u8|8-bit}, {@link 12 * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit}, 13 * {@link module:Layout.u32|32-bit}, {@link 14 * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit} 15 * representation ranges; 16 * * {@link module:Layout~UIntBE|Unsigned integers in big-endian 17 * format} with {@link module:Layout.u16be|16-bit}, {@link 18 * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit}, 19 * {@link module:Layout.u40be|40-bit}, and {@link 20 * module:Layout.u48be|48-bit} representation ranges; 21 * * {@link module:Layout~Int|Signed integers in little-endian 22 * format} with {@link module:Layout.s8|8-bit}, {@link 23 * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit}, 24 * {@link module:Layout.s32|32-bit}, {@link 25 * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit} 26 * representation ranges; 27 * * {@link module:Layout~IntBE|Signed integers in big-endian format} 28 * with {@link module:Layout.s16be|16-bit}, {@link 29 * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit}, 30 * {@link module:Layout.s40be|40-bit}, and {@link 31 * module:Layout.s48be|48-bit} representation ranges; 32 * * 64-bit integral values that decode to an exact (if magnitude is 33 * less than 2^53) or nearby integral Number in {@link 34 * module:Layout.nu64|unsigned little-endian}, {@link 35 * module:Layout.nu64be|unsigned big-endian}, {@link 36 * module:Layout.ns64|signed little-endian}, and {@link 37 * module:Layout.ns64be|unsigned big-endian} encodings; 38 * * 32-bit floating point values with {@link 39 * module:Layout.f32|little-endian} and {@link 40 * module:Layout.f32be|big-endian} representations; 41 * * 64-bit floating point values with {@link 42 * module:Layout.f64|little-endian} and {@link 43 * module:Layout.f64be|big-endian} representations; 44 * * {@link module:Layout.const|Constants} that take no space in the 45 * encoded expression. 46 * 47 * and for these aggregate types: 48 * * {@link module:Layout.seq|Sequence}s of instances of a {@link 49 * module:Layout~Layout|Layout}, with JavaScript representation as 50 * an Array and constant or data-dependent {@link 51 * module:Layout~Sequence#count|length}; 52 * * {@link module:Layout.struct|Structure}s that aggregate a 53 * heterogeneous sequence of {@link module:Layout~Layout|Layout} 54 * instances, with JavaScript representation as an Object; 55 * * {@link module:Layout.union|Union}s that support multiple {@link 56 * module:Layout~VariantLayout|variant layouts} over a fixed 57 * (padded) or variable (not padded) span of bytes, using an 58 * unsigned integer at the start of the data or a separate {@link 59 * module:Layout.unionLayoutDiscriminator|layout element} to 60 * determine which layout to use when interpreting the buffer 61 * contents; 62 * * {@link module:Layout.bits|BitStructure}s that contain a sequence 63 * of individual {@link 64 * module:Layout~BitStructure#addField|BitField}s packed into an 8, 65 * 16, 24, or 32-bit unsigned integer starting at the least- or 66 * most-significant bit; 67 * * {@link module:Layout.cstr|C strings} of varying length; 68 * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link 69 * module:Layout~Blob#length|length} raw data. 70 * 71 * All {@link module:Layout~Layout|Layout} instances are immutable 72 * after construction, to prevent internal state from becoming 73 * inconsistent. 74 * 75 * @local Layout 76 * @local ExternalLayout 77 * @local GreedyCount 78 * @local OffsetLayout 79 * @local UInt 80 * @local UIntBE 81 * @local Int 82 * @local IntBE 83 * @local NearUInt64 84 * @local NearUInt64BE 85 * @local NearInt64 86 * @local NearInt64BE 87 * @local Float 88 * @local FloatBE 89 * @local Double 90 * @local DoubleBE 91 * @local Sequence 92 * @local Structure 93 * @local UnionDiscriminator 94 * @local UnionLayoutDiscriminator 95 * @local Union 96 * @local VariantLayout 97 * @local BitStructure 98 * @local BitField 99 * @local Boolean 100 * @local Blob 101 * @local CString 102 * @local Constant 103 * @local bindConstructorLayout 104 * @module Layout 105 * @license MIT 106 * @author Peter A. Bigot
107 * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub} 108 */let Layout=class Layout{constructor(e,t){if(!Number.isInteger(e))throw TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}decode(e,t){throw Error("Layout is abstract")}encode(e,t,n){throw Error("Layout is abstract")}getSpan(e,t){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate(e){let t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}};function nameWithProperty(e,t){return t.property?e+"["+t.property+"]":e}function bindConstructorLayout(e,t){if("function"!=typeof e)throw TypeError("Class must be constructor");if(e.hasOwnProperty("layout_"))throw Error("Class is already bound to a layout");if(!(t&&t instanceof Layout))throw TypeError("layout must be a Layout");if(t.hasOwnProperty("boundConstructor_"))throw Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=()=>new e,Object.defineProperty(e.prototype,"encode",{value:function(e,n){return t.encode(this,e,n)},writable:!0}),Object.defineProperty(e,"decode",{value:function(e,n){return t.decode(e,n)},writable:!0})}t.Layout=Layout,t.nameWithProperty=nameWithProperty,t.bindConstructorLayout=bindConstructorLayout;let ExternalLayout=class ExternalLayout extends Layout{isCount(){throw Error("ExternalLayout is abstract")}};let GreedyCount=class GreedyCount extends ExternalLayout{constructor(e,t){if(void 0===e&&(e=1),!Number.isInteger(e)||0>=e)throw TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,t){void 0===t&&(t=0);let n=e.length-t;return Math.floor(n/this.elementSpan)}encode(e,t,n){return 0}};let OffsetLayout=class OffsetLayout extends ExternalLayout{constructor(e,t,n){if(!(e instanceof Layout))throw TypeError("layout must be a Layout");if(void 0===t)t=0;else if(!Number.isInteger(t))throw TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof UInt||this.layout instanceof UIntBE}decode(e,t){return void 0===t&&(t=0),this.layout.decode(e,t+this.offset)}encode(e,t,n){return void 0===n&&(n=0),this.layout.encode(e,t,n+this.offset)}};let UInt=class UInt extends Layout{constructor(e,t){if(super(e,t),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(e,t){return void 0===t&&(t=0),e.readUIntLE(t,this.span)}encode(e,t,n){return void 0===n&&(n=0),t.writeUIntLE(e,n,this.span),this.span}};let UIntBE=class UIntBE extends Layout{constructor(e,t){if(super(e,t),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(e,t){return void 0===t&&(t=0),e.readUIntBE(t,this.span)}encode(e,t,n){return void 0===n&&(n=0),t.writeUIntBE(e,n,this.span),this.span}};let Int=class Int extends Layout{constructor(e,t){if(super(e,t),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(e,t){return void 0===t&&(t=0),e.readIntLE(t,this.span)}encode(e,t,n){return void 0===n&&(n=0),t.writeIntLE(e,n,this.span),this.span}};let IntBE=class IntBE extends Layout{constructor(e,t){if(super(e,t),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(e,t){return void 0===t&&(t=0),e.readIntBE(t,this.span)}encode(e,t,n){return void 0===n&&(n=0),t.writeIntBE(e,n,this.span),this.span}};function divmodInt64(e){let t=Math.floor(e/4294967296);return{hi32:t,lo32:e-4294967296*t}}function roundedInt64(e,t){return 4294967296*e+t}let NearUInt64=class NearUInt64 extends Layout{constructor(e){super(8,e)}decode(e,t){void 0===t&&(t=0);let n=e.readUInt32LE(t),r=e.readUInt32LE(t+4);return roundedInt64(r,n)}encode(e,t,n){void 0===n&&(n=0);let r=divmodInt64(e);return t.writeUInt32LE(r.lo32,n),t.writeUInt32LE(r.hi32,n+4),8}};let NearUInt64BE=class NearUInt64BE extends Layout{constructor(e){super(8,e)}decode(e,t){void 0===t&&(t=0);let n=e.readUInt32BE(t),r=e.readUInt32BE(t+4);return roundedInt64(n,r)}encode(e,t,n){void 0===n&&(n=0);let r=divmodInt64(e);return t.writeUInt32BE(r.hi32,n),t.writeUInt32BE(r.lo32,n+4),8}};let NearInt64=class NearInt64 extends Layout{constructor(e){super(8,e)}decode(e,t){void 0===t&&(t=0);let n=e.readUInt32LE(t),r=e.readInt32LE(t+4);return roundedInt64(r,n)}encode(e,t,n){void 0===n&&(n=0);let r=divmodInt64(e);return t.writeUInt32LE(r.lo32,n),t.writeInt32LE(r.hi32,n+4),8}};let NearInt64BE=class NearInt64BE extends Layout{constructor(e){super(8,e)}decode(e,t){void 0===t&&(t=0);let n=e.readInt32BE(t),r=e.readUInt32BE(t+4);return roundedInt64(n,r)}encode(e,t,n){void 0===n&&(n=0);let r=divmodInt64(e);return t.writeInt32BE(r.hi32,n),t.writeUInt32BE(r.lo32,n+4),8}};let Float=class Float extends Layout{constructor(e){super(4,e)}decode(e,t){return void 0===t&&(t=0),e.readFloatLE(t)}encode(e,t,n){return void 0===n&&(n=0),t.writeFloatLE(e,n),4}};let FloatBE=class FloatBE extends Layout{constructor(e){super(4,e)}decode(e,t){return void 0===t&&(t=0),e.readFloatBE(t)}encode(e,t,n){return void 0===n&&(n=0),t.writeFloatBE(e,n),4}};let Double=class Double extends Layout{constructor(e){super(8,e)}decode(e,t){return void 0===t&&(t=0),e.readDoubleLE(t)}encode(e,t,n){return void 0===n&&(n=0),t.writeDoubleLE(e,n),8}};let DoubleBE=class DoubleBE extends Layout{constructor(e){super(8,e)}decode(e,t){return void 0===t&&(t=0),e.readDoubleBE(t)}encode(e,t,n){return void 0===n&&(n=0),t.writeDoubleBE(e,n),8}};let Sequence=class Sequence extends Layout{constructor(e,t,n){if(!(e instanceof Layout))throw TypeError("elementLayout must be a Layout");if(!(t instanceof ExternalLayout&&t.isCount()||Number.isInteger(t)&&0<=t))throw TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let r=-1;t instanceof ExternalLayout||!(0<e.span)||(r=t*e.span),super(r,n),this.elementLayout=e,this.count=t}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);let n=0,r=this.count;if(r instanceof ExternalLayout&&(r=r.decode(e,t)),0<this.elementLayout.span)n=r*this.elementLayout.span;else{let o=0;for(;o<r;)n+=this.elementLayout.getSpan(e,t+n),++o}return n}decode(e,t){void 0===t&&(t=0);let n=[],r=0,o=this.count;for(o instanceof ExternalLayout&&(o=o.decode(e,t));r<o;)n.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),r+=1;return n}encode(e,t,n){void 0===n&&(n=0);let r=this.elementLayout,o=e.reduce((e,o)=>e+r.encode(o,t,n+e),0);return this.count instanceof ExternalLayout&&this.count.encode(e.length,t,n),o}};let Structure=class Structure extends Layout{constructor(e,t,n){if(!(Array.isArray(e)&&e.reduce((e,t)=>
108e&&t instanceof Layout,!0)))throw TypeError("fields must be array of Layout instances");for(let r of("boolean"==typeof t&&void 0===n&&(n=t,t=void 0),e))if(0>r.span&&void 0===r.property)throw Error("fields cannot contain unnamed variable-length layout");let r=-1;try{r=e.reduce((e,t)=>e+t.getSpan(),0)}catch(e){}super(r,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);let n=0;try{n=this.fields.reduce((n,r)=>{let o=r.getSpan(e,t);return t+=o,n+o},0)}catch(e){throw RangeError("indeterminate span")}return n}decode(e,t){void 0===t&&(t=0);let n=this.makeDestinationObject();for(let r of this.fields)if(void 0!==r.property&&(n[r.property]=r.decode(e,t)),t+=r.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return n}encode(e,t,n){void 0===n&&(n=0);let r=n,o=0,i=0;for(let r of this.fields){let s=r.span;if(i=0<s?s:0,void 0!==r.property){let o=e[r.property];void 0!==o&&(i=r.encode(o,t,n),0>s&&(s=r.getSpan(t,n)))}o=n,n+=s}return o+i-r}fromArray(e){let t=this.makeDestinationObject();for(let n of this.fields)void 0!==n.property&&0<e.length&&(t[n.property]=e.shift());return t}layoutFor(e){if("string"!=typeof e)throw TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!=typeof e)throw TypeError("property must be string");let t=0;for(let n of this.fields){if(n.property===e)return t;0>n.span?t=-1:0<=t&&(t+=n.span)}}};let UnionDiscriminator=class UnionDiscriminator{constructor(e){this.property=e}decode(){throw Error("UnionDiscriminator is abstract")}encode(){throw Error("UnionDiscriminator is abstract")}};let UnionLayoutDiscriminator=class UnionLayoutDiscriminator extends UnionDiscriminator{constructor(e,t){if(!(e instanceof ExternalLayout&&e.isCount()))throw TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}};let Union=class Union extends Layout{constructor(e,t,n){let r=e instanceof UInt||e instanceof UIntBE;if(r)e=new UnionLayoutDiscriminator(new OffsetLayout(e));else if(e instanceof ExternalLayout&&e.isCount())e=new UnionLayoutDiscriminator(e);else if(!(e instanceof UnionDiscriminator))throw TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===t&&(t=null),!(null===t||t instanceof Layout))throw TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let o=-1;t&&0<=(o=t.span)&&r&&(o+=e.layout.span),super(o,n),this.discriminator=e,this.usesPrefixDiscriminator=r,this.defaultLayout=t,this.registry={};let i=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return i(e)},this.configGetSourceVariant=function(e){i=e.bind(this)}}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);let n=this.getVariant(e,t);if(!n)throw Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(e.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&e.hasOwnProperty(this.defaultLayout.property))return;let t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||e.hasOwnProperty(t.property)))return t}else for(let t in this.registry){let n=this.registry[t];if(e.hasOwnProperty(n.property))return n}throw Error("unable to infer src variant")}decode(e,t){let n;void 0===t&&(t=0);let r=this.discriminator,o=r.decode(e,t),i=this.registry[o];if(void 0===i){let s=0;i=this.defaultLayout,this.usesPrefixDiscriminator&&(s=r.layout.span),(n=this.makeDestinationObject())[r.property]=o,n[i.property]=this.defaultLayout.decode(e,t+s)}else n=i.decode(e,t);return n}encode(e,t,n){void 0===n&&(n=0);let r=this.getSourceVariant(e);if(void 0===r){let r=this.discriminator,o=this.defaultLayout,i=0;return this.usesPrefixDiscriminator&&(i=r.layout.span),r.encode(e[r.property],t,n),i+o.encode(e[o.property],t,n+i)}return r.encode(e,t,n)}addVariant(e,t,n){let r=new VariantLayout(this,e,t,n);return this.registry[e]=r,r}getVariant(e,t){let n=e;return r.isBuffer(e)&&(void 0===t&&(t=0),n=this.discriminator.decode(e,t)),this.registry[n]}};let VariantLayout=class VariantLayout extends Layout{constructor(e,t,n,r){if(!(e instanceof Union))throw TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw TypeError("variant must be a (non-negative) integer");
108if("string"==typeof n&&void 0===r&&(r=n,n=null),n){if(!(n instanceof Layout))throw TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw Error("variant span exceeds span of containing union");if("string"!=typeof r)throw TypeError("variant must have a String property")}let o=e.span;0>e.span&&0<=(o=n?n.span:0)&&e.usesPrefixDiscriminator&&(o+=e.discriminator.layout.span),super(o,r),this.union=e,this.variant=t,this.layout=n||null}getSpan(e,t){if(0<=this.span)return this.span;void 0===t&&(t=0);let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),n+this.layout.getSpan(e,t+n)}decode(e,t){let n=this.makeDestinationObject();if(void 0===t&&(t=0),this!==this.union.getVariant(e,t))throw Error("variant mismatch");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t,n){void 0===n&&(n=0);let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!e.hasOwnProperty(this.property))throw TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let o=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),o+=this.layout.getSpan(t,n+r),0<=this.union.span&&o>this.union.span))throw Error("encoded variant overruns containing union");return o}fromArray(e){if(this.layout)return this.layout.fromArray(e)}};function fixBitwiseResult(e){return 0>e&&(e+=4294967296),e}let BitStructure=class BitStructure extends Layout{constructor(e,t,n){if(!(e instanceof UInt||e instanceof UIntBE))throw TypeError("word must be a UInt or UIntBE layout");if("string"==typeof t&&void 0===n&&(n=t,t=void 0),4<e.span)throw RangeError("word cannot exceed 32 bits");super(e.span,n),this.word=e,this.msb=!!t,this.fields=[];let r=0;this._packedSetValue=function(e){return r=fixBitwiseResult(e),this},this._packedGetValue=function(){return r}}decode(e,t){let n=this.makeDestinationObject();void 0===t&&(t=0);let r=this.word.decode(e,t);for(let e of(this._packedSetValue(r),this.fields))void 0!==e.property&&(n[e.property]=e.decode(r));return n}encode(e,t,n){void 0===n&&(n=0);let r=this.word.decode(t,n);for(let t of(this._packedSetValue(r),this.fields))if(void 0!==t.property){let n=e[t.property];void 0!==n&&t.encode(n)}return this.word.encode(this._packedGetValue(),t,n)}addField(e,t){let n=new BitField(this,e,t);return this.fields.push(n),n}addBoolean(e){let t=new Boolean(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!=typeof e)throw TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}};let BitField=class BitField{constructor(e,t,n){if(!(e instanceof BitStructure))throw TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw TypeError("bits must be positive integer");let r=8*e.span,o=e.fields.reduce((e,t)=>e+t.bits,0);if(t+o>r)throw Error("bits too long for span remainder ("+(r-o)+" of "+r+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=o,this.container.msb&&(this.start=r-o-t),this.wordMask=fixBitwiseResult(this.valueMask<<this.start),this.property=n}decode(){let e=this.container._packedGetValue(),t=fixBitwiseResult(e&this.wordMask),n=t>>>this.start;return n}encode(e){if(!Number.isInteger(e)||e!==fixBitwiseResult(e&this.valueMask))throw TypeError(nameWithProperty("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let t=this.container._packedGetValue(),n=fixBitwiseResult(e<<this.start);this.container._packedSetValue(fixBitwiseResult(t&~this.wordMask)|n)}};let Boolean=class Boolean extends BitField{constructor(e,t){super(e,1,t)}decode(e,t){return!!BitField.prototype.decode.call(this,e,t)}encode(e){return"boolean"==typeof e&&(e=+e),BitField.prototype.encode.call(this,e)}};let Blob=class Blob extends Layout{constructor(e,t){if(!(e instanceof ExternalLayout&&e.isCount()||Number.isInteger(e)&&0<=e))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let n=-1;e instanceof ExternalLayout||(n=e),super(n,t),this.length=e}getSpan(e,t){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}decode(e,t){void 0===t&&(t=0);let n=this.span;return 0>n&&(n=this.length.decode(e,t)),e.slice(t,t+n)}encode(e,t,n){let o=this.length;if(this.length instanceof ExternalLayout&&(o=e.length),!(r.isBuffer(e)&&o===e.length))throw TypeError(nameWithProperty("Blob.encode",this)+" requires (length "+o+") Buffer as src");if(n+o>t.length)throw RangeError("encoding overruns Buffer");return t.write(e.toString("hex"),n,o,"hex"),this.length instanceof ExternalLayout&&this.length.encode(o,t,n),o}};let CString=class CString extends Layout{constructor(e){super(-1,e)}getSpan(e,t){if(!r.isBuffer(e))throw TypeError("b must be a Buffer");void 0===t&&(t=0);let n=t;for(;n<e.length&&0!==e[n];)n+=1;return 1+n-t}decode(e,t,n){void 0===t&&(t=0);let r=this.getSpan(e,t);return e.slice(t,t+r-1).toString("utf-8")}encode(e,t,n){void 0===n&&(n=0),"string"!=typeof e&&(e=e.toString());let o=new r(e,"utf8"),i=o.length;if(n+i>t.length)throw RangeError("encoding overruns Buffer");return o.copy(t,n),t[n+i]=0,i+1}};let UTF8=class UTF8 extends Layout{constructor(e,t){if("string"==typeof e&&void 0===t&&(t=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,t){if(!r.isBuffer(e))throw TypeError("b must be a Buffer");return void 0===t&&(t=0),e.length-t}decode(e,t,n){void 0===t&&(t=0);let r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw RangeError("text length exceeds maxSpan");return e.slice(t,t+r).toString("utf-8")}encode(e,t,n){void 0===n&&(n=0),"string"!=typeof e&&(e=e.toString());let o=new r(e,"utf8"),i=o.length;if(0<=this.maxSpan&&this.maxSpan<i)throw RangeError("text length exceeds maxSpan");if(n+i>t.length)throw RangeError("encoding overruns Buffer");return o.copy(t,n),i}};let Constant=class Constant extends Layout{constructor(e,t){super(0,t),this.value=e}decode(e,t,n){return this.value}encode(e,t,n){return 0}};t.ExternalLayout=ExternalLayout,t.GreedyCount=GreedyCount,t.OffsetLayout=OffsetLayout,t.UInt=UInt,t.UIntBE=UIntBE,t.Int=Int,t.IntBE=IntBE,t.Float=Float,t.FloatBE=FloatBE,t.Double=Double,t.DoubleBE=DoubleBE,t.Sequence=Sequence,t.Structure=Structure,t.UnionDiscriminator=UnionDiscriminator,t.UnionLayoutDiscriminator=UnionLayoutDiscriminator,t.Union=Union,t.VariantLayout=VariantLayout,t.BitStructure=BitStructure,t.BitField=BitField,t.Boolean=Boolean,t.Blob=Blob,t.CString=CString,t.UTF8=UTF8,t.Constant=Constant,t.greedy=(e,t)=>new GreedyCount(e,t),t.offset=(e,t,n)=>new OffsetLayout(e,t,n),t.u8=e=>new UInt(1,e),t.u16=e=>new UInt(2,e),t.u24=e=>new UInt(3,e),t.u32=e=>new UInt(4,e),t.u40=e=>new UInt(5,e),t.u48=e=>new UInt(6,e),t.nu64=e=>new NearUInt64(e),t.u16be=e=>new UIntBE(2,e),t.u24be=e=>new UIntBE(3,e),t.u32be=e=>new UIntBE(4,e),t.u40be=e=>new UIntBE(5,e),t.u48be=e=>new UIntBE(6,e),t.nu64be=e=>new NearUInt64BE(e),t.s8=e=>new Int(1,e),t.s16=e=>
108new Int(2,e),t.s24=e=>new Int(3,e),t.s32=e=>new Int(4,e),t.s40=e=>new Int(5,e),t.s48=e=>new Int(6,e),t.ns64=e=>new NearInt64(e),t.s16be=e=>new IntBE(2,e),t.s24be=e=>new IntBE(3,e),t.s32be=e=>new IntBE(4,e),t.s40be=e=>new IntBE(5,e),t.s48be=e=>new IntBE(6,e),t.ns64be=e=>new NearInt64BE(e),t.f32=e=>new Float(e),t.f32be=e=>new FloatBE(e),t.f64=e=>new Double(e),t.f64be=e=>new DoubleBE(e),t.struct=(e,t,n)=>new Structure(e,t,n),t.bits=(e,t,n)=>new BitStructure(e,t,n),t.seq=(e,t,n)=>new Sequence(e,t,n),t.union=(e,t,n)=>new Union(e,t,n),t.unionLayoutDiscriminator=(e,t)=>new UnionLayoutDiscriminator(e,t),t.blob=(e,t)=>new Blob(e,t),t.cstr=e=>new CString(e),t.utf8=(e,t)=>new UTF8(e,t),t.const=(e,t)=>new Constant(e,t)},15702:function(e,t,n){function isBytes(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function bytes(e,...t){if(!isBytes(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function exists(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 output(e,t){bytes(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least ${n}`)}n.d(t,{JQ:function(){return s}});let createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),rotr=(e,t)=>e<<32-t|e>>>t;function utf8ToBytes(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function toBytes(e){return"string"==typeof e&&(e=utf8ToBytes(e)),bytes(e),e}new Uint8Array(new Uint32Array([287454020]).buffer)[0];let Hash=class Hash{clone(){return this._cloneInto()}};function utils_wrapConstructor(e){let hashC=t=>e().update(toBytes(t)).digest(),t=e();return hashC.outputLen=t.outputLen,hashC.blockLen=t.blockLen,hashC.create=()=>e(),hashC}function setBigUint64(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);let o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),u=Number(n&i),a=r?4:0,c=r?0:4;e.setUint32(t+a,s,r),e.setUint32(t+c,u,r)}let Chi=(e,t,n)=>e&t^~e&n,Maj=(e,t,n)=>e&t^e&n^t&n;let HashMD=class HashMD extends Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=createView(this.buffer)}update(e){exists(this);let{view:t,buffer:n,blockLen:r}=this;e=toBytes(e);let o=e.length;for(let i=0;i<o;){let s=Math.min(r-this.pos,o-i);if(s===r){let t=createView(e);for(;r<=o-i;i+=r)this.process(t,i);continue}n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){exists(this),output(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:o}=this,{pos:i}=this;t[i++]=128,this.buffer.subarray(i).fill(0),this.padOffset>r-i&&(this.process(n,0),i=0);for(let e=i;e<r;e++)t[e]=0;setBigUint64(n,r-8,BigInt(8*this.length),o),this.process(n,0);let s=createView(e),u=this.outputLen;if(u%4)throw Error("_sha2: outputLen should be aligned to 32bit");let a=u/4,c=this.get();if(a>c.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<a;e++)s.setUint32(4*e,c[e],o)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:o,destroyed:i,pos:s}=this;return e.length=r,e.pos=s,e.finished=o,e.destroyed=i,r%t&&e.buffer.set(n),e}};let r=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
108734187,3204031479,3329325298]),o=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64);let SHA256=class SHA256 extends HashMD{constructor(){super(64,32,8,!1),this.A=0|o[0],this.B=0|o[1],this.C=0|o[2],this.D=0|o[3],this.E=0|o[4],this.F=0|o[5],this.G=0|o[6],this.H=0|o[7]}get(){let{A:e,B:t,C:n,D:r,E:o,F:i,G:s,H:u}=this;return[e,t,n,r,o,i,s,u]}set(e,t,n,r,o,i,s,u){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|u}process(e,t){for(let n=0;n<16;n++,t+=4)i[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=i[e-15],n=i[e-2],r=rotr(t,7)^rotr(t,18)^t>>>3,o=rotr(n,17)^rotr(n,19)^n>>>10;i[e]=o+i[e-7]+r+i[e-16]|0}let{A:n,B:o,C:s,D:u,E:a,F:c,G:d,H:l}=this;for(let e=0;e<64;e++){let t=rotr(a,6)^rotr(a,11)^rotr(a,25),f=l+t+Chi(a,c,d)+r[e]+i[e]|0,h=rotr(n,2)^rotr(n,13)^rotr(n,22),p=h+Maj(n,o,s)|0;l=d,d=c,c=a,a=u+f|0,u=s,s=o,o=n,n=f+p|0}n=n+this.A|0,o=o+this.B|0,s=s+this.C|0,u=u+this.D|0,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,l=l+this.H|0,this.set(n,o,s,u,a,c,d,l)}roundClean(){i.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};let s=utils_wrapConstructor(()=>new SHA256)},1871:function(e,t,n){n.d(t,{Xg:function(){return bool},ZL:function(){return publicKey},AW:function(){return s}});var r=n(39386),o=n(40475);let base_encodeDecode=e=>{let t=e.decode.bind(e),n=e.encode.bind(e);return{decode:t,encode:n}};var i=n(48764).Buffer;let bigInt=e=>t=>{let n=(0,r.Ik)(e,t),{encode:s,decode:u}=base_encodeDecode(n);return n.decode=(e,t)=>{let n=u(e,t);return(0,o.oU)(i.from(n))},n.encode=(t,n,r)=>{let i=(0,o.k$)(t,e);return s(i,n,r)},n},bigIntBE=e=>t=>{let n=(0,r.Ik)(e,t),{encode:s,decode:u}=base_encodeDecode(n);return n.decode=(e,t)=>{let n=u(e,t);return(0,o.Q5)(i.from(n))},n.encode=(t,n,r)=>{let i=(0,o.zP)(t,e);return s(i,n,r)},n},s=bigInt(8);bigIntBE(8),bigInt(16),bigIntBE(16),bigInt(24),bigIntBE(24),bigInt(32),bigIntBE(32),new(n(70794)).Z("1e+18");let bool=e=>{let t=(0,r.u8)(e),{encode:n,decode:o}=base_encodeDecode(t);return t.decode=(e,t)=>{let n=o(e,t);return!!n},t.encode=(e,t,r)=>{let o=Number(e);return n(o,t,r)},t};var u=n(99161);let publicKey=e=>{let t=(0,r.Ik)(32,e),{encode:n,decode:o}=base_encodeDecode(t);return t.decode=(e,t)=>{let n=o(e,t);return new u.PublicKey(n)},t.encode=(e,t,r)=>{let o=e.toBuffer();return n(o,t,r)},t}},58467:function(e,t,n){n.d(t,{H_:function(){return o},_u:function(){return i}});var r=n(99161);let o=new r.PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");new r.PublicKey("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");let i=new r.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");new r.PublicKey("So11111111111111111111111111111111111111112"),new r.PublicKey("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP")},21236:function(e,t,n){n.d(t,{$O:function(){return TokenInvalidAccountSizeError},Gl:function(){return TokenOwnerOffCurveError},Or:function(){return TokenInvalidAccountOwnerError},We:function(){return TokenAccountNotFoundError},iK:function(){return TokenInvalidAccountError}});let TokenError=class TokenError extends Error{constructor(e){super(e)}};let TokenAccountNotFoundError=class TokenAccountNotFoundError extends TokenError{constructor(){super(...arguments),this.name="TokenAccountNotFoundError"}};let TokenInvalidAccountError=class TokenInvalidAccountError extends TokenError{constructor(){super(...arguments),this.name="TokenInvalidAccountError"}};let TokenInvalidAccountOwnerError=class TokenInvalidAccountOwnerError extends TokenError{constructor(){super(...arguments),this.name="TokenInvalidAccountOwnerError"}};let TokenInvalidAccountSizeError=class TokenInvalidAccountSizeError extends TokenError{constructor(){super(...arguments),this.name="TokenInvalidAccountSizeError"}};let TokenOwnerOffCurveError=class TokenOwnerOffCurveError extends TokenError{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}},77043:function(e,t,n){n.d(t,{Ek:function(){return createAssociatedTokenAccountInstruction}});var r=n(99161),o=n(58467),i=n(48764).Buffer;function createAssociatedTokenAccountInstruction(e,t,n,r,s=o.H_,u=o._u){return buildAssociatedTokenAccountInstruction(e,t,n,r,i.alloc(0),s,u)}function buildAssociatedTokenAccountInstruction(e,t,n,i,s,u=o.H_,a=o._u){let c=[{pubkey:e,isSigner:!0,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!1},{pubkey:r.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:u,isSigner:!1,isWritable:!1}];return new r.TransactionInstruction({keys:c,programId:a,data:s})}},39796:function(e,t,n){n.d(t,{T7:function(){return createBurnInstruction}});var r,o,i=n(39386),s=n(1871),u=n(99161),a=n(58467);function addSigners(e,t,n){if(n.length)for(let r of(e.push({pubkey:t,isSigner:!1,isWritable:!1}),n))e.push({pubkey:r instanceof u.PublicKey?r:r.publicKey,isSigner:!0,isWritable:!1});else e.push({pubkey:t,isSigner:!0,isWritable:!1});return e}(r=o||(o={}))[r.InitializeMint=0]="InitializeMint",r[r.InitializeAccount=1]="InitializeAccount",r[r.InitializeMultisig=2]="InitializeMultisig",r[r.Transfer=3]="Transfer",r[r.Approve=4]="Approve",r[r.Revoke=5]="Revoke",r[r.SetAuthority=6]="SetAuthority",r[r.MintTo=7]="MintTo",r[r.Burn=8]="Burn",r[r.CloseAccount=9]="CloseAccount",r[r.FreezeAccount=10]="FreezeAccount",r[r.ThawAccount=11]="ThawAccount",r[r.TransferChecked=12]="TransferChecked",r[r.ApproveChecked=13]="ApproveChecked",r[r.MintToChecked=14]="MintToChecked",r[r.BurnChecked=15]="BurnChecked",r[r.InitializeAccount2=16]="InitializeAccount2",r[r.SyncNative=17]="SyncNative",r[r.InitializeAccount3=18]="InitializeAccount3",r[r.InitializeMultisig2=19]="InitializeMultisig2",r[r.InitializeMint2=20]="InitializeMint2",r[r.GetAccountDataSize=21]="GetAccountDataSize",r[r.InitializeImmutableOwner=22]="InitializeImmutableOwner",r[r.AmountToUiAmount=23]="Amou
108ntToUiAmount",r[r.UiAmountToAmount=24]="UiAmountToAmount",r[r.InitializeMintCloseAuthority=25]="InitializeMintCloseAuthority",r[r.TransferFeeExtension=26]="TransferFeeExtension",r[r.ConfidentialTransferExtension=27]="ConfidentialTransferExtension",r[r.DefaultAccountStateExtension=28]="DefaultAccountStateExtension",r[r.Reallocate=29]="Reallocate",r[r.MemoTransferExtension=30]="MemoTransferExtension",r[r.CreateNativeMint=31]="CreateNativeMint",r[r.InitializeNonTransferableMint=32]="InitializeNonTransferableMint",r[r.InterestBearingMintExtension=33]="InterestBearingMintExtension",r[r.CpiGuardExtension=34]="CpiGuardExtension",r[r.InitializePermanentDelegate=35]="InitializePermanentDelegate",r[r.TransferHookExtension=36]="TransferHookExtension",r[r.MetadataPointerExtension=39]="MetadataPointerExtension",r[r.GroupPointerExtension=40]="GroupPointerExtension",r[r.GroupMemberPointerExtension=41]="GroupMemberPointerExtension";var c=n(48764).Buffer;let d=(0,i.n_)([(0,i.u8)("instruction"),(0,s.AW)("amount")]);function createBurnInstruction(e,t,n,r,i=[],s=a.H_){let l=addSigners([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0}],n,i),f=c.alloc(d.span);return d.encode({instruction:o.Burn,amount:BigInt(r)},f),new u.TransactionInstruction({keys:l,programId:s,data:f})}},87435:function(e,t,n){n.d(t,{D0:function(){return getAccount}});var r,o,i,s,u=n(39386),a=n(1871),c=n(58467),d=n(21236);(r=i||(i={}))[r.Uninitialized=0]="Uninitialized",r[r.Mint=1]="Mint",r[r.Account=2]="Account";let l=(0,u.n_)([(0,u.u8)("m"),(0,u.u8)("n"),(0,a.Xg)("isInitialized"),(0,a.ZL)("signer1"),(0,a.ZL)("signer2"),(0,a.ZL)("signer3"),(0,a.ZL)("signer4"),(0,a.ZL)("signer5"),(0,a.ZL)("signer6"),(0,a.ZL)("signer7"),(0,a.ZL)("signer8"),(0,a.ZL)("signer9"),(0,a.ZL)("signer10"),(0,a.ZL)("signer11")]),f=l.span;var h=n(48764).Buffer;(o=s||(s={}))[o.Uninitialized=0]="Uninitialized",o[o.Initialized=1]="Initialized",o[o.Frozen=2]="Frozen";let p=(0,u.n_)([(0,a.ZL)("mint"),(0,a.ZL)("owner"),(0,a.AW)("amount"),(0,u.Jq)("delegateOption"),(0,a.ZL)("delegate"),(0,u.u8)("state"),(0,u.Jq)("isNativeOption"),(0,a.AW)("isNative"),(0,a.AW)("delegatedAmount"),(0,u.Jq)("closeAuthorityOption"),(0,a.ZL)("closeAuthority")]),y=p.span;async function getAccount(e,t,n,r=c.H_){let o=await e.getAccountInfo(t,n);return unpackAccount(t,o,r)}function unpackAccount(e,t,n=c.H_){if(!t)throw new d.We;if(!t.owner.equals(n))throw new d.Or;if(t.data.length<y)throw new d.$O;let r=p.decode(t.data.slice(0,y)),o=h.alloc(0);if(t.data.length>y){if(t.data.length===f)throw new d.$O;if(t.data[y]!=i.Account)throw new d.iK;o=t.data.slice(y+1)}return{address:e,mint:r.mint,owner:r.owner,amount:r.amount,delegate:r.delegateOption?r.delegate:null,delegatedAmount:r.delegatedAmount,isInitialized:r.state!==s.Uninitialized,isFrozen:r.state===s.Frozen,isNative:!!r.isNativeOption,rentExemptReserve:r.isNativeOption?r.isNative:null,closeAuthority:r.closeAuthorityOption?r.closeAuthority:null,tlvData:o}}},44777:function(e,t,n){n.d(t,{Am:function(){return getAssociatedTokenAddress}});var r=n(39386),o=n(1871),i=n(99161),s=n(58467),u=n(21236);n(48764).Buffer;let a=(0,r.n_)([(0,r.Jq)("mintAuthorityOption"),(0,o.ZL)("mintAuthority"),(0,o.AW)("supply"),(0,r.u8)("decimals"),(0,o.Xg)("isInitialized"),(0,r.Jq)("freezeAuthorityOption"),(0,o.ZL)("freezeAuthority")]);async function getAssociatedTokenAddress(e,t,n=!1,r=s.H_,o=s._u){if(!n&&!i.PublicKey.isOnCurve(t.toBuffer()))throw new u.Gl;let[a]=await i.PublicKey.findProgramAddress([t.toBuffer(),r.toBuffer(),e.toBuffer()],o);return a}a.span}}]);
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.