Files
Administrator a0720d80dc fefdwef
2025-11-12 12:54:37 +08:00

5 lines
741 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

LavaPack.loadBundle([[2313,{"./assert.cjs":2311,"./hex.cjs":2320,"@scure/base":3027,buffer:4074},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.createDataView=n.concatBytes=n.valueToBytes=n.base64ToBytes=n.stringToBytes=n.numberToBytes=n.signedBigIntToBytes=n.bigIntToBytes=n.hexToBytes=n.bytesToBase64=n.bytesToString=n.bytesToNumber=n.bytesToSignedBigInt=n.bytesToBigInt=n.bytesToHex=n.assertIsBytes=n.isBytes=void 0;const s=e("@scure/base"),r=e("./assert.cjs"),i=e("./hex.cjs"),a=48,o=58,c=87;const u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function l(e){return e instanceof Uint8Array}function d(e){(0,r.assert)(l(e),"Value must be a Uint8Array.")}function m(e){if(d(e),0===e.length)return"0x";const t=u(),n=new Array(e.length);for(let s=0;s<e.length;s++)n[s]=t[e[s]];return(0,i.add0x)(n.join(""))}function p(e){d(e);const t=m(e);return BigInt(t)}function h(e){if("0x"===e?.toLowerCase?.())return new Uint8Array;(0,i.assertIsHexString)(e);const t=(0,i.remove0x)(e).toLowerCase(),n=t.length%2==0?t:`0${t}`,s=new Uint8Array(n.length/2);for(let e=0;e<s.length;e++){const t=n.charCodeAt(2*e),r=n.charCodeAt(2*e+1),i=t-(t<o?a:c),u=r-(r<o?a:c);s[e]=16*i+u}return s}function f(e){(0,r.assert)("bigint"==typeof e,"Value must be a bigint."),(0,r.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function g(e){(0,r.assert)("number"==typeof e,"Value must be a number."),(0,r.assert)(e>=0,"Value must be a non-negative number."),(0,r.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function y(e){return(0,r.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return f(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?h(e):y(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}n.isBytes=l,n.assertIsBytes=d,n.bytesToHex=m,n.bytesToBigInt=p,n.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const n of e)t=(t<<BigInt(8))+BigInt(n);return BigInt.asIntN(8*e.length,t)},n.bytesToNumber=function(e){d(e);const t=p(e);return(0,r.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},n.bytesToString=function(e){return d(e),(new TextDecoder).decode(e)},n.bytesToBase64=function(e){return d(e),s.base64.encode(e)},n.hexToBytes=h,n.bigIntToBytes=f,n.signedBigIntToBytes=function(e,t){(0,r.assert)("bigint"==typeof e,"Value must be a bigint."),(0,r.assert)("number"==typeof t,"Byte length must be a number."),(0,r.assert)(t>0,"Byte length must be greater than 0."),(0,r.assert)(function(e,t){(0,r.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const s=new Uint8Array(t);for(let e=0;e<s.length;e++)s[e]=Number(BigInt.asUintN(8,n)),n>>=BigInt(8);return s.reverse()},n.numberToBytes=g,n.stringToBytes=y,n.base64ToBytes=function(e){return(0,r.assert)("string"==typeof e,"Value must be a string."),s.base64.decode(e)},n.valueToBytes=b,n.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let s=0;s<e.length;s++){const r=b(e[s]);t[s]=r,n+=r.length}const s=new Uint8Array(n);for(let e=0,n=0;e<t.length;e++)s.set(t[e],n),n+=t[e].length;return s},n.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/bytes.cjs"}],[2314,{"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.toCaipChainId=n.parseCaipAccountId=n.parseCaipChainId=n.isCaipAssetId=n.isCaipAssetType=n.isCaipAccountAddress=n.isCaipAccountId=n.isCaipReference=n.isCaipNamespace=n.isCaipChainId=n.KnownCaipNamespace=n.CaipAssetIdStruct=n.CaipAssetTypeStruct=n.CaipAccountAddressStruct=n.CaipAccountIdStruct=n.CaipReferenceStruct=n.CaipNamespaceStruct=n.CaipChainIdStruct=n.CAIP_ASSET_ID_REGEX=n.CAIP_ASSET_TYPE_REGEX=n.CAIP_ACCOUNT_ADDRESS_REGEX=n.CAIP_ACCOUNT_ID_REGEX=n.CAIP_REFERENCE_REGEX=n.CAIP_NAMESPACE_REGEX=n.CAIP_CHAIN_ID_REGEX=void 0;const s=e("@metamask/superstruct");function r(e){return(0,s.is)(e,n.CaipNamespaceStruct)}function i(e){return(0,s.is)(e,n.CaipReferenceStruct)}n.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,n.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,n.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,n.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,n.CAIP_ASSET_TYPE_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ASSET_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u,n.CaipChainIdStruct=(0,s.pattern)((0,s.string)(),n.CAIP_CHAIN_ID_REGEX),n.CaipNamespaceStruct=(0,s.pattern)((0,s.string)(),n.CAIP_NAMESPACE_REGEX),n.CaipReferenceStruct=(0,s.pattern)((0,s.string)(),n.CAIP_REFERENCE_REGEX),n.CaipAccountIdStruct=(0,s.pattern)((0,s.string)(),n.CAIP_ACCOUNT_ID_REGEX),n.CaipAccountAddressStruct=(0,s.pattern)((0,s.string)(),n.CAIP_ACCOUNT_ADDRESS_REGEX),n.CaipAssetTypeStruct=(0,s.pattern)((0,s.string)(),n.CAIP_ASSET_TYPE_REGEX),n.CaipAssetIdStruct=(0,s.pattern)((0,s.string)(),n.CAIP_ASSET_ID_REGEX),function(e){e.Bip122="bip122",e.Solana="solana",e.Eip155="eip155",e.Wallet="wallet"}(n.KnownCaipNamespace||(n.KnownCaipNamespace={})),n.isCaipChainId=function(e){return(0,s.is)(e,n.CaipChainIdStruct)},n.isCaipNamespace=r,n.isCaipReference=i,n.isCaipAccountId=function(e){return(0,s.is)(e,n.CaipAccountIdStruct)},n.isCaipAccountAddress=function(e){return(0,s.is)(e,n.CaipAccountAddressStruct)},n.isCaipAssetType=function(e){return(0,s.is)(e,n.CaipAssetTypeStruct)},n.isCaipAssetId=function(e){return(0,s.is)(e,n.CaipAssetIdStruct)},n.parseCaipChainId=function(e){const t=n.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},n.parseCaipAccountId=function(e){const t=n.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.toCaipChainId=function(e,t){if(!r(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!i(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`}}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/caip-types.cjs"}],[2315,{"./base64.cjs":2312,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ChecksumStruct=void 0;const s=e("@metamask/superstruct"),r=e("./base64.cjs");n.ChecksumStruct=(0,s.size)((0,r.base64)((0,s.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/checksum.cjs"}],[2316,{"./assert.cjs":2311,"./bytes.cjs":2313,"./hex.cjs":2320,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createHex=n.createBytes=n.createBigInt=n.createNumber=void 0;const s=e("@metamask/superstruct"),r=e("./assert.cjs"),i=e("./bytes.cjs"),a=e("./hex.cjs"),o=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),a.StrictHexStruct]),c=(0,s.coerce)((0,s.number)(),o,Number),u=(0,s.coerce)((0,s.bigint)(),o,BigInt),l=((0,s.union)([a.StrictHexStruct,(0,s.instance)(Uint8Array)]),(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([a.StrictHexStruct]),i.hexToBytes)),d=(0,s.coerce)(a.StrictHexStruct,(0,s.instance)(Uint8Array),i.bytesToHex);n.createNumber=function(e){try{const t=(0,s.create)(e,c);return(0,r.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof s.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},n.createBigInt=function(e){try{return(0,s.create)(e,u)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},n.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,s.create)(e,l)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},n.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,s.create)(e,d)}catch(e){if(e instanceof s.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/coercers.cjs"}],[2317,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},a=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.FrozenSet=n.FrozenMap=void 0;class o{get size(){return i(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return i(this,s,"f")[Symbol.iterator]()}constructor(e){s.set(this,void 0),a(this,s,new Map(e),"f"),Object.freeze(this)}entries(){return i(this,s,"f").entries()}forEach(e,t){return i(this,s,"f").forEach(((n,s,r)=>e.call(t,n,s,this)))}get(e){return i(this,s,"f").get(e)}has(e){return i(this,s,"f").has(e)}keys(){return i(this,s,"f").keys()}values(){return i(this,s,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}n.FrozenMap=o;class c{get size(){return i(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return i(this,r,"f")[Symbol.iterator]()}constructor(e){r.set(this,void 0),a(this,r,new Set(e),"f"),Object.freeze(this)}entries(){return i(this,r,"f").entries()}forEach(e,t){return i(this,r,"f").forEach(((n,s,r)=>e.call(t,n,s,this)))}has(e){return i(this,r,"f").has(e)}keys(){return i(this,r,"f").keys()}values(){return i(this,r,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}n.FrozenSet=c,Object.freeze(o),Object.freeze(o.prototype),Object.freeze(c),Object.freeze(c.prototype)}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/collections.cjs"}],[2318,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/encryption-types.cjs"}],[2319,{"./misc.cjs":2325,"pony-cause":5003},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.wrapError=n.getErrorMessage=n.isErrorWithStack=n.isErrorWithMessage=n.isErrorWithCode=void 0;const s=e("pony-cause"),r=e("./misc.cjs");function i(e){return"object"==typeof e&&null!==e&&"code"in e}function a(e){return"object"==typeof e&&null!==e&&"message"in e}n.isErrorWithCode=i,n.isErrorWithMessage=a,n.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},n.getErrorMessage=function(e){return a(e)&&"string"==typeof e.message?e.message:(0,r.isNullOrUndefined)(e)?"":String(e)},n.wrapError=function(e,t){if((n=e)instanceof Error||(0,r.isObject)(n)&&"Error"===n.constructor.name){let n;return n=2===Error.length?new Error(t,{cause:e}):new s.ErrorWithCause(t,{cause:e}),i(e)&&(n.code=e.code),n}var n;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/errors.cjs"}],[2320,{"./assert.cjs":2311,"./bytes.cjs":2313,"@metamask/superstruct":2872,"@noble/hashes/sha3":3001},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.remove0x=n.add0x=n.isValidChecksumAddress=n.getChecksumAddress=n.isValidHexAddress=n.assertIsStrictHexString=n.assertIsHexString=n.isStrictHexString=n.isHexString=n.HexChecksumAddressStruct=n.HexAddressStruct=n.StrictHexStruct=n.HexStruct=void 0;const s=e("@metamask/superstruct"),r=e("@noble/hashes/sha3"),i=e("./assert.cjs"),a=e("./bytes.cjs");function o(e){return(0,s.is)(e,n.HexStruct)}function c(e){return(0,s.is)(e,n.StrictHexStruct)}function u(e){(0,i.assert)((0,s.is)(e,n.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),o=d((0,a.bytesToHex)((0,r.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const n=o[t];return(0,i.assert)((0,s.is)(n,(0,s.string)()),"Hash shorter than address."),parseInt(n,16)>7?e.toUpperCase():e})).join("")}`}function l(e){return!!(0,s.is)(e,n.HexChecksumAddressStruct)&&u(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}n.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),n.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),n.HexAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]{40}$/u),n.HexChecksumAddressStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-fA-F]{40}$/u),n.isHexString=o,n.isStrictHexString=c,n.assertIsHexString=function(e){(0,i.assert)(o(e),"Value must be a hexadecimal string.")},n.assertIsStrictHexString=function(e){(0,i.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},n.isValidHexAddress=function(e){return(0,s.is)(e,n.HexAddressStruct)||l(e)},n.getChecksumAddress=u,n.isValidChecksumAddress=l,n.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},n.remove0x=d}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/hex.cjs"}],[2321,{"./assert.cjs":2311,"./base64.cjs":2312,"./bytes.cjs":2313,"./caip-types.cjs":2314,"./checksum.cjs":2315,"./coercers.cjs":2316,"./collections.cjs":2317,"./encryption-types.cjs":2318,"./errors.cjs":2319,"./hex.cjs":2320,"./json.cjs":2322,"./keyring.cjs":2323,"./logging.cjs":2324,"./misc.cjs":2325,"./number.cjs":2326,"./opaque.cjs":2327,"./promise.cjs":2328,"./time.cjs":2329,"./transaction-types.cjs":2330,"./versions.cjs":2331},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./assert.cjs"),n),r(e("./base64.cjs"),n),r(e("./bytes.cjs"),n),r(e("./caip-types.cjs"),n),r(e("./checksum.cjs"),n),r(e("./coercers.cjs"),n),r(e("./collections.cjs"),n),r(e("./encryption-types.cjs"),n),r(e("./errors.cjs"),n),r(e("./hex.cjs"),n),r(e("./json.cjs"),n),r(e("./keyring.cjs"),n),r(e("./logging.cjs"),n),r(e("./misc.cjs"),n),r(e("./number.cjs"),n),r(e("./opaque.cjs"),n),r(e("./promise.cjs"),n),r(e("./time.cjs"),n),r(e("./transaction-types.cjs"),n),r(e("./versions.cjs"),n)}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/index.cjs"}],[2322,{"./assert.cjs":2311,"./misc.cjs":2325,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonRpcIdValidator=n.assertIsJsonRpcError=n.isJsonRpcError=n.assertIsJsonRpcFailure=n.isJsonRpcFailure=n.assertIsJsonRpcSuccess=n.isJsonRpcSuccess=n.assertIsJsonRpcResponse=n.isJsonRpcResponse=n.assertIsPendingJsonRpcResponse=n.isPendingJsonRpcResponse=n.JsonRpcResponseStruct=n.JsonRpcFailureStruct=n.JsonRpcSuccessStruct=n.PendingJsonRpcResponseStruct=n.assertIsJsonRpcRequest=n.isJsonRpcRequest=n.assertIsJsonRpcNotification=n.isJsonRpcNotification=n.JsonRpcNotificationStruct=n.JsonRpcRequestStruct=n.JsonRpcParamsStruct=n.JsonRpcErrorStruct=n.JsonRpcIdStruct=n.JsonRpcVersionStruct=n.jsonrpc2=n.getJsonSize=n.getSafeJson=n.isValidJson=n.JsonStruct=n.UnsafeJsonStruct=n.exactOptional=n.object=void 0;const s=e("@metamask/superstruct"),r=e("./assert.cjs"),i=e("./misc.cjs");function a({path:e,branch:t}){const n=e[e.length-1];return(0,i.hasProperty)(t[t.length-2],n)}function o(e){return new s.Struct({...e,type:`optional ${e.type}`,validator:(t,n)=>!a(n)||e.validator(t,n),refiner:(t,n)=>!a(n)||e.refiner(t,n)})}function c(e){if(null===e||"boolean"==typeof e||"string"==typeof e)return!0;if("number"==typeof e&&Number.isFinite(e))return!0;if("object"==typeof e){let t=!0;if(Array.isArray(e)){for(let n=0;n<e.length;n++)if(!c(e[n])){t=!1;break}return t}const n=Object.entries(e);for(let e=0;e<n.length;e++)if("string"!=typeof n[e][0]||!c(n[e][1])){t=!1;break}return t}return!1}function u(e){return(0,s.create)(e,n.JsonStruct)}n.object=e=>(0,s.object)(e),n.exactOptional=o,n.UnsafeJsonStruct=(0,s.define)("JSON",(e=>c(e))),n.JsonStruct=(0,s.coerce)(n.UnsafeJsonStruct,(0,s.any)(),(e=>((0,r.assertStruct)(e,n.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),n.isValidJson=function(e){try{return u(e),!0}catch{return!1}},n.getSafeJson=u,n.getJsonSize=function(e){(0,r.assertStruct)(e,n.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},n.jsonrpc2="2.0",n.JsonRpcVersionStruct=(0,s.literal)(n.jsonrpc2),n.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),n.JsonRpcErrorStruct=(0,n.object)({code:(0,s.integer)(),message:(0,s.string)(),data:o(n.JsonStruct),stack:o((0,s.string)())}),n.JsonRpcParamsStruct=(0,s.union)([(0,s.record)((0,s.string)(),n.JsonStruct),(0,s.array)(n.JsonStruct)]),n.JsonRpcRequestStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,method:(0,s.string)(),params:o(n.JsonRpcParamsStruct)}),n.JsonRpcNotificationStruct=(0,n.object)({jsonrpc:n.JsonRpcVersionStruct,method:(0,s.string)(),params:o(n.JsonRpcParamsStruct)}),n.isJsonRpcNotification=function(e){return(0,s.is)(e,n.JsonRpcNotificationStruct)},n.assertIsJsonRpcNotification=function(e,t){(0,r.assertStruct)(e,n.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},n.isJsonRpcRequest=function(e){return(0,s.is)(e,n.JsonRpcRequestStruct)},n.assertIsJsonRpcRequest=function(e,t){(0,r.assertStruct)(e,n.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},n.PendingJsonRpcResponseStruct=(0,s.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(n.JsonRpcErrorStruct)}),n.JsonRpcSuccessStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:n.JsonStruct}),n.JsonRpcFailureStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,error:n.JsonRpcErrorStruct}),n.JsonRpcResponseStruct=(0,s.union)([n.JsonRpcSuccessStruct,n.JsonRpcFailureStruct]),n.isPendingJsonRpcResponse=function(e){return(0,s.is)(e,n.PendingJsonRpcResponseStruct)},n.assertIsPendingJsonRpcResponse=function(e,t){(0,r.assertStruct)(e,n.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},n.isJsonRpcResponse=function(e){return(0,s.is)(e,n.JsonRpcResponseStruct)},n.assertIsJsonRpcResponse=function(e,t){(0,r.assertStruct)(e,n.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},n.isJsonRpcSuccess=function(e){return(0,s.is)(e,n.JsonRpcSuccessStruct)},n.assertIsJsonRpcSuccess=function(e,t){(0,r.assertStruct)(e,n.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},n.isJsonRpcFailure=function(e){return(0,s.is)(e,n.JsonRpcFailureStruct)},n.assertIsJsonRpcFailure=function(e,t){(0,r.assertStruct)(e,n.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},n.isJsonRpcError=function(e){return(0,s.is)(e,n.JsonRpcErrorStruct)},n.assertIsJsonRpcError=function(e,t){(0,r.assertStruct)(e,n.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},n.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:n,permitNull:s}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(n||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||s&&null===e)}}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/json.cjs"}],[2323,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/keyring.cjs"}],[2324,{debug:4226},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.createProjectLogger=void 0;const r=(0,s(e("debug")).default)("metamask");n.createProjectLogger=function(e){return r.extend(e)},n.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/logging.cjs"}],[2325,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.calculateNumberSize=n.calculateStringSize=n.isASCII=n.isPlainObject=n.ESCAPE_CHARACTERS_REGEXP=n.JsonSize=n.getKnownPropertyNames=n.hasProperty=n.isObject=n.isNullOrUndefined=n.isNonEmptyArray=void 0,n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isNullOrUndefined=function(e){return null===e||e===undefined},n.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function s(e){return e.charCodeAt(0)<=127}n.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),n.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(n.JsonSize||(n.JsonSize={})),n.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,n.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},n.isASCII=s,n.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>s(t)?e+1:e+2),0)+(e.match(n.ESCAPE_CHARACTERS_REGEXP)??[]).length},n.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/misc.cjs"}],[2326,{"./assert.cjs":2311,"./hex.cjs":2320},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.hexToBigInt=n.hexToNumber=n.bigIntToHex=n.numberToHex=void 0;const s=e("./assert.cjs"),r=e("./hex.cjs");n.numberToHex=e=>((0,s.assert)("number"==typeof e,"Value must be a number."),(0,s.assert)(e>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,r.add0x)(e.toString(16)));n.bigIntToHex=e=>((0,s.assert)("bigint"==typeof e,"Value must be a bigint."),(0,s.assert)(e>=0,"Value must be a non-negative bigint."),(0,r.add0x)(e.toString(16)));n.hexToNumber=e=>{(0,r.assertIsHexString)(e);const t=parseInt(e,16);return(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};n.hexToBigInt=e=>((0,r.assertIsHexString)(e),BigInt((0,r.add0x)(e)))}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/number.cjs"}],[2327,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/opaque.cjs"}],[2328,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createDeferredPromise=void 0,n.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,n;const s=new Promise(((e,s)=>{t=e,n=s}));return e&&s.catch((e=>{})),{promise:s,resolve:t,reject:n}}}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/promise.cjs"}],[2329,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.timeSince=n.inMilliseconds=n.Duration=void 0,function(e){e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year"}(n.Duration||(n.Duration={}));const s=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};n.inMilliseconds=function(e,t){return s(e,"count"),e*t},n.timeSince=function(e){return s(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/time.cjs"}],[2330,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/transaction-types.cjs"}],[2331,{"./assert.cjs":2311,"@metamask/superstruct":2872,semver:5547},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.satisfiesVersionRange=n.gtRange=n.gtVersion=n.assertIsSemVerRange=n.assertIsSemVerVersion=n.isValidSemVerRange=n.isValidSemVerVersion=n.VersionRangeStruct=n.VersionStruct=void 0;const s=e("@metamask/superstruct"),r=e("semver"),i=e("./assert.cjs");n.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,r.valid)(e)||`Expected SemVer version, got "${e}"`)),n.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,r.validRange)(e)||`Expected SemVer range, got "${e}"`)),n.isValidSemVerVersion=function(e){return(0,s.is)(e,n.VersionStruct)},n.isValidSemVerRange=function(e){return(0,s.is)(e,n.VersionRangeStruct)},n.assertIsSemVerVersion=function(e){(0,i.assertStruct)(e,n.VersionStruct)},n.assertIsSemVerRange=function(e){(0,i.assertStruct)(e,n.VersionRangeStruct)},n.gtVersion=function(e,t){return(0,r.gt)(e,t)},n.gtRange=function(e,t){return(0,r.gtr)(e,t)},n.satisfiesVersionRange=function(e,t){return(0,r.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/network-controller>@metamask/utils",file:"node_modules/@metamask/network-controller/node_modules/@metamask/utils/dist/versions.cjs"}],[2332,{"@ethersproject/providers":545,assert:4070,"async-mutex":2337},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},u=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.NonceTracker=void 0;const d=l(e("assert")),m=e("async-mutex"),p=e("@ethersproject/providers");n.NonceTracker=class{constructor(e){s.set(this,void 0),r.set(this,void 0),i.set(this,void 0),a.set(this,void 0),o.set(this,void 0),c(this,s,e.provider,"f"),c(this,r,e.blockTracker,"f"),c(this,i,e.getPendingTransactions,"f"),c(this,a,e.getConfirmedTransactions,"f"),c(this,o,{},"f")}setProvider({provider:e,blockTracker:t}){d.default("object"==typeof e,"missing or invalid provider"),d.default("object"==typeof t,"missing or invalid blockTracker"),c(this,s,e,"f"),c(this,r,t,"f")}async getGlobalLock(){const e=this._lookupMutex("global");return{releaseLock:await e.acquire()}}async getNonceLock(e){await this._globalMutexFree();const t=await this._takeMutex(e);try{const n=await this._getNetworkNextNonce(e),s=this._getHighestLocallyConfirmed(e),r=n.nonce,a=Math.max(r,s),o=u(this,i,"f").call(this,e),c=this._getHighestContinuousFrom(o,a),l={params:{highestLocallyConfirmed:s,nextNetworkNonce:r,highestSuggested:a},local:c,network:n},m=Math.max(n.nonce,c.nonce);return d.default(Number.isInteger(m),`nonce-tracker - nextNonce is not an integer - got: (${typeof m}) "${m}"`),{nextNonce:m,nonceDetails:l,releaseLock:t}}catch(e){throw t(),e}}async _globalMutexFree(){const e=this._lookupMutex("global");(await e.acquire())()}async _takeMutex(e){const t=this._lookupMutex(e);return await t.acquire()}_lookupMutex(e){let t=u(this,o,"f")[e];return t||(t=new m.Mutex,u(this,o,"f")[e]=t),t}async _getNetworkNextNonce(e){const t=await u(this,r,"f").getLatestBlock(),n=await new p.Web3Provider(u(this,s,"f")).getTransactionCount(e,t);return d.default(Number.isInteger(n),`nonce-tracker - baseCount is not an integer - got: (${typeof n}) "${n}"`),{name:"network",nonce:n,details:{blockNumber:t,baseCount:n}}}_getHighestLocallyConfirmed(e){const t=u(this,a,"f").call(this,e),n=this._getHighestNonce(t);return Number.isInteger(n)?n+1:0}_getHighestNonce(e){const t=e.map((e=>{const{nonce:t}=e.txParams;return d.default("string"==typeof t,"nonces should be hex strings"),parseInt(t,16)}));return Math.max.apply(null,t)}_getHighestContinuousFrom(e,t){const n=e.map((e=>{const{nonce:t}=e.txParams;return d.default("string"==typeof t,"nonces should be hex strings"),parseInt(t,16)}));let s=t;for(;n.includes(s);)s+=1;return{name:"local",nonce:s,details:{startPoint:t,highest:s}}}},s=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap}}},{package:"@metamask/transaction-controller>@metamask/nonce-tracker",file:"node_modules/@metamask/nonce-tracker/dist/NonceTracker.js"}],[2333,{"./NonceTracker":2332},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.NonceTracker=void 0;var s=e("./NonceTracker");Object.defineProperty(n,"NonceTracker",{enumerable:!0,get:function(){return s.NonceTracker}})}}},{package:"@metamask/transaction-controller>@metamask/nonce-tracker",file:"node_modules/@metamask/nonce-tracker/dist/index.js"}],[2334,{"./Semaphore":2335,tslib:5615},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var s=e("tslib"),r=e("./Semaphore"),i=function(){function e(e){this._semaphore=new r.default(1,e)}return e.prototype.acquire=function(){return(0,s.__awaiter)(this,void 0,void 0,(function(){var e;return(0,s.__generator)(this,(function(t){switch(t.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=t.sent(),[2,e[1]]}}))}))},e.prototype.runExclusive=function(e){return this._semaphore.runExclusive((function(){return e()}))},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.waitForUnlock=function(){return this._semaphore.waitForUnlock()},e.prototype.release=function(){this._semaphore.release()},e.prototype.cancel=function(){return this._semaphore.cancel()},e}();n.default=i}}},{package:"@metamask/transaction-controller>@metamask/nonce-tracker>async-mutex",file:"node_modules/@metamask/nonce-tracker/node_modules/async-mutex/lib/Mutex.js"}],[2335,{"./errors":2336,tslib:5615},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var s=e("tslib"),r=e("./errors"),i=function(){function e(e,t){if(void 0===t&&(t=r.E_CANCELED),this._maxConcurrency=e,this._cancelError=t,this._queue=[],this._waiters=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return e.prototype.acquire=function(){var e=this,t=this.isLocked(),n=new Promise((function(t,n){return e._queue.push({resolve:t,reject:n})}));return t||this._dispatch(),n},e.prototype.runExclusive=function(e){return(0,s.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return[4,this.acquire()];case 1:t=s.sent(),n=t[0],r=t[1],s.label=2;case 2:return s.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,s.sent()];case 4:return r(),[7];case 5:return[2]}}))}))},e.prototype.waitForUnlock=function(){return(0,s.__awaiter)(this,void 0,void 0,(function(){var e=this;return(0,s.__generator)(this,(function(t){return this.isLocked()?[2,new Promise((function(t){return e._waiters.push({resolve:t})}))]:[2,Promise.resolve()]}))}))},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailable on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=undefined,e()}},e.prototype.cancel=function(){var e=this;this._queue.forEach((function(t){return t.reject(e._cancelError)})),this._queue=[]},e.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._resolveWaiters(),e._dispatch())},t.resolve([this._value--,this._currentReleaser])}},e.prototype._resolveWaiters=function(){this._waiters.forEach((function(e){return e.resolve()})),this._waiters=[]},e}();n.default=i}}},{package:"@metamask/transaction-controller>@metamask/nonce-tracker>async-mutex",file:"node_modules/@metamask/nonce-tracker/node_modules/async-mutex/lib/Semaphore.js"}],[2336,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.E_CANCELED=n.E_ALREADY_LOCKED=n.E_TIMEOUT=void 0,n.E_TIMEOUT=new Error("timeout while waiting for mutex to become available"),n.E_ALREADY_LOCKED=new Error("mutex already locked"),n.E_CANCELED=new Error("request for lock canceled")}}},{package:"@metamask/transaction-controller>@metamask/nonce-tracker>async-mutex",file:"node_modules/@metamask/nonce-tracker/node_modules/async-mutex/lib/errors.js"}],[2337,{"./Mutex":2334,"./Semaphore":2335,"./errors":2336,"./tryAcquire":2338,"./withTimeout":2339,tslib:5615},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.tryAcquire=n.withTimeout=n.Semaphore=n.Mutex=void 0;var s=e("tslib"),r=e("./Mutex");Object.defineProperty(n,"Mutex",{enumerable:!0,get:function(){return r.default}});var i=e("./Semaphore");Object.defineProperty(n,"Semaphore",{enumerable:!0,get:function(){return i.default}});var a=e("./withTimeout");Object.defineProperty(n,"withTimeout",{enumerable:!0,get:function(){return a.withTimeout}});var o=e("./tryAcquire");Object.defineProperty(n,"tryAcquire",{enumerable:!0,get:function(){return o.tryAcquire}}),(0,s.__exportStar)(e("./errors"),n)}}},{package:"@metamask/transaction-controller>@metamask/nonce-tracker>async-mutex",file:"node_modules/@metamask/nonce-tracker/node_modules/async-mutex/lib/index.js"}],[2338,{"./errors":2336,"./withTimeout":2339},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.tryAcquire=void 0;var s=e("./errors"),r=e("./withTimeout");n.tryAcquire=function(e,t){return void 0===t&&(t=s.E_ALREADY_LOCKED),(0,r.withTimeout)(e,0,t)}}}},{package:"@metamask/transaction-controller>@metamask/nonce-tracker>async-mutex",file:"node_modules/@metamask/nonce-tracker/node_modules/async-mutex/lib/tryAcquire.js"}],[2339,{"./errors":2336,tslib:5615},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.withTimeout=void 0;var s=e("tslib"),r=e("./errors");n.withTimeout=function(e,t,n){var i=this;return void 0===n&&(n=r.E_TIMEOUT),{acquire:function(){return new Promise((function(r,a){return(0,s.__awaiter)(i,void 0,void 0,(function(){var i,o,c,u;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:i=!1,o=setTimeout((function(){i=!0,a(n)}),t),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,e.acquire()];case 2:return c=s.sent(),i?(Array.isArray(c)?c[1]:c)():(clearTimeout(o),r(c)),[3,4];case 3:return u=s.sent(),i||(clearTimeout(o),a(u)),[3,4];case 4:return[2]}}))}))}))},runExclusive:function(e){return(0,s.__awaiter)(this,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:t=function(){return undefined},s.label=1;case 1:return s.trys.push([1,,7,8]),[4,this.acquire()];case 2:return n=s.sent(),Array.isArray(n)?(t=n[1],[4,e(n[0])]):[3,4];case 3:return[2,s.sent()];case 4:return t=n,[4,e()];case 5:return[2,s.sent()];case 6:return[3,8];case 7:return t(),[7];case 8:return[2]}}))}))},release:function(){e.release()},cancel:function(){return e.cancel()},waitForUnlock:function(){return e.waitForUnlock()},isLocked:function(){return e.isLocked()}}}}}},{package:"@metamask/transaction-controller>@metamask/nonce-tracker>async-mutex",file:"node_modules/@metamask/nonce-tracker/node_modules/async-mutex/lib/withTimeout.js"}],[2340,{"./constants/constants.cjs":2341,"./constants/notification-schema.cjs":2343,"./processors/process-notifications.cjs":2354,"./services/feature-announcements.cjs":2357,"./services/onchain-notifications.cjs":2358,"./utils/utils.cjs":2361,"@metamask/base-controller":1383,"@metamask/controller-utils":1474,"@metamask/keyring-controller":1990,"@metamask/utils":2950,loglevel:4863},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u,l,d,m,p,h,f,g,y,b,x,S,k,v=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),w=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),T=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)&&v(t,e,n);return w(t,e),t},_=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},E=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},j=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.defaultState=void 0;const C=e("@metamask/base-controller"),P=e("@metamask/controller-utils"),O=e("@metamask/keyring-controller"),A=e("@metamask/utils"),I=j(e("loglevel")),N=e("./constants/constants.cjs"),R=e("./constants/notification-schema.cjs"),M=e("./processors/process-notifications.cjs"),B=T(e("./services/feature-announcements.cjs")),L=T(e("./services/onchain-notifications.cjs")),D=T(e("./utils/utils.cjs")),U="NotificationServicesController",H={subscriptionAccountsSeen:{persist:!0,anonymous:!0},isMetamaskNotificationsFeatureSeen:{persist:!0,anonymous:!1},isNotificationServicesEnabled:{persist:!0,anonymous:!1},isFeatureAnnouncementsEnabled:{persist:!0,anonymous:!1},metamaskNotificationsList:{persist:!0,anonymous:!0},metamaskNotificationsReadList:{persist:!0,anonymous:!0},isUpdatingMetamaskNotifications:{persist:!1,anonymous:!1},isFetchingMetamaskNotifications:{persist:!1,anonymous:!1},isUpdatingMetamaskNotificationsAccount:{persist:!1,anonymous:!1},isCheckingAccountsPresence:{persist:!1,anonymous:!1}};n.defaultState={subscriptionAccountsSeen:[],isMetamaskNotificationsFeatureSeen:!1,isNotificationServicesEnabled:!1,isFeatureAnnouncementsEnabled:!1,metamaskNotificationsList:[],metamaskNotificationsReadList:[],isUpdatingMetamaskNotifications:!1,isFetchingMetamaskNotifications:!1,isUpdatingMetamaskNotificationsAccount:[],isCheckingAccountsPresence:!1};const F=new Set([R.TRIGGER_TYPES.SNAP]);class G extends C.BaseController{constructor({messenger:e,state:t,env:m}){super({messenger:e,metadata:H,name:U,state:{...n.defaultState,...t}}),s.add(this),r.set(this,{isUnlocked:!1,setupLockedStateSubscriptions:e=>{const{isUnlocked:t}=this.messagingSystem.call("KeyringController:getState");E(this,r,"f").isUnlocked=t,this.messagingSystem.subscribe("KeyringController:unlock",(()=>{E(this,r,"f").isUnlocked=!0,e()})),this.messagingSystem.subscribe("KeyringController:lock",(()=>{E(this,r,"f").isUnlocked=!1}))}}),i.set(this,{getBearerToken:async()=>await this.messagingSystem.call("AuthenticationController:getBearerToken"),isSignedIn:()=>this.messagingSystem.call("AuthenticationController:isSignedIn"),signIn:async()=>await this.messagingSystem.call("AuthenticationController:performSignIn")}),a.set(this,{getStorageKey:()=>this.messagingSystem.call("UserStorageController:getStorageKey"),getNotificationStorage:async()=>await this.messagingSystem.call("UserStorageController:performGetStorage","notifications.notification_settings"),setNotificationStorage:async e=>await this.messagingSystem.call("UserStorageController:performSetStorage","notifications.notification_settings",e)}),o.set(this,{isSetup:!1,subscribeToPushNotifications:async()=>{await this.messagingSystem.call("NotificationServicesPushController:subscribeToPushNotifications")},enablePushNotifications:async e=>{try{await this.messagingSystem.call("NotificationServicesPushController:enablePushNotifications",e)}catch(e){I.default.error("Silently failed to enable push notifications",e)}},disablePushNotifications:async()=>{try{await this.messagingSystem.call("NotificationServicesPushController:disablePushNotifications")}catch(e){I.default.error("Silently failed to disable push notifications",e)}},updatePushNotifications:async e=>{try{await this.messagingSystem.call("NotificationServicesPushController:updateTriggerPushNotifications",e)}catch(e){I.default.error("Silently failed to update push notifications",e)}},subscribe:()=>{this.messagingSystem.subscribe("NotificationServicesPushController:onNewNotifications",(e=>{this.updateMetamaskNotificationsList(e)}))},initializePushNotifications:async()=>{if(this.state.isNotificationServicesEnabled&&!E(this,o,"f").isSetup)try{if(!E(this,r,"f").isUnlocked)throw new Error("Keyring is locked");await this.enablePushNotifications(),E(this,o,"f").isSetup=!0}catch{await E(this,o,"f").subscribeToPushNotifications().catch((()=>{}))}}}),c.set(this,{isNotificationAccountsSetup:!1,getNotificationAccounts:async()=>await this.messagingSystem.call("KeyringController:withKeyring",{type:O.KeyringTypes.hd,index:0},(async({keyring:e})=>await e.getAccounts())).catch((()=>null)),listAccounts:async()=>{const e=await E(this,c,"f").getNotificationAccounts();if(!e)return{accountsAdded:[],accountsRemoved:[],accounts:[]};const t=e.map((e=>(0,P.toChecksumHexAddress)(e))).filter((e=>(0,P.isValidHexAddress)(e))),n=new Set(t),s=new Set(this.state.subscriptionAccountsSeen);if(0===t.length)return{accountsAdded:[],accountsRemoved:[],accounts:[]};const r=t.filter((e=>!s.has(e))),i=[...s.values()].filter((e=>!n.has(e)));return this.update((e=>{e.subscriptionAccountsSeen=[...n]})),{accountsAdded:r,accountsRemoved:i,accounts:t}},initialize:async()=>{E(this,r,"f").isUnlocked&&!E(this,c,"f").isNotificationAccountsSetup&&(await E(this,c,"f").listAccounts(),E(this,c,"f").isNotificationAccountsSetup=!0)},subscribe:()=>{this.messagingSystem.subscribe("KeyringController:stateChange",(async()=>{if(!this.state.isNotificationServicesEnabled)return;const{accountsAdded:e,accountsRemoved:t}=await E(this,c,"f").listAccounts(),n=[];e.length>0&&n.push(this.updateOnChainTriggersByAccount(e)),t.length>0&&n.push(this.deleteOnChainTriggersByAccount(t)),await Promise.all(n)}))}}),u.set(this,void 0),_(this,u,m.featureAnnouncements,"f"),E(this,s,"m",l).call(this),E(this,s,"m",d).call(this)}init(){E(this,r,"f").setupLockedStateSubscriptions((async()=>{await E(this,c,"f").initialize(),await E(this,o,"f").initializePushNotifications()})),E(this,c,"f").initialize(),E(this,o,"f").initializePushNotifications(),E(this,c,"f").subscribe(),E(this,o,"f").subscribe()}async enablePushNotifications(){await E(this,s,"m",p).call(this);const e=await E(this,s,"m",g).call(this);if(!e)throw new Error("Unable to get triggers");const t=D.getAllUUIDs(e);await E(this,o,"f").enablePushNotifications(t)}async disablePushNotifications(){await E(this,o,"f").disablePushNotifications()}async checkAccountsPresence(e){try{E(this,s,"m",x).call(this,!0);const t=await E(this,s,"m",g).call(this);E(this,s,"m",f).call(this,t);return D.checkAccountsPresence(t,e)}catch(e){throw I.default.error("Failed to check accounts presence",e),e}finally{E(this,s,"m",x).call(this,!1)}}async setFeatureAnnouncementsEnabled(e){try{this.update((t=>{t.isFeatureAnnouncementsEnabled=e}))}catch(e){throw I.default.error("Unable to toggle feature announcements",e),new Error("Unable to toggle feature announcements")}}async createOnChainTriggers(e){try{E(this,s,"m",y).call(this,!0);const{bearerToken:t,storageKey:n}=await E(this,s,"m",h).call(this),{accounts:r}=await E(this,c,"f").listAccounts();let i=e?.resetNotifications?null:await E(this,s,"m",g).call(this);i?.[N.USER_STORAGE_VERSION_KEY]===undefined&&(i=D.initializeUserStorage(r.map((e=>({address:e}))),!1),await E(this,a,"f").setNotificationStorage(JSON.stringify(i)));const u=D.traverseUserStorageTriggers(i);await L.createOnChainTriggers(i,n,t,u);const l=D.getAllUUIDs(i);return E(this,o,"f").enablePushNotifications(l).catch((()=>{})),await E(this,a,"f").setNotificationStorage(JSON.stringify(i)),this.update((e=>{e.isNotificationServicesEnabled=!0,e.isFeatureAnnouncementsEnabled=!0,e.isMetamaskNotificationsFeatureSeen=!0})),i}catch(e){throw I.default.error("Failed to create On Chain triggers",e),new Error("Failed to create On Chain triggers")}finally{E(this,s,"m",y).call(this,!1)}}async enableMetamaskNotifications(){try{E(this,s,"m",y).call(this,!0),await E(this,s,"m",p).call(this),await this.createOnChainTriggers()}catch(e){throw I.default.error("Unable to enable notifications",e),new Error("Unable to enable notifications")}finally{E(this,s,"m",y).call(this,!1)}}async disableNotificationServices(){E(this,s,"m",y).call(this,!0);try{await E(this,o,"f").disablePushNotifications()}catch{}const e=this.state.metamaskNotificationsList.filter((e=>e.type===R.TRIGGER_TYPES.SNAP));this.update((t=>{t.isNotificationServicesEnabled=!1,t.isFeatureAnnouncementsEnabled=!1,t.metamaskNotificationsList=e})),E(this,s,"m",y).call(this,!1)}async deleteOnChainTriggersByAccount(e){try{E(this,s,"m",S).call(this,e);const{bearerToken:t,storageKey:n}=await E(this,s,"m",h).call(this),r=await E(this,s,"m",g).call(this);E(this,s,"m",f).call(this,r);const i=e.map((e=>D.getUUIDsForAccount(r,e.toLowerCase()))).flat();if(0===i.length)return r;await L.deleteOnChainTriggers(r,n,t,i);const c=D.getAllUUIDs(r);return await E(this,o,"f").updatePushNotifications(c),await E(this,a,"f").setNotificationStorage(JSON.stringify(r)),r}catch(e){throw I.default.error("Failed to delete OnChain triggers",e),new Error("Failed to delete OnChain triggers")}finally{E(this,s,"m",k).call(this,e)}}async updateOnChainTriggersByAccount(e){try{E(this,s,"m",S).call(this,e);const{bearerToken:t,storageKey:n}=await E(this,s,"m",h).call(this),r=await E(this,s,"m",g).call(this);E(this,s,"m",f).call(this,r),e.forEach((e=>D.upsertAddressTriggers(e,r)));if(D.traverseUserStorageTriggers(r,{mapTrigger:e=>e.enabled?undefined:e}).length>0){await E(this,a,"f").setNotificationStorage(JSON.stringify(r));const s=D.traverseUserStorageTriggers(r,{mapTrigger:t=>e.some((e=>e.toLowerCase()===t.address.toLowerCase()))?t:undefined});await L.createOnChainTriggers(r,n,t,s)}const i=D.getAllUUIDs(r);return await E(this,o,"f").updatePushNotifications(i),await E(this,a,"f").setNotificationStorage(JSON.stringify(r)),r}catch(e){throw I.default.error("Failed to update OnChain triggers",e),new Error("Failed to update OnChain triggers")}finally{E(this,s,"m",k).call(this,e)}}async fetchAndUpdateMetamaskNotifications(e){try{E(this,s,"m",b).call(this,!0);const t=this.state.isNotificationServicesEnabled,n=t&&this.state.isFeatureAnnouncementsEnabled?await B.getFeatureAnnouncementNotifications(E(this,u,"f"),e).catch((()=>[])):[],r=[];if(t){const e=await E(this,a,"f").getNotificationStorage().then((e=>e&&JSON.parse(e))).catch((()=>null)),t=await E(this,i,"f").getBearerToken().catch((()=>null));if(e&&t){const n=await L.getOnChainNotifications(e,t).catch((()=>[]));r.push(...n)}}const o=this.state.metamaskNotificationsList.filter((e=>e.type===R.TRIGGER_TYPES.SNAP)),c=this.state.metamaskNotificationsReadList,l=e=>Boolean(e),d=e=>e.map((e=>(0,M.safeProcessNotification)(e,c))).filter(l),m=d(n),p=d(r),h=[...m,...p,...o];return h.sort(((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())),this.update((e=>{e.metamaskNotificationsList=h})),this.messagingSystem.publish(`${U}:notificationsListUpdated`,this.state.metamaskNotificationsList),E(this,s,"m",b).call(this,!1),h}catch(e){throw E(this,s,"m",b).call(this,!1),I.default.error("Failed to fetch notifications",e),new Error("Failed to fetch notifications")}}getNotificationsByType(e){return(0,A.assert)(Object.values(R.TRIGGER_TYPES).includes(e),"Invalid trigger type."),this.state.metamaskNotificationsList.filter((t=>t.type===e))}async deleteNotificationById(e){const t=this.state.metamaskNotificationsList.find((t=>t.id===e));(0,A.assert)(t,"The notification to be deleted does not exist."),(0,A.assert)(F.has(t.type),`The notification type of "${t.type}" is not locally persisted, only the following types can use this function: ${[...F].join(", ")}.`);const n=this.state.metamaskNotificationsList.filter((t=>t.id!==e));this.update((e=>{e.metamaskNotificationsList=n}))}async deleteNotificationsById(e){for(const t of e)await this.deleteNotificationById(t);this.messagingSystem.publish(`${U}:notificationsListUpdated`,this.state.metamaskNotificationsList)}async markMetamaskNotificationsAsRead(e){let t=[],n=[],s=[];try{const[r,a,o]=e.reduce(((e,t)=>{if(!t.isRead)switch(t.type){case R.TRIGGER_TYPES.FEATURES_ANNOUNCEMENT:e[1].push(t);break;case R.TRIGGER_TYPES.SNAP:e[2].push(t);break;default:e[0].push(t)}return e}),[[],[],[]]);if(r.length>0){const e=await E(this,i,"f").getBearerToken();e&&(t=r.map((e=>e.id)),await L.markNotificationsAsRead(e,t).catch((()=>{t=[],I.default.warn("Unable to mark onchain notifications as read")})))}a.length>0&&(n=a.map((e=>e.id))),o.length>0&&(s=o.map((e=>e.id)))}catch(e){I.default.warn("Something failed when marking notifications as read",e)}this.update((e=>{const r=e.metamaskNotificationsReadList,i=[...n,...s];e.metamaskNotificationsReadList=[...new Set([...r,...i])],e.metamaskNotificationsList=e.metamaskNotificationsList.map((e=>i.includes(e.id)||t.includes(e.id)?e.type===R.TRIGGER_TYPES.SNAP?{...e,isRead:!0,readDate:(new Date).toISOString()}:{...e,isRead:!0}:e))})),this.messagingSystem.publish(`${U}:markNotificationsAsRead`,this.state.metamaskNotificationsList)}async updateMetamaskNotificationsList(e){if(this.state.metamaskNotificationsList.some((t=>t.id===e.id)))return;const t=(0,M.safeProcessNotification)(e);t&&(this.update((e=>{new Set(e.metamaskNotificationsList.map((e=>e.id))).has(t.id)||(e.metamaskNotificationsList=[t,...e.metamaskNotificationsList])})),this.messagingSystem.publish(`${U}:notificationsListUpdated`,this.state.metamaskNotificationsList))}}r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,c=new WeakMap,u=new WeakMap,s=new WeakSet,l=function(){this.messagingSystem.registerActionHandler(`${U}:updateMetamaskNotificationsList`,this.updateMetamaskNotificationsList.bind(this)),this.messagingSystem.registerActionHandler(`${U}:disableNotificationServices`,this.disableNotificationServices.bind(this)),this.messagingSystem.registerActionHandler(`${U}:getNotificationsByType`,this.getNotificationsByType.bind(this)),this.messagingSystem.registerActionHandler(`${U}:deleteNotificationsById`,this.deleteNotificationsById.bind(this))},d=function(){this.update((e=>{e.isUpdatingMetamaskNotifications=!1,e.isCheckingAccountsPresence=!1,e.isFetchingMetamaskNotifications=!1,e.isUpdatingMetamaskNotificationsAccount=[]}))},m=function(){if(!E(this,i,"f").isSignedIn())throw this.update((e=>{e.isNotificationServicesEnabled=!1})),new Error("User is not signed in.")},p=async function(){E(this,i,"f").isSignedIn()||await E(this,i,"f").signIn()},h=async function(){E(this,s,"m",m).call(this);const e=await E(this,i,"f").getBearerToken(),t=await E(this,a,"f").getStorageKey();if(!e||!t)throw new Error("Missing BearerToken or storage key");return{bearerToken:e,storageKey:t}},f=function(e){if(!e)throw new Error("User Storage does not exist")},g=async function(){const e=await E(this,a,"f").getNotificationStorage();if(!e)return null;try{const t=JSON.parse(e);return D.cleanUserStorage(t),t}catch{return I.default.error("Unable to parse User Storage"),null}},y=function(e){this.update((t=>{t.isUpdatingMetamaskNotifications=e}))},b=function(e){this.update((t=>{t.isFetchingMetamaskNotifications=e}))},x=function(e){this.update((t=>{t.isCheckingAccountsPresence=e}))},S=function(e){this.update((t=>{const n=new Set([...t.isUpdatingMetamaskNotificationsAccount,...e]);t.isUpdatingMetamaskNotificationsAccount=Array.from(n)}))},k=function(e){this.update((t=>{t.isUpdatingMetamaskNotificationsAccount=t.isUpdatingMetamaskNotificationsAccount.filter((t=>!e.includes(t)))}))},n.default=G}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/NotificationServicesController.cjs"}],[2341,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.USER_STORAGE_VERSION_KEY=n.USER_STORAGE_VERSION=void 0,n.USER_STORAGE_VERSION="1",n.USER_STORAGE_VERSION_KEY="v"}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/constants/constants.cjs"}],[2342,{"./constants.cjs":2341,"./notification-schema.cjs":2343},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./constants.cjs"),n),r(e("./notification-schema.cjs"),n)}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/constants/index.cjs"}],[2343,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r;Object.defineProperty(n,"__esModule",{value:!0}),n.TRIGGERS=n.SUPPORTED_CHAINS=n.CHAIN_SYMBOLS=n.NOTIFICATION_CHAINS=n.NOTIFICATION_CHAINS_ID=n.TRIGGER_TYPES_GROUPS=n.TRIGGER_TYPES_WALLET_SET=n.TRIGGER_TYPES=void 0,function(e){e.FEATURES_ANNOUNCEMENT="features_announcement",e.METAMASK_SWAP_COMPLETED="metamask_swap_completed",e.ERC20_SENT="erc20_sent",e.ERC20_RECEIVED="erc20_received",e.ETH_SENT="eth_sent",e.ETH_RECEIVED="eth_received",e.ROCKETPOOL_STAKE_COMPLETED="rocketpool_stake_completed",e.ROCKETPOOL_UNSTAKE_COMPLETED="rocketpool_unstake_completed",e.LIDO_STAKE_COMPLETED="lido_stake_completed",e.LIDO_WITHDRAWAL_REQUESTED="lido_withdrawal_requested",e.LIDO_WITHDRAWAL_COMPLETED="lido_withdrawal_completed",e.LIDO_STAKE_READY_TO_BE_WITHDRAWN="lido_stake_ready_to_be_withdrawn",e.ERC721_SENT="erc721_sent",e.ERC721_RECEIVED="erc721_received",e.ERC1155_SENT="erc1155_sent",e.ERC1155_RECEIVED="erc1155_received",e.AAVE_V3_HEALTH_FACTOR="aave_v3_health_factor",e.ENS_EXPIRATION="ens_expiration",e.LIDO_STAKING_REWARDS="lido_staking_rewards",e.ROCKETPOOL_STAKING_REWARDS="rocketpool_staking_rewards",e.NOTIONAL_LOAN_EXPIRATION="notional_loan_expiration",e.SPARK_FI_HEALTH_FACTOR="spark_fi_health_factor",e.SNAP="snap"}(s||(n.TRIGGER_TYPES=s={})),n.TRIGGER_TYPES_WALLET_SET=new Set([s.METAMASK_SWAP_COMPLETED,s.ERC20_SENT,s.ERC20_RECEIVED,s.ETH_SENT,s.ETH_RECEIVED,s.ROCKETPOOL_STAKE_COMPLETED,s.ROCKETPOOL_UNSTAKE_COMPLETED,s.LIDO_STAKE_COMPLETED,s.LIDO_WITHDRAWAL_REQUESTED,s.LIDO_WITHDRAWAL_COMPLETED,s.LIDO_STAKE_READY_TO_BE_WITHDRAWN,s.ERC721_SENT,s.ERC721_RECEIVED,s.ERC1155_SENT,s.ERC1155_RECEIVED]),function(e){e.RECEIVED="received",e.SENT="sent",e.DEFI="defi"}(r||(n.TRIGGER_TYPES_GROUPS=r={})),n.NOTIFICATION_CHAINS_ID={ETHEREUM:"1",OPTIMISM:"10",BSC:"56",POLYGON:"137",ARBITRUM:"42161",AVALANCHE:"43114",LINEA:"59144"},n.NOTIFICATION_CHAINS=n.NOTIFICATION_CHAINS_ID,n.CHAIN_SYMBOLS={[n.NOTIFICATION_CHAINS.ETHEREUM]:"ETH",[n.NOTIFICATION_CHAINS.OPTIMISM]:"ETH",[n.NOTIFICATION_CHAINS.BSC]:"BNB",[n.NOTIFICATION_CHAINS.POLYGON]:"POL",[n.NOTIFICATION_CHAINS.ARBITRUM]:"ETH",[n.NOTIFICATION_CHAINS.AVALANCHE]:"AVAX",[n.NOTIFICATION_CHAINS.LINEA]:"ETH"},n.SUPPORTED_CHAINS=[n.NOTIFICATION_CHAINS.ETHEREUM,n.NOTIFICATION_CHAINS.OPTIMISM,n.NOTIFICATION_CHAINS.BSC,n.NOTIFICATION_CHAINS.POLYGON,n.NOTIFICATION_CHAINS.ARBITRUM,n.NOTIFICATION_CHAINS.AVALANCHE,n.NOTIFICATION_CHAINS.LINEA],n.TRIGGERS={[s.METAMASK_SWAP_COMPLETED]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM,n.NOTIFICATION_CHAINS.OPTIMISM,n.NOTIFICATION_CHAINS.BSC,n.NOTIFICATION_CHAINS.POLYGON,n.NOTIFICATION_CHAINS.ARBITRUM,n.NOTIFICATION_CHAINS.AVALANCHE]},[s.ERC20_SENT]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM,n.NOTIFICATION_CHAINS.OPTIMISM,n.NOTIFICATION_CHAINS.BSC,n.NOTIFICATION_CHAINS.POLYGON,n.NOTIFICATION_CHAINS.ARBITRUM,n.NOTIFICATION_CHAINS.AVALANCHE,n.NOTIFICATION_CHAINS.LINEA]},[s.ERC20_RECEIVED]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM,n.NOTIFICATION_CHAINS.OPTIMISM,n.NOTIFICATION_CHAINS.BSC,n.NOTIFICATION_CHAINS.POLYGON,n.NOTIFICATION_CHAINS.ARBITRUM,n.NOTIFICATION_CHAINS.AVALANCHE,n.NOTIFICATION_CHAINS.LINEA]},[s.ERC721_SENT]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM,n.NOTIFICATION_CHAINS.POLYGON]},[s.ERC721_RECEIVED]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM,n.NOTIFICATION_CHAINS.POLYGON]},[s.ERC1155_SENT]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM,n.NOTIFICATION_CHAINS.POLYGON]},[s.ERC1155_RECEIVED]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM,n.NOTIFICATION_CHAINS.POLYGON]},[s.ETH_SENT]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM,n.NOTIFICATION_CHAINS.OPTIMISM,n.NOTIFICATION_CHAINS.BSC,n.NOTIFICATION_CHAINS.POLYGON,n.NOTIFICATION_CHAINS.ARBITRUM,n.NOTIFICATION_CHAINS.AVALANCHE,n.NOTIFICATION_CHAINS.LINEA]},[s.ETH_RECEIVED]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM,n.NOTIFICATION_CHAINS.OPTIMISM,n.NOTIFICATION_CHAINS.BSC,n.NOTIFICATION_CHAINS.POLYGON,n.NOTIFICATION_CHAINS.ARBITRUM,n.NOTIFICATION_CHAINS.AVALANCHE,n.NOTIFICATION_CHAINS.LINEA]},[s.ROCKETPOOL_STAKE_COMPLETED]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM]},[s.ROCKETPOOL_UNSTAKE_COMPLETED]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM]},[s.LIDO_STAKE_COMPLETED]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM]},[s.LIDO_WITHDRAWAL_REQUESTED]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM]},[s.LIDO_WITHDRAWAL_COMPLETED]:{supported_chains:[n.NOTIFICATION_CHAINS.ETHEREUM]}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/constants/notification-schema.cjs"}],[2344,{"../shared/index.cjs":2374,"./NotificationServicesController.cjs":2340,"./constants/index.cjs":2342,"./mocks/index.cjs":2345,"./processors/index.cjs":2352,"./ui/index.cjs":2360},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)},a=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)&&s(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.UI=n.Mocks=n.Constants=n.Processors=n.Controller=void 0;const c=o(e("./NotificationServicesController.cjs"));n.Controller=c.default;const u=c.default;n.default=u,i(e("./NotificationServicesController.cjs"),n),n.Processors=a(e("./processors/index.cjs")),i(e("./processors/index.cjs"),n),n.Constants=a(e("./constants/index.cjs")),i(e("./constants/index.cjs"),n),n.Mocks=a(e("./mocks/index.cjs")),n.UI=a(e("./ui/index.cjs")),i(e("../shared/index.cjs"),n)}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/index.cjs"}],[2345,{"./mock-feature-announcements.cjs":2346,"./mock-notification-trigger.cjs":2347,"./mock-notification-user-storage.cjs":2348,"./mock-raw-notifications.cjs":2349,"./mock-snap-notification.cjs":2350,"./mockResponses.cjs":2351},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./mock-feature-announcements.cjs"),n),r(e("./mock-notification-trigger.cjs"),n),r(e("./mock-notification-user-storage.cjs"),n),r(e("./mock-raw-notifications.cjs"),n),r(e("./mockResponses.cjs"),n),r(e("./mock-snap-notification.cjs"),n)}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/mocks/index.cjs"}],[2346,{"../constants/notification-schema.cjs":2343},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createMockFeatureAnnouncementRaw=n.createMockFeatureAnnouncementAPIResult=void 0;const s=e("../constants/notification-schema.cjs");n.createMockFeatureAnnouncementAPIResult=function(){return{sys:{type:"Array"},total:17,skip:0,limit:1,items:[{metadata:{tags:[]},sys:{space:{sys:{type:"Link",linkType:"Space",id:"jdkgyfmyd9sw"}},id:"1ABRmHaNCgmxROKXXLXsMu",type:"Entry",createdAt:"2024-04-09T13:24:01.872Z",updatedAt:"2024-04-09T13:24:01.872Z",environment:{sys:{id:"master",type:"Link",linkType:"Environment"}},revision:1,contentType:{sys:{type:"Link",linkType:"ContentType",id:"productAnnouncement"}},locale:"en-US"},fields:{title:"Dont miss out on airdrops and new NFT mints!",id:"dont-miss-out-on-airdrops-and-new-nft-mints",category:"ANNOUNCEMENT",shortDescription:"Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started. ",image:{sys:{type:"Link",linkType:"Asset",id:"5jqq8sFeLc6XEoeWlpI3aB"}},longDescription:{data:{},content:[{data:{},content:[{data:{},marks:[],value:"You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. Weve also added trending NFT mints based on creators youve minted from before or other tokens you hold. Head over to the Explore tab to get started. \n",nodeType:"text"}],nodeType:"paragraph"}],nodeType:"document"},link:{sys:{type:"Link",linkType:"Entry",id:"62xKYM2ydo4F1mS5q97K5q"}}}}],includes:{Entry:[{metadata:{tags:[]},sys:{space:{sys:{type:"Link",linkType:"Space",id:"jdkgyfmyd9sw"}},id:"62xKYM2ydo4F1mS5q97K5q",type:"Entry",createdAt:"2024-04-09T13:23:03.636Z",updatedAt:"2024-04-09T13:23:03.636Z",environment:{sys:{id:"master",type:"Link",linkType:"Environment"}},revision:1,contentType:{sys:{type:"Link",linkType:"ContentType",id:"link"}},locale:"en-US"},fields:{extensionLinkText:"Try now",extensionLinkRoute:"home.html"}}],Asset:[{metadata:{tags:[]},sys:{space:{sys:{type:"Link",linkType:"Space",id:"jdkgyfmyd9sw"}},id:"5jqq8sFeLc6XEoeWlpI3aB",type:"Asset",createdAt:"2024-04-09T13:23:13.327Z",updatedAt:"2024-04-09T13:23:13.327Z",environment:{sys:{id:"master",type:"Link",linkType:"Environment"}},revision:1,locale:"en-US"},fields:{title:"PDAPP notification image Airdrops & NFT mints",description:"",file:{url:"//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png",details:{size:797731,image:{width:2880,height:1921}},fileName:"PDAPP notification image_Airdrops & NFT mints.png",contentType:"image/png"}}}]}}},n.createMockFeatureAnnouncementRaw=function(){return{type:s.TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,createdAt:"2999-04-09T13:24:01.872Z",data:{id:"dont-miss-out-on-airdrops-and-new-nft-mints",category:"ANNOUNCEMENT",title:"Dont miss out on airdrops and new NFT mints!",longDescription:"<p>You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. Weve also added trending NFT mints based on creators youve minted from before or other tokens you hold. Head over to the Explore tab to get started.</p>",shortDescription:"Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started.",image:{title:"PDAPP notification image Airdrops & NFT mints",description:"",url:"//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png"},extensionLink:{extensionLinkText:"Try now",extensionLinkRoute:"home.html"}}}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/mocks/mock-feature-announcements.cjs"}],[2347,{uuid:5663},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createMockNotificationTrigger=void 0;const s=e("uuid");n.createMockNotificationTrigger=function(e){return{id:(0,s.v4)(),address:"0xFAKE_ADDRESS",chainId:"1",kind:"eth_sent",enabled:!0,...e}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/mocks/mock-notification-trigger.cjs"}],[2348,{"../constants/constants.cjs":2341,"../constants/notification-schema.cjs":2343,"../utils/utils.cjs":2361},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createMockFullUserStorage=n.createMockUserStorageWithTriggers=n.createMockUserStorage=n.MOCK_USER_STORAGE_CHAIN=n.MOCK_USER_STORAGE_ACCOUNT=void 0;const s=e("../constants/constants.cjs"),r=e("../constants/notification-schema.cjs"),i=e("../utils/utils.cjs");n.MOCK_USER_STORAGE_ACCOUNT="0x0000000000000000000000000000000000000000",n.MOCK_USER_STORAGE_CHAIN="1",n.createMockUserStorage=function(e){return{[s.USER_STORAGE_VERSION_KEY]:"1",[n.MOCK_USER_STORAGE_ACCOUNT]:{[n.MOCK_USER_STORAGE_CHAIN]:{"111-111-111-111":{k:r.TRIGGER_TYPES.ERC20_RECEIVED,e:!0},"222-222-222-222":{k:r.TRIGGER_TYPES.ERC20_SENT,e:!0}}},...e}},n.createMockUserStorageWithTriggers=function(e){const t={[s.USER_STORAGE_VERSION_KEY]:"1",[n.MOCK_USER_STORAGE_ACCOUNT]:{[n.MOCK_USER_STORAGE_CHAIN]:{}}};return e.forEach((e=>{let s,i,a;"string"==typeof e?(s=e,i=!0,a=r.TRIGGER_TYPES.ERC20_RECEIVED):(s=e.id,i=e.e,a=e.k??r.TRIGGER_TYPES.ERC20_RECEIVED),t[n.MOCK_USER_STORAGE_ACCOUNT][n.MOCK_USER_STORAGE_CHAIN][s]={k:a,e:i}})),t},n.createMockFullUserStorage=function(e={}){return(0,i.initializeUserStorage)([{address:e.address??n.MOCK_USER_STORAGE_ACCOUNT}],e.triggersEnabled??!0,!1)}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/mocks/mock-notification-user-storage.cjs"}],[2349,{"../constants/notification-schema.cjs":2343},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createMockRawOnChainNotifications=n.createMockNotificationSparkFiHealthFactor=n.createMockNotificationRocketpoolStakingRewards=n.createMockNotificationNotionalLoanExpiration=n.createMockNotificationLidoStakingRewards=n.createMockNotificationEnsExpiration=n.createMockNotificationAaveV3HealthFactor=n.createMockNotificationLidoReadyToBeWithdrawn=n.createMockNotificationLidoWithdrawalCompleted=n.createMockNotificationLidoWithdrawalRequested=n.createMockNotificationLidoStakeCompleted=n.createMockNotificationRocketPoolUnStakeCompleted=n.createMockNotificationRocketPoolStakeCompleted=n.createMockNotificationMetaMaskSwapsCompleted=n.createMockNotificationERC1155Received=n.createMockNotificationERC1155Sent=n.createMockNotificationERC721Received=n.createMockNotificationERC721Sent=n.createMockNotificationERC20Received=n.createMockNotificationERC20Sent=n.createMockNotificationEthReceived=n.createMockNotificationEthSent=void 0;const s=e("../constants/notification-schema.cjs");function r(){return{type:s.TRIGGER_TYPES.ETH_SENT,id:"3fa85f64-5717-4562-b3fc-2c963f66afa7",trigger_id:"3fa85f64-5717-4562-b3fc-2c963f66afa7",chain_id:1,block_number:17485840,block_timestamp:"2022-03-01T00:00:00Z",tx_hash:"0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6",unread:!0,created_at:"2022-03-01T00:00:00Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"eth_sent",network_fee:{gas_price:"207806259583",native_token_price_in_usd:"0.83"},from:"0x881D40237659C251811CEC9c364ef91dC08D300C",to:"0x881D40237659C251811CEC9c364ef91dC08D300D",amount:{usd:"670.64",eth:"0.005"}}}}n.createMockNotificationEthSent=r,n.createMockNotificationEthReceived=function(){return{type:s.TRIGGER_TYPES.ETH_RECEIVED,id:"3fa85f64-5717-4562-b3fc-2c963f66afa8",trigger_id:"3fa85f64-5717-4562-b3fc-2c963f66afa8",chain_id:1,block_number:17485840,block_timestamp:"2022-03-01T00:00:00Z",tx_hash:"0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6",unread:!0,created_at:"2022-03-01T00:00:00Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"eth_received",network_fee:{gas_price:"207806259583",native_token_price_in_usd:"0.83"},from:"0x881D40237659C251811CEC9c364ef91dC08D300C",to:"0x881D40237659C251811CEC9c364ef91dC08D300D",amount:{usd:"670.64",eth:"808.000000000000000000"}}}},n.createMockNotificationERC20Sent=function(){return{type:s.TRIGGER_TYPES.ERC20_SENT,id:"3fa85f64-5717-4562-b3fc-2c963f66afa9",trigger_id:"3fa85f64-5717-4562-b3fc-2c963f66afa9",chain_id:1,block_number:17485840,block_timestamp:"2022-03-01T00:00:00Z",tx_hash:"0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6",unread:!0,created_at:"2022-03-01T00:00:00Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"erc20_sent",network_fee:{gas_price:"207806259583",native_token_price_in_usd:"0.83"},to:"0xecc19e177d24551aa7ed6bc6fe566eca726cc8a9",from:"0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae",token:{usd:"1.00",name:"USDC",image:"https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/usdc.svg",amount:"4956250000",symbol:"USDC",address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",decimals:"6"}}}},n.createMockNotificationERC20Received=function(){return{type:s.TRIGGER_TYPES.ERC20_RECEIVED,id:"3fa85f64-5717-4562-b3fc-2c963f66afa6",trigger_id:"3fa85f64-5717-4562-b3fc-2c963f66afa6",chain_id:1,block_number:17485840,block_timestamp:"2022-03-01T00:00:00Z",tx_hash:"0xb2256b183f2fb3872f99294ab55fb03e6a479b0d4aca556a3b27568b712505a6",unread:!0,created_at:"2022-03-01T00:00:00Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"erc20_received",network_fee:{gas_price:"207806259583",native_token_price_in_usd:"0.83"},to:"0xeae7380dd4cef6fbd1144f49e4d1e6964258a4f4",from:"0x51c72848c68a965f66fa7a88855f9f7784502a7f",token:{usd:"0.00",name:"SHIBA INU",image:"https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/shib.svg",amount:"8382798736999999457296646144",symbol:"SHIB",address:"0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce",decimals:"18"}}}},n.createMockNotificationERC721Sent=function(){return{type:s.TRIGGER_TYPES.ERC721_SENT,block_number:18576643,block_timestamp:"1700043467",chain_id:1,created_at:"2023-11-15T11:08:17.895407Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{to:"0xf47f628fe3bd2595e9ab384bfffc3859b448e451",nft:{name:"Captainz #8680",image:"https://i.seadn.io/s/raw/files/ae0fc06714ff7fb40217340d8a242c0e.gif?w=500&auto=format",token_id:"8680",collection:{name:"The Captainz",image:"https://i.seadn.io/gcs/files/6df4d75778066bce740050615bc84e21.png?w=500&auto=format",symbol:"Captainz",address:"0x769272677fab02575e84945f03eca517acc544cc"}},from:"0x24a0bb54b7e7a8e406e9b28058a9fd6c49e6df4f",kind:"erc721_sent",network_fee:{gas_price:"24550653274",native_token_price_in_usd:"1986.61"}},id:"a4193058-9814-537e-9df4-79dcac727fb6",trigger_id:"028485be-b994-422b-a93b-03fcc01ab715",tx_hash:"0x0833c69fb41cf972a0f031fceca242939bc3fcf82b964b74606649abcad371bd",unread:!0}},n.createMockNotificationERC721Received=function(){return{type:s.TRIGGER_TYPES.ERC721_RECEIVED,block_number:18571446,block_timestamp:"1699980623",chain_id:1,created_at:"2023-11-14T17:40:52.319281Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{to:"0xba7f3daa8adfdad686574406ab9bd5d2f0a49d2e",nft:{name:"The Plague #2722",image:"https://i.seadn.io/s/raw/files/a96f90ec8ebf55a2300c66a0c46d6a16.png?w=500&auto=format",token_id:"2722",collection:{name:"The Plague NFT",image:"https://i.seadn.io/gcs/files/4577987a5ca45ca5118b2e31559ee4d1.jpg?w=500&auto=format",symbol:"FROG",address:"0xc379e535caff250a01caa6c3724ed1359fe5c29b"}},from:"0x24a0bb54b7e7a8e406e9b28058a9fd6c49e6df4f",kind:"erc721_received",network_fee:{gas_price:"53701898538",native_token_price_in_usd:"2047.01"}},id:"00a79d24-befa-57ed-a55a-9eb8696e1654",trigger_id:"d24ac26a-8579-49ec-9947-d04d63592ebd",tx_hash:"0xe554c9e29e6eeca8ba94da4d047334ba08b8eb9ca3b801dd69cec08dfdd4ae43",unread:!0}},n.createMockNotificationERC1155Sent=function(){return{type:s.TRIGGER_TYPES.ERC1155_SENT,block_number:18615206,block_timestamp:"1700510003",chain_id:1,created_at:"2023-11-20T20:44:10.110706Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{to:"0x15bd77ccacf2da39b84f0c31fee2e451225bb190",nft:{name:"IlluminatiNFT DAO",image:"https://i.seadn.io/gcs/files/79a77cb37c7b2f1069f752645d29fea7.jpg?w=500&auto=format",token_id:"1",collection:{name:"IlluminatiNFT DAO",image:"https://i.seadn.io/gae/LTKz3om2eCQfn3M6PkqEmY7KhLtdMCOm0QVch2318KJq7-KyToCH7NBTMo4UuJ0AZI-oaBh1HcgrAEIEWYbXY3uMcYpuGXunaXEh?w=500&auto=format",symbol:"TRUTH",address:"0xe25f0fe686477f9df3c2876c4902d3b85f75f33a"}},from:"0x0000000000000000000000000000000000000000",kind:"erc1155_sent",network_fee:{gas_price:"33571446596",native_token_price_in_usd:"2038.88"}},id:"a09ff9d1-623a-52ab-a3d4-c7c8c9a58362",trigger_id:"e2130f7d-78b8-4c34-999a-3f3d3bb5b03c",tx_hash:"0x03381aba290facbaf71c123e263c8dc3dd550aac00ef589cce395182eaeff76f",unread:!0}},n.createMockNotificationERC1155Received=function(){return{type:s.TRIGGER_TYPES.ERC1155_RECEIVED,block_number:18615206,block_timestamp:"1700510003",chain_id:1,created_at:"2023-11-20T20:44:10.110706Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{to:"0x15bd77ccacf2da39b84f0c31fee2e451225bb190",nft:{name:"IlluminatiNFT DAO",image:"https://i.seadn.io/gcs/files/79a77cb37c7b2f1069f752645d29fea7.jpg?w=500&auto=format",token_id:"1",collection:{name:"IlluminatiNFT DAO",image:"https://i.seadn.io/gae/LTKz3om2eCQfn3M6PkqEmY7KhLtdMCOm0QVch2318KJq7-KyToCH7NBTMo4UuJ0AZI-oaBh1HcgrAEIEWYbXY3uMcYpuGXunaXEh?w=500&auto=format",symbol:"TRUTH",address:"0xe25f0fe686477f9df3c2876c4902d3b85f75f33a"}},from:"0x0000000000000000000000000000000000000000",kind:"erc1155_received",network_fee:{gas_price:"33571446596",native_token_price_in_usd:"2038.88"}},id:"b6b93c84-e8dc-54ed-9396-7ea50474843a",trigger_id:"710c8abb-43a9-42a5-9d86-9dd258726c82",tx_hash:"0x03381aba290facbaf71c123e263c8dc3dd550aac00ef589cce395182eaeff76f",unread:!0}},n.createMockNotificationMetaMaskSwapsCompleted=function(){return{type:s.TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,block_number:18377666,block_timestamp:"1697637275",chain_id:1,created_at:"2023-10-18T13:58:49.854596Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"metamask_swap_completed",rate:"1558.27",token_in:{usd:"1576.73",image:"https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg",amount:"9000000000000000",symbol:"ETH",address:"0x0000000000000000000000000000000000000000",decimals:"18",name:"Ethereum"},token_out:{usd:"1.00",image:"https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/usdt.svg",amount:"14024419",symbol:"USDT",address:"0xdac17f958d2ee523a2206206994597c13d831ec7",decimals:"6",name:"USDT"},network_fee:{gas_price:"15406129273",native_token_price_in_usd:"1576.73"}},id:"7ddfe6a1-ac52-5ffe-aa40-f04242db4b8b",trigger_id:"d2eaa2eb-2e6e-4fd5-8763-b70ea571b46c",tx_hash:"0xf69074290f3aa11bce567aabc9ca0df7a12559dfae1b80ba1a124e9dfe19ecc5",unread:!0}},n.createMockNotificationRocketPoolStakeCompleted=function(){return{type:s.TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,block_number:18585057,block_timestamp:"1700145059",chain_id:1,created_at:"2023-11-20T12:02:48.796824Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"rocketpool_stake_completed",stake_in:{usd:"2031.86",name:"Ethereum",image:"https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg",amount:"190690478063438272",symbol:"ETH",address:"0x0000000000000000000000000000000000000000",decimals:"18"},stake_out:{usd:"2226.49",name:"Rocket Pool ETH",image:"https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/rETH.svg",amount:"175024360778165879",symbol:"RETH",address:"0xae78736Cd615f374D3085123A210448E74Fc6393",decimals:"18"},network_fee:{gas_price:"36000000000",native_token_price_in_usd:"2031.86"}},id:"c2a2f225-b2fb-5d6c-ba56-e27a5c71ffb9",trigger_id:"5110ff97-acff-40c0-83b4-11d487b8c7b0",tx_hash:"0xcfc0693bf47995907b0f46ef0644cf16dd9a0de797099b2e00fd481e1b2117d3",unread:!0}},n.createMockNotificationRocketPoolUnStakeCompleted=function(){return{type:s.TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,block_number:18384336,block_timestamp:"1697718011",chain_id:1,created_at:"2023-10-19T13:11:10.623042Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"rocketpool_unstake_completed",stake_in:{usd:"1686.34",image:"https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/rETH.svg",amount:"66608041413696770",symbol:"RETH",address:"0xae78736Cd615f374D3085123A210448E74Fc6393",decimals:"18",name:"Rocketpool Eth"},stake_out:{usd:"1553.75",image:"https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg",amount:"72387843427700824",symbol:"ETH",address:"0x0000000000000000000000000000000000000000",decimals:"18",name:"Ethereum"},network_fee:{gas_price:"5656322987",native_token_price_in_usd:"1553.75"}},id:"291ec897-f569-4837-b6c0-21001b198dff",trigger_id:"291ec897-f569-4837-b6c0-21001b198dff",tx_hash:"0xc7972a7e409abfc62590ec90e633acd70b9b74e76ad02305be8bf133a0e22d5f",unread:!0}},n.createMockNotificationLidoStakeCompleted=function(){return{type:s.TRIGGER_TYPES.LIDO_STAKE_COMPLETED,block_number:18487118,block_timestamp:"1698961091",chain_id:1,created_at:"2023-11-02T22:28:49.970865Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"lido_stake_completed",stake_in:{usd:"1806.33",name:"Ethereum",image:"https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg",amount:"330303634023928032",symbol:"ETH",address:"0x0000000000000000000000000000000000000000",decimals:"18"},stake_out:{usd:"1801.30",name:"Liquid staked Ether 2.0",image:"https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg",amount:"330303634023928032",symbol:"STETH",address:"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",decimals:"18"},network_fee:{gas_price:"26536359866",native_token_price_in_usd:"1806.33"}},id:"ec10d66a-f78f-461f-83c9-609aada8cc50",trigger_id:"ec10d66a-f78f-461f-83c9-609aada8cc50",tx_hash:"0x8cc0fa805f7c3b1743b14f3b91c6b824113b094f26d4ccaf6a71ad8547ce6a0f",unread:!0}},n.createMockNotificationLidoWithdrawalRequested=function(){return{type:s.TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,block_number:18377760,block_timestamp:"1697638415",chain_id:1,created_at:"2023-10-18T15:04:02.482526Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"lido_withdrawal_requested",stake_in:{usd:"1568.54",image:"https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg",amount:"97180668792218669859",symbol:"STETH",address:"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",decimals:"18",name:"Staked Eth"},stake_out:{usd:"1576.73",image:"https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg",amount:"97180668792218669859",symbol:"ETH",address:"0x0000000000000000000000000000000000000000",decimals:"18",name:"Ethereum"},network_fee:{gas_price:"11658906980",native_token_price_in_usd:"1576.73"}},id:"ef003925-3379-4ba7-9e2d-8218690cadc9",trigger_id:"ef003925-3379-4ba7-9e2d-8218690cadc9",tx_hash:"0x58b5f82e084cb750ea174e02b20fbdfd2ba8d78053deac787f34fc38e5d427aa",unread:!0}},n.createMockNotificationLidoWithdrawalCompleted=function(){return{type:s.TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,block_number:18378208,block_timestamp:"1697643851",chain_id:1,created_at:"2023-10-18T16:35:03.147606Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"lido_withdrawal_completed",stake_in:{usd:"1570.23",image:"https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/stETH.svg",amount:"35081997661451346",symbol:"STETH",address:"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",decimals:"18",name:"Staked Eth"},stake_out:{usd:"1571.74",image:"https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg",amount:"35081997661451346",symbol:"ETH",address:"0x0000000000000000000000000000000000000000",decimals:"18",name:"Ethereum"},network_fee:{gas_price:"12699495150",native_token_price_in_usd:"1571.74"}},id:"d73df14d-ce73-4f38-bad3-ab028154042f",trigger_id:"d73df14d-ce73-4f38-bad3-ab028154042f",tx_hash:"0xe6d210d2e601ef3dd1075c48e71452cf35f2daae3886911e964e3babad8ac657",unread:!0}},n.createMockNotificationLidoReadyToBeWithdrawn=function(){return{type:s.TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN,block_number:18378208,block_timestamp:"1697643851",chain_id:1,created_at:"2023-10-18T16:35:03.147606Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"lido_stake_ready_to_be_withdrawn",request_id:"123456789",staked_eth:{address:"0x881D40237659C251811CEC9c364ef91dC08D300F",symbol:"ETH",name:"Ethereum",amount:"2.5",decimals:"18",image:"https://token.api.cx.metamask.io/assets/nativeCurrencyLogos/ethereum.svg",usd:"10000.00"}},id:"d73df14d-ce73-4f38-bad3-ab028154042e",trigger_id:"d73df14d-ce73-4f38-bad3-ab028154042e",tx_hash:"0xe6d210d2e601ef3dd1075c48e71452cf35f2daae3886911e964e3babad8ac657",unread:!0}},n.createMockNotificationAaveV3HealthFactor=function(){return{type:s.TRIGGER_TYPES.AAVE_V3_HEALTH_FACTOR,chain_id:1,created_at:"2023-10-18T16:35:03.147606Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"aave_v3_health_factor",chainId:1,healthFactor:"3.4",threshold:"5.5"},id:"d73df14d-ce73-4f38-bad3-ab028154042b",trigger_id:"d73df14d-ce73-4f38-bad3-ab028154042b",unread:!0}},n.createMockNotificationEnsExpiration=function(){return{type:s.TRIGGER_TYPES.ENS_EXPIRATION,chain_id:1,created_at:"2023-10-18T16:35:03.147606Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"ens_expiration",chainId:1,reverseEnsName:"vitalik.eth",expirationDateIso:"2024-01-01T00:00:00Z",reminderDelayInSeconds:86400},id:"f4ef0b7f-5612-537f-9144-0b5c63ae5391",trigger_id:"d73df14d-ce73-4f38-bad3-ab028154042c",unread:!0}},n.createMockNotificationLidoStakingRewards=function(){return{type:s.TRIGGER_TYPES.LIDO_STAKING_REWARDS,chain_id:1,created_at:"2023-10-18T16:35:03.147606Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"lido_staking_rewards",chainId:1,currentStethBalance:"10",currentEthValue:"10.5",estimatedTotalRewardInPeriod:"0.5",daysSinceLastNotification:30,notificationIntervalDays:30},id:"d73df14d-ce73-4f38-bad3-ab028154042l",trigger_id:"d73df14d-ce73-4f38-bad3-ab028154042l",unread:!0}},n.createMockNotificationNotionalLoanExpiration=function(){return{type:s.TRIGGER_TYPES.NOTIONAL_LOAN_EXPIRATION,chain_id:1,created_at:"2023-10-18T16:35:03.147606Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"notional_loan_expiration",chainId:1,loans:[{amount:"1.1234",symbol:"ETH",maturityDateIso:"2024-01-01T00:00:00Z"}],reminderDelayInSeconds:86400},id:"d73df14d-ce73-4f38-bad3-ab028154042n",trigger_id:"d73df14d-ce73-4f38-bad3-ab028154042n",unread:!0}},n.createMockNotificationRocketpoolStakingRewards=function(){return{type:s.TRIGGER_TYPES.ROCKETPOOL_STAKING_REWARDS,chain_id:1,created_at:"2023-10-18T16:35:03.147606Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"rocketpool_staking_rewards",chainId:1,currentRethBalance:"10",currentEthValue:"10.5",estimatedTotalRewardInPeriod:"0.5",daysSinceLastNotification:30,notificationIntervalDays:30},id:"d73df14d-ce73-4f38-bad3-ab028154042r",trigger_id:"d73df14d-ce73-4f38-bad3-ab028154042r",unread:!0}},n.createMockNotificationSparkFiHealthFactor=function(){return{type:s.TRIGGER_TYPES.SPARK_FI_HEALTH_FACTOR,chain_id:1,created_at:"2023-10-18T16:35:03.147606Z",address:"0x881D40237659C251811CEC9c364ef91dC08D300C",data:{kind:"spark_fi_health_factor",chainId:1,healthFactor:"3.4",threshold:"5.5"},id:"d73df14d-ce73-4f38-bad3-ab028154042s",trigger_id:"d73df14d-ce73-4f38-bad3-ab028154042s",unread:!0}},n.createMockRawOnChainNotifications=function(){return[1,2,3].map((e=>{const t=r();return t.id+=`-${e}`,t}))}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs"}],[2350,{"../constants/index.cjs":2342},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createMockSnapNotification=void 0;const s=e("../constants/index.cjs");n.createMockSnapNotification=function(){return{type:s.TRIGGER_TYPES.SNAP,readDate:null,data:{message:"fooBar",origin:"@metamask/example-snap",detailedView:{title:"Detailed View",interfaceId:"1",footerLink:{text:"Go Home",href:"metamask://client/"}}}}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/mocks/mock-snap-notification.cjs"}],[2351,{"../services/feature-announcements.cjs":2357,"../services/onchain-notifications.cjs":2358,"./mock-feature-announcements.cjs":2346,"./mock-raw-notifications.cjs":2349},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getMockMarkNotificationsAsReadResponse=n.getMockListNotificationsResponse=n.MOCK_RAW_ON_CHAIN_NOTIFICATIONS=n.getMockBatchDeleteTriggersResponse=n.getMockBatchCreateTriggersResponse=n.getMockFeatureAnnouncementResponse=n.CONTENTFUL_RESPONSE=void 0;const s=e("./mock-feature-announcements.cjs"),r=e("./mock-raw-notifications.cjs"),i=e("../services/feature-announcements.cjs"),a=e("../services/onchain-notifications.cjs");n.CONTENTFUL_RESPONSE=(0,s.createMockFeatureAnnouncementAPIResult)();n.getMockFeatureAnnouncementResponse=()=>({url:i.FEATURE_ANNOUNCEMENT_API,requestMethod:"GET",response:n.CONTENTFUL_RESPONSE});n.getMockBatchCreateTriggersResponse=()=>({url:a.TRIGGER_API_BATCH_ENDPOINT,requestMethod:"POST",response:null});n.getMockBatchDeleteTriggersResponse=()=>({url:a.TRIGGER_API_BATCH_ENDPOINT,requestMethod:"DELETE",response:null}),n.MOCK_RAW_ON_CHAIN_NOTIFICATIONS=(0,r.createMockRawOnChainNotifications)();n.getMockListNotificationsResponse=()=>({url:a.NOTIFICATION_API_LIST_ENDPOINT,requestMethod:"POST",response:n.MOCK_RAW_ON_CHAIN_NOTIFICATIONS});n.getMockMarkNotificationsAsReadResponse=()=>({url:a.NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT,requestMethod:"POST",response:null})}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/mocks/mockResponses.cjs"}],[2352,{"./process-feature-announcement.cjs":2353,"./process-notifications.cjs":2354,"./process-onchain-notifications.cjs":2355},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./process-feature-announcement.cjs"),n),r(e("./process-notifications.cjs"),n),r(e("./process-onchain-notifications.cjs"),n)}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/processors/index.cjs"}],[2353,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.processFeatureAnnouncement=n.isFeatureAnnouncementRead=void 0;n.isFeatureAnnouncementRead=function(e,t){return!!t.includes(e.id)||(n=new Date(e.createdAt),(Date.now()-n.getTime())/864e5>=90);var n},n.processFeatureAnnouncement=function(e){return{type:e.type,id:e.data.id,createdAt:new Date(e.createdAt).toISOString(),data:e.data,isRead:!1}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/processors/process-feature-announcement.cjs"}],[2354,{"../constants/notification-schema.cjs":2343,"./process-feature-announcement.cjs":2353,"./process-onchain-notifications.cjs":2355,"./process-snap-notifications.cjs":2356},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.safeProcessNotification=n.processNotification=void 0;const s=e("./process-feature-announcement.cjs"),r=e("./process-onchain-notifications.cjs"),i=e("./process-snap-notifications.cjs"),a=e("../constants/notification-schema.cjs"),o=e=>Object.values(a.TRIGGER_TYPES).includes(e.type),c=e=>e.type===a.TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,u=e=>e.type===a.TRIGGER_TYPES.SNAP;function l(e,t=[]){if(c(e)){const n=(0,s.processFeatureAnnouncement)(e);return n.isRead=(0,s.isFeatureAnnouncementRead)(n,t),n}return u(e)?(0,i.processSnapNotification)(e):o(e)?(0,r.processOnChainNotification)(e):(t=>{const n=e?.type;throw new Error(`No processor found for notification kind ${n}`)})()}n.processNotification=l,n.safeProcessNotification=function(e,t=[]){try{return l(e,t)}catch{return undefined}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/processors/process-notifications.cjs"}],[2355,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.processOnChainNotification=void 0,n.processOnChainNotification=function(e){return{...e,id:e.id,createdAt:new Date(e.created_at).toISOString(),isRead:!e.unread}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/processors/process-onchain-notifications.cjs"}],[2356,{uuid:5663},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.processSnapNotification=void 0;const s=e("uuid");n.processSnapNotification=e=>{const{data:t,type:n,readDate:r}=e;return{id:(0,s.v4)(),readDate:r,createdAt:(new Date).toISOString(),isRead:!1,type:n,data:t}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/processors/process-snap-notifications.cjs"}],[2357,{"../constants/notification-schema.cjs":2343,"../processors/process-feature-announcement.cjs":2353,"@contentful/rich-text-html-renderer":404},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getFeatureAnnouncementNotifications=n.getFeatureAnnouncementUrl=n.FEATURE_ANNOUNCEMENT_URL=n.FEATURE_ANNOUNCEMENT_API=void 0;const s=e("@contentful/rich-text-html-renderer"),r=e("../constants/notification-schema.cjs"),i=e("../processors/process-feature-announcement.cjs"),a=":space_id",o=":access_token",c=":client_id",u="cdn.contentful.com";n.FEATURE_ANNOUNCEMENT_API=`https://${u}/spaces/${a}/environments/master/entries`,n.FEATURE_ANNOUNCEMENT_URL=`${n.FEATURE_ANNOUNCEMENT_API}?access_token=${o}&content_type=productAnnouncement&include=10&fields.clients[in]=${c}`;n.getFeatureAnnouncementUrl=(e,t)=>{const s=t?"preview.contentful.com":u,r=n.FEATURE_ANNOUNCEMENT_URL.replace(a,e.spaceId).replace(o,t||e.accessToken).replace(c,e.platform).replace(u,s);return encodeURI(r)};n.getFeatureAnnouncementNotifications=async function(e,t){if(e?.accessToken&&e?.spaceId&&e?.platform){const a=await(async(e,t)=>{const i=(0,n.getFeatureAnnouncementUrl)(e,t),a=await fetch(i).then((e=>e.json())).catch((()=>null));if(!a)return[];const o=e=>{const t=a,n=t?.includes?.Entry?.find((t=>t?.sys?.id===e))||t?.includes?.Asset?.find((t=>t?.sys?.id===e));return n?n?.fields:null};return(a?.items??[]).map((e=>{const{fields:t}=e,n=t.image?o(t.image.sys.id):undefined,i=t.externalLink?o(t.externalLink.sys.id):undefined,a=t.portfolioLink?o(t.portfolioLink.sys.id):undefined,c=t.extensionLink?o(t.extensionLink.sys.id):undefined,u=t.mobileLink?o(t.mobileLink.sys.id):undefined;return{type:r.TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,createdAt:new Date(e.sys.createdAt).toString(),data:{id:t.id,category:t.category,title:t.title,longDescription:(0,s.documentToHtmlString)(t.longDescription),shortDescription:t.shortDescription,image:{title:n?.title,description:n?.description,url:n?.file?.url??""},externalLink:i&&{externalLinkText:i?.externalLinkText,externalLinkUrl:i?.externalLinkUrl},portfolioLink:a&&{portfolioLinkText:a?.portfolioLinkText,portfolioLinkUrl:a?.portfolioLinkUrl},extensionLink:c&&{extensionLinkText:c?.extensionLinkText,extensionLinkRoute:c?.extensionLinkRoute},mobileLink:u&&{mobileLinkText:u?.mobileLinkText,mobileLinkUrl:u?.mobileLinkUrl}}}}))})(e,t);return a.map((e=>(0,i.processFeatureAnnouncement)(e)))}return[]}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/services/feature-announcements.cjs"}],[2358,{"../../shared/to-raw-notification.cjs":2376,"../utils/utils.cjs":2361,"@metamask/profile-sync-controller":2454,loglevel:4863},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.markNotificationsAsRead=n.getOnChainNotifications=n.deleteOnChainTriggers=n.createOnChainTriggers=n.NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT=n.NOTIFICATION_API_LIST_ENDPOINT_PAGE_QUERY=n.NOTIFICATION_API_LIST_ENDPOINT=n.TRIGGER_API_BATCH_ENDPOINT=n.NOTIFICATION_API=n.TRIGGER_API=void 0;const r=e("@metamask/profile-sync-controller"),i=s(e("loglevel")),a=e("../../shared/to-raw-notification.cjs"),o=e("../utils/utils.cjs");n.TRIGGER_API="https://trigger.api.cx.metamask.io",n.NOTIFICATION_API="https://notification.api.cx.metamask.io",n.TRIGGER_API_BATCH_ENDPOINT=`${n.TRIGGER_API}/api/v1/triggers/batch`,n.NOTIFICATION_API_LIST_ENDPOINT=`${n.NOTIFICATION_API}/api/v1/notifications`;n.NOTIFICATION_API_LIST_ENDPOINT_PAGE_QUERY=e=>`${n.NOTIFICATION_API_LIST_ENDPOINT}?page=${e}&per_page=100`,n.NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT=`${n.NOTIFICATION_API}/api/v1/notifications/mark-as-read`,n.createOnChainTriggers=async function(e,t,s,a){const c=a.map((e=>({id:e.id,token:r.UserStorageController.createSHA256Hash(e.id+t),config:{kind:e.kind,chain_id:Number(e.chainId),address:e.address}})));if(0===c.length)return;const u=await(0,o.makeApiCall)(s,n.TRIGGER_API_BATCH_ENDPOINT,"POST",c);if(!u.ok){const e=await u.json().catch((()=>undefined));throw i.default.error("Error creating triggers:",e),new Error("OnChain Notifications - unable to create triggers")}for(const t of c)(0,o.toggleUserStorageTriggerStatus)(e,t.config.address,String(t.config.chain_id),t.id,!0);(0,o.cleanUserStorage)(e)},n.deleteOnChainTriggers=async function(e,t,s,a){const c=a.map((e=>({id:e,token:r.UserStorageController.createSHA256Hash(e+t)})));try{if(!(await(0,o.makeApiCall)(s,n.TRIGGER_API_BATCH_ENDPOINT,"DELETE",c)).ok)throw new Error(`Failed to delete on-chain notifications for uuids ${a.join(", ")}`);for(const t of a)for(const n in e)if(n in e)for(const s in e[n])e?.[n]?.[s]?.[t]&&delete e[n][s][t];const t=(e={})=>0===Object.keys(e).length;for(const n in e)if(n in e){for(const s in e[n])t(e?.[n]?.[s])&&delete e[n][s];t(e?.[n])&&delete e[n]}}catch(e){throw i.default.error(`Error deleting on-chain notifications for uuids ${a.join(", ")}:`,e),e}return e},n.getOnChainNotifications=async function(e,t){const s=(0,o.traverseUserStorageTriggers)(e,{mapTrigger:e=>e.enabled?e.id:undefined});if(0===s.length)return[];const r=[];for(let e=1;e<=2;e++)try{const i=await(0,o.makeApiCall)(t,(0,n.NOTIFICATION_API_LIST_ENDPOINT_PAGE_QUERY)(e),"POST",{trigger_ids:s}),c=await i.json(),u=c.map((e=>e.data?.kind?(0,a.toRawOnChainNotification)(e):undefined)).filter((e=>Boolean(e)));if(r.push(...u),c.length<100){e=3;break}}catch(e){i.default.error(`Error fetching on-chain notifications for trigger IDs ${s.join(", ")}:`,e)}return r},n.markNotificationsAsRead=async function(e,t){if(0!==t.length)try{const s=await(0,o.makeApiCall)(e,n.NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT,"POST",{ids:t});if(200!==s.status){const e=await s.json().catch((()=>undefined));throw new Error(`Error marking notifications as read: ${e?.message}`)}}catch(e){throw i.default.error("Error marking notifications as read:",e),e}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/services/onchain-notifications.cjs"}],[2359,{"../constants/notification-schema.cjs":2343},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.NOTIFICATION_CHAINS_ID=n.SUPPORTED_NOTIFICATION_BLOCK_EXPLORERS=n.NOTIFICATION_NETWORK_CURRENCY_SYMBOL=n.NOTIFICATION_NETWORK_CURRENCY_NAME=void 0;const s=e("../constants/notification-schema.cjs");n.NOTIFICATION_NETWORK_CURRENCY_NAME={[s.NOTIFICATION_CHAINS_ID.ETHEREUM]:"Ethereum",[s.NOTIFICATION_CHAINS_ID.ARBITRUM]:"Arbitrum",[s.NOTIFICATION_CHAINS_ID.AVALANCHE]:"Avalanche",[s.NOTIFICATION_CHAINS_ID.BSC]:"Binance",[s.NOTIFICATION_CHAINS_ID.LINEA]:"Linea",[s.NOTIFICATION_CHAINS_ID.OPTIMISM]:"Optimism",[s.NOTIFICATION_CHAINS_ID.POLYGON]:"Polygon"},n.NOTIFICATION_NETWORK_CURRENCY_SYMBOL={[s.NOTIFICATION_CHAINS_ID.ETHEREUM]:"ETH",[s.NOTIFICATION_CHAINS_ID.ARBITRUM]:"ETH",[s.NOTIFICATION_CHAINS_ID.AVALANCHE]:"AVAX",[s.NOTIFICATION_CHAINS_ID.BSC]:"BNB",[s.NOTIFICATION_CHAINS_ID.LINEA]:"ETH",[s.NOTIFICATION_CHAINS_ID.OPTIMISM]:"ETH",[s.NOTIFICATION_CHAINS_ID.POLYGON]:"POL"},n.SUPPORTED_NOTIFICATION_BLOCK_EXPLORERS={[s.NOTIFICATION_CHAINS_ID.ETHEREUM]:{url:"https://etherscan.io",name:"Etherscan"},[s.NOTIFICATION_CHAINS_ID.OPTIMISM]:{url:"https://optimistic.etherscan.io",name:"Optimistic Etherscan"},[s.NOTIFICATION_CHAINS_ID.BSC]:{url:"https://bscscan.com",name:"BscScan"},[s.NOTIFICATION_CHAINS_ID.POLYGON]:{url:"https://polygonscan.com",name:"PolygonScan"},[s.NOTIFICATION_CHAINS_ID.ARBITRUM]:{url:"https://arbiscan.io",name:"Arbiscan"},[s.NOTIFICATION_CHAINS_ID.AVALANCHE]:{url:"https://snowtrace.io",name:"Snowtrace"},[s.NOTIFICATION_CHAINS_ID.LINEA]:{url:"https://lineascan.build",name:"LineaScan"}};var r=e("../constants/notification-schema.cjs");Object.defineProperty(n,"NOTIFICATION_CHAINS_ID",{enumerable:!0,get:function(){return r.NOTIFICATION_CHAINS_ID}})}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/ui/constants.cjs"}],[2360,{"./constants.cjs":2359},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./constants.cjs"),n)}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/ui/index.cjs"}],[2361,{"../constants/constants.cjs":2341,"../constants/notification-schema.cjs":2343,"@metamask/controller-utils":1474,uuid:5663},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.makeApiCall=n.toggleUserStorageTriggerStatus=n.upsertTriggerTypeTriggers=n.upsertAddressTriggers=n.getUUIDsForAccountByKinds=n.getUUIDsForKinds=n.getAllUUIDs=n.getUUIDsForAccount=n.inferEnabledKinds=n.checkAccountsPresence=n.traverseUserStorageTriggers=n.cleanUserStorage=n.initializeUserStorage=void 0;const s=e("@metamask/controller-utils"),r=e("uuid"),i=e("../constants/constants.cjs"),a=e("../constants/notification-schema.cjs"),o=e=>e.id,c=e=>e;function u(e){const t=new Set;return l(e,{mapTrigger:e=>t.add(e.address)}),t.forEach((t=>{(0,s.isValidHexAddress)(t)||delete e[t]})),e}function l(e,t){const n=[],s=t?.mapTrigger??c;for(const r in e)if(r!==i.USER_STORAGE_VERSION_KEY&&(!t?.address||r===t.address))for(const t in e[r])if(t in e[r])for(const i in e[r][t])if(i){const a=s({id:i,kind:e[r]?.[t]?.[i]?.k,chainId:t,address:r,enabled:e[r]?.[t]?.[i]?.e??!1});a&&n.push(a)}return n}n.initializeUserStorage=function(e,t,n=!0){const s={[i.USER_STORAGE_VERSION_KEY]:i.USER_STORAGE_VERSION};return e.forEach((e=>{const n=e.address?.toLowerCase();n&&(s[n]||(s[n]={}),Object.entries(a.TRIGGERS).forEach((([e,{supported_chains:i}])=>{i.forEach((i=>{s[n]?.[i]||(s[n][i]={}),s[n][i][(0,r.v4)()]={k:e,e:t}}))})))})),n&&u(s),s},n.cleanUserStorage=u,n.traverseUserStorageTriggers=l,n.checkAccountsPresence=function(e,t){const n={};return t.forEach((t=>{n[t.toLowerCase()]=function(e,t){const n=t[e?.toLowerCase()];if(!n)return!1;for(const[e,t]of Object.entries(a.TRIGGERS))for(const s of t.supported_chains){if(!n[s])return!1;if(!Object.values(n[s]).some((t=>t.k===e)))return!1;for(const e in n[s])if(!n[s][e].e)return!1}return!0}(t,e)})),n},n.inferEnabledKinds=function(e){const t=new Set;return l(e,{mapTrigger:e=>{t.add(e.kind)}}),Array.from(t)},n.getUUIDsForAccount=function(e,t){return l(e,{address:t,mapTrigger:o})},n.getAllUUIDs=function(e){return l(e,{mapTrigger:o})},n.getUUIDsForKinds=function(e,t){const n=new Set(t);return l(e,{mapTrigger:e=>n.has(e.kind)?e.id:undefined})},n.getUUIDsForAccountByKinds=function(e,t,n){const s=new Set(n);return l(e,{address:t,mapTrigger:e=>s.has(e.kind)?e:undefined})},n.upsertAddressTriggers=function(e,t){const n=e.toLowerCase();t[n]=t[n]||{};for(const[e,{supported_chains:s}]of Object.entries(a.TRIGGERS))for(const i of s){t[n][i]=t[n][i]||{};if(!Object.values(t[n][i]).find((t=>t.k===e))){const s=(0,r.v4)();t[n][i][s]={k:e,e:!1}}}return t},n.upsertTriggerTypeTriggers=function(e,t){return Object.entries(t).forEach((([n,s])=>{n!==i.USER_STORAGE_VERSION_KEY&&Object.entries(s).forEach((([s,i])=>{if(!Object.values(i).find((t=>t.k===e))){const i=(0,r.v4)();t[n][s][i]={k:e,e:!1}}}))})),t},n.toggleUserStorageTriggerStatus=function(e,t,n,s,r){return e?.[t]?.[n]?.[s]&&(e[t][n][s].e=r),e},n.makeApiCall=async function(e,t,n,s){const r={method:n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(s)};return await fetch(t,r)}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesController/utils/utils.cjs"}],[2362,{"./services/services.cjs":2367,"@metamask/base-controller":1383,loglevel:4863},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u,l,d=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},m=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.defaultState=void 0;const h=e("@metamask/base-controller"),f=p(e("loglevel")),g=e("./services/services.cjs");n.defaultState={isPushEnabled:!0,fcmToken:"",isUpdatingFCMToken:!1};const y={isPushEnabled:{persist:!0,anonymous:!0},fcmToken:{persist:!0,anonymous:!0},isUpdatingFCMToken:{persist:!1,anonymous:!0}},b={apiKey:"",authDomain:"",storageBucket:"",projectId:"",messagingSenderId:"",appId:"",measurementId:"",vapidKey:""};class x extends h.BaseController{constructor({messenger:e,state:t,env:u,config:l}){super({messenger:e,metadata:y,name:"NotificationServicesPushController",state:{...n.defaultState,...t}}),s.add(this),r.set(this,undefined),i.set(this,void 0),a.set(this,void 0),d(this,i,u??b,"f"),d(this,a,l,"f"),m(this,s,"m",o).call(this),m(this,s,"m",c).call(this)}async subscribeToPushNotifications(){if(m(this,a,"f").isPushFeatureEnabled){m(this,r,"f")&&(m(this,r,"f").call(this),d(this,r,undefined,"f"));try{d(this,r,await m(this,a,"f").pushService.subscribeToPushNotifications(m(this,i,"f"))??undefined,"f")}catch{}}}async enablePushNotifications(e){if(m(this,a,"f").isPushFeatureEnabled){this.update((e=>{e.isUpdatingFCMToken=!0}));try{const t=await m(this,s,"m",u).call(this).catch((()=>null));if(t){const n=await(0,g.activatePushNotifications)({bearerToken:t,triggers:e,env:m(this,i,"f"),createRegToken:m(this,a,"f").pushService.createRegToken,platform:m(this,a,"f").platform,locale:m(this,a,"f").getLocale?.()??"en"}).catch((()=>null));n&&m(this,s,"m",l).call(this,{type:"enable",fcmToken:n})}}catch{}try{await this.subscribeToPushNotifications()}catch{}this.update((e=>{e.isUpdatingFCMToken=!1}))}}async disablePushNotifications(){if(m(this,a,"f").isPushFeatureEnabled){this.update((e=>{e.isUpdatingFCMToken=!0}));try{await(0,g.deactivatePushNotifications)({env:m(this,i,"f"),deleteRegToken:m(this,a,"f").pushService.deleteRegToken,regToken:this.state.fcmToken})}catch(e){const t=`Failed to disable push notifications: ${e}`;throw f.default.error(t),new Error(t)}finally{this.update((e=>{e.isUpdatingFCMToken=!1}))}m(this,r,"f")?.call(this),m(this,s,"m",l).call(this,{type:"disable"})}}async updateTriggerPushNotifications(e){if(m(this,a,"f").isPushFeatureEnabled){this.update((e=>{e.isUpdatingFCMToken=!0}));try{const t=await m(this,s,"m",u).call(this),{fcmToken:n}=await(0,g.updateTriggerPushNotifications)({bearerToken:t,triggers:e,env:m(this,i,"f"),createRegToken:m(this,a,"f").pushService.createRegToken,deleteRegToken:m(this,a,"f").pushService.deleteRegToken,platform:m(this,a,"f").platform,locale:m(this,a,"f").getLocale?.()??"en"});n&&m(this,s,"m",l).call(this,{type:"update",fcmToken:n})}catch(e){const t=`Failed to update triggers for push notifications: ${e}`;throw f.default.error(t),new Error(t)}finally{this.update((e=>{e.isUpdatingFCMToken=!1}))}}}}r=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakSet,o=function(){this.messagingSystem.registerActionHandler("NotificationServicesPushController:enablePushNotifications",this.enablePushNotifications.bind(this)),this.messagingSystem.registerActionHandler("NotificationServicesPushController:disablePushNotifications",this.disablePushNotifications.bind(this)),this.messagingSystem.registerActionHandler("NotificationServicesPushController:updateTriggerPushNotifications",this.updateTriggerPushNotifications.bind(this)),this.messagingSystem.registerActionHandler("NotificationServicesPushController:subscribeToPushNotifications",this.subscribeToPushNotifications.bind(this))},c=function(){this.update((e=>{e.isUpdatingFCMToken=!1}))},u=async function(){const e=await this.messagingSystem.call("AuthenticationController:getBearerToken");if(!e)throw f.default.error("Failed to enable push notifications: BearerToken token is missing."),new Error("BearerToken token is missing");return e},l=function(e){"enable"===e.type&&this.update((t=>{t.isPushEnabled=!0,t.fcmToken=e.fcmToken,t.isUpdatingFCMToken=!1})),"disable"===e.type&&this.update((e=>{e.isPushEnabled=!1,e.fcmToken="",e.isUpdatingFCMToken=!1})),"update"===e.type&&this.update((t=>{t.isPushEnabled=!0,t.fcmToken=e.fcmToken,t.isUpdatingFCMToken=!1}))},n.default=x}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesPushController/NotificationServicesPushController.cjs"}],[2363,{"./NotificationServicesPushController.cjs":2362,"./mocks/index.cjs":2364,"./utils/index.cjs":2370},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)},a=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)&&s(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Mocks=n.Utils=n.Controller=void 0;const c=o(e("./NotificationServicesPushController.cjs"));n.Controller=c.default;const u=c.default;n.default=u,i(e("./NotificationServicesPushController.cjs"),n),n.Utils=a(e("./utils/index.cjs")),i(e("./utils/index.cjs"),n),n.Mocks=a(e("./mocks/index.cjs"))}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesPushController/index.cjs"}],[2364,{"./mockResponse.cjs":2365},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./mockResponse.cjs"),n)}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesPushController/mocks/index.cjs"}],[2365,{"../services/endpoints.cjs":2366},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getMockDeleteFCMRegistrationTokenResponse=n.getMockCreateFCMRegistrationTokenResponse=n.MOCK_FCM_RESPONSE=n.getMockUpdatePushNotificationLinksResponse=n.getMockRetrievePushNotificationLinksResponse=n.MOCK_LINKS_RESPONSE=n.MOCK_REG_TOKEN=void 0;const s=e("../services/endpoints.cjs");n.MOCK_REG_TOKEN="REG_TOKEN",n.MOCK_LINKS_RESPONSE={trigger_ids:["1","2","3"],registration_tokens:[{token:"reg_token_1",platform:"portfolio",locale:"en"},{token:"reg_token_2",platform:"extension",locale:"en"}]};n.getMockRetrievePushNotificationLinksResponse=()=>({url:s.REGISTRATION_TOKENS_ENDPOINT,requestMethod:"GET",response:n.MOCK_LINKS_RESPONSE});n.getMockUpdatePushNotificationLinksResponse=()=>({url:s.REGISTRATION_TOKENS_ENDPOINT,requestMethod:"POST",response:null}),n.MOCK_FCM_RESPONSE={name:"",token:"fcm-token",web:{endpoint:"",p256dh:"",auth:"",applicationPubKey:""}};n.getMockCreateFCMRegistrationTokenResponse=()=>({url:/^https:\/\/fcmregistrations\.googleapis\.com\/v1\/projects\/.*$/u,requestMethod:"POST",response:n.MOCK_FCM_RESPONSE});n.getMockDeleteFCMRegistrationTokenResponse=()=>({url:/^https:\/\/fcmregistrations\.googleapis\.com\/v1\/projects\/.*$/u,requestMethod:"POST",response:{}})}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesPushController/mocks/mockResponse.cjs"}],[2366,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.REGISTRATION_TOKENS_ENDPOINT=void 0;n.REGISTRATION_TOKENS_ENDPOINT="https://push.api.cx.metamask.io/v1/link"}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesPushController/services/endpoints.cjs"}],[2367,{"./endpoints.cjs":2366},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=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)&&s(t,e,n);return r(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.updateTriggerPushNotifications=n.deactivatePushNotifications=n.activatePushNotifications=n.updateLinksAPI=void 0;const a=i(e("./endpoints.cjs"));async function o(e,t,n){try{const s={trigger_ids:t,registration_tokens:n};return 200===(await fetch(a.REGISTRATION_TOKENS_ENDPOINT,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(s)})).status}catch{return!1}}n.updateLinksAPI=o,n.activatePushNotifications=async function(e){const{bearerToken:t,triggers:n,env:s,createRegToken:r,platform:i,locale:a}=e,c=await r(s).catch((()=>null));return c?(await o(t,n,[{token:c,platform:i,locale:a}]),c):null},n.deactivatePushNotifications=async function(e){const{regToken:t,env:n,deleteRegToken:s}=e;return!t||!!await s(n)},n.updateTriggerPushNotifications=async function(e){const{bearerToken:t,triggers:n,createRegToken:s,platform:r,locale:i,deleteRegToken:a,env:c}=e;await a(c);const u=await s(c);if(!u)throw new Error("Failed to create a new registration token");if(!await o(t,n,[{token:u,platform:r,locale:i}]))throw new Error("Failed to create links to new reg token");return{fcmToken:u}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesPushController/services/services.cjs"}],[2368,{"bignumber.js":2377},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getAmount=n.formatAmount=n.getLeadingZeroCount=n.calcTokenAmount=void 0;const s=e("bignumber.js"),r={decimalPlaces:4};function i(e,t){const n=Math.pow(10,Number(t||0));return new s.BigNumber(String(e)).div(n)}n.calcTokenAmount=i;n.getLeadingZeroCount=e=>{const t=new s.BigNumber(e,10).toString(10).split(".")[1]??"";return t.match(/^0*/u)?.[0]?.length||0};n.formatAmount=(e,t)=>{const s={...r,...t},i=(0,n.getLeadingZeroCount)(e),a=e.toString().includes(".")||i>0;if(e>999)return Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:"short",maximumFractionDigits:2}).format(e);if(a){const t=(o=s.decimalPlaces,Boolean(s?.shouldEllipse)&&i>=o),n=Intl.NumberFormat("en-US",{minimumFractionDigits:t?s.decimalPlaces:undefined,maximumFractionDigits:s.decimalPlaces}).format(e);return t?`${n}...`:n}var o;return e.toString()};n.getAmount=(e,t,s)=>{if(!e||!t)return"";const r=i(e,parseFloat(t)).toNumber();return(0,n.formatAmount)(r,s)}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesPushController/utils/get-notification-data.cjs"}],[2369,{"../../NotificationServicesController/index.cjs":2344,"./get-notification-data.cjs":2368},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createOnChainPushNotificationMessage=n.createOnChainPushNotificationMessages=void 0;const s=e("./get-notification-data.cjs"),r=e("../../NotificationServicesController/index.cjs");function i(e){return r.Constants.CHAIN_SYMBOLS[e]??null}n.createOnChainPushNotificationMessages=e=>{const t=(...t)=>{const[n,...s]=t;return(0,e[n])(...s)};return{erc20_sent:{title:t("pushPlatformNotificationsFundsSentTitle"),defaultDescription:t("pushPlatformNotificationsFundsSentDescriptionDefault"),getDescription:e=>{const n=e?.data?.token?.symbol,r=e?.data?.token?.amount,i=e?.data?.token?.decimals;if(!n||!r||!i)return null;const a=(0,s.getAmount)(r,i,{shouldEllipse:!0});return t("pushPlatformNotificationsFundsSentDescription",a,n)}},eth_sent:{title:t("pushPlatformNotificationsFundsSentTitle"),defaultDescription:t("pushPlatformNotificationsFundsSentDescriptionDefault"),getDescription:e=>{const n=i(e?.chain_id),r=e?.data?.amount?.eth;if(!n||!r)return null;const a=(0,s.formatAmount)(parseFloat(r),{shouldEllipse:!0});return t("pushPlatformNotificationsFundsSentDescription",a,n)}},erc20_received:{title:t("pushPlatformNotificationsFundsReceivedTitle"),defaultDescription:t("pushPlatformNotificationsFundsReceivedDescriptionDefault"),getDescription:e=>{const n=e?.data?.token?.symbol,r=e?.data?.token?.amount,i=e?.data?.token?.decimals;if(!n||!r||!i)return null;const a=(0,s.getAmount)(r,i,{shouldEllipse:!0});return t("pushPlatformNotificationsFundsReceivedDescription",a,n)}},eth_received:{title:t("pushPlatformNotificationsFundsReceivedTitle"),defaultDescription:t("pushPlatformNotificationsFundsReceivedDescriptionDefault"),getDescription:e=>{const n=i(e?.chain_id),r=e?.data?.amount?.eth;if(!n||!r)return null;const a=(0,s.formatAmount)(parseFloat(r),{shouldEllipse:!0});return t("pushPlatformNotificationsFundsReceivedDescription",a,n)}},metamask_swap_completed:{title:t("pushPlatformNotificationsSwapCompletedTitle"),defaultDescription:t("pushPlatformNotificationsSwapCompletedDescription")},erc721_sent:{title:t("pushPlatformNotificationsNftSentTitle"),defaultDescription:t("pushPlatformNotificationsNftSentDescription")},erc1155_sent:{title:t("pushPlatformNotificationsNftSentTitle"),defaultDescription:t("pushPlatformNotificationsNftSentDescription")},erc721_received:{title:t("pushPlatformNotificationsNftReceivedTitle"),defaultDescription:t("pushPlatformNotificationsNftReceivedDescription")},erc1155_received:{title:t("pushPlatformNotificationsNftReceivedTitle"),defaultDescription:t("pushPlatformNotificationsNftReceivedDescription")},rocketpool_stake_completed:{title:t("pushPlatformNotificationsStakingRocketpoolStakeCompletedTitle"),defaultDescription:t("pushPlatformNotificationsStakingRocketpoolStakeCompletedDescription")},rocketpool_unstake_completed:{title:t("pushPlatformNotificationsStakingRocketpoolUnstakeCompletedTitle"),defaultDescription:t("pushPlatformNotificationsStakingRocketpoolUnstakeCompletedDescription")},lido_stake_completed:{title:t("pushPlatformNotificationsStakingLidoStakeCompletedTitle"),defaultDescription:t("pushPlatformNotificationsStakingLidoStakeCompletedDescription")},lido_stake_ready_to_be_withdrawn:{title:t("pushPlatformNotificationsStakingLidoStakeReadyToBeWithdrawnTitle"),defaultDescription:t("pushPlatformNotificationsStakingLidoStakeReadyToBeWithdrawnDescription")},lido_withdrawal_requested:{title:t("pushPlatformNotificationsStakingLidoWithdrawalRequestedTitle"),defaultDescription:t("pushPlatformNotificationsStakingLidoWithdrawalRequestedDescription")},lido_withdrawal_completed:{title:t("pushPlatformNotificationsStakingLidoWithdrawalCompletedTitle"),defaultDescription:t("pushPlatformNotificationsStakingLidoWithdrawalCompletedDescription")}}},n.createOnChainPushNotificationMessage=function(e,t){if(!e?.type)return null;const s=(0,n.createOnChainPushNotificationMessages)(t)[e.type];if(!s)return null;let r=null;try{r=s?.getDescription?.(e)??s.defaultDescription??null}catch{r=s.defaultDescription??null}return{title:s.title??"",description:r??""}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesPushController/utils/get-notification-message.cjs"}],[2370,{"./get-notification-data.cjs":2368,"./get-notification-message.cjs":2369},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./get-notification-data.cjs"),n),r(e("./get-notification-message.cjs"),n)}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/NotificationServicesPushController/utils/index.cjs"}],[2373,{"./NotificationServicesController/index.cjs":2344,"./NotificationServicesPushController/index.cjs":2363},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=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)&&s(t,e,n);return r(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.NotificationServicesPushController=n.NotificationServicesController=void 0,n.NotificationServicesController=i(e("./NotificationServicesController/index.cjs")),n.NotificationServicesPushController=i(e("./NotificationServicesPushController/index.cjs"))}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/index.cjs"}],[2374,{"./is-onchain-notification.cjs":2375,"./to-raw-notification.cjs":2376},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./is-onchain-notification.cjs"),n),r(e("./to-raw-notification.cjs"),n)}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/shared/index.cjs"}],[2375,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isOnChainRawNotification=void 0,n.isOnChainRawNotification=function(e){const t=e;return[t?.id,t?.data,t?.trigger_id].every((e=>e!==undefined))}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/shared/is-onchain-notification.cjs"}],[2376,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.toRawOnChainNotification=void 0,n.toRawOnChainNotification=function(e){return{...e,type:e?.data?.kind}}}}},{package:"@metamask/notification-services-controller",file:"node_modules/@metamask/notification-services-controller/dist/shared/to-raw-notification.cjs"}],[2377,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){!function(e){var n,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,i=Math.floor,a="[BigNumber Error] ",o=a+"Number primitive has more than 15 significant digits: ",c=1e14,u=14,l=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,p=1e9;function h(e){var t=0|e;return e>0||e===t?t:t-1}function f(e){for(var t,n,s=1,r=e.length,i=e[0]+"";s<r;){for(t=e[s++]+"",n=u-t.length;n--;t="0"+t);i+=t}for(r=i.length;48===i.charCodeAt(--r););return i.slice(0,r+1||1)}function g(e,t){var n,s,r=e.c,i=t.c,a=e.s,o=t.s,c=e.e,u=t.e;if(!a||!o)return null;if(n=r&&!r[0],s=i&&!i[0],n||s)return n?s?0:-o:a;if(a!=o)return a;if(n=a<0,s=c==u,!r||!i)return s?0:!r^n?1:-1;if(!s)return c>u^n?1:-1;for(o=(c=r.length)<(u=i.length)?c:u,a=0;a<o;a++)if(r[a]!=i[a])return r[a]>i[a]^n?1:-1;return c==u?0:c>u^n?1:-1}function y(e,t,n,s){if(e<t||e>n||e!==i(e))throw Error(a+(s||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function b(e){var t=e.c.length-1;return h(e.e/u)==t&&e.c[t]%2!=0}function x(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,n){var s,r;if(t<0){for(r=n+".";++t;r+=n);e=r+e}else if(++t>(s=e.length)){for(r=n,t-=s;--t;r+=n);e+=r}else t<s&&(e=e.slice(0,t)+"."+e.slice(t));return e}n=function e(t){var n,k,v,w,T,_,E,j,C,P,O=V.prototype={constructor:V,toString:null,valueOf:null},A=new V(1),I=20,N=4,R=-7,M=21,B=-1e7,L=1e7,D=!1,U=1,H=0,F={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},G="0123456789abcdefghijklmnopqrstuvwxyz",K=!0;function V(e,t){var n,r,a,c,d,m,p,h,f=this;if(!(f instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>L?f.c=f.e=null:e.e<B?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((m="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,d=e;d>=10;d/=10,c++);return void(c>L?f.c=f.e=null:(f.e=c,f.c=[e]))}h=String(e)}else{if(!s.test(h=String(e)))return v(f,h,m);f.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(c=h.indexOf("."))>-1&&(h=h.replace(".","")),(d=h.search(/e/i))>0?(c<0&&(c=d),c+=+h.slice(d+1),h=h.substring(0,d)):c<0&&(c=h.length)}else{if(y(t,2,G.length,"Base"),10==t&&K)return z(f=new V(e),I+f.e+1,N);if(h=String(e),m="number"==typeof e){if(0*e!=0)return v(f,h,m,t);if(f.s=1/e<0?(h=h.slice(1),-1):1,V.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(o+e)}else f.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(n=G.slice(0,t),c=d=0,p=h.length;d<p;d++)if(n.indexOf(r=h.charAt(d))<0){if("."==r){if(d>c){c=p;continue}}else if(!a&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){a=!0,d=-1,c=0;continue}return v(f,String(e),m,t)}m=!1,(c=(h=k(h,t,10,f.s)).indexOf("."))>-1?h=h.replace(".",""):c=h.length}for(d=0;48===h.charCodeAt(d);d++);for(p=h.length;48===h.charCodeAt(--p););if(h=h.slice(d,++p)){if(p-=d,m&&V.DEBUG&&p>15&&(e>l||e!==i(e)))throw Error(o+f.s*e);if((c=c-d-1)>L)f.c=f.e=null;else if(c<B)f.c=[f.e=0];else{if(f.e=c,f.c=[],d=(c+1)%u,c<0&&(d+=u),d<p){for(d&&f.c.push(+h.slice(0,d)),p-=u;d<p;)f.c.push(+h.slice(d,d+=u));d=u-(h=h.slice(d)).length}else d-=p;for(;d--;h+="0");f.c.push(+h)}}else f.c=[f.e=0]}function $(e,t,n,s){var r,i,a,o,c;if(null==n?n=N:y(n,0,8),!e.c)return e.toString();if(r=e.c[0],a=e.e,null==t)c=f(e.c),c=1==s||2==s&&(a<=R||a>=M)?x(c,a):S(c,a,"0");else if(i=(e=z(new V(e),t,n)).e,o=(c=f(e.c)).length,1==s||2==s&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=x(c,i)}else if(t-=a,c=S(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&r?"-"+c:c}function q(e,t){for(var n,s,r=1,i=new V(e[0]);r<e.length;r++)(!(s=new V(e[r])).s||(n=g(i,s))===t||0===n&&i.s===t)&&(i=s);return i}function W(e,t,n){for(var s=1,r=t.length;!t[--r];t.pop());for(r=t[0];r>=10;r/=10,s++);return(n=s+n*u-1)>L?e.c=e.e=null:n<B?e.c=[e.e=0]:(e.e=n,e.c=t),e}function z(e,t,n,s){var a,o,l,m,p,h,f,g=e.c,y=d;if(g){e:{for(a=1,m=g[0];m>=10;m/=10,a++);if((o=t-a)<0)o+=u,l=t,p=g[h=0],f=i(p/y[a-l-1]%10);else if((h=r((o+1)/u))>=g.length){if(!s)break e;for(;g.length<=h;g.push(0));p=f=0,a=1,l=(o%=u)-u+1}else{for(p=m=g[h],a=1;m>=10;m/=10,a++);f=(l=(o%=u)-u+a)<0?0:i(p/y[a-l-1]%10)}if(s=s||t<0||null!=g[h+1]||(l<0?p:p%y[a-l-1]),s=n<4?(f||s)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||s||6==n&&(o>0?l>0?p/y[a-l]:0:g[h-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,s?(t-=e.e+1,g[0]=y[(u-t%u)%u],e.e=-t||0):g[0]=e.e=0,e;if(0==o?(g.length=h,m=1,h--):(g.length=h+1,m=y[u-o],g[h]=l>0?i(p/y[a-l]%y[l])*m:0),s)for(;;){if(0==h){for(o=1,l=g[0];l>=10;l/=10,o++);for(l=g[0]+=m,m=1;l>=10;l/=10,m++);o!=m&&(e.e++,g[0]==c&&(g[0]=1));break}if(g[h]+=m,g[h]!=c)break;g[h--]=0,m=1}for(o=g.length;0===g[--o];g.pop());}e.e>L?e.c=e.e=null:e.e<B&&(e.c=[e.e=0])}return e}function J(e){var t,n=e.e;return null===n?e.toString():(t=f(e.c),t=n<=R||n>=M?x(t,n):S(t,n,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(n=e[t],0,p,t),I=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(n=e[t],0,8,t),N=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(y(n[0],-p,0,t),y(n[1],0,p,t),R=n[0],M=n[1]):(y(n,-p,p,t),R=-(M=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)y(n[0],-p,-1,t),y(n[1],1,p,t),B=n[0],L=n[1];else{if(y(n,-p,p,t),!n)throw Error(a+t+" cannot be zero: "+n);B=-(L=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(a+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!n,Error(a+"crypto unavailable");D=n}else D=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),U=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,p,t),H=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(a+t+" not an object: "+n);F=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(a+t+" invalid: "+n);K="0123456789"==n.slice(0,10),G=n}}return{DECIMAL_PLACES:I,ROUNDING_MODE:N,EXPONENTIAL_AT:[R,M],RANGE:[B,L],CRYPTO:D,MODULO_MODE:U,POW_PRECISION:H,FORMAT:F,ALPHABET:G}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,n,s=e.c,r=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(s)){if((1===o||-1===o)&&r>=-p&&r<=p&&r===i(r)){if(0===s[0]){if(0===r&&1===s.length)return!0;break e}if((t=(r+1)%u)<1&&(t+=u),String(s[0]).length==t){for(t=0;t<s.length;t++)if((n=s[t])<0||n>=c||n!==i(n))break e;if(0!==n)return!0}}}else if(null===s&&null===r&&(null===o||1===o||-1===o))return!0;throw Error(a+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return q(arguments,-1)},V.minimum=V.min=function(){return q(arguments,1)},V.random=(w=9007199254740992,T=Math.random()*w&2097151?function(){return i(Math.random()*w)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,s,o,c,l=0,m=[],h=new V(A);if(null==e?e=I:y(e,0,p),o=r(e/u),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));l<o;)(c=131072*t[l]+(t[l+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[l]=n[0],t[l+1]=n[1]):(m.push(c%1e14),l+=2);l=o/2}else{if(!crypto.randomBytes)throw D=!1,Error(a+"crypto unavailable");for(t=crypto.randomBytes(o*=7);l<o;)(c=281474976710656*(31&t[l])+1099511627776*t[l+1]+4294967296*t[l+2]+16777216*t[l+3]+(t[l+4]<<16)+(t[l+5]<<8)+t[l+6])>=9e15?crypto.randomBytes(7).copy(t,l):(m.push(c%1e14),l+=7);l=o/7}if(!D)for(;l<o;)(c=T())<9e15&&(m[l++]=c%1e14);for(o=m[--l],e%=u,o&&e&&(c=d[u-e],m[l]=i(o/c)*c);0===m[l];m.pop(),l--);if(l<0)m=[s=0];else{for(s=-1;0===m[0];m.splice(0,1),s-=u);for(l=1,c=m[0];c>=10;c/=10,l++);l<u&&(s-=u-l)}return h.e=s,h.c=m,h}),V.sum=function(){for(var e=1,t=arguments,n=new V(t[0]);e<t.length;)n=n.plus(t[e++]);return n},k=function(){var e="0123456789";function t(e,t,n,s){for(var r,i,a=[0],o=0,c=e.length;o<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=s.indexOf(e.charAt(o++)),r=0;r<a.length;r++)a[r]>n-1&&(null==a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/n|0,a[r]%=n)}return a.reverse()}return function(s,r,i,a,o){var c,u,l,d,m,p,h,g,y=s.indexOf("."),b=I,x=N;for(y>=0&&(d=H,H=0,s=s.replace(".",""),p=(g=new V(r)).pow(s.length-y),H=d,g.c=t(S(f(p.c),p.e,"0"),10,i,e),g.e=g.c.length),l=d=(h=t(s,r,i,o?(c=G,e):(c=e,G))).length;0==h[--d];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(p.c=h,p.e=l,p.s=a,h=(p=n(p,g,b,x,i)).c,m=p.r,l=p.e),y=h[u=l+b+1],d=i/2,m=m||u<0||null!=h[u+1],m=x<4?(null!=y||m)&&(0==x||x==(p.s<0?3:2)):y>d||y==d&&(4==x||m||6==x&&1&h[u-1]||x==(p.s<0?8:7)),u<1||!h[0])s=m?S(c.charAt(1),-b,c.charAt(0)):c.charAt(0);else{if(h.length=u,m)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(d=h.length;!h[--d];);for(y=0,s="";y<=d;s+=c.charAt(h[y++]));s=S(s,l,c.charAt(0))}return s}}(),n=function(){function e(e,t,n){var s,r,i,a,o=0,c=e.length,u=t%m,l=t/m|0;for(e=e.slice();c--;)o=((r=u*(i=e[c]%m)+(s=l*i+(a=e[c]/m|0)*u)%m*m+o)/n|0)+(s/m|0)+l*a,e[c]=r%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,s){var r,i;if(n!=s)i=n>s?1:-1;else for(r=i=0;r<n;r++)if(e[r]!=t[r]){i=e[r]>t[r]?1:-1;break}return i}function n(e,t,n,s){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*s+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(s,r,a,o,l){var d,m,p,f,g,y,b,x,S,k,v,w,T,_,E,j,C,P=s.s==r.s?1:-1,O=s.c,A=r.c;if(!(O&&O[0]&&A&&A[0]))return new V(s.s&&r.s&&(O?!A||O[0]!=A[0]:A)?O&&0==O[0]||!A?0*P:P/0:NaN);for(S=(x=new V(P)).c=[],P=a+(m=s.e-r.e)+1,l||(l=c,m=h(s.e/u)-h(r.e/u),P=P/u|0),p=0;A[p]==(O[p]||0);p++);if(A[p]>(O[p]||0)&&m--,P<0)S.push(1),f=!0;else{for(_=O.length,j=A.length,p=0,P+=2,(g=i(l/(A[0]+1)))>1&&(A=e(A,g,l),O=e(O,g,l),j=A.length,_=O.length),T=j,v=(k=O.slice(0,j)).length;v<j;k[v++]=0);C=A.slice(),C=[0].concat(C),E=A[0],A[1]>=l/2&&E++;do{if(g=0,(d=t(A,k,j,v))<0){if(w=k[0],j!=v&&(w=w*l+(k[1]||0)),(g=i(w/E))>1)for(g>=l&&(g=l-1),b=(y=e(A,g,l)).length,v=k.length;1==t(y,k,b,v);)g--,n(y,j<b?C:A,b,l),b=y.length,d=1;else 0==g&&(d=g=1),b=(y=A.slice()).length;if(b<v&&(y=[0].concat(y)),n(k,y,v,l),v=k.length,-1==d)for(;t(A,k,j,v)<1;)g++,n(k,j<v?C:A,v,l),v=k.length}else 0===d&&(g++,k=[0]);S[p++]=g,k[0]?k[v++]=O[T]||0:(k=[O[T]],v=1)}while((T++<_||null!=k[0])&&P--);f=null!=k[0],S[0]||S.splice(0,1)}if(l==c){for(p=1,P=S[0];P>=10;P/=10,p++);z(x,a+(x.e=p+m*u-1)+1,o,f)}else x.e=m,x.r=+f;return x}}(),_=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,j=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,P=/^\s*\+(?=[\w.])|^\s+|\s+$/g,v=function(e,t,n,s){var r,i=n?t:t.replace(P,"");if(C.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(_,(function(e,t,n){return r="x"==(n=n.toLowerCase())?16:"b"==n?2:8,s&&s!=r?e:t})),s&&(r=s,i=i.replace(E,"$1").replace(j,"0.$1")),t!=i))return new V(i,r);if(V.DEBUG)throw Error(a+"Not a"+(s?" base "+s:"")+" number: "+t);e.s=null}e.c=e.e=null},O.absoluteValue=O.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},O.comparedTo=function(e,t){return g(this,new V(e,t))},O.decimalPlaces=O.dp=function(e,t){var n,s,r,i=this;if(null!=e)return y(e,0,p),null==t?t=N:y(t,0,8),z(new V(i),e+i.e+1,t);if(!(n=i.c))return null;if(s=((r=n.length-1)-h(this.e/u))*u,r=n[r])for(;r%10==0;r/=10,s--);return s<0&&(s=0),s},O.dividedBy=O.div=function(e,t){return n(this,new V(e,t),I,N)},O.dividedToIntegerBy=O.idiv=function(e,t){return n(this,new V(e,t),0,1)},O.exponentiatedBy=O.pow=function(e,t){var n,s,o,c,l,d,m,p,h=this;if((e=new V(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+J(e));if(null!=t&&(t=new V(t)),l=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new V(Math.pow(+J(h),l?e.s*(2-b(e)):+J(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(s=!d&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||l&&h.c[1]>=24e7:h.c[0]<8e13||l&&h.c[0]<=9999975e7)))return c=h.s<0&&b(e)?-0:0,h.e>-1&&(c=1/c),new V(d?1/c:c);H&&(c=r(H/u+2))}for(l?(n=new V(.5),d&&(e.s=1),m=b(e)):m=(o=Math.abs(+J(e)))%2,p=new V(A);;){if(m){if(!(p=p.times(h)).c)break;c?p.c.length>c&&(p.c.length=c):s&&(p=p.mod(t))}if(o){if(0===(o=i(o/2)))break;m=o%2}else if(z(e=e.times(n),e.e+1,1),e.e>14)m=b(e);else{if(0===(o=+J(e)))break;m=o%2}h=h.times(h),c?h.c&&h.c.length>c&&(h.c.length=c):s&&(h=h.mod(t))}return s?p:(d&&(p=A.div(p)),t?p.mod(t):c?z(p,H,N,undefined):p)},O.integerValue=function(e){var t=new V(this);return null==e?e=N:y(e,0,8),z(t,t.e+1,e)},O.isEqualTo=O.eq=function(e,t){return 0===g(this,new V(e,t))},O.isFinite=function(){return!!this.c},O.isGreaterThan=O.gt=function(e,t){return g(this,new V(e,t))>0},O.isGreaterThanOrEqualTo=O.gte=function(e,t){return 1===(t=g(this,new V(e,t)))||0===t},O.isInteger=function(){return!!this.c&&h(this.e/u)>this.c.length-2},O.isLessThan=O.lt=function(e,t){return g(this,new V(e,t))<0},O.isLessThanOrEqualTo=O.lte=function(e,t){return-1===(t=g(this,new V(e,t)))||0===t},O.isNaN=function(){return!this.s},O.isNegative=function(){return this.s<0},O.isPositive=function(){return this.s>0},O.isZero=function(){return!!this.c&&0==this.c[0]},O.minus=function(e,t){var n,s,r,i,a=this,o=a.s;if(t=(e=new V(e,t)).s,!o||!t)return new V(NaN);if(o!=t)return e.s=-t,a.plus(e);var l=a.e/u,d=e.e/u,m=a.c,p=e.c;if(!l||!d){if(!m||!p)return m?(e.s=-t,e):new V(p?a:NaN);if(!m[0]||!p[0])return p[0]?(e.s=-t,e):new V(m[0]?a:3==N?-0:0)}if(l=h(l),d=h(d),m=m.slice(),o=l-d){for((i=o<0)?(o=-o,r=m):(d=l,r=p),r.reverse(),t=o;t--;r.push(0));r.reverse()}else for(s=(i=(o=m.length)<(t=p.length))?o:t,o=t=0;t<s;t++)if(m[t]!=p[t]){i=m[t]<p[t];break}if(i&&(r=m,m=p,p=r,e.s=-e.s),(t=(s=p.length)-(n=m.length))>0)for(;t--;m[n++]=0);for(t=c-1;s>o;){if(m[--s]<p[s]){for(n=s;n&&!m[--n];m[n]=t);--m[n],m[s]+=c}m[s]-=p[s]}for(;0==m[0];m.splice(0,1),--d);return m[0]?W(e,m,d):(e.s=3==N?-1:1,e.c=[e.e=0],e)},O.modulo=O.mod=function(e,t){var s,r,i=this;return e=new V(e,t),!i.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||i.c&&!i.c[0]?new V(i):(9==U?(r=e.s,e.s=1,s=n(i,e,0,3),e.s=r,s.s*=r):s=n(i,e,0,U),(e=i.minus(s.times(e))).c[0]||1!=U||(e.s=i.s),e)},O.multipliedBy=O.times=function(e,t){var n,s,r,i,a,o,l,d,p,f,g,y,b,x,S,k=this,v=k.c,w=(e=new V(e,t)).c;if(!(v&&w&&v[0]&&w[0]))return!k.s||!e.s||v&&!v[0]&&!w||w&&!w[0]&&!v?e.c=e.e=e.s=null:(e.s*=k.s,v&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(s=h(k.e/u)+h(e.e/u),e.s*=k.s,(l=v.length)<(f=w.length)&&(b=v,v=w,w=b,r=l,l=f,f=r),r=l+f,b=[];r--;b.push(0));for(x=c,S=m,r=f;--r>=0;){for(n=0,g=w[r]%S,y=w[r]/S|0,i=r+(a=l);i>r;)n=((d=g*(d=v[--a]%S)+(o=y*d+(p=v[a]/S|0)*g)%S*S+b[i]+n)/x|0)+(o/S|0)+y*p,b[i--]=d%x;b[i]=n}return n?++s:b.splice(0,1),W(e,b,s)},O.negated=function(){var e=new V(this);return e.s=-e.s||null,e},O.plus=function(e,t){var n,s=this,r=s.s;if(t=(e=new V(e,t)).s,!r||!t)return new V(NaN);if(r!=t)return e.s=-t,s.minus(e);var i=s.e/u,a=e.e/u,o=s.c,l=e.c;if(!i||!a){if(!o||!l)return new V(r/0);if(!o[0]||!l[0])return l[0]?e:new V(o[0]?s:0*r)}if(i=h(i),a=h(a),o=o.slice(),r=i-a){for(r>0?(a=i,n=l):(r=-r,n=o),n.reverse();r--;n.push(0));n.reverse()}for((r=o.length)-(t=l.length)<0&&(n=l,l=o,o=n,t=r),r=0;t;)r=(o[--t]=o[t]+l[t]+r)/c|0,o[t]=c===o[t]?0:o[t]%c;return r&&(o=[r].concat(o),++a),W(e,o,a)},O.precision=O.sd=function(e,t){var n,s,r,i=this;if(null!=e&&e!==!!e)return y(e,1,p),null==t?t=N:y(t,0,8),z(new V(i),e,t);if(!(n=i.c))return null;if(s=(r=n.length-1)*u+1,r=n[r]){for(;r%10==0;r/=10,s--);for(r=n[0];r>=10;r/=10,s++);}return e&&i.e+1>s&&(s=i.e+1),s},O.shiftedBy=function(e){return y(e,-9007199254740991,l),this.times("1e"+e)},O.squareRoot=O.sqrt=function(){var e,t,s,r,i,a=this,o=a.c,c=a.s,u=a.e,l=I+4,d=new V("0.5");if(1!==c||!o||!o[0])return new V(!c||c<0&&(!o||o[0])?NaN:o?a:1/0);if(0==(c=Math.sqrt(+J(a)))||c==1/0?(((t=f(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=h((u+1)/2)-(u<0||u%2),s=new V(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):s=new V(c+""),s.c[0])for((c=(u=s.e)+l)<3&&(c=0);;)if(i=s,s=d.times(i.plus(n(a,i,l,1))),f(i.c).slice(0,c)===(t=f(s.c)).slice(0,c)){if(s.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(z(s,s.e+I+2,1),e=!s.times(s).eq(a));break}if(!r&&(z(i,i.e+I+2,0),i.times(i).eq(a))){s=i;break}l+=4,c+=4,r=1}return z(s,s.e+I+1,N,e)},O.toExponential=function(e,t){return null!=e&&(y(e,0,p),e++),$(this,e,t,1)},O.toFixed=function(e,t){return null!=e&&(y(e,0,p),e=e+this.e+1),$(this,e,t)},O.toFormat=function(e,t,n){var s,r=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=F;else if("object"!=typeof n)throw Error(a+"Argument not an object: "+n);if(s=r.toFixed(e,t),r.c){var i,o=s.split("."),c=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",d=o[0],m=o[1],p=r.s<0,h=p?d.slice(1):d,f=h.length;if(u&&(i=c,c=u,u=i,f-=i),c>0&&f>0){for(i=f%c||c,d=h.substr(0,i);i<f;i+=c)d+=l+h.substr(i,c);u>0&&(d+=l+h.slice(i)),p&&(d="-"+d)}s=m?d+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?m.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):m):d}return(n.prefix||"")+s+(n.suffix||"")},O.toFraction=function(e){var t,s,r,i,o,c,l,m,p,h,g,y,b=this,x=b.c;if(null!=e&&(!(l=new V(e)).isInteger()&&(l.c||1!==l.s)||l.lt(A)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+J(l));if(!x)return new V(b);for(t=new V(A),p=s=new V(A),r=m=new V(A),y=f(x),o=t.e=y.length-b.e-1,t.c[0]=d[(c=o%u)<0?u+c:c],e=!e||l.comparedTo(t)>0?o>0?t:p:l,c=L,L=1/0,l=new V(y),m.c[0]=0;h=n(l,t,0,1),1!=(i=s.plus(h.times(r))).comparedTo(e);)s=r,r=i,p=m.plus(h.times(i=p)),m=i,t=l.minus(h.times(i=t)),l=i;return i=n(e.minus(s),r,0,1),m=m.plus(i.times(p)),s=s.plus(i.times(r)),m.s=p.s=b.s,g=n(p,r,o*=2,N).minus(b).abs().comparedTo(n(m,s,o,N).minus(b).abs())<1?[p,r]:[m,s],L=c,g},O.toNumber=function(){return+J(this)},O.toPrecision=function(e,t){return null!=e&&y(e,1,p),$(this,e,t,2)},O.toString=function(e){var t,n=this,s=n.s,r=n.e;return null===r?s?(t="Infinity",s<0&&(t="-"+t)):t="NaN":(null==e?t=r<=R||r>=M?x(f(n.c),r):S(f(n.c),r,"0"):10===e&&K?t=S(f((n=z(new V(n),I+r+1,N)).c),n.e,"0"):(y(e,2,G.length,"Base"),t=k(S(f(n.c),r,"0"),10,e,s,!0)),s<0&&n.c[0]&&(t="-"+t)),t},O.valueOf=O.toJSON=function(){return J(this)},O._isBigNumber=!0,null!=t&&V.set(t),V}(),n.default=n.BigNumber=n,"function"==typeof define&&define.amd?define((function(){return n})):void 0!==t&&t.exports?t.exports=n:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=n)}(this)}}},{package:"@metamask/notification-services-controller>bignumber.js",file:"node_modules/@metamask/notification-services-controller/node_modules/bignumber.js/bignumber.js"}],[2378,{"bn.js":4026,"strip-hex-prefix":5598},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=e("bn.js"),r=e("strip-hex-prefix");t.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new s(1),n=String(e).toLowerCase().trim(),i="0x"===n.substr(0,2)||"-0x"===n.substr(0,3),a=r(n);if("-"===a.substr(0,1)&&(a=r(a.slice(1)),t=new s(-1,10)),!(a=""===a?"0":a).match(/^-?[0-9]+$/)&&a.match(/^[0-9A-Fa-f]+$/)||a.match(/^[a-fA-F]+$/)||!0===i&&a.match(/^[0-9A-Fa-f]+$/))return new s(a,16).mul(t);if((a.match(/^-?[0-9]+$/)||""===a)&&!1===i)return new s(a,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new s(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}}}},{package:"@metamask/controller-utils>@metamask/ethjs-unit>@metamask/number-to-bn",file:"node_modules/@metamask/number-to-bn/src/index.js"}],[2379,{"./Substream":2380,once:4975,"readable-stream":5274},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ObjectMultiplex=void 0;const r=e("readable-stream"),i=s(e("once")),a=e("./Substream"),o=Symbol("IGNORE_SUBSTREAM");class c extends r.Duplex{constructor(e={}){super(Object.assign({objectMode:!0},e)),this._substreams={}}createStream(e,t={}){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const n=new a.Substream(Object.assign({name:e,parent:this},t));return this._substreams[e]=n,function(e,t){const n=(0,i.default)(t);(0,r.finished)(e,{readable:!1},n),(0,r.finished)(e,{writable:!1},n)}(this,(e=>n.destroy(e||undefined))),n}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=o}_read(){return undefined}_write(e,t,n){const{name:s,data:r}=e;if(!s)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),n();const i=this._substreams[s];return i?(i!==o&&i.push(r),n()):(console.warn(`ObjectMultiplex - orphaned data for stream "${s}"`),n())}}n.ObjectMultiplex=c}}},{package:"@metamask/object-multiplex",file:"node_modules/@metamask/object-multiplex/dist/ObjectMultiplex.js"}],[2380,{"readable-stream":5274},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__rest||function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.Substream=void 0;const r=e("readable-stream");class i extends r.Duplex{constructor(e){var{parent:t,name:n}=e,r=s(e,["parent","name"]);super(Object.assign({objectMode:!0},r)),this._parent=t,this._name=n}_read(){return undefined}_write(e,t,n){this._parent.push({name:this._name,data:e}),n()}}n.Substream=i}}},{package:"@metamask/object-multiplex",file:"node_modules/@metamask/object-multiplex/dist/Substream.js"}],[2381,{"./ObjectMultiplex":2379},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){const s=e("./ObjectMultiplex");t.exports=s.ObjectMultiplex}}},{package:"@metamask/object-multiplex",file:"node_modules/@metamask/object-multiplex/dist/index.js"}],[2388,{"./Permission.cjs":2389,"./errors.cjs":2392,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.decorateWithCaveats=n.isRestrictedMethodCaveatSpecification=void 0;const s=e("@metamask/utils"),r=e("./errors.cjs"),i=e("./Permission.cjs");function a(e){return(0,s.hasProperty)(e,"decorator")}n.isRestrictedMethodCaveatSpecification=a,n.decorateWithCaveats=function(e,t,n){const{caveats:s}=t;if(!s)return e;let o=async t=>e(t);for(const e of s){const t=n[e.type];if(!t)throw new r.UnrecognizedCaveatTypeError(e.type);if(!a(t))throw new r.CaveatSpecificationMismatchError(t,i.PermissionType.RestrictedMethod);o=t.decorator(o,e)}return o}}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/Caveat.cjs"}],[2389,{nanoid:4959},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.hasSpecificationType=n.PermissionType=n.findCaveat=n.constructPermission=void 0;const s=e("nanoid");var r;n.constructPermission=function(e){const{caveats:t=null,invoker:n,target:r}=e;return{id:(0,s.nanoid)(),parentCapability:r,invoker:n,caveats:t,date:(new Date).getTime()}},n.findCaveat=function(e,t){return e.caveats?.find((e=>e.type===t))},function(e){e.RestrictedMethod="RestrictedMethod",e.Endowment="Endowment"}(r||(n.PermissionType=r={})),n.hasSpecificationType=function(e,t){return e.permissionType===t}}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/Permission.cjs"}],[2390,{"./Caveat.cjs":2388,"./Permission.cjs":2389,"./errors.cjs":2392,"./permission-middleware.cjs":2394,"./utils.cjs":2399,"@metamask/base-controller":1383,"@metamask/controller-utils":1474,"@metamask/rpc-errors":2554,"@metamask/utils":2950,"deep-freeze-strict":4228,immer:4649,nanoid:4959},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u,l=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.PermissionController=n.CaveatMutatorOperation=void 0;const m=e("@metamask/base-controller"),p=e("@metamask/controller-utils"),h=e("@metamask/rpc-errors"),f=e("@metamask/utils"),g=d(e("deep-freeze-strict")),y=e("immer"),b=e("nanoid"),x=e("./Caveat.cjs"),S=e("./errors.cjs"),k=e("./Permission.cjs"),v=e("./permission-middleware.cjs"),w=e("./utils.cjs"),T="PermissionController";var _;!function(e){e[e.Noop=0]="Noop",e[e.UpdateValue=1]="UpdateValue",e[e.DeleteCaveat=2]="DeleteCaveat",e[e.RevokePermission=3]="RevokePermission"}(_||(n.CaveatMutatorOperation=_={}));class E extends m.BaseController{get unrestrictedMethods(){return this._unrestrictedMethods}constructor(e){const{caveatSpecifications:t,permissionSpecifications:n,unrestrictedMethods:r,messenger:i,state:a={}}=e;super({name:T,metadata:{subjects:{anonymous:!0,persist:!0}},messenger:i,state:{subjects:{},...a}}),s.add(this),this._unrestrictedMethods=new Set(r),this._caveatSpecifications=(0,g.default)({...t}),this.validatePermissionSpecifications(n,this._caveatSpecifications),this._permissionSpecifications=(0,g.default)({...n}),this.registerMessageHandlers(),this.createPermissionMiddleware=(0,v.getPermissionMiddlewareFactory)({executeRestrictedMethod:this._executeRestrictedMethod.bind(this),getRestrictedMethod:this.getRestrictedMethod.bind(this),isUnrestrictedMethod:this.unrestrictedMethods.has.bind(this.unrestrictedMethods)})}getPermissionSpecification(e){return this._permissionSpecifications[e]}getCaveatSpecification(e){return this._caveatSpecifications[e]}validatePermissionSpecifications(e,t){Object.entries(e).forEach((([e,{permissionType:n,targetName:s,allowedCaveats:r}])=>{if(!n||!(0,f.hasProperty)(k.PermissionType,n))throw new Error(`Invalid permission type: "${n}"`);if(!e)throw new Error(`Invalid permission target name: "${e}"`);if(e!==s)throw new Error(`Invalid permission specification: target name "${e}" must match specification.targetName value "${s}".`);r&&r.forEach((e=>{if(!(0,f.hasProperty)(t,e))throw new S.UnrecognizedCaveatTypeError(e);const s=t[e],r=(0,x.isRestrictedMethodCaveatSpecification)(s);if(n===k.PermissionType.RestrictedMethod&&!r||n===k.PermissionType.Endowment&&r)throw new S.CaveatSpecificationMismatchError(s,n)}))}))}registerMessageHandlers(){this.messagingSystem.registerActionHandler(`${T}:clearPermissions`,(()=>this.clearState())),this.messagingSystem.registerActionHandler(`${T}:getEndowments`,((e,t,n)=>this.getEndowments(e,t,n))),this.messagingSystem.registerActionHandler(`${T}:getSubjectNames`,(()=>this.getSubjectNames())),this.messagingSystem.registerActionHandler(`${T}:getPermissions`,(e=>this.getPermissions(e))),this.messagingSystem.registerActionHandler(`${T}:hasPermission`,((e,t)=>this.hasPermission(e,t))),this.messagingSystem.registerActionHandler(`${T}:hasPermissions`,(e=>this.hasPermissions(e))),this.messagingSystem.registerActionHandler(`${T}:grantPermissions`,this.grantPermissions.bind(this)),this.messagingSystem.registerActionHandler(`${T}:grantPermissionsIncremental`,this.grantPermissionsIncremental.bind(this)),this.messagingSystem.registerActionHandler(`${T}:requestPermissions`,((e,t)=>this.requestPermissions(e,t))),this.messagingSystem.registerActionHandler(`${T}:requestPermissionsIncremental`,((e,t)=>this.requestPermissionsIncremental(e,t))),this.messagingSystem.registerActionHandler(`${T}:revokeAllPermissions`,(e=>this.revokeAllPermissions(e))),this.messagingSystem.registerActionHandler(`${T}:revokePermissionForAllSubjects`,(e=>this.revokePermissionForAllSubjects(e))),this.messagingSystem.registerActionHandler(`${T}:revokePermissions`,this.revokePermissions.bind(this)),this.messagingSystem.registerActionHandler(`${T}:updateCaveat`,((e,t,n,s)=>{this.updateCaveat(e,t,n,s)}))}clearState(){this.update((e=>({subjects:{}})))}getTypedPermissionSpecification(e,t,n){const s=e===k.PermissionType.RestrictedMethod?(0,S.methodNotFound)(t,n?{origin:n}:undefined):new S.EndowmentPermissionDoesNotExistError(t,n);if(!this.targetExists(t))throw s;const r=this.getPermissionSpecification(t);if(!(0,k.hasSpecificationType)(r,e))throw s;return r}getRestrictedMethod(e,t){return this.getTypedPermissionSpecification(k.PermissionType.RestrictedMethod,e,t).methodImplementation}getSubjectNames(){return Object.keys(this.state.subjects)}getPermission(e,t){return this.state.subjects[e]?.permissions[t]}getPermissions(e){return this.state.subjects[e]?.permissions}hasPermission(e,t){return Boolean(this.getPermission(e,t))}hasPermissions(e){return Boolean(this.state.subjects[e])}revokeAllPermissions(e){this.update((t=>{if(!t.subjects[e])throw new S.UnrecognizedSubjectError(e);delete t.subjects[e]}))}revokePermission(e,t){this.revokePermissions({[e]:[t]})}revokePermissions(e){this.update((t=>{Object.keys(e).forEach((n=>{if(!(0,f.hasProperty)(t.subjects,n))throw new S.UnrecognizedSubjectError(n);e[n].forEach((e=>{const{permissions:s}=t.subjects[n];if(!(0,f.hasProperty)(s,e))throw new S.PermissionDoesNotExistError(n,e);this.deletePermission(t.subjects,n,e)}))}))}))}revokePermissionForAllSubjects(e){0!==this.getSubjectNames().length&&this.update((t=>{Object.entries(t.subjects).forEach((([n,s])=>{const{permissions:r}=s;(0,f.hasProperty)(r,e)&&this.deletePermission(t.subjects,n,e)}))}))}deletePermission(e,t,n){const{permissions:s}=e[t];Object.keys(s).length>1?delete s[n]:delete e[t]}hasCaveat(e,t,n){return Boolean(this.getCaveat(e,t,n))}getCaveat(e,t,n){const s=this.getPermission(e,t);if(!s)throw new S.PermissionDoesNotExistError(e,t);return(0,k.findCaveat)(s,n)}addCaveat(e,t,n,s){if(this.hasCaveat(e,t,n))throw new S.CaveatAlreadyExistsError(e,t,n);this.setCaveat(e,t,n,s)}updateCaveat(e,t,n,s){if(!this.hasCaveat(e,t,n))throw new S.CaveatDoesNotExistError(e,t,n);this.setCaveat(e,t,n,s)}setCaveat(e,t,n,s){this.update((r=>{const i=r.subjects[e];if(!i)throw new S.UnrecognizedSubjectError(e);const a=i.permissions[t];if(!a)throw new S.PermissionDoesNotExistError(e,t);const o={type:n,value:s};this.validateCaveat(o,e,t);let c=!1;if(a.caveats){const e=a.caveats.findIndex((e=>e.type===o.type));-1===e?(a.caveats.push(o),c=!0):a.caveats.splice(e,1,o)}else a.caveats=[o],c=!0;c&&this.validateModifiedPermission(a,e,{invokePermissionValidator:!0,performCaveatValidation:!1})}))}updatePermissionsByCaveat(e,t){0!==Object.keys(this.state.subjects).length&&this.update((n=>{Object.values(n.subjects).forEach((s=>{Object.values(s.permissions).forEach((r=>{const{caveats:i}=r,a=i?.find((({type:t})=>t===e));if(!a)return;const o=t(a.value),{operation:c}=o;switch(c){case _.Noop:break;case _.UpdateValue:a.value=o.value,this.validateCaveat(a,s.origin,r.parentCapability);break;case _.DeleteCaveat:this.deleteCaveat(r,e,s.origin);break;case _.RevokePermission:this.deletePermission(n.subjects,s.origin,r.parentCapability);break;default:throw new Error(`Unrecognized mutation result: "${c}"`)}}))}))}))}removeCaveat(e,t,n){this.update((s=>{const r=s.subjects[e]?.permissions[t];if(!r)throw new S.PermissionDoesNotExistError(e,t);if(!r.caveats)throw new S.CaveatDoesNotExistError(e,t,n);this.deleteCaveat(r,n,e)}))}deleteCaveat(e,t,n){if(!e.caveats)throw new S.CaveatDoesNotExistError(n,e.parentCapability,t);const s=e.caveats.findIndex((e=>e.type===t));if(-1===s)throw new S.CaveatDoesNotExistError(n,e.parentCapability,t);1===e.caveats.length?e.caveats=null:e.caveats.splice(s,1),this.validateModifiedPermission(e,n,{invokePermissionValidator:!0,performCaveatValidation:!1})}validateModifiedPermission(e,t,n){if(!this.targetExists(e.parentCapability))throw new Error(`Fatal: Existing permission target "${e.parentCapability}" has no specification.`);this.validatePermission(this.getPermissionSpecification(e.parentCapability),e,t,n)}targetExists(e){return(0,f.hasProperty)(this._permissionSpecifications,e)}grantPermissions({approvedPermissions:e,requestData:t,preserveExistingPermissions:n=!0,subject:r}){return l(this,s,"m",i).call(this,{approvedPermissions:e,subject:r,mergePermissions:!1,preserveExistingPermissions:n,requestData:t})}grantPermissionsIncremental({approvedPermissions:e,requestData:t,subject:n}){return l(this,s,"m",i).call(this,{approvedPermissions:e,subject:n,mergePermissions:!0,preserveExistingPermissions:!0,requestData:t})}validatePermission(e,t,n,{invokePermissionValidator:s,performCaveatValidation:r}){const{allowedCaveats:i,validator:a,targetName:o}=e;if(e.subjectTypes?.length&&e.subjectTypes.length>0){const t=this.messagingSystem.call("SubjectMetadataController:getSubjectMetadata",n);if(!t||null===t.subjectType||!e.subjectTypes.includes(t.subjectType))throw e.permissionType===k.PermissionType.RestrictedMethod?(0,S.methodNotFound)(o,{origin:n}):new S.EndowmentPermissionDoesNotExistError(o,n)}if((0,f.hasProperty)(t,"caveats")){const{caveats:e}=t;if(null!==e&&!(Array.isArray(e)&&e.length>0))throw new S.InvalidCaveatsPropertyError(n,o,e);const s=new Set;e?.forEach((e=>{if(r&&this.validateCaveat(e,n,o),!i?.includes(e.type))throw new S.ForbiddenCaveatError(e.type,n,o);if(s.has(e.type))throw new S.DuplicateCaveatError(e.type,n,o);s.add(e.type)}))}s&&a&&a(t,n,o)}setValidatedPermissions(e,t){this.update((n=>{n.subjects[e]||(n.subjects[e]={origin:e,permissions:{}}),n.subjects[e].permissions=(0,y.castDraft)(t)}))}constructCaveats(e,t,n){const s=n?.map((n=>{this.validateCaveat(n,e,t);const{type:s,value:r}=n;return{type:s,value:r}}));return s&&(0,p.isNonEmptyArray)(s)?s:undefined}validateCaveat(e,t,n){if(!(0,p.isPlainObject)(e))throw new S.InvalidCaveatError(e,t,n);if(2!==Object.keys(e).length)throw new S.InvalidCaveatFieldsError(e,t,n);if("string"!=typeof e.type)throw new S.InvalidCaveatTypeError(e,t,n);const s=this.getCaveatSpecification(e.type);if(!s)throw new S.UnrecognizedCaveatTypeError(e.type,t,n);if(!(0,f.hasProperty)(e,"value")||e.value===undefined)throw new S.CaveatMissingValueError(e,t,n);if(!(0,p.isValidJson)(e.value))throw new S.CaveatInvalidJsonError(e,t,n);s.validator?.(e,t,n)}async requestPermissions(e,t,n={}){const{origin:r}=e,{id:i=(0,b.nanoid)(),preserveExistingPermissions:a=!0}=n;this.validateRequestedPermissions(r,t);const o={...n.metadata,id:i,origin:r},c={metadata:o,permissions:t},d=await this.requestUserApproval(c);return await l(this,s,"m",u).call(this,{subject:e,metadata:o,preserveExistingPermissions:a,approvedRequest:d})}async requestPermissionsIncremental(e,t,n={}){const{origin:r}=e,{id:i=(0,b.nanoid)()}=n;this.validateRequestedPermissions(r,t);const o=this.getPermissions(r)??{},[c,d]=l(this,s,"m",a).call(this,o,t);if(c===undefined||d===undefined)return[];try{this.validateRequestedPermissions(r,c)}catch(e){if(e instanceof Error)throw new S.InvalidMergedPermissionsError(r,e,d);throw(0,S.internalError)("Unrecognized error type",{error:e})}const m={...n.metadata,id:i,origin:r},p={metadata:m,permissions:c,diff:{currentPermissions:o,permissionDiffMap:d}},h=await this.requestUserApproval(p);return await l(this,s,"m",u).call(this,{subject:e,metadata:m,preserveExistingPermissions:!1,approvedRequest:h})}validateRequestedPermissions(e,t){if(!(0,p.isPlainObject)(t))throw(0,S.invalidParams)({message:`Requested permissions for origin "${e}" is not a plain object.`,data:{origin:e,requestedPermissions:t}});if(0===Object.keys(t).length)throw(0,S.invalidParams)({message:`Permissions request for origin "${e}" contains no permissions.`,data:{requestedPermissions:t}});for(const n of Object.keys(t)){const s=t[n];if(!this.targetExists(n))throw(0,S.methodNotFound)(n,{origin:e,requestedPermissions:t});if(!(0,p.isPlainObject)(s)||s.parentCapability!==undefined&&n!==s.parentCapability)throw(0,S.invalidParams)({message:`Permissions request for origin "${e}" contains invalid requested permission(s).`,data:{origin:e,requestedPermissions:t}});this.validatePermission(this.getPermissionSpecification(n),s,e,{invokePermissionValidator:!1,performCaveatValidation:!0})}}async requestUserApproval(e){const{origin:t,id:n}=e.metadata,s=await this.messagingSystem.call("ApprovalController:addRequest",{id:n,origin:t,requestData:e,type:w.MethodNames.RequestPermissions},!0);return this.validateApprovedPermissions(s,{id:n,origin:t}),s}getSideEffects(e){return Object.keys(e).reduce(((e,t)=>{if(this.targetExists(t)){const n=this.getPermissionSpecification(t);n.sideEffect&&(e.permittedHandlers[t]=n.sideEffect.onPermitted,n.sideEffect.onFailure&&(e.failureHandlers[t]=n.sideEffect.onFailure))}return e}),{permittedHandlers:{},failureHandlers:{}})}async executeSideEffects(e,t){const{permittedHandlers:n,failureHandlers:s}=e,r={requestData:t,messagingSystem:this.messagingSystem},i=await Promise.allSettled(Object.values(n).map((e=>e(r)))),a=i.filter((e=>"rejected"===e.status));if(a.length>0){const e=Object.values(s);if(e.length>0)try{await Promise.all(e.map((e=>e(r))))}catch(e){throw(0,S.internalError)("Unexpected error in side-effects",{error:e})}const t=a.map((e=>e.reason));throw t.forEach((e=>{console.error(e)})),t.length>1?(0,S.internalError)("Multiple errors occurred during side-effects execution",{errors:t}):t[0]}return i.map((({value:e})=>e))}validateApprovedPermissions(e,t){const{id:n,origin:s}=t;if(!(0,p.isPlainObject)(e)||!(0,p.isPlainObject)(e.metadata))throw(0,S.internalError)(`Approved permissions request for subject "${s}" is invalid.`,{data:{approvedRequest:e}});const{metadata:{id:r,origin:i},permissions:a}=e;if(r!==n)throw(0,S.internalError)(`Approved permissions request for subject "${s}" mutated its id.`,{originalId:n,mutatedId:r});if(i!==s)throw(0,S.internalError)(`Approved permissions request for subject "${s}" mutated its origin.`,{originalOrigin:s,mutatedOrigin:i});try{this.validateRequestedPermissions(s,a)}catch(e){if(e instanceof Error)throw(0,S.internalError)(`Invalid approved permissions request: ${e.message}`,e instanceof h.JsonRpcError?e.data:undefined);throw(0,S.internalError)("Unrecognized error type",{error:e})}}async acceptPermissionsRequest(e){const{id:t}=e.metadata;if(!this.hasApprovalRequest({id:t}))throw new S.PermissionsRequestNotFoundError(t);if(0!==Object.keys(e.permissions).length)try{await this.messagingSystem.call("ApprovalController:acceptRequest",t,e)}catch(e){throw this._rejectPermissionsRequest(t,e),e}else this._rejectPermissionsRequest(t,(0,S.invalidParams)({message:"Must request at least one permission."}))}async rejectPermissionsRequest(e){if(!this.hasApprovalRequest({id:e}))throw new S.PermissionsRequestNotFoundError(e);this._rejectPermissionsRequest(e,(0,S.userRejectedRequest)())}hasApprovalRequest(e){return this.messagingSystem.call("ApprovalController:hasRequest",e)}_rejectPermissionsRequest(e,t){return this.messagingSystem.call("ApprovalController:rejectRequest",e,t)}async getEndowments(e,t,n){if(!this.hasPermission(e,t))throw(0,S.unauthorized)({data:{origin:e,targetName:t}});return this.getTypedPermissionSpecification(k.PermissionType.Endowment,t,e).endowmentGetter({origin:e,requestData:n})}async executeRestrictedMethod(e,t,n){const s=this.getRestrictedMethod(t,e),r=await this._executeRestrictedMethod(s,{origin:e},t,n);if(r===undefined)throw new Error(`Internal request for method "${t}" as origin "${e}" returned no result.`);return r}_executeRestrictedMethod(e,t,n,s=[]){const{origin:r}=t,i=this.getPermission(r,n);if(!i)throw(0,S.unauthorized)({data:{origin:r,method:n}});return(0,x.decorateWithCaveats)(e,i,this._caveatSpecifications)({method:n,params:s,context:{origin:r}})}}n.PermissionController=E,s=new WeakSet,r=function(e){const{merger:t}=this.getCaveatSpecification(e);if(t===undefined)throw new S.CaveatMergerDoesNotExistError(e);return t},i=function({approvedPermissions:e,subject:t,mergePermissions:n,preserveExistingPermissions:r,requestData:i}){const{origin:a}=t;if(!a||"string"!=typeof a)throw new S.InvalidSubjectIdentifierError(a);const c=r?{...this.getPermissions(a)}:{};for(const[t,r]of Object.entries(e)){if(!this.targetExists(t))throw(0,S.methodNotFound)(t);if(r.parentCapability!==undefined&&t!==r.parentCapability)throw new S.InvalidApprovedPermissionError(a,t,r);const e=t,u=this.getPermissionSpecification(e),d={caveats:this.constructCaveats(a,e,r.caveats),invoker:a,target:e};let m;m=u.factory?u.factory(d,i):(0,k.constructPermission)(d),n&&(m=l(this,s,"m",o).call(this,c[e],m)[0]),this.validatePermission(u,m,a,{invokePermissionValidator:!0,performCaveatValidation:!0}),c[e]=m}return this.setValidatedPermissions(a,c),c},a=function(e,t){const n={},r=(0,y.produce)(e,(e=>{const r=e;Object.entries(t).forEach((([e,t])=>{const i=r[e],[a,c]=l(this,s,"m",o).call(this,i??{},t);(i===undefined||Object.keys(c).length>0)&&(r[e]=a,n[e]=c)}))}));return 0===Object.keys(n).length?[]:[r,n]},o=function(e,t){const{caveatPairs:n,leftUniqueCaveats:r,rightUniqueCaveats:i}=(0,w.collectUniqueAndPairedCaveats)(e,t),[a,o]=n.reduce((([e,t],[n,r])=>{const[i,a]=l(this,s,"m",c).call(this,n,r);return i!==undefined&&a!==undefined?(e.push(i),t[i.type]=a):e.push(n),[e,t]}),[[],{}]),u=[...a,...r,...i.map((e=>{const[t,n]=l(this,s,"m",c).call(this,undefined,e);return o[t.type]=n,t}))];return[{...e,...t,...u.length>0?{caveats:u}:{}},o]},c=function(e,t){if(e!==undefined&&e.type!==t.type)throw new S.CaveatMergeTypeMismatchError(e.type,t.type);const n=l(this,s,"m",r).call(this,t.type);if(e===undefined)return[{...t},t.value];const[i,a]=n(e.value,t.value);return i!==undefined&&a!==undefined?[{type:t.type,value:i},a]:[]},u=async function({subject:e,metadata:t,preserveExistingPermissions:n,approvedRequest:s}){const{permissions:r,...i}=s,a={...t},o=this.getSideEffects(r);if(Object.values(o.permittedHandlers).length>0){const e=await this.executeSideEffects(o,s);a.data=Object.keys(o.permittedHandlers).reduce(((t,n,s)=>({[n]:e[s],...t})),{})}return[this.grantPermissions({subject:e,approvedPermissions:r,preserveExistingPermissions:n,requestData:i}),a]}}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/PermissionController.cjs"}],[2391,{"@metamask/base-controller":1383},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SubjectMetadataController=n.SubjectType=void 0;const s=e("@metamask/base-controller");var r;!function(e){e.Extension="extension",e.Internal="internal",e.Unknown="unknown",e.Website="website",e.Snap="snap"}(r||(n.SubjectType=r={}));const i={subjectMetadata:{persist:!0,anonymous:!1}},a={subjectMetadata:{}};class o extends s.BaseController{constructor({messenger:e,subjectCacheLimit:t,state:n={}}){if(!Number.isInteger(t)||t<1)throw new Error(`subjectCacheLimit must be a positive integer. Received: "${t}"`);const s=t=>e.call("PermissionController:hasPermissions",t);super({name:"SubjectMetadataController",metadata:i,messenger:e,state:{...o.getTrimmedState(n,s)}}),this.subjectHasPermissions=s,this.subjectCacheLimit=t,this.subjectsWithoutPermissionsEncounteredSinceStartup=new Set,this.messagingSystem.registerActionHandler(`${this.name}:getSubjectMetadata`,this.getSubjectMetadata.bind(this)),this.messagingSystem.registerActionHandler(`${this.name}:addSubjectMetadata`,this.addSubjectMetadata.bind(this))}clearState(){this.subjectsWithoutPermissionsEncounteredSinceStartup.clear(),this.update((e=>({...a})))}addSubjectMetadata(e){const{origin:t}=e,n={...e,extensionId:e.extensionId||null,iconUrl:e.iconUrl||null,name:e.name||null,subjectType:e.subjectType||null};let s=null;if(this.subjectsWithoutPermissionsEncounteredSinceStartup.size>=this.subjectCacheLimit){const e=this.subjectsWithoutPermissionsEncounteredSinceStartup.values().next().value;this.subjectsWithoutPermissionsEncounteredSinceStartup.delete(e),this.subjectHasPermissions(e)||(s=e)}this.subjectsWithoutPermissionsEncounteredSinceStartup.add(t),this.update((e=>{e.subjectMetadata[t]=n,"string"==typeof s&&delete e.subjectMetadata[s]}))}getSubjectMetadata(e){return this.state.subjectMetadata[e]}trimMetadataState(){this.update((e=>o.getTrimmedState(e,this.subjectHasPermissions)))}static getTrimmedState(e,t){const{subjectMetadata:n={}}=e;return{subjectMetadata:Object.keys(n).reduce(((e,s)=>(t(s)&&(e[s]=n[s]),e)),{})}}}n.SubjectMetadataController=o}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/SubjectMetadataController.cjs"}],[2392,{"@metamask/rpc-errors":2554},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.PermissionsRequestNotFoundError=n.CaveatSpecificationMismatchError=n.CaveatMergeTypeMismatchError=n.DuplicateCaveatError=n.ForbiddenCaveatError=n.InvalidCaveatFieldsError=n.CaveatInvalidJsonError=n.CaveatMissingValueError=n.InvalidCaveatTypeError=n.InvalidCaveatError=n.CaveatAlreadyExistsError=n.CaveatDoesNotExistError=n.InvalidCaveatsPropertyError=n.UnrecognizedCaveatTypeError=n.EndowmentPermissionDoesNotExistError=n.PermissionDoesNotExistError=n.InvalidApprovedPermissionError=n.InvalidMergedPermissionsError=n.CaveatMergerDoesNotExistError=n.UnrecognizedSubjectError=n.InvalidSubjectIdentifierError=n.internalError=n.userRejectedRequest=n.invalidParams=n.methodNotFound=n.unauthorized=void 0;const s=e("@metamask/rpc-errors");n.unauthorized=function(e){return s.providerErrors.unauthorized({message:"Unauthorized to perform action. Try requesting the required permission(s) first. For more information, see: https://docs.metamask.io/guide/rpc-api.html#permissions",data:e.data})},n.methodNotFound=function(e,t){const n={message:`The method "${e}" does not exist / is not available.`};return t!==undefined&&(n.data=t),s.rpcErrors.methodNotFound(n)},n.invalidParams=function(e){return s.rpcErrors.invalidParams({data:e.data,message:e.message})},n.userRejectedRequest=function(e){return s.providerErrors.userRejectedRequest({data:e})},n.internalError=function(e,t){return s.rpcErrors.internal({message:e,data:t})};class r extends Error{constructor(e){super(`Invalid subject identifier: "${"string"==typeof e?e:typeof e}"`)}}n.InvalidSubjectIdentifierError=r;class i extends Error{constructor(e){super(`Unrecognized subject: "${e}" has no permissions.`)}}n.UnrecognizedSubjectError=i;class a extends Error{constructor(e){super(`Caveat value merger does not exist for type: "${e}"`)}}n.CaveatMergerDoesNotExistError=a;class o extends Error{constructor(e,t,n){super(`Invalid merged permissions for subject "${e}":\n${t.message}`),this.cause=t,this.data={diff:n}}}n.InvalidMergedPermissionsError=o;class c extends Error{constructor(e,t,n){super(`Invalid approved permission for origin "${e}" and target "${t}".`),this.data={origin:e,target:t,approvedPermission:n}}}n.InvalidApprovedPermissionError=c;class u extends Error{constructor(e,t){super(`Subject "${e}" has no permission for "${t}".`)}}n.PermissionDoesNotExistError=u;class l extends Error{constructor(e,t){super(`${t?`Subject "${t}"`:"Unknown subject"} has no permission for "${e}".`),t&&(this.data={origin:t})}}n.EndowmentPermissionDoesNotExistError=l;class d extends Error{constructor(e,t,n){super(`Unrecognized caveat type: "${e}"`),this.data={caveatType:e},t!==undefined&&(this.data.origin=t),n!==undefined&&(this.data.target=n)}}n.UnrecognizedCaveatTypeError=d;class m extends Error{constructor(e,t,n){super(`The "caveats" property of permission for "${t}" of subject "${e}" is invalid. It must be a non-empty array if specified.`),this.data={origin:e,target:t,caveatsProperty:n}}}n.InvalidCaveatsPropertyError=m;class p extends Error{constructor(e,t,n){super(`Permission for "${t}" of subject "${e}" has no caveat of type "${n}".`)}}n.CaveatDoesNotExistError=p;class h extends Error{constructor(e,t,n){super(`Permission for "${t}" of subject "${e}" already has a caveat of type "${n}".`)}}n.CaveatAlreadyExistsError=h;class f extends s.JsonRpcError{constructor(e,t,n){super(s.errorCodes.rpc.invalidParams,"Invalid caveat. Caveats must be plain objects.",{receivedCaveat:e}),this.data={origin:t,target:n}}}n.InvalidCaveatError=f;class g extends Error{constructor(e,t,n){super(`Caveat types must be strings. Received: "${typeof e.type}"`),this.data={caveat:e,origin:t,target:n}}}n.InvalidCaveatTypeError=g;class y extends Error{constructor(e,t,n){super('Caveat is missing "value" field.'),this.data={caveat:e,origin:t,target:n}}}n.CaveatMissingValueError=y;class b extends Error{constructor(e,t,n){super('Caveat "value" is invalid JSON.'),this.data={caveat:e,origin:t,target:n}}}n.CaveatInvalidJsonError=b;class x extends Error{constructor(e,t,n){super(`Caveat has unexpected number of fields: "${Object.keys(e).length}"`),this.data={caveat:e,origin:t,target:n}}}n.InvalidCaveatFieldsError=x;class S extends Error{constructor(e,t,n){super(`Permissions for target "${n}" may not have caveats of type "${e}".`),this.data={caveatType:e,origin:t,target:n}}}n.ForbiddenCaveatError=S;class k extends Error{constructor(e,t,n){super(`Permissions for target "${n}" contains multiple caveats of type "${e}".`),this.data={caveatType:e,origin:t,target:n}}}n.DuplicateCaveatError=k;class v extends Error{constructor(e,t){super(`Cannot merge caveats of different types: "${e}" and "${t}".`),this.data={leftCaveatType:e,rightCaveatType:t}}}n.CaveatMergeTypeMismatchError=v;class w extends Error{constructor(e,t){super(`Caveat specification uses a mismatched type. Expected caveats for ${t}`),this.data={caveatSpec:e,permissionType:t}}}n.CaveatSpecificationMismatchError=w;class T extends Error{constructor(e){super(`Permissions request with id "${e}" not found.`)}}n.PermissionsRequestNotFoundError=T}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/errors.cjs"}],[2393,{"./Caveat.cjs":2388,"./Permission.cjs":2389,"./PermissionController.cjs":2390,"./SubjectMetadataController.cjs":2391,"./errors.cjs":2392,"./rpc-methods/index.cjs":2396,"./utils.cjs":2399},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)},a=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)&&s(t,e,n);return r(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.permissionRpcMethods=n.MethodNames=void 0,i(e("./Caveat.cjs"),n),i(e("./errors.cjs"),n),i(e("./Permission.cjs"),n),i(e("./PermissionController.cjs"),n);var o=e("./utils.cjs");Object.defineProperty(n,"MethodNames",{enumerable:!0,get:function(){return o.MethodNames}}),n.permissionRpcMethods=a(e("./rpc-methods/index.cjs")),i(e("./SubjectMetadataController.cjs"),n)}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/index.cjs"}],[2394,{"./errors.cjs":2392,"@metamask/json-rpc-engine":1933},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getPermissionMiddlewareFactory=void 0;const s=e("@metamask/json-rpc-engine"),r=e("./errors.cjs");n.getPermissionMiddlewareFactory=function({executeRestrictedMethod:e,getRestrictedMethod:t,isUnrestrictedMethod:n}){return function(i){const{origin:a}=i;if("string"!=typeof a||!a)throw new Error('The subject "origin" must be a non-empty string.');return(0,s.createAsyncMiddleware)((async(s,o,c)=>{const{method:u,params:l}=s;if(n(u))return c();const d=t(u,a),m=await e(d,i,u,l);return m===undefined?(o.error=(0,r.internalError)(`Request for method "${s.method}" returned undefined result.`,{request:s}),undefined):(o.result=m,undefined)}))}}}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/permission-middleware.cjs"}],[2395,{"../utils.cjs":2399},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getPermissionsHandler=void 0;const s=e("../utils.cjs");n.getPermissionsHandler={methodNames:[s.MethodNames.GetPermissions],implementation:async function(e,t,n,s,{getPermissionsForOrigin:r}){return t.result=Object.values(r()||{}),s()},hookNames:{getPermissionsForOrigin:!0}}}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/rpc-methods/getPermissions.cjs"}],[2396,{"./getPermissions.cjs":2395,"./requestPermissions.cjs":2397,"./revokePermissions.cjs":2398},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.handlers=void 0;const s=e("./getPermissions.cjs"),r=e("./requestPermissions.cjs"),i=e("./revokePermissions.cjs");n.handlers=[r.requestPermissionsHandler,s.getPermissionsHandler,i.revokePermissionsHandler]}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/rpc-methods/index.cjs"}],[2397,{"../errors.cjs":2392,"../utils.cjs":2399,"@metamask/controller-utils":1474},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.requestPermissionsHandler=void 0;const s=e("@metamask/controller-utils"),r=e("../errors.cjs"),i=e("../utils.cjs");n.requestPermissionsHandler={methodNames:[i.MethodNames.RequestPermissions],implementation:async function(e,t,n,i,{requestPermissionsForOrigin:a}){const{params:o}=e;if(!Array.isArray(o)||!(0,s.isPlainObject)(o[0]))return i((0,r.invalidParams)({data:{request:e}}));const[c]=o,[u]=await a(c);return t.result=Object.values(u),i()},hookNames:{requestPermissionsForOrigin:!0}}}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/rpc-methods/requestPermissions.cjs"}],[2398,{"../errors.cjs":2392,"../utils.cjs":2399,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.revokePermissionsHandler=void 0;const s=e("@metamask/utils"),r=e("../errors.cjs"),i=e("../utils.cjs");n.revokePermissionsHandler={methodNames:[i.MethodNames.RevokePermissions],implementation:async function(e,t,n,i,{revokePermissionsForOrigin:a}){const{params:o}=e,c=o?.[0];if(!c)return i((0,r.invalidParams)({data:{request:e}}));const u=Object.keys(c);if(!(0,s.isNonEmptyArray)(u))return i((0,r.invalidParams)({data:{request:e}}));return a(u),t.result=null,i()},hookNames:{revokePermissionsForOrigin:!0}}}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/rpc-methods/revokePermissions.cjs"}],[2399,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s;Object.defineProperty(n,"__esModule",{value:!0}),n.collectUniqueAndPairedCaveats=n.MethodNames=void 0,function(e){e.RequestPermissions="wallet_requestPermissions",e.GetPermissions="wallet_getPermissions",e.RevokePermissions="wallet_revokePermissions"}(s||(n.MethodNames=s={})),n.collectUniqueAndPairedCaveats=function(e,t){const n=e?.caveats?.slice()??[],s=t.caveats?.slice()??[],r=[],i=[];return n.forEach((e=>{const t=s.findIndex((t=>t.type===e.type));-1===t?r.push(e):(i.push([e,s[t]]),s.splice(t,1))})),{caveatPairs:i,leftUniqueCaveats:r,rightUniqueCaveats:[...s]}}}}},{package:"@metamask/permission-controller",file:"node_modules/@metamask/permission-controller/dist/utils.cjs"}],[2408,{"fast-json-stable-stringify":4434,uuid:5663},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.AbstractPollingControllerBaseMixin=n.getKey=void 0;const i=r(e("fast-json-stable-stringify")),a=e("uuid");n.getKey=e=>(0,i.default)(e),n.AbstractPollingControllerBaseMixin=function(e){var t,r;return t=new WeakMap,r=new WeakMap,class extends e{constructor(){super(...arguments),t.set(this,new Map),r.set(this,new Map)}startPolling(e){const r=(0,a.v4)(),i=(0,n.getKey)(e),o=s(this,t,"f").get(i)??new Set;return o.add(r),s(this,t,"f").set(i,o),1===o.size&&this._startPolling(e),r}stopAllPolling(){s(this,t,"f").forEach(((e,t)=>{e.forEach((e=>{this.stopPollingByPollingToken(e)}))}))}stopPollingByPollingToken(e){if(!e)throw new Error("pollingToken required");let n=null;for(const[r,i]of s(this,t,"f"))if(i.delete(e)){0===i.size&&(n=r);break}if(n){this._stopPollingByPollingTokenSetId(n),s(this,t,"f").delete(n);const e=s(this,r,"f").get(n);if(e){for(const t of e)t(JSON.parse(n));e.clear()}}}onPollingComplete(e,t){const i=(0,n.getKey)(e),a=s(this,r,"f").get(i)??new Set;a.add(t),s(this,r,"f").set(i,a)}}}}}},{package:"@metamask/polling-controller",file:"node_modules/@metamask/polling-controller/dist/AbstractPollingController.cjs"}],[2409,{"./AbstractPollingController.cjs":2408,"@metamask/base-controller":1383},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.BlockTrackerPollingController=n.BlockTrackerPollingControllerOnly=void 0;const r=e("@metamask/base-controller"),i=e("./AbstractPollingController.cjs");function a(e){var t;class n extends((0,i.AbstractPollingControllerBaseMixin)(e)){constructor(){super(...arguments),t.set(this,{})}_startPolling(e){const n=(0,i.getKey)(e);if(s(this,t,"f")[n])return;const r=this._getNetworkClientById(e.networkClientId);if(!r)throw new Error(`Unable to retrieve blockTracker for networkClientId ${e.networkClientId}`);{const i=this._executePoll.bind(this,e);r.blockTracker.addListener("latest",i),s(this,t,"f")[n]=i}}_stopPollingByPollingTokenSetId(e){const{networkClientId:n}=JSON.parse(e),r=this._getNetworkClientById(n);if(r&&s(this,t,"f")[e]){const n=s(this,t,"f")[e];n&&(r.blockTracker.removeListener("latest",n),delete s(this,t,"f")[e])}}}return t=new WeakMap,n}class o{}n.BlockTrackerPollingControllerOnly=()=>a(o);n.BlockTrackerPollingController=()=>a(r.BaseController)}}},{package:"@metamask/polling-controller",file:"node_modules/@metamask/polling-controller/dist/BlockTrackerPollingController.cjs"}],[2410,{"./AbstractPollingController.cjs":2408,"@metamask/base-controller":1383},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},r=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.StaticIntervalPollingController=n.StaticIntervalPollingControllerOnly=void 0;const i=e("@metamask/base-controller"),a=e("./AbstractPollingController.cjs");function o(e){var t,n;class i extends((0,a.AbstractPollingControllerBaseMixin)(e)){constructor(){super(...arguments),t.set(this,{}),n.set(this,1e3)}setIntervalLength(e){s(this,n,e,"f")}getIntervalLength(){return r(this,n,"f")}_startPolling(e){if(!r(this,n,"f"))throw new Error("intervalLength must be defined and greater than 0");const s=(0,a.getKey)(e),i=r(this,t,"f")[s];this._stopPollingByPollingTokenSetId(s);const o=r(this,t,"f")[s]=setTimeout((async()=>{try{await this._executePoll(e)}catch(e){console.error(e)}o===r(this,t,"f")[s]&&this._startPolling(e)}),i?r(this,n,"f"):0)}_stopPollingByPollingTokenSetId(e){const n=r(this,t,"f")[e];n&&(clearTimeout(n),delete r(this,t,"f")[e])}}return t=new WeakMap,n=new WeakMap,i}class c{}n.StaticIntervalPollingControllerOnly=()=>o(c);n.StaticIntervalPollingController=()=>o(i.BaseController)}}},{package:"@metamask/polling-controller",file:"node_modules/@metamask/polling-controller/dist/StaticIntervalPollingController.cjs"}],[2411,{"./BlockTrackerPollingController.cjs":2409,"./StaticIntervalPollingController.cjs":2410},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.StaticIntervalPollingController=n.StaticIntervalPollingControllerOnly=n.BlockTrackerPollingController=n.BlockTrackerPollingControllerOnly=void 0;var s=e("./BlockTrackerPollingController.cjs");Object.defineProperty(n,"BlockTrackerPollingControllerOnly",{enumerable:!0,get:function(){return s.BlockTrackerPollingControllerOnly}}),Object.defineProperty(n,"BlockTrackerPollingController",{enumerable:!0,get:function(){return s.BlockTrackerPollingController}});var r=e("./StaticIntervalPollingController.cjs");Object.defineProperty(n,"StaticIntervalPollingControllerOnly",{enumerable:!0,get:function(){return r.StaticIntervalPollingControllerOnly}}),Object.defineProperty(n,"StaticIntervalPollingController",{enumerable:!0,get:function(){return r.StaticIntervalPollingController}})}}},{package:"@metamask/polling-controller",file:"node_modules/@metamask/polling-controller/dist/index.cjs"}],[2412,{"readable-stream":5274},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.BasePostMessageStream=void 0;const s=e("readable-stream"),r=()=>undefined,i="SYN",a="ACK";class o extends s.Duplex{constructor(e){super(Object.assign({objectMode:!0},e)),this._init=!1,this._haveSyn=!1,this._log=()=>null}_handshake(){this._write(i,null,r),this.cork()}_onData(e){if(this._init)try{this.push(e),this._log(e,!1)}catch(e){this.emit("error",e)}else e===i?(this._haveSyn=!0,this._write(a,null,r)):e===a&&(this._init=!0,this._haveSyn||this._write(a,null,r),this.uncork())}_read(){return undefined}_write(e,t,n){e!==a&&e!==i&&this._log(e,!0),this._postMessage(e),n()}_setLogger(e){this._log=e}}n.BasePostMessageStream=o}}},{package:"@metamask/post-message-stream",file:"node_modules/@metamask/post-message-stream/dist/BasePostMessageStream.js"}],[2413,{"../BasePostMessageStream":2412,"../utils":2417},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__rest||function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.WebWorkerParentPostMessageStream=void 0;const r=e("../BasePostMessageStream"),i=e("../utils");class a extends r.BasePostMessageStream{constructor(e){var{worker:t}=e;super(s(e,["worker"])),this._target=i.DEDICATED_WORKER_NAME,this._worker=t,this._worker.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){this._worker.postMessage({target:this._target,data:e})}_onMessage(e){const t=e.data;(0,i.isValidStreamMessage)(t)&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}n.WebWorkerParentPostMessageStream=a}}},{package:"@metamask/post-message-stream",file:"node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerParentPostMessageStream.js"}],[2414,{"../BasePostMessageStream":2412,"../utils":2417},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.WebWorkerPostMessageStream=void 0;const s=e("../BasePostMessageStream"),r=e("../utils");class i extends s.BasePostMessageStream{constructor(e={}){if("undefined"==typeof self||"undefined"==typeof WorkerGlobalScope)throw new Error("WorkerGlobalScope not found. This class should only be instantiated in a WebWorker.");super(e),this._name=r.DEDICATED_WORKER_NAME,self.addEventListener("message",this._onMessage.bind(this)),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;(0,r.isValidStreamMessage)(t)&&t.target===this._name&&this._onData(t.data)}_destroy(){return undefined}}n.WebWorkerPostMessageStream=i}}},{package:"@metamask/post-message-stream",file:"node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerPostMessageStream.js"}],[2415,{"./BasePostMessageStream":2412,"./WebWorker/WebWorkerParentPostMessageStream":2413,"./WebWorker/WebWorkerPostMessageStream":2414,"./runtime/BrowserRuntimePostMessageStream":2416,"./window/WindowPostMessageStream":2418},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./window/WindowPostMessageStream"),n),r(e("./WebWorker/WebWorkerPostMessageStream"),n),r(e("./WebWorker/WebWorkerParentPostMessageStream"),n),r(e("./runtime/BrowserRuntimePostMessageStream"),n),r(e("./BasePostMessageStream"),n)}}},{package:"@metamask/post-message-stream",file:"node_modules/@metamask/post-message-stream/dist/browser.js"}],[2416,{"../BasePostMessageStream":2412,"../utils":2417},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},a=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},o=this&&this.__rest||function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserRuntimePostMessageStream=void 0;const c=e("../BasePostMessageStream"),u=e("../utils");class l extends c.BasePostMessageStream{constructor(e){var{name:t,target:n}=e;super(o(e,["name","target"])),s.set(this,void 0),r.set(this,void 0),i(this,s,t,"f"),i(this,r,n,"f"),this._onMessage=this._onMessage.bind(this),this._getRuntime().onMessage.addListener(this._onMessage),this._handshake()}_postMessage(e){this._getRuntime().sendMessage({target:a(this,r,"f"),data:e})}_onMessage(e){(0,u.isValidStreamMessage)(e)&&e.target===a(this,s,"f")&&this._onData(e.data)}_getRuntime(){var e,t;if("chrome"in globalThis&&"function"==typeof(null===(e=null===chrome||void 0===chrome?void 0:chrome.runtime)||void 0===e?void 0:e.sendMessage))return chrome.runtime;if("browser"in globalThis&&"function"==typeof(null===(t=null===browser||void 0===browser?void 0:browser.runtime)||void 0===t?void 0:t.sendMessage))return browser.runtime;throw new Error("browser.runtime.sendMessage is not a function. This class should only be instantiated in a web extension.")}_destroy(){this._getRuntime().onMessage.removeListener(this._onMessage)}}n.BrowserRuntimePostMessageStream=l,s=new WeakMap,r=new WeakMap}}},{package:"@metamask/post-message-stream",file:"node_modules/@metamask/post-message-stream/dist/runtime/BrowserRuntimePostMessageStream.js"}],[2417,{"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isValidStreamMessage=n.DEDICATED_WORKER_NAME=void 0;const s=e("@metamask/utils");n.DEDICATED_WORKER_NAME="dedicatedWorker",n.isValidStreamMessage=function(e){return(0,s.isObject)(e)&&Boolean(e.data)&&("number"==typeof e.data||"object"==typeof e.data||"string"==typeof e.data)}}}},{package:"@metamask/post-message-stream",file:"node_modules/@metamask/post-message-stream/dist/utils.js"}],[2418,{"../BasePostMessageStream":2412,"../utils":2417,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i=this&&this.__rest||function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(n[s[r]]=e[s[r]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.WindowPostMessageStream=void 0;const a=e("@metamask/utils"),o=e("../BasePostMessageStream"),c=e("../utils"),u=null===(s=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"source"))||void 0===s?void 0:s.get;(0,a.assert)(u,"MessageEvent.prototype.source getter is not defined.");const l=null===(r=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"origin"))||void 0===r?void 0:r.get;(0,a.assert)(l,"MessageEvent.prototype.origin getter is not defined.");class d extends o.BasePostMessageStream{constructor(e){var{name:t,target:n,targetOrigin:s=location.origin,targetWindow:r=window}=e;if(super(i(e,["name","target","targetOrigin","targetWindow"])),"undefined"==typeof window||"function"!=typeof window.postMessage)throw new Error("window.postMessage is not a function. This class should only be instantiated in a Window.");this._name=t,this._target=n,this._targetOrigin=s,this._targetWindow=r,this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage,!1),this._handshake()}_postMessage(e){this._targetWindow.postMessage({target:this._target,data:e},this._targetOrigin)}_onMessage(e){const t=e.data;"*"!==this._targetOrigin&&l.call(e)!==this._targetOrigin||u.call(e)!==this._targetWindow||!(0,c.isValidStreamMessage)(t)||t.target!==this._name||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}n.WindowPostMessageStream=d}}},{package:"@metamask/post-message-stream",file:"node_modules/@metamask/post-message-stream/dist/window/WindowPostMessageStream.js"}],[2431,{"../../sdk/index.cjs":2461,"./auth-snap-requests.cjs":2432,"@metamask/base-controller":1383},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u,l,d,m,p,h,f=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},g=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.defaultState=void 0;const y=e("@metamask/base-controller"),b=e("./auth-snap-requests.cjs"),x=e("../../sdk/index.cjs");n.defaultState={isSignedIn:!1};const S={isSignedIn:{persist:!0,anonymous:!0},sessionData:{persist:!0,anonymous:!1}};class k extends y.BaseController{constructor({messenger:e,state:t,metametrics:d}){if(super({messenger:e,metadata:S,name:"AuthenticationController",state:{...n.defaultState,...t}}),s.add(this),r.set(this,void 0),i.set(this,void 0),a.set(this,!1),o.set(this,{setupLockedStateSubscriptions:()=>{const{isUnlocked:e}=this.messagingSystem.call("KeyringController:getState");f(this,a,e,"f"),this.messagingSystem.subscribe("KeyringController:unlock",(()=>{f(this,a,!0,"f")})),this.messagingSystem.subscribe("KeyringController:lock",(()=>{f(this,a,!1,"f")}))}}),p.set(this,{}),!d)throw new Error("`metametrics` field is required");f(this,r,d,"f"),f(this,i,new x.JwtBearerAuth({env:x.Env.PRD,platform:d.agent,type:x.AuthType.SRP},{storage:{getLoginResponse:g(this,s,"m",u).bind(this),setLoginResponse:g(this,s,"m",l).bind(this)},signing:{getIdentifier:g(this,s,"m",m).bind(this),signMessage:g(this,s,"m",h).bind(this)},metametrics:g(this,r,"f")}),"f"),g(this,o,"f").setupLockedStateSubscriptions(),g(this,s,"m",c).call(this)}async performSignIn(){return g(this,s,"m",d).call(this,"performSignIn"),await g(this,i,"f").getAccessToken()}performSignOut(){this.update((e=>{e.isSignedIn=!1,e.sessionData=undefined}))}async getBearerToken(){return g(this,s,"m",d).call(this,"getBearerToken"),await g(this,i,"f").getAccessToken()}async getSessionProfile(){return g(this,s,"m",d).call(this,"getSessionProfile"),await g(this,i,"f").getUserProfile()}isSignedIn(){return this.state.isSignedIn}}r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,p=new WeakMap,s=new WeakSet,c=function(){this.messagingSystem.registerActionHandler("AuthenticationController:getBearerToken",this.getBearerToken.bind(this)),this.messagingSystem.registerActionHandler("AuthenticationController:getSessionProfile",this.getSessionProfile.bind(this)),this.messagingSystem.registerActionHandler("AuthenticationController:isSignedIn",this.isSignedIn.bind(this)),this.messagingSystem.registerActionHandler("AuthenticationController:performSignIn",this.performSignIn.bind(this)),this.messagingSystem.registerActionHandler("AuthenticationController:performSignOut",this.performSignOut.bind(this))},u=async function(){return this.state.sessionData?this.state.sessionData:null},l=async function(e){const t=await g(this,r,"f").getMetaMetricsId();this.update((n=>{n.isSignedIn=!0,n.sessionData={...e,profile:{...e.profile,metaMetricsId:t}}}))},d=function(e){if(!g(this,a,"f"))throw new Error(`${e} - unable to proceed, wallet is locked`)},m=async function(){g(this,s,"m",d).call(this,"#snapGetPublicKey");return await this.messagingSystem.call("SnapController:handleRequest",(0,b.createSnapPublicKeyRequest)())},h=async function(e){if((0,x.assertMessageStartsWithMetamask)(e),g(this,p,"f")[e])return g(this,p,"f")[e];g(this,s,"m",d).call(this,"#snapSignMessage");const t=await this.messagingSystem.call("SnapController:handleRequest",(0,b.createSnapSignMessageRequest)(e));return g(this,p,"f")[e]=t,t},n.default=k}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/authentication/AuthenticationController.cjs"}],[2432,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapSignMessageRequest=n.createSnapPublicKeyRequest=void 0;const s="npm:@metamask/message-signing-snap";n.createSnapPublicKeyRequest=function(){return{snapId:s,origin:"",handler:"onRpcRequest",request:{method:"getPublicKey"}}},n.createSnapSignMessageRequest=function(e){return{snapId:s,origin:"",handler:"onRpcRequest",request:{method:"signMessage",params:{message:e}}}}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/authentication/auth-snap-requests.cjs"}],[2433,{"./AuthenticationController.cjs":2431,"./mocks/index.cjs":2434},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)},a=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)&&s(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Mocks=n.Controller=void 0;const c=o(e("./AuthenticationController.cjs"));n.Controller=c.default;const u=c.default;n.default=u,i(e("./AuthenticationController.cjs"),n),n.Mocks=a(e("./mocks/index.cjs"))}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/authentication/index.cjs"}],[2434,{"./mockResponses.cjs":2435},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./mockResponses.cjs"),n)}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/authentication/mocks/index.cjs"}],[2435,{"../../../sdk/mocks/auth.cjs":2462},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getMockAuthAccessTokenResponse=n.MOCK_OATH_TOKEN_RESPONSE=n.getMockAuthLoginResponse=n.MOCK_LOGIN_RESPONSE=n.getMockAuthNonceResponse=n.MOCK_JWT=n.MOCK_NONCE=n.MOCK_NONCE_RESPONSE=void 0;const s=e("../../../sdk/mocks/auth.cjs");n.MOCK_NONCE_RESPONSE=s.MOCK_NONCE_RESPONSE,n.MOCK_NONCE=n.MOCK_NONCE_RESPONSE.nonce,n.MOCK_JWT=s.MOCK_JWT;n.getMockAuthNonceResponse=()=>({url:s.MOCK_NONCE_URL,requestMethod:"GET",response:n.MOCK_NONCE_RESPONSE}),n.MOCK_LOGIN_RESPONSE=s.MOCK_SRP_LOGIN_RESPONSE;n.getMockAuthLoginResponse=()=>({url:s.MOCK_SRP_LOGIN_URL,requestMethod:"POST",response:n.MOCK_LOGIN_RESPONSE}),n.MOCK_OATH_TOKEN_RESPONSE=s.MOCK_OIDC_TOKEN_RESPONSE;n.getMockAuthAccessTokenResponse=()=>({url:s.MOCK_OIDC_TOKEN_URL,requestMethod:"POST",response:n.MOCK_OATH_TOKEN_RESPONSE})}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/authentication/mocks/mockResponses.cjs"}],[2436,{"../../sdk/index.cjs":2461,"../authentication/auth-snap-requests.cjs":2432,"./account-syncing/controller-integration.cjs":2438,"./account-syncing/setup-subscriptions.cjs":2439,"./network-syncing/controller-integration.cjs":2447,"@metamask/base-controller":1383},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u,l,d,m,p,h,f,g=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},y=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.defaultState=void 0;const b=e("@metamask/base-controller"),x=e("./account-syncing/controller-integration.cjs"),S=e("./account-syncing/setup-subscriptions.cjs"),k=e("./network-syncing/controller-integration.cjs"),v=e("../../sdk/index.cjs"),w=e("../authentication/auth-snap-requests.cjs"),T="UserStorageController";n.defaultState={isProfileSyncingEnabled:!0,isProfileSyncingUpdateLoading:!1,hasAccountSyncingSyncedAtLeastOnce:!1,isAccountSyncingReadyToBeDispatched:!1,isAccountSyncingInProgress:!1};const _={isProfileSyncingEnabled:{persist:!0,anonymous:!0},isProfileSyncingUpdateLoading:{persist:!1,anonymous:!1},hasAccountSyncingSyncedAtLeastOnce:{persist:!0,anonymous:!1},isAccountSyncingReadyToBeDispatched:{persist:!0,anonymous:!1},isAccountSyncingInProgress:{persist:!1,anonymous:!1},hasNetworkSyncingSyncedAtLeastOnce:{persist:!0,anonymous:!1}};class E extends b.BaseController{constructor({messenger:e,state:t,env:f,config:b,nativeScryptCrypto:x}){super({messenger:e,metadata:_,name:T,state:{...n.defaultState,...t}}),s.add(this),r.set(this,{isAccountSyncingEnabled:!1,isNetworkSyncingEnabled:!1}),i.set(this,void 0),a.set(this,{getProfileId:async()=>{const e=await this.messagingSystem.call("AuthenticationController:getSessionProfile");return e?.profileId},isSignedIn:()=>this.messagingSystem.call("AuthenticationController:isSignedIn"),signIn:async()=>await this.messagingSystem.call("AuthenticationController:performSignIn")}),o.set(this,void 0),c.set(this,!1),u.set(this,{}),l.set(this,{setupLockedStateSubscriptions:()=>{const{isUnlocked:e}=this.messagingSystem.call("KeyringController:getState");y(this,c,e,"f"),this.messagingSystem.subscribe("KeyringController:unlock",(()=>{y(this,c,!0,"f")})),this.messagingSystem.subscribe("KeyringController:lock",(()=>{y(this,c,!1,"f")}))}}),d.set(this,undefined),p.set(this,{}),g(this,r,"f").isAccountSyncingEnabled=Boolean(f?.isAccountSyncingEnabled),g(this,r,"f").isNetworkSyncingEnabled=Boolean(f?.isNetworkSyncingEnabled),y(this,o,b,"f"),y(this,i,new v.UserStorage({env:v.Env.PRD,auth:{getAccessToken:()=>this.messagingSystem.call("AuthenticationController:getBearerToken"),getUserProfile:async()=>await this.messagingSystem.call("AuthenticationController:getSessionProfile"),signMessage:e=>g(this,s,"m",h).call(this,e)}},{storage:{getStorageKey:async e=>g(this,u,"f")[e]??null,setStorageKey:async(e,t)=>{g(this,u,"f")[e]=t}}}),"f"),g(this,l,"f").setupLockedStateSubscriptions(),g(this,s,"m",m).call(this),y(this,d,x,"f"),g(this,r,"f").isAccountSyncingEnabled&&(0,S.setupAccountSyncingSubscriptions)({isAccountSyncingEnabled:!0},{getUserStorageControllerInstance:()=>this,getMessenger:()=>this.messagingSystem}),g(this,r,"f").isNetworkSyncingEnabled&&(0,k.startNetworkSyncing)({messenger:e,getUserStorageControllerInstance:()=>this,isMutationSyncBlocked:()=>!this.state.hasNetworkSyncingSyncedAtLeastOnce})}async performGetStorage(e){return await g(this,i,"f").getItem(e,{nativeScryptCrypto:g(this,d,"f"),validateAgainstSchema:!0})}async performGetStorageAllFeatureEntries(e){return await g(this,i,"f").getAllFeatureItems(e,{nativeScryptCrypto:g(this,d,"f"),validateAgainstSchema:!0})}async performSetStorage(e,t){return await g(this,i,"f").setItem(e,t,{nativeScryptCrypto:g(this,d,"f"),validateAgainstSchema:!0})}async performBatchSetStorage(e,t){return await g(this,i,"f").batchSetItems(e,t,{nativeScryptCrypto:g(this,d,"f"),validateAgainstSchema:!0})}async performDeleteStorage(e){return await g(this,i,"f").deleteItem(e,{nativeScryptCrypto:g(this,d,"f"),validateAgainstSchema:!0})}async performDeleteStorageAllFeatureEntries(e){return await g(this,i,"f").deleteAllFeatureItems(e)}async performBatchDeleteStorage(e,t){return await g(this,i,"f").batchDeleteItems(e,t)}async getStorageKey(){return await g(this,i,"f").getStorageKey()}flushStorageKeyCache(){y(this,u,{},"f")}async enableProfileSyncing(){try{g(this,s,"m",f).call(this,!0);g(this,a,"f").isSignedIn()||await g(this,a,"f").signIn(),this.update((e=>{e.isProfileSyncingEnabled=!0})),g(this,s,"m",f).call(this,!1)}catch(e){g(this,s,"m",f).call(this,!1);const t=e instanceof Error?e.message:JSON.stringify(e);throw new Error(`${T} - failed to enable profile syncing - ${t}`)}}async disableProfileSyncing(){!this.state.isProfileSyncingEnabled||(g(this,s,"m",f).call(this,!0),this.update((e=>{e.isProfileSyncingEnabled=!1})),g(this,s,"m",f).call(this,!1))}async setHasAccountSyncingSyncedAtLeastOnce(e){this.update((t=>{t.hasAccountSyncingSyncedAtLeastOnce=e}))}async setIsAccountSyncingReadyToBeDispatched(e){this.update((t=>{t.isAccountSyncingReadyToBeDispatched=e}))}async setIsAccountSyncingInProgress(e){this.update((t=>{t.isAccountSyncingInProgress=e}))}async syncInternalAccountsWithUserStorage(){const e=await g(this,a,"f").getProfileId();await(0,x.syncInternalAccountsWithUserStorage)({isAccountSyncingEnabled:g(this,r,"f").isAccountSyncingEnabled,maxNumberOfAccountsToAdd:g(this,o,"f")?.accountSyncing?.maxNumberOfAccountsToAdd,onAccountAdded:()=>g(this,o,"f")?.accountSyncing?.onAccountAdded?.(e),onAccountNameUpdated:()=>g(this,o,"f")?.accountSyncing?.onAccountNameUpdated?.(e),onAccountSyncErroneousSituation:(t,n)=>g(this,o,"f")?.accountSyncing?.onAccountSyncErroneousSituation?.(e,t,n)},{getMessenger:()=>this.messagingSystem,getUserStorageControllerInstance:()=>this})}async saveInternalAccountToUserStorage(e){await(0,x.saveInternalAccountToUserStorage)(e,{isAccountSyncingEnabled:g(this,r,"f").isAccountSyncingEnabled},{getMessenger:()=>this.messagingSystem,getUserStorageControllerInstance:()=>this})}async syncNetworks(){if(!g(this,r,"f").isNetworkSyncingEnabled)return;const e=await g(this,a,"f").getProfileId();await(0,k.performMainNetworkSync)({messenger:this.messagingSystem,getUserStorageControllerInstance:()=>this,maxNetworksToAdd:g(this,o,"f")?.networkSyncing?.maxNumberOfNetworksToAdd,onNetworkAdded:t=>g(this,o,"f")?.networkSyncing?.onNetworkAdded?.(e,t),onNetworkUpdated:t=>g(this,o,"f")?.networkSyncing?.onNetworkUpdated?.(e,t),onNetworkRemoved:t=>g(this,o,"f")?.networkSyncing?.onNetworkRemoved?.(e,t)}),this.update((e=>{e.hasNetworkSyncingSyncedAtLeastOnce=!0}))}}r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,c=new WeakMap,u=new WeakMap,l=new WeakMap,d=new WeakMap,p=new WeakMap,s=new WeakSet,m=function(){this.messagingSystem.registerActionHandler("UserStorageController:performGetStorage",this.performGetStorage.bind(this)),this.messagingSystem.registerActionHandler("UserStorageController:performGetStorageAllFeatureEntries",this.performGetStorageAllFeatureEntries.bind(this)),this.messagingSystem.registerActionHandler("UserStorageController:performSetStorage",this.performSetStorage.bind(this)),this.messagingSystem.registerActionHandler("UserStorageController:performBatchSetStorage",this.performBatchSetStorage.bind(this)),this.messagingSystem.registerActionHandler("UserStorageController:performDeleteStorage",this.performDeleteStorage.bind(this)),this.messagingSystem.registerActionHandler("UserStorageController:performBatchDeleteStorage",this.performBatchDeleteStorage.bind(this)),this.messagingSystem.registerActionHandler("UserStorageController:getStorageKey",this.getStorageKey.bind(this)),this.messagingSystem.registerActionHandler("UserStorageController:enableProfileSyncing",this.enableProfileSyncing.bind(this)),this.messagingSystem.registerActionHandler("UserStorageController:disableProfileSyncing",this.disableProfileSyncing.bind(this)),this.messagingSystem.registerActionHandler("UserStorageController:syncInternalAccountsWithUserStorage",this.syncInternalAccountsWithUserStorage.bind(this)),this.messagingSystem.registerActionHandler("UserStorageController:saveInternalAccountToUserStorage",this.saveInternalAccountToUserStorage.bind(this))},h=async function(e){if(g(this,p,"f")[e])return g(this,p,"f")[e];if(!g(this,c,"f"))throw new Error("#snapSignMessage - unable to call snap, wallet is locked");const t=await this.messagingSystem.call("SnapController:handleRequest",(0,w.createSnapSignMessageRequest)(e));return g(this,p,"f")[e]=t,t},f=function(e){this.update((t=>{t.isProfileSyncingUpdateLoading=e}))},n.default=E}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/UserStorageController.cjs"}],[2437,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.LOCALIZED_DEFAULT_ACCOUNT_NAMES=n.USER_STORAGE_VERSION_KEY=n.USER_STORAGE_VERSION=void 0,n.USER_STORAGE_VERSION="1",n.USER_STORAGE_VERSION_KEY="v",n.LOCALIZED_DEFAULT_ACCOUNT_NAMES=["Account","መለያ","الحساب","Профил","অ্যাকাউন্ট","Compte","Účet","Konto","Λογαριασμός","Cuenta","حساب","Tili","એકાઉન્ટ","חשבון","अकाउंट","खाता","Račun","Kont","Fiók","Akun","アカウント","ಖಾತೆ","계정","Paskyra","Konts","അക്കൗണ്ട്","खाते","Akaun","Conta","Cont","Счет","налог","Akaunti","கணக்கு","ఖాతా","บัญชี","Hesap","Обліковий запис","Tài khoản","账户","帳戶"]}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/account-syncing/constants.cjs"}],[2438,{"../../../shared/storage-schema.cjs":2473,"./sync-utils.cjs":2440,"./utils.cjs":2441,"@metamask/keyring-api":1983,"@metamask/keyring-controller":1990},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.syncInternalAccountsWithUserStorage=n.saveInternalAccountsListToUserStorage=n.saveInternalAccountToUserStorage=void 0;const s=e("@metamask/keyring-api"),r=e("@metamask/keyring-controller"),i=e("./sync-utils.cjs"),a=e("./utils.cjs"),o=e("../../../shared/storage-schema.cjs");async function c(e,t){const{isAccountSyncingEnabled:n}=e,{getUserStorageControllerInstance:s}=t;if(!n)return;const r=await(0,i.getInternalAccountsList)(t);if(!r?.length)return;const c=r.map(a.mapInternalAccountToUserStorageAccount);await s().performBatchSetStorage(o.USER_STORAGE_FEATURE_NAMES.accounts,c.map((e=>[e.a,JSON.stringify(e)])))}n.saveInternalAccountToUserStorage=async function(e,t,n){const{isAccountSyncingEnabled:r}=t,{getUserStorageControllerInstance:c}=n;if(r&&(0,i.canPerformAccountSyncing)(t,n)&&(0,s.isEvmAccountType)(e.type)&&await(0,a.isInternalAccountFromPrimarySRPHdKeyring)(e,n))try{const t=(0,a.mapInternalAccountToUserStorageAccount)(e);await c().performSetStorage(`${o.USER_STORAGE_FEATURE_NAMES.accounts}.${e.address}`,JSON.stringify(t))}catch(e){const t=e instanceof Error?e.message:JSON.stringify(e);throw new Error(`UserStorageController - failed to save account to user storage - ${t}`)}},n.saveInternalAccountsListToUserStorage=c,n.syncInternalAccountsWithUserStorage=async function(e,t){const{isAccountSyncingEnabled:n}=e;if(!(0,i.canPerformAccountSyncing)(e,t)||!n)return;const{maxNumberOfAccountsToAdd:s=Infinity,onAccountAdded:u,onAccountNameUpdated:l,onAccountSyncErroneousSituation:d}=e,{getMessenger:m,getUserStorageControllerInstance:p}=t;try{await p().setIsAccountSyncingInProgress(!0);const e=await(0,i.getUserStorageAccountsList)(t);if(!e||!e.length)return await c({isAccountSyncingEnabled:n},t),void await p().setHasAccountSyncingSyncedAtLeastOnce(!0);let h=!1;const f=[],g=await(0,i.getInternalAccountsList)(t);if(!g||!g.length)throw new Error("Failed to get internal accounts list");if(e.length>g.length){const t=Math.min(e.length,s)-g.length;await m().call("KeyringController:withKeyring",{type:r.KeyringTypes.hd,index:0},(async({keyring:e})=>{await e.addAccounts(t)}));for(let e=0;e<t;e++)u?.()}const y=await(0,i.getInternalAccountsList)(t),b=y.filter((e=>!g.find((t=>t.address===e.address))));for(const t of y){const n=e.find((e=>e.a===t.address));if(!n){if(b.includes(t)){h=!0,d?.("An account was added to the internal accounts list but was not present in the user storage accounts list",{internalAccount:t,userStorageAccount:n,newlyAddedAccounts:b,userStorageAccountsList:e,internalAccountsList:g,refreshedInternalAccountsList:y,internalAccountsToBeSavedToUserStorage:f});continue}f.push(t);continue}const s=(0,a.isNameDefaultAccountName)(t.metadata.name),r=(0,a.isNameDefaultAccountName)(n.n);if(s)r||(m().call("AccountsController:updateAccountMetadata",t.id,{name:n.n}),l?.());else if(r)f.push(t);else if(n.nlu===undefined)t.metadata.nameLastUpdatedAt===undefined||f.push(t);else{if(t.metadata.nameLastUpdatedAt!==undefined){if(t.metadata.nameLastUpdatedAt>n.nlu){f.push(t);continue}}m().call("AccountsController:updateAccountMetadata",t.id,{name:n.n,nameLastUpdatedAt:n.nlu});t.metadata.name===n.n||l?.()}}f.length&&await p().performBatchSetStorage(o.USER_STORAGE_FEATURE_NAMES.accounts,f.map((e=>[e.address,JSON.stringify((0,a.mapInternalAccountToUserStorageAccount)(e))])));const x=e.filter((e=>!y.find((t=>t.address===e.a))));if(x.length&&(await p().performBatchDeleteStorage(o.USER_STORAGE_FEATURE_NAMES.accounts,x.map((e=>e.a))),h=!0,d?.("An account was present in the user storage accounts list but was not found in the internal accounts list after the sync",{userStorageAccountsToBeDeleted:x,internalAccountsList:g,refreshedInternalAccountsList:y,internalAccountsToBeSavedToUserStorage:f,userStorageAccountsList:e})),h){const[e,n]=await Promise.all([(0,i.getUserStorageAccountsList)(t),(0,i.getInternalAccountsList)(t)]),r=n.every((t=>e?.some((e=>e.a===t.address)))),a=(e?.length||0)>s||e?.every((e=>n.some((t=>t.address===e.a)))),o=r&&a,c={finalUserStorageAccountsList:e,finalInternalAccountsList:n};d?.(o?"Erroneous situations were found during the sync, but final state matches the expected state":"Erroneous situations were found during the sync, and final state does not match the expected state",c)}await p().setHasAccountSyncingSyncedAtLeastOnce(!0)}catch(e){const t=e instanceof Error?e.message:JSON.stringify(e);throw new Error(`UserStorageController - failed to sync user storage accounts list - ${t}`)}finally{await p().setIsAccountSyncingInProgress(!1)}}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/account-syncing/controller-integration.cjs"}],[2439,{"./controller-integration.cjs":2438,"./sync-utils.cjs":2440},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.setupAccountSyncingSubscriptions=void 0;const s=e("./controller-integration.cjs"),r=e("./sync-utils.cjs");n.setupAccountSyncingSubscriptions=function(e,t){const{getMessenger:n,getUserStorageControllerInstance:i}=t;n().subscribe("AccountsController:accountAdded",(async n=>{(0,r.canPerformAccountSyncing)(e,t)&&i().state.hasAccountSyncingSyncedAtLeastOnce&&await(0,s.saveInternalAccountToUserStorage)(n,e,t)})),n().subscribe("AccountsController:accountRenamed",(async n=>{(0,r.canPerformAccountSyncing)(e,t)&&i().state.hasAccountSyncingSyncedAtLeastOnce&&await(0,s.saveInternalAccountToUserStorage)(n,e,t)}))}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/account-syncing/setup-subscriptions.cjs"}],[2440,{"../../../shared/storage-schema.cjs":2473,"./utils.cjs":2441},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getUserStorageAccountsList=n.getInternalAccountsList=n.canPerformAccountSyncing=void 0;const s=e("./utils.cjs"),r=e("../../../shared/storage-schema.cjs");n.canPerformAccountSyncing=function(e,t){const{isAccountSyncingEnabled:n}=e,{getMessenger:s,getUserStorageControllerInstance:r}=t,{isProfileSyncingEnabled:i,isAccountSyncingInProgress:a}=r().state,o=s().call("AuthenticationController:isSignedIn");return!(!(i&&o&&n)||a)},n.getInternalAccountsList=async function(e){const{getMessenger:t}=e,n=await t().call("AccountsController:listAccounts");return await(0,s.mapInternalAccountsListToPrimarySRPHdKeyringInternalAccountsList)(n,e)},n.getUserStorageAccountsList=async function(e){const{getUserStorageControllerInstance:t}=e,n=await t().performGetStorageAllFeatureEntries(r.USER_STORAGE_FEATURE_NAMES.accounts);return n?.map((e=>JSON.parse(e)))??null}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/account-syncing/sync-utils.cjs"}],[2441,{"./constants.cjs":2437,"@metamask/keyring-controller":1990},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isInternalAccountFromPrimarySRPHdKeyring=n.mapInternalAccountsListToPrimarySRPHdKeyringInternalAccountsList=n.mapInternalAccountToUserStorageAccount=n.isNameDefaultAccountName=void 0;const s=e("@metamask/keyring-controller"),r=e("./constants.cjs");n.isNameDefaultAccountName=e=>r.LOCALIZED_DEFAULT_ACCOUNT_NAMES.some((t=>new RegExp(`^${t} ([0-9]+)$`,"u").test(e)));n.mapInternalAccountToUserStorageAccount=e=>{const{address:t,id:s,metadata:i}=e,{name:a,nameLastUpdatedAt:o}=i;return{[r.USER_STORAGE_VERSION_KEY]:r.USER_STORAGE_VERSION,a:t,i:s,n:a,...(0,n.isNameDefaultAccountName)(a)?{}:{nlu:o}}},n.mapInternalAccountsListToPrimarySRPHdKeyringInternalAccountsList=async function(e,t){const{getMessenger:n}=t,r=await n().call("KeyringController:withKeyring",{type:s.KeyringTypes.hd,index:0},(async({keyring:e})=>await e.getAccounts()));return e.filter((e=>r?.includes(e.address)))},n.isInternalAccountFromPrimarySRPHdKeyring=async function(e,t){if(e.metadata.keyring.type!==s.KeyringTypes.hd)return!1;const{getMessenger:n}=t;return(await n().call("KeyringController:withKeyring",{type:s.KeyringTypes.hd,index:0},(async({keyring:e})=>await e.getAccounts()))).includes(e.address)}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/account-syncing/utils.cjs"}],[2442,{"../../shared/encryption/index.cjs":2470,"../../shared/storage-schema.cjs":2473,"./UserStorageController.cjs":2436,"./mocks/index.cjs":2443},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)},a=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)&&s(t,e,n);return r(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Mocks=n.Controller=void 0;const c=o(e("./UserStorageController.cjs"));n.Controller=c.default;const u=c.default;n.default=u,i(e("./UserStorageController.cjs"),n),n.Mocks=a(e("./mocks/index.cjs")),i(e("../../shared/encryption/index.cjs"),n),i(e("../../shared/storage-schema.cjs"),n)}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/index.cjs"}],[2443,{"./mockResponses.cjs":2444,"./mockStorage.cjs":2445},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./mockResponses.cjs"),n),r(e("./mockStorage.cjs"),n)}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/mocks/index.cjs"}],[2444,{"../../../sdk/index.cjs":2461,"../../../shared/storage-schema.cjs":2473,"./mockStorage.cjs":2445},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.deleteMockUserStorageAllFeatureEntriesResponse=n.deleteMockUserStorageResponse=n.getMockUserStorageBatchDeleteResponse=n.getMockUserStorageBatchPutResponse=n.getMockUserStoragePutResponse=n.getMockUserStorageAllFeatureEntriesResponse=n.getMockUserStorageGetResponse=n.createMockAllFeatureEntriesResponse=n.createMockGetStorageResponse=n.getMockUserStorageEndpoint=void 0;const s=e("./mockStorage.cjs"),r=e("../../../sdk/index.cjs"),i=e("../../../shared/storage-schema.cjs");async function a(e){return{HashedKey:"HASHED_KEY",Data:await(0,s.MOCK_ENCRYPTED_STORAGE_DATA)(e)}}async function o(e=[s.MOCK_STORAGE_DATA]){const t=[];for(const n of e)t.push({HashedKey:"HASHED_KEY",Data:await(0,s.MOCK_ENCRYPTED_STORAGE_DATA)(n)});return t}n.getMockUserStorageEndpoint=e=>1===e.split(".").length?`${(0,r.getEnvUrls)(r.Env.PRD).userStorageApiUrl}/api/v1/userstorage/${e}`:`${(0,r.getEnvUrls)(r.Env.PRD).userStorageApiUrl}/api/v1/userstorage/${(0,i.createEntryPath)(e,s.MOCK_STORAGE_KEY)}`,n.createMockGetStorageResponse=a,n.createMockAllFeatureEntriesResponse=o,n.getMockUserStorageGetResponse=async function(e=`${i.USER_STORAGE_FEATURE_NAMES.notifications}.notification_settings`){return{url:(0,n.getMockUserStorageEndpoint)(e),requestMethod:"GET",response:await a()}},n.getMockUserStorageAllFeatureEntriesResponse=async function(e=i.USER_STORAGE_FEATURE_NAMES.notifications,t){return{url:(0,n.getMockUserStorageEndpoint)(e),requestMethod:"GET",response:await o(t)}};n.getMockUserStoragePutResponse=(e=`${i.USER_STORAGE_FEATURE_NAMES.notifications}.notification_settings`)=>({url:(0,n.getMockUserStorageEndpoint)(e),requestMethod:"PUT",response:null});n.getMockUserStorageBatchPutResponse=(e=i.USER_STORAGE_FEATURE_NAMES.notifications)=>({url:(0,n.getMockUserStorageEndpoint)(e),requestMethod:"PUT",response:null});n.getMockUserStorageBatchDeleteResponse=(e="notifications")=>({url:(0,n.getMockUserStorageEndpoint)(e),requestMethod:"PUT",response:null});n.deleteMockUserStorageResponse=(e=`${i.USER_STORAGE_FEATURE_NAMES.notifications}.notification_settings`)=>({url:(0,n.getMockUserStorageEndpoint)(e),requestMethod:"DELETE",response:null});n.deleteMockUserStorageAllFeatureEntriesResponse=(e=i.USER_STORAGE_FEATURE_NAMES.notifications)=>({url:(0,n.getMockUserStorageEndpoint)(e),requestMethod:"DELETE",response:null})}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/mocks/mockResponses.cjs"}],[2445,{"../../../shared/encryption/index.cjs":2470},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=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)&&s(t,e,n);return r(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.MOCK_ENCRYPTED_STORAGE_DATA=n.MOCK_STORAGE_DATA=n.MOCK_STORAGE_KEY=n.MOCK_STORAGE_KEY_SIGNATURE=void 0;const a=i(e("../../../shared/encryption/index.cjs"));let o;n.MOCK_STORAGE_KEY_SIGNATURE="mockStorageKey",n.MOCK_STORAGE_KEY=(0,a.createSHA256Hash)(n.MOCK_STORAGE_KEY_SIGNATURE),n.MOCK_STORAGE_DATA=JSON.stringify({hello:"world"});n.MOCK_ENCRYPTED_STORAGE_DATA=async e=>o??(o=await a.default.encryptString(e??n.MOCK_STORAGE_DATA,n.MOCK_STORAGE_KEY))}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/mocks/mockStorage.cjs"}],[2446,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getBoundedNetworksToAdd=n.calculateAvailableSpaceToAdd=n.MAX_NETWORKS_SIZE=void 0,n.MAX_NETWORKS_SIZE=50;n.calculateAvailableSpaceToAdd=(e,t)=>Math.max(0,t-e);n.getBoundedNetworksToAdd=(e,t,s=n.MAX_NETWORKS_SIZE)=>{const r=(0,n.calculateAvailableSpaceToAdd)(e.length,s),i=Math.min(r,t.length);return t.sort(((e,t)=>e.chainId.localeCompare(t.chainId))).slice(0,i)}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/network-syncing/add-network-utils.cjs"}],[2447,{"./add-network-utils.cjs":2446,"./services.cjs":2448,"./sync-all.cjs":2449,"./sync-mutations.cjs":2450,"./update-network-utils.cjs":2452,loglevel:4863},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.performMainNetworkSync=n.dispatchUpdateNetwork=n.startNetworkSyncing=n.isMainNetworkSyncInProgress=void 0;const r=s(e("loglevel")),i=e("./add-network-utils.cjs"),a=e("./services.cjs"),o=e("./sync-all.cjs"),c=e("./sync-mutations.cjs"),u=e("./update-network-utils.cjs");n.isMainNetworkSyncInProgress=!1,n.startNetworkSyncing=function(e){const{messenger:t,isMutationSyncBlocked:s,getUserStorageControllerInstance:i}=e;try{t.subscribe("NetworkController:networkRemoved",(async e=>{try{if(s())return;if(n.isMainNetworkSyncInProgress)return;await(0,c.deleteNetwork)(e,{getUserStorageControllerInstance:i})}catch{}}))}catch(e){r.default.warn("NetworkSyncing, event subscription failed",e)}};n.dispatchUpdateNetwork=async e=>{const{messenger:t,originalNetworkConfiguration:n,newNetworkConfiguration:s,selectedNetworkClientId:r}=e,{updateNetworkFields:i,newSelectedRpcEndpointIndex:a}=(0,u.createUpdateNetworkProps)({originalNetworkConfiguration:n,newNetworkConfiguration:s,selectedNetworkClientId:r});await t.call("NetworkController:updateNetwork",i.chainId,i,{replacementSelectedRpcEndpointIndex:a})},n.performMainNetworkSync=async function(e){const{messenger:t,maxNetworksToAdd:s,onNetworkAdded:u,onNetworkRemoved:l,onNetworkUpdated:d,getUserStorageControllerInstance:m}=e;if(!n.isMainNetworkSyncInProgress){n.isMainNetworkSyncInProgress=!0;try{const e=t.call("NetworkController:getState"),p=Object.values(e.networkConfigurationsByChainId??{}),h=await(0,a.getAllRemoteNetworks)({getUserStorageControllerInstance:m}),f=(0,o.findNetworksToUpdate)({localNetworks:p,remoteNetworks:h});r.default.debug("performMainNetworkSync() - Network Syncing Started",{localNetworks:p,remoteNetworks:h,networkChanges:f}),f?.remoteNetworksToUpdate&&f.remoteNetworksToUpdate.length>0&&await(0,c.batchUpdateNetworks)(f?.remoteNetworksToUpdate,{getUserStorageControllerInstance:m});const g=f?.missingLocalNetworks&&(0,i.getBoundedNetworksToAdd)(p,f.missingLocalNetworks,s);if(g&&g.length>0){const e=[];g.forEach((n=>{try{t.call("NetworkController:addNetwork",n),u?.(n.chainId)}catch(t){e.push(t)}})),e.length>0&&r.default.error("performMainNetworkSync() - NetworkController:addNetwork failures",e)}if(f?.localNetworksToUpdate&&f.localNetworksToUpdate.length>0){const s=[];for(const r of f.localNetworksToUpdate)try{await(0,n.dispatchUpdateNetwork)({messenger:t,originalNetworkConfiguration:e.networkConfigurationsByChainId[r.chainId],newNetworkConfiguration:r,selectedNetworkClientId:e.selectedNetworkClientId}),d?.(r.chainId)}catch(e){s.push(e)}s.length>0&&r.default.error("performMainNetworkSync() - NetworkController:updateNetwork failed",s)}if(f?.localNetworksToRemove&&f.localNetworksToRemove.length>0){const e=[];f.localNetworksToRemove.forEach((n=>{try{t.call("NetworkController:removeNetwork",n.chainId),l?.(n.chainId)}catch(t){e.push(t)}})),e.length>0&&r.default.error("performMainNetworkSync() - NetworkController:removeNetwork failed",e)}}catch(e){r.default.error("performMainNetworkSync() failed",e)}finally{n.isMainNetworkSyncInProgress=!1}}}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/network-syncing/controller-integration.cjs"}],[2448,{"../../../shared/storage-schema.cjs":2473},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.batchUpsertRemoteNetworks=n.upsertRemoteNetwork=n.getAllRemoteNetworks=void 0;const s=e("../../../shared/storage-schema.cjs");const r=e=>e!==undefined&&null!==e;n.getAllRemoteNetworks=async function(e){try{const t=await e.getUserStorageControllerInstance().performGetStorageAllFeatureEntries(s.USER_STORAGE_FEATURE_NAMES.networks)??[];return t.map((e=>function(e){try{return JSON.parse(e)}catch{return undefined}}(e))).filter(r)}catch{return[]}},n.upsertRemoteNetwork=async function(e,t){const n=e.chainId.toString(),s=JSON.stringify(e);return await t.getUserStorageControllerInstance().performSetStorage(`networks.${n}`,s)},n.batchUpsertRemoteNetworks=async function(e,t){const n=e.map((e=>[e.chainId,JSON.stringify(e)]));await t.getUserStorageControllerInstance().performBatchSetStorage("networks",n)}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/network-syncing/services.cjs"}],[2449,{"../utils.cjs":2453,"./types.cjs":2451},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.findNetworksToUpdate=n.getUpdatedNetworkLists=n.getMissingNetworkLists=n.checkWhichNetworkIsLatest=n.getDataStructures=void 0;const s=e("./types.cjs"),r=e("../utils.cjs"),i=e=>new Map(e.map((e=>[e.chainId,e]))),a=(e,t)=>{const n=t?e.filter((e=>t(e))):e;return new Set(n.map((e=>e.chainId)))};n.getDataStructures=(e,t)=>({localMap:i(e),remoteMap:i(t),localKeySet:a(e),remoteKeySet:a(t),existingRemoteKeySet:a(t,(e=>!e.d))});n.checkWhichNetworkIsLatest=(e,t)=>e.lastUpdatedAt||t.lastUpdatedAt?e.lastUpdatedAt&&!t.lastUpdatedAt?"Local Wins":!e.lastUpdatedAt&&t.lastUpdatedAt?"Remote Wins":e.lastUpdatedAt&&t.lastUpdatedAt?e.lastUpdatedAt===t.lastUpdatedAt?"Do Nothing":e.lastUpdatedAt>t.lastUpdatedAt?"Local Wins":"Remote Wins":"Do Nothing":"Do Nothing";n.getMissingNetworkLists=e=>{const{localKeySet:t,localMap:n,remoteKeySet:i,remoteMap:a,existingRemoteKeySet:o}=e,c=[],u=[];(0,r.setDifference)(t,i).forEach((e=>{const t=n.get(e);t&&u.push((0,s.toRemoteNetworkConfiguration)(t))}));return(0,r.setDifference)(o,t).forEach((e=>{const t=a.get(e);t&&c.push((0,s.toNetworkConfiguration)(t))})),{missingLocalNetworks:c,missingRemoteNetworks:u}};n.getUpdatedNetworkLists=e=>{const{localKeySet:t,localMap:i,remoteKeySet:a,remoteMap:o}=e,c=[],u=[],l=[];return(0,r.setIntersection)(t,a).forEach((e=>{const t=i.get(e),r=o.get(e);if(!t||!r)return;const a=(0,n.checkWhichNetworkIsLatest)(t,r);"Local Wins"===a&&c.push((0,s.toRemoteNetworkConfiguration)(t)),"Remote Wins"===a&&(r.d?l.push((0,s.toNetworkConfiguration)(r)):u.push((0,s.toNetworkConfiguration)(r)))})),{remoteNetworksToUpdate:c,localNetworksToUpdate:u,localNetworksToRemove:l}};n.findNetworksToUpdate=e=>{try{const{localNetworks:t,remoteNetworks:s}=e,r=(0,n.getDataStructures)(t,s),i=(0,n.getMissingNetworkLists)(r),a=(0,n.getUpdatedNetworkLists)(r);return{remoteNetworksToUpdate:[...i.missingRemoteNetworks,...a.remoteNetworksToUpdate],missingLocalNetworks:i.missingLocalNetworks,localNetworksToRemove:a.localNetworksToRemove,localNetworksToUpdate:a.localNetworksToUpdate}}catch{}return undefined}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/network-syncing/sync-all.cjs"}],[2450,{"./services.cjs":2448},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.batchUpdateNetworks=n.deleteNetwork=n.addNetwork=n.updateNetwork=void 0;const s=e("./services.cjs");n.updateNetwork=async(e,t)=>await(0,s.upsertRemoteNetwork)({v:"1",...e,d:!1},t),n.addNetwork=n.updateNetwork;n.deleteNetwork=async(e,t)=>await(0,s.upsertRemoteNetwork)({v:"1",...e,d:!0,lastUpdatedAt:Date.now()},t);n.batchUpdateNetworks=async(e,t)=>{const n=e.map((e=>({v:"1",...e})));return await(0,s.batchUpsertRemoteNetworks)(n,t)}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/network-syncing/sync-mutations.cjs"}],[2451,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.toNetworkConfiguration=n.toRemoteNetworkConfiguration=void 0;n.toRemoteNetworkConfiguration=e=>({...e,v:"1"});n.toNetworkConfiguration=e=>{const{v:t,d:n,...s}=e;return s}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/network-syncing/types.cjs"}],[2452,{"../utils.cjs":2453,"@metamask/network-controller":2176},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createUpdateNetworkProps=n.getNewRPCIndex=n.appendMissingInfuraNetworks=n.getMappedNetworkConfiguration=void 0;const s=e("@metamask/network-controller"),r=e("../utils.cjs");n.getMappedNetworkConfiguration=e=>{const{originalNetworkConfiguration:t,newNetworkConfiguration:n}=e,s=new Map(t.rpcEndpoints.map((e=>[e.url,e.networkClientId]))),r=n;return r.rpcEndpoints=r.rpcEndpoints.map((e=>{const t=s.get(e.url);return t?(e.networkClientId=t,e):(e.networkClientId=undefined,e)})),r};n.appendMissingInfuraNetworks=e=>{const{originalNetworkConfiguration:t,updateNetworkConfiguration:n}=e,i=new Map(t.rpcEndpoints.filter((e=>e.type===s.RpcEndpointType.Infura)).map((e=>[e.networkClientId,e]))),a=new Map(n.rpcEndpoints.filter((e=>e.type===s.RpcEndpointType.Infura&&e.networkClientId)).map((e=>[e.networkClientId,e]))),o=(0,r.setDifference)(new Set(i.keys()),new Set(a.keys()));if(o.size>0){const e=[];o.forEach((t=>{e.push(i.get(t))})),n.rpcEndpoints.unshift(...e)}return n};n.getNewRPCIndex=e=>{const{originalNetworkConfiguration:t,updateNetworkConfiguration:n,selectedNetworkClientId:s}=e,r=n.rpcEndpoints.some((e=>e.networkClientId===s)),i=t.rpcEndpoints.some((e=>e.networkClientId===s)),a=()=>Math.max(n.rpcEndpoints.findIndex((e=>Boolean(e.networkClientId))),0);if(i&&!r){return a()}if(i&&r){const e=n.rpcEndpoints.findIndex((e=>e.networkClientId===s));return-1!==e?e:a()}return undefined};n.createUpdateNetworkProps=e=>{const{originalNetworkConfiguration:t,newNetworkConfiguration:s,selectedNetworkClientId:r}=e,i=(0,n.getMappedNetworkConfiguration)({originalNetworkConfiguration:t,newNetworkConfiguration:s});(0,n.appendMissingInfuraNetworks)({originalNetworkConfiguration:t,updateNetworkConfiguration:i});return{updateNetworkFields:i,newSelectedRpcEndpointIndex:(0,n.getNewRPCIndex)({originalNetworkConfiguration:t,updateNetworkConfiguration:i,selectedNetworkClientId:r})}}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/network-syncing/update-network-utils.cjs"}],[2453,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.setIntersection=n.setDifference=void 0,n.setDifference=function(e,t){const n=new Set;return e.forEach((e=>!t.has(e)&&n.add(e))),n},n.setIntersection=function(e,t){const n=new Set;return e.forEach((e=>t.has(e)&&n.add(e))),n}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/controllers/user-storage/utils.cjs"}],[2454,{"./controllers/authentication/index.cjs":2433,"./controllers/user-storage/index.cjs":2442,"./sdk/index.cjs":2461},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=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)&&s(t,e,n);return r(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.UserStorageController=n.AuthenticationController=n.SDK=void 0,n.SDK=i(e("./sdk/index.cjs")),n.AuthenticationController=i(e("./controllers/authentication/index.cjs")),n.UserStorageController=i(e("./controllers/user-storage/index.cjs"))}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/index.cjs"}],[2455,{"../errors.cjs":2460,"../utils/validate-login-response.cjs":2466,"./services.cjs":2457,siwe:5583},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u,l,d=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},m=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.SIWEJwtBearerAuth=void 0;const p=e("siwe"),h=e("./services.cjs"),f=e("../errors.cjs"),g=e("../utils/validate-login-response.cjs");n.SIWEJwtBearerAuth=class{constructor(e,t){s.add(this),r.set(this,void 0),i.set(this,void 0),a.set(this,void 0),d(this,r,e,"f"),d(this,i,t,"f")}async getAccessToken(){const e=await m(this,s,"m",o).call(this);if(e)return e.token.accessToken;return(await m(this,s,"m",c).call(this)).token.accessToken}async getUserProfile(){const e=await m(this,s,"m",o).call(this);if(e)return e.profile;return(await m(this,s,"m",c).call(this)).profile}async getIdentifier(){return m(this,s,"m",l).call(this,m(this,a,"f")),m(this,a,"f").address}async signMessage(e){return m(this,s,"m",l).call(this,m(this,a,"f")),await m(this,a,"f").signMessage(e)}prepare(e){d(this,a,e,"f")}},r=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakSet,o=async function(){const e=await m(this,i,"f").storage.getLoginResponse();if(!(0,g.validateLoginResponse)(e))return null;return Date.now()-e.token.obtainedAt<1e3*e.token.expiresIn*.9?e:null},c=async function(){m(this,s,"m",l).call(this,m(this,a,"f"));const e=await this.getIdentifier(),t=await(0,h.getNonce)(e,m(this,r,"f").env),n=m(this,s,"m",u).call(this,t.nonce),o=await this.signMessage(n),c=await(0,h.authenticate)(n,o,m(this,r,"f").type,m(this,r,"f").env),d=await(0,h.authorizeOIDC)(c.token,m(this,r,"f").env,m(this,r,"f").platform),p={profile:c.profile,token:d};return await m(this,i,"f").storage.setLoginResponse(p),p},u=function(e){return m(this,s,"m",l).call(this,m(this,a,"f")),new p.SiweMessage({domain:m(this,a,"f")?.domain,address:m(this,a,"f")?.address,uri:(0,h.SIWE_LOGIN_URL)(m(this,r,"f").env),version:"1",chainId:m(this,a,"f")?.chainId,nonce:e,issuedAt:(new Date).toISOString()}).prepareMessage()},l=function(e){if(!e)throw new f.ValidationError("you must call 'prepare()' before logging in")}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs"}],[2456,{"../errors.cjs":2460,"../utils/eip-6963-metamask-provider.cjs":2464,"../utils/messaging-signing-snap-requests.cjs":2465,"../utils/validate-login-response.cjs":2466,"./services.cjs":2457},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u,l,d=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},m=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.SRPJwtBearerAuth=void 0;const p=e("./services.cjs"),h=e("../errors.cjs"),f=e("../utils/eip-6963-metamask-provider.cjs"),g=e("../utils/messaging-signing-snap-requests.cjs"),y=e("../utils/validate-login-response.cjs"),b=async()=>{const e=await(0,f.getMetaMaskProviderEIP6963)();if(!e)throw new h.ValidationError("No MetaMask wallet connected");return e},x=e=>({getIdentifier:async()=>{const t=e??await b();return await g.MESSAGE_SIGNING_SNAP.getPublicKey(t)},signMessage:async t=>{const n=e??await b();return(0,g.assertMessageStartsWithMetamask)(t),await g.MESSAGE_SIGNING_SNAP.signMessage(n,t)}});n.SRPJwtBearerAuth=class{constructor(e,t){s.add(this),r.set(this,void 0),i.set(this,void 0),a.set(this,void 0),o.set(this,void 0),d(this,r,e,"f"),d(this,o,t.customProvider,"f"),d(this,i,{storage:t.storage,signing:t.signing??x(m(this,o,"f"))},"f"),d(this,a,t.metametrics,"f")}setCustomProvider(e){d(this,o,e,"f"),m(this,i,"f").signing=x(e)}async getAccessToken(){const e=await m(this,s,"m",c).call(this);if(e)return e.token.accessToken;return(await m(this,s,"m",u).call(this)).token.accessToken}async getUserProfile(){const e=await m(this,s,"m",c).call(this);if(e)return e.profile;return(await m(this,s,"m",u).call(this)).profile}async getIdentifier(){return await m(this,i,"f").signing.getIdentifier()}async signMessage(e){return await m(this,i,"f").signing.signMessage(e)}async isSnapConnected(){const e=m(this,o,"f")??await b();if(!e)return!1;return await(0,g.isSnapConnected)(e)}async connectSnap(){const e=m(this,o,"f")??await b();return await(0,g.connectSnap)(e)}},r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakSet,c=async function(){const e=await m(this,i,"f").storage.getLoginResponse();if(!(0,y.validateLoginResponse)(e))return null;return Date.now()-e.token.obtainedAt<1e3*e.token.expiresIn*.9?e:null},u=async function(){const e=await this.getIdentifier(),t=await(0,p.getNonce)(e,m(this,r,"f").env),n=await m(this,i,"f").signing.getIdentifier(),o=m(this,s,"m",l).call(this,t.nonce,n),c=await this.signMessage(o),u=await(0,p.authenticate)(o,c,m(this,r,"f").type,m(this,r,"f").env,m(this,a,"f")),d=await(0,p.authorizeOIDC)(u.token,m(this,r,"f").env,m(this,r,"f").platform),h={profile:u.profile,token:d};return await m(this,i,"f").storage.setLoginResponse(h),h},l=function(e,t){return`metamask:${e}:${t}`}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/authentication-jwt-bearer/flow-srp.cjs"}],[2457,{"../../shared/env.cjs":2472,"../errors.cjs":2460,"./types.cjs":2458},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.authenticate=n.authorizeOIDC=n.getNonce=n.pairIdentifiers=n.SIWE_LOGIN_URL=n.SRP_LOGIN_URL=n.OIDC_TOKEN_URL=n.PAIR_IDENTIFIERS=n.NONCE_URL=void 0;const s=e("./types.cjs"),r=e("../../shared/env.cjs"),i=e("../errors.cjs");n.NONCE_URL=e=>`${(0,r.getEnvUrls)(e).authApiUrl}/api/v2/nonce`;n.PAIR_IDENTIFIERS=e=>`${(0,r.getEnvUrls)(e).authApiUrl}/api/v2/identifiers/pair`;n.OIDC_TOKEN_URL=e=>`${(0,r.getEnvUrls)(e).oidcApiUrl}/oauth2/token`;n.SRP_LOGIN_URL=e=>`${(0,r.getEnvUrls)(e).authApiUrl}/api/v2/srp/login`;n.SIWE_LOGIN_URL=e=>`${(0,r.getEnvUrls)(e).authApiUrl}/api/v2/siwe/login`;n.pairIdentifiers=async function(e,t,s,r){const a=new URL((0,n.PAIR_IDENTIFIERS)(r));try{const n=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s}`},body:JSON.stringify({nonce:e,logins:t})});if(!n.ok){const e=await n.json();throw new Error(`HTTP error message: ${e.message}, error: ${e.error}`)}}catch(e){const t=e instanceof Error?e.message:JSON.stringify(e??"");throw new i.PairError(`unable to pair identifiers: ${t}`)}},n.getNonce=async function(e,t){const s=new URL((0,n.NONCE_URL)(t));s.searchParams.set("identifier",e);try{const e=await fetch(s.toString());if(!e.ok){const t=await e.json();throw new Error(`HTTP error message: ${t.message}, error: ${t.error}`)}const t=await e.json();return{nonce:t.nonce,identifier:t.identifier,expiresIn:t.expires_in}}catch(e){const t=e instanceof Error?e.message:JSON.stringify(e??"");throw new i.NonceRetrievalError(`failed to generate nonce: ${t}`)}},n.authorizeOIDC=async function(e,t,s){const a=new Headers({"Content-Type":"application/x-www-form-urlencoded"}),o=new URLSearchParams;o.append("grant_type","urn:ietf:params:oauth:grant-type:jwt-bearer"),o.append("client_id",(0,r.getOidcClientId)(t,s)),o.append("assertion",e);try{const e=await fetch((0,n.OIDC_TOKEN_URL)(t),{method:"POST",headers:a,body:o.toString()});if(!e.ok){const t=await e.json();throw new Error(`HTTP error: ${t.error_description}, error code: ${t.error}`)}const s=await e.json();return{accessToken:s.access_token,expiresIn:s.expires_in,obtainedAt:Date.now()}}catch(e){const t=e instanceof Error?e.message:JSON.stringify(e??"");throw new i.SignInError(`unable to get access token: ${t}`)}},n.authenticate=async function(e,t,r,a,o){const c=((e,t)=>{switch(e){case s.AuthType.SRP:return(0,n.SRP_LOGIN_URL)(t);case s.AuthType.SiWE:return(0,n.SIWE_LOGIN_URL)(t);default:throw new i.ValidationError(`Invalid AuthType: ${e} - unable to create Auth URL`)}})(r,a);try{const n=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({signature:t,raw_message:e,...o?{metametrics:{metametrics_id:await o.getMetaMetricsId(),agent:o.agent}}:{}})});if(!n.ok){const e=await n.json();throw new Error(`${r} login HTTP error: ${e.message}, error code: ${e.error}`)}const s=await n.json();return{token:s.token,expiresIn:s.expires_in,profile:{identifierId:s.profile.identifier_id,metaMetricsId:s.profile.metametrics_id,profileId:s.profile.profile_id}}}catch(e){const t=e instanceof Error?e.message:JSON.stringify(e??"");throw new i.SignInError(`unable to perform SRP login: ${t}`)}}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/authentication-jwt-bearer/services.cjs"}],[2458,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s;Object.defineProperty(n,"__esModule",{value:!0}),n.AuthType=void 0,function(e){e.SRP="SRP",e.SiWE="SiWE"}(s||(n.AuthType=s={}))}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/authentication-jwt-bearer/types.cjs"}],[2459,{"./authentication-jwt-bearer/flow-siwe.cjs":2455,"./authentication-jwt-bearer/flow-srp.cjs":2456,"./authentication-jwt-bearer/services.cjs":2457,"./authentication-jwt-bearer/types.cjs":2458,"./errors.cjs":2460},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),l=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||u(t,e,n)},d=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},m=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.SRPJwtBearerAuth=n.SIWEJwtBearerAuth=n.JwtBearerAuth=void 0;const p=e("./authentication-jwt-bearer/flow-siwe.cjs"),h=e("./authentication-jwt-bearer/flow-srp.cjs"),f=e("./authentication-jwt-bearer/services.cjs"),g=e("./authentication-jwt-bearer/types.cjs"),y=e("./errors.cjs");n.JwtBearerAuth=class{constructor(...e){if(s.add(this),r.set(this,void 0),i.set(this,void 0),a.set(this,void 0),d(this,r,e[0].type,"f"),d(this,i,e[0].env,"f"),e[0].type!==g.AuthType.SRP){if(e[0].type!==g.AuthType.SiWE)throw new y.UnsupportedAuthTypeError("unsupported auth type");d(this,a,new p.SIWEJwtBearerAuth(e[0],e[1]),"f")}else d(this,a,new h.SRPJwtBearerAuth(e[0],e[1]),"f")}setCustomProvider(e){m(this,s,"m",c).call(this,m(this,r,"f"),m(this,a,"f")),m(this,a,"f").setCustomProvider(e)}async getAccessToken(){return await m(this,a,"f").getAccessToken()}async connectSnap(){return m(this,s,"m",c).call(this,m(this,r,"f"),m(this,a,"f")),m(this,a,"f").connectSnap()}async isSnapConnected(){return m(this,s,"m",c).call(this,m(this,r,"f"),m(this,a,"f")),m(this,a,"f").isSnapConnected()}async getUserProfile(){return await m(this,a,"f").getUserProfile()}async getIdentifier(){return await m(this,a,"f").getIdentifier()}async signMessage(e){return await m(this,a,"f").signMessage(e)}async pairIdentifiers(e){const t=await this.getUserProfile(),n=await(0,f.getNonce)(t.profileId,m(this,i,"f")),s=await Promise.all(e.map((async e=>{try{const t=`metamask:${n.nonce}:${e.identifier}`;return{signature:await e.signMessage(t),raw_message:t,encrypted_storage_key:e.encryptedStorageKey,identifier_type:e.identifierType}}catch(e){const t=e instanceof Error?e.message:JSON.stringify(e??"");throw new y.PairError(`failed to sign pairing message: ${t}`)}}))),r=await this.getAccessToken();await(0,f.pairIdentifiers)(n.nonce,s,r,m(this,i,"f"))}prepare(e){m(this,s,"m",o).call(this,m(this,r,"f"),m(this,a,"f")),m(this,a,"f").prepare(e)}},r=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakSet,o=function(e,t){if(e!==g.AuthType.SiWE)throw new y.UnsupportedAuthTypeError("This method is only available via SIWE auth type")},c=function(e,t){if(e!==g.AuthType.SRP)throw new y.UnsupportedAuthTypeError("This method is only available via SRP auth type")};var b=e("./authentication-jwt-bearer/flow-siwe.cjs");Object.defineProperty(n,"SIWEJwtBearerAuth",{enumerable:!0,get:function(){return b.SIWEJwtBearerAuth}});var x=e("./authentication-jwt-bearer/flow-srp.cjs");Object.defineProperty(n,"SRPJwtBearerAuth",{enumerable:!0,get:function(){return x.SRPJwtBearerAuth}}),l(e("./authentication-jwt-bearer/types.cjs"),n)}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/authentication.cjs"}],[2460,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.NotFoundError=n.UnsupportedAuthTypeError=n.ValidationError=n.UserStorageError=n.PairError=n.SignInError=n.NonceRetrievalError=void 0;class s extends Error{constructor(e){super(e),this.name="NonceRetrievalError"}}n.NonceRetrievalError=s;class r extends Error{constructor(e){super(e),this.name="SignInError"}}n.SignInError=r;class i extends Error{constructor(e){super(e),this.name="PairError"}}n.PairError=i;class a extends Error{constructor(e){super(e),this.name="UserStorageError"}}n.UserStorageError=a;class o extends Error{constructor(e){super(e),this.name="ValidationError"}}n.ValidationError=o;class c extends Error{constructor(e){super(e),this.name="UnsupportedAuthTypeError"}}n.UnsupportedAuthTypeError=c;class u extends Error{constructor(e){super(e),this.name="NotFoundError"}}n.NotFoundError=u}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/errors.cjs"}],[2461,{"../shared/encryption/index.cjs":2470,"../shared/env.cjs":2472,"../shared/storage-schema.cjs":2473,"./authentication.cjs":2459,"./errors.cjs":2460,"./user-storage.cjs":2463,"./utils/messaging-signing-snap-requests.cjs":2465},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./authentication.cjs"),n),r(e("./user-storage.cjs"),n),r(e("./errors.cjs"),n),r(e("./utils/messaging-signing-snap-requests.cjs"),n),r(e("../shared/encryption/index.cjs"),n),r(e("../shared/env.cjs"),n),r(e("../shared/storage-schema.cjs"),n)}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/index.cjs"}],[2462,{"../../shared/env.cjs":2472,"../authentication-jwt-bearer/services.cjs":2457},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.MOCK_OIDC_TOKEN_RESPONSE=n.MOCK_SRP_LOGIN_RESPONSE=n.MOCK_SIWE_LOGIN_RESPONSE=n.MOCK_NONCE_RESPONSE=n.MOCK_ACCESS_JWT=n.MOCK_JWT=n.MOCK_PAIR_IDENTIFIERS_URL=n.MOCK_SIWE_LOGIN_URL=n.MOCK_OIDC_TOKEN_URL=n.MOCK_SRP_LOGIN_URL=n.MOCK_NONCE_URL=void 0;const s=e("../../shared/env.cjs"),r=e("../authentication-jwt-bearer/services.cjs");n.MOCK_NONCE_URL=(0,r.NONCE_URL)(s.Env.PRD),n.MOCK_SRP_LOGIN_URL=(0,r.SRP_LOGIN_URL)(s.Env.PRD),n.MOCK_OIDC_TOKEN_URL=(0,r.OIDC_TOKEN_URL)(s.Env.PRD),n.MOCK_SIWE_LOGIN_URL=(0,r.SIWE_LOGIN_URL)(s.Env.PRD),n.MOCK_PAIR_IDENTIFIERS_URL=(0,r.PAIR_IDENTIFIERS)(s.Env.PRD),n.MOCK_JWT="eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImIwNzE2N2U2LWJjNWUtNDgyZC1hNjRhLWU1MjQ0MjY2MGU3NyJ9.eyJzdWIiOiI1MzE0ODc5YWM2NDU1OGI3OTQ5ZmI4NWIzMjg2ZjZjNjUwODAzYmFiMTY0Y2QyOWNmMmM3YzdmMjMzMWMwZTRlIiwiaWF0IjoxNzA2MTEzMDYyLCJleHAiOjE3NjkxODUwNjMsImlzcyI6ImF1dGgubWV0YW1hc2suaW8iLCJhdWQiOiJwb3J0Zm9saW8ubWV0YW1hc2suaW8ifQ.E5UL6oABNweS8t5a6IBTqTf7NLOJbrhJSmEcsr7kwLp4bGvcENJzACwnsHDkA6PlzfDV09ZhAGU_F3hlS0j-erbY0k0AFR-GAtyS7E9N02D8RgUDz5oDR65CKmzM8JilgFA8UvruJ6OJGogroaOSOqzRES_s8MjHpP47RJ9lXrUesajsbOudXbuksXWg5QmWip6LLvjwr8UUzcJzNQilyIhiEpo4WdzWM4R3VtTwr4rHnWEvtYnYCov1jmI2w3YQ48y0M-3Y9IOO0ov_vlITRrOnR7Y7fRUGLUFmU5msD8mNWRywjQFLHfJJ1yNP5aJ8TkuCK3sC6kcUH335IVvukQ",n.MOCK_ACCESS_JWT="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",n.MOCK_NONCE_RESPONSE={nonce:"xGMm9SoihEKeAEfV",identifier:"0xd8641601Cb79a94FD872fE42d5b4a067A44a7e88",expires_in:300},n.MOCK_SIWE_LOGIN_RESPONSE={token:n.MOCK_JWT,expires_in:3600,profile:{profile_id:"fa2bbf82-bd9a-4e6b-aabc-9ca0d0319b6e",metametrics_id:"de742679-4960-4977-a415-4718b5f8e86c",identifier_id:"ec9a4e9906836497efad2fd4d4290b34d2c6a2c0d93eb174aa3cd88a133adbaf",identifier_type:"SIWE",encrypted_storage_key:"2c6a2c0d93eb174aa3cd88a133adbaf"}},n.MOCK_SRP_LOGIN_RESPONSE={token:n.MOCK_JWT,expires_in:3600,profile:{profile_id:"f88227bd-b615-41a3-b0be-467dd781a4ad",metametrics_id:"561ec651-a844-4b36-a451-04d6eac35740",identifier_id:"da9a9fc7b09edde9cc23cec9b7e11a71fb0ab4d2ddd8af8af905306f3e1456fb",identifier_type:"SRP",encrypted_storage_key:"d2ddd8af8af905306f3e1456fb"}},n.MOCK_OIDC_TOKEN_RESPONSE={access_token:n.MOCK_ACCESS_JWT,expires_in:3600}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/mocks/auth.cjs"}],[2463,{"../shared/encryption/constants.cjs":2468,"../shared/encryption/index.cjs":2470,"../shared/env.cjs":2472,"../shared/storage-schema.cjs":2473,"./errors.cjs":2460},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u,l,d,m,p,h=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),f=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),g=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)&&h(t,e,n);return f(t,e),t},y=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.UserStorage=n.STORAGE_URL=void 0;const b=e("./errors.cjs"),x=g(e("../shared/encryption/index.cjs")),S=e("../shared/encryption/constants.cjs"),k=e("../shared/env.cjs"),v=e("../shared/storage-schema.cjs");n.STORAGE_URL=(e,t)=>`${(0,k.getEnvUrls)(e).userStorageApiUrl}/api/v1/userstorage/${t}`;n.UserStorage=class{constructor(e,t){s.add(this),this.env=e.env,this.config=e,this.options=t}async setItem(e,t,n){await y(this,s,"m",r).call(this,e,t,n)}async batchSetItems(e,t,n){await y(this,s,"m",i).call(this,e,t,n)}async getItem(e,t){return y(this,s,"m",o).call(this,e,t)}async getAllFeatureItems(e,t){return y(this,s,"m",c).call(this,e,t)}async deleteItem(e,t){return y(this,s,"m",u).call(this,e,t)}async deleteAllFeatureItems(e){return y(this,s,"m",l).call(this,e)}async batchDeleteItems(e,t){return y(this,s,"m",d).call(this,e,t)}async getStorageKey(){const e=`metamask:${(await this.config.auth.getUserProfile()).profileId}`,t=await(this.options.storage?.getStorageKey(e));if(t)return t;const n=await this.config.auth.signMessage(e),s=(0,x.createSHA256Hash)(n);return await(this.options.storage?.setStorageKey(e,s)),s}},s=new WeakSet,r=async function(e,t,r){try{const i=await y(this,s,"m",p).call(this),a=await this.getStorageKey(),o=await x.default.encryptString(t,a,r?.nativeScryptCrypto),c=(0,v.createEntryPath)(e,a,{validateAgainstSchema:Boolean(r?.validateAgainstSchema)}),u=new URL((0,n.STORAGE_URL)(this.env,c)),l=await fetch(u.toString(),{method:"PUT",headers:{"Content-Type":"application/json",...i},body:JSON.stringify({data:o})});if(!l.ok){const e=await l.json().catch((()=>({message:"unknown",error:"unknown"})));throw new Error(`HTTP error message: ${e.message}, error: ${e.error}`)}}catch(t){const n=t instanceof Error?t.message:JSON.stringify(t??"");throw new b.UserStorageError(`failed to upsert user storage for path '${e}'. ${n}`)}},i=async function(e,t,r){try{if(!t.length)return;const i=await y(this,s,"m",p).call(this),a=await this.getStorageKey(),o=await Promise.all(t.map((async e=>[y(this,s,"m",m).call(this,e[0],a),await x.default.encryptString(e[1],a,r?.nativeScryptCrypto)]))),c=new URL((0,n.STORAGE_URL)(this.env,e)),u=await fetch(c.toString(),{method:"PUT",headers:{"Content-Type":"application/json",...i},body:JSON.stringify({data:Object.fromEntries(o)})});if(!u.ok){const e=await u.json().catch((()=>({message:"unknown",error:"unknown"})));throw new Error(`HTTP error message: ${e.message}, error: ${e.error}`)}}catch(t){const n=t instanceof Error?t.message:JSON.stringify(t??"");throw new b.UserStorageError(`failed to batch upsert user storage for path '${e}'. ${n}`)}},a=async function(e,t){try{const r=await y(this,s,"m",p).call(this),i=new URL((0,n.STORAGE_URL)(this.env,e)),a=await fetch(i.toString(),{method:"PUT",headers:{"Content-Type":"application/json",...r},body:JSON.stringify({data:Object.fromEntries(t)})});if(!a.ok){const e=await a.json().catch((()=>({message:"unknown",error:"unknown"})));throw new Error(`HTTP error message: ${e.message}, error: ${e.error}`)}}catch(t){const n=t instanceof Error?t.message:JSON.stringify(t??"");throw new b.UserStorageError(`failed to batch upsert user storage for path '${e}'. ${n}`)}},o=async function(e,t){try{const i=await y(this,s,"m",p).call(this),a=await this.getStorageKey(),o=(0,v.createEntryPath)(e,a,{validateAgainstSchema:Boolean(t?.validateAgainstSchema)}),c=new URL((0,n.STORAGE_URL)(this.env,o)),u=await fetch(c.toString(),{headers:{"Content-Type":"application/json",...i}});if(404===u.status)return null;if(!u.ok){const e=await u.json();throw new Error(`HTTP error message: ${e.message}, error: ${e.error}`)}const l=await u.json(),d=l?.Data??null;if(!d)return null;const m=await x.default.decryptString(d,a,t?.nativeScryptCrypto);return x.default.getSalt(d).toString()!==S.SHARED_SALT.toString()&&await y(this,s,"m",r).call(this,e,m,t),m}catch(t){const n=t instanceof Error?t.message:JSON.stringify(t??"");throw new b.UserStorageError(`failed to get user storage for path '${e}'. ${n}`)}},c=async function(e,t){try{const r=await y(this,s,"m",p).call(this),i=await this.getStorageKey(),o=new URL((0,n.STORAGE_URL)(this.env,e)),c=await fetch(o.toString(),{headers:{"Content-Type":"application/json",...r}});if(404===c.status)return null;if(!c.ok){const e=await c.json();throw new Error(`HTTP error message: ${e.message}, error: ${e.error}`)}const u=await c.json();if(!Array.isArray(u))return null;const l=[],d=[];for(const e of u)if(e.Data)try{const n=await x.default.decryptString(e.Data,i,t?.nativeScryptCrypto);l.push(n);x.default.getSalt(e.Data).toString()!==S.SHARED_SALT.toString()&&d.push([e.HashedKey,await x.default.encryptString(n,i,t?.nativeScryptCrypto)])}catch{}return d.length&&await y(this,s,"m",a).call(this,e,d),l}catch(t){const n=t instanceof Error?t.message:JSON.stringify(t??"");throw new b.UserStorageError(`failed to get user storage for path '${e}'. ${n}`)}},u=async function(e,t){try{const r=await y(this,s,"m",p).call(this),i=await this.getStorageKey(),a=(0,v.createEntryPath)(e,i,{validateAgainstSchema:Boolean(t?.validateAgainstSchema)}),o=new URL((0,n.STORAGE_URL)(this.env,a)),c=await fetch(o.toString(),{method:"DELETE",headers:{"Content-Type":"application/json",...r}});if(404===c.status)throw new b.NotFoundError(`feature/key set not found for path '${e}'.`);if(!c.ok){const e=await c.json();throw new Error(`HTTP error message: ${e.message}, error: ${e.error}`)}}catch(t){if(t instanceof b.NotFoundError)throw t;const n=t instanceof Error?t.message:JSON.stringify(t??"");throw new b.UserStorageError(`failed to delete user storage for path '${e}'. ${n}`)}},l=async function(e){try{const t=await y(this,s,"m",p).call(this),r=new URL((0,n.STORAGE_URL)(this.env,e)),i=await fetch(r.toString(),{method:"DELETE",headers:{"Content-Type":"application/json",...t}});if(404===i.status)throw new b.NotFoundError(`feature not found for path '${e}'.`);if(!i.ok){const e=await i.json();throw new Error(`HTTP error message: ${e.message}, error: ${e.error}`)}}catch(t){if(t instanceof b.NotFoundError)throw t;const n=t instanceof Error?t.message:JSON.stringify(t??"");throw new b.UserStorageError(`failed to delete user storage for path '${e}'. ${n}`)}},d=async function(e,t){try{if(!t.length)return;const r=await y(this,s,"m",p).call(this),i=await this.getStorageKey(),a=await Promise.all(t.map((async e=>y(this,s,"m",m).call(this,e,i)))),o=new URL((0,n.STORAGE_URL)(this.env,e)),c=await fetch(o.toString(),{method:"PUT",headers:{"Content-Type":"application/json",...r},body:JSON.stringify({batch_delete:a})});if(!c.ok){const e=await c.json().catch((()=>({message:"unknown",error:"unknown"})));throw new Error(`HTTP error message: ${e.message}, error: ${e.error}`)}}catch(t){const n=t instanceof Error?t.message:JSON.stringify(t??"");throw new b.UserStorageError(`failed to batch delete user storage for path '${e}'. ${n}`)}},m=function(e,t){return(0,x.createSHA256Hash)(e+t)},p=async function(){return{Authorization:`Bearer ${await this.config.auth.getAccessToken()}`}}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/user-storage.cjs"}],[2464,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getMetaMaskProviderEIP6963=n.metamaskClientsRdns=void 0,n.metamaskClientsRdns={main:"io.metamask",flask:"io.metamask.flask",institutional:"io.metamask.mmi"};const s={};n.getMetaMaskProviderEIP6963=function(e="any"){return new Promise((t=>{if("any"!==e&&n.metamaskClientsRdns[e]===undefined)return void t(null);const r=s[e];if(r)return void t(r);const i=[],a=e=>{const t=e,n=t?.detail;n?.provider&&n?.info?.rdns&&i.push({rdns:n?.info?.rdns,provider:n?.provider})};window.addEventListener("eip6963:announceProvider",a),window.dispatchEvent(new Event("eip6963:requestProvider")),setTimeout((()=>{let r;if(window.removeEventListener("eip6963:announceProvider",a),"any"===e){const e=Object.values(n.metamaskClientsRdns);r=i.find((t=>e.includes(t.rdns)))?.provider??null}else{const t=n.metamaskClientsRdns[e];r=i.find((e=>e.rdns===t))?.provider??null}return r&&(s[e]=r),t(r)}),100)}))}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/utils/eip-6963-metamask-provider.cjs"}],[2465,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){async function s(e){return await e.request({method:"wallet_getSnaps"})}Object.defineProperty(n,"__esModule",{value:!0}),n.assertMessageStartsWithMetamask=n.MESSAGE_SIGNING_SNAP=n.isSnapConnected=n.getSnaps=n.connectSnap=n.SNAP_ORIGIN=void 0,n.SNAP_ORIGIN="npm:@metamask/message-signing-snap",n.connectSnap=async function(e){return await e.request({method:"wallet_requestSnaps",params:{[n.SNAP_ORIGIN]:{}}})},n.getSnaps=s,n.isSnapConnected=async function(e){try{const t=await s(e);return!!t&&Object.keys(t).includes(n.SNAP_ORIGIN)}catch(e){return console.error("Failed to determine if snap is connected",e),!1}},n.MESSAGE_SIGNING_SNAP={getPublicKey:async e=>await e.request({method:"wallet_invokeSnap",params:{snapId:n.SNAP_ORIGIN,request:{method:"getPublicKey"}}}),signMessage:async(e,t)=>await(e?.request({method:"wallet_invokeSnap",params:{snapId:n.SNAP_ORIGIN,request:{method:"signMessage",params:{message:t}}}}))},n.assertMessageStartsWithMetamask=function(e){if(!e.startsWith("metamask:"))throw new Error('Message must start with "metamask:"')}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/utils/messaging-signing-snap-requests.cjs"}],[2466,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.validateLoginResponse=void 0,n.validateLoginResponse=function(e){const t=e;return!!t&&!(!t?.token||!t?.profile)}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/sdk/utils/validate-login-response.cjs"}],[2467,{"./constants.cjs":2468,"./utils.cjs":2471},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.setCachedKey=n.getCachedKeyGeneratedWithSharedSalt=n.getCachedKeyBySalt=void 0;const s=e("./constants.cjs"),r=e("./utils.cjs");let i={};const a=e=>(i[e]??(i[e]=new Map),i[e]);n.getCachedKeyBySalt=function(e,t){const n=a(e),s=(0,r.byteArrayToBase64)(t),i=n.get(s);return i?{salt:t,base64Salt:s,key:i}:undefined},n.getCachedKeyGeneratedWithSharedSalt=function(e){const t=a(e),n=(0,r.byteArrayToBase64)(s.SHARED_SALT),i=t.get(n);return i?{salt:s.SHARED_SALT,base64Salt:n,key:i}:undefined},n.setCachedKey=function(e,t,n){Object.keys(i).length>100&&(i={});const s=a(e),o=(0,r.byteArrayToBase64)(t);s.size>100&&s.clear(),s.set(o,n)}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/shared/encryption/cache.cjs"}],[2468,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SHARED_SALT=n.SCRYPT_p=n.SCRYPT_r=n.SCRYPT_N=n.SCRYPT_SALT_SIZE=n.ALGORITHM_KEY_SIZE=n.ALGORITHM_NONCE_SIZE=void 0,n.ALGORITHM_NONCE_SIZE=12,n.ALGORITHM_KEY_SIZE=16,n.SCRYPT_SALT_SIZE=16,n.SCRYPT_N=2**17,n.SCRYPT_r=8,n.SCRYPT_p=1,n.SHARED_SALT=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/shared/encryption/constants.cjs"}],[2469,{"./cache.cjs":2467,"./constants.cjs":2468,"./utils.cjs":2471,"@noble/ciphers/aes":2978,"@noble/ciphers/webcrypto":2981,"@noble/hashes/scrypt":2999,"@noble/hashes/sha256":3e3,"@noble/hashes/utils":3003},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.createSHA256Hash=void 0;const l=e("@noble/ciphers/aes"),d=e("@noble/ciphers/webcrypto"),m=e("@noble/hashes/scrypt"),p=e("@noble/hashes/sha256"),h=e("@noble/hashes/utils"),f=e("./cache.cjs"),g=e("./constants.cjs"),y=e("./utils.cjs");s=new WeakSet,r=async function(e,t,n){const{key:r,salt:i}=await u(this,s,"m",c).call(this,t,{N:g.SCRYPT_N,r:g.SCRYPT_r,p:g.SCRYPT_p,dkLen:g.ALGORITHM_KEY_SIZE},undefined,n),o=(0,h.utf8ToBytes)(e),l=(0,h.concatBytes)(i,u(this,s,"m",a).call(this,o,r)),d={v:"1",t:"scrypt",d:(0,y.byteArrayToBase64)(l),o:{N:g.SCRYPT_N,r:g.SCRYPT_r,p:g.SCRYPT_p,dkLen:g.ALGORITHM_KEY_SIZE},saltLen:g.SCRYPT_SALT_SIZE};return JSON.stringify(d)},i=async function(e,t,n){const{o:r,d:i,saltLen:a}=e,l=(0,y.base64ToByteArray)(i),d=l.slice(0,a),m=l.slice(a,l.length),{key:p}=await u(this,s,"m",c).call(this,t,{N:r.N,r:r.r,p:r.p,dkLen:r.dkLen},d,n);return(0,y.bytesToUtf8)(u(this,s,"m",o).call(this,m,p))},a=function(e,t){const n=(0,d.randomBytes)(g.ALGORITHM_NONCE_SIZE),s=(0,l.gcm)(t,n).encrypt(e);return(0,h.concatBytes)(n,s)},o=function(e,t){const n=e.slice(0,g.ALGORITHM_NONCE_SIZE),s=e.slice(g.ALGORITHM_NONCE_SIZE,e.length);return(0,l.gcm)(t,n).decrypt(s)},c=async function(e,t,n,s){const r=x(e),i=n?(0,f.getCachedKeyBySalt)(r,n):(0,f.getCachedKeyGeneratedWithSharedSalt)(r);if(i)return{key:i.key,salt:i.salt};const a=n??g.SHARED_SALT;let o;return o=s?await s((0,y.stringToByteArray)(e),a,t.N,t.r,t.p,t.dkLen):await(0,m.scryptAsync)(e,a,{N:t.N,r:t.r,p:t.p,dkLen:t.dkLen}),(0,f.setCachedKey)(r,a,o),{key:o,salt:a}};const b=new class{constructor(){s.add(this)}async encryptString(e,t,n){try{return await u(this,s,"m",r).call(this,e,t,n)}catch(e){const t=e instanceof Error?e.message:JSON.stringify(e);throw new Error(`Unable to encrypt string - ${t}`)}}async decryptString(e,t,n){try{const r=JSON.parse(e);if("1"===r.v&&"scrypt"===r.t)return await u(this,s,"m",i).call(this,r,t,n);throw new Error(`Unsupported encrypted data payload - ${e}`)}catch(e){const t=e instanceof Error?e.message:JSON.stringify(e);throw new Error(`Unable to decrypt string - ${t}`)}}getSalt(e){try{const t=JSON.parse(e);if("1"===t.v&&"scrypt"===t.t){const{d:e,saltLen:n}=t,s=(0,y.base64ToByteArray)(e);return s.slice(0,n)}throw new Error(`Unsupported encrypted data payload - ${e}`)}catch(e){const t=e instanceof Error?e.message:JSON.stringify(e);throw new Error(`Unable to get salt - ${t}`)}}getIfEntriesHaveDifferentSalts(e){const t=e.map((e=>{try{return this.getSalt(e)}catch{return undefined}})).filter((e=>e!==undefined));return new Set(t.map((e=>e.toString()))).size===t.length}};function x(e){const t=(0,p.sha256)(e);return(0,h.bytesToHex)(t)}n.default=b,n.createSHA256Hash=x}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/shared/encryption/encryption.cjs"}],[2470,{"./encryption.cjs":2469},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Encryption=void 0;const a=i(e("./encryption.cjs"));n.Encryption=a.default,r(e("./encryption.cjs"),n),n.default=a.default}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/shared/encryption/index.cjs"}],[2471,{buffer:4074},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(e){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.stringToByteArray=n.bytesToUtf8=n.base64ToByteArray=n.byteArrayToBase64=void 0;n.byteArrayToBase64=t=>e.from(t).toString("base64");n.base64ToByteArray=t=>new Uint8Array(e.from(t,"base64"));n.bytesToUtf8=e=>new TextDecoder("utf-8").decode(e);n.stringToByteArray=e=>(new TextEncoder).encode(e)}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/shared/encryption/utils.cjs"}],[2472,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r;Object.defineProperty(n,"__esModule",{value:!0}),n.getOidcClientId=n.getEnvUrls=n.Platform=n.Env=void 0,function(e){e.DEV="dev",e.UAT="uat",e.PRD="prd"}(s||(n.Env=s={})),function(e){e.MOBILE="mobile",e.EXTENSION="extension",e.PORTFOLIO="portfolio",e.INFURA="infura"}(r||(n.Platform=r={}));const i={dev:{authApiUrl:"https://authentication.dev-api.cx.metamask.io",oidcApiUrl:"https://oidc.dev-api.cx.metamask.io",userStorageApiUrl:"https://user-storage.dev-api.cx.metamask.io"},uat:{authApiUrl:"https://authentication.uat-api.cx.metamask.io",oidcApiUrl:"https://oidc.uat-api.cx.metamask.io",userStorageApiUrl:"https://user-storage.uat-api.cx.metamask.io"},prd:{authApiUrl:"https://authentication.api.cx.metamask.io",oidcApiUrl:"https://oidc.api.cx.metamask.io",userStorageApiUrl:"https://user-storage.api.cx.metamask.io"}};n.getEnvUrls=function(e){if(!i[e])throw new Error("invalid environment configuration");return i[e]},n.getOidcClientId=function(e,t){const n={[s.DEV]:{[r.PORTFOLIO]:"c7ca94a0-5d52-4635-9502-1a50a9c410cc",[r.MOBILE]:"e83c7cc9-267d-4fb4-8fec-f0e3bbe5ae8e",[r.EXTENSION]:"f1a963d7-50dc-4cb5-8d81-f1f3654f0df3",[r.INFURA]:"bd887006-0d55-481a-a395-5ff9a0dc52c9"},[s.UAT]:{[r.PORTFOLIO]:"8f2dd4ac-db07-4819-9ba5-1ee0ec1b56d1",[r.MOBILE]:"c3cfdcd2-51d6-4fae-ad2c-ff238c8fef53",[r.EXTENSION]:"a9de167c-c9a6-43d8-af39-d301fd44c485",[r.INFURA]:"01929890-7002-4c97-9913-8f6c09a6d674"},[s.PRD]:{[r.PORTFOLIO]:"35e1cd62-49c5-4be8-8b6e-a5212f2d2cfb",[r.MOBILE]:"75fa62a3-9ca0-4b91-9fe5-76bec86b0257",[r.EXTENSION]:"1132f10a-b4e5-4390-a5f2-d9c6022db564",[r.INFURA]:"fdde9417-e193-4d23-9943-a8346b18d097"}};if(!n[e])throw new Error(`invalid env ${e}: cannot determine oidc client id`);if(!n[e][t])throw new Error(`invalid env ${e} and platform ${t} combination: cannot determine oidc client id`);return n[e][t]}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/shared/env.cjs"}],[2473,{"./encryption/index.cjs":2470},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createEntryPath=n.isPathWithFeatureAndKey=n.getFeatureAndKeyFromPath=n.USER_STORAGE_SCHEMA=n.USER_STORAGE_FEATURE_NAMES=void 0;const s=e("./encryption/index.cjs"),r="ALLOW_ARBITRARY_KEYS";n.USER_STORAGE_FEATURE_NAMES={notifications:"notifications",accounts:"accounts_v2",networks:"networks"},n.USER_STORAGE_SCHEMA={[n.USER_STORAGE_FEATURE_NAMES.notifications]:["notification_settings"],[n.USER_STORAGE_FEATURE_NAMES.accounts]:[r],[n.USER_STORAGE_FEATURE_NAMES.networks]:[r]};n.getFeatureAndKeyFromPath=(e,t={validateAgainstSchema:!0})=>{if(!/^\w+\.\w+$/u.test(e))throw new Error("user-storage - path is not in the correct format. Correct format: 'feature.key'");const[s,i]=e.split(".");if(t.validateAgainstSchema){const e=s,t=i;if(!(e in n.USER_STORAGE_SCHEMA))throw new Error(`user-storage - invalid feature provided: ${e}. Valid features: ${Object.keys(n.USER_STORAGE_SCHEMA).join(", ")}`);const a=n.USER_STORAGE_SCHEMA[e];if(!a.includes(t)&&!a.includes(r)){const s=n.USER_STORAGE_SCHEMA[e].join(", ");throw new Error(`user-storage - invalid key provided for this feature: ${t}. Valid keys: ${s}`)}}return{feature:s,key:i}};n.isPathWithFeatureAndKey=e=>/^\w+\.\w+$/u.test(e),n.createEntryPath=function(e,t,r={validateAgainstSchema:!0}){const{feature:i,key:a}=(0,n.getFeatureAndKeyFromPath)(e,r);return`${i}/${(0,s.createSHA256Hash)(a+t)}`}}}},{package:"@metamask/profile-sync-controller",file:"node_modules/@metamask/profile-sync-controller/dist/shared/storage-schema.cjs"}],[2551,{"./utils.cjs":2555,"@metamask/utils":2950,"fast-safe-stringify":4435},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.EthereumProviderError=n.JsonRpcError=void 0;const r=e("@metamask/utils"),i=s(e("fast-safe-stringify")),a=e("./utils.cjs");class o extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');(0,a.dataHasCause)(n)?(super(t,{cause:n.cause}),(0,r.hasProperty)(this,"cause")||Object.assign(this,{cause:n.cause})):super(t),n!==undefined&&(this.data=n),this.code=e}serialize(){const e={code:this.code,message:this.message};return this.data!==undefined&&(e.data=this.data,(0,r.isPlainObject)(this.data)&&(e.data.cause=(0,a.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,i.default)(this.serialize(),c,2)}}n.JsonRpcError=o;function c(e,t){return"[Circular]"===t?undefined:t}n.EthereumProviderError=class extends o{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}}}},{package:"@metamask/rpc-errors",file:"node_modules/@metamask/rpc-errors/dist/classes.cjs"}],[2552,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.errorValues=n.errorCodes=void 0,n.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},n.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}}}},{package:"@metamask/rpc-errors",file:"node_modules/@metamask/rpc-errors/dist/error-constants.cjs"}],[2553,{"./classes.cjs":2551,"./error-constants.cjs":2552,"./utils.cjs":2555},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.providerErrors=n.rpcErrors=void 0;const s=e("./classes.cjs"),r=e("./error-constants.cjs"),i=e("./utils.cjs");function a(e,t){const[n,r]=c(t);return new s.JsonRpcError(e,n??(0,i.getMessageFromCode)(e),r)}function o(e,t){const[n,r]=c(t);return new s.EthereumProviderError(e,n??(0,i.getMessageFromCode)(e),r)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??undefined,n]}}return[]}n.rpcErrors={parse:e=>a(r.errorCodes.rpc.parse,e),invalidRequest:e=>a(r.errorCodes.rpc.invalidRequest,e),invalidParams:e=>a(r.errorCodes.rpc.invalidParams,e),methodNotFound:e=>a(r.errorCodes.rpc.methodNotFound,e),internal:e=>a(r.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(t,e)},invalidInput:e=>a(r.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>a(r.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>a(r.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>a(r.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>a(r.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>a(r.errorCodes.rpc.limitExceeded,e)},n.providerErrors={userRejectedRequest:e=>o(r.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>o(r.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>o(r.errorCodes.provider.unsupportedMethod,e),disconnected:e=>o(r.errorCodes.provider.disconnected,e),chainDisconnected:e=>o(r.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:r}=e;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new s.EthereumProviderError(t,n,r)}}}}},{package:"@metamask/rpc-errors",file:"node_modules/@metamask/rpc-errors/dist/errors.cjs"}],[2554,{"./classes.cjs":2551,"./error-constants.cjs":2552,"./errors.cjs":2553,"./utils.cjs":2555},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.errorCodes=n.providerErrors=n.rpcErrors=n.getMessageFromCode=n.serializeError=n.serializeCause=n.dataHasCause=n.EthereumProviderError=n.JsonRpcError=void 0;var s=e("./classes.cjs");Object.defineProperty(n,"JsonRpcError",{enumerable:!0,get:function(){return s.JsonRpcError}}),Object.defineProperty(n,"EthereumProviderError",{enumerable:!0,get:function(){return s.EthereumProviderError}});var r=e("./utils.cjs");Object.defineProperty(n,"dataHasCause",{enumerable:!0,get:function(){return r.dataHasCause}}),Object.defineProperty(n,"serializeCause",{enumerable:!0,get:function(){return r.serializeCause}}),Object.defineProperty(n,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(n,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});var i=e("./errors.cjs");Object.defineProperty(n,"rpcErrors",{enumerable:!0,get:function(){return i.rpcErrors}}),Object.defineProperty(n,"providerErrors",{enumerable:!0,get:function(){return i.providerErrors}});var a=e("./error-constants.cjs");Object.defineProperty(n,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})}}},{package:"@metamask/rpc-errors",file:"node_modules/@metamask/rpc-errors/dist/index.cjs"}],[2555,{"./error-constants.cjs":2552,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.dataHasCause=n.serializeCause=n.serializeError=n.isValidCode=n.getMessageFromCode=n.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const s=e("@metamask/utils"),r=e("./error-constants.cjs"),i=r.errorCodes.rpc.internal,a={code:i,message:o(i)};function o(e,t="Unspecified error message. This is a bug, please report it."){if(c(e)){const t=e.toString();if((0,s.hasProperty)(r.errorValues,t))return r.errorValues[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return n.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){return Number.isInteger(e)}function u(e){return Array.isArray(e)?e.map((e=>(0,s.isValidJson)(e)?e:(0,s.isObject)(e)?l(e):null)):(0,s.isObject)(e)?l(e):(0,s.isValidJson)(e)?e:null}function l(e){return Object.getOwnPropertyNames(e).reduce(((t,n)=>{const r=e[n];return(0,s.isValidJson)(r)&&(t[n]=r),t}),{})}n.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",n.getMessageFromCode=o,n.isValidCode=c,n.serializeError=function(e,{fallbackError:t=a,shouldIncludeStack:n=!0,shouldPreserveMessage:r=!0}={}){if(!(0,s.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const i=function(e,t,n){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,s.isJsonRpcError)(e))return e;const r=function(e){if((0,s.isObject)(e)&&(0,s.hasProperty)(e,"message")&&"string"==typeof e.message&&e.message.length>0)return e.message;return undefined}(e),i=u(e),a={...t,...n&&r&&{message:r},data:{cause:i}};return a}(e,t,r);return n||delete i.stack,i},n.serializeCause=u,n.dataHasCause=function(e){return(0,s.isObject)(e)&&(0,s.hasProperty)(e,"cause")&&(0,s.isObject)(e.cause)}}}},{package:"@metamask/rpc-errors",file:"node_modules/@metamask/rpc-errors/dist/utils.cjs"}],[2556,{events:4399},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});const s=e("events");function r(e,t,n){try{Reflect.apply(e,t,n)}catch(e){setTimeout((()=>{throw e}))}}class i extends s.EventEmitter{emit(e,...t){let n="error"===e;const s=this._events;if(s!==undefined)n=n&&s.error===undefined;else if(!n)return!1;if(n){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const n=new Error("Unhandled error."+(e?` (${e.message})`:""));throw n.context=e,n}const i=s[e];if(i===undefined)return!1;if("function"==typeof i)r(i,this,t);else{const e=i.length,n=function(e){const t=e.length,n=new Array(t);for(let s=0;s<t;s+=1)n[s]=e[s];return n}(i);for(let s=0;s<e;s+=1)r(n[s],this,t)}return!0}}n.default=i}}},{package:"@metamask/safe-event-emitter",file:"node_modules/@metamask/safe-event-emitter/dist/cjs/index.js"}],[2557,{"@noble/hashes/_assert":2559,"@noble/hashes/pbkdf2":2564,"@noble/hashes/sha256":2565,"@noble/hashes/sha512":2566,"@noble/hashes/utils":2567,"@scure/base":3027},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.mnemonicToSeedSync=n.mnemonicToSeed=n.validateMnemonic=n.entropyToMnemonic=n.mnemonicToEntropy=n.generateMnemonic=void 0;
/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */
const s=e("@noble/hashes/_assert"),r=e("@noble/hashes/pbkdf2"),i=e("@noble/hashes/sha256"),a=e("@noble/hashes/sha512"),o=e("@noble/hashes/utils"),c=e("@scure/base");function u(e){if("string"!=typeof e)throw new TypeError("Invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function l(e){const t=u(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}function d(e){s.default.bytes(e,16,20,24,28,32)}n.generateMnemonic=function(e,t=128){if(s.default.number(t),t%32!=0||t>256)throw new TypeError("Invalid entropy");return f((0,o.randomBytes)(t/8),e)};const m=e=>{const t=8-e.length/4;return new Uint8Array([(0,i.sha256)(e)[0]>>t<<t])};function p(e){if(!Array.isArray(e)||2048!==e.length||"string"!=typeof e[0])throw new Error("Worlist: expected array of 2048 strings");return e.forEach((e=>{if("string"!=typeof e)throw new Error(`Wordlist: non-string element: ${e}`)})),c.utils.chain(c.utils.checksum(1,m),c.utils.radix2(11,!0),c.utils.alphabet(e))}function h(e,t){let n;if("string"==typeof e){const{words:s}=l(e);n=p(t).decode(s)}else n=p(t).decode(Array.from(new Uint16Array(e.buffer)).map((e=>t[e])));return d(n),n}function f(e,t){d(e);const n=p(t).encode(e).map((e=>t.indexOf(e)));return new Uint8Array(new Uint16Array(n).buffer)}n.mnemonicToEntropy=h,n.entropyToMnemonic=f,n.validateMnemonic=function(e,t){try{h(e,t)}catch(e){return!1}return!0};const g=e=>u(`mnemonic${e}`);function y(e,t){let n;return n="string"==typeof e?(new TextEncoder).encode(l(e).nfkd):(new TextEncoder).encode(Array.from(new Uint16Array(e.buffer)).map((e=>t[e])).join(" ")),n}n.mnemonicToSeed=function(e,t,n=""){const s=y(e,t);return(0,r.pbkdf2Async)(a.sha512,s,g(n),{c:2048,dkLen:64})},n.mnemonicToSeedSync=function(e,t,n=""){const s=y(e,t);return(0,r.pbkdf2)(a.sha512,s,g(n),{c:2048,dkLen:64})}}}},{package:"@metamask/scure-bip39",file:"node_modules/@metamask/scure-bip39/dist/index.js"}],[2558,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.wordlist=void 0,n.wordlist="abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo".split("\n")}}},{package:"@metamask/scure-bip39",file:"node_modules/@metamask/scure-bip39/dist/wordlists/english.js"}],[2559,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){function s(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function r(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"==typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Expected Uint8Array");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function a(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");s(e.outputLen),s(e.blockLen)}function o(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function c(e,t){i(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}Object.defineProperty(n,"__esModule",{value:!0}),n.output=n.exists=n.hash=n.bytes=n.bool=n.number=void 0,n.number=s,n.bool=r,n.bytes=i,n.hash=a,n.exists=o,n.output=c;const u={number:s,bool:r,bytes:i,hash:a,exists:o,output:c};n.default=u}}},{package:"@metamask/scure-bip39>@noble/hashes",file:"node_modules/@metamask/scure-bip39/node_modules/@noble/hashes/_assert.js"}],[2560,{"./_assert.js":2559,"./utils.js":2567},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SHA2=void 0;const s=e("./_assert.js"),r=e("./utils.js");class i extends r.Hash{constructor(e,t,n,s){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,r.createView)(this.buffer)}update(e){(0,s.exists)(this);const{view:t,buffer:n,blockLen:i}=this,a=(e=(0,r.toBytes)(e)).length;for(let s=0;s<a;){const o=Math.min(i-this.pos,a-s);if(o!==i)n.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===i&&(this.process(t,0),this.pos=0);else{const t=(0,r.createView)(e);for(;i<=a-s;s+=i)this.process(t,s)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,s.exists)(this),(0,s.output)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:i,isLE:a}=this;let{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let e=o;e<i;e++)t[e]=0;!function(e,t,n,s){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,s);const r=BigInt(32),i=BigInt(4294967295),a=Number(n>>r&i),o=Number(n&i),c=s?4:0,u=s?0:4;e.setUint32(t+c,a,s),e.setUint32(t+u,o,s)}(n,i-8,BigInt(8*this.length),a),this.process(n,0);const c=(0,r.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,d[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:s,finished:r,destroyed:i,pos:a}=this;return e.length=s,e.pos=a,e.finished=r,e.destroyed=i,s%t&&e.buffer.set(n),e}}n.SHA2=i}}},{package:"@metamask/scure-bip39>@noble/hashes",file:"node_modules/@metamask/scure-bip39/node_modules/@noble/hashes/_sha2.js"}],[2561,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.add5L=n.add5H=n.add4H=n.add4L=n.add3H=n.add3L=n.add=n.rotlBL=n.rotlBH=n.rotlSL=n.rotlSH=n.rotr32L=n.rotr32H=n.rotrBL=n.rotrBH=n.rotrSL=n.rotrSH=n.shrSL=n.shrSH=n.toBig=n.split=n.fromBig=void 0;const s=BigInt(2**32-1),r=BigInt(32);function i(e,t=!1){return t?{h:Number(e&s),l:Number(e>>r&s)}:{h:0|Number(e>>r&s),l:0|Number(e&s)}}function a(e,t=!1){let n=new Uint32Array(e.length),s=new Uint32Array(e.length);for(let r=0;r<e.length;r++){const{h:a,l:o}=i(e[r],t);[n[r],s[r]]=[a,o]}return[n,s]}n.fromBig=i,n.split=a;const o=(e,t)=>BigInt(e>>>0)<<r|BigInt(t>>>0);n.toBig=o;const c=(e,t,n)=>e>>>n;n.shrSH=c;const u=(e,t,n)=>e<<32-n|t>>>n;n.shrSL=u;const l=(e,t,n)=>e>>>n|t<<32-n;n.rotrSH=l;const d=(e,t,n)=>e<<32-n|t>>>n;n.rotrSL=d;const m=(e,t,n)=>e<<64-n|t>>>n-32;n.rotrBH=m;const p=(e,t,n)=>e>>>n-32|t<<64-n;n.rotrBL=p;const h=(e,t)=>t;n.rotr32H=h;const f=(e,t)=>e;n.rotr32L=f;const g=(e,t,n)=>e<<n|t>>>32-n;n.rotlSH=g;const y=(e,t,n)=>t<<n|e>>>32-n;n.rotlSL=y;const b=(e,t,n)=>t<<n-32|e>>>64-n;n.rotlBH=b;const x=(e,t,n)=>e<<n-32|t>>>64-n;function S(e,t,n,s){const r=(t>>>0)+(s>>>0);return{h:e+n+(r/2**32|0)|0,l:0|r}}n.rotlBL=x,n.add=S;const k=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);n.add3L=k;const v=(e,t,n,s)=>t+n+s+(e/2**32|0)|0;n.add3H=v;const w=(e,t,n,s)=>(e>>>0)+(t>>>0)+(n>>>0)+(s>>>0);n.add4L=w;const T=(e,t,n,s,r)=>t+n+s+r+(e/2**32|0)|0;n.add4H=T;const _=(e,t,n,s,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(s>>>0)+(r>>>0);n.add5L=_;const E=(e,t,n,s,r,i)=>t+n+s+r+i+(e/2**32|0)|0;n.add5H=E;const j={fromBig:i,split:a,toBig:o,shrSH:c,shrSL:u,rotrSH:l,rotrSL:d,rotrBH:m,rotrBL:p,rotr32H:h,rotr32L:f,rotlSH:g,rotlSL:y,rotlBH:b,rotlBL:x,add:S,add3L:k,add3H:v,add4L:w,add4H:T,add5H:E,add5L:_};n.default=j}}},{package:"@metamask/scure-bip39>@noble/hashes",file:"node_modules/@metamask/scure-bip39/node_modules/@noble/hashes/_u64.js"}],[2562,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=void 0,n.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:undefined}}},{package:"@metamask/scure-bip39>@noble/hashes",file:"node_modules/@metamask/scure-bip39/node_modules/@noble/hashes/crypto.js"}],[2563,{"./_assert.js":2559,"./utils.js":2567},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.hmac=n.HMAC=void 0;const s=e("./_assert.js"),r=e("./utils.js");class i extends r.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,s.hash)(e);const n=(0,r.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,a=new Uint8Array(i);a.set(n.length>i?e.create().update(n).digest():n);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),a.fill(0)}update(e){return(0,s.exists)(this),this.iHash.update(e),this}digestInto(e){(0,s.exists)(this),(0,s.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:s,destroyed:r,blockLen:i,outputLen:a}=this;return e.finished=s,e.destroyed=r,e.blockLen=i,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}n.HMAC=i;n.hmac=(e,t,n)=>new i(e,t).update(n).digest(),n.hmac.create=(e,t)=>new i(e,t)}}},{package:"@metamask/scure-bip39>@noble/hashes",file:"node_modules/@metamask/scure-bip39/node_modules/@noble/hashes/hmac.js"}],[2564,{"./_assert.js":2559,"./hmac.js":2563,"./utils.js":2567},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.pbkdf2Async=n.pbkdf2=void 0;const s=e("./_assert.js"),r=e("./hmac.js"),i=e("./utils.js");function a(e,t,n,a){(0,s.hash)(e);const o=(0,i.checkOpts)({dkLen:32,asyncTick:10},a),{c:c,dkLen:u,asyncTick:l}=o;if((0,s.number)(c),(0,s.number)(u),(0,s.number)(l),c<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const d=(0,i.toBytes)(t),m=(0,i.toBytes)(n),p=new Uint8Array(u),h=r.hmac.create(e,d),f=h._cloneInto().update(m);return{c:c,dkLen:u,asyncTick:l,DK:p,PRF:h,PRFSalt:f}}function o(e,t,n,s,r){return e.destroy(),t.destroy(),s&&s.destroy(),r.fill(0),n}n.pbkdf2=function(e,t,n,s){const{c:r,dkLen:c,DK:u,PRF:l,PRFSalt:d}=a(e,t,n,s);let m;const p=new Uint8Array(4),h=(0,i.createView)(p),f=new Uint8Array(l.outputLen);for(let e=1,t=0;t<c;e++,t+=l.outputLen){const n=u.subarray(t,t+l.outputLen);h.setInt32(0,e,!1),(m=d._cloneInto(m)).update(p).digestInto(f),n.set(f.subarray(0,n.length));for(let e=1;e<r;e++){l._cloneInto(m).update(f).digestInto(f);for(let e=0;e<n.length;e++)n[e]^=f[e]}}return o(l,d,u,m,f)},n.pbkdf2Async=async function(e,t,n,s){const{c:r,dkLen:c,asyncTick:u,DK:l,PRF:d,PRFSalt:m}=a(e,t,n,s);let p;const h=new Uint8Array(4),f=(0,i.createView)(h),g=new Uint8Array(d.outputLen);for(let e=1,t=0;t<c;e++,t+=d.outputLen){const n=l.subarray(t,t+d.outputLen);f.setInt32(0,e,!1),(p=m._cloneInto(p)).update(h).digestInto(g),n.set(g.subarray(0,n.length)),await(0,i.asyncLoop)(r-1,u,(()=>{d._cloneInto(p).update(g).digestInto(g);for(let e=0;e<n.length;e++)n[e]^=g[e]}))}return o(d,m,l,p,g)}}}},{package:"@metamask/scure-bip39>@noble/hashes",file:"node_modules/@metamask/scure-bip39/node_modules/@noble/hashes/pbkdf2.js"}],[2565,{"./_sha2.js":2560,"./utils.js":2567},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.sha224=n.sha256=void 0;const s=e("./_sha2.js"),r=e("./utils.js"),i=(e,t,n)=>e&t^e&n^t&n,a=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,2756734187,3204031479,3329325298]),o=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends s.SHA2{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(){const{A:e,B:t,C:n,D:s,E:r,F:i,G:a,H:o}=this;return[e,t,n,s,r,i,a,o]}set(e,t,n,s,r,i,a,o){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|s,this.E=0|r,this.F=0|i,this.G=0|a,this.H=0|o}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],n=c[e-2],s=(0,r.rotr)(t,7)^(0,r.rotr)(t,18)^t>>>3,i=(0,r.rotr)(n,17)^(0,r.rotr)(n,19)^n>>>10;c[e]=i+c[e-7]+s+c[e-16]|0}let{A:n,B:s,C:o,D:u,E:l,F:d,G:m,H:p}=this;for(let e=0;e<64;e++){const t=p+((0,r.rotr)(l,6)^(0,r.rotr)(l,11)^(0,r.rotr)(l,25))+((h=l)&d^~h&m)+a[e]+c[e]|0,f=((0,r.rotr)(n,2)^(0,r.rotr)(n,13)^(0,r.rotr)(n,22))+i(n,s,o)|0;p=m,m=d,d=l,l=u+t|0,u=o,o=s,s=n,n=t+f|0}var h;n=n+this.A|0,s=s+this.B|0,o=o+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,m=m+this.G|0,p=p+this.H|0,this.set(n,s,o,u,l,d,m,p)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}n.sha256=(0,r.wrapConstructor)((()=>new u)),n.sha224=(0,r.wrapConstructor)((()=>new l))}}},{package:"@metamask/scure-bip39>@noble/hashes",file:"node_modules/@metamask/scure-bip39/node_modules/@noble/hashes/sha256.js"}],[2566,{"./_sha2.js":2560,"./_u64.js":2561,"./utils.js":2567},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.sha384=n.sha512_256=n.sha512_224=n.sha512=n.SHA512=void 0;const s=e("./_sha2.js"),r=e("./_u64.js"),i=e("./utils.js"),[a,o]=(()=>r.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),c=new Uint32Array(80),u=new Uint32Array(80);class l extends s.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:s,Ch:r,Cl:i,Dh:a,Dl:o,Eh:c,El:u,Fh:l,Fl:d,Gh:m,Gl:p,Hh:h,Hl:f}=this;return[e,t,n,s,r,i,a,o,c,u,l,d,m,p,h,f]}set(e,t,n,s,r,i,a,o,c,u,l,d,m,p,h,f){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|s,this.Ch=0|r,this.Cl=0|i,this.Dh=0|a,this.Dl=0|o,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|m,this.Gl=0|p,this.Hh=0|h,this.Hl=0|f}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t),u[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|c[e-15],n=0|u[e-15],s=r.default.rotrSH(t,n,1)^r.default.rotrSH(t,n,8)^r.default.shrSH(t,n,7),i=r.default.rotrSL(t,n,1)^r.default.rotrSL(t,n,8)^r.default.shrSL(t,n,7),a=0|c[e-2],o=0|u[e-2],l=r.default.rotrSH(a,o,19)^r.default.rotrBH(a,o,61)^r.default.shrSH(a,o,6),d=r.default.rotrSL(a,o,19)^r.default.rotrBL(a,o,61)^r.default.shrSL(a,o,6),m=r.default.add4L(i,d,u[e-7],u[e-16]),p=r.default.add4H(m,s,l,c[e-7],c[e-16]);c[e]=0|p,u[e]=0|m}let{Ah:n,Al:s,Bh:i,Bl:l,Ch:d,Cl:m,Dh:p,Dl:h,Eh:f,El:g,Fh:y,Fl:b,Gh:x,Gl:S,Hh:k,Hl:v}=this;for(let e=0;e<80;e++){const t=r.default.rotrSH(f,g,14)^r.default.rotrSH(f,g,18)^r.default.rotrBH(f,g,41),w=r.default.rotrSL(f,g,14)^r.default.rotrSL(f,g,18)^r.default.rotrBL(f,g,41),T=f&y^~f&x,_=g&b^~g&S,E=r.default.add5L(v,w,_,o[e],u[e]),j=r.default.add5H(E,k,t,T,a[e],c[e]),C=0|E,P=r.default.rotrSH(n,s,28)^r.default.rotrBH(n,s,34)^r.default.rotrBH(n,s,39),O=r.default.rotrSL(n,s,28)^r.default.rotrBL(n,s,34)^r.default.rotrBL(n,s,39),A=n&i^n&d^i&d,I=s&l^s&m^l&m;k=0|x,v=0|S,x=0|y,S=0|b,y=0|f,b=0|g,({h:f,l:g}=r.default.add(0|p,0|h,0|j,0|C)),p=0|d,h=0|m,d=0|i,m=0|l,i=0|n,l=0|s;const N=r.default.add3L(C,O,I);n=r.default.add3H(N,j,P,A),s=0|N}({h:n,l:s}=r.default.add(0|this.Ah,0|this.Al,0|n,0|s)),({h:i,l:l}=r.default.add(0|this.Bh,0|this.Bl,0|i,0|l)),({h:d,l:m}=r.default.add(0|this.Ch,0|this.Cl,0|d,0|m)),({h:p,l:h}=r.default.add(0|this.Dh,0|this.Dl,0|p,0|h)),({h:f,l:g}=r.default.add(0|this.Eh,0|this.El,0|f,0|g)),({h:y,l:b}=r.default.add(0|this.Fh,0|this.Fl,0|y,0|b)),({h:x,l:S}=r.default.add(0|this.Gh,0|this.Gl,0|x,0|S)),({h:k,l:v}=r.default.add(0|this.Hh,0|this.Hl,0|k,0|v)),this.set(n,s,i,l,d,m,p,h,f,g,y,b,x,S,k,v)}roundClean(){c.fill(0),u.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}n.SHA512=l;class d extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class m extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class p extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}n.sha512=(0,i.wrapConstructor)((()=>new l)),n.sha512_224=(0,i.wrapConstructor)((()=>new d)),n.sha512_256=(0,i.wrapConstructor)((()=>new m)),n.sha384=(0,i.wrapConstructor)((()=>new p))}}},{package:"@metamask/scure-bip39>@noble/hashes",file:"node_modules/@metamask/scure-bip39/node_modules/@noble/hashes/sha512.js"}],[2567,{"@noble/hashes/crypto":2562},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.isLE=n.rotr=n.createView=n.u32=n.u8=void 0;const s=e("@noble/hashes/crypto");n.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);function r(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}n.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));n.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(n.rotr=(e,t)=>e<<32-t|e>>>t,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!n.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));n.bytesToHex=function(e){if(!r(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=i[e[n]];return t};const a={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function o(e){return e>=a._0&&e<=a._9?e-a._0:e>=a._A&&e<=a._F?e-(a._A-10):e>=a._a&&e<=a._f?e-(a._a-10):void 0}n.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const s=new Uint8Array(n);for(let t=0,r=0;t<n;t++,r+=2){const n=o(e.charCodeAt(r)),i=o(e.charCodeAt(r+1));if(n===undefined||i===undefined){const t=e[r]+e[r+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+r)}s[t]=16*n+i}return s};function c(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function u(e){if("string"==typeof e&&(e=c(e)),!r(e))throw new Error("expected Uint8Array, got "+typeof e);return e}n.nextTick=async()=>{},n.asyncLoop=async function(e,t,s){let r=Date.now();for(let i=0;i<e;i++){s(i);const e=Date.now()-r;e>=0&&e<t||(await(0,n.nextTick)(),r+=e)}},n.utf8ToBytes=c,n.toBytes=u,n.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];if(!r(s))throw new Error("Uint8Array expected");t+=s.length}const n=new Uint8Array(t);for(let t=0,s=0;t<e.length;t++){const r=e[t];n.set(r,s),s+=r.length}return n};n.Hash=class{clone(){return this._cloneInto()}};const l={}.toString;n.checkOpts=function(e,t){if(t!==undefined&&"[object Object]"!==l.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},n.wrapConstructor=function(e){const t=t=>e().update(u(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},n.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.randomBytes=function(e=32){if(s.crypto&&"function"==typeof s.crypto.getRandomValues)return s.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}}}},{package:"@metamask/scure-bip39>@noble/hashes",file:"node_modules/@metamask/scure-bip39/node_modules/@noble/hashes/utils.js"}],[2576,{"./logger.cjs":2578,"./types.cjs":2579,"./utils/decoding-api.cjs":2580,"./utils/normalize.cjs":2581,"./utils/validation.cjs":2582,"@metamask/base-controller":1383,"@metamask/controller-utils":1474,"@metamask/keyring-controller":1990,"@metamask/logging-controller":2070,events:4399,uuid:5663},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o,c,u,l,d,m,p,h,f,g,y,b,x,S,k,v,w,T,_=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},E=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)},j=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.SignatureController=void 0;const C=e("@metamask/base-controller"),P=e("@metamask/controller-utils"),O=e("@metamask/keyring-controller"),A=e("@metamask/logging-controller"),I=j(e("events")),N=e("uuid"),R=e("./logger.cjs"),M=e("./types.cjs"),B=e("./utils/decoding-api.cjs"),L=e("./utils/normalize.cjs"),D=e("./utils/validation.cjs"),U={signatureRequests:{persist:!1,anonymous:!1},unapprovedPersonalMsgs:{persist:!1,anonymous:!1},unapprovedTypedMessages:{persist:!1,anonymous:!1},unapprovedPersonalMsgCount:{persist:!1,anonymous:!1},unapprovedTypedMessagesCount:{persist:!1,anonymous:!1}},H=[M.SignatureRequestStatus.Signed,M.SignatureRequestStatus.Rejected,M.SignatureRequestStatus.Errored];class F extends C.BaseController{constructor({decodingApiUrl:e,isDecodeSignatureRequestEnabled:t,messenger:n,state:o,trace:c}){super({name:"SignatureController",metadata:U,messenger:n,state:{signatureRequests:{},unapprovedPersonalMsgs:{},unapprovedTypedMessages:{},unapprovedPersonalMsgCount:0,unapprovedTypedMessagesCount:0,...o}}),s.add(this),r.set(this,void 0),i.set(this,void 0),a.set(this,void 0),this.hub=new I.default,_(this,a,c??((e,t)=>t?.()),"f"),_(this,r,e,"f"),_(this,i,t,"f")}get unapprovedPersonalMessagesCount(){return this.state.unapprovedPersonalMsgCount}get unapprovedTypedMessagesCount(){return this.state.unapprovedTypedMessagesCount}get messages(){return this.state.signatureRequests}resetState(){E(this,s,"m",b).call(this,(e=>{Object.assign(e,{signatureRequests:{},unapprovedPersonalMsgs:{},unapprovedTypedMessages:{},unapprovedPersonalMsgCount:0,unapprovedTypedMessagesCount:0})}))}rejectUnapproved(e){const t=Object.values(this.state.signatureRequests).filter((e=>e.status===M.SignatureRequestStatus.Unapproved));for(const n of t)E(this,s,"m",h).call(this,n.id,e)}clearUnapproved(){E(this,s,"m",b).call(this,(e=>{Object.values(e.signatureRequests).filter((e=>e.status===M.SignatureRequestStatus.Unapproved)).forEach((t=>delete e.signatureRequests[t.id]))}))}async newUnsignedPersonalMessage(e,t,n={}){(0,D.validatePersonalSignatureRequest)(e);const r=(0,L.normalizePersonalMessageParams)(e);return r.siwe=(0,P.detectSIWE)(e),E(this,s,"m",c).call(this,{messageParams:r,request:t,type:M.SignatureRequestType.PersonalSign,approvalType:P.ApprovalType.PersonalSign,traceContext:n.traceContext})}async newUnsignedTypedMessage(e,t,n,r,i={}){const a=E(this,s,"m",v).call(this,t),o=E(this,s,"m",T).call(this);(0,D.validateTypedSignatureRequest)({currentChainId:a,internalAccounts:o,messageData:e,request:t,version:n});const u=(0,L.normalizeTypedMessageParams)(e,n);return E(this,s,"m",c).call(this,{approvalType:P.ApprovalType.EthSignTypedData,messageParams:u,request:t,signingOptions:r,traceContext:i.traceContext,type:M.SignatureRequestType.TypedSign,version:n})}setDeferredSignSuccess(e,t){E(this,s,"m",y).call(this,e,(e=>{e.rawSig=t,e.status=M.SignatureRequestStatus.Signed}))}setMessageMetadata(e,t){E(this,s,"m",y).call(this,e,(e=>{e.metadata=t}))}setDeferredSignError(e){E(this,s,"m",y).call(this,e,(e=>{e.status=M.SignatureRequestStatus.Rejected}))}setTypedMessageInProgress(e){E(this,s,"m",y).call(this,e,(e=>{e.status=M.SignatureRequestStatus.InProgress}))}setPersonalMessageInProgress(e){this.setTypedMessageInProgress(e)}}n.SignatureController=F,r=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakSet,o=function(e,t){return[O.SignTypedDataVersion.V3,O.SignTypedDataVersion.V4].includes(t)&&"string"==typeof e.data?{...e,data:JSON.parse(e.data)}:e},c=async function({chainId:e,messageParams:t,request:n,type:r,approvalType:i,version:a,signingOptions:o,traceContext:c}){(0,R.projectLogger)("Processing signature request",{messageParams:t,request:n,type:r,version:a});const m=e??E(this,s,"m",v).call(this,n);E(this,s,"m",S).call(this,r,a,A.SigningStage.Proposed,t);const p=E(this,s,"m",u).call(this,{chainId:m,messageParams:t,request:n,signingOptions:o,type:r,version:a});let h,g;const y=E(this,s,"m",f).call(this,p.id);E(this,s,"m",w).call(this,p.id,n,m);try{h=await E(this,s,"m",l).call(this,{approvalType:i,metadata:p,request:n,traceContext:c}),await E(this,s,"m",d).call(this,p,c)}catch(x){(0,R.projectLogger)("Signature request failed",x),g=x}const b=await y,{error:x,id:k,messageParams:T,rawSig:_}=b;switch(b.status){case M.SignatureRequestStatus.Signed:return(0,R.projectLogger)("Signature request finished",{id:k,signature:_}),E(this,s,"m",S).call(this,r,a,A.SigningStage.Signed,T),h?.success(_),b.rawSig;case M.SignatureRequestStatus.Rejected:const e=g??new Error(`MetaMask ${r} Signature: User denied message signature.`);throw h?.error(e),e;case M.SignatureRequestStatus.Errored:const t=g??new Error(`MetaMask ${r} Signature: ${x}`);throw h?.error(t),t;default:throw new Error(`MetaMask ${r} Signature: Unknown problem: ${JSON.stringify(T)}`)}},u=function({chainId:e,messageParams:t,request:n,signingOptions:r,type:i,version:a}){const o=(0,N.v1)(),c=n?.origin??t.origin,u=n?.id,l=n?.securityAlertResponse,d=n?.networkClientId,m={chainId:e,id:o,messageParams:{...t,metamaskId:o,origin:c,requestId:u,version:a},networkClientId:d,securityAlertResponse:l,signingOptions:r,status:M.SignatureRequestStatus.Unapproved,time:Date.now(),type:i,version:a};return E(this,s,"m",b).call(this,(e=>{e.signatureRequests[m.id]=m})),(0,R.projectLogger)("Added signature request",m),this.hub.emit("unapprovedMessage",{messageParams:t,metamaskId:m.id}),m},l=async function({approvalType:e,metadata:t,request:n,traceContext:r}){const{id:i,messageParams:o,type:c,version:u}=t;try{return(await E(this,a,"f").call(this,{name:"Await Approval",parentContext:r},(r=>E(this,s,"m",g).call(this,t,e,{traceContext:r,actionId:n?.id?.toString()})))).resultCallbacks}catch(e){throw(0,R.projectLogger)("User rejected request",{id:i,error:e}),E(this,s,"m",S).call(this,c,u,A.SigningStage.Rejected,o),E(this,s,"m",h).call(this,i),e}},d=async function(e,t){const{id:n}=e;E(this,s,"m",y).call(this,n,(e=>{e.status=M.SignatureRequestStatus.Approved})),await E(this,a,"f").call(this,{name:"Sign",parentContext:t},(()=>E(this,s,"m",m).call(this,e)))},m=async function(e){const{id:t,messageParams:n,signingOptions:r,type:i}=e;try{let a;switch(i){case M.SignatureRequestType.PersonalSign:a=await this.messagingSystem.call("KeyringController:signPersonalMessage",n);break;case M.SignatureRequestType.TypedSign:const t=r?.parseJsonData?E(this,s,"m",o).call(this,n,e.version):n;a=await this.messagingSystem.call("KeyringController:signTypedMessage",t,e.version);break;default:throw new Error(`Unknown signature request type: ${i}`)}if(this.hub.emit(`${i}:signed`,{signature:a,messageId:t}),n.deferSetAsSigned)return;E(this,s,"m",y).call(this,t,(e=>{e.rawSig=a,e.status=M.SignatureRequestStatus.Signed}))}catch(e){throw i===M.SignatureRequestType.TypedSign?E(this,s,"m",p).call(this,t,e.message):E(this,s,"m",h).call(this,t),this.hub.emit(`${t}:signError`,{error:e}),e}},p=function(e,t){E(this,s,"m",y).call(this,e,(e=>{e.status=M.SignatureRequestStatus.Errored,e.error=t}))},h=function(e,t){if(t){const n=this.state.signatureRequests[e];this.hub.emit("cancelWithReason",{metadata:n,reason:t})}E(this,s,"m",y).call(this,e,(e=>{e.status=M.SignatureRequestStatus.Rejected}))},f=async function(e){return new Promise((t=>{this.hub.once(`${e}:finished`,(e=>{t(e)}))}))},g=async function(e,t,{traceContext:n,actionId:s}){const{id:r,messageParams:i}=e,o=i.origin||P.ORIGIN_METAMASK;return await E(this,a,"f").call(this,{name:"Notification Display",id:s,parentContext:n}),await this.messagingSystem.call("ApprovalController:addRequest",{id:r,origin:o,type:t,requestData:{...i},expectsResult:!0},!0)},y=function(e,t){let n=!1;const{nextState:r}=E(this,s,"m",b).call(this,(s=>{const r=s.signatureRequests[e];if(!r)throw new Error(`Signature request with id ${e} not found`);const i=r.status;t(r),n=r.status!==i})),i=r.signatureRequests[e];return n&&H.includes(i.status)&&this.hub.emit(`${e}:finished`,i),i},b=function(e){return this.update((t=>{e(t);const n=Object.values(t.signatureRequests).filter((e=>e.status===M.SignatureRequestStatus.Unapproved)),r=E(this,s,"m",x).call(this,n,M.SignatureRequestType.PersonalSign),i=E(this,s,"m",x).call(this,n,M.SignatureRequestType.TypedSign);t.unapprovedPersonalMsgs=r,t.unapprovedTypedMessages=i,t.unapprovedPersonalMsgCount=Object.values(r).length,t.unapprovedTypedMessagesCount=Object.values(i).length}))},x=function(e,t){return e.filter((e=>e.type===t)).reduce(((e,t)=>({...e,[t.id]:{...t,msgParams:t.messageParams}})),{})},S=function(e,t,n,r){const i=E(this,s,"m",k).call(this,e,t);this.messagingSystem.call("LoggingController:add",{type:A.LogType.EthSignLog,data:{signingMethod:i,stage:n,signingData:r}})},k=function(e,t){return e===M.SignatureRequestType.PersonalSign?A.SigningMethod.PersonalSign:e===M.SignatureRequestType.TypedSign&&t===O.SignTypedDataVersion.V3?A.SigningMethod.EthSignTypedDataV3:e===M.SignatureRequestType.TypedSign&&t===O.SignTypedDataVersion.V4?A.SigningMethod.EthSignTypedDataV4:A.SigningMethod.EthSignTypedData},v=function(e){const{networkClientId:t}=e;if(!t)throw new Error("Network client ID not found in request");return this.messagingSystem.call("NetworkController:getNetworkClientById",t).configuration.chainId},w=function(e,t,n){E(this,i,"f")?.call(this)&&E(this,r,"f")&&(E(this,s,"m",y).call(this,e,(e=>{e.decodingLoading=!0})),(0,B.decodeSignature)(t,n,E(this,r,"f")).then((t=>E(this,s,"m",y).call(this,e,(e=>{e.decodingData=t,e.decodingLoading=!1})))).catch((t=>E(this,s,"m",y).call(this,e,(e=>{e.decodingData={stateChanges:null,error:{message:t.message,type:B.DECODING_API_ERRORS.DECODING_FAILED_WITH_ERROR}},e.decodingLoading=!1})))))},T=function(){const e=this.messagingSystem.call("AccountsController:getState");return Object.values(e.internalAccounts?.accounts??{}).filter((e=>"eip155:eoa"===e.type)).map((e=>e.address))}}}},{package:"@metamask/signature-controller",file:"node_modules/@metamask/signature-controller/dist/SignatureController.cjs"}],[2577,{"./SignatureController.cjs":2576,"./types.cjs":2579},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./SignatureController.cjs"),n),r(e("./types.cjs"),n)}}},{package:"@metamask/signature-controller",file:"node_modules/@metamask/signature-controller/dist/index.cjs"}],[2578,{"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.projectLogger=void 0;const s=e("@metamask/utils");Object.defineProperty(n,"createModuleLogger",{enumerable:!0,get:function(){return s.createModuleLogger}}),n.projectLogger=(0,s.createProjectLogger)("signature-controller")}}},{package:"@metamask/signature-controller",file:"node_modules/@metamask/signature-controller/dist/logger.cjs"}],[2579,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a;Object.defineProperty(n,"__esModule",{value:!0}),n.SignatureRequestType=n.SignatureRequestStatus=n.DecodingDataChangeType=n.EthMethod=void 0,function(e){e.PersonalSign="personal_sign",e.SignTransaction="eth_signTransaction",e.SignTypedDataV1="eth_signTypedData_v1",e.SignTypedDataV3="eth_signTypedData_v3",e.SignTypedDataV4="eth_signTypedData_v4"}(s||(n.EthMethod=s={})),function(e){e.Receive="RECEIVE",e.Transfer="TRANSFER",e.Approve="APPROVE",e.Revoke="REVOKE_APPROVE",e.Bidding="BIDDING",e.Listing="LISTING"}(r||(n.DecodingDataChangeType=r={})),function(e){e.Unapproved="unapproved",e.Approved="approved",e.Rejected="rejected",e.InProgress="inProgress",e.Signed="signed",e.Errored="errored"}(i||(n.SignatureRequestStatus=i={})),function(e){e.PersonalSign="personal_sign",e.TypedSign="eth_signTypedData"}(a||(n.SignatureRequestType=a={}))}}},{package:"@metamask/signature-controller",file:"node_modules/@metamask/signature-controller/dist/types.cjs"}],[2580,{"../types.cjs":2579,"./normalize.cjs":2581},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.decodeSignature=n.DECODING_API_ERRORS=void 0;const s=e("../types.cjs"),r=e("./normalize.cjs");n.DECODING_API_ERRORS={UNSUPPORTED_SIGNATURE:"UNSUPPORTED_SIGNATURE",DECODING_FAILED_WITH_ERROR:"DECODING_FAILED_WITH_ERROR"},n.decodeSignature=async function(e,t,i){try{const{method:a,origin:o,params:c}=e;if(e.method===s.EthMethod.SignTypedDataV3||e.method===s.EthMethod.SignTypedDataV4){const e=await fetch(`${i}/signature?chainId=${t}`,{method:"POST",body:JSON.stringify({method:a,origin:o,params:[c[0],(0,r.normalizeParam)(c[1])]}),headers:{"Content-Type":"application/json"}});return await e.json()}return{error:{message:"Unsupported signature.",type:n.DECODING_API_ERRORS.UNSUPPORTED_SIGNATURE}}}catch(e){return{error:{message:e.message,type:n.DECODING_API_ERRORS.DECODING_FAILED_WITH_ERROR}}}}}}},{package:"@metamask/signature-controller",file:"node_modules/@metamask/signature-controller/dist/utils/decoding-api.cjs"}],[2581,{"@metamask/keyring-controller":1990,"@metamask/utils":2950,buffer:4074},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.normalizeParam=n.normalizeTypedMessageParams=n.normalizePersonalMessageParams=void 0;const s=e("@metamask/keyring-controller"),r=e("@metamask/utils");function i(e){try{const t=(0,r.remove0x)(e);if(t.match(/^[0-9A-Fa-f]+$/gu))return(0,r.add0x)(t)}catch(e){}return(0,r.bytesToHex)(t.from(e,"utf8"))}function a(e){if(Array.isArray(e))return e.map((e=>a(e)));if("object"==typeof e&&null!==e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t]=a(e[t]));return e}return e?.toString()??""}n.normalizePersonalMessageParams=function(e){return{...e,data:i(e.data)}},n.normalizeTypedMessageParams=function(e,t){const n={...e};return"string"==typeof e.data||t!==s.SignTypedDataVersion.V3&&t!==s.SignTypedDataVersion.V4||(n.data=JSON.stringify(e.data)),n},n.normalizeParam=function(e){return e?a("string"==typeof e?JSON.parse(e):e):{}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/signature-controller",file:"node_modules/@metamask/signature-controller/dist/utils/normalize.cjs"}],[2582,{"@metamask/approval-controller":1299,"@metamask/controller-utils":1474,"@metamask/eth-sig-util":2619,"@metamask/keyring-controller":1990,jsonschema:4690},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.validateTypedSignatureRequest=n.validatePersonalSignatureRequest=n.DELEGATOR_FIELD=n.PRIMARY_TYPE_DELEGATION=void 0;const s=e("@metamask/approval-controller"),r=e("@metamask/controller-utils"),i=e("@metamask/eth-sig-util"),a=e("@metamask/keyring-controller"),o=e("jsonschema");function c(e,t){if(!e||"string"!=typeof e||!(0,r.isValidHexAddress)(e))throw new Error(`Invalid "${t}" address: ${e} must be a valid string.`)}n.PRIMARY_TYPE_DELEGATION="Delegation",n.DELEGATOR_FIELD="delegator",n.validatePersonalSignatureRequest=function(e){const{from:t,data:n}=e;if(c(t,"from"),!n||"string"!=typeof n)throw new Error(`Invalid message "data": ${n} must be a valid string.`)},n.validateTypedSignatureRequest=function({currentChainId:e,internalAccounts:t,messageData:r,request:u,version:l}){c(r.from,"from"),l===a.SignTypedDataVersion.V1?function(e){if(!e.data||!Array.isArray(e.data))throw new Error(`Invalid message "data": ${e.data} must be a valid array.`);try{(0,i.typedSignatureHash)(e.data)}catch(e){throw new Error("Expected EIP712 typed data.")}}(r):function({currentChainId:e,internalAccounts:t,messageData:r,request:a}){if(!r.data||Array.isArray(r.data)||"object"!=typeof r.data&&"string"!=typeof r.data)throw new Error('Invalid message "data": Must be a valid string or object.');let c;if("object"==typeof r.data)c=r.data;else try{c=JSON.parse(r.data)}catch(e){throw new Error("Data must be passed as a valid JSON string.")}if((0,o.validate)(c,i.TYPED_MESSAGE_SCHEMA).errors.length>0)throw new Error("Data must conform to EIP-712 schema. See https://git.io/fNtcx.");if(!e)throw new Error("Current chainId cannot be null or undefined.");let{chainId:u}=c.domain;if(u){"string"==typeof u&&(u=parseInt(u,u.startsWith("0x")?16:10));const t=parseInt(e,16);if(Number.isNaN(t))throw new Error(`Cannot sign messages for chainId "${u}", because MetaMask is switching networks.`);if(u!==t)throw new Error(`Provided chainId "${u}" must match the active chainId "${t}"`)}const l=a?.origin??r?.origin;(function({data:e,internalAccounts:t,origin:n}){const r=e?.domain?.verifyingContract,i=n&&n!==s.ORIGIN_METAMASK;if(r&&"string"==typeof r&&i&&t.some((e=>e.toLowerCase()===r.toLowerCase())))throw new Error("External signature requests cannot use internal accounts as the verifying contract.")})({data:c,internalAccounts:t,origin:l}),function({data:e,internalAccounts:t,origin:r}){const{primaryType:i}=e;if(i!==n.PRIMARY_TYPE_DELEGATION)return;const a=r&&r!==s.ORIGIN_METAMASK,o=e.message?.[n.DELEGATOR_FIELD];if(a&&t.some((e=>e.toLowerCase()===o?.toLowerCase())))throw new Error("External signature requests cannot sign delegations for internal accounts.")}({data:c,internalAccounts:t,origin:l})}({currentChainId:e,internalAccounts:t,messageData:r,request:u})}}}},{package:"@metamask/signature-controller",file:"node_modules/@metamask/signature-controller/dist/utils/validation.cjs"}],[2583,{"./bytes":2586,"./constants":2587,"./helpers":2589,"./internal":2591,"@ethereumjs/rlp":429,buffer:4074,"ethereum-cryptography/keccak":4300,"ethereum-cryptography/secp256k1":4317,"ethereum-cryptography/utils":4319},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.accountBodyToRLP=n.accountBodyToSlim=n.accountBodyFromSlim=n.isZeroAddress=n.zeroAddress=n.importPublic=n.privateToAddress=n.privateToPublic=n.publicToAddress=n.pubToAddress=n.isValidPublic=n.isValidPrivate=n.generateAddress2=n.generateAddress=n.isValidChecksumAddress=n.toChecksumAddress=n.isValidAddress=n.Account=void 0;const s=e("@ethereumjs/rlp"),r=e("ethereum-cryptography/keccak"),i=e("ethereum-cryptography/secp256k1"),a=e("ethereum-cryptography/utils"),o=e("./bytes"),c=e("./constants"),u=e("./helpers"),l=e("./internal"),d=BigInt(0);class m{constructor(e=d,t=d,n=c.KECCAK256_RLP,s=c.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=n,this.codeHash=s,this._validate()}static fromAccountData(e){const{nonce:t,balance:n,storageRoot:s,codeHash:r}=e;return new m(t!==undefined?(0,o.bufferToBigInt)((0,o.toBuffer)(t)):undefined,n!==undefined?(0,o.bufferToBigInt)((0,o.toBuffer)(n)):undefined,s!==undefined?(0,o.toBuffer)(s):undefined,r!==undefined?(0,o.toBuffer)(r):undefined)}static fromRlpSerializedAccount(e){const t=(0,o.arrToBufArr)(s.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,n,s,r]=e;return new m((0,o.bufferToBigInt)(t),(0,o.bufferToBigInt)(n),s,r)}_validate(){if(this.nonce<d)throw new Error("nonce must be greater than zero");if(this.balance<d)throw new Error("balance must be greater than zero");if(32!==this.storageRoot.length)throw new Error("storageRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,o.bigIntToUnpaddedBuffer)(this.nonce),(0,o.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return t.from(s.RLP.encode((0,o.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(c.KECCAK256_NULL)}isEmpty(){return this.balance===d&&this.nonce===d&&this.codeHash.equals(c.KECCAK256_NULL)}}n.Account=m;n.isValidAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};n.toChecksumAddress=function(e,n){(0,u.assertIsHexString)(e);const s=(0,l.stripHexPrefix)(e).toLowerCase();let i="";if(n!==undefined){i=(0,o.bufferToBigInt)((0,o.toBuffer)(n)).toString()+"0x"}const c=t.from(i+s,"utf8"),d=(0,a.bytesToHex)((0,r.keccak256)(c));let m="0x";for(let e=0;e<s.length;e++)parseInt(d[e],16)>=8?m+=s[e].toUpperCase():m+=s[e];return m};n.isValidChecksumAddress=function(e,t){return(0,n.isValidAddress)(e)&&(0,n.toChecksumAddress)(e,t)===e};n.generateAddress=function(e,n){return(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(n),(0,o.bufferToBigInt)(n)===BigInt(0)?t.from((0,r.keccak256)(s.RLP.encode((0,o.bufArrToArr)([e,null])))).slice(-20):t.from((0,r.keccak256)(s.RLP.encode((0,o.bufArrToArr)([e,n])))).slice(-20)};n.generateAddress2=function(e,n,s){if((0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(n),(0,u.assertIsBuffer)(s),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==n.length)throw new Error("Expected salt to be of length 32");const i=(0,r.keccak256)(t.concat([t.from("ff","hex"),e,n,(0,r.keccak256)(s)]));return(0,o.toBuffer)(i).slice(-20)};n.isValidPrivate=function(e){return i.secp256k1.utils.isValidPrivateKey(e)};n.isValidPublic=function(e,n=!1){if((0,u.assertIsBuffer)(e),64===e.length)try{return i.secp256k1.ProjectivePoint.fromHex(t.concat([t.from([4]),e])),!0}catch(e){return!1}if(!n)return!1;try{return i.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}};n.pubToAddress=function(e,n=!1){if((0,u.assertIsBuffer)(e),n&&64!==e.length&&(e=t.from(i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return t.from((0,r.keccak256)(e)).slice(-20)},n.publicToAddress=n.pubToAddress;n.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),t.from(i.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))};n.privateToAddress=function(e){return(0,n.publicToAddress)((0,n.privateToPublic)(e))};n.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=t.from(i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e};n.zeroAddress=function(){const e=(0,o.zeros)(20);return(0,o.bufferToHex)(e)};function p(e){const[t,n,s,r]=e;return[t,n,0===(0,o.arrToBufArr)(s).length?c.KECCAK256_RLP:s,0===(0,o.arrToBufArr)(r).length?c.KECCAK256_NULL:r]}n.isZeroAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return(0,n.zeroAddress)()===e},n.accountBodyFromSlim=p;const h=new Uint8Array(0);n.accountBodyToSlim=function(e){const[t,n,s,r]=e;return[t,n,(0,o.arrToBufArr)(s).equals(c.KECCAK256_RLP)?h:s,(0,o.arrToBufArr)(r).equals(c.KECCAK256_NULL)?h:r]},n.accountBodyToRLP=function(e,t=!0){const n=t?p(e):e;return(0,o.arrToBufArr)(s.RLP.encode(n))}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/account.js"}],[2584,{"./account":2583,"./bytes":2586,buffer:4074},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.Address=void 0;const s=e("./account"),r=e("./bytes");class i{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new i((0,r.zeros)(20))}static fromString(e){if(!(0,s.isValidAddress)(e))throw new Error("Invalid address");return new i((0,r.toBuffer)(e))}static fromPublicKey(e){if(!t.isBuffer(e))throw new Error("Public key should be Buffer");const n=(0,s.pubToAddress)(e);return new i(n)}static fromPrivateKey(e){if(!t.isBuffer(e))throw new Error("Private key should be Buffer");const n=(0,s.privateToAddress)(e);return new i(n)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new i((0,s.generateAddress)(e.buf,(0,r.bigIntToBuffer)(t)))}static generate2(e,n,r){if(!t.isBuffer(n))throw new Error("Expected salt to be a Buffer");if(!t.isBuffer(r))throw new Error("Expected initCode to be a Buffer");return new i((0,s.generateAddress2)(e.buf,n,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(i.zero())}isPrecompileOrSystemAddress(){const e=(0,r.bufferToBigInt)(this.buf),t=BigInt(0),n=BigInt("0xffff");return e>=t&&e<=n}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return t.from(this.buf)}}n.Address=i}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/address.js"}],[2585,{events:4399},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AsyncEventEmitter=void 0;const s=e("events");class r extends s.EventEmitter{emit(e,...t){let[n,s]=t;const r=this;let i=r._events[e]??[];return s===undefined&&"function"==typeof n&&(s=n,n=undefined),"newListener"!==e&&"removeListener"!==e||(n={event:n,fn:s},s=undefined),i=Array.isArray(i)?i:[i],async function(e,t,n){let s;for await(const r of t)try{r.length<2?r.call(e,n):await new Promise(((t,s)=>{r.call(e,n,(e=>{e?s(e):t()}))}))}catch(e){s=e}if(s)throw s}(r,i.slice(),n).then(s).catch(s),r.listenerCount(e)>0}once(e,t){const n=this;let s;if("function"!=typeof t)throw new TypeError("listener must be a function");return s=t.length>=2?function(r,i){n.removeListener(e,s),t(r,i)}:function(r){n.removeListener(e,s),t(r,s)},n.on(e,s),n}first(e,t){let n=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[e]=n=[n]),n.unshift(t),this}before(e,t,n){return this.beforeOrAfter(e,t,n)}after(e,t,n){return this.beforeOrAfter(e,t,n,"after")}beforeOrAfter(e,t,n,s){let r,i,a=this._events[e]??[];const o="after"===s?1:0;if("function"!=typeof n)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(a)||(this._events[e]=a=[a]),i=a.length,r=a.length;r--;)if(a[r]===t){i=r+o;break}return a.splice(i,0,n),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}n.AsyncEventEmitter=r}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/asyncEventEmitter.js"}],[2586,{"./helpers":2589,"./internal":2591,buffer:4074},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.intToUnpaddedBuffer=n.bigIntToUnpaddedBuffer=n.bigIntToHex=n.bufArrToArr=n.arrToBufArr=n.validateNoLeadingZeroes=n.baToJSON=n.toUtf8=n.short=n.addHexPrefix=n.toUnsigned=n.fromSigned=n.bufferToInt=n.bigIntToBuffer=n.bufferToBigInt=n.bufferToHex=n.toBuffer=n.unpadHexString=n.unpadArray=n.unpadBuffer=n.setLengthRight=n.setLengthLeft=n.zeros=n.intToBuffer=n.intToHex=void 0;const s=e("./helpers"),r=e("./internal");n.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};n.intToBuffer=function(e){const s=(0,n.intToHex)(e);return t.from((0,r.padToEven)(s.slice(2)),"hex")};n.zeros=function(e){return t.allocUnsafe(e).fill(0)};const i=function(e,t,s){const r=(0,n.zeros)(t);return s?e.length<t?(e.copy(r),r):e.slice(0,t):e.length<t?(e.copy(r,t-e.length),r):e.slice(-t)};n.setLengthLeft=function(e,t){return(0,s.assertIsBuffer)(e),i(e,t,!1)};n.setLengthRight=function(e,t){return(0,s.assertIsBuffer)(e),i(e,t,!0)};const a=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};n.unpadBuffer=function(e){return(0,s.assertIsBuffer)(e),a(e)};n.unpadArray=function(e){return(0,s.assertIsArray)(e),a(e)};n.unpadHexString=function(e){return(0,s.assertIsHexString)(e),e=(0,r.stripHexPrefix)(e),"0x"+a(e)};n.toBuffer=function(e){if(null===e||e===undefined)return t.allocUnsafe(0);if(t.isBuffer(e))return t.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return t.from(e);if("string"==typeof e){if(!(0,r.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return t.from((0,r.padToEven)((0,r.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,n.intToBuffer)(e);if("bigint"==typeof e){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${e}`);let n=e.toString(16);return n.length%2&&(n="0"+n),t.from(n,"hex")}if(e.toArray)return t.from(e.toArray());if(e.toBuffer)return t.from(e.toBuffer());throw new Error("invalid type")};function o(e){const t=(0,n.bufferToHex)(e);return"0x"===t?BigInt(0):BigInt(t)}function c(e){return(0,n.toBuffer)("0x"+e.toString(16))}n.bufferToHex=function(e){return"0x"+(e=(0,n.toBuffer)(e)).toString("hex")},n.bufferToBigInt=o,n.bigIntToBuffer=c;n.bufferToInt=function(e){const t=Number(o(e));if(!Number.isSafeInteger(t))throw new Error("Number exceeds 53 bits");return t};n.fromSigned=function(e){return BigInt.asIntN(256,o(e))};n.toUnsigned=function(e){return c(BigInt.asUintN(256,e))};n.addHexPrefix=function(e){return"string"!=typeof e||(0,r.isHexPrefixed)(e)?e:"0x"+e},n.short=function(e,n=50){const s=t.isBuffer(e)?e.toString("hex"):e;return s.length<=n?s:s.slice(0,n)+"…"};n.toUtf8=function(e){if((e=(0,r.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return t.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};n.baToJSON=function(e){if(t.isBuffer(e))return`0x${e.toString("hex")}`;if(e instanceof Array){const t=[];for(let s=0;s<e.length;s++)t.push((0,n.baToJSON)(e[s]));return t}};n.validateNoLeadingZeroes=function(e){for(const[t,n]of Object.entries(e))if(n!==undefined&&n.length>0&&0===n[0])throw new Error(`${t} cannot have leading zeroes, received: ${n.toString("hex")}`)},n.arrToBufArr=function e(n){return Array.isArray(n)?n.map((t=>e(t))):t.from(n)},n.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])};n.bigIntToHex=e=>"0x"+e.toString(16),n.bigIntToUnpaddedBuffer=function(e){return(0,n.unpadBuffer)(c(e))},n.intToUnpaddedBuffer=function(e){return(0,n.unpadBuffer)((0,n.intToBuffer)(e))}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/bytes.js"}],[2587,{buffer:4074,"ethereum-cryptography/secp256k1":4317},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.MAX_WITHDRAWALS_PER_PAYLOAD=n.RLP_EMPTY_STRING=n.KECCAK256_RLP=n.KECCAK256_RLP_S=n.KECCAK256_RLP_ARRAY=n.KECCAK256_RLP_ARRAY_S=n.KECCAK256_NULL=n.KECCAK256_NULL_S=n.TWO_POW256=n.SECP256K1_ORDER_DIV_2=n.SECP256K1_ORDER=n.MAX_INTEGER_BIGINT=n.MAX_INTEGER=n.MAX_UINT64=void 0;const s=e("buffer"),r=e("ethereum-cryptography/secp256k1");n.MAX_UINT64=BigInt("0xffffffffffffffff"),n.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),n.SECP256K1_ORDER=r.secp256k1.CURVE.n,n.SECP256K1_ORDER_DIV_2=r.secp256k1.CURVE.n/BigInt(2),n.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),n.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",n.KECCAK256_NULL=s.Buffer.from(n.KECCAK256_NULL_S,"hex"),n.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",n.KECCAK256_RLP_ARRAY=s.Buffer.from(n.KECCAK256_RLP_ARRAY_S,"hex"),n.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",n.KECCAK256_RLP=s.Buffer.from(n.KECCAK256_RLP_S,"hex"),n.RLP_EMPTY_STRING=s.Buffer.from([128]),n.MAX_WITHDRAWALS_PER_PAYLOAD=16}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/constants.js"}],[2588,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.compactBytesToNibbles=n.bytesToNibbles=n.nibblesToCompactBytes=n.nibblesToBytes=n.hasTerminator=void 0;n.hasTerminator=e=>e.length>0&&16===e[e.length-1];n.nibblesToBytes=(e,t)=>{for(let n=0,s=0;s<e.length;n+=1,s+=2)t[n]=e[s]<<4|e[s+1]};n.nibblesToCompactBytes=e=>{let t=0;(0,n.hasTerminator)(e)&&(t=1,e=e.subarray(0,e.length-1));const s=new Uint8Array(e.length/2+1);return s[0]=t<<5,1&~e.length||(s[0]|=16,s[0]|=e[0],e=e.subarray(1)),(0,n.nibblesToBytes)(e,s.subarray(1)),s};n.bytesToNibbles=e=>{const t=2*e.length+1,n=new Uint8Array(t);for(let t=0;t<e.length;t++){const s=e[t];n[2*t]=s/16,n[2*t+1]=s%16}return n[t-1]=16,n};n.compactBytesToNibbles=e=>{if(0===e.length)return e;let t=(0,n.bytesToNibbles)(e);t[0]<2&&(t=t.subarray(0,t.length-1));const s=2-(1&t[0]);return t.subarray(s)}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/encoding.js"}],[2589,{"../../../../../../is-buffer/index.js":4657,"./internal":2591},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsString=n.assertIsArray=n.assertIsBuffer=n.assertIsHexString=void 0;const s=e("./internal");n.assertIsHexString=function(e){if(!(0,s.isHexString)(e)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)}};n.assertIsBuffer=function(e){if(!t.isBuffer(e)){throw new Error(`This method only supports Buffer but input was: ${e}`)}};n.assertIsArray=function(e){if(!Array.isArray(e)){throw new Error(`This method only supports number arrays but input was: ${e}`)}};n.assertIsString=function(e){if("string"!=typeof e){throw new Error(`This method only supports strings but input was: ${e}`)}}}).call(this)}).call(this,{isBuffer:e("../../../../../../is-buffer/index.js")})}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/helpers.js"}],[2590,{"./account":2583,"./address":2584,"./asyncEventEmitter":2585,"./bytes":2586,"./constants":2587,"./encoding":2588,"./internal":2591,"./lock":2592,"./provider":2593,"./signature":2594,"./types":2595,"./units":2596,"./withdrawal":2597},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.toAscii=n.stripHexPrefix=n.padToEven=n.isHexString=n.isHexPrefixed=n.getKeys=n.getBinarySize=n.fromUtf8=n.fromAscii=n.arrayContainsArray=void 0,r(e("./constants"),n),r(e("./units"),n),r(e("./account"),n),r(e("./address"),n),r(e("./withdrawal"),n),r(e("./signature"),n),r(e("./bytes"),n),r(e("./types"),n),r(e("./encoding"),n),r(e("./asyncEventEmitter"),n);var i=e("./internal");Object.defineProperty(n,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(n,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(n,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(n,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(n,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(n,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(n,"isHexString",{enumerable:!0,get:function(){return i.isHexString}}),Object.defineProperty(n,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(n,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(n,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),r(e("./lock"),n),r(e("./provider"),n)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/index.js"}],[2591,{buffer:4074},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(e){(function(){function t(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}Object.defineProperty(n,"__esModule",{value:!0}),n.isHexString=n.getKeys=n.fromAscii=n.fromUtf8=n.toAscii=n.arrayContainsArray=n.getBinarySize=n.padToEven=n.stripHexPrefix=n.isHexPrefixed=void 0,n.isHexPrefixed=t;function s(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}n.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return t(e)?e.slice(2):e},n.padToEven=s,n.getBinarySize=function(t){if("string"!=typeof t)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof t);return e.byteLength(t,"utf8")},n.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===n?"some":"every"]((t=>e.indexOf(t)>=0))},n.toAscii=function(e){let t="",n=0;const s=e.length;for("0x"===e.substring(0,2)&&(n=2);n<s;n+=2){const s=parseInt(e.substr(n,2),16);t+=String.fromCharCode(s)}return t},n.fromUtf8=function(t){return`0x${s(e.from(t,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},n.fromAscii=function(e){let t="";for(let n=0;n<e.length;n++){const s=e.charCodeAt(n).toString(16);t+=s.length<2?`0${s}`:s}return`0x${t}`},n.getKeys=function(e,t,n){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const s=[];for(let r=0;r<e.length;r++){let i=e[r][t];if(!0!==n||i){if("string"!=typeof i)throw new Error("invalid abi - expected type 'string', received "+typeof i)}else i="";s.push(i)}return s},n.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==t&&t>0&&e.length!==2+2*t)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/internal.js"}],[2592,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Lock=void 0;n.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/lock.js"}],[2593,{"micro-ftch":4910},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getProvider=n.fetchFromProvider=void 0;const s=e("micro-ftch");n.fetchFromProvider=async(e,t)=>(await(0,s.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;n.getProvider=e=>{if("string"==typeof e)return e;if(e?.connection?.url!==undefined)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/provider.js"}],[2594,{"./bytes":2586,"./constants":2587,"./helpers":2589,buffer:4074,"ethereum-cryptography/keccak":4300,"ethereum-cryptography/secp256k1":4317},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.hashPersonalMessage=n.isValidSignature=n.fromRpcSig=n.toCompactSig=n.toRpcSig=n.ecrecover=n.ecsign=void 0;const s=e("ethereum-cryptography/keccak"),r=e("ethereum-cryptography/secp256k1"),i=e("./bytes"),a=e("./constants"),o=e("./helpers");function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:t===undefined?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function u(e){return e===BigInt(0)||e===BigInt(1)}n.ecsign=function(e,n,s){const i=r.secp256k1.sign(e,n),a=i.toCompactRawBytes();return{r:t.from(a.slice(0,32)),s:t.from(a.slice(32,64)),v:s===undefined?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(s)*BigInt(2)}};n.ecrecover=function(e,n,s,a,o){const l=t.concat([(0,i.setLengthLeft)(s,32),(0,i.setLengthLeft)(a,32)],64),d=c(n,o);if(!u(d))throw new Error("Invalid signature v value");const m=r.secp256k1.Signature.fromCompact(l).addRecoveryBit(Number(d)).recoverPublicKey(e);return t.from(m.toRawBytes(!1).slice(1))};n.toRpcSig=function(e,n,s,r){if(!u(c(e,r)))throw new Error("Invalid signature v value");return(0,i.bufferToHex)(t.concat([(0,i.setLengthLeft)(n,32),(0,i.setLengthLeft)(s,32),(0,i.toBuffer)(e)]))};n.toCompactSig=function(e,n,s,r){if(!u(c(e,r)))throw new Error("Invalid signature v value");let a=s;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(a=t.from(s),a[0]|=128),(0,i.bufferToHex)(t.concat([(0,i.setLengthLeft)(n,32),(0,i.setLengthLeft)(a,32)]))};n.fromRpcSig=function(e){const t=(0,i.toBuffer)(e);let n,s,r;if(t.length>=65)n=t.slice(0,32),s=t.slice(32,64),r=(0,i.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");n=t.slice(0,32),s=t.slice(32,64),r=BigInt((0,i.bufferToInt)(t.slice(32,33))>>7),s[0]&=127}return r<27&&(r+=BigInt(27)),{v:r,r:n,s:s}};n.isValidSignature=function(e,t,n,s=!0,r){if(32!==t.length||32!==n.length)return!1;if(!u(c(e,r)))return!1;const o=(0,i.bufferToBigInt)(t),l=(0,i.bufferToBigInt)(n);return!(o===BigInt(0)||o>=a.SECP256K1_ORDER||l===BigInt(0)||l>=a.SECP256K1_ORDER)&&!(s&&l>=a.SECP256K1_ORDER_DIV_2)};n.hashPersonalMessage=function(e){(0,o.assertIsBuffer)(e);const n=t.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return t.from((0,s.keccak256)(t.concat([n,e])))}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/signature.js"}],[2595,{"./bytes":2586,"./internal":2591},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.toType=n.TypeOutput=void 0;const s=e("./bytes"),r=e("./internal");var i;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=n.TypeOutput||(n.TypeOutput={})),n.toType=function(e,t){if(null===e)return null;if(e===undefined)return undefined;if("string"==typeof e&&!(0,r.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const n=(0,s.toBuffer)(e);switch(t){case i.Buffer:return n;case i.BigInt:return(0,s.bufferToBigInt)(n);case i.Number:{const e=(0,s.bufferToBigInt)(n);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case i.PrefixedHexString:return(0,s.bufferToHex)(n);default:throw new Error("unknown outputType")}}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/types.js"}],[2596,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.GWEI_TO_WEI=void 0,n.GWEI_TO_WEI=BigInt(1e9)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/units.js"}],[2597,{"./address":2584,"./bytes":2586,"./types":2595,buffer:4074},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.Withdrawal=void 0;const s=e("./address"),r=e("./bytes"),i=e("./types");class a{constructor(e,t,n,s){this.index=e,this.validatorIndex=t,this.address=n,this.amount=s}static fromWithdrawalData(e){const{index:t,validatorIndex:n,address:r,amount:o}=e,c=(0,i.toType)(t,i.TypeOutput.BigInt),u=(0,i.toType)(n,i.TypeOutput.BigInt),l=new s.Address((0,i.toType)(r,i.TypeOutput.Buffer)),d=(0,i.toType)(o,i.TypeOutput.BigInt);return new a(c,u,l,d)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,n,s,r]=e;return a.fromWithdrawalData({index:t,validatorIndex:n,address:s,amount:r})}static toBufferArray(e){const{index:n,validatorIndex:r,address:a,amount:o}=e,c=(0,i.toType)(n,i.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,i.toType)(n,i.TypeOutput.Buffer),u=(0,i.toType)(r,i.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,i.toType)(r,i.TypeOutput.Buffer);let l;l=a instanceof s.Address?a.buf:(0,i.toType)(a,i.TypeOutput.Buffer);return[c,u,l,(0,i.toType)(o,i.TypeOutput.BigInt)===BigInt(0)?t.alloc(0):(0,i.toType)(o,i.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,r.bigIntToHex)(this.index),validatorIndex:(0,r.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,r.bigIntToHex)(this.amount)}}}n.Withdrawal=a}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@ethereumjs/util",file:"node_modules/@metamask/signature-controller/node_modules/@ethereumjs/util/dist/withdrawal.js"}],[2598,{"./errors":2599,"./packer":2602,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.decodeSingle=n.decode=n.encodePacked=n.encodeSingle=n.encode=void 0;const s=e("@metamask/utils"),r=e("./errors"),i=e("./packer");n.encode=(e,t,n,s)=>{try{return(0,i.pack)({types:e,values:t,packed:n,tight:s})}catch(e){if(e instanceof r.ParserError)throw new r.ParserError(`Unable to encode value: ${e.message}`,e);throw new r.ParserError(`An unexpected error occurred: ${(0,r.getErrorMessage)(e)}`,e)}};n.encodeSingle=(e,t)=>(0,n.encode)([e],[t]);n.encodePacked=(e,t,s)=>(0,n.encode)(e,t,!0,s);n.decode=(e,t)=>{const n=(0,s.createBytes)(t);try{return(0,i.unpack)(e,n)}catch(e){if(e instanceof r.ParserError)throw new r.ParserError(`Unable to decode value: ${e.message}`,e);throw new r.ParserError(`An unexpected error occurred: ${(0,r.getErrorMessage)(e)}`,e)}};n.decodeSingle=(e,t)=>{const i=(0,n.decode)([e],t);return(0,s.assert)(1===i.length,new r.ParserError("Decoded value array has unexpected length.")),i[0]}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/abi.js"}],[2599,{"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ParserError=n.getErrorStack=n.getErrorMessage=void 0;const s=e("@metamask/utils");n.getErrorMessage=e=>"string"==typeof e?e:e instanceof Error||(0,s.isObject)(e)&&(0,s.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:"Unknown error.";n.getErrorStack=e=>e instanceof Error?e.stack:undefined;class r extends Error{constructor(e,t){super(e),this.name="ParserError";const s=(0,n.getErrorStack)(t);s&&(this.stack=s)}}n.ParserError=r}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/errors.js"}],[2600,{"./abi":2598,"./errors":2599,"./types":2615},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./abi"),n),r(e("./errors"),n),r(e("./types"),n)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/index.js"}],[2601,{"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.iterate=void 0;const s=e("@metamask/utils");n.iterate=function*(e,t=32){for(let n=0;n<e.length;n+=t){const r=e=>{(0,s.assert)(e>=0,"Cannot skip a negative number of bytes."),(0,s.assert)(e%t==0,"Length must be a multiple of the size."),n+=e},i=e.subarray(n);yield{skip:r,value:i}}return{skip:()=>undefined,value:new Uint8Array}}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/iterator.js"}],[2602,{"./errors":2599,"./iterator":2601,"./parsers":2609,"./utils":2617,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.unpack=n.pack=n.isDynamicParser=n.getParser=void 0;const s=e("@metamask/utils"),r=e("./errors"),i=e("./iterator"),a=e("./parsers"),o=e("./utils");n.getParser=e=>{const t={address:a.address,array:a.array,bool:a.bool,bytes:a.bytes,fixedBytes:a.fixedBytes,function:a.fn,number:a.number,string:a.string,tuple:a.tuple},n=t[e];if(n)return n;const s=Object.values(t).find((t=>t.isType(e)));if(s)return s;throw new r.ParserError(`The type "${e}" is not supported.`)};n.isDynamicParser=(e,t)=>{const{isDynamic:n}=e;return"function"==typeof n?n(t):n};n.pack=({types:e,values:t,packed:i=!1,tight:a=!1,arrayPacked:c=!1,byteArray:u=new Uint8Array})=>{(0,s.assert)(e.length===t.length,new r.ParserError(`The number of types (${e.length}) does not match the number of values (${t.length}).`));const{staticBuffer:l,dynamicBuffer:d,pointers:m}=e.reduce((({staticBuffer:e,dynamicBuffer:r,pointers:o},u,l)=>{const d=(0,n.getParser)(u),m=t[l];if(i||c||!(0,n.isDynamicParser)(d,u))return{staticBuffer:d.encode({buffer:e,value:m,type:u,packed:i,tight:a}),dynamicBuffer:r,pointers:o};return{staticBuffer:(0,s.concatBytes)([e,new Uint8Array(32)]),dynamicBuffer:d.encode({buffer:r,value:m,type:u,packed:i,tight:a}),pointers:[...o,{position:e.length,pointer:r.length}]}}),{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,s.assert)(!i&&!c||0===d.length,new r.ParserError("Invalid pack state."));const p=l.length,h=m.reduce(((e,{pointer:t,position:n})=>{const r=(0,o.padStart)((0,s.numberToBytes)(p+t));return(0,o.set)(e,r,n)}),l);return(0,s.concatBytes)([u,h,d])};n.unpack=(e,t)=>{const a=(0,i.iterate)(t);return e.map((e=>{const{value:{value:i,skip:o},done:c}=a.next();(0,s.assert)(!c,new r.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${e}".`));const u=(0,n.getParser)(e);if((0,n.isDynamicParser)(u,e)){const n=(0,s.bytesToNumber)(i.subarray(0,32)),r=t.subarray(n);return u.decode({type:e,value:r,skip:o})}return u.decode({type:e,value:i,skip:o})}))}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/packer.js"}],[2603,{"../errors":2599,"../utils":2617,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.address=n.getAddress=void 0;const s=e("@metamask/utils"),r=e("../errors"),i=e("../utils");n.getAddress=e=>{const t=(0,s.createBytes)(e);return(0,s.assert)(t.length<=20,new r.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${t.length} bytes.`)),(0,i.padStart)(t,20)},n.address={isDynamic:!1,isType:e=>"address"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:r}){const a=(0,n.getAddress)(t);if(r)return(0,s.concatBytes)([e,a]);const o=(0,i.padStart)(a);return(0,s.concatBytes)([e,o])},decode:({value:e})=>(0,s.add0x)((0,s.bytesToHex)(e.slice(12,32)))}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/address.js"}],[2604,{"../errors":2599,"../packer":2602,"../utils":2617,"./fixed-bytes":2607,"./tuple":2613,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.array=n.getTupleType=n.getArrayType=n.isArrayType=void 0;const s=e("@metamask/utils"),r=e("../errors"),i=e("../packer"),a=e("../utils"),o=e("./fixed-bytes"),c=e("./tuple"),u=/^(?<type>.*)\[(?<length>\d*?)\]$/u;n.isArrayType=e=>u.test(e);n.getArrayType=e=>{const t=e.match(u);return(0,s.assert)(t?.groups?.type,new r.ParserError(`Invalid array type. Expected an array type, but received "${e}".`)),[t.groups.type,t.groups.length?parseInt(t.groups.length,10):undefined]};n.getTupleType=(e,t)=>`(${new Array(t).fill(e).join(",")})`,n.array={isDynamic(e){const[t,s]=(0,n.getArrayType)(e);return s===undefined||(0,i.isDynamicParser)((0,i.getParser)(t),t)},isType:e=>(0,n.isArrayType)(e),getByteLength(e){(0,s.assert)((0,n.isArrayType)(e),new r.ParserError(`Expected an array type, but received "${e}".`));const[t,a]=(0,n.getArrayType)(e);return(0,i.isDynamicParser)(this,e)||a===undefined?32:c.tuple.getByteLength((0,n.getTupleType)(t,a))},encode({type:e,buffer:t,value:u,packed:l,tight:d}){const[m,p]=(0,n.getArrayType)(e);if((0,s.assert)(!l||!(0,n.isArrayType)(m),new r.ParserError("Cannot pack nested arrays.")),l&&(0,i.isDynamicParser)((0,i.getParser)(m),m))return(0,i.pack)({types:new Array(u.length).fill(m),values:u,byteArray:t,packed:l,arrayPacked:!0,tight:d});if(p)return(0,s.assert)(p===u.length,new r.ParserError(`Array length does not match type length. Expected a length of ${p}, but received ${u.length}.`)),c.tuple.encode({type:(0,n.getTupleType)(m,p),buffer:t,value:u,packed:o.fixedBytes.isType(m)&&d,tight:d});if(l)return(0,i.pack)({types:new Array(u.length).fill(m),values:u,byteArray:t,packed:o.fixedBytes.isType(m)&&d,arrayPacked:!0,tight:d});const h=(0,a.padStart)((0,s.numberToBytes)(u.length));return(0,i.pack)({types:new Array(u.length).fill(m),values:u,byteArray:(0,s.concatBytes)([t,h]),packed:l,tight:d})},decode({type:e,value:t,...a}){const[o,u]=(0,n.getArrayType)(e);if(u){const e=c.tuple.decode({type:(0,n.getTupleType)(o,u),value:t,...a});return(0,s.assert)(e.length===u,new r.ParserError(`Array length does not match type length. Expected a length of ${u}, but received ${e.length}.`)),e}const l=(0,s.bytesToNumber)(t.subarray(0,32));return(0,i.unpack)(new Array(l).fill(o),t.subarray(32))}}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/array.js"}],[2605,{"../errors":2599,"./number":2610,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.bool=n.getBooleanValue=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils"),i=e("../errors"),a=e("./number"),o=(0,s.coerce)((0,s.boolean)(),(0,s.union)([(0,s.literal)("true"),(0,s.literal)("false")]),(e=>"true"===e));n.getBooleanValue=e=>{try{return(0,s.create)(e,o)?BigInt(1):BigInt(0)}catch{throw new i.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${e}".`)}},n.bool={isDynamic:!1,isType:e=>"bool"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:s,tight:i}){const o=(0,n.getBooleanValue)(t);return s?(0,r.concatBytes)([e,(0,r.bigIntToBytes)(o)]):a.number.encode({type:"uint256",buffer:e,value:o,packed:s,tight:i})},decode:e=>a.number.decode({...e,type:"uint256"})===BigInt(1)}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/bool.js"}],[2606,{"../utils":2617,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.bytes=void 0;const s=e("@metamask/utils"),r=e("../utils");n.bytes={isDynamic:!0,isType:e=>"bytes"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:n}){const i=(0,s.createBytes)(t);if(n)return(0,s.concatBytes)([e,i]);const a=32*Math.ceil(i.byteLength/32);return(0,s.concatBytes)([e,(0,r.padStart)((0,s.numberToBytes)(i.byteLength)),(0,r.padEnd)(i,a)])},decode({value:e}){const t=e.subarray(0,32),n=(0,s.bytesToNumber)(t);return e.slice(32,32+n)}}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/bytes.js"}],[2607,{"../errors":2599,"../utils":2617,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.fixedBytes=n.getByteLength=void 0;const s=e("@metamask/utils"),r=e("../errors"),i=e("../utils"),a=/^bytes([0-9]{1,2})$/u;n.getByteLength=e=>{const t=e.match(a)?.[1];(0,s.assert)(t,`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`);const n=Number(t);return(0,s.assert)(n>0&&n<=32,new r.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`)),n},n.fixedBytes={isDynamic:!1,isType:e=>a.test(e),getByteLength:()=>32,encode({type:e,buffer:t,value:a,packed:o}){const c=(0,n.getByteLength)(e),u=(0,s.createBytes)(a);return(0,s.assert)(u.length<=c,new r.ParserError(`Expected a value of length ${c}, but received a value of length ${u.length}.`)),o?(0,s.concatBytes)([t,(0,i.padEnd)(u,c)]):(0,s.concatBytes)([t,(0,i.padEnd)(u)])},decode({type:e,value:t}){const s=(0,n.getByteLength)(e);return t.slice(0,s)}}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/fixed-bytes.js"}],[2608,{"../errors":2599,"./fixed-bytes":2607,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.fn=n.getFunction=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils"),i=e("../errors"),a=e("./fixed-bytes"),o=(0,s.coerce)((0,s.object)({address:r.StrictHexStruct,selector:r.StrictHexStruct}),(0,s.union)([r.StrictHexStruct,(0,s.instance)(Uint8Array)]),(e=>{const t=(0,r.createBytes)(e);return(0,r.assert)(24===t.length,new i.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${t.length} bytes.`)),{address:(0,r.bytesToHex)(t.subarray(0,20)),selector:(0,r.bytesToHex)(t.subarray(20,24))}}));n.getFunction=e=>{const t=(0,s.create)(e,o);return(0,r.concatBytes)([(0,r.hexToBytes)(t.address),(0,r.hexToBytes)(t.selector)])},n.fn={isDynamic:!1,isType:e=>"function"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:s,tight:r}){const i=(0,n.getFunction)(t);return a.fixedBytes.encode({type:"bytes24",buffer:e,value:i,packed:s,tight:r})},decode:({value:e})=>({address:(0,r.bytesToHex)(e.slice(0,20)),selector:(0,r.bytesToHex)(e.slice(20,24))})}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/function.js"}],[2609,{"./address":2603,"./array":2604,"./bool":2605,"./bytes":2606,"./fixed-bytes":2607,"./function":2608,"./number":2610,"./parser":2611,"./string":2612,"./tuple":2613},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./address"),n),r(e("./array"),n),r(e("./bool"),n),r(e("./bytes"),n),r(e("./fixed-bytes"),n),r(e("./function"),n),r(e("./number"),n),r(e("./parser"),n),r(e("./string"),n),r(e("./tuple"),n)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/index.js"}],[2610,{"../errors":2599,"../utils":2617,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.number=n.getBigInt=n.assertNumberLength=n.getLength=n.isSigned=void 0;const s=e("@metamask/utils"),r=e("../errors"),i=e("../utils"),a=/^u?int(?<length>[0-9]*)?$/u;n.isSigned=e=>!e.startsWith("u");n.getLength=e=>{if("int"===e||"uint"===e)return 256;const t=e.match(a);(0,s.assert)(t?.groups?.length,new r.ParserError(`Invalid number type. Expected a number type, but received "${e}".`));const n=parseInt(t.groups.length,10);return(0,s.assert)(n>=8&&n<=256,new r.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${e}".`)),(0,s.assert)(n%8==0,new r.ParserError(`Invalid number length. Expected a multiple of 8, but received "${e}".`)),n};n.assertNumberLength=(e,t)=>{const i=(0,n.getLength)(t),a=BigInt(2)**BigInt(i-((0,n.isSigned)(t)?1:0))-BigInt(1);(0,n.isSigned)(t)?(0,s.assert)(e>=-(a+BigInt(1))&&e<=a,new r.ParserError(`Number "${e}" is out of range for type "${t}".`)):(0,s.assert)(e<=a,new r.ParserError(`Number "${e}" is out of range for type "${t}".`))};n.getBigInt=e=>{try{return(0,s.createBigInt)(e)}catch{throw new r.ParserError(`Invalid number. Expected a valid number value, but received "${e}".`)}},n.number={isDynamic:!1,isType:e=>a.test(e),getByteLength:()=>32,encode({type:e,buffer:t,value:r,packed:a}){const o=(0,n.getBigInt)(r);if((0,n.assertNumberLength)(o,e),(0,n.isSigned)(e)){if(a){const r=(0,n.getLength)(e)/8;return(0,s.concatBytes)([t,(0,s.signedBigIntToBytes)(o,r)])}return(0,s.concatBytes)([t,(0,i.padStart)((0,s.signedBigIntToBytes)(o,32))])}if(a){const r=(0,n.getLength)(e)/8;return(0,s.concatBytes)([t,(0,i.padStart)((0,s.bigIntToBytes)(o),r)])}return(0,s.concatBytes)([t,(0,i.padStart)((0,s.bigIntToBytes)(o))])},decode({type:e,value:t}){const r=t.subarray(0,32);if((0,n.isSigned)(e)){const t=(0,s.bytesToSignedBigInt)(r);return(0,n.assertNumberLength)(t,e),t}const i=(0,s.bytesToBigInt)(r);return(0,n.assertNumberLength)(i,e),i}}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/number.js"}],[2611,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/parser.js"}],[2612,{"./bytes":2606,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.string=void 0;const s=e("@metamask/utils"),r=e("./bytes");n.string={isDynamic:!0,isType:e=>"string"===e,getByteLength:()=>32,encode:({buffer:e,value:t,packed:n,tight:i})=>r.bytes.encode({type:"bytes",buffer:e,value:(0,s.stringToBytes)(t),packed:n,tight:i}),decode:e=>(0,s.bytesToString)(r.bytes.decode(e))}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/string.js"}],[2613,{"../errors":2599,"../packer":2602,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.tuple=n.getTupleElements=void 0;const s=e("@metamask/utils"),r=e("../errors"),i=e("../packer"),a=/^\((.+)\)$/u;n.getTupleElements=e=>{(0,s.assert)(e.startsWith("(")&&e.endsWith(")"),new r.ParserError(`Invalid tuple type. Expected tuple type, but received "${e}".`));const t=[];let n="",i=0;for(let s=1;s<e.length-1;s++){const r=e[s];","===r&&0===i?(t.push(n.trim()),n=""):(n+=r,"("===r?i+=1:")"===r&&(i-=1))}return n.trim()&&t.push(n.trim()),t},n.tuple={isDynamic:e=>(0,n.getTupleElements)(e).some((e=>{const t=(0,i.getParser)(e);return(0,i.isDynamicParser)(t,e)})),isType:e=>(e=>a.test(e))(e),getByteLength(e){if((0,i.isDynamicParser)(this,e))return 32;return(0,n.getTupleElements)(e).reduce(((e,t)=>e+(0,i.getParser)(t).getByteLength(t)),0)},encode({type:e,buffer:t,value:s,packed:r,tight:a}){const o=(0,n.getTupleElements)(e);return(0,i.pack)({types:o,values:s,byteArray:t,packed:r,tight:a})},decode({type:e,value:t,skip:s}){const r=(0,n.getTupleElements)(e);return s(this.getByteLength(e)-32),(0,i.unpack)(r,t)}}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/parsers/tuple.js"}],[2614,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/types/abi.js"}],[2615,{"./abi":2614},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./abi"),n)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/types/index.js"}],[2616,{"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.padEnd=n.padStart=n.set=void 0;const s=e("@metamask/utils");n.set=(e,t,n)=>(0,s.concatBytes)([e.subarray(0,n),t,e.subarray(n+t.length)]);n.padStart=(e,t=32)=>{const n=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,s.concatBytes)([n,e])};n.padEnd=(e,t=32)=>{const n=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,s.concatBytes)([e,n])}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/utils/buffer.js"}],[2617,{"./buffer":2616},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./buffer"),n)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/abi-utils/dist/utils/index.js"}],[2618,{"./utils":2623,"@scure/base":3027,buffer:4074,tweetnacl:5616},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=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)&&s(t,e,n);return r(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.getEncryptionPublicKey=n.decryptSafely=n.decrypt=n.encryptSafely=n.encrypt=void 0;const a=e("@scure/base"),o=i(e("tweetnacl")),c=e("./utils");function u({publicKey:e,data:t,version:n}){if((0,c.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,c.isNullish)(t))throw new Error("Missing data parameter");if((0,c.isNullish)(n))throw new Error("Missing version parameter");if("x25519-xsalsa20-poly1305"===n){if("string"!=typeof t)throw new Error("Message data must be given as a string");const n=o.box.keyPair();let s;try{s=a.base64.decode(e)}catch(e){throw new Error("Bad public key")}const r=a.utf8.decode(t),i=o.randomBytes(o.box.nonceLength),c=o.box(r,i,s,n.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:a.base64.encode(i),ephemPublicKey:a.base64.encode(n.publicKey),ciphertext:a.base64.encode(c)}}throw new Error("Encryption type/version not supported")}function l({encryptedData:e,privateKey:n}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(n))throw new Error("Missing privateKey parameter");if("x25519-xsalsa20-poly1305"===e.version){const s=t.from(n,"hex"),r=o.box.keyPair.fromSecretKey(s).secretKey,i=a.base64.decode(e.nonce),c=a.base64.decode(e.ciphertext),u=a.base64.decode(e.ephemPublicKey),l=o.box.open(c,i,u,r);try{if(!l)throw new Error;const e=a.utf8.encode(l);if(!e)throw new Error;return e}catch(e){if(e&&"string"==typeof e.message&&e.message.length)throw new Error(`Decryption failed: ${e.message}`);throw new Error("Decryption failed.")}}throw new Error("Encryption type/version not supported.")}n.encrypt=u,n.encryptSafely=function({publicKey:e,data:n,version:s}){if((0,c.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,c.isNullish)(n))throw new Error("Missing data parameter");if((0,c.isNullish)(s))throw new Error("Missing version parameter");if("object"==typeof n&&n&&"toJSON"in n)throw new Error("Cannot encrypt with toJSON property. Please remove toJSON property");const r={data:n,padding:""},i=t.byteLength(JSON.stringify(r),"utf-8")%2048;let a=0;return i>0&&(a=2048-i-16),r.padding="0".repeat(a),u({publicKey:e,data:JSON.stringify(r),version:s})},n.decrypt=l,n.decryptSafely=function({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");return JSON.parse(l({encryptedData:e,privateKey:t})).data},n.getEncryptionPublicKey=function(e){const n=t.from(e,"hex"),s=o.box.keyPair.fromSecretKey(n).publicKey;return a.base64.encode(s)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/eth-sig-util/dist/encryption.js"}],[2619,{"./encryption":2618,"./personal-sign":2620,"./sign-eip7702-authorization":2621,"./sign-typed-data":2622,"./utils":2623},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.normalize=n.concatSig=void 0,r(e("./personal-sign"),n),r(e("./sign-typed-data"),n),r(e("./encryption"),n),r(e("./sign-eip7702-authorization"),n);var i=e("./utils");Object.defineProperty(n,"concatSig",{enumerable:!0,get:function(){return i.concatSig}}),Object.defineProperty(n,"normalize",{enumerable:!0,get:function(){return i.normalize}})}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/eth-sig-util/dist/index.js"}],[2620,{"./utils":2623,"@ethereumjs/util":2590},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.extractPublicKey=n.recoverPersonalSignature=n.personalSign=void 0;const s=e("@ethereumjs/util"),r=e("./utils");function i(e,t){const n=(0,s.hashPersonalMessage)((0,r.legacyToBuffer)(e));return(0,r.recoverPublicKey)(n,t)}n.personalSign=function({privateKey:e,data:t}){if((0,r.isNullish)(t))throw new Error("Missing data parameter");if((0,r.isNullish)(e))throw new Error("Missing privateKey parameter");const n=(0,r.legacyToBuffer)(t),i=(0,s.hashPersonalMessage)(n),a=(0,s.ecsign)(i,e);return(0,r.concatSig)((0,s.toBuffer)(a.v),a.r,a.s)},n.recoverPersonalSignature=function({data:e,signature:t}){if((0,r.isNullish)(e))throw new Error("Missing data parameter");if((0,r.isNullish)(t))throw new Error("Missing signature parameter");const n=i(e,t),a=(0,s.publicToAddress)(n);return(0,s.bufferToHex)(a)},n.extractPublicKey=function({data:e,signature:t}){if((0,r.isNullish)(e))throw new Error("Missing data parameter");if((0,r.isNullish)(t))throw new Error("Missing signature parameter");return`0x${i(e,t).toString("hex")}`}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/eth-sig-util/dist/personal-sign.js"}],[2621,{"./utils":2623,"@ethereumjs/rlp":429,"@ethereumjs/util":2590,"@metamask/utils":2950,buffer:4074,"ethereum-cryptography/keccak":4300},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.hashEIP7702Authorization=n.recoverEIP7702Authorization=n.signEIP7702Authorization=void 0;const s=e("@ethereumjs/rlp"),r=e("@ethereumjs/util"),i=e("@metamask/utils"),a=e("ethereum-cryptography/keccak"),o=e("./utils");function c(e){u(e);const n=(0,s.encode)(e),r=t.concat([t.from("05","hex"),n]);return t.from((0,a.keccak256)(r))}function u(e){if((0,o.isNullish)(e))throw new Error("Missing authorization parameter");const[t,n,s]=e;if((0,o.isNullish)(t))throw new Error("Missing chainId parameter");if((0,o.isNullish)(n))throw new Error("Missing contractAddress parameter");if((0,o.isNullish)(s))throw new Error("Missing nonce parameter")}n.signEIP7702Authorization=function({privateKey:e,authorization:t}){if(u(t),(0,o.isNullish)(e))throw new Error("Missing privateKey parameter");const n=c(t),{r:s,s:i,v:a}=(0,r.ecsign)(n,e),l=(0,r.toBuffer)(a);return(0,o.concatSig)(l,s,i)},n.recoverEIP7702Authorization=function({signature:e,authorization:t}){if(u(t),(0,o.isNullish)(e))throw new Error("Missing signature parameter");const n=c(t),s=(0,o.recoverPublicKey)(n,e),a=(0,r.publicToAddress)(s);return(0,i.bytesToHex)(a)},n.hashEIP7702Authorization=c}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/eth-sig-util/dist/sign-eip7702-authorization.js"}],[2622,{"./utils":2623,"@ethereumjs/util":2590,"@metamask/abi-utils":2600,"@metamask/abi-utils/dist/parsers":2609,"@metamask/abi-utils/dist/utils":2617,"@metamask/utils":2950,"ethereum-cryptography/keccak":4300},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.recoverTypedSignature=n.signTypedData=n.typedSignatureHash=n.TypedDataUtils=n.TYPED_MESSAGE_SCHEMA=n.SignTypedDataVersion=void 0;const s=e("@ethereumjs/util"),r=e("@metamask/abi-utils"),i=e("@metamask/abi-utils/dist/parsers"),a=e("@metamask/abi-utils/dist/utils"),o=e("@metamask/utils"),c=e("ethereum-cryptography/keccak"),u=e("./utils");var l;function d(e,t){if(!Object.keys(l).includes(e))throw new Error(`Invalid version: '${e}'`);if(t&&!t.includes(e))throw new Error(`SignTypedDataVersion not allowed: '${e}'. Allowed versions are: ${t.join(", ")}`)}function m(e,t){(0,o.assert)(null!==t,`Unable to encode value: Invalid number. Expected a valid number value, but received "${t}".`);const n=BigInt(t),s=(0,i.getLength)(e),r=BigInt(2)**BigInt(s)-BigInt(1);return(0,o.assert)(n>=-r&&n<=r,`Unable to encode value: Number "${t}" is out of range for type "${e}".`),n}function p(e){let t=BigInt(0);for(let n=0;n<e.length;n++){const s=BigInt(e.charCodeAt(n)-48);t*=BigInt(10),t+=s>=49?s-BigInt(49)+BigInt(10):s>=17?s-BigInt(17)+BigInt(10):s}return(0,a.padStart)((0,o.bigIntToBytes)(t),20)}function h(e,t,n,i,u){if(d(u,[l.V3,l.V4]),e[n]!==undefined)return["bytes32",u===l.V4&&null==i?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,s.arrToBufArr)((0,c.keccak256)(f(n,i,e,u)))];if("function"===n)throw new Error('Unsupported or invalid type: "function"');if(i===undefined)throw new Error(`missing value for field ${t} of type ${n}`);if("address"===n){if("number"==typeof i)return["address",(0,a.padStart)((0,o.numberToBytes)(i),20)];if((0,o.isStrictHexString)(i))return["address",(0,o.add0x)(i)];if("string"==typeof i)return["address",p(i).subarray(0,20)]}if("bool"===n)return["bool",Boolean(i)];if("bytes"===n)return"number"==typeof i?i=(0,o.numberToBytes)(i):(0,o.isStrictHexString)(i)||"0x"===i?i=(0,o.hexToBytes)(i):"string"==typeof i&&(i=(0,o.stringToBytes)(i)),["bytes32",(0,s.arrToBufArr)((0,c.keccak256)(i))];if(n.startsWith("bytes")&&"bytes"!==n&&!n.includes("["))return"number"==typeof i?i<0?["bytes32",new Uint8Array(32)]:["bytes32",(0,o.bigIntToBytes)(BigInt(i))]:(0,o.isStrictHexString)(i)?["bytes32",(0,o.hexToBytes)(i)]:["bytes32",i];if(n.startsWith("int")&&!n.includes("[")){const e=m(n,i);return e>=BigInt(0)?["uint256",e]:["int256",e]}if("string"===n)return i="number"==typeof i?(0,o.numberToBytes)(i):(0,o.stringToBytes)(null!=i?i:""),["bytes32",(0,s.arrToBufArr)((0,c.keccak256)(i))];if(n.endsWith("]")){if(u===l.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");const a=n.slice(0,n.lastIndexOf("[")),o=i.map((n=>h(e,t,a,n,u)));return["bytes32",(0,s.arrToBufArr)((0,c.keccak256)((0,r.encode)(o.map((([e])=>e)),o.map((([,e])=>e)))))]}return[n,i]}function f(e,t,n,i){d(i,[l.V3,l.V4]);const a=["bytes32"],o=[x(e,n)];for(const s of n[e]){if(i===l.V3&&t[s.name]===undefined)continue;const[e,r]=h(n,s.name,s.type,t[s.name],i);a.push(e),o.push(r)}return(0,s.arrToBufArr)((0,r.encode)(a,o))}function g(e,t){let n="";const s=y(e,t);s.delete(e);const r=[e,...Array.from(s).sort()];for(const e of r){if(!t[e])throw new Error(`No type definition specified: ${e}`);n+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`}return n}function y(e,t,n=new Set){if("string"!=typeof e)throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(e)}`);const s=e.match(/^\w*/u);if([e]=s,n.has(e)||t[e]===undefined)return n;n.add(e);for(const s of t[e])y(s.type,t,n);return n}function b(e,t,n,r){d(r,[l.V3,l.V4]);const i=f(e,t,n,r),a=(0,c.keccak256)(i);return(0,s.arrToBufArr)(a)}function x(e,t){const n=(0,o.stringToBytes)(g(e,t));return(0,s.arrToBufArr)((0,c.keccak256)(n))}function S(e){const t={};for(const s in n.TYPED_MESSAGE_SCHEMA.properties)e[s]&&(t[s]=e[s]);return"types"in t&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t}function k(e,t){d(t,[l.V3,l.V4]);const n=S(e),{domain:s}=n;return b("EIP712Domain",s,{EIP712Domain:n.types.EIP712Domain},t)}function v(e,t){if((0,i.isArrayType)(e)&&Array.isArray(t)){const[n]=(0,i.getArrayType)(e);return t.map((e=>v(n,e)))}if("address"===e){if((0,o.isStrictHexString)(t))return(0,a.padStart)((0,o.hexToBytes)(t).subarray(0,20),20);if(t instanceof Uint8Array)return(0,a.padStart)(t.subarray(0,20),20)}if("bool"===e)return Boolean(t);if(e.startsWith("bytes")&&"bytes"!==e){const n=(0,i.getByteLength)(e);if("number"==typeof t)return t<0?new Uint8Array:(0,o.numberToBytes)(t).subarray(0,n);if((0,o.isStrictHexString)(t))return(0,o.hexToBytes)(t).subarray(0,n);if(t instanceof Uint8Array)return t.subarray(0,n)}if(e.startsWith("uint")&&"number"==typeof t)return Math.abs(t);if(e.startsWith("int")&&"number"==typeof t){const n=(0,i.getLength)(e);return BigInt.asIntN(n,BigInt(t))}return t}function w(e,t){return t.map((t=>{if("string"==typeof t||"number"==typeof t||"bigint"==typeof t){const n=m(e,t);if(n>=BigInt(0))return(0,a.padStart)((0,o.bigIntToBytes)(n),32);const s=(0,i.getLength)(e),r=BigInt.asIntN(s,n);return(0,o.signedBigIntToBytes)(r,32)}return t}))}function T(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const n=e.map((({name:e,type:t,value:n})=>{if("address[]"===t)return{name:e,type:"bytes32[]",value:(s=n,s.map((e=>"number"==typeof e?(0,a.padStart)((0,o.numberToBytes)(e),32):(0,o.isStrictHexString)(e)?(0,a.padStart)((0,o.hexToBytes)(e).subarray(0,32),32):e instanceof Uint8Array?(0,a.padStart)(e.subarray(0,32),32):e)))};var s;if(t.startsWith("int")&&(0,i.isArrayType)(t)){const[s,r]=(0,i.getArrayType)(t);return{name:e,type:`bytes32[${null!=r?r:""}]`,value:w(s,n)}}return{name:e,type:t,value:v(t,n)}})),l=n.map((e=>"bytes"!==e.type?e.value:(0,u.legacyToBuffer)(e.value))),d=n.map((e=>{if("function"===e.type)throw new Error('Unsupported or invalid type: "function"');return e.type})),m=e.map((e=>{if(!e.name)throw t;return`${e.type} ${e.name}`}));return(0,s.arrToBufArr)((0,c.keccak256)((0,r.encodePacked)(["bytes32","bytes32"],[(0,c.keccak256)((0,r.encodePacked)(["string[]"],[m],!0)),(0,c.keccak256)((0,r.encodePacked)(d,l,!0))])))}!function(e){e.V1="V1",e.V3="V3",e.V4="V4"}(l=n.SignTypedDataVersion||(n.SignTypedDataVersion={})),n.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},n.TypedDataUtils={encodeData:f,encodeType:g,findTypeDependencies:y,hashStruct:b,hashType:x,sanitizeData:S,eip712Hash:function(e,t){d(t,[l.V3,l.V4]);const n=S(e),r=[(0,o.hexToBytes)("1901")];return r.push(k(e,t)),"EIP712Domain"!==n.primaryType&&r.push(b(n.primaryType,n.message,n.types,t)),(0,s.arrToBufArr)((0,c.keccak256)((0,o.concatBytes)(r)))},eip712DomainHash:k},n.typedSignatureHash=function(e){const t=T(e);return(0,o.bytesToHex)(t)},n.signTypedData=function({privateKey:e,data:t,version:r}){if(d(r),(0,u.isNullish)(t))throw new Error("Missing data parameter");if((0,u.isNullish)(e))throw new Error("Missing private key parameter");const i=r===l.V1?T(t):n.TypedDataUtils.eip712Hash(t,r),a=(0,s.ecsign)(i,e);return(0,u.concatSig)((0,s.arrToBufArr)((0,o.bigIntToBytes)(a.v)),a.r,a.s)},n.recoverTypedSignature=function({data:e,signature:t,version:r}){if(d(r),(0,u.isNullish)(e))throw new Error("Missing data parameter");if((0,u.isNullish)(t))throw new Error("Missing signature parameter");const i=r===l.V1?T(e):n.TypedDataUtils.eip712Hash(e,r),a=(0,u.recoverPublicKey)(i,t),c=(0,s.publicToAddress)(a);return(0,o.bytesToHex)(c)}}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/eth-sig-util/dist/sign-typed-data.js"}],[2623,{"@ethereumjs/util":2590,"@metamask/utils":2950,buffer:4074},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){(function(t){(function(){Object.defineProperty(n,"__esModule",{value:!0}),n.normalize=n.recoverPublicKey=n.concatSig=n.legacyToBuffer=n.isNullish=n.padWithZeroes=void 0;const s=e("@ethereumjs/util"),r=e("@metamask/utils");function i(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw new Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw new Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}function a(e){return null===e||e===undefined}n.padWithZeroes=i,n.isNullish=a,n.legacyToBuffer=function(e){return"string"!=typeof e||(0,s.isHexString)(e)?(0,s.toBuffer)(e):t.from(e)},n.concatSig=function(e,t,n){const a=(0,s.fromSigned)(t),o=(0,s.fromSigned)(n),c=(0,s.bufferToInt)(e),u=i((0,s.toUnsigned)(a).toString("hex"),64),l=i((0,s.toUnsigned)(o).toString("hex"),64),d=(0,r.remove0x)((0,r.numberToHex)(c));return(0,r.add0x)(u.concat(l,d))},n.recoverPublicKey=function(e,t){const n=(0,s.fromRpcSig)(t);return(0,s.ecrecover)(e,n.v,n.r,n.s)},n.normalize=function(e){if(a(e))return undefined;if("number"==typeof e){if(e<0)return"0x";const t=(0,r.numberToBytes)(e);e=(0,r.bytesToHex)(t)}if("string"!=typeof e){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof e}: ${e}`,new Error(t)}return(0,r.add0x)(e.toLowerCase())}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/signature-controller>@metamask/eth-sig-util",file:"node_modules/@metamask/signature-controller/node_modules/@metamask/eth-sig-util/dist/utils.js"}],[2624,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){t.exports={0:{index:"0",hex:"0x80000000",symbol:"BTC",name:"Bitcoin"},1:{index:"1",hex:"0x80000001",symbol:"",name:"Testnet (all coins)"},2:{index:"2",hex:"0x80000002",symbol:"LTC",name:"Litecoin"},3:{index:"3",hex:"0x80000003",symbol:"DOGE",name:"Dogecoin"},4:{index:"4",hex:"0x80000004",symbol:"RDD",name:"Reddcoin"},5:{index:"5",hex:"0x80000005",symbol:"DASH",name:"Dash"},6:{index:"6",hex:"0x80000006",symbol:"PPC",name:"Peercoin"},7:{index:"7",hex:"0x80000007",symbol:"NMC",name:"Namecoin"},8:{index:"8",hex:"0x80000008",symbol:"FTC",name:"Feathercoin"},9:{index:"9",hex:"0x80000009",symbol:"XCP",name:"Counterparty"},10:{index:"10",hex:"0x8000000a",symbol:"BLK",name:"Blackcoin"},11:{index:"11",hex:"0x8000000b",symbol:"NSR",name:"NuShares"},12:{index:"12",hex:"0x8000000c",symbol:"NBT",name:"NuBits"},13:{index:"13",hex:"0x8000000d",symbol:"MZC",name:"Mazacoin"},14:{index:"14",hex:"0x8000000e",symbol:"VIA",name:"Viacoin"},15:{index:"15",hex:"0x8000000f",symbol:"XCH",name:"ClearingHouse"},16:{index:"16",hex:"0x80000010",symbol:"RBY",name:"Rubycoin"},17:{index:"17",hex:"0x80000011",symbol:"GRS",name:"Groestlcoin"},18:{index:"18",hex:"0x80000012",symbol:"DGC",name:"Digitalcoin"},19:{index:"19",hex:"0x80000013",symbol:"CCN",name:"Cannacoin"},20:{index:"20",hex:"0x80000014",symbol:"DGB",name:"DigiByte"},21:{index:"21",hex:"0x80000015",symbol:"",name:"Open Assets"},22:{index:"22",hex:"0x80000016",symbol:"MONA",name:"Monacoin"},23:{index:"23",hex:"0x80000017",symbol:"CLAM",name:"Clams"},24:{index:"24",hex:"0x80000018",symbol:"XPM",name:"Primecoin"},25:{index:"25",hex:"0x80000019",symbol:"NEOS",name:"Neoscoin"},26:{index:"26",hex:"0x8000001a",symbol:"JBS",name:"Jumbucks"},27:{index:"27",hex:"0x8000001b",symbol:"ZRC",name:"ziftrCOIN"},28:{index:"28",hex:"0x8000001c",symbol:"VTC",name:"Vertcoin"},29:{index:"29",hex:"0x8000001d",symbol:"NXT",name:"NXT"},30:{index:"30",hex:"0x8000001e",symbol:"BURST",name:"Burst"},31:{index:"31",hex:"0x8000001f",symbol:"MUE",name:"MonetaryUnit"},32:{index:"32",hex:"0x80000020",symbol:"ZOOM",name:"Zoom"},33:{index:"33",hex:"0x80000021",symbol:"VASH",name:"Virtual Cash"},34:{index:"34",hex:"0x80000022",symbol:"CDN",name:"Canada eCoin"},35:{index:"35",hex:"0x80000023",symbol:"SDC",name:"ShadowCash"},36:{index:"36",hex:"0x80000024",symbol:"PKB",name:"ParkByte"},37:{index:"37",hex:"0x80000025",symbol:"PND",name:"Pandacoin"},38:{index:"38",hex:"0x80000026",symbol:"START",name:"StartCOIN"},39:{index:"39",hex:"0x80000027",symbol:"MOIN",name:"MOIN"},40:{index:"40",hex:"0x80000028",symbol:"EXP",name:"Expanse"},41:{index:"41",hex:"0x80000029",symbol:"EMC2",name:"Einsteinium"},42:{index:"42",hex:"0x8000002a",symbol:"DCR",name:"Decred"},43:{index:"43",hex:"0x8000002b",symbol:"XEM",name:"NEM"},44:{index:"44",hex:"0x8000002c",symbol:"PART",name:"Particl"},45:{index:"45",hex:"0x8000002d",symbol:"ARG",name:"Argentum (dead)"},46:{index:"46",hex:"0x8000002e",symbol:"",name:"Libertas"},47:{index:"47",hex:"0x8000002f",symbol:"",name:"Posw coin"},48:{index:"48",hex:"0x80000030",symbol:"SHR",name:"Shreeji"},49:{index:"49",hex:"0x80000031",symbol:"GCR",name:"Global Currency Reserve (GCRcoin)"},50:{index:"50",hex:"0x80000032",symbol:"NVC",name:"Novacoin"},51:{index:"51",hex:"0x80000033",symbol:"AC",name:"Asiacoin"},52:{index:"52",hex:"0x80000034",symbol:"BTCD",name:"BitcoinDark"},53:{index:"53",hex:"0x80000035",symbol:"DOPE",name:"Dopecoin"},54:{index:"54",hex:"0x80000036",symbol:"TPC",name:"Templecoin"},55:{index:"55",hex:"0x80000037",symbol:"AIB",name:"AIB"},56:{index:"56",hex:"0x80000038",symbol:"EDRC",name:"EDRCoin"},57:{index:"57",hex:"0x80000039",symbol:"SYS",name:"Syscoin"},58:{index:"58",hex:"0x8000003a",symbol:"SLR",name:"Solarcoin"},59:{index:"59",hex:"0x8000003b",symbol:"SMLY",name:"Smileycoin"},60:{index:"60",hex:"0x8000003c",symbol:"ETH",name:"Ethereum"},61:{index:"61",hex:"0x8000003d",symbol:"ETC",name:"Ether Classic"},62:{index:"62",hex:"0x8000003e",symbol:"PSB",name:"Pesobit"},63:{index:"63",hex:"0x8000003f",symbol:"LDCN",name:"Landcoin (dead)"},64:{index:"64",hex:"0x80000040",symbol:"",name:"Open Chain"},65:{index:"65",hex:"0x80000041",symbol:"XBC",name:"Bitcoinplus"},66:{index:"66",hex:"0x80000042",symbol:"IOP",name:"Internet of People"},67:{index:"67",hex:"0x80000043",symbol:"NXS",name:"Nexus"},68:{index:"68",hex:"0x80000044",symbol:"INSN",name:"InsaneCoin"},69:{index:"69",hex:"0x80000045",symbol:"OK",name:"OKCash"},70:{index:"70",hex:"0x80000046",symbol:"BRIT",name:"BritCoin"},71:{index:"71",hex:"0x80000047",symbol:"CMP",name:"Compcoin"},72:{index:"72",hex:"0x80000048",symbol:"CRW",name:"Crown"},73:{index:"73",hex:"0x80000049",symbol:"BELA",name:"BelaCoin"},74:{index:"74",hex:"0x8000004a",symbol:"ICX",name:"ICON"},75:{index:"75",hex:"0x8000004b",symbol:"FJC",name:"FujiCoin"},76:{index:"76",hex:"0x8000004c",symbol:"MIX",name:"MIX"},77:{index:"77",hex:"0x8000004d",symbol:"XVG",name:"Verge Currency"},78:{index:"78",hex:"0x8000004e",symbol:"EFL",name:"Electronic Gulden"},79:{index:"79",hex:"0x8000004f",symbol:"CLUB",name:"ClubCoin"},80:{index:"80",hex:"0x80000050",symbol:"RICHX",name:"RichCoin"},81:{index:"81",hex:"0x80000051",symbol:"POT",name:"Potcoin"},82:{index:"82",hex:"0x80000052",symbol:"QRK",name:"Quarkcoin"},83:{index:"83",hex:"0x80000053",symbol:"TRC",name:"Terracoin"},84:{index:"84",hex:"0x80000054",symbol:"GRC",name:"Gridcoin"},85:{index:"85",hex:"0x80000055",symbol:"AUR",name:"Auroracoin"},86:{index:"86",hex:"0x80000056",symbol:"IXC",name:"IXCoin"},87:{index:"87",hex:"0x80000057",symbol:"NLG",name:"Gulden"},88:{index:"88",hex:"0x80000058",symbol:"BITB",name:"BitBean"},89:{index:"89",hex:"0x80000059",symbol:"BTA",name:"Bata"},90:{index:"90",hex:"0x8000005a",symbol:"XMY",name:"Myriadcoin"},91:{index:"91",hex:"0x8000005b",symbol:"BSD",name:"BitSend"},92:{index:"92",hex:"0x8000005c",symbol:"UNO",name:"Unobtanium"},93:{index:"93",hex:"0x8000005d",symbol:"MTR",name:"MasterTrader"},94:{index:"94",hex:"0x8000005e",symbol:"GB",name:"GoldBlocks"},95:{index:"95",hex:"0x8000005f",symbol:"SHM",name:"Saham"},96:{index:"96",hex:"0x80000060",symbol:"CRX",name:"Chronos"},97:{index:"97",hex:"0x80000061",symbol:"BIQ",name:"Ubiquoin"},98:{index:"98",hex:"0x80000062",symbol:"EVO",name:"Evotion"},99:{index:"99",hex:"0x80000063",symbol:"STO",name:"SaveTheOcean"},100:{index:"100",hex:"0x80000064",symbol:"BIGUP",name:"BigUp"},101:{index:"101",hex:"0x80000065",symbol:"GAME",name:"GameCredits"},102:{index:"102",hex:"0x80000066",symbol:"DLC",name:"Dollarcoins"},103:{index:"103",hex:"0x80000067",symbol:"ZYD",name:"Zayedcoin"},104:{index:"104",hex:"0x80000068",symbol:"DBIC",name:"Dubaicoin"},105:{index:"105",hex:"0x80000069",symbol:"STRAT",name:"Stratis"},106:{index:"106",hex:"0x8000006a",symbol:"SH",name:"Shilling"},107:{index:"107",hex:"0x8000006b",symbol:"MARS",name:"MarsCoin"},108:{index:"108",hex:"0x8000006c",symbol:"UBQ",name:"Ubiq"},109:{index:"109",hex:"0x8000006d",symbol:"PTC",name:"Pesetacoin"},110:{index:"110",hex:"0x8000006e",symbol:"NRO",name:"Neurocoin"},111:{index:"111",hex:"0x8000006f",symbol:"ARK",name:"ARK"},112:{index:"112",hex:"0x80000070",symbol:"USC",name:"UltimateSecureCashMain"},113:{index:"113",hex:"0x80000071",symbol:"THC",name:"Hempcoin"},114:{index:"114",hex:"0x80000072",symbol:"LINX",name:"Linx"},115:{index:"115",hex:"0x80000073",symbol:"ECN",name:"Ecoin"},116:{index:"116",hex:"0x80000074",symbol:"DNR",name:"Denarius"},117:{index:"117",hex:"0x80000075",symbol:"PINK",name:"Pinkcoin"},118:{index:"118",hex:"0x80000076",symbol:"ATOM",name:"Atom"},119:{index:"119",hex:"0x80000077",symbol:"PIVX",name:"Pivx"},120:{index:"120",hex:"0x80000078",symbol:"FLASH",name:"Flashcoin"},121:{index:"121",hex:"0x80000079",symbol:"ZEN",name:"Zencash"},122:{index:"122",hex:"0x8000007a",symbol:"PUT",name:"Putincoin"},123:{index:"123",hex:"0x8000007b",symbol:"ZNY",name:"BitZeny"},124:{index:"124",hex:"0x8000007c",symbol:"UNIFY",name:"Unify"},125:{index:"125",hex:"0x8000007d",symbol:"XST",name:"StealthCoin"},126:{index:"126",hex:"0x8000007e",symbol:"BRK",name:"Breakout Coin"},127:{index:"127",hex:"0x8000007f",symbol:"VC",name:"Vcash"},128:{index:"128",hex:"0x80000080",symbol:"XMR",name:"Monero"},129:{index:"129",hex:"0x80000081",symbol:"VOX",name:"Voxels"},130:{index:"130",hex:"0x80000082",symbol:"NAV",name:"NavCoin"},131:{index:"131",hex:"0x80000083",symbol:"FCT",name:"Factom Factoids"},132:{index:"132",hex:"0x80000084",symbol:"EC",name:"Factom Entry Credits"},133:{index:"133",hex:"0x80000085",symbol:"ZEC",name:"Zcash"},134:{index:"134",hex:"0x80000086",symbol:"LSK",name:"Lisk"},135:{index:"135",hex:"0x80000087",symbol:"STEEM",name:"Steem"},136:{index:"136",hex:"0x80000088",symbol:"XZC",name:"ZCoin"},137:{index:"137",hex:"0x80000089",symbol:"RBTC",name:"Rootstock"},138:{index:"138",hex:"0x8000008a",symbol:"",name:"Giftblock"},139:{index:"139",hex:"0x8000008b",symbol:"RPT",name:"RealPointCoin"},140:{index:"140",hex:"0x8000008c",symbol:"LBC",name:"LBRY Credits"},141:{index:"141",hex:"0x8000008d",symbol:"KMD",name:"Komodo"},142:{index:"142",hex:"0x8000008e",symbol:"BSQ",name:"bisq Token"},143:{index:"143",hex:"0x8000008f",symbol:"RIC",name:"Riecoin"},144:{index:"144",hex:"0x80000090",symbol:"XRP",name:"XRP"},145:{index:"145",hex:"0x80000091",symbol:"BCH",name:"Bitcoin Cash"},146:{index:"146",hex:"0x80000092",symbol:"NEBL",name:"Neblio"},147:{index:"147",hex:"0x80000093",symbol:"ZCL",name:"ZClassic"},148:{index:"148",hex:"0x80000094",symbol:"XLM",name:"Stellar Lumens"},149:{index:"149",hex:"0x80000095",symbol:"NLC2",name:"NoLimitCoin2"},150:{index:"150",hex:"0x80000096",symbol:"WHL",name:"WhaleCoin"},151:{index:"151",hex:"0x80000097",symbol:"ERC",name:"EuropeCoin"},152:{index:"152",hex:"0x80000098",symbol:"DMD",name:"Diamond"},153:{index:"153",hex:"0x80000099",symbol:"BTM",name:"Bytom"},154:{index:"154",hex:"0x8000009a",symbol:"BIO",name:"Biocoin"},155:{index:"155",hex:"0x8000009b",symbol:"XWCC",name:"Whitecoin Classic"},156:{index:"156",hex:"0x8000009c",symbol:"BTG",name:"Bitcoin Gold"},157:{index:"157",hex:"0x8000009d",symbol:"BTC2X",name:"Bitcoin 2x"},158:{index:"158",hex:"0x8000009e",symbol:"SSN",name:"SuperSkynet"},159:{index:"159",hex:"0x8000009f",symbol:"TOA",name:"TOACoin"},160:{index:"160",hex:"0x800000a0",symbol:"BTX",name:"Bitcore"},161:{index:"161",hex:"0x800000a1",symbol:"ACC",name:"Adcoin"},162:{index:"162",hex:"0x800000a2",symbol:"BCO",name:"Bridgecoin"},163:{index:"163",hex:"0x800000a3",symbol:"ELLA",name:"Ellaism"},164:{index:"164",hex:"0x800000a4",symbol:"PIRL",name:"Pirl"},165:{index:"165",hex:"0x800000a5",symbol:"XNO",name:"Nano"},166:{index:"166",hex:"0x800000a6",symbol:"VIVO",name:"Vivo"},167:{index:"167",hex:"0x800000a7",symbol:"FRST",name:"Firstcoin"},168:{index:"168",hex:"0x800000a8",symbol:"HNC",name:"Helleniccoin"},169:{index:"169",hex:"0x800000a9",symbol:"BUZZ",name:"BUZZ"},170:{index:"170",hex:"0x800000aa",symbol:"MBRS",name:"Ember"},171:{index:"171",hex:"0x800000ab",symbol:"HC",name:"Hcash"},172:{index:"172",hex:"0x800000ac",symbol:"HTML",name:"HTMLCOIN"},173:{index:"173",hex:"0x800000ad",symbol:"ODN",name:"Obsidian"},174:{index:"174",hex:"0x800000ae",symbol:"ONX",name:"OnixCoin"},175:{index:"175",hex:"0x800000af",symbol:"RVN",name:"Ravencoin"},176:{index:"176",hex:"0x800000b0",symbol:"GBX",name:"GoByte"},177:{index:"177",hex:"0x800000b1",symbol:"BTCZ",name:"BitcoinZ"},178:{index:"178",hex:"0x800000b2",symbol:"POA",name:"Poa"},179:{index:"179",hex:"0x800000b3",symbol:"NYC",name:"NewYorkCoin"},180:{index:"180",hex:"0x800000b4",symbol:"MXT",name:"MarteXcoin"},181:{index:"181",hex:"0x800000b5",symbol:"WC",name:"Wincoin"},182:{index:"182",hex:"0x800000b6",symbol:"MNX",name:"Minexcoin"},183:{index:"183",hex:"0x800000b7",symbol:"BTCP",name:"Bitcoin Private"},184:{index:"184",hex:"0x800000b8",symbol:"MUSIC",name:"Musicoin"},185:{index:"185",hex:"0x800000b9",symbol:"BCA",name:"Bitcoin Atom"},186:{index:"186",hex:"0x800000ba",symbol:"CRAVE",name:"Crave"},187:{index:"187",hex:"0x800000bb",symbol:"STAK",name:"STRAKS"},188:{index:"188",hex:"0x800000bc",symbol:"WBTC",name:"World Bitcoin"},189:{index:"189",hex:"0x800000bd",symbol:"LCH",name:"LiteCash"},190:{index:"190",hex:"0x800000be",symbol:"EXCL",name:"ExclusiveCoin"},191:{index:"191",hex:"0x800000bf",symbol:"",name:"Lynx"},192:{index:"192",hex:"0x800000c0",symbol:"LCC",name:"LitecoinCash"},193:{index:"193",hex:"0x800000c1",symbol:"XFE",name:"Feirm"},194:{index:"194",hex:"0x800000c2",symbol:"EOS",name:"EOS"},195:{index:"195",hex:"0x800000c3",symbol:"TRX",name:"Tron"},196:{index:"196",hex:"0x800000c4",symbol:"KOBO",name:"Kobocoin"},197:{index:"197",hex:"0x800000c5",symbol:"HUSH",name:"HUSH"},198:{index:"198",hex:"0x800000c6",symbol:"BAN",name:"Banano"},199:{index:"199",hex:"0x800000c7",symbol:"ETF",name:"ETF"},200:{index:"200",hex:"0x800000c8",symbol:"OMNI",name:"Omni"},201:{index:"201",hex:"0x800000c9",symbol:"BIFI",name:"BitcoinFile"},202:{index:"202",hex:"0x800000ca",symbol:"UFO",name:"Uniform Fiscal Object"},203:{index:"203",hex:"0x800000cb",symbol:"CNMC",name:"Cryptonodes"},204:{index:"204",hex:"0x800000cc",symbol:"BCN",name:"Bytecoin"},205:{index:"205",hex:"0x800000cd",symbol:"RIN",name:"Ringo"},206:{index:"206",hex:"0x800000ce",symbol:"ATP",name:"Alaya"},207:{index:"207",hex:"0x800000cf",symbol:"EVT",name:"everiToken"},208:{index:"208",hex:"0x800000d0",symbol:"ATN",name:"ATN"},209:{index:"209",hex:"0x800000d1",symbol:"BIS",name:"Bismuth"},210:{index:"210",hex:"0x800000d2",symbol:"NEET",name:"NEETCOIN"},211:{index:"211",hex:"0x800000d3",symbol:"BOPO",name:"BopoChain"},212:{index:"212",hex:"0x800000d4",symbol:"OOT",name:"Utrum"},213:{index:"213",hex:"0x800000d5",symbol:"ALIAS",name:"Alias"},214:{index:"214",hex:"0x800000d6",symbol:"MONK",name:"Monkey Project"},215:{index:"215",hex:"0x800000d7",symbol:"BOXY",name:"BoxyCoin"},216:{index:"216",hex:"0x800000d8",symbol:"FLO",name:"Flo"},217:{index:"217",hex:"0x800000d9",symbol:"MEC",name:"Megacoin"},218:{index:"218",hex:"0x800000da",symbol:"BTDX",name:"BitCloud"},219:{index:"219",hex:"0x800000db",symbol:"XAX",name:"Artax"},220:{index:"220",hex:"0x800000dc",symbol:"ANON",name:"ANON"},221:{index:"221",hex:"0x800000dd",symbol:"LTZ",name:"LitecoinZ"},222:{index:"222",hex:"0x800000de",symbol:"BITG",name:"Bitcoin Green"},223:{index:"223",hex:"0x800000df",symbol:"ICP",name:"Internet Computer (DFINITY)"},224:{index:"224",hex:"0x800000e0",symbol:"SMART",name:"Smartcash"},225:{index:"225",hex:"0x800000e1",symbol:"XUEZ",name:"XUEZ"},226:{index:"226",hex:"0x800000e2",symbol:"HLM",name:"Helium"},227:{index:"227",hex:"0x800000e3",symbol:"WEB",name:"Webchain"},228:{index:"228",hex:"0x800000e4",symbol:"ACM",name:"Actinium"},229:{index:"229",hex:"0x800000e5",symbol:"NOS",name:"NOS Stable Coins"},230:{index:"230",hex:"0x800000e6",symbol:"BITC",name:"BitCash"},231:{index:"231",hex:"0x800000e7",symbol:"HTH",name:"Help The Homeless Coin"},232:{index:"232",hex:"0x800000e8",symbol:"TZC",name:"Trezarcoin"},233:{index:"233",hex:"0x800000e9",symbol:"VAR",name:"Varda"},234:{index:"234",hex:"0x800000ea",symbol:"IOV",name:"IOV"},235:{index:"235",hex:"0x800000eb",symbol:"FIO",name:"FIO"},236:{index:"236",hex:"0x800000ec",symbol:"BSV",name:"BitcoinSV"},237:{index:"237",hex:"0x800000ed",symbol:"DXN",name:"DEXON"},238:{index:"238",hex:"0x800000ee",symbol:"QRL",name:"Quantum Resistant Ledger"},239:{index:"239",hex:"0x800000ef",symbol:"PCX",name:"ChainX"},240:{index:"240",hex:"0x800000f0",symbol:"LOKI",name:"Loki"},241:{index:"241",hex:"0x800000f1",symbol:"",name:"Imagewallet"},242:{index:"242",hex:"0x800000f2",symbol:"NIM",name:"Nimiq"},243:{index:"243",hex:"0x800000f3",symbol:"SOV",name:"Sovereign Coin"},244:{index:"244",hex:"0x800000f4",symbol:"JCT",name:"Jibital Coin"},245:{index:"245",hex:"0x800000f5",symbol:"SLP",name:"Simple Ledger Protocol"},246:{index:"246",hex:"0x800000f6",symbol:"EWT",name:"Energy Web"},247:{index:"247",hex:"0x800000f7",symbol:"UC",name:"Ulord"},248:{index:"248",hex:"0x800000f8",symbol:"EXOS",name:"EXOS"},249:{index:"249",hex:"0x800000f9",symbol:"ECA",name:"Electra"},250:{index:"250",hex:"0x800000fa",symbol:"SOOM",name:"Soom"},251:{index:"251",hex:"0x800000fb",symbol:"XRD",name:"Redstone"},252:{index:"252",hex:"0x800000fc",symbol:"FREE",name:"FreeCoin"},253:{index:"253",hex:"0x800000fd",symbol:"NPW",name:"NewPowerCoin"},254:{index:"254",hex:"0x800000fe",symbol:"BST",name:"BlockStamp"},255:{index:"255",hex:"0x800000ff",symbol:"",name:"SmartHoldem"},256:{index:"256",hex:"0x80000100",symbol:"NANO",name:"Bitcoin Nano"},257:{index:"257",hex:"0x80000101",symbol:"BTCC",name:"Bitcoin Core"},258:{index:"258",hex:"0x80000102",symbol:"",name:"Zen Protocol"},259:{index:"259",hex:"0x80000103",symbol:"ZEST",name:"Zest"},260:{index:"260",hex:"0x80000104",symbol:"ABT",name:"ArcBlock"},261:{index:"261",hex:"0x80000105",symbol:"PION",name:"Pion"},262:{index:"262",hex:"0x80000106",symbol:"DT3",name:"DreamTeam3"},263:{index:"263",hex:"0x80000107",symbol:"ZBUX",name:"Zbux"},264:{index:"264",hex:"0x80000108",symbol:"KPL",name:"Kepler"},265:{index:"265",hex:"0x80000109",symbol:"TPAY",name:"TokenPay"},266:{index:"266",hex:"0x8000010a",symbol:"ZILLA",name:"ChainZilla"},267:{index:"267",hex:"0x8000010b",symbol:"ANK",name:"Anker"},268:{index:"268",hex:"0x8000010c",symbol:"BCC",name:"BCChain"},269:{index:"269",hex:"0x8000010d",symbol:"HPB",name:"HPB"},270:{index:"270",hex:"0x8000010e",symbol:"ONE",name:"ONE"},271:{index:"271",hex:"0x8000010f",symbol:"SBC",name:"SBC"},272:{index:"272",hex:"0x80000110",symbol:"IPC",name:"IPChain"},273:{index:"273",hex:"0x80000111",symbol:"DMTC",name:"Dominantchain"},274:{index:"274",hex:"0x80000112",symbol:"OGC",name:"Onegram"},275:{index:"275",hex:"0x80000113",symbol:"SHIT",name:"Shitcoin"},276:{index:"276",hex:"0x80000114",symbol:"ANDES",name:"Andescoin"},277:{index:"277",hex:"0x80000115",symbol:"AREPA",name:"Arepacoin"},278:{index:"278",hex:"0x80000116",symbol:"BOLI",name:"Bolivarcoin"},279:{index:"279",hex:"0x80000117",symbol:"RIL",name:"Rilcoin"},280:{index:"280",hex:"0x80000118",symbol:"HTR",name:"Hathor Network"},281:{index:"281",hex:"0x80000119",symbol:"ACME",name:"Accumulate"},282:{index:"282",hex:"0x8000011a",symbol:"BRAVO",name:"BRAVO"},283:{index:"283",hex:"0x8000011b",symbol:"ALGO",name:"Algorand"},284:{index:"284",hex:"0x8000011c",symbol:"BZX",name:"Bitcoinzero"},285:{index:"285",hex:"0x8000011d",symbol:"GXX",name:"GravityCoin"},286:{index:"286",hex:"0x8000011e",symbol:"HEAT",name:"HEAT"},287:{index:"287",hex:"0x8000011f",symbol:"XDN",name:"DigitalNote"},288:{index:"288",hex:"0x80000120",symbol:"FSN",name:"FUSION"},289:{index:"289",hex:"0x80000121",symbol:"CPC",name:"Capricoin"},290:{index:"290",hex:"0x80000122",symbol:"BOLD",name:"Bold"},291:{index:"291",hex:"0x80000123",symbol:"IOST",name:"IOST"},292:{index:"292",hex:"0x80000124",symbol:"TKEY",name:"Tkeycoin"},293:{index:"293",hex:"0x80000125",symbol:"USE",name:"Usechain"},294:{index:"294",hex:"0x80000126",symbol:"BCZ",name:"BitcoinCZ"},295:{index:"295",hex:"0x80000127",symbol:"IOC",name:"Iocoin"},296:{index:"296",hex:"0x80000128",symbol:"ASF",name:"Asofe"},297:{index:"297",hex:"0x80000129",symbol:"MASS",name:"MASS"},298:{index:"298",hex:"0x8000012a",symbol:"FAIR",name:"FairCoin"},299:{index:"299",hex:"0x8000012b",symbol:"NUKO",name:"Nekonium"},300:{index:"300",hex:"0x8000012c",symbol:"GNX",name:"Genaro Network"},301:{index:"301",hex:"0x8000012d",symbol:"DIVI",name:"Divi Project"},302:{index:"302",hex:"0x8000012e",symbol:"CMT",name:"Community"},303:{index:"303",hex:"0x8000012f",symbol:"EUNO",name:"EUNO"},304:{index:"304",hex:"0x80000130",symbol:"IOTX",name:"IoTeX"},305:{index:"305",hex:"0x80000131",symbol:"ONION",name:"DeepOnion"},306:{index:"306",hex:"0x80000132",symbol:"8BIT",name:"8Bit"},307:{index:"307",hex:"0x80000133",symbol:"ATC",name:"AToken Coin"},308:{index:"308",hex:"0x80000134",symbol:"BTS",name:"Bitshares"},309:{index:"309",hex:"0x80000135",symbol:"CKB",name:"Nervos CKB"},310:{index:"310",hex:"0x80000136",symbol:"UGAS",name:"Ultrain"},311:{index:"311",hex:"0x80000137",symbol:"ADS",name:"Adshares"},312:{index:"312",hex:"0x80000138",symbol:"ARA",name:"Aura"},313:{index:"313",hex:"0x80000139",symbol:"ZIL",name:"Zilliqa"},314:{index:"314",hex:"0x8000013a",symbol:"MOAC",name:"MOAC"},315:{index:"315",hex:"0x8000013b",symbol:"SWTC",name:"SWTC"},316:{index:"316",hex:"0x8000013c",symbol:"VNSC",name:"vnscoin"},317:{index:"317",hex:"0x8000013d",symbol:"PLUG",name:"Pl^g"},318:{index:"318",hex:"0x8000013e",symbol:"MAN",name:"Matrix AI Network"},319:{index:"319",hex:"0x8000013f",symbol:"ECC",name:"ECCoin"},320:{index:"320",hex:"0x80000140",symbol:"RPD",name:"Rapids"},321:{index:"321",hex:"0x80000141",symbol:"RAP",name:"Rapture"},322:{index:"322",hex:"0x80000142",symbol:"GARD",name:"Hashgard"},323:{index:"323",hex:"0x80000143",symbol:"ZER",name:"Zero"},324:{index:"324",hex:"0x80000144",symbol:"EBST",name:"eBoost"},325:{index:"325",hex:"0x80000145",symbol:"SHARD",name:"Shard"},326:{index:"326",hex:"0x80000146",symbol:"MRX",name:"Metrix Coin"},327:{index:"327",hex:"0x80000147",symbol:"CMM",name:"Commercium"},328:{index:"328",hex:"0x80000148",symbol:"BLOCK",name:"Blocknet"},329:{index:"329",hex:"0x80000149",symbol:"AUDAX",name:"AUDAX"},330:{index:"330",hex:"0x8000014a",symbol:"LUNA",name:"Terra"},331:{index:"331",hex:"0x8000014b",symbol:"ZPM",name:"zPrime"},332:{index:"332",hex:"0x8000014c",symbol:"KUVA",name:"Kuva Utility Note"},333:{index:"333",hex:"0x8000014d",symbol:"MEM",name:"MemCoin"},334:{index:"334",hex:"0x8000014e",symbol:"CS",name:"Credits"},335:{index:"335",hex:"0x8000014f",symbol:"SWIFT",name:"SwiftCash"},336:{index:"336",hex:"0x80000150",symbol:"FIX",name:"FIX"},337:{index:"337",hex:"0x80000151",symbol:"CPC",name:"CPChain"},338:{index:"338",hex:"0x80000152",symbol:"VGO",name:"VirtualGoodsToken"},339:{index:"339",hex:"0x80000153",symbol:"DVT",name:"DeVault"},340:{index:"340",hex:"0x80000154",symbol:"N8V",name:"N8VCoin"},341:{index:"341",hex:"0x80000155",symbol:"MTNS",name:"OmotenashiCoin"},342:{index:"342",hex:"0x80000156",symbol:"BLAST",name:"BLAST"},343:{index:"343",hex:"0x80000157",symbol:"DCT",name:"DECENT"},344:{index:"344",hex:"0x80000158",symbol:"AUX",name:"Auxilium"},345:{index:"345",hex:"0x80000159",symbol:"USDP",name:"USDP"},346:{index:"346",hex:"0x8000015a",symbol:"HTDF",name:"HTDF"},347:{index:"347",hex:"0x8000015b",symbol:"YEC",name:"Ycash"},348:{index:"348",hex:"0x8000015c",symbol:"QLC",name:"QLC Chain"},349:{index:"349",hex:"0x8000015d",symbol:"TEA",name:"Icetea Blockchain"},350:{index:"350",hex:"0x8000015e",symbol:"ARW",name:"ArrowChain"},351:{index:"351",hex:"0x8000015f",symbol:"MDM",name:"Medium"},352:{index:"352",hex:"0x80000160",symbol:"CYB",name:"Cybex"},353:{index:"353",hex:"0x80000161",symbol:"LTO",name:"LTO Network"},354:{index:"354",hex:"0x80000162",symbol:"DOT",name:"Polkadot"},355:{index:"355",hex:"0x80000163",symbol:"AEON",name:"Aeon"},356:{index:"356",hex:"0x80000164",symbol:"RES",name:"Resistance"},357:{index:"357",hex:"0x80000165",symbol:"AYA",name:"Aryacoin"},358:{index:"358",hex:"0x80000166",symbol:"DAPS",name:"Dapscoin"},359:{index:"359",hex:"0x80000167",symbol:"CSC",name:"CasinoCoin"},360:{index:"360",hex:"0x80000168",symbol:"VSYS",name:"V Systems"},361:{index:"361",hex:"0x80000169",symbol:"NOLLAR",name:"Nollar"},362:{index:"362",hex:"0x8000016a",symbol:"XNOS",name:"NOS"},363:{index:"363",hex:"0x8000016b",symbol:"CPU",name:"CPUchain"},364:{index:"364",hex:"0x8000016c",symbol:"LAMB",name:"Lambda Storage Chain"},365:{index:"365",hex:"0x8000016d",symbol:"VCT",name:"ValueCyber"},366:{index:"366",hex:"0x8000016e",symbol:"CZR",name:"Canonchain"},367:{index:"367",hex:"0x8000016f",symbol:"ABBC",name:"ABBC"},368:{index:"368",hex:"0x80000170",symbol:"HET",name:"HET"},369:{index:"369",hex:"0x80000171",symbol:"XAS",name:"Asch"},370:{index:"370",hex:"0x80000172",symbol:"VDL",name:"Vidulum"},371:{index:"371",hex:"0x80000173",symbol:"MED",name:"MediBloc"},372:{index:"372",hex:"0x80000174",symbol:"ZVC",name:"ZVChain"},373:{index:"373",hex:"0x80000175",symbol:"VESTX",name:"Vestx"},374:{index:"374",hex:"0x80000176",symbol:"DBT",name:"DarkBit"},375:{index:"375",hex:"0x80000177",symbol:"SEOS",name:"SuperEOS"},376:{index:"376",hex:"0x80000178",symbol:"MXW",name:"Maxonrow"},377:{index:"377",hex:"0x80000179",symbol:"ZNZ",name:"ZENZO"},378:{index:"378",hex:"0x8000017a",symbol:"XCX",name:"XChain"},379:{index:"379",hex:"0x8000017b",symbol:"SOX",name:"SonicX"},380:{index:"380",hex:"0x8000017c",symbol:"NYZO",name:"Nyzo"},381:{index:"381",hex:"0x8000017d",symbol:"ULC",name:"ULCoin"},382:{index:"382",hex:"0x8000017e",symbol:"RYO",name:"Ryo Currency"},383:{index:"383",hex:"0x8000017f",symbol:"KAL",name:"Kaleidochain"},384:{index:"384",hex:"0x80000180",symbol:"XSN",name:"Stakenet"},385:{index:"385",hex:"0x80000181",symbol:"DOGEC",name:"DogeCash"},386:{index:"386",hex:"0x80000182",symbol:"BMV",name:"Bitcoin Matteo's Vision"},387:{index:"387",hex:"0x80000183",symbol:"QBC",name:"Quebecoin"},388:{index:"388",hex:"0x80000184",symbol:"IMG",name:"ImageCoin"},389:{index:"389",hex:"0x80000185",symbol:"QOS",name:"QOS"},390:{index:"390",hex:"0x80000186",symbol:"PKT",name:"PKT"},391:{index:"391",hex:"0x80000187",symbol:"LHD",name:"LitecoinHD"},392:{index:"392",hex:"0x80000188",symbol:"CENNZ",name:"CENNZnet"},393:{index:"393",hex:"0x80000189",symbol:"HSN",name:"Hyper Speed Network"},394:{index:"394",hex:"0x8000018a",symbol:"CRO",name:"Crypto Chain"},395:{index:"395",hex:"0x8000018b",symbol:"UMBRU",name:"Umbru"},396:{index:"396",hex:"0x8000018c",symbol:"EVER",name:"Everscale"},397:{index:"397",hex:"0x8000018d",symbol:"NEAR",name:"NEAR Protocol"},398:{index:"398",hex:"0x8000018e",symbol:"XPC",name:"XPChain"},399:{index:"399",hex:"0x8000018f",symbol:"ZOC",name:"01coin"},400:{index:"400",hex:"0x80000190",symbol:"NIX",name:"NIX"},401:{index:"401",hex:"0x80000191",symbol:"UC",name:"Utopiacoin"},402:{index:"402",hex:"0x80000192",symbol:"GALI",name:"Galilel"},403:{index:"403",hex:"0x80000193",symbol:"OLT",name:"Oneledger"},404:{index:"404",hex:"0x80000194",symbol:"XBI",name:"XBI"},405:{index:"405",hex:"0x80000195",symbol:"DONU",name:"DONU"},406:{index:"406",hex:"0x80000196",symbol:"EARTHS",name:"Earths"},407:{index:"407",hex:"0x80000197",symbol:"HDD",name:"HDDCash"},408:{index:"408",hex:"0x80000198",symbol:"SUGAR",name:"Sugarchain"},409:{index:"409",hex:"0x80000199",symbol:"AILE",name:"AileCoin"},410:{index:"410",hex:"0x8000019a",symbol:"TENT",name:"TENT"},411:{index:"411",hex:"0x8000019b",symbol:"TAN",name:"Tangerine Network"},412:{index:"412",hex:"0x8000019c",symbol:"AIN",name:"AIN"},413:{index:"413",hex:"0x8000019d",symbol:"MSR",name:"Masari"},414:{index:"414",hex:"0x8000019e",symbol:"SUMO",name:"Sumokoin"},415:{index:"415",hex:"0x8000019f",symbol:"ETN",name:"Electroneum"},416:{index:"416",hex:"0x800001a0",symbol:"BYTZ",name:"BYTZ"},417:{index:"417",hex:"0x800001a1",symbol:"WOW",name:"Wownero"},418:{index:"418",hex:"0x800001a2",symbol:"XTNC",name:"XtendCash"},419:{index:"419",hex:"0x800001a3",symbol:"LTHN",name:"Lethean"},420:{index:"420",hex:"0x800001a4",symbol:"NODE",name:"NodeHost"},421:{index:"421",hex:"0x800001a5",symbol:"AGM",name:"Argoneum"},422:{index:"422",hex:"0x800001a6",symbol:"CCX",name:"Conceal Network"},423:{index:"423",hex:"0x800001a7",symbol:"TNET",name:"Title Network"},424:{index:"424",hex:"0x800001a8",symbol:"TELOS",name:"TelosCoin"},425:{index:"425",hex:"0x800001a9",symbol:"AION",name:"Aion"},426:{index:"426",hex:"0x800001aa",symbol:"BC",name:"Bitcoin Confidential"},427:{index:"427",hex:"0x800001ab",symbol:"KTV",name:"KmushiCoin"},428:{index:"428",hex:"0x800001ac",symbol:"ZCR",name:"ZCore"},429:{index:"429",hex:"0x800001ad",symbol:"ERG",name:"Ergo"},430:{index:"430",hex:"0x800001ae",symbol:"PESO",name:"Criptopeso"},431:{index:"431",hex:"0x800001af",symbol:"BTC2",name:"Bitcoin 2"},432:{index:"432",hex:"0x800001b0",symbol:"XRPHD",name:"XRPHD"},433:{index:"433",hex:"0x800001b1",symbol:"WE",name:"WE Coin"},434:{index:"434",hex:"0x800001b2",symbol:"KSM",name:"Kusama"},435:{index:"435",hex:"0x800001b3",symbol:"PCN",name:"Peepcoin"},436:{index:"436",hex:"0x800001b4",symbol:"NCH",name:"NetCloth"},437:{index:"437",hex:"0x800001b5",symbol:"ICU",name:"CHIPO"},438:{index:"438",hex:"0x800001b6",symbol:"FNSA",name:"FINSCHIA"},439:{index:"439",hex:"0x800001b7",symbol:"DTP",name:"DeVault Token Protocol"},440:{index:"440",hex:"0x800001b8",symbol:"BTCR",name:"Bitcoin Royale"},441:{index:"441",hex:"0x800001b9",symbol:"AERGO",name:"AERGO"},442:{index:"442",hex:"0x800001ba",symbol:"XTH",name:"Dothereum"},443:{index:"443",hex:"0x800001bb",symbol:"LV",name:"Lava"},444:{index:"444",hex:"0x800001bc",symbol:"PHR",name:"Phore"},445:{index:"445",hex:"0x800001bd",symbol:"VITAE",name:"Vitae"},446:{index:"446",hex:"0x800001be",symbol:"COCOS",name:"Cocos-BCX"},447:{index:"447",hex:"0x800001bf",symbol:"DIN",name:"Dinero"},448:{index:"448",hex:"0x800001c0",symbol:"SPL",name:"Simplicity"},449:{index:"449",hex:"0x800001c1",symbol:"YCE",name:"MYCE"},450:{index:"450",hex:"0x800001c2",symbol:"XLR",name:"Solaris"},451:{index:"451",hex:"0x800001c3",symbol:"KTS",name:"Klimatas"},452:{index:"452",hex:"0x800001c4",symbol:"DGLD",name:"DGLD"},453:{index:"453",hex:"0x800001c5",symbol:"XNS",name:"Insolar"},454:{index:"454",hex:"0x800001c6",symbol:"EM",name:"EMPOW"},455:{index:"455",hex:"0x800001c7",symbol:"SHN",name:"ShineBlocks"},456:{index:"456",hex:"0x800001c8",symbol:"SEELE",name:"Seele"},457:{index:"457",hex:"0x800001c9",symbol:"AE",name:"æternity"},458:{index:"458",hex:"0x800001ca",symbol:"ODX",name:"ObsidianX"},459:{index:"459",hex:"0x800001cb",symbol:"KAVA",name:"Kava"},460:{index:"460",hex:"0x800001cc",symbol:"GLEEC",name:"GLEEC"},461:{index:"461",hex:"0x800001cd",symbol:"FIL",name:"Filecoin"},462:{index:"462",hex:"0x800001ce",symbol:"RUTA",name:"Rutanio"},463:{index:"463",hex:"0x800001cf",symbol:"CSDT",name:"CSDT"},464:{index:"464",hex:"0x800001d0",symbol:"ETI",name:"EtherInc"},465:{index:"465",hex:"0x800001d1",symbol:"ZSLP",name:"Zclassic Simple Ledger Protocol"},466:{index:"466",hex:"0x800001d2",symbol:"ERE",name:"EtherCore"},467:{index:"467",hex:"0x800001d3",symbol:"DX",name:"DxChain Token"},468:{index:"468",hex:"0x800001d4",symbol:"CPS",name:"Capricoin+"},469:{index:"469",hex:"0x800001d5",symbol:"BTH",name:"Bithereum"},470:{index:"470",hex:"0x800001d6",symbol:"MESG",name:"MESG"},471:{index:"471",hex:"0x800001d7",symbol:"FIMK",name:"FIMK"},472:{index:"472",hex:"0x800001d8",symbol:"AR",name:"Arweave"},473:{index:"473",hex:"0x800001d9",symbol:"OGO",name:"Origo"},474:{index:"474",hex:"0x800001da",symbol:"ROSE",name:"Oasis Network"},475:{index:"475",hex:"0x800001db",symbol:"BARE",name:"BARE Network"},476:{index:"476",hex:"0x800001dc",symbol:"GLEEC",name:"GleecBTC"},477:{index:"477",hex:"0x800001dd",symbol:"CLR",name:"Color Coin"},478:{index:"478",hex:"0x800001de",symbol:"RNG",name:"Ring"},479:{index:"479",hex:"0x800001df",symbol:"OLO",name:"Tool Global"},480:{index:"480",hex:"0x800001e0",symbol:"PEXA",name:"Pexa"},481:{index:"481",hex:"0x800001e1",symbol:"MOON",name:"Mooncoin"},482:{index:"482",hex:"0x800001e2",symbol:"OCEAN",name:"Ocean Protocol"},483:{index:"483",hex:"0x800001e3",symbol:"BNT",name:"Bluzelle Native"},484:{index:"484",hex:"0x800001e4",symbol:"AMO",name:"AMO Blockchain"},485:{index:"485",hex:"0x800001e5",symbol:"FCH",name:"FreeCash"},486:{index:"486",hex:"0x800001e6",symbol:"LAT",name:"PlatON"},487:{index:"487",hex:"0x800001e7",symbol:"COIN",name:"Bitcoin Bank"},488:{index:"488",hex:"0x800001e8",symbol:"VEO",name:"Amoveo"},489:{index:"489",hex:"0x800001e9",symbol:"CCA",name:"Counos Coin"},490:{index:"490",hex:"0x800001ea",symbol:"GFN",name:"Graphene"},491:{index:"491",hex:"0x800001eb",symbol:"BIP",name:"Minter Network"},492:{index:"492",hex:"0x800001ec",symbol:"KPG",name:"Kunpeng Network"},493:{index:"493",hex:"0x800001ed",symbol:"FIN",name:"FINL Chain"},494:{index:"494",hex:"0x800001ee",symbol:"BAND",name:"Band"},495:{index:"495",hex:"0x800001ef",symbol:"DROP",name:"Dropil"},496:{index:"496",hex:"0x800001f0",symbol:"BHT",name:"Bluehelix Chain"},497:{index:"497",hex:"0x800001f1",symbol:"LYRA",name:"Scrypta"},498:{index:"498",hex:"0x800001f2",symbol:"CS",name:"Credits"},499:{index:"499",hex:"0x800001f3",symbol:"RUPX",name:"Rupaya"},500:{index:"500",hex:"0x800001f4",symbol:"THETA",name:"Theta"},501:{index:"501",hex:"0x800001f5",symbol:"SOL",name:"Solana"},502:{index:"502",hex:"0x800001f6",symbol:"THT",name:"ThoughtAI"},503:{index:"503",hex:"0x800001f7",symbol:"CFX",name:"Conflux"},504:{index:"504",hex:"0x800001f8",symbol:"KUMA",name:"Kumacoin"},505:{index:"505",hex:"0x800001f9",symbol:"HASH",name:"Provenance"},506:{index:"506",hex:"0x800001fa",symbol:"CSPR",name:"Casper"},507:{index:"507",hex:"0x800001fb",symbol:"EARTH",name:"EARTH"},508:{index:"508",hex:"0x800001fc",symbol:"EGLD",name:"MultiversX"},509:{index:"509",hex:"0x800001fd",symbol:"CHI",name:"Xaya"},510:{index:"510",hex:"0x800001fe",symbol:"KOTO",name:"Koto"},511:{index:"511",hex:"0x800001ff",symbol:"OTC",name:"θ"},512:{index:"512",hex:"0x80000200",symbol:"RXD",name:"Radiant"},513:{index:"513",hex:"0x80000201",symbol:"SEELEN",name:"Seele-N"},514:{index:"514",hex:"0x80000202",symbol:"AETH",name:"AETH"},515:{index:"515",hex:"0x80000203",symbol:"DNA",name:"Idena"},516:{index:"516",hex:"0x80000204",symbol:"VEE",name:"Virtual Economy Era"},517:{index:"517",hex:"0x80000205",symbol:"SIERRA",name:"SierraCoin"},518:{index:"518",hex:"0x80000206",symbol:"LET",name:"Linkeye"},519:{index:"519",hex:"0x80000207",symbol:"BSC",name:"Bitcoin Smart Contract"},520:{index:"520",hex:"0x80000208",symbol:"BTCV",name:"BitcoinVIP"},521:{index:"521",hex:"0x80000209",symbol:"ABA",name:"Dabacus"},522:{index:"522",hex:"0x8000020a",symbol:"SCC",name:"StakeCubeCoin"},523:{index:"523",hex:"0x8000020b",symbol:"EDG",name:"Edgeware"},524:{index:"524",hex:"0x8000020c",symbol:"AMS",name:"AmsterdamCoin"},525:{index:"525",hex:"0x8000020d",symbol:"GOSS",name:"GOSSIP Coin"},526:{index:"526",hex:"0x8000020e",symbol:"BU",name:"BUMO"},527:{index:"527",hex:"0x8000020f",symbol:"GRAM",name:"GRAM"},528:{index:"528",hex:"0x80000210",symbol:"YAP",name:"Yapstone"},529:{index:"529",hex:"0x80000211",symbol:"SCRT",name:"Secret Network"},530:{index:"530",hex:"0x80000212",symbol:"NOVO",name:"Novo"},531:{index:"531",hex:"0x80000213",symbol:"GHOST",name:"Ghost"},532:{index:"532",hex:"0x80000214",symbol:"HST",name:"HST"},533:{index:"533",hex:"0x80000215",symbol:"PRJ",name:"ProjectCoin"},534:{index:"534",hex:"0x80000216",symbol:"YOU",name:"YOUChain"},535:{index:"535",hex:"0x80000217",symbol:"XHV",name:"Haven Protocol"},536:{index:"536",hex:"0x80000218",symbol:"BYND",name:"Beyondcoin"},537:{index:"537",hex:"0x80000219",symbol:"JOYS",name:"Joys Digital"},538:{index:"538",hex:"0x8000021a",symbol:"VAL",name:"Valorbit"},539:{index:"539",hex:"0x8000021b",symbol:"FLOW",name:"Flow"},540:{index:"540",hex:"0x8000021c",symbol:"SMESH",name:"Spacemesh Coin"},541:{index:"541",hex:"0x8000021d",symbol:"SCDO",name:"SCDO"},542:{index:"542",hex:"0x8000021e",symbol:"IQS",name:"IQ-Cash"},543:{index:"543",hex:"0x8000021f",symbol:"BIND",name:"Compendia"},544:{index:"544",hex:"0x80000220",symbol:"COINEVO",name:"Coinevo"},545:{index:"545",hex:"0x80000221",symbol:"SCRIBE",name:"Scribe"},546:{index:"546",hex:"0x80000222",symbol:"HYN",name:"Hyperion"},547:{index:"547",hex:"0x80000223",symbol:"BHP",name:"BHP"},548:{index:"548",hex:"0x80000224",symbol:"BBC",name:"BigBang Core"},549:{index:"549",hex:"0x80000225",symbol:"MKF",name:"MarketFinance"},550:{index:"550",hex:"0x80000226",symbol:"XDC",name:"XinFin"},551:{index:"551",hex:"0x80000227",symbol:"STR",name:"Straightedge"},552:{index:"552",hex:"0x80000228",symbol:"SUM",name:"Sumcoin"},553:{index:"553",hex:"0x80000229",symbol:"HBC",name:"HuobiChain"},555:{index:"555",hex:"0x8000022b",symbol:"BCS",name:"Bitcoin Smart"},556:{index:"556",hex:"0x8000022c",symbol:"KTS",name:"Kratos"},557:{index:"557",hex:"0x8000022d",symbol:"LKR",name:"Lkrcoin"},558:{index:"558",hex:"0x8000022e",symbol:"TAO",name:"Tao"},559:{index:"559",hex:"0x8000022f",symbol:"XWC",name:"Whitecoin"},560:{index:"560",hex:"0x80000230",symbol:"DEAL",name:"DEAL"},561:{index:"561",hex:"0x80000231",symbol:"NTY",name:"Nexty"},562:{index:"562",hex:"0x80000232",symbol:"TOP",name:"TOP NetWork"},564:{index:"564",hex:"0x80000234",symbol:"AG",name:"Agoric"},565:{index:"565",hex:"0x80000235",symbol:"CICO",name:"Coinicles"},566:{index:"566",hex:"0x80000236",symbol:"IRIS",name:"Irisnet"},567:{index:"567",hex:"0x80000237",symbol:"NCG",name:"Nine Chronicles"},568:{index:"568",hex:"0x80000238",symbol:"LRG",name:"Large Coin"},569:{index:"569",hex:"0x80000239",symbol:"SERO",name:"Super Zero Protocol"},570:{index:"570",hex:"0x8000023a",symbol:"BDX",name:"Beldex"},571:{index:"571",hex:"0x8000023b",symbol:"CCXX",name:"Counos X"},572:{index:"572",hex:"0x8000023c",symbol:"SLS",name:"Saluscoin"},573:{index:"573",hex:"0x8000023d",symbol:"SRM",name:"Serum"},575:{index:"575",hex:"0x8000023f",symbol:"VIVT",name:"VIDT Datalink"},576:{index:"576",hex:"0x80000240",symbol:"BPS",name:"BitcoinPoS"},577:{index:"577",hex:"0x80000241",symbol:"NKN",name:"NKN"},578:{index:"578",hex:"0x80000242",symbol:"ICL",name:"ILCOIN"},579:{index:"579",hex:"0x80000243",symbol:"BONO",name:"Bonorum"},580:{index:"580",hex:"0x80000244",symbol:"PLC",name:"PLATINCOIN"},581:{index:"581",hex:"0x80000245",symbol:"DUN",name:"Dune"},582:{index:"582",hex:"0x80000246",symbol:"DMCH",name:"Darmacash"},583:{index:"583",hex:"0x80000247",symbol:"CTC",name:"Creditcoin"},584:{index:"584",hex:"0x80000248",symbol:"KELP",name:"Haidai Network"},585:{index:"585",hex:"0x80000249",symbol:"GBCR",name:"GoldBCR"},586:{index:"586",hex:"0x8000024a",symbol:"XDAG",name:"XDAG"},587:{index:"587",hex:"0x8000024b",symbol:"PRV",name:"Incognito Privacy"},588:{index:"588",hex:"0x8000024c",symbol:"SCAP",name:"SafeCapital"},589:{index:"589",hex:"0x8000024d",symbol:"TFUEL",name:"Theta Fuel"},590:{index:"590",hex:"0x8000024e",symbol:"GTM",name:"Gentarium"},591:{index:"591",hex:"0x8000024f",symbol:"RNL",name:"RentalChain"},592:{index:"592",hex:"0x80000250",symbol:"GRIN",name:"Grin"},593:{index:"593",hex:"0x80000251",symbol:"MWC",name:"MimbleWimbleCoin"},594:{index:"594",hex:"0x80000252",symbol:"DOCK",name:"Dock"},595:{index:"595",hex:"0x80000253",symbol:"POLYX",name:"Polymesh"},596:{index:"596",hex:"0x80000254",symbol:"DIVER",name:"Divergenti"},597:{index:"597",hex:"0x80000255",symbol:"XEP",name:"Electra Protocol"},598:{index:"598",hex:"0x80000256",symbol:"APN",name:"Apron"},599:{index:"599",hex:"0x80000257",symbol:"TFC",name:"Turbo File Coin"},600:{index:"600",hex:"0x80000258",symbol:"UTE",name:"Unit-e"},601:{index:"601",hex:"0x80000259",symbol:"MTC",name:"Metacoin"},602:{index:"602",hex:"0x8000025a",symbol:"NC",name:"NobodyCash"},603:{index:"603",hex:"0x8000025b",symbol:"XINY",name:"Xinyuehu"},604:{index:"604",hex:"0x8000025c",symbol:"DYN",name:"Dynamo"},605:{index:"605",hex:"0x8000025d",symbol:"BUFS",name:"Buffer"},606:{index:"606",hex:"0x8000025e",symbol:"STOS",name:"Stratos"},607:{index:"607",hex:"0x8000025f",symbol:"TON",name:"TON"},608:{index:"608",hex:"0x80000260",symbol:"TAFT",name:"TAFT"},609:{index:"609",hex:"0x80000261",symbol:"HYDRA",name:"HYDRA"},610:{index:"610",hex:"0x80000262",symbol:"NOR",name:"Noir"},611:{index:"611",hex:"0x80000263",symbol:"",name:"Manta Network Private Asset"},612:{index:"612",hex:"0x80000264",symbol:"",name:"Calamari Network Private Asset"},613:{index:"613",hex:"0x80000265",symbol:"WCN",name:"Widecoin"},614:{index:"614",hex:"0x80000266",symbol:"OPT",name:"Optimistic Ethereum"},615:{index:"615",hex:"0x80000267",symbol:"PSWAP",name:"PolkaSwap"},616:{index:"616",hex:"0x80000268",symbol:"VAL",name:"Validator"},617:{index:"617",hex:"0x80000269",symbol:"XOR",name:"Sora"},618:{index:"618",hex:"0x8000026a",symbol:"SSP",name:"SmartShare"},619:{index:"619",hex:"0x8000026b",symbol:"DEI",name:"DeimosX"},621:{index:"621",hex:"0x8000026d",symbol:"ZERO",name:"Singularity"},622:{index:"622",hex:"0x8000026e",symbol:"ALPHA",name:"AlphaDAO"},623:{index:"623",hex:"0x8000026f",symbol:"BDECO",name:"BDCashProtocol Ecosystem"},624:{index:"624",hex:"0x80000270",symbol:"NOBL",name:"Nobility"},625:{index:"625",hex:"0x80000271",symbol:"EAST",name:"Eastcoin"},626:{index:"626",hex:"0x80000272",symbol:"KDA",name:"Kadena"},627:{index:"627",hex:"0x80000273",symbol:"SOUL",name:"Phantasma"},628:{index:"628",hex:"0x80000274",symbol:"LORE",name:"Gitopia"},629:{index:"629",hex:"0x80000275",symbol:"FNR",name:"Fincor"},630:{index:"630",hex:"0x80000276",symbol:"NEXUS",name:"Nexus"},631:{index:"631",hex:"0x80000277",symbol:"QTZ",name:"Quartz"},632:{index:"632",hex:"0x80000278",symbol:"MAS",name:"Massa"},633:{index:"633",hex:"0x80000279",symbol:"CALL",name:"Callchain"},634:{index:"634",hex:"0x8000027a",symbol:"VAL",name:"Validity"},635:{index:"635",hex:"0x8000027b",symbol:"POKT",name:"Pocket Network"},636:{index:"636",hex:"0x8000027c",symbol:"EMIT",name:"EMIT"},637:{index:"637",hex:"0x8000027d",symbol:"APTOS",name:"Aptos"},638:{index:"638",hex:"0x8000027e",symbol:"ADON",name:"ADON"},639:{index:"639",hex:"0x8000027f",symbol:"BTSG",name:"BitSong"},640:{index:"640",hex:"0x80000280",symbol:"LFC",name:"Leofcoin"},641:{index:"641",hex:"0x80000281",symbol:"KCS",name:"KuCoin Shares"},642:{index:"642",hex:"0x80000282",symbol:"KCC",name:"KuCoin Community Chain"},643:{index:"643",hex:"0x80000283",symbol:"AZERO",name:"Aleph Zero"},644:{index:"644",hex:"0x80000284",symbol:"TREE",name:"Tree"},645:{index:"645",hex:"0x80000285",symbol:"LX",name:"Lynx"},646:{index:"646",hex:"0x80000286",symbol:"XLN",name:"Lunarium"},647:{index:"647",hex:"0x80000287",symbol:"CIC",name:"CIC Chain"},648:{index:"648",hex:"0x80000288",symbol:"ZRB",name:"Zarb"},650:{index:"650",hex:"0x8000028a",symbol:"UCO",name:"Archethic"},651:{index:"651",hex:"0x8000028b",symbol:"SFX",name:"Safex Cash"},652:{index:"652",hex:"0x8000028c",symbol:"SFT",name:"Safex Token"},653:{index:"653",hex:"0x8000028d",symbol:"WSFX",name:"Wrapped Safex Cash"},654:{index:"654",hex:"0x8000028e",symbol:"USDG",name:"US Digital Gold"},655:{index:"655",hex:"0x8000028f",symbol:"WMP",name:"WAMP"},656:{index:"656",hex:"0x80000290",symbol:"EKTA",name:"Ekta"},657:{index:"657",hex:"0x80000291",symbol:"YDA",name:"YadaCoin"},658:{index:"658",hex:"0x80000292",symbol:"WHIVE",name:"Whive"},659:{index:"659",hex:"0x80000293",symbol:"KOIN",name:"Koinos"},660:{index:"660",hex:"0x80000294",symbol:"PIRATE",name:"PirateCash"},661:{index:"661",hex:"0x80000295",symbol:"UNQ",name:"Unique"},662:{index:"662",hex:"0x80000296",symbol:"ULM",name:"UltonSmartchain"},663:{index:"663",hex:"0x80000297",symbol:"SFRX",name:"EtherGem Sapphire"},664:{index:"664",hex:"0x80000298",symbol:"BSTY",name:"GlobalBoost-Y"},665:{index:"665",hex:"0x80000299",symbol:"IMP",name:"Impact Protocol"},666:{index:"666",hex:"0x8000029a",symbol:"ACT",name:"Achain"},667:{index:"667",hex:"0x8000029b",symbol:"PRKL",name:"Perkle"},668:{index:"668",hex:"0x8000029c",symbol:"SSC",name:"SelfSell"},669:{index:"669",hex:"0x8000029d",symbol:"GC",name:"GateChain"},670:{index:"670",hex:"0x8000029e",symbol:"PLGR",name:"Pledger"},671:{index:"671",hex:"0x8000029f",symbol:"MPLGR",name:"Pledger"},672:{index:"672",hex:"0x800002a0",symbol:"KNOX",name:"Knox"},673:{index:"673",hex:"0x800002a1",symbol:"ZED",name:"ZED"},674:{index:"674",hex:"0x800002a2",symbol:"CNDL",name:"Candle"},675:{index:"675",hex:"0x800002a3",symbol:"WLKR",name:"Walker Crypto Innovation Index"},676:{index:"676",hex:"0x800002a4",symbol:"WLKRR",name:"Walker"},677:{index:"677",hex:"0x800002a5",symbol:"YUNGE",name:"Yunge"},678:{index:"678",hex:"0x800002a6",symbol:"Voken",name:"Voken"},679:{index:"679",hex:"0x800002a7",symbol:"APL",name:"Apollo"},680:{index:"680",hex:"0x800002a8",symbol:"Evrynet",name:"Evrynet"},681:{index:"681",hex:"0x800002a9",symbol:"NENG",name:"Nengcoin"},682:{index:"682",hex:"0x800002aa",symbol:"CHTA",name:"Cheetahcoin"},683:{index:"683",hex:"0x800002ab",symbol:"ALEO",name:"Aleo Network"},684:{index:"684",hex:"0x800002ac",symbol:"HMS",name:"Hemis"},685:{index:"685",hex:"0x800002ad",symbol:"OAS",name:"Oasys"},686:{index:"686",hex:"0x800002ae",symbol:"KAR",name:"Karura Network"},687:{index:"687",hex:"0x800002af",symbol:"FLON",name:"FullOn Network"},688:{index:"688",hex:"0x800002b0",symbol:"CET",name:"CoinEx Chain"},689:{index:"689",hex:"0x800002b1",symbol:"XLINK",name:"XLink Chain"},690:{index:"690",hex:"0x800002b2",symbol:"KLV",name:"KleverChain"},694:{index:"694",hex:"0x800002b6",symbol:"VTBC",name:"VTB Community"},696:{index:"696",hex:"0x800002b8",symbol:"LUM",name:"Lumos"},698:{index:"698",hex:"0x800002ba",symbol:"VEIL",name:"Veil"},699:{index:"699",hex:"0x800002bb",symbol:"GTB",name:"GotaBit"},700:{index:"700",hex:"0x800002bc",symbol:"XDAI",name:"xDai"},701:{index:"701",hex:"0x800002bd",symbol:"COM",name:"Commercio"},702:{index:"702",hex:"0x800002be",symbol:"CCC",name:"Commercio Cash Credit"},703:{index:"703",hex:"0x800002bf",symbol:"SNR",name:"Sonr"},704:{index:"704",hex:"0x800002c0",symbol:"RAQ",name:"Ra Quantum"},705:{index:"705",hex:"0x800002c1",symbol:"PEG",name:"Pegasus Token"},706:{index:"706",hex:"0x800002c2",symbol:"LKG",name:"Lionking"},707:{index:"707",hex:"0x800002c3",symbol:"MCOIN",name:"Moneta Coin"},709:{index:"709",hex:"0x800002c5",symbol:"AVAIL",name:"Avail"},710:{index:"710",hex:"0x800002c6",symbol:"FURY",name:"Highbury"},711:{index:"711",hex:"0x800002c7",symbol:"CHC",name:"Chaincoin"},712:{index:"712",hex:"0x800002c8",symbol:"SERF",name:"Serfnet"},713:{index:"713",hex:"0x800002c9",symbol:"XTL",name:"Katal Chain"},714:{index:"714",hex:"0x800002ca",symbol:"BNB",name:"Binance"},715:{index:"715",hex:"0x800002cb",symbol:"SIN",name:"Sinovate"},716:{index:"716",hex:"0x800002cc",symbol:"DLN",name:"Delion"},717:{index:"717",hex:"0x800002cd",symbol:"BONTE",name:"Bontecoin"},718:{index:"718",hex:"0x800002ce",symbol:"PEER",name:"Peer"},719:{index:"719",hex:"0x800002cf",symbol:"ZET",name:"Zetacoin"},720:{index:"720",hex:"0x800002d0",symbol:"ABY",name:"Artbyte"},721:{index:"721",hex:"0x800002d1",symbol:"PGX",name:"Mirai Chain"},722:{index:"722",hex:"0x800002d2",symbol:"IL8P",name:"InfiniLooP"},723:{index:"723",hex:"0x800002d3",symbol:"VOI",name:"Voi"},724:{index:"724",hex:"0x800002d4",symbol:"XVC",name:"Vanillacash"},725:{index:"725",hex:"0x800002d5",symbol:"MCX",name:"MultiCash"},727:{index:"727",hex:"0x800002d7",symbol:"BLU",name:"BluCrates"},728:{index:"728",hex:"0x800002d8",symbol:"BFC",name:"BFC"},730:{index:"730",hex:"0x800002da",symbol:"HEALIOS",name:"Tenacity"},731:{index:"731",hex:"0x800002db",symbol:"BMK",name:"Bitmark"},734:{index:"734",hex:"0x800002de",symbol:"DENTX",name:"DENTNet"},737:{index:"737",hex:"0x800002e1",symbol:"ATOP",name:"Financial Blockchain"},738:{index:"738",hex:"0x800002e2",symbol:"BTE",name:"Bitweb"},739:{index:"739",hex:"0x800002e3",symbol:"DPC",name:"Dpowcoin (DualPowCoin)"},747:{index:"747",hex:"0x800002eb",symbol:"CFG",name:"Centrifuge"},750:{index:"750",hex:"0x800002ee",symbol:"XPRT",name:"Persistence"},753:{index:"753",hex:"0x800002f1",symbol:"",name:"Age X25519 Encryption"},754:{index:"754",hex:"0x800002f2",symbol:"",name:"Age NIST Encryption"},757:{index:"757",hex:"0x800002f5",symbol:"HONEY",name:"HoneyWood"},765:{index:"765",hex:"0x800002fd",symbol:"TGN",name:"Tagion"},768:{index:"768",hex:"0x80000300",symbol:"BALLZ",name:"Ballzcoin"},770:{index:"770",hex:"0x80000302",symbol:"COSA",name:"Cosanta"},771:{index:"771",hex:"0x80000303",symbol:"BR",name:"BR"},773:{index:"773",hex:"0x80000305",symbol:"CSB",name:"CosmoBliss"},775:{index:"775",hex:"0x80000307",symbol:"PLSR",name:"Pulsar Coin"},776:{index:"776",hex:"0x80000308",symbol:"KEY",name:"Keymaker Coin"},777:{index:"777",hex:"0x80000309",symbol:"BTW",name:"Bitcoin World"},780:{index:"780",hex:"0x8000030c",symbol:"PLCUC",name:"PLC Ultima Classic"},781:{index:"781",hex:"0x8000030d",symbol:"PLCUX",name:"PLC Ultima X"},782:{index:"782",hex:"0x8000030e",symbol:"PLCU",name:"PLC Ultima"},783:{index:"783",hex:"0x8000030f",symbol:"SMARTBC",name:"SMART Blockchain"},784:{index:"784",hex:"0x80000310",symbol:"SUI",name:"Sui"},786:{index:"786",hex:"0x80000312",symbol:"UIDD",name:"UIDD"},787:{index:"787",hex:"0x80000313",symbol:"ACA",name:"Acala"},788:{index:"788",hex:"0x80000314",symbol:"BNC",name:"Bifrost"},789:{index:"789",hex:"0x80000315",symbol:"TAU",name:"Lamden"},794:{index:"794",hex:"0x8000031a",symbol:"INTR",name:"Interlay"},795:{index:"795",hex:"0x8000031b",symbol:"KINT",name:"Kintsugi"},799:{index:"799",hex:"0x8000031f",symbol:"PDEX",name:"Polkadex"},800:{index:"800",hex:"0x80000320",symbol:"BEET",name:"Beetle Coin"},801:{index:"801",hex:"0x80000321",symbol:"DST",name:"DSTRA"},802:{index:"802",hex:"0x80000322",symbol:"CY",name:"Cyberyen"},803:{index:"803",hex:"0x80000323",symbol:"RYME",name:"Ryme Network"},804:{index:"804",hex:"0x80000324",symbol:"ZKS",name:"zkSync"},805:{index:"805",hex:"0x80000325",symbol:"SCASH",name:"Scash"},808:{index:"808",hex:"0x80000328",symbol:"QVT",name:"Qvolta"},809:{index:"809",hex:"0x80000329",symbol:"SDN",name:"Shiden Network"},810:{index:"810",hex:"0x8000032a",symbol:"ASTR",name:"Astar Network"},813:{index:"813",hex:"0x8000032d",symbol:"MEER",name:"Qitmeer"},815:{index:"815",hex:"0x8000032f",symbol:"FACT",name:"ImFACT"},816:{index:"816",hex:"0x80000330",symbol:"FSC",name:"FSC"},818:{index:"818",hex:"0x80000332",symbol:"VET",name:"VeChain Token"},819:{index:"819",hex:"0x80000333",symbol:"REEF",name:"Reef"},820:{index:"820",hex:"0x80000334",symbol:"CLO",name:"Callisto"},822:{index:"822",hex:"0x80000336",symbol:"BDB",name:"BigchainDB"},824:{index:"824",hex:"0x80000338",symbol:"RBNT",name:"Redbelly Network"},827:{index:"827",hex:"0x8000033b",symbol:"ACE",name:"Endurance"},828:{index:"828",hex:"0x8000033c",symbol:"CCN",name:"ComputeCoin"},829:{index:"829",hex:"0x8000033d",symbol:"BBA",name:"BBACHAIN"},831:{index:"831",hex:"0x8000033f",symbol:"CRUZ",name:"cruzbit"},832:{index:"832",hex:"0x80000340",symbol:"SAPP",name:"Sapphire"},833:{index:"833",hex:"0x80000341",symbol:"777",name:"Jackpot"},834:{index:"834",hex:"0x80000342",symbol:"KYAN",name:"Kyanite"},835:{index:"835",hex:"0x80000343",symbol:"AZR",name:"Azzure"},836:{index:"836",hex:"0x80000344",symbol:"CFL",name:"CryptoFlow"},837:{index:"837",hex:"0x80000345",symbol:"DASHD",name:"Dash Diamond"},838:{index:"838",hex:"0x80000346",symbol:"TRTT",name:"Trittium"},839:{index:"839",hex:"0x80000347",symbol:"UCR",name:"Ultra Clear"},840:{index:"840",hex:"0x80000348",symbol:"PNY",name:"Peony"},841:{index:"841",hex:"0x80000349",symbol:"BECN",name:"Beacon"},842:{index:"842",hex:"0x8000034a",symbol:"MONK",name:"Monk"},843:{index:"843",hex:"0x8000034b",symbol:"SAGA",name:"CryptoSaga"},844:{index:"844",hex:"0x8000034c",symbol:"SUV",name:"Suvereno"},845:{index:"845",hex:"0x8000034d",symbol:"ESK",name:"EskaCoin"},846:{index:"846",hex:"0x8000034e",symbol:"OWO",name:"OneWorld Coin"},847:{index:"847",hex:"0x8000034f",symbol:"PEPS",name:"PEPS Coin"},848:{index:"848",hex:"0x80000350",symbol:"BIR",name:"Birake"},849:{index:"849",hex:"0x80000351",symbol:"MOBIC",name:"MobilityCoin"},850:{index:"850",hex:"0x80000352",symbol:"FLS",name:"Flits"},851:{index:"851",hex:"0x80000353",symbol:"FRECO",name:"Freco"},852:{index:"852",hex:"0x80000354",symbol:"DSM",name:"Desmos"},853:{index:"853",hex:"0x80000355",symbol:"PRCY",name:"PRCY Coin"},858:{index:"858",hex:"0x8000035a",symbol:"HVH",name:"HAVAH"},866:{index:"866",hex:"0x80000362",symbol:"MOB",name:"MobileCoin"},868:{index:"868",hex:"0x80000364",symbol:"IF",name:"Infinitefuture"},877:{index:"877",hex:"0x8000036d",symbol:"NAM",name:"Namada"},878:{index:"878",hex:"0x8000036e",symbol:"SCR",name:"Scorum Network"},880:{index:"880",hex:"0x80000370",symbol:"LUM",name:"Lum Network"},883:{index:"883",hex:"0x80000373",symbol:"ZBC",name:"ZooBC"},886:{index:"886",hex:"0x80000376",symbol:"ADF",name:"AD Token"},888:{index:"888",hex:"0x80000378",symbol:"NEO",name:"NEO"},889:{index:"889",hex:"0x80000379",symbol:"TOMO",name:"TOMO"},890:{index:"890",hex:"0x8000037a",symbol:"XSEL",name:"Seln"},896:{index:"896",hex:"0x80000380",symbol:"LKSC",name:"LKSCoin"},898:{index:"898",hex:"0x80000382",symbol:"AS",name:"Assetchain"},899:{index:"899",hex:"0x80000383",symbol:"XEC",name:"eCash"},900:{index:"900",hex:"0x80000384",symbol:"LMO",name:"Lumeneo"},901:{index:"901",hex:"0x80000385",symbol:"NXT",name:"NxtMeta"},904:{index:"904",hex:"0x80000388",symbol:"HNT",name:"Helium"},907:{index:"907",hex:"0x8000038b",symbol:"FIS",name:"StaFi"},909:{index:"909",hex:"0x8000038d",symbol:"SGE",name:"Saage"},911:{index:"911",hex:"0x8000038f",symbol:"GERT",name:"Gert"},913:{index:"913",hex:"0x80000391",symbol:"VARA",name:"Vara Network"},916:{index:"916",hex:"0x80000394",symbol:"META",name:"Metadium"},917:{index:"917",hex:"0x80000395",symbol:"FRA",name:"Findora"},919:{index:"919",hex:"0x80000397",symbol:"CCD",name:"Concordium"},921:{index:"921",hex:"0x80000399",symbol:"AVN",name:"Avian Network"},925:{index:"925",hex:"0x8000039d",symbol:"DIP",name:"Dipper Network"},928:{index:"928",hex:"0x800003a0",symbol:"GHM",name:"HermitMatrixNetwork"},931:{index:"931",hex:"0x800003a3",symbol:"RUNE",name:"THORChain (RUNE)"},938:{index:"938",hex:"0x800003aa",symbol:"MGO",name:"Mango Network"},939:{index:"939",hex:"0x800003ab",symbol:"AB",name:"Argot Protocol"},942:{index:"942",hex:"0x800003ae",symbol:"KCN",name:"Kylacoin"},943:{index:"943",hex:"0x800003af",symbol:"LCN",name:"Lyncoin"},945:{index:"945",hex:"0x800003b1",symbol:"UNLOCK",name:"Jasiri protocol"},955:{index:"955",hex:"0x800003bb",symbol:"LTP",name:"LifetionCoin"},958:{index:"958",hex:"0x800003be",symbol:"",name:"KickSoccer"},960:{index:"960",hex:"0x800003c0",symbol:"VKAX",name:"Vkax"},966:{index:"966",hex:"0x800003c6",symbol:"MATIC",name:"Matic"},968:{index:"968",hex:"0x800003c8",symbol:"UNW",name:"UNW"},969:{index:"969",hex:"0x800003c9",symbol:"QI",name:"Quai Network"},970:{index:"970",hex:"0x800003ca",symbol:"TWINS",name:"TWINS"},977:{index:"977",hex:"0x800003d1",symbol:"TLOS",name:"Telos"},981:{index:"981",hex:"0x800003d5",symbol:"TAFECO",name:"Taf ECO Chain"},985:{index:"985",hex:"0x800003d9",symbol:"AU",name:"Autonomy"},987:{index:"987",hex:"0x800003db",symbol:"VCG",name:"VipCoin"},988:{index:"988",hex:"0x800003dc",symbol:"XAZAB",name:"Xazab core"},989:{index:"989",hex:"0x800003dd",symbol:"AIOZ",name:"AIOZ"},990:{index:"990",hex:"0x800003de",symbol:"CORE",name:"Coreum"},991:{index:"991",hex:"0x800003df",symbol:"PEC",name:"Phoenix"},992:{index:"992",hex:"0x800003e0",symbol:"UNT",name:"Unit"},993:{index:"993",hex:"0x800003e1",symbol:"XRB",name:"X Currency"},994:{index:"994",hex:"0x800003e2",symbol:"QUAI",name:"Quai Network"},995:{index:"995",hex:"0x800003e3",symbol:"CAPS",name:"Ternoa"},996:{index:"996",hex:"0x800003e4",symbol:"OKT",name:"OKChain Token"},997:{index:"997",hex:"0x800003e5",symbol:"SUM",name:"Solidum"},998:{index:"998",hex:"0x800003e6",symbol:"LBTC",name:"Lightning Bitcoin"},999:{index:"999",hex:"0x800003e7",symbol:"BCD",name:"Bitcoin Diamond"},1e3:{index:"1000",hex:"0x800003e8",symbol:"BTN",name:"Bitcoin New"},1001:{index:"1001",hex:"0x800003e9",symbol:"TT",name:"ThunderCore"},1002:{index:"1002",hex:"0x800003ea",symbol:"BKT",name:"BanKitt"},1003:{index:"1003",hex:"0x800003eb",symbol:"NODL",name:"Nodle"},1004:{index:"1004",hex:"0x800003ec",symbol:"PCOIN",name:"PCOIN"},1005:{index:"1005",hex:"0x800003ed",symbol:"TAO",name:"Bittensor"},1006:{index:"1006",hex:"0x800003ee",symbol:"HSK",name:"HashKey Chain"},1007:{index:"1007",hex:"0x800003ef",symbol:"FTM",name:"Fantom"},1008:{index:"1008",hex:"0x800003f0",symbol:"RPG",name:"RPG"},1009:{index:"1009",hex:"0x800003f1",symbol:"LAKE",name:"iconLake"},1010:{index:"1010",hex:"0x800003f2",symbol:"HT",name:"Huobi ECO Chain"},1011:{index:"1011",hex:"0x800003f3",symbol:"ELV",name:"Eluvio"},1012:{index:"1012",hex:"0x800003f4",symbol:"JOC",name:"Japan Open Chain"},1013:{index:"1013",hex:"0x800003f5",symbol:"BIC",name:"Beincrypto"},1014:{index:"1014",hex:"0x800003f6",symbol:"JOY",name:"Joystream"},1015:{index:"1015",hex:"0x800003f7",symbol:"ZCX",name:"ZEN Exchange Token"},1020:{index:"1020",hex:"0x800003fc",symbol:"EVC",name:"Evrice"},1022:{index:"1022",hex:"0x800003fe",symbol:"XRD",name:"Radix DLT"},1023:{index:"1023",hex:"0x800003ff",symbol:"ONE",name:"HARMONY-ONE (Legacy)"},1024:{index:"1024",hex:"0x80000400",symbol:"ONT",name:"Ontology"},1025:{index:"1025",hex:"0x80000401",symbol:"CZZ",name:"Classzz"},1026:{index:"1026",hex:"0x80000402",symbol:"KEX",name:"Kira Exchange Token"},1027:{index:"1027",hex:"0x80000403",symbol:"MCM",name:"Mochimo"},1028:{index:"1028",hex:"0x80000404",symbol:"PLS",name:"Pulse Coin"},1032:{index:"1032",hex:"0x80000408",symbol:"BTCR",name:"BTCR"},1042:{index:"1042",hex:"0x80000412",symbol:"MFID",name:"Moonfish ID"},1111:{index:"1111",hex:"0x80000457",symbol:"BBC",name:"Big Bitcoin"},1116:{index:"1116",hex:"0x8000045c",symbol:"CORE",name:"Core"},1120:{index:"1120",hex:"0x80000460",symbol:"RISE",name:"RISE"},1122:{index:"1122",hex:"0x80000462",symbol:"CMT",name:"CyberMiles Token"},1128:{index:"1128",hex:"0x80000468",symbol:"ETSC",name:"Ethereum Social"},1129:{index:"1129",hex:"0x80000469",symbol:"DFI",name:"DeFiChain"},1130:{index:"1130",hex:"0x8000046a",symbol:"DFI",name:"DeFiChain EVM Network"},1137:{index:"1137",hex:"0x80000471",symbol:"$DAG",name:"Constellation Labs"},1145:{index:"1145",hex:"0x80000479",symbol:"CDY",name:"Bitcoin Candy"},1155:{index:"1155",hex:"0x80000483",symbol:"ENJ",name:"Enjin Coin"},1170:{index:"1170",hex:"0x80000492",symbol:"HOO",name:"Hoo Smart Chain"},1234:{index:"1234",hex:"0x800004d2",symbol:"ALPH",name:"Alephium"},1236:{index:"1236",hex:"0x800004d4",symbol:"",name:"Masca"},1237:{index:"1237",hex:"0x800004d5",symbol:"",name:"Nostr"},1280:{index:"1280",hex:"0x80000500",symbol:"",name:"Kudos Setler"},1284:{index:"1284",hex:"0x80000504",symbol:"GLMR",name:"Moonbeam"},1285:{index:"1285",hex:"0x80000505",symbol:"MOVR",name:"Moonriver"},1286:{index:"1286",hex:"0x80000506",symbol:"DSG",name:"Dessage Social Protocol"},1298:{index:"1298",hex:"0x80000512",symbol:"WPC",name:"Wpc"},1308:{index:"1308",hex:"0x8000051c",symbol:"WEI",name:"WEI"},1312:{index:"1312",hex:"0x80000520",symbol:"BITS",name:"Entropy"},1337:{index:"1337",hex:"0x80000539",symbol:"DFC",name:"Defcoin"},1338:{index:"1338",hex:"0x8000053a",symbol:"IRON",name:"Iron Fish"},1348:{index:"1348",hex:"0x80000544",symbol:"ISLM",name:"IslamicCoin"},1397:{index:"1397",hex:"0x80000575",symbol:"HYC",name:"Hycon"},1410:{index:"1410",hex:"0x80000582",symbol:"TENTSLP",name:"TENT Simple Ledger Protocol"},1510:{index:"1510",hex:"0x800005e6",symbol:"XSC",name:"XT Smart Chain"},1512:{index:"1512",hex:"0x800005e8",symbol:"AAC",name:"Double-A Chain"},1524:{index:"1524",hex:"0x800005f4",symbol:"",name:"Taler"},1533:{index:"1533",hex:"0x800005fd",symbol:"BEAM",name:"Beam"},1536:{index:"1536",hex:"0x80000600",symbol:"GAS",name:"BubiChain"},1540:{index:"1540",hex:"0x80000604",symbol:"ATHENA",name:"Athena"},1551:{index:"1551",hex:"0x8000060f",symbol:"SDK",name:"Sovereign SDK"},1555:{index:"1555",hex:"0x80000613",symbol:"APC",name:"Apc Chain"},1616:{index:"1616",hex:"0x80000650",symbol:"ELF",name:"AELF"},1618:{index:"1618",hex:"0x80000652",symbol:"AUDL",name:"AUDL"},1620:{index:"1620",hex:"0x80000654",symbol:"ATH",name:"Atheios"},1627:{index:"1627",hex:"0x8000065b",symbol:"LUME",name:"Lume Web"},1642:{index:"1642",hex:"0x8000066a",symbol:"NEW",name:"Newton"},1657:{index:"1657",hex:"0x80000679",symbol:"BTA",name:"Btachain"},1668:{index:"1668",hex:"0x80000684",symbol:"NEOX",name:"Neoxa"},1669:{index:"1669",hex:"0x80000685",symbol:"MEWC",name:"Meowcoin"},1688:{index:"1688",hex:"0x80000698",symbol:"BCX",name:"BitcoinX"},1729:{index:"1729",hex:"0x800006c1",symbol:"XTZ",name:"Tezos"},1776:{index:"1776",hex:"0x800006f0",symbol:"LBTC",name:"Liquid BTC"},1777:{index:"1777",hex:"0x800006f1",symbol:"BBP",name:"Biblepay"},1784:{index:"1784",hex:"0x800006f8",symbol:"JPYS",name:"JPY Stablecoin"},1789:{index:"1789",hex:"0x800006fd",symbol:"VEGA",name:"Vega Protocol"},1815:{index:"1815",hex:"0x80000717",symbol:"ADA",name:"Cardano"},1818:{index:"1818",hex:"0x8000071a",symbol:"CUBE",name:"Cube Chain Native Token"},1856:{index:"1856",hex:"0x80000743",symbol:"TES",name:"Teslacoin"},1888:{index:"1888",hex:"0x80000760",symbol:"ZTX",name:"Zetrix"},1899:{index:"1899",hex:"0x8000076b",symbol:"XEC",name:"eCash token"},1900:{index:"1900",hex:"0x8000076c",symbol:"XNA",name:"Neurai"},1901:{index:"1901",hex:"0x8000076d",symbol:"CLC",name:"Classica"},1907:{index:"1907",hex:"0x80000773",symbol:"BITCI",name:"Bitcicoin"},1919:{index:"1919",hex:"0x8000077f",symbol:"VIPS",name:"VIPSTARCOIN"},1926:{index:"1926",hex:"0x80000786",symbol:"CITY",name:"City Coin"},1951:{index:"1951",hex:"0x8000079f",symbol:"ESA",name:"Esa"},1952:{index:"1952",hex:"0x800007a0",symbol:"ESC",name:"EsaCoin"},1955:{index:"1955",hex:"0x800007a3",symbol:"XX",name:"xx coin"},1977:{index:"1977",hex:"0x800007b9",symbol:"XMX",name:"Xuma"},1984:{index:"1984",hex:"0x800007c0",symbol:"TRTL",name:"TurtleCoin"},1985:{index:"1985",hex:"0x800007c1",symbol:"SLRT",name:"Solarti Chain"},1986:{index:"1986",hex:"0x800007c2",symbol:"QTH",name:"Qing Tong Horizon"},1987:{index:"1987",hex:"0x800007c3",symbol:"EGEM",name:"EtherGem"},1988:{index:"1988",hex:"0x800007c4",symbol:"MIRA",name:"Mira Chain"},1989:{index:"1989",hex:"0x800007c5",symbol:"HODL",name:"HOdlcoin"},1990:{index:"1990",hex:"0x800007c6",symbol:"PHL",name:"Placeholders"},1991:{index:"1991",hex:"0x800007c7",symbol:"SC",name:"Sia"},1996:{index:"1996",hex:"0x800007cc",symbol:"MYT",name:"Mineyourtime"},1997:{index:"1997",hex:"0x800007cd",symbol:"POLIS",name:"Polis"},1998:{index:"1998",hex:"0x800007ce",symbol:"XMCC",name:"Monoeci"},1999:{index:"1999",hex:"0x800007cf",symbol:"COLX",name:"ColossusXT"},2e3:{index:"2000",hex:"0x800007d0",symbol:"GIN",name:"GinCoin"},2001:{index:"2001",hex:"0x800007d1",symbol:"MNP",name:"MNPCoin"},2002:{index:"2002",hex:"0x800007d2",symbol:"MLN",name:"Miraland"},2015:{index:"2015",hex:"0x800007df",symbol:"TEER",name:"Integritee"},2017:{index:"2017",hex:"0x800007e1",symbol:"KIN",name:"Kin"},2018:{index:"2018",hex:"0x800007e2",symbol:"EOSC",name:"EOSClassic"},2019:{index:"2019",hex:"0x800007e3",symbol:"GBT",name:"GoldBean Token"},2020:{index:"2020",hex:"0x800007e4",symbol:"PKC",name:"PKC"},2021:{index:"2021",hex:"0x800007e5",symbol:"SKT",name:"Sukhavati"},2022:{index:"2022",hex:"0x800007e6",symbol:"XHT",name:"Xinghuo Token"},2023:{index:"2023",hex:"0x800007e7",symbol:"COC",name:"Chat On Chain"},2024:{index:"2024",hex:"0x800007e8",symbol:"USBC",name:"Universal Ledger USBC"},2025:{index:"2025",hex:"0x800007e9",symbol:"ROCK",name:"Zenrock Labs"},2026:{index:"2026",hex:"0x800007ea",symbol:"ASTRON",name:"ASTRON Token"},2046:{index:"2046",hex:"0x800007fe",symbol:"ANY",name:"Any"},2048:{index:"2048",hex:"0x80000800",symbol:"MCASH",name:"MCashChain"},2049:{index:"2049",hex:"0x80000801",symbol:"TRUE",name:"TrueChain"},2050:{index:"2050",hex:"0x80000802",symbol:"MOVO",name:"Movo Smart Chain"},2086:{index:"2086",hex:"0x80000826",symbol:"KILT",name:"KILT Spiritnet"},2091:{index:"2091",hex:"0x8000082b",symbol:"FRQCY",name:"Frequency"},2109:{index:"2109",hex:"0x8000083d",symbol:"SAMA",name:"Exosama Network"},2112:{index:"2112",hex:"0x80000840",symbol:"IoTE",name:"IoTE"},2125:{index:"2125",hex:"0x8000084d",symbol:"BAY",name:"BitBay"},2137:{index:"2137",hex:"0x80000859",symbol:"XRG",name:"Ergon"},2199:{index:"2199",hex:"0x80000897",symbol:"SAMA",name:"Moonsama Network"},2221:{index:"2221",hex:"0x800008ad",symbol:"ASK",name:"ASK"},2222:{index:"2222",hex:"0x800008ae",symbol:"CWEB",name:"Coinweb"},2285:{index:"2285",hex:"0x800008ed",symbol:"",name:"Qiyi Chain"},2301:{index:"2301",hex:"0x800008fd",symbol:"QTUM",name:"QTUM"},2302:{index:"2302",hex:"0x800008fe",symbol:"ETP",name:"Metaverse"},2303:{index:"2303",hex:"0x800008ff",symbol:"GXC",name:"GXChain"},2304:{index:"2304",hex:"0x80000900",symbol:"CRP",name:"CranePay"},2305:{index:"2305",hex:"0x80000901",symbol:"ELA",name:"Elastos"},2338:{index:"2338",hex:"0x80000922",symbol:"SNOW",name:"Snowblossom"},2365:{index:"2365",hex:"0x8000093d",symbol:"XIN",name:"Mixin"},2500:{index:"2500",hex:"0x800009c4",symbol:"NEXI",name:"Nexi"},2570:{index:"2570",hex:"0x80000a0a",symbol:"AOA",name:"Aurora"},2686:{index:"2686",hex:"0x80000a7e",symbol:"AIPG",name:"AIPowerGrid"},2718:{index:"2718",hex:"0x80000a9e",symbol:"NAS",name:"Nebulas"},2809:{index:"2809",hex:"0x80000af9",symbol:"LAN",name:"Lanify"},2894:{index:"2894",hex:"0x80000b4e",symbol:"REOSC",name:"REOSC Ecosystem"},2941:{index:"2941",hex:"0x80000b7d",symbol:"BND",name:"Blocknode"},3e3:{index:"3000",hex:"0x80000bb8",symbol:"SM",name:"Stealth Message"},3003:{index:"3003",hex:"0x80000bbb",symbol:"LUX",name:"LUX"},3030:{index:"3030",hex:"0x80000bd6",symbol:"HBAR",name:"Hedera HBAR"},3077:{index:"3077",hex:"0x80000c05",symbol:"COS",name:"Contentos"},3276:{index:"3276",hex:"0x80000ccc",symbol:"CCC",name:"CodeChain"},3333:{index:"3333",hex:"0x80000d05",symbol:"SXP",name:"Solar"},3338:{index:"3338",hex:"0x80000d0a",symbol:"PEAQ",name:"peaq"},3344:{index:"3344",hex:"0x80000d10",symbol:"PLMC",name:"Polimec"},3377:{index:"3377",hex:"0x80000d31",symbol:"ROI",name:"ROIcoin"},3381:{index:"3381",hex:"0x80000d35",symbol:"DYN",name:"Dynamic"},3383:{index:"3383",hex:"0x80000d37",symbol:"SEQ",name:"Sequence"},3434:{index:"3434",hex:"0x80000d6a",symbol:"PEPE",name:"Pepecoin Core"},3501:{index:"3501",hex:"0x80000dad",symbol:"JFIN",name:"JFIN Coin"},3552:{index:"3552",hex:"0x80000de0",symbol:"DEO",name:"Destocoin"},3564:{index:"3564",hex:"0x80000dec",symbol:"DST",name:"DeStream"},3601:{index:"3601",hex:"0x80000e11",symbol:"CY",name:"Cybits"},3757:{index:"3757",hex:"0x80000ead",symbol:"MPC",name:"Partisia Blockchain"},3840:{index:"3840",hex:"0x80000f00",symbol:"RED",name:"ReDeFi RED"},4040:{index:"4040",hex:"0x80000fc8",symbol:"FC8",name:"FCH Network"},4096:{index:"4096",hex:"0x80001000",symbol:"YEE",name:"YeeCo"},4218:{index:"4218",hex:"0x8000107a",symbol:"IOTA",name:"IOTA"},4219:{index:"4219",hex:"0x8000107b",symbol:"SMR",name:"Shimmer"},4242:{index:"4242",hex:"0x80001092",symbol:"AXE",name:"Axe"},4343:{index:"4343",hex:"0x800010f7",symbol:"XYM",name:"Symbol"},4444:{index:"4444",hex:"0x8000115c",symbol:"C4E",name:"Chain4Energy"},4919:{index:"4919",hex:"0x80001337",symbol:"XVM",name:"Venidium"},4999:{index:"4999",hex:"0x80001387",symbol:"BXN",name:"BlackFort Exchange Network"},5e3:{index:"5000",hex:"0x80001388",symbol:"V12",name:"Vet The Vote"},5006:{index:"5006",hex:"0x8000138e",symbol:"SBC",name:"Senior Blockchain"},5248:{index:"5248",hex:"0x80001480",symbol:"FIC",name:"FIC"},5353:{index:"5353",hex:"0x800014e9",symbol:"HNS",name:"Handshake"},5404:{index:"5404",hex:"0x8000151c",symbol:"ISK",name:"ISKRA"},5467:{index:"5467",hex:"0x8000155b",symbol:"ALTME",name:"ALTME"},5555:{index:"5555",hex:"0x800015b3",symbol:"FUND",name:"Unification"},5757:{index:"5757",hex:"0x8000167d",symbol:"STX",name:"Stacks"},5895:{index:"5895",hex:"0x80001707",symbol:"VOW",name:"VowChain VOW"},5920:{index:"5920",hex:"0x80001720",symbol:"SLU",name:"SILUBIUM"},5995:{index:"5995",hex:"0x8000176B",symbol:"DUSK",name:"Dusk Network"},6060:{index:"6060",hex:"0x800017ac",symbol:"GO",name:"GoChain GO"},6144:{index:"6144",hex:"0x80001800",symbol:"DTS",name:"Datos"},6174:{index:"6174",hex:"0x8000181e",symbol:"MOI",name:"My Own Internet"},6278:{index:"6278",hex:"0x80001886",symbol:"STEAMX",name:"Rails Network Mainnet"},6532:{index:"6532",hex:"0x80001984",symbol:"UM",name:"Penumbra"},6599:{index:"6599",hex:"0x800019c7",symbol:"RSC",name:"Royal Sports City"},6666:{index:"6666",hex:"0x80001a0a",symbol:"BPA",name:"Bitcoin Pizza"},6688:{index:"6688",hex:"0x80001a20",symbol:"SAFE",name:"SAFE"},6779:{index:"6779",hex:"0x80001a7b",symbol:"COTI",name:"COTI"},6969:{index:"6969",hex:"0x80001b39",symbol:"ROGER",name:"TheHolyrogerCoin"},7e3:{index:"7000",hex:"0x80001b58",symbol:"ZETA",name:"ZetaChain"},7027:{index:"7027",hex:"0x80001b73",symbol:"ELLA",name:"Ella the heart"},7028:{index:"7028",hex:"0x80001b74",symbol:"AA",name:"Arthera"},7091:{index:"7091",hex:"0x80001bb3",symbol:"TOPL",name:"Topl"},7331:{index:"7331",hex:"0x80001ca3",symbol:"KLY",name:"KLYNTAR"},7341:{index:"7341",hex:"0x80001cad",symbol:"SHFT",name:"Shyft"},7518:{index:"7518",hex:"0x80001d5e",symbol:"MEV",name:"MEVerse"},7576:{index:"7576",hex:"0x80001d98",symbol:"ADIL",name:"ADIL Chain"},7777:{index:"7777",hex:"0x80001e61",symbol:"BTV",name:"Bitvote"},7779:{index:"7779",hex:"0x80001e63",symbol:"CPV",name:"Compverse"},8e3:{index:"8000",hex:"0x80001f40",symbol:"SKY",name:"Skycoin"},8017:{index:"8017",hex:"0x80001f51",symbol:"ISC",name:"iSunCoin"},8080:{index:"8080",hex:"0x80001f90",symbol:"",name:"DSRV"},8181:{index:"8181",hex:"0x80001ff5",symbol:"BOC",name:"BeOne Chain"},8192:{index:"8192",hex:"0x80002000",symbol:"PAC",name:"pacprotocol"},8217:{index:"8217",hex:"0x80002019",symbol:"KLAY",name:"KLAY"},8339:{index:"8339",hex:"0x80002093",symbol:"BTQ",name:"BitcoinQuark"},8444:{index:"8444",hex:"0x800020fc",symbol:"XCH",name:"Chia"},8453:{index:"8453",hex:"0x80002105",symbol:"",name:"Base"},8680:{index:"8680",hex:"0x800021e8",symbol:"PLMNT",name:"Planetmint"},8732:{index:"8732",hex:"0x8000221c",symbol:"BLN",name:"Bullions"},8866:{index:"8866",hex:"0x800022a2",symbol:"GGX",name:"Golden Gate"},8886:{index:"8886",hex:"0x800022b6",symbol:"GGXT",name:"Golden Gate Sydney"},8888:{index:"8888",hex:"0x800022b8",symbol:"SBTC",name:"Super Bitcoin"},8964:{index:"8964",hex:"0x80002304",symbol:"NULS",name:"NULS"},8997:{index:"8997",hex:"0x80002325",symbol:"BBC",name:"Babacoin"},8998:{index:"8998",hex:"0x80002326",symbol:"JGC",name:"JagoanCoin"},8999:{index:"8999",hex:"0x80002327",symbol:"BTP",name:"Bitcoin Pay"},9e3:{index:"9000",hex:"0x80002328",symbol:"AVAX",name:"Avalanche"},9001:{index:"9001",hex:"0x80002329",symbol:"ARB1",name:"Arbitrum"},9002:{index:"9002",hex:"0x8000232a",symbol:"BOBA",name:"Boba"},9003:{index:"9003",hex:"0x8000232b",symbol:"LOOP",name:"Loopring"},9004:{index:"9004",hex:"0x8000232c",symbol:"STRK",name:"StarkNet"},9005:{index:"9005",hex:"0x8000232d",symbol:"AVAXC",name:"Avalanche C-Chain"},9006:{index:"9006",hex:"0x8000232e",symbol:"BSC",name:"Binance Smart Chain"},9797:{index:"9797",hex:"0x80002645",symbol:"NRG",name:"Energi"},9888:{index:"9888",hex:"0x800026a0",symbol:"BTF",name:"Bitcoin Faith"},9999:{index:"9999",hex:"0x8000270f",symbol:"GOD",name:"Bitcoin God"},1e4:{index:"10000",hex:"0x80002710",symbol:"FO",name:"FIBOS"},10001:{index:"10001",hex:"0x80002711",symbol:"SPACE",name:"Space"},10111:{index:"10111",hex:"0x8000277f",symbol:"DHP",name:"dHealth"},10226:{index:"10226",hex:"0x800027f2",symbol:"RTM",name:"Raptoreum"},10242:{index:"10242",hex:"0x80002802",symbol:"AA",name:"Arthera"},10291:{index:"10291",hex:"0x80002833",symbol:"XRC",name:"XRhodium"},10507:{index:"10507",hex:"0x8000290b",symbol:"NUM",name:"Numbers Protocol"},10605:{index:"10605",hex:"0x8000296d",symbol:"XPI",name:"Lotus"},11111:{index:"11111",hex:"0x80002b67",symbol:"ESS",name:"Essentia One"},11742:{index:"11742",hex:"0x80002dde",symbol:"VARCH",name:"InvArch"},11743:{index:"11743",hex:"0x80002ddf",symbol:"TNKR",name:"Tinkernet"},12345:{index:"12345",hex:"0x80003039",symbol:"IPOS",name:"IPOS"},12586:{index:"12586",hex:"0x8000312a",symbol:"MINA",name:"Mina"},13107:{index:"13107",hex:"0x80003333",symbol:"BTY",name:"BitYuan"},13108:{index:"13108",hex:"0x80003334",symbol:"YCC",name:"Yuan Chain Coin"},13381:{index:"13381",hex:"0x80003445",symbol:"PHX",name:"Phoenix"},14001:{index:"14001",hex:"0x800036b1",symbol:"WAX",name:"Worldwide Asset Exchange"},15845:{index:"15845",hex:"0x80003de5",symbol:"SDGO",name:"SanDeGo"},16181:{index:"16181",hex:"0x80003f35",symbol:"XTX",name:"Totem Live Network"},16754:{index:"16754",hex:"0x80004172",symbol:"ARDR",name:"Ardor"},18e3:{index:"18000",hex:"0x80004650",symbol:"MTR",name:"Meter"},19165:{index:"19165",hex:"0x80004add",symbol:"SAFE",name:"Safecoin"},19167:{index:"19167",hex:"0x80004adf",symbol:"FLUX",name:"Flux"},19169:{index:"19169",hex:"0x80004ae1",symbol:"RITO",name:"Ritocoin"},19788:{index:"19788",hex:"0x80004d4c",symbol:"ML",name:"Mintlayer"},20036:{index:"20036",hex:"0x80004e44",symbol:"XND",name:"ndau"},21004:{index:"21004",hex:"0x8000520c",symbol:"C4EI",name:"c4ei"},21337:{index:"21337",hex:"0x80005359",symbol:"XAH",name:"Xahau"},21888:{index:"21888",hex:"0x80005580",symbol:"PAC",name:"Pactus"},22504:{index:"22504",hex:"0x800057e8",symbol:"PWR",name:"PWRcoin"},23e3:{index:"23000",hex:"0x800059d8",symbol:"EPIC",name:"Epic Cash"},25252:{index:"25252",hex:"0x800062a4",symbol:"BELL",name:"Bellcoin"},25718:{index:"25718",hex:"0x80006476",symbol:"CHX",name:"Own"},26417:{index:"26417",hex:"0x80006731",symbol:"G1",name:"Ğ1"},29223:{index:"29223",hex:"0x80007227",symbol:"NEXA",name:"Nexa"},31102:{index:"31102",hex:"0x8000797e",symbol:"ESN",name:"EtherSocial Network"},31337:{index:"31337",hex:"0x80007a69",symbol:"",name:"ThePower"},33416:{index:"33416",hex:"0x80008288",symbol:"TEO",name:"Trust Eth reOrigin"},33878:{index:"33878",hex:"0x80008456",symbol:"BTCS",name:"Bitcoin Stake"},34952:{index:"34952",hex:"0x80008888",symbol:"BTT",name:"ByteTrade"},37992:{index:"37992",hex:"0x80009468",symbol:"FXTC",name:"FixedTradeCoin"},39321:{index:"39321",hex:"0x80009999",symbol:"AMA",name:"Amabig"},42069:{index:"42069",hex:"0x8000a455",symbol:"FACT",name:"FACT0RN"},43028:{index:"43028",hex:"0x8000a814",symbol:"AXIV",name:"AXIV"},47803:{index:"47803",hex:"0x8000babb",symbol:"BAX",name:"BAX"},49262:{index:"49262",hex:"0x8000c06e",symbol:"EVE",name:"evan"},49344:{index:"49344",hex:"0x8000c0c0",symbol:"STASH",name:"STASH"},52752:{index:"52752",hex:"0x8000ce10",symbol:"CELO",name:"Celo"},54176:{index:"54176",hex:"0x8000d3a0",symbol:"OVER",name:"OverProtocol"},61616:{index:"61616",hex:"0x8000f0b0",symbol:"TH",name:"TianHe"},65536:{index:"65536",hex:"0x80010000",symbol:"KETH",name:"Krypton World"},69420:{index:"69420",hex:"0x80010f2c",symbol:"GRLC",name:"Garlicoin"},70007:{index:"70007",hex:"0x80011177",symbol:"GWL",name:"Gewel"},77777:{index:"77777",hex:"0x80012fd1",symbol:"ZYN",name:"Wethio"},83293:{index:"83293",hex:"0x8001455d",symbol:"QUBIC",name:"Qubic"},88888:{index:"88888",hex:"0x80015b38",symbol:"RYO",name:"c0ban"},99999:{index:"99999",hex:"0x8001869f",symbol:"WICC",name:"Waykichain"},100500:{index:"100500",hex:"0x80018894",symbol:"HOME",name:"HomeCoin"},101010:{index:"101010",hex:"0x80018a92",symbol:"STC",name:"Starcoin"},104109:{index:"104109",hex:"0x800196ad",symbol:"",name:"Seed Hypermedia"},105105:{index:"105105",hex:"0x80019a91",symbol:"STRAX",name:"Strax"},111111:{index:"111111",hex:"0x8001b207",symbol:"KAS",name:"Kaspa"},121337:{index:"121337",hex:"0x8001d9f9",symbol:"KLS",name:"Karlsen"},123456:{index:"123456",hex:"0x8001e240",symbol:"SPR",name:"Spectre"},130822:{index:"130822",hex:"0x8001ff06",symbol:"WBT",name:"WhiteBIT Coin"},161803:{index:"161803",hex:"0x8002780b",symbol:"APTA",name:"Bloqs4Good"},200625:{index:"200625",hex:"0x80030fb1",symbol:"AKA",name:"Akroma"},200901:{index:"200901",hex:"0x800310c5",symbol:"BTR",name:"Bitlayer"},224433:{index:"224433",hex:"0x80036cb1",symbol:"CONET",name:"CONET Holesky Network"},246529:{index:"246529",hex:"0x8003c301",symbol:"ATS",name:"ARTIS sigma1"},261131:{index:"261131",hex:"0x8003fc0b",symbol:"ZAMA",name:"Zama"},314159:{index:"314159",hex:"0x8004cb2f",symbol:"PI",name:"Pi Network"},333332:{index:"333332",hex:"0x80051614",symbol:"VALUE",name:"Value Chain"},333333:{index:"333333",hex:"0x80051615",symbol:"3333",name:"Pi Value Consensus"},424242:{index:"424242",hex:"0x80067932",symbol:"X42",name:"x42"},534352:{index:"534352",hex:"0x80082750",symbol:"SCR",name:"Scroll"},666666:{index:"666666",hex:"0x800a2c2a",symbol:"VITE",name:"Vite"},696365:{index:"696365",hex:"0x800b3206",symbol:"ICE",name:"Ice Network"},888888:{index:"888888",hex:"0x800d9038",symbol:"SEA",name:"Second Exchange Alliance"},999999:{index:"999999",hex:"0x800c9061",symbol:"WTC",name:"WaltonChain"},1048576:{index:"1048576",hex:"0x80100000",symbol:"AMAX",name:"Armonia Meta Chain"},1171337:{index:"1171337",hex:"0x8011df89",symbol:"ILT",name:"iOlite"},1313114:{index:"1313114",hex:"0x8014095a",symbol:"ETHO",name:"Etho Protocol"},1313500:{index:"1313500",hex:"0x80140adc",symbol:"XERO",name:"Xerom"},1712144:{index:"1712144",hex:"0x801a2010",symbol:"LAX",name:"LAPO"},3924011:{index:"3924011",hex:"0x803be02b",symbol:"EPK",name:"EPIK Protocol"},4741444:{index:"4741444",hex:"0x80485944",symbol:"HYD",name:"Hydra Token"},5249353:{index:"5249353",hex:"0x80501949",symbol:"BCO",name:"BitcoinOre"},5249354:{index:"5249354",hex:"0x8050194a",symbol:"BHD",name:"BitcoinHD"},5264462:{index:"5264462",hex:"0x8050544e",symbol:"PTN",name:"PalletOne"},5655640:{index:"5655640",hex:"0x80564c58",symbol:"VLX",name:"Velas"},5718350:{index:"5718350",hex:"0x8057414e",symbol:"WAN",name:"Wanchain"},5741564:{index:"5741564",hex:"0x80579bfc",symbol:"WAVES",name:"Waves"},5741565:{index:"5741565",hex:"0x80579bfd",symbol:"WEST",name:"Waves Enterprise"},6382179:{index:"6382179",hex:"0x80616263",symbol:"ABC",name:"Abcmint"},6517357:{index:"6517357",hex:"0x8063726d",symbol:"CRM",name:"Creamcoin"},7171666:{index:"7171666",hex:"0x806d6e52",symbol:"BROCK",name:"Bitrock"},7562605:{index:"7562605",hex:"0x8073656d",symbol:"SEM",name:"Semux"},7567736:{index:"7567736",hex:"0x80737978",symbol:"ION",name:"ION"},7777777:{index:"7777777",hex:"0x8076adf1",symbol:"FCT",name:"FirmaChain"},7825266:{index:"7825266",hex:"0x80776772",symbol:"WGR",name:"WGR"},7825267:{index:"7825267",hex:"0x80776773",symbol:"OBSR",name:"OBServer"},8163271:{index:"8163271",hex:"0x807c8fc7",symbol:"AFS",name:"ANFS"},11259375:{index:"11259375",hex:"0x80abcdef",symbol:"LBR",name:"0L"},15118976:{index:"15118976",hex:"0x80e6b280",symbol:"XDS",name:"XDS"},20230101:{index:"20230101",hex:"0x8134afd5",symbol:"ROH",name:"Rooch"},20240430:{index:"20240430",hex:"0x8134d82e",symbol:"NLK",name:"NuLinkCoin"},61717561:{index:"61717561",hex:"0x83adbc39",symbol:"AQUA",name:"Aquachain"},77777777:{index:"77777777",hex:"0x84a2cb71",symbol:"AZT",name:"Aztecoin"},88888888:{index:"88888888",hex:"0x854c5638",symbol:"HATCH",name:"Hatch"},91927009:{index:"91927009",hex:"0x857ab1e1",symbol:"kUSD",name:"kUSD"},99999996:{index:"99999996",hex:"0x85f5e0fc",symbol:"GENS",name:"GENS"},99999997:{index:"99999997",hex:"0x85f5e0fd",symbol:"EQ",name:"EQ"},99999998:{index:"99999998",hex:"0x85f5e0fe",symbol:"FLUID",name:"Fluid Chains"},99999999:{index:"99999999",hex:"0x85f5e0ff",symbol:"QKC",name:"QuarkChain"},608589380:{index:"608589380",hex:"0xa4465644",symbol:"FVDC",name:"ForumCoin"},1179993420:{index:"1179993420",hex:"0xc655454c",symbol:"",name:"Fuel"},1179993421:{index:"1179993421",hex:"0xc655454d",symbol:"TTNC",name:"TakeTitan"},1179993431:{index:"1179993431",hex:"0xc6554557",symbol:"MTGBP",name:"MTGBP"},1179993441:{index:"1179993441",hex:"0xc6554561",symbol:"QFS",name:"Qfs"},1179993451:{index:"1179993451",hex:"0xc655456b",symbol:"RWA",name:"Asset Chain"}}}}},{package:"@metamask/snaps-utils>@metamask/slip44",file:"node_modules/@metamask/slip44/slip44.json"}],[2628,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r;Object.defineProperty(n,"__esModule",{value:!0}),n.cancellationReasonToStatusMap=n.ClientId=n.SmartTransactionStatuses=n.SmartTransactionCancellationReason=n.SmartTransactionMinedTx=n.APIType=void 0,function(e){e[e.GET_FEES=0]="GET_FEES",e[e.ESTIMATE_GAS=1]="ESTIMATE_GAS",e[e.SUBMIT_TRANSACTIONS=2]="SUBMIT_TRANSACTIONS",e[e.CANCEL=3]="CANCEL",e[e.BATCH_STATUS=4]="BATCH_STATUS",e[e.LIVENESS=5]="LIVENESS"}(n.APIType||(n.APIType={})),function(e){e.NOT_MINED="not_mined",e.SUCCESS="success",e.CANCELLED="cancelled",e.REVERTED="reverted",e.UNKNOWN="unknown"}(n.SmartTransactionMinedTx||(n.SmartTransactionMinedTx={})),function(e){e.WOULD_REVERT="would_revert",e.TOO_CHEAP="too_cheap",e.DEADLINE_MISSED="deadline_missed",e.INVALID_NONCE="invalid_nonce",e.USER_CANCELLED="user_cancelled",e.NOT_CANCELLED="not_cancelled"}(s=n.SmartTransactionCancellationReason||(n.SmartTransactionCancellationReason={})),function(e){e.PENDING="pending",e.SUCCESS="success",e.REVERTED="reverted",e.UNKNOWN="unknown",e.CANCELLED="cancelled",e.CANCELLED_USER_CANCELLED="cancelled_user_cancelled",e.RESOLVED="resolved"}(r=n.SmartTransactionStatuses||(n.SmartTransactionStatuses={})),function(e){e.Mobile="mobile",e.Extension="extension"}(n.ClientId||(n.ClientId={})),n.cancellationReasonToStatusMap={[s.WOULD_REVERT]:r.CANCELLED,[s.TOO_CHEAP]:r.CANCELLED,[s.DEADLINE_MISSED]:r.CANCELLED,[s.INVALID_NONCE]:r.CANCELLED,[s.USER_CANCELLED]:r.CANCELLED_USER_CANCELLED}}}},{package:"@metamask/smart-transactions-controller",file:"node_modules/@metamask/smart-transactions-controller/dist/types.js"}],[2681,{"./caveats/index.cjs":2683,"./enum.cjs":2686,"@metamask/permission-controller":2393,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getAssetsCaveatMapper=n.assetsEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/snaps-utils"),i=e("@metamask/utils"),a=e("./caveats/index.cjs"),o=e("./enum.cjs").SnapEndowments.Assets;n.assetsEndowmentBuilder=Object.freeze({targetName:o,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:o,allowedCaveats:[r.SnapCaveatType.ChainIds],endowmentGetter:e=>null,subjectTypes:[s.SubjectType.Snap],validator:(0,a.createGenericPermissionValidator)([{type:r.SnapCaveatType.ChainIds},{type:r.SnapCaveatType.MaxRequestTime,optional:!0}])})}),n.getAssetsCaveatMapper=function(e){return(0,i.assert)((0,i.isObject)(e)&&e.scopes),{caveats:[{type:r.SnapCaveatType.ChainIds,value:e.scopes}]}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/assets.cjs"}],[2682,{"@metamask/rpc-errors":2554},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createGenericPermissionValidator=void 0;const s=e("@metamask/rpc-errors");n.createGenericPermissionValidator=function(e){const t=new Set(e.map((e=>e.type))),n=e.filter((e=>!e.optional));return function({caveats:r}){const i=r??[],a=i.map((e=>e.type)),o=new Set(a);if(o.size!==a.length)throw s.rpcErrors.invalidParams({message:"Duplicate caveats are not allowed."});if(!i.every((e=>t.has(e.type))))throw s.rpcErrors.invalidParams({message:`Expected the following caveats: ${e.map((e=>`"${e.type}"`)).join(", ")}, received ${i.map((e=>`"${e.type}"`)).join(", ")}.`});if(!n.every((e=>o.has(e.type))))throw s.rpcErrors.invalidParams({message:`Expected the following caveats: ${n.map((e=>`"${e.type}"`)).join(", ")}.`})}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/caveats/generic.cjs"}],[2683,{"./generic.cjs":2682,"./requestTime.cjs":2684},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./generic.cjs"),n),r(e("./requestTime.cjs"),n)}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/caveats/index.cjs"}],[2684,{"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.maxRequestTimeCaveatSpecifications=n.getMaxRequestTimeCaveat=n.createMaxRequestTimeMapper=n.getMaxRequestTimeCaveatMapper=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-utils"),i=e("@metamask/utils");function a(e){if(!(0,i.hasProperty)(e,"value"))throw s.rpcErrors.invalidParams({message:"Invalid maxRequestTime caveat."});const{value:t}=e;!function(e,t){(0,i.assertStruct)(e,r.MaxRequestTimeStruct,"Invalid maxRequestTime",t)}(t,s.rpcErrors.invalidParams)}n.getMaxRequestTimeCaveatMapper=function(e){return!e||!(0,i.isObject)(e)||(0,i.isObject)(e)&&!(0,i.hasProperty)(e,"maxRequestTime")?{caveats:null}:{caveats:[{type:r.SnapCaveatType.MaxRequestTime,value:e.maxRequestTime}]}},n.createMaxRequestTimeMapper=function(e){return function(t){const{maxRequestTime:n,...s}=t,i=e(s);return n?{...i,caveats:[...i.caveats??[],{type:r.SnapCaveatType.MaxRequestTime,value:n}]}:i}},n.getMaxRequestTimeCaveat=function(e){const t=e?.caveats?.find((e=>e.type===r.SnapCaveatType.MaxRequestTime));return t?.value??null},n.maxRequestTimeCaveatSpecifications={[r.SnapCaveatType.MaxRequestTime]:Object.freeze({type:r.SnapCaveatType.MaxRequestTime,validator:e=>a(e)})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/caveats/requestTime.cjs"}],[2685,{"./caveats/index.cjs":2683,"./enum.cjs":2686,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.cronjobCaveatSpecifications=n.validateCronjobCaveat=n.getCronjobCaveatJobs=n.getCronjobCaveatMapper=n.cronjobEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),a=e("@metamask/utils"),o=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Cronjob;function u(e){if(!(0,a.hasProperty)(e,"value")||!(0,a.isPlainObject)(e.value))throw r.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;if(!(0,a.hasProperty)(t,"jobs")||!(0,a.isPlainObject)(t))throw r.rpcErrors.invalidParams({message:"Expected a plain object."});if(!(0,i.isCronjobSpecificationArray)(t.jobs))throw r.rpcErrors.invalidParams({message:"Expected a valid cronjob specification array."})}n.cronjobEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:c,allowedCaveats:[i.SnapCaveatType.SnapCronjob],endowmentGetter:e=>null,subjectTypes:[s.SubjectType.Snap],validator:(0,o.createGenericPermissionValidator)([{type:i.SnapCaveatType.SnapCronjob,optional:!0},{type:i.SnapCaveatType.MaxRequestTime,optional:!0}])})}),n.getCronjobCaveatMapper=function(e){return e&&(0,a.isObject)(e)&&0!==Object.keys(e).length?{caveats:[{type:i.SnapCaveatType.SnapCronjob,value:e}]}:{caveats:null}},n.getCronjobCaveatJobs=function(e){if(!e?.caveats)return null;(0,a.assert)(1===e.caveats.length),(0,a.assert)(e.caveats[0].type===i.SnapCaveatType.SnapCronjob);const t=e.caveats[0];return t.value?.jobs??null},n.validateCronjobCaveat=u,n.cronjobCaveatSpecifications={[i.SnapCaveatType.SnapCronjob]:Object.freeze({type:i.SnapCaveatType.SnapCronjob,validator:e=>u(e)})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/cronjob.cjs"}],[2686,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s;Object.defineProperty(n,"__esModule",{value:!0}),n.SnapEndowments=void 0,function(e){e.NetworkAccess="endowment:network-access",e.SignatureInsight="endowment:signature-insight",e.TransactionInsight="endowment:transaction-insight",e.Cronjob="endowment:cronjob",e.EthereumProvider="endowment:ethereum-provider",e.Rpc="endowment:rpc",e.WebAssemblyAccess="endowment:webassembly",e.NameLookup="endowment:name-lookup",e.LifecycleHooks="endowment:lifecycle-hooks",e.Keyring="endowment:keyring",e.HomePage="endowment:page-home",e.SettingsPage="endowment:page-settings",e.Assets="endowment:assets",e.Protocol="endowment:protocol"}(s||(n.SnapEndowments=s={}))}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/enum.cjs"}],[2687,{"./enum.cjs":2686,"@metamask/permission-controller":2393},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ethereumProviderEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("./enum.cjs").SnapEndowments.EthereumProvider;n.ethereumProviderEndowmentBuilder=Object.freeze({targetName:r,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:r,allowedCaveats:null,endowmentGetter:e=>["ethereum"],subjectTypes:[s.SubjectType.Snap]})})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/ethereum-provider.cjs"}],[2688,{"./enum.cjs":2686,"@metamask/permission-controller":2393},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.homePageEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("./enum.cjs").SnapEndowments.HomePage;n.homePageEndowmentBuilder=Object.freeze({targetName:r,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:r,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[s.SubjectType.Snap]})})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/home-page.cjs"}],[2689,{"./assets.cjs":2681,"./caveats/index.cjs":2683,"./cronjob.cjs":2685,"./enum.cjs":2686,"./ethereum-provider.cjs":2687,"./home-page.cjs":2688,"./keyring.cjs":2690,"./lifecycle-hooks.cjs":2691,"./name-lookup.cjs":2692,"./network-access.cjs":2693,"./protocol.cjs":2694,"./rpc.cjs":2695,"./settings-page.cjs":2696,"./signature-insight.cjs":2697,"./transaction-insight.cjs":2698,"./web-assembly.cjs":2699,"@metamask/snaps-utils":2850},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.getProtocolCaveatScopes=n.getCronjobCaveatJobs=n.getMaxRequestTimeCaveat=n.getKeyringCaveatOrigins=n.getLookupMatchersCaveat=n.getChainIdsCaveat=n.getTransactionOriginCaveat=n.getSignatureOriginCaveat=n.getRpcCaveatOrigins=n.handlerEndowments=n.endowmentCaveatMappers=n.endowmentCaveatSpecifications=n.endowmentPermissionBuilders=void 0;const i=e("@metamask/snaps-utils"),a=e("./assets.cjs"),o=e("./caveats/index.cjs"),c=e("./cronjob.cjs"),u=e("./ethereum-provider.cjs"),l=e("./home-page.cjs"),d=e("./keyring.cjs"),m=e("./lifecycle-hooks.cjs"),p=e("./name-lookup.cjs"),h=e("./network-access.cjs"),f=e("./protocol.cjs"),g=e("./rpc.cjs"),y=e("./settings-page.cjs"),b=e("./signature-insight.cjs"),x=e("./transaction-insight.cjs"),S=e("./web-assembly.cjs");n.endowmentPermissionBuilders={[h.networkAccessEndowmentBuilder.targetName]:h.networkAccessEndowmentBuilder,[x.transactionInsightEndowmentBuilder.targetName]:x.transactionInsightEndowmentBuilder,[c.cronjobEndowmentBuilder.targetName]:c.cronjobEndowmentBuilder,[u.ethereumProviderEndowmentBuilder.targetName]:u.ethereumProviderEndowmentBuilder,[g.rpcEndowmentBuilder.targetName]:g.rpcEndowmentBuilder,[S.webAssemblyEndowmentBuilder.targetName]:S.webAssemblyEndowmentBuilder,[p.nameLookupEndowmentBuilder.targetName]:p.nameLookupEndowmentBuilder,[m.lifecycleHooksEndowmentBuilder.targetName]:m.lifecycleHooksEndowmentBuilder,[d.keyringEndowmentBuilder.targetName]:d.keyringEndowmentBuilder,[y.settingsPageEndowmentBuilder.targetName]:y.settingsPageEndowmentBuilder,[f.protocolEndowmentBuilder.targetName]:f.protocolEndowmentBuilder,[l.homePageEndowmentBuilder.targetName]:l.homePageEndowmentBuilder,[b.signatureInsightEndowmentBuilder.targetName]:b.signatureInsightEndowmentBuilder,[a.assetsEndowmentBuilder.targetName]:a.assetsEndowmentBuilder},n.endowmentCaveatSpecifications={...c.cronjobCaveatSpecifications,...x.transactionInsightCaveatSpecifications,...g.rpcCaveatSpecifications,...p.nameLookupCaveatSpecifications,...d.keyringCaveatSpecifications,...b.signatureInsightCaveatSpecifications,...o.maxRequestTimeCaveatSpecifications,...f.protocolCaveatSpecifications},n.endowmentCaveatMappers={[c.cronjobEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(c.getCronjobCaveatMapper),[x.transactionInsightEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(x.getTransactionInsightCaveatMapper),[g.rpcEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(g.getRpcCaveatMapper),[p.nameLookupEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(p.getNameLookupCaveatMapper),[d.keyringEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(d.getKeyringCaveatMapper),[f.protocolEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(f.getProtocolCaveatMapper),[b.signatureInsightEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(b.getSignatureInsightCaveatMapper),[m.lifecycleHooksEndowmentBuilder.targetName]:o.getMaxRequestTimeCaveatMapper,[l.homePageEndowmentBuilder.targetName]:o.getMaxRequestTimeCaveatMapper,[y.settingsPageEndowmentBuilder.targetName]:o.getMaxRequestTimeCaveatMapper,[a.assetsEndowmentBuilder.targetName]:(0,o.createMaxRequestTimeMapper)(a.getAssetsCaveatMapper)},n.handlerEndowments={[i.HandlerType.OnRpcRequest]:g.rpcEndowmentBuilder.targetName,[i.HandlerType.OnTransaction]:x.transactionInsightEndowmentBuilder.targetName,[i.HandlerType.OnCronjob]:c.cronjobEndowmentBuilder.targetName,[i.HandlerType.OnNameLookup]:p.nameLookupEndowmentBuilder.targetName,[i.HandlerType.OnInstall]:m.lifecycleHooksEndowmentBuilder.targetName,[i.HandlerType.OnUpdate]:m.lifecycleHooksEndowmentBuilder.targetName,[i.HandlerType.OnKeyringRequest]:d.keyringEndowmentBuilder.targetName,[i.HandlerType.OnHomePage]:l.homePageEndowmentBuilder.targetName,[i.HandlerType.OnSettingsPage]:y.settingsPageEndowmentBuilder.targetName,[i.HandlerType.OnSignature]:b.signatureInsightEndowmentBuilder.targetName,[i.HandlerType.OnUserInput]:null,[i.HandlerType.OnAssetsLookup]:a.assetsEndowmentBuilder.targetName,[i.HandlerType.OnAssetsConversion]:a.assetsEndowmentBuilder.targetName,[i.HandlerType.OnProtocolRequest]:f.protocolEndowmentBuilder.targetName},r(e("./enum.cjs"),n);var k=e("./rpc.cjs");Object.defineProperty(n,"getRpcCaveatOrigins",{enumerable:!0,get:function(){return k.getRpcCaveatOrigins}});var v=e("./signature-insight.cjs");Object.defineProperty(n,"getSignatureOriginCaveat",{enumerable:!0,get:function(){return v.getSignatureOriginCaveat}});var w=e("./transaction-insight.cjs");Object.defineProperty(n,"getTransactionOriginCaveat",{enumerable:!0,get:function(){return w.getTransactionOriginCaveat}});var T=e("./name-lookup.cjs");Object.defineProperty(n,"getChainIdsCaveat",{enumerable:!0,get:function(){return T.getChainIdsCaveat}}),Object.defineProperty(n,"getLookupMatchersCaveat",{enumerable:!0,get:function(){return T.getLookupMatchersCaveat}});var _=e("./keyring.cjs");Object.defineProperty(n,"getKeyringCaveatOrigins",{enumerable:!0,get:function(){return _.getKeyringCaveatOrigins}});var E=e("./caveats/index.cjs");Object.defineProperty(n,"getMaxRequestTimeCaveat",{enumerable:!0,get:function(){return E.getMaxRequestTimeCaveat}});var j=e("./cronjob.cjs");Object.defineProperty(n,"getCronjobCaveatJobs",{enumerable:!0,get:function(){return j.getCronjobCaveatJobs}});var C=e("./protocol.cjs");Object.defineProperty(n,"getProtocolCaveatScopes",{enumerable:!0,get:function(){return C.getProtocolCaveatScopes}})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/index.cjs"}],[2690,{"./caveats/index.cjs":2683,"./enum.cjs":2686,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.keyringCaveatSpecifications=n.getKeyringCaveatOrigins=n.getKeyringCaveatMapper=n.keyringEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),a=e("@metamask/utils"),o=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Keyring;n.keyringEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:c,allowedCaveats:[i.SnapCaveatType.KeyringOrigin,i.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,o.createGenericPermissionValidator)([{type:i.SnapCaveatType.KeyringOrigin},{type:i.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[s.SubjectType.Snap]})}),n.getKeyringCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.KeyringOrigin,value:e}]}},n.getKeyringCaveatOrigins=function(e){return(0,a.assert)(e?.caveats),(0,a.assert)(1===e.caveats.length),(0,a.assert)(e.caveats[0].type===i.SnapCaveatType.KeyringOrigin),e.caveats[0].value},n.keyringCaveatSpecifications={[i.SnapCaveatType.KeyringOrigin]:Object.freeze({type:i.SnapCaveatType.KeyringOrigin,validator:e=>function(e){if(!(0,a.hasProperty)(e,"value")||!(0,a.isPlainObject)(e.value))throw r.rpcErrors.invalidParams({message:"Invalid keyring origins: Expected a plain object."});const{value:t}=e;(0,i.assertIsKeyringOrigins)(t,r.rpcErrors.invalidParams)}(e)})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/keyring.cjs"}],[2691,{"./enum.cjs":2686,"@metamask/permission-controller":2393},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.lifecycleHooksEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("./enum.cjs").SnapEndowments.LifecycleHooks;n.lifecycleHooksEndowmentBuilder=Object.freeze({targetName:r,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:r,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[s.SubjectType.Snap]})})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/lifecycle-hooks.cjs"}],[2692,{"./caveats/index.cjs":2683,"./enum.cjs":2686,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.nameLookupCaveatSpecifications=n.getLookupMatchersCaveat=n.getChainIdsCaveat=n.getNameLookupCaveatMapper=n.nameLookupEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),a=e("@metamask/utils"),o=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.NameLookup;function u(e){if(!(0,a.hasProperty)(e,"value")||!(0,a.isPlainObject)(e))throw r.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;switch(e.type){case i.SnapCaveatType.ChainIds:(0,a.assertStruct)(t,i.ChainIdsStruct);break;case i.SnapCaveatType.LookupMatchers:(0,a.assertStruct)(t,i.LookupMatchersStruct);break;default:throw r.rpcErrors.invalidParams({message:'Invalid caveat type, must be one of the following: "chainIds", "matchers".'})}}n.nameLookupEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:c,allowedCaveats:[i.SnapCaveatType.ChainIds,i.SnapCaveatType.LookupMatchers,i.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,o.createGenericPermissionValidator)([{type:i.SnapCaveatType.ChainIds,optional:!0},{type:i.SnapCaveatType.LookupMatchers,optional:!0},{type:i.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[s.SubjectType.Snap]})}),n.getNameLookupCaveatMapper=function(e){if(!e||!(0,a.isObject)(e)||0===Object.keys(e).length)return{caveats:null};const t=[];return e.chains&&t.push({type:i.SnapCaveatType.ChainIds,value:e.chains}),e.matchers&&t.push({type:i.SnapCaveatType.LookupMatchers,value:e.matchers}),(0,a.assert)(t.length>0),{caveats:t}},n.getChainIdsCaveat=function(e){if(!e?.caveats)return null;const t=e.caveats.find((e=>e.type===i.SnapCaveatType.ChainIds));return t?t.value:null},n.getLookupMatchersCaveat=function(e){if(!e?.caveats)return null;const t=e.caveats.find((e=>e.type===i.SnapCaveatType.LookupMatchers));return t?t.value:null},n.nameLookupCaveatSpecifications={[i.SnapCaveatType.ChainIds]:Object.freeze({type:i.SnapCaveatType.ChainIds,validator:e=>u(e)}),[i.SnapCaveatType.LookupMatchers]:Object.freeze({type:i.SnapCaveatType.LookupMatchers,validator:e=>u(e)})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/name-lookup.cjs"}],[2693,{"./enum.cjs":2686,"@metamask/permission-controller":2393},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.networkAccessEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("./enum.cjs").SnapEndowments.NetworkAccess;n.networkAccessEndowmentBuilder=Object.freeze({targetName:r,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:r,allowedCaveats:null,endowmentGetter:e=>["fetch","Request","Headers","Response"],subjectTypes:[s.SubjectType.Snap]})})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/network-access.cjs"}],[2694,{"./caveats/index.cjs":2683,"./enum.cjs":2686,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.protocolCaveatSpecifications=n.getProtocolCaveatScopes=n.getProtocolCaveatMapper=n.protocolEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),a=e("@metamask/utils"),o=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Protocol;n.protocolEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:c,allowedCaveats:[i.SnapCaveatType.ProtocolSnapScopes,i.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,o.createGenericPermissionValidator)([{type:i.SnapCaveatType.ProtocolSnapScopes},{type:i.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[s.SubjectType.Snap]})}),n.getProtocolCaveatMapper=function(e){if(!e||!(0,a.isObject)(e)||0===Object.keys(e).length)return{caveats:null};const t=[];return e.scopes&&t.push({type:i.SnapCaveatType.ProtocolSnapScopes,value:e.scopes}),{caveats:t}},n.getProtocolCaveatScopes=function(e){const t=e?.caveats?.find((e=>e.type===i.SnapCaveatType.ProtocolSnapScopes));return t?t.value:null},n.protocolCaveatSpecifications={[i.SnapCaveatType.ProtocolSnapScopes]:Object.freeze({type:i.SnapCaveatType.ProtocolSnapScopes,validator:e=>function(e){if(!(0,a.hasProperty)(e,"value")||!(0,a.isPlainObject)(e))throw r.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,a.assertStruct)(t,i.ProtocolScopesStruct,"Invalid scopes specified",r.rpcErrors.invalidParams)}(e)})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/protocol.cjs"}],[2695,{"./caveats/index.cjs":2683,"./enum.cjs":2686,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.rpcCaveatSpecifications=n.getRpcCaveatOrigins=n.getRpcCaveatMapper=n.rpcEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),a=e("@metamask/utils"),o=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Rpc;n.rpcEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:c,allowedCaveats:[i.SnapCaveatType.RpcOrigin,i.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,o.createGenericPermissionValidator)([{type:i.SnapCaveatType.RpcOrigin},{type:i.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[s.SubjectType.Snap]})}),n.getRpcCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.RpcOrigin,value:e}]}},n.getRpcCaveatOrigins=function(e){const t=e?.caveats?.filter((e=>e.type===i.SnapCaveatType.RpcOrigin));return(0,a.assert)(t),(0,a.assert)(1===t.length),t[0].value},n.rpcCaveatSpecifications={[i.SnapCaveatType.RpcOrigin]:Object.freeze({type:i.SnapCaveatType.RpcOrigin,validator:e=>function(e){if(!(0,a.hasProperty)(e,"value")||!(0,a.isPlainObject)(e.value))throw r.rpcErrors.invalidParams({message:"Invalid JSON-RPC origins: Expected a plain object."});const{value:t}=e;(0,i.assertIsRpcOrigins)(t,r.rpcErrors.invalidParams)}(e)})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/rpc.cjs"}],[2696,{"./enum.cjs":2686,"@metamask/permission-controller":2393},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.settingsPageEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("./enum.cjs").SnapEndowments.SettingsPage;n.settingsPageEndowmentBuilder=Object.freeze({targetName:r,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:r,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[s.SubjectType.Snap]})})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/settings-page.cjs"}],[2697,{"./caveats/index.cjs":2683,"./enum.cjs":2686,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.signatureInsightCaveatSpecifications=n.getSignatureOriginCaveat=n.getSignatureInsightCaveatMapper=n.signatureInsightEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),a=e("@metamask/utils"),o=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.SignatureInsight;n.signatureInsightEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:c,allowedCaveats:[i.SnapCaveatType.SignatureOrigin],endowmentGetter:e=>null,validator:(0,o.createGenericPermissionValidator)([{type:i.SnapCaveatType.SignatureOrigin,optional:!0},{type:i.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[s.SubjectType.Snap]})}),n.getSignatureInsightCaveatMapper=function(e){return!e||!(0,a.isObject)(e)||(0,a.isObject)(e)&&0===Object.keys(e).length?{caveats:null}:{caveats:[{type:i.SnapCaveatType.SignatureOrigin,value:(0,a.hasProperty)(e,"allowSignatureOrigin")&&e.allowSignatureOrigin}]}},n.getSignatureOriginCaveat=function(e){return e?.caveats?((0,a.assert)(1===e.caveats.length),(0,a.assert)(e.caveats[0].type===i.SnapCaveatType.SignatureOrigin),e.caveats[0].value??null):null},n.signatureInsightCaveatSpecifications={[i.SnapCaveatType.SignatureOrigin]:Object.freeze({type:i.SnapCaveatType.SignatureOrigin,validator:e=>function(e){if(!(0,a.hasProperty)(e,"value")||!(0,a.isPlainObject)(e))throw r.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,a.assert)("boolean"==typeof t,'Expected caveat value to have type "boolean"')}(e)})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/signature-insight.cjs"}],[2698,{"./caveats/index.cjs":2683,"./enum.cjs":2686,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.transactionInsightCaveatSpecifications=n.getTransactionOriginCaveat=n.getTransactionInsightCaveatMapper=n.transactionInsightEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),a=e("@metamask/utils"),o=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.TransactionInsight;n.transactionInsightEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:c,allowedCaveats:[i.SnapCaveatType.TransactionOrigin,i.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,o.createGenericPermissionValidator)([{type:i.SnapCaveatType.TransactionOrigin,optional:!0},{type:i.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[s.SubjectType.Snap]})}),n.getTransactionInsightCaveatMapper=function(e){return!e||!(0,a.isObject)(e)||(0,a.isObject)(e)&&0===Object.keys(e).length?{caveats:null}:{caveats:[{type:i.SnapCaveatType.TransactionOrigin,value:(0,a.hasProperty)(e,"allowTransactionOrigin")&&e.allowTransactionOrigin}]}},n.getTransactionOriginCaveat=function(e){return e?.caveats?((0,a.assert)(1===e.caveats.length),(0,a.assert)(e.caveats[0].type===i.SnapCaveatType.TransactionOrigin),e.caveats[0].value??null):null},n.transactionInsightCaveatSpecifications={[i.SnapCaveatType.TransactionOrigin]:Object.freeze({type:i.SnapCaveatType.TransactionOrigin,validator:e=>function(e){if(!(0,a.hasProperty)(e,"value")||!(0,a.isPlainObject)(e))throw r.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,a.assert)("boolean"==typeof t,'Expected caveat value to have type "boolean"')}(e)})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/transaction-insight.cjs"}],[2699,{"./enum.cjs":2686,"@metamask/permission-controller":2393},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.webAssemblyEndowmentBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("./enum.cjs").SnapEndowments.WebAssemblyAccess;n.webAssemblyEndowmentBuilder=Object.freeze({targetName:r,specificationBuilder:e=>({permissionType:s.PermissionType.Endowment,targetName:r,allowedCaveats:null,endowmentGetter:e=>["WebAssembly"],subjectTypes:[s.SubjectType.Snap]})})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/endowments/web-assembly.cjs"}],[2700,{"./endowments/index.cjs":2689,"./permissions.cjs":2701,"./permitted/index.cjs":2716,"./restricted/index.cjs":2737,"./utils.cjs":2742,"@metamask/snaps-utils":2850},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.selectHooks=n.SnapCaveatType=n.createSnapsMethodMiddleware=n.permittedMethods=void 0;var i=e("./permitted/index.cjs");Object.defineProperty(n,"permittedMethods",{enumerable:!0,get:function(){return i.handlers}}),Object.defineProperty(n,"createSnapsMethodMiddleware",{enumerable:!0,get:function(){return i.createSnapsMethodMiddleware}});var a=e("@metamask/snaps-utils");Object.defineProperty(n,"SnapCaveatType",{enumerable:!0,get:function(){return a.SnapCaveatType}});var o=e("./utils.cjs");Object.defineProperty(n,"selectHooks",{enumerable:!0,get:function(){return o.selectHooks}}),r(e("./endowments/index.cjs"),n),r(e("./permissions.cjs"),n),r(e("./restricted/index.cjs"),n)}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/index.cjs"}],[2701,{"./endowments/index.cjs":2689,"./restricted/index.cjs":2737,"./utils.cjs":2742,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.buildSnapRestrictedMethodSpecifications=n.buildSnapEndowmentSpecifications=n.processSnapPermissions=void 0;const s=e("@metamask/utils"),r=e("./endowments/index.cjs"),i=e("./restricted/index.cjs"),a=e("./utils.cjs");n.processSnapPermissions=function(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>(0,s.hasProperty)(i.caveatMappers,e)?[e,i.caveatMappers[e](t)]:(0,s.hasProperty)(r.endowmentCaveatMappers,e)?[e,r.endowmentCaveatMappers[e](t)]:[e,t])))};n.buildSnapEndowmentSpecifications=e=>Object.values(r.endowmentPermissionBuilders).reduce(((t,{targetName:n,specificationBuilder:s})=>(e.includes(n)||(t[n]=s({})),t)),{});n.buildSnapRestrictedMethodSpecifications=(e,t)=>Object.values(i.restrictedMethodPermissionBuilders).reduce(((n,{targetName:s,specificationBuilder:r,methodHooks:i})=>(e.includes(s)||(n[s]=r({methodHooks:(0,a.selectHooks)(t,i)})),n)),{})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permissions.cjs"}],[2702,{"../endowments/index.cjs":2689,"@metamask/rpc-errors":2554,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.cancelBackgroundEventHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/superstruct"),i=e("../endowments/index.cjs");n.cancelBackgroundEventHandler={methodNames:["snap_cancelBackgroundEvent"],implementation:async function(e,t,n,o,{cancelBackgroundEvent:c,hasPermission:u}){const{params:l}=e;if(!u(i.SnapEndowments.Cronjob))return o(s.providerErrors.unauthorized());try{const e=function(e){try{return(0,r.create)(e,a)}catch(e){if(e instanceof r.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(l),{id:n}=e;c(n),t.result=null}catch(e){return o(e)}return o()},hookNames:{cancelBackgroundEvent:!0,hasPermission:!0}};const a=(0,r.object)({id:(0,r.string)()})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/cancelBackgroundEvent.cjs"}],[2703,{"../restricted/manageState.cjs":2740,"@metamask/rpc-errors":2554,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.clearStateHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/superstruct"),i=e("../restricted/manageState.cjs");n.clearStateHandler={methodNames:["snap_clearState"],implementation:async function(e,t,n,o,{clearSnapState:c,hasPermission:u}){const{params:l}=e;if(!u(i.manageStateBuilder.targetName))return o(s.providerErrors.unauthorized());try{const e=function(e){try{return(0,r.create)(e,a)}catch(e){if(e instanceof r.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(l),{encrypted:n=!0}=e;c(n),t.result=null}catch(e){return o(e)}return o()},hookNames:{clearSnapState:!0,hasPermission:!0}};const a=(0,r.object)({encrypted:(0,r.optional)((0,r.boolean)())})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/clearState.cjs"}],[2704,{"@metamask/rpc-errors":2554,"@metamask/snaps-sdk":2746,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createInterfaceHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct");n.createInterfaceHandler={methodNames:["snap_createInterface"],implementation:async function(e,t,n,r,{createInterface:o}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,a)}catch(e){if(e instanceof i.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(c),{ui:n,context:r}=e;t.result=await o(n,r)}catch(e){return r(e)}return r()},hookNames:{createInterface:!0}};const a=(0,i.object)({ui:r.ComponentOrElementStruct,context:(0,i.optional)(r.InterfaceContextStruct)})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/createInterface.cjs"}],[2705,{"../endowments/index.cjs":2689,"@metamask/rpc-errors":2554,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.providerRequestHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/superstruct"),i=e("@metamask/utils"),a=e("../endowments/index.cjs"),o=Object.freeze(["eth_blockNumber","eth_call","eth_chainId","eth_coinbase","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getWork","eth_hashrate","eth_mining","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_protocolVersion","eth_sendRawTransaction","eth_submitHashrate","eth_submitWork","eth_syncing","eth_uninstallFilter","net_listening","net_peerCount","net_version","web3_clientVersion","web3_sha3"]);n.providerRequestHandler={methodNames:["snap_experimentalProviderRequest"],implementation:async function(e,t,n,u,{hasPermission:l,getNetworkConfigurationByChainId:d,getNetworkClientById:m}){if(!l(a.SnapEndowments.EthereumProvider))return u(s.rpcErrors.methodNotFound());const{params:p}=e;try{const{chainId:e,request:n}=function(e){try{return(0,r.create)(e,c)}catch(e){if(e instanceof r.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(p);if(!o.includes(n.method))return u(s.rpcErrors.methodNotFound());const a=(0,i.parseCaipChainId)(e);if("eip155"!==a.namespace)return u(s.rpcErrors.invalidParams({message:"Only EVM networks are currently supported."}));const l=BigInt(a.reference),h=d((0,i.bigIntToHex)(l));if(!h)return u(s.rpcErrors.invalidParams({message:"The requested network is not available."}));const f=m(h.rpcEndpoints[h.defaultRpcEndpointIndex].networkClientId),{provider:g}=f;t.result=await g.request(n)}catch(e){return u(e)}return u()},hookNames:{hasPermission:!0,getNetworkConfigurationByChainId:!0,getNetworkClientById:!0}};const c=(0,r.object)({chainId:i.CaipChainIdStruct,request:(0,r.type)({method:(0,r.string)(),params:(0,r.optional)(i.JsonRpcParamsStruct)})})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/experimentalProviderRequest.cjs"}],[2706,{"@metamask/rpc-errors":2554},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getAllSnapsHandler=void 0;const s=e("@metamask/rpc-errors");n.getAllSnapsHandler={methodNames:["wallet_getAllSnaps"],implementation:async function(e,t,n,r,{getAllSnaps:i}){const{origin:a}=e;if("https://snaps.metamask.io"!==a)return r(s.rpcErrors.methodNotFound());return t.result=await i(),r()},hookNames:{getAllSnaps:!0}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/getAllSnaps.cjs"}],[2707,{"../endowments/index.cjs":2689,"@metamask/rpc-errors":2554},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getBackgroundEventsHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("../endowments/index.cjs");n.getBackgroundEventsHandler={methodNames:["snap_getBackgroundEvents"],implementation:async function(e,t,n,i,{getBackgroundEvents:a,hasPermission:o}){if(!o(r.SnapEndowments.Cronjob))return i(s.providerErrors.unauthorized());try{const e=a();t.result=e}catch(e){return i(e)}return i()},hookNames:{getBackgroundEvents:!0,hasPermission:!0}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/getBackgroundEvents.cjs"}],[2708,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getClientStatusHandler=void 0;n.getClientStatusHandler={methodNames:["snap_getClientStatus"],implementation:async function(e,t,n,s,{getIsLocked:r}){return t.result={locked:r()},s()},hookNames:{getIsLocked:!0}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/getClientStatus.cjs"}],[2709,{"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getCurrencyRateHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-utils"),i=e("@metamask/superstruct");n.getCurrencyRateHandler={methodNames:["snap_getCurrencyRate"],implementation:function(e,t,n,r,{getCurrencyRate:o}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,a)}catch(e){if(e instanceof i.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(c),{currency:n}=e;t.result=o(n)??null}catch(e){return r(e)}return r()},hookNames:{getCurrencyRate:!0}};const a=(0,i.object)({currency:(0,i.union)([(0,r.currency)("btc")])})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/getCurrencyRate.cjs"}],[2710,{"@metamask/rpc-errors":2554,"@metamask/snaps-sdk":2746,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getFileHandler=n.GetFileArgsStruct=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),a=e("@metamask/utils");n.GetFileArgsStruct=(0,i.object)({path:(0,i.string)(),encoding:(0,i.optional)((0,i.union)([(0,r.enumValue)(r.AuxiliaryFileEncoding.Base64),(0,r.enumValue)(r.AuxiliaryFileEncoding.Hex),(0,r.enumValue)(r.AuxiliaryFileEncoding.Utf8)]))});n.getFileHandler={methodNames:["snap_getFile"],implementation:async function(e,t,i,o,{getSnapFile:c}){const{params:u}=e;(0,a.assertStruct)(u,n.GetFileArgsStruct,'Invalid "snap_getFile" parameters',s.rpcErrors.invalidParams);try{t.result=await c(u.path,u.encoding??r.AuxiliaryFileEncoding.Base64)}catch(e){return o(e)}return o()},hookNames:{getSnapFile:!0}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/getFile.cjs"}],[2711,{"@metamask/rpc-errors":2554,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getInterfaceContextHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/superstruct");n.getInterfaceContextHandler={methodNames:["snap_getInterfaceContext"],implementation:function(e,t,n,a,{getInterfaceContext:o}){const{params:c}=e;try{const e=function(e){try{return(0,r.create)(e,i)}catch(e){if(e instanceof r.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(c),{id:n}=e;t.result=o(n)}catch(e){return a(e)}return a()},hookNames:{getInterfaceContext:!0}};const i=(0,r.object)({id:(0,r.string)()})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/getInterfaceContext.cjs"}],[2712,{"@metamask/rpc-errors":2554,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getInterfaceStateHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/superstruct");n.getInterfaceStateHandler={methodNames:["snap_getInterfaceState"],implementation:function(e,t,n,a,{getInterfaceState:o}){const{params:c}=e;try{const e=function(e){try{return(0,r.create)(e,i)}catch(e){if(e instanceof r.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(c),{id:n}=e;t.result=o(n)}catch(e){return a(e)}return a()},hookNames:{getInterfaceState:!0}};const i=(0,r.object)({id:(0,r.string)()})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/getInterfaceState.cjs"}],[2713,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getSnapsHandler=void 0;n.getSnapsHandler={methodNames:["wallet_getSnaps"],implementation:async function(e,t,n,s,{getSnaps:r}){return t.result=await r(),s()},hookNames:{getSnaps:!0}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/getSnaps.cjs"}],[2714,{"../restricted/manageState.cjs":2740,"../utils.cjs":2742,"@metamask/rpc-errors":2554,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.get=n.getStateHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/superstruct"),i=e("@metamask/utils"),a=e("../restricted/manageState.cjs"),o=e("../utils.cjs");n.getStateHandler={methodNames:["snap_getState"],implementation:async function(e,t,n,i,{hasPermission:o,getSnapState:l,getUnlockPromise:d}){const{params:m}=e;if(!o(a.manageStateBuilder.targetName))return i(s.providerErrors.unauthorized());try{const e=function(e){try{return(0,r.create)(e,c)}catch(e){if(e instanceof r.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(m),{key:n,encrypted:i=!0}=e;i&&await d(!0);const a=await l(i);t.result=u(a,n)}catch(e){return i(e)}return i()},hookNames:{hasPermission:!0,getSnapState:!0,getUnlockPromise:!0}};const c=(0,r.object)({key:(0,r.optional)(o.StateKeyStruct),encrypted:(0,r.optional)((0,r.boolean)())});function u(e,t){if(t===undefined)return e;const n=t.split(".");let r=e;for(let e=0;e<n.length;e++){const t=n[e];if(o.FORBIDDEN_KEYS.includes(t))throw s.rpcErrors.invalidParams("Invalid params: Key contains forbidden characters.");if(!(0,i.isObject)(r))return null;if(!(0,i.hasProperty)(r,t))return null;r=r[t]}return r}n.get=u}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/getState.cjs"}],[2715,{"./cancelBackgroundEvent.cjs":2702,"./clearState.cjs":2703,"./createInterface.cjs":2704,"./experimentalProviderRequest.cjs":2705,"./getAllSnaps.cjs":2706,"./getBackgroundEvents.cjs":2707,"./getClientStatus.cjs":2708,"./getCurrencyRate.cjs":2709,"./getFile.cjs":2710,"./getInterfaceContext.cjs":2711,"./getInterfaceState.cjs":2712,"./getSnaps.cjs":2713,"./getState.cjs":2714,"./invokeKeyring.cjs":2717,"./invokeSnapSugar.cjs":2718,"./listEntropySources.cjs":2719,"./requestSnaps.cjs":2721,"./resolveInterface.cjs":2722,"./scheduleBackgroundEvent.cjs":2723,"./setState.cjs":2724,"./updateInterface.cjs":2725},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.handlers=n.methodHandlers=void 0;const s=e("./cancelBackgroundEvent.cjs"),r=e("./clearState.cjs"),i=e("./createInterface.cjs"),a=e("./experimentalProviderRequest.cjs"),o=e("./getAllSnaps.cjs"),c=e("./getBackgroundEvents.cjs"),u=e("./getClientStatus.cjs"),l=e("./getCurrencyRate.cjs"),d=e("./getFile.cjs"),m=e("./getInterfaceContext.cjs"),p=e("./getInterfaceState.cjs"),h=e("./getSnaps.cjs"),f=e("./getState.cjs"),g=e("./invokeKeyring.cjs"),y=e("./invokeSnapSugar.cjs"),b=e("./listEntropySources.cjs"),x=e("./requestSnaps.cjs"),S=e("./resolveInterface.cjs"),k=e("./scheduleBackgroundEvent.cjs"),v=e("./setState.cjs"),w=e("./updateInterface.cjs");n.methodHandlers={wallet_getAllSnaps:o.getAllSnapsHandler,wallet_getSnaps:h.getSnapsHandler,wallet_requestSnaps:x.requestSnapsHandler,wallet_invokeSnap:y.invokeSnapSugarHandler,wallet_invokeKeyring:g.invokeKeyringHandler,snap_clearState:r.clearStateHandler,snap_getClientStatus:u.getClientStatusHandler,snap_getFile:d.getFileHandler,snap_getState:f.getStateHandler,snap_createInterface:i.createInterfaceHandler,snap_updateInterface:w.updateInterfaceHandler,snap_getInterfaceState:p.getInterfaceStateHandler,snap_getInterfaceContext:m.getInterfaceContextHandler,snap_listEntropySources:b.listEntropySourcesHandler,snap_resolveInterface:S.resolveInterfaceHandler,snap_getCurrencyRate:l.getCurrencyRateHandler,snap_experimentalProviderRequest:a.providerRequestHandler,snap_scheduleBackgroundEvent:k.scheduleBackgroundEventHandler,snap_cancelBackgroundEvent:s.cancelBackgroundEventHandler,snap_getBackgroundEvents:c.getBackgroundEventsHandler,snap_setState:v.setStateHandler},n.handlers=Object.values(n.methodHandlers)}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/handlers.cjs"}],[2716,{"./handlers.cjs":2715,"./middleware.cjs":2720},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./handlers.cjs"),n),r(e("./middleware.cjs"),n)}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/index.cjs"}],[2717,{"./invokeSnapSugar.cjs":2718,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.invokeKeyringHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-utils"),i=e("@metamask/utils"),a=e("./invokeSnapSugar.cjs");n.invokeKeyringHandler={methodNames:["wallet_invokeKeyring"],implementation:async function(e,t,n,o,{handleSnapRpcRequest:c,hasPermission:u,getSnap:l,getAllowedKeyringMethods:d}){let m;try{m=(0,a.getValidatedParams)(e.params)}catch(e){return o(e)}const{origin:p}=e,{snapId:h,request:f}=m;if(!p||!u(r.WALLET_SNAP_PERMISSION_KEY))return o(s.rpcErrors.invalidRequest({message:`The snap "${h}" is not connected to "${p}". Please connect before invoking the snap.`}));if(!l(h))return o(s.rpcErrors.invalidRequest({message:`The snap "${h}" is not installed. Please install it first, before invoking the snap.`}));if(!(0,i.hasProperty)(f,"method")||"string"!=typeof f.method)return o(s.rpcErrors.invalidRequest({message:"The request must have a method."}));if(!d().includes(f.method))return o(s.rpcErrors.invalidRequest({message:`The origin "${p}" is not allowed to invoke the method "${f.method}".`}));try{t.result=await c({snapId:h,request:f,handler:r.HandlerType.OnKeyringRequest})}catch(e){return o(e)}return o()},hookNames:{hasPermission:!0,handleSnapRpcRequest:!0,getSnap:!0,getAllowedKeyringMethods:!0}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/invokeKeyring.cjs"}],[2718,{"@metamask/rpc-errors":2554,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.invokeSnapSugar=n.invokeSnapSugarHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/utils");async function i(e,t,n,s,{invokeSnap:r}){try{const n=a(e.params);t.result=await r(n)}catch(e){return s(e)}return s()}function a(e){if(!(0,r.isObject)(e))throw s.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{snapId:t,request:n}=e;if(!t||"string"!=typeof t||""===t)throw s.rpcErrors.invalidParams({message:"Must specify a valid snap ID."});if(!(0,r.isObject)(n))throw s.rpcErrors.invalidParams({message:"Expected request to be a single object."});return e}n.invokeSnapSugarHandler={methodNames:["wallet_invokeSnap"],implementation:i,hookNames:{invokeSnap:!0}},n.invokeSnapSugar=i,n.getValidatedParams=a}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/invokeSnapSugar.cjs"}],[2719,{"../restricted/getBip32Entropy.cjs":2731,"../restricted/getBip32PublicKey.cjs":2732,"../restricted/getBip44Entropy.cjs":2733,"../restricted/getEntropy.cjs":2734,"@metamask/rpc-errors":2554},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.listEntropySourcesHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("../restricted/getBip32Entropy.cjs"),i=e("../restricted/getBip32PublicKey.cjs"),a=e("../restricted/getBip44Entropy.cjs"),o=e("../restricted/getEntropy.cjs"),c=[r.getBip32EntropyBuilder.targetName,i.getBip32PublicKeyBuilder.targetName,a.getBip44EntropyBuilder.targetName,o.getEntropyBuilder.targetName];n.listEntropySourcesHandler={methodNames:["snap_listEntropySources"],implementation:async function(e,t,n,r,{hasPermission:i,getEntropySources:a,getUnlockPromise:o}){if(!c.some(i))return r(s.providerErrors.unauthorized());return await o(!0),t.result=a(),r()},hookNames:{hasPermission:!0,getEntropySources:!0,getUnlockPromise:!0}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/listEntropySources.cjs"}],[2720,{"../utils.cjs":2742,"./handlers.cjs":2715,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapsMethodMiddleware=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-utils"),i=e("./handlers.cjs"),a=e("../utils.cjs");n.createSnapsMethodMiddleware=function(e,t){return async function(n,o,c,u){const l=i.methodHandlers[n.method];if(l){if(String.prototype.startsWith.call(n.method,"snap_")&&!e)return u(s.rpcErrors.methodNotFound());const{implementation:i,hookNames:d}=l;try{return await i(n,o,c,u,(0,a.selectHooks)(t,d))}catch(e){return(0,r.logError)(e),u(e)}}return c()}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/middleware.cjs"}],[2721,{"../restricted/invokeSnap.cjs":2738,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getSnapPermissionsRequest=n.hasRequestedSnaps=n.requestSnapsHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-utils"),i=e("@metamask/utils"),a=e("../restricted/invokeSnap.cjs");function o(e,t){const n=e[a.WALLET_SNAP_PERMISSION_KEY]?.caveats?.find((e=>e.type===r.SnapCaveatType.SnapIds)),s=n?.value;return!!(0,i.isObject)(s)&&Object.keys(t).every((e=>(0,i.hasProperty)(s,e)))}function c(e,t){if((0,r.verifyRequestedSnapPermissions)(t),!e[a.WALLET_SNAP_PERMISSION_KEY])return t;const n=e[a.WALLET_SNAP_PERMISSION_KEY].caveats?.find((e=>e.type===r.SnapCaveatType.SnapIds)),s=n?.value??{},i=t[a.WALLET_SNAP_PERMISSION_KEY].caveats[0].value,o=[...new Set([...Object.keys(s),...Object.keys(i)])].reduce(((e,t)=>(e[t]=i[t]??s[t],e)),{});return t[a.WALLET_SNAP_PERMISSION_KEY].caveats[0].value=o,t}n.requestSnapsHandler={methodNames:["wallet_requestSnaps"],implementation:async function(e,t,n,u,{installSnaps:l,requestPermissions:d,getPermissions:m}){const p=e.params;if(!(0,i.isObject)(p))return u(s.rpcErrors.invalidParams({message:'"params" must be an object.'}));try{if(0===Object.keys(p).length)return u(s.rpcErrors.invalidParams({message:"Request must have at least one requested snap."}));const e={[a.WALLET_SNAP_PERMISSION_KEY]:{caveats:[{type:r.SnapCaveatType.SnapIds,value:p}]}},n=await m();if(n)if(o(n,p))t.result=await l(p);else{const s=c(n,e),[,r]=await d(s);t.result=r.data[a.WALLET_SNAP_PERMISSION_KEY]}else{const[,n]=await d(e);t.result=n.data[a.WALLET_SNAP_PERMISSION_KEY]}}catch(e){t.error=e}return u()},hookNames:{installSnaps:!0,requestPermissions:!0,getPermissions:!0}},n.hasRequestedSnaps=o,n.getSnapPermissionsRequest=c}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/requestSnaps.cjs"}],[2722,{"@metamask/rpc-errors":2554,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.resolveInterfaceHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/superstruct"),i=e("@metamask/utils");n.resolveInterfaceHandler={methodNames:["snap_resolveInterface"],implementation:async function(e,t,n,i,{resolveInterface:o}){const{params:c}=e;try{const e=function(e){try{return(0,r.create)(e,a)}catch(e){if(e instanceof r.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(c),{id:n,value:i}=e;await o(n,i),t.result=null}catch(e){return i(e)}return i()},hookNames:{resolveInterface:!0}};const a=(0,r.object)({id:(0,r.string)(),value:i.JsonStruct})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/resolveInterface.cjs"}],[2723,{"../endowments/index.cjs":2689,"@metamask/rpc-errors":2554,"@metamask/snaps-sdk":2746,"@metamask/snaps-utils":2850,"@metamask/superstruct":2872,"@metamask/utils":2950,luxon:4865},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.scheduleBackgroundEventHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-sdk"),i=e("@metamask/snaps-utils"),a=e("@metamask/superstruct"),o=e("@metamask/utils"),c=e("luxon"),u=e("../endowments/index.cjs");n.scheduleBackgroundEventHandler={methodNames:["snap_scheduleBackgroundEvent"],implementation:async function(e,t,n,r,{scheduleBackgroundEvent:i,hasPermission:l}){const{params:d}=e;if(!l(u.SnapEndowments.Cronjob))return r(s.providerErrors.unauthorized());try{const e=function(e){try{return(0,a.create)(e,p)}catch(e){if(e instanceof a.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(d),{request:n}=e,r=function(e){if("duration"in e)return c.DateTime.fromJSDate(new Date).toUTC().plus(c.Duration.fromISO(e.duration));return c.DateTime.fromISO(e.date,{setZone:!0})}(e),u=r.startOf("second").toISO({suppressMilliseconds:!0});(0,o.assert)(u);const l=i({date:u,request:n});t.result=l}catch(e){return r(e)}return r()},hookNames:{scheduleBackgroundEvent:!0,hasPermission:!0}};const l=/Z|([+-]\d{2}:?\d{2})$/u,d=(0,a.object)({date:(0,a.refine)((0,a.string)(),"date",(e=>c.DateTime.fromISO(e).isValid?!!l.test(e)||"ISO 8601 date must have timezone information":"Not a valid ISO 8601 date")),request:i.CronjobRpcRequestStruct}),m=(0,a.object)({duration:(0,a.refine)((0,a.string)(),"duration",(e=>!!c.Duration.fromISO(e).isValid||"Not a valid ISO 8601 duration")),request:i.CronjobRpcRequestStruct}),p=(0,r.selectiveUnion)((e=>(0,o.hasProperty)(e,"date")?d:m))}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/scheduleBackgroundEvent.cjs"}],[2724,{"../restricted/manageState.cjs":2740,"../utils.cjs":2742,"@metamask/rpc-errors":2554,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.set=n.setStateHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/superstruct"),i=e("@metamask/utils"),a=e("../restricted/manageState.cjs"),o=e("../utils.cjs");n.setStateHandler={methodNames:["snap_setState"],implementation:async function(e,t,n,o,{hasPermission:l,getSnapState:d,getUnlockPromise:m,updateSnapState:p}){const{params:h}=e;if(!l(a.manageStateBuilder.targetName))return o(s.providerErrors.unauthorized());try{const e=function(e){try{return(0,r.create)(e,c)}catch(e){if(e instanceof r.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(h),{key:n,value:l,encrypted:f=!0}=e;if(n===undefined&&!(0,i.isObject)(l))return o(s.rpcErrors.invalidParams("Invalid params: Value must be an object if key is not provided."));f&&await m(!0);const g=await async function(e,t,n,s){if(e===undefined)return(0,i.assert)((0,i.isObject)(t)),t;const r=await s(n);return u(r,e,t)}(n,l,f,d);if((0,i.getJsonSize)(g)>a.STORAGE_SIZE_LIMIT)throw s.rpcErrors.invalidParams({message:`Invalid params: The new state must not exceed ${a.STORAGE_SIZE_LIMIT/1e6} MB in size.`});await p(g,f),t.result=null}catch(e){return o(e)}return o()},hookNames:{hasPermission:!0,getSnapState:!0,getUnlockPromise:!0,updateSnapState:!0}};const c=(0,r.object)({key:(0,r.optional)(o.StateKeyStruct),value:i.JsonStruct,encrypted:(0,r.optional)((0,r.boolean)())});function u(e,t,n){const r=t.split("."),a=e??{};let c=a;for(let e=0;e<r.length;e++){const t=r[e];if(o.FORBIDDEN_KEYS.includes(t))throw s.rpcErrors.invalidParams("Invalid params: Key contains forbidden characters.");if(e===r.length-1)return c[t]=n,a;if((0,i.hasProperty)(c,t)&&null!==c[t]){if(!(0,i.isObject)(c[t]))throw s.rpcErrors.invalidParams("Invalid params: Cannot overwrite non-object value.")}else c[t]={};c=c[t]}throw new Error("Unexpected error while setting the state.")}n.set=u}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/setState.cjs"}],[2725,{"@metamask/rpc-errors":2554,"@metamask/snaps-sdk":2746,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.updateInterfaceHandler=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct");n.updateInterfaceHandler={methodNames:["snap_updateInterface"],implementation:async function(e,t,n,r,{updateInterface:o}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,a)}catch(e){if(e instanceof i.StructError)throw s.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw s.rpcErrors.internal()}}(c),{id:n,ui:r,context:u}=e;await o(n,r,u),t.result=null}catch(e){return r(e)}return r()},hookNames:{updateInterface:!0}};const a=(0,i.object)({id:(0,i.string)(),ui:r.ComponentOrElementStruct,context:(0,i.optional)(r.InterfaceContextStruct)})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/permitted/updateInterface.cjs"}],[2726,{"../getBip32Entropy.cjs":2731,"../getBip32PublicKey.cjs":2732,"../getBip44Entropy.cjs":2733,"../invokeSnap.cjs":2738,"./permittedCoinTypes.cjs":2727,"./permittedDerivationPaths.cjs":2728,"./snapIds.cjs":2729},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.caveatMappers=n.caveatSpecifications=void 0;const s=e("./permittedCoinTypes.cjs"),r=e("./permittedDerivationPaths.cjs"),i=e("./snapIds.cjs"),a=e("../getBip32Entropy.cjs"),o=e("../getBip32PublicKey.cjs"),c=e("../getBip44Entropy.cjs"),u=e("../invokeSnap.cjs");n.caveatSpecifications={...r.PermittedDerivationPathsCaveatSpecification,...s.PermittedCoinTypesCaveatSpecification,...i.SnapIdsCaveatSpecification},n.caveatMappers={[a.getBip32EntropyBuilder.targetName]:r.permittedDerivationPathsCaveatMapper,[o.getBip32PublicKeyBuilder.targetName]:r.permittedDerivationPathsCaveatMapper,[c.getBip44EntropyBuilder.targetName]:s.permittedCoinTypesCaveatMapper,[u.invokeSnapBuilder.targetName]:i.snapIdsCaveatMapper}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/caveats/index.cjs"}],[2727,{"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.PermittedCoinTypesCaveatSpecification=n.validateBIP44Caveat=n.validateBIP44Params=n.permittedCoinTypesCaveatMapper=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-utils"),i=e("@metamask/utils");function a(e){if(!(0,i.isPlainObject)(e)||!(0,i.hasProperty)(e,"coinType"))throw s.rpcErrors.invalidParams({message:"Expected a plain object containing a coin type."});if("number"!=typeof e.coinType||!Number.isInteger(e.coinType)||e.coinType<0||e.coinType>2147483647)throw s.rpcErrors.invalidParams({message:'Invalid "coinType" parameter. Coin type must be a non-negative integer.'});if((0,i.hasProperty)(e,"source")&&void 0!==e.source&&"string"!=typeof e.source)throw s.rpcErrors.invalidParams({message:'Invalid "source" parameter. Source must be a string if provided.'});if(r.FORBIDDEN_COIN_TYPES.includes(e.coinType))throw s.rpcErrors.invalidParams({message:`Coin type ${e.coinType} is forbidden.`})}function o(e){if(!(0,i.hasProperty)(e,"value")||!Array.isArray(e.value)||0===e.value.length)throw s.rpcErrors.invalidParams({message:"Expected non-empty array of coin types."});e.value.forEach(a)}n.permittedCoinTypesCaveatMapper=function(e){return{caveats:[{type:r.SnapCaveatType.PermittedCoinTypes,value:e}]}},n.validateBIP44Params=a,n.validateBIP44Caveat=o,n.PermittedCoinTypesCaveatSpecification={[r.SnapCaveatType.PermittedCoinTypes]:Object.freeze({type:r.SnapCaveatType.PermittedCoinTypes,decorator:(e,t)=>async n=>{const{params:r}=n;a(r);if(!t.value.find((e=>e.coinType===r.coinType)))throw s.providerErrors.unauthorized({message:"The requested coin type is not permitted. Allowed coin types must be specified in the snap manifest."});return await e(n)},validator:e=>o(e)})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/caveats/permittedCoinTypes.cjs"}],[2728,{"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.PermittedDerivationPathsCaveatSpecification=n.validateBIP32CaveatPaths=n.validateBIP32Path=n.permittedDerivationPathsCaveatMapper=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-utils"),i=e("@metamask/superstruct"),a=e("@metamask/utils");function o(e){(0,a.assertStruct)(e,r.Bip32EntropyStruct,"Invalid BIP-32 entropy path definition",s.rpcErrors.invalidParams)}function c(e){(0,a.assertStruct)(e,(0,i.type)({value:(0,i.size)((0,i.array)(r.Bip32EntropyStruct),1,Infinity)}),"Invalid BIP-32 entropy caveat",s.rpcErrors.internal)}n.permittedDerivationPathsCaveatMapper=function(e){return{caveats:[{type:r.SnapCaveatType.PermittedDerivationPaths,value:e}]}},n.validateBIP32Path=o,n.validateBIP32CaveatPaths=c,n.PermittedDerivationPathsCaveatSpecification={[r.SnapCaveatType.PermittedDerivationPaths]:Object.freeze({type:r.SnapCaveatType.PermittedDerivationPaths,decorator:(e,t)=>async n=>{const{params:i}=n;o(i);if(!t.value.find((e=>(0,r.isEqual)(i.path.slice(0,e.path.length),e.path)&&e.curve===i.curve)))throw s.providerErrors.unauthorized({message:"The requested path is not permitted. Allowed paths must be specified in the snap manifest."});return await e(n)},validator:e=>c(e)})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/caveats/permittedDerivationPaths.cjs"}],[2729,{"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SnapIdsCaveatSpecification=n.validateSnapIdsCaveat=n.snapIdsCaveatMapper=void 0;const s=e("@metamask/rpc-errors"),r=e("@metamask/snaps-utils"),i=e("@metamask/superstruct"),a=e("@metamask/utils");function o(e){(0,a.assertStruct)(e,(0,i.type)({value:r.SnapIdsStruct}),"Expected caveat to have a value property of a non-empty object of snap IDs.",s.rpcErrors.invalidParams)}n.snapIdsCaveatMapper=function(e){return{caveats:[{type:r.SnapCaveatType.SnapIds,value:e}]}},n.validateSnapIdsCaveat=o,n.SnapIdsCaveatSpecification={[r.SnapCaveatType.SnapIds]:Object.freeze({type:r.SnapCaveatType.SnapIds,validator:e=>o(e),decorator:(e,t)=>async n=>{const{params:s,context:{origin:r}}=n,i=t.value,{snapId:o}=s;if(!(0,a.hasProperty)(i,o))throw new Error(`${r} does not have permission to invoke ${o} snap.`);return await e(n)}})}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/caveats/snapIds.cjs"}],[2730,{"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-sdk":2746,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getDialogImplementation=n.dialogBuilder=n.DIALOG_APPROVAL_TYPES=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),a=e("@metamask/superstruct"),o=e("@metamask/utils"),c="snap_dialog";n.DIALOG_APPROVAL_TYPES={[i.DialogType.Alert]:`${c}:alert`,[i.DialogType.Confirmation]:`${c}:confirmation`,[i.DialogType.Prompt]:`${c}:prompt`,default:c};const u=(0,a.optional)((0,a.size)((0,a.string)(),1,40));n.dialogBuilder=Object.freeze({targetName:c,specificationBuilder:({allowedCaveats:e=null,methodHooks:t})=>({permissionType:s.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:e,methodImplementation:w(t),subjectTypes:[s.SubjectType.Snap]}),methodHooks:{requestUserApproval:!0,createInterface:!0,getInterface:!0}});const l=(0,a.object)({type:(0,i.enumValue)(i.DialogType.Alert),content:i.ComponentOrElementStruct}),d=(0,a.object)({type:(0,i.enumValue)(i.DialogType.Alert),id:(0,a.string)()}),m=(0,i.selectiveUnion)((e=>(0,o.isPlainObject)(e)&&(0,o.hasProperty)(e,"id")?d:l)),p=(0,a.object)({type:(0,i.enumValue)(i.DialogType.Confirmation),content:i.ComponentOrElementStruct}),h=(0,a.object)({type:(0,i.enumValue)(i.DialogType.Confirmation),id:(0,a.string)()}),f=(0,i.selectiveUnion)((e=>(0,o.isPlainObject)(e)&&(0,o.hasProperty)(e,"id")?h:p)),g=(0,a.object)({type:(0,i.enumValue)(i.DialogType.Prompt),content:i.ComponentOrElementStruct,placeholder:u}),y=(0,a.object)({type:(0,i.enumValue)(i.DialogType.Prompt),id:(0,a.string)(),placeholder:u}),b=(0,i.selectiveUnion)((e=>(0,o.isPlainObject)(e)&&(0,o.hasProperty)(e,"id")?y:g)),x=(0,a.object)({content:i.ComponentOrElementStruct}),S=(0,a.object)({id:(0,a.string)()}),k=(0,i.selectiveUnion)((e=>(0,o.isPlainObject)(e)&&(0,o.hasProperty)(e,"id")?S:x)),v=(0,i.selectiveUnion)((e=>{if((0,o.isPlainObject)(e)&&(0,o.hasProperty)(e,"type"))switch(e.type){case i.DialogType.Alert:return m;case i.DialogType.Confirmation:return f;case i.DialogType.Prompt:return b;default:throw new Error(`The "type" property must be one of: ${Object.values(i.DialogType).join(", ")}.`)}return k}));function w({requestUserApproval:e,createInterface:t,getInterface:s}){return async function(c){const{params:u,context:{origin:l}}=c;if(!(0,o.isObject)(u))throw r.rpcErrors.invalidParams({message:"Invalid params: Expected params to be a single object."});const d=function(e){try{return(0,a.create)(e,v)}catch(e){throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}`})}}(u),m=function(e){return function(e){return(0,o.hasProperty)(e,"type")?e.type:undefined}(e)===i.DialogType.Prompt}(d)?d.placeholder:undefined,p=(0,o.hasProperty)(d,"type")?d.type:"default",h=n.DIALOG_APPROVAL_TYPES[p];if((0,o.hasProperty)(d,"content")){const s=await t(l,d.content);return e({id:h===n.DIALOG_APPROVAL_TYPES.default?s:undefined,origin:l,type:h,requestData:{id:s,placeholder:m}})}return function(e,t,n){try{n(e,t)}catch(e){throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}`})}}(l,d.id,s),e({id:h===n.DIALOG_APPROVAL_TYPES.default?d.id:undefined,origin:l,type:h,requestData:{id:d.id,placeholder:m}})}}n.getDialogImplementation=w}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/dialog.cjs"}],[2731,{"../utils.cjs":2742,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getBip32EntropyImplementation=n.getBip32EntropyBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),a=e("@metamask/utils"),o=e("../utils.cjs"),c="snap_getBip32Entropy";function u({getMnemonic:e,getMnemonicSeed:t,getUnlockPromise:n,getClientCryptography:s}){return async function(r){await n(!0);const{params:i}=r;if((0,a.assert)(i),"secp256k1"===i.curve||"ed25519"===i.curve){const e=await(0,o.getValueFromEntropySource)(t,i.source);return(await(0,o.getNodeFromSeed)({curve:i.curve,path:i.path,seed:e,cryptographicFunctions:s()})).toJSON()}const c=await(0,o.getValueFromEntropySource)(e,i.source);return(await(0,o.getNodeFromMnemonic)({curve:i.curve,path:i.path,secretRecoveryPhrase:c,cryptographicFunctions:s()})).toJSON()}}n.getBip32EntropyBuilder=Object.freeze({targetName:c,specificationBuilder:({methodHooks:e})=>({permissionType:s.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:[i.SnapCaveatType.PermittedDerivationPaths],methodImplementation:u(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==i.SnapCaveatType.PermittedDerivationPaths)throw r.rpcErrors.invalidParams({message:`Expected a single "${i.SnapCaveatType.PermittedDerivationPaths}" caveat.`})},subjectTypes:[s.SubjectType.Snap]}),methodHooks:{getMnemonic:!0,getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}}),n.getBip32EntropyImplementation=u}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/getBip32Entropy.cjs"}],[2732,{"../utils.cjs":2742,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getBip32PublicKeyImplementation=n.getBip32PublicKeyBuilder=n.Bip32PublicKeyArgsStruct=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),a=e("@metamask/superstruct"),o=e("@metamask/utils"),c=e("../utils.cjs"),u="snap_getBip32PublicKey";n.Bip32PublicKeyArgsStruct=(0,i.bip32entropy)((0,a.object)({path:i.Bip32PathStruct,curve:i.CurveStruct,compressed:(0,a.optional)((0,a.boolean)()),source:(0,a.optional)((0,a.string)())}));function l({getMnemonic:e,getMnemonicSeed:t,getUnlockPromise:s,getClientCryptography:i}){return async function(a){await s(!0),(0,o.assertStruct)(a.params,n.Bip32PublicKeyArgsStruct,"Invalid BIP-32 public key params",r.rpcErrors.invalidParams);const{params:u}=a;if("secp256k1"===u.curve||"ed25519"===u.curve){const e=await(0,c.getValueFromEntropySource)(t,u.source),n=await(0,c.getNodeFromSeed)({curve:u.curve,path:u.path,seed:e,cryptographicFunctions:i()});return u.compressed?n.compressedPublicKey:n.publicKey}const l=await(0,c.getValueFromEntropySource)(e,u.source),d=await(0,c.getNodeFromMnemonic)({curve:u.curve,path:u.path,secretRecoveryPhrase:l,cryptographicFunctions:i()});return u.compressed?d.compressedPublicKey:d.publicKey}}n.getBip32PublicKeyBuilder=Object.freeze({targetName:u,specificationBuilder:({methodHooks:e})=>({permissionType:s.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:[i.SnapCaveatType.PermittedDerivationPaths],methodImplementation:l(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==i.SnapCaveatType.PermittedDerivationPaths)throw r.rpcErrors.invalidParams({message:`Expected a single "${i.SnapCaveatType.PermittedDerivationPaths}" caveat.`})},subjectTypes:[s.SubjectType.Snap]}),methodHooks:{getMnemonic:!0,getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}}),n.getBip32PublicKeyImplementation=l}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/getBip32PublicKey.cjs"}],[2733,{"../utils.cjs":2742,"@metamask/key-tree":1957,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getBip44EntropyImplementation=n.getBip44EntropyBuilder=void 0;const s=e("@metamask/key-tree"),r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),a=e("@metamask/snaps-utils"),o=e("../utils.cjs"),c="snap_getBip44Entropy";function u({getMnemonicSeed:e,getUnlockPromise:t,getClientCryptography:n}){return async function(r){await t(!0);const i=r.params,a=await(0,o.getValueFromEntropySource)(e,i.source);return(await s.BIP44CoinTypeNode.fromSeed({derivationPath:[a,"bip32:44'",`bip32:${i.coinType}'`],network:"mainnet"},n())).toJSON()}}n.getBip44EntropyBuilder=Object.freeze({targetName:c,specificationBuilder:({methodHooks:e})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:[a.SnapCaveatType.PermittedCoinTypes],methodImplementation:u(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==a.SnapCaveatType.PermittedCoinTypes)throw i.rpcErrors.invalidParams({message:`Expected a single "${a.SnapCaveatType.PermittedCoinTypes}" caveat.`})},subjectTypes:[r.SubjectType.Snap]}),methodHooks:{getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}}),n.getBip44EntropyImplementation=u}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/getBip44Entropy.cjs"}],[2734,{"../utils.cjs":2742,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getEntropyBuilder=n.GetEntropyArgsStruct=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),a=e("@metamask/superstruct"),o=e("@metamask/utils"),c=e("../utils.cjs"),u="snap_getEntropy";n.GetEntropyArgsStruct=(0,a.object)({version:(0,a.literal)(1),salt:(0,a.optional)((0,a.string)()),source:(0,a.optional)((0,a.string)())});function l({getMnemonicSeed:e,getUnlockPromise:t,getClientCryptography:s}){return async function(a){const{params:u,context:{origin:l}}=a;(0,o.assertStruct)(u,n.GetEntropyArgsStruct,'Invalid "snap_getEntropy" parameters',r.rpcErrors.invalidParams),await t(!0);const d=await(0,c.getValueFromEntropySource)(e,u.source);return(0,c.deriveEntropyFromSeed)({input:l,salt:u.salt,seed:d,magic:i.SIP_6_MAGIC_VALUE,cryptographicFunctions:s()})}}n.getEntropyBuilder=Object.freeze({targetName:u,specificationBuilder:({allowedCaveats:e=null,methodHooks:t})=>({permissionType:s.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:l(t),subjectTypes:[s.SubjectType.Snap]}),methodHooks:{getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/getEntropy.cjs"}],[2735,{"@metamask/permission-controller":2393},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getImplementation=n.getLocaleBuilder=n.specificationBuilder=void 0;const s=e("@metamask/permission-controller"),r="snap_getLocale";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:s.PermissionType.RestrictedMethod,targetName:r,allowedCaveats:e,methodImplementation:i(t),subjectTypes:[s.SubjectType.Snap]});function i({getPreferences:e}){return async function(t){return e().locale}}n.getLocaleBuilder=Object.freeze({targetName:r,specificationBuilder:n.specificationBuilder,methodHooks:{getPreferences:!0}}),n.getImplementation=i}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/getLocale.cjs"}],[2736,{"@metamask/permission-controller":2393},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getImplementation=n.getPreferencesBuilder=n.specificationBuilder=void 0;const s=e("@metamask/permission-controller"),r="snap_getPreferences";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:s.PermissionType.RestrictedMethod,targetName:r,allowedCaveats:e,methodImplementation:i(t),subjectTypes:[s.SubjectType.Snap]});function i({getPreferences:e}){return async function(t){return e()}}n.getPreferencesBuilder=Object.freeze({targetName:r,specificationBuilder:n.specificationBuilder,methodHooks:{getPreferences:!0}}),n.getImplementation=i}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/getPreferences.cjs"}],[2737,{"./caveats/index.cjs":2726,"./dialog.cjs":2730,"./getBip32Entropy.cjs":2731,"./getBip32PublicKey.cjs":2732,"./getBip44Entropy.cjs":2733,"./getEntropy.cjs":2734,"./getLocale.cjs":2735,"./getPreferences.cjs":2736,"./invokeSnap.cjs":2738,"./manageAccounts.cjs":2739,"./manageState.cjs":2740,"./notify.cjs":2741},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.DIALOG_APPROVAL_TYPES=n.restrictedMethodPermissionBuilders=n.getEncryptionEntropy=n.WALLET_SNAP_PERMISSION_KEY=void 0;const i=e("./dialog.cjs"),a=e("./getBip32Entropy.cjs"),o=e("./getBip32PublicKey.cjs"),c=e("./getBip44Entropy.cjs"),u=e("./getEntropy.cjs"),l=e("./getLocale.cjs"),d=e("./getPreferences.cjs"),m=e("./invokeSnap.cjs"),p=e("./manageAccounts.cjs"),h=e("./manageState.cjs"),f=e("./notify.cjs");var g=e("./invokeSnap.cjs");Object.defineProperty(n,"WALLET_SNAP_PERMISSION_KEY",{enumerable:!0,get:function(){return g.WALLET_SNAP_PERMISSION_KEY}});var y=e("./manageState.cjs");Object.defineProperty(n,"getEncryptionEntropy",{enumerable:!0,get:function(){return y.getEncryptionEntropy}}),n.restrictedMethodPermissionBuilders={[i.dialogBuilder.targetName]:i.dialogBuilder,[a.getBip32EntropyBuilder.targetName]:a.getBip32EntropyBuilder,[o.getBip32PublicKeyBuilder.targetName]:o.getBip32PublicKeyBuilder,[c.getBip44EntropyBuilder.targetName]:c.getBip44EntropyBuilder,[u.getEntropyBuilder.targetName]:u.getEntropyBuilder,[m.invokeSnapBuilder.targetName]:m.invokeSnapBuilder,[h.manageStateBuilder.targetName]:h.manageStateBuilder,[f.notifyBuilder.targetName]:f.notifyBuilder,[p.manageAccountsBuilder.targetName]:p.manageAccountsBuilder,[l.getLocaleBuilder.targetName]:l.getLocaleBuilder,[d.getPreferencesBuilder.targetName]:d.getPreferencesBuilder},r(e("./caveats/index.cjs"),n);var b=e("./dialog.cjs");Object.defineProperty(n,"DIALOG_APPROVAL_TYPES",{enumerable:!0,get:function(){return b.DIALOG_APPROVAL_TYPES}})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/index.cjs"}],[2738,{"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-utils":2850},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getInvokeSnapImplementation=n.invokeSnapBuilder=n.handleSnapInstall=n.WALLET_SNAP_PERMISSION_KEY=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils");n.WALLET_SNAP_PERMISSION_KEY="wallet_snap";n.handleSnapInstall=async({requestData:e,messagingSystem:t})=>{const s=e.permissions[n.WALLET_SNAP_PERMISSION_KEY].caveats?.[0].value,r=t.call("SnapController:getPermitted",e.metadata.origin),i=Object.keys(s).reduce(((e,t)=>(r[t]||(e[t]=s[t]),e)),{});return t.call("SnapController:install",e.metadata.origin,i)};function a({getSnap:e,handleSnapRpcRequest:t}){return async function(n){const{params:s={},context:a}=n,{snapId:o,request:c}=s;if(!e(o))throw r.rpcErrors.invalidRequest({message:`The snap "${o}" is not installed. Please install it first, before invoking the snap.`});const{origin:u}=a;return await t({snapId:o,origin:u,request:c,handler:i.HandlerType.OnRpcRequest})}}n.invokeSnapBuilder=Object.freeze({targetName:n.WALLET_SNAP_PERMISSION_KEY,specificationBuilder:({methodHooks:e})=>({permissionType:s.PermissionType.RestrictedMethod,targetName:n.WALLET_SNAP_PERMISSION_KEY,allowedCaveats:[i.SnapCaveatType.SnapIds],methodImplementation:a(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==i.SnapCaveatType.SnapIds)throw r.rpcErrors.invalidParams({message:`Expected a single "${i.SnapCaveatType.SnapIds}" caveat.`})},sideEffect:{onPermitted:n.handleSnapInstall}}),methodHooks:{getSnap:!0,handleSnapRpcRequest:!0}}),n.getInvokeSnapImplementation=a}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/invokeSnap.cjs"}],[2739,{"@metamask/permission-controller":2393,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.manageAccountsBuilder=n.manageAccountsImplementation=n.specificationBuilder=n.methodName=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/superstruct"),i=e("@metamask/utils"),a=(0,r.union)([(0,r.object)({method:(0,r.string)()}),(0,r.object)({method:(0,r.string)(),params:(0,r.union)([(0,r.array)(i.JsonStruct),(0,r.record)((0,r.string)(),i.JsonStruct)])})]);n.methodName="snap_manageAccounts";function o({getSnapKeyring:e}){return async function(t){const{context:{origin:n},params:s}=t;(0,r.assert)(s,a);const i=await e(n);return await i.handleKeyringSnapMessage(n,s)}}n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:s.PermissionType.RestrictedMethod,targetName:n.methodName,allowedCaveats:e,methodImplementation:o(t),subjectTypes:[s.SubjectType.Snap]}),n.manageAccountsImplementation=o,n.manageAccountsBuilder=Object.freeze({targetName:n.methodName,specificationBuilder:n.specificationBuilder,methodHooks:{getSnapKeyring:!0}})}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/manageAccounts.cjs"}],[2740,{"../utils.cjs":2742,"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-sdk":2746,"@metamask/snaps-utils":2850,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.getManageStateImplementation=n.getEncryptionEntropy=n.STORAGE_SIZE_LIMIT=n.manageStateBuilder=n.specificationBuilder=n.STATE_ENCRYPTION_SALT=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),a=e("@metamask/snaps-utils"),o=e("@metamask/utils"),c=e("../utils.cjs");n.STATE_ENCRYPTION_SALT="snap_manageState encryption";const u="snap_manageState";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:s.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:l(t),subjectTypes:[s.SubjectType.Snap]});function l({getUnlockPromise:e,clearSnapState:t,getSnapState:n,updateSnapState:s}){return async function(a){const{params:o={},method:c,context:{origin:u}}=a,l=d(o,c),m=l.encrypted??!0;switch(m&&l.operation!==i.ManageStateOperation.ClearState&&await e(!0),l.operation){case i.ManageStateOperation.ClearState:return t(u,m),null;case i.ManageStateOperation.GetState:return await n(u,m);case i.ManageStateOperation.UpdateState:return await s(u,l.newState,m),null;default:throw r.rpcErrors.invalidParams(`Invalid ${c} operation: "${l.operation}"`)}}}function d(e,t,s=n.STORAGE_SIZE_LIMIT){if(!(0,o.isObject)(e))throw r.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{operation:a,newState:c,encrypted:u}=e;if(!a||"string"!=typeof a||!Object.values(i.ManageStateOperation).includes(a))throw r.rpcErrors.invalidParams({message:'Must specify a valid manage state "operation".'});if(u!==undefined&&"boolean"!=typeof u)throw r.rpcErrors.invalidParams({message:'"encrypted" parameter must be a boolean if specified.'});if(a===i.ManageStateOperation.UpdateState){if(!(0,o.isObject)(c))throw r.rpcErrors.invalidParams({message:`Invalid ${t} "newState" parameter: The new state must be a plain object.`});let e;try{e=(0,o.getJsonSize)(c)}catch{throw r.rpcErrors.invalidParams({message:`Invalid ${t} "newState" parameter: The new state must be JSON serializable.`})}if(e>s)throw r.rpcErrors.invalidParams({message:`Invalid ${t} "newState" parameter: The new state must not exceed ${s/1e6} MB in size.`})}return e}n.manageStateBuilder=Object.freeze({targetName:u,specificationBuilder:n.specificationBuilder,methodHooks:{getUnlockPromise:!0,clearSnapState:!0,getSnapState:!0,updateSnapState:!0}}),n.STORAGE_SIZE_LIMIT=64e6,n.getEncryptionEntropy=async function({seed:e,snapId:t,cryptographicFunctions:s}){return await(0,c.deriveEntropyFromSeed)({seed:e,input:t,salt:n.STATE_ENCRYPTION_SALT,magic:a.STATE_ENCRYPTION_MAGIC_VALUE,cryptographicFunctions:s})},n.getManageStateImplementation=l,n.getValidatedParams=d}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/manageState.cjs"}],[2741,{"@metamask/permission-controller":2393,"@metamask/rpc-errors":2554,"@metamask/snaps-sdk":2746,"@metamask/snaps-utils":2850,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.getImplementation=n.notifyBuilder=n.specificationBuilder=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),a=e("@metamask/snaps-utils"),o=e("@metamask/superstruct"),c=e("@metamask/utils"),u="snap_notify",l=(0,o.object)({type:(0,i.enumValue)(i.NotificationType.Native),message:(0,o.string)()}),d=(0,o.object)({type:(0,i.enumValue)(i.NotificationType.InApp),message:(0,o.string)()}),m=(0,o.object)({type:(0,i.enumValue)(i.NotificationType.InApp),message:(0,o.string)(),content:i.ComponentOrElementStruct,title:(0,o.string)(),footerLink:(0,o.optional)((0,o.object)({href:(0,o.string)(),text:(0,o.string)()}))}),p=(0,i.union)([d,m,l]);n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:s.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:h(t),subjectTypes:[s.SubjectType.Snap]});function h({showNativeNotification:e,showInAppNotification:t,isOnPhishingList:n,maybeUpdatePhishingList:s,createInterface:a,getSnap:o}){return async function(u){const{params:l,context:{origin:d}}=u;await s();const m=f(l,n,o);if((0,c.hasProperty)(m,"content")){const e=await a(d,m.content,undefined,i.ContentType.Notification);m.content=e}switch(m.type){case i.NotificationType.Native:return await e(d,m);case i.NotificationType.InApp:return await t(d,m);default:throw r.rpcErrors.invalidParams({message:'Must specify a valid notification "type".'})}}}function f(e,t,n){if(!(0,c.isObject)(e))throw r.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{type:s,message:o}=e;if(!s||"string"!=typeof s||!Object.values(i.NotificationType).includes(s))throw r.rpcErrors.invalidParams({message:'Must specify a valid notification "type".'});const u=!o||"string"!=typeof o;if(s===i.NotificationType.Native&&(u||o.length>=50))throw r.rpcErrors.invalidParams({message:'Must specify a non-empty string "message" less than 50 characters long.'});if(s===i.NotificationType.InApp&&(u||o.length>=500))throw r.rpcErrors.invalidParams({message:'Must specify a non-empty string "message" less than 500 characters long.'});try{const s=(0,a.createUnion)(e,p,"type");return(0,a.validateTextLinks)(s.message,t,n),(0,c.hasProperty)(s,"footerLink")&&(0,a.validateLink)(s.footerLink.href,t,n),s}catch(e){throw r.rpcErrors.invalidParams({message:`Invalid params: ${(0,i.getErrorMessage)(e)}`})}}n.notifyBuilder=Object.freeze({targetName:u,specificationBuilder:n.specificationBuilder,methodHooks:{showNativeNotification:!0,showInAppNotification:!0,isOnPhishingList:!0,maybeUpdatePhishingList:!0,createInterface:!0,getSnap:!0}}),n.getImplementation=h,n.getValidatedParams=f}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/restricted/notify.cjs"}],[2742,{"@metamask/key-tree":1957,"@metamask/rpc-errors":2554,"@metamask/superstruct":2872,"@metamask/utils":2950,"@noble/hashes/sha3":3001},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getValueFromEntropySource=n.StateKeyStruct=n.isValidStateKey=n.getNodeFromSeed=n.getNodeFromMnemonic=n.getPathPrefix=n.deriveEntropyFromSeed=n.selectHooks=n.FORBIDDEN_KEYS=void 0;const s=e("@metamask/key-tree"),r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),a=e("@metamask/utils"),o=e("@noble/hashes/sha3"),c=2147483648;function u({input:e,salt:t,magic:n}){const s=(0,a.stringToBytes)(e),r=(0,a.stringToBytes)(t),i=function(e){const t=[],n=(0,a.createDataView)(e);for(let e=0;e<8;e++){const s=(n.getUint32(4*e)|c)>>>0;t.push(`bip32:${s-c}'`)}return t}((0,o.keccak_256)((0,a.concatBytes)([s,(0,o.keccak_256)(r)])));return[`bip32:${n}`,...i]}function l(e){switch(e){case"secp256k1":return"bip32";case"ed25519":return"slip10";case"ed25519Bip32":return"cip3";default:return(0,a.assertExhaustive)(e)}}function d(e){return e===undefined||e.split(".").every((e=>e.length>0))}n.FORBIDDEN_KEYS=["constructor","__proto__","prototype"],n.selectHooks=function(e,t){return t?Object.keys(t).reduce(((t,n)=>{const s=n;return t[s]=e[s],t}),{}):undefined},n.deriveEntropyFromSeed=async function({input:e,salt:t="",seed:n,magic:r,cryptographicFunctions:i}){const o=u({input:e,salt:t,magic:r}),{privateKey:c}=await s.SLIP10Node.fromSeed({derivationPath:[n,...o],curve:"secp256k1"},i);return(0,a.assert)(c,"Failed to derive the entropy."),(0,a.add0x)(c)},n.getPathPrefix=l,n.getNodeFromMnemonic=async function({curve:e,secretRecoveryPhrase:t,path:n,cryptographicFunctions:r}){const i=l(e);return await s.SLIP10Node.fromDerivationPath({curve:e,derivationPath:[t,...n.slice(1).map((e=>`${i}:${e}`))]},r)},n.getNodeFromSeed=async function({curve:e,seed:t,path:n,cryptographicFunctions:r}){const i=l(e);return await s.SLIP10Node.fromSeed({curve:e,derivationPath:[t,...n.slice(1).map((e=>`${i}:${e}`))]},r)},n.isValidStateKey=d,n.StateKeyStruct=(0,i.refine)((0,i.string)(),"state key",(e=>!!d(e)||"Invalid state key. Each part of the key must be non-empty.")),n.getValueFromEntropySource=async function(e,t){try{return await e(t)}catch(e){if(e instanceof Error)throw r.rpcErrors.invalidParams({message:e.message});throw r.rpcErrors.internal({message:"An unknown error occurred.",data:{error:e.toString()}})}}}}},{package:"@metamask/snaps-rpc-methods",file:"node_modules/@metamask/snaps-rpc-methods/dist/utils.cjs"}],[2743,{"./internals/index.cjs":2749,"@metamask/rpc-errors":2554},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.UserRejectedRequestError=n.UnsupportedMethodError=n.UnauthorizedError=n.DisconnectedError=n.ChainDisconnectedError=n.TransactionRejected=n.ResourceUnavailableError=n.ResourceNotFoundError=n.ParseError=n.MethodNotSupportedError=n.MethodNotFoundError=n.LimitExceededError=n.InvalidRequestError=n.InvalidParamsError=n.InvalidInputError=n.InternalError=void 0;const s=e("@metamask/rpc-errors"),r=e("./internals/index.cjs");n.InternalError=(0,r.createSnapError)(s.rpcErrors.internal),n.InvalidInputError=(0,r.createSnapError)(s.rpcErrors.invalidInput),n.InvalidParamsError=(0,r.createSnapError)(s.rpcErrors.invalidParams),n.InvalidRequestError=(0,r.createSnapError)(s.rpcErrors.invalidRequest),n.LimitExceededError=(0,r.createSnapError)(s.rpcErrors.limitExceeded),n.MethodNotFoundError=(0,r.createSnapError)(s.rpcErrors.methodNotFound),n.MethodNotSupportedError=(0,r.createSnapError)(s.rpcErrors.methodNotSupported),n.ParseError=(0,r.createSnapError)(s.rpcErrors.parse),n.ResourceNotFoundError=(0,r.createSnapError)(s.rpcErrors.resourceNotFound),n.ResourceUnavailableError=(0,r.createSnapError)(s.rpcErrors.resourceUnavailable),n.TransactionRejected=(0,r.createSnapError)(s.rpcErrors.transactionRejected),n.ChainDisconnectedError=(0,r.createSnapError)(s.providerErrors.chainDisconnected),n.DisconnectedError=(0,r.createSnapError)(s.providerErrors.disconnected),n.UnauthorizedError=(0,r.createSnapError)(s.providerErrors.unauthorized),n.UnsupportedMethodError=(0,r.createSnapError)(s.providerErrors.unsupportedMethod),n.UserRejectedRequestError=(0,r.createSnapError)(s.providerErrors.userRejectedRequest)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/error-wrappers.cjs"}],[2744,{"./internals/index.cjs":2749},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a,o=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},c=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.SnapError=void 0;const u=e("./internals/index.cjs");class l extends Error{constructor(e,t={}){const n=(0,u.getErrorMessage)(e);super(n),s.set(this,void 0),r.set(this,void 0),i.set(this,void 0),a.set(this,void 0),o(this,r,n,"f"),o(this,s,(0,u.getErrorCode)(e),"f");const c={...(0,u.getErrorData)(e),...t};Object.keys(c).length>0&&o(this,i,c,"f"),o(this,a,super.stack,"f")}get name(){return"SnapError"}get code(){return c(this,s,"f")}get message(){return c(this,r,"f")}get data(){return c(this,i,"f")}get stack(){return c(this,a,"f")}toJSON(){return{code:u.SNAP_ERROR_CODE,message:u.SNAP_ERROR_MESSAGE,data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}}n.SnapError=l,s=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/errors.cjs"}],[2745,{"./ui/index.cjs":2827,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getImageComponent=n.getImageData=void 0;const s=e("@metamask/utils"),r=e("./ui/index.cjs");async function i(e,t){const n=await async function(e,t){if("function"!=typeof fetch)throw new Error(`Failed to fetch image data from "${e}": Using this function requires the "endowment:network-access" permission.`);return fetch(e,t).then((async t=>{if(!t.ok)throw new Error(`Failed to fetch image data from "${e}": ${t.status} ${t.statusText}`);const n=await t.blob();return(0,s.assert)("image/jpeg"===n.type||"image/png"===n.type,"Expected image data to be a JPEG or PNG image."),n}))}(e,t),r=new Uint8Array(await n.arrayBuffer());return`data:${n.type};base64,${(0,s.bytesToBase64)(r)}`}n.getImageData=i,n.getImageComponent=async function(e,{width:t,height:n=t,request:a}){(0,s.assert)("number"==typeof t&&t>0,"Expected width to be a number greater than 0."),(0,s.assert)("number"==typeof n&&n>0,"Expected height to be a number greater than 0.");const o=await i(e,a),c=`width="${t}" height="${n}"`;return(0,r.image)(`<svg ${c.trim()} xmlns="http://www.w3.org/2000/svg"><image ${c.trim()} href="${o}" /></svg>`)}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/images.cjs"}],[2746,{"./error-wrappers.cjs":2743,"./errors.cjs":2744,"./images.cjs":2745,"./internals/index.cjs":2749,"./types/index.cjs":2805,"./ui/index.cjs":2827,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.assert=n.selectiveUnion=n.typedUnion=n.enumValue=n.union=n.literal=n.SNAP_ERROR_MESSAGE=n.SNAP_ERROR_CODE=n.getErrorStack=n.getErrorMessage=n.getErrorData=void 0;var i=e("./internals/index.cjs");Object.defineProperty(n,"getErrorData",{enumerable:!0,get:function(){return i.getErrorData}}),Object.defineProperty(n,"getErrorMessage",{enumerable:!0,get:function(){return i.getErrorMessage}}),Object.defineProperty(n,"getErrorStack",{enumerable:!0,get:function(){return i.getErrorStack}}),Object.defineProperty(n,"SNAP_ERROR_CODE",{enumerable:!0,get:function(){return i.SNAP_ERROR_CODE}}),Object.defineProperty(n,"SNAP_ERROR_MESSAGE",{enumerable:!0,get:function(){return i.SNAP_ERROR_MESSAGE}}),Object.defineProperty(n,"literal",{enumerable:!0,get:function(){return i.literal}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(n,"enumValue",{enumerable:!0,get:function(){return i.enumValue}}),Object.defineProperty(n,"typedUnion",{enumerable:!0,get:function(){return i.typedUnion}}),Object.defineProperty(n,"selectiveUnion",{enumerable:!0,get:function(){return i.selectiveUnion}});var a=e("@metamask/utils");Object.defineProperty(n,"assert",{enumerable:!0,get:function(){return a.assert}}),r(e("./errors.cjs"),n),r(e("./error-wrappers.cjs"),n),r(e("./images.cjs"),n),r(e("./types/index.cjs"),n),r(e("./ui/index.cjs"),n)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/index.cjs"}],[2747,{"../errors.cjs":2744},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapError=void 0;const s=e("../errors.cjs");n.createSnapError=function(e){return class extends s.SnapError{constructor(t,n){if("object"==typeof t){const n=e();return void super({code:n.code,message:n.message,data:t})}const s=e(t);super({code:s.code,message:s.message,data:n})}}}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/internals/error-wrappers.cjs"}],[2748,{"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorData=n.getErrorCode=n.getErrorStack=n.getErrorMessage=n.SNAP_ERROR_MESSAGE=n.SNAP_ERROR_CODE=void 0;const s=e("@metamask/utils");n.SNAP_ERROR_CODE=-31002,n.SNAP_ERROR_MESSAGE="Snap Error",n.getErrorMessage=function(e){return(0,s.isObject)(e)&&(0,s.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:String(e)},n.getErrorStack=function(e){return(0,s.isObject)(e)&&(0,s.hasProperty)(e,"stack")&&"string"==typeof e.stack?e.stack:undefined},n.getErrorCode=function(e){return(0,s.isObject)(e)&&(0,s.hasProperty)(e,"code")&&"number"==typeof e.code&&Number.isInteger(e.code)?e.code:-32603},n.getErrorData=function(e){return(0,s.isObject)(e)&&(0,s.hasProperty)(e,"data")&&"object"==typeof e.data&&null!==e.data&&(0,s.isValidJson)(e.data)&&!Array.isArray(e.data)?e.data:{}}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/internals/errors.cjs"}],[2749,{"./error-wrappers.cjs":2747,"./errors.cjs":2748,"./jsx.cjs":2750,"./structs.cjs":2751,"./svg.cjs":2752},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./error-wrappers.cjs"),n),r(e("./errors.cjs"),n),r(e("./structs.cjs"),n),r(e("./jsx.cjs"),n),r(e("./svg.cjs"),n)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/internals/index.cjs"}],[2750,{"./structs.cjs":2751},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.nullUnion=void 0;const s=e("./structs.cjs");n.nullUnion=function(e){return(0,s.union)(e)}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/internals/jsx.cjs"}],[2751,{"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.selectiveUnion=n.typedUnion=n.enumValue=n.union=n.literal=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils");function i(e){return(0,s.define)(JSON.stringify(e),(0,s.literal)(e).validator)}n.literal=i,n.union=function([e,...t]){const n=(0,s.union)([e,...t]);return new s.Struct({...n,schema:[e,...t]})},n.enumValue=function(e){return i(e)},n.typedUnion=function(e){const t=e.map((e=>"union"===e.type&&Array.isArray(e.schema)?e.schema:e)).flat(Infinity),n=t.map((({schema:e})=>e.type.type));return new s.Struct({type:"union",schema:t,*entries(e,n){if(!(0,r.isPlainObject)(e)||!(0,r.hasProperty)(e,"type"))return;const{type:i}=e,a=t.find((({schema:e})=>(0,s.is)(i,e.type)));if(a)for(const t of a.entries(e,n))yield t},coercer(e,n){if(!(0,r.isPlainObject)(e)||!(0,r.hasProperty)(e,"type"))return e;const{type:i}=e,a=t.find((({schema:e})=>(0,s.is)(i,e.type)));return a?a.coercer(e,n):e},*refiner(e,n){const r=t.find((({schema:t})=>(0,s.is)(e.type,t.type)));yield*r.refiner(e,n)},validator(e,i){if(!(0,r.isPlainObject)(e)||!(0,r.hasProperty)(e,"type")||"string"!=typeof e.type)return`Expected type to be one of: ${n.join(", ")}, but received: undefined`;const{type:a}=e,o=t.find((({schema:e})=>(0,s.is)(a,e.type)));return o?o.validator(e,i):`Expected type to be one of: ${n.join(", ")}, but received: "${a}"`}})},n.selectiveUnion=function(e){return new s.Struct({type:"union",schema:null,*entries(t,n){const s=e(t);for(const e of s.entries(t,n))yield e},*refiner(t,n){const s=e(t);yield*s.refiner(t,n)},coercer:(t,n)=>e(t).coercer(t,n),validator:(t,n)=>e(t).validator(t,n)})}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/internals/structs.cjs"}],[2752,{"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.svg=void 0;const s=e("@metamask/superstruct");n.svg=function(){return(0,s.refine)((0,s.string)(),"SVG",(e=>!!e.includes("<svg")||"Value is not a valid SVG."))}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/internals/svg.cjs"}],[2753,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){function s(e){return Object.fromEntries(Object.entries(e).filter((([,e])=>e!==undefined)))}Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapComponent=void 0,n.createSnapComponent=function(e){return t=>{const{key:n=null,...r}=t;return{type:e,props:s(r),key:n}}}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/component.cjs"}],[2754,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Address=void 0;const s=e("../component.cjs");n.Address=(0,s.createSnapComponent)("Address")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Address.cjs"}],[2755,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Avatar=void 0;const s=e("../component.cjs");n.Avatar=(0,s.createSnapComponent)("Avatar")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Avatar.cjs"}],[2756,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Banner=void 0;const s=e("../component.cjs");n.Banner=(0,s.createSnapComponent)("Banner")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Banner.cjs"}],[2757,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Box=void 0;const s=e("../component.cjs");n.Box=(0,s.createSnapComponent)("Box")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Box.cjs"}],[2758,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Card=void 0;const s=e("../component.cjs");n.Card=(0,s.createSnapComponent)("Card")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Card.cjs"}],[2759,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Container=void 0;const s=e("../component.cjs");n.Container=(0,s.createSnapComponent)("Container")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Container.cjs"}],[2760,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Copyable=void 0;const s=e("../component.cjs");n.Copyable=(0,s.createSnapComponent)("Copyable")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Copyable.cjs"}],[2761,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Divider=void 0;const s=e("../component.cjs");n.Divider=(0,s.createSnapComponent)("Divider")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Divider.cjs"}],[2762,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Footer=void 0;const s=e("../component.cjs");n.Footer=(0,s.createSnapComponent)("Footer")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Footer.cjs"}],[2763,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Heading=void 0;const s=e("../component.cjs");n.Heading=(0,s.createSnapComponent)("Heading")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Heading.cjs"}],[2764,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Icon=n.IconName=void 0;const s=e("../component.cjs");var r;!function(e){e.AddSquare="add-square",e.Add="add",e.Arrow2Down="arrow-2-down",e.Arrow2Left="arrow-2-left",e.Arrow2Right="arrow-2-right",e.Arrow2Up="arrow-2-up",e.Arrow2UpRight="arrow-2-up-right",e.ArrowDoubleLeft="arrow-double-left",e.ArrowDoubleRight="arrow-double-right",e.ArrowDown="arrow-down",e.ArrowLeft="arrow-left",e.ArrowRight="arrow-right",e.ArrowUp="arrow-up",e.BankToken="bank-token",e.Bank="bank",e.Book="book",e.Bookmark="bookmark",e.Bridge="bridge",e.Calculator="calculator",e.CardPos="card-pos",e.CardToken="card-token",e.Card="card",e.Category="category",e.Chart="chart",e.CheckBold="check-bold",e.Check="check",e.Clock="clock",e.Close="close",e.CodeCircle="code-circle",e.Coin="coin",e.Confirmation="confirmation",e.Connect="connect",e.CopySuccess="copy-success",e.Copy="copy",e.Customize="customize",e.Danger="danger",e.Dark="dark",e.Data="data",e.Diagram="diagram",e.DocumentCode="document-code",e.DragDrop="drag-drop",e.DraggingAnimation="dragging-animation",e.PinningAnimation="pinning-animation",e.Edit="edit",e.Eraser="eraser",e.Ethereum="ethereum",e.Expand="expand",e.Explore="explore",e.Export="export",e.EyeSlash="eye-slash",e.Eye="eye",e.Filter="filter",e.Flag="flag",e.FlashSlash="flash-slash",e.Flash="flash",e.FullCircle="full-circle",e.Gas="gas",e.GlobalSearch="global-search",e.Global="global",e.Graph="graph",e.Hardware="hardware",e.Heart="heart",e.Hierarchy="hierarchy",e.Home="home",e.Import="import",e.Info="info",e.Key="key",e.Light="light",e.Link="link",e.Loading="loading",e.LockCircle="lock-circle",e.LockSlash="lock-slash",e.Lock="lock",e.Login="login",e.Logout="logout",e.Menu="menu",e.MessageQuestion="message-question",e.Messages="messages",e.MinusBold="minus-bold",e.MinusSquare="minus-square",e.Minus="minus",e.Mobile="mobile",e.Money="money",e.Monitor="monitor",e.MoreHorizontal="more-horizontal",e.MoreVertical="more-vertical",e.NotificationCircle="notification-circle",e.Notification="notification",e.PasswordCheck="password-check",e.People="people",e.Pin="pin",e.ProgrammingArrows="programming-arrows",e.Custody="custody",e.Question="question",e.Received="received",e.Refresh="refresh",e.Save="save",e.ScanBarcode="scan-barcode",e.ScanFocus="scan-focus",e.Scan="scan",e.Scroll="scroll",e.Search="search",e.SecurityCard="security-card",e.SecurityCross="security-cross",e.SecurityKey="security-key",e.SecuritySearch="security-search",e.SecuritySlash="security-slash",e.SecurityTick="security-tick",e.SecurityTime="security-time",e.SecurityUser="security-user",e.Security="security",e.Send1="send-1",e.Send2="send-2",e.Setting="setting",e.Slash="slash",e.SnapsMobile="snaps-mobile",e.SnapsPlus="snaps-plus",e.Snaps="snaps",e.Speedometer="speedometer",e.Star="star",e.Stake="stake",e.Student="student",e.SwapHorizontal="swap-horizontal",e.SwapVertical="swap-vertical",e.Tag="tag",e.Tilde="tilde",e.Timer="timer",e.Trash="trash",e.TrendDown="trend-down",e.TrendUp="trend-up",e.UserCircleAdd="user-circle-add",e.UserCircleLink="user-circle-link",e.UserCircleRemove="user-circle-remove",e.UserCircle="user-circle",e.User="user",e.WalletCard="wallet-card",e.WalletMoney="wallet-money",e.Wallet="wallet",e.Warning="warning",e.Twitter="twitter",e.QrCode="qr-code",e.UserCheck="user-check",e.Unpin="unpin",e.Ban="ban",e.Bold="bold",e.CircleX="circle-x",e.Download="download",e.FileIcon="file",e.Flask="flask",e.Plug="plug",e.Share="share",e.Square="square",e.Tint="tint",e.Upload="upload",e.Usb="usb",e.Wifi="wifi",e.PlusMinus="plus-minus"}(r||(n.IconName=r={}));n.Icon=(0,s.createSnapComponent)("Icon")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Icon.cjs"}],[2765,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Image=void 0;const s=e("../component.cjs");n.Image=(0,s.createSnapComponent)("Image")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Image.cjs"}],[2766,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Link=void 0;const s=e("../component.cjs");n.Link=(0,s.createSnapComponent)("Link")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Link.cjs"}],[2767,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Row=void 0;const s=e("../component.cjs");n.Row=(0,s.createSnapComponent)("Row")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Row.cjs"}],[2768,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Section=void 0;const s=e("../component.cjs");n.Section=(0,s.createSnapComponent)("Section")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Section.cjs"}],[2769,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Skeleton=void 0;const s=e("../component.cjs");n.Skeleton=(0,s.createSnapComponent)("Skeleton")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Skeleton.cjs"}],[2770,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Spinner=void 0;const s=e("../component.cjs");n.Spinner=(0,s.createSnapComponent)("Spinner")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Spinner.cjs"}],[2771,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Text=void 0;const s=e("../component.cjs");n.Text=(0,s.createSnapComponent)("Text")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Text.cjs"}],[2772,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Tooltip=void 0;const s=e("../component.cjs");n.Tooltip=(0,s.createSnapComponent)("Tooltip")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Tooltip.cjs"}],[2773,{"../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Value=void 0;const s=e("../component.cjs");n.Value=(0,s.createSnapComponent)("Value")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/Value.cjs"}],[2774,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AddressInput=void 0;const s=e("../../component.cjs");n.AddressInput=(0,s.createSnapComponent)("AddressInput")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/AddressInput.cjs"}],[2775,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.AssetSelector=void 0;const s=e("../../component.cjs");n.AssetSelector=(0,s.createSnapComponent)("AssetSelector")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/AssetSelector.cjs"}],[2776,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Button=void 0;const s=e("../../component.cjs");n.Button=(0,s.createSnapComponent)("Button")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/Button.cjs"}],[2777,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Checkbox=void 0;const s=e("../../component.cjs");n.Checkbox=(0,s.createSnapComponent)("Checkbox")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/Checkbox.cjs"}],[2778,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Dropdown=void 0;const s=e("../../component.cjs");n.Dropdown=(0,s.createSnapComponent)("Dropdown")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/Dropdown.cjs"}],[2779,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Field=void 0;const s=e("../../component.cjs");n.Field=(0,s.createSnapComponent)("Field")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/Field.cjs"}],[2780,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.FileInput=void 0;const s=e("../../component.cjs");n.FileInput=(0,s.createSnapComponent)("FileInput")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/FileInput.cjs"}],[2781,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Form=void 0;const s=e("../../component.cjs");n.Form=(0,s.createSnapComponent)("Form")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/Form.cjs"}],[2782,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Input=void 0;const s=e("../../component.cjs");n.Input=(0,s.createSnapComponent)("Input")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/Input.cjs"}],[2783,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Option=void 0;const s=e("../../component.cjs");n.Option=(0,s.createSnapComponent)("Option")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/Option.cjs"}],[2784,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Radio=void 0;const s=e("../../component.cjs");n.Radio=(0,s.createSnapComponent)("Radio")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/Radio.cjs"}],[2785,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.RadioGroup=void 0;const s=e("../../component.cjs");n.RadioGroup=(0,s.createSnapComponent)("RadioGroup")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/RadioGroup.cjs"}],[2786,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Selector=void 0;const s=e("../../component.cjs");n.Selector=(0,s.createSnapComponent)("Selector")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/Selector.cjs"}],[2787,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SelectorOption=void 0;const s=e("../../component.cjs");n.SelectorOption=(0,s.createSnapComponent)("SelectorOption")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/SelectorOption.cjs"}],[2788,{"./AddressInput.cjs":2774,"./AssetSelector.cjs":2775,"./Button.cjs":2776,"./Checkbox.cjs":2777,"./Dropdown.cjs":2778,"./Field.cjs":2779,"./FileInput.cjs":2780,"./Form.cjs":2781,"./Input.cjs":2782,"./Option.cjs":2783,"./Radio.cjs":2784,"./RadioGroup.cjs":2785,"./Selector.cjs":2786,"./SelectorOption.cjs":2787},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./AssetSelector.cjs"),n),r(e("./Button.cjs"),n),r(e("./Checkbox.cjs"),n),r(e("./Dropdown.cjs"),n),r(e("./Option.cjs"),n),r(e("./Radio.cjs"),n),r(e("./RadioGroup.cjs"),n),r(e("./Field.cjs"),n),r(e("./FileInput.cjs"),n),r(e("./Form.cjs"),n),r(e("./Input.cjs"),n),r(e("./Selector.cjs"),n),r(e("./SelectorOption.cjs"),n),r(e("./AddressInput.cjs"),n)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/form/index.cjs"}],[2789,{"../../component.cjs":2753,"../Text.cjs":2771},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Bold=void 0;const s=e("../../component.cjs");e("../Text.cjs");n.Bold=(0,s.createSnapComponent)("Bold")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/formatting/Bold.cjs"}],[2790,{"../../component.cjs":2753},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Italic=void 0;const s=e("../../component.cjs");n.Italic=(0,s.createSnapComponent)("Italic")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/formatting/Italic.cjs"}],[2791,{"./Bold.cjs":2789,"./Italic.cjs":2790},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./Bold.cjs"),n),r(e("./Italic.cjs"),n)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/formatting/index.cjs"}],[2792,{"./Address.cjs":2754,"./Avatar.cjs":2755,"./Banner.cjs":2756,"./Box.cjs":2757,"./Card.cjs":2758,"./Container.cjs":2759,"./Copyable.cjs":2760,"./Divider.cjs":2761,"./Footer.cjs":2762,"./Heading.cjs":2763,"./Icon.cjs":2764,"./Image.cjs":2765,"./Link.cjs":2766,"./Row.cjs":2767,"./Section.cjs":2768,"./Skeleton.cjs":2769,"./Spinner.cjs":2770,"./Text.cjs":2771,"./Tooltip.cjs":2772,"./Value.cjs":2773,"./form/index.cjs":2788,"./formatting/index.cjs":2791},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./form/index.cjs"),n),r(e("./formatting/index.cjs"),n),r(e("./Address.cjs"),n),r(e("./Avatar.cjs"),n),r(e("./Box.cjs"),n),r(e("./Card.cjs"),n),r(e("./Copyable.cjs"),n),r(e("./Divider.cjs"),n),r(e("./Value.cjs"),n),r(e("./Heading.cjs"),n),r(e("./Icon.cjs"),n),r(e("./Image.cjs"),n),r(e("./Link.cjs"),n),r(e("./Row.cjs"),n),r(e("./Spinner.cjs"),n),r(e("./Text.cjs"),n),r(e("./Tooltip.cjs"),n),r(e("./Footer.cjs"),n),r(e("./Container.cjs"),n),r(e("./Section.cjs"),n),r(e("./Banner.cjs"),n),r(e("./Skeleton.cjs"),n)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/components/index.cjs"}],[2793,{"./component.cjs":2753,"./components/index.cjs":2792,"./jsx-dev-runtime.cjs":2794,"./jsx-runtime.cjs":2795,"./validation.cjs":2796},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.FieldChildUnionStruct=n.FormChildStruct=n.BoxChildStruct=n.assertJSXElement=n.isJSXElementUnsafe=n.isJSXElement=n.RootJSXElementStruct=n.JSXElementStruct=void 0,r(e("./component.cjs"),n),r(e("./components/index.cjs"),n),r(e("./jsx-runtime.cjs"),n),r(e("./jsx-dev-runtime.cjs"),n);var i=e("./validation.cjs");Object.defineProperty(n,"JSXElementStruct",{enumerable:!0,get:function(){return i.JSXElementStruct}}),Object.defineProperty(n,"RootJSXElementStruct",{enumerable:!0,get:function(){return i.RootJSXElementStruct}}),Object.defineProperty(n,"isJSXElement",{enumerable:!0,get:function(){return i.isJSXElement}}),Object.defineProperty(n,"isJSXElementUnsafe",{enumerable:!0,get:function(){return i.isJSXElementUnsafe}}),Object.defineProperty(n,"assertJSXElement",{enumerable:!0,get:function(){return i.assertJSXElement}}),Object.defineProperty(n,"BoxChildStruct",{enumerable:!0,get:function(){return i.BoxChildStruct}}),Object.defineProperty(n,"FormChildStruct",{enumerable:!0,get:function(){return i.FormChildStruct}}),Object.defineProperty(n,"FieldChildUnionStruct",{enumerable:!0,get:function(){return i.FieldChildUnionStruct}})}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/index.cjs"}],[2794,{"./jsx-runtime.cjs":2795,"./validation.cjs":2796},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.jsxDEV=void 0;const s=e("./jsx-runtime.cjs"),r=e("./validation.cjs");n.jsxDEV=function(e,t,n){const i=(0,s.jsx)(e,t,n);return(0,r.assertJSXElement)(i),i}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/jsx-dev-runtime.cjs"}],[2795,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){function s(e,t,n){if("string"==typeof e)throw new Error(`An HTML element ("${String(e)}") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!e)throw new Error("A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.");return e({...t,key:n})}Object.defineProperty(n,"__esModule",{value:!0}),n.jsxs=n.jsx=void 0,n.jsx=s,n.jsxs=function(e,t,n){return s(e,t,n)}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/jsx-runtime.cjs"}],[2796,{"../internals/index.cjs":2749,"../types/index.cjs":2805,"./components/index.cjs":2792,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SpinnerStruct=n.RowStruct=n.BannerStruct=n.TooltipStruct=n.TooltipContentStruct=n.TooltipChildStruct=n.ValueStruct=n.TextStruct=n.SkeletonStruct=n.LinkStruct=n.HeadingStruct=n.DividerStruct=n.CopyableStruct=n.FooterStruct=n.FooterChildStruct=n.SectionStruct=n.FormStruct=n.FormChildStruct=n.BoxStruct=n.BoxChildrenStruct=n.AvatarStruct=n.FormattingStruct=n.ItalicStruct=n.BoldStruct=n.FieldStruct=n.FieldChildUnionStruct=n.FileInputStruct=n.RadioGroupStruct=n.RadioStruct=n.AssetSelectorStruct=n.SelectorStruct=n.SelectorOptionStruct=n.CardStruct=n.AddressStruct=n.DropdownStruct=n.OptionStruct=n.AddressInputStruct=n.InputStruct=n.NumberInputPropsStruct=n.PasswordInputPropsStruct=n.TextInputPropsStruct=n.GenericInputPropsStruct=n.CheckboxStruct=n.ButtonStruct=n.IconStruct=n.ImageStruct=n.BorderRadiusStruct=n.ElementStruct=n.StringElementStruct=n.KeyStruct=void 0,n.assertJSXElement=n.isJSXElementUnsafe=n.isJSXElement=n.JSXElementStruct=n.RootJSXElementStruct=n.ContainerStruct=n.BoxChildStruct=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils"),i=e("./components/index.cjs"),a=e("../internals/index.cjs"),o=e("../types/index.cjs");function c(e){return function(e){const t=(0,a.selectiveUnion)((n=>Array.isArray(n)?(0,s.array)((0,s.lazy)((()=>t))):e));return t}((0,s.nullable)((0,a.selectiveUnion)((t=>"boolean"==typeof t?(0,s.boolean)():1===e.length?e[0]:(0,a.nullUnion)(e)))))}function u(e){return(0,s.nullable)((0,a.selectiveUnion)((t=>"boolean"==typeof t?(0,s.boolean)():e)))}function l(e,t={}){return(0,s.object)({type:(0,a.literal)(e),props:(0,s.object)(t),key:(0,s.nullable)(n.KeyStruct)})}n.KeyStruct=(0,a.nullUnion)([(0,s.string)(),(0,s.number)()]),n.StringElementStruct=c([(0,s.string)()]),n.ElementStruct=(0,s.object)({type:(0,s.string)(),props:(0,s.record)((0,s.string)(),r.JsonStruct),key:(0,s.nullable)(n.KeyStruct)}),n.BorderRadiusStruct=(0,a.nullUnion)([(0,a.literal)("none"),(0,a.literal)("medium"),(0,a.literal)("full")]),n.ImageStruct=l("Image",{src:(0,a.svg)(),alt:(0,s.optional)((0,s.string)()),borderRadius:(0,s.optional)(n.BorderRadiusStruct)});const d=(0,a.nullUnion)(Object.values(i.IconName).map((e=>(0,a.literal)(e))));var m,p;n.IconStruct=l("Icon",{name:d,color:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("default"),(0,a.literal)("primary"),(0,a.literal)("muted")])),size:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("md"),(0,a.literal)("inherit")]))}),n.ButtonStruct=l("Button",{children:c([n.StringElementStruct,n.ImageStruct,n.IconStruct]),name:(0,s.optional)((0,s.string)()),type:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("button"),(0,a.literal)("submit")])),variant:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("primary"),(0,a.literal)("destructive")])),size:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("sm"),(0,a.literal)("md")])),disabled:(0,s.optional)((0,s.boolean)()),loading:(0,s.optional)((0,s.boolean)()),form:(0,s.optional)((0,s.string)())}),n.CheckboxStruct=l("Checkbox",{name:(0,s.string)(),checked:(0,s.optional)((0,s.boolean)()),label:(0,s.optional)((0,s.string)()),variant:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("default"),(0,a.literal)("toggle")])),disabled:(0,s.optional)((0,s.boolean)())}),n.GenericInputPropsStruct=(0,s.object)({name:(0,s.string)(),value:(0,s.optional)((0,s.string)()),placeholder:(0,s.optional)((0,s.string)()),disabled:(0,s.optional)((0,s.boolean)())}),n.TextInputPropsStruct=(0,s.assign)(n.GenericInputPropsStruct,(0,s.object)({type:(0,a.literal)("text")})),n.PasswordInputPropsStruct=(0,s.assign)(n.GenericInputPropsStruct,(0,s.object)({type:(0,a.literal)("password")})),n.NumberInputPropsStruct=(0,s.assign)(n.GenericInputPropsStruct,(0,s.object)({type:(0,a.literal)("number"),min:(0,s.optional)((0,s.number)()),max:(0,s.optional)((0,s.number)()),step:(0,s.optional)((0,s.number)())})),n.InputStruct=(m="Input",p=e=>{if((0,r.isPlainObject)(e)&&(0,r.hasProperty)(e,"type"))switch(e.type){case"text":return n.TextInputPropsStruct;case"password":return n.PasswordInputPropsStruct;case"number":return n.NumberInputPropsStruct;default:return n.GenericInputPropsStruct}return n.GenericInputPropsStruct},(0,s.object)({type:(0,a.literal)(m),props:(0,a.selectiveUnion)(p),key:(0,s.nullable)(n.KeyStruct)})),n.AddressInputStruct=l("AddressInput",{name:(0,s.string)(),chainId:r.CaipChainIdStruct,value:(0,s.optional)((0,s.string)()),placeholder:(0,s.optional)((0,s.string)()),disabled:(0,s.optional)((0,s.boolean)()),displayAvatar:(0,s.optional)((0,s.boolean)())}),n.OptionStruct=l("Option",{value:(0,s.string)(),children:(0,s.string)(),disabled:(0,s.optional)((0,s.boolean)())}),n.DropdownStruct=l("Dropdown",{name:(0,s.string)(),value:(0,s.optional)((0,s.string)()),children:c([n.OptionStruct]),disabled:(0,s.optional)((0,s.boolean)())}),n.AddressStruct=l("Address",{address:(0,a.nullUnion)([r.HexChecksumAddressStruct,r.CaipAccountIdStruct]),truncate:(0,s.optional)((0,s.boolean)()),displayName:(0,s.optional)((0,s.boolean)()),avatar:(0,s.optional)((0,s.boolean)())}),n.CardStruct=l("Card",{image:(0,s.optional)((0,s.string)()),title:(0,a.selectiveUnion)((e=>"object"==typeof e?n.AddressStruct:(0,s.string)())),description:(0,s.optional)((0,s.string)()),value:(0,s.string)(),extra:(0,s.optional)((0,s.string)())}),n.SelectorOptionStruct=l("SelectorOption",{value:(0,s.string)(),children:n.CardStruct,disabled:(0,s.optional)((0,s.boolean)())}),n.SelectorStruct=l("Selector",{name:(0,s.string)(),title:(0,s.string)(),value:(0,s.optional)((0,s.string)()),children:c([n.SelectorOptionStruct]),disabled:(0,s.optional)((0,s.boolean)())}),n.AssetSelectorStruct=l("AssetSelector",{name:(0,s.string)(),addresses:o.NonEip155CaipAccountIdsMatchedByAddressAndNamespaceStruct,chainIds:(0,s.optional)((0,s.array)(o.NonEip155ChainIdStruct)),value:(0,s.optional)(o.NonEip155AssetTypeStruct),disabled:(0,s.optional)((0,s.boolean)())}),n.RadioStruct=l("Radio",{value:(0,s.string)(),children:(0,s.string)(),disabled:(0,s.optional)((0,s.boolean)())}),n.RadioGroupStruct=l("RadioGroup",{name:(0,s.string)(),value:(0,s.optional)((0,s.string)()),children:c([n.RadioStruct]),disabled:(0,s.optional)((0,s.boolean)())}),n.FileInputStruct=l("FileInput",{name:(0,s.string)(),accept:(0,a.nullUnion)([(0,s.optional)((0,s.array)((0,s.string)()))]),compact:(0,s.optional)((0,s.boolean)()),disabled:(0,s.optional)((0,s.boolean)())});const h=[u((0,s.lazy)((()=>n.BoxChildStruct))),n.InputStruct],f=[n.InputStruct,u((0,s.lazy)((()=>n.BoxChildStruct)))],g=[u((0,s.lazy)((()=>n.BoxChildStruct))),n.InputStruct,u((0,s.lazy)((()=>n.BoxChildStruct)))],y=[n.AssetSelectorStruct,n.AddressInputStruct,n.InputStruct,n.DropdownStruct,n.RadioGroupStruct,n.FileInputStruct,n.CheckboxStruct,n.SelectorStruct];n.FieldChildUnionStruct=(0,a.nullUnion)([...y,...h,...f,...g]);const b=(0,a.selectiveUnion)((e=>{const t=Array.isArray(e);return t&&3===e.length?(0,s.tuple)(g):t&&2===e.length?"Box"===e[0]?.type?(0,s.tuple)(h):(0,s.tuple)(f):(0,a.typedUnion)(y)}));n.FieldStruct=l("Field",{label:(0,s.optional)((0,s.string)()),error:(0,s.optional)((0,s.string)()),children:b}),n.BoldStruct=l("Bold",{children:c([(0,s.string)(),(0,s.lazy)((()=>n.ItalicStruct))])}),n.ItalicStruct=l("Italic",{children:c([(0,s.string)(),(0,s.lazy)((()=>n.BoldStruct))])}),n.FormattingStruct=(0,a.typedUnion)([n.BoldStruct,n.ItalicStruct]),n.AvatarStruct=l("Avatar",{address:r.CaipAccountIdStruct,size:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("sm"),(0,a.literal)("md"),(0,a.literal)("lg")]))}),n.BoxChildrenStruct=c([(0,s.lazy)((()=>n.BoxChildStruct))]),n.BoxStruct=l("Box",{children:n.BoxChildrenStruct,direction:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("horizontal"),(0,a.literal)("vertical")])),alignment:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("start"),(0,a.literal)("center"),(0,a.literal)("end"),(0,a.literal)("space-between"),(0,a.literal)("space-around")])),crossAlignment:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("start"),(0,a.literal)("center"),(0,a.literal)("end")])),center:(0,s.optional)((0,s.boolean)())}),n.FormChildStruct=n.BoxChildrenStruct,n.FormStruct=l("Form",{children:n.FormChildStruct,name:(0,s.string)()});const x=(0,s.refine)(n.ButtonStruct,"FooterButton",(e=>{if("string"==typeof e.props.children||"boolean"==typeof e.props.children||null===e.props.children)return!0;if(Array.isArray(e.props.children)){if(!e.props.children.some((e=>"string"!=typeof e&&"boolean"!=typeof e&&null!==e)))return!0}return"Footer buttons may only contain text."}));function S(e){return(0,s.is)(e,n.JSXElementStruct)}n.SectionStruct=l("Section",{children:n.BoxChildrenStruct,direction:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("horizontal"),(0,a.literal)("vertical")])),alignment:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("start"),(0,a.literal)("center"),(0,a.literal)("end"),(0,a.literal)("space-between"),(0,a.literal)("space-around")]))}),n.FooterChildStruct=(0,a.selectiveUnion)((e=>Array.isArray(e)?(0,s.tuple)([x,x]):x)),n.FooterStruct=l("Footer",{children:n.FooterChildStruct}),n.CopyableStruct=l("Copyable",{value:(0,s.string)(),sensitive:(0,s.optional)((0,s.boolean)())}),n.DividerStruct=l("Divider"),n.HeadingStruct=l("Heading",{children:n.StringElementStruct,size:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("sm"),(0,a.literal)("md"),(0,a.literal)("lg")]))}),n.LinkStruct=l("Link",{href:(0,s.string)(),children:c([n.FormattingStruct,(0,s.string)(),n.IconStruct,n.ImageStruct,n.AddressStruct])}),n.SkeletonStruct=l("Skeleton",{width:(0,s.optional)((0,s.union)([(0,s.number)(),(0,s.string)()])),height:(0,s.optional)((0,s.union)([(0,s.number)(),(0,s.string)()])),borderRadius:(0,s.optional)(n.BorderRadiusStruct)}),n.TextStruct=l("Text",{children:c([(0,a.selectiveUnion)((e=>"string"==typeof e?(0,s.string)():(0,a.typedUnion)([n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.IconStruct,n.SkeletonStruct])))]),alignment:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("start"),(0,a.literal)("center"),(0,a.literal)("end")])),color:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("default"),(0,a.literal)("alternative"),(0,a.literal)("muted"),(0,a.literal)("error"),(0,a.literal)("success"),(0,a.literal)("warning")])),size:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("sm"),(0,a.literal)("md")])),fontWeight:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("regular"),(0,a.literal)("medium"),(0,a.literal)("bold")]))}),n.ValueStruct=l("Value",{value:(0,a.selectiveUnion)((e=>"string"==typeof e?(0,s.string)():n.TextStruct)),extra:(0,a.selectiveUnion)((e=>"string"==typeof e?(0,s.string)():n.TextStruct))}),n.TooltipChildStruct=(0,a.selectiveUnion)((e=>"boolean"==typeof e?(0,s.boolean)():(0,a.typedUnion)([n.TextStruct,n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.ImageStruct,n.IconStruct]))),n.TooltipContentStruct=(0,a.selectiveUnion)((e=>"string"==typeof e?(0,s.string)():(0,a.typedUnion)([n.TextStruct,n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.IconStruct]))),n.TooltipStruct=l("Tooltip",{children:(0,s.nullable)(n.TooltipChildStruct),content:n.TooltipContentStruct}),n.BannerStruct=l("Banner",{children:c([n.TextStruct,n.LinkStruct,n.IconStruct,n.ButtonStruct,n.BoldStruct,n.ItalicStruct,n.SkeletonStruct]),title:(0,s.string)(),severity:(0,s.union)([(0,a.literal)("danger"),(0,a.literal)("info"),(0,a.literal)("success"),(0,a.literal)("warning")])}),n.RowStruct=l("Row",{label:(0,s.string)(),children:(0,a.typedUnion)([n.AddressStruct,n.ImageStruct,n.TextStruct,n.ValueStruct,n.LinkStruct,n.SkeletonStruct]),variant:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("default"),(0,a.literal)("warning"),(0,a.literal)("critical")])),tooltip:(0,s.optional)((0,s.string)())}),n.SpinnerStruct=l("Spinner"),n.BoxChildStruct=(0,a.typedUnion)([n.AddressStruct,n.AssetSelectorStruct,n.AddressInputStruct,n.BoldStruct,n.BoxStruct,n.ButtonStruct,n.CopyableStruct,n.DividerStruct,n.DropdownStruct,n.RadioGroupStruct,n.FieldStruct,n.FileInputStruct,n.FormStruct,n.HeadingStruct,n.InputStruct,n.ImageStruct,n.ItalicStruct,n.LinkStruct,n.RowStruct,n.SpinnerStruct,n.TextStruct,n.TooltipStruct,n.CheckboxStruct,n.CardStruct,n.IconStruct,n.SelectorStruct,n.SectionStruct,n.AvatarStruct,n.BannerStruct,n.SkeletonStruct]),n.ContainerStruct=l("Container",{children:(0,a.selectiveUnion)((e=>Array.isArray(e)?(0,s.tuple)([n.BoxChildStruct,n.FooterStruct]):n.BoxChildStruct)),backgroundColor:(0,s.optional)((0,a.nullUnion)([(0,a.literal)("default"),(0,a.literal)("alternative")]))}),n.RootJSXElementStruct=(0,a.typedUnion)([n.BoxChildStruct,n.ContainerStruct]),n.JSXElementStruct=(0,a.typedUnion)([n.AssetSelectorStruct,n.AddressInputStruct,n.ButtonStruct,n.InputStruct,n.FileInputStruct,n.FieldStruct,n.FormStruct,n.BoldStruct,n.ItalicStruct,n.AddressStruct,n.BoxStruct,n.CopyableStruct,n.DividerStruct,n.HeadingStruct,n.ImageStruct,n.LinkStruct,n.RowStruct,n.SpinnerStruct,n.TextStruct,n.DropdownStruct,n.OptionStruct,n.RadioGroupStruct,n.RadioStruct,n.ValueStruct,n.TooltipStruct,n.CheckboxStruct,n.FooterStruct,n.ContainerStruct,n.CardStruct,n.IconStruct,n.SelectorStruct,n.SelectorOptionStruct,n.SectionStruct,n.AvatarStruct,n.BannerStruct,n.SkeletonStruct]),n.isJSXElement=S,n.isJSXElementUnsafe=function(e){return(0,r.isPlainObject)(e)&&(0,r.hasProperty)(e,"type")&&(0,r.hasProperty)(e,"props")&&(0,r.hasProperty)(e,"key")},n.assertJSXElement=function(e){if(!S(e))throw new Error(`Expected a JSX element, but received ${JSON.stringify(e)}. Please refer to the documentation for the supported JSX elements and their props.`)}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/jsx/validation.cjs"}],[2797,{"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.NonEip155AssetTypeStruct=n.NonEip155ChainIdStruct=n.NonEip155CaipAccountIdsMatchedByAddressAndNamespaceStruct=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils");n.NonEip155CaipAccountIdsMatchedByAddressAndNamespaceStruct=(0,s.refine)((0,s.array)(r.CaipAccountIdStruct),"Non-EIP-155 Matching Addresses Account ID List",(e=>{const t=e.map((e=>(0,r.parseCaipAccountId)(e)));if(!t.every((({address:e,chain:{namespace:n}})=>e===t[0].address&&n===t[0].chain.namespace)))return"All account IDs must have the same address and namespace.";return!t.some((({chain:{namespace:e}})=>e===r.KnownCaipNamespace.Eip155))||"All account IDs must have non-EIP-155 namespaces."})),n.NonEip155ChainIdStruct=(0,s.refine)(r.CaipChainIdStruct,"Non-EIP-155 Chain ID",(e=>{const{namespace:t}=(0,r.parseCaipChainId)(e);return t!==r.KnownCaipNamespace.Eip155||"Chain ID must not be an EIP-155 chain ID."})),n.NonEip155AssetTypeStruct=(0,s.refine)(r.CaipAssetTypeStruct,"Non-EIP-155 Asset Type",(e=>{const{chain:{namespace:t}}=(0,r.parseCaipAssetType)(e);return t!==r.KnownCaipNamespace.Eip155||"Asset type must not be an EIP-155 asset type."}))}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/caip.cjs"}],[2798,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0})}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/global.cjs"}],[2799,{"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.OnAssetsConversionResponseStruct=n.AssetConversionStruct=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils");n.AssetConversionStruct=(0,s.object)({rate:(0,s.string)(),conversionTime:(0,s.number)(),expirationTime:(0,s.optional)((0,s.number)())}),n.OnAssetsConversionResponseStruct=(0,s.object)({conversionRates:(0,s.record)(r.CaipAssetTypeStruct,(0,s.record)(r.CaipAssetTypeStruct,(0,s.nullable)(n.AssetConversionStruct)))})}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/handlers/assets-conversion.cjs"}],[2800,{"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.OnAssetsLookupResponseStruct=n.FungibleAssetMetadataStruct=n.AssetIconUrlStruct=n.FungibleAssetUnitStruct=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils");n.FungibleAssetUnitStruct=(0,s.object)({name:(0,s.string)(),symbol:(0,s.string)(),decimals:(0,s.number)()}),n.AssetIconUrlStruct=(0,s.refine)((0,s.string)(),"Asset URL",(e=>{try{const t=new URL(e);return(0,r.assert)("https:"===t.protocol||e.startsWith("data:image/svg+xml;base64,")),!0}catch{return"Invalid URL"}})),n.FungibleAssetMetadataStruct=(0,s.object)({name:(0,s.string)(),symbol:(0,s.string)(),fungible:(0,s.literal)(!0),iconUrl:n.AssetIconUrlStruct,units:(0,s.size)((0,s.array)(n.FungibleAssetUnitStruct),1,Infinity)}),n.OnAssetsLookupResponseStruct=(0,s.object)({assets:(0,s.record)(r.CaipAssetTypeStruct,(0,s.nullable)(n.FungibleAssetMetadataStruct))})}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/handlers/assets-lookup.cjs"}],[2801,{"./assets-conversion.cjs":2799,"./assets-lookup.cjs":2800,"./transaction.cjs":2802,"./user-input.cjs":2803},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./assets-conversion.cjs"),n),r(e("./assets-lookup.cjs"),n),r(e("./transaction.cjs"),n),r(e("./user-input.cjs"),n)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/handlers/index.cjs"}],[2802,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s;Object.defineProperty(n,"__esModule",{value:!0}),n.SeverityLevel=void 0,function(e){e.Critical="critical"}(s||(n.SeverityLevel=s={}))}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/handlers/transaction.cjs"}],[2803,{"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.UserInputEventStruct=n.FileUploadEventStruct=n.InputChangeEventStruct=n.FormSubmitEventStruct=n.AssetSelectorStateStruct=n.FileStruct=n.ButtonClickEventStruct=n.GenericEventStruct=n.UserInputEventType=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils");var i;!function(e){e.ButtonClickEvent="ButtonClickEvent",e.FormSubmitEvent="FormSubmitEvent",e.InputChangeEvent="InputChangeEvent",e.FileUploadEvent="FileUploadEvent"}(i||(n.UserInputEventType=i={})),n.GenericEventStruct=(0,s.object)({type:(0,s.string)(),name:(0,s.optional)((0,s.string)())}),n.ButtonClickEventStruct=(0,s.assign)(n.GenericEventStruct,(0,s.object)({type:(0,s.literal)(i.ButtonClickEvent),name:(0,s.optional)((0,s.string)())})),n.FileStruct=(0,s.object)({name:(0,s.string)(),size:(0,s.number)(),contentType:(0,s.string)(),contents:(0,s.string)()}),n.AssetSelectorStateStruct=(0,s.object)({asset:r.CaipAssetTypeStruct,name:(0,s.string)(),symbol:(0,s.string)()}),n.FormSubmitEventStruct=(0,s.assign)(n.GenericEventStruct,(0,s.object)({type:(0,s.literal)(i.FormSubmitEvent),value:(0,s.record)((0,s.string)(),(0,s.nullable)((0,s.union)([(0,s.string)(),n.FileStruct,(0,s.boolean)(),n.AssetSelectorStateStruct]))),name:(0,s.string)()})),n.InputChangeEventStruct=(0,s.assign)(n.GenericEventStruct,(0,s.object)({type:(0,s.literal)(i.InputChangeEvent),name:(0,s.string)(),value:(0,s.union)([(0,s.string)(),(0,s.boolean)(),n.AssetSelectorStateStruct])})),n.FileUploadEventStruct=(0,s.assign)(n.GenericEventStruct,(0,s.object)({type:(0,s.literal)(i.FileUploadEvent),name:(0,s.string)(),file:(0,s.nullable)(n.FileStruct)})),n.UserInputEventStruct=(0,s.union)([n.ButtonClickEventStruct,n.FormSubmitEventStruct,n.InputChangeEventStruct,n.FileUploadEventStruct])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/handlers/user-input.cjs"}],[2804,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/images.cjs"}],[2805,{"./caip.cjs":2797,"./global.cjs":2798,"./handlers/index.cjs":2801,"./images.cjs":2804,"./interface.cjs":2806,"./methods/index.cjs":2809},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),e("./global.cjs"),e("./images.cjs"),r(e("./caip.cjs"),n),r(e("./handlers/index.cjs"),n),r(e("./methods/index.cjs"),n),r(e("./interface.cjs"),n)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/index.cjs"}],[2806,{"../internals/index.cjs":2749,"../jsx/index.cjs":2793,"../ui/index.cjs":2827,"./handlers/index.cjs":2801,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ContentType=n.InterfaceContextStruct=n.ComponentOrElementStruct=n.InterfaceStateStruct=n.FormStateStruct=n.StateStruct=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils"),i=e("./handlers/index.cjs"),a=e("../internals/index.cjs"),o=e("../jsx/index.cjs"),c=e("../ui/index.cjs");var u;n.StateStruct=(0,s.union)([i.AssetSelectorStateStruct,i.FileStruct,(0,s.string)(),(0,s.boolean)(),r.CaipAccountIdStruct]),n.FormStateStruct=(0,s.record)((0,s.string)(),(0,s.nullable)(n.StateStruct)),n.InterfaceStateStruct=(0,s.record)((0,s.string)(),(0,s.union)([n.FormStateStruct,(0,s.nullable)(n.StateStruct)])),n.ComponentOrElementStruct=(0,a.selectiveUnion)((e=>(0,r.isObject)(e)&&!(0,r.hasProperty)(e,"props")?c.ComponentStruct:o.RootJSXElementStruct)),n.InterfaceContextStruct=(0,s.record)((0,s.string)(),r.JsonStruct),function(e){e.Insight="Insight",e.Dialog="Dialog",e.Notification="Notification",e.HomePage="HomePage"}(u||(n.ContentType=u={}))}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/interface.cjs"}],[2807,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s;Object.defineProperty(n,"__esModule",{value:!0}),n.DialogType=void 0,function(e){e.Alert="alert",e.Confirmation="confirmation",e.Prompt="prompt"}(s||(n.DialogType=s={}))}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/methods/dialog.cjs"}],[2808,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s;Object.defineProperty(n,"__esModule",{value:!0}),n.AuxiliaryFileEncoding=void 0,function(e){e.Base64="base64",e.Hex="hex",e.Utf8="utf8"}(s||(n.AuxiliaryFileEncoding=s={}))}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/methods/get-file.cjs"}],[2809,{"./dialog.cjs":2807,"./get-file.cjs":2808,"./manage-state.cjs":2810,"./notify.cjs":2811},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./dialog.cjs"),n),r(e("./get-file.cjs"),n),r(e("./manage-state.cjs"),n),r(e("./notify.cjs"),n)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/methods/index.cjs"}],[2810,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s;Object.defineProperty(n,"__esModule",{value:!0}),n.ManageStateOperation=void 0,function(e){e.ClearState="clear",e.GetState="get",e.UpdateState="update"}(s||(n.ManageStateOperation=s={}))}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/methods/manage-state.cjs"}],[2811,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s;Object.defineProperty(n,"__esModule",{value:!0}),n.NotificationType=void 0,function(e){e.InApp="inApp",e.Native="native"}(s||(n.NotificationType=s={}))}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/types/methods/notify.cjs"}],[2812,{"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createBuilder=void 0;const s=e("@metamask/utils");n.createBuilder=function(e,t,n=[]){return(...r)=>{if(1===r.length&&(0,s.isPlainObject)(r[0])){const n={...r[0],type:e};return(0,s.assertStruct)(n,t,`Invalid ${e} component`),n}const i=n.reduce(((e,t,n)=>r[n]!==undefined?{...e,[t]:r[n]}:e),{type:e});return(0,s.assertStruct)(i,t,`Invalid ${e} component`),i}}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/builder.cjs"}],[2813,{"./components/index.cjs":2821,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsComponent=n.isComponent=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils"),i=e("./components/index.cjs");n.isComponent=function(e){return(0,s.is)(e,i.ComponentStruct)},n.assertIsComponent=function(e){(0,r.assertStruct)(e,i.ComponentStruct,"Invalid component")}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/component.cjs"}],[2814,{"../builder.cjs":2812,"../nodes.cjs":2828,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.address=n.AddressStruct=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils"),i=e("../builder.cjs"),a=e("../nodes.cjs");n.AddressStruct=(0,s.assign)(a.LiteralStruct,(0,s.object)({type:(0,s.literal)(a.NodeType.Address),value:r.HexChecksumAddressStruct})),n.address=(0,i.createBuilder)(a.NodeType.Address,n.AddressStruct,["value"])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/address.cjs"}],[2815,{"../../internals/index.cjs":2749,"../builder.cjs":2812,"../nodes.cjs":2828,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.button=n.ButtonStruct=n.ButtonType=n.ButtonVariant=void 0;const s=e("@metamask/superstruct"),r=e("../../internals/index.cjs"),i=e("../builder.cjs"),a=e("../nodes.cjs");var o,c;!function(e){e.Primary="primary",e.Secondary="secondary"}(o||(n.ButtonVariant=o={})),function(e){e.Button="button",e.Submit="submit"}(c||(n.ButtonType=c={})),n.ButtonStruct=(0,s.assign)(a.LiteralStruct,(0,s.object)({type:(0,s.literal)(a.NodeType.Button),value:(0,s.string)(),variant:(0,s.optional)((0,s.union)([(0,r.enumValue)(o.Primary),(0,r.enumValue)(o.Secondary)])),buttonType:(0,s.optional)((0,s.union)([(0,r.enumValue)(c.Button),(0,r.enumValue)(c.Submit)])),name:(0,s.optional)((0,s.string)())})),n.button=(0,i.createBuilder)(a.NodeType.Button,n.ButtonStruct,["value","buttonType","name","variant"])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/button.cjs"}],[2816,{"../builder.cjs":2812,"../nodes.cjs":2828,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.copyable=n.CopyableStruct=void 0;const s=e("@metamask/superstruct"),r=e("../builder.cjs"),i=e("../nodes.cjs");n.CopyableStruct=(0,s.assign)(i.LiteralStruct,(0,s.object)({type:(0,s.literal)(i.NodeType.Copyable),value:(0,s.string)(),sensitive:(0,s.optional)((0,s.boolean)())})),n.copyable=(0,r.createBuilder)(i.NodeType.Copyable,n.CopyableStruct,["value","sensitive"])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/copyable.cjs"}],[2817,{"../builder.cjs":2812,"../nodes.cjs":2828,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.divider=n.DividerStruct=void 0;const s=e("@metamask/superstruct"),r=e("../builder.cjs"),i=e("../nodes.cjs");n.DividerStruct=(0,s.assign)(i.NodeStruct,(0,s.object)({type:(0,s.literal)(i.NodeType.Divider)})),n.divider=(0,r.createBuilder)(i.NodeType.Divider,n.DividerStruct)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/divider.cjs"}],[2818,{"../builder.cjs":2812,"../nodes.cjs":2828,"./button.cjs":2815,"./input.cjs":2822,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.form=n.FormStruct=n.FormComponentStruct=void 0;const s=e("@metamask/superstruct"),r=e("./button.cjs"),i=e("./input.cjs"),a=e("../builder.cjs"),o=e("../nodes.cjs");n.FormComponentStruct=(0,s.union)([i.InputStruct,r.ButtonStruct]),n.FormStruct=(0,s.assign)(o.NodeStruct,(0,s.object)({type:(0,s.literal)(o.NodeType.Form),children:(0,s.array)(n.FormComponentStruct),name:(0,s.string)()})),n.form=(0,a.createBuilder)(o.NodeType.Form,n.FormStruct,["name","children"])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/form.cjs"}],[2819,{"../builder.cjs":2812,"../nodes.cjs":2828,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.heading=n.HeadingStruct=void 0;const s=e("@metamask/superstruct"),r=e("../builder.cjs"),i=e("../nodes.cjs");n.HeadingStruct=(0,s.assign)(i.LiteralStruct,(0,s.object)({type:(0,s.literal)(i.NodeType.Heading),value:(0,s.string)()})),n.heading=(0,r.createBuilder)(i.NodeType.Heading,n.HeadingStruct,["value"])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/heading.cjs"}],[2820,{"../../internals/index.cjs":2749,"../builder.cjs":2812,"../nodes.cjs":2828,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.image=n.ImageStruct=void 0;const s=e("@metamask/superstruct"),r=e("../../internals/index.cjs"),i=e("../builder.cjs"),a=e("../nodes.cjs");n.ImageStruct=(0,s.assign)(a.NodeStruct,(0,s.object)({type:(0,s.literal)(a.NodeType.Image),value:(0,r.svg)()})),n.image=(0,i.createBuilder)(a.NodeType.Image,n.ImageStruct,["value"])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/image.cjs"}],[2821,{"./address.cjs":2814,"./button.cjs":2815,"./copyable.cjs":2816,"./divider.cjs":2817,"./form.cjs":2818,"./heading.cjs":2819,"./image.cjs":2820,"./input.cjs":2822,"./panel.cjs":2823,"./row.cjs":2824,"./spinner.cjs":2825,"./text.cjs":2826},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.PanelStruct=n.panel=n.ComponentStruct=n.ImageStruct=n.image=void 0,r(e("./address.cjs"),n),r(e("./copyable.cjs"),n),r(e("./divider.cjs"),n),r(e("./heading.cjs"),n);var i=e("./image.cjs");Object.defineProperty(n,"image",{enumerable:!0,get:function(){return i.image}}),Object.defineProperty(n,"ImageStruct",{enumerable:!0,get:function(){return i.ImageStruct}});var a=e("./panel.cjs");Object.defineProperty(n,"ComponentStruct",{enumerable:!0,get:function(){return a.ComponentStruct}}),Object.defineProperty(n,"panel",{enumerable:!0,get:function(){return a.panel}}),Object.defineProperty(n,"PanelStruct",{enumerable:!0,get:function(){return a.PanelStruct}}),r(e("./spinner.cjs"),n),r(e("./text.cjs"),n),r(e("./row.cjs"),n),r(e("./button.cjs"),n),r(e("./input.cjs"),n),r(e("./form.cjs"),n)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/index.cjs"}],[2822,{"../../internals/index.cjs":2749,"../builder.cjs":2812,"../nodes.cjs":2828,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.input=n.InputStruct=n.InputType=void 0;const s=e("@metamask/superstruct"),r=e("../../internals/index.cjs"),i=e("../builder.cjs"),a=e("../nodes.cjs");var o;!function(e){e.Text="text",e.Number="number",e.Password="password"}(o||(n.InputType=o={})),n.InputStruct=(0,s.assign)(a.LiteralStruct,(0,s.object)({type:(0,s.literal)(a.NodeType.Input),value:(0,s.optional)((0,s.string)()),name:(0,s.string)(),inputType:(0,s.optional)((0,s.union)([(0,r.enumValue)(o.Text),(0,r.enumValue)(o.Password),(0,r.enumValue)(o.Number)])),placeholder:(0,s.optional)((0,s.string)()),label:(0,s.optional)((0,s.string)()),error:(0,s.optional)((0,s.string)())})),n.input=(0,i.createBuilder)(a.NodeType.Input,n.InputStruct,["name","inputType","placeholder","value","label"])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/input.cjs"}],[2823,{"../../internals/index.cjs":2749,"../builder.cjs":2812,"../nodes.cjs":2828,"./address.cjs":2814,"./button.cjs":2815,"./copyable.cjs":2816,"./divider.cjs":2817,"./form.cjs":2818,"./heading.cjs":2819,"./image.cjs":2820,"./input.cjs":2822,"./row.cjs":2824,"./spinner.cjs":2825,"./text.cjs":2826,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ComponentStruct=n.panel=n.PanelStruct=n.ParentStruct=void 0;const s=e("@metamask/superstruct"),r=e("./address.cjs"),i=e("./button.cjs"),a=e("./copyable.cjs"),o=e("./divider.cjs"),c=e("./form.cjs"),u=e("./heading.cjs"),l=e("./image.cjs"),d=e("./input.cjs"),m=e("./row.cjs"),p=e("./spinner.cjs"),h=e("./text.cjs"),f=e("../../internals/index.cjs"),g=e("../builder.cjs"),y=e("../nodes.cjs");n.ParentStruct=(0,s.assign)(y.NodeStruct,(0,s.object)({children:(0,s.array)((0,s.lazy)((()=>n.ComponentStruct)))})),n.PanelStruct=(0,s.assign)(n.ParentStruct,(0,s.object)({type:(0,s.literal)(y.NodeType.Panel)})),n.panel=(0,g.createBuilder)(y.NodeType.Panel,n.PanelStruct,["children"]),n.ComponentStruct=(0,f.typedUnion)([a.CopyableStruct,o.DividerStruct,u.HeadingStruct,l.ImageStruct,n.PanelStruct,p.SpinnerStruct,h.TextStruct,m.RowStruct,r.AddressStruct,d.InputStruct,c.FormStruct,i.ButtonStruct])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/panel.cjs"}],[2824,{"../../internals/index.cjs":2749,"../builder.cjs":2812,"../nodes.cjs":2828,"./address.cjs":2814,"./image.cjs":2820,"./text.cjs":2826,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.row=n.RowStruct=n.RowVariant=void 0;const s=e("@metamask/superstruct"),r=e("./address.cjs"),i=e("./image.cjs"),a=e("./text.cjs"),o=e("../../internals/index.cjs"),c=e("../builder.cjs"),u=e("../nodes.cjs");var l;!function(e){e.Default="default",e.Critical="critical",e.Warning="warning"}(l||(n.RowVariant=l={}));const d=(0,s.union)([i.ImageStruct,a.TextStruct,r.AddressStruct]);n.RowStruct=(0,s.assign)(u.LiteralStruct,(0,s.object)({type:(0,s.literal)(u.NodeType.Row),variant:(0,s.optional)((0,s.union)([(0,o.enumValue)(l.Default),(0,o.enumValue)(l.Critical),(0,o.enumValue)(l.Warning)])),label:(0,s.string)(),value:d})),n.row=(0,c.createBuilder)(u.NodeType.Row,n.RowStruct,["label","value","variant"])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/row.cjs"}],[2825,{"../builder.cjs":2812,"../nodes.cjs":2828,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.spinner=n.SpinnerStruct=void 0;const s=e("@metamask/superstruct"),r=e("../builder.cjs"),i=e("../nodes.cjs");n.SpinnerStruct=(0,s.assign)(i.NodeStruct,(0,s.object)({type:(0,s.literal)(i.NodeType.Spinner)})),n.spinner=(0,r.createBuilder)(i.NodeType.Spinner,n.SpinnerStruct)}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/spinner.cjs"}],[2826,{"../builder.cjs":2812,"../nodes.cjs":2828,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.text=n.TextStruct=void 0;const s=e("@metamask/superstruct"),r=e("../builder.cjs"),i=e("../nodes.cjs");n.TextStruct=(0,s.assign)(i.LiteralStruct,(0,s.object)({type:(0,s.literal)(i.NodeType.Text),value:(0,s.string)(),markdown:(0,s.optional)((0,s.boolean)())})),n.text=(0,r.createBuilder)(i.NodeType.Text,n.TextStruct,["value","markdown"])}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/components/text.cjs"}],[2827,{"./component.cjs":2813,"./components/index.cjs":2821,"./nodes.cjs":2828},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.NodeType=void 0,r(e("./components/index.cjs"),n),r(e("./component.cjs"),n);var i=e("./nodes.cjs");Object.defineProperty(n,"NodeType",{enumerable:!0,get:function(){return i.NodeType}})}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/index.cjs"}],[2828,{"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.LiteralStruct=n.NodeStruct=n.NodeType=void 0;const s=e("@metamask/superstruct");var r;!function(e){e.Copyable="copyable",e.Divider="divider",e.Heading="heading",e.Panel="panel",e.Spinner="spinner",e.Text="text",e.Image="image",e.Row="row",e.Address="address",e.Button="button",e.Input="input",e.Form="form"}(r||(n.NodeType=r={})),n.NodeStruct=(0,s.object)({type:(0,s.string)()}),n.LiteralStruct=(0,s.assign)(n.NodeStruct,(0,s.object)({value:(0,s.unknown)()}))}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/dist/ui/nodes.cjs"}],[2829,{"./dist/jsx/jsx-runtime.cjs":2795},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){t.exports=e("./dist/jsx/jsx-runtime.cjs")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/jsx-runtime.js"}],[2830,{"./dist/jsx/index.cjs":2793},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){t.exports=e("./dist/jsx/index.cjs")}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/jsx.js"}],[2831,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){t.exports={name:"@metamask/snaps-sdk",version:"6.21.0",description:"A library containing the core functionality for building MetaMask Snaps",keywords:["MetaMask","Snaps","Ethereum"],homepage:"https://github.com/MetaMask/snaps/tree/main/packages/snaps-sdk#readme",bugs:{url:"https://github.com/MetaMask/snaps/issues"},repository:{type:"git",url:"https://github.com/MetaMask/snaps.git"},license:"ISC",sideEffects:!1,exports:{".":{import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"},require:{types:"./dist/index.d.cts",default:"./dist/index.cjs"}},"./jsx":{import:{types:"./dist/jsx/index.d.mts",default:"./dist/jsx/index.mjs"},require:{types:"./dist/jsx/index.d.cts",default:"./dist/jsx/index.cjs"}},"./jsx-runtime":{import:{types:"./dist/jsx/jsx-runtime.d.mts",default:"./dist/jsx/jsx-runtime.mjs"},require:{types:"./dist/jsx/jsx-runtime.d.cts",default:"./dist/jsx/jsx-runtime.cjs"}},"./jsx-dev-runtime":{import:{types:"./dist/jsx/jsx-dev-runtime.d.mts",default:"./dist/jsx/jsx-dev-runtime.mjs"},require:{types:"./dist/jsx/jsx-dev-runtime.d.cts",default:"./dist/jsx/jsx-dev-runtime.cjs"}},"./package.json":"./package.json"},main:"./dist/index.cjs",module:"./dist/index.mjs",types:"./dist/index.d.cts",files:["dist","jsx.js","jsx-dev-runtime.js","jsx-runtime.js","jsx.d.ts","jsx-dev-runtime.d.ts","jsx-runtime.d.ts"],scripts:{build:"ts-bridge --project tsconfig.build.json --verbose --clean --no-references","changelog:update":"../../scripts/update-changelog.sh @metamask/snaps-sdk","changelog:validate":"../../scripts/validate-changelog.sh @metamask/snaps-sdk",lint:"yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies","lint:ci":"yarn lint","lint:dependencies":"depcheck","lint:eslint":"eslint . --cache","lint:fix":"yarn lint:eslint --fix && yarn lint:misc --write","lint:misc":'prettier --no-error-on-unmatched-pattern --log-level warn "**/*.json" "**/*.md" "**/*.html" "!CHANGELOG.md" --ignore-path ../../.gitignore',"publish:preview":"yarn npm publish --tag preview","since-latest-release":"../../scripts/since-latest-release.sh",test:"jest --reporters=jest-silent-reporter","test:clean":"jest --clearCache","test:post":"jest-it-up","test:verbose":"jest --verbose","test:watch":"jest --watch"},dependencies:{"@metamask/key-tree":"^10.1.1","@metamask/providers":"^21.0.0","@metamask/rpc-errors":"^7.0.2","@metamask/superstruct":"^3.1.0","@metamask/utils":"^11.2.0"},devDependencies:{"@lavamoat/allow-scripts":"^3.0.4","@metamask/auto-changelog":"^4.1.0","@ts-bridge/cli":"^0.6.1","@types/jest":"^27.5.1",deepmerge:"^4.2.2",depcheck:"^1.4.7",eslint:"^9.11.0","expect-type":"^0.17.3",jest:"^29.0.2","jest-fetch-mock":"^3.0.3","jest-it-up":"^2.0.0","jest-silent-reporter":"^0.6.0",prettier:"^3.3.3","ts-jest":"^29.1.1",typescript:"~5.3.3"},engines:{node:"^18.16 || >=20"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"}}}}},{package:"@metamask/snaps-sdk",file:"node_modules/@metamask/snaps-sdk/package.json"}],[2832,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isEqual=void 0,n.isEqual=function(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/array.cjs"}],[2833,{"./base64.cjs":2834,"./constants.cjs":2838,"@metamask/snaps-sdk":2746,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.validateAuxiliaryFiles=n.encodeAuxiliaryFile=void 0;const s=e("@metamask/snaps-sdk"),r=e("@metamask/utils"),i=e("./base64.cjs"),a=e("./constants.cjs");n.encodeAuxiliaryFile=async function(e,t){if(t===s.AuxiliaryFileEncoding.Base64)return e;const n=await(0,i.decodeBase64)(e);return t===s.AuxiliaryFileEncoding.Utf8?(0,r.bytesToString)(n):(0,r.bytesToHex)(n)},n.validateAuxiliaryFiles=function(e){for(const t of e)(0,r.assert)(t.size<a.MAX_FILE_SIZE,"Static files required by the Snap must be smaller than 64 MB.")}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/auxiliary-files.cjs"}],[2834,{"./bytes.cjs":2835,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.decodeBase64=n.encodeBase64=void 0;const s=e("@metamask/utils"),r=e("./bytes.cjs");n.encodeBase64=async function(e){const t=(0,r.getBytes)(e);return"FileReader"in globalThis?await new Promise(((e,n)=>{const s=Object.assign(new FileReader,{onload:()=>e(s.result.replace("data:application/octet-stream;base64,","")),onerror:()=>n(s.error)});s.readAsDataURL(new File([t],"",{type:"application/octet-stream"}))})):(0,s.bytesToBase64)(t)},n.decodeBase64=async function(e){const t=await fetch(`data:application/octet-stream;base64,${e}`);return new Uint8Array(await t.arrayBuffer())}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/base64.cjs"}],[2835,{"./virtual-file/VirtualFile.cjs":2868,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getBytes=void 0;const s=e("@metamask/utils"),r=e("./virtual-file/VirtualFile.cjs");n.getBytes=function(e){const t=e instanceof r.VirtualFile?e.value:e;return"string"==typeof t?(0,s.stringToBytes)(t):t}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/bytes.cjs"}],[2836,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s;Object.defineProperty(n,"__esModule",{value:!0}),n.SnapCaveatType=void 0,function(e){e.PermittedDerivationPaths="permittedDerivationPaths",e.PermittedCoinTypes="permittedCoinTypes",e.SnapCronjob="snapCronjob",e.TransactionOrigin="transactionOrigin",e.SignatureOrigin="signatureOrigin",e.RpcOrigin="rpcOrigin",e.KeyringOrigin="keyringOrigin",e.SnapIds="snapIds",e.ChainIds="chainIds",e.LookupMatchers="lookupMatchers",e.MaxRequestTime="maxRequestTime",e.ProtocolSnapScopes="protocolSnapScopes"}(s||(n.SnapCaveatType=s={}))}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/caveats.cjs"}],[2837,{"./bytes.cjs":2835,"@metamask/utils":2950,"@noble/hashes/sha256":3e3},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.checksumFiles=n.checksum=void 0;const s=e("@metamask/utils"),r=e("@noble/hashes/sha256"),i=e("./bytes.cjs");async function a(e){const t=(0,i.getBytes)(e);return"crypto"in globalThis&&"object"==typeof globalThis.crypto&&crypto.subtle?.digest?new Uint8Array(await crypto.subtle.digest("SHA-256",t)):(0,r.sha256)(t)}n.checksum=a,n.checksumFiles=async function(e){const t=await Promise.all([...e].sort(((e,t)=>((0,s.assert)(e.path!==t.path,"Tried to sort files with non-unique paths."),e.path<t.path?-1:1))).map((async e=>a(e))));return a((0,s.concatBytes)(t))}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/checksum.cjs"}],[2838,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.MAX_FILE_SIZE=void 0,n.MAX_FILE_SIZE=64e6}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/constants.cjs"}],[2839,{"@metamask/superstruct":2872,"@metamask/utils":2950,"cron-parser":4179},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isCronjobSpecificationArray=n.CronjobSpecificationArrayStruct=n.isCronjobSpecification=n.CronjobSpecificationStruct=n.parseCronExpression=n.CronExpressionStruct=n.CronjobRpcRequestStruct=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils"),i=e("cron-parser");n.CronjobRpcRequestStruct=(0,s.object)({jsonrpc:(0,s.optional)(r.JsonRpcVersionStruct),id:(0,s.optional)(r.JsonRpcIdStruct),method:(0,s.string)(),params:(0,s.optional)(r.JsonRpcParamsStruct)}),n.CronExpressionStruct=(0,s.refine)((0,s.string)(),"CronExpression",(e=>{try{return(0,i.parseExpression)(e),!0}catch{return!1}})),n.parseCronExpression=function(e){const t=(0,s.create)(e,n.CronExpressionStruct);return(0,i.parseExpression)(t)},n.CronjobSpecificationStruct=(0,s.object)({expression:n.CronExpressionStruct,request:n.CronjobRpcRequestStruct}),n.isCronjobSpecification=function(e){try{return(0,s.create)(e,n.CronjobSpecificationStruct),!0}catch{return!1}},n.CronjobSpecificationArrayStruct=(0,s.array)(n.CronjobSpecificationStruct),n.isCronjobSpecificationArray=function(e){try{return(0,s.create)(e,n.CronjobSpecificationArrayStruct),!0}catch{return!1}}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/cronjob.cjs"}],[2840,{"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.currency=void 0;const s=e("@metamask/superstruct");n.currency=function(e){const t=e.toLowerCase();return(0,s.coerce)((0,s.literal)(t),(0,s.literal)(e.toUpperCase()),(e=>(0,s.create)(e.toLowerCase(),(0,s.literal)(t))))}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/currency.cjs"}],[2841,{rfdc:5288},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.deepClone=void 0;const r=s(e("rfdc"));n.deepClone=(0,r.default)({proto:!1,circles:!1})}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/deep-clone.cjs"}],[2842,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_ENDOWMENTS=void 0,n.DEFAULT_ENDOWMENTS=Object.freeze(["atob","btoa","BigInt","console","crypto","Date","Math","setTimeout","clearTimeout","SubtleCrypto","TextDecoder","TextEncoder","URL","URLSearchParams","setInterval","clearInterval","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","isSecureContext","Intl","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","DataView","ArrayBuffer","AbortController","AbortSignal"])}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/default-endowments.cjs"}],[2843,{"./array.cjs":2832,"@metamask/slip44":2624},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.getSlip44ProtocolName=n.getSnapDerivationPathName=n.SNAPS_DERIVATION_PATHS=void 0;const r=s(e("@metamask/slip44")),i=e("./array.cjs");function a(e){return"1"===String(e)?"Test Networks":r.default[e]?.name??null}n.SNAPS_DERIVATION_PATHS=[{path:["m","44'","0'"],curve:"ed25519",name:"Test BIP-32 Path (ed25519)"},{path:["m","44'","1'"],curve:"secp256k1",name:"Testnet"},{path:["m","44'","0'"],curve:"secp256k1",name:"Bitcoin Legacy"},{path:["m","49'","0'"],curve:"secp256k1",name:"Bitcoin Nested SegWit"},{path:["m","49'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Nested SegWit"},{path:["m","84'","0'"],curve:"secp256k1",name:"Bitcoin Native SegWit"},{path:["m","84'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Native SegWit"},{path:["m","86'","0'"],curve:"secp256k1",name:"Bitcoin Taproot"},{path:["m","86'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Taproot"},{path:["m","44'","501'"],curve:"ed25519",name:"Solana"},{path:["m","44'","501'","0'","0'"],curve:"ed25519",name:"Solana"},{path:["m","44'","2'"],curve:"secp256k1",name:"Litecoin"},{path:["m","44'","3'"],curve:"secp256k1",name:"Dogecoin"},{path:["m","44'","60'"],curve:"secp256k1",name:"Ethereum"},{path:["m","44'","118'"],curve:"secp256k1",name:"Atom"},{path:["m","44'","145'"],curve:"secp256k1",name:"Bitcoin Cash"},{path:["m","44'","637'"],curve:"ed25519",name:"Aptos"},{path:["m","44'","714'"],curve:"secp256k1",name:"Binance (BNB)"},{path:["m","44'","784'"],curve:"ed25519",name:"Sui"},{path:["m","44'","931'"],curve:"secp256k1",name:"THORChain (RUNE)"},{path:["m","44'","330'"],curve:"secp256k1",name:"Terra (LUNA)"},{path:["m","44'","459'"],curve:"secp256k1",name:"Kava"},{path:["m","44'","529'"],curve:"secp256k1",name:"Secret Network"},{path:["m","44'","397'","0'"],curve:"ed25519",name:"NEAR Protocol"},{path:["m","44'","1'","0'"],curve:"ed25519",name:"Testnet"},{path:["m","44'","472'"],curve:"ed25519",name:"Arweave"},{path:["m","44'","12586'"],curve:"secp256k1",name:"Mina"},{path:["m","44'","242'"],curve:"ed25519",name:"Nimiq"},{path:["m","44'","1729'","0'","0'"],curve:"ed25519",name:"Tezos"},{path:["m","1789'","0'"],curve:"ed25519",name:"Vega"},{path:["m","1852'","1815'"],curve:"ed25519Bip32",name:"Cardano"},{path:["m","44'","508'","0'","0'","0'"],curve:"ed25519",name:"MultiversX"},{path:["m","44'","709'"],curve:"secp256k1",name:"Avail"},{path:["m","44'","626'"],curve:"ed25519",name:"Kadena"},{path:["m","44'","632'"],curve:"ed25519",name:"Massa"}],n.getSnapDerivationPathName=function(e,t){const s=n.SNAPS_DERIVATION_PATHS.find((n=>n.curve===t&&(0,i.isEqual)(n.path,e)));if(s)return s.name;if("secp256k1"===t&&"m"===e[0]&&"44'"===e[1]&&e[2].endsWith("'")){return a(e[2].slice(0,-1))??null}return null},n.getSlip44ProtocolName=a}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/derivation-paths.cjs"}],[2844,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.STATE_ENCRYPTION_MAGIC_VALUE=n.SIP_6_MAGIC_VALUE=void 0,n.SIP_6_MAGIC_VALUE="1399742832'",n.STATE_ENCRYPTION_MAGIC_VALUE="572232532'"}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/entropy.cjs"}],[2845,{"@metamask/rpc-errors":2554,"@metamask/snaps-sdk":2746,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s,r,i,a=this&&this.__classPrivateFieldSet||function(e,t,n,s,r){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,n):r?r.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(e):s?s.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.unwrapError=n.isWrappedSnapError=n.isSerializedSnapError=n.isSnapError=n.WrappedSnapError=n.SNAP_ERROR_WRAPPER_MESSAGE=n.SNAP_ERROR_WRAPPER_CODE=void 0;const c=e("@metamask/rpc-errors"),u=e("@metamask/snaps-sdk"),l=e("@metamask/utils");n.SNAP_ERROR_WRAPPER_CODE=-31001,n.SNAP_ERROR_WRAPPER_MESSAGE="Wrapped Snap Error";class d extends Error{constructor(e){const t=(0,u.getErrorMessage)(e);super(t),s.set(this,void 0),r.set(this,void 0),i.set(this,void 0),a(this,s,e,"f"),a(this,r,t,"f"),a(this,i,(0,u.getErrorStack)(e),"f")}get name(){return"WrappedSnapError"}get message(){return o(this,r,"f")}get stack(){return o(this,i,"f")}toJSON(){const e=m(o(this,s,"f"))?o(this,s,"f").serialize():(0,c.serializeCause)(o(this,s,"f"));return{code:n.SNAP_ERROR_WRAPPER_CODE,message:n.SNAP_ERROR_WRAPPER_MESSAGE,data:{cause:e}}}serialize(){return this.toJSON()}}function m(e){if((0,l.isObject)(e)&&"serialize"in e&&"function"==typeof e.serialize){const t=e.serialize();return(0,l.isJsonRpcError)(t)&&p(t)}return!1}function p(e){return e.code===u.SNAP_ERROR_CODE&&e.message===u.SNAP_ERROR_MESSAGE}function h(e){return(0,l.isJsonRpcError)(e)&&e.code===n.SNAP_ERROR_WRAPPER_CODE&&e.message===n.SNAP_ERROR_WRAPPER_MESSAGE}function f(e,t,n,s){const r=new c.JsonRpcError(e,t,s);return r.stack=n,r}n.WrappedSnapError=d,s=new WeakMap,r=new WeakMap,i=new WeakMap,n.isSnapError=m,n.isSerializedSnapError=p,n.isWrappedSnapError=h,n.unwrapError=function(e){if(h(e)){if((0,l.isJsonRpcError)(e.data.cause)){if(p(e.data.cause)){const{code:t,message:n,stack:s,data:r}=e.data.cause.data.cause;return[f(t,n,s,r),!0]}const{code:t,message:n,stack:s,data:r}=e.data.cause;return[f(t,n,s,r),!1]}return[f(c.errorCodes.rpc.internal,(0,u.getErrorMessage)(e.data.cause),(0,u.getErrorStack)(e.data.cause)),!1]}if((0,l.isJsonRpcError)(e)){const{code:t,message:n,stack:s,data:r}=e;return[f(t,n,s,r),!1]}return[f(c.errorCodes.rpc.internal,(0,u.getErrorMessage)(e),(0,u.getErrorStack)(e)),!1]}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/errors.cjs"}],[2846,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s;Object.defineProperty(n,"__esModule",{value:!0}),n.SNAP_EXPORT_NAMES=n.HandlerType=void 0,function(e){e.OnRpcRequest="onRpcRequest",e.OnSignature="onSignature",e.OnTransaction="onTransaction",e.OnCronjob="onCronjob",e.OnInstall="onInstall",e.OnUpdate="onUpdate",e.OnNameLookup="onNameLookup",e.OnKeyringRequest="onKeyringRequest",e.OnHomePage="onHomePage",e.OnSettingsPage="onSettingsPage",e.OnUserInput="onUserInput",e.OnAssetsLookup="onAssetsLookup",e.OnAssetsConversion="onAssetsConversion",e.OnProtocolRequest="onProtocolRequest"}(s||(n.HandlerType=s={})),n.SNAP_EXPORT_NAMES=Object.values(s)}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/handler-types.cjs"}],[2847,{"./handler-types.cjs":2846,"@metamask/snaps-sdk":2746,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.OnNameLookupResponseStruct=n.DomainResolutionResponseStruct=n.AddressResolutionResponseStruct=n.DomainResolutionStruct=n.AddressResolutionStruct=n.OnSettingsPageResponseStruct=n.OnHomePageResponseStruct=n.OnHomePageResponseWithIdStruct=n.OnHomePageResponseWithContentStruct=n.OnSignatureResponseStruct=n.OnTransactionResponseStruct=n.OnTransactionResponseWithContentStruct=n.OnTransactionResponseWithIdStruct=n.OnTransactionSeverityResponseStruct=n.SNAP_EXPORTS=void 0;const s=e("@metamask/snaps-sdk"),r=e("@metamask/superstruct"),i=e("./handler-types.cjs");n.SNAP_EXPORTS={[i.HandlerType.OnRpcRequest]:{type:i.HandlerType.OnRpcRequest,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnTransaction]:{type:i.HandlerType.OnTransaction,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnCronjob]:{type:i.HandlerType.OnCronjob,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnNameLookup]:{type:i.HandlerType.OnNameLookup,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnInstall]:{type:i.HandlerType.OnInstall,required:!1,validator:e=>"function"==typeof e},[i.HandlerType.OnUpdate]:{type:i.HandlerType.OnUpdate,required:!1,validator:e=>"function"==typeof e},[i.HandlerType.OnKeyringRequest]:{type:i.HandlerType.OnKeyringRequest,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnHomePage]:{type:i.HandlerType.OnHomePage,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnSettingsPage]:{type:i.HandlerType.OnSettingsPage,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnSignature]:{type:i.HandlerType.OnSignature,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnUserInput]:{type:i.HandlerType.OnUserInput,required:!1,validator:e=>"function"==typeof e},[i.HandlerType.OnAssetsLookup]:{type:i.HandlerType.OnAssetsLookup,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnAssetsConversion]:{type:i.HandlerType.OnAssetsConversion,required:!0,validator:e=>"function"==typeof e},[i.HandlerType.OnProtocolRequest]:{type:i.HandlerType.OnProtocolRequest,required:!0,validator:e=>"function"==typeof e}},n.OnTransactionSeverityResponseStruct=(0,r.object)({severity:(0,r.optional)((0,r.literal)(s.SeverityLevel.Critical))}),n.OnTransactionResponseWithIdStruct=(0,r.assign)(n.OnTransactionSeverityResponseStruct,(0,r.object)({id:(0,r.string)()})),n.OnTransactionResponseWithContentStruct=(0,r.assign)(n.OnTransactionSeverityResponseStruct,(0,r.object)({content:s.ComponentOrElementStruct})),n.OnTransactionResponseStruct=(0,r.nullable)((0,r.union)([n.OnTransactionResponseWithContentStruct,n.OnTransactionResponseWithIdStruct])),n.OnSignatureResponseStruct=n.OnTransactionResponseStruct,n.OnHomePageResponseWithContentStruct=(0,r.object)({content:s.ComponentOrElementStruct}),n.OnHomePageResponseWithIdStruct=(0,r.object)({id:(0,r.string)()}),n.OnHomePageResponseStruct=(0,r.union)([n.OnHomePageResponseWithContentStruct,n.OnHomePageResponseWithIdStruct]),n.OnSettingsPageResponseStruct=n.OnHomePageResponseStruct,n.AddressResolutionStruct=(0,r.object)({protocol:(0,r.string)(),resolvedDomain:(0,r.string)()}),n.DomainResolutionStruct=(0,r.object)({protocol:(0,r.string)(),resolvedAddress:(0,r.string)(),domainName:(0,r.string)()}),n.AddressResolutionResponseStruct=(0,r.object)({resolvedDomains:(0,r.size)((0,r.array)(n.AddressResolutionStruct),1,Infinity)}),n.DomainResolutionResponseStruct=(0,r.object)({resolvedAddresses:(0,r.size)((0,r.array)(n.DomainResolutionStruct),1,Infinity)}),n.OnNameLookupResponseStruct=(0,r.nullable)((0,r.union)([n.AddressResolutionResponseStruct,n.DomainResolutionResponseStruct]))}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/handlers.cjs"}],[2848,{"./svg.cjs":2862,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getSvgDimensions=n.assertIsSnapIcon=n.SVG_MAX_BYTE_SIZE_TEXT=n.SVG_MAX_BYTE_SIZE=void 0;const s=e("@metamask/utils"),r=e("./svg.cjs");n.SVG_MAX_BYTE_SIZE=1e5,n.SVG_MAX_BYTE_SIZE_TEXT=`${Math.floor(n.SVG_MAX_BYTE_SIZE/1e3)}kb`,n.assertIsSnapIcon=function(e){(0,s.assert)(e.path.endsWith(".svg"),'Expected snap icon to end in ".svg".');const t="string"==typeof e.value?(0,s.stringToBytes)(e.value).byteLength:e.value.byteLength;(0,s.assert)(t<=n.SVG_MAX_BYTE_SIZE,`The specified SVG icon exceeds the maximum size of ${n.SVG_MAX_BYTE_SIZE_TEXT}.`),(0,s.assert)((0,r.isSvg)(e.toString()),"Snap icon must be a valid SVG.")},n.getSvgDimensions=function(e){try{const t=(0,r.parseSvg)(e),n=t["@_height"],i=t["@_width"];if(n&&i)return{height:n,width:i};const a=t["@_viewBox"];if(a){const[e,t,n,r]=a.split(" ");if(n&&r){const e=parseInt(n,10),t=parseInt(r,10);return(0,s.assert)(Number.isInteger(e)&&e>0),(0,s.assert)(Number.isInteger(t)&&t>0),{width:e,height:t}}}}catch{throw new Error("Snap icon must be a valid SVG.")}return null}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/icon.cjs"}],[2849,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createWindow=void 0,n.createWindow=async function({uri:e,id:t,sandbox:n=!0,testId:s="snaps-iframe"}){return await new Promise(((r,i)=>{const a=document.createElement("iframe");a.setAttribute("id",t),a.setAttribute("data-testid",s),n&&a.setAttribute("sandbox","allow-scripts"),a.setAttribute("src",e),document.body.appendChild(a),a.addEventListener("load",(()=>{a.contentWindow?r(a.contentWindow):i(new Error(`iframe.contentWindow not present on load for job "${t}".`))}))}))}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/iframe.cjs"}],[2850,{"./array.cjs":2832,"./auxiliary-files.cjs":2833,"./base64.cjs":2834,"./bytes.cjs":2835,"./caveats.cjs":2836,"./checksum.cjs":2837,"./constants.cjs":2838,"./cronjob.cjs":2839,"./currency.cjs":2840,"./deep-clone.cjs":2841,"./default-endowments.cjs":2842,"./derivation-paths.cjs":2843,"./entropy.cjs":2844,"./errors.cjs":2845,"./handler-types.cjs":2846,"./handlers.cjs":2847,"./iframe.cjs":2849,"./json-rpc.cjs":2851,"./json.cjs":2852,"./localization.cjs":2853,"./logging.cjs":2854,"./manifest/index.cjs":2855,"./path.cjs":2857,"./platform-version.cjs":2858,"./snaps.cjs":2859,"./strings.cjs":2860,"./structs.cjs":2861,"./types.cjs":2863,"./ui.cjs":2864,"./url.cjs":2865,"./validation.cjs":2866,"./versions.cjs":2867,"./virtual-file/index.cjs":2869},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./array.cjs"),n),r(e("./auxiliary-files.cjs"),n),r(e("./base64.cjs"),n),r(e("./bytes.cjs"),n),r(e("./caveats.cjs"),n),r(e("./checksum.cjs"),n),r(e("./constants.cjs"),n),r(e("./cronjob.cjs"),n),r(e("./currency.cjs"),n),r(e("./deep-clone.cjs"),n),r(e("./default-endowments.cjs"),n),r(e("./derivation-paths.cjs"),n),r(e("./entropy.cjs"),n),r(e("./errors.cjs"),n),r(e("./handlers.cjs"),n),r(e("./handler-types.cjs"),n),r(e("./iframe.cjs"),n),r(e("./json.cjs"),n),r(e("./json-rpc.cjs"),n),r(e("./localization.cjs"),n),r(e("./logging.cjs"),n),r(e("./manifest/index.cjs"),n),r(e("./path.cjs"),n),r(e("./platform-version.cjs"),n),r(e("./snaps.cjs"),n),r(e("./strings.cjs"),n),r(e("./structs.cjs"),n),r(e("./types.cjs"),n),r(e("./ui.cjs"),n),r(e("./url.cjs"),n),r(e("./validation.cjs"),n),r(e("./versions.cjs"),n),r(e("./virtual-file/index.cjs"),n)}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/index.cjs"}],[2851,{"@metamask/permission-controller":2393,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsJsonRpcSuccess=n.isOriginAllowed=n.assertIsKeyringOrigins=n.KeyringOriginsStruct=n.assertIsRpcOrigins=n.RpcOriginsStruct=void 0;const s=e("@metamask/permission-controller"),r=e("@metamask/superstruct"),i=e("@metamask/utils"),a=(0,r.array)((0,r.refine)((0,r.string)(),"Allowed origin",(e=>!(e.split("*").length-1>2)||'No more than two wildcards ("*") are allowed in an origin specifier.')));function o(e,t){if("*"===e||e===t)return!0;const n=function(e){const t=e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&").replace(/\\\*/gu,".*");return RegExp(`^${t}$`,"u")}(e);return n.test(t)}n.RpcOriginsStruct=(0,r.refine)((0,r.object)({dapps:(0,r.optional)((0,r.boolean)()),snaps:(0,r.optional)((0,r.boolean)()),allowedOrigins:(0,r.optional)(a)}),"RPC origins",(e=>!!Boolean(!0===e.snaps||!0===e.dapps||e.allowedOrigins&&e.allowedOrigins.length>0)||"Must specify at least one JSON-RPC origin.")),n.assertIsRpcOrigins=function(e,t){(0,i.assertStruct)(e,n.RpcOriginsStruct,"Invalid JSON-RPC origins",t)},n.KeyringOriginsStruct=(0,r.object)({allowedOrigins:(0,r.optional)(a)}),n.assertIsKeyringOrigins=function(e,t){(0,i.assertStruct)(e,n.KeyringOriginsStruct,"Invalid keyring origins",t)},n.isOriginAllowed=function(e,t,n){return"metamask"===n||(!!e.allowedOrigins?.some((e=>o(e,n)))||(!(t!==s.SubjectType.Website||!e.dapps)||Boolean(t===s.SubjectType.Snap&&e.snaps)))},n.assertIsJsonRpcSuccess=function(e){if(!(0,i.isJsonRpcSuccess)(e)){if((0,i.isJsonRpcFailure)(e))throw new Error(`JSON-RPC request failed: ${e.error.message}`);throw new Error("Invalid JSON-RPC response.")}}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/json-rpc.cjs"}],[2852,{"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonSizeUnsafe=n.parseJson=void 0;const s=e("@metamask/utils");n.parseJson=function(e){return(0,s.getSafeJson)(JSON.parse(e))},n.getJsonSizeUnsafe=function(e){const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/json.cjs"}],[2853,{"./json.cjs":2852,"@metamask/snaps-sdk":2746,"@metamask/superstruct":2872},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.validateSnapManifestLocalizations=n.getLocalizedSnapManifest=n.translate=n.TRANSLATION_REGEX=n.getLocalizationFile=n.getValidatedLocalizationFiles=n.LocalizationFileStruct=n.LOCALIZABLE_FIELDS=void 0;const s=e("@metamask/snaps-sdk"),r=e("@metamask/superstruct"),i=e("./json.cjs");function a(e,t){const n=t.find((t=>t.locale===e));return n||t.find((e=>"en"===e.locale))}function o(e,t){const s=e.matchAll(n.TRANSLATION_REGEX);return Array.from(s).reduce(((n,[s,r])=>{if(!t)throw new Error(`Failed to translate "${e}": No localization file found.`);const i=t.messages[r.trim()];if(!i)throw new Error(`Failed to translate "${e}": No translation found for "${r.trim()}" in "${t.locale}" file.`);return n.replace(s,i.message)}),e)}function c(e,t,s){const r=a(t,s);return n.LOCALIZABLE_FIELDS.reduce(((e,t)=>{const n=o(e[t],r);return{...e,[t]:n}}),e)}n.LOCALIZABLE_FIELDS=["description","proposedName"],n.LocalizationFileStruct=(0,r.object)({locale:(0,r.string)(),messages:(0,r.record)((0,r.string)(),(0,r.object)({message:(0,r.string)(),description:(0,r.optional)((0,r.string)())}))}),n.getValidatedLocalizationFiles=function(e){for(const t of e)try{t.result=(0,r.create)((0,i.parseJson)(t.toString()),n.LocalizationFileStruct)}catch(e){if(e instanceof r.StructError)throw new Error(`Failed to validate localization file "${t.path}": ${e.message}.`);if(e instanceof SyntaxError)throw new Error(`Failed to parse localization file "${t.path}" as JSON.`);throw e}return e},n.getLocalizationFile=a,n.TRANSLATION_REGEX=/\{\{\s?([a-zA-Z0-9-_\s]+)\s?\}\}/gu,n.translate=o,n.getLocalizedSnapManifest=c,n.validateSnapManifestLocalizations=function(e,t){try{t.filter((e=>"en"!==e.locale)).forEach((n=>{c(e,n.locale,t)})),c(e,"en",t)}catch(e){throw new Error(`Failed to localize Snap manifest: ${(0,s.getErrorMessage)(e)}`)}}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/localization.cjs"}],[2854,{"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=n.logError=n.logInfo=n.snapsLogger=void 0;const s=e("@metamask/utils");n.snapsLogger=(0,s.createProjectLogger)("snaps"),n.logInfo=function(e,...t){console.log(e,...t)},n.logError=function(e,...t){console.error(e,...t)},n.logWarning=function(e,...t){console.warn(e,...t)}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/logging.cjs"}],[2855,{"./validation.cjs":2856},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./validation.cjs"),n)}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/manifest/index.cjs"}],[2856,{"../array.cjs":2832,"../cronjob.cjs":2839,"../entropy.cjs":2844,"../json-rpc.cjs":2851,"../snaps.cjs":2859,"../structs.cjs":2861,"../types.cjs":2863,"@metamask/key-tree":1957,"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapManifest=n.assertIsSnapManifest=n.isSnapManifest=n.SnapManifestStruct=n.InitialConnectionsStruct=n.SnapAuxilaryFilesStruct=n.PermissionsStruct=n.EmptyObjectStruct=n.HandlerCaveatsStruct=n.ProtocolScopesStruct=n.MaxRequestTimeStruct=n.MAXIMUM_REQUEST_TIMEOUT=n.MINIMUM_REQUEST_TIMEOUT=n.LookupMatchersStruct=n.ChainIdsStruct=n.SnapIdsStruct=n.SemVerRangeStruct=n.SnapGetBip32EntropyPermissionsStruct=n.Bip32EntropyStruct=n.CurveStruct=n.bip32entropy=n.Bip32PathStruct=n.FORBIDDEN_COIN_TYPES=void 0;const s=e("@metamask/key-tree"),r=e("@metamask/superstruct"),i=e("@metamask/utils"),a=e("../array.cjs"),o=e("../cronjob.cjs"),c=e("../entropy.cjs"),u=e("../json-rpc.cjs"),l=e("../snaps.cjs"),d=e("../structs.cjs"),m=e("../types.cjs"),p=[c.SIP_6_MAGIC_VALUE,c.STATE_ENCRYPTION_MAGIC_VALUE];n.FORBIDDEN_COIN_TYPES=[60];const h=n.FORBIDDEN_COIN_TYPES.map((e=>["m","44'",`${e}'`]));n.Bip32PathStruct=(0,r.refine)((0,r.array)((0,r.string)()),"BIP-32 path",(e=>0===e.length?"Path must be a non-empty BIP-32 derivation path array":"m"!==e[0]?'Path must start with "m".':e.length<3?"Paths must have a length of at least three.":e.slice(1).some((e=>!(0,s.isValidBIP32PathSegment)(e)))?"Path must be a valid BIP-32 derivation path array.":p.includes(e[1])?`The purpose "${e[1]}" is not allowed for entropy derivation.`:!h.some((t=>(0,a.isEqual)(e.slice(0,t.length),t)))||`The path "${e.join("/")}" is not allowed for entropy derivation.`));n.bip32entropy=e=>(0,r.refine)(e,"BIP-32 entropy",(e=>"ed25519"!==e.curve||!e.path.slice(1).some((e=>!e.endsWith("'")))||"Ed25519 does not support unhardened paths.")),n.CurveStruct=(0,r.enums)(["ed25519","secp256k1","ed25519Bip32"]),n.Bip32EntropyStruct=(0,n.bip32entropy)((0,r.type)({path:n.Bip32PathStruct,curve:n.CurveStruct})),n.SnapGetBip32EntropyPermissionsStruct=(0,r.size)((0,r.array)(n.Bip32EntropyStruct),1,Infinity),n.SemVerRangeStruct=(0,r.refine)((0,r.string)(),"SemVer range",(e=>!!(0,i.isValidSemVerRange)(e)||"Expected a valid SemVer range.")),n.SnapIdsStruct=(0,r.refine)((0,r.record)(l.SnapIdStruct,(0,r.object)({version:(0,r.optional)(n.SemVerRangeStruct)})),"SnapIds",(e=>0!==Object.keys(e).length)),n.ChainIdsStruct=(0,r.size)((0,r.array)(i.CaipChainIdStruct),1,Infinity),n.LookupMatchersStruct=(0,r.union)([(0,r.object)({tlds:(0,r.size)((0,r.array)((0,r.string)()),1,Infinity)}),(0,r.object)({schemes:(0,r.size)((0,r.array)((0,r.string)()),1,Infinity)}),(0,r.object)({tlds:(0,r.size)((0,r.array)((0,r.string)()),1,Infinity),schemes:(0,r.size)((0,r.array)((0,r.string)()),1,Infinity)})]),n.MINIMUM_REQUEST_TIMEOUT=(0,i.inMilliseconds)(5,i.Duration.Second),n.MAXIMUM_REQUEST_TIMEOUT=(0,i.inMilliseconds)(3,i.Duration.Minute),n.MaxRequestTimeStruct=(0,r.size)((0,r.integer)(),n.MINIMUM_REQUEST_TIMEOUT,n.MAXIMUM_REQUEST_TIMEOUT),n.ProtocolScopesStruct=(0,r.record)(i.CaipChainIdStruct,(0,r.object)({methods:(0,r.array)((0,r.string)())})),n.HandlerCaveatsStruct=(0,r.object)({maxRequestTime:(0,r.optional)(n.MaxRequestTimeStruct)}),n.EmptyObjectStruct=(0,r.object)({}),n.PermissionsStruct=(0,r.type)({"endowment:assets":(0,r.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,r.object)({scopes:n.ChainIdsStruct}))),"endowment:cronjob":(0,r.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,r.object)({jobs:(0,r.optional)(o.CronjobSpecificationArrayStruct)}))),"endowment:ethereum-provider":(0,r.optional)(n.EmptyObjectStruct),"endowment:keyring":(0,r.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,u.KeyringOriginsStruct)),"endowment:protocol":(0,r.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,r.object)({scopes:n.ProtocolScopesStruct}))),"endowment:lifecycle-hooks":(0,r.optional)(n.HandlerCaveatsStruct),"endowment:name-lookup":(0,r.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,r.object)({chains:(0,r.optional)(n.ChainIdsStruct),matchers:(0,r.optional)(n.LookupMatchersStruct)}))),"endowment:network-access":(0,r.optional)(n.EmptyObjectStruct),"endowment:page-home":(0,r.optional)(n.HandlerCaveatsStruct),"endowment:rpc":(0,r.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,u.RpcOriginsStruct)),"endowment:signature-insight":(0,r.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,r.object)({allowSignatureOrigin:(0,r.optional)((0,r.boolean)())}))),"endowment:transaction-insight":(0,r.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,r.object)({allowTransactionOrigin:(0,r.optional)((0,r.boolean)())}))),"endowment:webassembly":(0,r.optional)(n.EmptyObjectStruct),snap_dialog:(0,r.optional)(n.EmptyObjectStruct),snap_manageState:(0,r.optional)(n.EmptyObjectStruct),snap_manageAccounts:(0,r.optional)(n.EmptyObjectStruct),snap_notify:(0,r.optional)(n.EmptyObjectStruct),snap_getBip32Entropy:(0,r.optional)(n.SnapGetBip32EntropyPermissionsStruct),snap_getBip32PublicKey:(0,r.optional)(n.SnapGetBip32EntropyPermissionsStruct),snap_getBip44Entropy:(0,r.optional)((0,r.size)((0,r.array)((0,r.object)({coinType:(0,r.size)((0,r.integer)(),0,2**32-1)})),1,Infinity)),snap_getEntropy:(0,r.optional)(n.EmptyObjectStruct),snap_getLocale:(0,r.optional)(n.EmptyObjectStruct),wallet_snap:(0,r.optional)(n.SnapIdsStruct)}),n.SnapAuxilaryFilesStruct=(0,r.array)((0,r.string)()),n.InitialConnectionsStruct=(0,r.record)((0,r.intersection)([(0,r.string)(),(0,m.uri)()]),(0,r.object)({})),n.SnapManifestStruct=(0,r.object)({version:i.VersionStruct,description:(0,r.size)((0,r.string)(),1,280),proposedName:(0,r.size)((0,r.string)(),1,214),repository:(0,r.optional)((0,r.type)({type:(0,r.size)((0,r.string)(),1,Infinity),url:(0,r.size)((0,r.string)(),1,Infinity)})),source:(0,r.object)({shasum:i.ChecksumStruct,location:(0,r.object)({npm:(0,r.object)({filePath:(0,r.size)((0,r.string)(),1,Infinity),iconPath:(0,r.optional)((0,r.size)((0,r.string)(),1,Infinity)),packageName:m.NameStruct,registry:(0,r.union)([(0,r.literal)("https://registry.npmjs.org"),(0,r.literal)("https://registry.npmjs.org/")])})}),files:(0,r.optional)(n.SnapAuxilaryFilesStruct),locales:(0,r.optional)(n.SnapAuxilaryFilesStruct)}),initialConnections:(0,r.optional)(n.InitialConnectionsStruct),initialPermissions:n.PermissionsStruct,manifestVersion:(0,r.literal)("0.1"),platformVersion:(0,r.optional)(i.VersionStruct),$schema:(0,r.optional)((0,r.string)())}),n.isSnapManifest=function(e){return(0,r.is)(e,n.SnapManifestStruct)},n.assertIsSnapManifest=function(e){(0,i.assertStruct)(e,n.SnapManifestStruct,`"${m.NpmSnapFileNames.Manifest}" is invalid`)},n.createSnapManifest=function(e){return(0,r.create)(e,n.SnapManifestStruct)}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/manifest/validation.cjs"}],[2857,{"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.normalizeRelative=void 0;const s=e("@metamask/utils");n.normalizeRelative=function(e){return(0,s.assert)(!e.startsWith("/")),(0,s.assert)(-1===e.search(/:|\/\//u),`Path "${e}" potentially an URI instead of local relative`),e.startsWith("./")?e.slice(2):e}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/path.cjs"}],[2858,{"@metamask/snaps-sdk/package.json":2831},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.getPlatformVersion=void 0;const r=s(e("@metamask/snaps-sdk/package.json"));n.getPlatformVersion=function(){return r.default.version}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/platform-version.cjs"}],[2859,{"./caveats.cjs":2836,"./checksum.cjs":2837,"./types.cjs":2863,"@metamask/snaps-sdk":2746,"@metamask/superstruct":2872,"@metamask/utils":2950,"@scure/base":3027,"fast-json-stable-stringify":4434,"validate-npm-package-name":5679},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.verifyRequestedSnapPermissions=n.isSnapPermitted=n.assertIsValidSnapId=n.isSnapId=n.stripSnapPrefix=n.getSnapPrefix=n.SnapIdStruct=n.SnapIdPrefixStruct=n.HttpSnapIdStruct=n.NpmSnapIdStruct=n.LocalSnapIdStruct=n.BaseSnapIdStruct=n.LOCALHOST_HOSTNAMES=n.validateSnapShasum=n.getSnapChecksum=n.SnapStatusEvents=n.SnapStatus=n.PROPOSED_NAME_REGEX=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),a=e("@metamask/utils"),o=e("@scure/base"),c=s(e("fast-json-stable-stringify")),u=s(e("validate-npm-package-name")),l=e("./caveats.cjs"),d=e("./checksum.cjs"),m=e("./types.cjs");var p,h;function f(e){const t=e.clone();return delete t.result.source.shasum,t.value=(0,c.default)(t.result),t}async function g(e){const{manifest:t,sourceCode:n,svgIcon:s,auxiliaryFiles:r,localizationFiles:i}=e,a=[f(t),n,s,...r,...i].filter((e=>e!==undefined));return o.base64.encode(await(0,d.checksumFiles)(a))}n.PROPOSED_NAME_REGEX=/^(?:[A-Za-z0-9-_]+( [A-Za-z0-9-_]+)*)|(?:(?:@[A-Za-z0-9-*~][A-Za-z0-9-*._~]*\/)?[A-Za-z0-9-~][A-Za-z0-9-._~]*)$/u,function(e){e.Installing="installing",e.Updating="updating",e.Running="running",e.Stopped="stopped",e.Crashed="crashed"}(p||(n.SnapStatus=p={})),function(e){e.Start="START",e.Stop="STOP",e.Crash="CRASH",e.Update="UPDATE"}(h||(n.SnapStatusEvents=h={})),n.getSnapChecksum=g,n.validateSnapShasum=async function(e,t="Invalid Snap manifest: manifest shasum does not match computed shasum."){if(e.manifest.result.source.shasum!==await g(e))throw new Error(t)},n.LOCALHOST_HOSTNAMES=["localhost","127.0.0.1","[::1]"],n.BaseSnapIdStruct=(0,a.definePattern)("Base Snap Id",/^[\x21-\x7E]*$/u);const y=(0,m.uri)({protocol:(0,i.enums)(["http:","https:"]),hostname:(0,i.enums)(n.LOCALHOST_HOSTNAMES),hash:(0,i.empty)((0,i.string)()),search:(0,i.empty)((0,i.string)())});function b(e){const t=Object.values(m.SnapIdPrefixes).find((t=>e.startsWith(t)));if(t!==undefined)return t;throw new Error(`Invalid or no prefix found for "${e}"`)}n.LocalSnapIdStruct=(0,i.refine)(n.BaseSnapIdStruct,"local Snap Id",(e=>{if(!e.startsWith(m.SnapIdPrefixes.local))return`Expected local snap ID, got "${e}".`;const[t]=(0,i.validate)(e.slice(m.SnapIdPrefixes.local.length),y);return t??!0})),n.NpmSnapIdStruct=(0,i.intersection)([n.BaseSnapIdStruct,(0,m.uri)({protocol:(0,i.literal)(m.SnapIdPrefixes.npm),pathname:(0,i.refine)((0,i.string)(),"package name",(function*(e){const t=e.startsWith("/")?e.slice(1):e,{errors:n,validForNewPackages:s,warnings:r}=(0,u.default)(t);return s||(n===undefined?((0,a.assert)(r!==undefined),yield*r):yield*n),!0})),search:(0,i.empty)((0,i.string)()),hash:(0,i.empty)((0,i.string)())})]),n.HttpSnapIdStruct=(0,i.intersection)([n.BaseSnapIdStruct,(0,m.uri)({protocol:(0,i.enums)(["http:","https:"]),search:(0,i.empty)((0,i.string)()),hash:(0,i.empty)((0,i.string)())})]),n.SnapIdPrefixStruct=(0,i.refine)((0,i.string)(),"Snap ID prefix",(e=>{if(Object.values(m.SnapIdPrefixes).some((t=>e.startsWith(t))))return!0;return`Invalid or no prefix found. Expected Snap ID to start with one of: ${Object.values(m.SnapIdPrefixes).map((e=>`"${e}"`)).join(", ")}, but received: "${e}"`})),n.SnapIdStruct=(0,r.selectiveUnion)((e=>"string"==typeof e&&e.startsWith(m.SnapIdPrefixes.npm)?n.NpmSnapIdStruct:"string"==typeof e&&e.startsWith(m.SnapIdPrefixes.local)?n.LocalSnapIdStruct:n.SnapIdPrefixStruct)),n.getSnapPrefix=b,n.stripSnapPrefix=function(e){return e.replace(b(e),"")},n.isSnapId=function(e){return(0,i.is)(e,n.SnapIdStruct)},n.assertIsValidSnapId=function(e){(0,a.assertStruct)(e,n.SnapIdStruct,"Invalid snap ID")},n.isSnapPermitted=function(e,t){return Boolean((e?.wallet_snap?.caveats?.find((e=>e.type===l.SnapCaveatType.SnapIds))??{}).value?.[t])},n.verifyRequestedSnapPermissions=function(e){(0,a.assert)((0,a.isObject)(e),"Requested permissions must be an object.");const{wallet_snap:t}=e;(0,a.assert)((0,a.isObject)(t),"wallet_snap is missing from the requested permissions.");const{caveats:n}=t;(0,a.assert)(Array.isArray(n)&&1===n.length,"wallet_snap must have a caveat property with a single-item array value.");const[s]=n;(0,a.assert)((0,a.isObject)(s)&&s.type===l.SnapCaveatType.SnapIds&&(0,a.isObject)(s.value),`The requested permissions do not have a valid ${l.SnapCaveatType.SnapIds} caveat.`)}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/snaps.cjs"}],[2860,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.indent=void 0,n.indent=function(e,t=2){return e.replace(/^/gmu," ".repeat(t))}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/strings.cjs"}],[2861,{"./strings.cjs":2860,"@metamask/snaps-sdk":2746,"@metamask/superstruct":2872,"@metamask/utils":2950,chalk:4094},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.mergeStructs=n.createUnion=n.validateUnion=n.getStructErrorMessage=n.getStructFailureMessage=n.getStructErrorPrefix=n.getUnionStructNames=n.getStructFromPath=n.createFromStruct=n.getError=n.arrayToGenerator=n.SnapsStructError=n.named=void 0;const s=e("@metamask/snaps-sdk"),r=e("@metamask/superstruct"),i=e("@metamask/utils"),a=e("chalk"),o=e("./strings.cjs");function c(e,t,n){return n?t(e):e}n.named=function(e,t){return new r.Struct({...t,type:e})};class u extends r.StructError{constructor(e,t,n,s,r,i=!0){super(s,r),this.name="SnapsStructError",this.message=`${t}.\n\n${g(e,[...r()],i)}${n?`\n\n${n}`:""}`}}function*l(e){for(const t of e)yield t}function d({struct:e,prefix:t,suffix:n="",error:s,colorize:r}){return new u(e,t,n,s,(()=>l(s.failures())),r)}function m(e,t){return t.reduce(((t,n)=>(0,i.isObject)(e.schema)&&e.schema[n]?e.schema[n]:t),e)}function p(e,t=!0){return Array.isArray(e.schema)?e.schema.map((({type:e})=>c(e,a.green,t))):null}function h(e,t=!0){return"never"===e.type||0===e.path.length?"":`At path: ${c(e.path.join("."),a.bold,t)}`}function f(e,t,n=!0){const s=c(JSON.stringify(t.value),a.red,n),r=h(t,n);if("union"===t.type){const i=p(m(e,t.path),n);return i?`${r}Expected the value to be one of: ${i.join(", ")}, but received: ${s}.`:`${r}${t.message}.`}if("literal"===t.type){return`${r}${t.message.replace(/the literal `(.+)`,/u,`the value to be \`${c("$1",a.green,n)}\`,`).replace(/, but received: (.+)/u,`, but received: ${c("$1",a.red,n)}`)}.`}if("never"===t.type)return`Unknown key: ${c(t.path.join("."),a.bold,n)}, received: ${s}.`;if("size"===t.refinement){return`${r}${t.message.replace(/length between `(\d+)` and `(\d+)`/u,`length between ${c("$1",a.green,n)} and ${c("$2",a.green,n)},`).replace(/length of `(\d+)`/u,`length of ${c("$1",a.red,n)}`).replace(/a array/u,"an array")}.`}return t.refinement!==undefined?`${r}${t.message}.`:`${r}Expected a value of type ${c(t.type,a.green,n)}, but received: ${s}.`}function g(e,t,n=!0){return t.map((t=>(0,o.indent)(`${f(e,t,n)}`))).join("\n")}function y(e,t,n,a=!1){(0,i.assert)(t.schema,"Expected a struct with a schema. Make sure to use `union` from `@metamask/snaps-sdk`."),(0,i.assert)(t.schema.length>0,"Expected a non-empty array of structs.");const o=t.schema.map((e=>e.schema[n])),c=(0,r.type)({[n]:(0,s.union)(o)}),[u]=(0,r.validate)(e,c,{coerce:a});if(u)throw new Error(f(c,u.failures()[0],!1));const l=e,d=t.schema.filter((e=>(0,r.is)(l[n],e.schema[n])));(0,i.assert)(d.length>0,"Expected a struct to match the value.");const m=d.map((e=>(0,r.validate)(l,e,{coerce:a}))),p=m.find((([e])=>!e));if(p)return p[1];(0,i.assert)(m[0][0],"Expected at least one error.");const h=m.reduce(((e,[t])=>((0,i.assert)(t,"Expected an error."),t.failures().length<e.failures().length?t:e)),m[0][0]);throw new Error(f(t,h.failures()[0],!1))}n.SnapsStructError=u,n.arrayToGenerator=l,n.getError=d,n.createFromStruct=function(e,t,n,s=""){try{return(0,r.create)(e,t)}catch(e){if(e instanceof r.StructError)throw d({struct:t,prefix:n,suffix:s,error:e});throw e}},n.getStructFromPath=m,n.getUnionStructNames=p,n.getStructErrorPrefix=h,n.getStructFailureMessage=f,n.getStructErrorMessage=g,n.validateUnion=y,n.createUnion=function(e,t,n){return y(e,t,n,!0)},n.mergeStructs=function(...e){const t=r.assign(...e);return new r.Struct({...t,*refiner(t,n){for(const s of e)yield*s.refiner(t,n)}})}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/structs.cjs"}],[2862,{"@metamask/utils":2950,"fast-xml-parser":4436},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isSvg=n.parseSvg=void 0;const s=e("@metamask/utils"),r=e("fast-xml-parser");function i(e){try{const t=e.trim();(0,s.assert)(t.length>0);const n=new r.XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}).parse(t,!0);return(0,s.assert)((0,s.hasProperty)(n,"svg")),(0,s.isObject)(n.svg)?n.svg:{}}catch{throw new Error("Snap icon must be a valid SVG.")}}n.parseSvg=i,n.isSvg=function(e){try{return i(e),!0}catch{return!1}}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/svg.cjs"}],[2863,{"@metamask/superstruct":2872,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.WALLET_SNAP_PERMISSION_KEY=n.isValidUrl=n.uri=n.SNAP_STREAM_NAMES=n.SnapIdPrefixes=n.NpmSnapPackageJsonStruct=n.NameStruct=n.NpmSnapFileNames=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils");var i,a,o;!function(e){e.PackageJson="package.json",e.Manifest="snap.manifest.json"}(i||(n.NpmSnapFileNames=i={})),n.NameStruct=(0,s.size)((0,r.definePattern)("Snap Name",/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214),n.NpmSnapPackageJsonStruct=(0,s.type)({version:r.VersionStruct,name:n.NameStruct,main:(0,s.optional)((0,s.size)((0,s.string)(),1,Infinity)),repository:(0,s.optional)((0,s.type)({type:(0,s.size)((0,s.string)(),1,Infinity),url:(0,s.size)((0,s.string)(),1,Infinity)}))}),function(e){e.npm="npm:",e.local="local:"}(a||(n.SnapIdPrefixes=a={})),function(e){e.JSON_RPC="jsonRpc",e.COMMAND="command"}(o||(n.SNAP_STREAM_NAMES=o={}));n.uri=(e={})=>(0,s.refine)((0,s.union)([(0,s.string)(),(0,s.instance)(URL)]),"uri",(t=>{try{const n=new URL(t),r=(0,s.type)(e);return(0,s.assert)(n,r),!0}catch{return`Expected URL, got "${t.toString()}".`}})),n.isValidUrl=function(e,t={}){return(0,s.is)(e,(0,n.uri)(t))},n.WALLET_SNAP_PERMISSION_KEY="wallet_snap"}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/types.cjs"}],[2864,{"./url.cjs":2865,"@metamask/snaps-sdk":2746,"@metamask/snaps-sdk/jsx":2830,"@metamask/snaps-sdk/jsx-runtime":2829,"@metamask/utils":2950,marked:4866},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.serialiseJsx=n.walkJsx=n.getJsxChildren=n.hasChildren=n.getTotalTextLength=n.validateJsxElements=n.validateAssetSelector=n.validateTextLinks=n.validateLink=n.getJsxElementFromComponent=n.getTextChildren=void 0;const s=e("@metamask/snaps-sdk/jsx-runtime"),r=e("@metamask/snaps-sdk"),i=e("@metamask/snaps-sdk/jsx"),a=e("@metamask/utils"),o=e("marked"),c=e("./url.cjs"),u=5e4,l=["https:","mailto:","metamask:"];function d(e){switch(e){case"primary":return"primary";case"secondary":return"destructive";default:return undefined}}function m(e){return 1===e.length?e[0]:e}function p(e){return e.tokens&&e.tokens.length>0?m(e.tokens.flatMap(f)):e.href}function h(e){return m(e.flatMap(f))}function f(e){switch(e.type){case"link":return(0,s.jsx)(i.Link,{href:e.href,children:p(e)});case"text":return e.text;case"strong":return(0,s.jsx)(i.Bold,{children:h(e.tokens)});case"em":return(0,s.jsx)(i.Italic,{children:h(e.tokens)});default:return null}}function g(e){const t=(0,o.lexer)(e,{gfm:!1}),n=[];return(0,o.walkTokens)(t,(e=>{if("paragraph"===e.type){n.length>0&&n.push("\n\n");const{tokens:t}=e;n.push(...t.flatMap(f))}})),n.filter((e=>null!==e))}function y(e,t,n){try{const s=new URL(e);if((0,a.assert)(l.includes(s.protocol),`Protocol must be one of: ${l.join(", ")}.`),"metamask:"===s.protocol){const t=(0,c.parseMetaMaskUrl)(e);t.snapId&&(0,a.assert)(n(t.snapId),"The Snap being navigated to is not installed.")}else if("mailto:"===s.protocol){const e=s.pathname.split(",");for(const n of e){const e=n.split("@")[1];(0,a.assert)(!e.includes(":"));const s=`https://${e}`;(0,a.assert)(!t(s),"The specified URL is not allowed.")}return}(0,a.assert)(!t(s.href),"The specified URL is not allowed.")}catch(e){throw new Error(`Invalid URL: ${"ERR_ASSERTION"===e?.code?e.message:"Unable to parse URL."}`)}}function b(e,t){const n=t(e);(0,a.assert)(n,`Could not find account for address: ${e}`)}function x(e){const{type:t}=e;switch(t){case r.NodeType.Panel:return e.children.reduce(((e,t)=>e+x(t)),0);case r.NodeType.Row:return x(e.value);case r.NodeType.Text:return e.value.length;default:return 0}}function S(e){return(0,a.hasProperty)(e.props,"children")}function k(e){return Boolean(e)&&!0!==e}function v(e){if(S(e)){if(Array.isArray(e.props.children))return e.props.children.filter(k).flat(Infinity);if(e.props.children)return[e.props.children]}return[]}function w(e,t,n=0){if(Array.isArray(e)){for(const s of e){const e=w(s,t,n);if(e!==undefined)return e}return undefined}const s=t(e,n);if(s!==undefined)return s;if((0,a.hasProperty)(e,"props")&&(0,a.isPlainObject)(e.props)&&(0,a.hasProperty)(e.props,"children")){const s=v(e);for(const e of s)if((0,a.isPlainObject)(e)){const s=w(e,t,n+1);if(s!==undefined)return s}}return undefined}function T(e){return Object.entries(e).filter((([e])=>"children"!==e)).sort((([e],[t])=>e.localeCompare(t))).map((([e,t])=>{return` ${e}=${n=t,"string"==typeof n?`"${n}"`:`{${JSON.stringify(n)}}`}`;var n})).join("")}n.getTextChildren=g,n.getJsxElementFromComponent=function(e){return function(e){const t=x(e);(0,a.assert)(t<=u,`The text in a Snap UI may not be larger than ${u/1e3} kB.`)}(e),function e(t){switch(t.type){case r.NodeType.Address:return(0,s.jsx)(i.Address,{address:t.value});case r.NodeType.Button:return(0,s.jsx)(i.Button,{name:t.name,variant:d(t.variant),type:t.buttonType,children:t.value});case r.NodeType.Copyable:return(0,s.jsx)(i.Copyable,{value:t.value,sensitive:t.sensitive});case r.NodeType.Divider:return(0,s.jsx)(i.Divider,{});case r.NodeType.Form:return(0,s.jsx)(i.Form,{name:t.name,children:m(t.children.map(e))});case r.NodeType.Heading:return(0,s.jsx)(i.Heading,{children:t.value});case r.NodeType.Image:return(0,s.jsx)(i.Image,{src:t.value});case r.NodeType.Input:return(0,s.jsx)(i.Field,{label:t.label,error:t.error,children:(0,s.jsx)(i.Input,{name:t.name,type:t.inputType,value:t.value,placeholder:t.placeholder})});case r.NodeType.Panel:return(0,s.jsx)(i.Box,{children:m(t.children.map(e))});case r.NodeType.Row:return(0,s.jsx)(i.Row,{label:t.label,variant:t.variant,children:e(t.value)});case r.NodeType.Spinner:return(0,s.jsx)(i.Spinner,{});case r.NodeType.Text:return(0,s.jsx)(i.Text,{children:m(g(t.value))});default:return(0,a.assertExhaustive)(t)}}(e)},n.validateLink=y,n.validateTextLinks=function(e,t,n){const s=function(e){const t=(0,o.lexer)(e,{gfm:!1}),n=[];return(0,o.walkTokens)(t,(e=>{"link"===e.type&&n.push(e)})),n}(e);for(const e of s)y(e.href,t,n)},n.validateAssetSelector=b,n.validateJsxElements=function(e,{isOnPhishingList:t,getSnap:n,getAccountByAddress:s}){w(e,(e=>{switch(e.type){case"Link":y(e.props.href,t,n);break;case"AssetSelector":b(e.props.addresses[0],s)}}))},n.getTotalTextLength=x,n.hasChildren=S,n.getJsxChildren=v,n.walkJsx=w,n.serialiseJsx=function e(t,n=0){if(Array.isArray(t))return t.map((t=>e(t,n))).join("");const s=" ".repeat(n);if("string"==typeof t)return`${s}${t}\n`;if(!t)return"";const{type:r,props:i}=t,o=n>0?"\n":"";if((0,a.hasProperty)(i,"children")){const t=e(i.children,n+1);return`${s}<${r}${T(i)}>\n${t}${s}</${r}>${o}`}return`${s}<${r}${T(i)} />${o}`}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/ui.cjs"}],[2865,{"./snaps.cjs":2859,"@metamask/utils":2950},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.parseMetaMaskUrl=n.SNAP_PATHS=n.CLIENT_PATHS=void 0;const s=e("@metamask/utils"),r=e("./snaps.cjs");n.CLIENT_PATHS=["/"],n.SNAP_PATHS=["/home"],n.parseMetaMaskUrl=function(e){const t=new URL(e),{protocol:i}=t;if("metamask:"!==i)throw new Error(`Unable to parse URL. Expected the protocol to be "metamask:", but received "${i}".`);const[a,...o]=t.href.replace("metamask://","").split("/"),c=`/${o.join("/")}`;switch(a){case"client":return(0,s.assert)(n.CLIENT_PATHS.includes(c),`Unable to navigate to "${c}". The provided path is not allowed.`),{authority:a,path:c};case"snap":return function(e){const t="Invalid MetaMask url:",i=(0,r.stripSnapPrefix)(e.slice(1)),a=e.slice(1).startsWith("npm:")?"npm:":"local:",o=i.startsWith("@"),c=i.split("/"),u=`/${c[c.length-1]}`;let l;if("local:"===a){const[e,,...r]=c.slice(0,-1);l=`${e}//${r.join("/")}`,(0,s.assert)(n.SNAP_PATHS.includes(u),`${t} invalid snap path.`)}else l=o?`${c[0]}/${c[1]}`:c[0],(0,s.assert)(o?3===c.length&&n.SNAP_PATHS.includes(u):2===c.length&&n.SNAP_PATHS.includes(u),`${t} invalid snap path.`);const d=`${a}${l}`;return(0,r.assertIsValidSnapId)(d),{authority:"snap",snapId:d,path:u}}(c);default:throw new Error(`Expected "metamask:" URL to start with "client" or "snap", but received "${a}".`)}}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/url.cjs"}],[2866,{"./icon.cjs":2848,"./localization.cjs":2853,"./manifest/validation.cjs":2856,"./snaps.cjs":2859},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.validateFetchedSnap=void 0;const s=e("./icon.cjs"),r=e("./localization.cjs"),i=e("./manifest/validation.cjs"),a=e("./snaps.cjs");n.validateFetchedSnap=async function(e){(0,i.assertIsSnapManifest)(e.manifest.result),await(0,a.validateSnapShasum)(e),(0,r.validateSnapManifestLocalizations)(e.manifest.result,e.localizationFiles.map((e=>e.result))),e.svgIcon&&(0,s.assertIsSnapIcon)(e.svgIcon)}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/validation.cjs"}],[2867,{"@metamask/superstruct":2872,"@metamask/utils":2950,semver:5547},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.resolveVersionRange=n.getTargetVersion=n.DEFAULT_REQUESTED_SNAP_VERSION=void 0;const s=e("@metamask/superstruct"),r=e("@metamask/utils"),i=e("semver");n.DEFAULT_REQUESTED_SNAP_VERSION="*",n.getTargetVersion=function(e,t){const n=(0,i.maxSatisfying)(e,t);return n||(0,i.maxSatisfying)(e,t,{includePrerelease:!0})},n.resolveVersionRange=function(e){return e===undefined||"latest"===e?[undefined,n.DEFAULT_REQUESTED_SNAP_VERSION]:(0,s.validate)(e,r.VersionRangeStruct)}}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/versions.cjs"}],[2868,{"../deep-clone.cjs":2841,"@metamask/utils":2950,"@scure/base":3027},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.VirtualFile=void 0;const s=e("@metamask/utils"),r=e("@scure/base"),i=e("../deep-clone.cjs");class a{constructor(e){let t;t="string"==typeof e||e instanceof Uint8Array?{value:e}:e,this.value=t?.value??"",this.result=t?.result??undefined,this.data=t?.data??{},this.path=t?.path??"/"}get size(){return"string"==typeof this.value?this.value.length:this.value.byteLength}toString(e){if("string"==typeof this.value)return(0,s.assert)(e===undefined,"Tried to encode string."),this.value;if(this.value instanceof Uint8Array&&"hex"===e)return(0,s.bytesToHex)(this.value);if(this.value instanceof Uint8Array&&"base64"===e)return r.base64.encode(this.value);return new TextDecoder(e).decode(this.value)}clone(){const e=new a;return"string"==typeof this.value?e.value=this.value:e.value=this.value.slice(0),e.result=(0,i.deepClone)(this.result),e.data=(0,i.deepClone)(this.data),e.path=this.path,e}}n.VirtualFile=a}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/virtual-file/VirtualFile.cjs"}],[2869,{"./VirtualFile.cjs":2868},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){s===undefined&&(s=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,s,r)}:function(e,t,n,s){s===undefined&&(s=n),e[s]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./VirtualFile.cjs"),n)}}},{package:"@metamask/snaps-utils",file:"node_modules/@metamask/snaps-utils/dist/virtual-file/index.cjs"}]],[],{});