@metamask/snaps-execution-environments 0.32.2 → 0.33.1-flask.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +303 -0
  2. package/dist/browserify/iframe/bundle.js +453 -665
  3. package/dist/browserify/iframe/index.html +2 -2
  4. package/dist/browserify/node-process/bundle.js +276 -488
  5. package/dist/browserify/node-thread/bundle.js +276 -488
  6. package/dist/browserify/offscreen/bundle.js +162 -416
  7. package/dist/browserify/offscreen/index.html +2 -2
  8. package/dist/browserify/worker-executor/bundle.js +17874 -0
  9. package/dist/browserify/worker-pool/bundle.js +2026 -0
  10. package/dist/browserify/worker-pool/index.html +11660 -0
  11. package/dist/common/BaseSnapExecutor.d.ts +4 -4
  12. package/dist/common/BaseSnapExecutor.js +22 -22
  13. package/dist/common/BaseSnapExecutor.js.map +1 -1
  14. package/dist/common/commands.js +2 -2
  15. package/dist/common/commands.js.map +1 -1
  16. package/dist/common/endowments/commonEndowmentFactory.d.ts +5 -1
  17. package/dist/common/endowments/commonEndowmentFactory.js +2 -1
  18. package/dist/common/endowments/commonEndowmentFactory.js.map +1 -1
  19. package/dist/common/endowments/console.d.ts +45 -0
  20. package/dist/common/endowments/console.js +103 -0
  21. package/dist/common/endowments/console.js.map +1 -0
  22. package/dist/common/endowments/crypto.d.ts +4 -0
  23. package/dist/common/endowments/crypto.js +3 -1
  24. package/dist/common/endowments/crypto.js.map +1 -1
  25. package/dist/common/endowments/index.d.ts +3 -1
  26. package/dist/common/endowments/index.js +3 -3
  27. package/dist/common/endowments/index.js.map +1 -1
  28. package/dist/common/endowments/math.js +4 -1
  29. package/dist/common/endowments/math.js.map +1 -1
  30. package/dist/common/utils.js +2 -1
  31. package/dist/common/utils.js.map +1 -1
  32. package/dist/offscreen/OffscreenSnapExecutor.js +1 -1
  33. package/dist/offscreen/OffscreenSnapExecutor.js.map +1 -1
  34. package/dist/openrpc.json +2 -2
  35. package/dist/webworker/executor/WebWorkerSnapExecutor.d.ts +13 -0
  36. package/dist/webworker/executor/WebWorkerSnapExecutor.js +37 -0
  37. package/dist/webworker/executor/WebWorkerSnapExecutor.js.map +1 -0
  38. package/dist/webworker/executor/index.d.ts +1 -0
  39. package/dist/webworker/executor/index.js +10 -0
  40. package/dist/webworker/executor/index.js.map +1 -0
  41. package/dist/webworker/pool/WebWorkerPool.d.ts +22 -0
  42. package/dist/webworker/pool/WebWorkerPool.js +168 -0
  43. package/dist/webworker/pool/WebWorkerPool.js.map +1 -0
  44. package/dist/webworker/pool/index.d.ts +1 -0
  45. package/dist/webworker/pool/index.js +10 -0
  46. package/dist/webworker/pool/index.js.map +1 -0
  47. package/package.json +21 -20
