@metamask/snaps-execution-environments 1.0.0-prerelease.1 → 1.0.0

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.
@@ -89,7 +89,6 @@
89
89
  // security options are hard-coded at build time
90
90
  const {
91
91
  scuttleGlobalThis,
92
- scuttleGlobalThisExceptions,
93
92
  } = {}
94
93
 
95
94
  function getGlobalRef () {
@@ -2519,7 +2518,7 @@ const evadeHtmlCommentTest= (src)=>{
2519
2518
  // /////////////////////////////////////////////////////////////////////////////
2520
2519
  $h‍_once.evadeHtmlCommentTest(evadeHtmlCommentTest);
2521
2520
  const importPattern= new FERAL_REG_EXP(
2522
- '(^|[^.])\\bimport(\\s*(?:\\(|/[/*]))',
2521
+ '(^|[^.]|\\.\\.\\.)\\bimport(\\s*(?:\\(|/[/*]))',
2523
2522
  'g');
2524
2523
 
2525
2524
 
@@ -10957,7 +10956,6 @@ function observeImports(map, importName, importIndex) {
10957
10956
  globalThisRefs,
10958
10957
  // security options
10959
10958
  scuttleGlobalThis,
10960
- scuttleGlobalThisExceptions,
10961
10959
  debugMode,
10962
10960
  runWithPrecompiledModules,
10963
10961
  reportStatsHook,
@@ -10985,7 +10983,6 @@ function observeImports(map, importName, importIndex) {
10985
10983
  getExternalCompartment,
10986
10984
  globalThisRefs,
10987
10985
  scuttleGlobalThis,
10988
- scuttleGlobalThisExceptions,
10989
10986
  debugMode,
10990
10987
  runWithPrecompiledModules,
10991
10988
  reportStatsHook,
@@ -11004,8 +11001,7 @@ function observeImports(map, importName, importIndex) {
11004
11001
  prepareModuleInitializerArgs,
11005
11002
  getExternalCompartment,
11006
11003
  globalThisRefs = ['globalThis'],
11007
- scuttleGlobalThis = false,
11008
- scuttleGlobalThisExceptions = [],
11004
+ scuttleGlobalThis = {},
11009
11005
  debugMode = false,
11010
11006
  runWithPrecompiledModules = false,
11011
11007
  reportStatsHook = () => {},
@@ -11551,6 +11547,7 @@ module.exports = {
11551
11547
  return module.exports
11552
11548
  })()
11553
11549
 
11550
+ const scuttleOpts = generateScuttleOpts(scuttleGlobalThis)
11554
11551
  const moduleCache = new Map()
11555
11552
  const packageCompartmentCache = new Map()
11556
11553
  const globalStore = new Map()
@@ -11559,22 +11556,11 @@ module.exports = {
11559
11556
  const rootPackageCompartment = createRootPackageCompartment(globalRef)
11560
11557
 
11561
11558
  // scuttle globalThis right after we used it to create the root package compartment
11562
- if (scuttleGlobalThis) {
11563
- if (!Array.isArray(scuttleGlobalThisExceptions)) {
11564
- throw new Error(`LavaMoat - scuttleGlobalThisExceptions must be an array, got "${typeof scuttleGlobalThisExceptions}"`)
11559
+ if (scuttleOpts.enabled) {
11560
+ if (!Array.isArray(scuttleOpts.exceptions)) {
11561
+ throw new Error(`LavaMoat - scuttleGlobalThis.exceptions must be an array, got "${typeof scuttleOpts.exceptions}"`)
11565
11562
  }
11566
- // turn scuttleGlobalThisExceptions regexes strings to actual regexes
11567
- for (let i = 0; i < scuttleGlobalThisExceptions.length; i++) {
11568
- const prop = scuttleGlobalThisExceptions[i]
11569
- if (!prop.startsWith('/')) {
11570
- continue
11571
- }
11572
- const parts = prop.split('/')
11573
- const pattern = parts.slice(1, -1).join('/')
11574
- const flags = parts[parts.length - 1]
11575
- scuttleGlobalThisExceptions[i] = new RegExp(pattern, flags)
11576
- }
11577
- performScuttleGlobalThis(globalRef, scuttleGlobalThisExceptions)
11563
+ scuttleOpts.scuttlerFunc(globalRef, realm => performScuttleGlobalThis(realm, scuttleOpts.exceptions))
11578
11564
  }
11579
11565
 
11580
11566
  const kernel = {
@@ -11587,6 +11573,43 @@ module.exports = {
11587
11573
  Object.freeze(kernel)
11588
11574
  return kernel
11589
11575
 
11576
+ // generate final scuttling options (1) by taking default
11577
+ // options into consideration, (2) turning RE strings into
11578
+ // actual REs and (3) without mutating original opts object
11579
+ function generateScuttleOpts(originalOpts) {
11580
+ const defaultOpts = {
11581
+ enabled: true,
11582
+ exceptions: [],
11583
+ scuttlerName: '',
11584
+ }
11585
+ const opts = Object.assign({},
11586
+ originalOpts === true ? { ... defaultOpts } : { ...originalOpts },
11587
+ { scuttlerFunc: (globalRef, scuttle) => scuttle(globalRef) },
11588
+ { exceptions: (originalOpts.exceptions || defaultOpts.exceptions).map(e => toRE(e)) },
11589
+ )
11590
+ if (opts.scuttlerName) {
11591
+ if (!globalRef[opts.scuttlerName]) {
11592
+ throw new Error(
11593
+ `LavaMoat - 'scuttlerName' function "${opts.scuttlerName}" expected on globalRef.` +
11594
+ 'To learn more visit https://github.com/LavaMoat/LavaMoat/pull/462.',
11595
+ )
11596
+ }
11597
+ opts.scuttlerFunc = globalRef[opts.scuttlerName]
11598
+ }
11599
+ return opts
11600
+
11601
+ function toRE(except) {
11602
+ // turn scuttleGlobalThis.exceptions regexes strings to actual regexes
11603
+ if (!except.startsWith('/')) {
11604
+ return except
11605
+ }
11606
+ const parts = except.split('/')
11607
+ const pattern = parts.slice(1, -1).join('/')
11608
+ const flags = parts[parts.length - 1]
11609
+ return new RegExp(pattern, flags)
11610
+ }
11611
+ }
11612
+
11590
11613
  function performScuttleGlobalThis (globalRef, extraPropsToAvoid = new Array()) {
11591
11614
  const props = new Array()
11592
11615
  getPrototypeChain(globalRef)
@@ -11989,7 +12012,6 @@ module.exports = {
11989
12012
  globalRef,
11990
12013
  globalThisRefs,
11991
12014
  scuttleGlobalThis,
11992
- scuttleGlobalThisExceptions,
11993
12015
  debugMode,
11994
12016
  runWithPrecompiledModules,
11995
12017
  reportStatsHook,
@@ -12117,11 +12139,11 @@ module.exports = {
12117
12139
 
12118
12140
  })()
12119
12141
 
12120
- LavaPack.loadBundle([[1,{"./Substream":2,"end-of-stream":95,once:131,"readable-stream":12},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ObjectMultiplex=void 0;const s=e("readable-stream"),i=n(e("end-of-stream")),o=n(e("once")),a=e("./Substream"),u=Symbol("IGNORE_SUBSTREAM");class c extends s.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new a.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const r=o.default(t);i.default(e,{readable:!1},r),i.default(e,{writable:!1},r)}(this,(e=>t.destroy(e||undefined))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=u}_read(){return undefined}_write(e,t,r){const{name:n,data:s}=e;if(!n)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const i=this._substreams[n];return i?(i!==u&&i.push(s),r()):(console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}}r.ObjectMultiplex=c}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/ObjectMultiplex.js"}],[2,{"readable-stream":12},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Substream=void 0;const n=e("readable-stream");class s extends n.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){return undefined}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}r.Substream=s}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/Substream.js"}],[3,{"./ObjectMultiplex":1},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./ObjectMultiplex");t.exports=n.ObjectMultiplex}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/index.js"}],[4,{"./_stream_readable":6,"./_stream_writable":8,"core-util-is":88,inherits:104,"process-nextick-args":132},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args"),s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=d;var i=Object.create(e("core-util-is"));i.inherits=e("inherits");var o=e("./_stream_readable"),a=e("./_stream_writable");i.inherits(d,o);for(var u=s(a.prototype),c=0;c<u.length;c++){var l=u[c];d.prototype[l]||(d.prototype[l]=a.prototype[l])}function d(e){if(!(this instanceof d))return new d(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_duplex.js"}],[5,{"./_stream_transform":7,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=i;var n=e("./_stream_transform"),s=Object.create(e("core-util-is"));function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}s.inherits=e("inherits"),s.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_passthrough.js"}],[6,{"./_stream_duplex":4,"./internal/streams/BufferList":9,"./internal/streams/destroy":10,"./internal/streams/stream":11,"core-util-is":88,events:"events",inherits:104,isarray:108,"process-nextick-args":132,"safe-buffer":13,"string_decoder/":14,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");t.exports=w;var s,i=e("isarray");w.ReadableState=b;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=global.Uint8Array||function(){};var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var d=e("util"),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var f,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");l.inherits(w,a);var g=["error","close","destroy","pause","resume"];function b(t,r){t=t||{};var n=r instanceof(s=s||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function w(t){if(s=s||e("./_stream_duplex"),!(this instanceof w))return new w(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function v(e,t,r,n,s){var i,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,o)):(s||(i=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||t===undefined||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),i?e.emit("error",i):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):y(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?y(e,o,t,!1):T(e,o)):y(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function y(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),T(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),v(this,e,t,!1,r)},w.prototype.unshift=function(e){return v(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return f||(f=e("string_decoder/").StringDecoder),this._readableState.decoder=new f(t),this._readableState.encoding=t,this};var _=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(E,e):E(e))}function E(e){h("emit readable"),e.emit("readable"),M(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(R,e,t))}function R(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function j(e){h("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,s=r.data;e-=s.length;for(;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(o===i.length?s+=i:s+=i.slice(0,e),0===(e-=o)){o===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(o));break}++n}return t.length-=n,s}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,s=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,o),0===(e-=o)){o===i.length?(++s,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(o));break}++s}return t.length-=s,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):k(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,s=t.needReadable;return h("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",s=!0),t.ended||t.reading?h("reading or ended",s=!1):s&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,h("pipe count=%d opts=%j",s.pipesCount,t);var a=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:w;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",w),r.removeListener("data",p),d=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){h("onend"),e.end()}s.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",l);var d=!1;var f=!1;function p(t){h("ondata"),f=!1,!1!==e.write(t)||f||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==I(s.pipes,e))&&!d&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function m(t){h("onerror",t),w(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),w()}function b(){h("onfinish"),e.removeListener("close",g),w()}function w(){h("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?i(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",b),e.emit("pipe",r),s.flowing||(h("pipe resume"),r.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<s;i++)n[i].emit("unpipe",this,r);return this}var o=I(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},w.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var s=this._readableState;s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.emittedReadable=!1,s.reading?s.length&&k(this):n.nextTick(j,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(x,e,t))}(this,e)),this},w.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){(h("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!r.objectMode||null!==s&&s!==undefined)&&((r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause())))})),e)this[s]===undefined&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<g.length;i++)e.on(g[i],this.emit.bind(this,g[i]));return this._read=function(t){h("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=O}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_readable.js"}],[7,{"./_stream_duplex":4,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=o;var n=e("./_stream_duplex"),s=Object.create(e("core-util-is"));function i(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}s.inherits=e("inherits"),s.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_transform.js"}],[8,{"./_stream_duplex":4,"./internal/streams/destroy":10,"./internal/streams/stream":11,"core-util-is":88,inherits:104,"process-nextick-args":132,"safe-buffer":13,timers:"timers","util-deprecate":180},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=g;var i,o=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?r:n.nextTick;g.WritableState=m;var a=Object.create(e("core-util-is"));a.inherits=e("inherits");var u={deprecate:e("util-deprecate")},c=e("./internal/streams/stream"),l=e("safe-buffer").Buffer,d=global.Uint8Array||function(){};var h,f=e("./internal/streams/destroy");function p(){}function m(t,r){i=i||e("./_stream_duplex"),t=t||{};var a=r instanceof i;this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:a&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,s=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,s,i){--t.pendingcb,r?(n.nextTick(i,s),n.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",s)):(i(s),e._writableState.errorEmitted=!0,e.emit("error",s),S(e,t))}(e,r,s,t,i);else{var a=y(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),s?o(w,e,r,a,i):w(e,r,a,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function g(t){if(i=i||e("./_stream_duplex"),!(h.call(g,this)||this instanceof i))return new g(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),c.call(this)}function b(e,t,r,n,s,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,b(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,d=r.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var r=y(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(_,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}a.inherits(g,c),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===g&&(e&&e._writableState instanceof m)}})):h=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var s,i=this._writableState,o=!1,a=!i.objectMode&&(s=e,l.isBuffer(s)||s instanceof d);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=p),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(a||function(e,t,r,s){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||r===undefined||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),n.nextTick(s,o),i=!1),i}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,s,i){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,s);n!==o&&(r=!0,s="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,a,n,s,i);return u}(this,i,a,e,t,r)),o},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var s=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||s.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,s,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=f.destroy,g.prototype._undestroy=f.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("timers").setImmediate)}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_writable.js"}],[9,{"safe-buffer":13,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,s,i=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,s=a,t.copy(r,s),a+=o.data.length,o=o.next;return i},e}(),s&&s.inspect&&s.inspect.custom&&(t.exports.prototype[s.inspect.custom]=function(){var e=s.inspect({length:this.length});return this.constructor.name+" "+e})}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/BufferList.js"}],[10,{"process-nextick-args":132},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");function s(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(s,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[11,{stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("stream")}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/stream.js"}],[12,{"./lib/_stream_duplex.js":4,"./lib/_stream_passthrough.js":5,"./lib/_stream_readable.js":6,"./lib/_stream_transform.js":7,"./lib/_stream_writable.js":8,stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("stream");"disable"===process.env.READABLE_STREAM&&n?(t.exports=n,(r=t.exports=n.Readable).Readable=n.Readable,r.Writable=n.Writable,r.Duplex=n.Duplex,r.Transform=n.Transform,r.PassThrough=n.PassThrough,r.Stream=n):((r=t.exports=e("./lib/_stream_readable.js")).Stream=n||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"))}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/readable.js"}],[13,{buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("buffer"),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=o),i(s,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"@metamask/object-multiplex>readable-stream>safe-buffer",file:"../../node_modules/@metamask/object-multiplex/node_modules/safe-buffer/index.js"}],[14,{"safe-buffer":13},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=o(t[n]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"@metamask/object-multiplex>readable-stream>string_decoder",file:"../../node_modules/@metamask/object-multiplex/node_modules/string_decoder/lib/string_decoder.js"}],[15,{"readable-stream":53},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BasePostMessageStream=void 0;const n=e("readable-stream"),s=()=>undefined,i="ACK";class o extends n.Duplex{constructor(){super({objectMode:!0}),this._init=!1,this._haveSyn=!1}_handshake(){this._write("SYN",null,s),this.cork()}_onData(e){if(this._init)try{this.push(e)}catch(e){this.emit("error",e)}else"SYN"===e?(this._haveSyn=!0,this._write(i,null,s)):e===i&&(this._init=!0,this._haveSyn||this._write(i,null,s),this.uncork())}_read(){return undefined}_write(e,t,r){this._postMessage(e),r()}}r.BasePostMessageStream=o}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/BasePostMessageStream.js"}],[16,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerParentPostMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({worker:e}){super(),this._target=s.DEDICATED_WORKER_NAME,this._worker=e,this._worker.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){this._worker.postMessage({target:this._target,data:e})}_onMessage(e){const t=e.data;(0,s.isValidStreamMessage)(t)&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}r.WebWorkerParentPostMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerParentPostMessageStream.js"}],[17,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerPostMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.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=s.DEDICATED_WORKER_NAME,self.addEventListener("message",this._onMessage.bind(this)),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;(0,s.isValidStreamMessage)(t)&&t.target===this._name&&this._onData(t.data)}_destroy(){return undefined}}r.WebWorkerPostMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerPostMessageStream.js"}],[18,{"./BasePostMessageStream":15,"./WebWorker/WebWorkerParentPostMessageStream":16,"./WebWorker/WebWorkerPostMessageStream":17,"./node-process/ProcessMessageStream":19,"./node-process/ProcessParentMessageStream":20,"./node-thread/ThreadMessageStream":21,"./node-thread/ThreadParentMessageStream":22,"./runtime/BrowserRuntimePostMessageStream":23,"./window/WindowPostMessageStream":25},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./window/WindowPostMessageStream"),r),s(e("./WebWorker/WebWorkerPostMessageStream"),r),s(e("./WebWorker/WebWorkerParentPostMessageStream"),r),s(e("./node-process/ProcessParentMessageStream"),r),s(e("./node-process/ProcessMessageStream"),r),s(e("./node-thread/ThreadParentMessageStream"),r),s(e("./node-thread/ThreadMessageStream"),r),s(e("./runtime/BrowserRuntimePostMessageStream"),r),s(e("./BasePostMessageStream"),r)}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/index.js"}],[19,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ProcessMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor(){if(super(),"function"!=typeof globalThis.process.send)throw new Error("Parent IPC channel not found. This class should only be instantiated in a Node.js child process.");this._onMessage=this._onMessage.bind(this),globalThis.process.on("message",this._onMessage),this._handshake()}_postMessage(e){globalThis.process.send({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){globalThis.process.removeListener("message",this._onMessage)}}r.ProcessMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-process/ProcessMessageStream.js"}],[20,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ProcessParentMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({process:e}){super(),this._process=e,this._onMessage=this._onMessage.bind(this),this._process.on("message",this._onMessage),this._handshake()}_postMessage(e){this._process.send({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){this._process.removeListener("message",this._onMessage)}}r.ProcessParentMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-process/ProcessParentMessageStream.js"}],[21,{"../BasePostMessageStream":15,"../utils":24,worker_threads:"worker_threads"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.ThreadMessageStream=void 0;const o=e("worker_threads"),a=e("../BasePostMessageStream"),u=e("../utils");class c extends a.BasePostMessageStream{constructor(){if(super(),n.set(this,void 0),!o.parentPort)throw new Error("Parent port not found. This class should only be instantiated in a Node.js worker thread.");s(this,n,o.parentPort,"f"),this._onMessage=this._onMessage.bind(this),i(this,n,"f").on("message",this._onMessage),this._handshake()}_postMessage(e){i(this,n,"f").postMessage({data:e})}_onMessage(e){(0,u.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){i(this,n,"f").removeListener("message",this._onMessage)}}r.ThreadMessageStream=c,n=new WeakMap}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-thread/ThreadMessageStream.js"}],[22,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ThreadParentMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({thread:e}){super(),this._thread=e,this._onMessage=this._onMessage.bind(this),this._thread.on("message",this._onMessage),this._handshake()}_postMessage(e){this._thread.postMessage({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){this._thread.removeListener("message",this._onMessage)}}r.ThreadParentMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-thread/ThreadParentMessageStream.js"}],[23,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserRuntimePostMessageStream=void 0;const a=e("../BasePostMessageStream"),u=e("../utils");class c extends a.BasePostMessageStream{constructor({name:e,target:t}){super(),n.set(this,void 0),s.set(this,void 0),i(this,n,e,"f"),i(this,s,t,"f"),this._onMessage=this._onMessage.bind(this),this._getRuntime().onMessage.addListener(this._onMessage),this._handshake()}_postMessage(e){this._getRuntime().sendMessage({target:o(this,s,"f"),data:e})}_onMessage(e){(0,u.isValidStreamMessage)(e)&&e.target===o(this,n,"f")&&this._onData(e.data)}_getRuntime(){var e,t;if("chrome"in globalThis&&"function"==typeof(null===(e=null===chrome||void 0===chrome?void 0:chrome.runtime)||void 0===e?void 0:e.sendMessage))return chrome.runtime;if("browser"in globalThis&&"function"==typeof(null===(t=null===browser||void 0===browser?void 0:browser.runtime)||void 0===t?void 0:t.sendMessage))return browser.runtime;throw new Error("browser.runtime.sendMessage is not a function. This class should only be instantiated in a web extension.")}_destroy(){this._getRuntime().onMessage.removeListener(this._onMessage)}}r.BrowserRuntimePostMessageStream=c,n=new WeakMap,s=new WeakMap}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/runtime/BrowserRuntimePostMessageStream.js"}],[24,{"@metamask/utils":34},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isValidStreamMessage=r.DEDICATED_WORKER_NAME=void 0;const n=e("@metamask/utils");r.DEDICATED_WORKER_NAME="dedicatedWorker",r.isValidStreamMessage=function(e){return(0,n.isObject)(e)&&Boolean(e.data)&&("number"==typeof e.data||"object"==typeof e.data||"string"==typeof e.data)}}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/utils.js"}],[25,{"../BasePostMessageStream":15,"../utils":24,"@metamask/utils":34},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s;Object.defineProperty(r,"__esModule",{value:!0}),r.WindowPostMessageStream=void 0;const i=e("@metamask/utils"),o=e("../BasePostMessageStream"),a=e("../utils"),u=null===(n=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"source"))||void 0===n?void 0:n.get;(0,i.assert)(u,"MessageEvent.prototype.source getter is not defined.");const c=null===(s=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"origin"))||void 0===s?void 0:s.get;(0,i.assert)(c,"MessageEvent.prototype.origin getter is not defined.");class l extends o.BasePostMessageStream{constructor({name:e,target:t,targetOrigin:r=location.origin,targetWindow:n=window}){if(super(),"undefined"==typeof window||"function"!=typeof window.postMessage)throw new Error("window.postMessage is not a function. This class should only be instantiated in a Window.");this._name=e,this._target=t,this._targetOrigin=r,this._targetWindow=n,this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage,!1),this._handshake()}_postMessage(e){this._targetWindow.postMessage({target:this._target,data:e},this._targetOrigin)}_onMessage(e){const t=e.data;"*"!==this._targetOrigin&&c.call(e)!==this._targetOrigin||u.call(e)!==this._targetWindow||!(0,a.isValidStreamMessage)(t)||t.target!==this._name||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}r.WindowPostMessageStream=l}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/window/WindowPostMessageStream.js"}],[26,{superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const n=e("superstruct");function s(e,t){return r=e,Boolean("string"==typeof(null===(s=null===(n=null==r?void 0:r.prototype)||void 0===n?void 0:n.constructor)||void 0===s?void 0:s.name))?new e({message:t}):e({message:t});var r,n,s}class i extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=i,r.assert=function(e,t="Assertion failed.",r=i){if(!e){if(t instanceof Error)throw t;throw s(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",o=i){try{(0,n.assert)(e,t)}catch(e){throw s(o,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/assert.js"}],[27,{"./assert":26,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const n=e("superstruct"),s=e("./assert");r.base64=(e,t={})=>{var r,i;const o=null!==(r=t.paddingRequired)&&void 0!==r&&r,a=null!==(i=t.characterSet)&&void 0!==i?i:"base64";let u,c;return"base64"===a?u=String.raw`[A-Za-z0-9+\/]`:((0,s.assert)("base64url"===a),u=String.raw`[-_A-Za-z0-9]`),c=o?new RegExp(`^(?:${u}{4})*(?:${u}{3}=|${u}{2}==)?$`,"u"):new RegExp(`^(?:${u}{4})*(?:${u}{2,3}|${u}{3}=|${u}{2}==)?$`,"u"),(0,n.pattern)(e,c)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/base64.js"}],[28,{"./assert":26,"./hex":33,buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const n=e("./assert"),s=e("./hex"),i=48,o=58,a=87;const u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function l(e){(0,n.assert)(c(e),"Value must be a Uint8Array.")}function d(e){if(l(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,s.add0x)(r.join(""))}function h(e){l(e);const t=d(e);return BigInt(t)}function f(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,s.assertIsHexString)(e);const r=(0,s.remove0x)(e).toLowerCase(),n=r.length%2==0?r:`0${r}`,u=new Uint8Array(n.length/2);for(let e=0;e<u.length;e++){const t=n.charCodeAt(2*e),r=n.charCodeAt(2*e+1),s=t-(t<o?i:a),c=r-(r<o?i:a);u[e]=16*s+c}return u}function p(e){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return f(e.toString(16))}function m(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return f(e.toString(16))}function g(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?f(e):g(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=c,r.assertIsBytes=l,r.bytesToHex=d,r.bytesToBigInt=h,r.bytesToSignedBigInt=function(e){l(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},r.bytesToNumber=function(e){l(e);const t=h(e);return(0,n.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},r.bytesToString=function(e){return l(e),(new TextDecoder).decode(e)},r.hexToBytes=f,r.bigIntToBytes=p,r.signedBigIntToBytes=function(e,t){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)("number"==typeof t,"Byte length must be a number."),(0,n.assert)(t>0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e<s.length;e++)s[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return s.reverse()},r.numberToBytes=m,r.stringToBytes=g,r.valueToBytes=b,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const s=b(e[n]);t[n]=s,r+=s.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},r.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/bytes.js"}],[29,{"./base64":27,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const n=e("superstruct"),s=e("./base64");r.ChecksumStruct=(0,n.size)((0,s.base64)((0,n.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/checksum.js"}],[30,{"./assert":26,"./bytes":28,"./hex":33,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const n=e("superstruct"),s=e("./assert"),i=e("./bytes"),o=e("./hex"),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),o.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),c=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([o.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([o.StrictHexStruct]),i.hexToBytes)),d=(0,n.coerce)(o.StrictHexStruct,(0,n.instance)(Uint8Array),i.bytesToHex);r.createNumber=function(e){try{const t=(0,n.create)(e,u);return(0,s.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,n.create)(e,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,d)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/coercers.js"}],[31,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class a{constructor(e){n.set(this,void 0),i(this,n,new Map(e),"f"),Object.freeze(this)}get size(){return o(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return o(this,n,"f")[Symbol.iterator]()}entries(){return o(this,n,"f").entries()}forEach(e,t){return o(this,n,"f").forEach(((r,n,s)=>e.call(t,r,n,this)))}get(e){return o(this,n,"f").get(e)}has(e){return o(this,n,"f").has(e)}keys(){return o(this,n,"f").keys()}values(){return o(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=a;class u{constructor(e){s.set(this,void 0),i(this,s,new Set(e),"f"),Object.freeze(this)}get size(){return o(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return o(this,s,"f")[Symbol.iterator]()}entries(){return o(this,s,"f").entries()}forEach(e,t){return o(this,s,"f").forEach(((r,n,s)=>e.call(t,r,n,this)))}has(e){return o(this,s,"f").has(e)}keys(){return o(this,s,"f").keys()}values(){return o(this,s,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=u,Object.freeze(a),Object.freeze(a.prototype),Object.freeze(u),Object.freeze(u.prototype)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/collections.js"}],[32,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/encryption-types.js"}],[33,{"./assert":26,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.StrictHexStruct=r.HexStruct=void 0;const n=e("superstruct"),s=e("./assert");function i(e){return(0,n.is)(e,r.HexStruct)}function o(e){return(0,n.is)(e,r.StrictHexStruct)}r.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),r.isHexString=i,r.isStrictHexString=o,r.assertIsHexString=function(e){(0,s.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,s.assert)(o(e),'Value must be a hexadecimal string, starting with "0x".')},r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/hex.js"}],[34,{"./assert":26,"./base64":27,"./bytes":28,"./checksum":29,"./coercers":30,"./collections":31,"./encryption-types":32,"./hex":33,"./json":35,"./keyring":36,"./logging":37,"./misc":38,"./number":39,"./opaque":40,"./time":41,"./transaction-types":42,"./versions":43},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./assert"),r),s(e("./base64"),r),s(e("./bytes"),r),s(e("./checksum"),r),s(e("./coercers"),r),s(e("./collections"),r),s(e("./encryption-types"),r),s(e("./hex"),r),s(e("./json"),r),s(e("./keyring"),r),s(e("./logging"),r),s(e("./misc"),r),s(e("./number"),r),s(e("./opaque"),r),s(e("./time"),r),s(e("./transaction-types"),r),s(e("./versions"),r)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/index.js"}],[35,{"./assert":26,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=void 0;const n=e("superstruct"),s=e("./assert");r.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>r.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,n.define)("Json",((e,t)=>{function n(e,r){const n=[...r.validator(e,t)];return!(n.length>0)||n}try{const t=n(e,r.UnsafeJsonStruct);return!0!==t?t:n(JSON.parse(JSON.stringify(e)),r.UnsafeJsonStruct)}catch(e){return e instanceof RangeError&&"Circular reference detected"}})),r.isValidJson=function(e){return(0,n.is)(e,r.JsonStruct)},r.getJsonSize=function(e){(0,s.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,n.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),r.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(r.JsonStruct),stack:(0,n.optional)((0,n.string)())}),r.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),r.JsonStruct),(0,n.array)(r.JsonStruct)])),r.JsonRpcRequestStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,n.string)(),params:r.JsonRpcParamsStruct}),r.JsonRpcNotificationStruct=(0,n.omit)(r.JsonRpcRequestStruct,["id"]),r.isJsonRpcNotification=function(e){return(0,n.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,s.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,n.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,s.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,n.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,n.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,n.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,s.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,n.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,s.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,n.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,s.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},e);return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/json.js"}],[36,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/keyring.js"}],[37,{debug:92},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const s=(0,n(e("debug")).default)("metamask");r.createProjectLogger=function(e){return s.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/logging.js"}],[38,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function n(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},r.isASCII=n,r.calculateStringSize=function(e){var t;return e.split("").reduce(((e,t)=>n(t)?e+1:e+2),0)+(null!==(t=e.match(r.ESCAPE_CHARACTERS_REGEXP))&&void 0!==t?t:[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/misc.js"}],[39,{"./assert":26,"./hex":33},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const n=e("./assert"),s=e("./hex");r.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,s.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,s.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,s.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,s.assertIsHexString)(e),BigInt((0,s.add0x)(e)))}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/number.js"}],[40,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/opaque.js"}],[41,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.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"}(r.Duration||(r.Duration={}));const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return n(e,"count"),e*t},r.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/time.js"}],[42,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/transaction-types.js"}],[43,{"./assert":26,semver:161,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const n=e("semver"),s=e("superstruct"),i=e("./assert");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,i.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,i.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/versions.js"}],[44,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?t.exports=function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,i,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(s=new Array(o-1),i=0;i<s.length;)s[i++]=arguments[i];return process.nextTick((function(){e.apply(null,s)}))}}:t.exports=process.nextTick}}},{package:"@metamask/post-message-stream>readable-stream>process-nextick-args",file:"../../node_modules/@metamask/post-message-stream/node_modules/process-nextick-args/index.js"}],[45,{"./_stream_readable":47,"./_stream_writable":49,"core-util-is":88,inherits:104,"process-nextick-args":44},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args"),s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=d;var i=e("core-util-is");i.inherits=e("inherits");var o=e("./_stream_readable"),a=e("./_stream_writable");i.inherits(d,o);for(var u=s(a.prototype),c=0;c<u.length;c++){var l=u[c];d.prototype[l]||(d.prototype[l]=a.prototype[l])}function d(e){if(!(this instanceof d))return new d(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n(f,this)}function f(e){e.end()}Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),n(t,e)}}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_duplex.js"}],[46,{"./_stream_transform":48,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=i;var n=e("./_stream_transform"),s=e("core-util-is");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}s.inherits=e("inherits"),s.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_passthrough.js"}],[47,{"./_stream_duplex":45,"./internal/streams/BufferList":50,"./internal/streams/destroy":51,"./internal/streams/stream":52,"core-util-is":88,events:"events",inherits:104,isarray:108,"process-nextick-args":44,"safe-buffer":54,"string_decoder/":55,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");t.exports=w;var s,i=e("isarray");w.ReadableState=b;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=global.Uint8Array||function(){};var l=e("core-util-is");l.inherits=e("inherits");var d=e("util"),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var f,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");l.inherits(w,a);var g=["error","close","destroy","pause","resume"];function b(t,r){s=s||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof s&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function w(t){if(s=s||e("./_stream_duplex"),!(this instanceof w))return new w(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function v(e,t,r,n,s){var i,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,o)):(s||(i=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||t===undefined||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),i?e.emit("error",i):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):y(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?y(e,o,t,!1):T(e,o)):y(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function y(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),T(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),v(this,e,t,!1,r)},w.prototype.unshift=function(e){return v(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return f||(f=e("string_decoder/").StringDecoder),this._readableState.decoder=new f(t),this._readableState.encoding=t,this};var _=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n(E,e):E(e))}function E(e){h("emit readable"),e.emit("readable"),M(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n(R,e,t))}function R(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function j(e){h("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,s=r.data;e-=s.length;for(;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(o===i.length?s+=i:s+=i.slice(0,e),0===(e-=o)){o===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(o));break}++n}return t.length-=n,s}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,s=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,o),0===(e-=o)){o===i.length?(++s,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(o));break}++s}return t.length-=s,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):k(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,s=t.needReadable;return h("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",s=!0),t.ended||t.reading?h("reading or ended",s=!1):s&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,h("pipe count=%d opts=%j",s.pipesCount,t);var a=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:w;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",w),r.removeListener("data",p),d=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){h("onend"),e.end()}s.endEmitted?n(a):r.once("end",a),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",l);var d=!1;var f=!1;function p(t){h("ondata"),f=!1,!1!==e.write(t)||f||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==I(s.pipes,e))&&!d&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function m(t){h("onerror",t),w(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),w()}function b(){h("onfinish"),e.removeListener("close",g),w()}function w(){h("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?i(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",b),e.emit("pipe",r),s.flowing||(h("pipe resume"),r.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<s;i++)n[i].emit("unpipe",this,r);return this}var o=I(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},w.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var s=this._readableState;s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.emittedReadable=!1,s.reading?s.length&&k(this):n(j,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n(x,e,t))}(this,e)),this},w.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var s in e.on("end",(function(){if(h("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(s){(h("wrapped data"),t.decoder&&(s=t.decoder.write(s)),!t.objectMode||null!==s&&s!==undefined)&&((t.objectMode||s&&s.length)&&(n.push(s)||(r=!0,e.pause())))})),e)this[s]===undefined&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<g.length;i++)e.on(g[i],n.emit.bind(n,g[i]));return n._read=function(t){h("wrapped _read",t),r&&(r=!1,e.resume())},n},w._fromList=O}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_readable.js"}],[48,{"./_stream_duplex":45,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=o;var n=e("./_stream_duplex"),s=e("core-util-is");function i(e){this.afterTransform=function(t,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var s=n.writecb;if(!s)return e.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!==r&&r!==undefined&&e.push(r);s(t);var i=e._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&e._read(i.highWaterMark)}(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState=new i(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e,r){a(t,e,r)})):a(t)}))}function a(e,t,r){if(t)return e.emit("error",t);null!==r&&r!==undefined&&e.push(r);var n=e._writableState,s=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(s.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}s.inherits=e("inherits"),s.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_transform.js"}],[49,{"./_stream_duplex":45,"./internal/streams/destroy":51,"./internal/streams/stream":52,"core-util-is":88,inherits:104,"process-nextick-args":44,"safe-buffer":54,timers:"timers","util-deprecate":180},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=g;var i,o=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?r:n;g.WritableState=m;var a=e("core-util-is");a.inherits=e("inherits");var u={deprecate:e("util-deprecate")},c=e("./internal/streams/stream"),l=e("safe-buffer").Buffer,d=global.Uint8Array||function(){};var h,f=e("./internal/streams/destroy");function p(){}function m(t,r){i=i||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var a=t.highWaterMark,u=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,s=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,s,i){--t.pendingcb,r?(n(i,s),n(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",s)):(i(s),e._writableState.errorEmitted=!0,e.emit("error",s),S(e,t))}(e,r,s,t,i);else{var a=y(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),s?o(w,e,r,a,i):w(e,r,a,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function g(t){if(i=i||e("./_stream_duplex"),!(h.call(g,this)||this instanceof i))return new g(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),c.call(this)}function b(e,t,r,n,s,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,b(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t)}else{for(;r;){var c=r.chunk,l=r.encoding,d=r.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,l,d),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var r=y(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n(_,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}a.inherits(g,c),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||e&&e._writableState instanceof m}})):h=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var s,i=this._writableState,o=!1,a=(s=e,(l.isBuffer(s)||s instanceof d)&&!i.objectMode);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=p),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n(t,r)}(this,r):(a||function(e,t,r,s){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||r===undefined||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),n(s,o),i=!1),i}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,s,i){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,s);n!==o&&(r=!0,s="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,a,n,s,i);return u}(this,i,a,e,t,r)),o},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var s=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||s.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?n(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,s,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=f.destroy,g.prototype._undestroy=f.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("timers").setImmediate)}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_writable.js"}],[50,{"safe-buffer":54},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer;t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,s,i=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,s=a,t.copy(r,s),a+=o.data.length,o=o.next;return i},e}()}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js"}],[51,{"process-nextick-args":44},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");function s(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;i||o?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n(s,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n(s,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})))},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[52,{stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("stream")}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/internal/streams/stream.js"}],[53,{"./lib/_stream_duplex.js":45,"./lib/_stream_passthrough.js":46,"./lib/_stream_readable.js":47,"./lib/_stream_transform.js":48,"./lib/_stream_writable.js":49,stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("stream");"disable"===process.env.READABLE_STREAM&&n?(t.exports=n,(r=t.exports=n.Readable).Readable=n.Readable,r.Writable=n.Writable,r.Duplex=n.Duplex,r.Transform=n.Transform,r.PassThrough=n.PassThrough,r.Stream=n):((r=t.exports=e("./lib/_stream_readable.js")).Stream=n||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"))}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/readable.js"}],[54,{buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("buffer"),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=o),i(s,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"@metamask/post-message-stream>readable-stream>safe-buffer",file:"../../node_modules/@metamask/post-message-stream/node_modules/safe-buffer/index.js"}],[55,{"safe-buffer":54},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=o(t[n]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--n<r)return 0;if(s=o(t[n]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--n<r)return 0;if(s=o(t[n]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"@metamask/post-message-stream>readable-stream>string_decoder",file:"../../node_modules/@metamask/post-message-stream/node_modules/string_decoder/lib/string_decoder.js"}],[56,{"./messages":63,"./utils":67,"@metamask/safe-event-emitter":69,"eth-rpc-errors":99,"fast-deep-equal":68,"json-rpc-engine":114},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.BaseProvider=void 0;const s=n(e("@metamask/safe-event-emitter")),i=e("eth-rpc-errors"),o=n(e("fast-deep-equal")),a=e("json-rpc-engine"),u=n(e("./messages")),c=e("./utils");class l extends s.default{constructor({logger:e=console,maxEventListeners:t=100,rpcMiddleware:r=[]}={}){super(),this._log=e,this.setMaxListeners(t),this._state=Object.assign({},l._defaultState),this.selectedAddress=null,this.chainId=null,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this.request=this.request.bind(this);const n=new a.JsonRpcEngine;r.forEach((e=>n.push(e))),this._rpcEngine=n}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw i.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestArgs(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw i.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestMethod(),data:e});if(r!==undefined&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw i.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestParams(),data:e});return new Promise(((e,n)=>{this._rpcRequest({method:t,params:r},c.getRpcPromiseCallback(e,n))}))}_initializeState(e){if(!0===this._state.initialized)throw new Error("Provider already initialized.");if(e){const{accounts:t,chainId:r,isUnlocked:n,networkVersion:s}=e;this._handleConnect(r),this._handleChainChanged({chainId:r,networkVersion:s}),this._handleUnlockStateChanged({accounts:t,isUnlocked:n}),this._handleAccountsChanged(t)}this._state.initialized=!0,this.emit("_initialized")}_rpcRequest(e,t){let r=t;return Array.isArray(e)||(e.jsonrpc||(e.jsonrpc="2.0"),"eth_accounts"!==e.method&&"eth_requestAccounts"!==e.method||(r=(r,n)=>{this._handleAccountsChanged(n.result||[],"eth_accounts"===e.method),t(r,n)})),this._rpcEngine.handle(e,r)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),this._log.debug(u.default.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new i.EthereumRpcError(1013,t||u.default.errors.disconnected()),this._log.debug(r)):(r=new i.EthereumRpcError(1011,t||u.default.errors.permanentlyDisconnected()),this._log.error(r),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleChainChanged({chainId:e}={}){c.isValidChainId(e)?(this._handleConnect(e),e!==this.chainId&&(this.chainId=e,this._state.initialized&&this.emit("chainChanged",this.chainId))):this._log.error(u.default.errors.invalidNetworkParams(),{chainId:e})}_handleAccountsChanged(e,t=!1){let r=e;Array.isArray(e)||(this._log.error("MetaMask: Received invalid accounts parameter. Please report this bug.",e),r=[]);for(const t of e)if("string"!=typeof t){this._log.error("MetaMask: Received non-string account. Please report this bug.",e),r=[];break}o.default(this._state.accounts,r)||(t&&null!==this._state.accounts&&this._log.error("MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.",r),this._state.accounts=r,this.selectedAddress!==r[0]&&(this.selectedAddress=r[0]||null),this._state.initialized&&this.emit("accountsChanged",r))}_handleUnlockStateChanged({accounts:e,isUnlocked:t}={}){"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e||[])):this._log.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.")}}r.BaseProvider=l,l._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/BaseProvider.js"}],[57,{"./StreamProvider":58,"./messages":63,"./siteMetadata":66,"./utils":67,"eth-rpc-errors":99},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.MetaMaskInpageProvider=r.MetaMaskInpageProviderStreamName=void 0;const s=e("eth-rpc-errors"),i=e("./siteMetadata"),o=n(e("./messages")),a=e("./utils"),u=e("./StreamProvider");r.MetaMaskInpageProviderStreamName="metamask-provider";class c extends u.AbstractStreamProvider{constructor(e,{jsonRpcStreamName:t=r.MetaMaskInpageProviderStreamName,logger:n=console,maxEventListeners:s,shouldSendMetadata:o}={}){if(super(e,{jsonRpcStreamName:t,logger:n,maxEventListeners:s,rpcMiddleware:a.getDefaultExternalMiddleware(n)}),this._sentWarnings={enable:!1,experimentalMethods:!1,send:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}},this._initializeStateAsync(),this.networkVersion=null,this.isMetaMask=!0,this._sendSync=this._sendSync.bind(this),this.enable=this.enable.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._metamask=this._getExperimentalApi(),this._jsonRpcConnection.events.on("notification",(e=>{const{method:t}=e;a.EMITTED_NOTIFICATIONS.includes(t)&&(this.emit("data",e),this.emit("notification",e.params.result))})),o)if("complete"===document.readyState)i.sendSiteMetadata(this._rpcEngine,this._log);else{const e=()=>{i.sendSiteMetadata(this._rpcEngine,this._log),window.removeEventListener("DOMContentLoaded",e)};window.addEventListener("DOMContentLoaded",e)}}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}_handleDisconnect(e,t){super._handleDisconnect(e,t),this.networkVersion&&!e&&(this.networkVersion=null)}_warnOfDeprecation(e){var t;!1===(null===(t=this._sentWarnings)||void 0===t?void 0:t.events[e])&&(this._log.warn(o.default.warnings.events[e]),this._sentWarnings.events[e]=!0)}enable(){return this._sentWarnings.enable||(this._log.warn(o.default.warnings.enableDeprecation),this._sentWarnings.enable=!0),new Promise(((e,t)=>{try{this._rpcRequest({method:"eth_requestAccounts",params:[]},a.getRpcPromiseCallback(e,t))}catch(e){t(e)}}))}send(e,t){return this._sentWarnings.send||(this._log.warn(o.default.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((r,n)=>{try{this._rpcRequest({method:e,params:t},a.getRpcPromiseCallback(r,n,!1))}catch(e){n(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress||null;break;case"eth_uninstallFilter":this._rpcRequest(e,a.NOOP),t=!0;break;case"net_version":t=this.networkVersion||null;break;default:throw new Error(o.default.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_getExperimentalApi(){return new Proxy({isUnlocked:async()=>(this._state.initialized||await new Promise((e=>{this.on("_initialized",(()=>e()))})),this._state.isUnlocked),requestBatch:async e=>{if(!Array.isArray(e))throw s.ethErrors.rpc.invalidRequest({message:"Batch requests must be made with an array of request objects.",data:e});return new Promise(((t,r)=>{this._rpcRequest(e,a.getRpcPromiseCallback(t,r))}))}},{get:(e,t,...r)=>(this._sentWarnings.experimentalMethods||(this._log.warn(o.default.warnings.experimentalMethods),this._sentWarnings.experimentalMethods=!0),Reflect.get(e,t,...r))})}_handleChainChanged({chainId:e,networkVersion:t}={}){super._handleChainChanged({chainId:e,networkVersion:t}),this._state.isConnected&&t!==this.networkVersion&&(this.networkVersion=t,this._state.initialized&&this.emit("networkChanged",this.networkVersion))}}r.MetaMaskInpageProvider=c}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/MetaMaskInpageProvider.js"}],[58,{"./BaseProvider":56,"./messages":63,"./utils":67,"@metamask/object-multiplex":3,"is-stream":107,"json-rpc-middleware-stream":118,pump:133},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.StreamProvider=r.AbstractStreamProvider=void 0;const s=n(e("@metamask/object-multiplex")),i=e("is-stream"),o=e("json-rpc-middleware-stream"),a=n(e("pump")),u=n(e("./messages")),c=e("./utils"),l=e("./BaseProvider");class d extends l.BaseProvider{constructor(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:n,rpcMiddleware:l}){if(super({logger:r,maxEventListeners:n,rpcMiddleware:l}),!i.duplex(e))throw new Error(u.default.errors.invalidDuplexStream());this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this);const d=new s.default;a.default(e,d,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._jsonRpcConnection=o.createStreamMiddleware({retryOnMessage:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}),a.default(this._jsonRpcConnection.stream,d.createStream(t),this._jsonRpcConnection.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider")),this._rpcEngine.push(this._jsonRpcConnection.middleware),this._jsonRpcConnection.events.on("notification",(t=>{const{method:r,params:n}=t;"metamask_accountsChanged"===r?this._handleAccountsChanged(n):"metamask_unlockStateChanged"===r?this._handleUnlockStateChanged(n):"metamask_chainChanged"===r?this._handleChainChanged(n):c.EMITTED_NOTIFICATIONS.includes(r)?this.emit("message",{type:r,data:n}):"METAMASK_STREAM_FAILURE"===r&&e.destroy(new Error(u.default.errors.permanentlyDisconnected()))}))}async _initializeStateAsync(){let e;try{e=await this.request({method:"metamask_getProviderState"})}catch(e){this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e)}this._initializeState(e)}_handleStreamDisconnect(e,t){let r=`MetaMask: Lost connection to "${e}".`;(null==t?void 0:t.stack)&&(r+=`\n${t.stack}`),this._log.warn(r),this.listenerCount("error")>0&&this.emit("error",r),this._handleDisconnect(!1,t?t.message:undefined)}_handleChainChanged({chainId:e,networkVersion:t}={}){c.isValidChainId(e)&&c.isValidNetworkVersion(t)?"loading"===t?this._handleDisconnect(!0):super._handleChainChanged({chainId:e}):this._log.error(u.default.errors.invalidNetworkParams(),{chainId:e,networkVersion:t})}}r.AbstractStreamProvider=d;r.StreamProvider=class extends d{async initialize(){return this._initializeStateAsync()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/StreamProvider.js"}],[59,{"../MetaMaskInpageProvider":57,"../StreamProvider":58,"../utils":67,"./external-extension-config.json":60,"detect-browser":94,"extension-port-stream":101},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createExternalExtensionProvider=void 0;const s=n(e("extension-port-stream")),i=e("detect-browser"),o=e("../MetaMaskInpageProvider"),a=e("../StreamProvider"),u=e("../utils"),c=n(e("./external-extension-config.json")),l=i.detect();r.createExternalExtensionProvider=function(){let e;try{const t=function(){switch(null==l?void 0:l.name){case"chrome":default:return c.default.CHROME_ID;case"firefox":return c.default.FIREFOX_ID}}(),r=chrome.runtime.connect(t),n=new s.default(r);e=new a.StreamProvider(n,{jsonRpcStreamName:o.MetaMaskInpageProviderStreamName,logger:console,rpcMiddleware:u.getDefaultExternalMiddleware(console)}),e.initialize()}catch(e){throw console.dir("MetaMask connect error.",e),e}return e}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/extension-provider/createExternalExtensionProvider.js"}],[60,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={CHROME_ID:"nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX_ID:"webextension@metamask.io"}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/extension-provider/external-extension-config.json"}],[61,{"./BaseProvider":56,"./MetaMaskInpageProvider":57,"./StreamProvider":58,"./extension-provider/createExternalExtensionProvider":59,"./initializeInpageProvider":62,"./shimWeb3":65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.StreamProvider=r.shimWeb3=r.setGlobalProvider=r.MetaMaskInpageProvider=r.MetaMaskInpageProviderStreamName=r.initializeProvider=r.createExternalExtensionProvider=r.BaseProvider=void 0;const n=e("./BaseProvider");Object.defineProperty(r,"BaseProvider",{enumerable:!0,get:function(){return n.BaseProvider}});const s=e("./extension-provider/createExternalExtensionProvider");Object.defineProperty(r,"createExternalExtensionProvider",{enumerable:!0,get:function(){return s.createExternalExtensionProvider}});const i=e("./initializeInpageProvider");Object.defineProperty(r,"initializeProvider",{enumerable:!0,get:function(){return i.initializeProvider}}),Object.defineProperty(r,"setGlobalProvider",{enumerable:!0,get:function(){return i.setGlobalProvider}});const o=e("./MetaMaskInpageProvider");Object.defineProperty(r,"MetaMaskInpageProvider",{enumerable:!0,get:function(){return o.MetaMaskInpageProvider}}),Object.defineProperty(r,"MetaMaskInpageProviderStreamName",{enumerable:!0,get:function(){return o.MetaMaskInpageProviderStreamName}});const a=e("./shimWeb3");Object.defineProperty(r,"shimWeb3",{enumerable:!0,get:function(){return a.shimWeb3}});const u=e("./StreamProvider");Object.defineProperty(r,"StreamProvider",{enumerable:!0,get:function(){return u.StreamProvider}})}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/index.js"}],[62,{"./MetaMaskInpageProvider":57,"./shimWeb3":65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.setGlobalProvider=r.initializeProvider=void 0;const n=e("./MetaMaskInpageProvider"),s=e("./shimWeb3");function i(e){window.ethereum=e,window.dispatchEvent(new Event("ethereum#initialized"))}r.initializeProvider=function({connectionStream:e,jsonRpcStreamName:t,logger:r=console,maxEventListeners:o=100,shouldSendMetadata:a=!0,shouldSetOnWindow:u=!0,shouldShimWeb3:c=!1}){const l=new n.MetaMaskInpageProvider(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:o,shouldSendMetadata:a}),d=new Proxy(l,{deleteProperty:()=>!0});return u&&i(d),c&&s.shimWeb3(d,r),d},r.setGlobalProvider=i}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/initializeInpageProvider.js"}],[63,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n={errors:{disconnected:()=>"MetaMask: Disconnected from chain. Attempting to connect.",permanentlyDisconnected:()=>"MetaMask: Disconnected from MetaMask background. Page reload required.",sendSiteMetadata:()=>"MetaMask: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidNetworkParams:()=>"MetaMask: Received invalid network parameters. Please report this bug.",invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`MetaMask: Connected to chain with ID "${e}".`},warnings:{enableDeprecation:"MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102",sendDeprecation:"MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193",events:{close:"MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect",data:"MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message",networkChanged:"MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged",notification:"MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message"},rpc:{ethDecryptDeprecation:"MetaMask: The RPC method 'eth_decrypt' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",ethGetEncryptionPublicKeyDeprecation:"MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}};r.default=n}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/messages.js"}],[64,{"../messages":63},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createRpcWarningMiddleware=void 0;const s=n(e("../messages"));r.createRpcWarningMiddleware=function(e){const t={ethDecryptDeprecation:!1,ethGetEncryptionPublicKeyDeprecation:!1};return(r,n,i)=>{!1===t.ethDecryptDeprecation&&"eth_decrypt"===r.method?(e.warn(s.default.warnings.rpc.ethDecryptDeprecation),t.ethDecryptDeprecation=!0):!1===t.ethGetEncryptionPublicKeyDeprecation&&"eth_getEncryptionPublicKey"===r.method&&(e.warn(s.default.warnings.rpc.ethGetEncryptionPublicKeyDeprecation),t.ethGetEncryptionPublicKeyDeprecation=!0),i()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/middleware/createRpcWarningMiddleware.js"}],[65,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shimWeb3=void 0,r.shimWeb3=function(e,t=console){let r=!1,n=!1;if(!window.web3){const s="__isMetaMaskShim__";let i={currentProvider:e};Object.defineProperty(i,s,{value:!0,enumerable:!0,configurable:!1,writable:!1}),i=new Proxy(i,{get:(i,o,...a)=>("currentProvider"!==o||r?"currentProvider"===o||o===s||n||(n=!0,t.error("MetaMask no longer injects web3. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),e.request({method:"metamask_logWeb3ShimUsage"}).catch((e=>{t.debug("MetaMask: Failed to log web3 shim usage.",e)}))):(r=!0,t.warn("You are accessing the MetaMask window.web3.currentProvider shim. This property is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3")),Reflect.get(i,o,...a)),set:(...e)=>(t.warn("You are accessing the MetaMask window.web3 shim. This object is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),Reflect.set(...e))}),Object.defineProperty(window,"web3",{value:i,enumerable:!1,configurable:!0,writable:!0})}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/shimWeb3.js"}],[66,{"./messages":63,"./utils":67},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.sendSiteMetadata=void 0;const s=n(e("./messages")),i=e("./utils");function o(e){const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const n=t.querySelector('head > meta[name="title"]');return n?n.content:t.title&&t.title.length>0?t.title:window.location.hostname}async function a(e){const{document:t}=e,r=t.querySelectorAll('head > link[rel~="icon"]');for(const e of r)if(e&&await u(e.href))return e.href;return null}function u(e){return new Promise(((t,r)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(e){r(e)}}))}r.sendSiteMetadata=async function(e,t){try{const t=await async function(){return{name:o(window),icon:await a(window)}}();e.handle({jsonrpc:"2.0",id:1,method:"metamask_sendDomainMetadata",params:t},i.NOOP)}catch(e){t.error({message:s.default.errors.sendSiteMetadata(),originalError:e})}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/siteMetadata.js"}],[67,{"./middleware/createRpcWarningMiddleware":64,"eth-rpc-errors":99,"json-rpc-engine":114},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NOOP=r.isValidNetworkVersion=r.isValidChainId=r.getRpcPromiseCallback=r.getDefaultExternalMiddleware=r.EMITTED_NOTIFICATIONS=void 0;const n=e("json-rpc-engine"),s=e("eth-rpc-errors"),i=e("./middleware/createRpcWarningMiddleware");r.EMITTED_NOTIFICATIONS=Object.freeze(["eth_subscription"]);r.getDefaultExternalMiddleware=(e=console)=>{return[n.createIdRemapMiddleware(),(t=e,(e,r,n)=>{"string"==typeof e.method&&e.method||(r.error=s.ethErrors.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:e})),n((e=>{const{error:n}=r;return n?(t.error(`MetaMask - RPC Error: ${n.message}`,n),e()):e()}))}),i.createRpcWarningMiddleware(e)];var t};r.getRpcPromiseCallback=(e,t,r=!0)=>(n,s)=>{n||s.error?t(n||s.error):!r||Array.isArray(s)?e(s):e(s.result)};r.isValidChainId=e=>Boolean(e)&&"string"==typeof e&&e.startsWith("0x");r.isValidNetworkVersion=e=>Boolean(e)&&"string"==typeof e;r.NOOP=()=>undefined}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/utils.js"}],[68,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=Array.isArray,s=Object.keys,i=Object.prototype.hasOwnProperty;t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){var o,a,u,c=n(t),l=n(r);if(c&&l){if((a=t.length)!=r.length)return!1;for(o=a;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(c!=l)return!1;var d=t instanceof Date,h=r instanceof Date;if(d!=h)return!1;if(d&&h)return t.getTime()==r.getTime();var f=t instanceof RegExp,p=r instanceof RegExp;if(f!=p)return!1;if(f&&p)return t.toString()==r.toString();var m=s(t);if((a=m.length)!==s(r).length)return!1;for(o=a;0!=o--;)if(!i.call(r,m[o]))return!1;for(o=a;0!=o--;)if(!e(t[u=m[o]],r[u]))return!1;return!0}return t!=t&&r!=r}}}},{package:"@metamask/providers>fast-deep-equal",file:"../../node_modules/@metamask/providers/node_modules/fast-deep-equal/index.js"}],[69,{events:"events"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("events");function s(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class i extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(n!==undefined)r=r&&n.error===undefined;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const i=n[e];if(i===undefined)return!1;if("function"==typeof i)s(i,this,t);else{const e=i.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(i);for(let n=0;n<e;n+=1)s(r[n],this,t)}return!0}}r.default=i}}},{package:"json-rpc-engine>@metamask/safe-event-emitter",file:"../../node_modules/@metamask/safe-event-emitter/index.js"}],[70,{superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const n=e("superstruct");function s(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class i extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=i,r.assert=function(e,t="Assertion failed.",r=i){if(!e){if(t instanceof Error)throw t;throw s(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",o=i){try{(0,n.assert)(e,t)}catch(e){throw s(o,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/assert.js"}],[71,{"./assert":70,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const n=e("superstruct"),s=e("./assert");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,i=t.characterSet??"base64";let o,a;return"base64"===i?o=String.raw`[A-Za-z0-9+\/]`:((0,s.assert)("base64url"===i),o=String.raw`[-_A-Za-z0-9]`),a=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,n.pattern)(e,a)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/base64.js"}],[72,{"./assert":70,"./hex":77,buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const n=e("./assert"),s=e("./hex"),i=48,o=58,a=87;const u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function l(e){(0,n.assert)(c(e),"Value must be a Uint8Array.")}function d(e){if(l(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,s.add0x)(r.join(""))}function h(e){l(e);const t=d(e);return BigInt(t)}function f(e){if("0x"===e?.toLowerCase?.())return new Uint8Array;(0,s.assertIsHexString)(e);const t=(0,s.remove0x)(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,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),u=t-(t<o?i:a),c=s-(s<o?i:a);n[e]=16*u+c}return n}function p(e){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return f(e.toString(16))}function m(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return f(e.toString(16))}function g(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?f(e):g(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=c,r.assertIsBytes=l,r.bytesToHex=d,r.bytesToBigInt=h,r.bytesToSignedBigInt=function(e){l(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},r.bytesToNumber=function(e){l(e);const t=h(e);return(0,n.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},r.bytesToString=function(e){return l(e),(new TextDecoder).decode(e)},r.hexToBytes=f,r.bigIntToBytes=p,r.signedBigIntToBytes=function(e,t){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)("number"==typeof t,"Byte length must be a number."),(0,n.assert)(t>0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e<s.length;e++)s[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return s.reverse()},r.numberToBytes=m,r.stringToBytes=g,r.valueToBytes=b,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const s=b(e[n]);t[n]=s,r+=s.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},r.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/bytes.js"}],[73,{"./base64":71,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const n=e("superstruct"),s=e("./base64");r.ChecksumStruct=(0,n.size)((0,s.base64)((0,n.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/checksum.js"}],[74,{"./assert":70,"./bytes":72,"./hex":77,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const n=e("superstruct"),s=e("./assert"),i=e("./bytes"),o=e("./hex"),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),o.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),c=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([o.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([o.StrictHexStruct]),i.hexToBytes)),d=(0,n.coerce)(o.StrictHexStruct,(0,n.instance)(Uint8Array),i.bytesToHex);r.createNumber=function(e){try{const t=(0,n.create)(e,u);return(0,s.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,n.create)(e,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,d)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/coercers.js"}],[75,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class a{constructor(e){n.set(this,void 0),i(this,n,new Map(e),"f"),Object.freeze(this)}get size(){return o(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return o(this,n,"f")[Symbol.iterator]()}entries(){return o(this,n,"f").entries()}forEach(e,t){return o(this,n,"f").forEach(((r,n,s)=>e.call(t,r,n,this)))}get(e){return o(this,n,"f").get(e)}has(e){return o(this,n,"f").has(e)}keys(){return o(this,n,"f").keys()}values(){return o(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=a;class u{constructor(e){s.set(this,void 0),i(this,s,new Set(e),"f"),Object.freeze(this)}get size(){return o(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return o(this,s,"f")[Symbol.iterator]()}entries(){return o(this,s,"f").entries()}forEach(e,t){return o(this,s,"f").forEach(((r,n,s)=>e.call(t,r,n,this)))}has(e){return o(this,s,"f").has(e)}keys(){return o(this,s,"f").keys()}values(){return o(this,s,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=u,Object.freeze(a),Object.freeze(a.prototype),Object.freeze(u),Object.freeze(u.prototype)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/collections.js"}],[76,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/encryption-types.js"}],[77,{"./assert":70,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.StrictHexStruct=r.HexStruct=void 0;const n=e("superstruct"),s=e("./assert");function i(e){return(0,n.is)(e,r.HexStruct)}function o(e){return(0,n.is)(e,r.StrictHexStruct)}r.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),r.isHexString=i,r.isStrictHexString=o,r.assertIsHexString=function(e){(0,s.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,s.assert)(o(e),'Value must be a hexadecimal string, starting with "0x".')},r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/hex.js"}],[78,{"./assert":70,"./base64":71,"./bytes":72,"./checksum":73,"./coercers":74,"./collections":75,"./encryption-types":76,"./hex":77,"./json":79,"./keyring":80,"./logging":81,"./misc":82,"./number":83,"./opaque":84,"./time":85,"./transaction-types":86,"./versions":87},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./assert"),r),s(e("./base64"),r),s(e("./bytes"),r),s(e("./checksum"),r),s(e("./coercers"),r),s(e("./collections"),r),s(e("./encryption-types"),r),s(e("./hex"),r),s(e("./json"),r),s(e("./keyring"),r),s(e("./logging"),r),s(e("./misc"),r),s(e("./number"),r),s(e("./opaque"),r),s(e("./time"),r),s(e("./transaction-types"),r),s(e("./versions"),r)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/index.js"}],[79,{"./assert":70,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=void 0;const n=e("superstruct"),s=e("./assert");function i(e){return(0,n.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>r.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,n.coerce)(r.UnsafeJsonStruct,(0,n.any)(),(e=>((0,s.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return i(e),!0}catch{return!1}},r.getSafeJson=i,r.getJsonSize=function(e){(0,s.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,n.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),r.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(r.JsonStruct),stack:(0,n.optional)((0,n.string)())}),r.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),r.JsonStruct),(0,n.array)(r.JsonStruct)])),r.JsonRpcRequestStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,n.string)(),params:r.JsonRpcParamsStruct}),r.JsonRpcNotificationStruct=(0,n.omit)(r.JsonRpcRequestStruct,["id"]),r.isJsonRpcNotification=function(e){return(0,n.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,s.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,n.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,s.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,n.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,n.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,n.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,s.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,n.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,s.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,n.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,s.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/json.js"}],[80,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/keyring.js"}],[81,{debug:92},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const s=(0,n(e("debug")).default)("metamask");r.createProjectLogger=function(e){return s.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/logging.js"}],[82,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function n(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},r.isASCII=n,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>n(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/misc.js"}],[83,{"./assert":70,"./hex":77},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const n=e("./assert"),s=e("./hex");r.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,s.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,s.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,s.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,s.assertIsHexString)(e),BigInt((0,s.add0x)(e)))}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/number.js"}],[84,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/opaque.js"}],[85,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.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"}(r.Duration||(r.Duration={}));const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return n(e,"count"),e*t},r.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/time.js"}],[86,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/transaction-types.js"}],[87,{"./assert":70,semver:161,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const n=e("semver"),s=e("superstruct"),i=e("./assert");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,i.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,i.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/versions.js"}],[88,{"../../is-buffer/index.js":106},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this)}).call(this,{isBuffer:e("../../is-buffer/index.js")})}}},{package:"browserify>readable-stream>core-util-is",file:"../../node_modules/core-util-is/lib/util.js"}],[89,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=1e3,s=60*n,i=60*s,o=24*i,a=7*o,u=365.25*o;function c(e,t,r,n){var s=t>=1.5*r;return Math.round(e/r)+" "+n+(s?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*u;case"weeks":case"week":case"w":return r*a;case"days":case"day":case"d":return r*o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return undefined}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return c(e,t,o,"day");if(t>=i)return c(e,t,i,"hour");if(t>=s)return c(e,t,s,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=s)return Math.round(e/s)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}},{package:"eslint>debug>ms",file:"../../node_modules/debug/node_modules/ms/index.js"}],[90,{"./common":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){r.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,s=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))})),e.splice(s,0,r)},r.save=function(e){try{e?r.storage.setItem("debug",e):r.storage.removeItem("debug")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},r.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage=function(){try{return localStorage}catch(e){}}(),r.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(r);const{formatters:n}=t.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/browser.js"}],[91,{ms:89},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(t){function r(e){let t,s,i,o=null;function a(...e){if(!a.enabled)return;const n=a,s=Number(new Date),i=s-(t||s);n.diff=i,n.prev=t,n.curr=s,t=s,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,s)=>{if("%%"===t)return"%";o++;const i=r.formatters[s];if("function"==typeof i){const r=e[o];t=i.call(n,r),e.splice(o,1),o--}return t})),r.formatArgs.call(n,e);(n.log||r.log).apply(n,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=n,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(s!==r.namespaces&&(s=r.namespaces,i=r.enabled(e)),i),set:e=>{o=e}}),"function"==typeof r.init&&r.init(a),a}function n(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){const e=[...r.names.map(s),...r.skips.map(s).map((e=>"-"+e))].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.namespaces=e,r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),s=n.length;for(t=0;t<s;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.slice(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((e=>{r[e]=t[e]})),r.names=[],r.skips=[],r.formatters={},r.selectColor=function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return r.colors[Math.abs(t)%r.colors.length]},r.enable(r.load()),r}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/common.js"}],[92,{"./browser.js":90,"./node.js":93},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=e("./browser.js"):t.exports=e("./node.js")}}},{package:"eslint>debug",file:"../../node_modules/debug/src/index.js"}],[93,{"./common":91,"supports-color":179,tty:"tty",util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("tty"),s=e("util");r.init=function(e){e.inspectOpts={};const t=Object.keys(r.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=r.inspectOpts[t[n]]},r.log=function(...e){return process.stderr.write(s.format(...e)+"\n")},r.formatArgs=function(e){const{namespace:n,useColors:s}=this;if(s){const r=this.color,s="[3"+(r<8?r:"8;5;"+r),i=` ${s};1m${n} `;e[0]=i+e[0].split("\n").join("\n"+i),e.push(s+"m+"+t.exports.humanize(this.diff)+"")}else e[0]=function(){if(r.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+e[0]},r.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},r.load=function(){return process.env.DEBUG},r.useColors=function(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):n.isatty(process.stderr.fd)},r.destroy=s.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),r.colors=[6,2,3,4,5,1];try{const t=e("supports-color");t&&(t.stderr||t).level>=2&&(r.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}r.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),t.exports=e("./common")(r);const{formatters:i}=t.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts)}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/node.js"}],[94,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,s=0,i=t.length;s<i;s++)!n&&s in t||(n||(n=Array.prototype.slice.call(t,0,s)),n[s]=t[s]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.getNodeVersion=r.detectOS=r.parseUserAgent=r.browserName=r.detect=r.ReactNativeInfo=r.BotInfo=r.SearchBotDeviceInfo=r.NodeInfo=r.BrowserInfo=void 0;var s=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"};r.BrowserInfo=s;var i=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform};r.NodeInfo=i;var o=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"};r.SearchBotDeviceInfo=o;var a=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null};r.BotInfo=a;var u=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null};r.ReactNativeInfo=u;var c=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=3,d=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],h=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function f(e){return""!==e&&d.reduce((function(t,r){var n=r[0],s=r[1];if(t)return t;var i=s.exec(e);return!!i&&[n,i]}),!1)}function p(e){var t=f(e);if(!t)return null;var r=t[0],i=t[1];if("searchbot"===r)return new a;var u=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);u?u.length<l&&(u=n(n([],u,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(l-u.length),!0)):u=[];var d=u.join("."),h=m(e),p=c.exec(e);return p&&p[1]?new o(r,d,h,p[1]):new s(r,d,h)}function m(e){for(var t=0,r=h.length;t<r;t++){var n=h[t],s=n[0];if(n[1].exec(e))return s}return null}function g(){return"undefined"!=typeof process&&process.version?new i(process.version.slice(1)):null}r.detect=function(e){return e?p(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new u:"undefined"!=typeof navigator?p(navigator.userAgent):g()},r.browserName=function(e){var t=f(e);return t?t[0]:null},r.parseUserAgent=p,r.detectOS=m,r.getNodeVersion=g}}},{package:"@metamask/providers>detect-browser",file:"../../node_modules/detect-browser/index.js"}],[95,{once:131},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("once"),s=function(){},i=function(e,t,r){if("function"==typeof t)return i(e,null,t);t||(t={}),r=n(r||s);var o=e._writableState,a=e._readableState,u=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,l=!1,d=function(){e.writable||h()},h=function(){c=!1,u||r.call(e)},f=function(){u=!1,c||r.call(e)},p=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},m=function(t){r.call(e,t)},g=function(){process.nextTick(b)},b=function(){if(!l)return(!u||a&&a.ended&&!a.destroyed)&&(!c||o&&o.ended&&!o.destroyed)?void 0:r.call(e,new Error("premature close"))},w=function(){e.req.on("finish",h)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?c&&!o&&(e.on("end",d),e.on("close",d)):(e.on("complete",h),e.on("abort",g),e.req?w():e.on("request",w)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",p),e.on("end",f),e.on("finish",h),!1!==t.error&&e.on("error",m),e.on("close",g),function(){l=!0,e.removeListener("complete",h),e.removeListener("abort",g),e.removeListener("request",w),e.req&&e.req.removeListener("finish",h),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("exit",p),e.removeListener("end",f),e.removeListener("error",m),e.removeListener("close",g)}};t.exports=i}}},{package:"pump>end-of-stream",file:"../../node_modules/end-of-stream/index.js"}],[96,{"fast-safe-stringify":102},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.EthereumProviderError=r.EthereumRpcError=void 0;const n=e("fast-safe-stringify");class s extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,r!==undefined&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return this.data!==undefined&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),i,2)}}r.EthereumRpcError=s;function i(e,t){return"[Circular]"===t?undefined:t}r.EthereumProviderError=class extends s{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/classes.js"}],[97,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorValues=r.errorCodes=void 0,r.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},r.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/error-constants.js"}],[98,{"./classes":96,"./error-constants":97,"./utils":100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ethErrors=void 0;const n=e("./classes"),s=e("./utils"),i=e("./error-constants");function o(e,t){const[r,i]=u(t);return new n.EthereumRpcError(e,r||s.getMessageFromCode(e),i)}function a(e,t){const[r,i]=u(t);return new n.EthereumProviderError(e,r||s.getMessageFromCode(e),i)}function u(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||undefined,r]}}return[]}r.ethErrors={rpc:{parse:e=>o(i.errorCodes.rpc.parse,e),invalidRequest:e=>o(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(i.errorCodes.rpc.methodNotFound,e),internal:e=>o(i.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(i.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>a(i.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(i.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(i.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(i.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(i.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:s}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,s)}}}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/errors.js"}],[99,{"./classes":96,"./error-constants":97,"./errors":98,"./utils":100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getMessageFromCode=r.serializeError=r.EthereumProviderError=r.EthereumRpcError=r.ethErrors=r.errorCodes=void 0;const n=e("./classes");Object.defineProperty(r,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const s=e("./utils");Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return s.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return s.getMessageFromCode}});const i=e("./errors");Object.defineProperty(r,"ethErrors",{enumerable:!0,get:function(){return i.ethErrors}});const o=e("./error-constants");Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/index.js"}],[100,{"./classes":96,"./error-constants":97},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=e("./error-constants"),s=e("./classes"),i=n.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",a={code:i,message:u(i)};function u(e,t=o){if(Number.isInteger(e)){const t=e.toString();if(h(n.errorValues,t))return n.errorValues[t].message;if(l(e))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!l(e)}function l(e){return e>=-32099&&e<=-32e3}function d(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",r.getMessageFromCode=u,r.isValidCode=c,r.serializeError=function(e,{fallbackError:t=a,shouldIncludeStack:r=!1}={}){var n,i;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof s.EthereumRpcError)return e.serialize();const o={};if(e&&"object"==typeof e&&!Array.isArray(e)&&h(e,"code")&&c(e.code)){const t=e;o.code=t.code,t.message&&"string"==typeof t.message?(o.message=t.message,h(t,"data")&&(o.data=t.data)):(o.message=u(o.code),o.data={originalError:d(e)})}else{o.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;o.message=r&&"string"==typeof r?r:t.message,o.data={originalError:d(e)}}const l=null===(i=e)||void 0===i?void 0:i.stack;return r&&e&&l&&"string"==typeof l&&(o.stack=l),o}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/utils.js"}],[101,{buffer:"buffer",stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){const n=e("stream");t.exports=class extends n.Duplex{constructor(e){super({objectMode:!0}),this._port=e,this._port.onMessage.addListener((e=>this._onMessage(e))),this._port.onDisconnect.addListener((()=>this._onDisconnect()))}_onMessage(e){if(r.isBuffer(e)){const t=r.from(e);this.push(t)}else this.push(e)}_onDisconnect(){this.destroy()}_read(){return undefined}_write(e,t,n){try{if(r.isBuffer(e)){const t=e.toJSON();t._isBuffer=!0,this._port.postMessage(t)}else this._port.postMessage(e)}catch(e){return n(new Error("PortDuplexStream - disconnected"))}return n()}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/providers>extension-port-stream",file:"../../node_modules/extension-port-stream/dist/index.js"}],[102,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=u,u.default=u,u.stable=h,u.stableStringify=h;var n="[...]",s="[Circular]",i=[],o=[];function a(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function u(e,t,r,n){var s;void 0===n&&(n=a()),l(e,"",0,[],undefined,0,n);try{s=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var u=i.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function c(e,t,r,n){var s=Object.getOwnPropertyDescriptor(n,r);s.get!==undefined?s.configurable?(Object.defineProperty(n,r,{value:e}),i.push([n,r,t,s])):o.push([t,r,e]):(n[r]=e,i.push([n,r,t]))}function l(e,t,r,i,o,a,u){var d;if(a+=1,"object"==typeof e&&null!==e){for(d=0;d<i.length;d++)if(i[d]===e)return void c(s,e,t,o);if(void 0!==u.depthLimit&&a>u.depthLimit)return void c(n,e,t,o);if(void 0!==u.edgesLimit&&r+1>u.edgesLimit)return void c(n,e,t,o);if(i.push(e),Array.isArray(e))for(d=0;d<e.length;d++)l(e[d],d,d,i,e,a,u);else{var h=Object.keys(e);for(d=0;d<h.length;d++){var f=h[d];l(e[f],f,d,i,e,a,u)}}i.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function h(e,t,r,n){void 0===n&&(n=a());var s,u=f(e,"",0,[],undefined,0,n)||e;try{s=0===o.length?JSON.stringify(u,t,r):JSON.stringify(u,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var c=i.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function f(e,t,r,o,a,u,l){var h;if(u+=1,"object"==typeof e&&null!==e){for(h=0;h<o.length;h++)if(o[h]===e)return void c(s,e,t,a);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==l.depthLimit&&u>l.depthLimit)return void c(n,e,t,a);if(void 0!==l.edgesLimit&&r+1>l.edgesLimit)return void c(n,e,t,a);if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)f(e[h],h,h,o,e,u,l);else{var p={},m=Object.keys(e).sort(d);for(h=0;h<m.length;h++){var g=m[h];f(e[g],g,h,o,e,u,l),p[g]=e[g]}if(void 0===a)return p;i.push([a,t,e]),a[t]=p}o.pop()}}function p(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var s=o[n];if(s[1]===t&&s[0]===r){r=s[2],o.splice(n,1);break}}return e.call(this,t,r)}}}}},{package:"eth-rpc-errors>fast-safe-stringify",file:"../../node_modules/fast-safe-stringify/index.js"}],[103,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return-1!==n&&(-1===s||n<s)}}}},{package:"istanbul-lib-report>supports-color>has-flag",file:"../../node_modules/has-flag/index.js"}],[104,{"./inherits_browser.js":105,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){try{var n=e("util");if("function"!=typeof n.inherits)throw"";t.exports=n.inherits}catch(r){t.exports=e("./inherits_browser.js")}}}},{package:"browserify>inherits",file:"../../node_modules/inherits/inherits.js"}],[105,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}}},{package:"browserify>inherits",file:"../../node_modules/inherits/inherits_browser.js"}],[106,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
12142
+ LavaPack.loadBundle([[1,{"./Substream":2,"end-of-stream":95,once:130,"readable-stream":12},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ObjectMultiplex=void 0;const s=e("readable-stream"),i=n(e("end-of-stream")),a=n(e("once")),o=e("./Substream"),u=Symbol("IGNORE_SUBSTREAM");class c extends s.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new o.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const r=a.default(t);i.default(e,{readable:!1},r),i.default(e,{writable:!1},r)}(this,(e=>t.destroy(e||undefined))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=u}_read(){return undefined}_write(e,t,r){const{name:n,data:s}=e;if(!n)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const i=this._substreams[n];return i?(i!==u&&i.push(s),r()):(console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}}r.ObjectMultiplex=c}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/ObjectMultiplex.js"}],[2,{"readable-stream":12},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Substream=void 0;const n=e("readable-stream");class s extends n.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){return undefined}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}r.Substream=s}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/Substream.js"}],[3,{"./ObjectMultiplex":1},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./ObjectMultiplex");t.exports=n.ObjectMultiplex}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/index.js"}],[4,{"./_stream_readable":6,"./_stream_writable":8,"core-util-is":88,inherits:104,"process-nextick-args":131},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args"),s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=d;var i=Object.create(e("core-util-is"));i.inherits=e("inherits");var a=e("./_stream_readable"),o=e("./_stream_writable");i.inherits(d,a);for(var u=s(o.prototype),c=0;c<u.length;c++){var l=u[c];d.prototype[l]||(d.prototype[l]=o.prototype[l])}function d(e){if(!(this instanceof d))return new d(e);a.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_duplex.js"}],[5,{"./_stream_transform":7,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=i;var n=e("./_stream_transform"),s=Object.create(e("core-util-is"));function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}s.inherits=e("inherits"),s.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_passthrough.js"}],[6,{"./_stream_duplex":4,"./internal/streams/BufferList":9,"./internal/streams/destroy":10,"./internal/streams/stream":11,"core-util-is":88,events:"events",inherits:104,isarray:108,"process-nextick-args":131,"safe-buffer":13,"string_decoder/":14,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");t.exports=w;var s,i=e("isarray");w.ReadableState=b;e("events").EventEmitter;var a=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=global.Uint8Array||function(){};var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var d=e("util"),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var f,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");l.inherits(w,o);var g=["error","close","destroy","pause","resume"];function b(t,r){t=t||{};var n=r instanceof(s=s||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function w(t){if(s=s||e("./_stream_duplex"),!(this instanceof w))return new w(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function v(e,t,r,n,s){var i,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,a)):(s||(i=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||t===undefined||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):y(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?y(e,a,t,!1):T(e,a)):y(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function y(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&E(e)),T(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),v(this,e,t,!1,r)},w.prototype.unshift=function(e){return v(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return f||(f=e("string_decoder/").StringDecoder),this._readableState.decoder=new f(t),this._readableState.encoding=t,this};var _=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(k,e):k(e))}function k(e){h("emit readable"),e.emit("readable"),M(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(R,e,t))}function R(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function j(e){h("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,s=r.data;e-=s.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(a===i.length?s+=i:s+=i.slice(0,e),0===(e-=a)){a===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++n}return t.length-=n,s}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,s=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,a),0===(e-=a)){a===i.length?(++s,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++s}return t.length-=s,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,s=t.needReadable;return h("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",s=!0),t.ended||t.reading?h("reading or ended",s=!1):s&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,h("pipe count=%d opts=%j",s.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:w;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",w),r.removeListener("data",p),d=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){h("onend"),e.end()}s.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",l);var d=!1;var f=!1;function p(t){h("ondata"),f=!1,!1!==e.write(t)||f||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==I(s.pipes,e))&&!d&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function m(t){h("onerror",t),w(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),w()}function b(){h("onfinish"),e.removeListener("close",g),w()}function w(){h("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?i(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",b),e.emit("pipe",r),s.flowing||(h("pipe resume"),r.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<s;i++)n[i].emit("unpipe",this,r);return this}var a=I(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},w.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var s=this._readableState;s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.emittedReadable=!1,s.reading?s.length&&E(this):n.nextTick(j,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(x,e,t))}(this,e)),this},w.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){(h("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!r.objectMode||null!==s&&s!==undefined)&&((r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause())))})),e)this[s]===undefined&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<g.length;i++)e.on(g[i],this.emit.bind(this,g[i]));return this._read=function(t){h("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=O}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_readable.js"}],[7,{"./_stream_duplex":4,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=a;var n=e("./_stream_duplex"),s=Object.create(e("core-util-is"));function i(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}s.inherits=e("inherits"),s.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_transform.js"}],[8,{"./_stream_duplex":4,"./internal/streams/destroy":10,"./internal/streams/stream":11,"core-util-is":88,inherits:104,"process-nextick-args":131,"safe-buffer":13,timers:"timers","util-deprecate":180},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=g;var i,a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?r:n.nextTick;g.WritableState=m;var o=Object.create(e("core-util-is"));o.inherits=e("inherits");var u={deprecate:e("util-deprecate")},c=e("./internal/streams/stream"),l=e("safe-buffer").Buffer,d=global.Uint8Array||function(){};var h,f=e("./internal/streams/destroy");function p(){}function m(t,r){i=i||e("./_stream_duplex"),t=t||{};var o=r instanceof i;this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:o&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,s=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,s,i){--t.pendingcb,r?(n.nextTick(i,s),n.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",s)):(i(s),e._writableState.errorEmitted=!0,e.emit("error",s),S(e,t))}(e,r,s,t,i);else{var o=y(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),s?a(w,e,r,o,i):w(e,r,o,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function g(t){if(i=i||e("./_stream_duplex"),!(h.call(g,this)||this instanceof i))return new g(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),c.call(this)}function b(e,t,r,n,s,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)i[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;i.allBuffers=u,b(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,d=r.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var r=y(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(_,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}o.inherits(g,c),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===g&&(e&&e._writableState instanceof m)}})):h=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var s,i=this._writableState,a=!1,o=!i.objectMode&&(s=e,l.isBuffer(s)||s instanceof d);return o&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=p),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(o||function(e,t,r,s){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||r===undefined||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),n.nextTick(s,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,s,i){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,s);n!==a&&(r=!0,s="buffer",n=a)}var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,o,n,s,i);return u}(this,i,o,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var s=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||s.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,s,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=f.destroy,g.prototype._undestroy=f.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("timers").setImmediate)}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_writable.js"}],[9,{"safe-buffer":13,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,s,i=n.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,r=i,s=o,t.copy(r,s),o+=a.data.length,a=a.next;return i},e}(),s&&s.inspect&&s.inspect.custom&&(t.exports.prototype[s.inspect.custom]=function(){var e=s.inspect({length:this.length});return this.constructor.name+" "+e})}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/BufferList.js"}],[10,{"process-nextick-args":131},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");function s(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(s,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[11,{stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("stream")}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/stream.js"}],[12,{"./lib/_stream_duplex.js":4,"./lib/_stream_passthrough.js":5,"./lib/_stream_readable.js":6,"./lib/_stream_transform.js":7,"./lib/_stream_writable.js":8,stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("stream");"disable"===process.env.READABLE_STREAM&&n?(t.exports=n,(r=t.exports=n.Readable).Readable=n.Readable,r.Writable=n.Writable,r.Duplex=n.Duplex,r.Transform=n.Transform,r.PassThrough=n.PassThrough,r.Stream=n):((r=t.exports=e("./lib/_stream_readable.js")).Stream=n||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"))}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/readable.js"}],[13,{buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("buffer"),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=a),i(s,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"@metamask/object-multiplex>readable-stream>safe-buffer",file:"../../node_modules/@metamask/object-multiplex/node_modules/safe-buffer/index.js"}],[14,{"safe-buffer":13},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=a(t[n]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=a(t[n]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=a(t[n]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"@metamask/object-multiplex>readable-stream>string_decoder",file:"../../node_modules/@metamask/object-multiplex/node_modules/string_decoder/lib/string_decoder.js"}],[15,{"readable-stream":53},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BasePostMessageStream=void 0;const n=e("readable-stream"),s=()=>undefined,i="ACK";class a extends n.Duplex{constructor(){super({objectMode:!0}),this._init=!1,this._haveSyn=!1}_handshake(){this._write("SYN",null,s),this.cork()}_onData(e){if(this._init)try{this.push(e)}catch(e){this.emit("error",e)}else"SYN"===e?(this._haveSyn=!0,this._write(i,null,s)):e===i&&(this._init=!0,this._haveSyn||this._write(i,null,s),this.uncork())}_read(){return undefined}_write(e,t,r){this._postMessage(e),r()}}r.BasePostMessageStream=a}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/BasePostMessageStream.js"}],[16,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerParentPostMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({worker:e}){super(),this._target=s.DEDICATED_WORKER_NAME,this._worker=e,this._worker.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){this._worker.postMessage({target:this._target,data:e})}_onMessage(e){const t=e.data;(0,s.isValidStreamMessage)(t)&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}r.WebWorkerParentPostMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerParentPostMessageStream.js"}],[17,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerPostMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.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=s.DEDICATED_WORKER_NAME,self.addEventListener("message",this._onMessage.bind(this)),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;(0,s.isValidStreamMessage)(t)&&t.target===this._name&&this._onData(t.data)}_destroy(){return undefined}}r.WebWorkerPostMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerPostMessageStream.js"}],[18,{"./BasePostMessageStream":15,"./WebWorker/WebWorkerParentPostMessageStream":16,"./WebWorker/WebWorkerPostMessageStream":17,"./node-process/ProcessMessageStream":19,"./node-process/ProcessParentMessageStream":20,"./node-thread/ThreadMessageStream":21,"./node-thread/ThreadParentMessageStream":22,"./runtime/BrowserRuntimePostMessageStream":23,"./window/WindowPostMessageStream":25},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./window/WindowPostMessageStream"),r),s(e("./WebWorker/WebWorkerPostMessageStream"),r),s(e("./WebWorker/WebWorkerParentPostMessageStream"),r),s(e("./node-process/ProcessParentMessageStream"),r),s(e("./node-process/ProcessMessageStream"),r),s(e("./node-thread/ThreadParentMessageStream"),r),s(e("./node-thread/ThreadMessageStream"),r),s(e("./runtime/BrowserRuntimePostMessageStream"),r),s(e("./BasePostMessageStream"),r)}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/index.js"}],[19,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ProcessMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor(){if(super(),"function"!=typeof globalThis.process.send)throw new Error("Parent IPC channel not found. This class should only be instantiated in a Node.js child process.");this._onMessage=this._onMessage.bind(this),globalThis.process.on("message",this._onMessage),this._handshake()}_postMessage(e){globalThis.process.send({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){globalThis.process.removeListener("message",this._onMessage)}}r.ProcessMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-process/ProcessMessageStream.js"}],[20,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ProcessParentMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({process:e}){super(),this._process=e,this._onMessage=this._onMessage.bind(this),this._process.on("message",this._onMessage),this._handshake()}_postMessage(e){this._process.send({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){this._process.removeListener("message",this._onMessage)}}r.ProcessParentMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-process/ProcessParentMessageStream.js"}],[21,{"../BasePostMessageStream":15,"../utils":24,worker_threads:"worker_threads"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.ThreadMessageStream=void 0;const a=e("worker_threads"),o=e("../BasePostMessageStream"),u=e("../utils");class c extends o.BasePostMessageStream{constructor(){if(super(),n.set(this,void 0),!a.parentPort)throw new Error("Parent port not found. This class should only be instantiated in a Node.js worker thread.");s(this,n,a.parentPort,"f"),this._onMessage=this._onMessage.bind(this),i(this,n,"f").on("message",this._onMessage),this._handshake()}_postMessage(e){i(this,n,"f").postMessage({data:e})}_onMessage(e){(0,u.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){i(this,n,"f").removeListener("message",this._onMessage)}}r.ThreadMessageStream=c,n=new WeakMap}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-thread/ThreadMessageStream.js"}],[22,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ThreadParentMessageStream=void 0;const n=e("../BasePostMessageStream"),s=e("../utils");class i extends n.BasePostMessageStream{constructor({thread:e}){super(),this._thread=e,this._onMessage=this._onMessage.bind(this),this._thread.on("message",this._onMessage),this._handshake()}_postMessage(e){this._thread.postMessage({data:e})}_onMessage(e){(0,s.isValidStreamMessage)(e)&&this._onData(e.data)}_destroy(){this._thread.removeListener("message",this._onMessage)}}r.ThreadParentMessageStream=i}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/node-thread/ThreadParentMessageStream.js"}],[23,{"../BasePostMessageStream":15,"../utils":24},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserRuntimePostMessageStream=void 0;const o=e("../BasePostMessageStream"),u=e("../utils");class c extends o.BasePostMessageStream{constructor({name:e,target:t}){super(),n.set(this,void 0),s.set(this,void 0),i(this,n,e,"f"),i(this,s,t,"f"),this._onMessage=this._onMessage.bind(this),this._getRuntime().onMessage.addListener(this._onMessage),this._handshake()}_postMessage(e){this._getRuntime().sendMessage({target:a(this,s,"f"),data:e})}_onMessage(e){(0,u.isValidStreamMessage)(e)&&e.target===a(this,n,"f")&&this._onData(e.data)}_getRuntime(){var e,t;if("chrome"in globalThis&&"function"==typeof(null===(e=null===chrome||void 0===chrome?void 0:chrome.runtime)||void 0===e?void 0:e.sendMessage))return chrome.runtime;if("browser"in globalThis&&"function"==typeof(null===(t=null===browser||void 0===browser?void 0:browser.runtime)||void 0===t?void 0:t.sendMessage))return browser.runtime;throw new Error("browser.runtime.sendMessage is not a function. This class should only be instantiated in a web extension.")}_destroy(){this._getRuntime().onMessage.removeListener(this._onMessage)}}r.BrowserRuntimePostMessageStream=c,n=new WeakMap,s=new WeakMap}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/runtime/BrowserRuntimePostMessageStream.js"}],[24,{"@metamask/utils":34},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isValidStreamMessage=r.DEDICATED_WORKER_NAME=void 0;const n=e("@metamask/utils");r.DEDICATED_WORKER_NAME="dedicatedWorker",r.isValidStreamMessage=function(e){return(0,n.isObject)(e)&&Boolean(e.data)&&("number"==typeof e.data||"object"==typeof e.data||"string"==typeof e.data)}}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/utils.js"}],[25,{"../BasePostMessageStream":15,"../utils":24,"@metamask/utils":34},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s;Object.defineProperty(r,"__esModule",{value:!0}),r.WindowPostMessageStream=void 0;const i=e("@metamask/utils"),a=e("../BasePostMessageStream"),o=e("../utils"),u=null===(n=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"source"))||void 0===n?void 0:n.get;(0,i.assert)(u,"MessageEvent.prototype.source getter is not defined.");const c=null===(s=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"origin"))||void 0===s?void 0:s.get;(0,i.assert)(c,"MessageEvent.prototype.origin getter is not defined.");class l extends a.BasePostMessageStream{constructor({name:e,target:t,targetOrigin:r=location.origin,targetWindow:n=window}){if(super(),"undefined"==typeof window||"function"!=typeof window.postMessage)throw new Error("window.postMessage is not a function. This class should only be instantiated in a Window.");this._name=e,this._target=t,this._targetOrigin=r,this._targetWindow=n,this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage,!1),this._handshake()}_postMessage(e){this._targetWindow.postMessage({target:this._target,data:e},this._targetOrigin)}_onMessage(e){const t=e.data;"*"!==this._targetOrigin&&c.call(e)!==this._targetOrigin||u.call(e)!==this._targetWindow||!(0,o.isValidStreamMessage)(t)||t.target!==this._name||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}r.WindowPostMessageStream=l}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/window/WindowPostMessageStream.js"}],[26,{superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const n=e("superstruct");function s(e,t){return r=e,Boolean("string"==typeof(null===(s=null===(n=null==r?void 0:r.prototype)||void 0===n?void 0:n.constructor)||void 0===s?void 0:s.name))?new e({message:t}):e({message:t});var r,n,s}class i extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=i,r.assert=function(e,t="Assertion failed.",r=i){if(!e){if(t instanceof Error)throw t;throw s(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",a=i){try{(0,n.assert)(e,t)}catch(e){throw s(a,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/assert.js"}],[27,{"./assert":26,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const n=e("superstruct"),s=e("./assert");r.base64=(e,t={})=>{var r,i;const a=null!==(r=t.paddingRequired)&&void 0!==r&&r,o=null!==(i=t.characterSet)&&void 0!==i?i:"base64";let u,c;return"base64"===o?u=String.raw`[A-Za-z0-9+\/]`:((0,s.assert)("base64url"===o),u=String.raw`[-_A-Za-z0-9]`),c=a?new RegExp(`^(?:${u}{4})*(?:${u}{3}=|${u}{2}==)?$`,"u"):new RegExp(`^(?:${u}{4})*(?:${u}{2,3}|${u}{3}=|${u}{2}==)?$`,"u"),(0,n.pattern)(e,c)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/base64.js"}],[28,{"./assert":26,"./hex":33,buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const n=e("./assert"),s=e("./hex"),i=48,a=58,o=87;const u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function l(e){(0,n.assert)(c(e),"Value must be a Uint8Array.")}function d(e){if(l(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,s.add0x)(r.join(""))}function h(e){l(e);const t=d(e);return BigInt(t)}function f(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,s.assertIsHexString)(e);const r=(0,s.remove0x)(e).toLowerCase(),n=r.length%2==0?r:`0${r}`,u=new Uint8Array(n.length/2);for(let e=0;e<u.length;e++){const t=n.charCodeAt(2*e),r=n.charCodeAt(2*e+1),s=t-(t<a?i:o),c=r-(r<a?i:o);u[e]=16*s+c}return u}function p(e){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return f(e.toString(16))}function m(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return f(e.toString(16))}function g(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?f(e):g(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=c,r.assertIsBytes=l,r.bytesToHex=d,r.bytesToBigInt=h,r.bytesToSignedBigInt=function(e){l(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},r.bytesToNumber=function(e){l(e);const t=h(e);return(0,n.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},r.bytesToString=function(e){return l(e),(new TextDecoder).decode(e)},r.hexToBytes=f,r.bigIntToBytes=p,r.signedBigIntToBytes=function(e,t){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)("number"==typeof t,"Byte length must be a number."),(0,n.assert)(t>0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e<s.length;e++)s[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return s.reverse()},r.numberToBytes=m,r.stringToBytes=g,r.valueToBytes=b,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const s=b(e[n]);t[n]=s,r+=s.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},r.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/bytes.js"}],[29,{"./base64":27,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const n=e("superstruct"),s=e("./base64");r.ChecksumStruct=(0,n.size)((0,s.base64)((0,n.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/checksum.js"}],[30,{"./assert":26,"./bytes":28,"./hex":33,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const n=e("superstruct"),s=e("./assert"),i=e("./bytes"),a=e("./hex"),o=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),a.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),o,Number),c=(0,n.coerce)((0,n.bigint)(),o,BigInt),l=((0,n.union)([a.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([a.StrictHexStruct]),i.hexToBytes)),d=(0,n.coerce)(a.StrictHexStruct,(0,n.instance)(Uint8Array),i.bytesToHex);r.createNumber=function(e){try{const t=(0,n.create)(e,u);return(0,s.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,n.create)(e,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,d)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/coercers.js"}],[31,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class o{constructor(e){n.set(this,void 0),i(this,n,new Map(e),"f"),Object.freeze(this)}get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,n,s)=>e.call(t,r,n,this)))}get(e){return a(this,n,"f").get(e)}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=o;class u{constructor(e){s.set(this,void 0),i(this,s,new Set(e),"f"),Object.freeze(this)}get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,n,s)=>e.call(t,r,n,this)))}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=u,Object.freeze(o),Object.freeze(o.prototype),Object.freeze(u),Object.freeze(u.prototype)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/collections.js"}],[32,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/encryption-types.js"}],[33,{"./assert":26,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.StrictHexStruct=r.HexStruct=void 0;const n=e("superstruct"),s=e("./assert");function i(e){return(0,n.is)(e,r.HexStruct)}function a(e){return(0,n.is)(e,r.StrictHexStruct)}r.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),r.isHexString=i,r.isStrictHexString=a,r.assertIsHexString=function(e){(0,s.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,s.assert)(a(e),'Value must be a hexadecimal string, starting with "0x".')},r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/hex.js"}],[34,{"./assert":26,"./base64":27,"./bytes":28,"./checksum":29,"./coercers":30,"./collections":31,"./encryption-types":32,"./hex":33,"./json":35,"./keyring":36,"./logging":37,"./misc":38,"./number":39,"./opaque":40,"./time":41,"./transaction-types":42,"./versions":43},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./assert"),r),s(e("./base64"),r),s(e("./bytes"),r),s(e("./checksum"),r),s(e("./coercers"),r),s(e("./collections"),r),s(e("./encryption-types"),r),s(e("./hex"),r),s(e("./json"),r),s(e("./keyring"),r),s(e("./logging"),r),s(e("./misc"),r),s(e("./number"),r),s(e("./opaque"),r),s(e("./time"),r),s(e("./transaction-types"),r),s(e("./versions"),r)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/index.js"}],[35,{"./assert":26,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=void 0;const n=e("superstruct"),s=e("./assert");r.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>r.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,n.define)("Json",((e,t)=>{function n(e,r){const n=[...r.validator(e,t)];return!(n.length>0)||n}try{const t=n(e,r.UnsafeJsonStruct);return!0!==t?t:n(JSON.parse(JSON.stringify(e)),r.UnsafeJsonStruct)}catch(e){return e instanceof RangeError&&"Circular reference detected"}})),r.isValidJson=function(e){return(0,n.is)(e,r.JsonStruct)},r.getJsonSize=function(e){(0,s.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,n.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),r.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(r.JsonStruct),stack:(0,n.optional)((0,n.string)())}),r.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),r.JsonStruct),(0,n.array)(r.JsonStruct)])),r.JsonRpcRequestStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,n.string)(),params:r.JsonRpcParamsStruct}),r.JsonRpcNotificationStruct=(0,n.omit)(r.JsonRpcRequestStruct,["id"]),r.isJsonRpcNotification=function(e){return(0,n.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,s.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,n.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,s.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,n.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,n.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,n.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,s.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,n.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,s.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,n.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,s.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},e);return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/json.js"}],[36,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/keyring.js"}],[37,{debug:92},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const s=(0,n(e("debug")).default)("metamask");r.createProjectLogger=function(e){return s.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/logging.js"}],[38,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function n(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},r.isASCII=n,r.calculateStringSize=function(e){var t;return e.split("").reduce(((e,t)=>n(t)?e+1:e+2),0)+(null!==(t=e.match(r.ESCAPE_CHARACTERS_REGEXP))&&void 0!==t?t:[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/misc.js"}],[39,{"./assert":26,"./hex":33},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const n=e("./assert"),s=e("./hex");r.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,s.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,s.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,s.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,s.assertIsHexString)(e),BigInt((0,s.add0x)(e)))}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/number.js"}],[40,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/opaque.js"}],[41,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.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"}(r.Duration||(r.Duration={}));const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return n(e,"count"),e*t},r.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/time.js"}],[42,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/transaction-types.js"}],[43,{"./assert":26,semver:160,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const n=e("semver"),s=e("superstruct"),i=e("./assert");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,i.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,i.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/versions.js"}],[44,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?t.exports=function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,i,a=arguments.length;switch(a){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(s=new Array(a-1),i=0;i<s.length;)s[i++]=arguments[i];return process.nextTick((function(){e.apply(null,s)}))}}:t.exports=process.nextTick}}},{package:"@metamask/post-message-stream>readable-stream>process-nextick-args",file:"../../node_modules/@metamask/post-message-stream/node_modules/process-nextick-args/index.js"}],[45,{"./_stream_readable":47,"./_stream_writable":49,"core-util-is":88,inherits:104,"process-nextick-args":44},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args"),s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=d;var i=e("core-util-is");i.inherits=e("inherits");var a=e("./_stream_readable"),o=e("./_stream_writable");i.inherits(d,a);for(var u=s(o.prototype),c=0;c<u.length;c++){var l=u[c];d.prototype[l]||(d.prototype[l]=o.prototype[l])}function d(e){if(!(this instanceof d))return new d(e);a.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n(f,this)}function f(e){e.end()}Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),n(t,e)}}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_duplex.js"}],[46,{"./_stream_transform":48,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=i;var n=e("./_stream_transform"),s=e("core-util-is");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}s.inherits=e("inherits"),s.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_passthrough.js"}],[47,{"./_stream_duplex":45,"./internal/streams/BufferList":50,"./internal/streams/destroy":51,"./internal/streams/stream":52,"core-util-is":88,events:"events",inherits:104,isarray:108,"process-nextick-args":44,"safe-buffer":54,"string_decoder/":55,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");t.exports=w;var s,i=e("isarray");w.ReadableState=b;e("events").EventEmitter;var a=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=global.Uint8Array||function(){};var l=e("core-util-is");l.inherits=e("inherits");var d=e("util"),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var f,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");l.inherits(w,o);var g=["error","close","destroy","pause","resume"];function b(t,r){s=s||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof s&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function w(t){if(s=s||e("./_stream_duplex"),!(this instanceof w))return new w(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function v(e,t,r,n,s){var i,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,a)):(s||(i=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||t===undefined||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):y(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?y(e,a,t,!1):T(e,a)):y(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function y(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&E(e)),T(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),v(this,e,t,!1,r)},w.prototype.unshift=function(e){return v(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return f||(f=e("string_decoder/").StringDecoder),this._readableState.decoder=new f(t),this._readableState.encoding=t,this};var _=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n(k,e):k(e))}function k(e){h("emit readable"),e.emit("readable"),M(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n(R,e,t))}function R(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function j(e){h("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,s=r.data;e-=s.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(a===i.length?s+=i:s+=i.slice(0,e),0===(e-=a)){a===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++n}return t.length-=n,s}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,s=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,a),0===(e-=a)){a===i.length?(++s,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++s}return t.length-=s,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,s=t.needReadable;return h("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",s=!0),t.ended||t.reading?h("reading or ended",s=!1):s&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,h("pipe count=%d opts=%j",s.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:w;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",w),r.removeListener("data",p),d=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){h("onend"),e.end()}s.endEmitted?n(o):r.once("end",o),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",l);var d=!1;var f=!1;function p(t){h("ondata"),f=!1,!1!==e.write(t)||f||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==I(s.pipes,e))&&!d&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function m(t){h("onerror",t),w(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),w()}function b(){h("onfinish"),e.removeListener("close",g),w()}function w(){h("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?i(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",b),e.emit("pipe",r),s.flowing||(h("pipe resume"),r.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<s;i++)n[i].emit("unpipe",this,r);return this}var a=I(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},w.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var s=this._readableState;s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.emittedReadable=!1,s.reading?s.length&&E(this):n(j,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n(x,e,t))}(this,e)),this},w.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var s in e.on("end",(function(){if(h("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(s){(h("wrapped data"),t.decoder&&(s=t.decoder.write(s)),!t.objectMode||null!==s&&s!==undefined)&&((t.objectMode||s&&s.length)&&(n.push(s)||(r=!0,e.pause())))})),e)this[s]===undefined&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<g.length;i++)e.on(g[i],n.emit.bind(n,g[i]));return n._read=function(t){h("wrapped _read",t),r&&(r=!1,e.resume())},n},w._fromList=O}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_readable.js"}],[48,{"./_stream_duplex":45,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=a;var n=e("./_stream_duplex"),s=e("core-util-is");function i(e){this.afterTransform=function(t,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var s=n.writecb;if(!s)return e.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!==r&&r!==undefined&&e.push(r);s(t);var i=e._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&e._read(i.highWaterMark)}(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState=new i(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e,r){o(t,e,r)})):o(t)}))}function o(e,t,r){if(t)return e.emit("error",t);null!==r&&r!==undefined&&e.push(r);var n=e._writableState,s=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(s.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}s.inherits=e("inherits"),s.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_transform.js"}],[49,{"./_stream_duplex":45,"./internal/streams/destroy":51,"./internal/streams/stream":52,"core-util-is":88,inherits:104,"process-nextick-args":44,"safe-buffer":54,timers:"timers","util-deprecate":180},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=g;var i,a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?r:n;g.WritableState=m;var o=e("core-util-is");o.inherits=e("inherits");var u={deprecate:e("util-deprecate")},c=e("./internal/streams/stream"),l=e("safe-buffer").Buffer,d=global.Uint8Array||function(){};var h,f=e("./internal/streams/destroy");function p(){}function m(t,r){i=i||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var o=t.highWaterMark,u=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,s=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,s,i){--t.pendingcb,r?(n(i,s),n(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",s)):(i(s),e._writableState.errorEmitted=!0,e.emit("error",s),S(e,t))}(e,r,s,t,i);else{var o=y(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),s?a(w,e,r,o,i):w(e,r,o,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function g(t){if(i=i||e("./_stream_duplex"),!(h.call(g,this)||this instanceof i))return new g(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),c.call(this)}function b(e,t,r,n,s,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)i[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;i.allBuffers=u,b(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t)}else{for(;r;){var c=r.chunk,l=r.encoding,d=r.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,l,d),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var r=y(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n(_,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}o.inherits(g,c),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||e&&e._writableState instanceof m}})):h=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var s,i=this._writableState,a=!1,o=(s=e,(l.isBuffer(s)||s instanceof d)&&!i.objectMode);return o&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=p),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n(t,r)}(this,r):(o||function(e,t,r,s){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||r===undefined||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),n(s,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,s,i){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,s);n!==a&&(r=!0,s="buffer",n=a)}var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,o,n,s,i);return u}(this,i,o,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var s=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||s.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?n(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,s,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=f.destroy,g.prototype._undestroy=f.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("timers").setImmediate)}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/_stream_writable.js"}],[50,{"safe-buffer":54},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer;t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,s,i=n.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,r=i,s=o,t.copy(r,s),o+=a.data.length,a=a.next;return i},e}()}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js"}],[51,{"process-nextick-args":44},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");function s(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;i||a?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n(s,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n(s,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})))},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[52,{stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("stream")}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/lib/internal/streams/stream.js"}],[53,{"./lib/_stream_duplex.js":45,"./lib/_stream_passthrough.js":46,"./lib/_stream_readable.js":47,"./lib/_stream_transform.js":48,"./lib/_stream_writable.js":49,stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("stream");"disable"===process.env.READABLE_STREAM&&n?(t.exports=n,(r=t.exports=n.Readable).Readable=n.Readable,r.Writable=n.Writable,r.Duplex=n.Duplex,r.Transform=n.Transform,r.PassThrough=n.PassThrough,r.Stream=n):((r=t.exports=e("./lib/_stream_readable.js")).Stream=n||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"))}}},{package:"@metamask/post-message-stream>readable-stream",file:"../../node_modules/@metamask/post-message-stream/node_modules/readable-stream/readable.js"}],[54,{buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("buffer"),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=a),i(s,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"@metamask/post-message-stream>readable-stream>safe-buffer",file:"../../node_modules/@metamask/post-message-stream/node_modules/safe-buffer/index.js"}],[55,{"safe-buffer":54},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=a(t[n]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--n<r)return 0;if(s=a(t[n]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--n<r)return 0;if(s=a(t[n]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"@metamask/post-message-stream>readable-stream>string_decoder",file:"../../node_modules/@metamask/post-message-stream/node_modules/string_decoder/lib/string_decoder.js"}],[56,{"./messages":63,"./utils":67,"@metamask/safe-event-emitter":69,"eth-rpc-errors":99,"fast-deep-equal":68,"json-rpc-engine":114},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.BaseProvider=void 0;const s=n(e("@metamask/safe-event-emitter")),i=e("eth-rpc-errors"),a=n(e("fast-deep-equal")),o=e("json-rpc-engine"),u=n(e("./messages")),c=e("./utils");class l extends s.default{constructor({logger:e=console,maxEventListeners:t=100,rpcMiddleware:r=[]}={}){super(),this._log=e,this.setMaxListeners(t),this._state=Object.assign({},l._defaultState),this.selectedAddress=null,this.chainId=null,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this.request=this.request.bind(this);const n=new o.JsonRpcEngine;r.forEach((e=>n.push(e))),this._rpcEngine=n}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw i.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestArgs(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw i.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestMethod(),data:e});if(r!==undefined&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw i.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestParams(),data:e});return new Promise(((e,n)=>{this._rpcRequest({method:t,params:r},c.getRpcPromiseCallback(e,n))}))}_initializeState(e){if(!0===this._state.initialized)throw new Error("Provider already initialized.");if(e){const{accounts:t,chainId:r,isUnlocked:n,networkVersion:s}=e;this._handleConnect(r),this._handleChainChanged({chainId:r,networkVersion:s}),this._handleUnlockStateChanged({accounts:t,isUnlocked:n}),this._handleAccountsChanged(t)}this._state.initialized=!0,this.emit("_initialized")}_rpcRequest(e,t){let r=t;return Array.isArray(e)||(e.jsonrpc||(e.jsonrpc="2.0"),"eth_accounts"!==e.method&&"eth_requestAccounts"!==e.method||(r=(r,n)=>{this._handleAccountsChanged(n.result||[],"eth_accounts"===e.method),t(r,n)})),this._rpcEngine.handle(e,r)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),this._log.debug(u.default.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new i.EthereumRpcError(1013,t||u.default.errors.disconnected()),this._log.debug(r)):(r=new i.EthereumRpcError(1011,t||u.default.errors.permanentlyDisconnected()),this._log.error(r),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleChainChanged({chainId:e}={}){c.isValidChainId(e)?(this._handleConnect(e),e!==this.chainId&&(this.chainId=e,this._state.initialized&&this.emit("chainChanged",this.chainId))):this._log.error(u.default.errors.invalidNetworkParams(),{chainId:e})}_handleAccountsChanged(e,t=!1){let r=e;Array.isArray(e)||(this._log.error("MetaMask: Received invalid accounts parameter. Please report this bug.",e),r=[]);for(const t of e)if("string"!=typeof t){this._log.error("MetaMask: Received non-string account. Please report this bug.",e),r=[];break}a.default(this._state.accounts,r)||(t&&null!==this._state.accounts&&this._log.error("MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.",r),this._state.accounts=r,this.selectedAddress!==r[0]&&(this.selectedAddress=r[0]||null),this._state.initialized&&this.emit("accountsChanged",r))}_handleUnlockStateChanged({accounts:e,isUnlocked:t}={}){"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e||[])):this._log.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.")}}r.BaseProvider=l,l._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/BaseProvider.js"}],[57,{"./StreamProvider":58,"./messages":63,"./siteMetadata":66,"./utils":67,"eth-rpc-errors":99},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.MetaMaskInpageProvider=r.MetaMaskInpageProviderStreamName=void 0;const s=e("eth-rpc-errors"),i=e("./siteMetadata"),a=n(e("./messages")),o=e("./utils"),u=e("./StreamProvider");r.MetaMaskInpageProviderStreamName="metamask-provider";class c extends u.AbstractStreamProvider{constructor(e,{jsonRpcStreamName:t=r.MetaMaskInpageProviderStreamName,logger:n=console,maxEventListeners:s,shouldSendMetadata:a}={}){if(super(e,{jsonRpcStreamName:t,logger:n,maxEventListeners:s,rpcMiddleware:o.getDefaultExternalMiddleware(n)}),this._sentWarnings={enable:!1,experimentalMethods:!1,send:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}},this._initializeStateAsync(),this.networkVersion=null,this.isMetaMask=!0,this._sendSync=this._sendSync.bind(this),this.enable=this.enable.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._metamask=this._getExperimentalApi(),this._jsonRpcConnection.events.on("notification",(e=>{const{method:t}=e;o.EMITTED_NOTIFICATIONS.includes(t)&&(this.emit("data",e),this.emit("notification",e.params.result))})),a)if("complete"===document.readyState)i.sendSiteMetadata(this._rpcEngine,this._log);else{const e=()=>{i.sendSiteMetadata(this._rpcEngine,this._log),window.removeEventListener("DOMContentLoaded",e)};window.addEventListener("DOMContentLoaded",e)}}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}_handleDisconnect(e,t){super._handleDisconnect(e,t),this.networkVersion&&!e&&(this.networkVersion=null)}_warnOfDeprecation(e){var t;!1===(null===(t=this._sentWarnings)||void 0===t?void 0:t.events[e])&&(this._log.warn(a.default.warnings.events[e]),this._sentWarnings.events[e]=!0)}enable(){return this._sentWarnings.enable||(this._log.warn(a.default.warnings.enableDeprecation),this._sentWarnings.enable=!0),new Promise(((e,t)=>{try{this._rpcRequest({method:"eth_requestAccounts",params:[]},o.getRpcPromiseCallback(e,t))}catch(e){t(e)}}))}send(e,t){return this._sentWarnings.send||(this._log.warn(a.default.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((r,n)=>{try{this._rpcRequest({method:e,params:t},o.getRpcPromiseCallback(r,n,!1))}catch(e){n(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress||null;break;case"eth_uninstallFilter":this._rpcRequest(e,o.NOOP),t=!0;break;case"net_version":t=this.networkVersion||null;break;default:throw new Error(a.default.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_getExperimentalApi(){return new Proxy({isUnlocked:async()=>(this._state.initialized||await new Promise((e=>{this.on("_initialized",(()=>e()))})),this._state.isUnlocked),requestBatch:async e=>{if(!Array.isArray(e))throw s.ethErrors.rpc.invalidRequest({message:"Batch requests must be made with an array of request objects.",data:e});return new Promise(((t,r)=>{this._rpcRequest(e,o.getRpcPromiseCallback(t,r))}))}},{get:(e,t,...r)=>(this._sentWarnings.experimentalMethods||(this._log.warn(a.default.warnings.experimentalMethods),this._sentWarnings.experimentalMethods=!0),Reflect.get(e,t,...r))})}_handleChainChanged({chainId:e,networkVersion:t}={}){super._handleChainChanged({chainId:e,networkVersion:t}),this._state.isConnected&&t!==this.networkVersion&&(this.networkVersion=t,this._state.initialized&&this.emit("networkChanged",this.networkVersion))}}r.MetaMaskInpageProvider=c}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/MetaMaskInpageProvider.js"}],[58,{"./BaseProvider":56,"./messages":63,"./utils":67,"@metamask/object-multiplex":3,"is-stream":107,"json-rpc-middleware-stream":118,pump:132},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.StreamProvider=r.AbstractStreamProvider=void 0;const s=n(e("@metamask/object-multiplex")),i=e("is-stream"),a=e("json-rpc-middleware-stream"),o=n(e("pump")),u=n(e("./messages")),c=e("./utils"),l=e("./BaseProvider");class d extends l.BaseProvider{constructor(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:n,rpcMiddleware:l}){if(super({logger:r,maxEventListeners:n,rpcMiddleware:l}),!i.duplex(e))throw new Error(u.default.errors.invalidDuplexStream());this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this);const d=new s.default;o.default(e,d,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._jsonRpcConnection=a.createStreamMiddleware({retryOnMessage:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}),o.default(this._jsonRpcConnection.stream,d.createStream(t),this._jsonRpcConnection.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider")),this._rpcEngine.push(this._jsonRpcConnection.middleware),this._jsonRpcConnection.events.on("notification",(t=>{const{method:r,params:n}=t;"metamask_accountsChanged"===r?this._handleAccountsChanged(n):"metamask_unlockStateChanged"===r?this._handleUnlockStateChanged(n):"metamask_chainChanged"===r?this._handleChainChanged(n):c.EMITTED_NOTIFICATIONS.includes(r)?this.emit("message",{type:r,data:n}):"METAMASK_STREAM_FAILURE"===r&&e.destroy(new Error(u.default.errors.permanentlyDisconnected()))}))}async _initializeStateAsync(){let e;try{e=await this.request({method:"metamask_getProviderState"})}catch(e){this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e)}this._initializeState(e)}_handleStreamDisconnect(e,t){let r=`MetaMask: Lost connection to "${e}".`;(null==t?void 0:t.stack)&&(r+=`\n${t.stack}`),this._log.warn(r),this.listenerCount("error")>0&&this.emit("error",r),this._handleDisconnect(!1,t?t.message:undefined)}_handleChainChanged({chainId:e,networkVersion:t}={}){c.isValidChainId(e)&&c.isValidNetworkVersion(t)?"loading"===t?this._handleDisconnect(!0):super._handleChainChanged({chainId:e}):this._log.error(u.default.errors.invalidNetworkParams(),{chainId:e,networkVersion:t})}}r.AbstractStreamProvider=d;r.StreamProvider=class extends d{async initialize(){return this._initializeStateAsync()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/StreamProvider.js"}],[59,{"../MetaMaskInpageProvider":57,"../StreamProvider":58,"../utils":67,"./external-extension-config.json":60,"detect-browser":94,"extension-port-stream":101},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createExternalExtensionProvider=void 0;const s=n(e("extension-port-stream")),i=e("detect-browser"),a=e("../MetaMaskInpageProvider"),o=e("../StreamProvider"),u=e("../utils"),c=n(e("./external-extension-config.json")),l=i.detect();r.createExternalExtensionProvider=function(){let e;try{const t=function(){switch(null==l?void 0:l.name){case"chrome":default:return c.default.CHROME_ID;case"firefox":return c.default.FIREFOX_ID}}(),r=chrome.runtime.connect(t),n=new s.default(r);e=new o.StreamProvider(n,{jsonRpcStreamName:a.MetaMaskInpageProviderStreamName,logger:console,rpcMiddleware:u.getDefaultExternalMiddleware(console)}),e.initialize()}catch(e){throw console.dir("MetaMask connect error.",e),e}return e}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/extension-provider/createExternalExtensionProvider.js"}],[60,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={CHROME_ID:"nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX_ID:"webextension@metamask.io"}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/extension-provider/external-extension-config.json"}],[61,{"./BaseProvider":56,"./MetaMaskInpageProvider":57,"./StreamProvider":58,"./extension-provider/createExternalExtensionProvider":59,"./initializeInpageProvider":62,"./shimWeb3":65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.StreamProvider=r.shimWeb3=r.setGlobalProvider=r.MetaMaskInpageProvider=r.MetaMaskInpageProviderStreamName=r.initializeProvider=r.createExternalExtensionProvider=r.BaseProvider=void 0;const n=e("./BaseProvider");Object.defineProperty(r,"BaseProvider",{enumerable:!0,get:function(){return n.BaseProvider}});const s=e("./extension-provider/createExternalExtensionProvider");Object.defineProperty(r,"createExternalExtensionProvider",{enumerable:!0,get:function(){return s.createExternalExtensionProvider}});const i=e("./initializeInpageProvider");Object.defineProperty(r,"initializeProvider",{enumerable:!0,get:function(){return i.initializeProvider}}),Object.defineProperty(r,"setGlobalProvider",{enumerable:!0,get:function(){return i.setGlobalProvider}});const a=e("./MetaMaskInpageProvider");Object.defineProperty(r,"MetaMaskInpageProvider",{enumerable:!0,get:function(){return a.MetaMaskInpageProvider}}),Object.defineProperty(r,"MetaMaskInpageProviderStreamName",{enumerable:!0,get:function(){return a.MetaMaskInpageProviderStreamName}});const o=e("./shimWeb3");Object.defineProperty(r,"shimWeb3",{enumerable:!0,get:function(){return o.shimWeb3}});const u=e("./StreamProvider");Object.defineProperty(r,"StreamProvider",{enumerable:!0,get:function(){return u.StreamProvider}})}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/index.js"}],[62,{"./MetaMaskInpageProvider":57,"./shimWeb3":65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.setGlobalProvider=r.initializeProvider=void 0;const n=e("./MetaMaskInpageProvider"),s=e("./shimWeb3");function i(e){window.ethereum=e,window.dispatchEvent(new Event("ethereum#initialized"))}r.initializeProvider=function({connectionStream:e,jsonRpcStreamName:t,logger:r=console,maxEventListeners:a=100,shouldSendMetadata:o=!0,shouldSetOnWindow:u=!0,shouldShimWeb3:c=!1}){const l=new n.MetaMaskInpageProvider(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:a,shouldSendMetadata:o}),d=new Proxy(l,{deleteProperty:()=>!0});return u&&i(d),c&&s.shimWeb3(d,r),d},r.setGlobalProvider=i}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/initializeInpageProvider.js"}],[63,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n={errors:{disconnected:()=>"MetaMask: Disconnected from chain. Attempting to connect.",permanentlyDisconnected:()=>"MetaMask: Disconnected from MetaMask background. Page reload required.",sendSiteMetadata:()=>"MetaMask: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidNetworkParams:()=>"MetaMask: Received invalid network parameters. Please report this bug.",invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`MetaMask: Connected to chain with ID "${e}".`},warnings:{enableDeprecation:"MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102",sendDeprecation:"MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193",events:{close:"MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect",data:"MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message",networkChanged:"MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged",notification:"MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message"},rpc:{ethDecryptDeprecation:"MetaMask: The RPC method 'eth_decrypt' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",ethGetEncryptionPublicKeyDeprecation:"MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}};r.default=n}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/messages.js"}],[64,{"../messages":63},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createRpcWarningMiddleware=void 0;const s=n(e("../messages"));r.createRpcWarningMiddleware=function(e){const t={ethDecryptDeprecation:!1,ethGetEncryptionPublicKeyDeprecation:!1};return(r,n,i)=>{!1===t.ethDecryptDeprecation&&"eth_decrypt"===r.method?(e.warn(s.default.warnings.rpc.ethDecryptDeprecation),t.ethDecryptDeprecation=!0):!1===t.ethGetEncryptionPublicKeyDeprecation&&"eth_getEncryptionPublicKey"===r.method&&(e.warn(s.default.warnings.rpc.ethGetEncryptionPublicKeyDeprecation),t.ethGetEncryptionPublicKeyDeprecation=!0),i()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/middleware/createRpcWarningMiddleware.js"}],[65,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shimWeb3=void 0,r.shimWeb3=function(e,t=console){let r=!1,n=!1;if(!window.web3){const s="__isMetaMaskShim__";let i={currentProvider:e};Object.defineProperty(i,s,{value:!0,enumerable:!0,configurable:!1,writable:!1}),i=new Proxy(i,{get:(i,a,...o)=>("currentProvider"!==a||r?"currentProvider"===a||a===s||n||(n=!0,t.error("MetaMask no longer injects web3. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),e.request({method:"metamask_logWeb3ShimUsage"}).catch((e=>{t.debug("MetaMask: Failed to log web3 shim usage.",e)}))):(r=!0,t.warn("You are accessing the MetaMask window.web3.currentProvider shim. This property is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3")),Reflect.get(i,a,...o)),set:(...e)=>(t.warn("You are accessing the MetaMask window.web3 shim. This object is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),Reflect.set(...e))}),Object.defineProperty(window,"web3",{value:i,enumerable:!1,configurable:!0,writable:!0})}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/shimWeb3.js"}],[66,{"./messages":63,"./utils":67},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.sendSiteMetadata=void 0;const s=n(e("./messages")),i=e("./utils");function a(e){const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const n=t.querySelector('head > meta[name="title"]');return n?n.content:t.title&&t.title.length>0?t.title:window.location.hostname}async function o(e){const{document:t}=e,r=t.querySelectorAll('head > link[rel~="icon"]');for(const e of r)if(e&&await u(e.href))return e.href;return null}function u(e){return new Promise(((t,r)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(e){r(e)}}))}r.sendSiteMetadata=async function(e,t){try{const t=await async function(){return{name:a(window),icon:await o(window)}}();e.handle({jsonrpc:"2.0",id:1,method:"metamask_sendDomainMetadata",params:t},i.NOOP)}catch(e){t.error({message:s.default.errors.sendSiteMetadata(),originalError:e})}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/siteMetadata.js"}],[67,{"./middleware/createRpcWarningMiddleware":64,"eth-rpc-errors":99,"json-rpc-engine":114},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NOOP=r.isValidNetworkVersion=r.isValidChainId=r.getRpcPromiseCallback=r.getDefaultExternalMiddleware=r.EMITTED_NOTIFICATIONS=void 0;const n=e("json-rpc-engine"),s=e("eth-rpc-errors"),i=e("./middleware/createRpcWarningMiddleware");r.EMITTED_NOTIFICATIONS=Object.freeze(["eth_subscription"]);r.getDefaultExternalMiddleware=(e=console)=>{return[n.createIdRemapMiddleware(),(t=e,(e,r,n)=>{"string"==typeof e.method&&e.method||(r.error=s.ethErrors.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:e})),n((e=>{const{error:n}=r;return n?(t.error(`MetaMask - RPC Error: ${n.message}`,n),e()):e()}))}),i.createRpcWarningMiddleware(e)];var t};r.getRpcPromiseCallback=(e,t,r=!0)=>(n,s)=>{n||s.error?t(n||s.error):!r||Array.isArray(s)?e(s):e(s.result)};r.isValidChainId=e=>Boolean(e)&&"string"==typeof e&&e.startsWith("0x");r.isValidNetworkVersion=e=>Boolean(e)&&"string"==typeof e;r.NOOP=()=>undefined}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/utils.js"}],[68,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=Array.isArray,s=Object.keys,i=Object.prototype.hasOwnProperty;t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){var a,o,u,c=n(t),l=n(r);if(c&&l){if((o=t.length)!=r.length)return!1;for(a=o;0!=a--;)if(!e(t[a],r[a]))return!1;return!0}if(c!=l)return!1;var d=t instanceof Date,h=r instanceof Date;if(d!=h)return!1;if(d&&h)return t.getTime()==r.getTime();var f=t instanceof RegExp,p=r instanceof RegExp;if(f!=p)return!1;if(f&&p)return t.toString()==r.toString();var m=s(t);if((o=m.length)!==s(r).length)return!1;for(a=o;0!=a--;)if(!i.call(r,m[a]))return!1;for(a=o;0!=a--;)if(!e(t[u=m[a]],r[u]))return!1;return!0}return t!=t&&r!=r}}}},{package:"@metamask/providers>fast-deep-equal",file:"../../node_modules/@metamask/providers/node_modules/fast-deep-equal/index.js"}],[69,{events:"events"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("events");function s(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class i extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(n!==undefined)r=r&&n.error===undefined;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const i=n[e];if(i===undefined)return!1;if("function"==typeof i)s(i,this,t);else{const e=i.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(i);for(let n=0;n<e;n+=1)s(r[n],this,t)}return!0}}r.default=i}}},{package:"json-rpc-engine>@metamask/safe-event-emitter",file:"../../node_modules/@metamask/safe-event-emitter/index.js"}],[70,{superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const n=e("superstruct");function s(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class i extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=i,r.assert=function(e,t="Assertion failed.",r=i){if(!e){if(t instanceof Error)throw t;throw s(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",a=i){try{(0,n.assert)(e,t)}catch(e){throw s(a,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/assert.js"}],[71,{"./assert":70,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const n=e("superstruct"),s=e("./assert");r.base64=(e,t={})=>{const r=t.paddingRequired??!1,i=t.characterSet??"base64";let a,o;return"base64"===i?a=String.raw`[A-Za-z0-9+\/]`:((0,s.assert)("base64url"===i),a=String.raw`[-_A-Za-z0-9]`),o=r?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),(0,n.pattern)(e,o)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/base64.js"}],[72,{"./assert":70,"./hex":77,buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const n=e("./assert"),s=e("./hex"),i=48,a=58,o=87;const u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function l(e){(0,n.assert)(c(e),"Value must be a Uint8Array.")}function d(e){if(l(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,s.add0x)(r.join(""))}function h(e){l(e);const t=d(e);return BigInt(t)}function f(e){if("0x"===e?.toLowerCase?.())return new Uint8Array;(0,s.assertIsHexString)(e);const t=(0,s.remove0x)(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,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),u=t-(t<a?i:o),c=s-(s<a?i:o);n[e]=16*u+c}return n}function p(e){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return f(e.toString(16))}function m(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return f(e.toString(16))}function g(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?f(e):g(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=c,r.assertIsBytes=l,r.bytesToHex=d,r.bytesToBigInt=h,r.bytesToSignedBigInt=function(e){l(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},r.bytesToNumber=function(e){l(e);const t=h(e);return(0,n.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},r.bytesToString=function(e){return l(e),(new TextDecoder).decode(e)},r.hexToBytes=f,r.bigIntToBytes=p,r.signedBigIntToBytes=function(e,t){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)("number"==typeof t,"Byte length must be a number."),(0,n.assert)(t>0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const s=new Uint8Array(t);for(let e=0;e<s.length;e++)s[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return s.reverse()},r.numberToBytes=m,r.stringToBytes=g,r.valueToBytes=b,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const s=b(e[n]);t[n]=s,r+=s.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},r.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/bytes.js"}],[73,{"./base64":71,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const n=e("superstruct"),s=e("./base64");r.ChecksumStruct=(0,n.size)((0,s.base64)((0,n.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/checksum.js"}],[74,{"./assert":70,"./bytes":72,"./hex":77,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const n=e("superstruct"),s=e("./assert"),i=e("./bytes"),a=e("./hex"),o=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),a.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),o,Number),c=(0,n.coerce)((0,n.bigint)(),o,BigInt),l=((0,n.union)([a.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([a.StrictHexStruct]),i.hexToBytes)),d=(0,n.coerce)(a.StrictHexStruct,(0,n.instance)(Uint8Array),i.bytesToHex);r.createNumber=function(e){try{const t=(0,n.create)(e,u);return(0,s.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,n.create)(e,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,d)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/coercers.js"}],[75,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,s,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class o{constructor(e){n.set(this,void 0),i(this,n,new Map(e),"f"),Object.freeze(this)}get size(){return a(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return a(this,n,"f")[Symbol.iterator]()}entries(){return a(this,n,"f").entries()}forEach(e,t){return a(this,n,"f").forEach(((r,n,s)=>e.call(t,r,n,this)))}get(e){return a(this,n,"f").get(e)}has(e){return a(this,n,"f").has(e)}keys(){return a(this,n,"f").keys()}values(){return a(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=o;class u{constructor(e){s.set(this,void 0),i(this,s,new Set(e),"f"),Object.freeze(this)}get size(){return a(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return a(this,s,"f")[Symbol.iterator]()}entries(){return a(this,s,"f").entries()}forEach(e,t){return a(this,s,"f").forEach(((r,n,s)=>e.call(t,r,n,this)))}has(e){return a(this,s,"f").has(e)}keys(){return a(this,s,"f").keys()}values(){return a(this,s,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=u,Object.freeze(o),Object.freeze(o.prototype),Object.freeze(u),Object.freeze(u.prototype)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/collections.js"}],[76,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/encryption-types.js"}],[77,{"./assert":70,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.StrictHexStruct=r.HexStruct=void 0;const n=e("superstruct"),s=e("./assert");function i(e){return(0,n.is)(e,r.HexStruct)}function a(e){return(0,n.is)(e,r.StrictHexStruct)}r.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),r.isHexString=i,r.isStrictHexString=a,r.assertIsHexString=function(e){(0,s.assert)(i(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,s.assert)(a(e),'Value must be a hexadecimal string, starting with "0x".')},r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/hex.js"}],[78,{"./assert":70,"./base64":71,"./bytes":72,"./checksum":73,"./coercers":74,"./collections":75,"./encryption-types":76,"./hex":77,"./json":79,"./keyring":80,"./logging":81,"./misc":82,"./number":83,"./opaque":84,"./time":85,"./transaction-types":86,"./versions":87},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./assert"),r),s(e("./base64"),r),s(e("./bytes"),r),s(e("./checksum"),r),s(e("./coercers"),r),s(e("./collections"),r),s(e("./encryption-types"),r),s(e("./hex"),r),s(e("./json"),r),s(e("./keyring"),r),s(e("./logging"),r),s(e("./misc"),r),s(e("./number"),r),s(e("./opaque"),r),s(e("./time"),r),s(e("./transaction-types"),r),s(e("./versions"),r)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/index.js"}],[79,{"./assert":70,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.getSafeJson=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=void 0;const n=e("superstruct"),s=e("./assert");function i(e){return(0,n.create)(e,r.JsonStruct)}r.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>r.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,n.coerce)(r.UnsafeJsonStruct,(0,n.any)(),(e=>((0,s.assertStruct)(e,r.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t)))))),r.isValidJson=function(e){try{return i(e),!0}catch{return!1}},r.getSafeJson=i,r.getJsonSize=function(e){(0,s.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,n.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),r.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(r.JsonStruct),stack:(0,n.optional)((0,n.string)())}),r.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),r.JsonStruct),(0,n.array)(r.JsonStruct)])),r.JsonRpcRequestStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,n.string)(),params:r.JsonRpcParamsStruct}),r.JsonRpcNotificationStruct=(0,n.omit)(r.JsonRpcRequestStruct,["id"]),r.isJsonRpcNotification=function(e){return(0,n.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,s.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,n.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,s.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,n.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,n.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,s.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,n.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,s.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,n.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,s.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,n.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,s.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/json.js"}],[80,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/keyring.js"}],[81,{debug:92},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const s=(0,n(e("debug")).default)("metamask");r.createProjectLogger=function(e){return s.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/logging.js"}],[82,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function n(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),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"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},r.isASCII=n,r.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>n(t)?e+1:e+2),0)+(e.match(r.ESCAPE_CHARACTERS_REGEXP)??[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/misc.js"}],[83,{"./assert":70,"./hex":77},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const n=e("./assert"),s=e("./hex");r.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,s.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,s.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,s.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,s.assertIsHexString)(e),BigInt((0,s.add0x)(e)))}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/number.js"}],[84,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/opaque.js"}],[85,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.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"}(r.Duration||(r.Duration={}));const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return n(e,"count"),e*t},r.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/time.js"}],[86,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/transaction-types.js"}],[87,{"./assert":70,semver:160,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const n=e("semver"),s=e("superstruct"),i=e("./assert");r.VersionStruct=(0,s.refine)((0,s.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,s.refine)((0,s.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,s.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,s.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,i.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,i.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/versions.js"}],[88,{"../../is-buffer/index.js":106},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this)}).call(this,{isBuffer:e("../../is-buffer/index.js")})}}},{package:"browserify>readable-stream>core-util-is",file:"../../node_modules/core-util-is/lib/util.js"}],[89,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=1e3,s=60*n,i=60*s,a=24*i,o=7*a,u=365.25*a;function c(e,t,r,n){var s=t>=1.5*r;return Math.round(e/r)+" "+n+(s?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*u;case"weeks":case"week":case"w":return r*o;case"days":case"day":case"d":return r*a;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return undefined}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return c(e,t,a,"day");if(t>=i)return c(e,t,i,"hour");if(t>=s)return c(e,t,s,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=s)return Math.round(e/s)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}},{package:"eslint>debug>ms",file:"../../node_modules/debug/node_modules/ms/index.js"}],[90,{"./common":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){r.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,s=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))})),e.splice(s,0,r)},r.save=function(e){try{e?r.storage.setItem("debug",e):r.storage.removeItem("debug")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},r.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage=function(){try{return localStorage}catch(e){}}(),r.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(r);const{formatters:n}=t.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/browser.js"}],[91,{ms:89},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(t){function r(e){let t,s,i,a=null;function o(...e){if(!o.enabled)return;const n=o,s=Number(new Date),i=s-(t||s);n.diff=i,n.prev=t,n.curr=s,t=s,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,s)=>{if("%%"===t)return"%";a++;const i=r.formatters[s];if("function"==typeof i){const r=e[a];t=i.call(n,r),e.splice(a,1),a--}return t})),r.formatArgs.call(n,e);(n.log||r.log).apply(n,e)}return o.namespace=e,o.useColors=r.useColors(),o.color=r.selectColor(e),o.extend=n,o.destroy=r.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(s!==r.namespaces&&(s=r.namespaces,i=r.enabled(e)),i),set:e=>{a=e}}),"function"==typeof r.init&&r.init(o),o}function n(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){const e=[...r.names.map(s),...r.skips.map(s).map((e=>"-"+e))].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.namespaces=e,r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),s=n.length;for(t=0;t<s;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.slice(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((e=>{r[e]=t[e]})),r.names=[],r.skips=[],r.formatters={},r.selectColor=function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return r.colors[Math.abs(t)%r.colors.length]},r.enable(r.load()),r}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/common.js"}],[92,{"./browser.js":90,"./node.js":93},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=e("./browser.js"):t.exports=e("./node.js")}}},{package:"eslint>debug",file:"../../node_modules/debug/src/index.js"}],[93,{"./common":91,"supports-color":179,tty:"tty",util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("tty"),s=e("util");r.init=function(e){e.inspectOpts={};const t=Object.keys(r.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=r.inspectOpts[t[n]]},r.log=function(...e){return process.stderr.write(s.format(...e)+"\n")},r.formatArgs=function(e){const{namespace:n,useColors:s}=this;if(s){const r=this.color,s="[3"+(r<8?r:"8;5;"+r),i=` ${s};1m${n} `;e[0]=i+e[0].split("\n").join("\n"+i),e.push(s+"m+"+t.exports.humanize(this.diff)+"")}else e[0]=function(){if(r.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+e[0]},r.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},r.load=function(){return process.env.DEBUG},r.useColors=function(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):n.isatty(process.stderr.fd)},r.destroy=s.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),r.colors=[6,2,3,4,5,1];try{const t=e("supports-color");t&&(t.stderr||t).level>=2&&(r.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}r.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),t.exports=e("./common")(r);const{formatters:i}=t.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts)}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/node.js"}],[94,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,s=0,i=t.length;s<i;s++)!n&&s in t||(n||(n=Array.prototype.slice.call(t,0,s)),n[s]=t[s]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.getNodeVersion=r.detectOS=r.parseUserAgent=r.browserName=r.detect=r.ReactNativeInfo=r.BotInfo=r.SearchBotDeviceInfo=r.NodeInfo=r.BrowserInfo=void 0;var s=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"};r.BrowserInfo=s;var i=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform};r.NodeInfo=i;var a=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"};r.SearchBotDeviceInfo=a;var o=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null};r.BotInfo=o;var u=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null};r.ReactNativeInfo=u;var c=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=3,d=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],h=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function f(e){return""!==e&&d.reduce((function(t,r){var n=r[0],s=r[1];if(t)return t;var i=s.exec(e);return!!i&&[n,i]}),!1)}function p(e){var t=f(e);if(!t)return null;var r=t[0],i=t[1];if("searchbot"===r)return new o;var u=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);u?u.length<l&&(u=n(n([],u,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(l-u.length),!0)):u=[];var d=u.join("."),h=m(e),p=c.exec(e);return p&&p[1]?new a(r,d,h,p[1]):new s(r,d,h)}function m(e){for(var t=0,r=h.length;t<r;t++){var n=h[t],s=n[0];if(n[1].exec(e))return s}return null}function g(){return"undefined"!=typeof process&&process.version?new i(process.version.slice(1)):null}r.detect=function(e){return e?p(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new u:"undefined"!=typeof navigator?p(navigator.userAgent):g()},r.browserName=function(e){var t=f(e);return t?t[0]:null},r.parseUserAgent=p,r.detectOS=m,r.getNodeVersion=g}}},{package:"@metamask/providers>detect-browser",file:"../../node_modules/detect-browser/index.js"}],[95,{once:130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("once"),s=function(){},i=function(e,t,r){if("function"==typeof t)return i(e,null,t);t||(t={}),r=n(r||s);var a=e._writableState,o=e._readableState,u=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,l=!1,d=function(){e.writable||h()},h=function(){c=!1,u||r.call(e)},f=function(){u=!1,c||r.call(e)},p=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},m=function(t){r.call(e,t)},g=function(){process.nextTick(b)},b=function(){if(!l)return(!u||o&&o.ended&&!o.destroyed)&&(!c||a&&a.ended&&!a.destroyed)?void 0:r.call(e,new Error("premature close"))},w=function(){e.req.on("finish",h)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?c&&!a&&(e.on("end",d),e.on("close",d)):(e.on("complete",h),e.on("abort",g),e.req?w():e.on("request",w)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",p),e.on("end",f),e.on("finish",h),!1!==t.error&&e.on("error",m),e.on("close",g),function(){l=!0,e.removeListener("complete",h),e.removeListener("abort",g),e.removeListener("request",w),e.req&&e.req.removeListener("finish",h),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("exit",p),e.removeListener("end",f),e.removeListener("error",m),e.removeListener("close",g)}};t.exports=i}}},{package:"pump>end-of-stream",file:"../../node_modules/end-of-stream/index.js"}],[96,{"fast-safe-stringify":102},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.EthereumProviderError=r.EthereumRpcError=void 0;const n=e("fast-safe-stringify");class s extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,r!==undefined&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return this.data!==undefined&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),i,2)}}r.EthereumRpcError=s;function i(e,t){return"[Circular]"===t?undefined:t}r.EthereumProviderError=class extends s{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/classes.js"}],[97,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorValues=r.errorCodes=void 0,r.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},r.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/error-constants.js"}],[98,{"./classes":96,"./error-constants":97,"./utils":100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ethErrors=void 0;const n=e("./classes"),s=e("./utils"),i=e("./error-constants");function a(e,t){const[r,i]=u(t);return new n.EthereumRpcError(e,r||s.getMessageFromCode(e),i)}function o(e,t){const[r,i]=u(t);return new n.EthereumProviderError(e,r||s.getMessageFromCode(e),i)}function u(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||undefined,r]}}return[]}r.ethErrors={rpc:{parse:e=>a(i.errorCodes.rpc.parse,e),invalidRequest:e=>a(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>a(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>a(i.errorCodes.rpc.methodNotFound,e),internal:e=>a(i.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(t,e)},invalidInput:e=>a(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>a(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>a(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>a(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>a(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>a(i.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>o(i.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>o(i.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>o(i.errorCodes.provider.unsupportedMethod,e),disconnected:e=>o(i.errorCodes.provider.disconnected,e),chainDisconnected:e=>o(i.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:s}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,s)}}}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/errors.js"}],[99,{"./classes":96,"./error-constants":97,"./errors":98,"./utils":100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getMessageFromCode=r.serializeError=r.EthereumProviderError=r.EthereumRpcError=r.ethErrors=r.errorCodes=void 0;const n=e("./classes");Object.defineProperty(r,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const s=e("./utils");Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return s.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return s.getMessageFromCode}});const i=e("./errors");Object.defineProperty(r,"ethErrors",{enumerable:!0,get:function(){return i.ethErrors}});const a=e("./error-constants");Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/index.js"}],[100,{"./classes":96,"./error-constants":97},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=e("./error-constants"),s=e("./classes"),i=n.errorCodes.rpc.internal,a="Unspecified error message. This is a bug, please report it.",o={code:i,message:u(i)};function u(e,t=a){if(Number.isInteger(e)){const t=e.toString();if(h(n.errorValues,t))return n.errorValues[t].message;if(l(e))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!l(e)}function l(e){return e>=-32099&&e<=-32e3}function d(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",r.getMessageFromCode=u,r.isValidCode=c,r.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:r=!1}={}){var n,i;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof s.EthereumRpcError)return e.serialize();const a={};if(e&&"object"==typeof e&&!Array.isArray(e)&&h(e,"code")&&c(e.code)){const t=e;a.code=t.code,t.message&&"string"==typeof t.message?(a.message=t.message,h(t,"data")&&(a.data=t.data)):(a.message=u(a.code),a.data={originalError:d(e)})}else{a.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;a.message=r&&"string"==typeof r?r:t.message,a.data={originalError:d(e)}}const l=null===(i=e)||void 0===i?void 0:i.stack;return r&&e&&l&&"string"==typeof l&&(a.stack=l),a}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/utils.js"}],[101,{buffer:"buffer",stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){const n=e("stream");t.exports=class extends n.Duplex{constructor(e){super({objectMode:!0}),this._port=e,this._port.onMessage.addListener((e=>this._onMessage(e))),this._port.onDisconnect.addListener((()=>this._onDisconnect()))}_onMessage(e){if(r.isBuffer(e)){const t=r.from(e);this.push(t)}else this.push(e)}_onDisconnect(){this.destroy()}_read(){return undefined}_write(e,t,n){try{if(r.isBuffer(e)){const t=e.toJSON();t._isBuffer=!0,this._port.postMessage(t)}else this._port.postMessage(e)}catch(e){return n(new Error("PortDuplexStream - disconnected"))}return n()}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/providers>extension-port-stream",file:"../../node_modules/extension-port-stream/dist/index.js"}],[102,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=u,u.default=u,u.stable=h,u.stableStringify=h;var n="[...]",s="[Circular]",i=[],a=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function u(e,t,r,n){var s;void 0===n&&(n=o()),l(e,"",0,[],undefined,0,n);try{s=0===a.length?JSON.stringify(e,t,r):JSON.stringify(e,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var u=i.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function c(e,t,r,n){var s=Object.getOwnPropertyDescriptor(n,r);s.get!==undefined?s.configurable?(Object.defineProperty(n,r,{value:e}),i.push([n,r,t,s])):a.push([t,r,e]):(n[r]=e,i.push([n,r,t]))}function l(e,t,r,i,a,o,u){var d;if(o+=1,"object"==typeof e&&null!==e){for(d=0;d<i.length;d++)if(i[d]===e)return void c(s,e,t,a);if(void 0!==u.depthLimit&&o>u.depthLimit)return void c(n,e,t,a);if(void 0!==u.edgesLimit&&r+1>u.edgesLimit)return void c(n,e,t,a);if(i.push(e),Array.isArray(e))for(d=0;d<e.length;d++)l(e[d],d,d,i,e,o,u);else{var h=Object.keys(e);for(d=0;d<h.length;d++){var f=h[d];l(e[f],f,d,i,e,o,u)}}i.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function h(e,t,r,n){void 0===n&&(n=o());var s,u=f(e,"",0,[],undefined,0,n)||e;try{s=0===a.length?JSON.stringify(u,t,r):JSON.stringify(u,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var c=i.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function f(e,t,r,a,o,u,l){var h;if(u+=1,"object"==typeof e&&null!==e){for(h=0;h<a.length;h++)if(a[h]===e)return void c(s,e,t,o);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==l.depthLimit&&u>l.depthLimit)return void c(n,e,t,o);if(void 0!==l.edgesLimit&&r+1>l.edgesLimit)return void c(n,e,t,o);if(a.push(e),Array.isArray(e))for(h=0;h<e.length;h++)f(e[h],h,h,a,e,u,l);else{var p={},m=Object.keys(e).sort(d);for(h=0;h<m.length;h++){var g=m[h];f(e[g],g,h,a,e,u,l),p[g]=e[g]}if(void 0===o)return p;i.push([o,t,e]),o[t]=p}a.pop()}}function p(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(a.length>0)for(var n=0;n<a.length;n++){var s=a[n];if(s[1]===t&&s[0]===r){r=s[2],a.splice(n,1);break}}return e.call(this,t,r)}}}}},{package:"eth-rpc-errors>fast-safe-stringify",file:"../../node_modules/fast-safe-stringify/index.js"}],[103,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return-1!==n&&(-1===s||n<s)}}}},{package:"istanbul-lib-report>supports-color>has-flag",file:"../../node_modules/has-flag/index.js"}],[104,{"./inherits_browser.js":105,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){try{var n=e("util");if("function"!=typeof n.inherits)throw"";t.exports=n.inherits}catch(r){t.exports=e("./inherits_browser.js")}}}},{package:"browserify>inherits",file:"../../node_modules/inherits/inherits.js"}],[105,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}}},{package:"browserify>inherits",file:"../../node_modules/inherits/inherits_browser.js"}],[106,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
12121
12143
  /*!
12122
12144
  * Determine if an object is a Buffer
12123
12145
  *
12124
12146
  * @author Feross Aboukhadijeh <https://feross.org>
12125
12147
  * @license MIT
12126
12148
  */
12127
- t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}}}},{package:"browserify>insert-module-globals>is-buffer",file:"../../node_modules/is-buffer/index.js"}],[107,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;n.writable=e=>n(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,n.readable=e=>n(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&"function"==typeof e._transform&&"object"==typeof e._transformState,t.exports=n}}},{package:"@metamask/providers>is-stream",file:"../../node_modules/is-stream/index.js"}],[108,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}}}},{package:"browserify>readable-stream>isarray",file:"../../node_modules/isarray/index.js"}],[109,{"@metamask/safe-event-emitter":69,"eth-rpc-errors":99},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcEngine=void 0;const s=n(e("@metamask/safe-event-emitter")),i=e("eth-rpc-errors");class o extends s.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[s,i,a]=await o._runAllMiddleware(e,t,this._middleware);return i?(await o._runReturnHandlers(a),n(s)):r((async e=>{try{await o._runReturnHandlers(a)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new i.EthereumRpcError(i.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:undefined,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const r=new i.EthereumRpcError(i.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=Object.assign({},e),n={id:r.id,jsonrpc:r.jsonrpc};let s=null;try{await this._processRequest(r,n)}catch(e){s=e}return s&&(delete n.result,n.error||(n.error=i.serializeError(s))),t(s,n)}async _processRequest(e,t){const[r,n,s]=await o._runAllMiddleware(e,t,this._middleware);if(o._checkForCompletion(e,t,n),await o._runReturnHandlers(s),r)throw r}static async _runAllMiddleware(e,t,r){const n=[];let s=null,i=!1;for(const a of r)if([s,i]=await o._runMiddleware(e,t,a,n),i)break;return[s,i,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((s=>{const o=e=>{const r=e||t.error;r&&(t.error=i.serializeError(r)),s([r,!0])},u=r=>{t.error?o(t.error):(r&&("function"!=typeof r&&o(new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${a(e)}`,{request:e})),n.push(r)),s([null,!1]))};try{r(e,t,u,o)}catch(e){o(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${a(e)}`,{request:e});if(!r)throw new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${a(e)}`,{request:e})}}function a(e){return JSON.stringify(e,null,2)}r.JsonRpcEngine=o}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/JsonRpcEngine.js"}],[110,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createAsyncMiddleware=void 0,r.createAsyncMiddleware=function(e){return async(t,r,n,s)=>{let i;const o=new Promise((e=>{i=e}));let a=null,u=!1;const c=async()=>{u=!0,n((e=>{a=e,i()})),await o};try{await e(t,r,c),u?(await o,a(null)):s(null)}catch(e){a?a(e):s(e)}}}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/createAsyncMiddleware.js"}],[111,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createScaffoldMiddleware=void 0,r.createScaffoldMiddleware=function(e){return(t,r,n,s)=>{const i=e[t.method];return i===undefined?n():"function"==typeof i?i(t,r,n,s):(r.result=i,s())}}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/createScaffoldMiddleware.js"}],[112,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getUniqueId=void 0;const n=4294967295;let s=Math.floor(Math.random()*n);r.getUniqueId=function(){return s=(s+1)%n,s}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/getUniqueId.js"}],[113,{"./getUniqueId":112},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createIdRemapMiddleware=void 0;const n=e("./getUniqueId");r.createIdRemapMiddleware=function(){return(e,t,r,s)=>{const i=e.id,o=n.getUniqueId();e.id=o,t.id=o,r((r=>{e.id=i,t.id=i,r()}))}}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/idRemapMiddleware.js"}],[114,{"./JsonRpcEngine":109,"./createAsyncMiddleware":110,"./createScaffoldMiddleware":111,"./getUniqueId":112,"./idRemapMiddleware":113,"./mergeMiddleware":115},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./idRemapMiddleware"),r),s(e("./createAsyncMiddleware"),r),s(e("./createScaffoldMiddleware"),r),s(e("./getUniqueId"),r),s(e("./JsonRpcEngine"),r),s(e("./mergeMiddleware"),r)}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/index.js"}],[115,{"./JsonRpcEngine":109},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mergeMiddleware=void 0;const n=e("./JsonRpcEngine");r.mergeMiddleware=function(e){const t=new n.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/mergeMiddleware.js"}],[116,{"readable-stream":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("readable-stream");r.default=function(e){if(!e||!e.engine)throw new Error("Missing engine parameter!");const{engine:t}=e,r=new n.Duplex({objectMode:!0,read:()=>undefined,write:function(e,n,s){t.handle(e,((e,t)=>{r.push(t)})),s()}});return t.on&&t.on("notification",(e=>{r.push(e)})),r}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/createEngineStream.js"}],[117,{"@metamask/safe-event-emitter":69,"readable-stream":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const s=n(e("@metamask/safe-event-emitter")),i=e("readable-stream");r.default=function(e={}){const t={},r=new i.Duplex({objectMode:!0,read:()=>undefined,write:function(r,s,i){let a=null;try{!r.id?function(r){(null==e?void 0:e.retryOnMessage)&&r.method===e.retryOnMessage&&Object.values(t).forEach((({req:e,retryCount:r=0})=>{if(e.id){if(r>=3)throw new Error(`StreamMiddleware - Retry limit exceeded for request id "${e.id}"`);t[e.id].retryCount=r+1,o(e)}}));n.emit("notification",r)}(r):function(e){const r=t[e.id];if(!r)return void console.warn(`StreamMiddleware - Unknown response id "${e.id}"`);delete t[e.id],Object.assign(r.res,e),setTimeout(r.end)}(r)}catch(e){a=e}i(a)}}),n=new s.default;return{events:n,middleware:(e,r,n,s)=>{o(e),t[e.id]={req:e,res:r,next:n,end:s}},stream:r};function o(e){r.push(e)}}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/createStreamMiddleware.js"}],[118,{"./createEngineStream":116,"./createStreamMiddleware":117},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createStreamMiddleware=r.createEngineStream=void 0;const s=n(e("./createEngineStream"));r.createEngineStream=s.default;const i=n(e("./createStreamMiddleware"));r.createStreamMiddleware=i.default}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/index.js"}],[119,{"./_stream_readable":121,"./_stream_writable":123,"core-util-is":88,inherits:104,"process-nextick-args":132},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args"),s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=d;var i=Object.create(e("core-util-is"));i.inherits=e("inherits");var o=e("./_stream_readable"),a=e("./_stream_writable");i.inherits(d,o);for(var u=s(a.prototype),c=0;c<u.length;c++){var l=u[c];d.prototype[l]||(d.prototype[l]=a.prototype[l])}function d(e){if(!(this instanceof d))return new d(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_duplex.js"}],[120,{"./_stream_transform":122,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=i;var n=e("./_stream_transform"),s=Object.create(e("core-util-is"));function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}s.inherits=e("inherits"),s.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_passthrough.js"}],[121,{"./_stream_duplex":119,"./internal/streams/BufferList":124,"./internal/streams/destroy":125,"./internal/streams/stream":126,"core-util-is":88,events:"events",inherits:104,isarray:108,"process-nextick-args":132,"safe-buffer":128,"string_decoder/":129,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");t.exports=w;var s,i=e("isarray");w.ReadableState=b;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=global.Uint8Array||function(){};var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var d=e("util"),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var f,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");l.inherits(w,a);var g=["error","close","destroy","pause","resume"];function b(t,r){t=t||{};var n=r instanceof(s=s||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function w(t){if(s=s||e("./_stream_duplex"),!(this instanceof w))return new w(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function v(e,t,r,n,s){var i,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,o)):(s||(i=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||t===undefined||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),i?e.emit("error",i):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):y(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?y(e,o,t,!1):T(e,o)):y(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function y(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),T(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),v(this,e,t,!1,r)},w.prototype.unshift=function(e){return v(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return f||(f=e("string_decoder/").StringDecoder),this._readableState.decoder=new f(t),this._readableState.encoding=t,this};var _=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(E,e):E(e))}function E(e){h("emit readable"),e.emit("readable"),M(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(R,e,t))}function R(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function j(e){h("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,s=r.data;e-=s.length;for(;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(o===i.length?s+=i:s+=i.slice(0,e),0===(e-=o)){o===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(o));break}++n}return t.length-=n,s}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,s=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,o),0===(e-=o)){o===i.length?(++s,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(o));break}++s}return t.length-=s,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):k(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,s=t.needReadable;return h("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",s=!0),t.ended||t.reading?h("reading or ended",s=!1):s&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,h("pipe count=%d opts=%j",s.pipesCount,t);var a=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:w;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",w),r.removeListener("data",p),d=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){h("onend"),e.end()}s.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",l);var d=!1;var f=!1;function p(t){h("ondata"),f=!1,!1!==e.write(t)||f||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==I(s.pipes,e))&&!d&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function m(t){h("onerror",t),w(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),w()}function b(){h("onfinish"),e.removeListener("close",g),w()}function w(){h("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?i(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",b),e.emit("pipe",r),s.flowing||(h("pipe resume"),r.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<s;i++)n[i].emit("unpipe",this,r);return this}var o=I(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},w.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var s=this._readableState;s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.emittedReadable=!1,s.reading?s.length&&k(this):n.nextTick(j,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(x,e,t))}(this,e)),this},w.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){(h("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!r.objectMode||null!==s&&s!==undefined)&&((r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause())))})),e)this[s]===undefined&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<g.length;i++)e.on(g[i],this.emit.bind(this,g[i]));return this._read=function(t){h("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=O}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_readable.js"}],[122,{"./_stream_duplex":119,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=o;var n=e("./_stream_duplex"),s=Object.create(e("core-util-is"));function i(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}s.inherits=e("inherits"),s.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_transform.js"}],[123,{"./_stream_duplex":119,"./internal/streams/destroy":125,"./internal/streams/stream":126,"core-util-is":88,inherits:104,"process-nextick-args":132,"safe-buffer":128,timers:"timers","util-deprecate":180},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=g;var i,o=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?r:n.nextTick;g.WritableState=m;var a=Object.create(e("core-util-is"));a.inherits=e("inherits");var u={deprecate:e("util-deprecate")},c=e("./internal/streams/stream"),l=e("safe-buffer").Buffer,d=global.Uint8Array||function(){};var h,f=e("./internal/streams/destroy");function p(){}function m(t,r){i=i||e("./_stream_duplex"),t=t||{};var a=r instanceof i;this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:a&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,s=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,s,i){--t.pendingcb,r?(n.nextTick(i,s),n.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",s)):(i(s),e._writableState.errorEmitted=!0,e.emit("error",s),S(e,t))}(e,r,s,t,i);else{var a=y(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),s?o(w,e,r,a,i):w(e,r,a,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function g(t){if(i=i||e("./_stream_duplex"),!(h.call(g,this)||this instanceof i))return new g(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),c.call(this)}function b(e,t,r,n,s,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,b(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,d=r.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var r=y(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(_,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}a.inherits(g,c),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===g&&(e&&e._writableState instanceof m)}})):h=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var s,i=this._writableState,o=!1,a=!i.objectMode&&(s=e,l.isBuffer(s)||s instanceof d);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=p),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(a||function(e,t,r,s){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||r===undefined||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),n.nextTick(s,o),i=!1),i}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,s,i){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,s);n!==o&&(r=!0,s="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,a,n,s,i);return u}(this,i,a,e,t,r)),o},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var s=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||s.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,s,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=f.destroy,g.prototype._undestroy=f.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("timers").setImmediate)}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_writable.js"}],[124,{"safe-buffer":128,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,s,i=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,s=a,t.copy(r,s),a+=o.data.length,o=o.next;return i},e}(),s&&s.inspect&&s.inspect.custom&&(t.exports.prototype[s.inspect.custom]=function(){var e=s.inspect({length:this.length});return this.constructor.name+" "+e})}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js"}],[125,{"process-nextick-args":132},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");function s(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(s,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[126,{stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("stream")}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/internal/streams/stream.js"}],[127,{"./lib/_stream_duplex.js":119,"./lib/_stream_passthrough.js":120,"./lib/_stream_readable.js":121,"./lib/_stream_transform.js":122,"./lib/_stream_writable.js":123,stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("stream");"disable"===process.env.READABLE_STREAM&&n?(t.exports=n,(r=t.exports=n.Readable).Readable=n.Readable,r.Writable=n.Writable,r.Duplex=n.Duplex,r.Transform=n.Transform,r.PassThrough=n.PassThrough,r.Stream=n):((r=t.exports=e("./lib/_stream_readable.js")).Stream=n||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"))}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/readable.js"}],[128,{buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("buffer"),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=o),i(s,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer",file:"../../node_modules/json-rpc-middleware-stream/node_modules/safe-buffer/index.js"}],[129,{"safe-buffer":128},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=o(t[n]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=o(t[n]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder",file:"../../node_modules/json-rpc-middleware-stream/node_modules/string_decoder/lib/string_decoder.js"}],[130,{yallist:183},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("yallist"),s=Symbol("max"),i=Symbol("length"),o=Symbol("lengthCalculator"),a=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),h=Symbol("cache"),f=Symbol("updateAgeOnGet"),p=()=>1;const m=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(g(e,t)){if(w(e,n),!e[a])return undefined}else r&&(e[f]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]},b=e=>{if(e[i]>e[s])for(let t=e[d].tail;e[i]>e[s]&&null!==t;){const r=t.prev;w(e,t),t=r}},w=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[i]-=r.length,e[h].delete(r.key),e[d].removeNode(t)}};class v{constructor(e,t,r,n,s){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=s||0}}const y=(e,t,r,n)=>{let s=r.value;g(e,s)&&(w(e,r),e[a]||(s=undefined)),s&&t.call(n,s.value,s.key,e)};t.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[s]=e.max||Infinity;const t=e.length||p;if(this[o]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[s]=e||Infinity,b(this)}get max(){return this[s]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,b(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[o]&&(this[o]=e,this[i]=0,this[d].forEach((e=>{e.length=this[o](e.value,e.key),this[i]+=e.length}))),b(this)}get lengthCalculator(){return this[o]}get length(){return this[i]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){const n=r.prev;y(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){const n=r.next;y(this,e,r,t),r=n}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[c]&&this[d]&&this[d].length&&this[d].forEach((e=>this[c](e.key,e.value))),this[h]=new Map,this[d]=new n,this[i]=0}dump(){return this[d].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[u])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[o](t,e);if(this[h].has(e)){if(a>this[s])return w(this,this[h].get(e)),!1;const o=this[h].get(e).value;return this[c]&&(this[l]||this[c](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[i]+=a-o.length,o.length=a,this.get(e),b(this),!0}const f=new v(e,t,a,n,r);return f.length>this[s]?(this[c]&&this[c](e,t),!1):(this[i]+=f.length,this[d].unshift(f),this[h].set(e,this[d].head),b(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[d].tail;return e?(w(this,e),e.value):null}del(e){w(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],s=n.e||0;if(0===s)this.set(n.k,n.v);else{const e=s-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[h].forEach(((e,t)=>m(this,t,!1)))}}}}},{package:"ts-jest>semver>lru-cache",file:"../../node_modules/lru-cache/index.js"}],[131,{wrappy:181},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("wrappy");function s(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function i(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(s),t.exports.strict=n(i),s.proto=s((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return s(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return i(this)},configurable:!0})}))}}},{package:"pump>once",file:"../../node_modules/once/once.js"}],[132,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?t.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,i,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(s=new Array(o-1),i=0;i<s.length;)s[i++]=arguments[i];return process.nextTick((function(){e.apply(null,s)}))}}}:t.exports=process}}},{package:"browserify>readable-stream>process-nextick-args",file:"../../node_modules/process-nextick-args/index.js"}],[133,{"end-of-stream":95,fs:"fs",once:131},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("once"),s=e("end-of-stream"),i=e("fs"),o=function(){},a=/^v?\.0/.test(process.version),u=function(e){return"function"==typeof e},c=function(e,t,r,c){c=n(c);var l=!1;e.on("close",(function(){l=!0})),s(e,{readable:t,writable:r},(function(e){if(e)return c(e);l=!0,c()}));var d=!1;return function(t){if(!l&&!d)return d=!0,function(e){return!!a&&!!i&&(e instanceof(i.ReadStream||o)||e instanceof(i.WriteStream||o))&&u(e.close)}(e)?e.close(o):function(e){return e.setHeader&&u(e.abort)}(e)?e.abort():u(e.destroy)?e.destroy():void c(t||new Error("stream was destroyed"))}},l=function(e){e()},d=function(e,t){return e.pipe(t)};t.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=u(t[t.length-1]||o)&&t.pop()||o;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(s,i){var o=i<t.length-1;return c(s,o,i>0,(function(t){e||(e=t),t&&n.forEach(l),o||(n.forEach(l),r(e))}))}));return t.reduce(d)}}}},{package:"pump",file:"../../node_modules/pump/index.js"}],[134,{"../functions/cmp":138,"../internal/debug":163,"../internal/parse-options":165,"../internal/re":166,"./range":135,"./semver":136},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Symbol("SemVer ANY");class s{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof s){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==undefined?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new d(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new d(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=u(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=u(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||n||i&&o||a||c}}t.exports=s;const i=e("../internal/parse-options"),{re:o,t:a}=e("../internal/re"),u=e("../functions/cmp"),c=e("../internal/debug"),l=e("./semver"),d=e("./range")}}},{package:"ts-jest>semver",file:"../../node_modules/semver/classes/comparator.js"}],[135,{"../internal/debug":163,"../internal/parse-options":165,"../internal/re":166,"./comparator":134,"./semver":136,"lru-cache":130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!p(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=s.get(t);if(r)return r;const n=this.options.loose,i=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(i,j(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],d),a("comparator trim",e);let u=(e=(e=(e=e.replace(c[l.TILDETRIM],h)).replace(c[l.CARETTRIM],f)).split(/\s+/).join(" ")).split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>R(e,this.options)));n&&(u=u.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(c[l.COMPARATORLOOSE]))))),a("range list",u);const m=new Map,g=u.map((e=>new o(e,this.options)));for(const e of g){if(p(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const w=[...m.values()];return s.set(t,w),w}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>g(r,t)&&e.set.some((e=>g(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(x(this.set[t],e,this.options))return!0;return!1}}t.exports=n;const s=new(e("lru-cache"))({max:1e3}),i=e("../internal/parse-options"),o=e("./comparator"),a=e("../internal/debug"),u=e("./semver"),{re:c,t:l,comparatorTrimReplace:d,tildeTrimReplace:h,caretTrimReplace:f}=e("../internal/re"),p=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,g=(e,t)=>{let r=!0;const n=e.slice();let s=n.pop();for(;r&&n.length;)r=n.every((e=>s.intersects(e,t))),s=n.pop();return r},b=(e,t)=>(a("comp",e,t),e=_(e,t),a("caret",e),e=v(e,t),a("tildes",e),e=k(e,t),a("xrange",e),e=T(e,t),a("stars",e),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,v=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const r=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(r,((t,r,n,s,i)=>{let o;return a("tilde",e,t,r,n,s,i),w(r)?o="":w(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:w(s)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(a("replaceTilde pr",i),o=`>=${r}.${n}.${s}-${i} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${s} <${r}.${+n+1}.0-0`,a("tilde return",o),o}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{a("caret",e,t);const r=t.loose?c[l.CARETLOOSE]:c[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,s,i,o)=>{let u;return a("caret",e,t,r,s,i,o),w(r)?u="":w(s)?u=`>=${r}.0.0${n} <${+r+1}.0.0-0`:w(i)?u="0"===r?`>=${r}.${s}.0${n} <${r}.${+s+1}.0-0`:`>=${r}.${s}.0${n} <${+r+1}.0.0-0`:o?(a("replaceCaret pr",o),u="0"===r?"0"===s?`>=${r}.${s}.${i}-${o} <${r}.${s}.${+i+1}-0`:`>=${r}.${s}.${i}-${o} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${i}-${o} <${+r+1}.0.0-0`):(a("no pr"),u="0"===r?"0"===s?`>=${r}.${s}.${i}${n} <${r}.${s}.${+i+1}-0`:`>=${r}.${s}.${i}${n} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${i} <${+r+1}.0.0-0`),a("caret return",u),u}))},k=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>E(e,t))).join(" ")),E=(e,t)=>{e=e.trim();const r=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(r,((r,n,s,i,o,u)=>{a("xRange",e,r,n,s,i,o,u);const c=w(s),l=c||w(i),d=l||w(o),h=d;return"="===n&&h&&(n=""),u=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&h?(l&&(i=0),o=0,">"===n?(n=">=",l?(s=+s+1,i=0,o=0):(i=+i+1,o=0)):"<="===n&&(n="<",l?s=+s+1:i=+i+1),"<"===n&&(u="-0"),r=`${n+s}.${i}.${o}${u}`):l?r=`>=${s}.0.0${u} <${+s+1}.0.0-0`:d&&(r=`>=${s}.${i}.0${u} <${s}.${+i+1}.0-0`),a("xRange return",r),r}))},T=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[l.STAR],"")),R=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),j=e=>(t,r,n,s,i,o,a,u,c,l,d,h,f)=>`${r=w(n)?"":w(s)?`>=${n}.0.0${e?"-0":""}`:w(i)?`>=${n}.${s}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${u=w(c)?"":w(l)?`<${+c+1}.0.0-0`:w(d)?`<${c}.${+l+1}.0-0`:h?`<=${c}.${l}.${d}-${h}`:e?`<${c}.${l}.${+d+1}-0`:`<=${u}`}`.trim(),x=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/classes/range.js"}],[136,{"../internal/constants":162,"../internal/debug":163,"../internal/identifiers":164,"../internal/parse-options":165,"../internal/re":166},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../internal/debug"),{MAX_LENGTH:s,MAX_SAFE_INTEGER:i}=e("../internal/constants"),{re:o,t:a}=e("../internal/re"),u=e("../internal/parse-options"),{compareIdentifiers:c}=e("../internal/identifiers");class l{constructor(e,t){if(t=u(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>s)throw new TypeError(`version is longer than ${s} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(n("prerelease compare",t,r,s),r===undefined&&s===undefined)return 0;if(s===undefined)return 1;if(r===undefined)return-1;if(r!==s)return c(r,s)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(n("prerelease compare",t,r,s),r===undefined&&s===undefined)return 0;if(s===undefined)return 1;if(r===undefined)return-1;if(r!==s)return c(r,s)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}t.exports=l}}},{package:"ts-jest>semver",file:"../../node_modules/semver/classes/semver.js"}],[137,{"./parse":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/clean.js"}],[138,{"./eq":144,"./gt":145,"./gte":146,"./lt":148,"./lte":149,"./neq":152},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./eq"),s=e("./neq"),i=e("./gt"),o=e("./gte"),a=e("./lt"),u=e("./lte");t.exports=(e,t,r,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,c);case"!=":return s(e,r,c);case">":return i(e,r,c);case">=":return o(e,r,c);case"<":return a(e,r,c);case"<=":return u(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/cmp.js"}],[139,{"../classes/semver":136,"../internal/re":166,"./parse":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("./parse"),{re:i,t:o}=e("../internal/re");t.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=i[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),i[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[o.COERCERTL].lastIndex=-1}else r=e.match(i[o.COERCE]);return null===r?null:s(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/coerce.js"}],[140,{"../classes/semver":136},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>{const s=new n(e,r),i=new n(t,r);return s.compare(i)||s.compareBuild(i)}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/compare-build.js"}],[141,{"./compare":142},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t)=>n(e,t,!0)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/compare-loose.js"}],[142,{"../classes/semver":136},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/compare.js"}],[143,{"./eq":144,"./parse":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse"),s=e("./eq");t.exports=(e,t)=>{if(s(e,t))return null;{const r=n(e),s=n(t),i=r.prerelease.length||s.prerelease.length,o=i?"pre":"",a=i?"prerelease":"";for(const e in r)if(("major"===e||"minor"===e||"patch"===e)&&r[e]!==s[e])return o+e;return a}}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/diff.js"}],[144,{"./compare":142},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0===n(e,t,r)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/eq.js"}],[145,{"./compare":142},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>0}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/gt.js"}],[146,{"./compare":142},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>=0}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/gte.js"}],[147,{"../classes/semver":136},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r,s)=>{"string"==typeof r&&(s=r,r=undefined);try{return new n(e instanceof n?e.version:e,r).inc(t,s).version}catch(e){return null}}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/inc.js"}],[148,{"./compare":142},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<0}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/lt.js"}],[149,{"./compare":142},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<=0}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/lte.js"}],[150,{"../classes/semver":136},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).major}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/major.js"}],[151,{"../classes/semver":136},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).minor}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/minor.js"}],[152,{"./compare":142},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0!==n(e,t,r)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/neq.js"}],[153,{"../classes/semver":136,"../internal/constants":162,"../internal/parse-options":165,"../internal/re":166},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{MAX_LENGTH:n}=e("../internal/constants"),{re:s,t:i}=e("../internal/re"),o=e("../classes/semver"),a=e("../internal/parse-options");t.exports=(e,t)=>{if(t=a(t),e instanceof o)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?s[i.LOOSE]:s[i.FULL]).test(e))return null;try{return new o(e,t)}catch(e){return null}}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/parse.js"}],[154,{"../classes/semver":136},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).patch}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/patch.js"}],[155,{"./parse":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/prerelease.js"}],[156,{"./compare":142},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(t,e,r)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/rcompare.js"}],[157,{"./compare-build":140},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/rsort.js"}],[158,{"../classes/range":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/satisfies.js"}],[159,{"./compare-build":140},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/sort.js"}],[160,{"./parse":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/valid.js"}],[161,{"./classes/comparator":134,"./classes/range":135,"./classes/semver":136,"./functions/clean":137,"./functions/cmp":138,"./functions/coerce":139,"./functions/compare":142,"./functions/compare-build":140,"./functions/compare-loose":141,"./functions/diff":143,"./functions/eq":144,"./functions/gt":145,"./functions/gte":146,"./functions/inc":147,"./functions/lt":148,"./functions/lte":149,"./functions/major":150,"./functions/minor":151,"./functions/neq":152,"./functions/parse":153,"./functions/patch":154,"./functions/prerelease":155,"./functions/rcompare":156,"./functions/rsort":157,"./functions/satisfies":158,"./functions/sort":159,"./functions/valid":160,"./internal/constants":162,"./internal/identifiers":164,"./internal/re":166,"./ranges/gtr":167,"./ranges/intersects":168,"./ranges/ltr":169,"./ranges/max-satisfying":170,"./ranges/min-satisfying":171,"./ranges/min-version":172,"./ranges/outside":173,"./ranges/simplify":174,"./ranges/subset":175,"./ranges/to-comparators":176,"./ranges/valid":177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./internal/re"),s=e("./internal/constants"),i=e("./classes/semver"),o=e("./internal/identifiers"),a=e("./functions/parse"),u=e("./functions/valid"),c=e("./functions/clean"),l=e("./functions/inc"),d=e("./functions/diff"),h=e("./functions/major"),f=e("./functions/minor"),p=e("./functions/patch"),m=e("./functions/prerelease"),g=e("./functions/compare"),b=e("./functions/rcompare"),w=e("./functions/compare-loose"),v=e("./functions/compare-build"),y=e("./functions/sort"),_=e("./functions/rsort"),S=e("./functions/gt"),k=e("./functions/lt"),E=e("./functions/eq"),T=e("./functions/neq"),R=e("./functions/gte"),j=e("./functions/lte"),x=e("./functions/cmp"),M=e("./functions/coerce"),O=e("./classes/comparator"),P=e("./classes/range"),C=e("./functions/satisfies"),I=e("./ranges/to-comparators"),N=e("./ranges/max-satisfying"),A=e("./ranges/min-satisfying"),$=e("./ranges/min-version"),L=e("./ranges/valid"),D=e("./ranges/outside"),B=e("./ranges/gtr"),J=e("./ranges/ltr"),q=e("./ranges/intersects"),F=e("./ranges/simplify"),W=e("./ranges/subset");t.exports={parse:a,valid:u,clean:c,inc:l,diff:d,major:h,minor:f,patch:p,prerelease:m,compare:g,rcompare:b,compareLoose:w,compareBuild:v,sort:y,rsort:_,gt:S,lt:k,eq:E,neq:T,gte:R,lte:j,cmp:x,coerce:M,Comparator:O,Range:P,satisfies:C,toComparators:I,maxSatisfying:N,minSatisfying:A,minVersion:$,validRange:L,outside:D,gtr:B,ltr:J,intersects:q,simplifyRange:F,subset:W,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:s.SEMVER_SPEC_VERSION,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/index.js"}],[162,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:n,MAX_SAFE_COMPONENT_LENGTH:16}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/internal/constants.js"}],[163,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};t.exports=n}}},{package:"ts-jest>semver",file:"../../node_modules/semver/internal/debug.js"}],[164,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=/^[0-9]+$/,s=(e,t)=>{const r=n.test(e),s=n.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:s,rcompareIdentifiers:(e,t)=>s(t,e)}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/internal/identifiers.js"}],[165,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=["includePrerelease","loose","rtl"];t.exports=e=>e?"object"!=typeof e?{loose:!0}:n.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/internal/parse-options.js"}],[166,{"./constants":162,"./debug":163},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n}=e("./constants"),s=e("./debug"),i=(r=t.exports={}).re=[],o=r.src=[],a=r.t={};let u=0;const c=(e,t,r)=>{const n=u++;s(e,n,t),a[e]=n,o[n]=t,i[n]=new RegExp(t,r?"g":undefined)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`),c("FULL",`^${o[a.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`),c("LOOSE",`^${o[a.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?)?)?`),c("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`),c("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),c("COERCERTL",o[a.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",c("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",c("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})\\s+-\\s+(${o[a.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[a.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}},{package:"ts-jest>semver",file:"../../node_modules/semver/internal/re.js"}],[167,{"./outside":173},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,">",r)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/gtr.js"}],[168,{"../classes/range":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t))}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/intersects.js"}],[169,{"./outside":173},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,"<",r)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/ltr.js"}],[170,{"../classes/range":135,"../classes/semver":136},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range");t.exports=(e,t,r)=>{let i=null,o=null,a=null;try{a=new s(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&-1!==o.compare(e)||(i=e,o=new n(i,r)))})),i}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/max-satisfying.js"}],[171,{"../classes/range":135,"../classes/semver":136},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range");t.exports=(e,t,r)=>{let i=null,o=null,a=null;try{a=new s(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&1!==o.compare(e)||(i=e,o=new n(i,r)))})),i}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/min-satisfying.js"}],[172,{"../classes/range":135,"../classes/semver":136,"../functions/gt":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range"),i=e("../functions/gt");t.exports=(e,t)=>{e=new s(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let o=null;s.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!i(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!o||r&&!i(r,o)||(r=o)}return r&&e.test(r)?r:null}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/min-version.js"}],[173,{"../classes/comparator":134,"../classes/range":135,"../classes/semver":136,"../functions/gt":145,"../functions/gte":146,"../functions/lt":148,"../functions/lte":149,"../functions/satisfies":158},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/comparator"),{ANY:i}=s,o=e("../classes/range"),a=e("../functions/satisfies"),u=e("../functions/gt"),c=e("../functions/lt"),l=e("../functions/lte"),d=e("../functions/gte");t.exports=(e,t,r,h)=>{let f,p,m,g,b;switch(e=new n(e,h),t=new o(t,h),r){case">":f=u,p=l,m=c,g=">",b=">=";break;case"<":f=c,p=d,m=u,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let o=null,a=null;if(n.forEach((e=>{e.semver===i&&(e=new s(">=0.0.0")),o=o||e,a=a||e,f(e.semver,o.semver,h)?o=e:m(e.semver,a.semver,h)&&(a=e)})),o.operator===g||o.operator===b)return!1;if((!a.operator||a.operator===g)&&p(e,a.semver))return!1;if(a.operator===b&&m(e,a.semver))return!1}return!0}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/outside.js"}],[174,{"../functions/compare.js":142,"../functions/satisfies.js":158},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../functions/satisfies.js"),s=e("../functions/compare.js");t.exports=(e,t,r)=>{const i=[];let o=null,a=null;const u=e.sort(((e,t)=>s(e,t,r)));for(const e of u){n(e,t,r)?(a=e,o||(o=e)):(a&&i.push([o,a]),a=null,o=null)}o&&i.push([o,null]);const c=[];for(const[e,t]of i)e===t?c.push(e):t||e!==u[0]?t?e===u[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const l=c.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/simplify.js"}],[175,{"../classes/comparator.js":134,"../classes/range.js":135,"../functions/compare.js":142,"../functions/satisfies.js":158},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range.js"),s=e("../classes/comparator.js"),{ANY:i}=s,o=e("../functions/satisfies.js"),a=e("../functions/compare.js"),u=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?[new s(">=0.0.0-0")]:[new s(">=0.0.0")]}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=[new s(">=0.0.0")]}const n=new Set;let u,d,h,f,p,m,g;for(const t of e)">"===t.operator||">="===t.operator?u=c(u,t,r):"<"===t.operator||"<="===t.operator?d=l(d,t,r):n.add(t.semver);if(n.size>1)return null;if(u&&d){if(h=a(u.semver,d.semver,r),h>0)return null;if(0===h&&(">="!==u.operator||"<="!==d.operator))return null}for(const e of n){if(u&&!o(e,String(u),r))return null;if(d&&!o(e,String(d),r))return null;for(const n of t)if(!o(e,String(n),r))return!1;return!0}let b=!(!d||r.includePrerelease||!d.semver.prerelease.length)&&d.semver,w=!(!u||r.includePrerelease||!u.semver.prerelease.length)&&u.semver;b&&1===b.prerelease.length&&"<"===d.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,u)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),">"===e.operator||">="===e.operator){if(f=c(u,e,r),f===e&&f!==u)return!1}else if(">="===u.operator&&!o(u.semver,String(e),r))return!1;if(d)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(p=l(d,e,r),p===e&&p!==d)return!1}else if("<="===d.operator&&!o(d.semver,String(e),r))return!1;if(!e.operator&&(d||u)&&0!==h)return!1}return!(u&&m&&!d&&0!==h)&&(!(d&&g&&!u&&0!==h)&&(!w&&!b))},c=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};t.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let s=!1;e:for(const n of e.set){for(const e of t.set){const t=u(n,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/subset.js"}],[176,{"../classes/range":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/to-comparators.js"}],[177,{"../classes/range":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/valid.js"}],[178,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?n(r):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Superstruct={})}(this,(function(e){class t extends TypeError{constructor(e,t){let r;const{message:n,explanation:s,...i}=e,{path:o}=e,a=0===o.length?n:`At path: ${o.join(".")} -- ${n}`;super(s??a),null!=s&&(this.cause=a),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function r(e){return"object"==typeof e&&null!=e}function n(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function i(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:u,message:c=`Expected a value of type \`${a}\`${u?` with refinement \`${u}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:u,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*o(e,t,n,s){var o;r(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const r of e){const e=i(r,t,n,s);e&&(yield e)}}function*a(e,t,n={}){const{path:s=[],branch:i=[e],coerce:o=!1,mask:u=!1}=n,c={path:s,branch:i};if(o&&(e=t.coercer(e,c),u&&"type"!==t.type&&r(t.schema)&&r(e)&&!Array.isArray(e)))for(const r in e)t.schema[r]===undefined&&delete e[r];let l="valid";for(const r of t.validator(e,c))r.explanation=n.message,l="not_valid",yield[r,undefined];for(let[d,h,f]of t.entries(e,c)){const t=a(h,f,{path:d===undefined?s:[...s,d],branch:d===undefined?i:[...i,h],coerce:o,mask:u,message:n.message});for(const n of t)n[0]?(l=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],undefined]):o&&(h=n[1],d===undefined?e=h:e instanceof Map?e.set(d,h):e instanceof Set?e.add(h):r(e)&&(h!==undefined||d in e)&&(e[d]=h))}if("not_valid"!==l)for(const r of t.refiner(e,c))r.explanation=n.message,l="not_refined",yield[r,undefined];"valid"===l&&(yield[undefined,e])}class u{constructor(e){const{type:t,schema:r,validator:n,refiner:s,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=i,this.validator=n?(e,t)=>o(n(e,t),t,this,e):()=>[],this.refiner=s?(e,t)=>o(s(e,t),t,this,e):()=>[]}assert(e,t){return c(e,this,t)}create(e,t){return l(e,this,t)}is(e){return h(e,this)}mask(e,t){return d(e,this,t)}validate(e,t={}){return f(e,this,t)}}function c(e,t,r){const n=f(e,t,{message:r});if(n[0])throw n[0]}function l(e,t,r){const n=f(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t,r){const n=f(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function h(e,t){return!f(e,t)[0]}function f(e,r,n={}){const s=a(e,r,n),i=function(e){const{done:t,value:r}=e.next();return t?undefined:r}(s);if(i[0]){return[new t(i[0],(function*(){for(const e of s)e[0]&&(yield e[0])})),undefined]}{const e=i[1];return[undefined,e]}}function p(e,t){return new u({type:e,schema:null,validator:t})}function m(){return p("never",(()=>!1))}function g(e){const t=e?Object.keys(e):[],n=m();return new u({type:"object",schema:e||null,*entries(s){if(e&&r(s)){const r=new Set(Object.keys(s));for(const n of t)r.delete(n),yield[n,s[n],e[n]];for(const e of r)yield[e,s[e],n]}},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>r(e)?{...e}:e})}function b(e){return new u({...e,validator:(t,r)=>t===undefined||e.validator(t,r),refiner:(t,r)=>t===undefined||e.refiner(t,r)})}function w(){return p("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function v(e){const t=Object.keys(e);return new u({type:"type",schema:e,*entries(n){if(r(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>r(e)?{...e}:e})}function y(){return p("unknown",(()=>!0))}function _(e,t,r){return new u({...e,coercer:(n,s)=>h(n,t)?e.coercer(r(n,s),s):e.coercer(n,s)})}function S(e){return e instanceof Map||e instanceof Set?e.size:e.length}function k(e,t,r){return new u({...e,*refiner(n,s){yield*e.refiner(n,s);const i=o(r(n,s),s,e,n);for(const e of i)yield{...e,refinement:t}}})}e.Struct=u,e.StructError=t,e.any=function(){return p("any",(()=>!0))},e.array=function(e){return new u({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})},e.assert=c,e.assign=function(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?v(n):g(n)},e.bigint=function(){return p("bigint",(e=>"bigint"==typeof e))},e.boolean=function(){return p("boolean",(e=>"boolean"==typeof e))},e.coerce=_,e.create=l,e.date=function(){return p("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))},e.defaulted=function(e,t,r={}){return _(e,y(),(e=>{const s="function"==typeof t?t():t;if(e===undefined)return s;if(!r.strict&&n(e)&&n(s)){const t={...e};let r=!1;for(const e in s)t[e]===undefined&&(t[e]=s[e],r=!0);if(r)return t}return e}))},e.define=p,e.deprecated=function(e,t){return new u({...e,refiner:(t,r)=>t===undefined||e.refiner(t,r),validator:(r,n)=>r===undefined||(t(r,n),e.validator(r,n))})},e.dynamic=function(e){return new u({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})},e.empty=function(e){return k(e,"empty",(t=>{const r=S(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))},e.enums=function(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new u({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})},e.func=function(){return p("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))},e.instance=function(e){return p("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))},e.integer=function(){return p("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))},e.intersection=function(e){return new u({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})},e.is=h,e.lazy=function(e){let t;return new u({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})},e.literal=function(e){const t=s(e),r=typeof e;return new u({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})},e.map=function(e,t){return new u({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,s]of r.entries())yield[n,n,e],yield[n,s,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})},e.mask=d,e.max=function(e,t,r={}){const{exclusive:n}=r;return k(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.min=function(e,t,r={}){const{exclusive:n}=r;return k(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.never=m,e.nonempty=function(e){return k(e,"nonempty",(t=>S(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},e.nullable=function(e){return new u({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})},e.number=function(){return p("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))},e.object=g,e.omit=function(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?v(n):g(n)},e.optional=b,e.partial=function(e){const t=e instanceof u?{...e.schema}:{...e};for(const e in t)t[e]=b(t[e]);return g(t)},e.pattern=function(e,t){return k(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))},e.pick=function(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return g(n)},e.record=function(e,t){return new u({type:"record",schema:null,*entries(n){if(r(n))for(const r in n){const s=n[r];yield[r,r,e],yield[r,s,t]}},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`})},e.refine=k,e.regexp=function(){return p("regexp",(e=>e instanceof RegExp))},e.set=function(e){return new u({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})},e.size=function(e,t,r=t){const n=`Expected a ${e.type}`,s=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return k(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${s} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=r||`${n} with a size ${s} but received one with a size of \`${i}\``}{const{length:i}=e;return t<=i&&i<=r||`${n} with a length ${s} but received one with a length of \`${i}\``}}))},e.string=w,e.struct=function(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),p(e,t)},e.trimmed=function(e){return _(e,w(),(e=>e.trim()))},e.tuple=function(e){const t=m();return new u({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let s=0;s<n;s++)yield[s,r[s],e[s]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`})},e.type=v,e.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new u({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=a(r,t,n),[s]=e;if(!s[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...i]}})},e.unknown=y,e.validate=f}))}}},{package:"superstruct",file:"../../node_modules/superstruct/dist/index.cjs"}],[179,{"has-flag":103,os:"os",tty:"tty"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("os"),s=e("tty"),i=e("has-flag"),{env:o}=process;let a;function u(e,{streamIsTTY:t,sniffFlags:r=!0}={}){const s=function(){if("FORCE_COLOR"in o)return"true"===o.FORCE_COLOR?1:"false"===o.FORCE_COLOR?0:0===o.FORCE_COLOR.length?1:Math.min(Number.parseInt(o.FORCE_COLOR,10),3)}();s!==undefined&&(a=s);const u=r?a:s;if(0===u)return 0;if(r){if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2}if(e&&!t&&u===undefined)return 0;const c=u||0;if("dumb"===o.TERM)return c;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((e=>e in o))||"codeship"===o.CI_NAME?1:c;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=Number.parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:c}function c(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(u(e,{streamIsTTY:e&&e.isTTY,...t}))}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?a=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(a=1),t.exports={supportsColor:c,stdout:c({isTTY:s.isatty(1)}),stderr:c({isTTY:s.isatty(2)})}}}},{package:"@wdio/mocha-framework>mocha>supports-color",file:"../../node_modules/supports-color/index.js"}],[180,{util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("util").deprecate}}},{package:"browserify>readable-stream>util-deprecate",file:"../../node_modules/util-deprecate/node.js"}],[181,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),s=e[e.length-1];return"function"==typeof n&&n!==s&&Object.keys(s).forEach((function(e){n[e]=s[e]})),n}}}}},{package:"pump>once>wrappy",file:"../../node_modules/wrappy/wrappy.js"}],[182,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}}}},{package:"ts-jest>semver>lru-cache>yallist",file:"../../node_modules/yallist/iterator.js"}],[183,{"./iterator.js":182},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function s(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function i(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}t.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.pop=function(){if(!this.tail)return undefined;var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e},n.prototype.shift=function(){if(!this.head)return undefined;var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var s=0;null!==n;s++)r=e(r,n.value,s),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var s=this.length-1;null!==n;s--)r=e(r,n.value,s),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;var o=[];for(n=0;i&&n<t;n++)o.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(n=0;n<r.length;n++)i=s(this,i,r[n]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{e("./iterator.js")(n)}catch(e){}}}},{package:"ts-jest>semver>lru-cache>yallist",file:"../../node_modules/yallist/yallist.js"}],[184,{"../logging":203,"../openrpc.json":206,"./../../../snaps-utils/src/index.executionenv":208,"./commands":185,"./endowments":189,"./globalEvents":196,"./keyring":198,"./sortParams":200,"./utils":201,"./validation":202,"@metamask/providers":61,"@metamask/utils":78,"eth-rpc-errors":99,"json-rpc-engine":114,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BaseSnapExecutor=void 0;var n,s=e("@metamask/providers"),i=e("./../../../snaps-utils/src/index.executionenv"),o=e("@metamask/utils"),a=e("eth-rpc-errors"),u=e("json-rpc-engine"),c=e("superstruct"),l=e("../logging"),d=(n=e("../openrpc.json"))&&n.__esModule?n:{default:n},h=e("./commands"),f=e("./endowments"),p=e("./globalEvents"),m=e("./keyring"),g=e("./sortParams"),b=e("./utils"),w=e("./validation");function v(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const y={code:a.errorCodes.rpc.internal,message:"Execution Environment Error"},_={ping:{struct:w.PingRequestArgumentsStruct,params:[]},executeSnap:{struct:w.ExecuteSnapRequestArgumentsStruct,params:["snapName","sourceCode","endowments"]},terminate:{struct:w.TerminateRequestArgumentsStruct,params:[]},snapRpc:{struct:w.SnapRpcRequestArgumentsStruct,params:["target","handler","origin","request"]}};r.BaseSnapExecutor=class{constructor(e,t){v(this,"snapData",void 0),v(this,"commandStream",void 0),v(this,"rpcStream",void 0),v(this,"methods",void 0),v(this,"snapErrorHandler",void 0),v(this,"snapPromiseErrorHandler",void 0),v(this,"lastTeardown",0),this.snapData=new Map,this.commandStream=e,this.commandStream.on("data",(e=>{this.onCommandRequest(e).catch((e=>{(0,i.logError)(e)}))})),this.rpcStream=t,this.methods=(0,h.getCommandMethodImplementations)(this.startSnap.bind(this),(async(e,t,r)=>{const n=this.snapData.get(e),s=t===i.HandlerType.SnapKeyring?(0,m.wrapKeyring)(this.notify.bind(this),null==n?void 0:n.exports.keyring):null==n?void 0:n.exports[t];(0,o.assert)(s!==undefined,`No ${t} handler exported for snap "${e}`);let a=await this.executeInSnapContext(e,(()=>s(r)));a===undefined&&(a=null);try{return(0,o.getSafeJson)(a)}catch(e){throw new TypeError(`Received non-JSON-serializable value: ${e.message.replace(/^Assertion failed: /u,"")}`)}}),this.onTerminate.bind(this))}errorHandler(e,t){const r=(0,b.constructError)(e),n=(0,a.serializeError)(r,{fallbackError:y,shouldIncludeStack:!1}),s={...t,stack:(null==r?void 0:r.stack)??null};this.notify({method:"UnhandledError",params:{error:{...n,data:s}}})}async onCommandRequest(e){if(!(0,o.isJsonRpcRequest)(e))throw new Error("Command stream received a non-JSON-RPC request.");const{id:t,method:r,params:n}=e;if("rpc.discover"===r)return void this.respond(t,{result:d.default});if(!(0,o.hasProperty)(_,r))return void this.respond(t,{error:a.ethErrors.rpc.methodNotFound({data:{method:r}}).serialize()});const s=_[r],i=(0,g.sortParamKeys)(s.params,n),[u]=(0,c.validate)(i,s.struct);if(u)this.respond(t,{error:a.ethErrors.rpc.invalidParams({message:`Invalid parameters for method "${r}": ${u.message}.`,data:{method:r,params:i}}).serialize()});else try{const e=await this.methods[r](...i);this.respond(t,{result:e})}catch(e){this.respond(t,{error:(0,a.serializeError)(e,{fallbackError:y})})}}notify(e){if(!(0,o.isValidJson)(e)||!(0,o.isObject)(e))throw new Error("JSON-RPC notifications must be JSON serializable objects");this.commandStream.write({...e,jsonrpc:"2.0"})}respond(e,t){if(!(0,o.isValidJson)(t)||!(0,o.isObject)(t))throw new Error("JSON-RPC responses must be JSON serializable objects.");this.commandStream.write({...t,id:e,jsonrpc:"2.0"})}async startSnap(e,t,r){(0,l.log)(`Starting snap '${e}' in worker.`),this.snapPromiseErrorHandler&&(0,p.removeEventListener)("unhandledrejection",this.snapPromiseErrorHandler),this.snapErrorHandler&&(0,p.removeEventListener)("error",this.snapErrorHandler),this.snapErrorHandler=t=>{this.errorHandler(t.error,{snapName:e})},this.snapPromiseErrorHandler=t=>{this.errorHandler(t instanceof Error?t:t.reason,{snapName:e})};const n=new s.StreamProvider(this.rpcStream,{jsonRpcStreamName:"metamask-provider",rpcMiddleware:[(0,u.createIdRemapMiddleware)()]});await n.initialize();const i=this.createSnapGlobal(n),o=this.createEIP1193Provider(n),a={exports:{}};try{const{endowments:n,teardown:s}=(0,f.createEndowments)(i,o,r);this.snapData.set(e,{idleTeardown:s,runningEvaluations:new Set,exports:{}}),(0,p.addEventListener)("unhandledRejection",this.snapPromiseErrorHandler),(0,p.addEventListener)("error",this.snapErrorHandler);const u=new Compartment({...n,module:a,exports:a.exports});u.globalThis.self=u.globalThis,u.globalThis.global=u.globalThis,u.globalThis.window=u.globalThis,await this.executeInSnapContext(e,(()=>{u.evaluate(t),this.registerSnapExports(e,a)}))}catch(t){throw this.removeSnap(e),new Error(`Error while running snap '${e}': ${t.message}`)}}onTerminate(){this.snapData.forEach((e=>e.runningEvaluations.forEach((e=>e.stop())))),this.snapData.clear()}registerSnapExports(e,t){const r=this.snapData.get(e);r&&(r.exports=i.SNAP_EXPORT_NAMES.reduce(((e,r)=>{const n=t.exports[r];return(0,w.validateExport)(r,n)?{...e,[r]:n}:e}),{}))}createSnapGlobal(e){const t=e.request.bind(e),r=async e=>{(0,b.assertSnapOutboundRequest)(e);const r=(0,o.getSafeJson)(e);this.notify({method:"OutboundRequest"});try{return await(0,b.withTeardown)(t(r),this)}finally{this.notify({method:"OutboundResponse"})}},n=new Proxy({},{has:(e,t)=>"string"==typeof t&&["request"].includes(t),get:(e,t)=>"request"===t?r:undefined});return harden(n)}createEIP1193Provider(e){const t=e.request.bind(e),r=(0,b.proxyStreamProvider)(e,(async e=>{(0,b.assertEthereumOutboundRequest)(e);const r=(0,o.getSafeJson)(e);this.notify({method:"OutboundRequest"});try{return await(0,b.withTeardown)(t(r),this)}finally{this.notify({method:"OutboundResponse"})}}));return harden(r)}removeSnap(e){this.snapData.delete(e)}async executeInSnapContext(e,t){const r=this.snapData.get(e);if(r===undefined)throw new Error(`Tried to execute in context of unknown snap: "${e}".`);let n;const s=new Promise(((t,r)=>n=()=>r(a.ethErrors.rpc.internal(`The snap "${e}" has been terminated during execution.`)))),i={stop:n};try{return r.runningEvaluations.add(i),await Promise.race([t(),s])}finally{r.runningEvaluations.delete(i),0===r.runningEvaluations.size&&(this.lastTeardown+=1,await r.idleTeardown())}}}}}},{package:"$root$",file:"src/common/BaseSnapExecutor.ts"}],[185,{"./../../../snaps-utils/src/index.executionenv":208,"./validation":202,"@metamask/utils":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getCommandMethodImplementations=function(e,t,r){return{ping:async()=>Promise.resolve("OK"),terminate:async()=>(r(),Promise.resolve("OK")),executeSnap:async(t,r,n)=>(await e(t,r,n),"OK"),snapRpc:async(e,r,n,s)=>await t(e,r,o(n,r,s))??null}},r.getHandlerArguments=o;var n=e("./../../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils"),i=e("./validation");function o(e,t,r){switch(t){case n.HandlerType.OnTransaction:{(0,i.assertIsOnTransactionRequestArguments)(r.params);const{transaction:e,chainId:t,transactionOrigin:n}=r.params;return{transaction:e,chainId:t,transactionOrigin:n}}case n.HandlerType.OnRpcRequest:case n.HandlerType.SnapKeyring:return{origin:e,request:r};case n.HandlerType.OnCronjob:return{request:r};default:return(0,s.assertExhaustive)(t)}}}}},{package:"$root$",file:"src/common/commands.ts"}],[186,{"../globalObject":197,"./crypto":187,"./date":188,"./interval":190,"./math":191,"./network":192,"./textDecoder":193,"./textEncoder":194,"./timeout":195},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject"),s=h(e("./crypto")),i=h(e("./date")),o=h(e("./interval")),a=h(e("./math")),u=h(e("./network")),c=h(e("./textDecoder")),l=h(e("./textEncoder")),d=h(e("./timeout"));function h(e){return e&&e.__esModule?e:{default:e}}const f=[{endowment:AbortController,name:"AbortController"},{endowment:AbortSignal,name:"AbortSignal"},{endowment:ArrayBuffer,name:"ArrayBuffer"},{endowment:atob,name:"atob",bind:!0},{endowment:BigInt,name:"BigInt"},{endowment:BigInt64Array,name:"BigInt64Array"},{endowment:BigUint64Array,name:"BigUint64Array"},{endowment:btoa,name:"btoa",bind:!0},{endowment:console,name:"console"},{endowment:DataView,name:"DataView"},{endowment:Float32Array,name:"Float32Array"},{endowment:Float64Array,name:"Float64Array"},{endowment:Int8Array,name:"Int8Array"},{endowment:Int16Array,name:"Int16Array"},{endowment:Int32Array,name:"Int32Array"},{endowment:Uint8Array,name:"Uint8Array"},{endowment:Uint8ClampedArray,name:"Uint8ClampedArray"},{endowment:Uint16Array,name:"Uint16Array"},{endowment:Uint32Array,name:"Uint32Array"},{endowment:URL,name:"URL"},{endowment:WebAssembly,name:"WebAssembly"}];var p=()=>{const e=[s.default,o.default,a.default,u.default,d.default,c.default,l.default,i.default];return f.forEach((t=>{const r={names:[t.name],factory:()=>{const e="function"==typeof t.endowment&&t.bind?t.endowment.bind(n.rootRealmGlobal):t.endowment;return{[t.name]:harden(e)}}};e.push(r)})),e};r.default=p}}},{package:"$root$",file:"src/common/endowments/commonEndowmentFactory.ts"}],[187,{"../globalObject":197,crypto:"crypto"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject");var s={names:["crypto","SubtleCrypto"],factory:()=>{if("crypto"in n.rootRealmGlobal&&"object"==typeof n.rootRealmGlobal.crypto&&"SubtleCrypto"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.SubtleCrypto)return{crypto:harden(n.rootRealmGlobal.crypto),SubtleCrypto:harden(n.rootRealmGlobal.SubtleCrypto)};const t=e("crypto").webcrypto;return{crypto:harden(t),SubtleCrypto:harden(t.subtle.constructor)}}};r.default=s}}},{package:"$root$",file:"src/common/endowments/crypto.ts"}],[188,{"../globalObject":197},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject");var s={names:["Date"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Date);let t=0;const r=()=>{const e=n.rootRealmGlobal.Date.now(),r=Math.round(e+Math.random());return r>t&&(t=r),t},s=function(...e){return Reflect.construct(n.rootRealmGlobal.Date,0===e.length?[r()]:e,new.target)};return e.forEach((e=>{Reflect.defineProperty(s,e,{configurable:!1,writable:!1,value:"now"===e?r:n.rootRealmGlobal.Date[e]})})),{Date:harden(s)}}};r.default=s}}},{package:"$root$",file:"src/common/endowments/date.ts"}],[189,{"../globalObject":197,"./../../../../snaps-utils/src/index.executionenv":208,"./commonEndowmentFactory":186,"@metamask/utils":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createEndowments=function(e,t,r=[]){const n={},u=r.reduce((({allEndowments:e,teardowns:r},u)=>{if(a.has(u)){if(!(0,i.hasProperty)(n,u)){const{teardownFunction:e,...t}=a.get(u)();Object.assign(n,t),e&&r.push(e)}e[u]=n[u]}else if("ethereum"===u)e[u]=t;else{if(!(u in o.rootRealmGlobal))throw new Error(`Unknown endowment: "${u}".`);{(0,s.logWarning)(`Access to unhardened global ${u}.`);const t=o.rootRealmGlobal[u];e[u]=t}}return{allEndowments:e,teardowns:r}}),{allEndowments:{snap:e},teardowns:[]});return{endowments:u.allEndowments,teardown:async()=>{await Promise.all(u.teardowns.map((e=>e())))}}};var n,s=e("./../../../../snaps-utils/src/index.executionenv"),i=e("@metamask/utils"),o=e("../globalObject");const a=(0,((n=e("./commonEndowmentFactory"))&&n.__esModule?n:{default:n}).default)().reduce(((e,t)=>(t.names.forEach((r=>{e.set(r,t.factory)})),e)),new Map)}}},{package:"$root$",file:"src/common/endowments/index.ts"}],[190,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["setInterval","clearInterval"],factory:()=>{const e=new Map,t=t=>{harden(t);const r=e.get(t);r!==undefined&&(clearInterval(r),e.delete(t))};return{setInterval:harden(((t,r)=>{if("function"!=typeof t)throw new Error("The interval handler must be a function. Received: "+typeof t);harden(t);const n=Object.freeze(Object.create(null)),s=setInterval(t,Math.max(10,r??0));return e.set(n,s),n})),clearInterval:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=n}}},{package:"$root$",file:"src/common/endowments/interval.ts"}],[191,{"../globalObject":197},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject");var s={names:["Math"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Math).reduce(((e,t)=>"random"===t?e:{...e,[t]:n.rootRealmGlobal.Math[t]}),{});return harden({Math:{...e,random:()=>crypto.getRandomValues(new Uint32Array(1))[0]/2**32}})}};r.default=s}}},{package:"$root$",file:"src/common/endowments/math.ts"}],[192,{"../utils":201},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../utils");function s(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function i(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,a(e,t,"get"))}function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,a(e,t,"set"),r),r}function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var u=new WeakMap,c=new WeakMap;class l{constructor(e,t){s(this,u,{writable:!0,value:void 0}),s(this,c,{writable:!0,value:void 0}),o(this,c,e),o(this,u,t)}get body(){return i(this,c).body}get bodyUsed(){return i(this,c).bodyUsed}get headers(){return i(this,c).headers}get ok(){return i(this,c).ok}get redirected(){return i(this,c).redirected}get status(){return i(this,c).status}get statusText(){return i(this,c).statusText}get type(){return i(this,c).type}get url(){return i(this,c).url}async text(){return(0,n.withTeardown)(i(this,c).text(),this)}async arrayBuffer(){return(0,n.withTeardown)(i(this,c).arrayBuffer(),this)}async blob(){return(0,n.withTeardown)(i(this,c).blob(),this)}clone(){const e=i(this,c).clone();return new l(e,i(this,u))}async formData(){return(0,n.withTeardown)(i(this,c).formData(),this)}async json(){return(0,n.withTeardown)(i(this,c).json(),this)}}var d={names:["fetch"],factory:()=>{const e=new Set,t={lastTeardown:0},r=new FinalizationRegistry((e=>e()));return{fetch:harden((async(s,i)=>{const o=new AbortController;if(null!==(null==i?void 0:i.signal)&&(null==i?void 0:i.signal)!==undefined){const e=i.signal;e.addEventListener("abort",(()=>{o.abort(e.reason)}),{once:!0})}let a,u;try{const r=fetch(s,{...i,signal:o.signal});u={cancel:async()=>{o.abort();try{await r}catch{}}},e.add(u),a=new l(await(0,n.withTeardown)(r,t),t)}finally{u!==undefined&&e.delete(u)}if(null!==a.body){const t=new WeakRef(a.body),n={cancel:async()=>{try{var e;await(null===(e=t.deref())||void 0===e?void 0:e.cancel())}catch{}}};e.add(n),r.register(a.body,(()=>e.delete(n)))}return harden(a)})),teardownFunction:async()=>{t.lastTeardown+=1;const r=[];e.forEach((({cancel:e})=>r.push(e()))),e.clear(),await Promise.all(r)}}}};r.default=d}}},{package:"$root$",file:"src/common/endowments/network.ts"}],[193,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["TextDecoder"],factory:()=>({TextDecoder:harden(TextDecoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textDecoder.ts"}],[194,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["TextEncoder"],factory:()=>({TextEncoder:harden(TextEncoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textEncoder.ts"}],[195,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["setTimeout","clearTimeout"],factory:()=>{const e=new Map,t=t=>{const r=e.get(t);r!==undefined&&(clearTimeout(r),e.delete(t))};return{setTimeout:harden(((t,r)=>{if("function"!=typeof t)throw new Error("The timeout handler must be a function. Received: "+typeof t);harden(t);const n=Object.freeze(Object.create(null)),s=setTimeout((()=>{e.delete(n),t()}),Math.max(10,r??0));return e.set(n,s),n})),clearTimeout:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=n}}},{package:"$root$",file:"src/common/endowments/timeout.ts"}],[196,{"./globalObject":197},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.addEventListener=function(e,t){if("addEventListener"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.addEventListener)return n.rootRealmGlobal.addEventListener(e.toLowerCase(),t);if(n.rootRealmGlobal.process&&"on"in n.rootRealmGlobal.process&&"function"==typeof n.rootRealmGlobal.process.on)return n.rootRealmGlobal.process.on(e,t);throw new Error("Platform agnostic addEventListener failed")},r.removeEventListener=function(e,t){if("removeEventListener"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.removeEventListener)return n.rootRealmGlobal.removeEventListener(e.toLowerCase(),t);if(n.rootRealmGlobal.process&&"removeListener"in n.rootRealmGlobal.process&&"function"==typeof n.rootRealmGlobal.process.removeListener)return n.rootRealmGlobal.process.removeListener(e,t);throw new Error("Platform agnostic removeEventListener failed")};var n=e("./globalObject")}}},{package:"$root$",file:"src/common/globalEvents.ts"}],[197,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rootRealmGlobalName=r.rootRealmGlobal=void 0;var n=function(e){return e.globalThis="globalThis",e.global="global",e.self="self",e.window="window",e}(n||{});let s,i;if("undefined"!=typeof globalThis)s=globalThis,i=n.globalThis;else if("undefined"!=typeof self)s=self,i=n.self;else if("undefined"!=typeof window)s=window,i=n.window;else{if("undefined"==typeof global)throw new Error("Unknown realm type; failed to identify global object.");s=global,i=n.global}const o=s;r.rootRealmGlobal=o;const a=i;r.rootRealmGlobalName=a}}},{package:"$root$",file:"src/common/globalObject.ts"}],[198,{"@metamask/utils":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapKeyring=function(e,t){if(!t)throw new Error("Keyring not exported");return({request:r})=>{const{method:s,params:i}=r;if(!(s in t))throw new Error(`Keyring does not expose ${s}`);let o=i??[];const a=t[s];(0,n.assert)(a!==undefined);const u=a.bind(t);if("on"===s){const t=o[0];o=[t,(...r)=>((0,n.assert)((0,n.isValidJson)(r),new TypeError("Keyrings .on listener received non-JSON-serializable value.")),e({method:"SnapKeyringEvent",params:{data:t,args:r}}))]}return u(...o)}};var n=e("@metamask/utils")}}},{package:"$root$",file:"src/common/keyring.ts"}],[199,{"./../../../../snaps-utils/src/index.executionenv":208},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.executeLockdownMore=function(){try{const e=Reflect.ownKeys((new Compartment).globalThis),t=new Set(["eval","Function"]);new Set([...e]).forEach((e=>{const r=Reflect.getOwnPropertyDescriptor(globalThis,e);r&&(r.configurable&&(!function(e){return"set"in e||"get"in e}(r)?Object.defineProperty(globalThis,e,{configurable:!1,writable:!1}):Object.defineProperty(globalThis,e,{configurable:!1})),t.has(e)&&harden(globalThis[e]))}))}catch(e){throw(0,n.logError)("Protecting intrinsics failed:",e),e}};var n=e("./../../../../snaps-utils/src/index.executionenv")}}},{package:"$root$",file:"src/common/lockdown/lockdown-more.ts"}],[200,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.sortParamKeys=void 0;r.sortParamKeys=(e,t)=>{if(!t)return[];if(t instanceof Array)return t;const r=e.reduce(((e,t,r)=>({...e,[t]:r})),{});return Object.entries(t).sort((([e,t],[n,s])=>r[e]-r[n])).map((([e,t])=>t))}}}},{package:"$root$",file:"src/common/sortParams.ts"}],[201,{"../logging":203,"@metamask/utils":78,"eth-rpc-errors":99},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertEthereumOutboundRequest=function(e){(0,n.assert)(!String.prototype.startsWith.call(e.method,"snap_"),s.ethErrors.rpc.methodNotFound({data:{method:e.method}})),(0,n.assert)(!o.includes(e.method),s.ethErrors.rpc.methodNotFound({data:{method:e.method}})),(0,n.assertStruct)(e,n.JsonStruct,"Provided value is not JSON-RPC compatible")},r.assertSnapOutboundRequest=function(e){(0,n.assert)(String.prototype.startsWith.call(e.method,"wallet_")||String.prototype.startsWith.call(e.method,"snap_"),"The global Snap API only allows RPC methods starting with `wallet_*` and `snap_*`."),(0,n.assert)(!o.includes(e.method),s.ethErrors.rpc.methodNotFound({data:{method:e.method}})),(0,n.assertStruct)(e,n.JsonStruct,"Provided value is not JSON-RPC compatible")},r.constructError=function(e){let t;e instanceof Error?t=e:"string"==typeof e&&(t=new Error(e),delete t.stack);return t},r.proxyStreamProvider=function(e,t){return new Proxy({},{has:(e,t)=>"string"==typeof t&&["request","on","removeListener"].includes(t),get:(r,n)=>"request"===n?t:["on","removeListener"].includes(n)?e[n]:undefined})},r.withTeardown=async function(e,t){const r=t.lastTeardown;return new Promise(((n,s)=>{e.then((e=>{t.lastTeardown===r?n(e):(0,i.log)("Late promise received after Snap finished execution. Promise will be dropped.")})).catch((e=>{t.lastTeardown===r?s(e):(0,i.log)("Late promise received after Snap finished execution. Promise will be dropped.")}))}))};var n=e("@metamask/utils"),s=e("eth-rpc-errors"),i=e("../logging");const o=Object.freeze(["eth_requestAccounts","wallet_requestSnaps","wallet_requestPermissions"])}}},{package:"$root$",file:"src/common/utils.ts"}],[202,{"./../../../snaps-utils/src/index.executionenv":208,"@metamask/utils":78,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TerminateRequestArgumentsStruct=r.SnapRpcRequestArgumentsStruct=r.PingRequestArgumentsStruct=r.OnTransactionRequestArgumentsStruct=r.JsonRpcRequestWithoutIdStruct=r.ExecuteSnapRequestArgumentsStruct=r.EndowmentStruct=void 0,r.assertIsOnTransactionRequestArguments=function(e){(0,s.assertStruct)(e,g,"Invalid request params")},r.isEndowment=l,r.isEndowmentsArray=function(e){return Array.isArray(e)&&e.every(l)},r.validateExport=function(e,t){const r=o[e];return(null==r?void 0:r(t))??!1};var n=e("./../../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils"),i=e("superstruct");const o={[n.HandlerType.OnRpcRequest]:a,[n.HandlerType.OnTransaction]:a,[n.HandlerType.SnapKeyring]:function(e){return"object"==typeof e},[n.HandlerType.OnCronjob]:a};function a(e){return"function"==typeof e}const u=(0,i.assign)((0,i.omit)(s.JsonRpcRequestStruct,["id"]),(0,i.object)({id:(0,i.optional)(s.JsonRpcIdStruct)}));r.JsonRpcRequestWithoutIdStruct=u;const c=(0,i.string)();function l(e){return(0,i.is)(e,c)}r.EndowmentStruct=c;const d=(0,i.literal)("OK"),h=(0,i.optional)((0,i.union)([(0,i.literal)(undefined),(0,i.array)()]));r.PingRequestArgumentsStruct=h;const f=(0,i.union)([(0,i.literal)(undefined),(0,i.array)()]);r.TerminateRequestArgumentsStruct=f;const p=(0,i.tuple)([(0,i.string)(),(0,i.string)(),(0,i.optional)((0,i.array)(c))]);r.ExecuteSnapRequestArgumentsStruct=p;const m=(0,i.tuple)([(0,i.string)(),(0,i.enums)(Object.values(n.HandlerType)),(0,i.string)(),(0,i.assign)(u,(0,i.object)({params:(0,i.optional)((0,i.record)((0,i.string)(),s.JsonStruct))}))]);r.SnapRpcRequestArgumentsStruct=m;const g=(0,i.object)({transaction:(0,i.record)((0,i.string)(),s.JsonStruct),chainId:n.ChainIdStruct,transactionOrigin:(0,i.nullable)((0,i.string)())});r.OnTransactionRequestArgumentsStruct=g;(0,i.assign)(s.JsonRpcSuccessStruct,(0,i.object)({result:d})),s.JsonRpcSuccessStruct}}},{package:"$root$",file:"src/common/validation.ts"}],[203,{"./../../snaps-utils/src/index.executionenv":208,"@metamask/utils":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.log=void 0;var n=e("./../../snaps-utils/src/index.executionenv");const s=(0,e("@metamask/utils").createModuleLogger)(n.snapsLogger,"snaps-execution-environments");r.log=s}}},{package:"$root$",file:"src/logging.ts"}],[204,{"../common/BaseSnapExecutor":184,"../logging":203,"./../../../snaps-utils/src/index.executionenv":208,"@metamask/object-multiplex":3,"@metamask/post-message-stream":18,pump:133},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ThreadSnapExecutor=void 0;var n=c(e("@metamask/object-multiplex")),s=e("@metamask/post-message-stream"),i=e("./../../../snaps-utils/src/index.executionenv"),o=c(e("pump")),a=e("../common/BaseSnapExecutor"),u=e("../logging");function c(e){return e&&e.__esModule?e:{default:e}}class l extends a.BaseSnapExecutor{static initialize(){(0,u.log)("Worker: Connecting to parent.");const e=new s.ThreadMessageStream,t=new n.default;(0,o.default)(e,t,e,(e=>{e&&(0,i.logError)("Parent stream failure, closing worker.",e),self.close()}));const r=t.createStream(i.SNAP_STREAM_NAMES.COMMAND),a=t.createStream(i.SNAP_STREAM_NAMES.JSON_RPC);return new l(r,a)}}r.ThreadSnapExecutor=l}}},{package:"$root$",file:"src/node-thread/ThreadSnapExecutor.ts"}],[205,{"../common/lockdown/lockdown-more":199,"./ThreadSnapExecutor":204},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../common/lockdown/lockdown-more"),s=e("./ThreadSnapExecutor");(0,n.executeLockdownMore)(),s.ThreadSnapExecutor.initialize()}}},{package:"$root$",file:"src/node-thread/index.ts"}],[206,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={openrpc:"1.2.4",info:{title:"MetaMask Snaps Execution Environment API",version:"0.0.0-development"},methods:[{name:"ping",description:"confirms that a connection has been established with the execution environment",params:[],result:{name:"PingResult",schema:{$ref:"#/components/schemas/OK"}}},{name:"terminate",description:"tells the execution environment that it is being shut down",params:[],result:{name:"TerminateResult",schema:{$ref:"#/components/schemas/OK"}}},{name:"executeSnap",description:"executes a snap in the environment. The snap can then be interacted with via `snapRpc`",params:[{name:"snapName",required:!0,description:"the name of the snap",schema:{title:"SnapName",type:"string"}},{name:"sourceCode",description:"a snaps source code that gets executed in the environment",required:!0,schema:{title:"SourceCode",type:"string"}},{name:"endowments",description:"A list of endowments to provide to SES",required:!1,schema:{title:"Endowments",description:"An array of the names of the endowments",type:"array",items:{title:"Endowment",type:"string"}}}],result:{name:"executeSnapResult",schema:{$ref:"#/components/schemas/OK"}},examples:[{name:"BasicTestSnapExecuteExample",params:[{name:"snapName",value:"TestSnap"},{name:"sourceCode",value:"module.exports.onRpcRequest = async ({ request }) => { return request.method + request.id }"}],result:{name:"BasicTestSnapExampleResult",value:"OK"}}]},{name:"snapRpc",params:[{name:"target",required:!0,description:"the name of the snap",schema:{title:"Target",type:"string"}},{name:"handler",required:!0,description:"the handler to trigger on the snap",schema:{title:"Handler",type:"string",enum:["onRpcRequest","onTransaction","keyring"]}},{name:"origin",required:!0,description:"Origin of the snap JSON-RPC request",schema:{title:"Origin",type:"string"}},{name:"request",required:!0,description:"JSON-RPC request",schema:{$ref:"#/components/schemas/JsonRpcRequest"}}],result:{name:"HandleSnapRpcResult",schema:{title:"SnapRpcResult"}},examples:[{name:"TestSnapExample",params:[{name:"target",value:"TestSnap"},{name:"origin",value:"foo.com"},{name:"request",value:{jsonrpc:"2.0",method:"hello",params:[],id:1}}],result:{name:"TestSnapResultExample",value:"hello1"}}]}],components:{schemas:{OK:{title:"OK",type:"string",const:"OK"},JsonRpcRequest:{title:"JsonRpcRequest",type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{title:"JSONRPCString",type:"string",const:"2.0"},id:{title:"JSONRPCID",oneOf:[{type:"string"},{type:"number"}]},method:{title:"JSONRPCMethod",description:"the name of the method",type:"string"},params:{title:"JSONRPCParams",type:["array","object"]}}}}}}}}},{package:"$root$",file:"src/openrpc.json"}],[207,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-utils/src/handlers.ts",file:"../snaps-utils/src/handlers.ts"}],[208,{"./handlers":207,"./logging":209,"./namespace":210,"./types":211},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./handlers");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./logging");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./namespace");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=e("./types");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}))}}},{package:"external:../snaps-utils/src/index.executionenv.ts",file:"../snaps-utils/src/index.executionenv.ts"}],[209,{"@metamask/utils":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.logError=function(e,...t){console.error(e,...t)},r.logInfo=function(e,...t){console.log(e,...t)},r.logWarning=function(e,...t){console.warn(e,...t)},r.snapsLogger=void 0;const n=(0,e("@metamask/utils").createProjectLogger)("snaps");r.snapsLogger=n}}},{package:"external:../snaps-utils/src/logging.ts",file:"../snaps-utils/src/logging.ts"}],[210,{"@metamask/utils":78,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SessionStruct=r.SessionNamespaceStruct=r.RequestNamespaceStruct=r.RequestArgumentsStruct=r.NamespacesStruct=r.NamespaceStruct=r.NamespaceIdStruct=r.MultiChainRequestStruct=r.LimitedString=r.ConnectArgumentsStruct=r.ChainStruct=r.ChainIdStruct=r.CHAIN_ID_REGEX=r.AccountIdStruct=r.AccountIdArrayStruct=r.ACCOUNT_ID_REGEX=void 0,r.assertIsConnectArguments=function(e){(0,n.assertStruct)(e,w,"Invalid connect arguments")},r.assertIsMultiChainRequest=function(e){(0,n.assertStruct)(e,y,"Invalid request arguments")},r.assertIsNamespacesObject=function(e,t){(0,n.assertStruct)(e,g,"Invalid namespaces object",t)},r.assertIsSession=function(e){(0,n.assertStruct)(e,b,"Invalid session")},r.isAccountId=function(e){return(0,s.is)(e,c)},r.isAccountIdArray=function(e){return(0,s.is)(e,l)},r.isChainId=function(e){return(0,s.is)(e,u)},r.isConnectArguments=function(e){return(0,s.is)(e,w)},r.isMultiChainRequest=function(e){return(0,s.is)(e,y)},r.isNamespace=function(e){return(0,s.is)(e,h)},r.isNamespaceId=function(e){return(0,s.is)(e,m)},r.isNamespacesObject=function(e){return(0,s.is)(e,g)},r.parseAccountId=function(e){const t=o.exec(e);if(null==t||!t.groups)throw new Error("Invalid account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.parseChainId=function(e){const t=i.exec(e);if(null==t||!t.groups)throw new Error("Invalid chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}};var n=e("@metamask/utils"),s=e("superstruct");const i=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u;r.CHAIN_ID_REGEX=i;const o=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})):(?<accountAddress>[a-zA-Z0-9]{1,64})$/u;r.ACCOUNT_ID_REGEX=o;const a=(0,s.size)((0,s.string)(),1,40);r.LimitedString=a;const u=(0,s.pattern)((0,s.string)(),i);r.ChainIdStruct=u;const c=(0,s.pattern)((0,s.string)(),o);r.AccountIdStruct=c;const l=(0,s.array)(c);r.AccountIdArrayStruct=l;const d=(0,s.object)({id:u,name:a});r.ChainStruct=d;const h=(0,s.object)({chains:(0,s.array)(d),methods:(0,s.optional)((0,s.array)(a)),events:(0,s.optional)((0,s.array)(a))});r.NamespaceStruct=h;const f=(0,s.assign)((0,s.omit)(h,["chains"]),(0,s.object)({chains:(0,s.array)(u)}));r.RequestNamespaceStruct=f;const p=(0,s.assign)(f,(0,s.object)({accounts:(0,s.array)(c)}));r.SessionNamespaceStruct=p;const m=(0,s.pattern)((0,s.string)(),/^[-a-z0-9]{3,8}$/u);r.NamespaceIdStruct=m;const g=(0,s.record)(m,h);r.NamespacesStruct=g;const b=(0,s.object)({namespaces:(0,s.record)(m,p)});r.SessionStruct=b;const w=(0,s.object)({requiredNamespaces:(0,s.record)(m,f)});r.ConnectArgumentsStruct=w;const v=(0,s.assign)((0,s.partial)((0,s.pick)(n.JsonRpcRequestStruct,["id","jsonrpc"])),(0,s.omit)(n.JsonRpcRequestStruct,["id","jsonrpc"]));r.RequestArgumentsStruct=v;const y=(0,s.object)({chainId:u,request:v});r.MultiChainRequestStruct=y}}},{package:"external:../snaps-utils/src/namespace.ts",file:"../snaps-utils/src/namespace.ts"}],[211,{"@metamask/utils":78,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WALLET_SNAP_PERMISSION_KEY=r.SnapValidationFailureReason=r.SnapIdPrefixes=r.SNAP_STREAM_NAMES=r.SNAP_EXPORT_NAMES=r.NpmSnapPackageJsonStruct=r.NpmSnapFileNames=r.NameStruct=r.HandlerType=void 0,r.assertIsNpmSnapPackageJson=function(e){(0,n.assertStruct)(e,a,`"${i.PackageJson}" is invalid`)},r.isNpmSnapPackageJson=function(e){return(0,s.is)(e,a)},r.isValidUrl=function(e,t={}){return(0,s.is)(e,f(t))},r.uri=void 0;var n=e("@metamask/utils"),s=e("superstruct");let i=function(e){return e.PackageJson="package.json",e.Manifest="snap.manifest.json",e}({});r.NpmSnapFileNames=i;const o=(0,s.size)((0,s.pattern)((0,s.string)(),/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214);r.NameStruct=o;const a=(0,s.type)({version:n.VersionStruct,name:o,main:(0,s.optional)((0,s.size)((0,s.string)(),1,Infinity)),repository:(0,s.optional)((0,s.object)({type:(0,s.size)((0,s.string)(),1,Infinity),url:(0,s.size)((0,s.string)(),1,Infinity)}))});r.NpmSnapPackageJsonStruct=a;let u=function(e){return e.npm="npm:",e.local="local:",e}({});r.SnapIdPrefixes=u;let c=function(e){return e.NameMismatch='"name" field mismatch',e.VersionMismatch='"version" field mismatch',e.RepositoryMismatch='"repository" field mismatch',e.ShasumMismatch='"shasum" field mismatch',e}({});r.SnapValidationFailureReason=c;let l=function(e){return e.JSON_RPC="jsonRpc",e.COMMAND="command",e}({});r.SNAP_STREAM_NAMES=l;let d=function(e){return e.OnRpcRequest="onRpcRequest",e.OnTransaction="onTransaction",e.SnapKeyring="keyring",e.OnCronjob="onCronjob",e}({});r.HandlerType=d;const h=Object.values(d);r.SNAP_EXPORT_NAMES=h;const f=(e={})=>(0,s.refine)((0,s.union)([(0,s.string)(),(0,s.instance)(URL)]),"uri",(t=>{try{const r=new URL(t),n=(0,s.type)(e);return(0,s.assert)(r,n),!0}catch{return`Expected URL, got "${t.toString()}".`}}));r.uri=f;r.WALLET_SNAP_PERMISSION_KEY="wallet_snap"}}},{package:"external:../snaps-utils/src/types.ts",file:"../snaps-utils/src/types.ts"}]],[205],{resources:{"@metamask/object-multiplex":{globals:{"console.warn":!0},packages:{"@metamask/object-multiplex>readable-stream":!0,"pump>end-of-stream":!0,"pump>once":!0}},"@metamask/object-multiplex>readable-stream":{builtin:{"events.EventEmitter":!0,stream:!0,"timers.setImmediate":!0,util:!0},globals:{"process.browser":!0,"process.env.READABLE_STREAM":!0,"process.stderr":!0,"process.stdout":!0,"process.version.slice":!0},packages:{"@metamask/object-multiplex>readable-stream>safe-buffer":!0,"@metamask/object-multiplex>readable-stream>string_decoder":!0,"browserify>inherits":!0,"browserify>readable-stream>core-util-is":!0,"browserify>readable-stream>isarray":!0,"browserify>readable-stream>process-nextick-args":!0,"browserify>readable-stream>util-deprecate":!0,events:!0,stream:!0,timers:!0,util:!0}},"@metamask/object-multiplex>readable-stream>safe-buffer":{builtin:{buffer:!0},packages:{buffer:!0}},"@metamask/object-multiplex>readable-stream>string_decoder":{packages:{"@metamask/object-multiplex>readable-stream>safe-buffer":!0}},"@metamask/post-message-stream":{builtin:{"worker_threads.parentPort":!0},globals:{"MessageEvent.prototype":!0,WorkerGlobalScope:!0,addEventListener:!0,browser:!0,chrome:!0,"location.origin":!0,postMessage:!0,"process.on":!0,"process.removeListener":!0,"process.send":!0,removeEventListener:!0},packages:{"@metamask/post-message-stream>@metamask/utils":!0,"@metamask/post-message-stream>readable-stream":!0,worker_threads:!0}},"@metamask/post-message-stream>@metamask/utils":{builtin:{"buffer.Buffer":!0},globals:{TextDecoder:!0,TextEncoder:!0},packages:{buffer:!0,"eslint>debug":!0,superstruct:!0,"ts-jest>semver":!0}},"@metamask/post-message-stream>readable-stream":{builtin:{"events.EventEmitter":!0,stream:!0,"timers.setImmediate":!0,util:!0},globals:{"process.browser":!0,"process.env.READABLE_STREAM":!0,"process.stderr":!0,"process.stdout":!0,"process.version.slice":!0},packages:{"@metamask/post-message-stream>readable-stream>process-nextick-args":!0,"@metamask/post-message-stream>readable-stream>safe-buffer":!0,"@metamask/post-message-stream>readable-stream>string_decoder":!0,"browserify>inherits":!0,"browserify>readable-stream>core-util-is":!0,"browserify>readable-stream>isarray":!0,"browserify>readable-stream>util-deprecate":!0,events:!0,stream:!0,timers:!0,util:!0}},"@metamask/post-message-stream>readable-stream>process-nextick-args":{globals:{"process.nextTick":!0,"process.version":!0}},"@metamask/post-message-stream>readable-stream>safe-buffer":{builtin:{buffer:!0},packages:{buffer:!0}},"@metamask/post-message-stream>readable-stream>string_decoder":{packages:{"@metamask/post-message-stream>readable-stream>safe-buffer":!0}},"@metamask/providers":{globals:{Event:!0,addEventListener:!0,"chrome.runtime.connect":!0,console:!0,dispatchEvent:!0,"document.createElement":!0,"document.readyState":!0,ethereum:"write","location.hostname":!0,removeEventListener:!0,web3:!0},packages:{"@metamask/object-multiplex":!0,"@metamask/providers>detect-browser":!0,"@metamask/providers>extension-port-stream":!0,"@metamask/providers>fast-deep-equal":!0,"@metamask/providers>is-stream":!0,"@metamask/providers>json-rpc-middleware-stream":!0,"eth-rpc-errors":!0,"json-rpc-engine":!0,"json-rpc-engine>@metamask/safe-event-emitter":!0,pump:!0}},"@metamask/providers>detect-browser":{globals:{document:!0,navigator:!0,process:!0}},"@metamask/providers>extension-port-stream":{builtin:{"buffer.Buffer":!0,"stream.Duplex":!0},packages:{buffer:!0,stream:!0}},"@metamask/providers>json-rpc-middleware-stream":{globals:{"console.warn":!0,setTimeout:!0},packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream":!0,"json-rpc-engine>@metamask/safe-event-emitter":!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream":{builtin:{"events.EventEmitter":!0,stream:!0,"timers.setImmediate":!0,util:!0},globals:{"process.browser":!0,"process.env.READABLE_STREAM":!0,"process.stderr":!0,"process.stdout":!0,"process.version.slice":!0},packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":!0,"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder":!0,"browserify>inherits":!0,"browserify>readable-stream>core-util-is":!0,"browserify>readable-stream>isarray":!0,"browserify>readable-stream>process-nextick-args":!0,"browserify>readable-stream>util-deprecate":!0,events:!0,stream:!0,timers:!0,util:!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":{builtin:{buffer:!0},packages:{buffer:!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder":{packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":!0}},"@metamask/utils":{builtin:{"buffer.Buffer":!0},globals:{TextDecoder:!0,TextEncoder:!0},packages:{buffer:!0,"eslint>debug":!0,superstruct:!0,"ts-jest>semver":!0}},"@wdio/mocha-framework>mocha>supports-color":{builtin:{"os.release":!0,"tty.isatty":!0},globals:{"process.env":!0,"process.platform":!0},packages:{"istanbul-lib-report>supports-color>has-flag":!0,os:!0,tty:!0}},"browserify>inherits":{builtin:{"util.inherits":!0},packages:{util:!0}},"browserify>readable-stream>core-util-is":{packages:{"browserify>insert-module-globals>is-buffer":!0}},"browserify>readable-stream>process-nextick-args":{globals:{process:!0}},"browserify>readable-stream>util-deprecate":{builtin:{"util.deprecate":!0},packages:{util:!0}},"eslint>debug":{builtin:{"tty.isatty":!0,"util.deprecate":!0,"util.format":!0,"util.inspect":!0},globals:{console:!0,document:!0,localStorage:!0,navigator:!0,process:!0},packages:{"@wdio/mocha-framework>mocha>supports-color":!0,"eslint>debug>ms":!0,tty:!0,util:!0}},"eth-rpc-errors":{packages:{"eth-rpc-errors>fast-safe-stringify":!0}},"external:../snaps-utils/src/index.executionenv.ts":{packages:{"external:../snaps-utils/src/handlers.ts":!0,"external:../snaps-utils/src/logging.ts":!0,"external:../snaps-utils/src/namespace.ts":!0,"external:../snaps-utils/src/types.ts":!0}},"external:../snaps-utils/src/logging.ts":{globals:{"console.error":!0,"console.log":!0,"console.warn":!0},packages:{"@metamask/utils":!0}},"external:../snaps-utils/src/namespace.ts":{packages:{"@metamask/utils":!0,superstruct:!0}},"external:../snaps-utils/src/types.ts":{globals:{URL:!0},packages:{"@metamask/utils":!0,superstruct:!0}},"istanbul-lib-report>supports-color>has-flag":{globals:{"process.argv":!0}},"json-rpc-engine":{packages:{"eth-rpc-errors":!0,"json-rpc-engine>@metamask/safe-event-emitter":!0}},"json-rpc-engine>@metamask/safe-event-emitter":{builtin:{"events.EventEmitter":!0},globals:{setTimeout:!0},packages:{events:!0}},pump:{builtin:{fs:!0},globals:{"process.version":!0},packages:{fs:!0,"pump>end-of-stream":!0,"pump>once":!0}},"pump>end-of-stream":{globals:{"process.nextTick":!0},packages:{"pump>once":!0}},"pump>once":{packages:{"pump>once>wrappy":!0}},superstruct:{globals:{"console.warn":!0,define:!0}},"ts-jest>semver":{globals:{"console.error":!0,process:!0},packages:{"ts-jest>semver>lru-cache":!0}},"ts-jest>semver>lru-cache":{packages:{"ts-jest>semver>lru-cache>yallist":!0}}}});
12149
+ t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}}}},{package:"browserify>insert-module-globals>is-buffer",file:"../../node_modules/is-buffer/index.js"}],[107,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;n.writable=e=>n(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,n.readable=e=>n(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&"function"==typeof e._transform&&"object"==typeof e._transformState,t.exports=n}}},{package:"@metamask/providers>is-stream",file:"../../node_modules/is-stream/index.js"}],[108,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}}}},{package:"browserify>readable-stream>isarray",file:"../../node_modules/isarray/index.js"}],[109,{"@metamask/safe-event-emitter":69,"eth-rpc-errors":99},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcEngine=void 0;const s=n(e("@metamask/safe-event-emitter")),i=e("eth-rpc-errors");class a extends s.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[s,i,o]=await a._runAllMiddleware(e,t,this._middleware);return i?(await a._runReturnHandlers(o),n(s)):r((async e=>{try{await a._runReturnHandlers(o)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new i.EthereumRpcError(i.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:undefined,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const r=new i.EthereumRpcError(i.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=Object.assign({},e),n={id:r.id,jsonrpc:r.jsonrpc};let s=null;try{await this._processRequest(r,n)}catch(e){s=e}return s&&(delete n.result,n.error||(n.error=i.serializeError(s))),t(s,n)}async _processRequest(e,t){const[r,n,s]=await a._runAllMiddleware(e,t,this._middleware);if(a._checkForCompletion(e,t,n),await a._runReturnHandlers(s),r)throw r}static async _runAllMiddleware(e,t,r){const n=[];let s=null,i=!1;for(const o of r)if([s,i]=await a._runMiddleware(e,t,o,n),i)break;return[s,i,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((s=>{const a=e=>{const r=e||t.error;r&&(t.error=i.serializeError(r)),s([r,!0])},u=r=>{t.error?a(t.error):(r&&("function"!=typeof r&&a(new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${o(e)}`,{request:e})),n.push(r)),s([null,!1]))};try{r(e,t,u,a)}catch(e){a(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${o(e)}`,{request:e});if(!r)throw new i.EthereumRpcError(i.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${o(e)}`,{request:e})}}function o(e){return JSON.stringify(e,null,2)}r.JsonRpcEngine=a}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/JsonRpcEngine.js"}],[110,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createAsyncMiddleware=void 0,r.createAsyncMiddleware=function(e){return async(t,r,n,s)=>{let i;const a=new Promise((e=>{i=e}));let o=null,u=!1;const c=async()=>{u=!0,n((e=>{o=e,i()})),await a};try{await e(t,r,c),u?(await a,o(null)):s(null)}catch(e){o?o(e):s(e)}}}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/createAsyncMiddleware.js"}],[111,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createScaffoldMiddleware=void 0,r.createScaffoldMiddleware=function(e){return(t,r,n,s)=>{const i=e[t.method];return i===undefined?n():"function"==typeof i?i(t,r,n,s):(r.result=i,s())}}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/createScaffoldMiddleware.js"}],[112,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getUniqueId=void 0;const n=4294967295;let s=Math.floor(Math.random()*n);r.getUniqueId=function(){return s=(s+1)%n,s}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/getUniqueId.js"}],[113,{"./getUniqueId":112},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createIdRemapMiddleware=void 0;const n=e("./getUniqueId");r.createIdRemapMiddleware=function(){return(e,t,r,s)=>{const i=e.id,a=n.getUniqueId();e.id=a,t.id=a,r((r=>{e.id=i,t.id=i,r()}))}}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/idRemapMiddleware.js"}],[114,{"./JsonRpcEngine":109,"./createAsyncMiddleware":110,"./createScaffoldMiddleware":111,"./getUniqueId":112,"./idRemapMiddleware":113,"./mergeMiddleware":115},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),s(e("./idRemapMiddleware"),r),s(e("./createAsyncMiddleware"),r),s(e("./createScaffoldMiddleware"),r),s(e("./getUniqueId"),r),s(e("./JsonRpcEngine"),r),s(e("./mergeMiddleware"),r)}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/index.js"}],[115,{"./JsonRpcEngine":109},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mergeMiddleware=void 0;const n=e("./JsonRpcEngine");r.mergeMiddleware=function(e){const t=new n.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/mergeMiddleware.js"}],[116,{"readable-stream":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("readable-stream");r.default=function(e){if(!e||!e.engine)throw new Error("Missing engine parameter!");const{engine:t}=e,r=new n.Duplex({objectMode:!0,read:()=>undefined,write:function(e,n,s){t.handle(e,((e,t)=>{r.push(t)})),s()}});return t.on&&t.on("notification",(e=>{r.push(e)})),r}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/createEngineStream.js"}],[117,{"@metamask/safe-event-emitter":69,"readable-stream":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const s=n(e("@metamask/safe-event-emitter")),i=e("readable-stream");r.default=function(e={}){const t={},r=new i.Duplex({objectMode:!0,read:()=>undefined,write:function(r,s,i){let o=null;try{!r.id?function(r){(null==e?void 0:e.retryOnMessage)&&r.method===e.retryOnMessage&&Object.values(t).forEach((({req:e,retryCount:r=0})=>{if(e.id){if(r>=3)throw new Error(`StreamMiddleware - Retry limit exceeded for request id "${e.id}"`);t[e.id].retryCount=r+1,a(e)}}));n.emit("notification",r)}(r):function(e){const r=t[e.id];if(!r)return void console.warn(`StreamMiddleware - Unknown response id "${e.id}"`);delete t[e.id],Object.assign(r.res,e),setTimeout(r.end)}(r)}catch(e){o=e}i(o)}}),n=new s.default;return{events:n,middleware:(e,r,n,s)=>{a(e),t[e.id]={req:e,res:r,next:n,end:s}},stream:r};function a(e){r.push(e)}}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/createStreamMiddleware.js"}],[118,{"./createEngineStream":116,"./createStreamMiddleware":117},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createStreamMiddleware=r.createEngineStream=void 0;const s=n(e("./createEngineStream"));r.createEngineStream=s.default;const i=n(e("./createStreamMiddleware"));r.createStreamMiddleware=i.default}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/index.js"}],[119,{"./_stream_readable":121,"./_stream_writable":123,"core-util-is":88,inherits:104,"process-nextick-args":131},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args"),s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=d;var i=Object.create(e("core-util-is"));i.inherits=e("inherits");var a=e("./_stream_readable"),o=e("./_stream_writable");i.inherits(d,a);for(var u=s(o.prototype),c=0;c<u.length;c++){var l=u[c];d.prototype[l]||(d.prototype[l]=o.prototype[l])}function d(e){if(!(this instanceof d))return new d(e);a.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_duplex.js"}],[120,{"./_stream_transform":122,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=i;var n=e("./_stream_transform"),s=Object.create(e("core-util-is"));function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}s.inherits=e("inherits"),s.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_passthrough.js"}],[121,{"./_stream_duplex":119,"./internal/streams/BufferList":124,"./internal/streams/destroy":125,"./internal/streams/stream":126,"core-util-is":88,events:"events",inherits:104,isarray:108,"process-nextick-args":131,"safe-buffer":128,"string_decoder/":129,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");t.exports=w;var s,i=e("isarray");w.ReadableState=b;e("events").EventEmitter;var a=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=global.Uint8Array||function(){};var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var d=e("util"),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var f,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");l.inherits(w,o);var g=["error","close","destroy","pause","resume"];function b(t,r){t=t||{};var n=r instanceof(s=s||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function w(t){if(s=s||e("./_stream_duplex"),!(this instanceof w))return new w(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function v(e,t,r,n,s){var i,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,a)):(s||(i=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||t===undefined||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):y(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?y(e,a,t,!1):T(e,a)):y(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function y(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&E(e)),T(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),v(this,e,t,!1,r)},w.prototype.unshift=function(e){return v(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return f||(f=e("string_decoder/").StringDecoder),this._readableState.decoder=new f(t),this._readableState.encoding=t,this};var _=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(k,e):k(e))}function k(e){h("emit readable"),e.emit("readable"),M(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(R,e,t))}function R(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function j(e){h("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,s=r.data;e-=s.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(a===i.length?s+=i:s+=i.slice(0,e),0===(e-=a)){a===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++n}return t.length-=n,s}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,s=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,a),0===(e-=a)){a===i.length?(++s,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++s}return t.length-=s,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,s=t.needReadable;return h("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",s=!0),t.ended||t.reading?h("reading or ended",s=!1):s&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,h("pipe count=%d opts=%j",s.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:w;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",m),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",w),r.removeListener("data",p),d=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){h("onend"),e.end()}s.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",l);var d=!1;var f=!1;function p(t){h("ondata"),f=!1,!1!==e.write(t)||f||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==I(s.pipes,e))&&!d&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function m(t){h("onerror",t),w(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),w()}function b(){h("onfinish"),e.removeListener("close",g),w()}function w(){h("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?i(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",g),e.once("finish",b),e.emit("pipe",r),s.flowing||(h("pipe resume"),r.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<s;i++)n[i].emit("unpipe",this,r);return this}var a=I(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},w.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var s=this._readableState;s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.emittedReadable=!1,s.reading?s.length&&E(this):n.nextTick(j,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(x,e,t))}(this,e)),this},w.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){(h("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!r.objectMode||null!==s&&s!==undefined)&&((r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause())))})),e)this[s]===undefined&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var i=0;i<g.length;i++)e.on(g[i],this.emit.bind(this,g[i]));return this._read=function(t){h("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=O}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_readable.js"}],[122,{"./_stream_duplex":119,"core-util-is":88,inherits:104},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=a;var n=e("./_stream_duplex"),s=Object.create(e("core-util-is"));function i(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}s.inherits=e("inherits"),s.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;(n.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_transform.js"}],[123,{"./_stream_duplex":119,"./internal/streams/destroy":125,"./internal/streams/stream":126,"core-util-is":88,inherits:104,"process-nextick-args":131,"safe-buffer":128,timers:"timers","util-deprecate":180},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=g;var i,a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?r:n.nextTick;g.WritableState=m;var o=Object.create(e("core-util-is"));o.inherits=e("inherits");var u={deprecate:e("util-deprecate")},c=e("./internal/streams/stream"),l=e("safe-buffer").Buffer,d=global.Uint8Array||function(){};var h,f=e("./internal/streams/destroy");function p(){}function m(t,r){i=i||e("./_stream_duplex"),t=t||{};var o=r instanceof i;this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:o&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,s=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,s,i){--t.pendingcb,r?(n.nextTick(i,s),n.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",s)):(i(s),e._writableState.errorEmitted=!0,e.emit("error",s),S(e,t))}(e,r,s,t,i);else{var o=y(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),s?a(w,e,r,o,i):w(e,r,o,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function g(t){if(i=i||e("./_stream_duplex"),!(h.call(g,this)||this instanceof i))return new g(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),c.call(this)}function b(e,t,r,n,s,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,u=!0;r;)i[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;i.allBuffers=u,b(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,d=r.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var r=y(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(_,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}o.inherits(g,c),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===g&&(e&&e._writableState instanceof m)}})):h=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var s,i=this._writableState,a=!1,o=!i.objectMode&&(s=e,l.isBuffer(s)||s instanceof d);return o&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=p),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(o||function(e,t,r,s){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||r===undefined||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),n.nextTick(s,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,s,i){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,s);n!==a&&(r=!0,s="buffer",n=a)}var o=t.objectMode?1:n.length;t.length+=o;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,o,n,s,i);return u}(this,i,o,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var s=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),s.corked&&(s.corked=1,this.uncork()),s.ending||s.finished||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,s,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=f.destroy,g.prototype._undestroy=f.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("timers").setImmediate)}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_writable.js"}],[124,{"safe-buffer":128,util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,s,i=n.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,r=i,s=o,t.copy(r,s),o+=a.data.length,a=a.next;return i},e}(),s&&s.inspect&&s.inspect.custom&&(t.exports.prototype[s.inspect.custom]=function(){var e=s.inspect({length:this.length});return this.constructor.name+" "+e})}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js"}],[125,{"process-nextick-args":131},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");function s(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(s,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(s,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[126,{stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("stream")}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/internal/streams/stream.js"}],[127,{"./lib/_stream_duplex.js":119,"./lib/_stream_passthrough.js":120,"./lib/_stream_readable.js":121,"./lib/_stream_transform.js":122,"./lib/_stream_writable.js":123,stream:"stream"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("stream");"disable"===process.env.READABLE_STREAM&&n?(t.exports=n,(r=t.exports=n.Readable).Readable=n.Readable,r.Writable=n.Writable,r.Duplex=n.Duplex,r.Transform=n.Transform,r.PassThrough=n.PassThrough,r.Stream=n):((r=t.exports=e("./lib/_stream_readable.js")).Stream=n||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"))}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/readable.js"}],[128,{buffer:"buffer"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("buffer"),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(i(n,r),r.Buffer=a),i(s,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer",file:"../../node_modules/json-rpc-middleware-stream/node_modules/safe-buffer/index.js"}],[129,{"safe-buffer":128},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}r.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var s=a(t[n]);if(s>=0)return s>0&&(e.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=a(t[n]),s>=0)return s>0&&(e.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=a(t[n]),s>=0)return s>0&&(2===s?s=0:e.lastNeed=s-3),s;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder",file:"../../node_modules/json-rpc-middleware-stream/node_modules/string_decoder/lib/string_decoder.js"}],[130,{wrappy:181},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("wrappy");function s(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function i(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(s),t.exports.strict=n(i),s.proto=s((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return s(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return i(this)},configurable:!0})}))}}},{package:"pump>once",file:"../../node_modules/once/once.js"}],[131,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?t.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,i,a=arguments.length;switch(a){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(s=new Array(a-1),i=0;i<s.length;)s[i++]=arguments[i];return process.nextTick((function(){e.apply(null,s)}))}}}:t.exports=process}}},{package:"browserify>readable-stream>process-nextick-args",file:"../../node_modules/process-nextick-args/index.js"}],[132,{"end-of-stream":95,fs:"fs",once:130},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("once"),s=e("end-of-stream"),i=e("fs"),a=function(){},o=/^v?\.0/.test(process.version),u=function(e){return"function"==typeof e},c=function(e,t,r,c){c=n(c);var l=!1;e.on("close",(function(){l=!0})),s(e,{readable:t,writable:r},(function(e){if(e)return c(e);l=!0,c()}));var d=!1;return function(t){if(!l&&!d)return d=!0,function(e){return!!o&&!!i&&(e instanceof(i.ReadStream||a)||e instanceof(i.WriteStream||a))&&u(e.close)}(e)?e.close(a):function(e){return e.setHeader&&u(e.abort)}(e)?e.abort():u(e.destroy)?e.destroy():void c(t||new Error("stream was destroyed"))}},l=function(e){e()},d=function(e,t){return e.pipe(t)};t.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=u(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(s,i){var a=i<t.length-1;return c(s,a,i>0,(function(t){e||(e=t),t&&n.forEach(l),a||(n.forEach(l),r(e))}))}));return t.reduce(d)}}}},{package:"pump",file:"../../node_modules/pump/index.js"}],[133,{"../functions/cmp":137,"../internal/debug":162,"../internal/parse-options":164,"../internal/re":165,"./range":134,"./semver":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Symbol("SemVer ANY");class s{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof s){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?a[o.COMPARATORLOOSE]:a[o.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==undefined?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):(!(t=i(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(u(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(u(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}t.exports=s;const i=e("../internal/parse-options"),{safeRe:a,t:o}=e("../internal/re"),u=e("../functions/cmp"),c=e("../internal/debug"),l=e("./semver"),d=e("./range")}}},{package:"ts-jest>semver",file:"../../node_modules/semver/classes/comparator.js"}],[134,{"../internal/constants":161,"../internal/debug":162,"../internal/parse-options":164,"../internal/re":165,"./comparator":133,"./semver":135,"lru-cache":166},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+":"+e,r=s.get(t);if(r)return r;const n=this.options.loose,i=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(i,M(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],d),o("comparator trim",e),e=e.replace(c[l.TILDETRIM],h),o("tilde trim",e),e=e.replace(c[l.CARETTRIM],f),o("caret trim",e);let u=e.split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>x(e,this.options)));n&&(u=u.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(c[l.COMPARATORLOOSE]))))),o("range list",u);const b=new Map,w=u.map((e=>new a(e,this.options)));for(const e of w){if(g(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const y=[...b.values()];return s.set(t,y),y}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>w(r,t)&&e.set.some((e=>w(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}t.exports=n;const s=new(e("lru-cache"))({max:1e3}),i=e("../internal/parse-options"),a=e("./comparator"),o=e("../internal/debug"),u=e("./semver"),{safeRe:c,t:l,comparatorTrimReplace:d,tildeTrimReplace:h,caretTrimReplace:f}=e("../internal/re"),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=e("../internal/constants"),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,w=(e,t)=>{let r=!0;const n=e.slice();let s=n.pop();for(;r&&n.length;)r=n.every((e=>s.intersects(e,t))),s=n.pop();return r},v=(e,t)=>(o("comp",e,t),e=E(e,t),o("caret",e),e=_(e,t),o("tildes",e),e=T(e,t),o("xrange",e),e=j(e,t),o("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const r=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(r,((t,r,n,s,i)=>{let a;return o("tilde",e,t,r,n,s,i),y(r)?a="":y(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:y(s)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(o("replaceTilde pr",i),a=`>=${r}.${n}.${s}-${i} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${s} <${r}.${+n+1}.0-0`,o("tilde return",a),a}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>k(e,t))).join(" "),k=(e,t)=>{o("caret",e,t);const r=t.loose?c[l.CARETLOOSE]:c[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,s,i,a)=>{let u;return o("caret",e,t,r,s,i,a),y(r)?u="":y(s)?u=`>=${r}.0.0${n} <${+r+1}.0.0-0`:y(i)?u="0"===r?`>=${r}.${s}.0${n} <${r}.${+s+1}.0-0`:`>=${r}.${s}.0${n} <${+r+1}.0.0-0`:a?(o("replaceCaret pr",a),u="0"===r?"0"===s?`>=${r}.${s}.${i}-${a} <${r}.${s}.${+i+1}-0`:`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${i}-${a} <${+r+1}.0.0-0`):(o("no pr"),u="0"===r?"0"===s?`>=${r}.${s}.${i}${n} <${r}.${s}.${+i+1}-0`:`>=${r}.${s}.${i}${n} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${i} <${+r+1}.0.0-0`),o("caret return",u),u}))},T=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>R(e,t))).join(" ")),R=(e,t)=>{e=e.trim();const r=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(r,((r,n,s,i,a,u)=>{o("xRange",e,r,n,s,i,a,u);const c=y(s),l=c||y(i),d=l||y(a),h=d;return"="===n&&h&&(n=""),u=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&h?(l&&(i=0),a=0,">"===n?(n=">=",l?(s=+s+1,i=0,a=0):(i=+i+1,a=0)):"<="===n&&(n="<",l?s=+s+1:i=+i+1),"<"===n&&(u="-0"),r=`${n+s}.${i}.${a}${u}`):l?r=`>=${s}.0.0${u} <${+s+1}.0.0-0`:d&&(r=`>=${s}.${i}.0${u} <${s}.${+i+1}.0-0`),o("xRange return",r),r}))},j=(e,t)=>(o("replaceStars",e,t),e.trim().replace(c[l.STAR],"")),x=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),M=e=>(t,r,n,s,i,a,o,u,c,l,d,h,f)=>`${r=y(n)?"":y(s)?`>=${n}.0.0${e?"-0":""}`:y(i)?`>=${n}.${s}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${u=y(c)?"":y(l)?`<${+c+1}.0.0-0`:y(d)?`<${c}.${+l+1}.0-0`:h?`<=${c}.${l}.${d}-${h}`:e?`<${c}.${l}.${+d+1}-0`:`<=${u}`}`.trim(),O=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(o(e[r].semver),e[r].semver!==a.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/classes/range.js"}],[135,{"../internal/constants":161,"../internal/debug":162,"../internal/identifiers":163,"../internal/parse-options":164,"../internal/re":165},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../internal/debug"),{MAX_LENGTH:s,MAX_SAFE_INTEGER:i}=e("../internal/constants"),{safeRe:a,t:o}=e("../internal/re"),u=e("../internal/parse-options"),{compareIdentifiers:c}=e("../internal/identifiers");class l{constructor(e,t){if(t=u(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>s)throw new TypeError(`version is longer than ${s} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[o.LOOSE]:a[o.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(n("prerelease compare",t,r,s),r===undefined&&s===undefined)return 0;if(s===undefined)return 1;if(r===undefined)return-1;if(r!==s)return c(r,s)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(n("prerelease compare",t,r,s),r===undefined&&s===undefined)return 0;if(s===undefined)return 1;if(r===undefined)return-1;if(r!==s)return c(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}t.exports=l}}},{package:"ts-jest>semver",file:"../../node_modules/semver/classes/semver.js"}],[136,{"./parse":152},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/clean.js"}],[137,{"./eq":143,"./gt":144,"./gte":145,"./lt":147,"./lte":148,"./neq":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./eq"),s=e("./neq"),i=e("./gt"),a=e("./gte"),o=e("./lt"),u=e("./lte");t.exports=(e,t,r,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,c);case"!=":return s(e,r,c);case">":return i(e,r,c);case">=":return a(e,r,c);case"<":return o(e,r,c);case"<=":return u(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/cmp.js"}],[138,{"../classes/semver":135,"../internal/re":165,"./parse":152},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("./parse"),{safeRe:i,t:a}=e("../internal/re");t.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=i[a.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),i[a.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[a.COERCERTL].lastIndex=-1}else r=e.match(i[a.COERCE]);return null===r?null:s(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/coerce.js"}],[139,{"../classes/semver":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>{const s=new n(e,r),i=new n(t,r);return s.compare(i)||s.compareBuild(i)}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/compare-build.js"}],[140,{"./compare":141},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t)=>n(e,t,!0)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/compare-loose.js"}],[141,{"../classes/semver":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/compare.js"}],[142,{"./parse.js":152},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse.js");t.exports=(e,t)=>{const r=n(e,null,!0),s=n(t,null,!0),i=r.compare(s);if(0===i)return null;const a=i>0,o=a?r:s,u=a?s:r,c=!!o.prerelease.length;if(!!u.prerelease.length&&!c)return u.patch||u.minor?o.patch?"patch":o.minor?"minor":"major":"major";const l=c?"pre":"";return r.major!==s.major?l+"major":r.minor!==s.minor?l+"minor":r.patch!==s.patch?l+"patch":"prerelease"}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/diff.js"}],[143,{"./compare":141},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0===n(e,t,r)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/eq.js"}],[144,{"./compare":141},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>0}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/gt.js"}],[145,{"./compare":141},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>=0}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/gte.js"}],[146,{"../classes/semver":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=undefined);try{return new n(e instanceof n?e.version:e,r).inc(t,s,i).version}catch(e){return null}}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/inc.js"}],[147,{"./compare":141},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<0}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/lt.js"}],[148,{"./compare":141},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<=0}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/lte.js"}],[149,{"../classes/semver":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).major}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/major.js"}],[150,{"../classes/semver":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).minor}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/minor.js"}],[151,{"./compare":141},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0!==n(e,t,r)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/neq.js"}],[152,{"../classes/semver":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/parse.js"}],[153,{"../classes/semver":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).patch}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/patch.js"}],[154,{"./parse":152},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/prerelease.js"}],[155,{"./compare":141},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(t,e,r)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/rcompare.js"}],[156,{"./compare-build":139},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/rsort.js"}],[157,{"../classes/range":134},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/satisfies.js"}],[158,{"./compare-build":139},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/sort.js"}],[159,{"./parse":152},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/functions/valid.js"}],[160,{"./classes/comparator":133,"./classes/range":134,"./classes/semver":135,"./functions/clean":136,"./functions/cmp":137,"./functions/coerce":138,"./functions/compare":141,"./functions/compare-build":139,"./functions/compare-loose":140,"./functions/diff":142,"./functions/eq":143,"./functions/gt":144,"./functions/gte":145,"./functions/inc":146,"./functions/lt":147,"./functions/lte":148,"./functions/major":149,"./functions/minor":150,"./functions/neq":151,"./functions/parse":152,"./functions/patch":153,"./functions/prerelease":154,"./functions/rcompare":155,"./functions/rsort":156,"./functions/satisfies":157,"./functions/sort":158,"./functions/valid":159,"./internal/constants":161,"./internal/identifiers":163,"./internal/re":165,"./ranges/gtr":167,"./ranges/intersects":168,"./ranges/ltr":169,"./ranges/max-satisfying":170,"./ranges/min-satisfying":171,"./ranges/min-version":172,"./ranges/outside":173,"./ranges/simplify":174,"./ranges/subset":175,"./ranges/to-comparators":176,"./ranges/valid":177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./internal/re"),s=e("./internal/constants"),i=e("./classes/semver"),a=e("./internal/identifiers"),o=e("./functions/parse"),u=e("./functions/valid"),c=e("./functions/clean"),l=e("./functions/inc"),d=e("./functions/diff"),h=e("./functions/major"),f=e("./functions/minor"),p=e("./functions/patch"),m=e("./functions/prerelease"),g=e("./functions/compare"),b=e("./functions/rcompare"),w=e("./functions/compare-loose"),v=e("./functions/compare-build"),y=e("./functions/sort"),_=e("./functions/rsort"),S=e("./functions/gt"),E=e("./functions/lt"),k=e("./functions/eq"),T=e("./functions/neq"),R=e("./functions/gte"),j=e("./functions/lte"),x=e("./functions/cmp"),M=e("./functions/coerce"),O=e("./classes/comparator"),P=e("./classes/range"),C=e("./functions/satisfies"),I=e("./ranges/to-comparators"),N=e("./ranges/max-satisfying"),A=e("./ranges/min-satisfying"),$=e("./ranges/min-version"),L=e("./ranges/valid"),D=e("./ranges/outside"),B=e("./ranges/gtr"),J=e("./ranges/ltr"),q=e("./ranges/intersects"),F=e("./ranges/simplify"),W=e("./ranges/subset");t.exports={parse:o,valid:u,clean:c,inc:l,diff:d,major:h,minor:f,patch:p,prerelease:m,compare:g,rcompare:b,compareLoose:w,compareBuild:v,sort:y,rsort:_,gt:S,lt:E,eq:k,neq:T,gte:R,lte:j,cmp:x,coerce:M,Comparator:O,Range:P,satisfies:C,toComparators:I,maxSatisfying:N,minSatisfying:A,minVersion:$,validRange:L,outside:D,gtr:B,ltr:J,intersects:q,simplifyRange:F,subset:W,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:s.SEMVER_SPEC_VERSION,RELEASE_TYPES:s.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/index.js"}],[161,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/internal/constants.js"}],[162,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};t.exports=n}}},{package:"ts-jest>semver",file:"../../node_modules/semver/internal/debug.js"}],[163,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=/^[0-9]+$/,s=(e,t)=>{const r=n.test(e),s=n.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:s,rcompareIdentifiers:(e,t)=>s(t,e)}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/internal/identifiers.js"}],[164,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Object.freeze({loose:!0}),s=Object.freeze({});t.exports=e=>e?"object"!=typeof e?n:e:s}}},{package:"ts-jest>semver",file:"../../node_modules/semver/internal/parse-options.js"}],[165,{"./constants":161,"./debug":162},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=e("./constants"),a=e("./debug"),o=(r=t.exports={}).re=[],u=r.safeRe=[],c=r.src=[],l=r.t={};let d=0;const h="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[h,s]],p=(e,t,r)=>{const n=(e=>{for(const[t,r]of f)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),s=d++;a(e,s,t),l[e]=s,c[s]=t,o[s]=new RegExp(t,r?"g":undefined),u[s]=new RegExp(n,r?"g":undefined)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),p("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${h}+`),p("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),p("FULL",`^${c[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),p("LOOSE",`^${c[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),p("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),p("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),p("COERCERTL",c[l.COERCE],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",p("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",p("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}},{package:"ts-jest>semver",file:"../../node_modules/semver/internal/re.js"}],[166,{yallist:183},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("yallist"),s=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),o=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),h=Symbol("cache"),f=Symbol("updateAgeOnGet"),p=()=>1;const m=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(g(e,t)){if(w(e,n),!e[o])return undefined}else r&&(e[f]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]},b=e=>{if(e[i]>e[s])for(let t=e[d].tail;e[i]>e[s]&&null!==t;){const r=t.prev;w(e,t),t=r}},w=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[i]-=r.length,e[h].delete(r.key),e[d].removeNode(t)}};class v{constructor(e,t,r,n,s){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=s||0}}const y=(e,t,r,n)=>{let s=r.value;g(e,s)&&(w(e,r),e[o]||(s=undefined)),s&&t.call(n,s.value,s.key,e)};t.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[s]=e.max||Infinity;const t=e.length||p;if(this[a]="function"!=typeof t?p:t,this[o]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[s]=e||Infinity,b(this)}get max(){return this[s]}set allowStale(e){this[o]=!!e}get allowStale(){return this[o]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,b(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[a]&&(this[a]=e,this[i]=0,this[d].forEach((e=>{e.length=this[a](e.value,e.key),this[i]+=e.length}))),b(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){const n=r.prev;y(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){const n=r.next;y(this,e,r,t),r=n}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[c]&&this[d]&&this[d].length&&this[d].forEach((e=>this[c](e.key,e.value))),this[h]=new Map,this[d]=new n,this[i]=0}dump(){return this[d].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[u])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,o=this[a](t,e);if(this[h].has(e)){if(o>this[s])return w(this,this[h].get(e)),!1;const a=this[h].get(e).value;return this[c]&&(this[l]||this[c](e,a.value)),a.now=n,a.maxAge=r,a.value=t,this[i]+=o-a.length,a.length=o,this.get(e),b(this),!0}const f=new v(e,t,o,n,r);return f.length>this[s]?(this[c]&&this[c](e,t),!1):(this[i]+=f.length,this[d].unshift(f),this[h].set(e,this[d].head),b(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[d].tail;return e?(w(this,e),e.value):null}del(e){w(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],s=n.e||0;if(0===s)this.set(n.k,n.v);else{const e=s-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[h].forEach(((e,t)=>m(this,t,!1)))}}}}},{package:"ts-jest>semver>lru-cache",file:"../../node_modules/semver/node_modules/lru-cache/index.js"}],[167,{"./outside":173},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,">",r)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/gtr.js"}],[168,{"../classes/range":134},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/intersects.js"}],[169,{"./outside":173},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,"<",r)}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/ltr.js"}],[170,{"../classes/range":134,"../classes/semver":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range");t.exports=(e,t,r)=>{let i=null,a=null,o=null;try{o=new s(t,r)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(i&&-1!==a.compare(e)||(i=e,a=new n(i,r)))})),i}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/max-satisfying.js"}],[171,{"../classes/range":134,"../classes/semver":135},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range");t.exports=(e,t,r)=>{let i=null,a=null,o=null;try{o=new s(t,r)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(i&&1!==a.compare(e)||(i=e,a=new n(i,r)))})),i}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/min-satisfying.js"}],[172,{"../classes/range":134,"../classes/semver":135,"../functions/gt":144},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/range"),i=e("../functions/gt");t.exports=(e,t)=>{e=new s(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let a=null;s.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":a&&!i(t,a)||(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!a||r&&!i(r,a)||(r=a)}return r&&e.test(r)?r:null}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/min-version.js"}],[173,{"../classes/comparator":133,"../classes/range":134,"../classes/semver":135,"../functions/gt":144,"../functions/gte":145,"../functions/lt":147,"../functions/lte":148,"../functions/satisfies":157},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),s=e("../classes/comparator"),{ANY:i}=s,a=e("../classes/range"),o=e("../functions/satisfies"),u=e("../functions/gt"),c=e("../functions/lt"),l=e("../functions/lte"),d=e("../functions/gte");t.exports=(e,t,r,h)=>{let f,p,m,g,b;switch(e=new n(e,h),t=new a(t,h),r){case">":f=u,p=l,m=c,g=">",b=">=";break;case"<":f=c,p=d,m=u,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,h))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let a=null,o=null;if(n.forEach((e=>{e.semver===i&&(e=new s(">=0.0.0")),a=a||e,o=o||e,f(e.semver,a.semver,h)?a=e:m(e.semver,o.semver,h)&&(o=e)})),a.operator===g||a.operator===b)return!1;if((!o.operator||o.operator===g)&&p(e,o.semver))return!1;if(o.operator===b&&m(e,o.semver))return!1}return!0}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/outside.js"}],[174,{"../functions/compare.js":141,"../functions/satisfies.js":157},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../functions/satisfies.js"),s=e("../functions/compare.js");t.exports=(e,t,r)=>{const i=[];let a=null,o=null;const u=e.sort(((e,t)=>s(e,t,r)));for(const e of u){n(e,t,r)?(o=e,a||(a=e)):(o&&i.push([a,o]),o=null,a=null)}a&&i.push([a,null]);const c=[];for(const[e,t]of i)e===t?c.push(e):t||e!==u[0]?t?e===u[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const l=c.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/simplify.js"}],[175,{"../classes/comparator.js":133,"../classes/range.js":134,"../functions/compare.js":141,"../functions/satisfies.js":157},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range.js"),s=e("../classes/comparator.js"),{ANY:i}=s,a=e("../functions/satisfies.js"),o=e("../functions/compare.js"),u=[new s(">=0.0.0-0")],c=[new s(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?u:c}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=c}const n=new Set;let s,l,f,p,m,g,b;for(const t of e)">"===t.operator||">="===t.operator?s=d(s,t,r):"<"===t.operator||"<="===t.operator?l=h(l,t,r):n.add(t.semver);if(n.size>1)return null;if(s&&l){if(f=o(s.semver,l.semver,r),f>0)return null;if(0===f&&(">="!==s.operator||"<="!==l.operator))return null}for(const e of n){if(s&&!a(e,String(s),r))return null;if(l&&!a(e,String(l),r))return null;for(const n of t)if(!a(e,String(n),r))return!1;return!0}let w=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,v=!(!s||r.includePrerelease||!s.semver.prerelease.length)&&s.semver;w&&1===w.prerelease.length&&"<"===l.operator&&0===w.prerelease[0]&&(w=!1);for(const e of t){if(b=b||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,s)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(p=d(s,e,r),p===e&&p!==s)return!1}else if(">="===s.operator&&!a(s.semver,String(e),r))return!1;if(l)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),"<"===e.operator||"<="===e.operator){if(m=h(l,e,r),m===e&&m!==l)return!1}else if("<="===l.operator&&!a(l.semver,String(e),r))return!1;if(!e.operator&&(l||s)&&0!==f)return!1}return!(s&&g&&!l&&0!==f)&&(!(l&&b&&!s&&0!==f)&&(!v&&!w))},d=(e,t,r)=>{if(!e)return t;const n=o(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},h=(e,t,r)=>{if(!e)return t;const n=o(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};t.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let s=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/subset.js"}],[176,{"../classes/range":134},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/to-comparators.js"}],[177,{"../classes/range":134},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}}}},{package:"ts-jest>semver",file:"../../node_modules/semver/ranges/valid.js"}],[178,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?n(r):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Superstruct={})}(this,(function(e){class t extends TypeError{constructor(e,t){let r;const{message:n,explanation:s,...i}=e,{path:a}=e,o=0===a.length?n:`At path: ${a.join(".")} -- ${n}`;super(s??o),null!=s&&(this.cause=o),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function r(e){return"object"==typeof e&&null!=e}function n(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function i(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:a}=t,{type:o}=r,{refinement:u,message:c=`Expected a value of type \`${o}\`${u?` with refinement \`${u}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:o,refinement:u,key:i[i.length-1],path:i,branch:a,...e,message:c}}function*a(e,t,n,s){var a;r(a=e)&&"function"==typeof a[Symbol.iterator]||(e=[e]);for(const r of e){const e=i(r,t,n,s);e&&(yield e)}}function*o(e,t,n={}){const{path:s=[],branch:i=[e],coerce:a=!1,mask:u=!1}=n,c={path:s,branch:i};if(a&&(e=t.coercer(e,c),u&&"type"!==t.type&&r(t.schema)&&r(e)&&!Array.isArray(e)))for(const r in e)t.schema[r]===undefined&&delete e[r];let l="valid";for(const r of t.validator(e,c))r.explanation=n.message,l="not_valid",yield[r,undefined];for(let[d,h,f]of t.entries(e,c)){const t=o(h,f,{path:d===undefined?s:[...s,d],branch:d===undefined?i:[...i,h],coerce:a,mask:u,message:n.message});for(const n of t)n[0]?(l=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],undefined]):a&&(h=n[1],d===undefined?e=h:e instanceof Map?e.set(d,h):e instanceof Set?e.add(h):r(e)&&(h!==undefined||d in e)&&(e[d]=h))}if("not_valid"!==l)for(const r of t.refiner(e,c))r.explanation=n.message,l="not_refined",yield[r,undefined];"valid"===l&&(yield[undefined,e])}class u{constructor(e){const{type:t,schema:r,validator:n,refiner:s,coercer:i=(e=>e),entries:o=function*(){}}=e;this.type=t,this.schema=r,this.entries=o,this.coercer=i,this.validator=n?(e,t)=>a(n(e,t),t,this,e):()=>[],this.refiner=s?(e,t)=>a(s(e,t),t,this,e):()=>[]}assert(e,t){return c(e,this,t)}create(e,t){return l(e,this,t)}is(e){return h(e,this)}mask(e,t){return d(e,this,t)}validate(e,t={}){return f(e,this,t)}}function c(e,t,r){const n=f(e,t,{message:r});if(n[0])throw n[0]}function l(e,t,r){const n=f(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t,r){const n=f(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function h(e,t){return!f(e,t)[0]}function f(e,r,n={}){const s=o(e,r,n),i=function(e){const{done:t,value:r}=e.next();return t?undefined:r}(s);if(i[0]){return[new t(i[0],(function*(){for(const e of s)e[0]&&(yield e[0])})),undefined]}{const e=i[1];return[undefined,e]}}function p(e,t){return new u({type:e,schema:null,validator:t})}function m(){return p("never",(()=>!1))}function g(e){const t=e?Object.keys(e):[],n=m();return new u({type:"object",schema:e||null,*entries(s){if(e&&r(s)){const r=new Set(Object.keys(s));for(const n of t)r.delete(n),yield[n,s[n],e[n]];for(const e of r)yield[e,s[e],n]}},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>r(e)?{...e}:e})}function b(e){return new u({...e,validator:(t,r)=>t===undefined||e.validator(t,r),refiner:(t,r)=>t===undefined||e.refiner(t,r)})}function w(){return p("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function v(e){const t=Object.keys(e);return new u({type:"type",schema:e,*entries(n){if(r(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>r(e)?{...e}:e})}function y(){return p("unknown",(()=>!0))}function _(e,t,r){return new u({...e,coercer:(n,s)=>h(n,t)?e.coercer(r(n,s),s):e.coercer(n,s)})}function S(e){return e instanceof Map||e instanceof Set?e.size:e.length}function E(e,t,r){return new u({...e,*refiner(n,s){yield*e.refiner(n,s);const i=a(r(n,s),s,e,n);for(const e of i)yield{...e,refinement:t}}})}e.Struct=u,e.StructError=t,e.any=function(){return p("any",(()=>!0))},e.array=function(e){return new u({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})},e.assert=c,e.assign=function(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?v(n):g(n)},e.bigint=function(){return p("bigint",(e=>"bigint"==typeof e))},e.boolean=function(){return p("boolean",(e=>"boolean"==typeof e))},e.coerce=_,e.create=l,e.date=function(){return p("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))},e.defaulted=function(e,t,r={}){return _(e,y(),(e=>{const s="function"==typeof t?t():t;if(e===undefined)return s;if(!r.strict&&n(e)&&n(s)){const t={...e};let r=!1;for(const e in s)t[e]===undefined&&(t[e]=s[e],r=!0);if(r)return t}return e}))},e.define=p,e.deprecated=function(e,t){return new u({...e,refiner:(t,r)=>t===undefined||e.refiner(t,r),validator:(r,n)=>r===undefined||(t(r,n),e.validator(r,n))})},e.dynamic=function(e){return new u({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})},e.empty=function(e){return E(e,"empty",(t=>{const r=S(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))},e.enums=function(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new u({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})},e.func=function(){return p("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))},e.instance=function(e){return p("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))},e.integer=function(){return p("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))},e.intersection=function(e){return new u({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})},e.is=h,e.lazy=function(e){let t;return new u({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})},e.literal=function(e){const t=s(e),r=typeof e;return new u({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})},e.map=function(e,t){return new u({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,s]of r.entries())yield[n,n,e],yield[n,s,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})},e.mask=d,e.max=function(e,t,r={}){const{exclusive:n}=r;return E(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.min=function(e,t,r={}){const{exclusive:n}=r;return E(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.never=m,e.nonempty=function(e){return E(e,"nonempty",(t=>S(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},e.nullable=function(e){return new u({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})},e.number=function(){return p("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))},e.object=g,e.omit=function(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?v(n):g(n)},e.optional=b,e.partial=function(e){const t=e instanceof u?{...e.schema}:{...e};for(const e in t)t[e]=b(t[e]);return g(t)},e.pattern=function(e,t){return E(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))},e.pick=function(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return g(n)},e.record=function(e,t){return new u({type:"record",schema:null,*entries(n){if(r(n))for(const r in n){const s=n[r];yield[r,r,e],yield[r,s,t]}},validator:e=>r(e)||`Expected an object, but received: ${s(e)}`})},e.refine=E,e.regexp=function(){return p("regexp",(e=>e instanceof RegExp))},e.set=function(e){return new u({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})},e.size=function(e,t,r=t){const n=`Expected a ${e.type}`,s=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return E(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${s} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=r||`${n} with a size ${s} but received one with a size of \`${i}\``}{const{length:i}=e;return t<=i&&i<=r||`${n} with a length ${s} but received one with a length of \`${i}\``}}))},e.string=w,e.struct=function(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),p(e,t)},e.trimmed=function(e){return _(e,w(),(e=>e.trim()))},e.tuple=function(e){const t=m();return new u({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let s=0;s<n;s++)yield[s,r[s],e[s]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`})},e.type=v,e.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new u({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const i=[];for(const t of e){const[...e]=o(r,t,n),[s]=e;if(!s[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...i]}})},e.unknown=y,e.validate=f}))}}},{package:"superstruct",file:"../../node_modules/superstruct/dist/index.cjs"}],[179,{"has-flag":103,os:"os",tty:"tty"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("os"),s=e("tty"),i=e("has-flag"),{env:a}=process;let o;function u(e,{streamIsTTY:t,sniffFlags:r=!0}={}){const s=function(){if("FORCE_COLOR"in a)return"true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(Number.parseInt(a.FORCE_COLOR,10),3)}();s!==undefined&&(o=s);const u=r?o:s;if(0===u)return 0;if(r){if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2}if(e&&!t&&u===undefined)return 0;const c=u||0;if("dumb"===a.TERM)return c;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((e=>e in a))||"codeship"===a.CI_NAME?1:c;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=Number.parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:c}function c(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(u(e,{streamIsTTY:e&&e.isTTY,...t}))}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?o=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=1),t.exports={supportsColor:c,stdout:c({isTTY:s.isatty(1)}),stderr:c({isTTY:s.isatty(2)})}}}},{package:"@wdio/mocha-framework>mocha>supports-color",file:"../../node_modules/supports-color/index.js"}],[180,{util:"util"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("util").deprecate}}},{package:"browserify>readable-stream>util-deprecate",file:"../../node_modules/util-deprecate/node.js"}],[181,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),s=e[e.length-1];return"function"==typeof n&&n!==s&&Object.keys(s).forEach((function(e){n[e]=s[e]})),n}}}}},{package:"pump>once>wrappy",file:"../../node_modules/wrappy/wrappy.js"}],[182,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}}}},{package:"ts-jest>semver>lru-cache>yallist",file:"../../node_modules/yallist/iterator.js"}],[183,{"./iterator.js":182},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function s(e,t,r){var n=t===e.head?new o(r,null,t,e):new o(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function i(e,t){e.tail=new o(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new o(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function o(e,t,r,n){if(!(this instanceof o))return new o(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}t.exports=n,n.Node=o,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},n.prototype.pop=function(){if(!this.tail)return undefined;var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e},n.prototype.shift=function(){if(!this.head)return undefined;var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var s=0;null!==n;s++)r=e(r,n.value,s),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var s=this.length-1;null!==n;s--)r=e(r,n.value,s),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;var a=[];for(n=0;i&&n<t;n++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(n=0;n<r.length;n++)i=s(this,i,r[n]);return a},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{e("./iterator.js")(n)}catch(e){}}}},{package:"ts-jest>semver>lru-cache>yallist",file:"../../node_modules/yallist/yallist.js"}],[184,{"../logging":203,"../openrpc.json":206,"./../../../snaps-utils/src/index.executionenv":208,"./commands":185,"./endowments":189,"./globalEvents":196,"./keyring":198,"./sortParams":200,"./utils":201,"./validation":202,"@metamask/providers":61,"@metamask/utils":78,"eth-rpc-errors":99,"json-rpc-engine":114,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BaseSnapExecutor=void 0;var n,s=e("@metamask/providers"),i=e("./../../../snaps-utils/src/index.executionenv"),a=e("@metamask/utils"),o=e("eth-rpc-errors"),u=e("json-rpc-engine"),c=e("superstruct"),l=e("../logging"),d=(n=e("../openrpc.json"))&&n.__esModule?n:{default:n},h=e("./commands"),f=e("./endowments"),p=e("./globalEvents"),m=e("./keyring"),g=e("./sortParams"),b=e("./utils"),w=e("./validation");function v(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const y={code:o.errorCodes.rpc.internal,message:"Execution Environment Error"},_={ping:{struct:w.PingRequestArgumentsStruct,params:[]},executeSnap:{struct:w.ExecuteSnapRequestArgumentsStruct,params:["snapName","sourceCode","endowments"]},terminate:{struct:w.TerminateRequestArgumentsStruct,params:[]},snapRpc:{struct:w.SnapRpcRequestArgumentsStruct,params:["target","handler","origin","request"]}};r.BaseSnapExecutor=class{constructor(e,t){v(this,"snapData",void 0),v(this,"commandStream",void 0),v(this,"rpcStream",void 0),v(this,"methods",void 0),v(this,"snapErrorHandler",void 0),v(this,"snapPromiseErrorHandler",void 0),v(this,"lastTeardown",0),this.snapData=new Map,this.commandStream=e,this.commandStream.on("data",(e=>{this.onCommandRequest(e).catch((e=>{(0,i.logError)(e)}))})),this.rpcStream=t,this.methods=(0,h.getCommandMethodImplementations)(this.startSnap.bind(this),(async(e,t,r)=>{const n=this.snapData.get(e),s=t===i.HandlerType.SnapKeyring?(0,m.wrapKeyring)(this.notify.bind(this),null==n?void 0:n.exports.keyring):null==n?void 0:n.exports[t];(0,a.assert)(s!==undefined,`No ${t} handler exported for snap "${e}`);let o=await this.executeInSnapContext(e,(()=>s(r)));o===undefined&&(o=null);try{return(0,a.getSafeJson)(o)}catch(e){throw new TypeError(`Received non-JSON-serializable value: ${e.message.replace(/^Assertion failed: /u,"")}`)}}),this.onTerminate.bind(this))}errorHandler(e,t){const r=(0,b.constructError)(e),n=(0,o.serializeError)(r,{fallbackError:y,shouldIncludeStack:!1}),s={...t,stack:(null==r?void 0:r.stack)??null};this.notify({method:"UnhandledError",params:{error:{...n,data:s}}})}async onCommandRequest(e){if(!(0,a.isJsonRpcRequest)(e))throw new Error("Command stream received a non-JSON-RPC request.");const{id:t,method:r,params:n}=e;if("rpc.discover"===r)return void this.respond(t,{result:d.default});if(!(0,a.hasProperty)(_,r))return void this.respond(t,{error:o.ethErrors.rpc.methodNotFound({data:{method:r}}).serialize()});const s=_[r],i=(0,g.sortParamKeys)(s.params,n),[u]=(0,c.validate)(i,s.struct);if(u)this.respond(t,{error:o.ethErrors.rpc.invalidParams({message:`Invalid parameters for method "${r}": ${u.message}.`,data:{method:r,params:i}}).serialize()});else try{const e=await this.methods[r](...i);this.respond(t,{result:e})}catch(e){this.respond(t,{error:(0,o.serializeError)(e,{fallbackError:y})})}}notify(e){if(!(0,a.isValidJson)(e)||!(0,a.isObject)(e))throw new Error("JSON-RPC notifications must be JSON serializable objects");this.commandStream.write({...e,jsonrpc:"2.0"})}respond(e,t){if(!(0,a.isValidJson)(t)||!(0,a.isObject)(t))throw new Error("JSON-RPC responses must be JSON serializable objects.");this.commandStream.write({...t,id:e,jsonrpc:"2.0"})}async startSnap(e,t,r){(0,l.log)(`Starting snap '${e}' in worker.`),this.snapPromiseErrorHandler&&(0,p.removeEventListener)("unhandledrejection",this.snapPromiseErrorHandler),this.snapErrorHandler&&(0,p.removeEventListener)("error",this.snapErrorHandler),this.snapErrorHandler=t=>{this.errorHandler(t.error,{snapName:e})},this.snapPromiseErrorHandler=t=>{this.errorHandler(t instanceof Error?t:t.reason,{snapName:e})};const n=new s.StreamProvider(this.rpcStream,{jsonRpcStreamName:"metamask-provider",rpcMiddleware:[(0,u.createIdRemapMiddleware)()]});await n.initialize();const i=this.createSnapGlobal(n),a=this.createEIP1193Provider(n),o={exports:{}};try{const{endowments:n,teardown:s}=(0,f.createEndowments)(i,a,r);this.snapData.set(e,{idleTeardown:s,runningEvaluations:new Set,exports:{}}),(0,p.addEventListener)("unhandledRejection",this.snapPromiseErrorHandler),(0,p.addEventListener)("error",this.snapErrorHandler);const u=new Compartment({...n,module:o,exports:o.exports});u.globalThis.self=u.globalThis,u.globalThis.global=u.globalThis,u.globalThis.window=u.globalThis,await this.executeInSnapContext(e,(()=>{u.evaluate(t),this.registerSnapExports(e,o)}))}catch(t){throw this.removeSnap(e),new Error(`Error while running snap '${e}': ${t.message}`)}}onTerminate(){this.snapData.forEach((e=>e.runningEvaluations.forEach((e=>e.stop())))),this.snapData.clear()}registerSnapExports(e,t){const r=this.snapData.get(e);r&&(r.exports=i.SNAP_EXPORT_NAMES.reduce(((e,r)=>{const n=t.exports[r];return(0,w.validateExport)(r,n)?{...e,[r]:n}:e}),{}))}createSnapGlobal(e){const t=e.request.bind(e),r=async e=>{(0,b.assertSnapOutboundRequest)(e);const r=(0,a.getSafeJson)(e);this.notify({method:"OutboundRequest"});try{return await(0,b.withTeardown)(t(r),this)}finally{this.notify({method:"OutboundResponse"})}},n=new Proxy({},{has:(e,t)=>"string"==typeof t&&["request"].includes(t),get:(e,t)=>"request"===t?r:undefined});return harden(n)}createEIP1193Provider(e){const t=e.request.bind(e),r=(0,b.proxyStreamProvider)(e,(async e=>{(0,b.assertEthereumOutboundRequest)(e);const r=(0,a.getSafeJson)(e);this.notify({method:"OutboundRequest"});try{return await(0,b.withTeardown)(t(r),this)}finally{this.notify({method:"OutboundResponse"})}}));return harden(r)}removeSnap(e){this.snapData.delete(e)}async executeInSnapContext(e,t){const r=this.snapData.get(e);if(r===undefined)throw new Error(`Tried to execute in context of unknown snap: "${e}".`);let n;const s=new Promise(((t,r)=>n=()=>r(o.ethErrors.rpc.internal(`The snap "${e}" has been terminated during execution.`)))),i={stop:n};try{return r.runningEvaluations.add(i),await Promise.race([t(),s])}finally{r.runningEvaluations.delete(i),0===r.runningEvaluations.size&&(this.lastTeardown+=1,await r.idleTeardown())}}}}}},{package:"$root$",file:"src/common/BaseSnapExecutor.ts"}],[185,{"./../../../snaps-utils/src/index.executionenv":208,"./validation":202,"@metamask/utils":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getCommandMethodImplementations=function(e,t,r){return{ping:async()=>Promise.resolve("OK"),terminate:async()=>(r(),Promise.resolve("OK")),executeSnap:async(t,r,n)=>(await e(t,r,n),"OK"),snapRpc:async(e,r,n,s)=>await t(e,r,a(n,r,s))??null}},r.getHandlerArguments=a;var n=e("./../../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils"),i=e("./validation");function a(e,t,r){switch(t){case n.HandlerType.OnTransaction:{(0,i.assertIsOnTransactionRequestArguments)(r.params);const{transaction:e,chainId:t,transactionOrigin:n}=r.params;return{transaction:e,chainId:t,transactionOrigin:n}}case n.HandlerType.OnRpcRequest:case n.HandlerType.SnapKeyring:return{origin:e,request:r};case n.HandlerType.OnCronjob:return{request:r};default:return(0,s.assertExhaustive)(t)}}}}},{package:"$root$",file:"src/common/commands.ts"}],[186,{"../globalObject":197,"./crypto":187,"./date":188,"./interval":190,"./math":191,"./network":192,"./textDecoder":193,"./textEncoder":194,"./timeout":195},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject"),s=h(e("./crypto")),i=h(e("./date")),a=h(e("./interval")),o=h(e("./math")),u=h(e("./network")),c=h(e("./textDecoder")),l=h(e("./textEncoder")),d=h(e("./timeout"));function h(e){return e&&e.__esModule?e:{default:e}}const f=[{endowment:AbortController,name:"AbortController"},{endowment:AbortSignal,name:"AbortSignal"},{endowment:ArrayBuffer,name:"ArrayBuffer"},{endowment:atob,name:"atob",bind:!0},{endowment:BigInt,name:"BigInt"},{endowment:BigInt64Array,name:"BigInt64Array"},{endowment:BigUint64Array,name:"BigUint64Array"},{endowment:btoa,name:"btoa",bind:!0},{endowment:console,name:"console"},{endowment:DataView,name:"DataView"},{endowment:Float32Array,name:"Float32Array"},{endowment:Float64Array,name:"Float64Array"},{endowment:Int8Array,name:"Int8Array"},{endowment:Int16Array,name:"Int16Array"},{endowment:Int32Array,name:"Int32Array"},{endowment:Uint8Array,name:"Uint8Array"},{endowment:Uint8ClampedArray,name:"Uint8ClampedArray"},{endowment:Uint16Array,name:"Uint16Array"},{endowment:Uint32Array,name:"Uint32Array"},{endowment:URL,name:"URL"},{endowment:WebAssembly,name:"WebAssembly"}];var p=()=>{const e=[s.default,a.default,o.default,u.default,d.default,c.default,l.default,i.default];return f.forEach((t=>{const r={names:[t.name],factory:()=>{const e="function"==typeof t.endowment&&t.bind?t.endowment.bind(n.rootRealmGlobal):t.endowment;return{[t.name]:harden(e)}}};e.push(r)})),e};r.default=p}}},{package:"$root$",file:"src/common/endowments/commonEndowmentFactory.ts"}],[187,{"../globalObject":197,crypto:"crypto"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject");var s={names:["crypto","SubtleCrypto"],factory:()=>{if("crypto"in n.rootRealmGlobal&&"object"==typeof n.rootRealmGlobal.crypto&&"SubtleCrypto"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.SubtleCrypto)return{crypto:harden(n.rootRealmGlobal.crypto),SubtleCrypto:harden(n.rootRealmGlobal.SubtleCrypto)};const t=e("crypto").webcrypto;return{crypto:harden(t),SubtleCrypto:harden(t.subtle.constructor)}}};r.default=s}}},{package:"$root$",file:"src/common/endowments/crypto.ts"}],[188,{"../globalObject":197},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject");var s={names:["Date"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Date);let t=0;const r=()=>{const e=n.rootRealmGlobal.Date.now(),r=Math.round(e+Math.random());return r>t&&(t=r),t},s=function(...e){return Reflect.construct(n.rootRealmGlobal.Date,0===e.length?[r()]:e,new.target)};return e.forEach((e=>{Reflect.defineProperty(s,e,{configurable:!1,writable:!1,value:"now"===e?r:n.rootRealmGlobal.Date[e]})})),{Date:harden(s)}}};r.default=s}}},{package:"$root$",file:"src/common/endowments/date.ts"}],[189,{"../globalObject":197,"./../../../../snaps-utils/src/index.executionenv":208,"./commonEndowmentFactory":186,"@metamask/utils":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createEndowments=function(e,t,r=[]){const n={},u=r.reduce((({allEndowments:e,teardowns:r},u)=>{if(o.has(u)){if(!(0,i.hasProperty)(n,u)){const{teardownFunction:e,...t}=o.get(u)();Object.assign(n,t),e&&r.push(e)}e[u]=n[u]}else if("ethereum"===u)e[u]=t;else{if(!(u in a.rootRealmGlobal))throw new Error(`Unknown endowment: "${u}".`);{(0,s.logWarning)(`Access to unhardened global ${u}.`);const t=a.rootRealmGlobal[u];e[u]=t}}return{allEndowments:e,teardowns:r}}),{allEndowments:{snap:e},teardowns:[]});return{endowments:u.allEndowments,teardown:async()=>{await Promise.all(u.teardowns.map((e=>e())))}}};var n,s=e("./../../../../snaps-utils/src/index.executionenv"),i=e("@metamask/utils"),a=e("../globalObject");const o=(0,((n=e("./commonEndowmentFactory"))&&n.__esModule?n:{default:n}).default)().reduce(((e,t)=>(t.names.forEach((r=>{e.set(r,t.factory)})),e)),new Map)}}},{package:"$root$",file:"src/common/endowments/index.ts"}],[190,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["setInterval","clearInterval"],factory:()=>{const e=new Map,t=t=>{harden(t);const r=e.get(t);r!==undefined&&(clearInterval(r),e.delete(t))};return{setInterval:harden(((t,r)=>{if("function"!=typeof t)throw new Error("The interval handler must be a function. Received: "+typeof t);harden(t);const n=Object.freeze(Object.create(null)),s=setInterval(t,Math.max(10,r??0));return e.set(n,s),n})),clearInterval:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=n}}},{package:"$root$",file:"src/common/endowments/interval.ts"}],[191,{"../globalObject":197},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject");var s={names:["Math"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Math).reduce(((e,t)=>"random"===t?e:{...e,[t]:n.rootRealmGlobal.Math[t]}),{});return harden({Math:{...e,random:()=>crypto.getRandomValues(new Uint32Array(1))[0]/2**32}})}};r.default=s}}},{package:"$root$",file:"src/common/endowments/math.ts"}],[192,{"../utils":201},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../utils");function s(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function i(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,o(e,t,"get"))}function a(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,o(e,t,"set"),r),r}function o(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var u=new WeakMap,c=new WeakMap;class l{constructor(e,t){s(this,u,{writable:!0,value:void 0}),s(this,c,{writable:!0,value:void 0}),a(this,c,e),a(this,u,t)}get body(){return i(this,c).body}get bodyUsed(){return i(this,c).bodyUsed}get headers(){return i(this,c).headers}get ok(){return i(this,c).ok}get redirected(){return i(this,c).redirected}get status(){return i(this,c).status}get statusText(){return i(this,c).statusText}get type(){return i(this,c).type}get url(){return i(this,c).url}async text(){return(0,n.withTeardown)(i(this,c).text(),this)}async arrayBuffer(){return(0,n.withTeardown)(i(this,c).arrayBuffer(),this)}async blob(){return(0,n.withTeardown)(i(this,c).blob(),this)}clone(){const e=i(this,c).clone();return new l(e,i(this,u))}async formData(){return(0,n.withTeardown)(i(this,c).formData(),this)}async json(){return(0,n.withTeardown)(i(this,c).json(),this)}}var d={names:["fetch"],factory:()=>{const e=new Set,t={lastTeardown:0},r=new FinalizationRegistry((e=>e()));return{fetch:harden((async(s,i)=>{const a=new AbortController;if(null!==(null==i?void 0:i.signal)&&(null==i?void 0:i.signal)!==undefined){const e=i.signal;e.addEventListener("abort",(()=>{a.abort(e.reason)}),{once:!0})}let o,u;try{const r=fetch(s,{...i,signal:a.signal});u={cancel:async()=>{a.abort();try{await r}catch{}}},e.add(u),o=new l(await(0,n.withTeardown)(r,t),t)}finally{u!==undefined&&e.delete(u)}if(null!==o.body){const t=new WeakRef(o.body),n={cancel:async()=>{try{var e;await(null===(e=t.deref())||void 0===e?void 0:e.cancel())}catch{}}};e.add(n),r.register(o.body,(()=>e.delete(n)))}return harden(o)})),teardownFunction:async()=>{t.lastTeardown+=1;const r=[];e.forEach((({cancel:e})=>r.push(e()))),e.clear(),await Promise.all(r)}}}};r.default=d}}},{package:"$root$",file:"src/common/endowments/network.ts"}],[193,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["TextDecoder"],factory:()=>({TextDecoder:harden(TextDecoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textDecoder.ts"}],[194,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["TextEncoder"],factory:()=>({TextEncoder:harden(TextEncoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textEncoder.ts"}],[195,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["setTimeout","clearTimeout"],factory:()=>{const e=new Map,t=t=>{const r=e.get(t);r!==undefined&&(clearTimeout(r),e.delete(t))};return{setTimeout:harden(((t,r)=>{if("function"!=typeof t)throw new Error("The timeout handler must be a function. Received: "+typeof t);harden(t);const n=Object.freeze(Object.create(null)),s=setTimeout((()=>{e.delete(n),t()}),Math.max(10,r??0));return e.set(n,s),n})),clearTimeout:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=n}}},{package:"$root$",file:"src/common/endowments/timeout.ts"}],[196,{"./globalObject":197},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.addEventListener=function(e,t){if("addEventListener"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.addEventListener)return n.rootRealmGlobal.addEventListener(e.toLowerCase(),t);if(n.rootRealmGlobal.process&&"on"in n.rootRealmGlobal.process&&"function"==typeof n.rootRealmGlobal.process.on)return n.rootRealmGlobal.process.on(e,t);throw new Error("Platform agnostic addEventListener failed")},r.removeEventListener=function(e,t){if("removeEventListener"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.removeEventListener)return n.rootRealmGlobal.removeEventListener(e.toLowerCase(),t);if(n.rootRealmGlobal.process&&"removeListener"in n.rootRealmGlobal.process&&"function"==typeof n.rootRealmGlobal.process.removeListener)return n.rootRealmGlobal.process.removeListener(e,t);throw new Error("Platform agnostic removeEventListener failed")};var n=e("./globalObject")}}},{package:"$root$",file:"src/common/globalEvents.ts"}],[197,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rootRealmGlobalName=r.rootRealmGlobal=void 0;var n=function(e){return e.globalThis="globalThis",e.global="global",e.self="self",e.window="window",e}(n||{});let s,i;if("undefined"!=typeof globalThis)s=globalThis,i=n.globalThis;else if("undefined"!=typeof self)s=self,i=n.self;else if("undefined"!=typeof window)s=window,i=n.window;else{if("undefined"==typeof global)throw new Error("Unknown realm type; failed to identify global object.");s=global,i=n.global}const a=s;r.rootRealmGlobal=a;const o=i;r.rootRealmGlobalName=o}}},{package:"$root$",file:"src/common/globalObject.ts"}],[198,{"@metamask/utils":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.wrapKeyring=function(e,t){if(!t)throw new Error("Keyring not exported");return({request:r})=>{const{method:s,params:i}=r;if(!(s in t))throw new Error(`Keyring does not expose ${s}`);let a=i??[];const o=t[s];(0,n.assert)(o!==undefined);const u=o.bind(t);if("on"===s){const t=a[0];a=[t,(...r)=>((0,n.assert)((0,n.isValidJson)(r),new TypeError("Keyrings .on listener received non-JSON-serializable value.")),e({method:"SnapKeyringEvent",params:{data:t,args:r}}))]}return u(...a)}};var n=e("@metamask/utils")}}},{package:"$root$",file:"src/common/keyring.ts"}],[199,{"./../../../../snaps-utils/src/index.executionenv":208},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.executeLockdownMore=function(){try{const e=Reflect.ownKeys((new Compartment).globalThis),t=new Set(["eval","Function"]);new Set([...e]).forEach((e=>{const r=Reflect.getOwnPropertyDescriptor(globalThis,e);r&&(r.configurable&&(!function(e){return"set"in e||"get"in e}(r)?Object.defineProperty(globalThis,e,{configurable:!1,writable:!1}):Object.defineProperty(globalThis,e,{configurable:!1})),t.has(e)&&harden(globalThis[e]))}))}catch(e){throw(0,n.logError)("Protecting intrinsics failed:",e),e}};var n=e("./../../../../snaps-utils/src/index.executionenv")}}},{package:"$root$",file:"src/common/lockdown/lockdown-more.ts"}],[200,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.sortParamKeys=void 0;r.sortParamKeys=(e,t)=>{if(!t)return[];if(t instanceof Array)return t;const r=e.reduce(((e,t,r)=>({...e,[t]:r})),{});return Object.entries(t).sort((([e,t],[n,s])=>r[e]-r[n])).map((([e,t])=>t))}}}},{package:"$root$",file:"src/common/sortParams.ts"}],[201,{"../logging":203,"@metamask/utils":78,"eth-rpc-errors":99},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertEthereumOutboundRequest=function(e){(0,n.assert)(!String.prototype.startsWith.call(e.method,"snap_"),s.ethErrors.rpc.methodNotFound({data:{method:e.method}})),(0,n.assert)(!a.includes(e.method),s.ethErrors.rpc.methodNotFound({data:{method:e.method}})),(0,n.assertStruct)(e,n.JsonStruct,"Provided value is not JSON-RPC compatible")},r.assertSnapOutboundRequest=function(e){(0,n.assert)(String.prototype.startsWith.call(e.method,"wallet_")||String.prototype.startsWith.call(e.method,"snap_"),"The global Snap API only allows RPC methods starting with `wallet_*` and `snap_*`."),(0,n.assert)(!a.includes(e.method),s.ethErrors.rpc.methodNotFound({data:{method:e.method}})),(0,n.assertStruct)(e,n.JsonStruct,"Provided value is not JSON-RPC compatible")},r.constructError=function(e){let t;e instanceof Error?t=e:"string"==typeof e&&(t=new Error(e),delete t.stack);return t},r.proxyStreamProvider=function(e,t){return new Proxy({},{has:(e,t)=>"string"==typeof t&&["request","on","removeListener"].includes(t),get:(r,n)=>"request"===n?t:["on","removeListener"].includes(n)?e[n]:undefined})},r.withTeardown=async function(e,t){const r=t.lastTeardown;return new Promise(((n,s)=>{e.then((e=>{t.lastTeardown===r?n(e):(0,i.log)("Late promise received after Snap finished execution. Promise will be dropped.")})).catch((e=>{t.lastTeardown===r?s(e):(0,i.log)("Late promise received after Snap finished execution. Promise will be dropped.")}))}))};var n=e("@metamask/utils"),s=e("eth-rpc-errors"),i=e("../logging");const a=Object.freeze(["wallet_requestSnaps","wallet_requestPermissions","eth_sendRawTransaction","eth_sendTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_registerOnboarding","wallet_scanQRCode"])}}},{package:"$root$",file:"src/common/utils.ts"}],[202,{"./../../../snaps-utils/src/index.executionenv":208,"@metamask/utils":78,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TerminateRequestArgumentsStruct=r.SnapRpcRequestArgumentsStruct=r.PingRequestArgumentsStruct=r.OnTransactionRequestArgumentsStruct=r.JsonRpcRequestWithoutIdStruct=r.ExecuteSnapRequestArgumentsStruct=r.EndowmentStruct=void 0,r.assertIsOnTransactionRequestArguments=function(e){(0,s.assertStruct)(e,g,"Invalid request params")},r.isEndowment=l,r.isEndowmentsArray=function(e){return Array.isArray(e)&&e.every(l)},r.validateExport=function(e,t){const r=a[e];return(null==r?void 0:r(t))??!1};var n=e("./../../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils"),i=e("superstruct");const a={[n.HandlerType.OnRpcRequest]:o,[n.HandlerType.OnTransaction]:o,[n.HandlerType.SnapKeyring]:function(e){return"object"==typeof e},[n.HandlerType.OnCronjob]:o};function o(e){return"function"==typeof e}const u=(0,i.assign)((0,i.omit)(s.JsonRpcRequestStruct,["id"]),(0,i.object)({id:(0,i.optional)(s.JsonRpcIdStruct)}));r.JsonRpcRequestWithoutIdStruct=u;const c=(0,i.string)();function l(e){return(0,i.is)(e,c)}r.EndowmentStruct=c;const d=(0,i.literal)("OK"),h=(0,i.optional)((0,i.union)([(0,i.literal)(undefined),(0,i.array)()]));r.PingRequestArgumentsStruct=h;const f=(0,i.union)([(0,i.literal)(undefined),(0,i.array)()]);r.TerminateRequestArgumentsStruct=f;const p=(0,i.tuple)([(0,i.string)(),(0,i.string)(),(0,i.optional)((0,i.array)(c))]);r.ExecuteSnapRequestArgumentsStruct=p;const m=(0,i.tuple)([(0,i.string)(),(0,i.enums)(Object.values(n.HandlerType)),(0,i.string)(),(0,i.assign)(u,(0,i.object)({params:(0,i.optional)((0,i.record)((0,i.string)(),s.JsonStruct))}))]);r.SnapRpcRequestArgumentsStruct=m;const g=(0,i.object)({transaction:(0,i.record)((0,i.string)(),s.JsonStruct),chainId:n.ChainIdStruct,transactionOrigin:(0,i.nullable)((0,i.string)())});r.OnTransactionRequestArgumentsStruct=g;(0,i.assign)(s.JsonRpcSuccessStruct,(0,i.object)({result:d})),s.JsonRpcSuccessStruct}}},{package:"$root$",file:"src/common/validation.ts"}],[203,{"./../../snaps-utils/src/index.executionenv":208,"@metamask/utils":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.log=void 0;var n=e("./../../snaps-utils/src/index.executionenv");const s=(0,e("@metamask/utils").createModuleLogger)(n.snapsLogger,"snaps-execution-environments");r.log=s}}},{package:"$root$",file:"src/logging.ts"}],[204,{"../common/BaseSnapExecutor":184,"../logging":203,"./../../../snaps-utils/src/index.executionenv":208,"@metamask/object-multiplex":3,"@metamask/post-message-stream":18,pump:132},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ThreadSnapExecutor=void 0;var n=c(e("@metamask/object-multiplex")),s=e("@metamask/post-message-stream"),i=e("./../../../snaps-utils/src/index.executionenv"),a=c(e("pump")),o=e("../common/BaseSnapExecutor"),u=e("../logging");function c(e){return e&&e.__esModule?e:{default:e}}class l extends o.BaseSnapExecutor{static initialize(){(0,u.log)("Worker: Connecting to parent.");const e=new s.ThreadMessageStream,t=new n.default;(0,a.default)(e,t,e,(e=>{e&&(0,i.logError)("Parent stream failure, closing worker.",e),self.close()}));const r=t.createStream(i.SNAP_STREAM_NAMES.COMMAND),o=t.createStream(i.SNAP_STREAM_NAMES.JSON_RPC);return new l(r,o)}}r.ThreadSnapExecutor=l}}},{package:"$root$",file:"src/node-thread/ThreadSnapExecutor.ts"}],[205,{"../common/lockdown/lockdown-more":199,"./ThreadSnapExecutor":204},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../common/lockdown/lockdown-more"),s=e("./ThreadSnapExecutor");(0,n.executeLockdownMore)(),s.ThreadSnapExecutor.initialize()}}},{package:"$root$",file:"src/node-thread/index.ts"}],[206,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={openrpc:"1.2.4",info:{title:"MetaMask Snaps Execution Environment API",version:"0.0.0-development"},methods:[{name:"ping",description:"confirms that a connection has been established with the execution environment",params:[],result:{name:"PingResult",schema:{$ref:"#/components/schemas/OK"}}},{name:"terminate",description:"tells the execution environment that it is being shut down",params:[],result:{name:"TerminateResult",schema:{$ref:"#/components/schemas/OK"}}},{name:"executeSnap",description:"executes a snap in the environment. The snap can then be interacted with via `snapRpc`",params:[{name:"snapName",required:!0,description:"the name of the snap",schema:{title:"SnapName",type:"string"}},{name:"sourceCode",description:"a snaps source code that gets executed in the environment",required:!0,schema:{title:"SourceCode",type:"string"}},{name:"endowments",description:"A list of endowments to provide to SES",required:!1,schema:{title:"Endowments",description:"An array of the names of the endowments",type:"array",items:{title:"Endowment",type:"string"}}}],result:{name:"executeSnapResult",schema:{$ref:"#/components/schemas/OK"}},examples:[{name:"BasicTestSnapExecuteExample",params:[{name:"snapName",value:"TestSnap"},{name:"sourceCode",value:"module.exports.onRpcRequest = async ({ request }) => { return request.method + request.id }"}],result:{name:"BasicTestSnapExampleResult",value:"OK"}}]},{name:"snapRpc",params:[{name:"target",required:!0,description:"the name of the snap",schema:{title:"Target",type:"string"}},{name:"handler",required:!0,description:"the handler to trigger on the snap",schema:{title:"Handler",type:"string",enum:["onRpcRequest","onTransaction","keyring"]}},{name:"origin",required:!0,description:"Origin of the snap JSON-RPC request",schema:{title:"Origin",type:"string"}},{name:"request",required:!0,description:"JSON-RPC request",schema:{$ref:"#/components/schemas/JsonRpcRequest"}}],result:{name:"HandleSnapRpcResult",schema:{title:"SnapRpcResult"}},examples:[{name:"TestSnapExample",params:[{name:"target",value:"TestSnap"},{name:"origin",value:"foo.com"},{name:"request",value:{jsonrpc:"2.0",method:"hello",params:[],id:1}}],result:{name:"TestSnapResultExample",value:"hello1"}}]}],components:{schemas:{OK:{title:"OK",type:"string",const:"OK"},JsonRpcRequest:{title:"JsonRpcRequest",type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{title:"JSONRPCString",type:"string",const:"2.0"},id:{title:"JSONRPCID",oneOf:[{type:"string"},{type:"number"}]},method:{title:"JSONRPCMethod",description:"the name of the method",type:"string"},params:{title:"JSONRPCParams",type:["array","object"]}}}}}}}}},{package:"$root$",file:"src/openrpc.json"}],[207,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"external:../snaps-utils/src/handlers.ts",file:"../snaps-utils/src/handlers.ts"}],[208,{"./handlers":207,"./logging":209,"./namespace":210,"./types":211},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./handlers");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var s=e("./logging");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=e("./namespace");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var a=e("./types");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}))}}},{package:"external:../snaps-utils/src/index.executionenv.ts",file:"../snaps-utils/src/index.executionenv.ts"}],[209,{"@metamask/utils":78},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.logError=function(e,...t){console.error(e,...t)},r.logInfo=function(e,...t){console.log(e,...t)},r.logWarning=function(e,...t){console.warn(e,...t)},r.snapsLogger=void 0;const n=(0,e("@metamask/utils").createProjectLogger)("snaps");r.snapsLogger=n}}},{package:"external:../snaps-utils/src/logging.ts",file:"../snaps-utils/src/logging.ts"}],[210,{"@metamask/utils":78,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SessionStruct=r.SessionNamespaceStruct=r.RequestNamespaceStruct=r.RequestArgumentsStruct=r.NamespacesStruct=r.NamespaceStruct=r.NamespaceIdStruct=r.MultiChainRequestStruct=r.LimitedString=r.ConnectArgumentsStruct=r.ChainStruct=r.ChainIdStruct=r.CHAIN_ID_REGEX=r.AccountIdStruct=r.AccountIdArrayStruct=r.ACCOUNT_ID_REGEX=void 0,r.assertIsConnectArguments=function(e){(0,n.assertStruct)(e,w,"Invalid connect arguments")},r.assertIsMultiChainRequest=function(e){(0,n.assertStruct)(e,y,"Invalid request arguments")},r.assertIsNamespacesObject=function(e,t){(0,n.assertStruct)(e,g,"Invalid namespaces object",t)},r.assertIsSession=function(e){(0,n.assertStruct)(e,b,"Invalid session")},r.isAccountId=function(e){return(0,s.is)(e,c)},r.isAccountIdArray=function(e){return(0,s.is)(e,l)},r.isChainId=function(e){return(0,s.is)(e,u)},r.isConnectArguments=function(e){return(0,s.is)(e,w)},r.isMultiChainRequest=function(e){return(0,s.is)(e,y)},r.isNamespace=function(e){return(0,s.is)(e,h)},r.isNamespaceId=function(e){return(0,s.is)(e,m)},r.isNamespacesObject=function(e){return(0,s.is)(e,g)},r.parseAccountId=function(e){const t=a.exec(e);if(null==t||!t.groups)throw new Error("Invalid account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.parseChainId=function(e){const t=i.exec(e);if(null==t||!t.groups)throw new Error("Invalid chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}};var n=e("@metamask/utils"),s=e("superstruct");const i=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u;r.CHAIN_ID_REGEX=i;const a=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})):(?<accountAddress>[a-zA-Z0-9]{1,64})$/u;r.ACCOUNT_ID_REGEX=a;const o=(0,s.size)((0,s.string)(),1,40);r.LimitedString=o;const u=(0,s.pattern)((0,s.string)(),i);r.ChainIdStruct=u;const c=(0,s.pattern)((0,s.string)(),a);r.AccountIdStruct=c;const l=(0,s.array)(c);r.AccountIdArrayStruct=l;const d=(0,s.object)({id:u,name:o});r.ChainStruct=d;const h=(0,s.object)({chains:(0,s.array)(d),methods:(0,s.optional)((0,s.array)(o)),events:(0,s.optional)((0,s.array)(o))});r.NamespaceStruct=h;const f=(0,s.assign)((0,s.omit)(h,["chains"]),(0,s.object)({chains:(0,s.array)(u)}));r.RequestNamespaceStruct=f;const p=(0,s.assign)(f,(0,s.object)({accounts:(0,s.array)(c)}));r.SessionNamespaceStruct=p;const m=(0,s.pattern)((0,s.string)(),/^[-a-z0-9]{3,8}$/u);r.NamespaceIdStruct=m;const g=(0,s.record)(m,h);r.NamespacesStruct=g;const b=(0,s.object)({namespaces:(0,s.record)(m,p)});r.SessionStruct=b;const w=(0,s.object)({requiredNamespaces:(0,s.record)(m,f)});r.ConnectArgumentsStruct=w;const v=(0,s.assign)((0,s.partial)((0,s.pick)(n.JsonRpcRequestStruct,["id","jsonrpc"])),(0,s.omit)(n.JsonRpcRequestStruct,["id","jsonrpc"]));r.RequestArgumentsStruct=v;const y=(0,s.object)({chainId:u,request:v});r.MultiChainRequestStruct=y}}},{package:"external:../snaps-utils/src/namespace.ts",file:"../snaps-utils/src/namespace.ts"}],[211,{"@metamask/utils":78,superstruct:178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WALLET_SNAP_PERMISSION_KEY=r.SnapValidationFailureReason=r.SnapIdPrefixes=r.SNAP_STREAM_NAMES=r.SNAP_EXPORT_NAMES=r.NpmSnapPackageJsonStruct=r.NpmSnapFileNames=r.NameStruct=r.HandlerType=void 0,r.assertIsNpmSnapPackageJson=function(e){(0,n.assertStruct)(e,o,`"${i.PackageJson}" is invalid`)},r.isNpmSnapPackageJson=function(e){return(0,s.is)(e,o)},r.isValidUrl=function(e,t={}){return(0,s.is)(e,f(t))},r.uri=void 0;var n=e("@metamask/utils"),s=e("superstruct");let i=function(e){return e.PackageJson="package.json",e.Manifest="snap.manifest.json",e}({});r.NpmSnapFileNames=i;const a=(0,s.size)((0,s.pattern)((0,s.string)(),/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214);r.NameStruct=a;const o=(0,s.type)({version:n.VersionStruct,name:a,main:(0,s.optional)((0,s.size)((0,s.string)(),1,Infinity)),repository:(0,s.optional)((0,s.object)({type:(0,s.size)((0,s.string)(),1,Infinity),url:(0,s.size)((0,s.string)(),1,Infinity)}))});r.NpmSnapPackageJsonStruct=o;let u=function(e){return e.npm="npm:",e.local="local:",e}({});r.SnapIdPrefixes=u;let c=function(e){return e.NameMismatch='"name" field mismatch',e.VersionMismatch='"version" field mismatch',e.RepositoryMismatch='"repository" field mismatch',e.ShasumMismatch='"shasum" field mismatch',e}({});r.SnapValidationFailureReason=c;let l=function(e){return e.JSON_RPC="jsonRpc",e.COMMAND="command",e}({});r.SNAP_STREAM_NAMES=l;let d=function(e){return e.OnRpcRequest="onRpcRequest",e.OnTransaction="onTransaction",e.SnapKeyring="keyring",e.OnCronjob="onCronjob",e}({});r.HandlerType=d;const h=Object.values(d);r.SNAP_EXPORT_NAMES=h;const f=(e={})=>(0,s.refine)((0,s.union)([(0,s.string)(),(0,s.instance)(URL)]),"uri",(t=>{try{const r=new URL(t),n=(0,s.type)(e);return(0,s.assert)(r,n),!0}catch{return`Expected URL, got "${t.toString()}".`}}));r.uri=f;r.WALLET_SNAP_PERMISSION_KEY="wallet_snap"}}},{package:"external:../snaps-utils/src/types.ts",file:"../snaps-utils/src/types.ts"}]],[205],{resources:{"@metamask/object-multiplex":{globals:{"console.warn":!0},packages:{"@metamask/object-multiplex>readable-stream":!0,"pump>end-of-stream":!0,"pump>once":!0}},"@metamask/object-multiplex>readable-stream":{builtin:{"events.EventEmitter":!0,stream:!0,"timers.setImmediate":!0,util:!0},globals:{"process.browser":!0,"process.env.READABLE_STREAM":!0,"process.stderr":!0,"process.stdout":!0,"process.version.slice":!0},packages:{"@metamask/object-multiplex>readable-stream>safe-buffer":!0,"@metamask/object-multiplex>readable-stream>string_decoder":!0,"browserify>inherits":!0,"browserify>readable-stream>core-util-is":!0,"browserify>readable-stream>isarray":!0,"browserify>readable-stream>process-nextick-args":!0,"browserify>readable-stream>util-deprecate":!0,events:!0,stream:!0,timers:!0,util:!0}},"@metamask/object-multiplex>readable-stream>safe-buffer":{builtin:{buffer:!0},packages:{buffer:!0}},"@metamask/object-multiplex>readable-stream>string_decoder":{packages:{"@metamask/object-multiplex>readable-stream>safe-buffer":!0}},"@metamask/post-message-stream":{builtin:{"worker_threads.parentPort":!0},globals:{"MessageEvent.prototype":!0,WorkerGlobalScope:!0,addEventListener:!0,browser:!0,chrome:!0,"location.origin":!0,postMessage:!0,"process.on":!0,"process.removeListener":!0,"process.send":!0,removeEventListener:!0},packages:{"@metamask/post-message-stream>@metamask/utils":!0,"@metamask/post-message-stream>readable-stream":!0,worker_threads:!0}},"@metamask/post-message-stream>@metamask/utils":{builtin:{"buffer.Buffer":!0},globals:{TextDecoder:!0,TextEncoder:!0},packages:{buffer:!0,"eslint>debug":!0,superstruct:!0,"ts-jest>semver":!0}},"@metamask/post-message-stream>readable-stream":{builtin:{"events.EventEmitter":!0,stream:!0,"timers.setImmediate":!0,util:!0},globals:{"process.browser":!0,"process.env.READABLE_STREAM":!0,"process.stderr":!0,"process.stdout":!0,"process.version.slice":!0},packages:{"@metamask/post-message-stream>readable-stream>process-nextick-args":!0,"@metamask/post-message-stream>readable-stream>safe-buffer":!0,"@metamask/post-message-stream>readable-stream>string_decoder":!0,"browserify>inherits":!0,"browserify>readable-stream>core-util-is":!0,"browserify>readable-stream>isarray":!0,"browserify>readable-stream>util-deprecate":!0,events:!0,stream:!0,timers:!0,util:!0}},"@metamask/post-message-stream>readable-stream>process-nextick-args":{globals:{"process.nextTick":!0,"process.version":!0}},"@metamask/post-message-stream>readable-stream>safe-buffer":{builtin:{buffer:!0},packages:{buffer:!0}},"@metamask/post-message-stream>readable-stream>string_decoder":{packages:{"@metamask/post-message-stream>readable-stream>safe-buffer":!0}},"@metamask/providers":{globals:{Event:!0,addEventListener:!0,"chrome.runtime.connect":!0,console:!0,dispatchEvent:!0,"document.createElement":!0,"document.readyState":!0,ethereum:"write","location.hostname":!0,removeEventListener:!0,web3:!0},packages:{"@metamask/object-multiplex":!0,"@metamask/providers>detect-browser":!0,"@metamask/providers>extension-port-stream":!0,"@metamask/providers>fast-deep-equal":!0,"@metamask/providers>is-stream":!0,"@metamask/providers>json-rpc-middleware-stream":!0,"eth-rpc-errors":!0,"json-rpc-engine":!0,"json-rpc-engine>@metamask/safe-event-emitter":!0,pump:!0}},"@metamask/providers>detect-browser":{globals:{document:!0,navigator:!0,process:!0}},"@metamask/providers>extension-port-stream":{builtin:{"buffer.Buffer":!0,"stream.Duplex":!0},packages:{buffer:!0,stream:!0}},"@metamask/providers>json-rpc-middleware-stream":{globals:{"console.warn":!0,setTimeout:!0},packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream":!0,"json-rpc-engine>@metamask/safe-event-emitter":!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream":{builtin:{"events.EventEmitter":!0,stream:!0,"timers.setImmediate":!0,util:!0},globals:{"process.browser":!0,"process.env.READABLE_STREAM":!0,"process.stderr":!0,"process.stdout":!0,"process.version.slice":!0},packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":!0,"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder":!0,"browserify>inherits":!0,"browserify>readable-stream>core-util-is":!0,"browserify>readable-stream>isarray":!0,"browserify>readable-stream>process-nextick-args":!0,"browserify>readable-stream>util-deprecate":!0,events:!0,stream:!0,timers:!0,util:!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":{builtin:{buffer:!0},packages:{buffer:!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder":{packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":!0}},"@metamask/utils":{builtin:{"buffer.Buffer":!0},globals:{TextDecoder:!0,TextEncoder:!0},packages:{buffer:!0,"eslint>debug":!0,superstruct:!0,"ts-jest>semver":!0}},"@wdio/mocha-framework>mocha>supports-color":{builtin:{"os.release":!0,"tty.isatty":!0},globals:{"process.env":!0,"process.platform":!0},packages:{"istanbul-lib-report>supports-color>has-flag":!0,os:!0,tty:!0}},"browserify>inherits":{builtin:{"util.inherits":!0},packages:{util:!0}},"browserify>readable-stream>core-util-is":{packages:{"browserify>insert-module-globals>is-buffer":!0}},"browserify>readable-stream>process-nextick-args":{globals:{process:!0}},"browserify>readable-stream>util-deprecate":{builtin:{"util.deprecate":!0},packages:{util:!0}},"eslint>debug":{builtin:{"tty.isatty":!0,"util.deprecate":!0,"util.format":!0,"util.inspect":!0},globals:{console:!0,document:!0,localStorage:!0,navigator:!0,process:!0},packages:{"@wdio/mocha-framework>mocha>supports-color":!0,"eslint>debug>ms":!0,tty:!0,util:!0}},"eth-rpc-errors":{packages:{"eth-rpc-errors>fast-safe-stringify":!0}},"external:../snaps-utils/src/index.executionenv.ts":{packages:{"external:../snaps-utils/src/handlers.ts":!0,"external:../snaps-utils/src/logging.ts":!0,"external:../snaps-utils/src/namespace.ts":!0,"external:../snaps-utils/src/types.ts":!0}},"external:../snaps-utils/src/logging.ts":{globals:{"console.error":!0,"console.log":!0,"console.warn":!0},packages:{"@metamask/utils":!0}},"external:../snaps-utils/src/namespace.ts":{packages:{"@metamask/utils":!0,superstruct:!0}},"external:../snaps-utils/src/types.ts":{globals:{URL:!0},packages:{"@metamask/utils":!0,superstruct:!0}},"istanbul-lib-report>supports-color>has-flag":{globals:{"process.argv":!0}},"json-rpc-engine":{packages:{"eth-rpc-errors":!0,"json-rpc-engine>@metamask/safe-event-emitter":!0}},"json-rpc-engine>@metamask/safe-event-emitter":{builtin:{"events.EventEmitter":!0},globals:{setTimeout:!0},packages:{events:!0}},pump:{builtin:{fs:!0},globals:{"process.version":!0},packages:{fs:!0,"pump>end-of-stream":!0,"pump>once":!0}},"pump>end-of-stream":{globals:{"process.nextTick":!0},packages:{"pump>once":!0}},"pump>once":{packages:{"pump>once>wrappy":!0}},superstruct:{globals:{"console.warn":!0,define:!0}},"ts-jest>semver":{globals:{"console.error":!0,process:!0},packages:{"ts-jest>semver>lru-cache":!0}},"ts-jest>semver>lru-cache":{packages:{"ts-jest>semver>lru-cache>yallist":!0}}}});