@@ -1,5 +1,5 @@
1
1
  LavaPack.loadBundle([
2
- [1, {"readable-stream":35}, function(){
2
+ [1, {"readable-stream":17}, function(){
3
3
  with (this.scopeTerminator) {
4
4
  with (this.globalThis) {
5
5
  return function() {
@@ -34,7 +34,7 @@ LavaPack.loadBundle([
34
34
  'use strict';
35
35
  // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerPostMessageStream.js
36
36
  return function (require, module, exports) {
37
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebWorkerPostMessageStream=void 0;const BasePostMessageStream_1=require("../BasePostMessageStream"),utils_1=require("../utils");class WebWorkerPostMessageStream extends BasePostMessageStream_1.BasePostMessageStream{constructor(){if("undefined"==typeof self||"undefined"==typeof WorkerGlobalScope||!(self instanceof WorkerGlobalScope))throw new Error("WorkerGlobalScope not found. This class should only be instantiated in a WebWorker.");super(),this._name=utils_1.DEDICATED_WORKER_NAME,self.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const s=e.data;(0,utils_1.isValidStreamMessage)(s)&&s.target===this._name&&this._onData(s.data)}_destroy(){}}exports.WebWorkerPostMessageStream=WebWorkerPostMessageStream;
37
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebWorkerPostMessageStream=void 0;const BasePostMessageStream_1=require("../BasePostMessageStream"),utils_1=require("../utils");class WebWorkerPostMessageStream extends BasePostMessageStream_1.BasePostMessageStream{constructor(){if("undefined"==typeof self||"undefined"==typeof WorkerGlobalScope)throw new Error("WorkerGlobalScope not found. This class should only be instantiated in a WebWorker.");super(),this._name=utils_1.DEDICATED_WORKER_NAME,self.addEventListener("message",this._onMessage.bind(this)),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const s=e.data;(0,utils_1.isValidStreamMessage)(s)&&s.target===this._name&&this._onData(s.data)}_destroy(){}}exports.WebWorkerPostMessageStream=WebWorkerPostMessageStream;
38
38
 
39
39
  };
40
40
  };
@@ -69,7 +69,7 @@ LavaPack.loadBundle([
69
69
  }
70
70
  }
71
71
  }, {package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/runtime/BrowserRuntimePostMessageStream.js",}],
72
- [6, {"@metamask/utils":16}, function(){
72
+ [6, {"@metamask/utils":28}, function(){
73
73
  with (this.scopeTerminator) {
74
74
  with (this.globalThis) {
75
75
  return function() {
@@ -83,7 +83,7 @@ LavaPack.loadBundle([
83
83
  }
84
84
  }
85
85
  }, {package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/utils.js",}],
86
- [7, {"../BasePostMessageStream":1,"../utils":6,"@metamask/utils":16}, function(){
86
+ [7, {"../BasePostMessageStream":1,"../utils":6,"@metamask/utils":28}, function(){
87
87
  with (this.scopeTerminator) {
88
88
  with (this.globalThis) {
89
89
  return function() {
@@ -97,261 +97,7 @@ LavaPack.loadBundle([
97
97
  }
98
98
  }
99
99
  }, {package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/window/WindowPostMessageStream.js",}],
100
- [8, {"superstruct":129}, function(){
101
- with (this.scopeTerminator) {
102
- with (this.globalThis) {
103
- return function() {
104
- 'use strict';
105
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/assert.js
106
- return function (require, module, exports) {
107
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assertExhaustive=exports.assertStruct=exports.assert=exports.AssertionError=void 0;const superstruct_1=require("superstruct");function isErrorWithMessage(r){return"object"==typeof r&&null!==r&&"message"in r}function isConstructable(r){var s,t;return Boolean("string"==typeof(null===(t=null===(s=null==r?void 0:r.prototype)||void 0===s?void 0:s.constructor)||void 0===t?void 0:t.name))}function getErrorMessage(r){const s=isErrorWithMessage(r)?r.message:String(r);return s.endsWith(".")?s.slice(0,-1):s}function getError(r,s){return isConstructable(r)?new r({message:s}):r({message:s})}class AssertionError extends Error{constructor(r){super(r.message),this.code="ERR_ASSERTION"}}function assert(r,s="Assertion failed.",t=AssertionError){if(!r){if(s instanceof Error)throw s;throw getError(t,s)}}function assertStruct(r,s,t="Assertion failed",e=AssertionError){try{(0,superstruct_1.assert)(r,s)}catch(r){throw getError(e,`${t}: ${getErrorMessage(r)}.`)}}function assertExhaustive(r){throw new Error("Invalid branch reached. Should be detected during compilation.")}exports.AssertionError=AssertionError,exports.assert=assert,exports.assertStruct=assertStruct,exports.assertExhaustive=assertExhaustive;
108
-
109
- };
110
- };
111
- }
112
- }
113
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/assert.js",}],
114
- [9, {"./assert":8,"superstruct":129}, function(){
115
- with (this.scopeTerminator) {
116
- with (this.globalThis) {
117
- return function() {
118
- 'use strict';
119
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/base64.js
120
- return function (require, module, exports) {
121
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.base64=void 0;const superstruct_1=require("superstruct"),assert_1=require("./assert"),base64=(e,r={})=>{var s,t;const a=null!==(s=r.paddingRequired)&&void 0!==s&&s,u=null!==(t=r.characterSet)&&void 0!==t?t:"base64";let n,i;return"base64"===u?n=String.raw`[A-Za-z0-9+\/]`:((0,assert_1.assert)("base64url"===u),n=String.raw`[-_A-Za-z0-9]`),i=a?new RegExp(`^(?:${n}{4})*(?:${n}{3}=|${n}{2}==)?$`,"u"):new RegExp(`^(?:${n}{4})*(?:${n}{2,3}|${n}{3}=|${n}{2}==)?$`,"u"),(0,superstruct_1.pattern)(e,i)};exports.base64=base64;
122
-
123
- };
124
- };
125
- }
126
- }
127
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/base64.js",}],
128
- [10, {"./assert":8,"./hex":15,"buffer":64}, function(){
129
- with (this.scopeTerminator) {
130
- with (this.globalThis) {
131
- return function() {
132
- 'use strict';
133
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/bytes.js
134
- return function (require, module, exports) {
135
- (function (Buffer){(function (){
136
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createDataView=exports.concatBytes=exports.valueToBytes=exports.stringToBytes=exports.numberToBytes=exports.signedBigIntToBytes=exports.bigIntToBytes=exports.hexToBytes=exports.bytesToString=exports.bytesToNumber=exports.bytesToSignedBigInt=exports.bytesToBigInt=exports.bytesToHex=exports.assertIsBytes=exports.isBytes=void 0;const assert_1=require("./assert"),hex_1=require("./hex"),HEX_MINIMUM_NUMBER_CHARACTER=48,HEX_MAXIMUM_NUMBER_CHARACTER=58,HEX_CHARACTER_OFFSET=87;function getPrecomputedHexValuesBuilder(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}const getPrecomputedHexValues=getPrecomputedHexValuesBuilder();function isBytes(e){return e instanceof Uint8Array}function assertIsBytes(e){(0,assert_1.assert)(isBytes(e),"Value must be a Uint8Array.")}function bytesToHex(e){if(assertIsBytes(e),0===e.length)return"0x";const t=getPrecomputedHexValues(),s=new Array(e.length);for(let r=0;r<e.length;r++)s[r]=t[e[r]];return(0,hex_1.add0x)(s.join(""))}function bytesToBigInt(e){assertIsBytes(e);const t=bytesToHex(e);return BigInt(t)}function bytesToSignedBigInt(e){assertIsBytes(e);let t=BigInt(0);for(const s of e)t=(t<<BigInt(8))+BigInt(s);return BigInt.asIntN(8*e.length,t)}function bytesToNumber(e){assertIsBytes(e);const t=bytesToBigInt(e);return(0,assert_1.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}function bytesToString(e){return assertIsBytes(e),(new TextDecoder).decode(e)}function hexToBytes(e){var t;if("0x"===(null===(t=null==e?void 0:e.toLowerCase)||void 0===t?void 0:t.call(e)))return new Uint8Array;(0,hex_1.assertIsHexString)(e);const s=(0,hex_1.remove0x)(e).toLowerCase(),r=s.length%2==0?s:`0${s}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),s=r.charCodeAt(2*e+1),o=t-(t<HEX_MAXIMUM_NUMBER_CHARACTER?HEX_MINIMUM_NUMBER_CHARACTER:HEX_CHARACTER_OFFSET),i=s-(s<HEX_MAXIMUM_NUMBER_CHARACTER?HEX_MINIMUM_NUMBER_CHARACTER:HEX_CHARACTER_OFFSET);n[e]=16*o+i}return n}function bigIntToBytes(e){(0,assert_1.assert)("bigint"==typeof e,"Value must be a bigint."),(0,assert_1.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return hexToBytes(e.toString(16))}function bigIntFits(e,t){(0,assert_1.assert)(t>0);const s=e>>BigInt(31);return!((~e&s)+(e&~s)>>BigInt(8*t-1))}function signedBigIntToBytes(e,t){(0,assert_1.assert)("bigint"==typeof e,"Value must be a bigint."),(0,assert_1.assert)("number"==typeof t,"Byte length must be a number."),(0,assert_1.assert)(t>0,"Byte length must be greater than 0."),(0,assert_1.assert)(bigIntFits(e,t),"Byte length is too small to represent the given value.");let s=e;const r=new Uint8Array(t);for(let e=0;e<r.length;e++)r[e]=Number(BigInt.asUintN(8,s)),s>>=BigInt(8);return r.reverse()}function numberToBytes(e){(0,assert_1.assert)("number"==typeof e,"Value must be a number."),(0,assert_1.assert)(e>=0,"Value must be a non-negative number."),(0,assert_1.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return hexToBytes(e.toString(16))}function stringToBytes(e){return(0,assert_1.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function valueToBytes(e){if("bigint"==typeof e)return bigIntToBytes(e);if("number"==typeof e)return numberToBytes(e);if("string"==typeof e)return e.startsWith("0x")?hexToBytes(e):stringToBytes(e);if(isBytes(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}function concatBytes(e){const t=new Array(e.length);let s=0;for(let r=0;r<e.length;r++){const n=valueToBytes(e[r]);t[r]=n,s+=n.length}const r=new Uint8Array(s);for(let e=0,s=0;e<t.length;e++)r.set(t[e],s),s+=t[e].length;return r}function createDataView(e){if("undefined"!=typeof Buffer&&e instanceof Buffer){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}exports.isBytes=isBytes,exports.assertIsBytes=assertIsBytes,exports.bytesToHex=bytesToHex,exports.bytesToBigInt=bytesToBigInt,exports.bytesToSignedBigInt=bytesToSignedBigInt,exports.bytesToNumber=bytesToNumber,exports.bytesToString=bytesToString,exports.hexToBytes=hexToBytes,exports.bigIntToBytes=bigIntToBytes,exports.signedBigIntToBytes=signedBigIntToBytes,exports.numberToBytes=numberToBytes,exports.stringToBytes=stringToBytes,exports.valueToBytes=valueToBytes,exports.concatBytes=concatBytes,exports.createDataView=createDataView;
137
-
138
- }).call(this)}).call(this,require("buffer").Buffer)
139
- };
140
- };
141
- }
142
- }
143
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/bytes.js",}],
144
- [11, {"./base64":9,"superstruct":129}, function(){
145
- with (this.scopeTerminator) {
146
- with (this.globalThis) {
147
- return function() {
148
- 'use strict';
149
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/checksum.js
150
- return function (require, module, exports) {
151
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChecksumStruct=void 0;const superstruct_1=require("superstruct"),base64_1=require("./base64");exports.ChecksumStruct=(0,superstruct_1.size)((0,base64_1.base64)((0,superstruct_1.string)(),{paddingRequired:!0}),44,44);
152
-
153
- };
154
- };
155
- }
156
- }
157
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/checksum.js",}],
158
- [12, {"./assert":8,"./bytes":10,"./hex":15,"superstruct":129}, function(){
159
- with (this.scopeTerminator) {
160
- with (this.globalThis) {
161
- return function() {
162
- 'use strict';
163
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/coercers.js
164
- return function (require, module, exports) {
165
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createHex=exports.createBytes=exports.createBigInt=exports.createNumber=void 0;const superstruct_1=require("superstruct"),assert_1=require("./assert"),bytes_1=require("./bytes"),hex_1=require("./hex"),NumberLikeStruct=(0,superstruct_1.union)([(0,superstruct_1.number)(),(0,superstruct_1.bigint)(),(0,superstruct_1.string)(),hex_1.StrictHexStruct]),NumberCoercer=(0,superstruct_1.coerce)((0,superstruct_1.number)(),NumberLikeStruct,Number),BigIntCoercer=(0,superstruct_1.coerce)((0,superstruct_1.bigint)(),NumberLikeStruct,BigInt),BytesLikeStruct=(0,superstruct_1.union)([hex_1.StrictHexStruct,(0,superstruct_1.instance)(Uint8Array)]),BytesCoercer=(0,superstruct_1.coerce)((0,superstruct_1.instance)(Uint8Array),(0,superstruct_1.union)([hex_1.StrictHexStruct]),bytes_1.hexToBytes),HexCoercer=(0,superstruct_1.coerce)(hex_1.StrictHexStruct,(0,superstruct_1.instance)(Uint8Array),bytes_1.bytesToHex);function createNumber(e){try{const r=(0,superstruct_1.create)(e,NumberCoercer);return(0,assert_1.assert)(Number.isFinite(r),`Expected a number-like value, got "${e}".`),r}catch(r){if(r instanceof superstruct_1.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw r}}function createBigInt(e){try{return(0,superstruct_1.create)(e,BigIntCoercer)}catch(e){if(e instanceof superstruct_1.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}}function createBytes(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,superstruct_1.create)(e,BytesCoercer)}catch(e){if(e instanceof superstruct_1.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}function createHex(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,superstruct_1.create)(e,HexCoercer)}catch(e){if(e instanceof superstruct_1.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}exports.createNumber=createNumber,exports.createBigInt=createBigInt,exports.createBytes=createBytes,exports.createHex=createHex;
166
-
167
- };
168
- };
169
- }
170
- }
171
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/coercers.js",}],
172
- [13, {}, function(){
173
- with (this.scopeTerminator) {
174
- with (this.globalThis) {
175
- return function() {
176
- 'use strict';
177
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/collections.js
178
- return function (require, module, exports) {
179
- "use strict";var _FrozenMap_map,_FrozenSet_set,__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,r,s,a){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?a.call(e,r):a?a.value=r:t.set(e,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!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"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.FrozenSet=exports.FrozenMap=void 0;class FrozenMap{constructor(e){_FrozenMap_map.set(this,void 0),__classPrivateFieldSet(this,_FrozenMap_map,new Map(e),"f"),Object.freeze(this)}get size(){return __classPrivateFieldGet(this,_FrozenMap_map,"f").size}[(_FrozenMap_map=new WeakMap,Symbol.iterator)](){return __classPrivateFieldGet(this,_FrozenMap_map,"f")[Symbol.iterator]()}entries(){return __classPrivateFieldGet(this,_FrozenMap_map,"f").entries()}forEach(e,t){return __classPrivateFieldGet(this,_FrozenMap_map,"f").forEach(((r,s,a)=>e.call(t,r,s,this)))}get(e){return __classPrivateFieldGet(this,_FrozenMap_map,"f").get(e)}has(e){return __classPrivateFieldGet(this,_FrozenMap_map,"f").has(e)}keys(){return __classPrivateFieldGet(this,_FrozenMap_map,"f").keys()}values(){return __classPrivateFieldGet(this,_FrozenMap_map,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}exports.FrozenMap=FrozenMap;class FrozenSet{constructor(e){_FrozenSet_set.set(this,void 0),__classPrivateFieldSet(this,_FrozenSet_set,new Set(e),"f"),Object.freeze(this)}get size(){return __classPrivateFieldGet(this,_FrozenSet_set,"f").size}[(_FrozenSet_set=new WeakMap,Symbol.iterator)](){return __classPrivateFieldGet(this,_FrozenSet_set,"f")[Symbol.iterator]()}entries(){return __classPrivateFieldGet(this,_FrozenSet_set,"f").entries()}forEach(e,t){return __classPrivateFieldGet(this,_FrozenSet_set,"f").forEach(((r,s,a)=>e.call(t,r,s,this)))}has(e){return __classPrivateFieldGet(this,_FrozenSet_set,"f").has(e)}keys(){return __classPrivateFieldGet(this,_FrozenSet_set,"f").keys()}values(){return __classPrivateFieldGet(this,_FrozenSet_set,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}exports.FrozenSet=FrozenSet,Object.freeze(FrozenMap),Object.freeze(FrozenMap.prototype),Object.freeze(FrozenSet),Object.freeze(FrozenSet.prototype);
180
-
181
- };
182
- };
183
- }
184
- }
185
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/collections.js",}],
186
- [14, {}, function(){
187
- with (this.scopeTerminator) {
188
- with (this.globalThis) {
189
- return function() {
190
- 'use strict';
191
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/encryption-types.js
192
- return function (require, module, exports) {
193
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
194
-
195
- };
196
- };
197
- }
198
- }
199
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/encryption-types.js",}],
200
- [15, {"./assert":8,"superstruct":129}, function(){
201
- with (this.scopeTerminator) {
202
- with (this.globalThis) {
203
- return function() {
204
- 'use strict';
205
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/hex.js
206
- return function (require, module, exports) {
207
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.remove0x=exports.add0x=exports.assertIsStrictHexString=exports.assertIsHexString=exports.isStrictHexString=exports.isHexString=exports.StrictHexStruct=exports.HexStruct=void 0;const superstruct_1=require("superstruct"),assert_1=require("./assert");function isHexString(t){return(0,superstruct_1.is)(t,exports.HexStruct)}function isStrictHexString(t){return(0,superstruct_1.is)(t,exports.StrictHexStruct)}function assertIsHexString(t){(0,assert_1.assert)(isHexString(t),"Value must be a hexadecimal string.")}function assertIsStrictHexString(t){(0,assert_1.assert)(isStrictHexString(t),'Value must be a hexadecimal string, starting with "0x".')}function add0x(t){return t.startsWith("0x")?t:t.startsWith("0X")?`0x${t.substring(2)}`:`0x${t}`}function remove0x(t){return t.startsWith("0x")||t.startsWith("0X")?t.substring(2):t}exports.HexStruct=(0,superstruct_1.pattern)((0,superstruct_1.string)(),/^(?:0x)?[0-9a-f]+$/iu),exports.StrictHexStruct=(0,superstruct_1.pattern)((0,superstruct_1.string)(),/^0x[0-9a-f]+$/iu),exports.isHexString=isHexString,exports.isStrictHexString=isStrictHexString,exports.assertIsHexString=assertIsHexString,exports.assertIsStrictHexString=assertIsStrictHexString,exports.add0x=add0x,exports.remove0x=remove0x;
208
-
209
- };
210
- };
211
- }
212
- }
213
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/hex.js",}],
214
- [16, {"./assert":8,"./base64":9,"./bytes":10,"./checksum":11,"./coercers":12,"./collections":13,"./encryption-types":14,"./hex":15,"./json":17,"./keyring":18,"./logging":19,"./misc":20,"./number":21,"./opaque":22,"./time":23,"./transaction-types":24,"./versions":25}, function(){
215
- with (this.scopeTerminator) {
216
- with (this.globalThis) {
217
- return function() {
218
- 'use strict';
219
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/index.js
220
- return function (require, module, exports) {
221
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var i=Object.getOwnPropertyDescriptor(r,t);i&&!("get"in i?!r.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,i)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./assert"),exports),__exportStar(require("./base64"),exports),__exportStar(require("./bytes"),exports),__exportStar(require("./checksum"),exports),__exportStar(require("./coercers"),exports),__exportStar(require("./collections"),exports),__exportStar(require("./encryption-types"),exports),__exportStar(require("./hex"),exports),__exportStar(require("./json"),exports),__exportStar(require("./keyring"),exports),__exportStar(require("./logging"),exports),__exportStar(require("./misc"),exports),__exportStar(require("./number"),exports),__exportStar(require("./opaque"),exports),__exportStar(require("./time"),exports),__exportStar(require("./transaction-types"),exports),__exportStar(require("./versions"),exports);
222
-
223
- };
224
- };
225
- }
226
- }
227
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/index.js",}],
228
- [17, {"./assert":8,"superstruct":129}, function(){
229
- with (this.scopeTerminator) {
230
- with (this.globalThis) {
231
- return function() {
232
- 'use strict';
233
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/json.js
234
- return function (require, module, exports) {
235
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getJsonRpcIdValidator=exports.assertIsJsonRpcError=exports.isJsonRpcError=exports.assertIsJsonRpcFailure=exports.isJsonRpcFailure=exports.assertIsJsonRpcSuccess=exports.isJsonRpcSuccess=exports.assertIsJsonRpcResponse=exports.isJsonRpcResponse=exports.assertIsPendingJsonRpcResponse=exports.isPendingJsonRpcResponse=exports.JsonRpcResponseStruct=exports.JsonRpcFailureStruct=exports.JsonRpcSuccessStruct=exports.PendingJsonRpcResponseStruct=exports.assertIsJsonRpcRequest=exports.isJsonRpcRequest=exports.assertIsJsonRpcNotification=exports.isJsonRpcNotification=exports.JsonRpcNotificationStruct=exports.JsonRpcRequestStruct=exports.JsonRpcParamsStruct=exports.JsonRpcErrorStruct=exports.JsonRpcIdStruct=exports.JsonRpcVersionStruct=exports.jsonrpc2=exports.getJsonSize=exports.isValidJson=exports.JsonStruct=exports.UnsafeJsonStruct=void 0;const superstruct_1=require("superstruct"),assert_1=require("./assert"),finiteNumber=()=>(0,superstruct_1.define)("finite number",(s=>(0,superstruct_1.is)(s,(0,superstruct_1.number)())&&Number.isFinite(s)));function isValidJson(s){return(0,superstruct_1.is)(s,exports.JsonStruct)}function getJsonSize(s){(0,assert_1.assertStruct)(s,exports.JsonStruct,"Invalid JSON value");const t=JSON.stringify(s);return(new TextEncoder).encode(t).byteLength}function isJsonRpcNotification(s){return(0,superstruct_1.is)(s,exports.JsonRpcNotificationStruct)}function assertIsJsonRpcNotification(s,t){(0,assert_1.assertStruct)(s,exports.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)}function isJsonRpcRequest(s){return(0,superstruct_1.is)(s,exports.JsonRpcRequestStruct)}function assertIsJsonRpcRequest(s,t){(0,assert_1.assertStruct)(s,exports.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)}function isPendingJsonRpcResponse(s){return(0,superstruct_1.is)(s,exports.PendingJsonRpcResponseStruct)}function assertIsPendingJsonRpcResponse(s,t){(0,assert_1.assertStruct)(s,exports.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)}function isJsonRpcResponse(s){return(0,superstruct_1.is)(s,exports.JsonRpcResponseStruct)}function assertIsJsonRpcResponse(s,t){(0,assert_1.assertStruct)(s,exports.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)}function isJsonRpcSuccess(s){return(0,superstruct_1.is)(s,exports.JsonRpcSuccessStruct)}function assertIsJsonRpcSuccess(s,t){(0,assert_1.assertStruct)(s,exports.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)}function isJsonRpcFailure(s){return(0,superstruct_1.is)(s,exports.JsonRpcFailureStruct)}function assertIsJsonRpcFailure(s,t){(0,assert_1.assertStruct)(s,exports.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)}function isJsonRpcError(s){return(0,superstruct_1.is)(s,exports.JsonRpcErrorStruct)}function assertIsJsonRpcError(s,t){(0,assert_1.assertStruct)(s,exports.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)}function getJsonRpcIdValidator(s){const{permitEmptyString:t,permitFractions:r,permitNull:e}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},s);return s=>Boolean("number"==typeof s&&(r||Number.isInteger(s))||"string"==typeof s&&(t||s.length>0)||e&&null===s)}exports.UnsafeJsonStruct=(0,superstruct_1.union)([(0,superstruct_1.literal)(null),(0,superstruct_1.boolean)(),(0,superstruct_1.define)("finite number",(s=>(0,superstruct_1.is)(s,(0,superstruct_1.number)())&&Number.isFinite(s))),(0,superstruct_1.string)(),(0,superstruct_1.array)((0,superstruct_1.lazy)((()=>exports.UnsafeJsonStruct))),(0,superstruct_1.record)((0,superstruct_1.string)(),(0,superstruct_1.lazy)((()=>exports.UnsafeJsonStruct)))]),exports.JsonStruct=(0,superstruct_1.define)("Json",((s,t)=>{function r(s,r){const e=[...r.validator(s,t)];return!(e.length>0)||e}try{const t=r(s,exports.UnsafeJsonStruct);return!0!==t?t:r(JSON.parse(JSON.stringify(s)),exports.UnsafeJsonStruct)}catch(s){return s instanceof RangeError&&"Circular reference detected"}})),exports.isValidJson=isValidJson,exports.getJsonSize=getJsonSize,exports.jsonrpc2="2.0",exports.JsonRpcVersionStruct=(0,superstruct_1.literal)(exports.jsonrpc2),exports.JsonRpcIdStruct=(0,superstruct_1.nullable)((0,superstruct_1.union)([(0,superstruct_1.number)(),(0,superstruct_1.string)()])),exports.JsonRpcErrorStruct=(0,superstruct_1.object)({code:(0,superstruct_1.integer)(),message:(0,superstruct_1.string)(),data:(0,superstruct_1.optional)(exports.JsonStruct),stack:(0,superstruct_1.optional)((0,superstruct_1.string)())}),exports.JsonRpcParamsStruct=(0,superstruct_1.optional)((0,superstruct_1.union)([(0,superstruct_1.record)((0,superstruct_1.string)(),exports.JsonStruct),(0,superstruct_1.array)(exports.JsonStruct)])),exports.JsonRpcRequestStruct=(0,superstruct_1.object)({id:exports.JsonRpcIdStruct,jsonrpc:exports.JsonRpcVersionStruct,method:(0,superstruct_1.string)(),params:exports.JsonRpcParamsStruct}),exports.JsonRpcNotificationStruct=(0,superstruct_1.omit)(exports.JsonRpcRequestStruct,["id"]),exports.isJsonRpcNotification=isJsonRpcNotification,exports.assertIsJsonRpcNotification=assertIsJsonRpcNotification,exports.isJsonRpcRequest=isJsonRpcRequest,exports.assertIsJsonRpcRequest=assertIsJsonRpcRequest,exports.PendingJsonRpcResponseStruct=(0,superstruct_1.object)({id:exports.JsonRpcIdStruct,jsonrpc:exports.JsonRpcVersionStruct,result:(0,superstruct_1.optional)((0,superstruct_1.unknown)()),error:(0,superstruct_1.optional)(exports.JsonRpcErrorStruct)}),exports.JsonRpcSuccessStruct=(0,superstruct_1.object)({id:exports.JsonRpcIdStruct,jsonrpc:exports.JsonRpcVersionStruct,result:exports.JsonStruct}),exports.JsonRpcFailureStruct=(0,superstruct_1.object)({id:exports.JsonRpcIdStruct,jsonrpc:exports.JsonRpcVersionStruct,error:exports.JsonRpcErrorStruct}),exports.JsonRpcResponseStruct=(0,superstruct_1.union)([exports.JsonRpcSuccessStruct,exports.JsonRpcFailureStruct]),exports.isPendingJsonRpcResponse=isPendingJsonRpcResponse,exports.assertIsPendingJsonRpcResponse=assertIsPendingJsonRpcResponse,exports.isJsonRpcResponse=isJsonRpcResponse,exports.assertIsJsonRpcResponse=assertIsJsonRpcResponse,exports.isJsonRpcSuccess=isJsonRpcSuccess,exports.assertIsJsonRpcSuccess=assertIsJsonRpcSuccess,exports.isJsonRpcFailure=isJsonRpcFailure,exports.assertIsJsonRpcFailure=assertIsJsonRpcFailure,exports.isJsonRpcError=isJsonRpcError,exports.assertIsJsonRpcError=assertIsJsonRpcError,exports.getJsonRpcIdValidator=getJsonRpcIdValidator;
236
-
237
- };
238
- };
239
- }
240
- }
241
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/json.js",}],
242
- [18, {}, function(){
243
- with (this.scopeTerminator) {
244
- with (this.globalThis) {
245
- return function() {
246
- 'use strict';
247
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/keyring.js
248
- return function (require, module, exports) {
249
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
250
-
251
- };
252
- };
253
- }
254
- }
255
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/keyring.js",}],
256
- [19, {"debug":73}, function(){
257
- with (this.scopeTerminator) {
258
- with (this.globalThis) {
259
- return function() {
260
- 'use strict';
261
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/logging.js
262
- return function (require, module, exports) {
263
- "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createModuleLogger=exports.createProjectLogger=void 0;const debug_1=__importDefault(require("debug")),globalLogger=(0,debug_1.default)("metamask");function createProjectLogger(e){return globalLogger.extend(e)}function createModuleLogger(e,r){return e.extend(r)}exports.createProjectLogger=createProjectLogger,exports.createModuleLogger=createModuleLogger;
264
-
265
- };
266
- };
267
- }
268
- }
269
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/logging.js",}],
270
- [20, {}, function(){
271
- with (this.scopeTerminator) {
272
- with (this.globalThis) {
273
- return function() {
274
- 'use strict';
275
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/misc.js
276
- return function (require, module, exports) {
277
- "use strict";function isNonEmptyArray(e){return Array.isArray(e)&&e.length>0}function isNullOrUndefined(e){return null==e}function isObject(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.calculateNumberSize=exports.calculateStringSize=exports.isASCII=exports.isPlainObject=exports.ESCAPE_CHARACTERS_REGEXP=exports.JsonSize=exports.hasProperty=exports.isObject=exports.isNullOrUndefined=exports.isNonEmptyArray=void 0,exports.isNonEmptyArray=isNonEmptyArray,exports.isNullOrUndefined=isNullOrUndefined,exports.isObject=isObject;const hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t);var JsonSize;function isPlainObject(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}}function isASCII(e){return e.charCodeAt(0)<=127}function calculateStringSize(e){var t;return e.split("").reduce(((e,t)=>isASCII(t)?e+1:e+2),0)+(null!==(t=e.match(exports.ESCAPE_CHARACTERS_REGEXP))&&void 0!==t?t:[]).length}function calculateNumberSize(e){return e.toString().length}exports.hasProperty=hasProperty,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"}(JsonSize=exports.JsonSize||(exports.JsonSize={})),exports.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,exports.isPlainObject=isPlainObject,exports.isASCII=isASCII,exports.calculateStringSize=calculateStringSize,exports.calculateNumberSize=calculateNumberSize;
278
-
279
- };
280
- };
281
- }
282
- }
283
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/misc.js",}],
284
- [21, {"./assert":8,"./hex":15}, function(){
285
- with (this.scopeTerminator) {
286
- with (this.globalThis) {
287
- return function() {
288
- 'use strict';
289
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/number.js
290
- return function (require, module, exports) {
291
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexToBigInt=exports.hexToNumber=exports.bigIntToHex=exports.numberToHex=void 0;const assert_1=require("./assert"),hex_1=require("./hex"),numberToHex=e=>((0,assert_1.assert)("number"==typeof e,"Value must be a number."),(0,assert_1.assert)(e>=0,"Value must be a non-negative number."),(0,assert_1.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,hex_1.add0x)(e.toString(16)));exports.numberToHex=numberToHex;const bigIntToHex=e=>((0,assert_1.assert)("bigint"==typeof e,"Value must be a bigint."),(0,assert_1.assert)(e>=0,"Value must be a non-negative bigint."),(0,hex_1.add0x)(e.toString(16)));exports.bigIntToHex=bigIntToHex;const hexToNumber=e=>{(0,hex_1.assertIsHexString)(e);const t=parseInt(e,16);return(0,assert_1.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};exports.hexToNumber=hexToNumber;const hexToBigInt=e=>((0,hex_1.assertIsHexString)(e),BigInt((0,hex_1.add0x)(e)));exports.hexToBigInt=hexToBigInt;
292
-
293
- };
294
- };
295
- }
296
- }
297
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/number.js",}],
298
- [22, {}, function(){
299
- with (this.scopeTerminator) {
300
- with (this.globalThis) {
301
- return function() {
302
- 'use strict';
303
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/opaque.js
304
- return function (require, module, exports) {
305
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
306
-
307
- };
308
- };
309
- }
310
- }
311
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/opaque.js",}],
312
- [23, {}, function(){
313
- with (this.scopeTerminator) {
314
- with (this.globalThis) {
315
- return function() {
316
- 'use strict';
317
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/time.js
318
- return function (require, module, exports) {
319
- "use strict";var Duration;Object.defineProperty(exports,"__esModule",{value:!0}),exports.timeSince=exports.inMilliseconds=exports.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"}(Duration=exports.Duration||(exports.Duration={}));const isNonNegativeInteger=e=>Number.isInteger(e)&&e>=0,assertIsNonNegativeInteger=(e,n)=>{if(!isNonNegativeInteger(e))throw new Error(`"${n}" must be a non-negative integer. Received: "${e}".`)};function inMilliseconds(e,n){return assertIsNonNegativeInteger(e,"count"),e*n}function timeSince(e){return assertIsNonNegativeInteger(e,"timestamp"),Date.now()-e}exports.inMilliseconds=inMilliseconds,exports.timeSince=timeSince;
320
-
321
- };
322
- };
323
- }
324
- }
325
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/time.js",}],
326
- [24, {}, function(){
327
- with (this.scopeTerminator) {
328
- with (this.globalThis) {
329
- return function() {
330
- 'use strict';
331
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/transaction-types.js
332
- return function (require, module, exports) {
333
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
334
-
335
- };
336
- };
337
- }
338
- }
339
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/transaction-types.js",}],
340
- [25, {"./assert":8,"semver":112,"superstruct":129}, function(){
341
- with (this.scopeTerminator) {
342
- with (this.globalThis) {
343
- return function() {
344
- 'use strict';
345
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/versions.js
346
- return function (require, module, exports) {
347
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.satisfiesVersionRange=exports.gtRange=exports.gtVersion=exports.assertIsSemVerRange=exports.assertIsSemVerVersion=exports.isValidSemVerRange=exports.isValidSemVerVersion=exports.VersionRangeStruct=exports.VersionStruct=void 0;const semver_1=require("semver"),superstruct_1=require("superstruct"),assert_1=require("./assert");function isValidSemVerVersion(e){return(0,superstruct_1.is)(e,exports.VersionStruct)}function isValidSemVerRange(e){return(0,superstruct_1.is)(e,exports.VersionRangeStruct)}function assertIsSemVerVersion(e){(0,assert_1.assertStruct)(e,exports.VersionStruct)}function assertIsSemVerRange(e){(0,assert_1.assertStruct)(e,exports.VersionRangeStruct)}function gtVersion(e,r){return(0,semver_1.gt)(e,r)}function gtRange(e,r){return(0,semver_1.gtr)(e,r)}function satisfiesVersionRange(e,r){return(0,semver_1.satisfies)(e,r,{includePrerelease:!0})}exports.VersionStruct=(0,superstruct_1.refine)((0,superstruct_1.string)(),"Version",(e=>null!==(0,semver_1.valid)(e)||`Expected SemVer version, got "${e}"`)),exports.VersionRangeStruct=(0,superstruct_1.refine)((0,superstruct_1.string)(),"Version range",(e=>null!==(0,semver_1.validRange)(e)||`Expected SemVer range, got "${e}"`)),exports.isValidSemVerVersion=isValidSemVerVersion,exports.isValidSemVerRange=isValidSemVerRange,exports.assertIsSemVerVersion=assertIsSemVerVersion,exports.assertIsSemVerRange=assertIsSemVerRange,exports.gtVersion=gtVersion,exports.gtRange=gtRange,exports.satisfiesVersionRange=satisfiesVersionRange;
348
-
349
- };
350
- };
351
- }
352
- }
353
- }, {package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/versions.js",}],
354
- [26, {"_process":83}, function(){
100
+ [8, {"_process":64}, function(){
355
101
  with (this.scopeTerminator) {
356
102
  with (this.globalThis) {
357
103
  return function() {
@@ -367,7 +113,7 @@ LavaPack.loadBundle([
367
113
  }
368
114
  }
369
115
  }, {package:"@metamask/post-message-stream>readable-stream>process-nextick-args",file:"../../node_modules/@metamask/post-message-stream/node_modules/process-nextick-args/index.js",}],
370
- [27, {"./_stream_readable":29,"./_stream_writable":31,"core-util-is":66,"inherits":78,"process-nextick-args":26}, function(){
116
+ [9, {"./_stream_readable":11,"./_stream_writable":13,"core-util-is":48,"inherits":60,"process-nextick-args":8}, function(){
371
117
  with (this.scopeTerminator) {
372
118
  with (this.globalThis) {
373
119
  return function() {
@@ -381,7 +127,7 @@ LavaPack.loadBundle([
381
127
  }
382
128
  }
383
129
  }, {package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_duplex.js",}],
384
- [28, {"./_stream_transform":30,"core-util-is":66,"inherits":78}, function(){
130
+ [10, {"./_stream_transform":12,"core-util-is":48,"inherits":60}, function(){
385
131
  with (this.scopeTerminator) {
386
132
  with (this.globalThis) {
387
133
  return function() {
@@ -395,7 +141,7 @@ LavaPack.loadBundle([
395
141
  }
396
142
  }
397
143
  }, {package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_passthrough.js",}],
398
- [29, {"./_stream_duplex":27,"./internal/streams/BufferList":32,"./internal/streams/destroy":33,"./internal/streams/stream":34,"_process":83,"core-util-is":66,"events":75,"inherits":78,"isarray":80,"process-nextick-args":26,"safe-buffer":36,"string_decoder/":37,"util":63}, function(){
144
+ [11, {"./_stream_duplex":9,"./internal/streams/BufferList":14,"./internal/streams/destroy":15,"./internal/streams/stream":16,"_process":64,"core-util-is":48,"events":57,"inherits":60,"isarray":62,"process-nextick-args":8,"safe-buffer":18,"string_decoder/":19,"util":45}, function(){
399
145
  with (this.scopeTerminator) {
400
146
  with (this.globalThis) {
401
147
  return function() {
@@ -411,7 +157,7 @@ LavaPack.loadBundle([
411
157
  }
412
158
  }
413
159
  }, {package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_readable.js",}],
414
- [30, {"./_stream_duplex":27,"core-util-is":66,"inherits":78}, function(){
160
+ [12, {"./_stream_duplex":9,"core-util-is":48,"inherits":60}, function(){
415
161
  with (this.scopeTerminator) {
416
162
  with (this.globalThis) {
417
163
  return function() {
@@ -425,7 +171,7 @@ LavaPack.loadBundle([
425
171
  }
426
172
  }
427
173
  }, {package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_transform.js",}],
428
- [31, {"./_stream_duplex":27,"./internal/streams/destroy":33,"./internal/streams/stream":34,"_process":83,"core-util-is":66,"inherits":78,"process-nextick-args":26,"safe-buffer":36,"timers":130,"util-deprecate":131}, function(){
174
+ [13, {"./_stream_duplex":9,"./internal/streams/destroy":15,"./internal/streams/stream":16,"_process":64,"core-util-is":48,"inherits":60,"process-nextick-args":8,"safe-buffer":18,"timers":112,"util-deprecate":113}, function(){
429
175
  with (this.scopeTerminator) {
430
176
  with (this.globalThis) {
431
177
  return function() {
@@ -441,7 +187,7 @@ LavaPack.loadBundle([
441
187
  }
442
188
  }
443
189
  }, {package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_writable.js",}],
444
- [32, {"safe-buffer":36}, function(){
190
+ [14, {"safe-buffer":18}, function(){
445
191
  with (this.scopeTerminator) {
446
192
  with (this.globalThis) {
447
193
  return function() {
@@ -455,7 +201,7 @@ LavaPack.loadBundle([
455
201
  }
456
202
  }
457
203
  }, {package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js",}],
458
- [33, {"process-nextick-args":26}, function(){
204
+ [15, {"process-nextick-args":8}, function(){
459
205
  with (this.scopeTerminator) {
460
206
  with (this.globalThis) {
461
207
  return function() {
@@ -469,7 +215,7 @@ LavaPack.loadBundle([
469
215
  }
470
216
  }
471
217
  }, {package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/internal/streams/destroy.js",}],
472
- [34, {"events":75}, function(){
218
+ [16, {"events":57}, function(){
473
219
  with (this.scopeTerminator) {
474
220
  with (this.globalThis) {
475
221
  return function() {
@@ -483,7 +229,7 @@ module.exports=require("events").EventEmitter;
483
229
  }
484
230
  }
485
231
  }, {package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js",}],
486
- [35, {"./lib/_stream_duplex.js":27,"./lib/_stream_passthrough.js":28,"./lib/_stream_readable.js":29,"./lib/_stream_transform.js":30,"./lib/_stream_writable.js":31}, function(){
232
+ [17, {"./lib/_stream_duplex.js":9,"./lib/_stream_passthrough.js":10,"./lib/_stream_readable.js":11,"./lib/_stream_transform.js":12,"./lib/_stream_writable.js":13}, function(){
487
233
  with (this.scopeTerminator) {
488
234
  with (this.globalThis) {
489
235
  return function() {
@@ -497,7 +243,7 @@ exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=expor
497
243
  }
498
244
  }
499
245
  }, {package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/readable-browser.js",}],
500
- [36, {"buffer":64}, function(){
246
+ [18, {"buffer":46}, function(){
501
247
  with (this.scopeTerminator) {
502
248
  with (this.globalThis) {
503
249
  return function() {
@@ -511,7 +257,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
511
257
  }
512
258
  }
513
259
  }, {package:"@metamask/post-message-stream>readable-stream>safe-buffer",file:"../../node_modules/@metamask/post-message-stream/node_modules/safe-buffer/index.js",}],
514
- [37, {"safe-buffer":36}, function(){
260
+ [19, {"safe-buffer":18}, function(){
515
261
  with (this.scopeTerminator) {
516
262
  with (this.globalThis) {
517
263
  return function() {
@@ -525,7 +271,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
525
271
  }
526
272
  }
527
273
  }, {package:"@metamask/post-message-stream>readable-stream>string_decoder",file:"../../node_modules/@metamask/post-message-stream/node_modules/string_decoder/lib/string_decoder.js",}],
528
- [38, {"superstruct":129}, function(){
274
+ [20, {"superstruct":111}, function(){
529
275
  with (this.scopeTerminator) {
530
276
  with (this.globalThis) {
531
277
  return function() {
@@ -539,7 +285,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
539
285
  }
540
286
  }
541
287
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/assert.js",}],
542
- [39, {"./assert":38,"superstruct":129}, function(){
288
+ [21, {"./assert":20,"superstruct":111}, function(){
543
289
  with (this.scopeTerminator) {
544
290
  with (this.globalThis) {
545
291
  return function() {
@@ -553,7 +299,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
553
299
  }
554
300
  }
555
301
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/base64.js",}],
556
- [40, {"./assert":38,"./hex":45,"buffer":64}, function(){
302
+ [22, {"./assert":20,"./hex":27,"buffer":46}, function(){
557
303
  with (this.scopeTerminator) {
558
304
  with (this.globalThis) {
559
305
  return function() {
@@ -569,7 +315,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
569
315
  }
570
316
  }
571
317
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/bytes.js",}],
572
- [41, {"./base64":39,"superstruct":129}, function(){
318
+ [23, {"./base64":21,"superstruct":111}, function(){
573
319
  with (this.scopeTerminator) {
574
320
  with (this.globalThis) {
575
321
  return function() {
@@ -583,7 +329,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
583
329
  }
584
330
  }
585
331
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/checksum.js",}],
586
- [42, {"./assert":38,"./bytes":40,"./hex":45,"superstruct":129}, function(){
332
+ [24, {"./assert":20,"./bytes":22,"./hex":27,"superstruct":111}, function(){
587
333
  with (this.scopeTerminator) {
588
334
  with (this.globalThis) {
589
335
  return function() {
@@ -597,7 +343,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
597
343
  }
598
344
  }
599
345
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/coercers.js",}],
600
- [43, {}, function(){
346
+ [25, {}, function(){
601
347
  with (this.scopeTerminator) {
602
348
  with (this.globalThis) {
603
349
  return function() {
@@ -611,7 +357,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
611
357
  }
612
358
  }
613
359
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/collections.js",}],
614
- [44, {}, function(){
360
+ [26, {}, function(){
615
361
  with (this.scopeTerminator) {
616
362
  with (this.globalThis) {
617
363
  return function() {
@@ -625,7 +371,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
625
371
  }
626
372
  }
627
373
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/encryption-types.js",}],
628
- [45, {"./assert":38,"superstruct":129}, function(){
374
+ [27, {"./assert":20,"superstruct":111}, function(){
629
375
  with (this.scopeTerminator) {
630
376
  with (this.globalThis) {
631
377
  return function() {
@@ -639,7 +385,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
639
385
  }
640
386
  }
641
387
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/hex.js",}],
642
- [46, {"./assert":38,"./base64":39,"./bytes":40,"./checksum":41,"./coercers":42,"./collections":43,"./encryption-types":44,"./hex":45,"./json":47,"./keyring":48,"./logging":49,"./misc":50,"./number":51,"./opaque":52,"./time":53,"./transaction-types":54,"./versions":55}, function(){
388
+ [28, {"./assert":20,"./base64":21,"./bytes":22,"./checksum":23,"./coercers":24,"./collections":25,"./encryption-types":26,"./hex":27,"./json":29,"./keyring":30,"./logging":31,"./misc":32,"./number":33,"./opaque":34,"./time":35,"./transaction-types":36,"./versions":37}, function(){
643
389
  with (this.scopeTerminator) {
644
390
  with (this.globalThis) {
645
391
  return function() {
@@ -653,7 +399,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
653
399
  }
654
400
  }
655
401
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/index.js",}],
656
- [47, {"./assert":38,"superstruct":129}, function(){
402
+ [29, {"./assert":20,"superstruct":111}, function(){
657
403
  with (this.scopeTerminator) {
658
404
  with (this.globalThis) {
659
405
  return function() {
@@ -667,7 +413,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
667
413
  }
668
414
  }
669
415
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/json.js",}],
670
- [48, {}, function(){
416
+ [30, {}, function(){
671
417
  with (this.scopeTerminator) {
672
418
  with (this.globalThis) {
673
419
  return function() {
@@ -681,7 +427,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
681
427
  }
682
428
  }
683
429
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/keyring.js",}],
684
- [49, {"debug":73}, function(){
430
+ [31, {"debug":55}, function(){
685
431
  with (this.scopeTerminator) {
686
432
  with (this.globalThis) {
687
433
  return function() {
@@ -695,7 +441,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
695
441
  }
696
442
  }
697
443
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/logging.js",}],
698
- [50, {}, function(){
444
+ [32, {}, function(){
699
445
  with (this.scopeTerminator) {
700
446
  with (this.globalThis) {
701
447
  return function() {
@@ -709,7 +455,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
709
455
  }
710
456
  }
711
457
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/misc.js",}],
712
- [51, {"./assert":38,"./hex":45}, function(){
458
+ [33, {"./assert":20,"./hex":27}, function(){
713
459
  with (this.scopeTerminator) {
714
460
  with (this.globalThis) {
715
461
  return function() {
@@ -723,7 +469,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
723
469
  }
724
470
  }
725
471
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/number.js",}],
726
- [52, {}, function(){
472
+ [34, {}, function(){
727
473
  with (this.scopeTerminator) {
728
474
  with (this.globalThis) {
729
475
  return function() {
@@ -737,7 +483,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
737
483
  }
738
484
  }
739
485
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/opaque.js",}],
740
- [53, {}, function(){
486
+ [35, {}, function(){
741
487
  with (this.scopeTerminator) {
742
488
  with (this.globalThis) {
743
489
  return function() {
@@ -751,7 +497,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
751
497
  }
752
498
  }
753
499
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/time.js",}],
754
- [54, {}, function(){
500
+ [36, {}, function(){
755
501
  with (this.scopeTerminator) {
756
502
  with (this.globalThis) {
757
503
  return function() {
@@ -765,7 +511,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
765
511
  }
766
512
  }
767
513
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/transaction-types.js",}],
768
- [55, {"./assert":38,"semver":112,"superstruct":129}, function(){
514
+ [37, {"./assert":20,"semver":93,"superstruct":111}, function(){
769
515
  with (this.scopeTerminator) {
770
516
  with (this.globalThis) {
771
517
  return function() {
@@ -779,7 +525,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
779
525
  }
780
526
  }
781
527
  }, {package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/versions.js",}],
782
- [56, {}, function(){
528
+ [38, {}, function(){
783
529
  with (this.scopeTerminator) {
784
530
  with (this.globalThis) {
785
531
  return function() {
@@ -793,7 +539,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
793
539
  }
794
540
  }
795
541
  }, {package:"@metamask/rpc-methods>@noble/hashes",file:"../../node_modules/@noble/hashes/_assert.js",}],
796
- [57, {"./_assert.js":56,"./utils.js":60}, function(){
542
+ [39, {"./_assert.js":38,"./utils.js":42}, function(){
797
543
  with (this.scopeTerminator) {
798
544
  with (this.globalThis) {
799
545
  return function() {
@@ -807,21 +553,21 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
807
553
  }
808
554
  }
809
555
  }, {package:"@metamask/rpc-methods>@noble/hashes",file:"../../node_modules/@noble/hashes/_sha2.js",}],
810
- [58, {}, function(){
556
+ [40, {}, function(){
811
557
  with (this.scopeTerminator) {
812
558
  with (this.globalThis) {
813
559
  return function() {
814
560
  'use strict';
815
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@noble/hashes/cryptoBrowser.js
561
+ // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@noble/hashes/crypto.js
816
562
  return function (require, module, exports) {
817
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.crypto=void 0,exports.crypto={node:void 0,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0};
563
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.crypto=void 0,exports.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;
818
564
 
819
565
  };
820
566
  };
821
567
  }
822
568
  }
823
- }, {package:"@metamask/rpc-methods>@noble/hashes",file:"../../node_modules/@noble/hashes/cryptoBrowser.js",}],
824
- [59, {"./_sha2.js":57,"./utils.js":60}, function(){
569
+ }, {package:"@metamask/rpc-methods>@noble/hashes",file:"../../node_modules/@noble/hashes/crypto.js",}],
570
+ [41, {"./_sha2.js":39,"./utils.js":42}, function(){
825
571
  with (this.scopeTerminator) {
826
572
  with (this.globalThis) {
827
573
  return function() {
@@ -835,7 +581,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
835
581
  }
836
582
  }
837
583
  }, {package:"@metamask/rpc-methods>@noble/hashes",file:"../../node_modules/@noble/hashes/sha256.js",}],
838
- [60, {"@noble/hashes/crypto":58}, function(){
584
+ [42, {"@noble/hashes/crypto":40}, function(){
839
585
  with (this.scopeTerminator) {
840
586
  with (this.globalThis) {
841
587
  return function() {
@@ -843,14 +589,14 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
843
589
  // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/@noble/hashes/utils.js
844
590
  return function (require, module, exports) {
845
591
  "use strict";
846
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(exports,"__esModule",{value:!0}),/* common-shake removed: exports.randomBytes = */ /* common-shake removed: exports.wrapConstructorWithOpts = */ exports.wrapConstructor=/* common-shake removed: exports.checkOpts = */ exports.Hash=/* common-shake removed: exports.concatBytes = */ exports.toBytes=/* common-shake removed: exports.utf8ToBytes = */ /* common-shake removed: exports.asyncLoop = */ exports.nextTick=/* common-shake removed: exports.hexToBytes = */ /* common-shake removed: exports.bytesToHex = */ exports.isLE=exports.rotr=exports.createView=/* common-shake removed: exports.u32 = */ /* common-shake removed: exports.u8 = */ void 0;const crypto_1=require("@noble/hashes/crypto"),u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);/* common-shake removed: exports.u8 = */ void u8;const u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));/* common-shake removed: exports.u32 = */ void u32;const createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);exports.createView=createView;const rotr=(t,e)=>t<<32-e|t>>>e;if(exports.rotr=rotr,exports.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!exports.isLE)throw new Error("Non little-endian hardware is not supported");const hexes=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function bytesToHex(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=hexes[t[r]];return e}function hexToBytes(t){if("string"!=typeof t)throw new TypeError("hexToBytes: expected string, got "+typeof t);if(t.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const e=new Uint8Array(t.length/2);for(let r=0;r<e.length;r++){const o=2*r,n=t.slice(o,o+2),s=Number.parseInt(n,16);if(Number.isNaN(s)||s<0)throw new Error("Invalid byte sequence");e[r]=s}return e}/* common-shake removed: exports.bytesToHex = */ void bytesToHex,/* common-shake removed: exports.hexToBytes = */ void hexToBytes;const nextTick=async()=>{};async function asyncLoop(t,e,r){let o=Date.now();for(let n=0;n<t;n++){r(n);const t=Date.now()-o;t>=0&&t<e||(await(0,exports.nextTick)(),o+=t)}}function utf8ToBytes(t){if("string"!=typeof t)throw new TypeError("utf8ToBytes expected string, got "+typeof t);return(new TextEncoder).encode(t)}function toBytes(t){if("string"==typeof t&&(t=utf8ToBytes(t)),!(t instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof t})`);return t}function concatBytes(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let e=0,o=0;e<t.length;e++){const n=t[e];r.set(n,o),o+=n.length}return r}exports.nextTick=nextTick,/* common-shake removed: exports.asyncLoop = */ void asyncLoop,/* common-shake removed: exports.utf8ToBytes = */ void utf8ToBytes,exports.toBytes=toBytes,/* common-shake removed: exports.concatBytes = */ void concatBytes;class Hash{clone(){return this._cloneInto()}}exports.Hash=Hash;const isPlainObject=t=>"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object;function checkOpts(t,e){if(void 0!==e&&("object"!=typeof e||!isPlainObject(e)))throw new TypeError("Options should be object or undefined");return Object.assign(t,e)}function wrapConstructor(t){const e=e=>t().update(toBytes(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function wrapConstructorWithOpts(t){const e=(e,r)=>t(r).update(toBytes(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e}function randomBytes(t=32){if(crypto_1.crypto.web)return crypto_1.crypto.web.getRandomValues(new Uint8Array(t));if(crypto_1.crypto.node)return new Uint8Array(crypto_1.crypto.node.randomBytes(t).buffer);throw new Error("The environment doesn't have randomBytes function")}/* common-shake removed: exports.checkOpts = */ void checkOpts,exports.wrapConstructor=wrapConstructor,/* common-shake removed: exports.wrapConstructorWithOpts = */ void wrapConstructorWithOpts,/* common-shake removed: exports.randomBytes = */ void randomBytes;
592
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(exports,"__esModule",{value:!0}),/* common-shake removed: exports.randomBytes = */ /* common-shake removed: exports.wrapConstructorWithOpts = */ exports.wrapConstructor=/* common-shake removed: exports.checkOpts = */ exports.Hash=/* common-shake removed: exports.concatBytes = */ exports.toBytes=/* common-shake removed: exports.utf8ToBytes = */ /* common-shake removed: exports.asyncLoop = */ exports.nextTick=/* common-shake removed: exports.hexToBytes = */ /* common-shake removed: exports.bytesToHex = */ exports.isLE=exports.rotr=exports.createView=/* common-shake removed: exports.u32 = */ /* common-shake removed: exports.u8 = */ void 0;const crypto_1=require("@noble/hashes/crypto"),u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);/* common-shake removed: exports.u8 = */ void u8;const u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));/* common-shake removed: exports.u32 = */ void u32;const createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);exports.createView=createView;const rotr=(t,e)=>t<<32-e|t>>>e;if(exports.rotr=rotr,exports.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!exports.isLE)throw new Error("Non little-endian hardware is not supported");const hexes=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function bytesToHex(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=hexes[t[r]];return e}function hexToBytes(t){if("string"!=typeof t)throw new TypeError("hexToBytes: expected string, got "+typeof t);if(t.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const e=new Uint8Array(t.length/2);for(let r=0;r<e.length;r++){const o=2*r,n=t.slice(o,o+2),s=Number.parseInt(n,16);if(Number.isNaN(s)||s<0)throw new Error("Invalid byte sequence");e[r]=s}return e}/* common-shake removed: exports.bytesToHex = */ void bytesToHex,/* common-shake removed: exports.hexToBytes = */ void hexToBytes;const nextTick=async()=>{};async function asyncLoop(t,e,r){let o=Date.now();for(let n=0;n<t;n++){r(n);const t=Date.now()-o;t>=0&&t<e||(await(0,exports.nextTick)(),o+=t)}}function utf8ToBytes(t){if("string"!=typeof t)throw new TypeError("utf8ToBytes expected string, got "+typeof t);return(new TextEncoder).encode(t)}function toBytes(t){if("string"==typeof t&&(t=utf8ToBytes(t)),!(t instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof t})`);return t}function concatBytes(...t){if(!t.every((t=>t instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);for(let e=0,o=0;e<t.length;e++){const n=t[e];r.set(n,o),o+=n.length}return r}exports.nextTick=nextTick,/* common-shake removed: exports.asyncLoop = */ void asyncLoop,/* common-shake removed: exports.utf8ToBytes = */ void utf8ToBytes,exports.toBytes=toBytes,/* common-shake removed: exports.concatBytes = */ void concatBytes;class Hash{clone(){return this._cloneInto()}}exports.Hash=Hash;const isPlainObject=t=>"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object;function checkOpts(t,e){if(void 0!==e&&("object"!=typeof e||!isPlainObject(e)))throw new TypeError("Options should be object or undefined");return Object.assign(t,e)}function wrapConstructor(t){const e=e=>t().update(toBytes(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function wrapConstructorWithOpts(t){const e=(e,r)=>t(r).update(toBytes(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e}function randomBytes(t=32){if(crypto_1.crypto&&"function"==typeof crypto_1.crypto.getRandomValues)return crypto_1.crypto.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}/* common-shake removed: exports.checkOpts = */ void checkOpts,exports.wrapConstructor=wrapConstructor,/* common-shake removed: exports.wrapConstructorWithOpts = */ void wrapConstructorWithOpts,/* common-shake removed: exports.randomBytes = */ void randomBytes;
847
593
 
848
594
  };
849
595
  };
850
596
  }
851
597
  }
852
598
  }, {package:"@metamask/rpc-methods>@noble/hashes",file:"../../node_modules/@noble/hashes/utils.js",}],
853
- [61, {}, function(){
599
+ [43, {}, function(){
854
600
  with (this.scopeTerminator) {
855
601
  with (this.globalThis) {
856
602
  return function() {
@@ -865,7 +611,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
865
611
  }
866
612
  }
867
613
  }, {package:"@metamask/snaps-utils>@scure/base",file:"../../node_modules/@scure/base/lib/index.js",}],
868
- [62, {}, function(){
614
+ [44, {}, function(){
869
615
  with (this.scopeTerminator) {
870
616
  with (this.globalThis) {
871
617
  return function() {
@@ -879,7 +625,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
879
625
  }
880
626
  }
881
627
  }, {package:"buffer>base64-js",file:"../../node_modules/base64-js/index.js",}],
882
- [63, {}, function(){
628
+ [45, {}, function(){
883
629
  with (this.scopeTerminator) {
884
630
  with (this.globalThis) {
885
631
  return function() {
@@ -892,7 +638,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
892
638
  }
893
639
  }
894
640
  }, {package:"browserify>browser-resolve",file:"../../node_modules/browser-resolve/empty.js",}],
895
- [64, {"base64-js":62,"buffer":64,"ieee754":77}, function(){
641
+ [46, {"base64-js":44,"buffer":46,"ieee754":59}, function(){
896
642
  with (this.scopeTerminator) {
897
643
  with (this.globalThis) {
898
644
  return function() {
@@ -914,7 +660,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
914
660
  }
915
661
  }
916
662
  }, {package:"browserify>buffer",file:"../../node_modules/browserify/node_modules/buffer/index.js",}],
917
- [65, {"_process":83,"semver":112}, function(){
663
+ [47, {"_process":64,"semver":93}, function(){
918
664
  with (this.scopeTerminator) {
919
665
  with (this.globalThis) {
920
666
  return function() {
@@ -930,7 +676,7 @@ var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(f,r){for(va
930
676
  }
931
677
  }
932
678
  }, {package:"@metamask/snaps-utils>validate-npm-package-name>builtins",file:"../../node_modules/builtins/index.js",}],
933
- [66, {"../../is-buffer/index.js":79}, function(){
679
+ [48, {"../../is-buffer/index.js":61}, function(){
934
680
  with (this.scopeTerminator) {
935
681
  with (this.globalThis) {
936
682
  return function() {
@@ -946,7 +692,7 @@ function isArray(r){return Array.isArray?Array.isArray(r):"[object Array]"===obj
946
692
  }
947
693
  }
948
694
  }, {package:"browserify>readable-stream>core-util-is",file:"../../node_modules/core-util-is/lib/util.js",}],
949
- [67, {"luxon":82}, function(){
695
+ [49, {"luxon":63}, function(){
950
696
  with (this.scopeTerminator) {
951
697
  with (this.globalThis) {
952
698
  return function() {
@@ -960,7 +706,7 @@ function isArray(r){return Array.isArray?Array.isArray(r):"[object Array]"===obj
960
706
  }
961
707
  }
962
708
  }, {package:"@metamask/snaps-utils>cron-parser",file:"../../node_modules/cron-parser/lib/date.js",}],
963
- [68, {"./date":67,"./field_stringify":70}, function(){
709
+ [50, {"./date":49,"./field_stringify":52}, function(){
964
710
  with (this.scopeTerminator) {
965
711
  with (this.globalThis) {
966
712
  return function() {
@@ -974,7 +720,7 @@ function isArray(r){return Array.isArray?Array.isArray(r):"[object Array]"===obj
974
720
  }
975
721
  }
976
722
  }, {package:"@metamask/snaps-utils>cron-parser",file:"../../node_modules/cron-parser/lib/expression.js",}],
977
- [69, {}, function(){
723
+ [51, {}, function(){
978
724
  with (this.scopeTerminator) {
979
725
  with (this.globalThis) {
980
726
  return function() {
@@ -988,7 +734,7 @@ function isArray(r){return Array.isArray?Array.isArray(r):"[object Array]"===obj
988
734
  }
989
735
  }
990
736
  }, {package:"@metamask/snaps-utils>cron-parser",file:"../../node_modules/cron-parser/lib/field_compactor.js",}],
991
- [70, {"./field_compactor":69}, function(){
737
+ [52, {"./field_compactor":51}, function(){
992
738
  with (this.scopeTerminator) {
993
739
  with (this.globalThis) {
994
740
  return function() {
@@ -1002,7 +748,7 @@ function isArray(r){return Array.isArray?Array.isArray(r):"[object Array]"===obj
1002
748
  }
1003
749
  }
1004
750
  }, {package:"@metamask/snaps-utils>cron-parser",file:"../../node_modules/cron-parser/lib/field_stringify.js",}],
1005
- [71, {"./expression":68,"fs":63}, function(){
751
+ [53, {"./expression":50,"fs":45}, function(){
1006
752
  with (this.scopeTerminator) {
1007
753
  with (this.globalThis) {
1008
754
  return function() {
@@ -1016,7 +762,7 @@ function isArray(r){return Array.isArray?Array.isArray(r):"[object Array]"===obj
1016
762
  }
1017
763
  }
1018
764
  }, {package:"@metamask/snaps-utils>cron-parser",file:"../../node_modules/cron-parser/lib/parser.js",}],
1019
- [72, {}, function(){
765
+ [54, {}, function(){
1020
766
  with (this.scopeTerminator) {
1021
767
  with (this.globalThis) {
1022
768
  return function() {
@@ -1030,7 +776,7 @@ var s=1e3,m=60*s,h=60*m,d=24*h,w=7*d,y=365.25*d;function parse(e){if(!((e=String
1030
776
  }
1031
777
  }
1032
778
  }, {package:"eslint>debug>ms",file:"../../node_modules/debug/node_modules/ms/index.js",}],
1033
- [73, {"./common":74,"_process":83}, function(){
779
+ [55, {"./common":56,"_process":64}, function(){
1034
780
  with (this.scopeTerminator) {
1035
781
  with (this.globalThis) {
1036
782
  return function() {
@@ -1046,7 +792,7 @@ function useColors(){return!("undefined"==typeof window||!window.process||"rende
1046
792
  }
1047
793
  }
1048
794
  }, {package:"eslint>debug",file:"../../node_modules/debug/src/browser.js",}],
1049
- [74, {"ms":72}, function(){
795
+ [56, {"ms":54}, function(){
1050
796
  with (this.scopeTerminator) {
1051
797
  with (this.globalThis) {
1052
798
  return function() {
@@ -1060,7 +806,7 @@ function setup(e){function n(e){let r,s,o,l=null;function a(...e){if(!a.enabled)
1060
806
  }
1061
807
  }
1062
808
  }, {package:"eslint>debug",file:"../../node_modules/debug/src/common.js",}],
1063
- [75, {}, function(){
809
+ [57, {}, function(){
1064
810
  with (this.scopeTerminator) {
1065
811
  with (this.globalThis) {
1066
812
  return function() {
@@ -1074,7 +820,7 @@ function setup(e){function n(e){let r,s,o,l=null;function a(...e){if(!a.enabled)
1074
820
  }
1075
821
  }
1076
822
  }, {package:"browserify>events",file:"../../node_modules/events/events.js",}],
1077
- [76, {}, function(){
823
+ [58, {}, function(){
1078
824
  with (this.scopeTerminator) {
1079
825
  with (this.globalThis) {
1080
826
  return function() {
@@ -1088,7 +834,7 @@ function setup(e){function n(e){let r,s,o,l=null;function a(...e){if(!a.enabled)
1088
834
  }
1089
835
  }
1090
836
  }, {package:"ts-jest>fast-json-stable-stringify",file:"../../node_modules/fast-json-stable-stringify/index.js",}],
1091
- [77, {}, function(){
837
+ [59, {}, function(){
1092
838
  with (this.scopeTerminator) {
1093
839
  with (this.globalThis) {
1094
840
  return function() {
@@ -1103,7 +849,7 @@ exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-
1103
849
  }
1104
850
  }
1105
851
  }, {package:"buffer>ieee754",file:"../../node_modules/ieee754/index.js",}],
1106
- [78, {}, function(){
852
+ [60, {}, function(){
1107
853
  with (this.scopeTerminator) {
1108
854
  with (this.globalThis) {
1109
855
  return function() {
@@ -1117,7 +863,7 @@ exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-
1117
863
  }
1118
864
  }
1119
865
  }, {package:"browserify>inherits",file:"../../node_modules/inherits/inherits_browser.js",}],
1120
- [79, {}, function(){
866
+ [61, {}, function(){
1121
867
  with (this.scopeTerminator) {
1122
868
  with (this.globalThis) {
1123
869
  return function() {
@@ -1137,7 +883,7 @@ function isBuffer(f){return!!f.constructor&&"function"==typeof f.constructor.isB
1137
883
  }
1138
884
  }
1139
885
  }, {package:"browserify>insert-module-globals>is-buffer",file:"../../node_modules/is-buffer/index.js",}],
1140
- [80, {}, function(){
886
+ [62, {}, function(){
1141
887
  with (this.scopeTerminator) {
1142
888
  with (this.globalThis) {
1143
889
  return function() {
@@ -1151,21 +897,7 @@ var toString={}.toString;module.exports=Array.isArray||function(r){return"[objec
1151
897
  }
1152
898
  }
1153
899
  }, {package:"browserify>readable-stream>isarray",file:"../../node_modules/isarray/index.js",}],
1154
- [81, {"yallist":134}, function(){
1155
- with (this.scopeTerminator) {
1156
- with (this.globalThis) {
1157
- return function() {
1158
- 'use strict';
1159
- // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/lru-cache/index.js
1160
- return function (require, module, exports) {
1161
- "use strict";const Yallist=require("yallist"),MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(t){if("number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=t.max||1/0;const e=t.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof e?naiveLength:e,this[ALLOW_STALE]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=t.maxAge||0,this[DISPOSE]=t.dispose,this[NO_DISPOSE_ON_SET]=t.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[MAX]=t||1/0,trim(this)}get max(){return this[MAX]}set allowStale(t){this[ALLOW_STALE]=!!t}get allowStale(){return this[ALLOW_STALE]}set maxAge(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=t,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(t){"function"!=typeof t&&(t=naiveLength),t!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=t,this[LENGTH]=0,this[LRU_LIST].forEach((t=>{t.length=this[LENGTH_CALCULATOR](t.value,t.key),this[LENGTH]+=t.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(t,e){e=e||this;for(let s=this[LRU_LIST].tail;null!==s;){const i=s.prev;forEachStep(this,t,s,e),s=i}}forEach(t,e){e=e||this;for(let s=this[LRU_LIST].head;null!==s;){const i=s.next;forEachStep(this,t,s,e),s=i}}keys(){return this[LRU_LIST].toArray().map((t=>t.key))}values(){return this[LRU_LIST].toArray().map((t=>t.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((t=>this[DISPOSE](t.key,t.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((t=>!isStale(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[LRU_LIST]}set(t,e,s){if((s=s||this[MAX_AGE])&&"number"!=typeof s)throw new TypeError("maxAge must be a number");const i=s?Date.now():0,h=this[LENGTH_CALCULATOR](e,t);if(this[CACHE].has(t)){if(h>this[MAX])return del(this,this[CACHE].get(t)),!1;const n=this[CACHE].get(t).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](t,n.value)),n.now=i,n.maxAge=s,n.value=e,this[LENGTH]+=h-n.length,n.length=h,this.get(t),trim(this),!0}const n=new Entry(t,e,h,i,s);return n.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](t,e),!1):(this[LENGTH]+=n.length,this[LRU_LIST].unshift(n),this[CACHE].set(t,this[LRU_LIST].head),trim(this),!0)}has(t){if(!this[CACHE].has(t))return!1;const e=this[CACHE].get(t).value;return!isStale(this,e)}get(t){return get(this,t,!0)}peek(t){return get(this,t,!1)}pop(){const t=this[LRU_LIST].tail;return t?(del(this,t),t.value):null}del(t){del(this,this[CACHE].get(t))}load(t){this.reset();const e=Date.now();for(let s=t.length-1;s>=0;s--){const i=t[s],h=i.e||0;if(0===h)this.set(i.k,i.v);else{const t=h-e;t>0&&this.set(i.k,i.v,t)}}}prune(){this[CACHE].forEach(((t,e)=>get(this,e,!1)))}}const get=(t,e,s)=>{const i=t[CACHE].get(e);if(i){const e=i.value;if(isStale(t,e)){if(del(t,i),!t[ALLOW_STALE])return}else s&&(t[UPDATE_AGE_ON_GET]&&(i.value.now=Date.now()),t[LRU_LIST].unshiftNode(i));return e.value}},isStale=(t,e)=>{if(!e||!e.maxAge&&!t[MAX_AGE])return!1;const s=Date.now()-e.now;return e.maxAge?s>e.maxAge:t[MAX_AGE]&&s>t[MAX_AGE]},trim=t=>{if(t[LENGTH]>t[MAX])for(let e=t[LRU_LIST].tail;t[LENGTH]>t[MAX]&&null!==e;){const s=e.prev;del(t,e),e=s}},del=(t,e)=>{if(e){const s=e.value;t[DISPOSE]&&t[DISPOSE](s.key,s.value),t[LENGTH]-=s.length,t[CACHE].delete(s.key),t[LRU_LIST].removeNode(e)}};class Entry{constructor(t,e,s,i,h){this.key=t,this.value=e,this.length=s,this.now=i,this.maxAge=h||0}}const forEachStep=(t,e,s,i)=>{let h=s.value;isStale(t,h)&&(del(t,s),t[ALLOW_STALE]||(h=void 0)),h&&e.call(i,h.value,h.key,t)};module.exports=LRUCache;
1162
-
1163
- };
1164
- };
1165
- }
1166
- }
1167
- }, {package:"ts-jest>semver>lru-cache",file:"../../node_modules/lru-cache/index.js",}],
1168
- [82, {}, function(){
900
+ [63, {}, function(){
1169
901
  with (this.scopeTerminator) {
1170
902
  with (this.globalThis) {
1171
903
  return function() {
@@ -1179,7 +911,7 @@ var toString={}.toString;module.exports=Array.isArray||function(r){return"[objec
1179
911
  }
1180
912
  }
1181
913
  }, {package:"@metamask/snaps-utils>cron-parser>luxon",file:"../../node_modules/luxon/build/cjs-browser/luxon.js",}],
1182
- [83, {}, function(){
914
+ [64, {}, function(){
1183
915
  with (this.scopeTerminator) {
1184
916
  with (this.globalThis) {
1185
917
  return function() {
@@ -1193,7 +925,7 @@ var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defau
1193
925
  }
1194
926
  }
1195
927
  }, {package:"process",file:"../../node_modules/process/browser.js",}],
1196
- [84, {"buffer":64}, function(){
928
+ [65, {"buffer":46}, function(){
1197
929
  with (this.scopeTerminator) {
1198
930
  with (this.globalThis) {
1199
931
  return function() {
@@ -1209,7 +941,7 @@ var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defau
1209
941
  }
1210
942
  }
1211
943
  }, {package:"@metamask/snaps-utils>rfdc",file:"../../node_modules/rfdc/index.js",}],
1212
- [85, {"../functions/cmp":89,"../internal/debug":114,"../internal/parse-options":116,"../internal/re":117,"./range":86,"./semver":87}, function(){
944
+ [66, {"../functions/cmp":70,"../internal/debug":95,"../internal/parse-options":97,"../internal/re":98,"./range":67,"./semver":68}, function(){
1213
945
  with (this.scopeTerminator) {
1214
946
  with (this.globalThis) {
1215
947
  return function() {
@@ -1223,7 +955,7 @@ const ANY=Symbol("SemVer ANY");class Comparator{static get ANY(){return ANY}cons
1223
955
  }
1224
956
  }
1225
957
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/classes/comparator.js",}],
1226
- [86, {"../internal/debug":114,"../internal/parse-options":116,"../internal/re":117,"./comparator":85,"./semver":87,"lru-cache":81}, function(){
958
+ [67, {"../internal/debug":95,"../internal/parse-options":97,"../internal/re":98,"./comparator":66,"./semver":68,"lru-cache":99}, function(){
1227
959
  with (this.scopeTerminator) {
1228
960
  with (this.globalThis) {
1229
961
  return function() {
@@ -1237,7 +969,7 @@ class Range{constructor(e,r){if(r=parseOptions(r),e instanceof Range)return e.lo
1237
969
  }
1238
970
  }
1239
971
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/classes/range.js",}],
1240
- [87, {"../internal/constants":113,"../internal/debug":114,"../internal/identifiers":115,"../internal/parse-options":116,"../internal/re":117}, function(){
972
+ [68, {"../internal/constants":94,"../internal/debug":95,"../internal/identifiers":96,"../internal/parse-options":97,"../internal/re":98}, function(){
1241
973
  with (this.scopeTerminator) {
1242
974
  with (this.globalThis) {
1243
975
  return function() {
@@ -1251,7 +983,7 @@ const debug=require("../internal/debug"),{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER
1251
983
  }
1252
984
  }
1253
985
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/classes/semver.js",}],
1254
- [88, {"./parse":104}, function(){
986
+ [69, {"./parse":85}, function(){
1255
987
  with (this.scopeTerminator) {
1256
988
  with (this.globalThis) {
1257
989
  return function() {
@@ -1265,7 +997,7 @@ const parse=require("./parse"),clean=(e,r)=>{const n=parse(e.trim().replace(/^[=
1265
997
  }
1266
998
  }
1267
999
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/clean.js",}],
1268
- [89, {"./eq":95,"./gt":96,"./gte":97,"./lt":99,"./lte":100,"./neq":103}, function(){
1000
+ [70, {"./eq":76,"./gt":77,"./gte":78,"./lt":80,"./lte":81,"./neq":84}, function(){
1269
1001
  with (this.scopeTerminator) {
1270
1002
  with (this.globalThis) {
1271
1003
  return function() {
@@ -1279,7 +1011,7 @@ const eq=require("./eq"),neq=require("./neq"),gt=require("./gt"),gte=require("./
1279
1011
  }
1280
1012
  }
1281
1013
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/cmp.js",}],
1282
- [90, {"../classes/semver":87,"../internal/re":117,"./parse":104}, function(){
1014
+ [71, {"../classes/semver":68,"../internal/re":98,"./parse":85}, function(){
1283
1015
  with (this.scopeTerminator) {
1284
1016
  with (this.globalThis) {
1285
1017
  return function() {
@@ -1293,7 +1025,7 @@ const SemVer=require("../classes/semver"),parse=require("./parse"),{re:re,t:t}=r
1293
1025
  }
1294
1026
  }
1295
1027
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/coerce.js",}],
1296
- [91, {"../classes/semver":87}, function(){
1028
+ [72, {"../classes/semver":68}, function(){
1297
1029
  with (this.scopeTerminator) {
1298
1030
  with (this.globalThis) {
1299
1031
  return function() {
@@ -1307,7 +1039,7 @@ const SemVer=require("../classes/semver"),compareBuild=(e,r,m)=>{const o=new Sem
1307
1039
  }
1308
1040
  }
1309
1041
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/compare-build.js",}],
1310
- [92, {"./compare":93}, function(){
1042
+ [73, {"./compare":74}, function(){
1311
1043
  with (this.scopeTerminator) {
1312
1044
  with (this.globalThis) {
1313
1045
  return function() {
@@ -1321,7 +1053,7 @@ const compare=require("./compare"),compareLoose=(o,e)=>compare(o,e,!0);module.ex
1321
1053
  }
1322
1054
  }
1323
1055
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/compare-loose.js",}],
1324
- [93, {"../classes/semver":87}, function(){
1056
+ [74, {"../classes/semver":68}, function(){
1325
1057
  with (this.scopeTerminator) {
1326
1058
  with (this.globalThis) {
1327
1059
  return function() {
@@ -1335,7 +1067,7 @@ const SemVer=require("../classes/semver"),compare=(e,r,m)=>new SemVer(e,m).compa
1335
1067
  }
1336
1068
  }
1337
1069
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/compare.js",}],
1338
- [94, {"./eq":95,"./parse":104}, function(){
1070
+ [75, {"./eq":76,"./parse":85}, function(){
1339
1071
  with (this.scopeTerminator) {
1340
1072
  with (this.globalThis) {
1341
1073
  return function() {
@@ -1349,7 +1081,7 @@ const parse=require("./parse"),eq=require("./eq"),diff=(e,r)=>{if(eq(e,r))return
1349
1081
  }
1350
1082
  }
1351
1083
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/diff.js",}],
1352
- [95, {"./compare":93}, function(){
1084
+ [76, {"./compare":74}, function(){
1353
1085
  with (this.scopeTerminator) {
1354
1086
  with (this.globalThis) {
1355
1087
  return function() {
@@ -1363,7 +1095,7 @@ const compare=require("./compare"),eq=(e,o,r)=>0===compare(e,o,r);module.exports
1363
1095
  }
1364
1096
  }
1365
1097
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/eq.js",}],
1366
- [96, {"./compare":93}, function(){
1098
+ [77, {"./compare":74}, function(){
1367
1099
  with (this.scopeTerminator) {
1368
1100
  with (this.globalThis) {
1369
1101
  return function() {
@@ -1377,7 +1109,7 @@ const compare=require("./compare"),gt=(e,o,r)=>compare(e,o,r)>0;module.exports=g
1377
1109
  }
1378
1110
  }
1379
1111
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/gt.js",}],
1380
- [97, {"./compare":93}, function(){
1112
+ [78, {"./compare":74}, function(){
1381
1113
  with (this.scopeTerminator) {
1382
1114
  with (this.globalThis) {
1383
1115
  return function() {
@@ -1391,7 +1123,7 @@ const compare=require("./compare"),gte=(e,o,r)=>compare(e,o,r)>=0;module.exports
1391
1123
  }
1392
1124
  }
1393
1125
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/gte.js",}],
1394
- [98, {"../classes/semver":87}, function(){
1126
+ [79, {"../classes/semver":68}, function(){
1395
1127
  with (this.scopeTerminator) {
1396
1128
  with (this.globalThis) {
1397
1129
  return function() {
@@ -1405,7 +1137,7 @@ const SemVer=require("../classes/semver"),inc=(e,r,n,s)=>{"string"==typeof n&&(s
1405
1137
  }
1406
1138
  }
1407
1139
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/inc.js",}],
1408
- [99, {"./compare":93}, function(){
1140
+ [80, {"./compare":74}, function(){
1409
1141
  with (this.scopeTerminator) {
1410
1142
  with (this.globalThis) {
1411
1143
  return function() {
@@ -1419,7 +1151,7 @@ const compare=require("./compare"),lt=(e,o,r)=>compare(e,o,r)<0;module.exports=l
1419
1151
  }
1420
1152
  }
1421
1153
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/lt.js",}],
1422
- [100, {"./compare":93}, function(){
1154
+ [81, {"./compare":74}, function(){
1423
1155
  with (this.scopeTerminator) {
1424
1156
  with (this.globalThis) {
1425
1157
  return function() {
@@ -1433,7 +1165,7 @@ const compare=require("./compare"),lte=(e,o,r)=>compare(e,o,r)<=0;module.exports
1433
1165
  }
1434
1166
  }
1435
1167
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/lte.js",}],
1436
- [101, {"../classes/semver":87}, function(){
1168
+ [82, {"../classes/semver":68}, function(){
1437
1169
  with (this.scopeTerminator) {
1438
1170
  with (this.globalThis) {
1439
1171
  return function() {
@@ -1447,7 +1179,7 @@ const SemVer=require("../classes/semver"),major=(e,r)=>new SemVer(e,r).major;mod
1447
1179
  }
1448
1180
  }
1449
1181
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/major.js",}],
1450
- [102, {"../classes/semver":87}, function(){
1182
+ [83, {"../classes/semver":68}, function(){
1451
1183
  with (this.scopeTerminator) {
1452
1184
  with (this.globalThis) {
1453
1185
  return function() {
@@ -1461,7 +1193,7 @@ const SemVer=require("../classes/semver"),minor=(e,r)=>new SemVer(e,r).minor;mod
1461
1193
  }
1462
1194
  }
1463
1195
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/minor.js",}],
1464
- [103, {"./compare":93}, function(){
1196
+ [84, {"./compare":74}, function(){
1465
1197
  with (this.scopeTerminator) {
1466
1198
  with (this.globalThis) {
1467
1199
  return function() {
@@ -1475,7 +1207,7 @@ const compare=require("./compare"),neq=(e,o,r)=>0!==compare(e,o,r);module.export
1475
1207
  }
1476
1208
  }
1477
1209
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/neq.js",}],
1478
- [104, {"../classes/semver":87,"../internal/constants":113,"../internal/parse-options":116,"../internal/re":117}, function(){
1210
+ [85, {"../classes/semver":68,"../internal/constants":94,"../internal/parse-options":97,"../internal/re":98}, function(){
1479
1211
  with (this.scopeTerminator) {
1480
1212
  with (this.globalThis) {
1481
1213
  return function() {
@@ -1489,7 +1221,7 @@ const{MAX_LENGTH:MAX_LENGTH}=require("../internal/constants"),{re:re,t:t}=requir
1489
1221
  }
1490
1222
  }
1491
1223
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/parse.js",}],
1492
- [105, {"../classes/semver":87}, function(){
1224
+ [86, {"../classes/semver":68}, function(){
1493
1225
  with (this.scopeTerminator) {
1494
1226
  with (this.globalThis) {
1495
1227
  return function() {
@@ -1503,7 +1235,7 @@ const SemVer=require("../classes/semver"),patch=(e,r)=>new SemVer(e,r).patch;mod
1503
1235
  }
1504
1236
  }
1505
1237
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/patch.js",}],
1506
- [106, {"./parse":104}, function(){
1238
+ [87, {"./parse":85}, function(){
1507
1239
  with (this.scopeTerminator) {
1508
1240
  with (this.globalThis) {
1509
1241
  return function() {
@@ -1517,7 +1249,7 @@ const parse=require("./parse"),prerelease=(e,r)=>{const s=parse(e,r);return s&&s
1517
1249
  }
1518
1250
  }
1519
1251
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/prerelease.js",}],
1520
- [107, {"./compare":93}, function(){
1252
+ [88, {"./compare":74}, function(){
1521
1253
  with (this.scopeTerminator) {
1522
1254
  with (this.globalThis) {
1523
1255
  return function() {
@@ -1531,7 +1263,7 @@ const compare=require("./compare"),rcompare=(r,e,o)=>compare(e,r,o);module.expor
1531
1263
  }
1532
1264
  }
1533
1265
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/rcompare.js",}],
1534
- [108, {"./compare-build":91}, function(){
1266
+ [89, {"./compare-build":72}, function(){
1535
1267
  with (this.scopeTerminator) {
1536
1268
  with (this.globalThis) {
1537
1269
  return function() {
@@ -1545,7 +1277,7 @@ const compareBuild=require("./compare-build"),rsort=(r,o)=>r.sort(((r,e)=>compar
1545
1277
  }
1546
1278
  }
1547
1279
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/rsort.js",}],
1548
- [109, {"../classes/range":86}, function(){
1280
+ [90, {"../classes/range":67}, function(){
1549
1281
  with (this.scopeTerminator) {
1550
1282
  with (this.globalThis) {
1551
1283
  return function() {
@@ -1559,7 +1291,7 @@ const Range=require("../classes/range"),satisfies=(e,s,t)=>{try{s=new Range(s,t)
1559
1291
  }
1560
1292
  }
1561
1293
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/satisfies.js",}],
1562
- [110, {"./compare-build":91}, function(){
1294
+ [91, {"./compare-build":72}, function(){
1563
1295
  with (this.scopeTerminator) {
1564
1296
  with (this.globalThis) {
1565
1297
  return function() {
@@ -1573,7 +1305,7 @@ const compareBuild=require("./compare-build"),sort=(o,r)=>o.sort(((o,e)=>compare
1573
1305
  }
1574
1306
  }
1575
1307
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/sort.js",}],
1576
- [111, {"./parse":104}, function(){
1308
+ [92, {"./parse":85}, function(){
1577
1309
  with (this.scopeTerminator) {
1578
1310
  with (this.globalThis) {
1579
1311
  return function() {
@@ -1587,7 +1319,7 @@ const parse=require("./parse"),valid=(e,r)=>{const s=parse(e,r);return s?s.versi
1587
1319
  }
1588
1320
  }
1589
1321
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/functions/valid.js",}],
1590
- [112, {"./classes/comparator":85,"./classes/range":86,"./classes/semver":87,"./functions/clean":88,"./functions/cmp":89,"./functions/coerce":90,"./functions/compare":93,"./functions/compare-build":91,"./functions/compare-loose":92,"./functions/diff":94,"./functions/eq":95,"./functions/gt":96,"./functions/gte":97,"./functions/inc":98,"./functions/lt":99,"./functions/lte":100,"./functions/major":101,"./functions/minor":102,"./functions/neq":103,"./functions/parse":104,"./functions/patch":105,"./functions/prerelease":106,"./functions/rcompare":107,"./functions/rsort":108,"./functions/satisfies":109,"./functions/sort":110,"./functions/valid":111,"./internal/constants":113,"./internal/identifiers":115,"./internal/re":117,"./ranges/gtr":118,"./ranges/intersects":119,"./ranges/ltr":120,"./ranges/max-satisfying":121,"./ranges/min-satisfying":122,"./ranges/min-version":123,"./ranges/outside":124,"./ranges/simplify":125,"./ranges/subset":126,"./ranges/to-comparators":127,"./ranges/valid":128}, function(){
1322
+ [93, {"./classes/comparator":66,"./classes/range":67,"./classes/semver":68,"./functions/clean":69,"./functions/cmp":70,"./functions/coerce":71,"./functions/compare":74,"./functions/compare-build":72,"./functions/compare-loose":73,"./functions/diff":75,"./functions/eq":76,"./functions/gt":77,"./functions/gte":78,"./functions/inc":79,"./functions/lt":80,"./functions/lte":81,"./functions/major":82,"./functions/minor":83,"./functions/neq":84,"./functions/parse":85,"./functions/patch":86,"./functions/prerelease":87,"./functions/rcompare":88,"./functions/rsort":89,"./functions/satisfies":90,"./functions/sort":91,"./functions/valid":92,"./internal/constants":94,"./internal/identifiers":96,"./internal/re":98,"./ranges/gtr":100,"./ranges/intersects":101,"./ranges/ltr":102,"./ranges/max-satisfying":103,"./ranges/min-satisfying":104,"./ranges/min-version":105,"./ranges/outside":106,"./ranges/simplify":107,"./ranges/subset":108,"./ranges/to-comparators":109,"./ranges/valid":110}, function(){
1591
1323
  with (this.scopeTerminator) {
1592
1324
  with (this.globalThis) {
1593
1325
  return function() {
@@ -1601,7 +1333,7 @@ const internalRe=require("./internal/re"),constants=require("./internal/constant
1601
1333
  }
1602
1334
  }
1603
1335
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/index.js",}],
1604
- [113, {}, function(){
1336
+ [94, {}, function(){
1605
1337
  with (this.scopeTerminator) {
1606
1338
  with (this.globalThis) {
1607
1339
  return function() {
@@ -1615,7 +1347,7 @@ const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH=256,MAX_SAFE_INTEGER=Number.MAX_SAF
1615
1347
  }
1616
1348
  }
1617
1349
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/internal/constants.js",}],
1618
- [114, {"_process":83}, function(){
1350
+ [95, {"_process":64}, function(){
1619
1351
  with (this.scopeTerminator) {
1620
1352
  with (this.globalThis) {
1621
1353
  return function() {
@@ -1631,7 +1363,7 @@ const debug="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bse
1631
1363
  }
1632
1364
  }
1633
1365
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/internal/debug.js",}],
1634
- [115, {}, function(){
1366
+ [96, {}, function(){
1635
1367
  with (this.scopeTerminator) {
1636
1368
  with (this.globalThis) {
1637
1369
  return function() {
@@ -1645,7 +1377,7 @@ const numeric=/^[0-9]+$/,compareIdentifiers=(e,r)=>{const i=numeric.test(e),t=nu
1645
1377
  }
1646
1378
  }
1647
1379
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/internal/identifiers.js",}],
1648
- [116, {}, function(){
1380
+ [97, {}, function(){
1649
1381
  with (this.scopeTerminator) {
1650
1382
  with (this.globalThis) {
1651
1383
  return function() {
@@ -1659,7 +1391,7 @@ const opts=["includePrerelease","loose","rtl"],parseOptions=e=>e?"object"!=typeo
1659
1391
  }
1660
1392
  }
1661
1393
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/internal/parse-options.js",}],
1662
- [117, {"./constants":113,"./debug":114}, function(){
1394
+ [98, {"./constants":94,"./debug":95}, function(){
1663
1395
  with (this.scopeTerminator) {
1664
1396
  with (this.globalThis) {
1665
1397
  return function() {
@@ -1673,7 +1405,21 @@ const{MAX_SAFE_COMPONENT_LENGTH:MAX_SAFE_COMPONENT_LENGTH}=require("./constants"
1673
1405
  }
1674
1406
  }
1675
1407
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/internal/re.js",}],
1676
- [118, {"./outside":124}, function(){
1408
+ [99, {"yallist":116}, function(){
1409
+ with (this.scopeTerminator) {
1410
+ with (this.globalThis) {
1411
+ return function() {
1412
+ 'use strict';
1413
+ // source: /home/runner/work/snaps-monorepo/snaps-monorepo/node_modules/semver/node_modules/lru-cache/index.js
1414
+ return function (require, module, exports) {
1415
+ "use strict";const Yallist=require("yallist"),MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(t){if("number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=t.max||1/0;const e=t.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof e?naiveLength:e,this[ALLOW_STALE]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=t.maxAge||0,this[DISPOSE]=t.dispose,this[NO_DISPOSE_ON_SET]=t.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[MAX]=t||1/0,trim(this)}get max(){return this[MAX]}set allowStale(t){this[ALLOW_STALE]=!!t}get allowStale(){return this[ALLOW_STALE]}set maxAge(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=t,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(t){"function"!=typeof t&&(t=naiveLength),t!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=t,this[LENGTH]=0,this[LRU_LIST].forEach((t=>{t.length=this[LENGTH_CALCULATOR](t.value,t.key),this[LENGTH]+=t.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(t,e){e=e||this;for(let s=this[LRU_LIST].tail;null!==s;){const i=s.prev;forEachStep(this,t,s,e),s=i}}forEach(t,e){e=e||this;for(let s=this[LRU_LIST].head;null!==s;){const i=s.next;forEachStep(this,t,s,e),s=i}}keys(){return this[LRU_LIST].toArray().map((t=>t.key))}values(){return this[LRU_LIST].toArray().map((t=>t.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((t=>this[DISPOSE](t.key,t.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((t=>!isStale(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[LRU_LIST]}set(t,e,s){if((s=s||this[MAX_AGE])&&"number"!=typeof s)throw new TypeError("maxAge must be a number");const i=s?Date.now():0,h=this[LENGTH_CALCULATOR](e,t);if(this[CACHE].has(t)){if(h>this[MAX])return del(this,this[CACHE].get(t)),!1;const n=this[CACHE].get(t).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](t,n.value)),n.now=i,n.maxAge=s,n.value=e,this[LENGTH]+=h-n.length,n.length=h,this.get(t),trim(this),!0}const n=new Entry(t,e,h,i,s);return n.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](t,e),!1):(this[LENGTH]+=n.length,this[LRU_LIST].unshift(n),this[CACHE].set(t,this[LRU_LIST].head),trim(this),!0)}has(t){if(!this[CACHE].has(t))return!1;const e=this[CACHE].get(t).value;return!isStale(this,e)}get(t){return get(this,t,!0)}peek(t){return get(this,t,!1)}pop(){const t=this[LRU_LIST].tail;return t?(del(this,t),t.value):null}del(t){del(this,this[CACHE].get(t))}load(t){this.reset();const e=Date.now();for(let s=t.length-1;s>=0;s--){const i=t[s],h=i.e||0;if(0===h)this.set(i.k,i.v);else{const t=h-e;t>0&&this.set(i.k,i.v,t)}}}prune(){this[CACHE].forEach(((t,e)=>get(this,e,!1)))}}const get=(t,e,s)=>{const i=t[CACHE].get(e);if(i){const e=i.value;if(isStale(t,e)){if(del(t,i),!t[ALLOW_STALE])return}else s&&(t[UPDATE_AGE_ON_GET]&&(i.value.now=Date.now()),t[LRU_LIST].unshiftNode(i));return e.value}},isStale=(t,e)=>{if(!e||!e.maxAge&&!t[MAX_AGE])return!1;const s=Date.now()-e.now;return e.maxAge?s>e.maxAge:t[MAX_AGE]&&s>t[MAX_AGE]},trim=t=>{if(t[LENGTH]>t[MAX])for(let e=t[LRU_LIST].tail;t[LENGTH]>t[MAX]&&null!==e;){const s=e.prev;del(t,e),e=s}},del=(t,e)=>{if(e){const s=e.value;t[DISPOSE]&&t[DISPOSE](s.key,s.value),t[LENGTH]-=s.length,t[CACHE].delete(s.key),t[LRU_LIST].removeNode(e)}};class Entry{constructor(t,e,s,i,h){this.key=t,this.value=e,this.length=s,this.now=i,this.maxAge=h||0}}const forEachStep=(t,e,s,i)=>{let h=s.value;isStale(t,h)&&(del(t,s),t[ALLOW_STALE]||(h=void 0)),h&&e.call(i,h.value,h.key,t)};module.exports=LRUCache;
1416
+
1417
+ };
1418
+ };
1419
+ }
1420
+ }
1421
+ }, {package:"ts-jest>semver>lru-cache",file:"../../node_modules/semver/node_modules/lru-cache/index.js",}],
1422
+ [100, {"./outside":106}, function(){
1677
1423
  with (this.scopeTerminator) {
1678
1424
  with (this.globalThis) {
1679
1425
  return function() {
@@ -1687,7 +1433,7 @@ const outside=require("./outside"),gtr=(e,t,o)=>outside(e,t,">",o);module.export
1687
1433
  }
1688
1434
  }
1689
1435
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/gtr.js",}],
1690
- [119, {"../classes/range":86}, function(){
1436
+ [101, {"../classes/range":67}, function(){
1691
1437
  with (this.scopeTerminator) {
1692
1438
  with (this.globalThis) {
1693
1439
  return function() {
@@ -1701,7 +1447,7 @@ const Range=require("../classes/range"),intersects=(e,s,n)=>(e=new Range(e,n),s=
1701
1447
  }
1702
1448
  }
1703
1449
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/intersects.js",}],
1704
- [120, {"./outside":124}, function(){
1450
+ [102, {"./outside":106}, function(){
1705
1451
  with (this.scopeTerminator) {
1706
1452
  with (this.globalThis) {
1707
1453
  return function() {
@@ -1715,7 +1461,7 @@ const outside=require("./outside"),ltr=(e,t,o)=>outside(e,t,"<",o);module.export
1715
1461
  }
1716
1462
  }
1717
1463
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/ltr.js",}],
1718
- [121, {"../classes/range":86,"../classes/semver":87}, function(){
1464
+ [103, {"../classes/range":67,"../classes/semver":68}, function(){
1719
1465
  with (this.scopeTerminator) {
1720
1466
  with (this.globalThis) {
1721
1467
  return function() {
@@ -1729,7 +1475,7 @@ const SemVer=require("../classes/semver"),Range=require("../classes/range"),maxS
1729
1475
  }
1730
1476
  }
1731
1477
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/max-satisfying.js",}],
1732
- [122, {"../classes/range":86,"../classes/semver":87}, function(){
1478
+ [104, {"../classes/range":67,"../classes/semver":68}, function(){
1733
1479
  with (this.scopeTerminator) {
1734
1480
  with (this.globalThis) {
1735
1481
  return function() {
@@ -1743,7 +1489,7 @@ const SemVer=require("../classes/semver"),Range=require("../classes/range"),minS
1743
1489
  }
1744
1490
  }
1745
1491
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/min-satisfying.js",}],
1746
- [123, {"../classes/range":86,"../classes/semver":87,"../functions/gt":96}, function(){
1492
+ [105, {"../classes/range":67,"../classes/semver":68,"../functions/gt":77}, function(){
1747
1493
  with (this.scopeTerminator) {
1748
1494
  with (this.globalThis) {
1749
1495
  return function() {
@@ -1757,7 +1503,7 @@ const SemVer=require("../classes/semver"),Range=require("../classes/range"),gt=r
1757
1503
  }
1758
1504
  }
1759
1505
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/min-version.js",}],
1760
- [124, {"../classes/comparator":85,"../classes/range":86,"../classes/semver":87,"../functions/gt":96,"../functions/gte":97,"../functions/lt":99,"../functions/lte":100,"../functions/satisfies":109}, function(){
1506
+ [106, {"../classes/comparator":66,"../classes/range":67,"../classes/semver":68,"../functions/gt":77,"../functions/gte":78,"../functions/lt":80,"../functions/lte":81,"../functions/satisfies":90}, function(){
1761
1507
  with (this.scopeTerminator) {
1762
1508
  with (this.globalThis) {
1763
1509
  return function() {
@@ -1771,7 +1517,7 @@ const SemVer=require("../classes/semver"),Comparator=require("../classes/compara
1771
1517
  }
1772
1518
  }
1773
1519
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/outside.js",}],
1774
- [125, {"../functions/compare.js":93,"../functions/satisfies.js":109}, function(){
1520
+ [107, {"../functions/compare.js":74,"../functions/satisfies.js":90}, function(){
1775
1521
  with (this.scopeTerminator) {
1776
1522
  with (this.globalThis) {
1777
1523
  return function() {
@@ -1785,7 +1531,7 @@ const satisfies=require("../functions/satisfies.js"),compare=require("../functio
1785
1531
  }
1786
1532
  }
1787
1533
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/simplify.js",}],
1788
- [126, {"../classes/comparator.js":85,"../classes/range.js":86,"../functions/compare.js":93,"../functions/satisfies.js":109}, function(){
1534
+ [108, {"../classes/comparator.js":66,"../classes/range.js":67,"../functions/compare.js":74,"../functions/satisfies.js":90}, function(){
1789
1535
  with (this.scopeTerminator) {
1790
1536
  with (this.globalThis) {
1791
1537
  return function() {
@@ -1799,7 +1545,7 @@ const Range=require("../classes/range.js"),Comparator=require("../classes/compar
1799
1545
  }
1800
1546
  }
1801
1547
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/subset.js",}],
1802
- [127, {"../classes/range":86}, function(){
1548
+ [109, {"../classes/range":67}, function(){
1803
1549
  with (this.scopeTerminator) {
1804
1550
  with (this.globalThis) {
1805
1551
  return function() {
@@ -1813,7 +1559,7 @@ const Range=require("../classes/range"),toComparators=(a,e)=>new Range(a,e).set.
1813
1559
  }
1814
1560
  }
1815
1561
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/to-comparators.js",}],
1816
- [128, {"../classes/range":86}, function(){
1562
+ [110, {"../classes/range":67}, function(){
1817
1563
  with (this.scopeTerminator) {
1818
1564
  with (this.globalThis) {
1819
1565
  return function() {
@@ -1827,7 +1573,7 @@ const Range=require("../classes/range"),validRange=(e,n)=>{try{return new Range(
1827
1573
  }
1828
1574
  }
1829
1575
  }, {package:"ts-jest>semver",file:"../../node_modules/semver/ranges/valid.js",}],
1830
- [129, {}, function(){
1576
+ [111, {}, function(){
1831
1577
  with (this.scopeTerminator) {
1832
1578
  with (this.globalThis) {
1833
1579
  return function() {
@@ -1841,7 +1587,7 @@ const Range=require("../classes/range"),validRange=(e,n)=>{try{return new Range(
1841
1587
  }
1842
1588
  }
1843
1589
  }, {package:"superstruct",file:"../../node_modules/superstruct/dist/index.cjs",}],
1844
- [130, {"process/browser.js":83,"timers":130}, function(){
1590
+ [112, {"process/browser.js":64,"timers":112}, function(){
1845
1591
  with (this.scopeTerminator) {
1846
1592
  with (this.globalThis) {
1847
1593
  return function() {
@@ -1857,7 +1603,7 @@ var nextTick=require("process/browser.js").nextTick,apply=Function.prototype.app
1857
1603
  }
1858
1604
  }
1859
1605
  }, {package:"browserify>timers-browserify",file:"../../node_modules/timers-browserify/main.js",}],
1860
- [131, {}, function(){
1606
+ [113, {}, function(){
1861
1607
  with (this.scopeTerminator) {
1862
1608
  with (this.globalThis) {
1863
1609
  return function() {
@@ -1871,7 +1617,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
1871
1617
  }
1872
1618
  }
1873
1619
  }, {package:"browserify>readable-stream>util-deprecate",file:"../../node_modules/util-deprecate/browser.js",}],
1874
- [132, {"builtins":65}, function(){
1620
+ [114, {"builtins":47}, function(){
1875
1621
  with (this.scopeTerminator) {
1876
1622
  with (this.globalThis) {
1877
1623
  return function() {
@@ -1885,7 +1631,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
1885
1631
  }
1886
1632
  }
1887
1633
  }, {package:"@metamask/snaps-utils>validate-npm-package-name",file:"../../node_modules/validate-npm-package-name/lib/index.js",}],
1888
- [133, {}, function(){
1634
+ [115, {}, function(){
1889
1635
  with (this.scopeTerminator) {
1890
1636
  with (this.globalThis) {
1891
1637
  return function() {
@@ -1899,7 +1645,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
1899
1645
  }
1900
1646
  }
1901
1647
  }, {package:"ts-jest>semver>lru-cache>yallist",file:"../../node_modules/yallist/iterator.js",}],
1902
- [134, {"./iterator.js":133}, function(){
1648
+ [116, {"./iterator.js":115}, function(){
1903
1649
  with (this.scopeTerminator) {
1904
1650
  with (this.globalThis) {
1905
1651
  return function() {
@@ -1913,7 +1659,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
1913
1659
  }
1914
1660
  }
1915
1661
  }, {package:"ts-jest>semver>lru-cache>yallist",file:"../../node_modules/yallist/yallist.js",}],
1916
- [135, {"@metamask/utils":46}, function(){
1662
+ [117, {"@metamask/utils":28}, function(){
1917
1663
  with (this.scopeTerminator) {
1918
1664
  with (this.globalThis) {
1919
1665
  return function() {
@@ -1927,7 +1673,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
1927
1673
  }
1928
1674
  }
1929
1675
  }, {package:"$root$",file:"src/common/lockdown/lockdown-events.ts",}],
1930
- [136, {"./../../../../snaps-utils/src/index.browser":147}, function(){
1676
+ [118, {"./../../../../snaps-utils/src/index.browser":129}, function(){
1931
1677
  with (this.scopeTerminator) {
1932
1678
  with (this.globalThis) {
1933
1679
  return function() {
@@ -1941,21 +1687,21 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
1941
1687
  }
1942
1688
  }
1943
1689
  }, {package:"$root$",file:"src/common/lockdown/lockdown-more.ts",}],
1944
- [137, {"./../../../snaps-utils/src/index.browser":147,"@metamask/post-message-stream":4,"@metamask/utils":46}, function(){
1690
+ [119, {"./../../../snaps-utils/src/index.browser":129,"@metamask/post-message-stream":4,"@metamask/utils":28}, function(){
1945
1691
  with (this.scopeTerminator) {
1946
1692
  with (this.globalThis) {
1947
1693
  return function() {
1948
1694
  'use strict';
1949
1695
  // source: /home/runner/work/snaps-monorepo/snaps-monorepo/packages/snaps-execution-environments/src/offscreen/OffscreenSnapExecutor.ts
1950
1696
  return function (require, module, exports) {
1951
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.OffscreenSnapExecutor=void 0;var _postMessageStream=require("@metamask/post-message-stream"),_index=require("./../../../snaps-utils/src/index.browser"),_utils=require("@metamask/utils");function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _defineProperty(e,t,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _classPrivateFieldInitSpec(e,t,i){_checkPrivateRedeclaration(e,t),t.set(e,i)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(e,t,i){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(e,t){return _classApplyDescriptorGet(e,_classExtractFieldDescriptor(e,t,"get"))}function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}function _classPrivateFieldSet(e,t,i){return _classApplyDescriptorSet(e,_classExtractFieldDescriptor(e,t,"set"),i),i}function _classExtractFieldDescriptor(e,t,i){if(!t.has(e))throw new TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function _classApplyDescriptorSet(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}var _stream=new WeakMap,_onData=new WeakSet,_initializeJob=new WeakSet,_terminateJob=new WeakSet;class OffscreenSnapExecutor{static initialize(e){return new OffscreenSnapExecutor(e)}constructor(e){_classPrivateMethodInitSpec(this,_terminateJob),_classPrivateMethodInitSpec(this,_initializeJob),_classPrivateMethodInitSpec(this,_onData),_classPrivateFieldInitSpec(this,_stream,{writable:!0,value:void 0}),_defineProperty(this,"jobs",{}),_classPrivateFieldSet(this,_stream,e),_classPrivateFieldGet(this,_stream).on("data",_classPrivateMethodGet(this,_onData,_onData2).bind(this))}}function _onData2(e){const{jobId:t,frameUrl:i,data:r}=e;this.jobs[t]?"terminateJob"!==r.method?this.jobs[t].stream.write(r):_classPrivateMethodGet(this,_terminateJob,_terminateJob2).call(this,t):_classPrivateMethodGet(this,_initializeJob,_initializeJob2).call(this,t,i).then((()=>{_classPrivateMethodGet(this,_onData,_onData2).call(this,e)})).catch((e=>{(0,_index.logError)("[Worker] Error initializing job:",e)}))}async function _initializeJob2(e,t){const i=await(0,_index.createWindow)(t,e),r=new _postMessageStream.WindowPostMessageStream({name:"parent",target:"child",targetWindow:i,targetOrigin:"*"});return r.on("data",(t=>{_classPrivateFieldGet(this,_stream).write({data:t,jobId:e})})),this.jobs[e]={id:e,window:i,stream:r},this.jobs[e]}function _terminateJob2(e){(0,_utils.assert)(this.jobs[e],`Job "${e}" not found.`);const t=document.getElementById(e);(0,_utils.assert)(t,`Iframe with ID "${e}" not found.`),t.remove(),this.jobs[e].stream.destroy(),delete this.jobs[e]}exports.OffscreenSnapExecutor=OffscreenSnapExecutor;
1697
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.OffscreenSnapExecutor=void 0;var _postMessageStream=require("@metamask/post-message-stream"),_index=require("./../../../snaps-utils/src/index.browser"),_utils=require("@metamask/utils");function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _defineProperty(e,t,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _classPrivateFieldInitSpec(e,t,i){_checkPrivateRedeclaration(e,t),t.set(e,i)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(e,t,i){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(e,t){return _classApplyDescriptorGet(e,_classExtractFieldDescriptor(e,t,"get"))}function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}function _classPrivateFieldSet(e,t,i){return _classApplyDescriptorSet(e,_classExtractFieldDescriptor(e,t,"set"),i),i}function _classExtractFieldDescriptor(e,t,i){if(!t.has(e))throw new TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function _classApplyDescriptorSet(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}var _stream=new WeakMap,_onData=new WeakSet,_initializeJob=new WeakSet,_terminateJob=new WeakSet;class OffscreenSnapExecutor{static initialize(e){return new OffscreenSnapExecutor(e)}constructor(e){_classPrivateMethodInitSpec(this,_terminateJob),_classPrivateMethodInitSpec(this,_initializeJob),_classPrivateMethodInitSpec(this,_onData),_classPrivateFieldInitSpec(this,_stream,{writable:!0,value:void 0}),_defineProperty(this,"jobs",{}),_classPrivateFieldSet(this,_stream,e),_classPrivateFieldGet(this,_stream).on("data",_classPrivateMethodGet(this,_onData,_onData2).bind(this))}}function _onData2(e){const{jobId:t,extra:{frameUrl:i},data:r}=e;this.jobs[t]?"terminateJob"!==r.method?this.jobs[t].stream.write(r):_classPrivateMethodGet(this,_terminateJob,_terminateJob2).call(this,t):_classPrivateMethodGet(this,_initializeJob,_initializeJob2).call(this,t,i).then((()=>{_classPrivateMethodGet(this,_onData,_onData2).call(this,e)})).catch((e=>{(0,_index.logError)("[Worker] Error initializing job:",e)}))}async function _initializeJob2(e,t){const i=await(0,_index.createWindow)(t,e),r=new _postMessageStream.WindowPostMessageStream({name:"parent",target:"child",targetWindow:i,targetOrigin:"*"});return r.on("data",(t=>{_classPrivateFieldGet(this,_stream).write({data:t,jobId:e})})),this.jobs[e]={id:e,window:i,stream:r},this.jobs[e]}function _terminateJob2(e){(0,_utils.assert)(this.jobs[e],`Job "${e}" not found.`);const t=document.getElementById(e);(0,_utils.assert)(t,`Iframe with ID "${e}" not found.`),t.remove(),this.jobs[e].stream.destroy(),delete this.jobs[e]}exports.OffscreenSnapExecutor=OffscreenSnapExecutor;
1952
1698
 
1953
1699
  };
1954
1700
  };
1955
1701
  }
1956
1702
  }
1957
1703
  }, {package:"$root$",file:"src/offscreen/OffscreenSnapExecutor.ts",}],
1958
- [138, {"../common/lockdown/lockdown-events":135,"../common/lockdown/lockdown-more":136,"./OffscreenSnapExecutor":137,"@metamask/post-message-stream":4}, function(){
1704
+ [120, {"../common/lockdown/lockdown-events":117,"../common/lockdown/lockdown-more":118,"./OffscreenSnapExecutor":119,"@metamask/post-message-stream":4}, function(){
1959
1705
  with (this.scopeTerminator) {
1960
1706
  with (this.globalThis) {
1961
1707
  return function() {
@@ -1969,21 +1715,21 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
1969
1715
  }
1970
1716
  }
1971
1717
  }, {package:"$root$",file:"src/offscreen/index.ts",}],
1972
- [139, {}, function(){
1718
+ [121, {}, function(){
1973
1719
  with (this.scopeTerminator) {
1974
1720
  with (this.globalThis) {
1975
1721
  return function() {
1976
1722
  'use strict';
1977
1723
  // source: /home/runner/work/snaps-monorepo/snaps-monorepo/packages/snaps-utils/src/caveats.ts
1978
1724
  return function (require, module, exports) {
1979
- "use strict";let SnapCaveatType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnapCaveatType=void 0,exports.SnapCaveatType=SnapCaveatType,function(e){e.PermittedDerivationPaths="permittedDerivationPaths",e.PermittedCoinTypes="permittedCoinTypes",e.SnapKeyring="snapKeyring",e.SnapCronjob="snapCronjob",e.TransactionOrigin="transactionOrigin",e.RpcOrigin="rpcOrigin",e.SnapIds="snapIds"}(SnapCaveatType||(exports.SnapCaveatType=SnapCaveatType={}));
1725
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnapCaveatType=void 0;let SnapCaveatType=function(e){return e.PermittedDerivationPaths="permittedDerivationPaths",e.PermittedCoinTypes="permittedCoinTypes",e.SnapKeyring="snapKeyring",e.SnapCronjob="snapCronjob",e.TransactionOrigin="transactionOrigin",e.RpcOrigin="rpcOrigin",e.SnapIds="snapIds",e}({});exports.SnapCaveatType=SnapCaveatType;
1980
1726
 
1981
1727
  };
1982
1728
  };
1983
1729
  }
1984
1730
  }
1985
1731
  }, {package:"external:../snaps-utils/src/caveats.ts",file:"../snaps-utils/src/caveats.ts",}],
1986
- [140, {"./virtual-file/VirtualFile":158,"@metamask/utils":46,"@noble/hashes/sha256":59}, function(){
1732
+ [122, {"./virtual-file/VirtualFile":140,"@metamask/utils":28,"@noble/hashes/sha256":41}, function(){
1987
1733
  with (this.scopeTerminator) {
1988
1734
  with (this.globalThis) {
1989
1735
  return function() {
@@ -1997,7 +1743,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
1997
1743
  }
1998
1744
  }
1999
1745
  }, {package:"external:../snaps-utils/src/checksum.ts",file:"../snaps-utils/src/checksum.ts",}],
2000
- [141, {"@metamask/utils":46,"cron-parser":71,"superstruct":129}, function(){
1746
+ [123, {"@metamask/utils":28,"cron-parser":53,"superstruct":111}, function(){
2001
1747
  with (this.scopeTerminator) {
2002
1748
  with (this.globalThis) {
2003
1749
  return function() {
@@ -2011,7 +1757,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2011
1757
  }
2012
1758
  }
2013
1759
  }, {package:"external:../snaps-utils/src/cronjob.ts",file:"../snaps-utils/src/cronjob.ts",}],
2014
- [142, {"rfdc":84}, function(){
1760
+ [124, {"rfdc":65}, function(){
2015
1761
  with (this.scopeTerminator) {
2016
1762
  with (this.globalThis) {
2017
1763
  return function() {
@@ -2025,7 +1771,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2025
1771
  }
2026
1772
  }
2027
1773
  }, {package:"external:../snaps-utils/src/deep-clone.ts",file:"../snaps-utils/src/deep-clone.ts",}],
2028
- [143, {}, function(){
1774
+ [125, {}, function(){
2029
1775
  with (this.scopeTerminator) {
2030
1776
  with (this.globalThis) {
2031
1777
  return function() {
@@ -2039,7 +1785,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2039
1785
  }
2040
1786
  }
2041
1787
  }, {package:"external:../snaps-utils/src/default-endowments.ts",file:"../snaps-utils/src/default-endowments.ts",}],
2042
- [144, {}, function(){
1788
+ [126, {}, function(){
2043
1789
  with (this.scopeTerminator) {
2044
1790
  with (this.globalThis) {
2045
1791
  return function() {
@@ -2053,7 +1799,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2053
1799
  }
2054
1800
  }
2055
1801
  }, {package:"external:../snaps-utils/src/entropy.ts",file:"../snaps-utils/src/entropy.ts",}],
2056
- [145, {}, function(){
1802
+ [127, {}, function(){
2057
1803
  with (this.scopeTerminator) {
2058
1804
  with (this.globalThis) {
2059
1805
  return function() {
@@ -2067,21 +1813,21 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2067
1813
  }
2068
1814
  }
2069
1815
  }, {package:"external:../snaps-utils/src/handlers.ts",file:"../snaps-utils/src/handlers.ts",}],
2070
- [146, {}, function(){
1816
+ [128, {}, function(){
2071
1817
  with (this.scopeTerminator) {
2072
1818
  with (this.globalThis) {
2073
1819
  return function() {
2074
1820
  'use strict';
2075
1821
  // source: /home/runner/work/snaps-monorepo/snaps-monorepo/packages/snaps-utils/src/iframe.ts
2076
1822
  return function (require, module, exports) {
2077
- "use strict";async function createWindow(e,t){return await new Promise(((n,o)=>{const r=document.createElement("iframe");r.setAttribute("id",t),r.setAttribute("data-testid","snaps-iframe"),r.setAttribute("sandbox","allow-scripts"),r.setAttribute("src",e),document.body.appendChild(r),r.addEventListener("load",(()=>{r.contentWindow?n(r.contentWindow):o(new Error(`iframe.contentWindow not present on load for job "${t}".`))}))}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createWindow=createWindow;
1823
+ "use strict";async function createWindow(e,t,n=!0){return await new Promise(((o,r)=>{const i=document.createElement("iframe");i.setAttribute("id",t),i.setAttribute("data-testid","snaps-iframe"),n&&i.setAttribute("sandbox","allow-scripts"),i.setAttribute("src",e),document.body.appendChild(i),i.addEventListener("load",(()=>{i.contentWindow?o(i.contentWindow):r(new Error(`iframe.contentWindow not present on load for job "${t}".`))}))}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createWindow=createWindow;
2078
1824
 
2079
1825
  };
2080
1826
  };
2081
1827
  }
2082
1828
  }
2083
1829
  }, {package:"external:../snaps-utils/src/iframe.ts",file:"../snaps-utils/src/iframe.ts",}],
2084
- [147, {"./caveats":139,"./checksum":140,"./cronjob":141,"./deep-clone":142,"./default-endowments":143,"./entropy":144,"./handlers":145,"./iframe":146,"./json-rpc":148,"./logging":149,"./manifest/index.browser":150,"./namespace":152,"./notification":153,"./path":154,"./snaps":155,"./types":156,"./versions":157,"./virtual-file/index.browser":159}, function(){
1830
+ [129, {"./caveats":121,"./checksum":122,"./cronjob":123,"./deep-clone":124,"./default-endowments":125,"./entropy":126,"./handlers":127,"./iframe":128,"./json-rpc":130,"./logging":131,"./manifest/index.browser":132,"./namespace":134,"./notification":135,"./path":136,"./snaps":137,"./types":138,"./versions":139,"./virtual-file/index.browser":141}, function(){
2085
1831
  with (this.scopeTerminator) {
2086
1832
  with (this.globalThis) {
2087
1833
  return function() {
@@ -2095,7 +1841,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2095
1841
  }
2096
1842
  }
2097
1843
  }, {package:"external:../snaps-utils/src/index.browser.ts",file:"../snaps-utils/src/index.browser.ts",}],
2098
- [148, {"@metamask/utils":46,"superstruct":129}, function(){
1844
+ [130, {"@metamask/utils":28,"superstruct":111}, function(){
2099
1845
  with (this.scopeTerminator) {
2100
1846
  with (this.globalThis) {
2101
1847
  return function() {
@@ -2109,7 +1855,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2109
1855
  }
2110
1856
  }
2111
1857
  }, {package:"external:../snaps-utils/src/json-rpc.ts",file:"../snaps-utils/src/json-rpc.ts",}],
2112
- [149, {"@metamask/utils":46}, function(){
1858
+ [131, {"@metamask/utils":28}, function(){
2113
1859
  with (this.scopeTerminator) {
2114
1860
  with (this.globalThis) {
2115
1861
  return function() {
@@ -2123,7 +1869,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2123
1869
  }
2124
1870
  }
2125
1871
  }, {package:"external:../snaps-utils/src/logging.ts",file:"../snaps-utils/src/logging.ts",}],
2126
- [150, {"./validation":151}, function(){
1872
+ [132, {"./validation":133}, function(){
2127
1873
  with (this.scopeTerminator) {
2128
1874
  with (this.globalThis) {
2129
1875
  return function() {
@@ -2137,21 +1883,21 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2137
1883
  }
2138
1884
  }
2139
1885
  }, {package:"external:../snaps-utils/src/manifest/index.browser.ts",file:"../snaps-utils/src/manifest/index.browser.ts",}],
2140
- [151, {"../cronjob":141,"../entropy":144,"../json-rpc":148,"../namespace":152,"../types":156,"@metamask/utils":46,"superstruct":129}, function(){
1886
+ [133, {"../cronjob":123,"../entropy":126,"../json-rpc":130,"../namespace":134,"../snaps":137,"../types":138,"@metamask/utils":28,"superstruct":111}, function(){
2141
1887
  with (this.scopeTerminator) {
2142
1888
  with (this.globalThis) {
2143
1889
  return function() {
2144
1890
  'use strict';
2145
1891
  // source: /home/runner/work/snaps-monorepo/snaps-monorepo/packages/snaps-utils/src/manifest/validation.ts
2146
1892
  return function (require, module, exports) {
2147
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnapManifestStruct=exports.SnapGetBip32EntropyPermissionsStruct=exports.PermissionsStruct=exports.Bip32PathStruct=exports.Bip32EntropyStruct=void 0,exports.assertIsSnapManifest=assertIsSnapManifest,exports.bip32entropy=void 0,exports.createSnapManifest=createSnapManifest,exports.isSnapManifest=isSnapManifest;var _utils=require("@metamask/utils"),_superstruct=require("superstruct"),_cronjob=require("../cronjob"),_entropy=require("../entropy"),_jsonRpc=require("../json-rpc"),_namespace=require("../namespace"),_types=require("../types");const FORBIDDEN_PURPOSES=[_entropy.SIP_6_MAGIC_VALUE,_entropy.STATE_ENCRYPTION_MAGIC_VALUE],BIP32_INDEX_REGEX=/^\d+'?$/u,Bip32PathStruct=(0,_superstruct.refine)((0,_superstruct.array)((0,_superstruct.string)()),"BIP-32 path",(t=>0===t.length?"Path must be a non-empty BIP-32 derivation path array":"m"!==t[0]?'Path must start with "m".':t.length<3?"Paths must have a length of at least three.":t.slice(1).some((t=>!BIP32_INDEX_REGEX.test(t)))?"Path must be a valid BIP-32 derivation path array.":!FORBIDDEN_PURPOSES.includes(t[1])||`The purpose "${t[1]}" is not allowed for entropy derivation.`));exports.Bip32PathStruct=Bip32PathStruct;const bip32entropy=t=>(0,_superstruct.refine)(t,"BIP-32 entropy",(t=>"ed25519"!==t.curve||!t.path.slice(1).some((t=>!t.endsWith("'")))||"Ed25519 does not support unhardened paths."));exports.bip32entropy=bip32entropy;const Bip32EntropyStruct=bip32entropy((0,_superstruct.type)({path:Bip32PathStruct,curve:(0,_superstruct.enums)(["ed25519","secp256k1"])}));exports.Bip32EntropyStruct=Bip32EntropyStruct;const SnapGetBip32EntropyPermissionsStruct=(0,_superstruct.size)((0,_superstruct.array)(Bip32EntropyStruct),1,1/0);exports.SnapGetBip32EntropyPermissionsStruct=SnapGetBip32EntropyPermissionsStruct;const PermissionsStruct=(0,_superstruct.type)({"endowment:long-running":(0,_superstruct.optional)((0,_superstruct.object)({})),"endowment:network-access":(0,_superstruct.optional)((0,_superstruct.object)({})),"endowment:webassembly":(0,_superstruct.optional)((0,_superstruct.object)({})),"endowment:transaction-insight":(0,_superstruct.optional)((0,_superstruct.object)({allowTransactionOrigin:(0,_superstruct.optional)((0,_superstruct.boolean)())})),"endowment:cronjob":(0,_superstruct.optional)((0,_superstruct.object)({jobs:_cronjob.CronjobSpecificationArrayStruct})),"endowment:rpc":(0,_superstruct.optional)(_jsonRpc.RpcOriginsStruct),snap_dialog:(0,_superstruct.optional)((0,_superstruct.object)({})),snap_confirm:(0,_superstruct.optional)((0,_superstruct.object)({})),snap_manageState:(0,_superstruct.optional)((0,_superstruct.object)({})),snap_notify:(0,_superstruct.optional)((0,_superstruct.object)({})),snap_getBip32Entropy:(0,_superstruct.optional)(SnapGetBip32EntropyPermissionsStruct),snap_getBip32PublicKey:(0,_superstruct.optional)(SnapGetBip32EntropyPermissionsStruct),snap_getBip44Entropy:(0,_superstruct.optional)((0,_superstruct.size)((0,_superstruct.array)((0,_superstruct.object)({coinType:(0,_superstruct.size)((0,_superstruct.integer)(),0,2**32-1)})),1,1/0)),snap_getEntropy:(0,_superstruct.optional)((0,_superstruct.object)({})),"endowment:keyring":(0,_superstruct.optional)((0,_superstruct.object)({namespaces:_namespace.NamespacesStruct}))});exports.PermissionsStruct=PermissionsStruct;const SnapManifestStruct=(0,_superstruct.object)({version:_utils.VersionStruct,description:(0,_superstruct.size)((0,_superstruct.string)(),1,280),proposedName:(0,_superstruct.size)((0,_superstruct.pattern)((0,_superstruct.string)(),/^(?:[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),1,214),repository:(0,_superstruct.optional)((0,_superstruct.object)({type:(0,_superstruct.size)((0,_superstruct.string)(),1,1/0),url:(0,_superstruct.size)((0,_superstruct.string)(),1,1/0)})),source:(0,_superstruct.object)({shasum:_utils.ChecksumStruct,location:(0,_superstruct.object)({npm:(0,_superstruct.object)({filePath:(0,_superstruct.size)((0,_superstruct.string)(),1,1/0),iconPath:(0,_superstruct.optional)((0,_superstruct.size)((0,_superstruct.string)(),1,1/0)),packageName:_types.NameStruct,registry:(0,_superstruct.union)([(0,_superstruct.literal)("https://registry.npmjs.org"),(0,_superstruct.literal)("https://registry.npmjs.org/")])})})}),initialPermissions:PermissionsStruct,manifestVersion:(0,_superstruct.literal)("0.1")});function isSnapManifest(t){return(0,_superstruct.is)(t,SnapManifestStruct)}function assertIsSnapManifest(t){(0,_utils.assertStruct)(t,SnapManifestStruct,`"${_types.NpmSnapFileNames.Manifest}" is invalid`)}function createSnapManifest(t){return(0,_superstruct.create)(t,SnapManifestStruct)}exports.SnapManifestStruct=SnapManifestStruct;
1893
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnapManifestStruct=exports.SnapIdsStruct=exports.SnapGetBip32EntropyPermissionsStruct=exports.SemVerRangeStruct=exports.PermissionsStruct=exports.Bip32PathStruct=exports.Bip32EntropyStruct=void 0,exports.assertIsSnapManifest=assertIsSnapManifest,exports.bip32entropy=void 0,exports.createSnapManifest=createSnapManifest,exports.isSnapManifest=isSnapManifest;var _utils=require("@metamask/utils"),_superstruct=require("superstruct"),_cronjob=require("../cronjob"),_entropy=require("../entropy"),_jsonRpc=require("../json-rpc"),_namespace=require("../namespace"),_snaps=require("../snaps"),_types=require("../types");const FORBIDDEN_PURPOSES=[_entropy.SIP_6_MAGIC_VALUE,_entropy.STATE_ENCRYPTION_MAGIC_VALUE],BIP32_INDEX_REGEX=/^\d+'?$/u,Bip32PathStruct=(0,_superstruct.refine)((0,_superstruct.array)((0,_superstruct.string)()),"BIP-32 path",(t=>0===t.length?"Path must be a non-empty BIP-32 derivation path array":"m"!==t[0]?'Path must start with "m".':t.length<3?"Paths must have a length of at least three.":t.slice(1).some((t=>!BIP32_INDEX_REGEX.test(t)))?"Path must be a valid BIP-32 derivation path array.":!FORBIDDEN_PURPOSES.includes(t[1])||`The purpose "${t[1]}" is not allowed for entropy derivation.`));exports.Bip32PathStruct=Bip32PathStruct;const bip32entropy=t=>(0,_superstruct.refine)(t,"BIP-32 entropy",(t=>"ed25519"!==t.curve||!t.path.slice(1).some((t=>!t.endsWith("'")))||"Ed25519 does not support unhardened paths."));exports.bip32entropy=bip32entropy;const Bip32EntropyStruct=bip32entropy((0,_superstruct.type)({path:Bip32PathStruct,curve:(0,_superstruct.enums)(["ed25519","secp256k1"])}));exports.Bip32EntropyStruct=Bip32EntropyStruct;const SnapGetBip32EntropyPermissionsStruct=(0,_superstruct.size)((0,_superstruct.array)(Bip32EntropyStruct),1,1/0);exports.SnapGetBip32EntropyPermissionsStruct=SnapGetBip32EntropyPermissionsStruct;const SemVerRangeStruct=(0,_superstruct.refine)((0,_superstruct.string)(),"SemVer range",(t=>!!(0,_utils.isValidSemVerRange)(t)||"Expected a valid SemVer range."));exports.SemVerRangeStruct=SemVerRangeStruct;const SnapIdsStruct=(0,_superstruct.refine)((0,_superstruct.record)(_snaps.SnapIdStruct,(0,_superstruct.object)({version:(0,_superstruct.optional)(SemVerRangeStruct)})),"SnapIds",(t=>0!==Object.keys(t).length));exports.SnapIdsStruct=SnapIdsStruct;const PermissionsStruct=(0,_superstruct.type)({"endowment:long-running":(0,_superstruct.optional)((0,_superstruct.object)({})),"endowment:network-access":(0,_superstruct.optional)((0,_superstruct.object)({})),"endowment:webassembly":(0,_superstruct.optional)((0,_superstruct.object)({})),"endowment:transaction-insight":(0,_superstruct.optional)((0,_superstruct.object)({allowTransactionOrigin:(0,_superstruct.optional)((0,_superstruct.boolean)())})),"endowment:cronjob":(0,_superstruct.optional)((0,_superstruct.object)({jobs:_cronjob.CronjobSpecificationArrayStruct})),"endowment:rpc":(0,_superstruct.optional)(_jsonRpc.RpcOriginsStruct),snap_dialog:(0,_superstruct.optional)((0,_superstruct.object)({})),snap_confirm:(0,_superstruct.optional)((0,_superstruct.object)({})),snap_manageState:(0,_superstruct.optional)((0,_superstruct.object)({})),snap_notify:(0,_superstruct.optional)((0,_superstruct.object)({})),snap_getBip32Entropy:(0,_superstruct.optional)(SnapGetBip32EntropyPermissionsStruct),snap_getBip32PublicKey:(0,_superstruct.optional)(SnapGetBip32EntropyPermissionsStruct),snap_getBip44Entropy:(0,_superstruct.optional)((0,_superstruct.size)((0,_superstruct.array)((0,_superstruct.object)({coinType:(0,_superstruct.size)((0,_superstruct.integer)(),0,2**32-1)})),1,1/0)),snap_getEntropy:(0,_superstruct.optional)((0,_superstruct.object)({})),"endowment:keyring":(0,_superstruct.optional)((0,_superstruct.object)({namespaces:_namespace.NamespacesStruct})),wallet_snap:(0,_superstruct.optional)(SnapIdsStruct)});exports.PermissionsStruct=PermissionsStruct;const SnapManifestStruct=(0,_superstruct.object)({version:_utils.VersionStruct,description:(0,_superstruct.size)((0,_superstruct.string)(),1,280),proposedName:(0,_superstruct.size)((0,_superstruct.pattern)((0,_superstruct.string)(),/^(?:[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),1,214),repository:(0,_superstruct.optional)((0,_superstruct.object)({type:(0,_superstruct.size)((0,_superstruct.string)(),1,1/0),url:(0,_superstruct.size)((0,_superstruct.string)(),1,1/0)})),source:(0,_superstruct.object)({shasum:_utils.ChecksumStruct,location:(0,_superstruct.object)({npm:(0,_superstruct.object)({filePath:(0,_superstruct.size)((0,_superstruct.string)(),1,1/0),iconPath:(0,_superstruct.optional)((0,_superstruct.size)((0,_superstruct.string)(),1,1/0)),packageName:_types.NameStruct,registry:(0,_superstruct.union)([(0,_superstruct.literal)("https://registry.npmjs.org"),(0,_superstruct.literal)("https://registry.npmjs.org/")])})})}),initialPermissions:PermissionsStruct,manifestVersion:(0,_superstruct.literal)("0.1")});function isSnapManifest(t){return(0,_superstruct.is)(t,SnapManifestStruct)}function assertIsSnapManifest(t){(0,_utils.assertStruct)(t,SnapManifestStruct,`"${_types.NpmSnapFileNames.Manifest}" is invalid`)}function createSnapManifest(t){return(0,_superstruct.create)(t,SnapManifestStruct)}exports.SnapManifestStruct=SnapManifestStruct;
2148
1894
 
2149
1895
  };
2150
1896
  };
2151
1897
  }
2152
1898
  }
2153
1899
  }, {package:"external:../snaps-utils/src/manifest/validation.ts",file:"../snaps-utils/src/manifest/validation.ts",}],
2154
- [152, {"@metamask/utils":46,"superstruct":129}, function(){
1900
+ [134, {"@metamask/utils":28,"superstruct":111}, function(){
2155
1901
  with (this.scopeTerminator) {
2156
1902
  with (this.globalThis) {
2157
1903
  return function() {
@@ -2165,7 +1911,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2165
1911
  }
2166
1912
  }
2167
1913
  }, {package:"external:../snaps-utils/src/namespace.ts",file:"../snaps-utils/src/namespace.ts",}],
2168
- [153, {"./namespace":152,"@metamask/utils":46,"superstruct":129}, function(){
1914
+ [135, {"./namespace":134,"@metamask/utils":28,"superstruct":111}, function(){
2169
1915
  with (this.scopeTerminator) {
2170
1916
  with (this.globalThis) {
2171
1917
  return function() {
@@ -2179,7 +1925,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2179
1925
  }
2180
1926
  }
2181
1927
  }, {package:"external:../snaps-utils/src/notification.ts",file:"../snaps-utils/src/notification.ts",}],
2182
- [154, {"@metamask/utils":46}, function(){
1928
+ [136, {"@metamask/utils":28}, function(){
2183
1929
  with (this.scopeTerminator) {
2184
1930
  with (this.globalThis) {
2185
1931
  return function() {
@@ -2193,35 +1939,35 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2193
1939
  }
2194
1940
  }
2195
1941
  }, {package:"external:../snaps-utils/src/path.ts",file:"../snaps-utils/src/path.ts",}],
2196
- [155, {"./caveats":139,"./checksum":140,"./types":156,"@metamask/utils":46,"@scure/base":61,"fast-json-stable-stringify":76,"superstruct":129,"validate-npm-package-name":132}, function(){
1942
+ [137, {"./caveats":121,"./checksum":122,"./types":138,"@metamask/utils":28,"@scure/base":43,"fast-json-stable-stringify":58,"superstruct":111,"validate-npm-package-name":114}, function(){
2197
1943
  with (this.scopeTerminator) {
2198
1944
  with (this.globalThis) {
2199
1945
  return function() {
2200
1946
  'use strict';
2201
1947
  // source: /home/runner/work/snaps-monorepo/snaps-monorepo/packages/snaps-utils/src/snaps.ts
2202
1948
  return function (require, module, exports) {
2203
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnapStatusEvents=exports.SnapStatus=exports.SnapIdStruct=exports.ProgrammaticallyFixableSnapError=exports.PROPOSED_NAME_REGEX=exports.NpmSnapIdStruct=exports.LocalSnapIdStruct=exports.LOCALHOST_HOSTNAMES=exports.HttpSnapIdStruct=exports.BaseSnapIdStruct=void 0,exports.assertIsValidSnapId=assertIsValidSnapId,exports.getSnapChecksum=getSnapChecksum,exports.getSnapPrefix=getSnapPrefix,exports.isCaipChainId=isCaipChainId,exports.isSnapPermitted=isSnapPermitted,exports.validateSnapShasum=validateSnapShasum,exports.verifyRequestedSnapPermissions=verifyRequestedSnapPermissions;var _utils=require("@metamask/utils"),_base=require("@scure/base"),_fastJsonStableStringify=_interopRequireDefault(require("fast-json-stable-stringify")),_superstruct=require("superstruct"),_validateNpmPackageName=_interopRequireDefault(require("validate-npm-package-name")),_caveats=require("./caveats"),_checksum=require("./checksum"),_types=require("./types");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _defineProperty(t,e,s){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==typeof e?e:String(e)}function _toPrimitive(t,e){if("object"!=typeof t||null===t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var r=s.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const 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;let SnapStatus,SnapStatusEvents;exports.PROPOSED_NAME_REGEX=PROPOSED_NAME_REGEX,exports.SnapStatus=SnapStatus,function(t){t.Installing="installing",t.Updating="updating",t.Running="running",t.Stopped="stopped",t.Crashed="crashed"}(SnapStatus||(exports.SnapStatus=SnapStatus={})),exports.SnapStatusEvents=SnapStatusEvents,function(t){t.Start="START",t.Stop="STOP",t.Crash="CRASH",t.Update="UPDATE"}(SnapStatusEvents||(exports.SnapStatusEvents=SnapStatusEvents={}));class ProgrammaticallyFixableSnapError extends Error{constructor(t,e){super(t),_defineProperty(this,"reason",void 0),this.reason=e}}function getChecksummableManifest(t){const e=t.clone();return delete e.result.source.shasum,e.value=(0,_fastJsonStableStringify.default)(e.result),e}function getSnapChecksum(t){const{manifest:e,sourceCode:s,svgIcon:r}=t,a=[getChecksummableManifest(e),s,r].filter((t=>void 0!==t));return _base.base64.encode((0,_checksum.checksumFiles)(a))}function validateSnapShasum(t,e="Invalid Snap manifest: manifest shasum does not match computed shasum."){if(t.manifest.result.source.shasum!==getSnapChecksum(t))throw new ProgrammaticallyFixableSnapError(e,_types.SnapValidationFailureReason.ShasumMismatch)}exports.ProgrammaticallyFixableSnapError=ProgrammaticallyFixableSnapError;const LOCALHOST_HOSTNAMES=["localhost","127.0.0.1","[::1]"];exports.LOCALHOST_HOSTNAMES=LOCALHOST_HOSTNAMES;const BaseSnapIdStruct=(0,_superstruct.pattern)((0,_superstruct.string)(),/^[\x21-\x7E]*$/u);exports.BaseSnapIdStruct=BaseSnapIdStruct;const LocalSnapIdSubUrlStruct=(0,_types.uri)({protocol:(0,_superstruct.enums)(["http:","https:"]),hostname:(0,_superstruct.enums)(LOCALHOST_HOSTNAMES),hash:(0,_superstruct.empty)((0,_superstruct.string)()),search:(0,_superstruct.empty)((0,_superstruct.string)())}),LocalSnapIdStruct=(0,_superstruct.refine)(BaseSnapIdStruct,"local Snap Id",(t=>{if(!t.startsWith(_types.SnapIdPrefixes.local))return`Expected local snap ID, got "${t}".`;const[e]=(0,_superstruct.validate)(t.slice(_types.SnapIdPrefixes.local.length),LocalSnapIdSubUrlStruct);return e??!0}));exports.LocalSnapIdStruct=LocalSnapIdStruct;const NpmSnapIdStruct=(0,_superstruct.intersection)([BaseSnapIdStruct,(0,_types.uri)({protocol:(0,_superstruct.literal)(_types.SnapIdPrefixes.npm),pathname:(0,_superstruct.refine)((0,_superstruct.string)(),"package name",(function*(t){const e=t.startsWith("/")?t.slice(1):t,{errors:s,validForNewPackages:r,warnings:a}=(0,_validateNpmPackageName.default)(e);return r||(void 0===s?((0,_utils.assert)(void 0!==a),yield*a):yield*s),!0})),search:(0,_superstruct.empty)((0,_superstruct.string)()),hash:(0,_superstruct.empty)((0,_superstruct.string)())})]);exports.NpmSnapIdStruct=NpmSnapIdStruct;const HttpSnapIdStruct=(0,_superstruct.intersection)([BaseSnapIdStruct,(0,_types.uri)({protocol:(0,_superstruct.enums)(["http:","https:"]),search:(0,_superstruct.empty)((0,_superstruct.string)()),hash:(0,_superstruct.empty)((0,_superstruct.string)())})]);exports.HttpSnapIdStruct=HttpSnapIdStruct;const SnapIdStruct=(0,_superstruct.union)([NpmSnapIdStruct,LocalSnapIdStruct]);function getSnapPrefix(t){const e=Object.values(_types.SnapIdPrefixes).find((e=>t.startsWith(e)));if(void 0!==e)return e;throw new Error(`Invalid or no prefix found for "${t}"`)}function assertIsValidSnapId(t){(0,_utils.assertStruct)(t,SnapIdStruct,"Invalid snap ID")}function isCaipChainId(t){return"string"==typeof t&&/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u.test(t)}function isSnapPermitted(t,e){var s,r,a;return Boolean(null===(s=((null==t||null===(r=t.wallet_snap)||void 0===r||null===(a=r.caveats)||void 0===a?void 0:a.find((t=>t.type===_caveats.SnapCaveatType.SnapIds)))??{}).value)||void 0===s?void 0:s[e])}function verifyRequestedSnapPermissions(t){(0,_utils.assert)((0,_utils.isObject)(t),"Requested permissions must be an object.");const{wallet_snap:e}=t;(0,_utils.assert)((0,_utils.isObject)(e),"wallet_snap is missing from the requested permissions.");const{caveats:s}=e;(0,_utils.assert)(Array.isArray(s)&&1===s.length,"wallet_snap must have a caveat property with a single-item array value.");const[r]=s;(0,_utils.assert)((0,_utils.isObject)(r)&&r.type===_caveats.SnapCaveatType.SnapIds&&(0,_utils.isObject)(r.value),`The requested permissions do not have a valid ${_caveats.SnapCaveatType.SnapIds} caveat.`)}exports.SnapIdStruct=SnapIdStruct;
1949
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnapStatusEvents=exports.SnapStatus=exports.SnapIdStruct=exports.ProgrammaticallyFixableSnapError=exports.PROPOSED_NAME_REGEX=exports.NpmSnapIdStruct=exports.LocalSnapIdStruct=exports.LOCALHOST_HOSTNAMES=exports.HttpSnapIdStruct=exports.BaseSnapIdStruct=void 0,exports.assertIsValidSnapId=assertIsValidSnapId,exports.getSnapChecksum=getSnapChecksum,exports.getSnapPrefix=getSnapPrefix,exports.isCaipChainId=isCaipChainId,exports.isSnapPermitted=isSnapPermitted,exports.validateSnapShasum=validateSnapShasum,exports.verifyRequestedSnapPermissions=verifyRequestedSnapPermissions;var _utils=require("@metamask/utils"),_base=require("@scure/base"),_fastJsonStableStringify=_interopRequireDefault(require("fast-json-stable-stringify")),_superstruct=require("superstruct"),_validateNpmPackageName=_interopRequireDefault(require("validate-npm-package-name")),_caveats=require("./caveats"),_checksum=require("./checksum"),_types=require("./types");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _defineProperty(t,e,r){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==typeof e?e:String(e)}function _toPrimitive(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var s=r.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const 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;exports.PROPOSED_NAME_REGEX=PROPOSED_NAME_REGEX;let SnapStatus=function(t){return t.Installing="installing",t.Updating="updating",t.Running="running",t.Stopped="stopped",t.Crashed="crashed",t}({});exports.SnapStatus=SnapStatus;let SnapStatusEvents=function(t){return t.Start="START",t.Stop="STOP",t.Crash="CRASH",t.Update="UPDATE",t}({});exports.SnapStatusEvents=SnapStatusEvents;class ProgrammaticallyFixableSnapError extends Error{constructor(t,e){super(t),_defineProperty(this,"reason",void 0),this.reason=e}}function getChecksummableManifest(t){const e=t.clone();return delete e.result.source.shasum,e.value=(0,_fastJsonStableStringify.default)(e.result),e}function getSnapChecksum(t){const{manifest:e,sourceCode:r,svgIcon:s}=t,a=[getChecksummableManifest(e),r,s].filter((t=>void 0!==t));return _base.base64.encode((0,_checksum.checksumFiles)(a))}function validateSnapShasum(t,e="Invalid Snap manifest: manifest shasum does not match computed shasum."){if(t.manifest.result.source.shasum!==getSnapChecksum(t))throw new ProgrammaticallyFixableSnapError(e,_types.SnapValidationFailureReason.ShasumMismatch)}exports.ProgrammaticallyFixableSnapError=ProgrammaticallyFixableSnapError;const LOCALHOST_HOSTNAMES=["localhost","127.0.0.1","[::1]"];exports.LOCALHOST_HOSTNAMES=LOCALHOST_HOSTNAMES;const BaseSnapIdStruct=(0,_superstruct.pattern)((0,_superstruct.string)(),/^[\x21-\x7E]*$/u);exports.BaseSnapIdStruct=BaseSnapIdStruct;const LocalSnapIdSubUrlStruct=(0,_types.uri)({protocol:(0,_superstruct.enums)(["http:","https:"]),hostname:(0,_superstruct.enums)(LOCALHOST_HOSTNAMES),hash:(0,_superstruct.empty)((0,_superstruct.string)()),search:(0,_superstruct.empty)((0,_superstruct.string)())}),LocalSnapIdStruct=(0,_superstruct.refine)(BaseSnapIdStruct,"local Snap Id",(t=>{if(!t.startsWith(_types.SnapIdPrefixes.local))return`Expected local snap ID, got "${t}".`;const[e]=(0,_superstruct.validate)(t.slice(_types.SnapIdPrefixes.local.length),LocalSnapIdSubUrlStruct);return e??!0}));exports.LocalSnapIdStruct=LocalSnapIdStruct;const NpmSnapIdStruct=(0,_superstruct.intersection)([BaseSnapIdStruct,(0,_types.uri)({protocol:(0,_superstruct.literal)(_types.SnapIdPrefixes.npm),pathname:(0,_superstruct.refine)((0,_superstruct.string)(),"package name",(function*(t){const e=t.startsWith("/")?t.slice(1):t,{errors:r,validForNewPackages:s,warnings:a}=(0,_validateNpmPackageName.default)(e);return s||(void 0===r?((0,_utils.assert)(void 0!==a),yield*a):yield*r),!0})),search:(0,_superstruct.empty)((0,_superstruct.string)()),hash:(0,_superstruct.empty)((0,_superstruct.string)())})]);exports.NpmSnapIdStruct=NpmSnapIdStruct;const HttpSnapIdStruct=(0,_superstruct.intersection)([BaseSnapIdStruct,(0,_types.uri)({protocol:(0,_superstruct.enums)(["http:","https:"]),search:(0,_superstruct.empty)((0,_superstruct.string)()),hash:(0,_superstruct.empty)((0,_superstruct.string)())})]);exports.HttpSnapIdStruct=HttpSnapIdStruct;const SnapIdStruct=(0,_superstruct.union)([NpmSnapIdStruct,LocalSnapIdStruct]);function getSnapPrefix(t){const e=Object.values(_types.SnapIdPrefixes).find((e=>t.startsWith(e)));if(void 0!==e)return e;throw new Error(`Invalid or no prefix found for "${t}"`)}function assertIsValidSnapId(t){(0,_utils.assertStruct)(t,SnapIdStruct,"Invalid snap ID")}function isCaipChainId(t){return"string"==typeof t&&/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u.test(t)}function isSnapPermitted(t,e){var r,s,a;return Boolean(null===(r=((null==t||null===(s=t.wallet_snap)||void 0===s||null===(a=s.caveats)||void 0===a?void 0:a.find((t=>t.type===_caveats.SnapCaveatType.SnapIds)))??{}).value)||void 0===r?void 0:r[e])}function verifyRequestedSnapPermissions(t){(0,_utils.assert)((0,_utils.isObject)(t),"Requested permissions must be an object.");const{wallet_snap:e}=t;(0,_utils.assert)((0,_utils.isObject)(e),"wallet_snap is missing from the requested permissions.");const{caveats:r}=e;(0,_utils.assert)(Array.isArray(r)&&1===r.length,"wallet_snap must have a caveat property with a single-item array value.");const[s]=r;(0,_utils.assert)((0,_utils.isObject)(s)&&s.type===_caveats.SnapCaveatType.SnapIds&&(0,_utils.isObject)(s.value),`The requested permissions do not have a valid ${_caveats.SnapCaveatType.SnapIds} caveat.`)}exports.SnapIdStruct=SnapIdStruct;
2204
1950
 
2205
1951
  };
2206
1952
  };
2207
1953
  }
2208
1954
  }
2209
1955
  }, {package:"external:../snaps-utils/src/snaps.ts",file:"../snaps-utils/src/snaps.ts",}],
2210
- [156, {"@metamask/utils":46,"superstruct":129}, function(){
1956
+ [138, {"@metamask/utils":28,"superstruct":111}, function(){
2211
1957
  with (this.scopeTerminator) {
2212
1958
  with (this.globalThis) {
2213
1959
  return function() {
2214
1960
  'use strict';
2215
1961
  // source: /home/runner/work/snaps-monorepo/snaps-monorepo/packages/snaps-utils/src/types.ts
2216
1962
  return function (require, module, exports) {
2217
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WALLET_SNAP_PERMISSION_KEY=exports.SnapValidationFailureReason=exports.SnapIdPrefixes=exports.SNAP_STREAM_NAMES=exports.SNAP_EXPORT_NAMES=exports.NpmSnapPackageJsonStruct=exports.NpmSnapFileNames=exports.NameStruct=exports.HandlerType=void 0,exports.assertIsNpmSnapPackageJson=assertIsNpmSnapPackageJson,exports.isNpmSnapPackageJson=isNpmSnapPackageJson,exports.isValidUrl=isValidUrl,exports.uri=void 0;var _utils=require("@metamask/utils"),_superstruct=require("superstruct");let NpmSnapFileNames;exports.NpmSnapFileNames=NpmSnapFileNames,function(e){e.PackageJson="package.json",e.Manifest="snap.manifest.json"}(NpmSnapFileNames||(exports.NpmSnapFileNames=NpmSnapFileNames={}));const NameStruct=(0,_superstruct.size)((0,_superstruct.pattern)((0,_superstruct.string)(),/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214);exports.NameStruct=NameStruct;const NpmSnapPackageJsonStruct=(0,_superstruct.type)({version:_utils.VersionStruct,name:NameStruct,main:(0,_superstruct.optional)((0,_superstruct.size)((0,_superstruct.string)(),1,1/0)),repository:(0,_superstruct.optional)((0,_superstruct.object)({type:(0,_superstruct.size)((0,_superstruct.string)(),1,1/0),url:(0,_superstruct.size)((0,_superstruct.string)(),1,1/0)}))});function isNpmSnapPackageJson(e){return(0,_superstruct.is)(e,NpmSnapPackageJsonStruct)}function assertIsNpmSnapPackageJson(e){(0,_utils.assertStruct)(e,NpmSnapPackageJsonStruct,`"${NpmSnapFileNames.PackageJson}" is invalid`)}let SnapIdPrefixes,SnapValidationFailureReason,SNAP_STREAM_NAMES,HandlerType;exports.NpmSnapPackageJsonStruct=NpmSnapPackageJsonStruct,exports.SnapIdPrefixes=SnapIdPrefixes,function(e){e.npm="npm:",e.local="local:"}(SnapIdPrefixes||(exports.SnapIdPrefixes=SnapIdPrefixes={})),exports.SnapValidationFailureReason=SnapValidationFailureReason,function(e){e.NameMismatch='"name" field mismatch',e.VersionMismatch='"version" field mismatch',e.RepositoryMismatch='"repository" field mismatch',e.ShasumMismatch='"shasum" field mismatch'}(SnapValidationFailureReason||(exports.SnapValidationFailureReason=SnapValidationFailureReason={})),exports.SNAP_STREAM_NAMES=SNAP_STREAM_NAMES,function(e){e.JSON_RPC="jsonRpc",e.COMMAND="command"}(SNAP_STREAM_NAMES||(exports.SNAP_STREAM_NAMES=SNAP_STREAM_NAMES={})),exports.HandlerType=HandlerType,function(e){e.OnRpcRequest="onRpcRequest",e.OnTransaction="onTransaction",e.SnapKeyring="keyring",e.OnCronjob="onCronjob"}(HandlerType||(exports.HandlerType=HandlerType={}));const SNAP_EXPORT_NAMES=Object.values(HandlerType);exports.SNAP_EXPORT_NAMES=SNAP_EXPORT_NAMES;const uri=(e={})=>(0,_superstruct.refine)((0,_superstruct.union)([(0,_superstruct.string)(),(0,_superstruct.instance)(URL)]),"uri",(s=>{try{const t=new URL(s),a=(0,_superstruct.type)(e);return(0,_superstruct.assert)(t,a),!0}catch{return`Expected URL, got "${s.toString()}".`}}));function isValidUrl(e,s={}){return(0,_superstruct.is)(e,uri(s))}exports.uri=uri;const WALLET_SNAP_PERMISSION_KEY="wallet_snap";exports.WALLET_SNAP_PERMISSION_KEY="wallet_snap";
1963
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WALLET_SNAP_PERMISSION_KEY=exports.SnapValidationFailureReason=exports.SnapIdPrefixes=exports.SNAP_STREAM_NAMES=exports.SNAP_EXPORT_NAMES=exports.NpmSnapPackageJsonStruct=exports.NpmSnapFileNames=exports.NameStruct=exports.HandlerType=void 0,exports.assertIsNpmSnapPackageJson=assertIsNpmSnapPackageJson,exports.isNpmSnapPackageJson=isNpmSnapPackageJson,exports.isValidUrl=isValidUrl,exports.uri=void 0;var _utils=require("@metamask/utils"),_superstruct=require("superstruct");let NpmSnapFileNames=function(t){return t.PackageJson="package.json",t.Manifest="snap.manifest.json",t}({});exports.NpmSnapFileNames=NpmSnapFileNames;const NameStruct=(0,_superstruct.size)((0,_superstruct.pattern)((0,_superstruct.string)(),/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214);exports.NameStruct=NameStruct;const NpmSnapPackageJsonStruct=(0,_superstruct.type)({version:_utils.VersionStruct,name:NameStruct,main:(0,_superstruct.optional)((0,_superstruct.size)((0,_superstruct.string)(),1,1/0)),repository:(0,_superstruct.optional)((0,_superstruct.object)({type:(0,_superstruct.size)((0,_superstruct.string)(),1,1/0),url:(0,_superstruct.size)((0,_superstruct.string)(),1,1/0)}))});function isNpmSnapPackageJson(t){return(0,_superstruct.is)(t,NpmSnapPackageJsonStruct)}function assertIsNpmSnapPackageJson(t){(0,_utils.assertStruct)(t,NpmSnapPackageJsonStruct,`"${NpmSnapFileNames.PackageJson}" is invalid`)}exports.NpmSnapPackageJsonStruct=NpmSnapPackageJsonStruct;let SnapIdPrefixes=function(t){return t.npm="npm:",t.local="local:",t}({});exports.SnapIdPrefixes=SnapIdPrefixes;let SnapValidationFailureReason=function(t){return t.NameMismatch='"name" field mismatch',t.VersionMismatch='"version" field mismatch',t.RepositoryMismatch='"repository" field mismatch',t.ShasumMismatch='"shasum" field mismatch',t}({});exports.SnapValidationFailureReason=SnapValidationFailureReason;let SNAP_STREAM_NAMES=function(t){return t.JSON_RPC="jsonRpc",t.COMMAND="command",t}({});exports.SNAP_STREAM_NAMES=SNAP_STREAM_NAMES;let HandlerType=function(t){return t.OnRpcRequest="onRpcRequest",t.OnTransaction="onTransaction",t.SnapKeyring="keyring",t.OnCronjob="onCronjob",t}({});exports.HandlerType=HandlerType;const SNAP_EXPORT_NAMES=Object.values(HandlerType);exports.SNAP_EXPORT_NAMES=SNAP_EXPORT_NAMES;const uri=(t={})=>(0,_superstruct.refine)((0,_superstruct.union)([(0,_superstruct.string)(),(0,_superstruct.instance)(URL)]),"uri",(e=>{try{const s=new URL(e),r=(0,_superstruct.type)(t);return(0,_superstruct.assert)(s,r),!0}catch{return`Expected URL, got "${e.toString()}".`}}));function isValidUrl(t,e={}){return(0,_superstruct.is)(t,uri(e))}exports.uri=uri;const WALLET_SNAP_PERMISSION_KEY="wallet_snap";exports.WALLET_SNAP_PERMISSION_KEY="wallet_snap";
2218
1964
 
2219
1965
  };
2220
1966
  };
2221
1967
  }
2222
1968
  }
2223
1969
  }, {package:"external:../snaps-utils/src/types.ts",file:"../snaps-utils/src/types.ts",}],
2224
- [157, {"@metamask/utils":46,"semver":112,"superstruct":129}, function(){
1970
+ [139, {"@metamask/utils":28,"semver":93,"superstruct":111}, function(){
2225
1971
  with (this.scopeTerminator) {
2226
1972
  with (this.globalThis) {
2227
1973
  return function() {
@@ -2235,7 +1981,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2235
1981
  }
2236
1982
  }
2237
1983
  }, {package:"external:../snaps-utils/src/versions.ts",file:"../snaps-utils/src/versions.ts",}],
2238
- [158, {"../deep-clone":142,"@metamask/utils":46}, function(){
1984
+ [140, {"../deep-clone":124,"@metamask/utils":28}, function(){
2239
1985
  with (this.scopeTerminator) {
2240
1986
  with (this.globalThis) {
2241
1987
  return function() {
@@ -2249,7 +1995,7 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2249
1995
  }
2250
1996
  }
2251
1997
  }, {package:"external:../snaps-utils/src/virtual-file/VirtualFile.ts",file:"../snaps-utils/src/virtual-file/VirtualFile.ts",}],
2252
- [159, {"./VirtualFile":158}, function(){
1998
+ [141, {"./VirtualFile":140}, function(){
2253
1999
  with (this.scopeTerminator) {
2254
2000
  with (this.globalThis) {
2255
2001
  return function() {
@@ -2262,5 +2008,5 @@ function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return func
2262
2008
  };
2263
2009
  }
2264
2010
  }
2265
- }, {package:"external:../snaps-utils/src/virtual-file/index.browser.ts",file:"../snaps-utils/src/virtual-file/index.browser.ts",}]],[138],{"resources":{"@metamask/post-message-stream":{"globals":{"MessageEvent.prototype":true,"WorkerGlobalScope":true,"addEventListener":true,"browser":true,"chrome":true,"location.origin":true,"onmessage":"write","postMessage":true,"removeEventListener":true},"packages":{"@metamask/post-message-stream>@metamask/utils":true,"@metamask/post-message-stream>readable-stream":true}},"@metamask/post-message-stream>@metamask/utils":{"globals":{"TextDecoder":true,"TextEncoder":true},"packages":{"browserify>buffer":true,"eslint>debug":true,"superstruct":true,"ts-jest>semver":true}},"@metamask/post-message-stream>readable-stream":{"packages":{"@metamask/post-message-stream>readable-stream>process-nextick-args":true,"@metamask/post-message-stream>readable-stream>safe-buffer":true,"@metamask/post-message-stream>readable-stream>string_decoder":true,"browserify>browser-resolve":true,"browserify>events":true,"browserify>inherits":true,"browserify>readable-stream>core-util-is":true,"browserify>readable-stream>isarray":true,"browserify>readable-stream>util-deprecate":true,"browserify>timers-browserify":true,"process":true}},"@metamask/post-message-stream>readable-stream>process-nextick-args":{"packages":{"process":true}},"@metamask/post-message-stream>readable-stream>safe-buffer":{"packages":{"browserify>buffer":true}},"@metamask/post-message-stream>readable-stream>string_decoder":{"packages":{"@metamask/post-message-stream>readable-stream>safe-buffer":true}},"@metamask/rpc-methods>@noble/hashes":{"globals":{"TextEncoder":true,"crypto":true}},"@metamask/snaps-utils>@scure/base":{"globals":{"TextDecoder":true,"TextEncoder":true}},"@metamask/snaps-utils>cron-parser":{"packages":{"@metamask/snaps-utils>cron-parser>luxon":true,"browserify>browser-resolve":true}},"@metamask/snaps-utils>cron-parser>luxon":{"globals":{"Intl":true}},"@metamask/snaps-utils>rfdc":{"packages":{"browserify>buffer":true}},"@metamask/snaps-utils>validate-npm-package-name":{"packages":{"@metamask/snaps-utils>validate-npm-package-name>builtins":true}},"@metamask/snaps-utils>validate-npm-package-name>builtins":{"packages":{"process":true,"ts-jest>semver":true}},"@metamask/utils":{"globals":{"TextDecoder":true,"TextEncoder":true},"packages":{"browserify>buffer":true,"eslint>debug":true,"superstruct":true,"ts-jest>semver":true}},"browserify>buffer":{"globals":{"console":true},"packages":{"buffer>base64-js":true,"buffer>ieee754":true}},"browserify>events":{"globals":{"console":true}},"browserify>readable-stream>core-util-is":{"packages":{"browserify>insert-module-globals>is-buffer":true}},"browserify>readable-stream>util-deprecate":{"globals":{"console.trace":true,"console.warn":true,"localStorage":true}},"browserify>timers-browserify":{"globals":{"clearInterval":true,"clearTimeout":true,"setInterval":true,"setTimeout":true},"packages":{"process":true}},"eslint>debug":{"globals":{"console":true,"document":true,"localStorage":true,"navigator":true,"process":true},"packages":{"eslint>debug>ms":true,"process":true}},"external:../snaps-utils/src/checksum.ts":{"packages":{"@metamask/rpc-methods>@noble/hashes":true,"@metamask/utils":true,"external:../snaps-utils/src/virtual-file/VirtualFile.ts":true}},"external:../snaps-utils/src/cronjob.ts":{"packages":{"@metamask/snaps-utils>cron-parser":true,"@metamask/utils":true,"superstruct":true}},"external:../snaps-utils/src/deep-clone.ts":{"packages":{"@metamask/snaps-utils>rfdc":true}},"external:../snaps-utils/src/index.browser.ts":{"packages":{"external:../snaps-utils/src/caveats.ts":true,"external:../snaps-utils/src/checksum.ts":true,"external:../snaps-utils/src/cronjob.ts":true,"external:../snaps-utils/src/deep-clone.ts":true,"external:../snaps-utils/src/default-endowments.ts":true,"external:../snaps-utils/src/entropy.ts":true,"external:../snaps-utils/src/handlers.ts":true,"external:../snaps-utils/src/iframe.ts":true,"external:../snaps-utils/src/json-rpc.ts":true,"external:../snaps-utils/src/logging.ts":true,"external:../snaps-utils/src/manifest/index.browser.ts":true,"external:../snaps-utils/src/namespace.ts":true,"external:../snaps-utils/src/notification.ts":true,"external:../snaps-utils/src/path.ts":true,"external:../snaps-utils/src/snaps.ts":true,"external:../snaps-utils/src/types.ts":true,"external:../snaps-utils/src/versions.ts":true,"external:../snaps-utils/src/virtual-file/index.browser.ts":true}},"external:../snaps-utils/src/json-rpc.ts":{"packages":{"@metamask/utils":true,"superstruct":true}},"external:../snaps-utils/src/logging.ts":{"globals":{"console":true},"packages":{"@metamask/utils":true}},"external:../snaps-utils/src/manifest/index.browser.ts":{"packages":{"external:../snaps-utils/src/manifest/validation.ts":true}},"external:../snaps-utils/src/manifest/validation.ts":{"packages":{"@metamask/utils":true,"external:../snaps-utils/src/cronjob.ts":true,"external:../snaps-utils/src/entropy.ts":true,"external:../snaps-utils/src/json-rpc.ts":true,"external:../snaps-utils/src/namespace.ts":true,"external:../snaps-utils/src/types.ts":true,"superstruct":true}},"external:../snaps-utils/src/namespace.ts":{"packages":{"@metamask/utils":true,"superstruct":true}},"external:../snaps-utils/src/notification.ts":{"packages":{"@metamask/utils":true,"external:../snaps-utils/src/namespace.ts":true,"superstruct":true}},"external:../snaps-utils/src/path.ts":{"packages":{"@metamask/utils":true}},"external:../snaps-utils/src/snaps.ts":{"packages":{"@metamask/snaps-utils>@scure/base":true,"@metamask/snaps-utils>validate-npm-package-name":true,"@metamask/utils":true,"external:../snaps-utils/src/caveats.ts":true,"external:../snaps-utils/src/checksum.ts":true,"external:../snaps-utils/src/types.ts":true,"superstruct":true,"ts-jest>fast-json-stable-stringify":true}},"external:../snaps-utils/src/types.ts":{"packages":{"@metamask/utils":true,"superstruct":true}},"external:../snaps-utils/src/versions.ts":{"packages":{"@metamask/utils":true,"superstruct":true,"ts-jest>semver":true}},"external:../snaps-utils/src/virtual-file/VirtualFile.ts":{"packages":{"@metamask/utils":true,"external:../snaps-utils/src/deep-clone.ts":true}},"external:../snaps-utils/src/virtual-file/index.browser.ts":{"packages":{"external:../snaps-utils/src/virtual-file/VirtualFile.ts":true}},"process":{"globals":{"clearTimeout":true,"setTimeout":true}},"ts-jest>semver":{"globals":{"console.error":true},"packages":{"process":true,"ts-jest>semver>lru-cache":true}},"ts-jest>semver>lru-cache":{"packages":{"ts-jest>semver>lru-cache>yallist":true}}}})
2011
+ }, {package:"external:../snaps-utils/src/virtual-file/index.browser.ts",file:"../snaps-utils/src/virtual-file/index.browser.ts",}]],[120],{"resources":{"@metamask/post-message-stream":{"globals":{"MessageEvent.prototype":true,"WorkerGlobalScope":true,"addEventListener":true,"browser":true,"chrome":true,"location.origin":true,"postMessage":true,"removeEventListener":true},"packages":{"@metamask/post-message-stream>readable-stream":true,"@metamask/utils":true}},"@metamask/post-message-stream>readable-stream":{"packages":{"@metamask/post-message-stream>readable-stream>process-nextick-args":true,"@metamask/post-message-stream>readable-stream>safe-buffer":true,"@metamask/post-message-stream>readable-stream>string_decoder":true,"browserify>browser-resolve":true,"browserify>events":true,"browserify>inherits":true,"browserify>readable-stream>core-util-is":true,"browserify>readable-stream>isarray":true,"browserify>readable-stream>util-deprecate":true,"browserify>timers-browserify":true,"process":true}},"@metamask/post-message-stream>readable-stream>process-nextick-args":{"packages":{"process":true}},"@metamask/post-message-stream>readable-stream>safe-buffer":{"packages":{"browserify>buffer":true}},"@metamask/post-message-stream>readable-stream>string_decoder":{"packages":{"@metamask/post-message-stream>readable-stream>safe-buffer":true}},"@metamask/rpc-methods>@noble/hashes":{"globals":{"TextEncoder":true,"crypto":true}},"@metamask/snaps-utils>@scure/base":{"globals":{"TextDecoder":true,"TextEncoder":true}},"@metamask/snaps-utils>cron-parser":{"packages":{"@metamask/snaps-utils>cron-parser>luxon":true,"browserify>browser-resolve":true}},"@metamask/snaps-utils>cron-parser>luxon":{"globals":{"Intl":true}},"@metamask/snaps-utils>rfdc":{"packages":{"browserify>buffer":true}},"@metamask/snaps-utils>validate-npm-package-name":{"packages":{"@metamask/snaps-utils>validate-npm-package-name>builtins":true}},"@metamask/snaps-utils>validate-npm-package-name>builtins":{"packages":{"process":true,"ts-jest>semver":true}},"@metamask/utils":{"globals":{"TextDecoder":true,"TextEncoder":true},"packages":{"browserify>buffer":true,"eslint>debug":true,"superstruct":true,"ts-jest>semver":true}},"browserify>buffer":{"globals":{"console":true},"packages":{"buffer>base64-js":true,"buffer>ieee754":true}},"browserify>events":{"globals":{"console":true}},"browserify>readable-stream>core-util-is":{"packages":{"browserify>insert-module-globals>is-buffer":true}},"browserify>readable-stream>util-deprecate":{"globals":{"console.trace":true,"console.warn":true,"localStorage":true}},"browserify>timers-browserify":{"globals":{"clearInterval":true,"clearTimeout":true,"setInterval":true,"setTimeout":true},"packages":{"process":true}},"eslint>debug":{"globals":{"console":true,"document":true,"localStorage":true,"navigator":true,"process":true},"packages":{"eslint>debug>ms":true,"process":true}},"external:../snaps-utils/src/checksum.ts":{"packages":{"@metamask/rpc-methods>@noble/hashes":true,"@metamask/utils":true,"external:../snaps-utils/src/virtual-file/VirtualFile.ts":true}},"external:../snaps-utils/src/cronjob.ts":{"packages":{"@metamask/snaps-utils>cron-parser":true,"@metamask/utils":true,"superstruct":true}},"external:../snaps-utils/src/deep-clone.ts":{"packages":{"@metamask/snaps-utils>rfdc":true}},"external:../snaps-utils/src/index.browser.ts":{"packages":{"external:../snaps-utils/src/caveats.ts":true,"external:../snaps-utils/src/checksum.ts":true,"external:../snaps-utils/src/cronjob.ts":true,"external:../snaps-utils/src/deep-clone.ts":true,"external:../snaps-utils/src/default-endowments.ts":true,"external:../snaps-utils/src/entropy.ts":true,"external:../snaps-utils/src/handlers.ts":true,"external:../snaps-utils/src/iframe.ts":true,"external:../snaps-utils/src/json-rpc.ts":true,"external:../snaps-utils/src/logging.ts":true,"external:../snaps-utils/src/manifest/index.browser.ts":true,"external:../snaps-utils/src/namespace.ts":true,"external:../snaps-utils/src/notification.ts":true,"external:../snaps-utils/src/path.ts":true,"external:../snaps-utils/src/snaps.ts":true,"external:../snaps-utils/src/types.ts":true,"external:../snaps-utils/src/versions.ts":true,"external:../snaps-utils/src/virtual-file/index.browser.ts":true}},"external:../snaps-utils/src/json-rpc.ts":{"packages":{"@metamask/utils":true,"superstruct":true}},"external:../snaps-utils/src/logging.ts":{"globals":{"console":true},"packages":{"@metamask/utils":true}},"external:../snaps-utils/src/manifest/index.browser.ts":{"packages":{"external:../snaps-utils/src/manifest/validation.ts":true}},"external:../snaps-utils/src/manifest/validation.ts":{"packages":{"@metamask/utils":true,"external:../snaps-utils/src/cronjob.ts":true,"external:../snaps-utils/src/entropy.ts":true,"external:../snaps-utils/src/json-rpc.ts":true,"external:../snaps-utils/src/namespace.ts":true,"external:../snaps-utils/src/snaps.ts":true,"external:../snaps-utils/src/types.ts":true,"superstruct":true}},"external:../snaps-utils/src/namespace.ts":{"packages":{"@metamask/utils":true,"superstruct":true}},"external:../snaps-utils/src/notification.ts":{"packages":{"@metamask/utils":true,"external:../snaps-utils/src/namespace.ts":true,"superstruct":true}},"external:../snaps-utils/src/path.ts":{"packages":{"@metamask/utils":true}},"external:../snaps-utils/src/snaps.ts":{"packages":{"@metamask/snaps-utils>@scure/base":true,"@metamask/snaps-utils>validate-npm-package-name":true,"@metamask/utils":true,"external:../snaps-utils/src/caveats.ts":true,"external:../snaps-utils/src/checksum.ts":true,"external:../snaps-utils/src/types.ts":true,"superstruct":true,"ts-jest>fast-json-stable-stringify":true}},"external:../snaps-utils/src/types.ts":{"packages":{"@metamask/utils":true,"superstruct":true}},"external:../snaps-utils/src/versions.ts":{"packages":{"@metamask/utils":true,"superstruct":true,"ts-jest>semver":true}},"external:../snaps-utils/src/virtual-file/VirtualFile.ts":{"packages":{"@metamask/utils":true,"external:../snaps-utils/src/deep-clone.ts":true}},"external:../snaps-utils/src/virtual-file/index.browser.ts":{"packages":{"external:../snaps-utils/src/virtual-file/VirtualFile.ts":true}},"process":{"globals":{"clearTimeout":true,"setTimeout":true}},"ts-jest>semver":{"globals":{"console.error":true},"packages":{"process":true,"ts-jest>semver>lru-cache":true}},"ts-jest>semver>lru-cache":{"packages":{"ts-jest>semver>lru-cache>yallist":true}}}})
2266
2012
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIn0=